aboutsummaryrefslogtreecommitdiff
path: root/libstb/tpm_chip.h
AgeCommit message (Collapse)AuthorFilesLines
2018-11-08libstb: Pass a tpm_dev to tpm_i2c_request_send()Oliver O'Halloran1-1/+1
Just pass the container structure rather than bus_id and xscom_base to tpm_i2c_request_send(). Rename xscom_base to i2c_addr while we're here since that's just plain wrong. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2017-12-18libstb: import stb_init() breaking it into multiple filesClaudio Carvalho1-1/+1
This imports stb_init() from stb.c, but breaking it into multiple files in order to make the code easier to read and to maintain. New files created: secureboot.c, trustedboot.c and cvc.c. The secureboot_init() in secureboot.c also initializes the hardware key hash and the hardware key hash size, which are used to call the CVC verify wrapper. These variables were initialized in the romcode_probe() function, libstb/drivers/romcode.c. The cvc_init() in cvc.c is slightly modified from what exists in stb_init(). Now it calls cvc_register() and cvc_service_register(). Signed-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-10-10libstb/tpm_chip: add tpm_extendl()Claudio Carvalho1-0/+26
This adds the tpm_extendl() function to tpm_chip interface For each TPM device, tpm_extendl() extends the sha1 and sha256 digests provided to the indicated PCR and also records an event for the same PCR in the event log. Signed-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com> [stewart@linux.vnet.ibm.com: remove special char, align comments to 80 cols] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-10-10libstb/tss: build TSS and tpmLogMgrClaudio Carvalho1-0/+6
This adds both TSS and tpmLogMgr to be built as part of libstb. We map some routines and types from TSS and tpmLogMgr codes to equivalent skiboot routines and types. Signed-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com> [stewart@linux.vnet.ibm.com: merge skiboot/HB mappings into makefile patch, and fix pointer to int without cast warning (NULL vs 0) ] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-10-10libstb/tpm_chip.h: declare the TpmTarget type for TSSClaudio Carvalho1-0/+3
This declares the TpmTarget for TSS. This could be done in 'libstb/tss/trustedboot.H', but it causes a dependency cycle among trustedboot.H, trustedTypes.H and tpm_chip.h. Signed-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-10-10libstb: add tpm_chip interfaceClaudio Carvalho1-0/+73
This adds the TPM chip interface for libstb: - tpm_init(): call drivers' probe to find TPM devices that are compatible with them. - tpm_register_chip(): register a TPM chip which includes pointers to the TPM device and TPM driver structures. - tpm_add_status_property(): add the status device tree property for each registered TPM device. The TPM chip interface is documented in 'libstb/tpm_chip.h' and the tpm device tree node is documented in 'doc/device-tree/tpm.rst' Signed-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com> [stewart@linux.vnet.ibm.com: shuffle unused error path around] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>