OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
Apm.h
Go to the documentation of this file.
1
9#ifndef APM_H
10#define APM_H
11
12#pragma pack(1)
13
14#define MBR_TYPE_APPLE_PARTITION_TABLE_HEADER 0x20
15
16#define APM_ENTRY_TYPE_APM "Apple_partition_map"
17#define APM_ENTRY_TYPE_FREE "Apple_Free"
18
19typedef PACKED struct {
20 UINT32 BlockStart;
22 UINT16 SystemType;
24
25#define APM_DRIVER_DESCRIPTOR_MAP_SIGNATURE SIGNATURE_16 ('E', 'R')
26
27//
28// APM Driver Descriptor Map Header
29//
30typedef PACKED struct {
31 UINT16 Signature;
32 UINT16 BlockSize;
33 UINT32 BlockCount;
34 UINT16 DeviceType;
35 UINT16 DeviceId;
36 UINT32 DriverData;
39 UINT8 Reserved[430];
41
42#define APM_ENTRY_SIGNATURE SIGNATURE_16 ('P', 'M')
43
44//
45// APM Entry Flags
46//
47#define APM_ENTRY_FLAGS_VALID BIT0
48#define APM_ENTRY_FLAGS_ALLOCATED BIT1
49#define APM_ENTRY_FLAGS_IN_USE BIT2
50#define APM_ENTRY_FLAGS_BOOTABLE BIT3
51#define APM_ENTRY_FLAGS_READABLE BIT4
52#define APM_ENTRY_FLAGS_WRITABLE BIT5
53#define APM_ENTRY_FLAGS_OS_PIC_CODE BIT6
54#define APM_ENTRY_FLAGS_OS_SPECIFIC_2 BIT7
55#define APM_ENTRY_FLAGS_OS_SPECIFIC_1 BIT8
56#define APM_ENTRY_FLAGS_RESERVED 0xFFFFFE00
57
58//
59// APM Entry Header
60//
61typedef PACKED struct {
62 UINT16 Signature;
63 UINT16 Reserved1;
67 CHAR8 PartitionName[32];
68 CHAR8 PartitionType[32];
69 UINT32 LBAStart;
70 UINT32 LBASize;
79 UINT8 ProcessorType[16];
80 UINT32 Reserved2[32];
81 UINT32 Reserved3[62];
83
84#pragma pack()
85
86#endif // APM_H
CHAR8 PartitionName[32]
Definition Apm.h:67
UINT32 LBASize
Definition Apm.h:70
PACKED struct @11 APM_DRIVER_DESCRIPTOR_MAP_ENTRY
UINT32 DriverData
Definition Apm.h:36
UINT32 BootStrapCodeEntry2
Definition Apm.h:77
UINT16 DeviceType
Definition Apm.h:34
UINT32 BootStrapCodeChecksum
Definition Apm.h:78
UINT16 BlockSize
Definition Apm.h:32
UINT32 BootStrapCodeLoadAddress2
Definition Apm.h:75
UINT32 PartitionFlags
Definition Apm.h:71
UINT16 DeviceId
Definition Apm.h:35
UINT32 BlockCount
Definition Apm.h:33
PACKED struct @12 APM_DRIVER_DESCRIPTOR_MAP
UINT16 DriverDescriptorCount
Definition Apm.h:37
UINT32 PartitionSize
Definition Apm.h:66
UINT32 LBAStart
Definition Apm.h:69
UINT32 BootStrapCodeLBA
Definition Apm.h:72
UINT32 Reserved2[32]
Definition Apm.h:80
UINT32 BootStrapCodeSize
Definition Apm.h:73
UINT16 Reserved1
Definition Apm.h:63
UINT32 Reserved3[62]
Definition Apm.h:81
PACKED struct @13 APM_ENTRY
UINT8 ProcessorType[16]
Definition Apm.h:79
UINT8 Reserved[430]
Definition Apm.h:39
UINT32 BootStrapCodeLoadAddress
Definition Apm.h:74
UINT32 BlockStart
Definition Apm.h:20
CHAR8 PartitionType[32]
Definition Apm.h:68
APM_DRIVER_DESCRIPTOR_MAP_ENTRY DriverDescriptors[8]
Definition Apm.h:38
UINT32 PartitionStart
Definition Apm.h:65
UINT16 Signature
Definition Apm.h:31
UINT16 NumberOfBlocks
Definition Apm.h:21
UINT32 BootStrapCodeEntry
Definition Apm.h:76
UINT16 SystemType
Definition Apm.h:22
UINT32 NumberOfPartitionEntries
Definition Apm.h:64