Merge tag 'efi-2022-04-rc1-2' of https://source.denx.de/u-boot/custodians/u-boot-efi
authorTom Rini <trini@konsulko.com>
Sat, 22 Jan 2022 20:43:36 +0000 (15:43 -0500)
committerTom Rini <trini@konsulko.com>
Sat, 22 Jan 2022 20:43:36 +0000 (15:43 -0500)
Pull request for efi-2022-04-rc1-2

Documentation:

* describe printf() format codes

UEFI

* enable more algorithms for UEFI image verification, e.g. SHA256-RSA2048

General

* simplify printing short texts for GUIDs
* provide a unit test for printing GUIDs

1  2 
arch/Kconfig
disk/part_efi.c

diff --combined arch/Kconfig
@@@ -175,6 -175,7 +175,7 @@@ config SANDBO
        imply AVB_VERIFY
        imply LIBAVB
        imply CMD_AVB
+       imply PARTITION_TYPE_GUID
        imply SCP03
        imply CMD_SCP03
        imply UDP_FUNCTION_FASTBOOT
@@@ -256,7 -257,6 +257,7 @@@ config X8
        imply ACPIGEN if !QEMU
        imply SYSINFO if GENERATE_SMBIOS_TABLE
        imply SYSINFO_SMBIOS if GENERATE_SMBIOS_TABLE
 +      imply TIMESTAMP
  
        # Thing to enable for when SPL/TPL are enabled: SPL
        imply SPL_DM
diff --combined disk/part_efi.c
@@@ -221,8 -221,7 +221,7 @@@ void part_print_efi(struct blk_desc *de
        ALLOC_CACHE_ALIGN_BUFFER_PAD(gpt_header, gpt_head, 1, dev_desc->blksz);
        gpt_entry *gpt_pte = NULL;
        int i = 0;
-       char uuid[UUID_STR_LEN + 1];
-       unsigned char *uuid_bin;
+       unsigned char *uuid;
  
        /* This function validates AND fills in the GPT header and PTE */
        if (find_valid_gpt(dev_desc, gpt_head, &gpt_pte) != 1)
                        le64_to_cpu(gpt_pte[i].ending_lba),
                        print_efiname(&gpt_pte[i]));
                printf("\tattrs:\t0x%016llx\n", gpt_pte[i].attributes.raw);
-               uuid_bin = (unsigned char *)gpt_pte[i].partition_type_guid.b;
-               uuid_bin_to_str(uuid_bin, uuid, UUID_STR_FORMAT_GUID);
-               printf("\ttype:\t%s\n", uuid);
-               if (CONFIG_IS_ENABLED(PARTITION_TYPE_GUID)) {
-                       const char *type = uuid_guid_get_str(uuid_bin);
-                       if (type)
-                               printf("\ttype:\t%s\n", type);
-               }
-               uuid_bin = (unsigned char *)gpt_pte[i].unique_partition_guid.b;
-               uuid_bin_to_str(uuid_bin, uuid, UUID_STR_FORMAT_GUID);
-               printf("\tguid:\t%s\n", uuid);
+               uuid = (unsigned char *)gpt_pte[i].partition_type_guid.b;
+               if (CONFIG_IS_ENABLED(PARTITION_TYPE_GUID))
+                       printf("\ttype:\t%pUl\n\t\t(%pUs)\n", uuid, uuid);
+               else
+                       printf("\ttype:\t%pUl\n", uuid);
+               uuid = (unsigned char *)gpt_pte[i].unique_partition_guid.b;
+               printf("\tguid:\t%pUl\n", uuid);
        }
  
        /* Remember to free pte */
@@@ -331,7 -326,7 +326,7 @@@ static int part_test_efi(struct blk_des
   * set_protective_mbr(): Set the EFI protective MBR
   * @param dev_desc - block device descriptor
   *
 - * @return - zero on success, otherwise error
 + * Return: - zero on success, otherwise error
   */
  static int set_protective_mbr(struct blk_desc *dev_desc)
  {