From 34f62ae2dd8c77cee1f0f3680caf407b1be6b350 Mon Sep 17 00:00:00 2001 From: Amlal Date: Sat, 22 Feb 2025 08:45:43 +0100 Subject: New DeviceMgr, other APIs have been reworked as a result. AHCI becomes the first module to be available in StorageKit. Signed-off-by: Amlal --- dev/Kernel/StorageKit/AHCI.h | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'dev/Kernel/StorageKit/AHCI.h') diff --git a/dev/Kernel/StorageKit/AHCI.h b/dev/Kernel/StorageKit/AHCI.h index 6adab614..13edf524 100644 --- a/dev/Kernel/StorageKit/AHCI.h +++ b/dev/Kernel/StorageKit/AHCI.h @@ -15,11 +15,11 @@ namespace NeOS class AHCIDeviceInterface NE_DEVICE { public: - explicit AHCIDeviceInterface(void (*Out)(MountpointInterface* outpacket), - void (*In)(MountpointInterface* inpacket), - void (*Cleanup)(void)); + explicit AHCIDeviceInterface(void (*out)(IDeviceObject* self, MountpointInterface* out), + void (*in)(IDeviceObject* self, MountpointInterface* in), + void (*cleanup)(void)); - virtual ~AHCIDeviceInterface(); + virtual ~AHCIDeviceInterface() override; public: AHCIDeviceInterface& operator=(const AHCIDeviceInterface&) = default; @@ -27,7 +27,20 @@ namespace NeOS const Char* Name() const override; + const UInt16& GetPi() { return this->fPortsImplemented; } + + Void SetPi(const UInt16& pi) { MUST_PASS(pi > 0); this->fPortsImplemented = pi; } + + private: + Void (*fCleanup)(Void) = {nullptr}; + private: - void (*fCleanup)(void) = {nullptr}; + UInt16 fPortsImplemented{0U}; + + public: + UInt32 fDriveIndex{0U}; + }; + + AHCIDeviceInterface sk_acquire_ahci_device(Int32 drv_index); } // namespace NeOS -- cgit v1.2.3