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()
1425 aflt->flt_panic |= in cpu_log_fast_ecc_error()
1429 aflt->flt_panic |= ((clop == NULL) && in cpu_log_fast_ecc_error()
1433 aflt->flt_panic |= in cpu_log_fast_ecc_error()
1436 aflt->flt_panic |= ((clop == NULL) && in cpu_log_fast_ecc_error()
1451 aflt->flt_panic); in cpu_log_fast_ecc_error()
1477 aflt->flt_panic |= ((ch_flt.afsr_errs & in cpu_log_fast_ecc_error()
1487 if (aflt->flt_panic) in cpu_log_fast_ecc_error()
1632 struct async_flt *aflt; in cpu_disrupting_error() local
1676 aflt = (struct async_flt *)&ch_flt; in cpu_disrupting_error()
1679 aflt->flt_stat = t_afsr; in cpu_disrupting_error()
1680 aflt->flt_addr = t_afar; in cpu_disrupting_error()
1681 aflt->flt_pc = (caddr_t)rp->r_pc; in cpu_disrupting_error()
1682 aflt->flt_priv = (rp->r_tstate & TSTATE_PRIV) ? 1 : 0; in cpu_disrupting_error()
1683 aflt->flt_tl = 0; in cpu_disrupting_error()
1684 aflt->flt_panic = C_AFSR_PANIC(t_afsr_errs); in cpu_disrupting_error()
1692 !aflt->flt_panic) in cpu_disrupting_error()
1721 if (aflt->flt_panic) in cpu_disrupting_error()
1742 struct async_flt *aflt; in cpu_deferred_error() local
1811 aflt = (struct async_flt *)&ch_flt; in cpu_deferred_error()
1812 aflt->flt_id = gethrtime_waitfree(); in cpu_deferred_error()
1813 aflt->flt_bus_id = getprocessorid(); in cpu_deferred_error()
1814 aflt->flt_inst = CPU->cpu_id; in cpu_deferred_error()
1817 aflt->flt_stat = t_afsr; in cpu_deferred_error()
1818 aflt->flt_addr = t_afar; in cpu_deferred_error()
1819 aflt->flt_pc = (caddr_t)rp->r_pc; in cpu_deferred_error()
1820 aflt->flt_prot = AFLT_PROT_NONE; in cpu_deferred_error()
1821 aflt->flt_class = CPU_FAULT; in cpu_deferred_error()
1822 aflt->flt_priv = (rp->r_tstate & TSTATE_PRIV) ? 1 : 0; in cpu_deferred_error()
1823 aflt->flt_tl = (uchar_t)tl; in cpu_deferred_error()
1824 aflt->flt_panic = ((tl != 0) || (aft_testfatal != 0) || in cpu_deferred_error()
1826 aflt->flt_core = (pflag & SDOCORE) ? 1 : 0; in cpu_deferred_error()
1827 aflt->flt_status = ((ttype == T_DATA_ERROR) ? ECC_D_TRAP : ECC_I_TRAP); in cpu_deferred_error()
1835 if (aflt->flt_priv && tl == 0) { in cpu_deferred_error()
1840 aflt->flt_prot = AFLT_PROT_EC; in cpu_deferred_error()
1849 aflt->flt_prot = AFLT_PROT_ACCESS; in cpu_deferred_error()
1866 aflt->flt_prot = AFLT_PROT_COPY; in cpu_deferred_error()
1883 if (!aflt->flt_priv || aflt->flt_prot == AFLT_PROT_COPY) { in cpu_deferred_error()
1887 aflt->flt_panic |= aft_panic; in cpu_deferred_error()
1889 aflt->flt_panic = 1; in cpu_deferred_error()
1903 } else if (!aflt->flt_priv) { in cpu_deferred_error()
1922 aflt->flt_panic); in cpu_deferred_error()
1939 cpu_run_bus_error_handlers(aflt, expected); in cpu_deferred_error()
1954 aflt->flt_panic = 1; in cpu_deferred_error()
1961 if (aflt->flt_panic && cpu_flt_in_memory(&ch_flt, C_AFSR_UE)) { in cpu_deferred_error()
1962 panic_aflt = *aflt; in cpu_deferred_error()
1977 cpu_run_bus_error_handlers(aflt, expected); in cpu_deferred_error()
1992 aflt->flt_panic = 1; in cpu_deferred_error()
1999 if (aflt->flt_panic && cpu_flt_in_memory(&ch_flt, C_AFSR_UE)) { in cpu_deferred_error()
2000 panic_aflt = *aflt; in cpu_deferred_error()
2032 aflt->flt_panic |= ((ch_flt.afsr_errs & in cpu_deferred_error()
2043 if (aflt->flt_panic) in cpu_deferred_error()
2052 if (!aflt->flt_priv || aflt->flt_prot == AFLT_PROT_COPY) { in cpu_deferred_error()
2087 struct async_flt *aflt; in cpu_parity_error() local
2107 aflt = (struct async_flt *)&ch_flt; in cpu_parity_error()
2108 aflt->flt_id = gethrtime_waitfree(); in cpu_parity_error()
2109 aflt->flt_bus_id = getprocessorid(); in cpu_parity_error()
2110 aflt->flt_inst = CPU->cpu_id; in cpu_parity_error()
2111 aflt->flt_pc = tpc; in cpu_parity_error()
2112 aflt->flt_addr = iparity ? (uint64_t)tpc : AFLT_INV_ADDR; in cpu_parity_error()
2113 aflt->flt_prot = AFLT_PROT_NONE; in cpu_parity_error()
2114 aflt->flt_class = CPU_FAULT; in cpu_parity_error()
2115 aflt->flt_priv = (tl || (rp->r_tstate & TSTATE_PRIV)) ? 1 : 0; in cpu_parity_error()
2116 aflt->flt_tl = tl; in cpu_parity_error()
2117 aflt->flt_panic = panic; in cpu_parity_error()
2118 aflt->flt_status = iparity ? ECC_IP_TRAP : ECC_DP_TRAP; in cpu_parity_error()
2129 aflt->flt_payload = FM_EREPORT_PAYLOAD_ICACHE_PE; in cpu_parity_error()
2184 aflt->flt_payload = FM_EREPORT_PAYLOAD_DCACHE_PE; in cpu_parity_error()
2192 aflt->flt_payload = in cpu_parity_error()
2199 sizeof (ch_async_flt_t), ue_queue, aflt->flt_panic); in cpu_parity_error()
2265 if (aflt->flt_panic) in cpu_parity_error()
2289 struct async_flt *aflt = (struct async_flt *)ch_flt; in cpu_async_log_ic_parity_err() local
2297 if (IS_PANTHER(cpunodes[aflt->flt_inst].implementation)) in cpu_async_log_ic_parity_err()
2312 if (IS_PANTHER(cpunodes[aflt->flt_inst].implementation)) in cpu_async_log_ic_parity_err()
2383 struct async_flt *aflt = (struct async_flt *)flt; in cpu_async_log_err() local
2394 if ((aflt->flt_status & ECC_C_TRAP) && in cpu_async_log_err()
2395 (!(aflt->flt_stat & C_AFSR_MASK))) in cpu_async_log_err()
2406 cpu_log_err(aflt); in cpu_async_log_err()
2433 aflt->flt_prot == AFLT_PROT_EC) { in cpu_async_log_err()
2435 if (page_retire_check(aflt->flt_addr, NULL) == 0) { in cpu_async_log_err()
2443 (void *)(uintptr_t)aflt->flt_inst, in cpu_async_log_err()
2473 if (page_retire_check(aflt->flt_addr, &errors) == EINVAL) { in cpu_async_log_err()
2474 CE_XDIAG_SETSKIPCODE(aflt->flt_disp, in cpu_async_log_err()
2478 CE_XDIAG_SETSKIPCODE(aflt->flt_disp, in cpu_async_log_err()
2480 } else if (ce_scrub_xdiag_recirc(aflt, ce_queue, eqep, in cpu_async_log_err()
2494 cpu_log_err(aflt); in cpu_async_log_err()
2508 aflt->flt_prot == AFLT_PROT_EC) { in cpu_async_log_err()
2509 if (page_retire_check(aflt->flt_addr, NULL) == 0) { in cpu_async_log_err()
2511 softcall(ecc_page_zero, (void *)aflt->flt_addr); in cpu_async_log_err()
2520 cpu_log_err(aflt); in cpu_async_log_err()
2541 (void *)aflt, ch_flt->flt_type); in cpu_async_log_err()
2548 if (aflt->flt_addr != AFLT_INV_ADDR && aflt->flt_in_memory) { in cpu_async_log_err()
2557 cpu_clearphys(aflt); in cpu_async_log_err()
2571 struct async_flt *aflt = (struct async_flt *)ch_flt; in cpu_page_retire() local
2572 (void) page_retire(aflt->flt_addr, PR_UE); in cpu_page_retire()
2604 cpu_log_err(struct async_flt *aflt) in cpu_log_err() argument
2608 ch_async_flt_t *ch_flt = (ch_async_flt_t *)aflt; in cpu_log_err()
2610 if (cpu_error_is_ecache_data(aflt->flt_inst, ch_flt->flt_bit)) in cpu_log_err()
2611 aflt->flt_status |= ECC_ECACHE; in cpu_log_err()
2613 aflt->flt_status &= ~ECC_ECACHE; in cpu_log_err()
2617 synd_status = afsr_to_synd_status(aflt->flt_inst, in cpu_log_err()
2623 if (pf_is_memory(aflt->flt_addr >> MMU_PAGESHIFT)) in cpu_log_err()
2630 aflt->flt_synd, ch_flt->flt_bit); in cpu_log_err()
2636 (void) cpu_get_mem_unum_synd(synd_code, aflt, unum); in cpu_log_err()
2651 plat_log_fruid_error(synd_code, aflt, unum, in cpu_log_err()
2655 if (aflt->flt_func != NULL) in cpu_log_err()
2656 aflt->flt_func(aflt, unum); in cpu_log_err()
2671 (void *)(uintptr_t)aflt->flt_inst, in cpu_log_err()
2703 cpu_ce_log_err(struct async_flt *aflt, errorq_elem_t *eqep) in cpu_ce_log_err() argument
2708 switch (aflt->flt_class) { in cpu_ce_log_err()
2710 cpu_ereport_init(aflt); in cpu_ce_log_err()
2711 if (cpu_async_log_err(aflt, eqep)) in cpu_ce_log_err()
2712 cpu_ereport_post(aflt); in cpu_ce_log_err()
2716 if (aflt->flt_func != NULL) { in cpu_ce_log_err()
2717 (void) cpu_get_mem_unum_aflt(AFLT_STAT_VALID, aflt, in cpu_ce_log_err()
2719 aflt->flt_func(aflt, unum); in cpu_ce_log_err()
2724 aflt->flt_class = CPU_FAULT; in cpu_ce_log_err()
2725 cpu_log_err(aflt); in cpu_ce_log_err()
2726 cpu_ereport_post(aflt); in cpu_ce_log_err()
2730 ASSERT(aflt->flt_class != RECIRC_BUS_FAULT); in cpu_ce_log_err()
2734 "fault class (0x%x)", (void *)aflt, aflt->flt_class); in cpu_ce_log_err()
3001 ce_ptnr_select(struct async_flt *aflt, int flags, int *typep) in ce_ptnr_select() argument
3008 dtcr = cpu[aflt->flt_inst]; in ce_ptnr_select()
3170 ce_ptnrchk_xc(struct async_flt *aflt, uchar_t *dispp) in ce_ptnrchk_xc() argument
3172 *dispp = cpu_ce_scrub_mem_err_common(aflt, B_FALSE); in ce_ptnrchk_xc()
3186 struct async_flt *aflt = cbarg->lkycb_aflt; in ce_lkychk_cb() local
3192 if (cp = ce_ptnr_select(aflt, PTNR_SIBLINGOK | PTNR_SELFOK, in ce_lkychk_cb()
3194 xc_one(cp->cpu_id, (xcfunc_t *)ce_ptnrchk_xc, (uint64_t)aflt, in ce_lkychk_cb()
3196 CE_XDIAG_SETLKYINFO(aflt->flt_disp, disp); in ce_lkychk_cb()
3197 CE_XDIAG_SETPTNRID(aflt->flt_disp, cp->cpu_id); in ce_lkychk_cb()
3198 CE_XDIAG_SETPTNRTYPE(aflt->flt_disp, ptnrtype); in ce_lkychk_cb()
3202 CE_XDIAG_SETSKIPCODE(aflt->flt_disp, in ce_lkychk_cb()
3238 ce_scrub_xdiag_recirc(struct async_flt *aflt, errorq_t *eqp, in ce_scrub_xdiag_recirc() argument
3249 } else if (!aflt->flt_in_memory) { in ce_scrub_xdiag_recirc()
3251 CE_XDIAG_SETSKIPCODE(aflt->flt_disp, CE_XDIAG_SKIP_NOTMEM); in ce_scrub_xdiag_recirc()
3255 dtcrinfo = CE_XDIAG_DTCRINFO(aflt->flt_disp); in ce_scrub_xdiag_recirc()
3264 CE_XDIAG_SETSKIPCODE(aflt->flt_disp, CE_XDIAG_SKIP_NOSCRUB); in ce_scrub_xdiag_recirc()
3290 CE_XDIAG_SETSKIPCODE(aflt->flt_disp, in ce_scrub_xdiag_recirc()
3313 if ((cp = ce_ptnr_select(aflt, 0, &ptnrtype)) != NULL) { in ce_scrub_xdiag_recirc()
3315 (uint64_t)aflt, (uint64_t)&disp); in ce_scrub_xdiag_recirc()
3316 CE_XDIAG_SETPTNRINFO(aflt->flt_disp, disp); in ce_scrub_xdiag_recirc()
3317 CE_XDIAG_SETPTNRID(aflt->flt_disp, cp->cpu_id); in ce_scrub_xdiag_recirc()
3318 CE_XDIAG_SETPTNRTYPE(aflt->flt_disp, ptnrtype); in ce_scrub_xdiag_recirc()
3321 CE_XDIAG_SETSKIPCODE(aflt->flt_disp, in ce_scrub_xdiag_recirc()
3325 CE_XDIAG_SETSKIPCODE(aflt->flt_disp, in ce_scrub_xdiag_recirc()
3340 CE_XDIAG_SETSKIPCODE(aflt->flt_disp, CE_XDIAG_SKIP_ACTBAD); in ce_scrub_xdiag_recirc()
3351 cpu_ue_log_err(struct async_flt *aflt) in cpu_ue_log_err() argument
3353 switch (aflt->flt_class) { in cpu_ue_log_err()
3355 cpu_ereport_init(aflt); in cpu_ue_log_err()
3356 if (cpu_async_log_err(aflt, NULL)) in cpu_ue_log_err()
3357 cpu_ereport_post(aflt); in cpu_ue_log_err()
3361 bus_async_log_err(aflt); in cpu_ue_log_err()
3366 "fault class (0x%x)", (void *)aflt, aflt->flt_class); in cpu_ue_log_err()
3378 struct async_flt *aflt; in cpu_async_panic_callb() local
3390 aflt = (struct async_flt *)&ch_flt; in cpu_async_panic_callb()
3391 aflt->flt_id = gethrtime_waitfree(); in cpu_async_panic_callb()
3392 aflt->flt_bus_id = getprocessorid(); in cpu_async_panic_callb()
3393 aflt->flt_inst = CPU->cpu_id; in cpu_async_panic_callb()
3394 aflt->flt_stat = cpu_error_regs.afsr; in cpu_async_panic_callb()
3395 aflt->flt_addr = cpu_error_regs.afar; in cpu_async_panic_callb()
3396 aflt->flt_prot = AFLT_PROT_NONE; in cpu_async_panic_callb()
3397 aflt->flt_class = CPU_FAULT; in cpu_async_panic_callb()
3398 aflt->flt_priv = ((cpu_error_regs.afsr & C_AFSR_PRIV) != 0); in cpu_async_panic_callb()
3399 aflt->flt_panic = 1; in cpu_async_panic_callb()
3518 cpu_get_mem_unum_aflt(int synd_status, struct async_flt *aflt, in cpu_get_mem_unum_aflt() argument
3526 return (cpu_get_mem_unum(synd_status, aflt->flt_synd, in cpu_get_mem_unum_aflt()
3527 (aflt->flt_class == BUS_FAULT) ? in cpu_get_mem_unum_aflt()
3528 (uint64_t)-1 : ((ch_async_flt_t *)aflt)->flt_bit, in cpu_get_mem_unum_aflt()
3529 aflt->flt_addr, aflt->flt_bus_id, aflt->flt_in_memory, in cpu_get_mem_unum_aflt()
3530 aflt->flt_status, buf, buflen, lenp)); in cpu_get_mem_unum_aflt()
3538 cpu_get_mem_unum_synd(int synd_code, struct async_flt *aflt, char *buf) in cpu_get_mem_unum_synd() argument
3549 if ((ret = plat_get_mem_unum(synd_code, aflt->flt_addr, in cpu_get_mem_unum_synd()
3550 aflt->flt_bus_id, aflt->flt_in_memory, in cpu_get_mem_unum_synd()
3551 aflt->flt_status, buf, UNUM_NAMLEN, &len)) != 0) { in cpu_get_mem_unum_synd()
3699 read_ecc_data(struct async_flt *aflt, short verbose, short ce_err) in read_ecc_data() argument
3711 struct async_flt *aflt = (struct async_flt *)ch_flt; in clear_errors() local
3717 aflt->flt_stat = cpu_error_regs.afsr & C_AFSR_MASK; in clear_errors()
3718 aflt->flt_addr = cpu_error_regs.afar; in clear_errors()
3750 clear_ecc(struct async_flt *aflt) in clear_ecc() argument
3764 return ((cpu_error_regs.afsr & (C_AFSR_MEMORY & aflt->flt_stat)) != 0 && in clear_ecc()
3765 cpu_error_regs.afar == aflt->flt_addr); in clear_ecc()
3836 struct async_flt *aflt = (struct async_flt *)ch_flt; in cpu_flush_ecache_line() local
3839 ecache_flush_line(aflt->flt_addr, ec_set_size); in cpu_flush_ecache_line()
3848 cpu_scrubphys(struct async_flt *aflt) in cpu_scrubphys() argument
3852 scrubphys(aflt->flt_addr, ec_set_size); in cpu_scrubphys()
3861 cpu_clearphys(struct async_flt *aflt) in cpu_clearphys() argument
3867 clearphys(aflt->flt_addr, ec_set_size, lsize); in cpu_clearphys()
3878 struct async_flt *aflt = (struct async_flt *)ch_flt; in cpu_ecache_line_valid() local
3887 (aflt->flt_addr & P2ALIGN(C_AFAR_PA, ec_set_size)) == in cpu_ecache_line_valid()
4136 struct async_flt *aflt = (struct async_flt *)ch_flt; in cpu_icache_parity_check() local
4164 flt_index = P2ALIGN(aflt->flt_addr % ic_set_size, ic_linesize); in cpu_icache_parity_check()
4323 cpu_payload_add_dcache(struct async_flt *aflt, nvlist_t *nvl) in cpu_payload_add_dcache() argument
4325 ch_async_flt_t *ch_flt = (ch_async_flt_t *)aflt; in cpu_payload_add_dcache()
4370 cpu_payload_add_icache(struct async_flt *aflt, nvlist_t *nvl) in cpu_payload_add_icache() argument
4372 ch_async_flt_t *ch_flt = (ch_async_flt_t *)aflt; in cpu_payload_add_icache()
4419 cpu_payload_add_ecache(struct async_flt *aflt, nvlist_t *nvl) in cpu_payload_add_ecache() argument
4421 ch_async_flt_t *ch_flt = (ch_async_flt_t *)aflt; in cpu_payload_add_ecache()
4445 if (IS_PANTHER(cpunodes[aflt->flt_inst].implementation)) { in cpu_payload_add_ecache()
4506 cpu_error_to_resource_type(struct async_flt *aflt) in cpu_error_to_resource_type() argument
4508 ch_async_flt_t *ch_flt = (ch_async_flt_t *)aflt; in cpu_error_to_resource_type()
4521 if (cpu_error_is_ecache_data(aflt->flt_inst, in cpu_error_to_resource_type()
4552 cpu_payload_add_aflt(struct async_flt *aflt, nvlist_t *payload, in cpu_payload_add_aflt() argument
4555 ch_async_flt_t *ch_flt = (ch_async_flt_t *)aflt; in cpu_payload_add_aflt()
4559 if (aflt->flt_payload & FM_EREPORT_PAYLOAD_FLAG_AFSR) { in cpu_payload_add_aflt()
4561 DATA_TYPE_UINT64, aflt->flt_stat, NULL); in cpu_payload_add_aflt()
4564 if ((aflt->flt_payload & FM_EREPORT_PAYLOAD_FLAG_AFSR_EXT) && in cpu_payload_add_aflt()
4565 IS_PANTHER(cpunodes[aflt->flt_inst].implementation)) { in cpu_payload_add_aflt()
4570 if (aflt->flt_payload & FM_EREPORT_PAYLOAD_FLAG_AFAR_STATUS) { in cpu_payload_add_aflt()
4577 if (aflt->flt_payload & FM_EREPORT_PAYLOAD_FLAG_AFAR) { in cpu_payload_add_aflt()
4579 DATA_TYPE_UINT64, aflt->flt_addr, NULL); in cpu_payload_add_aflt()
4582 if (aflt->flt_payload & FM_EREPORT_PAYLOAD_FLAG_PC) { in cpu_payload_add_aflt()
4584 DATA_TYPE_UINT64, (uint64_t)aflt->flt_pc, NULL); in cpu_payload_add_aflt()
4587 if (aflt->flt_payload & FM_EREPORT_PAYLOAD_FLAG_TL) { in cpu_payload_add_aflt()
4589 DATA_TYPE_UINT8, (uint8_t)aflt->flt_tl, NULL); in cpu_payload_add_aflt()
4592 if (aflt->flt_payload & FM_EREPORT_PAYLOAD_FLAG_TT) { in cpu_payload_add_aflt()
4594 DATA_TYPE_UINT8, flt_to_trap_type(aflt), NULL); in cpu_payload_add_aflt()
4597 if (aflt->flt_payload & FM_EREPORT_PAYLOAD_FLAG_PRIV) { in cpu_payload_add_aflt()
4600 (aflt->flt_priv ? B_TRUE : B_FALSE), NULL); in cpu_payload_add_aflt()
4603 if (aflt->flt_payload & FM_EREPORT_PAYLOAD_FLAG_ME) { in cpu_payload_add_aflt()
4606 (aflt->flt_stat & C_AFSR_ME) ? B_TRUE : B_FALSE, NULL); in cpu_payload_add_aflt()
4609 if (aflt->flt_payload & FM_EREPORT_PAYLOAD_FLAG_SYND_STATUS) { in cpu_payload_add_aflt()
4610 *synd_status = afsr_to_synd_status(aflt->flt_inst, in cpu_payload_add_aflt()
4616 if (aflt->flt_payload & FM_EREPORT_PAYLOAD_FLAG_SYND) { in cpu_payload_add_aflt()
4618 DATA_TYPE_UINT16, (uint16_t)aflt->flt_synd, NULL); in cpu_payload_add_aflt()
4621 if (aflt->flt_payload & FM_EREPORT_PAYLOAD_FLAG_ERR_TYPE) { in cpu_payload_add_aflt()
4623 DATA_TYPE_STRING, flt_to_error_type(aflt), NULL); in cpu_payload_add_aflt()
4626 if (aflt->flt_payload & FM_EREPORT_PAYLOAD_FLAG_ERR_DISP) { in cpu_payload_add_aflt()
4628 DATA_TYPE_UINT64, aflt->flt_disp, NULL); in cpu_payload_add_aflt()
4631 if (aflt->flt_payload & FM_EREPORT_PAYLOAD_FLAGS_L2) in cpu_payload_add_aflt()
4632 cpu_payload_add_ecache(aflt, payload); in cpu_payload_add_aflt()
4634 if (aflt->flt_payload & FM_EREPORT_PAYLOAD_FLAG_COPYFUNCTION) { in cpu_payload_add_aflt()
4636 DATA_TYPE_UINT8, (uint8_t)aflt->flt_status & 0xff, NULL); in cpu_payload_add_aflt()
4639 if (aflt->flt_payload & FM_EREPORT_PAYLOAD_FLAG_HOWDETECTED) { in cpu_payload_add_aflt()
4641 DATA_TYPE_UINT8, (uint8_t)(aflt->flt_status >> 8), NULL); in cpu_payload_add_aflt()
4644 if (aflt->flt_payload & FM_EREPORT_PAYLOAD_FLAG_INSTRBLOCK) { in cpu_payload_add_aflt()
4651 if (aflt->flt_payload & FM_EREPORT_PAYLOAD_FLAGS_L1D) in cpu_payload_add_aflt()
4652 cpu_payload_add_dcache(aflt, payload); in cpu_payload_add_aflt()
4653 if (aflt->flt_payload & FM_EREPORT_PAYLOAD_FLAGS_L1I) in cpu_payload_add_aflt()
4654 cpu_payload_add_icache(aflt, payload); in cpu_payload_add_aflt()
4658 if (aflt->flt_payload & FM_EREPORT_PAYLOAD_FLAGS_L1P) in cpu_payload_add_aflt()
4659 cpu_payload_add_pcache(aflt, payload); in cpu_payload_add_aflt()
4660 if (aflt->flt_payload & FM_EREPORT_PAYLOAD_FLAGS_TLB) in cpu_payload_add_aflt()
4661 cpu_payload_add_tlb(aflt, payload); in cpu_payload_add_aflt()
4667 if (aflt->flt_payload & FM_EREPORT_PAYLOAD_FLAG_RESOURCE) { in cpu_payload_add_aflt()
4673 rtype = cpu_error_to_resource_type(aflt); in cpu_payload_add_aflt()
4686 aflt->flt_status |= ECC_ECACHE; in cpu_payload_add_aflt()
4688 aflt->flt_status &= ~ECC_ECACHE; in cpu_payload_add_aflt()
4691 aflt->flt_synd, ch_flt->flt_bit); in cpu_payload_add_aflt()
4693 if (cpu_get_mem_unum_synd(synd_code, aflt, unum) != 0) in cpu_payload_add_aflt()
4700 (void) cpu_get_mem_offset(aflt->flt_addr, in cpu_payload_add_aflt()
4715 cpu_fmri_cpu_set(resource, aflt->flt_inst); in cpu_payload_add_aflt()
4728 cpu_ereport_init(struct async_flt *aflt) in cpu_ereport_init() argument
4730 ch_async_flt_t *ch_flt = (ch_async_flt_t *)aflt; in cpu_ereport_init()
4754 struct async_flt *aflt = (struct async_flt *)ch_flt; in cpu_flt_in_memory() local
4759 pf_is_memory(aflt->flt_addr >> MMU_PAGESHIFT)); in cpu_flt_in_memory()
4769 struct async_flt *aflt = (struct async_flt *)ch_flt; in cpu_flt_in_memory_one_event() local
4774 !pf_is_memory(aflt->flt_addr >> MMU_PAGESHIFT)) in cpu_flt_in_memory_one_event()
4816 struct async_flt *aflt = (struct async_flt *)ch_flt; in cpu_log_diag_info() local
4847 if (CH_DCTAG_MATCH(dcp->dc_tag, aflt->flt_addr)) { in cpu_log_diag_info()
4852 if (CH_ICTAG_MATCH(icp, aflt->flt_addr)) { in cpu_log_diag_info()
4853 if (IS_PANTHER(cpunodes[aflt->flt_inst].implementation)) in cpu_log_diag_info()
4928 struct async_flt *aflt = (struct async_flt *)ch_flt; in cpu_queue_one_event() local
4941 aflt->flt_in_memory = in cpu_queue_one_event()
4945 aflt->flt_synd = GET_M_SYND(aflt->flt_stat); in cpu_queue_one_event()
4947 aflt->flt_synd = GET_E_SYND(aflt->flt_stat); in cpu_queue_one_event()
4949 aflt->flt_synd = 0; in cpu_queue_one_event()
4951 aflt->flt_payload = eccp->ec_err_payload; in cpu_queue_one_event()
4953 if (aflt->flt_panic || (eccp->ec_afsr_bit & in cpu_queue_one_event()
4957 aflt->flt_panic); in cpu_queue_one_event()
4961 aflt->flt_panic); in cpu_queue_one_event()
4973 struct async_flt *aflt = (struct async_flt *)ch_flt; in cpu_queue_events() local
4976 uint64_t primary_afar = aflt->flt_addr, primary_afsr = aflt->flt_stat; in cpu_queue_events()
5000 aflt->flt_addr = ch_flt->flt_sdw_afar = cdp->chd_afar; in cpu_queue_events()
5001 aflt->flt_stat = ch_flt->flt_sdw_afsr = cdp->chd_afsr; in cpu_queue_events()
5012 aflt->flt_stat |= (1ull << C_AFSR_FIRSTFLT_SHIFT); in cpu_queue_events()
5024 ((eccp->ec_flags & aflt->flt_status) != 0)) { in cpu_queue_events()
5052 (eccp->ec_flags & aflt->flt_status) != 0) { in cpu_queue_events()
5062 aflt->flt_addr = ch_flt->afar2; in cpu_queue_events()
5066 aflt->flt_addr = primary_afar; in cpu_queue_events()
5069 aflt->flt_addr = primary_afar; in cpu_queue_events()
5071 aflt->flt_stat = primary_afsr; in cpu_queue_events()
5096 aflt->flt_addr = ch_flt->afar2; in cpu_queue_events()
5100 aflt->flt_addr = primary_afar; in cpu_queue_events()
5103 aflt->flt_addr = primary_afar; in cpu_queue_events()
5105 aflt->flt_stat = primary_afsr; in cpu_queue_events()
5121 flt_to_trap_type(struct async_flt *aflt) in flt_to_trap_type() argument
5123 if (aflt->flt_status & ECC_I_TRAP) in flt_to_trap_type()
5125 if (aflt->flt_status & ECC_D_TRAP) in flt_to_trap_type()
5127 if (aflt->flt_status & ECC_F_TRAP) in flt_to_trap_type()
5129 if (aflt->flt_status & ECC_C_TRAP) in flt_to_trap_type()
5131 if (aflt->flt_status & ECC_DP_TRAP) in flt_to_trap_type()
5133 if (aflt->flt_status & ECC_IP_TRAP) in flt_to_trap_type()
5135 if (aflt->flt_status & ECC_ITLB_TRAP) in flt_to_trap_type()
5137 if (aflt->flt_status & ECC_DTLB_TRAP) in flt_to_trap_type()
5159 flt_to_error_type(struct async_flt *aflt) in flt_to_error_type() argument
5169 if (!ce_disp_inited || !aflt->flt_in_memory || aflt->flt_disp == 0) in flt_to_error_type()
5172 dtcrinfo = CE_XDIAG_DTCRINFO(aflt->flt_disp); in flt_to_error_type()
5210 lkyinfo = CE_XDIAG_LKYINFO(aflt->flt_disp); in flt_to_error_type()
5227 ptnrinfo = CE_XDIAG_PTNRINFO(aflt->flt_disp); in flt_to_error_type()
5481 cpu_check_allcpus(struct async_flt *aflt) argument
6321 struct async_flt *aflt; local
6326 aflt = (struct async_flt *)&ch_flt;
6327 aflt->flt_stat = cpu_error_regs->afsr & C_AFSR_MASK;
6331 aflt->flt_addr = cpu_error_regs->afar;
6335 aflt->flt_pc = NULL;
6336 aflt->flt_priv = ((cpu_error_regs->afsr & C_AFSR_PRIV) != 0);
6337 aflt->flt_tl = 0;
6338 aflt->flt_panic = 0;
6357 struct async_flt *aflt; local
6363 aflt = (struct async_flt *)ch_flt;
6364 afsr = aflt->flt_stat;
6366 aflt->flt_id = gethrtime_waitfree();
6367 aflt->flt_bus_id = getprocessorid();
6368 aflt->flt_inst = CPU->cpu_id;
6369 aflt->flt_prot = AFLT_PROT_NONE;
6370 aflt->flt_class = CPU_FAULT;
6371 aflt->flt_status = ECC_C_TRAP;
6423 cpu_ce_scrub_mem_err(aflt, B_TRUE);
6434 cpu_ce_scrub_mem_err(aflt, B_TRUE);
6444 aflt->flt_prot = AFLT_PROT_EC;
6454 aflt->flt_panic);
6487 struct async_flt *aflt; local
6491 aflt = (struct async_flt *)ch_flt;
6492 afsr = aflt->flt_stat;
6665 cpu_ereport_post(struct async_flt *aflt) argument
6671 ch_async_flt_t *ch_flt = (ch_async_flt_t *)aflt;
6677 if (aflt->flt_panic || panicstr) {
6692 switch (cpunodes[aflt->flt_inst].implementation) {
6716 cpu_fmri_cpu_set(detector, aflt->flt_inst);
6722 FM_ERROR_CPU, cpu_type, aflt->flt_erpt_class);
6725 fm_ena_generate_cpu(aflt->flt_id, aflt->flt_inst, FM_ENA_FMT1),
6732 cpu_payload_add_aflt(aflt, ereport, resource,
6736 if (aflt->flt_panic || panicstr) {
6751 msg_type = cpu_flt_bit_to_plat_error(aflt);
6760 aflt->flt_synd, ch_flt->flt_bit);
6762 aflt, unum);
6773 plat_log_fruid_error2(msg_type, unum, aflt,
6780 cpu_run_bus_error_handlers(struct async_flt *aflt, int expected) argument
6788 de.fme_ena = fm_ena_generate_cpu(aflt->flt_id, aflt->flt_inst,
6791 de.fme_bus_specific = (void *)aflt->flt_addr;
6793 if ((aflt->flt_prot == AFLT_PROT_NONE) && (status == DDI_FM_FATAL))
6794 aflt->flt_panic = 1;
6801 struct async_flt *aflt = (struct async_flt *)payload; local
6803 aflt->flt_erpt_class = error_class;
6989 struct async_flt *aflt = (struct async_flt *)&ch_flt; local
7009 aflt->flt_id = gethrtime_waitfree();
7010 aflt->flt_class = CPU_FAULT;
7011 aflt->flt_inst = CPU->cpu_id;
7012 aflt->flt_status = (how << 8) | op;
7013 aflt->flt_payload = FM_EREPORT_PAYLOAD_FPU_HWCOPY;
7021 aflt->flt_panic = (curthread->t_lofault == (uintptr_t)NULL);
7040 sizeof (ch_async_flt_t), ue_queue, aflt->flt_panic);
7042 if (aflt->flt_panic)
7155 struct async_flt *aflt = (struct async_flt *)ch_flt;
7194 if (P2ALIGN(aflt->flt_addr, 64) != P2ALIGN(t_afar, 64))
7211 cpu_flt_bit_to_plat_error(struct async_flt *aflt) argument
7219 ch_async_flt_t *ch_flt = (ch_async_flt_t *)aflt;