rpi4: Support building kernel for aarch32

When building for aarch32 only 32-bit physical addressing is supported.
An overlay is needed to clamp memory that extends above 32bit addresses.

Signed-off-by: Kent McLeod <kent@kry10.com>
This commit is contained in:
Kent McLeod 2023-03-01 17:04:21 +11:00 committed by Gerwin Klein
parent 9746e27615
commit 1f77fb9c5a
2 changed files with 25 additions and 0 deletions

View file

@ -30,6 +30,9 @@ if(KernelPlatformRpi4)
list(APPEND KernelDTSList "src/plat/bcm2711/overlay-rpi4-4gb.dts")
elseif("${RPI4_MEMORY}" STREQUAL "8192")
list(APPEND KernelDTSList "src/plat/bcm2711/overlay-rpi4-8gb.dts")
if(KernelSel4ArchAarch32)
list(APPEND KernelDTSList "src/plat/bcm2711/overlay-rpi4-32bit.dts")
endif()
else()
message(FATAL_ERROR "Unsupported memory size given ${RPI4_MEMORY},
supported memory sizes (in megabytes) are 1024,

View file

@ -0,0 +1,22 @@
/*
* Copyright 2023, Kry10 Limited
*
* SPDX-License-Identifier: GPL-2.0-only
*/
/ {
/* 32-bit kernel platforms require memory to be clamped to the top of
* the kernel window.
*/
reserved-memory {
#address-cells = <0x02>;
#size-cells = <0x01>;
ranges;
reserved-memory@100000000{
reg = < 0x00000001 0x00000000 0x80000000
0x00000001 0x80000000 0x80000000 >;
no-map;
};
};
};