metee
Loading...
Searching...
No Matches
intel::security::metee Class Reference

C++ class to access CSE/CSME/GSC firmware via a mei interface. More...

#include <meteepp.h>

Public Member Functions

 metee ()
 metee (uint32_t log_level, TeeLogCallback2 log_callback)
 metee (const GUID &guid)
 metee (const GUID &guid, uint32_t log_level)
 metee (const GUID &guid, uint32_t log_level, TeeLogCallback log_callback)
 metee (const GUID &guid, uint32_t log_level, TeeLogCallback2 log_callback)
 metee (const GUID &guid, const struct tee_device_address &device, uint32_t log_level)
 metee (const GUID &guid, const struct tee_device_address &device, uint32_t log_level, TeeLogCallback log_callback)
 metee (const GUID &guid, const struct tee_device_address &device, uint32_t log_level, TeeLogCallback2 log_callback)
 metee (const metee &other)=delete
 metee (metee &&other) noexcept
meteeoperator= (const metee &other)=delete
meteeoperator= (metee &&other) noexcept
virtual ~metee ()
void connect ()
std::vector< uint8_t > read (uint32_t timeout)
size_t write (const std::vector< uint8_t > &buffer, uint32_t timeout)
uint32_t fw_status (uint32_t fwStatusNum)
uint32_t trc ()
std::string kind ()
uint32_t log_level (uint32_t log_level)
uint32_t log_level ()
void log_callback (TeeLogCallback log_callback)
uint32_t max_msg_len ()
uint8_t protocol_ver ()
TEE_DEVICE_HANDLE device_handle ()
std::string driver_version ()

Detailed Description

C++ class to access CSE/CSME/GSC firmware via a mei interface.

Main interface class

Definition at line 84 of file meteepp.h.

Constructor & Destructor Documentation

◆ metee() [1/11]

intel::security::metee::metee ( )
inline

Default constructor, when connection to specific client is not required

Definition at line 88 of file meteepp.h.

◆ metee() [2/11]

intel::security::metee::metee ( uint32_t log_level,
TeeLogCallback2 log_callback )
inline

Constructor without client GUID, when connection to specific client is not required

Parameters
log_levellog level to set (from enum tee_log_level)
log_callbackpointer to function to run for log write (type 2)

Definition at line 94 of file meteepp.h.

◆ metee() [3/11]

intel::security::metee::metee ( const GUID & guid)
inline

Constructor

Parameters
guidGUID of the FW client that want to start a session

Definition at line 99 of file meteepp.h.

◆ metee() [4/11]

intel::security::metee::metee ( const GUID & guid,
uint32_t log_level )
inline

Constructor

Parameters
guidGUID of the FW client that want to start a session
log_levellog level to set (from enum tee_log_level)

Definition at line 110 of file meteepp.h.

◆ metee() [5/11]

intel::security::metee::metee ( const GUID & guid,
uint32_t log_level,
TeeLogCallback log_callback )
inline

Constructor

Parameters
guidGUID of the FW client that want to start a session
log_levellog level to set (from enum tee_log_level)
log_callbackpointer to function to run for log write

Definition at line 117 of file meteepp.h.

◆ metee() [6/11]

intel::security::metee::metee ( const GUID & guid,
uint32_t log_level,
TeeLogCallback2 log_callback )
inline

Constructor

Parameters
guidGUID of the FW client that want to start a session
log_levellog level to set (from enum tee_log_level)
log_callbackpointer to function to run for log write (type 2)

Definition at line 125 of file meteepp.h.

◆ metee() [7/11]

intel::security::metee::metee ( const GUID & guid,
const struct tee_device_address & device,
uint32_t log_level )
inline

Constructor

Parameters
guidGUID of the FW client that want to start a session
devicedevice address structure
log_levellog level to set (from enum tee_log_level)

Definition at line 133 of file meteepp.h.

◆ metee() [8/11]

intel::security::metee::metee ( const GUID & guid,
const struct tee_device_address & device,
uint32_t log_level,
TeeLogCallback log_callback )
inline

Constructor

Parameters
guidGUID of the FW client that want to start a session
devicedevice address structure
log_levellog level to set (from enum tee_log_level)
log_callbackpointer to function to run for log write

Definition at line 142 of file meteepp.h.

◆ metee() [9/11]

intel::security::metee::metee ( const GUID & guid,
const struct tee_device_address & device,
uint32_t log_level,
TeeLogCallback2 log_callback )
inline

Constructor

Parameters
guidGUID of the FW client that want to start a session
devicedevice address structure
log_levellog level to set (from enum tee_log_level)
log_callbackpointer to function to run for log write (type 2)

Definition at line 156 of file meteepp.h.

◆ metee() [10/11]

intel::security::metee::metee ( const metee & other)
delete

Copy constructor - disabled

◆ metee() [11/11]

intel::security::metee::metee ( metee && other)
inlinenoexcept

Move constructor

Parameters
otherObject to move from

Definition at line 170 of file meteepp.h.

◆ ~metee()

virtual intel::security::metee::~metee ( )
inlinevirtual

Destructor, disconnects, if connected

Definition at line 190 of file meteepp.h.

Member Function Documentation

◆ connect()

void intel::security::metee::connect ( )
inline

Connects to the TEE driver and starts a session

Definition at line 196 of file meteepp.h.

◆ device_handle()

TEE_DEVICE_HANDLE intel::security::metee::device_handle ( )
inline

Returns handle of TEE device Obtains HECI device handle on Windows and mei device file descriptor on Linux

Returns
the handle of the session.

Definition at line 343 of file meteepp.h.

◆ driver_version()

std::string intel::security::metee::driver_version ( )
inline

Obtains version of the TEE device driver Not implemented on Linux

Returns
Driver version as dotted string.

Definition at line 352 of file meteepp.h.

◆ fw_status()

uint32_t intel::security::metee::fw_status ( uint32_t fwStatusNum)
inline

Retrieves specified FW status register.

Parameters
fwStatusNumThe FW status register number (0-5).
Returns
obtained FW status.

Definition at line 247 of file meteepp.h.

◆ kind()

std::string intel::security::metee::kind ( )
inline

Retrieves device kind.

Returns
kind string value.

Definition at line 279 of file meteepp.h.

◆ log_callback()

void intel::security::metee::log_callback ( TeeLogCallback log_callback)
inline

Set log callback

Parameters
log_callbackpointer to function to run for log write, set NULL to use built-in function

Definition at line 316 of file meteepp.h.

◆ log_level() [1/2]

uint32_t intel::security::metee::log_level ( )
inline

Retrieve current log level

Returns
current log level

Definition at line 307 of file meteepp.h.

◆ log_level() [2/2]

uint32_t intel::security::metee::log_level ( uint32_t log_level)
inline

Set log level

Parameters
log_levellog level to set
Returns
previous log level

Definition at line 298 of file meteepp.h.

◆ max_msg_len()

uint32_t intel::security::metee::max_msg_len ( )
inline

Retrieve client maximum message length (MTU)

Returns
client maximum message length.

Definition at line 325 of file meteepp.h.

◆ operator=() [1/2]

metee & intel::security::metee::operator= ( const metee & other)
delete

Copy operator - disabled

◆ operator=() [2/2]

metee & intel::security::metee::operator= ( metee && other)
inlinenoexcept

Move operator

Parameters
otherObject to move from

Definition at line 181 of file meteepp.h.

◆ protocol_ver()

uint8_t intel::security::metee::protocol_ver ( )
inline

Retrieve client protocol version

Returns
client protocol version.

Definition at line 334 of file meteepp.h.

◆ read()

std::vector< uint8_t > intel::security::metee::read ( uint32_t timeout)
inline

Read data from the TEE device synchronously.

Parameters
timeoutThe timeout to complete read in milliseconds, zero for infinite
Returns
vector with data read from the TEE device

Definition at line 210 of file meteepp.h.

◆ trc()

uint32_t intel::security::metee::trc ( )
inline

Retrieves TRC register.

Returns
TRC value.

Definition at line 263 of file meteepp.h.

◆ write()

size_t intel::security::metee::write ( const std::vector< uint8_t > & buffer,
uint32_t timeout )
inline

Writes the specified buffer to the TEE device synchronously.

Parameters
buffervector containing the data to be written to the TEE device.
timeoutThe timeout to complete write in milliseconds, zero for infinite
Returns
the number of bytes written

Definition at line 230 of file meteepp.h.


The documentation for this class was generated from the following file: