mpfs/mpfs_shead.S: Remove MMU mappings and flush TLB upon boot

This fixes warm reset crash when trying to access memory via old stale
MMU mappings
This commit is contained in:
Ville Juven 2023-06-09 13:42:48 +03:00 committed by Xiang Xiao
parent d8a61108cf
commit 37bf542c9e

View file

@ -84,6 +84,11 @@ __start:
la gp, __global_pointer$
.option pop
/* Remove MMU mappings (if any) and flush TLB */
csrw satp, zero
sfence.vma x0, x0
/* Make sure the writes to CSR stick before continuing */
fence