proxy: add mmu_shutdown call, use it for linux.py

I saw at least one SError crash on Linux after doing this, but can't
repro; unclear if related to the MMU changes or not...

Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
Hector Martin 2021-01-29 00:35:40 +09:00
parent c3c6e4e8f9
commit f3d0a58f42
4 changed files with 8 additions and 0 deletions

View file

@ -61,6 +61,7 @@ daif |= 0x3c0
u.msr(DAIF, daif)
print("DAIF: %x" % daif)
p.mmu_shutdown()
p.vector(kernel_base, dtb_addr)
iface.ttymode()

View file

@ -299,6 +299,7 @@ class M1N1Proxy:
P_DC_CVAC = 0x308
P_DC_CVAU = 0x309
P_DC_CIVAC = 0x30a
P_MMU_SHUTDOWN = 0x30b
P_XZDEC = 0x400
P_GZDEC = 0x401
@ -492,6 +493,8 @@ class M1N1Proxy:
self.request(self.P_DC_CVAU, addr, size)
def dc_civac(self, addr, size):
self.request(self.P_DC_CIVAC, addr, size)
def mmu_shutdown(self):
self.request(self.P_MMU_SHUTDOWN)
def xzdec(self, inbuf, insize, outbuf=0, outsize=0):
return self.request(self.P_XZDEC, inbuf, insize, outbuf,

View file

@ -171,6 +171,9 @@ int proxy_process(ProxyRequest *request, ProxyReply *reply)
case P_DC_CIVAC:
dc_civac_range((void *)request->args[0], request->args[1]);
break;
case P_MMU_SHUTDOWN:
mmu_shutdown();
break;
case P_XZDEC: {
u32 output_size = request->args[3];

View file

@ -53,6 +53,7 @@ typedef enum {
P_DC_CVAC,
P_DC_CVAU,
P_DC_CIVAC,
P_MMU_SHUTDOWN,
P_XZDEC = 0x400, // Decompression and data processing ops
P_GZDEC,