qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 5/5] arm: SoC model for Calxeda Highbank


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH 5/5] arm: SoC model for Calxeda Highbank
Date: Sat, 7 Jan 2012 03:20:45 +0000

On 6 January 2012 21:16, Mark Langsdorf <address@hidden> 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



reply via email to

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