]> git.proxmox.com Git - mirror_edk2.git/commit
MdeModulePkg/NonDiscoverablePciDeviceDxe: expose unique B/D/F identifiers
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Wed, 10 Oct 2018 08:34:50 +0000 (10:34 +0200)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Wed, 10 Oct 2018 09:14:29 +0000 (11:14 +0200)
commit1a3bee20820c9f68a235a31ccc92db1f299266c9
tree18df21fe6f62d42a411b378c9eb74326117d1eba
parent2730470f9d3bbaed51a04a11bfc1bf21670fa49e
MdeModulePkg/NonDiscoverablePciDeviceDxe: expose unique B/D/F identifiers

Currently, the implementation of EFI_PCI_IO_PROTOCOL::GetLocation()
in NonDiscoverablePciDeviceDxe returns the same set of dummy values
for each instance of the NON_DISCOVERABLE_DEVICE protocol that it
attaches itself to. However, this turns out to be causing problems
in cases where software (such as the ARM Compliance Test Suite [ACS])
attempts to use these values to uniquely identify controllers, since
the collisions create ambiguity in this regard.

So let's modify GetLocation() to return an arbitrary bus/device tuple
on segment 0xff instead. This is guaranteed not to clash with other
non-discoverable PCI devices, and highly unlikely to clash with real
PCIe devices.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Marcin Wojtas <mw@semihalf.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceDxe.c
MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c
MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.h