[Skiboot] [RFC PATCH 0/3] libflash: ECC improvements

Cyril Bur cyrilbur at gmail.com
Thu Mar 5 20:39:22 AEDT 2015


From: Cyril Bur <cyril.bur at au1.ibm.com>

Hi,

I've hinted in a previous cover letter that the libflash ECC functionality
needs work.  In the course of writing a GUARD partition parsing tool I've
needed some of the missing functionality. If I could get some sets of eyes on
it that would be fanstastic.

I'm not sure if adding an _corrected() function is the best idea, perhaps just
adding the bool ecc to the existing ones will prove cleaner. I simply went
with _corrected because this is how read() was done.

Are we happy to have a more simplistic first patch set that we can optimise
later or should I put some effort into optimising?

I've written some make check tests for memcpy_*_ecc functions and they appear
to behave correctly.

The (almost) finished gard tool uses the libflash interfaces and they appear
to work although the testing has been light, I'm in the process of extending
the flash tests to test those the *_corrected functions.

Cyril Bur (3):
  libflash: first pass at improved eccmemcpy interface
  libflash: add ecc write code
  libflash: add flash_erase_corrected() to set ECC bytes in erased areas

 libflash/ecc.c      |  57 +++++++++++++++++++++-----
 libflash/ecc.h      |  10 ++++-
 libflash/libflash.c | 112 +++++++++++++++++++++++++++++++++++++++++++++++++++-
 libflash/libflash.h |   5 +++
 4 files changed, 172 insertions(+), 12 deletions(-)

-- 
1.9.1



More information about the Skiboot mailing list