diff options
Diffstat (limited to 'target-openrisc/cpu.c')
-rw-r--r-- | target-openrisc/cpu.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/target-openrisc/cpu.c b/target-openrisc/cpu.c index e348df0fef..7718820ecc 100644 --- a/target-openrisc/cpu.c +++ b/target-openrisc/cpu.c @@ -20,6 +20,13 @@ #include "cpu.h" #include "qemu-common.h" +static void openrisc_cpu_set_pc(CPUState *cs, vaddr value) +{ + OpenRISCCPU *cpu = OPENRISC_CPU(cs); + + cpu->env.pc = value; +} + /* CPUClass::reset() */ static void openrisc_cpu_reset(CPUState *s) { @@ -147,7 +154,11 @@ static void openrisc_cpu_class_init(ObjectClass *oc, void *data) cc->class_by_name = openrisc_cpu_class_by_name; cc->do_interrupt = openrisc_cpu_do_interrupt; cc->dump_state = openrisc_cpu_dump_state; - device_class_set_vmsd(dc, &vmstate_openrisc_cpu); + cc->set_pc = openrisc_cpu_set_pc; +#ifndef CONFIG_USER_ONLY + cc->get_phys_page_debug = openrisc_cpu_get_phys_page_debug; + dc->vmsd = &vmstate_openrisc_cpu; +#endif } static void cpu_register(const OpenRISCCPUInfo *info) |