History log of /external/qemu/hw/i386/pc.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
46d03d3c2f65781b5f826c0ae750224154008bbd 12-Apr-2014 David 'Digit' Turner <digit@google.com> Remove obsolete goldfish switch and memlog devices.

These devices were never used in any official SDK system images,
so remove them entirely.

Change-Id: I061c189a278cb9ca1c6cfe7eaf62d55959d9dd04
/external/qemu/hw/i386/pc.c
bf7a22f3a6c38d359d2e933dec4706d1c7375f0a 25-Mar-2014 David 'Digit' Turner <digit@google.com> Move cpu_xxx functions to qom/cpu.h

This patch moves a few CPU-releated function declarations to
include/qom/cpu.h, while changing their signature to take a
CPUState instead of a CPUOldState.

Change-Id: I5f09b522dc755be334973a27f58b6704fbccc4c6
/external/qemu/hw/i386/pc.c
6657678c3d86395084f6a699e73614195f06c445 24-Mar-2014 David 'Digit' Turner <digit@google.com> Introduce CPUState.

This patch splits the definitions previously found in CPUArchState,
to place some of them in a common data structure called CPUState,
to mirror upstream.

Note that upstream also makes CPUState a complete QOM object that
derives from DeviceState / DeviceClass, but this patch doesn't do
that. That's why the target-*/cpu-qom.h files, as well as
include/qom/cpu.h are not the real ones from upstream yet.

Future patches will get rid of CPUOldState, which is currently used
as an alias for CPUArchState, but will be replaced entirely by
CPUState, requiring changing the signature of many functions to
match upstream.

QOM-ification will probably happen after that, but may require
a few more patches due to layering / coupling issues.

Change-Id: Ifc33f8abe2aa80b20da13f5c83c109e37aff7e11

Conflicts:
cputlb.c
target-arm/op_helper.c
target-i386/op_helper.c
target-mips/op_helper.c
/external/qemu/hw/i386/pc.c
4ab1225535dfc5fbcbde37a171b39224ea34e30b 24-Mar-2014 David 'Digit' Turner <digit@google.com> exec.c: Use a QTAILQ to list CPUs.

This introduces CPUState, a mere typedef to CPUOldState for now,
and changes the way CPUs are listed in QEMU. The goal is to get
closer to upstream, while also allowing really separating CPUState
from CPUArmState in future patches.

+ Move "current_cpu" to a thread-local variable on Linux, just like
upstream. Testing shows this doesn't affect performance.

Change-Id: Id07bbef4ba1584e607bec647d5117ac755c48ce6
/external/qemu/hw/i386/pc.c
c6e0caedac5585546cb68605418eedc9e726b44b 07-Mar-2014 David 'Digit' Turner <digit@google.com> Support kernels with version >= 3.10

Newer Android Linux kernels modify the way certain devices are
named, i.e.:

/dev/qemu_pipe is renamed as /dev/goldfish_pipe.
/dev/ttyS<num> is renamed as /dev/ttyGF<num>

This patch adds support code to the emulator to deal with this
as transparently as possible:

1) Add a new hardware property 'kernel.newDeviceNaming', a string
which can only take the values 'autodetect', 'no', and 'yes'.

2) Support code to probe the type of a kernel image.
IMPORTANT: The kernel implementation depends on the host
/usr/bin/file to properly recognize kernel files and extract
their version number. This really only works on Linux and
OS X, and only for x86 and x86_64 kernel images.

A future patch will implement more robust detection by
essentially doing its own probing through libmagic or equivalent.

Note that there doesn't seem to be any existing libmagic rules
to recognize ARM and MIPS kernel images at the moment :-(

See android/kernel/kernel_utils*

3) Modify the emulator startup code to perform auto-detection
when possible (broken on Windows, and non Intel archs, see
comment above).

4) Modify the kernel command line generation to handle the new
TTY device naming

5) Modify the Goldfish pipe virtual device implementation
(since the device name presented to the kernel also changed).

This should be enough to auto-detect Linux 3.10+ x86_64 kernel
images on Linux.

Change-Id: Ied517f8a1fdeb18d84fa9a12ebcdc3daa1f41d9a
/external/qemu/hw/i386/pc.c
1365eb2b35736211464f313616e32f25569e5107 16-Feb-2014 David 'Digit' Turner <digit@google.com> Remove compiler warnings

Change-Id: I75e21a86958a4650b956e89a55357f0c38fcb118
/external/qemu/hw/i386/pc.c
81911b0de42d9e949deda2dfef6a59a1c0561bda 10-Feb-2014 David 'Digit' Turner <digit@google.com> Remove dead KQEMU support code.

CONFIG_KQEMU was never defined anyway, so remove this dead code
from the source tree.

Change-Id: Ie854f7015f1c02352b0a59a9b7ff0294fa889a6e
/external/qemu/hw/i386/pc.c
e2678e116c8cdb0f36b247a5bd9cfacc849362fc 16-Jan-2014 David 'Digit' Turner <digit@android.com> Rename CPUState to CPUOldState.

Upstream qemu has split the cpu state into two new data structures:

CPUState -> is used to model the CPU state through the QEMU
object model.

CPUArchState -> actually a macro that aliases CPUArmState,
CPUX86State or CPUMIPSState.

Both were part of the "CPUState" in the current emulator sources.

Previous patches introduced CPUArchState, as a simple alias to the
machine-specific state. This patch renames any use of CPUState in
the current code to CPUOldState, except within target-*/ directories
where it is replaced by CPU${ARCH}State instead.

This will allow bringing the upstream CPUState definition in the
source tree, and slowly migrate everything to the right location.

Change-Id: I88b79e6e89f1f36084dc2642e1cf415135e4da09
/external/qemu/hw/i386/pc.c
a2c14f947951612b45024095afd2210aa7368773 04-Feb-2014 David 'Digit' Turner <digit@google.com> Cleanup: Remove 100+ compiler warnings.

This is a big cleanup that removes compiler warnings by performing
the following:

- Remove unused functions or variables.
- Change pointer cast to be alias safe using unions.
- Use __attribute__((unused)) on some local variable definitions
when their usage depends on conditional defines that are not
always true when compiling the same source several times.
- Fix a couple array indexing bugs.

There are still a few warnings from the JSON lexer, libjpeg and
the TCG helpers though, but the overall compilation is much cleaner.

BUG=NONE

Change-Id: Ic4483e6402b266ecfd7bca8c92a73d8fcf392a1f
/external/qemu/hw/i386/pc.c
685b2c217933513117aae2e058324cd9456432c6 28-Jan-2014 David 'Digit' Turner <digit@google.com> Fix battery emulation.

When the AVD config.ini contained 'hw.battery=no', the emulator failed to
emulate a battery device. This had two effects:

- Displaying a red battery icon in the notification area in the emulated
system.

- Crashing the emulator when any 'power' command was typed in the console.

This patches fixes both issues. When hw.battery is set to 'no', the emulator
now indicates to the system that the device is connected to AC, and that the
battery is not present / dead.

Related bug http://b.android/com/65308

Change-Id: I84156a7d4582639569aad98e5a5e90e58087d93a
/external/qemu/hw/i386/pc.c
aa8236dc1b1ea300ab18716db5b8fab42aca3ca7 10-Jan-2014 David 'Digit' Turner <digit@android.com> qemu-malloc.c: Remove qemu-specific heap routines.

Remove all uses of qemu_malloc/malloc0/realloc/free/strdup/etc to use
the equivalent GLib functions (g_malloc, g_free, ...) as per upstream.

This also removes qemu-malloc.c since it's no longer required.

Change-Id: I3c36a0396b73dd114b8da385b43f56a2e54dbb15
/external/qemu/hw/i386/pc.c
bcde1092aca184dbd7860078af020de7d1e4e22f 09-Jan-2014 David 'Digit' Turner <digit@android.com> rename target_phy_addr_t to hwaddr to match upstream.

Upstream got rid of the target_phys_addr_t and replaced it with 'hwaddr',
so do the corresponding rename here. Note that:

- This also renames <exec/targphys.h> to <exec/hwaddr.h>

- Upstream always deins hwaddr as a 64-bit type, while the size of
our own hwaddr is still controlled by TARGET_PHYS_ADDR_BITS, and
will be 32 for now.

A future patch will change the type definition to fully match
upstream, but it is more risky / requires more cleanups. It's
simply cleaner / simpler to put the related work in a separate
patch, given the large number of sources touched by the
current change.

Change-Id: Iee30869a57798c12109b6a23570b166232bb9244
/external/qemu/hw/i386/pc.c
bb22854e489d131a3914e651607310d74feea063 17-Dec-2013 David 'Digit' Turner <digit@android.com> hw/pc.c -> hw/i386/

Change-Id: Ie852e12e27fb35fa25e9cf6f55af7ade9f7ade8e
/external/qemu/hw/i386/pc.c