xen/arm32: head: Introduce distinct paths for the boot CPU and secondary CPUs
authorJulien Grall <julien.grall@arm.com>
Wed, 26 Jun 2019 12:46:56 +0000 (13:46 +0100)
committerJulien Grall <julien.grall@arm.com>
Sat, 7 Sep 2019 11:10:27 +0000 (12:10 +0100)
commit870c95a8f128c695a2f8774a680f78685da9c73c
treec7b890c7ec0f218772ec77605f94c4209cb00d3a
parent854e7d6224063af64b5a6750415bccd880e292fa
xen/arm32: head: Introduce distinct paths for the boot CPU and secondary CPUs

The boot code is currently quite difficult to go through because of the
lack of documentation and a number of indirection to avoid executing
some path in either the boot CPU or secondary CPUs.

In an attempt to make the boot code easier to follow, each parts of the
boot are now in separate functions. Furthermore, the paths for the boot
CPU and secondary CPUs are now distinct and for now will call each
functions.

Follow-ups will remove unnecessary calls and do further improvement
(such as adding documentation and reshuffling).

Note that the switch from using the ID mapping to the runtime mapping
is duplicated for each path. This is because in the future we will need
to stay longer in the ID mapping for the boot CPU.

Lastly, it is now required to save lr in cpu_init() becauswe the
function will call other functions and therefore clobber lr.

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