NVIDIA DRIVE OS Linux API Reference

5.1.3.0 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Tegra Secure Counter (TSC) Services

Detailed Description

Declares the trusty TSC service declarations and functions.

Functions

te_error_t ote_tsc_init (void)
 Initializes the TSC hardware. More...
 
te_error_t ote_tsc_deinit (void)
 Deinitializes the TSC hardware. More...
 
te_error_t ote_tsc_get_msecs (uint64_t *tsc_msecs)
 Gets the current value of the TSC in milliseconds. More...
 
te_error_t ote_tsc_get_usecs (uint64_t *tsc_usecs)
 Gets the current value of the TSC in microseconds. More...
 

Function Documentation

te_error_t ote_tsc_deinit ( void  )
inline

Deinitializes the TSC hardware.

Function to deinitialize the TSC hardware and close a TSC session. Must be called once after the desired calls to _get_msecs have been made. Deinitialization will fail if a session is not open.

Return values
OTE_SUCCESSIndicates the operation was successful.
OTE_ERROR_BAD_STATEIndicates that the operation was unsuccessful (no open session exists)

Definition at line 91 of file ote_tsc.h.

te_error_t ote_tsc_get_msecs ( uint64_t *  tsc_msecs)
inline

Gets the current value of the TSC in milliseconds.

Function to access the TSC hardware. The value returned represents the time, in milliseconds, since boot. Any number of calls to _get_msecs is allowed between initialization and deinitialization.

Parameters
[out]tsc_msecsa pointer to a variable to store the returned TSC value (in ms).
Return values
OTE_SUCCESSIndicates the operation was successful.
OTE_ERROR_BAD_STATEIndicates that the operation was unsuccessful (no open session exists)

Definition at line 95 of file ote_tsc.h.

te_error_t ote_tsc_get_usecs ( uint64_t *  tsc_usecs)
inline

Gets the current value of the TSC in microseconds.

Function to access the TSC hardware. The value returned represents the time, in microseconds, since boot. Any number of calls to _get_usecs is allowed between initialization and deinitialization.

Parameters
[out]tsc_usecsa pointer to a variable to store the returned TSC value (in us).
Return values
OTE_SUCCESSIndicates the operation was successful.
OTE_ERROR_BAD_STATEIndicates that the operation was unsuccessful (no open session exists)

Definition at line 99 of file ote_tsc.h.

te_error_t ote_tsc_init ( void  )
inline

Initializes the TSC hardware.

Function to intialize the TSC hardware and open a TSC session. Must be called once before making calls to _get_msecs. Initialization will fail if a session is already open.

Return values
OTE_SUCCESSIndicates the operation was successful.

Definition at line 87 of file ote_tsc.h.