From 034cc8087b249f87bfd42b99ac8553756274ee5a Mon Sep 17 00:00:00 2001 From: sandeep chiluvuru Date: Thu, 6 Jun 2024 10:28:40 +0530 Subject: [PATCH 1/3] fix(tc): correct NS timer frame ID for TC The non-secure (NS) timer in TC is AP_GTCLK_NS_CNTBase1. This commit corrects the NS frame ID from its original value of 0 to U(1), ensuring that the correct CNTACR register bits are written. This change enables access to the counter registers. Change-Id: I287ab9c373a60741f78d44a67f546326916473ea Signed-off-by: Sandeep Chiluvuru Signed-off-by: Icen Zeyada --- plat/arm/board/tc/include/platform_def.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plat/arm/board/tc/include/platform_def.h b/plat/arm/board/tc/include/platform_def.h index 0652148b1..593598ed3 100644 --- a/plat/arm/board/tc/include/platform_def.h +++ b/plat/arm/board/tc/include/platform_def.h @@ -228,7 +228,7 @@ V2M_FLASH0_SIZE, \ MT_DEVICE | MT_RO | MT_SECURE) -#define PLAT_ARM_NSTIMER_FRAME_ID 0 +#define PLAT_ARM_NSTIMER_FRAME_ID U(1) #define PLAT_ARM_TRUSTED_ROM_BASE 0x0 From 25a2fe3b74689614f73138d130ab0cae14269b51 Mon Sep 17 00:00:00 2001 From: Davidson K Date: Fri, 21 Jun 2024 19:31:39 +0530 Subject: [PATCH 2/3] feat(tc): remove static memory used for fwu With the updated firmware update implementation in the Trusted Services, it is no longer needed to carve out static memory. Memory will be allocated dynamically in U-Boot and shared with the firmware update secure partition of Trusted Services. Change-Id: I0fb128a458773236ee10526edfa1116b229e4d6e Signed-off-by: Davidson K Signed-off-by: Jackson Cooper-Driver Signed-off-by: Icen Zeyada --- fdts/tc-base.dtsi | 4 ---- plat/arm/board/tc/include/platform_def.h | 5 ----- 2 files changed, 9 deletions(-) diff --git a/fdts/tc-base.dtsi b/fdts/tc-base.dtsi index be0a9f605..735d429a5 100644 --- a/fdts/tc-base.dtsi +++ b/fdts/tc-base.dtsi @@ -247,10 +247,6 @@ reg = <0x0 TC_NS_OPTEE_BASE 0x0 TC_NS_OPTEE_SIZE>; }; - fwu_mm { - reg = <0x0 TC_NS_FWU_BASE 0x0 TC_NS_FWU_SIZE>; - no-map; - }; }; memory { diff --git a/plat/arm/board/tc/include/platform_def.h b/plat/arm/board/tc/include/platform_def.h index 593598ed3..9ea5dd2b9 100644 --- a/plat/arm/board/tc/include/platform_def.h +++ b/plat/arm/board/tc/include/platform_def.h @@ -51,9 +51,6 @@ * | (4KB) | * 0x8000_9000 ------------------ * | ... | - * 0xf8a0_0000 ------------------ TC_NS_FWU_BASE - * | FWU shmem | - * | (4MB) | * 0xf8e0_0000 ------------------ TC_NS_OPTEE_BASE * | OP-TEE shmem | * | (2MB) | @@ -85,8 +82,6 @@ #define TC_NS_OPTEE_SIZE (2 * SZ_1M) #define TC_NS_OPTEE_BASE (TC_NS_DRAM1_BASE + TC_NS_DRAM1_SIZE - TC_NS_OPTEE_SIZE) -#define TC_NS_FWU_SIZE (4 * SZ_1M) -#define TC_NS_FWU_BASE (TC_NS_OPTEE_BASE - TC_NS_FWU_SIZE) /* * Mappings for TC DRAM1 (non-secure) and TC TZC DRAM1 (secure) From 62269d47439e34c161f2c4990f9fdc536d82943a Mon Sep 17 00:00:00 2001 From: Davidson K Date: Tue, 25 Jun 2024 20:04:24 +0530 Subject: [PATCH 3/3] feat(tc): move flash device to own node Move the flash address to its own devicetree node in tc_spmc_manifest.dtsi. This patch also changes the device-type to ns-device-memory which is the correct type for a flash device. Change-Id: I19503ac35c433661faaaa01c0b83a16540d73810 Co-developed-by: Jackson Cooper-Driver Signed-off-by: Davidson K Signed-off-by: Jackson Cooper-Driver Signed-off-by: Icen Zeyada --- plat/arm/board/tc/fdts/tc_spmc_manifest.dtsi | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/plat/arm/board/tc/fdts/tc_spmc_manifest.dtsi b/plat/arm/board/tc/fdts/tc_spmc_manifest.dtsi index a6b63a1fe..737997d45 100644 --- a/plat/arm/board/tc/fdts/tc_spmc_manifest.dtsi +++ b/plat/arm/board/tc/fdts/tc_spmc_manifest.dtsi @@ -99,11 +99,7 @@ memory@1 { device_type = "ns-memory"; - reg = -#ifdef TS_SP_FW_CONFIG - <0x0 0x08000000 0x0 0x4000000>, -#endif /* TS_SP_FW_CONFIG */ - <0x0 TC_NS_DRAM1_BASE 0x0 TC_NS_DRAM1_SIZE>, + reg = <0x0 TC_NS_DRAM1_BASE 0x0 TC_NS_DRAM1_SIZE>, ; }; @@ -117,4 +113,11 @@ device_type = "device-memory"; reg = <0x0 PLAT_ARM_BOOT_UART_BASE 0x0 0x01000>; }; + +#ifdef TS_SP_FW_CONFIG + ns_flash { + device_type = "ns-device-memory"; + reg = <0x0 V2M_FLASH0_BASE 0x0 V2M_FLASH0_SIZE>; + }; +#endif };