aboutsummaryrefslogtreecommitdiffstats
path: root/hw
Commit message (Collapse)AuthorAgeFilesLines
* Scrap IRQs for x86 system image.Vladimir Chtchetkine2011-10-241-0/+14
| | | | | | | | | | | | This is a temporary fix that enables GoogleTV emulation on tools R15+ The permanent solution would be to increase number of available IRQs from 16 to something more appropriate. For now just: 1. Use IRQ3 for the events device. 2. Decrease number of TTY ports from 4 to 2. These two measures would free up 3 IRQs, so the chances of running out of available IRQs are significantly decreased. Change-Id: Ie788880935d6e15f1f02f61e862c8727c8690b4a
* Fix -wipe-data optionVladimir Chtchetkine2011-10-131-1/+12
| | | | | | | | | Forces overwriting (truncating) of the userimage-qemu.img file on condition that it is being initialized from userimage.img file. If *-qemu file is not truncated the system will pick up on artifacts located behind the overwritten area of the *-qemu.img file. Change-Id: I091dff0069d7049588b11c4654fe134947db101b
* Fix snapshotsVladimir Chtchetkine2011-10-052-2/+1
| | | | Change-Id: Ib3891704ece2cea0c5a80b468b2514e6c4d13216
* Fix IRQ allocation for goldfish devices.Vladimir Chtchetkine2011-09-295-4/+32
| | | | | | | | | There were two issues fixed here: 1. IRQ allocation (for a device) has never been checked on going out of bounds. 2. In x86 platform some IRQs were reserved (for kbd, mouse, and exception), but IRQ allocation for goldfish devices didn't check for those reserved IRQs being assigned to a device. Change-Id: I9d48485d973bcc8fd8a3dd1b78fbfa6a05aeea22
* Use different macro for KVMVladimir Chtchetkine2011-09-271-3/+3
| | | | Change-Id: I62a2d54562ac043a5513585a2e86aa01038fdc29
* Fix QEMU pipe on KVMVladimir Chtchetkine2011-09-271-2/+17
| | | | | | | | | The issue was that CPU registers (CR3 in particular) in QEMU were out of sync with KVM at the time when virtual address to physical address translation was performed. This caused translation failure, and the subsequent crash. The fix was to explicitly sync QEMU registers with KVM registers just before calling VA->PA translation. Change-Id: I1ff4ed2cfddd77e6889bb645f08db442f119049a
* Fix x86 qemu pipe initializationDavid 'Digit' Turner2011-09-131-0/+2
| | | | | | | | This is necessary ot initialize qemu pipes when running an emulated x86 system. Required to try OpenGLES emulation for x86. Change-Id: I4fa38648dcdd4e85d1794b131238b27b4dd4b91e
* Accelerate nand device in virtualization environmentJiang Yunhong2011-09-132-2/+50
| | | | | | | | | | | | | | | | | | | | | Currently NAND device driver need 8 MMIO access for goldfish nand device access. MMIO access is expensive in virtualization environment because each MMIO access will cause a context switch from in-kernel module to qemu user space process. Through introducing a new batch command, these multiple MMIO access can be combined into one, thus improve virtualization perofrmance. The booting time in KVM environment is reduced from 25~26 seconds to 20~21 seconds. A kernel patch is required to utilize this new batch command. The patched kernel will detect the batch support through a new flags in goldfish nand device, while current kernel is not impacted. Change-Id: Ia460b1ba3c6fde5b1fc6101bb66f8f58e46e6a78 Signed-off-by: Xin Xiaohui <xiaohui.xin@intel.com> Signed-off-by: Zhang Xiantao <xiantao.zhang@intel.com> Signed-off-by: Jiang Yunhong <yunhong.jiang@intel.com> Signed-off-by: Nakajima Jun <jun.nakajima@intel.com>
* Fix qemu pipe's 'poll' callbacksVladimir Chtchetkine2011-08-252-7/+7
| | | | | | | | | Throughout emulator's code pipe's 'poll' callback was returning PIPE_WAKE_XXX, instead of PIPE_POLL_XXX flags. This created whole sort of issues with the qemu pipe service <-> client communications. This is also a fix for http://b/issue?id=5196348 Change-Id: I92202cf4ef4554559eb022c4410ee93923edec1b
* Revert "Revert "Merge c80340 from master to r13: Move charmap to hardware ↵Xavier Ducrohet2011-08-221-18/+3
| | | | | | | | | | | | | properties"..." This reverts commit cccd28ca5064a7bd14282cd774ee5bb7126d5845. c80340 add a CL to tools_r13 that broken the build. It was therefore reverted with cccd28. This revert was merged into tools_r13 but shouldn't have been. This reverts the revert to put back the CL in master. Change-Id: I95fcefedb77596cfdf76269f248b2ae80c85c830
* Merge "Disable trace."Vladimir Chtchetkine2011-08-121-1/+1
|\
| * Disable trace.Vladimir Chtchetkine2011-08-121-1/+1
| | | | | | | | Change-Id: I7130b7f82dec493fb893acf2527755398104cde3
| * Move charmap to hardware propertiesDavid 'Digit' Turner2011-07-071-18/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The name of the emulated charmap must be passed to the guest kernel because it is used by the guest input handling code to load the proper charmap files from the system partition. This mandates that the name becomes a hardware property for the sake of supporting proper snapshotting and ui/core separation. From now on, the charmap name found in a skin will be ignored completely. This shouldn't be a problem in practice because all skins used the default name (qwerty2) anyway. The only reason to change the default value would be if emulating a guest system image that depends on a different charmap during emulation. Change-Id: If571684000b159ae9e9849661c9ff18e19b4cc75
* | Revert "Merge c80340 from master to r13: Move charmap to hardware ↵Xavier Ducrohet2011-08-111-3/+18
| | | | | | | | | | | | | | | | properties". do not merge. This reverts commit f490aee025b3bab5bcdb065e5fc1b1abecf16b97. Change-Id: I59a0b2aebc8ab2b788a820a206c6eb4fc6e6e6d2
* | Merge c80340 from master to r13: Move charmap to hardware propertiesDavid 'Digit' Turner2011-08-051-18/+3
|/ | | | | | | | | | | | | | | | | | | The name of the emulated charmap must be passed to the guest kernel because it is used by the guest input handling code to load the proper charmap files from the system partition. This mandates that the name becomes a hardware property for the sake of supporting proper snapshotting and ui/core separation. From now on, the charmap name found in a skin will be ignored completely. This shouldn't be a problem in practice because all skins used the default name (qwerty2) anyway. The only reason to change the default value would be if emulating a guest system image that depends on a different charmap during emulation. Change-Id: If571684000b159ae9e9849661c9ff18e19b4cc75
* target-arm: integrate upstream ARM translator.David 'Digit' Turner2011-06-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new translator has the following benefits: - faster emulation of ARMv5TE code (through improved JIT) - proper support for ARMv7 and NEON - rebuilding the full-eng platform images for ARMv7-A results in additionnal speed increases (a.k.a. Thumb-2 rocks!). Note that, as an interesting side effect, NEON machine code is generally slower than the equivalent C code it is supposed to replace when run inside the emulator. This can be explained by the fact that for now the translator simply translates each NEON instruction into a series of sequential host instructions (and also requires over-head for packing/unpacking/saturation/ etc...). This change has been tested by running the "full-eng" platform image rebuilt for ARMv7-A and Neon and using an appropriate kernel image (prebuilt/android-arm/kernel/kernel-qemu-armv7). The system could boot and seems to work perfectly. Not a single issue has been experienced during testing. On a 2.4 GHz Xeon CPU, the image boots in about 25 seconds (compared to 40 seconds for a vanilla one without this emulator patch). Thanks to Peter Maydell at Linaro and ARM with his hard work to make this happen (first in upstream, and now on Android). This integration is based on the Meego git repository (git://gitorious.org/qemu-maemo/qemu.git) using the following hash: 7e2d65b0c95c865b1fa6d3d4948e8e822b9ac2fd On top of which, the following upstream patch has been applied (with recommendation from Peter): b7fa9214d8d4f57992c9acd0ccb125c54a095f00 (We chose this repository because it was the closest to the previous integrate. We will probably use the Linaro ones for future work on this part of the emulator). Change-Id: I54837e3d2e908b2380d158411d7a9813630e7e4e
* trace.h: rename to trace-android.hDavid 'Digit' Turner2011-06-011-1/+1
| | | | | | | This is done to allow for future integration of the upstream auto-generated "trace.h" header file. Change-Id: I9d1bba3320d9e8acfd7359540d3ed6695773061e
* ramblocks: integrate upstream implementation (sophisticated)David 'Digit' Turner2011-06-014-21/+25
| | | | Change-Id: I49e96e2d5ae571849b0b6fef0a30b41ecdee8d23
* qemu-char-android.c: rename to qemu-char.cDavid 'Digit' Turner2011-06-012-2/+2
| | | | | | + convert to QemuOpts* initialization functions. Change-Id: I5a245ed2de068af49fdc92de8e3e834d0f49aa27
* savevm.c: minor integrateDavid 'Digit' Turner2011-06-011-5/+6
| | | | Change-Id: I16103c65ac7b15b2dc58dcc7dd6b3052004aa31a
* qemu-timer.c: rename qemu_timer_new_scale()David 'Digit' Turner2011-06-019-66/+56
| | | | | | | | | | | Get rid of qemu_timer_new() implementation, and update all callers to use qemu_timer_new_ms() or qemu_timer_new_ns() instead. Rename qemu_new_timer_scale() to qemu_new_timer() to follow upstream conventions. Change-Id: Id2c04f8597ec5026e02f87b3e2c5507920eb688e
* New goldfish_pipe virtual device.David 'Digit' Turner2011-04-284-614/+996
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a new virtual hardware device named "goldfish_pipe" used to implement a very fast communication channel between the guest system and the emulator. IMPORTANT: This depends on a special kernel driver, see: https://review.source.android.com/#change,22496 Usage from the guest is simply the following: fd = open("/dev/qemu_pipe", O_RDWR); const char* pipename = "pipe:<name>"; ret = write(fd, pipename, strlen(pipename)+1); if (ret < 0) { /* could not connect to service named <name> */ } /* now you can read()/write()/close() as a normal * file descriptor to exchange data with the service. */ In addition, this implements the following pipe services in the emulator: tcp:<port> tcp:<hostname>:<port> unix:<path> opengles The 'tcp:' and 'unix:' services simply redirect to a TCP or Unix socket on the host with minimal The 'opengles' service simply connects to tcp:locahost:22468 for now. We may change this to be more configurable in the future, but that's the port number used by the current experimental OpenGL ES hardware emulation host libraries / programs. Benchmarking with a simple ping-pong program shows that the guest <-> emulator can achieve a roundtrip bandwidth of 192 MB/s (on a 2.7 Ghz Xeon PC). Using the tcp: service to talk to a ping-pong server listening on localhost reaches 102 MB/s on the same machine, using a Unix socket reaches 140 MB/s. By contrast, using standard sockets in the guest reaches only 3.8 MB/s on the same machine (and requires special privileges from the application anyway).
* Merge "Converted a variable from char * to const char *. Removes compiler ↵David Turner2011-04-111-2/+2
|\ | | | | | | warnings with some compilers."
| * Converted a variable from char * to const char *.Ashish Bhatia2011-04-081-2/+2
| | | | | | | | | | | | Removes compiler warnings with some compilers. Change-Id: Idfb14557181e744d07bef6b5d0da734012d2ff42
* | hw/android_arm.c: Initialize qemud pipes properly.David 'Digit' Turner2011-04-111-0/+4
| | | | | | | | Change-Id: I7f7f46b6e9526d207f53ad6a9e6baa315bd6af7b
* | goldfish_trace: Hook with goldfish_pipe.h functions.David 'Digit' Turner2011-04-113-36/+102
| | | | | | | | | | | | | | | | Note that this is also forces tracing support during machine initialization. Measurements show that this doesn't have any significant impact on emulation performance. Change-Id: Ie32352659611531ce65ba2c95c5896e2421f509d
* | hw/goldfish_pipe.c: New support code for QEMUD fast-pipes.David 'Digit' Turner2011-04-112-0/+838
|/ | | | Change-Id: I338334d53fa9bc52c87e9da18341d0cb94fd4269
* Revert "Revert "Merge 29e114d2 from master.""Xavier Ducrohet2011-03-181-0/+36
| | | | | | | | | This reverts commit 2facea6512c84af9285682909f6ac6edcd4130ab which was not supposed to merge down from tools_R10 to master since the original reverted commit was a cherry-pick from master to tools_r10 Change-Id: Ide87af693a0f3239bacaa7313b9262e6e8c46800
* merge from tools_r10The Android Open Source Project2011-03-181-36/+0
|\ | | | | | | Change-Id: I70d9ccafb5912c85baa0711f7e9010bec223efaa
| * Revert "Merge 29e114d2 from master. do not merge."Xavier Ducrohet2011-03-181-36/+0
| | | | | | | | This reverts commit e36a1cc2561b2ce27d3c0a5b3a7b79d4e8531f0e.
| * Merge 29e114d2 from master. do not merge.David 'Digit' Turner2011-03-181-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | Fix touchscreen emulation to return correct min/max coordinate bounds. This is needed by future changes in the input framework that depend on touchscreen devices to properly return the min/max bounds of their absolute pointer coordinates. Fixes bug 4126574 Change-Id: I1ace56d5433be5d97eb79895cd57b6e442245ca0
| * Merge 59e8e196 into tools_r10. DO NOT MERGE.David 'Digit' Turner2011-02-161-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Add hw.keyboard.lid This is used to control the lid switch virtual device. + Add support for a "version <number>" field to the skin format. This will later be used for skin format #3. + Fix a bug where string hw properties didn't work/compile Change-Id: I27ff3293b439917a51c584a25139264ddb1aff12
* | Fix touchscreen emulation to return correct min/max coordinate bounds.David 'Digit' Turner2011-03-181-0/+36
| | | | | | | | | | | | | | | | | | | | This is needed by future changes in the input framework that depend on touchscreen devices to properly return the min/max bounds of their absolute pointer coordinates. Fixes bug 4126574 Change-Id: I982c0d8e78fc59912e964af958929d2b0718eaa4
* | Fix a crash that happened when the content directory didn't have a cache.img ↵David 'Digit' Turner2011-03-151-2/+3
| | | | | | | | | | | | | | | | | | file. This only happened for fresh newly-created AVDs. Existing ones used for testing the emulator already had a cache.img and booted properly. Change-Id: I87901ea5fb1dc6aa7d2bb3dd191de58d972c386f
* | x86: Enable KVM mode for Android x86 emulator (update/rebase)Jun Nakajima2011-03-043-1/+45
| | | | | | | | | | | | | | | | | | | | This patch enables KVM mode on x86 Linux to boost performance of x86 emulaiton if the hardware-based virtualization feature is present on the host machine. Change-Id: I4b24474b3ec115a3b9a7bf017801f4f610253b09 Signed-off-by: Xiaohui Xin <xiaohui.xin@intel.com> Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com> Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
* | Move data partition initialization to core.David 'Digit' Turner2011-03-011-1/+1
| | | | | | | | Change-Id: I3c2b4668593391026da028194503fc87246e44ba
* | Move cache partition initialization to core.David 'Digit' Turner2011-03-011-0/+2
| | | | | | | | Change-Id: I1f887e6f8fc38e43b1fff3f7bab3814b52542762
* | x86: Fixing audio.Jun Nakajima2011-02-241-0/+6
| | | | | | | | | | | | Change-Id: I0614450cd512d52bf24020dda1c933f0b22cb09b Signed-off-by: Xiaohui Xin <xiaohui.xin@intel.com> Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
* | Minor cleanups for core/ui Makefile separation.David 'Digit' Turner2011-02-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch contains minor cleanups that will be needed by a few future patches that will improve the way core and ui sources are separated and built. - remove a few compiler warnings - formatting - remove the memcheck CONFIG_MEMCHECK checks (they later get in the way) - refine hw/hw.h inclusion's of cpu.h (this comes from upstream) - add missing definitions for PRUd64 and PRUx64 (used later) - remove CONFIG_SHAPER test, replace with CONFIG_ANDROID instead. - add missing strdup() calls. Change-Id: Ic7d6681a51af718c298f0ee4bd884b1d8750f28e
* | Add hw.keyboard.lidDavid 'Digit' Turner2011-02-101-3/+2
| | | | | | | | | | | | | | | | | | | | | | This is used to control the lid switch virtual device. + Add support for a "version <number>" field to the skin format. This will later be used for skin format #3. + Fix a bug where string hw properties didn't work/compile Change-Id: I678a0988d2cd24169dd0c2ece96e7ab0b2822104
* | Revert "Build arm and x86 binaries at the same time."Xavier Ducrohet2011-02-091-3/+0
| | | | | | | | | | | | This fails to build on MacOS X This reverts commit a39b10bd2574825a815d6ad854499dd127cfa9cb.
* | Build arm and x86 binaries at the same time.David 'Digit' Turner2011-02-101-0/+3
|/ | | | Change-Id: I105c5a097c988cb964b47b40b71c7a08af0d9210
* Fixing aborts caused by compute_fb_update_rect_linear() when the framebuffersJun Nakajima2011-02-081-1/+10
| | | | | | | | are large. Also, added a boot parameter for the goldfish kernel to use PIT, rather than TSC. Change-Id: I5824c7248e0c1a4c487aeb52da112d870846ae62 Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
* events: Fix no-Dpad emulation when hw.keyboard=yesDavid 'Digit' Turner2011-02-061-0/+23
| | | | | | | | | | This fixes a bug where Dpad emulation was forced when hw.keyboard was set to 'yes' in hardware.ini, even if hw.dpad was set to no. The problem was that the events device set the Dpad EV_KEY bits unconditionally since they are in the 0..0xff range. Change-Id: Ice2488341170f43d3fe230d816a089da97c4d5ac
* x86: Add x86 support. Rebase the change (20906/1) due to a minor conflict.Jun Nakajima2011-02-023-4/+21
| | | | | | | Change-Id: Ic73cca0fc6c6e5cf74f63daa6080d00aa7c392bb Signed-off-by: Xiaohui Xin <xiaohui.xin@intel.com> Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com> Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
* New files are from the upstream QEMU (0.10.5), and the code is based onJun Nakajima2011-01-2915-0/+7212
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the following commit (dated 2009-06-19, see CHANGES.TXT): d2e9fd8f703203c2eeeed120b1ef6c3a6574e0ab new file: hw/apic.c new file: hw/fdc.h new file: hw/fw_cfg.c new file: hw/fw_cfg.h new file: hw/i8254.c new file: hw/i8259.c new file: hw/ioapic.c new file: hw/mc146818rtc.c new file: hw/ne2000.c new file: hw/pc.c new file: hw/pckbd.c new file: hw/piix_pci.c new file: hw/ps2.c new file: hw/ps2.h new file: hw/smbios.c new file: target-i386/TODO new file: target-i386/cpu.h new file: target-i386/exec.h new file: target-i386/helper.c new file: target-i386/helper.h new file: target-i386/helper_template.h new file: target-i386/kvm.c new file: target-i386/machine.c new file: target-i386/op_helper.c new file: target-i386/ops_sse.h new file: target-i386/ops_sse_header.h new file: target-i386/svm.h new file: target-i386/translate.c Change-Id: I55c62ed7516f002c882705545e7c21997ece9927
* Security fix from Tavis Ormandyrich cannings2011-01-251-3/+5
| | | | | | Perform null check before calling r->transfer_handler. Change-Id: Ide3cd7edc7bde12a0635572bfa72f3a6dd05a926
* Make "qwerty2" the default charmap.David 'Digit' Turner2011-01-191-8/+22
| | | | | | | | | | | | | | | This patch makes "qwerty2" the default charmap for skins that don't specifiy one explicitely. Note that the "qwerty" charmap is here for historical reasons only. All skins provided by all SDK Android platforms explicitely mention "qwerty2", so this patch will mainly impact "magic skins" like those created by an option like "-skin 1024x768". This gets rid of the obsolete "qwerty" charmap (it was never used by any of the skins provided by the SDK, and is incorrect). + Simplify android/charmap.[hc] code. + Lazy-load the charmap name in hw/goldfish_events_device.c
* Sligh speedup for pixel conversion routines with Duff's device.David 'Digit' Turner2011-01-181-20/+33
| | | | Change-Id: If832bc5844945f7a2027b2f8d09393586545d8d5
* hw: framebuffer: add support for 32-bit framebuffers.David 'Digit' Turner2011-01-181-14/+21
| | | | | | | This provides a new read i/o port to return the framebuffer's format to the kernel driver. Change-Id: Ifd1c4d8a4dc75fa73d5f6750e0b501c34468aec5