aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-07-13Merge changes Ice960cbe,Icc0d8ee4HEADmastermainDavid Turner
* changes: bochs/bios: Fix the mask value used when writing to MTRR_PHYSMASK MSR bochs/bios: Fix build
2015-07-13bochs/bios: Fix the mask value used when writing to MTRR_PHYSMASK MSRYu Ning
In bochs/bios/rombios32.c, setup_mtrr() configures the vCPU via the memory type range registers (MTRRs) to use different methods of caching (uncached, write-through, write-back, etc.) for different regions of physical memory. For example, it marks the 3.5-4GiB region (0xE0000000 through 0xFFFFFFFF) as uncached, by writing to the following pair of model-specific registers (MSRs): - IA32_MTRR_PHYSBASE0 (value=0x00000000_E0000000) - IA32_MTRR_PHYSMASK0 (value=0xFFFFFFFF_E0000800) However, in the case of IA32_MTRR_PHYSMASK0, the current implementation fails to honor reserved bits (e.g. bit 63). According to Figure 11-7 of Intel(R) 64 and IA-32 Architectures Software Developer's Manual, Volume 3A [1], bits 63 through MAXPHYADDR are reserved. Moreover, according to Section 11.11.2.3, "the processor generates a general-protection exception (#GP) if software attempts to write to them". This requirement has been enforced by KVM since Linux kernel 3.18 [2]. As a result, the classic Android x86_64 emulator does not boot on Linux hosts with a 3.18+ kernel (e.g. Ubuntu 15.04). A bug has been opened at: https://code.google.com/p/android/issues/detail?id=174557 Fix this issue by using the correct mask value. In fact, the upstream Bochs codebase has already done that, so just back-port all the relevant patches: ------------------------------------------------------------------------ r9613 | sshwarts | 2009-12-11 15:44:48 +0800 (Fri, 11 Dec 2009) [3] Commit "fix for BIOS bug" changed MSR_MTRRdefType to MTRR_MEMTYPE_UC. Change it back to MTRR_MEMTYPE_WB. ------------------------------------------------------------------------ r9515 | vruppert | 2009-10-25 18:25:38 +0800 (Sun, 25 Oct 2009) | [4] - fixed MTRR mask write bug and enabled check in msr.cc ------------------------------------------------------------------------ r9504 | sshwarts | 2009-10-23 23:32:45 +0800 (Fri, 23 Oct 2009) | [5] fix for BIOS bug ------------------------------------------------------------------------ [1] http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-vol-3a-part-1-manual.pdf [2] Commit d7a2a24 of Linux kernel [3] http://sourceforge.net/p/bochs/code/9613 [4] http://sourceforge.net/p/bochs/code/9515 [5] http://sourceforge.net/p/bochs/code/9504 Change-Id: Ice960cbe557f986b001764783c215417e02897c6 Signed-off-by: Yu Ning <yu.ning@intel.com>
2015-07-13bochs/bios: Fix buildYu Ning
Currently, this project does not build on Ubuntu. "make" fails in the bochs/bios/ directory with the following error: ld -o rombios32.out -T ./rombios32.ld rombios32start.o rombios32.o ld: section .eh_frame loaded at [00000000000e3e40,00000000000e453f] overlaps section .data loaded at [00000000000e3e40,00000000000e3e43] make[1]: *** [rombios32.out] Error 1 Build environment: - Ubuntu 14.04 x86_64 - gcc (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4 - GNU ld (GNU Binutils for Ubuntu) 2.24 Back-porting the following patch from the upstream Bochs codebase fixes this issue: ------------------------------------------------------------------------ r11179 | vruppert | 2012-05-13 06:25:09 +0800 (Sun, 13 May 2012) [1] - discard "eh_frame" (compilation fix from Debian patches) ------------------------------------------------------------------------ [1] http://sourceforge.net/p/bochs/code/11179 Change-Id: Icc0d8ee4738c71e8dc02fe9e328923a4d968deac Signed-off-by: Yu Ning <yu.ning@intel.com>
2012-01-24Merge "Change the MP table to support >16 IRQ number"android-wear-5.0.0_r1android-sdk-support_r11android-sdk-adt_r20android-sdk-4.4.2_r1.0.1android-sdk-4.4.2_r1android-l-preview_r2android-cts-5.1_r9android-cts-5.1_r8android-cts-5.1_r7android-cts-5.1_r6android-cts-5.1_r5android-cts-5.1_r4android-cts-5.1_r3android-cts-5.1_r28android-cts-5.1_r27android-cts-5.1_r26android-cts-5.1_r25android-cts-5.1_r24android-cts-5.1_r23android-cts-5.1_r22android-cts-5.1_r21android-cts-5.1_r20android-cts-5.1_r2android-cts-5.1_r19android-cts-5.1_r18android-cts-5.1_r17android-cts-5.1_r16android-cts-5.1_r15android-cts-5.1_r14android-cts-5.1_r13android-cts-5.1_r10android-cts-5.1_r1android-cts-5.0_r9android-cts-5.0_r8android-cts-5.0_r7android-cts-5.0_r6android-cts-5.0_r5android-cts-5.0_r4android-cts-5.0_r3android-cts-4.4_r4android-cts-4.4_r1android-cts-4.2_r2android-cts-4.2_r1android-cts-4.1_r4android-cts-4.1_r2android-cts-4.1_r1android-5.1.1_r9android-5.1.1_r8android-5.1.1_r7android-5.1.1_r6android-5.1.1_r5android-5.1.1_r4android-5.1.1_r38android-5.1.1_r37android-5.1.1_r36android-5.1.1_r35android-5.1.1_r34android-5.1.1_r33android-5.1.1_r30android-5.1.1_r3android-5.1.1_r29android-5.1.1_r28android-5.1.1_r26android-5.1.1_r25android-5.1.1_r24android-5.1.1_r23android-5.1.1_r22android-5.1.1_r20android-5.1.1_r2android-5.1.1_r19android-5.1.1_r18android-5.1.1_r17android-5.1.1_r16android-5.1.1_r15android-5.1.1_r14android-5.1.1_r13android-5.1.1_r12android-5.1.1_r10android-5.1.1_r1android-5.1.0_r5android-5.1.0_r4android-5.1.0_r3android-5.1.0_r1android-5.0.2_r3android-5.0.2_r1android-5.0.1_r1android-5.0.0_r7android-5.0.0_r6android-5.0.0_r5.1android-5.0.0_r5android-5.0.0_r4android-5.0.0_r3android-5.0.0_r2android-5.0.0_r1android-4.4w_r1android-4.4_r1.2.0.1android-4.4_r1.2android-4.4_r1.1.0.1android-4.4_r1.1android-4.4_r1.0.1android-4.4_r1android-4.4_r0.9android-4.4_r0.8android-4.4_r0.7android-4.4.4_r2.0.1android-4.4.4_r2android-4.4.4_r1.0.1android-4.4.4_r1android-4.4.3_r1.1.0.1android-4.4.3_r1.1android-4.4.3_r1.0.1android-4.4.3_r1android-4.4.2_r2.0.1android-4.4.2_r2android-4.4.2_r1.0.1android-4.4.2_r1android-4.4.1_r1.0.1android-4.4.1_r1android-4.3_r3.1android-4.3_r3android-4.3_r2.3android-4.3_r2.2android-4.3_r2.1android-4.3_r2android-4.3_r1.1android-4.3_r1android-4.3_r0.9.1android-4.3_r0.9android-4.3.1_r1android-4.2_r1android-4.2.2_r1.2android-4.2.2_r1.1android-4.2.2_r1android-4.2.1_r1.2android-4.2.1_r1.1android-4.2.1_r1android-4.1.2_r2.1android-4.1.2_r2android-4.1.2_r1android-4.1.1_r6.1android-4.1.1_r6android-4.1.1_r5android-4.1.1_r4android-4.1.1_r3android-4.1.1_r2android-4.1.1_r1.1android-4.1.1_r1tools_r22.2tools_r22tools_r21tools_r20master-soonglollipop-wear-releaselollipop-releaselollipop-mr1-wfc-releaselollipop-mr1-releaselollipop-mr1-fi-releaselollipop-mr1-devlollipop-mr1-cts-releaselollipop-devlollipop-cts-releasel-previewkitkat-wearkitkat-releasekitkat-mr2.2-releasekitkat-mr2.1-releasekitkat-mr2-releasekitkat-mr1.1-releasekitkat-mr1-releasekitkat-devkitkat-cts-releasekitkat-cts-devjb-releasejb-mr2.0.0-releasejb-mr2.0-releasejb-mr2-releasejb-mr2-devjb-mr1.1-releasejb-mr1.1-dev-plus-aospjb-mr1.1-devjb-mr1-releasejb-mr1-dev-plus-aospjb-mr1-devjb-mr0-releasejb-devidea133-weekly-releaseidea133ics-plus-aospJean-Baptiste Queru
2012-01-18Change the MP table to support >16 IRQ numberJiang, Yunhong
Now the MP table include 16 entry, increase to the number of IOAPIC pin number. All goldfish devices should be covered by this. Change-Id: I05c1176b5396d8a88c3aedf07b1e0d7c6578a914 Signed-off-by: Jiang, Yunhong <yjiang5@intel.com>
2011-03-02Merge "x86: Use the common BIOS for qemu and KVM. With this patch, we can ↵android-sdk-tools_r12android-sdk-adt_r16.0.1android-sdk-adt_r12android-sdk-4.0.3_r1android-sdk-4.0.3-tools_r1android-cts-verifier-4.0_r1android-cts-verifier-4.0.3_r1android-cts-4.0_r1android-cts-4.0.3_r2android-cts-4.0.3_r1android-4.0.4_r2.1android-4.0.4_r2android-4.0.4_r1.2android-4.0.4_r1.1android-4.0.4_r1android-4.0.3_r1.1android-4.0.3_r1android-4.0.2_r1android-4.0.1_r1.2android-4.0.1_r1.1android-4.0.1_r1ics-mr1-releaseics-mr1ics-mr0-releaseics-mr0ics-factoryrom-2-releaseDavid Turner
use the same guest BIOS for Android x86 emulator w/ or w/o KVM enabled."
2011-02-28x86: Use the common BIOS for qemu and KVM. With this patch, we can use the sameJun Nakajima
guest BIOS for Android x86 emulator w/ or w/o KVM enabled. Change-Id: I61ec2f1ff81a441006725377be18ed4e0304af3f Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
2011-02-23Merge "x86: source code to build two binaries: bios.bin and ↵David Turner
vgabios-cirrus.bin, which are required for x86 emulation in the Android x86 emulator."
2011-02-15x86: source code to build two binaries: bios.bin and vgabios-cirrus.bin,Jun Nakajima
which are required for x86 emulation in the Android x86 emulator. Change-Id: I0e3b59ad67df20a690504336bdafe7b22bc7fb3f Signed-off-by: Xiaohui Xin <xiaohui.xin@intel.com> Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
2011-02-09empty first commitJean-Baptiste Queru