ref: renamed types.h to Types.h for match naming convention; also added Align.h and Bytes.h with helpers

This commit is contained in:
karina
2026-04-25 09:56:17 +04:00
parent b606fa23d0
commit e49af76aef
11 changed files with 78 additions and 7 deletions
+35
View File
@@ -0,0 +1,35 @@
#pragma once
#include <Types.h>
typedef struct FDTHeader {
UInt32 magic; // 0xd00dfeed
UInt32 totalSize;
UInt32 offDtStruct;
UInt32 offDtStrings;
UInt32 offMemRsvMap;
UInt32 version;
UInt32 lastCompVersion;
UInt32 bootCpuidPhys;
UInt32 sizeDtStrings;
UInt32 sizeDtStruct;
} FDTHeader;
typedef struct FDTProperty {
UInt32 length;
UInt32 nameOffset;
} FDTProperty;
typedef enum FDTToken {
FDTTokenBeginNode = 0x1,
FDTTokenEndNode = 0x2,
FDTTokenProperty = 0x3,
FDTTokenNOP = 0x4,
FDTTokenEnd = 0x9,
} FDTToken;
enum {
kFDTHeaderMagic = 0xd00dfeed,
};
void DTBParse(Pointer dtb);