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

Juno MMU setup

Hi,

I was trying to change my MMU setup from 39bit address space to 40bit address space in Juno.

Previously I was successfully able to map 39bit address space by setting T0SZ=25 and using L1 level page tables.

Now I am trying to enable MMU configuring L0 level page tables but as soon as I write TCR_EL2 and T0SZ=24 I am getting "Bus error on memory operation".

I faced this issue before when I was setting wrong T0SZ value but now I am setting T0SZ=24 which should be the value for 40bit virtual space.

Is it possible in Juno to have MMU with 40bit address space > 512GB ? I read another link (Re: Re: ARMv8 mmu problem)

but it is confusing if it is possible or not as ID_AA64MMFR0_EL1 register show Juno supports 40bit and memory map states upper 512GB reserved based on above link.

I would like to know how to identify then the value of T0SZ as apart from ID register and page table granularity it seems platform memory map has to be considered ?

Another issue is I am mapping my VA -> IPA -> PA all to 39bit address space and not sure if Linux has any restriction that PA/IPA needs to be wider than VA ?

Thanks.

Parents
  • Is it possible in Juno to have MMU with 40bit address space > 512GB ?

    but it is confusing if it is possible or not as ID_AA64MMFR0_EL1 register show Juno supports 40bit and memory map states upper 512GB reserved based on above link.

    Yes.  ID_AA64MMFR0_EL1.PARange only reports the size of the physical address space.  The size of the virtual address spaces are independent (of each other and of the PA space), and controlled by the TCRs.

    Now I am trying to enable MMU configuring L0 level page tables but as soon as I write TCR_EL2 and T0SZ=24 I am getting "Bus error on memory operation".

    I faced this issue before when I was setting wrong T0SZ value but now I am setting T0SZ=24 which should be the value for 40bit virtual space.

    Just to be clear, do you mean that having set up TCR_EL2 and then enabled the MMU you get the exception?  Or, that you get the exception on programming TCR_EL2 with the MMU still disabled?   I'm assuming the first, but I wanted to check.

    Can you give the ESR_EL2 and FAR_EL2 (I'm assuming you're taking the exception to EL2) values?

    Initially the most likely answer would be that your tables are mapping an invalid physical address.  As the problem appeared when you increased the size of the VA space, and hence inserted the L0 table, the L0 table would seem like the most likely candidate.  I'm guessing you have the first entry pointed at the original L1 table, is that correct?  What is in the other entry?

    It would help to know the following:

    • Physical address of the L0 table
    • Value of TTBR0_EL2
    • Value of TCR_EL2
    • Value of the entries in the L0 table
    • Physical address of the L1 table(s) pointed at by the non-faulting L0 table entries (remember, L0 tables can't contain block descriptors)
Reply
  • Is it possible in Juno to have MMU with 40bit address space > 512GB ?

    but it is confusing if it is possible or not as ID_AA64MMFR0_EL1 register show Juno supports 40bit and memory map states upper 512GB reserved based on above link.

    Yes.  ID_AA64MMFR0_EL1.PARange only reports the size of the physical address space.  The size of the virtual address spaces are independent (of each other and of the PA space), and controlled by the TCRs.

    Now I am trying to enable MMU configuring L0 level page tables but as soon as I write TCR_EL2 and T0SZ=24 I am getting "Bus error on memory operation".

    I faced this issue before when I was setting wrong T0SZ value but now I am setting T0SZ=24 which should be the value for 40bit virtual space.

    Just to be clear, do you mean that having set up TCR_EL2 and then enabled the MMU you get the exception?  Or, that you get the exception on programming TCR_EL2 with the MMU still disabled?   I'm assuming the first, but I wanted to check.

    Can you give the ESR_EL2 and FAR_EL2 (I'm assuming you're taking the exception to EL2) values?

    Initially the most likely answer would be that your tables are mapping an invalid physical address.  As the problem appeared when you increased the size of the VA space, and hence inserted the L0 table, the L0 table would seem like the most likely candidate.  I'm guessing you have the first entry pointed at the original L1 table, is that correct?  What is in the other entry?

    It would help to know the following:

    • Physical address of the L0 table
    • Value of TTBR0_EL2
    • Value of TCR_EL2
    • Value of the entries in the L0 table
    • Physical address of the L1 table(s) pointed at by the non-faulting L0 table entries (remember, L0 tables can't contain block descriptors)
Children