46 ASSERT (CfgMgrProtocol !=
NULL);
47 ASSERT (CfgMfrInfo !=
NULL);
50 Status = CfgMgrProtocol->GetObject (
56 if (EFI_ERROR (Status)) {
59 "ERROR: Failed to Get Configuration Manager Info. Status = %r\n",
68 "ERROR: EStdObjCfgMgrInfo: Invalid ObjectId = 0x%x, expected Id = 0x%x\n",
73 return EFI_INVALID_PARAMETER;
76 if (CmObjectDesc.
Size <
81 "ERROR: EStdObjCfgMgrInfo: Buffer too small, size = 0x%x\n",
85 return EFI_BAD_BUFFER_SIZE;
125 ASSERT (CfgMgrProtocol !=
NULL);
127 ASSERT (AcpiHeader !=
NULL);
128 ASSERT (AcpiTableInfo !=
NULL);
131 if ((CfgMgrProtocol ==
NULL) ||
133 (AcpiHeader ==
NULL) ||
134 (AcpiTableInfo ==
NULL) ||
138 return EFI_INVALID_PARAMETER;
142 if (EFI_ERROR (Status)) {
145 "ERROR: Failed to get Configuration Manager info. Status = %r\n",
152 AcpiHeader->Signature =
Generator->AcpiTableSignature;
154 AcpiHeader->Length = Length;
156 AcpiHeader->Revision = AcpiTableInfo->AcpiTableRevision;
158 AcpiHeader->Checksum = 0;
161 CopyMem (AcpiHeader->OemId, CfgMfrInfo->
OemId, sizeof (AcpiHeader->OemId));
164 if (AcpiTableInfo->OemTableId != 0) {
165 AcpiHeader->OemTableId = AcpiTableInfo->OemTableId;
168 CfgMfrInfo->
OemId[0],
169 CfgMfrInfo->
OemId[1],
170 CfgMfrInfo->
OemId[2],
180 if (AcpiTableInfo->OemRevision != 0) {
181 AcpiHeader->OemRevision = AcpiTableInfo->OemRevision;
183 AcpiHeader->OemRevision = CfgMfrInfo->
Revision;
187 AcpiHeader->CreatorId =
Generator->CreatorId;
189 AcpiHeader->CreatorRevision =
Generator->CreatorRevision;
233 ASSERT (CfgMgrProtocol !=
NULL);
235 ASSERT (AcpiTableInfo !=
NULL);
237 if ((CfgMgrProtocol ==
NULL) ||
239 (AcpiTableInfo ==
NULL))
241 return EFI_INVALID_PARAMETER;
245 if (EFI_ERROR (Status)) {
248 "ERROR: Failed to get Configuration Manager info. Status = %r\n",
254 if (AcpiTableInfo->OemTableId != 0) {
255 OemTableId = AcpiTableInfo->OemTableId;
258 CfgMfrInfo->
OemId[0],
259 CfgMfrInfo->
OemId[1],
260 CfgMfrInfo->
OemId[2],
266 if (AcpiTableInfo->OemRevision != 0) {
267 OemRevision = AcpiTableInfo->OemRevision;
275 (
CONST CHAR8 *)&OemTableId,
312 DEBUG ((DEBUG_ERROR,
"ERROR: FindDuplicateValues: Array is NULL.\n"));
316 if (ElementSize == 0) {
317 DEBUG ((DEBUG_ERROR,
"ERROR: FindDuplicateValues: ElementSize is 0.\n"));
321 if (EqualTestFunction ==
NULL) {
324 "ERROR: FindDuplicateValues: EqualTestFunction is NULL.\n"
333 for (Index1 = 0; Index1 < Count - 1; Index1++) {
334 for (Index2 = Index1 + 1; Index2 < Count; Index2++) {
335 Element1 = (UINT8 *)Array + (Index1 * ElementSize);
336 Element2 = (UINT8 *)Array + (Index2 * ElementSize);
338 if (EqualTestFunction (Element1, Element2, Index1, Index2)) {
void * AML_ROOT_NODE_HANDLE
EFI_STATUS EFIAPI AmlCodeGenDefinitionBlock(IN CONST CHAR8 *TableSignature, IN CONST CHAR8 *OemId, IN CONST CHAR8 *OemTableId, IN UINT32 OemRevision, OUT AML_ROOT_NODE_HANDLE *NewRootNode)
UINT64 EFIAPI LShiftU64(IN UINT64 Operand, IN UINTN Count)
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
#define CREATE_CM_STD_OBJECT_ID(ObjectId)
#define SIGNATURE_32(A, B, C, D)
#define ASSERT_EFI_ERROR(StatusParameter)
#define DEBUG(Expression)
@ EStdObjCfgMgrInfo
0 - Configuration Manager Info
EFI_STATUS EFIAPI AddSsdtAcpiHeader(IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN CONST ACPI_TABLE_GENERATOR *CONST Generator, IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo, OUT AML_ROOT_NODE_HANDLE *RootNode)
EFI_STATUS EFIAPI AddAcpiHeader(IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN CONST ACPI_TABLE_GENERATOR *CONST Generator, IN OUT EFI_ACPI_DESCRIPTION_HEADER *CONST AcpiHeader, IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo, IN CONST UINT32 Length)
BOOLEAN EFIAPI FindDuplicateValue(IN CONST VOID *Array, IN CONST UINTN Count, IN CONST UINTN ElementSize, IN PFN_IS_EQUAL EqualTestFunction)
EFI_STATUS EFIAPI GetCgfMgrInfo(IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, OUT CM_STD_OBJ_CONFIGURATION_MANAGER_INFO **CfgMfrInfo)
BOOLEAN(EFIAPI * PFN_IS_EQUAL)(IN CONST VOID *Object1, IN CONST VOID *Object2, IN UINTN Index1 OPTIONAL, IN UINTN Index2 OPTIONAL)
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.
UINT32 Revision
The Configuration Manager Revision.