ppc64-diag
|
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
#include <stdarg.h>
#include <string.h>
#include <fcntl.h>
#include <time.h>
#include <ctype.h>
#include <librtasevent.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/errno.h>
#include "fru_prev6.h"
#include "dchrp.h"
#include "dchrp_frus.h"
#include "rtas_errd.h"
#include "ela_msg.h"
Data Structures | |
struct | epow_reset |
Macros | |
#define | LOC_CODES_OK ((event->loc_codes != NULL) && strlen(event->loc_codes)) |
#define | IO_BRIDGE_MASK 0x0FFF0FFF /* mask off byte 13, bits 0-3 */ |
#define | PTABLE_SIZE 4 |
#define | is_planar(x) (x != NULL && strchr(x, 'P') && (!strchr(x,'-') && !strchr( x,'/'))) |
#define | is_cpu(x) (x != NULL && strchr(x, 'C')) |
#define | is_not_fru(x) (x == NULL || strlen(x) == 0) |
#define | NCPUSYMPTOMS 9 |
#define | NMEMSYMPTOMS 17 |
#define | NIOSYMPTOMS 17 |
#define | NSPSYMPTOMS 33 |
#define | NSPSYMPTOMS_ADDITIONAL 9 |
#define | PROCESS_V4_REFCODE |
Analyze Versions 3 and beyond EPOW error logs. More... | |
Functions | |
static int | analyze_io_bus_error (struct event *event, int version, int error_type) |
Analyze the io bus errors, i.e. IOB12b0, IOB12b1, or IOB12b2. More... | |
static int | get_error_type (struct event *, int) |
static int | report_srn (struct event *, int, struct event_description_pre_v6 *) |
static char * | get_loc_code (struct event *, int, int *) |
static int | report_menugoal (struct event *event, char *fmt,...) |
Report a menu goal with optional variable substitution into the text. More... | |
static int | report_io_error_frus (struct event *, int, struct event_description_pre_v6 *, struct device_ela *, struct device_ela *) |
static int | get_cpu_frus (struct event *) |
static int | process_v1_epow (struct event *event, int error_type) |
Analyze the Version 1 EPOW error log. More... | |
static int | process_v2_epow (struct event *event, int error_type) |
Analyze the Version 2 and Version 3 EPOW error logs. More... | |
static int | process_v3_epow (struct event *, int, int) |
static int | sensor_epow (struct event *, int, int) |
static void | unknown_epow_ela (struct event *, int) |
static int | process_v2_sp (struct event *event, int error_type) |
Analyze the Version 2 SP error logs. More... | |
static int | process_v3_logs (struct event *event, int error_type) |
Analyze the Version 3 and beyond error logs. More... | |
static int | convert_symptom (struct event *, int, int, char **) |
static int | process_refcodes (struct event *, short *, int) |
char * | get_tod () |
static int | convert_bcd (int num) |
Convert decimal number to hex number. More... | |
static char * | get_refcode (struct event_description_pre_v6 *event, int index) |
int | add_more_descrs (struct event *event, struct event_description_pre_v6 *ptr) |
int | set_srn_and_callouts (struct event *event, struct event_description_pre_v6 *ptr, unsigned post_error) |
Determines the SRN and creates callout structs. More... | |
int | add_cpu_id (struct event_description_pre_v6 *ptr, int fru_num, int cpuid) |
void | set_fru_percentages (struct event_description_pre_v6 *event, int nfrus) |
int * | get_register_data (struct event *event, int rid, int *rlen) |
int | save_epow_reset (struct event *event, int error_type) |
int | has_epow_reset (struct event *event, int error_type) |
int | process_epow (struct event *event, int error_type) |
Determine the version of the EPOW error log and process accordingly. More... | |
int | process_pre_v6 (struct event *event) |
Handle older (pre-v6) style events. More... | |
int | get_error_fmt (struct event *event) |
Extract the error log format indicator from the chrp error log. More... | |
int | get_ext_epow (struct event *event) |
Get the extended epow status bytes from the chrp log. More... | |
void | loss_power_MG (struct event *event) |
void | manual_power_off_MG (struct event *event) |
void | clear_edesc_struct (struct event_description_pre_v6 *event) |
int | make_refcode_errdscr (struct event *event, struct event_description_pre_v6 *e_desc, int *adderrdscr_called) |
Variables | |
char * | optarg |
int | io_error_type = 0 |
int | pct_index = 0 |
int | percent_table [2][PTABLE_SIZE+1][PTABLE_SIZE] |
short | rctab [MAXREFCODES+1] |
char | rctabloc [MAXREFCODES+1] |
static struct epow_reset * | epow_reset_list = NULL |
Copyright (C) 2005 IBM Corporation
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#define IO_BRIDGE_MASK 0x0FFF0FFF /* mask off byte 13, bits 0-3 */ |
Referenced by get_error_type().
#define is_cpu | ( | x | ) | (x != NULL && strchr(x, 'C')) |
Referenced by get_cpu_frus().
#define is_not_fru | ( | x | ) | (x == NULL || strlen(x) == 0) |
Referenced by get_cpu_frus().
#define is_planar | ( | x | ) | (x != NULL && strchr(x, 'P') && (!strchr(x,'-') && !strchr( x,'/'))) |
Referenced by get_cpu_frus().
Referenced by analyze_io_bus_error(), get_loc_code(), loss_power_MG(), process_v2_epow(), report_menugoal(), sensor_epow(), and unknown_epow_ela().
#define NCPUSYMPTOMS 9 |
convert_symptom
FUNCTION: Converts the symptom bits into a unique sequence number for the error log format, and finds the reason code message for the SRN.
INPUTS: format_type - the format of the error log predictive - flag used to determine type of message
OUTPUTS: The message number of the reason code message. predictive indicates whether the SRN should reflect deferred repair.
RETURNS: The BCD sequence number, 0 to 0x99 for encoding into a SRN.
If there is any error, the sequence number returned will be 0xFF. The error could be unknown unknow error log format. Unknown symptom bits will be defaulted to ALL ZEROS in the symptom bits, which will be sequence number 0.
0x100 will be returned if a menugoal, or another SRN type was displayed in lieu of encoding a SRN.
Referenced by convert_symptom().
#define NIOSYMPTOMS 17 |
Referenced by convert_symptom().
#define NMEMSYMPTOMS 17 |
Referenced by convert_symptom().
#define NSPSYMPTOMS 33 |
Referenced by convert_symptom().
#define NSPSYMPTOMS_ADDITIONAL 9 |
Referenced by convert_symptom().
#define PROCESS_V4_REFCODE |
process_v3_epow INPUTS: The encoded error type. The version of the RPA error log format.
OUTPUTS: Fills in the v3_errdscr or reports SRN with refcodes.
RETURNS: 1 if errdscr is ready, 2 if refcode was reported otherwise 0, i.e. a menu goal was reported instead.
Referenced by process_v3_epow().
#define PTABLE_SIZE 4 |
Referenced by set_fru_percentages().
int add_cpu_id | ( | struct event_description_pre_v6 * | ptr, |
int | fru_num, | ||
int | cpuid | ||
) |
add_cpu_id
Adds the physical cpu id number to the logical name procx for an event that calls out a processor.
References fru_callout_pre_v6::fname, and event_description_pre_v6::frus.
Referenced by process_pre_v6().
int add_more_descrs | ( | struct event * | event, |
struct event_description_pre_v6 * | ptr | ||
) |
add_more_descrs
References add_callout(), dbg, diag_get_fru_pn(), fru_callout_pre_v6::floc, event_description_pre_v6::frus, and get_refcode().
Referenced by make_refcode_errdscr(), and report_srn().
|
static |
analyze_io_bus_error
References device_ela::busname, io833, io9CC, IOB12b0, IOB12b1, IOB12b2, iobusonly, LOC_CODES_OK, device_ela::name, report_io_error_frus(), and SN9CC.
Referenced by convert_symptom(), and process_pre_v6().
void clear_edesc_struct | ( | struct event_description_pre_v6 * | event | ) |
clear_edesc_struct
Clear the frus out of the event description. This allows the caller to recycle the same event to report more than 4 frus.
References fru_callout_pre_v6::floc, fru_callout_pre_v6::fname, event_description_pre_v6::frus, and MAXFRUS.
Referenced by process_refcodes().
|
static |
convert_bcd Converts num into hex number that will display as decimal. i.e. binary 0x1010 becomes 0x10000 A 10
num | decimal number to convert |
Referenced by convert_symptom().
|
static |
References analyze_io_bus_error(), convert_bcd(), DEFER_MSGALLZERO, DEFER_MSGCPUB12b0, DEFER_MSGCPUB12b1, DEFER_MSGCPUB12b2, DEFER_MSGCPUB12b3, DEFER_MSGCPUB12b4, DEFER_MSGCPUB12b5, DEFER_MSGCPUB12b6, DEFER_MSGCPUB12b7, DEFER_MSGIOB12b0, DEFER_MSGIOB12b1, DEFER_MSGIOB12b2, DEFER_MSGIOB12b3, DEFER_MSGIOB12b4, DEFER_MSGIOB12b5, DEFER_MSGIOB12b5B13b3, DEFER_MSGIOB12b6, DEFER_MSGIOB12b6B13b3, DEFER_MSGIOB12b7, DEFER_MSGIOB12b7B13b3, DEFER_MSGIOB13b3, DEFER_MSGIOB13b4, DEFER_MSGIOB13b5, DEFER_MSGIOB13b6, DEFER_MSGIOB13b7, DEFER_MSGMEMB12b0, DEFER_MSGMEMB12b1, DEFER_MSGMEMB12b2, DEFER_MSGMEMB12b3, DEFER_MSGMEMB12b4, DEFER_MSGMEMB12b5, DEFER_MSGMEMB12b6, DEFER_MSGMEMB12b7, DEFER_MSGMEMB13b0, DEFER_MSGMEMB13b1, DEFER_MSGMEMB13b2, DEFER_MSGMEMB13b3, DEFER_MSGMEMB13b4, DEFER_MSGMEMB13b6, DEFER_MSGMEMB13b7, DEFER_MSGRESERVED, DEFER_MSGSPB16b0, DEFER_MSGSPB16b1, DEFER_MSGSPB16b2, DEFER_MSGSPB16b3, DEFER_MSGSPB16b4, DEFER_MSGSPB16b5, DEFER_MSGSPB16b6, DEFER_MSGSPB16b7, DEFER_MSGSPB17b0, DEFER_MSGSPB17b1, DEFER_MSGSPB17b2, DEFER_MSGSPB17b3, DEFER_MSGSPB17b4, DEFER_MSGSPB17b5, DEFER_MSGSPB18b0, DEFER_MSGSPB18b1, DEFER_MSGSPB18b2, DEFER_MSGSPB18b3, DEFER_MSGSPB18b4, DEFER_MSGSPB18b6, DEFER_MSGSPB18b7, DEFER_MSGSPB19b0, DEFER_MSGSPB19b1, DEFER_MSGSPB19b4, DEFER_MSGSPB19b5, DEFER_MSGSPB19b6, DEFER_MSGSPB28b0, DEFER_MSGSPB28b1, DEFER_MSGSPB28b2, DEFER_MSGSPB28b3, DEFER_MSGSPB28b4, DEFER_MSGSPB28b5, DEFER_MSGSPB28b6, DEFER_MSGSPB28b7, event::event_buf, get_error_type(), I_BYTE12, I_BYTE13, I_BYTE16, I_BYTE17, I_BYTE18, I_BYTE19, I_BYTE28, MSG_UNKNOWN_V3, MSGCPUALLZERO, MSGCPUB12b0, MSGCPUB12b1, MSGCPUB12b2, MSGCPUB12b3, MSGCPUB12b4, MSGCPUB12b5, MSGCPUB12b6, MSGCPUB12b7, MSGIOALLZERO, MSGIOB12b0, MSGIOB12b1, MSGIOB12b2, MSGIOB12b3, MSGIOB12b4, MSGIOB12b5, MSGIOB12b5B13b3, MSGIOB12b6, MSGIOB12b6B13b3, MSGIOB12b7, MSGIOB12b7B13b3, MSGIOB13b3, MSGIOB13b4, MSGIOB13b5, MSGIOB13b6, MSGIOB13b7, MSGMEMALLZERO, MSGMEMB12b0, MSGMEMB12b1, MSGMEMB12b2, MSGMEMB12b3, MSGMEMB12b4, MSGMEMB12b5, MSGMEMB12b6, MSGMEMB12b7, MSGMEMB13b0, MSGMEMB13b1, MSGMEMB13b2, MSGMEMB13b3, MSGMEMB13b4, MSGMEMB13b6, MSGMEMB13b7, MSGRESERVED, MSGSPALLZERO, MSGSPB16b0, MSGSPB16b1, MSGSPB16b2, MSGSPB16b3, MSGSPB16b4, MSGSPB16b5, MSGSPB16b6, MSGSPB16b7, MSGSPB17b0, MSGSPB17b1, MSGSPB17b2, MSGSPB17b3, MSGSPB17b4, MSGSPB17b5, MSGSPB18b0, MSGSPB18b1, MSGSPB18b2, MSGSPB18b3, MSGSPB18b4, MSGSPB18b6, MSGSPB18b7, MSGSPB19b0, MSGSPB19b1, MSGSPB19b4, MSGSPB19b5, MSGSPB19b6, MSGSPB28b0, MSGSPB28b1, MSGSPB28b2, MSGSPB28b3, MSGSPB28b4, MSGSPB28b5, MSGSPB28b6, MSGSPB28b7, NCPUSYMPTOMS, NIOSYMPTOMS, NMEMSYMPTOMS, NSPSYMPTOMS, and NSPSYMPTOMS_ADDITIONAL.
Referenced by process_v3_logs().
|
static |
get_cpu_frus
Gets the RTAS generated FRUs from a CPU detected error log and arranges the frus to match the awaiting error description. This should be called for CPUB12Bb6 and CPUB12b7 errors.
OUTPUTS: The location code buffer is rearranged if necessary.
RETURNS: RC_INVALID - if invalid or unknown combination of frus RC_PLANAR - if only a planar fru is found RC_PLANAR_CPU - if a planar and a CPU fru are found RC_PLANAR_2CPU -if a planar and 2 CPUs frus are found
References FIRST_LOC, get_loc_code(), is_cpu, is_not_fru, is_planar, event::loc_codes, NEXT_LOC, RC_INVALID, RC_PLANAR, RC_PLANAR_2CPU, and RC_PLANAR_CPU.
Referenced by process_pre_v6().
int get_error_fmt | ( | struct event * | event | ) |
get_error_fmt
References event::event_buf, and I_FORMAT.
Referenced by process_pre_v6().
|
static |
get_error_type
Uses the error format to return the error bits as an unique constant for each error.
References I_BYTE12, I_BYTE13, I_BYTE15, I_BYTE16, I_BYTE17, I_BYTE18, IO_BRIDGE_MASK, and io_error_type.
Referenced by convert_symptom(), and process_pre_v6().
int get_ext_epow | ( | struct event * | event | ) |
get_ext_epow The extended epow data is 2 bytes stored as the MSB of an integer.
References EXT_EPOW_REG_ID, and get_register_data().
Referenced by process_v1_epow().
|
static |
get_loc_code
Gets a physical location codes from the chrp error log. This is called to get either the first location code or the next location code. When called to get the first location code, the number of location codes present in the log is returned. The string of location codes is null terminated. However a special character, ">", means that the location codes that follow should not be reported to the user via diagnostics. Therefore, processing of location codes will stop at the first occurrence of ">" or a null terminator.
RETURNS: If nlocs is not NULL, returns the count of location codes in the buffer. NULL if location code not found. Otherwise a pointer to location code string.
References FIRST_LOC, event::loc_codes, LOC_CODES_OK, and LOC_HIDE_CHAR.
Referenced by get_cpu_frus(), process_pre_v6(), process_refcodes(), report_io_error_frus(), and report_srn().
|
static |
get_refcode
References fru_callout_pre_v6::conf, dbg, fru_callout_pre_v6::fmsg, fru_callout_pre_v6::fname, and event_description_pre_v6::frus.
Referenced by add_more_descrs(), and set_srn_and_callouts().
int* get_register_data | ( | struct event * | event, |
int | rid, | ||
int * | rlen | ||
) |
get_register_data
Look in the product specific area of the CHRP error log for the register data. The format of the vendor specific area is: "IBM" NULL location_code_string NULL register_data where register_data begins on a 4 byte boundary and is (any number of): length (2 bytes, which includes the length) id (2 bytes) and register (length - 4). The register_data is terminated by length = 2, i.e. no id and no data.
RETURNS: NULL if register for id is not found Otherwise an integer pointer to the data portion (not the length or id) of the register data, and rlen is set to the length of the data returned.
References dbg, event::event_buf, and I_IBM.
Referenced by get_ext_epow(), process_pre_v6(), process_v2_epow(), process_v3_logs(), and report_menugoal().
char* get_tod | ( | ) |
Referenced by unknown_epow_ela().
int has_epow_reset | ( | struct event * | event, |
int | error_type | ||
) |
has_epow_reset
Determine if this error (the input) has been reset by an earilier EPOW reset.
RETURNS: 1 if diagnostic conclusion, otherwise 0. unless an error, then -1.
References epow_reset_list, epow_reset::err_id, epow_reset::err_sequence, epow_reset::err_type, MSGMENUG202, epow_reset::next, report_menugoal(), and epow_reset::valid_reset.
Referenced by process_epow(), and process_v3_epow().
void loss_power_MG | ( | struct event * | event | ) |
loss_power_MG
Displays the menu goal used for a Loss of Power EPOW. Used by both V2 and V3 EPOW ELA.
References event::loc_codes, LOC_CODES_OK, MSGMENUG150, MSGMENUG151, and report_menugoal().
Referenced by process_v2_epow(), and process_v3_epow().
int make_refcode_errdscr | ( | struct event * | event, |
struct event_description_pre_v6 * | e_desc, | ||
int * | adderrdscr_called | ||
) |
make_refcode_errdscr
The first time this function is called for a given error log entry, this function will call adderrdscr and save_davars_ela. Subsequent calls to this function for the same error log entry result in add_more_descrs being called.
INPUTS: Pointer to an erro description containing the information to be logged Pointer to an integer flag that allows this function to know whether or not it has already been called for this error log entry.
OUTPUTS: Pointer to an integer flag that allows this function to know whether or not it has already been called for this error log entry.
RETURNS: 0 if the errdscr information was added successfully. -1 if adderrdscr or add_more_descrs failed.
References add_more_descrs(), and set_srn_and_callouts().
Referenced by process_refcodes().
void manual_power_off_MG | ( | struct event * | event | ) |
manual_power_off_MG
Displays the menu goal used for Manual activation of power off button. Used by both V2 and V3 EPOW ELA.
References event::errdata, MSGMENUG162, report_menugoal(), errdata::sequence, and errdata::time_stamp.
Referenced by process_v2_epow(), and process_v3_epow().
int process_epow | ( | struct event * | event, |
int | error_type | ||
) |
process_epow
References EPOWLOG, event::event_buf, has_epow_reset(), process_v1_epow(), process_v2_epow(), and save_epow_reset().
Referenced by process_pre_v6().
int process_pre_v6 | ( | struct event * | event | ) |
process_pre_v6
event | the event to be parsed |
References add_cpu_id(), analyze_io_bus_error(), bypass_errdscr, cpu610, cpu611, cpu612, cpu613, cpu614, cpu615, cpu619, cpu710, cpu711, cpu712, cpu713, cpu714, cpu715, CPUALLZERO, CPUB12b0, CPUB12b1, CPUB12b2, CPUB12b3, CPUB12b4, CPUB12b5, CPUB12b6, CPUB12b7, dbg, event::event_buf, FALSE, FIRST_LOC, fru_callout_pre_v6::floc, event_description_pre_v6::frus, get_cpu_frus(), get_dt_status(), get_error_fmt(), get_error_type(), get_event_date(), get_loc_code(), get_register_data(), I_BYTE24, I_CPU, I_IBM, I_POSTCODE, io630, io631, io632, io633, io634, io639, io730, io731, io732, io733, io734, io735, io736, io770, io771, io772, io773, io832, io_error_type, IOALLZERO, IOB12b0, IOB12b1, IOB12b2, IOB12b3, IOB12b3B13b2, IOB12b4, IOB12b5, IOB12b5B13b1, IOB12b5B13b2, IOB12b6, IOB12b6B13b1, IOB12b6B13b2, IOB12b6B13b3, IOB12b7, IOB12b7B13b1, IOB12b7B13b2, IOB13b4, IOB13b5, IOB13b6, IOB13b7, device_ela::led, event::length, event::loc_codes, LOCSIZE, log_msg(), mem624, mem625, mem626, mem627, mem628, mem629, mem722, mem723, mem724, mem725, MEMALLZERO, MEMB12b0, MEMB12b1, MEMB12b2, MEMB12b3, MEMB12b4, MEMB12b4B13b3, MEMB12b5, MEMB12b6, MEMB12b7, MEMB13b0, MEMB13b1, MEMB13b2, MEMB13b3, MEMB13b4, memtest600, MSGMENUG174, NEXT_LOC, pct_index, post, POSTALLZERO, POSTB12b0, POSTB12b1, POSTB12b2, POSTB12b3, POSTB12b4, POSTB12b5, POSTB12b6, POSTB12b7, POSTB13b0, POSTB13b1, POSTB13b2, POSTB13b3, POSTB13b4, POSTB13b5, POSTB13b7, PREDICT_REPAIR_PENDING, PREDICT_UNRECOV, process_epow(), process_refcodes(), process_v2_sp(), process_v3_logs(), RC_PLANAR, RC_PLANAR_2CPU, RC_PLANAR_CPU, event_description_pre_v6::rcode, report_menugoal(), report_srn(), event_description_pre_v6::rmsg, event::rtas_event, event::rtas_hdr, servicelog_sev(), set_fru_percentages(), set_srn_and_callouts(), event::sl_entry, event_description_pre_v6::sn, SN_V3ELA, sp640, sp641, sp642, sp643, sp644, sp740, sp741, sp742, sp743, sp744, sp745, sp746, sp747, sp748, sp749, sp750, sp751, sp752, sp753, sp760, SPB16b0, SPB16b1, SPB16b2, SPB16b3, SPB16b4, SPB16b5, SPB16b6, SPB16b7, SPB17b0, SPB17b1, SPB17b2, SPB17b3, SPB17b4, SPB17b5, SPB18b0, SPB18b1, SPB18b2, SPB18b3, SPB18b4, SPB18b7, SRC_REG_ID_02, TRUE, and v3_errdscr.
Referenced by handle_rtas_event().
|
static |
References cec_src, clear_edesc_struct(), fru_callout_pre_v6::conf, dbg, DEFER_MSGREFCODE_CUST, FIRST_LOC, fru_callout_pre_v6::floc, fru_callout_pre_v6::fmsg, fru_callout_pre_v6::fname, event_description_pre_v6::frus, get_loc_code(), I_BYTE0, LOCSIZE, make_refcode_errdscr(), MAXFRUS, MAXREFCODES, MSGREFCODE_CUST, NEXT_LOC, event_description_pre_v6::rcode, rctab, rctabloc, REFCODE_FNAME, REFCODE_REASON_CUST, event_description_pre_v6::rmsg, and event_description_pre_v6::sn.
Referenced by process_pre_v6(), and process_v3_logs().
|
static |
process_v1_epow INPUTS: The encoded error type.
RETURNS: 1 if diagnostic conclusion, otherwise 0.
References epow800, epow801, epow810, epow811, epow812, epow820, epow821, get_ext_epow(), IGNORE_SENSOR_MASK, report_srn(), unknown_epow_ela(), XEPOW1n11, XEPOW1n64, XEPOW2n32, XEPOW2n52, XEPOW3n21, and XEPOW3n73.
Referenced by process_epow().
|
static |
process_v2_epow
References epow652810, epow652820, epow802, epow809, epow813, epow814, epow815, epow816, epow817, epow819, epow819red, epow821, epow822, epow823, epow824, EPOWB16b0, EPOWB16b1, EPOWB16b2, EPOWB16b3, EPOWB16b4, EPOWB17b0, EPOWB17b1, EPOWB17b2, EPOWB17b3, get_register_data(), LOC_CODES_OK, loss_power_MG(), manual_power_off_MG(), MSGMENUG175, PCI_EPOW_REG_ID, PCIEPOW001, PCIEPOW010, PCIEPOW011, PCIEPOW100, PCIEPOW111, PCIEPOWMASK, report_menugoal(), report_srn(), sensor_epow(), and unknown_epow_ela().
Referenced by process_epow().
|
static |
process_v2_sp INPUTS: The encoded error type.
References dbg, event::event_buf, I_BYTE19, report_srn(), sp754, and SPLOG.
Referenced by process_pre_v6().
|
static |
References EPOWB16b0, EPOWB16b1, EPOWB16b2, EPOWB16b3, EPOWB16b4, EPOWB17b0, EPOWB17b1, EPOWB17b2, EPOWB17b3, EPOWB17b4, has_epow_reset(), loss_power_MG(), manual_power_off_MG(), MSGEPOW1501B16b4, MSGEPOW1502B16b4, MSGEPOWALLZERO, MSGEPOWB16b1B17b4, MSGEPOWB16b23, MSGEPOWB16b2b3, MSGEPOWB16b2C12, MSGEPOWB16b2C37, MSGEPOWB16b3, MSGEPOWB17b0C12, MSGEPOWB17b0C37, MSGEPOWB17b2C12, MSGEPOWB17b2C37, MSGEPOWB17b2RED, MSGMENUG102, MSGMENUG204, MSGMENUG205, MSGXEPOW3n73, PROCESS_V4_REFCODE, event_description_pre_v6::rcode, report_menugoal(), event_description_pre_v6::rmsg, save_epow_reset(), sensor_epow(), event_description_pre_v6::sn, unknown_epow_ela(), and v3_errdscr.
Referenced by process_v3_logs().
|
static |
process_v3_logs INPUTS: The encoded error type.
References convert_symptom(), get_register_data(), I_BYTE0, I_BYTE1, I_BYTE3, msg(), MSGMENUG171, platform_error, process_refcodes(), process_v3_epow(), event_description_pre_v6::rcode, report_menugoal(), report_srn(), event_description_pre_v6::rmsg, event_description_pre_v6::sn, SN_V3ELA, SRC_REG_ID_04, and v3_errdscr.
Referenced by process_pre_v6().
|
static |
report_io_error_frus
Build error description for i/o detected errors. The number of frus is determined by the number of devices returned in the error log.
References device_ela::busname, device_ela::devfunc, DEVICE_BUS, DEVICE_OK, FIRST_LOC, fru_callout_pre_v6::floc, fru_callout_pre_v6::fname, event_description_pre_v6::frus, get_loc_code(), device_ela::led, LOCSIZE, device_ela::name, NEXT_LOC, event_description_pre_v6::rcode, set_fru_percentages(), set_srn_and_callouts(), device_ela::slot, and device_ela::status.
Referenced by analyze_io_bus_error().
|
static |
report_menugoal The second paramater must always be the menu number (as an uint).
References dbg, event::errdata, get_register_data(), event::loc_codes, LOC_CODES_OK, log_msg(), MAX_MENUGOAL_SIZE, msg(), MSGMENUG_LOC, MSGMENUG_REFC, errdata::sequence, event::sl_entry, and SRC_REG_ID_04.
Referenced by has_epow_reset(), loss_power_MG(), manual_power_off_MG(), process_pre_v6(), process_v2_epow(), process_v3_epow(), process_v3_logs(), sensor_epow(), and unknown_epow_ela().
|
static |
report_srn
References add_more_descrs(), dbg, event_description_pre_v6::dname, FIRST_LOC, event_description_pre_v6::flags, fru_callout_pre_v6::floc, fru_callout_pre_v6::fmsg, event_description_pre_v6::frus, get_loc_code(), device_ela::loc, LOCSIZE, log_msg(), MAXFRUS, NEXT_LOC, event_description_pre_v6::rcode, event_description_pre_v6::rmsg, set_fru_percentages(), set_srn_and_callouts(), event::sl_entry, and event_description_pre_v6::sn.
Referenced by process_pre_v6(), process_v1_epow(), process_v2_epow(), process_v2_sp(), process_v3_logs(), and sensor_epow().
int save_epow_reset | ( | struct event * | event, |
int | error_type | ||
) |
save_epow_reset
If this is Auto ELA, go ahead and search for the original EPOW this one is reseting. If not Auto ELA, save the reset for reference when the original EPOW is processed.
RETURNS: 1 if diagnostic conclusion, otherwise 0, unless an error, then -1.
References epow_reset_list, epow_reset::err_id, epow_reset::err_sequence, epow_reset::err_type, epow_reset::next, and epow_reset::valid_reset.
Referenced by process_epow(), and process_v3_epow().
|
static |
sensor_epow
Analysis EPOW error logs that were detected by a defined sensor. The resulting error description is different depending on the error log version. Supports version 2 and 3.
INPUTS: The encoded error type.
References CRITHI, CRITLO, dbg, event::event_buf, F_EPOW_ONE, F_POW_SEN, F_POWER_SUPPLY, F_THERM_SEN, F_VOLT_SEN_2, FAN, fan_epow, fru_callout_pre_v6::fname, event_description_pre_v6::frus, GS_SUCCESS, I_INDEX, I_STATUS, I_TOKEN, event::loc_codes, LOC_CODES_OK, LOGB16b4, MSGCRIT_FAN, MSGCRIT_FAN_SHUT, MSGCRIT_POWER, MSGCRIT_POWER_SHUT, MSGCRIT_THERM, MSGCRIT_THERM_SHUT, MSGCRIT_UNK, MSGCRIT_UNK_SHUT, MSGCRIT_VOLT, MSGCRIT_VOLT_SHUT, MSGMENUG152, MSGMENUG153, MSGRED_FAN, MSGRED_POWER, MSGRED_UNK, MSGWARN_FAN, NAMESIZE, NORMAL, pow_epow, POWER, event_description_pre_v6::rcode, report_menugoal(), report_srn(), event_description_pre_v6::rmsg, event_description_pre_v6::sn, THERM, therm_epow, unknown_epow, v3_errdscr, VOLT, volt_epow, WARNHI, and WARNLO.
Referenced by process_v2_epow(), and process_v3_epow().
void set_fru_percentages | ( | struct event_description_pre_v6 * | event, |
int | nfrus | ||
) |
set_fru_percentages
Sets the fru percentages (probablity of failure) from the global table that is based on the number of FRUs. Used for unknown events and post errors when want to report the physical location codes from RTAS.
References MAXFRUS, pct_index, percent_table, and PTABLE_SIZE.
Referenced by process_pre_v6(), report_io_error_frus(), and report_srn().
int set_srn_and_callouts | ( | struct event * | event, |
struct event_description_pre_v6 * | ptr, | ||
unsigned | post_error | ||
) |
set_srn_and_callouts Note that the sl_entry struct in event struct (1st parameter) must be allocated before calling this routing.
event | the event on which to operate |
ptr | the description of the event as established by ELA |
post_error | 0 if not a post error; post error code otherwise |
References add_callout(), dbg, diag_get_fru_pn(), event_description_pre_v6::dname, event_description_pre_v6::flags, fru_callout_pre_v6::floc, event_description_pre_v6::frus, get_refcode(), log_msg(), event_description_pre_v6::rcode, event_description_pre_v6::rmsg, event::sl_entry, and event_description_pre_v6::sn.
Referenced by make_refcode_errdscr(), process_pre_v6(), report_io_error_frus(), and report_srn().
|
static |
unknown_epow_ela
Makes a diagnostic conclusion, i.e. menu goal, for an error log that is unknown to ELA for any of the following: - non-product specific Version 1 logs - unknown register debug data in log - (thought to be) reserved bits set in log
INPUTS: the EPOW class
References get_tod(), event::loc_codes, LOC_CODES_OK, MSGMENUG156, MSGMENUG157, MSGMENUG158, MSGMENUG159, MSGMENUG160, MSGMENUG161, and report_menugoal().
Referenced by process_v1_epow(), process_v2_epow(), and process_v3_epow().
|
static |
Referenced by has_epow_reset(), and save_epow_reset().
int io_error_type = 0 |
Referenced by get_error_type(), and process_pre_v6().
char* optarg |
Referenced by main().
int pct_index = 0 |
Referenced by process_pre_v6(), and set_fru_percentages().
int percent_table[2][PTABLE_SIZE+1][PTABLE_SIZE] |
Referenced by set_fru_percentages().
short rctab[MAXREFCODES+1] |
Referenced by process_refcodes().
char rctabloc[MAXREFCODES+1] |
Referenced by process_refcodes().