summaryrefslogtreecommitdiffhomepage
path: root/Kernel/StorageKit/PRDT.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/StorageKit/PRDT.hpp')
-rw-r--r--Kernel/StorageKit/PRDT.hpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/Kernel/StorageKit/PRDT.hpp b/Kernel/StorageKit/PRDT.hpp
new file mode 100644
index 00000000..ae6166ce
--- /dev/null
+++ b/Kernel/StorageKit/PRDT.hpp
@@ -0,0 +1,36 @@
+/* -------------------------------------------
+
+ Copyright SoftwareLabs
+
+------------------------------------------- */
+
+#pragma once
+
+#include <KernelKit/PCI/Dma.hpp>
+#include <KernelKit/PCI/Iterator.hpp>
+#include <NewKit/Ref.hpp>
+
+#define kPrdtTransferSize (sizeof(NewOS::UShort))
+
+namespace NewOS
+{
+ /// @brief Tranfer information about PRD.
+ enum kPRDTTransfer
+ {
+ kPRDTTransferInProgress,
+ kPRDTTransferIsDone,
+ kPRDTTransferCount,
+ };
+
+ /// @brief Physical Region Descriptor Table.
+ struct PRDT
+ {
+ UInt32 fPhysAddress;
+ UInt32 fSectorCount;
+ UInt8 fEndBit;
+ };
+
+ void construct_prdt(Ref<PRDT>& prd);
+
+ EXTERN_C Int32 kPRDTTransferStatus;
+} // namespace NewOS