coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
tis.c File Reference
#include <console/console.h>
#include <security/tpm/tis.h>
#include "tpm.h"
Include dependency graph for tis.c:

Go to the source code of this file.

Functions

static const char * tis_get_dev_name (struct tpm2_info *info)
 
int tis_open (void)
 
int tis_close (void)
 
int tis_init (void)
 
int tis_sendrecv (const uint8_t *sendbuf, size_t sbuf_size, uint8_t *recvbuf, size_t *rbuf_len)
 

Variables

static unsigned int tpm_is_open
 
struct {
   uint16_t   vid
 
   uint16_t   did
 
   const char *   device_name
 
dev_map []
 

Function Documentation

◆ tis_close()

int tis_close ( void  )

Definition at line 40 of file tis.c.

References tpm_is_open.

◆ tis_get_dev_name()

static const char* tis_get_dev_name ( struct tpm2_info info)
static

Definition at line 20 of file tis.c.

References ARRAY_SIZE, dev_map, info, and vid.

Referenced by tis_init().

Here is the caller graph for this function:

◆ tis_init()

int tis_init ( void  )

Definition at line 54 of file tis.c.

References BIOS_ERR, BIOS_INFO, info, printk, spi_setup_slave(), tis_get_dev_name(), tpm2_get_info(), and tpm2_init().

Here is the call graph for this function:

◆ tis_open()

int tis_open ( void  )

Definition at line 31 of file tis.c.

References BIOS_ERR, printk, and tpm_is_open.

◆ tis_sendrecv()

int tis_sendrecv ( const uint8_t sendbuf,
size_t  sbuf_size,
uint8_t recvbuf,
size_t rbuf_len 
)

Definition at line 78 of file tis.c.

References tpm2_process_command().

Here is the call graph for this function:

Variable Documentation

◆ 

const { ... } dev_map[]
Initial value:
= {
{ 0x15d1, 0x001b, "SLB9670" },
{ 0x1ae0, 0x0028, "CR50" },
{ 0x104a, 0x0000, "ST33HTPH2E32" },
}

Referenced by tis_get_dev_name().

◆ device_name

const char* device_name

Definition at line 13 of file tis.c.

◆ did

uint16_t did

Definition at line 12 of file tis.c.

◆ tpm_is_open

unsigned int tpm_is_open
static

Definition at line 8 of file tis.c.

Referenced by tis_close(), and tis_open().

◆ vid

uint16_t vid

Definition at line 11 of file tis.c.