History | View | Annotate | Download (12.9 kB)
i8259: Do not clear level-triggered lines in IRR on init
When an input line is handled as level-triggered, it will immediatelyraise an IRQ on the output of a PIC again that goes through an initreset. So only clear the edge-triggered inputs from IRR in that...
qom: Unify type registration
Replace device_init() with generalized type_init().
While at it, unify naming convention: type_init([$prefix_]register_types)Also, type_init() is a function, so add preceding blank line wherenecessary and don't put a semicolon after the closing brace....
qdev: register all types natively through QEMU Object Model
This was done in a mostly automated fashion. I did it in three steps and thenrebased it into a single step which avoids repeatedly touching every file inthe tree.
The first step was a sed-based addition of the parent type to the subclass...
isa: pic: convert to QEMU Object Model
This converts two devices at once because PIC subclasses ISA and convertingsubclasses independently is extremely hard.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
i8259: Completely privatize PicState
Use DeviceState instead of PicState in the public i8259 API. This iscleaner and allows to reorganize the PIC data structures for KVM reuse.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
i8259: Factor out base class for KVM reuse
Analogously to the APIC, we will reuse some parts of the user spacei8259 model for KVM. The base class provides a common device state, thevmstate, the property list, a reset core and some shared init bits.
This also introduces a common helper to instantiate a single i8259 chip...
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 <hpoussin@reactos.org>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
i8259: give ISA device to isa_register_ioport()
i8259: Fix coding style
No functional changes.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
i8259: Convert to qdev
This key cleanup step requires to move the IRQ debugging bit fromi8259_set_irq directly to the per-PIC pic_set_irq, to pass the PICparameters (I/O base, ELCR address and mask, master/slave mode) asqdev properties, and to interconnect the PICs with their environment via...
i8259: Eliminate PicState2
Introduce a reference to the slave PIC for the few cases we need toaccess it without a proper pointer at hand and drop PicState2. We couldeven live without slave_pic if we had a better way of modeling thecascade bus the PICs are attached to (in addition to the ISA bus)....
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 ofpics_state to differentiate between master and slave mode.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
i8259: PREP: Replace pic_intack_read with pic_read_irq
There is nothing in the i8259 spec that justifies the specialpic_intack_read. At least the Linux PREP kernels configure the PICsproperly so that pic_read_irq returns identical values, and settingread_reg_select in PIC0 cannot be derived from any special i8259 mode....
i8259: Clean up pic_ioport_read
Drop redundant local address variable.
i8259: Fix poll command
This was probably never used so far: According to the spec, pollingmeans 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 returnedvalue, and we must not return a spurious IRQ if none is pending....
i8259: Switch to per-PIC IRQ update
This converts pic_update_irq to work against a single PIC instead of thecomplete cascade. Along this change, the required update afterpic_set_irq1 is now moved into that function.
i8259: Clear ELCR on reset
The ELCR is actually part of the chipset but we model it here forsimplicity reasons. The PIIX3 clears the ELCR on reset, which was oncebroken by 4dbe19e181. Fix this by splitting up pic_init_reset frompic_reset and clearing the register in the latter....
i8259: Update IRQ state after reset
MIPS and PPC users of the i8259 output signal expect us to report stateupdates also after reset. As no consumer (including the master PIC) canmisinterpret the deassert as an activation event, it is safe to simplyupdate the IRQ state after reset....
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.
i8259: Reorder intack in pic_read_irq
As we want to move the IRQ update to pic_intack, ordering matters: theslave ack must be executed before the master ack to avoid missingfurther pending slave IRQs.
i8239: Introduce per-PIC output interrupt
As a first step towards more generic master-slave support, removeparent_irq in favor of a per-PIC output interrupt line. The slave'sline is attached to IRQ2 of the master, but it remains unused for now.
i8259: Move pic_set_irq1 after pic_update_irq
We are about to call the latter from the former. No functional changes.
i8259: Remove premature inline function attributes
The compiler is smarter in choosing the right optimization.
pc: Fix and clean up PIC-to-APIC IRQ path
The master PIC is connected to the LINTIN0 of the APICs. As the APICcurrently does not track the state of that line, we have to ask the PICto 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...
i8259: Convert to MemoryRegion
The only non-obvious part is pic_poll_read which used"addr1 >> 7" to detect whether one referred to eitherthe master or slave PIC. Instead, test this directly.
Signed-off-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Avi Kivity <avi@redhat.com>
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit.
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\>' )...
savevm: Add DeviceState param
When available, we'd like to be able to access the DeviceStatewhen registering a savevm. For buses with a get_dev_path()function, this will allow us to create more unique savevmid strings.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>...
i8259: improve debugging
Add a DPRINTF macro.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
x86: remove dead assignments, spotted by clang analyzer
Value stored is never read.
move two variable declarations out of vl.c
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
vmstate: port i8259 device
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Unexport ticks_per_sec variable. Create get_ticks_per_sec() function
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 <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
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' * /* *//*
Revert "Introduce reset notifier order"
This reverts commit 8217606e6edb49591b4a6fd5a0d1229cebe470a9 (andupdates later added users of qemu_register_reset), we solved theproblem it originally addressed less invasively.
Introduce reset notifier order
Add the parameter 'order' to qemu_register_reset and sort callbacks onregistration. On system reset, callbacks with lower order will beinvoked before those with higher order. Update all existing users to thestandard order 0....
target-alpha: lower parent irq when irq is lowered.
Signed-off-by: Tristan Gingold <gingold@adacore.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7108 c046a42c-6fe2-441c-8c8c-71466251a162
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 servicesgain a new parameter (mon) that will once refer to the monitor instancethe output is supposed to appear on. However, the argument remains...
hw: remove error handling from qemu_malloc() callers (Avi Kivity)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6529 c046a42c-6fe2-441c-8c8c-71466251a162
Special Mask Mode for i8259 PIC (Sebastian Reichelt).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4894 c046a42c-6fe2-441c-8c8c-71466251a162
Add statics and missing #includes for prototypes.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3683 c046a42c-6fe2-441c-8c8c-71466251a162
Break up vl.h.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3674 c046a42c-6fe2-441c-8c8c-71466251a162
Avoid PreP target kernel freeze waiting for IRQs.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3414 c046a42c-6fe2-441c-8c8c-71466251a162
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
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
Fix i8259 initialization, by Bernhard Kauer.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3100 c046a42c-6fe2-441c-8c8c-71466251a162
Unify IRQ handling.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2635 c046a42c-6fe2-441c-8c8c-71466251a162
Single mode for PIC i8259, by Bernhard Kauer.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2575 c046a42c-6fe2-441c-8c8c-71466251a162
Reworking MIPS interrupt handling, by Aurelien Jarno.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2350 c046a42c-6fe2-441c-8c8c-71466251a162
C99 64 bit printf
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2018 c046a42c-6fe2-441c-8c8c-71466251a162
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
IOAPIC support (initial patch by Filip Navara)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1520 c046a42c-6fe2-441c-8c8c-71466251a162
more generic i8259 support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1487 c046a42c-6fe2-441c-8c8c-71466251a162
more generic IRQ support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1445 c046a42c-6fe2-441c-8c8c-71466251a162
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
level triggered IRQ fix (Steve Wormley)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1078 c046a42c-6fe2-441c-8c8c-71466251a162
new reset API
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@938 c046a42c-6fe2-441c-8c8c-71466251a162
trace fixes
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@864 c046a42c-6fe2-441c-8c8c-71466251a162
irq statistics code (initial patch by Jocelyn Mayer)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@840 c046a42c-6fe2-441c-8c8c-71466251a162
PIC spurious irq support (aka Solaris install bug)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@838 c046a42c-6fe2-441c-8c8c-71466251a162
PIC reset fix (initial patch by Hidemi KAWAI)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@836 c046a42c-6fe2-441c-8c8c-71466251a162
PIIX ELCR register support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@820 c046a42c-6fe2-441c-8c8c-71466251a162
fixed very unlikely irq bug
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@749 c046a42c-6fe2-441c-8c8c-71466251a162
PowerPC system emulation fixes (Jocelyn Mayer)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@722 c046a42c-6fe2-441c-8c8c-71466251a162
win32 port (initial patch by kazu)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@692 c046a42c-6fe2-441c-8c8c-71466251a162
use new timer API
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@689 c046a42c-6fe2-441c-8c8c-71466251a162
io port API change
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@664 c046a42c-6fe2-441c-8c8c-71466251a162
separated more devices from emulator
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@656 c046a42c-6fe2-441c-8c8c-71466251a162