On 6 January 2012 21:16, Mark Langsdorf <mark.langsd...@calxeda.com> wrote: > 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.
VMSTATE_UINT32_ARRAY is what you want. The VMSTATE_*_ARRAY macros all work the same way: VMSTATE_UINT32_ARRAY(arrayname, structname, arraysize) and there are plenty of examples in the tree if you grep for them. You might also consider whether the hardware looks more like an array of 128 R/W registers, or like the versatile board registers modelled in hw/arm_sysreg.c. Not knowing this particular hardware I can't recommend one way or the other, but that is the alternative approach. -- PMM