From 5c9940679085f309e259a38a0925b0f16f1a1329 Mon Sep 17 00:00:00 2001 From: Hector Martin Date: Mon, 20 Sep 2021 02:48:23 +0900 Subject: [PATCH] m1n1.hv: Guard UART0 pmgr regs Signed-off-by: Hector Martin --- proxyclient/m1n1/hv.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/proxyclient/m1n1/hv.py b/proxyclient/m1n1/hv.py index 2327fa2c..777c9c2c 100644 --- a/proxyclient/m1n1/hv.py +++ b/proxyclient/m1n1/hv.py @@ -1018,10 +1018,12 @@ class HV(Reloadable): pmgr0_start, _ = self.adt["/arm-io/pmgr"].get_reg(0) + pmgr_hooks = (0x23b700220, 0x23b700270) # UART0 + if self.iodev == IODEV.USB0: - pmgr_hooks = (0x23b700420, 0x23d280098, 0x23d280088) + pmgr_hooks += (0x23b700420, 0x23d280098, 0x23d280088) elif self.iodev == IODEV.USB1: - pmgr_hooks = (0x23b700448, 0x23d2800a0, 0x23d280090) + pmgr_hooks += (0x23b700448, 0x23d2800a0, 0x23d280090) for addr in pmgr_hooks: self.map_hook(addr, 4, write=wh, read=rh)