summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/Include
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2022-07-19 17:12:48 +0200
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-09-06 16:55:33 +0000
commit5eeb088ad64124229b32a5593fada578b935e207 (patch)
treef58e93ffd1eb3120e04e70da64cd66a20497f306 /OvmfPkg/Include
parentdb463e8e9da6f19becb336645dad3718de0743d3 (diff)
downloadedk2-5eeb088ad64124229b32a5593fada578b935e207.tar.gz
edk2-5eeb088ad64124229b32a5593fada578b935e207.tar.bz2
edk2-5eeb088ad64124229b32a5593fada578b935e207.zip
OvmfPkg/QemuBootOrderLib: add StoreQemuBootOrder()
The function reads the boot order from qemu fw_cfg, translates it into device paths and stores them in 'QemuBootOrderNNNN' variables. In case there is no boot ordering configured the function will do nothing. Use case: Allow applications loaded via 'qemu -kernel bootloader.efi' obey the boot order. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'OvmfPkg/Include')
-rw-r--r--OvmfPkg/Include/Library/QemuBootOrderLib.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/OvmfPkg/Include/Library/QemuBootOrderLib.h b/OvmfPkg/Include/Library/QemuBootOrderLib.h
index 9f06439aed..f0369298a1 100644
--- a/OvmfPkg/Include/Library/QemuBootOrderLib.h
+++ b/OvmfPkg/Include/Library/QemuBootOrderLib.h
@@ -48,6 +48,20 @@ ConnectDevicesFromQemu (
);
/**
+ Write qemu boot order to uefi variables.
+
+ Attempt to retrieve the "bootorder" fw_cfg file from QEMU. Translate
+ the OpenFirmware device paths therein to UEFI device path fragments.
+
+ On Success store the device path in QemuBootOrderNNNN variables.
+**/
+VOID
+EFIAPI
+StoreQemuBootOrder (
+ VOID
+ );
+
+/**
Set the boot order based on configuration retrieved from QEMU.