TianoCore EDK2 master
Loading...
Searching...
No Matches
CmObjectDescUtility.c File Reference

Go to the source code of this file.

Functions

EFI_STATUS EFIAPI CreateCmObjDesc (IN CM_OBJECT_ID ObjectId, IN UINT32 Count, IN VOID *Data, IN UINT32 Size, OUT CM_OBJ_DESCRIPTOR **NewCmObjDesc)
 
EFI_STATUS EFIAPI FreeCmObjDesc (IN CM_OBJ_DESCRIPTOR *CmObjDesc)
 
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 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 AddMultipleCmObjWithCmObjRef (IN CONST FDT_HW_INFO_PARSER_HANDLE FdtParserHandle, IN CM_OBJ_DESCRIPTOR *CmObjDesc, OUT CM_OBJECT_TOKEN *Token)
 

Detailed Description

Configuration manager Object Descriptor Utility.

Copyright (c) 2021, ARM Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file CmObjectDescUtility.c.

Function Documentation

◆ AddMultipleCmObj()

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 
)

Add multiple CmObj to the Configuration Manager.

Parameters
[in]FdtParserHandleA handle to the parser instance.
[in]CmObjDescCmObjDesc containing multiple CmObj to add.
[in]TokenCountIf provided, count of entries in the TokenTable.
[out]TokenTableIf provided and success, token generated for these CmObj. Address of an array of CM_OBJECT_TOKEN with the same number of elements as the CmObjDesc.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_INVALID_PARAMETERInvalid parameter.

Definition at line 167 of file CmObjectDescUtility.c.

◆ AddMultipleCmObjWithCmObjRef()

EFI_STATUS EFIAPI AddMultipleCmObjWithCmObjRef ( IN CONST FDT_HW_INFO_PARSER_HANDLE  FdtParserHandle,
IN CM_OBJ_DESCRIPTOR CmObjDesc,
OUT CM_OBJECT_TOKEN Token 
)

Add multiple CmObj to the Configuration Manager.

Get one token referencing a EArchCommonObjCmRef CmObj itself referencing the input CmObj. In the table below, RefToken is returned.

Token referencing an Array of tokens Array of CmObj array of EArchCommonObjCmRef referencing each from the input: CmObj: CmObj from the input:

RefToken —> CmObjToken[0] —> CmObj[0] CmObjToken[1] —> CmObj[1] CmObjToken[2] —> CmObj[2]

Parameters
[in]FdtParserHandleA handle to the parser instance.
[in]CmObjDescCmObjDesc containing multiple CmObj to add.
[out]TokenIf success, token referencing an array of EArchCommonObjCmRef CmObj, themselves referencing the input CmObjs.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_INVALID_PARAMETERInvalid parameter.
EFI_OUT_OF_RESOURCESAn allocation has failed.

Definition at line 246 of file CmObjectDescUtility.c.

◆ AddSingleCmObj()

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 
)

Add a single CmObj to the Configuration Manager.

Parameters
[in]FdtParserHandleA handle to the parser instance.
[in]ObjectIdCmObj ObjectId.
[in]DataCmObj Data.
[in]SizeCmObj Size.
[out]TokenIf provided and success, token generated for this CmObj.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_INVALID_PARAMETERInvalid parameter.

Definition at line 112 of file CmObjectDescUtility.c.

◆ CreateCmObjDesc()

EFI_STATUS EFIAPI CreateCmObjDesc ( IN CM_OBJECT_ID  ObjectId,
IN UINT32  Count,
IN VOID *  Data,
IN UINT32  Size,
OUT CM_OBJ_DESCRIPTOR **  NewCmObjDesc 
)

Create a CM_OBJ_DESCRIPTOR.

Parameters
[in]ObjectIdCM_OBJECT_ID of the node.
[in]CountNumber of CmObj stored in the data field.
[in]DataPointer to one or more CmObj objects. The content of this Data buffer is copied.
[in]SizeSize of the Data buffer.
[out]NewCmObjDescThe created CM_OBJ_DESCRIPTOR.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_INVALID_PARAMETERInvalid parameter.
EFI_OUT_OF_RESOURCESAn allocation has failed.

Definition at line 29 of file CmObjectDescUtility.c.

◆ FreeCmObjDesc()

EFI_STATUS EFIAPI FreeCmObjDesc ( IN CM_OBJ_DESCRIPTOR CmObjDesc)

Free resources allocated for the CM_OBJ_DESCRIPTOR.

Parameters
[in]CmObjDescPointer to the CM_OBJ_DESCRIPTOR.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_INVALID_PARAMETERInvalid parameter.

Definition at line 81 of file CmObjectDescUtility.c.