Lines Matching refs:aflt

141 static void cpu_scrubphys(struct async_flt *aflt);
145 static void cpu_ereport_init(struct async_flt *aflt);
147 static uint8_t cpu_flt_bit_to_plat_error(struct async_flt *aflt);
154 static int cpu_error_to_resource_type(struct async_flt *aflt);
1188 struct async_flt *aflt; in cpu_check_cpu_logout() local
1214 aflt = (struct async_flt *)&ch_flt; in cpu_check_cpu_logout()
1215 aflt->flt_id = gethrtime_waitfree(); in cpu_check_cpu_logout()
1218 aflt->flt_stat = t_afsr; in cpu_check_cpu_logout()
1219 aflt->flt_addr = t_afar; in cpu_check_cpu_logout()
1220 aflt->flt_bus_id = cpuid; in cpu_check_cpu_logout()
1221 aflt->flt_inst = cpuid; in cpu_check_cpu_logout()
1222 aflt->flt_pc = tpc; in cpu_check_cpu_logout()
1223 aflt->flt_prot = AFLT_PROT_NONE; in cpu_check_cpu_logout()
1224 aflt->flt_class = CPU_FAULT; in cpu_check_cpu_logout()
1225 aflt->flt_priv = ((t_afsr & C_AFSR_PRIV) != 0); in cpu_check_cpu_logout()
1226 aflt->flt_tl = tl; in cpu_check_cpu_logout()
1227 aflt->flt_status = ecc_type; in cpu_check_cpu_logout()
1228 aflt->flt_panic = C_AFSR_PANIC(t_afsr_errs); in cpu_check_cpu_logout()
1238 aflt->flt_panic); in cpu_check_cpu_logout()
1342 struct async_flt *aflt; in cpu_log_fast_ecc_error() local
1382 aflt = (struct async_flt *)&ch_flt; in cpu_log_fast_ecc_error()
1383 aflt->flt_id = gethrtime_waitfree(); in cpu_log_fast_ecc_error()
1386 aflt->flt_stat = t_afsr; in cpu_log_fast_ecc_error()
1387 aflt->flt_addr = t_afar; in cpu_log_fast_ecc_error()
1388 aflt->flt_bus_id = getprocessorid(); in cpu_log_fast_ecc_error()
1389 aflt->flt_inst = CPU->cpu_id; in cpu_log_fast_ecc_error()
1390 aflt->flt_pc = tpc; in cpu_log_fast_ecc_error()
1391 aflt->flt_prot = AFLT_PROT_NONE; in cpu_log_fast_ecc_error()
1392 aflt->flt_class = CPU_FAULT; in cpu_log_fast_ecc_error()
1393 aflt->flt_priv = priv; in cpu_log_fast_ecc_error()
1394 aflt->flt_tl = tl; in cpu_log_fast_ecc_error()
1395 aflt->flt_status = ECC_F_TRAP; in cpu_log_fast_ecc_error()
1396 aflt->flt_panic = C_AFSR_PANIC(t_afsr_errs); in cpu_log_fast_ecc_error()
1420 aflt->flt_panic == 0 && aflt->flt_priv != 0 && in cpu_log_fast_ecc_error()
1424 aflt->flt_panic |= in cpu_log_fast_ecc_error()
1428 aflt->flt_panic |= ((clop == NULL) && in cpu_log_fast_ecc_error()
1432 aflt->flt_panic |= in cpu_log_fast_ecc_error()
1435 aflt->flt_panic |= ((clop == NULL) && in cpu_log_fast_ecc_error()
1450 aflt->flt_panic); in cpu_log_fast_ecc_error()
1476 aflt->flt_panic |= ((ch_flt.afsr_errs & in cpu_log_fast_ecc_error()
1486 if (aflt->flt_panic) in cpu_log_fast_ecc_error()
1631 struct async_flt *aflt; in cpu_disrupting_error() local
1675 aflt = (struct async_flt *)&ch_flt; in cpu_disrupting_error()
1678 aflt->flt_stat = t_afsr; in cpu_disrupting_error()
1679 aflt->flt_addr = t_afar; in cpu_disrupting_error()
1680 aflt->flt_pc = (caddr_t)rp->r_pc; in cpu_disrupting_error()
1681 aflt->flt_priv = (rp->r_tstate & TSTATE_PRIV) ? 1 : 0; in cpu_disrupting_error()
1682 aflt->flt_tl = 0; in cpu_disrupting_error()
1683 aflt->flt_panic = C_AFSR_PANIC(t_afsr_errs); in cpu_disrupting_error()
1691 !aflt->flt_panic) in cpu_disrupting_error()
1720 if (aflt->flt_panic) in cpu_disrupting_error()
1741 struct async_flt *aflt; in cpu_deferred_error() local
1810 aflt = (struct async_flt *)&ch_flt; in cpu_deferred_error()
1811 aflt->flt_id = gethrtime_waitfree(); in cpu_deferred_error()
1812 aflt->flt_bus_id = getprocessorid(); in cpu_deferred_error()
1813 aflt->flt_inst = CPU->cpu_id; in cpu_deferred_error()
1816 aflt->flt_stat = t_afsr; in cpu_deferred_error()
1817 aflt->flt_addr = t_afar; in cpu_deferred_error()
1818 aflt->flt_pc = (caddr_t)rp->r_pc; in cpu_deferred_error()
1819 aflt->flt_prot = AFLT_PROT_NONE; in cpu_deferred_error()
1820 aflt->flt_class = CPU_FAULT; in cpu_deferred_error()
1821 aflt->flt_priv = (rp->r_tstate & TSTATE_PRIV) ? 1 : 0; in cpu_deferred_error()
1822 aflt->flt_tl = (uchar_t)tl; in cpu_deferred_error()
1823 aflt->flt_panic = ((tl != 0) || (aft_testfatal != 0) || in cpu_deferred_error()
1825 aflt->flt_core = (pflag & SDOCORE) ? 1 : 0; in cpu_deferred_error()
1826 aflt->flt_status = ((ttype == T_DATA_ERROR) ? ECC_D_TRAP : ECC_I_TRAP); in cpu_deferred_error()
1834 if (aflt->flt_priv && tl == 0) { in cpu_deferred_error()
1839 aflt->flt_prot = AFLT_PROT_EC; in cpu_deferred_error()
1848 aflt->flt_prot = AFLT_PROT_ACCESS; in cpu_deferred_error()
1865 aflt->flt_prot = AFLT_PROT_COPY; in cpu_deferred_error()
1882 if (!aflt->flt_priv || aflt->flt_prot == AFLT_PROT_COPY) { in cpu_deferred_error()
1886 aflt->flt_panic |= aft_panic; in cpu_deferred_error()
1888 aflt->flt_panic = 1; in cpu_deferred_error()
1902 } else if (!aflt->flt_priv) { in cpu_deferred_error()
1921 aflt->flt_panic); in cpu_deferred_error()
1938 cpu_run_bus_error_handlers(aflt, expected); in cpu_deferred_error()
1953 aflt->flt_panic = 1; in cpu_deferred_error()
1960 if (aflt->flt_panic && cpu_flt_in_memory(&ch_flt, C_AFSR_UE)) { in cpu_deferred_error()
1961 panic_aflt = *aflt; in cpu_deferred_error()
1976 cpu_run_bus_error_handlers(aflt, expected); in cpu_deferred_error()
1991 aflt->flt_panic = 1; in cpu_deferred_error()
1998 if (aflt->flt_panic && cpu_flt_in_memory(&ch_flt, C_AFSR_UE)) { in cpu_deferred_error()
1999 panic_aflt = *aflt; in cpu_deferred_error()
2031 aflt->flt_panic |= ((ch_flt.afsr_errs & in cpu_deferred_error()
2042 if (aflt->flt_panic) in cpu_deferred_error()
2051 if (!aflt->flt_priv || aflt->flt_prot == AFLT_PROT_COPY) { in cpu_deferred_error()
2086 struct async_flt *aflt; in cpu_parity_error() local
2106 aflt = (struct async_flt *)&ch_flt; in cpu_parity_error()
2107 aflt->flt_id = gethrtime_waitfree(); in cpu_parity_error()
2108 aflt->flt_bus_id = getprocessorid(); in cpu_parity_error()
2109 aflt->flt_inst = CPU->cpu_id; in cpu_parity_error()
2110 aflt->flt_pc = tpc; in cpu_parity_error()
2111 aflt->flt_addr = iparity ? (uint64_t)tpc : AFLT_INV_ADDR; in cpu_parity_error()
2112 aflt->flt_prot = AFLT_PROT_NONE; in cpu_parity_error()
2113 aflt->flt_class = CPU_FAULT; in cpu_parity_error()
2114 aflt->flt_priv = (tl || (rp->r_tstate & TSTATE_PRIV)) ? 1 : 0; in cpu_parity_error()
2115 aflt->flt_tl = tl; in cpu_parity_error()
2116 aflt->flt_panic = panic; in cpu_parity_error()
2117 aflt->flt_status = iparity ? ECC_IP_TRAP : ECC_DP_TRAP; in cpu_parity_error()
2128 aflt->flt_payload = FM_EREPORT_PAYLOAD_ICACHE_PE; in cpu_parity_error()
2183 aflt->flt_payload = FM_EREPORT_PAYLOAD_DCACHE_PE; in cpu_parity_error()
2191 aflt->flt_payload = in cpu_parity_error()
2198 sizeof (ch_async_flt_t), ue_queue, aflt->flt_panic); in cpu_parity_error()
2264 if (aflt->flt_panic) in cpu_parity_error()
2288 struct async_flt *aflt = (struct async_flt *)ch_flt; in cpu_async_log_ic_parity_err() local
2296 if (IS_PANTHER(cpunodes[aflt->flt_inst].implementation)) in cpu_async_log_ic_parity_err()
2311 if (IS_PANTHER(cpunodes[aflt->flt_inst].implementation)) in cpu_async_log_ic_parity_err()
2382 struct async_flt *aflt = (struct async_flt *)flt; in cpu_async_log_err() local
2393 if ((aflt->flt_status & ECC_C_TRAP) && in cpu_async_log_err()
2394 (!(aflt->flt_stat & C_AFSR_MASK))) in cpu_async_log_err()
2405 cpu_log_err(aflt); in cpu_async_log_err()
2432 aflt->flt_prot == AFLT_PROT_EC) { in cpu_async_log_err()
2434 if (page_retire_check(aflt->flt_addr, NULL) == 0) { in cpu_async_log_err()
2442 (void *)(uintptr_t)aflt->flt_inst, in cpu_async_log_err()
2472 if (page_retire_check(aflt->flt_addr, &errors) == EINVAL) { in cpu_async_log_err()
2473 CE_XDIAG_SETSKIPCODE(aflt->flt_disp, in cpu_async_log_err()
2477 CE_XDIAG_SETSKIPCODE(aflt->flt_disp, in cpu_async_log_err()
2479 } else if (ce_scrub_xdiag_recirc(aflt, ce_queue, eqep, in cpu_async_log_err()
2493 cpu_log_err(aflt); in cpu_async_log_err()
2507 aflt->flt_prot == AFLT_PROT_EC) { in cpu_async_log_err()
2508 if (page_retire_check(aflt->flt_addr, NULL) == 0) { in cpu_async_log_err()
2510 softcall(ecc_page_zero, (void *)aflt->flt_addr); in cpu_async_log_err()
2519 cpu_log_err(aflt); in cpu_async_log_err()
2540 (void *)aflt, ch_flt->flt_type); in cpu_async_log_err()
2547 if (aflt->flt_addr != AFLT_INV_ADDR && aflt->flt_in_memory) { in cpu_async_log_err()
2556 cpu_clearphys(aflt); in cpu_async_log_err()
2570 struct async_flt *aflt = (struct async_flt *)ch_flt; in cpu_page_retire() local
2571 (void) page_retire(aflt->flt_addr, PR_UE); in cpu_page_retire()
2603 cpu_log_err(struct async_flt *aflt) in cpu_log_err() argument
2607 ch_async_flt_t *ch_flt = (ch_async_flt_t *)aflt; in cpu_log_err()
2609 if (cpu_error_is_ecache_data(aflt->flt_inst, ch_flt->flt_bit)) in cpu_log_err()
2610 aflt->flt_status |= ECC_ECACHE; in cpu_log_err()
2612 aflt->flt_status &= ~ECC_ECACHE; in cpu_log_err()
2616 synd_status = afsr_to_synd_status(aflt->flt_inst, in cpu_log_err()
2622 if (pf_is_memory(aflt->flt_addr >> MMU_PAGESHIFT)) in cpu_log_err()
2629 aflt->flt_synd, ch_flt->flt_bit); in cpu_log_err()
2635 (void) cpu_get_mem_unum_synd(synd_code, aflt, unum); in cpu_log_err()
2650 plat_log_fruid_error(synd_code, aflt, unum, in cpu_log_err()
2654 if (aflt->flt_func != NULL) in cpu_log_err()
2655 aflt->flt_func(aflt, unum); in cpu_log_err()
2670 (void *)(uintptr_t)aflt->flt_inst, in cpu_log_err()
2702 cpu_ce_log_err(struct async_flt *aflt, errorq_elem_t *eqep) in cpu_ce_log_err() argument
2707 switch (aflt->flt_class) { in cpu_ce_log_err()
2709 cpu_ereport_init(aflt); in cpu_ce_log_err()
2710 if (cpu_async_log_err(aflt, eqep)) in cpu_ce_log_err()
2711 cpu_ereport_post(aflt); in cpu_ce_log_err()
2715 if (aflt->flt_func != NULL) { in cpu_ce_log_err()
2716 (void) cpu_get_mem_unum_aflt(AFLT_STAT_VALID, aflt, in cpu_ce_log_err()
2718 aflt->flt_func(aflt, unum); in cpu_ce_log_err()
2723 aflt->flt_class = CPU_FAULT; in cpu_ce_log_err()
2724 cpu_log_err(aflt); in cpu_ce_log_err()
2725 cpu_ereport_post(aflt); in cpu_ce_log_err()
2729 ASSERT(aflt->flt_class != RECIRC_BUS_FAULT); in cpu_ce_log_err()
2733 "fault class (0x%x)", (void *)aflt, aflt->flt_class); in cpu_ce_log_err()
3000 ce_ptnr_select(struct async_flt *aflt, int flags, int *typep) in ce_ptnr_select() argument
3007 dtcr = cpu[aflt->flt_inst]; in ce_ptnr_select()
3169 ce_ptnrchk_xc(struct async_flt *aflt, uchar_t *dispp) in ce_ptnrchk_xc() argument
3171 *dispp = cpu_ce_scrub_mem_err_common(aflt, B_FALSE); in ce_ptnrchk_xc()
3185 struct async_flt *aflt = cbarg->lkycb_aflt; in ce_lkychk_cb() local
3191 if (cp = ce_ptnr_select(aflt, PTNR_SIBLINGOK | PTNR_SELFOK, in ce_lkychk_cb()
3193 xc_one(cp->cpu_id, (xcfunc_t *)ce_ptnrchk_xc, (uint64_t)aflt, in ce_lkychk_cb()
3195 CE_XDIAG_SETLKYINFO(aflt->flt_disp, disp); in ce_lkychk_cb()
3196 CE_XDIAG_SETPTNRID(aflt->flt_disp, cp->cpu_id); in ce_lkychk_cb()
3197 CE_XDIAG_SETPTNRTYPE(aflt->flt_disp, ptnrtype); in ce_lkychk_cb()
3201 CE_XDIAG_SETSKIPCODE(aflt->flt_disp, in ce_lkychk_cb()
3237 ce_scrub_xdiag_recirc(struct async_flt *aflt, errorq_t *eqp, in ce_scrub_xdiag_recirc() argument
3248 } else if (!aflt->flt_in_memory) { in ce_scrub_xdiag_recirc()
3250 CE_XDIAG_SETSKIPCODE(aflt->flt_disp, CE_XDIAG_SKIP_NOTMEM); in ce_scrub_xdiag_recirc()
3254 dtcrinfo = CE_XDIAG_DTCRINFO(aflt->flt_disp); in ce_scrub_xdiag_recirc()
3263 CE_XDIAG_SETSKIPCODE(aflt->flt_disp, CE_XDIAG_SKIP_NOSCRUB); in ce_scrub_xdiag_recirc()
3289 CE_XDIAG_SETSKIPCODE(aflt->flt_disp, in ce_scrub_xdiag_recirc()
3312 if ((cp = ce_ptnr_select(aflt, 0, &ptnrtype)) != NULL) { in ce_scrub_xdiag_recirc()
3314 (uint64_t)aflt, (uint64_t)&disp); in ce_scrub_xdiag_recirc()
3315 CE_XDIAG_SETPTNRINFO(aflt->flt_disp, disp); in ce_scrub_xdiag_recirc()
3316 CE_XDIAG_SETPTNRID(aflt->flt_disp, cp->cpu_id); in ce_scrub_xdiag_recirc()
3317 CE_XDIAG_SETPTNRTYPE(aflt->flt_disp, ptnrtype); in ce_scrub_xdiag_recirc()
3320 CE_XDIAG_SETSKIPCODE(aflt->flt_disp, in ce_scrub_xdiag_recirc()
3324 CE_XDIAG_SETSKIPCODE(aflt->flt_disp, in ce_scrub_xdiag_recirc()
3339 CE_XDIAG_SETSKIPCODE(aflt->flt_disp, CE_XDIAG_SKIP_ACTBAD); in ce_scrub_xdiag_recirc()
3350 cpu_ue_log_err(struct async_flt *aflt) in cpu_ue_log_err() argument
3352 switch (aflt->flt_class) { in cpu_ue_log_err()
3354 cpu_ereport_init(aflt); in cpu_ue_log_err()
3355 if (cpu_async_log_err(aflt, NULL)) in cpu_ue_log_err()
3356 cpu_ereport_post(aflt); in cpu_ue_log_err()
3360 bus_async_log_err(aflt); in cpu_ue_log_err()
3365 "fault class (0x%x)", (void *)aflt, aflt->flt_class); in cpu_ue_log_err()
3377 struct async_flt *aflt; in cpu_async_panic_callb() local
3389 aflt = (struct async_flt *)&ch_flt; in cpu_async_panic_callb()
3390 aflt->flt_id = gethrtime_waitfree(); in cpu_async_panic_callb()
3391 aflt->flt_bus_id = getprocessorid(); in cpu_async_panic_callb()
3392 aflt->flt_inst = CPU->cpu_id; in cpu_async_panic_callb()
3393 aflt->flt_stat = cpu_error_regs.afsr; in cpu_async_panic_callb()
3394 aflt->flt_addr = cpu_error_regs.afar; in cpu_async_panic_callb()
3395 aflt->flt_prot = AFLT_PROT_NONE; in cpu_async_panic_callb()
3396 aflt->flt_class = CPU_FAULT; in cpu_async_panic_callb()
3397 aflt->flt_priv = ((cpu_error_regs.afsr & C_AFSR_PRIV) != 0); in cpu_async_panic_callb()
3398 aflt->flt_panic = 1; in cpu_async_panic_callb()
3517 cpu_get_mem_unum_aflt(int synd_status, struct async_flt *aflt, in cpu_get_mem_unum_aflt() argument
3525 return (cpu_get_mem_unum(synd_status, aflt->flt_synd, in cpu_get_mem_unum_aflt()
3526 (aflt->flt_class == BUS_FAULT) ? in cpu_get_mem_unum_aflt()
3527 (uint64_t)-1 : ((ch_async_flt_t *)aflt)->flt_bit, in cpu_get_mem_unum_aflt()
3528 aflt->flt_addr, aflt->flt_bus_id, aflt->flt_in_memory, in cpu_get_mem_unum_aflt()
3529 aflt->flt_status, buf, buflen, lenp)); in cpu_get_mem_unum_aflt()
3537 cpu_get_mem_unum_synd(int synd_code, struct async_flt *aflt, char *buf) in cpu_get_mem_unum_synd() argument
3548 if ((ret = plat_get_mem_unum(synd_code, aflt->flt_addr, in cpu_get_mem_unum_synd()
3549 aflt->flt_bus_id, aflt->flt_in_memory, in cpu_get_mem_unum_synd()
3550 aflt->flt_status, buf, UNUM_NAMLEN, &len)) != 0) { in cpu_get_mem_unum_synd()
3698 read_ecc_data(struct async_flt *aflt, short verbose, short ce_err) in read_ecc_data() argument
3710 struct async_flt *aflt = (struct async_flt *)ch_flt; in clear_errors() local
3716 aflt->flt_stat = cpu_error_regs.afsr & C_AFSR_MASK; in clear_errors()
3717 aflt->flt_addr = cpu_error_regs.afar; in clear_errors()
3749 clear_ecc(struct async_flt *aflt) in clear_ecc() argument
3763 return ((cpu_error_regs.afsr & (C_AFSR_MEMORY & aflt->flt_stat)) != 0 && in clear_ecc()
3764 cpu_error_regs.afar == aflt->flt_addr); in clear_ecc()
3835 struct async_flt *aflt = (struct async_flt *)ch_flt; in cpu_flush_ecache_line() local
3838 ecache_flush_line(aflt->flt_addr, ec_set_size); in cpu_flush_ecache_line()
3847 cpu_scrubphys(struct async_flt *aflt) in cpu_scrubphys() argument
3851 scrubphys(aflt->flt_addr, ec_set_size); in cpu_scrubphys()
3860 cpu_clearphys(struct async_flt *aflt) in cpu_clearphys() argument
3866 clearphys(aflt->flt_addr, ec_set_size, lsize); in cpu_clearphys()
3877 struct async_flt *aflt = (struct async_flt *)ch_flt; in cpu_ecache_line_valid() local
3886 (aflt->flt_addr & P2ALIGN(C_AFAR_PA, ec_set_size)) == in cpu_ecache_line_valid()
4135 struct async_flt *aflt = (struct async_flt *)ch_flt; in cpu_icache_parity_check() local
4163 flt_index = P2ALIGN(aflt->flt_addr % ic_set_size, ic_linesize); in cpu_icache_parity_check()
4322 cpu_payload_add_dcache(struct async_flt *aflt, nvlist_t *nvl) in cpu_payload_add_dcache() argument
4324 ch_async_flt_t *ch_flt = (ch_async_flt_t *)aflt; in cpu_payload_add_dcache()
4369 cpu_payload_add_icache(struct async_flt *aflt, nvlist_t *nvl) in cpu_payload_add_icache() argument
4371 ch_async_flt_t *ch_flt = (ch_async_flt_t *)aflt; in cpu_payload_add_icache()
4418 cpu_payload_add_ecache(struct async_flt *aflt, nvlist_t *nvl) in cpu_payload_add_ecache() argument
4420 ch_async_flt_t *ch_flt = (ch_async_flt_t *)aflt; in cpu_payload_add_ecache()
4444 if (IS_PANTHER(cpunodes[aflt->flt_inst].implementation)) { in cpu_payload_add_ecache()
4505 cpu_error_to_resource_type(struct async_flt *aflt) in cpu_error_to_resource_type() argument
4507 ch_async_flt_t *ch_flt = (ch_async_flt_t *)aflt; in cpu_error_to_resource_type()
4520 if (cpu_error_is_ecache_data(aflt->flt_inst, in cpu_error_to_resource_type()
4551 cpu_payload_add_aflt(struct async_flt *aflt, nvlist_t *payload, in cpu_payload_add_aflt() argument
4554 ch_async_flt_t *ch_flt = (ch_async_flt_t *)aflt; in cpu_payload_add_aflt()
4558 if (aflt->flt_payload & FM_EREPORT_PAYLOAD_FLAG_AFSR) { in cpu_payload_add_aflt()
4560 DATA_TYPE_UINT64, aflt->flt_stat, NULL); in cpu_payload_add_aflt()
4563 if ((aflt->flt_payload & FM_EREPORT_PAYLOAD_FLAG_AFSR_EXT) && in cpu_payload_add_aflt()
4564 IS_PANTHER(cpunodes[aflt->flt_inst].implementation)) { in cpu_payload_add_aflt()
4569 if (aflt->flt_payload & FM_EREPORT_PAYLOAD_FLAG_AFAR_STATUS) { in cpu_payload_add_aflt()
4576 if (aflt->flt_payload & FM_EREPORT_PAYLOAD_FLAG_AFAR) { in cpu_payload_add_aflt()
4578 DATA_TYPE_UINT64, aflt->flt_addr, NULL); in cpu_payload_add_aflt()
4581 if (aflt->flt_payload & FM_EREPORT_PAYLOAD_FLAG_PC) { in cpu_payload_add_aflt()
4583 DATA_TYPE_UINT64, (uint64_t)aflt->flt_pc, NULL); in cpu_payload_add_aflt()
4586 if (aflt->flt_payload & FM_EREPORT_PAYLOAD_FLAG_TL) { in cpu_payload_add_aflt()
4588 DATA_TYPE_UINT8, (uint8_t)aflt->flt_tl, NULL); in cpu_payload_add_aflt()
4591 if (aflt->flt_payload & FM_EREPORT_PAYLOAD_FLAG_TT) { in cpu_payload_add_aflt()
4593 DATA_TYPE_UINT8, flt_to_trap_type(aflt), NULL); in cpu_payload_add_aflt()
4596 if (aflt->flt_payload & FM_EREPORT_PAYLOAD_FLAG_PRIV) { in cpu_payload_add_aflt()
4599 (aflt->flt_priv ? B_TRUE : B_FALSE), NULL); in cpu_payload_add_aflt()
4602 if (aflt->flt_payload & FM_EREPORT_PAYLOAD_FLAG_ME) { in cpu_payload_add_aflt()
4605 (aflt->flt_stat & C_AFSR_ME) ? B_TRUE : B_FALSE, NULL); in cpu_payload_add_aflt()
4608 if (aflt->flt_payload & FM_EREPORT_PAYLOAD_FLAG_SYND_STATUS) { in cpu_payload_add_aflt()
4609 *synd_status = afsr_to_synd_status(aflt->flt_inst, in cpu_payload_add_aflt()
4615 if (aflt->flt_payload & FM_EREPORT_PAYLOAD_FLAG_SYND) { in cpu_payload_add_aflt()
4617 DATA_TYPE_UINT16, (uint16_t)aflt->flt_synd, NULL); in cpu_payload_add_aflt()
4620 if (aflt->flt_payload & FM_EREPORT_PAYLOAD_FLAG_ERR_TYPE) { in cpu_payload_add_aflt()
4622 DATA_TYPE_STRING, flt_to_error_type(aflt), NULL); in cpu_payload_add_aflt()
4625 if (aflt->flt_payload & FM_EREPORT_PAYLOAD_FLAG_ERR_DISP) { in cpu_payload_add_aflt()
4627 DATA_TYPE_UINT64, aflt->flt_disp, NULL); in cpu_payload_add_aflt()
4630 if (aflt->flt_payload & FM_EREPORT_PAYLOAD_FLAGS_L2) in cpu_payload_add_aflt()
4631 cpu_payload_add_ecache(aflt, payload); in cpu_payload_add_aflt()
4633 if (aflt->flt_payload & FM_EREPORT_PAYLOAD_FLAG_COPYFUNCTION) { in cpu_payload_add_aflt()
4635 DATA_TYPE_UINT8, (uint8_t)aflt->flt_status & 0xff, NULL); in cpu_payload_add_aflt()
4638 if (aflt->flt_payload & FM_EREPORT_PAYLOAD_FLAG_HOWDETECTED) { in cpu_payload_add_aflt()
4640 DATA_TYPE_UINT8, (uint8_t)(aflt->flt_status >> 8), NULL); in cpu_payload_add_aflt()
4643 if (aflt->flt_payload & FM_EREPORT_PAYLOAD_FLAG_INSTRBLOCK) { in cpu_payload_add_aflt()
4650 if (aflt->flt_payload & FM_EREPORT_PAYLOAD_FLAGS_L1D) in cpu_payload_add_aflt()
4651 cpu_payload_add_dcache(aflt, payload); in cpu_payload_add_aflt()
4652 if (aflt->flt_payload & FM_EREPORT_PAYLOAD_FLAGS_L1I) in cpu_payload_add_aflt()
4653 cpu_payload_add_icache(aflt, payload); in cpu_payload_add_aflt()
4657 if (aflt->flt_payload & FM_EREPORT_PAYLOAD_FLAGS_L1P) in cpu_payload_add_aflt()
4658 cpu_payload_add_pcache(aflt, payload); in cpu_payload_add_aflt()
4659 if (aflt->flt_payload & FM_EREPORT_PAYLOAD_FLAGS_TLB) in cpu_payload_add_aflt()
4660 cpu_payload_add_tlb(aflt, payload); in cpu_payload_add_aflt()
4666 if (aflt->flt_payload & FM_EREPORT_PAYLOAD_FLAG_RESOURCE) { in cpu_payload_add_aflt()
4672 rtype = cpu_error_to_resource_type(aflt); in cpu_payload_add_aflt()
4685 aflt->flt_status |= ECC_ECACHE; in cpu_payload_add_aflt()
4687 aflt->flt_status &= ~ECC_ECACHE; in cpu_payload_add_aflt()
4690 aflt->flt_synd, ch_flt->flt_bit); in cpu_payload_add_aflt()
4692 if (cpu_get_mem_unum_synd(synd_code, aflt, unum) != 0) in cpu_payload_add_aflt()
4699 (void) cpu_get_mem_offset(aflt->flt_addr, in cpu_payload_add_aflt()
4714 cpu_fmri_cpu_set(resource, aflt->flt_inst); in cpu_payload_add_aflt()
4727 cpu_ereport_init(struct async_flt *aflt) in cpu_ereport_init() argument
4729 ch_async_flt_t *ch_flt = (ch_async_flt_t *)aflt; in cpu_ereport_init()
4753 struct async_flt *aflt = (struct async_flt *)ch_flt; in cpu_flt_in_memory() local
4758 pf_is_memory(aflt->flt_addr >> MMU_PAGESHIFT)); in cpu_flt_in_memory()
4768 struct async_flt *aflt = (struct async_flt *)ch_flt; in cpu_flt_in_memory_one_event() local
4773 !pf_is_memory(aflt->flt_addr >> MMU_PAGESHIFT)) in cpu_flt_in_memory_one_event()
4815 struct async_flt *aflt = (struct async_flt *)ch_flt; in cpu_log_diag_info() local
4846 if (CH_DCTAG_MATCH(dcp->dc_tag, aflt->flt_addr)) { in cpu_log_diag_info()
4851 if (CH_ICTAG_MATCH(icp, aflt->flt_addr)) { in cpu_log_diag_info()
4852 if (IS_PANTHER(cpunodes[aflt->flt_inst].implementation)) in cpu_log_diag_info()
4927 struct async_flt *aflt = (struct async_flt *)ch_flt; in cpu_queue_one_event() local
4940 aflt->flt_in_memory = in cpu_queue_one_event()
4944 aflt->flt_synd = GET_M_SYND(aflt->flt_stat); in cpu_queue_one_event()
4946 aflt->flt_synd = GET_E_SYND(aflt->flt_stat); in cpu_queue_one_event()
4948 aflt->flt_synd = 0; in cpu_queue_one_event()
4950 aflt->flt_payload = eccp->ec_err_payload; in cpu_queue_one_event()
4952 if (aflt->flt_panic || (eccp->ec_afsr_bit & in cpu_queue_one_event()
4956 aflt->flt_panic); in cpu_queue_one_event()
4960 aflt->flt_panic); in cpu_queue_one_event()
4972 struct async_flt *aflt = (struct async_flt *)ch_flt; in cpu_queue_events() local
4975 uint64_t primary_afar = aflt->flt_addr, primary_afsr = aflt->flt_stat; in cpu_queue_events()
4999 aflt->flt_addr = ch_flt->flt_sdw_afar = cdp->chd_afar; in cpu_queue_events()
5000 aflt->flt_stat = ch_flt->flt_sdw_afsr = cdp->chd_afsr; in cpu_queue_events()
5011 aflt->flt_stat |= (1ull << C_AFSR_FIRSTFLT_SHIFT); in cpu_queue_events()
5023 ((eccp->ec_flags & aflt->flt_status) != 0)) { in cpu_queue_events()
5051 (eccp->ec_flags & aflt->flt_status) != 0) { in cpu_queue_events()
5061 aflt->flt_addr = ch_flt->afar2; in cpu_queue_events()
5065 aflt->flt_addr = primary_afar; in cpu_queue_events()
5068 aflt->flt_addr = primary_afar; in cpu_queue_events()
5070 aflt->flt_stat = primary_afsr; in cpu_queue_events()
5095 aflt->flt_addr = ch_flt->afar2; in cpu_queue_events()
5099 aflt->flt_addr = primary_afar; in cpu_queue_events()
5102 aflt->flt_addr = primary_afar; in cpu_queue_events()
5104 aflt->flt_stat = primary_afsr; in cpu_queue_events()
5120 flt_to_trap_type(struct async_flt *aflt) in flt_to_trap_type() argument
5122 if (aflt->flt_status & ECC_I_TRAP) in flt_to_trap_type()
5124 if (aflt->flt_status & ECC_D_TRAP) in flt_to_trap_type()
5126 if (aflt->flt_status & ECC_F_TRAP) in flt_to_trap_type()
5128 if (aflt->flt_status & ECC_C_TRAP) in flt_to_trap_type()
5130 if (aflt->flt_status & ECC_DP_TRAP) in flt_to_trap_type()
5132 if (aflt->flt_status & ECC_IP_TRAP) in flt_to_trap_type()
5134 if (aflt->flt_status & ECC_ITLB_TRAP) in flt_to_trap_type()
5136 if (aflt->flt_status & ECC_DTLB_TRAP) in flt_to_trap_type()
5158 flt_to_error_type(struct async_flt *aflt) in flt_to_error_type() argument
5168 if (!ce_disp_inited || !aflt->flt_in_memory || aflt->flt_disp == 0) in flt_to_error_type()
5171 dtcrinfo = CE_XDIAG_DTCRINFO(aflt->flt_disp); in flt_to_error_type()
5209 lkyinfo = CE_XDIAG_LKYINFO(aflt->flt_disp); in flt_to_error_type()
5226 ptnrinfo = CE_XDIAG_PTNRINFO(aflt->flt_disp); in flt_to_error_type()
5480 cpu_check_allcpus(struct async_flt *aflt) argument
6320 struct async_flt *aflt; local
6325 aflt = (struct async_flt *)&ch_flt;
6326 aflt->flt_stat = cpu_error_regs->afsr & C_AFSR_MASK;
6330 aflt->flt_addr = cpu_error_regs->afar;
6334 aflt->flt_pc = NULL;
6335 aflt->flt_priv = ((cpu_error_regs->afsr & C_AFSR_PRIV) != 0);
6336 aflt->flt_tl = 0;
6337 aflt->flt_panic = 0;
6356 struct async_flt *aflt; local
6362 aflt = (struct async_flt *)ch_flt;
6363 afsr = aflt->flt_stat;
6365 aflt->flt_id = gethrtime_waitfree();
6366 aflt->flt_bus_id = getprocessorid();
6367 aflt->flt_inst = CPU->cpu_id;
6368 aflt->flt_prot = AFLT_PROT_NONE;
6369 aflt->flt_class = CPU_FAULT;
6370 aflt->flt_status = ECC_C_TRAP;
6422 cpu_ce_scrub_mem_err(aflt, B_TRUE);
6433 cpu_ce_scrub_mem_err(aflt, B_TRUE);
6443 aflt->flt_prot = AFLT_PROT_EC;
6453 aflt->flt_panic);
6486 struct async_flt *aflt; local
6490 aflt = (struct async_flt *)ch_flt;
6491 afsr = aflt->flt_stat;
6664 cpu_ereport_post(struct async_flt *aflt) argument
6670 ch_async_flt_t *ch_flt = (ch_async_flt_t *)aflt;
6676 if (aflt->flt_panic || panicstr) {
6691 switch (cpunodes[aflt->flt_inst].implementation) {
6715 cpu_fmri_cpu_set(detector, aflt->flt_inst);
6721 FM_ERROR_CPU, cpu_type, aflt->flt_erpt_class);
6724 fm_ena_generate_cpu(aflt->flt_id, aflt->flt_inst, FM_ENA_FMT1),
6731 cpu_payload_add_aflt(aflt, ereport, resource,
6735 if (aflt->flt_panic || panicstr) {
6750 msg_type = cpu_flt_bit_to_plat_error(aflt);
6759 aflt->flt_synd, ch_flt->flt_bit);
6761 aflt, unum);
6772 plat_log_fruid_error2(msg_type, unum, aflt,
6779 cpu_run_bus_error_handlers(struct async_flt *aflt, int expected) argument
6787 de.fme_ena = fm_ena_generate_cpu(aflt->flt_id, aflt->flt_inst,
6790 de.fme_bus_specific = (void *)aflt->flt_addr;
6792 if ((aflt->flt_prot == AFLT_PROT_NONE) && (status == DDI_FM_FATAL))
6793 aflt->flt_panic = 1;
6800 struct async_flt *aflt = (struct async_flt *)payload; local
6802 aflt->flt_erpt_class = error_class;
6988 struct async_flt *aflt = (struct async_flt *)&ch_flt; local
7008 aflt->flt_id = gethrtime_waitfree();
7009 aflt->flt_class = CPU_FAULT;
7010 aflt->flt_inst = CPU->cpu_id;
7011 aflt->flt_status = (how << 8) | op;
7012 aflt->flt_payload = FM_EREPORT_PAYLOAD_FPU_HWCOPY;
7020 aflt->flt_panic = (curthread->t_lofault == NULL);
7039 sizeof (ch_async_flt_t), ue_queue, aflt->flt_panic);
7041 if (aflt->flt_panic)
7154 struct async_flt *aflt = (struct async_flt *)ch_flt;
7193 if (P2ALIGN(aflt->flt_addr, 64) != P2ALIGN(t_afar, 64))
7210 cpu_flt_bit_to_plat_error(struct async_flt *aflt) argument
7218 ch_async_flt_t *ch_flt = (ch_async_flt_t *)aflt;