summaryrefslogtreecommitdiff
path: root/firmware/lib/tpm_lite
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/lib/tpm_lite')
-rw-r--r--firmware/lib/tpm_lite/include/tlcl_internal.h40
-rw-r--r--firmware/lib/tpm_lite/include/tlcl_structures.h108
-rw-r--r--firmware/lib/tpm_lite/include/tpm_error_messages.h8
-rw-r--r--firmware/lib/tpm_lite/mocked_tlcl.c12
-rw-r--r--firmware/lib/tpm_lite/tlcl.c18
5 files changed, 93 insertions, 93 deletions
diff --git a/firmware/lib/tpm_lite/include/tlcl_internal.h b/firmware/lib/tpm_lite/include/tlcl_internal.h
index 5db556a8..28eff1d9 100644
--- a/firmware/lib/tpm_lite/include/tlcl_internal.h
+++ b/firmware/lib/tpm_lite/include/tlcl_internal.h
@@ -16,7 +16,7 @@
#define kEncAuthLength 20
#define kPcrDigestLength 20
#define kTpmRequestAuthBlockLength \
- (sizeof(uint32_t) + sizeof(TPM_NONCE) + 1 + TPM_AUTH_DATA_LEN)
+ (sizeof(uint32_t) + sizeof(TPM_NONCE) + 1 + TPM_AUTH_DATA_LEN)
#define kTpmResponseAuthBlockLength (sizeof(TPM_NONCE) + 1 + TPM_AUTH_DATA_LEN)
@@ -28,10 +28,10 @@
*/
__attribute__((unused))
static inline void ToTpmUint32(uint8_t *buffer, uint32_t x) {
- buffer[0] = (uint8_t)(x >> 24);
- buffer[1] = (uint8_t)((x >> 16) & 0xff);
- buffer[2] = (uint8_t)((x >> 8) & 0xff);
- buffer[3] = (uint8_t)(x & 0xff);
+ buffer[0] = (uint8_t)(x >> 24);
+ buffer[1] = (uint8_t)((x >> 16) & 0xff);
+ buffer[2] = (uint8_t)((x >> 8) & 0xff);
+ buffer[3] = (uint8_t)(x & 0xff);
}
/*
@@ -39,10 +39,10 @@ static inline void ToTpmUint32(uint8_t *buffer, uint32_t x) {
*/
__attribute__((unused))
static inline void FromTpmUint32(const uint8_t *buffer, uint32_t *x) {
- *x = ((buffer[0] << 24) |
- (buffer[1] << 16) |
- (buffer[2] << 8) |
- buffer[3]);
+ *x = ((buffer[0] << 24) |
+ (buffer[1] << 16) |
+ (buffer[2] << 8) |
+ buffer[3]);
}
/*
@@ -50,10 +50,10 @@ static inline void FromTpmUint32(const uint8_t *buffer, uint32_t *x) {
*/
__attribute__((unused))
static inline uint32_t ReadTpmUint32(const uint8_t **buffer) {
- uint32_t value;
- FromTpmUint32(*buffer, &value);
- *buffer += sizeof(value);
- return value;
+ uint32_t value;
+ FromTpmUint32(*buffer, &value);
+ *buffer += sizeof(value);
+ return value;
}
/*
@@ -61,8 +61,8 @@ static inline uint32_t ReadTpmUint32(const uint8_t **buffer) {
*/
__attribute__((unused))
static inline void ToTpmUint16(uint8_t *buffer, uint16_t x) {
- buffer[0] = (uint8_t)(x >> 8);
- buffer[1] = (uint8_t)(x & 0xff);
+ buffer[0] = (uint8_t)(x >> 8);
+ buffer[1] = (uint8_t)(x & 0xff);
}
/*
@@ -70,7 +70,7 @@ static inline void ToTpmUint16(uint8_t *buffer, uint16_t x) {
*/
__attribute__((unused))
static inline void FromTpmUint16(const uint8_t *buffer, uint16_t *x) {
- *x = (buffer[0] << 8) | buffer[1];
+ *x = (buffer[0] << 8) | buffer[1];
}
/*
@@ -78,10 +78,10 @@ static inline void FromTpmUint16(const uint8_t *buffer, uint16_t *x) {
*/
__attribute__((unused))
static inline uint16_t ReadTpmUint16(const uint8_t **buffer) {
- uint16_t value;
- FromTpmUint16(*buffer, &value);
- *buffer += sizeof(value);
- return value;
+ uint16_t value;
+ FromTpmUint16(*buffer, &value);
+ *buffer += sizeof(value);
+ return value;
}
#endif /* TPM_LITE_TLCL_INTERNAL_H_ */
diff --git a/firmware/lib/tpm_lite/include/tlcl_structures.h b/firmware/lib/tpm_lite/include/tlcl_structures.h
index 8a17ccc8..7356c439 100644
--- a/firmware/lib/tpm_lite/include/tlcl_structures.h
+++ b/firmware/lib/tpm_lite/include/tlcl_structures.h
@@ -1,180 +1,180 @@
/* This file is automatically generated */
const struct s_tpm_delegate_read_table_cmd{
- uint8_t buffer[10];
+ uint8_t buffer[10];
} tpm_delegate_read_table_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0xdb, },
};
const struct s_tpm_create_delegation_family_cmd{
- uint8_t buffer[23];
- uint16_t familyLabel;
+ uint8_t buffer[23];
+ uint16_t familyLabel;
} tpm_create_delegation_family_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0x17, 0x0, 0x0, 0x0, 0xd2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, },
22, };
const struct s_tpm_takeownership_cmd{
- uint8_t buffer[624];
- uint16_t encOwnerAuth;
- uint16_t encSrkAuth;
+ uint8_t buffer[624];
+ uint16_t encOwnerAuth;
+ uint16_t encSrkAuth;
} tpm_takeownership_cmd = {{0x0, 0xc2, 0x0, 0x0, 0x2, 0x70, 0x0, 0x0, 0x0, 0xd, 0x0, 0x5, 0x0, 0x0, 0x1, 0x0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x0, 0x0, 0x1, 0x0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x0, 0x28, 0x0, 0x0, 0x0, 0x11, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x3, 0x0, 0x1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, },
16, 276, };
const struct s_tpm_osap_cmd{
- uint8_t buffer[36];
- uint16_t entityType;
- uint16_t entityValue;
- uint16_t nonceOddOSAP;
+ uint8_t buffer[36];
+ uint16_t entityType;
+ uint16_t entityValue;
+ uint16_t nonceOddOSAP;
} tpm_osap_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0x24, 0x0, 0x0, 0x0, 0xb, },
10, 12, 16, };
const struct s_tpm_oiap_cmd{
- uint8_t buffer[10];
+ uint8_t buffer[10];
} tpm_oiap_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0xa, },
};
const struct s_tpm_ifx_fieldupgradeinforequest2_cmd{
- uint8_t buffer[13];
+ uint8_t buffer[13];
} tpm_ifx_fieldupgradeinforequest2_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xd, 0x0, 0x0, 0x0, 0xaa, 0x11, 0x0, 0x0, },
};
const struct s_tpm_getversionval_cmd{
- uint8_t buffer[18];
+ uint8_t buffer[18];
} tpm_getversionval_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0x12, 0x0, 0x0, 0x0, 0x65, 0x0, 0x0, 0x0, 0x1a, 0x0, 0x0, 0x0, 0x0, },
};
const struct s_tpm_extend_cmd{
- uint8_t buffer[34];
- uint16_t pcrNum;
- uint16_t inDigest;
+ uint8_t buffer[34];
+ uint16_t pcrNum;
+ uint16_t inDigest;
} tpm_extend_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0x22, 0x0, 0x0, 0x0, 0x14, },
10, 14, };
const struct s_tpm_get_random_cmd{
- uint8_t buffer[14];
- uint16_t bytesRequested;
+ uint8_t buffer[14];
+ uint16_t bytesRequested;
} tpm_get_random_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xe, 0x0, 0x0, 0x0, 0x46, },
10, };
const struct s_tpm_getownership_cmd{
- uint8_t buffer[22];
+ uint8_t buffer[22];
} tpm_getownership_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0x16, 0x0, 0x0, 0x0, 0x65, 0x0, 0x0, 0x0, 0x5, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x1, 0x11, },
};
const struct s_tpm_getspaceinfo_cmd{
- uint8_t buffer[22];
- uint16_t index;
+ uint8_t buffer[22];
+ uint16_t index;
} tpm_getspaceinfo_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0x16, 0x0, 0x0, 0x0, 0x65, 0x0, 0x0, 0x0, 0x11, 0x0, 0x0, 0x0, 0x4, },
18, };
const struct s_tpm_getstclearflags_cmd{
- uint8_t buffer[22];
+ uint8_t buffer[22];
} tpm_getstclearflags_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0x16, 0x0, 0x0, 0x0, 0x65, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x1, 0x9, },
};
const struct s_tpm_getflags_cmd{
- uint8_t buffer[22];
+ uint8_t buffer[22];
} tpm_getflags_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0x16, 0x0, 0x0, 0x0, 0x65, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x1, 0x8, },
};
const struct s_tpm_physicalsetdeactivated_cmd{
- uint8_t buffer[11];
- uint16_t deactivated;
+ uint8_t buffer[11];
+ uint16_t deactivated;
} tpm_physicalsetdeactivated_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xb, 0x0, 0x0, 0x0, 0x72, },
10, };
const struct s_tpm_physicalenable_cmd{
- uint8_t buffer[10];
+ uint8_t buffer[10];
} tpm_physicalenable_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x6f, },
};
const struct s_tpm_physicaldisable_cmd{
- uint8_t buffer[10];
+ uint8_t buffer[10];
} tpm_physicaldisable_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x70, },
};
const struct s_tpm_forceclear_cmd{
- uint8_t buffer[10];
+ uint8_t buffer[10];
} tpm_forceclear_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x5d, },
};
const struct s_tpm_readpubek_cmd{
- uint8_t buffer[30];
- uint16_t antiReplay;
+ uint8_t buffer[30];
+ uint16_t antiReplay;
} tpm_readpubek_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0x1e, 0x0, 0x0, 0x0, 0x7c, },
10, };
const struct s_tpm_continueselftest_cmd{
- uint8_t buffer[10];
+ uint8_t buffer[10];
} tpm_continueselftest_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x53, },
};
const struct s_tpm_selftestfull_cmd{
- uint8_t buffer[10];
+ uint8_t buffer[10];
} tpm_selftestfull_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x50, },
};
const struct s_tpm_resume_cmd{
- uint8_t buffer[12];
+ uint8_t buffer[12];
} tpm_resume_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, 0x99, 0x0, 0x2, },
};
const struct s_tpm_savestate_cmd{
- uint8_t buffer[10];
+ uint8_t buffer[10];
} tpm_savestate_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x98, },
};
const struct s_tpm_startup_cmd{
- uint8_t buffer[12];
+ uint8_t buffer[12];
} tpm_startup_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, 0x99, 0x0, 0x1, },
};
const struct s_tpm_finalizepp_cmd{
- uint8_t buffer[12];
+ uint8_t buffer[12];
} tpm_finalizepp_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xc, 0x40, 0x0, 0x0, 0xa, 0x2, 0xa0, },
};
const struct s_tpm_pplock_cmd{
- uint8_t buffer[12];
+ uint8_t buffer[12];
} tpm_pplock_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xc, 0x40, 0x0, 0x0, 0xa, 0x0, 0x4, },
};
const struct s_tpm_ppenable_cmd{
- uint8_t buffer[12];
+ uint8_t buffer[12];
} tpm_ppenable_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xc, 0x40, 0x0, 0x0, 0xa, 0x0, 0x20, },
};
const struct s_tpm_ppassert_cmd{
- uint8_t buffer[12];
+ uint8_t buffer[12];
} tpm_ppassert_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xc, 0x40, 0x0, 0x0, 0xa, 0x0, 0x8, },
};
const struct s_tpm_pcr_read_cmd{
- uint8_t buffer[14];
- uint16_t pcrNum;
+ uint8_t buffer[14];
+ uint16_t pcrNum;
} tpm_pcr_read_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xe, 0x0, 0x0, 0x0, 0x15, },
10, };
const struct s_tpm_nv_read_cmd{
- uint8_t buffer[22];
- uint16_t index;
- uint16_t length;
+ uint8_t buffer[22];
+ uint16_t index;
+ uint16_t length;
} tpm_nv_read_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0x16, 0x0, 0x0, 0x0, 0xcf, },
10, 18, };
const struct s_tpm_nv_write_cmd{
- uint8_t buffer[256];
- uint16_t index;
- uint16_t length;
- uint16_t data;
+ uint8_t buffer[256];
+ uint16_t index;
+ uint16_t length;
+ uint16_t data;
} tpm_nv_write_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xcd, },
10, 18, 22, };
const struct s_tpm_nv_definespace_cmd{
- uint8_t buffer[101];
- uint16_t index;
- uint16_t pcr_info_read;
- uint16_t pcr_info_write;
- uint16_t perm;
- uint16_t size;
+ uint8_t buffer[101];
+ uint16_t index;
+ uint16_t pcr_info_read;
+ uint16_t pcr_info_write;
+ uint16_t perm;
+ uint16_t size;
} tpm_nv_definespace_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0x65, 0x0, 0x0, 0x0, 0xcc, 0x0, 0x18, 0, 0, 0, 0, 0x0, 0x3, 0, 0, 0, 0x1f, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x0, 0x3, 0, 0, 0, 0x1f, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x0, 0x17, },
12, 16, 42, 70, 77, };
diff --git a/firmware/lib/tpm_lite/include/tpm_error_messages.h b/firmware/lib/tpm_lite/include/tpm_error_messages.h
index 14cb86be..834ba2d0 100644
--- a/firmware/lib/tpm_lite/include/tpm_error_messages.h
+++ b/firmware/lib/tpm_lite/include/tpm_error_messages.h
@@ -16,9 +16,9 @@
#define TPM_E_NON_FATAL 0x800
typedef struct tpm_error_info {
- const char* name;
- uint32_t code;
- const char* description;
+ const char* name;
+ uint32_t code;
+ const char* description;
} tpm_error_info;
tpm_error_info tpm_error_table[] = {
@@ -245,6 +245,6 @@ because the ordinal required resources that have not been tested" },
{ "TPM_DEFEND_LOCK_RUNNING", TPM_E_BASE + TPM_E_NON_FATAL + 3,
"The TPM is defending against dictionary attacks and is in some\n\
time-out period" },
- };
+};
#endif /* TPM_ERROR_MESSAGES_H */
diff --git a/firmware/lib/tpm_lite/mocked_tlcl.c b/firmware/lib/tpm_lite/mocked_tlcl.c
index 0abcb7c9..917532d1 100644
--- a/firmware/lib/tpm_lite/mocked_tlcl.c
+++ b/firmware/lib/tpm_lite/mocked_tlcl.c
@@ -145,8 +145,8 @@ uint32_t TlclGetSTClearFlags(TPM_STCLEAR_FLAGS* vflags)
}
uint32_t TlclGetFlags(uint8_t* disable,
- uint8_t* deactivated,
- uint8_t *nvlocked)
+ uint8_t* deactivated,
+ uint8_t *nvlocked)
{
*disable = 0;
*deactivated = 0;
@@ -160,7 +160,7 @@ uint32_t TlclSetGlobalLock(void)
}
uint32_t TlclExtend(int pcr_num, const uint8_t* in_digest,
- uint8_t* out_digest)
+ uint8_t* out_digest)
{
memcpy(out_digest, in_digest, kPcrDigestLength);
return TPM_SUCCESS;
@@ -187,8 +187,8 @@ uint32_t TlclGetRandom(uint8_t* data, uint32_t length, uint32_t *size)
}
uint32_t TlclGetVersion(uint32_t* vendor, uint64_t* firmware_version,
- uint8_t* vendor_specific_buf,
- size_t* vendor_specific_buf_size)
+ uint8_t* vendor_specific_buf,
+ size_t* vendor_specific_buf_size)
{
*vendor = 0x4e4f4e45;
*firmware_version = 0x1;
@@ -206,7 +206,7 @@ int TlclPacketSize(const uint8_t* packet)
}
uint32_t TlclSendReceive(const uint8_t* request, uint8_t* response,
- int max_length)
+ int max_length)
{
return TPM_SUCCESS;
}
diff --git a/firmware/lib/tpm_lite/tlcl.c b/firmware/lib/tpm_lite/tlcl.c
index d7dfade9..7643ce7b 100644
--- a/firmware/lib/tpm_lite/tlcl.c
+++ b/firmware/lib/tpm_lite/tlcl.c
@@ -65,7 +65,7 @@ static inline int TpmReturnCode(const uint8_t* buffer)
* DOING_SELFTEST errors are returned.
*/
static uint32_t TlclSendReceiveNoRetry(const uint8_t* request,
- uint8_t* response, int max_length)
+ uint8_t* response, int max_length)
{
uint32_t response_length = max_length;
@@ -110,7 +110,7 @@ static uint32_t TlclSendReceiveNoRetry(const uint8_t* request,
* error code if error. In the firmware, waits for the self test to complete
* if needed. In the host, reports the first error without retries. */
uint32_t TlclSendReceive(const uint8_t* request, uint8_t* response,
- int max_length)
+ int max_length)
{
uint32_t result = TlclSendReceiveNoRetry(request, response, max_length);
/* When compiling for the firmware, hide command failures due to the
@@ -560,7 +560,7 @@ uint32_t TlclInitNvAuthPolicy(uint32_t pcr_selection_bitmap,
* the most unlikely one to be used in practice, i.e. the spec says
* locality 3 is for "Auxiliary components. Use of this is optional and,
* if used, it is implementation dependent."
- */
+ */
policy->pcr_info_read.localityAtRelease =
TPM_ALL_LOCALITIES & ~TPM_LOC_THREE;
@@ -786,8 +786,8 @@ uint32_t TlclGetSTClearFlags(TPM_STCLEAR_FLAGS* vflags)
}
uint32_t TlclGetFlags(uint8_t* disable,
- uint8_t* deactivated,
- uint8_t *nvlocked)
+ uint8_t* deactivated,
+ uint8_t *nvlocked)
{
TPM_PERMANENT_FLAGS pflags;
uint32_t result = TlclGetPermanentFlags(&pflags);
@@ -813,7 +813,7 @@ uint32_t TlclSetGlobalLock(void)
}
uint32_t TlclExtend(int pcr_num, const uint8_t* in_digest,
- uint8_t* out_digest)
+ uint8_t* out_digest)
{
struct s_tpm_extend_cmd cmd;
uint8_t response[kTpmResponseHeaderLength + kPcrDigestLength];
@@ -990,8 +990,8 @@ uint32_t TlclGetRandom(uint8_t* data, uint32_t length, uint32_t *size)
}
uint32_t TlclGetVersion(uint32_t* vendor, uint64_t* firmware_version,
- uint8_t* vendor_specific_buf,
- size_t* vendor_specific_buf_size)
+ uint8_t* vendor_specific_buf,
+ size_t* vendor_specific_buf_size)
{
uint8_t response[TPM_LARGE_ENOUGH_COMMAND_SIZE];
uint32_t result = TlclSendReceive(tpm_getversionval_cmd.buffer,
@@ -1313,7 +1313,7 @@ uint32_t TlclCreateDelegationFamily(uint8_t family_label)
}
uint32_t TlclReadDelegationFamilyTable(TPM_FAMILY_TABLE_ENTRY *table,
- uint32_t* table_size)
+ uint32_t* table_size)
{
uint8_t response[TPM_LARGE_ENOUGH_COMMAND_SIZE];
uint32_t result = TlclSendReceive(tpm_delegate_read_table_cmd.buffer,