coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
Go to the source code of this file.
Functions | |
int | tpm_marshal_command (TPM_CC command, const void *tpm_command_body, struct obuf *ob) |
tpm_marshal_command More... | |
struct tpm2_response * | tpm_unmarshal_response (TPM_CC command, struct ibuf *ib) |
tpm_unmarshal_response More... | |
tpm_marshal_command
Given a structure containing a TPM2 command, serialize the structure for sending it to the TPM.
@command: code of the TPM2 command to marshal @tpm_command_body: a pointer to the command specific structure @ob: output buffer where command is marshaled to
Returns 0 on success or -1 on error.
Definition at line 361 of file tss_marshaling.c.
References BIOS_INFO, marshal_clear(), marshal_clear_control(), marshal_cr50_vendor_command(), marshal_get_capability(), marshal_hierarchy_control(), marshal_nv_define_space(), marshal_nv_read(), marshal_nv_setbits(), marshal_nv_write(), marshal_nv_write_lock(), marshal_pcr_extend(), marshal_selftest(), marshal_shutdown(), marshal_startup(), obuf_nr_written(), obuf_splice_current(), obuf_write_be16(), obuf_write_be32(), printk, TPM2_Clear, TPM2_ClearControl, TPM2_CR50_VENDOR_COMMAND, TPM2_GetCapability, TPM2_Hierarchy_Control, TPM2_NV_DefineSpace, TPM2_NV_Read, TPM2_NV_SetBits, TPM2_NV_Write, TPM2_NV_WriteLock, TPM2_PCR_Extend, TPM2_SelfTest, TPM2_Shutdown, TPM2_Startup, TPM_ST_NO_SESSIONS, and tpm_tag.
Referenced by tpm_process_command().
struct tpm2_response* tpm_unmarshal_response | ( | TPM_CC | command, |
struct ibuf * | ib | ||
) |
tpm_unmarshal_response
Given a buffer received from the TPM in response to a certain command, deserialize the buffer into the expected response structure.
struct tpm2_response is a union of all possible responses.
@command: code of the TPM2 command for which a response is unmarshaled @ib: input buffer containing the serialized response.
Returns a pointer to the deserialized response or NULL in case of unmarshaling problems.
Definition at line 594 of file tss_marshaling.c.
References BIOS_ERR, BIOS_INFO, BIOS_WARNING, tpm2_response::gc, tpm2_response::hdr, ibuf_capacity(), ibuf_oob_drain(), ibuf_read_be16(), ibuf_read_be32(), ibuf_remaining(), NULL, tpm2_response::nvr, printk, TPM2_Clear, TPM2_ClearControl, TPM2_CR50_VENDOR_COMMAND, TPM2_GetCapability, TPM2_Hierarchy_Control, TPM2_NV_DefineSpace, TPM2_NV_Read, TPM2_NV_SetBits, TPM2_NV_Write, TPM2_NV_WriteLock, TPM2_PCR_Extend, TPM2_RC_SUCCESS, TPM2_SelfTest, TPM2_Shutdown, TPM2_Startup, tpm_header::tpm_code, tpm_header::tpm_size, tpm_header::tpm_tag, unmarshal_get_capability(), unmarshal_nv_read(), unmarshal_TPM_CC, unmarshal_vendor_command(), and tpm2_response::vcr.
Referenced by tpm_process_command().