mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
efi_loader: fix dp_fill() for BLKMAP, HOST, VIRTIO
Do not assume that the preceding device path contains a single VenHW node. Instead use the return value of dp_fill() which provides the address of the next node. Fixes:23ad52fff4
("efi_loader: device_path: support Sandbox's "host" devices") Fixes:19ecced71c
("efi_loader: device path for virtio block devices") Fixes:272ec6b453
("efi_loader: device_path: support blkmap devices") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
This commit is contained in:
parent
4f399f277c
commit
dc7a2f1d9f
1 changed files with 3 additions and 9 deletions
|
@ -631,9 +631,7 @@ __maybe_unused static void *dp_fill(void *buf, struct udevice *dev)
|
|||
struct efi_device_path_vendor *dp;
|
||||
struct blk_desc *desc = dev_get_uclass_plat(dev);
|
||||
|
||||
dp_fill(buf, dev->parent);
|
||||
dp = buf;
|
||||
++dp;
|
||||
dp = dp_fill(buf, dev->parent);
|
||||
dp->dp.type = DEVICE_PATH_TYPE_HARDWARE_DEVICE;
|
||||
dp->dp.sub_type = DEVICE_PATH_SUB_TYPE_VENDOR;
|
||||
dp->dp.length = sizeof(*dp) + 1;
|
||||
|
@ -649,9 +647,7 @@ __maybe_unused static void *dp_fill(void *buf, struct udevice *dev)
|
|||
struct efi_device_path_vendor *dp;
|
||||
struct blk_desc *desc = dev_get_uclass_plat(dev);
|
||||
|
||||
dp_fill(buf, dev->parent);
|
||||
dp = buf;
|
||||
++dp;
|
||||
dp = dp_fill(buf, dev->parent);
|
||||
dp->dp.type = DEVICE_PATH_TYPE_HARDWARE_DEVICE;
|
||||
dp->dp.sub_type = DEVICE_PATH_SUB_TYPE_VENDOR;
|
||||
dp->dp.length = sizeof(*dp) + 1;
|
||||
|
@ -666,9 +662,7 @@ __maybe_unused static void *dp_fill(void *buf, struct udevice *dev)
|
|||
struct efi_device_path_vendor *dp;
|
||||
struct blk_desc *desc = dev_get_uclass_plat(dev);
|
||||
|
||||
dp_fill(buf, dev->parent);
|
||||
dp = buf;
|
||||
++dp;
|
||||
dp = dp_fill(buf, dev->parent);
|
||||
dp->dp.type = DEVICE_PATH_TYPE_HARDWARE_DEVICE;
|
||||
dp->dp.sub_type = DEVICE_PATH_SUB_TYPE_VENDOR;
|
||||
dp->dp.length = sizeof(*dp) + 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue