/*
* 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.
*/
/*
* Support routines for managing per-CPU state.
*/
#include <cmd_cpu.h>
#include <cmd_ecache.h>
#include <cmd_mem.h>
#include <cmd.h>
#include <stdio.h>
#include <string.h>
#include <strings.h>
#include <errno.h>
#include <kstat.h>
#include <sys/cheetahregs.h>
/*
* The unused argument 'clcode' is needed for our sun4v sibling.
*/
/*ARGSUSED*/
int
{
return (-1);
&xr->xr_synd_status) != 0)
return (-1);
return (-1);
&xr->xr_afar_status) != 0)
return (-1);
return (0);
}
/*
* Search for the entry that matches the ena and the AFAR
* if we have a valid AFAR, otherwise just match the ENA
*/
{
int i;
if (afar_status == AFLT_STAT_VALID) {
for (i = 0; i < cmd.cmd_xxcu_ntrw; i++) {
return (&cmd.cmd_xxcu_trw[i]);
}
} else {
for (i = 0; i < cmd.cmd_xxcu_ntrw; i++) {
return (&cmd.cmd_xxcu_trw[i]);
}
}
return (NULL);
}
/*ARGSUSED*/
{
return (cmd_xxcu_train_match(trw_mask));
}
/*ARGSUSED*/
int
{
if (afar_status == AFLT_STAT_VALID)
return (0);
return (-1);
}
void
{
if (CMD_ERRCL_ISL2XXCU(clcode)) {
} else {
}
}
/*ARGSUSED*/
int
{
if (synd == CH_POISON_SYND_FROM_XXU_WRITE ||
return (-1);
else
return (0);
}
/*ARGSUSED*/
int
{
if (nvlist_lookup_uint8(nvl,
FM_EREPORT_PAYLOAD_NAME_AFAR_STATUS, &afar_status) == 0) {
if (afar_status == AFLT_STAT_VALID) {
(void) nvlist_lookup_uint64(nvl,
return (0);
} else
return (-1);
} else
return (-1);
}
char *
{
int i;
return (NULL); /* errno is set for us */
(void) kstat_close(kc);
(void) cmd_set_errno(oserr);
return (NULL);
}
(void) kstat_close(kc);
return (str);
}
}
(void) kstat_close(kc);
(void) cmd_set_errno(ENOENT);
return (NULL);
}
char *
{
}
/*ARGSUSED*/
char *
return (NULL);
}
/*ARGSUSED*/
char *
return (NULL);
}
/*ARGSUSED*/
nvlist_t *
{
char *comp;
return (NULL);
return (NULL);
FM_FMRI_LEGACY_HC) != 0 ||
return (NULL);
}
return (NULL);
}
serialstr) != 0) ||
return (NULL);
}
return (fru);
}
nvlist_t *
{
}