summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlalelmahrouss@icloud.com>2024-02-01 10:25:09 +0100
committerAmlal El Mahrouss <amlalelmahrouss@icloud.com>2024-02-01 10:25:09 +0100
commit6d7e78543509af471568cf698c58a9f526dba129 (patch)
tree302cb075a69e1669c822f943cad1fc96520559be
parent6c4cc0dba681fef1cef3c31877653a1d6413fc90 (diff)
See below.
Stage 1: Create API for Partition read 'EFIPartitionManager' is the main class behind it, there is still some design to do. Signed-off-by: Amlal El Mahrouss <amlalelmahrouss@icloud.com>
-rw-r--r--Private/EFIKit/EFILib.hxx9
-rw-r--r--Private/EFIKit/EFiLib.cxx14
-rw-r--r--Private/KernelKit/DriveManager.hpp1
-rw-r--r--Private/KernelKit/FileManager.hpp1
-rw-r--r--Private/KernelKit/PEF.hpp1
5 files changed, 26 insertions, 0 deletions
diff --git a/Private/EFIKit/EFILib.hxx b/Private/EFIKit/EFILib.hxx
index e7b135ef..3f041e37 100644
--- a/Private/EFIKit/EFILib.hxx
+++ b/Private/EFIKit/EFILib.hxx
@@ -61,6 +61,15 @@ inline void KeRuntimeStop(const EfiCharType* ErrorCode,
EFI::Stop();
}
+enum {
+ kPartEPM,
+ kPartGPT,
+ kPartMBR,
+ kPartCnt,
+};
+
+class EFIPartitionManager final {};
+
#ifdef __BOOTLOADER__
#include <BootKit/Platform.hxx>
#endif // IF TARGET=BOOTLOADER
diff --git a/Private/EFIKit/EFiLib.cxx b/Private/EFIKit/EFiLib.cxx
new file mode 100644
index 00000000..b90cfa3a
--- /dev/null
+++ b/Private/EFIKit/EFiLib.cxx
@@ -0,0 +1,14 @@
+/* -------------------------------------------
+
+ Copyright Mahrouss Logic
+
+ File: EFILib.hxx
+ Purpose: EFI C++ library
+
+ Revision History:
+
+ 01/02/24: Added file (amlel)
+
+------------------------------------------- */
+
+#include <EFIKit/EFILib.hxx>
diff --git a/Private/KernelKit/DriveManager.hpp b/Private/KernelKit/DriveManager.hpp
index da478a45..223414d2 100644
--- a/Private/KernelKit/DriveManager.hpp
+++ b/Private/KernelKit/DriveManager.hpp
@@ -29,6 +29,7 @@ enum {
kEPMDrive = 0x11, // Explicit Partition Map.
kEPTDrive = 0x12, // ESP w/ EPM partition.
kMBRDrive = 0x13, // IBM PC classic partition scheme
+ kDriveCnt = 9,
};
typedef Int64 DriveID;
diff --git a/Private/KernelKit/FileManager.hpp b/Private/KernelKit/FileManager.hpp
index 6ed713c4..b65bdfe1 100644
--- a/Private/KernelKit/FileManager.hpp
+++ b/Private/KernelKit/FileManager.hpp
@@ -39,6 +39,7 @@ enum {
kFileReadAll = 101,
kFileReadChunk = 102,
kFileWriteChunk = 103,
+ kFileIOCnt = (kFileWriteChunk - kFileWriteAll) + 1,
};
typedef VoidPtr NodePtr;
diff --git a/Private/KernelKit/PEF.hpp b/Private/KernelKit/PEF.hpp
index afa43968..8c67c6ae 100644
--- a/Private/KernelKit/PEF.hpp
+++ b/Private/KernelKit/PEF.hpp
@@ -31,6 +31,7 @@ enum {
kPefArchRISCV,
kPefArch64x0, /* 64x000. */
kPefArch32x0,
+ kPefArchCount = (kPefArch32x0 - kPefArchIntel86S) + 1,
kPefArchInvalid = 0xFF,
};