diff options
-rw-r--r-- | hw/mips/addr.c | 7 | ||||
-rw-r--r-- | include/hw/mips/cpudevs.h | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/hw/mips/addr.c b/hw/mips/addr.c index 99488f1d2a..ff3b952600 100644 --- a/hw/mips/addr.c +++ b/hw/mips/addr.c @@ -25,10 +25,15 @@ uint64_t cpu_mips_kseg0_to_phys(void *opaque, uint64_t addr) { - return addr & 0x7fffffffll; + return addr & 0x1fffffffll; } uint64_t cpu_mips_phys_to_kseg0(void *opaque, uint64_t addr) { return addr | ~0x7fffffffll; } + +uint64_t cpu_mips_kvm_um_phys_to_kseg0(void *opaque, uint64_t addr) +{ + return addr | 0x40000000ll; +} diff --git a/include/hw/mips/cpudevs.h b/include/hw/mips/cpudevs.h index 6bea24bf10..b2626f2922 100644 --- a/include/hw/mips/cpudevs.h +++ b/include/hw/mips/cpudevs.h @@ -5,6 +5,8 @@ /* mips_addr.c */ uint64_t cpu_mips_kseg0_to_phys(void *opaque, uint64_t addr); uint64_t cpu_mips_phys_to_kseg0(void *opaque, uint64_t addr); +uint64_t cpu_mips_kvm_um_phys_to_kseg0(void *opaque, uint64_t addr); + /* mips_int.c */ void cpu_mips_irq_init_cpu(CPUMIPSState *env); |