cmd_oplerr.c revision 0cc8ae8667155d352d327b5c92b62899a7e05bcd
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* OPL platform specific functions for
*/
#include <cmd.h>
#include <cmd_page.h>
#include <cmd_opl.h>
#include <string.h>
#include <errno.h>
#include <sys/opl_olympus_regs.h>
#include <sys/int_const.h>
/*
* The following is the common function for handling
* memory UE with EID=MEM.
*/
int hdlr_type)
{
if (nvlist_lookup_nvlist(nvl,
FM_EREPORT_PAYLOAD_NAME_RESOURCE, &rsrc) != 0)
return (CMD_EVD_BAD);
switch (hdlr_type) {
case CMD_OPL_HDLR_CPU:
if (nvlist_lookup_uint64(nvl,
FM_EREPORT_PAYLOAD_NAME_SFAR, &pa) != 0)
return (CMD_EVD_BAD);
(u_longlong_t)pa);
break;
case CMD_OPL_HDLR_IO:
&ubc_ue_log_reg) != 0)
return (CMD_EVD_BAD);
(u_longlong_t)pa);
break;
default:
return (CMD_EVD_BAD);
}
return (CMD_EVD_REDUND);
return (CMD_EVD_BAD);
}
return (CMD_EVD_BAD);
}
return (CMD_EVD_BAD);
}
return (CMD_EVD_OK);
}
/*
* The following is the main function to handle generating
* the sibling cpu suspect list for the CPU detected UE
* error cases. This is to handle the
*/
{
const char *uuid;
"Enter OPL_CPUUE_HANDLER for class %x\n", class);
IS_CORE);
IS_CHIP);
else
} else {
"missing asru, cpuid %u excluded\n",
continue;
}
"cpu not present, cpuid %u excluded\n",
continue;
}
nsusp++;
}
return (CMD_EVD_REDUND);
}
"destroying existing %s state for class %x\n",
}
}
}
"missing rsrc, cpuid %u excluded\n",
continue;
}
}
}
return (CMD_EVD_OK);
}
/*
* This is the common entry for processing MAC detected errors.
* It is responsible for generating the memory page fault event.
* The permanent CE in normal mode is handled here also in the
* same way as in the UE case.
*/
/*ARGSUSED*/
{
return (CMD_EVD_BAD);
!= 0)
return (CMD_EVD_BAD);
/*
* Check for invalid pa.
* The most sig. bit should not be on.
* It would be out of the range of possible pa
* in MAC's view.
*/
return (CMD_EVD_BAD);
return (CMD_EVD_REDUND);
return (CMD_EVD_BAD);
}
return (CMD_EVD_BAD);
}
return (CMD_EVD_BAD);
}
return (CMD_EVD_OK);
}
/*
* respect to EID=MEM.
*/
/*ARGSUSED*/
{
}
/*ARGSUSED*/
{
}