Skip to main content
Associate III
December 4, 2023
Solved

OPTEE panic in core_init_mmu_map

  • December 4, 2023
  • 3 replies
  • 2919 views

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.
Best answer by PatrickF

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.

3 replies

dkalAuthor
Associate III
December 4, 2023

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
December 5, 2023

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

dkalAuthor
Associate III
December 6, 2023

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
Technical Moderator
December 8, 2023

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 'Accept as Solution' on the reply which solved your issue or answered your question.NEW ! Sidekick STM32 AI agent, see here
dkalAuthor
Associate III
December 8, 2023

Thank you, we will check.

dkalAuthor
Associate III
December 7, 2023

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