diff options
Diffstat (limited to 'dev/kernel/FirmwareKit/EPM.h')
| -rw-r--r-- | dev/kernel/FirmwareKit/EPM.h | 71 |
1 files changed, 32 insertions, 39 deletions
diff --git a/dev/kernel/FirmwareKit/EPM.h b/dev/kernel/FirmwareKit/EPM.h index fe228127..27d635f3 100644 --- a/dev/kernel/FirmwareKit/EPM.h +++ b/dev/kernel/FirmwareKit/EPM.h @@ -1,11 +1,11 @@ /* ------------------------------------------- - Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved. + Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved. ------------------------------------------- */ /** - @brief The Explicit Partition Map scheme. + @brief The Explicit Partition Map scheme. */ #ifndef FIRMWAREKIT_EPM_H @@ -13,9 +13,9 @@ #include <NewKit/Defines.h> -#define kEPMNameLength (32) +#define kEPMNameLength (32) #define kEPMFilesystemLength (16) -#define kEPMMagicLength (5) +#define kEPMMagicLength (5) /* @brief AMD64 magic for EPM */ #define kEPMMagic86 "EPMAM" @@ -66,52 +66,45 @@ struct EPM_PART_BLOCK; /* The first 0 > 128 addresses of a disk contains these headers. */ /// @brief EPM GUID structure. -typedef struct EPM_GUID -{ - Kernel::UInt32 Data1; - Kernel::UInt16 Data2; - Kernel::UInt16 Data3; - Kernel::UInt8 Data4[8]; +typedef struct EPM_GUID { + Kernel::UInt32 Data1; + Kernel::UInt16 Data2; + Kernel::UInt16 Data3; + Kernel::UInt8 Data4[8]; } PACKED EPM_GUID; /** * @brief The EPM boot block. * @note NumBlock and LbaStart are ignored on some platforms. */ -struct PACKED EPM_PART_BLOCK -{ - Kernel::Char Magic[kEPMMagicLength] = {0}; - Kernel::Char Name[kEPMNameLength] = {0}; - EPM_GUID Guid; - Kernel::Int32 Version; - Kernel::Int64 NumBlocks; - Kernel::Int64 SectorSz; - Kernel::Int64 LbaStart; // base offset - Kernel::Int64 LbaEnd; // end offset - Kernel::Int16 Kind; - Kernel::Int16 Flags; - Kernel::Int32 FsVersion; - Kernel::Char Fs[kEPMFilesystemLength]; /* NeFS, HeFS... */ - Kernel::Char Reserved[kEPMReserveLen]; // to fill a full sector. +struct PACKED EPM_PART_BLOCK { + Kernel::Char Magic[kEPMMagicLength] = {0}; + Kernel::Char Name[kEPMNameLength] = {0}; + EPM_GUID Guid; + Kernel::Int32 Version; + Kernel::Int64 NumBlocks; + Kernel::Int64 SectorSz; + Kernel::Int64 LbaStart; // base offset + Kernel::Int64 LbaEnd; // end offset + Kernel::Int16 Kind; + Kernel::Int16 Flags; + Kernel::Int32 FsVersion; + Kernel::Char Fs[kEPMFilesystemLength]; /* NeFS, HeFS... */ + Kernel::Char Reserved[kEPMReserveLen]; // to fill a full sector. }; ///! @brief Version kind enum. ///! @brief Use in boot block version field. -enum -{ - kEPMInvalid = 0x00, - kEPMGeneric = 0xcf, /// @brief Generic OS - kEPMLinux = 0x8f, /// @brief Linux on EPM - kEPMBSD = 0x9f, /// @brief Berkeley Soft. Distribution - kEPMNeKernel = 0x1f, /// @brief NeKernel. - kEPMInvalidOS = 0xff, +enum { + kEPMInvalid = 0x00, + kEPMGeneric = 0xcf, /// @brief Generic OS + kEPMLinux = 0x8f, /// @brief Linux on EPM + kEPMBSD = 0x9f, /// @brief Berkeley Soft. Distribution + kEPMNeKernel = 0x1f, /// @brief NeKernel. + kEPMInvalidOS = 0xff, }; -inline EPM_GUID kEPMNilGuid = { - 0x0U, - 0x0U, - 0x0U, - {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}; +inline EPM_GUID kEPMNilGuid = {0x0U, 0x0U, 0x0U, {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}; -#endif // ifndef FIRMWAREKIT_EPM_H +#endif // ifndef FIRMWAREKIT_EPM_H |
