diff options
Diffstat (limited to 'meta-linaro/recipes-devtools/qemu')
12 files changed, 486 insertions, 0 deletions
diff --git a/meta-linaro/recipes-devtools/qemu/files/3f08ffb4a4741d147634761dc053ed386243a0de.patch b/meta-linaro/recipes-devtools/qemu/files/3f08ffb4a4741d147634761dc053ed386243a0de.patch new file mode 100644 index 0000000..4390b94 --- /dev/null +++ b/meta-linaro/recipes-devtools/qemu/files/3f08ffb4a4741d147634761dc053ed386243a0de.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | [Appears to fix the random segfaults we were seeing in a variety of architectures: | ||
4 | https://bugzilla.yoctoproject.org/show_bug.cgi?id=4216 ] | ||
5 | |||
6 | |||
7 | From: Yeongkyoon Lee <yeongkyoon.lee@samsung.com> | ||
8 | Date: Fri, 22 Mar 2013 12:50:17 +0000 (+0900) | ||
9 | Subject: tcg: Fix occasional TCG broken problem when ldst optimization enabled | ||
10 | X-Git-Url: http://git.qemu.org/?p=qemu.git;a=commitdiff_plain;h=52ae646d4a3ebdcdcc973492c6a56f2c49b6578f;hp=3f08ffb4a4741d147634761dc053ed386243a0de | ||
11 | |||
12 | tcg: Fix occasional TCG broken problem when ldst optimization enabled | ||
13 | |||
14 | is_tcg_gen_code() checks the upper limit of TCG generated code range wrong, so | ||
15 | that TCG could get broken occasionally only when CONFIG_QEMU_LDST_OPTIMIZATION | ||
16 | enabled. The reason is code_gen_buffer_max_size does not cover the upper range | ||
17 | up to (TCG_MAX_OP_SIZE * OPC_BUF_SIZE), thus code_gen_buffer_max_size should be | ||
18 | modified to code_gen_buffer_size. | ||
19 | |||
20 | CC: qemu-stable@nongnu.org | ||
21 | Signed-off-by: Yeongkyoon Lee <yeongkyoon.lee@samsung.com> | ||
22 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> | ||
23 | Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> | ||
24 | --- | ||
25 | |||
26 | Index: qemu-1.4.0/translate-all.c | ||
27 | =================================================================== | ||
28 | --- qemu-1.4.0.orig/translate-all.c 2013-04-09 10:58:19.000000000 +0000 | ||
29 | +++ qemu-1.4.0/translate-all.c 2013-04-09 10:58:34.783203406 +0000 | ||
30 | @@ -1310,10 +1310,10 @@ | ||
31 | /* check whether the given addr is in TCG generated code buffer or not */ | ||
32 | bool is_tcg_gen_code(uintptr_t tc_ptr) | ||
33 | { | ||
34 | - /* This can be called during code generation, code_gen_buffer_max_size | ||
35 | + /* This can be called during code generation, code_gen_buffer_size | ||
36 | is used instead of code_gen_ptr for upper boundary checking */ | ||
37 | return (tc_ptr >= (uintptr_t)code_gen_buffer && | ||
38 | - tc_ptr < (uintptr_t)(code_gen_buffer + code_gen_buffer_max_size)); | ||
39 | + tc_ptr < (uintptr_t)(code_gen_buffer + code_gen_buffer_size)); | ||
40 | } | ||
41 | #endif | ||
42 | |||
diff --git a/meta-linaro/recipes-devtools/qemu/files/enable-i386-linux-user.patch b/meta-linaro/recipes-devtools/qemu/files/enable-i386-linux-user.patch new file mode 100644 index 0000000..bb0d6a3 --- /dev/null +++ b/meta-linaro/recipes-devtools/qemu/files/enable-i386-linux-user.patch | |||
@@ -0,0 +1,55 @@ | |||
1 | Enable i386-linux-user | ||
2 | |||
3 | Signed-off-by: Zhai Edwin <edwin.zhai@intel.com> | ||
4 | |||
5 | Upstream-Status: Inappropriate [configuration] | ||
6 | |||
7 | Index: qemu-0.14.0/Makefile.target | ||
8 | =================================================================== | ||
9 | --- qemu-0.14.0.orig/Makefile.target | ||
10 | +++ qemu-0.14.0/Makefile.target | ||
11 | @@ -78,8 +78,13 @@ ifeq ($(TARGET_BASE_ARCH), i386) | ||
12 | libobj-y += cpuid.o | ||
13 | endif | ||
14 | libobj-$(CONFIG_NEED_MMU) += mmu.o | ||
15 | +ifndef CONFIG_LINUX_USER | ||
16 | libobj-$(TARGET_I386) += helper_opengl.o opengl_exec.o | ||
17 | libobj-$(TARGET_X86_64) += helper_opengl.o opengl_exec.o | ||
18 | +else | ||
19 | +libobj-$(TARGET_I386) += dummygl.o | ||
20 | +libobj-$(TARGET_X86_64) += dummygl.o | ||
21 | +endif #CONFIG_LINUX_USER | ||
22 | libobj-$(TARGET_ARM) += dummygl.o | ||
23 | libobj-$(TARGET_MIPS) += dummygl.o | ||
24 | libobj-$(TARGET_PPC) += dummygl.o | ||
25 | Index: qemu-0.14.0/target-i386/dummygl.c | ||
26 | =================================================================== | ||
27 | --- /dev/null | ||
28 | +++ qemu-0.14.0/target-i386/dummygl.c | ||
29 | @@ -0,0 +1,26 @@ | ||
30 | +#include <string.h> | ||
31 | +#include <stdlib.h> | ||
32 | +#include <assert.h> | ||
33 | +#include <stdint.h> | ||
34 | +#include <X11/Xlib.h> | ||
35 | +#include <X11/Xutil.h> | ||
36 | + | ||
37 | +void opengl_exec_set_parent_window(Display* _dpy, Window _parent_window) | ||
38 | +{ | ||
39 | + | ||
40 | +} | ||
41 | + | ||
42 | +void opengl_process_enable(void) | ||
43 | +{ | ||
44 | + | ||
45 | +} | ||
46 | + | ||
47 | + | ||
48 | +void mem_opengl(uint64_t ptr) | ||
49 | +{ | ||
50 | + | ||
51 | +} | ||
52 | + | ||
53 | +void helper_opengl(void) | ||
54 | +{ | ||
55 | +} | ||
diff --git a/meta-linaro/recipes-devtools/qemu/files/fdt_header.patch b/meta-linaro/recipes-devtools/qemu/files/fdt_header.patch new file mode 100644 index 0000000..dccfe53 --- /dev/null +++ b/meta-linaro/recipes-devtools/qemu/files/fdt_header.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | qemu: define fdt types in libfdt_env.h from qemu | ||
4 | |||
5 | * fixes | ||
6 | In file included from /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/libfdt.h:55:0, | ||
7 | from /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/work/x86_64-linux/qemu-native/1.4.0-r0/qemu-1.4.0/hw/arm/../../device_tree.c:28: | ||
8 | /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:58:2: error: unknown type name 'fdt32_t' | ||
9 | /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:59:2: error: unknown type name 'fdt32_t' | ||
10 | /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:60:2: error: unknown type name 'fdt32_t' | ||
11 | /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:61:2: error: unknown type name 'fdt32_t' | ||
12 | /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:62:2: error: unknown type name 'fdt32_t' | ||
13 | /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:63:2: error: unknown type name 'fdt32_t' | ||
14 | /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:64:2: error: unknown type name 'fdt32_t' | ||
15 | /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:67:2: error: unknown type name 'fdt32_t' | ||
16 | /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:70:2: error: unknown type name 'fdt32_t' | ||
17 | /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:73:2: error: unknown type name 'fdt32_t' | ||
18 | /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:77:2: error: unknown type name 'fdt64_t' | ||
19 | /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:78:2: error: unknown type name 'fdt64_t' | ||
20 | /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:82:2: error: unknown type name 'fdt32_t' | ||
21 | /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:87:2: error: unknown type name 'fdt32_t' | ||
22 | /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:88:2: error: unknown type name 'fdt32_t' | ||
23 | /home/oe/setup-scripts/build/tmp-angstrom_next-uclibc/sysroots/x86_64-linux/usr/include/fdt.h:89:2: error: unknown type name 'fdt32_t' | ||
24 | |||
25 | Index: qemu-1.4.0/include/libfdt_env.h | ||
26 | =================================================================== | ||
27 | --- qemu-1.4.0.orig/include/libfdt_env.h 2013-02-15 23:05:35.000000000 +0000 | ||
28 | +++ qemu-1.4.0/include/libfdt_env.h 2013-04-13 14:17:27.918885225 +0000 | ||
29 | @@ -21,6 +21,10 @@ | ||
30 | |||
31 | #include "qemu/bswap.h" | ||
32 | |||
33 | +typedef uint16_t fdt16_t; | ||
34 | +typedef uint32_t fdt32_t; | ||
35 | +typedef uint64_t fdt64_t; | ||
36 | + | ||
37 | #ifdef HOST_WORDS_BIGENDIAN | ||
38 | #define fdt32_to_cpu(x) (x) | ||
39 | #define cpu_to_fdt32(x) (x) | ||
diff --git a/meta-linaro/recipes-devtools/qemu/files/fix-libcap-header-issue-on-some-distro.patch b/meta-linaro/recipes-devtools/qemu/files/fix-libcap-header-issue-on-some-distro.patch new file mode 100644 index 0000000..13a6ea2 --- /dev/null +++ b/meta-linaro/recipes-devtools/qemu/files/fix-libcap-header-issue-on-some-distro.patch | |||
@@ -0,0 +1,84 @@ | |||
1 | fix libcap header issue on some distro | ||
2 | |||
3 | 1, When build qemu-native on SLED 11.2, there is an error: | ||
4 | ... | ||
5 | | In file included from /usr/include/bits/sigcontext.h:28, | ||
6 | | from /usr/include/signal.h:339, | ||
7 | | from /buildarea2/tmp/work/i686-linux/qemu-native/1.4.0-r0/ | ||
8 | qemu-1.4.0/include/qemu-common.h:42, | ||
9 | | from fsdev/virtfs-proxy-helper.c:23: | ||
10 | | /usr/include/asm/sigcontext.h:28: error: expected specifier- | ||
11 | qualifier-list before '__u64' | ||
12 | | /usr/include/asm/sigcontext.h:191: error: expected specifier- | ||
13 | qualifier-list before '__u64' | ||
14 | ... | ||
15 | |||
16 | 2, The virtfs-proxy-helper.c includes <sys/capability.h> and | ||
17 | qemu-common.h in sequence. The header include map is: | ||
18 | (`-->' presents `include') | ||
19 | ... | ||
20 | "virtfs-proxy-helper.c" --> <sys/capability.h> | ||
21 | ... | ||
22 | "virtfs-proxy-helper.c" --> "qemu-common.h" --> <signal.h> --> | ||
23 | <bits/sigcontext.h> --> <asm/sigcontext.h> --> <linux/types.h> --> | ||
24 | <asm/types.h> --> <asm-generic/types.h> --> <asm-generic/int-ll64.h> | ||
25 | ... | ||
26 | |||
27 | 3, The bug is found on SLED 11.2 x86. In libcap header file | ||
28 | /usr/include/sys/capability.h, it does evil stuff like this: | ||
29 | ... | ||
30 | 25 /* | ||
31 | 26 * Make sure we can be included from userland by preventing | ||
32 | 27 * capability.h from including other kernel headers | ||
33 | 28 */ | ||
34 | 29 #define _LINUX_TYPES_H | ||
35 | 30 #define _LINUX_FS_H | ||
36 | 31 #define __LINUX_COMPILER_H | ||
37 | 32 #define __user | ||
38 | 33 | ||
39 | 34 typedef unsigned int __u32; | ||
40 | 35 typedef __u32 __le32; | ||
41 | ... | ||
42 | This completely prevents including /usr/include/linux/types.h. | ||
43 | The above `<asm/sigcontext.h> --> <linux/types.h>' is prevented, | ||
44 | and '__u64' is defined in <asm-generic/int-ll64.h>. | ||
45 | |||
46 | 4, Modify virtfs-proxy-helper.c to include <sys/capability.h> | ||
47 | last to workaround the issue. | ||
48 | |||
49 | http://www.linuxtv.org/pipermail/vdr/2009-August/021194.html | ||
50 | http://patchwork.linuxtv.org/patch/12748/ | ||
51 | |||
52 | Upstream-Status: Pending | ||
53 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
54 | --- | ||
55 | fsdev/virtfs-proxy-helper.c | 7 +++++-- | ||
56 | 1 file changed, 5 insertions(+), 2 deletions(-) | ||
57 | |||
58 | diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c | ||
59 | --- a/fsdev/virtfs-proxy-helper.c | ||
60 | +++ b/fsdev/virtfs-proxy-helper.c | ||
61 | @@ -12,7 +12,6 @@ | ||
62 | #include <sys/resource.h> | ||
63 | #include <getopt.h> | ||
64 | #include <syslog.h> | ||
65 | -#include <sys/capability.h> | ||
66 | #include <sys/fsuid.h> | ||
67 | #include <sys/vfs.h> | ||
68 | #include <sys/ioctl.h> | ||
69 | @@ -26,7 +25,11 @@ | ||
70 | #include "virtio-9p-marshal.h" | ||
71 | #include "hw/9pfs/virtio-9p-proxy.h" | ||
72 | #include "fsdev/virtio-9p-marshal.h" | ||
73 | - | ||
74 | +/* | ||
75 | + * Include this one last due to some versions of it being buggy: | ||
76 | + * http://www.linuxtv.org/pipermail/vdr/2009-August/021194.html | ||
77 | + */ | ||
78 | +#include <sys/capability.h> | ||
79 | #define PROGNAME "virtfs-proxy-helper" | ||
80 | |||
81 | #ifndef XFS_SUPER_MAGIC | ||
82 | -- | ||
83 | 1.7.10.4 | ||
84 | |||
diff --git a/meta-linaro/recipes-devtools/qemu/files/init-info.patch b/meta-linaro/recipes-devtools/qemu/files/init-info.patch new file mode 100644 index 0000000..2250444 --- /dev/null +++ b/meta-linaro/recipes-devtools/qemu/files/init-info.patch | |||
@@ -0,0 +1,18 @@ | |||
1 | # This is a workaround to the crashes seen on Ubuntu. Setting info to zero | ||
2 | # makes info.info.x11.display zero and avoids the calls to | ||
3 | # opengl_exec_set_parent_window, one of which is crashing. | ||
4 | |||
5 | Upstream-Status: Pending | ||
6 | |||
7 | Index: qemu-0.14.0/ui/sdl.c | ||
8 | =================================================================== | ||
9 | --- qemu-0.14.0.orig/ui/sdl.c | ||
10 | +++ qemu-0.14.0/ui/sdl.c | ||
11 | @@ -863,6 +863,7 @@ void sdl_display_init(DisplayState *ds, | ||
12 | vi = SDL_GetVideoInfo(); | ||
13 | host_format = *(vi->vfmt); | ||
14 | |||
15 | + bzero(&info, sizeof(info)); | ||
16 | SDL_GetWMInfo(&info); | ||
17 | if (info.subsystem == SDL_SYSWM_X11 && info.info.x11.display) | ||
18 | opengl_exec_set_parent_window(info.info.x11.display, | ||
diff --git a/meta-linaro/recipes-devtools/qemu/files/larger_default_ram_size.patch b/meta-linaro/recipes-devtools/qemu/files/larger_default_ram_size.patch new file mode 100644 index 0000000..711c360 --- /dev/null +++ b/meta-linaro/recipes-devtools/qemu/files/larger_default_ram_size.patch | |||
@@ -0,0 +1,22 @@ | |||
1 | This patch is taken from debian. 128M is too less sometimes if distro | ||
2 | with lot of packages is booted so this patch raises the default to 384M | ||
3 | |||
4 | It has not been applied to upstream qemu | ||
5 | |||
6 | Khem Raj <raj.khem@gmail.com> | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | |||
10 | Index: qemu-0.14.0/vl.c | ||
11 | =================================================================== | ||
12 | --- qemu-0.14.0.orig/vl.c | ||
13 | +++ qemu-0.14.0/vl.c | ||
14 | @@ -168,7 +168,7 @@ int main(int argc, char **argv) | ||
15 | //#define DEBUG_NET | ||
16 | //#define DEBUG_SLIRP | ||
17 | |||
18 | -#define DEFAULT_RAM_SIZE 128 | ||
19 | +#define DEFAULT_RAM_SIZE 384 | ||
20 | |||
21 | #define MAX_VIRTIO_CONSOLES 1 | ||
22 | |||
diff --git a/meta-linaro/recipes-devtools/qemu/files/no-strip.patch b/meta-linaro/recipes-devtools/qemu/files/no-strip.patch new file mode 100644 index 0000000..d6a4377 --- /dev/null +++ b/meta-linaro/recipes-devtools/qemu/files/no-strip.patch | |||
@@ -0,0 +1,15 @@ | |||
1 | Upstream-Status: Inappropriate [configuration] | ||
2 | |||
3 | Index: qemu-0.14.0/Makefile | ||
4 | =================================================================== | ||
5 | --- qemu-0.14.0.orig/Makefile | ||
6 | +++ qemu-0.14.0/Makefile | ||
7 | @@ -235,7 +235,7 @@ install-sysconfig: | ||
8 | install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig | ||
9 | $(INSTALL_DIR) "$(DESTDIR)$(bindir)" | ||
10 | ifneq ($(TOOLS),) | ||
11 | - $(INSTALL_PROG) $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)" | ||
12 | + $(INSTALL_PROG) $(TOOLS) "$(DESTDIR)$(bindir)" | ||
13 | endif | ||
14 | ifneq ($(BLOBS),) | ||
15 | $(INSTALL_DIR) "$(DESTDIR)$(datadir)" | ||
diff --git a/meta-linaro/recipes-devtools/qemu/files/powerpc_rom.bin b/meta-linaro/recipes-devtools/qemu/files/powerpc_rom.bin new file mode 100644 index 0000000..c404429 --- /dev/null +++ b/meta-linaro/recipes-devtools/qemu/files/powerpc_rom.bin | |||
Binary files differ | |||
diff --git a/meta-linaro/recipes-devtools/qemu/files/relocatable_sdk.patch b/meta-linaro/recipes-devtools/qemu/files/relocatable_sdk.patch new file mode 100644 index 0000000..774a49c --- /dev/null +++ b/meta-linaro/recipes-devtools/qemu/files/relocatable_sdk.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | Upstream-Status: Inappropriate [SDK specific] | ||
2 | |||
3 | In order to be able to change the dynamic loader path when relocating | ||
4 | binaries, the interp section has to be made big enough to accomodate | ||
5 | the new path (4096 is the maximum path length in Linux). | ||
6 | |||
7 | Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> | ||
8 | |||
9 | Index: qemu-1.4.0/ldscripts/i386.ld | ||
10 | =================================================================== | ||
11 | --- qemu-1.4.0.orig/ldscripts/i386.ld 2013-02-15 15:05:35.000000000 -0800 | ||
12 | +++ qemu-1.4.0/ldscripts/i386.ld 2013-02-28 22:55:36.138816418 -0800 | ||
13 | @@ -8,7 +8,7 @@ | ||
14 | { | ||
15 | /* Read-only sections, merged into text segment: */ | ||
16 | . = 0x60000000 + SIZEOF_HEADERS; | ||
17 | - .interp : { *(.interp) } | ||
18 | + .interp : { *(.interp); . = 0x1000; } | ||
19 | .hash : { *(.hash) } | ||
20 | .dynsym : { *(.dynsym) } | ||
21 | .dynstr : { *(.dynstr) } | ||
22 | Index: qemu-1.4.0/ldscripts/x86_64.ld | ||
23 | =================================================================== | ||
24 | --- qemu-1.4.0.orig/ldscripts/x86_64.ld 2013-02-15 15:05:35.000000000 -0800 | ||
25 | +++ qemu-1.4.0/ldscripts/x86_64.ld 2013-02-28 22:55:36.138816418 -0800 | ||
26 | @@ -6,7 +6,7 @@ | ||
27 | { | ||
28 | /* Read-only sections, merged into text segment: */ | ||
29 | . = 0x60000000 + SIZEOF_HEADERS; | ||
30 | - .interp : { *(.interp) } | ||
31 | + .interp : { *(.interp); . = 0x1000; } | ||
32 | .hash : { *(.hash) } | ||
33 | .dynsym : { *(.dynsym) } | ||
34 | .dynstr : { *(.dynstr) } | ||
diff --git a/meta-linaro/recipes-devtools/qemu/files/target-i386-Fix-aflag-logic-for-CODE64-and-the-0x67-.patch b/meta-linaro/recipes-devtools/qemu/files/target-i386-Fix-aflag-logic-for-CODE64-and-the-0x67-.patch new file mode 100644 index 0000000..852efd1 --- /dev/null +++ b/meta-linaro/recipes-devtools/qemu/files/target-i386-Fix-aflag-logic-for-CODE64-and-the-0x67-.patch | |||
@@ -0,0 +1,79 @@ | |||
1 | Upstream-Status: Backported | ||
2 | |||
3 | From dec3fc9657e0682637de4d5a29d947284d01985c Mon Sep 17 00:00:00 2001 | ||
4 | From: Richard Henderson <rth@twiddle.net> | ||
5 | Date: Wed, 29 May 2013 12:30:51 -0700 | ||
6 | Subject: [PATCH] target-i386: Fix aflag logic for CODE64 and the 0x67 prefix | ||
7 | |||
8 | The code reorganization in commit 4a6fd938 broke handling of PREFIX_ADR. | ||
9 | While fixing this, tidy and comment the code so that it's more obvious | ||
10 | what's going on in setting both aflag and dflag. | ||
11 | |||
12 | The TARGET_X86_64 ifdef can be eliminated because CODE64 expands to the | ||
13 | constant zero when TARGET_X86_64 is undefined. | ||
14 | |||
15 | Cc: Paolo Bonzini <pbonzini@redhat.com> | ||
16 | Reported-by: Laszlo Ersek <lersek@redhat.com> | ||
17 | Signed-off-by: Richard Henderson <rth@twiddle.net> | ||
18 | Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> | ||
19 | Message-id: 1369855851-21400-1-git-send-email-rth@twiddle.net | ||
20 | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> | ||
21 | --- | ||
22 | target-i386/translate.c | 30 +++++++++++++++--------------- | ||
23 | 1 file changed, 15 insertions(+), 15 deletions(-) | ||
24 | |||
25 | diff --git a/target-i386/translate.c b/target-i386/translate.c | ||
26 | index 0aeccdb..14b0298 100644 | ||
27 | --- a/target-i386/translate.c | ||
28 | +++ b/target-i386/translate.c | ||
29 | @@ -4677,8 +4677,6 @@ static target_ulong disas_insn(CPUX86State *env, DisasContext *s, | ||
30 | } | ||
31 | s->pc = pc_start; | ||
32 | prefixes = 0; | ||
33 | - aflag = s->code32; | ||
34 | - dflag = s->code32; | ||
35 | s->override = -1; | ||
36 | rex_w = -1; | ||
37 | rex_r = 0; | ||
38 | @@ -4801,23 +4799,25 @@ static target_ulong disas_insn(CPUX86State *env, DisasContext *s, | ||
39 | } | ||
40 | |||
41 | /* Post-process prefixes. */ | ||
42 | - if (prefixes & PREFIX_DATA) { | ||
43 | - dflag ^= 1; | ||
44 | - } | ||
45 | - if (prefixes & PREFIX_ADR) { | ||
46 | - aflag ^= 1; | ||
47 | - } | ||
48 | -#ifdef TARGET_X86_64 | ||
49 | if (CODE64(s)) { | ||
50 | - if (rex_w == 1) { | ||
51 | - /* 0x66 is ignored if rex.w is set */ | ||
52 | - dflag = 2; | ||
53 | + /* In 64-bit mode, the default data size is 32-bit. Select 64-bit | ||
54 | + data with rex_w, and 16-bit data with 0x66; rex_w takes precedence | ||
55 | + over 0x66 if both are present. */ | ||
56 | + dflag = (rex_w > 0 ? 2 : prefixes & PREFIX_DATA ? 0 : 1); | ||
57 | + /* In 64-bit mode, 0x67 selects 32-bit addressing. */ | ||
58 | + aflag = (prefixes & PREFIX_ADR ? 1 : 2); | ||
59 | + } else { | ||
60 | + /* In 16/32-bit mode, 0x66 selects the opposite data size. */ | ||
61 | + dflag = s->code32; | ||
62 | + if (prefixes & PREFIX_DATA) { | ||
63 | + dflag ^= 1; | ||
64 | } | ||
65 | - if (!(prefixes & PREFIX_ADR)) { | ||
66 | - aflag = 2; | ||
67 | + /* In 16/32-bit mode, 0x67 selects the opposite addressing. */ | ||
68 | + aflag = s->code32; | ||
69 | + if (prefixes & PREFIX_ADR) { | ||
70 | + aflag ^= 1; | ||
71 | } | ||
72 | } | ||
73 | -#endif | ||
74 | |||
75 | s->prefix = prefixes; | ||
76 | s->aflag = aflag; | ||
77 | -- | ||
78 | 1.7.9.5 | ||
79 | |||
diff --git a/meta-linaro/recipes-devtools/qemu/files/target-ppc_fix_bit_extraction.patch b/meta-linaro/recipes-devtools/qemu/files/target-ppc_fix_bit_extraction.patch new file mode 100644 index 0000000..631d23b --- /dev/null +++ b/meta-linaro/recipes-devtools/qemu/files/target-ppc_fix_bit_extraction.patch | |||
@@ -0,0 +1,70 @@ | |||
1 | Delivered-To: raj.khem@gmail.com | ||
2 | Received: by 10.50.216.195 with SMTP id os3csp11191igc; | ||
3 | Thu, 15 Aug 2013 04:32:45 -0700 (PDT) | ||
4 | X-Received: by 10.180.98.3 with SMTP id ee3mr1508103wib.48.1376566364872; | ||
5 | Thu, 15 Aug 2013 04:32:44 -0700 (PDT) | ||
6 | Return-Path: <aurelien@aurel32.net> | ||
7 | Received: from hall.aurel32.net (hall.aurel32.net. [2001:470:1f0b:4a8::1]) | ||
8 | by mx.google.com with ESMTPS id vv5si15578100wjc.49.2013.08.15.04.32.44 | ||
9 | for <raj.khem@gmail.com> | ||
10 | (version=TLSv1.2 cipher=RC4-SHA bits=128/128); | ||
11 | Thu, 15 Aug 2013 04:32:44 -0700 (PDT) | ||
12 | Received-SPF: pass (google.com: best guess record for domain of aurelien@aurel32.net designates 2001:470:1f0b:4a8::1 as permitted sender) client-ip=2001:470:1f0b:4a8::1; | ||
13 | Authentication-Results: mx.google.com; | ||
14 | spf=pass (google.com: best guess record for domain of aurelien@aurel32.net designates 2001:470:1f0b:4a8::1 as permitted sender) smtp.mail=aurelien@aurel32.net | ||
15 | Received: from [2001:470:d4ed:1:2db:dfff:fe14:52d] (helo=ohm.aurel32.net) | ||
16 | by hall.aurel32.net with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) | ||
17 | (Exim 4.80) | ||
18 | (envelope-from <aurelien@aurel32.net>) | ||
19 | id 1V9vnG-0006cO-NN; Thu, 15 Aug 2013 13:32:42 +0200 | ||
20 | Received: from aurel32 by ohm.aurel32.net with local (Exim 4.80) | ||
21 | (envelope-from <aurelien@aurel32.net>) | ||
22 | id 1V9vnF-0002Lw-7L; Thu, 15 Aug 2013 13:32:41 +0200 | ||
23 | From: Aurelien Jarno <aurelien@aurel32.net> | ||
24 | To: qemu-devel@nongnu.org | ||
25 | Cc: Khem Raj <raj.khem@gmail.com>, | ||
26 | Alexander Graf <agraf@suse.de> , | ||
27 | qemu-stable@nongnu.org, | ||
28 | qemu-ppc@nongnu.org, | ||
29 | Aurelien Jarno <aurelien@aurel32.net> | ||
30 | Subject: [PATCH] target-ppc: fix bit extraction for FPBF and FPL | ||
31 | Date: Thu, 15 Aug 2013 13:32:38 +0200 | ||
32 | Message-Id: <1376566358-8989-1-git-send-email-aurelien@aurel32.net> | ||
33 | X-Mailer: git-send-email 1.7.10.4 | ||
34 | |||
35 | Bit extraction for the FP BF and L field of the MTFSFI and MTFSF | ||
36 | instructions is wrong and doesn't match the reference manual (which | ||
37 | explain the bit number in big endian format). It has been broken in | ||
38 | commit 7d08d85645def18eac2a9d672c1868a35e0bcf79. | ||
39 | |||
40 | This patch fixes this, which in turn fixes the problem reported by | ||
41 | Khem Raj about the floor() function of libm. | ||
42 | |||
43 | Reported-by: Khem Raj <raj.khem@gmail.com> | ||
44 | Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> | ||
45 | |||
46 | Upstream-Status: Backport | ||
47 | |||
48 | --- | ||
49 | target-ppc/translate.c | 4 ++-- | ||
50 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
51 | |||
52 | I don't know if we still have time to get this into 1.6, hence the Cc: | ||
53 | to stable. In anycase it also needs to be fixed in 1.5. | ||
54 | |||
55 | Index: qemu-1.5.0/target-ppc/translate.c | ||
56 | =================================================================== | ||
57 | --- qemu-1.5.0.orig/target-ppc/translate.c 2013-05-20 08:34:40.000000000 -0700 | ||
58 | +++ qemu-1.5.0/target-ppc/translate.c 2013-08-15 06:49:25.028144352 -0700 | ||
59 | @@ -428,9 +428,9 @@ | ||
60 | EXTRACT_HELPER(SR, 16, 4); | ||
61 | |||
62 | /* mtfsf/mtfsfi */ | ||
63 | -EXTRACT_HELPER(FPBF, 19, 3); | ||
64 | +EXTRACT_HELPER(FPBF, 23, 3); | ||
65 | EXTRACT_HELPER(FPIMM, 12, 4); | ||
66 | -EXTRACT_HELPER(FPL, 21, 1); | ||
67 | +EXTRACT_HELPER(FPL, 25, 1); | ||
68 | EXTRACT_HELPER(FPFLM, 17, 8); | ||
69 | EXTRACT_HELPER(FPW, 16, 1); | ||
70 | |||
diff --git a/meta-linaro/recipes-devtools/qemu/qemu_git.bb b/meta-linaro/recipes-devtools/qemu/qemu_git.bb new file mode 100644 index 0000000..cae577d --- /dev/null +++ b/meta-linaro/recipes-devtools/qemu/qemu_git.bb | |||
@@ -0,0 +1,28 @@ | |||
1 | require recipes-devtools/qemu/qemu.inc | ||
2 | |||
3 | DEPENDS = "glib-2.0 zlib alsa-lib pixman dtc libsdl jpeg" | ||
4 | DEPENDS_class-native = "zlib-native alsa-lib-native glib-2.0-native pixman-native dtc-native" | ||
5 | DEPENDS_class-nativesdk = "nativesdk-zlib nativesdk-libsdl nativesdk-glib-2.0 nativesdk-pixman nativesdk-dtc" | ||
6 | |||
7 | SRCREV = "541bbb07eb197a870661ed702ae1f15c7d46aea6" | ||
8 | |||
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ | ||
10 | file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913" | ||
11 | |||
12 | PV = "2.1.0+git${SRCPV}" | ||
13 | |||
14 | SRC_URI = "git://git.qemu.org/qemu.git \ | ||
15 | file://powerpc_rom.bin \ | ||
16 | " | ||
17 | |||
18 | S = "${WORKDIR}/git" | ||
19 | EXTRA_OECONF+="--enable-kvm --enable-fdt " | ||
20 | EXTRA_OECONF_aarch64+="--target-list=aarch64-softmmu --enable-tcg-interpreter" | ||
21 | EXTRA_OECONF_class-native = "--target-list='arm-linux-user armeb-linux-user' --extra-cflags='${CFLAGS}'" | ||
22 | |||
23 | DEFAULT_PREFERENCE_arm = "1" | ||
24 | DEFAULT_PREFERENCE_aarch64 = "1" | ||
25 | DEFAULT_PREFERENCE_armeb = "1" | ||
26 | |||
27 | #/run folder not shipped | ||
28 | INSANE_SKIP_${PN} += "installed-vs-shipped" | ||