From a01ba7acb4786a6354349408b3bcc4c2d007b274 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Mon, 14 Apr 2025 09:42:28 +0200 Subject: bootloader, netboot: integrate EFI_SIMPLE_NETWORK_PROTOCOL for HTTP-based kernel fetching - Added BootNet module to support network boot using EFI_SIMPLE_NETWORK_PROTOCOL - Replaced ModuleMain with BootloaderMain as unified entry point - Implemented EFI protocol discovery, startup, and logging for netboot - Updated linker scripts, GDB configs, and build targets accordingly - Laid groundwork for full HTTP/TCP/IP bootloader logic - Improved kernel handoff logic and memory allocation fallback handling Signed-off-by: Amlal El Mahrouss --- dev/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dev/kernel/HALKit/AMD64/Storage') diff --git a/dev/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc b/dev/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc index 728b20ed..42451d70 100644 --- a/dev/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc +++ b/dev/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc @@ -152,9 +152,9 @@ STATIC Void drv_std_input_output_ahci(UInt64 lba, UInt8* buffer, SizeT sector_sz /// check for command header. MUST_PASS(command_header); - command_header->Struc.Cfl = sizeof(FisRegH2D) / sizeof(UInt32); + command_header->Struc.Cfl = sizeof(FisRegH2D) / sizeof(UInt32); command_header->Struc.Write = Write; - command_header->Prdtl = 1; + command_header->Prdtl = 1; auto ctba_phys = ((UInt64)command_header->Ctbau << 32) | command_header->Ctba; auto command_table = reinterpret_cast(ctba_phys); -- cgit v1.2.3 From 3f90c409184644da3e9ad61725791b6cf9cadf34 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Mon, 14 Apr 2025 11:44:17 +0200 Subject: meta: bumping sources. Signed-off-by: Amlal El Mahrouss --- dev/boot/modules/BootNet/amd64.json | 2 +- dev/boot/modules/SysChk/amd64-ahci.json | 2 +- dev/boot/modules/SysChk/amd64-pio.json | 2 +- dev/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc | 2 +- dev/kernel/amd64-desktop.make | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'dev/kernel/HALKit/AMD64/Storage') diff --git a/dev/boot/modules/BootNet/amd64.json b/dev/boot/modules/BootNet/amd64.json index da4a15f0..7b87b533 100644 --- a/dev/boot/modules/BootNet/amd64.json +++ b/dev/boot/modules/BootNet/amd64.json @@ -10,7 +10,7 @@ "-fPIC", "-fno-rtti", "-fno-exceptions", - "-Wl,--subsystem=17,--image-base,0x10000000,-e,BootNetModuleMain" + "-Wl,--subsystem=17,--image-base,0x4000000,-e,BootNetModuleMain" ], "cpp_macros": [ "__NEOSKRNL__", diff --git a/dev/boot/modules/SysChk/amd64-ahci.json b/dev/boot/modules/SysChk/amd64-ahci.json index 527e79f9..98e570f4 100644 --- a/dev/boot/modules/SysChk/amd64-ahci.json +++ b/dev/boot/modules/SysChk/amd64-ahci.json @@ -10,7 +10,7 @@ "-fPIC", "-fno-rtti", "-fno-exceptions", - "-Wl,--subsystem=17,--image-base,0x10000000,-e,SysChkModuleMain" + "-Wl,--subsystem=17,--image-base,0x4000000,-e,SysChkModuleMain" ], "cpp_macros": [ "__NEOSKRNL__", diff --git a/dev/boot/modules/SysChk/amd64-pio.json b/dev/boot/modules/SysChk/amd64-pio.json index de3195ce..2b159e38 100644 --- a/dev/boot/modules/SysChk/amd64-pio.json +++ b/dev/boot/modules/SysChk/amd64-pio.json @@ -10,7 +10,7 @@ "-fPIC", "-fno-rtti", "-fno-exceptions", - "-Wl,--subsystem=17,--image-base,0x10000000,-e,SysChkModuleMain" + "-Wl,--subsystem=17,--image-base,0x4000000,-e,SysChkModuleMain" ], "cpp_macros": [ "__NEOSKRNL__", diff --git a/dev/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc b/dev/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc index 42451d70..2dfd89a1 100644 --- a/dev/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc +++ b/dev/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc @@ -154,7 +154,7 @@ STATIC Void drv_std_input_output_ahci(UInt64 lba, UInt8* buffer, SizeT sector_sz command_header->Struc.Cfl = sizeof(FisRegH2D) / sizeof(UInt32); command_header->Struc.Write = Write; - command_header->Prdtl = 1; + command_header->Prdtl = 8; auto ctba_phys = ((UInt64)command_header->Ctbau << 32) | command_header->Ctba; auto command_table = reinterpret_cast(ctba_phys); diff --git a/dev/kernel/amd64-desktop.make b/dev/kernel/amd64-desktop.make index 905a6c91..8541d5a0 100644 --- a/dev/kernel/amd64-desktop.make +++ b/dev/kernel/amd64-desktop.make @@ -33,7 +33,7 @@ COPY = cp ASMFLAGS = -f win64 # Kernel subsystem is 17 and entrypoint is hal_init_platform -LDFLAGS = -e hal_init_platform --subsystem=17 --image-base 0x4000000 +LDFLAGS = -e hal_init_platform --subsystem=17 --image-base 0x10000000 LDOBJ = obj/*.obj # This file is the Kernel, responsible of task, memory, driver, sci, disk and device management. -- cgit v1.2.3