aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/xen/cper.h
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-08-22 09:52:18 +0100
committerKeir Fraser <keir.fraser@citrix.com>2010-08-22 09:52:18 +0100
commit96590ca76049f2679ba72e43bc0bde6e9e537978 (patch)
tree77bd60fffd99e086e569b7faa1793595c2c1a44d /xen/include/xen/cper.h
parent37eb6d05fe1a343ec051f5d59e88b8ee5a450ceb (diff)
downloadxen-96590ca76049f2679ba72e43bc0bde6e9e537978.tar.gz
xen-96590ca76049f2679ba72e43bc0bde6e9e537978.tar.bz2
xen-96590ca76049f2679ba72e43bc0bde6e9e537978.zip
Implement ACPI APEI ERST feature
APEI are ACPI4.0 new features. It consists of ERST, BERT, HEST, and EINJ. ERST is used to save fault error log to a platform persistent storage, so that when reboot os can retrieve the error log and handle it. This patch is used to implement ERST feature to Xen. It consists of 3-level hierarchy: operation level, action level, and instru= ction level. Instruction do basic io; Action done by sequential instructions parsed from ACPI ERST table; Operation done by sequential actions defined by ACPI spec, providing erst_write/ erst_read/ erst_clear interfaces to MCE/ NMI/ PCIe error handling mechanism, etc. Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Diffstat (limited to 'xen/include/xen/cper.h')
-rw-r--r--xen/include/xen/cper.h80
1 files changed, 80 insertions, 0 deletions
diff --git a/xen/include/xen/cper.h b/xen/include/xen/cper.h
new file mode 100644
index 0000000000..86c996b931
--- /dev/null
+++ b/xen/include/xen/cper.h
@@ -0,0 +1,80 @@
+/*
+ * UEFI Common Platform Error Record
+ *
+ * Copyright (C) 2010, Intel Corp.
+ * Author: Huang Ying <ying.huang@intel.com>
+ * Ported by: Liu, Jinsong <jinsong.liu@intel.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License version
+ * 2 as published by the Free Software Foundation.
+ *
+ * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef LINUX_CPER_H
+#define LINUX_CPER_H
+
+#include <xen/types.h>
+
+typedef struct {
+ __u8 b[16];
+} uuid_le;
+
+/* CPER record signature and the size */
+#define CPER_SIG_RECORD "CPER"
+#define CPER_SIG_SIZE 4
+/* Used in signature_end field in struct cper_record_header */
+#define CPER_SIG_END 0xffffffff
+
+/*
+ * All tables and structs must be byte-packed to match CPER
+ * specification, since the tables are provided by the system BIOS
+ */
+#pragma pack(1)
+
+struct cper_record_header {
+ char signature[CPER_SIG_SIZE]; /* must be CPER_SIG_RECORD */
+ __u16 revision; /* must be CPER_RECORD_REV */
+ __u32 signature_end; /* must be CPER_SIG_END */
+ __u16 section_count;
+ __u32 error_severity;
+ __u32 validation_bits;
+ __u32 record_length;
+ __u64 timestamp;
+ uuid_le platform_id;
+ uuid_le partition_id;
+ uuid_le creator_id;
+ uuid_le notification_type;
+ __u64 record_id;
+ __u32 flags;
+ __u64 persistence_information;
+ __u8 reserved[12]; /* must be zero */
+};
+
+struct cper_section_descriptor {
+ __u32 section_offset; /* Offset in bytes of the
+ * section body from the base
+ * of the record header */
+ __u32 section_length;
+ __u16 revision; /* must be CPER_RECORD_REV */
+ __u8 validation_bits;
+ __u8 reserved; /* must be zero */
+ __u32 flags;
+ uuid_le section_type;
+ uuid_le fru_id;
+ __u32 section_severity;
+ __u8 fru_text[20];
+};
+
+/* Reset to default packing */
+#pragma pack()
+
+#endif