|
|
fcd20d |
From aaaedc1e2cfd55ef003fb1b5a37c73a196b26dc7 Mon Sep 17 00:00:00 2001
|
|
|
fcd20d |
From: Philippe Mathieu-Daude <philmd@redhat.com>
|
|
|
fcd20d |
Date: Thu, 1 Aug 2019 20:43:48 +0200
|
|
|
fcd20d |
Subject: [PATCH 2/3] OvmfPkg: QemuRamfbDxe: Do not report DXE failure on
|
|
|
fcd20d |
Aarch64 silent builds (RH only)
|
|
|
fcd20d |
|
|
|
fcd20d |
Message-id: <20190801184349.28512-3-philmd@redhat.com>
|
|
|
fcd20d |
Patchwork-id: 89861
|
|
|
fcd20d |
O-Subject: [RHEL-8.1.0 edk2 PATCH v4 2/3] OvmfPkg: QemuRamfbDxe: Do not report
|
|
|
fcd20d |
DXE failure on Aarch64 silent builds (RH only)
|
|
|
fcd20d |
Bugzilla: 1714446
|
|
|
fcd20d |
Acked-by: Andrew Jones <drjones@redhat.com>
|
|
|
fcd20d |
Acked-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
fcd20d |
|
|
|
fcd20d |
To suppress an error message on the silent build when ramfb is
|
|
|
fcd20d |
not configured, change QemuRamfbDxe to return EFI_SUCCESS even
|
|
|
fcd20d |
when it fails.
|
|
|
fcd20d |
Some memory is wasted (driver stays resident without
|
|
|
fcd20d |
any good use), but it is mostly harmless, as the memory
|
|
|
fcd20d |
is released by the OS after ExitBootServices().
|
|
|
fcd20d |
|
|
|
fcd20d |
Suggested-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
fcd20d |
Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com>
|
|
|
fcd20d |
---
|
|
|
fcd20d |
OvmfPkg/QemuRamfbDxe/QemuRamfb.c | 14 ++++++++++++++
|
|
|
fcd20d |
OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf | 1 +
|
|
|
fcd20d |
2 files changed, 15 insertions(+)
|
|
|
fcd20d |
|
|
|
fcd20d |
diff --git a/OvmfPkg/QemuRamfbDxe/QemuRamfb.c b/OvmfPkg/QemuRamfbDxe/QemuRamfb.c
|
|
|
fcd20d |
index b49f2ca..c27e55f 100644
|
|
|
fcd20d |
--- a/OvmfPkg/QemuRamfbDxe/QemuRamfb.c
|
|
|
fcd20d |
+++ b/OvmfPkg/QemuRamfbDxe/QemuRamfb.c
|
|
|
fcd20d |
@@ -20,6 +20,7 @@
|
|
|
fcd20d |
#include <Library/BaseLib.h>
|
|
|
fcd20d |
#include <Library/BaseMemoryLib.h>
|
|
|
fcd20d |
#include <Library/DebugLib.h>
|
|
|
fcd20d |
+#include <Library/DebugPrintErrorLevelLib.h>
|
|
|
fcd20d |
#include <Library/DevicePathLib.h>
|
|
|
fcd20d |
#include <Library/FrameBufferBltLib.h>
|
|
|
fcd20d |
#include <Library/MemoryAllocationLib.h>
|
|
|
fcd20d |
@@ -249,6 +250,19 @@ InitializeQemuRamfb (
|
|
|
fcd20d |
|
|
|
fcd20d |
Status = QemuFwCfgFindFile ("etc/ramfb", &mRamfbFwCfgItem, &FwCfgSize);
|
|
|
fcd20d |
if (EFI_ERROR (Status)) {
|
|
|
fcd20d |
+#if defined (MDE_CPU_AARCH64)
|
|
|
fcd20d |
+ //
|
|
|
fcd20d |
+ // RHBZ#1714446
|
|
|
fcd20d |
+ // If no ramfb device was configured, this platform DXE driver should
|
|
|
fcd20d |
+ // returns EFI_NOT_FOUND, so the DXE Core can unload it. However, even
|
|
|
fcd20d |
+ // using a silent build, an error message is issued to the guest console.
|
|
|
fcd20d |
+ // Since this confuse users, return success and stay resident. The wasted
|
|
|
fcd20d |
+ // guest RAM still gets freed later after ExitBootServices().
|
|
|
fcd20d |
+ //
|
|
|
fcd20d |
+ if (GetDebugPrintErrorLevel () == DEBUG_ERROR) {
|
|
|
fcd20d |
+ return EFI_SUCCESS;
|
|
|
fcd20d |
+ }
|
|
|
fcd20d |
+#endif
|
|
|
fcd20d |
return EFI_NOT_FOUND;
|
|
|
fcd20d |
}
|
|
|
fcd20d |
if (FwCfgSize != sizeof (RAMFB_CONFIG)) {
|
|
|
fcd20d |
diff --git a/OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf b/OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf
|
|
|
fcd20d |
index 013edef..f9e24cb 100644
|
|
|
fcd20d |
--- a/OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf
|
|
|
fcd20d |
+++ b/OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf
|
|
|
fcd20d |
@@ -36,6 +36,7 @@
|
|
|
fcd20d |
BaseLib
|
|
|
fcd20d |
BaseMemoryLib
|
|
|
fcd20d |
DebugLib
|
|
|
fcd20d |
+ DebugPrintErrorLevelLib
|
|
|
fcd20d |
DevicePathLib
|
|
|
fcd20d |
FrameBufferBltLib
|
|
|
fcd20d |
MemoryAllocationLib
|
|
|
fcd20d |
--
|
|
|
fcd20d |
1.8.3.1
|
|
|
fcd20d |
|