/*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <strings.h>
#include <string.h>
#include <errno.h>
#include <cmd.h>
#include <cmd_state.h>
#include <cmd_mem.h>
#include <cmd_dp.h>
#include <cmd_dp_page.h>
#include <libnvpair.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/plat_datapath.h>
/*ARGSUSED*/
static nvlist_t *
{
int err;
return (NULL);
/*
* Version 1 calls for a string-based serial number
*/
if (err != 0) {
return (NULL);
}
return (nvl);
}
cmd_dp_t *
{
int i, found = 0;
/*
* Scan the cmd.cmd_datapaths list to see if there is
* a fault event present that impacts 'cpuid'
*/
found = 1;
break;
}
}
}
if (found)
break;
}
/*
* Check if the FMRI for the found cpuid exists in the domain.
* If it does not, it implies a DR has been done and this DP_FAULT
* is no longer needed.
*/
ptr->dp_serid_list[i]);
}
}
}
return (ptr);
}
cmd_dp_t *
{
/*
* Scan the cmd.cmd_datapaths list to see if there is
* an existing error that matches 'dp'. A match is if
* both dp_err and the base cpuid are identical
*/
return (ptr);
}
}
return (NULL);
}
/*
* Allocates an nvlist_t, and sets ASRU information according to
* the cmd_dp_t provided.
*/
/*ARGSUSED*/
nvlist_t *
{
/* put ASRUs in an nvlist */
for (i = 0; i < sz; i++) {
return (NULL);
if (err != 0) {
for (j = 0; j < i + 1; j++)
nvlist_free(hcelem[j]);
return (NULL);
}
}
/* put it in an HC scheme */
for (j = 0; j < sz; j++)
nvlist_free(hcelem[j]);
return (NULL);
}
if (err != 0) {
for (j = 0; j < sz; j++)
nvlist_free(hcelem[j]);
return (NULL);
}
/* free up memory */
for (j = 0; j < sz; j++)
nvlist_free(hcelem[j]);
/* return the ASRU */
return (asru);
}
void
{
sz != sizeof (cmd_dp_pers_t))
sizeof (cmd_dp_pers_t));
}
static cmd_dp_t *
{
if (psz != sizeof (cmd_dp_pers_t)) {
"version 1 state (%u bytes).\n", sizeof (cmd_dp_pers_t));
}
return (dp);
}
void *
{
break;
}
"found. Case is already solved or closed\n",
return (NULL);
} else {
"does not exist in saved state\n",
}
} else if (dpsz > CMD_DP_MAXSIZE ||
dpsz < CMD_DP_MINSIZE) {
"case %s is out of bounds (is %u bytes, "
}
switch (dp->dp_version) {
case CMD_DP_VERSION_0:
break;
default:
"for dp state referenced by case %s.\n",
break;
}
++cmd.cmd_dp_flag;
(void *)CMD_TIMERTYPE_DP, ep,
}
}
return (dp);
}
void
{
}
void
{
/* close case associated with the timer */
break;
}
}
}
/*
* Validate by matching each cmd_dp_t cpu and serial id to what is
* installed and active on this machine or domain. Delete the cmd_dp_t
* if no match is made.
*/
void
{
int i, no_match;
dp->dp_serid_list[i]);
no_match = 1;
if (no_match) {
break;
}
}
}
}
static void
{
--cmd.cmd_dp_flag;
/*
* If there are no active datapath events, replay any
* pages that were deferred.
*/
if (cmd.cmd_dp_flag == 0)
}
if (destroy)
}
void
{
}
/*ARGSUSED*/
int
{
if (cmd.cmd_dp_flag)
return (1);
else
return (0);
}
int
{
return (-1);
return (rc);
}
return (0);
}
/*ARGSUSED*/
int
{
int mcid;
return (1);
else
return (0);
}
void
{
}
}