summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAiden Park <aiden.park@intel.com>2021-01-14 03:01:14 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-02-02 06:15:05 +0000
commit3f90ac3ec03512e2374cd2968c047a7e856a8965 (patch)
tree31278743840615b6703559ef3edb68b3b68337eb
parent3b468095cd3dfcd1aa4ae63bc623f534bc2390d2 (diff)
downloadedk2-3f90ac3ec03512e2374cd2968c047a7e856a8965.tar.gz
edk2-3f90ac3ec03512e2374cd2968c047a7e856a8965.tar.bz2
edk2-3f90ac3ec03512e2374cd2968c047a7e856a8965.zip
MdeModulePkg/PciBusDxe: Fix a bug in ProcessOptionRomLight
The ProcessOptionRomLight() assumes that OpRom has already been processed in the previous full enumeration and updates AllOpRomProcessed flag to TRUE by default. However, this may not be applicable with other pre-stage boot firmwares. This will update AllOpRomProcessed flag properly by checking PciRomGetImageMapping(). Signed-off-by: Aiden Park <aiden.park@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
-rw-r--r--MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c
index a24065e8ba..db1b35f8ef 100644
--- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c
+++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c
@@ -1168,12 +1168,7 @@ ProcessOptionRomLight (
ProcessOptionRomLight (Temp);
}
- PciRomGetImageMapping (Temp);
-
- //
- // The OpRom has already been processed in the first round
- //
- Temp->AllOpRomProcessed = TRUE;
+ Temp->AllOpRomProcessed = PciRomGetImageMapping (Temp);
CurrentLink = CurrentLink->ForwardLink;
}