feat(tc): allow TARGET_VERSION=4

Add basic support for TARGET_VERSION=4. It extends the existing 'if'
statements in the Makefile and the header to allow them to take the
value of 4 and also specifies the SCMI platform info to use for TC4.

Change-Id: I8d8257671314277a133e88ef65fae8fada93d00e
Signed-off-by: Jackson Cooper-Driver <jackson.cooper-driver@arm.com>
Signed-off-by: Leo Yan <leo.yan@arm.com>
This commit is contained in:
Jackson Cooper-Driver 2023-12-14 14:32:40 +00:00 committed by Leo Yan
parent 36ffe3e1be
commit e8e1b60820
4 changed files with 20 additions and 7 deletions

View file

@ -230,9 +230,9 @@
#if TARGET_PLATFORM <= 2 #if TARGET_PLATFORM <= 2
#define PLAT_ARM_DRAM2_BASE ULL(0x8080000000) #define PLAT_ARM_DRAM2_BASE ULL(0x8080000000)
#elif TARGET_PLATFORM == 3 #elif TARGET_PLATFORM >= 3
#define PLAT_ARM_DRAM2_BASE ULL(0x880000000) #define PLAT_ARM_DRAM2_BASE ULL(0x880000000)
#endif /* TARGET_PLATFORM == 3 */ #endif /* TARGET_PLATFORM >= 3 */
#define PLAT_ARM_DRAM2_SIZE ULL(0x180000000) #define PLAT_ARM_DRAM2_SIZE ULL(0x180000000)
#define PLAT_ARM_DRAM2_END (PLAT_ARM_DRAM2_BASE + PLAT_ARM_DRAM2_SIZE - 1ULL) #define PLAT_ARM_DRAM2_END (PLAT_ARM_DRAM2_BASE + PLAT_ARM_DRAM2_SIZE - 1ULL)
@ -294,9 +294,9 @@
/* Message Handling Unit (MHU) base addresses */ /* Message Handling Unit (MHU) base addresses */
#if TARGET_PLATFORM <= 2 #if TARGET_PLATFORM <= 2
#define PLAT_CSS_MHU_BASE UL(0x45400000) #define PLAT_CSS_MHU_BASE UL(0x45400000)
#elif TARGET_PLATFORM == 3 #elif TARGET_PLATFORM >= 3
#define PLAT_CSS_MHU_BASE UL(0x46000000) #define PLAT_CSS_MHU_BASE UL(0x46000000)
#endif /* TARGET_PLATFORM == 3 */ #endif /* TARGET_PLATFORM >= 3 */
#define PLAT_MHUV2_BASE PLAT_CSS_MHU_BASE #define PLAT_MHUV2_BASE PLAT_CSS_MHU_BASE
/* AP<->RSS MHUs */ /* AP<->RSS MHUs */

View file

@ -81,6 +81,10 @@ func TC_HANDLER(3)
ret ret
endfunc TC_HANDLER(3) endfunc TC_HANDLER(3)
func TC_HANDLER(4)
ret
endfunc TC_HANDLER(4)
/* ----------------------------------------------------- /* -----------------------------------------------------
* void plat_reset_handler(void); * void plat_reset_handler(void);
* ----------------------------------------------------- * -----------------------------------------------------

View file

@ -61,8 +61,8 @@ ifneq ($(shell expr $(TARGET_PLATFORM) \<= 1), 0)
Some of the features might not work as expected) Some of the features might not work as expected)
endif endif
ifeq ($(shell expr $(TARGET_PLATFORM) \<= 3), 0) ifeq ($(shell expr $(TARGET_PLATFORM) \<= 4), 0)
$(error TARGET_PLATFORM must be less than or equal to 3) $(error TARGET_PLATFORM must be less than or equal to 4)
endif endif
ifeq ($(filter ${TARGET_FLAVOUR}, fvp fpga),) ifeq ($(filter ${TARGET_FLAVOUR}, fvp fpga),)
@ -127,6 +127,13 @@ TC_CPU_SOURCES += lib/cpus/aarch64/cortex_a520.S \
lib/cpus/aarch64/cortex_x925.S lib/cpus/aarch64/cortex_x925.S
endif endif
# CPU libraries for TARGET_PLATFORM=4
ifeq (${TARGET_PLATFORM}, 4)
TC_CPU_SOURCES += lib/cpus/aarch64/cortex_gelas.S \
lib/cpus/aarch64/nevis.S \
lib/cpus/aarch64/travis.S
endif
INTERCONNECT_SOURCES := ${TC_BASE}/tc_interconnect.c \ INTERCONNECT_SOURCES := ${TC_BASE}/tc_interconnect.c \
plat/arm/common/arm_ni.c plat/arm/common/arm_ni.c

View file

@ -58,7 +58,7 @@ static scmi_channel_plat_info_t tc_scmi_plat_info = {
.db_modify_mask = 0x1, .db_modify_mask = 0x1,
.ring_doorbell = &mhuv2_ring_doorbell, .ring_doorbell = &mhuv2_ring_doorbell,
}; };
#elif TARGET_PLATFORM == 3 #elif TARGET_PLATFORM >= 3
static scmi_channel_plat_info_t tc_scmi_plat_info = { static scmi_channel_plat_info_t tc_scmi_plat_info = {
.scmi_mbx_mem = CSS_SCMI_PAYLOAD_BASE, .scmi_mbx_mem = CSS_SCMI_PAYLOAD_BASE,
.db_reg_addr = PLAT_CSS_MHU_BASE + MHU_V3_SENDER_REG_SET(0), .db_reg_addr = PLAT_CSS_MHU_BASE + MHU_V3_SENDER_REG_SET(0),
@ -66,7 +66,9 @@ static scmi_channel_plat_info_t tc_scmi_plat_info = {
.db_modify_mask = 0x1, .db_modify_mask = 0x1,
.ring_doorbell = &mhu_ring_doorbell, .ring_doorbell = &mhu_ring_doorbell,
}; };
#endif
#if TARGET_PLATFORM == 3
static void enable_ns_mcn_pmu(void) static void enable_ns_mcn_pmu(void)
{ {
/* /*