[Skiboot] [PATCH v2 3/6] external/pflash: report if a flash partition is ECC protected
Cyril Bur
cyril.bur at au1.ibm.com
Thu May 14 12:02:36 AEST 2015
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);
}
}
--
1.9.1
More information about the Skiboot
mailing list