• Home
  • Raw
  • Download

Lines Matching +full:image +full:- +full:based

2  * Copyright (c) 2016-2023, Arm Limited and Contributors. All rights reserved.
4 * SPDX-License-Identifier: BSD-3-Clause
33 for (j = 0; j < EFI_NAMELEN - len - 1; j++) { in dump_entries()
36 name[EFI_NAMELEN - 1] = '\0'; in dump_entries()
37 VERBOSE("%d: %s %" PRIx64 "-%" PRIx64 "\n", i + 1, name, list.list[i].start, in dump_entries()
38 list.list[i].start + list.list[i].length - 4); in dump_entries()
70 if ((mbr_sector[LEGACY_PARTITION_BLOCK_SIZE - 2] != MBR_SIGNATURE_FIRST) || in load_mbr_header()
71 (mbr_sector[LEGACY_PARTITION_BLOCK_SIZE - 1] != MBR_SIGNATURE_SECOND)) { in load_mbr_header()
73 return -ENOENT; in load_mbr_header()
78 if (tmp->first_lba != 1) { in load_mbr_header()
80 return -EINVAL; in load_mbr_header()
83 if ((tmp->sector_nums == 0) || (tmp->sector_nums == UINT32_MAX)) { in load_mbr_header()
85 return -EINVAL; in load_mbr_header()
106 VERBOSE("Failed to seek into the GPT image at offset (%zu)\n", in load_gpt_header()
121 return -EINVAL; in load_gpt_header()
127 * 32-bit CRC for HeaderSize bytes. in load_gpt_header()
136 return -EINVAL; in load_gpt_header()
152 * Load a single MBR entry based on details from MBR header.
176 if ((mbr_sector[LEGACY_PARTITION_BLOCK_SIZE - 2] != MBR_SIGNATURE_FIRST) || in load_mbr_entry()
177 (mbr_sector[LEGACY_PARTITION_BLOCK_SIZE - 1] != MBR_SIGNATURE_SECOND)) { in load_mbr_entry()
179 return -ENOENT; in load_mbr_entry()
190 * Load MBR entries based on max number of partition entries.
224 return -EINVAL; in load_gpt_entry()
263 return -EINVAL; in load_partition_gpt()
276 * Try retrieving and parsing the backup-GPT header and backup GPT entries.
277 * Last 33 blocks contains the backup-GPT entries and header.
290 VERBOSE("Failed to obtain reference to image id=%u (%i)\n", in load_backup_gpt()
298 * try mapping only last 33 last blocks from the image to read the in load_backup_gpt()
299 * Backup-GPT header and its entries. in load_backup_gpt()
302 /* Move the offset base to LBA-33 */ in load_backup_gpt()
303 block_spec->offset += LBA(sector_nums - part_num_entries); in load_backup_gpt()
305 * Set length as LBA-33, 32 blocks of backup-GPT entries and one in load_backup_gpt()
306 * block of backup-GPT header. in load_backup_gpt()
308 block_spec->length = LBA(part_num_entries + 1); in load_backup_gpt()
312 VERBOSE("Failed to access image id (%i)\n", result); in load_backup_gpt()
316 INFO("Trying to retrieve back-up GPT header\n"); in load_backup_gpt()
317 /* Last block is backup-GPT header, after the end of GPT entries */ in load_backup_gpt()
327 * Note we mapped last 33 blocks(LBA-33), first block here starts with in load_backup_gpt()
353 "trying to retrieve back-up GPT header\n"); in load_primary_gpt()
361 * Load the partition table info based on the image id provided.
371 VERBOSE("Failed to obtain reference to image id=%u (%i)\n", in load_partition_table()
378 VERBOSE("Failed to access image id=%u (%i)\n", image_id, result); in load_partition_table()
384 VERBOSE("Failed to access image id=%u (%i)\n", image_id, result); in load_partition_table()
404 * Try retrieving a partition table entry based on the name of the partition.
419 * Try retrieving a partition table entry based on the GUID.
435 * Try retrieving a partition table entry based on the UUID.
459 * Try loading partition table info for the given image ID.
467 ERROR("Failed to parse partition with image id = %u\n", in partition_init()
473 * Load a GPT based image.