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/kernel/HALKit | |
| 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/kernel/HALKit')
| -rw-r--r-- | dev/kernel/HALKit/AMD64/HalKernelMain.cc | 2 | ||||
| -rw-r--r-- | dev/kernel/HALKit/AMD64/HalPagingMgrAMD64.cc | 12 | ||||
| -rw-r--r-- | dev/kernel/HALKit/AMD64/PCI/DMA.cc | 22 | ||||
| -rw-r--r-- | dev/kernel/HALKit/AMD64/Storage/DMA+Generic.cc | 2 |
4 files changed, 19 insertions, 19 deletions
diff --git a/dev/kernel/HALKit/AMD64/HalKernelMain.cc b/dev/kernel/HALKit/AMD64/HalKernelMain.cc index 0ebba546..0d58bb8a 100644 --- a/dev/kernel/HALKit/AMD64/HalKernelMain.cc +++ b/dev/kernel/HALKit/AMD64/HalKernelMain.cc @@ -98,6 +98,8 @@ EXTERN_C Kernel::Void hal_real_init(Kernel::Void) noexcept kout << "Boot Time: " << Kernel::number(kEndTim - kStartTim) << kendl; + Kernel::NeFS::fs_init_nefs(); + Kernel::HAL::mp_get_cores(kHandoverHeader->f_HardwareTables.f_VendorPtr); Kernel::HAL::Register64 idt_reg; diff --git a/dev/kernel/HALKit/AMD64/HalPagingMgrAMD64.cc b/dev/kernel/HALKit/AMD64/HalPagingMgrAMD64.cc index 5819f1d9..63796393 100644 --- a/dev/kernel/HALKit/AMD64/HalPagingMgrAMD64.cc +++ b/dev/kernel/HALKit/AMD64/HalPagingMgrAMD64.cc @@ -17,7 +17,7 @@ namespace Kernel::HAL /***********************************************************************************/ /// \brief Page store type. /***********************************************************************************/ - struct NE_PAGE_STORE final + struct PageStore final { struct { @@ -43,9 +43,9 @@ namespace Kernel::HAL return pte && pte->User; } - static NE_PAGE_STORE& The() + static PageStore& The() { - static NE_PAGE_STORE the; + static PageStore the; return the; } }; @@ -60,7 +60,7 @@ namespace Kernel::HAL UInt64 cr3 = (UInt64)hal_read_cr3(); - NE_PAGE_STORE& page_store = NE_PAGE_STORE::The(); + PageStore& page_store = PageStore::The(); // Extract the indices from the virtual address UInt64 pml4_index = ((UIntPtr)virtual_address >> 39) & kPmlIndexMask; @@ -123,7 +123,7 @@ namespace Kernel::HAL UInt64 cr3 = (UInt64)hal_read_cr3(); - NE_PAGE_STORE& page_store = NE_PAGE_STORE::The(); + PageStore& page_store = PageStore::The(); // Extract the indices from the virtual address UInt64 pml4_index = ((UIntPtr)virtual_address >> 39) & kPmlIndexMask; @@ -189,7 +189,7 @@ namespace Kernel::HAL mmi_page_status(pt_entry); - NE_PAGE_STORE& page_store = NE_PAGE_STORE::The(); + PageStore& page_store = PageStore::The(); // Update Internal store. 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 <KernelKit/PCI/DMA.h> +#include <ArchKit/ArchKit.h> 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<UIntPtr>(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<UIntPtr>(this->fAddress) + offset) << kendl; - auto addr = - (volatile UIntPtr*)(reinterpret_cast<UIntPtr>(this->fAddress) + offset); - *addr = bit; + ke_dma_write<UInt32>(reinterpret_cast<UIntPtr>(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<UIntPtr>(this->fAddress) + offset) << kendl; - return *(volatile UIntPtr*)(reinterpret_cast<UIntPtr>(this->fAddress) + offset); - ; + return ke_dma_read<UInt32>(reinterpret_cast<UIntPtr>(this->fAddress), offset); } UIntPtr DMAWrapper::operator[](const UIntPtr& offset) @@ -70,7 +68,7 @@ namespace Kernel return {}; OwnPtr<IOBuf<Char*>> dmaOwnPtr = - make_ptr<IOBuf<Char*>, char*>(reinterpret_cast<char*>(dma->fAddress)); + mm_make_own_ptr<IOBuf<Char*>, char*>(reinterpret_cast<char*>(dma->fAddress)); if (!dmaOwnPtr) return {}; diff --git a/dev/kernel/HALKit/AMD64/Storage/DMA+Generic.cc b/dev/kernel/HALKit/AMD64/Storage/DMA+Generic.cc index 300b959f..5aabf144 100644 --- a/dev/kernel/HALKit/AMD64/Storage/DMA+Generic.cc +++ b/dev/kernel/HALKit/AMD64/Storage/DMA+Generic.cc @@ -76,7 +76,7 @@ Boolean drv_std_init(UInt16 Bus, UInt8 Drive, UInt16& OutBus, UInt8& OutMaster) /// IDE interface if (kATADevice.Subclass() == 0x01) { - + break; } } |
