From d037da53759d768059b6ce43e8b53ae6db737628 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Wed, 10 Apr 2024 12:09:30 +0200 Subject: StorageKit:PRDT: Add construct_prdt helper. Signed-off-by: Amlal El Mahrouss --- Private/Source/PRDT.cxx | 11 ++++++++++- Private/StorageKit/PRDT.hpp | 3 +++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Private/Source/PRDT.cxx b/Private/Source/PRDT.cxx index 42808a43..b569316a 100644 --- a/Private/Source/PRDT.cxx +++ b/Private/Source/PRDT.cxx @@ -8,4 +8,13 @@ #include #include -namespace NewOS {} // namespace NewOS +namespace NewOS { +/// @brief constructs a new PRD. +/// @param prd PRD reference. +/// @note This doesnt construct a valid, please fill it by yourself. +void construct_prdt(Ref& prd) { + prd.Leak().fPhysAddress = 0x0; + prd.Leak().fSectorCount = 0x0; + prd.Leak().fEndBit = 0x0; +} +} // namespace NewOS diff --git a/Private/StorageKit/PRDT.hpp b/Private/StorageKit/PRDT.hpp index 12da78ab..f6fa8dd9 100644 --- a/Private/StorageKit/PRDT.hpp +++ b/Private/StorageKit/PRDT.hpp @@ -8,6 +8,7 @@ #include #include +#include #define kPrdtTransferSize (sizeof(NewOS::UShort)) @@ -26,5 +27,7 @@ struct PRDT { UInt8 fEndBit; }; +void construct_prdt(Ref& prd); + EXTERN_C Int32 kPRDTTransferStatus; } // namespace NewOS -- cgit v1.2.3