diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-04-15 08:43:30 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-04-15 08:43:30 +0200 |
| commit | 4f7562afaee939467299efdb6b7fac159f6cbd27 (patch) | |
| tree | a360a9b25cd7451fadedd09deacab07d7873d2ae /dev/boot/modules/BootNet/BootNet.cc | |
| parent | 011a2801505c01f433d399fa5cb077bee11f4bed (diff) | |
fix, kernel, boot, mod: Fixing issues regarding the boot flow and the
kernel.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/boot/modules/BootNet/BootNet.cc')
| -rw-r--r-- | dev/boot/modules/BootNet/BootNet.cc | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/dev/boot/modules/BootNet/BootNet.cc b/dev/boot/modules/BootNet/BootNet.cc index 28d96cb2..050148c4 100644 --- a/dev/boot/modules/BootNet/BootNet.cc +++ b/dev/boot/modules/BootNet/BootNet.cc @@ -15,18 +15,19 @@ STATIC EfiGUID kEfiSimpleProtoGUID = EFI_SIMPLE_NETWORK_PROTOCOL_GUID; STATIC EFI_SIMPLE_NETWORK_PROTOCOL* kEfiProtocol = nullptr; -STATIC Void bootnet_read_ip_packet(BOOTNET_INTERNET_HEADER&); +STATIC Void bootnet_read_ip_packet(BOOTNET_INTERNET_HEADER); EXTERN_C Int32 BootNetModuleMain(Kernel::HEL::BootInfoHeader* handover) { - fw_init_efi((EfiSystemTable*)handover->f_FirmwareCustomTables[0]); + Boot::BootTextWriter writer; + writer.Write("BootNet: Init EFI...\r"); - Boot::BootTextWriter writer; + fw_init_efi((EfiSystemTable*)handover->f_FirmwareCustomTables[1]); if (BS->LocateProtocol(&kEfiSimpleProtoGUID, nullptr, (VoidPtr*)&kEfiProtocol) != kEfiOk) { - writer.Write("[BOOT] BootNet: Not supported by firmware.\r"); + writer.Write("BootNet: Not supported by firmware.\r"); return kEfiFail; } @@ -34,13 +35,13 @@ EXTERN_C Int32 BootNetModuleMain(Kernel::HEL::BootInfoHeader* handover) SetMem(&inet, 0, sizeof(BOOTNET_INTERNET_HEADER)); - writer.Write("[BOOT] BootNet: Downloading kernel...\r"); + writer.Write("BootNet: Downloading kernel...\r"); bootnet_read_ip_packet(inet); if (inet.Length < 1) { - writer.Write("[BOOT] BootNet: No executable attached to the packet, aborting.\r"); + writer.Write("BootNet: No executable attached to the packet, aborting.\r"); return kEfiFail; } @@ -50,7 +51,7 @@ EXTERN_C Int32 BootNetModuleMain(Kernel::HEL::BootInfoHeader* handover) if (thread.IsValid()) { - writer.Write("[BOOT] BootNet: Running kernel...\r"); + writer.Write("BootNet: Running kernel...\r"); return thread.Start(handover, YES); } @@ -62,11 +63,11 @@ EXTERN_C Int32 BootNetModuleMain(Kernel::HEL::BootInfoHeader* handover) if (inet.Length != kROMSize) { - writer.Write("[BOOT] BootNet: Not within 512K.\r"); + writer.Write("BootNet: Not within 512K.\r"); return kEfiFail; } - writer.Write("[BOOT] BootNet: Programming the flash is not available as of right now.\r"); + writer.Write("BootNet: Programming the flash is not available as of right now.\r"); /// TODO: Program new firmware to EEPROM (if crc and size matches) @@ -77,11 +78,7 @@ EXTERN_C Int32 BootNetModuleMain(Kernel::HEL::BootInfoHeader* handover) return kEfiFail; } -STATIC Void bootnet_read_ip_packet(BOOTNET_INTERNET_HEADER& inet) +STATIC Void bootnet_read_ip_packet(BOOTNET_INTERNET_HEADER inet) { - kEfiProtocol->Start(kEfiProtocol); - NE_UNUSED(inet); - - kEfiProtocol->Stop(kEfiProtocol); }
\ No newline at end of file |
