diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-04-16 17:13:31 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-04-16 17:13:31 +0200 |
| commit | 58b3d776ab5435de352217b2a3a525aeb9316e99 (patch) | |
| tree | cf298a3b522fed5b829c4b250932ab13ef407838 /dev/boot/src/BootThread.cc | |
| parent | 0b0f61ae48bbd8827d6088feab6cf58e7837bf92 (diff) | |
dev, kernel, boot: fix dumb early-init which caused the kernel to jump
at IVT.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/boot/src/BootThread.cc')
| -rw-r--r-- | dev/boot/src/BootThread.cc | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/dev/boot/src/BootThread.cc b/dev/boot/src/BootThread.cc index 3f399d66..f1866a76 100644 --- a/dev/boot/src/BootThread.cc +++ b/dev/boot/src/BootThread.cc @@ -166,40 +166,18 @@ namespace Boot /// @note handover header has to be valid! Int32 BootThread::Start(HEL::BootInfoHeader* handover, Bool own_stack) { - HEL::HandoverProc err_fn = [](HEL::BootInfoHeader* rcx) -> Int32 { - NE_UNUSED(rcx); - - fb_render_string("BootZ: Invalid Boot Image...", 50, 10, RGB(0xFF, 0xFF, 0xFF)); - ::Boot::Stop(); - - return NO; - }; - - if (!fStartAddress) - { - err_fn(handover); - } - fHandover = handover; if (own_stack) { - UInt8* aligned_stack = &fStack[mib_cast(16) - 1]; - aligned_stack = (UInt8*)((UIntPtr)aligned_stack & ~0xF); - - rt_jump_to_address(fStartAddress, fHandover, aligned_stack); + return rt_jump_to_address(fStartAddress, fHandover, &fStack[mib_cast(16) - 1]); } else { - if (fStack) - delete[] fStack; - - fStack = nullptr; - return reinterpret_cast<HEL::HandoverProc>(fStartAddress)(fHandover); } - return kEfiOk; + return kEfiFail; } const Char* BootThread::GetName() |
