summaryrefslogtreecommitdiff
path: root/scripts/basic
diff options
context:
space:
mode:
authorPatryk Biel <[email protected]>2026-07-14 11:49:14 +0200
committerPeng Fan <[email protected]>2026-08-11 16:05:24 +0800
commit5a32ebc96295795a7325d6cbaa2d8b0bdfaa6d75 (patch)
treea82ee8c97c25b81166c55fb08d7dc0d639647a43 /scripts/basic
parent9f82dcd489246c66eb780235d1fedb536771c787 (diff)
armv8: layerscape: Fix TF-A DRAM reservation with empty banks
The TF-A DRAM bank setup currently assumes that the number of banks reported by TF-A matches the number of entries available in gd->bd->bi_dram[]. Limit the loop by CONFIG_NR_DRAM_BANKS so that a platform with fewer configured DRAM banks does not write past the array. The reserved RAM setup also checks higher DRAM banks before falling back to bank 0. When a higher bank is empty and board_reserve_ram_top() returns 0, the old test succeeds for a zero-sized bank. This can set gd->arch.resv_ram to 0. On systems with CONFIG_GIC_V3_ITS this value is later used by ls_gic_rd_tables_init() to place the GIC LPI tables: gd->arch.resv_ram - GIC_LPI_SIZE If gd->arch.resv_ram is 0, the subtraction underflows and the GIC LPI tables are placed at an invalid high address. Skip empty banks when selecting the reserved RAM area and fail GIC LPI table setup if no reserved RAM address was established. This fixes LS1028A systems with 2 GiB of RAM, where TF-A reports only one populated DRAM bank. Tested on an LS1028ARDB with TF-A modified to report 2 GiB of RAM, and on a custom LS1028A-based board equipped with 2 GiB of RAM. Signed-off-by: Patryk Biel <[email protected]> Signed-off-by: Peng Fan <[email protected]>
Diffstat (limited to 'scripts/basic')
0 files changed, 0 insertions, 0 deletions