summaryrefslogtreecommitdiff
path: root/hw
AgeCommit message (Collapse)AuthorFilesLines
2011-10-21remove unused functionPaolo Bonzini2-6/+0
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2011-10-20Merge remote-tracking branch 'quintela/migration-pull' into stagingAnthony Liguori2-14/+18
2011-10-20Merge remote-tracking branch 'qemu-kvm-tmp/memory/batch' into stagingAnthony Liguori22-649/+544
2011-10-20Merge remote-tracking branch 'aneesh/for-upstream-6' into stagingAnthony Liguori12-773/+439
Conflicts: trace-events
2011-10-20migration: rename qemu_file_has_error to qemu_file_get_errorJuan Quintela1-1/+1
Now the function returned errno, so it is better the new name. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
2011-10-20migration: change has_error to contain errno valuesJuan Quintela1-1/+1
We normally already have an errno value. When not, abuse EIO. Signed-off-by: Juan Quintela <quintela@redhat.com>
2011-10-20ds1225y: Use stdio instead of QEMUFileJuan Quintela1-12/+16
QEMUFile * is only intended for migration nowadays. Using it for anything else just adds pain and a layer of buffers for no good reason. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
2011-10-17tcx: convert to memory APIAvi Kivity1-67/+85
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17tc63963xb: convert to memory APIAvi Kivity3-51/+25
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17syborg: convert to memory APIAvi Kivity1-3/+5
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17sun4u: convert to memory APIAvi Kivity1-9/+13
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17sun4m: convert to memory APIAvi Kivity1-17/+32
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17strongarm: convert to memory APIAvi Kivity3-106/+75
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17spitz: convert to memory APIAvi Kivity1-30/+18
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17spapr: convert to memory APIAvi Kivity1-3/+6
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17sm501: convert to memory APIAvi Kivity1-73/+70
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17s390-virtio: convert to memory APIAvi Kivity1-3/+5
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17realview: convert to memory APIAvi Kivity1-28/+26
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17r2d: convert to memory APIAvi Kivity1-20/+15
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17ppcr500_mpc8544ds: convert to memory APIAvi Kivity1-2/+3
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17pci: simplify memory region registrationAvi Kivity1-11/+2
The two code paths (for ADDRESS_SPACE_IO and ADDRESS_SPACE_MEM) are identical. Unify them. Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17pxa2xx: convert to memory API (part II)Avi Kivity2-87/+66
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17pxa2xx: convert to memory API (part I)Avi Kivity2-68/+49
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17ppc_prep: convert to memory APIAvi Kivity1-66/+41
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-17ppc_oldworld: convert to memory APIAvi Kivity1-5/+8
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-16monitor: Restrict pic/irq_info to supporting targetsJan Kiszka13-77/+12
This allows to drop various stubs and move the i8359 into hwlib. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-16i8259: Fix coding styleJan Kiszka1-20/+34
No functional changes. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-16i8259: Convert to qdevJan Kiszka1-57/+100
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 GPIO pins. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-16qdev: Add HEX8 propertyJan Kiszka2-0/+32
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-16i8259: Eliminate PicState2Jan Kiszka2-35/+34
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). Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-16i8259: Replace PicState::pics_state with master flagJan Kiszka1-9/+9
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 <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-16i8259: PREP: Replace pic_intack_read with pic_read_irqJan Kiszka3-41/+1
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. So switch ppc_prep to pic_read_irq and drop the now unused PIC code. CC: Andreas Färber <andreas.faerber@web.de> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-16i8259: Clean up pic_ioport_readJan Kiszka1-2/+1
Drop redundant local address variable. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-16i8259: Fix poll commandJan Kiszka1-1/+7
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. This implements the poll command without the help of pic_poll_read which is left untouched as pic_intack_read is still using it. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-16i8259: Switch to per-PIC IRQ updateJan Kiszka1-40/+21
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 <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-16i8259: Clear ELCR on resetJan Kiszka1-5/+10
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. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-16i8259: Update IRQ state after resetJan Kiszka1-2/+1
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. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-16i8259: Reorder intack in pic_read_irqJan Kiszka1-4/+6
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 <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-16i8259: Do not update IRQ output after spurious pic_poll_readJan Kiszka1-1/+0
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 <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-16i8239: Introduce per-PIC output interruptJan Kiszka1-9/+12
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 <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-16i8259: Move pic_set_irq1 after pic_update_irqJan Kiszka1-26/+29
We are about to call the latter from the former. No functional changes. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-16i8259: Drop obsolete prototypesJan Kiszka1-2/+0
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-16i8259: Remove premature inline function attributesJan Kiszka1-3/+3
The compiler is smarter in choosing the right optimization. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-16pc: Fix and clean up PIC-to-APIC IRQ pathJan Kiszka4-12/+12
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 without changing it. The APIC uses this function to decide if a PIC IRQ should be reinjected on apic_update_irq. This reflects better how the real hardware works. The patch fixes some failures of the kvm unit tests apic and eventinj by allowing to enable the proper CPU IRQ deassertion when the guest masks some pending IRQs at PIC level. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-16pc: Convert GSIState::i8259_irq into arrayJan Kiszka2-2/+4
Will be required when we no longer let i8259_init allocate the PIC IRQs but convert that chips to qdev. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-16pc: Generalize ISA IRQs to GSIsJan Kiszka5-31/+42
The ISA bus IRQ range is 0..15. What isa_irq_handler and IsaIrqState are actually dealing with are the Global System Interrupts. Refactor the code to clarify this. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-16pc: Drop useless test from isa_irq_handlerJan Kiszka1-3/+2
IsaIrqState::ioapic is always non-NULL. Probably, the concrete qemu_irq was supposed to be tested, but that's already done by qemu_set_irq. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-16target-xtensa: add Avnet LX60/LX110/LX200 boardsMax Filippov1-0/+233
These boards carry similar hardware: SDRAM (48M for LX110, 64M for LX60, 96M for LX200), 16 Mbyte FLASH, FPGA, 10/100 Mbps Ethernet PHY and 16550 UART. FPGA may be loaded with almost any Tensilica processor. It is also used to implement Ethernet MAC, e.g. OpenCores 10/100 Mbps Ethernet MAC and LED/DIP switches access. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-16hw: add OpenCores 10/100 Mbps Ethernet controllerMax Filippov1-0/+728
This is OpenCores Ethernet MAC + subset of National Semiconductors DP83838C PHY. OpenCores Ethernet MAC project: http://opencores.org/project,ethmac Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-16target-xtensa: rename dc232b board to simMax Filippov1-13/+13
This is to get aligned with the linux name for this machine. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>