aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/tpm/tpm_eventlog.h
diff options
context:
space:
mode:
authorHon Ching \(Vicky\) Lo <honclo@linux.vnet.ibm.com>2015-06-17 18:17:08 -0400
committerPeter Huewe <peterhuewe@gmx.de>2015-10-19 01:09:30 +0200
commit0cc698af36ff22295dce2f5e46b0cfe605789fa4 (patch)
treecec30aa92173479c797cc0349a0536b5849637c8 /drivers/char/tpm/tpm_eventlog.h
parentchar: Drop owner assignment from i2c_driver (diff)
downloadlinux-dev-0cc698af36ff22295dce2f5e46b0cfe605789fa4.tar.xz
linux-dev-0cc698af36ff22295dce2f5e46b0cfe605789fa4.zip
vTPM: support little endian guests
This patch makes the code endianness independent. We defined a macro do_endian_conversion to apply endianness to raw integers in the event entries so that they will be displayed properly. tpm_binary_bios_measurements_show() is modified for the display. Signed-off-by: Hon Ching(Vicky) Lo <honclo@linux.vnet.ibm.com> Signed-off-by: Joy Latten <jmlatten@linux.vnet.ibm.com> Reviewed-by: Ashley Lai <ashley@ahsleylai.com> Reviewed-by: Ashley Lai <ashley@ahsleylai.com> Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Diffstat (limited to '')
-rw-r--r--drivers/char/tpm/tpm_eventlog.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/char/tpm/tpm_eventlog.h b/drivers/char/tpm/tpm_eventlog.h
index e7da086d6928..267bfbd1b7bb 100644
--- a/drivers/char/tpm/tpm_eventlog.h
+++ b/drivers/char/tpm/tpm_eventlog.h
@@ -6,6 +6,12 @@
#define MAX_TEXT_EVENT 1000 /* Max event string length */
#define ACPI_TCPA_SIG "TCPA" /* 0x41504354 /'TCPA' */
+#ifdef CONFIG_PPC64
+#define do_endian_conversion(x) be32_to_cpu(x)
+#else
+#define do_endian_conversion(x) x
+#endif
+
enum bios_platform_class {
BIOS_CLIENT = 0x00,
BIOS_SERVER = 0x01,