| 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_ |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 uint8_t clock_seq_high_and_reserved; | 55 uint8_t clock_seq_high_and_reserved; |
| 56 uint8_t clock_seq_low; | 56 uint8_t clock_seq_low; |
| 57 uint8_t node[UUID_NODE_LEN]; | 57 uint8_t node[UUID_NODE_LEN]; |
| 58 } Uuid; | 58 } Uuid; |
| 59 uint8_t raw[GUID_SIZE]; | 59 uint8_t raw[GUID_SIZE]; |
| 60 } u; | 60 } u; |
| 61 } __attribute__((packed)) Guid; | 61 } __attribute__((packed)) Guid; |
| 62 | 62 |
| 63 #define GUID_EXPECTED_SIZE GUID_SIZE | 63 #define GUID_EXPECTED_SIZE GUID_SIZE |
| 64 | 64 |
| 65 /* Some constant values */ | |
| 66 extern const Guid guid_unused; | |
| 67 extern const Guid guid_chromeos_kernel; | |
| 68 | |
| 69 /* 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. |
| 70 * For every drive device, there are 2 headers, primary and secondary. | 66 * For every drive device, there are 2 headers, primary and secondary. |
| 71 * Most of fields are duplicated except my_lba and entries_lba. | 67 * Most of fields are duplicated except my_lba and entries_lba. |
| 72 * | 68 * |
| 73 * You may find more details in chapter 5 of EFI standard. | 69 * You may find more details in chapter 5 of EFI standard. |
| 74 */ | 70 */ |
| 75 typedef struct { | 71 typedef struct { |
| 76 char signature[8]; | 72 char signature[8]; |
| 77 uint32_t revision; | 73 uint32_t revision; |
| 78 uint32_t size; | 74 uint32_t size; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 } attrs; | 107 } attrs; |
| 112 uint16_t name[36]; /* UTF-16 encoded partition name */ | 108 uint16_t name[36]; /* UTF-16 encoded partition name */ |
| 113 /* Remainder of entry is reserved and should be 0 */ | 109 /* Remainder of entry is reserved and should be 0 */ |
| 114 } __attribute__((packed)) GptEntry; | 110 } __attribute__((packed)) GptEntry; |
| 115 | 111 |
| 116 #define GPTENTRY_EXPECTED_SIZE 128 | 112 #define GPTENTRY_EXPECTED_SIZE 128 |
| 117 | 113 |
| 118 __pragma(pack(pop)) /* Support packing for MSVC. */ | 114 __pragma(pack(pop)) /* Support packing for MSVC. */ |
| 119 | 115 |
| 120 #endif /* VBOOT_REFERENCE_CGPTLIB_GPT_H_ */ | 116 #endif /* VBOOT_REFERENCE_CGPTLIB_GPT_H_ */ |
| OLD | NEW |