From b8f61cfb760001d0b716e82a35e8829572b5f330 Mon Sep 17 00:00:00 2001 From: Vadim Bendebury Date: Thu, 19 Mar 2020 10:44:53 -0700 Subject: tpm2: clean up stubs.c Drop the unused function and use ccprintf() instead of uart_printf(). Using ccprintf() will make it easier to use this code when packet mode is enabled. Used tabs in the changed lines s to pacify repo upload. BUG=b:149964350 TEST=make buildall -j Signed-off-by: Vadim Bendebury Change-Id: I97522e9278a4393ef75b9a6a90e6995ba2449f30 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2114237 --- board/cr50/tpm2/stubs.c | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/board/cr50/tpm2/stubs.c b/board/cr50/tpm2/stubs.c index 2d38b2c904..c078f254c6 100644 --- a/board/cr50/tpm2/stubs.c +++ b/board/cr50/tpm2/stubs.c @@ -7,20 +7,7 @@ #include "Global.h" #include "CryptoEngine.h" -CRYPT_RESULT _cpri__C_2_2_KeyExchange( - TPMS_ECC_POINT * outZ1, // OUT: a computed point - TPMS_ECC_POINT * outZ2, // OUT: and optional second point - TPM_ECC_CURVE curveId, // IN: the curve for the computations - TPM_ALG_ID scheme, // IN: the key exchange scheme - TPM2B_ECC_PARAMETER * dsA, // IN: static private TPM key - TPM2B_ECC_PARAMETER * deA, // IN: ephemeral private TPM key - TPMS_ECC_POINT * QsB, // IN: static public party B key - TPMS_ECC_POINT * QeB // IN: ephemeral public party B key - ) -{ - ecprintf("%s called\n", __func__); - return CRYPT_FAIL; -} +#include "console.h" CRYPT_RESULT _cpri__DrbgGetPutState( GET_PUT direction, @@ -42,7 +29,7 @@ CRYPT_RESULT _cpri__EccCommitCompute( TPM2B_ECC_PARAMETER * r // IN: the computed r value (required) ) { - ecprintf("%s called\n", __func__); + ccprintf("%s called\n", __func__); return CRYPT_FAIL; } @@ -70,7 +57,7 @@ CRYPT_RESULT _math__Div( TPM2B * r // OUT: remainder ) { - ecprintf("%s called\n", __func__); + ccprintf("%s called\n", __func__); return CRYPT_FAIL; } @@ -93,7 +80,7 @@ void __assert_func( * * TODO(vbendeb): investigate and fix TPM2 library assert handling. */ - ecprintf("Failure in %s, func %s, line %d:\n%s\n", + ccprintf("Failure in %s, func %s, line %d:\n%s\n", file, s_failFunction ? (const char *)&s_failFunction : func, s_failLine ? s_failLine : line, -- cgit v1.2.1