~ubuntu-branches/ubuntu/precise/qemu-kvm/precise

« back to all changes in this revision

Viewing changes to target-microblaze/op_helper.c

  • Committer: Serge Hallyn
  • Date: 2011-10-19 07:37:43 UTC
  • mfrom: (1.2.7)
  • Revision ID: serge.hallyn@ubuntu.com-20111019073743-7i7n9irsxlm38wic
Tags: 0.15.0+noroms-0ubuntu1
* New upstream release
* Remaining changes from upstream:
  - removed all binary roms and tests/pi_10.com
* Removed Detect-and-use-GCC-atomic-builtins-for-locking.patch - non-NPTL
  implementations were removed with commit
  02615337ef295443daa03233e492194e289a807e
* Drop spice-qxl-locking-fix-for-qemu-kvm.patch - should be unnecessary
  as of commit 196a778428989217b82de042725dc8eb29c8f8d8
* drop patches applied upstream:
  - CVE-2011-1751.diff
  - virtio-guard-against-negative-vq-notifies-CVE-2011-2512.diff
  - CVE-2011-2527.patch
  - fix-pa-configure.patch
* Refreshed the remaining patches:
  - larger_default_ram_size.patch
  - CVE-2011-2212-virtqueue-indirect-overflow.patch
  - qemuifup-fix-paths.patch
  - vpc.patch
* e1000-Dont-set-the-Capabilities-List-bit.patch - switched to the
  cherrypicked upstream patch (as the source file changed quite a bit,
  and the hand-ported patch backported to 0.14.1 does not apply).
* Drop qemu-kvm-spice (all changes from 0.14.1+noroms-0ubuntu7), it will
  need its own source package (LP: #878162)

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
            if (tb) {
61
61
                /* the PC is inside the translated code. It means that we have
62
62
                   a virtual CPU fault */
63
 
                cpu_restore_state(tb, env, pc, NULL);
 
63
                cpu_restore_state(tb, env, pc);
64
64
            }
65
65
        }
66
 
        cpu_loop_exit();
 
66
        cpu_loop_exit(env);
67
67
    }
68
68
    env = saved_env;
69
69
}
70
70
#endif
71
71
 
 
72
void helper_put(uint32_t id, uint32_t ctrl, uint32_t data)
 
73
{
 
74
    int test = ctrl & STREAM_TEST;
 
75
    int atomic = ctrl & STREAM_ATOMIC;
 
76
    int control = ctrl & STREAM_CONTROL;
 
77
    int nonblock = ctrl & STREAM_NONBLOCK;
 
78
    int exception = ctrl & STREAM_EXCEPTION;
 
79
 
 
80
    qemu_log("Unhandled stream put to stream-id=%d data=%x %s%s%s%s%s\n",
 
81
             id, data,
 
82
             test ? "t" : "",
 
83
             nonblock ? "n" : "",
 
84
             exception ? "e" : "",
 
85
             control ? "c" : "",
 
86
             atomic ? "a" : "");
 
87
}
 
88
 
 
89
uint32_t helper_get(uint32_t id, uint32_t ctrl)
 
90
{
 
91
    int test = ctrl & STREAM_TEST;
 
92
    int atomic = ctrl & STREAM_ATOMIC;
 
93
    int control = ctrl & STREAM_CONTROL;
 
94
    int nonblock = ctrl & STREAM_NONBLOCK;
 
95
    int exception = ctrl & STREAM_EXCEPTION;
 
96
 
 
97
    qemu_log("Unhandled stream get from stream-id=%d %s%s%s%s%s\n",
 
98
             id,
 
99
             test ? "t" : "",
 
100
             nonblock ? "n" : "",
 
101
             exception ? "e" : "",
 
102
             control ? "c" : "",
 
103
             atomic ? "a" : "");
 
104
    return 0xdead0000 | id;
 
105
}
 
106
 
72
107
void helper_raise_exception(uint32_t index)
73
108
{
74
109
    env->exception_index = index;
75
 
    cpu_loop_exit();
 
110
    cpu_loop_exit(env);
76
111
}
77
112
 
78
113
void helper_debug(void)
303
338
    set_float_exception_flags(0, &env->fp_status);
304
339
    fa.l = a;
305
340
    fb.l = b;
306
 
    r = float32_eq(fa.f, fb.f, &env->fp_status);
 
341
    r = float32_eq_quiet(fa.f, fb.f, &env->fp_status);
307
342
    flags = get_float_exception_flags(&env->fp_status);
308
343
    update_fpu_flags(flags & float_flag_invalid);
309
344
 
349
384
    fa.l = a;
350
385
    fb.l = b;
351
386
    set_float_exception_flags(0, &env->fp_status);
352
 
    r = !float32_eq(fa.f, fb.f, &env->fp_status);
 
387
    r = !float32_eq_quiet(fa.f, fb.f, &env->fp_status);
353
388
    flags = get_float_exception_flags(&env->fp_status);
354
389
    update_fpu_flags(flags & float_flag_invalid);
355
390
 
453
488
    mmu_write(env, rn, v);
454
489
}
455
490
 
456
 
void do_unassigned_access(target_phys_addr_t addr, int is_write, int is_exec,
457
 
                          int is_asi, int size)
 
491
void cpu_unassigned_access(CPUState *env1, target_phys_addr_t addr,
 
492
                           int is_write, int is_exec, int is_asi, int size)
458
493
{
459
494
    CPUState *saved_env;
460
495
 
461
 
    if (!cpu_single_env) {
462
 
        /* XXX: ???   */
463
 
        return;
464
 
    }
465
 
 
466
 
    /* XXX: hack to restore env in all cases, even if not called from
467
 
       generated code */
468
496
    saved_env = env;
469
 
    env = cpu_single_env;
 
497
    env = env1;
 
498
 
470
499
    qemu_log_mask(CPU_LOG_INT, "Unassigned " TARGET_FMT_plx " wr=%d exe=%d\n",
471
500
             addr, is_write, is_exec);
472
501
    if (!(env->sregs[SR_MSR] & MSR_EE)) {