coreboot-kgpe-d16/payloads/libpayload/arch/arm64
Julius Werner 540a98001d printf: Automatically prefix %p with 0x
According to the POSIX standard, %p is supposed to print a pointer "as
if by %#x", meaning the "0x" prefix should automatically be prepended.
All other implementations out there (glibc, Linux, even libpayload) do
this, so we should make coreboot match. This patch changes vtxprintf()
accordingly and removes any explicit instances of "0x%p" from existing
format strings.

How to handle zero padding is less clear: the official POSIX definition
above technically says there should be no automatic zero padding, but in
practice most other implementations seem to do it and I assume most
programmers would prefer it. The way chosen here is to always zero-pad
to 32 bits, even on a 64-bit system. The rationale for this is that even
on 64-bit systems, coreboot always avoids using any memory above 4GB for
itself, so in practice all pointers should fit in that range and padding
everything to 64 bits would just hurt readability. Padding it this way
also helps pointers that do exceed 4GB (e.g. prints from MMU config on
some arm64 systems) stand out better from the others.

Change-Id: I0171b52f7288abb40e3fc3c8b874aee14b9bdcd6
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37626
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: David Guckian
2019-12-11 11:38:59 +00:00
..
Kconfig arm64: xcompile: Add support for A53 erratum 843419 2015-08-28 06:46:09 +00:00
Makefile.inc libpayload: arm64: Conform to new coreboot lib_helpers.h and assume EL2 2018-10-12 20:14:54 +00:00
cache.c libpayload: arm64: Conform to new coreboot lib_helpers.h and assume EL2 2018-10-12 20:14:54 +00:00
coreboot.c libpayload arm64: Remove dependency on coreboot tables for dma areas 2015-03-21 13:38:29 +01:00
cpu.S libpayload: Add support for arm64 in libpayload 2015-01-09 07:04:28 +01:00
dummy_media.c cbfs: define libpayload_init_default_cbfs_media weakly 2015-07-06 09:42:12 +02:00
exception.c arm64: Bump exception stack size to 2KB 2019-12-05 17:58:05 +00:00
exception_asm.S libpayload: arm64: Make exception handling closer to arm32 2018-10-12 20:17:28 +00:00
gdb.c libpayload: arm64: Add GDB support 2018-10-12 20:17:48 +00:00
head.S libpayload: arm64: Make exception handling closer to arm32 2018-10-12 20:17:28 +00:00
libpayload.ldscript libpayload: arm64: Make exception handling closer to arm32 2018-10-12 20:17:28 +00:00
main.c libpayload: Align main() data types 2019-04-05 22:37:19 +00:00
memcpy.S libpayload: Add support for arm64 in libpayload 2015-01-09 07:04:28 +01:00
memmove.S libpayload: Add support for arm64 in libpayload 2015-01-09 07:04:28 +01:00
memset.S libpayload arm64: Remove the DONT_USE_DC macro 2015-03-21 13:35:58 +01:00
mmu.c printf: Automatically prefix %p with 0x 2019-12-11 11:38:59 +00:00
selfboot.c libpayload arm64: Add selfboot.c required by depthcharge 2015-01-09 07:07:53 +01:00
sysinfo.c libpayload arm64: Add functions for reading memranges 2015-03-21 13:36:04 +01:00
timer.c libpayload: Add support for arm64 in libpayload 2015-01-09 07:04:28 +01:00
util.S libpayload: Add support for arm64 in libpayload 2015-01-09 07:04:28 +01:00
virtual.c libpayload: Add support for arm64 in libpayload 2015-01-09 07:04:28 +01:00