]>
Commit | Line | Data |
---|---|---|
312ef7a0 SM |
1 | /** @file\r |
2 | \r | |
3 | Copyright (c) 2021 - 2022, Arm Limited. All rights reserved.<BR>\r | |
4 | \r | |
5 | SPDX-License-Identifier: BSD-2-Clause-Patent\r | |
6 | \r | |
7 | @par Glossary:\r | |
8 | - Cm or CM - Configuration Manager\r | |
9 | - Obj or OBJ - Object\r | |
10 | **/\r | |
11 | \r | |
12 | #ifndef CONFIGURATION_MANAGER_H_\r | |
13 | #define CONFIGURATION_MANAGER_H_\r | |
14 | \r | |
15 | ///\r | |
16 | /// C array containing the compiled AML template.\r | |
17 | /// This symbol is defined in the auto generated C file\r | |
18 | /// containing the AML bytecode array.\r | |
19 | ///\r | |
20 | extern CHAR8 dsdt_aml_code[];\r | |
21 | \r | |
22 | ///\r | |
23 | /// The configuration manager version.\r | |
24 | ///\r | |
25 | #define CONFIGURATION_MANAGER_REVISION CREATE_REVISION (1, 0)\r | |
26 | \r | |
27 | ///\r | |
28 | /// The OEM ID\r | |
29 | ///\r | |
30 | #define CFG_MGR_OEM_ID { 'A', 'R', 'M', 'L', 'T', 'D' }\r | |
31 | \r | |
32 | ///\r | |
33 | /// Memory address size limit. Assume the whole address space.\r | |
34 | ///\r | |
35 | #define MEMORY_ADDRESS_SIZE_LIMIT 64\r | |
36 | \r | |
37 | /** A function that prepares Configuration Manager Objects for returning.\r | |
38 | \r | |
39 | @param [in] This Pointer to the Configuration Manager Protocol.\r | |
40 | @param [in] CmObjectId The Configuration Manager Object ID.\r | |
41 | @param [in] Token A token for identifying the object.\r | |
42 | @param [out] CmObject Pointer to the Configuration Manager Object\r | |
43 | descriptor describing the requested Object.\r | |
44 | \r | |
45 | @retval EFI_SUCCESS Success.\r | |
46 | @retval EFI_INVALID_PARAMETER A parameter is invalid.\r | |
47 | @retval EFI_NOT_FOUND The required object information is not found.\r | |
48 | **/\r | |
49 | typedef EFI_STATUS (*CM_OBJECT_HANDLER_PROC) (\r | |
50 | IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST This,\r | |
51 | IN CONST CM_OBJECT_ID CmObjectId,\r | |
52 | IN CONST CM_OBJECT_TOKEN Token,\r | |
53 | IN OUT CM_OBJ_DESCRIPTOR *CONST CmObject\r | |
54 | );\r | |
55 | \r | |
56 | ///\r | |
57 | /// A helper macro for mapping a reference token.\r | |
58 | ///\r | |
59 | #define REFERENCE_TOKEN(Field) \\r | |
60 | (CM_OBJECT_TOKEN)((UINT8*)&mKvmtoolPlatRepositoryInfo + \\r | |
61 | OFFSET_OF (EDKII_PLATFORM_REPOSITORY_INFO, Field))\r | |
62 | \r | |
63 | ///\r | |
64 | /// The number of ACPI tables to install\r | |
65 | ///\r | |
66 | #define PLAT_ACPI_TABLE_COUNT 10\r | |
67 | \r | |
68 | ///\r | |
69 | /// A structure describing the platform configuration\r | |
70 | /// manager repository information\r | |
71 | ///\r | |
72 | typedef struct PlatformRepositoryInfo {\r | |
73 | ///\r | |
74 | /// Configuration Manager Information.\r | |
75 | ///\r | |
76 | CM_STD_OBJ_CONFIGURATION_MANAGER_INFO CmInfo;\r | |
77 | \r | |
78 | ///\r | |
79 | /// List of ACPI tables\r | |
80 | ///\r | |
81 | CM_STD_OBJ_ACPI_TABLE_INFO CmAcpiTableList[PLAT_ACPI_TABLE_COUNT];\r | |
82 | \r | |
83 | ///\r | |
84 | /// Power management profile information\r | |
85 | ///\r | |
86 | CM_ARM_POWER_MANAGEMENT_PROFILE_INFO PmProfileInfo;\r | |
87 | \r | |
88 | ///\r | |
89 | /// ITS Group node\r | |
90 | ///\r | |
91 | CM_ARM_ITS_GROUP_NODE ItsGroupInfo;\r | |
92 | \r | |
93 | ///\r | |
94 | /// ITS Identifier array\r | |
95 | ///\r | |
96 | CM_ARM_ITS_IDENTIFIER ItsIdentifierArray[1];\r | |
97 | \r | |
98 | ///\r | |
99 | /// PCI Root complex node\r | |
100 | ///\r | |
101 | CM_ARM_ROOT_COMPLEX_NODE RootComplexInfo;\r | |
102 | \r | |
103 | ///\r | |
104 | /// Array of DeviceID mapping\r | |
105 | ///\r | |
106 | CM_ARM_ID_MAPPING DeviceIdMapping[1];\r | |
107 | \r | |
108 | ///\r | |
109 | /// Dynamic platform repository.\r | |
110 | /// CmObj created by parsing the Kvmtool device tree are stored here.\r | |
111 | ///\r | |
112 | DYNAMIC_PLATFORM_REPOSITORY_INFO *DynamicPlatformRepo;\r | |
113 | \r | |
114 | ///\r | |
115 | /// Base address of the FDT.\r | |
116 | ///\r | |
117 | VOID *FdtBase;\r | |
118 | \r | |
119 | ///\r | |
120 | /// A handle to the FDT HwInfoParser.\r | |
121 | ///\r | |
122 | HW_INFO_PARSER_HANDLE FdtParserHandle;\r | |
123 | } EDKII_PLATFORM_REPOSITORY_INFO;\r | |
124 | \r | |
125 | #endif // CONFIGURATION_MANAGER_H_\r |