Statistics
| Branch: | Revision:

root / hw / i8259.c @ a0f42610

History | View | Annotate | Download (15.6 kB)

# Date Author Comment
48a18b3c 12/20/2011 11:44 pm Hervé Poussineau

isa: give ISABus/ISADevice to isa_create(), isa_bus_irqs() and isa_get_irq() functions

NULL is a valid bus/device, so there is no change in behaviour.

Signed-off-by: Hervé Poussineau <>
Signed-off-by: Anthony Liguori <>

a811f53c 12/20/2011 11:44 pm Hervé Poussineau

i8259: give ISA device to isa_register_ioport()

Signed-off-by: Hervé Poussineau <>
Signed-off-by: Anthony Liguori <>

81a02f93 10/16/2011 02:11 pm Jan Kiszka

i8259: Fix coding style

No functional changes.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Blue Swirl <>

747c70af 10/16/2011 02:11 pm Jan Kiszka

i8259: Convert to qdev

This key cleanup step requires to move the IRQ debugging bit from
i8259_set_irq directly to the per-PIC pic_set_irq, to pass the PIC
parameters (I/O base, ELCR address and mask, master/slave mode) as
qdev properties, and to interconnect the PICs with their environment via...

c17725f4 10/16/2011 02:11 pm Jan Kiszka

i8259: Eliminate PicState2

Introduce a reference to the slave PIC for the few cases we need to
access it without a proper pointer at hand and drop PicState2. We could
even live without slave_pic if we had a better way of modeling the
cascade bus the PICs are attached to (in addition to the ISA bus)....

25985396 10/16/2011 02:11 pm Jan Kiszka

i8259: Replace PicState::pics_state with master flag

This reflects how real PICs indentify their role (in non-buffered mode):
Pass the state of the /SP input on pic_init and use it instead of
pics_state to differentiate between master and slave mode.

Signed-off-by: Jan Kiszka <>...

6e5580ca 10/16/2011 02:11 pm Jan Kiszka

i8259: PREP: Replace pic_intack_read with pic_read_irq

There is nothing in the i8259 spec that justifies the special
pic_intack_read. At least the Linux PREP kernels configure the PICs
properly so that pic_read_irq returns identical values, and setting
read_reg_select in PIC0 cannot be derived from any special i8259 mode....

fc1a5e0a 10/16/2011 02:11 pm Jan Kiszka

i8259: Clean up pic_ioport_read

Drop redundant local address variable.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Blue Swirl <>

8d484caa 10/16/2011 02:11 pm Jan Kiszka

i8259: Fix poll command

This was probably never used so far: According to the spec, polling
means ack'ing the pending IRQ and setting its corresponding bit in isr.
Moreover, we have to signal a pending IRQ via bit 7 of the returned
value, and we must not return a spurious IRQ if none is pending....

b76750c1 10/16/2011 02:11 pm Jan Kiszka

i8259: Switch to per-PIC IRQ update

This converts pic_update_irq to work against a single PIC instead of the
complete cascade. Along this change, the required update after
pic_set_irq1 is now moved into that function.

Signed-off-by: Jan Kiszka <>...

86fbf97c 10/16/2011 02:11 pm Jan Kiszka

i8259: Clear ELCR on reset

The ELCR is actually part of the chipset but we model it here for
simplicity reasons. The PIIX3 clears the ELCR on reset, which was once
broken by 4dbe19e181. Fix this by splitting up pic_init_reset from
pic_reset and clearing the register in the latter....

51d9e939 10/16/2011 02:11 pm Jan Kiszka

i8259: Update IRQ state after reset

MIPS and PPC users of the i8259 output signal expect us to report state
updates also after reset. As no consumer (including the master PIC) can
misinterpret the deassert as an activation event, it is safe to simply
update the IRQ state after reset....

afdb06f8 10/16/2011 02:11 pm Jan Kiszka

i8259: Do not update IRQ output after spurious pic_poll_read

If pic_poll_read finds no pending IRQ and return a spurious one instead,
no PIC state is changed, thus we do not need to call pic_update_irq.

Signed-off-by: Jan Kiszka <>...

78ef2b69 10/16/2011 02:11 pm Jan Kiszka

i8259: Reorder intack in pic_read_irq

As we want to move the IRQ update to pic_intack, ordering matters: the
slave ack must be executed before the master ack to avoid missing
further pending slave IRQs.

Signed-off-by: Jan Kiszka <>...

2e2b2274 10/16/2011 02:10 pm Jan Kiszka

i8239: Introduce per-PIC output interrupt

As a first step towards more generic master-slave support, remove
parent_irq in favor of a per-PIC output interrupt line. The slave's
line is attached to IRQ2 of the master, but it remains unused for now.

Signed-off-by: Jan Kiszka <>...

62026017 10/16/2011 02:10 pm Jan Kiszka

i8259: Move pic_set_irq1 after pic_update_irq

We are about to call the latter from the former. No functional changes.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Blue Swirl <>

5dcd35e2 10/16/2011 02:10 pm Jan Kiszka

i8259: Remove premature inline function attributes

The compiler is smarter in choosing the right optimization.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Blue Swirl <>

d96e1737 10/16/2011 02:10 pm Jan Kiszka

pc: Fix and clean up PIC-to-APIC IRQ path

The master PIC is connected to the LINTIN0 of the APICs. As the APIC
currently does not track the state of that line, we have to ask the PIC
to reinject its IRQ after the CPU picked up an event from the APIC.

This introduces pic_get_output to read the master PIC IRQ line state...

098d314a 09/25/2011 02:58 pm Richard Henderson

i8259: Convert to MemoryRegion

The only non-obvious part is pic_poll_read which used
"addr1 >> 7" to detect whether one referred to either
the master or slave PIC. Instead, test this directly.

Signed-off-by: Richard Henderson <>
Signed-off-by: Avi Kivity <>

7267c094 08/21/2011 07:01 am Anthony Liguori

Use glib memory allocation and free functions

qemu_malloc/qemu_free no longer exist after this commit.

Signed-off-by: Anthony Liguori <>

74475455 03/21/2011 10:23 am Paolo Bonzini

change all other clock references to use nanosecond resolution accessors

This was done with:

sed -i 's/qemu_get_clock\>/qemu_get_clock_ns/' \
$(git grep -l 'qemu_get_clock\>' )
sed -i 's/qemu_new_timer\>/qemu_new_timer_ns/' \
$(git grep -l 'qemu_new_timer\>' )...
0be71e32 07/06/2010 06:36 pm Alex Williamson

savevm: Add DeviceState param

When available, we'd like to be able to access the DeviceState
when registering a savevm. For buses with a get_dev_path()
function, this will allow us to create more unique savevm
id strings.

Signed-off-by: Alex Williamson <>...

8ac02ff8 05/29/2010 11:23 pm Blue Swirl

i8259: improve debugging

Add a DPRINTF macro.

Signed-off-by: Blue Swirl <>

7f5b7d3e 04/25/2010 09:58 pm Blue Swirl

x86: remove dead assignments, spotted by clang analyzer

Value stored is never read.

Signed-off-by: Blue Swirl <>

fbe3288d 04/09/2010 07:55 pm Paolo Bonzini

move two variable declarations out of vl.c

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Aurelien Jarno <>

77eea838 09/11/2009 07:10 pm Juan Quintela

vmstate: port i8259 device

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

6ee093c9 09/11/2009 06:19 pm Juan Quintela

Unexport ticks_per_sec variable. Create get_ticks_per_sec() function

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

1632dc6a 08/24/2009 04:01 pm Avi Kivity

Route IOAPIC interrupts via ISA bus

Instead of calling the IOAPIC from the PIC, raise IOAPIC irqs via the ISA bus.
As a side effect, IOAPIC lines 16-23 are enabled.

Signed-off-by: Avi Kivity <>
Signed-off-by: Anthony Liguori <>

0bf9e31a 07/20/2009 08:19 pm Blue Swirl

Fix most warnings (errors with -Werror) when debugging is enabled

I used the following command to enable debugging:
perl -p -i -e 's/^\/\/#define DEBUG/#define DEBUG/g' * /* *//*

Signed-off-by: Blue Swirl <>

a08d4367 06/29/2009 10:18 pm Jan Kiszka

Revert "Introduce reset notifier order"

This reverts commit 8217606e6edb49591b4a6fd5a0d1229cebe470a9 (and
updates later added users of qemu_register_reset), we solved the
problem it originally addressed less invasively.

Signed-off-by: Jan Kiszka <>...

8217606e 05/22/2009 06:50 pm Jan Kiszka

Introduce reset notifier order

Add the parameter 'order' to qemu_register_reset and sort callbacks on
registration. On system reset, callbacks with lower order will be
invoked before those with higher order. Update all existing users to the
standard order 0....

29463b24 04/15/2009 05:42 pm aurel32

target-alpha: lower parent irq when irq is lowered.

Signed-off-by: Tristan Gingold <>
Signed-off-by: Aurelien Jarno <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7108 c046a42c-6fe2-441c-8c8c-71466251a162

376253ec 03/06/2009 01:01 am aliguori

monitor: Rework API (Jan Kiszka)

Refactor the monitor API and prepare it for decoupled terminals:
term_print functions are renamed to monitor_* and all monitor services
gain a new parameter (mon) that will once refer to the monitor instance
the output is supposed to appear on. However, the argument remains...

487414f1 02/06/2009 12:06 am aliguori

hw: remove error handling from qemu_malloc() callers (Avi Kivity)

Signed-off-by: Avi Kivity <>
Signed-off-by: Anthony Liguori <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6529 c046a42c-6fe2-441c-8c8c-71466251a162

84678711 07/19/2008 12:18 pm balrog

Special Mask Mode for i8259 PIC (Sebastian Reichelt).

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4894 c046a42c-6fe2-441c-8c8c-71466251a162

9596ebb7 11/18/2007 03:44 am pbrook

Add statics and missing #includes for prototypes.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3683 c046a42c-6fe2-441c-8c8c-71466251a162

87ecb68b 11/17/2007 07:14 pm pbrook

Break up vl.h.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3674 c046a42c-6fe2-441c-8c8c-71466251a162

5a9b7d36 10/20/2007 12:13 pm j_mayer

Avoid PreP target kernel freeze waiting for IRQs.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3414 c046a42c-6fe2-441c-8c8c-71466251a162

3b46e624 09/17/2007 11:09 am ths

find -type f | xargs sed -i 's/[\t ]*$//g' # Yes, again. Note the star in the regex.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3177 c046a42c-6fe2-441c-8c8c-71466251a162

5fafdf24 09/17/2007 12:08 am ths

find -type f | xargs sed -i 's/[\t ]$//g' # on most files

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3173 c046a42c-6fe2-441c-8c8c-71466251a162

2bb081f7 08/01/2007 02:12 am ths

Fix i8259 initialization, by Bernhard Kauer.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3100 c046a42c-6fe2-441c-8c8c-71466251a162

d537cf6c 04/07/2007 09:14 pm pbrook

Unify IRQ handling.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2635 c046a42c-6fe2-441c-8c8c-71466251a162

2053152b 04/01/2007 09:26 pm ths

Single mode for PIC i8259, by Bernhard Kauer.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2575 c046a42c-6fe2-441c-8c8c-71466251a162

4de9b249 01/24/2007 03:47 am ths

Reworking MIPS interrupt handling, by Aurelien Jarno.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2350 c046a42c-6fe2-441c-8c8c-71466251a162

26a76461 06/25/2006 09:15 pm bellard

C99 64 bit printf

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2018 c046a42c-6fe2-441c-8c8c-71466251a162

4dbe19e1 04/29/2006 06:52 pm bellard

ELCR is not reset by PIC reset (bug report by malc)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1867 c046a42c-6fe2-441c-8c8c-71466251a162

d592d303 07/23/2005 10:05 pm bellard

IOAPIC support (initial patch by Filip Navara)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1520 c046a42c-6fe2-441c-8c8c-71466251a162

3de388f6 07/02/2005 09:11 pm bellard

more generic i8259 support

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1487 c046a42c-6fe2-441c-8c8c-71466251a162

54fa5af5 06/05/2005 05:50 pm bellard

more generic IRQ support

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1445 c046a42c-6fe2-441c-8c8c-71466251a162

4f7631cf 01/04/2005 01:28 am bellard

initial APIC support (only for x86_64 target now)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1185 c046a42c-6fe2-441c-8c8c-71466251a162

0ecf89aa 09/30/2004 12:55 am bellard

level triggered IRQ fix (Steve Wormley)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1078 c046a42c-6fe2-441c-8c8c-71466251a162

d7d02e3c 06/20/2004 03:58 pm bellard

new reset API

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@938 c046a42c-6fe2-441c-8c8c-71466251a162

2444ca41 05/27/2004 01:16 am bellard

trace fixes

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@864 c046a42c-6fe2-441c-8c8c-71466251a162

4a0fb71e 05/21/2004 02:39 pm bellard

irq statistics code (initial patch by Jocelyn Mayer)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@840 c046a42c-6fe2-441c-8c8c-71466251a162

15aeac38 05/20/2004 07:12 pm bellard

PIC spurious irq support (aka Solaris install bug)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@838 c046a42c-6fe2-441c-8c8c-71466251a162

b54ad049 05/20/2004 04:42 pm bellard

PIC reset fix (initial patch by Hidemi KAWAI)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@836 c046a42c-6fe2-441c-8c8c-71466251a162

660de336 05/20/2004 03:41 pm bellard

PIIX ELCR register support

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@820 c046a42c-6fe2-441c-8c8c-71466251a162

ba91cd80 04/25/2004 09:03 pm bellard

fixed very unlikely irq bug

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@749 c046a42c-6fe2-441c-8c8c-71466251a162

a541f297 04/12/2004 11:39 pm bellard

PowerPC system emulation fixes (Jocelyn Mayer)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@722 c046a42c-6fe2-441c-8c8c-71466251a162

67b915a5 04/01/2004 02:37 am bellard

win32 port (initial patch by kazu)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@692 c046a42c-6fe2-441c-8c8c-71466251a162

b0a21b53 03/31/2004 09:58 pm bellard

use new timer API

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@689 c046a42c-6fe2-441c-8c8c-71466251a162

b41a2cd1 03/14/2004 11:46 pm bellard

io port API change

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@664 c046a42c-6fe2-441c-8c8c-71466251a162

80cabfad 03/14/2004 02:20 pm bellard

separated more devices from emulator

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@656 c046a42c-6fe2-441c-8c8c-71466251a162