X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=OvmfPkg%2FInclude%2FLibrary%2FQemuBootOrderLib.h;h=d17de3bb8fae2c732846b7e62b82e6727c933c78;hp=80d02c80c260dedf683fbb68972eb36af0fe1c5a;hb=51bd1f7699796de6a6209cc035640f2c06a5fc1b;hpb=9253c14d4134da1bf3bb222fffa2b2d4880ab3cf diff --git a/OvmfPkg/Include/Library/QemuBootOrderLib.h b/OvmfPkg/Include/Library/QemuBootOrderLib.h index 80d02c80c2..d17de3bb8f 100644 --- a/OvmfPkg/Include/Library/QemuBootOrderLib.h +++ b/OvmfPkg/Include/Library/QemuBootOrderLib.h @@ -20,18 +20,52 @@ #include +/** + Connect devices based on the boot order retrieved from QEMU. + + Attempt to retrieve the "bootorder" fw_cfg file from QEMU. Translate the + OpenFirmware device paths therein to UEFI device path fragments. Connect the + devices identified by the UEFI devpath prefixes as narrowly as possible, then + connect all their child devices, recursively. + + If this function fails, then platform BDS should fall back to + EfiBootManagerConnectAll(), or some other method for connecting any expected + boot devices. + + @retval RETURN_SUCCESS The "bootorder" fw_cfg file has been + parsed, and the referenced device-subtrees + have been connected. + + @retval RETURN_UNSUPPORTED QEMU's fw_cfg is not supported. + + @retval RETURN_NOT_FOUND Empty or nonexistent "bootorder" fw_cfg + file. + + @retval RETURN_INVALID_PARAMETER Parse error in the "bootorder" fw_cfg file. + + @retval RETURN_OUT_OF_RESOURCES Memory allocation failed. + + @return Error statuses propagated from underlying + functions. +**/ +RETURN_STATUS +EFIAPI +ConnectDevicesFromQemu ( + VOID + ); + + /** Set the boot order based on configuration retrieved from QEMU. Attempt to retrieve the "bootorder" fw_cfg file from QEMU. Translate the OpenFirmware device paths therein to UEFI device path fragments. Match the - translated fragments against BootOptionList, and rewrite the BootOrder NvVar - so that it corresponds to the order described in fw_cfg. - - @param[in] BootOptionList A boot option list, created with - BdsLibEnumerateAllBootOption (). + translated fragments against the current list of boot options, and rewrite + the BootOrder NvVar so that it corresponds to the order described in fw_cfg. + Platform BDS should call this function after connecting any expected boot + devices and calling EfiBootManagerRefreshAllBootOption (). @retval RETURN_SUCCESS BootOrder NvVar rewritten. @@ -50,8 +84,9 @@ **/ RETURN_STATUS +EFIAPI SetBootOrderFromQemu ( - IN CONST LIST_ENTRY *BootOptionList + VOID ); @@ -62,6 +97,7 @@ SetBootOrderFromQemu ( @return The TimeoutDefault argument for PlatformBdsEnterFrontPage(). **/ UINT16 +EFIAPI GetFrontPageTimeoutFromQemu ( VOID );