From aa24822bdc7c4e74afbc6fa1324b01cf067da7cb Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Tue, 24 Jan 2012 16:29:29 +0100 Subject: i8259: Do not clear level-triggered lines in IRR on init When an input line is handled as level-triggered, it will immediately raise an IRQ on the output of a PIC again that goes through an init reset. So only clear the edge-triggered inputs from IRR in that scenario. Signed-off-by: Jan Kiszka Signed-off-by: Anthony Liguori --- hw/i8259_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/i8259_common.c') diff --git a/hw/i8259_common.c b/hw/i8259_common.c index 775fda4..ab3d98b 100644 --- a/hw/i8259_common.c +++ b/hw/i8259_common.c @@ -28,7 +28,7 @@ void pic_reset_common(PICCommonState *s) { s->last_irr = 0; - s->irr = 0; + s->irr &= s->elcr; s->imr = 0; s->isr = 0; s->priority_add = 0; -- cgit v1.1