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 <acpi/acpigen.h>
#include <device/device.h>
#include <drivers/intel/ptt/ptt.h>
#include "tpm.h"
#include "chip.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)
 
static void crb_tpm_fill_ssdt (const struct device *dev)
 
static const char * crb_tpm_acpi_name (const struct device *dev)
 
static void enable_dev (struct device *dev)
 

Variables

static unsigned int tpm_is_open
 
struct {
   uint16_t   vid
 
   uint16_t   did
 
   const char *   device_name
 
dev_map []
 
static struct device_operations __unused crb_ops
 
struct chip_operations drivers_crb_ops
 

Function Documentation

◆ crb_tpm_acpi_name()

static const char* crb_tpm_acpi_name ( const struct device dev)
static

Definition at line 121 of file tis.c.

◆ crb_tpm_fill_ssdt()

◆ enable_dev()

static void enable_dev ( struct device dev)
static

Definition at line 136 of file tis.c.

◆ tis_close()

int tis_close ( void  )

Definition at line 51 of file tis.c.

References tpm_is_open.

Referenced by tis_open(), and tis_setup_interrupt().

Here is the caller graph for this function:

◆ tis_get_dev_name()

static const char* tis_get_dev_name ( struct tpm2_info info)
static

Definition at line 23 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 65 of file tis.c.

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

Referenced by tlcl_lib_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tis_open()

int tis_open ( void  )

Definition at line 33 of file tis.c.

References BIOS_DEBUG, BIOS_ERR, CONFIG, printk, ptt_active(), and tpm_is_open.

Referenced by tis_setup_interrupt(), and tlcl_lib_init().

Here is the call graph for this function:
Here is the caller 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 81 of file tis.c.

References tpm2_process_command().

Referenced by tpm_process_command(), and tpm_send_receive().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ crb_ops

struct device_operations __unused crb_ops
static
Initial value:
= {
.read_resources = noop_read_resources,
.set_resources = noop_set_resources,
}
static void noop_read_resources(struct device *dev)
Standard device operations function pointers shims.
Definition: device.h:73
static void noop_set_resources(struct device *dev)
Definition: device.h:74

Definition at line 121 of file tis.c.

◆ 

const { ... } dev_map[]
Initial value:
= {
{0x1ae0, 0x0028, "CR50"},
{0xa13a, 0x8086, "Intel iTPM"}
}

Referenced by tis_get_dev_name().

◆ device_name

const char* device_name

Definition at line 17 of file tis.c.

Referenced by tis_probe().

◆ did

◆ drivers_crb_ops

struct chip_operations drivers_crb_ops
Initial value:
= {
.enable_dev = enable_dev
}
static void enable_dev(struct device *dev)
Definition: tis.c:136

Definition at line 136 of file tis.c.

◆ tpm_is_open

unsigned int tpm_is_open
static

Definition at line 12 of file tis.c.

Referenced by tis_close(), and tis_open().

◆ vid