diff options
Diffstat (limited to 'dev/kernel/HALKit/AMD64/HalKernelMain.cc')
| -rw-r--r-- | dev/kernel/HALKit/AMD64/HalKernelMain.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/dev/kernel/HALKit/AMD64/HalKernelMain.cc b/dev/kernel/HALKit/AMD64/HalKernelMain.cc index fba02bc1..29244add 100644 --- a/dev/kernel/HALKit/AMD64/HalKernelMain.cc +++ b/dev/kernel/HALKit/AMD64/HalKernelMain.cc @@ -27,7 +27,8 @@ STATIC Kernel::Void hal_pre_init_scheduler() noexcept { } } -/// @brief Kernel init procedure. +/// @brief Kernel init function. +/// @param handover_hdr Handover boot header. EXTERN_C Int32 hal_init_platform(Kernel::HEL::BootInfoHeader* handover_hdr) { if (handover_hdr->f_Magic != kHandoverMagic && handover_hdr->f_Version != kHandoverVersion) { return kEfiFail; @@ -42,6 +43,10 @@ EXTERN_C Int32 hal_init_platform(Kernel::HEL::BootInfoHeader* handover_hdr) { Boot::ExitBootServices(handover_hdr->f_HardwareTables.f_ImageKey, handover_hdr->f_HardwareTables.f_ImageHandle); + kKernelCR3 = kHandoverHeader->f_PageStart; + + hal_write_cr3(kKernelCR3); + /************************************** */ /* INITIALIZE BIT MAP. */ /************************************** */ |
