• Home
  • Raw
  • Download

Lines Matching +full:pcie +full:- +full:mem

1 // SPDX-License-Identifier: GPL-2.0
31 * multiple boot may co-exist in ERST.
72 * cper_print_bits - print strings for set bits
102 len += scnprintf(buf+len, sizeof(buf)-len, ", %s", str); in cper_print_bits()
126 "micro-architectural error",
146 if (proc->validation_bits & CPER_PROC_VALID_TYPE) in cper_print_proc_generic()
147 printk("%s""processor_type: %d, %s\n", pfx, proc->proc_type, in cper_print_proc_generic()
148 proc->proc_type < ARRAY_SIZE(proc_type_strs) ? in cper_print_proc_generic()
149 proc_type_strs[proc->proc_type] : "unknown"); in cper_print_proc_generic()
150 if (proc->validation_bits & CPER_PROC_VALID_ISA) in cper_print_proc_generic()
151 printk("%s""processor_isa: %d, %s\n", pfx, proc->proc_isa, in cper_print_proc_generic()
152 proc->proc_isa < ARRAY_SIZE(proc_isa_strs) ? in cper_print_proc_generic()
153 proc_isa_strs[proc->proc_isa] : "unknown"); in cper_print_proc_generic()
154 if (proc->validation_bits & CPER_PROC_VALID_ERROR_TYPE) { in cper_print_proc_generic()
155 printk("%s""error_type: 0x%02x\n", pfx, proc->proc_error_type); in cper_print_proc_generic()
156 cper_print_bits(pfx, proc->proc_error_type, in cper_print_proc_generic()
160 if (proc->validation_bits & CPER_PROC_VALID_OPERATION) in cper_print_proc_generic()
161 printk("%s""operation: %d, %s\n", pfx, proc->operation, in cper_print_proc_generic()
162 proc->operation < ARRAY_SIZE(proc_op_strs) ? in cper_print_proc_generic()
163 proc_op_strs[proc->operation] : "unknown"); in cper_print_proc_generic()
164 if (proc->validation_bits & CPER_PROC_VALID_FLAGS) { in cper_print_proc_generic()
165 printk("%s""flags: 0x%02x\n", pfx, proc->flags); in cper_print_proc_generic()
166 cper_print_bits(pfx, proc->flags, proc_flag_strs, in cper_print_proc_generic()
169 if (proc->validation_bits & CPER_PROC_VALID_LEVEL) in cper_print_proc_generic()
170 printk("%s""level: %d\n", pfx, proc->level); in cper_print_proc_generic()
171 if (proc->validation_bits & CPER_PROC_VALID_VERSION) in cper_print_proc_generic()
172 printk("%s""version_info: 0x%016llx\n", pfx, proc->cpu_version); in cper_print_proc_generic()
173 if (proc->validation_bits & CPER_PROC_VALID_ID) in cper_print_proc_generic()
174 printk("%s""processor_id: 0x%016llx\n", pfx, proc->proc_id); in cper_print_proc_generic()
175 if (proc->validation_bits & CPER_PROC_VALID_TARGET_ADDRESS) in cper_print_proc_generic()
177 pfx, proc->target_addr); in cper_print_proc_generic()
178 if (proc->validation_bits & CPER_PROC_VALID_REQUESTOR_ID) in cper_print_proc_generic()
180 pfx, proc->requestor_id); in cper_print_proc_generic()
181 if (proc->validation_bits & CPER_PROC_VALID_RESPONDER_ID) in cper_print_proc_generic()
183 pfx, proc->responder_id); in cper_print_proc_generic()
184 if (proc->validation_bits & CPER_PROC_VALID_IP) in cper_print_proc_generic()
185 printk("%s""IP: 0x%016llx\n", pfx, proc->ip); in cper_print_proc_generic()
191 "single-bit ECC",
192 "multi-bit ECC",
193 "single-symbol chipkill ECC",
194 "multi-symbol chipkill ECC",
204 "physical memory map-out event",
214 static int cper_mem_err_location(struct cper_mem_err_compact *mem, char *msg) in cper_mem_err_location() argument
222 len = CPER_REC_LEN - 1; in cper_mem_err_location()
223 if (mem->validation_bits & CPER_MEM_VALID_NODE) in cper_mem_err_location()
224 n += scnprintf(msg + n, len - n, "node: %d ", mem->node); in cper_mem_err_location()
225 if (mem->validation_bits & CPER_MEM_VALID_CARD) in cper_mem_err_location()
226 n += scnprintf(msg + n, len - n, "card: %d ", mem->card); in cper_mem_err_location()
227 if (mem->validation_bits & CPER_MEM_VALID_MODULE) in cper_mem_err_location()
228 n += scnprintf(msg + n, len - n, "module: %d ", mem->module); in cper_mem_err_location()
229 if (mem->validation_bits & CPER_MEM_VALID_RANK_NUMBER) in cper_mem_err_location()
230 n += scnprintf(msg + n, len - n, "rank: %d ", mem->rank); in cper_mem_err_location()
231 if (mem->validation_bits & CPER_MEM_VALID_BANK) in cper_mem_err_location()
232 n += scnprintf(msg + n, len - n, "bank: %d ", mem->bank); in cper_mem_err_location()
233 if (mem->validation_bits & CPER_MEM_VALID_BANK_GROUP) in cper_mem_err_location()
234 n += scnprintf(msg + n, len - n, "bank_group: %d ", in cper_mem_err_location()
235 mem->bank >> CPER_MEM_BANK_GROUP_SHIFT); in cper_mem_err_location()
236 if (mem->validation_bits & CPER_MEM_VALID_BANK_ADDRESS) in cper_mem_err_location()
237 n += scnprintf(msg + n, len - n, "bank_address: %d ", in cper_mem_err_location()
238 mem->bank & CPER_MEM_BANK_ADDRESS_MASK); in cper_mem_err_location()
239 if (mem->validation_bits & CPER_MEM_VALID_DEVICE) in cper_mem_err_location()
240 n += scnprintf(msg + n, len - n, "device: %d ", mem->device); in cper_mem_err_location()
241 if (mem->validation_bits & (CPER_MEM_VALID_ROW | CPER_MEM_VALID_ROW_EXT)) { in cper_mem_err_location()
242 u32 row = mem->row; in cper_mem_err_location()
244 row |= cper_get_mem_extension(mem->validation_bits, mem->extended); in cper_mem_err_location()
245 n += scnprintf(msg + n, len - n, "row: %d ", row); in cper_mem_err_location()
247 if (mem->validation_bits & CPER_MEM_VALID_COLUMN) in cper_mem_err_location()
248 n += scnprintf(msg + n, len - n, "column: %d ", mem->column); in cper_mem_err_location()
249 if (mem->validation_bits & CPER_MEM_VALID_BIT_POSITION) in cper_mem_err_location()
250 n += scnprintf(msg + n, len - n, "bit_position: %d ", in cper_mem_err_location()
251 mem->bit_pos); in cper_mem_err_location()
252 if (mem->validation_bits & CPER_MEM_VALID_REQUESTOR_ID) in cper_mem_err_location()
253 n += scnprintf(msg + n, len - n, "requestor_id: 0x%016llx ", in cper_mem_err_location()
254 mem->requestor_id); in cper_mem_err_location()
255 if (mem->validation_bits & CPER_MEM_VALID_RESPONDER_ID) in cper_mem_err_location()
256 n += scnprintf(msg + n, len - n, "responder_id: 0x%016llx ", in cper_mem_err_location()
257 mem->responder_id); in cper_mem_err_location()
258 if (mem->validation_bits & CPER_MEM_VALID_TARGET_ID) in cper_mem_err_location()
259 scnprintf(msg + n, len - n, "target_id: 0x%016llx ", in cper_mem_err_location()
260 mem->target_id); in cper_mem_err_location()
261 if (mem->validation_bits & CPER_MEM_VALID_CHIP_ID) in cper_mem_err_location()
262 scnprintf(msg + n, len - n, "chip_id: %d ", in cper_mem_err_location()
263 mem->extended >> CPER_MEM_CHIP_ID_SHIFT); in cper_mem_err_location()
269 static int cper_dimm_err_location(struct cper_mem_err_compact *mem, char *msg) in cper_dimm_err_location() argument
274 if (!msg || !(mem->validation_bits & CPER_MEM_VALID_MODULE_HANDLE)) in cper_dimm_err_location()
278 dmi_memdev_name(mem->mem_dev_handle, &bank, &device); in cper_dimm_err_location()
284 mem->mem_dev_handle); in cper_dimm_err_location()
289 void cper_mem_err_pack(const struct cper_sec_mem_err *mem, in cper_mem_err_pack() argument
292 cmem->validation_bits = mem->validation_bits; in cper_mem_err_pack()
293 cmem->node = mem->node; in cper_mem_err_pack()
294 cmem->card = mem->card; in cper_mem_err_pack()
295 cmem->module = mem->module; in cper_mem_err_pack()
296 cmem->bank = mem->bank; in cper_mem_err_pack()
297 cmem->device = mem->device; in cper_mem_err_pack()
298 cmem->row = mem->row; in cper_mem_err_pack()
299 cmem->column = mem->column; in cper_mem_err_pack()
300 cmem->bit_pos = mem->bit_pos; in cper_mem_err_pack()
301 cmem->requestor_id = mem->requestor_id; in cper_mem_err_pack()
302 cmem->responder_id = mem->responder_id; in cper_mem_err_pack()
303 cmem->target_id = mem->target_id; in cper_mem_err_pack()
304 cmem->extended = mem->extended; in cper_mem_err_pack()
305 cmem->rank = mem->rank; in cper_mem_err_pack()
306 cmem->mem_array_handle = mem->mem_array_handle; in cper_mem_err_pack()
307 cmem->mem_dev_handle = mem->mem_dev_handle; in cper_mem_err_pack()
325 static void cper_print_mem(const char *pfx, const struct cper_sec_mem_err *mem, in cper_print_mem() argument
333 (mem->validation_bits & ~(CPER_MEM_VALID_RANK_NUMBER - 1))) { in cper_print_mem()
337 if (mem->validation_bits & CPER_MEM_VALID_ERROR_STATUS) in cper_print_mem()
338 printk("%s""error_status: 0x%016llx\n", pfx, mem->error_status); in cper_print_mem()
339 if (mem->validation_bits & CPER_MEM_VALID_PA) in cper_print_mem()
341 pfx, mem->physical_addr); in cper_print_mem()
342 if (mem->validation_bits & CPER_MEM_VALID_PA_MASK) in cper_print_mem()
344 pfx, mem->physical_addr_mask); in cper_print_mem()
345 cper_mem_err_pack(mem, &cmem); in cper_print_mem()
348 if (mem->validation_bits & CPER_MEM_VALID_ERROR_TYPE) { in cper_print_mem()
349 u8 etype = mem->error_type; in cper_print_mem()
358 "PCIe end point",
365 "PCIe to PCI/PCI-X bridge",
366 "PCI/PCI-X to PCIe bridge",
371 static void cper_print_pcie(const char *pfx, const struct cper_sec_pcie *pcie, in cper_print_pcie() argument
374 if (pcie->validation_bits & CPER_PCIE_VALID_PORT_TYPE) in cper_print_pcie()
375 printk("%s""port_type: %d, %s\n", pfx, pcie->port_type, in cper_print_pcie()
376 pcie->port_type < ARRAY_SIZE(pcie_port_type_strs) ? in cper_print_pcie()
377 pcie_port_type_strs[pcie->port_type] : "unknown"); in cper_print_pcie()
378 if (pcie->validation_bits & CPER_PCIE_VALID_VERSION) in cper_print_pcie()
380 pcie->version.major, pcie->version.minor); in cper_print_pcie()
381 if (pcie->validation_bits & CPER_PCIE_VALID_COMMAND_STATUS) in cper_print_pcie()
383 pcie->command, pcie->status); in cper_print_pcie()
384 if (pcie->validation_bits & CPER_PCIE_VALID_DEVICE_ID) { in cper_print_pcie()
387 pcie->device_id.segment, pcie->device_id.bus, in cper_print_pcie()
388 pcie->device_id.device, pcie->device_id.function); in cper_print_pcie()
390 pcie->device_id.slot >> CPER_PCIE_SLOT_SHIFT); in cper_print_pcie()
392 pcie->device_id.secondary_bus); in cper_print_pcie()
394 pcie->device_id.vendor_id, pcie->device_id.device_id); in cper_print_pcie()
395 p = pcie->device_id.class_code; in cper_print_pcie()
398 if (pcie->validation_bits & CPER_PCIE_VALID_SERIAL_NUMBER) in cper_print_pcie()
400 pcie->serial_number.lower, pcie->serial_number.upper); in cper_print_pcie()
401 if (pcie->validation_bits & CPER_PCIE_VALID_BRIDGE_CONTROL_STATUS) in cper_print_pcie()
404 pfx, pcie->bridge.secondary_status, pcie->bridge.control); in cper_print_pcie()
407 if ((pcie->validation_bits & CPER_PCIE_VALID_AER_INFO) && in cper_print_pcie()
408 (gdata->error_severity & CPER_SEV_FATAL)) { in cper_print_pcie()
411 aer = (struct aer_capability_regs *)pcie->aer_info; in cper_print_pcie()
413 pfx, aer->uncor_status, aer->uncor_mask); in cper_print_pcie()
415 pfx, aer->uncor_severity); in cper_print_pcie()
417 aer->header_log.dw0, aer->header_log.dw1, in cper_print_pcie()
418 aer->header_log.dw2, aer->header_log.dw3); in cper_print_pcie()
433 u32 offset, length = gdata->error_data_length; in cper_print_fw_err()
436 fw_err->record_type < ARRAY_SIZE(fw_err_rec_type_strs) ? in cper_print_fw_err()
437 fw_err_rec_type_strs[fw_err->record_type] : "unknown"); in cper_print_fw_err()
438 printk("%s""Revision: %d\n", pfx, fw_err->revision); in cper_print_fw_err()
441 if (fw_err->revision == 0) { in cper_print_fw_err()
443 fw_err->record_identifier); in cper_print_fw_err()
444 } else if (fw_err->revision == 2) { in cper_print_fw_err()
446 &fw_err->record_identifier_guid); in cper_print_fw_err()
456 if (fw_err->revision == 0) { in cper_print_fw_err()
460 } else if (fw_err->revision == 1) { in cper_print_fw_err()
469 length -= offset; in cper_print_fw_err()
479 if (gdata->validation_bits & ACPI_HEST_GEN_VALID_TIMESTAMP) { in cper_print_tstamp()
480 timestamp = (__u8 *)&(gdata->time_stamp); in cper_print_tstamp()
489 printk("%s%ststamp: %02d%02d-%02d-%02d %02d:%02d:%02d\n", pfx, in cper_print_tstamp()
499 guid_t *sec_type = (guid_t *)gdata->section_type; in cper_estatus_print_section()
506 severity = gdata->error_severity; in cper_estatus_print_section()
509 if (gdata->validation_bits & CPER_SEC_VALID_FRU_ID) in cper_estatus_print_section()
510 printk("%s""fru_id: %pUl\n", pfx, gdata->fru_id); in cper_estatus_print_section()
511 if (gdata->validation_bits & CPER_SEC_VALID_FRU_TEXT) in cper_estatus_print_section()
512 printk("%s""fru_text: %.20s\n", pfx, gdata->fru_text); in cper_estatus_print_section()
519 if (gdata->error_data_length >= sizeof(*proc_err)) in cper_estatus_print_section()
527 if (gdata->error_data_length >= in cper_estatus_print_section()
530 gdata->error_data_length); in cper_estatus_print_section()
534 struct cper_sec_pcie *pcie = acpi_hest_get_payload(gdata); in cper_estatus_print_section() local
536 printk("%s""section_type: PCIe error\n", newpfx); in cper_estatus_print_section()
537 if (gdata->error_data_length >= sizeof(*pcie)) in cper_estatus_print_section()
538 cper_print_pcie(newpfx, pcie, gdata); in cper_estatus_print_section()
546 if (gdata->error_data_length >= sizeof(*arm_err)) in cper_estatus_print_section()
556 if (gdata->error_data_length >= sizeof(*ia_err)) in cper_estatus_print_section()
567 if (gdata->error_data_length >= SZ_16) in cper_estatus_print_section()
576 gdata->error_data_length); in cper_estatus_print_section()
578 gdata->error_data_length, true); in cper_estatus_print_section()
595 severity = estatus->error_severity; in cper_estatus_print()
612 if (estatus->data_length && in cper_estatus_check_header()
613 estatus->data_length < sizeof(struct acpi_hest_generic_data)) in cper_estatus_check_header()
614 return -EINVAL; in cper_estatus_check_header()
615 if (estatus->raw_data_length && in cper_estatus_check_header()
616 estatus->raw_data_offset < sizeof(*estatus) + estatus->data_length) in cper_estatus_check_header()
617 return -EINVAL; in cper_estatus_check_header()
633 data_len = estatus->data_length; in cper_estatus_check()
637 return -EINVAL; in cper_estatus_check()
641 return -EINVAL; in cper_estatus_check()
643 data_len -= record_size; in cper_estatus_check()
646 return -EINVAL; in cper_estatus_check()