From 42ae768f08f2ec8a41d2ea2183f30a571f0c432f Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Tue, 22 Apr 2025 08:48:07 +0200 Subject: dev, kernel: VEPM WiP implementation, and syschk fixes in WiP. - Currently working on VEPM and adapting it to SysChk. - Refactor DriveMgr for VEPM. - Fix warnings in HeFS.cc, ALIGN(8) on HeFS.h - Update PIO modules to use VEPM. Signed-off-by: Amlal El Mahrouss --- dev/boot/src/BootThread.cc | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'dev/boot/src/BootThread.cc') diff --git a/dev/boot/src/BootThread.cc b/dev/boot/src/BootThread.cc index 0a1e74c9..cf303bec 100644 --- a/dev/boot/src/BootThread.cc +++ b/dev/boot/src/BootThread.cc @@ -129,16 +129,16 @@ namespace Boot #ifdef __NE_AMD64__ if (handover_struc->HandoverArch != HEL::kArchAMD64) { - fb_render_string("BootZ: Not an handover header, bad CPU...", 40, 10, RGB(0xFF, 0xFF, 0xFF)); + writer.Write("BootZ: Not an handover header, bad CPU...\r"); } #elif defined(__NE_ARM64__) if (handover_struc->HandoverArch != HEL::kArchARM64) { - fb_render_string("BootZ: Not an handover header, bad CPU...", 40, 10, RGB(0xFF, 0xFF, 0xFF)); + writer.Write("BootZ: Not an handover header, bad CPU...\r"); } #endif - fb_render_string("BootZ: Not an handover header...", 40, 10, RGB(0xFF, 0xFF, 0xFF)); + writer.Write("BootZ: Not an handover header...\r"); ::Boot::Stop(); } } @@ -190,10 +190,24 @@ namespace Boot if (own_stack) { - return rt_jump_to_address(fStartAddress, fHandover, &fStack[mib_cast(16) - 1]); + writer.Write("BootZ: Using own stack.\r"); + writer.Write("BootZ: Stack address: ").Write((UIntPtr)&fStack[mib_cast(16) - 1]).Write("\r"); + writer.Write("BootZ: Stack size: ").Write(mib_cast(16)).Write("\r"); + + rt_jump_to_address(fStartAddress, fHandover, &fStack[mib_cast(16) - 1]); + + return kEfiOk; } else { + delete[] fStack; + fStack = nullptr; + // we don't need the stack anymore. + + BootTextWriter writer; + + writer.Write("BootZ: Using EFI stack.\r"); + return reinterpret_cast(fStartAddress)(fHandover); } -- cgit v1.2.3