TianoCore EDK2 master
|
Go to the source code of this file.
Data Structures | |
struct | TokenMapDescriptor |
struct | TokenMapper |
Typedefs | |
typedef struct TokenMapDescriptor | TOKEN_MAP_DESCRIPTOR |
typedef struct TokenMapper | TOKEN_MAPPER |
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) |
Token Mapper
Copyright (c) 2021, Arm Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file TokenMapper.h.
typedef struct TokenMapDescriptor TOKEN_MAP_DESCRIPTOR |
Token mapping descriptor.
Bind a token and a CmObj together.
typedef struct TokenMapper TOKEN_MAPPER |
Token mapper.
Contain all the Token/CmObj couple mapping.
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.
[in] | TokenMapper | The TokenMapper instance. |
[in] | Token | CmObj token. |
[in] | ObjectId | CmObj ObjectId. |
[in] | Size | CmObj Size. |
[in] | Data | CmObj Data. This memory is referenced, not copied. |
EFI_SUCCESS | The function completed successfully. |
EFI_BUFFER_TOO_SMALL | Buffer too small. |
EFI_INVALID_PARAMETER | A parameter is invalid. |
Definition at line 35 of file TokenMapper.c.
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.
[in] | TokenMapper | The TokenMapper instance. |
[in] | Token | Token of the CmObj to search. |
[in] | ObjectId | Object Id of the CmObj to search. |
[out] | CmObjDesc | CM_OBJ_DESCRIPTOR containing the CmObj searched. |
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | A parameter is invalid. |
EFI_NOT_FOUND | Not found. |
Definition at line 97 of file TokenMapper.c.
EFI_STATUS EFIAPI TokenMapperInitialise | ( | IN TOKEN_MAPPER * | TokenMapper, |
IN UINTN | DescriptorCount | ||
) |
Initialise a TokenMapper.
[in] | TokenMapper | The TokenMapper to initialise. |
[in] | DescriptorCount | Number of entries to allocate. |
EFI_SUCCESS | The function completed successfully. |
EFI_ALREADY_STARTED | Instance already initialised. |
EFI_INVALID_PARAMETER | A parameter is invalid. |
Definition at line 161 of file TokenMapper.c.
EFI_STATUS EFIAPI TokenMapperShutdown | ( | IN TOKEN_MAPPER * | TokenMapper | ) |
Shutdown a TokenMapper.
[in] | TokenMapper | The TokenMapper to shutdown. |
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | A parameter is invalid. |
Definition at line 204 of file TokenMapper.c.