]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
imx9: Fix OP-TEE support
authorMathieu Othacehe <othacehe@gnu.org>
Mon, 26 Feb 2024 17:37:18 +0000 (18:37 +0100)
committerFabio Estevam <festevam@gmail.com>
Mon, 4 Mar 2024 11:18:13 +0000 (08:18 -0300)
This fixes OP-TEE support by:

- Adding tee.bin to container.cfg
- Starting ELE RNG in SPL

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
arch/arm/mach-imx/imx9/container.cfg
board/freescale/imx93_evk/spl.c
board/phytec/phycore_imx93/spl.c
board/variscite/imx93_var_som/spl.c

index f268bc9eb2c1984d040973696e0f35eb4b3c2f86..72fe791eae61645a15d05488e3258f8da394f8e8 100644 (file)
@@ -7,4 +7,5 @@ BOOT_FROM SD 0x400
 SOC_TYPE IMX9
 CONTAINER
 IMAGE A55 bl31.bin 0x204E0000
-IMAGE A55 u-boot.bin CONFIG_TEXT_BASE
\ No newline at end of file
+IMAGE A55 u-boot.bin CONFIG_TEXT_BASE
+IMAGE A55 tee.bin 0x96000000
\ No newline at end of file
index a98ed69db880b437f251191c8da7bac74e8ee286..2fd5559195e1d3aa06fad6d489e39a5271d89446 100644 (file)
@@ -20,6 +20,7 @@
 #include <asm/mach-imx/boot_mode.h>
 #include <asm/mach-imx/mxc_i2c.h>
 #include <asm/arch-mx7ulp/gpio.h>
+#include <asm/mach-imx/ele_api.h>
 #include <asm/mach-imx/syscounter.h>
 #include <asm/sections.h>
 #include <dm/uclass.h>
@@ -43,6 +44,12 @@ int spl_board_boot_device(enum boot_device boot_dev_spl)
 
 void spl_board_init(void)
 {
+       int ret;
+
+       ret = ele_start_rng();
+       if (ret)
+               printf("Fail to start RNG: %d\n", ret);
+
        puts("Normal Boot\n");
 }
 
index dabc5316f33423d1f86da73c0db953b1edb93476..16303fc187a4d7b717d784a6365de31b7d520156 100644 (file)
@@ -11,6 +11,7 @@
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/trdc.h>
 #include <asm/mach-imx/boot_mode.h>
+#include <asm/mach-imx/ele_api.h>
 #include <asm/sections.h>
 #include <hang.h>
 #include <init.h>
@@ -34,6 +35,12 @@ int spl_board_boot_device(enum boot_device boot_dev_spl)
 
 void spl_board_init(void)
 {
+       int ret;
+
+       ret = ele_start_rng();
+       if (ret)
+               printf("Fail to start RNG: %d\n", ret);
+
        puts("Normal Boot\n");
 }
 
index e6db4eb562b92eb8d5c20220691b2258f172f406..36e17219d63d23599c47baf57b842646b1c5d54a 100644 (file)
@@ -20,6 +20,7 @@
 #include <asm/mach-imx/mxc_i2c.h>
 #include <asm/arch-mx7ulp/gpio.h>
 #include <asm/sections.h>
+#include <asm/mach-imx/ele_api.h>
 #include <asm/mach-imx/syscounter.h>
 #include <dm/uclass.h>
 #include <dm/device.h>
@@ -47,9 +48,14 @@ int spl_board_boot_device(enum boot_device boot_dev_spl)
 void spl_board_init(void)
 {
        struct var_eeprom *ep = VAR_EEPROM_DATA;
+       int ret;
 
        puts("Normal Boot\n");
 
+       ret = ele_start_rng();
+       if (ret)
+               printf("Fail to start RNG: %d\n", ret);
+
        /* Copy EEPROM contents to DRAM */
        memcpy(ep, &eeprom, sizeof(*ep));
 }