I have queries about memory management and higher half kernels which have been troubling me for quite some time.
- The tutorial mentions - A Higher Half Kernel is a kernel that has a virtual base address of 2GB or above.
My understanding is that if the kernel has virtual addresses V then all the addresses generated (referenced) by the kernel will be (V + offset).
Am I right?
- Virtual base address of the kernel can be mentioned in assembly file using ORG directive or in a linker script using location counter .(a dot).
Is this correct?
- If the kernel is linked to a virtual base address of 3GB and the boot-loader places it in the physical address 1MB, how will the kernel even start to run
when paging is disabled ? Won't all the addresses (3GB + offset ) be treated as physical addresses and result in fault.
- If the kernel has virtual base address of 3GB and it is loaded at 1MB , what is the use of identity-mapping. As far as I understand
identity-mapping will map 3GB virtual to 3GB physical. However there is nothing there at 3GB physical while the kernel will
only reference addresses above 3GB. I would appreciate if somebody could explain the use of identity-mapping in general.