summaryrefslogtreecommitdiff
path: root/include/common
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@arm.com>2020-08-24 18:28:44 +0100
committerAndre Przywara <andre.przywara@arm.com>2020-09-29 13:28:25 +0100
commit9f7bab42a103a44246116d89a3cca20ed935467c (patch)
tree00b8bcf90a3c7f05c058f743c8d970f0504729b1 /include/common
parent79d89e3da078fa0e169a47bcc360c5e3308cdf42 (diff)
downloadarm-trusted-firmware-9f7bab42a103a44246116d89a3cca20ed935467c.tar.gz
fdt: Add function to adjust GICv3 redistributor size
We now have code to detect the CPU topology at runtime, and can also populate the CPU nodes in a devicetree accordingly. This is used by the ARM FPGA port, for instance. But also a GICv3 compatible interrupt controller provides MMIO frames per core, so the size of this region needs to be adjusted in the DT, to match the number of cores as well. Provide a generic function to find the GICv3 interrupt controller in the DT, then adjust the "reg" entry to match the number of detected cores. Since the size of the GICR frame per cores differs between GICv4 and GICv3, this size is supplied as a parameter to the function. The caller should determine the applicable value by either hardcoding it or by observing GICR_TYPER.VLPIS. Change-Id: Ic2a6445c2c5381a36bf24263f52fcbefad378c05 Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Diffstat (limited to 'include/common')
-rw-r--r--include/common/fdt_fixup.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/common/fdt_fixup.h b/include/common/fdt_fixup.h
index 29d8b3aa0..2e9d49d53 100644
--- a/include/common/fdt_fixup.h
+++ b/include/common/fdt_fixup.h
@@ -13,5 +13,7 @@ int fdt_add_reserved_memory(void *dtb, const char *node_name,
uintptr_t base, size_t size);
int fdt_add_cpus_node(void *dtb, unsigned int afflv0,
unsigned int afflv1, unsigned int afflv2);
+int fdt_adjust_gic_redist(void *dtb, unsigned int nr_cores,
+ unsigned int gicr_frame_size);
#endif /* FDT_FIXUP_H */