We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi,
I want to produce an exception in Foundation Model to test my ARMV8 U-boot. But when I set AF bit to 0 in last level page table entry, and want to produce an Access Flag exception, it failed, the same happened to Address size fault and Translation fault. But when I set AP bit(access ) , the permission fault can be reported to exception handler which I added to start.S.
I'm wondering if the Hardware page table walk in Foundation model can not report exception in handling page table entry? Cause permission fault is produced in TLB not in hardware page table walk.
Can anybody help me? Thanks very much in advance.
Hi heron, sorry for the late reply. We have been trying to reproduce the problem you are mentioning, but unable to reproduce it. We have internal test program to test this behaviour, and from the tarmac trace, we can see the Access Flag is behaving as expected.
9 clk IT (9) 00000024 d2a58000 O EL3h_s : MOV x0,#0x2c000000
9 clk R X0 000000002C000000
10 clk IT (10) 00000028 b940001f O EL3h_s : LDR wzr,[x0,#0]
10 clk TTW DTLB LPAE 1:0 0000001000 0000000000002003 : TABLE PXN=0 XN=0 AP=0 NS=0 ADDR=0x0000000000002000
10 clk TTW DTLB LPAE 1:1 0000002000 0000000000004003 : TABLE PXN=0 XN=0 AP=0 NS=0 ADDR=0x0000000000004000
10 clk TTW DTLB LPAE 1:2 0000004b00 006000002c000041 : BLOCK ATTRIDX=0 NS=0 AP=1 SH=0 AF=0 nG=0 16E=0 PXN=1 XN=1 ADDR=0x000000002c000000
10 clk MR4 2c000000 00000000 (ABORTED)
10 clk E 00000028:0000000028 00000084 CoreEvent_CURRENT_SPx_SYNC
10 clk R cpsr 000003cd
10 clk R ESR_EL3 9600000a
10 clk R SPSR_EL3 000003cd
10 clk R FAR_EL3 000000002c000000
10 clk R ELR_EL3 0000000000000028
11 clk IT (11) 00000200 00000000 O EL3h_s : DCI 0x00000000 ; ? Undefined
We can see the descriptor is set up with AF=0, then in ESR_EL3, we see Access Flag fault is generated. It is suggesting the configuration code in your program might be incorrect, though we are not able to spot anything obviously wrong in the code you posted. So I think you need to enable tarmac trace to double check your pagetable configurations.
The command line to enable the tarmac trace is Foundation_v8pkg/models/Linux64_GCC-4.1/Foundation_v8 --image=test.axf --trace=/proc/self/fd/1
Thanks,
George