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

Go to the source code of this file.

Macros

#define TPM_CMD_COUNT_BYTE   2
 
#define TPM_CMD_ORDINAL_BYTE   6
 

Functions

int tis_open (void)
 
int tis_close (void)
 
int tis_init (void)
 
static ssize_t tpm_transmit (const uint8_t *sbuf, size_t sbufsiz, void *rbuf, size_t rbufsiz)
 
int tis_sendrecv (const uint8_t *sendbuf, size_t sbuf_size, uint8_t *recvbuf, size_t *rbuf_len)
 

Variables

static struct tpm_chip chip
 

Macro Definition Documentation

◆ TPM_CMD_COUNT_BYTE

#define TPM_CMD_COUNT_BYTE   2

Definition at line 19 of file tis.c.

◆ TPM_CMD_ORDINAL_BYTE

#define TPM_CMD_ORDINAL_BYTE   6

Definition at line 20 of file tis.c.

Function Documentation

◆ tis_close()

int tis_close ( void  )

Definition at line 42 of file tis.c.

References chip, tpm_chip::is_open, and tpm_vendor_cleanup().

Here is the call graph for this function:

◆ tis_init()

int tis_init ( void  )

Definition at line 52 of file tis.c.

References tpm_vendor_probe().

Here is the call graph for this function:

◆ tis_open()

int tis_open ( void  )

Definition at line 22 of file tis.c.

References BIOS_DEBUG, chip, tpm_chip::is_open, printk, and tpm_vendor_init().

Here is the call graph for this function:

◆ tis_sendrecv()

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

Definition at line 121 of file tis.c.

References ASSERT, BIOS_DEBUG, CONFIG, hexdump(), printk, read_at_be32(), and tpm_transmit().

Here is the call graph for this function:

◆ tpm_transmit()

static ssize_t tpm_transmit ( const uint8_t sbuf,
size_t  sbufsiz,
void rbuf,
size_t  rbufsiz 
)
static

Variable Documentation

◆ chip