VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/DynamicTablesPkg/Include/ConfigurationManagerObject.h@ 109193

Last change on this file since 109193 was 108794, checked in by vboxsync, 7 weeks ago

Devices/EFI/FirmwareNew: Merge edk2-stable202502 from the vendor branch and make it build for the important platforms, bugref:4643

  • Property svn:eol-style set to native
File size: 5.9 KB
Line 
1/** @file
2
3 Copyright (c) 2017 - 2024, Arm Limited. All rights reserved.
4 Copyright (c) 2024 Advanced Micro Devices, Inc. All rights reserved.
5
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7
8 @par Glossary:
9 - Cm or CM - Configuration Manager
10 - Obj or OBJ - Object
11 - X64 or x64 - X64 Architecture
12**/
13
14#ifndef CONFIGURATION_MANAGER_OBJECT_H_
15#define CONFIGURATION_MANAGER_OBJECT_H_
16
17#include <ArchCommonNameSpaceObjects.h>
18#include <ArmNameSpaceObjects.h>
19#include <StandardNameSpaceObjects.h>
20#include <X64NameSpaceObjects.h>
21
22#pragma pack(1)
23
24/** The CM_OBJECT_ID type is used to identify the Configuration Manager
25 objects.
26
27 Description of Configuration Manager Object ID
28_______________________________________________________________________________
29|31 |30 |29 |28 || 27 | 26 | 25 | 24 || 23 | 22 | 21 | 20 || 19 | 18 | 17 | 16|
30-------------------------------------------------------------------------------
31| Name Space ID || 0 | 0 | 0 | 0 || 0 | 0 | 0 | 0 || 0 | 0 | 0 | 0|
32_______________________________________________________________________________
33
34Bits: [31:28] - Name Space ID
35 0000 - Standard
36 0001 - Arch Common
37 0010 - ARM
38 0011 - X64
39 1111 - Custom/OEM
40 All other values are reserved.
41
42Bits: [27:16] - Reserved.
43_______________________________________________________________________________
44|15 |14 |13 |12 || 11 | 10 | 9 | 8 || 7 | 6 | 5 | 4 || 3 | 2 | 1 | 0|
45-------------------------------------------------------------------------------
46| 0 | 0 | 0 | 0 || 0 | 0 | 0 | 0 || Object ID |
47_______________________________________________________________________________
48
49Bits: [15:8] - Are reserved and must be zero.
50
51Bits: [7:0] - Object ID
52
53Object ID's in the Standard Namespace:
54 0 - Configuration Manager Revision
55 1 - ACPI Table List
56 2 - SMBIOS Table List
57
58Object ID's in the Arch Common Namespace:
59 See EARCH_COMMON_OBJECT_ID.
60
61Object ID's in the ARM Namespace:
62 See EARM_OBJECT_ID.
63*/
64typedef UINT32 CM_OBJECT_ID;
65
66//
67// Helper macro to format a CM_OBJECT_ID.
68//
69#define FMT_CM_OBJECT_ID "0x%lx"
70
71/** A mask for Object ID
72*/
73#define OBJECT_ID_MASK 0xFF
74
75/** A mask for Namespace ID
76*/
77#define NAMESPACE_ID_MASK 0xF
78
79/** Starting bit position for Namespace ID
80*/
81#define NAMESPACE_ID_BIT_SHIFT 28
82
83/** The EOBJECT_NAMESPACE_ID enum describes the defined namespaces
84 for the Configuration Manager Objects.
85*/
86typedef enum ObjectNameSpaceID {
87 EObjNameSpaceStandard, ///< Standard Objects Namespace
88 EObjNameSpaceArchCommon, ///< Arch Common Objects Namespace
89 EObjNameSpaceArm, ///< ARM Objects Namespace
90 EObjNameSpaceX64, ///< X64 Objects Namespace
91 EObjNameSpaceOem = 0xF, ///< OEM Objects Namespace
92 EObjNameSpaceMax,
93} EOBJECT_NAMESPACE_ID;
94
95/** A descriptor for Configuration Manager Objects.
96
97 The Configuration Manager Protocol interface uses this descriptor
98 to return the Configuration Manager Objects.
99*/
100typedef struct CmObjDescriptor {
101 /// Object Id
102 CM_OBJECT_ID ObjectId;
103
104 /// Size of the described Object or Object List
105 UINT32 Size;
106
107 /// Pointer to the described Object or Object List
108 VOID *Data;
109
110 /// Count of objects in the list
111 UINT32 Count;
112} CM_OBJ_DESCRIPTOR;
113
114#pragma pack()
115
116/** This macro returns the namespace ID from the CmObjectID.
117
118 @param [in] CmObjectId The Configuration Manager Object ID.
119
120 @retval Returns the Namespace ID corresponding to the CmObjectID.
121**/
122#define GET_CM_NAMESPACE_ID(CmObjectId) \
123 (((CmObjectId) >> NAMESPACE_ID_BIT_SHIFT) & \
124 NAMESPACE_ID_MASK)
125
126/** This macro returns the Object ID from the CmObjectID.
127
128 @param [in] CmObjectId The Configuration Manager Object ID.
129
130 @retval Returns the Object ID corresponding to the CmObjectID.
131**/
132#define GET_CM_OBJECT_ID(CmObjectId) ((CmObjectId) & OBJECT_ID_MASK)
133
134/** This macro returns a Configuration Manager Object ID
135 from the NameSpace ID and the ObjectID.
136
137 @param [in] NameSpaceId The namespace ID for the Object.
138 @param [in] ObjectId The Object ID.
139
140 @retval Returns the Configuration Manager Object ID.
141**/
142#define CREATE_CM_OBJECT_ID(NameSpaceId, ObjectId) \
143 ((((NameSpaceId) & NAMESPACE_ID_MASK) << NAMESPACE_ID_BIT_SHIFT) | \
144 ((ObjectId) & OBJECT_ID_MASK))
145
146/** This macro returns a Configuration Manager Object ID
147 in the Standard Object Namespace.
148
149 @param [in] ObjectId The Object ID.
150
151 @retval Returns a Standard Configuration Manager Object ID.
152**/
153#define CREATE_CM_STD_OBJECT_ID(ObjectId) \
154 (CREATE_CM_OBJECT_ID (EObjNameSpaceStandard, ObjectId))
155
156/** This macro returns a Configuration Manager Object ID
157 in the ARM Object Namespace.
158
159 @param [in] ObjectId The Object ID.
160
161 @retval Returns an ARM Configuration Manager Object ID.
162**/
163#define CREATE_CM_ARM_OBJECT_ID(ObjectId) \
164 (CREATE_CM_OBJECT_ID (EObjNameSpaceArm, ObjectId))
165
166/** This macro returns a Configuration Manager Object ID
167 in the Arch Common Object Namespace.
168
169 @param [in] ObjectId The Object ID.
170
171 @retval Returns an Arch Common Configuration Manager Object ID.
172**/
173#define CREATE_CM_ARCH_COMMON_OBJECT_ID(ObjectId) \
174 (CREATE_CM_OBJECT_ID (EObjNameSpaceArchCommon, ObjectId))
175
176/** This macro returns a Configuration Manager Object ID
177 in the OEM Object Namespace.
178
179 @param [in] ObjectId The Object ID.
180
181 @retval Returns an OEM Configuration Manager Object ID.
182**/
183#define CREATE_CM_OEM_OBJECT_ID(ObjectId) \
184 (CREATE_CM_OBJECT_ID (EObjNameSpaceOem, ObjectId))
185
186/** This macro returns a Configuration Manager Object ID
187 in the X64 Object Namespace.
188
189 @param [in] ObjectId The Object ID.
190
191 @retval Returns X64 Configuration Manager Object ID.
192**/
193#define CREATE_CM_X64_OBJECT_ID(ObjectId) \
194 (CREATE_CM_OBJECT_ID (EObjNameSpaceX64, ObjectId))
195
196#endif // CONFIGURATION_MANAGER_OBJECT_H_
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette