summaryrefslogtreecommitdiffstats
path: root/hw/isa-bus.c
Commit message (Collapse)AuthorAgeFilesLines
* Add get_fw_dev_path callback to ISA bus in qdev.Gleb Natapov2010-12-111-0/+16
| | | | | | | Use device ioports to create unique device path. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Keep track of ISA ports ISA device is using in qdev.Gleb Natapov2010-12-111-0/+25
| | | | | | | Store all io ports used by device in ISADevice structure. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Introduce fw_name field to DeviceInfo structure.Gleb Natapov2010-12-111-0/+1
| | | | | | | | | Add "fw_name" to DeviceInfo to use in device path building. In contrast to "name" "fw_name" should refer to functionality device provides instead of particular device model like "name" does. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* isa-bus.c: use hw_error instead of fprintfTristan Gingold2010-12-111-7/+4
| | | | | | | | Minor clean-up in isa-bus.c. Using hw_error is more consistent. There is a difference however: hw_error dumps the cpu state. Signed-off-by: Tristan Gingold <gingold@adacore.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* move two variable declarations out of vl.cPaolo Bonzini2010-04-091-0/+1
| | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* Make isa_create() terminate program on failureMarkus Armbruster2009-10-071-5/+3
| | | | | | | | Callers don't check the return value anyway. Patchworks-ID: 35172 Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* New qdev_init_nofail()Markus Armbruster2009-10-071-1/+1
| | | | | | | | | | | | | | | | | | | Like qdev_init(), but terminate program via hw_error() instead of returning an error value. Use it instead of qdev_init() where terminating the program on failure is okay, either because it's during machine construction, or because we know that failure can't happen. Because relying in the latter is somewhat unclean, and the former is not always obvious, it would be nice to go back to qdev_init() in the not-so-obvious cases, only with proper error handling. I'm leaving that for another day, because it involves making sure that error values are properly checked by all callers. Patchworks-ID: 35168 Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Make qdev_init() destroy the device on failureMarkus Armbruster2009-10-071-1/+0
| | | | | | | | Before, every caller had to do this. Only two actually did. Patchworks-ID: 35170 Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qdev: add isa_create() functionGerd Hoffmann2009-09-101-2/+13
| | | | | | | Like isa_create_simple, but doesn't call qdev_init, so one can set properties after creating and before initializing the device. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* qdev: tag isabus-bridge as no-userGerd Hoffmann2009-09-101-0/+1
| | | | | | isabus-bridge isn't supposed to be added via -device ... Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* qdev: simplify isa irq assignmentsGerd Hoffmann2009-09-101-27/+11
| | | | | | | | | isa-bus owns the isa irqs now, so it can hand them out directly. There is no need for the separate isa_connect_irqs step, drop it. Also hard-code isa interrupts which can't be configured anyway. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* qdev: drop iobase properties from isa busGerd Hoffmann2009-09-101-9/+1
| | | | | | | | | | Lot of ISA devices work at fixed addresses, so having iobase as bus property doesn't make much sense. Devices which can have different iobases will get a device property. Also simply hard-code stuff which can't be configured anyway. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* Suppress kraxelismsBlue Swirl2009-08-281-2/+4
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* qdev: add return value to init() callbacks.Gerd Hoffmann2009-08-271-3/+5
| | | | | | | | | | | | | | | | | | Sorry folks, but it has to be. One more of these invasive qdev patches. We have a serious design bug in the qdev interface: device init callbacks can't signal failure because the init() callback has no return value. This patch fixes it. We have already one case in-tree where this is needed: Try -device virtio-blk-pci (without drive= specified) and watch qemu segfault. This patch fixes it. With usb+scsi being converted to qdev we'll get more devices where the init callback can fail for various reasons. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Move isa_connect_irq calls into isa_create_simpleGerd Hoffmann2009-08-271-1/+6
| | | | | | | | Now with isa-bus maintaining the isa irqs we can move the isa_connect_irq() calls into isa_create_simple(). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Add isa_reserve_irq().Jes Sorensen2009-08-271-0/+21
| | | | | | | | | | | | | | | | | | | Introduce isa_reserve_irq() which marks an irq reserved and returns the appropriate qemu_irq entry from the i8259 table. isa_reserve_irq() is a temporary interface to be used to allocate ISA IRQs for devices which have not yet been converted to qdev, and for special cases which are not suited for qdev conversions, such as the 'ferr'. This patch goes on top of Gerd Hoffmann's which makes isa-bus.c own the ISA irq table. [ added isa-bus.o to some targets to fix build failures -- kraxel ] Signed-off-by: Jes Sorensen <jes@sgi.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* isa bus irq changes and fixes.Gerd Hoffmann2009-08-271-7/+63
| | | | | | | | | | | | | | | Changes: (1) make isa-bus maintain isa irqs, complain when allocating already taken irqs. (2) note that (1) works only for isa devices converted to qdev already (floppy and ps2/kbd/mouse right now), so more work is needed to make this really useful. (3) split floppy init into isa and sysbus versions. (4) add sysbus->isa bridge & fix -M isapc breakage. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qdev/prop: convert isa-bus to helper macros.Gerd Hoffmann2009-08-241-12/+3
| | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qdev/isa: add isa bus support to qdev.Gerd Hoffmann2009-08-101-0/+102
Pretty simple and straigt forward. IRQs modeled simliar to sysbus. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Message-Id:
OpenPOWER on IntegriCloud