Kernel Loader: Difference between revisions

No edit summary
No edit summary
Line 1: Line 1:
The Kernel Loader ("KernelLdr"/"Kernelldr") was added in [[8.0.0]]. It is responsible for applying relocations to the Kernel, and mapping the Kernel's .text/.rodata/.data/.bss at a random slide.
The Kernel Loader ("KernelLdr"/"Kernelldr") was added in [[8.0.0]]. It is responsible for applying relocations to the Kernel, and mapping the Kernel's .text/.rodata/.data/.bss at a random slide.


= Kernel Loader =
= Functions =


KernelLdr is called immediately by the Kernel's crt0 (after it deprivileges from EL2 to EL1, if required), with the following signature:
KernelLdr is called immediately by the Kernel's crt0 (after it deprivileges from EL2 to EL1, if required), with the following signature:
Line 175: Line 175:
</pre>
</pre>


== Structures ==
= Structures =


=== KernelMap ===
== KernelMap ==
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
Line 234: Line 234:
|}
|}


=== KInitialPageAllocator ===
== KInitialPageAllocator ==
KInitialPageAllocator is just a simple linear allocator.
KInitialPageAllocator is just a simple linear allocator.


Line 253: Line 253:
|}
|}


==== KInitialPageAllocator::vtable ====
=== KInitialPageAllocator::vtable ===


{| class="wikitable" border="1"
{| class="wikitable" border="1"