On 01/06/2012 10:29 AM, Peter Maydell wrote: > On 5 January 2012 20:02, Mark Langsdorf <mark.langsd...@calxeda.com> wrote: >> +static void hb_regs_write(void *opaque, target_phys_addr_t offset, >> + uint64_t value, unsigned size) >> +{ >> + uint32_t *regs = opaque; >> + >> + if (offset == 0xf00) { >> + if (value == 1 || value == 2) { >> + qemu_system_reset_request(); >> + } else if (value == 3) { >> + qemu_system_shutdown_request(); >> + } >> + } >> + >> + regs[offset/4] = value; >> +} > > Please make this a proper qdev device (it can stay in this > file).
Assuming that I'm going to need save/restore support, what's the proper syntax for saving uint32_t *regs? All the uses I can find seem to be for an array of structs, not an array of ints, and I keep hoping there's a simpler way. Thanks, Mark Langsdorf Calxeda, Inc,.