xen/arm32: setup: Move out the code to populate the boot allocator
authorJulien Grall <jgrall@amazon.com>
Sat, 11 Jun 2022 11:24:49 +0000 (12:24 +0100)
committerJulien Grall <julien@xen.org>
Sat, 11 Jun 2022 11:29:06 +0000 (12:29 +0100)
commit38ed4a4876383d8acd4365dafb6454feba01a4e5
tree2316dbe0a106c8c7501dbf3f420e8a33617028d4
parentde5fdb562c3c31639becb4548540fcf58afbc485
xen/arm32: setup: Move out the code to populate the boot allocator

In a follow-up patch, we will want to populate the boot allocator
separately for arm64. The code will end up to be very similar to the one
on arm32. So move out the code in a new helper populate_boot_allocator().

For now the code is still protected by CONFIG_ARM_32 to avoid any build
failure on arm64.

Take the opportunity to replace mfn_add(xen_mfn_start, xenheap_pages) with
xenheap_mfn_end as they are equivalent.

Signed-off-by: Julien Grall <jgrall@amazon.com>
Reviewed-by: Michal Orzel <michal.orzel@arm.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/setup.c