From 34611ac2fca2eaf5107512ec0bb7dbf0e896c4b4 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Wed, 19 Mar 2025 06:31:43 +0100 Subject: refactor(kernel): Standardize DMA and AHCI interfaces and enhance GIC handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- dev/Kernel/StorageKit/AHCI.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'dev/Kernel/StorageKit') diff --git a/dev/Kernel/StorageKit/AHCI.h b/dev/Kernel/StorageKit/AHCI.h index 2eb0912b..43e81ba0 100644 --- a/dev/Kernel/StorageKit/AHCI.h +++ b/dev/Kernel/StorageKit/AHCI.h @@ -27,12 +27,12 @@ namespace NeOS const Char* Name() const override; - const UInt16& GetPi() + const UInt16& GetPortsImplemented() { return this->fPortsImplemented; } - Void SetPi(const UInt16& pi) + Void SetPortsImplemented(const UInt16& pi) { MUST_PASS(pi > 0); this->fPortsImplemented = pi; @@ -45,6 +45,7 @@ namespace NeOS Void SetIndex(const UInt32& drv) { + MUST_PASS(MountpointInterface::kDriveIndexInvalid != drv); this->fDriveIndex = drv; } -- cgit v1.2.3