ARM: Allow dumping of device tree
By calling qemu_devtree_dumpdtb near the end of load_dtb.
Signed-off-by: John Rigby <john.rigby@linaro.org>Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
arm/boot: Free dtb blob memory after use
The dtb blob returned by load_device_tree() is in memory allocatedwith g_malloc(). Free it accordingly once we have copied itscontents into the guest memory. To make this easy, we need also toclean up the error handling in load_dtb() so that we consistently...
arm: Remove CONFIG_FDT conditionals
Now that we know we're compiling with libfdt, we can remove theCONFIG_FDT conditionals.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Reviewed-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>...
hw/arm/exynos4210.c: convert chipid_and_omr to an mmio region
Exynos SoC was misusing memory_region_init_ram_ptr(): this interface can safelybe used only for memory regions which size is a multiple of target page size.Change chipid_and_omr memory to an mmio region to fix this....
exynos4210.c: register rom_mem for memory migration
Even if we do not register newly created RAM MemoryRegion for migration withvmstate_register_ram_global() function, ram_save_setup() still saves this regionto snapshot file with empty idstr=="". Consequently this results in error during...
xilinx_spips: seperate SPI and QSPI as two classes
Make SPI and QSPI different classes. QSPIPS is setup as a child of SPIPS.Only QSPI has the LQSPI functionality, so move all that to the child class.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>...
remove some double-includes
Some source files #include the same header more thanonce for no good reason. Remove second #includes insuch cases.
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
spitz: fix compilation failure due to pty.h namespace pollution
pty.h is polluting the global namespace with a CTRL macro. spitzthus fails compilation with the patch athttp://article.gmane.org/gmane.comp.emulators.qemu/211337 andthis patch fixes it....
console: add device link to QemuConsoles
So it is possible to figure which qemu console displays which device.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Merge branch 'arm-devs.next' of git://git.linaro.org/people/pmaydell/qemu-arm
versatile_pci: Implement the PCI controller's control registers
The versatile_pci PCI controller has a set of control registers whichhandle the mapping between PCI and system address spaces. Implementthese registers (though for now they have no effect since we don't...
arm/realview: Fix mapping of PCI regions
Fix the mapping of the PCI regions for the realview board, which wereall incorrect. (This was never noticed because the Linux kerneldoesn't actually include a PCI driver for the realview boards.)
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>...
versatile_pci: Expose PCI memory space to system
The VersatilePB's PCI controller exposes the PCI memory space to thesystem via three regions controlled by the mapping control registers.Implement this so that guests can actually use MMIO-BAR PCI cards....
versatile_pci: Expose PCI I/O region on Versatile PB
Comments in the QEMU source code claim that the version of the PCIcontroller on the VersatilePB board doesn't support the PCI I/Oregion, but this is incorrect; expose that region, map it in thecorrect location, and drop the misleading comments....
Remove unneeded type casts
cpu_physical_memory_read, cpu_physical_memory_write take any pointeras 2nd argument without needing a type cast.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Reviewed-by: Andreas Färber <afaerber@suse.de>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
console: add GraphicHwOps
Pass a single GraphicHwOps struct pointer to graphic_console_init,instead of a bunch of function pointers.
console: simplify screendump
Screendumps are alot simpler as we can update non-activeQemuConsoles now. So we only need to update the QemuConsolewe want write out, then dump the DisplaySurface content intoa ppm file. Done.
No console switching needed. No special support code in the...
sysemu: avoid proliferation of include/ subdirectories
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arm: fix location of some include files
The recent rearrangement of include files had some minor errors: devices.h is not ARM specific and should not be in arm/ arm.h should be in arm/
Move these two headers to correct this.
hw: move interrupt controllers to hw/intc/, configure with default-configs/
hw: move GPIO interfaces to hw/gpio/, configure with default-configs/
hw: move other devices to hw/misc/, configure with default-configs/
hw: move ARM CPU cores to hw/cpu/, configure with default-configs/
hw: move last file to hw/arm/
hw: move private headers to hw/ subdirectories.
Many headers are used only in a single directory. These can bekept in hw/.
hw: move char devices to hw/char/, configure via default-configs/
hw: move timer devices to hw/timer/, configure with default-configs/
hw: move SD/MMC devices to hw/sd/, configure with default-configs/
hw: move DMA controllers to hw/dma/, configure with default-configs/
hw: move NICs to hw/net/, configure via default-configs/
hw: move block devices to hw/block/, configure via default-configs/
hw: move audio devices to hw/audio/, configure via default-configs/
hw: move display devices to hw/display/, configure via default-configs/
hw: move I2C controllers to hw/i2c/, configure via default-configs/
hw: move SSI controllers to hw/ssi/, configure via default-configs/
hw: make all of hw/ide/ configurable via default-configs/
hw: make all of hw/usb/ configurable via default-configs/
hw: move headers to include/
Many of these should be cleaned up with proper qdev-/QOM-ification.Right now there are many catch-all headers in include/hw/ARCH dependingon cpu.h, and this makes it necessary to compile these files per-target.However, fixing this does not belong in these patches....
hw/arm/nseries: don't print to stdout or stderr
Remove various bits of printing to stdout or stderr from thenseries code, replacing it with a qemu log message where there'san appropriate log category, and just dropping the output forsome of the more debug-like printing....
xilinx_zynq: Cleanup ssi_create_slave
With the recent m25p80 cleanup there is no need to usessi_create_slave_no_init() anymore. Just use ssi_create_slave().
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
qemu-char: Call fe_claim / fe_release when not using qdev chr properties
chardev-frontends need to explictly check, increase and decrement theavail_connections "property" of the chardev when they are not using aqdev-chardev-property for the chardev.
This fixes things like:...
musicpal: qdevify musicpal-misc
Make musicpal-misc into its own (trivial) qdev device, so wecan get rid of the abuse of sysbus_add_memory().
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>...
console: stop using DisplayState in gfx hardware emulation
Use QemuConsole instead. Updates interfaces in console.[ch] and adaptsgfx hardware emulation code.
console: rework DisplaySurface handling [vga emu side]
Decouple DisplaySurface allocation & deallocation from DisplayState.Replace dpy_gfx_resize + dpy_gfx_setdata with a dpy_gfx_replace_surfacefunction.
This handles the graphic hardware emulation.
hw/vexpress: Set reset values for daughterboard oscillators
Set the reset values for the VExpress daughterboard oscillatorsvia the new sysctl properties.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
xilinx_zynq: added pl330 to machine model
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 5bc295bd2aa50dfe573f428574dbd7d8add7b3f8.1361853677.git.peter.crosthwaite@xilinx.com...
hw/vexpress: Pass voltage sensor properties to sysctl device
Pass voltage sensor properties to the sysctl device. Sincethese are daughterboard specific, we specify them via theVEDBoardInfo structure.
hw/vexpress: Pass proc_id via VEDBoardInfo
Pass the daughterboard-specific proc_id property to the code thatcreates the sysctl device via the VEDBoardInfo struct, rather thanby having the daughterboard init function write to a uint32_t*argument. This is a cleaner way to pass the info around, and...
cpu: Move halted and interrupt_request fields to CPUState
Both fields are used in VMState, thus need to be moved together.Explicitly zero them on reset since they were located beforebreakpoints.
Pass PowerPCCPU to kvmppc_handle_halt().
Signed-off-by: Andreas Färber <afaerber@suse.de>
exec: Pass CPUState to cpu_reset_interrupt()
Move it to qom/cpu.c to avoid build failures depending on include orderof cpu-qom.h and exec/cpu-all.h.
Change opaques of various ..._irq_handler() functions to theappropriate CPU type to facilitate using cpu_reset_interrupt()....
cpu: Pass CPUState to cpu_interrupt()
Move it to qom/cpu.h to avoid issues with include order.
Change pc_acpi_smi_interrupt() opaque to X86CPU.
arm: fix compilation with CONFIG_FDT
A conflict was resolved the wrong way when merging commit 320ba5f (build:always link device_tree.o into emulators if libfdt available, 2013-02-05).This causes a build failure for the arm-softmmu target due to multiply...
Merge remote-tracking branch 'bonzini/hw-dirs' into staging
hw/kvm/arm_gic: Implement support for KVM in-kernel ARM GIC
Implement support for using the KVM in-kernel GIC for ARM.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Reviewed-by: Andreas Färber <afaerber@suse.de>
build: always link device_tree.o into emulators if libfdt available
hw: move boards and other isolated files to hw/ARCH
arm: move files referencing CPU to hw/arm/
arm: a9mpcore: Coreify the SCU
Split the SCU in a9mpcore out into its own object definition. mpcore is nowjust a container for the mpcore components.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
xilinx_spips: Xilinx Zynq SPI cntrlr device model
Added device model for the Xilinx Zynq SPI controller (SPIPS).
Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>Acked-by: Peter Maydell <peter.maydell@linaro.org>
arm: Move some ARM devices into libhw
Avoids some unnecessary dependencies on cpu.h and prepares fora future armeb-softmmu where most machines would not be built.
Defer touching the SoC devices since most have implicit or explicitdependencies on the CPU....
exynos4210: add Exynos4210 i2c implementation
Create 9 exynos4210 i2c interfaces.
Signed-off-by: Igor Mitsyanko <i.mitsyanko@samsung.com>Reviewed-by: Andreas Färber <afaerber@suse.de>Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
i.MX31: Interrupt Controller
Implement the Freescale i.MX31 advanced vectored interrupt controller, at leastto the extent it is used by Linux 3.x
Vectors are not implemented.
Signed-off-by: Philip O'Sullivan <philipo@ok-labs.com>Signed-off-by: Peter Chubb <peter.chubb@nicta.com.au>...
i.MX31: KZM-ARM11-01 evaluation board
Board support for Kyoto Micro's KZM-ARM11-01, an evaluation board builtaround the Freescale i.MX31.
Signed-off-by: Philip O'Sullivan <philipo@ok-labs.com>Signed-off-by: Peter Chubb <peter.chubb@nicta.com.au>Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
i.MX: UART support
Implement the Freescale i.MX UART. This uart is used in a variety ofSoCs, including some by Motorola, as well as in the Freescale i.MXseries.
This patch gives only a `bare-bones' implementation, enough to run Linuxor OKL4, but that's about it....
i.MX31: Clock Control Module
For Linux to be able to work out how fast its clocks are going, sothat timer ticks come approximately at the right time, it needs tobe able to query the clock control module (CCM).
This is the start of a CCM implementation. It currently knows only about...
i.MX31: Timers
Implement the timers on the Freescale i.MX31 SoC.This is not a complete implementation, but gives enough forLinux to boot and run. In particular external triggers, which arenot useful under QEMU, are not implemented.
Signed-off-by: Philip O'Sullivan <philipo@ok-labs.com>...
Exynos4: add RTC device
Signed-off-by: Oleg Ogurtsov <o.ogurtsov@samsung.com>Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/armv7m_nvic: Make the NVIC a freestanding class
Rearrange the GIC and NVIC so both are straightforwardsubclasses of a common class, rather than having the NVICsource file textually include arm_gic.c.
build: move device tree to per-target Makefile.objs
build: move obj-TARGET-y variables to nested Makefile.objs
Also drop duplicate occurrence of device-hotplug.o.