aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorSoby Mathew <soby.mathew@arm.com>2017-09-04 11:49:29 +0100
committerSoby Mathew <soby.mathew@arm.com>2017-09-11 15:37:24 +0100
commit7f56e9a31c91099cd0147883a0282ec89ae0b346 (patch)
tree14bc3086e895ea2979ba7236cabfcc607339bf97 /docs
parent2d7e82823dc28ccfa776dc0ecdaeeda8c465bf62 (diff)
downloadplatform_external_arm-trusted-firmware-7f56e9a31c91099cd0147883a0282ec89ae0b346.tar.gz
platform_external_arm-trusted-firmware-7f56e9a31c91099cd0147883a0282ec89ae0b346.tar.bz2
platform_external_arm-trusted-firmware-7f56e9a31c91099cd0147883a0282ec89ae0b346.zip
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 <Eleanor.bonnici@arm.com> Signed-off-by: Soby Mathew <soby.mathew@arm.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/porting-guide.rst15
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/porting-guide.rst b/docs/porting-guide.rst
index c8d61ed1a..979856669 100644
--- a/docs/porting-guide.rst
+++ b/docs/porting-guide.rst
@@ -1014,6 +1014,21 @@ This function flushes to main memory all the image params that are passed to
next image. This function is currently invoked in BL2 to flush this information
to the next BL image, when LOAD\_IMAGE\_V2 is enabled.
+Function : plat\_log\_get\_prefix()
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+ Argument : unsigned int
+ Return : const char *
+
+This function defines the prefix string corresponding to the `log_level` to be
+prepended to all the log output from ARM Trusted Firmware. The `log_level`
+(argument) will correspond to one of the standard log levels defined in
+debug.h. The platform can override the common implementation to define a
+different prefix string for the log output. The implementation should be
+robust to future changes that increase the number of log levels.
+
Modifications specific to a Boot Loader stage
---------------------------------------------