xen/arm: Introduce fw_unreserved_regions() and use it
authorJulien Grall <jgrall@amazon.com>
Sat, 26 Sep 2020 20:30:14 +0000 (21:30 +0100)
committerHans van Kranenburg <hans@knorrie.org>
Fri, 8 Apr 2022 09:40:51 +0000 (10:40 +0100)
commit378c3a8ac6e87eb11a10f18b85ebf284a09c2c3e
tree881709288e5a7994b9cdee47cb3f9ad1c84fa742
parent506161a9c8a40ed473ebb56538cbbc3f33cb183d
xen/arm: Introduce fw_unreserved_regions() and use it

Since commit 6e3e77120378 "xen/arm: setup: Relocate the Device-Tree
later on in the boot", the device-tree will not be kept mapped when
using ACPI.

However, a few places are calling dt_unreserved_regions() which expects
a valid DT. This will lead to a crash.

As the DT should not be used for ACPI (other than for detecting the
modules), a new function fw_unreserved_regions() is introduced.

It will behave the same way on DT system. On ACPI system, it will
unreserve the whole region.

Take the opportunity to clarify that bootinfo.reserved_mem is only used
when booting using Device-Tree.

Signed-off-by: Julien Grall <jgrall@amazon.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
(cherry picked from commit 9c2bc0f24b2ba7082df408b3c33ec9a86bf20cf0)

Gbp-Pq: Name 0033-xen-arm-Introduce-fw_unreserved_regions-and-use-it.patch
xen/arch/arm/kernel.c
xen/arch/arm/setup.c
xen/include/asm-arm/setup.h