MdeModulePkg/PciBus: Avoid hang when BUS pad resource is not in top
authorRuiyu Ni <ruiyu.ni@intel.com>
Thu, 27 Jul 2017 03:05:16 +0000 (11:05 +0800)
committerRuiyu Ni <ruiyu.ni@intel.com>
Fri, 28 Jul 2017 09:52:46 +0000 (17:52 +0800)
commitfff2623cc2a5e3d85db201a4cf1ca8c595e20075
tree4c601bd84c0e759f785b422e043eec761f16bdd2
parent4f0465058b6ff9c53591ec81951f494a70bde7c1
MdeModulePkg/PciBus: Avoid hang when BUS pad resource is not in top

PciScanBus() assumes the GetResourcePadding() puts BUS descriptor
in the very beginning, if it's not, the Descriptors will be updated
to point to middle of the pool buffer, which can cause
FreePool(Descriptors) hang in DEBUG image.
No functionality impact to RELEASE image.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c