| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 * For every drive device, there are 2 headers, primary and secondary. | 66 * For every drive device, there are 2 headers, primary and secondary. |
| 67 * Most of fields are duplicated except my_lba and entries_lba. | 67 * Most of fields are duplicated except my_lba and entries_lba. |
| 68 * | 68 * |
| 69 * You may find more details in chapter 5 of EFI standard. | 69 * You may find more details in chapter 5 of EFI standard. |
| 70 */ | 70 */ |
| 71 typedef struct { | 71 typedef struct { |
| 72 char signature[8]; | 72 char signature[8]; |
| 73 uint32_t revision; | 73 uint32_t revision; |
| 74 uint32_t size; | 74 uint32_t size; |
| 75 uint32_t header_crc32; | 75 uint32_t header_crc32; |
| 76 uint32_t reserved; | 76 uint32_t reserved_zero; |
| 77 uint64_t my_lba; | 77 uint64_t my_lba; |
| 78 uint64_t alternate_lba; | 78 uint64_t alternate_lba; |
| 79 uint64_t first_usable_lba; | 79 uint64_t first_usable_lba; |
| 80 uint64_t last_usable_lba; | 80 uint64_t last_usable_lba; |
| 81 Guid disk_uuid; | 81 Guid disk_uuid; |
| 82 | 82 |
| 83 uint64_t entries_lba; | 83 uint64_t entries_lba; |
| 84 uint32_t number_of_entries; | 84 uint32_t number_of_entries; |
| 85 uint32_t size_of_entry; | 85 uint32_t size_of_entry; |
| 86 uint32_t entries_crc32; | 86 uint32_t entries_crc32; |
| 87 uint8_t padding[512 - 92]; /* Pad to end of sector */ | 87 uint8_t reserved_padding[]; /* entire sector reserved for header */ |
| 88 } GptHeader; | 88 } GptHeader; |
| 89 | 89 |
| 90 /* GPT partition entry defines the starting and ending LBAs of a partition. | 90 /* GPT partition entry defines the starting and ending LBAs of a partition. |
| 91 * It also contains the unique GUID, type, and attribute bits. | 91 * It also contains the unique GUID, type, and attribute bits. |
| 92 * | 92 * |
| 93 * You may find more details in chapter 5 of EFI standard. | 93 * You may find more details in chapter 5 of EFI standard. |
| 94 */ | 94 */ |
| 95 typedef struct { | 95 typedef struct { |
| 96 Guid type; | 96 Guid type; |
| 97 Guid unique; | 97 Guid unique; |
| 98 uint64_t starting_lba; | 98 uint64_t starting_lba; |
| 99 uint64_t ending_lba; | 99 uint64_t ending_lba; |
| 100 uint64_t attributes; | 100 uint64_t attributes; |
| 101 uint16_t name[36]; /* UTF-16 encoded partition name */ | 101 uint16_t name[36]; /* UTF-16 encoded partition name */ |
| 102 uint8_t reserved[]; /* nothing, really */ |
| 102 } GptEntry; | 103 } GptEntry; |
| 103 | 104 |
| 104 #endif /* VBOOT_REFERENCE_CGPTLIB_GPT_H_ */ | 105 #endif /* VBOOT_REFERENCE_CGPTLIB_GPT_H_ */ |
| OLD | NEW |