Higher Half Kernel: Difference between revisions
Jump to navigation
Jump to search
[unchecked revision] | [unchecked revision] |
Content deleted Content added
m update to include the new Limine boot protocol |
m stivale -> Limine |
||
Line 16: | Line 16: | ||
* [[BOOTBOOT]] only supports higher half kernels by design. It has example Hello World kernels written in [[C]], [[Pascal]], [[Rust]] and [[Go]] |
* [[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]] |
* [[Limine]] requires special sections in the kernel, see [[Limine Bare Bones]] for a tutorial on how to write a simple 64-bit higher half kernel for Limine. |
||
== Initialization == |
== 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]], |
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]], or [[Limine]], 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. |
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. |