Boot: Fix BL2 and NS scatter files
The maximum size of the region ER_DATA in BL2 scatter files is set to
BL2_DATA_SIZE, which is usually equal to the size of the available RAM.
But the BOOT_DATA, the heap and the MSP stack also have to be placed
into RAM. In addition, if the TFM_MULTI_CORE_TOPOLOGY macro is set then
the BOOT_DATA is not placed at the start of the RAM in TF-M, but after
unprivileged data.
In the case of NS scatter files, NS_DATA_SIZE is usually set to half of
the available RAM, or the size of the RAM, minus the size of the S
image. Nevertheless, the stack and the heap still have to fit in the
ER_DATA region.
So the scatter files are modified like in tfm_common_s.sct, adjusting
the size of the ER_DATA region.
Signed-off-by: Balint Matyi <Balint.Matyi@arm.com>
Change-Id: I8deafe4c3846c5f1615b5842c6d65d9d5bb7c4a0
17 files changed