]> git.proxmox.com Git - mirror_edk2.git/commit
ArmVirtualizationPkg: clone BasePciExpressLib, cache PCIe config base
authorLaszlo Ersek <lersek@redhat.com>
Mon, 23 Feb 2015 16:04:07 +0000 (16:04 +0000)
committerlersek <lersek@Edk2>
Mon, 23 Feb 2015 16:04:07 +0000 (16:04 +0000)
commitad3359eb43a9b54042a8692c2b72a0df77f908da
tree3f0e6085636d74f483b0d363761275735273b722
parente5ceb6c9d39086460e6b5933e40815be57684b84
ArmVirtualizationPkg: clone BasePciExpressLib, cache PCIe config base

The BarExisted() function in
"MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c" raises the TPL to
TPL_HIGH_LEVEL before accessing PCI config space.

The PciExpressLib instance under "MdePkg/Library/BasePciExpressLib" --
serving the PCI config space access -- calls
PcdGet64(PcdPciExpressBaseAddress) in turn, for each such call.

The PcdGet64() function, when issued at TPL_HIGH_LEVEL, triggers an
ASSERT(). PcdGet64() is based on a protocol in this UEFI phase, and
protocol handler services are not allowed above TPL_NOTIFY (see Table 23
"TPL Restrictions" in the UEFI spec).

Clone the library, and in a new constructor, cache the PCD in a global
variable.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Olivier Martin <Olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16909 6f19259b-4bc3-4df7-8a09-765794883524
ArmPlatformPkg/ArmVirtualizationPkg/Library/BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf [new file with mode: 0644]
ArmPlatformPkg/ArmVirtualizationPkg/Library/BaseCachingPciExpressLib/PciExpressLib.c [new file with mode: 0644]