cancel
Showing results for 
Search instead for 
Did you mean: 

Reducing OP-TEE RAM size on STM32MP157C-DK2

AVazquez
Associate III

Hi everyone,

I'm working with the STM32MP157C-DK2 board and trying to reduce the amount of RAM allocated to OP-TEE, but so far I haven't been successful.

There are 32MiB DDR dedicated for OP-TEE. 30MiB for TZSRAM and 2MiB for SHMEM.

In OP-TEE sources I changed value for CFG_TZDRAM_SIZE to 16 MiB and I'm keeping the value for SHMEM.

In TF-a sources I changed value for DDR_SEC_SIZE to 16MiB.

In Device tree I changed total RAM dedicated for OP-TEE to 18MiB.

But when kernel start I have a fail:

 

Starting kernel ...

E/TC:0   
E/TC:0   Core data-abort at address 0x2fff8762 (translation fault)
E/TC:0    fsr 0x00000207  ttbr0 0x2ffe0000  ttbr1 0x00000000  cidr 0x0
E/TC:0    cpu #0          cpsr 0x600001f3
E/TC:0    r0 0x2fff8762      r4 0x2ffe1f71    r8 0x00000073   r12 0xe0000000
E/TC:0    r1 0x2ffe1f1c      r5 0x00000000    r9 0x00000000    sp 0x2ffe1e70
E/TC:0    r2 0x2ffd3355      r6 0x00000000   r10 0x2fff8762    lr 0x2ffcdf77
E/TC:0    r3 0x2fff8762      r7 0x2ffe1f71   r11 0x2ffe1f58    pc 0x2ffcd8f8
E/TC:0   TEE load address @ 0x2ffc0000
E/TC:0   Call stack:
E/TC:0    0x2ffcd8f8
E/TC:0    0x2ffcdf77
E/TC:0   Panic 'abort outside thread context' at core/arch/arm/kernel/abort.c:545 <abort_handler>
E/TC:0   TEE load address @ 0x2ffc0000
E/TC:0   Call stack:
E/TC:0    0x2ffc2499
E/TC:0    0x2ffcbb0b
E/TC:0    0x2ffc2101
E/TC:0    0x2ffc0b84

 

I’d like to ask if it’s actually possible to reduce the size of the reserved RAM for OP-TEE on this board, and if so, what would be the correct approach to do it?

 

0 REPLIES 0