History | View | Annotate | Download (33.5 kB)
mips_malta: Use cpu_mips_init() to obtain MIPSCPU
Needed for main_cpu_reset().
Signed-off-by: Andreas Färber <afaerber@suse.de>
mips_malta: Pass MIPSCPU to main_cpu_reset()
Allows us to use cpu_reset() in place of cpu_state_reset().
malta: Clean allocation of bios region alias
It is sufficient to define the region alias once for all code branches.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
malta: Always allocate flash memory
There is no reason why there should not be a flash memory when theMalta emulation is started with a Linux kernel. When flash memoryis always available, the code is simpler, and it can be better tested.
malta: Use symbolic hardware addresses
The patch adds definitions of some hardware addresses and uses thesedefinitions.
It also replaces the type of all addresses from signed to unsigned values.This is only a cosmetic change because addresses are unsigned values,...
malta: Fix display for LED array
The 8-LED array was already implemented in the first commit to Malta,but this implementation was incomplete.
mips hw/: Don't use CPUState
Scripted conversion: for file in hw/mips_*.[hc]; do sed -i "s/CPUState/CPUMIPSState/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.
Signed-off-by: Andreas Färber <afaerber@suse.de>...
usb: zap hw/ush-{ohic,uhci}.h + init wrappers
Remove the uhci and ohci init wrappers, which all wrapped apci_create_simple() one-liner. Switch callsites to callpci_create_simple directly. Remove the header files wherethe wrappers where declared.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
suspend: switch acpi s3 to new infrastructure.
This patch switches pc s3 suspend over to the new infrastructure.The cmos_s3 qemu_irq is killed, the new notifier is used instead.The xen hack goes away with that too, the hypercall can simply bedone in a notifier function now....
i8254: Factor out interface header
Move the public interface of the PIT into its own header file and updateall users.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
i8254: Pass alternative IRQ output object on initialization
HPET legacy emulation will require control over the PIT IRQ output. Toenable this, add support for an alternative IRQ output object to the PITfactory function. If the isa_irq number is < 0, this object will be...
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...
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.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vga: improve VGA logic
Improve VGA selection logic, push check for device availabilty to vl.c.Create the devices at board level unconditionally.
Remove now unused pci_try_create*() functions.
Make PCI VGA devices optional.
Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>...
malta: Fix regression (i8259 interrupts did not work)
Commit 5632ae46d5bda798e971dae48ebb318ac2c3686a passes the addressof i8259 to qemu_irq_proxy. i8259 is an auto variable with undefinedvalue outside of mips_malta_init.
This made the interrupt proxy unusable: either QEMU crashes, or...
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....
audio: remove unused parameter isa_pic
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
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.
malta: give ISA bus to ISA methods
mips_malta: resolve endless loop when loading bios
Tested-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Chen Rui <chennrui@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>...
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.
Signed-off-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Avi Kivity <avi@redhat.com>
serial: Remove ioregister parameter from serial_mm_init
All callers passed 1.
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_malta: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
Merge remote-tracking branch 'qemu-kvm-tmp/memory/batch' into staging
mips: Add SMP support to the Malta board
No change to the CPU kinds, so SMP will only work ifmanually changing the cpu to 34Kf:
-cpu 34Kf -smp 2
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
pflash_cfi01/pflash_cfi02: convert to memory API
cfi02 is annoying in that is ignores some address bits; we probablywant explicit support in the memory API for that.
In order to get the correct opaque into the MemoryRegion object, theallocation scheme is changed so that the flash emulation code allocates...
Revert "Merge remote-tracking branch 'qemu-kvm/memory/batch' into staging"
This reverts commit 8ef9ea85a2cc1007eaefa53e6871f1f83bcef22d, reversingchanges made to 444dc48298c480e42e15a8fe676be737d8a6b2a1.
From Avi:
Please revert the entire pull (git revert 8ef9ea85a2cc1) while I work this...
Reviewed-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Avi Kivity <avi@redhat.com>
char: rename qemu_chr_open() -> qemu_chr_new()
char: rename qemu_chr_printf() -> qemu_chr_fe_printf()
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit.
smbus_eeprom: consolidate smbus eeprom creation oc pc_piix, mips_mapta, mips_fulong
consolidate smbus initialization for pc_piix, mips_malta and mips_fulong.
Cc: Aurelien Jarno <aurelien@aurel32.net>Cc: Huacai Chen <zltjiangshi@gmail.com>Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>...
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>
isa-bus: Remove bogus IRQ sharing check
Nothing prevented IRQ sharing on the ISA bus in principle. Not allboards supported this, neither each and every card nor driver and OS.Still, there existed valid IRQ sharing scenarios, (at least) two of themcan also be found in QEMU: >2 PC UARTs and the PREP IDE buses....
i8254: convert to qdev
Convert to qdev. Don't expose PITState.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
x86,MIPS: make vmware_vga optional
Allow failure with vmware_vga device creation and use standardVGA instead.
audio: consolidate audio_init()
consolidate audio_init() and remove references to shoundhw.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Acked-by: Blue Swirl <blauwirbel@gmail.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
gt64xxx: qdev conversion
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
mips/malta: fix board id
Board id can't be written with stl_phys() as it's read-only part ofmemory. Use stl_p() on the memory buffer instead.
Add endianness as io mem parameter
As stated before, devices can be little, big or native endian. Thetarget endianness is not of their concern, so we need to push thingsdown a level.
This patch adds a parameter to cpu_register_io_memory that allows adevice to choose its endianness. For now, all devices simply choose...
more stdvga cleanups.
video.x is gone now. It was the only user of thevga bios_offset + bios_size logic. Zap it.
Delete write only variables
Compiling with GCC 4.6.0 20100925 produced warnings like:/src/qemu/net/tap-win32.c: In function 'tap_win32_open':/src/qemu/net/tap-win32.c:582:12: error: variable 'hThread' set but not used [-Werror=unused-but-set-variable]...
Use GCC_FMT_ATTR (format checking)
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
mips_malta: Fix format strings
Fix two compiler warnings (when format attribute is applied).
Cc: Aurelien Jarno <aurelien@aurel32.net>Cc: Blue Swirl <blauwirbel@gmail.com>Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Blue Swirl <blauwirbel@gmail.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.
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...
Remove useless device dependency of HAS_AUDIO
System architecture dictates whether HAS_AUDIO is defined. It's thenuseless to check for HAS_AUDIO in files which are only used on thosearchitectures which always have audio.
hpet/rtc: Rework RTC IRQ replacement by HPET
Allow the intercept the RTC IRQ for the HPET legacy mode. Then pushrouting to IRQ8 completely into the HPET. This allows to turnhpet_in_legacy_mode() into a private function. Furthermore, this stopsthe RTC from clearing IRQ8 even if the HPET is in control....
Compile dma only once
Use a qemu_irq to request CPU exit.
7 compilations less for the full build.
rtc: make rtc_xxx accept/return ISADevice instead of RTCState.
To match rtc_xxx with qdev, make rtc_xxx accept and return ISADeviceinstead of RTCState.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Acked-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Compile pflash_cfi01 only once
Push TARGET_WORDS_BIGENDIAN dependency to board level.
Compile acpi only once
Use qemu_irqs to trigger CMOS S3 and SMI events.
Avoid using kvm.h, which uses CPUState.
Compile some MIPS devices only once
Move CPU specific declarations to a separate file.
Compile serial 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...
fdc: don't use reserved _t suffix
mips/malta: fix typo
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.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
mips malta: fix indentation
mips-malta: fix reset
(broken by 45a50b1668822c23afc2a89f724654e176518bc4)
mips: fix CPU reset
Don't load the kernel twice during reset.See f2d74978764f62d832d61ac17bb5d934ade58816.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
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
i2c: addresses are load/save as uint8_t values, change types to reflect this
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
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>
Fix Sparse warning about obsolete struct initializer
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....
mips malta: ensure that the serial ports are associated with a device
The serial ports should be present even if associated with a null deviceas some firmware wants to initialize them.
qdev/isa: convert real time clock
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....
mips malta: Fix fdc regression and use qdev for i8042 setup
8baf73adf664e79eae201c3f618078a220a661d9 (qdev/isa: convert fdc)breaks MIPS Malta:
Tried to create isa device isa-fdc with no isa bus present
Fix this by creating an isa bus for piix4.This change also requires some more qdev related changes...
ide: pass down DriveInfo instead of BlockDriverState
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)
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...
Make CPURead/WriteFunc structure 'const'
kill drives_table
First step cleaning up the drives handling. This one does nothing butremoving drives_table[], still it became seriously big.
drive_get_index() is gone and is replaced by drives_get() which handsout DriveInfo pointers instead of a table index. This needs adaption in...
qdev: rework device properties.
This patch is a major overhaul of the device properties. The propertiesare saved directly in the device state struct now, the linked list ofproperty values is gone.
Advantages: * We don't have to maintain the list with the property values....
Revert "Introduce reset notifier order"
This reverts commit 8217606e6edb49591b4a6fd5a0d1229cebe470a9 (andupdates later added users of qemu_register_reset), we solved theproblem it originally addressed less invasively.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
Support addr=... in option argument of -net nic
Make net_client_init() accept addr=, put the value into structNICinfo. Use it in pci_nic_init(), and remove arguments bus anddevfn.
Don't support addr= in third argument of monitor command pci_add,because that clashes with its first argument. Admittedly unelegant....
Remove io_index argument from cpu_register_io_memory()
The parameter is always zero except when registering the three internalio regions (ROM, unassigned, notdirty). Remove the parameter to reducethe API's power, thus facilitating future change.
Signed-off-by: Avi Kivity <avi@redhat.com>...
Use relative path for bios
Look for bios and other support files relative to qemu binary, rather thana hardcoded prefix.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Add common BusState
Implement and use a common device bus state. The main side-effect isthat creating a bus and attaching it to a parent device are no longerseparate operations. For legacy code we allow a NULL parent, but thatshould go away eventually....
Introduce reset notifier order
Add the parameter 'order' to qemu_register_reset and sort callbacks onregistration. On system reset, callbacks with lower order will beinvoked before those with higher order. Update all existing users to thestandard order 0....
Introduce is_default field for QEMUMachine
f80f9ec changed the order that machines are registered which had the effect ofchanging the default machine. This changeset introduces a new is_default fieldso that machine types can declare that they are the default for an architecture....
Convert machine registration to use module init functions
This cleans up quite a lot of #ifdefs, extern variables, and other ugliness.
Remove obsolete BIOS_SIZE from sysemu.h
BIOS_SIZE is no longer needed by vl.c, so there's no point having it insysemu.h.
SMBus qdev conversion
Replace gcc variadic macro extension with C99 version
Remove vga_ram_size
The vga_ram_size argument to machine init functions always has the samevalue, and is ignored by many machines (including SPARC32 which has anobsolete ifdef for VGA_RAM_SIZE).
Remove it and push VGA_RAM_SIZE into vga_int.h.
Push AUD_init down to devices
Now we can safely call AUD_init multiple times we can push it down toindividual audio devices, rather than having to pass it from the boardinit.