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

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

Issue 2614002: Enable attributes to display and set properly. (Closed) Base URL: ssh://git@chromiumos-git/chromeos
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
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_
(...skipping 16 matching lines...) Expand all
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 #define GPT_ENT_TYPE_EFI \ 29 #define GPT_ENT_TYPE_EFI \
30 {{{0xc12a7328,0xf81f,0x11d2,0xba,0x4b,{0x00,0xa0,0xc9,0x3e,0xc9,0x3b}}}} 30 {{{0xc12a7328,0xf81f,0x11d2,0xba,0x4b,{0x00,0xa0,0xc9,0x3e,0xc9,0x3b}}}}
31 #define GPT_ENT_TYPE_CHROMEOS_KERNEL \ 31 #define GPT_ENT_TYPE_CHROMEOS_KERNEL \
32 {{{0xfe3a2a5d,0x4f32,0x41a7,0xb7,0x25,{0xac,0xcc,0x32,0x85,0xa3,0x09}}}} 32 {{{0xfe3a2a5d,0x4f32,0x41a7,0xb7,0x25,{0xac,0xcc,0x32,0x85,0xa3,0x09}}}}
33 #define GPT_ENT_TYPE_CHROMEOS_ROOTFS \ 33 #define GPT_ENT_TYPE_CHROMEOS_ROOTFS \
34 {{{0x3cb8e202,0x3b7e,0x47dd,0x8a,0x3c,{0x7f,0xf2,0xa1,0x3c,0xfc,0xec}}}} 34 {{{0x3cb8e202,0x3b7e,0x47dd,0x8a,0x3c,{0x7f,0xf2,0xa1,0x3c,0xfc,0xec}}}}
35 #define GPT_ENT_TYPE_CHROMEOS_RESERVED \ 35 #define GPT_ENT_TYPE_CHROMEOS_RESERVED \
36 {{{0x2e0a753d,0x9e48,0x43b0,0x83,0x37,{0xb1,0x51,0x92,0xcb,0x1b,0x5e}}}} 36 {{{0x2e0a753d,0x9e48,0x43b0,0x83,0x37,{0xb1,0x51,0x92,0xcb,0x1b,0x5e}}}}
37 #define GPT_ENT_TYPE_LINUX_DATA \
38 {{{0xebd0a0a2,0xb9e5,0x4433,0x87,0xc0,{0x68,0xb6,0xb7,0x26,0x99,0xc7}}}}
37 39
38 40
39 #define UUID_NODE_LEN 6 41 #define UUID_NODE_LEN 6
40 #define GUID_SIZE 16 42 #define GUID_SIZE 16
41 43
42 /* GUID definition. 44 /* GUID definition.
43 * Defined in appendix A of EFI standard. 45 * Defined in appendix A of EFI standard.
44 */ 46 */
45 typedef struct { 47 typedef struct {
46 union { 48 union {
47 struct { 49 struct {
48 uint32_t time_low; 50 uint32_t time_low;
49 uint16_t time_mid; 51 uint16_t time_mid;
50 uint16_t time_high_and_version; 52 uint16_t time_high_and_version;
51 uint8_t clock_seq_high_and_reserved; 53 uint8_t clock_seq_high_and_reserved;
52 uint8_t clock_seq_low; 54 uint8_t clock_seq_low;
53 uint8_t node[UUID_NODE_LEN]; 55 uint8_t node[UUID_NODE_LEN];
54 } Uuid; 56 } Uuid;
55 uint8_t raw[GUID_SIZE]; 57 uint8_t raw[GUID_SIZE];
56 } u; 58 } u;
57 } __attribute__((packed)) Guid; 59 } __attribute__((packed)) Guid;
58 60
61 /* Some constant values */
62 extern const Guid guid_unused;
63 extern const Guid guid_chromeos_kernel;
64
59 /* GPT header defines how many partitions exist on a drive and sectors managed. 65 /* GPT header defines how many partitions exist on a drive and sectors managed.
60 * For every drive device, there are 2 headers, primary and secondary. 66 * For every drive device, there are 2 headers, primary and secondary.
61 * Most of fields are duplicated except my_lba and entries_lba. 67 * Most of fields are duplicated except my_lba and entries_lba.
62 * 68 *
63 * You may find more details in chapter 5 of EFI standard. 69 * You may find more details in chapter 5 of EFI standard.
64 */ 70 */
65 typedef struct { 71 typedef struct {
66 char signature[8]; 72 char signature[8];
67 uint32_t revision; 73 uint32_t revision;
68 uint32_t size; 74 uint32_t size;
(...skipping 20 matching lines...) Expand all
89 typedef struct { 95 typedef struct {
90 Guid type; 96 Guid type;
91 Guid unique; 97 Guid unique;
92 uint64_t starting_lba; 98 uint64_t starting_lba;
93 uint64_t ending_lba; 99 uint64_t ending_lba;
94 uint64_t attributes; 100 uint64_t attributes;
95 uint16_t name[36]; /* UTF-16 encoded partition name */ 101 uint16_t name[36]; /* UTF-16 encoded partition name */
96 } GptEntry; 102 } GptEntry;
97 103
98 #endif /* VBOOT_REFERENCE_CGPTLIB_GPT_H_ */ 104 #endif /* VBOOT_REFERENCE_CGPTLIB_GPT_H_ */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698