Skip to content

Commit

Permalink
Change assert to not fire when intentionally disabling PCI enumeration (
Browse files Browse the repository at this point in the history
#572)

## Description

When setting PcdPciDisableBusEnumeration to TRUE, an assert is hit in
StartPciDevices due to the RootBridge not existing. This is expected
when skipping enumeration so change the assert to only fail if
enumeration was not disabled.

- [ ] Impacts functionality?
- [ ] Impacts security?
- [ ] Breaking change?
- [ ] Includes tests?
- [ ] Includes documentation?

## How This Was Tested

Tested on QEMU Q35 platform

## Integration Instructions

N/A
  • Loading branch information
cfernald authored Sep 21, 2023
1 parent 5446d4d commit e8c24d8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion MdeModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.c
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,8 @@ StartPciDevices (

RootBridge = GetRootBridgeByHandle (Controller);
if (RootBridge == NULL) {
ASSERT (RootBridge != NULL);
// ASSERT (RootBridge != NULL); // MU_CHANGE
ASSERT (PcdGetBool (PcdPciDisableBusEnumeration)); // MU_CHANGE
return EFI_NOT_READY;
}

Expand Down

0 comments on commit e8c24d8

Please sign in to comment.