<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
<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]