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 have a strange effect: I need to convert a virtual address to the physical one.
In the current scenario, I have a 1:1 mapping, so I would not need it, but left the code:
mov x3,x0 // for debug at S1E1W,x0 isb mrs x1,PAR_EL1 mov x4,x1 // for debug tst x1,#1 bfi x1,x0,#0,#12 bic x0,x1,#0xff00000000000000 mov x2,#SC_NIL & 0xffff movk x2,#(SC_NIL>>16) & 0xffff,lsl #16 csel x0,x0,x2,EQ // on error return SC_NIL 1: cmp x3,x0 b.ne 1b ret
This code works w/o problem, but under heavy interrupt load, I get a wrong value in PAR_EL1. Since the 1:1 mapping the final result should be the input parameter.I have no idea what is going wrong. The MMU is only setup on boot and no more changes are applied neither to the pagetable nor the ASID.
The code runs in 64bit mode in EL1.Any hint?
*Arg*
Using "at" command and reading PAR_EL1 must be atomic, thus interrupts must be disabled.