diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-03-28 04:57:17 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-03-28 04:57:17 +0100 |
| commit | 4966ca284132e4e52a9bee6f582527aa7f784ef6 (patch) | |
| tree | 023fc0c5a3e6b1daae91ce22ec01852a8074f2ff /dev/boot/BootKit/BootKit.h | |
| parent | a3da0eaaf7569948f83c65ff7997c4d1fc868603 (diff) | |
bootz: consolidate EFI namespace into Boot, finalize NetBoot fallback
Collapse the EFI namespace into Boot to unify BootZ's interface for firmware
handling. This simplifies calls to functions like Stop(), ThrowError(),
and ExitBootServices(), and improves consistency across boot modules.
Also rename SysChk/Module.cc to SysChk/SysChk.cc for naming consistency
with other modules.
Improve NetBoot fallback path in BootEFI:
- Ensure netboot.sys is read before ExitBootServices() to avoid allocation
issues after exiting firmware services.
- Reuse reader and thread objects if kernel boot fails.
- Update both AMD64 and ARM64 paths to follow the same logic.
Update all call sites to use Boot:: instead of EFI::.
Fixes: broken error handling and memory reads after ExitBootServices()
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/boot/BootKit/BootKit.h')
| -rw-r--r-- | dev/boot/BootKit/BootKit.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/dev/boot/BootKit/BootKit.h b/dev/boot/BootKit/BootKit.h index 425c6ed4..6cde6a51 100644 --- a/dev/boot/BootKit/BootKit.h +++ b/dev/boot/BootKit/BootKit.h @@ -37,14 +37,11 @@ /// Framebuffer helpers. /***********************************************************************************/ -namespace EFI +namespace Boot { EXTERN void ThrowError(const WideChar* errorCode, const WideChar* reason) noexcept; -} // namespace EFI - -namespace Boot -{ + class BootTextWriter; class BootFileReader; class BootThread; @@ -338,7 +335,7 @@ namespace Boot fb_init(); FBDrawBitMapInRegion(zka_no_disk, NE_NO_DISK_WIDTH, NE_NO_DISK_HEIGHT, (kHandoverHeader->f_GOP.f_Width - NE_NO_DISK_WIDTH) / 2, (kHandoverHeader->f_GOP.f_Height - NE_NO_DISK_HEIGHT) / 2); - EFI::ThrowError(L"Drive-Too-Tiny", L"Can't format a NeFS partition here."); + Boot::ThrowError(L"Drive-Too-Tiny", L"Can't format a NeFS partition here."); return false; } |
