coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
ppi.c File Reference
#include <types.h>
#include <acpi/acpigen.h>
#include <acpi/acpi_device.h>
#include <cbmem.h>
#include <console/console.h>
#include "tpm_ppi.h"
Include dependency graph for ppi.c:

Go to the source code of this file.

Macros

#define BCD(x, y)   (((x) << 4) | ((y) << 0))
 

Functions

static void set_package_element_op (const char *package_name, unsigned int element, uint8_t src_op)
 
static void set_package_element_name (const char *package_name, unsigned int element, const char *src)
 
static void verify_supported_ppi (uint8_t src_op)
 
static void tpm_ppi_func0_cb (void *arg)
 
static void tpm_ppi_func1_cb (void *arg)
 
static void tpm_ppi_func2_cb (void *arg)
 
static void tpm_ppi_func3_cb (void *arg)
 
static void tpm_ppi_func4_cb (void *arg)
 
static void tpm_ppi_func5_cb (void *arg)
 
static void tpm_ppi_func6_cb (void *arg)
 
static void tpm_ppi_func7_cb (void *arg)
 
static void tpm_ppi_func8_cb (void *arg)
 
static void tpm_mci_func0_cb (void *arg)
 
static void tpm_mci_func1_cb (void *arg)
 
void tpm_ppi_acpi_fill_ssdt (const struct device *dev)
 
void lb_tpm_ppi (struct lb_header *header)
 

Variables

static void(* tpm_ppi_callbacks [])(void *)
 
static void(* tpm_mci_callbacks [])(void *)
 

Macro Definition Documentation

◆ BCD

#define BCD (   x,
  y 
)    (((x) << 4) | ((y) << 0))

Definition at line 11 of file ppi.c.

Function Documentation

◆ lb_tpm_ppi()

◆ set_package_element_name()

static void set_package_element_name ( const char *  package_name,
unsigned int  element,
const char *  src 
)
static

Definition at line 24 of file ppi.c.

References acpigen_emit_byte(), acpigen_emit_namestring(), acpigen_write_integer(), acpigen_write_store(), INDEX_OP, and ZERO_OP.

Referenced by tpm_ppi_func3_cb(), and tpm_ppi_func5_cb().

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

◆ set_package_element_op()

static void set_package_element_op ( const char *  package_name,
unsigned int  element,
uint8_t  src_op 
)
static

Definition at line 13 of file ppi.c.

References acpigen_emit_byte(), acpigen_emit_namestring(), acpigen_write_integer(), acpigen_write_store(), INDEX_OP, and ZERO_OP.

Referenced by tpm_ppi_func3_cb(), and tpm_ppi_func5_cb().

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

◆ tpm_mci_func0_cb()

static void tpm_mci_func0_cb ( void arg)
static

Definition at line 477 of file ppi.c.

References acpigen_write_return_singleton_buffer().

Here is the call graph for this function:

◆ tpm_mci_func1_cb()

static void tpm_mci_func1_cb ( void arg)
static

Definition at line 482 of file ppi.c.

References acpigen_write_return_byte().

Here is the call graph for this function:

◆ tpm_ppi_acpi_fill_ssdt()

void tpm_ppi_acpi_fill_ssdt ( const struct device dev)

Definition at line 493 of file ppi.c.

References acpigen_emit_byte(), acpigen_emit_namestring(), acpigen_pop_len(), acpigen_write_dsm_uuid_arr(), acpigen_write_dword(), acpigen_write_field(), acpigen_write_if(), acpigen_write_if_lequal_op_int(), acpigen_write_integer(), acpigen_write_method(), acpigen_write_method_serialized(), acpigen_write_name(), acpigen_write_opregion(), acpigen_write_package(), acpigen_write_return_integer(), acpigen_write_return_op(), acpigen_write_to_integer(), ARG0_OP, ARG1_OP, ARRAY_SIZE, BIOS_DEBUG, BIOS_ERR, cbmem_add(), CBMEM_ID_TPM_PPI, CONFIG, CREATE_BYTE_OP, DSM_UUID, FIELD_ANYACC, FIELD_NOLOCK, FIELD_PRESERVE, FIELDLIST_NAMESTR, FIELDLIST_OFFSET, cb_tpm_ppi_payload_handshake::fret, cb_tpm_ppi_payload_handshake::func, LGREATER_OP, list, LOCAL0_OP, LOCAL1_OP, cb_tpm_ppi_payload_handshake::lppr, memset(), opregion::name, cb_tpm_ppi_payload_handshake::next_step, NULL, OPREGION, cb_tpm_ppi_payload_handshake::ppin, cb_tpm_ppi_payload_handshake::ppip, cb_tpm_ppi_payload_handshake::pprm, cb_tpm_ppi_payload_handshake::pprp, cb_tpm_ppi_payload_handshake::pprq, printk, SYSTEMMEMORY, TO_INTEGER_OP, TPM2_CHANGE_EPS, TPM2_CLEAR, TPM2_CLEAR_ENABLE_ACTIVE, TPM2_DISABLE, TPM2_DISABLE_BLOCK_SID, TPM2_DISABLE_ENDORSMENT_ENABLE_STORAGE_HISTORY, TPM2_ENABLE, TPM2_ENABLE_BLOCK_SID, TPM2_ENABLE_CLEAR, TPM2_ENABLE_CLEAR2, TPM2_LOG_ALL_DIGEST, TPM2_NOOP, TPM2_SET_PCR_BANKS, TPM2_SET_PP_REQUIRED_FOR_CHANGE_EPS_FALSE, TPM2_SET_PP_REQUIRED_FOR_CHANGE_EPS_TRUE, TPM2_SET_PP_REQUIRED_FOR_CHANGE_PCRS_FALSE, TPM2_SET_PP_REQUIRED_FOR_CHANGE_PCRS_TRUE, TPM2_SET_PP_REQUIRED_FOR_CLEAR_FALSE, TPM2_SET_PP_REQUIRED_FOR_CLEAR_TRUE, TPM2_SET_PP_REQUIRED_FOR_DISABLE_BLOCK_SID_FALSE, TPM2_SET_PP_REQUIRED_FOR_DISABLE_BLOCK_SID_TRUE, TPM2_SET_PP_REQUIRED_FOR_ENABLE_BLOCK_SID_FALSE, TPM2_SET_PP_REQUIRED_FOR_ENABLE_BLOCK_SID_TRUE, TPM2_SET_PP_REQUIRED_FOR_TURN_OFF_FALSE, TPM2_SET_PP_REQUIRED_FOR_TURN_OFF_TRUE, TPM2_SET_PP_REQUIRED_FOR_TURN_ON_FALSE, TPM2_SET_PP_REQUIRED_FOR_TURN_ON_TRUE, TPM_ACTIVATE, TPM_CLEAR, TPM_CLEAR_ENABLE_ACTIVATE, TPM_DEACTIVATE, TPM_DEACTIVATE_DISABLE, TPM_DISABLE, TPM_ENABLE, TPM_ENABLE_ACTIVATE, TPM_ENABLE_ACTIVATE_SETOWNERINSTALL_TRUE, TPM_ENABLE_ACTIVE_CLEAR, TPM_ENABLE_ACTIVE_CLEAR_ENABLE_ACTIVE, tpm_mci_callbacks, TPM_MCI_UUID, TPM_NOOP, tpm_ppi_callbacks, TPM_PPI_UUID, TPM_SET_NOPPIPROVISION_FALSE, TPM_SET_NOPPIPROVISION_TRUE, TPM_SETOWNERINSTALL_FALSE, TPM_SETOWNERINSTALL_FALSE_DEACTIVATE_DISABLE, TPM_SETOWNERINSTALL_TRUE, and VENDOR_SPECIFIC_OFFSET.

Here is the call graph for this function:

◆ tpm_ppi_func0_cb()

static void tpm_ppi_func0_cb ( void arg)
static

Definition at line 100 of file ppi.c.

References acpigen_write_return_byte_buffer(), and buf.

Here is the call graph for this function:

◆ tpm_ppi_func1_cb()

static void tpm_ppi_func1_cb ( void arg)
static

Definition at line 115 of file ppi.c.

References acpigen_write_return_string(), CONFIG, and TPM2.

Here is the call graph for this function:

◆ tpm_ppi_func2_cb()

◆ tpm_ppi_func3_cb()

◆ tpm_ppi_func4_cb()

static void tpm_ppi_func4_cb ( void arg)
static

Definition at line 247 of file ppi.c.

References acpigen_write_return_byte(), and PPI4_RET_REBOOT.

Here is the call graph for this function:

◆ tpm_ppi_func5_cb()

◆ tpm_ppi_func6_cb()

static void tpm_ppi_func6_cb ( void arg)
static

Definition at line 308 of file ppi.c.

References acpigen_write_return_byte(), and PPI6_RET_NOT_IMPLEMENTED.

Here is the call graph for this function:

◆ tpm_ppi_func7_cb()

◆ tpm_ppi_func8_cb()

◆ verify_supported_ppi()

static void verify_supported_ppi ( uint8_t  src_op)
static

Variable Documentation

◆ tpm_mci_callbacks

void(* tpm_mci_callbacks[])(void *) ( void )
static
Initial value:
= {
}
static void tpm_mci_func1_cb(void *arg)
Definition: ppi.c:482
static void tpm_mci_func0_cb(void *arg)
Definition: ppi.c:477

Definition at line 488 of file ppi.c.

Referenced by tpm_ppi_acpi_fill_ssdt().

◆ tpm_ppi_callbacks

void(* tpm_ppi_callbacks[])(void *) ( void )
static
Initial value:
= {
}
static void tpm_ppi_func7_cb(void *arg)
Definition: ppi.c:331
static void tpm_ppi_func0_cb(void *arg)
Definition: ppi.c:100
static void tpm_ppi_func6_cb(void *arg)
Definition: ppi.c:308
static void tpm_ppi_func1_cb(void *arg)
Definition: ppi.c:115
static void tpm_ppi_func3_cb(void *arg)
Definition: ppi.c:176
static void tpm_ppi_func8_cb(void *arg)
Definition: ppi.c:401
static void tpm_ppi_func5_cb(void *arg)
Definition: ppi.c:270
static void tpm_ppi_func4_cb(void *arg)
Definition: ppi.c:247
static void tpm_ppi_func2_cb(void *arg)
Definition: ppi.c:140

Definition at line 465 of file ppi.c.

Referenced by tpm_ppi_acpi_fill_ssdt().