summaryrefslogtreecommitdiffstats
path: root/hw/sun4m.c
Commit message (Collapse)AuthorAgeFilesLines
* pcnet: use qdev properties for configuration.Gerd Hoffmann2009-10-271-1/+1
| | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* rom loader: fix sparc -kernel boot.Gerd Hoffmann2009-10-121-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | Changes: (1) register pstrcpy_targphys() in rom list, it is used for kernel command lines by a number of architectures. (2) add rom_ptr() function to get a pointer for applying changes to loaded images. Needed for example to tell the linux kernel where it finds the initrd image by updating the header. (3) make sparc use rom_ptr for initrd setup. booting sparc-test works now, and 'info roms' shows this: (qemu) info roms addr=0000000000000000 size=0x2a3828 mem=ram name="phdr #0: vmlinux-2.6.11+tcx" addr=00000000007ff000 size=0x00000e mem=ram name="cmdline" addr=0000000000800000 size=0x400000 mem=ram name="/root/qemu-test/sparc-test/linux.img" addr=0000000070000000 size=0x0e4000 mem=rom name="phdr #0: /home/kraxel/projects/qemu/build-zfull/pc-bios/openbios-sparc32" reboot via 'system_reset' works too. Patchworks-ID: 35262 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* New qdev_init_nofail()Markus Armbruster2009-10-071-14/+14
| | | | | | | | | | | | | | | | | | | 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>
* floppy: add drive properties.Gerd Hoffmann2009-10-051-12/+4
| | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Revert "Get rid of _t suffix"Anthony Liguori2009-10-011-59/+59
| | | | | | | | | | | | 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>
* Get rid of _t suffixmalc2009-10-011-59/+59
| | | | | | | Some not so obvious bits, slirp and Xen were left alone for the time being. Signed-off-by: malc <av1474@comtv.ru>
* Compile loader only onceBlue Swirl2009-09-201-3/+14
| | | | | | | | | | | | | 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>
* qdev: add return value to init() callbacks.Gerd Hoffmann2009-08-271-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>
* Sparc32: improve interrupt handlingBlue Swirl2009-08-251-5/+2
| | | | | | | | | | | | | | | | | Level 15 interrupts are broadcast to all CPUs, each CPU can clear the interrupt using the local Clear Pending register. Update intbit_to_level table. Don't try to raise level 0 interrupts. Calculate pending interrupts based on the separate inputs from master register. Setting or resetting the pending level isn't correct because of overlap of levels. Level 14 is always used for CPU timer interrupts, remove the property. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Sparc32: fix monitor commands 'info pic' and 'info irq'Blue Swirl2009-08-231-8/+7
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* qdev/prop: convert sun4m.c to helper macros.Gerd Hoffmann2009-08-101-6/+2
| | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Message-Id:
* Use qemu_irq for system_powerdownBlue Swirl2009-08-091-8/+1
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Sparc32: use qemu_irq for system_powerdownBlue Swirl2009-08-091-18/+16
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Sparc32: move sparc32_dma init to sun4m.cBlue Swirl2009-08-081-19/+40
| | | | | | Also connect ESP and Lance reset signals to DMA. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Sparc32: remove VRAM and NVRAM sizes from hwdefBlue Swirl2009-08-081-36/+6
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Sparc32: remove IRQ numbers from hwdefBlue Swirl2009-08-081-135/+25
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Sparc32: move intbit_to_level table back to slavio_intctl.cBlue Swirl2009-08-081-41/+0
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Sparc32: move device instantiation to sun4m.cBlue Swirl2009-08-081-0/+217
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* kill drives_tableGerd Hoffmann2009-07-271-8/+8
| | | | | | | | | | | | | | 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>
* Sparc32: convert Sun4c interrupt controller to qdevBlue Swirl2009-07-211-3/+8
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Sparc32: convert SBI to qdevBlue Swirl2009-07-211-3/+11
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Sparc32/64: use 64 bit type for memory sizeBlue Swirl2009-07-211-2/+2
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Sparc32: Fix lanceBlue Swirl2009-07-211-0/+1
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Fix sparc-softmmu breakage by ee6847d19be16c789b8bd4e553b7cd6701ba1245Blue Swirl2009-07-171-1/+1
| | | | | | | Move the qdev_init(dev); call after the setting of d->size. Thanks to Filip Navara. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* qdev: rework device properties.Gerd Hoffmann2009-07-161-13/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is a major overhaul of the device properties. The properties are saved directly in the device state struct now, the linked list of property values is gone. Advantages: * We don't have to maintain the list with the property values. * The value in the property list and the value actually used by the device can't go out of sync any more (used to happen for the pci.devfn == -1 case) because there is only one place where the value is stored. * A record describing the property is required now, you can't set random properties any more. There are bus-specific and device-specific properties. The former should be used for properties common to all bus drivers. Typical use case is bus addressing, i.e. pci.devfn and i2c.address. Properties have a PropertyInfo struct attached with name, size and function pointers to parse and print properties. A few common property types have PropertyInfos defined in qdev-properties.c. Drivers are free to implement their own very special property parsers if needed. Properties can have default values. If unset they are zero-filled. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Sparc32: convert slavio interrupt controller to qdevBlue Swirl2009-07-161-7/+14
| | | | | | Also increase QDEV_MAX_IRQ. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Sparc32: refactor CPU initBlue Swirl2009-07-161-45/+30
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Sparc32: convert memory to qdevBlue Swirl2009-07-161-36/+56
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Sparc32: convert boot prom to qdevBlue Swirl2009-07-161-87/+67
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Sparc32: convert cs4231 to qdevBlue Swirl2009-07-161-2/+4
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Sparc32: convert sparc32_dma to qdevBlue Swirl2009-07-151-9/+9
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Sparc32: convert slavio_misc to qdevBlue Swirl2009-07-131-9/+11
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Sparc32: convert idreg to qdevBlue Swirl2009-07-131-8/+42
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Revert "Introduce reset notifier order"Jan Kiszka2009-06-291-5/+5
| | | | | | | | | 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>
* Use relative path for biosPaul Brook2009-05-301-18/+39
| | | | | | | Look for bios and other support files relative to qemu binary, rather than a hardcoded prefix. Signed-off-by: Paul Brook <paul@codesourcery.com>
* Remove qdev irq sink handlingPaul Brook2009-05-261-1/+1
| | | | | | | We have both IRQ sinks and GPIO inputs. These are in principle exactly the same thing, so remove the former. Signed-off-by: Paul Brook <paul@codesourcery.com>
* Introduce reset notifier orderJan Kiszka2009-05-221-5/+5
| | | | | | | | | | | | | | | 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>
* Introduce is_default field for QEMUMachineAnthony Liguori2009-05-211-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>
* Refactor how display drivers are selectedAnthony Liguori2009-05-211-3/+3
| | | | | | | | | | | My previous commit, f92f8afebe, broke -vnc (spotted by Glauber Costa). This is because it's necessary to tell when the no special display parameters have been passed and default to SDL or VNC appropriately. This refactors the display selection logic to be less complicated which has the effect of fixing the regression mentioned above. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Convert machine registration to use module init functionsAnthony Liguori2009-05-211-12/+30
| | | | | | This cleans up quite a lot of #ifdefs, extern variables, and other ugliness. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* ESP SCSI qdev conversionPaul Brook2009-05-141-35/+12
| | | | Signed-off-by: Paul Brook <paul@codesourcery.com>
* PCI network qdev conversionPaul Brook2009-05-141-1/+19
| | | | Signed-off-by: Paul Brook <paul@codesourcery.com>
* Replace gcc variadic macro extension with C99 versionBlue Swirl2009-05-131-3/+3
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Remove vga_ram_sizePaul Brook2009-05-131-12/+12
| | | | | | | | | | 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>
* Remove redundant ram_require machine properly.pbrook2009-04-111-15/+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
* Cleanup SPARC/TCX framebuffer allocation.pbrook2009-04-091-12/+9
| | | | | | | Signed-off-by: Paul Brook <paul@codesourcery.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7059 c046a42c-6fe2-441c-8c8c-71466251a162
* Remove nodisk_ok machine feature (Jan Kiszka)aliguori2009-03-281-12/+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
* Use firmware configuration instead of NVRAM (initial patch by Aurelien Jarno)blueswir12009-03-081-57/+41
| | | | | | | | | | 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
* monitor: Rework API (Jan Kiszka)aliguori2009-03-051-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor the monitor API and prepare it for decoupled terminals: term_print functions are renamed to monitor_* and all monitor services gain a new parameter (mon) that will once refer to the monitor instance the output is supposed to appear on. However, the argument remains unused for now. All monitor command callbacks are also extended by a mon parameter so that command handlers are able to pass an appropriate reference to monitor output services. For the case that monitor outputs so far happen without clearly identifiable context, the global variable cur_mon is introduced that shall once provide a pointer either to the current active monitor (while processing commands) or to the default one. On the mid or long term, those use case will be obsoleted so that this variable can be removed again. Due to the broad usage of the monitor interface, this patch mostly deals with converting users of the monitor API. A few of them are already extended to pass 'mon' from the command handler further down to internal functions that invoke monitor_printf. At this chance, monitor-related prototypes are moved from console.h to a new monitor.h. The same is done for the readline API. 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@6711 c046a42c-6fe2-441c-8c8c-71466251a162
* graphical_console_init change (Stefano Stabellini)aliguori2009-01-161-30/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
OpenPOWER on IntegriCloud