summaryrefslogtreecommitdiffhomepage
path: root/dev/Kernel
diff options
context:
space:
mode:
Diffstat (limited to 'dev/Kernel')
-rw-r--r--dev/Kernel/FirmwareKit/EPM.h8
-rw-r--r--dev/Kernel/FirmwareKit/GPT.h11
-rw-r--r--dev/Kernel/src/DriveMgr.cc4
-rw-r--r--dev/Kernel/src/FS/NeFS.cc4
4 files changed, 18 insertions, 9 deletions
diff --git a/dev/Kernel/FirmwareKit/EPM.h b/dev/Kernel/FirmwareKit/EPM.h
index 8987ae6f..101316e4 100644
--- a/dev/Kernel/FirmwareKit/EPM.h
+++ b/dev/Kernel/FirmwareKit/EPM.h
@@ -50,7 +50,7 @@
///! @brief partition must start at this address.
///! Anything below is reserved for Data backup by the Main OS.
-#define kEPMPartBlockLba (sizeof(EPM_BOOT_BLOCK))
+#define kEPMPartBlockLba (sizeof(EPM_PART_BLOCK))
///! @brief Current EPM revision.
#define kEPMRevisionBcd (0x0100)
@@ -61,7 +61,7 @@
#define kEPMReserveLen (401)
struct EPM_GUID;
-struct EPM_BOOT_BLOCK;
+struct EPM_PART_BLOCK;
/* The first 0 > 128 addresses of a disk contains these headers. */
@@ -78,7 +78,7 @@ typedef struct EPM_GUID
* @brief The EPM boot block.
* @note NumBlock and LbaStart are ignored on some platforms.
*/
-struct PACKED EPM_BOOT_BLOCK
+struct PACKED EPM_PART_BLOCK
{
Kernel::Char Magic[kEPMMagicLength];
Kernel::Char Name[kEPMNameLength];
@@ -107,6 +107,6 @@ enum
kEPMInvalidOS = 0xff,
};
-typedef struct EPM_BOOT_BLOCK BOOT_BLOCK_STRUCT;
+typedef struct EPM_PART_BLOCK BOOT_BLOCK_STRUCT;
#endif // ifndef FIRMWAREKIT_EPM_H
diff --git a/dev/Kernel/FirmwareKit/GPT.h b/dev/Kernel/FirmwareKit/GPT.h
index 1427ca31..2e72f0b6 100644
--- a/dev/Kernel/FirmwareKit/GPT.h
+++ b/dev/Kernel/FirmwareKit/GPT.h
@@ -13,10 +13,19 @@
namespace Kernel
{
- typedef EfiGUID GPT_GUID;
+ 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 PartitionName[8];
diff --git a/dev/Kernel/src/DriveMgr.cc b/dev/Kernel/src/DriveMgr.cc
index 8ac5bdff..18ff9e5d 100644
--- a/dev/Kernel/src/DriveMgr.cc
+++ b/dev/Kernel/src/DriveMgr.cc
@@ -158,10 +158,10 @@ namespace Kernel
{
Void io_detect_drive(DriveTrait& trait)
{
- EPM_BOOT_BLOCK block_struct;
+ EPM_PART_BLOCK block_struct;
trait.fPacket.fPacketLba = kEPMBootBlockLba;
- trait.fPacket.fPacketSize = sizeof(EPM_BOOT_BLOCK);
+ trait.fPacket.fPacketSize = sizeof(EPM_PART_BLOCK);
trait.fPacket.fPacketContent = &block_struct;
rt_copy_memory((VoidPtr) "fs/detect-packet", trait.fPacket.fPacketMime,
diff --git a/dev/Kernel/src/FS/NeFS.cc b/dev/Kernel/src/FS/NeFS.cc
index 902b57a8..784275f8 100644
--- a/dev/Kernel/src/FS/NeFS.cc
+++ b/dev/Kernel/src/FS/NeFS.cc
@@ -519,7 +519,7 @@ bool NeFileSystemParser::Format(_Input _Output DriveTrait* drive, _Input const L
while (drive->fPacket.fPacketGood)
{
drive->fPacket.fPacketContent = buf;
- drive->fPacket.fPacketSize = sizeof(EPM_BOOT_BLOCK);
+ drive->fPacket.fPacketSize = sizeof(EPM_PART_BLOCK);
drive->fPacket.fPacketLba = outEpmLba;
drive->fInput(&drive->fPacket);
@@ -535,7 +535,7 @@ bool NeFileSystemParser::Format(_Input _Output DriveTrait* drive, _Input const L
epm_boot->NumBlocks = cnt;
drive->fPacket.fPacketContent = buf_epm;
- drive->fPacket.fPacketSize = sizeof(EPM_BOOT_BLOCK);
+ drive->fPacket.fPacketSize = sizeof(EPM_PART_BLOCK);
drive->fPacket.fPacketLba = outEpmLba;
drive->fOutput(&drive->fPacket);