Higher Kernel
A higher kernel is when the actual kernel data and program stuff gets mapped to the memory address 0xFFFF 0000 0000 0000 so that the entire sub memory space is actually available for the processes to make use of.
In order to do this, there needs to be two stages to the kernel. One stage that sets up a basic page table and does the mapping of the higher kernel, and then a second stage that actually is the kernel and frees up the lower half of the kernel to be used as normal memory. However, the physical address of the higher kernel needs to be above 0x10000 as the 16-bit SMP Setup will make use of it.
This is all achieved by this initial PML4 that gets loaded as it first maps 2MiB of physical memory to both lower memory and higher memory for the kernel to load from.
It is then very important to re-setup paging in the kernel with a new page table and then map all the physical memory and higher memory so that we can have a functional allocator.
This also requires modification to the kernel linkscript
We specify the kernel physical so that we know where the kernel is loaded at. This allows us to easily map the kernel physical using the first page table. And its 0x10000 so that we have space the SMP
Last updated