Higher Half Kernel: Difference between revisions

m
update to include the new Limine boot protocol
[unchecked revision][unchecked revision]
m (Reverted edits by Leapofazzam (talk) to last revision by Bzt)
m (update to include the new Limine boot protocol)
Line 16:
 
* [[BOOTBOOT]] only supports higher half kernels by design. It has example Hello World kernels written in [[C]], [[Pascal]], [[Rust]] and [[Go]]
* [[Limine]] requires special sections in the kernel, see [[Limine Bare Bones]] (or [[stivale Bare Bones]]) for a tutorial on how to write a simple 64-bit higher half kernel for Limine.
 
== Initialization ==
To setup a higher half kernel, you have to map your kernel to the appropriate virtual address. When using a boot protocol which supports higher half kernels directly, such as [[BOOTBOOT]], [[Limine]] or [[stivale]], your kernel will already be properly mapped.
 
How to do this basically depends on '''when''' you'd like your kernel to believe it's in the higher end, and '''when''' you set up paging. Without a boot loader help, you'll need a small trampoline code which runs in lower half, sets up higher half paging and jumps.