[Skiboot] PNOR access utilizing libflash

Patrick Williams patrick at stwcx.xyz
Thu Dec 1 22:48:29 AEDT 2016


Steven / Stewart,

On Thu, Dec 01, 2016 at 11:09:22AM +1100, Stewart Smith wrote:
> Steven Janssen <janssens at us.ibm.com> writes:
> > A bit of history
> > Currently cronus has a server that gets loaded onto a fsp which allows the read/write of the
> > PNOR.
> > The cronus server currently utilizes the ffs_open, ffs_entry_read, ffs_entry_write, ffs_fsync, and
> > ffs_close interfaces as part of the libffs2.h. 
> > It is compiled with the -lffs shared library.
> 
> I gather this is  github.com/open-power/ffs - which is effectively
> unmaintained, while libflash is actively maintained.

This is not "unmaintained" on the FSP side of the world.  They actively
use it for their own flash management.  The version that is on
open-power is a forked / stripped down version that doesn't include
their native-FSP support.

> 
> > This server supports listing the partition table within the PNOR (received via the ffs_open
> > interface), and performing a read and write of the individual partitions.
> > Looking to the future....
> > I need to do something similar on the BMC. We are building a cronus server that runs on the
> > BMC and need to enable this functionality that exists on the fsp based cronus server. This
> > functionality was requested by Dean to allow this functionality to be used within manufacturing.
> > Here are my questions:
> > I'm currently not able to find the ability to list the partition table of the PNOR. Is this available
> > somewhere or future plans to add support for this?
> 
> It exists! check out
> https://github.com/open-power/skiboot/blob/master/external/pflash/pflash.c#L89
> on how it's done in the pflash utility to print things out.
> 
> There's also
> https://github.com/open-power/skiboot/blob/master/external/pflash/pflash.c#L149
> which opens a partition by name.
> 
> libflash is somewhat separated into different layers, and there is a FFS
> layer.
> 
> > How do I build in the libflash functionality within the openBMC environment? Is there a shared
> > library I can link to?
> 
> There is!
> 
> Patrick maintains the bitbake recipe that builds libflash.so for
> OpenBMC. So you should be able to just link against it.

You could just link against it, but...

I'm planning on drastically changing how OpenBMC manages the PNOR in the
near future.  This will make pflash / libflash irrelevant.  Hopefully,
to modify PNOR partitions you'll be able to drop a file into a
particular directory or modify an existing file and the BMC will take
care of the rest.

Let's move this discussion internal as to what the requirements are from
your side (which I think are requirements simply because I've punted on
some of that support for the 'op-toolkit' they are planning to use for
MFG),what the timelines are for this work and how that all lines up with
what we are thinking from the BMC side.

> 
> -- 
> Stewart Smith
> OPAL Architect, IBM.
> 

-- 
Patrick Williams
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Digital signature
URL: <http://lists.ozlabs.org/pipermail/skiboot/attachments/20161201/5425cd61/attachment.sig>


More information about the Skiboot mailing list