summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordavidcunado-arm <david.cunado@arm.com>2017-05-30 10:56:47 +0100
committerGitHub <noreply@github.com>2017-05-30 10:56:47 +0100
commit572e14132706377530ea9f9ba4cd1fcb4b2b9479 (patch)
treeaf982ccc1159c358c3b3475eb2621f277ed322da /include
parent562aef8e2f69907a888c6e053d868b360d1dd4b3 (diff)
parentd77b98cabf228b277af2bc5e5ea9c4b221a6cd7b (diff)
Merge pull request #949 from antonio-nino-diaz-arm/an/printf-memory
Reduce code size when building with Trusted Board Boot enabled
Diffstat (limited to 'include')
-rw-r--r--include/common/debug.h1
-rw-r--r--include/drivers/auth/mbedtls/mbedtls_config.h2
2 files changed, 3 insertions, 0 deletions
diff --git a/include/common/debug.h b/include/common/debug.h
index 646dabaf..814cf840 100644
--- a/include/common/debug.h
+++ b/include/common/debug.h
@@ -64,6 +64,7 @@ void __dead2 do_panic(void);
void __dead2 __stack_chk_fail(void);
void tf_printf(const char *fmt, ...) __printflike(1, 2);
+int tf_snprintf(char *s, size_t n, const char *fmt, ...) __printflike(3, 4);
#endif /* __ASSEMBLY__ */
#endif /* __DEBUG_H__ */
diff --git a/include/drivers/auth/mbedtls/mbedtls_config.h b/include/drivers/auth/mbedtls/mbedtls_config.h
index 7d8d17c3..22e75742 100644
--- a/include/drivers/auth/mbedtls/mbedtls_config.h
+++ b/include/drivers/auth/mbedtls/mbedtls_config.h
@@ -19,6 +19,8 @@
#define MBEDTLS_PLATFORM_MEMORY
#define MBEDTLS_PLATFORM_NO_STD_FUNCTIONS
+/* Prevent mbed TLS from using snprintf so that it can use tf_snprintf. */
+#define MBEDTLS_PLATFORM_SNPRINTF_ALT
#define MBEDTLS_PKCS1_V15
#define MBEDTLS_PKCS1_V21