xen/arm32: head: Don't clobber r14/lr in the macro PRINT
authorJulien Grall <julien.grall@arm.com>
Mon, 15 Apr 2019 14:57:38 +0000 (15:57 +0100)
committerJulien Grall <julien.grall@arm.com>
Sat, 7 Sep 2019 11:10:10 +0000 (12:10 +0100)
commitde87d285249b0f5ee35d67136e951b0cbae85579
tree7ff0e2f0326f4497aa59ad92bc3ef59b10448cbe
parent2ac705a59ef52d75dcecfecb2378dec946da45c4
xen/arm32: head: Don't clobber r14/lr in the macro PRINT

The current implementation of the macro PRINT will clobber r14/lr. This
means the user should save r14 if it cares about it.

Follow-up patches will introduce more use of PRINT in places where lr
should be preserved. Rather than requiring all the user to preserve lr,
the macro PRINT is modified to save and restore it.

While the comment state r3 will be clobbered, this is not the case. So
PRINT will use r3 to preserve lr.

Lastly, take the opportunity to move the comment on top of PRINT and use
PRINT in init_uart. Both changes will be helpful in a follow-up patch.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/arm32/head.S