From 6a23356c4f70d1407c094ea2ea3e21e8a657c1c3 Mon Sep 17 00:00:00 2001 From: Antonio Nino Diaz Date: Thu, 9 Aug 2018 15:30:28 +0100 Subject: Replace stdio.h functions by TF functions Functions provided by stdio.h such as printf and sprintf are available in the codebase, but they add a lot of code to the final image if they are used: - AArch64: ~4KB - AArch32: ~2KB in T32, ~3KB in A32 tf_printf and tf_snprintf are a lot more simple, but it is preferable to use them when possible because they are also used in common code. Change-Id: Id09fd2b486198fe3d79276e2c27931595b7ba60e Acked-by: Haojian Zhuang Signed-off-by: Antonio Nino Diaz --- services/spd/trusty/generic-arm64-smcall.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'services/spd') diff --git a/services/spd/trusty/generic-arm64-smcall.c b/services/spd/trusty/generic-arm64-smcall.c index feeecaa4..1362c1c6 100644 --- a/services/spd/trusty/generic-arm64-smcall.c +++ b/services/spd/trusty/generic-arm64-smcall.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2016-2018, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -29,14 +29,14 @@ static void trusty_dputc(char ch, int secure) s->linebuf[s->l++] = ch; if (s->l == sizeof(s->linebuf) || ch == '\n') { if (secure) - printf("secure os: "); + tf_printf("secure os: "); else - printf("non-secure os: "); + tf_printf("non-secure os: "); for (i = 0; i < s->l; i++) { putchar(s->linebuf[i]); } if (ch != '\n') { - printf(" <...>\n"); + tf_printf(" <...>\n"); } s->l = 0; } -- cgit v1.2.3