summaryrefslogtreecommitdiffstats
path: root/hw/i8259.c
diff options
context:
space:
mode:
authorJan Kiszka2012-01-24 16:29:29 +0100
committerAnthony Liguori2012-02-17 16:58:22 +0100
commitaa24822bdc7c4e74afbc6fa1324b01cf067da7cb (patch)
tree169e7b7e85693bef2ed3a9cc677830ff148b8e46 /hw/i8259.c
parenti8254: Factor out pit_get_channel_info (diff)
downloadqemu-aa24822bdc7c4e74afbc6fa1324b01cf067da7cb.tar.gz
qemu-aa24822bdc7c4e74afbc6fa1324b01cf067da7cb.tar.xz
qemu-aa24822bdc7c4e74afbc6fa1324b01cf067da7cb.zip
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 <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/i8259.c')
-rw-r--r--hw/i8259.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/i8259.c b/hw/i8259.c
index 1a4b1ab0dd..53daf78652 100644
--- a/hw/i8259.c
+++ b/hw/i8259.c
@@ -231,8 +231,8 @@ static void pic_reset(DeviceState *dev)
{
PICCommonState *s = DO_UPCAST(PICCommonState, dev.qdev, dev);
- pic_init_reset(s);
s->elcr = 0;
+ pic_init_reset(s);
}
static void pic_ioport_write(void *opaque, target_phys_addr_t addr64,