This is an example of usage of attributes in a device model.  It lets
you block flash writes unless the CPU is in secure mode.  Enabling it
currently requires a -readconfig file:

        [global]
        driver = "cfi.pflash01"
        property = "secure"
        value = "on"

because the driver includes a "."; however, I plan to enable this through
the command line for the final version of the patches.

In the meanwhile, a review of the approach and of the actual memattrs bit
would be great.

Paolo

Paolo Bonzini (3):
  pflash_cfi01: change big-endian property to BIT type
  pflash_cfi01: change to new-style MMIO accessors
  pflash_cfi01: add secure property

 hw/block/pflash_cfi01.c | 115 ++++++++++++------------------------------------
 1 file changed, 28 insertions(+), 87 deletions(-)

-- 
2.3.5


Reply via email to