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

Go to the source code of this file.

Functions

EFI_STATUS EFIAPI TokenMapperAddObject (IN TOKEN_MAPPER *TokenMapper, IN CM_OBJECT_TOKEN Token, IN CM_OBJECT_ID ObjectId, IN UINT32 Size, IN VOID *Data)
 
EFI_STATUS EFIAPI TokenMapperGetObject (IN TOKEN_MAPPER *TokenMapper, IN CM_OBJECT_TOKEN Token, IN CM_OBJECT_ID ObjectId, OUT CM_OBJ_DESCRIPTOR *CmObjDesc)
 
EFI_STATUS EFIAPI TokenMapperInitialise (IN TOKEN_MAPPER *TokenMapper, IN UINTN DescriptorCount)
 
EFI_STATUS EFIAPI TokenMapperShutdown (IN TOKEN_MAPPER *TokenMapper)
 

Detailed Description

Token Mapper

Copyright (c) 2021, Arm Limited. All rights reserved.

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

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

Definition in file TokenMapper.c.

Function Documentation

◆ TokenMapperAddObject()

EFI_STATUS EFIAPI TokenMapperAddObject ( IN TOKEN_MAPPER TokenMapper,
IN CM_OBJECT_TOKEN  Token,
IN CM_OBJECT_ID  ObjectId,
IN UINT32  Size,
IN VOID *  Data 
)

Add a CmObjDesc to the TokenMapper.

Parameters
[in]TokenMapperThe TokenMapper instance.
[in]TokenCmObj token.
[in]ObjectIdCmObj ObjectId.
[in]SizeCmObj Size.
[in]DataCmObj Data. This memory is referenced, not copied.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_BUFFER_TOO_SMALLBuffer too small.
EFI_INVALID_PARAMETERA parameter is invalid.

Definition at line 35 of file TokenMapper.c.

◆ TokenMapperGetObject()

EFI_STATUS EFIAPI TokenMapperGetObject ( IN TOKEN_MAPPER TokenMapper,
IN CM_OBJECT_TOKEN  Token,
IN CM_OBJECT_ID  ObjectId,
OUT CM_OBJ_DESCRIPTOR CmObjDesc 
)

Get a CmObjDesc from a ObjectId/Token couple.

The Token parameter is not optional. An existing token must be provided.

Parameters
[in]TokenMapperThe TokenMapper instance.
[in]TokenToken of the CmObj to search.
[in]ObjectIdObject Id of the CmObj to search.
[out]CmObjDescCM_OBJ_DESCRIPTOR containing the CmObj searched.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_NOT_FOUNDNot found.

Definition at line 97 of file TokenMapper.c.

◆ TokenMapperInitialise()

EFI_STATUS EFIAPI TokenMapperInitialise ( IN TOKEN_MAPPER TokenMapper,
IN UINTN  DescriptorCount 
)

Initialise a TokenMapper.

Parameters
[in]TokenMapperThe TokenMapper to initialise.
[in]DescriptorCountNumber of entries to allocate.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_ALREADY_STARTEDInstance already initialised.
EFI_INVALID_PARAMETERA parameter is invalid.

Definition at line 161 of file TokenMapper.c.

◆ TokenMapperShutdown()

EFI_STATUS EFIAPI TokenMapperShutdown ( IN TOKEN_MAPPER TokenMapper)

Shutdown a TokenMapper.

Parameters
[in]TokenMapperThe TokenMapper to shutdown.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_INVALID_PARAMETERA parameter is invalid.

Definition at line 204 of file TokenMapper.c.