parent
20d4cb7b9b
commit
77ff1438b6
@ -1,2 +1,2 @@
|
||||
78e6e577d9727e549bb9fb0b1973bcc2b6ec9b3d SOURCES/edk2-16779ede2d36.tar.xz
|
||||
f6b8cfc123a75525218c6588ec16b61f17cb420d SOURCES/openssl-rhel-740e53ace8f6771c205bf84780e26bcd7a3275df.tar.xz
|
||||
a1c42c2f044a95caf0c8595d351c4cc5adcfde14 SOURCES/edk2-fff6d81270b5.tar.xz
|
||||
c0518a4102a3909928dcc2e0a2c1784a53a419c6 SOURCES/openssl-rhel-d00c3c5b8a9d6d3ea3dabfcafdf36afd61ba8bcc.tar.xz
|
||||
|
@ -1,2 +1,2 @@
|
||||
SOURCES/edk2-16779ede2d36.tar.xz
|
||||
SOURCES/openssl-rhel-740e53ace8f6771c205bf84780e26bcd7a3275df.tar.xz
|
||||
SOURCES/edk2-fff6d81270b5.tar.xz
|
||||
SOURCES/openssl-rhel-d00c3c5b8a9d6d3ea3dabfcafdf36afd61ba8bcc.tar.xz
|
||||
|
@ -1,82 +0,0 @@
|
||||
From 7c341fac71b9c0530d2593da20ca2bd8cd363f2f Mon Sep 17 00:00:00 2001
|
||||
From: Laszlo Ersek <lersek@redhat.com>
|
||||
Date: Thu, 20 Feb 2014 22:54:45 +0100
|
||||
Subject: OvmfPkg: increase max debug message length to 512 (RHEL 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:
|
||||
|
||||
- trivial context difference due to upstream commit 2fe5f2f52918
|
||||
("OvmfPkg/PlatformDebugLibIoPort: Add new APIs", 2019-04-02), resolved
|
||||
by git-cherry-pick automatically
|
||||
|
||||
Notes about the RHEL-8.0/20180508-ee3198e672e2 ->
|
||||
RHEL-8.1/20190308-89910a39dcfd rebase:
|
||||
|
||||
- no changes
|
||||
|
||||
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 changes
|
||||
|
||||
Notes about the 20170228-c325e41585e3 -> 20171011-92d07e48907f rebase:
|
||||
|
||||
- no changes
|
||||
|
||||
Notes about the 20160608b-988715a -> 20170228-c325e41585e3 rebase:
|
||||
|
||||
- no changes
|
||||
|
||||
Upstream prefers short debug messages (sometimes even limited to 80
|
||||
characters), but any line length under 512 characters is just unsuitable
|
||||
for effective debugging. (For example, config strings in HII routing,
|
||||
logged by the platform driver "OvmfPkg/PlatformDxe" on DEBUG_VERBOSE
|
||||
level, can be several hundred characters long.) 512 is an empirically good
|
||||
value.
|
||||
|
||||
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
|
||||
(cherry picked from commit bfe568d18dba15602604f155982e3b73add63dfb)
|
||||
(cherry picked from commit 29435a32ec9428720c74c454ce9817662e601fb6)
|
||||
(cherry picked from commit 58e1d1ebb78bfdaf05f4c6e8abf8d4908dfa038a)
|
||||
(cherry picked from commit 1df2c822c996ad767f2f45570ab2686458f7604a)
|
||||
(cherry picked from commit 22c9b4e971c70c69b4adf8eb93133824ccb6426a)
|
||||
(cherry picked from commit a1260c9122c95bcbef1efc5eebe11902767813c2)
|
||||
(cherry picked from commit e949bab1268f83f0f5815a96cd1cb9dd3b21bfb5)
|
||||
(cherry picked from commit a95cff0b9573bf23699551beb4786383f697ff1e)
|
||||
---
|
||||
OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c b/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c
|
||||
index 4e25f198aa..640627f38b 100644
|
||||
--- a/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c
|
||||
+++ b/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c
|
||||
@@ -21,7 +21,7 @@
|
||||
//
|
||||
// Define the maximum debug and assert message length that this library supports
|
||||
//
|
||||
-#define MAX_DEBUG_MESSAGE_LENGTH 0x100
|
||||
+#define MAX_DEBUG_MESSAGE_LENGTH 0x200
|
||||
|
||||
//
|
||||
// VA_LIST can not initialize to NULL for all compiler, so we use this to
|
||||
--
|
||||
2.31.1
|
||||
|
@ -1,172 +0,0 @@
|
||||
From 8c739e3281704f16973cf1e93f544d9475bcbecf Mon Sep 17 00:00:00 2001
|
||||
From: Laszlo Ersek <lersek@redhat.com>
|
||||
Date: Tue, 4 Nov 2014 23:02:53 +0100
|
||||
Subject: OvmfPkg: allow exclusion of the shell from the firmware image (RH
|
||||
only)
|
||||
|
||||
Notes about the RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] ->
|
||||
RHEL-8.5/20210520-e1999b264f1f [edk2-stable202105] rebase:
|
||||
|
||||
- No manual / explicit code change is necessary, because the newly
|
||||
inherited OvmfPkg/AmdSev platform already has its own BUILD_SHELL
|
||||
build-time macro (feature test flag), with default value FALSE -- from
|
||||
upstream commit b261a30c900a ("OvmfPkg/AmdSev: add Grub Firmware Volume
|
||||
Package", 2020-12-14).
|
||||
|
||||
- Contextual differences from new upstream commits 2d8ca4f90eae ("OvmfPkg:
|
||||
enable HttpDynamicCommand", 2020-10-01) and 5ab6a0e1c8e9 ("OvmfPkg:
|
||||
introduce VirtioFsDxe", 2020-12-21) have been auto-resolved by
|
||||
git-cherry-pick.
|
||||
|
||||
- Remove obsolete commit message tags related to downstream patch
|
||||
management: Message-id, Patchwork-id, O-Subject, Acked-by
|
||||
(RHBZ#1846481).
|
||||
|
||||
Notes about the RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] ->
|
||||
RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] rebase:
|
||||
|
||||
- context difference from upstream commit ec41733cfd10 ("OvmfPkg: add the
|
||||
'initrd' dynamic shell command", 2020-03-04) correctly auto-resolved
|
||||
|
||||
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:
|
||||
|
||||
- update the patch against the following upstream commits:
|
||||
- 4b888334d234 ("OvmfPkg: Remove EdkShellBinPkg in FDF", 2018-11-19)
|
||||
- 277a3958d93a ("OvmfPkg: Don't include TftpDynamicCommand in XCODE5
|
||||
tool chain", 2018-11-27)
|
||||
|
||||
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
|
||||
|
||||
Notes about the 20170228-c325e41585e3 -> 20171011-92d07e48907f rebase:
|
||||
|
||||
- no changes
|
||||
|
||||
Notes about the 20160608b-988715a -> 20170228-c325e41585e3 rebase:
|
||||
|
||||
- no changes
|
||||
|
||||
Bugzilla: 1147592
|
||||
|
||||
When '-D EXCLUDE_SHELL_FROM_FD' is passed to 'build', exclude the shell
|
||||
binary from the firmware image.
|
||||
|
||||
Peter Jones advised us that firmware vendors for physical systems disable
|
||||
the memory-mapped, firmware image-contained UEFI shell in
|
||||
SecureBoot-enabled builds. The reason being that the memory-mapped shell
|
||||
can always load, it may have direct access to various hardware in the
|
||||
system, and it can run UEFI shell scripts (which cannot be signed at all).
|
||||
|
||||
Intended use of the new build option:
|
||||
|
||||
- In-tree builds: don't pass '-D EXCLUDE_SHELL_FROM_FD'. The resultant
|
||||
firmware image will contain a shell binary, independently of SecureBoot
|
||||
enablement, which is flexible for interactive development. (Ie. no
|
||||
change for in-tree builds.)
|
||||
|
||||
- RPM builds: pass both '-D SECURE_BOOT_ENABLE' and
|
||||
'-D EXCLUDE_SHELL_FROM_FD'. The resultant RPM will provide:
|
||||
|
||||
- OVMF_CODE.fd: SecureBoot-enabled firmware, without builtin UEFI shell,
|
||||
|
||||
- OVMF_VARS.fd: variable store template matching OVMF_CODE.fd,
|
||||
|
||||
- UefiShell.iso: a bootable ISO image with the shell on it as default
|
||||
boot loader. The shell binary will load when SecureBoot is turned off,
|
||||
and won't load when SecureBoot is turned on (because it is not
|
||||
signed).
|
||||
|
||||
UefiShell.iso is the reason we're not excluding the shell from the DSC
|
||||
files as well, only the FDF files -- when '-D EXCLUDE_SHELL_FROM_FD'
|
||||
is specified, the shell binary needs to be built the same, only it
|
||||
will be included in UefiShell.iso.
|
||||
|
||||
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
|
||||
(cherry picked from commit 9c391def70366cabae08e6008814299c3372fafd)
|
||||
(cherry picked from commit d9dd9ee42937b2611fe37183cc9ec7f62d946933)
|
||||
(cherry picked from commit 23df46ebbe7b09451d3a05034acd4d3a25e7177b)
|
||||
(cherry picked from commit f0303f71d576c51b01c4ff961b429d0e0e707245)
|
||||
(cherry picked from commit bbd64eb8658e9a33eab4227d9f4e51ad78d9f687)
|
||||
(cherry picked from commit 8628ef1b8d675ebec39d83834abbe3c8c8c42cf4)
|
||||
(cherry picked from commit 229c88dc3ded9baeaca8b87767dc5c41c05afd6e)
|
||||
(cherry picked from commit c2812d7189dee06c780f05a5880eb421c359a687)
|
||||
---
|
||||
OvmfPkg/OvmfPkgIa32.fdf | 2 ++
|
||||
OvmfPkg/OvmfPkgIa32X64.fdf | 2 ++
|
||||
OvmfPkg/OvmfPkgX64.fdf | 2 ++
|
||||
3 files changed, 6 insertions(+)
|
||||
|
||||
diff --git a/OvmfPkg/OvmfPkgIa32.fdf b/OvmfPkg/OvmfPkgIa32.fdf
|
||||
index 57d13b7130..69044874e2 100644
|
||||
--- a/OvmfPkg/OvmfPkgIa32.fdf
|
||||
+++ b/OvmfPkg/OvmfPkgIa32.fdf
|
||||
@@ -298,12 +298,14 @@ INF FatPkg/EnhancedFatDxe/Fat.inf
|
||||
INF MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
|
||||
INF OvmfPkg/VirtioFsDxe/VirtioFsDxe.inf
|
||||
|
||||
+!ifndef $(EXCLUDE_SHELL_FROM_FD)
|
||||
!if $(TOOL_CHAIN_TAG) != "XCODE5"
|
||||
INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
|
||||
INF ShellPkg/DynamicCommand/HttpDynamicCommand/HttpDynamicCommand.inf
|
||||
INF OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf
|
||||
!endif
|
||||
INF ShellPkg/Application/Shell/Shell.inf
|
||||
+!endif
|
||||
|
||||
INF MdeModulePkg/Logo/LogoDxe.inf
|
||||
|
||||
diff --git a/OvmfPkg/OvmfPkgIa32X64.fdf b/OvmfPkg/OvmfPkgIa32X64.fdf
|
||||
index ccde366887..bf535bef42 100644
|
||||
--- a/OvmfPkg/OvmfPkgIa32X64.fdf
|
||||
+++ b/OvmfPkg/OvmfPkgIa32X64.fdf
|
||||
@@ -299,12 +299,14 @@ INF FatPkg/EnhancedFatDxe/Fat.inf
|
||||
INF MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
|
||||
INF OvmfPkg/VirtioFsDxe/VirtioFsDxe.inf
|
||||
|
||||
+!ifndef $(EXCLUDE_SHELL_FROM_FD)
|
||||
!if $(TOOL_CHAIN_TAG) != "XCODE5"
|
||||
INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
|
||||
INF ShellPkg/DynamicCommand/HttpDynamicCommand/HttpDynamicCommand.inf
|
||||
INF OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf
|
||||
!endif
|
||||
INF ShellPkg/Application/Shell/Shell.inf
|
||||
+!endif
|
||||
|
||||
INF MdeModulePkg/Logo/LogoDxe.inf
|
||||
|
||||
diff --git a/OvmfPkg/OvmfPkgX64.fdf b/OvmfPkg/OvmfPkgX64.fdf
|
||||
index 438806fba8..21e4ce00dd 100644
|
||||
--- a/OvmfPkg/OvmfPkgX64.fdf
|
||||
+++ b/OvmfPkg/OvmfPkgX64.fdf
|
||||
@@ -324,12 +324,14 @@ INF FatPkg/EnhancedFatDxe/Fat.inf
|
||||
INF MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
|
||||
INF OvmfPkg/VirtioFsDxe/VirtioFsDxe.inf
|
||||
|
||||
+!ifndef $(EXCLUDE_SHELL_FROM_FD)
|
||||
!if $(TOOL_CHAIN_TAG) != "XCODE5"
|
||||
INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
|
||||
INF ShellPkg/DynamicCommand/HttpDynamicCommand/HttpDynamicCommand.inf
|
||||
INF OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf
|
||||
!endif
|
||||
INF ShellPkg/Application/Shell/Shell.inf
|
||||
+!endif
|
||||
|
||||
INF MdeModulePkg/Logo/LogoDxe.inf
|
||||
|
||||
--
|
||||
2.31.1
|
||||
|
@ -1,93 +0,0 @@
|
||||
From 2a0ac4b748825dcd9e2957870a3c317c16c35691 Mon Sep 17 00:00:00 2001
|
||||
From: Laszlo Ersek <lersek@redhat.com>
|
||||
Date: Wed, 14 Oct 2015 13:49:43 +0200
|
||||
Subject: ArmPlatformPkg: introduce fixed PCD for early hello message (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:
|
||||
|
||||
- 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 changes
|
||||
|
||||
Notes about the 20170228-c325e41585e3 -> 20171011-92d07e48907f rebase:
|
||||
|
||||
- no changes
|
||||
|
||||
Notes about the 20160608b-988715a -> 20170228-c325e41585e3 rebase:
|
||||
|
||||
- no changes
|
||||
|
||||
Drew has proposed that ARM|AARCH64 platform firmware (especially virtual
|
||||
machine firmware) print a reasonably early, simple hello message to the
|
||||
serial port, regardless of debug mask settings. This should inform
|
||||
interactive users, and provide some rough help in localizing boot
|
||||
problems, even with restrictive debug masks.
|
||||
|
||||
If a platform doesn't want this feature, it should stick with the default
|
||||
empty string.
|
||||
|
||||
RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1270279
|
||||
Downstream only:
|
||||
<http://thread.gmane.org/gmane.comp.bios.edk2.devel/2996/focus=3433>.
|
||||
|
||||
Suggested-by: Drew Jones <drjones@redhat.com>
|
||||
Contributed-under: TianoCore Contribution Agreement 1.0
|
||||
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
|
||||
(cherry picked from commit 7ce97b06421434c82095f01a1753a8c9c546cc30)
|
||||
(cherry picked from commit 20b1f1cbd0590aa71c6d99d35e23cf08e0707750)
|
||||
(cherry picked from commit 6734b88cf7abcaf42632e3d2fc469b2169dd2f16)
|
||||
(cherry picked from commit ef77da632559e9baa1c69869e4cbea377068ef27)
|
||||
(cherry picked from commit 58755c51d3252312d80cbcb97928d71199c2f5e1)
|
||||
(cherry picked from commit c3f07e323e76856f1b42ea7b8c598ba3201c28a2)
|
||||
(cherry picked from commit 9f756c1ad83cc81f7d892cd036d59a2b567b02dc)
|
||||
(cherry picked from commit c75aea7a738ac7fb944c0695a4bfffc3985afaa9)
|
||||
---
|
||||
ArmPlatformPkg/ArmPlatformPkg.dec | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/ArmPlatformPkg/ArmPlatformPkg.dec b/ArmPlatformPkg/ArmPlatformPkg.dec
|
||||
index 3a25ddcdc8..b2b58553c7 100644
|
||||
--- a/ArmPlatformPkg/ArmPlatformPkg.dec
|
||||
+++ b/ArmPlatformPkg/ArmPlatformPkg.dec
|
||||
@@ -121,6 +121,13 @@
|
||||
## If set, this will swap settings for HDLCD RED_SELECT and BLUE_SELECT registers
|
||||
gArmPlatformTokenSpaceGuid.PcdArmHdLcdSwapBlueRedSelect|FALSE|BOOLEAN|0x00000045
|
||||
|
||||
+ #
|
||||
+ # Early hello message (ASCII string), printed to the serial port.
|
||||
+ # If set to the empty string, nothing is printed.
|
||||
+ # Otherwise, a trailing CRLF should be specified explicitly.
|
||||
+ #
|
||||
+ gArmPlatformTokenSpaceGuid.PcdEarlyHelloMessage|""|VOID*|0x00000100
|
||||
+
|
||||
[PcdsFixedAtBuild.common,PcdsDynamic.common]
|
||||
## PL031 RealTimeClock
|
||||
gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x0|UINT32|0x00000024
|
||||
--
|
||||
2.31.1
|
||||
|
@ -1,145 +0,0 @@
|
||||
From 2963ff004a52543e54098d6eded5780db8ef6dbe Mon Sep 17 00:00:00 2001
|
||||
From: Laszlo Ersek <lersek@redhat.com>
|
||||
Date: Wed, 14 Oct 2015 13:59:20 +0200
|
||||
Subject: ArmPlatformPkg: PrePeiCore: write early hello message to the serial
|
||||
port (RH)
|
||||
|
||||
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:
|
||||
|
||||
- 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:
|
||||
|
||||
- adapt to upstream commit 7e2a8dfe8a9a ("ArmPlatformPkg/PrePeiCore: seed
|
||||
temporary stack before entering PEI core", 2017-11-09) -- conflict
|
||||
resolution in "ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf"
|
||||
|
||||
Notes about the 20170228-c325e41585e3 -> 20171011-92d07e48907f rebase:
|
||||
|
||||
- no changes
|
||||
|
||||
Notes about the 20160608b-988715a -> 20170228-c325e41585e3 rebase:
|
||||
|
||||
- no changes
|
||||
|
||||
The FixedPcdGetSize() macro expands to an integer constant, therefore an
|
||||
optimizing compiler can eliminate the new code, if the platform DSC
|
||||
doesn't override the empty string (size=1) default of
|
||||
PcdEarlyHelloMessage.
|
||||
|
||||
RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1270279
|
||||
Downstream only:
|
||||
<http://thread.gmane.org/gmane.comp.bios.edk2.devel/2996/focus=3433>.
|
||||
|
||||
Contributed-under: TianoCore Contribution Agreement 1.0
|
||||
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
|
||||
(cherry picked from commit b16c4c505ce0e27305235533eac9236aa66f132e)
|
||||
(cherry picked from commit 742e5bf6d5ce5a1e73879d6e5c0dd00feda7a9ac)
|
||||
(cherry picked from commit 93d69eb9393cf05af90676253875c59c1bec67fd)
|
||||
(cherry picked from commit 638594083b191f84f5d9333eb6147a31570f5a5a)
|
||||
(cherry picked from commit f4b7aae411d88b2b83f85d20ef06a4032a57e7de)
|
||||
(cherry picked from commit bb71490fdda3b38fa9f071d281b863f9b64363bf)
|
||||
(cherry picked from commit 8d5a8827aabc67cb2a046697e1a750ca8d9cc453)
|
||||
(cherry picked from commit 49fe5596cd79c94d903c4d506c563d642ccd69aa)
|
||||
---
|
||||
ArmPlatformPkg/PrePeiCore/MainMPCore.c | 5 +++++
|
||||
ArmPlatformPkg/PrePeiCore/MainUniCore.c | 5 +++++
|
||||
ArmPlatformPkg/PrePeiCore/PrePeiCore.h | 1 +
|
||||
ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf | 2 ++
|
||||
ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf | 2 ++
|
||||
5 files changed, 15 insertions(+)
|
||||
|
||||
diff --git a/ArmPlatformPkg/PrePeiCore/MainMPCore.c b/ArmPlatformPkg/PrePeiCore/MainMPCore.c
|
||||
index b5d0d3a644..5126a6dfb0 100644
|
||||
--- a/ArmPlatformPkg/PrePeiCore/MainMPCore.c
|
||||
+++ b/ArmPlatformPkg/PrePeiCore/MainMPCore.c
|
||||
@@ -116,6 +116,11 @@ PrimaryMain (
|
||||
UINTN TemporaryRamBase;
|
||||
UINTN TemporaryRamSize;
|
||||
|
||||
+ if (FixedPcdGetSize (PcdEarlyHelloMessage) > 1) {
|
||||
+ SerialPortWrite (FixedPcdGetPtr (PcdEarlyHelloMessage),
|
||||
+ FixedPcdGetSize (PcdEarlyHelloMessage) - 1);
|
||||
+ }
|
||||
+
|
||||
CreatePpiList (&PpiListSize, &PpiList);
|
||||
|
||||
// Enable the GIC Distributor
|
||||
diff --git a/ArmPlatformPkg/PrePeiCore/MainUniCore.c b/ArmPlatformPkg/PrePeiCore/MainUniCore.c
|
||||
index 1c2580eb92..2a7580dbb4 100644
|
||||
--- a/ArmPlatformPkg/PrePeiCore/MainUniCore.c
|
||||
+++ b/ArmPlatformPkg/PrePeiCore/MainUniCore.c
|
||||
@@ -29,6 +29,11 @@ PrimaryMain (
|
||||
UINTN TemporaryRamBase;
|
||||
UINTN TemporaryRamSize;
|
||||
|
||||
+ if (FixedPcdGetSize (PcdEarlyHelloMessage) > 1) {
|
||||
+ SerialPortWrite (FixedPcdGetPtr (PcdEarlyHelloMessage),
|
||||
+ FixedPcdGetSize (PcdEarlyHelloMessage) - 1);
|
||||
+ }
|
||||
+
|
||||
CreatePpiList (&PpiListSize, &PpiList);
|
||||
|
||||
// Adjust the Temporary Ram as the new Ppi List (Common + Platform Ppi Lists) is created at
|
||||
diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCore.h b/ArmPlatformPkg/PrePeiCore/PrePeiCore.h
|
||||
index 0345dd7bdd..ae8302becd 100644
|
||||
--- a/ArmPlatformPkg/PrePeiCore/PrePeiCore.h
|
||||
+++ b/ArmPlatformPkg/PrePeiCore/PrePeiCore.h
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <Library/DebugLib.h>
|
||||
#include <Library/IoLib.h>
|
||||
#include <Library/PcdLib.h>
|
||||
+#include <Library/SerialPortLib.h>
|
||||
|
||||
#include <PiPei.h>
|
||||
#include <Ppi/TemporaryRamSupport.h>
|
||||
diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf b/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf
|
||||
index a5b4722459..ea7b220bc8 100644
|
||||
--- a/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf
|
||||
+++ b/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf
|
||||
@@ -66,6 +66,8 @@
|
||||
gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize
|
||||
gArmPlatformTokenSpaceGuid.PcdCPUCoreSecondaryStackSize
|
||||
|
||||
+ gArmPlatformTokenSpaceGuid.PcdEarlyHelloMessage
|
||||
+
|
||||
gArmTokenSpaceGuid.PcdGicDistributorBase
|
||||
gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase
|
||||
gArmTokenSpaceGuid.PcdGicSgiIntId
|
||||
diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf b/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf
|
||||
index 466a2b01c3..29fb8737cb 100644
|
||||
--- a/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf
|
||||
+++ b/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf
|
||||
@@ -64,4 +64,6 @@
|
||||
gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize
|
||||
gArmPlatformTokenSpaceGuid.PcdCPUCoreSecondaryStackSize
|
||||
|
||||
+ gArmPlatformTokenSpaceGuid.PcdEarlyHelloMessage
|
||||
+
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdInitValueInTempStack
|
||||
--
|
||||
2.31.1
|
||||
|
@ -1,82 +0,0 @@
|
||||
From 28f12646106e2b2451d0f204b1d24d9c38e1dbfb Mon Sep 17 00:00:00 2001
|
||||
From: Laszlo Ersek <lersek@redhat.com>
|
||||
Date: Wed, 14 Oct 2015 14:07:17 +0200
|
||||
Subject: ArmVirtPkg: set early hello message (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:
|
||||
|
||||
- context difference from upstream commit f5cb3767038e
|
||||
("ArmVirtPkg/ArmVirtQemu: add ResetSystem PEIM for upcoming TPM2
|
||||
support", 2020-03-04) automatically resolved correctly
|
||||
|
||||
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:
|
||||
|
||||
- resolve context conflict with upstream commit eaa1e98ae31d ("ArmVirtPkg:
|
||||
don't set PcdCoreCount", 2019-02-13)
|
||||
|
||||
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 changes
|
||||
|
||||
Notes about the 20170228-c325e41585e3 -> 20171011-92d07e48907f rebase:
|
||||
|
||||
- no changes
|
||||
|
||||
Notes about the 20160608b-988715a -> 20170228-c325e41585e3 rebase:
|
||||
|
||||
- no changes
|
||||
|
||||
Print a friendly banner on QEMU, regardless of debug mask settings.
|
||||
|
||||
RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1270279
|
||||
Downstream only:
|
||||
<http://thread.gmane.org/gmane.comp.bios.edk2.devel/2996/focus=3433>.
|
||||
|
||||
Contributed-under: TianoCore Contribution Agreement 1.0
|
||||
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
|
||||
(cherry picked from commit 5d4a15b9019728b2d96322bc679099da49916925)
|
||||
(cherry picked from commit 179df76dbb0d199bd905236e98775b4059c6502a)
|
||||
(cherry picked from commit ce3f59d0710c24c162d5222bbf5cd7e36180c80c)
|
||||
(cherry picked from commit c201a8e6ae28d75f7ba581828b533c3b26fa7f18)
|
||||
(cherry picked from commit 2d4db6ec70e004cd9ac147615d17033bee5d3b18)
|
||||
(cherry picked from commit fb2032bbea7e02c426855cf86a323556d493fd8a)
|
||||
(cherry picked from commit ba73b99d5cb38f87c1a8f0936d515eaaefa3f04b)
|
||||
(cherry picked from commit 72550e12ae469012a505bf5b98a6543a754028d3)
|
||||
---
|
||||
ArmVirtPkg/ArmVirtQemu.dsc | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
|
||||
index 7705bf3919..ae35cc1800 100644
|
||||
--- a/ArmVirtPkg/ArmVirtQemu.dsc
|
||||
+++ b/ArmVirtPkg/ArmVirtQemu.dsc
|
||||
@@ -134,6 +134,7 @@
|
||||
gArmVirtTokenSpaceGuid.PcdTpm2SupportEnabled|$(TPM2_ENABLE)
|
||||
|
||||
[PcdsFixedAtBuild.common]
|
||||
+ gArmPlatformTokenSpaceGuid.PcdEarlyHelloMessage|"UEFI firmware starting.\r\n"
|
||||
!if $(ARCH) == AARCH64
|
||||
gArmTokenSpaceGuid.PcdVFPEnabled|1
|
||||
!endif
|
||||
--
|
||||
2.31.1
|
||||
|
@ -1,56 +0,0 @@
|
||||
From eb88cf0cc2cf381e2258c69908c6409a0967cf13 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@redhat.com>
|
||||
Date: Thu, 1 Jul 2021 20:28:54 +0200
|
||||
Subject: ArmVirtPkg: Remove EbcDxe (RHEL only)
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
RH-Author: Philippe Mathieu-Daudé <philmd@redhat.com>
|
||||
RH-MergeRequest: 3: Disable features for RHEL9
|
||||
RH-Commit: [3/19] 5ca7af1a505c16cc568a444398254aca06ca65aa
|
||||
RH-Bugzilla: 1967747
|
||||
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
||||
|
||||
Remove EFI Byte Code interpreter.
|
||||
|
||||
Suggested-by: Laszlo Ersek <lersek@redhat.com>
|
||||
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
||||
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
---
|
||||
ArmVirtPkg/ArmVirt.dsc.inc | 5 -----
|
||||
ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc | 5 -----
|
||||
2 files changed, 10 deletions(-)
|
||||
|
||||
diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc
|
||||
index f15a3f7f06..8ec1119484 100644
|
||||
--- a/ArmVirtPkg/ArmVirt.dsc.inc
|
||||
+++ b/ArmVirtPkg/ArmVirt.dsc.inc
|
||||
@@ -420,8 +420,3 @@
|
||||
<LibraryClasses>
|
||||
NULL|EmbeddedPkg/Library/PlatformHasAcpiLib/PlatformHasAcpiLib.inf
|
||||
}
|
||||
-
|
||||
- #
|
||||
- # EBC support
|
||||
- #
|
||||
- MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
|
||||
diff --git a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
|
||||
index d4df6dede0..7872861330 100644
|
||||
--- a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
|
||||
+++ b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
|
||||
@@ -146,11 +146,6 @@ READ_LOCK_STATUS = TRUE
|
||||
INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
|
||||
INF MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
|
||||
INF OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf
|
||||
-
|
||||
- #
|
||||
- # EBC support
|
||||
- #
|
||||
- INF MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
|
||||
!endif
|
||||
|
||||
#
|
||||
--
|
||||
2.31.1
|
||||
|
@ -0,0 +1,26 @@
|
||||
From 2f497dbe08c4374e02006edb5c2036d7216cd878 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Pawe=C5=82=20Po=C5=82awski?= <ppolawsk@redhat.com>
|
||||
Date: Wed, 7 Dec 2022 03:19:20 +0100
|
||||
Subject: Revert "ArmVirtPkg: make EFI_LOADER_DATA non-executable"
|
||||
|
||||
This reverts commit 2997ae38739756ecba9b0de19e86032ebc689ef9.
|
||||
---
|
||||
ArmVirtPkg/ArmVirt.dsc.inc | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc
|
||||
index 1f0f8d44cd..65bfbc033f 100644
|
||||
--- a/ArmVirtPkg/ArmVirt.dsc.inc
|
||||
+++ b/ArmVirtPkg/ArmVirt.dsc.inc
|
||||
@@ -368,7 +368,7 @@
|
||||
# reserved ones, with the exception of LoaderData regions, of which OS loaders
|
||||
# (i.e., GRUB) may assume that its contents are executable.
|
||||
#
|
||||
- gEfiMdeModulePkgTokenSpaceGuid.PcdDxeNxMemoryProtectionPolicy|0xC000000000007FD5
|
||||
+ gEfiMdeModulePkgTokenSpaceGuid.PcdDxeNxMemoryProtectionPolicy|0xC000000000007FD1
|
||||
|
||||
[Components.common]
|
||||
#
|
||||
--
|
||||
2.38.1
|
||||
|
@ -0,0 +1,216 @@
|
||||
From b6a0dcb7a035aef12e1466fd1017194b9430c948 Mon Sep 17 00:00:00 2001
|
||||
From: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Date: Tue, 13 Dec 2022 10:31:05 +0100
|
||||
Subject: Revert "OvmfPkg/PlatformDxe: Handle all requests in ExtractConfig and
|
||||
RouteConfig"
|
||||
|
||||
This reverts commit aefcc91805fd69e4aad4bc08a9f708db11cae5f0.
|
||||
|
||||
Fixes regression, patch breaks setting display resolution via ovmf
|
||||
platform config.
|
||||
|
||||
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
||||
---
|
||||
OvmfPkg/PlatformDxe/Platform.c | 115 +--------------------------
|
||||
OvmfPkg/PlatformDxe/PlatformConfig.c | 2 +-
|
||||
OvmfPkg/PlatformDxe/PlatformConfig.h | 2 -
|
||||
3 files changed, 3 insertions(+), 116 deletions(-)
|
||||
|
||||
diff --git a/OvmfPkg/PlatformDxe/Platform.c b/OvmfPkg/PlatformDxe/Platform.c
|
||||
index ac31fafbdc..4d432f18df 100644
|
||||
--- a/OvmfPkg/PlatformDxe/Platform.c
|
||||
+++ b/OvmfPkg/PlatformDxe/Platform.c
|
||||
@@ -108,11 +108,6 @@ STATIC EFI_EVENT mGopEvent;
|
||||
//
|
||||
STATIC VOID *mGopTracker;
|
||||
|
||||
-//
|
||||
-// The driver image handle, used to obtain the device path for <ConfigHdr>.
|
||||
-//
|
||||
-STATIC EFI_HANDLE mImageHandle;
|
||||
-
|
||||
//
|
||||
// Cache the resolutions we get from the GOP.
|
||||
//
|
||||
@@ -234,10 +229,6 @@ ExtractConfig (
|
||||
{
|
||||
MAIN_FORM_STATE MainFormState;
|
||||
EFI_STATUS Status;
|
||||
- EFI_STRING ConfigRequestHdr;
|
||||
- EFI_STRING ConfigRequest;
|
||||
- UINTN Size;
|
||||
- BOOLEAN AllocatedRequest;
|
||||
|
||||
DEBUG ((DEBUG_VERBOSE, "%a: Request=\"%s\"\n", __FUNCTION__, Request));
|
||||
|
||||
@@ -245,73 +236,18 @@ ExtractConfig (
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
- ConfigRequestHdr = NULL;
|
||||
- ConfigRequest = NULL;
|
||||
- Size = 0;
|
||||
- AllocatedRequest = FALSE;
|
||||
-
|
||||
- //
|
||||
- // Check if <ConfigHdr> matches the GUID and name
|
||||
- //
|
||||
- *Progress = Request;
|
||||
- if ((Request != NULL) &&
|
||||
- !HiiIsConfigHdrMatch (
|
||||
- Request,
|
||||
- &gOvmfPlatformConfigGuid,
|
||||
- mVariableName
|
||||
- )
|
||||
- )
|
||||
- {
|
||||
- return EFI_NOT_FOUND;
|
||||
- }
|
||||
-
|
||||
Status = PlatformConfigToFormState (&MainFormState);
|
||||
if (EFI_ERROR (Status)) {
|
||||
+ *Progress = Request;
|
||||
return Status;
|
||||
}
|
||||
|
||||
- if ((Request == NULL) || (StrStr (Request, L"OFFSET") == NULL)) {
|
||||
- //
|
||||
- // Request has no <RequestElement>, so construct full request string.
|
||||
- // Allocate and fill a buffer large enough to hold <ConfigHdr>
|
||||
- // followed by "&OFFSET=0&WIDTH=WWWWWWWWWWWWWWWW" followed by a
|
||||
- // null terminator.
|
||||
- //
|
||||
- ConfigRequestHdr = HiiConstructConfigHdr (
|
||||
- &gOvmfPlatformConfigGuid,
|
||||
- mVariableName,
|
||||
- mImageHandle
|
||||
- );
|
||||
- if (ConfigRequestHdr == NULL) {
|
||||
- return EFI_OUT_OF_RESOURCES;
|
||||
- }
|
||||
-
|
||||
- Size = (StrLen (ConfigRequestHdr) + 32 + 1) * sizeof (CHAR16);
|
||||
- ConfigRequest = AllocateZeroPool (Size);
|
||||
- AllocatedRequest = TRUE;
|
||||
- if (ConfigRequest == NULL) {
|
||||
- FreePool (ConfigRequestHdr);
|
||||
- return EFI_OUT_OF_RESOURCES;
|
||||
- }
|
||||
-
|
||||
- UnicodeSPrint (
|
||||
- ConfigRequest,
|
||||
- Size,
|
||||
- L"%s&OFFSET=0&WIDTH=%016LX",
|
||||
- ConfigRequestHdr,
|
||||
- sizeof MainFormState
|
||||
- );
|
||||
- FreePool (ConfigRequestHdr);
|
||||
- } else {
|
||||
- ConfigRequest = Request;
|
||||
- }
|
||||
-
|
||||
//
|
||||
// Answer the textual request keying off the binary form state.
|
||||
//
|
||||
Status = gHiiConfigRouting->BlockToConfig (
|
||||
gHiiConfigRouting,
|
||||
- ConfigRequest,
|
||||
+ Request,
|
||||
(VOID *)&MainFormState,
|
||||
sizeof MainFormState,
|
||||
Results,
|
||||
@@ -329,33 +265,6 @@ ExtractConfig (
|
||||
DEBUG ((DEBUG_VERBOSE, "%a: Results=\"%s\"\n", __FUNCTION__, *Results));
|
||||
}
|
||||
|
||||
- //
|
||||
- // If we used a newly allocated ConfigRequest, update Progress to point to
|
||||
- // original Request instead of ConfigRequest.
|
||||
- //
|
||||
- if (Request == NULL) {
|
||||
- *Progress = NULL;
|
||||
- } else if (StrStr (Request, L"OFFSET") == NULL) {
|
||||
- if (EFI_ERROR (Status)) {
|
||||
- //
|
||||
- // Since we constructed ConfigRequest, failure can only occur if there
|
||||
- // is not enough memory. In this case, we point Progress to the first
|
||||
- // character of Request.
|
||||
- //
|
||||
- *Progress = Request;
|
||||
- } else {
|
||||
- //
|
||||
- // In case of success, we point Progress to the null terminator of
|
||||
- // Request.
|
||||
- //
|
||||
- *Progress = Request + StrLen (Request);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- if (AllocatedRequest) {
|
||||
- FreePool (ConfigRequest);
|
||||
- }
|
||||
-
|
||||
return Status;
|
||||
}
|
||||
|
||||
@@ -439,21 +348,6 @@ RouteConfig (
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
- //
|
||||
- // Check if <ConfigHdr> matches the GUID and name
|
||||
- //
|
||||
- *Progress = Configuration;
|
||||
- if ((Configuration != NULL) &&
|
||||
- !HiiIsConfigHdrMatch (
|
||||
- Configuration,
|
||||
- &gOvmfPlatformConfigGuid,
|
||||
- mVariableName
|
||||
- )
|
||||
- )
|
||||
- {
|
||||
- return EFI_NOT_FOUND;
|
||||
- }
|
||||
-
|
||||
//
|
||||
// the "read" step in RMW
|
||||
//
|
||||
@@ -972,11 +866,6 @@ PlatformInit (
|
||||
return Status;
|
||||
}
|
||||
|
||||
- //
|
||||
- // Save the driver image handle.
|
||||
- //
|
||||
- mImageHandle = ImageHandle;
|
||||
-
|
||||
//
|
||||
// Publish the HII package list to HII Database.
|
||||
//
|
||||
diff --git a/OvmfPkg/PlatformDxe/PlatformConfig.c b/OvmfPkg/PlatformDxe/PlatformConfig.c
|
||||
index f5ac2d0609..e202ac5b47 100644
|
||||
--- a/OvmfPkg/PlatformDxe/PlatformConfig.c
|
||||
+++ b/OvmfPkg/PlatformDxe/PlatformConfig.c
|
||||
@@ -21,7 +21,7 @@
|
||||
//
|
||||
// Name of the UEFI variable that we use for persistent storage.
|
||||
//
|
||||
-CHAR16 mVariableName[] = L"PlatformConfig";
|
||||
+STATIC CHAR16 mVariableName[] = L"PlatformConfig";
|
||||
|
||||
/**
|
||||
Serialize and persistently save platform configuration.
|
||||
diff --git a/OvmfPkg/PlatformDxe/PlatformConfig.h b/OvmfPkg/PlatformDxe/PlatformConfig.h
|
||||
index 5d9b457b1b..902c9b2ce0 100644
|
||||
--- a/OvmfPkg/PlatformDxe/PlatformConfig.h
|
||||
+++ b/OvmfPkg/PlatformDxe/PlatformConfig.h
|
||||
@@ -50,6 +50,4 @@ PlatformConfigLoad (
|
||||
#define PLATFORM_CONFIG_F_GRAPHICS_RESOLUTION BIT0
|
||||
#define PLATFORM_CONFIG_F_DOWNGRADE BIT63
|
||||
|
||||
-extern CHAR16 mVariableName[];
|
||||
-
|
||||
#endif // _PLATFORM_CONFIG_H_
|
||||
--
|
||||
2.38.1
|
||||
|
@ -0,0 +1,231 @@
|
||||
From 8b2cc30989c009ab72951022bd017143764411b2 Mon Sep 17 00:00:00 2001
|
||||
From: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Date: Mon, 28 Nov 2022 13:40:20 +0800
|
||||
Subject: OvmfPkg/SmbiosPlatformDxe: use PcdFirmware*
|
||||
|
||||
Instead of using hard-coded strings ("0.0.0" for BiosVersion etc)
|
||||
which is mostly useless read the PCDs (PcdFirmwareVendor,
|
||||
PcdFirmwareVersionString and PcdFirmwareReleaseDateString) and
|
||||
build the string table dynamuically at runtime.
|
||||
|
||||
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
|
||||
(cherry picked from commit 4cb94f20b002c99dd2b4b75f07c5495b81a34ffd)
|
||||
|
||||
https://issues.redhat.com/browse/RHEL-75
|
||||
---
|
||||
OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c | 115 +++++++++++-------
|
||||
.../SmbiosPlatformDxe/SmbiosPlatformDxe.inf | 6 +
|
||||
.../XenSmbiosPlatformDxe.inf | 9 +-
|
||||
3 files changed, 85 insertions(+), 45 deletions(-)
|
||||
|
||||
diff --git a/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c b/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c
|
||||
index 94249d3ff1..dc1e6aed63 100644
|
||||
--- a/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c
|
||||
+++ b/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c
|
||||
@@ -9,57 +9,43 @@
|
||||
**/
|
||||
|
||||
#include <IndustryStandard/SmBios.h> // SMBIOS_TABLE_TYPE0
|
||||
+#include <Library/BaseLib.h>
|
||||
+#include <Library/BaseMemoryLib.h>
|
||||
#include <Library/DebugLib.h> // ASSERT_EFI_ERROR()
|
||||
+#include <Library/MemoryAllocationLib.h>
|
||||
+#include <Library/PcdLib.h>
|
||||
#include <Library/UefiBootServicesTableLib.h> // gBS
|
||||
#include <Protocol/Smbios.h> // EFI_SMBIOS_PROTOCOL
|
||||
|
||||
#include "SmbiosPlatformDxe.h"
|
||||
|
||||
-#define TYPE0_STRINGS \
|
||||
- "EFI Development Kit II / OVMF\0" /* Vendor */ \
|
||||
- "0.0.0\0" /* BiosVersion */ \
|
||||
- "02/06/2015\0" /* BiosReleaseDate */
|
||||
-//
|
||||
-// Type definition and contents of the default Type 0 SMBIOS table.
|
||||
-//
|
||||
-#pragma pack(1)
|
||||
-typedef struct {
|
||||
- SMBIOS_TABLE_TYPE0 Base;
|
||||
- UINT8 Strings[sizeof (TYPE0_STRINGS)];
|
||||
-} OVMF_TYPE0;
|
||||
-#pragma pack()
|
||||
-
|
||||
-STATIC CONST OVMF_TYPE0 mOvmfDefaultType0 = {
|
||||
+STATIC CONST SMBIOS_TABLE_TYPE0 mOvmfDefaultType0 = {
|
||||
+ // SMBIOS_STRUCTURE Hdr
|
||||
{
|
||||
- // SMBIOS_STRUCTURE Hdr
|
||||
- {
|
||||
- EFI_SMBIOS_TYPE_BIOS_INFORMATION, // UINT8 Type
|
||||
- sizeof (SMBIOS_TABLE_TYPE0), // UINT8 Length
|
||||
- },
|
||||
- 1, // SMBIOS_TABLE_STRING Vendor
|
||||
- 2, // SMBIOS_TABLE_STRING BiosVersion
|
||||
- 0xE800, // UINT16 BiosSegment
|
||||
- 3, // SMBIOS_TABLE_STRING BiosReleaseDate
|
||||
- 0, // UINT8 BiosSize
|
||||
- { // MISC_BIOS_CHARACTERISTICS BiosCharacteristics
|
||||
- 0, // Reserved :2
|
||||
- 0, // Unknown :1
|
||||
- 1, // BiosCharacteristicsNotSupported :1
|
||||
- // Remaining BiosCharacteristics bits left unset :60
|
||||
- },
|
||||
- { // BIOSCharacteristicsExtensionBytes[2]
|
||||
- 0, // BiosReserved
|
||||
- 0x1C // SystemReserved = VirtualMachineSupported |
|
||||
- // UefiSpecificationSupported |
|
||||
- // TargetContentDistributionEnabled
|
||||
- },
|
||||
- 0, // UINT8 SystemBiosMajorRelease
|
||||
- 0, // UINT8 SystemBiosMinorRelease
|
||||
- 0xFF, // UINT8 EmbeddedControllerFirmwareMajorRelease
|
||||
- 0xFF // UINT8 EmbeddedControllerFirmwareMinorRelease
|
||||
+ EFI_SMBIOS_TYPE_BIOS_INFORMATION, // UINT8 Type
|
||||
+ sizeof (SMBIOS_TABLE_TYPE0), // UINT8 Length
|
||||
},
|
||||
- // Text strings (unformatted area)
|
||||
- TYPE0_STRINGS
|
||||
+ 1, // SMBIOS_TABLE_STRING Vendor
|
||||
+ 2, // SMBIOS_TABLE_STRING BiosVersion
|
||||
+ 0xE800, // UINT16 BiosSegment
|
||||
+ 3, // SMBIOS_TABLE_STRING BiosReleaseDate
|
||||
+ 0, // UINT8 BiosSize
|
||||
+ { // MISC_BIOS_CHARACTERISTICS BiosCharacteristics
|
||||
+ 0, // Reserved :2
|
||||
+ 0, // Unknown :1
|
||||
+ 1, // BiosCharacteristicsNotSupported :1
|
||||
+ // Remaining BiosCharacteristics bits left unset :60
|
||||
+ },
|
||||
+ { // BIOSCharacteristicsExtensionBytes[2]
|
||||
+ 0, // BiosReserved
|
||||
+ 0x1C // SystemReserved = VirtualMachineSupported |
|
||||
+ // UefiSpecificationSupported |
|
||||
+ // TargetContentDistributionEnabled
|
||||
+ },
|
||||
+ 0, // UINT8 SystemBiosMajorRelease
|
||||
+ 0, // UINT8 SystemBiosMinorRelease
|
||||
+ 0xFF, // UINT8 EmbeddedControllerFirmwareMajorRelease
|
||||
+ 0xFF // UINT8 EmbeddedControllerFirmwareMinorRelease
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -153,14 +139,55 @@ InstallAllStructures (
|
||||
//
|
||||
// Add OVMF default Type 0 (BIOS Information) table
|
||||
//
|
||||
+ CHAR16 *VendStr, *VersStr, *DateStr;
|
||||
+ UINTN VendLen, VersLen, DateLen;
|
||||
+ CHAR8 *Type0;
|
||||
+
|
||||
+ VendStr = (CHAR16 *)FixedPcdGetPtr (PcdFirmwareVendor);
|
||||
+ VendLen = StrLen (VendStr);
|
||||
+ if (VendLen < 3) {
|
||||
+ VendStr = L"unknown";
|
||||
+ VendLen = StrLen (VendStr);
|
||||
+ }
|
||||
+
|
||||
+ VersStr = (CHAR16 *)FixedPcdGetPtr (PcdFirmwareVersionString);
|
||||
+ VersLen = StrLen (VersStr);
|
||||
+ if (VersLen < 3) {
|
||||
+ VersStr = L"unknown";
|
||||
+ VersLen = StrLen (VersStr);
|
||||
+ }
|
||||
+
|
||||
+ DateStr = (CHAR16 *)FixedPcdGetPtr (PcdFirmwareReleaseDateString);
|
||||
+ DateLen = StrLen (DateStr);
|
||||
+ if (DateLen < 3) {
|
||||
+ DateStr = L"unknown";
|
||||
+ DateLen = StrLen (DateStr);
|
||||
+ }
|
||||
+
|
||||
+ DEBUG ((DEBUG_INFO, "FirmwareVendor: \"%s\" (%d chars)\n", VendStr, VendLen));
|
||||
+ DEBUG ((DEBUG_INFO, "FirmwareVersionString: \"%s\" (%d chars)\n", VersStr, VersLen));
|
||||
+ DEBUG ((DEBUG_INFO, "FirmwareReleaseDateString: \"%s\" (%d chars)\n", DateStr, DateLen));
|
||||
+
|
||||
+ Type0 = AllocateZeroPool (sizeof (mOvmfDefaultType0) + VendLen + VersLen + DateLen + 4);
|
||||
+ if (Type0 == NULL) {
|
||||
+ return EFI_OUT_OF_RESOURCES;
|
||||
+ }
|
||||
+
|
||||
+ CopyMem (Type0, &mOvmfDefaultType0, sizeof (mOvmfDefaultType0));
|
||||
+ UnicodeStrToAsciiStrS (VendStr, Type0 + sizeof (mOvmfDefaultType0), VendLen + 1);
|
||||
+ UnicodeStrToAsciiStrS (VersStr, Type0 + sizeof (mOvmfDefaultType0) + VendLen + 1, VersLen + 1);
|
||||
+ UnicodeStrToAsciiStrS (DateStr, Type0 + sizeof (mOvmfDefaultType0) + VendLen + VersLen + 2, DateLen + 1);
|
||||
+
|
||||
SmbiosHandle = SMBIOS_HANDLE_PI_RESERVED;
|
||||
Status = Smbios->Add (
|
||||
Smbios,
|
||||
NULL,
|
||||
&SmbiosHandle,
|
||||
- (EFI_SMBIOS_TABLE_HEADER *)&mOvmfDefaultType0
|
||||
+ (EFI_SMBIOS_TABLE_HEADER *)Type0
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
+
|
||||
+ FreePool (Type0);
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
diff --git a/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf b/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
|
||||
index 0066bbc922..52689c96e5 100644
|
||||
--- a/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
|
||||
+++ b/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
|
||||
@@ -32,9 +32,12 @@
|
||||
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
+ MdeModulePkg/MdeModulePkg.dec
|
||||
OvmfPkg/OvmfPkg.dec
|
||||
|
||||
[LibraryClasses]
|
||||
+ BaseLib
|
||||
+ BaseMemoryLib
|
||||
DebugLib
|
||||
MemoryAllocationLib
|
||||
PcdLib
|
||||
@@ -45,6 +48,9 @@
|
||||
[Pcd]
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfHostBridgePciDevId
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdQemuSmbiosValidated
|
||||
+ gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVendor
|
||||
+ gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString
|
||||
+ gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareReleaseDateString
|
||||
|
||||
[Protocols]
|
||||
gEfiSmbiosProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
||||
diff --git a/OvmfPkg/SmbiosPlatformDxe/XenSmbiosPlatformDxe.inf b/OvmfPkg/SmbiosPlatformDxe/XenSmbiosPlatformDxe.inf
|
||||
index 7f4588e33d..e646c88741 100644
|
||||
--- a/OvmfPkg/SmbiosPlatformDxe/XenSmbiosPlatformDxe.inf
|
||||
+++ b/OvmfPkg/SmbiosPlatformDxe/XenSmbiosPlatformDxe.inf
|
||||
@@ -38,19 +38,26 @@
|
||||
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
+ MdeModulePkg/MdeModulePkg.dec
|
||||
|
||||
[Packages.IA32, Packages.X64]
|
||||
OvmfPkg/OvmfPkg.dec
|
||||
|
||||
[LibraryClasses]
|
||||
+ BaseLib
|
||||
+ BaseMemoryLib
|
||||
DebugLib
|
||||
UefiBootServicesTableLib
|
||||
UefiDriverEntryPoint
|
||||
|
||||
[LibraryClasses.IA32, LibraryClasses.X64]
|
||||
- BaseLib
|
||||
HobLib
|
||||
|
||||
+[Pcd]
|
||||
+ gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVendor
|
||||
+ gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString
|
||||
+ gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareReleaseDateString
|
||||
+
|
||||
[Protocols]
|
||||
gEfiSmbiosProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
||||
|
||||
--
|
||||
2.38.1
|
||||
|
@ -0,0 +1,29 @@
|
||||
{
|
||||
"description": "OVMF with TDX support",
|
||||
"interface-types": [
|
||||
"uefi"
|
||||
],
|
||||
"mapping": {
|
||||
"device": "flash",
|
||||
"mode": "stateless",
|
||||
"executable": {
|
||||
"filename": "/usr/share/edk2/ovmf/OVMF.inteltdx.fd",
|
||||
"format": "raw"
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"architecture": "x86_64",
|
||||
"machines": [
|
||||
"pc-q35-*"
|
||||
]
|
||||
}
|
||||
],
|
||||
"features": [
|
||||
"intel-tdx",
|
||||
"verbose-dynamic"
|
||||
],
|
||||
"tags": [
|
||||
|
||||
]
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2017 Patrick Uiterwijk
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
@ -1,22 +0,0 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIDoDCCAoigAwIBAgIJAP71iOjzlsDxMA0GCSqGSIb3DQEBCwUAMFExKzApBgNV
|
||||
BAMTIlJlZCBIYXQgU2VjdXJlIEJvb3QgKFBLL0tFSyBrZXkgMSkxIjAgBgkqhkiG
|
||||
9w0BCQEWE3NlY2FsZXJ0QHJlZGhhdC5jb20wHhcNMTQxMDMxMTExNTM3WhcNMzcx
|
||||
MDI1MTExNTM3WjBRMSswKQYDVQQDEyJSZWQgSGF0IFNlY3VyZSBCb290IChQSy9L
|
||||
RUsga2V5IDEpMSIwIAYJKoZIhvcNAQkBFhNzZWNhbGVydEByZWRoYXQuY29tMIIB
|
||||
IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAkB+Ee42865cmgm2Iq4rJjGhw
|
||||
+d9LB7I3gwsCyGdoMJ7j8PCZSrhZV8ZB9jiL/mZMSek3N5IumAEeWxRQ5qiNJQ31
|
||||
huarMMtAFuqNixaGcEM38s7Akd9xFI6ZDom2TG0kHozkL08l0LoG+MboGRh2cx2B
|
||||
bajYBc86yHsoyDajFg0pjJmaaNyrwE2Nv1q7K6k5SwSXHPk2u8U6hgSur9SCe+Cr
|
||||
3kkFaPz2rmgabJBNVxk8ZGYD9sdSm/eUz5NqoWjJqs+Za7yqXgjnORz3+A+6Bn7x
|
||||
y+h23f4i2q06Xls06rPJ4E0EKX64YLkF77XZF1hWFmC5MDLwNkrD8nmNEkBw8wID
|
||||
AQABo3sweTAJBgNVHRMEAjAAMCwGCWCGSAGG+EIBDQQfFh1PcGVuU1NMIEdlbmVy
|
||||
YXRlZCBDZXJ0aWZpY2F0ZTAdBgNVHQ4EFgQUPOlg4/8ZoQp7o0L0jUIutNWccuww
|
||||
HwYDVR0jBBgwFoAUPOlg4/8ZoQp7o0L0jUIutNWccuwwDQYJKoZIhvcNAQELBQAD
|
||||
ggEBAFxNkoi0gl8drYsR7N8GpnqlK583VQyNbgUArbcMQYlpz9ZlBptReNKtx7+c
|
||||
3AVzf+ceORO06rYwfUB1q5xDC9+wwhu/MOD0/sDbYiGY9sWv3jtPSQrmHvmGsD8N
|
||||
1tRGN9tUdF7/EcJgxnBYxRxv7LLYbm/DvDOHOKTzRGScNDsolCZ4J58WF+g7aQol
|
||||
qXM2fp43XOzoP9uR+RKzPc7n3RXDrowFIGGbld6br/qxXBzll+fDNBGF9YonJqRw
|
||||
NuwM9oM9kPc28/nzFdSQYr5TtK/TSa/v9HPoe3bkRCo3uoGkmQw6MSRxoOTktxrL
|
||||
R+SqIs/vdWGA40O3SFdzET14m2k=
|
||||
-----END CERTIFICATE-----
|
@ -0,0 +1,86 @@
|
||||
From f6d83cd74def6af6ab27ddda15112cdf59c853d5 Mon Sep 17 00:00:00 2001
|
||||
From: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Date: Mon, 16 Jan 2023 10:46:39 +0100
|
||||
Subject: [PATCH] ArmVirt: don't use unaligned CopyMem () on NOR flash
|
||||
|
||||
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
|
||||
RH-MergeRequest: 23: ArmVirt: don't use unaligned CopyMem () on NOR flash
|
||||
RH-Bugzilla: 2158173
|
||||
RH-Acked-by: Oliver Steffen <osteffen@redhat.com>
|
||||
RH-Commit: [1/1] 7c8b7e5cd9c239dd8d040450bd4d479ef789114b (kraxel/centos-edk2)
|
||||
|
||||
Commit 789a72328553 reclassified the NOR flash region as EFI_MEMORY_WC
|
||||
in the OS visible EFI memory map, and dropped the explicit aligned
|
||||
CopyMem() implementation, in the assumption that EFI_MEMORY_WC will be
|
||||
honored by the OS, and that the region will be mapped in a way that
|
||||
tolerates misaligned accesseses. However, Linux today uses device
|
||||
attributes for all EFI MMIO regions, in spite of the memory type
|
||||
attributes, and so using misaligned accesses is never safe.
|
||||
|
||||
So instead, switch to the generic CopyMem() implementation entirely,
|
||||
just like we already did for VariableRuntimeDxe.
|
||||
|
||||
Fixes: 789a72328553 ("OvmfPkg/VirtNorFlashDxe: use EFI_MEMORY_WC and drop AlignedCopyMem()")
|
||||
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
|
||||
(cherry picked from commit 987cc09c7cf38d628063062483e2341fba679b0e)
|
||||
---
|
||||
ArmVirtPkg/ArmVirtKvmTool.dsc | 6 +++++-
|
||||
ArmVirtPkg/ArmVirtQemu.dsc | 6 +++++-
|
||||
ArmVirtPkg/ArmVirtQemuKernel.dsc | 6 +++++-
|
||||
3 files changed, 15 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/ArmVirtPkg/ArmVirtKvmTool.dsc b/ArmVirtPkg/ArmVirtKvmTool.dsc
|
||||
index 2ba00bd08f..d0afe1b49e 100644
|
||||
--- a/ArmVirtPkg/ArmVirtKvmTool.dsc
|
||||
+++ b/ArmVirtPkg/ArmVirtKvmTool.dsc
|
||||
@@ -296,7 +296,11 @@
|
||||
NULL|ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf
|
||||
}
|
||||
|
||||
- OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.inf
|
||||
+ OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.inf {
|
||||
+ <LibraryClasses>
|
||||
+ # don't use unaligned CopyMem () on the UEFI varstore NOR flash region
|
||||
+ BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
|
||||
+ }
|
||||
|
||||
MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
|
||||
|
||||
diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
|
||||
index a4bd72e481..76389e6bd4 100644
|
||||
--- a/ArmVirtPkg/ArmVirtQemu.dsc
|
||||
+++ b/ArmVirtPkg/ArmVirtQemu.dsc
|
||||
@@ -428,7 +428,11 @@
|
||||
<LibraryClasses>
|
||||
NULL|ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf
|
||||
}
|
||||
- OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.inf
|
||||
+ OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.inf {
|
||||
+ <LibraryClasses>
|
||||
+ # don't use unaligned CopyMem () on the UEFI varstore NOR flash region
|
||||
+ BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
|
||||
+ }
|
||||
MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
|
||||
|
||||
#
|
||||
diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc
|
||||
index 7f85b0dc92..0445a89b1c 100644
|
||||
--- a/ArmVirtPkg/ArmVirtQemuKernel.dsc
|
||||
+++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc
|
||||
@@ -331,7 +331,11 @@
|
||||
<LibraryClasses>
|
||||
NULL|ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf
|
||||
}
|
||||
- OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.inf
|
||||
+ OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.inf {
|
||||
+ <LibraryClasses>
|
||||
+ # don't use unaligned CopyMem () on the UEFI varstore NOR flash region
|
||||
+ BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
|
||||
+ }
|
||||
MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
|
||||
|
||||
#
|
||||
--
|
||||
2.31.1
|
||||
|
@ -0,0 +1,97 @@
|
||||
From 0517c19dff1e3fd8e16a38533d39e4b9bd32f54e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Pawe=C5=82=20Po=C5=82awski?= <ppolawsk@redhat.com>
|
||||
Date: Tue, 15 Nov 2022 01:02:51 +0100
|
||||
Subject: [PATCH 2/2] MdePkg: Remove Itanium leftover data structure (RH only)
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
RH-Author: Pawel Polawski <ppolawsk@redhat.com>
|
||||
RH-MergeRequest: 22: MdePkg: Remove Itanium leftover data structure (RH only)
|
||||
RH-Bugzilla: 1983086
|
||||
RH-Acked-by: Gerd Hoffmann <kraxel@redhat.com>
|
||||
RH-Acked-by: Oliver Steffen <osteffen@redhat.com>
|
||||
RH-Commit: [1/1] d7f46e0657016668a3c00309ed1d95aea7c55c97
|
||||
|
||||
Itanium support has been removed from EDK2 aroun 2019.
|
||||
ITANIUM_HANDOFF_STATUS data structure looks to be
|
||||
some leftover from that process.
|
||||
|
||||
There is also positive sidefect of this data structure removal.
|
||||
Due to HOB allocation type used in PEI stage there is a limit
|
||||
how much data about virtual CPU can be hold. This limit result
|
||||
in only 1024 vCPU can be used by VM.
|
||||
With Itanium related data structure removed more allocated space
|
||||
can be used for vCPU data and with current allocation limit
|
||||
will change from 1024 to around 8k vCPUs.
|
||||
|
||||
Signed-off-by: Paweł Poławski <ppolawsk@redhat.com>
|
||||
---
|
||||
MdePkg/Include/Ppi/SecPlatformInformation.h | 44 ---------------------
|
||||
1 file changed, 44 deletions(-)
|
||||
|
||||
diff --git a/MdePkg/Include/Ppi/SecPlatformInformation.h b/MdePkg/Include/Ppi/SecPlatformInformation.h
|
||||
index 02b0711f18..fbcd205acd 100644
|
||||
--- a/MdePkg/Include/Ppi/SecPlatformInformation.h
|
||||
+++ b/MdePkg/Include/Ppi/SecPlatformInformation.h
|
||||
@@ -84,49 +84,6 @@ typedef union {
|
||||
|
||||
typedef EFI_HEALTH_FLAGS X64_HANDOFF_STATUS;
|
||||
typedef EFI_HEALTH_FLAGS IA32_HANDOFF_STATUS;
|
||||
-///
|
||||
-/// The hand-off status structure for Itanium architecture.
|
||||
-///
|
||||
-typedef struct {
|
||||
- ///
|
||||
- /// SALE_ENTRY state : 3 = Recovery_Check
|
||||
- /// and 0 = RESET or Normal_Boot phase.
|
||||
- ///
|
||||
- UINT8 BootPhase;
|
||||
- ///
|
||||
- /// Firmware status on entry to SALE.
|
||||
- ///
|
||||
- UINT8 FWStatus;
|
||||
- UINT16 Reserved1;
|
||||
- UINT32 Reserved2;
|
||||
- ///
|
||||
- /// Geographically significant unique processor ID assigned by PAL.
|
||||
- ///
|
||||
- UINT16 ProcId;
|
||||
- UINT16 Reserved3;
|
||||
- UINT8 IdMask;
|
||||
- UINT8 EidMask;
|
||||
- UINT16 Reserved4;
|
||||
- ///
|
||||
- /// Address to make PAL calls.
|
||||
- ///
|
||||
- UINT64 PalCallAddress;
|
||||
- ///
|
||||
- /// If the entry state is RECOVERY_CHECK, this contains the PAL_RESET
|
||||
- /// return address, and if entry state is RESET, this contains
|
||||
- /// address for PAL_authentication call.
|
||||
- ///
|
||||
- UINT64 PalSpecialAddress;
|
||||
- ///
|
||||
- /// GR35 from PALE_EXIT state.
|
||||
- ///
|
||||
- UINT64 SelfTestStatus;
|
||||
- ///
|
||||
- /// GR37 from PALE_EXIT state.
|
||||
- ///
|
||||
- UINT64 SelfTestControl;
|
||||
- UINT64 MemoryBufferRequired;
|
||||
-} ITANIUM_HANDOFF_STATUS;
|
||||
|
||||
///
|
||||
/// EFI_SEC_PLATFORM_INFORMATION_RECORD.
|
||||
@@ -134,7 +91,6 @@ typedef struct {
|
||||
typedef union {
|
||||
IA32_HANDOFF_STATUS IA32HealthFlags;
|
||||
X64_HANDOFF_STATUS x64HealthFlags;
|
||||
- ITANIUM_HANDOFF_STATUS ItaniumHealthFlags;
|
||||
} EFI_SEC_PLATFORM_INFORMATION_RECORD;
|
||||
|
||||
/**
|
||||
--
|
||||
2.31.1
|
||||
|
@ -0,0 +1,67 @@
|
||||
From a7e155d9d0be18b9db31dd7135e9da2bc955e6b4 Mon Sep 17 00:00:00 2001
|
||||
From: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Date: Wed, 11 Jan 2023 19:00:23 +0100
|
||||
Subject: [PATCH 1/2] OvmfPkg/VirtNorFlashDxe: map flash memory as uncacheable
|
||||
|
||||
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
|
||||
RH-MergeRequest: 21: OvmfPkg/VirtNorFlashDxe: map flash memory as uncacheable
|
||||
RH-Bugzilla: 2158173
|
||||
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
RH-Acked-by: Oliver Steffen <osteffen@redhat.com>
|
||||
RH-Commit: [1/1] 819cd72096fa9f253eef7b532122183b608c0064 (kraxel/centos-edk2)
|
||||
|
||||
Switching from the ArmPlatformPkg/NorFlashDxe driver to the
|
||||
OvmfPkg/VirtNorFlashDxe driver had the side effect that flash address
|
||||
space got registered as EFI_MEMORY_WC instead of EFI_MEMORY_UC.
|
||||
|
||||
That confuses the linux kernel's numa code, seems this makes kernel
|
||||
consider the flash being node memory. "lsmem" changes from ...
|
||||
|
||||
RANGE SIZE STATE REMOVABLE BLOCK
|
||||
0x0000000040000000-0x000000013fffffff 4G online yes 8-39
|
||||
|
||||
... to ...
|
||||
|
||||
RANGE SIZE STATE REMOVABLE BLOCK
|
||||
0x0000000000000000-0x0000000007ffffff 128M online yes 0
|
||||
0x0000000040000000-0x000000013fffffff 4G online yes 8-39
|
||||
|
||||
... and in the kernel log got new error lines:
|
||||
|
||||
NUMA: Warning: invalid memblk node 512 [mem 0x0000000004000000-0x0000000007ffffff]
|
||||
NUMA: Faking a node at [mem 0x0000000004000000-0x000000013fffffff]
|
||||
|
||||
Changing the attributes back to EFI_MEMORY_UC fixes this.
|
||||
|
||||
Fixes: b92298af8218 ("ArmVirtPkg/ArmVirtQemu: migrate to OVMF's VirtNorFlashDxe")
|
||||
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
|
||||
(cherry picked from commit e5ec3ba409b5baa9cf429cc25fdf3c8d1b8dcef0)
|
||||
---
|
||||
OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.c b/OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.c
|
||||
index ff3121af2a..f9a41f6aab 100644
|
||||
--- a/OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.c
|
||||
+++ b/OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.c
|
||||
@@ -394,14 +394,14 @@ NorFlashFvbInitialize (
|
||||
EfiGcdMemoryTypeMemoryMappedIo,
|
||||
Instance->DeviceBaseAddress,
|
||||
RuntimeMmioRegionSize,
|
||||
- EFI_MEMORY_WC | EFI_MEMORY_RUNTIME
|
||||
+ EFI_MEMORY_UC | EFI_MEMORY_RUNTIME
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
Status = gDS->SetMemorySpaceAttributes (
|
||||
Instance->DeviceBaseAddress,
|
||||
RuntimeMmioRegionSize,
|
||||
- EFI_MEMORY_WC | EFI_MEMORY_RUNTIME
|
||||
+ EFI_MEMORY_UC | EFI_MEMORY_RUNTIME
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
--
|
||||
2.31.1
|
||||
|
@ -0,0 +1,33 @@
|
||||
From 5722005baa03df51b9376f05274981524e513d93 Mon Sep 17 00:00:00 2001
|
||||
From: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Date: Thu, 2 Mar 2023 12:01:36 +0100
|
||||
Subject: [PATCH] OvmfPkg: disable dynamic mmio window (rhel only)
|
||||
|
||||
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
|
||||
RH-MergeRequest: 29: OvmfPkg: disable dynamic mmio window (rhel only)
|
||||
RH-Bugzilla: 2174605
|
||||
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
||||
RH-Commit: [1/1] a1faf2d01025e5f5be7dbc29af1b0b57631d6230 (kraxel/centos-edk2)
|
||||
|
||||
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
||||
---
|
||||
OvmfPkg/Library/PlatformInitLib/MemDetect.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/OvmfPkg/Library/PlatformInitLib/MemDetect.c b/OvmfPkg/Library/PlatformInitLib/MemDetect.c
|
||||
index b8feae4309..55e02417e4 100644
|
||||
--- a/OvmfPkg/Library/PlatformInitLib/MemDetect.c
|
||||
+++ b/OvmfPkg/Library/PlatformInitLib/MemDetect.c
|
||||
@@ -617,7 +617,8 @@ PlatformDynamicMmioWindow (
|
||||
AddrSpace = LShiftU64 (1, PlatformInfoHob->PhysMemAddressWidth);
|
||||
MmioSpace = LShiftU64 (1, PlatformInfoHob->PhysMemAddressWidth - 3);
|
||||
|
||||
- if ((PlatformInfoHob->PcdPciMmio64Size < MmioSpace) &&
|
||||
+ if (FALSE /* disable for RHEL-9.2, libvirt is not ready yet */ &&
|
||||
+ (PlatformInfoHob->PcdPciMmio64Size < MmioSpace) &&
|
||||
(PlatformInfoHob->PcdPciMmio64Base + MmioSpace < AddrSpace))
|
||||
{
|
||||
DEBUG ((DEBUG_INFO, "%a: using dynamic mmio window\n", __func__));
|
||||
--
|
||||
2.39.1
|
||||
|
@ -0,0 +1,95 @@
|
||||
From fc45137e55e73a3ba59fd28868e24521a28a9a6e Mon Sep 17 00:00:00 2001
|
||||
From: Oliver Steffen <osteffen@redhat.com>
|
||||
Date: Tue, 31 Jan 2023 15:32:28 +0100
|
||||
Subject: [PATCH] Revert "ArmVirtPkg/ArmVirtQemu: enable initial ID map at
|
||||
early boot"
|
||||
|
||||
RH-Author: Oliver Steffen <osteffen@redhat.com>
|
||||
RH-MergeRequest: 25: Revert "ArmVirtPkg/ArmVirtQemu: enable initial ID map at early boot"
|
||||
RH-Bugzilla: 2157656
|
||||
RH-Acked-by: Gerd Hoffmann <kraxel@redhat.com>
|
||||
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
RH-Commit: [1/1] b236b89984f7b7890089ba65228073ab79063b34 (osteffen/edk2)
|
||||
|
||||
This reverts commit 07be1d34d95460a238fcd0f6693efb747c28b329,
|
||||
which causes the firmware to crash early on AARCH64.
|
||||
|
||||
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2157656
|
||||
|
||||
There is a potential fix upstream:
|
||||
https://github.com/tianocore/edk2/pull/3878/commits
|
||||
|
||||
We need to reevaluate on the next rebase if the fix works and if we can
|
||||
drop this revert-comment.
|
||||
|
||||
Signed-off-by: Oliver Steffen <osteffen@redhat.com>
|
||||
---
|
||||
ArmVirtPkg/ArmVirtQemu.dsc | 17 +++--------------
|
||||
ArmVirtPkg/ArmVirtQemu.fdf | 2 +-
|
||||
2 files changed, 4 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
|
||||
index 76389e6bd4..3bf51b09aa 100644
|
||||
--- a/ArmVirtPkg/ArmVirtQemu.dsc
|
||||
+++ b/ArmVirtPkg/ArmVirtQemu.dsc
|
||||
@@ -64,6 +64,8 @@
|
||||
QemuFwCfgSimpleParserLib|OvmfPkg/Library/QemuFwCfgSimpleParserLib/QemuFwCfgSimpleParserLib.inf
|
||||
QemuLoadImageLib|OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.inf
|
||||
|
||||
+ ArmPlatformLib|ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibNull.inf
|
||||
+
|
||||
TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf
|
||||
VirtNorFlashPlatformLib|ArmVirtPkg/Library/NorFlashQemuLib/NorFlashQemuLib.inf
|
||||
|
||||
@@ -91,12 +93,6 @@
|
||||
TpmPlatformHierarchyLib|SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLibNull/PeiDxeTpmPlatformHierarchyLib.inf
|
||||
!endif
|
||||
|
||||
-[LibraryClasses.AARCH64]
|
||||
- ArmPlatformLib|ArmVirtPkg/Library/ArmPlatformLibQemu/ArmPlatformLibQemu.inf
|
||||
-
|
||||
-[LibraryClasses.ARM]
|
||||
- ArmPlatformLib|ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibNull.inf
|
||||
-
|
||||
[LibraryClasses.common.PEIM]
|
||||
ArmVirtMemInfoLib|ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoPeiLib.inf
|
||||
|
||||
@@ -117,8 +113,6 @@
|
||||
UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
|
||||
|
||||
[BuildOptions]
|
||||
- GCC:*_*_AARCH64_CC_XIPFLAGS ==
|
||||
-
|
||||
!include NetworkPkg/NetworkBuildOptions.dsc.inc
|
||||
|
||||
################################################################################
|
||||
@@ -330,12 +324,7 @@
|
||||
ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf
|
||||
MdeModulePkg/Core/Pei/PeiMain.inf
|
||||
ArmPlatformPkg/PlatformPei/PlatformPeim.inf
|
||||
- ArmVirtPkg/MemoryInitPei/MemoryInitPeim.inf {
|
||||
- <LibraryClasses>
|
||||
-!if $(ARCH) == AARCH64
|
||||
- ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuPeiLib.inf
|
||||
-!endif
|
||||
- }
|
||||
+ ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf
|
||||
ArmPkg/Drivers/CpuPei/CpuPei.inf
|
||||
|
||||
!if $(TPM2_ENABLE) == TRUE
|
||||
diff --git a/ArmVirtPkg/ArmVirtQemu.fdf b/ArmVirtPkg/ArmVirtQemu.fdf
|
||||
index 764f652afd..c61ed36d89 100644
|
||||
--- a/ArmVirtPkg/ArmVirtQemu.fdf
|
||||
+++ b/ArmVirtPkg/ArmVirtQemu.fdf
|
||||
@@ -107,7 +107,7 @@ READ_LOCK_STATUS = TRUE
|
||||
INF ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf
|
||||
INF MdeModulePkg/Core/Pei/PeiMain.inf
|
||||
INF ArmPlatformPkg/PlatformPei/PlatformPeim.inf
|
||||
- INF ArmVirtPkg/MemoryInitPei/MemoryInitPeim.inf
|
||||
+ INF ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf
|
||||
INF ArmPkg/Drivers/CpuPei/CpuPei.inf
|
||||
INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
|
||||
|
||||
--
|
||||
2.31.1
|
||||
|
@ -0,0 +1,72 @@
|
||||
From ca0c903fb6d028d679e7afef22d70914ad920212 Mon Sep 17 00:00:00 2001
|
||||
From: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Date: Tue, 14 Feb 2023 12:48:06 +0100
|
||||
Subject: [PATCH] Revert "MdeModulePkg: TerminalDxe: add other text resolutions
|
||||
(RHEL only)"
|
||||
|
||||
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
|
||||
RH-MergeRequest: 28: Revert "MdeModulePkg: TerminalDxe: add other text resolutions (RHEL only)"
|
||||
RH-Bugzilla: 2162307
|
||||
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
RH-Commit: [1/1] aa3432ccf8e01b9e9058fe82a6a22c28137b8b4c (kraxel/centos-edk2)
|
||||
|
||||
This reverts commit cef6b69ea8f009aeba50b2f4b69889f9500fa585.
|
||||
---
|
||||
.../Universal/Console/TerminalDxe/Terminal.c | 41 ++-----------------
|
||||
1 file changed, 3 insertions(+), 38 deletions(-)
|
||||
|
||||
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c
|
||||
index dfd9c96773..e2d779c783 100644
|
||||
--- a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c
|
||||
+++ b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c
|
||||
@@ -112,44 +112,9 @@ TERMINAL_DEV mTerminalDevTemplate = {
|
||||
};
|
||||
|
||||
TERMINAL_CONSOLE_MODE_DATA mTerminalConsoleModeData[] = {
|
||||
- { 80, 25 }, // from graphics resolution 640 x 480
|
||||
- { 80, 50 }, // from graphics resolution 640 x 960
|
||||
- { 100, 25 }, // from graphics resolution 800 x 480
|
||||
- { 100, 31 }, // from graphics resolution 800 x 600
|
||||
- { 104, 32 }, // from graphics resolution 832 x 624
|
||||
- { 120, 33 }, // from graphics resolution 960 x 640
|
||||
- { 128, 31 }, // from graphics resolution 1024 x 600
|
||||
- { 128, 40 }, // from graphics resolution 1024 x 768
|
||||
- { 144, 45 }, // from graphics resolution 1152 x 864
|
||||
- { 144, 45 }, // from graphics resolution 1152 x 870
|
||||
- { 160, 37 }, // from graphics resolution 1280 x 720
|
||||
- { 160, 40 }, // from graphics resolution 1280 x 760
|
||||
- { 160, 40 }, // from graphics resolution 1280 x 768
|
||||
- { 160, 42 }, // from graphics resolution 1280 x 800
|
||||
- { 160, 50 }, // from graphics resolution 1280 x 960
|
||||
- { 160, 53 }, // from graphics resolution 1280 x 1024
|
||||
- { 170, 40 }, // from graphics resolution 1360 x 768
|
||||
- { 170, 40 }, // from graphics resolution 1366 x 768
|
||||
- { 175, 55 }, // from graphics resolution 1400 x 1050
|
||||
- { 180, 47 }, // from graphics resolution 1440 x 900
|
||||
- { 200, 47 }, // from graphics resolution 1600 x 900
|
||||
- { 200, 63 }, // from graphics resolution 1600 x 1200
|
||||
- { 210, 55 }, // from graphics resolution 1680 x 1050
|
||||
- { 240, 56 }, // from graphics resolution 1920 x 1080
|
||||
- { 240, 63 }, // from graphics resolution 1920 x 1200
|
||||
- { 240, 75 }, // from graphics resolution 1920 x 1440
|
||||
- { 250, 105 }, // from graphics resolution 2000 x 2000
|
||||
- { 256, 80 }, // from graphics resolution 2048 x 1536
|
||||
- { 256, 107 }, // from graphics resolution 2048 x 2048
|
||||
- { 320, 75 }, // from graphics resolution 2560 x 1440
|
||||
- { 320, 84 }, // from graphics resolution 2560 x 1600
|
||||
- { 320, 107 }, // from graphics resolution 2560 x 2048
|
||||
- { 350, 110 }, // from graphics resolution 2800 x 2100
|
||||
- { 400, 126 }, // from graphics resolution 3200 x 2400
|
||||
- { 480, 113 }, // from graphics resolution 3840 x 2160
|
||||
- { 512, 113 }, // from graphics resolution 4096 x 2160
|
||||
- { 960, 227 }, // from graphics resolution 7680 x 4320
|
||||
- { 1024, 227 }, // from graphics resolution 8192 x 4320
|
||||
+ { 80, 25 },
|
||||
+ { 80, 50 },
|
||||
+ { 100, 31 },
|
||||
//
|
||||
// New modes can be added here.
|
||||
//
|
||||
--
|
||||
2.31.1
|
||||
|
@ -0,0 +1,329 @@
|
||||
#!/usr/bin/python3
|
||||
import os
|
||||
import sys
|
||||
import glob
|
||||
import shutil
|
||||
import optparse
|
||||
import subprocess
|
||||
import configparser
|
||||
|
||||
rebase_prefix = ""
|
||||
version_override = None
|
||||
release_date = None
|
||||
|
||||
def check_rebase():
|
||||
""" detect 'git rebase -x edk2-build.py master' testbuilds """
|
||||
global rebase_prefix
|
||||
global version_override
|
||||
|
||||
if not os.path.exists('.git/rebase-merge/msgnum'):
|
||||
return ""
|
||||
with open('.git/rebase-merge/msgnum', 'r') as f:
|
||||
msgnum = int(f.read())
|
||||
with open('.git/rebase-merge/end', 'r') as f:
|
||||
end = int(f.read())
|
||||
with open('.git/rebase-merge/head-name', 'r') as f:
|
||||
head = f.read().strip().split('/')
|
||||
|
||||
rebase_prefix = f'[ {int(msgnum/2)} / {int(end/2)} - {head[-1]} ] '
|
||||
if msgnum != end and not version_override:
|
||||
# fixed version speeds up builds
|
||||
version_override = "test-build-patch-series"
|
||||
|
||||
def get_coredir(cfg):
|
||||
if cfg.has_option('global', 'core'):
|
||||
return os.path.abspath(cfg['global']['core'])
|
||||
else:
|
||||
return os.getcwd()
|
||||
|
||||
def get_version(cfg):
|
||||
coredir = get_coredir(cfg)
|
||||
if version_override:
|
||||
version = version_override
|
||||
print('')
|
||||
print(f'### version [override]: {version}')
|
||||
return version
|
||||
if os.environ.get('RPM_PACKAGE_NAME'):
|
||||
version = os.environ.get('RPM_PACKAGE_NAME');
|
||||
version += '-' + os.environ.get('RPM_PACKAGE_VERSION');
|
||||
version += '-' + os.environ.get('RPM_PACKAGE_RELEASE');
|
||||
print('')
|
||||
print(f'### version [rpmbuild]: {version}')
|
||||
return version
|
||||
if os.path.exists(coredir + '/.git'):
|
||||
cmdline = [ 'git', 'describe', '--tags', '--abbrev=8', '--match=edk2-stable*' ]
|
||||
result = subprocess.run(cmdline, stdout = subprocess.PIPE, cwd = coredir)
|
||||
version = result.stdout.decode().strip()
|
||||
print('')
|
||||
print(f'### version [git]: {version}')
|
||||
return version
|
||||
return None
|
||||
|
||||
def pcd_string(name, value):
|
||||
return f'{name}=L{value}\\0'
|
||||
|
||||
def pcd_version(cfg):
|
||||
version = get_version(cfg)
|
||||
if version is None:
|
||||
return []
|
||||
return [ '--pcd', pcd_string('PcdFirmwareVersionString', version) ]
|
||||
|
||||
def pcd_release_date(cfg):
|
||||
if release_date is None:
|
||||
return []
|
||||
return [ '--pcd', pcd_string('PcdFirmwareReleaseDateString', release_date) ]
|
||||
|
||||
def build_message(line, line2 = None):
|
||||
if os.environ.get('TERM') in [ 'xterm', 'xterm-256color' ]:
|
||||
# setxterm title
|
||||
start = '\x1b]2;'
|
||||
end = '\x07'
|
||||
print(f'{start}{rebase_prefix}{line}{end}', end = '')
|
||||
|
||||
print('')
|
||||
print('###')
|
||||
print(f'### {rebase_prefix}{line}')
|
||||
if line2:
|
||||
print(f'### {line2}')
|
||||
print('###')
|
||||
|
||||
def build_run(cmdline, name, section, silent = False):
|
||||
print(cmdline)
|
||||
if silent:
|
||||
print('### building in silent mode ...', flush = True)
|
||||
result = subprocess.run(cmdline,
|
||||
stdout = subprocess.PIPE,
|
||||
stderr = subprocess.STDOUT)
|
||||
|
||||
logfile = f'{section}.log'
|
||||
print(f'### writing log to {logfile} ...')
|
||||
with open(logfile, 'wb') as f:
|
||||
f.write(result.stdout)
|
||||
|
||||
if result.returncode:
|
||||
print('### BUILD FAILURE')
|
||||
print('### output')
|
||||
print(result.stdout.decode())
|
||||
print(f'### exit code: {result.returncode}')
|
||||
else:
|
||||
print('### OK')
|
||||
else:
|
||||
result = subprocess.run(cmdline)
|
||||
if result.returncode:
|
||||
print(f'ERROR: {cmdline[0]} exited with {result.returncode} while building {name}')
|
||||
sys.exit(result.returncode)
|
||||
|
||||
def build_copy(plat, tgt, dstdir, copy):
|
||||
srcdir = f'Build/{plat}/{tgt}_GCC5'
|
||||
names = copy.split()
|
||||
srcfile = names[0]
|
||||
if len(names) > 1:
|
||||
dstfile = names[1]
|
||||
else:
|
||||
dstfile = os.path.basename(srcfile)
|
||||
print(f'# copy: {srcdir} / {srcfile} => {dstdir} / {dstfile}')
|
||||
|
||||
src = srcdir + '/' + srcfile
|
||||
dst = dstdir + '/' + dstfile
|
||||
os.makedirs(os.path.dirname(dst), exist_ok = True)
|
||||
shutil.copy(src, dst)
|
||||
|
||||
def pad_file(dstdir, pad):
|
||||
args = pad.split()
|
||||
if len(args) < 2:
|
||||
raise RuntimeError(f'missing arg for pad ({args})')
|
||||
name = args[0]
|
||||
size = args[1]
|
||||
cmdline = [
|
||||
'truncate',
|
||||
'--size', size,
|
||||
dstdir + '/' + name,
|
||||
]
|
||||
print(f'# padding: {dstdir} / {name} => {size}')
|
||||
subprocess.run(cmdline)
|
||||
|
||||
def build_one(cfg, build, jobs = None, silent = False):
|
||||
cmdline = [ 'build' ]
|
||||
cmdline += [ '-t', 'GCC5' ]
|
||||
cmdline += [ '-p', cfg[build]['conf'] ]
|
||||
|
||||
if (cfg[build]['conf'].startswith('OvmfPkg/') or
|
||||
cfg[build]['conf'].startswith('ArmVirtPkg/')):
|
||||
cmdline += pcd_version(cfg)
|
||||
cmdline += pcd_release_date(cfg)
|
||||
|
||||
if jobs:
|
||||
cmdline += [ '-n', jobs ]
|
||||
for arch in cfg[build]['arch'].split():
|
||||
cmdline += [ '-a', arch ]
|
||||
if 'opts' in cfg[build]:
|
||||
for name in cfg[build]['opts'].split():
|
||||
section = 'opts.' + name
|
||||
for opt in cfg[section]:
|
||||
cmdline += [ '-D', opt + '=' + cfg[section][opt] ]
|
||||
if 'pcds' in cfg[build]:
|
||||
for name in cfg[build]['pcds'].split():
|
||||
section = 'pcds.' + name
|
||||
for pcd in cfg[section]:
|
||||
cmdline += [ '--pcd', pcd + '=' + cfg[section][pcd] ]
|
||||
if 'tgts' in cfg[build]:
|
||||
tgts = cfg[build]['tgts'].split()
|
||||
else:
|
||||
tgts = [ 'DEBUG' ]
|
||||
for tgt in tgts:
|
||||
desc = None
|
||||
if 'desc' in cfg[build]:
|
||||
desc = cfg[build]['desc']
|
||||
build_message(f'building: {cfg[build]["conf"]} ({cfg[build]["arch"]}, {tgt})',
|
||||
f'description: {desc}')
|
||||
build_run(cmdline + [ '-b', tgt ],
|
||||
cfg[build]['conf'],
|
||||
build + '.' + tgt,
|
||||
silent)
|
||||
|
||||
if 'plat' in cfg[build]:
|
||||
# copy files
|
||||
for cpy in cfg[build]:
|
||||
if not cpy.startswith('cpy'):
|
||||
continue
|
||||
build_copy(cfg[build]['plat'],
|
||||
tgt,
|
||||
cfg[build]['dest'],
|
||||
cfg[build][cpy])
|
||||
# pad builds
|
||||
for pad in cfg[build]:
|
||||
if not pad.startswith('pad'):
|
||||
continue
|
||||
pad_file(cfg[build]['dest'],
|
||||
cfg[build][pad])
|
||||
|
||||
def build_basetools(silent = False):
|
||||
build_message(f'building: BaseTools')
|
||||
basedir = os.environ['EDK_TOOLS_PATH']
|
||||
cmdline = [ 'make', '-C', basedir ]
|
||||
build_run(cmdline, 'BaseTools', 'build.basetools', silent)
|
||||
|
||||
def binary_exists(name):
|
||||
for dir in os.environ['PATH'].split(':'):
|
||||
if os.path.exists(dir + '/' + name):
|
||||
return True
|
||||
return False
|
||||
|
||||
def prepare_env(cfg):
|
||||
""" mimic Conf/BuildEnv.sh """
|
||||
workspace = os.getcwd()
|
||||
packages = [ workspace, ]
|
||||
path = os.environ['PATH'].split(':')
|
||||
dirs = [
|
||||
'BaseTools/Bin/Linux-x86_64',
|
||||
'BaseTools/BinWrappers/PosixLike'
|
||||
]
|
||||
|
||||
if cfg.has_option('global', 'pkgs'):
|
||||
for pkgdir in cfg['global']['pkgs'].split():
|
||||
packages.append(os.path.abspath(pkgdir))
|
||||
coredir = get_coredir(cfg)
|
||||
if coredir != workspace:
|
||||
packages.append(coredir)
|
||||
|
||||
# add basetools to path
|
||||
for dir in dirs:
|
||||
p = coredir + '/' + dir
|
||||
if not os.path.exists(p):
|
||||
continue
|
||||
if p in path:
|
||||
continue
|
||||
path.insert(0, p)
|
||||
|
||||
# run edksetup if needed
|
||||
toolsdef = coredir + '/Conf/tools_def.txt';
|
||||
if not os.path.exists(toolsdef):
|
||||
os.makedirs(os.path.dirname(toolsdef), exist_ok = True)
|
||||
build_message('running BaseTools/BuildEnv')
|
||||
cmdline = [ 'sh', 'BaseTools/BuildEnv' ]
|
||||
subprocess.run(cmdline, cwd = coredir)
|
||||
|
||||
# set variables
|
||||
os.environ['PATH'] = ':'.join(path)
|
||||
os.environ['PACKAGES_PATH'] = ':'.join(packages)
|
||||
os.environ['WORKSPACE'] = workspace
|
||||
os.environ['EDK_TOOLS_PATH'] = coredir + '/BaseTools'
|
||||
os.environ['CONF_PATH'] = coredir + '/Conf'
|
||||
os.environ['PYTHON_COMMAND'] = '/usr/bin/python3'
|
||||
os.environ['PYTHONHASHSEED'] = '1'
|
||||
|
||||
# for cross builds
|
||||
if binary_exists('arm-linux-gnu-gcc'):
|
||||
os.environ['GCC5_ARM_PREFIX'] = 'arm-linux-gnu-'
|
||||
if binary_exists('aarch64-linux-gnu-gcc'):
|
||||
os.environ['GCC5_AARCH64_PREFIX'] = 'aarch64-linux-gnu-'
|
||||
if binary_exists('riscv64-linux-gnu-gcc'):
|
||||
os.environ['GCC5_RISCV64_PREFIX'] = 'riscv64-linux-gnu-'
|
||||
if binary_exists('x86_64-linux-gnu-gcc'):
|
||||
os.environ['GCC5_IA32_PREFIX'] = 'x86_64-linux-gnu-'
|
||||
os.environ['GCC5_X64_PREFIX'] = 'x86_64-linux-gnu-'
|
||||
os.environ['GCC5_BIN'] = 'x86_64-linux-gnu-'
|
||||
|
||||
def build_list(cfg):
|
||||
for build in cfg.sections():
|
||||
if not build.startswith('build.'):
|
||||
continue
|
||||
name = build.lstrip('build.')
|
||||
desc = 'no description'
|
||||
if 'desc' in cfg[build]:
|
||||
desc = cfg[build]['desc']
|
||||
print(f'# {name:20s} - {desc}')
|
||||
|
||||
def main():
|
||||
parser = optparse.OptionParser()
|
||||
parser.add_option('-c', '--config', dest = 'configfile',
|
||||
type = 'string', default = '.edk2.builds')
|
||||
parser.add_option('-C', '--directory', dest = 'directory', type = 'string')
|
||||
parser.add_option('-j', '--jobs', dest = 'jobs', type = 'string')
|
||||
parser.add_option('-m', '--match', dest = 'match', type = 'string')
|
||||
parser.add_option('-l', '--list', dest = 'list', action = 'store_true', default = False)
|
||||
parser.add_option('--silent', dest = 'silent', action = 'store_true', default = False)
|
||||
parser.add_option('--core', dest = 'core', type = 'string')
|
||||
parser.add_option('--pkg', '--package', dest = 'pkgs', type = 'string', action = 'append')
|
||||
parser.add_option('--version-override', dest = 'version_override', type = 'string')
|
||||
parser.add_option('--release-date', dest = 'release_date', type = 'string')
|
||||
(options, args) = parser.parse_args()
|
||||
|
||||
if options.directory:
|
||||
os.chdir(options.directory)
|
||||
|
||||
cfg = configparser.ConfigParser()
|
||||
cfg.optionxform = str
|
||||
cfg.read(options.configfile)
|
||||
|
||||
if options.list:
|
||||
build_list(cfg)
|
||||
return
|
||||
|
||||
if not cfg.has_section('global'):
|
||||
cfg.add_section('global')
|
||||
if options.core:
|
||||
cfg.set('global', 'core', options.core)
|
||||
if options.pkgs:
|
||||
cfg.set('global', 'pkgs', ' '.join(options.pkgs))
|
||||
|
||||
global version_override
|
||||
global release_date
|
||||
check_rebase()
|
||||
if options.version_override:
|
||||
version_override = options.version_override
|
||||
if options.release_date:
|
||||
release_date = options.release_date
|
||||
|
||||
prepare_env(cfg)
|
||||
build_basetools(options.silent)
|
||||
for build in cfg.sections():
|
||||
if not build.startswith('build.'):
|
||||
continue
|
||||
if options.match and options.match not in build:
|
||||
print(f'# skipping "{build}" (not matching "{options.match}")')
|
||||
continue
|
||||
build_one(cfg, build, options.jobs, options.silent)
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
@ -0,0 +1,111 @@
|
||||
|
||||
[opts.ovmf.common]
|
||||
NETWORK_HTTP_BOOT_ENABLE = TRUE
|
||||
NETWORK_IP6_ENABLE = TRUE
|
||||
NETWORK_TLS_ENABLE = TRUE
|
||||
NETWORK_ISCSI_ENABLE = TRUE
|
||||
NETWORK_ALLOW_HTTP_CONNECTIONS = TRUE
|
||||
TPM2_ENABLE = TRUE
|
||||
TPM2_CONFIG_ENABLE = TRUE
|
||||
TPM1_ENABLE = FALSE
|
||||
CAVIUM_ERRATUM_27456 = TRUE
|
||||
|
||||
[opts.ovmf.4m]
|
||||
FD_SIZE_4MB = TRUE
|
||||
|
||||
[opts.ovmf.sb.smm]
|
||||
SECURE_BOOT_ENABLE = TRUE
|
||||
SMM_REQUIRE = TRUE
|
||||
# old downstream
|
||||
EXCLUDE_SHELL_FROM_FD = TRUE
|
||||
# new upstream
|
||||
BUILD_SHELL = FALSE
|
||||
|
||||
[opts.armvirt.verbose]
|
||||
DEBUG_PRINT_ERROR_LEVEL = 0x8040004F
|
||||
|
||||
[opts.armvirt.silent]
|
||||
DEBUG_PRINT_ERROR_LEVEL = 0x80000000
|
||||
|
||||
|
||||
#####################################################################
|
||||
# stateful ovmf builds (with vars in flash)
|
||||
|
||||
[build.ovmf.4m.default]
|
||||
desc = ovmf build (64-bit, 4MB)
|
||||
conf = OvmfPkg/OvmfPkgX64.dsc
|
||||
arch = X64
|
||||
opts = ovmf.common
|
||||
ovmf.4m
|
||||
plat = OvmfX64
|
||||
dest = RHEL-9/ovmf
|
||||
cpy1 = FV/OVMF_CODE.fd OVMF_CODE.fd
|
||||
cpy2 = FV/OVMF_VARS.fd
|
||||
cpy3 = X64/Shell.efi
|
||||
|
||||
[build.ovmf.4m.sb.smm]
|
||||
desc = ovmf build (32/64-bit, 4MB, q35 only, needs smm, secure boot)
|
||||
conf = OvmfPkg/OvmfPkgIa32X64.dsc
|
||||
arch = IA32 X64
|
||||
opts = ovmf.common
|
||||
ovmf.4m
|
||||
ovmf.sb.smm
|
||||
plat = Ovmf3264
|
||||
dest = RHEL-9/ovmf
|
||||
cpy1 = FV/OVMF_CODE.fd OVMF_CODE.secboot.fd
|
||||
cpy2 = X64/EnrollDefaultKeys.efi
|
||||
|
||||
|
||||
#####################################################################
|
||||
# stateless ovmf builds (firmware in rom or r/o flash)
|
||||
|
||||
[build.ovmf.amdsev]
|
||||
desc = ovmf build for AmdSev (4MB)
|
||||
conf = OvmfPkg/AmdSev/AmdSevX64.dsc
|
||||
arch = X64
|
||||
opts = ovmf.common
|
||||
ovmf.4m
|
||||
plat = AmdSev
|
||||
dest = RHEL-9/ovmf
|
||||
cpy1 = FV/OVMF.fd OVMF.amdsev.fd
|
||||
|
||||
[build.ovmf.inteltdx]
|
||||
desc = ovmf build for IntelTdx (4MB)
|
||||
conf = OvmfPkg/IntelTdx/IntelTdxX64.dsc
|
||||
arch = X64
|
||||
opts = ovmf.common
|
||||
ovmf.4m
|
||||
plat = IntelTdx
|
||||
dest = RHEL-9/ovmf
|
||||
cpy1 = FV/OVMF.fd OVMF.inteltdx.fd
|
||||
|
||||
|
||||
#####################################################################
|
||||
# armvirt builds
|
||||
|
||||
[build.armvirt.aa64.verbose]
|
||||
desc = ArmVirt build for qemu, 64-bit (arm v8), verbose
|
||||
conf = ArmVirtPkg/ArmVirtQemu.dsc
|
||||
arch = AARCH64
|
||||
opts = ovmf.common
|
||||
armvirt.verbose
|
||||
plat = ArmVirtQemu-AARCH64
|
||||
dest = RHEL-9/aarch64
|
||||
cpy1 = FV/QEMU_EFI.fd
|
||||
cpy2 = FV/QEMU_VARS.fd
|
||||
cpy3 = FV/QEMU_EFI.fd QEMU_EFI-pflash.raw
|
||||
cpy4 = FV/QEMU_VARS.fd vars-template-pflash.raw
|
||||
pad3 = QEMU_EFI-pflash.raw 64m
|
||||
pad4 = vars-template-pflash.raw 64m
|
||||
|
||||
[build.armvirt.aa64.silent]
|
||||
desc = ArmVirt build for qemu, 64-bit (arm v8), silent
|
||||
conf = ArmVirtPkg/ArmVirtQemu.dsc
|
||||
arch = AARCH64
|
||||
opts = ovmf.common
|
||||
armvirt.silent
|
||||
plat = ArmVirtQemu-AARCH64
|
||||
dest = RHEL-9/aarch64
|
||||
cpy1 = FV/QEMU_EFI.fd QEMU_EFI.silent.fd
|
||||
cpy2 = FV/QEMU_EFI.fd QEMU_EFI-silent-pflash.raw
|
||||
pad2 = QEMU_EFI-silent-pflash.raw 64m
|
@ -0,0 +1,42 @@
|
||||
From dca1a100d14056865c7360d80a2a1d1ae4b0de96 Mon Sep 17 00:00:00 2001
|
||||
From: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Date: Fri, 10 Feb 2023 10:49:44 +0100
|
||||
Subject: [PATCH 5/5] rh openssl: add crypto/bn/rsa_sup_mul.c to file list
|
||||
|
||||
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
|
||||
RH-MergeRequest: 27: openssl update
|
||||
RH-Bugzilla: 2164534 2164550 2164565 2164583
|
||||
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
RH-Commit: [2/2] a097fc031b54208e9c8974173784e4c306dbf7a0 (kraxel/centos-edk2)
|
||||
---
|
||||
CryptoPkg/Library/OpensslLib/OpensslLib.inf | 1 +
|
||||
CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf | 1 +
|
||||
2 files changed, 2 insertions(+)
|
||||
|
||||
diff --git a/CryptoPkg/Library/OpensslLib/OpensslLib.inf b/CryptoPkg/Library/OpensslLib/OpensslLib.inf
|
||||
index e446b51e66..7e78255467 100644
|
||||
--- a/CryptoPkg/Library/OpensslLib/OpensslLib.inf
|
||||
+++ b/CryptoPkg/Library/OpensslLib/OpensslLib.inf
|
||||
@@ -576,6 +576,7 @@
|
||||
$(OPENSSL_PATH)/ssl/statem/statem_local.h
|
||||
# Autogenerated files list ends here
|
||||
# RHEL8-specific OpenSSL file list starts here
|
||||
+ $(OPENSSL_PATH)/crypto/bn/rsa_sup_mul.c
|
||||
$(OPENSSL_PATH)/crypto/evp/kdf_lib.c
|
||||
$(OPENSSL_PATH)/crypto/evp/pkey_kdf.c
|
||||
$(OPENSSL_PATH)/crypto/kdf/kbkdf.c
|
||||
diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
|
||||
index c207dc8f4c..1c551cb099 100644
|
||||
--- a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
|
||||
+++ b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
|
||||
@@ -526,6 +526,7 @@
|
||||
$(OPENSSL_PATH)/crypto/x509v3/v3_admis.h
|
||||
# Autogenerated files list ends here
|
||||
# RHEL8-specific OpenSSL file list starts here
|
||||
+ $(OPENSSL_PATH)/crypto/bn/rsa_sup_mul.c
|
||||
$(OPENSSL_PATH)/crypto/evp/kdf_lib.c
|
||||
$(OPENSSL_PATH)/crypto/evp/pkey_kdf.c
|
||||
$(OPENSSL_PATH)/crypto/kdf/kbkdf.c
|
||||
--
|
||||
2.31.1
|
||||
|
@ -1,296 +0,0 @@
|
||||
#!/bin/python3
|
||||
# Copyright (C) 2017 Red Hat
|
||||
# Authors:
|
||||
# - Patrick Uiterwijk <puiterwijk@redhat.com>
|
||||
# - Kashyap Chamarthy <kchamart@redhat.com>
|
||||
#
|
||||
# Licensed under MIT License, for full text see LICENSE
|
||||
#
|
||||
# Purpose: Launch a QEMU guest and enroll ithe UEFI keys into an OVMF
|
||||
# variables ("VARS") file. Then boot a Linux kernel with QEMU.
|
||||
# Finally, perform a check to verify if Secure Boot
|
||||
# is enabled.
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import logging
|
||||
import tempfile
|
||||
import shutil
|
||||
import string
|
||||
import subprocess
|
||||
|
||||
|
||||
def strip_special(line):
|
||||
return ''.join([c for c in str(line) if c in string.printable])
|
||||
|
||||
|
||||
def generate_qemu_cmd(args, readonly, *extra_args):
|
||||
if args.disable_smm:
|
||||
machinetype = 'pc'
|
||||
else:
|
||||
machinetype = 'q35,smm=on'
|
||||
machinetype += ',accel=%s' % ('kvm' if args.enable_kvm else 'tcg')
|
||||
|
||||
if args.oem_string is None:
|
||||
oemstrings = []
|
||||
else:
|
||||
oemstring_values = [
|
||||
",value=" + s.replace(",", ",,") for s in args.oem_string ]
|
||||
oemstrings = [
|
||||
'-smbios',
|
||||
"type=11" + ''.join(oemstring_values) ]
|
||||
|
||||
return [
|
||||
args.qemu_binary,
|
||||
'-machine', machinetype,
|
||||
'-display', 'none',
|
||||
'-cpu', 'max',
|
||||
'-no-user-config',
|
||||
'-nodefaults',
|
||||
'-m', '768',
|
||||
'-smp', '2,sockets=2,cores=1,threads=1',
|
||||
'-chardev', 'pty,id=charserial1',
|
||||
'-device', 'isa-serial,chardev=charserial1,id=serial1',
|
||||
'-global', 'driver=cfi.pflash01,property=secure,value=%s' % (
|
||||
'off' if args.disable_smm else 'on'),
|
||||
'-drive',
|
||||
'file=%s,if=pflash,format=raw,unit=0,readonly=on' % (
|
||||
args.ovmf_binary),
|
||||
'-drive',
|
||||
'file=%s,if=pflash,format=raw,unit=1,readonly=%s' % (
|
||||
args.out_temp, 'on' if readonly else 'off'),
|
||||
'-serial', 'stdio'] + oemstrings + list(extra_args)
|
||||
|
||||
|
||||
def download(url, target, suffix, no_download):
|
||||
istemp = False
|
||||
if target and os.path.exists(target):
|
||||
return target, istemp
|
||||
if not target:
|
||||
temped = tempfile.mkstemp(prefix='qosb.', suffix='.%s' % suffix)
|
||||
os.close(temped[0])
|
||||
target = temped[1]
|
||||
istemp = True
|
||||
if no_download:
|
||||
raise Exception('%s did not exist, but downloading was disabled' %
|
||||
target)
|
||||
import requests
|
||||
logging.debug('Downloading %s to %s', url, target)
|
||||
r = requests.get(url, stream=True)
|
||||
with open(target, 'wb') as f:
|
||||
for chunk in r.iter_content(chunk_size=1024):
|
||||
if chunk:
|
||||
f.write(chunk)
|
||||
return target, istemp
|
||||
|
||||
|
||||
def enroll_keys(args):
|
||||
shutil.copy(args.ovmf_template_vars, args.out_temp)
|
||||
|
||||
logging.info('Starting enrollment')
|
||||
|
||||
cmd = generate_qemu_cmd(
|
||||
args,
|
||||
False,
|
||||
'-drive',
|
||||
'file=%s,format=raw,if=none,media=cdrom,id=drive-cd1,'
|
||||
'readonly=on' % args.uefi_shell_iso,
|
||||
'-device',
|
||||
'ide-cd,drive=drive-cd1,id=cd1,'
|
||||
'bootindex=1')
|
||||
p = subprocess.Popen(cmd,
|
||||
stdin=subprocess.PIPE,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT)
|
||||
logging.info('Performing enrollment')
|
||||
# Wait until the UEFI shell starts (first line is printed)
|
||||
read = p.stdout.readline()
|
||||
if b'char device redirected' in read:
|
||||
read = p.stdout.readline()
|
||||
# Skip passed QEMU warnings, like the following one we see in Ubuntu:
|
||||
# qemu-system-x86_64: warning: TCG doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5]
|
||||
while b'qemu-system-x86_64: warning:' in read:
|
||||
read = p.stdout.readline()
|
||||
if args.print_output:
|
||||
print(strip_special(read), end='')
|
||||
print()
|
||||
# Send the escape char to enter the UEFI shell early
|
||||
p.stdin.write(b'\x1b')
|
||||
p.stdin.flush()
|
||||
# And then run the following three commands from the UEFI shell:
|
||||
# change into the first file system device; install the default
|
||||
# keys and certificates, and reboot
|
||||
p.stdin.write(b'fs0:\r\n')
|
||||
p.stdin.write(b'EnrollDefaultKeys.efi\r\n')
|
||||
p.stdin.write(b'reset -s\r\n')
|
||||
p.stdin.flush()
|
||||
while True:
|
||||
read = p.stdout.readline()
|
||||
if args.print_output:
|
||||
print('OUT: %s' % strip_special(read), end='')
|
||||
print()
|
||||
if b'info: success' in read:
|
||||
break
|
||||
p.wait()
|
||||
if args.print_output:
|
||||
print(strip_special(p.stdout.read()), end='')
|
||||
logging.info('Finished enrollment')
|
||||
|
||||
|
||||
def test_keys(args):
|
||||
logging.info('Grabbing test kernel')
|
||||
kernel, kerneltemp = download(args.kernel_url, args.kernel_path,
|
||||
'kernel', args.no_download)
|
||||
|
||||
logging.info('Starting verification')
|
||||
try:
|
||||
cmd = generate_qemu_cmd(
|
||||
args,
|
||||
True,
|
||||
'-append', 'console=tty0 console=ttyS0,115200n8',
|
||||
'-kernel', kernel)
|
||||
p = subprocess.Popen(cmd,
|
||||
stdin=subprocess.PIPE,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT)
|
||||
logging.info('Performing verification')
|
||||
while True:
|
||||
read = p.stdout.readline()
|
||||
if args.print_output:
|
||||
print('OUT: %s' % strip_special(read), end='')
|
||||
print()
|
||||
if b'Secure boot disabled' in read:
|
||||
raise Exception('Secure Boot was disabled')
|
||||
elif b'Secure boot enabled' in read:
|
||||
logging.info('Confirmed: Secure Boot is enabled')
|
||||
break
|
||||
elif b'Kernel is locked down from EFI secure boot' in read:
|
||||
logging.info('Confirmed: Secure Boot is enabled')
|
||||
break
|
||||
p.kill()
|
||||
if args.print_output:
|
||||
print(strip_special(p.stdout.read()), end='')
|
||||
logging.info('Finished verification')
|
||||
finally:
|
||||
if kerneltemp:
|
||||
os.remove(kernel)
|
||||
|
||||
|
||||
def parse_args():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('output', help='Filename for output vars file')
|
||||
parser.add_argument('--out-temp', help=argparse.SUPPRESS)
|
||||
parser.add_argument('--force', help='Overwrite existing output file',
|
||||
action='store_true')
|
||||
parser.add_argument('--print-output', help='Print the QEMU guest output',
|
||||
action='store_true')
|
||||
parser.add_argument('--verbose', '-v', help='Increase verbosity',
|
||||
action='count')
|
||||
parser.add_argument('--quiet', '-q', help='Decrease verbosity',
|
||||
action='count')
|
||||
parser.add_argument('--qemu-binary', help='QEMU binary path',
|
||||
default='/usr/bin/qemu-system-x86_64')
|
||||
parser.add_argument('--enable-kvm', help='Enable KVM acceleration',
|
||||
action='store_true')
|
||||
parser.add_argument('--ovmf-binary', help='OVMF secureboot code file',
|
||||
default='/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd')
|
||||
parser.add_argument('--ovmf-template-vars', help='OVMF empty vars file',
|
||||
default='/usr/share/edk2/ovmf/OVMF_VARS.fd')
|
||||
parser.add_argument('--uefi-shell-iso', help='Path to uefi shell iso',
|
||||
default='/usr/share/edk2/ovmf/UefiShell.iso')
|
||||
parser.add_argument('--skip-enrollment',
|
||||
help='Skip enrollment, only test', action='store_true')
|
||||
parser.add_argument('--skip-testing',
|
||||
help='Skip testing generated "VARS" file',
|
||||
action='store_true')
|
||||
parser.add_argument('--kernel-path',
|
||||
help='Specify a consistent path for kernel')
|
||||
parser.add_argument('--no-download', action='store_true',
|
||||
help='Never download a kernel')
|
||||
parser.add_argument('--fedora-version',
|
||||
help='Fedora version to get kernel for checking',
|
||||
default='27')
|
||||
parser.add_argument('--kernel-url', help='Kernel URL',
|
||||
default='https://download.fedoraproject.org/pub/fedora'
|
||||
'/linux/releases/%(version)s/Everything/x86_64'
|
||||
'/os/images/pxeboot/vmlinuz')
|
||||
parser.add_argument('--disable-smm',
|
||||
help=('Don\'t restrict varstore pflash writes to '
|
||||
'guest code that executes in SMM. Use this '
|
||||
'option only if your OVMF binary doesn\'t have '
|
||||
'the edk2 SMM driver stack built into it '
|
||||
'(possibly because your QEMU binary lacks SMM '
|
||||
'emulation). Note that without restricting '
|
||||
'varstore pflash writes to guest code that '
|
||||
'executes in SMM, a malicious guest kernel, '
|
||||
'used for testing, could undermine Secure '
|
||||
'Boot.'),
|
||||
action='store_true')
|
||||
parser.add_argument('--oem-string',
|
||||
help=('Pass the argument to the guest as a string in '
|
||||
'the SMBIOS Type 11 (OEM Strings) table. '
|
||||
'Multiple occurrences of this option are '
|
||||
'collected into a single SMBIOS Type 11 table. '
|
||||
'A pure ASCII string argument is strongly '
|
||||
'suggested.'),
|
||||
action='append')
|
||||
args = parser.parse_args()
|
||||
args.kernel_url = args.kernel_url % {'version': args.fedora_version}
|
||||
|
||||
validate_args(args)
|
||||
return args
|
||||
|
||||
|
||||
def validate_args(args):
|
||||
if (os.path.exists(args.output)
|
||||
and not args.force
|
||||
and not args.skip_enrollment):
|
||||
raise Exception('%s already exists' % args.output)
|
||||
|
||||
if args.skip_enrollment and not os.path.exists(args.output):
|
||||
raise Exception('%s does not yet exist' % args.output)
|
||||
|
||||
verbosity = (args.verbose or 1) - (args.quiet or 0)
|
||||
if verbosity >= 2:
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
elif verbosity == 1:
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
elif verbosity < 0:
|
||||
logging.basicConfig(level=logging.ERROR)
|
||||
else:
|
||||
logging.basicConfig(level=logging.WARN)
|
||||
|
||||
if args.skip_enrollment:
|
||||
args.out_temp = args.output
|
||||
else:
|
||||
temped = tempfile.mkstemp(prefix='qosb.', suffix='.vars')
|
||||
os.close(temped[0])
|
||||
args.out_temp = temped[1]
|
||||
logging.debug('Temp output: %s', args.out_temp)
|
||||
|
||||
|
||||
def move_to_dest(args):
|
||||
shutil.copy(args.out_temp, args.output)
|
||||
os.remove(args.out_temp)
|
||||
|
||||
|
||||
def main():
|
||||
args = parse_args()
|
||||
if not args.skip_enrollment:
|
||||
enroll_keys(args)
|
||||
if not args.skip_testing:
|
||||
test_keys(args)
|
||||
if not args.skip_enrollment:
|
||||
move_to_dest(args)
|
||||
if args.skip_testing:
|
||||
logging.info('Created %s' % args.output)
|
||||
else:
|
||||
logging.info('Created and verified %s' % args.output)
|
||||
else:
|
||||
logging.info('Verified %s', args.output)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
Loading…
Reference in new issue