milkymist-memcard: convert to memory API
Signed-off-by: Michael Walle <michael@walle.cc>Signed-off-by: Avi Kivity <avi@redhat.com>
milkymist-pfpu: convert to memory API
milkymist-sysctl: convert to memory API
milkymist-tmu2: convert to memory API
milkymist-uart: convert to memory API
milkymist-vgafb: convert to memory API
milkymist-{minimac2,softusb}: rename memory names
Be consistent with other milkymist models.
serial: Add MemoryRegion parameter to serial_mm_init
Remove the get_system_memory() call from serial_mm_init, pushingit back into the callers. In many cases we already have thesystem memory region available.
Signed-off-by: Richard Henderson <rth@twiddle.net>...
ppc405: Pass in address_space_mem to ppc405{cr, ep}_init
Signed-off-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Avi Kivity <avi@redhat.com>
ppc440: Pass in address_space_mem to ppc440ep_init
pxa: Pass in address_space to pxa{255, 270}_init
sm501: Pass address_space_mem to sm501_init
sun4u: Pass address_space_mem to sun4uv_init
hw/smc91c111: Convert to MemoryRegion
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Avi Kivity <avi@redhat.com>
openpic: Memory API conversion for mpic
This patch converts mpic to the new memory API (through old mmio).
Signed-off-by: Fabien Chouteau <chouteau@adacore.com>Signed-off-by: Avi Kivity <avi@redhat.com>
milkymist-ac97: convert to memory API
milkymist-hpdmc: convert to memory API
etrax-pic: Convert to MemoryRegion
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>Signed-off-by: Avi Kivity <avi@redhat.com>
etrax-ser: Convert to MemoryRegion
etrax-timer: Convert to MemoryRegion
etrax-dma: Convert to MemoryRegion
etrax-eth: Convert to MemoryRegion
serial: Convert serial_mm_init to MemoryRegion
serial: Use enum device_endian in serial_mm_init parameter
The use of DEVICE_NATIVE_ENDIAN cleans up lots of ifdefs inmany of the callers.
serial: Remove ioregister parameter from serial_mm_init
All callers passed 1.
Move GETPC from dyngen-exec.h to exec-all.h
GETPC can be used even from outside of helper code. Move the macro toa more accessible location. Avoid a compile warning from redefining it in exec.c.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
softmmu_header: pass CPUState to tlb_fill
Pass CPUState pointer to tlb_fill() instead of architecture localcpu_single_env hacks.
Document softmmu templates
Add some comments to describe each file.
ESP: convert to trace framework
PPC: Drop initial ESCC mapping
We are mapping ESCC to a static (incorrect) address on machine init. Thisoverlaps with our vram, rendering the screen barely usable.
Since openBIOS is clever enough to map ESCC to where it needs to be, we canjust drop that invalid map and everyone's happy....
tcg-i386: Introduce limited deposit support
x86 cannot provide an optimized generic deposit implementation. But atleast for a few special cases, namely for writing bits 0..7, 8..15, and0..15, versions using only a single instruction are feasible.Introducing such limited support improves emulating 16-bit x86 code on...
mips_fulong2e: Reorder ISA bus and i8259 creation
Missed during memory region conversion: The i8259 now depends on the ISAbus being created first. Reorder the initialization.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
target-i386: Remove redundant word mask in port out instructions
T0 was already masked to 16 bits when loading it.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Reviewed-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
softfloat: Reinstate accidentally disabled target-specific NaN handling
Include config.h in softfloat.c, so that the target specific ifdefs insoftfloat-specialize.h are evaluated correctly. This was accidentallybroken in commit 789ec7ce2 when config-target.h was removed from...
tcg/arm: Remove unused tcg_out_addi()
Remove the unused function tcg_out_addi() from the ARM TCG backend;this fixes a compilation failure on ARM hosts with newer gcc.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Reviewed-by: Richard Henderson <rth@twiddle.net>...
configure: Detect predefined compiler symbols for ARM and HPPA
To be able to detect some ARM / HPPA based architectures such as withOpenBSD/(armish / zaurus) or OpenBSD/hppa.
Signed-off-by: Brad Smith <brad@comstyle.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
tcg: Add some assertions
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
tcg: Add forward declarations for local functions
These functions are defined in the tcg target specific filetcg-target.c.
The forward declarations assert that every tcg target usesthe same function prototype.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>...
tcg: Don't declare TCG_TARGET_REG_BITS in tcg-target.h
It is now declared for all tcg targets in tcg.h,so the tcg target specific declarations are redundant.
tcg: Declare TCG_TARGET_REG_BITS in tcg.h
TCG_TARGET_REG_BITS can be determined by the compiler,so there is no need to declare it for each individual tcg target.
This is especially important for new tcg targetswhich will be supported by the tcg interpreter....
Merge remote-tracking branch 'kiszka/queues/slirp' into staging
Merge remote-tracking branch 'aneesh/for-upstream-5' into staging
Add OpenBIOS as a submodule
Update OpenBIOS images to r1047 built from submodule.
slirp: Fix packet expiration
The two new variables "arp_requested" and "expiration_date" in the mbufstructure have been added after the variable-sized "m_dat_" array. Thevariables have to be added before the m_dat_ array instead.Without this patch, the expiration_date gets clobbered by code that...
slirp: Fix use after release on tcp_input
ti points into the m buffer. But the latter may already be releasedright after the dodata: label. Move the test before the potentialrelease.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
PPC: use memory API to construct the PCI hole
Avoid vga.chain4 mapping by constructing a PCI hole for upper2G of the PCI space.
Merge remote-tracking branch 'qemu-kvm-tmp/memory/urgent' into staging
Merge remote-tracking branch 'qemu-kvm-tmp/memory/batch' into staging
Merge remote-tracking branch 'qemu-kvm-tmp/memory/core' into staging
Merge remote-tracking branch 'pmaydell/omap-for-upstream' into staging
Merge remote-tracking branch 'riku/linux-user-for-upstream' into staging
ppc_prep: fix pci config space initialization
Use data_mem for the data mmio region, not conf_mem.
Signed-off-by: Avi Kivity <avi@redhat.com>
mips_r4k: initialize i8259 after the ISA bus
Succeeding i8259 conversion to ISA requires this.
ppc_prep: initialize i8259 after the ISA bus
i8259: Convert to MemoryRegion
The only non-obvious part is pic_poll_read which used"addr1 >> 7" to detect whether one referred to eitherthe master or slave PIC. Instead, test this directly.
pckbd: Convert to MemoryRegion
Slightly non-obvious with mips_jazz passing in the regionstructure to populate.
serial: Convert serial_isa_initfn to MemoryRegion
The serial_mm_init path is as yet unconverted.
fdc: Convert isabus_fdc_init1 to MemoryRegion
This requires some amount of hoop-jumping, so that we don'tinadvertently claim port 0x3f6, which is used by ISA IDE.
The sysbus initialization path is as yet unconverted.
isa: add isa_register_ioport()
To replace isa_init_ioport and isa_init_ioport_rangeas the ISA devices are converted to the memory api.
[avi: use memory_region_size()]
pc: Re-order pc_init1 to initialize the ISA bus before ISA devices
In particular, the i8259 was being initialized before the ISA bus,leading to a crash.
cs4231a: Convert to MemoryRegion
i8254: Convert to MemoryRegion
mips_malta: move i8259 initialization after piix4 initialization
i8259 is an ISA device (or at least, depends on the ISA infrastructure toregister its ioport); and the ISA bus is supplied by piix4. Later patchesmake this dependency explicit.
Use qemu_irq_proxy() to stop the cycle by adding an extra layer of...
mips_jazz: initialize i8259 after the ISA bus
isa: Pass i/o address space to isa_bus_new
Not used yet, but at least we're provided with the correct region.
pci: add pci_address_space_io()
Returns the I/O address space. Useful for implementingPCI-ISA bridge devices.
memory: implement memory_region_set_readonly()
The property is inheritable, but only if set to true. This is sothat memory routers can mark sections of RAM as read-only via aliases.
Makefile: Remove 'tarbin' target
Remove the 'tarbin' target -- it isn't used as part of the officialQEMU release process, and it's out of date (various new bios fileswere never added to its list of files). It's better not to provideit at all than to have a broken makefile target we never use or test....
MAINTAINERS: update maintainer for target-arm and ARM devboards
Add myself as co-maintainer alongside Paul Brook for the TCG ARMguest implementation (target-arm) and the ARM dev boards (integratorcp,realview, stellaris, versatilepb).
Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>...
adlib: remove write-only variable
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qemu-char: use qemu_set_fd_handler/2 consistently
Now that qemu_set_fd_handler and qemu_set_fd_handler2 have differentimplementations, one using qemu iohandlers and the other glib, it is notsafe to mix the two when inserting/deleting handlers.
Fixes kvm-autotest....
Move macro QEMU_GNUC_PREREQ to compiler.h
The macro is compiler specific and does not depend on the operating system.
Move macro QEMU_GNUC_PREREQ from osdep.h to compiler.hand use it to simplify existing code.
host-utils.h uses this macro, so it now needs compiler.h...
Fix and clean code which tests the gcc version
The code which tests whether gcc supports warn_unused_result was wrong.Remove the wrong test from configure and replace it by code usingmacro QEMU_GNUC_PREREQ in compiler.h.
virtio: Use global memory barrier macros
The virtio code uses wmb() macros in several places, as required by theSMP-aware virtio protocol. However the wmb() macro is locally definedto be a compiler barrier only. This is probably sufficient on x86due to its strong storage ordering model, but it certainly isn't on other...
Barriers in qemu-barrier.h should not be x86 specific
qemu-barrier.h contains a few macros implementing memory barrierprimitives used in several places throughout qemu. However, apartfrom the compiler-only barrier, the defined wmb() is correct only for...
irq: introduce qemu_irq_proxy()
In some cases we have a circular dependency involving irqs - the irqcontroller depends on a bus, which in turn depends on the irq controller.Add qemu_irq_proxy() which acts as a passthrough, except that the targetirq may be set later on....
build: fix race with creating qapi-generated
Since qapi-generated/ is a global QEMU include path, we need to makesure it is created before anything is compiled, so do this in theconfigure phase rather than via the Makefile.
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>...
isapc: give system address space when pci is disabled
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
pci-devfn: check that device/slot number is within range
Need to check that guest slot/device number is not > 31 or walk offthe devfn table when checking if a devfn is available or not in a guest.
before this fix, passing in an addr=abc or addr=34,can crash qemu, sometimes fail gracefully if data past end...
pc: Unbreak ROM mapping for ISA machine
This is based on the original fix by Hervé Poussineau: pc_memory_initactually takes a memory region for mapping BIOS and extension ROMs. Thatequals the PCI memory region if PCI is available, but must be systemmemory in the ISA case....
pc: Disable HPET for ISA machine
There was no HPET on ISA boxes.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vga: Unbreak ISA support
We need to initialize legacy_address_space during ISA VGA setup so thatthe chain-4 alias can be registered properly.
cirrus: Unbreak ISA support
Do not try to map against the PCI bar in the ISA version of the device.
core: remove qemu_service_io
qemu_service_io was mainly an alias to qemu_notify_event,currently used only by PPC for timer hack, so callqemu_notify_event directly.
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
e1000: Don't set the Capabilities List bit
[Originally sent to qemu-kvm list, but I was redirected here]
The Capabilities Pointer is NULL, so this bit shouldn't be set. The state ofthis bit doesn't appear to change any behavior on Linux/Windows versions we've...
MAINTAINERS: claim maintainership for the OMAP devices
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
hw/omap1: Wire up GPIO clock
Wire up the OMAP1 GPIO clock -- this fixes a hw_error() on startupwith OMAP1 based machines (sx1, cheetah).
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
omap_intc: Use MemoryRegion API
Convert omap_intc to use the MemoryRegion API
omap_intc: Qdevify
Convert the omap_intc devices to qdev. This includes addinga 'revision' property which will be needed for omap3.
The bulk of this patch is the replacement of "s->irq[x][y]" with "qdev_get_gpio_in(s->ih[x], y)" now that the interrupt...
hw/omap_gpmc: Modify correct field when writing IRQSTATUS register
Writing to IRQSTATUS should affect irqst, not irqen -- errorspotted by Andrzej Zaborowski.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
hw/omap_gpmc: Add comment about FIFOTHRESHOLDSTATUS bit
Promote the remark about why we handle FIFOTHRESHOLDSTATUS theway we do from the commit message of de8af7fe0 to a comment inthe code.
hw/9pfs: Add handle based fs driver
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
hw/9pfs: Make v9fs_string* functions non-static
We will use them later in other files
hw/9pfs: Use read-write lock for protecting fid path.
On rename we take the write lock and this ensure pathdoesn't change as we operate on them.
hw/9pfs: Move fid pathname tracking to seperate data type.
This enables us to add handles to track fids later. TheV9fsPath added is similar to V9fsString except that thesize include the NULL byte also.
hw/9pfs: Add init callback to fs driver
This call back can be used to do fs driver specific initialization.
hw/9pfs: Add fs driver specific details to fscontext
Add a new context flag PATHNAME_FSCONTEXT and indicate whetherthe fs driver track fid using path names. Also add a privatepointer that help us to track fs driver specific values in there
hw/9pfs: Avoid unnecessary get_fid in v9fs_clunk
hw/9pfs: Implement TFLUSH operation
Merge remote-tracking branch 'kwolf/for-anthony' into staging