From 4966ca284132e4e52a9bee6f582527aa7f784ef6 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Fri, 28 Mar 2025 04:57:17 +0100 Subject: 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 --- dev/boot/modules/SysChk/Module.cc | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 dev/boot/modules/SysChk/Module.cc (limited to 'dev/boot/modules/SysChk/Module.cc') diff --git a/dev/boot/modules/SysChk/Module.cc b/dev/boot/modules/SysChk/Module.cc deleted file mode 100644 index c22e183b..00000000 --- a/dev/boot/modules/SysChk/Module.cc +++ /dev/null @@ -1,36 +0,0 @@ -/* - * ======================================================== - * - * NetBoot - * Copyright (C) 2024-2025, Amlal EL Mahrouss, all rights reserved. - * - * ======================================================== - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -EXTERN_C Int32 ModuleMain(NeOS::HEL::BootInfoHeader* handover) -{ -#ifdef __NE_AMD64__ - Boot::BDiskFormatFactory partition_factory; - - if (partition_factory.IsPartitionValid()) - return kEfiOk; - - return kEfiFail; -#else - return kEfiOk; -#endif -} -- cgit v1.2.3