The DynamicPlatRepo library allows to handle dynamically created CmObj. The dynamic platform repository can be in the following states: 1 - Non-initialised 2 - Transient: Possibility to add CmObj to the platform, but not to query them. 3 - Finalised: Possibility to query CmObj, but not to add new. A token is allocated to each CmObj added to the dynamic platform repository (except for reference tokens CmObj). This allows to retrieve dynamic CmObjs among all CmObj (static CmObj for instance). This patch add the TokenFixer files, allowing to update the self-token some CmObj have. Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
53 lines
1.5 KiB
C
53 lines
1.5 KiB
C
/** @file
|
|
Configuration Manager object token fixer
|
|
|
|
Copyright (c) 2021, Arm Limited. All rights reserved.<BR>
|
|
|
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
|
|
@par Glossary:
|
|
- Cm or CM - Configuration Manager
|
|
- Obj or OBJ - Object
|
|
**/
|
|
|
|
#ifndef CM_OBJECT_TOKEN_FIXER_H_
|
|
#define CM_OBJECT_TOKEN_FIXER_H_
|
|
|
|
/** CmObjectToken fixer function that updates the Tokens in the CmObjects.
|
|
|
|
@param [in] CmObject Pointer to the Configuration Manager Object.
|
|
@param [in] Token Token to be updated in the CmObject.
|
|
|
|
@retval EFI_SUCCESS Success.
|
|
@retval EFI_INVALID_PARAMETER A parameter is invalid.
|
|
@retval EFI_UNSUPPORTED Not supported.
|
|
**/
|
|
typedef
|
|
EFI_STATUS
|
|
(EFIAPI *CM_OBJECT_TOKEN_FIXER)(
|
|
IN CM_OBJ_DESCRIPTOR *CmObject,
|
|
IN CM_OBJECT_TOKEN Token
|
|
);
|
|
|
|
/** CmObj token fixer.
|
|
|
|
Some CmObj structures have a self-token, i.e. they are storing their own
|
|
token value in the CmObj. Dynamically created CmObj need to have their
|
|
self-token assigned at some point.
|
|
|
|
@param [in] CmObjDesc Pointer to the Configuration Manager Object.
|
|
@param [in] Token Token to update the CmObjDesc with.
|
|
|
|
@retval EFI_SUCCESS Success.
|
|
@retval EFI_INVALID_PARAMETER A parameter is invalid.
|
|
@retval EFI_UNSUPPORTED Not supported.
|
|
**/
|
|
EFI_STATUS
|
|
EFIAPI
|
|
FixupCmObjectSelfToken (
|
|
IN CM_OBJ_DESCRIPTOR *CmObjDesc,
|
|
IN CM_OBJECT_TOKEN Token
|
|
);
|
|
|
|
#endif // CM_OBJECT_TOKEN_FIXER_H_
|