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

Go to the source code of this file.

Functions

STATIC EFI_STATUS EFIAPI AllocCmObjNode (IN CONST CM_OBJ_DESCRIPTOR *CmObjDesc, IN CM_OBJECT_TOKEN Token, OUT CM_OBJ_NODE **ObjNode)
 
STATIC EFI_STATUS EFIAPI FreeCmObjNode (IN CM_OBJ_NODE *ObjNode)
 
EFI_STATUS EFIAPI DynPlatRepoAddObject (IN DYNAMIC_PLATFORM_REPOSITORY_INFO *This, IN CONST CM_OBJ_DESCRIPTOR *CmObjDesc, OUT CM_OBJECT_TOKEN *Token OPTIONAL)
 
STATIC EFI_STATUS EFIAPI GroupCmObjNodes (IN DYNAMIC_PLATFORM_REPOSITORY_INFO *This, IN EOBJECT_NAMESPACE_ID NamespaceId, IN UINT32 ObjIndex)
 
EFI_STATUS EFIAPI DynamicPlatRepoFinalise (IN DYNAMIC_PLATFORM_REPOSITORY_INFO *This)
 
EFI_STATUS EFIAPI DynamicPlatRepoGetObject (IN DYNAMIC_PLATFORM_REPOSITORY_INFO *This, IN CM_OBJECT_ID CmObjectId, IN CM_OBJECT_TOKEN Token OPTIONAL, IN OUT CM_OBJ_DESCRIPTOR *CmObjDesc)
 
EFI_STATUS EFIAPI DynamicPlatRepoInit (OUT DYNAMIC_PLATFORM_REPOSITORY_INFO **DynPlatRepo)
 
STATIC VOID EFIAPI DynamicPlatRepoFreeArmObjects (IN DYNAMIC_PLATFORM_REPOSITORY_INFO *DynPlatRepo)
 
STATIC VOID EFIAPI DynamicPlatRepoFreeArchCommonObjects (IN DYNAMIC_PLATFORM_REPOSITORY_INFO *DynPlatRepo)
 
EFI_STATUS EFIAPI DynamicPlatRepoShutdown (IN DYNAMIC_PLATFORM_REPOSITORY_INFO *DynPlatRepo)
 

Detailed Description

Dynamic Platform Info Repository

Copyright (c) 2021, Arm Limited. All rights reserved.
Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Glossary:
  • Cm or CM - Configuration Manager
  • Obj or OBJ - Object

Definition in file DynamicPlatRepo.c.

Function Documentation

◆ AllocCmObjNode()

STATIC EFI_STATUS EFIAPI AllocCmObjNode ( IN CONST CM_OBJ_DESCRIPTOR CmObjDesc,
IN CM_OBJECT_TOKEN  Token,
OUT CM_OBJ_NODE **  ObjNode 
)

Allocate a CM_OBJ_NODE.

Parameters
[in]CmObjDescCmObj to wrap in a node. All the fields of the CmObj (Data field included), are copied.
[in]TokenToken to assign to this CmObj/node.
[out]ObjNodeAllocated ObjNode.
Return values
EFI_SUCCESSSuccess.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_OUT_OF_RESOURCESAn allocation has failed.

Definition at line 39 of file DynamicPlatRepo.c.

◆ DynamicPlatRepoFinalise()

EFI_STATUS EFIAPI DynamicPlatRepoFinalise ( IN DYNAMIC_PLATFORM_REPOSITORY_INFO This)

Finalise the dynamic repository.

Finalising means:

  • Preventing any further objects from being added.
  • Allowing to get objects from the dynamic repository (not possible before a call to this function).
Parameters
[in]ThisThis dynamic platform repository.
Return values
EFI_SUCCESSSuccess.
EFI_ALREADY_STARTEDInstance already initialised.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_BUFFER_TOO_SMALLBuffer too small.
EFI_OUT_OF_RESOURCESAn allocation has failed.

Definition at line 363 of file DynamicPlatRepo.c.

◆ DynamicPlatRepoFreeArchCommonObjects()

STATIC VOID EFIAPI DynamicPlatRepoFreeArchCommonObjects ( IN DYNAMIC_PLATFORM_REPOSITORY_INFO DynPlatRepo)

Free Arch Common Namespace objects.

Free all the memory allocated for the Arch Common namespace objects in the dynamic platform repository.

Parameters
[in]DynPlatRepoThe dynamic platform repository.

Definition at line 601 of file DynamicPlatRepo.c.

◆ DynamicPlatRepoFreeArmObjects()

STATIC VOID EFIAPI DynamicPlatRepoFreeArmObjects ( IN DYNAMIC_PLATFORM_REPOSITORY_INFO DynPlatRepo)

Free Arm Namespace objects.

Free all the memory allocated for the Arm namespace objects in the dynamic platform repository.

Parameters
[in]DynPlatRepoThe dynamic platform repository.

Definition at line 560 of file DynamicPlatRepo.c.

◆ DynamicPlatRepoGetObject()

EFI_STATUS EFIAPI DynamicPlatRepoGetObject ( IN DYNAMIC_PLATFORM_REPOSITORY_INFO This,
IN CM_OBJECT_ID  CmObjectId,
IN CM_OBJECT_TOKEN Token  OPTIONAL,
IN OUT CM_OBJ_DESCRIPTOR CmObjDesc 
)

Get a CmObj from the dynamic repository.

Parameters
[in]ThisPointer to the Dynamic Platform Repository.
[in]CmObjectIdThe Configuration Manager Object ID.
[in]TokenAn optional token identifying the object. If unused this must be CM_NULL_TOKEN.
[in,out]CmObjDescPointer to the Configuration Manager Object descriptor describing the requested Object.
Return values
EFI_SUCCESSSuccess.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_NOT_FOUNDThe required object information is not found.

Definition at line 431 of file DynamicPlatRepo.c.

◆ DynamicPlatRepoInit()

EFI_STATUS EFIAPI DynamicPlatRepoInit ( OUT DYNAMIC_PLATFORM_REPOSITORY_INFO **  DynPlatRepo)

Initialize the dynamic platform repository.

Parameters
[out]DynPlatRepoIf success, contains the initialised dynamic platform repository.
Return values
EFI_SUCCESSSuccess.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_OUT_OF_RESOURCESAn allocation has failed.

Definition at line 514 of file DynamicPlatRepo.c.

◆ DynamicPlatRepoShutdown()

EFI_STATUS EFIAPI DynamicPlatRepoShutdown ( IN DYNAMIC_PLATFORM_REPOSITORY_INFO DynPlatRepo)

Shutdown the dynamic platform repository.

Free all the memory allocated for the dynamic platform repository.

Parameters
[in]DynPlatRepoThe dynamic platform repository.
Return values
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_SUCCESSSuccess.

Definition at line 642 of file DynamicPlatRepo.c.

◆ DynPlatRepoAddObject()

EFI_STATUS EFIAPI DynPlatRepoAddObject ( IN DYNAMIC_PLATFORM_REPOSITORY_INFO This,
IN CONST CM_OBJ_DESCRIPTOR CmObjDesc,
OUT CM_OBJECT_TOKEN *Token  OPTIONAL 
)

Add an object to the dynamic platform repository.

Parameters
[in]ThisThis dynamic platform repository.
[in]CmObjDescCmObj to add. The data is copied.
[out]TokenIf not NULL, token allocated to this CmObj.
Return values
EFI_SUCCESSSuccess.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_OUT_OF_RESOURCESAn allocation has failed.

Definition at line 124 of file DynamicPlatRepo.c.

◆ FreeCmObjNode()

STATIC EFI_STATUS EFIAPI FreeCmObjNode ( IN CM_OBJ_NODE ObjNode)

Free a CM_OBJ_NODE.

Parameters
[in]ObjNodeObjNode to free.
Return values
EFI_SUCCESSSuccess.
EFI_INVALID_PARAMETERA parameter is invalid.

Definition at line 89 of file DynamicPlatRepo.c.

◆ GroupCmObjNodes()

STATIC EFI_STATUS EFIAPI GroupCmObjNodes ( IN DYNAMIC_PLATFORM_REPOSITORY_INFO This,
IN EOBJECT_NAMESPACE_ID  NamespaceId,
IN UINT32  ObjIndex 
)

Group lists of CmObjNode from the Arm Namespace or ArchCommon namespace to one array.

Parameters
[in]ThisThis dynamic platform repository.
[in]NamespaceIdThe namespace ID which can be EObjNameSpaceArm or EObjNameSpaceArchCommon.
[in]ObjIndexIndex in EARM_OBJECT_ID (must be < EArmObjMax) or EARCH_COMMON_OBJECT_ID (must be <EArchCommonObjMax).
Return values
EFI_SUCCESSSuccess.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_BUFFER_TOO_SMALLBuffer too small.
EFI_OUT_OF_RESOURCESAn allocation has failed.

Definition at line 226 of file DynamicPlatRepo.c.