xen/arm64: head: Introduce print_reg
authorJulien Grall <julien.grall@arm.com>
Mon, 22 Jul 2019 21:39:28 +0000 (22:39 +0100)
committerStefano Stabellini <sstabellini@kernel.org>
Mon, 29 Jul 2019 23:22:37 +0000 (16:22 -0700)
commitbec9f9023e941a089b5aaae301743c9f0e14a111
tree3067cbaf35de367bc6d3587601abc717215f7b07
parent2a24c40da66a67d0220096a1cc390a8f60b0b75b
xen/arm64: head: Introduce print_reg

At the moment, the user should save x30/lr if it cares about it.

Follow-up patches will introduce more use of putn in place where lr
should be preserved.

Furthermore, any user of putn should also move the value to register x0
if it was stored in a different register.

For convenience, a new macro is introduced to print a given register.
The macro will take care for us to move the value to x0 and also
preserve lr.

Lastly the new macro is used to replace all the callsite of putn. This
will simplify rework/review later on.

Note that CurrentEL is now stored in x5 instead of x4 because the latter
will be clobbered by the macro print_reg.

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