summaryrefslogtreecommitdiffhomepage
path: root/Private/StorageKit
diff options
context:
space:
mode:
authoramlal <amlal@el-mahrouss-logic.com>2024-03-22 10:18:15 +0100
committeramlal <amlal@el-mahrouss-logic.com>2024-03-22 10:18:15 +0100
commita955ca743b129839f43ecaef243d84d0dc7b8043 (patch)
treebd64dc4024711cfa8b33f91ff5ab59e3d49516c8 /Private/StorageKit
parent71ead709ab3e30a1b137a5b9215bf74c7bed9d04 (diff)
Kernel: HCR-14: Cleanup useless stuff.
Signed-off-by: amlal <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'Private/StorageKit')
-rw-r--r--Private/StorageKit/ATA.hpp84
-rw-r--r--Private/StorageKit/Storage.hpp2
2 files changed, 1 insertions, 85 deletions
diff --git a/Private/StorageKit/ATA.hpp b/Private/StorageKit/ATA.hpp
deleted file mode 100644
index 30c325d5..00000000
--- a/Private/StorageKit/ATA.hpp
+++ /dev/null
@@ -1,84 +0,0 @@
-/* -------------------------------------------
-
- Copyright Mahrouss Logic
-
-------------------------------------------- */
-
-#pragma once
-
-#include <KernelKit/DebugOutput.hpp>
-#include <KernelKit/PCI/Dma.hpp>
-#include <KernelKit/PCI/IO.hpp>
-#include <NewKit/Defines.hpp>
-#include <StorageKit/PRDT.hpp>
-
-namespace HCore {
-enum class PATAType { kRead28, kRead48, kWrite28, kWrite48, kATAUnknown };
-
-const char *ata_read_28(ULong lba);
-const char *ata_read_48(ULong lba);
-
-Int32 ata_write_48(ULong lba, char *text = nullptr);
-Int32 ata_write_28(ULong lba, char *text = nullptr);
-
-class PATACommandFactory final {
- public:
- explicit PATACommandFactory() = default;
- ~PATACommandFactory() = default;
-
- PATACommandFactory &operator=(const PATACommandFactory &) = default;
- PATACommandFactory(const PATACommandFactory &) = default;
-
- public:
- static Ref<PATACommandFactory> Shared() {
- static Ref<PATACommandFactory> manager;
- return manager;
- }
-
- public:
- template <PATAType Command>
- ErrorOr<const char *> operator()(ULong lba,
- const char *text = nullptr) noexcept {
- switch (Command) {
- case PATAType::kRead28:
- return ErrorOr<const char *>(ata_read_28(lba));
- case PATAType::kRead48:
- return ErrorOr<const char *>(ata_read_48(lba));
- case PATAType::kWrite28: {
- if (text) {
- ata_write_28(lba, text);
- kcout << "ErrorOr<CT> ata_read<CT, Command>: Write ATA Command... "
- "(Write28)\n";
-
- return {};
- }
-
- kcout << "ErrorOr<CT> ata_read<CT, Command>: Bad ATA Command... "
- "(Write28)\n";
-
- return {};
- }
- case PATAType::kWrite48: {
- if (text) {
- ata_write_48(lba, text);
- kcout << "ErrorOr<CT> ata_read<CT, Command>: Write ATA Command... "
- "(Write48)\n";
-
- return {};
- }
-
- kcout << "ErrorOr<CT> ata_read<CT, Command>: Bad ATA Command... "
- "(Write48)\n";
-
- return {};
- }
- case PATAType::kATAUnknown: {
- kcout << "ErrorOr<CT> ata_read<CT, Command>: Unknown ATA Command...\n";
- return {};
- }
- }
-
- return ErrorOr<const char *>(nullptr);
- }
-};
-} // namespace HCore
diff --git a/Private/StorageKit/Storage.hpp b/Private/StorageKit/Storage.hpp
index 51b2fdd6..1fe74094 100644
--- a/Private/StorageKit/Storage.hpp
+++ b/Private/StorageKit/Storage.hpp
@@ -7,8 +7,8 @@
#pragma once
#include <NewKit/Defines.hpp>
-#include <StorageKit/ATA.hpp>
#include <StorageKit/NVME.hpp>
+#include <StorageKit/AHCI.hpp>
typedef HCore::UInt16 SKScsiPacket[12];