]> git.proxmox.com Git - mirror_edk2.git/commit
MdeModulePkg/PciBus: Fix a bug PPB MEM32 BAR isn't restored sometimes
authorRay Ni <ray.ni@intel.com>
Fri, 1 Feb 2019 08:51:40 +0000 (16:51 +0800)
committerRay Ni <ray.ni@intel.com>
Thu, 14 Feb 2019 06:56:57 +0000 (14:56 +0800)
commit0fa92d5839cddeb63a7e4583fdbca49b16599e3a
tree2b2f63e2397cc6058e36eb61214d601d37f025bf
parentfcdfcdbfc2e5dc6a96ce550a1f46edb4007f35a9
MdeModulePkg/PciBus: Fix a bug PPB MEM32 BAR isn't restored sometimes

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1505

When a device under PPB contains option ROM but doesn't require 32bit
MMIO, ProgrameUpstreamBridgeForRom() cannot correctly restore the
PPB MEM32 RANGE BAR. It causes the 32bit MMIO conflict which may
cause system hangs in boot.

The root cause is when ProgrameUpstreamBridgeForRom() calls
ProgramPpbApperture() to restore the PPB MEM32 RANGE BAR, the
ProgramPpbApperture() skips to program the BAR when the resource
length is 0.

This patch fixes this issue by not calling ProgramPpbApperture().
Instead, it directly programs the PPB MEM32 RANGE BAR.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
MdeModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.c