Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: src/platform/vboot_reference/vboot_firmware/lib/cgptlib/include/gpt.h

Issue 2504001: Put gpt.h back (Closed) Base URL: ssh://gitrw.chromium.org/chromiumos
Patch Set: Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <stdint.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.
24 * 24 *
25 * Since what we have here are little-endian constants, they're 25 * Since what we have here are little-endian constants, they're
26 * byte-swapped from the normal display order. */ 26 * byte-swapped from the normal display order. */
27 #define GPT_ENT_TYPE_UNUSED \ 27 #define GPT_ENT_TYPE_UNUSED \
28 {{{0x00000000,0x0000,0x0000,0x00,0x00,{0x00,0x00,0x00,0x00,0x00,0x00}}}} 28 {{{0x00000000,0x0000,0x0000,0x00,0x00,{0x00,0x00,0x00,0x00,0x00,0x00}}}}
29 /* Hey, that one's right regardless of endianness... */ 29 #define GPT_ENT_TYPE_EFI \
30 {{{0xc12a7328,0xf81f,0x11d2,0xba,0x4b,{0x00,0xa0,0xc9,0x3e,0xc9,0x3b}}}}
31 #define GPT_ENT_TYPE_CHROMEOS_KERNEL \
32 {{{0xfe3a2a5d,0x4f32,0x41a7,0xb7,0x25,{0xac,0xcc,0x32,0x85,0xa3,0x09}}}}
33 #define GPT_ENT_TYPE_CHROMEOS_ROOTFS \
34 {{{0x3cb8e202,0x3b7e,0x47dd,0x8a,0x3c,{0x7f,0xf2,0xa1,0x3c,0xfc,0xec}}}}
35 #define GPT_ENT_TYPE_CHROMEOS_RESERVED \
36 {{{0x2e0a753d,0x9e48,0x43b0,0x83,0x37,{0xb1,0x51,0x92,0xcb,0x1b,0x5e}}}}
30 37
31 #define GPT_ENT_TYPE_EFI \
32 {{{0x28732ac1,0x1ff8,0xd211,0xba,0x4b,{0x00,0xa0,0xc9,0x3e,0xc9,0x3b}}}}
33 /* c12a7328-f81f-11d2-ba4b-00a0c93ec93b */
34
35 #define GPT_ENT_TYPE_CHROMEOS_KERNEL \
36 {{{0x5d2a3afe,0x324f,0xa741,0xb7,0x25,{0xac,0xcc,0x32,0x85,0xa3,0x09}}}}
37 /* FE3A2A5D-4F32-41A7-B725-ACCC3285A309 */
38
39 #define GPT_ENT_TYPE_CHROMEOS_ROOTFS \
40 {{{0x02e2b83c,0x7e3b,0xdd47,0x8a,0x3c,{0x7f,0xf2,0xa1,0x3c,0xfc,0xec}}}}
41 /* 3CB8E202-3B7E-47DD-8A3C-7FF2A13CFCEC */
42
43 #define GPT_ENT_TYPE_CHROMEOS_RESERVED \
44 {{{0x3d750a2e,0x489e,0xb043,0x83,0x37,{0xb1,0x51,0x92,0xcb,0x1b,0x5e}}}}
45 /* 2e0a753d-9e48-43b0-8337-b15192cb1b5e */
46 38
47 #define UUID_NODE_LEN 6 39 #define UUID_NODE_LEN 6
48 #define GUID_SIZE 16 40 #define GUID_SIZE 16
49 41
50 /* GUID definition. 42 /* GUID definition.
51 * Defined in appendix A of EFI standard. 43 * Defined in appendix A of EFI standard.
52 */ 44 */
53 typedef struct { 45 typedef struct {
54 union { 46 union {
55 struct { 47 struct {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 typedef struct { 89 typedef struct {
98 Guid type; 90 Guid type;
99 Guid unique; 91 Guid unique;
100 uint64_t starting_lba; 92 uint64_t starting_lba;
101 uint64_t ending_lba; 93 uint64_t ending_lba;
102 uint64_t attributes; 94 uint64_t attributes;
103 uint16_t name[36]; /* UTF-16 encoded partition name */ 95 uint16_t name[36]; /* UTF-16 encoded partition name */
104 } GptEntry; 96 } GptEntry;
105 97
106 #endif /* VBOOT_REFERENCE_CGPTLIB_GPT_H_ */ 98 #endif /* VBOOT_REFERENCE_CGPTLIB_GPT_H_ */
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698