diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-11-26 10:38:39 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-11-26 10:38:39 +0000 |
commit | b5ff1b3127119aa430a6fd309591d584803b7b6e (patch) | |
tree | 5857296f0bebe0d8ee9e803b60a79d277493b7e0 /linux-user/main.c | |
parent | 0e43e99c045eb22415a7e52e2f88dbdb8e2d96f5 (diff) |
ARM system emulation (Paul Brook)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1661 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user/main.c')
-rw-r--r-- | linux-user/main.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/linux-user/main.c b/linux-user/main.c index 1ae4656d3a..1b747d8738 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -331,6 +331,7 @@ void cpu_loop(CPUARMState *env) int trapnr; unsigned int n, insn; target_siginfo_t info; + uint32_t addr; for(;;) { trapnr = cpu_arm_exec(env); @@ -397,13 +398,18 @@ void cpu_loop(CPUARMState *env) /* just indicate that signals should be handled asap */ break; case EXCP_PREFETCH_ABORT: + addr = env->cp15.c6_data; + goto do_segv; case EXCP_DATA_ABORT: + addr = env->cp15.c6_insn; + goto do_segv; + do_segv: { info.si_signo = SIGSEGV; info.si_errno = 0; /* XXX: check env->error_code */ info.si_code = TARGET_SEGV_MAPERR; - info._sifields._sigfault._addr = env->cp15_6; + info._sifields._sigfault._addr = addr; queue_signal(info.si_signo, &info); } break; @@ -1190,10 +1196,10 @@ int main(int argc, char **argv) #elif defined(TARGET_ARM) { int i; + cpsr_write(env, regs->uregs[16], 0xffffffff); for(i = 0; i < 16; i++) { env->regs[i] = regs->uregs[i]; } - env->cpsr = regs->uregs[16]; ts->stack_base = info->start_stack; ts->heap_base = info->brk; /* This will be filled in on the first SYS_HEAPINFO call. */ |