📄 ci_error.c
字号:
* 7. Appropriate CI port microcode revision levels. * 8. CPU microcode revision levels. * 9. Initial local CI port initialization information. * * Certain events may also be logged without displaying any variable * information. * * Which CI port registers are selected for console logging( Class 3 ) is * dependent upon hardware port type: * * CI750 CNFR, PMCSR, and PSR * CI780 * CIBCI * * CIBCA BER, PMCSR, and PSR. * * CIXCD XBER, PMCSR, and PSR. * * In the case of certain specific events the PESR is also logged. * * Only the CIBCI logs events which fall into the BI register class( Class * 5 ). The CIBCA does NOT. Registers displayed include: BICSR, BER, and * CNFR. * * The accessibility of each register location is always checked prior to * accessing because the local port is itself suspect whenever this routine * is invoked and requested to display register contents. Inability to * access a location implies unavailability of the port itself( ie - brain * damage ) and the specific access is bypassed. A more extensive * explanation of why and when register accesses require protection may be * found at the front of this module. * * A panic occurs whenever the CI port driver is not prepared to log the * event due to detection of any of the following circumstances: * * 1. The event type is unknown. * 2. The event is a SCS specific event. * 3. The severity level of the event is invalid. * 4. The code of the event exceeds the current maximum known code for the * class( CI or CI PPD ) and severity level of the event. * 5. The event is not represented within the appropriate console logging * formatting table( indicating that the CI port driver should never * have been asked to log it in the first place ). * 6. The class of variable information associated with the event is * unknown. * * None of these circumstances should ever occur. * * NOTE: Events represented within console logging format tables by NULL * entries are events which are to be logged only by the CI PPD and * never by individual port drivers like the CI port driver. * Currently, only certain path specific CI PPD severe error events * fall into this category. */ if(( event_type < PATH_EVENT || event_type > LPORT_EVENT ) || Test_scs_event( event ) || severity > ES_FE || Ecode( event ) > Clog_maxcode( ci_cltab, event ) || Clog_tabmsg( ci_cltab, event ) == NULL ) { ( void )panic( PANIC_UNKCODE ); } else if(( fcode = Clog_tabcode( ci_cltab, event )) && ( fcode < CF_RPORT || fcode > CF_INIT )) { ( void )panic( PANIC_UNKCF ); } else if( ci_severity > severity && !Test_cloverride( event )) { return; } ( void )cprintf( "%4s\t- ", &pccb->lpinfo.name ); switch( event_type ) { case PATH_EVENT: if( severity == ES_E || severity == ES_SE ) { if( severity == ES_E ) { ( void )cprintf( "error on path" ); } else { ( void )cprintf( "severe error on path" ); } ( void )cprintf( "( local/remote port: %u/", Scaaddr_low( pccb->lpinfo.addr )); if( pb ) { ( void )cprintf( "%u, remote system: ", Scaaddr_low( pb->pinfo.rport_addr )); if( pb->sb ) { ( void )cprintf( "%8s )\n\t- ", pb->sb->sinfo.node_name ); } else { ( void )cprintf( "? )\n\t- " ); } } else { ( void )cprintf( "?, remote system: ? )\n\t- " ); } } break; case LPORT_EVENT: if( severity >= ES_E ) { if( Test_lpc_event( event )) { ( void )cprintf( "port failing, " ); } switch( severity ) { case ES_E: ( void )cprintf( "error( local port %u )\n\t- ", Scaaddr_low( pccb->lpinfo.addr )); break; case ES_SE: ( void )cprintf( "severe error( local port %u )\n\t- ", Scaaddr_low( pccb->lpinfo.addr )); break; case ES_FE: ( void )cprintf( "fatal error( local port %u )\n\t- ", Scaaddr_low( pccb->lpinfo.addr )); break; } } break; } ( void )cprintf( "%s", Clog_tabmsg( ci_cltab, event )); switch( fcode ) { case CF_NONE: ( void )cprintf( "\n" ); break; case CF_RPORT: if( pb ) { ( void )cprintf( "( remote port: %u )\n", Scaaddr_low( pb->pinfo.rport_addr )); } else { ( void )cprintf( "( remote port: ? )\n" ); } break; case CF_LPORT: ( void )cprintf( "( local port %u )\n", Scaaddr_low( pccb->lpinfo.addr )); break; case CF_PPR: Lock_cidevice( pccb ) data = Get_reg( pccb->Ppr ); Unlock_cidevice( pccb ) ( void )cprintf( "\n\t- ppr: 0x%08lx\n", data ); break; case CF_REGS: switch( pccb->lpinfo.type.hwtype ) { case HPT_CI750: case HPT_CI780: case HPT_CIBCI: ( void )cprintf( "\n\t- cnfr/pmcsr/psr: 0x%08lx", Get_reg( pccb->Cnfr )); break; case HPT_CIBCA_AA: case HPT_CIBCA_BA: ( void )cprintf( "\n\t- ber/pmcsr/psr: 0x%08lx", Get_reg( pccb->Bierr )); break; case HPT_CIXCD: Lock_cidevice( pccb ) data = Get_reg( pccb->Xbe ); Unlock_cidevice( pccb ) ( void )cprintf( "\n\t- xber/pmcsr/psr: 0x%08lx", data ); break; case HPT_CIKMF: ( void )cprintf( "\n\t- xpcpser/xpcpstat/pmcsr/psr:\n\t0x%08lx/0x%08lx", Get_reg( pccb->Xpcpser ),Get_reg( pccb->Xpcpstat )); break; default: ( void )panic( PANIC_HPT ); } Lock_cidevice( pccb ) data = Get_reg( pccb->Pmcsr ); Unlock_cidevice( pccb ) ( void )cprintf( "/0x%08lx", data ); Lock_cidevice( pccb ) data = Get_reg( pccb->Psr ); Unlock_cidevice( pccb ) ( void )cprintf( "/0x%08lx\n", data ); break; case CF_REGS2: switch( pccb->lpinfo.type.hwtype ) { case HPT_CI750: case HPT_CI780: case HPT_CIBCI: ( void )cprintf( "\n\t- cnfr/pmcsr/psr/pesr/pfar:\n\t0x%08lx", Get_reg( pccb->Cnfr )); break; case HPT_CIBCA_AA: case HPT_CIBCA_BA: ( void )cprintf( "\n\t- ber/pmcsr/psr/pesr/pfar:\n\t0x%08lx", Get_reg( pccb->Bierr )); break; case HPT_CIXCD: Lock_cidevice( pccb ) data = Get_reg( pccb->Xbe ); Unlock_cidevice( pccb ) ( void )cprintf( "\n\t- xber/pmcsr/psr/pesr/pfar:\n\t0x%08lx", data ); break; case HPT_CIKMF: ( void )cprintf( "\n\t- xpcpser/xpcpstat/pmcsr/psr/pesr/pfar:\n\t0x%08lx/0x%08lx", Get_reg( pccb->Xpcpser ),Get_reg( pccb->Xpcpstat )); break; default: ( void )panic( PANIC_HPT ); } Lock_cidevice( pccb ) data = Get_reg( pccb->Pmcsr ); Unlock_cidevice( pccb ) ( void )cprintf( "/0x%08lx", data ); Lock_cidevice( pccb ) data = Get_reg( pccb->Psr ); Unlock_cidevice( pccb ) ( void )cprintf( "/0x%08lx", data ); Lock_cidevice( pccb ) data = Get_reg( pccb->Pesr ); Unlock_cidevice( pccb ) ( void )cprintf( "/0x%08lx", data ); Lock_cidevice( pccb ) data = Get_reg( pccb->Pfar ); Unlock_cidevice( pccb ) ( void )cprintf( "/0x%08lx\n", data ); break; case CF_BIREGS: if( pccb->lpinfo.type.hwtype == HPT_CIBCI ) { cprintf( "\n\t- bicsr/ber/cnfr: 0x%08lx/0x%08lx/0x%08lx\n", Get_reg( pccb->Bictrl ), Get_reg( pccb->Bierr ), Get_reg( pccb->Cnfr )); } else { ( void )panic( PANIC_HPT ); } break; case CF_PKT: ( void )cprintf( "\n\t- flags/opcode/status/port: " ); if( cibp ) { ( void )cprintf( "0x%02x/0x%02x/0x%02x/0x%02x\n", ( u_long )*( u_char * )&cibp->flags, ( u_long )cibp->opcode, ( u_long )*( u_char * )&cibp->status, ( u_long )Get_pgrp( pccb, cibp )); } else { ( void )cprintf( "0x??/0x??/0x??/0x??\n" ); } break; case CF_UCODE: if( severity < ES_SE ) { ( void )cprintf( "( local port %u )", Scaaddr_low( pccb->lpinfo.addr )); } switch( pccb->lpinfo.type.hwtype ) { case HPT_CI750: case HPT_CI780: case HPT_CIBCI: ( void )cprintf( "\n\t- current ram/prom: %u/%u", pccb->Devattn.cirevlev.ci_ramlev, pccb->Devattn.cirevlev.ci_romlev ); ( void )cprintf( "\n\t- supported ram/prom: %u/%u\n", pccb->Max_fn_level, pccb->Max_rom_level ); break; case HPT_CIBCA_AA: case HPT_CIBCA_BA: case HPT_CIXCD: case HPT_CIKMF: ( void )cprintf( "\n\t- current functional/self-test " ); ( void )cprintf( "microcode levels: %u/%u", pccb->Devattn.cirevlev.ci_ramlev, pccb->Devattn.cirevlev.ci_romlev ); ( void )cprintf( "\n\t- supported functional/self-test " ); ( void )cprintf( "microcode levels: %u/%u\n", pccb->Max_fn_level, pccb->Max_rom_level ); break; default: ( void )panic( PANIC_HPT ); } break; case CF_CPU: ( void )cprintf( "\n\t- current/minimum %4s CPU microcode ", ( u_char * )&pccb->Devattn.cicpurevlev.ci_hwtype); ( void )cprintf( "revision level is: %u/%u\n", pccb->Devattn.cicpurevlev.ci_currevlev, pccb->Devattn.cicpurevlev.ci_mincpurev ); break; case CF_INIT: ( void )cprintf( "( local port %u )", Scaaddr_low( pccb->lpinfo.addr )); switch( pccb->lpinfo.type.hwtype ) { case HPT_CI750: case HPT_CI780: case HPT_CIBCI: ( void )cprintf( "\n\t- ram/prom: " ); break; case HPT_CIBCA_AA: case HPT_CIBCA_BA: case HPT_CIXCD: case HPT_CIKMF: cprintf("\n\t- functional/self-test microcode levels: " ); break; default: ( void )panic( PANIC_HPT ); } ( void )cprintf( "%u/%u\n", pccb->Devattn.cirevlev.ci_ramlev, pccb->Devattn.cirevlev.ci_romlev ); break; }}/* Name: ci_log_badport - Log Bad Port Numbers in CI Packets *
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -