From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:43206) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gokBx-0000sG-CQ for qemu-devel@nongnu.org; Wed, 30 Jan 2019 02:21:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gokBv-0002Hb-18 for qemu-devel@nongnu.org; Wed, 30 Jan 2019 02:21:49 -0500 From: Stefan Hajnoczi Date: Wed, 30 Jan 2019 15:21:28 +0800 Message-Id: <20190130072131.13247-1-stefanha@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v3 0/3] arm: microbit Non-Volatile Memory Controller List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Laurent Vivier , Thomas Huth , jim@groklearning.com, =?UTF-8?q?Steffen=20G=C3=B6rtz?= , Joel Stanley , Peter Maydell , jusual@mail.ru, Paolo Bonzini , qemu-arm@nongnu.org, Stefan Hajnoczi v3: * Fix endianness of s->storage[], tested by Joel Stanley 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 devic= es [Peter] This series adds the Non-Volatile Memory Controller, which controls acces= s to the User Information Control Registers (UICR), Factory Information Contro= l Registers (FICR), and flash memory. This is the last piece of microbit work needed to make basic programs lik= e Micropython "Hello world" work under QEMU. Originally sent as part of Steffen's longer microbit device emulation ser= ies, I extracted this and deferred it until later because cleanups were necessar= y: * 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 initiali= zing 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=C3=B6rtz (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 --=20 2.20.1