TianoCore EDK2 master
|
#include <Protocol/ConfigurationManagerProtocol.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
#include <Library/MemoryAllocationLib.h>
#include "CmObjectTokenFixer.h"
#include "DynamicPlatRepoInternal.h"
#include "TokenGenerator.h"
Go to the source code of this file.
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
Definition in file DynamicPlatRepo.c.
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.
[in] | CmObjDesc | CmObj to wrap in a node. All the fields of the CmObj (Data field included), are copied. |
[in] | Token | Token to assign to this CmObj/node. |
[out] | ObjNode | Allocated ObjNode. |
EFI_SUCCESS | Success. |
EFI_INVALID_PARAMETER | A parameter is invalid. |
EFI_OUT_OF_RESOURCES | An allocation has failed. |
Definition at line 39 of file DynamicPlatRepo.c.
EFI_STATUS EFIAPI DynamicPlatRepoFinalise | ( | IN DYNAMIC_PLATFORM_REPOSITORY_INFO * | This | ) |
Finalise the dynamic repository.
Finalising means:
[in] | This | This dynamic platform repository. |
EFI_SUCCESS | Success. |
EFI_ALREADY_STARTED | Instance already initialised. |
EFI_INVALID_PARAMETER | A parameter is invalid. |
EFI_BUFFER_TOO_SMALL | Buffer too small. |
EFI_OUT_OF_RESOURCES | An allocation has failed. |
Definition at line 363 of file DynamicPlatRepo.c.
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.
[in] | DynPlatRepo | The dynamic platform repository. |
Definition at line 601 of file DynamicPlatRepo.c.
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.
[in] | DynPlatRepo | The dynamic platform repository. |
Definition at line 560 of file DynamicPlatRepo.c.
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.
[in] | This | Pointer to the Dynamic Platform Repository. |
[in] | CmObjectId | The Configuration Manager Object ID. |
[in] | Token | An optional token identifying the object. If unused this must be CM_NULL_TOKEN. |
[in,out] | CmObjDesc | Pointer to the Configuration Manager Object descriptor describing the requested Object. |
EFI_SUCCESS | Success. |
EFI_INVALID_PARAMETER | A parameter is invalid. |
EFI_NOT_FOUND | The required object information is not found. |
Definition at line 431 of file DynamicPlatRepo.c.
EFI_STATUS EFIAPI DynamicPlatRepoInit | ( | OUT DYNAMIC_PLATFORM_REPOSITORY_INFO ** | DynPlatRepo | ) |
Initialize the dynamic platform repository.
[out] | DynPlatRepo | If success, contains the initialised dynamic platform repository. |
EFI_SUCCESS | Success. |
EFI_INVALID_PARAMETER | A parameter is invalid. |
EFI_OUT_OF_RESOURCES | An allocation has failed. |
Definition at line 514 of file DynamicPlatRepo.c.
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.
[in] | DynPlatRepo | The dynamic platform repository. |
EFI_INVALID_PARAMETER | A parameter is invalid. |
EFI_SUCCESS | Success. |
Definition at line 642 of file DynamicPlatRepo.c.
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.
[in] | This | This dynamic platform repository. |
[in] | CmObjDesc | CmObj to add. The data is copied. |
[out] | Token | If not NULL, token allocated to this CmObj. |
EFI_SUCCESS | Success. |
EFI_INVALID_PARAMETER | A parameter is invalid. |
EFI_OUT_OF_RESOURCES | An allocation has failed. |
Definition at line 124 of file DynamicPlatRepo.c.
STATIC EFI_STATUS EFIAPI FreeCmObjNode | ( | IN CM_OBJ_NODE * | ObjNode | ) |
Free a CM_OBJ_NODE.
[in] | ObjNode | ObjNode to free. |
EFI_SUCCESS | Success. |
EFI_INVALID_PARAMETER | A parameter is invalid. |
Definition at line 89 of file DynamicPlatRepo.c.
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.
[in] | This | This dynamic platform repository. |
[in] | NamespaceId | The namespace ID which can be EObjNameSpaceArm or EObjNameSpaceArchCommon. |
[in] | ObjIndex | Index in EARM_OBJECT_ID (must be < EArmObjMax) or EARCH_COMMON_OBJECT_ID (must be <EArchCommonObjMax). |
EFI_SUCCESS | Success. |
EFI_INVALID_PARAMETER | A parameter is invalid. |
EFI_BUFFER_TOO_SMALL | Buffer too small. |
EFI_OUT_OF_RESOURCES | An allocation has failed. |
Definition at line 226 of file DynamicPlatRepo.c.