]> git.dujemihanovic.xyz Git - u-boot.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)
commitc227ef7c4aca1a26e59640a46950b20bdc80f1b8
tree8b8f6102b57607f2f494ecbae31c5ae28b8fa104
parent771d7cd8c5f78df9b52225d6f18b4d07e2e9e483
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