summaryrefslogtreecommitdiff
path: root/common/tf_printf.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/tf_printf.c')
-rw-r--r--common/tf_printf.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/common/tf_printf.c b/common/tf_printf.c
index c68b9904..c1d41889 100644
--- a/common/tf_printf.c
+++ b/common/tf_printf.c
@@ -68,6 +68,7 @@ static void string_print(const char *str)
* %u - unsigned 32 bit decimal format
* %ld and %lld - signed 64 bit decimal format
* %lu and %llu - unsigned 64 bit decimal format
+ * %p - pointer format
* Exits on all other formats.
*******************************************************************/
@@ -107,6 +108,14 @@ loop:
str = va_arg(args, char *);
string_print(str);
break;
+ case 'p':
+ unum = (uint64_t)va_arg(args, void *);
+
+ if (unum)
+ string_print("0x");
+
+ unsigned_num_print(unum, 16);
+ break;
case 'x':
if (bit64)
unum = va_arg(args, uint64_t);