summaryrefslogtreecommitdiffstats
path: root/hw/ppc_prep.c
Commit message (Collapse)AuthorAgeFilesLines
* prep: Move PReP machine to hw/ppc/Andreas Färber2013-01-301-680/+0
| | | | Signed-off-by: Andreas Färber <andreas.faerber@web.de>
* Make default boot order machine specificAvik Sil2013-01-151-0/+1
| | | | | | | | | | | | | | This patch makes default boot order machine specific instead of set globally. The default boot order can be set per machine in QEMUMachine boot_order. This also allows a machine to receive a NULL boot order when -boot isn't used and take an appropriate action accordingly. This helps machine boots from the devices as set in guest's non-volatile memory location in case no boot order is provided by the user. Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Merge branch 'master' of git://git.qemu.org/qemu into prep-upAndreas Färber2013-01-101-33/+33
|\ | | | | | | | | | | | | | | Conflicts: hw/Makefile.objs hw/ppc_prep.c Signed-off-by: Andreas Färber <andreas.faerber@web.de>
| * softmmu: move include files to include/sysemu/Paolo Bonzini2012-12-191-3/+3
| | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * misc: move include files to include/qemu/Paolo Bonzini2012-12-191-1/+1
| | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * exec: move include files to include/exec/Paolo Bonzini2012-12-191-1/+1
| | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * net: reorganize headersPaolo Bonzini2012-12-191-1/+1
| | | | | | | | | | | | | | | | | | Move public headers to include/net, and leave private headers in net/. Put the virtio headers in include/net/tap.h, removing the multiple copies that existed. Leave include/net/tap.h as the interface for NICs, and net/tap_int.h as the interface for OS-specific parts of the tap backend. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * pci: update all users to look in pci/Michael S. Tsirkin2012-12-171-2/+2
| | | | | | | | | | | | update all users so we can remove the makefile hack. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * Add USB option in machine optionszhlcindy@gmail.com2012-10-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When -usb option is used, global varible usb_enabled is set. And all the plaform will create one USB controller according to this variable. In fact, global varibles make code hard to read. So this patch is to remove global variable usb_enabled and add USB option in machine options. All the plaforms will get USB option value from machine options. USB option of machine options will be set either by: * -usb * -machine type=pseries,usb=on Both these ways can work now. They both set USB option in machine options. In the future, the first way will be removed. Signed-off-by: Li Zhang <zhlcindy@linux.vnet.ibm.com> Acked-by: Alexander Graf <agraf@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * Rename target_phys_addr_t to hwaddrAvi Kivity2012-10-231-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | target_phys_addr_t is unwieldly, violates the C standard (_t suffixes are reserved) and its purpose doesn't match the name (most target_phys_addr_t addresses are not target specific). Replace it with a finger-friendly, standards conformant hwaddr. Outstanding patchsets can be fixed up with the command git rebase -i --exec 'find -name "*.[ch]" | xargs s/target_phys_addr_t/hwaddr/g' origin Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
| * serial: split serial.cGerd Hoffmann2012-10-221-0/+1
| | | | | | | | | | | | | | | | | | | | Split serial.c into serial.c, serial.h and serial-isa.c. While being at creating a serial.h header file move the serial prototypes from pc.h to the new serial.h. The latter leads to s/pc.h/serial.h/ in tons of boards which just want the serial bits from pc.h Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
| * create struct for machine initialization argumentsEduardo Habkost2012-10-201-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should help us to: - More easily add or remove machine initialization arguments without having to change every single machine init function; - More easily make mechanical changes involving the machine init functions in the future; - Let machine initialization forward the init arguments to other functions more easily. This change was half-mechanical process: first the struct was added with the local ram_size, boot_device, kernel_*, initrd_*, and cpu_model local variable initialization to all functions. Then the compiler helped me locate the local variables that are unused, so they could be removed. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
| * ppc/prep: use the new pci_vga_init() functionAurelien Jarno2012-10-061-2/+1
| | | | | | | | | | | | | | As a bonus it allows new vga card types (including none). Acked-by: Andreas Färber <andreas.faerber@web.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
| * vga: rename pci_vga_init() into pci_std_vga_init()Aurelien Jarno2012-10-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This better explains what is this function about. Adjust all callers. Cc: Alexander Graf <agraf@suse.de> Cc: Andreas Färber <andreas.faerber@web.de> Cc: David Gibson <david@gibson.dropbear.id.au> Cc: Anthony Liguori <aliguori@us.ibm.com> Acked-by: Richard Henderson <rth@twiddle.net> Acked-by: Blue Swirl <blauwirbel@gmail.com> Acked-by: Andreas Färber <andreas.faerber@web.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
| * pci: Derive PCI host bridges from TYPE_PCI_HOST_BRIDGEAndreas Färber2012-08-221-3/+1
| | | | | | | | | | | | | | Use PCIHostState and PCI_HOST_BRIDGE() where appropriate. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
| * Add one new file vga-pci.h and cleanup on all platformszhlcindy@gmail.com2012-08-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Functions pci_vga_init() and pci_cirrus_vga_init() are declared in pc.h. That prevents other platforms (e.g. sPAPR) to use them. This patch is to create one new file vga-pci.h and move the declarations to vga-pci.h, so that they can be shared by all platforms. This patch also cleans up on all platforms. Signed-off-by: Li Zhang <zhlcindy@linux.vnet.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
* | prep: Use pc87312 device instead of collection of random ISA devicesHervé Poussineau2012-08-151-32/+7
|/ | | | | | | | | | | | We can't however replace the built-in IDE controller, as the one in pc87312 is only single-channel and can use only IRQ 14. Therefore the pc87312's IDE function gets disabled via the config property. PReP emulation also gains a parallel port emulation this way. Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> [AF: Use TYPE_PC87312 constant, add to ppc64-softmmu and to MAINTAINERS] Signed-off-by: Andreas Färber <andreas.faerber@web.de>
* ppc_prep: Pass PowerPCCPU to ppc_prep_reset()Andreas Färber2012-06-041-3/+3
| | | | | | | Allows us to use cpu_reset() in place of cpu_state_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Alexander Graf <agraf@suse.de>
* ppc_prep: Use cpu_ppc_init() to obtain PowerPCCPUAndreas Färber2012-06-041-2/+5
| | | | | | | Needed for ppc_prep_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Alexander Graf <agraf@suse.de>
* prep: Move int-ack register from PReP to Raven PCI emulationHervé Poussineau2012-04-301-36/+0
| | | | | | | | | Register is one byte-wide (as per specification), so there is no need to specify endianness. Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> [AF: Limit access validity to size 1] Signed-off-by: Andreas Färber <andreas.faerber@web.de>
* prep: Initialize PC speakerHervé Poussineau2012-04-281-0/+4
| | | | | | | | Speaker init has been added in 506b7ddf889312659b36c667f7ae17bc9e909418, but audio subsystem init was missing. Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Andreas Färber <andreas.faerber@web.de>
* qdev: put all devices under /machinePaolo Bonzini2012-04-021-1/+1
| | | | | | | Avoid cluttering too much the QOM root. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qdev: add children before qdev_initPaolo Bonzini2012-04-021-1/+1
| | | | | | | | | | | | | | | | We want the composition tree to to be in order by the time we call qdev_init, so that a single set of the toplevel realize property can propagate all the way down the composition tree. This is not the case so far. Unfortunately, this is incompatible with calling qdev_init in the constructor wrappers for devices, so for now we need to unattach some devices that are created through those wrappers. This will be fixed by removing qdev_init and instead setting the toplevel realize property after machine init. Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* ppc hw/: Don't use CPUStateAndreas Färber2012-03-141-3/+3
| | | | | | | | | | Scripted conversion: for file in hw/ppc*.[hc] hw/mpc8544_guts.c hw/spapr*.[hc] hw/virtex_ml507.c hw/xics.c; do sed -i "s/CPUState/CPUPPCState/g" $file done Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Anthony Liguori <aliguori@us.ibm.com>
* Rename cpu_reset() to cpu_state_reset()Andreas Färber2012-03-141-1/+8
| | | | | | | | | | Frees the identifier cpu_reset for QOM CPUs (manual rename). Don't hide the parameter type behind explicit casts, use static functions with strongly typed argument to indirect. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
* usb: zap hw/ush-{ohic,uhci}.h + init wrappersGerd Hoffmann2012-03-131-2/+1
| | | | | | | | | Remove the uhci and ohci init wrappers, which all wrapped a pci_create_simple() one-liner. Switch callsites to call pci_create_simple directly. Remove the header files where the wrappers where declared. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* qom: move properties from qdev to objectAnthony Liguori2012-02-031-1/+1
| | | | | | | | This is mostly code movement although not entirely. This makes properties part of the Object base class which means that we can now start using Object in a meaningful way outside of qdev. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qdev: register all types natively through QEMU Object ModelAnthony Liguori2012-02-031-1/+1
| | | | | | | | | | | | | | | | | | | | | This was done in a mostly automated fashion. I did it in three steps and then rebased it into a single step which avoids repeatedly touching every file in the tree. The first step was a sed-based addition of the parent type to the subclass registration functions. The second step was another sed-based removal of subclass registration functions while also adding virtual functions from the base class into a class_init function as appropriate. Finally, a python script was used to convert the DeviceInfo structures and qdev_register_subclass functions to TypeInfo structures, class_init functions, and type_register_static calls. We are almost fully converted to QOM after this commit. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* prep: Use i82378 PCI->ISA bridge for 'prep' machineAndreas Färber2012-01-201-48/+13
| | | | | | | | | | | | | | | Speaker I/O, ISA bus, i8259 PIC, RTC and DMA are no longer set up individually by the machine. Effectively, no-op speaker I/O is replaced by pcspk; PIT and i82374 DMA are introduced. Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Remove related dead, alternative code. Wire up PCI host bridge IRQs via GPIO-in IRQs of PCI->ISA bridge. Signed-off-by: Andreas Färber <andreas.faerber@web.de> Cc: Alexander Graf <agraf@suse.de> Cc: Jan Kiszka <jan.kiszka@siemens.com>
* prep: qdev'ify Raven host bridge (SysBus)Andreas Färber2012-01-201-2/+21
| | | | | | | | | | | | | | | Drop pci_prep_init() in favor of extended device state. Inspired by patches from Hervé and Alex. Assign the 4 IRQs from the board after device instantiation. This moves the knowledge out of prep_pci and allows for future machines with different IRQ wiring (IBM 40P). Suggested by Alex. Signed-off-by: Andreas Färber <andreas.faerber@web.de> Reviewed-by: Alexander Graf <agraf@suse.de> Cc: Hervé Poussineau <hpoussin@reactos.org> Cc: Michael S. Tsirkin <mst@redhat.com> Cc: Anthony Liguori <aliguori@us.ibm.com>
* prep: Use ISA m48t59Andreas Färber2012-01-201-1/+1
| | | | | | | | | | | | This simplifies the code later when the i8259 moves to the i82378 PCI->ISA bridge and happens to fix a SysBus m48t59 io_base issue introduced by commit 0fb56ffc5edd66f12ccfc0d71af5f9c79c0a2612 (m48t59: drop obsolete address base arithmetic). Suggested by Hervé and Jan. Signed-off-by: Andreas Färber <andreas.faerber@web.de> Cc: Hervé Poussineau <hpoussin@reactos.org> Cc: Jan Kiszka <jan.kiszka@siemens.com> Cc: Blue Swirl <blauwirbel@gmail.com>
* prep: Fix offset of BIOS MemoryRegionAndreas Färber2012-01-201-2/+2
| | | | | | | | | | | | | | | Since 0c90c52fab5ea92d7f12b29bfe26a7cd75d9efcb (ppc_prep: convert to memory API) OHW was "Trying to execute code outside RAM or ROM at 0xfff00700". The BIOS MemoryRegion is created with a fixed size of 1 MiB. Ensure that the full size can be accessed since the exception vectors are located at 0xfff00000 and the BIOS may want to use them. It thereby no longer depends on the actual BIOS binary size. Signed-off-by: Andreas Färber <afaerber@suse.de> Cc: Avi Kivity <avi@redhat.com> Cc: Alexander Graf <agraf@suse.de>
* vmstate, memory: decouple vmstate from memory APIAvi Kivity2012-01-041-2/+4
| | | | | | | | | | | | | | Currently creating a memory region automatically registers it for live migration. This differs from other state (which is enumerated in a VMStateDescription structure) and ties the live migration code into the memory core. Decouple the two by introducing a separate API, vmstate_register_ram(), for registering a RAM block for migration. Currently the same implementation is reused, but later it can be moved into a separate list, and registrations can be moved to VMStateDescription blocks. Signed-off-by: Avi Kivity <avi@redhat.com>
* isa: give ISABus/ISADevice to isa_create(), isa_bus_irqs() and isa_get_irq() ↵Hervé Poussineau2011-12-201-9/+11
| | | | | | | | | functions NULL is a valid bus/device, so there is no change in behaviour. Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* ppc_prep: convert to memory APIAvi Kivity2011-10-171-66/+41
| | | | Signed-off-by: Avi Kivity <avi@redhat.com>
* i8259: PREP: Replace pic_intack_read with pic_read_irqJan Kiszka2011-10-161-1/+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>
* ppc_prep: initialize i8259 after the ISA busAvi Kivity2011-09-251-2/+2
| | | | | | Succeeding i8259 conversion to ISA requires this. Signed-off-by: Avi Kivity <avi@redhat.com>
* isa: Pass i/o address space to isa_bus_newRichard Henderson2011-09-251-1/+1
| | | | | | | Not used yet, but at least we're provided with the correct region. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
* Use glib memory allocation and free functionsAnthony Liguori2011-08-201-3/+3
| | | | | | qemu_malloc/qemu_free no longer exist after this commit. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* pci: pass I/O address space to new PCI busAvi Kivity2011-08-081-1/+1
| | | | | | | | | This lets us register BARs in the I/O address space. Reviewed-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* pci: pass address space to pci bus when createdAvi Kivity2011-07-291-1/+2
| | | | | | | | | This is now done sloppily, via get_system_memory(). Eventually callers will be converted to stop using that. Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* ide: consolidate drive_get(IF_IDE)Isaku Yamahata2011-04-071-9/+1
| | | | | | | factor out ide initialization to call drive_get(IF_IDE) Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* change all other clock references to use nanosecond resolution accessorsPaolo Bonzini2011-03-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | This was done with: sed -i 's/qemu_get_clock\>/qemu_get_clock_ns/' \ $(git grep -l 'qemu_get_clock\>' ) sed -i 's/qemu_new_timer\>/qemu_new_timer_ns/' \ $(git grep -l 'qemu_new_timer\>' ) after checking that get_clock and new_timer never occur twice on the same line. There were no missed occurrences; however, even if there had been, they would have been caught by the compiler. There was exactly one false positive in qemu_run_timers: - current_time = qemu_get_clock (clock); + current_time = qemu_get_clock_ns (clock); which is of course not in this patch. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* Revert "prep: Disable second IDE channel, as long as ISA IDE emulation ↵Aurelien Jarno2011-02-211-1/+1
| | | | | | doesn't support same irq for both channels" This reverts commit 491e2a338fdf8310c84f6ebaed1683a871a0700e.
* i8254: convert to qdevBlue Swirl2011-02-201-2/+2
| | | | | | Convert to qdev. Don't expose PITState. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* prep: Disable second IDE channel, as long as ISA IDE emulation doesn't ↵Hervé Poussineau2011-01-291-1/+1
| | | | | | | | support same irq for both channels Cc: Andreas Färber <andreas.faerber@web.de> Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* prep: Remove bogus BIOS size checkAndreas Färber2011-01-291-3/+0
| | | | | | | | | | | | | | r3480 added this check to account for the entry vector 0xfff00100 to be available for CPUs that need it. Today however, the NIP is not yet initialized at this point (zero), so the check always triggers. Moreover, BIOS size check is already done previously, so this part can be removed too. Cc: Alexander Graf <agraf@suse.de> Signed-off-by: Andreas Färber <andreas.faerber@web.de> Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* prep: Declare as little endianAlexander Graf2010-12-111-35/+3
| | | | | | | | This patch replaces explicit bswaps with endianness hints to the mmio layer. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Add endianness as io mem parameterAlexander Graf2010-12-111-3/+5
| | | | | | | | | | | | | As stated before, devices can be little, big or native endian. The target endianness is not of their concern, so we need to push things down a level. This patch adds a parameter to cpu_register_io_memory that allows a device to choose its endianness. For now, all devices simply choose native endian, because that's the same behavior as before. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* more stdvga cleanups.Gerd Hoffmann2010-11-161-1/+1
| | | | | | | video.x is gone now. It was the only user of the vga bios_offset + bios_size logic. Zap it. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
OpenPOWER on IntegriCloud