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/HALKit/AMD64/PCI/DMA.cc | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'dev/kernel/HALKit/AMD64/PCI') diff --git a/dev/kernel/HALKit/AMD64/PCI/DMA.cc b/dev/kernel/HALKit/AMD64/PCI/DMA.cc index 747fab94..33cff13e 100644 --- a/dev/kernel/HALKit/AMD64/PCI/DMA.cc +++ b/dev/kernel/HALKit/AMD64/PCI/DMA.cc @@ -5,6 +5,7 @@ ------------------------------------------- */ #include +#include namespace Kernel { @@ -26,37 +27,34 @@ namespace Kernel if (offset == 0) return false; - kout << "[DMAWrapper::IsIn] Checking offset..\n"; + kout << "[DMAWrapper::IsIn] Checking offset...\r"; return reinterpret_cast(this->fAddress) >= offset; } bool DMAWrapper::Write(const UIntPtr& bit, const UInt32& offset) { - kout << "[DMAWrapper::Read] Checking this->fAddress..\n"; + kout << "[DMAWrapper::Read] Checking this->fAddress...\r"; if (!this->fAddress) return false; - kout << "[DMAWrapper::Write] Writing at address..\n"; + kout << "[DMAWrapper::Write] Writing at address: " << hex_number(reinterpret_cast(this->fAddress) + offset) << kendl; - auto addr = - (volatile UIntPtr*)(reinterpret_cast(this->fAddress) + offset); - *addr = bit; + ke_dma_write(reinterpret_cast(this->fAddress), offset, bit); return true; } UIntPtr DMAWrapper::Read(const UInt32& offset) { - kout << "[DMAWrapper::Read] Checking this->fAddress..\n"; + kout << "[DMAWrapper::Read] Checking this->fAddress...\r"; if (!this->fAddress) - return 0; + return ~0; - kout << "[DMAWrapper::Read] Reading this->fAddress..\n"; + kout << "[DMAWrapper::Write] Writing at address: " << hex_number(reinterpret_cast(this->fAddress) + offset) << kendl; - return *(volatile UIntPtr*)(reinterpret_cast(this->fAddress) + offset); - ; + return ke_dma_read(reinterpret_cast(this->fAddress), offset); } UIntPtr DMAWrapper::operator[](const UIntPtr& offset) @@ -70,7 +68,7 @@ namespace Kernel return {}; OwnPtr> dmaOwnPtr = - make_ptr, char*>(reinterpret_cast(dma->fAddress)); + mm_make_own_ptr, char*>(reinterpret_cast(dma->fAddress)); if (!dmaOwnPtr) return {}; -- cgit v1.2.3