mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-05-08 18:41:22 +00:00
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>
This commit is contained in:
parent
79d89e3da0
commit
9f7bab42a1
2 changed files with 63 additions and 0 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue