diff options
| author | Amlal <amlalelmahrouss@icloud.com> | 2024-07-28 16:11:46 +0000 |
|---|---|---|
| committer | Amlal <amlalelmahrouss@icloud.com> | 2024-07-28 16:11:46 +0000 |
| commit | c4023005e029ae092dad2689564c490580dd5c28 (patch) | |
| tree | 3080ba07a6b552bf3d7591574cf69b2a3c8fd0fd /Kernel/StorageKit | |
| parent | 8c8822fff78f9ff9cd640271da9b3634c4c2f97f (diff) | |
| parent | 4db57a2d646b1538783a0675b38bada7a0f903ae (diff) | |
Merged in MHR-36 (pull request #17)
MHR-36
Diffstat (limited to 'Kernel/StorageKit')
| -rw-r--r-- | Kernel/StorageKit/AHCI.hpp | 6 | ||||
| -rw-r--r-- | Kernel/StorageKit/ATA.hpp | 6 | ||||
| -rw-r--r-- | Kernel/StorageKit/NVME.hxx (renamed from Kernel/StorageKit/NVME.hpp) | 17 | ||||
| -rw-r--r-- | Kernel/StorageKit/PRDT.hpp | 4 | ||||
| -rw-r--r-- | Kernel/StorageKit/SCSI.hxx | 2 | ||||
| -rw-r--r-- | Kernel/StorageKit/Storage.hpp | 22 |
6 files changed, 28 insertions, 29 deletions
diff --git a/Kernel/StorageKit/AHCI.hpp b/Kernel/StorageKit/AHCI.hpp index af4a1327..f84e175e 100644 --- a/Kernel/StorageKit/AHCI.hpp +++ b/Kernel/StorageKit/AHCI.hpp @@ -1,6 +1,6 @@ /* ------------------------------------------- - Copyright Zeta Electronics Corporation + Copyright ZKA Technologies ------------------------------------------- */ @@ -28,6 +28,6 @@ namespace Kernel const char* Name() const override; private: - void (*fCleanup)(void); + void (*fCleanup)(void) = {nullptr}; }; -} // namespace Kernel
\ No newline at end of file +} // namespace Kernel diff --git a/Kernel/StorageKit/ATA.hpp b/Kernel/StorageKit/ATA.hpp index 5c03f7ae..0862c56d 100644 --- a/Kernel/StorageKit/ATA.hpp +++ b/Kernel/StorageKit/ATA.hpp @@ -1,6 +1,6 @@ /* ------------------------------------------- - Copyright Zeta Electronics Corporation + Copyright ZKA Technologies ------------------------------------------- */ @@ -34,6 +34,6 @@ namespace Kernel const char* Name() const override; private: - void (*fCleanup)(void); + void (*fCleanup)(void) = { nullptr }; }; -} // namespace Kernel
\ No newline at end of file +} // namespace Kernel diff --git a/Kernel/StorageKit/NVME.hpp b/Kernel/StorageKit/NVME.hxx index c7ff0e66..f1601149 100644 --- a/Kernel/StorageKit/NVME.hpp +++ b/Kernel/StorageKit/NVME.hxx @@ -1,6 +1,6 @@ /* ------------------------------------------- - Copyright Zeta Electronics Corporation + Copyright ZKA Technologies ------------------------------------------- */ @@ -12,21 +12,14 @@ namespace Kernel { - class NVMEDeviceInterface : public DeviceInterface<MountpointInterface*> + class NVMEDeviceInterface final : public DeviceInterface<MountpointInterface*> { public: explicit NVMEDeviceInterface(void (*Out)(MountpointInterface* outpacket), void (*In)(MountpointInterface* inpacket), - void (*Cleanup)(void)) - : DeviceInterface(Out, In), fCleanup(Cleanup) - { - } + void (*Cleanup)(void)); - virtual ~NVMEDeviceInterface() - { - if (fCleanup) - fCleanup(); - } + ~NVMEDeviceInterface() override; public: NVMEDeviceInterface& operator=(const NVMEDeviceInterface&) = default; @@ -38,6 +31,6 @@ namespace Kernel OwnPtr<MountpointInterface*> operator()(UInt32 dmaLow, UInt32 dmaHigh, SizeT sz); private: - void (*fCleanup)(void); + void (*fCleanup)(void) = {nullptr}; }; } // namespace Kernel diff --git a/Kernel/StorageKit/PRDT.hpp b/Kernel/StorageKit/PRDT.hpp index 522e96fb..daf465d4 100644 --- a/Kernel/StorageKit/PRDT.hpp +++ b/Kernel/StorageKit/PRDT.hpp @@ -1,6 +1,6 @@ /* ------------------------------------------- - Copyright Zeta Electronics Corporation + Copyright ZKA Technologies ------------------------------------------- */ @@ -8,7 +8,7 @@ #include <KernelKit/PCI/Dma.hpp> #include <KernelKit/PCI/Iterator.hpp> -#include <NewKit/Ref.hpp> +#include <NewKit/Ref.hxx> #define kPrdtTransferSize (sizeof(Kernel::UShort)) diff --git a/Kernel/StorageKit/SCSI.hxx b/Kernel/StorageKit/SCSI.hxx index 646b1844..5a22af84 100644 --- a/Kernel/StorageKit/SCSI.hxx +++ b/Kernel/StorageKit/SCSI.hxx @@ -1,6 +1,6 @@ /* ------------------------------------------- - Copyright Zeta Electronics Corporation + Copyright ZKA Technologies ------------------------------------------- */ diff --git a/Kernel/StorageKit/Storage.hpp b/Kernel/StorageKit/Storage.hpp index a374c6e1..aa9e335e 100644 --- a/Kernel/StorageKit/Storage.hpp +++ b/Kernel/StorageKit/Storage.hpp @@ -1,16 +1,22 @@ /* ------------------------------------------- - Copyright Zeta Electronics Corporation + Copyright ZKA Technologies ------------------------------------------- */ #pragma once -#include <NewKit/Defines.hpp> -#include <StorageKit/NVME.hpp> -#include <StorageKit/AHCI.hpp> -#include <StorageKit/SCSI.hxx> +#define kDriveSectorSizeHDD (512) +#define kDriveSectorSizeSSD (4096) +#define kDriveSectorSizeOptical (2048) -#define kDriveSectorSizeHDD (512) -#define kDriveSectorSizeSSD (4096) -#define kDriveSectorSizeCDROM (2048) +namespace Kernel +{ + template <typename T> + class DeviceInterface; + + class NVMEDeviceInterface; + class AHCIDeviceInterface; + class ATADeviceInterface; + class SCSIDeviceInterface; +} // namespace Kernel |
