summaryrefslogtreecommitdiff
path: root/common/tf_printf.c
AgeCommit message (Collapse)Author
2017-12-15Add support to left-pad with zeroes in tf_printfAntonio Nino Diaz
Add support to formats %i, %d, %p, %x and %u for left-padding numbers with zeroes (e.g. `%08x`). Change-Id: Ifd4795a82a8d83da2c00b44b9e482a2d9be797e3 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2017-09-11Introduce tf_vprintf() and tf_string_print()Soby Mathew
This patch introduces tf_vprintf() and tf_string_print() APIs which is needed by the logging framework introduced in a later patch. Change-Id: Ie4240443d0e04e070502b51e371e546dd469fd33 Signed-off-by: Soby Mathew <soby.mathew@arm.com>
2017-05-15Align tf_printf implementation between AArch32 and AArch64dp-arm
No need for these wrapper functions anymore. The compiler-rt builtins provide runtime support for 64-bit division and modulo operations. Change-Id: Ib785d37c86f0c82ebd34c35023a4c1822c03e7df Signed-off-by: dp-arm <dimitris.papastamos@arm.com>
2017-05-03Use SPDX license identifiersdp-arm
To make software license auditing simpler, use SPDX[0] license identifiers instead of duplicating the license text in every file. NOTE: Files that have been imported by FreeBSD have not been modified. [0]: https://spdx.org/ Change-Id: I80a00e1f641b8cc075ca5a95b10607ed9ed8761a Signed-off-by: dp-arm <dimitris.papastamos@arm.com>
2016-08-10AArch32: Add tf_printf supportSoby Mathew
The tf_printf library uses 64 bit division to print numbers in appropriate formats but AArch32 mode cannot do 64 bit division natively. Hence this patch adds additional number printing routines to handle AArch32 mode in tf_printf library. The decimal format printing capability is limited to 32 bit integers whereas 64 bits are supported in hexadecimal format. The library assumes that secure world is running in Little-Endian mode to do bit manipulations on 64 bit. Suitable assertions are present to enforce this assumption. Change-Id: I55a21e448cef4915d1834d76e48a84ccf0bec36d
2016-04-07Differentiate `long` and `long long` formats in tf_printfSoby Mathew
This patch adds support to differentiate between `long` and `long long` format specifiers in tf_printf(). In AArch64, they are the same which is a 64-bit word. But, in AArch32 they are different and tf_printf() needs to handle these format specifiers separately. This patch also fixes the type of variables used to generic C types. Change-Id: If3bbb0245cd0183acbe13bc1fe0d9743f417578f
2016-03-23Add support for %z in tf_print()Scott Branden
Add support for %z format specific in tf_printf() to support printing data of type size_t Fixes ARM-software/tf-issues#380 Signed-off-by Scott Branden <scott.branden@broadcom.com>
2016-02-18Add support for %p in tf_printf()Antonio Nino Diaz
This patch adds support for the `%p` format specifier in tf_printf() following the example of the printf implementation of the stdlib used in the trusted firmware. Fixes ARM-software/tf-issues#292 Change-Id: I0b3230c783f735d3e039be25a9405f00023420da
2015-03-05Fix violations to the coding styleSandrine Bailleux
All coding style violations have been fixed in a previous patch and since then, each individual patch has been checked in this regard. However, the latest version of the checkpatch.pl script from the Linux kernel is more advanced and it is able to flag new errors in the Trusted Firmware codebase. This patch fixes them. Change-Id: I1f332f2440984be85d36b231bb83260368987077
2014-07-25Implement a leaner printf for Trusted FirmwareSoby Mathew
This patch implements a "tf_printf" which supports only the commonly used format specifiers in Trusted Firmware, which uses a lot less stack space than the stdlib printf function. Fixes ARM-software/tf-issues#116 Change-Id: I7dfa1944f4c1e634b3e2d571f49afe02d109a351