]> git.baikalelectronics.ru Git - uboot.git/commit
efi_loader: device paths for special block devices
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Thu, 20 Jul 2023 22:03:46 +0000 (00:03 +0200)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Fri, 28 Jul 2023 09:36:37 +0000 (11:36 +0200)
commitb28fedc4df4eb014c65301579eaa97ea6e5c9ded
tree8b8f6102b57607f2f494ecbae31c5ae28b8fa104
parent1c31827d82a6ebc7147e4feeffa5b6a6c796e9ad
efi_loader: device paths for special block devices

The UEFI specification does not provide node types matching UCLASS_BLKMAP,
UCLASS_HOST, UCLASS_VIRTIO block devices.

The current implementation uses VenHw() nodes with uclass specific GUIDs
and a single byte for the device number appended. This leads to unaligned
integers in succeeding device path nodes.

The current implementation fails to create unique device paths for block
devices based on other uclasses like UCLASS_PVBLOCK.

Let's use a VenHw() node with the U-Boot GUID with a length dividable by
four and encoding blkdesc->uclass_id as well as  blkdesc->devnum.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
lib/efi_loader/efi_device_path.c