diff options
Diffstat (limited to 'meta/packages/qemu')
-rw-r--r-- | meta/packages/qemu/qemu-0.9.0+cvs20071121/qemu-0.9.0-nptl.patch | 235 | ||||
-rw-r--r-- | meta/packages/qemu/qemu_20071121.bb | 1 |
2 files changed, 156 insertions, 80 deletions
diff --git a/meta/packages/qemu/qemu-0.9.0+cvs20071121/qemu-0.9.0-nptl.patch b/meta/packages/qemu/qemu-0.9.0+cvs20071121/qemu-0.9.0-nptl.patch index 3e46744af2..10e3cc04a5 100644 --- a/meta/packages/qemu/qemu-0.9.0+cvs20071121/qemu-0.9.0-nptl.patch +++ b/meta/packages/qemu/qemu-0.9.0+cvs20071121/qemu-0.9.0-nptl.patch | |||
@@ -27,11 +27,11 @@ See also http://lists.gnu.org/archive/html/qemu-devel/2006-09/msg00194.html | |||
27 | target-arm/translate.c | 9 ++ | 27 | target-arm/translate.c | 9 ++ |
28 | 10 files changed, 405 insertions(+), 183 deletions(-) | 28 | 10 files changed, 405 insertions(+), 183 deletions(-) |
29 | 29 | ||
30 | Index: qemu/configure | 30 | --- qemu.orig/configure |
31 | =================================================================== | 31 | +++ qemu/configure |
32 | --- qemu.orig/configure 2007-12-03 19:34:02.000000000 +0000 | 32 | @@ -103,10 +103,11 @@ check_gcc="yes" |
33 | +++ qemu/configure 2007-12-03 23:46:51.000000000 +0000 | 33 | softmmu="yes" |
34 | @@ -105,6 +105,7 @@ linux_user="no" | 34 | linux_user="no" |
35 | darwin_user="no" | 35 | darwin_user="no" |
36 | build_docs="no" | 36 | build_docs="no" |
37 | uname_release="" | 37 | uname_release="" |
@@ -39,7 +39,11 @@ Index: qemu/configure | |||
39 | 39 | ||
40 | # OS specific | 40 | # OS specific |
41 | targetos=`uname -s` | 41 | targetos=`uname -s` |
42 | @@ -324,6 +325,8 @@ for opt do | 42 | case $targetos in |
43 | CYGWIN*) | ||
44 | @@ -322,10 +323,12 @@ for opt do | ||
45 | ;; | ||
46 | --disable-werror) werror="no" | ||
43 | ;; | 47 | ;; |
44 | *) echo "ERROR: unknown option $opt"; show_help="yes" | 48 | *) echo "ERROR: unknown option $opt"; show_help="yes" |
45 | ;; | 49 | ;; |
@@ -48,7 +52,11 @@ Index: qemu/configure | |||
48 | esac | 52 | esac |
49 | done | 53 | done |
50 | 54 | ||
51 | @@ -419,6 +422,7 @@ echo " --enable-linux-user enable | 55 | if [ "$bsd" = "yes" -o "$darwin" = "yes" -o "$mingw32" = "yes" ] ; then |
56 | AIOLIBS= | ||
57 | @@ -417,10 +420,11 @@ echo " --enable-system enable | ||
58 | echo " --disable-system disable all system emulation targets" | ||
59 | echo " --enable-linux-user enable all linux usermode emulation targets" | ||
52 | echo " --disable-linux-user disable all linux usermode emulation targets" | 60 | echo " --disable-linux-user disable all linux usermode emulation targets" |
53 | echo " --enable-darwin-user enable all darwin usermode emulation targets" | 61 | echo " --enable-darwin-user enable all darwin usermode emulation targets" |
54 | echo " --disable-darwin-user disable all darwin usermode emulation targets" | 62 | echo " --disable-darwin-user disable all darwin usermode emulation targets" |
@@ -56,7 +64,11 @@ Index: qemu/configure | |||
56 | echo " --fmod-lib path to FMOD library" | 64 | echo " --fmod-lib path to FMOD library" |
57 | echo " --fmod-inc path to FMOD includes" | 65 | echo " --fmod-inc path to FMOD includes" |
58 | echo " --enable-uname-release=R Return R for uname -r in usermode emulation" | 66 | echo " --enable-uname-release=R Return R for uname -r in usermode emulation" |
59 | @@ -585,6 +589,23 @@ int main(void) { | 67 | echo " --sparc_cpu=V Build qemu for Sparc architecture v7, v8, v8plus, v8plusa, v9" |
68 | echo "" | ||
69 | @@ -583,10 +587,27 @@ fi | ||
70 | cat > $TMPC <<EOF | ||
71 | int main(void) { | ||
60 | } | 72 | } |
61 | EOF | 73 | EOF |
62 | 74 | ||
@@ -80,7 +92,11 @@ Index: qemu/configure | |||
80 | ########################################## | 92 | ########################################## |
81 | # SDL probe | 93 | # SDL probe |
82 | 94 | ||
83 | @@ -749,6 +770,7 @@ echo "kqemu support $kqemu" | 95 | sdl_too_old=no |
96 | |||
97 | @@ -747,10 +768,11 @@ if test -n "$sparc_cpu"; then | ||
98 | fi | ||
99 | echo "kqemu support $kqemu" | ||
84 | echo "Documentation $build_docs" | 100 | echo "Documentation $build_docs" |
85 | [ ! -z "$uname_release" ] && \ | 101 | [ ! -z "$uname_release" ] && \ |
86 | echo "uname -r $uname_release" | 102 | echo "uname -r $uname_release" |
@@ -88,21 +104,27 @@ Index: qemu/configure | |||
88 | 104 | ||
89 | if test $sdl_too_old = "yes"; then | 105 | if test $sdl_too_old = "yes"; then |
90 | echo "-> Your SDL version is too old - please upgrade to have SDL support" | 106 | echo "-> Your SDL version is too old - please upgrade to have SDL support" |
91 | @@ -954,6 +976,9 @@ if test "$sdl1" = "yes" ; then | ||
92 | echo "SDL_CFLAGS=`$sdl_config --cflags`" >> $config_mak | ||
93 | fi | ||
94 | fi | 107 | fi |
95 | +if test "$nptl" = "yes" ; then | 108 | if [ -s /tmp/qemu-$$-sdl-config.log ]; then |
96 | + echo "#define USE_NPTL 1" >> $config_h | 109 | @@ -1063,10 +1085,13 @@ if test "$target_cpu" = "i386" ; then |
97 | +fi | 110 | fi |
98 | if test "$cocoa" = "yes" ; then | 111 | elif test "$target_cpu" = "arm" -o "$target_cpu" = "armeb" ; then |
99 | echo "#define CONFIG_COCOA 1" >> $config_h | 112 | echo "TARGET_ARCH=arm" >> $config_mak |
100 | echo "CONFIG_COCOA=yes" >> $config_mak | 113 | echo "#define TARGET_ARCH \"arm\"" >> $config_h |
101 | Index: qemu/exec-all.h | 114 | echo "#define TARGET_ARM 1" >> $config_h |
102 | =================================================================== | 115 | + if test "$nptl" = "yes" ; then |
103 | --- qemu.orig/exec-all.h 2007-12-03 19:32:15.000000000 +0000 | 116 | + echo "#define USE_NPTL 1" >> $config_h |
104 | +++ qemu/exec-all.h 2007-12-03 19:34:09.000000000 +0000 | 117 | + fi |
105 | @@ -340,170 +340,7 @@ extern CPUWriteMemoryFunc *io_mem_write[ | 118 | bflt="yes" |
119 | elif test "$target_cpu" = "sparc" ; then | ||
120 | echo "TARGET_ARCH=sparc" >> $config_mak | ||
121 | echo "#define TARGET_ARCH \"sparc\"" >> $config_h | ||
122 | echo "#define TARGET_SPARC 1" >> $config_h | ||
123 | --- qemu.orig/exec-all.h | ||
124 | +++ qemu/exec-all.h | ||
125 | @@ -338,174 +338,11 @@ dummy_label ## n: ;\ | ||
126 | |||
127 | extern CPUWriteMemoryFunc *io_mem_write[IO_MEM_NB_ENTRIES][4]; | ||
106 | extern CPUReadMemoryFunc *io_mem_read[IO_MEM_NB_ENTRIES][4]; | 128 | extern CPUReadMemoryFunc *io_mem_read[IO_MEM_NB_ENTRIES][4]; |
107 | extern void *io_mem_opaque[IO_MEM_NB_ENTRIES]; | 129 | extern void *io_mem_opaque[IO_MEM_NB_ENTRIES]; |
108 | 130 | ||
@@ -274,11 +296,13 @@ Index: qemu/exec-all.h | |||
274 | 296 | ||
275 | extern spinlock_t tb_lock; | 297 | extern spinlock_t tb_lock; |
276 | 298 | ||
277 | Index: qemu/linux-user/arm/syscall.h | 299 | extern int tb_invalidated_flag; |
278 | =================================================================== | 300 | |
279 | --- qemu.orig/linux-user/arm/syscall.h 2007-12-03 19:32:15.000000000 +0000 | 301 | --- qemu.orig/linux-user/arm/syscall.h |
280 | +++ qemu/linux-user/arm/syscall.h 2007-12-03 19:34:09.000000000 +0000 | 302 | +++ qemu/linux-user/arm/syscall.h |
281 | @@ -28,7 +28,9 @@ struct target_pt_regs { | 303 | @@ -26,11 +26,13 @@ struct target_pt_regs { |
304 | #define ARM_ORIG_r0 uregs[17] | ||
305 | |||
282 | #define ARM_SYSCALL_BASE 0x900000 | 306 | #define ARM_SYSCALL_BASE 0x900000 |
283 | #define ARM_THUMB_SYSCALL 0 | 307 | #define ARM_THUMB_SYSCALL 0 |
284 | 308 | ||
@@ -289,11 +313,13 @@ Index: qemu/linux-user/arm/syscall.h | |||
289 | 313 | ||
290 | #define ARM_NR_semihosting 0x123456 | 314 | #define ARM_NR_semihosting 0x123456 |
291 | #define ARM_NR_thumb_semihosting 0xAB | 315 | #define ARM_NR_thumb_semihosting 0xAB |
292 | Index: qemu/linux-user/main.c | 316 | |
293 | =================================================================== | 317 | #if defined(TARGET_WORDS_BIGENDIAN) |
294 | --- qemu.orig/linux-user/main.c 2007-12-03 19:33:53.000000000 +0000 | 318 | --- qemu.orig/linux-user/main.c |
295 | +++ qemu/linux-user/main.c 2007-12-03 23:47:10.000000000 +0000 | 319 | +++ qemu/linux-user/main.c |
296 | @@ -363,6 +363,50 @@ static void arm_cache_flush(abi_ulong st | 320 | @@ -361,10 +361,54 @@ static void arm_cache_flush(abi_ulong st |
321 | break; | ||
322 | addr = last1 + 1; | ||
297 | } | 323 | } |
298 | } | 324 | } |
299 | 325 | ||
@@ -344,7 +370,11 @@ Index: qemu/linux-user/main.c | |||
344 | void cpu_loop(CPUARMState *env) | 370 | void cpu_loop(CPUARMState *env) |
345 | { | 371 | { |
346 | int trapnr; | 372 | int trapnr; |
347 | @@ -473,10 +517,8 @@ void cpu_loop(CPUARMState *env) | 373 | unsigned int n, insn; |
374 | target_siginfo_t info; | ||
375 | @@ -471,32 +515,50 @@ void cpu_loop(CPUARMState *env) | ||
376 | get_user_u32(insn, env->regs[15] - 4); | ||
377 | n = insn & 0xffffff; | ||
348 | } | 378 | } |
349 | } | 379 | } |
350 | 380 | ||
@@ -357,7 +387,10 @@ Index: qemu/linux-user/main.c | |||
357 | env->regs[0] = do_arm_semihosting (env); | 387 | env->regs[0] = do_arm_semihosting (env); |
358 | } else if (n == 0 || n >= ARM_SYSCALL_BASE | 388 | } else if (n == 0 || n >= ARM_SYSCALL_BASE |
359 | || (env->thumb && n == ARM_THUMB_SYSCALL)) { | 389 | || (env->thumb && n == ARM_THUMB_SYSCALL)) { |
360 | @@ -487,14 +529,34 @@ void cpu_loop(CPUARMState *env) | 390 | /* linux syscall */ |
391 | if (env->thumb || n == 0) { | ||
392 | n = env->regs[7]; | ||
393 | } else { | ||
361 | n -= ARM_SYSCALL_BASE; | 394 | n -= ARM_SYSCALL_BASE; |
362 | env->eabi = 0; | 395 | env->eabi = 0; |
363 | } | 396 | } |
@@ -388,8 +421,8 @@ Index: qemu/linux-user/main.c | |||
388 | + } | 421 | + } |
389 | + else | 422 | + else |
390 | + { | 423 | + { |
391 | + env->regs[0] = do_syscall(env, | 424 | + env->regs[0] = do_syscall(env, |
392 | + n, | 425 | + n, |
393 | + env->regs[0], | 426 | + env->regs[0], |
394 | + env->regs[1], | 427 | + env->regs[1], |
395 | + env->regs[2], | 428 | + env->regs[2], |
@@ -400,7 +433,11 @@ Index: qemu/linux-user/main.c | |||
400 | } else { | 433 | } else { |
401 | goto error; | 434 | goto error; |
402 | } | 435 | } |
403 | @@ -533,6 +595,10 @@ void cpu_loop(CPUARMState *env) | 436 | } |
437 | break; | ||
438 | @@ -531,10 +593,14 @@ void cpu_loop(CPUARMState *env) | ||
439 | info.si_code = TARGET_TRAP_BRKPT; | ||
440 | queue_signal(info.si_signo, &info); | ||
404 | } | 441 | } |
405 | } | 442 | } |
406 | break; | 443 | break; |
@@ -411,7 +448,11 @@ Index: qemu/linux-user/main.c | |||
411 | default: | 448 | default: |
412 | error: | 449 | error: |
413 | fprintf(stderr, "qemu: unhandled CPU exception 0x%x - aborting\n", | 450 | fprintf(stderr, "qemu: unhandled CPU exception 0x%x - aborting\n", |
414 | @@ -2380,6 +2446,10 @@ int main(int argc, char **argv) | 451 | trapnr); |
452 | cpu_dump_state(env, stderr, fprintf, 0); | ||
453 | @@ -2378,10 +2444,14 @@ int main(int argc, char **argv) | ||
454 | #if defined(TARGET_ARM) || defined(TARGET_M68K) | ||
455 | ts->stack_base = info->start_stack; | ||
415 | ts->heap_base = info->brk; | 456 | ts->heap_base = info->brk; |
416 | /* This will be filled in on the first SYS_HEAPINFO call. */ | 457 | /* This will be filled in on the first SYS_HEAPINFO call. */ |
417 | ts->heap_limit = 0; | 458 | ts->heap_limit = 0; |
@@ -422,11 +463,13 @@ Index: qemu/linux-user/main.c | |||
422 | #endif | 463 | #endif |
423 | 464 | ||
424 | if (gdbstub_port) { | 465 | if (gdbstub_port) { |
425 | Index: qemu/linux-user/qemu.h | 466 | gdbserver_start (gdbstub_port); |
426 | =================================================================== | 467 | gdb_handlesig(env, 0); |
427 | --- qemu.orig/linux-user/qemu.h 2007-12-03 19:32:15.000000000 +0000 | 468 | --- qemu.orig/linux-user/qemu.h |
428 | +++ qemu/linux-user/qemu.h 2007-12-03 19:34:09.000000000 +0000 | 469 | +++ qemu/linux-user/qemu.h |
429 | @@ -102,6 +102,9 @@ typedef struct TaskState { | 470 | @@ -100,10 +100,13 @@ typedef struct TaskState { |
471 | /* Extra fields for semihosted binaries. */ | ||
472 | uint32_t stack_base; | ||
430 | uint32_t heap_base; | 473 | uint32_t heap_base; |
431 | uint32_t heap_limit; | 474 | uint32_t heap_limit; |
432 | #endif | 475 | #endif |
@@ -436,11 +479,13 @@ Index: qemu/linux-user/qemu.h | |||
436 | int used; /* non zero if used */ | 479 | int used; /* non zero if used */ |
437 | struct image_info *info; | 480 | struct image_info *info; |
438 | uint8_t stack[0]; | 481 | uint8_t stack[0]; |
439 | Index: qemu/linux-user/syscall.c | 482 | } __attribute__((aligned(16))) TaskState; |
440 | =================================================================== | 483 | |
441 | --- qemu.orig/linux-user/syscall.c 2007-12-03 19:33:48.000000000 +0000 | 484 | --- qemu.orig/linux-user/syscall.c |
442 | +++ qemu/linux-user/syscall.c 2007-12-03 23:47:10.000000000 +0000 | 485 | +++ qemu/linux-user/syscall.c |
443 | @@ -71,9 +71,18 @@ | 486 | @@ -69,13 +69,22 @@ |
487 | #include <linux/soundcard.h> | ||
488 | #include <linux/dirent.h> | ||
444 | #include <linux/kd.h> | 489 | #include <linux/kd.h> |
445 | 490 | ||
446 | #include "qemu.h" | 491 | #include "qemu.h" |
@@ -459,7 +504,11 @@ Index: qemu/linux-user/syscall.c | |||
459 | #if defined(TARGET_I386) || defined(TARGET_ARM) || defined(TARGET_SPARC) \ | 504 | #if defined(TARGET_I386) || defined(TARGET_ARM) || defined(TARGET_SPARC) \ |
460 | || defined(TARGET_M68K) || defined(TARGET_SH4) || defined(TARGET_CRIS) | 505 | || defined(TARGET_M68K) || defined(TARGET_SH4) || defined(TARGET_CRIS) |
461 | /* 16 bit uid wrappers emulation */ | 506 | /* 16 bit uid wrappers emulation */ |
462 | @@ -2692,9 +2701,19 @@ abi_long do_arch_prctl(CPUX86State *env, | 507 | #define USE_UID16 |
508 | #endif | ||
509 | @@ -2690,27 +2699,46 @@ abi_long do_arch_prctl(CPUX86State *env, | ||
510 | |||
511 | /* this stack is the equivalent of the kernel stack associated with a | ||
463 | thread/process */ | 512 | thread/process */ |
464 | #define NEW_STACK_SIZE 8192 | 513 | #define NEW_STACK_SIZE 8192 |
465 | 514 | ||
@@ -479,7 +528,7 @@ Index: qemu/linux-user/syscall.c | |||
479 | cpu_loop(env); | 528 | cpu_loop(env); |
480 | /* never exits */ | 529 | /* never exits */ |
481 | return 0; | 530 | return 0; |
482 | @@ -2702,13 +2721,22 @@ static int clone_func(void *arg) | 531 | } |
483 | 532 | ||
484 | /* do_fork() Must return host values and target errnos (unlike most | 533 | /* do_fork() Must return host values and target errnos (unlike most |
485 | do_*() functions). */ | 534 | do_*() functions). */ |
@@ -503,7 +552,11 @@ Index: qemu/linux-user/syscall.c | |||
503 | if (flags & CLONE_VM) { | 552 | if (flags & CLONE_VM) { |
504 | ts = malloc(sizeof(TaskState) + NEW_STACK_SIZE); | 553 | ts = malloc(sizeof(TaskState) + NEW_STACK_SIZE); |
505 | memset(ts, 0, sizeof(TaskState)); | 554 | memset(ts, 0, sizeof(TaskState)); |
506 | @@ -2774,16 +2802,67 @@ int do_fork(CPUState *env, unsigned int | 555 | new_stack = ts->stack; |
556 | ts->used = 1; | ||
557 | @@ -2772,20 +2800,71 @@ int do_fork(CPUState *env, unsigned int | ||
558 | new_env->regs[14] = newsp; | ||
559 | #else | ||
507 | #error unsupported target CPU | 560 | #error unsupported target CPU |
508 | #endif | 561 | #endif |
509 | new_env->opaque = ts; | 562 | new_env->opaque = ts; |
@@ -572,7 +625,11 @@ Index: qemu/linux-user/syscall.c | |||
572 | } | 625 | } |
573 | return ret; | 626 | return ret; |
574 | } | 627 | } |
575 | @@ -3108,7 +3187,7 @@ abi_long do_syscall(void *cpu_env, int n | 628 | |
629 | static abi_long do_fcntl(int fd, int cmd, abi_ulong arg) | ||
630 | @@ -3106,11 +3185,11 @@ abi_long do_syscall(void *cpu_env, int n | ||
631 | break; | ||
632 | case TARGET_NR_brk: | ||
576 | ret = do_brk(arg1); | 633 | ret = do_brk(arg1); |
577 | break; | 634 | break; |
578 | case TARGET_NR_fork: | 635 | case TARGET_NR_fork: |
@@ -581,7 +638,11 @@ Index: qemu/linux-user/syscall.c | |||
581 | break; | 638 | break; |
582 | #ifdef TARGET_NR_waitpid | 639 | #ifdef TARGET_NR_waitpid |
583 | case TARGET_NR_waitpid: | 640 | case TARGET_NR_waitpid: |
584 | @@ -4465,7 +4544,8 @@ abi_long do_syscall(void *cpu_env, int n | 641 | { |
642 | int status; | ||
643 | @@ -4463,11 +4542,12 @@ abi_long do_syscall(void *cpu_env, int n | ||
644 | #endif | ||
645 | case TARGET_NR_fsync: | ||
585 | ret = get_errno(fsync(arg1)); | 646 | ret = get_errno(fsync(arg1)); |
586 | break; | 647 | break; |
587 | case TARGET_NR_clone: | 648 | case TARGET_NR_clone: |
@@ -591,7 +652,11 @@ Index: qemu/linux-user/syscall.c | |||
591 | break; | 652 | break; |
592 | #ifdef __NR_exit_group | 653 | #ifdef __NR_exit_group |
593 | /* new thread calls */ | 654 | /* new thread calls */ |
594 | @@ -4910,7 +4990,8 @@ abi_long do_syscall(void *cpu_env, int n | 655 | case TARGET_NR_exit_group: |
656 | gdb_exit(cpu_env, arg1); | ||
657 | @@ -4908,11 +4988,12 @@ abi_long do_syscall(void *cpu_env, int n | ||
658 | case TARGET_NR_putpmsg: | ||
659 | goto unimplemented; | ||
595 | #endif | 660 | #endif |
596 | #ifdef TARGET_NR_vfork | 661 | #ifdef TARGET_NR_vfork |
597 | case TARGET_NR_vfork: | 662 | case TARGET_NR_vfork: |
@@ -601,14 +666,14 @@ Index: qemu/linux-user/syscall.c | |||
601 | break; | 666 | break; |
602 | #endif | 667 | #endif |
603 | #ifdef TARGET_NR_ugetrlimit | 668 | #ifdef TARGET_NR_ugetrlimit |
604 | Index: qemu/qemu_spinlock.h | 669 | case TARGET_NR_ugetrlimit: |
605 | =================================================================== | 670 | { |
606 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | 671 | --- /dev/null |
607 | +++ qemu/qemu_spinlock.h 2007-12-03 19:34:09.000000000 +0000 | 672 | +++ qemu/qemu_spinlock.h |
608 | @@ -0,0 +1,181 @@ | 673 | @@ -0,0 +1,181 @@ |
609 | +/* | 674 | +/* |
610 | + * Atomic operation helper include | 675 | + * Atomic operation helper include |
611 | + * | 676 | + * |
612 | + * Copyright (c) 2005 Fabrice Bellard | 677 | + * Copyright (c) 2005 Fabrice Bellard |
613 | + * | 678 | + * |
614 | + * This library is free software; you can redistribute it and/or | 679 | + * This library is free software; you can redistribute it and/or |
@@ -650,7 +715,7 @@ Index: qemu/qemu_spinlock.h | |||
650 | +static inline int testandset (int *p) | 715 | +static inline int testandset (int *p) |
651 | +{ | 716 | +{ |
652 | + long int readval = 0; | 717 | + long int readval = 0; |
653 | + | 718 | + |
654 | + __asm__ __volatile__ ("lock; cmpxchgl %2, %0" | 719 | + __asm__ __volatile__ ("lock; cmpxchgl %2, %0" |
655 | + : "+m" (*p), "+a" (readval) | 720 | + : "+m" (*p), "+a" (readval) |
656 | + : "r" (1) | 721 | + : "r" (1) |
@@ -663,7 +728,7 @@ Index: qemu/qemu_spinlock.h | |||
663 | +static inline int testandset (int *p) | 728 | +static inline int testandset (int *p) |
664 | +{ | 729 | +{ |
665 | + long int readval = 0; | 730 | + long int readval = 0; |
666 | + | 731 | + |
667 | + __asm__ __volatile__ ("lock; cmpxchgl %2, %0" | 732 | + __asm__ __volatile__ ("lock; cmpxchgl %2, %0" |
668 | + : "+m" (*p), "+a" (readval) | 733 | + : "+m" (*p), "+a" (readval) |
669 | + : "r" (1) | 734 | + : "r" (1) |
@@ -680,7 +745,7 @@ Index: qemu/qemu_spinlock.h | |||
680 | + __asm__ __volatile__ ("0: cs %0,%1,0(%2)\n" | 745 | + __asm__ __volatile__ ("0: cs %0,%1,0(%2)\n" |
681 | + " jl 0b" | 746 | + " jl 0b" |
682 | + : "=&d" (ret) | 747 | + : "=&d" (ret) |
683 | + : "r" (1), "a" (p), "0" (*p) | 748 | + : "r" (1), "a" (p), "0" (*p) |
684 | + : "cc", "memory" ); | 749 | + : "cc", "memory" ); |
685 | + return ret; | 750 | + return ret; |
686 | +} | 751 | +} |
@@ -726,7 +791,7 @@ Index: qemu/qemu_spinlock.h | |||
726 | + __asm__ __volatile__("swp %0, %1, [%2]" | 791 | + __asm__ __volatile__("swp %0, %1, [%2]" |
727 | + : "=r"(ret) | 792 | + : "=r"(ret) |
728 | + : "0"(1), "r"(spinlock)); | 793 | + : "0"(1), "r"(spinlock)); |
729 | + | 794 | + |
730 | + return ret; | 795 | + return ret; |
731 | +} | 796 | +} |
732 | +#endif | 797 | +#endif |
@@ -787,11 +852,11 @@ Index: qemu/qemu_spinlock.h | |||
787 | +#endif | 852 | +#endif |
788 | + | 853 | + |
789 | +#endif | 854 | +#endif |
790 | Index: qemu/target-arm/cpu.h | 855 | --- qemu.orig/target-arm/cpu.h |
791 | =================================================================== | 856 | +++ qemu/target-arm/cpu.h |
792 | --- qemu.orig/target-arm/cpu.h 2007-12-03 19:32:15.000000000 +0000 | 857 | @@ -36,10 +36,11 @@ |
793 | +++ qemu/target-arm/cpu.h 2007-12-03 23:45:48.000000000 +0000 | 858 | #define EXCP_DATA_ABORT 4 |
794 | @@ -38,6 +38,7 @@ | 859 | #define EXCP_IRQ 5 |
795 | #define EXCP_FIQ 6 | 860 | #define EXCP_FIQ 6 |
796 | #define EXCP_BKPT 7 | 861 | #define EXCP_BKPT 7 |
797 | #define EXCP_EXCEPTION_EXIT 8 /* Return from v7M exception. */ | 862 | #define EXCP_EXCEPTION_EXIT 8 /* Return from v7M exception. */ |
@@ -799,7 +864,11 @@ Index: qemu/target-arm/cpu.h | |||
799 | 864 | ||
800 | #define ARMV7M_EXCP_RESET 1 | 865 | #define ARMV7M_EXCP_RESET 1 |
801 | #define ARMV7M_EXCP_NMI 2 | 866 | #define ARMV7M_EXCP_NMI 2 |
802 | @@ -222,6 +223,15 @@ int cpu_arm_signal_handler(int host_sign | 867 | #define ARMV7M_EXCP_HARD 3 |
868 | #define ARMV7M_EXCP_MEM 4 | ||
869 | @@ -220,10 +221,19 @@ int cpu_arm_signal_handler(int host_sign | ||
870 | void *puc); | ||
871 | |||
803 | void cpu_lock(void); | 872 | void cpu_lock(void); |
804 | void cpu_unlock(void); | 873 | void cpu_unlock(void); |
805 | 874 | ||
@@ -815,11 +884,13 @@ Index: qemu/target-arm/cpu.h | |||
815 | #define CPSR_M (0x1f) | 884 | #define CPSR_M (0x1f) |
816 | #define CPSR_T (1 << 5) | 885 | #define CPSR_T (1 << 5) |
817 | #define CPSR_F (1 << 6) | 886 | #define CPSR_F (1 << 6) |
818 | Index: qemu/target-arm/op.c | 887 | #define CPSR_I (1 << 7) |
819 | =================================================================== | 888 | #define CPSR_A (1 << 8) |
820 | --- qemu.orig/target-arm/op.c 2007-12-03 19:32:15.000000000 +0000 | 889 | --- qemu.orig/target-arm/op.c |
821 | +++ qemu/target-arm/op.c 2007-12-03 19:34:09.000000000 +0000 | 890 | +++ qemu/target-arm/op.c |
822 | @@ -1009,6 +1009,12 @@ void OPPROTO op_exception_exit(void) | 891 | @@ -1007,10 +1007,16 @@ void OPPROTO op_exception_exit(void) |
892 | { | ||
893 | env->exception_index = EXCP_EXCEPTION_EXIT; | ||
823 | cpu_loop_exit(); | 894 | cpu_loop_exit(); |
824 | } | 895 | } |
825 | 896 | ||
@@ -832,11 +903,13 @@ Index: qemu/target-arm/op.c | |||
832 | /* VFP support. We follow the convention used for VFP instrunctions: | 903 | /* VFP support. We follow the convention used for VFP instrunctions: |
833 | Single precition routines have a "s" suffix, double precision a | 904 | Single precition routines have a "s" suffix, double precision a |
834 | "d" suffix. */ | 905 | "d" suffix. */ |
835 | Index: qemu/target-arm/translate.c | 906 | |
836 | =================================================================== | 907 | #define VFP_OP(name, p) void OPPROTO op_vfp_##name##p(void) |
837 | --- qemu.orig/target-arm/translate.c 2007-12-03 19:32:15.000000000 +0000 | 908 | --- qemu.orig/target-arm/translate.c |
838 | +++ qemu/target-arm/translate.c 2007-12-03 19:34:09.000000000 +0000 | 909 | +++ qemu/target-arm/translate.c |
839 | @@ -7520,7 +7520,14 @@ static inline int gen_intermediate_code_ | 910 | @@ -7518,11 +7518,18 @@ static inline int gen_intermediate_code_ |
911 | /* We always get here via a jump, so know we are not in a | ||
912 | conditional execution block. */ | ||
840 | gen_op_exception_exit(); | 913 | gen_op_exception_exit(); |
841 | } | 914 | } |
842 | #endif | 915 | #endif |
@@ -852,3 +925,5 @@ Index: qemu/target-arm/translate.c | |||
852 | if (env->nb_breakpoints > 0) { | 925 | if (env->nb_breakpoints > 0) { |
853 | for(j = 0; j < env->nb_breakpoints; j++) { | 926 | for(j = 0; j < env->nb_breakpoints; j++) { |
854 | if (env->breakpoints[j] == dc->pc) { | 927 | if (env->breakpoints[j] == dc->pc) { |
928 | gen_set_condexec(dc); | ||
929 | gen_op_movl_T0_im((long)dc->pc); | ||
diff --git a/meta/packages/qemu/qemu_20071121.bb b/meta/packages/qemu/qemu_20071121.bb index 63100806b0..34924fe18b 100644 --- a/meta/packages/qemu/qemu_20071121.bb +++ b/meta/packages/qemu/qemu_20071121.bb | |||
@@ -2,6 +2,7 @@ LICENSE = "GPL" | |||
2 | DEPENDS = "zlib" | 2 | DEPENDS = "zlib" |
3 | SRCDATE = "20071121" | 3 | SRCDATE = "20071121" |
4 | PV = "0.9.0+cvs${SRCDATE}" | 4 | PV = "0.9.0+cvs${SRCDATE}" |
5 | PR = "r1" | ||
5 | 6 | ||
6 | DEFAULT_PREFERENCE = "-1" | 7 | DEFAULT_PREFERENCE = "-1" |
7 | 8 | ||