From d962783e9849acf8eb329abd319a5baab28e4f62 Mon Sep 17 00:00:00 2001 From: Jia Liu Date: Fri, 20 Jul 2012 15:50:52 +0800 Subject: target-or32: Add linux user support Add QEMU OpenRISC linux user support. Signed-off-by: Jia Liu Signed-off-by: Blue Swirl --- target-openrisc/cpu.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'target-openrisc') diff --git a/target-openrisc/cpu.h b/target-openrisc/cpu.h index 6506665466..de21a877d3 100644 --- a/target-openrisc/cpu.h +++ b/target-openrisc/cpu.h @@ -367,11 +367,13 @@ void openrisc_translate_init(void); int cpu_openrisc_handle_mmu_fault(CPUOpenRISCState *env, target_ulong address, int rw, int mmu_idx); +int cpu_openrisc_signal_handler(int host_signum, void *pinfo, void *puc); #define cpu_list cpu_openrisc_list #define cpu_exec cpu_openrisc_exec #define cpu_gen_code cpu_openrisc_gen_code #define cpu_handle_mmu_fault cpu_openrisc_handle_mmu_fault +#define cpu_signal_handler cpu_openrisc_signal_handler #ifndef CONFIG_USER_ONLY /* hw/openrisc_pic.c */ @@ -404,6 +406,16 @@ static inline CPUOpenRISCState *cpu_init(const char *cpu_model) return NULL; } +#if defined(CONFIG_USER_ONLY) +static inline void cpu_clone_regs(CPUOpenRISCState *env, target_ulong newsp) +{ + if (newsp) { + env->gpr[1] = newsp; + } + env->gpr[2] = 0; +} +#endif + #include "cpu-all.h" static inline void cpu_get_tb_cpu_state(CPUOpenRISCState *env, -- cgit v1.2.3