From 6c7e5ebc003a0bc4f98c23a8f9754b273a6e3a28 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Wed, 2 Apr 2025 08:10:08 +0200 Subject: boot/net: rename Boot.S files, clarify EEPROM implication, and prep UDP read MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Renamed Boot.S → BootNetStartup.S and SysChk/Boot.S → SysChkStartup.S for clarity - Replaced BOOTNET_INTERNET_HEADER.ImpliesEEPROM with ImpliesProgram to better reflect the generic reprogramming intent - Introduced `bootnet_read_udp_packet()` stub for future UDP packet parsing from bootnet.json - Minor alignment and comment fixes in various headers (CoreBoot, EPM, Json) - Updated HalPagingMgr to use PageStore instead of NE_PAGE_STORE - Boot time now prints cycles since start; triggered fs_init_nefs() earlier during HAL init - Prep for extended MBCI and master structure support in COREBOOT_LINEAR_EXEC - Numerous cleanups across DMA, NewKit, and Json parsing to prep for extended patching and block-level bootstrap This lays groundwork for richer NetBoot infrastructure in NeKernel and aligns naming and structure conventions across subsystems. Signed-off-by: Amlal El Mahrouss --- dev/kernel/FirmwareKit/CoreBoot/BootNet.h | 2 +- dev/kernel/FirmwareKit/CoreBoot/CoreBoot.h | 11 ++++++++--- dev/kernel/FirmwareKit/EPM.h | 4 ++-- 3 files changed, 11 insertions(+), 6 deletions(-) (limited to 'dev/kernel/FirmwareKit') diff --git a/dev/kernel/FirmwareKit/CoreBoot/BootNet.h b/dev/kernel/FirmwareKit/CoreBoot/BootNet.h index a86ea81a..e3cda0ba 100644 --- a/dev/kernel/FirmwareKit/CoreBoot/BootNet.h +++ b/dev/kernel/FirmwareKit/CoreBoot/BootNet.h @@ -24,7 +24,7 @@ typedef struct BOOTNET_INTERNET_HEADER Kernel::Char Name[kBootNetNameLen]; /// example: Modjo Kernel::Int32 Length; /// the patch length. Kernel::Char Target[kBootNetNameLen]; /// the target file. - Kernel::Boolean ImpliesEEPROM : 1; /// does it imply an EEPROM reprogram? + Kernel::Boolean ImpliesProgram : 1; /// does it imply an EEPROM program? Kernel::Boolean Preflight : 1; /// is it a preflight packet. Kernel::Char Data[]; /// non preflight packet has a patch blob for a **PatchTarget** } ATTRIBUTE(packed) BOOTNET_INTERNET_HEADER; diff --git a/dev/kernel/FirmwareKit/CoreBoot/CoreBoot.h b/dev/kernel/FirmwareKit/CoreBoot/CoreBoot.h index 80d3307b..d2711025 100644 --- a/dev/kernel/FirmwareKit/CoreBoot/CoreBoot.h +++ b/dev/kernel/FirmwareKit/CoreBoot/CoreBoot.h @@ -12,11 +12,11 @@ namespace Firmware::Detail::CoreBoot { using namespace Kernel; - struct LEHeader; + struct COREBOOT_LINEAR_EXEC; /// @brief Linear Executable Header /// @author Amlal El Mahrouss - struct ATTRIBUTE(aligned(4)) LEHeader + struct ATTRIBUTE(aligned(4)) COREBOOT_LINEAR_EXEC { const Char fMagic[2]; // magic number const Char fName[10]; // operating system name @@ -24,8 +24,13 @@ namespace Firmware::Detail::CoreBoot const UInt32 fStartAddress; // start address (master/slave(s) thread) #ifdef NE_IS_EXTENDED_COREBOOT - const UIntPtr fMasterStructure; // master structure for MP/PM and device tree and such (ARM) + const UIntPtr fMasterStructure; // master structure for MP/PM and device tree and such. (ARM) const UIntPtr fMasterStructureVersion; // master structure version. #endif + +#ifdef NE_IS_MBCI_COREBOOT + const UIntPtr fMBCIStructure; // MBCI structure for MBCI (ARM) + const UIntPtr fMBCIStructureVersion; // MBCI structure version. +#endif }; } // namespace Firmware::Detail::CoreBoot diff --git a/dev/kernel/FirmwareKit/EPM.h b/dev/kernel/FirmwareKit/EPM.h index a5cb9fe7..548bb9a7 100644 --- a/dev/kernel/FirmwareKit/EPM.h +++ b/dev/kernel/FirmwareKit/EPM.h @@ -101,10 +101,10 @@ struct PACKED EPM_PART_BLOCK enum { kEPMInvalid = 0x00, - kEPMGenericOS = 0xcf, /// @brief Generic OS + kEPMGeneric = 0xcf, /// @brief Generic OS kEPMLinux = 0x8f, /// @brief Linux on EPM kEPMBSD = 0x9f, /// @brief Berkeley Soft. Distribution - kEPMNeOS = 0x1f, /// @brief NeKernel. + kEPMNeKernel = 0x1f, /// @brief NeKernel. kEPMInvalidOS = 0xff, }; -- cgit v1.2.3