OP-TEE / optee_os

Trusted side of the TEE
Other
1.58k stars 1.06k forks source link

I want to turn off OP-TEE Pager but... #4683

Closed Lerisia closed 3 years ago

Lerisia commented 3 years ago

Hello

I am using the stm32mp1 board. I tried to turn off the pager because the pager was too slow, but it failed because an error occurred during the boot process. The optee (BL32) and trusted firmware loaded safely by moving the OP-TEE's address value from SRAM to DRAM, but the u-boot threw an error. Looking at the cause of the error slowly, it seems that MMU or data cache has a cause. The code that activates MMU tried to read to the secure DRAM address 0xde0089d0, which caused an error. If I turned off MMU and data cache options at all, it would boot up safely, but it was meaningless because it was as slow as turning on the pager on. Which part should I fix to boot properly?

Thank you.

etienne-lms commented 3 years ago

Hello Grand Chariot. Indeed this looks related with how U-Boot maps its address space. I think you should look into this series recently posted and acked in U-Boot ML: http://patchwork.ozlabs.org/project/uboot/cover/20210507125035.1594-1-patrick.delaunay@foss.st.com/ 7 patches to ensure secure memory is not mapped in u-boot space, applied to stm32mp1.

Lerisia commented 3 years ago

@etienne-lms

Hello, etienne-lms.

Thank you very much for your reply. This answer seems very likely to solve the problem I am experiencing. I'll read it carefully and try to solve it.

Thank you.

Lerisia commented 3 years ago

Downloading the latest version of u-boot and applying this patch resolved the issue and successfully booted.

Thank you so much. I'll close the issue.