Commit Graph

10188 Commits

Author SHA1 Message Date
Juan Quintela 58e3e40027 linuxboot.bin is a generated file
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-23 23:47:12 +01:00
Blue Swirl 22ff51ee64 qemu-nbd: fix OpenBSD linker warning
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-12-23 15:45:30 +00:00
Michael S. Tsirkin 2758aa520d e1000: add link to data sheet
Link to data sheet at intel.com so people can find it.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-12-23 15:40:42 +00:00
Blue Swirl 6474bd6909 qemu-io: suppress a warning with gcc 4.0.2
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-12-23 15:35:17 +00:00
Blue Swirl 2bff4b6fbe Compile qemu-nbd also on OpenBSD and Solaris
basename() needs #include <libgen.h>.

No prototype for daemon() is available on Solaris, but link
succeeds.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-12-23 15:34:04 +00:00
Scott Tsai 59d1c1c2d7 USB: Improve usbdevice error messages
When an non-existent USB device is specified on the command line,
print "qemu: could not add USB device 'X'".
Likewise for the usb_{add,del} monitor commands.

Signed-off-by: Scott Tsai <scottt.tw@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-23 07:25:56 +01:00
Richard Henderson 2edd07ef03 target-alpha: Initialize fpcr
Linux, at least, disables exceptions by default.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-23 07:13:45 +01:00
Richard Henderson 56f4927e34 tcg-sparc: Implement brcond2.
Split out tcg_out_cmp and properly handle immediate arguments.
Fix constraints on brcond to match what SUBCC accepts.
Add tcg_out_brcond2_i32 for 32-bit host.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-12-21 20:52:36 +00:00
Richard Henderson a212ea7553 tcg-sparc: Use TCG_TARGET_REG_BITS in conditional compilation.
The test TCG_TARGET_REG_BITS==64 is exactly the feature that we
are checking for, whereas something involving __sparc_v9__ or
__sparc_v8plus__ should be reserved for something ISA related,
as with SMULX.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-12-21 20:52:34 +00:00
Richard Henderson 431722077a tcg-sparc: Improve tcg_out_movi for sparc64.
Generate sign-extended 32-bit constants with SETHI+XOR.
Otherwise tidy the routine to avoid the need for
conditional compilation and code duplication with movi_imm32.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-12-21 20:52:06 +00:00
Richard Henderson 4a09aa895e tcg-sparc: Fix imm13 check in movi.
We were unnecessarily restricting imm13 constants to 12 bits.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-12-21 20:49:34 +00:00
Paul Brook 21a8894168 ARM PBX-A9 memory map tweaks
Add core tile memeory to the RealView PBX-A9 board.  Document the
memeory maps that are known to work with the qemu bootloader.

Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-12-21 20:19:12 +00:00
Paul Brook 209bf9658a LAN9118 improvements
Implement LAN9118 general purpose timer and PHY interrupts. Fix global
interrupt status bit.

Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-12-21 15:06:59 +00:00
Alexander Graf 73b01960b4 PPC: Make DCR uint32_t
For what I know DCR is always 32 bits wide, so we should also use uint32_t to
pass it along the stacks.

This fixes a warning when compiling qemu-system-ppc64 with KVM enabled, making
it compile without --disable-werror

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-21 16:03:03 +01:00
Aurelien Jarno b711de9565 PPC64: Fix alternate timebase
Fix the alternate time base the same way as the default timebase. SPR_ATBL
should return a 64-bit value on 64 bit implementations.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-21 13:52:08 +01:00
Alexander Graf e3ea652962 PPC64: Fix timebase
On PPC we have a 64-bit time base. Usually (PPC32) this is accessed using
two separate 32 bit SPR accesses to SPR_TBU and SPR_TBL.

On PPC64 the SPR_TBL register acts as 64 bit though, so we get the full
64 bits as return value. If we only take the lower ones, fine. But Linux
wants to see all 64 bits or it breaks.

This patch makes PPC64 Linux work even after TB crossed the 32-bit boundary,
which usually happened a few seconds after bootup.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-21 13:42:37 +01:00
Richard Henderson c4b3be3966 target-alpha: Emit tcg debug_insn_start.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-21 11:29:50 +01:00
Richard Henderson a3b3912ad0 linux-user: Add aliases for some Alpha syscalls
Alpha always used 32-bit uids, but never renamed the syscalls
to match i386 when 32-bit uids were added there.  This enables
the proper bits in syscall.c.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-21 11:29:27 +01:00
Aurelien Jarno 4f7836b7eb Update OpenBIOS PPC image to revision 647
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-21 11:10:53 +01:00
Andreas Färber 46214a2785 ppc64: Change default machine to mac99
Also change the New World default CPU to 970FX for ppc64,
since the G4 is a 32-bit CPU.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Acked-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-21 10:04:30 +01:00
Aurelien Jarno 9706c06d9c cpu-all.h: fix cpu_get_real_ticks() #ifdef
Reported-by: Hervé Poussineau <hpoussin@reactos.org>

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-20 21:18:57 +01:00
Kevin Wolf 935effc2bb Multiboot support: Fix rom_copy
ROMs need to be loaded if they are anywhere in the requested area, not
only at the very beginning. This fixes Multiboot with ELF kernels that
have more than one program header.

Signed-off-by: Kevin Wolf <mail@kevin-wolf.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-19 21:49:39 +01:00
Nathan Froyd 7631c97ec9 linux-user: add core dump support for SH
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-19 20:29:18 +01:00
Nathan Froyd 7a93cc55e9 linux-user: add core dump support for M68K
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-19 20:29:18 +01:00
Nathan Froyd 51e526063d linux-user: add core dump support for MIPS
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-19 20:29:18 +01:00
Nathan Froyd e2f3e741b4 linux-user: add core dump support for PPC
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-19 20:29:18 +01:00
Nathan Froyd d049e626ad linux-user: fix ARM core dumps on opposite-endian hosts
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-19 20:29:18 +01:00
Nathan Froyd 21e807fadb linux-user: commonify definitions of target typedefs
There's no sense in separately declaring target_{elf_greg,uid,gid,pid}_t
for every architecture.  Just declare them once with appropriate
USE_UID16 handling.

Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-19 20:29:18 +01:00
Nathan Froyd dd0a365144 linux-user: fix ELF_USE_CORE_DUMP/USE_ELF_CORE_DUMP confusion
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-19 20:29:18 +01:00
Aurelien Jarno 49995e1748 linux-user: use TARGET_ABI_FMT_lx to print abi_ulong types
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-19 20:29:18 +01:00
Aurelien Jarno f9e69bd9cf roms: allow roms to be loaded at address 0
It was possible to load roms at address 0, but commit
632cf034b4 started to forbid that, which
broke at least ARM versatile.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-19 19:45:27 +01:00
Riku Voipio 66393fb9dd linux-user: cleanup force_sig() calls
Force_sig should be always called with TARGET_ signals.
Not that it really matters with SEGV, so this patch is
just for cleanup and improving consistency.

Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-19 19:45:27 +01:00
Riku Voipio d032d1b4b4 linux-user: Fix mmap_lock ordering
mmap_lock() can be called while tb_lock() is being held. To
avoid deadlock when one thread is holding mmap_lock and another
tb_lock, _always_ lock first tb_lock().

Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-19 19:45:27 +01:00
Riku Voipio f76cfe56d9 linux-user: enable tb unlinking when compiled with NPTL
Fixes receiving signals when guest code is being executed in a tight
loop. For an example, try interrupting the following code with ctrl-c.

http://nchipin.kos.to/test-loop.c

The tight loop is ofcourse brainless, but it is also exactly how the waitpid* testcases
are implemented.

Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-19 19:45:26 +01:00
Blue Swirl 58faa1a6db user: fix compilation without -fpie
Fixes breakage by 299060a06e.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-12-19 15:44:02 +00:00
Kirill A. Shutemov 299060a06e user_only: compile everything with -fpie
We really need compile _all_ sources for user target with -fpie when
use --enable-user-pie.

It's regression introduced by commit add16157d7.

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-12-19 15:16:08 +00:00
Aurelien Jarno 060fbfe1d6 hw/openpic.c: replace tabs by spaces
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-19 16:04:52 +01:00
Alexander Graf b4b784fe98 target-ppc: Use interrupts for escc
When using the escc with Linux, we need interrupts. So instead of creating
a dummy device, let's just map them to the openpic we have anyways.

This makes Linux on PPC64 with console=ttyPZ0 work.

Obviously, this change needs to be reflected in openbios. Patch for that
follows this one. Please update the binary then.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-19 16:04:52 +01:00
Alexander Graf d14ed2548c target-ppc: Initialize OpenPIC properly
When lowering an IRQ line, we search for the line we're supposed to lower.

Usually we run into an optimization there that queues up interrupts. This
queue ends with -1. Unfortunately we didn't set the first item to -1.

This patch fixes this, making interrupts work on PPC64.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-19 16:04:52 +01:00
Anthony Liguori 0aced4e219 Update version and changelog to sync with stable branch
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-19 08:26:03 -06:00
Anthony Liguori 4303f6d800 Update to SeaBIOS 0.5.0
The only change is updating the makefile but that way we're carrying an official
release.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-19 08:26:03 -06:00
Anthony Liguori 13232b8f45 Revert "monitor: Convert do_migrate_set_speed() to QObject"
This reverts commit 3a4921047d.

From Luiz:

  do_migrate_set_speed() accepts a suffix for the 'value' argument and this is
  not good for QMP.  We will have to add a new argument type to handle that and
  this will have to wait for 0.13.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-19 08:26:03 -06:00
Anthony Liguori c749374978 e1000: Don't muck with PCI commmand register
Otherwise, the driver does not work in Linux after the INT_DISABLE changes in
PCI.

Michael Tsirkin had a patch to do this, I'm not sure what happened to it.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-19 08:26:03 -06:00
Luiz Capitulino 3b0bd6ec5b monitor: do_balloon(): Use 'M' argument type
This makes do_balloon() accept megabyte values from the user
Monitor while accepting byte values for QMP.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-19 08:26:03 -06:00
Luiz Capitulino b6e098d79f monitor: Introduce 'M' argument type
This is a target long value in megabytes which should be
converted to bytes.

It will be used by handlers which accept a megabyte value
when in "user mode".

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-19 08:26:03 -06:00
Luiz Capitulino 940489824e QMP: Update spec file
- Remove "draft" status
- Change default success response to be json-object
- Change error and event data member to be a json-object
- Update examples
- Add new section "Compatibility Considerations"
- Other fixes and clarifications

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-19 08:26:03 -06:00
Luiz Capitulino 052f1b9be5 QMP: Update README file
- Fix output description
- Fix command-line usage notes
- Minor improvements

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-19 08:26:02 -06:00
Luiz Capitulino 3661d51e8d QMP: Assure that returned data is a QDict
This is for debug purposes only.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-19 08:26:02 -06:00
Luiz Capitulino 0abc657914 QMP: Return an empty dict by default
Currently, when a regular command doesn't have any data to output,
QMP will emit:

{ "return": "OK" }

Returning an empty dict is better though, because dicts can support
some protocol changes in a compatible way.

So, with this commit we will return:

{ "return": {} }

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-19 08:26:02 -06:00
Luiz Capitulino 43e713ce93 QMP: Only handle converted commands
Looks like I dropped this check when addressing the 'query-'
commands request.

QMP should only handle converted commands, obviously.

Reported-by: Markus Armbruster <armbru@redhat.com>

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-19 08:26:01 -06:00