Skip to main content
Associate III
Dec 4, 2023 5:56 PM UTC
Solved

OPTEE panic in core_init_mmu_map

Hi, I have a custom board with a stm32mp153.  I was able to get past the trusted bootloader and into optee.  It builds the mmu map and then panics when checking it.  I am able to partially step through building the table and the memory starts to get corrupted but I can't see why.  I also have a 157-ev which works fine when I build for that on the same dev machine.  I am looking for possible clues on where to go from here.

This topic has been closed for replies.
PatrickF
PatrickFBest answer
ST Employee
Dec 8, 2023 8:05 AM UTC

Hi @dkal 

if you are writing to DDR, maybe double check the correct DM Vs DQ/DQS wirings on your schematics. We had seen similar behavior when customers swapped Data Mask and Bytes which mean x32-bits write works but not bytes.

Regards.

In order to give better visibility on the answered topics, please click on 'Best Answer' on the reply which solved your issue or answered your question.Tip of the day: Try Sidekick STM32 AI agent

8 replies

dkalAuthor
Associate III
Dec 4, 2023 9:56 PM UTC

I've tracked the issue down to memmove not working properly, why would it be fine in stm32mp157 and not fine in stm32mp153?

dkalAuthor
Associate III
Dec 5, 2023 1:49 AM UTC

More specifically, the memmove is filling the destination with garbage even though the source and destination pointers are valid.

dkalAuthor
Associate III
Dec 6, 2023 4:06 AM UTC

It seems that single byte copies are the issue, when it can do a more optimized copy with longs, that memory is correct.  

PatrickF
PatrickFBest answer
ST Employee
Dec 8, 2023 8:05 AM UTC

Hi @dkal 

if you are writing to DDR, maybe double check the correct DM Vs DQ/DQS wirings on your schematics. We had seen similar behavior when customers swapped Data Mask and Bytes which mean x32-bits write works but not bytes.

Regards.

In order to give better visibility on the answered topics, please click on 'Best Answer' on the reply which solved your issue or answered your question.Tip of the day: Try Sidekick STM32 AI agent
dkalAuthor
Associate III
Dec 8, 2023 7:25 PM UTC

Thank you, we will check.

dkalAuthor
Associate III
Dec 7, 2023 4:20 PM UTC

I am going to assume that this is a RAM issue and am now trying the DDR utility.