From c629ba854f2e3b79d14455500fee5e7f7cdef37e Mon Sep 17 00:00:00 2001 From: Andre Przywara Date: Thu, 25 Mar 2021 16:20:13 +0000 Subject: [PATCH 1/2] sunxi: H616: Change TF-A load address to beginning of DRAM Loading Trusted-Firmware's BL31 at 16KB into DRAM was originally a hack to allow sharing more code with the other SoCs (which use this offset in SRAM). However there is no longer a reason for that, as the problematic macros have been properly separated there. The latest (and hopefully final) TF-A code drop now changes the load address to the beginning of DRAM, which is also more easily protected by the Trustzone memory controller (code to be done). Adjust the load address of BL31 now, to avoid any issues with incompatible versions later on (the TF-A patches are about to be merged). Signed-off-by: Andre Przywara Reviewed-by: Samuel Holland --- arch/arm/dts/sunxi-u-boot.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/dts/sunxi-u-boot.dtsi b/arch/arm/dts/sunxi-u-boot.dtsi index abe629c55e..cd096bf2a0 100644 --- a/arch/arm/dts/sunxi-u-boot.dtsi +++ b/arch/arm/dts/sunxi-u-boot.dtsi @@ -4,7 +4,7 @@ #define BL31_ADDR 0x104000 #define SCP_ADDR 0x114000 #elif defined(CONFIG_MACH_SUN50I_H616) -#define BL31_ADDR 0x40004000 +#define BL31_ADDR 0x40000000 #else #define BL31_ADDR 0x44000 #define SCP_ADDR 0x50000 From 62acef239f77583f3083f8c842ea2d28f4a1623c Mon Sep 17 00:00:00 2001 From: Andre Przywara Date: Thu, 25 Mar 2021 16:19:52 +0000 Subject: [PATCH 2/2] sunxi: dts: H616: Drop reserved-memory node Trusted Firmware now adds the /reserved-memory subnode to the DT at runtime[1], putting in the right values. Drop our hard-coded version, as this might clash with the actual values (which have also changed), and rely on TF-A to add the node. [1] https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/7770 Signed-off-by: Andre Przywara Reviewed-by: Samuel Holland Reviewed-by: Jagan Teki --- arch/arm/dts/sun50i-h616.dtsi | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/arch/arm/dts/sun50i-h616.dtsi b/arch/arm/dts/sun50i-h616.dtsi index 953e8fac20..dd4d2f3111 100644 --- a/arch/arm/dts/sun50i-h616.dtsi +++ b/arch/arm/dts/sun50i-h616.dtsi @@ -51,18 +51,6 @@ }; }; - reserved-memory { - #address-cells = <2>; - #size-cells = <2>; - ranges; - - /* 512KiB reserved for ARM Trusted Firmware (BL31) */ - secmon_reserved: secmon@40000000 { - reg = <0x0 0x40000000 0x0 0x80000>; - no-map; - }; - }; - osc24M: osc24M_clk { #clock-cells = <0>; compatible = "fixed-clock";