Lines Matching +full:pcie +full:- +full:mirror

1 // SPDX-License-Identifier: GPL-2.0
32 * multiple boot may co-exist in ERST.
73 * cper_print_bits - print strings for set bits
103 len += scnprintf(buf+len, sizeof(buf)-len, ", %s", str); in cper_print_bits()
127 "micro-architectural error",
147 if (proc->validation_bits & CPER_PROC_VALID_TYPE) in cper_print_proc_generic()
148 printk("%s""processor_type: %d, %s\n", pfx, proc->proc_type, in cper_print_proc_generic()
149 proc->proc_type < ARRAY_SIZE(proc_type_strs) ? in cper_print_proc_generic()
150 proc_type_strs[proc->proc_type] : "unknown"); in cper_print_proc_generic()
151 if (proc->validation_bits & CPER_PROC_VALID_ISA) in cper_print_proc_generic()
152 printk("%s""processor_isa: %d, %s\n", pfx, proc->proc_isa, in cper_print_proc_generic()
153 proc->proc_isa < ARRAY_SIZE(proc_isa_strs) ? in cper_print_proc_generic()
154 proc_isa_strs[proc->proc_isa] : "unknown"); in cper_print_proc_generic()
155 if (proc->validation_bits & CPER_PROC_VALID_ERROR_TYPE) { in cper_print_proc_generic()
156 printk("%s""error_type: 0x%02x\n", pfx, proc->proc_error_type); in cper_print_proc_generic()
157 cper_print_bits(pfx, proc->proc_error_type, in cper_print_proc_generic()
161 if (proc->validation_bits & CPER_PROC_VALID_OPERATION) in cper_print_proc_generic()
162 printk("%s""operation: %d, %s\n", pfx, proc->operation, in cper_print_proc_generic()
163 proc->operation < ARRAY_SIZE(proc_op_strs) ? in cper_print_proc_generic()
164 proc_op_strs[proc->operation] : "unknown"); in cper_print_proc_generic()
165 if (proc->validation_bits & CPER_PROC_VALID_FLAGS) { in cper_print_proc_generic()
166 printk("%s""flags: 0x%02x\n", pfx, proc->flags); in cper_print_proc_generic()
167 cper_print_bits(pfx, proc->flags, proc_flag_strs, in cper_print_proc_generic()
170 if (proc->validation_bits & CPER_PROC_VALID_LEVEL) in cper_print_proc_generic()
171 printk("%s""level: %d\n", pfx, proc->level); in cper_print_proc_generic()
172 if (proc->validation_bits & CPER_PROC_VALID_VERSION) in cper_print_proc_generic()
173 printk("%s""version_info: 0x%016llx\n", pfx, proc->cpu_version); in cper_print_proc_generic()
174 if (proc->validation_bits & CPER_PROC_VALID_ID) in cper_print_proc_generic()
175 printk("%s""processor_id: 0x%016llx\n", pfx, proc->proc_id); in cper_print_proc_generic()
176 if (proc->validation_bits & CPER_PROC_VALID_TARGET_ADDRESS) in cper_print_proc_generic()
178 pfx, proc->target_addr); in cper_print_proc_generic()
179 if (proc->validation_bits & CPER_PROC_VALID_REQUESTOR_ID) in cper_print_proc_generic()
181 pfx, proc->requestor_id); in cper_print_proc_generic()
182 if (proc->validation_bits & CPER_PROC_VALID_RESPONDER_ID) in cper_print_proc_generic()
184 pfx, proc->responder_id); in cper_print_proc_generic()
185 if (proc->validation_bits & CPER_PROC_VALID_IP) in cper_print_proc_generic()
186 printk("%s""IP: 0x%016llx\n", pfx, proc->ip); in cper_print_proc_generic()
192 "single-bit ECC",
193 "multi-bit ECC",
194 "single-symbol chipkill ECC",
195 "multi-symbol chipkill ECC",
201 "mirror Broken",
205 "physical memory map-out event",
226 case 17: return "Virtual address not found on IO-TLB or IO-PDIR"; in cper_mem_err_status_str()
231 case 22: return "Bus parity error - must also set the A, C, or D Bits"; in cper_mem_err_status_str()
250 if (mem->validation_bits & CPER_MEM_VALID_NODE) in cper_mem_err_location()
251 n += scnprintf(msg + n, len - n, "node:%d ", mem->node); in cper_mem_err_location()
252 if (mem->validation_bits & CPER_MEM_VALID_CARD) in cper_mem_err_location()
253 n += scnprintf(msg + n, len - n, "card:%d ", mem->card); in cper_mem_err_location()
254 if (mem->validation_bits & CPER_MEM_VALID_MODULE) in cper_mem_err_location()
255 n += scnprintf(msg + n, len - n, "module:%d ", mem->module); in cper_mem_err_location()
256 if (mem->validation_bits & CPER_MEM_VALID_RANK_NUMBER) in cper_mem_err_location()
257 n += scnprintf(msg + n, len - n, "rank:%d ", mem->rank); in cper_mem_err_location()
258 if (mem->validation_bits & CPER_MEM_VALID_BANK) in cper_mem_err_location()
259 n += scnprintf(msg + n, len - n, "bank:%d ", mem->bank); in cper_mem_err_location()
260 if (mem->validation_bits & CPER_MEM_VALID_BANK_GROUP) in cper_mem_err_location()
261 n += scnprintf(msg + n, len - n, "bank_group:%d ", in cper_mem_err_location()
262 mem->bank >> CPER_MEM_BANK_GROUP_SHIFT); in cper_mem_err_location()
263 if (mem->validation_bits & CPER_MEM_VALID_BANK_ADDRESS) in cper_mem_err_location()
264 n += scnprintf(msg + n, len - n, "bank_address:%d ", in cper_mem_err_location()
265 mem->bank & CPER_MEM_BANK_ADDRESS_MASK); in cper_mem_err_location()
266 if (mem->validation_bits & CPER_MEM_VALID_DEVICE) in cper_mem_err_location()
267 n += scnprintf(msg + n, len - n, "device:%d ", mem->device); in cper_mem_err_location()
268 if (mem->validation_bits & (CPER_MEM_VALID_ROW | CPER_MEM_VALID_ROW_EXT)) { in cper_mem_err_location()
269 u32 row = mem->row; in cper_mem_err_location()
271 row |= cper_get_mem_extension(mem->validation_bits, mem->extended); in cper_mem_err_location()
272 n += scnprintf(msg + n, len - n, "row:%d ", row); in cper_mem_err_location()
274 if (mem->validation_bits & CPER_MEM_VALID_COLUMN) in cper_mem_err_location()
275 n += scnprintf(msg + n, len - n, "column:%d ", mem->column); in cper_mem_err_location()
276 if (mem->validation_bits & CPER_MEM_VALID_BIT_POSITION) in cper_mem_err_location()
277 n += scnprintf(msg + n, len - n, "bit_position:%d ", in cper_mem_err_location()
278 mem->bit_pos); in cper_mem_err_location()
279 if (mem->validation_bits & CPER_MEM_VALID_REQUESTOR_ID) in cper_mem_err_location()
280 n += scnprintf(msg + n, len - n, "requestor_id:0x%016llx ", in cper_mem_err_location()
281 mem->requestor_id); in cper_mem_err_location()
282 if (mem->validation_bits & CPER_MEM_VALID_RESPONDER_ID) in cper_mem_err_location()
283 n += scnprintf(msg + n, len - n, "responder_id:0x%016llx ", in cper_mem_err_location()
284 mem->responder_id); in cper_mem_err_location()
285 if (mem->validation_bits & CPER_MEM_VALID_TARGET_ID) in cper_mem_err_location()
286 n += scnprintf(msg + n, len - n, "target_id:0x%016llx ", in cper_mem_err_location()
287 mem->target_id); in cper_mem_err_location()
288 if (mem->validation_bits & CPER_MEM_VALID_CHIP_ID) in cper_mem_err_location()
289 n += scnprintf(msg + n, len - n, "chip_id:%d ", in cper_mem_err_location()
290 mem->extended >> CPER_MEM_CHIP_ID_SHIFT); in cper_mem_err_location()
301 if (!msg || !(mem->validation_bits & CPER_MEM_VALID_MODULE_HANDLE)) in cper_dimm_err_location()
305 dmi_memdev_name(mem->mem_dev_handle, &bank, &device); in cper_dimm_err_location()
311 mem->mem_dev_handle); in cper_dimm_err_location()
320 cmem->validation_bits = mem->validation_bits; in cper_mem_err_pack()
321 cmem->node = mem->node; in cper_mem_err_pack()
322 cmem->card = mem->card; in cper_mem_err_pack()
323 cmem->module = mem->module; in cper_mem_err_pack()
324 cmem->bank = mem->bank; in cper_mem_err_pack()
325 cmem->device = mem->device; in cper_mem_err_pack()
326 cmem->row = mem->row; in cper_mem_err_pack()
327 cmem->column = mem->column; in cper_mem_err_pack()
328 cmem->bit_pos = mem->bit_pos; in cper_mem_err_pack()
329 cmem->requestor_id = mem->requestor_id; in cper_mem_err_pack()
330 cmem->responder_id = mem->responder_id; in cper_mem_err_pack()
331 cmem->target_id = mem->target_id; in cper_mem_err_pack()
332 cmem->extended = mem->extended; in cper_mem_err_pack()
333 cmem->rank = mem->rank; in cper_mem_err_pack()
334 cmem->mem_array_handle = mem->mem_array_handle; in cper_mem_err_pack()
335 cmem->mem_dev_handle = mem->mem_dev_handle; in cper_mem_err_pack()
362 (mem->validation_bits & ~(CPER_MEM_VALID_RANK_NUMBER - 1))) { in cper_print_mem()
366 if (mem->validation_bits & CPER_MEM_VALID_ERROR_STATUS) in cper_print_mem()
368 pfx, cper_mem_err_status_str(mem->error_status), in cper_print_mem()
369 mem->error_status); in cper_print_mem()
370 if (mem->validation_bits & CPER_MEM_VALID_PA) in cper_print_mem()
372 pfx, mem->physical_addr); in cper_print_mem()
373 if (mem->validation_bits & CPER_MEM_VALID_PA_MASK) in cper_print_mem()
375 pfx, mem->physical_addr_mask); in cper_print_mem()
379 if (mem->validation_bits & CPER_MEM_VALID_ERROR_TYPE) { in cper_print_mem()
380 u8 etype = mem->error_type; in cper_print_mem()
389 "PCIe end point",
396 "PCIe to PCI/PCI-X bridge",
397 "PCI/PCI-X to PCIe bridge",
402 static void cper_print_pcie(const char *pfx, const struct cper_sec_pcie *pcie, in cper_print_pcie() argument
405 if (pcie->validation_bits & CPER_PCIE_VALID_PORT_TYPE) in cper_print_pcie()
406 printk("%s""port_type: %d, %s\n", pfx, pcie->port_type, in cper_print_pcie()
407 pcie->port_type < ARRAY_SIZE(pcie_port_type_strs) ? in cper_print_pcie()
408 pcie_port_type_strs[pcie->port_type] : "unknown"); in cper_print_pcie()
409 if (pcie->validation_bits & CPER_PCIE_VALID_VERSION) in cper_print_pcie()
411 pcie->version.major, pcie->version.minor); in cper_print_pcie()
412 if (pcie->validation_bits & CPER_PCIE_VALID_COMMAND_STATUS) in cper_print_pcie()
414 pcie->command, pcie->status); in cper_print_pcie()
415 if (pcie->validation_bits & CPER_PCIE_VALID_DEVICE_ID) { in cper_print_pcie()
418 pcie->device_id.segment, pcie->device_id.bus, in cper_print_pcie()
419 pcie->device_id.device, pcie->device_id.function); in cper_print_pcie()
421 pcie->device_id.slot >> CPER_PCIE_SLOT_SHIFT); in cper_print_pcie()
423 pcie->device_id.secondary_bus); in cper_print_pcie()
425 pcie->device_id.vendor_id, pcie->device_id.device_id); in cper_print_pcie()
426 p = pcie->device_id.class_code; in cper_print_pcie()
429 if (pcie->validation_bits & CPER_PCIE_VALID_SERIAL_NUMBER) in cper_print_pcie()
431 pcie->serial_number.lower, pcie->serial_number.upper); in cper_print_pcie()
432 if (pcie->validation_bits & CPER_PCIE_VALID_BRIDGE_CONTROL_STATUS) in cper_print_pcie()
435 pfx, pcie->bridge.secondary_status, pcie->bridge.control); in cper_print_pcie()
438 * Print all valid AER info. Record may be from BERT (boot-time) or GHES (run-time). in cper_print_pcie()
442 if (pcie->validation_bits & CPER_PCIE_VALID_AER_INFO) { in cper_print_pcie()
445 aer = (struct aer_capability_regs *)pcie->aer_info; in cper_print_pcie()
447 pfx, aer->cor_status, aer->cor_mask); in cper_print_pcie()
449 pfx, aer->uncor_status, aer->uncor_mask); in cper_print_pcie()
451 pfx, aer->uncor_severity); in cper_print_pcie()
453 aer->header_log.dw[0], aer->header_log.dw[1], in cper_print_pcie()
454 aer->header_log.dw[2], aer->header_log.dw[3]); in cper_print_pcie()
469 u32 offset, length = gdata->error_data_length; in cper_print_fw_err()
472 fw_err->record_type < ARRAY_SIZE(fw_err_rec_type_strs) ? in cper_print_fw_err()
473 fw_err_rec_type_strs[fw_err->record_type] : "unknown"); in cper_print_fw_err()
474 printk("%s""Revision: %d\n", pfx, fw_err->revision); in cper_print_fw_err()
477 if (fw_err->revision == 0) { in cper_print_fw_err()
479 fw_err->record_identifier); in cper_print_fw_err()
480 } else if (fw_err->revision == 2) { in cper_print_fw_err()
482 &fw_err->record_identifier_guid); in cper_print_fw_err()
492 if (fw_err->revision == 0) { in cper_print_fw_err()
496 } else if (fw_err->revision == 1) { in cper_print_fw_err()
505 length -= offset; in cper_print_fw_err()
515 if (gdata->validation_bits & ACPI_HEST_GEN_VALID_TIMESTAMP) { in cper_print_tstamp()
516 timestamp = (__u8 *)&(gdata->time_stamp); in cper_print_tstamp()
525 printk("%s%ststamp: %02d%02d-%02d-%02d %02d:%02d:%02d\n", pfx, in cper_print_tstamp()
546 guid_t *sec_type = (guid_t *)gdata->section_type; in cper_estatus_print_section()
553 severity = gdata->error_severity; in cper_estatus_print_section()
556 if (gdata->validation_bits & CPER_SEC_VALID_FRU_ID) in cper_estatus_print_section()
557 printk("%s""fru_id: %pUl\n", pfx, gdata->fru_id); in cper_estatus_print_section()
558 if (gdata->validation_bits & CPER_SEC_VALID_FRU_TEXT) in cper_estatus_print_section()
559 printk("%s""fru_text: %.20s\n", pfx, gdata->fru_text); in cper_estatus_print_section()
574 if (gdata->error_data_length >= sizeof(*proc_err)) in cper_estatus_print_section()
582 if (gdata->error_data_length >= in cper_estatus_print_section()
585 gdata->error_data_length); in cper_estatus_print_section()
589 struct cper_sec_pcie *pcie = acpi_hest_get_payload(gdata); in cper_estatus_print_section() local
591 printk("%s""section_type: PCIe error\n", newpfx); in cper_estatus_print_section()
592 if (gdata->error_data_length >= sizeof(*pcie)) in cper_estatus_print_section()
593 cper_print_pcie(newpfx, pcie, gdata); in cper_estatus_print_section()
601 if (gdata->error_data_length >= sizeof(*arm_err)) in cper_estatus_print_section()
611 if (gdata->error_data_length >= sizeof(*ia_err)) in cper_estatus_print_section()
622 if (gdata->error_data_length >= SZ_16) in cper_estatus_print_section()
630 if (gdata->error_data_length >= sizeof(*prot_err)) in cper_estatus_print_section()
639 gdata->error_data_length); in cper_estatus_print_section()
641 gdata->error_data_length, true); in cper_estatus_print_section()
658 severity = estatus->error_severity; in cper_estatus_print()
675 if (estatus->data_length && in cper_estatus_check_header()
676 estatus->data_length < sizeof(struct acpi_hest_generic_data)) in cper_estatus_check_header()
677 return -EINVAL; in cper_estatus_check_header()
678 if (estatus->raw_data_length && in cper_estatus_check_header()
679 estatus->raw_data_offset < sizeof(*estatus) + estatus->data_length) in cper_estatus_check_header()
680 return -EINVAL; in cper_estatus_check_header()
696 data_len = estatus->data_length; in cper_estatus_check()
700 return -EINVAL; in cper_estatus_check()
704 return -EINVAL; in cper_estatus_check()
706 data_len -= record_size; in cper_estatus_check()
709 return -EINVAL; in cper_estatus_check()