From 2bb002067565fcf16641dfc9ba9d0f68e17bfc8f Mon Sep 17 00:00:00 2001 From: Kavya Date: Mon, 22 Aug 2022 18:49:30 +0530 Subject: UefiPayloadPkg: Return PciRootBridges instead of NULL Return PciRootBridges instead of NULL and set PcdPciDisableBusEnumeration to FALSE when root bridge count is zero. Reviewed-by: Guo Dong Reviewed-by: Gua Guo Signed-off-by: Kavya --- UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeSupport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeSupport.c b/UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeSupport.c index e1faa24ae7..fb76853072 100644 --- a/UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeSupport.c +++ b/UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeSupport.c @@ -549,6 +549,7 @@ RetrieveRootBridgeInfoFromHob ( } if (PciRootBridgeInfo->Count == 0) { + PcdSetBoolS (PcdPciDisableBusEnumeration, FALSE); return NULL; } @@ -589,9 +590,8 @@ RetrieveRootBridgeInfoFromHob ( if (PciRootBridgeInfo->ResourceAssigned) { PcdSetBoolS (PcdPciDisableBusEnumeration, TRUE); } else { - DEBUG ((DEBUG_ERROR, "There is root bridge whose ResourceAssigned is FALSE\n")); + DEBUG ((DEBUG_INFO, "There is root bridge whose ResourceAssigned is FALSE\n")); PcdSetBoolS (PcdPciDisableBusEnumeration, FALSE); - return NULL; } return PciRootBridges; -- cgit v1.2.3