diff --git a/0001-BaseTools-do-not-build-BrotliCompress-RH-only.patch b/0001-BaseTools-do-not-build-BrotliCompress-RH-only.patch new file mode 100644 index 0000000..298d93b --- /dev/null +++ b/0001-BaseTools-do-not-build-BrotliCompress-RH-only.patch @@ -0,0 +1,43 @@ +From 61e29798c9c4e6b89a8e5c50939c6ab2f9ba3478 Mon Sep 17 00:00:00 2001 +From: Laszlo Ersek +Date: Thu, 4 Jun 2020 13:34:12 +0200 +Subject: [PATCH 01/21] BaseTools: do not build BrotliCompress (RH only) + +Notes about the RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] -> +RHEL-8.5/20210520-e1999b264f1f [edk2-stable202105] rebase: + +- no change + +Notes about the RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] -> +RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] rebase: + +- New patch. + +BrotliCompress is not used for building ArmVirtPkg or OvmfPkg platforms. +It depends on one of the upstream Brotli git submodules that we removed +earlier in this rebase series. (See patch "remove upstream edk2's Brotli +submodules (RH only"). + +Do not attempt to build BrotliCompress. + +Signed-off-by: Laszlo Ersek +(cherry picked from commit db8ccca337e2c5722c1d408d2541cf653d3371a2) +--- + BaseTools/Source/C/GNUmakefile | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/BaseTools/Source/C/GNUmakefile b/BaseTools/Source/C/GNUmakefile +index 8c191e0c3817..3eae824a1c31 100644 +--- a/BaseTools/Source/C/GNUmakefile ++++ b/BaseTools/Source/C/GNUmakefile +@@ -48,7 +48,6 @@ all: makerootdir subdirs + LIBRARIES = Common + VFRAUTOGEN = VfrCompile/VfrLexer.h + APPLICATIONS = \ +- BrotliCompress \ + VfrCompile \ + EfiRom \ + GenFfs \ +-- +2.35.1 + diff --git a/0002-MdeModulePkg-remove-package-private-Brotli-include-p.patch b/0002-MdeModulePkg-remove-package-private-Brotli-include-p.patch new file mode 100644 index 0000000..c20a494 --- /dev/null +++ b/0002-MdeModulePkg-remove-package-private-Brotli-include-p.patch @@ -0,0 +1,50 @@ +From f4eea2685593bc4f39ebc50d79b849fd853a3a62 Mon Sep 17 00:00:00 2001 +From: Laszlo Ersek +Date: Thu, 4 Jun 2020 13:39:08 +0200 +Subject: [PATCH 02/21] MdeModulePkg: remove package-private Brotli include + path (RH only) + +Notes about the RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] -> +RHEL-8.5/20210520-e1999b264f1f [edk2-stable202105] rebase: + +- no change + +Notes about the RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] -> +RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] rebase: + +- New patch. + +Originating from upstream commit 58802e02c41b +("MdeModulePkg/BrotliCustomDecompressLib: Make brotli a submodule", +2020-04-16), "MdeModulePkg/MdeModulePkg.dec" contains a package-internal +include path into a Brotli submodule. + +The edk2 build system requires such include paths to resolve successfully, +regardless of the firmware platform being built. Because +BrotliCustomDecompressLib is not consumed by any OvmfPkg or ArmVirtPkg +platforms, and we've removed the submodule earlier in this patch set, +remove the include path too. + +Signed-off-by: Laszlo Ersek +(cherry picked from commit e05e0de713c4a2b8adb6ff9809611f222bfe50ed) +--- + MdeModulePkg/MdeModulePkg.dec | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec +index 40601c95832b..56138abbe407 100644 +--- a/MdeModulePkg/MdeModulePkg.dec ++++ b/MdeModulePkg/MdeModulePkg.dec +@@ -24,9 +24,6 @@ [Defines] + [Includes] + Include + +-[Includes.Common.Private] +- Library/BrotliCustomDecompressLib/brotli/c/include +- + [LibraryClasses] + ## @libraryclass Defines a set of methods to reset whole system. + ResetSystemLib|Include/Library/ResetSystemLib.h +-- +2.35.1 + diff --git a/0003-OvmfPkg-increase-max-debug-message-length-to-512-RHE.patch b/0003-OvmfPkg-increase-max-debug-message-length-to-512-RHE.patch new file mode 100644 index 0000000..d5e571e --- /dev/null +++ b/0003-OvmfPkg-increase-max-debug-message-length-to-512-RHE.patch @@ -0,0 +1,83 @@ +From 6c102285ab54deba5098316e9a56a95e6895c866 Mon Sep 17 00:00:00 2001 +From: Laszlo Ersek +Date: Thu, 20 Feb 2014 22:54:45 +0100 +Subject: [PATCH 03/21] OvmfPkg: increase max debug message length to 512 (RHEL + only) + +Notes about the RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] -> +RHEL-8.5/20210520-e1999b264f1f [edk2-stable202105] rebase: + +- no change + +Notes about the RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] -> +RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] rebase: + +- no change + +Notes about the RHEL-8.1/20190308-89910a39dcfd [edk2-stable201903] -> +RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] rebase: + +- trivial context difference due to upstream commit 2fe5f2f52918 + ("OvmfPkg/PlatformDebugLibIoPort: Add new APIs", 2019-04-02), resolved + by git-cherry-pick automatically + +Notes about the RHEL-8.0/20180508-ee3198e672e2 -> +RHEL-8.1/20190308-89910a39dcfd rebase: + +- no changes + +Notes about the RHEL-7.6/ovmf-20180508-2.gitee3198e672e2.el7 -> +RHEL-8.0/20180508-ee3198e672e2 rebase: + +- reorder the rebase changelog in the commit message so that it reads like + a blog: place more recent entries near the top +- no changes to the patch body + +Notes about the 20171011-92d07e48907f -> 20180508-ee3198e672e2 rebase: + +- no changes + +Notes about the 20170228-c325e41585e3 -> 20171011-92d07e48907f rebase: + +- no changes + +Notes about the 20160608b-988715a -> 20170228-c325e41585e3 rebase: + +- no changes + +Upstream prefers short debug messages (sometimes even limited to 80 +characters), but any line length under 512 characters is just unsuitable +for effective debugging. (For example, config strings in HII routing, +logged by the platform driver "OvmfPkg/PlatformDxe" on DEBUG_VERBOSE +level, can be several hundred characters long.) 512 is an empirically good +value. + +Signed-off-by: Laszlo Ersek +(cherry picked from commit bfe568d18dba15602604f155982e3b73add63dfb) +(cherry picked from commit 29435a32ec9428720c74c454ce9817662e601fb6) +(cherry picked from commit 58e1d1ebb78bfdaf05f4c6e8abf8d4908dfa038a) +(cherry picked from commit 1df2c822c996ad767f2f45570ab2686458f7604a) +(cherry picked from commit 22c9b4e971c70c69b4adf8eb93133824ccb6426a) +(cherry picked from commit a1260c9122c95bcbef1efc5eebe11902767813c2) +(cherry picked from commit e949bab1268f83f0f5815a96cd1cb9dd3b21bfb5) +(cherry picked from commit a95cff0b9573bf23699551beb4786383f697ff1e) +--- + OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c b/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c +index 4e25f198aa76..640627f38b72 100644 +--- a/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c ++++ b/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c +@@ -21,7 +21,7 @@ + // + // Define the maximum debug and assert message length that this library supports + // +-#define MAX_DEBUG_MESSAGE_LENGTH 0x100 ++#define MAX_DEBUG_MESSAGE_LENGTH 0x200 + + // + // VA_LIST can not initialize to NULL for all compiler, so we use this to +-- +2.35.1 + diff --git a/0004-MdeModulePkg-TerminalDxe-add-other-text-resolutions-.patch b/0004-MdeModulePkg-TerminalDxe-add-other-text-resolutions-.patch new file mode 100644 index 0000000..bd3661f --- /dev/null +++ b/0004-MdeModulePkg-TerminalDxe-add-other-text-resolutions-.patch @@ -0,0 +1,169 @@ +From 986f59c22b45facd1bd124896a5c655d901065a3 Mon Sep 17 00:00:00 2001 +From: Laszlo Ersek +Date: Tue, 25 Feb 2014 18:40:35 +0100 +Subject: [PATCH 04/21] MdeModulePkg: TerminalDxe: add other text resolutions + (RHEL only) + +Notes about the RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] -> +RHEL-8.5/20210520-e1999b264f1f [edk2-stable202105] rebase: + +- no change + +Notes about the RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] -> +RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] rebase: + +- no 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 + + +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 +(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 e2d779c78378..f238c4103b3d 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.35.1 + diff --git a/0005-MdeModulePkg-TerminalDxe-set-xterm-resolution-on-mod.patch b/0005-MdeModulePkg-TerminalDxe-set-xterm-resolution-on-mod.patch new file mode 100644 index 0000000..18937e3 --- /dev/null +++ b/0005-MdeModulePkg-TerminalDxe-set-xterm-resolution-on-mod.patch @@ -0,0 +1,180 @@ +From 7d89e95bad10d53c0b58f96606d076fe73a648cb Mon Sep 17 00:00:00 2001 +From: Laszlo Ersek +Date: Tue, 25 Feb 2014 22:40:01 +0100 +Subject: [PATCH 05/21] MdeModulePkg: TerminalDxe: set xterm resolution on mode + change (RH only) + +Notes about the RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] -> +RHEL-8.5/20210520-e1999b264f1f [edk2-stable202105] rebase: + +- Resolve harmless conflict in "MdeModulePkg/MdeModulePkg.dec", + originating from new upstream commits + - 45bc28172fbf ("MdeModulePkg.dec: Change PCDs for status code.", + 2020-06-18), + - 0785c619a58a ("MdeModulePkg/Bus/Pci/PciBusDxe: Support PCIe Resizable + BAR Capability", 2021-01-04), + - ef23012e5439 ("MdeModulePkg: Change default value of + PcdPcieResizableBarSupport to FALSE", 2021-01-14). + +Notes about the RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] -> +RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] rebase: + +- Resolve trivial conflict in "MdeModulePkg/MdeModulePkg.dec", arising + from upstream commit 166830d8f7ca ("MdeModulePkg/dec: add + PcdTcgPfpMeasurementRevision PCD", 2020-01-06). + +Notes about the RHEL-8.1/20190308-89910a39dcfd [edk2-stable201903] -> +RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] rebase: + +- Conflict in "MdeModulePkg/MdeModulePkg.dec" due to upstream commits + - 1103ba946aee ("MdeModulePkg: Add Capsule On Disk related definition.", + 2019-06-26), + - 1c7b3eb84631 ("MdeModulePkg/DxeIpl: Introduce PCD + PcdUse5LevelPageTable", 2019-08-09), + with easy manual resolution. + +Notes about the RHEL-8.0/20180508-ee3198e672e2 -> +RHEL-8.1/20190308-89910a39dcfd rebase: + +- no change + +Notes about the RHEL-7.6/ovmf-20180508-2.gitee3198e672e2.el7 -> +RHEL-8.0/20180508-ee3198e672e2 rebase: + +- reorder the rebase changelog in the commit message so that it reads like + a blog: place more recent entries near the top +- no changes to the patch body + +Notes about the 20171011-92d07e48907f -> 20180508-ee3198e672e2 rebase: + +- no change + +Notes about the 20170228-c325e41585e3 -> 20171011-92d07e48907f rebase: + +- Refresh downstream-only commit 2909e025db68 against "MdeModulePkg.dec" + context change from upstream commits e043f7895b83 ("MdeModulePkg: Add + PCD PcdPteMemoryEncryptionAddressOrMask", 2017-02-27) and 76081dfcc5b2 + ("MdeModulePkg: Add PROMPT&HELP string of pcd to UNI file", 2017-03-03). + +Notes about the 20160608b-988715a -> 20170228-c325e41585e3 rebase: + +- refresh commit 519b9751573e against various context changes + +The + + CSI Ps ; Ps ; Ps t + +escape sequence serves for window manipulation. We can use the + + CSI 8 ; ; t + +sequence to adapt eg. the xterm window size to the selected console mode. + +Reference: +Contributed-under: TianoCore Contribution Agreement 1.0 +Signed-off-by: Laszlo Ersek +(cherry picked from commit 2909e025db6878723b49644a8a0cf160d07e6444) +(cherry picked from commit b9c5c901f25e48d68eef6e78a4abca00e153f574) +(cherry picked from commit b7f6115b745de8cbc5214b6ede33c9a8558beb90) +(cherry picked from commit 67415982afdc77922aa37496c981adeb4351acdb) +(cherry picked from commit cfccb98d13e955beb0b93b4a75a973f30c273ffc) +(cherry picked from commit a11602f5e2ef930be5b693ddfd0c789a1bd4c60c) +(cherry picked from commit bc2266f20de5db1636e09a07e4a72c8dbf505f5a) +--- + MdeModulePkg/MdeModulePkg.dec | 4 +++ + .../Console/TerminalDxe/TerminalDxe.inf | 2 ++ + .../Console/TerminalDxe/TerminalConOut.c | 29 +++++++++++++++++++ + 3 files changed, 35 insertions(+) + +diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec +index 56138abbe407..8a2bc9e4f80b 100644 +--- a/MdeModulePkg/MdeModulePkg.dec ++++ b/MdeModulePkg/MdeModulePkg.dec +@@ -2080,6 +2080,10 @@ [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx] + # @Prompt Enable PCIe Resizable BAR Capability support. + gEfiMdeModulePkgTokenSpaceGuid.PcdPcieResizableBarSupport|FALSE|BOOLEAN|0x10000024 + ++ ## Controls whether TerminalDxe outputs an XTerm resize sequence on terminal ++ # mode change. ++ gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm|FALSE|BOOLEAN|0x00010080 ++ + [PcdsPatchableInModule] + ## Specify memory size with page number for PEI code when + # Loading Module at Fixed Address feature is enabled. +diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf +index b2a8aeba8510..eff625346539 100644 +--- a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf ++++ b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf +@@ -55,6 +55,7 @@ [LibraryClasses] + DebugLib + PcdLib + BaseLib ++ PrintLib + + [Guids] + ## SOMETIMES_PRODUCES ## Variable:L"ConInDev" +@@ -87,6 +88,7 @@ [Protocols] + [Pcd] + gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType ## SOMETIMES_CONSUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdErrorCodeSetVariable ## CONSUMES ++ gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm ## CONSUMES + + # [Event] + # # Relative timer event set by UnicodeToEfiKey(), used to be one 2 seconds input timeout. +diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c +index 7809869e7d49..496849458db4 100644 +--- a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c ++++ b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c +@@ -7,6 +7,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent + + **/ + ++#include ++ + #include "Terminal.h" + + // +@@ -80,6 +82,15 @@ CHAR16 mSetCursorPositionString[] = { ESC, '[', '0', '0', ';', '0', '0', 'H', 0 + CHAR16 mCursorForwardString[] = { ESC, '[', '0', '0', 'C', 0 }; + CHAR16 mCursorBackwardString[] = { ESC, '[', '0', '0', 'D', 0 }; + ++// ++// Note that this is an ASCII format string, taking two INT32 arguments: ++// rows, columns. ++// ++// A %d (INT32) format specification can expand to at most 11 characters. ++// ++CHAR8 mResizeTextAreaFormatString[] = "\x1B[8;%d;%dt"; ++#define RESIZE_SEQ_SIZE (sizeof mResizeTextAreaFormatString + 2 * (11 - 2)) ++ + // + // Body of the ConOut functions + // +@@ -498,6 +509,24 @@ TerminalConOutSetMode ( + return EFI_DEVICE_ERROR; + } + ++ if (PcdGetBool (PcdResizeXterm)) { ++ CHAR16 ResizeSequence[RESIZE_SEQ_SIZE]; ++ ++ UnicodeSPrintAsciiFormat ( ++ ResizeSequence, ++ sizeof ResizeSequence, ++ mResizeTextAreaFormatString, ++ (INT32)TerminalDevice->TerminalConsoleModeData[ModeNumber].Rows, ++ (INT32)TerminalDevice->TerminalConsoleModeData[ModeNumber].Columns ++ ); ++ TerminalDevice->OutputEscChar = TRUE; ++ Status = This->OutputString (This, ResizeSequence); ++ TerminalDevice->OutputEscChar = FALSE; ++ if (EFI_ERROR (Status)) { ++ return EFI_DEVICE_ERROR; ++ } ++ } ++ + This->Mode->Mode = (INT32)ModeNumber; + + Status = This->ClearScreen (This); +-- +2.35.1 + diff --git a/0006-OvmfPkg-take-PcdResizeXterm-from-the-QEMU-command-li.patch b/0006-OvmfPkg-take-PcdResizeXterm-from-the-QEMU-command-li.patch new file mode 100644 index 0000000..df5c8a1 --- /dev/null +++ b/0006-OvmfPkg-take-PcdResizeXterm-from-the-QEMU-command-li.patch @@ -0,0 +1,156 @@ +From d0b512ade91abd2183c879a07663ceb085b261a2 Mon Sep 17 00:00:00 2001 +From: Laszlo Ersek +Date: Wed, 14 Oct 2015 15:59:06 +0200 +Subject: [PATCH 06/21] OvmfPkg: take PcdResizeXterm from the QEMU command line + (RH only) + +edk2-stable202108 rebase + +- resolve conflict in OvmfPkg/PlatformPei/PlatformPei.inf + +Notes about the RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] -> +RHEL-8.5/20210520-e1999b264f1f [edk2-stable202105] rebase: + +- Extend the DSC change to the new OvmfPkg/AmdSev platform, which has been + introduced upstream in commit 30d277ed7a82 ("OvmfPkg/Amdsev: Base commit + to build encrypted boot specific OVMF", 2020-12-14), for TianoCore#3077. + + We've always patched all those DSC/FDF files in OvmfPkg down-stream that + made sense at least in theory on QEMU. (For example, we've always + patched "OvmfPkgIa32.dsc" and "OvmfPkgIa32.fdf", even though we never + build or ship the pure IA32 firmware platform.) Follow suit with + "AmdSevX64.dsc". + +Notes about the RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] -> +RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] rebase: + +- Resolve contextual conflict in the DSC files, from upstream commit + b0ed7ebdebd1 ("OvmfPkg: set fixed FlashNvStorage base addresses with -D + SMM_REQUIRE", 2020-03-12). + +Notes about the RHEL-8.1/20190308-89910a39dcfd [edk2-stable201903] -> +RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] rebase: + +- no change + +Notes about the RHEL-8.0/20180508-ee3198e672e2 -> +RHEL-8.1/20190308-89910a39dcfd rebase: + +- no change + +Notes about the RHEL-7.6/ovmf-20180508-2.gitee3198e672e2.el7 -> +RHEL-8.0/20180508-ee3198e672e2 rebase: + +- reorder the rebase changelog in the commit message so that it reads like + a blog: place more recent entries near the top +- no changes to the patch body + +Notes about the 20171011-92d07e48907f -> 20180508-ee3198e672e2 rebase: + +- no change + +Notes about the 20170228-c325e41585e3 -> 20171011-92d07e48907f rebase: + +- refresh downstream-only commit 8abc2a6ddad2 against context differences + in the DSC files from upstream commit 5e167d7e784c + ("OvmfPkg/PlatformPei: don't allocate reserved mem varstore if + SMM_REQUIRE", 2017-03-12). + +Notes about the 20160608b-988715a -> 20170228-c325e41585e3 rebase: + +- no changes + +Contributed-under: TianoCore Contribution Agreement 1.0 +Signed-off-by: Laszlo Ersek +(cherry picked from commit 6fa0c4d67c0bb8bde2ddd6db41c19eb0c40b2721) +(cherry picked from commit 8abc2a6ddad25af7e88dc0cf57d55dfb75fbf92d) +(cherry picked from commit b311932d3841c017a0f0fec553edcac365cc2038) +(cherry picked from commit 61914fb81cf624c9028d015533b400b2794e52d3) +(cherry picked from commit 2ebf3cc2ae99275d63bb6efd3c22dec76251a853) +(cherry picked from commit f9b73437b9b231773c1a20e0c516168817a930a2) +(cherry picked from commit 2cc462ee963d0be119bc97bfc9c70d292a40516f) +(cherry picked from commit 51e0de961029af84b5bdbfddcc9762b1819d500f) +--- + OvmfPkg/AmdSev/AmdSevX64.dsc | 1 + + OvmfPkg/OvmfPkgIa32.dsc | 1 + + OvmfPkg/OvmfPkgIa32X64.dsc | 1 + + OvmfPkg/OvmfPkgX64.dsc | 1 + + OvmfPkg/PlatformPei/PlatformPei.inf | 1 + + OvmfPkg/PlatformPei/Platform.c | 1 + + 6 files changed, 6 insertions(+) + +diff --git a/OvmfPkg/AmdSev/AmdSevX64.dsc b/OvmfPkg/AmdSev/AmdSevX64.dsc +index fd56176796d5..d1f9bc6d0d61 100644 +--- a/OvmfPkg/AmdSev/AmdSevX64.dsc ++++ b/OvmfPkg/AmdSev/AmdSevX64.dsc +@@ -519,6 +519,7 @@ [PcdsFixedAtBuild] + [PcdsDynamicDefault] + gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0 + ++ gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm|FALSE + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0 + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|0 + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase64|0 +diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc +index 85abed24c1a7..6bcd222af7c2 100644 +--- a/OvmfPkg/OvmfPkgIa32.dsc ++++ b/OvmfPkg/OvmfPkgIa32.dsc +@@ -580,6 +580,7 @@ [PcdsDynamicDefault] + # ($(SMM_REQUIRE) == FALSE) + gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0 + ++ gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm|FALSE + !if $(SMM_REQUIRE) == FALSE + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0 + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|0 +diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc +index a9c1daecc1a8..0cce3b768e12 100644 +--- a/OvmfPkg/OvmfPkgIa32X64.dsc ++++ b/OvmfPkg/OvmfPkgIa32X64.dsc +@@ -586,6 +586,7 @@ [PcdsDynamicDefault] + # ($(SMM_REQUIRE) == FALSE) + gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0 + ++ gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm|FALSE + !if $(SMM_REQUIRE) == FALSE + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0 + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|0 +diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc +index 718399299f57..847cf6a46652 100644 +--- a/OvmfPkg/OvmfPkgX64.dsc ++++ b/OvmfPkg/OvmfPkgX64.dsc +@@ -585,6 +585,7 @@ [PcdsDynamicDefault] + # ($(SMM_REQUIRE) == FALSE) + gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0 + ++ gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm|FALSE + !if $(SMM_REQUIRE) == FALSE + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0 + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|0 +diff --git a/OvmfPkg/PlatformPei/PlatformPei.inf b/OvmfPkg/PlatformPei/PlatformPei.inf +index 212aa7b04751..1c0b7204ea9a 100644 +--- a/OvmfPkg/PlatformPei/PlatformPei.inf ++++ b/OvmfPkg/PlatformPei/PlatformPei.inf +@@ -97,6 +97,7 @@ [Pcd] + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize + gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved ++ gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm + gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode + gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable + gEfiMdeModulePkgTokenSpaceGuid.PcdSetNxForStack +diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c +index d0323c645162..9011a55d0f90 100644 +--- a/OvmfPkg/PlatformPei/Platform.c ++++ b/OvmfPkg/PlatformPei/Platform.c +@@ -851,6 +851,7 @@ InitializePlatform ( + MemTypeInfoInitialization (); + MemMapInitialization (); + NoexecDxeInitialization (); ++ UPDATE_BOOLEAN_PCD_FROM_FW_CFG (PcdResizeXterm); + } + + InstallClearCacheCallback (); +-- +2.35.1 + diff --git a/0007-ArmVirtPkg-take-PcdResizeXterm-from-the-QEMU-command.patch b/0007-ArmVirtPkg-take-PcdResizeXterm-from-the-QEMU-command.patch new file mode 100644 index 0000000..f0eeeac --- /dev/null +++ b/0007-ArmVirtPkg-take-PcdResizeXterm-from-the-QEMU-command.patch @@ -0,0 +1,204 @@ +From 39b83b28b9239d2c55226f4861c469f38fd967d1 Mon Sep 17 00:00:00 2001 +From: Laszlo Ersek +Date: Sun, 26 Jul 2015 08:02:50 +0000 +Subject: [PATCH 07/21] ArmVirtPkg: take PcdResizeXterm from the QEMU command + line (RH only) + +Notes about the RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] -> +RHEL-8.5/20210520-e1999b264f1f [edk2-stable202105] rebase: + +- no change + +Notes about the RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] -> +RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] rebase: + +- Resolve leading context divergence in "ArmVirtPkg/ArmVirtQemu.dsc", + arising from upstream commits: + + - 82662a3b5f56 ("ArmVirtPkg/PlatformPeiLib: discover the TPM base + address from the DT", 2020-03-04) + + - ddd34a818315 ("ArmVirtPkg/ArmVirtQemu: enable TPM2 support in the PEI + phase", 2020-03-04) + + - cdc3fa54184a ("ArmVirtPkg: control PXEv4 / PXEv6 boot support from the + QEMU command line", 2020-04-28) + +- Rework the downstream patch quite a bit, paralleling the upstream work + done for in commit + range 64ab457d1f21..cdc3fa54184a: + + - Refresh copyright year in TerminalPcdProducerLib.{inf,c}. Also replace + open-coded BSDL with "SPDX-License-Identifier: BSD-2-Clause-Patent". + + - Simplify LIBRARY_CLASS: this lib instance is meant to be consumed only + via NULL class resolution (basically: as a plugin), so use NULL for + LIBRARY_CLASS, not "TerminalPcdProducerLib|DXE_DRIVER". + + - Sort the [Packages] section alphabetically in the INF file. + + - Replace the open-coded GetNamedFwCfgBoolean() function with a call to + QemuFwCfgParseBool(), from QemuFwCfgSimpleParserLib. + + - Add the SOMETIMES_PRODUCES usage comment in the [Pcd] section of the + INF file. + +Notes about the RHEL-8.1/20190308-89910a39dcfd [edk2-stable201903] -> +RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] rebase: + +- no change + +Notes about the RHEL-8.0/20180508-ee3198e672e2 -> +RHEL-8.1/20190308-89910a39dcfd rebase: + +- no change + +Notes about the RHEL-7.6/ovmf-20180508-2.gitee3198e672e2.el7 -> +RHEL-8.0/20180508-ee3198e672e2 rebase: + +- reorder the rebase changelog in the commit message so that it reads like + a blog: place more recent entries near the top +- no changes to the patch body + +Notes about the 20171011-92d07e48907f -> 20180508-ee3198e672e2 rebase: + +- no change + +Notes about the 20170228-c325e41585e3 -> 20171011-92d07e48907f rebase: + +- Refresh downstream-only commit d4564d39dfdb against context changes in + "ArmVirtPkg/ArmVirtQemu.dsc" from upstream commit 7e5f1b673870 + ("ArmVirtPkg/PlatformHasAcpiDtDxe: allow guest level ACPI disable + override", 2017-03-29). + +Notes about the 20160608b-988715a -> 20170228-c325e41585e3 rebase: + +- Adapt commit 6b97969096a3 to the fact that upstream has deprecated such + setter functions for dynamic PCDs that don't return a status code (such + as PcdSetBool()). Employ PcdSetBoolS(), and assert that it succeeds -- + there's really no circumstance in this case when it could fail. + +Contributed-under: TianoCore Contribution Agreement 1.0 +Signed-off-by: Laszlo Ersek +(cherry picked from commit d4564d39dfdbf74e762af43314005a2c026cb262) +(cherry picked from commit c9081ebe3bcd28e5cce4bf58bd8d4fca12f9af7c) +(cherry picked from commit 8e92730c8e1cdb642b3b3e680e643ff774a90c65) +(cherry picked from commit 9448b6b46267d8d807fac0c648e693171bb34806) +(cherry picked from commit 232fcf06f6b3048b7c2ebd6931f23186b3852f04) +(cherry picked from commit 8338545260fbb423f796d5196faaaf8ff6e1ed99) +(cherry picked from commit a5f7a57bf390f1f340ff1d1f1884a73716817ef1) +--- + ArmVirtPkg/ArmVirtQemu.dsc | 7 +++- + .../TerminalPcdProducerLib.inf | 33 ++++++++++++++++++ + .../TerminalPcdProducerLib.c | 34 +++++++++++++++++++ + 3 files changed, 73 insertions(+), 1 deletion(-) + create mode 100644 ArmVirtPkg/Library/TerminalPcdProducerLib/TerminalPcdProducerLib.inf + create mode 100644 ArmVirtPkg/Library/TerminalPcdProducerLib/TerminalPcdProducerLib.c + +diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc +index b2b0d304d335..6960df62b082 100644 +--- a/ArmVirtPkg/ArmVirtQemu.dsc ++++ b/ArmVirtPkg/ArmVirtQemu.dsc +@@ -282,6 +282,8 @@ [PcdsDynamicDefault.common] + gEfiSecurityPkgTokenSpaceGuid.PcdTpm2HashMask|0 + !endif + ++ gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm|FALSE ++ + [PcdsDynamicHii] + gArmVirtTokenSpaceGuid.PcdForceNoAcpi|L"ForceNoAcpi"|gArmVirtVariableGuid|0x0|FALSE|NV,BS + +@@ -384,7 +386,10 @@ [Components.common] + MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf + MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf + MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf +- MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf ++ MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf { ++ ++ NULL|ArmVirtPkg/Library/TerminalPcdProducerLib/TerminalPcdProducerLib.inf ++ } + MdeModulePkg/Universal/SerialDxe/SerialDxe.inf + + MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf +diff --git a/ArmVirtPkg/Library/TerminalPcdProducerLib/TerminalPcdProducerLib.inf b/ArmVirtPkg/Library/TerminalPcdProducerLib/TerminalPcdProducerLib.inf +new file mode 100644 +index 000000000000..a51dbd1670a8 +--- /dev/null ++++ b/ArmVirtPkg/Library/TerminalPcdProducerLib/TerminalPcdProducerLib.inf +@@ -0,0 +1,33 @@ ++## @file ++# Plugin library for setting up dynamic PCDs for TerminalDxe, from fw_cfg ++# ++# Copyright (C) 2015-2020, Red Hat, Inc. ++# Copyright (c) 2014, Linaro Ltd. All rights reserved.
++# ++# SPDX-License-Identifier: BSD-2-Clause-Patent ++## ++ ++[Defines] ++ INF_VERSION = 0x00010005 ++ BASE_NAME = TerminalPcdProducerLib ++ FILE_GUID = 4a0c5ed7-8c42-4c01-8f4c-7bf258316a96 ++ MODULE_TYPE = BASE ++ VERSION_STRING = 1.0 ++ LIBRARY_CLASS = NULL ++ CONSTRUCTOR = TerminalPcdProducerLibConstructor ++ ++[Sources] ++ TerminalPcdProducerLib.c ++ ++[Packages] ++ MdeModulePkg/MdeModulePkg.dec ++ MdePkg/MdePkg.dec ++ OvmfPkg/OvmfPkg.dec ++ ++[LibraryClasses] ++ DebugLib ++ PcdLib ++ QemuFwCfgSimpleParserLib ++ ++[Pcd] ++ gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm ## SOMETIMES_PRODUCES +diff --git a/ArmVirtPkg/Library/TerminalPcdProducerLib/TerminalPcdProducerLib.c b/ArmVirtPkg/Library/TerminalPcdProducerLib/TerminalPcdProducerLib.c +new file mode 100644 +index 000000000000..bfd3a6a535f9 +--- /dev/null ++++ b/ArmVirtPkg/Library/TerminalPcdProducerLib/TerminalPcdProducerLib.c +@@ -0,0 +1,34 @@ ++/** @file ++* Plugin library for setting up dynamic PCDs for TerminalDxe, from fw_cfg ++* ++* Copyright (C) 2015-2020, Red Hat, Inc. ++* Copyright (c) 2014, Linaro Ltd. All rights reserved.
++* ++* SPDX-License-Identifier: BSD-2-Clause-Patent ++**/ ++ ++#include ++#include ++#include ++ ++#define UPDATE_BOOLEAN_PCD_FROM_FW_CFG(TokenName) \ ++ do { \ ++ BOOLEAN Setting; \ ++ RETURN_STATUS PcdStatus; \ ++ \ ++ if (!RETURN_ERROR (QemuFwCfgParseBool ( \ ++ "opt/org.tianocore.edk2.aavmf/" #TokenName, &Setting))) { \ ++ PcdStatus = PcdSetBoolS (TokenName, Setting); \ ++ ASSERT_RETURN_ERROR (PcdStatus); \ ++ } \ ++ } while (0) ++ ++RETURN_STATUS ++EFIAPI ++TerminalPcdProducerLibConstructor ( ++ VOID ++ ) ++{ ++ UPDATE_BOOLEAN_PCD_FROM_FW_CFG (PcdResizeXterm); ++ return RETURN_SUCCESS; ++} +-- +2.35.1 + diff --git a/0008-BaseTools-do-not-build-BrotliCompress-RH-only.patch b/0008-BaseTools-do-not-build-BrotliCompress-RH-only.patch deleted file mode 100644 index 78d65ea..0000000 --- a/0008-BaseTools-do-not-build-BrotliCompress-RH-only.patch +++ /dev/null @@ -1,43 +0,0 @@ -From dca56cf4d28bbbb1d3be029ce9a6710cb3f6cd2f Mon Sep 17 00:00:00 2001 -From: Laszlo Ersek -Date: Thu, 4 Jun 2020 13:34:12 +0200 -Subject: BaseTools: do not build BrotliCompress (RH only) - -Notes about the RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] -> -RHEL-8.5/20210520-e1999b264f1f [edk2-stable202105] rebase: - -- no change - -Notes about the RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] -> -RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] rebase: - -- New patch. - -BrotliCompress is not used for building ArmVirtPkg or OvmfPkg platforms. -It depends on one of the upstream Brotli git submodules that we removed -earlier in this rebase series. (See patch "remove upstream edk2's Brotli -submodules (RH only"). - -Do not attempt to build BrotliCompress. - -Signed-off-by: Laszlo Ersek -(cherry picked from commit db8ccca337e2c5722c1d408d2541cf653d3371a2) ---- - BaseTools/Source/C/GNUmakefile | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/BaseTools/Source/C/GNUmakefile b/BaseTools/Source/C/GNUmakefile -index 8c191e0c38..3eae824a1c 100644 ---- a/BaseTools/Source/C/GNUmakefile -+++ b/BaseTools/Source/C/GNUmakefile -@@ -48,7 +48,6 @@ all: makerootdir subdirs - LIBRARIES = Common - VFRAUTOGEN = VfrCompile/VfrLexer.h - APPLICATIONS = \ -- BrotliCompress \ - VfrCompile \ - EfiRom \ - GenFfs \ --- -2.27.0 - diff --git a/0008-OvmfPkg-allow-exclusion-of-the-shell-from-the-firmwa.patch b/0008-OvmfPkg-allow-exclusion-of-the-shell-from-the-firmwa.patch new file mode 100644 index 0000000..e57d931 --- /dev/null +++ b/0008-OvmfPkg-allow-exclusion-of-the-shell-from-the-firmwa.patch @@ -0,0 +1,172 @@ +From 2d7c77e17a3461d53521b42221e468fb234d5893 Mon Sep 17 00:00:00 2001 +From: Laszlo Ersek +Date: Tue, 4 Nov 2014 23:02:53 +0100 +Subject: [PATCH 08/21] OvmfPkg: allow exclusion of the shell from the firmware + image (RH only) + +Notes about the RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] -> +RHEL-8.5/20210520-e1999b264f1f [edk2-stable202105] rebase: + +- No manual / explicit code change is necessary, because the newly + inherited OvmfPkg/AmdSev platform already has its own BUILD_SHELL + build-time macro (feature test flag), with default value FALSE -- from + upstream commit b261a30c900a ("OvmfPkg/AmdSev: add Grub Firmware Volume + Package", 2020-12-14). + +- Contextual differences from new upstream commits 2d8ca4f90eae ("OvmfPkg: + enable HttpDynamicCommand", 2020-10-01) and 5ab6a0e1c8e9 ("OvmfPkg: + introduce VirtioFsDxe", 2020-12-21) have been auto-resolved by + git-cherry-pick. + +- Remove obsolete commit message tags related to downstream patch + management: Message-id, Patchwork-id, O-Subject, Acked-by + (RHBZ#1846481). + +Notes about the RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] -> +RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] rebase: + +- context difference from upstream commit ec41733cfd10 ("OvmfPkg: add the + 'initrd' dynamic shell command", 2020-03-04) correctly auto-resolved + +Notes about the RHEL-8.1/20190308-89910a39dcfd [edk2-stable201903] -> +RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] rebase: + +- no change + +Notes about the RHEL-8.0/20180508-ee3198e672e2 -> +RHEL-8.1/20190308-89910a39dcfd rebase: + +- update the patch against the following upstream commits: + - 4b888334d234 ("OvmfPkg: Remove EdkShellBinPkg in FDF", 2018-11-19) + - 277a3958d93a ("OvmfPkg: Don't include TftpDynamicCommand in XCODE5 + tool chain", 2018-11-27) + +Notes about the RHEL-7.6/ovmf-20180508-2.gitee3198e672e2.el7 -> +RHEL-8.0/20180508-ee3198e672e2 rebase: + +- reorder the rebase changelog in the commit message so that it reads like + a blog: place more recent entries near the top +- no changes to the patch body + +Notes about the 20171011-92d07e48907f -> 20180508-ee3198e672e2 rebase: + +- no change + +Notes about the 20170228-c325e41585e3 -> 20171011-92d07e48907f rebase: + +- no changes + +Notes about the 20160608b-988715a -> 20170228-c325e41585e3 rebase: + +- no changes + +Bugzilla: 1147592 + +When '-D EXCLUDE_SHELL_FROM_FD' is passed to 'build', exclude the shell +binary from the firmware image. + +Peter Jones advised us that firmware vendors for physical systems disable +the memory-mapped, firmware image-contained UEFI shell in +SecureBoot-enabled builds. The reason being that the memory-mapped shell +can always load, it may have direct access to various hardware in the +system, and it can run UEFI shell scripts (which cannot be signed at all). + +Intended use of the new build option: + +- In-tree builds: don't pass '-D EXCLUDE_SHELL_FROM_FD'. The resultant + firmware image will contain a shell binary, independently of SecureBoot + enablement, which is flexible for interactive development. (Ie. no + change for in-tree builds.) + +- RPM builds: pass both '-D SECURE_BOOT_ENABLE' and + '-D EXCLUDE_SHELL_FROM_FD'. The resultant RPM will provide: + + - OVMF_CODE.fd: SecureBoot-enabled firmware, without builtin UEFI shell, + + - OVMF_VARS.fd: variable store template matching OVMF_CODE.fd, + + - UefiShell.iso: a bootable ISO image with the shell on it as default + boot loader. The shell binary will load when SecureBoot is turned off, + and won't load when SecureBoot is turned on (because it is not + signed). + + UefiShell.iso is the reason we're not excluding the shell from the DSC + files as well, only the FDF files -- when '-D EXCLUDE_SHELL_FROM_FD' + is specified, the shell binary needs to be built the same, only it + will be included in UefiShell.iso. + +Signed-off-by: Laszlo Ersek +(cherry picked from commit 9c391def70366cabae08e6008814299c3372fafd) +(cherry picked from commit d9dd9ee42937b2611fe37183cc9ec7f62d946933) +(cherry picked from commit 23df46ebbe7b09451d3a05034acd4d3a25e7177b) +(cherry picked from commit f0303f71d576c51b01c4ff961b429d0e0e707245) +(cherry picked from commit bbd64eb8658e9a33eab4227d9f4e51ad78d9f687) +(cherry picked from commit 8628ef1b8d675ebec39d83834abbe3c8c8c42cf4) +(cherry picked from commit 229c88dc3ded9baeaca8b87767dc5c41c05afd6e) +(cherry picked from commit c2812d7189dee06c780f05a5880eb421c359a687) +--- + OvmfPkg/OvmfPkgIa32.fdf | 2 ++ + OvmfPkg/OvmfPkgIa32X64.fdf | 2 ++ + OvmfPkg/OvmfPkgX64.fdf | 2 ++ + 3 files changed, 6 insertions(+) + +diff --git a/OvmfPkg/OvmfPkgIa32.fdf b/OvmfPkg/OvmfPkgIa32.fdf +index a6b2142ccd0c..b5bc8407e7d7 100644 +--- a/OvmfPkg/OvmfPkgIa32.fdf ++++ b/OvmfPkg/OvmfPkgIa32.fdf +@@ -283,12 +283,14 @@ [FV.DXEFV] + INF MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf + INF OvmfPkg/VirtioFsDxe/VirtioFsDxe.inf + ++!ifndef $(EXCLUDE_SHELL_FROM_FD) + !if $(TOOL_CHAIN_TAG) != "XCODE5" + INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf + INF ShellPkg/DynamicCommand/HttpDynamicCommand/HttpDynamicCommand.inf + INF OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf + !endif + INF ShellPkg/Application/Shell/Shell.inf ++!endif + + INF MdeModulePkg/Logo/LogoDxe.inf + +diff --git a/OvmfPkg/OvmfPkgIa32X64.fdf b/OvmfPkg/OvmfPkgIa32X64.fdf +index 49266dd46768..f4fa19bb013c 100644 +--- a/OvmfPkg/OvmfPkgIa32X64.fdf ++++ b/OvmfPkg/OvmfPkgIa32X64.fdf +@@ -287,12 +287,14 @@ [FV.DXEFV] + INF MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf + INF OvmfPkg/VirtioFsDxe/VirtioFsDxe.inf + ++!ifndef $(EXCLUDE_SHELL_FROM_FD) + !if $(TOOL_CHAIN_TAG) != "XCODE5" + INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf + INF ShellPkg/DynamicCommand/HttpDynamicCommand/HttpDynamicCommand.inf + INF OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf + !endif + INF ShellPkg/Application/Shell/Shell.inf ++!endif + + INF MdeModulePkg/Logo/LogoDxe.inf + +diff --git a/OvmfPkg/OvmfPkgX64.fdf b/OvmfPkg/OvmfPkgX64.fdf +index ba7f26d01dc4..dfd17804c2a2 100644 +--- a/OvmfPkg/OvmfPkgX64.fdf ++++ b/OvmfPkg/OvmfPkgX64.fdf +@@ -309,12 +309,14 @@ [FV.DXEFV] + INF MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf + INF OvmfPkg/VirtioFsDxe/VirtioFsDxe.inf + ++!ifndef $(EXCLUDE_SHELL_FROM_FD) + !if $(TOOL_CHAIN_TAG) != "XCODE5" + INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf + INF ShellPkg/DynamicCommand/HttpDynamicCommand/HttpDynamicCommand.inf + INF OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf + !endif + INF ShellPkg/Application/Shell/Shell.inf ++!endif + + INF MdeModulePkg/Logo/LogoDxe.inf + +-- +2.35.1 + diff --git a/0009-ArmPlatformPkg-introduce-fixed-PCD-for-early-hello-m.patch b/0009-ArmPlatformPkg-introduce-fixed-PCD-for-early-hello-m.patch new file mode 100644 index 0000000..c1f24b1 --- /dev/null +++ b/0009-ArmPlatformPkg-introduce-fixed-PCD-for-early-hello-m.patch @@ -0,0 +1,94 @@ +From da4731a05cd2279c5ba504ad117ccd6256d75305 Mon Sep 17 00:00:00 2001 +From: Laszlo Ersek +Date: Wed, 14 Oct 2015 13:49:43 +0200 +Subject: [PATCH 09/21] ArmPlatformPkg: introduce fixed PCD for early hello + message (RH only) + +Notes about the RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] -> +RHEL-8.5/20210520-e1999b264f1f [edk2-stable202105] rebase: + +- no change + +Notes about the RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] -> +RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] rebase: + +- no change + +Notes about the RHEL-8.1/20190308-89910a39dcfd [edk2-stable201903] -> +RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] rebase: + +- no change + +Notes about the RHEL-8.0/20180508-ee3198e672e2 -> +RHEL-8.1/20190308-89910a39dcfd rebase: + +- no change + +Notes about the RHEL-7.6/ovmf-20180508-2.gitee3198e672e2.el7 -> +RHEL-8.0/20180508-ee3198e672e2 rebase: + +- reorder the rebase changelog in the commit message so that it reads like + a blog: place more recent entries near the top +- no changes to the patch body + +Notes about the 20171011-92d07e48907f -> 20180508-ee3198e672e2 rebase: + +- no changes + +Notes about the 20170228-c325e41585e3 -> 20171011-92d07e48907f rebase: + +- no changes + +Notes about the 20160608b-988715a -> 20170228-c325e41585e3 rebase: + +- no changes + +Drew has proposed that ARM|AARCH64 platform firmware (especially virtual +machine firmware) print a reasonably early, simple hello message to the +serial port, regardless of debug mask settings. This should inform +interactive users, and provide some rough help in localizing boot +problems, even with restrictive debug masks. + +If a platform doesn't want this feature, it should stick with the default +empty string. + +RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1270279 +Downstream only: +. + +Suggested-by: Drew Jones +Contributed-under: TianoCore Contribution Agreement 1.0 +Signed-off-by: Laszlo Ersek +(cherry picked from commit 7ce97b06421434c82095f01a1753a8c9c546cc30) +(cherry picked from commit 20b1f1cbd0590aa71c6d99d35e23cf08e0707750) +(cherry picked from commit 6734b88cf7abcaf42632e3d2fc469b2169dd2f16) +(cherry picked from commit ef77da632559e9baa1c69869e4cbea377068ef27) +(cherry picked from commit 58755c51d3252312d80cbcb97928d71199c2f5e1) +(cherry picked from commit c3f07e323e76856f1b42ea7b8c598ba3201c28a2) +(cherry picked from commit 9f756c1ad83cc81f7d892cd036d59a2b567b02dc) +(cherry picked from commit c75aea7a738ac7fb944c0695a4bfffc3985afaa9) +--- + ArmPlatformPkg/ArmPlatformPkg.dec | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/ArmPlatformPkg/ArmPlatformPkg.dec b/ArmPlatformPkg/ArmPlatformPkg.dec +index 3a25ddcdc8ca..b2b58553c7a6 100644 +--- a/ArmPlatformPkg/ArmPlatformPkg.dec ++++ b/ArmPlatformPkg/ArmPlatformPkg.dec +@@ -121,6 +121,13 @@ [PcdsFixedAtBuild.common] + ## If set, this will swap settings for HDLCD RED_SELECT and BLUE_SELECT registers + gArmPlatformTokenSpaceGuid.PcdArmHdLcdSwapBlueRedSelect|FALSE|BOOLEAN|0x00000045 + ++ # ++ # Early hello message (ASCII string), printed to the serial port. ++ # If set to the empty string, nothing is printed. ++ # Otherwise, a trailing CRLF should be specified explicitly. ++ # ++ gArmPlatformTokenSpaceGuid.PcdEarlyHelloMessage|""|VOID*|0x00000100 ++ + [PcdsFixedAtBuild.common,PcdsDynamic.common] + ## PL031 RealTimeClock + gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x0|UINT32|0x00000024 +-- +2.35.1 + diff --git a/0009-MdeModulePkg-remove-package-private-Brotli-include-p.patch b/0009-MdeModulePkg-remove-package-private-Brotli-include-p.patch deleted file mode 100644 index 6046944..0000000 --- a/0009-MdeModulePkg-remove-package-private-Brotli-include-p.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 9729dd1d6b83961d531e29777d0cc4a610b108be Mon Sep 17 00:00:00 2001 -From: Laszlo Ersek -Date: Thu, 4 Jun 2020 13:39:08 +0200 -Subject: MdeModulePkg: remove package-private Brotli include path (RH only) - -Notes about the RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] -> -RHEL-8.5/20210520-e1999b264f1f [edk2-stable202105] rebase: - -- no change - -Notes about the RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] -> -RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] rebase: - -- New patch. - -Originating from upstream commit 58802e02c41b -("MdeModulePkg/BrotliCustomDecompressLib: Make brotli a submodule", -2020-04-16), "MdeModulePkg/MdeModulePkg.dec" contains a package-internal -include path into a Brotli submodule. - -The edk2 build system requires such include paths to resolve successfully, -regardless of the firmware platform being built. Because -BrotliCustomDecompressLib is not consumed by any OvmfPkg or ArmVirtPkg -platforms, and we've removed the submodule earlier in this patch set, -remove the include path too. - -Signed-off-by: Laszlo Ersek -(cherry picked from commit e05e0de713c4a2b8adb6ff9809611f222bfe50ed) ---- - MdeModulePkg/MdeModulePkg.dec | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec -index 8d38383915..ba2d0290e7 100644 ---- a/MdeModulePkg/MdeModulePkg.dec -+++ b/MdeModulePkg/MdeModulePkg.dec -@@ -24,9 +24,6 @@ - [Includes] - Include - --[Includes.Common.Private] -- Library/BrotliCustomDecompressLib/brotli/c/include -- - [LibraryClasses] - ## @libraryclass Defines a set of methods to reset whole system. - ResetSystemLib|Include/Library/ResetSystemLib.h --- -2.27.0 - diff --git a/0010-ArmPlatformPkg-PrePeiCore-write-early-hello-message-.patch b/0010-ArmPlatformPkg-PrePeiCore-write-early-hello-message-.patch new file mode 100644 index 0000000..557ac1e --- /dev/null +++ b/0010-ArmPlatformPkg-PrePeiCore-write-early-hello-message-.patch @@ -0,0 +1,145 @@ +From 2ac5fede049429237cb2a698a9f927f21fd22c6e Mon Sep 17 00:00:00 2001 +From: Laszlo Ersek +Date: Wed, 14 Oct 2015 13:59:20 +0200 +Subject: [PATCH 10/21] ArmPlatformPkg: PrePeiCore: write early hello message + to the serial port (RH) + +Notes about the RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] -> +RHEL-8.5/20210520-e1999b264f1f [edk2-stable202105] rebase: + +- no change + +Notes about the RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] -> +RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] rebase: + +- no change + +Notes about the RHEL-8.1/20190308-89910a39dcfd [edk2-stable201903] -> +RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] rebase: + +- no change + +Notes about the RHEL-8.0/20180508-ee3198e672e2 -> +RHEL-8.1/20190308-89910a39dcfd rebase: + +- no change + +Notes about the RHEL-7.6/ovmf-20180508-2.gitee3198e672e2.el7 -> +RHEL-8.0/20180508-ee3198e672e2 rebase: + +- reorder the rebase changelog in the commit message so that it reads like + a blog: place more recent entries near the top +- no changes to the patch body + +Notes about the 20171011-92d07e48907f -> 20180508-ee3198e672e2 rebase: + +- adapt to upstream commit 7e2a8dfe8a9a ("ArmPlatformPkg/PrePeiCore: seed + temporary stack before entering PEI core", 2017-11-09) -- conflict + resolution in "ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf" + +Notes about the 20170228-c325e41585e3 -> 20171011-92d07e48907f rebase: + +- no changes + +Notes about the 20160608b-988715a -> 20170228-c325e41585e3 rebase: + +- no changes + +The FixedPcdGetSize() macro expands to an integer constant, therefore an +optimizing compiler can eliminate the new code, if the platform DSC +doesn't override the empty string (size=1) default of +PcdEarlyHelloMessage. + +RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1270279 +Downstream only: +. + +Contributed-under: TianoCore Contribution Agreement 1.0 +Signed-off-by: Laszlo Ersek +(cherry picked from commit b16c4c505ce0e27305235533eac9236aa66f132e) +(cherry picked from commit 742e5bf6d5ce5a1e73879d6e5c0dd00feda7a9ac) +(cherry picked from commit 93d69eb9393cf05af90676253875c59c1bec67fd) +(cherry picked from commit 638594083b191f84f5d9333eb6147a31570f5a5a) +(cherry picked from commit f4b7aae411d88b2b83f85d20ef06a4032a57e7de) +(cherry picked from commit bb71490fdda3b38fa9f071d281b863f9b64363bf) +(cherry picked from commit 8d5a8827aabc67cb2a046697e1a750ca8d9cc453) +(cherry picked from commit 49fe5596cd79c94d903c4d506c563d642ccd69aa) +--- + ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf | 2 ++ + ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf | 2 ++ + ArmPlatformPkg/PrePeiCore/PrePeiCore.h | 1 + + ArmPlatformPkg/PrePeiCore/MainMPCore.c | 5 +++++ + ArmPlatformPkg/PrePeiCore/MainUniCore.c | 5 +++++ + 5 files changed, 15 insertions(+) + +diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf b/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf +index fb01dd1a113e..a6681c103297 100644 +--- a/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf ++++ b/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf +@@ -69,6 +69,8 @@ [FixedPcd] + gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize + gArmPlatformTokenSpaceGuid.PcdCPUCoreSecondaryStackSize + ++ gArmPlatformTokenSpaceGuid.PcdEarlyHelloMessage ++ + gArmTokenSpaceGuid.PcdGicDistributorBase + gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase + gArmTokenSpaceGuid.PcdGicSgiIntId +diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf b/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf +index e9eb092d3ac9..c98dc82f0c66 100644 +--- a/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf ++++ b/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf +@@ -67,4 +67,6 @@ [FixedPcd] + gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize + gArmPlatformTokenSpaceGuid.PcdCPUCoreSecondaryStackSize + ++ gArmPlatformTokenSpaceGuid.PcdEarlyHelloMessage ++ + gEfiMdeModulePkgTokenSpaceGuid.PcdInitValueInTempStack +diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCore.h b/ArmPlatformPkg/PrePeiCore/PrePeiCore.h +index 0345dd7bdd2a..ae8302becda2 100644 +--- a/ArmPlatformPkg/PrePeiCore/PrePeiCore.h ++++ b/ArmPlatformPkg/PrePeiCore/PrePeiCore.h +@@ -16,6 +16,7 @@ + #include + #include + #include ++#include + + #include + #include +diff --git a/ArmPlatformPkg/PrePeiCore/MainMPCore.c b/ArmPlatformPkg/PrePeiCore/MainMPCore.c +index b5d0d3a6442f..5126a6dfb0b1 100644 +--- a/ArmPlatformPkg/PrePeiCore/MainMPCore.c ++++ b/ArmPlatformPkg/PrePeiCore/MainMPCore.c +@@ -116,6 +116,11 @@ PrimaryMain ( + UINTN TemporaryRamBase; + UINTN TemporaryRamSize; + ++ if (FixedPcdGetSize (PcdEarlyHelloMessage) > 1) { ++ SerialPortWrite (FixedPcdGetPtr (PcdEarlyHelloMessage), ++ FixedPcdGetSize (PcdEarlyHelloMessage) - 1); ++ } ++ + CreatePpiList (&PpiListSize, &PpiList); + + // Enable the GIC Distributor +diff --git a/ArmPlatformPkg/PrePeiCore/MainUniCore.c b/ArmPlatformPkg/PrePeiCore/MainUniCore.c +index 1c2580eb923b..2a7580dbb405 100644 +--- a/ArmPlatformPkg/PrePeiCore/MainUniCore.c ++++ b/ArmPlatformPkg/PrePeiCore/MainUniCore.c +@@ -29,6 +29,11 @@ PrimaryMain ( + UINTN TemporaryRamBase; + UINTN TemporaryRamSize; + ++ if (FixedPcdGetSize (PcdEarlyHelloMessage) > 1) { ++ SerialPortWrite (FixedPcdGetPtr (PcdEarlyHelloMessage), ++ FixedPcdGetSize (PcdEarlyHelloMessage) - 1); ++ } ++ + CreatePpiList (&PpiListSize, &PpiList); + + // Adjust the Temporary Ram as the new Ppi List (Common + Platform Ppi Lists) is created at +-- +2.35.1 + diff --git a/0011-ArmVirtPkg-set-early-hello-message-RH-only.patch b/0011-ArmVirtPkg-set-early-hello-message-RH-only.patch new file mode 100644 index 0000000..c4c046c --- /dev/null +++ b/0011-ArmVirtPkg-set-early-hello-message-RH-only.patch @@ -0,0 +1,82 @@ +From aa5965f02de8c044106a413f817b6a2651e89e97 Mon Sep 17 00:00:00 2001 +From: Laszlo Ersek +Date: Wed, 14 Oct 2015 14:07:17 +0200 +Subject: [PATCH 11/21] ArmVirtPkg: set early hello message (RH only) + +Notes about the RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] -> +RHEL-8.5/20210520-e1999b264f1f [edk2-stable202105] rebase: + +- no change + +Notes about the RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] -> +RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] rebase: + +- context difference from upstream commit f5cb3767038e + ("ArmVirtPkg/ArmVirtQemu: add ResetSystem PEIM for upcoming TPM2 + support", 2020-03-04) automatically resolved correctly + +Notes about the RHEL-8.1/20190308-89910a39dcfd [edk2-stable201903] -> +RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] rebase: + +- no change + +Notes about the RHEL-8.0/20180508-ee3198e672e2 -> +RHEL-8.1/20190308-89910a39dcfd rebase: + +- resolve context conflict with upstream commit eaa1e98ae31d ("ArmVirtPkg: + don't set PcdCoreCount", 2019-02-13) + +Notes about the RHEL-7.6/ovmf-20180508-2.gitee3198e672e2.el7 -> +RHEL-8.0/20180508-ee3198e672e2 rebase: + +- reorder the rebase changelog in the commit message so that it reads like + a blog: place more recent entries near the top +- no changes to the patch body + +Notes about the 20171011-92d07e48907f -> 20180508-ee3198e672e2 rebase: + +- no changes + +Notes about the 20170228-c325e41585e3 -> 20171011-92d07e48907f rebase: + +- no changes + +Notes about the 20160608b-988715a -> 20170228-c325e41585e3 rebase: + +- no changes + +Print a friendly banner on QEMU, regardless of debug mask settings. + +RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1270279 +Downstream only: +. + +Contributed-under: TianoCore Contribution Agreement 1.0 +Signed-off-by: Laszlo Ersek +(cherry picked from commit 5d4a15b9019728b2d96322bc679099da49916925) +(cherry picked from commit 179df76dbb0d199bd905236e98775b4059c6502a) +(cherry picked from commit ce3f59d0710c24c162d5222bbf5cd7e36180c80c) +(cherry picked from commit c201a8e6ae28d75f7ba581828b533c3b26fa7f18) +(cherry picked from commit 2d4db6ec70e004cd9ac147615d17033bee5d3b18) +(cherry picked from commit fb2032bbea7e02c426855cf86a323556d493fd8a) +(cherry picked from commit ba73b99d5cb38f87c1a8f0936d515eaaefa3f04b) +(cherry picked from commit 72550e12ae469012a505bf5b98a6543a754028d3) +--- + ArmVirtPkg/ArmVirtQemu.dsc | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc +index 6960df62b082..847a82ac52e6 100644 +--- a/ArmVirtPkg/ArmVirtQemu.dsc ++++ b/ArmVirtPkg/ArmVirtQemu.dsc +@@ -134,6 +134,7 @@ [PcdsFeatureFlag.common] + gArmVirtTokenSpaceGuid.PcdTpm2SupportEnabled|$(TPM2_ENABLE) + + [PcdsFixedAtBuild.common] ++ gArmPlatformTokenSpaceGuid.PcdEarlyHelloMessage|"UEFI firmware starting.\r\n" + !if $(ARCH) == AARCH64 + gArmTokenSpaceGuid.PcdVFPEnabled|1 + !endif +-- +2.35.1 + diff --git a/0011-OvmfPkg-increase-max-debug-message-length-to-512-RHE.patch b/0011-OvmfPkg-increase-max-debug-message-length-to-512-RHE.patch deleted file mode 100644 index ad9dd72..0000000 --- a/0011-OvmfPkg-increase-max-debug-message-length-to-512-RHE.patch +++ /dev/null @@ -1,82 +0,0 @@ -From ed975a4db7c55e49ab9de1a0919baafdce9661e3 Mon Sep 17 00:00:00 2001 -From: Laszlo Ersek -Date: Thu, 20 Feb 2014 22:54:45 +0100 -Subject: OvmfPkg: increase max debug message length to 512 (RHEL only) - -Notes about the RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] -> -RHEL-8.5/20210520-e1999b264f1f [edk2-stable202105] rebase: - -- no change - -Notes about the RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] -> -RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] rebase: - -- no change - -Notes about the RHEL-8.1/20190308-89910a39dcfd [edk2-stable201903] -> -RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] rebase: - -- trivial context difference due to upstream commit 2fe5f2f52918 - ("OvmfPkg/PlatformDebugLibIoPort: Add new APIs", 2019-04-02), resolved - by git-cherry-pick automatically - -Notes about the RHEL-8.0/20180508-ee3198e672e2 -> -RHEL-8.1/20190308-89910a39dcfd rebase: - -- no changes - -Notes about the RHEL-7.6/ovmf-20180508-2.gitee3198e672e2.el7 -> -RHEL-8.0/20180508-ee3198e672e2 rebase: - -- reorder the rebase changelog in the commit message so that it reads like - a blog: place more recent entries near the top -- no changes to the patch body - -Notes about the 20171011-92d07e48907f -> 20180508-ee3198e672e2 rebase: - -- no changes - -Notes about the 20170228-c325e41585e3 -> 20171011-92d07e48907f rebase: - -- no changes - -Notes about the 20160608b-988715a -> 20170228-c325e41585e3 rebase: - -- no changes - -Upstream prefers short debug messages (sometimes even limited to 80 -characters), but any line length under 512 characters is just unsuitable -for effective debugging. (For example, config strings in HII routing, -logged by the platform driver "OvmfPkg/PlatformDxe" on DEBUG_VERBOSE -level, can be several hundred characters long.) 512 is an empirically good -value. - -Signed-off-by: Laszlo Ersek -(cherry picked from commit bfe568d18dba15602604f155982e3b73add63dfb) -(cherry picked from commit 29435a32ec9428720c74c454ce9817662e601fb6) -(cherry picked from commit 58e1d1ebb78bfdaf05f4c6e8abf8d4908dfa038a) -(cherry picked from commit 1df2c822c996ad767f2f45570ab2686458f7604a) -(cherry picked from commit 22c9b4e971c70c69b4adf8eb93133824ccb6426a) -(cherry picked from commit a1260c9122c95bcbef1efc5eebe11902767813c2) -(cherry picked from commit e949bab1268f83f0f5815a96cd1cb9dd3b21bfb5) -(cherry picked from commit a95cff0b9573bf23699551beb4786383f697ff1e) ---- - OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c b/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c -index dffb20822d..0577c43c3d 100644 ---- a/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c -+++ b/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c -@@ -21,7 +21,7 @@ - // - // Define the maximum debug and assert message length that this library supports - // --#define MAX_DEBUG_MESSAGE_LENGTH 0x100 -+#define MAX_DEBUG_MESSAGE_LENGTH 0x200 - - // - // VA_LIST can not initialize to NULL for all compiler, so we use this to --- -2.27.0 - diff --git a/0012-MdeModulePkg-TerminalDxe-add-other-text-resolutions-.patch b/0012-MdeModulePkg-TerminalDxe-add-other-text-resolutions-.patch deleted file mode 100644 index 73d2995..0000000 --- a/0012-MdeModulePkg-TerminalDxe-add-other-text-resolutions-.patch +++ /dev/null @@ -1,168 +0,0 @@ -From 6901201d2cd1d943ebd41f3d65102f787540d3c4 Mon Sep 17 00:00:00 2001 -From: Laszlo Ersek -Date: Tue, 25 Feb 2014 18:40:35 +0100 -Subject: MdeModulePkg: TerminalDxe: add other text resolutions (RHEL only) - -Notes about the RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] -> -RHEL-8.5/20210520-e1999b264f1f [edk2-stable202105] rebase: - -- no change - -Notes about the RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] -> -RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] rebase: - -- no 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 - - -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 -(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 a98b690c8b..ded5513c74 100644 ---- a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c -+++ b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c -@@ -115,9 +115,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.27.0 - diff --git a/0012-OvmfPkg-enable-DEBUG_VERBOSE-RHEL-only.patch b/0012-OvmfPkg-enable-DEBUG_VERBOSE-RHEL-only.patch new file mode 100644 index 0000000..e4374d0 --- /dev/null +++ b/0012-OvmfPkg-enable-DEBUG_VERBOSE-RHEL-only.patch @@ -0,0 +1,121 @@ +From 68eb31a414bf2fc427cfa7831a90690dcb703c65 Mon Sep 17 00:00:00 2001 +From: Paolo Bonzini +Date: Tue, 21 Nov 2017 00:57:45 +0100 +Subject: [PATCH 12/21] OvmfPkg: enable DEBUG_VERBOSE (RHEL only) + +Notes about the RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] -> +RHEL-8.5/20210520-e1999b264f1f [edk2-stable202105] rebase: + +- Extend the DSC change to the new OvmfPkg/AmdSev platform, which has been + introduced upstream in commit 30d277ed7a82 ("OvmfPkg/Amdsev: Base commit + to build encrypted boot specific OVMF", 2020-12-14), for TianoCore#3077. + +- Remove obsolete commit message tags related to downstream patch + management: Message-id, Patchwork-id, O-Subject, Acked-by, From + (RHBZ#1846481). + +Notes about the RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] -> +RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] rebase: + +- context difference from upstream commit 46bb81200742 ("OvmfPkg: Make + SOURCE_DEBUG_ENABLE actually need to be set to TRUE", 2019-10-22) + resolved automatically + +Notes about the RHEL-8.1/20190308-89910a39dcfd [edk2-stable201903] -> +RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] rebase: + +- no change + +Notes about the RHEL-8.0/20180508-ee3198e672e2 -> +RHEL-8.1/20190308-89910a39dcfd rebase: + +- no change + +Notes about the RHEL-7.6/ovmf-20180508-2.gitee3198e672e2.el7 -> +RHEL-8.0/20180508-ee3198e672e2 rebase: + +- reorder the rebase changelog in the commit message so that it reads like + a blog: place more recent entries near the top +- no changes to the patch body + +Notes about the 20171011-92d07e48907f -> 20180508-ee3198e672e2 rebase: + +- no changes + +Bugzilla: 1488247 + +Set the DEBUG_VERBOSE bit (0x00400000) in the log mask. We want detailed +debug messages, and code in OvmfPkg logs many messages on the +DEBUG_VERBOSE level. + +Signed-off-by: Laszlo Ersek +Signed-off-by: Paolo Bonzini +(this patch was previously applied as commit 78d3ed73172b5738e32d2b0bc03f7984b9584117) +(cherry picked from commit 7aeeaabc9871f657e65d2b99d81011b4964a1ce9) +(cherry picked from commit a0617a6be1a80966099ddceb010f89202a79ee76) +(cherry picked from commit 759bd3f591e2db699bdef4c7ea4e97c908e7f027) +(cherry picked from commit 7e6d5dc4078c64be6d55d8fc3317c59a91507a50) +(cherry picked from commit 3cb92f9ba18ac79911bd5258ff4f949cc617ae89) +(cherry picked from commit 5ecc18badaabe774d9d0806b027ab63a30c6a2d7) +--- + OvmfPkg/AmdSev/AmdSevX64.dsc | 2 +- + OvmfPkg/OvmfPkgIa32.dsc | 2 +- + OvmfPkg/OvmfPkgIa32X64.dsc | 2 +- + OvmfPkg/OvmfPkgX64.dsc | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/OvmfPkg/AmdSev/AmdSevX64.dsc b/OvmfPkg/AmdSev/AmdSevX64.dsc +index d1f9bc6d0d61..538a0c77f671 100644 +--- a/OvmfPkg/AmdSev/AmdSevX64.dsc ++++ b/OvmfPkg/AmdSev/AmdSevX64.dsc +@@ -471,7 +471,7 @@ [PcdsFixedAtBuild] + # DEBUG_VERBOSE 0x00400000 // Detailed debug messages that may + # // significantly impact boot performance + # DEBUG_ERROR 0x80000000 // Error +- gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F ++ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8040004F + + !if $(SOURCE_DEBUG_ENABLE) == TRUE + gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x17 +diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc +index 6bcd222af7c2..91a3c8f9dda6 100644 +--- a/OvmfPkg/OvmfPkgIa32.dsc ++++ b/OvmfPkg/OvmfPkgIa32.dsc +@@ -520,7 +520,7 @@ [PcdsFixedAtBuild] + # DEBUG_VERBOSE 0x00400000 // Detailed debug messages that may + # // significantly impact boot performance + # DEBUG_ERROR 0x80000000 // Error +- gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F ++ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8040004F + + !if $(SOURCE_DEBUG_ENABLE) == TRUE + gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x17 +diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc +index 0cce3b768e12..1a7ba6e6eac5 100644 +--- a/OvmfPkg/OvmfPkgIa32X64.dsc ++++ b/OvmfPkg/OvmfPkgIa32X64.dsc +@@ -524,7 +524,7 @@ [PcdsFixedAtBuild] + # DEBUG_VERBOSE 0x00400000 // Detailed debug messages that may + # // significantly impact boot performance + # DEBUG_ERROR 0x80000000 // Error +- gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F ++ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8040004F + + !if $(SOURCE_DEBUG_ENABLE) == TRUE + gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x17 +diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc +index 847cf6a46652..1a7afc764607 100644 +--- a/OvmfPkg/OvmfPkgX64.dsc ++++ b/OvmfPkg/OvmfPkgX64.dsc +@@ -525,7 +525,7 @@ [PcdsFixedAtBuild] + # DEBUG_VERBOSE 0x00400000 // Detailed debug messages that may + # // significantly impact boot performance + # DEBUG_ERROR 0x80000000 // Error +- gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F ++ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8040004F + + !if $(SOURCE_DEBUG_ENABLE) == TRUE + gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x17 +-- +2.35.1 + diff --git a/0013-MdeModulePkg-TerminalDxe-set-xterm-resolution-on-mod.patch b/0013-MdeModulePkg-TerminalDxe-set-xterm-resolution-on-mod.patch deleted file mode 100644 index 5fe8ff6..0000000 --- a/0013-MdeModulePkg-TerminalDxe-set-xterm-resolution-on-mod.patch +++ /dev/null @@ -1,181 +0,0 @@ -From 9485b38e5dbfd2e23ea6ad0585e773d7842a1903 Mon Sep 17 00:00:00 2001 -From: Laszlo Ersek -Date: Tue, 25 Feb 2014 22:40:01 +0100 -Subject: MdeModulePkg: TerminalDxe: set xterm resolution on mode change (RH - only) - -Notes about the RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] -> -RHEL-8.5/20210520-e1999b264f1f [edk2-stable202105] rebase: - -- Resolve harmless conflict in "MdeModulePkg/MdeModulePkg.dec", - originating from new upstream commits - - 45bc28172fbf ("MdeModulePkg.dec: Change PCDs for status code.", - 2020-06-18), - - 0785c619a58a ("MdeModulePkg/Bus/Pci/PciBusDxe: Support PCIe Resizable - BAR Capability", 2021-01-04), - - ef23012e5439 ("MdeModulePkg: Change default value of - PcdPcieResizableBarSupport to FALSE", 2021-01-14). - -Notes about the RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] -> -RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] rebase: - -- Resolve trivial conflict in "MdeModulePkg/MdeModulePkg.dec", arising - from upstream commit 166830d8f7ca ("MdeModulePkg/dec: add - PcdTcgPfpMeasurementRevision PCD", 2020-01-06). - -Notes about the RHEL-8.1/20190308-89910a39dcfd [edk2-stable201903] -> -RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] rebase: - -- Conflict in "MdeModulePkg/MdeModulePkg.dec" due to upstream commits - - 1103ba946aee ("MdeModulePkg: Add Capsule On Disk related definition.", - 2019-06-26), - - 1c7b3eb84631 ("MdeModulePkg/DxeIpl: Introduce PCD - PcdUse5LevelPageTable", 2019-08-09), - with easy manual resolution. - -Notes about the RHEL-8.0/20180508-ee3198e672e2 -> -RHEL-8.1/20190308-89910a39dcfd rebase: - -- no change - -Notes about the RHEL-7.6/ovmf-20180508-2.gitee3198e672e2.el7 -> -RHEL-8.0/20180508-ee3198e672e2 rebase: - -- reorder the rebase changelog in the commit message so that it reads like - a blog: place more recent entries near the top -- no changes to the patch body - -Notes about the 20171011-92d07e48907f -> 20180508-ee3198e672e2 rebase: - -- no change - -Notes about the 20170228-c325e41585e3 -> 20171011-92d07e48907f rebase: - -- Refresh downstream-only commit 2909e025db68 against "MdeModulePkg.dec" - context change from upstream commits e043f7895b83 ("MdeModulePkg: Add - PCD PcdPteMemoryEncryptionAddressOrMask", 2017-02-27) and 76081dfcc5b2 - ("MdeModulePkg: Add PROMPT&HELP string of pcd to UNI file", 2017-03-03). - -Notes about the 20160608b-988715a -> 20170228-c325e41585e3 rebase: - -- refresh commit 519b9751573e against various context changes - -The - - CSI Ps ; Ps ; Ps t - -escape sequence serves for window manipulation. We can use the - - CSI 8 ; ; t - -sequence to adapt eg. the xterm window size to the selected console mode. - -Reference: -Contributed-under: TianoCore Contribution Agreement 1.0 -Signed-off-by: Laszlo Ersek -(cherry picked from commit 2909e025db6878723b49644a8a0cf160d07e6444) -(cherry picked from commit b9c5c901f25e48d68eef6e78a4abca00e153f574) -(cherry picked from commit b7f6115b745de8cbc5214b6ede33c9a8558beb90) -(cherry picked from commit 67415982afdc77922aa37496c981adeb4351acdb) -(cherry picked from commit cfccb98d13e955beb0b93b4a75a973f30c273ffc) -(cherry picked from commit a11602f5e2ef930be5b693ddfd0c789a1bd4c60c) -(cherry picked from commit bc2266f20de5db1636e09a07e4a72c8dbf505f5a) ---- - MdeModulePkg/MdeModulePkg.dec | 4 +++ - .../Console/TerminalDxe/TerminalConOut.c | 30 +++++++++++++++++++ - .../Console/TerminalDxe/TerminalDxe.inf | 2 ++ - 3 files changed, 36 insertions(+) - -diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec -index ba2d0290e7..ff70d6e6eb 100644 ---- a/MdeModulePkg/MdeModulePkg.dec -+++ b/MdeModulePkg/MdeModulePkg.dec -@@ -2046,6 +2046,10 @@ - # @Prompt Enable PCIe Resizable BAR Capability support. - gEfiMdeModulePkgTokenSpaceGuid.PcdPcieResizableBarSupport|FALSE|BOOLEAN|0x10000024 - -+ ## Controls whether TerminalDxe outputs an XTerm resize sequence on terminal -+ # mode change. -+ gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm|FALSE|BOOLEAN|0x00010080 -+ - [PcdsPatchableInModule] - ## Specify memory size with page number for PEI code when - # Loading Module at Fixed Address feature is enabled. -diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c -index aae470e956..26156857aa 100644 ---- a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c -+++ b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c -@@ -7,6 +7,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent - - **/ - -+#include -+ - #include "Terminal.h" - - // -@@ -80,6 +82,16 @@ CHAR16 mSetCursorPositionString[] = { ESC, '[', '0', '0', ';', '0', '0', 'H', 0 - CHAR16 mCursorForwardString[] = { ESC, '[', '0', '0', 'C', 0 }; - CHAR16 mCursorBackwardString[] = { ESC, '[', '0', '0', 'D', 0 }; - -+// -+// Note that this is an ASCII format string, taking two INT32 arguments: -+// rows, columns. -+// -+// A %d (INT32) format specification can expand to at most 11 characters. -+// -+CHAR8 mResizeTextAreaFormatString[] = "\x1B[8;%d;%dt"; -+#define RESIZE_SEQ_SIZE (sizeof mResizeTextAreaFormatString + 2 * (11 - 2)) -+ -+ - // - // Body of the ConOut functions - // -@@ -506,6 +518,24 @@ TerminalConOutSetMode ( - return EFI_DEVICE_ERROR; - } - -+ if (PcdGetBool (PcdResizeXterm)) { -+ CHAR16 ResizeSequence[RESIZE_SEQ_SIZE]; -+ -+ UnicodeSPrintAsciiFormat ( -+ ResizeSequence, -+ sizeof ResizeSequence, -+ mResizeTextAreaFormatString, -+ (INT32) TerminalDevice->TerminalConsoleModeData[ModeNumber].Rows, -+ (INT32) TerminalDevice->TerminalConsoleModeData[ModeNumber].Columns -+ ); -+ TerminalDevice->OutputEscChar = TRUE; -+ Status = This->OutputString (This, ResizeSequence); -+ TerminalDevice->OutputEscChar = FALSE; -+ if (EFI_ERROR (Status)) { -+ return EFI_DEVICE_ERROR; -+ } -+ } -+ - This->Mode->Mode = (INT32) ModeNumber; - - Status = This->ClearScreen (This); -diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf -index b2a8aeba85..eff6253465 100644 ---- a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf -+++ b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf -@@ -55,6 +55,7 @@ - DebugLib - PcdLib - BaseLib -+ PrintLib - - [Guids] - ## SOMETIMES_PRODUCES ## Variable:L"ConInDev" -@@ -87,6 +88,7 @@ - [Pcd] - gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType ## SOMETIMES_CONSUMES - gEfiMdeModulePkgTokenSpaceGuid.PcdErrorCodeSetVariable ## CONSUMES -+ gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm ## CONSUMES - - # [Event] - # # Relative timer event set by UnicodeToEfiKey(), used to be one 2 seconds input timeout. --- -2.27.0 - diff --git a/0013-OvmfPkg-silence-DEBUG_VERBOSE-0x00400000-in-QemuVide.patch b/0013-OvmfPkg-silence-DEBUG_VERBOSE-0x00400000-in-QemuVide.patch new file mode 100644 index 0000000..b681445 --- /dev/null +++ b/0013-OvmfPkg-silence-DEBUG_VERBOSE-0x00400000-in-QemuVide.patch @@ -0,0 +1,173 @@ +From 4a93ff1fcac08c28bd3f70e9f5bb0e402c27cb43 Mon Sep 17 00:00:00 2001 +From: Paolo Bonzini +Date: Tue, 21 Nov 2017 00:57:46 +0100 +Subject: [PATCH 13/21] OvmfPkg: silence DEBUG_VERBOSE (0x00400000) in + QemuVideoDxe/QemuRamfbDxe (RH) + +Notes about the RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] -> +RHEL-8.5/20210520-e1999b264f1f [edk2-stable202105] rebase: + +- Extend the DSC change to the new OvmfPkg/AmdSev platform, which has been + introduced upstream in commit 30d277ed7a82 ("OvmfPkg/Amdsev: Base commit + to build encrypted boot specific OVMF", 2020-12-14), for TianoCore#3077. + +- Remove obsolete commit message tags related to downstream patch + management: Message-id, Patchwork-id, O-Subject, Acked-by, From + (RHBZ#1846481). + +Notes about the RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] -> +RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] rebase: + +- no change + +Notes about the RHEL-8.1/20190308-89910a39dcfd [edk2-stable201903] -> +RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] rebase: + +- Due to upstream commit 4b04d9d73604 ("OvmfPkg: Don't build in + QemuVideoDxe when we have CSM", 2019-06-26), the contexts of + "QemuVideoDxe.inf" / "QemuRamfbDxe.inf" have changed in the DSC files. + Resolve the conflict manually. + +Notes about the RHEL-8.0/20180508-ee3198e672e2 -> +RHEL-8.1/20190308-89910a39dcfd rebase: + +- Upstream commit 1d25ff51af5c ("OvmfPkg: add QemuRamfbDxe", 2018-06-14) + introduced another GOP driver that consumes FrameBufferBltLib, and + thereby produces a large number of (mostly useless) debug messages at + the DEBUG_VERBOSE level. Extend the patch to suppress those messages in + both QemuVideoDxe and QemuRamfbDxe; update the subject accordingly. + QemuRamfbDxe itself doesn't log anything at the VERBOSE level (see also + the original commit message at the bottom of this downstream patch). + +Notes about the RHEL-7.6/ovmf-20180508-2.gitee3198e672e2.el7 -> +RHEL-8.0/20180508-ee3198e672e2 rebase: + +- reorder the rebase changelog in the commit message so that it reads like + a blog: place more recent entries near the top +- no changes to the patch body + +Notes about the 20171011-92d07e48907f -> 20180508-ee3198e672e2 rebase: + +- no changes + +Bugzilla: 1488247 + +In commit 5b2291f9567a ("OvmfPkg: QemuVideoDxe uses +MdeModulePkg/FrameBufferLib"), QemuVideoDxe was rebased to +FrameBufferBltLib. + +The FrameBufferBltLib instance added in commit b1ca386074bd +("MdeModulePkg: Add FrameBufferBltLib library instance") logs many +messages on the VERBOSE level; for example, a normal boot with OVMF can +produce 500+ "VideoFill" messages, dependent on the progress bar, when the +VERBOSE bit is set in PcdDebugPrintErrorLevel. + +QemuVideoDxe itself doesn't log anything at the VERBOSE level, so we lose +none of its messages this way. + +Signed-off-by: Laszlo Ersek +Signed-off-by: Paolo Bonzini +(this patch was previously applied as commit 9b0d031dee7e823f6717bab73e422fbc6f0a6c52) +(cherry picked from commit 9122d5f2e8d8d289064d1e1700cb61964d9931f3) +(cherry picked from commit 7eb3be1d4ccafc26c11fe5afb95cc12b250ce6f0) +(cherry picked from commit bd650684712fb840dbcda5d6eaee065bd9e91fa1) +(cherry picked from commit b06b87f8ffd4fed4ef7eacb13689a9b6d111f850) +(cherry picked from commit c8c3f893e7c3710afe45c46839e97954871536e4) +(cherry picked from commit 1355849ad97c1e4a5c430597a377165a5cc118f7) +--- + OvmfPkg/AmdSev/AmdSevX64.dsc | 10 ++++++++-- + OvmfPkg/OvmfPkgIa32.dsc | 10 ++++++++-- + OvmfPkg/OvmfPkgIa32X64.dsc | 10 ++++++++-- + OvmfPkg/OvmfPkgX64.dsc | 10 ++++++++-- + 4 files changed, 32 insertions(+), 8 deletions(-) + +diff --git a/OvmfPkg/AmdSev/AmdSevX64.dsc b/OvmfPkg/AmdSev/AmdSevX64.dsc +index 538a0c77f671..ea4070eedbde 100644 +--- a/OvmfPkg/AmdSev/AmdSevX64.dsc ++++ b/OvmfPkg/AmdSev/AmdSevX64.dsc +@@ -715,8 +715,14 @@ [Components] + MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf + MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf + +- OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf +- OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf ++ OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf { ++ ++ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F ++ } ++ OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf { ++ ++ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F ++ } + OvmfPkg/VirtioGpuDxe/VirtioGpu.inf + + # +diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc +index 91a3c8f9dda6..37d1d4b9a5e0 100644 +--- a/OvmfPkg/OvmfPkgIa32.dsc ++++ b/OvmfPkg/OvmfPkgIa32.dsc +@@ -812,9 +812,15 @@ [Components] + MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf + + !ifndef $(CSM_ENABLE) +- OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf ++ OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf { ++ ++ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F ++ } + !endif +- OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf ++ OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf { ++ ++ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F ++ } + OvmfPkg/VirtioGpuDxe/VirtioGpu.inf + + # +diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc +index 1a7ba6e6eac5..948e1a5ba59c 100644 +--- a/OvmfPkg/OvmfPkgIa32X64.dsc ++++ b/OvmfPkg/OvmfPkgIa32X64.dsc +@@ -826,9 +826,15 @@ [Components.X64] + MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf + + !ifndef $(CSM_ENABLE) +- OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf ++ OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf { ++ ++ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F ++ } + !endif +- OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf ++ OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf { ++ ++ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F ++ } + OvmfPkg/VirtioGpuDxe/VirtioGpu.inf + + # +diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc +index 1a7afc764607..46799406b613 100644 +--- a/OvmfPkg/OvmfPkgX64.dsc ++++ b/OvmfPkg/OvmfPkgX64.dsc +@@ -823,9 +823,15 @@ [Components] + MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf + + !ifndef $(CSM_ENABLE) +- OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf ++ OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf { ++ ++ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F ++ } + !endif +- OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf ++ OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf { ++ ++ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F ++ } + OvmfPkg/VirtioGpuDxe/VirtioGpu.inf + + # +-- +2.35.1 + diff --git a/0014-ArmVirtPkg-silence-DEBUG_VERBOSE-0x00400000-in-QemuR.patch b/0014-ArmVirtPkg-silence-DEBUG_VERBOSE-0x00400000-in-QemuR.patch new file mode 100644 index 0000000..850d5d3 --- /dev/null +++ b/0014-ArmVirtPkg-silence-DEBUG_VERBOSE-0x00400000-in-QemuR.patch @@ -0,0 +1,97 @@ +From 1a0949d47578b6f74e3ac70c479454307141c1b9 Mon Sep 17 00:00:00 2001 +From: Laszlo Ersek +Date: Wed, 27 Jan 2016 03:05:18 +0100 +Subject: [PATCH 14/21] ArmVirtPkg: silence DEBUG_VERBOSE (0x00400000) in + QemuRamfbDxe (RH only) + +Notes about the RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] -> +RHEL-8.5/20210520-e1999b264f1f [edk2-stable202105] rebase: + +- no change + +Notes about the RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] -> +RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] rebase: + +- no change + +Notes about the RHEL-8.1/20190308-89910a39dcfd [edk2-stable201903] -> +RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] rebase: + +- The previous version of this patch (downstream commit 76b4ac28e975) + caused a regression (RHBZ#1714446), which was fixed up in downstream + commit 5a216abaa737 ("ArmVirtPkg: silence DEBUG_VERBOSE masking + ~0x00400000 in QemuRamfbDxe (RH only)", 2019-08-05). + + Squash the fixup into the original patch. Fuse the commit messages. + (Acked-by tags are not preserved, lest we confuse ourselves while + reviewing this rebase.) + +Notes about the RHEL-8.0/20180508-ee3198e672e2 -> +RHEL-8.1/20190308-89910a39dcfd rebase: + +- new patch, due to upstream commit c64688f36a8b ("ArmVirtPkg: add + QemuRamfbDxe", 2018-06-14) + +QemuRamfbDxe uses FrameBufferLib. The FrameBufferBltLib instance added in +commit b1ca386074bd ("MdeModulePkg: Add FrameBufferBltLib library +instance") logs many messages on the VERBOSE level; for example, a normal +boot with ArmVirtQemu[Kernel] can produce 500+ "VideoFill" messages, +dependent on the progress bar, when the VERBOSE bit is set in +PcdDebugPrintErrorLevel. + +Clear the VERBOSE bit without touching other bits -- those other bits +differ between the "silent" and "verbose" builds, so we can't set them as +constants. + +QemuRamfbDxe itself doesn't log anything at the VERBOSE level, so we lose +none of its messages, with the VERBOSE bit clear. + +Signed-off-by: Laszlo Ersek +(cherry picked from commit 76b4ac28e975bd63c25db903a1d42c47b38cc756) +Reported-by: Andrew Jones +Suggested-by: Laszlo Ersek +Signed-off-by: Philippe Mathieu-Daude +(cherry picked from commit 5a216abaa737195327235e37563b18a6bf2a74dc) +Signed-off-by: Laszlo Ersek +(cherry picked from commit e5b8152bced2364a1ded0926dbba4d65e23e3f84) +(cherry picked from commit e7f57f154439c1c18ea5030b01f8d7bc492698b2) +--- + ArmVirtPkg/ArmVirtQemu.dsc | 5 ++++- + ArmVirtPkg/ArmVirtQemuKernel.dsc | 5 ++++- + 2 files changed, 8 insertions(+), 2 deletions(-) + +diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc +index 847a82ac52e6..d94a8cdd696e 100644 +--- a/ArmVirtPkg/ArmVirtQemu.dsc ++++ b/ArmVirtPkg/ArmVirtQemu.dsc +@@ -509,7 +509,10 @@ [Components.common] + # + # Video support + # +- OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf ++ OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf { ++ ++ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|($(DEBUG_PRINT_ERROR_LEVEL)) & 0xFFBFFFFF ++ } + OvmfPkg/VirtioGpuDxe/VirtioGpu.inf + OvmfPkg/PlatformDxe/Platform.inf + +diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc +index 36343f347bab..99189055d8bd 100644 +--- a/ArmVirtPkg/ArmVirtQemuKernel.dsc ++++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc +@@ -438,7 +438,10 @@ [Components.common] + # + # Video support + # +- OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf ++ OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf { ++ ++ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|($(DEBUG_PRINT_ERROR_LEVEL)) & 0xFFBFFFFF ++ } + OvmfPkg/VirtioGpuDxe/VirtioGpu.inf + OvmfPkg/PlatformDxe/Platform.inf + +-- +2.35.1 + diff --git a/0014-OvmfPkg-take-PcdResizeXterm-from-the-QEMU-command-li.patch b/0014-OvmfPkg-take-PcdResizeXterm-from-the-QEMU-command-li.patch deleted file mode 100644 index b42d5f3..0000000 --- a/0014-OvmfPkg-take-PcdResizeXterm-from-the-QEMU-command-li.patch +++ /dev/null @@ -1,156 +0,0 @@ -From cbfd81c5bdd8bb8ee49f4e3387226cdcb83e6fb3 Mon Sep 17 00:00:00 2001 -From: Laszlo Ersek -Date: Wed, 14 Oct 2015 15:59:06 +0200 -Subject: [PATCH 07/20] OvmfPkg: take PcdResizeXterm from the QEMU command line - (RH only) - -edk2-stable202108 rebase - -- resolve conflict in OvmfPkg/PlatformPei/PlatformPei.inf - -Notes about the RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] -> -RHEL-8.5/20210520-e1999b264f1f [edk2-stable202105] rebase: - -- Extend the DSC change to the new OvmfPkg/AmdSev platform, which has been - introduced upstream in commit 30d277ed7a82 ("OvmfPkg/Amdsev: Base commit - to build encrypted boot specific OVMF", 2020-12-14), for TianoCore#3077. - - We've always patched all those DSC/FDF files in OvmfPkg down-stream that - made sense at least in theory on QEMU. (For example, we've always - patched "OvmfPkgIa32.dsc" and "OvmfPkgIa32.fdf", even though we never - build or ship the pure IA32 firmware platform.) Follow suit with - "AmdSevX64.dsc". - -Notes about the RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] -> -RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] rebase: - -- Resolve contextual conflict in the DSC files, from upstream commit - b0ed7ebdebd1 ("OvmfPkg: set fixed FlashNvStorage base addresses with -D - SMM_REQUIRE", 2020-03-12). - -Notes about the RHEL-8.1/20190308-89910a39dcfd [edk2-stable201903] -> -RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] rebase: - -- no change - -Notes about the RHEL-8.0/20180508-ee3198e672e2 -> -RHEL-8.1/20190308-89910a39dcfd rebase: - -- no change - -Notes about the RHEL-7.6/ovmf-20180508-2.gitee3198e672e2.el7 -> -RHEL-8.0/20180508-ee3198e672e2 rebase: - -- reorder the rebase changelog in the commit message so that it reads like - a blog: place more recent entries near the top -- no changes to the patch body - -Notes about the 20171011-92d07e48907f -> 20180508-ee3198e672e2 rebase: - -- no change - -Notes about the 20170228-c325e41585e3 -> 20171011-92d07e48907f rebase: - -- refresh downstream-only commit 8abc2a6ddad2 against context differences - in the DSC files from upstream commit 5e167d7e784c - ("OvmfPkg/PlatformPei: don't allocate reserved mem varstore if - SMM_REQUIRE", 2017-03-12). - -Notes about the 20160608b-988715a -> 20170228-c325e41585e3 rebase: - -- no changes - -Contributed-under: TianoCore Contribution Agreement 1.0 -Signed-off-by: Laszlo Ersek -(cherry picked from commit 6fa0c4d67c0bb8bde2ddd6db41c19eb0c40b2721) -(cherry picked from commit 8abc2a6ddad25af7e88dc0cf57d55dfb75fbf92d) -(cherry picked from commit b311932d3841c017a0f0fec553edcac365cc2038) -(cherry picked from commit 61914fb81cf624c9028d015533b400b2794e52d3) -(cherry picked from commit 2ebf3cc2ae99275d63bb6efd3c22dec76251a853) -(cherry picked from commit f9b73437b9b231773c1a20e0c516168817a930a2) -(cherry picked from commit 2cc462ee963d0be119bc97bfc9c70d292a40516f) -(cherry picked from commit 51e0de961029af84b5bdbfddcc9762b1819d500f) ---- - OvmfPkg/AmdSev/AmdSevX64.dsc | 1 + - OvmfPkg/OvmfPkgIa32.dsc | 1 + - OvmfPkg/OvmfPkgIa32X64.dsc | 1 + - OvmfPkg/OvmfPkgX64.dsc | 1 + - OvmfPkg/PlatformPei/PlatformPei.inf | 1 + - OvmfPkg/PlatformPei/Platform.c | 1 + - 6 files changed, 6 insertions(+) - -diff --git a/OvmfPkg/AmdSev/AmdSevX64.dsc b/OvmfPkg/AmdSev/AmdSevX64.dsc -index e589eafa49a8..e2aba82718c8 100644 ---- a/OvmfPkg/AmdSev/AmdSevX64.dsc -+++ b/OvmfPkg/AmdSev/AmdSevX64.dsc -@@ -534,6 +534,7 @@ [PcdsFixedAtBuild] - [PcdsDynamicDefault] - gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0 - -+ gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm|FALSE - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0 - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0 - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0 -diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc -index 5ccdd55472cc..9bde8702e74b 100644 ---- a/OvmfPkg/OvmfPkgIa32.dsc -+++ b/OvmfPkg/OvmfPkgIa32.dsc -@@ -594,6 +594,7 @@ [PcdsDynamicDefault] - # ($(SMM_REQUIRE) == FALSE) - gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0 - -+ gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm|FALSE - !if $(SMM_REQUIRE) == FALSE - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0 - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0 -diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc -index 9862112601f2..7ee5eaa0ace7 100644 ---- a/OvmfPkg/OvmfPkgIa32X64.dsc -+++ b/OvmfPkg/OvmfPkgIa32X64.dsc -@@ -600,6 +600,7 @@ [PcdsDynamicDefault] - # ($(SMM_REQUIRE) == FALSE) - gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0 - -+ gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm|FALSE - !if $(SMM_REQUIRE) == FALSE - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0 - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0 -diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc -index a6ba816d2fb5..ec8df8397ed4 100644 ---- a/OvmfPkg/OvmfPkgX64.dsc -+++ b/OvmfPkg/OvmfPkgX64.dsc -@@ -600,6 +600,7 @@ [PcdsDynamicDefault] - # ($(SMM_REQUIRE) == FALSE) - gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0 - -+ gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm|FALSE - !if $(SMM_REQUIRE) == FALSE - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0 - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0 -diff --git a/OvmfPkg/PlatformPei/PlatformPei.inf b/OvmfPkg/PlatformPei/PlatformPei.inf -index 89d1f7636870..655240c6436e 100644 ---- a/OvmfPkg/PlatformPei/PlatformPei.inf -+++ b/OvmfPkg/PlatformPei/PlatformPei.inf -@@ -93,6 +93,7 @@ [Pcd] - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize - gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved -+ gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm - gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode - gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable - gEfiMdeModulePkgTokenSpaceGuid.PcdSetNxForStack -diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c -index d3a20122a2ea..9a40932156a3 100644 ---- a/OvmfPkg/PlatformPei/Platform.c -+++ b/OvmfPkg/PlatformPei/Platform.c -@@ -738,6 +738,7 @@ InitializePlatform ( - MemTypeInfoInitialization (); - MemMapInitialization (); - NoexecDxeInitialization (); -+ UPDATE_BOOLEAN_PCD_FROM_FW_CFG (PcdResizeXterm); - } - - InstallClearCacheCallback (); --- -2.33.1 - diff --git a/0015-ArmVirtPkg-take-PcdResizeXterm-from-the-QEMU-command.patch b/0015-ArmVirtPkg-take-PcdResizeXterm-from-the-QEMU-command.patch deleted file mode 100644 index aeb9736..0000000 --- a/0015-ArmVirtPkg-take-PcdResizeXterm-from-the-QEMU-command.patch +++ /dev/null @@ -1,203 +0,0 @@ -From 3f9662c435278564640be672f0c4e17e535f1765 Mon Sep 17 00:00:00 2001 -From: Laszlo Ersek -Date: Sun, 26 Jul 2015 08:02:50 +0000 -Subject: ArmVirtPkg: take PcdResizeXterm from the QEMU command line (RH only) - -Notes about the RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] -> -RHEL-8.5/20210520-e1999b264f1f [edk2-stable202105] rebase: - -- no change - -Notes about the RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] -> -RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] rebase: - -- Resolve leading context divergence in "ArmVirtPkg/ArmVirtQemu.dsc", - arising from upstream commits: - - - 82662a3b5f56 ("ArmVirtPkg/PlatformPeiLib: discover the TPM base - address from the DT", 2020-03-04) - - - ddd34a818315 ("ArmVirtPkg/ArmVirtQemu: enable TPM2 support in the PEI - phase", 2020-03-04) - - - cdc3fa54184a ("ArmVirtPkg: control PXEv4 / PXEv6 boot support from the - QEMU command line", 2020-04-28) - -- Rework the downstream patch quite a bit, paralleling the upstream work - done for in commit - range 64ab457d1f21..cdc3fa54184a: - - - Refresh copyright year in TerminalPcdProducerLib.{inf,c}. Also replace - open-coded BSDL with "SPDX-License-Identifier: BSD-2-Clause-Patent". - - - Simplify LIBRARY_CLASS: this lib instance is meant to be consumed only - via NULL class resolution (basically: as a plugin), so use NULL for - LIBRARY_CLASS, not "TerminalPcdProducerLib|DXE_DRIVER". - - - Sort the [Packages] section alphabetically in the INF file. - - - Replace the open-coded GetNamedFwCfgBoolean() function with a call to - QemuFwCfgParseBool(), from QemuFwCfgSimpleParserLib. - - - Add the SOMETIMES_PRODUCES usage comment in the [Pcd] section of the - INF file. - -Notes about the RHEL-8.1/20190308-89910a39dcfd [edk2-stable201903] -> -RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] rebase: - -- no change - -Notes about the RHEL-8.0/20180508-ee3198e672e2 -> -RHEL-8.1/20190308-89910a39dcfd rebase: - -- no change - -Notes about the RHEL-7.6/ovmf-20180508-2.gitee3198e672e2.el7 -> -RHEL-8.0/20180508-ee3198e672e2 rebase: - -- reorder the rebase changelog in the commit message so that it reads like - a blog: place more recent entries near the top -- no changes to the patch body - -Notes about the 20171011-92d07e48907f -> 20180508-ee3198e672e2 rebase: - -- no change - -Notes about the 20170228-c325e41585e3 -> 20171011-92d07e48907f rebase: - -- Refresh downstream-only commit d4564d39dfdb against context changes in - "ArmVirtPkg/ArmVirtQemu.dsc" from upstream commit 7e5f1b673870 - ("ArmVirtPkg/PlatformHasAcpiDtDxe: allow guest level ACPI disable - override", 2017-03-29). - -Notes about the 20160608b-988715a -> 20170228-c325e41585e3 rebase: - -- Adapt commit 6b97969096a3 to the fact that upstream has deprecated such - setter functions for dynamic PCDs that don't return a status code (such - as PcdSetBool()). Employ PcdSetBoolS(), and assert that it succeeds -- - there's really no circumstance in this case when it could fail. - -Contributed-under: TianoCore Contribution Agreement 1.0 -Signed-off-by: Laszlo Ersek -(cherry picked from commit d4564d39dfdbf74e762af43314005a2c026cb262) -(cherry picked from commit c9081ebe3bcd28e5cce4bf58bd8d4fca12f9af7c) -(cherry picked from commit 8e92730c8e1cdb642b3b3e680e643ff774a90c65) -(cherry picked from commit 9448b6b46267d8d807fac0c648e693171bb34806) -(cherry picked from commit 232fcf06f6b3048b7c2ebd6931f23186b3852f04) -(cherry picked from commit 8338545260fbb423f796d5196faaaf8ff6e1ed99) -(cherry picked from commit a5f7a57bf390f1f340ff1d1f1884a73716817ef1) ---- - ArmVirtPkg/ArmVirtQemu.dsc | 7 +++- - .../TerminalPcdProducerLib.c | 34 +++++++++++++++++++ - .../TerminalPcdProducerLib.inf | 33 ++++++++++++++++++ - 3 files changed, 73 insertions(+), 1 deletion(-) - create mode 100644 ArmVirtPkg/Library/TerminalPcdProducerLib/TerminalPcdProducerLib.c - create mode 100644 ArmVirtPkg/Library/TerminalPcdProducerLib/TerminalPcdProducerLib.inf - -diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc -index 54d637163c..41a26c8d18 100644 ---- a/ArmVirtPkg/ArmVirtQemu.dsc -+++ b/ArmVirtPkg/ArmVirtQemu.dsc -@@ -280,6 +280,8 @@ - gEfiSecurityPkgTokenSpaceGuid.PcdTpm2HashMask|0 - !endif - -+ gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm|FALSE -+ - [PcdsDynamicHii] - gArmVirtTokenSpaceGuid.PcdForceNoAcpi|L"ForceNoAcpi"|gArmVirtVariableGuid|0x0|FALSE|NV,BS - -@@ -382,7 +384,10 @@ - MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf - MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf - MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf -- MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf -+ MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf { -+ -+ NULL|ArmVirtPkg/Library/TerminalPcdProducerLib/TerminalPcdProducerLib.inf -+ } - MdeModulePkg/Universal/SerialDxe/SerialDxe.inf - - MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf -diff --git a/ArmVirtPkg/Library/TerminalPcdProducerLib/TerminalPcdProducerLib.c b/ArmVirtPkg/Library/TerminalPcdProducerLib/TerminalPcdProducerLib.c -new file mode 100644 -index 0000000000..bfd3a6a535 ---- /dev/null -+++ b/ArmVirtPkg/Library/TerminalPcdProducerLib/TerminalPcdProducerLib.c -@@ -0,0 +1,34 @@ -+/** @file -+* Plugin library for setting up dynamic PCDs for TerminalDxe, from fw_cfg -+* -+* Copyright (C) 2015-2020, Red Hat, Inc. -+* Copyright (c) 2014, Linaro Ltd. All rights reserved.
-+* -+* SPDX-License-Identifier: BSD-2-Clause-Patent -+**/ -+ -+#include -+#include -+#include -+ -+#define UPDATE_BOOLEAN_PCD_FROM_FW_CFG(TokenName) \ -+ do { \ -+ BOOLEAN Setting; \ -+ RETURN_STATUS PcdStatus; \ -+ \ -+ if (!RETURN_ERROR (QemuFwCfgParseBool ( \ -+ "opt/org.tianocore.edk2.aavmf/" #TokenName, &Setting))) { \ -+ PcdStatus = PcdSetBoolS (TokenName, Setting); \ -+ ASSERT_RETURN_ERROR (PcdStatus); \ -+ } \ -+ } while (0) -+ -+RETURN_STATUS -+EFIAPI -+TerminalPcdProducerLibConstructor ( -+ VOID -+ ) -+{ -+ UPDATE_BOOLEAN_PCD_FROM_FW_CFG (PcdResizeXterm); -+ return RETURN_SUCCESS; -+} -diff --git a/ArmVirtPkg/Library/TerminalPcdProducerLib/TerminalPcdProducerLib.inf b/ArmVirtPkg/Library/TerminalPcdProducerLib/TerminalPcdProducerLib.inf -new file mode 100644 -index 0000000000..a51dbd1670 ---- /dev/null -+++ b/ArmVirtPkg/Library/TerminalPcdProducerLib/TerminalPcdProducerLib.inf -@@ -0,0 +1,33 @@ -+## @file -+# Plugin library for setting up dynamic PCDs for TerminalDxe, from fw_cfg -+# -+# Copyright (C) 2015-2020, Red Hat, Inc. -+# Copyright (c) 2014, Linaro Ltd. All rights reserved.
-+# -+# SPDX-License-Identifier: BSD-2-Clause-Patent -+## -+ -+[Defines] -+ INF_VERSION = 0x00010005 -+ BASE_NAME = TerminalPcdProducerLib -+ FILE_GUID = 4a0c5ed7-8c42-4c01-8f4c-7bf258316a96 -+ MODULE_TYPE = BASE -+ VERSION_STRING = 1.0 -+ LIBRARY_CLASS = NULL -+ CONSTRUCTOR = TerminalPcdProducerLibConstructor -+ -+[Sources] -+ TerminalPcdProducerLib.c -+ -+[Packages] -+ MdeModulePkg/MdeModulePkg.dec -+ MdePkg/MdePkg.dec -+ OvmfPkg/OvmfPkg.dec -+ -+[LibraryClasses] -+ DebugLib -+ PcdLib -+ QemuFwCfgSimpleParserLib -+ -+[Pcd] -+ gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm ## SOMETIMES_PRODUCES --- -2.27.0 - diff --git a/0015-OvmfPkg-QemuRamfbDxe-Do-not-report-DXE-failure-on-Aa.patch b/0015-OvmfPkg-QemuRamfbDxe-Do-not-report-DXE-failure-on-Aa.patch new file mode 100644 index 0000000..f289454 --- /dev/null +++ b/0015-OvmfPkg-QemuRamfbDxe-Do-not-report-DXE-failure-on-Aa.patch @@ -0,0 +1,96 @@ +From 9ee0430cff8d62256904063205d6c874cf949adf Mon Sep 17 00:00:00 2001 +From: Philippe Mathieu-Daude +Date: Thu, 1 Aug 2019 20:43:48 +0200 +Subject: [PATCH 15/21] OvmfPkg: QemuRamfbDxe: Do not report DXE failure on + Aarch64 silent builds (RH only) + +Notes about the RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] -> +RHEL-8.5/20210520-e1999b264f1f [edk2-stable202105] rebase: + +- no change + +Notes about the RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] -> +RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] rebase: + +- no change + +Notes about the RHEL-8.1/20190308-89910a39dcfd [edk2-stable201903] -> +RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] rebase: + +- We have to carry this downstream-only patch -- committed originally as + aaaedc1e2cfd -- indefinitely. + +- To avoid confusion, remove the tags from the commit message that had + been added by the downstream maintainer scripts, such as: Message-id, + Patchwork-id, O-Subject, Acked-by. These remain available on the + original downstream commit. The Bugzilla line is preserved, as it + doesn't relate to a specific posting, but to the problem. + +Bugzilla: 1714446 + +To suppress an error message on the silent build when ramfb is +not configured, change QemuRamfbDxe to return EFI_SUCCESS even +when it fails. +Some memory is wasted (driver stays resident without +any good use), but it is mostly harmless, as the memory +is released by the OS after ExitBootServices(). + +Suggested-by: Laszlo Ersek +Signed-off-by: Philippe Mathieu-Daude +(cherry picked from commit aaaedc1e2cfd55ef003fb1b5a37c73a196b26dc7) +Signed-off-by: Laszlo Ersek +(cherry picked from commit aa2b66b18a62d652bdbefae7b5732297294306ca) +(cherry picked from commit deb3451034326b75fd760aba47a5171493ff055e) +--- + OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf | 1 + + OvmfPkg/QemuRamfbDxe/QemuRamfb.c | 15 +++++++++++++++ + 2 files changed, 16 insertions(+) + +diff --git a/OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf b/OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf +index e3890b8c202f..6ffee5acb24c 100644 +--- a/OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf ++++ b/OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf +@@ -29,6 +29,7 @@ [LibraryClasses] + BaseLib + BaseMemoryLib + DebugLib ++ DebugPrintErrorLevelLib + DevicePathLib + FrameBufferBltLib + MemoryAllocationLib +diff --git a/OvmfPkg/QemuRamfbDxe/QemuRamfb.c b/OvmfPkg/QemuRamfbDxe/QemuRamfb.c +index f5113fbc78a6..0295986fe0f1 100644 +--- a/OvmfPkg/QemuRamfbDxe/QemuRamfb.c ++++ b/OvmfPkg/QemuRamfbDxe/QemuRamfb.c +@@ -13,6 +13,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -259,6 +260,20 @@ InitializeQemuRamfb ( + + Status = QemuFwCfgFindFile ("etc/ramfb", &mRamfbFwCfgItem, &FwCfgSize); + if (EFI_ERROR (Status)) { ++ #if defined (MDE_CPU_AARCH64) ++ // ++ // RHBZ#1714446 ++ // If no ramfb device was configured, this platform DXE driver should ++ // returns EFI_NOT_FOUND, so the DXE Core can unload it. However, even ++ // using a silent build, an error message is issued to the guest console. ++ // Since this confuse users, return success and stay resident. The wasted ++ // guest RAM still gets freed later after ExitBootServices(). ++ // ++ if (GetDebugPrintErrorLevel () == DEBUG_ERROR) { ++ return EFI_SUCCESS; ++ } ++ ++ #endif + return EFI_NOT_FOUND; + } + +-- +2.35.1 + diff --git a/0016-OvmfPkg-allow-exclusion-of-the-shell-from-the-firmwa.patch b/0016-OvmfPkg-allow-exclusion-of-the-shell-from-the-firmwa.patch deleted file mode 100644 index c392569..0000000 --- a/0016-OvmfPkg-allow-exclusion-of-the-shell-from-the-firmwa.patch +++ /dev/null @@ -1,172 +0,0 @@ -From e9d9e73c317b256c0bdc6530b82a6a625d7d54db Mon Sep 17 00:00:00 2001 -From: Laszlo Ersek -Date: Tue, 4 Nov 2014 23:02:53 +0100 -Subject: OvmfPkg: allow exclusion of the shell from the firmware image (RH - only) - -Notes about the RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] -> -RHEL-8.5/20210520-e1999b264f1f [edk2-stable202105] rebase: - -- No manual / explicit code change is necessary, because the newly - inherited OvmfPkg/AmdSev platform already has its own BUILD_SHELL - build-time macro (feature test flag), with default value FALSE -- from - upstream commit b261a30c900a ("OvmfPkg/AmdSev: add Grub Firmware Volume - Package", 2020-12-14). - -- Contextual differences from new upstream commits 2d8ca4f90eae ("OvmfPkg: - enable HttpDynamicCommand", 2020-10-01) and 5ab6a0e1c8e9 ("OvmfPkg: - introduce VirtioFsDxe", 2020-12-21) have been auto-resolved by - git-cherry-pick. - -- Remove obsolete commit message tags related to downstream patch - management: Message-id, Patchwork-id, O-Subject, Acked-by - (RHBZ#1846481). - -Notes about the RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] -> -RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] rebase: - -- context difference from upstream commit ec41733cfd10 ("OvmfPkg: add the - 'initrd' dynamic shell command", 2020-03-04) correctly auto-resolved - -Notes about the RHEL-8.1/20190308-89910a39dcfd [edk2-stable201903] -> -RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] rebase: - -- no change - -Notes about the RHEL-8.0/20180508-ee3198e672e2 -> -RHEL-8.1/20190308-89910a39dcfd rebase: - -- update the patch against the following upstream commits: - - 4b888334d234 ("OvmfPkg: Remove EdkShellBinPkg in FDF", 2018-11-19) - - 277a3958d93a ("OvmfPkg: Don't include TftpDynamicCommand in XCODE5 - tool chain", 2018-11-27) - -Notes about the RHEL-7.6/ovmf-20180508-2.gitee3198e672e2.el7 -> -RHEL-8.0/20180508-ee3198e672e2 rebase: - -- reorder the rebase changelog in the commit message so that it reads like - a blog: place more recent entries near the top -- no changes to the patch body - -Notes about the 20171011-92d07e48907f -> 20180508-ee3198e672e2 rebase: - -- no change - -Notes about the 20170228-c325e41585e3 -> 20171011-92d07e48907f rebase: - -- no changes - -Notes about the 20160608b-988715a -> 20170228-c325e41585e3 rebase: - -- no changes - -Bugzilla: 1147592 - -When '-D EXCLUDE_SHELL_FROM_FD' is passed to 'build', exclude the shell -binary from the firmware image. - -Peter Jones advised us that firmware vendors for physical systems disable -the memory-mapped, firmware image-contained UEFI shell in -SecureBoot-enabled builds. The reason being that the memory-mapped shell -can always load, it may have direct access to various hardware in the -system, and it can run UEFI shell scripts (which cannot be signed at all). - -Intended use of the new build option: - -- In-tree builds: don't pass '-D EXCLUDE_SHELL_FROM_FD'. The resultant - firmware image will contain a shell binary, independently of SecureBoot - enablement, which is flexible for interactive development. (Ie. no - change for in-tree builds.) - -- RPM builds: pass both '-D SECURE_BOOT_ENABLE' and - '-D EXCLUDE_SHELL_FROM_FD'. The resultant RPM will provide: - - - OVMF_CODE.fd: SecureBoot-enabled firmware, without builtin UEFI shell, - - - OVMF_VARS.fd: variable store template matching OVMF_CODE.fd, - - - UefiShell.iso: a bootable ISO image with the shell on it as default - boot loader. The shell binary will load when SecureBoot is turned off, - and won't load when SecureBoot is turned on (because it is not - signed). - - UefiShell.iso is the reason we're not excluding the shell from the DSC - files as well, only the FDF files -- when '-D EXCLUDE_SHELL_FROM_FD' - is specified, the shell binary needs to be built the same, only it - will be included in UefiShell.iso. - -Signed-off-by: Laszlo Ersek -(cherry picked from commit 9c391def70366cabae08e6008814299c3372fafd) -(cherry picked from commit d9dd9ee42937b2611fe37183cc9ec7f62d946933) -(cherry picked from commit 23df46ebbe7b09451d3a05034acd4d3a25e7177b) -(cherry picked from commit f0303f71d576c51b01c4ff961b429d0e0e707245) -(cherry picked from commit bbd64eb8658e9a33eab4227d9f4e51ad78d9f687) -(cherry picked from commit 8628ef1b8d675ebec39d83834abbe3c8c8c42cf4) -(cherry picked from commit 229c88dc3ded9baeaca8b87767dc5c41c05afd6e) -(cherry picked from commit c2812d7189dee06c780f05a5880eb421c359a687) ---- - OvmfPkg/OvmfPkgIa32.fdf | 2 ++ - OvmfPkg/OvmfPkgIa32X64.fdf | 2 ++ - OvmfPkg/OvmfPkgX64.fdf | 2 ++ - 3 files changed, 6 insertions(+) - -diff --git a/OvmfPkg/OvmfPkgIa32.fdf b/OvmfPkg/OvmfPkgIa32.fdf -index e3b1d74ce2..969524cf3b 100644 ---- a/OvmfPkg/OvmfPkgIa32.fdf -+++ b/OvmfPkg/OvmfPkgIa32.fdf -@@ -293,12 +293,14 @@ INF FatPkg/EnhancedFatDxe/Fat.inf - INF MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf - INF OvmfPkg/VirtioFsDxe/VirtioFsDxe.inf - -+!ifndef $(EXCLUDE_SHELL_FROM_FD) - !if $(TOOL_CHAIN_TAG) != "XCODE5" - INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf - INF ShellPkg/DynamicCommand/HttpDynamicCommand/HttpDynamicCommand.inf - INF OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf - !endif - INF ShellPkg/Application/Shell/Shell.inf -+!endif - - INF MdeModulePkg/Logo/LogoDxe.inf - -diff --git a/OvmfPkg/OvmfPkgIa32X64.fdf b/OvmfPkg/OvmfPkgIa32X64.fdf -index f7732382d4..36f078556f 100644 ---- a/OvmfPkg/OvmfPkgIa32X64.fdf -+++ b/OvmfPkg/OvmfPkgIa32X64.fdf -@@ -294,12 +294,14 @@ INF FatPkg/EnhancedFatDxe/Fat.inf - INF MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf - INF OvmfPkg/VirtioFsDxe/VirtioFsDxe.inf - -+!ifndef $(EXCLUDE_SHELL_FROM_FD) - !if $(TOOL_CHAIN_TAG) != "XCODE5" - INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf - INF ShellPkg/DynamicCommand/HttpDynamicCommand/HttpDynamicCommand.inf - INF OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf - !endif - INF ShellPkg/Application/Shell/Shell.inf -+!endif - - INF MdeModulePkg/Logo/LogoDxe.inf - -diff --git a/OvmfPkg/OvmfPkgX64.fdf b/OvmfPkg/OvmfPkgX64.fdf -index 137ed6bceb..a5900d8377 100644 ---- a/OvmfPkg/OvmfPkgX64.fdf -+++ b/OvmfPkg/OvmfPkgX64.fdf -@@ -306,12 +306,14 @@ INF FatPkg/EnhancedFatDxe/Fat.inf - INF MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf - INF OvmfPkg/VirtioFsDxe/VirtioFsDxe.inf - -+!ifndef $(EXCLUDE_SHELL_FROM_FD) - !if $(TOOL_CHAIN_TAG) != "XCODE5" - INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf - INF ShellPkg/DynamicCommand/HttpDynamicCommand/HttpDynamicCommand.inf - INF OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf - !endif - INF ShellPkg/Application/Shell/Shell.inf -+!endif - - INF MdeModulePkg/Logo/LogoDxe.inf - --- -2.27.0 - diff --git a/0016-OvmfPkg-silence-EFI_D_VERBOSE-0x00400000-in-NvmExpre.patch b/0016-OvmfPkg-silence-EFI_D_VERBOSE-0x00400000-in-NvmExpre.patch new file mode 100644 index 0000000..11b88c3 --- /dev/null +++ b/0016-OvmfPkg-silence-EFI_D_VERBOSE-0x00400000-in-NvmExpre.patch @@ -0,0 +1,131 @@ +From a365d5f65506c2b8c993089ad5b77dac7c6f4296 Mon Sep 17 00:00:00 2001 +From: Paolo Bonzini +Date: Tue, 21 Nov 2017 00:57:47 +0100 +Subject: [PATCH 16/21] OvmfPkg: silence EFI_D_VERBOSE (0x00400000) in + NvmExpressDxe (RH only) + +Notes about the RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] -> +RHEL-8.5/20210520-e1999b264f1f [edk2-stable202105] rebase: + +- Extend the DSC change to the new OvmfPkg/AmdSev platform, which has been + introduced upstream in commit 30d277ed7a82 ("OvmfPkg/Amdsev: Base commit + to build encrypted boot specific OVMF", 2020-12-14), for TianoCore#3077. + +- Remove obsolete commit message tags related to downstream patch + management: Message-id, Patchwork-id, O-Subject, Acked-by, From + (RHBZ#1846481). + +Notes about the RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] -> +RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] rebase: + +- no change + +Notes about the RHEL-8.1/20190308-89910a39dcfd [edk2-stable201903] -> +RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] rebase: + +- no change + +Notes about the RHEL-8.0/20180508-ee3198e672e2 -> +RHEL-8.1/20190308-89910a39dcfd rebase: + +- no change + +Notes about the RHEL-7.6/ovmf-20180508-2.gitee3198e672e2.el7 -> +RHEL-8.0/20180508-ee3198e672e2 rebase: + +- reorder the rebase changelog in the commit message so that it reads like + a blog: place more recent entries near the top +- no changes to the patch body + +Notes about the 20171011-92d07e48907f -> 20180508-ee3198e672e2 rebase: + +- no changes + +Bugzilla: 1488247 + +NvmExpressDxe logs all BlockIo read & write calls on the EFI_D_VERBOSE +level. + +Signed-off-by: Laszlo Ersek +Signed-off-by: Paolo Bonzini +(this patch was previously applied as commit 5f432837b9c60c2929b13dda1a1b488d5c3a6d2f) +(cherry picked from commit 33e00146eb878588ad1395d7b1ae38f401729da4) +(cherry picked from commit bd10cabcfcb1bc9a32b05062f4ee3792e27bc2d8) +(cherry picked from commit 5a27af700f49e00608f232f618dedd7bf5e9b3e6) +(cherry picked from commit 58bba429b9ec7b78109940ef945d0dc93f3cd958) +(cherry picked from commit b8d0ebded8c2cf5b266c807519e2d8ccfd66fee6) +(cherry picked from commit ed89844b47f46cfe911f1bf2bda40e537a908502) +--- + OvmfPkg/AmdSev/AmdSevX64.dsc | 5 ++++- + OvmfPkg/OvmfPkgIa32.dsc | 5 ++++- + OvmfPkg/OvmfPkgIa32X64.dsc | 5 ++++- + OvmfPkg/OvmfPkgX64.dsc | 5 ++++- + 4 files changed, 16 insertions(+), 4 deletions(-) + +diff --git a/OvmfPkg/AmdSev/AmdSevX64.dsc b/OvmfPkg/AmdSev/AmdSevX64.dsc +index ea4070eedbde..b9718ff03f7b 100644 +--- a/OvmfPkg/AmdSev/AmdSevX64.dsc ++++ b/OvmfPkg/AmdSev/AmdSevX64.dsc +@@ -709,7 +709,10 @@ [Components] + OvmfPkg/SataControllerDxe/SataControllerDxe.inf + MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf + MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf +- MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf ++ MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf { ++ ++ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F ++ } + MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf + MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf + MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf +diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc +index 37d1d4b9a5e0..4dfd33853162 100644 +--- a/OvmfPkg/OvmfPkgIa32.dsc ++++ b/OvmfPkg/OvmfPkgIa32.dsc +@@ -805,7 +805,10 @@ [Components] + OvmfPkg/SataControllerDxe/SataControllerDxe.inf + MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf + MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf +- MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf ++ MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf { ++ ++ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F ++ } + MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf + MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf + MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf +diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc +index 948e1a5ba59c..63721e5d177e 100644 +--- a/OvmfPkg/OvmfPkgIa32X64.dsc ++++ b/OvmfPkg/OvmfPkgIa32X64.dsc +@@ -819,7 +819,10 @@ [Components.X64] + OvmfPkg/SataControllerDxe/SataControllerDxe.inf + MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf + MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf +- MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf ++ MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf { ++ ++ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F ++ } + MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf + MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf + MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf +diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc +index 46799406b613..cac0391c0807 100644 +--- a/OvmfPkg/OvmfPkgX64.dsc ++++ b/OvmfPkg/OvmfPkgX64.dsc +@@ -816,7 +816,10 @@ [Components] + OvmfPkg/SataControllerDxe/SataControllerDxe.inf + MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf + MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf +- MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf ++ MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf { ++ ++ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F ++ } + MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf + MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf + MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf +-- +2.35.1 + diff --git a/0017-ArmPlatformPkg-introduce-fixed-PCD-for-early-hello-m.patch b/0017-ArmPlatformPkg-introduce-fixed-PCD-for-early-hello-m.patch deleted file mode 100644 index 590baed..0000000 --- a/0017-ArmPlatformPkg-introduce-fixed-PCD-for-early-hello-m.patch +++ /dev/null @@ -1,93 +0,0 @@ -From 6d968342cbfa40a8192cee7c685e1c794e6053df Mon Sep 17 00:00:00 2001 -From: Laszlo Ersek -Date: Wed, 14 Oct 2015 13:49:43 +0200 -Subject: ArmPlatformPkg: introduce fixed PCD for early hello message (RH only) - -Notes about the RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] -> -RHEL-8.5/20210520-e1999b264f1f [edk2-stable202105] rebase: - -- no change - -Notes about the RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] -> -RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] rebase: - -- no change - -Notes about the RHEL-8.1/20190308-89910a39dcfd [edk2-stable201903] -> -RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] rebase: - -- no change - -Notes about the RHEL-8.0/20180508-ee3198e672e2 -> -RHEL-8.1/20190308-89910a39dcfd rebase: - -- no change - -Notes about the RHEL-7.6/ovmf-20180508-2.gitee3198e672e2.el7 -> -RHEL-8.0/20180508-ee3198e672e2 rebase: - -- reorder the rebase changelog in the commit message so that it reads like - a blog: place more recent entries near the top -- no changes to the patch body - -Notes about the 20171011-92d07e48907f -> 20180508-ee3198e672e2 rebase: - -- no changes - -Notes about the 20170228-c325e41585e3 -> 20171011-92d07e48907f rebase: - -- no changes - -Notes about the 20160608b-988715a -> 20170228-c325e41585e3 rebase: - -- no changes - -Drew has proposed that ARM|AARCH64 platform firmware (especially virtual -machine firmware) print a reasonably early, simple hello message to the -serial port, regardless of debug mask settings. This should inform -interactive users, and provide some rough help in localizing boot -problems, even with restrictive debug masks. - -If a platform doesn't want this feature, it should stick with the default -empty string. - -RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1270279 -Downstream only: -. - -Suggested-by: Drew Jones -Contributed-under: TianoCore Contribution Agreement 1.0 -Signed-off-by: Laszlo Ersek -(cherry picked from commit 7ce97b06421434c82095f01a1753a8c9c546cc30) -(cherry picked from commit 20b1f1cbd0590aa71c6d99d35e23cf08e0707750) -(cherry picked from commit 6734b88cf7abcaf42632e3d2fc469b2169dd2f16) -(cherry picked from commit ef77da632559e9baa1c69869e4cbea377068ef27) -(cherry picked from commit 58755c51d3252312d80cbcb97928d71199c2f5e1) -(cherry picked from commit c3f07e323e76856f1b42ea7b8c598ba3201c28a2) -(cherry picked from commit 9f756c1ad83cc81f7d892cd036d59a2b567b02dc) -(cherry picked from commit c75aea7a738ac7fb944c0695a4bfffc3985afaa9) ---- - ArmPlatformPkg/ArmPlatformPkg.dec | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/ArmPlatformPkg/ArmPlatformPkg.dec b/ArmPlatformPkg/ArmPlatformPkg.dec -index 3a25ddcdc8..b2b58553c7 100644 ---- a/ArmPlatformPkg/ArmPlatformPkg.dec -+++ b/ArmPlatformPkg/ArmPlatformPkg.dec -@@ -121,6 +121,13 @@ - ## If set, this will swap settings for HDLCD RED_SELECT and BLUE_SELECT registers - gArmPlatformTokenSpaceGuid.PcdArmHdLcdSwapBlueRedSelect|FALSE|BOOLEAN|0x00000045 - -+ # -+ # Early hello message (ASCII string), printed to the serial port. -+ # If set to the empty string, nothing is printed. -+ # Otherwise, a trailing CRLF should be specified explicitly. -+ # -+ gArmPlatformTokenSpaceGuid.PcdEarlyHelloMessage|""|VOID*|0x00000100 -+ - [PcdsFixedAtBuild.common,PcdsDynamic.common] - ## PL031 RealTimeClock - gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x0|UINT32|0x00000024 --- -2.27.0 - diff --git a/0017-CryptoPkg-OpensslLib-list-RHEL8-specific-OpenSSL-fil.patch b/0017-CryptoPkg-OpensslLib-list-RHEL8-specific-OpenSSL-fil.patch new file mode 100644 index 0000000..0d76682 --- /dev/null +++ b/0017-CryptoPkg-OpensslLib-list-RHEL8-specific-OpenSSL-fil.patch @@ -0,0 +1,179 @@ +From 5a952392dd42f4f041f2c8e9e8aaf7df1d654639 Mon Sep 17 00:00:00 2001 +From: Laszlo Ersek +Date: Sat, 16 Nov 2019 17:11:27 +0100 +Subject: [PATCH 17/21] CryptoPkg/OpensslLib: list RHEL8-specific OpenSSL files + in the INFs (RH) + +Notes about the RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] -> +RHEL-8.5/20210520-e1999b264f1f [edk2-stable202105] rebase: + +- Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1938257 + +- Recreate the patch based on downstream commits: + + - 56c4bb81b311 ("CryptoPkg/OpensslLib: list RHEL8-specific OpenSSL files + in the INFs (RH)", 2020-06-05), + - e81751a1c303 ("CryptoPkg/OpensslLib: Upgrade OpenSSL to 1.1.1g", + 2020-11-23), + - 3e3fe5e62079 ("redhat: bump OpenSSL dist-git submodule to 1.1.1g+ / + RHEL-8.4", 2020-11-23). + + (1) At e81751a1c303, downstream edk2 was in sync with upstream edk2 + consuming OpenSSL 1.1.1g (upstream edk2 commit 8c30327debb2 + ("CryptoPkg/OpensslLib: Upgrade OpenSSL to 1.1.1g", 2020-07-25)). + + Since commit 8c30327debb2, upstream edk2 modified the OpensslLib INF + files, namely + + - CryptoPkg/Library/OpensslLib/OpensslLib.inf + - CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf + + in the following commits only: + + - be01087e0780 ("CryptoPkg/Library: Remove the redundant build + option", 2020-08-12), which did not affect the source file list at + all, + + - b5701a4c7a0f ("CryptoPkg: OpensslLib: Use RngLib to generate + entropy in rand_pool", 2020-09-18), which replaced some of the + *edk2-specific* "rand_pool_noise" source files with an RngLib + dependency. + + This means that the list of required, actual OpenSSL source files + has not changed in upstream edk2 since our downstream edk2 commit + e81751a1c303. + + (2) At commit 3e3fe5e62079 (the direct child of e81751a1c303), + downstream edk2's OpenSSL dependency was satisfied with RHEL-8 + OpenSSL at dist-git commit bdd048e929dc ("Two fixes that will be + shipped in RHEL-8.3.0.z", 2020-10-23). + + Since commit bdd048e929dc, RHEL-8 OpenSSL dist-git advanced + (fast-forwarded) to commit a75722161d20 ("Update to version 1.1.1k", + 2021-05-25), which is the current head of the rhel-8.5.0 branch. + (See also .) + + At both dist-git bdd048e929dc and dist-git a75722161d20, I built the + respective RHEL-8 OpenSSL *source* RPM, and prepped the respective + source tree, with "rpmbuild -bp". Subsequently I compared the + prepped source trees recursively. + + - The following files disappeared: + + - 29 backup files created by "patch", + + - the assembly generator perl script called + "ecp_nistz256-avx2.pl", which is not used during the build. + + - The following new files appeared: + + - 18 files directly or indirectly under the "test" subdirectory, + which are not used during the build, + + - 5 backup files created by "patch", + + - 2 DCL scripts used when building OpenSSL on OpenVMS. + + This means that the total list of RHEL-8 OpenSSL source files has + not changed in RHEL-8 OpenSSL dist-git since our downstream edk2 + commit 3e3fe5e62079. + + As a result, copy the "RHEL8-specific OpenSSL file list" sections + verbatim from the INF files, at downstream commit e81751a1c303. (I used + the "git checkout -p e81751a1c303 -- Library/OpensslLib/OpensslLib.inf + CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf" command.) + +Notes about the RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] -> +RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] rebase: + +- "OpensslLib.inf": + + - Automatic leading context refresh against upstream commit c72ca4666886 + ("CryptoPkg/OpensslLib: Add "sort" keyword to header file parsing + loop", 2020-03-10). + + - Manual trailing context refresh against upstream commit b49a6c8f80d9 + ("CryptoPkg/OpensslLib: improve INF file consistency", 2019-12-02). + +- "OpensslLibCrypto.inf": + + - Automatic leading context refresh against upstream commits + 8906f076de35 ("CryptoPkg/OpensslLib: Add missing header files in INF + file", 2019-08-16) and 9f4fbd56d430 ("CryptoPkg/OpensslLib: Update + process_files.pl to generate .h files", 2019-10-30). + +Notes about the RHEL-8.1/20190308-89910a39dcfd [edk2-stable201903] -> +RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] rebase: + +- new patch + +The downstream changes in RHEL8's OpenSSL package, for example in +"openssl-1.1.1-evp-kdf.patch", introduce new files, and even move some +preexistent code into those new files. In order to avoid undefined +references in link editing, we have to list the new files. + +Note: "process_files.pl" is not re-run at this time manually, because + +(a) "process_files.pl" would pollute the file list (and some of the + auto-generated header files) with RHEL8-specific FIPS artifacts, which + are explicitly unwanted in edk2, + +(b) The RHEL OpenSSL maintainer, Tomas Mraz, identified this specific set + of files in , + and will help with future changes too. + +Signed-off-by: Laszlo Ersek +(cherry picked from commit 57bd3f146590df8757865d8f2cdd1db3cf3f4d40) +(cherry picked from commit 56c4bb81b311dfcee6a34c81d3e4feeda7f88995) +--- + CryptoPkg/Library/OpensslLib/OpensslLib.inf | 11 +++++++++++ + CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf | 11 +++++++++++ + 2 files changed, 22 insertions(+) + +diff --git a/CryptoPkg/Library/OpensslLib/OpensslLib.inf b/CryptoPkg/Library/OpensslLib/OpensslLib.inf +index d84bde056af2..19913a4ac617 100644 +--- a/CryptoPkg/Library/OpensslLib/OpensslLib.inf ++++ b/CryptoPkg/Library/OpensslLib/OpensslLib.inf +@@ -570,6 +570,17 @@ [Sources] + $(OPENSSL_PATH)/ssl/statem/statem.h + $(OPENSSL_PATH)/ssl/statem/statem_local.h + # Autogenerated files list ends here ++# RHEL8-specific OpenSSL file list starts here ++ $(OPENSSL_PATH)/crypto/evp/kdf_lib.c ++ $(OPENSSL_PATH)/crypto/evp/pkey_kdf.c ++ $(OPENSSL_PATH)/crypto/kdf/kbkdf.c ++ $(OPENSSL_PATH)/crypto/kdf/kdf_local.h ++ $(OPENSSL_PATH)/crypto/kdf/kdf_util.c ++ $(OPENSSL_PATH)/crypto/kdf/krb5kdf.c ++ $(OPENSSL_PATH)/crypto/kdf/pbkdf2.c ++ $(OPENSSL_PATH)/crypto/kdf/sshkdf.c ++ $(OPENSSL_PATH)/crypto/kdf/sskdf.c ++# RHEL8-specific OpenSSL file list ends here + buildinf.h + ossl_store.c + rand_pool.c +diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf +index cdeed0d073eb..5057857e8d89 100644 +--- a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf ++++ b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf +@@ -519,6 +519,17 @@ [Sources] + $(OPENSSL_PATH)/crypto/x509v3/standard_exts.h + $(OPENSSL_PATH)/crypto/x509v3/v3_admis.h + # Autogenerated files list ends here ++# RHEL8-specific OpenSSL file list starts here ++ $(OPENSSL_PATH)/crypto/evp/kdf_lib.c ++ $(OPENSSL_PATH)/crypto/evp/pkey_kdf.c ++ $(OPENSSL_PATH)/crypto/kdf/kbkdf.c ++ $(OPENSSL_PATH)/crypto/kdf/kdf_local.h ++ $(OPENSSL_PATH)/crypto/kdf/kdf_util.c ++ $(OPENSSL_PATH)/crypto/kdf/krb5kdf.c ++ $(OPENSSL_PATH)/crypto/kdf/pbkdf2.c ++ $(OPENSSL_PATH)/crypto/kdf/sshkdf.c ++ $(OPENSSL_PATH)/crypto/kdf/sskdf.c ++# RHEL8-specific OpenSSL file list ends here + buildinf.h + ossl_store.c + rand_pool.c +-- +2.35.1 + diff --git a/0018-ArmPlatformPkg-PrePeiCore-write-early-hello-message-.patch b/0018-ArmPlatformPkg-PrePeiCore-write-early-hello-message-.patch deleted file mode 100644 index affbde1..0000000 --- a/0018-ArmPlatformPkg-PrePeiCore-write-early-hello-message-.patch +++ /dev/null @@ -1,145 +0,0 @@ -From e46d1e3f4c9b301acfa15fa4089661947e8742a4 Mon Sep 17 00:00:00 2001 -From: Laszlo Ersek -Date: Wed, 14 Oct 2015 13:59:20 +0200 -Subject: ArmPlatformPkg: PrePeiCore: write early hello message to the serial - port (RH) - -Notes about the RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] -> -RHEL-8.5/20210520-e1999b264f1f [edk2-stable202105] rebase: - -- no change - -Notes about the RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] -> -RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] rebase: - -- no change - -Notes about the RHEL-8.1/20190308-89910a39dcfd [edk2-stable201903] -> -RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] rebase: - -- no change - -Notes about the RHEL-8.0/20180508-ee3198e672e2 -> -RHEL-8.1/20190308-89910a39dcfd rebase: - -- no change - -Notes about the RHEL-7.6/ovmf-20180508-2.gitee3198e672e2.el7 -> -RHEL-8.0/20180508-ee3198e672e2 rebase: - -- reorder the rebase changelog in the commit message so that it reads like - a blog: place more recent entries near the top -- no changes to the patch body - -Notes about the 20171011-92d07e48907f -> 20180508-ee3198e672e2 rebase: - -- adapt to upstream commit 7e2a8dfe8a9a ("ArmPlatformPkg/PrePeiCore: seed - temporary stack before entering PEI core", 2017-11-09) -- conflict - resolution in "ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf" - -Notes about the 20170228-c325e41585e3 -> 20171011-92d07e48907f rebase: - -- no changes - -Notes about the 20160608b-988715a -> 20170228-c325e41585e3 rebase: - -- no changes - -The FixedPcdGetSize() macro expands to an integer constant, therefore an -optimizing compiler can eliminate the new code, if the platform DSC -doesn't override the empty string (size=1) default of -PcdEarlyHelloMessage. - -RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1270279 -Downstream only: -. - -Contributed-under: TianoCore Contribution Agreement 1.0 -Signed-off-by: Laszlo Ersek -(cherry picked from commit b16c4c505ce0e27305235533eac9236aa66f132e) -(cherry picked from commit 742e5bf6d5ce5a1e73879d6e5c0dd00feda7a9ac) -(cherry picked from commit 93d69eb9393cf05af90676253875c59c1bec67fd) -(cherry picked from commit 638594083b191f84f5d9333eb6147a31570f5a5a) -(cherry picked from commit f4b7aae411d88b2b83f85d20ef06a4032a57e7de) -(cherry picked from commit bb71490fdda3b38fa9f071d281b863f9b64363bf) -(cherry picked from commit 8d5a8827aabc67cb2a046697e1a750ca8d9cc453) -(cherry picked from commit 49fe5596cd79c94d903c4d506c563d642ccd69aa) ---- - ArmPlatformPkg/PrePeiCore/MainMPCore.c | 5 +++++ - ArmPlatformPkg/PrePeiCore/MainUniCore.c | 5 +++++ - ArmPlatformPkg/PrePeiCore/PrePeiCore.h | 1 + - ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf | 2 ++ - ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf | 2 ++ - 5 files changed, 15 insertions(+) - -diff --git a/ArmPlatformPkg/PrePeiCore/MainMPCore.c b/ArmPlatformPkg/PrePeiCore/MainMPCore.c -index 859f1adf20..cf9e65bb7c 100644 ---- a/ArmPlatformPkg/PrePeiCore/MainMPCore.c -+++ b/ArmPlatformPkg/PrePeiCore/MainMPCore.c -@@ -111,6 +111,11 @@ PrimaryMain ( - UINTN TemporaryRamBase; - UINTN TemporaryRamSize; - -+ if (FixedPcdGetSize (PcdEarlyHelloMessage) > 1) { -+ SerialPortWrite (FixedPcdGetPtr (PcdEarlyHelloMessage), -+ FixedPcdGetSize (PcdEarlyHelloMessage) - 1); -+ } -+ - CreatePpiList (&PpiListSize, &PpiList); - - // Enable the GIC Distributor -diff --git a/ArmPlatformPkg/PrePeiCore/MainUniCore.c b/ArmPlatformPkg/PrePeiCore/MainUniCore.c -index 220f9b5680..158cc34c77 100644 ---- a/ArmPlatformPkg/PrePeiCore/MainUniCore.c -+++ b/ArmPlatformPkg/PrePeiCore/MainUniCore.c -@@ -29,6 +29,11 @@ PrimaryMain ( - UINTN TemporaryRamBase; - UINTN TemporaryRamSize; - -+ if (FixedPcdGetSize (PcdEarlyHelloMessage) > 1) { -+ SerialPortWrite (FixedPcdGetPtr (PcdEarlyHelloMessage), -+ FixedPcdGetSize (PcdEarlyHelloMessage) - 1); -+ } -+ - CreatePpiList (&PpiListSize, &PpiList); - - // Adjust the Temporary Ram as the new Ppi List (Common + Platform Ppi Lists) is created at -diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCore.h b/ArmPlatformPkg/PrePeiCore/PrePeiCore.h -index 7b155a8a61..e9e283f9ec 100644 ---- a/ArmPlatformPkg/PrePeiCore/PrePeiCore.h -+++ b/ArmPlatformPkg/PrePeiCore/PrePeiCore.h -@@ -15,6 +15,7 @@ - #include - #include - #include -+#include - - #include - #include -diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf b/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf -index fb01dd1a11..a6681c1032 100644 ---- a/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf -+++ b/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf -@@ -69,6 +69,8 @@ - gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize - gArmPlatformTokenSpaceGuid.PcdCPUCoreSecondaryStackSize - -+ gArmPlatformTokenSpaceGuid.PcdEarlyHelloMessage -+ - gArmTokenSpaceGuid.PcdGicDistributorBase - gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase - gArmTokenSpaceGuid.PcdGicSgiIntId -diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf b/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf -index e9eb092d3a..c98dc82f0c 100644 ---- a/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf -+++ b/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf -@@ -67,4 +67,6 @@ - gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize - gArmPlatformTokenSpaceGuid.PcdCPUCoreSecondaryStackSize - -+ gArmPlatformTokenSpaceGuid.PcdEarlyHelloMessage -+ - gEfiMdeModulePkgTokenSpaceGuid.PcdInitValueInTempStack --- -2.27.0 - diff --git a/0018-OvmfPkg-QemuKernelLoaderFsDxe-suppress-error-on-no-k.patch b/0018-OvmfPkg-QemuKernelLoaderFsDxe-suppress-error-on-no-k.patch new file mode 100644 index 0000000..4cbbf3b --- /dev/null +++ b/0018-OvmfPkg-QemuKernelLoaderFsDxe-suppress-error-on-no-k.patch @@ -0,0 +1,84 @@ +From c36a16dad384129382088ef783d8e672ead2752a Mon Sep 17 00:00:00 2001 +From: Laszlo Ersek +Date: Wed, 24 Jun 2020 11:31:36 +0200 +Subject: [PATCH 18/21] OvmfPkg/QemuKernelLoaderFsDxe: suppress error on no + "-kernel" in silent aa64 build (RH) + +Notes about the RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] -> +RHEL-8.5/20210520-e1999b264f1f [edk2-stable202105] rebase: + +- Remove obsolete commit message tags related to downstream patch + management: Message-id, Patchwork-id, O-Subject, Acked-by, From, + RH-Acked-by, RH-Author (RHBZ#1846481). + +Bugzilla: 1844682 + +If the "-kernel" QEMU option is not used, then QemuKernelLoaderFsDxe +should return EFI_NOT_FOUND, so that the DXE Core can unload it. However, +the associated error message, logged by the DXE Core to the serial +console, is not desired in the silent edk2-aarch64 build, given that the +absence of "-kernel" is nothing out of the ordinary. Therefore, return +success and stay resident. The wasted guest RAM still gets freed after +ExitBootServices(). + +(Inspired by RHEL-8.1.0 commit aaaedc1e2cfd.) + +Signed-off-by: Laszlo Ersek +Signed-off-by: Miroslav Rezanina +(cherry picked from commit 9adcdf493ebbd11efb74e2905ab5f6c8996e096d) +--- + .../QemuKernelLoaderFsDxe.inf | 1 + + .../QemuKernelLoaderFsDxe.c | 18 ++++++++++++++++++ + 2 files changed, 19 insertions(+) + +diff --git a/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.inf b/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.inf +index 7b35adb8e034..e0331c6e2cbc 100644 +--- a/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.inf ++++ b/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.inf +@@ -28,6 +28,7 @@ [LibraryClasses] + BaseLib + BaseMemoryLib + DebugLib ++ DebugPrintErrorLevelLib + DevicePathLib + MemoryAllocationLib + QemuFwCfgLib +diff --git a/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.c b/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.c +index d4f3cd92255f..f007f8a6c233 100644 +--- a/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.c ++++ b/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.c +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -1081,6 +1082,23 @@ QemuKernelLoaderFsDxeEntrypoint ( + + if (KernelBlob->Data == NULL) { + Status = EFI_NOT_FOUND; ++ #if defined (MDE_CPU_AARCH64) ++ // ++ // RHBZ#1844682 ++ // ++ // If the "-kernel" QEMU option is not being used, this platform DXE driver ++ // should return EFI_NOT_FOUND, so that the DXE Core can unload it. ++ // However, the associated error message, logged by the DXE Core to the ++ // serial console, is not desired in the silent edk2-aarch64 build, given ++ // that the absence of "-kernel" is nothing out of the ordinary. Therefore, ++ // return success and stay resident. The wasted guest RAM still gets freed ++ // after ExitBootServices(). ++ // ++ if (GetDebugPrintErrorLevel () == DEBUG_ERROR) { ++ Status = EFI_SUCCESS; ++ } ++ ++ #endif + goto FreeBlobs; + } + +-- +2.35.1 + diff --git a/0019-ArmVirtPkg-set-early-hello-message-RH-only.patch b/0019-ArmVirtPkg-set-early-hello-message-RH-only.patch deleted file mode 100644 index 5e4f5c9..0000000 --- a/0019-ArmVirtPkg-set-early-hello-message-RH-only.patch +++ /dev/null @@ -1,82 +0,0 @@ -From b14a92fafb171ad4a47598076bd028e5cf33ac28 Mon Sep 17 00:00:00 2001 -From: Laszlo Ersek -Date: Wed, 14 Oct 2015 14:07:17 +0200 -Subject: ArmVirtPkg: set early hello message (RH only) - -Notes about the RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] -> -RHEL-8.5/20210520-e1999b264f1f [edk2-stable202105] rebase: - -- no change - -Notes about the RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] -> -RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] rebase: - -- context difference from upstream commit f5cb3767038e - ("ArmVirtPkg/ArmVirtQemu: add ResetSystem PEIM for upcoming TPM2 - support", 2020-03-04) automatically resolved correctly - -Notes about the RHEL-8.1/20190308-89910a39dcfd [edk2-stable201903] -> -RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] rebase: - -- no change - -Notes about the RHEL-8.0/20180508-ee3198e672e2 -> -RHEL-8.1/20190308-89910a39dcfd rebase: - -- resolve context conflict with upstream commit eaa1e98ae31d ("ArmVirtPkg: - don't set PcdCoreCount", 2019-02-13) - -Notes about the RHEL-7.6/ovmf-20180508-2.gitee3198e672e2.el7 -> -RHEL-8.0/20180508-ee3198e672e2 rebase: - -- reorder the rebase changelog in the commit message so that it reads like - a blog: place more recent entries near the top -- no changes to the patch body - -Notes about the 20171011-92d07e48907f -> 20180508-ee3198e672e2 rebase: - -- no changes - -Notes about the 20170228-c325e41585e3 -> 20171011-92d07e48907f rebase: - -- no changes - -Notes about the 20160608b-988715a -> 20170228-c325e41585e3 rebase: - -- no changes - -Print a friendly banner on QEMU, regardless of debug mask settings. - -RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1270279 -Downstream only: -. - -Contributed-under: TianoCore Contribution Agreement 1.0 -Signed-off-by: Laszlo Ersek -(cherry picked from commit 5d4a15b9019728b2d96322bc679099da49916925) -(cherry picked from commit 179df76dbb0d199bd905236e98775b4059c6502a) -(cherry picked from commit ce3f59d0710c24c162d5222bbf5cd7e36180c80c) -(cherry picked from commit c201a8e6ae28d75f7ba581828b533c3b26fa7f18) -(cherry picked from commit 2d4db6ec70e004cd9ac147615d17033bee5d3b18) -(cherry picked from commit fb2032bbea7e02c426855cf86a323556d493fd8a) -(cherry picked from commit ba73b99d5cb38f87c1a8f0936d515eaaefa3f04b) -(cherry picked from commit 72550e12ae469012a505bf5b98a6543a754028d3) ---- - ArmVirtPkg/ArmVirtQemu.dsc | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc -index 41a26c8d18..971422411d 100644 ---- a/ArmVirtPkg/ArmVirtQemu.dsc -+++ b/ArmVirtPkg/ArmVirtQemu.dsc -@@ -132,6 +132,7 @@ - gArmVirtTokenSpaceGuid.PcdTpm2SupportEnabled|$(TPM2_ENABLE) - - [PcdsFixedAtBuild.common] -+ gArmPlatformTokenSpaceGuid.PcdEarlyHelloMessage|"UEFI firmware starting.\r\n" - !if $(ARCH) == AARCH64 - gArmTokenSpaceGuid.PcdVFPEnabled|1 - !endif --- -2.27.0 - diff --git a/0019-SecurityPkg-Tcg2Dxe-suppress-error-on-no-swtpm-in-si.patch b/0019-SecurityPkg-Tcg2Dxe-suppress-error-on-no-swtpm-in-si.patch new file mode 100644 index 0000000..eb80d57 --- /dev/null +++ b/0019-SecurityPkg-Tcg2Dxe-suppress-error-on-no-swtpm-in-si.patch @@ -0,0 +1,82 @@ +From bee2e929ef342eafbe44f0471154da4270cac91d Mon Sep 17 00:00:00 2001 +From: Laszlo Ersek +Date: Wed, 24 Jun 2020 11:40:09 +0200 +Subject: [PATCH 19/21] SecurityPkg/Tcg2Dxe: suppress error on no swtpm in + silent aa64 build (RH) + +Notes about the RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] -> +RHEL-8.5/20210520-e1999b264f1f [edk2-stable202105] rebase: + +- Remove obsolete commit message tags related to downstream patch + management: Message-id, Patchwork-id, O-Subject, Acked-by, From, + RH-Acked-by, RH-Author (RHBZ#1846481). + +Bugzilla: 1844682 + +If swtpm / vTPM2 is not being used, Tcg2Dxe should return EFI_UNSUPPORTED, +so that the DXE Core can unload it. However, the associated error message, +logged by the DXE Core to the serial console, is not desired in the silent +edk2-aarch64 build, given that the absence of swtpm / vTPM2 is nothing out +of the ordinary. Therefore, return success and stay resident. The wasted +guest RAM still gets freed after ExitBootServices(). + +(Inspired by RHEL-8.1.0 commit aaaedc1e2cfd.) + +Signed-off-by: Laszlo Ersek +Signed-off-by: Miroslav Rezanina +(cherry picked from commit cbce29f7749477e271f9764fed82de94724af5df) +--- + SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf | 1 + + SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c | 17 +++++++++++++++++ + 2 files changed, 18 insertions(+) + +diff --git a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf +index 7dc7a2683d71..3bc88339311e 100644 +--- a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf ++++ b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf +@@ -55,6 +55,7 @@ [LibraryClasses] + UefiRuntimeServicesTableLib + BaseMemoryLib + DebugLib ++ DebugPrintErrorLevelLib + Tpm2CommandLib + PrintLib + UefiLib +diff --git a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c +index f6ea8b2bbf18..681eb7e08b98 100644 +--- a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c ++++ b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c +@@ -28,6 +28,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent + #include + + #include ++#include + #include + #include + #include +@@ -2691,6 +2692,22 @@ DriverEntry ( + CompareGuid (PcdGetPtr (PcdTpmInstanceGuid), &gEfiTpmDeviceInstanceTpm12Guid)) + { + DEBUG ((DEBUG_INFO, "No TPM2 instance required!\n")); ++#if defined (MDE_CPU_AARCH64) ++ // ++ // RHBZ#1844682 ++ // ++ // If swtpm / vTPM2 is not being used, this driver should return ++ // EFI_UNSUPPORTED, so that the DXE Core can unload it. However, the ++ // associated error message, logged by the DXE Core to the serial console, ++ // is not desired in the silent edk2-aarch64 build, given that the absence ++ // of swtpm / vTPM2 is nothing out of the ordinary. Therefore, return ++ // success and stay resident. The wasted guest RAM still gets freed after ++ // ExitBootServices(). ++ // ++ if (GetDebugPrintErrorLevel () == DEBUG_ERROR) { ++ return EFI_SUCCESS; ++ } ++#endif + return EFI_UNSUPPORTED; + } + +-- +2.35.1 + diff --git a/0020-OvmfPkg-Microvm-take-PcdResizeXterm-from-the-QEMU-co.patch b/0020-OvmfPkg-Microvm-take-PcdResizeXterm-from-the-QEMU-co.patch new file mode 100644 index 0000000..bf41586 --- /dev/null +++ b/0020-OvmfPkg-Microvm-take-PcdResizeXterm-from-the-QEMU-co.patch @@ -0,0 +1,25 @@ +From b0f070f4bf317f899de1b20a122ca124ad900d80 Mon Sep 17 00:00:00 2001 +From: Gerd Hoffmann +Date: Thu, 2 Dec 2021 14:06:18 +0100 +Subject: [PATCH 20/21] OvmfPkg/Microvm: take PcdResizeXterm from the QEMU + command line (RH only) + +--- + OvmfPkg/Microvm/MicrovmX64.dsc | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/OvmfPkg/Microvm/MicrovmX64.dsc b/OvmfPkg/Microvm/MicrovmX64.dsc +index 1ea43443ae97..073ff040a28a 100644 +--- a/OvmfPkg/Microvm/MicrovmX64.dsc ++++ b/OvmfPkg/Microvm/MicrovmX64.dsc +@@ -551,6 +551,7 @@ [PcdsDynamicDefault] + # only set when + # ($(SMM_REQUIRE) == FALSE) + gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0 ++ gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm|FALSE + + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0 + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|0 +-- +2.35.1 + diff --git a/0020-OvmfPkg-enable-DEBUG_VERBOSE-RHEL-only.patch b/0020-OvmfPkg-enable-DEBUG_VERBOSE-RHEL-only.patch deleted file mode 100644 index 51c0342..0000000 --- a/0020-OvmfPkg-enable-DEBUG_VERBOSE-RHEL-only.patch +++ /dev/null @@ -1,121 +0,0 @@ -From 1771ff7479664c05884dab5a34d128cf8b01086f Mon Sep 17 00:00:00 2001 -From: Paolo Bonzini -Date: Tue, 21 Nov 2017 00:57:45 +0100 -Subject: OvmfPkg: enable DEBUG_VERBOSE (RHEL only) - -Notes about the RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] -> -RHEL-8.5/20210520-e1999b264f1f [edk2-stable202105] rebase: - -- Extend the DSC change to the new OvmfPkg/AmdSev platform, which has been - introduced upstream in commit 30d277ed7a82 ("OvmfPkg/Amdsev: Base commit - to build encrypted boot specific OVMF", 2020-12-14), for TianoCore#3077. - -- Remove obsolete commit message tags related to downstream patch - management: Message-id, Patchwork-id, O-Subject, Acked-by, From - (RHBZ#1846481). - -Notes about the RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] -> -RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] rebase: - -- context difference from upstream commit 46bb81200742 ("OvmfPkg: Make - SOURCE_DEBUG_ENABLE actually need to be set to TRUE", 2019-10-22) - resolved automatically - -Notes about the RHEL-8.1/20190308-89910a39dcfd [edk2-stable201903] -> -RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] rebase: - -- no change - -Notes about the RHEL-8.0/20180508-ee3198e672e2 -> -RHEL-8.1/20190308-89910a39dcfd rebase: - -- no change - -Notes about the RHEL-7.6/ovmf-20180508-2.gitee3198e672e2.el7 -> -RHEL-8.0/20180508-ee3198e672e2 rebase: - -- reorder the rebase changelog in the commit message so that it reads like - a blog: place more recent entries near the top -- no changes to the patch body - -Notes about the 20171011-92d07e48907f -> 20180508-ee3198e672e2 rebase: - -- no changes - -Bugzilla: 1488247 - -Set the DEBUG_VERBOSE bit (0x00400000) in the log mask. We want detailed -debug messages, and code in OvmfPkg logs many messages on the -DEBUG_VERBOSE level. - -Signed-off-by: Laszlo Ersek -Signed-off-by: Paolo Bonzini -(this patch was previously applied as commit 78d3ed73172b5738e32d2b0bc03f7984b9584117) -(cherry picked from commit 7aeeaabc9871f657e65d2b99d81011b4964a1ce9) -(cherry picked from commit a0617a6be1a80966099ddceb010f89202a79ee76) -(cherry picked from commit 759bd3f591e2db699bdef4c7ea4e97c908e7f027) -(cherry picked from commit 7e6d5dc4078c64be6d55d8fc3317c59a91507a50) -(cherry picked from commit 3cb92f9ba18ac79911bd5258ff4f949cc617ae89) -(cherry picked from commit 5ecc18badaabe774d9d0806b027ab63a30c6a2d7) ---- - OvmfPkg/AmdSev/AmdSevX64.dsc | 2 +- - OvmfPkg/OvmfPkgIa32.dsc | 2 +- - OvmfPkg/OvmfPkgIa32X64.dsc | 2 +- - OvmfPkg/OvmfPkgX64.dsc | 2 +- - 4 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/OvmfPkg/AmdSev/AmdSevX64.dsc b/OvmfPkg/AmdSev/AmdSevX64.dsc -index 0a8cb7fd3b..6e8defe5c7 100644 ---- a/OvmfPkg/AmdSev/AmdSevX64.dsc -+++ b/OvmfPkg/AmdSev/AmdSevX64.dsc -@@ -486,7 +486,7 @@ - # DEBUG_VERBOSE 0x00400000 // Detailed debug messages that may - # // significantly impact boot performance - # DEBUG_ERROR 0x80000000 // Error -- gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F -+ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8040004F - - !if $(SOURCE_DEBUG_ENABLE) == TRUE - gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x17 -diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc -index e6df324c7c..52cd87f698 100644 ---- a/OvmfPkg/OvmfPkgIa32.dsc -+++ b/OvmfPkg/OvmfPkgIa32.dsc -@@ -534,7 +534,7 @@ - # DEBUG_VERBOSE 0x00400000 // Detailed debug messages that may - # // significantly impact boot performance - # DEBUG_ERROR 0x80000000 // Error -- gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F -+ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8040004F - - !if $(SOURCE_DEBUG_ENABLE) == TRUE - gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x17 -diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc -index 8104fe0218..214195a594 100644 ---- a/OvmfPkg/OvmfPkgIa32X64.dsc -+++ b/OvmfPkg/OvmfPkgIa32X64.dsc -@@ -538,7 +538,7 @@ - # DEBUG_VERBOSE 0x00400000 // Detailed debug messages that may - # // significantly impact boot performance - # DEBUG_ERROR 0x80000000 // Error -- gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F -+ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8040004F - - !if $(SOURCE_DEBUG_ENABLE) == TRUE - gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x17 -diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc -index 3c8b2649a8..02aad65b00 100644 ---- a/OvmfPkg/OvmfPkgX64.dsc -+++ b/OvmfPkg/OvmfPkgX64.dsc -@@ -540,7 +540,7 @@ - # DEBUG_VERBOSE 0x00400000 // Detailed debug messages that may - # // significantly impact boot performance - # DEBUG_ERROR 0x80000000 // Error -- gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F -+ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8040004F - - !if $(SOURCE_DEBUG_ENABLE) == TRUE - gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x17 --- -2.27.0 - diff --git a/0021-OvmfPkg-silence-DEBUG_VERBOSE-0x00400000-in-QemuVide.patch b/0021-OvmfPkg-silence-DEBUG_VERBOSE-0x00400000-in-QemuVide.patch deleted file mode 100644 index 4cea103..0000000 --- a/0021-OvmfPkg-silence-DEBUG_VERBOSE-0x00400000-in-QemuVide.patch +++ /dev/null @@ -1,173 +0,0 @@ -From 4b2a35ab1d659068d47baaf1dd5b2918ba8a2573 Mon Sep 17 00:00:00 2001 -From: Paolo Bonzini -Date: Tue, 21 Nov 2017 00:57:46 +0100 -Subject: OvmfPkg: silence DEBUG_VERBOSE (0x00400000) in - QemuVideoDxe/QemuRamfbDxe (RH) - -Notes about the RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] -> -RHEL-8.5/20210520-e1999b264f1f [edk2-stable202105] rebase: - -- Extend the DSC change to the new OvmfPkg/AmdSev platform, which has been - introduced upstream in commit 30d277ed7a82 ("OvmfPkg/Amdsev: Base commit - to build encrypted boot specific OVMF", 2020-12-14), for TianoCore#3077. - -- Remove obsolete commit message tags related to downstream patch - management: Message-id, Patchwork-id, O-Subject, Acked-by, From - (RHBZ#1846481). - -Notes about the RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] -> -RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] rebase: - -- no change - -Notes about the RHEL-8.1/20190308-89910a39dcfd [edk2-stable201903] -> -RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] rebase: - -- Due to upstream commit 4b04d9d73604 ("OvmfPkg: Don't build in - QemuVideoDxe when we have CSM", 2019-06-26), the contexts of - "QemuVideoDxe.inf" / "QemuRamfbDxe.inf" have changed in the DSC files. - Resolve the conflict manually. - -Notes about the RHEL-8.0/20180508-ee3198e672e2 -> -RHEL-8.1/20190308-89910a39dcfd rebase: - -- Upstream commit 1d25ff51af5c ("OvmfPkg: add QemuRamfbDxe", 2018-06-14) - introduced another GOP driver that consumes FrameBufferBltLib, and - thereby produces a large number of (mostly useless) debug messages at - the DEBUG_VERBOSE level. Extend the patch to suppress those messages in - both QemuVideoDxe and QemuRamfbDxe; update the subject accordingly. - QemuRamfbDxe itself doesn't log anything at the VERBOSE level (see also - the original commit message at the bottom of this downstream patch). - -Notes about the RHEL-7.6/ovmf-20180508-2.gitee3198e672e2.el7 -> -RHEL-8.0/20180508-ee3198e672e2 rebase: - -- reorder the rebase changelog in the commit message so that it reads like - a blog: place more recent entries near the top -- no changes to the patch body - -Notes about the 20171011-92d07e48907f -> 20180508-ee3198e672e2 rebase: - -- no changes - -Bugzilla: 1488247 - -In commit 5b2291f9567a ("OvmfPkg: QemuVideoDxe uses -MdeModulePkg/FrameBufferLib"), QemuVideoDxe was rebased to -FrameBufferBltLib. - -The FrameBufferBltLib instance added in commit b1ca386074bd -("MdeModulePkg: Add FrameBufferBltLib library instance") logs many -messages on the VERBOSE level; for example, a normal boot with OVMF can -produce 500+ "VideoFill" messages, dependent on the progress bar, when the -VERBOSE bit is set in PcdDebugPrintErrorLevel. - -QemuVideoDxe itself doesn't log anything at the VERBOSE level, so we lose -none of its messages this way. - -Signed-off-by: Laszlo Ersek -Signed-off-by: Paolo Bonzini -(this patch was previously applied as commit 9b0d031dee7e823f6717bab73e422fbc6f0a6c52) -(cherry picked from commit 9122d5f2e8d8d289064d1e1700cb61964d9931f3) -(cherry picked from commit 7eb3be1d4ccafc26c11fe5afb95cc12b250ce6f0) -(cherry picked from commit bd650684712fb840dbcda5d6eaee065bd9e91fa1) -(cherry picked from commit b06b87f8ffd4fed4ef7eacb13689a9b6d111f850) -(cherry picked from commit c8c3f893e7c3710afe45c46839e97954871536e4) -(cherry picked from commit 1355849ad97c1e4a5c430597a377165a5cc118f7) ---- - OvmfPkg/AmdSev/AmdSevX64.dsc | 10 ++++++++-- - OvmfPkg/OvmfPkgIa32.dsc | 10 ++++++++-- - OvmfPkg/OvmfPkgIa32X64.dsc | 10 ++++++++-- - OvmfPkg/OvmfPkgX64.dsc | 10 ++++++++-- - 4 files changed, 32 insertions(+), 8 deletions(-) - -diff --git a/OvmfPkg/AmdSev/AmdSevX64.dsc b/OvmfPkg/AmdSev/AmdSevX64.dsc -index 6e8defe5c7..568ca369e6 100644 ---- a/OvmfPkg/AmdSev/AmdSevX64.dsc -+++ b/OvmfPkg/AmdSev/AmdSevX64.dsc -@@ -747,8 +747,14 @@ - MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf - MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf - -- OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf -- OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf -+ OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf { -+ -+ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F -+ } -+ OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf { -+ -+ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F -+ } - OvmfPkg/VirtioGpuDxe/VirtioGpu.inf - - # -diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc -index 52cd87f698..52fd057c90 100644 ---- a/OvmfPkg/OvmfPkgIa32.dsc -+++ b/OvmfPkg/OvmfPkgIa32.dsc -@@ -842,9 +842,15 @@ - MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf - - !ifndef $(CSM_ENABLE) -- OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf -+ OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf { -+ -+ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F -+ } - !endif -- OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf -+ OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf { -+ -+ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F -+ } - OvmfPkg/VirtioGpuDxe/VirtioGpu.inf - - # -diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc -index 214195a594..653849cc7a 100644 ---- a/OvmfPkg/OvmfPkgIa32X64.dsc -+++ b/OvmfPkg/OvmfPkgIa32X64.dsc -@@ -856,9 +856,15 @@ - MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf - - !ifndef $(CSM_ENABLE) -- OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf -+ OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf { -+ -+ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F -+ } - !endif -- OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf -+ OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf { -+ -+ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F -+ } - OvmfPkg/VirtioGpuDxe/VirtioGpu.inf - - # -diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc -index 02aad65b00..5275f2502b 100644 ---- a/OvmfPkg/OvmfPkgX64.dsc -+++ b/OvmfPkg/OvmfPkgX64.dsc -@@ -854,9 +854,15 @@ - MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf - - !ifndef $(CSM_ENABLE) -- OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf -+ OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf { -+ -+ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F -+ } - !endif -- OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf -+ OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf { -+ -+ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F -+ } - OvmfPkg/VirtioGpuDxe/VirtioGpu.inf - - # --- -2.27.0 - diff --git a/0021-Tweak-the-tools_def-to-support-cross-compiling.patch b/0021-Tweak-the-tools_def-to-support-cross-compiling.patch new file mode 100644 index 0000000..5c1ee18 --- /dev/null +++ b/0021-Tweak-the-tools_def-to-support-cross-compiling.patch @@ -0,0 +1,78 @@ +From 7aa9291cca4a5d3e499081741ae1bff1c2ebe2e9 Mon Sep 17 00:00:00 2001 +From: Paolo Bonzini +Date: Thu, 16 Aug 2018 15:45:47 -0400 +Subject: [PATCH 21/21] Tweak the tools_def to support cross-compiling. + +These files are meant for customization, so this is not upstream. + +Signed-off-by: Paolo Bonzini +Signed-off-by: Cole Robinson +--- + BaseTools/Conf/tools_def.template | 44 +++++++++++++++---------------- + 1 file changed, 22 insertions(+), 22 deletions(-) + +diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template +index 9c310cf23d25..3189a3958b53 100755 +--- a/BaseTools/Conf/tools_def.template ++++ b/BaseTools/Conf/tools_def.template +@@ -2299,17 +2299,17 @@ RELEASE_GCC49_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20 + ################## + # GCC5 IA32 definitions + ################## +-*_GCC5_IA32_OBJCOPY_PATH = DEF(GCC5_IA32_PREFIX)objcopy +-*_GCC5_IA32_CC_PATH = DEF(GCC5_IA32_PREFIX)gcc +-*_GCC5_IA32_SLINK_PATH = DEF(GCC5_IA32_PREFIX)gcc-ar +-*_GCC5_IA32_DLINK_PATH = DEF(GCC5_IA32_PREFIX)gcc +-*_GCC5_IA32_ASLDLINK_PATH = DEF(GCC5_IA32_PREFIX)gcc +-*_GCC5_IA32_ASM_PATH = DEF(GCC5_IA32_PREFIX)gcc +-*_GCC5_IA32_PP_PATH = DEF(GCC5_IA32_PREFIX)gcc +-*_GCC5_IA32_VFRPP_PATH = DEF(GCC5_IA32_PREFIX)gcc +-*_GCC5_IA32_ASLCC_PATH = DEF(GCC5_IA32_PREFIX)gcc +-*_GCC5_IA32_ASLPP_PATH = DEF(GCC5_IA32_PREFIX)gcc +-*_GCC5_IA32_RC_PATH = DEF(GCC5_IA32_PREFIX)objcopy ++*_GCC5_IA32_OBJCOPY_PATH = ENV(GCC5_IA32_PREFIX)objcopy ++*_GCC5_IA32_CC_PATH = ENV(GCC5_IA32_PREFIX)gcc ++*_GCC5_IA32_SLINK_PATH = ENV(GCC5_IA32_PREFIX)gcc-ar ++*_GCC5_IA32_DLINK_PATH = ENV(GCC5_IA32_PREFIX)gcc ++*_GCC5_IA32_ASLDLINK_PATH = ENV(GCC5_IA32_PREFIX)gcc ++*_GCC5_IA32_ASM_PATH = ENV(GCC5_IA32_PREFIX)gcc ++*_GCC5_IA32_PP_PATH = ENV(GCC5_IA32_PREFIX)gcc ++*_GCC5_IA32_VFRPP_PATH = ENV(GCC5_IA32_PREFIX)gcc ++*_GCC5_IA32_ASLCC_PATH = ENV(GCC5_IA32_PREFIX)gcc ++*_GCC5_IA32_ASLPP_PATH = ENV(GCC5_IA32_PREFIX)gcc ++*_GCC5_IA32_RC_PATH = ENV(GCC5_IA32_PREFIX)objcopy + + *_GCC5_IA32_ASLCC_FLAGS = DEF(GCC5_ASLCC_FLAGS) -m32 + *_GCC5_IA32_ASLDLINK_FLAGS = DEF(GCC5_IA32_X64_ASLDLINK_FLAGS) -Wl,-m,elf_i386 -no-pie +@@ -2331,17 +2331,17 @@ RELEASE_GCC5_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl, + ################## + # GCC5 X64 definitions + ################## +-*_GCC5_X64_OBJCOPY_PATH = DEF(GCC5_X64_PREFIX)objcopy +-*_GCC5_X64_CC_PATH = DEF(GCC5_X64_PREFIX)gcc +-*_GCC5_X64_SLINK_PATH = DEF(GCC5_X64_PREFIX)gcc-ar +-*_GCC5_X64_DLINK_PATH = DEF(GCC5_X64_PREFIX)gcc +-*_GCC5_X64_ASLDLINK_PATH = DEF(GCC5_X64_PREFIX)gcc +-*_GCC5_X64_ASM_PATH = DEF(GCC5_X64_PREFIX)gcc +-*_GCC5_X64_PP_PATH = DEF(GCC5_X64_PREFIX)gcc +-*_GCC5_X64_VFRPP_PATH = DEF(GCC5_X64_PREFIX)gcc +-*_GCC5_X64_ASLCC_PATH = DEF(GCC5_X64_PREFIX)gcc +-*_GCC5_X64_ASLPP_PATH = DEF(GCC5_X64_PREFIX)gcc +-*_GCC5_X64_RC_PATH = DEF(GCC5_X64_PREFIX)objcopy ++*_GCC5_X64_OBJCOPY_PATH = ENV(GCC5_X64_PREFIX)objcopy ++*_GCC5_X64_CC_PATH = ENV(GCC5_X64_PREFIX)gcc ++*_GCC5_X64_SLINK_PATH = ENV(GCC5_X64_PREFIX)gcc-ar ++*_GCC5_X64_DLINK_PATH = ENV(GCC5_X64_PREFIX)gcc ++*_GCC5_X64_ASLDLINK_PATH = ENV(GCC5_X64_PREFIX)gcc ++*_GCC5_X64_ASM_PATH = ENV(GCC5_X64_PREFIX)gcc ++*_GCC5_X64_PP_PATH = ENV(GCC5_X64_PREFIX)gcc ++*_GCC5_X64_VFRPP_PATH = ENV(GCC5_X64_PREFIX)gcc ++*_GCC5_X64_ASLCC_PATH = ENV(GCC5_X64_PREFIX)gcc ++*_GCC5_X64_ASLPP_PATH = ENV(GCC5_X64_PREFIX)gcc ++*_GCC5_X64_RC_PATH = ENV(GCC5_X64_PREFIX)objcopy + + *_GCC5_X64_ASLCC_FLAGS = DEF(GCC5_ASLCC_FLAGS) -m64 + *_GCC5_X64_ASLDLINK_FLAGS = DEF(GCC5_IA32_X64_ASLDLINK_FLAGS) -Wl,-m,elf_x86_64 +-- +2.35.1 + diff --git a/0022-ArmVirtPkg-silence-DEBUG_VERBOSE-0x00400000-in-QemuR.patch b/0022-ArmVirtPkg-silence-DEBUG_VERBOSE-0x00400000-in-QemuR.patch deleted file mode 100644 index 18d30be..0000000 --- a/0022-ArmVirtPkg-silence-DEBUG_VERBOSE-0x00400000-in-QemuR.patch +++ /dev/null @@ -1,97 +0,0 @@ -From 251653ccf48a973481bb8c90161cccde50c78ad5 Mon Sep 17 00:00:00 2001 -From: Laszlo Ersek -Date: Wed, 27 Jan 2016 03:05:18 +0100 -Subject: ArmVirtPkg: silence DEBUG_VERBOSE (0x00400000) in QemuRamfbDxe (RH - only) - -Notes about the RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] -> -RHEL-8.5/20210520-e1999b264f1f [edk2-stable202105] rebase: - -- no change - -Notes about the RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] -> -RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] rebase: - -- no change - -Notes about the RHEL-8.1/20190308-89910a39dcfd [edk2-stable201903] -> -RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] rebase: - -- The previous version of this patch (downstream commit 76b4ac28e975) - caused a regression (RHBZ#1714446), which was fixed up in downstream - commit 5a216abaa737 ("ArmVirtPkg: silence DEBUG_VERBOSE masking - ~0x00400000 in QemuRamfbDxe (RH only)", 2019-08-05). - - Squash the fixup into the original patch. Fuse the commit messages. - (Acked-by tags are not preserved, lest we confuse ourselves while - reviewing this rebase.) - -Notes about the RHEL-8.0/20180508-ee3198e672e2 -> -RHEL-8.1/20190308-89910a39dcfd rebase: - -- new patch, due to upstream commit c64688f36a8b ("ArmVirtPkg: add - QemuRamfbDxe", 2018-06-14) - -QemuRamfbDxe uses FrameBufferLib. The FrameBufferBltLib instance added in -commit b1ca386074bd ("MdeModulePkg: Add FrameBufferBltLib library -instance") logs many messages on the VERBOSE level; for example, a normal -boot with ArmVirtQemu[Kernel] can produce 500+ "VideoFill" messages, -dependent on the progress bar, when the VERBOSE bit is set in -PcdDebugPrintErrorLevel. - -Clear the VERBOSE bit without touching other bits -- those other bits -differ between the "silent" and "verbose" builds, so we can't set them as -constants. - -QemuRamfbDxe itself doesn't log anything at the VERBOSE level, so we lose -none of its messages, with the VERBOSE bit clear. - -Signed-off-by: Laszlo Ersek -(cherry picked from commit 76b4ac28e975bd63c25db903a1d42c47b38cc756) -Reported-by: Andrew Jones -Suggested-by: Laszlo Ersek -Signed-off-by: Philippe Mathieu-Daude -(cherry picked from commit 5a216abaa737195327235e37563b18a6bf2a74dc) -Signed-off-by: Laszlo Ersek -(cherry picked from commit e5b8152bced2364a1ded0926dbba4d65e23e3f84) -(cherry picked from commit e7f57f154439c1c18ea5030b01f8d7bc492698b2) ---- - ArmVirtPkg/ArmVirtQemu.dsc | 5 ++++- - ArmVirtPkg/ArmVirtQemuKernel.dsc | 5 ++++- - 2 files changed, 8 insertions(+), 2 deletions(-) - -diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc -index 971422411d..d2a2fdac8e 100644 ---- a/ArmVirtPkg/ArmVirtQemu.dsc -+++ b/ArmVirtPkg/ArmVirtQemu.dsc -@@ -504,7 +504,10 @@ - # - # Video support - # -- OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf -+ OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf { -+ -+ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|($(DEBUG_PRINT_ERROR_LEVEL)) & 0xFFBFFFFF -+ } - OvmfPkg/VirtioGpuDxe/VirtioGpu.inf - OvmfPkg/PlatformDxe/Platform.inf - -diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc -index f598ac6a85..7e50ce8b3b 100644 ---- a/ArmVirtPkg/ArmVirtQemuKernel.dsc -+++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc -@@ -434,7 +434,10 @@ - # - # Video support - # -- OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf -+ OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf { -+ -+ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|($(DEBUG_PRINT_ERROR_LEVEL)) & 0xFFBFFFFF -+ } - OvmfPkg/VirtioGpuDxe/VirtioGpu.inf - OvmfPkg/PlatformDxe/Platform.inf - --- -2.27.0 - diff --git a/0023-OvmfPkg-QemuRamfbDxe-Do-not-report-DXE-failure-on-Aa.patch b/0023-OvmfPkg-QemuRamfbDxe-Do-not-report-DXE-failure-on-Aa.patch deleted file mode 100644 index e75701e..0000000 --- a/0023-OvmfPkg-QemuRamfbDxe-Do-not-report-DXE-failure-on-Aa.patch +++ /dev/null @@ -1,95 +0,0 @@ -From bacf42ebf768aebb8c2b36fb52d154daf19c0c74 Mon Sep 17 00:00:00 2001 -From: Philippe Mathieu-Daude -Date: Thu, 1 Aug 2019 20:43:48 +0200 -Subject: OvmfPkg: QemuRamfbDxe: Do not report DXE failure on Aarch64 silent - builds (RH only) - -Notes about the RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] -> -RHEL-8.5/20210520-e1999b264f1f [edk2-stable202105] rebase: - -- no change - -Notes about the RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] -> -RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] rebase: - -- no change - -Notes about the RHEL-8.1/20190308-89910a39dcfd [edk2-stable201903] -> -RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] rebase: - -- We have to carry this downstream-only patch -- committed originally as - aaaedc1e2cfd -- indefinitely. - -- To avoid confusion, remove the tags from the commit message that had - been added by the downstream maintainer scripts, such as: Message-id, - Patchwork-id, O-Subject, Acked-by. These remain available on the - original downstream commit. The Bugzilla line is preserved, as it - doesn't relate to a specific posting, but to the problem. - -Bugzilla: 1714446 - -To suppress an error message on the silent build when ramfb is -not configured, change QemuRamfbDxe to return EFI_SUCCESS even -when it fails. -Some memory is wasted (driver stays resident without -any good use), but it is mostly harmless, as the memory -is released by the OS after ExitBootServices(). - -Suggested-by: Laszlo Ersek -Signed-off-by: Philippe Mathieu-Daude -(cherry picked from commit aaaedc1e2cfd55ef003fb1b5a37c73a196b26dc7) -Signed-off-by: Laszlo Ersek -(cherry picked from commit aa2b66b18a62d652bdbefae7b5732297294306ca) -(cherry picked from commit deb3451034326b75fd760aba47a5171493ff055e) ---- - OvmfPkg/QemuRamfbDxe/QemuRamfb.c | 14 ++++++++++++++ - OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf | 1 + - 2 files changed, 15 insertions(+) - -diff --git a/OvmfPkg/QemuRamfbDxe/QemuRamfb.c b/OvmfPkg/QemuRamfbDxe/QemuRamfb.c -index 0d49d8bbab..dbf9bcbe16 100644 ---- a/OvmfPkg/QemuRamfbDxe/QemuRamfb.c -+++ b/OvmfPkg/QemuRamfbDxe/QemuRamfb.c -@@ -13,6 +13,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -242,6 +243,19 @@ InitializeQemuRamfb ( - - Status = QemuFwCfgFindFile ("etc/ramfb", &mRamfbFwCfgItem, &FwCfgSize); - if (EFI_ERROR (Status)) { -+#if defined (MDE_CPU_AARCH64) -+ // -+ // RHBZ#1714446 -+ // If no ramfb device was configured, this platform DXE driver should -+ // returns EFI_NOT_FOUND, so the DXE Core can unload it. However, even -+ // using a silent build, an error message is issued to the guest console. -+ // Since this confuse users, return success and stay resident. The wasted -+ // guest RAM still gets freed later after ExitBootServices(). -+ // -+ if (GetDebugPrintErrorLevel () == DEBUG_ERROR) { -+ return EFI_SUCCESS; -+ } -+#endif - return EFI_NOT_FOUND; - } - if (FwCfgSize != sizeof (RAMFB_CONFIG)) { -diff --git a/OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf b/OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf -index e3890b8c20..6ffee5acb2 100644 ---- a/OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf -+++ b/OvmfPkg/QemuRamfbDxe/QemuRamfbDxe.inf -@@ -29,6 +29,7 @@ - BaseLib - BaseMemoryLib - DebugLib -+ DebugPrintErrorLevelLib - DevicePathLib - FrameBufferBltLib - MemoryAllocationLib --- -2.27.0 - diff --git a/0024-OvmfPkg-silence-EFI_D_VERBOSE-0x00400000-in-NvmExpre.patch b/0024-OvmfPkg-silence-EFI_D_VERBOSE-0x00400000-in-NvmExpre.patch deleted file mode 100644 index d08e6fd..0000000 --- a/0024-OvmfPkg-silence-EFI_D_VERBOSE-0x00400000-in-NvmExpre.patch +++ /dev/null @@ -1,131 +0,0 @@ -From 41c61737a6ead56c36edabd1b2e685a04c2e81c6 Mon Sep 17 00:00:00 2001 -From: Paolo Bonzini -Date: Tue, 21 Nov 2017 00:57:47 +0100 -Subject: OvmfPkg: silence EFI_D_VERBOSE (0x00400000) in NvmExpressDxe (RH - only) - -Notes about the RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] -> -RHEL-8.5/20210520-e1999b264f1f [edk2-stable202105] rebase: - -- Extend the DSC change to the new OvmfPkg/AmdSev platform, which has been - introduced upstream in commit 30d277ed7a82 ("OvmfPkg/Amdsev: Base commit - to build encrypted boot specific OVMF", 2020-12-14), for TianoCore#3077. - -- Remove obsolete commit message tags related to downstream patch - management: Message-id, Patchwork-id, O-Subject, Acked-by, From - (RHBZ#1846481). - -Notes about the RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] -> -RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] rebase: - -- no change - -Notes about the RHEL-8.1/20190308-89910a39dcfd [edk2-stable201903] -> -RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] rebase: - -- no change - -Notes about the RHEL-8.0/20180508-ee3198e672e2 -> -RHEL-8.1/20190308-89910a39dcfd rebase: - -- no change - -Notes about the RHEL-7.6/ovmf-20180508-2.gitee3198e672e2.el7 -> -RHEL-8.0/20180508-ee3198e672e2 rebase: - -- reorder the rebase changelog in the commit message so that it reads like - a blog: place more recent entries near the top -- no changes to the patch body - -Notes about the 20171011-92d07e48907f -> 20180508-ee3198e672e2 rebase: - -- no changes - -Bugzilla: 1488247 - -NvmExpressDxe logs all BlockIo read & write calls on the EFI_D_VERBOSE -level. - -Signed-off-by: Laszlo Ersek -Signed-off-by: Paolo Bonzini -(this patch was previously applied as commit 5f432837b9c60c2929b13dda1a1b488d5c3a6d2f) -(cherry picked from commit 33e00146eb878588ad1395d7b1ae38f401729da4) -(cherry picked from commit bd10cabcfcb1bc9a32b05062f4ee3792e27bc2d8) -(cherry picked from commit 5a27af700f49e00608f232f618dedd7bf5e9b3e6) -(cherry picked from commit 58bba429b9ec7b78109940ef945d0dc93f3cd958) -(cherry picked from commit b8d0ebded8c2cf5b266c807519e2d8ccfd66fee6) -(cherry picked from commit ed89844b47f46cfe911f1bf2bda40e537a908502) ---- - OvmfPkg/AmdSev/AmdSevX64.dsc | 5 ++++- - OvmfPkg/OvmfPkgIa32.dsc | 5 ++++- - OvmfPkg/OvmfPkgIa32X64.dsc | 5 ++++- - OvmfPkg/OvmfPkgX64.dsc | 5 ++++- - 4 files changed, 16 insertions(+), 4 deletions(-) - -diff --git a/OvmfPkg/AmdSev/AmdSevX64.dsc b/OvmfPkg/AmdSev/AmdSevX64.dsc -index 568ca369e6..fb00b12f8c 100644 ---- a/OvmfPkg/AmdSev/AmdSevX64.dsc -+++ b/OvmfPkg/AmdSev/AmdSevX64.dsc -@@ -741,7 +741,10 @@ - OvmfPkg/SataControllerDxe/SataControllerDxe.inf - MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf - MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf -- MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf -+ MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf { -+ -+ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F -+ } - MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf - MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf - MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf -diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc -index 52fd057c90..119267e3c8 100644 ---- a/OvmfPkg/OvmfPkgIa32.dsc -+++ b/OvmfPkg/OvmfPkgIa32.dsc -@@ -835,7 +835,10 @@ - OvmfPkg/SataControllerDxe/SataControllerDxe.inf - MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf - MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf -- MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf -+ MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf { -+ -+ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F -+ } - MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf - MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf - MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf -diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc -index 653849cc7a..166c9f1fef 100644 ---- a/OvmfPkg/OvmfPkgIa32X64.dsc -+++ b/OvmfPkg/OvmfPkgIa32X64.dsc -@@ -849,7 +849,10 @@ - OvmfPkg/SataControllerDxe/SataControllerDxe.inf - MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf - MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf -- MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf -+ MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf { -+ -+ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F -+ } - MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf - MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf - MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf -diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc -index 5275f2502b..19d0944a72 100644 ---- a/OvmfPkg/OvmfPkgX64.dsc -+++ b/OvmfPkg/OvmfPkgX64.dsc -@@ -847,7 +847,10 @@ - OvmfPkg/SataControllerDxe/SataControllerDxe.inf - MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf - MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf -- MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf -+ MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf { -+ -+ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F -+ } - MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf - MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf - MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf --- -2.27.0 - diff --git a/0025-CryptoPkg-OpensslLib-list-RHEL8-specific-OpenSSL-fil.patch b/0025-CryptoPkg-OpensslLib-list-RHEL8-specific-OpenSSL-fil.patch deleted file mode 100644 index 9310962..0000000 --- a/0025-CryptoPkg-OpensslLib-list-RHEL8-specific-OpenSSL-fil.patch +++ /dev/null @@ -1,179 +0,0 @@ -From 7e6817e96a15f9ce32f0c9cf6326bb682672724c Mon Sep 17 00:00:00 2001 -From: Laszlo Ersek -Date: Sat, 16 Nov 2019 17:11:27 +0100 -Subject: CryptoPkg/OpensslLib: list RHEL8-specific OpenSSL files in the INFs - (RH) - -Notes about the RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] -> -RHEL-8.5/20210520-e1999b264f1f [edk2-stable202105] rebase: - -- Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1938257 - -- Recreate the patch based on downstream commits: - - - 56c4bb81b311 ("CryptoPkg/OpensslLib: list RHEL8-specific OpenSSL files - in the INFs (RH)", 2020-06-05), - - e81751a1c303 ("CryptoPkg/OpensslLib: Upgrade OpenSSL to 1.1.1g", - 2020-11-23), - - 3e3fe5e62079 ("redhat: bump OpenSSL dist-git submodule to 1.1.1g+ / - RHEL-8.4", 2020-11-23). - - (1) At e81751a1c303, downstream edk2 was in sync with upstream edk2 - consuming OpenSSL 1.1.1g (upstream edk2 commit 8c30327debb2 - ("CryptoPkg/OpensslLib: Upgrade OpenSSL to 1.1.1g", 2020-07-25)). - - Since commit 8c30327debb2, upstream edk2 modified the OpensslLib INF - files, namely - - - CryptoPkg/Library/OpensslLib/OpensslLib.inf - - CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf - - in the following commits only: - - - be01087e0780 ("CryptoPkg/Library: Remove the redundant build - option", 2020-08-12), which did not affect the source file list at - all, - - - b5701a4c7a0f ("CryptoPkg: OpensslLib: Use RngLib to generate - entropy in rand_pool", 2020-09-18), which replaced some of the - *edk2-specific* "rand_pool_noise" source files with an RngLib - dependency. - - This means that the list of required, actual OpenSSL source files - has not changed in upstream edk2 since our downstream edk2 commit - e81751a1c303. - - (2) At commit 3e3fe5e62079 (the direct child of e81751a1c303), - downstream edk2's OpenSSL dependency was satisfied with RHEL-8 - OpenSSL at dist-git commit bdd048e929dc ("Two fixes that will be - shipped in RHEL-8.3.0.z", 2020-10-23). - - Since commit bdd048e929dc, RHEL-8 OpenSSL dist-git advanced - (fast-forwarded) to commit a75722161d20 ("Update to version 1.1.1k", - 2021-05-25), which is the current head of the rhel-8.5.0 branch. - (See also .) - - At both dist-git bdd048e929dc and dist-git a75722161d20, I built the - respective RHEL-8 OpenSSL *source* RPM, and prepped the respective - source tree, with "rpmbuild -bp". Subsequently I compared the - prepped source trees recursively. - - - The following files disappeared: - - - 29 backup files created by "patch", - - - the assembly generator perl script called - "ecp_nistz256-avx2.pl", which is not used during the build. - - - The following new files appeared: - - - 18 files directly or indirectly under the "test" subdirectory, - which are not used during the build, - - - 5 backup files created by "patch", - - - 2 DCL scripts used when building OpenSSL on OpenVMS. - - This means that the total list of RHEL-8 OpenSSL source files has - not changed in RHEL-8 OpenSSL dist-git since our downstream edk2 - commit 3e3fe5e62079. - - As a result, copy the "RHEL8-specific OpenSSL file list" sections - verbatim from the INF files, at downstream commit e81751a1c303. (I used - the "git checkout -p e81751a1c303 -- Library/OpensslLib/OpensslLib.inf - CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf" command.) - -Notes about the RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] -> -RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] rebase: - -- "OpensslLib.inf": - - - Automatic leading context refresh against upstream commit c72ca4666886 - ("CryptoPkg/OpensslLib: Add "sort" keyword to header file parsing - loop", 2020-03-10). - - - Manual trailing context refresh against upstream commit b49a6c8f80d9 - ("CryptoPkg/OpensslLib: improve INF file consistency", 2019-12-02). - -- "OpensslLibCrypto.inf": - - - Automatic leading context refresh against upstream commits - 8906f076de35 ("CryptoPkg/OpensslLib: Add missing header files in INF - file", 2019-08-16) and 9f4fbd56d430 ("CryptoPkg/OpensslLib: Update - process_files.pl to generate .h files", 2019-10-30). - -Notes about the RHEL-8.1/20190308-89910a39dcfd [edk2-stable201903] -> -RHEL-8.2/20190904-37eef91017ad [edk2-stable201908] rebase: - -- new patch - -The downstream changes in RHEL8's OpenSSL package, for example in -"openssl-1.1.1-evp-kdf.patch", introduce new files, and even move some -preexistent code into those new files. In order to avoid undefined -references in link editing, we have to list the new files. - -Note: "process_files.pl" is not re-run at this time manually, because - -(a) "process_files.pl" would pollute the file list (and some of the - auto-generated header files) with RHEL8-specific FIPS artifacts, which - are explicitly unwanted in edk2, - -(b) The RHEL OpenSSL maintainer, Tomas Mraz, identified this specific set - of files in , - and will help with future changes too. - -Signed-off-by: Laszlo Ersek -(cherry picked from commit 57bd3f146590df8757865d8f2cdd1db3cf3f4d40) -(cherry picked from commit 56c4bb81b311dfcee6a34c81d3e4feeda7f88995) ---- - CryptoPkg/Library/OpensslLib/OpensslLib.inf | 11 +++++++++++ - CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf | 11 +++++++++++ - 2 files changed, 22 insertions(+) - -diff --git a/CryptoPkg/Library/OpensslLib/OpensslLib.inf b/CryptoPkg/Library/OpensslLib/OpensslLib.inf -index b00bb74ce6..71e32f26ea 100644 ---- a/CryptoPkg/Library/OpensslLib/OpensslLib.inf -+++ b/CryptoPkg/Library/OpensslLib/OpensslLib.inf -@@ -570,6 +570,17 @@ - $(OPENSSL_PATH)/ssl/statem/statem.h - $(OPENSSL_PATH)/ssl/statem/statem_local.h - # Autogenerated files list ends here -+# RHEL8-specific OpenSSL file list starts here -+ $(OPENSSL_PATH)/crypto/evp/kdf_lib.c -+ $(OPENSSL_PATH)/crypto/evp/pkey_kdf.c -+ $(OPENSSL_PATH)/crypto/kdf/kbkdf.c -+ $(OPENSSL_PATH)/crypto/kdf/kdf_local.h -+ $(OPENSSL_PATH)/crypto/kdf/kdf_util.c -+ $(OPENSSL_PATH)/crypto/kdf/krb5kdf.c -+ $(OPENSSL_PATH)/crypto/kdf/pbkdf2.c -+ $(OPENSSL_PATH)/crypto/kdf/sshkdf.c -+ $(OPENSSL_PATH)/crypto/kdf/sskdf.c -+# RHEL8-specific OpenSSL file list ends here - buildinf.h - ossl_store.c - rand_pool.c -diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf -index 3557711bd8..003dcbad7a 100644 ---- a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf -+++ b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf -@@ -519,6 +519,17 @@ - $(OPENSSL_PATH)/crypto/x509v3/standard_exts.h - $(OPENSSL_PATH)/crypto/x509v3/v3_admis.h - # Autogenerated files list ends here -+# RHEL8-specific OpenSSL file list starts here -+ $(OPENSSL_PATH)/crypto/evp/kdf_lib.c -+ $(OPENSSL_PATH)/crypto/evp/pkey_kdf.c -+ $(OPENSSL_PATH)/crypto/kdf/kbkdf.c -+ $(OPENSSL_PATH)/crypto/kdf/kdf_local.h -+ $(OPENSSL_PATH)/crypto/kdf/kdf_util.c -+ $(OPENSSL_PATH)/crypto/kdf/krb5kdf.c -+ $(OPENSSL_PATH)/crypto/kdf/pbkdf2.c -+ $(OPENSSL_PATH)/crypto/kdf/sshkdf.c -+ $(OPENSSL_PATH)/crypto/kdf/sskdf.c -+# RHEL8-specific OpenSSL file list ends here - buildinf.h - ossl_store.c - rand_pool.c --- -2.27.0 - diff --git a/0026-OvmfPkg-QemuKernelLoaderFsDxe-suppress-error-on-no-k.patch b/0026-OvmfPkg-QemuKernelLoaderFsDxe-suppress-error-on-no-k.patch deleted file mode 100644 index 9564bd4..0000000 --- a/0026-OvmfPkg-QemuKernelLoaderFsDxe-suppress-error-on-no-k.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 11a79ac24d7411c8ad9d8a6779b324c5164e06d0 Mon Sep 17 00:00:00 2001 -From: Laszlo Ersek -Date: Wed, 24 Jun 2020 11:31:36 +0200 -Subject: [PATCH 19/20] OvmfPkg/QemuKernelLoaderFsDxe: suppress error on no - "-kernel" in silent aa64 build (RH) - -Notes about the RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] -> -RHEL-8.5/20210520-e1999b264f1f [edk2-stable202105] rebase: - -- Remove obsolete commit message tags related to downstream patch - management: Message-id, Patchwork-id, O-Subject, Acked-by, From, - RH-Acked-by, RH-Author (RHBZ#1846481). - -Bugzilla: 1844682 - -If the "-kernel" QEMU option is not used, then QemuKernelLoaderFsDxe -should return EFI_NOT_FOUND, so that the DXE Core can unload it. However, -the associated error message, logged by the DXE Core to the serial -console, is not desired in the silent edk2-aarch64 build, given that the -absence of "-kernel" is nothing out of the ordinary. Therefore, return -success and stay resident. The wasted guest RAM still gets freed after -ExitBootServices(). - -(Inspired by RHEL-8.1.0 commit aaaedc1e2cfd.) - -Signed-off-by: Laszlo Ersek -Signed-off-by: Miroslav Rezanina -(cherry picked from commit 9adcdf493ebbd11efb74e2905ab5f6c8996e096d) ---- - .../QemuKernelLoaderFsDxe.inf | 1 + - .../QemuKernelLoaderFsDxe.c | 17 +++++++++++++++++ - 2 files changed, 18 insertions(+) - -diff --git a/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.inf b/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.inf -index 7b35adb8e034..e0331c6e2cbc 100644 ---- a/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.inf -+++ b/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.inf -@@ -28,6 +28,7 @@ [LibraryClasses] - BaseLib - BaseMemoryLib - DebugLib -+ DebugPrintErrorLevelLib - DevicePathLib - MemoryAllocationLib - QemuFwCfgLib -diff --git a/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.c b/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.c -index 6832d563bcb0..08ed67f5ffea 100644 ---- a/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.c -+++ b/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.c -@@ -19,6 +19,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -1054,6 +1055,22 @@ QemuKernelLoaderFsDxeEntrypoint ( - - if (KernelBlob->Data == NULL) { - Status = EFI_NOT_FOUND; -+#if defined (MDE_CPU_AARCH64) -+ // -+ // RHBZ#1844682 -+ // -+ // If the "-kernel" QEMU option is not being used, this platform DXE driver -+ // should return EFI_NOT_FOUND, so that the DXE Core can unload it. -+ // However, the associated error message, logged by the DXE Core to the -+ // serial console, is not desired in the silent edk2-aarch64 build, given -+ // that the absence of "-kernel" is nothing out of the ordinary. Therefore, -+ // return success and stay resident. The wasted guest RAM still gets freed -+ // after ExitBootServices(). -+ // -+ if (GetDebugPrintErrorLevel () == DEBUG_ERROR) { -+ Status = EFI_SUCCESS; -+ } -+#endif - goto FreeBlobs; - } - --- -2.33.1 - diff --git a/0027-SecurityPkg-Tcg2Dxe-suppress-error-on-no-swtpm-in-si.patch b/0027-SecurityPkg-Tcg2Dxe-suppress-error-on-no-swtpm-in-si.patch deleted file mode 100644 index 3cc5803..0000000 --- a/0027-SecurityPkg-Tcg2Dxe-suppress-error-on-no-swtpm-in-si.patch +++ /dev/null @@ -1,82 +0,0 @@ -From dc27035d2a8ca09dc5b0113c97a643341f286c08 Mon Sep 17 00:00:00 2001 -From: Laszlo Ersek -Date: Wed, 24 Jun 2020 11:40:09 +0200 -Subject: SecurityPkg/Tcg2Dxe: suppress error on no swtpm in silent aa64 build - (RH) - -Notes about the RHEL-8.3/20200603-ca407c7246bf [edk2-stable202005] -> -RHEL-8.5/20210520-e1999b264f1f [edk2-stable202105] rebase: - -- Remove obsolete commit message tags related to downstream patch - management: Message-id, Patchwork-id, O-Subject, Acked-by, From, - RH-Acked-by, RH-Author (RHBZ#1846481). - -Bugzilla: 1844682 - -If swtpm / vTPM2 is not being used, Tcg2Dxe should return EFI_UNSUPPORTED, -so that the DXE Core can unload it. However, the associated error message, -logged by the DXE Core to the serial console, is not desired in the silent -edk2-aarch64 build, given that the absence of swtpm / vTPM2 is nothing out -of the ordinary. Therefore, return success and stay resident. The wasted -guest RAM still gets freed after ExitBootServices(). - -(Inspired by RHEL-8.1.0 commit aaaedc1e2cfd.) - -Signed-off-by: Laszlo Ersek -Signed-off-by: Miroslav Rezanina -(cherry picked from commit cbce29f7749477e271f9764fed82de94724af5df) ---- - SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c | 17 +++++++++++++++++ - SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf | 1 + - 2 files changed, 18 insertions(+) - -diff --git a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c -index 6d17616c1c..f1a97d4b2d 100644 ---- a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c -+++ b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c -@@ -28,6 +28,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent - #include - - #include -+#include - #include - #include - #include -@@ -2642,6 +2643,22 @@ DriverEntry ( - if (CompareGuid (PcdGetPtr(PcdTpmInstanceGuid), &gEfiTpmDeviceInstanceNoneGuid) || - CompareGuid (PcdGetPtr(PcdTpmInstanceGuid), &gEfiTpmDeviceInstanceTpm12Guid)){ - DEBUG ((DEBUG_INFO, "No TPM2 instance required!\n")); -+#if defined (MDE_CPU_AARCH64) -+ // -+ // RHBZ#1844682 -+ // -+ // If swtpm / vTPM2 is not being used, this driver should return -+ // EFI_UNSUPPORTED, so that the DXE Core can unload it. However, the -+ // associated error message, logged by the DXE Core to the serial console, -+ // is not desired in the silent edk2-aarch64 build, given that the absence -+ // of swtpm / vTPM2 is nothing out of the ordinary. Therefore, return -+ // success and stay resident. The wasted guest RAM still gets freed after -+ // ExitBootServices(). -+ // -+ if (GetDebugPrintErrorLevel () == DEBUG_ERROR) { -+ return EFI_SUCCESS; -+ } -+#endif - return EFI_UNSUPPORTED; - } - -diff --git a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf -index 7dc7a2683d..3bc8833931 100644 ---- a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf -+++ b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf -@@ -55,6 +55,7 @@ - UefiRuntimeServicesTableLib - BaseMemoryLib - DebugLib -+ DebugPrintErrorLevelLib - Tpm2CommandLib - PrintLib - UefiLib --- -2.27.0 - diff --git a/0028-OvmfPkg-MemEncryptSevLib-Check-the-guest-type-before.patch b/0028-OvmfPkg-MemEncryptSevLib-Check-the-guest-type-before.patch deleted file mode 100644 index 4b3dfb3..0000000 --- a/0028-OvmfPkg-MemEncryptSevLib-Check-the-guest-type-before.patch +++ /dev/null @@ -1,230 +0,0 @@ -From 418ad50beaffaeb4b7b25d86b935f122f1740ebd Mon Sep 17 00:00:00 2001 -From: Brijesh Singh -Date: Wed, 1 Dec 2021 10:24:07 -0600 -Subject: [PATCH 1/1] OvmfPkg/MemEncryptSevLib: Check the guest type before - EsWorkarea access - -The commit 80e67af9afca added support for a generic workarea concept. -The workarea header contains the information of the guest type. The -header is populated by ResetVector code during the guest detection. - -Currently, the InternalMemEncryptSevStatus() reads the EsWorkArea to -determine the C-bit position. The EsWorkArea PCD is valid only for the -SEV guest type. Add a check of the guest type before accessing the -EsWorkArea PCD. - -Fixes: 80e67af9afca ("OvmfPkg: introduce a common work area") -Cc: James Bottomley -Cc: Min Xu -Cc: Jiewen Yao -Cc: Tom Lendacky -Cc: Jordan Justen -Cc: Ard Biesheuvel -Cc: Erdem Aktas -Cc: Gerd Hoffmann -Cc: Qi Zhou -Signed-off-by: Brijesh Singh -Message-Id: <20211201162407.3323063-1-brijesh.singh@amd.com> -Signed-off-by: Gerd Hoffmann ---- - .../DxeMemEncryptSevLib.inf | 2 + - .../PeiMemEncryptSevLib.inf | 2 + - .../SecMemEncryptSevLib.inf | 2 + - .../PeiMemEncryptSevLibInternal.c | 50 +++++++++++++++- - .../SecMemEncryptSevLibInternal.c | 58 ++++++++++++++++++- - 5 files changed, 110 insertions(+), 4 deletions(-) - -diff --git a/OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLib.inf b/OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLib.inf -index f2e162d68076..ca3d82ef93bf 100644 ---- a/OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLib.inf -+++ b/OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLib.inf -@@ -54,4 +54,6 @@ [FeaturePcd] - gUefiOvmfPkgTokenSpaceGuid.PcdSmmSmramRequire - - [Pcd] -+ gUefiOvmfPkgTokenSpaceGuid.PcdOvmfWorkAreaBase - gEfiMdeModulePkgTokenSpaceGuid.PcdPteMemoryEncryptionAddressOrMask -+ gUefiOvmfPkgTokenSpaceGuid.PcdOvmfConfidentialComputingWorkAreaHeader -diff --git a/OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLib.inf b/OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLib.inf -index 03a78c32df28..2f27b5569d7a 100644 ---- a/OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLib.inf -+++ b/OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLib.inf -@@ -54,4 +54,6 @@ [FeaturePcd] - gUefiOvmfPkgTokenSpaceGuid.PcdSmmSmramRequire - - [FixedPcd] -+ gUefiOvmfPkgTokenSpaceGuid.PcdOvmfWorkAreaBase - gUefiCpuPkgTokenSpaceGuid.PcdSevEsWorkAreaBase -+ gUefiOvmfPkgTokenSpaceGuid.PcdOvmfConfidentialComputingWorkAreaHeader -diff --git a/OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLib.inf b/OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLib.inf -index 279c38bfbc2c..36c4f906d554 100644 ---- a/OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLib.inf -+++ b/OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLib.inf -@@ -48,4 +48,6 @@ [LibraryClasses] - PcdLib - - [FixedPcd] -+ gUefiOvmfPkgTokenSpaceGuid.PcdOvmfWorkAreaBase - gUefiCpuPkgTokenSpaceGuid.PcdSevEsWorkAreaBase -+ gUefiOvmfPkgTokenSpaceGuid.PcdOvmfConfidentialComputingWorkAreaHeader -diff --git a/OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLibInternal.c b/OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLibInternal.c -index e2fd109d120f..c61bee4c4779 100644 ---- a/OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLibInternal.c -+++ b/OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLibInternal.c -@@ -24,6 +24,52 @@ STATIC BOOLEAN mSevStatusChecked = FALSE; - STATIC UINT64 mSevEncryptionMask = 0; - STATIC BOOLEAN mSevEncryptionMaskSaved = FALSE; - -+/** -+ Determine if the SEV is active. -+ -+ During the early booting, GuestType is set in the work area. Verify that it -+ is an SEV guest. -+ -+ @retval TRUE SEV is enabled -+ @retval FALSE SEV is not enabled -+ -+ **/ -+STATIC -+BOOLEAN -+IsSevGuest ( -+ VOID -+ ) -+{ -+ OVMF_WORK_AREA *WorkArea; -+ -+ // -+ // Ensure that the size of the Confidential Computing work area header -+ // is same as what is provided through a fixed PCD. -+ // -+ ASSERT ((UINTN) FixedPcdGet32 (PcdOvmfConfidentialComputingWorkAreaHeader) == -+ sizeof(CONFIDENTIAL_COMPUTING_WORK_AREA_HEADER)); -+ -+ WorkArea = (OVMF_WORK_AREA *) FixedPcdGet32 (PcdOvmfWorkAreaBase); -+ -+ return ((WorkArea != NULL) && (WorkArea->Header.GuestType == GUEST_TYPE_AMD_SEV)); -+} -+ -+STATIC -+SEC_SEV_ES_WORK_AREA * -+GetSevEsWorkArea ( -+ VOID -+ ) -+{ -+ // -+ // Before accessing the Es workarea lets verify that its SEV guest -+ // -+ if (!IsSevGuest()) { -+ return NULL; -+ } -+ -+ return (SEC_SEV_ES_WORK_AREA *) FixedPcdGet32 (PcdSevEsWorkAreaBase); -+} -+ - /** - Reads and sets the status of SEV features. - -@@ -43,7 +89,7 @@ InternalMemEncryptSevStatus ( - - ReadSevMsr = FALSE; - -- SevEsWorkArea = (SEC_SEV_ES_WORK_AREA *) FixedPcdGet32 (PcdSevEsWorkAreaBase); -+ SevEsWorkArea = GetSevEsWorkArea (); - if (SevEsWorkArea != NULL && SevEsWorkArea->EncryptionMask != 0) { - // - // The MSR has been read before, so it is safe to read it again and avoid -@@ -139,7 +185,7 @@ MemEncryptSevGetEncryptionMask ( - if (!mSevEncryptionMaskSaved) { - SEC_SEV_ES_WORK_AREA *SevEsWorkArea; - -- SevEsWorkArea = (SEC_SEV_ES_WORK_AREA *) FixedPcdGet32 (PcdSevEsWorkAreaBase); -+ SevEsWorkArea = GetSevEsWorkArea (); - if (SevEsWorkArea != NULL) { - mSevEncryptionMask = SevEsWorkArea->EncryptionMask; - } else { -diff --git a/OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLibInternal.c b/OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLibInternal.c -index 56d8f3f3183f..f906f0de1b6c 100644 ---- a/OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLibInternal.c -+++ b/OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLibInternal.c -@@ -17,6 +17,52 @@ - #include - #include - -+/** -+ Determine if the SEV is active. -+ -+ During the early booting, GuestType is set in the work area. Verify that it -+ is an SEV guest. -+ -+ @retval TRUE SEV is enabled -+ @retval FALSE SEV is not enabled -+ -+ **/ -+STATIC -+BOOLEAN -+IsSevGuest ( -+ VOID -+ ) -+{ -+ OVMF_WORK_AREA *WorkArea; -+ -+ // -+ // Ensure that the size of the Confidential Computing work area header -+ // is same as what is provided through a fixed PCD. -+ // -+ ASSERT ((UINTN) FixedPcdGet32 (PcdOvmfConfidentialComputingWorkAreaHeader) == -+ sizeof(CONFIDENTIAL_COMPUTING_WORK_AREA_HEADER)); -+ -+ WorkArea = (OVMF_WORK_AREA *) FixedPcdGet32 (PcdOvmfWorkAreaBase); -+ -+ return ((WorkArea != NULL) && (WorkArea->Header.GuestType == GUEST_TYPE_AMD_SEV)); -+} -+ -+STATIC -+SEC_SEV_ES_WORK_AREA * -+GetSevEsWorkArea ( -+ VOID -+ ) -+{ -+ // -+ // Before accessing the Es workarea lets verify that its SEV guest -+ // -+ if (!IsSevGuest()) { -+ return NULL; -+ } -+ -+ return (SEC_SEV_ES_WORK_AREA *) FixedPcdGet32 (PcdSevEsWorkAreaBase); -+} -+ - /** - Reads and sets the status of SEV features. - -@@ -35,7 +81,8 @@ InternalMemEncryptSevStatus ( - - ReadSevMsr = FALSE; - -- SevEsWorkArea = (SEC_SEV_ES_WORK_AREA *) FixedPcdGet32 (PcdSevEsWorkAreaBase); -+ -+ SevEsWorkArea = GetSevEsWorkArea (); - if (SevEsWorkArea != NULL && SevEsWorkArea->EncryptionMask != 0) { - // - // The MSR has been read before, so it is safe to read it again and avoid -@@ -115,7 +162,14 @@ MemEncryptSevGetEncryptionMask ( - SEC_SEV_ES_WORK_AREA *SevEsWorkArea; - UINT64 EncryptionMask; - -- SevEsWorkArea = (SEC_SEV_ES_WORK_AREA *) FixedPcdGet32 (PcdSevEsWorkAreaBase); -+ // -+ // Before accessing the Es workarea lets verify that its SEV guest -+ // -+ if (!IsSevGuest()) { -+ return 0; -+ } -+ -+ SevEsWorkArea = GetSevEsWorkArea (); - if (SevEsWorkArea != NULL) { - EncryptionMask = SevEsWorkArea->EncryptionMask; - } else { --- -2.33.1 - diff --git a/0029-OvmfPkg-Microvm-take-PcdResizeXterm-from-the-QEMU-co.patch b/0029-OvmfPkg-Microvm-take-PcdResizeXterm-from-the-QEMU-co.patch deleted file mode 100644 index a8b737d..0000000 --- a/0029-OvmfPkg-Microvm-take-PcdResizeXterm-from-the-QEMU-co.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 9120e7cff424f37e58f305d275124126aac27fd1 Mon Sep 17 00:00:00 2001 -From: Gerd Hoffmann -Date: Thu, 2 Dec 2021 14:06:18 +0100 -Subject: [PATCH 1/1] OvmfPkg/Microvm: take PcdResizeXterm from the QEMU - command line (RH only) - ---- - OvmfPkg/Microvm/MicrovmX64.dsc | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/OvmfPkg/Microvm/MicrovmX64.dsc b/OvmfPkg/Microvm/MicrovmX64.dsc -index 617f92539518..80a01d551f3f 100644 ---- a/OvmfPkg/Microvm/MicrovmX64.dsc -+++ b/OvmfPkg/Microvm/MicrovmX64.dsc -@@ -551,6 +551,7 @@ [PcdsDynamicDefault] - # only set when - # ($(SMM_REQUIRE) == FALSE) - gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0 -+ gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm|FALSE - - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0 - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0 --- -2.33.1 - diff --git a/edk2.spec b/edk2.spec index 8435e86..17f8e0c 100644 --- a/edk2.spec +++ b/edk2.spec @@ -12,9 +12,9 @@ ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 ExclusiveArch: x86_64 aarch64 %endif -# edk2-stable202111 -%define GITDATE 20211126 -%define GITCOMMIT bb1bba3d7767 +# edk2-stable202202 +%define GITDATE 20220221 +%define GITCOMMIT b24306f15daa %define TOOLCHAIN GCC5 %define OPENSSL_VER 1.1.1k @@ -83,31 +83,27 @@ Source58: edk2-ovmf-nosb.json Source59: 70-edk2-arm-verbose.json Source60: edk2-microvm.json -Patch0008: 0008-BaseTools-do-not-build-BrotliCompress-RH-only.patch -Patch0009: 0009-MdeModulePkg-remove-package-private-Brotli-include-p.patch -Patch0011: 0011-OvmfPkg-increase-max-debug-message-length-to-512-RHE.patch -Patch0012: 0012-MdeModulePkg-TerminalDxe-add-other-text-resolutions-.patch -Patch0013: 0013-MdeModulePkg-TerminalDxe-set-xterm-resolution-on-mod.patch -Patch0014: 0014-OvmfPkg-take-PcdResizeXterm-from-the-QEMU-command-li.patch -Patch0015: 0015-ArmVirtPkg-take-PcdResizeXterm-from-the-QEMU-command.patch -Patch0016: 0016-OvmfPkg-allow-exclusion-of-the-shell-from-the-firmwa.patch -Patch0017: 0017-ArmPlatformPkg-introduce-fixed-PCD-for-early-hello-m.patch -Patch0018: 0018-ArmPlatformPkg-PrePeiCore-write-early-hello-message-.patch -Patch0019: 0019-ArmVirtPkg-set-early-hello-message-RH-only.patch -Patch0020: 0020-OvmfPkg-enable-DEBUG_VERBOSE-RHEL-only.patch -Patch0021: 0021-OvmfPkg-silence-DEBUG_VERBOSE-0x00400000-in-QemuVide.patch -Patch0022: 0022-ArmVirtPkg-silence-DEBUG_VERBOSE-0x00400000-in-QemuR.patch -Patch0023: 0023-OvmfPkg-QemuRamfbDxe-Do-not-report-DXE-failure-on-Aa.patch -Patch0024: 0024-OvmfPkg-silence-EFI_D_VERBOSE-0x00400000-in-NvmExpre.patch -Patch0025: 0025-CryptoPkg-OpensslLib-list-RHEL8-specific-OpenSSL-fil.patch -Patch0026: 0026-OvmfPkg-QemuKernelLoaderFsDxe-suppress-error-on-no-k.patch -Patch0027: 0027-SecurityPkg-Tcg2Dxe-suppress-error-on-no-swtpm-in-si.patch -Patch0028: 0028-OvmfPkg-MemEncryptSevLib-Check-the-guest-type-before.patch -Patch0029: 0029-OvmfPkg-Microvm-take-PcdResizeXterm-from-the-QEMU-co.patch - -# Fedora specific -Patch1000: fedora-Tweak-the-tools_def-to-support-cross-compiling.patch - +Patch0001: 0001-BaseTools-do-not-build-BrotliCompress-RH-only.patch +Patch0002: 0002-MdeModulePkg-remove-package-private-Brotli-include-p.patch +Patch0003: 0003-OvmfPkg-increase-max-debug-message-length-to-512-RHE.patch +Patch0004: 0004-MdeModulePkg-TerminalDxe-add-other-text-resolutions-.patch +Patch0005: 0005-MdeModulePkg-TerminalDxe-set-xterm-resolution-on-mod.patch +Patch0006: 0006-OvmfPkg-take-PcdResizeXterm-from-the-QEMU-command-li.patch +Patch0007: 0007-ArmVirtPkg-take-PcdResizeXterm-from-the-QEMU-command.patch +Patch0008: 0008-OvmfPkg-allow-exclusion-of-the-shell-from-the-firmwa.patch +Patch0009: 0009-ArmPlatformPkg-introduce-fixed-PCD-for-early-hello-m.patch +Patch0010: 0010-ArmPlatformPkg-PrePeiCore-write-early-hello-message-.patch +Patch0011: 0011-ArmVirtPkg-set-early-hello-message-RH-only.patch +Patch0012: 0012-OvmfPkg-enable-DEBUG_VERBOSE-RHEL-only.patch +Patch0013: 0013-OvmfPkg-silence-DEBUG_VERBOSE-0x00400000-in-QemuVide.patch +Patch0014: 0014-ArmVirtPkg-silence-DEBUG_VERBOSE-0x00400000-in-QemuR.patch +Patch0015: 0015-OvmfPkg-QemuRamfbDxe-Do-not-report-DXE-failure-on-Aa.patch +Patch0016: 0016-OvmfPkg-silence-EFI_D_VERBOSE-0x00400000-in-NvmExpre.patch +Patch0017: 0017-CryptoPkg-OpensslLib-list-RHEL8-specific-OpenSSL-fil.patch +Patch0018: 0018-OvmfPkg-QemuKernelLoaderFsDxe-suppress-error-on-no-k.patch +Patch0019: 0019-SecurityPkg-Tcg2Dxe-suppress-error-on-no-swtpm-in-si.patch +Patch0020: 0020-OvmfPkg-Microvm-take-PcdResizeXterm-from-the-QEMU-co.patch +Patch0021: 0021-Tweak-the-tools_def-to-support-cross-compiling.patch # python3-devel and libuuid-devel are required for building tools. # python3-devel is also needed for varstore template generation and @@ -761,6 +757,9 @@ KERNEL_IMG=$(rpm -q -l $KERNEL_PKG | egrep '^/lib/modules/[^/]+/vmlinuz$') %changelog +* Wed Mar 23 2022 Gerd Hoffmann - 20220221gitb24306f15daa-1 +- Update to edk2-stable202202 + * Thu Jan 20 2022 Fedora Release Engineering - 20211126gitbb1bba3d7767-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild diff --git a/fedora-Tweak-the-tools_def-to-support-cross-compiling.patch b/fedora-Tweak-the-tools_def-to-support-cross-compiling.patch deleted file mode 100644 index b36f1e4..0000000 --- a/fedora-Tweak-the-tools_def-to-support-cross-compiling.patch +++ /dev/null @@ -1,75 +0,0 @@ -From d8b75ad1013b21c089a1af579b510f32c49c5b14 Mon Sep 17 00:00:00 2001 -From: Paolo Bonzini -Date: Thu, 16 Aug 2018 15:45:47 -0400 -Subject: [PATCH] Tweak the tools_def to support cross-compiling. - -These files are meant for customization, so this is not upstream. - -Signed-off-by: Paolo Bonzini -Signed-off-by: Cole Robinson ---- - BaseTools/Conf/tools_def.template | 44 +++++++++++++++---------------- - 1 file changed, 22 insertions(+), 22 deletions(-) - -diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template -index 933b3160fd..e62ccc322d 100755 ---- a/BaseTools/Conf/tools_def.template -+++ b/BaseTools/Conf/tools_def.template -@@ -2350,17 +2350,17 @@ RELEASE_GCC49_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20 - ################## - # GCC5 IA32 definitions - ################## --*_GCC5_IA32_OBJCOPY_PATH = DEF(GCC5_IA32_PREFIX)objcopy --*_GCC5_IA32_CC_PATH = DEF(GCC5_IA32_PREFIX)gcc --*_GCC5_IA32_SLINK_PATH = DEF(GCC5_IA32_PREFIX)gcc-ar --*_GCC5_IA32_DLINK_PATH = DEF(GCC5_IA32_PREFIX)gcc --*_GCC5_IA32_ASLDLINK_PATH = DEF(GCC5_IA32_PREFIX)gcc --*_GCC5_IA32_ASM_PATH = DEF(GCC5_IA32_PREFIX)gcc --*_GCC5_IA32_PP_PATH = DEF(GCC5_IA32_PREFIX)gcc --*_GCC5_IA32_VFRPP_PATH = DEF(GCC5_IA32_PREFIX)gcc --*_GCC5_IA32_ASLCC_PATH = DEF(GCC5_IA32_PREFIX)gcc --*_GCC5_IA32_ASLPP_PATH = DEF(GCC5_IA32_PREFIX)gcc --*_GCC5_IA32_RC_PATH = DEF(GCC5_IA32_PREFIX)objcopy -+*_GCC5_IA32_OBJCOPY_PATH = ENV(GCC5_IA32_PREFIX)objcopy -+*_GCC5_IA32_CC_PATH = ENV(GCC5_IA32_PREFIX)gcc -+*_GCC5_IA32_SLINK_PATH = ENV(GCC5_IA32_PREFIX)gcc-ar -+*_GCC5_IA32_DLINK_PATH = ENV(GCC5_IA32_PREFIX)gcc -+*_GCC5_IA32_ASLDLINK_PATH = ENV(GCC5_IA32_PREFIX)gcc -+*_GCC5_IA32_ASM_PATH = ENV(GCC5_IA32_PREFIX)gcc -+*_GCC5_IA32_PP_PATH = ENV(GCC5_IA32_PREFIX)gcc -+*_GCC5_IA32_VFRPP_PATH = ENV(GCC5_IA32_PREFIX)gcc -+*_GCC5_IA32_ASLCC_PATH = ENV(GCC5_IA32_PREFIX)gcc -+*_GCC5_IA32_ASLPP_PATH = ENV(GCC5_IA32_PREFIX)gcc -+*_GCC5_IA32_RC_PATH = ENV(GCC5_IA32_PREFIX)objcopy - - *_GCC5_IA32_ASLCC_FLAGS = DEF(GCC5_ASLCC_FLAGS) -m32 - *_GCC5_IA32_ASLDLINK_FLAGS = DEF(GCC5_IA32_X64_ASLDLINK_FLAGS) -Wl,-m,elf_i386 -no-pie -@@ -2382,17 +2382,17 @@ RELEASE_GCC5_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl, - ################## - # GCC5 X64 definitions - ################## --*_GCC5_X64_OBJCOPY_PATH = DEF(GCC5_X64_PREFIX)objcopy --*_GCC5_X64_CC_PATH = DEF(GCC5_X64_PREFIX)gcc --*_GCC5_X64_SLINK_PATH = DEF(GCC5_X64_PREFIX)gcc-ar --*_GCC5_X64_DLINK_PATH = DEF(GCC5_X64_PREFIX)gcc --*_GCC5_X64_ASLDLINK_PATH = DEF(GCC5_X64_PREFIX)gcc --*_GCC5_X64_ASM_PATH = DEF(GCC5_X64_PREFIX)gcc --*_GCC5_X64_PP_PATH = DEF(GCC5_X64_PREFIX)gcc --*_GCC5_X64_VFRPP_PATH = DEF(GCC5_X64_PREFIX)gcc --*_GCC5_X64_ASLCC_PATH = DEF(GCC5_X64_PREFIX)gcc --*_GCC5_X64_ASLPP_PATH = DEF(GCC5_X64_PREFIX)gcc --*_GCC5_X64_RC_PATH = DEF(GCC5_X64_PREFIX)objcopy -+*_GCC5_X64_OBJCOPY_PATH = ENV(GCC5_X64_PREFIX)objcopy -+*_GCC5_X64_CC_PATH = ENV(GCC5_X64_PREFIX)gcc -+*_GCC5_X64_SLINK_PATH = ENV(GCC5_X64_PREFIX)gcc-ar -+*_GCC5_X64_DLINK_PATH = ENV(GCC5_X64_PREFIX)gcc -+*_GCC5_X64_ASLDLINK_PATH = ENV(GCC5_X64_PREFIX)gcc -+*_GCC5_X64_ASM_PATH = ENV(GCC5_X64_PREFIX)gcc -+*_GCC5_X64_PP_PATH = ENV(GCC5_X64_PREFIX)gcc -+*_GCC5_X64_VFRPP_PATH = ENV(GCC5_X64_PREFIX)gcc -+*_GCC5_X64_ASLCC_PATH = ENV(GCC5_X64_PREFIX)gcc -+*_GCC5_X64_ASLPP_PATH = ENV(GCC5_X64_PREFIX)gcc -+*_GCC5_X64_RC_PATH = ENV(GCC5_X64_PREFIX)objcopy - - *_GCC5_X64_ASLCC_FLAGS = DEF(GCC5_ASLCC_FLAGS) -m64 - *_GCC5_X64_ASLDLINK_FLAGS = DEF(GCC5_IA32_X64_ASLDLINK_FLAGS) -Wl,-m,elf_x86_64 diff --git a/sources b/sources index ee8fe13..5601f16 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ SHA512 (softfloat-20180726-gitb64af41.tar.xz) = f079debd1bfcc0fe64329a8947b0689ef49246793edcdd28a2879f6550c652b0cf0f53ac4f6f5ab61ac4f7933972e0019d0ab63eb9931b6884c2909f3a5ead30 SHA512 (openssl-rhel-bdd048e929dcfcf2f046d74e812e0e3d5fc58504.tar.xz) = d6c0be28cefaa7993f479aecf45f5523e10aab388a92c3e4add55d6ff8483cc01fba367be62f6e9a23bfad7b46986befd3eca0d0e89b984049719645e37d52df -SHA512 (edk2-bb1bba3d7767.tar.xz) = 069227bdc24e5d19874e37fec75b1147c050679e6c21721f2137f3adcf49e07c003af2c27b954708b7e61b4d55ba7d1ce69ce9ffddefc706490b7ea678cfe335 +SHA512 (edk2-b24306f15daa.tar.xz) = f05b558818b873ac65804b9d57f32f3ecbe2d1a450acad15ec34a083c600374f01ed1f874055dbef7aa95c6b22639552cc2d01e915d8016d5aa9437bde10c6b6