diff options
author | Dhaval <dhaval@rivosinc.com> | 2024-08-30 20:26:34 +0530 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-09-14 03:38:47 +0000 |
commit | ed665ef38ce9af6f05452b6a30f3258059b80f52 (patch) | |
tree | c40e7f7a18a72c28f97b46517be3b05a93f80cad | |
parent | 121af960e2ac152be2c441837595a4c6e2a143f5 (diff) | |
download | edk2-ed665ef38ce9af6f05452b6a30f3258059b80f52.tar.gz |
UefiPayloadPkg: Handle ordering issue with option node
Option node provides info that is to be consumed by during
metadata creation for other nodes like root bridge; pci-enum-done
etc. Handle that dependency by storing option values in a variable
and then apply it during post processing. Ideally such cross node
dependency should be avoided in design. Scope for futher improvements.
Signed-off-by: Dhaval Sharma <dhaval@rivosinc.com>
-rw-r--r-- | UefiPayloadPkg/Library/FdtParserLib/FdtParserLib.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/UefiPayloadPkg/Library/FdtParserLib/FdtParserLib.c b/UefiPayloadPkg/Library/FdtParserLib/FdtParserLib.c index 421b22904f..0ed7bc4810 100644 --- a/UefiPayloadPkg/Library/FdtParserLib/FdtParserLib.c +++ b/UefiPayloadPkg/Library/FdtParserLib/FdtParserLib.c @@ -623,7 +623,6 @@ VOID ParsePciRootBridge (
IN VOID *Fdt,
IN INT32 Node,
- IN UINT8 PciEnumDone,
IN UINT8 RootBridgeCount,
IN CHAR8 *GmaStr,
IN UINT8 *index
@@ -658,7 +657,7 @@ ParsePciRootBridge ( mPciRootBridgeInfo->Header.Length = sizeof (UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGES);
mPciRootBridgeInfo->Header.Revision = UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGES_REVISION;
mPciRootBridgeInfo->Count = RootBridgeCount;
- mPciRootBridgeInfo->ResourceAssigned = (BOOLEAN)PciEnumDone;
+ mPciRootBridgeInfo->ResourceAssigned = FALSE;
}
for (SubNode = FdtFirstSubnode (Fdt, Node); SubNode >= 0; SubNode = FdtNextSubnode (Fdt, SubNode)) {
@@ -876,7 +875,7 @@ ParseDtb ( break;
case PciRootBridge:
DEBUG ((DEBUG_INFO, "ParsePciRootBridge, index :%x\n", index));
- ParsePciRootBridge (Fdt, Node, PciEnumDone, RootBridgeCount, GmaStr, &index);
+ ParsePciRootBridge (Fdt, Node, RootBridgeCount, GmaStr, &index);
DEBUG ((DEBUG_INFO, "After ParsePciRootBridge, index :%x\n", index));
break;
case Options:
@@ -889,6 +888,10 @@ ParseDtb ( }
}
+ // Post processing: TODO: Need to look into it. Such cross dependency on DT nodes
+ // may not be good idea. Instead have this prop part of RB
+ mPciRootBridgeInfo->ResourceAssigned = (BOOLEAN)PciEnumDone;
+
((EFI_HOB_HANDOFF_INFO_TABLE *)(mHobList))->BootMode = BootMode;
DEBUG ((DEBUG_INFO, "\n"));
|