klange changed the topic of #osdev to: Operating System Development || Don't ask to ask---just ask! || For 3+ LoC, use a pastebin (for example https://gist.github.com/) || Stats + Old logs: http://osdev-logs.qzx.com New Logs: https://libera.irclog.whitequark.org/osdev || Visit https://wiki.osdev.org and https://forum.osdev.org || Books: https://wiki.osdev.org/Books
Turn_Left has quit [Ping timeout: 256 seconds]
FreeFull has quit [Ping timeout: 260 seconds]
ZipCPU has quit [Read error: Connection reset by peer]
edr has quit [Quit: Leaving]
ZipCPU has joined #osdev
Turn_Left has joined #osdev
Turn_Left has quit [Quit: Leaving]
lucyy has quit [Server closed connection]
lucyy has joined #osdev
stefanct has quit [Server closed connection]
da5id has quit [Quit: WeeChat 4.7.0]
stefanct has joined #osdev
Ram-Z has quit [Server closed connection]
nur has joined #osdev
Ram-Z has joined #osdev
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
terrorjack has joined #osdev
skipwich has quit [Remote host closed the connection]
skipwich has joined #osdev
fgarcia has joined #osdev
xenos1984 has quit [Read error: Connection reset by peer]
Stary has quit [Server closed connection]
Stary has joined #osdev
xenos1984 has joined #osdev
HeTo has quit [Server closed connection]
HeTo has joined #osdev
lain` has quit [Killed (NickServ (GHOST command used by lain`_))]
lain`_ has joined #osdev
lain`_ has quit [Remote host closed the connection]
FreeFull has joined #osdev
woky has quit [Server closed connection]
woky has joined #osdev
Pixi has quit [Server closed connection]
Pixi has joined #osdev
eluks has joined #osdev
goliath has joined #osdev
agent314 has quit [Ping timeout: 252 seconds]
agent314 has joined #osdev
EmanueleDavalli has joined #osdev
gaze__ has quit [Server closed connection]
gaze__ has joined #osdev
Lucretia has joined #osdev
netbsduser` has quit [Ping timeout: 252 seconds]
agent314 has quit [Quit: WeeChat 4.5.2]
GeDaMo has joined #osdev
TkTech4 has joined #osdev
TkTech has quit [Ping timeout: 248 seconds]
TkTech4 is now known as TkTech
alpha2023 has quit [Quit: No Ping reply in 180 seconds.]
alpha2023 has joined #osdev
amine has quit [Server closed connection]
amine has joined #osdev
f1sty has joined #osdev
Stary has quit [Ping timeout: 245 seconds]
fgarcia has quit [Ping timeout: 245 seconds]
Stary has joined #osdev
fgarcia has joined #osdev
EmanueleDavalli has quit [Quit: Leaving]
gildasio has quit [*.net *.split]
chiselfuse has quit [*.net *.split]
Left_Turn has joined #osdev
gildasio has joined #osdev
EmanueleDavalli has joined #osdev
chiselfuse has joined #osdev
agent314 has joined #osdev
agent314 has quit [Max SendQ exceeded]
agent314 has joined #osdev
EmanueleDavalli has quit [Quit: Leaving]
pie_ has quit [Server closed connection]
pie_ has joined #osdev
EmanueleDavalli has joined #osdev
agent314 has quit [Ping timeout: 245 seconds]
agent314 has joined #osdev
priime has quit [Quit: The Lounge - https://thelounge.chat]
priime has joined #osdev
agent314 has quit [Ping timeout: 260 seconds]
agent314 has joined #osdev
agent314 has quit [Quit: WeeChat 4.5.2]
agent314 has joined #osdev
xenos1984 has quit [Read error: Connection reset by peer]
agent314 has quit [Max SendQ exceeded]
xenos1984 has joined #osdev
agent314 has joined #osdev
TkTech8 has joined #osdev
TkTech has quit [Ping timeout: 256 seconds]
TkTech8 is now known as TkTech
<isabella> in an elf file is the physical address in phdr always ignored?
rom4ik has quit [Server closed connection]
rom4ik has joined #osdev
<isabella> or rather, in what cases is it not zero nor the same value as the virtual address?
<isabella> like in that case what am i supposed to do with it when loading it
<EmanueleDavalli> it's useless in all the normal cases
<EmanueleDavalli> I don't think it's ever used
<heat> yeah it's not useful for the OS's elf loader
sortiecat has joined #osdev
<zid> paddr is only in sections afaik?
<zid> Which makes it a thing you don't even look at
edr has joined #osdev
dudv2 has quit [Ping timeout: 252 seconds]
goliath has quit [Quit: SIGSEGV]
<heat> paddr is also in program headers
Left_Turn has quit [Ping timeout: 256 seconds]
Left_Turn has joined #osdev
Turn_Left has joined #osdev
<zid> I thought that was LMA
ZipCPU has quit [Read error: Connection reset by peer]
Left_Turn has quit [Ping timeout: 255 seconds]
vdamewood has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ZetItUp> isabella: you ignores paddr if you have a virtual memory system
<ZetItUp> it's only there to tell you where to put it if you don't have one
<ZetItUp> aka you can ignore it :D
<isabella> ah i see
goliath has joined #osdev
amj has quit [Server closed connection]
amj has joined #osdev
agent314 has quit [Ping timeout: 260 seconds]
<Ermine> still not sure what PHY means when applied to e.g. ethernet devices. Is it the port itself?
<pog> it's the circuit that translates the physical to the MII i think
f1sty has quit [Ping timeout: 256 seconds]
<pog> so it could be twisted pair, fiber, whatever
ZipCPU has joined #osdev
<pog> even radio???
<Ermine> so it's in between the cpu and the port?
<pog> it's in between the port and the MAC
<Ermine> huh.
Ermine has quit [Server closed connection]
Ermine has joined #osdev
Left_Turn has joined #osdev
<heat> its between the linux and the kernel
Turn_Left has quit [Ping timeout: 260 seconds]
<pog> there is nothing between the linux and the kernnal
<pog> they are one
<pog> like the father the son and the holy ghost
<pog> only not a trinity
<pog> a duality
<heat> in the name of the linus and of the linux and of the kernal, amen
<zid> PHY is an abbreviation for the physical layer of the OSI model and refers to the circuitry required to implement physical layer functions.
<zid> just replace 'phy' with 'port' and you're pretty much fine
<pog> it's more than that tho
<pog> i know for ethernet it barely matters
<pog> but i want to be detailed and technical
Turn_Left has joined #osdev
<heat> i feel like restarting my work on hugetlb
<heat> i was in the middle of implementing netlink but i can commit that to my ongoing-work-branch
Left_Turn has quit [Ping timeout: 244 seconds]
<zid> pog: It's not like people don't call fibrechannel holes ports
<zid> or spdif or whatever else
Turn_Left has quit [Max SendQ exceeded]
Turn_Left has joined #osdev
<pog> the technical term for them is holes
<zid> not ussys?
<zid> ethernussy
<kof673> luminiferous aethernet
<pog> the PHY of the universe
<kof673> the dove was female it was a mystery of the father appearing as female :D phoenix comes later :D
<kof673> two vultures lol
<heat> pog pog pog pog po gp og pog pog pog
<pog> heat
<heat> bazinga
<pog> bazinga
CuteMath has joined #osdev
<heat> you can't out-bazinga the bazinger
<heat> the bazingee
<pog> i would be the bazingee because i got bazinged
<zid> You can both go off somewhere and die
citrons has quit [Server closed connection]
Maja has quit [Read error: Connection reset by peer]
Maja has joined #osdev
eck has quit [Quit: PIRCH98:WIN 95/98/WIN NT:1.0 (build 1.0.1.1190)]
<ZetItUp> spent half the day trying to figure out a way to make programs able to run in kernel space if needed to, it just hit me, why would i allow a program to run in kernel space..
<ZetItUp> i need a break
f1sty has joined #osdev
<heat> you're way ahead of the curve buddy
eck has joined #osdev
sortiecat has quit [Quit: Leaving]
citrons has joined #osdev
<pog> it's totally fine for a kernel to run bytecode
<pog> it's cool and good and safe
<ZetItUp> i mean for my system, i have no need for it atm :D
* isabella puts cpython in kernel space
<pog> spy-thon
ZipCPU has quit [Quit: ZNC 1.7.5+deb4 - https://znc.in]
<ZetItUp> zip triple fault
eck has quit [Quit: PIRCH98:WIN 95/98/WIN NT:1.0 (build 1.0.1.1190)]
eck has joined #osdev
dude12312414 has joined #osdev
dude12312414 has quit [Remote host closed the connection]
<CuteMath> Questions: on amd64 is the interrupt 32-255 enough? I've managed to get something to work (though far from usable) with HPET, AHCI and XHCI. HPET can have one interrupt per timer. AHCI and XHCI allow multiple interrupts to be assigned. Won't I run out of interrupts? In my toy OS I can assign the same interrupt to different thing by using a linked list of functions. Is that the correct way to do this sort of stuff?
<CuteMath> Should I try to be somehow smart and balance the amount of functions I assign per interrupt?
Turn_Left has quit [Ping timeout: 244 seconds]
wgrant has quit [Server closed connection]
wgrant has joined #osdev
Turn_Left has joined #osdev
<pog> if you're on linux you can see how it splits up available irqs by reading /proc/interrupts
<pog> i have 55 irqs in use
<EmanueleDavalli> I have 12 for the nvme controller, wow
<pog> i have 26
<pog> with two nvme ssds installed
<CuteMath> not sure how to read it, each line is an interrupt slot?
<pog> anyhow i think you're gonna be hard pressed to use 223 irqs on any ordinary system
<CuteMath> hard to read with 32 cores lol
<pog> each numbered line is a slot in the IDT
<pog> a slot in the IDT that isn't an CPU-internal interrupt *
<pog> we're well past the days of the 8192 and shared interrupts
<pog> allocate freely imo
<CuteMath> do I just panic in that far case?
<CuteMath> extreme*
<zid> 8192? isn't that a realtek card? :P
<heat> No
<heat> Ok so the deal with linux is that MSIs are per-cpu AFAIK
<heat> Which is the only way to handle certain hw
<EmanueleDavalli> You *can* handle multiple devices per interrupts
<EmanueleDavalli> *interrupt
<heat> Some fancy NICs require some hundreds of MSI-X vectors
<zid> 100gigE kind of rough on the whole interrupts front
<zid> when each packet is like, 100 bytes
<zid> easier to dedicate some cores to just spin on the packet list :P
goliath has quit [Quit: SIGSEGV]
<pog> aha ok so you have even more than 223 vectors available
<pog> depending how you split them between cpus
<CuteMath> wait, isn't there just one IDT?
<heat> Why does that matter?
<pog> each logical cpu can have its own idt
<heat> And no, not necessarily
<CuteMath> oh mutiple IDTs, I see
<CuteMath> mutiple*
<CuteMath> I give up
<CuteMath> lol
<pog> the ioapic can route to whatever lapic
<heat> As long as you assign some range statically as "this is MSI", only the actual handler tables need to be cpu
<heat> be percpu I mean
<CuteMath> so, when the interrupt rountine gets called, first thing to do is check on which core we are?
<CuteMath> what would be a reasonable range for MSI?
<CuteMath> The MSI Multiple Message Enable is 3 bits
<CuteMath> 7? seems wrong to mwe
<CuteMath> me*
<pog> i don't think the ISR needs to really be aware what cpu it's on
<CuteMath> I think I see why
ZipCPU has joined #osdev
Left_Turn has joined #osdev
Turn_Left has quit [Ping timeout: 256 seconds]
ZipCPU has quit [Ping timeout: 245 seconds]
<CuteMath> got it, thank you guys
ZipCPU has joined #osdev
netbsduser` has joined #osdev
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 244 seconds]
goliath has joined #osdev
eck has quit [Quit: PIRCH98:WIN 95/98/WIN NT:1.0 (build 1.0.1.1190)]
eck has joined #osdev
da5id has joined #osdev
vancz has quit [Server closed connection]
vancz has joined #osdev
<EmanueleDavalli> of the ssl libraries supported by curl, which is the easiest to port?
xenos1984 has quit [Ping timeout: 252 seconds]
sidcha649 has quit [Server closed connection]
sidcha649 has joined #osdev
Left_Turn has joined #osdev
Turn_Left has quit [Ping timeout: 252 seconds]
<zid> I think that's pretty much like asking which is the best herpes
xenos1984 has joined #osdev
<pog> i like simplex b
<zid> is that the same as hsv-2
<zid> cytomegalovirus for me anyway
xenos1984 has quit [Ping timeout: 245 seconds]
<Ermine> EmanueleDavalli: either mbedtls or bearssl
<Ermine> first one is maintained, and second one isn't
<EmanueleDavalli> thanks
<heat> pog: CuteMath: if you do per-cpu MSI-X vectors then you do need to be aware of what CPU you're on
<heat> but really, this is kind of optional
<heat> i don't know how OSes in general do this
TkTech4 has joined #osdev
<heat> but my own OS does not bother
<heat> as long as you don't get an mlx5 NIC or an ixgbe fancy-ass NIC or two NVMe drives in a 100-CPU system, you're fine
<heat> and most devices don't even need MSI mode, so your NVMe storage will just be a bit slower
<heat> it is what it is
TkTech has quit [Ping timeout: 256 seconds]
TkTech4 is now known as TkTech
svm has joined #osdev
msv has quit [Ping timeout: 248 seconds]
xenos1984 has joined #osdev
da5id has quit [Quit: WeeChat 4.7.0]
brynet has quit [Server closed connection]
brynet has joined #osdev
agent314 has joined #osdev
goliath has quit [Quit: SIGSEGV]
edr has quit [Quit: Leaving]
acidx has quit [Ping timeout: 248 seconds]
acidx has joined #osdev
xvmt has quit [Ping timeout: 272 seconds]
acidx has quit [Ping timeout: 252 seconds]
Left_Turn has quit [Ping timeout: 244 seconds]
edr has joined #osdev
xvmt has joined #osdev
goliath has joined #osdev
Left_Turn has joined #osdev
alice has quit [Server closed connection]
alice has joined #osdev
agent314 has quit [Ping timeout: 255 seconds]
CuteMath has quit [Quit: Leaving]
GeDaMo has quit [Quit: 0wt 0f v0w3ls.]
f1sty has quit [Ping timeout: 256 seconds]
f1sty has joined #osdev
f1sty has quit [Ping timeout: 244 seconds]
<isabella> i have a question about cores
<isabella> i wrote a simple program that calls abort
<isabella> https://i.imgur.com/v9BIMJY.png and in the core i can find the equivalent of this map
<isabella> in the phdr i can see the value i expected in p_memsz, but p_filesz is 0. the map itself would also be larger than my core
<isabella> this is the only executable map in glibc so i have definitely at least touched it by entering main and calling abort
<isabella> why is it not in the core?
c0co has joined #osdev
sortiecat has joined #osdev
fgarcia has quit [Quit: Remote host closed the connection]
fgarcia has joined #osdev
<isabella> i see, it's not dumped because it's file backed private and not modifed
svm is now known as msv
goliath has quit [Quit: SIGSEGV]
<heat> linux has a coredump filter functionality
<heat> which controls whether regions are dumped or not
<heat> in general for ELF files you want to dump the first page (yes, there's a filter for this) because that allows you to grab the build-id and then you're able to match the mapping to the executable very easily
<clever> another related thing that may help, or may be entirely useless:
<clever> i added core-dump support to this emulator, but since its emulating an entire machine, there isnt really one elf as a base, it starts with a kernel .bin file
<clever> so it doesnt have a base elf, it just dumps all of the ram, and throws some section headers in to point to where the kernel/dtb initial lived
<isabella> nice
<heat> i have actual proper coredump code on my kernel
<heat> if you care about the logistics
fgarcia has quit [Ping timeout: 245 seconds]
stazthebox has quit [Quit: Ping timeout (120 seconds)]
c0co has quit [Quit: Ragequite]
<nikolar> how well does it work
stazthebox has joined #osdev
fgarcia has joined #osdev
<heat> pretty darn well
<heat> i'm just missing proper xsave dump support, which i need to take of Eventually
<heat> take care of*
<nikolar> eventually (tm) is the best
<heat> it's annoying because xsave layout is CPU-dependent and is encoded in cpuid
<heat> and it's something i've been able to avoid until now
<heat> (i still _kind of_ can because normal codegen doesn't use AVX, so just SSE works)
<clever> if the cpu is only ever loading and saving its own state, then all you really care about is size, but yeah, once you coredump, you need to decode that mess
<zid> dump it as hex bytes :P
<zid> TOOOL(tm) can sort ito ut
<nikolar> just don't compile stuff with avx :P
<nikolar> sse only
<heat> clever: generally yes unless you need to preload xstate values
<clever> heat: couldnt you just load it into a float register the normal way, and then xsave them all?
<heat> that sounds harder :)
<heat> and will accidentally leak xstate data if you didn't intend to copy it all (e.g execve)
<heat> a funny bit about xsave is that it's also used for new !SIMD features (like protection keys for instance)
<clever> for execve, i would just bzero all of the saved state, then populate a few things like the initial pc and sp, and "restore" into that thread
sortiecat has quit [Ping timeout: 256 seconds]
agent314 has joined #osdev
EmanueleDavalli has quit [Quit: Leaving]
Lucretia has quit [Remote host closed the connection]
thaumavorio has quit [Server closed connection]
thaumavorio has joined #osdev
fedaykin has quit [Quit: leaving]
agent314 has quit [Quit: WeeChat 4.5.2]
agent314 has joined #osdev
agent314 has quit [Max SendQ exceeded]
agent314 has joined #osdev
Turn_Left has joined #osdev
wereii has quit [Quit: ZNC - https://znc.in]
Left_Turn has quit [Ping timeout: 256 seconds]
Turn_Left has quit [Read error: Connection reset by peer]
fedaykin has joined #osdev
wereii has joined #osdev
agent314 has quit [Quit: WeeChat 4.5.2]
agent314 has joined #osdev
agent314 has quit [Max SendQ exceeded]
agent314 has joined #osdev