2021-11-29 13:29:46 +00:00
|
|
|
From 11a79ac24d7411c8ad9d8a6779b324c5164e06d0 Mon Sep 17 00:00:00 2001
|
2021-07-15 17:34:57 +00:00
|
|
|
From: Laszlo Ersek <lersek@redhat.com>
|
|
|
|
Date: Wed, 24 Jun 2020 11:31:36 +0200
|
2021-11-29 13:29:46 +00:00
|
|
|
Subject: [PATCH 19/20] OvmfPkg/QemuKernelLoaderFsDxe: suppress error on no
|
|
|
|
"-kernel" in silent aa64 build (RH)
|
2021-07-15 17:34:57 +00:00
|
|
|
|
|
|
|
Notes about the RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] ->
|
|
|
|
RHEL-8.5/20210520-e1999b264f1f [edk2-stable202105] rebase:
|
|
|
|
|
|
|
|
- Remove obsolete commit message tags related to downstream patch
|
|
|
|
management: Message-id, Patchwork-id, O-Subject, Acked-by, From,
|
|
|
|
RH-Acked-by, RH-Author (RHBZ#1846481).
|
|
|
|
|
|
|
|
Bugzilla: 1844682
|
|
|
|
|
|
|
|
If the "-kernel" QEMU option is not used, then QemuKernelLoaderFsDxe
|
|
|
|
should return EFI_NOT_FOUND, so that the DXE Core can unload it. However,
|
|
|
|
the associated error message, logged by the DXE Core to the serial
|
|
|
|
console, is not desired in the silent edk2-aarch64 build, given that the
|
|
|
|
absence of "-kernel" is nothing out of the ordinary. Therefore, return
|
|
|
|
success and stay resident. The wasted guest RAM still gets freed after
|
|
|
|
ExitBootServices().
|
|
|
|
|
|
|
|
(Inspired by RHEL-8.1.0 commit aaaedc1e2cfd.)
|
|
|
|
|
|
|
|
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
|
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
|
(cherry picked from commit 9adcdf493ebbd11efb74e2905ab5f6c8996e096d)
|
|
|
|
---
|
|
|
|
.../QemuKernelLoaderFsDxe.inf | 1 +
|
2021-11-29 13:29:46 +00:00
|
|
|
.../QemuKernelLoaderFsDxe.c | 17 +++++++++++++++++
|
2021-07-15 17:34:57 +00:00
|
|
|
2 files changed, 18 insertions(+)
|
|
|
|
|
2021-11-29 13:29:46 +00:00
|
|
|
diff --git a/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.inf b/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.inf
|
|
|
|
index 7b35adb8e034..e0331c6e2cbc 100644
|
|
|
|
--- a/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.inf
|
|
|
|
+++ b/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.inf
|
|
|
|
@@ -28,6 +28,7 @@ [LibraryClasses]
|
|
|
|
BaseLib
|
|
|
|
BaseMemoryLib
|
|
|
|
DebugLib
|
|
|
|
+ DebugPrintErrorLevelLib
|
|
|
|
DevicePathLib
|
|
|
|
MemoryAllocationLib
|
|
|
|
QemuFwCfgLib
|
2021-07-15 17:34:57 +00:00
|
|
|
diff --git a/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.c b/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.c
|
2021-11-29 13:29:46 +00:00
|
|
|
index 6832d563bcb0..08ed67f5ffea 100644
|
2021-07-15 17:34:57 +00:00
|
|
|
--- a/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.c
|
|
|
|
+++ b/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.c
|
2021-11-29 13:29:46 +00:00
|
|
|
@@ -19,6 +19,7 @@
|
2021-07-15 17:34:57 +00:00
|
|
|
#include <Library/BaseMemoryLib.h>
|
2021-11-29 13:29:46 +00:00
|
|
|
#include <Library/BlobVerifierLib.h>
|
2021-07-15 17:34:57 +00:00
|
|
|
#include <Library/DebugLib.h>
|
|
|
|
+#include <Library/DebugPrintErrorLevelLib.h>
|
|
|
|
#include <Library/DevicePathLib.h>
|
|
|
|
#include <Library/MemoryAllocationLib.h>
|
|
|
|
#include <Library/QemuFwCfgLib.h>
|
2021-11-29 13:29:46 +00:00
|
|
|
@@ -1054,6 +1055,22 @@ QemuKernelLoaderFsDxeEntrypoint (
|
2021-07-15 17:34:57 +00:00
|
|
|
|
|
|
|
if (KernelBlob->Data == NULL) {
|
|
|
|
Status = EFI_NOT_FOUND;
|
|
|
|
+#if defined (MDE_CPU_AARCH64)
|
|
|
|
+ //
|
|
|
|
+ // RHBZ#1844682
|
|
|
|
+ //
|
|
|
|
+ // If the "-kernel" QEMU option is not being used, this platform DXE driver
|
|
|
|
+ // should return EFI_NOT_FOUND, so that the DXE Core can unload it.
|
|
|
|
+ // However, the associated error message, logged by the DXE Core to the
|
|
|
|
+ // serial console, is not desired in the silent edk2-aarch64 build, given
|
|
|
|
+ // that the absence of "-kernel" is nothing out of the ordinary. Therefore,
|
|
|
|
+ // return success and stay resident. The wasted guest RAM still gets freed
|
|
|
|
+ // after ExitBootServices().
|
|
|
|
+ //
|
|
|
|
+ if (GetDebugPrintErrorLevel () == DEBUG_ERROR) {
|
|
|
|
+ Status = EFI_SUCCESS;
|
|
|
|
+ }
|
|
|
|
+#endif
|
|
|
|
goto FreeBlobs;
|
|
|
|
}
|
|
|
|
|
|
|
|
--
|
2021-11-29 13:29:46 +00:00
|
|
|
2.33.1
|
2021-07-15 17:34:57 +00:00
|
|
|
|