Hello,
I wanted to play wit pager on my RCAR board. Just to see if I can fit it to my virtualization PoC. But, I can't start OP-TEE with it. I have found this check:
#ifdef ARM64 #ifdef CFG_WITH_PAGER #error "Pager not supported for ARM64" #endif #endif /*ARM64*/
in multiple platform_config.h files. But it bothers my, that this check is being done in platform code, not in some common place.
I tried to remove it from plat-rcar/platform_config.h (along with adding TZSRAM definition). All builds fine, but, predictably, does not work :-). I added KEEP_PAGER() there and here in now at least I can see some debug output. Right now it fails there:
ERROR: [0x0] TEE-CORE: assertion '!((va | end) & SMALL_PAGE_MASK)' failed at core/arch/arm/mm/core_mmu.c:851 <init_mem_map>
So, now I'm wondering: is it really that ARMv8 is not supported at all? Why there is no check in common code then? Or is it problem of my platform configuration?
Hi Vlad,
On Fri, Nov 17, 2017 at 5:55 PM, Volodymyr Babchuk vlad.babchuk@gmail.com wrote:
Hello,
I wanted to play wit pager on my RCAR board. Just to see if I can fit it to my virtualization PoC. But, I can't start OP-TEE with it. I have found this check:
#ifdef ARM64 #ifdef CFG_WITH_PAGER #error "Pager not supported for ARM64" #endif #endif /*ARM64*/
in multiple platform_config.h files. But it bothers my, that this check is being done in platform code, not in some common place.
Pager was initially implemented on ARM32 only, but it was always assumed that ARM64 would be supported some day. That is why the #error was not put in a common place (and supported platforms weren't many at that time). Then a few months ago, Jens added the missing parts, some issues were fixed, and pager was enabled on QEMUv8 [1], then on HiKey and D02.
[1] https://github.com/OP-TEE/optee_os/commits/5339dc5
I tried to remove it from plat-rcar/platform_config.h (along with adding TZSRAM definition). All builds fine, but, predictably, does not work :-). I added KEEP_PAGER() there and here in now at least I can see some debug output. Right now it fails there:
ERROR: [0x0] TEE-CORE: assertion '!((va | end) & SMALL_PAGE_MASK)' failed at core/arch/arm/mm/core_mmu.c:851 <init_mem_map>
So, now I'm wondering: is it really that ARMv8 is not supported at all?
As I said, no! You can try pager with QEMUv8:
mkdir ~/optee_qemuv8 cd ~/optee_qemuv8 repo init -u https://github.com/OP-TEE/manifest.git -m qemu_v8.xml repo sync cd build make run CFG_WITH_PAGER=y
Why there is no check in common code then? Or is it problem of my platform configuration?
Probably, yes ;-O
Regards,
Hi Jerome,
On 17 November 2017 at 19:15, Jerome Forissier jerome.forissier@linaro.org wrote:
Why there is no check in common code then? Or is it problem of my platform configuration?
Probably, yes ;-O
Yes. I have found the issue. I'm generating image to flash from tee.elf. Looks like this is not working for pager-enabled OP-TEE, because code in generic_entry_a64.S assumes that packed binary is loaded into memory. I commented out code that moves __init code (because it actually overwrote existing __init code with garbage) and now it boots a lot further. Looks like now I have a problem with hashes. I think I need to strip header from tee.bin and flash it...