]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | \r | |
3 | Copyright (c) 2017 - 2019, ARM Limited. All rights reserved.\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_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 | |
30 | Bits: [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 | |
36 | Bits: [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 | |
43 | Bits: [15:8] - Are reserved and must be zero.\r | |
44 | \r | |
45 | Bits: [7:0] - Object ID\r | |
46 | \r | |
47 | Object 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 | |
52 | Object 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 | |
66 | 13 - Platform Generic Watchdog\r | |
67 | 14 - PCI Configuration Space Info\r | |
68 | 15 - Hypervisor Vendor Id\r | |
69 | 16 - Fixed feature flags for FADT\r | |
70 | */\r | |
71 | typedef UINT32 CM_OBJECT_ID;\r | |
72 | \r | |
73 | /** A mask for Object ID\r | |
74 | */\r | |
75 | #define OBJECT_ID_MASK 0xFF\r | |
76 | \r | |
77 | /** A mask for Namespace ID\r | |
78 | */\r | |
79 | #define NAMESPACE_ID_MASK 0xF\r | |
80 | \r | |
81 | /** Starting bit position for Namespace ID\r | |
82 | */\r | |
83 | #define NAMESPACE_ID_BIT_SHIFT 28\r | |
84 | \r | |
85 | /** The EOBJECT_NAMESPACE_ID enum describes the defined namespaces\r | |
86 | for the Configuration Manager Objects.\r | |
87 | */\r | |
88 | typedef enum ObjectNameSpaceID {\r | |
89 | EObjNameSpaceStandard, ///< Standard Objects Namespace\r | |
90 | EObjNameSpaceArm, ///< ARM Objects Namespace\r | |
91 | EObjNameSpaceOem = 0x8, ///< OEM Objects Namespace\r | |
92 | EObjNameSpaceMax\r | |
93 | } EOBJECT_NAMESPACE_ID;\r | |
94 | \r | |
95 | /** A descriptor for Configuration Manager Objects.\r | |
96 | \r | |
97 | The Configuration Manager Protocol interface uses this descriptor\r | |
98 | to return the Configuration Manager Objects.\r | |
99 | */\r | |
100 | typedef struct CmObjDescriptor {\r | |
101 | /// Object Id\r | |
102 | CM_OBJECT_ID ObjectId;\r | |
103 | \r | |
104 | /// Size of the described Object or Object List\r | |
105 | UINT32 Size;\r | |
106 | \r | |
107 | /// Pointer to the described Object or Object List\r | |
108 | VOID * Data;\r | |
109 | \r | |
110 | /// Count of objects in the list\r | |
111 | UINT32 Count;\r | |
112 | } CM_OBJ_DESCRIPTOR;\r | |
113 | \r | |
114 | #pragma pack()\r | |
115 | \r | |
116 | /** This macro returns the namespace ID from the CmObjectID.\r | |
117 | \r | |
118 | @param [in] CmObjectId The Configuration Manager Object ID.\r | |
119 | \r | |
120 | @retval Returns the Namespace ID corresponding to the CmObjectID.\r | |
121 | **/\r | |
122 | #define GET_CM_NAMESPACE_ID(CmObjectId) \\r | |
123 | (((CmObjectId) >> NAMESPACE_ID_BIT_SHIFT) & \\r | |
124 | NAMESPACE_ID_MASK)\r | |
125 | \r | |
126 | /** This macro returns the Object ID from the CmObjectID.\r | |
127 | \r | |
128 | @param [in] CmObjectId The Configuration Manager Object ID.\r | |
129 | \r | |
130 | @retval Returns the Object ID corresponding to the CmObjectID.\r | |
131 | **/\r | |
132 | #define GET_CM_OBJECT_ID(CmObjectId) ((CmObjectId) & OBJECT_ID_MASK)\r | |
133 | \r | |
134 | /** This macro returns a Configuration Manager Object ID\r | |
135 | from the NameSpace ID and the ObjectID.\r | |
136 | \r | |
137 | @param [in] NameSpaceId The namespace ID for the Object.\r | |
138 | @param [in] ObjectId The Object ID.\r | |
139 | \r | |
140 | @retval Returns the Configuration Manager Object ID.\r | |
141 | **/\r | |
142 | #define CREATE_CM_OBJECT_ID(NameSpaceId, ObjectId) \\r | |
143 | ((((NameSpaceId) & NAMESPACE_ID_MASK) << NAMESPACE_ID_BIT_SHIFT) | \\r | |
144 | ((ObjectId) & OBJECT_ID_MASK))\r | |
145 | \r | |
146 | /** This macro returns a Configuration Manager Object ID\r | |
147 | in the Standard Object Namespace.\r | |
148 | \r | |
149 | @param [in] ObjectId The Object ID.\r | |
150 | \r | |
151 | @retval Returns a Standard Configuration Manager Object ID.\r | |
152 | **/\r | |
153 | #define CREATE_CM_STD_OBJECT_ID(ObjectId) \\r | |
154 | (CREATE_CM_OBJECT_ID (EObjNameSpaceStandard, ObjectId))\r | |
155 | \r | |
156 | /** This macro returns a Configuration Manager Object ID\r | |
157 | in the ARM Object Namespace.\r | |
158 | \r | |
159 | @param [in] ObjectId The Object ID.\r | |
160 | \r | |
161 | @retval Returns an ARM Configuration Manager Object ID.\r | |
162 | **/\r | |
163 | #define CREATE_CM_ARM_OBJECT_ID(ObjectId) \\r | |
164 | (CREATE_CM_OBJECT_ID (EObjNameSpaceArm, ObjectId))\r | |
165 | \r | |
166 | /** This macro returns a Configuration Manager Object ID\r | |
167 | in the OEM Object Namespace.\r | |
168 | \r | |
169 | @param [in] ObjectId The Object ID.\r | |
170 | \r | |
171 | @retval Returns an OEM Configuration Manager Object ID.\r | |
172 | **/\r | |
173 | #define CREATE_CM_OEM_OBJECT_ID(ObjectId) \\r | |
174 | (CREATE_CM_OBJECT_ID (EObjNameSpaceOem, ObjectId))\r | |
175 | \r | |
176 | #endif // CONFIGURATION_MANAGER_OBJECT_H_\r |