From 2a7a9825fd275d6d999b94614fe87c1d705c7f8f Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Tue, 1 Apr 2025 08:30:44 +0200 Subject: boot, kernel, modules: unify gfx headers, fix AHCI LBA48, standardize ModuleMain MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Consolidated CoreGfx headers: * Renamed `FBMgr.h` to `CoreGfx.h` * Renamed `TextMgr.h` → `TextGfx.h`, `MathMgr.h` → `MathGfx.h`, and `AccessibilityMgr.h` → `CoreAccess.h` * Updated all includes across bootloader, HAL, and kernel to use new names - Standardized EFI entrypoint: * Replaced `Main` with `ModuleMain` in EFI boot sources and linker flags * Updated GDB and build scripts accordingly - Improved AHCI identify logic: * Added full 48-bit LBA extraction (words 100–102) * Fallback to 28-bit if LBA48 not supported * Refactored `drv_get_size` and `drv_std_detected` into separate `#ifdef __AHCI__` region - DiskImage framework improvements: * Namespaced API into `DI` namespace * Split implementation: `DiskImage+EPM.cc` and `DiskImage+NeFS.cc` * Updated CLI tool accordingly - KernelTest framework: * Namespaced macros and classes with `KT_` * Changed test result to use `MUST_PASS` and boolean return - Misc: * Corrected minor logic in `NetworkDevice::Name()` * Bumped down KernelKit and NewKit versions to 0.0.1 * Renamed `HalUtils.asm` → `HalUtilsAPI.asm` Signed-off-by: Amlal El Mahrouss --- dev/boot/src/BootFileReader.cc | 2 +- dev/boot/src/BootThread.cc | 2 +- dev/boot/src/HEL/AMD64/BootEFI.cc | 10 +++++----- dev/boot/src/HEL/ARM64/BootEFI.cc | 10 +++++----- 4 files changed, 12 insertions(+), 12 deletions(-) (limited to 'dev/boot/src') diff --git a/dev/boot/src/BootFileReader.cc b/dev/boot/src/BootFileReader.cc index 7fed58f0..1236b7f0 100644 --- a/dev/boot/src/BootFileReader.cc +++ b/dev/boot/src/BootFileReader.cc @@ -13,7 +13,7 @@ #include #include #include -#include +#include /// @file BootFileReader /// @brief Bootloader File reader. diff --git a/dev/boot/src/BootThread.cc b/dev/boot/src/BootThread.cc index 4cd2c466..3341601a 100644 --- a/dev/boot/src/BootThread.cc +++ b/dev/boot/src/BootThread.cc @@ -13,7 +13,7 @@ #include #include #include -#include +#include /// @brief External boot services symbol. EXTERN EfiBootServices* BS; diff --git a/dev/boot/src/HEL/AMD64/BootEFI.cc b/dev/boot/src/HEL/AMD64/BootEFI.cc index 5f89aae6..076055b9 100644 --- a/dev/boot/src/HEL/AMD64/BootEFI.cc +++ b/dev/boot/src/HEL/AMD64/BootEFI.cc @@ -5,8 +5,8 @@ ------------------------------------------- */ #include -#include -#include +#include +#include #include #include #include @@ -16,7 +16,7 @@ #include #include #include -#include +#include // Makes the compiler shut up. #ifndef kMachineModel @@ -78,11 +78,11 @@ STATIC Bool boot_init_fb() noexcept EfiGUID kEfiGlobalNamespaceVarGUID = { 0x8BE4DF61, 0x93CA, 0x11D2, {0xAA, 0x0D, 0x00, 0xE0, 0x98, 0x03, 0x2B, 0x8C}}; -/// @brief Main EFI entrypoint. +/// @brief ModuleMain EFI entrypoint. /// @param image_handle Handle of this image. /// @param sys_table The system table of it. /// @return nothing, never returns. -EFI_EXTERN_C EFI_API Int32 Main(EfiHandlePtr image_handle, +EFI_EXTERN_C EFI_API Int32 ModuleMain(EfiHandlePtr image_handle, EfiSystemTable* sys_table) { InitEFI(sys_table); ///! Init the EFI library. diff --git a/dev/boot/src/HEL/ARM64/BootEFI.cc b/dev/boot/src/HEL/ARM64/BootEFI.cc index 6839c2ec..adce693e 100644 --- a/dev/boot/src/HEL/ARM64/BootEFI.cc +++ b/dev/boot/src/HEL/ARM64/BootEFI.cc @@ -5,8 +5,8 @@ ------------------------------------------- */ #include -#include -#include +#include +#include #include #include #include @@ -16,7 +16,7 @@ #include #include #include -#include +#include // Makes the compiler shut up. #ifndef kMachineModel @@ -74,11 +74,11 @@ STATIC Bool boot_init_fb() noexcept EXTERN EfiBootServices* BS; -/// @brief Main EFI entrypoint. +/// @brief ModuleMain EFI entrypoint. /// @param image_handle Handle of this image. /// @param sys_table The system table of it. /// @return nothing, never returns. -EFI_EXTERN_C EFI_API Int32 Main(EfiHandlePtr image_handle, +EFI_EXTERN_C EFI_API Int32 ModuleMain(EfiHandlePtr image_handle, EfiSystemTable* sys_table) { InitEFI(sys_table); ///! Init the EFI library. -- cgit v1.2.3