Commit Graph

9680 Commits

Author SHA1 Message Date
Aurelien Jarno afa05235a5 tcg: initial mips support
Based on a patch from Arnaud Patard (Rtp) <arnaud.patard@rtp-net.org>

A few words about design choices:
* Two registers, at and t0, are reserved for TCG internal use. They are
  useful for bswap and 64-bit ops.
* Most ops supports a constant argument with value 0, which is actually
  mapped to the zero register.
* While the at register is available for constant loading, ops only
  support a limited range of constants. TCG does a better job doing the
  register allocation and constant loading by itself. There are plenty of
  registers available anyway.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-01 00:06:15 +00:00
Aurelien Jarno e7139c440c target-mips: use physical address in lladdr
Currently the ll/sc instructions use the virtual address in both
user and system mode. Use the physical address insteead in system
mode.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-11-30 16:18:28 +01:00
Aurelien Jarno 25b91e32e0 target-mips: add a function to do virtual -> physical translations
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-11-30 16:10:04 +01:00
Aurelien Jarno 1147e18994 target-mips: split code raising MMU exception in a separate function
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-11-30 16:10:00 +01:00
Aurelien Jarno 0ae430454c target-mips: factorize load/store code in op_helper.c
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-11-30 16:06:25 +01:00
Aurelien Jarno bbe813a2dd Fix commit a167ba5085
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-11-30 15:42:59 +01:00
Aurelien Jarno a167ba5085 Add support for GNU/kFreeBSD
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-11-29 18:00:41 +01:00
Aurelien Jarno 3098b9fde9 Revert "vga: do not resize the screen on hw_invalidate"
This causes ctrl+alt+u or ctrl+alt+f to not work when windows hasn't been
resized first. Other graphic emulators do resize the screen on
hw_invalidate.

This reverts commit 0bd8246bfe.
2009-11-27 18:42:26 +01:00
Stefan Weil 63e86b2e13 Makefile: Fix spelling
Replace defconfing -> defconfig

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-11-24 19:53:50 +01:00
Aurelien Jarno 7d30175271 tcg: fix tcg_regset_{set,reset}_reg with more than 32 registers
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-11-24 19:51:13 +01:00
Arnaud Patard fea0ac23c7 cpu-all.h: fix cpu_get_real_ticks on mips host
Fix cpu_get_real_ticks:
- check should be done on __mips and not __mips_isa_rev
- linux kernels >= 2.6.25 are emulating the 2 needed rdhwr functions
  so it's safe to use rdhwr.

This is better than what's currently in but it doesn't mean it works nicely
Some tests needs to be done imho

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-11-24 19:51:13 +01:00
Arnaud Patard 3ca055883b linux-user: remove hardcoded value of _NSIG in signal.c
In a bunch of places, 64 is used as value of _NSIG but it's wrong
at least on MIPS were _NSIG is 128.

Based on a patch from Arnaud Patard <arnaud.patard@rtp-net.org>

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-11-24 19:51:12 +01:00
Aurelien Jarno 016b2b287d tcg/ppc64,x86_64: fix constraints of op_qemu_st64
This op only takes two arguments, not two.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-11-24 19:51:12 +01:00
Paul Brook e92734555f Add missing break.
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-11-24 13:10:08 +00:00
Anthony Liguori b0293e54af Update SeaBIOS
This includes the following changes:

  42bc394 Make sure to reenable ata interrupts even on error.
  494dfc6 Move SeaBIOS post/boot stack to avoid conflict with gPXE.
  3133e38 Test for broken gcc -combine on FC12.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-11-23 12:53:22 -06:00
Paul Brook 426f5abcaa ARM atomic ops rewrite
Implement ARMv6 atomic ops (ldrex/strex) using the same trick as PPC.

Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-11-22 21:35:13 +00:00
Paul Brook eee4850422 ARM RealView I2C
Add ARM Realview I2C host emulation.

Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-11-22 21:27:40 +00:00
Paul Brook 3cd035d863 GPIO I2C rework
Reqrite bitbanging I2C implementation.  New code improves stop/start
condition handling, and gives more accurate input line level.

Introduce intermediate abstraction layer for I2C bitbanging that
is not connected via a GPIO port.

Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-11-22 21:27:40 +00:00
Paul Brook 1dfe3943e9 DS1338 RTC
Implement MAXIM SD1338 RTC+NVRAM.

Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-11-22 21:27:40 +00:00
Paul Brook abd0c6bda0 BCD cleanup
Combine multiple BCD implementations.

Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-11-22 21:27:40 +00: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
Aurelien Jarno 60c9af07aa target-mips: fix physical address type in MMU functions
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-11-22 14:37:04 +01:00
Hervé Poussineau c0d674b56e [WIN32] Enable -k option on Windows too
There is no reason to have it disabled on this platform.

Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-11-22 14:19:02 +01:00
Aurelien Jarno 2a6e32dd46 target-mips: make CP0_LLAddr register CPU dependent
Depending on the CPU, CP0_LLAddr is either read-only or read-write,
and the returned value can be shifted by a variable amount of bits.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
2009-11-22 14:12:19 +01:00
Aurelien Jarno 5499b6ffac target-mips: rename CP0_LLAddr into lladdr
The variable CP0_LLAddr represent the full lladdr, not the actual
register value, which is only part of this value and depends on the
CPU.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-11-22 14:12:13 +01:00
Juergen Lock dd4239d657 Allow build of linuxboot.S with old assemblers
In the spirit of ff56954baf, fix the
build of linuxboot.S with old as(1) (as found in some BSD base systems)
by emitting the bytes of the insn it doesn't like instead.

Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-11-21 09:32:23 +00:00
Juergen Lock 929fe49721 Avoid segfault on net_tap_init() failure
Check for fd == -1 there.

Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-11-21 09:32:15 +00:00
Juergen Lock 2f859a3c10 tap-bsd: handle ifname on FreeBSD hosts
Handle ifname on FreeBSD hosts; if no ifname is given, always start
the search from tap0.  (Simplified/cleaned up version of what has been
in the FreeBSD ports for a long time.)

Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-11-21 09:32:08 +00:00
Juergen Lock 39ca4c0832 Fix tap breakage on BSD hosts (no IFF_VNET_HDR)
net/tap-bsd.c was assuming IFF_VNET_HDR was always available, which
I think isn't true on any BSD.

Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-11-21 09:32:02 +00:00
Blue Swirl 22a2bdcbae Fix OpenBSD build of qemu-io
GCC 3.3.5 generates warnings for static forward declarations of data, so
rearrange code to use static forward declarations of functions instead.

Use <getopt.h> for optind instead of local definition.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-11-21 09:06:46 +00:00
Stefan Weil 3a3fb96d0d configure: Fix spelling in comment and rework the comment
* Replace vill -> will.

* Comment was formatted to make it more readable
  and to conform to the coding standard, too.

* Description of foo="" was completed.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-11-21 00:40:55 +01:00
Aurelien Jarno 86355e0700 qemu-io: build on all platforms
Since c32d766af1, qemu-io should be
portable. It is currently built only on linux and mingw32.

This patch enables qemu-io on all platforms. Tested on FreeBSD.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-11-21 00:37:14 +01:00
Mark McLoughlin e0cf6d15e3 slirp: fix use-after-free
460fec67ee introduced a use-after free in slirp.

Cc: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-11-21 00:34:04 +01: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 100555620f ARM Cortex-A9 cpu support
Basic Cortex-A9 support.

Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-11-19 16:45:20 +00:00
Paul Brook 600114988c ARM FP16 support
Implement the ARM VFP half precision floating point extensions.

Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-11-19 16:45:20 +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
malc cd7aafcb8d sb16: remove highspeed reset code
It was never enabled in any of the public builds anyway.

Noticed by Steve Grubb.

Signed-off-by: malc <av1474@comtv.ru>
2009-11-18 19:22:57 +03:00
malc 7cbb28ed5d audio: Remove conditional around sw which can not be NULL
Noticed by Steve Grubb.

Signed-off-by: malc <av1474@comtv.ru>
2009-11-18 19:22:53 +03:00
Aurelien Jarno 493abda627 audio: link with -lpulse in addition to -lpulse-simple
Link with -lpulse in addition to -lpulse-simple, needed when --no-add-needed
is passed to the linker (gold default).

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-11-18 00:25:46 +01:00
Blue Swirl 9cf55765b9 Fix typo
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-11-17 21:27:18 +00:00
Blue Swirl 50035d3db1 Fix mingw32 build
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-11-17 21:00:38 +00:00
Blue Swirl 9c7a420265 Prevent configuring for a user emulator on a different type of OS
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-11-17 20:52:56 +00:00
Alexander Graf cfc6d90a98 Add linuxboot to BLOBS
We should install linuxboot.bin too, so let's add it to the to-be-installed
blobs.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-11-17 10:39:03 -06:00
Alexander Graf 57a46d0579 Convert linux bootrom to external rom and fw_cfg
We already have a working multiboot implementation that uses fw_cfg to get
its kernel module etc. data in int19 runtime now.

So what's missing is a working linux boot option rom. While at it I figured it
would be a good idea to take the opcode generator out of pc.c and instead use
a proper option rom, like we do with multiboot.

So here it is - an fw_cfg using option rom for -kernel with linux!

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-11-17 10:39:03 -06:00
Alexander Graf dd4b2659cd Move common option rom code to header file
We will have a linux boot option rom soon, so let's take all functionality
that might be useful for both to a header file that both roms can include.

That way we only have to write fw_cfg access code once.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-11-17 10:39:03 -06:00
Alexander Graf 77873196f3 Convert multiboot to fw_cfg backed data storage
Right now we load the guest kernel to RAM, fire off the BIOS, hope it
doesn't clobber memory and run an option rom that jumps into the kernel.

That breaks with SeaBIOS, as that clears memory. So let's read all
kernel, module etc. data using the fw_cfg interface when in the int19
handler.

This patch implements said mechanism for multiboot.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-11-17 10:39:02 -06:00
Alexander Graf 235f86ef01 Introduce rom_copy
We have several rom helpers currently, but none of them can get us
code that spans several roms into a pointer.

This patch introduces a function that copies over rom contents.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-11-17 10:38:57 -06:00
Juan Quintela ff06108b18 fw_cfg: change cur_offset to 32 bits
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-11-17 10:38:38 -06:00
Anthony Liguori 1945120112 Update SeaBIOS to latest
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-11-17 08:49:40 -06:00