X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=OvmfPkg%2FInclude%2FLibrary%2FQemuBootOrderLib.h;h=d17de3bb8fae2c732846b7e62b82e6727c933c78;hp=874344a95d80258e6f1d4a07e0a67fd81f9cdb7c;hb=51bd1f7699796de6a6209cc035640f2c06a5fc1b;hpb=90f09188462cc9f2166fe5690639dea5412f2ef4 diff --git a/OvmfPkg/Include/Library/QemuBootOrderLib.h b/OvmfPkg/Include/Library/QemuBootOrderLib.h index 874344a95d..d17de3bb8f 100644 --- a/OvmfPkg/Include/Library/QemuBootOrderLib.h +++ b/OvmfPkg/Include/Library/QemuBootOrderLib.h @@ -20,6 +20,41 @@ #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. @@ -29,8 +64,8 @@ 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 EfiBootManagerConnectAll () and - EfiBootManagerRefreshAllBootOption () return. + Platform BDS should call this function after connecting any expected boot + devices and calling EfiBootManagerRefreshAllBootOption (). @retval RETURN_SUCCESS BootOrder NvVar rewritten.