Skip to content

arm: microbit Non-Volatile Memory Controller

Stefan Hajnoczi qemu-arm qemu-devel 4 versions – Applied

Status from this message: Applied to target-arm.next, thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest3 patches 1 replyApplied
  2. v33 patches 2 repliesSuperseded
  3. v25 patches 8 repliesApplied
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v14 patches6 repliesSuperseded

Changes in v4 from the cover letter

* assert(offset + size <= s->flash_size) [Peter]

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/3hw/nvram/nrf51_nvm: Add nRF51 non-volatile memorieshw/nvram/Makefile.objs hw/nvram/nrf51_nvm.c include/hw/nvram/nrf51_nvm.h+453 -00 replies
2/3arm: Instantiate NRF51 special NVM's and NVMChw/arm/nrf51_soc.c include/hw/arm/nrf51_soc.h+31 -120 replies
3/3tests/microbit-test: Add tests for nRF51 NVMCtests/microbit-test.c+108 -00 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchPeter MaydellStefan HajnocziJoel StanleyThomas Huth
1/3R-b T-b
2/3R-b R-b
3/3R-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v4 thread

Cover letter [Qemu-arm] [PATCH v4 0/3] arm: microbit Non-Volatile Memory Controller

v4:
* assert(offset + size <= s->flash_size) [Peter]
v3:
* Fix endianness of s->storage[], tested by Joel Stanley <[email protected]> on big-endian ppc [Peter]
* Fix off-by-one that prevented clearing the last page of flash
* Add missing memory_region_flush_rom_device() call to flash_write()
v2:
* Add Patch 2 to call memory_region_flush_rom_device() from pflash devices [Peter]

This series adds the Non-Volatile Memory Controller, which controls access to the User Information Control Registers (UICR), Factory Information Control Registers (FICR), and flash memory.

This is the last piece of microbit work needed to make basic programs like Micropython "Hello world" work under QEMU.

Originally sent as part of Steffen's longer microbit device emulation series, I extracted this and deferred it until later because cleanups were necessary:

* Use memory_region_flush_rom_device() to dirty/invalidate memory [Peter] ^--- Paolo: I CCed you on this new memory API
* Fix device-introspect-test segfault due to missing owner when initializing FICR and UICR memory regions [Peter]
* Fix off-by-one assertion checks [Peter]
* Fix missing whitespace at end of comment [Peter]
* Clear UICR on reset - we'd need a block device for true non-volatility [Peter]

Steffen Görtz (3):
hw/nvram/nrf51_nvm: Add nRF51 non-volatile memories
arm: Instantiate NRF51 special NVM's and NVMC tests/microbit-test: Add tests for nRF51 NVMC

 hw/nvram/Makefile.objs       |   1 +
 include/hw/arm/nrf51_soc.h   |   2 +
 include/hw/nvram/nrf51_nvm.h |  64 ++++++
 hw/arm/nrf51_soc.c           |  41 ++--
 hw/nvram/nrf51_nvm.c         | 388 +++++++++++++++++++++++++++++++++++
 tests/microbit-test.c        | 108 ++++++++++
 6 files changed, 592 insertions(+), 12 deletions(-)
 create mode 100644 include/hw/nvram/nrf51_nvm.h
 create mode 100644 hw/nvram/nrf51_nvm.c
Signature · 1 line
2.20.1