diff options
| author | Amlal <amlal.elmahrouss@icloud.com> | 2025-02-22 08:45:43 +0100 |
|---|---|---|
| committer | Amlal <amlal.elmahrouss@icloud.com> | 2025-02-22 08:45:43 +0100 |
| commit | 34f62ae2dd8c77cee1f0f3680caf407b1be6b350 (patch) | |
| tree | 0985426a5d3baf2ae398a3f27ee4faca5d879f2e /dev/Kernel/StorageKit | |
| parent | 917938db87fee3a905a78c499d2fe1dc2f0b5ca5 (diff) | |
New DeviceMgr, other APIs have been reworked as a result.
AHCI becomes the first module to be available in StorageKit.
Signed-off-by: Amlal <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/Kernel/StorageKit')
| -rw-r--r-- | dev/Kernel/StorageKit/AHCI.h | 23 | ||||
| -rw-r--r-- | dev/Kernel/StorageKit/ATA.h | 4 | ||||
| -rw-r--r-- | dev/Kernel/StorageKit/NVME.h | 4 |
3 files changed, 22 insertions, 9 deletions
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<MountpointInterface*> { 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 diff --git a/dev/Kernel/StorageKit/ATA.h b/dev/Kernel/StorageKit/ATA.h index 0de90897..5698fe85 100644 --- a/dev/Kernel/StorageKit/ATA.h +++ b/dev/Kernel/StorageKit/ATA.h @@ -17,8 +17,8 @@ namespace NeOS class ATADeviceInterface : public IDeviceObject<MountpointInterface*> { public: - explicit ATADeviceInterface(void (*Out)(MountpointInterface* outpacket), - void (*In)(MountpointInterface* inpacket), + explicit ATADeviceInterface(void (*Out)(IDeviceObject*, MountpointInterface* outpacket), + void (*In)(IDeviceObject*, MountpointInterface* inpacket), void (*Cleanup)(void)); virtual ~ATADeviceInterface(); diff --git a/dev/Kernel/StorageKit/NVME.h b/dev/Kernel/StorageKit/NVME.h index 6b7cc1fd..22300726 100644 --- a/dev/Kernel/StorageKit/NVME.h +++ b/dev/Kernel/StorageKit/NVME.h @@ -14,8 +14,8 @@ namespace NeOS class NVMEDeviceInterface final NE_DEVICE<MountpointInterface*> { public: - explicit NVMEDeviceInterface(Void (*out)(MountpointInterface* out_packet), - Void (*in)(MountpointInterface* in_packet), + explicit NVMEDeviceInterface(Void (*out)(IDeviceObject*, MountpointInterface* out_packet), + Void (*in)(IDeviceObject*, MountpointInterface* in_packet), Void (*cleanup)(Void)); ~NVMEDeviceInterface() override; |
