[Qemu-devel] [PATCH v2 0/5] arm: microbit Non-Volatile Memory Controller

Stefan Hajnoczi posted 5 patches 6 years, 9 months ago
Test asan passed
Test docker-clang@ubuntu passed
Test docker-mingw@fedora passed
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190123212234.32068-1-stefanha@redhat.com
Maintainers: Max Reitz <mreitz@redhat.com>, Peter Maydell <peter.maydell@linaro.org>, Thomas Huth <thuth@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Kevin Wolf <kwolf@redhat.com>, Laurent Vivier <lvivier@redhat.com>, Joel Stanley <joel@jms.id.au>, Peter Crosthwaite <crosthwaite.peter@gmail.com>, Richard Henderson <rth@twiddle.net>
There is a newer version of this series
hw/nvram/Makefile.objs       |   1 +
include/exec/memory.h        |  18 ++
include/hw/arm/nrf51_soc.h   |   2 +
include/hw/nvram/nrf51_nvm.h |  64 ++++++
exec.c                       |  12 ++
hw/arm/nrf51_soc.c           |  41 ++--
hw/block/pflash_cfi01.c      |   5 +
hw/block/pflash_cfi02.c      |   8 +
hw/nvram/nrf51_nvm.c         | 381 +++++++++++++++++++++++++++++++++++
tests/microbit-test.c        |  97 +++++++++
10 files changed, 617 insertions(+), 12 deletions(-)
create mode 100644 include/hw/nvram/nrf51_nvm.h
create mode 100644 hw/nvram/nrf51_nvm.c
[Qemu-devel] [PATCH v2 0/5] arm: microbit Non-Volatile Memory Controller
Posted by Stefan Hajnoczi 6 years, 9 months ago
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]

Stefan Hajnoczi (2):
  memory: add memory_region_flush_rom_device()
  pflash: flush rom device memory region

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/exec/memory.h        |  18 ++
 include/hw/arm/nrf51_soc.h   |   2 +
 include/hw/nvram/nrf51_nvm.h |  64 ++++++
 exec.c                       |  12 ++
 hw/arm/nrf51_soc.c           |  41 ++--
 hw/block/pflash_cfi01.c      |   5 +
 hw/block/pflash_cfi02.c      |   8 +
 hw/nvram/nrf51_nvm.c         | 381 +++++++++++++++++++++++++++++++++++
 tests/microbit-test.c        |  97 +++++++++
 10 files changed, 617 insertions(+), 12 deletions(-)
 create mode 100644 include/hw/nvram/nrf51_nvm.h
 create mode 100644 hw/nvram/nrf51_nvm.c

-- 
2.20.1


Re: [Qemu-devel] [PATCH v2 0/5] arm: microbit Non-Volatile Memory Controller
Posted by Peter Maydell 6 years, 9 months ago
On Wed, 23 Jan 2019 at 21:23, Stefan Hajnoczi <stefanha@redhat.com> wrote:
>
> 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.

I've applied patches 1, 3, 4 and 5 to target-arm.next, thanks.
Philippe has review comments on 2 and it's not really microbit
related anyway.

thanks
-- PMM

Re: [Qemu-devel] [PATCH v2 0/5] arm: microbit Non-Volatile Memory Controller
Posted by Peter Maydell 6 years, 9 months ago
On Thu, 24 Jan 2019 at 13:38, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> On Wed, 23 Jan 2019 at 21:23, Stefan Hajnoczi <stefanha@redhat.com> wrote:
> >
> > 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.
>
> I've applied patches 1, 3, 4 and 5 to target-arm.next, thanks.
> Philippe has review comments on 2 and it's not really microbit
> related anyway.

As discussed on IRC, I'm dropping patch 5, because it conflicts
with Julia's patch that drops the usage of global_qtest.

thanks
-- PMM