From 7f56e9a31c91099cd0147883a0282ec89ae0b346 Mon Sep 17 00:00:00 2001 From: Soby Mathew Date: Mon, 4 Sep 2017 11:49:29 +0100 Subject: Implement log framework This patch gives users control over logging messages printed from the C code using the LOG macros defined in debug.h Users now have the ability to reduce the log_level at run time using the tf_log_set_max_level() function. The default prefix string can be defined by platform by overriding the `plat_log_get_prefix()` platform API which is also introduced in this patch. The new log framework results in saving of some RO data. For example, when BL1 is built for FVP with LOG_LEVEL=LOG_LEVEL_VERBOSE, resulted in saving 384 bytes of RO data and increase of 8 bytes of RW data. The framework also adds about 108 bytes of code to the release build of FVP. Fixes ARM-software/tf-issues#462 Change-Id: I476013d9c3deedfdd4c8b0b0f125665ba6250554 Co-authored-by: Eleanor Bonnici Signed-off-by: Soby Mathew --- include/plat/common/platform.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/plat') diff --git a/include/plat/common/platform.h b/include/plat/common/platform.h index bd721bba..e189f648 100644 --- a/include/plat/common/platform.h +++ b/include/plat/common/platform.h @@ -79,6 +79,7 @@ int plat_crash_console_putc(int c); int plat_crash_console_flush(void); void plat_error_handler(int err) __dead2; void plat_panic_handler(void) __dead2; +const char *plat_log_get_prefix(unsigned int log_level); /******************************************************************************* * Mandatory BL1 functions -- cgit v1.2.3