ipq5332: TINY NOR: disable exectzt, jump_kernel_64

Disable tzapp and 64-bit kernel support.

Change-Id: I13046276f266a24f4a05c6f39bccc7c2e5a898e2
Signed-off-by: Gokul Sriram Palanisamy <quic_gokulsri@quicinc.com>
Signed-off-by: Timple Raj M <quic_timple@quicinc.com>
This commit is contained in:
Gokul Sriram Palanisamy 2022-08-08 13:14:10 +05:30 committed by Gokul Sriram P
parent 3af1bc31ae
commit dc54ad636c
7 changed files with 22 additions and 3 deletions

View file

@ -351,6 +351,7 @@ bool is_scm_armv8(void)
return (scm_version == SCM_ARMV8_32);
}
#ifndef CONFIG_DISABLE_KERNEL64
void __attribute__ ((noreturn)) jump_kernel64(void *kernel_entry,
void *fdt_addr)
{
@ -377,8 +378,9 @@ void __attribute__ ((noreturn)) jump_kernel64(void *kernel_entry,
printf("Can't boot kernel: %d\n", ret);
hang();
}
#endif
#ifndef CONFIG_CMD_DISABLE_EXECTZT
void __attribute__ ((noreturn)) execute_tzt(void *entry_addr)
{
struct qca_scm_desc desc = {0};
@ -398,7 +400,7 @@ void __attribute__ ((noreturn)) execute_tzt(void *entry_addr)
printf("Can't boot TZT: %d\n", ret);
hang();
}
#endif
/* We need to invalidate the buffer written by TZ before we use in u-boot
* In some calls TZ writes to desc.args[0].

View file

@ -226,9 +226,12 @@ typedef struct {
#define SCM_RW_OP 2
#define SCM_BUF_VAL 3
#ifndef CONFIG_DISABLE_KERNEL64
void __attribute__ ((noreturn)) jump_kernel64(void *kernel_entry,
void *fdt_addr);
#endif
#ifndef CONFIG_CMD_DISABLE_EXECTZT
void __attribute__ ((noreturn)) execute_tzt(void *entry_addr);
#endif
#endif

View file

@ -259,6 +259,7 @@ bool armv7_boot_nonsec(void)
}
#endif
#ifndef CONFIG_DISABLE_KERNEL64
struct aarch64_hdr {
u32 code0; /* Executable code */
u32 code1; /* Executable code */
@ -273,6 +274,7 @@ struct aarch64_hdr {
};
#define AARCH64_LINUX_MAGIC 0x644d5241
#define TEST_AARCH64(ptr) (ptr->magic == AARCH64_LINUX_MAGIC) ? true : false
#endif
/* Subcommand: GO */
static void boot_jump_linux(bootm_headers_t *images, int flag)
@ -323,9 +325,11 @@ static void boot_jump_linux(bootm_headers_t *images, int flag)
else
r2 = gd->bd->bi_boot_params;
#ifndef CONFIG_DISABLE_KERNEL64
if (TEST_AARCH64(((struct aarch64_hdr *)kernel_entry))) {
jump_kernel64(kernel_entry, images->ft_addr);
} else {
#endif
if (!fake) {
#ifdef CONFIG_ARMV7_NONSEC
if (armv7_boot_nonsec()) {
@ -336,8 +340,10 @@ static void boot_jump_linux(bootm_headers_t *images, int flag)
#endif
kernel_entry(0, machid, r2);
}
#ifndef CONFIG_DISABLE_KERNEL64
}
#endif
#endif
}
/* Main Entry point for arm bootm implementation

View file

@ -1,7 +1,9 @@
obj-y := cmd_bootqca.o
obj-y += cmd_blowsecfuse.o
obj-y += cmd_sec_auth.o
ifndef CONFIG_CMD_DISABLE_EXECTZT
obj-y += cmd_exectzt.o
endif
obj-$(CONFIG_IPQ_TZT) += cmd_tzt.o
obj-$(CONFIG_SMP_CMD_SUPPORT) += cmd_runmulticore.o
obj-y += fdt_info.o

View file

@ -2063,10 +2063,12 @@ void fdt_fixup_art_format(void *blob)
}
#endif
#ifndef CONFIG_CMD_DISABLE_EXECTZT
void run_tzt(void *address)
{
execute_tzt(address);
}
#endif
void fdt_fixup_set_dload_warm_reset(void *blob)
{

View file

@ -1841,10 +1841,12 @@ int bring_sec_core_up(unsigned int cpuid, unsigned int entry, unsigned int arg)
return 0;
}
#ifndef CONFIG_CMD_DISABLE_EXECTZT
void run_tzt(void *address)
{
execute_tzt(address);
}
#endif
void sdi_disable(void)
{

View file

@ -448,6 +448,8 @@ extern loff_t board_env_size;
#define CONFIG_DISABLE_CMD_SF_PROTECT
#define CONFIG_DISABLE_CMD_SF_BULKERASE
#define CONFIG_DISABLE_CMD_UART
#define CONFIG_DISABLE_KERNEL64
#define CONFIG_CMD_DISABLE_EXECTZT
#else
#define CONFIG_IPQ_ELF_AUTH
#endif