~ubuntu-branches/ubuntu/vivid/qemu-linaro/vivid

« back to all changes in this revision

Viewing changes to target-microblaze/helper.c

  • Committer: Ricardo Salveti de Araujo
  • Date: 2012-09-20 18:39:31 UTC
  • mfrom: (12922.1.2 qemu-linaro)
  • Revision ID: ricardo.salveti@linaro.org-20120920183931-sp3cg6kpdl8dmwo9
* New upstream release.
  - support emulated systems with more than 2G of memory. (LP: #1030588)
* Drop powerpc-missing-include.patch - merged upstream.
* Update debian/control:
  - drop perl build dependency.
  - add libfdt-dev build dependency.
* Update debian/qemu-keymaps.install file.
* Update debian/rules:
  - update QEMU_CPU for ARM architecture: armv4l -> armv7l.
  - update conf_audio_drv: default to PulseAudio since PA is the default on
    Ubuntu.
  - enable KVM on ARM architecture.
  - enable flat device tree support (--enable-fdt). (LP: #1030594)

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 *  MicroBlaze helper routines.
3
3
 *
4
4
 *  Copyright (c) 2009 Edgar E. Iglesias <edgar.iglesias@gmail.com>
 
5
 *  Copyright (c) 2009-2012 PetaLogix Qld Pty Ltd.
5
6
 *
6
7
 * This library is free software; you can redistribute it and/or
7
8
 * modify it under the terms of the GNU Lesser General Public
25
26
 
26
27
#if defined(CONFIG_USER_ONLY)
27
28
 
28
 
void do_interrupt (CPUState *env)
 
29
void do_interrupt (CPUMBState *env)
29
30
{
30
31
    env->exception_index = -1;
 
32
    env->res_addr = RES_ADDR_NONE;
31
33
    env->regs[14] = env->sregs[SR_PC];
32
34
}
33
35
 
34
 
int cpu_mb_handle_mmu_fault(CPUState * env, target_ulong address, int rw,
 
36
int cpu_mb_handle_mmu_fault(CPUMBState * env, target_ulong address, int rw,
35
37
                            int mmu_idx)
36
38
{
37
39
    env->exception_index = 0xaa;
41
43
 
42
44
#else /* !CONFIG_USER_ONLY */
43
45
 
44
 
int cpu_mb_handle_mmu_fault (CPUState *env, target_ulong address, int rw,
 
46
int cpu_mb_handle_mmu_fault (CPUMBState *env, target_ulong address, int rw,
45
47
                             int mmu_idx)
46
48
{
47
49
    unsigned int hit;
107
109
    return r;
108
110
}
109
111
 
110
 
void do_interrupt(CPUState *env)
 
112
void do_interrupt(CPUMBState *env)
111
113
{
112
114
    uint32_t t;
113
115
 
115
117
    assert(!((env->iflags & D_FLAG) && (env->iflags & IMM_FLAG)));
116
118
    assert(!(env->iflags & (DRTI_FLAG | DRTE_FLAG | DRTB_FLAG)));
117
119
/*    assert(env->sregs[SR_MSR] & (MSR_EE)); Only for HW exceptions.  */
 
120
    env->res_addr = RES_ADDR_NONE;
118
121
    switch (env->exception_index) {
119
122
        case EXCP_HW_EXCP:
120
123
            if (!(env->pvr.regs[0] & PVR0_USE_EXC_MASK)) {
255
258
    }
256
259
}
257
260
 
258
 
target_phys_addr_t cpu_get_phys_page_debug(CPUState * env, target_ulong addr)
 
261
target_phys_addr_t cpu_get_phys_page_debug(CPUMBState * env, target_ulong addr)
259
262
{
260
263
    target_ulong vaddr, paddr = 0;
261
264
    struct microblaze_mmu_lookup lu;