summaryrefslogtreecommitdiffstats
path: root/hw/intc
Commit message (Collapse)AuthorAgeFilesLines
* intc/openpic: Build openpic only onceAndreas Färber2013-07-092-2/+2
| | | | | | | | | Since current_cpu is CPUState it no longer depends on CPUPPCState. Move ppce500_set_mpic_proxy() to a new hw/ppc/ppc_e500.h because hw/ppc/ppc.h is too heavily using CPUPPCState and PowerPCCPU. Signed-off-by: Andreas Färber <afaerber@suse.de>
* intc/arm_gic: Build arm_gic only onceAndreas Färber2013-07-092-1/+2
| | | | | | Since current_cpu is CPUState it no longer needs CPUArchState. Signed-off-by: Andreas Färber <afaerber@suse.de>
* cpu: Make first_cpu and next_cpu CPUStateAndreas Färber2013-07-091-3/+2
| | | | | | | | | | | | Move next_cpu from CPU_COMMON to CPUState. Move first_cpu variable to qom/cpu.h. gdbstub needs to use CPUState::env_ptr for now. cpu_copy() no longer needs to save and restore cpu_next. Acked-by: Paolo Bonzini <pbonzini@redhat.com> [AF: Rebased, simplified cpu_copy()] Signed-off-by: Andreas Färber <afaerber@suse.de>
* cpu: Replace cpu_single_env with CPUState current_cpuAndreas Färber2013-07-093-10/+11
| | | | | | Move it to qom/cpu.h. Signed-off-by: Andreas Färber <afaerber@suse.de>
* hw/i*: pass owner to memory_region_init* functionsPaolo Bonzini2013-07-0419-33/+45
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* memory: add owner argument to initialization functionsPaolo Bonzini2013-07-0421-35/+35
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* intc/openpic_kvm: Fix QOM and build issuesAndreas Färber2013-07-011-21/+33
| | | | | Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* intc/openpic: Convert to QOM realizeAndreas Färber2013-07-011-15/+19
| | | | | | | | | Split qdev initfn into instance_init and realize functions. Change one occurrence of "klass" while at it. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Alexander Graf <agraf@suse.de>
* intc/openpic: QOM'ifyAndreas Färber2013-07-011-6/+11
| | | | | | | | Introduce type constant and cast macro. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Alexander Graf <agraf@suse.de>
* kvm/openpic: in-kernel mpic supportScott Wood2013-07-012-0/+253
| | | | | | | | | | | | | | | | | | | | | | | Enables support for the in-kernel MPIC that thas been merged into the KVM next branch. This includes irqfd/KVM_IRQ_LINE support from Alex Graf (along with some other improvements). Note from Alex regarding kvm_irqchip_create(): On x86, one would call kvm_irqchip_create() to initialize an in-kernel interrupt controller. That function then goes ahead and initializes global capability variables as well as the default irq routing table. On ppc, we can't call kvm_irqchip_create() because we can have different types of interrupt controllers. So we want to do all the things that function would do for us in the in-kernel device init handler. Signed-off-by: Scott Wood <scottwood@freescale.com> [agraf: squash in kvm_irqchip_commit_routes patch, fix non-kvm build, fix ppcemb] Signed-off-by: Alexander Graf <agraf@suse.de>
* openpic: factor out some common defines into openpic.hScott Wood2013-07-011-22/+18
| | | | | | | ...for use by the KVM in-kernel irqchip stub. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
* intc/xilinx_intc: Dont lower IRQ when HIE clearedPeter Crosthwaite2013-06-181-5/+0
| | | | | | | | | | | This is a little strange. It is lowering the parent IRQ pin on input when HIE is cleared. There is no such behaviour in the real hardware. ISR changes based on interrupt pin state are already guarded on HIE being set. So we can just delete this if in its entirety. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* intc/xilinx_intc: Inhibit write to ISR when HIEPeter Crosthwaite2013-06-181-0/+5
| | | | | | | | When the Hardware Interrupt Enable (HIE) bit is set, software cannot change ISR. Add write guard accordingly. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* intc/xilinx_intc: Handle level interrupt retriggeringPeter Crosthwaite2013-06-181-1/+15
| | | | | | | | | | | | | | Acking a level sensitive interrupt should have no effect if the interrupt pin is still asserted. The current implementation requires and edge condition to occur for setting a level sensitive IRQ, which means an ACK can clear a level sensitive interrupt, until the original source strobes the interrupt again. Fix by keeping track of the interrupt pin state and setting ISR based on this every time update_irq() is called. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* intc/xilinx_intc: Don't clear level sens. IRQs without ACKPeter Crosthwaite2013-06-181-7/+1
| | | | | | | | | For level sensitive interrupts, ISR bits are cleared when the input pin is lowered. This is incorrect. Only software can clear ISR bits (via IAR or direct write to ISR with !MER(2)). Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* Merge branch 'realize-isa.v2' of git://github.com/afaerber/qemu-cpuBlue Swirl2013-06-152-32/+50
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'realize-isa.v2' of git://github.com/afaerber/qemu-cpu: qdev: Drop FROM_QBUS() macro isa: QOM'ify ISADevice isa: QOM'ify ISABus i8259: Convert PICCommonState to use QOM realizefn kvm/i8259: QOM'ify some more i8259: QOM'ify some more i8254: Convert PITCommonState to QOM realizefn kvm/i8254: QOM'ify some more i8254: QOM'ify some more isa: Use realizefn for ISADevice cs4231a: QOM'ify some more gus: QOM'ify some more
| * isa: QOM'ify ISADeviceAndreas Färber2013-06-071-10/+12
| | | | | | | | | | | | Rename its parent field and use DEVICE() where necessary. Signed-off-by: Andreas Färber <afaerber@suse.de>
| * i8259: Convert PICCommonState to use QOM realizefnAndreas Färber2013-06-072-7/+21
| | | | | | | | | | | | | | | | | | Instead of having the parent provide PICCommonClass::init, let the children override DeviceClass::realize themselves. This pushes the responsibility of saving and calling the parent's realizefn to the children. Signed-off-by: Andreas Färber <afaerber@suse.de>
| * i8259: QOM'ify some moreAndreas Färber2013-06-071-9/+14
| | | | | | | | | | | | | | | | Introduce type constant. Prepares for PIC realizefn. Signed-off-by: Andreas Färber <afaerber@suse.de>
| * isa: Use realizefn for ISADeviceAndreas Färber2013-06-071-6/+3
| | | | | | | | | | | | | | | | Drop ISADeviceClass::init and the resulting no-op initfn and let children implement their own realizefn. Adapt error handling. Split off an instance_init where sensible. Signed-off-by: Andreas Färber <afaerber@suse.de>
* | intc/xilinx_intc: Use qemu_set_irqPeter Crosthwaite2013-06-111-5/+1
|/ | | | | | | | | | Use qemu_set_irq rather than if-elsing qemu_irq_(lower|raise). No functional change, just reduces verbosity. Cc: qemu-trivial@nongnu.org Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* apic: rename apic specific bitoptsMichael S. Tsirkin2013-06-021-21/+21
| | | | | | | | | | | apic has its own version of bitops, with the difference that it works on u32 and not long. Add apic_ prefix to avoid namespace clashes. We should look into reusing standard bitops long-term, but that's not entirely trivial. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* Remove Sun4c, Sun4d and a few CPUsBlue Swirl2013-05-263-365/+1
| | | | | | | | | | | Sun4c and Sun4d architectures and related CPUs are not fully implemented (especially Sun4c MMU) and there has been no interest for them. Likewise, a few CPUs (Cypress, Ross etc) are only half implemented. Remove the machines and CPUs, they can be re-added if needed later. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* remove double semicolonsDong Xu Wang2013-05-121-1/+1
| | | | | Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* target-i386: Move APIC to ICC busIgor Mammedov2013-05-011-6/+12
| | | | | | | | | | | It allows APIC to be hotplugged. * map APIC's mmio at board level if it is present * do not register mmio region for each APIC, since only one is used/mapped Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
* target-i386: Replace MSI_SPACE_SIZE with APIC_SPACE_SIZEIgor Mammedov2013-05-011-1/+1
| | | | | | | | Put APIC_SPACE_SIZE in a public header so that it can be reused elsewhere later. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
* i8259: QOM cleanupsAndreas Färber2013-04-292-11/+13
| | | | | | | | | | | | Eliminate DO_UPCAST() for PICCommonState. Prepares for ISA realizefn. Also give the i8259_common type registration functions unique names while at it. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Andreas Färber <afaerber@suse.de> Message-id: 1367093935-29091-6-git-send-email-afaerber@suse.de Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* ioapic: Replace FROM_SYSBUS() with QOM type castIgor Mammedov2013-04-161-1/+1
| | | | | Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
* arm: fix location of some include filesPeter Maydell2013-04-151-1/+1
| | | | | | | | | | | The recent rearrangement of include files had some minor errors: devices.h is not ARM specific and should not be in arm/ arm.h should be in arm/ Move these two headers to correct this. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* Typo, spelling and grammatical fixesPeter Maydell2013-04-121-1/+1
| | | | | | | Minor fixes to documentation and code comments. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* hw: move private headers to hw/ subdirectories.Paolo Bonzini2013-04-085-4/+142
| | | | | | | Many headers are used only in a single directory. These can be kept in hw/. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* hw: move interrupt controllers to hw/intc/, configure with default-configs/Paolo Bonzini2013-04-0822-0/+9149
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* hw: move target-independent files to subdirectoriesPaolo Bonzini2013-04-087-0/+1491
| | | | | | | This patch tackles all files that are compiled once, moving them to subdirectories of hw/. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* hw: make subdirectories for devicesPaolo Bonzini2013-04-081-0/+0
Prepare the new directory structure. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
OpenPOWER on IntegriCloud