Lines Matching full:gpt
84 /* Check the GPT header signature */ in validate_gpt_header()
110 * Check that the my_lba entry points to the LBA that contains the GPT in validate_gpt_header()
113 printf("GPT: my_lba incorrect: %llX != " LBAF "\n", in validate_gpt_header()
124 printf("GPT: first_usable_lba incorrect: %llX > " LBAF "\n", in validate_gpt_header()
129 printf("GPT: last_usable_lba incorrect: %llX > " LBAF "\n", in validate_gpt_header()
134 debug("GPT: first_usable_lba: %llX last_usable_lba: %llX last lba: " in validate_gpt_header()
166 /* recalculate the values for the Backup GPT Header */ in prepare_backup_gpt_header()
194 /* This function validates AND fills in the GPT header and PTE */ in get_disk_guid()
197 printf("%s: *** ERROR: Invalid GPT ***\n", __func__); in get_disk_guid()
200 printf("%s: *** ERROR: Invalid Backup GPT ***\n", in get_disk_guid()
204 printf("%s: *** Using Backup GPT ***\n", in get_disk_guid()
223 /* This function validates AND fills in the GPT header and PTE */ in part_print_efi()
226 printf("%s: *** ERROR: Invalid GPT ***\n", __func__); in part_print_efi()
229 printf("%s: *** ERROR: Invalid Backup GPT ***\n", in part_print_efi()
233 printf("%s: *** Using Backup GPT ***\n", in part_print_efi()
238 debug("%s: gpt-entry at %p\n", __func__, gpt_pte); in part_print_efi()
284 /* This function validates AND fills in the GPT header and PTE */ in part_get_info_efi()
287 printf("%s: *** ERROR: Invalid GPT ***\n", __func__); in part_get_info_efi()
290 printf("%s: *** ERROR: Invalid Backup GPT ***\n", in part_get_info_efi()
294 printf("%s: *** Using Backup GPT ***\n", in part_get_info_efi()
400 /* Generate CRC for the Primary GPT Header */ in write_gpt_table()
410 /* Write the First GPT to the block right after the Legacy MBR */ in write_gpt_table()
428 debug("GPT successfully written to block device!\n"); in write_gpt_table()
474 * If our partition overlaps with either the GPT in gpt_fill_pte()
595 * the (protective) MBR and the GPT header. in partition_entries_offset()
652 /* Generate Primary GPT header (LBA1) */ in gpt_restore()
662 /* Write GPT partition table */ in gpt_restore()
690 * fills in the GPT header and PTE in gpt_verify_headers()
695 printf("%s: *** ERROR: Invalid GPT ***\n", in gpt_verify_headers()
701 printf("%s: *** ERROR: Invalid Backup GPT ***\n", in gpt_verify_headers()
730 /* Check if GPT and ENV partition names match */ in gpt_verify_partitions()
734 debug("%s: part: %2d name - GPT: %16s, ENV: %16s ", in gpt_verify_partitions()
744 /* Check if GPT and ENV sizes match */ in gpt_verify_partitions()
747 debug("size(LBA) - GPT: %8llu, ENV: %8llu ", in gpt_verify_partitions()
771 /* Check if GPT and ENV start LBAs match */ in gpt_verify_partitions()
772 debug("start LBA - GPT: %8llu, ENV: %8llu\n", in gpt_verify_partitions()
792 /* determine start of GPT Header in the buffer */ in is_valid_gpt_buf()
799 /* determine start of GPT Entries in the buffer */ in is_valid_gpt_buf()
819 /* determine start of GPT Header in the buffer */ in write_mbr_and_gpt_partitions()
823 /* determine start of GPT Entries in the buffer */ in write_mbr_and_gpt_partitions()
839 /* write Primary GPT */ in write_mbr_and_gpt_partitions()
841 cnt = 1; /* GPT Header (1 block) */ in write_mbr_and_gpt_partitions()
844 __func__, "Primary GPT Header", cnt, lba); in write_mbr_and_gpt_partitions()
852 __func__, "Primary GPT Entries", cnt, lba); in write_mbr_and_gpt_partitions()
858 /* write Backup GPT */ in write_mbr_and_gpt_partitions()
863 __func__, "Backup GPT Entries", cnt, lba); in write_mbr_and_gpt_partitions()
868 cnt = 1; /* GPT Header (1 block) */ in write_mbr_and_gpt_partitions()
871 __func__, "Backup GPT Header", cnt, lba); in write_mbr_and_gpt_partitions()
885 * Returns: 1 if EFI GPT partition type is found.
921 * is_gpt_valid() - tests one GPT header and PTEs for validity
923 * lba is the logical block address of the GPT header to test
924 * gpt is a GPT header ptr, filled on return.
947 /* Read GPT Header from device */ in is_gpt_valid()
949 printf("*** ERROR: Can't read GPT header ***\n"); in is_gpt_valid()
971 printf("GPT: Failed to allocate memory for PTE\n"); in is_gpt_valid()
987 * @gpt - GPT header
990 * Allocates space for PTEs based on information found in @gpt.
1020 printf("%s: ERROR: Can't allocate %#lX bytes for GPT Entries\n", in alloc_read_gpt_entries()
1025 /* Read GPT Entries from device */ in alloc_read_gpt_entries()
1029 printf("*** ERROR: Can't read GPT Entries ***\n"); in alloc_read_gpt_entries()