summaryrefslogtreecommitdiffstats
path: root/meta-linaro/recipes-devtools/qemu/files
diff options
context:
space:
mode:
Diffstat (limited to 'meta-linaro/recipes-devtools/qemu/files')
-rw-r--r--meta-linaro/recipes-devtools/qemu/files/3f08ffb4a4741d147634761dc053ed386243a0de.patch42
-rw-r--r--meta-linaro/recipes-devtools/qemu/files/enable-i386-linux-user.patch55
-rw-r--r--meta-linaro/recipes-devtools/qemu/files/fdt_header.patch39
-rw-r--r--meta-linaro/recipes-devtools/qemu/files/fix-libcap-header-issue-on-some-distro.patch84
-rw-r--r--meta-linaro/recipes-devtools/qemu/files/init-info.patch18
-rw-r--r--meta-linaro/recipes-devtools/qemu/files/larger_default_ram_size.patch22
-rw-r--r--meta-linaro/recipes-devtools/qemu/files/no-strip.patch15
-rw-r--r--meta-linaro/recipes-devtools/qemu/files/powerpc_rom.binbin0 -> 4096 bytes
-rw-r--r--meta-linaro/recipes-devtools/qemu/files/relocatable_sdk.patch34
-rw-r--r--meta-linaro/recipes-devtools/qemu/files/target-i386-Fix-aflag-logic-for-CODE64-and-the-0x67-.patch79
-rw-r--r--meta-linaro/recipes-devtools/qemu/files/target-ppc_fix_bit_extraction.patch70
11 files changed, 458 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 @@
1Upstream-Status: Backport
2
3[Appears to fix the random segfaults we were seeing in a variety of architectures:
4https://bugzilla.yoctoproject.org/show_bug.cgi?id=4216 ]
5
6
7From: Yeongkyoon Lee <yeongkyoon.lee@samsung.com>
8Date: Fri, 22 Mar 2013 12:50:17 +0000 (+0900)
9Subject: tcg: Fix occasional TCG broken problem when ldst optimization enabled
10X-Git-Url: http://git.qemu.org/?p=qemu.git;a=commitdiff_plain;h=52ae646d4a3ebdcdcc973492c6a56f2c49b6578f;hp=3f08ffb4a4741d147634761dc053ed386243a0de
11
12tcg: Fix occasional TCG broken problem when ldst optimization enabled
13
14is_tcg_gen_code() checks the upper limit of TCG generated code range wrong, so
15that TCG could get broken occasionally only when CONFIG_QEMU_LDST_OPTIMIZATION
16enabled. The reason is code_gen_buffer_max_size does not cover the upper range
17up to (TCG_MAX_OP_SIZE * OPC_BUF_SIZE), thus code_gen_buffer_max_size should be
18modified to code_gen_buffer_size.
19
20CC: qemu-stable@nongnu.org
21Signed-off-by: Yeongkyoon Lee <yeongkyoon.lee@samsung.com>
22Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
23Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
24---
25
26Index: 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 @@
1Enable i386-linux-user
2
3Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
4
5Upstream-Status: Inappropriate [configuration]
6
7Index: 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
25Index: 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 @@
1Upstream-Status: Pending
2
3qemu: 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
25Index: 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 @@
1fix libcap header issue on some distro
2
31, 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/
8qemu-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-
11qualifier-list before '__u64'
12| /usr/include/asm/sigcontext.h:191: error: expected specifier-
13qualifier-list before '__u64'
14...
15
162, The virtfs-proxy-helper.c includes <sys/capability.h> and
17qemu-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
273, 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...
42This completely prevents including /usr/include/linux/types.h.
43The above `<asm/sigcontext.h> --> <linux/types.h>' is prevented,
44and '__u64' is defined in <asm-generic/int-ll64.h>.
45
464, Modify virtfs-proxy-helper.c to include <sys/capability.h>
47last to workaround the issue.
48
49http://www.linuxtv.org/pipermail/vdr/2009-August/021194.html
50http://patchwork.linuxtv.org/patch/12748/
51
52Upstream-Status: Pending
53Signed-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
58diff --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--
831.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
5Upstream-Status: Pending
6
7Index: 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 @@
1This patch is taken from debian. 128M is too less sometimes if distro
2with lot of packages is booted so this patch raises the default to 384M
3
4It has not been applied to upstream qemu
5
6Khem Raj <raj.khem@gmail.com>
7
8Upstream-Status: Pending
9
10Index: 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 @@
1Upstream-Status: Inappropriate [configuration]
2
3Index: 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 @@
1Upstream-Status: Inappropriate [SDK specific]
2
3In order to be able to change the dynamic loader path when relocating
4binaries, the interp section has to be made big enough to accomodate
5the new path (4096 is the maximum path length in Linux).
6
7Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
8
9Index: 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) }
22Index: 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 @@
1Upstream-Status: Backported
2
3From dec3fc9657e0682637de4d5a29d947284d01985c Mon Sep 17 00:00:00 2001
4From: Richard Henderson <rth@twiddle.net>
5Date: Wed, 29 May 2013 12:30:51 -0700
6Subject: [PATCH] target-i386: Fix aflag logic for CODE64 and the 0x67 prefix
7
8The code reorganization in commit 4a6fd938 broke handling of PREFIX_ADR.
9While fixing this, tidy and comment the code so that it's more obvious
10what's going on in setting both aflag and dflag.
11
12The TARGET_X86_64 ifdef can be eliminated because CODE64 expands to the
13constant zero when TARGET_X86_64 is undefined.
14
15Cc: Paolo Bonzini <pbonzini@redhat.com>
16Reported-by: Laszlo Ersek <lersek@redhat.com>
17Signed-off-by: Richard Henderson <rth@twiddle.net>
18Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
19Message-id: 1369855851-21400-1-git-send-email-rth@twiddle.net
20Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
21---
22 target-i386/translate.c | 30 +++++++++++++++---------------
23 1 file changed, 15 insertions(+), 15 deletions(-)
24
25diff --git a/target-i386/translate.c b/target-i386/translate.c
26index 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--
781.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 @@
1Delivered-To: raj.khem@gmail.com
2Received: by 10.50.216.195 with SMTP id os3csp11191igc;
3 Thu, 15 Aug 2013 04:32:45 -0700 (PDT)
4X-Received: by 10.180.98.3 with SMTP id ee3mr1508103wib.48.1376566364872;
5 Thu, 15 Aug 2013 04:32:44 -0700 (PDT)
6Return-Path: <aurelien@aurel32.net>
7Received: 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)
12Received-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;
13Authentication-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
15Received: 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
20Received: 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
23From: Aurelien Jarno <aurelien@aurel32.net>
24To: qemu-devel@nongnu.org
25Cc: 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>
30Subject: [PATCH] target-ppc: fix bit extraction for FPBF and FPL
31Date: Thu, 15 Aug 2013 13:32:38 +0200
32Message-Id: <1376566358-8989-1-git-send-email-aurelien@aurel32.net>
33X-Mailer: git-send-email 1.7.10.4
34
35Bit extraction for the FP BF and L field of the MTFSFI and MTFSF
36instructions is wrong and doesn't match the reference manual (which
37explain the bit number in big endian format). It has been broken in
38commit 7d08d85645def18eac2a9d672c1868a35e0bcf79.
39
40This patch fixes this, which in turn fixes the problem reported by
41Khem Raj about the floor() function of libm.
42
43Reported-by: Khem Raj <raj.khem@gmail.com>
44Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
45
46Upstream-Status: Backport
47
48---
49 target-ppc/translate.c | 4 ++--
50 1 file changed, 2 insertions(+), 2 deletions(-)
51
52I don't know if we still have time to get this into 1.6, hence the Cc:
53to stable. In anycase it also needs to be fixed in 1.5.
54
55Index: 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