|
|
59c3cd |
From bacf42ebf768aebb8c2b36fb52d154daf19c0c74 Mon Sep 17 00:00:00 2001
|
|
|
59c3cd |
From: Philippe Mathieu-Daude <philmd@redhat.com>
|
|
|
59c3cd |
Date: Thu, 1 Aug 2019 20:43:48 +0200
|
|
|
59c3cd |
Subject: OvmfPkg: QemuRamfbDxe: Do not report DXE failure on Aarch64 silent
|
|
|
59c3cd |
builds (RH only)
|
|
|
59c3cd |
|
|
|
59c3cd |
Notes about the RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] ->
|
|
|
59c3cd |
RHEL-8.5/20210520-e1999b264f1f [edk2-stable202105] rebase:
|
|
|
59c3cd |
|
|
|
59c3cd |
- no change
|
|
|
59c3cd |
|
|
|
59c3cd |
Notes about the RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] ->
|
|
|
59c3cd |
RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] rebase:
|
|
|
59c3cd |
|
|
|
59c3cd |
- no change
|
|
|
59c3cd |
|
|
|
59c3cd |
Notes about the RHEL-8.1/20190308-89910a39dcfd [edk2-stable201903] ->
|
|
|
59c3cd |
RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] rebase:
|
|
|
59c3cd |
|
|
|
59c3cd |
- We have to carry this downstream-only patch -- committed originally as
|
|
|
59c3cd |
aaaedc1e2cfd -- indefinitely.
|
|
|
59c3cd |
|
|
|
59c3cd |
- To avoid confusion, remove the tags from the commit message that had
|
|
|
59c3cd |
been added by the downstream maintainer scripts, such as: Message-id,
|
|
|
59c3cd |
Patchwork-id, O-Subject, Acked-by. These remain available on the
|
|
|
59c3cd |
original downstream commit. The Bugzilla line is preserved, as it
|
|
|
59c3cd |
doesn't relate to a specific posting, but to the problem.
|
|
|
59c3cd |
|
|
|
59c3cd |
Bugzilla: 1714446
|
|
|
59c3cd |
|
|
|
59c3cd |
To suppress an error message on the silent build when ramfb is
|
|
|
59c3cd |
not configured, change QemuRamfbDxe to return EFI_SUCCESS even
|
|
|
59c3cd |
when it fails.
|
|
|
59c3cd |
Some memory is wasted (driver stays resident without
|
|
|
59c3cd |
any good use), but it is mostly harmless, as the memory
|
|
|
59c3cd |
is released by the OS after ExitBootServices().
|
|
|
59c3cd |
|
|
|
59c3cd |
Suggested-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
59c3cd |
Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com>
|
|
|
59c3cd |
(cherry picked from commit aaaedc1e2cfd55ef003fb1b5a37c73a196b26dc7)
|
|
|
59c3cd |
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
59c3cd |
(cherry picked from commit aa2b66b18a62d652bdbefae7b5732297294306ca)
|
|
|
59c3cd |
(cherry picked from commit deb3451034326b75fd760aba47a5171493ff055e)
|
|
|
59c3cd |
---
|
|
|
59c3cd |
OvmfPkg/QemuRamfbDxe/QemuRamfb.c | 14 ++++++++++++++
|
|
|
59c3cd |
OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf | 1 +
|
|
|
59c3cd |
2 files changed, 15 insertions(+)
|
|
|
59c3cd |
|
|
|
59c3cd |
diff --git a/OvmfPkg/QemuRamfbDxe/QemuRamfb.c b/OvmfPkg/QemuRamfbDxe/QemuRamfb.c
|
|
|
59c3cd |
index 0d49d8bbab..dbf9bcbe16 100644
|
|
|
59c3cd |
--- a/OvmfPkg/QemuRamfbDxe/QemuRamfb.c
|
|
|
59c3cd |
+++ b/OvmfPkg/QemuRamfbDxe/QemuRamfb.c
|
|
|
59c3cd |
@@ -13,6 +13,7 @@
|
|
|
59c3cd |
#include <Library/BaseLib.h>
|
|
|
59c3cd |
#include <Library/BaseMemoryLib.h>
|
|
|
59c3cd |
#include <Library/DebugLib.h>
|
|
|
59c3cd |
+#include <Library/DebugPrintErrorLevelLib.h>
|
|
|
59c3cd |
#include <Library/DevicePathLib.h>
|
|
|
59c3cd |
#include <Library/FrameBufferBltLib.h>
|
|
|
59c3cd |
#include <Library/MemoryAllocationLib.h>
|
|
|
59c3cd |
@@ -242,6 +243,19 @@ InitializeQemuRamfb (
|
|
|
59c3cd |
|
|
|
59c3cd |
Status = QemuFwCfgFindFile ("etc/ramfb", &mRamfbFwCfgItem, &FwCfgSize);
|
|
|
59c3cd |
if (EFI_ERROR (Status)) {
|
|
|
59c3cd |
+#if defined (MDE_CPU_AARCH64)
|
|
|
59c3cd |
+ //
|
|
|
59c3cd |
+ // RHBZ#1714446
|
|
|
59c3cd |
+ // If no ramfb device was configured, this platform DXE driver should
|
|
|
59c3cd |
+ // returns EFI_NOT_FOUND, so the DXE Core can unload it. However, even
|
|
|
59c3cd |
+ // using a silent build, an error message is issued to the guest console.
|
|
|
59c3cd |
+ // Since this confuse users, return success and stay resident. The wasted
|
|
|
59c3cd |
+ // guest RAM still gets freed later after ExitBootServices().
|
|
|
59c3cd |
+ //
|
|
|
59c3cd |
+ if (GetDebugPrintErrorLevel () == DEBUG_ERROR) {
|
|
|
59c3cd |
+ return EFI_SUCCESS;
|
|
|
59c3cd |
+ }
|
|
|
59c3cd |
+#endif
|
|
|
59c3cd |
return EFI_NOT_FOUND;
|
|
|
59c3cd |
}
|
|
|
59c3cd |
if (FwCfgSize != sizeof (RAMFB_CONFIG)) {
|
|
|
59c3cd |
diff --git a/OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf b/OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf
|
|
|
59c3cd |
index e3890b8c20..6ffee5acb2 100644
|
|
|
59c3cd |
--- a/OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf
|
|
|
59c3cd |
+++ b/OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf
|
|
|
59c3cd |
@@ -29,6 +29,7 @@
|
|
|
59c3cd |
BaseLib
|
|
|
59c3cd |
BaseMemoryLib
|
|
|
59c3cd |
DebugLib
|
|
|
59c3cd |
+ DebugPrintErrorLevelLib
|
|
|
59c3cd |
DevicePathLib
|
|
|
59c3cd |
FrameBufferBltLib
|
|
|
59c3cd |
MemoryAllocationLib
|
|
|
59c3cd |
--
|
|
|
59c3cd |
2.27.0
|
|
|
59c3cd |
|