1 /* SPDX-License-Identifier: GPL-2.0-only */
6 #include <commonlib/bsd/bcd.h>
11 /* This file contains some definitions and helpers for implementing structures
12 * in the UEFI specification, Appendix "Common Platform Error Record". This
13 * is not a complete definition, but contains enough to generate a BERT ACPI
16 * All table numbers and references correspond with UEFI spec version 2.7,
17 * errata A, available at uefi.org.
20 /* Error Record Header, Timestamp field (Table 251) */
21 typedef struct cper_timestamp
{ /* BCD values */
25 u8 precise
; /* b[0] precise - timestamp of error, b[7:1] rsvd */
30 } __packed cper_timestamp_t
;
32 #define CPER_TIMESTAMP_PRECISE BIT(0)
34 /* Section Descriptor, Flags field (Table 253) */
35 #define CPER_SEC_PRIMARY BIT(0)
36 #define CPER_SEC_CONTAINMENT_WARNING BIT(1)
37 #define CPER_SEC_RESET BIT(2)
38 #define CPER_SEC_ERROR_THRESHOLD_EXCEEDED BIT(3)
39 #define CPER_SEC_RESOURCE_NOT_ACCESSIBLE BIT(4)
40 #define CPER_SEC_LATENT_ERROR BIT(5)
41 #define CPER_SEC_PROPAGATED BIT(6)
42 #define CPER_SEC_OVERFLOW BIT(7)
44 /* Section Descriptor, Section Types values (Table 253) */
45 #define CPER_SEC_PROC_GENERIC_GUID \
46 GUID_INIT(0x9876ccad, 0x47b4, 0x4bdb, \
47 0xb6, 0x5e, 0x16, 0xf1, 0x93, 0xc4, 0xf3, 0xdb)
48 #define CPER_SEC_PROC_IA32X64_GUID \
49 GUID_INIT(0xdc3ea0b0, 0xa144, 0x4797, \
50 0xb9, 0x5b, 0x53, 0xfa, 0x24, 0x2b, 0x6e, 0x1d)
51 #define CPER_SEC_PROC_ARM_GUID \
52 GUID_INIT(0xe19e3d16, 0xbc11, 0x11e4, \
53 0x9c, 0xaa, 0xc2, 0x05, 0x1d, 0x5d, 0x46, 0xb0)
54 #define CPER_SEC_PLATFORM_MEM_GUID \
55 GUID_INIT(0xa5bc1114, 0x6f64, 0x4ede, \
56 0xb8, 0x63, 0x3e, 0x83, 0xed, 0x7c, 0x83, 0xb1)
57 #define CPER_SEC_PLATFORM_MEM2_GUID \
58 GUID_INIT(0x61ec04fc, 0x48e6, 0xd813, \
59 0x25, 0xc9, 0x8d, 0xaa, 0x44, 0x75, 0x0b, 0x12)
60 #define CPER_SEC_PCIE_GUID \
61 GUID_INIT(0xd995e954, 0xbbc1, 0x430f, \
62 0xad, 0x91, 0xb4, 0x4d, 0xcb, 0x3c, 0x6f, 0x35)
63 #define CPER_SEC_FW_ERR_REC_REF_GUID \
64 GUID_INIT(0x81212a96, 0x09ed, 0x4996, \
65 0x94, 0x71, 0x8d, 0x72, 0x9c, 0x8e, 0x69, 0xed)
66 #define CPER_SEC_PCI_X_BUS_GUID \
67 GUID_INIT(0xc5753963, 0x3b84, 0x4095, \
68 0xbf, 0x78, 0xed, 0xda, 0xd3, 0xf9, 0xc9, 0xdd)
69 #define CPER_SEC_PCI_DEV_GUID \
70 GUID_INIT(0xeb5e4685, 0xca66, 0x4769, \
71 0xb6, 0xa2, 0x26, 0x06, 0x8b, 0x00, 0x13, 0x26)
72 #define CPER_SEC_DMAR_GENERIC_GUID \
73 GUID_INIT(0x5b51fef7, 0xc79d, 0x4434, \
74 0x8f, 0x1b, 0xaa, 0x62, 0xde, 0x3e, 0x2c, 0x64)
75 #define CPER_SEC_DMAR_VT_GUID \
76 GUID_INIT(0x71761d37, 0x32b2, 0x45cd, \
77 0xa7, 0xd0, 0xb0, 0xfe, 0xdd, 0x93, 0xe8, 0xcf)
78 #define CPER_SEC_DMAR_IOMMU_GUID \
79 GUID_INIT(0x036f84e1, 0x7f37, 0x428c, \
80 0xa7, 0x9e, 0x57, 0x5f, 0xdf, 0xaa, 0x84, 0xec)
83 * Processor Generic Error Section (Table 254)
85 typedef struct cper_proc_generic_error_section
{
95 char cpu_brand_string
[128];
101 } __packed cper_proc_generic_error_section_t
;
103 /* Processor Generic Error Section, Validation Bits field (Table 254) */
104 #define GENPROC_VALID_PROC_TYPE BIT(0)
105 #define GENPROC_VALID_PROC_ISA BIT(1)
106 #define GENPROC_VALID_PROC_ERR_TYPE BIT(2)
107 #define GENPROC_VALID_OPERATION BIT(3)
108 #define GENPROC_VALID_FLAGS BIT(4)
109 #define GENPROC_VALID_LEVEL BIT(5)
110 #define GENPROC_VALID_CPU_VERSION BIT(6)
111 #define GENPROC_VALID_CPU_BRAND BIT(7)
112 #define GENPROC_VALID_CPU_ID BIT(8) /* LAPIC ID, not CPUID */
113 #define GENPROC_VALID_TGT_ADDR BIT(9)
114 #define GENPROC_VALID_REQR_ID BIT(10)
115 #define GENPROC_VALID_RSPR_ID BIT(11)
116 #define GENPROC_VALID_INSTR_IP BIT(12)
118 /* Processor Generic Error Section, Processor Type field (Table 254) */
119 #define GENPROC_PROCTYPE_IA32X64 0x0
120 #define GENPROC_PROCTYPE_IA64 0x1
121 #define GENPROC_PROCTYPE_ARM 0x2
123 /* Processor Generic Error Section, Processor ISA (@time of fail) (Table 254) */
124 #define GENPROC_ISA_IA32 0x0
125 #define GENPROC_ISA_IA64 0x1
126 #define GENPROC_ISA_X64 0x2
127 #define GENPROC_ISA_ARM32 0x3
128 #define GENPROC_ISA_ARM64 0x4
130 /* error_type definitions */
131 /* Processor Generic Error Section, Processor Error Type field (Table 254) */
132 #define GENPROC_ERRTYPE_UNKNOWN 0x0
133 #define GENPROC_ERRTYPE_CACHE 0x1
134 #define GENPROC_ERRTYPE_TLB 0x2
135 #define GENPROC_ERRTYPE_BUS 0x4
136 #define GENPROC_ERRTYPE_UARCH 0x8
138 /* Processor Generic Error Section, Operation field (Table 254) */
139 #define GENPROC_ERROP_UNKNOWN 0x0
140 #define GENPROC_ERROP_READ 0x1
141 #define GENPROC_ERROP_WRITE 0x2
142 #define GENPROC_ERROP_EXECUTION 0x3
144 /* Processor Generic Error Section, Flags field (Table 254) */
145 #define GENPROC_FLAG_RESTARTABLE 0x0
146 #define GENPROC_FLAG_PRECISE_IP 0x1
147 #define GENPROC_FLAG_OVERFLOW 0x2
148 #define GENPROC_FLAG_CORRECTED 0x3
151 * IA32/X64 Processor Error Section (Table 255)
153 typedef struct cper_ia32x64_proc_error_section
{
157 /* PROC_ERR_INFO_NUM x 64-byte structures */
158 /* PROC_CONTEXT_INFO_NUM x context structures */
159 } __packed cper_ia32x64_proc_error_section_t
;
161 /* IA32/X64 Processor Error, Validation Bits field (Table 255) */
162 #define I32X64SEC_VALID_LAPIC BIT(0)
163 #define I32X64SEC_VALID_CPUID BIT(1)
164 #define I32X64SEC_VALID_ERRNUM_SH 2
165 #define I32X64SEC_VALID_ERRNUM_MAX 0x3f
166 #define I32X64SEC_VALID_ERRNUM_MASK \
167 (I32X64SEC_VALID_ERRNUM_MAX \
168 << I32X64SEC_VALID_ERRNUM_SH)
169 #define I32X64SEC_VALID_CTXNUM_SH 8
170 #define I32X64SEC_VALID_CTXNUM_MAX 0x3f
171 #define I32X64SEC_VALID_CTXNUM_MASK \
172 (I32X64SEC_VALID_CTXNUM_MAX \
173 << I32X64SEC_VALID_CTXNUM_SH)
175 /* IA32/X64 Processor Error Information Structure (Table 256) */
176 typedef struct cper_ia32x64_proc_error_info
{
177 guid_t type
; /* cache, tlb, bus, micro-architecture specific */
184 } cper_ia32x64_proc_error_info_t
;
186 /* IA32/X64 Processor Error Information Structs, Err Struct Types (Table 256) */
187 #define X86_PROCESSOR_CACHE_CHK_ERROR_GUID \
188 GUID_INIT(0xa55701f5, 0xe3ef, 0x43de, \
189 0xac, 0x72, 0x24, 0x9b, 0x57, 0x3f, 0xad, 0x2c)
190 #define X86_PROCESSOR_TLB_CHK_ERROR_GUID \
191 GUID_INIT(0xfc06b535, 0x5e1f, 0x4562, \
192 0x9f, 0x25, 0x0a, 0x3b, 0x9a, 0xdb, 0x63, 0xc3)
193 #define X86_PROCESSOR_BUS_CHK_ERROR_GUID \
194 GUID_INIT(0x1cf3f8b3, 0xc5b1, 0x49a2, \
195 0xaa, 0x59, 0x5e, 0xef, 0x92, 0xff, 0xa6, 0x3c)
196 #define X86_PROCESSOR_MS_CHK_ERROR_GUID \
197 GUID_INIT(0x48ab7f57, 0xdc34, 0x4f6c, \
198 0xa7, 0xd3, 0xb0, 0xb5, 0xb0, 0xa7, 0x43, 0x14)
200 enum cper_x86_check_type
{
201 X86_PROCESSOR_CACHE_CHK
, /* X86_PROCESSOR_CACHE_CHK_ERROR_GUID */
202 X86_PROCESSOR_TLB_CHK
, /* X86_PROCESSOR_TLB_CHK_ERROR_GUID */
203 X86_PROCESSOR_BUS_CHK
, /* X86_PROCESSOR_BUS_CHK_ERROR_GUID */
204 X86_PROCESSOR_MS_CHK
/* X86_PROCESSOR_MS_CHK_ERROR_GUID */
206 #define X86_PROCESSOR_CHK_MAX X86_PROCESSOR_MS_CHK
208 /* IA32/X64 Processor Error Information Structure, Validation Bits (Tbl 256) */
209 #define I32X64ERRINFO_VALID_CHECK BIT(0)
210 #define I32X64ERRINFO_VALID_TGT_ADDR BIT(1)
211 #define I32X64ERRINFO_VALID_RQST_ID BIT(2)
212 #define I32X64ERRINFO_VALID_RSPD_ID BIT(3)
213 #define I32X64ERRINFO_VALID_IPPTR BIT(4)
215 /* IA32/X64 Proc. Error Info: Cache/TLB/Check defs (Tables 257, 258, 259) */
216 #define X86_PROC_CHK_XACT_TYPE_VALID BIT(0) /* CACHE|TLB|BUS */
217 #define X86_PROC_CHK_OPERATION_VALID BIT(1) /* CACHE|TLB|BUS */
218 #define X86_PROC_CHK_LEVEL_VALID BIT(2) /* CACHE|TLB|BUS */
219 #define X86_PROC_CHK_CONTEXT_CORPT_VALID BIT(3) /* CACHE|TLB|BUS */
220 #define X86_PROC_CHK_UNCORRECTED_VALID BIT(4) /* CACHE|TLB|BUS */
221 #define X86_PROC_CHK_PRECISE_IP_VALID BIT(5) /* CACHE|TLB|BUS */
222 #define X86_PROC_CHK_RESTARTABLE_VALID BIT(6) /* CACHE|TLB|BUS */
223 #define X86_PROC_CHK_OVERFLOW_VALID BIT(7) /* CACHE|TLB|BUS */
224 #define X86_PROC_CHK_PART_TYPE_VALID BIT(8) /* | |BUS */
225 #define X86_PROC_CHK_TIMEOUT_VALID BIT(9) /* | |BUS */
226 #define X86_PROC_CHK_ADDR_SPACE_VALID BIT(10) /* | |BUS */
227 #define X86_PROC_CHK_XACT_SH 16 /* CA|TLB|BUS */
228 #define X86_PROC_CHK_XACT_MASK (0x3 << X86_PROC_CHK_XACT_SH)
229 #define X86_PROC_CHK_XACT_INSTRUCTION (0 << X86_PROC_CHK_XACT_SH)
230 #define X86_PROC_CHK_XACT_DATA (1 << X86_PROC_CHK_XACT_SH)
231 #define X86_PROC_CHK_XACT_GENERIC (2 << X86_PROC_CHK_XACT_SH)
232 #define X86_PROC_CHK_OPER_SH 18 /* CA|TLB|BUS */
233 #define X86_PROC_CHK_OPER_MASK (0xf << X86_PROC_CHK_OPER_SH)
234 #define X86_PROC_CHK_OPER_GENERIC (0 << X86_PROC_CHK_OPER_SH)
235 #define X86_PROC_CHK_OPER_GENREAD (1 << X86_PROC_CHK_OPER_SH)
236 #define X86_PROC_CHK_OPER_GENWRITE (2 << X86_PROC_CHK_OPER_SH)
237 #define X86_PROC_CHK_OPER_DATAREAD (3 << X86_PROC_CHK_OPER_SH)
238 #define X86_PROC_CHK_OPER_DATAWRITE (4 << X86_PROC_CHK_OPER_SH)
239 #define X86_PROC_CHK_OPER_FETCH (5 << X86_PROC_CHK_OPER_SH)
240 #define X86_PROC_CHK_OPER_PREFETCH (6 << X86_PROC_CHK_OPER_SH)
242 #define X86_PROC_CHK_OPER_EVICTION (7 << X86_PROC_CHK_OPER_SH)
243 #define X86_PROC_CHK_OPER_SNOOP (8 << X86_PROC_CHK_OPER_SH)
244 #define X86_PROC_CHK_LEVEL_SH 22 /* CA|TLB|BUS */
245 #define X86_PROC_CHK_LEVEL_MASK (0x7 << X86_PROC_CHK_LEVEL_SH)
246 #define X86_PROC_CHK_LEVEL_1 (1 << X86_PROC_CHK_LEVEL_SH)
247 #define X86_PROC_CHK_LEVEL_2 (2 << X86_PROC_CHK_LEVEL_SH)
248 #define X86_PROC_CHK_LEVEL_3 (3 << X86_PROC_CHK_LEVEL_SH)
249 #define X86_PROC_CHK_CTX_CORRUPT (1 << 25) /* CA|TLB|BUS */
250 #define X86_PROC_CHK_UNCORRECTED (1 << 26) /* CA|TLB|BUS */
251 #define X86_PROC_CHK_PRECISE_IP (1 << 27) /* CA|TLB|BUS */
252 #define X86_PROC_CHK_RESTARTABLE_IP (1 << 28) /* CA|TLB|BUS */
253 #define X86_PROC_CHK_OVERFLOW (1 << 29) /* CA|TLB|BUS */
254 #define X86_PROC_CHK_PARTIC_SH 30 /* | |BUS */
255 #define X86_PROC_CHK_PARTIC_MASK (3 << X86_PROC_CHK_PARTIC_SH)
256 #define X86_PROC_CHK_ORIGINATED (0 << X86_PROC_CHK_PARTIC_SH)
257 #define X86_PROC_CHK_RESPONDED (1 << X86_PROC_CHK_PARTIC_SH)
258 #define X86_PROC_CHK_OBSERVED (2 << X86_PROC_CHK_PARTIC_SH)
259 #define X86_PROC_CHK_TIMEOUT 0x100000000 /* BIT(32) */
260 #define X86_PROC_CHK_SPACE_SH 33 /* | |BUS */
261 #define X86_PROC_CHK_SPACE_MASK (0x3 << X86_PROC_CHK_SPACE_SH)
262 #define X86_PROC_CHK_SPACE_MEM (0 << X86_PROC_CHK_SPACE_SH)
263 #define X86_PROC_CHK_SPACE_IO (2 << X86_PROC_CHK_SPACE_SH)
264 #define X86_PROC_CHK_SPACE_OTHER (3 << X86_PROC_CHK_SPACE_SH)
265 /* MS check defines & aligns (Table 260 */
266 #define X86_PROC_MS_ERROR_TYPE_VALID BIT(0)
267 #define X86_PROC_MS_CONTEXT_CORPT_VALID BIT(1)
268 #define X86_PROC_MS_UNCORRECTED_VALID BIT(2)
269 #define X86_PROC_MS_PRECISE_IP_VALID BIT(3)
270 #define X86_PROC_MS_RESTARTABLE_IP_VALID BIT(4)
271 #define X86_PROC_MS_OVERFLOW_VALID BIT(5)
272 #define X86_PROC_MS_CHK_XACT_SH 16
273 #define X86_PROC_MS_CHK_XACT_MASK (0x7 << X86_PROC_MS_CHK_XACT_SH)
274 #define X86_PROC_MS_CHK_XACT_TYPE_NOERR (0 << X86_PROC_MS_CHK_XACT_SH)
275 #define X86_PROC_MS_CHK_XACT_TYPE_UNCL (1 << X86_PROC_MS_CHK_XACT_SH)
276 #define X86_PROC_MS_CHK_XACT_TYPE_UCODE_ROM (2 << X86_PROC_MS_CHK_XACT_SH)
277 #define X86_PROC_MS_CHK_XACT_TYPE_EXT (3 << X86_PROC_MS_CHK_XACT_SH)
278 #define X86_PROC_MS_CHK_XACT_TYPE_FRC (4 << X86_PROC_MS_CHK_XACT_SH)
279 #define X86_PROC_MS_CHK_XACT_TYPE_INT_UNCL (5 << X86_PROC_MS_CHK_XACT_SH)
280 #define X86_PROC_MS_CHK_CTX_CORRUPT (1 << 19)
281 #define X86_PROC_MS_CHK_UNCORRECTED (1 << 20)
282 #define X86_PROC_MS_CHK_PRECISE_IP (1 << 21)
283 #define X86_PROC_MS_CHK_RESTARTABLE_IP (1 << 22)
284 #define X86_PROC_MS_CHK_OVERFLOW (1 << 23)
286 /* IA32/X64 Processor Context Information (Table 261) */
287 typedef struct cper_ia32x64_context
{
292 /* N bytes of register array */
293 } cper_ia32x64_context_t
;
295 /* IA32/X64 Processor Context Information, Types field (Table 261) */
296 #define CPER_IA32X64_CTX_UNCL 0
297 #define CPER_IA32X64_CTX_MSR 1
298 #define CPER_IA32X64_CTX_32BIT_EX 2
299 #define CPER_IA32X64_CTX_64BIT_EX 3
300 #define CPER_IA32X64_CTX_FXSAVE 4
301 #define CPER_IA32X64_CTX_32BIT_DBG 5
302 #define CPER_IA32X64_CTX_64BIT_DBG 6
303 #define CPER_IA32X64_CTX_MEMMAPPED 7
305 /* IA32/X64 Processor Context IA32 Register State (Table 262) */
306 typedef struct cper_ia32x64_ctx_ia32state
{
332 } cper_ia32x64_ctx_ia32state_t
;
334 /* IA32/X64 Processor Context X64 Register state (Table 263) */
335 typedef struct cper_ia32x64_ctx_x64state
{
371 } cper_ia32x64_ctx_x64state_t
;
373 /* UEFI Spec 2.10, Appendix N.2.5 Memory Error Types (Table N.31) */
374 #define CPER_UNDEFINED 0
375 #define CPER_ERR_SINGLE_BIT_ECC 2
376 #define CPER_ERR_MULTI_BIT_ECC 3
377 #define CPER_ERR_MEM_PARITY_ERR 8
378 #define CPER_ERR_MEM_SCRUB_CE_ERR 13
379 #define CPER_ERR_MEM_SCRUB_UCE_ERR 14
381 /* UEFI Spec 2.10, Appendix N.2.5 Memory Error Section (Table N.31) */
382 struct cper_memory_section
{
405 #define FW_ERR_RECORD_ID_CRASHLOG_GUID \
406 GUID_INIT(0x8f87f311, 0xc998, 0x4d9e, \
407 0xa0, 0xc4, 0x60, 0x65, 0x51, 0x8c, 0x4f, 0x6d)
409 /* Firmware Error Record Reference, UEFI v2.8 sec N.2.10 */
410 typedef struct cper_fw_err_rec_section
{
416 } cper_fw_err_rec_section_t
;
418 static inline cper_timestamp_t
cper_timestamp(int precise
)
422 struct rtc_time time
;
425 ts
.sec
= bin2bcd(time
.sec
);
426 ts
.min
= bin2bcd(time
.min
);
427 ts
.hour
= bin2bcd(time
.hour
);
428 ts
.day
= bin2bcd(time
.mday
);
429 ts
.month
= bin2bcd(time
.mon
);
430 ts
.year
= bin2bcd(time
.year
% 100);
431 ts
.century
= bin2bcd(time
.year
/ 100);
432 ts
.precise
= precise
;
446 /* Calculate the size of an IA32/X64 context by its type. Some types have a
447 * predetermined size, and others are variable size. All sizes are rounded up
448 * to the nearest multiple of 16 bytes (See Processor Context field of
452 * CPER_IA32X64_CTX_UNCL
453 * CPER_IA32X64_CTX_MSR
454 * CPER_IA32X64_CTX_32BIT_EX
455 * CPER_IA32X64_CTX_64BIT_EX
456 * CPER_IA32X64_CTX_FXSAVE
457 * CPER_IA32X64_CTX_32BIT_DBG
458 * CPER_IA32X64_CTX_64BIT_DBG
459 * CPER_IA32X64_CTX_MEMMAPPED
460 * num is the number of items in the context's register array
462 static inline size_t cper_ia32x64_ctx_sz_bytype(int type
, int arr_num
)
464 size_t sz
= sizeof(cper_ia32x64_context_t
);
467 case CPER_IA32X64_CTX_32BIT_EX
:
468 return ALIGN_UP(sz
+ sizeof(cper_ia32x64_ctx_ia32state_t
), 16);
469 case CPER_IA32X64_CTX_64BIT_EX
:
470 return ALIGN_UP(sz
+ sizeof(cper_ia32x64_ctx_x64state_t
), 16);
471 case CPER_IA32X64_CTX_UNCL
:
472 case CPER_IA32X64_CTX_MSR
:
473 case CPER_IA32X64_CTX_FXSAVE
:
474 case CPER_IA32X64_CTX_32BIT_DBG
:
475 case CPER_IA32X64_CTX_64BIT_DBG
:
476 case CPER_IA32X64_CTX_MEMMAPPED
:
478 /* Table 261: "size ... is determined by (Array Size / 8)" */
479 return ALIGN_UP(sz
+ arr_num
* 8, 16);
483 static inline size_t cper_ia32x64_check_sz(void)
485 return sizeof(cper_ia32x64_proc_error_info_t
); /* all the same size */
488 /* Return PROC_ERR_INFO_NUM for an IA32/X64 Processor Error Record */
489 static inline int cper_ia32x64_proc_num_chks(
490 cper_ia32x64_proc_error_section_t
*x86err
)
495 mask
= I32X64SEC_VALID_ERRNUM_MASK
;
496 shift
= I32X64SEC_VALID_ERRNUM_SH
;
498 return (x86err
->validation
& mask
) >> shift
;
501 /* Return PROC_CONTEXT_INFO_NUM for an IA32/X64 Processor Error Record */
502 static inline int cper_ia32x64_proc_num_ctxs(
503 cper_ia32x64_proc_error_section_t
*x86err
)
508 mask
= I32X64SEC_VALID_CTXNUM_MASK
;
509 shift
= I32X64SEC_VALID_CTXNUM_SH
;
511 return (x86err
->validation
& mask
) >> shift
;
514 /* Do PROC_ERR_INFO_NUM++ of an IA32/X64 error section. Caller should ensure
515 * the max is not being exceeded.
517 static inline void cper_bump_ia32x64_chk_count(
518 cper_ia32x64_proc_error_section_t
*x86err
)
522 count
= cper_ia32x64_proc_num_chks(x86err
) + 1;
523 x86err
->validation
&= ~I32X64SEC_VALID_ERRNUM_MASK
;
524 x86err
->validation
|= count
<< I32X64SEC_VALID_ERRNUM_SH
;
527 /* Do PROC_CONTEXT_INFO_NUM++ of an IA32/X64 error section. Caller should
528 * ensure the max is not being exceeded.
530 static inline void cper_bump_ia32x64_ctx_count(
531 cper_ia32x64_proc_error_section_t
*x86err
)
535 count
= cper_ia32x64_proc_num_ctxs(x86err
) + 1;
536 x86err
->validation
&= ~I32X64SEC_VALID_CTXNUM_MASK
;
537 x86err
->validation
|= count
<< I32X64SEC_VALID_CTXNUM_SH
;
540 #endif /* _CPER_H_ */