summaryrefslogtreecommitdiff
path: root/0010-OvmfPkg-QemuRamfbDxe-Do-not-report-DXE-failure-on-Aa.patch
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-08-01 14:44:22 +0000
committerCoprDistGit <infra@openeuler.org>2024-08-01 14:44:22 +0000
commit641da27ad73e8f09c40e8b093dcf824c0ee4d02a (patch)
tree5c8e4f5928100c6dd587e063b7b1de59d2236845 /0010-OvmfPkg-QemuRamfbDxe-Do-not-report-DXE-failure-on-Aa.patch
parentbac9f1a06357b69667a40f0cb2ab674767947337 (diff)
automatic import of edk2openeuler24.03_LTSopeneuler23.09
Diffstat (limited to '0010-OvmfPkg-QemuRamfbDxe-Do-not-report-DXE-failure-on-Aa.patch')
-rw-r--r--0010-OvmfPkg-QemuRamfbDxe-Do-not-report-DXE-failure-on-Aa.patch92
1 files changed, 92 insertions, 0 deletions
diff --git a/0010-OvmfPkg-QemuRamfbDxe-Do-not-report-DXE-failure-on-Aa.patch b/0010-OvmfPkg-QemuRamfbDxe-Do-not-report-DXE-failure-on-Aa.patch
new file mode 100644
index 0000000..08fcb0b
--- /dev/null
+++ b/0010-OvmfPkg-QemuRamfbDxe-Do-not-report-DXE-failure-on-Aa.patch
@@ -0,0 +1,92 @@
+From 3bf394bd43a4cf00c2b52b965b47b8194a406166 Mon Sep 17 00:00:00 2001
+From: Philippe Mathieu-Daude <philmd@redhat.com>
+Date: Thu, 1 Aug 2019 20:43:48 +0200
+Subject: [PATCH] OvmfPkg: QemuRamfbDxe: Do not report DXE failure on Aarch64
+ silent builds (RH only)
+
+Notes about the RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] ->
+RHEL-8.5/20210520-e1999b264f1f [edk2-stable202105] rebase:
+
+- no change
+
+Notes about the RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] ->
+RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] rebase:
+
+- no change
+
+Notes about the RHEL-8.1/20190308-89910a39dcfd [edk2-stable201903] ->
+RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] rebase:
+
+- We have to carry this downstream-only patch -- committed originally as
+ aaaedc1e2cfd -- indefinitely.
+
+- To avoid confusion, remove the tags from the commit message that had
+ been added by the downstream maintainer scripts, such as: Message-id,
+ Patchwork-id, O-Subject, Acked-by. These remain available on the
+ original downstream commit. The Bugzilla line is preserved, as it
+ doesn't relate to a specific posting, but to the problem.
+
+Bugzilla: 1714446
+
+To suppress an error message on the silent build when ramfb is
+not configured, change QemuRamfbDxe to return EFI_SUCCESS even
+when it fails.
+Some memory is wasted (driver stays resident without
+any good use), but it is mostly harmless, as the memory
+is released by the OS after ExitBootServices().
+
+Suggested-by: Laszlo Ersek <lersek@redhat.com>
+Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com>
+(cherry picked from commit aaaedc1e2cfd55ef003fb1b5a37c73a196b26dc7)
+Signed-off-by: Laszlo Ersek <lersek@redhat.com>
+(cherry picked from commit aa2b66b18a62d652bdbefae7b5732297294306ca)
+(cherry picked from commit deb3451034326b75fd760aba47a5171493ff055e)
+---
+ OvmfPkg/QemuRamfbDxe/QemuRamfb.c | 14 ++++++++++++++
+ OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf | 1 +
+ 2 files changed, 15 insertions(+)
+
+diff --git a/OvmfPkg/QemuRamfbDxe/QemuRamfb.c b/OvmfPkg/QemuRamfbDxe/QemuRamfb.c
+index 5a1044f0dc..83c6d26c74 100644
+--- a/OvmfPkg/QemuRamfbDxe/QemuRamfb.c
++++ b/OvmfPkg/QemuRamfbDxe/QemuRamfb.c
+@@ -13,6 +13,7 @@
+ #include <Library/BaseLib.h>
+ #include <Library/BaseMemoryLib.h>
+ #include <Library/DebugLib.h>
++#include <Library/DebugPrintErrorLevelLib.h>
+ #include <Library/DevicePathLib.h>
+ #include <Library/FrameBufferBltLib.h>
+ #include <Library/MemoryAllocationLib.h>
+@@ -259,6 +260,19 @@ InitializeQemuRamfb (
+
+ Status = QemuFwCfgFindFile ("etc/ramfb", &mRamfbFwCfgItem, &FwCfgSize);
+ if (EFI_ERROR (Status)) {
++#if defined (MDE_CPU_AARCH64)
++ //
++ // RHBZ#1714446
++ // If no ramfb device was configured, this platform DXE driver should
++ // returns EFI_NOT_FOUND, so the DXE Core can unload it. However, even
++ // using a silent build, an error message is issued to the guest console.
++ // Since this confuse users, return success and stay resident. The wasted
++ // guest RAM still gets freed later after ExitBootServices().
++ //
++ if (GetDebugPrintErrorLevel () == DEBUG_ERROR) {
++ return EFI_SUCCESS;
++ }
++#endif
+ return EFI_NOT_FOUND;
+ }
+
+diff --git a/OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf b/OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf
+index e3890b8c20..f79a4bc987 100644
+--- a/OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf
++++ b/OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf
+@@ -29,6 +29,7 @@
+ BaseLib
+ BaseMemoryLib
+ DebugLib
++ DebugPrintErrorLevelLib
+ DevicePathLib
+ FrameBufferBltLib
+ MemoryAllocationLib