]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: mach-k3: Add config option for setting OP-TEE address
authorAndrew Davis <afd@ti.com>
Wed, 14 Feb 2024 16:30:05 +0000 (10:30 -0600)
committerTom Rini <trini@konsulko.com>
Wed, 6 Mar 2024 14:09:00 +0000 (09:09 -0500)
Much like we have for ATF, OP-TEE has a standard address that we load
it too and run it from. Add a Kconfig item for this to remove some
hard-coding and allow this address to be more easily changed.

Signed-off-by: Andrew Davis <afd@ti.com>
Acked-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
arch/arm/dts/k3-am65-iot2050-boot-image.dtsi
arch/arm/dts/k3-binman.dtsi
arch/arm/dts/k3-j721e-beagleboneai64-u-boot.dtsi
arch/arm/mach-k3/Kconfig

index a723caa580549981859de115121191673f8f897a..cca0f44b7d8dfe76cb8111eee0a6efae2f2db1e7 100644 (file)
                                        arch = "arm64";
                                        compression = "none";
                                        os = "tee";
-                                       load = <0x9e800000>;
-                                       entry = <0x9e800000>;
+                                       load = <CONFIG_K3_OPTEE_LOAD_ADDR>;
+                                       entry = <CONFIG_K3_OPTEE_LOAD_ADDR>;
                                        tee-os {
                                                filename = "tee-raw.bin";
                                        };
index 64318d09cf0a6f6b26daa5d74dfe04b163e0a4cc..3a6db91e132531eaaca95d3b567b837bfe6ee511 100644 (file)
@@ -51,8 +51,8 @@
                                        arch = "arm64";
                                        compression = "none";
                                        os = "tee";
-                                       load = <0x9e800000>;
-                                       entry = <0x9e800000>;
+                                       load = <CONFIG_K3_OPTEE_LOAD_ADDR>;
+                                       entry = <CONFIG_K3_OPTEE_LOAD_ADDR>;
                                        tee-os {
                                        };
                                };
index 758c8bf6ea168a0ddac942575705d019b53d0f3c..621653e947182a442801d93a0624ecaf135a7ff3 100644 (file)
                                        arch = "arm64";
                                        compression = "none";
                                        os = "tee";
-                                       load = <0x9e800000>;
-                                       entry = <0x9e800000>;
+                                       load = <CONFIG_K3_OPTEE_LOAD_ADDR>;
+                                       entry = <CONFIG_K3_OPTEE_LOAD_ADDR>;
                                        ti-secure {
                                                content = <&tee>;
                                                keyfile = "custMpk.pem";
                                        arch = "arm64";
                                        compression = "none";
                                        os = "tee";
-                                       load = <0x9e800000>;
-                                       entry = <0x9e800000>;
+                                       load = <CONFIG_K3_OPTEE_LOAD_ADDR>;
+                                       entry = <CONFIG_K3_OPTEE_LOAD_ADDR>;
                                        tee-os {
                                                filename = "tee-raw.bin";
                                        };
index 017a5a722e0f4f99bf6c9dfdf961fd61f6d56fb7..ca99fa0e6906b17a6a61136c67189612d78e437a 100644 (file)
                                        arch = "arm64";
                                        compression = "none";
                                        os = "tee";
-                                       load = <0x9e800000>;
-                                       entry = <0x9e800000>;
+                                       load = <CONFIG_K3_OPTEE_LOAD_ADDR>;
+                                       entry = <CONFIG_K3_OPTEE_LOAD_ADDR>;
                                        tee-os {
                                                filename = "tee-raw.bin";
                                        };
index 0bd3f9fa12dc55d250c1ea9c12c8f949c2af144c..55bb874d9aa70fcd9f1b511cbd8f9a0403ed91bc 100644 (file)
@@ -129,6 +129,13 @@ config K3_ATF_LOAD_ADDR
          The load address for the ATF image. This value is used to build the
          FIT image header that places ATF in memory where it will run.
 
+config K3_OPTEE_LOAD_ADDR
+       hex "Load address of OPTEE image"
+       default 0x9e800000
+       help
+         The load address for the OPTEE image. This value defaults to 0x9e800000
+         if not provided in the board defconfig file.
+
 config K3_DM_FW
        bool "Separate DM firmware image"
        depends on CPU_V7R && (SOC_K3_J721E || SOC_K3_J721S2 || SOC_K3_AM625 || SOC_K3_AM62A7) && !CLK_TI_SCI && !TI_SCI_POWER_DOMAIN