diff mbox series

[edk2,1/6] OvmfPkg/PlatformBootManagerLib: add missing report status code call

Message ID 20180522140850.30369-2-ard.biesheuvel@linaro.org
State Superseded
Headers show
Series Abstract allocation of PEI accessible memory | expand

Commit Message

Ard Biesheuvel May 22, 2018, 2:08 p.m. UTC
Consumers of status code reports may rely on a status code to be
reported when the ReadyToBoot event is signalled. For instance,
FirmwarePerformanceDxe will fail to install the FPDT ACPI table
in this case. So add the missing call.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

---
 OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf | 1 +
 OvmfPkg/Library/PlatformBootManagerLib/QemuKernel.c               | 4 ++++
 2 files changed, 5 insertions(+)

-- 
2.17.0

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Comments

Laszlo Ersek May 22, 2018, 6:58 p.m. UTC | #1
On 05/22/18 16:08, Ard Biesheuvel wrote:
> Consumers of status code reports may rely on a status code to be

> reported when the ReadyToBoot event is signalled. For instance,

> FirmwarePerformanceDxe will fail to install the FPDT ACPI table

> in this case. So add the missing call.

> 

> Contributed-under: TianoCore Contribution Agreement 1.1

> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

> ---

>  OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf | 1 +

>  OvmfPkg/Library/PlatformBootManagerLib/QemuKernel.c               | 4 ++++

>  2 files changed, 5 insertions(+)

> 

> diff --git a/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf b/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf

> index 27789b7377bc..f10b68424b91 100644

> --- a/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf

> +++ b/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf

> @@ -55,6 +55,7 @@ [LibraryClasses]

>    QemuFwCfgS3Lib

>    LoadLinuxLib

>    QemuBootOrderLib

> +  ReportStatusCodeLib

>    UefiLib

>  

>  [Pcd]

> diff --git a/OvmfPkg/Library/PlatformBootManagerLib/QemuKernel.c b/OvmfPkg/Library/PlatformBootManagerLib/QemuKernel.c

> index ef728dfdeb60..f20df9533fda 100644

> --- a/OvmfPkg/Library/PlatformBootManagerLib/QemuKernel.c

> +++ b/OvmfPkg/Library/PlatformBootManagerLib/QemuKernel.c

> @@ -18,6 +18,7 @@

>  #include <Library/LoadLinuxLib.h>

>  #include <Library/MemoryAllocationLib.h>

>  #include <Library/QemuFwCfgLib.h>

> +#include <Library/ReportStatusCodeLib.h>

>  #include <Library/UefiBootServicesTableLib.h>

>  #include <Library/UefiLib.h>

>  

> @@ -149,6 +150,9 @@ TryRunningQemuKernel (

>    //

>    EfiSignalEventReadyToBoot();

>  

> +  REPORT_STATUS_CODE (EFI_PROGRESS_CODE,

> +    (EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_DXE_BS_PC_READY_TO_BOOT_EVENT));

> +

>    Status = LoadLinux (KernelBuf, SetupBuf);

>  

>  FreeAndReturn:

> 


Good catch!

Reviewed-by: Laszlo Ersek <lersek@redhat.com>


Laszlo
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
diff mbox series

Patch

diff --git a/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf b/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
index 27789b7377bc..f10b68424b91 100644
--- a/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
+++ b/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
@@ -55,6 +55,7 @@  [LibraryClasses]
   QemuFwCfgS3Lib
   LoadLinuxLib
   QemuBootOrderLib
+  ReportStatusCodeLib
   UefiLib
 
 [Pcd]
diff --git a/OvmfPkg/Library/PlatformBootManagerLib/QemuKernel.c b/OvmfPkg/Library/PlatformBootManagerLib/QemuKernel.c
index ef728dfdeb60..f20df9533fda 100644
--- a/OvmfPkg/Library/PlatformBootManagerLib/QemuKernel.c
+++ b/OvmfPkg/Library/PlatformBootManagerLib/QemuKernel.c
@@ -18,6 +18,7 @@ 
 #include <Library/LoadLinuxLib.h>
 #include <Library/MemoryAllocationLib.h>
 #include <Library/QemuFwCfgLib.h>
+#include <Library/ReportStatusCodeLib.h>
 #include <Library/UefiBootServicesTableLib.h>
 #include <Library/UefiLib.h>
 
@@ -149,6 +150,9 @@  TryRunningQemuKernel (
   //
   EfiSignalEventReadyToBoot();
 
+  REPORT_STATUS_CODE (EFI_PROGRESS_CODE,
+    (EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_DXE_BS_PC_READY_TO_BOOT_EVENT));
+
   Status = LoadLinux (KernelBuf, SetupBuf);
 
 FreeAndReturn: