TianoCore EDK2 master
Loading...
Searching...
No Matches
ConfigurationManagerObject.h
Go to the documentation of this file.
1
14#ifndef CONFIGURATION_MANAGER_OBJECT_H_
15#define CONFIGURATION_MANAGER_OBJECT_H_
16
18#include <ArmNameSpaceObjects.h>
20#include <X64NameSpaceObjects.h>
21
22#pragma pack(1)
23
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
73#define OBJECT_ID_MASK 0xFF
74
77#define NAMESPACE_ID_MASK 0xF
78
81#define NAMESPACE_ID_BIT_SHIFT 28
82
86typedef enum ObjectNameSpaceID {
92 EObjNameSpaceMax,
94
100typedef struct CmObjDescriptor {
103
105 UINT32 Size;
106
108 VOID *Data;
109
111 UINT32 Count;
113
114#pragma pack()
115
122#define GET_CM_NAMESPACE_ID(CmObjectId) \
123 (((CmObjectId) >> NAMESPACE_ID_BIT_SHIFT) & \
124 NAMESPACE_ID_MASK)
125
132#define GET_CM_OBJECT_ID(CmObjectId) ((CmObjectId) & OBJECT_ID_MASK)
133
142#define CREATE_CM_OBJECT_ID(NameSpaceId, ObjectId) \
143 ((((NameSpaceId) & NAMESPACE_ID_MASK) << NAMESPACE_ID_BIT_SHIFT) | \
144 ((ObjectId) & OBJECT_ID_MASK))
145
153#define CREATE_CM_STD_OBJECT_ID(ObjectId) \
154 (CREATE_CM_OBJECT_ID (EObjNameSpaceStandard, ObjectId))
155
163#define CREATE_CM_ARM_OBJECT_ID(ObjectId) \
164 (CREATE_CM_OBJECT_ID (EObjNameSpaceArm, ObjectId))
165
173#define CREATE_CM_ARCH_COMMON_OBJECT_ID(ObjectId) \
174 (CREATE_CM_OBJECT_ID (EObjNameSpaceArchCommon, ObjectId))
175
183#define CREATE_CM_OEM_OBJECT_ID(ObjectId) \
184 (CREATE_CM_OBJECT_ID (EObjNameSpaceOem, ObjectId))
185
193#define CREATE_CM_X64_OBJECT_ID(ObjectId) \
194 (CREATE_CM_OBJECT_ID (EObjNameSpaceX64, ObjectId))
195
196#endif // CONFIGURATION_MANAGER_OBJECT_H_
struct CmObjDescriptor CM_OBJ_DESCRIPTOR
@ EObjNameSpaceArm
ARM Objects Namespace.
@ EObjNameSpaceOem
OEM Objects Namespace.
@ EObjNameSpaceX64
X64 Objects Namespace.
@ EObjNameSpaceArchCommon
Arch Common Objects Namespace.
@ EObjNameSpaceStandard
Standard Objects Namespace.
UINT32 CM_OBJECT_ID
enum ObjectNameSpaceID EOBJECT_NAMESPACE_ID
VOID * Data
Pointer to the described Object or Object List.
UINT32 Size
Size of the described Object or Object List.
UINT32 Count
Count of objects in the list.
CM_OBJECT_ID ObjectId
Object Id.