From fa96d6142f7f1947717c7c45c4d3141e5ab55167 Mon Sep 17 00:00:00 2001 From: Peter Crosthwaite Date: Tue, 11 Jun 2013 10:59:55 +1000 Subject: intc/xilinx_intc: Inhibit write to ISR when HIE When the Hardware Interrupt Enable (HIE) bit is set, software cannot change ISR. Add write guard accordingly. Signed-off-by: Peter Crosthwaite Signed-off-by: Edgar E. Iglesias --- hw/intc/xilinx_intc.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'hw') diff --git a/hw/intc/xilinx_intc.c b/hw/intc/xilinx_intc.c index 09b4453..ddedfa3 100644 --- a/hw/intc/xilinx_intc.c +++ b/hw/intc/xilinx_intc.c @@ -116,6 +116,11 @@ pic_write(void *opaque, hwaddr addr, case R_CIE: p->regs[R_IER] &= ~value; /* Atomic clear ie. */ break; + case R_ISR: + if ((p->regs[R_MER] & 2)) { + break; + } + /* fallthrough */ default: if (addr < ARRAY_SIZE(p->regs)) p->regs[addr] = value; -- cgit v1.1