* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <string.h>
#include <stdio.h>
+#include <string.h>
-#include "ras-mce-handler.h"
#include "bitfield.h"
+#include "ras-mce-handler.h"
unsigned int bitfield_msg(char *buf, size_t len, const char * const *bitarray,
unsigned int array_len,
#include <stdio.h>
#include <string.h>
-#include "ras-mce-handler.h"
#include "bitfield.h"
+#include "ras-mce-handler.h"
#define K8_MCE_THRESHOLD_BASE (MCE_EXTENDED_BANK + 1) /* MCE_AMD */
#define K8_MCE_THRESHOLD_TOP (K8_MCE_THRESHOLD_BASE + 6 * 9)
#include <stdio.h>
#include <string.h>
-#include "ras-mce-handler.h"
#include "bitfield.h"
+#include "ras-mce-handler.h"
/* MCA_STATUS REGISTER FOR FAMILY 17H
*********************** Higher 32-bits *****************************
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <string.h>
#include <stdio.h>
+#include <string.h>
-#include "ras-mce-handler.h"
#include "bitfield.h"
+#include "ras-mce-handler.h"
/* See IA32 SDM Vol3B Table 16-24 */
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <string.h>
#include <stdio.h>
+#include <string.h>
-#include "ras-mce-handler.h"
#include "bitfield.h"
+#include "ras-mce-handler.h"
/* See IA32 SDM Vol3B Table 16-20 */
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <string.h>
#include <stdio.h>
+#include <string.h>
-#include "ras-mce-handler.h"
#include "bitfield.h"
+#include "ras-mce-handler.h"
/* Follows Intel IA32 SDM 3b Appendix E.2.1 ++ */
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <string.h>
#include <stdio.h>
+#include <string.h>
-#include "ras-mce-handler.h"
#include "bitfield.h"
+#include "ras-mce-handler.h"
/* See IA32 SDM Vol3B Table 16-20 */
#include <stdio.h>
#include <string.h>
-#include "ras-mce-handler.h"
#include "bitfield.h"
+#include "ras-mce-handler.h"
static char *pcu_1[] = {
[0x0D] = "MCA_LLC_BIST_ACTIVE_TIMEOUT",
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <string.h>
#include <stdio.h>
+#include <string.h>
-#include "ras-mce-handler.h"
#include "bitfield.h"
+#include "ras-mce-handler.h"
/* See IA32 SDM Vol3B Table 16-17 */
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <string.h>
#include <stdio.h>
+#include <string.h>
-#include "ras-mce-handler.h"
#include "bitfield.h"
+#include "ras-mce-handler.h"
static struct field memctrl_mc7[] = {
SBITFIELD(16, "CA Parity error"),
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <string.h>
#include <stdio.h>
+#include <string.h>
-#include "ras-mce-handler.h"
#include "bitfield.h"
+#include "ras-mce-handler.h"
/* See IA32 SDM Vol3B Appendix E.3.2 ff */
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <string.h>
#include <stdio.h>
+#include <string.h>
-#include "ras-mce-handler.h"
#include "bitfield.h"
+#include "ras-mce-handler.h"
/* Decode P4 and P6 family (p6old and Core2) model specific errors */
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <string.h>
#include <stdio.h>
+#include <string.h>
-#include "ras-mce-handler.h"
#include "bitfield.h"
+#include "ras-mce-handler.h"
/* See IA32 SDM Vol3B Table 16.4.1 */
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <string.h>
#include <stdio.h>
+#include <string.h>
-#include "ras-mce-handler.h"
#include "bitfield.h"
+#include "ras-mce-handler.h"
/* See IA32 SDM Vol3B Table 16-27 */
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <string.h>
#include <stdio.h>
+#include <string.h>
-#include "ras-mce-handler.h"
#include "bitfield.h"
+#include "ras-mce-handler.h"
/* See IA32 SDM Vol3B Appendix E.4.1 ff */
#include <errno.h>
#include <fcntl.h>
-#include <string.h>
#include <stdio.h>
-#include <unistd.h>
-#include <sys/types.h>
+#include <string.h>
#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include "bitfield.h"
#include "ras-logger.h"
#include "ras-mce-handler.h"
-#include "bitfield.h"
#define MCE_THERMAL_BANK (MCE_EXTENDED_BANK + 0)
#define MCE_TIMEOUT_BANK (MCE_EXTENDED_BANK + 90)
*
*/
+#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <stdbool.h>
-#include "types.h"
+
+#include "non-standard-ampere.h"
#include "ras-logger.h"
-#include "ras-report.h"
#include "ras-non-standard-handler.h"
-#include "non-standard-ampere.h"
+#include "ras-report.h"
+#include "types.h"
/*Armv8 RAS compicant Error Record(APEI and BMC Reporting) Payload Type 0*/
static const char * const disp_payload0_err_reg_name[] = {
#ifndef __NON_STANDARD_AMPERE_H
#define __NON_STANDARD_AMPERE_H
-#include "ras-events.h"
#include <traceevent/event-parse.h>
+#include "types.h"
+
+struct ras_ns_ev_decoder;
+
#define SOCKET_NUM(x) (((x) >> 14) & 0x3)
#define PAYLOAD_TYPE(x) (((x) >> 6) & 0x3)
#define TYPE(x) ((x) & 0x3f)
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "types.h"
+
+#include "non-standard-hisilicon.h"
#include "ras-logger.h"
-#include "ras-report.h"
#include "ras-non-standard-handler.h"
-#include "non-standard-hisilicon.h"
+#include "ras-report.h"
+#include "types.h"
/* HISI OEM error definitions */
/* HISI OEM format1 error definitions */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "types.h"
+
+#include "non-standard-hisilicon.h"
#include "ras-logger.h"
#include "ras-report.h"
-#include "non-standard-hisilicon.h"
+#include "types.h"
#define HISI_BUF_LEN 2048
#define HISI_PCIE_INFO_BUF_LEN 256
#ifndef __NON_STANDARD_HISILICON_H
#define __NON_STANDARD_HISILICON_H
-#include "ras-non-standard-handler.h"
#include "ras-mc-handler.h"
+#include "ras-non-standard-handler.h"
#define HISI_SNPRINTF mce_snprintf
*
*/
+#include "non-standard-jaguarmicro.h"
+#include "ras-logger.h"
+#include "ras-mce-handler.h"
+#include "ras-non-standard-handler.h"
+#include "ras-report.h"
+#include "types.h"
+
+#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <stdbool.h>
-#include "types.h"
-#include "ras-logger.h"
-#include "ras-report.h"
-#include "ras-non-standard-handler.h"
-#include "non-standard-jaguarmicro.h"
-#include "ras-mce-handler.h"
#define JM_BUF_LEN 256
#define JM_REG_BUF_LEN 2048
#ifndef __NON_STANDARD_JAGUAR_H
#define __NON_STANDARD_JAGUAR_H
-#include "ras-events.h"
#include <traceevent/event-parse.h>
+
+#include "ras-events.h"
#include "ras-mce-handler.h"
#define PAYLOAD_TYPE_0 0x00
*
*/
+#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <stdbool.h>
-#include "types.h"
+
+#include "non-standard-yitian.h"
#include "ras-logger.h"
-#include "ras-report.h"
#include "ras-non-standard-handler.h"
-#include "non-standard-yitian.h"
+#include "ras-report.h"
+#include "types.h"
static const char * const yitian_ddr_payload_err_reg_name[] = {
"Error Type:",
#include "ras-events.h"
#include "traceevent/event-parse.h"
+struct ras_ns_ev_decoder;
+
#define YITIAN_RAS_TYPE_DDR 0x50
struct yitian_payload_header {
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
+
#include <stdio.h>
#include <stdlib.h>
+
#include "queue.h"
#include "ras-logger.h"
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <unistd.h>
#include <traceevent/kbuffer.h>
+#include <unistd.h>
+
+#include "bitfield.h"
#include "ras-aer-handler.h"
-#include "types.h"
#include "ras-logger.h"
-#include "bitfield.h"
#include "ras-report.h"
+#include "types.h"
/* bit field meaning for correctable error */
static const char *aer_cor_errors[32] = {
#ifndef __RAS_AER_HANDLER_H
#define __RAS_AER_HANDLER_H
-#include "ras-events.h"
#include <traceevent/event-parse.h>
+#include "ras-events.h"
+
int ras_aer_event_handler(struct trace_seq *s,
struct tep_record *record,
struct tep_event *event, void *context);
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <unistd.h>
#include <traceevent/kbuffer.h>
+#include <unistd.h>
+
+#include "non-standard-ampere.h"
#include "ras-arm-handler.h"
-#include "types.h"
+#include "ras-cpu-isolation.h"
#include "ras-logger.h"
-#include "ras-report.h"
#include "ras-non-standard-handler.h"
-#include "non-standard-ampere.h"
-#include "ras-cpu-isolation.h"
+#include "ras-report.h"
+#include "types.h"
#define ARM_ERR_VALID_ERROR_COUNT BIT(0)
#define ARM_ERR_VALID_FLAGS BIT(1)
#ifndef __RAS_ARM_HANDLER_H
#define __RAS_ARM_HANDLER_H
-#include "ras-events.h"
#include <traceevent/event-parse.h>
+#include "ras-events.h"
+
/*
* ARM Processor Error Information Structure, According to
* UEFI_2_9 specification chapter N2.4.4.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <fcntl.h>
-#include <errno.h>
#include <unistd.h>
-#include <limits.h>
+
#include <ctype.h>
-#include "ras-logger.h"
+#include <errno.h>
+#include <fcntl.h>
+#include <limits.h>
#include "ras-cpu-isolation.h"
+#include "ras-logger.h"
#define SECOND_OF_MON (30 * 24 * 60 * 60)
#define SECOND_OF_DAY (24 * 60 * 60)
* GNU General Public License for more details.
*/
+#include <endian.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <unistd.h>
#include <traceevent/kbuffer.h>
+#include <unistd.h>
+
#include "ras-cxl-handler.h"
-#include "types.h"
#include "ras-logger.h"
#include "ras-record.h"
#include "ras-report.h"
-#include <endian.h>
+#include "types.h"
/* Common Functions */
static void convert_timestamp(unsigned long long ts, char *ts_ptr, uint16_t size)
#ifndef __RAS_CXL_HANDLER_H
#define __RAS_CXL_HANDLER_H
-#include "ras-events.h"
#include <traceevent/event-parse.h>
+#include "ras-events.h"
+
int ras_cxl_poison_event_handler(struct trace_seq *s,
struct tep_record *record,
struct tep_event *event, void *context);
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <unistd.h>
#include <traceevent/kbuffer.h>
+#include <unistd.h>
+
#include "ras-devlink-handler.h"
-#include "types.h"
#include "ras-logger.h"
#include "ras-report.h"
+#include "types.h"
int ras_net_xmit_timeout_handler(struct trace_seq *s,
struct tep_record *record,
#ifndef __RAS_DEVLINK_HANDLER_H
#define __RAS_DEVLINK_HANDLER_H
-#include "ras-events.h"
#include <traceevent/event-parse.h>
+#include "ras-events.h"
+
int ras_net_xmit_timeout_handler(struct trace_seq *s,
struct tep_record *record,
struct tep_event *event, void *context);
*/
#define _GNU_SOURCE
+#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
-#ifndef __dev_t_defined
-#include <sys/types.h>
-#endif /* __dev_t_defined */
#include <string.h>
-#include <errno.h>
#include <sys/sysmacros.h>
#include <traceevent/kbuffer.h>
+
#include "ras-diskerror-handler.h"
-#include "types.h"
#include "ras-logger.h"
#include "ras-report.h"
+#include "types.h"
+
+#ifndef __dev_t_defined
+#include <sys/types.h>
+#endif /* __dev_t_defined */
static const struct {
int error;
#ifndef __RAS_DISKERROR_HANDLER_H
#define __RAS_DISKERROR_HANDLER_H
-#include "ras-events.h"
#include <traceevent/event-parse.h>
+#include "ras-events.h"
+
int ras_diskerror_event_handler(struct trace_seq *s,
struct tep_record *record,
struct tep_event *event, void *context);
#include "ras-cxl-handler.h"
#include "ras-devlink-handler.h"
#include "ras-diskerror-handler.h"
+#include "ras-events.h"
#include "ras-extlog-handler.h"
#include "ras-logger.h"
#include "ras-mce-handler.h"
#include "ras-memory-failure-handler.h"
#include "ras-non-standard-handler.h"
#include "ras-page-isolation.h"
-#include "ras-events.h"
#include "ras-record.h"
#include "trigger.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <unistd.h>
#include <traceevent/kbuffer.h>
+#include <unistd.h>
#include "ras-extlog-handler.h"
#include "ras-logger.h"
-#include "types.h"
#include "ras-report.h"
+#include "types.h"
static char *err_type(int etype)
{
#define __RAS_EXTLOG_HANDLER_H
#include <stdint.h>
+#include <traceevent/event-parse.h>
#include "ras-events.h"
-#include <traceevent/event-parse.h>
int ras_extlog_mem_event_handler(struct trace_seq *s,
struct tep_record *record,
#include <traceevent/kbuffer.h>
#include <unistd.h>
-#include "ras-mc-handler.h"
#include "ras-logger.h"
+#include "ras-mc-handler.h"
#include "ras-page-isolation.h"
-#include "types.h"
#include "ras-report.h"
#include "trigger.h"
+#include "types.h"
#define MAX_ENV 30
static const char *mc_ce_trigger = NULL;
#ifndef __RAS_MC_HANDLER_H
#define __RAS_MC_HANDLER_H
-#include "ras-events.h"
#include <traceevent/event-parse.h>
+#include "ras-events.h"
+
void mc_event_trigger_setup(void);
int ras_mc_event_handler(struct trace_seq *s,
#include <ctype.h>
#include <errno.h>
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <unistd.h>
-#include <stdint.h>
#include <traceevent/kbuffer.h>
+#include <unistd.h>
-#include "ras-mce-handler.h"
-#include "types.h"
#include "ras-logger.h"
+#include "ras-mce-handler.h"
#include "ras-report.h"
+#include "types.h"
/*
* The code below were adapted from Andi Kleen/Intel/SuSe mcelog code,
#define __RAS_MCE_HANDLER_H
#include <stdint.h>
+#include <traceevent/event-parse.h>
#include "ras-events.h"
-#include <traceevent/event-parse.h>
enum cputype {
CPU_GENERIC,
#include "ras-logger.h"
#include "ras-memory-failure-handler.h"
-#include "types.h"
#include "ras-report.h"
#include "trigger.h"
+#include "types.h"
/* Memory failure - various types of pages */
enum mf_action_page_type {
#ifndef __RAS_MEMORY_FAILURE_HANDLER_H
#define __RAS_MEMORY_FAILURE_HANDLER_H
-#include "ras-events.h"
#include <traceevent/event-parse.h>
+#include "ras-events.h"
+
void mem_fail_event_trigger_setup(void);
int ras_memory_failure_event_handler(struct trace_seq *s,
struct tep_record *record,
* GNU General Public License for more details.
*/
+#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
-#include <stdbool.h>
#include <string.h>
-#include <unistd.h>
#include <traceevent/kbuffer.h>
-#include "ras-non-standard-handler.h"
-#include "types.h"
+#include <unistd.h>
+
#include "ras-logger.h"
+#include "ras-non-standard-handler.h"
#include "ras-report.h"
+#include "types.h"
static struct ras_ns_ev_decoder *ras_ns_ev_dec_list;
#ifndef __RAS_NON_STANDARD_HANDLER_H
#define __RAS_NON_STANDARD_HANDLER_H
+#include <traceevent/event-parse.h>
+
#include "ras-events.h"
#include "ras-record.h"
-#include <traceevent/event-parse.h>
+
+#ifdef HAVE_SQLITE3
+#include <sqlite3.h>
+#endif
struct ras_ns_ev_decoder {
struct ras_ns_ev_decoder *next;
int (*decode)(struct ras_events *ras, struct ras_ns_ev_decoder *ev_decoder,
struct trace_seq *s, struct ras_non_standard_event *event);
#ifdef HAVE_SQLITE3
-#include <sqlite3.h>
sqlite3_stmt *stmt_dec_record;
#endif
};
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
-#include <string.h>
#include <stdlib.h>
+#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
#include <stdbool.h>
#include <time.h>
-#include "types.h"
#include "rbtree.h"
+#include "types.h"
#define PAGE_SHIFT 12
#define PAGE_SIZE BIT(PAGE_SHIFT)
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-/*
- * BuildRequires: sqlite-devel
- */
-
-#include <string.h>
+#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
-#include <unistd.h>
-#include <errno.h>
+#include <string.h>
#include <sys/stat.h>
-#include "ras-events.h"
-#include "ras-record.h"
-#include "ras-mc-handler.h"
+#include <unistd.h>
+
#include "ras-aer-handler.h"
-#include "ras-mce-handler.h"
+#include "ras-events.h"
#include "ras-logger.h"
+#include "ras-mce-handler.h"
+#include "ras-mc-handler.h"
+#include "ras-record.h"
+
+/*
+ * BuildRequires: sqlite-devel
+ */
/* #define DEBUG_SQL 1 */
#ifndef __RAS_RECORD_H
#define __RAS_RECORD_H
-#include <stdint.h>
+#include <sqlite3.h>
#include <stdbool.h>
+#include <stdint.h>
+
#include "config.h"
#include "types.h"
#ifdef HAVE_SQLITE3
-#include <sqlite3.h>
struct sqlite3_priv {
sqlite3 *db;
#include <stdio.h>
#include <string.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/utsname.h>
#include <sys/socket.h>
+#include <sys/types.h>
#include <sys/un.h>
+#include <sys/utsname.h>
+#include <unistd.h>
#include "ras-report.h"
#ifndef __RAS_REPORT_H
#define __RAS_REPORT_H
-#include "types.h"
+#include "ras-aer-handler.h"
#include "ras-events.h"
-#include "ras-record.h"
-#include "ras-mc-handler.h"
#include "ras-mce-handler.h"
-#include "ras-aer-handler.h"
+#include "ras-mc-handler.h"
+#include "ras-record.h"
+#include "types.h"
/* Maximal length of backtrace. */
#define MAX_BACKTRACE_SIZE (1024 * 1024)
#include <string.h>
#include <unistd.h>
-#include "types.h"
-#include "ras-logger.h"
#include "ras-events.h"
+#include "ras-logger.h"
#include "ras-record.h"
+#include "types.h"
/*
* Arguments(argp) handling logic and main
#define _GNU_SOURCE
#include <stdio.h>
-#include <unistd.h>
#include <stdlib.h>
#include <sys/wait.h>
+#include <unistd.h>
+
#include "ras-logger.h"
#include "trigger.h"