dmb sy\r
dc ivac, x0\r
\r
- // flush the TLBs\r
+ // flush translations for the target address from the TLBs\r
+ lsr x2, x2, #12\r
.if \el == 1\r
- tlbi vmalle1\r
+ tlbi vaae1, x2\r
.else\r
- tlbi alle\el\r
+ tlbi vae\el, x2\r
.endif\r
- dsb sy\r
+ dsb nsh\r
\r
// re-enable the MMU\r
msr sctlr_el\el, x8\r
//VOID\r
//ArmReplaceLiveTranslationEntry (\r
// IN UINT64 *Entry,\r
-// IN UINT64 Value\r
+// IN UINT64 Value,\r
+// IN UINT64 Address\r
// )\r
ASM_FUNC(ArmReplaceLiveTranslationEntry)\r
\r
// disable interrupts\r
- mrs x2, daif\r
+ mrs x4, daif\r
msr daifset, #0xf\r
isb\r
\r
// clean and invalidate first so that we don't clobber\r
// adjacent entries that are dirty in the caches\r
dc civac, x0\r
- dsb ish\r
+ dsb nsh\r
\r
EL1_OR_EL2_OR_EL3(x3)\r
1:__replace_entry 1\r
b 4f\r
3:__replace_entry 3\r
\r
-4:msr daif, x2\r
+4:msr daif, x4\r
ret\r
\r
ASM_GLOBAL ASM_PFX(ArmReplaceLiveTranslationEntrySize)\r