diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2025-03-19 06:31:43 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2025-03-19 06:31:43 +0100 |
| commit | 34611ac2fca2eaf5107512ec0bb7dbf0e896c4b4 (patch) | |
| tree | 4dcb2700fe1a9043db455380c0f8b9b5ef16fed2 /dev/Kernel/ArchKit/ArchKit.h | |
| parent | bcc2fc26a9e80d4fba5e5ae661faf98da2265d4f (diff) | |
refactor(kernel): Standardize DMA and AHCI interfaces and enhance GIC handling
- Replace ambiguous WordLength templates with DataKind in `ke_dma_read/write`.
- Streamline AHCI driver initialization by directly assigning port implementations.
- Rename AHCI methods for clarity (`SetPi` → `SetPortsImplemented`).
- Standardize MMIO access by replacing `hal_mmio_read/write` with unified `ke_dma_read/write`.
- Improve GIC interrupt handler on ARM64 by explicitly handling scheduler interrupts and ensuring interrupts are ended correctly.
- Add debug breakpoint in infinite loop within AP setup for improved debugging.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/Kernel/ArchKit/ArchKit.h')
| -rw-r--r-- | dev/Kernel/ArchKit/ArchKit.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/dev/Kernel/ArchKit/ArchKit.h b/dev/Kernel/ArchKit/ArchKit.h index dd284f5d..04fc5bf6 100644 --- a/dev/Kernel/ArchKit/ArchKit.h +++ b/dev/Kernel/ArchKit/ArchKit.h @@ -47,20 +47,20 @@ namespace NeOS /// @param base the base address. /// @param reg the register. /// @param value the write to write on it. - template <typename WordLength> - inline Void ke_dma_write(WordLength base, WordLength reg, WordLength value) noexcept + template <typename DataKind> + inline Void ke_dma_write(UIntPtr base, DataKind reg, DataKind value) noexcept { - *(volatile WordLength*)(base + reg) = value; + *(volatile DataKind*)(base + reg) = value; } /// @brief read from mapped memory register. /// @param base base address /// @param reg the register. /// @return the value inside the register. - template <typename WordLength> - inline UInt32 ke_dma_read(WordLength base, WordLength reg) noexcept + template <typename DataKind> + inline UInt32 ke_dma_read(UIntPtr base, DataKind reg) noexcept { - return *(volatile WordLength*)((UInt64)base + reg); + return *(volatile DataKind*)(base + reg); } namespace HAL |
