Skip to contentSkip to conversation

arm: mach-omap2: Pass args to secure ROM in SRAM in SPL

PATCH In review Andrew F. Davis 2 participants 2 messages Jan 16, 2018 – Jan 28, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: mach-omap2: Pass args to secure ROM in SRAM in SPL

When in early SPL we make some secure ROM calls that can effect DRAM, due to this it is more stable to store the args for these calls in SRAM, but uninitialized and zero'd globals are placed in BSS, located in DRAM. Force our args into the data section which is in SRAM during SPL.

---
 arch/arm/mach-omap2/sec-common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-omap2/sec-common.c +1 -1
index 2630e7d316..1906a126cf 100644
@@ -56,7 +56,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, ...)
 {
Signature · 1 line
2.15.1
#1 lore raw
Quoted 7 lines · Andrew F. Davis

When in early SPL we make some secure ROM calls that can effect DRAM, due to this it is more stable to store the args for these calls in SRAM, but uninitialized and zero'd globals are placed in BSS, located in DRAM. Force our args into the data section which is in SRAM during SPL.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180128/6904b904/attachment.sig>