158 ASSERT (Node !=
NULL);
164 (Node->ItsIdCount * sizeof (UINT32)));
185 IN CONST UINT32 NodeStartOffset,
193 ASSERT (NodeList !=
NULL);
196 while (NodeCount-- != 0) {
197 (*NodeIndexer)->Token = NodeList->Token;
198 (*NodeIndexer)->Object = (VOID *)NodeList;
199 (*NodeIndexer)->Offset = (UINT32)(Size + NodeStartOffset);
200 (*NodeIndexer)->Identifier = NodeList->Identifier;
203 "IORT: Node Indexer = %p, Token = %p, Object = %p,"
204 " Offset = 0x%x, Identifier = 0x%x\n",
206 (*NodeIndexer)->Token,
207 (*NodeIndexer)->Object,
208 (*NodeIndexer)->Offset,
209 (*NodeIndexer)->Identifier
232 ASSERT (Node !=
NULL);
239 (Node->IdMappingCount *
262 IN CONST UINT32 NodeStartOffset,
270 ASSERT (NodeList !=
NULL);
273 while (NodeCount-- != 0) {
274 (*NodeIndexer)->Token = NodeList->Token;
275 (*NodeIndexer)->Object = (VOID *)NodeList;
276 (*NodeIndexer)->Offset = (UINT32)(Size + NodeStartOffset);
277 (*NodeIndexer)->Identifier = NodeList->Identifier;
280 "IORT: Node Indexer = %p, Token = %p, Object = %p,"
281 " Offset = 0x%x, Identifier = 0x%x\n",
283 (*NodeIndexer)->Token,
284 (*NodeIndexer)->Object,
285 (*NodeIndexer)->Offset,
286 (*NodeIndexer)->Identifier
309 ASSERT (Node !=
NULL);
315 (Node->IdMappingCount *
337 IN CONST UINT32 NodeStartOffset,
345 ASSERT (NodeList !=
NULL);
348 while (NodeCount-- != 0) {
349 (*NodeIndexer)->Token = NodeList->Token;
350 (*NodeIndexer)->Object = (VOID *)NodeList;
351 (*NodeIndexer)->Offset = (UINT32)(Size + NodeStartOffset);
352 (*NodeIndexer)->Identifier = NodeList->Identifier;
355 "IORT: Node Indexer = %p, Token = %p, Object = %p,"
356 " Offset = 0x%x, Identifier = 0x%x\n",
358 (*NodeIndexer)->Token,
359 (*NodeIndexer)->Object,
360 (*NodeIndexer)->Offset,
361 (*NodeIndexer)->Identifier
384 ASSERT (Node !=
NULL);
392 (Node->IdMappingCount *
394 (Node->ContextInterruptCount *
396 (Node->PmuInterruptCount *
418 IN CONST UINT32 NodeStartOffset,
426 ASSERT (NodeList !=
NULL);
429 while (NodeCount-- != 0) {
430 (*NodeIndexer)->Token = NodeList->Token;
431 (*NodeIndexer)->Object = (VOID *)NodeList;
432 (*NodeIndexer)->Offset = (UINT32)(Size + NodeStartOffset);
433 (*NodeIndexer)->Identifier = NodeList->Identifier;
436 "IORT: Node Indexer = %p, Token = %p, Object = %p,"
437 " Offset = 0x%x, Identifier = 0x%x\n",
439 (*NodeIndexer)->Token,
440 (*NodeIndexer)->Object,
441 (*NodeIndexer)->Offset,
442 (*NodeIndexer)->Identifier
465 ASSERT (Node !=
NULL);
471 (Node->IdMappingCount *
493 IN CONST UINT32 NodeStartOffset,
501 ASSERT (NodeList !=
NULL);
504 while (NodeCount-- != 0) {
505 (*NodeIndexer)->Token = NodeList->Token;
506 (*NodeIndexer)->Object = (VOID *)NodeList;
507 (*NodeIndexer)->Offset = (UINT32)(Size + NodeStartOffset);
508 (*NodeIndexer)->Identifier = NodeList->Identifier;
511 "IORT: Node Indexer = %p, Token = %p, Object = %p,"
512 " Offset = 0x%x, Identifier = 0x%x\n",
514 (*NodeIndexer)->Token,
515 (*NodeIndexer)->Object,
516 (*NodeIndexer)->Offset,
517 (*NodeIndexer)->Identifier
540 ASSERT (Node !=
NULL);
546 (Node->IdMappingCount *
568 IN CONST UINT32 NodeStartOffset,
576 ASSERT (NodeList !=
NULL);
579 while (NodeCount-- != 0) {
580 (*NodeIndexer)->Token = NodeList->Token;
581 (*NodeIndexer)->Object = (VOID *)NodeList;
582 (*NodeIndexer)->Offset = (UINT32)(Size + NodeStartOffset);
583 (*NodeIndexer)->Identifier = NodeList->Identifier;
586 "IORT: Node Indexer = %p, Token = %p, Object = %p,"
587 " Offset = 0x%x, Identifier = 0x%x\n",
589 (*NodeIndexer)->Token,
590 (*NodeIndexer)->Object,
591 (*NodeIndexer)->Offset,
592 (*NodeIndexer)->Identifier
615 ASSERT (Node !=
NULL);
622 (Node->IdMappingCount *
624 (Node->MemRangeDescCount *
646 IN CONST UINT32 NodeStartOffset,
654 ASSERT (NodeList !=
NULL);
657 while (NodeCount-- != 0) {
658 (*NodeIndexer)->Token = NodeList->Token;
659 (*NodeIndexer)->Object = (VOID *)NodeList;
660 (*NodeIndexer)->Offset = (UINT32)(Size + NodeStartOffset);
661 (*NodeIndexer)->Identifier = NodeList->Identifier;
664 "IORT: Node Indexer = %p, Token = %p, Object = %p,"
665 " Offset = 0x%x, Identifier = 0x%x\n",
667 (*NodeIndexer)->Token,
668 (*NodeIndexer)->Object,
669 (*NodeIndexer)->Offset,
670 (*NodeIndexer)->Identifier
699 OUT UINT32 *NodeOffset
704 "IORT: Node Indexer: Search Token = %p\n",
707 while (NodeCount-- != 0) {
710 "IORT: Node Indexer: NodeIndexer->Token = %p, Offset = %d\n",
714 if (NodeIndexer->Token == Token) {
715 *NodeOffset = NodeIndexer->Offset;
718 "IORT: Node Indexer: Token = %p, Found\n",
729 "IORT: Node Indexer: Token = %p, Not Found\n",
732 return EFI_NOT_FOUND;
764 UINT32 IdMappingCount;
767 ASSERT (IdMapArray !=
NULL);
772 Status = GetEArmObjIdMappingArray (
778 if (EFI_ERROR (Status)) {
781 "ERROR: IORT: Failed to get Id Mapping array. Status = %r\n",
787 if (IdMappingCount < IdCount) {
790 "ERROR: IORT: Failed to get the required number of Id Mappings.\n"
792 return EFI_NOT_FOUND;
796 while (IdCount-- != 0) {
801 &IdMapArray->OutputReference
803 if (EFI_ERROR (Status)) {
806 "ERROR: IORT: Failed to get Output Reference for ITS Identifier array."
807 "Reference Token = %p"
815 IdMapArray->InputBase = IdMappings->
InputBase;
816 IdMapArray->NumIds = IdMappings->
NumIds;
817 IdMapArray->OutputBase = IdMappings->
OutputBase;
818 IdMapArray->Flags = IdMappings->
Flags;
851 IN CONST UINT32 NodesStartOffset,
860 UINT32 ItsIdentifierCount;
864 ASSERT (Iort !=
NULL);
869 while (NodeCount-- != 0) {
871 if (NodeLength > MAX_UINT16) {
872 Status = EFI_INVALID_PARAMETER;
875 "ERROR: IORT: ITS Id Array Node length 0x%lx > MAX_UINT16."
884 ItsGroupNode->Node.Type = EFI_ACPI_IORT_TYPE_ITS_GROUP;
885 ItsGroupNode->Node.Length = (UINT16)NodeLength;
886 ItsGroupNode->Node.NumIdMappings = 0;
887 ItsGroupNode->Node.IdReference = 0;
889 if (AcpiTableInfo->AcpiTableRevision <
890 EFI_ACPI_IO_REMAPPING_TABLE_REVISION_05)
892 ItsGroupNode->Node.Revision = 0;
893 ItsGroupNode->Node.Identifier = EFI_ACPI_RESERVED_DWORD;
895 ItsGroupNode->Node.Revision = 1;
896 ItsGroupNode->Node.Identifier = NodeList->Identifier;
900 ItsGroupNode->NumItsIdentifiers = NodeList->ItsIdCount;
901 ItsIds = (UINT32 *)((UINT8 *)ItsGroupNode +
904 Status = GetEArmObjGicItsIdentifierArray (
906 NodeList->ItsIdToken,
910 if (EFI_ERROR (Status)) {
913 "ERROR: IORT: Failed to get ITS Identifier array. Status = %r\n",
919 if (ItsIdentifierCount < ItsGroupNode->NumItsIdentifiers) {
922 "ERROR: IORT: Failed to get the required number of ITS Identifiers.\n"
924 return EFI_NOT_FOUND;
928 for (IdIndex = 0; IdIndex < ItsGroupNode->NumItsIdentifiers; IdIndex++) {
929 ItsIds[IdIndex] = ItsIdentifier[IdIndex].
ItsId;
934 ItsGroupNode->Node.Length);
968 IN CONST UINT32 NodesStartOffset,
977 UINTN ObjectNameLength;
980 ASSERT (Iort !=
NULL);
985 while (NodeCount-- != 0) {
987 if (NodeLength > MAX_UINT16) {
988 Status = EFI_INVALID_PARAMETER;
991 "ERROR: IORT: Named Component Node length 0x%lx > MAX_UINT16."
1000 NcNode->Node.Type = EFI_ACPI_IORT_TYPE_NAMED_COMP;
1001 NcNode->Node.Length = (UINT16)NodeLength;
1002 NcNode->Node.NumIdMappings = NodeList->IdMappingCount;
1004 if (AcpiTableInfo->AcpiTableRevision <
1005 EFI_ACPI_IO_REMAPPING_TABLE_REVISION_05)
1007 NcNode->Node.Revision = 2;
1008 NcNode->Node.Identifier = EFI_ACPI_RESERVED_DWORD;
1010 NcNode->Node.Revision = 4;
1011 NcNode->Node.Identifier = NodeList->Identifier;
1014 ObjectNameLength =
AsciiStrLen (NodeList->ObjectName) + 1;
1015 NcNode->Node.IdReference = (NodeList->IdMappingCount == 0) ?
1020 NcNode->Flags = NodeList->Flags;
1021 NcNode->CacheCoherent = NodeList->CacheCoherent;
1022 NcNode->AllocationHints = NodeList->AllocationHints;
1023 NcNode->Reserved = EFI_ACPI_RESERVED_WORD;
1024 NcNode->MemoryAccessFlags = NodeList->MemoryAccessFlags;
1025 NcNode->AddressSizeLimit = NodeList->AddressSizeLimit;
1028 ObjectName = (CHAR8 *)((UINT8 *)NcNode +
1033 NodeList->ObjectName
1035 if (EFI_ERROR (Status)) {
1038 "ERROR: IORT: Failed to copy Object Name. Status = %r\n",
1044 if (NodeList->IdMappingCount > 0) {
1046 Status = EFI_INVALID_PARAMETER;
1049 "ERROR: IORT: Invalid Id Mapping token,"
1050 " Token = 0x%x, Status =%r\n",
1051 NodeList->IdMappingToken,
1059 NcNode->Node.IdReference);
1065 NodeList->IdMappingCount,
1066 NodeList->IdMappingToken
1068 if (EFI_ERROR (Status)) {
1071 "ERROR: IORT: Failed to add Id Mapping Array. Status = %r\n",
1080 NcNode->Node.Length);
1113 IN CONST UINT32 NodesStartOffset,
1123 ASSERT (Iort !=
NULL);
1128 while (NodeCount-- != 0) {
1130 if (NodeLength > MAX_UINT16) {
1131 Status = EFI_INVALID_PARAMETER;
1134 "ERROR: IORT: Root Complex Node length 0x%lx > MAX_UINT16."
1143 RcNode->Node.Type = EFI_ACPI_IORT_TYPE_ROOT_COMPLEX;
1144 RcNode->Node.Length = (UINT16)NodeLength;
1145 RcNode->Node.NumIdMappings = NodeList->IdMappingCount;
1146 RcNode->Node.IdReference = (NodeList->IdMappingCount == 0) ?
1149 if (AcpiTableInfo->AcpiTableRevision <
1150 EFI_ACPI_IO_REMAPPING_TABLE_REVISION_05)
1152 RcNode->Node.Revision = 1;
1153 RcNode->Node.Identifier = EFI_ACPI_RESERVED_DWORD;
1154 RcNode->PasidCapabilities = EFI_ACPI_RESERVED_WORD;
1156 RcNode->Node.Revision = 4;
1157 RcNode->Node.Identifier = NodeList->Identifier;
1158 RcNode->PasidCapabilities = NodeList->PasidCapabilities;
1159 RcNode->Flags = NodeList->Flags;
1163 RcNode->CacheCoherent = NodeList->CacheCoherent;
1164 RcNode->AllocationHints = NodeList->AllocationHints;
1165 RcNode->Reserved = EFI_ACPI_RESERVED_WORD;
1166 RcNode->MemoryAccessFlags = NodeList->MemoryAccessFlags;
1167 RcNode->AtsAttribute = NodeList->AtsAttribute;
1168 RcNode->PciSegmentNumber = NodeList->PciSegmentNumber;
1169 RcNode->MemoryAddressSize = NodeList->MemoryAddressSize;
1170 RcNode->Reserved1[0] = EFI_ACPI_RESERVED_BYTE;
1172 if (NodeList->IdMappingCount > 0) {
1174 Status = EFI_INVALID_PARAMETER;
1177 "ERROR: IORT: Invalid Id Mapping token,"
1178 " Token = 0x%x, Status =%r\n",
1179 NodeList->IdMappingToken,
1187 RcNode->Node.IdReference);
1192 NodeList->IdMappingCount,
1193 NodeList->IdMappingToken
1195 if (EFI_ERROR (Status)) {
1198 "ERROR: IORT: Failed to add Id Mapping Array. Status = %r\n",
1207 RcNode->Node.Length);
1235 IN UINT32 InterruptCount,
1241 UINT32 SmmuInterruptCount;
1243 ASSERT (InterruptArray !=
NULL);
1246 Status = GetEArmObjSmmuInterruptArray (
1252 if (EFI_ERROR (Status)) {
1255 "ERROR: IORT: Failed to get SMMU Interrupt array. Status = %r\n",
1261 if (SmmuInterruptCount < InterruptCount) {
1264 "ERROR: IORT: Failed to get the required number of SMMU Interrupts.\n"
1266 return EFI_NOT_FOUND;
1270 while (InterruptCount-- != 0) {
1271 InterruptArray->Interrupt = SmmuInterrupt->
Interrupt;
1272 InterruptArray->InterruptFlags = SmmuInterrupt->
Flags;
1304 IN CONST UINT32 NodesStartOffset,
1318 ASSERT (Iort !=
NULL);
1323 while (NodeCount-- != 0) {
1325 if (NodeLength > MAX_UINT16) {
1326 Status = EFI_INVALID_PARAMETER;
1329 "ERROR: IORT: SMMU V1/V2 Node length 0x%lx > MAX_UINT16. Status = %r\n",
1337 SmmuNode->Node.Type = EFI_ACPI_IORT_TYPE_SMMUv1v2;
1338 SmmuNode->Node.Length = (UINT16)NodeLength;
1339 SmmuNode->Node.NumIdMappings = NodeList->IdMappingCount;
1340 SmmuNode->Node.IdReference = (NodeList->IdMappingCount == 0) ?
1342 (NodeList->ContextInterruptCount *
1344 (NodeList->PmuInterruptCount *
1347 if (AcpiTableInfo->AcpiTableRevision <
1348 EFI_ACPI_IO_REMAPPING_TABLE_REVISION_05)
1350 SmmuNode->Node.Revision = 1;
1351 SmmuNode->Node.Identifier = EFI_ACPI_RESERVED_DWORD;
1353 SmmuNode->Node.Revision = 3;
1354 SmmuNode->Node.Identifier = NodeList->Identifier;
1358 SmmuNode->Base = NodeList->BaseAddress;
1359 SmmuNode->Span = NodeList->Span;
1360 SmmuNode->Model = NodeList->Model;
1361 SmmuNode->Flags = NodeList->Flags;
1364 SmmuNode->GlobalInterruptArrayRef =
1369 SmmuNode->NumContextInterrupts = NodeList->ContextInterruptCount;
1370 if (NodeList->ContextInterruptCount != 0) {
1371 SmmuNode->ContextInterruptArrayRef = Offset;
1372 ContextInterruptArray =
1374 Offset += (NodeList->ContextInterruptCount *
1379 SmmuNode->NumPmuInterrupts = NodeList->PmuInterruptCount;
1380 if (NodeList->PmuInterruptCount != 0) {
1381 SmmuNode->PmuInterruptArrayRef = Offset;
1386 SmmuNode->SMMU_NSgIrpt = NodeList->SMMU_NSgIrpt;
1387 SmmuNode->SMMU_NSgIrptFlags = NodeList->SMMU_NSgIrptFlags;
1388 SmmuNode->SMMU_NSgCfgIrpt = NodeList->SMMU_NSgCfgIrpt;
1389 SmmuNode->SMMU_NSgCfgIrptFlags = NodeList->SMMU_NSgCfgIrptFlags;
1391 if (NodeList->ContextInterruptCount != 0) {
1393 Status = EFI_INVALID_PARAMETER;
1396 "ERROR: IORT: Invalid Context Interrupt token,"
1397 " Token = 0x%x, Status =%r\n",
1398 NodeList->ContextInterruptToken,
1407 ContextInterruptArray,
1408 SmmuNode->NumContextInterrupts,
1409 NodeList->ContextInterruptToken
1411 if (EFI_ERROR (Status)) {
1414 "ERROR: IORT: Failed to Context Interrupt Array. Status = %r\n",
1422 if (SmmuNode->NumPmuInterrupts != 0) {
1424 Status = EFI_INVALID_PARAMETER;
1427 "ERROR: IORT: Invalid PMU Interrupt token,"
1428 " Token = 0x%x, Status =%r\n",
1429 NodeList->PmuInterruptToken,
1438 SmmuNode->NumPmuInterrupts,
1439 NodeList->PmuInterruptToken
1441 if (EFI_ERROR (Status)) {
1444 "ERROR: IORT: Failed to PMU Interrupt Array. Status = %r\n",
1451 if (NodeList->IdMappingCount > 0) {
1453 Status = EFI_INVALID_PARAMETER;
1456 "ERROR: IORT: Invalid Id Mapping token,"
1457 " Token = 0x%x, Status =%r\n",
1458 NodeList->IdMappingToken,
1466 SmmuNode->Node.IdReference);
1471 NodeList->IdMappingCount,
1472 NodeList->IdMappingToken
1474 if (EFI_ERROR (Status)) {
1477 "ERROR: IORT: Failed to add Id Mapping Array. Status = %r\n",
1486 SmmuNode->Node.Length);
1517 IN CONST UINT32 NodesStartOffset,
1527 ASSERT (Iort !=
NULL);
1532 while (NodeCount-- != 0) {
1534 if (NodeLength > MAX_UINT16) {
1535 Status = EFI_INVALID_PARAMETER;
1538 "ERROR: IORT: SMMU V3 Node length 0x%lx > MAX_UINT16. Status = %r\n",
1546 SmmuV3Node->Node.Type = EFI_ACPI_IORT_TYPE_SMMUv3;
1547 SmmuV3Node->Node.Length = (UINT16)NodeLength;
1548 SmmuV3Node->Node.NumIdMappings = NodeList->IdMappingCount;
1549 SmmuV3Node->Node.IdReference = (NodeList->IdMappingCount == 0) ?
1552 if (AcpiTableInfo->AcpiTableRevision <
1553 EFI_ACPI_IO_REMAPPING_TABLE_REVISION_05)
1555 SmmuV3Node->Node.Revision = 2;
1556 SmmuV3Node->Node.Identifier = EFI_ACPI_RESERVED_DWORD;
1558 SmmuV3Node->Node.Revision = 4;
1559 SmmuV3Node->Node.Identifier = NodeList->Identifier;
1563 SmmuV3Node->Base = NodeList->BaseAddress;
1564 SmmuV3Node->Flags = NodeList->Flags;
1565 SmmuV3Node->Reserved = EFI_ACPI_RESERVED_WORD;
1566 SmmuV3Node->VatosAddress = NodeList->VatosAddress;
1567 SmmuV3Node->Model = NodeList->Model;
1568 SmmuV3Node->Event = NodeList->EventInterrupt;
1569 SmmuV3Node->Pri = NodeList->PriInterrupt;
1570 SmmuV3Node->Gerr = NodeList->GerrInterrupt;
1571 SmmuV3Node->Sync = NodeList->SyncInterrupt;
1573 if ((SmmuV3Node->Flags & EFI_ACPI_IORT_SMMUv3_FLAG_PROXIMITY_DOMAIN) != 0) {
1575 SmmuV3Node->ProximityDomain = NodeList->ProximityDomain;
1577 SmmuV3Node->ProximityDomain = 0;
1580 if ((SmmuV3Node->Event != 0) && (SmmuV3Node->Pri != 0) &&
1581 (SmmuV3Node->Gerr != 0) && (SmmuV3Node->Sync != 0))
1585 SmmuV3Node->DeviceIdMappingIndex = 0;
1587 SmmuV3Node->DeviceIdMappingIndex = NodeList->DeviceIdMappingIndex;
1590 if (NodeList->IdMappingCount > 0) {
1592 Status = EFI_INVALID_PARAMETER;
1595 "ERROR: IORT: Invalid Id Mapping token,"
1596 " Token = 0x%x, Status =%r\n",
1597 NodeList->IdMappingToken,
1605 SmmuV3Node->Node.IdReference);
1610 NodeList->IdMappingCount,
1611 NodeList->IdMappingToken
1613 if (EFI_ERROR (Status)) {
1616 "ERROR: IORT: Failed to add Id Mapping Array. Status = %r\n",
1625 SmmuV3Node->Node.Length);
1656 IN CONST UINT32 NodesStartOffset,
1667 ASSERT (Iort !=
NULL);
1673 while (NodeCount-- != 0) {
1675 if (NodeLength > MAX_UINT16) {
1676 Status = EFI_INVALID_PARAMETER;
1679 "ERROR: IORT: PMCG Node length 0x%lx > MAX_UINT16. Status = %r\n",
1687 PmcgNode->Node.Type = EFI_ACPI_IORT_TYPE_PMCG;
1688 PmcgNode->Node.Length = (UINT16)NodeLength;
1689 PmcgNode->Node.NumIdMappings = NodeList->IdMappingCount;
1690 PmcgNode->Node.IdReference = (NodeList->IdMappingCount == 0) ?
1693 if (AcpiTableInfo->AcpiTableRevision <
1694 EFI_ACPI_IO_REMAPPING_TABLE_REVISION_05)
1696 PmcgNode->Node.Revision = 1;
1697 PmcgNode->Node.Identifier = EFI_ACPI_RESERVED_DWORD;
1699 PmcgNode->Node.Revision = 2;
1700 PmcgNode->Node.Identifier = NodeList->Identifier;
1704 PmcgNode->Base = NodeList->BaseAddress;
1705 PmcgNode->OverflowInterruptGsiv = NodeList->OverflowInterrupt;
1706 PmcgNode->Page1Base = NodeList->Page1BaseAddress;
1711 NodeList->ReferenceToken,
1712 &PmcgNode->NodeReference
1714 if (EFI_ERROR (Status)) {
1717 "ERROR: IORT: Failed to get Output Reference for PMCG Node."
1718 "Reference Token = %p"
1720 NodeList->ReferenceToken,
1726 if (NodeList->IdMappingCount > 0) {
1728 Status = EFI_INVALID_PARAMETER;
1731 "ERROR: IORT: Invalid Id Mapping token,"
1732 " Token = 0x%x, Status =%r\n",
1733 NodeList->IdMappingToken,
1741 PmcgNode->Node.IdReference);
1747 NodeList->IdMappingCount,
1748 NodeList->IdMappingToken
1750 if (EFI_ERROR (Status)) {
1753 "ERROR: IORT: Failed to add Id Mapping Array. Status = %r\n",
1762 PmcgNode->Node.Length);
1793 IN UINT32 DescCount,
1799 UINT32 MemRangeDescCount;
1801 ASSERT (DescArray !=
NULL);
1804 Status = GetEArmObjMemoryRangeDescriptor (
1810 if (EFI_ERROR (Status)) {
1813 "ERROR: IORT: Failed to get Memory Range Descriptor array. Status = %r\n",
1819 if (MemRangeDescCount < DescCount) {
1822 "ERROR: IORT: Failed to get the required number of Memory"
1823 " Range Descriptors.\n"
1825 return EFI_NOT_FOUND;
1829 while (DescCount-- != 0) {
1831 DescArray->Length = MemRangeDesc->
Length;
1832 DescArray->Reserved = EFI_ACPI_RESERVED_DWORD;
1865 IN CONST UINT32 NodesStartOffset,
1876 ASSERT (Iort !=
NULL);
1881 while (NodeCount-- != 0) {
1883 if (NodeLength > MAX_UINT16) {
1884 Status = EFI_INVALID_PARAMETER;
1887 "ERROR: IORT: RMR Node length 0x%lx > MAX_UINT16. Status = %r\n",
1894 if (NodeList->MemRangeDescCount == 0) {
1895 Status = EFI_INVALID_PARAMETER;
1898 "ERROR: IORT: Memory Range Desc count = %d. Status = %r\n",
1899 NodeList->MemRangeDescCount,
1906 Status = EFI_INVALID_PARAMETER;
1909 "ERROR: IORT: Invalid Memory Range Descriptor token,"
1910 " Token = 0x%x. Status = %r\n",
1911 NodeList->MemRangeDescToken,
1918 RmrNode->Node.Type = EFI_ACPI_IORT_TYPE_RMR;
1919 RmrNode->Node.Length = (UINT16)NodeLength;
1920 RmrNode->Node.Revision = 3;
1921 RmrNode->Node.Identifier = NodeList->Identifier;
1922 RmrNode->Node.NumIdMappings = NodeList->IdMappingCount;
1923 RmrNode->Node.IdReference = (NodeList->IdMappingCount == 0) ?
1927 RmrNode->
Flags = NodeList->Flags;
1931 (NodeList->IdMappingCount *
1934 if (NodeList->IdMappingCount > 0) {
1936 Status = EFI_INVALID_PARAMETER;
1939 "ERROR: IORT: Invalid Id Mapping token,"
1940 " Token = 0x%x, Status =%r\n",
1941 NodeList->IdMappingToken,
1949 RmrNode->Node.IdReference);
1955 NodeList->IdMappingCount,
1956 NodeList->IdMappingToken
1958 if (EFI_ERROR (Status)) {
1961 "ERROR: IORT: Failed to add Id Mapping Array. Status = %r\n",
1978 NodeList->MemRangeDescCount,
1979 NodeList->MemRangeDescToken
1981 if (EFI_ERROR (Status)) {
1984 "ERROR: IORT: Failed to Memory Range Descriptor Array. Status = %r\n",
1992 RmrNode->Node.Length);
2017 for (IndexI = 0; IndexI < NodeCount; IndexI++) {
2018 for (IndexJ = 0; IndexJ < NodeCount; IndexJ++) {
2019 if ((IndexI != IndexJ) &&
2020 (NodeIndexer[IndexI].Identifier == NodeIndexer[IndexJ].Identifier))
2024 "ERROR: IORT: UID %d of Token %p matches with that of Token %p.\n",
2025 NodeIndexer[IndexI].Identifier,
2026 NodeIndexer[IndexI].Token,
2027 NodeIndexer[IndexJ].Token
2029 return EFI_INVALID_PARAMETER;
2074 UINT32 IortNodeCount;
2075 UINT32 ItsGroupNodeCount;
2076 UINT32 NamedComponentNodeCount;
2077 UINT32 RootComplexNodeCount;
2078 UINT32 SmmuV1V2NodeCount;
2079 UINT32 SmmuV3NodeCount;
2080 UINT32 PmcgNodeCount;
2081 UINT32 RmrNodeCount;
2083 UINT32 ItsGroupOffset;
2084 UINT32 NamedComponentOffset;
2085 UINT32 RootComplexOffset;
2086 UINT32 SmmuV1V2Offset;
2087 UINT32 SmmuV3Offset;
2103 ASSERT (This !=
NULL);
2104 ASSERT (AcpiTableInfo !=
NULL);
2105 ASSERT (CfgMgrProtocol !=
NULL);
2106 ASSERT (Table !=
NULL);
2107 ASSERT (AcpiTableInfo->TableGeneratorId == This->GeneratorID);
2108 ASSERT (AcpiTableInfo->AcpiTableSignature == This->AcpiTableSignature);
2112 if ((AcpiTableInfo->AcpiTableRevision < This->MinAcpiTableRevision) ||
2113 (AcpiTableInfo->AcpiTableRevision > This->AcpiTableRevision))
2117 "ERROR: IORT: Requested table revision = %d, is not supported."
2118 "Supported table revision: Minimum = %d, Maximum = %d\n",
2119 AcpiTableInfo->AcpiTableRevision,
2120 This->MinAcpiTableRevision,
2121 This->AcpiTableRevision
2123 return EFI_INVALID_PARAMETER;
2126 if ((AcpiTableInfo->AcpiTableRevision > EFI_ACPI_IO_REMAPPING_TABLE_REVISION_00) &&
2127 (AcpiTableInfo->AcpiTableRevision < EFI_ACPI_IO_REMAPPING_TABLE_REVISION_05))
2131 "ERROR: IORT: Revisions E (1), E.a(2),b(3),c(4) are not supported.\n"
2133 return EFI_INVALID_PARAMETER;
2140 Status = GetEArmObjItsGroup (
2146 if (EFI_ERROR (Status) && (Status != EFI_NOT_FOUND)) {
2149 "ERROR: IORT: Failed to get ITS Group Node Info. Status = %r\n",
2156 IortNodeCount = ItsGroupNodeCount;
2159 Status = GetEArmObjNamedComponent (
2162 &NamedComponentNodeList,
2163 &NamedComponentNodeCount
2165 if (EFI_ERROR (Status) && (Status != EFI_NOT_FOUND)) {
2168 "ERROR: IORT: Failed to get Named Component Node Info. Status = %r\n",
2175 IortNodeCount += NamedComponentNodeCount;
2178 Status = GetEArmObjRootComplex (
2181 &RootComplexNodeList,
2182 &RootComplexNodeCount
2184 if (EFI_ERROR (Status) && (Status != EFI_NOT_FOUND)) {
2187 "ERROR: IORT: Failed to get Root Complex Node Info. Status = %r\n",
2194 IortNodeCount += RootComplexNodeCount;
2197 Status = GetEArmObjSmmuV1SmmuV2 (
2203 if (EFI_ERROR (Status) && (Status != EFI_NOT_FOUND)) {
2206 "ERROR: IORT: Failed to get SMMUv1/SMMUv2 Node Info. Status = %r\n",
2213 IortNodeCount += SmmuV1V2NodeCount;
2216 Status = GetEArmObjSmmuV3 (
2222 if (EFI_ERROR (Status) && (Status != EFI_NOT_FOUND)) {
2225 "ERROR: IORT: Failed to get SMMUv3 Node Info. Status = %r\n",
2232 IortNodeCount += SmmuV3NodeCount;
2235 Status = GetEArmObjPmcg (
2241 if (EFI_ERROR (Status) && (Status != EFI_NOT_FOUND)) {
2244 "ERROR: IORT: Failed to get PMCG Node Info. Status = %r\n",
2251 IortNodeCount += PmcgNodeCount;
2253 if (AcpiTableInfo->AcpiTableRevision >=
2254 EFI_ACPI_IO_REMAPPING_TABLE_REVISION_05)
2257 Status = GetEArmObjRmr (
2263 if (EFI_ERROR (Status) && (Status != EFI_NOT_FOUND)) {
2266 "ERROR: IORT: Failed to get RMR Node Info. Status = %r\n",
2273 IortNodeCount += RmrNodeCount;
2281 if (NodeIndexer ==
NULL) {
2282 Status = EFI_OUT_OF_RESOURCES;
2285 "ERROR: IORT: Failed to allocate memory for Node Indexer" \
2292 DEBUG ((DEBUG_INFO,
"INFO: NodeIndexer = %p\n", NodeIndexer));
2293 Generator->IortNodeCount = IortNodeCount;
2300 if (ItsGroupNodeCount > 0) {
2301 ItsGroupOffset = (UINT32)TableSize;
2309 if (NodeSize > MAX_UINT32) {
2310 Status = EFI_INVALID_PARAMETER;
2313 "ERROR: IORT: Invalid Size of Group Nodes. Status = %r\n",
2319 TableSize += NodeSize;
2323 " ItsGroupNodeCount = %d\n" \
2324 " ItsGroupOffset = %d\n",
2331 if (NamedComponentNodeCount > 0) {
2332 NamedComponentOffset = (UINT32)TableSize;
2335 NamedComponentOffset,
2336 NamedComponentNodeList,
2337 NamedComponentNodeCount,
2340 if (NodeSize > MAX_UINT32) {
2341 Status = EFI_INVALID_PARAMETER;
2344 "ERROR: IORT: Invalid Size of Named Component Nodes. Status = %r\n",
2350 TableSize += NodeSize;
2354 " NamedComponentNodeCount = %d\n" \
2355 " NamedComponentOffset = %d\n",
2356 NamedComponentNodeCount,
2357 NamedComponentOffset
2362 if (RootComplexNodeCount > 0) {
2363 RootComplexOffset = (UINT32)TableSize;
2367 RootComplexNodeList,
2368 RootComplexNodeCount,
2371 if (NodeSize > MAX_UINT32) {
2372 Status = EFI_INVALID_PARAMETER;
2375 "ERROR: IORT: Invalid Size of Root Complex Nodes. Status = %r\n",
2381 TableSize += NodeSize;
2385 " RootComplexNodeCount = %d\n" \
2386 " RootComplexOffset = %d\n",
2387 RootComplexNodeCount,
2393 if (SmmuV1V2NodeCount > 0) {
2394 SmmuV1V2Offset = (UINT32)TableSize;
2402 if (NodeSize > MAX_UINT32) {
2403 Status = EFI_INVALID_PARAMETER;
2406 "ERROR: IORT: Invalid Size of SMMUv1/v2 Nodes. Status = %r\n",
2412 TableSize += NodeSize;
2416 " SmmuV1V2NodeCount = %d\n" \
2417 " SmmuV1V2Offset = %d\n",
2424 if (SmmuV3NodeCount > 0) {
2425 SmmuV3Offset = (UINT32)TableSize;
2433 if (NodeSize > MAX_UINT32) {
2434 Status = EFI_INVALID_PARAMETER;
2437 "ERROR: IORT: Invalid Size of SMMUv3 Nodes. Status = %r\n",
2443 TableSize += NodeSize;
2447 " SmmuV3NodeCount = %d\n" \
2448 " SmmuV3Offset = %d\n",
2455 if (PmcgNodeCount > 0) {
2456 PmcgOffset = (UINT32)TableSize;
2464 if (NodeSize > MAX_UINT32) {
2465 Status = EFI_INVALID_PARAMETER;
2468 "ERROR: IORT: Invalid Size of PMCG Nodes. Status = %r\n",
2474 TableSize += NodeSize;
2478 " PmcgNodeCount = %d\n" \
2479 " PmcgOffset = %d\n",
2486 if ((AcpiTableInfo->AcpiTableRevision >=
2487 EFI_ACPI_IO_REMAPPING_TABLE_REVISION_05) &&
2490 RmrOffset = (UINT32)TableSize;
2498 if (NodeSize > MAX_UINT32) {
2499 Status = EFI_INVALID_PARAMETER;
2502 "ERROR: IORT: Invalid Size of RMR Nodes. Status = %r\n",
2508 TableSize += NodeSize;
2512 " RmrNodeCount = %d\n" \
2513 " RmrOffset = %d\n",
2522 " IortNodeCount = %d\n" \
2523 " TableSize = 0x%lx\n",
2528 if (TableSize > MAX_UINT32) {
2529 Status = EFI_INVALID_PARAMETER;
2532 "ERROR: IORT: IORT Table Size 0x%lx > MAX_UINT32," \
2541 if (AcpiTableInfo->AcpiTableRevision >=
2542 EFI_ACPI_IO_REMAPPING_TABLE_REVISION_05)
2545 if (EFI_ERROR (Status)) {
2548 "ERROR: IORT: Node Identifier not unique. Status = %r\n",
2557 if (*Table ==
NULL) {
2558 Status = EFI_OUT_OF_RESOURCES;
2561 "ERROR: IORT: Failed to allocate memory for IORT Table, Size = %d," \
2573 "IORT: Iort = 0x%p TableSize = 0x%lx\n",
2585 if (EFI_ERROR (Status)) {
2588 "ERROR: IORT: Failed to add ACPI header. Status = %r\n",
2595 Iort->NumNodes = IortNodeCount;
2597 Iort->Reserved = EFI_ACPI_RESERVED_DWORD;
2599 if (ItsGroupNodeCount > 0) {
2609 if (EFI_ERROR (Status)) {
2612 "ERROR: IORT: Failed to add ITS Group Node. Status = %r\n",
2619 if (NamedComponentNodeCount > 0) {
2625 NamedComponentOffset,
2626 NamedComponentNodeList,
2627 NamedComponentNodeCount
2629 if (EFI_ERROR (Status)) {
2632 "ERROR: IORT: Failed to add Named Component Node. Status = %r\n",
2639 if (RootComplexNodeCount > 0) {
2646 RootComplexNodeList,
2647 RootComplexNodeCount
2649 if (EFI_ERROR (Status)) {
2652 "ERROR: IORT: Failed to add Root Complex Node. Status = %r\n",
2659 if (SmmuV1V2NodeCount > 0) {
2669 if (EFI_ERROR (Status)) {
2672 "ERROR: IORT: Failed to add SMMU v1/v2 Node. Status = %r\n",
2679 if (SmmuV3NodeCount > 0) {
2689 if (EFI_ERROR (Status)) {
2692 "ERROR: IORT: Failed to add SMMUv3 Node. Status = %r\n",
2699 if (PmcgNodeCount > 0) {
2709 if (EFI_ERROR (Status)) {
2712 "ERROR: IORT: Failed to add PMCG Node. Status = %r\n",
2719 if ((AcpiTableInfo->AcpiTableRevision >=
2720 EFI_ACPI_IO_REMAPPING_TABLE_REVISION_05) &&
2732 if (EFI_ERROR (Status)) {
2735 "ERROR: IORT: Failed to add RMR Node. Status = %r\n",
2750 if (*Table !=
NULL) {
2780 ASSERT (This !=
NULL);
2781 ASSERT (AcpiTableInfo !=
NULL);
2782 ASSERT (CfgMgrProtocol !=
NULL);
2783 ASSERT (AcpiTableInfo->TableGeneratorId == This->GeneratorID);
2784 ASSERT (AcpiTableInfo->AcpiTableSignature == This->AcpiTableSignature);
2794 if ((Table ==
NULL) || (*Table ==
NULL)) {
2795 DEBUG ((DEBUG_ERROR,
"ERROR: IORT: Invalid Table Pointer\n"));
2796 ASSERT ((Table !=
NULL) && (*Table !=
NULL));
2797 return EFI_INVALID_PARAMETER;
2807#define IORT_GENERATOR_REVISION CREATE_REVISION (1, 0)
2818 L
"ACPI.STD.IORT.GENERATOR",
2822 EFI_ACPI_IO_REMAPPING_TABLE_REVISION_05,
2824 EFI_ACPI_IO_REMAPPING_TABLE_REVISION_00,
2868 DEBUG ((DEBUG_INFO,
"IORT: Register Generator. Status = %r\n", Status));
2892 DEBUG ((DEBUG_INFO,
"Iort: Deregister Generator. Status = %r\n", Status));
#define EFI_ACPI_6_4_IO_REMAPPING_TABLE_SIGNATURE
EFI_STATUS EFIAPI RegisterAcpiTableGenerator(IN CONST ACPI_TABLE_GENERATOR *CONST Generator)
EFI_STATUS EFIAPI DeregisterAcpiTableGenerator(IN CONST ACPI_TABLE_GENERATOR *CONST Generator)
#define TABLE_GENERATOR_CREATOR_ID_ARM
#define CREATE_STD_ACPI_TABLE_GEN_ID(TableId)
@ EStdAcpiTableIdIort
IORT Generator.
@ EArmObjSmmuV3
15 - SMMUv3
@ EArmObjIdMappingArray
18 - ID Mapping Array
@ EArmObjSmmuV1SmmuV2
14 - SMMUv1 or SMMUv2
@ EArmObjRmr
21 - Reserved Memory Range Node
@ EArmObjSmmuInterruptArray
19 - SMMU Interrupt Array
@ EArmObjItsGroup
11 - ITS Group
@ EArmObjMemoryRangeDescriptor
22 - Memory Range Descriptor
@ EArmObjNamedComponent
12 - Named Component
@ EArmObjRootComplex
13 - Root Complex
@ EArmObjGicItsIdentifierArray
17 - GIC ITS Identifier Array
UINTN EFIAPI AsciiStrLen(IN CONST CHAR8 *String)
UINTN EFIAPI AsciiStrSize(IN CONST CHAR8 *String)
RETURN_STATUS EFIAPI AsciiStrCpyS(OUT CHAR8 *Destination, IN UINTN DestMax, IN CONST CHAR8 *Source)
#define GET_OBJECT_LIST(CmObjectNameSpace, CmObjectId, Type)
@ EObjNameSpaceArm
ARM Objects Namespace.
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
STATIC UINT32 GetRootComplexNodeSize(IN CONST CM_ARM_ROOT_COMPLEX_NODE *Node)
STATIC UINT32 GetItsGroupNodeSize(IN CONST CM_ARM_ITS_GROUP_NODE *Node)
STATIC EFI_STATUS AddNamedComponentNodes(IN CONST ACPI_TABLE_GENERATOR *CONST This, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo, IN CONST EFI_ACPI_6_0_IO_REMAPPING_TABLE *Iort, IN CONST UINT32 NodesStartOffset, IN CONST CM_ARM_NAMED_COMPONENT_NODE *NodeList, IN UINT32 NodeCount)
STATIC UINT32 GetSmmuV3NodeSize(IN CONST CM_ARM_SMMUV3_NODE *Node)
STATIC UINT32 GetPmcgNodeSize(IN CONST CM_ARM_PMCG_NODE *Node)
STATIC UINT64 GetSizeofPmcgNodes(IN CONST UINT32 NodeStartOffset, IN CONST CM_ARM_PMCG_NODE *NodeList, IN UINT32 NodeCount, IN OUT IORT_NODE_INDEXER **CONST NodeIndexer)
STATIC UINT64 GetSizeofItsGroupNodes(IN CONST UINT32 NodeStartOffset, IN CONST CM_ARM_ITS_GROUP_NODE *NodeList, IN UINT32 NodeCount, IN OUT IORT_NODE_INDEXER **CONST NodeIndexer)
STATIC UINT64 GetSizeofNamedComponentNodes(IN CONST UINT32 NodeStartOffset, IN CONST CM_ARM_NAMED_COMPONENT_NODE *NodeList, IN UINT32 NodeCount, IN OUT IORT_NODE_INDEXER **CONST NodeIndexer)
STATIC UINT32 GetSmmuV1V2NodeSize(IN CONST CM_ARM_SMMUV1_SMMUV2_NODE *Node)
STATIC ACPI_IORT_GENERATOR IortGenerator
#define IORT_GENERATOR_REVISION
STATIC EFI_STATUS AddPmcgNodes(IN CONST ACPI_TABLE_GENERATOR *CONST This, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo, IN CONST EFI_ACPI_6_0_IO_REMAPPING_TABLE *Iort, IN CONST UINT32 NodesStartOffset, IN CONST CM_ARM_PMCG_NODE *NodeList, IN UINT32 NodeCount)
STATIC UINT64 GetSizeofSmmuV3Nodes(IN CONST UINT32 NodeStartOffset, IN CONST CM_ARM_SMMUV3_NODE *NodeList, IN UINT32 NodeCount, IN OUT IORT_NODE_INDEXER **CONST NodeIndexer)
STATIC EFI_STATUS AddRmrNodes(IN CONST ACPI_TABLE_GENERATOR *CONST This, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo, IN CONST EFI_ACPI_6_0_IO_REMAPPING_TABLE *Iort, IN CONST UINT32 NodesStartOffset, IN CONST CM_ARM_RMR_NODE *NodeList, IN UINT32 NodeCount)
EFI_STATUS EFIAPI AcpiIortLibConstructor(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
STATIC UINT64 GetSizeofSmmuV1V2Nodes(IN CONST UINT32 NodeStartOffset, IN CONST CM_ARM_SMMUV1_SMMUV2_NODE *NodeList, IN UINT32 NodeCount, IN OUT IORT_NODE_INDEXER **CONST NodeIndexer)
STATIC EFI_STATUS AddRootComplexNodes(IN CONST ACPI_TABLE_GENERATOR *CONST This, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo, IN CONST EFI_ACPI_6_0_IO_REMAPPING_TABLE *Iort, IN CONST UINT32 NodesStartOffset, IN CONST CM_ARM_ROOT_COMPLEX_NODE *NodeList, IN UINT32 NodeCount)
STATIC EFI_STATUS ValidateNodeIdentifiers(IN CONST IORT_NODE_INDEXER *CONST NodeIndexer, IN UINT32 NodeCount)
STATIC EFI_STATUS AddMemRangeDescArray(IN CONST ACPI_TABLE_GENERATOR *CONST This, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN EFI_ACPI_6_0_IO_REMAPPING_MEM_RANGE_DESC *DescArray, IN UINT32 DescCount, IN CONST CM_OBJECT_TOKEN DescToken)
STATIC UINT32 GetNamedComponentNodeSize(IN CONST CM_ARM_NAMED_COMPONENT_NODE *Node)
STATIC EFI_STATUS AddSmmuV3Nodes(IN CONST ACPI_TABLE_GENERATOR *CONST This, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo, IN CONST EFI_ACPI_6_0_IO_REMAPPING_TABLE *Iort, IN CONST UINT32 NodesStartOffset, IN CONST CM_ARM_SMMUV3_NODE *NodeList, IN UINT32 NodeCount)
STATIC UINT64 GetSizeofRmrNodes(IN CONST UINT32 NodeStartOffset, IN CONST CM_ARM_RMR_NODE *NodeList, IN UINT32 NodeCount, IN OUT IORT_NODE_INDEXER **CONST NodeIndexer)
STATIC EFI_STATUS AddItsGroupNodes(IN CONST ACPI_TABLE_GENERATOR *CONST This, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo, IN CONST EFI_ACPI_6_0_IO_REMAPPING_TABLE *Iort, IN CONST UINT32 NodesStartOffset, IN CONST CM_ARM_ITS_GROUP_NODE *NodeList, IN UINT32 NodeCount)
EFI_STATUS EFIAPI AcpiIortLibDestructor(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
STATIC EFI_STATUS AddIdMappingArray(IN CONST ACPI_TABLE_GENERATOR *CONST This, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE *IdMapArray, IN UINT32 IdCount, IN CONST CM_OBJECT_TOKEN IdMappingToken)
STATIC EFI_STATUS FreeIortTableResources(IN CONST ACPI_TABLE_GENERATOR *CONST This, IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN OUT EFI_ACPI_DESCRIPTION_HEADER **CONST Table)
STATIC UINT32 GetRmrNodeSize(IN CONST CM_ARM_RMR_NODE *Node)
STATIC EFI_STATUS AddSmmuV1V2Nodes(IN CONST ACPI_TABLE_GENERATOR *CONST This, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo, IN CONST EFI_ACPI_6_0_IO_REMAPPING_TABLE *Iort, IN CONST UINT32 NodesStartOffset, IN CONST CM_ARM_SMMUV1_SMMUV2_NODE *NodeList, IN UINT32 NodeCount)
STATIC EFI_STATUS GetNodeOffsetReferencedByToken(IN IORT_NODE_INDEXER *NodeIndexer, IN UINT32 NodeCount, IN CM_OBJECT_TOKEN Token, OUT UINT32 *NodeOffset)
STATIC EFI_STATUS EFIAPI BuildIortTable(IN CONST ACPI_TABLE_GENERATOR *CONST This, IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, OUT EFI_ACPI_DESCRIPTION_HEADER **CONST Table)
STATIC EFI_STATUS AddSmmuInterruptArray(IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN OUT EFI_ACPI_6_0_IO_REMAPPING_SMMU_INT *InterruptArray, IN UINT32 InterruptCount, IN CONST CM_OBJECT_TOKEN InterruptToken)
STATIC UINT64 GetSizeofRootComplexNodes(IN CONST UINT32 NodeStartOffset, IN CONST CM_ARM_ROOT_COMPLEX_NODE *NodeList, IN UINT32 NodeCount, IN OUT IORT_NODE_INDEXER **CONST NodeIndexer)
#define ALIGN_VALUE(Value, Alignment)
#define OFFSET_OF(TYPE, Field)
#define ASSERT_EFI_ERROR(StatusParameter)
#define DEBUG(Expression)
EFI_STATUS EFIAPI AddAcpiHeader(IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN CONST ACPI_TABLE_GENERATOR *CONST Generator, IN OUT EFI_ACPI_DESCRIPTION_HEADER *CONST AcpiHeader, IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo, IN CONST UINT32 Length)
ACPI_TABLE_GENERATOR Header
ACPI Table generator header.
UINT32 Interrupt
Interrupt number.
UINT32 ItsId
The ITS Identifier.
CM_OBJECT_TOKEN OutputReferenceToken
Reference token for the output node.
UINT32 OutputBase
Output Base.
UINT32 NumIds
Number of input IDs.
UINT32 InputBase
Input base.
UINT32 MemRangeDescRef
Offset of the memory range descriptor array.
UINT32 NumMemRangeDesc
Memory range descriptor count.