Closed i-nevo closed 3 years ago
Our system uses 44 bits for Physical addresses, so it requires also 44 bits for Virtual addresses due to flat mapping of the OPTEE .text.
This is only needed if you're executing from such a high address.
... I guess that this address space requires level 0 translation table, but OPTEE only provides levels 1-3. Is that so?
Yes, we should have added a COMPILE_TIME_ASSERT() to catch this at build time.
If it is, how can I overcome this problem and use OPTEE on our system?
Obviously a level 0 has to be added. I expect that some corner cases will need to be handled. These comes to mind:
Thanks
Hi, I'm new to OPTEE and tasked with porting it to a new SoC. Our system uses 44 bits for Physical addresses, so it requires also 44 bits for Virtual addresses due to flat mapping of the OPTEE .text. I set the following configurations (in
conf.mk
of my platform):I also set
CFG_TZDRAM_START
&CFG_TZDRAM_SIZE
to the physical memory space we use for the OPTEE. At first I gotPanic 'can't find table for mapping' at core/arch/arm/mm/core_mmu.c:1640
and found out it was due to a hard-coded restriction in the OPTEE code. In filecore_mmu_lpae.c
, line 699 appeared the following:which I changed to
and the panic disappeared. However, the OPTEE crashes in routine
enable_mmu
(fileentry_a64.S
) when the MMU is enabled:The isb is the last executed instruction, the next instruction causes the following exception:
I guess that this address space requires level 0 translation table, but OPTEE only provides levels 1-3. Is that so? If it is, how can I overcome this problem and use OPTEE on our system? If not, what could be the problem with the MMU? Thanks in advance.