xen/arm: bootfdt: Ignore empty memory bank
authorJulien Grall <jgrall@amazon.com>
Fri, 18 Sep 2020 17:11:16 +0000 (18:11 +0100)
committerStefano Stabellini <sstabellini@kernel.org>
Fri, 6 Nov 2020 01:49:04 +0000 (17:49 -0800)
commit7d2b21fd36c2a47799eed71c67bae7faa1ec4272
treebd53b8b364bc2dc982dbba846be80a51bddb918c
parentf61c5d0ca729eda5e936b8aa2b45c4192e2f2b64
xen/arm: bootfdt: Ignore empty memory bank

At the moment, Xen will stop processing the Device Tree if a memory
bank is empty (size == 0).

Unfortunately, some of the Device Tree (such as on Colibri imx8qxp)
may contain such a bank. This means Xen will not be able to boot
properly.

Relax the check to just ignore the banks. FWIW this also seems to be the
behavior adopted by Linux.

Reported-by: Daniel Wagner <Daniel.Wagner2@itk-engineering.de>
Signed-off-by: Julien Grall <jgrall@amazon.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
(cherry picked from commit 5a37207df52066efefe419c677b089a654d37afc)
xen/arch/arm/bootfdt.c