summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2024-06-07 14:01:15 -0600
committerTom Rini <trini@konsulko.com>2024-06-07 14:01:15 -0600
commit30060e0480636b3fccdbdf97cdca98ee89e3e58a (patch)
tree307db160a3fb40eb10d7fe7bfc5d3ef62cea2e98 /arch
parentbf3d5baa868a658d4625aaf177096751b8597891 (diff)
parent4db7d62f858b82b493a7c6a32d5ba25a85a6f9dd (diff)
downloadu-boot-30060e0480636b3fccdbdf97cdca98ee89e3e58a.tar.gz
u-boot-30060e0480636b3fccdbdf97cdca98ee89e3e58a.tar.bz2
u-boot-30060e0480636b3fccdbdf97cdca98ee89e3e58a.zip
Merge patch series "Adding support to load secure firmware for HS devices"
Udit Kumar <u-kumar1@ti.com> says: Some use case needs rproc firmware to be loaded at u-boot stage, using following commands at u-boot shell, firmware could be loaded => setenv dorprocboot 1 => run boot_rprocs For Secure devices, secure version of rproc firmware should be loaded, which is appended by sec keyword[0]. but currently non-secure firmware is loaded even for secure devices. So adding support for loading secure firmware on Secured devices. [0]: https://gist.github.com/uditkumarti/cd8bf6a448079b59145d17a0e8bf13b7 Bootlogs: GP : https://gist.github.com/uditkumarti/23a00c313e1c28b62537aab733a585df#file-gp_device line 65 onwards HS : https://gist.github.com/uditkumarti/23a00c313e1c28b62537aab733a585df#file-hs-device line 60 onwards
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-k3/common.c4
-rw-r--r--arch/arm/mach-k3/common.h4
-rw-r--r--arch/arm/mach-k3/include/mach/security.h11
3 files changed, 16 insertions, 3 deletions
diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c
index 1a269d6934..eaa7d36176 100644
--- a/arch/arm/mach-k3/common.c
+++ b/arch/arm/mach-k3/common.c
@@ -283,8 +283,10 @@ int misc_init_r(void)
}
/* Default FIT boot on HS-SE devices */
- if (get_device_type() == K3_DEVICE_TYPE_HS_SE)
+ if (get_device_type() == K3_DEVICE_TYPE_HS_SE) {
env_set("boot_fit", "1");
+ env_set("secure_rprocs", "1");
+ }
return 0;
}
diff --git a/arch/arm/mach-k3/common.h b/arch/arm/mach-k3/common.h
index 53aa186b31..7bd72da1de 100644
--- a/arch/arm/mach-k3/common.h
+++ b/arch/arm/mach-k3/common.h
@@ -2,12 +2,13 @@
/*
* K3: Architecture common definitions
*
- * Copyright (C) 2018 Texas Instruments Incorporated - https://www.ti.com/
+ * Copyright (C) 2018-2024 Texas Instruments Incorporated - https://www.ti.com/
* Lokesh Vutla <lokeshvutla@ti.com>
*/
#include <asm/armv7_mpu.h>
#include <asm/hardware.h>
+#include <mach/security.h>
#define K3_FIREWALL_BACKGROUND_BIT (8)
@@ -41,7 +42,6 @@ void spl_enable_cache(void);
void mmr_unlock(uintptr_t base, u32 partition);
bool is_rom_loaded_sysfw(struct rom_extended_boot_data *data);
enum k3_device_type get_device_type(void);
-void ti_secure_image_post_process(void **p_image, size_t *p_size);
struct ti_sci_handle *get_ti_sci_handle(void);
void do_board_detect(void);
void ti_secure_image_check_binary(void **p_image, size_t *p_size);
diff --git a/arch/arm/mach-k3/include/mach/security.h b/arch/arm/mach-k3/include/mach/security.h
new file mode 100644
index 0000000000..8502b57bd8
--- /dev/null
+++ b/arch/arm/mach-k3/include/mach/security.h
@@ -0,0 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * K3: Security related definitions
+ *
+ * Copyright (C) 2024 Texas Instruments Incorporated - https://www.ti.com/
+ * Manorit Chawdhry <m-chawdhry@ti.com>
+ */
+
+#include <linux/types.h>
+
+void ti_secure_image_post_process(void **p_image, size_t *p_size);