aboutsummaryrefslogtreecommitdiffstats
path: root/hw/sun4u.c
AgeCommit message (Collapse)AuthorFilesLines
2009-10-05Fix pci_add nic not to exit on bad modelMarkus Armbruster1-1/+1
Monitor command "pci_add ADDR nic model=MODEL" uses pci_nic_init() to create the NIC. When MODEL is unknown or "?", this prints to stderr and terminates the program. Change pci_nic_init() not to treat "?" specially, and to return NULL on failure. Switch uses during startup to new convenience wrapper pci_nic_init_nofail(), which behaves just like pci_nic_init() used to do. Bonus bug fix: we now check for qdev_init() failing there. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-05serial: convert isa to qdevGerd Hoffmann1-5/+1
Everything using standard isa I/O ports and IRQ windup is considerd being an actual isa device. That are all serial_init() users except mips_mipssim() which seems to have a non-standard IRQ windup. baud rate is fixed at 115200 now as no caller passed in something else. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-05floppy: add drive properties.Gerd Hoffmann1-4/+2
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-05parallel: convert isa to qdevGerd Hoffmann1-2/+1
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-01Revert "Get rid of _t suffix"Anthony Liguori1-12/+12
In the very least, a change like this requires discussion on the list. The naming convention is goofy and it causes a massive merge problem. Something like this _must_ be presented on the list first so people can provide input and cope with it. This reverts commit 99a0949b720a0936da2052cb9a46db04ffc6db29. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-01Get rid of _t suffixmalc1-12/+12
Some not so obvious bits, slirp and Xen were left alone for the time being. Signed-off-by: malc <av1474@comtv.ru>
2009-09-20Compile loader only onceBlue Swirl1-3/+15
Callers must pass ELF machine, byte swapping and symbol LSB clearing information to ELF loader. A.out loader needs page size information, pass that too as a parameter. Extract prototypes to a separate file. Move loader.[ch] and elf_ops.h under hw. Adjust callers. Also use target_phys_addr_t instead of target_ulong for addresses: loader addresses aren't virtual. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-14Add an ISA bus version of m48t59Blue Swirl1-2/+1
Many thanks to Gerd Hoffmann for finding and fixing a bug in the initial version. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-10qdev: simplify isa irq assignmentsGerd Hoffmann1-1/+1
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>
2009-09-10qdev: drop iobase properties from isa busGerd Hoffmann1-2/+2
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>
2009-09-06Sparc64: use ISA bus for i8042Blue Swirl1-2/+2
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-06Sparc64: remove unused variablesBlue Swirl1-7/+1
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-04ide: pass down DriveInfo instead of BlockDriverStateGerd Hoffmann1-3/+2
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-28Fix Sparc64 breakage: add dummy ISA irqsBlue Swirl1-0/+8
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-08-27ide: split away ide-pci.cGerd Hoffmann1-0/+1
create ide-pci.c and place pci bus support there. only build ide-pci support for platforms using it. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Fix build (merge with isa mmio split)
2009-08-27qdev: add return value to init() callbacks.Gerd Hoffmann1-3/+6
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>
2009-08-27isa bus irq changes and fixes.Gerd Hoffmann1-1/+1
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>
2009-08-13Unbreak Sparc64Blue Swirl1-0/+2
EBus is a sort of ISA bus. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-08-10qdev/prop: convert sun4u.c to helper macros.Gerd Hoffmann1-6/+2
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Message-Id:
2009-08-09Use qemu_irq for system_powerdownBlue Swirl1-4/+0
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-08-08Sparc64: configure screen size from QEMU command line optionsBlue Swirl1-0/+8
Use the FW_CFG interface to send user requested screen size and depth to OpenBIOS like 7f1aec5f93382eef75920899f4065613aeaf02a2 for ppc_oldworld. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-07-27kill drives_tableGerd Hoffmann1-12/+6
First step cleaning up the drives handling. This one does nothing but removing drives_table[], still it became seriously big. drive_get_index() is gone and is replaced by drives_get() which hands out DriveInfo pointers instead of a table index. This needs adaption in *tons* of places all over. The drives are now maintained as linked list. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-21Sparc32/64: use 64 bit type for memory sizeBlue Swirl1-2/+2
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-07-21Sparc64: refactor kernel initBlue Swirl1-42/+55
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-07-21Sparc64: refactor CPU initBlue Swirl1-19/+27
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-07-21Sparc64: convert memory to qdevBlue Swirl1-4/+59
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-07-21Sparc64: convert boot prom to qdevBlue Swirl1-29/+62
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-07-12Sparc64: convert ebus to qdevBlue Swirl1-2/+18
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-07-12sparc64: really initialize irqIgor Kovalenko1-2/+3
Allocate irq just before passing it to pci bridge initialization and actually use it to initialize pci bridge. Signed-off-by: igor.v.kovalenko@gmail.com -- Kind regards, Igor V. Kovalenko
2009-06-29Revert "Introduce reset notifier order"Jan Kiszka1-1/+1
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 <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-23sparc64 follow pci_nic_init changeIgor V. Kovalenko1-1/+1
sun4u.c: correct pci_nic_init arguments following commit 5607c38820366954c38dd702e979499486057481 Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
2009-06-16Rename pci_register_io_region() to pci_register_bar()Avi Kivity1-2/+2
This function is used to manage a PCI BAR, so make the more generic pci_register_io_region() available to other uses. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-30Use relative path for biosPaul Brook1-10/+16
Look for bios and other support files relative to qemu binary, rather than a hardcoded prefix. Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-22Introduce reset notifier orderJan Kiszka1-1/+1
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. Note: At least for x86, the existing users seem to assume that handlers are called in their registration order. Therefore, the patch preserves this property. If someone feels bored, (s)he could try to identify this dependency and express it properly on callback registration. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-21Introduce is_default field for QEMUMachineAnthony Liguori1-0/+1
f80f9ec changed the order that machines are registered which had the effect of changing the default machine. This changeset introduces a new is_default field so that machine types can declare that they are the default for an architecture. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-21Convert machine registration to use module init functionsAnthony Liguori1-3/+12
This cleans up quite a lot of #ifdefs, extern variables, and other ugliness. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-13Replace gcc variadic macro extension with C99 versionBlue Swirl1-3/+3
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-05-13Remove vga_ram_sizePaul Brook1-8/+8
The vga_ram_size argument to machine init functions always has the same value, and is ignored by many machines (including SPARC32 which has an obsolete ifdef for VGA_RAM_SIZE). Remove it and push VGA_RAM_SIZE into vga_int.h. Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-03use PCI_HEADER_TYPE.Isaku Yamahata1-1/+1
use symbolic value instead of 0x0e and related value. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2009-04-11Remove redundant ram_require machine properly.pbrook1-3/+0
Signed-off-by: Paul Brook <paul@codesourcery.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7090 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-10Clean up VGA ram allocation.pbrook1-5/+2
Signed-off-by: Paul Brook <paul@codesourcery.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7063 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-28Remove nodisk_ok machine feature (Jan Kiszka)aliguori1-3/+0
All archs have some kind of firmware to load and can be fine with it already. So there is not much use in enforcing the presence of a disk. If the system setup requires one, the user will notice it anyway once the firmware/bios fails to boot from it. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6899 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-08Use firmware configuration instead of NVRAM (initial patch by Aurelien Jarno)blueswir11-60/+15
Use firmware configuration device for boot device, kernel, initrd and kernel command line parameters on PPC, Sparc32 and Sparc64. Update OpenBIOS images to r479 which supports the change. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6777 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-07Fix sparc64-softmmu breakage from r6711blueswir11-2/+2
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6733 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-21Reload ptimers on resetblueswir11-3/+3
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6635 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-01Add and use #defines for PCI device classesblueswir11-2/+1
This patch adds and uses #defines for PCI device classes and subclases, using a new pci_config_set_class() function, similar to the recently added pci_config_set_vendor_id() and pci_config_set_device_id(). Change since v1: fixed compilation of hw/sun4u.c Signed-off-by: Stuart Brady <stuart.brady@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6491 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-26Define PCI vendor and device IDs in pci.h (Stuart Brady)aliguori1-4/+2
This patch defines PCI vendor and device IDs in pci.h (matching those from Linux's pci_ids.h), and uses those definitions where appropriate. Change from v1: Introduces pci_config_set_vendor_id() / pci_config_set_device_id() accessors as suggested by Anthony Liguori. Signed-off-by: Stuart Brady <stuart.brady@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6442 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-17Switch to CMD646 IDEblueswir11-2/+2
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6361 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-16graphical_console_init change (Stefano Stabellini)aliguori1-8/+8
Patch 5/7 This patch changes the graphical_console_init function to return an allocated DisplayState instead of a QEMUConsole. This patch contains just the graphical_console_init change and few other modifications mainly in console.c and vl.c. It was necessary to move the display frontends (e.g. sdl and vnc) initialization after machine->init in vl.c. This patch does *not* include any required changes to any device, these changes come with the following patches. Patch 6/7 This patch changes the QEMUMachine init functions not to take a DisplayState as an argument because is not needed any more; In few places the graphic hardware initialization function was called only if DisplayState was not NULL, now they are always called. Apart from these cases, the rest are all mechanical substitutions. Patch 7/7 This patch updates the graphic device code to use the new graphical_console_init function. As for the previous patch, in few places graphical_console_init was called only if DisplayState was not NULL, now it is always called. Apart from these cases, the rest are all mechanical substitutions. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6344 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-13Make pci_nic_init() use qemu_setup_nic_model() (Mark McLoughlin)aliguori1-5/+2
Add a table of PCI NIC models to pass to qemu_setup_nic_model(). While we're at it, also add a corresponding table of NIC init functions. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6287 c046a42c-6fe2-441c-8c8c-71466251a162