Enable TPM 2 on big endian systems

Enable TPM 2 on big endian systems.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
This commit is contained in:
Stefan Berger 2017-03-28 19:27:03 -04:00
parent 468f0f3d96
commit a6d8f3f3c1

View File

@ -81,10 +81,15 @@
#define SET 1
#define CLEAR 0
/* From Vendor-Specific: Table 1 - Defines for Processor Values */
#ifndef BIG_ENDIAN_TPM
#include <endian.h>
#if __BYTE_ORDER == __LITTLE_ENDIAN
#define BIG_ENDIAN_TPM NO
#define LITTLE_ENDIAN_TPM YES
#endif
#if __BYTE_ORDER == __BIG_ENDIAN
#define BIG_ENDIAN_TPM YES
#define LITTLE_ENDIAN_TPM NO
#endif
#define LITTLE_ENDIAN_TPM !BIG_ENDIAN_TPM
#define MOST_SIGNIFICANT_BIT_0 NO
#define LEAST_SIGNIFICANT_BIT_0 !MOST_SIGNIFICANT_BIT_0
#define AUTO_ALIGN NO