Age | Commit message (Collapse) | Author |
|
|
|
|
|
The kernel code assumes that paging is always disabled. I've also added
a bit of comments to the assembly / ruined the git blame.
|
|
|
|
Sadly, sysenter on i386 limits me to only 4 arguments (so, 1 for the
syscall id + 3 real args). If that turns out to be an issue I'll either
just switch to interrupts, or switch to x64.
|
|
|
|
|
|
It was taken from the wrong place - also I don't think that functions
should change their EIP in the first place?
|
|
|
|
quick explaination of how this even works:
The `call` in each stub pushes its own address onto the stack before
calling stage2. We can substract the address of the 0th ISR to get the
offset, which we then divide by the size of each stub to get the index.
|
|
|
|
VGA is only mapped into the virtual memory because there are no other
ways of interacting with the OS.
|
|
imo "use" was slightly misleading
|
|
The kernel can't use the limited paging tables of user processes.
Alternatively, sysenter could accept a parameter with a new cr3. That
would allow/require using paging in the kernel - so I'll switch to it
later, but I want to get other stuff done first.
|
|
it's pretty useful, so it makes sense to define it alongside PAGE_SIZE
|
|
|
|
|
|
|
|
|
|
|
|
|
|
stack_top got changed into a char, because `extern void` isn't even
valid. others are self-explanatory
|
|
|
|
|
|
|
|
This loads a file from the boot disk into memory. Currently it just gets
printed, but it's going to become a real executable soon.
|
|
|
|
Now, the kernel only interfaces with the architecture dependent stuff
via functions declared in generic.h. I'll write a linter enforcing this
soon.
|
|
The idea is that src/kernel/ is only allowed to interface with the
hardware using whatever's defined in src/arch/generic.h. I'll probably
write a small script for checking this later on.
This is a giant commit so I've probably fucked something up. It boots
fine on Bochs and QEMU, so at least there's that.
|
|
|