qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v5 05/14] hw/nvram/nrf51_nvm: Add nRF51 non-vola


From: Steffen Görtz
Subject: Re: [Qemu-devel] [PATCH v5 05/14] hw/nvram/nrf51_nvm: Add nRF51 non-volatile memories
Date: Sun, 25 Nov 2018 19:24:51 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1

Hi Peter,

thank you for your remarks!

>> +};
>> +
>> +static uint64_t ficr_read(void *opaque, hwaddr offset
> 
>> +            value &= ~(NRF51_PAGE_SIZE - 1);
>> +            if (value < (s->flash_size - NRF51_PAGE_SIZE)) {
>> +                memset(s->storage + value / 4, 0xFF, NRF51_PAGE_SIZE);
> 
> Can the guest try to execute from the flash storage? If so
> then just updating the backing storage directly like this is
> not sufficient to ensure that QEMU discards any now-stale
> translated code blocks from the affected memory.

What else is necessary to invalidate stale blocks?


>> +
>> +static void nrf51_nvm_reset(DeviceState *dev)
>> +{
>> +    NRF51NVMState *s = NRF51_NVM(dev);
>> +
>> +    s->config = 0x00;
> 
> Shouldn't uicr_content[] and storage be reset too ?


Storage and uicr_content should be retained during a device reset. 

Best,
Steffen



reply via email to

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