From a3652c1daa9ec16be649849d3fe89b2dbc83ac66 Mon Sep 17 00:00:00 2001 From: "Zone.N" Date: Fri, 30 Aug 2024 09:46:27 +0000 Subject: [PATCH] feat: print mem info after load kernel Signed-off-by: Zone.N --- src/boot/boot.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/boot/boot.cpp b/src/boot/boot.cpp index d742b15fa..8b8a95895 100644 --- a/src/boot/boot.cpp +++ b/src/boot/boot.cpp @@ -68,7 +68,6 @@ efi_main(EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *system_table) { // 初始化 Memory auto memory = Memory(); - memory.PrintInfo(); // 加载内核 auto elf = Elf(KERNEL_NAME); auto [kernel_addr, elf_info] = elf.Load(); @@ -77,6 +76,9 @@ efi_main(EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *system_table) { return EFI_LOAD_ERROR; } + // 输出内存映射 Memory + memory.PrintInfo(); + debug << L"Set Kernel Entry Point to: [" << OutStream::hex_X << kernel_addr << L"]." << OutStream::endl; debug << L"Elf addr: [" << OutStream::hex_X << elf_info.first << L"]."