From 4a8fbc99b5337c33f399e47406166ea7a062b622 Mon Sep 17 00:00:00 2001 From: Tobias Platen Date: Sat, 13 Feb 2021 18:07:43 +0100 Subject: [PATCH] forward microwatt mmu specific SPR: PID and PRTBL --- src/soc/decoder/power_decoder2.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/soc/decoder/power_decoder2.py b/src/soc/decoder/power_decoder2.py index 4e5b9eb3..3dcc5a37 100644 --- a/src/soc/decoder/power_decoder2.py +++ b/src/soc/decoder/power_decoder2.py @@ -906,11 +906,13 @@ class PowerDecodeSubset(Elaboratable): spr = Signal(10, reset_less=True) comb += spr.eq(decode_spr_num(self.dec.SPR)) # from XFX - # for first test only forward SPRs 18 and 19 to MMU, when - # operation is MTSPR or MFSPR. TODO: add other MMU SPRs + SPR_PID = 48 # TODO read docs for POWER9 + # Microwatt doesn't implement the partition table + # instead has PRTBL register (SPR) to point to process table + SPR_PRTBL = 720 # see common.vhdl in microwatt, not in POWER9 with m.If(((self.dec.op.internal_op == MicrOp.OP_MTSPR) | (self.dec.op.internal_op == MicrOp.OP_MFSPR)) & - ((spr == SPR.DSISR) | (spr == SPR.DAR))): + ((spr == SPR.DSISR) | (spr == SPR.DAR) | (spr==SPR_PRTBL) | (spr==SPR_PID))): comb += self.do_copy("fn_unit", Function.MMU) with m.Else(): comb += self.do_copy("fn_unit",fn) -- 2.30.2