From 6468a8fdfcb1db38472296739969a536a0da0fed Mon Sep 17 00:00:00 2001 From: Miroslav Rezanina Date: Thu, 25 Jun 2026 16:49:54 +0200 Subject: [PATCH] * Thu Jun 25 2026 Miroslav Rezanina - 20260221-4 - edk2-Revert-MdeModulePkg-PciBusDxe-Degrade-MEM64-to-PMEM6.patch [RHEL-188305] - Resolves: RHEL-188305 ([edk2,rhel-10] Unable to allocate PCI BAR with edk2-20260221-1.el10) --- ...Pkg-PciBusDxe-Degrade-MEM64-to-PMEM6.patch | 98 +++++++++++++++++++ edk2.spec | 9 +- 2 files changed, 106 insertions(+), 1 deletion(-) create mode 100644 edk2-Revert-MdeModulePkg-PciBusDxe-Degrade-MEM64-to-PMEM6.patch diff --git a/edk2-Revert-MdeModulePkg-PciBusDxe-Degrade-MEM64-to-PMEM6.patch b/edk2-Revert-MdeModulePkg-PciBusDxe-Degrade-MEM64-to-PMEM6.patch new file mode 100644 index 0000000..c90c55a --- /dev/null +++ b/edk2-Revert-MdeModulePkg-PciBusDxe-Degrade-MEM64-to-PMEM6.patch @@ -0,0 +1,98 @@ +From 43867fb3febb4f0f1d4f2546f52400e25629f4fe Mon Sep 17 00:00:00 2001 +From: Michael D Kinney +Date: Mon, 23 Mar 2026 09:50:17 -0700 +Subject: [PATCH] Revert "MdeModulePkg/PciBusDxe: Degrade MEM64 to PMEM64..." + +RH-Author: Gerd Hoffmann +RH-MergeRequest: 112: Revert "MdeModulePkg/PciBusDxe: Degrade MEM64 to PMEM64..." +RH-Jira: RHEL-188305 +RH-Acked-by: Luigi Leonardi +RH-Commit: [1/1] ca2198df465a0c3b9a118e42e2d14918e6dbeb21 (kraxel.rh/centos-src-edk2) + +This reverts commit f6489621b8ae1164c5e4930902988ba7c86847ba. + +MdeModulePkg/PciBusDxe: Degrade MEM64 to PMEM64 when bridge lacks MEM64 + +A number of compatibility issues have been reported with this change +to the PciBusDxe behavior. Revert this change at this time to give +time for all the issues to be reviewed and options for supporting +this new behavior to be evaluated and fully validated. + +Signed-off-by: Michael D Kinney +(cherry picked from commit defbd14d637313bdded40c717892497deec89be0) + +Resolves: RHEL-188305 + +Signed-off-by: Gerd Hoffmann +--- + .../Bus/Pci/PciBusDxe/PciResourceSupport.c | 45 +++---------------- + 1 file changed, 6 insertions(+), 39 deletions(-) + +diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.c +index 2859cbdf30c..8ffd05f327d 100644 +--- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.c ++++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.c +@@ -1000,19 +1000,6 @@ ResourcePaddingPolicy ( + PMEM64 -> PMEM32 -> MEM32 + IO32 -> IO16. + +- Additionally, if the upstream bridge supports PMEM64 but not MEM64, +- MEM64 resources are degraded to PMEM64 to enable 64-bit allocation +- through the bridge's prefetchable window. So the below degradation +- path is also now supported: +- +- MEM64 -> PMEM64 +- +- This is safe per PCI-SIG's ECN title "Removing Prefetchable Terminology" +- (2024-04-05). +- +- The terms prefetchable and non-prefetchable have also been removed from +- the PCIe base specification starting with version 6.3. +- + @param Bridge Pci device instance. + @param Mem32Node Resource info node for 32-bit memory. + @param PMem32Node Resource info node for 32-bit Prefetchable Memory. +@@ -1103,34 +1090,14 @@ DegradeResource ( + ); + } else { + // +- // If the upstream bridge does not support MEM64, check if we can +- // degrade to PMEM64 first, instead of degrading to MEM32 directly. +- // +- // This is allowed per PCIe Base Spec 6.3+ which removes the terms +- // prefetchable/non-prefetchable from the specification. +- // The distinction originally only described P2P bridge read-ahead +- // behavior, not resource allocation policy. +- // +- // We will still fall back and degrade to MEM32 if the upstream +- // bridge lacks PMEM64 support. +- // +- // Refer to PCI-SIG ECN "Removing Prefetchable Terminology" +- // (2024-04-05) for more details. ++ // if the bridge does not support MEM64, degrade MEM64 to MEM32 + // + if (!BridgeSupportResourceDecode (Bridge, EFI_BRIDGE_MEM64_DECODE_SUPPORTED)) { +- if (BridgeSupportResourceDecode (Bridge, EFI_BRIDGE_PMEM64_DECODE_SUPPORTED)) { +- MergeResourceTree ( +- PMem64Node, +- Mem64Node, +- TRUE +- ); +- } else { +- MergeResourceTree ( +- Mem32Node, +- Mem64Node, +- TRUE +- ); +- } ++ MergeResourceTree ( ++ Mem32Node, ++ Mem64Node, ++ TRUE ++ ); + } + + // +-- +2.52.0 + diff --git a/edk2.spec b/edk2.spec index 2086aba..59c9f42 100644 --- a/edk2.spec +++ b/edk2.spec @@ -25,7 +25,7 @@ ExclusiveArch: x86_64 aarch64 riscv64 Name: edk2 Version: %{GITDATE} -Release: 3%{?dist} +Release: 4%{?dist} Summary: UEFI firmware for 64-bit virtual machines License: BSD-2-Clause-Patent and Apache-2.0 and MIT URL: http://www.tianocore.org @@ -93,6 +93,8 @@ Patch26: 0028-OvmfPkg-ArmVirtPkg-Add-a-Fallback-RNG-RH-only.patch Patch27: 0029-OvmfPkg-X64-add-opt-org.tianocore-UninstallMemAttrPr.patch # For RHEL-182419 - edk2/x64: re-enable legacy kernel loader Patch28: edk2-Revert-OvmfPkg-X86QemuLoadImageLib-flip-default-for-.patch +# For RHEL-188305 - [edk2,rhel-10] Unable to allocate PCI BAR with edk2-20260221-1.el10 +Patch29: edk2-Revert-MdeModulePkg-PciBusDxe-Degrade-MEM64-to-PMEM6.patch # python3-devel and libuuid-devel are required for building tools. # python3-devel is also needed for varstore template generation and @@ -489,6 +491,11 @@ install -m 0644 \ %changelog +* Thu Jun 25 2026 Miroslav Rezanina - 20260221-4 +- edk2-Revert-MdeModulePkg-PciBusDxe-Degrade-MEM64-to-PMEM6.patch [RHEL-188305] +- Resolves: RHEL-188305 + ([edk2,rhel-10] Unable to allocate PCI BAR with edk2-20260221-1.el10) + * Mon Jun 08 2026 Miroslav Rezanina - 20260221-3 - edk2-Revert-OvmfPkg-X86QemuLoadImageLib-flip-default-for-.patch [RHEL-182419] - edk2-Bumped-to-OpenSSL-3.5.5-3.patch [RHEL-165726]