Moved utility.library-related tests into their own subdir.
[AROS.git] / rom / partition / partitiongpt.h
blobce868e069cbef361f198aadb9e198a8eba84530e
1 /*
2 Copyright © 1995-2012, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #ifndef PARTITIONGPT_H
7 #define PARTITIONGPT_H
9 #include <libraries/uuid.h>
11 /* Type ID for legacy MBR */
12 #define MBRT_GPT 0xEE
14 /* GPT partition table header */
15 struct GPTHeader
17 char Signature[8]; /* ID signature */
18 ULONG Revision; /* Revision number */
19 ULONG HeaderSize; /* Size of this structure */
20 ULONG HeaderCRC32; /* CRC32 of the header */
21 ULONG Reserved;
22 UQUAD CurrentBlock; /* Number of block where this structure is placed */
23 UQUAD BackupBlock; /* Number of block where backup partition table is placed */
24 UQUAD DataStart; /* Number of the first usable block for data */
25 UQUAD DataEnd; /* Number of the last usable block for data */
26 uuid_t DiskID; /* Disk unique ID */
27 UQUAD StartBlock; /* Number of the first partition entry block */
28 ULONG NumEntries; /* Number of partitions in the table */
29 ULONG EntrySize; /* Size of one entry */
30 ULONG PartCRC32; /* CRC32 of the partition entries array */
31 /* The rest is reserved */
34 #define GPT_SIGNATURE "EFI PART"
35 #define GPT_MIN_HEADER_SIZE 92
36 #define GPT_MAX_HEADER_SIZE 512
38 struct GPTPartition
40 uuid_t TypeID; /* Partition type ID */
41 uuid_t PartitionID; /* Partition unique ID */
42 UQUAD StartBlock; /* Number of the first block */
43 UQUAD EndBlock; /* Number of the last block */
44 ULONG Flags0; /* Flags */
45 ULONG Flags1;
46 UBYTE Name[72]; /* Name in UTF16-LE encoding */
49 /* Flags0 and Flags1, according to Microsoft(R) */
50 #define GPT_PF0_SYSTEM (1 << 0)
51 #define GPT_PF1_READONLY (1 << 29)
52 #define GPT_PF1_HIDDEN (1 << 30)
53 #define GPT_PF1_NOMOUNT (1 << 31)
55 /* AROS-specific flags */
56 #define GPT_PF1_AROS_BOOTABLE (1 << 28)
57 #define GPT_PF1_AROS_BOOTPRI 0x000000FF /* Mask for boot priority */
59 #endif /* PARTITIONGPT_H */