|
From: | Gerd Hoffmann |
Subject: | Re: [Qemu-devel] [RFC PATCH v1 2/4] bitops: Add UInt32StateInfo and helper functions |
Date: | Mon, 04 Mar 2013 07:55:02 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130216 Thunderbird/17.0.3 |
> +/** > + * A descriptor for a Uint32 that is part of guest accessible device state > + * @ro: whether or not the bit is read-only state comming out of reset > + * @w1c: bits with the common write 1 to clear semantic. > + * @nw0: bits that cant be written with a 0 by the guest (sticky 1) > + * @nw1: bits that cant be written with a 1 by the guest (sticky 0) Why these? reset=0 + ro=1 equals nw1=1 reset=1 + ro=1 equals nw0=1 > + * @width: width of the uint32t. Only the @width least significant bits are > + * valid. All others are silent Read-as-reset/WI. That's kida redundant with "ro" too. I'd do it the other way around btw: Specify the writable bits instead of the read-only ones. width=8 easily be written as wmask=0xff then. cheers, Gerd
[Prev in Thread] | Current Thread | [Next in Thread] |