[Skiboot] [PATCH v2 3/6] external/pflash: report if a flash partition is ECC protected
Alistair Popple
alistair at popple.id.au
Fri May 22 12:05:53 AEST 2015
Assuming the pflash binary Cyril gave me (I don't have a complete userspace
arm compiler handy) was built from this series then this seems to work as
intended.
Reviewed-by: Alistair Popple <alistair at popple.id.au>
On Thu, 14 May 2015 12:02:36 Cyril Bur wrote:
> Currently pflash doesn't display if a flash partition contains ECC bits or
> not when dumping the flash layout. libffs has all this information it's
> just that pflash doesn't relay it.
>
> Trivial change to add to the information pflash prints about each partition
>
> Signed-off-by: Cyril Bur <cyril.bur at au1.ibm.com>
> ---
> external/pflash/pflash.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/external/pflash/pflash.c b/external/pflash/pflash.c
> index fb783a2..29a2775 100644
> --- a/external/pflash/pflash.c
> +++ b/external/pflash/pflash.c
> @@ -99,9 +99,10 @@ static void print_flash_info(void)
>
> for (i = 0;; i++) {
> uint32_t start, size, act, end;
> + bool ecc;
> char *name;
>
> - rc = ffs_part_info(ffsh, i, &name, &start, &size, &act, NULL);
> + rc = ffs_part_info(ffsh, i, &name, &start, &size, &act, &ecc);
> if (rc == FFS_ERR_PART_NOT_FOUND)
> break;
> if (rc) {
> @@ -109,8 +110,9 @@ static void print_flash_info(void)
> break;
> }
> end = start + size;
> - printf("ID=%02d %15s %08x..%08x (actual=%08x)\n",
> - i, name, start, end, act);
> + printf("ID=%02d %15s %08x..%08x (actual=%08x) %s\n",
> + i, name, start, end, act, ecc ? "[ECC]" : "");
> +
> free(name);
> }
> }
More information about the Skiboot
mailing list