Closed marcinszajner closed 5 years ago
Yeah we all have trouble with this register http://infocenter.arm.com/help/topic/com.arm.doc.ddi0500j/DDI0500J_cortex_a53_trm.pdf
Section 4.2.12 on page 4-11 Notice the reset value CPTR_EL2 RW 0x000033FF So it's doing nothing other than checking it has the reset value but I agree it isn't what the bit data says
U-Boot does the same ... line 58 https://github.com/dsd/u-boot/blob/master/arch/arm/cpu/armv8/transition.S
Linux does the same in install_el2_stub ... line 625 https://github.com/torvalds/linux/blob/4b3c31c8d4dda4d70f3f24a165f3be99499e0328/arch/arm64/kernel/head.S
So we are either all right or all wrong ... I think its the documentation :-)
Thanks for answer. I still confused because in u-boot start.S they write different comment for this action: https://github.com/dsd/u-boot/blob/master/arch/arm/cpu/armv8/start.S#L63 It's a bit like:
But it work, then it's not a problem ;) Probably linux kernel is more right.
They cut and pasted the comments from above for some reason the register below has same comment :-)
The linux comment is quite precise to what it does .. Disable copro. traps to EL2
Wait till you try to do MMU bit flags there is a couple of funny ones there.
I tried MMU with bztsrc tutorial. That was awful, especialy they have some difference beatween armv8 and armv8.2. Hovewer I not try create my own OS, just try do hardware in loop device to stab real device (like half bridge converter). That mean I try not use mechanics typical for OS like virtualization, changing EL or MMU.
Getting experience with cortex-a is funny anyway ^^
Hi Leon,
I analyze your code (for learn aarch64) and I found difference with arm documentation and your code. In SmartStart64.S:114 you save value 0x33ff to cptr_el2 register but in documentation this bits are reserved: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0500j/BABEJIHA.html
This is something not described bits in documentation or just bug?
Best regards, Marcin Szajner