X-Git-Url: https://git.librecmc.org/?p=oweals%2Fu-boot.git;a=blobdiff_plain;f=arch%2Farm%2Fmach-omap2%2Fsec-common.c;h=0551bc125e8fc2ba2604c3e0a311b8a23ad26f10;hp=674517e30bb88592881097df3132808be97b5816;hb=c27178ba3649f539c9f1890ea147f4c5415f63b5;hpb=fbd23b9b94e848f715b8b5d34793fadc60190b35 diff --git a/arch/arm/mach-omap2/sec-common.c b/arch/arm/mach-omap2/sec-common.c index 674517e30b..0551bc125e 100644 --- a/arch/arm/mach-omap2/sec-common.c +++ b/arch/arm/mach-omap2/sec-common.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * * Common security related functions for OMAP devices @@ -9,11 +10,14 @@ * Andreas Dannenberg * Harinarayan Bhatta * Andrew F. Davis - * - * SPDX-License-Identifier: GPL-2.0+ */ #include +#include +#include +#include +#include +#include #include #include @@ -56,7 +60,7 @@ struct ppa_tee_load_info { u32 tee_arg0; /* argument to TEE jump function, in r0 */ }; -static uint32_t secure_rom_call_args[5] __aligned(ARCH_DMA_MINALIGN); +static uint32_t secure_rom_call_args[5] __aligned(ARCH_DMA_MINALIGN) __section(".data"); u32 secure_rom_call(u32 service, u32 proc_id, u32 flag, ...) { @@ -168,16 +172,16 @@ auth_exit: } /* - * Output notification of successful authentication as well the name of - * the signing certificate used to re-assure the user that the secure - * code is being processed as expected. However suppress any such log - * output in case of building for SPL and booting via YMODEM. This is - * done to avoid disturbing the YMODEM serial protocol transactions. + * Output notification of successful authentication to re-assure the + * user that the secure code is being processed as expected. However + * suppress any such log output in case of building for SPL and booting + * via YMODEM. This is done to avoid disturbing the YMODEM serial + * protocol transactions. */ if (!(IS_ENABLED(CONFIG_SPL_BUILD) && IS_ENABLED(CONFIG_SPL_YMODEM_SUPPORT) && spl_boot_device() == BOOT_DEVICE_UART)) - printf("Authentication passed: %s\n", (char *)sig_addr); + printf("Authentication passed\n"); return result; } @@ -334,7 +338,7 @@ int secure_tee_install(u32 addr) debug("tee_info.tee_arg0 = %08X\n", tee_info.tee_arg0); debug("tee_file_size = %d\n", tee_file_size); -#if !defined(CONFIG_SYS_DCACHE_OFF) +#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) flush_dcache_range( rounddown((u32)loadptr, ARCH_DMA_MINALIGN), roundup((u32)loadptr + tee_file_size, ARCH_DMA_MINALIGN)); @@ -357,7 +361,7 @@ int secure_tee_install(u32 addr) /* Reuse the tee_info buffer for SMC params */ smc_cpu1_params = (u32 *)&tee_info; smc_cpu1_params[0] = 0; -#if !defined(CONFIG_SYS_DCACHE_OFF) +#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) flush_dcache_range((u32)smc_cpu1_params, (u32)smc_cpu1_params + roundup(sizeof(u32), ARCH_DMA_MINALIGN)); #endif