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