int print_opal_priv_hdr_scn(const struct opal_priv_hdr_scn *privhdr) { print_bar(); print_header("Private Header"); print_opal_v6_hdr(privhdr->v6hdr); print_line("Created at", "%4u-%02u-%02u | %02u:%02u:%02u", privhdr->create_datetime.year, privhdr->create_datetime.month, privhdr->create_datetime.day, privhdr->create_datetime.hour, privhdr->create_datetime.minutes, privhdr->create_datetime.seconds); print_line("Committed at", "%4u-%02u-%02u | %02u:%02u:%02u", privhdr->commit_datetime.year, privhdr->commit_datetime.month, privhdr->commit_datetime.day, privhdr->commit_datetime.hour, privhdr->commit_datetime.minutes, privhdr->commit_datetime.seconds); print_line("Created by", "%s", get_creator_name(privhdr->creator_id)); print_line("Creator Sub Id", "0x%x (%u), 0x%x (%u)", privhdr->creator_subid_hi, privhdr->creator_subid_hi, privhdr->creator_subid_lo, privhdr->creator_subid_lo); print_line("Platform Log Id", "0x%x", privhdr->plid); print_line("Entry ID", "0x%x", privhdr->log_entry_id); print_line("Section Count","%u",privhdr->scn_count); print_bar(); return 0; }
int print_ei_scn(const struct opal_ei_scn *ei) { print_header("Environmental Information"); print_opal_v6_hdr(ei->v6hdr); print_center("Genesis Readings"); print_line("Timestamp", "0x%016lx", ei->g_timestamp); print_ei_env_scn(&(ei->genesis)); print_center(" "); if (ei->status == CORROSION_RATE_NORM) print_line("Corrosion Rate Status", "Normal"); else if (ei->status == CORROSION_RATE_ABOVE) print_line("Corrosion Rate Status", "Above Normal"); else print_line("Corrosion Rate Status", "Unknown"); print_line("User Data Section", "%s", ei->user_data_scn ? "Present" : "Absent"); print_line("Sensor Reading Count", "0x%04x", ei->read_count); int i; for(i = 0; i < ei->read_count; i++) print_ei_env_scn(ei->readings + i); return 0; }
int print_src_scn(const struct opal_src_scn *src, void *cookie) { if (src->v6hdr.id[0] == 'P') print_header("Primary System Reference Code"); else print_header("Secondary System Reference Code"); print_opal_v6_hdr(src->v6hdr); print_line("SRC Format", "0x%x", src->flags); print_line("SRC Version", "0x%x", src->version); print_line("Valid Word Count", "0x%x", src->wordcount); print_line("SRC Length", "%x", src->srclength); print_src_refcode(src); if(src->fru_count) { print_center(" "); print_center("Callout Section"); print_center(" "); /* Hardcode this to look like FSP, not what what they want here... */ print_line("Additional Sections", "Disabled"); print_line("Callout Count", "%d", src->fru_count); int i; for (i = 0; i < src->fru_count; i++) print_fru_scn(src->fru[i]); } print_center(" "); return 0; }
int print_ch_scn(const struct opal_ch_scn *ch, void *cookie) { print_header("Call Home Log Comment"); print_opal_v6_hdr(ch->v6hdr); print_line("Call Home Comment", "%s", ch->comment); return 0; }
int print_sw_scn(const struct opal_sw_scn *sw, void *cookie) { print_header("Firmware Error Description"); print_opal_v6_hdr(sw->v6hdr); if (sw->v6hdr.version == 1) { print_line("Return Code", "0x%08x", sw->version.v1.rc); print_line("Line Number", "%08d", sw->version.v1.line_num); print_line("Object Identifier", "0x%08x", sw->version.v1.object_id); print_line("File ID Length", "0x%x", sw->version.v1.id_length); print_line("File Identifier", "%s", sw->version.v1.file_id); } else if (sw->v6hdr.version == 2) { print_line("File Identifier", "0x%04x", sw->version.v2.file_id); print_line("Code Location", "0x%04x", sw->version.v2.location_id); print_line("Return Code", "0x%08x", sw->version.v2.rc); print_line("Object Identifier", "0x%08x", sw->version.v2.object_id); } else { print_line("Parse error", "Incompatible version - 0x%x", sw->v6hdr.version); } return 0; }