]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiPayloadPkg: Return PciRootBridges instead of NULL
authorKavya <k.kavyax.sravanthi@intel.com>
Mon, 22 Aug 2022 13:19:30 +0000 (18:49 +0530)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Tue, 23 Aug 2022 01:04:17 +0000 (01:04 +0000)
Return PciRootBridges instead of NULL and set
PcdPciDisableBusEnumeration to FALSE when
root bridge count is zero.

Reviewed-by: Guo Dong <guo.dong@intel.com>
Reviewed-by: Gua Guo <gua.guo@intel.com>
Signed-off-by: Kavya <k.kavyax.sravanthi@intel.com>
UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeSupport.c

index e1faa24ae759bb43a5abba3386e3b20c4f96e5de..fb76853072ea9414b4e061e2aa6109e6144ad47c 100644 (file)
@@ -549,6 +549,7 @@ RetrieveRootBridgeInfoFromHob (
   }\r
 \r
   if (PciRootBridgeInfo->Count == 0) {\r
+    PcdSetBoolS (PcdPciDisableBusEnumeration, FALSE);\r
     return NULL;\r
   }\r
 \r
@@ -589,9 +590,8 @@ RetrieveRootBridgeInfoFromHob (
   if (PciRootBridgeInfo->ResourceAssigned) {\r
     PcdSetBoolS (PcdPciDisableBusEnumeration, TRUE);\r
   } else {\r
-    DEBUG ((DEBUG_ERROR, "There is root bridge whose ResourceAssigned is FALSE\n"));\r
+    DEBUG ((DEBUG_INFO, "There is root bridge whose ResourceAssigned is FALSE\n"));\r
     PcdSetBoolS (PcdPciDisableBusEnumeration, FALSE);\r
-    return NULL;\r
   }\r
 \r
   return PciRootBridges;\r