diff options
-rw-r--r-- | Makefile | 7 | ||||
-rw-r--r-- | firmware/2lib/include/2common.h | 15 | ||||
-rw-r--r-- | firmware/lib/tpm_lite/tlcl.c | 5 |
3 files changed, 3 insertions, 24 deletions
@@ -390,7 +390,6 @@ TLCL_SRCS = \ firmware/lib/tpm2_lite/tlcl.c \ firmware/lib/tpm2_lite/marshaling.c endif -TLCL_OBJS_FOR_TEST = $(TLCL_SRCS:%.c=${BUILD}/%_for_test.o) # Support real TPM unless BIOS sets MOCK_TPM ifeq (${MOCK_TPM},) @@ -1288,12 +1287,6 @@ ${BUILD}/tests/rollback_index2_tests: \ TEST_OBJS += ${BUILD}/firmware/lib/rollback_index_for_test.o endif -${BUILD}/tests/tlcl_tests: OBJS += \ - ${TLCL_OBJS_FOR_TEST} -${BUILD}/tests/tlcl_tests: \ - ${TLCL_OBJS_FOR_TEST} -TEST_OBJS += ${TLCL_OBJS_FOR_TEST} - ifeq (${TPM2_MODE},) # TODO(apronin): tests for TPM2 case? TLCL_TEST_BINS = $(addprefix ${BUILD}/,${TLCL_TEST_NAMES}) diff --git a/firmware/2lib/include/2common.h b/firmware/2lib/include/2common.h index be5c484a..7bd89075 100644 --- a/firmware/2lib/include/2common.h +++ b/firmware/2lib/include/2common.h @@ -29,19 +29,10 @@ struct vb2_public_key; #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) #endif -/* Debug output printf() for tests. Otherwise, it's platform-dependent. */ +/* Platform-dependent debug output macros. */ #if defined(VBOOT_DEBUG) -# if defined(FOR_TEST) -# include <stdio.h> -# define VB2_DEBUG(format, args...) do { \ - printf("%s", __func__); \ - printf(format, ## args); \ - } while(0) -# define VB2_DEBUG_RAW(format, args...) printf(format, ## args) -# else -# define VB2_DEBUG(format, args...) vb2ex_printf(__func__, format, ## args) -# define VB2_DEBUG_RAW(format, args...) vb2ex_printf(NULL, format, ## args) -# endif +# define VB2_DEBUG(format, args...) vb2ex_printf(__func__, format, ## args) +# define VB2_DEBUG_RAW(format, args...) vb2ex_printf(NULL, format, ## args) #else # define VB2_DEBUG(format, args...) # define VB2_DEBUG_RAW(format, args...) diff --git a/firmware/lib/tpm_lite/tlcl.c b/firmware/lib/tpm_lite/tlcl.c index 6f71f2bc..587a1726 100644 --- a/firmware/lib/tpm_lite/tlcl.c +++ b/firmware/lib/tpm_lite/tlcl.c @@ -24,11 +24,6 @@ #include "utility.h" #include "vboot_api.h" -#ifdef FOR_TEST -/* Allow unit testing implementation of TlclSendReceive() */ -#undef CHROMEOS_ENVIRONMENT -#endif - /* Sets the size field of a TPM command. */ static inline void SetTpmCommandSize(uint8_t* buffer, uint32_t size) { |