Skip to content

Commit 954ee29

Browse files
sarah-walker-armmergify[bot]
authored andcommitted
DynamicTablesPkg/FdtHwInfoParserLib: Add Arm IORT parser
Add a parser for IORT. Currently generates PCI Root Complex and SMMUv3 nodes. Signed-off-by: Sarah Walker <[email protected]>
1 parent ba69c6d commit 954ee29

File tree

9 files changed

+1143
-1
lines changed

9 files changed

+1143
-1
lines changed

DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/TokenMapper.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ TokenMapperAddObject (
7272
(GET_CM_OBJECT_ID (ObjectId) == EArchCommonObjCmRef))
7373
{
7474
CmObjDesc->Count = Size / sizeof (CM_ARCH_COMMON_OBJ_REF);
75+
} else if ((GET_CM_NAMESPACE_ID (ObjectId) == EObjNameSpaceArm) &&
76+
(GET_CM_OBJECT_ID (ObjectId) == EArmObjIdMappingArray))
77+
{
78+
CmObjDesc->Count = Size / sizeof (CM_ARM_ID_MAPPING);
7579
} else {
7680
CmObjDesc->Count = 1;
7781
}

DynamicTablesPkg/Library/FdtHwInfoParserLib/Arm/ArmFdtHwInfoParser.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
#include "Arm/Gic/ArmGicDispatcher.h"
1313
#include "Pci/PciConfigSpaceParser.h"
1414
#include "Serial/SerialPortParser.h"
15+
#include "Arm/Iort/RootComplexParser.h"
16+
#include "Arm/Iort/SmmuV3Parser.h"
1517

1618
/** Ordered table of parsers/dispatchers.
1719
@@ -27,7 +29,9 @@ STATIC CONST FDT_HW_INFO_PARSER_FUNC HwInfoParserTable[] = {
2729
ArmGenericTimerInfoParser,
2830
ArmGicDispatcher,
2931
PciConfigInfoParser,
30-
SerialPortDispatcher
32+
SerialPortDispatcher,
33+
ArmPciRootComplexParser,
34+
ArmSmmuV3Parser
3135
};
3236

3337
/** Main dispatcher: sequentially call the parsers/dispatchers
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/** @file
2+
Arm IORT parser common functionality.
3+
4+
Copyright (c) 2025, ARM Limited. All rights reserved.<BR>
5+
SPDX-License-Identifier: BSD-2-Clause-Patent
6+
**/
7+
8+
#include <Library/BaseLib.h>
9+
#include "Arm/Iort/ArmIortParser.h"
10+
11+
STATIC UINT16 IortIdentifier = 0;
12+
13+
UINT16
14+
EFIAPI
15+
GetNextIortIdentifier (
16+
)
17+
{
18+
return IortIdentifier++;
19+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/** @file
2+
ARM IORT parser common functionality.
3+
4+
Copyright (c) 2025, Arm Limited. All rights reserved.<BR>
5+
SPDX-License-Identifier: BSD-2-Clause-Patent
6+
**/
7+
8+
#ifndef ARM_IORT_PARSER_H_
9+
#define ARM_IORT_PARSER_H_
10+
11+
UINT16
12+
EFIAPI
13+
GetNextIortIdentifier (
14+
);
15+
16+
#endif // ARM_IORT_PARSER_H_

0 commit comments

Comments
 (0)