Lines Matching refs:gpt_head
199 ALLOC_CACHE_ALIGN_BUFFER_PAD(gpt_header, gpt_head, 1, dev_desc->blksz); in get_disk_guid()
205 gpt_head, &gpt_pte) != 1) { in get_disk_guid()
208 gpt_head, &gpt_pte) != 1) { in get_disk_guid()
218 guid_bin = gpt_head->disk_guid.b; in get_disk_guid()
226 ALLOC_CACHE_ALIGN_BUFFER_PAD(gpt_header, gpt_head, 1, dev_desc->blksz); in part_print_efi()
234 gpt_head, &gpt_pte) != 1) { in part_print_efi()
237 gpt_head, &gpt_pte) != 1) { in part_print_efi()
254 for (i = 0; i < le32_to_cpu(gpt_head->num_partition_entries); i++) { in part_print_efi()
285 static gpt_header *gpt_head = NULL; in part_get_info_efi() local
287 if (!gpt_head) in part_get_info_efi()
288 gpt_head = memalign(ARCH_DMA_MINALIGN, dev_desc->blksz); in part_get_info_efi()
294 if (gpt_head && (gpt_head->last_usable_lba + 0x22) != dev_desc->lba) { in part_get_info_efi()
308 gpt_head, &gpt_pte) != 1) { in part_get_info_efi()
311 gpt_head, &gpt_pte) != 1) { in part_get_info_efi()
321 if (part > le32_to_cpu(gpt_head->num_partition_entries) || in part_get_info_efi()
358 gpt_header *gpt_head) in gpt_entry_modify() argument
363 for (i = 0; i < gpt_head->num_partition_entries; i++) { in gpt_entry_modify()
373 le32_to_cpu(gpt_head->num_partition_entries) * in gpt_entry_modify()
374 le32_to_cpu(gpt_head->sizeof_partition_entry)); in gpt_entry_modify()
375 gpt_head->partition_entry_array_crc32 = calc_crc32; in gpt_entry_modify()
379 gpt_header *gpt_head, int head_gpt_valid, in part_efi_repair() argument
391 gpt_head->header_crc32 = 0; in part_efi_repair()
392 gpt_head->my_lba = dev_desc->lba - 1; in part_efi_repair()
393 gpt_head->alternate_lba = 1; in part_efi_repair()
394 gpt_head->partition_entry_lba = dev_desc->lba - 0x21; in part_efi_repair()
395 gpt_head->last_usable_lba = cpu_to_le64(dev_desc->lba - 34); in part_efi_repair()
396 gpt_entry_modify(dev_desc, gpt_pte, gpt_head); in part_efi_repair()
397 calc_crc32 = efi_crc32((const unsigned char *)gpt_head, in part_efi_repair()
398 le32_to_cpu(gpt_head->header_size)); in part_efi_repair()
399 gpt_head->header_crc32 = calc_crc32; in part_efi_repair()
400 if (blk_dwrite(dev_desc, dev_desc->lba - 1, 1, gpt_head) != 1) { in part_efi_repair()
404 count = le32_to_cpu(gpt_head->num_partition_entries) * in part_efi_repair()
405 le32_to_cpu(gpt_head->sizeof_partition_entry); in part_efi_repair()
406 blk = le64_to_cpu(gpt_head->partition_entry_lba); in part_efi_repair()
415 gpt_head->header_crc32 = 0; in part_efi_repair()
416 gpt_head->my_lba = 1; in part_efi_repair()
417 gpt_head->alternate_lba = dev_desc->lba - 1; in part_efi_repair()
418 gpt_head->partition_entry_lba = 0x2; in part_efi_repair()
419 gpt_head->last_usable_lba = cpu_to_le64(dev_desc->lba - 34); in part_efi_repair()
420 gpt_entry_modify(dev_desc, gpt_pte, gpt_head); in part_efi_repair()
421 calc_crc32 = efi_crc32((const unsigned char *)gpt_head, in part_efi_repair()
422 le32_to_cpu(gpt_head->header_size)); in part_efi_repair()
423 gpt_head->header_crc32 = calc_crc32; in part_efi_repair()
424 if (blk_dwrite(dev_desc, 1, 1, gpt_head) != 1) { in part_efi_repair()
428 count = le32_to_cpu(gpt_head->num_partition_entries) * in part_efi_repair()
429 le32_to_cpu(gpt_head->sizeof_partition_entry); in part_efi_repair()
430 blk = le64_to_cpu(gpt_head->partition_entry_lba); in part_efi_repair()
854 int gpt_verify_headers(struct blk_desc *dev_desc, gpt_header *gpt_head, in gpt_verify_headers() argument
863 gpt_head, gpt_pte) != 1) { in gpt_verify_headers()
869 gpt_head, gpt_pte) != 1) { in gpt_verify_headers()
880 gpt_header *gpt_head, gpt_entry **gpt_pte) in gpt_verify_partitions() argument
887 ret = gpt_verify_headers(dev_desc, gpt_head, gpt_pte); in gpt_verify_partitions()
894 if (i == gpt_head->num_partition_entries) { in gpt_verify_partitions()