[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
- [Qemu-devel] [PATCH v5 00/14] arm: nRF51 Devices and Microbit Support, Steffen Görtz, 2018/11/12
- [Qemu-devel] [PATCH v5 04/14] arm: Instantiate NRF51 random number generator, Steffen Görtz, 2018/11/12
- [Qemu-devel] [PATCH v5 03/14] hw/misc/nrf51_rng: Add NRF51 random number generator peripheral, Steffen Görtz, 2018/11/12
- [Qemu-devel] [PATCH v5 06/14] arm: Instantiate NRF51 special NVM's and NVMC, Steffen Görtz, 2018/11/12
- [Qemu-devel] [PATCH v5 08/14] hw/gpio/nrf51_gpio: Add nRF51 GPIO peripheral, Steffen Görtz, 2018/11/12
- [Qemu-devel] [PATCH v5 02/14] arm: Add header to host common definition for nRF51 SOC peripherals, Steffen Görtz, 2018/11/12
- [Qemu-devel] [PATCH v5 10/14] tests/microbit-test: Add Tests for nRF51 GPIO, Steffen Görtz, 2018/11/12
- [Qemu-devel] [PATCH v5 09/14] arm: Instantiate NRF51 general purpose I/O, Steffen Görtz, 2018/11/12