aurel32 [Sat, 3 Jan 2009 13:31:19 +0000 (13:31 +0000)]
Add helper macros for later patches.
Remove N_ELEMS, VECTOR_FOR, and VECTOR_FOR_I macros. Retain the
VECTOR_FOR_INORDER_I macros as the clearest way of expressing the intent
of iterating over elements in their stored target-endian order.
aurel32 [Sat, 3 Jan 2009 12:36:05 +0000 (12:36 +0000)]
tcg: remove tcg_global_reg2_new_hack()
This patch removes the unused tcg_global_reg2_new_hack() function, which
was added in r4438 to work around a register shortage problem regarding
dyngen. The only ever user of this function was removed in r4577.
aurel32 [Sat, 3 Jan 2009 12:35:57 +0000 (12:35 +0000)]
Fix and rearrange 'tarbin' Makefile rule
This patch fixes the 'tarbin' Makefile rule (which was broken due to
a missing '\' for line-continuation), and also rearranges that rule to
match the ordering that is used in the configure script, so that the
list can be checked more easily, to avoid conflicts, etc.
aurel32 [Sat, 3 Jan 2009 12:35:47 +0000 (12:35 +0000)]
TCG: Fix documentation of qemu_ld/st ops
The functions defined in tcg/tcg-op.h have no _i32 or _i64 suffix,
qemu_ld64 and qemu_st64 were missing from the list, and there are
no 'plain' qemu_ld/qemu_st ops.
aurel32 [Thu, 1 Jan 2009 14:09:05 +0000 (14:09 +0000)]
tcg_temp_local_new should take no parameter
This patch removes useless type information in some calls to
tcg_temp_local_new. It also removes the parameter from the
macro declaration; if a target has to use a specific non-default
size then it should use tcg_temp_local_new_{i32,i64}.
aurel32 [Thu, 1 Jan 2009 13:03:36 +0000 (13:03 +0000)]
target-mips: DMA support for RC4030 chipset
Attached patch implements DMA support to RC4030 chipset and simplifies
jazz IO part (at 0xf0000000), where registers contain 16 bit values.
Config register has not a clear meaning (only one value is always valid,
and sometimes another one), so use a magic value instead.
The patch also wires DMA transfers for the SCSI adapter in the Jazz
emulation (Mips Magnum 4000 and Acer Pica 61).
aliguori [Mon, 29 Dec 2008 17:14:15 +0000 (17:14 +0000)]
Parse --cc and --cross-prefix earlier and use CC to determine cpu and host
We have been relying on uname to determine the host cpu architecture and
operating system. This is totally broken for cross compilation. It was
workable in the past because you can manually override both settings but after
the host USB passthrough refactoring, cross host builds were broken.
This moves the parsing of --cc and --cross-prefix to before the probes for cpu
and host. Complation testing is used to determine the host and CPU types. I've
only added checks for i386, x86_64, Linux, and Windows since these are the only
platforms I have access to for testing. Everything else falls back to uname.
It should be relatively easy to add the right checks for other platforms and
eliminate uname altogether.
aurel32 [Sat, 20 Dec 2008 23:41:32 +0000 (23:41 +0000)]
softfloat-native: fix type of float_rounding_mode
fegetround() and fesetround() are using an int type. Change the type of
float_rounding_mode and floatx80_rounding_precision in the float_status
structure for consistency.
aliguori [Fri, 19 Dec 2008 16:17:10 +0000 (16:17 +0000)]
Make sure ACPI structures are byte-aligned
Apparently, guests are very tolerant of corrupt ACPI tables because our
tables have been badly corrupted for some time now. A version of
Knoppix using a 2.6.11 kernel refused to boot and it turned out it was
due to the interrupt override table introduced by the recent HPET
commit.
This patch updates the BIOS and introduces a patch to pack the ACPI
tables. If you have a guest that used to work and is broken by the this
commit, let me know. We have some weird hacks in the tables that I
suspect are work arounds for this bug.
pbrook [Fri, 19 Dec 2008 13:18:36 +0000 (13:18 +0000)]
Implement (very) basic Thumb2-EE support. This doesn't actually implement
EE state, just the associated system coprocessor registers. It is sufficient
to keep OS setup and context switching code happy.
pbrook [Fri, 19 Dec 2008 12:49:13 +0000 (12:49 +0000)]
When -icount is used and a TB is recompiled due to an IO access
shortly after an IRQ has been raised, env->exception_index will still be set
to EXCP_IRQ when cpu_io_recompile calls cpu_resume_from_signal.
This causes qemu to repeat the IRQ trap, with disasterous consequences.
I suspect this "works" most of the time because linux tends to drop back to
svc mode before doing actual IRQ processing, and be fairly
tolerant of spurious IRQ traps.
aurel32 [Thu, 18 Dec 2008 22:44:13 +0000 (22:44 +0000)]
User-mode GDB stub improvements - handle signals
Handle signals in the user-mode GDB stub. Report them to GDB, and
allow it to change or cancel them. Also correct the protocol numbering;
it happens to match Linux numbering for SIGINT and SIGTRAP, but that's
just good fortune.
aurel32 [Thu, 18 Dec 2008 22:42:23 +0000 (22:42 +0000)]
target-ppc: fix fres, fsqrte and remove useless code
- fres and fsqrte should not assign a float32 number to a float64 value.
- fre, fres and fsqrte are checking for cases already taken into account
by softfloat and softfloat native. Remove those useless tests.
aliguori [Thu, 18 Dec 2008 01:56:22 +0000 (01:56 +0000)]
Fix the build for non-x86/ppc targets
Since pci.c creates network devices, anything that links against pci.c
(everything) has to link against all network devices. Since virtio-net
also requires virtio, we might as well link every target against all of
the virtio devices.
This suggests that the pci.c network device creation function needs some
refactoring.
aliguori [Wed, 17 Dec 2008 23:28:44 +0000 (23:28 +0000)]
Add HPET emulation to qemu (Beth Kon)
This patch adds HPET emulation. It can be disabled with -disable-hpet. An hpet
provides a more finely granular clocksource than otherwise available on PC.
This means that latency-dependent applications (e.g. multimedia) will generally
be smoother when using the HPET.
aliguori [Wed, 17 Dec 2008 21:35:49 +0000 (21:35 +0000)]
Update to the latest Bochs BIOS
Update the PC BIOS to the latest version, split out the patches into
patch series, and update the README to point to the new location of the
Bochs BIOS source tree.
Also update the gitignore to allow the patch queue directory to be used.
aliguori [Wed, 17 Dec 2008 19:13:11 +0000 (19:13 +0000)]
virtio-net support
This adds virtio-net support. This is based on the virtio-net driver
that exists in kvm-userspace. This also adds a new qemu_sendv_packet
which virtio-net requires.
aurel32 [Tue, 16 Dec 2008 10:44:14 +0000 (10:44 +0000)]
target-ppc: IBM PowerPC 440EP Bamboo reference board emulation
Since most IO devices are integrated into the 440EP chip, "Bamboo support"
mostly entails implementing the -kernel, -initrd, and -append options.
These options are implemented by loading the guest as if u-boot had done it,
i.e. loading a flat device tree, updating it to hold initrd addresses, ram
size, and command line, and passing the FDT address in r3.
Since we use it with KVM, we enable the virtio block driver and include hooks
necessary for KVM support.
aurel32 [Tue, 16 Dec 2008 10:44:06 +0000 (10:44 +0000)]
target-ppc: PowerPC 440EP SoC emulation
Wire up the system-on-chip devices present on 440EP chips.
This patch is a little unusual in that qemu doesn't actually emulate the 440
core, but we use this board code with KVM (which does). If/when 440 core
emulation is supported, the kvm_enabled() hack can be removed.
aurel32 [Tue, 16 Dec 2008 10:43:58 +0000 (10:43 +0000)]
target-ppc: Enable KVM for ppcemb.
Implement hooks called by generic KVM code.
Also add code that will copy the host's CPU and timebase frequencies to the
guest, which is necessary on KVM because the guest can directly access the
timebase.
aurel32 [Tue, 16 Dec 2008 10:43:48 +0000 (10:43 +0000)]
Implement device tree support needed for Bamboo emulation
To implement the -kernel, -initrd, and -append options, 4xx board emulation
must load the guest kernel as if firmware had loaded it. Where u-boot would be
the firmware, we must load the flat device tree into memory and set key fields
such as /chosen/bootargs.
This patch introduces a dependency on libfdt for flat device tree support.
aurel32 [Mon, 15 Dec 2008 23:15:56 +0000 (23:15 +0000)]
target-ppc: create a helper function to allow more flexible RAM allocation for PPC 4xx
The 4xx SDRAM controller supports a small number of banks, and each bank must
be one of a small set of sizes. The number of banks and the supported sizes
varies by SoC.
This function uses the user-specified RAM size to fill in the "ram_bases" and
"ram_sizes" arrays required by ppc4xx_sdram_init().
aurel32 [Mon, 15 Dec 2008 22:59:45 +0000 (22:59 +0000)]
target-ppc: rename ppc405_sdram_init() to ppc4xx_sdram_init()
The SDRAM controller is shared across almost all 405 and 440 embedded
processors, with some slight differences such as the sizes supported for each
memory bank.