Hi,
I have a question on ARM page table.
I am running a bare metal application on Cortex A72 and i have a failure with my application.
Upon debugging the failure, i found an address which is contributing the failure. our Bare metal application is responsible for creating the VA-PA page tables for the addresses being used.
Here are the snippet.
CPU is executing the following instruction segment(this is only part of the full instructions). Below is the dis-assembly.
0b3:054: 3e:000004 0000_c0000000.0000_05900000=4f03b604 orr Q4.16B,#7000700070007000 dv0=05a ivp:0020b4:055: 3f:000004 0000_c0000004.0000_05900004=b9000325 str w5,[x25,#0000] L:ff,I:01a+0(fd800070) dv0=05d dv1=05c0b5:056: 40:000004 0000_c0000008.0000_05900008=922fdb2c and x12,x25,#fefefefefefefefe dv0=05f dv1=05c0b6:057: 41:000904 0000_c000000c.0000_0590000c=d61f0240 br x18 dv1=060 tinum:058 br:038
In this dis assembly the addresses 0xc0000000 is Virtual address and 0x05900000 is Physical address. Below are the page tables for this address.
Showing page table 05110000, vaddr 0000_00000000-7f_ffffffff, level 1, num:fff
......
1] 05110018 (0000_c0000000) = 0000000005113003^M
....
1] Showing page table 05113000, vaddr 0000_c0000000-ffffffff, level 2, num:0031] 05113000 (0000_c0000000) = 0000000005114003
.....
1] Showing page table 05114000, vaddr 0000_c0000000-c01fffff, level 3, num:0171] 05114000 (0000_c0000000) = 0000000005900e7f
as per this page table lookup, physical address 05900000 has attibute_index[4:2] = 111
But i also see another entry where address 05900000 has an entry as Virtual address
31063 1] Showing page table 05115000, vaddr 0000_05800000-059fffff, level 3, num:007^M....
....31066 1] 05115800 (0000_05900000) = 0000000005900e67^M
as per this entry physical address 05900000 has attibute_index[4:2] = 001.
so when CPU is trying to access Virtual address 0xc00000000 which mapped to 05900000 which entry CPU considers, which attibute_index values are considered.
are this mappings VALID? if Yes, which mapping CPU considers?
Appreciate your feedback on this.
Thanks