]> git.proxmox.com Git - mirror_edk2.git/blame - DynamicTablesPkg/Include/ConfigurationManagerObject.h
DynamicTablesPkg: GTDT updates for ACPI 6.3
[mirror_edk2.git] / DynamicTablesPkg / Include / ConfigurationManagerObject.h
CommitLineData
ee6e6668
SM
1/** @file\r
2\r
3 Copyright (c) 2017 - 2019, ARM Limited. All rights reserved.\r
4\r
9cd9bdc6 5 SPDX-License-Identifier: BSD-2-Clause-Patent\r
ee6e6668
SM
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_OBJECT_H_\r
13#define CONFIGURATION_MANAGER_OBJECT_H_\r
14\r
15#include <ArmNameSpaceObjects.h>\r
16#include <StandardNameSpaceObjects.h>\r
17\r
18#pragma pack(1)\r
19\r
20/** The CM_OBJECT_ID type is used to identify the Configuration Manager\r
21 objects.\r
22\r
23 Description of Configuration Manager Object ID\r
24_______________________________________________________________________________\r
25|31 |30 |29 |28 || 27 | 26 | 25 | 24 || 23 | 22 | 21 | 20 || 19 | 18 | 17 | 16|\r
26-------------------------------------------------------------------------------\r
27| Name Space ID || 0 | 0 | 0 | 0 || 0 | 0 | 0 | 0 || 0 | 0 | 0 | 0|\r
28_______________________________________________________________________________\r
29\r
30Bits: [31:28] - Name Space ID\r
31 0000 - Standard\r
32 0001 - ARM\r
33 1000 - Custom/OEM\r
34 All other values are reserved.\r
35\r
36Bits: [27:16] - Reserved.\r
37_______________________________________________________________________________\r
38|15 |14 |13 |12 || 11 | 10 | 9 | 8 || 7 | 6 | 5 | 4 || 3 | 2 | 1 | 0|\r
39-------------------------------------------------------------------------------\r
40| 0 | 0 | 0 | 0 || 0 | 0 | 0 | 0 || Object ID |\r
41_______________________________________________________________________________\r
42\r
43Bits: [15:8] - Are reserved and must be zero.\r
44\r
45Bits: [7:0] - Object ID\r
46\r
47Object ID's in the Standard Namespace:\r
48 0 - Configuration Manager Revision\r
49 1 - ACPI Table List\r
50 2 - SMBIOS Table List\r
51\r
52Object ID's in the ARM Namespace:\r
53 0 - Reserved\r
54 1 - Boot Architecture Info\r
55 2 - CPU Info\r
56 3 - Power Management Profile Info\r
57 4 - GICC Info\r
58 5 - GICD Info\r
59 6 - GIC MSI Frame Info\r
60 7 - GIC Redistributor Info\r
61 8 - GIC ITS Info\r
62 9 - Serial Console Port Info\r
63 10 - Serial Debug Port Info\r
64 11 - Generic Timer Info\r
65 12 - Platform GT Block Info\r
77db1156
KK
66 13 - Generic Timer Block Frame Info\r
67 14 - Platform Generic Watchdog\r
68 15 - PCI Configuration Space Info\r
69 16 - Hypervisor Vendor Id\r
70 17 - Fixed feature flags for FADT\r
71 18 - ITS Group\r
72 19 - Named Component\r
73 20 - Root Complex\r
74 21 - SMMUv1 or SMMUv2\r
75 22 - SMMUv3\r
76 23 - PMCG\r
77 24 - GIC ITS Identifier Array\r
78 25 - ID Mapping Array\r
79 26 - SMMU Interrupt Array\r
80 27 - Processor Hierarchy Info\r
81 28 - Cache Info\r
82 29 - Processor Hierarchy Node ID Info\r
83 30 - CM Object Reference\r
ee6e6668
SM
84*/\r
85typedef UINT32 CM_OBJECT_ID;\r
86\r
87/** A mask for Object ID\r
88*/\r
89#define OBJECT_ID_MASK 0xFF\r
90\r
91/** A mask for Namespace ID\r
92*/\r
93#define NAMESPACE_ID_MASK 0xF\r
94\r
95/** Starting bit position for Namespace ID\r
96*/\r
97#define NAMESPACE_ID_BIT_SHIFT 28\r
98\r
99/** The EOBJECT_NAMESPACE_ID enum describes the defined namespaces\r
100 for the Configuration Manager Objects.\r
101*/\r
102typedef enum ObjectNameSpaceID {\r
103 EObjNameSpaceStandard, ///< Standard Objects Namespace\r
104 EObjNameSpaceArm, ///< ARM Objects Namespace\r
105 EObjNameSpaceOem = 0x8, ///< OEM Objects Namespace\r
106 EObjNameSpaceMax\r
107} EOBJECT_NAMESPACE_ID;\r
108\r
109/** A descriptor for Configuration Manager Objects.\r
110\r
111 The Configuration Manager Protocol interface uses this descriptor\r
112 to return the Configuration Manager Objects.\r
113*/\r
114typedef struct CmObjDescriptor {\r
115 /// Object Id\r
116 CM_OBJECT_ID ObjectId;\r
117\r
118 /// Size of the described Object or Object List\r
119 UINT32 Size;\r
120\r
121 /// Pointer to the described Object or Object List\r
122 VOID * Data;\r
123\r
124 /// Count of objects in the list\r
125 UINT32 Count;\r
126} CM_OBJ_DESCRIPTOR;\r
127\r
128#pragma pack()\r
129\r
130/** This macro returns the namespace ID from the CmObjectID.\r
131\r
132 @param [in] CmObjectId The Configuration Manager Object ID.\r
133\r
134 @retval Returns the Namespace ID corresponding to the CmObjectID.\r
135**/\r
136#define GET_CM_NAMESPACE_ID(CmObjectId) \\r
137 (((CmObjectId) >> NAMESPACE_ID_BIT_SHIFT) & \\r
138 NAMESPACE_ID_MASK)\r
139\r
140/** This macro returns the Object ID from the CmObjectID.\r
141\r
142 @param [in] CmObjectId The Configuration Manager Object ID.\r
143\r
144 @retval Returns the Object ID corresponding to the CmObjectID.\r
145**/\r
146#define GET_CM_OBJECT_ID(CmObjectId) ((CmObjectId) & OBJECT_ID_MASK)\r
147\r
148/** This macro returns a Configuration Manager Object ID\r
149 from the NameSpace ID and the ObjectID.\r
150\r
151 @param [in] NameSpaceId The namespace ID for the Object.\r
152 @param [in] ObjectId The Object ID.\r
153\r
154 @retval Returns the Configuration Manager Object ID.\r
155**/\r
156#define CREATE_CM_OBJECT_ID(NameSpaceId, ObjectId) \\r
157 ((((NameSpaceId) & NAMESPACE_ID_MASK) << NAMESPACE_ID_BIT_SHIFT) | \\r
158 ((ObjectId) & OBJECT_ID_MASK))\r
159\r
160/** This macro returns a Configuration Manager Object ID\r
161 in the Standard Object Namespace.\r
162\r
163 @param [in] ObjectId The Object ID.\r
164\r
165 @retval Returns a Standard Configuration Manager Object ID.\r
166**/\r
167#define CREATE_CM_STD_OBJECT_ID(ObjectId) \\r
168 (CREATE_CM_OBJECT_ID (EObjNameSpaceStandard, ObjectId))\r
169\r
170/** This macro returns a Configuration Manager Object ID\r
171 in the ARM Object Namespace.\r
172\r
173 @param [in] ObjectId The Object ID.\r
174\r
175 @retval Returns an ARM Configuration Manager Object ID.\r
176**/\r
177#define CREATE_CM_ARM_OBJECT_ID(ObjectId) \\r
178 (CREATE_CM_OBJECT_ID (EObjNameSpaceArm, ObjectId))\r
179\r
180/** This macro returns a Configuration Manager Object ID\r
181 in the OEM Object Namespace.\r
182\r
183 @param [in] ObjectId The Object ID.\r
184\r
185 @retval Returns an OEM Configuration Manager Object ID.\r
186**/\r
187#define CREATE_CM_OEM_OBJECT_ID(ObjectId) \\r
188 (CREATE_CM_OBJECT_ID (EObjNameSpaceOem, ObjectId))\r
189\r
190#endif // CONFIGURATION_MANAGER_OBJECT_H_\r