|
|
3e2dc0 |
From a5f7a57bf390f1f340ff1d1f1884a73716817ef1 Mon Sep 17 00:00:00 2001
|
|
|
6009e6 |
From: Laszlo Ersek <lersek@redhat.com>
|
|
|
6009e6 |
Date: Sun, 26 Jul 2015 08:02:50 +0000
|
|
|
6009e6 |
Subject: ArmVirtPkg: take PcdResizeXterm from the QEMU command line (RH only)
|
|
|
6009e6 |
|
|
|
3e2dc0 |
Notes about the RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] ->
|
|
|
3e2dc0 |
RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] rebase:
|
|
|
3e2dc0 |
|
|
|
3e2dc0 |
- Resolve leading context divergence in "ArmVirtPkg/ArmVirtQemu.dsc",
|
|
|
3e2dc0 |
arising from upstream commits:
|
|
|
3e2dc0 |
|
|
|
3e2dc0 |
- 82662a3b5f56 ("ArmVirtPkg/PlatformPeiLib: discover the TPM base
|
|
|
3e2dc0 |
address from the DT", 2020-03-04)
|
|
|
3e2dc0 |
|
|
|
3e2dc0 |
- ddd34a818315 ("ArmVirtPkg/ArmVirtQemu: enable TPM2 support in the PEI
|
|
|
3e2dc0 |
phase", 2020-03-04)
|
|
|
3e2dc0 |
|
|
|
3e2dc0 |
- cdc3fa54184a ("ArmVirtPkg: control PXEv4 / PXEv6 boot support from the
|
|
|
3e2dc0 |
QEMU command line", 2020-04-28)
|
|
|
3e2dc0 |
|
|
|
3e2dc0 |
- Rework the downstream patch quite a bit, paralleling the upstream work
|
|
|
3e2dc0 |
done for <https://bugzilla.tianocore.org/show_bug.cgi?id=2681> in commit
|
|
|
3e2dc0 |
range 64ab457d1f21..cdc3fa54184a:
|
|
|
3e2dc0 |
|
|
|
3e2dc0 |
- Refresh copyright year in TerminalPcdProducerLib.{inf,c}. Also replace
|
|
|
3e2dc0 |
open-coded BSDL with "SPDX-License-Identifier: BSD-2-Clause-Patent".
|
|
|
3e2dc0 |
|
|
|
3e2dc0 |
- Simplify LIBRARY_CLASS: this lib instance is meant to be consumed only
|
|
|
3e2dc0 |
via NULL class resolution (basically: as a plugin), so use NULL for
|
|
|
3e2dc0 |
LIBRARY_CLASS, not "TerminalPcdProducerLib|DXE_DRIVER".
|
|
|
3e2dc0 |
|
|
|
3e2dc0 |
- Sort the [Packages] section alphabetically in the INF file.
|
|
|
3e2dc0 |
|
|
|
3e2dc0 |
- Replace the open-coded GetNamedFwCfgBoolean() function with a call to
|
|
|
3e2dc0 |
QemuFwCfgParseBool(), from QemuFwCfgSimpleParserLib.
|
|
|
3e2dc0 |
|
|
|
3e2dc0 |
- Add the SOMETIMES_PRODUCES usage comment in the [Pcd] section of the
|
|
|
3e2dc0 |
INF file.
|
|
|
3e2dc0 |
|
|
|
6009e6 |
Notes about the RHEL-8.1/20190308-89910a39dcfd [edk2-stable201903] ->
|
|
|
6009e6 |
RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] rebase:
|
|
|
6009e6 |
|
|
|
6009e6 |
- no change
|
|
|
6009e6 |
|
|
|
6009e6 |
Notes about the RHEL-8.0/20180508-ee3198e672e2 ->
|
|
|
6009e6 |
RHEL-8.1/20190308-89910a39dcfd rebase:
|
|
|
6009e6 |
|
|
|
6009e6 |
- no change
|
|
|
6009e6 |
|
|
|
6009e6 |
Notes about the RHEL-7.6/ovmf-20180508-2.gitee3198e672e2.el7 ->
|
|
|
6009e6 |
RHEL-8.0/20180508-ee3198e672e2 rebase:
|
|
|
6009e6 |
|
|
|
6009e6 |
- reorder the rebase changelog in the commit message so that it reads like
|
|
|
6009e6 |
a blog: place more recent entries near the top
|
|
|
6009e6 |
- no changes to the patch body
|
|
|
6009e6 |
|
|
|
6009e6 |
Notes about the 20171011-92d07e48907f -> 20180508-ee3198e672e2 rebase:
|
|
|
6009e6 |
|
|
|
6009e6 |
- no change
|
|
|
6009e6 |
|
|
|
6009e6 |
Notes about the 20170228-c325e41585e3 -> 20171011-92d07e48907f rebase:
|
|
|
6009e6 |
|
|
|
6009e6 |
- Refresh downstream-only commit d4564d39dfdb against context changes in
|
|
|
6009e6 |
"ArmVirtPkg/ArmVirtQemu.dsc" from upstream commit 7e5f1b673870
|
|
|
6009e6 |
("ArmVirtPkg/PlatformHasAcpiDtDxe: allow guest level ACPI disable
|
|
|
6009e6 |
override", 2017-03-29).
|
|
|
6009e6 |
|
|
|
6009e6 |
Notes about the 20160608b-988715a -> 20170228-c325e41585e3 rebase:
|
|
|
6009e6 |
|
|
|
6009e6 |
- Adapt commit 6b97969096a3 to the fact that upstream has deprecated such
|
|
|
6009e6 |
setter functions for dynamic PCDs that don't return a status code (such
|
|
|
6009e6 |
as PcdSetBool()). Employ PcdSetBoolS(), and assert that it succeeds --
|
|
|
6009e6 |
there's really no circumstance in this case when it could fail.
|
|
|
6009e6 |
|
|
|
6009e6 |
Contributed-under: TianoCore Contribution Agreement 1.0
|
|
|
6009e6 |
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
6009e6 |
(cherry picked from commit d4564d39dfdbf74e762af43314005a2c026cb262)
|
|
|
6009e6 |
(cherry picked from commit c9081ebe3bcd28e5cce4bf58bd8d4fca12f9af7c)
|
|
|
6009e6 |
(cherry picked from commit 8e92730c8e1cdb642b3b3e680e643ff774a90c65)
|
|
|
6009e6 |
(cherry picked from commit 9448b6b46267d8d807fac0c648e693171bb34806)
|
|
|
6009e6 |
(cherry picked from commit 232fcf06f6b3048b7c2ebd6931f23186b3852f04)
|
|
|
3e2dc0 |
(cherry picked from commit 8338545260fbb423f796d5196faaaf8ff6e1ed99)
|
|
|
6009e6 |
---
|
|
|
3e2dc0 |
ArmVirtPkg/ArmVirtQemu.dsc | 7 +++-
|
|
|
3e2dc0 |
.../TerminalPcdProducerLib.c | 34 +++++++++++++++++++
|
|
|
3e2dc0 |
.../TerminalPcdProducerLib.inf | 33 ++++++++++++++++++
|
|
|
3e2dc0 |
3 files changed, 73 insertions(+), 1 deletion(-)
|
|
|
6009e6 |
create mode 100644 ArmVirtPkg/Library/TerminalPcdProducerLib/TerminalPcdProducerLib.c
|
|
|
6009e6 |
create mode 100644 ArmVirtPkg/Library/TerminalPcdProducerLib/TerminalPcdProducerLib.inf
|
|
|
6009e6 |
|
|
|
6009e6 |
diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
|
|
|
3e2dc0 |
index 360094ab6a..3345987503 100644
|
|
|
6009e6 |
--- a/ArmVirtPkg/ArmVirtQemu.dsc
|
|
|
6009e6 |
+++ b/ArmVirtPkg/ArmVirtQemu.dsc
|
|
|
3e2dc0 |
@@ -272,6 +272,8 @@
|
|
|
3e2dc0 |
gEfiSecurityPkgTokenSpaceGuid.PcdTpm2HashMask|0
|
|
|
3e2dc0 |
!endif
|
|
|
6009e6 |
|
|
|
6009e6 |
+ gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm|FALSE
|
|
|
6009e6 |
+
|
|
|
6009e6 |
[PcdsDynamicHii]
|
|
|
6009e6 |
gArmVirtTokenSpaceGuid.PcdForceNoAcpi|L"ForceNoAcpi"|gArmVirtVariableGuid|0x0|FALSE|NV,BS
|
|
|
6009e6 |
|
|
|
3e2dc0 |
@@ -374,7 +376,10 @@
|
|
|
6009e6 |
MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
|
|
|
6009e6 |
MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
|
|
|
6009e6 |
MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
|
|
|
6009e6 |
- MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
|
|
|
6009e6 |
+ MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf {
|
|
|
6009e6 |
+ <LibraryClasses>
|
|
|
6009e6 |
+ NULL|ArmVirtPkg/Library/TerminalPcdProducerLib/TerminalPcdProducerLib.inf
|
|
|
6009e6 |
+ }
|
|
|
6009e6 |
MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
|
|
|
6009e6 |
|
|
|
6009e6 |
MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
|
|
|
6009e6 |
diff --git a/ArmVirtPkg/Library/TerminalPcdProducerLib/TerminalPcdProducerLib.c b/ArmVirtPkg/Library/TerminalPcdProducerLib/TerminalPcdProducerLib.c
|
|
|
6009e6 |
new file mode 100644
|
|
|
3e2dc0 |
index 0000000000..bfd3a6a535
|
|
|
6009e6 |
--- /dev/null
|
|
|
6009e6 |
+++ b/ArmVirtPkg/Library/TerminalPcdProducerLib/TerminalPcdProducerLib.c
|
|
|
3e2dc0 |
@@ -0,0 +1,34 @@
|
|
|
6009e6 |
+/** @file
|
|
|
6009e6 |
+* Plugin library for setting up dynamic PCDs for TerminalDxe, from fw_cfg
|
|
|
6009e6 |
+*
|
|
|
3e2dc0 |
+* Copyright (C) 2015-2020, Red Hat, Inc.
|
|
|
6009e6 |
+* Copyright (c) 2014, Linaro Ltd. All rights reserved.
|
|
|
6009e6 |
+*
|
|
|
3e2dc0 |
+* SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
|
6009e6 |
+**/
|
|
|
6009e6 |
+
|
|
|
6009e6 |
+#include <Library/DebugLib.h>
|
|
|
6009e6 |
+#include <Library/PcdLib.h>
|
|
|
3e2dc0 |
+#include <Library/QemuFwCfgSimpleParserLib.h>
|
|
|
6009e6 |
+
|
|
|
6009e6 |
+#define UPDATE_BOOLEAN_PCD_FROM_FW_CFG(TokenName) \
|
|
|
6009e6 |
+ do { \
|
|
|
6009e6 |
+ BOOLEAN Setting; \
|
|
|
6009e6 |
+ RETURN_STATUS PcdStatus; \
|
|
|
6009e6 |
+ \
|
|
|
3e2dc0 |
+ if (!RETURN_ERROR (QemuFwCfgParseBool ( \
|
|
|
6009e6 |
+ "opt/org.tianocore.edk2.aavmf/" #TokenName, &Setting))) { \
|
|
|
6009e6 |
+ PcdStatus = PcdSetBoolS (TokenName, Setting); \
|
|
|
6009e6 |
+ ASSERT_RETURN_ERROR (PcdStatus); \
|
|
|
6009e6 |
+ } \
|
|
|
6009e6 |
+ } while (0)
|
|
|
6009e6 |
+
|
|
|
6009e6 |
+RETURN_STATUS
|
|
|
6009e6 |
+EFIAPI
|
|
|
6009e6 |
+TerminalPcdProducerLibConstructor (
|
|
|
6009e6 |
+ VOID
|
|
|
6009e6 |
+ )
|
|
|
6009e6 |
+{
|
|
|
6009e6 |
+ UPDATE_BOOLEAN_PCD_FROM_FW_CFG (PcdResizeXterm);
|
|
|
6009e6 |
+ return RETURN_SUCCESS;
|
|
|
6009e6 |
+}
|
|
|
6009e6 |
diff --git a/ArmVirtPkg/Library/TerminalPcdProducerLib/TerminalPcdProducerLib.inf b/ArmVirtPkg/Library/TerminalPcdProducerLib/TerminalPcdProducerLib.inf
|
|
|
6009e6 |
new file mode 100644
|
|
|
3e2dc0 |
index 0000000000..a51dbd1670
|
|
|
6009e6 |
--- /dev/null
|
|
|
6009e6 |
+++ b/ArmVirtPkg/Library/TerminalPcdProducerLib/TerminalPcdProducerLib.inf
|
|
|
3e2dc0 |
@@ -0,0 +1,33 @@
|
|
|
6009e6 |
+## @file
|
|
|
6009e6 |
+# Plugin library for setting up dynamic PCDs for TerminalDxe, from fw_cfg
|
|
|
6009e6 |
+#
|
|
|
3e2dc0 |
+# Copyright (C) 2015-2020, Red Hat, Inc.
|
|
|
6009e6 |
+# Copyright (c) 2014, Linaro Ltd. All rights reserved.
|
|
|
6009e6 |
+#
|
|
|
3e2dc0 |
+# SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
|
6009e6 |
+##
|
|
|
6009e6 |
+
|
|
|
6009e6 |
+[Defines]
|
|
|
6009e6 |
+ INF_VERSION = 0x00010005
|
|
|
6009e6 |
+ BASE_NAME = TerminalPcdProducerLib
|
|
|
6009e6 |
+ FILE_GUID = 4a0c5ed7-8c42-4c01-8f4c-7bf258316a96
|
|
|
6009e6 |
+ MODULE_TYPE = BASE
|
|
|
6009e6 |
+ VERSION_STRING = 1.0
|
|
|
3e2dc0 |
+ LIBRARY_CLASS = NULL
|
|
|
6009e6 |
+ CONSTRUCTOR = TerminalPcdProducerLibConstructor
|
|
|
6009e6 |
+
|
|
|
6009e6 |
+[Sources]
|
|
|
6009e6 |
+ TerminalPcdProducerLib.c
|
|
|
6009e6 |
+
|
|
|
6009e6 |
+[Packages]
|
|
|
3e2dc0 |
+ MdeModulePkg/MdeModulePkg.dec
|
|
|
6009e6 |
+ MdePkg/MdePkg.dec
|
|
|
6009e6 |
+ OvmfPkg/OvmfPkg.dec
|
|
|
6009e6 |
+
|
|
|
6009e6 |
+[LibraryClasses]
|
|
|
6009e6 |
+ DebugLib
|
|
|
6009e6 |
+ PcdLib
|
|
|
3e2dc0 |
+ QemuFwCfgSimpleParserLib
|
|
|
6009e6 |
+
|
|
|
6009e6 |
+[Pcd]
|
|
|
3e2dc0 |
+ gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm ## SOMETIMES_PRODUCES
|
|
|
6009e6 |
--
|
|
|
6009e6 |
2.18.1
|
|
|
6009e6 |
|