import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/p9_pgpe_irq_handlers.c
//
//  p9_pgpe_irq_handler_ocb_error
//
//  Handler for OCB_ERROR interrupt which is trigerred by a loss
//  of OCC heartbeat
//
p9_pgpe_irq_handler_ocb_error
Handler for OCB_ERROR interrupt which is trigerred by a loss
of OCC heartbeat
p9_pgpe_irq_handler_ocb_error Handler for OCB_ERROR interrupt which is trigerred by a loss of OCC heartbeat
void p9_pgpe_irq_handler_ocb_err()
{
    ocb_occlfir_t fir;
    fir.value = 0;
    PK_TRACE_INF("OCB FIR Detected");
    out32(G_OCB_OISR0_CLR, BIT32(2));
    PGPE_OPTIONAL_TRACE_AND_PANIC(PGPE_OCC_FIR_IRQ);
    GPE_GETSCOM(OCB_OCCLFIR, fir.value);
    if (fir.fields.occ_hb_error == 1)
    {
        G_pgpe_optrace_data.word[0] = (G_pgpe_pstate_record.activeQuads << 24) |
                                      (G_pgpe_pstate_record.activeCores >> 8);
        G_pgpe_optrace_data.word[1] = (G_pgpe_pstate_record.psCurr.fields.glb << 24) |
                                      (G_pgpe_pstate_record.extVrmCurr << 8) |
                                      PGPE_OP_TRACE_OCC_HB_FAULT;
        p9_pgpe_optrace(SEVERE_FAULT_DETECTED);
        if((G_pgpe_pstate_record.pstatesStatus == PSTATE_ACTIVE))
        {
            G_pgpe_pstate_record.pstatesStatus = PSTATE_SAFE_MODE_PENDING;
        }
        else
        {
            p9_pgpe_pstate_handle_pending_sgpe_ack_on_fault();
        }
        G_pgpe_pstate_record.severeFault[SAFE_MODE_FAULT_OCC] = 1;
    }
    else
    {
        PK_TRACE_ERR("OCCERR: Unexpected OCC_FIR[0x%08x%08x] ", UPPER32(fir.value), LOWER32(fir.value));
        G_pgpe_optrace_data.word[0] = PGPE_OP_UNEXPECTED_OCC_FIR;
        p9_pgpe_optrace(UNEXPECTED_ERROR);
    }
}
void p9_pgpe_irq_handler_ocb_err ( ) { ocb_occlfir_t fir ; fir . value = 0 ; PK_TRACE_INF ( " " ) ; out32 ( G_OCB_OISR0_CLR , BIT32 ( 2 ) ) ; PGPE_OPTIONAL_TRACE_AND_PANIC ( PGPE_OCC_FIR_IRQ ) ; GPE_GETSCOM ( OCB_OCCLFIR , fir . value ) ; if ( fir . fields . occ_hb_error == 1 ) { G_pgpe_optrace_data . word [ 0 ] = ( G_pgpe_pstate_record . activeQuads << 24 ) | ( G_pgpe_pstate_record . activeCores >> 8 ) ; G_pgpe_optrace_data . word [ 1 ] = ( G_pgpe_pstate_record . psCurr . fields . glb << 24 ) | ( G_pgpe_pstate_record . extVrmCurr << 8 ) | PGPE_OP_TRACE_OCC_HB_FAULT ; p9_pgpe_optrace ( SEVERE_FAULT_DETECTED ) ; if ( ( G_pgpe_pstate_record . pstatesStatus == PSTATE_ACTIVE ) ) { G_pgpe_pstate_record . pstatesStatus = PSTATE_SAFE_MODE_PENDING ; } else { p9_pgpe_pstate_handle_pending_sgpe_ack_on_fault ( ) ; } G_pgpe_pstate_record . severeFault [ SAFE_MODE_FAULT_OCC ] = 1 ; } else { PK_TRACE_ERR ( " " , UPPER32 ( fir . value ) , LOWER32 ( fir . value ) ) ; G_pgpe_optrace_data . word [ 0 ] = PGPE_OP_UNEXPECTED_OCC_FIR ; p9_pgpe_optrace ( UNEXPECTED_ERROR ) ; } }
p9_pgpe_irq_handler_ocb_error
Handler for OCB_ERROR interrupt which is trigerred by a loss
of OCC heartbeat
p9_pgpe_irq_handler_ocb_error Handler for OCB_ERROR interrupt which is trigerred by a loss of OCC heartbeat
//Read OCB_LFIR //If OCB_LFIR[occ_hb_error] //Ack any pending IPCs from SGPE