From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:52589) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RjH9e-0001WS-AP for qemu-devel@nongnu.org; Fri, 06 Jan 2012 16:16:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RjH9d-0001y8-7d for qemu-devel@nongnu.org; Fri, 06 Jan 2012 16:16:50 -0500 Received: from smtp161.dfw.emailsrvr.com ([67.192.241.161]:57900) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RjH9d-0001xz-2e for qemu-devel@nongnu.org; Fri, 06 Jan 2012 16:16:49 -0500 Message-ID: <4F0764C0.9070306@calxeda.com> Date: Fri, 06 Jan 2012 15:16:48 -0600 From: Mark Langsdorf MIME-Version: 1.0 References: <1325793761-10249-1-git-send-email-mark.langsdorf@calxeda.com> <1325793761-10249-6-git-send-email-mark.langsdorf@calxeda.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 5/5] arm: SoC model for Calxeda Highbank List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: "qemu-devel@nongnu.org" , Rob Herring , "afaerber@suse.de" On 01/06/2012 10:29 AM, Peter Maydell wrote: > On 5 January 2012 20:02, Mark Langsdorf 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,.