/external/vboot_reference/tests/ |
cgptlib_test.c | 14 #include "gpt.h" 72 static void RefreshCrc32(GptData *gpt) 77 header = (GptHeader *)gpt->primary_header; 78 entries = (GptEntry *)gpt->primary_entries; 79 header2 = (GptHeader *)gpt->secondary_header; 80 entries2 = (GptEntry *)gpt->secondary_entries; 94 static void ZeroHeaders(GptData *gpt) 96 Memset(gpt->primary_header, 0, MAX_SECTOR_SIZE); 97 Memset(gpt->secondary_header, 0, MAX_SECTOR_SIZE); 100 static void ZeroEntries(GptData *gpt) 119 static GptData gpt; local 222 GptData *gpt; local 240 GptData *gpt; local 271 GptData *gpt = GetEmptyGptData(); local 298 GptData *gpt = GetEmptyGptData(); local 351 GptData *gpt = GetEmptyGptData(); local 376 GptData *gpt = GetEmptyGptData(); local 408 GptData *gpt = GetEmptyGptData(); local 442 GptData *gpt = GetEmptyGptData(); local 463 GptData *gpt = GetEmptyGptData(); local 492 GptData *gpt = GetEmptyGptData(); local 534 GptData *gpt = GetEmptyGptData(); local 557 GptData *gpt = GetEmptyGptData(); local 627 GptData *gpt = GetEmptyGptData(); local 679 GptData *gpt = GetEmptyGptData(); local 705 GptData *gpt = GetEmptyGptData(); local 739 GptData *gpt = GetEmptyGptData(); local 816 GptData *gpt = GetEmptyGptData(); local 1037 GptData *gpt = GetEmptyGptData(); local 1082 GptData *gpt = GetEmptyGptData(); local 1122 GptData *gpt = GetEmptyGptData(); local 1137 GptData *gpt = GetEmptyGptData(); local 1172 GptData *gpt = GetEmptyGptData(); local 1199 GptData *gpt = GetEmptyGptData(); local 1224 GptData *gpt = GetEmptyGptData(); local 1316 GptData *gpt = GetEmptyGptData(); local 1331 GptData *gpt = GetEmptyGptData(); local 1390 GptData *gpt = GetEmptyGptData(); local 1424 GptData* gpt = GetEmptyGptData(); local [all...] |
/external/vboot_reference/cgpt/ |
cgpt_repair.c | 22 int gpt_retval = GptSanityCheck(&drive.gpt); 27 GptRepair(&drive.gpt); 28 if (drive.gpt.modified & GPT_MODIFIED_HEADER1) 30 if (drive.gpt.modified & GPT_MODIFIED_ENTRIES1) 32 if (drive.gpt.modified & GPT_MODIFIED_ENTRIES2) 34 if (drive.gpt.modified & GPT_MODIFIED_HEADER2)
|
cgpt_create.c | 26 // We cannot assume the GPT headers or entry arrays have been allocated 28 AllocAndClear(&drive->gpt.primary_header, 29 drive->gpt.sector_bytes * GPT_HEADER_SECTORS); 30 AllocAndClear(&drive->gpt.secondary_header, 31 drive->gpt.sector_bytes * GPT_HEADER_SECTORS); 33 drive->gpt.modified |= (GPT_MODIFIED_HEADER1 | GPT_MODIFIED_ENTRIES1 | 38 GptHeader *h = (GptHeader *)drive->gpt.primary_header; 43 h->alternate_lba = drive->gpt.gpt_drive_sectors - GPT_HEADER_SECTORS; 52 if (drive->gpt.flags & GPT_FLAG_EXTERNAL) { 53 // We might have smaller space for the GPT table. Scale accordingly [all...] |
cgpt_legacy.c | 22 h1 = (GptHeader *)drive.gpt.primary_header; 23 h2 = (GptHeader *)drive.gpt.secondary_header; 27 RepairEntries(&drive.gpt, MASK_SECONDARY); 28 drive.gpt.modified |= (GPT_MODIFIED_HEADER1 | GPT_MODIFIED_ENTRIES1 | 33 memset(drive.gpt.primary_entries, 0, drive.gpt.sector_bytes); 34 drive.gpt.modified |= (GPT_MODIFIED_HEADER1 | GPT_MODIFIED_ENTRIES1 | 38 UpdateCrc(&drive.gpt);
|
cgpt_common.c | 5 * Utility for ChromeOS-specific GPT partitions, Please see corresponding .c 55 if ((drive->gpt.valid_headers != MASK_BOTH) || 56 (drive->gpt.valid_entries != MASK_BOTH)) { 57 Warning("One of the GPT headers/entries is invalid\n\n"); 149 drive->gpt.sector_bytes = sector_bytes; 150 if (drive->size % drive->gpt.sector_bytes) { 152 (long long unsigned int)drive->size, drive->gpt.sector_bytes); 155 drive->gpt.streaming_drive_sectors = drive->size / drive->gpt.sector_bytes; 158 if (!(drive->gpt.flags & GPT_FLAG_EXTERNAL)) [all...] |
cgpt_show.c | 149 entry = GetEntry(&drive->gpt, secondary, i); 160 if (GPT_SUCCESS != (gpt_retval = GptSanityCheck(&drive->gpt))) { 174 GptEntry *entry = GetEntry(&drive->gpt, ANY_VALID, index); 227 entry = GetEntry(&drive->gpt, ANY_VALID, i); 253 if (drive->gpt.valid_headers & MASK_PRIMARY) { 255 (int)GPT_HEADER_SECTORS, "", "Pri GPT header"); 258 (int)GPT_HEADER_SECTORS, "INVALID", "Pri GPT header"); 262 ((drive->gpt.valid_headers & MASK_PRIMARY) && params->verbose)) { 267 header = (GptHeader*)drive->gpt.primary_header; 268 entries = (GptEntry*)drive->gpt.primary_entries [all...] |
cgpt_boot.c | 27 if (GPT_SUCCESS != (gpt_retval = GptSanityCheck(&drive.gpt))) { 46 GptEntry *entry = GetEntry(&drive.gpt, ANY_VALID, i); 102 if (drive.gpt.streaming_drive_sectors < 0xffffffff) 103 max = drive.gpt.streaming_drive_sectors - 1; 108 if (GPT_SUCCESS != (gpt_retval = GptSanityCheck(&drive.gpt))) { 120 GptEntry *entry = GetEntry(&drive.gpt, ANY_VALID, index);
|
cgpt.h | 17 #include "gpt.h" 44 // Handle to the drive storing the GPT. 47 GptData gpt; member in struct:drive 52 // Opens a block device or file, loads raw GPT data from it. 54 // If 'drive_size' is 0, both the partitions and GPT structs reside on the same 57 // partitions will reside on, and 'drive_path' is where we store GPT structs. 143 /* Helper functions for supported GPT types. */ 150 GptEntry *GetEntry(GptData *gpt, int secondary, uint32_t entry_index); 167 uint8_t RepairHeader(GptData *gpt, const uint32_t valid_headers); 168 uint8_t RepairEntries(GptData *gpt, const uint32_t valid_entries) [all...] |
cgpt_add.c | 73 entry = GetEntry(&drive->gpt, PRIMARY, index); 131 if (GPT_SUCCESS != (gpt_retval = GptSanityCheck(&drive->gpt))) { 137 if (((drive->gpt.valid_headers & MASK_BOTH) != MASK_BOTH) || 138 ((drive->gpt.valid_entries & MASK_BOTH) != MASK_BOTH)) { 139 Error("one of the GPT header/entries is invalid.\n" 236 GptEntry *entry = GetEntry(&drive.gpt, PRIMARY, index); 249 // GPT-specific code 250 GptEntry *entry = GetEntry(&drive.gpt, PRIMARY, index); 271 entry = GetEntry(&drive->gpt, PRIMARY, index); 282 rv = CheckEntries((GptEntry*)drive->gpt.primary_entries [all...] |
/external/vboot_reference/firmware/lib/cgptlib/include/ |
cgptlib.h | 18 * kernel partition in LBA sectors. gpt.current_kernel contains the partition 23 int GptNextKernelEntry(GptData *gpt, uint64_t *start_sector, uint64_t *size);
|
cgptlib_internal.h | 11 #include "gpt.h" 14 * If gpt->current_kernel is this value, means either: 15 * 1. an initial value before scanning GPT entries, 21 * Bit definitions and masks for GPT attributes. 48 /* Defines ChromeOS-specific limitation on GPT */ 57 /* Defines GPT sizes */ 81 int CheckParameters(GptData* gpt); 117 * If successful, sets gpt->valid_headers and gpt->valid_entries and returns 122 int GptSanityCheck(GptData *gpt); [all...] |
/external/vboot_reference/firmware/lib/cgptlib/ |
cgptlib.c | 11 #include "gpt.h" 15 int GptInit(GptData *gpt) 19 gpt->modified = 0; 20 gpt->current_kernel = CGPT_KERNEL_ENTRY_NOT_FOUND; 21 gpt->current_priority = 999; 23 retval = GptSanityCheck(gpt); 29 GptRepair(gpt); 33 int GptNextKernelEntry(GptData *gpt, uint64_t *start_sector, uint64_t *size) 35 GptHeader *header = (GptHeader *)gpt->primary_header; 36 GptEntry *entries = (GptEntry *)gpt->primary_entries [all...] |
cgptlib_internal.c | 11 #include "gpt.h" 23 int CheckParameters(GptData *gpt) 26 if (gpt->sector_bytes != SECTOR_SIZE) 31 * cannot differ from streaming_drive_sectors if the GPT structs are 34 if (gpt->gpt_drive_sectors == 0 || 35 (!(gpt->flags & GPT_FLAG_EXTERNAL) && 36 gpt->gpt_drive_sectors != gpt->streaming_drive_sectors)) { 42 * too small to contain basic GPT structure (PMBR + Headers + Entries), 45 if (gpt->gpt_drive_sectors [all...] |
/external/vboot_reference/firmware/include/ |
gpt_misc.h | 9 #include "gpt.h" 39 * because those are what verified boot needs. For more precise control on GPT 55 * its GPT entry is marked with S1,P1,T15. 60 * its GPT entry is marked with S0,P0,T0. 65 /* If this bit is 1, the GPT is stored in another from the streaming data */ 73 * gpt_drive_sectors, but it does do a memset(gpt, 0, sizeof(GptData)). And so, 83 /* GPT primary header, from sector 1 of disk (size: 512 bytes) */ 85 /* GPT secondary header, from last sector of disk (size: 512 bytes) */ 87 /* Primary GPT table, follows primary header (size: 16 KB) */ 89 /* Secondary GPT table, precedes secondary header (size: 16 KB) * [all...] |
/device/google/marlin/recovery/gpt-utils/ |
Android.mk | 20 LOCAL_SRC_FILES := gpt-utils.cpp 31 LOCAL_SRC_FILES := gpt-utils.cpp
|
/external/autotest/server/site_tests/kernel_IgnoreGptOptionServer/ |
kernel_IgnoreGptOptionServer.py | 9 """Test to check that the kernel is ignoring the cmd line option 'gpt'. 15 # Check if gpt option is present on the command line. 17 host.run('cat /proc/cmdline | grep -E "( gpt)|(gpt )"') 19 raise error.TestNAError('No need to check that "gpt" is ignored ' 26 msg = 'Not forcing GPT even though \'gpt\' specified on cmd line.' 29 raise error.TestFail('The option "gpt" not ignored by the kernel.')
|
/external/vboot_reference/firmware/lib/ |
vboot_kernel.c | 40 GptData gpt; local 117 /* Read GPT data */ 118 gpt.sector_bytes = (uint32_t)blba; 119 gpt.streaming_drive_sectors = params->streaming_lba_count; 120 gpt.gpt_drive_sectors = params->gpt_lba_count; 121 gpt.flags = params->boot_flags & BOOT_FLAG_EXTERNAL_GPT 123 if (0 != AllocAndReadGptData(params->disk_handle, &gpt)) { 124 VBDEBUG(("Unable to read GPT data\n")); 129 /* Initialize GPT library */ 130 if (GPT_SUCCESS != GptInit(&gpt)) { [all...] |
/external/syslinux/com32/lib/syslinux/ |
disk.c | 412 * portions of a GPT disk/partition GUID for a string representation. 521 * Display GPT partition details. 523 * @v gpt_part The GPT partition entry to display 531 "GPT part. LBA first __ : 0x%.16llx\n" 532 "GPT part. LBA last ___ : 0x%.16llx\n" 533 "GPT part. attribs ____ : 0x%.16llx\n" 534 "GPT part. name _______ : '", 542 dprintf("GPT part. type GUID __ : {%s}\n", guid_text); 544 dprintf("GPT part. unique ID __ : {%s}\n", guid_text); 548 * Display GPT header details [all...] |
/hardware/qcom/bootctrl/ |
Android.mk | 9 LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/gpt-utils/inc 22 LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/gpt-utils/inc
|
/external/syslinux/com32/chain/ |
partiter.c | 122 /* pi_gpt_ctor() - GPT iterator specific initialization */ 142 iter->gpt.pe_count = (int)gpth->part_count; 143 iter->gpt.pe_size = (int)gpth->part_size; 144 iter->gpt.ufirst = gpth->lba_first_usable; 145 iter->gpt.ulast = gpth->lba_last_usable; 147 memcpy(&iter->gpt.disk_guid, &gpth->disk_guid, sizeof gpth->disk_guid); 148 memcpy(&iter->gpt.part_guid, &gpth->disk_guid, sizeof gpth->disk_guid); 266 (iter->data + iter->index0 * iter->gpt.pe_size); 274 if (gp->lba_first < iter->gpt.ufirst || 275 gp->lba_last > iter->gpt.ulast) [all...] |
partiter.h | 95 } gpt; member in union:part_iter::__anon31786
|
/external/gptfdisk/ |
Android.mk | 13 gpt.cc \
|
Makefile | 7 LIB_NAMES=crc32 support guid gptpart mbrpart basicmbr mbr gpt bsd parttypes attributes diskio diskio-unix
|
fixparts.cc | 10 // Based on C++ classes originally created for GPT fdisk (gdisk and sgdisk) 52 // This switch() statement weeds out disks with GPT signatures and non-MBR 55 case hybrid: case gpt: 56 cerr << "\nThis disk appears to be a GPT disk. Use GNU Parted or GPT fdisk on it!\n"; 77 // GPT data (note this is different from the earlier check; this one only 78 // looks for the GPT signatures in the main and backup GPT area, not for 88 cout << "\nNOTICE: GPT signatures detected on the disk, but no 0xEE protective " 89 << "partition!\nThe GPT signatures are probably left over from a previous [all...] |
sgdisk.cc | 30 * DISK [mbr|gpt] [guid] 61 case gpt: 64 cerr << "Failed to read GPT" << endl; 68 res << "DISK gpt " << gptData.GetDiskGUID() << endl;
|