]> git.karo-electronics.de Git - karo-tx-linux.git/commit
tpm: enhance read_log_of() to support Physical TPM event log
authorNayna Jain <nayna@linux.vnet.ibm.com>
Mon, 23 Jan 2017 07:26:26 +0000 (02:26 -0500)
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Fri, 3 Feb 2017 20:03:14 +0000 (22:03 +0200)
commite46e22f12b19f0068b02afcf6edb716b4f49934f
treee56538bada035a1d05b6ca606f3ea07184b314b8
parentc1f92b4b04ad7006bdcbd1d5bb63f2864b06b7f8
tpm: enhance read_log_of() to support Physical TPM event log

Physical TPMs use Open Firmware Device Tree bindings that are similar
to the IBM Power virtual TPM to support event log. However, these
properties store the values in different endianness for Physical
and Virtual TPM.

This patch fixes the endianness issue by doing appropriate conversion
based on Physical or Virtual TPM.

Signed-off-by: Nayna Jain <nayna@linux.vnet.ibm.com>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Tested-by: Kenneth Goldman <kgold@linux.vnet.ibm.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
drivers/char/tpm/tpm_of.c