]> git.proxmox.com Git - mirror_edk2.git/blame - DynamicTablesPkg/Include/ConfigurationManagerObject.h
BaseTools/Ecc: Fix grammar in Ecc error message
[mirror_edk2.git] / DynamicTablesPkg / Include / ConfigurationManagerObject.h
CommitLineData
ee6e6668
SM
1/** @file\r
2\r
742dafd2 3 Copyright (c) 2017 - 2022, ARM Limited. All rights reserved.\r
ee6e6668 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 84*/\r
731c67e1 85typedef UINT32 CM_OBJECT_ID;\r
ee6e6668 86\r
742dafd2
PG
87//\r
88// Helper macro to format a CM_OBJECT_ID.\r
89//\r
90#define FMT_CM_OBJECT_ID "0x%lx"\r
91\r
ee6e6668
SM
92/** A mask for Object ID\r
93*/\r
731c67e1 94#define OBJECT_ID_MASK 0xFF\r
ee6e6668
SM
95\r
96/** A mask for Namespace ID\r
97*/\r
731c67e1 98#define NAMESPACE_ID_MASK 0xF\r
ee6e6668
SM
99\r
100/** Starting bit position for Namespace ID\r
101*/\r
731c67e1 102#define NAMESPACE_ID_BIT_SHIFT 28\r
ee6e6668
SM
103\r
104/** The EOBJECT_NAMESPACE_ID enum describes the defined namespaces\r
105 for the Configuration Manager Objects.\r
106*/\r
107typedef enum ObjectNameSpaceID {\r
108 EObjNameSpaceStandard, ///< Standard Objects Namespace\r
109 EObjNameSpaceArm, ///< ARM Objects Namespace\r
110 EObjNameSpaceOem = 0x8, ///< OEM Objects Namespace\r
111 EObjNameSpaceMax\r
112} EOBJECT_NAMESPACE_ID;\r
113\r
114/** A descriptor for Configuration Manager Objects.\r
115\r
116 The Configuration Manager Protocol interface uses this descriptor\r
117 to return the Configuration Manager Objects.\r
118*/\r
119typedef struct CmObjDescriptor {\r
120 /// Object Id\r
731c67e1 121 CM_OBJECT_ID ObjectId;\r
ee6e6668
SM
122\r
123 /// Size of the described Object or Object List\r
731c67e1 124 UINT32 Size;\r
ee6e6668
SM
125\r
126 /// Pointer to the described Object or Object List\r
731c67e1 127 VOID *Data;\r
ee6e6668
SM
128\r
129 /// Count of objects in the list\r
731c67e1 130 UINT32 Count;\r
ee6e6668
SM
131} CM_OBJ_DESCRIPTOR;\r
132\r
133#pragma pack()\r
134\r
135/** This macro returns the namespace ID from the CmObjectID.\r
136\r
137 @param [in] CmObjectId The Configuration Manager Object ID.\r
138\r
139 @retval Returns the Namespace ID corresponding to the CmObjectID.\r
140**/\r
141#define GET_CM_NAMESPACE_ID(CmObjectId) \\r
142 (((CmObjectId) >> NAMESPACE_ID_BIT_SHIFT) & \\r
143 NAMESPACE_ID_MASK)\r
144\r
145/** This macro returns the Object ID from the CmObjectID.\r
146\r
147 @param [in] CmObjectId The Configuration Manager Object ID.\r
148\r
149 @retval Returns the Object ID corresponding to the CmObjectID.\r
150**/\r
731c67e1 151#define GET_CM_OBJECT_ID(CmObjectId) ((CmObjectId) & OBJECT_ID_MASK)\r
ee6e6668
SM
152\r
153/** This macro returns a Configuration Manager Object ID\r
154 from the NameSpace ID and the ObjectID.\r
155\r
156 @param [in] NameSpaceId The namespace ID for the Object.\r
157 @param [in] ObjectId The Object ID.\r
158\r
159 @retval Returns the Configuration Manager Object ID.\r
160**/\r
161#define CREATE_CM_OBJECT_ID(NameSpaceId, ObjectId) \\r
162 ((((NameSpaceId) & NAMESPACE_ID_MASK) << NAMESPACE_ID_BIT_SHIFT) | \\r
163 ((ObjectId) & OBJECT_ID_MASK))\r
164\r
165/** This macro returns a Configuration Manager Object ID\r
166 in the Standard Object Namespace.\r
167\r
168 @param [in] ObjectId The Object ID.\r
169\r
170 @retval Returns a Standard Configuration Manager Object ID.\r
171**/\r
172#define CREATE_CM_STD_OBJECT_ID(ObjectId) \\r
173 (CREATE_CM_OBJECT_ID (EObjNameSpaceStandard, ObjectId))\r
174\r
175/** This macro returns a Configuration Manager Object ID\r
176 in the ARM Object Namespace.\r
177\r
178 @param [in] ObjectId The Object ID.\r
179\r
180 @retval Returns an ARM Configuration Manager Object ID.\r
181**/\r
182#define CREATE_CM_ARM_OBJECT_ID(ObjectId) \\r
183 (CREATE_CM_OBJECT_ID (EObjNameSpaceArm, ObjectId))\r
184\r
185/** This macro returns a Configuration Manager Object ID\r
186 in the OEM Object Namespace.\r
187\r
188 @param [in] ObjectId The Object ID.\r
189\r
190 @retval Returns an OEM Configuration Manager Object ID.\r
191**/\r
192#define CREATE_CM_OEM_OBJECT_ID(ObjectId) \\r
193 (CREATE_CM_OBJECT_ID (EObjNameSpaceOem, ObjectId))\r
194\r
195#endif // CONFIGURATION_MANAGER_OBJECT_H_\r