diff options
author | Claudio Carvalho <cclaudio@linux.vnet.ibm.com> | 2018-04-20 18:03:31 -0300 |
---|---|---|
committer | Stewart Smith <stewart@linux.ibm.com> | 2018-04-23 00:06:59 -0500 |
commit | 4ca5fac2c3b3571bc8ac9b1c28d0cf4ee3efaaeb (patch) | |
tree | cbe60451de61c75407a27da62e41e56bdca6e439 /hdata | |
parent | 4e0e0c1020bb24aaf476c404252275d27e4a35d4 (diff) | |
download | skiboot-4ca5fac2c3b3571bc8ac9b1c28d0cf4ee3efaaeb.zip skiboot-4ca5fac2c3b3571bc8ac9b1c28d0cf4ee3efaaeb.tar.gz skiboot-4ca5fac2c3b3571bc8ac9b1c28d0cf4ee3efaaeb.tar.bz2 |
hdata/tpmrel: detect tpm not present by looking up the stinfo->status
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>
Diffstat (limited to 'hdata')
-rw-r--r-- | hdata/tpmrel.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/hdata/tpmrel.c b/hdata/tpmrel.c index 9b09765..01ef10c 100644 --- a/hdata/tpmrel.c +++ b/hdata/tpmrel.c @@ -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) { |