summaryrefslogtreecommitdiffhomepage
path: root/dev/kernel/FirmwareKit
diff options
context:
space:
mode:
Diffstat (limited to 'dev/kernel/FirmwareKit')
-rw-r--r--dev/kernel/FirmwareKit/EPM.h11
-rw-r--r--dev/kernel/FirmwareKit/GPT.h16
-rw-r--r--dev/kernel/FirmwareKit/VEPM.h29
3 files changed, 41 insertions, 15 deletions
diff --git a/dev/kernel/FirmwareKit/EPM.h b/dev/kernel/FirmwareKit/EPM.h
index 548bb9a7..6db82506 100644
--- a/dev/kernel/FirmwareKit/EPM.h
+++ b/dev/kernel/FirmwareKit/EPM.h
@@ -80,8 +80,8 @@ typedef struct EPM_GUID
*/
struct PACKED EPM_PART_BLOCK
{
- Kernel::Char Magic[kEPMMagicLength];
- Kernel::Char Name[kEPMNameLength];
+ Kernel::Char Magic[kEPMMagicLength] = {0};
+ Kernel::Char Name[kEPMNameLength] = {0};
EPM_GUID Guid;
Kernel::Int32 Version;
Kernel::Int64 NumBlocks;
@@ -108,4 +108,11 @@ enum
kEPMInvalidOS = 0xff,
};
+inline EPM_GUID kEPMNilGuid = {
+ 0x0U,
+ 0x0U,
+ 0x0U,
+ { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 }
+};
+
#endif // ifndef FIRMWAREKIT_EPM_H
diff --git a/dev/kernel/FirmwareKit/GPT.h b/dev/kernel/FirmwareKit/GPT.h
index aab6b650..4be1fed2 100644
--- a/dev/kernel/FirmwareKit/GPT.h
+++ b/dev/kernel/FirmwareKit/GPT.h
@@ -17,19 +17,9 @@
namespace Kernel
{
- struct GPT_GUID;
struct GPT_PARTITION_TABLE;
struct GPT_PARTITION_ENTRY;
- /// @brief GPT GUID structure.
- typedef struct GPT_GUID
- {
- Kernel::UInt32 Data1;
- Kernel::UInt16 Data2;
- Kernel::UInt16 Data3;
- Kernel::UInt8 Data4[8];
- } GPT_GUID;
-
struct PACKED GPT_PARTITION_TABLE final
{
Char Signature[kMagicLenGPT];
@@ -41,7 +31,7 @@ namespace Kernel
UInt64 LBAAltHeader;
UInt64 FirstGPTEntry;
UInt64 LastGPTEntry;
- GPT_GUID Guid;
+ EfiGUID Guid;
UInt64 StartingLBA;
UInt32 NumPartitionEntries;
UInt32 SizeOfEntries;
@@ -51,8 +41,8 @@ namespace Kernel
struct PACKED GPT_PARTITION_ENTRY
{
- GPT_GUID PartitionTypeGUID;
- GPT_GUID UniquePartitionGUID;
+ EfiGUID PartitionTypeGUID;
+ EfiGUID UniquePartitionGUID;
UInt64 StartLBA;
UInt64 EndLBA;
UInt64 Attributes;
diff --git a/dev/kernel/FirmwareKit/VEPM.h b/dev/kernel/FirmwareKit/VEPM.h
index 9d8fa4d4..2b95e12d 100644
--- a/dev/kernel/FirmwareKit/VEPM.h
+++ b/dev/kernel/FirmwareKit/VEPM.h
@@ -8,7 +8,36 @@
#define FIRMWAREKIT_VEPM_H
#include <FirmwareKit/EPM.h>
+#include <FirmwareKit/EFI.h>
/// @brief The Virtual Explicit Partition Map scheme extension.
+#ifdef __NE_VEPM__
+#ifdef kEPMMagic
+#undef kEPMMagic
+#endif // kEPMMagic
+
+#define kEPMMagic "EPMVM"
+
+/// @brief VEPM GUID.
+/// @note This is the GUID used to identify a VEPM partition.
+inline EPM_GUID kVEPMGuidEPM = {
+ 0x9a1b3f2e,
+ 0x4c3f,
+ 0x4d52,
+ { 0xa7, 0x83, 0x9c, 0x21, 0x7b, 0x5e, 0x4d, 0xac }
+};
+
+/// @brief VEPM GUID.
+/// @note This is the GUID used to identify a VEPM partition (EFI version)
+inline EfiGUID kVEPMGuidEFI = {
+ 0x9a1b3f2e,
+ 0x4c3f,
+ 0x4d52,
+ { 0xa7, 0x83, 0x9c, 0x21, 0x7b, 0x5e, 0x4d, 0xac }
+};
+
+#define kVEPMGuidStr "9a1b3f2e-4c3f-4d52-a783-9c217b5e4dac"
+#endif // __NE_VEPM__
+
#endif // FIRMWAREKIT_VEPM_H \ No newline at end of file