]>
git.proxmox.com Git - mirror_edk2.git/blob - DynamicTablesPkg/Include/ConfigurationManagerObject.h
3 Copyright (c) 2017 - 2019, ARM Limited. All rights reserved.
5 SPDX-License-Identifier: BSD-2-Clause-Patent
8 - Cm or CM - Configuration Manager
12 #ifndef CONFIGURATION_MANAGER_OBJECT_H_
13 #define CONFIGURATION_MANAGER_OBJECT_H_
15 #include <ArmNameSpaceObjects.h>
16 #include <StandardNameSpaceObjects.h>
20 /** The CM_OBJECT_ID type is used to identify the Configuration Manager
23 Description of Configuration Manager Object ID
24 _______________________________________________________________________________
25 |31 |30 |29 |28 || 27 | 26 | 25 | 24 || 23 | 22 | 21 | 20 || 19 | 18 | 17 | 16|
26 -------------------------------------------------------------------------------
27 | Name Space ID || 0 | 0 | 0 | 0 || 0 | 0 | 0 | 0 || 0 | 0 | 0 | 0|
28 _______________________________________________________________________________
30 Bits: [31:28] - Name Space ID
34 All other values are reserved.
36 Bits: [27:16] - Reserved.
37 _______________________________________________________________________________
38 |15 |14 |13 |12 || 11 | 10 | 9 | 8 || 7 | 6 | 5 | 4 || 3 | 2 | 1 | 0|
39 -------------------------------------------------------------------------------
40 | 0 | 0 | 0 | 0 || 0 | 0 | 0 | 0 || Object ID |
41 _______________________________________________________________________________
43 Bits: [15:8] - Are reserved and must be zero.
45 Bits: [7:0] - Object ID
47 Object ID's in the Standard Namespace:
48 0 - Configuration Manager Revision
52 Object ID's in the ARM Namespace:
54 1 - Boot Architecture Info
56 3 - Power Management Profile Info
59 6 - GIC MSI Frame Info
60 7 - GIC Redistributor Info
62 9 - Serial Console Port Info
63 10 - Serial Debug Port Info
64 11 - Generic Timer Info
65 12 - Platform GT Block Info
66 13 - Generic Timer Block Frame Info
67 14 - Platform Generic Watchdog
68 15 - PCI Configuration Space Info
69 16 - Hypervisor Vendor Id
70 17 - Fixed feature flags for FADT
77 24 - GIC ITS Identifier Array
79 26 - SMMU Interrupt Array
80 27 - Processor Hierarchy Info
82 29 - Processor Hierarchy Node ID Info
83 30 - CM Object Reference
85 typedef UINT32 CM_OBJECT_ID
;
87 /** A mask for Object ID
89 #define OBJECT_ID_MASK 0xFF
91 /** A mask for Namespace ID
93 #define NAMESPACE_ID_MASK 0xF
95 /** Starting bit position for Namespace ID
97 #define NAMESPACE_ID_BIT_SHIFT 28
99 /** The EOBJECT_NAMESPACE_ID enum describes the defined namespaces
100 for the Configuration Manager Objects.
102 typedef enum ObjectNameSpaceID
{
103 EObjNameSpaceStandard
, ///< Standard Objects Namespace
104 EObjNameSpaceArm
, ///< ARM Objects Namespace
105 EObjNameSpaceOem
= 0x8, ///< OEM Objects Namespace
107 } EOBJECT_NAMESPACE_ID
;
109 /** A descriptor for Configuration Manager Objects.
111 The Configuration Manager Protocol interface uses this descriptor
112 to return the Configuration Manager Objects.
114 typedef struct CmObjDescriptor
{
116 CM_OBJECT_ID ObjectId
;
118 /// Size of the described Object or Object List
121 /// Pointer to the described Object or Object List
124 /// Count of objects in the list
130 /** This macro returns the namespace ID from the CmObjectID.
132 @param [in] CmObjectId The Configuration Manager Object ID.
134 @retval Returns the Namespace ID corresponding to the CmObjectID.
136 #define GET_CM_NAMESPACE_ID(CmObjectId) \
137 (((CmObjectId) >> NAMESPACE_ID_BIT_SHIFT) & \
140 /** This macro returns the Object ID from the CmObjectID.
142 @param [in] CmObjectId The Configuration Manager Object ID.
144 @retval Returns the Object ID corresponding to the CmObjectID.
146 #define GET_CM_OBJECT_ID(CmObjectId) ((CmObjectId) & OBJECT_ID_MASK)
148 /** This macro returns a Configuration Manager Object ID
149 from the NameSpace ID and the ObjectID.
151 @param [in] NameSpaceId The namespace ID for the Object.
152 @param [in] ObjectId The Object ID.
154 @retval Returns the Configuration Manager Object ID.
156 #define CREATE_CM_OBJECT_ID(NameSpaceId, ObjectId) \
157 ((((NameSpaceId) & NAMESPACE_ID_MASK) << NAMESPACE_ID_BIT_SHIFT) | \
158 ((ObjectId) & OBJECT_ID_MASK))
160 /** This macro returns a Configuration Manager Object ID
161 in the Standard Object Namespace.
163 @param [in] ObjectId The Object ID.
165 @retval Returns a Standard Configuration Manager Object ID.
167 #define CREATE_CM_STD_OBJECT_ID(ObjectId) \
168 (CREATE_CM_OBJECT_ID (EObjNameSpaceStandard, ObjectId))
170 /** This macro returns a Configuration Manager Object ID
171 in the ARM Object Namespace.
173 @param [in] ObjectId The Object ID.
175 @retval Returns an ARM Configuration Manager Object ID.
177 #define CREATE_CM_ARM_OBJECT_ID(ObjectId) \
178 (CREATE_CM_OBJECT_ID (EObjNameSpaceArm, ObjectId))
180 /** This macro returns a Configuration Manager Object ID
181 in the OEM Object Namespace.
183 @param [in] ObjectId The Object ID.
185 @retval Returns an OEM Configuration Manager Object ID.
187 #define CREATE_CM_OEM_OBJECT_ID(ObjectId) \
188 (CREATE_CM_OBJECT_ID (EObjNameSpaceOem, ObjectId))
190 #endif // CONFIGURATION_MANAGER_OBJECT_H_