]> git.baikalelectronics.ru Git - uboot.git/commit
cmd: bootefi: restore ability to boot arbitrary blob
authorKyle Evans <kevans@FreeBSD.org>
Sun, 10 Apr 2022 21:05:55 +0000 (16:05 -0500)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 23 Apr 2022 20:05:33 +0000 (22:05 +0200)
commitc81502be79ba13b12ef9c12b3efa807a415ad41d
treefcf7a5878215de29f6c5fa59fb2219ff1e410264
parent6ac897b6058a295003e48788620cb3afa8717dc5
cmd: bootefi: restore ability to boot arbitrary blob

Up until commit 5f07bb835de43 ("efi_loader: setting boot device"), we
could boot an arbitrary blob with bootefi. Indeed, efi_run_image() even
has a special case for missing device paths indicating a payload that
was directly loaded via JTAG, for example.

Restore the ability to inject a UEFI payload into memory and `bootefi`
it. If the address passed isn't the last PE-COFF loaded, then we'll
wipe out the pre-existing DP/Image information and let efi_run_image()
synthesize a memory device path.

An image size is required if we're booting an arbitrary payload, and
the FDT argument has been changed to accept `-`. The size could be
deduced from the image header, but it's required anyways as an explicit
acknowledgment that one's trying to boot an arbitrary payload rather
than accidentally using the wrong address in the single-addr form.

Fixes: 5f07bb835de4 ("efi_loader: setting boot device")
Signed-off-by: Kyle Evans <kevans@FreeBSD.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
cmd/bootefi.c