target-arm: Implement AArch64 TTBR*
Implement the AArch64 TTBR* registers. For v7 these were already 64 bitsto handle LPAE, but implemented as two separate uint32_t fields.Combine them into a single uint64_t which can be used for all purposes.Since this requires touching every use, take the opportunity to rename...
hw/arm/musicpal: Remove nonexistent CDTP2, CDTP3 registers
The ethernet device in the musicpal only has two tx queues,but we modelled it with four CTDP registers, presumably acut and paste from the rx queue registers. Since the tx_queue[]array is only 2 entries long this allowed a guest to overrun...
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20140220' into staging
target-arm queue: * Fix a bug causing an assertion in the NVIC on ARMv7M models * More A64 Neon instructions * Refactor cpreg API to separate out access check functions, as...
target-arm: Drop success/fail return from cpreg read and write functions
All cpreg read and write functions now return 0, so we can clean uptheir prototypes: * write functions return void * read functions return the value rather than taking a pointer to write the value to...
tosa: QOM'ify DAC
Replace usages of FROM_I2C_SLAVE() with QOM cast macro.Rename parent field. Use type constant in tosa_tg_init().
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
z2: QOM'ify AER915
Replace usages of FROM_I2C_SLAVE() with QOM cast macro.Rename the parent field. Reuse the type constant in z2_init().
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>[AF: Use TYPE_AER915 in z2_init() too]Signed-off-by: Andreas Färber <afaerber@suse.de>
i2c: Rename i2c_bus to I2CBus
pxa2xx: QOM'ify I2C slave
Replace usages of FROM_I2C_SLAVE() and direct parent field accesses withQOM cast macro. Rename parent field to assure we caught all. Reuse typeconstant in pxa2xx_i2c_init().
Add some missing braces while at it.
Signed-off-by: Andreas Färber <afaerber@suse.de>
exec: Make stl_phys_notdirty input an AddressSpace
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
hw/arm/allwinner-a10: initialize EMAC
Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
vmstate: Make VMSTATE_STRUCT_POINTER take type, not ptr-to-type
The VMSTATE_STRUCT_POINTER macros are a bit odd in that theymust be passed an argument "FooType *" rather than just takingthe FooType. They're only used in one place, so it's easy totidy this up. This also lets us use the macro to replace the...
ZYNQ: Implement board MIDR control for Zynq
This patch uses the fact that the midr variable is now a propertyThis patch sets the midr variable to the boards custom midr
Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>Message-id: a3754b10d150af72e4688a993e484fa2b9b8fa21.1390176489.git.alistair.francis@xilinx.com...
hw/arm/boot: Don't set up ATAGS for autogenerated dtb booting
The code which decides whether to set up the ATAGS data structure onreset was using the wrong conditional, which meant we were creatingan ATAGS structure when doing a device-tree boot if the dtb was...
Merge remote-tracking branch 'afaerber/tags/qom-devices-for-anthony' into staging
QOM infrastructure fixes and device conversions
Merge remote-tracking branch 'mjt/trivial-patches' into staging
arm/xilinx_zynq: Always instantiate the GEMs
Don't conditionalise GEM instantiation on networking attachments. Thedevice should always be present even if not attached to a network.
This allows for probing of the device by expectant guests (such asOS's). This is needed because sysbus (or AXI in Xilinx's real hw case)...
pxa27x: Add 'const' attribute to keyboard maps
The mapping is a hardware feature, so it is relatively constant.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
mainstone: Fix duplicate array values for key 'space'
cgcc reported a duplicate initialisation. Mainstone includes a matrixkeyboard where two different positions map to 'space'.
QEMU uses the reversed mapping and does not map 'space' to two differentmatrix positions....
hw/arm/highbank: Simplify code (memory region in device state)
The memory region can be included by value instead of by reference in thedevice state.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>...
qdev: Replace no_user by cannot_instantiate_with_device_add_yet
In an ideal world, machines can be built by wiring devices togetherwith configuration, not code. Unfortunately, that's not the world welive in right now. We still have quite a few devices that need to be...
sysbus: Set cannot_instantiate_with_device_add_yet
device_add plugs devices into suitable bus. For "real" buses, thatactually connects the device. For sysbus, the connections need to bemade separately, and device_add can't do that. The device would be...
device_tree: s/qemu_devtree/qemu_fdt globally
The qemu_devtree API is a wrapper around the fdt_ set of APIs.Rename accordingly.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>[agraf: also convert hw/arm/virt.c]Signed-off-by: Alexander Graf <agraf@suse.de>
hw/arm: add very initial support for Canon DIGIC SoC
DIGIC is Canon Inc.'s name for a family of SoCfor digital cameras and camcorders.
There is no publicly available specification forDIGIC chips. All information about DIGIC chipinternals is based on reverse engineering efforts...
hw/arm/digic: prepare DIGIC-based boards support
Also this patch adds initial support for CanonPowerShot A1100 IS compact camera.
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>Message-id: 1387188908-754-3-git-send-email-antonynpavlov@gmail.com...
hw/arm/digic: add timer support
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Message-id: 1387188908-754-4-git-send-email-antonynpavlov@gmail.comSigned-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/arm/digic: add UART support
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Message-id: 1387188908-754-5-git-send-email-antonynpavlov@gmail.com...
hw/arm/digic: add NOR ROM support
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>Message-id: 1387188908-754-6-git-send-email-antonynpavlov@gmail.com[PMM: don't try to load ROM blob if qtest_enabled()]Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/arm: add allwinner a10 SoC support
Signed-off-by: liguang <lig.fnst@cn.fujitsu.com>Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Message-id: 1387159292-10436-5-git-send-email-lig.fnst@cn.fujitsu.comSigned-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/arm: add cubieboard support
Signed-off-by: liguang <lig.fnst@cn.fujitsu.com>Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Message-id: 1387159292-10436-6-git-send-email-lig.fnst@cn.fujitsu.comSigned-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/arm/boot: Allow easier swapping in of different loader code
For AArch64 we will obviously require a different set ofprimary and secondary boot loader code fragments. However currentlywe hardcode the offsets into the loader code where we must writethe entrypoint and other data into arm_load_kernel(). This makes it...
hw/arm/boot: Add boot support for AArch64 processor
This commit adds support for booting a single AArch64 CPU by settingappropriate registers. The bootloader includes placeholders for Board-IDthat are used to implement uniform indexing across different bootloaders....
arm/xilinx_zynq: Implement CBAR initialisation
Fix the CBAR initialisation by using the newly defined static property.Zynq will now correctly init the CBAR to the SCU base address.
Needed to boot Linux on the xilinx_zynq machine model.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>...
arm/highbank.c: Fix MPCore periphbase name
GIC_BASE_ADDR is not the base address of the GIC. Its clear from thecode that this is the base address of the MPCore. Rename toMPCORE_PERIPHBASE accordingly.
arm/highbank: Use object_new() rather than cpu_arm_init()
To allow the machine model to set device properties before CPUrealization.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 8c671e500390c8be0cc363e887e32867d1d1b0d2.1387160489.git.peter.crosthwaite@xilinx.com...
arm/highbank: Fix CBAR initialisation
Fix the CBAR initialisation by using the newly defined static property.CBAR is now set before realization, so the intended value is nowactually used.
So I have kind of tested this. I booted an ARM kernel on Highbank with...
arm/xilinx_zynq: Use object_new() rather than cpu_arm_init()
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>...
Fix NOR flash device ID reading
Fix NOR flash manufacturer and device ID reading. This nowproperly takes into account device widths and device max widthsas required. The reading of these IDs uses the same max_widthdependent addressing as CFI queries....
Set proper device-width for vexpress flash
Create vexpress specific pflash registrationfunction which properly configures the device-widthof 16 bits (2 bytes) for the NOR flash on thevexpress platform. This change is required forbuffered flash writes to work properly....
hw/arm/virt: Support -cpu host
Support -cpu host in virt machine (treating it like an A15, iewith a GIC v2 and the A15's private peripherals.)
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>...
hw/arm/boot: Allow boards to provide an fdt blob
If no fdt is provided on command line and the new fieldget_dtb in struct arm_boot_info is set then call it toget a device tree blob.
Signed-off-by: John Rigby <john.rigby@linaro.org>Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>...
hw/arm: Add 'virt' platform
Add 'virt' platform support corresponding to arch/arm/mach-virtin the Linux kernel tree. This has no platform-specific code butcan use any device whose kernel driver is is able to work purelyfrom a device tree node. We use this to instantiate a minimal...
integrator/cp: add support for REFCNT register
Linux kernel from version 3.4 requires CM_REFCNT register for sched timerfor Integrator/CP board (integrator_defconfig).
See http://infocenter.arm.com/help/topic/com.arm.doc.dui0138e/ch04s06s11.html
Signed-off-by: Jan Petrous <jan.petrous@tieto.com>...
palm: Don't enforce loading ROM or kernel for qtest
omap_sx1: Don't enforce use of kernel or flash for qtest
exynos4_boards: Silence lack of -smp 2 warning for qtest
armv7m: Don't enforce use of kernel for qtest
Adopt error_report().
mainstone: Don't enforce use of -pflash for qtest
Simply skip flash setup for now.
Also drop useless debug output.
gumstix: Don't enforce use of -pflash for qtest
z2: Don't enforce use of -pflash for qtest
hw/arm/boot: Make user not specifying a kernel not an error
Typically ARM boards will have some kind of flash which might containa boot ROM; it's therefore a valid use case to provide only animage for the boot ROM and not require QEMU's internal boot loader...
hw/arm: Tidy up conditional calls to arm_load_kernel
Now that arm_load_kernel doesn't insist on a kernel filenamebeing present, we can remove some unnecessary conditionalsin board models.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 1379980897-21277-3-git-send-email-peter.maydell@linaro.org
integrator: fix Linux boot failure by emulating dbg region
Commit 9b8c69243 (since reverted) broke the ability to boot the kernelas the value returned by unassigned_mem_read returned non-zero and leftthe kernel looping forever waiting for it to change (see...
Merge remote-tracking branch 'afaerber/tags/qom-cpu-for-anthony' into staging
QOM CPUState refactorings / X86CPU
Merge remote-tracking branch 'mst/tags/for_anthony' into staging
pc,pci,virtio fixes and cleanups
This includes pc and pci cleanups and enhancements,and a virtio bugfix for level interrupts.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
cpu: Use QTAILQ for CPU list
Introduce CPU_FOREACH(), CPU_FOREACH_SAFE() and CPU_NEXT() shorthandmacros.
hw: Clean up bogus default boot order
We set default boot order "cad" in every single machine definitionexcept "pseries" and "moxiesim", even though very few boards actuallycare for boot order, and "cad" makes sense for even fewer.
Machines that care:...
aio / timers: Convert rtc_clock to be a QEMUClockType
Convert rtc_clock to be a QEMUClockType
Move rtc_clock users to use the new API
Signed-off-by: Alex Bligh <alex@alex.org.uk>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
aio / timers: Switch entire codebase to the new timer API
This is an autogenerated patch using scripts/switch-timer-api.
Switch the entire code base to using the new timer API.
Note this patch may introduce some line length issues.
Signed-off-by: Alex Bligh <alex@alex.org.uk>...
hw/arm/pic_cpu: Remove the now-unneeded arm_pic_init_cpu()
Now all the boards have been converted arm_pic_init_cpu()is unused and can just be deleted.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 1375977856-25046-15-git-send-email-peter.maydell@linaro.org
hw/arm/realview: Don't use arm_pic_init_cpu()
Drop the now-deprecated arm_pic_init_cpu() in favour of directlygetting the IRQ line from the ARMCPU object.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 1375977856-25046-10-git-send-email-peter.maydell@linaro.org
hw/arm/strongarm: Don't use arm_pic_init_cpu()
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 1375977856-25046-11-git-send-email-peter.maydell@linaro.org
hw/arm/versatilepb: Don't use arm_pic_init_cpu()
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 1375977856-25046-12-git-send-email-peter.maydell@linaro.org
hw/arm/vexpress: Don't use arm_pic_init_cpu()
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 1375977856-25046-13-git-send-email-peter.maydell@linaro.org
hw/arm/xilinx_zynq: Don't use arm_pic_init_cpu()
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 1375977856-25046-14-git-send-email-peter.maydell@linaro.org
hw/arm/highbank: Don't use arm_pic_init_cpu()
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 1375977856-25046-5-git-send-email-peter.maydell@linaro.org
hw/arm/integratorcp: Don't use arm_pic_init_cpu()
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 1375977856-25046-6-git-send-email-peter.maydell@linaro.org
hw/arm/kzm: Don't use arm_pic_init_cpu()
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 1375977856-25046-7-git-send-email-peter.maydell@linaro.org
hw/arm/musicpal: Don't use arm_pic_init_cpu()
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 1375977856-25046-8-git-send-email-peter.maydell@linaro.org
hw/arm/omap*: Don't use arm_pic_init_cpu()
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 1375977856-25046-9-git-send-email-peter.maydell@linaro.org
target-arm: Make IRQ and FIQ gpio lines on the CPU object
Now that ARMCPU is a subclass of DeviceState, we can make theCPU's inbound IRQ and FIQ lines be simply gpio lines, whichmeans we can remove the odd arm_pic shim.
We retain the arm_pic_init_cpu() function as a backwards...
hw/arm/armv7m: Don't use arm_pic_init_cpu()
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 1375977856-25046-3-git-send-email-peter.maydell@linaro.org
hw/arm/exynos4210: Don't use arm_pic_init_cpu()
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 1375977856-25046-4-git-send-email-peter.maydell@linaro.org
pxa2xx: Avoid object_get_link_property() assertion for "parent_bus"
pxa2xx_i2c_init() creates a pxa2xx-i2c-slave device on a second i2c-bus,which has a NULL parent device. This causes an assertion inobject_get_canonical_path() when accessing pxa2xx-i2c-slave's...
stellaris: QOM cast cleanup for stellaris_i2c_state
Introduce a type constant, use QOM casts, rename the parent field andprepare for QOM realize.
stellaris: QOM cast cleanup for stellaris_adc_state
strongarm: QOM cast cleanup for StrongARMPICState
strongarm: QOM cast cleanup for StrongARMRTCState
Introduce a type constant, use QOM casts and rename the parent field.
strongarm: QOM cast cleanup for StrongARMGPIOInfo
strongarm: QOM cast cleanup for StrongARMPPCInfo
strongarm: QOM cast cleanup for StrongARMUARTState
strongarm: QOM cast cleanup for StrongARMSSPState
versatilepb: QOM cast cleanup for vpb_sic_state
musicpal: QOM cast cleanup for mv88w8618_pit_state
musicpal: QOM cast cleanup for mv88w8618_flashcfg
musicpal: QOM cast cleanup for musicpal_gpio_state
musicpal: QOM cast cleanup for musicpal_key_state
pxa2xx: QOM cast cleanup for PXA2xxSSPState
pxa2xx: QOM cast cleanup for PXA2xxRTCState
pxa2xx: QOM cast cleanup for PXA2xxI2CState
pxa2xx_gpio: QOM cast cleanup for PXA2xxGPIOInfo
pxa2xx_pic: QOM cast cleanup for PXA2xxPICState
spitz: QOM cast cleanup for SLNANDState
spitz: QOM cast cleanup for SpitzKeyboardState
stellaris: QOM cast cleanup for gptm_state
musicpal: QOM cast cleanup mv88w8618_pic_state
integratorcp: QOM cast cleanup for integratorcm_state
Rename to IntegratorCMState, introduce type constant and use QOM cast.
integratorcp: QOM cast cleanup for icp_pic_state
Introduce type constant and use QOM cast.Fix indentation.
musicpal: Fix typo in name of local function
The misspelling was spotted by Andreas Färber.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Reviewed-by: Jan Kiszka <jan.kiszka@web.de>Signed-off-by: Andreas Färber <afaerber@suse.de>
musicpal: QOM cast cleanup for mv88w8618_eth_state
Introduce type constant and use QOM casts.
musicpal: QOM cast cleanup for musicpal_lcd_state