OLD | NEW |
1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
2 * Use of this source code is governed by a BSD-style license that can be | 2 * Use of this source code is governed by a BSD-style license that can be |
3 * found in the LICENSE file. | 3 * found in the LICENSE file. |
4 * | 4 * |
5 * Defines EFI related structure. See more details in EFI 2.3 spec. | 5 * Defines EFI related structure. See more details in EFI 2.3 spec. |
6 * | 6 * |
7 * To download EFI standard, please visit UEFI homepage: | 7 * To download EFI standard, please visit UEFI homepage: |
8 * http://www.uefi.org/ | 8 * http://www.uefi.org/ |
9 */ | 9 */ |
10 #ifndef VBOOT_REFERENCE_CGPTLIB_GPT_H_ | 10 #ifndef VBOOT_REFERENCE_CGPTLIB_GPT_H_ |
11 #define VBOOT_REFERENCE_CGPTLIB_GPT_H_ | 11 #define VBOOT_REFERENCE_CGPTLIB_GPT_H_ |
12 | 12 |
13 #include <stdint.h> | 13 #include "sysincludes.h" |
14 | 14 |
15 #define GPT_HEADER_SIGNATURE "EFI PART" | 15 #define GPT_HEADER_SIGNATURE "EFI PART" |
16 #define GPT_HEADER_SIGNATURE_SIZE sizeof(GPT_HEADER_SIGNATURE) | 16 #define GPT_HEADER_SIGNATURE_SIZE sizeof(GPT_HEADER_SIGNATURE) |
17 #define GPT_HEADER_REVISION 0x00010000 | 17 #define GPT_HEADER_REVISION 0x00010000 |
18 | 18 |
19 /* The first 3 numbers should be stored in network-endian format | 19 /* The first 3 numbers should be stored in network-endian format |
20 * according to the GUID RFC. The UEFI spec appendix A claims they | 20 * according to the GUID RFC. The UEFI spec appendix A claims they |
21 * should be stored in little-endian format. But they need to be | 21 * should be stored in little-endian format. But they need to be |
22 * _displayed_ in network-endian format, which is also how they're | 22 * _displayed_ in network-endian format, which is also how they're |
23 * documented in the specs. | 23 * documented in the specs. |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 Guid type; | 95 Guid type; |
96 Guid unique; | 96 Guid unique; |
97 uint64_t starting_lba; | 97 uint64_t starting_lba; |
98 uint64_t ending_lba; | 98 uint64_t ending_lba; |
99 uint64_t attributes; | 99 uint64_t attributes; |
100 uint16_t name[36]; /* UTF-16 encoded partition name */ | 100 uint16_t name[36]; /* UTF-16 encoded partition name */ |
101 uint8_t reserved[]; /* nothing, really */ | 101 uint8_t reserved[]; /* nothing, really */ |
102 } __attribute__((packed)) GptEntry; | 102 } __attribute__((packed)) GptEntry; |
103 | 103 |
104 #endif /* VBOOT_REFERENCE_CGPTLIB_GPT_H_ */ | 104 #endif /* VBOOT_REFERENCE_CGPTLIB_GPT_H_ */ |
OLD | NEW |