summaryrefslogtreecommitdiffhomepage
path: root/Private/HALKit
diff options
context:
space:
mode:
Diffstat (limited to 'Private/HALKit')
-rw-r--r--Private/HALKit/AMD64/Storage/ATA-DMA.cxx37
-rw-r--r--Private/HALKit/AMD64/Storage/ATA-PIO.cxx4
l---------Private/HALKit/PC1
3 files changed, 41 insertions, 1 deletions
diff --git a/Private/HALKit/AMD64/Storage/ATA-DMA.cxx b/Private/HALKit/AMD64/Storage/ATA-DMA.cxx
index e69de29b..4189e467 100644
--- a/Private/HALKit/AMD64/Storage/ATA-DMA.cxx
+++ b/Private/HALKit/AMD64/Storage/ATA-DMA.cxx
@@ -0,0 +1,37 @@
+/* -------------------------------------------
+
+ Copyright Mahrouss Logic
+
+------------------------------------------- */
+
+/**
+ * @file ATA-DMA.cxx
+ * @author Amlal El Mahrouss (amlalelmahrouss@icloud.com)
+ * @brief ATA driver (DMA mode).
+ * @version 0.1
+ * @date 2024-02-02
+ *
+ * @copyright Copyright (c) Mahrouss Logic
+ *
+ */
+
+#include <StorageKit/PRDT.hpp>
+
+#include <Builtins/ATA/Defines.hxx>
+#include <ArchKit/ArchKit.hpp>
+
+using namespace NewOS;
+
+EXTERN_C Int32 kPRDTTransferStatus;
+
+#ifdef __ATA_DMA__
+
+#ifdef __ATA_PIO__
+# error You can't have both PIO and DMA enabled!
+#endif /* ifdef __ATA_PIO__ */
+
+#ifdef __AHCI__
+# error You can't have both ATA and AHCI enabled!
+#endif /* ifdef __AHCI__ */
+
+#endif /* ifdef __ATA_DMA__ */
diff --git a/Private/HALKit/AMD64/Storage/ATA-PIO.cxx b/Private/HALKit/AMD64/Storage/ATA-PIO.cxx
index 0f8a0d75..2344cd86 100644
--- a/Private/HALKit/AMD64/Storage/ATA-PIO.cxx
+++ b/Private/HALKit/AMD64/Storage/ATA-PIO.cxx
@@ -18,6 +18,8 @@
#include <Builtins/ATA/Defines.hxx>
#include <ArchKit/ArchKit.hpp>
+#ifdef __ATA_PIO__
+
using namespace NewOS;
using namespace NewOS::HAL;
@@ -175,3 +177,5 @@ Void drv_ata_write(UInt64 Lba, UInt16 IO, UInt8 Master, Char* Buf,
/// @check is ATA detected?
Boolean drv_ata_detected(Void) { return kATADetected; }
+
+#endif /* ifdef __ATA_PIO__ */ \ No newline at end of file
diff --git a/Private/HALKit/PC b/Private/HALKit/PC
deleted file mode 120000
index 4af647a3..00000000
--- a/Private/HALKit/PC
+++ /dev/null
@@ -1 +0,0 @@
-AMD64/ \ No newline at end of file