| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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_zero; | 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 | |
| 83 uint64_t entries_lba; | 82 uint64_t entries_lba; |
| 84 uint32_t number_of_entries; | 83 uint32_t number_of_entries; |
| 85 uint32_t size_of_entry; | 84 uint32_t size_of_entry; |
| 86 uint32_t entries_crc32; | 85 uint32_t entries_crc32; |
| 87 uint8_t reserved_padding[]; /* entire sector reserved for header */ | 86 uint8_t reserved_padding[]; /* entire sector reserved for header */ |
| 88 } GptHeader; | 87 } __attribute__((packed)) GptHeader; |
| 89 | 88 |
| 90 /* GPT partition entry defines the starting and ending LBAs of a partition. | 89 /* GPT partition entry defines the starting and ending LBAs of a partition. |
| 91 * It also contains the unique GUID, type, and attribute bits. | 90 * It also contains the unique GUID, type, and attribute bits. |
| 92 * | 91 * |
| 93 * You may find more details in chapter 5 of EFI standard. | 92 * You may find more details in chapter 5 of EFI standard. |
| 94 */ | 93 */ |
| 95 typedef struct { | 94 typedef struct { |
| 96 Guid type; | 95 Guid type; |
| 97 Guid unique; | 96 Guid unique; |
| 98 uint64_t starting_lba; | 97 uint64_t starting_lba; |
| 99 uint64_t ending_lba; | 98 uint64_t ending_lba; |
| 100 uint64_t attributes; | 99 uint64_t attributes; |
| 101 uint16_t name[36]; /* UTF-16 encoded partition name */ | 100 uint16_t name[36]; /* UTF-16 encoded partition name */ |
| 102 uint8_t reserved[]; /* nothing, really */ | 101 uint8_t reserved[]; /* nothing, really */ |
| 103 } GptEntry; | 102 } __attribute__((packed)) GptEntry; |
| 104 | 103 |
| 105 #endif /* VBOOT_REFERENCE_CGPTLIB_GPT_H_ */ | 104 #endif /* VBOOT_REFERENCE_CGPTLIB_GPT_H_ */ |
| OLD | NEW |