From 152f14654bfb438d074833e3c8d5392d300f5095 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Wed, 28 Apr 2021 10:46:36 +0200 Subject: Debug trampoline and paging --- src/boot/trampoline.cc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/boot/trampoline.cc') diff --git a/src/boot/trampoline.cc b/src/boot/trampoline.cc index b03bd43..a75b472 100644 --- a/src/boot/trampoline.cc +++ b/src/boot/trampoline.cc @@ -10,6 +10,10 @@ /// @brief Define where first PAE paging paging will be u64 trampoline_next_page; +/// @brief Ensure +#define MAX_MB_INFOS 4096 +u8 mb_infos[MAX_MB_INFOS]; + u64 trampoline_paging_allocate_table(){ for(u64 i=0;i<512;i++) ((u64*)trampoline_next_page)[i]=0; @@ -63,7 +67,12 @@ void trampoline_paging_allocate_addr(u64* pml4_table, u64 virt, u64 phy, u16 opt /** * Setup High-Half Kernel Paging */ -extern "C" void trampoline(){ +extern "C" u8* trampoline(u8* mb_infos_addr){ + // Save mb infos before anything else + for(int i=0;i