NVIDIA DRIVE OS Linux API Reference

5.1.3.0 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Memory/Cache Management

Detailed Description

Declarations and functions for TLK memory/cache management.

Defines TLK memory and cache management data types and functions.

Data Structures

struct  te_map_mem_addr_args_t
 Holds a pointer to the map memory for a specific OTE_CONFIG_MAP_MEM ID value. More...
 
struct  te_v_to_p_args_t
 Holds a pointer to the physical address for a specific virtual address. More...
 
struct  te_cache_maint_args_t
 Holds an op code and data used to for cache maintenance. More...
 

Enumerations

enum  te_ext_nv_cache_maint_op_t {
  OTE_EXT_NV_CM_OP_CLEAN = 1,
  OTE_EXT_NV_CM_OP_INVALIDATE = 2,
  OTE_EXT_NV_CM_OP_FLUSH = 3
}
 Defines cache maintenance operations. More...
 
enum  te_ss_config_option_t {
  OTE_SS_CONFIG_RPMB_ENABLE = 0x0000001,
  OTE_SS_CONFIG_CPC_ENABLE = 0x0000002
}
 Bit mask defines for secure storage configuration options. More...
 

Functions

te_error_t te_ext_nv_cache_maint (te_ext_nv_cache_maint_op_t op, void *addr, uint32_t length)
 Performs a cache maintenance operation. More...
 
te_error_t te_ext_nv_virt_to_phys (void *addr, uint64_t *paddr)
 Performs virtual-to-physical address translation. More...
 
te_error_t te_ext_nv_get_map_addr (uint32_t id, void **addr)
 Retrieves mapping of a specified memory range. More...
 

Enumeration Type Documentation

Defines cache maintenance operations.

Enumerator
OTE_EXT_NV_CM_OP_CLEAN 

Cache clean operation.

OTE_EXT_NV_CM_OP_INVALIDATE 

Cache invalidate operation.

OTE_EXT_NV_CM_OP_FLUSH 

Cache flush operation.

Definition at line 46 of file ote_ext_nv.h.

Bit mask defines for secure storage configuration options.

Enumerator
OTE_SS_CONFIG_RPMB_ENABLE 

Bit to enable RPMB rollback protection support.

OTE_SS_CONFIG_CPC_ENABLE 

Bit to enable CPC rollback protection support.

Definition at line 81 of file ote_ext_nv.h.

Function Documentation

te_error_t te_ext_nv_cache_maint ( te_ext_nv_cache_maint_op_t  op,
void *  addr,
uint32_t  length 
)

Performs a cache maintenance operation.

This API allows the caller to perform a range of platform-specific cache management operations on the specified memory range.

Parameters
[in]opCache maintenance operation to perform. See te_ext_nv_cache_maint_op_t for more information.
[in]addrVirtual address of the buffer on which the cache maintenance operation is to be performed.
[in]lengthLength in bytes of the buffer specified by the addr parameter.
Return values
OTE_SUCCESSIndicates the operation completed successfully.
OTE_ERROR_BAD_PARAMETERSIndicates one or more of the input parameters is invalid:
  • The value specified in the ID parameter is not a valid te_ext_nv_cache_maint_op_t value.
  • The virtual address specified in addr is not valid.
OTE_ERROR_OUT_OF_MEMORYIndicates the system ran out of resources.
OTE_ERROR_GENERICIndicates an unspecified error occurred.
te_error_t te_ext_nv_get_map_addr ( uint32_t  id,
void **  addr 
)

Retrieves mapping of a specified memory range.

This API returns the mapped address of the specified memory range setup in the service's manifest via the OTE_CONFIG_MAP_MEM option.

Parameters
[in]idMemory region identifier specified in an OTE_CONFIG_MAP_MEM configuration option in the service's manifest.
[out]addrA pointer with the mapped address.
Return values
OTE_SUCCESSIndicates the operation completed successfully.
OTE_ERROR_BAD_PARAMETERSIndicates one or more of the input parameters is invalid:
  • The OTE_CONFIG_MAP_MEM ID parameter is unknown
  • The addr parameter contains an invalid pointer.
OTE_ERROR_OUT_OF_MEMORYIndicates the system ran out of resources.
OTE_ERROR_GENERICIndicates an unspecified error occurred.
te_error_t te_ext_nv_virt_to_phys ( void *  addr,
uint64_t *  paddr 
)

Performs virtual-to-physical address translation.

This API returns the physical address that corresponds to the specified virtual adress.

Parameters
[in]addrThe virtual address to translate.
[out]paddrA pointer with the physical address for addr.
Return values
OTE_SUCCESSIndicates the operation completed successfully.
OTE_ERROR_BAD_PARAMETERSIndicates one or more of the input parameters is invalid:
  • The virtual address specified in addr is not valid.
  • The paddr parameter contains an invalid pointer.
OTE_ERROR_OUT_OF_MEMORYIndicates the system ran out of resources.
OTE_ERROR_GENERICIndicates an unspecified error occurred.