My code is running at EL2 in one of the cortex-a57 cores in an nvidia tx2. The code is crashing just during initialization after I enable MMU.
However, what I just found out is that this is only happening if I run a “tlbi alle2”. If I execute it before enabling the MMU, the cpu crashes when I enable the MMU by writing to SCTLR_EL2. If I execute it after enabling the MMU, it crashes when I execute the tlbi instruction but only when followed by a dsb. If I don’t invalidate the tlb at any point, the code seems to be running fine.
Any idea on what the problem might be?
PS: when I say “crash”, I guess an exception happens, but the processor actually seems to be stalling. I cant be sure what happens and why I lose control of the processor. I don’t have a debugger, so I can only figure out where the code stops, by printing using the uart at specific points.