summaryrefslogtreecommitdiffhomepage
path: root/Kernel/StorageKit
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/StorageKit')
-rw-r--r--Kernel/StorageKit/AHCI.hpp6
-rw-r--r--Kernel/StorageKit/ATA.hpp6
-rw-r--r--Kernel/StorageKit/NVME.hxx (renamed from Kernel/StorageKit/NVME.hpp)17
-rw-r--r--Kernel/StorageKit/PRDT.hpp4
-rw-r--r--Kernel/StorageKit/SCSI.hxx2
-rw-r--r--Kernel/StorageKit/Storage.hpp22
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