[Skiboot] [PATCH 0/7] Improvements to flash reading code
Cyril Bur
cyril.bur at au1.ibm.com
Fri Jun 5 14:11:24 AEST 2015
Firstly apologies Stewart I should have had the patches I posted a few days
ago with this series. This series will be need to be applied after those.
https://patchwork.ozlabs.org/patch/480335/
These patches keep improving the blocklevel interface.
I've added the ability for ecc to be done at blocklevel, I've purposefully
left libflash _corrected() functions and their use within skiboot, as that
kind of change could wreck havoc. I'd like for skiboot to be the last that
migrates and I haven't done pflash yet.
I've also implemented smart_write() at blocklevel, in writing this I've
realised that smart can often be quite subjective, feedback requested here.
Rather than use a dodgy file accessing backend to libflash, use a file
backend at the blocklevel. This will make pflash and the gard tool much
nicer, and also make it easy for pflash to migrate to using /dev/mtd on
hosts to flash as well as being able to manipulate images on x86 machines.
I have a working gard tool with this code. Note: keen observers will
notice that the new file backend contains a fix to the MEMERASE MTD ioctl
when compared to what was in file_flash.c.
Cyril Bur (7):
libflash/ecc: Simplify and cleanup ecc code.
libflash/blocklevel: Extend the block level to be able to do ecc
libflash/blocklevel: add blocklevel flags.
libflash/file: Add a file access backend to for the blocklevel
interface.
libflash: Delete file_file.[ch] files
libflash/blocklevel: add a smart write function which wraps up
eraseing and writing
libffs: init with ecc protection at blocklevel level
core/flash.c | 14 +--
external/gard/gard.c | 2 +-
external/pflash/pflash.c | 4 +-
libc/include/errno.h | 2 +
libflash/blocklevel.c | 218 +++++++++++++++++++++++++++++++++-
libflash/blocklevel.h | 28 +++++
libflash/ecc.c | 51 +++++---
libflash/ecc.h | 42 +++----
libflash/file.c | 300 +++++++++++++++++++++++++++++++++++++++++++++++
libflash/file.h | 43 +++++++
libflash/file_flash.c | 224 -----------------------------------
libflash/file_flash.h | 11 --
libflash/libffs.c | 14 ++-
libflash/libffs.h | 2 +-
libflash/libflash.c | 28 +++--
libflash/test/test-ecc.c | 16 +--
16 files changed, 687 insertions(+), 312 deletions(-)
create mode 100644 libflash/file.c
create mode 100644 libflash/file.h
delete mode 100644 libflash/file_flash.c
delete mode 100644 libflash/file_flash.h
--
1.9.1
More information about the Skiboot
mailing list