43 (NewCmObjDesc ==
NULL))
46 return EFI_INVALID_PARAMETER;
50 if (CmObjDesc ==
NULL) {
52 return EFI_OUT_OF_RESOURCES;
56 if (DataBuffer ==
NULL) {
59 return EFI_OUT_OF_RESOURCES;
63 CmObjDesc->
Count = Count;
64 CmObjDesc->
Data = DataBuffer;
65 CmObjDesc->
Size = Size;
67 *NewCmObjDesc = CmObjDesc;
85 if (CmObjDesc ==
NULL) {
87 return EFI_INVALID_PARAMETER;
90 if (CmObjDesc->Data !=
NULL) {
123 if ((FdtParserHandle ==
NULL) ||
124 (FdtParserHandle->HwInfoAdd ==
NULL) ||
129 return EFI_INVALID_PARAMETER;
134 CmObjDesc.
Data = Data;
135 CmObjDesc.
Size = Size;
139 Status = FdtParserHandle->HwInfoAdd (
141 FdtParserHandle->Context,
170 IN UINT32 TokenCount, OPTIONAL
181 if ((FdtParserHandle ==
NULL) ||
182 (FdtParserHandle->HwInfoAdd ==
NULL) ||
183 (CmObjDesc ==
NULL) ||
184 (CmObjDesc->Count == 0) ||
185 (CmObjDesc->Data ==
NULL) ||
186 (CmObjDesc->Size == 0))
189 return EFI_INVALID_PARAMETER;
192 Count = CmObjDesc->Count;
193 Data = CmObjDesc->Data;
194 Size = CmObjDesc->Size / Count;
196 SingleCmObjDesc.
ObjectId = CmObjDesc->ObjectId;
197 SingleCmObjDesc.
Count = 1;
198 SingleCmObjDesc.
Size = Size;
200 for (Index = 0; Index < Count; Index++) {
201 SingleCmObjDesc.
Data = (VOID *)&Data[Index * Size];
203 Status = FdtParserHandle->HwInfoAdd (
205 FdtParserHandle->Context,
211 if (EFI_ERROR (Status)) {
255 INT32 TokenTableSize;
257 if ((FdtParserHandle ==
NULL) ||
258 (FdtParserHandle->HwInfoAdd ==
NULL) ||
259 (CmObjDesc ==
NULL) ||
260 (CmObjDesc->Count == 0) ||
261 (CmObjDesc->Data ==
NULL) ||
262 (CmObjDesc->Size == 0) ||
266 return EFI_INVALID_PARAMETER;
274 return EFI_OUT_OF_RESOURCES;
284 if (EFI_ERROR (Status)) {
291 CmObjRef.
Count = CmObjDesc->Count;
292 CmObjRef.
Size = TokenTableSize;
295 Status = FdtParserHandle->HwInfoAdd (
297 FdtParserHandle->Context,
@ EArchCommonObjCmRef
7 - CM Object Reference
EFI_STATUS EFIAPI AddMultipleCmObjWithCmObjRef(IN CONST FDT_HW_INFO_PARSER_HANDLE FdtParserHandle, IN CM_OBJ_DESCRIPTOR *CmObjDesc, OUT CM_OBJECT_TOKEN *Token)
EFI_STATUS EFIAPI FreeCmObjDesc(IN CM_OBJ_DESCRIPTOR *CmObjDesc)
EFI_STATUS EFIAPI AddMultipleCmObj(IN CONST FDT_HW_INFO_PARSER_HANDLE FdtParserHandle, IN CONST CM_OBJ_DESCRIPTOR *CmObjDesc, IN UINT32 TokenCount, OPTIONAL OUT CM_OBJECT_TOKEN *TokenTable OPTIONAL)
EFI_STATUS EFIAPI AddSingleCmObj(IN CONST FDT_HW_INFO_PARSER_HANDLE FdtParserHandle, IN CM_OBJECT_ID ObjectId, IN VOID *Data, IN UINT32 Size, OUT CM_OBJECT_TOKEN *Token OPTIONAL)
EFI_STATUS EFIAPI CreateCmObjDesc(IN CM_OBJECT_ID ObjectId, IN UINT32 Count, IN VOID *Data, IN UINT32 Size, OUT CM_OBJ_DESCRIPTOR **NewCmObjDesc)
#define CREATE_CM_ARCH_COMMON_OBJECT_ID(ObjectId)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
VOID *EFIAPI AllocateCopyPool(IN UINTN AllocationSize, IN CONST VOID *Buffer)
#define ASSERT_EFI_ERROR(StatusParameter)
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.