aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-04-29i386: init adb and android monitor for IAgradle_1.3.1gradle_1.3.0-beta4gradle_1.3.0-beta3gradle_1.3.0-beta2gradle_1.3.0-beta1studio-1.4-releasestudio-1.3-releasestudio-1.3-devJason Hu
adb and android monitor are now working for IA. this later can be modulized to remove duplicates in each platform. Change-Id: If9ea5e5f02b2a541eb17c364132eba399766fc99 Signed-off-by: Jason Hu <jia-cheng.hu@intel.com>
2015-04-28hw/i386: Enable goldfish audioYu Ning
Follow the same way in which goldfish battery, events, etc. were added to the default virtual board for x86/x86_64. See commit 16a8f17 for details. N.B. While there is no known issue with audio output, audio input does not work reliably/correctly at this point. Nevertheless, enable both functions and gradually fix the latter. Change-Id: Ib0a253c0f73f8fdd44d727504cfddb325056dc2b Signed-off-by: Yu Ning <yu.ning@intel.com>
2015-04-28goldfish_audio: Support 64-bit guestsYu Ning
Support receiving 64-bit buffer addresses from the driver. Code is adapted from external/qemu/hw/android/goldfish/audio.c. Change-Id: I3efffc670267d206561319865f46248f449f5f62 Signed-off-by: Yu Ning <yu.ning@intel.com>
2015-04-28coreaudio: Incorporate changes from the classic Android emulatorYu Ning
The current CoreAudio driver (audio/coreaudio.c) is missing an input voice and thus does not support audio input. Fortunately, its counterpart in the classic Android emulator has got this feature implemented. In order to enable audio input in qemu-android on Mac, merge audio/coreaudio.c from AOSP's external/qemu project at commit 6069b33 into this version. Changes from QEMU's latest CoreAudio-related commits (which postdate the classic emulator's version) are preserved. In addition, a few cosmetic changes are made to the imported code for coding style consistency. Change-Id: I09afe2845905e64b96031530844ff219042d3993 Signed-off-by: Yu Ning <yu.ning@intel.com>
2015-04-28audio: Add winaudio as an alternative audio backend for WindowsYu Ning
QEMU's default audio backend for Windows, winwave, does not work well with the goldfish audio device when audio input is enabled. The classic Android emulator does not use winwave, but introduces its own Windows audio backend called winaudio. This patch adapts winaudio for QEMU 2.x and makes it available as an alternative audio backend for Windows. Change-Id: I2da855957035b6d95bdf6e0044a3e807b769abf2 Signed-off-by: Yu Ning <yu.ning@intel.com>
2015-04-28audio: Import winaudio driver from the classic Android emulatorYu Ning
Import audio/winaudio.c from commit dcda949 of AOSP's external/qemu project. Convert EOL of the file to UNIX format. Change-Id: Ifb3de54648b6152210b4cfd96edbf747cae8b0e1 Signed-off-by: Yu Ning <yu.ning@intel.com>
2015-04-27make the instruction sets of IA cpu comply with specJason Hu
per ABI specified in ndk/docs/Programmers_Guide/html/ md_3__key__topics__c_p_u__support__chapter_1-section_8__a_b_is.html#sa x86: add ssse3, remove popcnt x86_64: add sse43, sse41 and ssse3 Change-Id: Iede00d5ab58b16513c2dbfa698ae2b865ad9be5b Signed-off-by: Jason Hu <jia-cheng.hu@intel.com>
2015-04-02hw/arm/ranch.c: Add firmware node to DTstudio-master-releasebohu
To boot arm64 again, borrowed similar changes from: https://android-review.googlesource.com/#/c/143670/ "Platform information should be acquired from the DT firmware node since init script does not parse /proc/cpuinfo anymore : https://android-review.googlesource.com/#/c/141740/ " Change-Id: I4202fa4c52d19d527dfd3754d218012cf5fbec87
2015-03-31Merge "goldfish_audio: Fix updating of status bits for output buffers" into ↵David Turner
studio-1.3-dev
2015-03-31goldfish_audio: Fix updating of status bits for output buffersYu Ning
AUDIO_INT_WRITE_BUFFER_i_EMPTY (i = 1, 2) should be set whenever output buffer i becomes empty (i.e. ready to receive new data). However, the current code in goldfish_audio_flush() does not do that correctly. Fix that logic to enable audio playback. Change-Id: I40ac9cf7736c64049f8bcbd491dab7d9ab88c3d9 Signed-off-by: Yu Ning <yu.ning@intel.com>
2015-03-27hw/mips/mips_ranchu.c: Add firmware node to DTMiodrag Dinic
Platform information should be acquired from the DT firmware node since init script does not parse /proc/cpuinfo anymore : https://android-review.googlesource.com/#/c/141740/ DT firmware node example : firmware { android { revision = [31 00]; hardware = "ranchu"; compatible = "android,firmware"; }; }; Change-Id: I120f7c998f5f191fa0aebff6899989a32c63a33d
2015-03-27target-mips: FRE support, MSA & R6 fixesMiodrag Dinic
This commit includes cherry-picked commits from the PRPL & upstream foundation QEMU. List of squashed commits from PRPL foundation QEMU: 0dec08a target-mips: add mips32r6-generic CPU 9e721de target-mips: Correct the handling of writes to CP0.Status for MIPSr6 902b883 target-mips: fix hflags modified in delay / forbidden slot db1ab66 target-mips: fix cpu_mips_validate_access() 3f4046b target-mips: add Config5.FRE support dfa9fa8 target-mips: fix to clear msacsr fe96cf5 target-mips: Misaligned Memory Accesses for MSA bc5a035 target-mips: Misaligned Memory Accesses for R6 f2cf59e softmmu: Add size argument to do_unaligned_access() List of squashed commits from upstream QEMU: 0af7a37 target-mips: save cpu state before calling MSA load and store helpers Change-Id: I28775e28995ce414b3d78d208cf7bb0bb5efd343
2015-03-27hw/mips/mips_ranchu.c: Trigger goldfish_fb rotation on commandMiodrag Dinic
For reference take a look at : 4f7a288 ranchu: trigger goldfish_fb rotation on command Change-Id: Ic4feed7ebf7e4aeb81657fe123d176f68057c129
2015-03-10hw/mips: Ranchu - Support for memory up to 4 GBMiodrag Dinic
So far, this machine was limited to 496 MB + 16 MB IO space. This commit adds support for installing memory up to 4080 MB + 16 MB of IO space. Fast TLB optimisation was updated to allow running mips32r2/mips32r6 kernels with HIGHMEM support and 64-bit r2/r6 kernels. Change-Id: I0d99cb1fc59319bf9d4c257f80cce99aca2811f3
2015-02-16hw/i386: Enable goldfish framebuffergradle_1.2.3gradle_1.2.2gradle_1.2.1gradle_1.2.0-rc1gradle_1.2.0-beta1gradle_1.2.0studio-1.2-releasestudio-1.2-devYu Ning
Follow the same way in which goldfish battery, events, etc. were added to the default virtual board for x86/x86_64. See commit 16a8f17 for details. See also https://android-review.googlesource.com/131520 for the corresponding kernel-side patch. Change-Id: Iadfa05a0956f550278908c1cd89366cd7e4f3c8d Signed-off-by: Yu Ning <yu.ning@intel.com>
2015-02-12hw/i386: enabled android pipeJason Hu
enabled android pipe device for x86/x86_64 - modified .dsl source file and update pre-generated .hex file - created the device during init Change-Id: Ie04713420323197d2e2341d339c3d442b22eaa5d Signed-off-by: Jason Hu <jia-cheng.hu@intel.com>
2015-02-11hw/i386: enabled goldfish eventsJason Hu
enabled goldfish events device for x86/x86_64 - modified .dsl source file and update pre-generated .hex file - created the device during init Change-Id: Ide7f60a8b3d83c4d1591cb0d9a38179db7b74b4b Signed-off-by: Jason Hu <jia-cheng.hu@intel.com>
2015-02-10Merge "hw/i386: Enable goldfish battery" into studio-1.2-devDavid Turner
2015-02-05target-mips: Add TLB refill handler optimisationMiodrag Dinic
Emulating each instruction of the software refill handler has a significant impact on the overall performance of QEMU because of the overhead of emulating the various CP0 instructions to accurately reflect the machine state. This patch implements a pseudo hardware TLB refill handler that significantly reduces the impact of refilling the TLB to bring it more inline with what would be observed on a real target. Change-Id: I0892e4fa1aa81253da1c363bcefcdf9ff6e4d4e3
2015-02-05Add MIPS ranchu machineMiodrag Dinic
MIPS "ranchu" machine represents the new virtual board which will be used for running Android emulation. It inherits a number of Goldfish devices which are modified to be used without the Goldfish platform Bus controller and are installed using the Simple Bus interface (sysbus_create_simple()). The advantage of this platform over the old one is support for Virtio Devices. Ranchu board supports up to 16 virtio devices which can be attached using virtio MMIO Bus. For better overview of the ranchu virtual board layout, take a look at the following picture : ABUS ||----MIPS CPU || | IRQs ||----Goldfish PIC---------------------(32)------ || | | | | | | | | | | ||----Goldfish TTY---- | | | | | | | | | || | | | | | | | | | ||----Goldfish RTC------ | | | | | | | | || | | | | | | | | ||----Goldfish Timer------ | | | | | | | || | | | | | | | ||----Goldfish FB----------- | | | | | | || | | | | | | ||----Goldfish Events--------- | | | | | || | | | | | ||----Goldfish Audio------------ | | | | || | | | | ||----Goldfish Battery------------ | | | || | | | ||----Android PIPE------------------ | | || | | ||----Virtio MMIO Bus | | || | | | | | || | | Virtio Device (virtio-block)-- | || (16) | | || | Virtio Device (virtio-net)------------ For booting the board, Ranchu Platform kernel is used: git clone https://android.googlesource.com/kernel/goldfish.git git checkout origin/android-goldfish-3.10 -b android-goldfish-3.10 Take look at arch/mips/goldfish. This is a Goldfish based kernel enriched with Device Tree support. To build the kernel for the "ranchu" board, use ranchu64_defconfig for MIPS64R6 configuration. Device Tree is created on the QEMU side based on the information about devices IO map and IRQ numbers. DTB is automatically generated and appended right after where the kernel is loaded. Kernel will pick up this DTB and register everything according to the information provided. It is assumed that the kernel has CONFIG_MIPS_APPENDED_DTB=y option enabled, otherwise it will use the built-in device tree which may hold stale information. Change-Id: I8344e140dcc70e6cae0e06af4deca75960b93fbc
2015-02-05Add Goldfish Timer & RTC devicesMiodrag Dinic
The following was taken from AOSP emulator documentation : <AOSP>/external/qemu/GOLDFISH-VIRTUAL-HARDWARE.TXT $QEMU=qemu-android : new code base QEMU with ranchu machine $KERNEL=https://android.googlesource.com/kernel/goldfish.git Godlfish timer: ================================== Relevant files: $QEMU/hw/timer/goldfish_timer.c $KERNEL/arch/mips/goldfish/goldfish-time.c Device properties: Name: goldfish_timer Id: -1 IrqCount: 1 32-bit I/O registers 0x00 R TIME_LOW : Get current time, return low-order 32-bits. 0x04 R TIME_HIGH : Return high 32-bits from TIME_LOW read. 0x08 W ALARM_LOW : Set low 32-bit value of alarm, and arm it. 0x0c W ALARM_HIGH : Set high 32-bit value of alarm. 0x10 W CLEAR_INTERRUPT : Lower device's irq level. 0x14 W CLEAR_ALARM This device is used to return the current host time to the kernel, as a high-precision signed 64-bit nanoseconds value, starting from a liberal point in time. Goldfish real-time clock (RTC): ================================== Relevant files: $QEMU/hw/timer/goldfish_timer.c $KERNEL/drivers/rtc/rtc-goldfish.c This device is _very_ similar to the Goldfish timer one, with the following important differences: - Values reported are still 64-bit nanoseconds, but they have a granularity of 1 second, and represent host-specific values (really 'time() * 1e9') - The alarm is non-functioning, i.e. writing to ALARM_LOW / ALARM_HIGH will work, but will never arm any alarm. Change-Id: Ie548ae7e39d02fa6766b9ea89def26aa42ba1366
2015-02-05Add Goldfish interrupt controllerMiodrag Dinic
The following was taken from AOSP emulator documentation : <AOSP>/external/qemu/GOLDFISH-VIRTUAL-HARDWARE.TXT $QEMU=qemu-android : new code base QEMU with ranchu machine $KERNEL=https://android.googlesource.com/kernel/goldfish.git Relevant files: $QEMU/hw/intc/goldfish_pic.c $KERNEL/arch/mips/goldfish/goldfish-interrupt.c Device properties: Name: goldfish_pic Id: -1 IrqCount: 0 (uses parent CPU IRQ instead). 32-bit I/O registers : 0x00 R STATUS : Read the number of pending interrupts. 0x04 R NUMBER : Read the lowest pending interrupt index. 0x08 W DISABLE_ALL : Clear all pending interrupts 0x0c W DISABLE : Disable a given interrupt. 0x10 W ENABLE : Enable a given interrupt. Goldfish provides its own interrupt controller that can manage up to 32 distinct maskable interrupt request lines. The controller itself is cascaded from a parent CPU IRQ. What this means in practice: - Each IRQ has a 'level' that is either 'high' (1) or 'low' (0). - Each IRQ also has a binary 'enable' flag. - Whenever (level == 1 && enabled == 1) is reached due to a state change, the controller raises its parent IRQ. This typically interrupts the CPU and forces the kernel to deal with the interrupt request. - Raised/Enabled interrupts that have not been serviced yet are called "pending". Raised/Disabled interrupts are called "masked" and are essentially silent until enabled. Change-Id: Ib5eb3c82cf89f86c9ff81ec303e3ab6acca155aa
2015-02-05Add Goldfish serial port deviceMiodrag Dinic
Goldfish serial port device emulation. The following was taken from AOSP emulator documentation : <AOSP>/external/qemu/GOLDFISH-VIRTUAL-HARDWARE.TXT $QEMU=qemu-android : new code base QEMU with ranchu machine $KERNEL=https://android.googlesource.com/kernel/goldfish.git Relevant files: $QEMU/hw/char/goldfish_tty.c $KERNEL/drivers/char/goldfish_tty.c Device properties: Name: goldfish_tty Id: 0 to N IrqCount: 1 I/O Registers: 0x00 W PUT_CHAR : Write a single 8-bit value. 0x04 R BYTES_READY : Read the number of available input bytes. 0x08 W CMD : Send command (see below). 0x10 W DATA_PTR : Write kernel buffer address. 0x14 W DATA_LEN : Write kernel buffer size. # For 64-bit guest CPUs only: 0x18 W DATA_PTR_HIGH : Write high 32 bits of kernel buffer address. Each instance of this device implements a virtual serial port that contains a small internal buffer where incoming data is stored until the kernel fetches it. The CMD I/O register is used to send various commands to the device, identified by the following values: 0x00 CMD_INT_DISABLE Disable device. 0x01 CMD_INT_ENABLE Enable device. 0x02 CMD_WRITE_BUFFER Write buffer from kernel to device. 0x03 CMD_READ_BUFFER Read buffer from device to kernel. Change-Id: Ide6593473f32f97e6e5b6d27fa795073a8ccf74a
2015-02-05target-mips: add ERETNC instructionLeon Alrae
ERETNC is identical to ERET except that an ERETNC will not clear the LLbit that is set by execution of an LL instruction, and thus when placed between an LL and SC sequence, will never cause the SC to fail. Software can detect the presence of ERETNC by reading Config5.LLB Change-Id: Ifbd263b8cbd974d97c9f9f29488618117a16b460
2015-02-04Merge "android_pipe: Use guest physical address for buffer read/write" into ↵David Turner
studio-1.2-dev
2015-02-03hw/i386: Enable goldfish batteryYu Ning
Enable the goldfish battery device in the default QEMU machine for x86/ x86_64 guests by doing the following: 1. Modify the source files (.dsl) for the ACPI tables and add an ASL Device object for goldfish battery. 2. Update the pre-generated files (.hex.generated) for the ACPI tables. 3. Instantiate the qdev for goldfish battery during initialization of the machine. Change-Id: I8dd0953fd3ea8c32321c0d4b7505b1af4620d703 Signed-off-by: Yu Ning <yu.ning@intel.com>
2015-02-03android_pipe: Use guest physical address for buffer read/writeYu Ning
For reading and writing guest user space buffers, currently the kernel sends the guest virtual address of the buffer to the pipe device. This virtual address has to be first converted to a guest physical address. Doing this translation on the QEMU side is inefficient and requires additional handling when KVM is enabled, whose implementation would either incur intrusive changes to QEMU's KVM support code or suffer from poor performance (see commit 08c7228 of $AOSP/external/qemu for details), and thus should be avoided if possible. There is a TODO comment on map_guest_buffer() (hw/misc/android_pipe.c) which requests that the translation be done on the kernel side and that physical addresses be passed to the device instead of virtual ones. This patch implements the QEMU-side changes. In order to allow the kernel to work with both the new (paddr-based) and the old (vaddr-based) pipe devices, a read-only register is added to the new device, which is read by the pipe driver to obtain the version of the device. The new pipe device is assigned a non-zero version number (currently 1), while the old device automatically gets version 0 because it simply returns 0 on read of any unknown register. This way, the driver can tell which version of the emulator is running on the host, and then sends either the virtual or the physical address for buffer read/write. See https://android-review.googlesource.com/127963 for the kernel-side patch. Change-Id: Icbc0bdc58b13219e380baea2097011225380e72c Signed-off-by: Yu Ning <yu.ning@intel.com>
2015-02-03bug-fix: display adb-debug from the head of bufferJason Hu
Change-Id: Ifda549c019ba18efadaa744c46514289f5c89569 Signed-off-by: Jason Hu <jia-cheng.hu@intel.com>
2015-01-07android-console: Add avd snapshot command stubsqemu-android-2.2.0Greg Bellows
Add stub functionality to support the Android emulator console "avd snapshot" sub-commands. Specifically, stub functions and entries for the "list", "save", "load", and "del" sub-commands were added along with their proper help messages. Currently, all of the sub-commands return "unsupported" if executed. Signed-off-by: Greg Bellows <greg.bellows@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> [AJB: fix up header] Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2015-01-07android-console: Add avd name command stubGreg Bellows
Add stub functionality to support the Android emulator console "avd name" command. The proper help messages are displayed, but the command currently returns a message indicating that AVDs are unsupported. Signed-off-by: Greg Bellows <greg.bellows@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
2015-01-07android-console: Add avd start commandGreg Bellows
Add Android emulator console "avd start" commmand and associated help messages. Signed-off-by: Greg Bellows <greg.bellows@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
2015-01-07android-console: Add avd stop commandGreg Bellows
Add Android emulator console "avd stop" commmand and associated help messages. Signed-off-by: Greg Bellows <greg.bellows@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
2015-01-07android-console: Add avd status commandGreg Bellows
Add Android emulator console "avd status" commmand and associated help messages. Signed-off-by: Greg Bellows <greg.bellows@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
2015-01-07android-console: Add base avd command supportGreg Bellows
Add base Android emulator console avd command support and associated help message. Signed-off-by: Greg Bellows <greg.bellows@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> [AJB: fixed up sub-table] Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2015-01-07android-console: Fix android_console_help call orderGreg Bellows
Fixes the order and hierarchy of handler calling so that commands with sub-tables take priority over parent only commands. This allows nesting of commands with sub-tables to be called properly. Signed-off-by: Greg Bellows <greg.bellows@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> [AJB: minor fix due to sub_cmd changes] Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2015-01-07android-console: Add event text command stubGreg Bellows
Add Android emulator console "event text" command function stub and help support. The command properly displays help text, but returns a "Not supported" message when executed due to limitations in texting telephony support. Signed-off-by: Greg Bellows <greg.bellows@linaro.org>
2015-01-07android-console: Add event send commandGreg Bellows
Add the Android emulator console "event send" command and associated help messages. The "send" command is used to initiate a given event on the Android emulator instance. Signed-off-by: Greg Bellows <greg.bellows@linaro.org>
2015-01-07android-console: Add GF event send functionGreg Bellows
Adds Android emulator console command for enqueuing a Goldfish/Ranchu event. The function takes the event type and code (symbol or value) along with an event value and adds it to the Goldfish event device work queue. Signed-off-by: Greg Bellows <greg.bellows@linaro.org>
2015-01-07android-console: Add event codes commandGreg Bellows
Add the Android emulator console "event codes" command and associated help messages. The "codes" command is used to display a list of available event codes for a specified type. Signed-off-by: Greg Bellows <greg.bellows@linaro.org>
2015-01-07android-console: Add event types commandGreg Bellows
Add the Android emulator console "event types" command and associated help messages. The "types" command is used to display a list of available event types that can be used in other event commands. Signed-off-by: Greg Bellows <greg.bellows@linaro.org>
2015-01-07android-console: Add GF event type code reportingGreg Bellows
Adds Goldfish event code tables and functions for reporting the number, value and names of supported codes for a given event type. Also added an internal function for looking up an event code descriptor from its name. This functionality will be used by the Andorid emulator console for displaying names and numbers of available events codes. Signed-off-by: Greg Bellows <greg.bellows@linaro.org>
2015-01-07android-console: Add GF event type reportingGreg Bellows
Adds Goldfish event table and functions for reporting the number. value, and names of supported events. Also added an internal function for looking up an event type descriptor by name. This functionality will be used by the Andorid emulator console for displaying names and numbers of available events. Signed-off-by: Greg Bellows <greg.bellows@linaro.org>
2015-01-07android-console: Init the event device ID fieldGreg Bellows
Initializes the Goldfish event device ID field so that it is discoverable by name (ID) when needed by the event commands. Signed-off-by: Greg Bellows <greg.bellows@linaro.org>
2015-01-07android-console: Add console base event commandGreg Bellows
Add the base Android emulator console "event" command and infrastructure for adding sub-commands. Signed-off-by: Greg Bellows <greg.bellows@linaro.org> [AJB: minor fix for sub-table] Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2015-01-07android-console: Add power capacity commandGreg Bellows
Add the Android emulator console "power capacity" command along associated help messages. The "capacity" command allows the battery capacity of the device to be manipulated. Signed-off-by: Greg Bellows <greg.bellows@linaro.org> --- v2 -> v3 - Add missing "OK" messages
2015-01-07android-console: Add power health commandGreg Bellows
Add the Android emulator console "power health" command and associated help messages. The "health" command allows the battery health of the device to be manipulated. Signed-off-by: Greg Bellows <greg.bellows@linaro.org> --- v2 -> v3 - Add missing "OK" messages
2015-01-07android-console: Add power present commandGreg Bellows
Add the Android emulator console "power present" command and associated help messages. The "present" command allows the battery presence in the device to be manipulated. Signed-off-by: Greg Bellows <greg.bellows@linaro.org> --- v2 -> v3 - Add missing "OK" messages
2015-01-07android-console: Add power status commandGreg Bellows
Add the Android emulator console "power status" command and associated help messages. The "status" command allows the battery status of the device to be manipulated. Signed-off-by: Greg Bellows <greg.bellows@linaro.org> --- v2 -> v3 - Add missing "OK" messages
2015-01-07android-console: Add power ac commandGreg Bellows
Add the Android emulator console "power ac" along with the associated help messages. The "ac" command allows the power supply state of the device to be manipulated. Signed-off-by: Greg Bellows <greg.bellows@linaro.org> --- v2 -> v3 - Add missing "OK" messages
2015-01-07android-console: Add power display commandGreg Bellows
Add the Android emulator console "power display" along with the associated help messages. The "display" command allows the current device power and battery state to be displayed. Signed-off-by: Greg Bellows <greg.bellows@linaro.org>