diff options
-rw-r--r-- | external/gard/gard.c | 28 | ||||
-rw-r--r-- | external/gard/gard.h | 20 | ||||
-rw-r--r-- | external/gard/test/results/01-show_1.out | 2 | ||||
-rw-r--r-- | external/gard/test/results/03-show_1-p9.out | 2 |
4 files changed, 49 insertions, 3 deletions
diff --git a/external/gard/gard.c b/external/gard/gard.c index bb92402..e7d8fba 100644 --- a/external/gard/gard.c +++ b/external/gard/gard.c @@ -165,6 +165,30 @@ static const char *target_type_to_str(int type) return "UNKNOWN"; } +static const char *deconfig_reason_str(enum gard_reason reason) +{ + switch (reason) { + case GARD_NO_REASON: + return "None"; + case GARD_MANUAL: + return "Manual"; + case GARD_UNRECOVERABLE: + return "Unrecoverable"; + case GARD_FATAL: + return "Fatal"; + case GARD_PREDICTIVE: + return "Predictive"; + case GARD_POWER: + return "Power"; // What does this even mean? + case GARD_HYP: + return "Hypervisor"; + case GARD_RECONFIG: + return "Reconfig"; + default: + return "Unknown"; + } +}; + static const char *path_type_to_str(enum path_type t) { switch (t) { @@ -320,7 +344,9 @@ static int do_show_i(struct gard_ctx *ctx, int pos, struct gard_record *gard, vo printf("Record ID: 0x%08x\n", id); printf("========================\n"); printf("Error ID: 0x%08x\n", be32toh(gard->errlog_eid)); - printf("Error Type: 0x%02x\n", gard->error_type); + printf("Error Type: %s (0x%02x)\n", + deconfig_reason_str(gard->error_type), + gard->error_type); printf("Path Type: %s\n", path_type_to_str(gard->target_id.type_size >> PATH_TYPE_SHIFT)); count = gard->target_id.type_size & PATH_ELEMENTS_MASK; for (i = 0; i < count && i < MAX_PATH_ELEMENTS; i++) diff --git a/external/gard/gard.h b/external/gard/gard.h index 9c814a7..191cbaf 100644 --- a/external/gard/gard.h +++ b/external/gard/gard.h @@ -20,6 +20,26 @@ #define PATH_TYPE_SHIFT 4 #define PATH_ELEMENTS_MASK (0x0F) +/* + * Sourced from hostboot: src/include/usr/hwas/common/hwasCallout.H + */ +enum gard_reason { + GARD_NO_REASON = 0x0, + GARD_MANUAL = 0xD2, + GARD_UNRECOVERABLE = 0xE2, + GARD_FATAL = 0xE3, + GARD_PREDICTIVE = 0xE6, + GARD_POWER = 0xE9, + GARD_HYP = 0xEA, + GARD_RECONFIG = 0xEB, + + /* + * This should only occur if the GUARD partition isn't correctly + * programmed with ECC bits. + */ + GARD_VOID = 0xFF, +}; + /* see src/include/usr/targeting/common/entitypath.H */ enum path_type { PATH_NA = 0x00, diff --git a/external/gard/test/results/01-show_1.out b/external/gard/test/results/01-show_1.out index e48d89b..60fcea2 100644 --- a/external/gard/test/results/01-show_1.out +++ b/external/gard/test/results/01-show_1.out @@ -1,7 +1,7 @@ Record ID: 0x00000001 ======================== Error ID: 0x90000015 -Error Type: 0xe6 +Error Type: Predictive (0xe6) Path Type: physical >Sys, Instance #0 >Node, Instance #0 diff --git a/external/gard/test/results/03-show_1-p9.out b/external/gard/test/results/03-show_1-p9.out index bdcf418..c9ae5b2 100644 --- a/external/gard/test/results/03-show_1-p9.out +++ b/external/gard/test/results/03-show_1-p9.out @@ -1,7 +1,7 @@ Record ID: 0x00000001 ======================== Error ID: 0x90000007 -Error Type: 0xe3 +Error Type: Fatal (0xe3) Path Type: physical >Sys, Instance #0 >Node, Instance #0 |