From: <bob...@us...> - 2007-07-23 12:08:03
|
Revision: 1204 http://svn.sourceforge.net/hackndev/?rev=1204&view=rev Author: bobofdoom Date: 2007-07-23 05:07:58 -0700 (Mon, 23 Jul 2007) Log Message: ----------- QEMU: Fix invalid instruction on cp14 access after sleep. cp_io handler needs to be re-registered after reset. Modified Paths: -------------- qemu/trunk/hw/pxa2xx.c Modified: qemu/trunk/hw/pxa2xx.c =================================================================== --- qemu/trunk/hw/pxa2xx.c 2007-07-23 11:04:08 UTC (rev 1203) +++ qemu/trunk/hw/pxa2xx.c 2007-07-23 12:07:58 UTC (rev 1204) @@ -254,6 +254,9 @@ return 0; } +static void pxa2xx_cp14_write(void *opaque, int op2, int reg, int crm, + uint32_t value); +static uint32_t pxa2xx_cp14_read(void *opaque, int op2, int reg, int crm); static void pxa2xx_sleep_reset(void *opaque) { struct pxa2xx_state_s *s = (struct pxa2xx_state_s *) opaque; @@ -264,6 +267,7 @@ //s->pm_regs[PSPR >> 2] |= 0x4; printf("reset PC=%x PSPR=%x\n", s->env->regs[15], s->pm_regs[PSPR>>2]); //s->env->regs[15] = s->pm_regs[PSPR >> 2]; + cpu_arm_set_cp_io(s->env, 14, pxa2xx_cp14_read, pxa2xx_cp14_write, s); } static void pxa2xx_clkpwr_write(void *opaque, int op2, int reg, int crm, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |