]> git.proxmox.com Git - mirror_edk2.git/commit - MdeModulePkg/Bus/Pci/PciBusDxe/PciDriverOverride.h
MdeModulePkg/PciBus: Fix bug that doesn't produce BusOverride
authorRuiyu Ni <ruiyu.ni@intel.com>
Mon, 23 Oct 2017 05:52:15 +0000 (13:52 +0800)
committerRuiyu Ni <ruiyu.ni@intel.com>
Tue, 31 Oct 2017 03:11:04 +0000 (11:11 +0800)
commitb5cbef4efffb2e833ccf83b6d8ffdca88c45c239
tree02b97926b7514791459a51316449c353f5340378
parent84ed8edff13384d44372202fc93994233d9d3a98
MdeModulePkg/PciBus: Fix bug that doesn't produce BusOverride

It's a regression of below commit:
SHA-1: 8be37a5cee700777ca8e8e8a34cc2225b21931a7
* MdeModulePkg/SecurityStubDxe: Defer 3rd party image before EndOfDxe

When PciBus driver fails to load the Option ROM, it doesn't produce
BusOverride protocol. It was a correct behavior before the above
commit. But due to the above commit, BusOverride protocol never is
produced by PciBus driver.

The patch fixes this issue using the following solution:
1. PciBus records the image device path when LoadImage fails.
2. Override.GetDriver() tries to look for the image handle using
   the stored image device path.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
MdeModulePkg/Bus/Pci/PciBusDxe/PciDriverOverride.c
MdeModulePkg/Bus/Pci/PciBusDxe/PciDriverOverride.h
MdeModulePkg/Bus/Pci/PciBusDxe/PciOptionRomSupport.c
MdeModulePkg/Bus/Pci/PciBusDxe/PciRomTable.c