Hi experts,
I try to use ARM development studio to debug bootloader and view MMU table contents.
But MMU window can not display the MMU table and shows that "Unable to read from register SCR-EL3".
How can I do to check MMU table?
Current board is running on EL2 with 64bit, CPU is cortext-A73.
ARM development studio version: 2023.1
Thanks for your attention!
Best Regards,
Yan
HiMy name is Stephen and I work at Arm.To help us investigate further:What is the board that you are connecting to? Is it a custom design of your own, or a development board from a third-party?To connect to the board, a debug configuration database is needed. Did you create this yourself (e.g. with the Platform Configuration Editor built-into Arm DS), or did this come from a somewhere else?Is the Cortex-A73 running or stopped when the MMU view is opened? Registers can only be read once the core is stopped.Does SCR_EL3 show a valid value when the core is stopped?What does "mmu print" entered in the Commands view show?Please could you attach a screen-shot of Arm DS, showing the error message you see?Thank youStephen
Hi Stephen,
The board is our own custom design.
Debug configuration database is generated by Platform Configuration Editor in ARM studio IDE.
Cortex-A73 is stopped when check MMU window and registers can be shown in register window.
Current A73 environment is Non-secure EL2 (AArch64), so SCR_EL3 value is invalid in register window.
"mmu print" command result: "ERROR: Unable to read from register SCR_EL3".
Attachment is a screen-shot of ARM studio IDE for your reference.
Why need check SCR_EL3 when display Non-secure EL2 MMU layout?
Hi againThanks for the extra information. Is "secure debug" enabled or disabled on your target? Please check the setting of SPIDEN. If disabled, can you enable it?To populate the EL2N MMU view, the debugger needs to access SCR_EL3.RW to determine the execution state (AArch64/AArch32) of EL2. DSTREAM can do this by attaining EL3, provided secure debug is enabled. If secure debug is disabled, then the debugger is unable to access SCR_EL3.If you can't enable secure debug, then please try the MMU Settings control. Click on the gearwheel in the top right-hand corner of the MMU view, then change 'Follow System' to 'Non-Secure EL2 (AArch64)'. Does that work?
developer.arm.com/.../MMU-MPU-view
Hope this helpsStephen
Thanks for your help!
I select "Follow system" to 'Non-Secure EL2(AArch64)', but MMU window still can not display table contents.
The current CPU is Non-Secure EL2 (AArch64) as shown in the bottom left corner of the IDE, why do we still need to access SCR_EL3.RW?
Due to secure protection, I can't enable secure debug currently. I'll try to enable it and test MMU display window. But in previous DS-5 tool, non-secure MMU table can display without secure debug enable.
Thanks for testing. Sorry that "Follow system" to "Non-Secure EL2 (AArch64)" didn't work.Yes, I think the issue is caused by secure debug being disabled. Please let us know if it works when enabled.Stephen
Hi,
When secure debug is enabled, MMU table can display.
However, not every board's secure debug can be enabled, so it is still a problem when non-secure world need check MMU table.