summaryrefslogtreecommitdiffhomepage
path: root/Kernel/StorageKit/PRDT.hpp
blob: 617a74deec56ff6adc83d7cf71601316a140692c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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