aboutsummaryrefslogtreecommitdiffstats
path: root/hw/realview.c
AgeCommit message (Collapse)AuthorFilesLines
2012-02-17arm_boot: Pass base address of GIC CPU interface, not whole GICPeter Maydell1-5/+7
The arm_boot secondary boot loader code needs the address of the GIC CPU interface. Obtaining this from the base address of the private peripheral region was possible for A9 and 11MPcore, but the A15 puts the GIC CPU interface in a different place. So make boards pass in the GIC CPU interface address directly. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-02-15qom: Unify type registrationAndreas Färber1-2/+2
Replace device_init() with generalized type_init(). While at it, unify naming convention: type_init([$prefix_]register_types) Also, type_init() is a function, so add preceding blank line where necessary and don't put a semicolon after the closing brace. Signed-off-by: Andreas Färber <afaerber@suse.de> Cc: Anthony Liguori <anthony@codemonkey.ws> Cc: malc <av1474@comtv.ru> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-09ARM devboards: Set arm_sysctl properties before init, not afterPeter Maydell1-1/+1
The ARM devboard models (vexpress-a9, realview, versatilepb, etc) were accidentally trying to set one of the arm_sysctl properties after device init. This has now become a fatal error; set the property before device init where it should be done instead. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-02-03qdev: register all types natively through QEMU Object ModelAnthony Liguori1-5/+6
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>
2012-01-27sysbus: apic: ioapic: convert to QEMU Object ModelAnthony Liguori1-4/+11
This converts three devices because apic and ioapic are subclasses of sysbus. Converting subclasses independently of their base class is prohibitively hard. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-17vexpress, realview: Add (dummy) L2 cache controllerPeter Maydell1-0/+2
Instantiate the L2 cache controller on the ARM devboards which have one, since we have a dummy model of it now. Note that the only non-MP board with an L2x0 is the PB1176, which we don't model. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-01-17hw/arm_boot.c: Make SMP boards specify address to poll in bootup loopEvgeny Voevodin1-0/+2
The secondary CPU bootloader in arm_boot.c holds secondary CPUs in a pen until the primary CPU releases them. Make boards specify the address to be polled to determine whether to leave the pen (it was previously hardcoded to 0x10000030, which is a Versatile Express/ Realview specific system register address). Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2012-01-04vmstate, memory: decouple vmstate from memory APIAvi Kivity1-3/+6
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>
2011-11-28sysbus: rename sysbus_init_mmio_region() to sysbus_init_mmio()Avi Kivity1-1/+1
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-31hw/vexpress.c, hw/realview.c: Add PL041 to VExpress, Realview boardsPeter Maydell1-1/+7
Instantiate the PL041 audio on the Versatile Express and Realview board models. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-10-17realview: convert to memory APIAvi Kivity1-28/+26
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-10-10hw/versatile_pci: Expose multiple sysbus mmio regionsPeter Maydell1-2/+10
Clean up versatile_pci to expose the various PCI mmio regions properly as separate mmio regions rather than as a single mmio which uses callbacks to map and unmap everything. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Avi Kivity <avi@redhat.com>
2011-08-17vexpress, realview: Use pl111, not pl110Peter Maydell1-1/+1
The Versatile Express, Realview EB, PBX A9 and PB A8 boards all use a PL111 for their graphics, not a PL110. Now we model the PL111, use it on these board models. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2011-07-23Correct spelling of licensedMatthew Fernandez1-1/+1
Correct typos of "licenced" to "licensed". Reviewed-by: Stefan Weil <weil@mail.berlios.de> Reviewed-by: Andreas F=E4rber <andreas.faerber@web.de> Signed-off-by: Matthew Fernandez <matthew.fernandez@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-05-22hw/realview.c: Remove duplicate #include linePeter Maydell1-1/+0
Remove a duplicate #include of sysbus.h. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-04-01hw/versatilepb, realview: Fix condition for instantiation of onboard NICPeter Maydell1-2/+2
Correct the condition determining whether we instantiate the onboard NIC or a PCI card NIC on VersatilePB and Realview boards. This was broken in two ways: (1) if the user asked for two default NICs ("-net nic -net nic") we would crash trying to strcmp() a NULL pointer (2) if the user asked for two NICs explicitly of the same model as the onboard NIC (eg "-net nic,model=smc91c111 -net nic,model=smc91c111") we would try to instantiate two onboard NICs at the same address. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-03-06target-arm: Integrate secondary CPU reset in arm_bootAdam Lackorzynski1-14/+0
Integrate secondary CPU reset into arm_boot, removing it from realview.c. On non-Linux systems secondary CPUs start with the same entry as the boot CPU. Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-03-06hw/realview: Wire up the MMC card statusPeter Maydell1-3/+26
Instantiate the three PL061 GPIO modules the realview boards have. Connect the MMC card status outputs of the PL181 MMC controller to both the system registers and the GPIO module which handles internal devices. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-12-11Add endianness as io mem parameterAlexander Graf1-1/+2
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>
2010-08-24Rearrange block headersBlue Swirl1-0/+1
Changing block.h or blockdev.h resulted in recompiling most objects. Move DriveInfo typedef and BlockInterfaceType enum definitions to qemu-common.h and rearrange blockdev.h use to decrease churn. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-07-06qemu_ram_alloc: Add DeviceState and name parametersAlex Williamson1-3/+3
These will be used to generate unique id strings for ramblocks. The name field is required, the device pointer is optional as most callers don't have a device. When there's no device or the device isn't a child of a bus implementing BusInfo.get_dev_path, the name should be unique for the platform. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-04-04Revert "Compile usb-ohci only once"Paul Brook1-5/+1
This reverts commit f1698408f1dcb7548a21828a0b1e2b530fae3af3. PCI is always little-endian. Having a user-visible "be" property is just plain wrong.
2010-03-21Compile usb-ohci only onceBlue Swirl1-1/+5
Push TARGET_WORDS_BIGENDIAN dependency to board level. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-12-21ARM PBX-A9 memory map tweaksPaul Brook1-2/+10
Add core tile memeory to the RealView PBX-A9 board. Document the memeory maps that are known to work with the qemu bootloader. Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-12-04Add "static" to please SparseBlue Swirl1-1/+1
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-12-01pci: pci.h cleanup: move out stuff not in pci.cMichael S. Tsirkin1-0/+1
pci.h declares some functions which aren't defined in pci.h. Clean up moving things to appropriate headers, and update all users. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2009-11-22ARM RealView I2CPaul Brook1-1/+85
Add ARM Realview I2C host emulation. Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-11-19ARM PBX-A9 board supportPaul Brook1-6/+59
Implement ARM RealView PBX-A9 board support. Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-11-16ARM PB-A8 supportPaul Brook1-29/+79
Add ARM Realview PB-A8 board support. Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-11-13ARM MPCore tweaksPaul Brook1-26/+58
Allow the user to specify the number of cores present on the RealView EB + ARM11MPCore board. Also split into its own config rather than guessing from the CPU name. Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-11-13Realview/EB procid hacksPaul Brook1-1/+11
Guess core tile ID based on CPU type. Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-11-11Fix ARM MCore secondary cpu bootPaul Brook1-4/+12
Make MPCore secondary cpu initialization work with the new reset handling. Also change the inital FLAG value from 3 to zero to match recent kenrels. Signed-off-by: Paul Brook <paul@codesourcery.com>
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-01Revert "Get rid of _t suffix"Anthony Liguori1-2/+2
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-2/+2
Some not so obvious bits, slirp and Xen were left alone for the time being. Signed-off-by: malc <av1474@comtv.ru>
2009-09-21Add 'static' to please SparseBlue Swirl1-1/+1
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-09qdev/usb: convert ohci.Gerd Hoffmann1-1/+1
Drop num_ports argument for usb_ohci_init_pci(), everybody calls it with num_ports == 3, so it is pointless. Convert ohci pci device into qdev. TODO: convert non-pci ohci adapters. You can add a OHCI USB Controller to your virtual pc now using '-device pci-ohci'. Specifying a id is a good idea, so you can attach usb devices to it, like this: -device pci-ohci,id=ohci -device usb-mouse,bus=ohci.0 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-22Support addr=... in option argument of -net nicMarkus Armbruster1-1/+1
Make net_client_init() accept addr=, put the value into struct NICinfo. Use it in pci_nic_init(), and remove arguments bus and devfn. Don't support addr= in third argument of monitor command pci_add, because that clashes with its first argument. Admittedly unelegant. Machines "malta" and "r2d" have a default NIC with a well-known PCI address. Deal with that the same way as the NIC model: make pci_nic_init() take an optional default to be used when the user doesn't specify one. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-26Remove qdev irq sink handlingPaul Brook1-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>
2009-05-23Add common BusStatePaul Brook1-1/+1
Implement and use a common device bus state. The main side-effect is that creating a bus and attaching it to a parent device are no longer separate operations. For legacy code we allow a NULL parent, but that should go away eventually. Also tweak creation code to veriry theat a device in on the right bus. Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-21Convert machine registration to use module init functionsAnthony Liguori1-0/+7
This cleans up quite a lot of #ifdefs, extern variables, and other ugliness. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-14ARM GIC qdev conversionPaul Brook1-5/+11
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14ARM PCI host qdev conversionPaul Brook1-1/+4
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14PL080 qdev conversionPaul Brook1-1/+1
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14PL190 qdev conversionPaul Brook1-1/+1
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14ARM timers qdev conversionPaul Brook1-2/+2
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14PL181 qdev conversionPaul Brook1-7/+1
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14PL031 qdev conversionPaul Brook1-1/+1
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14LSI SCSI qdev conversionPaul Brook1-11/+4
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14PL050 qdev conversionPaul Brook1-2/+2
Signed-off-by: Paul Brook <paul@codesourcery.com>