On 1/27/26 2:16 AM, Suhaas Joshi wrote:
Instead of hard-coding ATF and OPTEE addresses in firewall configuration
templates, use K3_*_LOAD_ADDR. Doing so ensures that if someone moves
ATF/OPTEE regions, the change gets picked up by binman without
explicitly having to modify dts files.
Signed-off-by: Suhaas Joshi <[email protected]>
---
arch/arm/dts/k3-binman.dtsi | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm/dts/k3-binman.dtsi b/arch/arm/dts/k3-binman.dtsi
index 761b1730464..0fd93f9536a 100644
--- a/arch/arm/dts/k3-binman.dtsi
+++ b/arch/arm/dts/k3-binman.dtsi
@@ -476,8 +476,8 @@
permissions = <((FWPRIVID_ARMV8 << FWPRIVID_SHIFT) |
FWPERM_SECURE_PRIV_RWCD |
FWPERM_SECURE_USER_RWCD)>;
- start_address = <0x0 0x70000000>;
- end_address = <0x0 0x7001ffff>;
+ start_address = <0x0 CONFIG_K3_ATF_LOAD_ADDR>;
+ end_address = <0x0 (CONFIG_K3_ATF_LOAD_ADDR + 0x1ffff)>;
Not an issue with this patch, this is better than before, but we still have
the size of TF-A and OP-TEE hardcoded here, and also here[0]. Might be good
to add a Kconfig symbol for the size of these at some point.
Andrew
[0]
https://source.denx.de/u-boot/u-boot/-/blob/master/arch/arm/mach-k3/common_fdt.c#L175
};
firewall_armv8_optee_fg: template-8 {
control = <(FWCTRL_EN | FWCTRL_LOCK |
@@ -485,8 +485,8 @@
permissions = <((FWPRIVID_ARMV8 << FWPRIVID_SHIFT) |
FWPERM_SECURE_PRIV_RWCD |
FWPERM_SECURE_USER_RWCD)>;
- start_address = <0x0 0x9e800000>;
- end_address = <0x0 0x9fffffff>;
+ start_address = <0x0 CONFIG_K3_OPTEE_LOAD_ADDR>;
+ end_address = <0x0 (CONFIG_K3_OPTEE_LOAD_ADDR + 0x17fffff)>;
};
ti_falcon_template: template-9 {