[PATCH 0/4] hw/block/m25p80: Fix erase and page program behavior

Yifan Wang posted 4 patches 1 week, 2 days ago
Maintainers: Alistair Francis <alistair@alistair23.me>, Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>, "Cédric Le Goater" <clg@kaod.org>, Peter Maydell <peter.maydell@linaro.org>, Jamin Lin <jamin_lin@aspeedtech.com>, Kane Chen <kane_chen@aspeedtech.com>, Fabiano Rosas <farosas@suse.de>, Laurent Vivier <lvivier@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>
hw/block/m25p80.c              | 118 +++++++++++++++++++++++++--------
tests/qtest/aspeed-smc-utils.c |  19 ++++++
2 files changed, 109 insertions(+), 28 deletions(-)
[PATCH 0/4] hw/block/m25p80: Fix erase and page program behavior
Posted by Yifan Wang 1 week, 2 days ago
Hi,

This series fixes erase alignment, write-enable latch handling, block
protection on erase, and page-program address wrapping in the M25P80
flash model.

Patch 1 aligns erase addresses to the containing erase unit and checks
the device bounds. Patch 2 clears the write-enable latch after WRSR2.
Patch 3 checks block protection before erase operations and updates the
ASPEED SMC tests to clear protection before their setup erases.
Patch 4 wraps page-program addresses within the page and corrects the
page sizes of affected devices.

Comments and suggestions are welcome.

Thanks,
Yifan

Chao Liu (4):
  hw/block/m25p80: fix erase past the end of the flash device
  hw/block/m25p80: fix write enable latch after WRSR2
  hw/block/m25p80: fix block protection on erase
  hw/block/m25p80: fix page program address wrap

 hw/block/m25p80.c              | 118 +++++++++++++++++++++++++--------
 tests/qtest/aspeed-smc-utils.c |  19 ++++++
 2 files changed, 109 insertions(+), 28 deletions(-)


base-commit: 49559567804523cb28cad002aa8e97f444e23ad7
-- 
2.53.0