From 3203e951efaef82ff03a5ed4c9c9bddf7fe87a13 Mon Sep 17 00:00:00 2001 From: Jing Han Date: Thu, 25 Apr 2024 14:32:03 +0000 Subject: [PATCH 1/4] tc: add platform tc3 and tc4 --- Makefile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 7726ce6..4e5e560 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ #/** @file -# * Copyright (c) 2019-2023, Arm Limited or its affiliates. All rights reserved. +# * Copyright (c) 2019-2024, Arm Limited or its affiliates. All rights reserved. # * SPDX-License-Identifier : Apache-2.0 # * # * Licensed under the Apache License, Version 2.0 (the "License"); @@ -26,6 +26,8 @@ MOCKER=mocker LINUX=linux SGM776=sgm776 TC=tc +TC3=tc3 +TC4=tc4 JUNO=juno GENERIC_SCMI=generic_scmi COMMON=common @@ -48,7 +50,7 @@ ifeq ($(PLAT),$(LINUX)) DIR=platform/$(LINUX) ifeq ($(TARGET),$(SGM776)) PLAT_DIR=$(DIR)/$(SGM776) $(DIR)/$(COMMON) - else ifeq ($(TARGET),$(TC)) + else ifeq ($(TARGET),$(filter $(TARGET),$(TC) $(TC3) $(TC4))) PLAT_DIR=$(DIR)/$(TC) $(DIR)/$(COMMON) else ifeq ($(TARGET),$(JUNO)) PLAT_DIR=$(DIR)/$(JUNO) $(DIR)/$(COMMON) @@ -60,6 +62,12 @@ ifeq ($(PLAT),$(LINUX)) TARGET_UPPER=$(shell echo $(TARGET) | tr '[:lower:]' '[:upper:]') endif +ifeq ($(TARGET),$(TC3)) + CFLAGS+=-DTC3 +else ifeq ($(TARGET),$(TC4)) + CFLAGS+=-DTC4 +endif + # Set VERBOSE to default(TEST) if not set ifndef VERBOSE VERBOSE=3 -- GitLab From 99a28fc0cd9e53a3bbc50ec8c4bab9c56c97f676 Mon Sep 17 00:00:00 2001 From: Jing Han Date: Thu, 25 Apr 2024 14:46:05 +0000 Subject: [PATCH 2/4] tc: update expected values for tc3 and tc4 update the expected SCP version. update the expected power domain number. update the expected performance domain names. update the expected performance domain number for GPU on tc4. --- platform/linux/tc/include/pal_base_expected.h | 7 ++++++- .../tc/include/pal_performance_expected.h | 20 +++++++++++++++++++ .../tc/include/pal_power_domain_expected.h | 5 +++++ 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/platform/linux/tc/include/pal_base_expected.h b/platform/linux/tc/include/pal_base_expected.h index b39b5cd..59ffa9a 100644 --- a/platform/linux/tc/include/pal_base_expected.h +++ b/platform/linux/tc/include/pal_base_expected.h @@ -37,6 +37,11 @@ static char *agents[] = { static char *vendor_name = "arm"; static char *subvendor_name = "arm"; -static uint32_t implementation_version = VERSION_ENCODE32(2, 12, 0); +#if defined(TC3) || defined(TC4) +#define VERSION_MINOR 14 +#else +#define VERSION_MINOR 12 +#endif +static uint32_t implementation_version = VERSION_ENCODE32(2, VERSION_MINOR, 0); #endif /* __PAL_BASE_EXPECTED_H__ */ diff --git a/platform/linux/tc/include/pal_performance_expected.h b/platform/linux/tc/include/pal_performance_expected.h index d1ac5fa..cdc623a 100644 --- a/platform/linux/tc/include/pal_performance_expected.h +++ b/platform/linux/tc/include/pal_performance_expected.h @@ -26,15 +26,35 @@ static uint32_t perf_num_performance_levels[] = { 5, /* CPU_GROUP_CORTEX_A520 */ 5, /* CPU_GROUP_CORTEX_A720 */ 5, /* CPU_GROUP_CORTEX_X4 */ +#if defined(TC4) + 2 /* GPU */ +#else 4 /* GPU */ +#endif }; +#if defined(TC3) +static char *performance_domain_names[] = { + "CPU_GROUP_CORTEX_A520", + "CPU_GROUP_CHABERTON", + "CPU_GROUP_BLACKHAWK", + "GPU" +}; +#elif defined(TC4) +static char *performance_domain_names[] = { + "CPU_GROUP_NEVIS", + "CPU_GROUP_GELAS", + "CPU_GROUP_TRAVIS", + "GPU" +}; +#else static char *performance_domain_names[] = { "CPU_GROUP_CORTEX_A520", "CPU_GROUP_CORTEX_A720", "CPU_GROUP_CORTEX_X4", "GPU" }; +#endif uint32_t statistics_address_low_perf = 0; uint32_t statistics_address_len_perf = 0; diff --git a/platform/linux/tc/include/pal_power_domain_expected.h b/platform/linux/tc/include/pal_power_domain_expected.h index 4e10f94..16450e2 100644 --- a/platform/linux/tc/include/pal_power_domain_expected.h +++ b/platform/linux/tc/include/pal_power_domain_expected.h @@ -20,7 +20,12 @@ /* Expected POWER DOMAIN parameters */ #ifdef POWER_DOMAIN_PROTOCOL +#if defined(TC3) || defined(TC4) +static uint32_t num_power_domains = 0x0a; +#else static uint32_t num_power_domains = 0x0b; +#endif + uint32_t statistics_address_low_pow = 0; uint32_t statistics_address_len_pow = 0; -- GitLab From 6e1a90760299ee0345515ada6ab77b272eb2aa93 Mon Sep 17 00:00:00 2001 From: Jing Han Date: Fri, 9 Aug 2024 10:41:10 +0000 Subject: [PATCH 3/4] tc: update cpu names to public ones --- platform/linux/tc/include/pal_performance_expected.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/linux/tc/include/pal_performance_expected.h b/platform/linux/tc/include/pal_performance_expected.h index cdc623a..64b58e8 100644 --- a/platform/linux/tc/include/pal_performance_expected.h +++ b/platform/linux/tc/include/pal_performance_expected.h @@ -36,8 +36,8 @@ static uint32_t perf_num_performance_levels[] = { #if defined(TC3) static char *performance_domain_names[] = { "CPU_GROUP_CORTEX_A520", - "CPU_GROUP_CHABERTON", - "CPU_GROUP_BLACKHAWK", + "CPU_GROUP_CORTEX_A725", + "CPU_GROUP_CORTEX_X925", "GPU" }; #elif defined(TC4) -- GitLab From a13c0dc960502b5d9d361385ac2480d7f7b93ff1 Mon Sep 17 00:00:00 2001 From: goukon01 Date: Mon, 23 Dec 2024 17:55:59 +0530 Subject: [PATCH 4/4] tc: Update expected num_power_domains to be 1 Since OSPM will no longer have access to CPUs, change expected power domains to be 1; the GPU. Signed-off-by: Gourish Kondeti --- platform/linux/tc/include/pal_power_domain_expected.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/linux/tc/include/pal_power_domain_expected.h b/platform/linux/tc/include/pal_power_domain_expected.h index 16450e2..712caea 100644 --- a/platform/linux/tc/include/pal_power_domain_expected.h +++ b/platform/linux/tc/include/pal_power_domain_expected.h @@ -21,11 +21,12 @@ /* Expected POWER DOMAIN parameters */ #ifdef POWER_DOMAIN_PROTOCOL #if defined(TC3) || defined(TC4) -static uint32_t num_power_domains = 0x0a; +static uint32_t num_power_domains = 0x01; #else static uint32_t num_power_domains = 0x0b; #endif + uint32_t statistics_address_low_pow = 0; uint32_t statistics_address_len_pow = 0; -- GitLab