]> git.proxmox.com Git - mirror_qemu.git/commit
openpic: fix sense and priority bits
authorScott Wood <scottwood@freescale.com>
Thu, 3 Jan 2013 13:25:37 +0000 (13:25 +0000)
committerAlexander Graf <agraf@suse.de>
Mon, 7 Jan 2013 16:37:10 +0000 (17:37 +0100)
commit6c5e84c25fc70717c410150b23c765bedf0af52d
tree48fc821e621ed9b9f203171d3ecf49bf1f617b37
parent65b9d0d5659687ebb85b1305ac70b3a84df16e5a
openpic: fix sense and priority bits

Previously, the sense and priority bits were masked off when writing
to IVPR, and all interrupts were treated as edge-triggered (despite
the existence of code for handling level-triggered interrupts).

Polarity is implemented only as storage.  We don't simulate the
bad effects that you'd get on real hardware if you set this incorrectly,
but at least the guest sees the right thing when it reads back the register.

Sense now controls level/edge on FSL external interrupts (and all
interrupts on non-FSL MPIC).  FSL internal interrupts do not have a sense
bit (reads as zero), but are level.  FSL timers and IPIs do not have
sense or polarity bits (read as zero), and are edge-triggered.  To
accommodate FSL internal interrupts, QEMU's internal notion of whether an
interrupt is level-triggered is separated from the IVPR bit.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
hw/openpic.c