History | View | Annotate | Download (26.9 kB)
sun4u: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
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.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
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.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
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.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
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
Sparc64: configure screen size from QEMU command line options
Use the FW_CFG interface to send user requested screen size and depth toOpenBIOS like 7f1aec5f93382eef75920899f4065613aeaf02a2 for ppc_oldworld.
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...
Sparc32/64: use 64 bit type for memory size
Sparc64: refactor kernel init
Sparc64: refactor CPU init
Sparc64: convert memory to qdev
Sparc64: convert boot prom to qdev
Sparc64: convert ebus to qdev
sparc64: really initialize irq
Allocate irq just before passing it to pci bridge initializationand actually use it to initialize pci bridge.
Signed-off-by: igor.v.kovalenko@gmail.com
--Kind regards,Igor V. Kovalenko
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>...
sparc64 follow pci_nic_init change
sun4u.c: correct pci_nic_init arguments followingcommit 5607c38820366954c38dd702e979499486057481
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Rename pci_register_io_region() to pci_register_bar()
This function is used to manage a PCI BAR, so make the more genericpci_register_io_region() available to other uses.
Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.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>
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.
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.
use PCI_HEADER_TYPE.
use symbolic value instead of 0x0e and related value.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Remove redundant ram_require machine properly.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7090 c046a42c-6fe2-441c-8c8c-71466251a162
Clean up VGA ram allocation.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7063 c046a42c-6fe2-441c-8c8c-71466251a162
Remove nodisk_ok machine feature (Jan Kiszka)
All archs have some kind of firmware to load and can be fine with italready. So there is not much use in enforcing the presence of a disk.If the system setup requires one, the user will notice it anyway once...
Use firmware configuration instead of NVRAM (initial patch by Aurelien Jarno)
Use firmware configuration device for boot device, kernel, initrd andkernel command line parameters on PPC, Sparc32 and Sparc64.
Update OpenBIOS images to r479 which supports the change....
Fix sparc64-softmmu breakage from r6711
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6733 c046a42c-6fe2-441c-8c8c-71466251a162
Reload ptimers on reset
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6635 c046a42c-6fe2-441c-8c8c-71466251a162
Add and use #defines for PCI device classes
This patch adds and uses #defines for PCI device classes and subclases,using a new pci_config_set_class() function, similar to the recentlyadded pci_config_set_vendor_id() and pci_config_set_device_id().
Change since v1: fixed compilation of hw/sun4u.c...
Define PCI vendor and device IDs in pci.h (Stuart Brady)
This patch defines PCI vendor and device IDs in pci.h (matching thosefrom Linux's pci_ids.h), and uses those definitions where appropriate.
Change from v1: Introduces pci_config_set_vendor_id() / pci_config_set_device_id()...
Switch to CMD646 IDE
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6361 c046a42c-6fe2-441c-8c8c-71466251a162
graphical_console_init change (Stefano Stabellini)
Patch 5/7
This patch changes the graphical_console_init function to return anallocated DisplayState instead of a QEMUConsole.
This patch contains just the graphical_console_init change and few othermodifications mainly in console.c and vl.c....
Make pci_nic_init() use qemu_setup_nic_model() (Mark McLoughlin)
Add a table of PCI NIC models to pass to qemu_setup_nic_model().
While we're at it, also add a corresponding table of NIC initfunctions.
Signed-off-by: Mark McLoughlin <markmc@redhat.com>...
Add EBUS bridge
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6266 c046a42c-6fe2-441c-8c8c-71466251a162
Fix APB
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6265 c046a42c-6fe2-441c-8c8c-71466251a162
Implement tick interrupt disable bits
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6122 c046a42c-6fe2-441c-8c8c-71466251a162
Use qemu_ram_alloc
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5630 c046a42c-6fe2-441c-8c8c-71466251a162
More realistic max_cpus
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5604 c046a42c-6fe2-441c-8c8c-71466251a162
Make DMA bottom-half driven (v2)
The current DMA routines are driven by a call in main_loop_wait() after everyselect.
This patch converts the DMA code to be driven by a constantly rescheduledbottom half. The advantage of using a scheduled bottom half is that we can...
machine struct - specify max_cpus at the per machine level (Jes Sorensen)
Introduce a max_cpus per-machine variable, allowing individual boardsto limit it's number of CPUs. Check requested number of CPUs in setupcode and exit if it exceeds the supported number for the machine....