intermezzOS / kernel

A hobby operating system, in Rust
http://intermezzos.github.io/
Apache License 2.0
1.39k stars 90 forks source link

move to a higher-half kernel #96

Open steveklabnik opened 7 years ago

steveklabnik commented 7 years ago

@ketsuban has an example here: https://github.com/Ketsuban/finisterre

I think this would be a good idea before going to usermode, so cc https://github.com/intermezzOS/kernel/issues/82

If anyone is interested in tackling this, please give it a try!

ketsuban commented 7 years ago

Here's a link to the current commit to save me having to keep the master branch pristine in the interim. The main differences are in boot.asm and layout.ld, and should be fairly easy to port over to intermezzOS.

As written any identity-mapped virtual addresses (like the VGA buffer at 0xB8000) will continue to work, because there's no code removing the original identity mapping—if you want to follow page faults to find them something like this should go somewhere in start64 before the jump to kmain.

mov rax, pml4_table
mov qword [rax], 0
invlpg [0]