Skip to content

Commit

Permalink
hdata/tpmrel: detect tpm not present by looking up the stinfo->status
Browse files Browse the repository at this point in the history
Skiboot detects if tpm is present by checking if a secureboot_tpm_info
entry exists. However, if a tpm is not present, hostboot also creates a
secureboot_tpm_info entry. In this case, hostboot creates an empty
entry, but setting the field tpm_status to TPM_NOT_PRESENT.

This detects if tpm is not present by looking up the stinfo->status.

This fixes the "TPMREL: TPM node not found for chip_id=0 (HB bug)"
issue, reproduced when skiboot is running on a system that has no tpm.

Signed-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com>
Tested-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
  • Loading branch information
Claudio Carvalho authored and stewartsmith committed Apr 23, 2018
1 parent 4e0e0c1 commit 4ca5fac
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions hdata/tpmrel.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ static void tpmrel_add_firmware_event_log(const struct HDIF_common_hdr *hdif_hdr
TPMREL_IDATA_SECUREBOOT_TPM_INFO,
i, NULL);

/*
* If tpm is not present, hostboot creates an empty
* secureboot_tpm_info entry, but setting
* tpm_status=TPM_NOT_PRESENT
*/
if (stinfo->tpm_status == TPM_NOT_PRESENT)
continue;

xscom = find_xscom_for_chip(be32_to_cpu(stinfo->chip_id));
if (xscom) {
dt_for_each_node(xscom, node) {
Expand Down

0 comments on commit 4ca5fac

Please sign in to comment.