[Skiboot] [PATCH v2] external/gard: Print an error if run on an FSP system

Cyril Bur cyril.bur at au1.ibm.com
Mon Aug 7 15:18:11 AEST 2017


On Mon, 2017-08-07 at 10:21 +0530, Vasant Hegde wrote:
> On 08/03/2017 12:38 PM, Cyril Bur wrote:
> > Signed-off-by: Cyril Bur <cyril.bur at au1.ibm.com>
> > ---
> >  external/gard/gard.c | 15 ++++++++++++++-
> >  1 file changed, 14 insertions(+), 1 deletion(-)
> > 
> > diff --git a/external/gard/gard.c b/external/gard/gard.c
> > index 4b26a3b8..55e2a924 100644
> > --- a/external/gard/gard.c
> > +++ b/external/gard/gard.c
> > @@ -43,7 +43,9 @@
> > 
> >  #define CLEARED_RECORD_ID 0xFFFFFFFF
> > 
> > -#define FDT_ACTIVE_FLASH_PATH "/proc/device-tree/chosen/ibm,system-flash"
> > +#define FDT_PATH "/proc/device-tree"
> > +#define FDT_FSP_NODE FDT_PATH"/fsps"
> 
> How about checking "ibm,system-flash" property and if that doesn't exist then 
> throw an error?
> 

Hi Vasant,

This already happens and not having "ibm,system-flash" doesn't
necessarily mean the system is FSP. The current message for this is in
external/common/arch_flash_powerpc.c:

 	fd = open(fdt_flash_path, O_RDONLY);
	if (fd == -1) {
		fprintf(stderr, "Couldn't open '%s' FDT attribute to determine
which flash device to use\n", fdt_flash_path);
		fprintf(stderr, "Is your skiboot new enough to expose the flash
through the device tree
\n");                                                                  
            
		hint_root();
		return -1;
	}


That is taken from get_dev_mtd() and it is called with fdt_flash_path
being the path to "ibm,system-flash".

Admittedly skiboots which don't expose "ibm,system-flash" are going to
be old these days...

Cyril

> -Vasant
> 



More information about the Skiboot mailing list