History | View | Annotate | Download (29.9 kB)
fw_cfg: Remove FW_CFG_MAX_CPUS from fw_cfg_init()
PC will not use max_cpus for that field, so move it outside the commoncode so it can use a different value on PC.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
sysbus: Drop sysbus_from_qdev() cast macro
Replace by SYS_BUS_DEVICE() QOM cast macro using a scripted conversion.Avoids the old macro creeping into new code.
Resolve a Coding Style warning in openpic code.
Signed-off-by: Andreas Färber <afaerber@suse.de>...
sun4: Fix unchecked strdup() by switching to fw_cfg_add_string()
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Make default boot order machine specific
This patch makes default boot order machine specific instead ofset globally. The default boot order can be set per machine inQEMUMachine boot_order. This also allows a machine to receive aNULL boot order when -boot isn't used and take an appropriate action...
Make all static TypeInfos const
Since 39bffca2030950ef6efe57c2fac8327a45ae1015 (qdev: register alltypes natively through QEMU Object Model), TypeInfo as used inthe common, non-iterative pattern is no longer amended with informationand should therefore be const....
softmmu: move include files to include/sysemu/
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
misc: move include files to include/qemu/
exec: move include files to include/exec/
net: reorganize headers
Move public headers to include/net, and leave private headers in net/.Put the virtio headers in include/net/tap.h, removing the multiple copiesthat existed. Leave include/net/tap.h as the interface for NICs, andnet/tap_int.h as the interface for OS-specific parts of the tap backend....
pci: update all users to look in pci/
update all users so we can remove the makefile hack.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
cpus: Pass CPUState to qemu_cpu_kick()
CPUArchState is no longer needed there.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Rename target_phys_addr_t to hwaddr
target_phys_addr_t is unwieldly, violates the C standard (_t suffixes arereserved) and its purpose doesn't match the name (most target_phys_addr_taddresses are not target specific). Replace it with a finger-friendly,...
serial: split serial.c
Split serial.c into serial.c, serial.h and serial-isa.c. While being atcreating a serial.h header file move the serial prototypes from pc.h tothe new serial.h. The latter leads to s/pc.h/serial.h/ in tons ofboards which just want the serial bits from pc.h...
create struct for machine initialization arguments
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...
sun4u: Pass SPARCCPU to {,s,hs}tick_irq() and cpu_timer_create()
Needed for changing cpu_kick_irq() argument type to SPARCCPU.
Signed-off-by: Andreas Färber <afaerber@suse.de>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
sun4u: Pass SPARCCPU to cpu_kick_irq()
Needed for changing qemu_cpu_kick() argument type to CPUState.
sun4u: Pass SPARCCPU to cpu_set_ivec_irq()
Needed for moving halted field to CPUState.
sun/sun4u: use the new pci_vga_init() function
As a bonus it allows new vga card types (including none).
Acked-by: Blue Swirl <blauwirbel@gmail.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
vga: rename pci_vga_init() into pci_std_vga_init()
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>...
Add one new file vga-pci.h and cleanup on all platforms
Functions pci_vga_init() and pci_cirrus_vga_init() are declaredin 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 thedeclarations to vga-pci.h, so that they can be shared by...
sun4u: Use cpu_sparc_init() to obtain SPARCCPU
This prepares using it in sun4uv_init().
Signed-off-by: Andreas Färber <afaerber@suse.de>Acked-by: Blue Swirl <blauwirbel@gmail.com>
sun4u: Let cpu_devinit() return SPARCCPU
Needed for main_cpu_reset().
sun4u: Store SPARCCPU in ResetData
We can now use cpu_reset() in place of cpu_state_reset() inmain_cpu_reset().
sparc64: fix initrd loading
Initrd load address is too low, it conflicts with kernel loadaddress:rom: requested regions overlap (rom phdr #0: /tmp/vmlinux-debian-6.0.4-sparc64. free=0x0000000000742519, addr=0x0000000000400000)rom loading failed
Fix by making the initrd address variable, load initrd after kernel...
Improve interrupt handling priority
The vector interrupt has higher priority than interrupt_level_n.Also check only interrupt_level_n concurency when TL > 0, the traps ofother types may be nested.
Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Fix vector interrupt handling
Don't produce stray irq 5, don't overwrite ivec_data if still busy withprocessing of the previous interrupt.
sparc64: implement PCI and ISA irqs
Generate correct trap for external interrupts. Map PCI and ISA IRQs toRIC/UltraSPARC-IIi interrupt vectors.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
sparc hw/: Don't use CPUState
Scripted conversion: for file in hw/sun4m.c hw/sun4u.c hw/grlib.h hw/leon3.c; do sed -i "s/CPUState/CPUSPARCState/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()
Frees the identifier cpu_reset for QOM CPUs (manual rename).
Don't hide the parameter type behind explicit casts, use staticfunctions with strongly typed argument to indirect.
qom: Unify type registration
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 wherenecessary and don't put a semicolon after the closing brace....
qdev: register all types natively through QEMU Object Model
This was done in a mostly automated fashion. I did it in three steps and thenrebased it into a single step which avoids repeatedly touching every file inthe tree.
The first step was a sed-based addition of the parent type to the subclass...
pci: convert to QEMU Object Model
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
sysbus: apic: ioapic: convert to QEMU Object Model
This converts three devices because apic and ioapic are subclasses of sysbus.Converting subclasses independently of their base class is prohibitively hard.
vmstate, memory: decouple vmstate from memory API
Currently creating a memory region automatically registers it forlive migration. This differs from other state (which is enumeratedin a VMStateDescription structure) and ties the live migration codeinto the memory core....
isa: give ISABus/ISADevice to isa_create(), isa_bus_irqs() and isa_get_irq() 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>
sun4u: give ISA bus to ISA methods
sysbus: rename sysbus_init_mmio_region() to sysbus_init_mmio()
Signed-off-by: Avi Kivity <avi@redhat.com>
sun4u: convert to memory API
monitor: Restrict pic/irq_info to supporting targets
This allows to drop various stubs and move the i8359 into hwlib.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
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>...
sun4u: Pass address_space_mem to sun4uv_init
Signed-off-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Avi Kivity <avi@redhat.com>
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.
isa: Pass i/o address space to isa_bus_new
Not used yet, but at least we're provided with the correct region.
sun4u: don't set up isa_mem_base
Since we use memory API in sun4u.c, after71579cae30b53c910cd6c47ab4e683f647d36519, setting up isa_mem_baseputs vga.chain4 outside of the physical address space.
Fix by removing obsolete isa_mem_base set up.
Fix disabling interrupts in sun4u
clear interrupt request if the interrupt priority < CPU pilclear hardware interrupt request if interrupts are disabled
Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>[blauwirbel@gmail.com: added a comment about magic 2]...
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit.
fixes memory leak on repeated BAR map/unmap
Reviewed-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
pci: rename pci_register_bar_region() to pci_register_bar()
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>
hw/sun4u.c: convert to PCIDeviceInfo to initialize ids
use PCIDeviceInfo to initialize ids.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
ide: consolidate drive_get(IF_IDE)
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 accessors
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\>' )...
always qemu_cpu_kick after unhalting a cpu
This ensures env->halt_cond is broadcast, and the loop inqemu_tcg_wait_io_event and qemu_kvm_wait_io_event is exitednaturally rather than through a timeout.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
isa_mmio: Always use little endian
This patch converts the ISA MMIO bridge code to always use little endian mmio.All bswap code that existed was only there to convert from native cpuendianness to little endian ISA devices.
Signed-off-by: Alexander Graf <agraf@suse.de>...
more stdvga cleanups.
video.x is gone now. It was the only user of thevga bios_offset + bios_size logic. Zap it.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Rearrange block headers
Changing block.h or blockdev.h resulted in recompiling most objects.
Move DriveInfo typedef and BlockInterfaceType enum definitionsto qemu-common.h and rearrange blockdev.h use to decrease churn.
pci: don't overwrite multi functio bit in pci header type.
Don't overwrite pci header type.Otherwise, multi function bit which pci_init_header_type() setsappropriately is lost.Anyway PCI_HEADER_TYPE_NORMAL is zero, so it is unnecessary to zerowhich is already zero cleared....
qemu_ram_alloc: Add DeviceState and name parameters
These will be used to generate unique id strings for ramblocks. The namefield is required, the device pointer is optional as most callers don'thave a device. When there's no device or the device isn't a child of...
sparc64: clean up pci bridge map
- remove unused host state and store pci bus pointer only- do not map host state access into unused 1fe.10000000 range- reorder pci region registration- assign pci i/o region to isa_mem_base
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>...
sparc64: rename sun4u cpu to Ultrasparc IIi
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Compile dma only once
Use a qemu_irq to request CPU exit.
7 compilations less for the full build.
Compile serial only once
Push TARGET_WORDS_BIGENDIAN dependency to board level.
Compile isa_mmio only once
load_elf: replace the address addend by a translation function
A few machines need to translate the ELF header addresses into physicaladdresses. Currently the only possibility is to add a value to theaddresses.
This patch replaces the addend argument by and a translation function...
m48t59: don't use reserved _t suffix
sparc64: reimplement tick timers v4
sparc64 timer has tick counter which can be set and read,and tick compare value used as deadline to fire timer interrupt.The timer is not used as periodic timer, instead deadlineis set each time new timer interrupt is needed....
Sparc64: fix initrd
Fix HdrS offsets for Sparc64. The initrd address must be offset byKERNBASE.
Use rom_ptr mechanism to actually write to the kernel image.
Sparc64: use firmware configuration device for command line storage
Avoid a ROM conflict.
sparc64: interrupt trap handling
cpu_check_irqs- handle SOFTINT register TICK and STICK timer bits- only check interrupt levels greater than PIL value- handle preemption by higher level traps
cpu_exec- handle CPU_INTERRUPT_HARD only if interrupts are enabled...
sparc64: add macros to deal with softint and timer interrupt
Sparc64: split DPRINTF into CPUIRQ and EBUS versions
Sparc64: fix compile with DEBUG_IRQ enabled
sparc: make command line available also via firmware configuration device
pci: pci.h cleanup: move out stuff not in pci.c
pci.h declares some functions which aren'tdefined in pci.h. Clean up moving thingsto appropriate headers, and update all users.
pci: introduce pcibus_t to represent pci bus address/size instead of uint32_t
This patch is preliminary for 64 bit BAR support.Introduce dedicated type, pcibus_t, to represent pci bus address/sizeinstead of uint32_t.Later this type will be changed to uint64_t....
pci: s/PCI_ADDRESS_SPACE_/PCI_BASE_ADDRESS_SPACE_/ to match pci_regs.h
make constants for pci base address match pci_regs.h byrenaming PCI_ADDRESS_SPACE_xxx to PCI_BASE_ADDRESS_SPACE_xxx.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Acked-by: Michael S. Tsirkin <mst@redhat.com>...
Sparc64/x86: remove unneeded calls to device reset
sparc64: remove unused variables
rom loader: fix sparc -kernel boot.
Changes:(1) register pstrcpy_targphys() in rom list, it is used for kernelcommand lines by a number of architectures.(2) add rom_ptr() function to get a pointer for applying changesto loaded images. Needed for example to tell the linux kernel...
New qdev_init_nofail()
Like qdev_init(), but terminate program via hw_error() instead ofreturning an error value.
Use it instead of qdev_init() where terminating the program on failureis okay, either because it's during machine construction, or because...
Fix pci_add nic not to exit on bad model
Monitor command "pci_add ADDR nic model=MODEL" uses pci_nic_init() tocreate the NIC. When MODEL is unknown or "?", this prints to stderrand terminates the program.
Change pci_nic_init() not to treat "?" specially, and to return NULL...
serial: convert isa to qdev
Everything using standard isa I/O ports and IRQ windup is considerdbeing an actual isa device. That are all serial_init() users exceptmips_mipssim() which seems to have a non-standard IRQ windup.
baud rate is fixed at 115200 now as no caller passed in something else....
floppy: add drive properties.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
parallel: convert isa to qdev
Revert "Get rid of _t suffix"
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. Somethinglike this must be presented on the list first so people can provide input...
Get rid of _t suffix
Some not so obvious bits, slirp and Xen were left alone for the timebeing.
Signed-off-by: malc <av1474@comtv.ru>
Compile loader only once
Callers must pass ELF machine, byte swapping and symbol LSB clearinginformation to ELF loader. A.out loader needs page size information, passthat too as a parameter.
Extract prototypes to a separate file. Move loader.[ch] and elf_ops.h under hw....
Add an ISA bus version of m48t59
Many thanks to Gerd Hoffmann for finding and fixing a bug in the initialversion.
qdev: simplify isa irq assignments
isa-bus owns the isa irqs now, so it can hand them out directly.There is no need for the separate isa_connect_irqs step, drop it.
Also hard-code isa interrupts which can't be configured anyway.
qdev: drop iobase properties from isa bus
Lot of ISA devices work at fixed addresses, so having iobaseas bus property doesn't make much sense. Devices which canhave different iobases will get a device property.
Also simply hard-code stuff which can't be configured anyway....
Sparc64: use ISA bus for i8042
Sparc64: remove unused variables
ide: pass down DriveInfo instead of BlockDriverState
Fix Sparc64 breakage: add dummy ISA irqs
ide: split away ide-pci.c
create ide-pci.c and place pci bus support there.only build ide-pci support for platforms using it.
Fix build (merge with isa mmio split)
qdev: add return value to init() callbacks.
Sorry folks, but it has to be. One more of these invasive qdev patches.
We have a serious design bug in the qdev interface: device initcallbacks can't signal failure because the init() callback has noreturn value. This patch fixes it....
isa bus irq changes and fixes.
Changes:
(1) make isa-bus maintain isa irqs, complain when allocating already taken irqs. (2) note that (1) works only for isa devices converted to qdev already (floppy and ps2/kbd/mouse right now), so more work...
Unbreak Sparc64
EBus is a sort of ISA bus.
qdev/prop: convert sun4u.c to helper macros.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Message-Id:
Use qemu_irq for system_powerdown