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
cloudowind has quit [Ping timeout: 252 seconds]
cloudowind has joined #osdev
cloudowind has quit [Ping timeout: 260 seconds]
cloudowind has joined #osdev
cloudowind has quit [Ping timeout: 265 seconds]
cloudowind has joined #osdev
divine has joined #osdev
cloudowind has quit [Ping timeout: 246 seconds]
cloudowind has joined #osdev
<heat> kernel up
cloudowind has quit [Ping timeout: 252 seconds]
cloudowind has joined #osdev
cloudowind has quit [Ping timeout: 276 seconds]
cloudowind has joined #osdev
SupUser has joined #osdev
cloudowind has quit [Ping timeout: 255 seconds]
cloudowind has joined #osdev
<geist> heat: yep. that's precisely right
<geist> EOI before for edge, EOI after for level
<geist> that's fairly universal
<heat> yeah i've been doing EOI before for everything, but that gives out roughly twice the IRQs for level-triggered
<heat> which sucks
<heat> otoh it seems that most level triggered hardware is PCI, and those have had edge-triggered MSI support for the last 20 years
<heat> I'll want to Properly Fix This
<heat> Eventually
kanzure has quit [Ping timeout: 245 seconds]
kanzure has joined #osdev
cloudowind has quit [Ping timeout: 252 seconds]
divine has quit [Quit: Lost terminal]
cloudowind has joined #osdev
troseman has joined #osdev
troseman has quit [Client Quit]
Celelibi has quit [Ping timeout: 260 seconds]
troseman has joined #osdev
troseman has quit [Client Quit]
Celelibi has joined #osdev
karenw has quit [Ping timeout: 246 seconds]
karenw has joined #osdev
<geist> yah usually you just need to have some sort of flag when you register the handler and then just have the interrupt glue do it according to flag
<geist> if it's even possible for that particular platform/interrupt controller/device combo
divine has joined #osdev
heat has quit [Ping timeout: 245 seconds]
goliath has quit [Quit: SIGSEGV]
Brnocrist has quit [*.net *.split]
tjf has quit [*.net *.split]
DrPatater has quit [*.net *.split]
lojik has quit [*.net *.split]
Artea has quit [*.net *.split]
dostoyevsky2 has quit [*.net *.split]
exark has quit [*.net *.split]
pog has quit [*.net *.split]
dostoyevsky has quit [*.net *.split]
gmodena has quit [*.net *.split]
ornitorrincos has quit [*.net *.split]
dostoyevsky has joined #osdev
lojik has joined #osdev
Brnocrist has joined #osdev
dostoyevsky2 has joined #osdev
exark has joined #osdev
tjf has joined #osdev
DrPatater has joined #osdev
pog has joined #osdev
voidah has quit [Ping timeout: 260 seconds]
ornitorrincos has joined #osdev
Artea has joined #osdev
qubasa has quit [Ping timeout: 246 seconds]
hwpplayer1 has joined #osdev
Arthuria has joined #osdev
eluks has quit [Remote host closed the connection]
eluks has joined #osdev
karenw has quit [Ping timeout: 265 seconds]
vdamewood has joined #osdev
Arthuria has quit [Ping timeout: 260 seconds]
levitating has quit [Ping timeout: 248 seconds]
levitating has joined #osdev
levitating has quit [Client Quit]
hwpplayer1 has quit [Quit: bbl]
netbsduser` has joined #osdev
netbsduser` has quit [Ping timeout: 252 seconds]
orccoin has joined #osdev
cloudowind has quit [Ping timeout: 252 seconds]
cloudowind has joined #osdev
<geist> gosh this has been a while, finally getting around to adding SMP to LK for x86, and i haven't done a proper percpu pointer for x86-32 in a while
<geist> is it usually fs or gs for x86-32?
<geist> it's clearly gs for kernel for x86-64 since that's where the support is
<geist> but i vaguely remember something like x86 kernels use fs: for some reason
<Matt|home> hello geist.
<geist> hola
<Matt|home> sigh. 104 lines of code and i have little to show for it. this is the third time i've written this and had to sit down to think about how to fundamentally change my code to do what i need it to
<Matt|home> what's ironic is im trying to make this simpler for other people to use -_-
<kazinsal> geist: I think the x86-32 usage of fs is because that's what the sysv ABI specifies for TLS
<geist> yeah probably so
<kazinsal> easier to keep it consistent that way
Matt|home has quit [Ping timeout: 248 seconds]
GeDaMo has joined #osdev
housemate has joined #osdev
housemate has quit [Quit: Nothing to see here. I wasn't there. https://files.catbox.moe/4yru45.pdf]
spare has joined #osdev
foudfou has quit [Remote host closed the connection]
foudfou has joined #osdev
craigo has joined #osdev
strategictravele has joined #osdev
heat has joined #osdev
hwpplayer1 has joined #osdev
kof673 has quit [Ping timeout: 240 seconds]
<zid`> nortti: merry christmas
kof673 has joined #osdev
kuzdra has joined #osdev
_ngn has quit [Ping timeout: 264 seconds]
<the_oz> ,m \+
spare has quit [Remote host closed the connection]
_ngn has joined #osdev
<kazinsal> yeah man
<heat> merry linux kernel everyone
<nikolar> did i miss something
<zid`> it's finnish independecencened day
<heat> it's linux kernel day
<zid`> isn't that the same thing
<zid`> finland threw off the yoke of big unix
<kazinsal> perkele
<nikolar> kek
<heat> perkekle
<Ermine> day of the linux kernel desktop?
<pog> that's tomorrow
<heat> year of the freebsd desktop
<zid`> pog: Correct. Tomorrow.
<pog> alwyas tomorrow
<heat> fortunately today is year of the haiku desktop
<zid`> yesterday was onyx
<heat> not even day, an actual full year
<heat> inside a day
youcai has joined #osdev
<Ermine> tomorrow you wake up and realize it's today now
<heat> big if true
voidah has joined #osdev
hwpplayer1 has quit [Remote host closed the connection]
ring0_starr has quit [Remote host closed the connection]
zijjgfs has joined #osdev
<the_oz> it's the year of the freebsd laptop
<the_oz> which makes 0 sense to me, but ah well
<zijjgfs> because linux is almost completely enshittified
<zijjgfs> need something new to kill, specifically something that i liked
zijjgfs is now known as ring0_starr
SupUser has quit [Ping timeout: 246 seconds]
<heat> how exactly is linux enshittified
<Ermine> BLOATED BLOATED BLOATED BLOATED BLOATED
<pog> it's too much linu9x and not enough keernaal
<Ermine> isn't it top kek when you need full kernel sources to build out-of-tree module?
<nortti> zid`: good "inform the bolševiks we're independent now" day to you too
goliath has joined #osdev
<heat> Ermine, that sounds BLOATED
<Ermine> i have only 6.5G free space on that vps..
hwpplayer1 has joined #osdev
<heat> yo Ermine can you send me a lspci -vv for your nvme drive?
<heat> for that msi problem
<Ermine> DM'd
SupUser has joined #osdev
hwpplayer1 has quit [Quit: bbl]
ring0_starr has quit [Ping timeout: 260 seconds]
<Ermine> But like, none other out-of-tree module in this world but this one requires full kernel sources
kuzdra has left #osdev [#osdev]
<heat> yeah that's weird
obrien has joined #osdev
<zid`> really? I assumed they all did
<heat> nah they just need headers
<heat> generally there's a linux-headers package or so, that provides you the headers + build system for OOT modules
<zid`> what about requiring the build system too
<heat> build system is in linux-headers
<zid`> ah fair enough
<nikolar> why the heck would it need the full source
<nikolar> what module is that anyway
SupUser has quit [Ping timeout: 248 seconds]
Left_Turn has joined #osdev
strategictravele has quit [Quit: strategictravele]
zijjgfs has joined #osdev
zijjgfs is now known as ring0_starr
SupUser has joined #osdev
hwpplayer1 has joined #osdev
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 260 seconds]
sbalmos has joined #osdev
<Ermine> lol make segfaults
Arthuria has joined #osdev
griddle has joined #osdev
Arthuria has quit [Ping timeout: 248 seconds]
<heat> oh this is horrible, you can't ping cpus with apic id > 255 with MSI on x86
<nikolar> how do then
<heat> iommu seems to quite literally be the only way
<nikolar> huh
<heat> in any case im so fucking annoyed, i can't get msi-x to work in qmu
<nikolar> kek
<Ermine> is it related to x2apics
SupUser has quit [Ping timeout: 276 seconds]
<heat> wdym
<zid`> one would hope
<zid`> that if you ahve 256 cpus
<zid`> you have a machine newer than my sandy bridge, which had an iommu
Arthuria has joined #osdev
<heat> aight found tha problemz
SupUser has joined #osdev
<Ermine> nvmd I confused that with lapic ids
<heat> its the exact same problem yeah
<heat> MSI works by writing to a magic address that's crafted with a buncha shit, one important bit being the lapic id of the dest cpu
SupUser has quit [Ping timeout: 244 seconds]
Left_Turn has joined #osdev
Left_Turn has quit [Remote host closed the connection]
Left_Turn has joined #osdev
Turn_Left has quit [Ping timeout: 265 seconds]
xenos1984 has quit [Ping timeout: 272 seconds]
xenos1984 has joined #osdev
voidah has quit [Ping timeout: 252 seconds]
the_oz has quit [Remote host closed the connection]
the_oz has joined #osdev
_ngn has quit [Remote host closed the connection]
_ngn has joined #osdev
griddle has quit [Quit: griddle]
griddle has joined #osdev
divine has quit [Quit: Lost terminal]
Arthuria has quit [Ping timeout: 260 seconds]
Turn_Left has joined #osdev
Arthuria has joined #osdev
divine has joined #osdev
Left_Turn has quit [Ping timeout: 252 seconds]
cow_ has joined #osdev
cow has quit [Read error: Connection reset by peer]
johnjaye has quit [Ping timeout: 252 seconds]
obrien has quit [Remote host closed the connection]
Brnocrist has quit [Ping timeout: 245 seconds]
Brnocrist has joined #osdev
griddle has quit [Quit: griddle]
Turn_Left has quit [Ping timeout: 265 seconds]
cow_ is now known as cow
steelswords94 has joined #osdev
Matt|home has joined #osdev
griddle has joined #osdev
xenos1984 has quit [Ping timeout: 248 seconds]
orccoin has quit [Ping timeout: 252 seconds]
netbsduser` has joined #osdev
xenos1984 has joined #osdev
thaumavorio has quit [Quit: ZNC 1.8.2 - https://znc.in]
thaumavorio has joined #osdev
pjals has joined #osdev
SupUser has joined #osdev
<pjals> Hello, the wiki page for Paging has an example of code with the following description: "[...] To get the physical address of any virtual address in the range 0x00000000-0xFFFFF000 is then just a matter of: [...]" Why just 0xFFFFF000? Is it because of 32-bit's 4G limitation?
<pjals> I haven't exactly read the entire wiki page on paging by the way, so I may have missed something.
<heat> it's terribly explained by someone that doesn't quite get what they're doing
<pjals> Oh, that sucks. I assume you know what you're doing?
<heat> what they really mean is: to access the page tables for all mapped memory, you can use some funky math when doing this trick (called recursive mapping, fractal mapping, whatever). 0xfffff000 is the address of the actual top level page directory
<heat> i would not recommend this trick
<pjals> Then what do you recommend?
<pjals> (and also, why)
griddle has quit [Quit: griddle]
<heat> the traditional solution to "how do i access physical memory (page tables, etc) arbitrarily" is to map all of it/a good chunk of it
<heat> on 32-bit you're a little constrained there, but you can map e.g some 800MiB and still be well off. it's what linux does, but they also need to support weird users with more RAM, so they get some complexity there. sucks.
<heat> on 64-bit you can comfortably create a fuck off big ass mapping of all RAM, no problem
<pjals> Got it, thanks!
<heat> why recursive mapping sucks: it doesn't solve any other issue except "how do i access page tables", it's surprisingly tricky (how do you invalidate the TLB properly after changing page structures around?), it's hard to understand
griddle has joined #osdev
<heat> this is ofc my opinion, some people might beg to differ, but the matter of fact is that AFAIK no real kernel out there does recursive mapping
<heat> also: it's not portable to lots of page table formats, basically an x86-only trick
<pjals> Not really worried about that since I'm trying to be somewhat futureproof by seperating architecture-specific code.
<nortti> how did it end up becoming such a thing in the hobbyist osdev space? is it just someone getting the info onto the wiki at the right point in time, or what's the story there?
<pjals> It's easy and it's short enough of a code snippet to blindly copy?
<heat> pjals, right, but the bottom line is that you'll end up wanting/needing to map all of physical memory, or do a limited linear mapping of physical memory, so you'll need to deal with the complexity
<heat> this is core kernel stuff that you kind of want to work in the same way across architectures
<heat> it may seem that this stuff is a weird detail, but "access a random chunk of memory" comes up super often in kernel land
<pjals> Yes, I am planning to have a linear physical memory mapping, I'm probably going to leave the memory map similar to what it is when the OS first boots, I'm just implementing paging for protection purposes.
<heat> you probably don't want to do that fyi
<pjals> Why?
<heat> programs usually expect to run at a certain address, and those addresses are usually low too (the default for the GNU i386 toolchain is around the 128MiB mark IIRC)
<heat> so you'll want to do proper paging for that lower half of the address space at least
<pjals> Oh, my OS is breaking many assumptions of toolchains already.
the_oz has quit [Remote host closed the connection]
<heat> and you'll end up moving the kernel out of the way up in the address space, with MMU mgic
the_oz has joined #osdev
<heat> well, i don't know what you're doing specifically, but this is typical wisdom for a bunch of good reasons
<pjals> I'm attempting to do something like a dynamically-linked Unikernel, where there's minimal distinction between userspace and kernelspace.
<heat> ok then it does make more sense to pull off something a little more flat
theruran has quit [Quit: Connection closed for inactivity]
the_oz has quit [Remote host closed the connection]
the_oz has joined #osdev
griddle has quit [Quit: griddle]
cloudowind has quit [Ping timeout: 260 seconds]
SupUser has quit [Ping timeout: 264 seconds]
GeDaMo has quit [Quit: 0wt 0f v0w3ls.]
cloudowind has joined #osdev
x64S has joined #osdev
<geist> word. i endorse heat's message
Arthuria has quit [Ping timeout: 252 seconds]
spareproject has joined #osdev
strategictravele has joined #osdev
strategictravele has quit [Client Quit]
freakazoid332 has quit [Quit: Leaving]
ring0_starr has quit [Ping timeout: 276 seconds]
cloudowind has quit [Ping timeout: 244 seconds]
pjals has quit [Quit: Lost terminal]
zijjgfs has joined #osdev
freakazoid333 has joined #osdev
freakazoid333 has quit [Quit: Leaving]
Guest3021 has joined #osdev
divine has quit [Quit: Lost terminal]
Guest3021 is now known as freakazoid333
the_oz has quit [Remote host closed the connection]
the_oz has joined #osdev
nur has quit [Quit: Leaving]
cloudowind has joined #osdev
Turn_Left has joined #osdev
divine has joined #osdev
Left_Turn has joined #osdev
Turn_Left has quit [Ping timeout: 265 seconds]
steelswords94 has quit [Quit: Ping timeout (120 seconds)]
steelswords94 has joined #osdev
netbsduser` has quit [Ping timeout: 252 seconds]
hwpplayer1 has quit [Remote host closed the connection]
Left_Turn has quit [Read error: Connection reset by peer]
cloudowind has quit [Ping timeout: 244 seconds]
Arthuria has joined #osdev
cloudowind has joined #osdev