diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-04-02 08:10:08 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-04-02 08:10:08 +0200 |
| commit | 6c7e5ebc003a0bc4f98c23a8f9754b273a6e3a28 (patch) | |
| tree | 2fde230004e377f734983484f8e12fb0414a1668 /dev/boot | |
| parent | e2b41947cde11c870d96970712dcfb3aa76eb0cf (diff) | |
boot/net: rename Boot.S files, clarify EEPROM implication, and prep UDP read
- 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 <amlal@nekernel.org>
Diffstat (limited to 'dev/boot')
| -rw-r--r-- | dev/boot/BootKit/BootKit.h | 2 | ||||
| -rw-r--r-- | dev/boot/modules/BootNet/BootNet.cc | 10 | ||||
| -rw-r--r-- | dev/boot/modules/BootNet/BootNet.h | 2 | ||||
| -rw-r--r-- | dev/boot/modules/BootNet/BootNetStartup.S (renamed from dev/boot/modules/BootNet/Boot.S) | 0 | ||||
| -rw-r--r-- | dev/boot/modules/SysChk/SysChkStartup.S (renamed from dev/boot/modules/SysChk/Boot.S) | 0 | ||||
| -rw-r--r-- | dev/boot/src/HEL/AMD64/BootEFI.cc | 6 | ||||
| -rw-r--r-- | dev/boot/src/HEL/ARM64/BootEFI.cc | 4 | ||||
| -rw-r--r-- | dev/boot/src/New+Delete.cc | 2 |
8 files changed, 17 insertions, 9 deletions
diff --git a/dev/boot/BootKit/BootKit.h b/dev/boot/BootKit/BootKit.h index 759b0d94..3fed8944 100644 --- a/dev/boot/BootKit/BootKit.h +++ b/dev/boot/BootKit/BootKit.h @@ -381,7 +381,7 @@ namespace Boot epm_boot.LbaStart = kNeFSRootCatalogStartAddress; epm_boot.LbaEnd = fDiskDev.GetDiskSize(); epm_boot.SectorSz = part.SectorSize; - epm_boot.Kind = kEPMNeOS; + epm_boot.Kind = kEPMNeKernel; epm_boot.NumBlocks = part.CatalogCount; CopyMem(epm_boot.Name, reinterpret_cast<VoidPtr>(const_cast<Char*>(kBlockName)), StrLen(kBlockName)); diff --git a/dev/boot/modules/BootNet/BootNet.cc b/dev/boot/modules/BootNet/BootNet.cc index 2396852f..a877b9a1 100644 --- a/dev/boot/modules/BootNet/BootNet.cc +++ b/dev/boot/modules/BootNet/BootNet.cc @@ -13,10 +13,14 @@ EfiGUID kEfiIP4ProtoGUID; +STATIC Void bootnet_read_udp_packet(BOOTNET_INTERNET_HEADER&); + EXTERN_C Int32 ModuleMain(Kernel::HEL::BootInfoHeader* handover) { BOOTNET_INTERNET_HEADER inet{}; + bootnet_read_udp_packet(inet); + memset(&inet, 0, sizeof(BOOTNET_INTERNET_HEADER)); /// TODO: Read packet from JSON file 'bootnet.json' @@ -29,7 +33,7 @@ EXTERN_C Int32 ModuleMain(Kernel::HEL::BootInfoHeader* handover) return kEfiFail; } - if (!inet.ImpliesEEPROM) + if (!inet.ImpliesProgram) { Boot::BootThread thread(inet.Data); @@ -50,3 +54,7 @@ EXTERN_C Int32 ModuleMain(Kernel::HEL::BootInfoHeader* handover) return kEfiFail; } + +STATIC Void bootnet_read_udp_packet(BOOTNET_INTERNET_HEADER&) +{ +}
\ No newline at end of file diff --git a/dev/boot/modules/BootNet/BootNet.h b/dev/boot/modules/BootNet/BootNet.h index 2bf330df..aba7924f 100644 --- a/dev/boot/modules/BootNet/BootNet.h +++ b/dev/boot/modules/BootNet/BootNet.h @@ -27,7 +27,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 reprogram? 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/boot/modules/BootNet/Boot.S b/dev/boot/modules/BootNet/BootNetStartup.S index 976c5e88..976c5e88 100644 --- a/dev/boot/modules/BootNet/Boot.S +++ b/dev/boot/modules/BootNet/BootNetStartup.S diff --git a/dev/boot/modules/SysChk/Boot.S b/dev/boot/modules/SysChk/SysChkStartup.S index 976c5e88..976c5e88 100644 --- a/dev/boot/modules/SysChk/Boot.S +++ b/dev/boot/modules/SysChk/SysChkStartup.S diff --git a/dev/boot/src/HEL/AMD64/BootEFI.cc b/dev/boot/src/HEL/AMD64/BootEFI.cc index 076055b9..ef9af9ca 100644 --- a/dev/boot/src/HEL/AMD64/BootEFI.cc +++ b/dev/boot/src/HEL/AMD64/BootEFI.cc @@ -82,8 +82,8 @@ EfiGUID kEfiGlobalNamespaceVarGUID = { /// @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 ModuleMain(EfiHandlePtr image_handle, - EfiSystemTable* sys_table) +EFI_EXTERN_C EFI_API Int32 ModuleMain(EfiHandlePtr image_handle, + EfiSystemTable* sys_table) { InitEFI(sys_table); ///! Init the EFI library. @@ -202,7 +202,7 @@ EFI_EXTERN_C EFI_API Int32 ModuleMain(EfiHandlePtr image_handle, //-----------------------------------------------------------// SizeT lookup_index = 0UL; - SizeT entry_count = size_struct_ptr / sz_desc; + SizeT entry_count = size_struct_ptr / sz_desc; for (; lookup_index < entry_count; ++lookup_index) { diff --git a/dev/boot/src/HEL/ARM64/BootEFI.cc b/dev/boot/src/HEL/ARM64/BootEFI.cc index adce693e..b6f28351 100644 --- a/dev/boot/src/HEL/ARM64/BootEFI.cc +++ b/dev/boot/src/HEL/ARM64/BootEFI.cc @@ -78,8 +78,8 @@ EXTERN EfiBootServices* BS; /// @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 ModuleMain(EfiHandlePtr image_handle, - EfiSystemTable* sys_table) +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/New+Delete.cc b/dev/boot/src/New+Delete.cc index b9982923..3e3cf48f 100644 --- a/dev/boot/src/New+Delete.cc +++ b/dev/boot/src/New+Delete.cc @@ -41,7 +41,7 @@ void operator delete(void* buf) { if (!buf) return; - + BS->FreePool(buf); } |
