qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] PXA2xx system_reset command


From: Vijay Kumar B.
Subject: [Qemu-devel] PXA2xx system_reset command
Date: Wed, 28 Sep 2016 17:37:09 +0530
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.2.0

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]