[Skiboot] [PATCH 0/7] Abstract architectures for external tools

Cyril Bur cyril.bur at au1.ibm.com
Tue Aug 11 17:58:20 AEST 2015


Over the course of development and improvement of the tools kept within the
skiboot repository it has become clear that the external tools could be run
on something other than POWER (or ARM for BMC related tools). There is no
fundamental reason why this is not possible, it is quite simple, however
the difficulty was abstracting away the details of each architecture so that
something generic could exist, the external tools which tried this
independently were duplicating a lot of effort.

Important considerations were:
When running on a BMC pflash should be able to flash both the host and the
BMC flash. The gard tool hasn't been updated to run on the BMC, I'm not
sure it will need to be.
When running on POWER pflash should be able to flash using the MTD device
(and not the lpc) interface in order to limit the chance of concurrent
access. The gard tool on POWER should be able to perform all its function
including clearing gard records.
On x86 both the pflash and the gard tool should still perform most of their
functions, parsing, showing, modifying but with files on disk.

Cyril Bur (7):
  libflash: Return a pointer to internal structure.
  libflash: Reintroduce typesafety in lowlevel libflash calls
  external/common: Create common code for initialising libflash
    components
  external/common: Add POWERPC code reenable building pflash for POWER
  external/common: Add x86 code reenable building pflash
  external/pflash: Update distclean make target
  external/common: Write an includeable rules.mk.

 external/common/arch_flash.h                       |  41 +++
 external/common/arch_flash_arm.c                   | 294 +++++++++++++++++++++
 .../{pflash/io.h => common/arch_flash_arm_io.h}    |  43 +--
 external/common/arch_flash_common.c                |  38 +++
 external/common/arch_flash_powerpc.c               | 222 ++++++++++++++++
 external/common/arch_flash_powerpc_io.h            |   0
 external/common/arch_flash_x86.c                   |  52 ++++
 external/common/arch_flash_x86_io.h                |   0
 external/{pflash => common}/get_arch.sh            |   0
 external/common/rules.mk                           |  36 +++
 external/pflash/Makefile                           |  18 +-
 external/pflash/Makefile.dist                      |   2 +
 external/pflash/arm_io.c                           | 139 ----------
 external/pflash/ast.h                              |   2 +-
 external/pflash/pflash.c                           | 172 +++---------
 external/pflash/rules.mk                           |  18 +-
 external/pflash/sfc-ctrl.h                         |   9 -
 libflash/libflash.c                                |  20 +-
 libflash/libflash.h                                |  12 +-
 libflash/test/test-flash.c                         |   2 +-
 platforms/astbmc/pnor.c                            |   2 +-
 platforms/rhesus/rhesus.c                          |   2 +-
 22 files changed, 770 insertions(+), 354 deletions(-)
 create mode 100644 external/common/arch_flash.h
 create mode 100644 external/common/arch_flash_arm.c
 rename external/{pflash/io.h => common/arch_flash_arm_io.h} (60%)
 create mode 100644 external/common/arch_flash_common.c
 create mode 100644 external/common/arch_flash_powerpc.c
 create mode 100644 external/common/arch_flash_powerpc_io.h
 create mode 100644 external/common/arch_flash_x86.c
 create mode 100644 external/common/arch_flash_x86_io.h
 rename external/{pflash => common}/get_arch.sh (100%)
 create mode 100644 external/common/rules.mk
 delete mode 100644 external/pflash/arm_io.c
 delete mode 100644 external/pflash/sfc-ctrl.h

-- 
2.5.0



More information about the Skiboot mailing list