Subversion Repositories HelenOS

Rev

Rev 2726 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2726 Rev 2782
1
#ifndef _EFI_GPT_H
1
#ifndef _EFI_GPT_H
2
#define _EFI_GPT_H
2
#define _EFI_GPT_H
3
/*++
3
/*++
4
 
4
 
5
Copyright (c) 1998  Intel Corporation
5
Copyright (c) 1998  Intel Corporation
6
 
6
 
7
Module Name:
7
Module Name:
8
 
8
 
9
    EfiGpt.h
9
    EfiGpt.h
10
   
10
   
11
Abstract:
11
Abstract:
12
    Include file for EFI partitioning scheme
12
    Include file for EFI partitioning scheme
13
 
13
 
14
 
14
 
15
 
15
 
16
Revision History
16
Revision History
17
 
17
 
18
--*/
18
--*/
19
 
19
 
20
#define PRIMARY_PART_HEADER_LBA         1
20
#define PRIMARY_PART_HEADER_LBA         1
21
 
21
 
22
typedef struct {
22
typedef struct {
23
    EFI_TABLE_HEADER    Header;
23
    EFI_TABLE_HEADER    Header;
24
    EFI_LBA             MyLBA;
24
    EFI_LBA             MyLBA;
25
    EFI_LBA             AlternateLBA;
25
    EFI_LBA             AlternateLBA;
26
    EFI_LBA             FirstUsableLBA;
26
    EFI_LBA             FirstUsableLBA;
27
    EFI_LBA             LastUsableLBA;
27
    EFI_LBA             LastUsableLBA;
28
    EFI_GUID            DiskGUID;
28
    EFI_GUID            DiskGUID;
29
    EFI_LBA             PartitionEntryLBA;
29
    EFI_LBA             PartitionEntryLBA;
30
    UINT32              NumberOfPartitionEntries;
30
    UINT32              NumberOfPartitionEntries;
31
    UINT32              SizeOfPartitionEntry;
31
    UINT32              SizeOfPartitionEntry;
32
    UINT32              PartitionEntryArrayCRC32;
32
    UINT32              PartitionEntryArrayCRC32;
33
} EFI_PARTITION_TABLE_HEADER;
33
} EFI_PARTITION_TABLE_HEADER;
34
 
34
 
35
#define EFI_PTAB_HEADER_ID  "EFI PART"
35
#define EFI_PTAB_HEADER_ID  "EFI PART"
36
 
36
 
37
typedef struct {
37
typedef struct {
38
    EFI_GUID    PartitionTypeGUID;
38
    EFI_GUID    PartitionTypeGUID;
39
    EFI_GUID    UniquePartitionGUID;
39
    EFI_GUID    UniquePartitionGUID;
40
    EFI_LBA     StartingLBA;
40
    EFI_LBA     StartingLBA;
41
    EFI_LBA     EndingLBA;
41
    EFI_LBA     EndingLBA;
42
    UINT64      Attributes;
42
    UINT64      Attributes;
43
    CHAR16      PartitionName[36];
43
    CHAR16      PartitionName[36];
44
} EFI_PARTITION_ENTRY;
44
} EFI_PARTITION_ENTRY;
45
 
45
 
46
//
46
//
47
// EFI Partition Attributes
47
// EFI Partition Attributes
48
//
48
//
49
#define EFI_PART_USED_BY_EFI            0x0000000000000001
49
#define EFI_PART_USED_BY_EFI            0x0000000000000001
50
#define EFI_PART_REQUIRED_TO_FUNCTION   0x0000000000000002
50
#define EFI_PART_REQUIRED_TO_FUNCTION   0x0000000000000002
51
#define EFI_PART_USED_BY_OS             0x0000000000000004
51
#define EFI_PART_USED_BY_OS             0x0000000000000004
52
#define EFI_PART_REQUIRED_BY_OS         0x0000000000000008
52
#define EFI_PART_REQUIRED_BY_OS         0x0000000000000008
53
#define EFI_PART_BACKUP_REQUIRED        0x0000000000000010
53
#define EFI_PART_BACKUP_REQUIRED        0x0000000000000010
54
#define EFI_PART_USER_DATA              0x0000000000000020
54
#define EFI_PART_USER_DATA              0x0000000000000020
55
#define EFI_PART_CRITICAL_USER_DATA     0x0000000000000040
55
#define EFI_PART_CRITICAL_USER_DATA     0x0000000000000040
56
#define EFI_PART_REDUNDANT_PARTITION    0x0000000000000080
56
#define EFI_PART_REDUNDANT_PARTITION    0x0000000000000080
57
 
57
 
58
#define EFI_PART_TYPE_UNUSED_GUID   \
58
#define EFI_PART_TYPE_UNUSED_GUID   \
59
    { 0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} }
59
    { 0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} }
60
   
60
   
61
#define EFI_PART_TYPE_EFI_SYSTEM_PART_GUID  \
61
#define EFI_PART_TYPE_EFI_SYSTEM_PART_GUID  \
62
    { 0xc12a7328, 0xf81f, 0x11d2, {0xba, 0x4b, 0x00, 0xa0, 0xc9, 0x3e, 0xc9, 0x3b} }
62
    { 0xc12a7328, 0xf81f, 0x11d2, {0xba, 0x4b, 0x00, 0xa0, 0xc9, 0x3e, 0xc9, 0x3b} }
63
 
63
 
64
#define EFI_PART_TYPE_LEGACY_MBR_GUID   \
64
#define EFI_PART_TYPE_LEGACY_MBR_GUID   \
65
    { 0x024dee41, 0x33e7, 0x11d3, {0x9d, 0x69, 0x00, 0x08, 0xc7, 0x81, 0xf3, 0x9f} }
65
    { 0x024dee41, 0x33e7, 0x11d3, {0x9d, 0x69, 0x00, 0x08, 0xc7, 0x81, 0xf3, 0x9f} }
66
 
66
 
67
#endif
67
#endif
68
 
68
 
69
 
69