qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 5/7] add L2x0/PL310 cache controller device


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v4 5/7] add L2x0/PL310 cache controller device
Date: Wed, 28 Dec 2011 01:32:32 +0000

On 28 December 2011 01:24, Mark Langsdorf <address@hidden> wrote:
> +    case 0x104:
> +        /* aux_ctrl values affect cache_type values */
> +        s->aux_ctrl = value;
> +        cache_data = (value & (7 << 17)) >> 15;
> +        cache_data |= (value & (1 << 16)) >> 16;
> +        s->cache_type |= (cache_data << 18) | (cache_data << 6);
> +        break;

If you do this this way round, then cache_type is no longer
constant, and you need to reset it in reset and save/load
it in the vmstate. It's probably simpler to fill in the
bits from aux_ctrl when cache_type is read rather than
when aux_ctrl is written. (It seems pretty safe to assume
neither happens very frequently.)

-- PMM



reply via email to

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