]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
Merge branch 'master' into next
authorTom Rini <trini@konsulko.com>
Mon, 19 Sep 2022 17:19:39 +0000 (13:19 -0400)
committerTom Rini <trini@konsulko.com>
Mon, 19 Sep 2022 20:07:12 +0000 (16:07 -0400)
Signed-off-by: Tom Rini <trini@konsulko.com>
28 files changed:
1  2 
.gitlab-ci.yml
MAINTAINERS
Makefile
arch/arm/Kconfig
arch/arm/dts/Makefile
board/dhelectronics/dh_stm32mp1/board.c
board/st/stm32mp1/stm32mp1.c
cmd/Kconfig
cmd/mvebu/bubt.c
cmd/ximg.c
common/Kconfig
common/console.c
configs/qemu-ppce500_defconfig
configs/stm32mp15_defconfig
disk/part.c
doc/develop/index.rst
doc/usage/index.rst
drivers/nvme/nvme.c
drivers/serial/serial_mxc.c
include/asm-generic/global_data.h
include/config_distro_bootcmd.h
include/efi_loader.h
include/image.h
lib/efi_loader/Kconfig
lib/efi_loader/efi_boottime.c
lib/efi_loader/efi_console.c
lib/efi_loader/efi_disk.c
scripts/config_whitelist.txt

diff --cc .gitlab-ci.yml
Simple merge
diff --cc MAINTAINERS
Simple merge
diff --cc Makefile
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc cmd/Kconfig
Simple merge
Simple merge
diff --cc cmd/ximg.c
Simple merge
diff --cc common/Kconfig
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc disk/part.c
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc include/image.h
Simple merge
Simple merge
Simple merge
Simple merge
index 819dcb4f131b25f653dc970ff0b7b0aa7a164fc4,5feeb52ccb49be596d0f28dc360891976968d2dc..e39968a3f37a9289a68edd8a62e2110220a8c277
@@@ -761,52 -761,19 +761,69 @@@ efi_status_t efi_disk_init(void
        return EFI_SUCCESS;
  }
  
 +/**
 + * efi_disk_get_device_name() - get U-Boot device name associated with EFI handle
 + *
 + * @handle:   pointer to the EFI handle
 + * @buf:      pointer to the buffer to store the string
 + * @size:     size of buffer
 + * Return:    status code
 + */
 +efi_status_t efi_disk_get_device_name(const efi_handle_t handle, char *buf, int size)
 +{
 +      int count;
 +      int diskid;
 +      enum uclass_id id;
 +      unsigned int part;
 +      struct udevice *dev;
 +      struct blk_desc *desc;
 +      const char *if_typename;
 +      bool is_partition = false;
 +      struct disk_part *part_data;
 +
 +      if (!handle || !buf || !size)
 +              return EFI_INVALID_PARAMETER;
 +
 +      dev = handle->dev;
 +      id = device_get_uclass_id(dev);
 +      if (id == UCLASS_BLK) {
 +              desc = dev_get_uclass_plat(dev);
 +      } else if (id == UCLASS_PARTITION) {
 +              desc = dev_get_uclass_plat(dev_get_parent(dev));
 +              is_partition = true;
 +      } else {
 +              return EFI_INVALID_PARAMETER;
 +      }
 +      if_typename = blk_get_if_type_name(desc->if_type);
 +      diskid = desc->devnum;
 +
 +      if (is_partition) {
 +              part_data = dev_get_uclass_plat(dev);
 +              part = part_data->partnum;
 +              count = snprintf(buf, size, "%s %d:%d", if_typename, diskid, part);
 +      } else {
 +              count = snprintf(buf, size, "%s %d", if_typename, diskid);
 +      }
 +
 +      if (count < 0 || (count + 1) > size)
 +              return EFI_INVALID_PARAMETER;
 +
 +      return EFI_SUCCESS;
 +}
++
+ /**
+  * efi_disks_register() - ensure all block devices are available in UEFI
+  *
+  * The function probes all block devices. As we store UEFI variables on the
+  * EFI system partition this function has to be called before enabling
+  * variable services.
+  */
+ efi_status_t efi_disks_register(void)
+ {
+       struct udevice *dev;
+       uclass_foreach_dev_probe(UCLASS_BLK, dev) {
+       }
+       return EFI_SUCCESS;
+ }
Simple merge