[Skiboot] [PATCH 0/4] libflash/blocklevel erase features
Cyril Bur
cyril.bur at au1.ibm.com
Thu Apr 6 11:38:46 AEST 2017
Hello,
Currently libflash/blocklevel erase functionality checks to see if the
erase region is aligned to the erase mask of the backend. If the
condition isn't met blocklevel will refuse to allow the erase, this is
by design as backends provide no sanity guarantee here - although most
will likely just fail aswell.
Until recently this hasn't been a problem as backends have always
supplied 4K erase blocks and the FFS structures which are most
commonly modified are 4k aligned.
Recently BMC kernel MTD backends have been exposing 64K erase blocks
which had not gone well with the 4K aligned FFS partitions. This has
resulted in pflash being unable to flash specific partitions or the
gard tool being unable to clear records. Various bugs have been filed
on the matter - some which I can't link and most which I don't even
have access to myself.
Introducing blocklevel_smart_erase(), essentially just deals with with
the rmw problem of having to erase more than what will be written. The
great news is that this series comes with tests!
Cyril
Cyril Bur (4):
libflash/blocklevel: Add blocklevel_smart_erase()
libflash: Add tests for blocklevel_smart_erase()
external/gard: Use blocklevel_smart_erase()
external/pflash: Use blocklevel_smart_erase()
external/gard/gard.c | 2 +-
external/pflash/pflash.c | 31 +-----
libflash/blocklevel.c | 122 ++++++++++++++++++++-
libflash/blocklevel.h | 10 +-
libflash/test/test-blocklevel.c | 227 +++++++++++++++++++++++++++++++++++++++-
5 files changed, 360 insertions(+), 32 deletions(-)
--
2.12.2
More information about the Skiboot
mailing list