3 Copyright (c) 2021 - 2022, Arm Limited. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
8 - Cm or CM - Configuration Manager
12 #ifndef CONFIGURATION_MANAGER_H_
13 #define CONFIGURATION_MANAGER_H_
16 /// C array containing the compiled AML template.
17 /// This symbol is defined in the auto generated C file
18 /// containing the AML bytecode array.
20 extern CHAR8 dsdt_aml_code
[];
23 /// The configuration manager version.
25 #define CONFIGURATION_MANAGER_REVISION CREATE_REVISION (1, 0)
30 #define CFG_MGR_OEM_ID { 'A', 'R', 'M', 'L', 'T', 'D' }
33 /// Memory address size limit. Assume the whole address space.
35 #define MEMORY_ADDRESS_SIZE_LIMIT 64
37 /** A function that prepares Configuration Manager Objects for returning.
39 @param [in] This Pointer to the Configuration Manager Protocol.
40 @param [in] CmObjectId The Configuration Manager Object ID.
41 @param [in] Token A token for identifying the object.
42 @param [out] CmObject Pointer to the Configuration Manager Object
43 descriptor describing the requested Object.
45 @retval EFI_SUCCESS Success.
46 @retval EFI_INVALID_PARAMETER A parameter is invalid.
47 @retval EFI_NOT_FOUND The required object information is not found.
49 typedef EFI_STATUS (*CM_OBJECT_HANDLER_PROC
) (
50 IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL
*CONST This
,
51 IN CONST CM_OBJECT_ID CmObjectId
,
52 IN CONST CM_OBJECT_TOKEN Token
,
53 IN OUT CM_OBJ_DESCRIPTOR
*CONST CmObject
57 /// A helper macro for mapping a reference token.
59 #define REFERENCE_TOKEN(Field) \
60 (CM_OBJECT_TOKEN)((UINT8*)&mKvmtoolPlatRepositoryInfo + \
61 OFFSET_OF (EDKII_PLATFORM_REPOSITORY_INFO, Field))
64 /// The number of ACPI tables to install
66 #define PLAT_ACPI_TABLE_COUNT 10
69 /// A structure describing the platform configuration
70 /// manager repository information
72 typedef struct PlatformRepositoryInfo
{
74 /// Configuration Manager Information.
76 CM_STD_OBJ_CONFIGURATION_MANAGER_INFO CmInfo
;
79 /// List of ACPI tables
81 CM_STD_OBJ_ACPI_TABLE_INFO CmAcpiTableList
[PLAT_ACPI_TABLE_COUNT
];
84 /// Power management profile information
86 CM_ARM_POWER_MANAGEMENT_PROFILE_INFO PmProfileInfo
;
91 CM_ARM_ITS_GROUP_NODE ItsGroupInfo
;
94 /// ITS Identifier array
96 CM_ARM_ITS_IDENTIFIER ItsIdentifierArray
[1];
99 /// PCI Root complex node
101 CM_ARM_ROOT_COMPLEX_NODE RootComplexInfo
;
104 /// Array of DeviceID mapping
106 CM_ARM_ID_MAPPING DeviceIdMapping
[1];
109 /// Dynamic platform repository.
110 /// CmObj created by parsing the Kvmtool device tree are stored here.
112 DYNAMIC_PLATFORM_REPOSITORY_INFO
*DynamicPlatformRepo
;
115 /// Base address of the FDT.
120 /// A handle to the FDT HwInfoParser.
122 HW_INFO_PARSER_HANDLE FdtParserHandle
;
123 } EDKII_PLATFORM_REPOSITORY_INFO
;
125 #endif // CONFIGURATION_MANAGER_H_