diff options
| author | Huang Ying <ying.huang@intel.com> | 2010-05-18 02:35:19 -0400 |
|---|---|---|
| committer | Len Brown <len.brown@intel.com> | 2010-05-19 22:41:05 -0400 |
| commit | 06d65deade9aabba58e0518df86dcd324e86b832 (patch) | |
| tree | 48214d97e8dc8f8b02f925e98293d041d5353f69 /include/linux | |
| parent | fab1c23242528771a955c475ef23d99156a71a7f (diff) | |
ACPI, APEI, UEFI Common Platform Error Record (CPER) header
CPER stands for Common Platform Error Record, it is the hardware error
record format used to describe platform hardware error by various APEI
tables, such as ERST, BERT and HEST etc.
For more information about CPER, please refer to Appendix N of UEFI
Specification version 2.3.
This patch mainly includes the data structure difinition header file
used by other files.
Signed-off-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/cper.h | 314 |
1 files changed, 314 insertions, 0 deletions
diff --git a/include/linux/cper.h b/include/linux/cper.h new file mode 100644 index 000000000000..4b38f905b705 --- /dev/null +++ b/include/linux/cper.h | |||
| @@ -0,0 +1,314 @@ | |||
| 1 | /* | ||
| 2 | * UEFI Common Platform Error Record | ||
| 3 | * | ||
| 4 | * Copyright (C) 2010, Intel Corp. | ||
| 5 | * Author: Huang Ying <ying.huang@intel.com> | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or | ||
| 8 | * modify it under the terms of the GNU General Public License version | ||
| 9 | * 2 as published by the Free Software Foundation. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 19 | */ | ||
| 20 | |||
| 21 | #ifndef LINUX_CPER_H | ||
| 22 | #define LINUX_CPER_H | ||
| 23 | |||
| 24 | #include <linux/uuid.h> | ||
| 25 | |||
| 26 | /* CPER record signature and the size */ | ||
| 27 | #define CPER_SIG_RECORD "CPER" | ||
| 28 | #define CPER_SIG_SIZE 4 | ||
| 29 | /* Used in signature_end field in struct cper_record_header */ | ||
| 30 | #define CPER_SIG_END 0xffffffff | ||
| 31 | |||
| 32 | /* | ||
| 33 | * CPER record header revision, used in revision field in struct | ||
| 34 | * cper_record_header | ||
| 35 | */ | ||
| 36 | #define CPER_RECORD_REV 0x0100 | ||
| 37 | |||
| 38 | /* | ||
| 39 | * Severity difinition for error_severity in struct cper_record_header | ||
| 40 | * and section_severity in struct cper_section_descriptor | ||
| 41 | */ | ||
| 42 | #define CPER_SER_RECOVERABLE 0x0 | ||
| 43 | #define CPER_SER_FATAL 0x1 | ||
| 44 | #define CPER_SER_CORRECTED 0x2 | ||
| 45 | #define CPER_SER_INFORMATIONAL 0x3 | ||
| 46 | |||
| 47 | /* | ||
| 48 | * Validation bits difinition for validation_bits in struct | ||
| 49 | * cper_record_header. If set, corresponding fields in struct | ||
| 50 | * cper_record_header contain valid information. | ||
| 51 | * | ||
| 52 | * corresponds platform_id | ||
| 53 | */ | ||
| 54 | #define CPER_VALID_PLATFORM_ID 0x0001 | ||
| 55 | /* corresponds timestamp */ | ||
| 56 | #define CPER_VALID_TIMESTAMP 0x0002 | ||
| 57 | /* corresponds partition_id */ | ||
| 58 | #define CPER_VALID_PARTITION_ID 0x0004 | ||
| 59 | |||
| 60 | /* | ||
| 61 | * Notification type used to generate error record, used in | ||
| 62 | * notification_type in struct cper_record_header | ||
| 63 | * | ||
| 64 | * Corrected Machine Check | ||
| 65 | */ | ||
| 66 | #define CPER_NOTIFY_CMC \ | ||
| 67 | UUID_LE(0x2DCE8BB1, 0xBDD7, 0x450e, 0xB9, 0xAD, 0x9C, 0xF4, \ | ||
| 68 | 0xEB, 0xD4, 0xF8, 0x90) | ||
| 69 | /* Corrected Platform Error */ | ||
| 70 | #define CPER_NOTIFY_CPE \ | ||
| 71 | UUID_LE(0x4E292F96, 0xD843, 0x4a55, 0xA8, 0xC2, 0xD4, 0x81, \ | ||
| 72 | 0xF2, 0x7E, 0xBE, 0xEE) | ||
| 73 | /* Machine Check Exception */ | ||
| 74 | #define CPER_NOTIFY_MCE \ | ||
| 75 | UUID_LE(0xE8F56FFE, 0x919C, 0x4cc5, 0xBA, 0x88, 0x65, 0xAB, \ | ||
| 76 | 0xE1, 0x49, 0x13, 0xBB) | ||
| 77 | /* PCI Express Error */ | ||
| 78 | #define CPER_NOTIFY_PCIE \ | ||
| 79 | UUID_LE(0xCF93C01F, 0x1A16, 0x4dfc, 0xB8, 0xBC, 0x9C, 0x4D, \ | ||
| 80 | 0xAF, 0x67, 0xC1, 0x04) | ||
| 81 | /* INIT Record (for IPF) */ | ||
| 82 | #define CPER_NOTIFY_INIT \ | ||
| 83 | UUID_LE(0xCC5263E8, 0x9308, 0x454a, 0x89, 0xD0, 0x34, 0x0B, \ | ||
| 84 | 0xD3, 0x9B, 0xC9, 0x8E) | ||
| 85 | /* Non-Maskable Interrupt */ | ||
| 86 | #define CPER_NOTIFY_NMI \ | ||
| 87 | UUID_LE(0x5BAD89FF, 0xB7E6, 0x42c9, 0x81, 0x4A, 0xCF, 0x24, \ | ||
| 88 | 0x85, 0xD6, 0xE9, 0x8A) | ||
| 89 | /* BOOT Error Record */ | ||
| 90 | #define CPER_NOTIFY_BOOT \ | ||
| 91 | UUID_LE(0x3D61A466, 0xAB40, 0x409a, 0xA6, 0x98, 0xF3, 0x62, \ | ||
| 92 | 0xD4, 0x64, 0xB3, 0x8F) | ||
| 93 | /* DMA Remapping Error */ | ||
| 94 | #define CPER_NOTIFY_DMAR \ | ||
| 95 | UUID_LE(0x667DD791, 0xC6B3, 0x4c27, 0x8A, 0x6B, 0x0F, 0x8E, \ | ||
| 96 | 0x72, 0x2D, 0xEB, 0x41) | ||
| 97 | |||
| 98 | /* | ||
| 99 | * Flags bits definitions for flags in struct cper_record_header | ||
| 100 | * If set, the error has been recovered | ||
| 101 | */ | ||
| 102 | #define CPER_HW_ERROR_FLAGS_RECOVERED 0x1 | ||
| 103 | /* If set, the error is for previous boot */ | ||
| 104 | #define CPER_HW_ERROR_FLAGS_PREVERR 0x2 | ||
| 105 | /* If set, the error is injected for testing */ | ||
| 106 | #define CPER_HW_ERROR_FLAGS_SIMULATED 0x4 | ||
| 107 | |||
| 108 | /* | ||
| 109 | * CPER section header revision, used in revision field in struct | ||
| 110 | * cper_section_descriptor | ||
| 111 | */ | ||
| 112 | #define CPER_SEC_REV 0x0100 | ||
| 113 | |||
| 114 | /* | ||
| 115 | * Validation bits difinition for validation_bits in struct | ||
| 116 | * cper_section_descriptor. If set, corresponding fields in struct | ||
| 117 | * cper_section_descriptor contain valid information. | ||
| 118 | * | ||
| 119 | * corresponds fru_id | ||
| 120 | */ | ||
| 121 | #define CPER_SEC_VALID_FRU_ID 0x1 | ||
| 122 | /* corresponds fru_text */ | ||
| 123 | #define CPER_SEC_VALID_FRU_TEXT 0x2 | ||
| 124 | |||
| 125 | /* | ||
| 126 | * Flags bits definitions for flags in struct cper_section_descriptor | ||
| 127 | * | ||
| 128 | * If set, the section is associated with the error condition | ||
| 129 | * directly, and should be focused on | ||
| 130 | */ | ||
| 131 | #define CPER_SEC_PRIMARY 0x0001 | ||
| 132 | /* | ||
| 133 | * If set, the error was not contained within the processor or memory | ||
| 134 | * hierarchy and the error may have propagated to persistent storage | ||
| 135 | * or network | ||
| 136 | */ | ||
| 137 | #define CPER_SEC_CONTAINMENT_WARNING 0x0002 | ||
| 138 | /* If set, the component must be re-initialized or re-enabled prior to use */ | ||
| 139 | #define CPER_SEC_RESET 0x0004 | ||
| 140 | /* If set, Linux may choose to discontinue use of the resource */ | ||
| 141 | #define CPER_SEC_ERROR_THRESHOLD_EXCEEDED 0x0008 | ||
| 142 | /* | ||
| 143 | * If set, resource could not be queried for error information due to | ||
| 144 | * conflicts with other system software or resources. Some fields of | ||
| 145 | * the section will be invalid | ||
| 146 | */ | ||
| 147 | #define CPER_SEC_RESOURCE_NOT_ACCESSIBLE 0x0010 | ||
| 148 | /* | ||
| 149 | * If set, action has been taken to ensure error containment (such as | ||
| 150 | * poisoning data), but the error has not been fully corrected and the | ||
| 151 | * data has not been consumed. Linux may choose to take further | ||
| 152 | * corrective action before the data is consumed | ||
| 153 | */ | ||
| 154 | #define CPER_SEC_LATENT_ERROR 0x0020 | ||
| 155 | |||
| 156 | /* | ||
| 157 | * Section type definitions, used in section_type field in struct | ||
| 158 | * cper_section_descriptor | ||
| 159 | * | ||
| 160 | * Processor Generic | ||
| 161 | */ | ||
| 162 | #define CPER_SEC_PROC_GENERIC \ | ||
| 163 | UUID_LE(0x9876CCAD, 0x47B4, 0x4bdb, 0xB6, 0x5E, 0x16, 0xF1, \ | ||
| 164 | 0x93, 0xC4, 0xF3, 0xDB) | ||
| 165 | /* Processor Specific: X86/X86_64 */ | ||
| 166 | #define CPER_SEC_PROC_IA \ | ||
| 167 | UUID_LE(0xDC3EA0B0, 0xA144, 0x4797, 0xB9, 0x5B, 0x53, 0xFA, \ | ||
| 168 | 0x24, 0x2B, 0x6E, 0x1D) | ||
| 169 | /* Processor Specific: IA64 */ | ||
| 170 | #define CPER_SEC_PROC_IPF \ | ||
| 171 | UUID_LE(0xE429FAF1, 0x3CB7, 0x11D4, 0x0B, 0xCA, 0x07, 0x00, \ | ||
| 172 | 0x80, 0xC7, 0x3C, 0x88, 0x81) | ||
| 173 | /* Platform Memory */ | ||
| 174 | #define CPER_SEC_PLATFORM_MEM \ | ||
| 175 | UUID_LE(0xA5BC1114, 0x6F64, 0x4EDE, 0xB8, 0x63, 0x3E, 0x83, \ | ||
| 176 | 0xED, 0x7C, 0x83, 0xB1) | ||
| 177 | #define CPER_SEC_PCIE \ | ||
| 178 | UUID_LE(0xD995E954, 0xBBC1, 0x430F, 0xAD, 0x91, 0xB4, 0x4D, \ | ||
| 179 | 0xCB, 0x3C, 0x6F, 0x35) | ||
| 180 | /* Firmware Error Record Reference */ | ||
| 181 | #define CPER_SEC_FW_ERR_REC_REF \ | ||
| 182 | UUID_LE(0x81212A96, 0x09ED, 0x4996, 0x94, 0x71, 0x8D, 0x72, \ | ||
| 183 | 0x9C, 0x8E, 0x69, 0xED) | ||
| 184 | /* PCI/PCI-X Bus */ | ||
| 185 | #define CPER_SEC_PCI_X_BUS \ | ||
| 186 | UUID_LE(0xC5753963, 0x3B84, 0x4095, 0xBF, 0x78, 0xED, 0xDA, \ | ||
| 187 | 0xD3, 0xF9, 0xC9, 0xDD) | ||
| 188 | /* PCI Component/Device */ | ||
| 189 | #define CPER_SEC_PCI_DEV \ | ||
| 190 | UUID_LE(0xEB5E4685, 0xCA66, 0x4769, 0xB6, 0xA2, 0x26, 0x06, \ | ||
| 191 | 0x8B, 0x00, 0x13, 0x26) | ||
| 192 | #define CPER_SEC_DMAR_GENERIC \ | ||
| 193 | UUID_LE(0x5B51FEF7, 0xC79D, 0x4434, 0x8F, 0x1B, 0xAA, 0x62, \ | ||
