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: Mark Langsdorf
Subject: Re: [Qemu-devel] [PATCH 5/5] arm: SoC model for Calxeda Highbank
Date: Fri, 06 Jan 2012 15:16:48 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111124 Thunderbird/8.0

On 01/06/2012 10:29 AM, Peter Maydell wrote:
> On 5 January 2012 20:02, Mark Langsdorf <address@hidden> 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,.



reply via email to

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