[RFC PATCH 0/7] Support for Hostboot Attributes
Samuel Mendoza-Jonas
sam.mj at au1.ibm.com
Mon Nov 30 14:13:13 AEDT 2015
(Resending without #3 'Add CCAN headers')
This series of patches adds support for reading and modifying Hostboot
platform attribute overrides from the Petitboot UI. This is an RFC only
and will undergo further updates and/or optimisations before merging
Hostboot attributes define several platform-specific options that can be
changed by writing attribute 'overrides'. On Open Power BMC machines,
(permanent) attributes are stored in the ATTR_PERM partition in PNOR flash
memory. Updating these overrides allows platform-specific options to be
updated much like in a conventional 'BIOS'.
PNOR flash can be accessed from userspace via the /dev/mtd device. The PNOR
is divided into several partitions, some of which are ECC-protected in software.
The 'libflash' library from Skiboot (https://github.com/open-power/skiboot)
provides an interface to handle the specifics.
libflash is normally linked against statically within the Skiboot tree - this
RFC will depend on a separate patch on the Skiboot mailing list,
"[RFC PATCH] external: Add Makefile targets to install libflash", which adds
support for building libflash as a shared library.
A list of possible attribute overrides will be defined by an XML file generated
by the relevant open-power/[platform]-xml scripts, and written to /usr/share
in op-build generated Skiroot builds. For each available attribute the XML will
define details required to write the override to flash, and further information
to describe the override to the user.
Petitboot parses this XML file, and retains the layout of options to
auto-generate a 'Firmware Configuration' menu to make the options
user-selectable. If changed, the updated attribute is written to flash, and the
machine rebooted for the new attributes to take effect.
The most significant remaining items for this patchset are;
* Update compile-time options to make the libxml2 and libflash components
optional (eg. for FSP-based machines).
* Improve the layout and positioning of UI elements in nc-hostboot.c
* Some additional sanity-checking and optimisation in lib/flash.c
* Ensure related Skiboot patch is merged and/or update linking method.
Samuel Mendoza-Jonas (7):
lib: Add types for platform attributes
lib: Add libxml2 support
lib: Add CCAN headers
lib: Add libflash support for Open Power machines
discover: Add hostboot XML handling and processing
discover: Add platform support for attribute overrides
ui: Add nc-hostboot.c and support for firmware messages
discover/Makefile.am | 11 +
discover/device-handler.c | 21 +
discover/device-handler.h | 2 +
discover/discover-server.c | 36 ++
discover/hostboot.c | 344 +++++++++++++++
discover/hostboot.h | 10 +
discover/platform-powerpc.c | 31 ++
discover/platform.c | 37 ++
discover/platform.h | 8 +
lib/Makefile.am | 17 +-
lib/ccan/endian/.depends | 0
lib/ccan/endian/LICENSE | 28 ++
lib/ccan/endian/_info | 55 +++
lib/ccan/endian/endian.h | 346 +++++++++++++++
lib/ccan/endian/test/compile_ok-constant.c | 12 +
lib/ccan/endian/test/run.c | 109 +++++
lib/flash/config.h | 19 +
lib/flash/flash.c | 648 +++++++++++++++++++++++++++
lib/flash/flash.h | 50 +++
lib/pb-protocol/pb-protocol.c | 358 +++++++++++++++
lib/pb-protocol/pb-protocol.h | 7 +
lib/types/types.c | 63 +++
lib/types/types.h | 63 +++
lib/xml/xml.c | 155 +++++++
lib/xml/xml.h | 19 +
ui/common/discover-client.c | 36 ++
ui/common/discover-client.h | 5 +
ui/ncurses/Makefile.am | 3 +
ui/ncurses/nc-cui.c | 55 ++-
ui/ncurses/nc-cui.h | 5 +
ui/ncurses/nc-hostboot-help.c | 4 +
ui/ncurses/nc-hostboot.c | 677 +++++++++++++++++++++++++++++
ui/ncurses/nc-hostboot.h | 34 ++
ui/ncurses/nc-scr.h | 1 +
ui/ncurses/nc-widgets.c | 4 +-
ui/ncurses/nc-widgets.h | 4 +-
36 files changed, 3266 insertions(+), 11 deletions(-)
create mode 100644 discover/hostboot.c
create mode 100644 discover/hostboot.h
create mode 100644 lib/ccan/endian/.depends
create mode 100644 lib/ccan/endian/LICENSE
create mode 100644 lib/ccan/endian/_info
create mode 100644 lib/ccan/endian/endian.h
create mode 100644 lib/ccan/endian/test/compile_ok-constant.c
create mode 100644 lib/ccan/endian/test/run.c
create mode 100644 lib/flash/config.h
create mode 100644 lib/flash/flash.c
create mode 100644 lib/flash/flash.h
create mode 100644 lib/xml/xml.c
create mode 100644 lib/xml/xml.h
create mode 100644 ui/ncurses/nc-hostboot-help.c
create mode 100644 ui/ncurses/nc-hostboot.c
create mode 100644 ui/ncurses/nc-hostboot.h
--
2.6.2
More information about the Petitboot
mailing list