sim-card
/
qemu
Archived
10
0
Fork 0
Commit Graph

657 Commits

Author SHA1 Message Date
Michael S. Tsirkin 2292b33986 notifier: event notifier implementation
event notifiers are slightly generalized eventfd descriptors. Current
implementation depends on eventfd because vhost is the only user, and
vhost depends on eventfd anyway, but a stub is provided for non-eventfd
case.

We'll be able to further generalize this when another user comes along
and we see how to best do this.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-04-01 13:56:43 -05:00
Anthony Liguori 087431d1d1 virtio-pci: compile per-target
With vhost, virtio-pci needs to include kvm.h and kvm.h needs to be built
per-target.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-04-01 13:56:19 -05:00
Anthony Liguori b33612d035 Fix -enable-kvm
Make vl.o compiled per target and fix a thinko in hw/acpi.c.  It's not trivial
to make kvm.h consumable by compiled-once files.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-04-01 09:58:48 -05:00
Blue Swirl 2b5eb37123 Compile most PPC devices only once
Make byte swapping unconditional since PPC is big endian.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-30 17:36:23 +00:00
Blue Swirl add85a76bb Compile prep_pci only once
Make byte swapping unconditional since PPC is big endian.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-29 19:24:04 +00:00
Blue Swirl 29e922b61f Compile qemu-timer only once
Arrange various declarations so that also non-CPU code can access
them, adjust users.

Move CPU specific code to cpus.c.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-29 19:24:00 +00:00
Blue Swirl 5c4532ee78 Compile openpic only once
Replace TARGET_PAGE_SIZE with 4096. Make byte swapping unconditional
since PPC is big endian.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-29 19:23:59 +00:00
Blue Swirl 02c7c992f0 Compile ide/macio only once
Replace TARGET_PAGE_SIZE with 4096. Make byte swapping unconditional
since PPC is big endian.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-29 19:23:57 +00:00
Blue Swirl 3d08ff698b Compile pflash_cfi01 only once
Push TARGET_WORDS_BIGENDIAN dependency to board level.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-29 19:23:56 +00:00
Blue Swirl 5f9fc5ad7e Compile pflash_cfi02 only once
Push TARGET_WORDS_BIGENDIAN dependency to board level.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-29 19:23:55 +00:00
Blue Swirl 53b67b3052 Compile acpi only once
Use qemu_irqs to trigger CMOS S3 and SMI events.

Avoid using kvm.h, which uses CPUState.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-29 19:23:52 +00:00
Blue Swirl ad96090a01 Refactor target specific handling, compile vl.c only once
Move target specific functions and RAM handling to arch_init.c.

Add a flag to QEMUOptions structure to indicate for which
architectures the option is allowed, check the flag
in run time and remove conditional code in option handling.

Now that no target dependencies remain, compile vl.c only once
for all targets.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-29 19:23:52 +00:00
Blue Swirl 296af7c952 Refactor CPUState handling out of vl.c
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-29 19:23:50 +00:00
Blue Swirl 57448a975e Compile vmware_vga only once
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-27 18:18:17 +00:00
Blue Swirl b970ea8f8d Compile some MIPS devices only once
Move CPU specific declarations to a separate file.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-27 07:26:16 +00:00
Blue Swirl f7736b91c4 Compile ide/core only once
Make win2k install hack unconditional as it is still restricted to
x86 only in vl.c.

Replace TARGET_PAGE_SIZE and 4096 with PAGE_SIZE.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-27 06:20:53 +00:00
Blue Swirl 8f51bdab44 Compile virtio-pci only once
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-22 20:18:58 +00:00
Blue Swirl 70615c38de Compile sound devices only once
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-22 20:18:40 +00:00
Blue Swirl 952760bb7b Compile pci_host only once
Convert pci_host_conf_register_mmio_noswap(x) to
pci_host_conf_register_mmio(x, 0).

Convert pci_host_conf_register_mmio(x) to
pci_host_conf_register_mmio(x, 1) for big endian hosts, all cases
happen to be BE.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-21 19:47:15 +00:00
Blue Swirl c1f63a9d43 Compile pcie_host only once
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-21 19:47:14 +00:00
Blue Swirl 6842a08ee0 Compile pci only once
Move coalesced_mmio declarations to a more accessible location.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-21 19:47:13 +00:00
Blue Swirl f1698408f1 Compile usb-ohci only once
Push TARGET_WORDS_BIGENDIAN dependency to board level.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-21 19:47:12 +00:00
Blue Swirl 2d48377a85 Compile serial only once
Push TARGET_WORDS_BIGENDIAN dependency to board level.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-21 19:47:11 +00:00
Blue Swirl d3ffc7a6e7 Compile ne2000_isa only once
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-21 19:47:10 +00:00
Blue Swirl 84108e128e Compile isa_mmio only once
Push TARGET_WORDS_BIGENDIAN dependency to board level.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-21 19:47:09 +00:00
Blue Swirl 7161e5710b Compile most PCI network cards only once
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-21 19:47:08 +00:00
Blue Swirl e1060e9d2d Compile qemu-error only once
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-21 19:47:07 +00:00
Blue Swirl 64dc9c31ae Compile async only once
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-21 19:47:07 +00:00
Blue Swirl 35da37e141 Compile fdc only once
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-21 19:47:06 +00:00
Blue Swirl 9953b2fc28 Compile most IDE devices only once
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-21 19:47:05 +00:00
Blue Swirl 4c65f1e5ba Compile usb-uhci only once
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-21 19:47:04 +00:00
Blue Swirl 7f55c7ced6 Compile vga-isa only once
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-21 19:47:03 +00:00
Blue Swirl 7109371158 Compile pcspk only once
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-21 19:47:02 +00:00
Blue Swirl df6327780d Compile i8254 only once
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-21 19:47:02 +00:00
Blue Swirl b994504610 Compile parallel only once
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-21 19:47:01 +00:00
Blue Swirl 1afdfddc41 Compile vga-pci only once
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-21 19:47:00 +00:00
Blue Swirl 4d9045339a Compile disassemblers only once
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-21 08:28:47 +00:00
Paolo Bonzini db1a49726c split out qemu-timer.c
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-03-17 11:16:15 -05:00
Anthony Liguori 4a39943bd1 Merge remote branch 'markus/qerror' into staging 2010-03-17 09:44:37 -05:00
Markus Armbruster b4a51f7f5d error: Move qemu_error() & friends from monitor.c to own file
They're about reporting errors, not about the monitor.
2010-03-16 16:55:05 +01:00
Aurelien Jarno 409dbce54b load_elf: replace the address addend by a translation function
A few machines need to translate the ELF header addresses into physical
addresses. Currently the only possibility is to add a value to the
addresses.

This patch replaces the addend argument by and a translation function
and an opaque passed to the function. A NULL function does not translate
the address.

The patch also convert all machines that have an addend, simplify the
PowerPC kernel loading and fix the MIPS kernel loading using this new
feature. Other machines may benefit from this feature.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-03-16 08:38:05 +01:00
Andre Przywara c6dc6f63bf x86/cpuid: move CPUID functions into separate file
about half of target-i386/helper.c consist of CPUID related functions.
Only one of them is a real TCG helper function. So move the whole
CPUID stuff out of this into a separate file to get better
maintainable parts.
This is only code reordering and should not affect QEMU's
functionality.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-03-13 16:50:54 +01:00
Richard Henderson 6049f4f831 alpha-linux-user: Implement signals.
Move userland PALcode handling into linux-user main loop so that
we can send signals from there.  This also makes alpha_palcode.c
system-level only, so don't build it for userland.  Add defines
for GENTRAP PALcall mapping to signals.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-28 17:54:52 +01:00
Blue Swirl 51464fafdf Don't compile rwhandler.c for user targets
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-02-20 09:27:38 +00:00
Michael S. Tsirkin 049f7adbd5 rwhandler: simplified way to register for mem/io
Some users prefer a single callback with length passed as parameter to
using b/w/l callbacks. It would maybe be cleaner to just pass length to
existing callbacks but that's a lot of churn.  So for now add a wrapper.
For convenience use pcibus_t for address so a single callback can be
used for pci io and pci memory.

I did have to resort to preprocessor to reduce code duplication.  It is
however slightly more straightforward, and better contained than what we
had with pci_host_template.h. Again, it would go away if we just passed
len to existing callbacks.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-02-14 16:10:53 +02:00
Loïc Minier da79030f47 linux-user: adapt uname machine to emulated CPU
This patch for linux-user adapts the output of the emulated uname()
syscall to match the configured CPU.  Tested with x86, x86-64 and arm
emulation.

Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
Signed-off-by: Loïc Minier <lool@dooz.org>
2010-02-06 17:19:43 +01:00
Blue Swirl e1c6bbabee Refactor DEC 21154 PCI bridge
It's currently not used by PPC machines. Refactor so that also Sparc64
machines can use it.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-02-05 18:48:36 +00:00
Edgar E. Iglesias 2548de3a34 microblaze: The petalogix s3adsp board uses intel flashes
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
2010-01-24 17:15:05 +01:00
Amit Shah 4d3053a3c6 Move virtio-serial to Makefile.objs
There's nothing target-dependent in the virtio-serial code so allow it
to be compiled just once for all the targets.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-20 08:25:23 -06:00
Amit Shah 98b19252cf virtio-console: qdev conversion, new virtio-serial-bus
This commit converts the virtio-console device to create a new
virtio-serial bus that can host console and generic serial ports. The
file hosting this code is now called virtio-serial-bus.c.

The virtio console is now a very simple qdev device that sits on the
virtio-serial-bus and communicates between the bus and qemu's chardevs.

This commit also includes a few changes to the virtio backing code for
pci and s390 to spawn the virtio-serial bus.

As a result of the qdev conversion, we get rid of a lot of legacy code.
The old-style way of instantiating a virtio console using

    -virtioconsole ...

is maintained, but the new, preferred way is to use

    -device virtio-serial -device virtconsole,chardev=...

With this commit, multiple devices as well as multiple ports with a
single device can be supported.

For multiple ports support, each port gets an IO vq pair. Since the
guest needs to know in advance how many vqs a particular device will
need, we have to set this number as a property of the virtio-serial
device and also as a config option.

In addition, we also spawn a pair of control IO vqs. This is an internal
channel meant for guest-host communication for things like port
open/close, sending port properties over to the guest, etc.

This commit is a part of a series of other commits to get the full
implementation of multiport support. Future commits will add other
support as well as ride on the savevm version that we bump up here.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-20 08:25:23 -06:00
Paolo Bonzini 59bc10ee01 finish VPATH -> vpath translation
This adds a few more vpath suffixes and points the remaining two paths
explicitly to $(SRC_PATH) in order to eliminate the VPATH assignment
from config-host.mak.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Cc: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-08 16:55:03 -06:00
Adam Lackorzynski 52001445c9 multiboot: Separate multiboot loading into separate file
Move multiboot loading code into separate files as suggested by Alex Graf.

Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-08 09:58:41 -06:00
H. Peter Anvin c9f398e53f debugcon: support for debugging consoles (e.g. Bochs port 0xe9)
Add generic support for debugging consoles (simple I/O ports which
when written to cause debugging output to be written to a target.)
The current implementation matches Bochs' port 0xe9, allowing the same
debugging code to be used for both Bochs and Qemu.

There is no vm state associated with the debugging port, simply
because it has none -- the entire interface is a single, stateless,
write-only port.

Most of the code was cribbed from the serial port driver.

v2: removed non-ISA variants (they can be introduced when/if someone
wants them, using code from the serial port); added configurable
readback (Bochs returns 0xe9 on a read from this register, mimic that
by default)  This retains the apparently somewhat controversial user
friendly option, however.

v3: reimplemented the user friendly option as a synthetic option
("-debugcon foo" basically ends up being a parser-level shorthand for
"-chardev stdio,id=debugcon -device isa-debugcon,chardev=debugcon") --
this dramatically reduced the complexity while keeping the same level
of user friendliness.

v4: spaces, not tabs.

v5: update to match current top of tree.  Calling qemu_chr_open()
already during parsing no longer works; defer until we are parsing the
other console-like devices.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-08 09:58:40 -06:00
Paolo Bonzini 076d247142 Use vpath directive
The vpath directive has two advantages over the VPATH variable:
1) it allows to skip searching of .o files; 2) the default semantics
are to append to the vpath, so there is no confusion between "VPATH=xyz"
and "VPATH+=xyz".

Since "vpath %.c %.h PATH" is not valid, I'm introducing a wrapper
macro to append one or more directories to the vpath.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-08 09:58:40 -06:00
Andreas Färber 0e8c9214ba Drop --whole-archive and static libraries
Juan has contributed a cool Makefile infrastructure that enables us to drop
static libraries completely:

Move shared obj-y definitions to Makefile.objs, prefixed {common-,hw-,user-},
and link those object files directly into the executables.

Replace HWLIB by HWDIR, specifying only the directory.

Drop --whole-archive and ARLIBS in Makefiles and configure.

Drop GENERATED_HEADERS dependency in rules.mak, since this rebuilds all
common objects after generating a target-specific header; add dependency
rules to Makefile and Makefile.target instead.

v2:
- Don't try to include /config.mak for user emulators
- Changes to user object paths ("Quickfix for libuser.a drop") were obsoleted
  by "user_only: compile everything with -fpie" (Kirill A. Shutemov)

v3:
- Fix dependency modelling for tools
- Remove comment on GENERATED_HEADERS obsoleted by this patch

Signed-off-by: Andreas Färber <afaerber@opensolaris.org>
Cc: Blue Swirl <blauwirbel@gmail.com>
Cc: Palle Lyckegaard <palle@lyckegaard.dk>
Cc: Ben Taylor <bentaylor.solx86@gmail.com>
Cc: Juan Quintela <quintela@trasno.org>
Cc: Kirill A. Shutemov <kirill@shutemov.name>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-01-07 18:08:53 +00:00
Alexander Graf 8cb310e130 Add S390x virtio machine description
In order to use the new S390x virtio bus we just introduced, we also
need a machine description that sets up the machine according to our
PV specification.

Let's add that machine description and be happy!

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-05 17:36:05 +01:00
Alexander Graf f3304eea93 Add S390x virtio machine bus
On S390x we don't want to go through the hassle of emulating real existing
hardware, because we don't need to for running Linux.

So let's instead implement a machine that is 100% based on VirtIO which we
fortunately implement already.

This patch implements the bus that is the groundwork for such an S390x
virtio machine.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-05 17:36:05 +01:00
Stefan Weil 9ea37780a4 Remove rule for config-devices.h
Since commit a992fe3d0f
config-devices.h is no longer used.

So there is no need to keep the dependency rules
any longer.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-03 15:26:01 -06:00
Paul Brook a992fe3d0f Makefile dependencies for device configs
Add makefile dependencies for target specific device configs.
These will copy the default config if none exists, obsoleting the old
configure time code.  If a config already exists but is older than the
default then print a warning.

Also remove config-devices.h.  Code does not and should not care which
devices are being built.

Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-11-22 21:24:54 +00:00
Paul Brook f7c703250c ARM PBX-A9 board support
Implement ARM RealView PBX-A9 board support.

Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-11-19 16:45:21 +00:00
Paul Brook f165b53a89 Built network devices once
Move some generic NICS into libhw, and build them for ARM targets.

Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-11-19 16:42:45 +00:00
Paul Brook 2a42499017 LAN9118 emulation
Add SMSC LAN9118 ethernet emulation.

Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-11-16 17:06:43 +00:00
Juan Quintela f527c57935 fix parallel build
Based on a ideas of Daniel Jacobowitz + Stefan Weil

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-11-12 11:23:54 -06:00
Isaku Yamahata a9f4994611 pci: pcie host and mmcfg support.
This patch adds common routines for pcie host bridge and pcie mmcfg.
This will be used by q35 based chipset emulation.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-11-09 08:43:09 -06:00
Isaku Yamahata 4f5e19e6c5 pci_host.h: move functions in pci_host.h into .c file.
split static functions in pci_host.h into pci_host.c and
pci_host_template.h.
Later a structures declared in pci_host.h, PCIHostState, will be used.
However pci_host.h doesn't allow to include itself easily. This patches
addresses it.

pci_host.h includes functions which are instantiated in .c by including
pci_host.h with typedefing pci_addr_t.
pci_addr_t is per pci host bridge and is typedef'ed to uint32_t for ioio
or target_phys_addr_t for mmio in .c file.
That prevents from including pci_host.h to use PCIHostState because of
requiring type, pci_addr_t.

Its purpose to include is to instantiate io function for mmio or ioio
depending on which pci host bridge requires ioio or mmio.
To avoid including code, we always instantiate both version.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-11-09 08:43:07 -06:00
Kevin Wolf 4f999d05f5 Split out bottom halves
Instead of putting more and more stuff into vl.c, let's have the generic
functions that deal with asynchronous callbacks in their own file.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:28:59 -05:00
Gerd Hoffmann 94e1a912b2 pcnet: split away lance.c (sparc32 code).
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:28:40 -05:00
Juan Quintela 4c3df0ecc2 ide: split cmd646 and piix from pci.c
This patch splits cmd646 specific code from pci.c.
This patch splits piix4 specific code from pci.c.
And compile new piix.o and cmd646.o when they are needed.
The only change that is not code movemet is removal of cmd646 specific parts
in bmdma_readb/writeb for piix.

Patchworks-ID: 35301
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-12 09:42:30 -05:00
Juan Quintela 185c66c81d Only compile isa_mmio when one target uses it
Patchworks-ID: 35200
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-08 21:17:11 -05:00
Juan Quintela 642575843f Only compile usb_ohci when one target uses it
Patchworks-ID: 35199
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-08 21:17:11 -05:00
Juan Quintela 3d0f151783 Generate gdbstub-xml.c only when needed
First user of new config-devices.mak

Patchworks-ID: 35198
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-08 21:17:11 -05:00
Juan Quintela fe0d4d3f77 Generate config-devices.h
Generate config-devices.h for each target and config-all-devices.h for
common library.  We don't want to name both config-devices.h to avoid
path problems

Patchworks-ID: 35195
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-08 21:17:10 -05:00
Juan Quintela 1f3d3c8fd7 Add new config-devices.mak for each target
We generate config-devices.h from there automatically.
We need to do it in main Makefile, because we are going to need a main
Makefile for them.

Patchworks-ID: 35196
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-08 21:17:10 -05:00
Juan Quintela 91880d96a1 Move generation of config-target.h to Makefile from configure
Patchworks-ID: 35194
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-08 21:17:04 -05:00
Juan Quintela 25be210f69 Rename config.{h, mak} config-target.{h, mak}
Add config.h file that includes config-target.h and config-host.h

Patchworks-ID: 35193
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-08 21:17:03 -05:00
Juan Quintela deed3ccfca Don't include config-host.mak from inside config.mak
Include it directly in Makefile.target

Patchworks-ID: 35189
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-08 21:17:02 -05:00
Blue Swirl add16157d7 Compile some user files only once for all targets
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-27 16:26:02 +00:00
Blue Swirl 05d00df4e1 Fix user emulator breakage
Fix breakage in the following conditions:
- use in-tree building
- build user targets after system targets

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-27 13:56:55 +00:00
Blue Swirl 3f600fa030 Revert "This files are compiled in libqemu.a now"
This reverts commit fe6549dfd7.

tcg-runtime and host-utils are needed on 32 bit host and they are not part
of libqemu.a.

Thanks to Stefan Weil for reporting.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-25 19:21:06 +00:00
Juan Quintela befb031654 clean: remove ide/*.o files on clean
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-09-25 17:28:33 +02:00
Juan Quintela fe6549dfd7 This files are compiled in libqemu.a now
This fixes compilation of linux-user with today qemu, please apply.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-09-23 09:25:02 +02:00
Blue Swirl 52d946208e Fix user targets broken by 96e132e24e
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-21 15:24:07 +00:00
Blue Swirl c2b023b627 Compile host-utils only once
See also facd285778 and
34005a0060.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-20 19:20:05 +00:00
Blue Swirl 96e132e24e Compile TCG runtime library only once
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-20 19:06:34 +00:00
Blue Swirl bd390e6425 Compile ne2000 only once
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-20 16:19:32 +00:00
Blue Swirl afcea8cbde ioports: remove unused env parameter and compile only once
The CPU state parameter is not used, remove it and adjust callers. Now we
can compile ioport.c once for all targets.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-20 16:05:47 +00:00
Blue Swirl 5e520a7d50 Compile msix only once
Get page size in device init.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-20 15:35:55 +00:00
Blue Swirl ca20cf32ab Compile loader only once
Callers must pass ELF machine, byte swapping and symbol LSB clearing
information to ELF loader. A.out loader needs page size information, pass
that too as a parameter.

Extract prototypes to a separate file. Move loader.[ch] and elf_ops.h under hw.

Adjust callers. Also use target_phys_addr_t instead of target_ulong for
addresses: loader addresses aren't virtual.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-20 14:58:02 +00:00
Blue Swirl a333cd7166 Compile qemu-config only once
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-20 08:28:29 +00:00
Blue Swirl 9801c7b436 Compile wdt_i6300esb only once
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-20 08:02:28 +00:00
Gerd Hoffmann feef310217 ide/pci: convert to qdev.
With this patch applied ide drives (when attached to a pci adapter) can
be created via -device, like this:

  -drive if=none,id=mydisk,file=/path/to/disk.img
  -device ide-drive,drive=mydisk,bus=ide.0,unit=0

Note that creating a master on ide1 doesn't work that way.  That is a
side effect of qemu creating a cdrom automagically even if you don't
ask for it.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-15 20:04:24 +00:00
Blue Swirl 5c637a20e9 Fix breakage by f80237d450 for ISA-less targets
Move ISA bus to HW library.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-14 18:34:54 +00:00
Kirill A. Shutemov 34005a0060 Add configure option to compile user targets as PIE
Build uset targers as true PIE if user want to keep qemu
self-virtualizable.

v5:
  - Split into to patches: drop link hack and add PIE support
  - do not build PIE by default and drop toolchain check

v4:
  - Add test for toolchain if it has proper PIE support

v3:
  - One more pice of the hack was removed
  - Description updated

v2:
  - Add configure options do enable/disable PIE for usermode targets.
    Disabling can be useful if you build uswing toolchain which has
    broken PIE support. PIE for usermode targets enabled by default.

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-12 13:17:45 +00:00
Gerd Hoffmann 9453c5bc26 qdev/isa: convert ne2000
Also split the isa bits into a separate source file, so we don't drag in
a dependency for isa-bus.o for machines which want ne2k_pci only.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2009-09-10 19:48:01 +04:00
Juan Quintela 79b97bf2e7 vga: split vga-isa-mm.o
It is only used in mips softmmu, compile only there.
it_shift field was only used for vga_isa_mm, move it from VGACommonState
to ISAVGAMMstate.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-09 14:55:11 -05:00
Juan Quintela 76323919df vga: split isa bits inco vga-isa.c
Adjust all the VGAState in VGACommonState
Compile vga-isa.o in the targets that use it

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-09 14:55:11 -05:00
Juan Quintela 47d37dd9c8 vga: split pci bits into vga-pci.c
Adjust all the VGAState in VGACommonState
Compile vga-pci.o only for targets that use it.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-09 14:55:11 -05:00
Juan Quintela 823e675a07 Split piix4 support from piix_pci.c
Now mips_malta uses piix4 and pc's use piix_pci definitions

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-04 09:37:22 -05:00
Gerd Hoffmann 59f2a78793 ide: move code to hw/ide/
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27 20:46:50 -05:00
Gerd Hoffmann 3f221c8d02 ide: split away ide-microdrive.c
create ide-microdrive.c and place microdrive support there.
only build ide-microdrive support for platforms using it.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27 20:43:33 -05:00