parent
77ff1438b6
commit
8d27e4d1dd
@ -1,2 +1,3 @@
|
||||
a1c42c2f044a95caf0c8595d351c4cc5adcfde14 SOURCES/edk2-fff6d81270b5.tar.xz
|
||||
de143fc38b339d982079517b6f01bcec5246cf5e SOURCES/DBXUpdate-20230509.x64.bin
|
||||
a1a81793c0fbda8685b41ff839a942af5eda280a SOURCES/edk2-ba91d0292e.tar.xz
|
||||
c0518a4102a3909928dcc2e0a2c1784a53a419c6 SOURCES/openssl-rhel-d00c3c5b8a9d6d3ea3dabfcafdf36afd61ba8bcc.tar.xz
|
||||
|
@ -1,2 +1,3 @@
|
||||
SOURCES/edk2-fff6d81270b5.tar.xz
|
||||
SOURCES/DBXUpdate-20230509.x64.bin
|
||||
SOURCES/edk2-ba91d0292e.tar.xz
|
||||
SOURCES/openssl-rhel-d00c3c5b8a9d6d3ea3dabfcafdf36afd61ba8bcc.tar.xz
|
||||
|
@ -1,172 +0,0 @@
|
||||
From cef6b69ea8f009aeba50b2f4b69889f9500fa585 Mon Sep 17 00:00:00 2001
|
||||
From: Laszlo Ersek <lersek@redhat.com>
|
||||
Date: Tue, 25 Feb 2014 18:40:35 +0100
|
||||
Subject: MdeModulePkg: TerminalDxe: add other text resolutions (RHEL only)
|
||||
|
||||
Notes for rebase to edk2-stable202202:
|
||||
|
||||
- Minor context changes due to 1436aea4d MdeModulePkg: Apply uncrustify changes
|
||||
|
||||
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 changes
|
||||
|
||||
Notes about the RHEL-8.1/20190308-89910a39dcfd [edk2-stable201903] ->
|
||||
RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] rebase:
|
||||
|
||||
- no changes
|
||||
|
||||
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:
|
||||
|
||||
- update commit message as requested in
|
||||
<https://bugzilla.redhat.com/show_bug.cgi?id=1503316#c0>
|
||||
|
||||
Notes about the 20170228-c325e41585e3 -> 20171011-92d07e48907f rebase:
|
||||
|
||||
- no changes
|
||||
|
||||
Notes about the 20160608b-988715a -> 20170228-c325e41585e3 rebase:
|
||||
|
||||
- adapt commit 0bc77c63de03 (code and commit message) to upstream commit
|
||||
390b95a49c14 ("MdeModulePkg/TerminalDxe: Refine
|
||||
InitializeTerminalConsoleTextMode", 2017-01-10).
|
||||
|
||||
When the console output is multiplexed to several devices by
|
||||
ConSplitterDxe, then ConSplitterDxe builds an intersection of text modes
|
||||
supported by all console output devices.
|
||||
|
||||
Two notable output devices are provided by:
|
||||
(1) MdeModulePkg/Universal/Console/GraphicsConsoleDxe,
|
||||
(2) MdeModulePkg/Universal/Console/TerminalDxe.
|
||||
|
||||
GraphicsConsoleDxe supports four modes at most -- see
|
||||
InitializeGraphicsConsoleTextMode() and "mGraphicsConsoleModeData":
|
||||
|
||||
(1a) 80x25 (required by the UEFI spec as mode 0),
|
||||
(1b) 80x50 (not necessarily supported, but if it is, then the UEFI spec
|
||||
requires the driver to provide it as mode 1),
|
||||
(1c) 100x31 (corresponding to graphics resolution 800x600, which the UEFI
|
||||
spec requires from all plug-in graphics devices),
|
||||
(1d) "full screen" resolution, derived form the underlying GOP's
|
||||
horizontal and vertical resolutions with division by EFI_GLYPH_WIDTH
|
||||
(8) and EFI_GLYPH_HEIGHT (19), respectively.
|
||||
|
||||
The automatic "full screen resolution" makes GraphicsConsoleDxe's
|
||||
character console very flexible. However, TerminalDxe (which runs on
|
||||
serial ports) only provides the following fixed resolutions -- see
|
||||
InitializeTerminalConsoleTextMode() and "mTerminalConsoleModeData":
|
||||
|
||||
(2a) 80x25 (required by the UEFI spec as mode 0),
|
||||
(2b) 80x50 (since the character resolution of a serial device cannot be
|
||||
interrogated easily, this is added unconditionally as mode 1),
|
||||
(2c) 100x31 (since the character resolution of a serial device cannot be
|
||||
interrogated easily, this is added unconditionally as mode 2).
|
||||
|
||||
When ConSplitterDxe combines (1) and (2), multiplexing console output to
|
||||
both video output and serial terminal, the list of commonly supported text
|
||||
modes (ie. the "intersection") comprises:
|
||||
|
||||
(3a) 80x25, unconditionally, from (1a) and (2a),
|
||||
(3b) 80x50, if the graphics console provides at least 640x950 pixel
|
||||
resolution, from (1b) and (2b)
|
||||
(3c) 100x31, if the graphics device is a plug-in one (because in that case
|
||||
800x600 is a mandated pixel resolution), from (1c) and (2c).
|
||||
|
||||
Unfortunately, the "full screen resolution" (1d) of the GOP-based text
|
||||
console is not available in general.
|
||||
|
||||
Mitigate this problem by extending "mTerminalConsoleModeData" with a
|
||||
handful of text resolutions that are derived from widespread maximal pixel
|
||||
resolutions. This way TerminalDxe won't cause ConSplitterDxe to filter out
|
||||
the most frequent (1d) values from the intersection, and eg. the MODE
|
||||
command in the UEFI shell will offer the "best" (ie. full screen)
|
||||
resolution too.
|
||||
|
||||
Upstreaming efforts for this patch have been discontinued; it was clear
|
||||
from the off-list thread that consensus was impossible to reach.
|
||||
|
||||
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
|
||||
(cherry picked from commit 99dc3720ac86059f60156197328cc433603c536e)
|
||||
(cherry picked from commit d2066c1748f885043026c51dec1bc8d6d406ae8f)
|
||||
(cherry picked from commit 1facdd58e946c584a3dc1e5be8f2f837b5a7c621)
|
||||
(cherry picked from commit 28faeb5f94b4866b9da16cf2a1e4e0fc09a26e37)
|
||||
(cherry picked from commit 4e4e15b80a5b2103eadd495ef4a830d46dd4ed51)
|
||||
(cherry picked from commit 12cb13a1da913912bd9148ce8f2353a75be77f18)
|
||||
(cherry picked from commit 82b9edc5fef3a07227a45059bbe821af7b9abd69)
|
||||
---
|
||||
.../Universal/Console/TerminalDxe/Terminal.c | 41 +++++++++++++++++--
|
||||
1 file changed, 38 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c
|
||||
index e2d779c783..dfd9c96773 100644
|
||||
--- a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c
|
||||
+++ b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c
|
||||
@@ -112,9 +112,44 @@ TERMINAL_DEV mTerminalDevTemplate = {
|
||||
};
|
||||
|
||||
TERMINAL_CONSOLE_MODE_DATA mTerminalConsoleModeData[] = {
|
||||
- { 80, 25 },
|
||||
- { 80, 50 },
|
||||
- { 100, 31 },
|
||||
+ { 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
|
||||
//
|
||||
// New modes can be added here.
|
||||
//
|
||||
--
|
||||
2.38.1
|
||||
|
@ -0,0 +1,164 @@
|
||||
From 37e0f9ed6e872224afe70065627de3965689425c Mon Sep 17 00:00:00 2001
|
||||
From: Laszlo Ersek <lersek@redhat.com>
|
||||
Date: Wed, 11 Jun 2014 20:45:26 +0200
|
||||
Subject: recreate / import "redhat/" directory
|
||||
|
||||
This patch now unites the following downstream commits:
|
||||
|
||||
- 18bd1193e7 .distro: simplify WORKSPACE setup
|
||||
- b00f3398c8 fix tpm build options
|
||||
- e032ab1675 spec: Centralize non-firmware %install files at the top
|
||||
- 8501863acc spec: Don't put build output in the top directory
|
||||
- e6ec0363d3 spec: Factor out OVMF_FLAGS and OVMF_SB_FLAGS
|
||||
- 596f34c8b6 spec: Use %make_build macro
|
||||
- 55169e466d spec: Replace RPM_BUILD_ROOT with %{buildroot}
|
||||
- 69c4c60920 spec: Split out build_iso() function
|
||||
- ed67da8c85 spec: Add %{qosb_testing} macro
|
||||
- 44519f5b94 spec: Move %check to between %install and %files
|
||||
- b37b334dc7 spec: Remove extra 'true' at end of %check
|
||||
- dd11149c3a spec: Add %{qemu_package} and %{qemu_binary}
|
||||
- 0f5d4ae0d5 spec: Move -D TPM_ENABLE to common CC_FLAGS
|
||||
- 84b3fd93f9 spec: Replace ifarch+else conditionals with build_XXX variables
|
||||
- e97f79e744 spec: Use %autosetup with our required git config options
|
||||
- 45a347a759 spec: don't conditionalize %package definitions
|
||||
- acfcfaea1e spec: Add BuildRequires: make
|
||||
- d917a93f6f spec: remove Group: and %defattr
|
||||
- f2d3be3ae3 redhat: build UefiShell.iso with xorriso rather than genisoimage
|
||||
- 3fb4a20f30 redhat: narrow the "qemu-kvm" BuildRequires down to "qemu-kvm-core"
|
||||
- bfb89c4ae5 redhat: drop Split tool from the edk2-tools subpackage
|
||||
- ac8be2e0ef redhat: refresh "Makefile.common" for the 8.5 rebase
|
||||
- 2bd2d18864 redhat: filter out jansson submodule removal hunks
|
||||
- f13d7899ed recreate / import "redhat/" directory
|
||||
|
||||
Merged patches (edk2-stable202202):
|
||||
- 1a7b1c3b72 spec: adapt specfile to build option changes, disable tpm1
|
||||
- 96eb388be3 spec: build amdsev variant
|
||||
- ea34352d41 redhat: bump OpenSSL dist-git submodule to a75722161d20 / RHEL-8.5
|
||||
|
||||
Merged patches (edk2-stable202208):
|
||||
- a60bf3fd10 Adding support for CentOS 9 build
|
||||
- d3f25d438c OvmfPkg: Update target machines config
|
||||
- d63f783930 openssl: jump to 8.7.0 branch (2022-07-22)
|
||||
- 39882ce96d qemu-ovmf-secureboot: Do not use submodule
|
||||
- 283ef4a67d ovmf-vars-generator: Use max cpu
|
||||
- b6887ef7e1 Update build target to RHEL 9.2.0
|
||||
|
||||
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||||
|
||||
Merged patches (edk2-stable202305):
|
||||
- 5eef16bd65 remove amd-sev feature flag from secure boot builds (rh only)
|
||||
- cc9e1b6eaa build script update
|
||||
- 046c1f08e6 PcdDxeNxMemoryProtectionPolicy update
|
||||
- b9dc1b5365 add aarch64 qcow2 images
|
||||
- f4e2d6bf41 update json files
|
||||
- be03b42128 add libvirt version conflict
|
||||
- dce699b61d add dbx update blob (rh only)
|
||||
- d8b2407343 spec: apply dbx update (rh only)
|
||||
- a8a5ef95b5 dbx update, 2023-05-09, black lotus edition
|
||||
- 310e179053 json descriptors: explicitly set mode = split
|
||||
- additionally
|
||||
- update frh.py, add new upstream submodules
|
||||
- replace egrep with grep -E and fgrep with grep -F in downstream
|
||||
scripts
|
||||
- remove git commit sha from package version string
|
||||
|
||||
Signed-off-by: Oliver Steffen <osteffen@redhat.com>
|
||||
|
||||
drop git sha
|
||||
|
||||
Signed-off-by: Oliver Steffen <osteffen@redhat.com>
|
||||
---
|
||||
.distro/.gitignore | 3 +
|
||||
.distro/DBXUpdate-20230314.x64.bin | Bin 0 -> 13922 bytes
|
||||
.distro/DBXUpdate-20230509.x64.bin | Bin 0 -> 21170 bytes
|
||||
.distro/Makefile | 114 +
|
||||
.distro/Makefile.common | 31 +
|
||||
.distro/README | 236 ++
|
||||
.distro/RedHatSecureBootPkKek1.pem | 22 +
|
||||
.distro/TargetRelease | 4 +
|
||||
.distro/edk2-build.py | 391 +++
|
||||
.distro/edk2-build.rhel-9 | 119 +
|
||||
.distro/edk2.spec.template | 1301 +++++++++
|
||||
.../30-edk2-ovmf-x64-sb-enrolled.json | 36 +
|
||||
.distro/metafiles/40-edk2-ovmf-x64-sb.json | 35 +
|
||||
.distro/metafiles/50-edk2-aarch64-qcow2.json | 32 +
|
||||
.distro/metafiles/50-edk2-ovmf-x64-nosb.json | 35 +
|
||||
.distro/metafiles/51-edk2-aarch64-raw.json | 32 +
|
||||
.../52-edk2-aarch64-verbose-qcow2.json | 32 +
|
||||
.../53-edk2-aarch64-verbose-raw.json | 32 +
|
||||
.../metafiles/60-edk2-ovmf-x64-amdsev.json | 31 +
|
||||
.../metafiles/60-edk2-ovmf-x64-inteltdx.json | 29 +
|
||||
.distro/openssl-rhel | 1 +
|
||||
.distro/ovmf-whitepaper-c770f8c.txt | 2422 +++++++++++++++++
|
||||
.distro/qemu-ovmf-secureboot/CONTRIBUTING | 45 +
|
||||
.distro/qemu-ovmf-secureboot/LICENSE | 21 +
|
||||
.distro/qemu-ovmf-secureboot/README.md | 66 +
|
||||
.../qemu-ovmf-secureboot/ovmf-vars-generator | 296 ++
|
||||
.distro/rpmbuild/BUILD/.gitignore | 2 +
|
||||
.distro/rpmbuild/RPMS/.gitignore | 2 +
|
||||
.distro/rpmbuild/SOURCES/.gitignore | 2 +
|
||||
.distro/rpmbuild/SPECS/.gitignore | 2 +
|
||||
.distro/rpmbuild/SRPMS/.gitignore | 2 +
|
||||
.distro/scripts/edk2-guids | 85 +
|
||||
.distro/scripts/frh.py | 51 +
|
||||
.distro/scripts/git-backport-diff | 327 +++
|
||||
.distro/scripts/git-compile-check | 215 ++
|
||||
.distro/scripts/openssl-update | 79 +
|
||||
.distro/scripts/process-patches.sh | 75 +
|
||||
.distro/scripts/tarball_checksum.sh | 3 +
|
||||
.gitattributes | 15 +
|
||||
.gitignore | 16 +-
|
||||
.gitmodules | 4 +
|
||||
sources | 1 +
|
||||
42 files changed, 6240 insertions(+), 7 deletions(-)
|
||||
create mode 100644 .distro/.gitignore
|
||||
create mode 100644 .distro/DBXUpdate-20230314.x64.bin
|
||||
create mode 100644 .distro/DBXUpdate-20230509.x64.bin
|
||||
create mode 100644 .distro/Makefile
|
||||
create mode 100644 .distro/Makefile.common
|
||||
create mode 100644 .distro/README
|
||||
create mode 100644 .distro/RedHatSecureBootPkKek1.pem
|
||||
create mode 100644 .distro/TargetRelease
|
||||
create mode 100755 .distro/edk2-build.py
|
||||
create mode 100644 .distro/edk2-build.rhel-9
|
||||
create mode 100644 .distro/edk2.spec.template
|
||||
create mode 100644 .distro/metafiles/30-edk2-ovmf-x64-sb-enrolled.json
|
||||
create mode 100644 .distro/metafiles/40-edk2-ovmf-x64-sb.json
|
||||
create mode 100644 .distro/metafiles/50-edk2-aarch64-qcow2.json
|
||||
create mode 100644 .distro/metafiles/50-edk2-ovmf-x64-nosb.json
|
||||
create mode 100644 .distro/metafiles/51-edk2-aarch64-raw.json
|
||||
create mode 100644 .distro/metafiles/52-edk2-aarch64-verbose-qcow2.json
|
||||
create mode 100644 .distro/metafiles/53-edk2-aarch64-verbose-raw.json
|
||||
create mode 100644 .distro/metafiles/60-edk2-ovmf-x64-amdsev.json
|
||||
create mode 100644 .distro/metafiles/60-edk2-ovmf-x64-inteltdx.json
|
||||
create mode 160000 .distro/openssl-rhel
|
||||
create mode 100644 .distro/ovmf-whitepaper-c770f8c.txt
|
||||
create mode 100644 .distro/qemu-ovmf-secureboot/CONTRIBUTING
|
||||
create mode 100644 .distro/qemu-ovmf-secureboot/LICENSE
|
||||
create mode 100644 .distro/qemu-ovmf-secureboot/README.md
|
||||
create mode 100755 .distro/qemu-ovmf-secureboot/ovmf-vars-generator
|
||||
create mode 100644 .distro/rpmbuild/BUILD/.gitignore
|
||||
create mode 100644 .distro/rpmbuild/RPMS/.gitignore
|
||||
create mode 100644 .distro/rpmbuild/SOURCES/.gitignore
|
||||
create mode 100644 .distro/rpmbuild/SPECS/.gitignore
|
||||
create mode 100644 .distro/rpmbuild/SRPMS/.gitignore
|
||||
create mode 100755 .distro/scripts/edk2-guids
|
||||
create mode 100644 .distro/scripts/frh.py
|
||||
create mode 100755 .distro/scripts/git-backport-diff
|
||||
create mode 100755 .distro/scripts/git-compile-check
|
||||
create mode 100755 .distro/scripts/openssl-update
|
||||
create mode 100755 .distro/scripts/process-patches.sh
|
||||
create mode 100755 .distro/scripts/tarball_checksum.sh
|
||||
create mode 100644 .gitattributes
|
||||
create mode 100644 sources
|
||||
|
||||
diff --git a/sources b/sources
|
||||
new file mode 100644
|
||||
index 0000000000..ea8c8ad50b
|
||||
--- /dev/null
|
||||
+++ b/sources
|
||||
@@ -0,0 +1 @@
|
||||
+SHA512 (edk2-ba91d0292e.tar.xz) = 3b21cc39671d28bfeb059da3683751cc5277c63a894b2a05bdfbd2bbe53545c34f04c229becf44f1563f89a738f37ae8f2333076d126a7e94d234bc4bb25454c
|
||||
--
|
||||
2.39.3
|
||||
|
@ -0,0 +1,76 @@
|
||||
From 5c2e46b64824e5432181507ec0706f7fe74c3fe2 Mon Sep 17 00:00:00 2001
|
||||
From: Oliver Steffen <osteffen@redhat.com>
|
||||
Date: Mon, 19 Jun 2023 11:21:52 +0200
|
||||
Subject: ArmPkg: Disable EFI_MEMORY_ATTRIBUTE_PROTOCOL (RH only)
|
||||
|
||||
Recent versions of shim (15.6 and 15.7) crash when the newly added
|
||||
EFI_MEMORY_ATTRIBUTE_PROTOCOL is provided by the firmware. To allow
|
||||
existing installations to boot, provide a workaround in form of a Pcd
|
||||
that allows tuning it off at build time (defaults to 'enabled').
|
||||
Additionally, check the return code of the protocol installation calls.
|
||||
|
||||
Disable the EFI_MEMORY_ATTRIBUTE_PROTOCOL protocol out builds.
|
||||
|
||||
Signed-off-by: Oliver Steffen <osteffen@redhat.com>
|
||||
---
|
||||
.distro/edk2-build.rhel-9 | 2 ++
|
||||
ArmPkg/ArmPkg.dec | 3 +++
|
||||
ArmPkg/Drivers/CpuDxe/CpuDxe.c | 13 +++++++++++--
|
||||
ArmPkg/Drivers/CpuDxe/CpuDxe.inf | 1 +
|
||||
4 files changed, 17 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/ArmPkg/ArmPkg.dec b/ArmPkg/ArmPkg.dec
|
||||
index 2444457ae5..d9e579b5fa 100644
|
||||
--- a/ArmPkg/ArmPkg.dec
|
||||
+++ b/ArmPkg/ArmPkg.dec
|
||||
@@ -167,6 +167,9 @@
|
||||
gArmTokenSpaceGuid.PcdCpuVectorBaseAddress|0xffff0000|UINT64|0x00000004
|
||||
gArmTokenSpaceGuid.PcdCpuResetAddress|0x00000000|UINT32|0x00000005
|
||||
|
||||
+ # Enable/Disable EFI_MEMORY_ATTRIBUTE_PROTOCOL
|
||||
+ gArmTokenSpaceGuid.PcdEnableEfiMemoryAttributeProtocol|TRUE|BOOLEAN|0x000000EE
|
||||
+
|
||||
#
|
||||
# ARM Secure Firmware PCDs
|
||||
#
|
||||
diff --git a/ArmPkg/Drivers/CpuDxe/CpuDxe.c b/ArmPkg/Drivers/CpuDxe/CpuDxe.c
|
||||
index d04958e79e..ff7d735b2b 100644
|
||||
--- a/ArmPkg/Drivers/CpuDxe/CpuDxe.c
|
||||
+++ b/ArmPkg/Drivers/CpuDxe/CpuDxe.c
|
||||
@@ -244,10 +244,19 @@ CpuDxeInitialize (
|
||||
&mCpuHandle,
|
||||
&gEfiCpuArchProtocolGuid,
|
||||
&mCpu,
|
||||
- &gEfiMemoryAttributeProtocolGuid,
|
||||
- &mMemoryAttribute,
|
||||
NULL
|
||||
);
|
||||
+ ASSERT_EFI_ERROR (Status);
|
||||
+
|
||||
+ if (PcdGetBool (PcdEnableEfiMemoryAttributeProtocol)) {
|
||||
+ Status = gBS->InstallMultipleProtocolInterfaces (
|
||||
+ &mCpuHandle,
|
||||
+ &gEfiMemoryAttributeProtocolGuid,
|
||||
+ &mMemoryAttribute,
|
||||
+ NULL
|
||||
+ );
|
||||
+ ASSERT_EFI_ERROR (Status);
|
||||
+ }
|
||||
|
||||
//
|
||||
// Make sure GCD and MMU settings match. This API calls gDS->SetMemorySpaceAttributes ()
|
||||
diff --git a/ArmPkg/Drivers/CpuDxe/CpuDxe.inf b/ArmPkg/Drivers/CpuDxe/CpuDxe.inf
|
||||
index e732e21cb9..1bad4ae160 100644
|
||||
--- a/ArmPkg/Drivers/CpuDxe/CpuDxe.inf
|
||||
+++ b/ArmPkg/Drivers/CpuDxe/CpuDxe.inf
|
||||
@@ -64,6 +64,7 @@
|
||||
|
||||
[Pcd.common]
|
||||
gArmTokenSpaceGuid.PcdVFPEnabled
|
||||
+ gArmTokenSpaceGuid.PcdEnableEfiMemoryAttributeProtocol
|
||||
|
||||
[FeaturePcd.common]
|
||||
gArmTokenSpaceGuid.PcdDebuggerExceptionSupport
|
||||
--
|
||||
2.39.3
|
||||
|
@ -1,26 +0,0 @@
|
||||
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,46 @@
|
||||
From 8f924bd2691789f6b0d9deae9ddb046677a0610b Mon Sep 17 00:00:00 2001
|
||||
From: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Date: Tue, 16 May 2023 11:47:58 +0200
|
||||
Subject: OvmfPkg/PciHotPlugInitDxe: Do not reserve IO ports by default.
|
||||
|
||||
Flip the default for IO address space reservations for PCI(e) bridges
|
||||
and root ports with hotplug support from TRUE to FALSE.
|
||||
|
||||
PCI(e) bridges will still get IO address space assigned in case:
|
||||
|
||||
(a) Downstream devices actually need IO address space, or
|
||||
(b) Explicit configuration, using "qemu -device
|
||||
pcie-root-port,io-reserve=<size>".
|
||||
|
||||
In case IO address space is exhausted edk2 will stop assigning resources
|
||||
to PCI(e) bridges. This is not limited to IO resources, the affected
|
||||
bridges will not get any memory resources assigned either.
|
||||
|
||||
This patch solves this issue by not handing out the scarce IO address
|
||||
space, which is not needed in most cases anyway. Result is a more
|
||||
consistent PCI configuration in virtual machine configurations with many
|
||||
PCie root ports.
|
||||
|
||||
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
|
||||
(cherry picked from commit 27727338b2c0e3f50eb0176a1044e903fcb3c3b1)
|
||||
---
|
||||
OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.c b/OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.c
|
||||
index 6b2b6797b3..69903a6009 100644
|
||||
--- a/OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.c
|
||||
+++ b/OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.c
|
||||
@@ -589,7 +589,7 @@ GetResourcePadding (
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
- DefaultIo = TRUE;
|
||||
+ DefaultIo = FALSE;
|
||||
DefaultMmio = TRUE;
|
||||
DefaultPrefMmio = TRUE;
|
||||
|
||||
--
|
||||
2.39.3
|
||||
|
@ -1,216 +0,0 @@
|
||||
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
|
||||
|
@ -1,231 +0,0 @@
|
||||
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,32 @@
|
||||
{
|
||||
"description": "UEFI firmware for ARM64 virtual machines",
|
||||
"interface-types": [
|
||||
"uefi"
|
||||
],
|
||||
"mapping": {
|
||||
"device": "flash",
|
||||
"mode": "split",
|
||||
"executable": {
|
||||
"filename": "/usr/share/edk2/aarch64/QEMU_EFI-silent-pflash.qcow2",
|
||||
"format": "qcow2"
|
||||
},
|
||||
"nvram-template": {
|
||||
"filename": "/usr/share/edk2/aarch64/vars-template-pflash.qcow2",
|
||||
"format": "qcow2"
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"architecture": "aarch64",
|
||||
"machines": [
|
||||
"virt-*"
|
||||
]
|
||||
}
|
||||
],
|
||||
"features": [
|
||||
|
||||
],
|
||||
"tags": [
|
||||
|
||||
]
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
{
|
||||
"description": "UEFI firmware for ARM64 virtual machines, verbose logs",
|
||||
"interface-types": [
|
||||
"uefi"
|
||||
],
|
||||
"mapping": {
|
||||
"device": "flash",
|
||||
"mode": "split",
|
||||
"executable": {
|
||||
"filename": "/usr/share/edk2/aarch64/QEMU_EFI-pflash.qcow2",
|
||||
"format": "qcow2"
|
||||
},
|
||||
"nvram-template": {
|
||||
"filename": "/usr/share/edk2/aarch64/vars-template-pflash.qcow2",
|
||||
"format": "qcow2"
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"architecture": "aarch64",
|
||||
"machines": [
|
||||
"virt-*"
|
||||
]
|
||||
}
|
||||
],
|
||||
"features": [
|
||||
"verbose-static"
|
||||
],
|
||||
"tags": [
|
||||
|
||||
]
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
From 9572a0fe959277c5b57df05a32503ff83a7e93af Mon Sep 17 00:00:00 2001
|
||||
From: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Date: Thu, 1 Jun 2023 13:57:11 +0200
|
||||
Subject: [PATCH 02/12] ArmVirt/PlatformBootManagerLib: factor out IsVirtio()
|
||||
|
||||
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
|
||||
RH-MergeRequest: 39: ArmVirt: add VirtioSerialDxe to ArmVirtQemu builds
|
||||
RH-Jira: RHEL-643
|
||||
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
||||
RH-Commit: [2/6] 553a155707eb1c878133c1d13f6422c2b70fb78d (kraxel/centos-edk2)
|
||||
|
||||
IsVirtioRng() becomes just a thin wrapper for IsVirtio().
|
||||
This allows to add similar thin wrappers for other virtio
|
||||
devices in the future.
|
||||
|
||||
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
|
||||
(cherry picked from commit a196b04926e70880334fcd649837d0ac63b0bfd5)
|
||||
---
|
||||
.../PlatformBootManagerLib/PlatformBm.c | 26 +++++++++++++++----
|
||||
1 file changed, 21 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c
|
||||
index 10c815378c..5eb6f0f9c1 100644
|
||||
--- a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c
|
||||
+++ b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c
|
||||
@@ -269,15 +269,16 @@ IsPciDisplay (
|
||||
}
|
||||
|
||||
/**
|
||||
- This FILTER_FUNCTION checks if a handle corresponds to a Virtio RNG device at
|
||||
- the VIRTIO_DEVICE_PROTOCOL level.
|
||||
+ This function checks if a handle corresponds to the Virtio Device ID given
|
||||
+ at the VIRTIO_DEVICE_PROTOCOL level.
|
||||
**/
|
||||
STATIC
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
-IsVirtioRng (
|
||||
+IsVirtio (
|
||||
IN EFI_HANDLE Handle,
|
||||
- IN CONST CHAR16 *ReportText
|
||||
+ IN CONST CHAR16 *ReportText,
|
||||
+ IN UINT16 VirtIoDeviceId
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
@@ -293,7 +294,22 @@ IsVirtioRng (
|
||||
}
|
||||
|
||||
return (BOOLEAN)(VirtIo->SubSystemDeviceId ==
|
||||
- VIRTIO_SUBSYSTEM_ENTROPY_SOURCE);
|
||||
+ VirtIoDeviceId);
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
+ This FILTER_FUNCTION checks if a handle corresponds to a Virtio RNG device at
|
||||
+ the VIRTIO_DEVICE_PROTOCOL level.
|
||||
+**/
|
||||
+STATIC
|
||||
+BOOLEAN
|
||||
+EFIAPI
|
||||
+IsVirtioRng (
|
||||
+ IN EFI_HANDLE Handle,
|
||||
+ IN CONST CHAR16 *ReportText
|
||||
+ )
|
||||
+{
|
||||
+ return IsVirtio (Handle, ReportText, VIRTIO_SUBSYSTEM_ENTROPY_SOURCE);
|
||||
}
|
||||
|
||||
/**
|
||||
--
|
||||
2.39.3
|
||||
|
@ -0,0 +1,96 @@
|
||||
From 8545529f2b6d967946f111d79455ec8896d53311 Mon Sep 17 00:00:00 2001
|
||||
From: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Date: Thu, 1 Jun 2023 13:57:12 +0200
|
||||
Subject: [PATCH 03/12] ArmVirt/PlatformBootManagerLib: factor out
|
||||
IsVirtioPci()
|
||||
|
||||
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
|
||||
RH-MergeRequest: 39: ArmVirt: add VirtioSerialDxe to ArmVirtQemu builds
|
||||
RH-Jira: RHEL-643
|
||||
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
||||
RH-Commit: [3/6] d0000df1169e1f7b8ce3ad4942460cdc661a0ed9 (kraxel/centos-edk2)
|
||||
|
||||
IsVirtioPciRng() becomes just a thin wrapper for IsVirtioPci().
|
||||
This allows to add similar thin wrappers for other virtio
|
||||
devices in the future.
|
||||
|
||||
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
|
||||
(cherry picked from commit aaf546879ab71722c36738ccc6f0f0ab4ecf5076)
|
||||
---
|
||||
.../PlatformBootManagerLib/PlatformBm.c | 30 ++++++++++++++-----
|
||||
1 file changed, 23 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c
|
||||
index 5eb6f0f9c1..ed38c42a43 100644
|
||||
--- a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c
|
||||
+++ b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c
|
||||
@@ -313,15 +313,16 @@ IsVirtioRng (
|
||||
}
|
||||
|
||||
/**
|
||||
- This FILTER_FUNCTION checks if a handle corresponds to a Virtio RNG device at
|
||||
- the EFI_PCI_IO_PROTOCOL level.
|
||||
+ This function checks if a handle corresponds to the Virtio Device ID given
|
||||
+ at the EFI_PCI_IO_PROTOCOL level.
|
||||
**/
|
||||
STATIC
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
-IsVirtioPciRng (
|
||||
+IsVirtioPci (
|
||||
IN EFI_HANDLE Handle,
|
||||
- IN CONST CHAR16 *ReportText
|
||||
+ IN CONST CHAR16 *ReportText,
|
||||
+ IN UINT16 VirtIoDeviceId
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
@@ -387,11 +388,11 @@ IsVirtioPciRng (
|
||||
//
|
||||
// From DeviceId and RevisionId, determine whether the device is a
|
||||
// modern-only Virtio 1.0 device. In case of Virtio 1.0, DeviceId can
|
||||
- // immediately be restricted to VIRTIO_SUBSYSTEM_ENTROPY_SOURCE, and
|
||||
+ // immediately be restricted to VirtIoDeviceId, and
|
||||
// SubsystemId will only play a sanity-check role. Otherwise, DeviceId can
|
||||
// only be sanity-checked, and SubsystemId will decide.
|
||||
//
|
||||
- if ((DeviceId == 0x1040 + VIRTIO_SUBSYSTEM_ENTROPY_SOURCE) &&
|
||||
+ if ((DeviceId == 0x1040 + VirtIoDeviceId) &&
|
||||
(RevisionId >= 0x01))
|
||||
{
|
||||
Virtio10 = TRUE;
|
||||
@@ -419,7 +420,7 @@ IsVirtioPciRng (
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
- if (!Virtio10 && (SubsystemId == VIRTIO_SUBSYSTEM_ENTROPY_SOURCE)) {
|
||||
+ if (!Virtio10 && (SubsystemId == VirtIoDeviceId)) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -430,6 +431,21 @@ PciError:
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
+/**
|
||||
+ This FILTER_FUNCTION checks if a handle corresponds to a Virtio RNG device at
|
||||
+ the EFI_PCI_IO_PROTOCOL level.
|
||||
+**/
|
||||
+STATIC
|
||||
+BOOLEAN
|
||||
+EFIAPI
|
||||
+IsVirtioPciRng (
|
||||
+ IN EFI_HANDLE Handle,
|
||||
+ IN CONST CHAR16 *ReportText
|
||||
+ )
|
||||
+{
|
||||
+ return IsVirtioPci (Handle, ReportText, VIRTIO_SUBSYSTEM_ENTROPY_SOURCE);
|
||||
+}
|
||||
+
|
||||
/**
|
||||
This CALLBACK_FUNCTION attempts to connect a handle non-recursively, asking
|
||||
the matching driver to produce all first-level child handles.
|
||||
--
|
||||
2.39.3
|
||||
|
@ -0,0 +1,228 @@
|
||||
From ad95ab2b76485458fed60ab20631b62a010c0e4d Mon Sep 17 00:00:00 2001
|
||||
From: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Date: Thu, 1 Jun 2023 13:57:13 +0200
|
||||
Subject: [PATCH 04/12] ArmVirt/PlatformBootManagerLib: set up virtio serial as
|
||||
console
|
||||
|
||||
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
|
||||
RH-MergeRequest: 39: ArmVirt: add VirtioSerialDxe to ArmVirtQemu builds
|
||||
RH-Jira: RHEL-643
|
||||
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
||||
RH-Commit: [4/6] 46540eeb8901cfeef83cffcdcb6e1c23995b391a (kraxel/centos-edk2)
|
||||
|
||||
In case a virtio serial device is found in the system register the first
|
||||
console port as EFI console, by updating ConIn, ConOut and ErrOut.
|
||||
|
||||
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
||||
(cherry picked from commit 15f83fa36442eaa272300b31699b3b82ce7e07a9)
|
||||
---
|
||||
.../PlatformBootManagerLib/PlatformBm.c | 172 ++++++++++++++++++
|
||||
1 file changed, 172 insertions(+)
|
||||
|
||||
diff --git a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c
|
||||
index ed38c42a43..b92a916f7e 100644
|
||||
--- a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c
|
||||
+++ b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c
|
||||
@@ -312,6 +312,21 @@ IsVirtioRng (
|
||||
return IsVirtio (Handle, ReportText, VIRTIO_SUBSYSTEM_ENTROPY_SOURCE);
|
||||
}
|
||||
|
||||
+/**
|
||||
+ This FILTER_FUNCTION checks if a handle corresponds to a Virtio serial device at
|
||||
+ the VIRTIO_DEVICE_PROTOCOL level.
|
||||
+**/
|
||||
+STATIC
|
||||
+BOOLEAN
|
||||
+EFIAPI
|
||||
+IsVirtioSerial (
|
||||
+ IN EFI_HANDLE Handle,
|
||||
+ IN CONST CHAR16 *ReportText
|
||||
+ )
|
||||
+{
|
||||
+ return IsVirtio (Handle, ReportText, VIRTIO_SUBSYSTEM_CONSOLE);
|
||||
+}
|
||||
+
|
||||
/**
|
||||
This function checks if a handle corresponds to the Virtio Device ID given
|
||||
at the EFI_PCI_IO_PROTOCOL level.
|
||||
@@ -446,6 +461,21 @@ IsVirtioPciRng (
|
||||
return IsVirtioPci (Handle, ReportText, VIRTIO_SUBSYSTEM_ENTROPY_SOURCE);
|
||||
}
|
||||
|
||||
+/**
|
||||
+ This FILTER_FUNCTION checks if a handle corresponds to a Virtio serial device at
|
||||
+ the EFI_PCI_IO_PROTOCOL level.
|
||||
+**/
|
||||
+STATIC
|
||||
+BOOLEAN
|
||||
+EFIAPI
|
||||
+IsVirtioPciSerial (
|
||||
+ IN EFI_HANDLE Handle,
|
||||
+ IN CONST CHAR16 *ReportText
|
||||
+ )
|
||||
+{
|
||||
+ return IsVirtioPci (Handle, ReportText, VIRTIO_SUBSYSTEM_CONSOLE);
|
||||
+}
|
||||
+
|
||||
/**
|
||||
This CALLBACK_FUNCTION attempts to connect a handle non-recursively, asking
|
||||
the matching driver to produce all first-level child handles.
|
||||
@@ -534,6 +564,142 @@ AddOutput (
|
||||
));
|
||||
}
|
||||
|
||||
+/**
|
||||
+ This CALLBACK_FUNCTION retrieves the EFI_DEVICE_PATH_PROTOCOL from
|
||||
+ the handle, appends serial, uart and terminal nodes, finally updates
|
||||
+ ConIn, ConOut and ErrOut.
|
||||
+**/
|
||||
+STATIC
|
||||
+VOID
|
||||
+EFIAPI
|
||||
+SetupVirtioSerial (
|
||||
+ IN EFI_HANDLE Handle,
|
||||
+ IN CONST CHAR16 *ReportText
|
||||
+ )
|
||||
+{
|
||||
+ STATIC CONST ACPI_HID_DEVICE_PATH SerialNode = {
|
||||
+ {
|
||||
+ ACPI_DEVICE_PATH,
|
||||
+ ACPI_DP,
|
||||
+ {
|
||||
+ (UINT8)(sizeof (ACPI_HID_DEVICE_PATH)),
|
||||
+ (UINT8)((sizeof (ACPI_HID_DEVICE_PATH)) >> 8)
|
||||
+ },
|
||||
+ },
|
||||
+ EISA_PNP_ID (0x0501),
|
||||
+ 0
|
||||
+ };
|
||||
+
|
||||
+ STATIC CONST UART_DEVICE_PATH UartNode = {
|
||||
+ {
|
||||
+ MESSAGING_DEVICE_PATH,
|
||||
+ MSG_UART_DP,
|
||||
+ {
|
||||
+ (UINT8)(sizeof (UART_DEVICE_PATH)),
|
||||
+ (UINT8)((sizeof (UART_DEVICE_PATH)) >> 8)
|
||||
+ },
|
||||
+ },
|
||||
+ 0,
|
||||
+ 115200,
|
||||
+ 8,
|
||||
+ 1,
|
||||
+ 1
|
||||
+ };
|
||||
+
|
||||
+ STATIC CONST VENDOR_DEVICE_PATH TerminalNode = {
|
||||
+ {
|
||||
+ MESSAGING_DEVICE_PATH,
|
||||
+ MSG_VENDOR_DP,
|
||||
+ {
|
||||
+ (UINT8)(sizeof (VENDOR_DEVICE_PATH)),
|
||||
+ (UINT8)((sizeof (VENDOR_DEVICE_PATH)) >> 8)
|
||||
+ },
|
||||
+ },
|
||||
+ DEVICE_PATH_MESSAGING_VT_UTF8
|
||||
+ };
|
||||
+
|
||||
+ EFI_STATUS Status;
|
||||
+ EFI_DEVICE_PATH_PROTOCOL *DevicePath, *OldDevicePath;
|
||||
+
|
||||
+ DevicePath = DevicePathFromHandle (Handle);
|
||||
+
|
||||
+ if (DevicePath == NULL) {
|
||||
+ DEBUG ((
|
||||
+ DEBUG_ERROR,
|
||||
+ "%a: %s: handle %p: device path not found\n",
|
||||
+ __func__,
|
||||
+ ReportText,
|
||||
+ Handle
|
||||
+ ));
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ DevicePath = AppendDevicePathNode (
|
||||
+ DevicePath,
|
||||
+ &SerialNode.Header
|
||||
+ );
|
||||
+
|
||||
+ OldDevicePath = DevicePath;
|
||||
+ DevicePath = AppendDevicePathNode (
|
||||
+ DevicePath,
|
||||
+ &UartNode.Header
|
||||
+ );
|
||||
+ FreePool (OldDevicePath);
|
||||
+
|
||||
+ OldDevicePath = DevicePath;
|
||||
+ DevicePath = AppendDevicePathNode (
|
||||
+ DevicePath,
|
||||
+ &TerminalNode.Header
|
||||
+ );
|
||||
+ FreePool (OldDevicePath);
|
||||
+
|
||||
+ Status = EfiBootManagerUpdateConsoleVariable (ConIn, DevicePath, NULL);
|
||||
+ if (EFI_ERROR (Status)) {
|
||||
+ DEBUG ((
|
||||
+ DEBUG_ERROR,
|
||||
+ "%a: %s: adding to ConIn: %r\n",
|
||||
+ __func__,
|
||||
+ ReportText,
|
||||
+ Status
|
||||
+ ));
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ Status = EfiBootManagerUpdateConsoleVariable (ConOut, DevicePath, NULL);
|
||||
+ if (EFI_ERROR (Status)) {
|
||||
+ DEBUG ((
|
||||
+ DEBUG_ERROR,
|
||||
+
|
||||
+ "%a: %s: adding to ConOut: %r\n",
|
||||
+ __func__,
|
||||
+ ReportText,
|
||||
+ Status
|
||||
+ ));
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ Status = EfiBootManagerUpdateConsoleVariable (ErrOut, DevicePath, NULL);
|
||||
+ if (EFI_ERROR (Status)) {
|
||||
+ DEBUG ((
|
||||
+ DEBUG_ERROR,
|
||||
+ "%a: %s: adding to ErrOut: %r\n",
|
||||
+ __func__,
|
||||
+ ReportText,
|
||||
+ Status
|
||||
+ ));
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ FreePool (DevicePath);
|
||||
+
|
||||
+ DEBUG ((
|
||||
+ DEBUG_VERBOSE,
|
||||
+ "%a: %s: added to ConIn, ConOut and ErrOut\n",
|
||||
+ __func__,
|
||||
+ ReportText
|
||||
+ ));
|
||||
+}
|
||||
+
|
||||
STATIC
|
||||
VOID
|
||||
PlatformRegisterFvBootOption (
|
||||
@@ -932,6 +1098,12 @@ PlatformBootManagerBeforeConsole (
|
||||
// instances on Virtio PCI RNG devices.
|
||||
//
|
||||
FilterAndProcess (&gEfiPciIoProtocolGuid, IsVirtioPciRng, Connect);
|
||||
+
|
||||
+ //
|
||||
+ // Register Virtio serial devices as console.
|
||||
+ //
|
||||
+ FilterAndProcess (&gVirtioDeviceProtocolGuid, IsVirtioSerial, SetupVirtioSerial);
|
||||
+ FilterAndProcess (&gEfiPciIoProtocolGuid, IsVirtioPciSerial, SetupVirtioSerial);
|
||||
}
|
||||
|
||||
/**
|
||||
--
|
||||
2.39.3
|
||||
|
@ -0,0 +1,59 @@
|
||||
From 262a607fbc608c02fc3c2a87244d033932d564bb Mon Sep 17 00:00:00 2001
|
||||
From: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Date: Thu, 1 Jun 2023 13:57:10 +0200
|
||||
Subject: [PATCH 01/12] ArmVirt: add VirtioSerialDxe to ArmVirtQemu builds
|
||||
|
||||
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
|
||||
RH-MergeRequest: 39: ArmVirt: add VirtioSerialDxe to ArmVirtQemu builds
|
||||
RH-Jira: RHEL-643
|
||||
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
||||
RH-Commit: [1/6] 03b627e1fae7851fa51e6fe67253ff1b64948d0e (kraxel/centos-edk2)
|
||||
|
||||
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Acked-by: Ard Biesheuvel <ardb@kernel.org>
|
||||
(cherry picked from commit 6925150febb3a76d8e40c19babcc578555ca78fe)
|
||||
---
|
||||
ArmVirtPkg/ArmVirtQemu.dsc | 1 +
|
||||
ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc | 1 +
|
||||
ArmVirtPkg/ArmVirtQemuKernel.dsc | 1 +
|
||||
3 files changed, 3 insertions(+)
|
||||
|
||||
diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
|
||||
index b1deefc2fd..5df6a89578 100644
|
||||
--- a/ArmVirtPkg/ArmVirtQemu.dsc
|
||||
+++ b/ArmVirtPkg/ArmVirtQemu.dsc
|
||||
@@ -453,6 +453,7 @@
|
||||
OvmfPkg/VirtioScsiDxe/VirtioScsi.inf
|
||||
OvmfPkg/VirtioNetDxe/VirtioNet.inf
|
||||
OvmfPkg/VirtioRngDxe/VirtioRng.inf
|
||||
+ OvmfPkg/VirtioSerialDxe/VirtioSerial.inf
|
||||
|
||||
#
|
||||
# FAT filesystem + GPT/MBR partitioning + UDF filesystem + virtio-fs
|
||||
diff --git a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
|
||||
index 4dbb77a6ca..00ec4dd186 100644
|
||||
--- a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
|
||||
+++ b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
|
||||
@@ -96,6 +96,7 @@ READ_LOCK_STATUS = TRUE
|
||||
INF OvmfPkg/VirtioNetDxe/VirtioNet.inf
|
||||
INF OvmfPkg/VirtioScsiDxe/VirtioScsi.inf
|
||||
INF OvmfPkg/VirtioRngDxe/VirtioRng.inf
|
||||
+ INF OvmfPkg/VirtioSerialDxe/VirtioSerial.inf
|
||||
|
||||
INF ShellPkg/Application/Shell/Shell.inf
|
||||
|
||||
diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc
|
||||
index afebc46a04..76b7c128bb 100644
|
||||
--- a/ArmVirtPkg/ArmVirtQemuKernel.dsc
|
||||
+++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc
|
||||
@@ -353,6 +353,7 @@
|
||||
OvmfPkg/VirtioScsiDxe/VirtioScsi.inf
|
||||
OvmfPkg/VirtioNetDxe/VirtioNet.inf
|
||||
OvmfPkg/VirtioRngDxe/VirtioRng.inf
|
||||
+ OvmfPkg/VirtioSerialDxe/VirtioSerial.inf
|
||||
|
||||
#
|
||||
# FAT filesystem + GPT/MBR partitioning + UDF filesystem + virtio-fs
|
||||
--
|
||||
2.39.3
|
||||
|
@ -1,86 +0,0 @@
|
||||
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
|
||||
|
@ -1,97 +0,0 @@
|
||||
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,88 @@
|
||||
From 673ed284a598bf94d39f01f118158e55e5c04645 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Roth <michael.roth@amd.com>
|
||||
Date: Wed, 16 Aug 2023 15:11:45 -0500
|
||||
Subject: [PATCH 1/3] OvmfPkg/AmdSev: fix BdsPlatform.c assertion failure
|
||||
during boot
|
||||
|
||||
RH-Author: Gerd Hoffmann <None>
|
||||
RH-MergeRequest: 44: OvmfPkg/AmdSev: fix BdsPlatform.c assertion failure during boot
|
||||
RH-Bugzilla: 2190244
|
||||
RH-Acked-by: Oliver Steffen <osteffen@redhat.com>
|
||||
RH-Commit: [1/1] 44f18b2324cbd4aa1840613d9a8d19f0fbec7b1b (kraxel.rh/centos-src-edk2)
|
||||
|
||||
Booting an SEV guest with AmdSev OVMF package currently triggers the
|
||||
following assertion with QEMU:
|
||||
|
||||
InstallQemuFwCfgTables: installed 7 tables
|
||||
PcRtc: Write 0x20 to CMOS location 0x32
|
||||
[Variable]END_OF_DXE is signaled
|
||||
Initialize variable error flag (FF)
|
||||
|
||||
ASSERT_EFI_ERROR (Status = Not Found)
|
||||
ASSERT [BdsDxe] /home/VT_BUILD/ovmf/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c(1711): !(((INTN)(RETURN_STATUS)(Status)) < 0)
|
||||
|
||||
This seems to be due to commit 81dc0d8b4c, which switched to using
|
||||
PlatformBootManagerLib instead of PlatformBootManagerLibGrub. That
|
||||
pulls in a dependency on gEfiS3SaveStateProtocolGuid provider being
|
||||
available (which is asserted for in
|
||||
BdsPlatform.c:PlatformBootManagerBeforeConsole()/SaveS3BootScript()),
|
||||
but the libraries that provide it aren't currently included in the
|
||||
build. Add them similarly to what's done for OvmfPkg.
|
||||
|
||||
Fixes: 81dc0d8b4c ("OvmfPkg/AmdSev: stop using PlatformBootManagerLibGrub")
|
||||
Cc: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Cc: Ray Ni <ray.ni@intel.com>
|
||||
Cc: Erdem Aktas <erdemaktas@google.com>
|
||||
Cc: James Bottomley <jejb@linux.ibm.com>
|
||||
Cc: Jiewen Yao <jiewen.yao@intel.com>
|
||||
Cc: Min Xu <min.m.xu@intel.com>
|
||||
Cc: Tom Lendacky <thomas.lendacky@amd.com>
|
||||
Signed-off-by: Michael Roth <michael.roth@amd.com>
|
||||
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
|
||||
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Message-ID: <20230816201146.1634348-2-michael.roth@amd.com>
|
||||
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
||||
|
||||
List-Archive: https://edk2.groups.io/g/devel/message/107806
|
||||
---
|
||||
OvmfPkg/AmdSev/AmdSevX64.dsc | 3 +++
|
||||
OvmfPkg/AmdSev/AmdSevX64.fdf | 2 ++
|
||||
2 files changed, 5 insertions(+)
|
||||
|
||||
diff --git a/OvmfPkg/AmdSev/AmdSevX64.dsc b/OvmfPkg/AmdSev/AmdSevX64.dsc
|
||||
index 427df673f3..8d165ed05a 100644
|
||||
--- a/OvmfPkg/AmdSev/AmdSevX64.dsc
|
||||
+++ b/OvmfPkg/AmdSev/AmdSevX64.dsc
|
||||
@@ -199,6 +199,7 @@
|
||||
|
||||
SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf
|
||||
OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf
|
||||
+ S3BootScriptLib|MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf
|
||||
|
||||
!include OvmfPkg/Include/Dsc/OvmfTpmLibs.dsc.inc
|
||||
|
||||
@@ -715,6 +716,8 @@
|
||||
#
|
||||
MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
|
||||
OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf
|
||||
+ MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf
|
||||
+ MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf
|
||||
MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
|
||||
|
||||
#
|
||||
diff --git a/OvmfPkg/AmdSev/AmdSevX64.fdf b/OvmfPkg/AmdSev/AmdSevX64.fdf
|
||||
index a48c93e2a5..3e6ee61823 100644
|
||||
--- a/OvmfPkg/AmdSev/AmdSevX64.fdf
|
||||
+++ b/OvmfPkg/AmdSev/AmdSevX64.fdf
|
||||
@@ -269,6 +269,8 @@ INF OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
|
||||
|
||||
INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
|
||||
INF OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf
|
||||
+INF MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf
|
||||
+INF MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf
|
||||
INF MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
|
||||
|
||||
INF FatPkg/EnhancedFatDxe/Fat.inf
|
||||
--
|
||||
2.39.3
|
||||
|
@ -0,0 +1,120 @@
|
||||
From 9f0b4df867e6a2d56838e4048be245eac3fcc18e Mon Sep 17 00:00:00 2001
|
||||
From: Oliver Steffen <osteffen@redhat.com>
|
||||
Date: Wed, 16 Aug 2023 12:09:40 +0200
|
||||
Subject: [PATCH 3/3] OvmfPkg/AmdSevDxe: Shim Reboot workaround (RHEL only)
|
||||
|
||||
RH-Author: Oliver Steffen <osteffen@redhat.com>
|
||||
RH-MergeRequest: 46: OvmfPkg/AmdSevDxe: Shim Reboot workaround (RHEL only)
|
||||
RH-Bugzilla: 2218196
|
||||
RH-Acked-by: Gerd Hoffmann <None>
|
||||
RH-Commit: [1/1] 9bf3bb989e36253aa34bf82ecfe8faa7312e8d22 (osteffen/edk2)
|
||||
|
||||
Add a callback at the end of the Dxe phase that sets the
|
||||
"FB_NO_REBOOT" variable under the Shim GUID.
|
||||
This is a workaround for a boot loop in case a confidential
|
||||
guest that uses shim is booted with a vtpm device present.
|
||||
|
||||
BZ 2218196
|
||||
|
||||
Signed-off-by: Oliver Steffen <osteffen@redhat.com>
|
||||
---
|
||||
OvmfPkg/AmdSevDxe/AmdSevDxe.c | 42 +++++++++++++++++++++++++++++++++
|
||||
OvmfPkg/AmdSevDxe/AmdSevDxe.inf | 2 ++
|
||||
2 files changed, 44 insertions(+)
|
||||
|
||||
diff --git a/OvmfPkg/AmdSevDxe/AmdSevDxe.c b/OvmfPkg/AmdSevDxe/AmdSevDxe.c
|
||||
index db3675ae86..f639c093a2 100644
|
||||
--- a/OvmfPkg/AmdSevDxe/AmdSevDxe.c
|
||||
+++ b/OvmfPkg/AmdSevDxe/AmdSevDxe.c
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <Library/MemoryAllocationLib.h>
|
||||
#include <Library/UefiBootServicesTableLib.h>
|
||||
#include <Guid/ConfidentialComputingSevSnpBlob.h>
|
||||
+#include <Guid/GlobalVariable.h>
|
||||
#include <Library/PcdLib.h>
|
||||
#include <Pi/PrePiDxeCis.h>
|
||||
#include <Protocol/SevMemoryAcceptance.h>
|
||||
@@ -28,6 +29,10 @@
|
||||
// Present, initialized, tested bits defined in MdeModulePkg/Core/Dxe/DxeMain.h
|
||||
#define EFI_MEMORY_INTERNAL_MASK 0x0700000000000000ULL
|
||||
|
||||
+static EFI_GUID ShimLockGuid = {
|
||||
+ 0x605dab50, 0xe046, 0x4300, { 0xab, 0xb6, 0x3d, 0xd8, 0x10, 0xdd, 0x8b, 0x23 }
|
||||
+};
|
||||
+
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
AllocateConfidentialComputingBlob (
|
||||
@@ -191,6 +196,32 @@ STATIC EDKII_MEMORY_ACCEPT_PROTOCOL mMemoryAcceptProtocol = {
|
||||
AmdSevMemoryAccept
|
||||
};
|
||||
|
||||
+VOID
|
||||
+EFIAPI
|
||||
+PopulateVarstore (
|
||||
+ EFI_EVENT Event,
|
||||
+ VOID *Context
|
||||
+ )
|
||||
+{
|
||||
+ EFI_SYSTEM_TABLE *SystemTable = (EFI_SYSTEM_TABLE *)Context;
|
||||
+ EFI_STATUS Status;
|
||||
+
|
||||
+ DEBUG ((DEBUG_INFO, "Populating Varstore\n"));
|
||||
+ UINT32 data = 1;
|
||||
+
|
||||
+ Status = SystemTable->RuntimeServices->SetVariable (
|
||||
+ L"FB_NO_REBOOT",
|
||||
+ &ShimLockGuid,
|
||||
+ EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_BOOTSERVICE_ACCESS,
|
||||
+ sizeof (data),
|
||||
+ &data
|
||||
+ );
|
||||
+ ASSERT_EFI_ERROR (Status);
|
||||
+
|
||||
+ Status = SystemTable->BootServices->CloseEvent (Event);
|
||||
+ ASSERT_EFI_ERROR (Status);
|
||||
+}
|
||||
+
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
AmdSevDxeEntryPoint (
|
||||
@@ -203,6 +234,7 @@ AmdSevDxeEntryPoint (
|
||||
UINTN NumEntries;
|
||||
UINTN Index;
|
||||
CONFIDENTIAL_COMPUTING_SNP_BLOB_LOCATION *SnpBootDxeTable;
|
||||
+ EFI_EVENT PopulateVarstoreEvent;
|
||||
|
||||
//
|
||||
// Do nothing when SEV is not enabled
|
||||
@@ -361,5 +393,15 @@ AmdSevDxeEntryPoint (
|
||||
);
|
||||
}
|
||||
|
||||
+ Status = gBS->CreateEventEx (
|
||||
+ EVT_NOTIFY_SIGNAL,
|
||||
+ TPL_CALLBACK,
|
||||
+ PopulateVarstore,
|
||||
+ SystemTable,
|
||||
+ &gEfiEndOfDxeEventGroupGuid,
|
||||
+ &PopulateVarstoreEvent
|
||||
+ );
|
||||
+ ASSERT_EFI_ERROR (Status);
|
||||
+
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
diff --git a/OvmfPkg/AmdSevDxe/AmdSevDxe.inf b/OvmfPkg/AmdSevDxe/AmdSevDxe.inf
|
||||
index e7c7d526c9..09cbd2b0ca 100644
|
||||
--- a/OvmfPkg/AmdSevDxe/AmdSevDxe.inf
|
||||
+++ b/OvmfPkg/AmdSevDxe/AmdSevDxe.inf
|
||||
@@ -54,6 +54,8 @@
|
||||
[Guids]
|
||||
gConfidentialComputingSevSnpBlobGuid
|
||||
gEfiEventBeforeExitBootServicesGuid
|
||||
+ gEfiEndOfDxeEventGroupGuid ## CONSUMES ## Event
|
||||
+
|
||||
|
||||
[Pcd]
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfHostBridgePciDevId
|
||||
--
|
||||
2.39.3
|
||||
|
@ -0,0 +1,79 @@
|
||||
From 7f3f6e3088655e33600aacd886aa51d19c01c59a Mon Sep 17 00:00:00 2001
|
||||
From: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Date: Wed, 19 Jul 2023 18:31:29 +0200
|
||||
Subject: [PATCH 2/3] OvmfPkg/IoMmuDxe: add locking to
|
||||
IoMmuAllocateBounceBuffer
|
||||
|
||||
RH-Author: Gerd Hoffmann <None>
|
||||
RH-MergeRequest: 45: OvmfPkg/IoMmuDxe: add locking to IoMmuAllocateBounceBuffer
|
||||
RH-Bugzilla: 2211060
|
||||
RH-Acked-by: Oliver Steffen <osteffen@redhat.com>
|
||||
RH-Commit: [1/1] c4998c57651df23342a0cd6e8982bf59f306da83 (kraxel.rh/centos-src-edk2)
|
||||
|
||||
Searching for an unused bounce buffer in mReservedMemBitmap and
|
||||
reserving the buffer by flipping the bit is a critical section
|
||||
which must not be interrupted. Raise the TPL level to ensure
|
||||
that.
|
||||
|
||||
Without this fix it can happen that IoMmuDxe hands out the same
|
||||
bounce buffer twice, causing trouble down the road. Seen happening
|
||||
in practice with VirtioNetDxe setting up the network interface (and
|
||||
calling into IoMmuDxe from a polling timer callback) in parallel with
|
||||
Boot Manager doing some disk I/O. An ASSERT() in VirtioNet caught
|
||||
the buffer inconsistency.
|
||||
|
||||
Full story with lots of details and discussions is available here:
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=2211060
|
||||
|
||||
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
||||
(cherry picked from commit a52044a9e602bc168cdf5d73a48952bfc9edb521)
|
||||
---
|
||||
OvmfPkg/IoMmuDxe/IoMmuBuffer.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/OvmfPkg/IoMmuDxe/IoMmuBuffer.c b/OvmfPkg/IoMmuDxe/IoMmuBuffer.c
|
||||
index c8f6cf4818..103003cae3 100644
|
||||
--- a/OvmfPkg/IoMmuDxe/IoMmuBuffer.c
|
||||
+++ b/OvmfPkg/IoMmuDxe/IoMmuBuffer.c
|
||||
@@ -367,7 +367,9 @@ IoMmuAllocateBounceBuffer (
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
UINT32 ReservedMemBitmap;
|
||||
+ EFI_TPL OldTpl;
|
||||
|
||||
+ OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
|
||||
ReservedMemBitmap = 0;
|
||||
Status = InternalAllocateBuffer (
|
||||
Type,
|
||||
@@ -378,6 +380,7 @@ IoMmuAllocateBounceBuffer (
|
||||
);
|
||||
MapInfo->ReservedMemBitmap = ReservedMemBitmap;
|
||||
mReservedMemBitmap |= ReservedMemBitmap;
|
||||
+ gBS->RestoreTPL (OldTpl);
|
||||
|
||||
ASSERT (Status == EFI_SUCCESS);
|
||||
|
||||
@@ -395,6 +398,8 @@ IoMmuFreeBounceBuffer (
|
||||
IN OUT MAP_INFO *MapInfo
|
||||
)
|
||||
{
|
||||
+ EFI_TPL OldTpl;
|
||||
+
|
||||
if (MapInfo->ReservedMemBitmap == 0) {
|
||||
gBS->FreePages (MapInfo->PlainTextAddress, MapInfo->NumberOfPages);
|
||||
} else {
|
||||
@@ -407,9 +412,11 @@ IoMmuFreeBounceBuffer (
|
||||
mReservedMemBitmap,
|
||||
mReservedMemBitmap & ((UINT32)(~MapInfo->ReservedMemBitmap))
|
||||
));
|
||||
+ OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
|
||||
MapInfo->PlainTextAddress = 0;
|
||||
mReservedMemBitmap &= (UINT32)(~MapInfo->ReservedMemBitmap);
|
||||
MapInfo->ReservedMemBitmap = 0;
|
||||
+ gBS->RestoreTPL (OldTpl);
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
--
|
||||
2.39.3
|
||||
|
@ -0,0 +1,37 @@
|
||||
From db07792f9eb095a1f7570b23b1e9dad6edca17a5 Mon Sep 17 00:00:00 2001
|
||||
From: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Date: Wed, 17 May 2023 12:24:49 +0200
|
||||
Subject: [PATCH 12/12] OvmfPkg/MicrovmX64: enable 1G pages
|
||||
|
||||
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
|
||||
RH-MergeRequest: 40: enable use of gigabyte pages
|
||||
RH-Jira: RHEL-644
|
||||
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
||||
RH-Commit: [3/3] 369373082e4dd0be9a4f257e5be9c827cc7de3c5 (kraxel/centos-edk2)
|
||||
|
||||
Reduces the memory footprint and speeds up booting.
|
||||
|
||||
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Acked-by: Ard Biesheuvel <ardb@kernel.org>
|
||||
(cherry picked from commit 04c5b3023e49c35d291f41d2c39b4d12a62b8f9c)
|
||||
---
|
||||
OvmfPkg/Microvm/MicrovmX64.dsc | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/OvmfPkg/Microvm/MicrovmX64.dsc b/OvmfPkg/Microvm/MicrovmX64.dsc
|
||||
index 49d1d7ef5c..cc8e3abc45 100644
|
||||
--- a/OvmfPkg/Microvm/MicrovmX64.dsc
|
||||
+++ b/OvmfPkg/Microvm/MicrovmX64.dsc
|
||||
@@ -544,6 +544,9 @@
|
||||
gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesCode|0x100
|
||||
gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesData|0x100
|
||||
|
||||
+ # use 1G pages
|
||||
+ gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable|TRUE
|
||||
+
|
||||
#
|
||||
# Network Pcds
|
||||
#
|
||||
--
|
||||
2.39.3
|
||||
|
@ -0,0 +1,37 @@
|
||||
From 943b4994942d550bef98685d13ffb26d4b5dd665 Mon Sep 17 00:00:00 2001
|
||||
From: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Date: Wed, 17 May 2023 12:24:48 +0200
|
||||
Subject: [PATCH 11/12] OvmfPkg/OvmfPkgIa32X64: enable 1G pages
|
||||
|
||||
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
|
||||
RH-MergeRequest: 40: enable use of gigabyte pages
|
||||
RH-Jira: RHEL-644
|
||||
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
||||
RH-Commit: [2/3] 7385647b30e5096b356a13085a8081de79c916f8 (kraxel/centos-edk2)
|
||||
|
||||
Reduces the memory footprint and speeds up booting.
|
||||
|
||||
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Acked-by: Ard Biesheuvel <ardb@kernel.org>
|
||||
(cherry picked from commit b63e17d746aa6bab2b1101711395725005e71a02)
|
||||
---
|
||||
OvmfPkg/OvmfPkgIa32X64.dsc | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc
|
||||
index a41bc32454..a6714cea91 100644
|
||||
--- a/OvmfPkg/OvmfPkgIa32X64.dsc
|
||||
+++ b/OvmfPkg/OvmfPkgIa32X64.dsc
|
||||
@@ -557,6 +557,9 @@
|
||||
# never lets the RAM below 4 GB exceed 2816 MB.
|
||||
gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xE0000000
|
||||
|
||||
+ # use 1G pages
|
||||
+ gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable|TRUE
|
||||
+
|
||||
!if $(SOURCE_DEBUG_ENABLE) == TRUE
|
||||
gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdDebugLoadImageMethod|0x2
|
||||
!endif
|
||||
--
|
||||
2.39.3
|
||||
|
@ -0,0 +1,57 @@
|
||||
From f24768ae482651073db9050fdaad49afe930b127 Mon Sep 17 00:00:00 2001
|
||||
From: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Date: Wed, 17 May 2023 12:24:47 +0200
|
||||
Subject: [PATCH 10/12] OvmfPkg/PlatformInitLib: check PcdUse1GPageTable
|
||||
|
||||
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
|
||||
RH-MergeRequest: 40: enable use of gigabyte pages
|
||||
RH-Jira: RHEL-644
|
||||
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
||||
RH-Commit: [1/3] 5d8b87d3b6a6b8af4d1a4aabedd8f69c512bf01c (kraxel/centos-edk2)
|
||||
|
||||
If PcdUse1GPageTable is not enabled restrict the physical address space
|
||||
used to 1TB, to limit the amount of memory needed for identity mapping
|
||||
page tables.
|
||||
|
||||
The same already happens in case the processor has no support for
|
||||
gigabyte pages.
|
||||
|
||||
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Acked-by: Ard Biesheuvel <ardb@kernel.org>
|
||||
(cherry picked from commit d4d24001f78bcee965d8854fba6f08f48b4ec446)
|
||||
---
|
||||
OvmfPkg/Library/PlatformInitLib/MemDetect.c | 5 +++++
|
||||
OvmfPkg/Library/PlatformInitLib/PlatformInitLib.inf | 1 +
|
||||
2 files changed, 6 insertions(+)
|
||||
|
||||
diff --git a/OvmfPkg/Library/PlatformInitLib/MemDetect.c b/OvmfPkg/Library/PlatformInitLib/MemDetect.c
|
||||
index 0482d8906d..662e7e85bb 100644
|
||||
--- a/OvmfPkg/Library/PlatformInitLib/MemDetect.c
|
||||
+++ b/OvmfPkg/Library/PlatformInitLib/MemDetect.c
|
||||
@@ -666,6 +666,11 @@ PlatformAddressWidthFromCpuid (
|
||||
PhysBits = 40;
|
||||
}
|
||||
|
||||
+ if (!FixedPcdGetBool (PcdUse1GPageTable) && (PhysBits > 40)) {
|
||||
+ DEBUG ((DEBUG_INFO, "%a: limit PhysBits to 40 (PcdUse1GPageTable is false)\n", __func__));
|
||||
+ PhysBits = 40;
|
||||
+ }
|
||||
+
|
||||
PlatformInfoHob->PhysMemAddressWidth = PhysBits;
|
||||
PlatformInfoHob->FirstNonAddress = LShiftU64 (1, PlatformInfoHob->PhysMemAddressWidth);
|
||||
}
|
||||
diff --git a/OvmfPkg/Library/PlatformInitLib/PlatformInitLib.inf b/OvmfPkg/Library/PlatformInitLib/PlatformInitLib.inf
|
||||
index 86a82ad3e0..5a79d95b68 100644
|
||||
--- a/OvmfPkg/Library/PlatformInitLib/PlatformInitLib.inf
|
||||
+++ b/OvmfPkg/Library/PlatformInitLib/PlatformInitLib.inf
|
||||
@@ -58,6 +58,7 @@
|
||||
|
||||
[Pcd]
|
||||
gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
|
||||
+ gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable
|
||||
|
||||
[FixedPcd]
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfWorkAreaBase
|
||||
--
|
||||
2.39.3
|
||||
|
@ -0,0 +1,53 @@
|
||||
From b1643b16a4a70ea576b5f90476fd9c59750eafe8 Mon Sep 17 00:00:00 2001
|
||||
From: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Date: Thu, 1 Jun 2023 09:57:31 +0200
|
||||
Subject: [PATCH 07/12] OvmfPkg/PlatformInitLib: limit phys-bits to 46.
|
||||
|
||||
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
|
||||
RH-MergeRequest: 41: enable dynamic mmio window
|
||||
RH-Bugzilla: 2174749
|
||||
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
||||
RH-Commit: [1/2] d08a95b72276cba504176b3837714db67122ed66 (kraxel/centos-edk2)
|
||||
|
||||
Older linux kernels have problems with phys-bits larger than 46,
|
||||
ubuntu 18.04 (kernel 4.15) has been reported to be affected.
|
||||
|
||||
Reduce phys-bits limit from 47 to 46.
|
||||
|
||||
Reported-by: Fiona Ebner <f.ebner@proxmox.com>
|
||||
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
||||
(cherry picked from commit c1e853769046b322690ad336fdb98966757e7414)
|
||||
---
|
||||
OvmfPkg/Library/PlatformInitLib/MemDetect.c | 9 ++++++---
|
||||
1 file changed, 6 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/OvmfPkg/Library/PlatformInitLib/MemDetect.c b/OvmfPkg/Library/PlatformInitLib/MemDetect.c
|
||||
index 86700fc028..aab266399f 100644
|
||||
--- a/OvmfPkg/Library/PlatformInitLib/MemDetect.c
|
||||
+++ b/OvmfPkg/Library/PlatformInitLib/MemDetect.c
|
||||
@@ -646,16 +646,19 @@ PlatformAddressWidthFromCpuid (
|
||||
));
|
||||
|
||||
if (Valid) {
|
||||
- if (PhysBits > 47) {
|
||||
+ if (PhysBits > 46) {
|
||||
/*
|
||||
* Avoid 5-level paging altogether for now, which limits
|
||||
* PhysBits to 48. Also avoid using address bit 48, due to sign
|
||||
* extension we can't identity-map these addresses (and lots of
|
||||
* places in edk2 assume we have everything identity-mapped).
|
||||
* So the actual limit is 47.
|
||||
+ *
|
||||
+ * Also some older linux kernels apparently have problems handling
|
||||
+ * phys-bits > 46 correctly, so use that as limit.
|
||||
*/
|
||||
- DEBUG ((DEBUG_INFO, "%a: limit PhysBits to 47 (avoid 5-level paging)\n", __func__));
|
||||
- PhysBits = 47;
|
||||
+ DEBUG ((DEBUG_INFO, "%a: limit PhysBits to 46 (avoid 5-level paging)\n", __func__));
|
||||
+ PhysBits = 46;
|
||||
}
|
||||
|
||||
if (!Page1GSupport && (PhysBits > 40)) {
|
||||
--
|
||||
2.39.3
|
||||
|
@ -1,67 +0,0 @@
|
||||
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,42 @@
|
||||
From 60a5604388fa73872d67e9ed46a29c7fd0e4fc32 Mon Sep 17 00:00:00 2001
|
||||
From: Ard Biesheuvel <ardb@kernel.org>
|
||||
Date: Tue, 27 Jun 2023 13:14:06 +0200
|
||||
Subject: [PATCH 06/12] OvmfPkg/VirtioSerialDxe: Remove noisy debug print on
|
||||
supported() call
|
||||
|
||||
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
|
||||
RH-MergeRequest: 39: ArmVirt: add VirtioSerialDxe to ArmVirtQemu builds
|
||||
RH-Jira: RHEL-643
|
||||
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
||||
RH-Commit: [6/6] 62b611c1d82f1b87cac2a07655ca37117d438989 (kraxel/centos-edk2)
|
||||
|
||||
The UEFI driver model invokes the supported() method on every driver
|
||||
every time a connection attempt is made on any handle, and so doing an
|
||||
unconditional DEBUG() print inside this method produced a lot of noise.
|
||||
|
||||
So let's drop this DEBUG() call from the VirtioSerial driver's
|
||||
Supported() method.
|
||||
|
||||
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
|
||||
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
|
||||
(cherry picked from commit ea7a3015a2404e1358218463dd25df5ae7615352)
|
||||
---
|
||||
OvmfPkg/VirtioSerialDxe/VirtioSerial.c | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/OvmfPkg/VirtioSerialDxe/VirtioSerial.c b/OvmfPkg/VirtioSerialDxe/VirtioSerial.c
|
||||
index bfb2b324ea..9e27a519f4 100644
|
||||
--- a/OvmfPkg/VirtioSerialDxe/VirtioSerial.c
|
||||
+++ b/OvmfPkg/VirtioSerialDxe/VirtioSerial.c
|
||||
@@ -510,8 +510,6 @@ VirtioSerialDriverBindingSupported (
|
||||
Status = EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
- DEBUG ((DEBUG_INFO, "%a:%d: subsystem %d -> %r\n", __func__, __LINE__, VirtIo->SubSystemDeviceId, Status));
|
||||
-
|
||||
//
|
||||
// We needed VirtIo access only transitorily, to see whether we support the
|
||||
// device or not.
|
||||
--
|
||||
2.39.3
|
||||
|
@ -0,0 +1,45 @@
|
||||
From 2ab130462062bfcd66d3047eaa6947a151296a21 Mon Sep 17 00:00:00 2001
|
||||
From: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Date: Fri, 12 May 2023 16:23:06 +0200
|
||||
Subject: [PATCH 05/12] OvmfPkg/VirtioSerialDxe: use TPL_NOTIFY
|
||||
|
||||
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
|
||||
RH-MergeRequest: 39: ArmVirt: add VirtioSerialDxe to ArmVirtQemu builds
|
||||
RH-Jira: RHEL-643
|
||||
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
||||
RH-Commit: [5/6] 08998538804a8d62903e44e716bcafd9674d208f (kraxel/centos-edk2)
|
||||
|
||||
Apparently TPL_CALLBACK is too low, code runs into an ASSERT
|
||||
complaining the new TPL is lower than the old TPL.
|
||||
|
||||
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
||||
(cherry picked from commit 4e5a804222415ec7b2bec90ea0300b8a9f60f131)
|
||||
---
|
||||
OvmfPkg/VirtioSerialDxe/VirtioSerialPort.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/OvmfPkg/VirtioSerialDxe/VirtioSerialPort.c b/OvmfPkg/VirtioSerialDxe/VirtioSerialPort.c
|
||||
index 522b25e969..e4a58deff1 100644
|
||||
--- a/OvmfPkg/VirtioSerialDxe/VirtioSerialPort.c
|
||||
+++ b/OvmfPkg/VirtioSerialDxe/VirtioSerialPort.c
|
||||
@@ -158,7 +158,7 @@ VirtioSerialIoWrite (
|
||||
|
||||
VirtioSerialRingClearTx (SerialIo->Dev, PortTx (SerialIo->PortId));
|
||||
|
||||
- OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||
+ OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
|
||||
if (SerialIo->WriteOffset &&
|
||||
(SerialIo->WriteOffset + *BufferSize > PORT_TX_BUFSIZE))
|
||||
{
|
||||
@@ -201,7 +201,7 @@ VirtioSerialIoRead (
|
||||
goto NoData;
|
||||
}
|
||||
|
||||
- OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||
+ OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
|
||||
if (SerialIo->WriteOffset) {
|
||||
DEBUG ((DEBUG_VERBOSE, "%a:%d: WriteFlush %d\n", __func__, __LINE__, SerialIo->WriteOffset));
|
||||
VirtioSerialRingSendBuffer (
|
||||
--
|
||||
2.39.3
|
||||
|
@ -1,95 +0,0 @@
|
||||
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
|
||||
|
@ -1,72 +0,0 @@
|
||||
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,34 @@
|
||||
From e4fe4b80159b7df136f419da69251f45b62f36ec Mon Sep 17 00:00:00 2001
|
||||
From: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Date: Thu, 29 Jun 2023 13:37:33 +0200
|
||||
Subject: [PATCH 08/12] Revert "OvmfPkg: disable dynamic mmio window (rhel
|
||||
only)"
|
||||
|
||||
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
|
||||
RH-MergeRequest: 41: enable dynamic mmio window
|
||||
RH-Bugzilla: 2174749
|
||||
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
||||
RH-Commit: [2/2] 10ace0e012602153f82fccee3c555be40b3c6753 (kraxel/centos-edk2)
|
||||
|
||||
This reverts commit 218d3b32592bffe5ec7317c4838d29e92b4b86f0.
|
||||
---
|
||||
OvmfPkg/Library/PlatformInitLib/MemDetect.c | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/OvmfPkg/Library/PlatformInitLib/MemDetect.c b/OvmfPkg/Library/PlatformInitLib/MemDetect.c
|
||||
index aab266399f..0482d8906d 100644
|
||||
--- a/OvmfPkg/Library/PlatformInitLib/MemDetect.c
|
||||
+++ b/OvmfPkg/Library/PlatformInitLib/MemDetect.c
|
||||
@@ -682,8 +682,7 @@ PlatformDynamicMmioWindow (
|
||||
AddrSpace = LShiftU64 (1, PlatformInfoHob->PhysMemAddressWidth);
|
||||
MmioSpace = LShiftU64 (1, PlatformInfoHob->PhysMemAddressWidth - 3);
|
||||
|
||||
- if (FALSE /* disable for RHEL-9.2, libvirt is not ready yet */ &&
|
||||
- (PlatformInfoHob->PcdPciMmio64Size < MmioSpace) &&
|
||||
+ if ((PlatformInfoHob->PcdPciMmio64Size < MmioSpace) &&
|
||||
(PlatformInfoHob->PcdPciMmio64Base + MmioSpace < AddrSpace))
|
||||
{
|
||||
DEBUG ((DEBUG_INFO, "%a: using dynamic mmio window\n", __func__));
|
||||
--
|
||||
2.39.3
|
||||
|
@ -0,0 +1,48 @@
|
||||
From a920227615c895522739bbbf3a5fb7f6a470de86 Mon Sep 17 00:00:00 2001
|
||||
From: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Date: Tue, 28 Feb 2023 15:47:00 +0100
|
||||
Subject: [PATCH 09/12] UefiCpuPkg/MpInitLib: fix apic mode for cpu hotplug
|
||||
|
||||
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
|
||||
RH-MergeRequest: 42: UefiCpuPkg/MpInitLib: fix apic mode for cpu hotplug
|
||||
RH-Bugzilla: 2124143
|
||||
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
||||
RH-Commit: [1/1] 5168501c31541a57aaeb3b3bd7c3602205eb7cdf (kraxel/centos-edk2)
|
||||
|
||||
In case the number of CPUs can in increase beyond 255
|
||||
due to CPU hotplug choose x2apic mode.
|
||||
|
||||
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
||||
---
|
||||
UefiCpuPkg/Library/MpInitLib/MpLib.c | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c b/UefiCpuPkg/Library/MpInitLib/MpLib.c
|
||||
index f1f2840714..79fd8fb04d 100644
|
||||
--- a/UefiCpuPkg/Library/MpInitLib/MpLib.c
|
||||
+++ b/UefiCpuPkg/Library/MpInitLib/MpLib.c
|
||||
@@ -526,7 +526,9 @@ CollectProcessorCount (
|
||||
//
|
||||
// Enable x2APIC mode if
|
||||
// 1. Number of CPU is greater than 255; or
|
||||
- // 2. There are any logical processors reporting an Initial APIC ID of 255 or greater.
|
||||
+ // 2. The platform exposed the exact *boot* CPU count to us in advance, and
|
||||
+ // more than 255 logical processors are possible later, with hotplug; or
|
||||
+ // 3. There are any logical processors reporting an Initial APIC ID of 255 or greater.
|
||||
//
|
||||
X2Apic = FALSE;
|
||||
if (CpuMpData->CpuCount > 255) {
|
||||
@@ -534,6 +536,10 @@ CollectProcessorCount (
|
||||
// If there are more than 255 processor found, force to enable X2APIC
|
||||
//
|
||||
X2Apic = TRUE;
|
||||
+ } else if ((PcdGet32 (PcdCpuBootLogicalProcessorNumber) > 0) &&
|
||||
+ (PcdGet32 (PcdCpuMaxLogicalProcessorNumber) > 255))
|
||||
+ {
|
||||
+ X2Apic = TRUE;
|
||||
} else {
|
||||
CpuInfoInHob = (CPU_INFO_IN_HOB *)(UINTN)CpuMpData->CpuInfoInHob;
|
||||
for (Index = 0; Index < CpuMpData->CpuCount; Index++) {
|
||||
--
|
||||
2.39.3
|
||||
|
@ -1,42 +0,0 @@
|
||||
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
|
||||
|
Loading…
Reference in new issue