This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

TTBR1_EL2 mmu translation information wrong when E2H=1

I am now using DS5-studio to debug VHE feature, I set the page table of TTBR0_EL2 and TTBR1_EL2 to the same address, but from the mmu information of DS, they are not same, the memory type is not the same, the information from TTBR0_EL2 is right. It is some wrong in DS studio or there some thing I am missing when set the page table?

mmu information

  • Hello,

    A lot more information would be necessary to help answer this, all you have shared is the memory mapping, but not the settings made or other.

    You also mention that you are using DS-5, it may be worth comparing with the latest Development Studio product, in case there were any issues since resolved.You can get a free 30-day evaluation.

    https://developer.arm.com/tools-and-software/embedded/arm-development-studio

  • HI Ronan,

    Thanks for you quick response.

    Actually I am using the arm-development-studio now. I am now developing a hypervisor (https://github.com/minosproject/minos), the hypervisor can  work well with ARMv8.0, and I need to enable the hypervisor on A76 SOC with VHE support. some register setting showed as below:

    HCR_EL2.VHE = 1

    SCTLR_EL2 = 0x30c50838

    TCR_EL2 = 0x25B5103510

    MAIR_EL2 = 0xff440c0400

    After I create the page table, TTBR0_EL2 (mapping information is right) and TTBR1_EL2(mapping information is wrong) show different result as I mentioned in the last post, the memory type from the TTBR1_EL2 is wrong.

    Thanks

    Le Min

  • Hi Le Min
    I can reproduce what you see for a simple example.

    This does look like a problem with the Arm DS Debugger's decoding of Memory Types for the case where VHE is enabled:
    HCR_EL2.E2H = 1
    HCR_EL2.TGE = 1
    I have reported this to our Development Team for further investigation. 
    In the meantime, does your code execute as expected?
    Stephen
  • Hi Stephen,

    Good to know that. Thanks.

    My code runs good under ARMv8.0, But when I enable VHE (HCR_EL2.E2H = 1), The Guest VM can not boot successfully, and the Guest Linux will hang with access a strange address, so currently I am not sure whether this is caused by my hypervisor code or caused by the DS studio.

    Thanks

    Le Min