mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-05-03 09:29:57 +00:00

The size of a GICv3 redistributor region depends on the number of cores in the system. For the ARM FPGA port, we detect the topology at runtime, and adjust the CPU DT nodes accordingly. Now the size of the GICR region must also be adjusted, or Linux will fail to initialise the GICv3. Use the newly introduced function to overwrite the GICR size entry in the GICv3 reg property. We count the number of existing cores by iterating over the GICR frames until we find the LAST bit set in TYPER. Change-Id: Ib69565600859de9b1b15ceb8495172cd26d16fce Signed-off-by: Andre Przywara <andre.przywara@arm.com>
31 lines
688 B
C
31 lines
688 B
C
/*
|
|
* Copyright (c) 2020, ARM Limited and Contributors. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef FPGA_PRIVATE_H
|
|
#define FPGA_PRIVATE_H
|
|
|
|
#include "../fpga_def.h"
|
|
#include <platform_def.h>
|
|
|
|
#define C_RUNTIME_READY_KEY (0xaa55aa55)
|
|
#define VALID_MPID (1U)
|
|
#define FPGA_MAX_DTB_SIZE 0x10000
|
|
|
|
#ifndef __ASSEMBLER__
|
|
|
|
extern unsigned char fpga_valid_mpids[PLATFORM_CORE_COUNT];
|
|
|
|
void fpga_console_init(void);
|
|
|
|
void plat_fpga_gic_init(void);
|
|
void fpga_pwr_gic_on_finish(void);
|
|
void fpga_pwr_gic_off(void);
|
|
unsigned int plat_fpga_calc_core_pos(uint32_t mpid);
|
|
unsigned int fpga_get_nr_gic_cores(void);
|
|
|
|
#endif /* __ASSEMBLER__ */
|
|
|
|
#endif /* FPGA_PRIVATE_H */
|