Hi Everyone,
We would like to add support for resetting the PXA2xx when the user
invokes the system_reset command. What would be the best way to
implement this? The PXA2xx emulation has a callback registered for the
reset IRQ, which does a CPU reset. The callback is shown below. This
gets invoked when the corresponding GPIO is toggled. (Not sure how one
will toggle the GPIO though).
static void pxa2xx_reset(void *opaque, int line, int level)
{
PXA2xxState *s = (PXA2xxState *) opaque;
if (level && (s->pm_regs[PCFR >> 2] & 0x10)) { /* GPR_EN */
cpu_reset(CPU(s->cpu));
/* TODO: reset peripherals */
}
}
We would like to do something similar for the system_reset command.
Would it be sufficient to do the same by registering a callback using
qemu_register_reset()?
Regards,
Vijay