Skip to content

hw/block/m25p80: Fix erase and page program behavior

Yifan Wang qemu-arm qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4hw/block/m25p80: fix erase past the end of the flash devicehw/block/m25p80.c+13 -00 replies
2/4hw/block/m25p80: fix write enable latch after WRSR2hw/block/m25p80.c+3 -01 reply
3/4hw/block/m25p80: fix block protection on erasehw/block/m25p80.c tests/qtest/aspeed-smc-utils.c+74 -220 replies
4/4hw/block/m25p80: fix page program address wraphw/block/m25p80.c+19 -60 replies

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchPhilippe Mathieu-Daudé
1/4
2/4R-b
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

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

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

Signature · 1 line
2.53.0