summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-03-20 09:03:31 +0100
committerAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-03-20 09:03:31 +0100
commitdb81a40a0277c8f571a44c6f97c0ea5c7a81f974 (patch)
treebc1070af2cc527f3b9d93a345a51658e078cadd5
parent834ba2852f69e4dceec1a0a63400fe5171a97c48 (diff)
unstable: EPM: update specs.
Signed-off-by: Amlal El Mahrouss <amlal@el-mahrouss-logic.com>
-rw-r--r--Private/FirmwareKit/EPM.hxx59
-rw-r--r--Private/Root/Applications/.gitkeep (renamed from Private/Root/Programs/.gitkeep)0
2 files changed, 32 insertions, 27 deletions
diff --git a/Private/FirmwareKit/EPM.hxx b/Private/FirmwareKit/EPM.hxx
index 50d7897f..098a5a6e 100644
--- a/Private/FirmwareKit/EPM.hxx
+++ b/Private/FirmwareKit/EPM.hxx
@@ -15,22 +15,22 @@
#define kEPMUUIDLength 37
#define kEPMNameLength 32
+#define kEPMFilesystemLength 16
#define kEPMMagicLength 4
-/* the first 512 > x > 1024 bytes of a disk contains this headers. */
+/* The first 512 > x > 1024 bytes of a disk contains this headers. */
/**
* @brief The EPM bootloader block.
- * boot code info
*/
struct PACKED BootBlock {
- char magic[kEPMMagicLength];
- char name[kEPMNameLength];
- char uuid[kEPMUUIDLength];
- int version;
- long long int num_blocks;
- long long int sector_sz;
- long long int sector_start;
+ HCore::Char Magic[kEPMMagicLength];
+ HCore::Char Name[kEPMNameLength];
+ HCore::Char Uuid[kEPMUUIDLength];
+ HCore::Int32 Version;
+ HCore::Int64 NumBlocks;
+ HCore::Int64 SectorSz;
+ HCore::Int64 SectorStart;
};
/**
@@ -38,32 +38,37 @@ struct PACKED BootBlock {
* used to describe a partition inside a media.
*/
struct PACKED PartitionBlock {
- char name[32];
- int magic;
- long long int sector_end;
- long long int sector_sz;
- long long int sector_start;
- short type;
- int version;
- char fs[16]; /* ffs_2 */
+ HCore::Char Name[kEPMNameLength];
+ HCore::Int32 Magic;
+ HCore::Int64 SectorEnd;
+ HCore::Int64 SectorSz;
+ HCore::Int64 SectorStart;
+ HCore::Int16 Type;
+ HCore::Int32 Version;
+ HCore::Char Fs[kEPMFilesystemLength]; /* NewFS, HCFS... */
};
/* @brief AMD64 magic for EPM */
-#define kMagic86 "EPMAM"
+#define kEPMMagic86 "EPMAM"
/* @brief RISC-V magic for EPM */
-#define kMagicRISCV "EPMRV"
+#define kEPMMagicRISCV "EPMRV"
/* @brief ARM magic for EPM */
-#define kMagicARM "EPMAR"
+#define kEPMMagicARM "EPMAR"
/* @brief 64x0 magic for EPM */
-#define kMagic64k "EPM64"
+#define kEPMMagic64k "EPM64"
/* @brief 32x0 magic for EPM */
-#define kMagic32k "EPM32"
-#define kMaxBlks 128
+#define kEPMMagic32k "EPM32"
+
+/* @brief Invalid magic for EPM */
+
+#define kEPMMagicError "EPM??"
+
+#define kEPMMaxBlks 128
//! version types.
//! use in boot block version field.
@@ -75,15 +80,15 @@ enum {
kEPMHCore = 0x1f,
};
-/// END SPECS
-
typedef struct BootBlock BootBlockType;
typedef struct PartitionBlock PartitionBlockType;
#ifdef __x86_64__
-#define kMag kMagic86
+#define kEPMMagic kEPMMagic86
#else
-#define kMag "EPM??"
+#define kEPMMagic kEPMMagicError
#endif
+/// END SPECS
+
#endif // ifndef __PARTITION_MAP__
diff --git a/Private/Root/Programs/.gitkeep b/Private/Root/Applications/.gitkeep
index e69de29b..e69de29b 100644
--- a/Private/Root/Programs/.gitkeep
+++ b/Private/Root/Applications/.gitkeep