diff options
author | Jia Liu <proljc@gmail.com> | 2012-07-20 15:50:52 +0800 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2012-07-27 21:13:05 +0000 |
commit | d962783e9849acf8eb329abd319a5baab28e4f62 (patch) | |
tree | ced0bf572eb2a4ba411a1d5638e71bda731d4f06 /target-openrisc/cpu.h | |
parent | a8720299f1aa5dcf7b83e78644b0f6502958e973 (diff) |
target-or32: Add linux user support
Add QEMU OpenRISC linux user support.
Signed-off-by: Jia Liu <proljc@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'target-openrisc/cpu.h')
-rw-r--r-- | target-openrisc/cpu.h | 12 |
1 files changed, 12 insertions, 0 deletions
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, |