render / rpms / edk2

Forked from rpms/edk2 3 months ago
Clone

Blame SOURCES/0005-OvmfPkg-take-PcdResizeXterm-from-the-QEMU-command-li.patch

795857
From e7d8bbcb71ec3b292a9f3a358ce185a315a41a1c Mon Sep 17 00:00:00 2001
c4e3b2
From: Laszlo Ersek <lersek@redhat.com>
c4e3b2
Date: Wed, 14 Oct 2015 15:59:06 +0200
c4e3b2
Subject: OvmfPkg: take PcdResizeXterm from the QEMU command line (RH only)
c4e3b2
8c9246
Notes about edk2-stable202205 rebase
8c9246
8c9246
- Necessary minor fixes for upstream changes
8c9246
c4e3b2
Notes about the RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] ->
c4e3b2
RHEL-8.5/20210520-e1999b264f1f [edk2-stable202105] rebase:
c4e3b2
c4e3b2
- Extend the DSC change to the new OvmfPkg/AmdSev platform, which has been
c4e3b2
  introduced upstream in commit 30d277ed7a82 ("OvmfPkg/Amdsev: Base commit
c4e3b2
  to build encrypted boot specific OVMF", 2020-12-14), for TianoCore#3077.
c4e3b2
c4e3b2
  We've always patched all those DSC/FDF files in OvmfPkg down-stream that
c4e3b2
  made sense at least in theory on QEMU. (For example, we've always
c4e3b2
  patched "OvmfPkgIa32.dsc" and "OvmfPkgIa32.fdf", even though we never
c4e3b2
  build or ship the pure IA32 firmware platform.) Follow suit with
c4e3b2
  "AmdSevX64.dsc".
c4e3b2
c4e3b2
Notes about the RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] ->
c4e3b2
RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] rebase:
c4e3b2
c4e3b2
- Resolve contextual conflict in the DSC files, from upstream commit
c4e3b2
  b0ed7ebdebd1 ("OvmfPkg: set fixed FlashNvStorage base addresses with -D
c4e3b2
  SMM_REQUIRE", 2020-03-12).
c4e3b2
c4e3b2
Notes about the RHEL-8.1/20190308-89910a39dcfd [edk2-stable201903] ->
c4e3b2
RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] rebase:
c4e3b2
c4e3b2
- no change
c4e3b2
c4e3b2
Notes about the RHEL-8.0/20180508-ee3198e672e2 ->
c4e3b2
RHEL-8.1/20190308-89910a39dcfd rebase:
c4e3b2
c4e3b2
- no change
c4e3b2
c4e3b2
Notes about the RHEL-7.6/ovmf-20180508-2.gitee3198e672e2.el7 ->
c4e3b2
RHEL-8.0/20180508-ee3198e672e2 rebase:
c4e3b2
c4e3b2
- reorder the rebase changelog in the commit message so that it reads like
c4e3b2
  a blog: place more recent entries near the top
c4e3b2
- no changes to the patch body
c4e3b2
c4e3b2
Notes about the 20171011-92d07e48907f -> 20180508-ee3198e672e2 rebase:
c4e3b2
c4e3b2
- no change
c4e3b2
c4e3b2
Notes about the 20170228-c325e41585e3 -> 20171011-92d07e48907f rebase:
c4e3b2
c4e3b2
- refresh downstream-only commit 8abc2a6ddad2 against context differences
c4e3b2
  in the DSC files from upstream commit 5e167d7e784c
c4e3b2
  ("OvmfPkg/PlatformPei: don't allocate reserved mem varstore if
c4e3b2
  SMM_REQUIRE", 2017-03-12).
c4e3b2
c4e3b2
Notes about the 20160608b-988715a -> 20170228-c325e41585e3 rebase:
c4e3b2
c4e3b2
- no changes
c4e3b2
c4e3b2
Contributed-under: TianoCore Contribution Agreement 1.0
c4e3b2
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
c4e3b2
(cherry picked from commit 6fa0c4d67c0bb8bde2ddd6db41c19eb0c40b2721)
c4e3b2
(cherry picked from commit 8abc2a6ddad25af7e88dc0cf57d55dfb75fbf92d)
c4e3b2
(cherry picked from commit b311932d3841c017a0f0fec553edcac365cc2038)
c4e3b2
(cherry picked from commit 61914fb81cf624c9028d015533b400b2794e52d3)
c4e3b2
(cherry picked from commit 2ebf3cc2ae99275d63bb6efd3c22dec76251a853)
c4e3b2
(cherry picked from commit f9b73437b9b231773c1a20e0c516168817a930a2)
c4e3b2
(cherry picked from commit 2cc462ee963d0be119bc97bfc9c70d292a40516f)
c4e3b2
(cherry picked from commit 51e0de961029af84b5bdbfddcc9762b1819d500f)
c4e3b2
---
8c9246
 OvmfPkg/AmdSev/AmdSevX64.dsc        |  1 +
8c9246
 OvmfPkg/CloudHv/CloudHvX64.dsc      |  1 +
8c9246
 OvmfPkg/IntelTdx/IntelTdxX64.dsc    |  1 +
8c9246
 OvmfPkg/Microvm/MicrovmX64.dsc      |  2 +-
8c9246
 OvmfPkg/OvmfPkgIa32.dsc             |  1 +
8c9246
 OvmfPkg/OvmfPkgIa32X64.dsc          |  1 +
8c9246
 OvmfPkg/OvmfPkgX64.dsc              |  1 +
8c9246
 OvmfPkg/PlatformPei/Platform.c      | 13 +++++++++++++
8c9246
 OvmfPkg/PlatformPei/PlatformPei.inf |  1 +
8c9246
 9 files changed, 21 insertions(+), 1 deletion(-)
c4e3b2
c4e3b2
diff --git a/OvmfPkg/AmdSev/AmdSevX64.dsc b/OvmfPkg/AmdSev/AmdSevX64.dsc
795857
index 8f7cae787e..41ad97b47d 100644
c4e3b2
--- a/OvmfPkg/AmdSev/AmdSevX64.dsc
c4e3b2
+++ b/OvmfPkg/AmdSev/AmdSevX64.dsc
795857
@@ -475,6 +475,7 @@
c4e3b2
 [PcdsDynamicDefault]
c4e3b2
   gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0
c4e3b2
 
c4e3b2
+  gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm|FALSE
c4e3b2
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0
8c9246
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|0
8c9246
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase64|0
8c9246
diff --git a/OvmfPkg/CloudHv/CloudHvX64.dsc b/OvmfPkg/CloudHv/CloudHvX64.dsc
795857
index ce277cb239..faab59ae8d 100644
8c9246
--- a/OvmfPkg/CloudHv/CloudHvX64.dsc
8c9246
+++ b/OvmfPkg/CloudHv/CloudHvX64.dsc
795857
@@ -582,6 +582,7 @@
8c9246
   #   ($(SMM_REQUIRE) == FALSE)
8c9246
   gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0
8c9246
 
8c9246
+  gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm|FALSE
8c9246
 !if $(SMM_REQUIRE) == FALSE
8c9246
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0
8c9246
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|0
8c9246
diff --git a/OvmfPkg/IntelTdx/IntelTdxX64.dsc b/OvmfPkg/IntelTdx/IntelTdxX64.dsc
795857
index 3458926515..4c4da09b90 100644
8c9246
--- a/OvmfPkg/IntelTdx/IntelTdxX64.dsc
8c9246
+++ b/OvmfPkg/IntelTdx/IntelTdxX64.dsc
795857
@@ -474,6 +474,7 @@
8c9246
   #   ($(SMM_REQUIRE) == FALSE)
8c9246
   gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0
8c9246
 
8c9246
+  gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm|FALSE
8c9246
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0
8c9246
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|0
8c9246
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase64|0
8c9246
diff --git a/OvmfPkg/Microvm/MicrovmX64.dsc b/OvmfPkg/Microvm/MicrovmX64.dsc
795857
index 994a02d301..1d5ba0e810 100644
8c9246
--- a/OvmfPkg/Microvm/MicrovmX64.dsc
8c9246
+++ b/OvmfPkg/Microvm/MicrovmX64.dsc
795857
@@ -579,7 +579,7 @@
8c9246
   # only set when
8c9246
   #   ($(SMM_REQUIRE) == FALSE)
8c9246
   gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0
8c9246
-
8c9246
+  gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm|FALSE
8c9246
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0
8c9246
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|0
8c9246
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase64|0
c4e3b2
diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
795857
index 6f774baf90..e8a074153a 100644
c4e3b2
--- a/OvmfPkg/OvmfPkgIa32.dsc
c4e3b2
+++ b/OvmfPkg/OvmfPkgIa32.dsc
795857
@@ -601,6 +601,7 @@
c4e3b2
   #   ($(SMM_REQUIRE) == FALSE)
c4e3b2
   gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0
c4e3b2
 
c4e3b2
+  gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm|FALSE
c4e3b2
 !if $(SMM_REQUIRE) == FALSE
c4e3b2
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0
8c9246
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|0
c4e3b2
diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc
795857
index c851764dec..0197997793 100644
c4e3b2
--- a/OvmfPkg/OvmfPkgIa32X64.dsc
c4e3b2
+++ b/OvmfPkg/OvmfPkgIa32X64.dsc
795857
@@ -609,6 +609,7 @@
c4e3b2
   #   ($(SMM_REQUIRE) == FALSE)
c4e3b2
   gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0
c4e3b2
 
c4e3b2
+  gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm|FALSE
c4e3b2
 !if $(SMM_REQUIRE) == FALSE
c4e3b2
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0
8c9246
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|0
c4e3b2
diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
795857
index 63c3a47aea..fade13b4e8 100644
c4e3b2
--- a/OvmfPkg/OvmfPkgX64.dsc
c4e3b2
+++ b/OvmfPkg/OvmfPkgX64.dsc
795857
@@ -631,6 +631,7 @@
c4e3b2
   #   ($(SMM_REQUIRE) == FALSE)
c4e3b2
   gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0
c4e3b2
 
c4e3b2
+  gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm|FALSE
c4e3b2
 !if $(SMM_REQUIRE) == FALSE
c4e3b2
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0
8c9246
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|0
c4e3b2
diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c
795857
index b1f8140d60..e5132d95a8 100644
c4e3b2
--- a/OvmfPkg/PlatformPei/Platform.c
c4e3b2
+++ b/OvmfPkg/PlatformPei/Platform.c
8c9246
@@ -41,6 +41,18 @@
8c9246
 
8c9246
 #include "Platform.h"
8c9246
 
8c9246
+#define UPDATE_BOOLEAN_PCD_FROM_FW_CFG(TokenName)                   \
8c9246
+          do {                                                      \
8c9246
+            BOOLEAN       Setting;                                  \
8c9246
+            RETURN_STATUS PcdStatus;                                \
8c9246
+                                                                    \
8c9246
+            if (!RETURN_ERROR (QemuFwCfgParseBool (                 \
8c9246
+                              "opt/ovmf/" #TokenName, &Setting))) { \
8c9246
+              PcdStatus = PcdSetBoolS (TokenName, Setting);         \
8c9246
+              ASSERT_RETURN_ERROR (PcdStatus);                      \
8c9246
+            }                                                       \
8c9246
+          } while (0)
8c9246
+
8c9246
 EFI_HOB_PLATFORM_INFO  mPlatformInfoHob = { 0 };
8c9246
 
8c9246
 EFI_PEI_PPI_DESCRIPTOR  mPpiBootMode[] = {
795857
@@ -376,6 +388,7 @@ InitializePlatform (
c4e3b2
     MemTypeInfoInitialization ();
8c9246
     MemMapInitialization (&mPlatformInfoHob);
c4e3b2
     NoexecDxeInitialization ();
c4e3b2
+    UPDATE_BOOLEAN_PCD_FROM_FW_CFG (PcdResizeXterm);
c4e3b2
   }
c4e3b2
 
c4e3b2
   InstallClearCacheCallback ();
c4e3b2
diff --git a/OvmfPkg/PlatformPei/PlatformPei.inf b/OvmfPkg/PlatformPei/PlatformPei.inf
795857
index 1fadadeb55..3e28e1596d 100644
c4e3b2
--- a/OvmfPkg/PlatformPei/PlatformPei.inf
c4e3b2
+++ b/OvmfPkg/PlatformPei/PlatformPei.inf
795857
@@ -99,6 +99,7 @@
75d8e7
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize
c4e3b2
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize
c4e3b2
   gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved
c4e3b2
+  gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm
c4e3b2
   gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode
c4e3b2
   gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable
c4e3b2
   gEfiMdeModulePkgTokenSpaceGuid.PcdSetNxForStack
c4e3b2
-- 
795857
2.38.1
c4e3b2