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

« back to all changes in this revision

Viewing changes to target-openrisc/mmu.c

  • Committer: Package Import Robot
  • Author(s): Serge Hallyn
  • Date: 2014-02-25 22:31:43 UTC
  • mfrom: (1.8.5)
  • Revision ID: package-import@ubuntu.com-20140225223143-odhqxfc60wxrjl15
Tags: 2.0.0~rc1+dfsg-0ubuntu1
* Merge 2.0.0-rc1
* debian/rules: consolidate ppc filter entries.
* Move qemu-system-arch64 into qemu-system-arm
* debian/patches/define-trusty-machine-type.patch: define a trusty machine
  type, currently the same as pc-i440fx-2.0, to put is in a better position
  to enable live migrations from trusty onward.  (LP: #1294823)
* debian/control: build-dep on libfdt >= 1.4.0  (LP: #1295072)
* Merge latest upstream git to commit dc9528f
* Debian/rules:
  - remove -enable-uname-release=2.6.32
  - don't make the aarch64 target Ubuntu-specific.
* Remove patches which are now upstream:
  - fix-smb-security-share.patch
  - slirp-smb-redirect-port-445-too.patch 
  - linux-user-Implement-sendmmsg-syscall.patch (better version is upstream)
  - signal-added-a-wrapper-for-sigprocmask-function.patch
  - ubuntu/signal-sigsegv-protection-on-do_sigprocmask.patch
  - ubuntu/Don-t-block-SIGSEGV-at-more-places.patch
  - ubuntu/ppc-force-cpu-threads-count-to-be-power-of-2.patch
* add link for /usr/share/qemu/bios-256k.bin
* Remove all linaro patches.
* Remove all arm64/ patches.  Many but not all are upstream.
* Remove CVE-2013-4377.patch which is upstream.
* debian/control-in: don't make qemu-system-aarch64 ubuntu-specific

Show diffs side-by-side

added added

removed removed

Lines of Context:
139
139
                                             target_ulong address,
140
140
                                             int rw, int tlb_error)
141
141
{
 
142
    CPUState *cs = CPU(cpu);
142
143
    int exception = 0;
143
144
 
144
145
    switch (tlb_error) {
169
170
#endif
170
171
    }
171
172
 
172
 
    cpu->env.exception_index = exception;
 
173
    cs->exception_index = exception;
173
174
    cpu->env.eear = address;
174
175
}
175
176
 
176
177
#ifndef CONFIG_USER_ONLY
177
 
int cpu_openrisc_handle_mmu_fault(CPUOpenRISCState *env,
178
 
                                  target_ulong address, int rw, int mmu_idx)
 
178
int openrisc_cpu_handle_mmu_fault(CPUState *cs,
 
179
                                  vaddr address, int rw, int mmu_idx)
179
180
{
 
181
    OpenRISCCPU *cpu = OPENRISC_CPU(cs);
180
182
    int ret = 0;
181
183
    hwaddr physical = 0;
182
184
    int prot = 0;
183
 
    OpenRISCCPU *cpu = openrisc_env_get_cpu(env);
184
185
 
185
186
    ret = cpu_openrisc_get_phys_addr(cpu, &physical, &prot,
186
187
                                     address, rw);
187
188
 
188
189
    if (ret == TLBRET_MATCH) {
189
 
        tlb_set_page(env, address & TARGET_PAGE_MASK,
 
190
        tlb_set_page(cs, address & TARGET_PAGE_MASK,
190
191
                     physical & TARGET_PAGE_MASK, prot,
191
192
                     mmu_idx, TARGET_PAGE_SIZE);
192
193
        ret = 0;
198
199
    return ret;
199
200
}
200
201
#else
201
 
int cpu_openrisc_handle_mmu_fault(CPUOpenRISCState *env,
202
 
                                  target_ulong address, int rw, int mmu_idx)
 
202
int openrisc_cpu_handle_mmu_fault(CPUState *cs,
 
203
                                  vaddr address, int rw, int mmu_idx)
203
204
{
 
205
    OpenRISCCPU *cpu = OPENRISC_CPU(cs);
204
206
    int ret = 0;
205
 
    OpenRISCCPU *cpu = openrisc_env_get_cpu(env);
206
207
 
207
208
    cpu_openrisc_raise_mmu_exception(cpu, address, rw, ret);
208
209
    ret = 1;