]>
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 - Platform Generic Watchdog
67 14 - PCI Configuration Space Info
68 15 - Hypervisor Vendor Id
69 16 - Fixed feature flags for FADT
71 typedef UINT32 CM_OBJECT_ID
;
73 /** A mask for Object ID
75 #define OBJECT_ID_MASK 0xFF
77 /** A mask for Namespace ID
79 #define NAMESPACE_ID_MASK 0xF
81 /** Starting bit position for Namespace ID
83 #define NAMESPACE_ID_BIT_SHIFT 28
85 /** The EOBJECT_NAMESPACE_ID enum describes the defined namespaces
86 for the Configuration Manager Objects.
88 typedef enum ObjectNameSpaceID
{
89 EObjNameSpaceStandard
, ///< Standard Objects Namespace
90 EObjNameSpaceArm
, ///< ARM Objects Namespace
91 EObjNameSpaceOem
= 0x8, ///< OEM Objects Namespace
93 } EOBJECT_NAMESPACE_ID
;
95 /** A descriptor for Configuration Manager Objects.
97 The Configuration Manager Protocol interface uses this descriptor
98 to return the Configuration Manager Objects.
100 typedef struct CmObjDescriptor
{
102 CM_OBJECT_ID ObjectId
;
104 /// Size of the described Object or Object List
107 /// Pointer to the described Object or Object List
110 /// Count of objects in the list
116 /** This macro returns the namespace ID from the CmObjectID.
118 @param [in] CmObjectId The Configuration Manager Object ID.
120 @retval Returns the Namespace ID corresponding to the CmObjectID.
122 #define GET_CM_NAMESPACE_ID(CmObjectId) \
123 (((CmObjectId) >> NAMESPACE_ID_BIT_SHIFT) & \
126 /** This macro returns the Object ID from the CmObjectID.
128 @param [in] CmObjectId The Configuration Manager Object ID.
130 @retval Returns the Object ID corresponding to the CmObjectID.
132 #define GET_CM_OBJECT_ID(CmObjectId) ((CmObjectId) & OBJECT_ID_MASK)
134 /** This macro returns a Configuration Manager Object ID
135 from the NameSpace ID and the ObjectID.
137 @param [in] NameSpaceId The namespace ID for the Object.
138 @param [in] ObjectId The Object ID.
140 @retval Returns the Configuration Manager Object ID.
142 #define CREATE_CM_OBJECT_ID(NameSpaceId, ObjectId) \
143 ((((NameSpaceId) & NAMESPACE_ID_MASK) << NAMESPACE_ID_BIT_SHIFT) | \
144 ((ObjectId) & OBJECT_ID_MASK))
146 /** This macro returns a Configuration Manager Object ID
147 in the Standard Object Namespace.
149 @param [in] ObjectId The Object ID.
151 @retval Returns a Standard Configuration Manager Object ID.
153 #define CREATE_CM_STD_OBJECT_ID(ObjectId) \
154 (CREATE_CM_OBJECT_ID (EObjNameSpaceStandard, ObjectId))
156 /** This macro returns a Configuration Manager Object ID
157 in the ARM Object Namespace.
159 @param [in] ObjectId The Object ID.
161 @retval Returns an ARM Configuration Manager Object ID.
163 #define CREATE_CM_ARM_OBJECT_ID(ObjectId) \
164 (CREATE_CM_OBJECT_ID (EObjNameSpaceArm, ObjectId))
166 /** This macro returns a Configuration Manager Object ID
167 in the OEM Object Namespace.
169 @param [in] ObjectId The Object ID.
171 @retval Returns an OEM Configuration Manager Object ID.
173 #define CREATE_CM_OEM_OBJECT_ID(ObjectId) \
174 (CREATE_CM_OBJECT_ID (EObjNameSpaceOem, ObjectId))
176 #endif // CONFIGURATION_MANAGER_OBJECT_H_