cmd_dimm.c revision cb3f2375234dff602cedb2b5e0afd6c27ec05ecb
/*
* 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"
/*
* Support routines for DIMMs.
*/
#include <cmd_mem.h>
#include <cmd_dimm.h>
#include <cmd_bank.h>
#include <cmd.h>
#include <errno.h>
#include <string.h>
#include <strings.h>
#include <fcntl.h>
#include <unistd.h>
#ifdef sun4v
#include <cmd_hc_sun4v.h>
#include <cmd_branch.h>
#endif /* sun4v */
/*
* because sufficient information was unavailable prior to correlation.
* When the DE completes the pair, it uses this routine to retrieve the
* correct FMRI.
*/
nvlist_t *
{
return (NULL);
return (NULL);
}
return (fmri);
}
nvlist_t *
{
return (dimm->dimm_asru_nvl);
}
nvlist_t *
{
#ifdef sun4v
/*
* Do NOT issue hc scheme FRU FMRIs for ultraSPARC-T1 platforms.
* The SP will misinterpret the FRU. Instead, reuse the ASRU FMRI
*
* Use the BR string as a distinguisher. BR (branch) is only
* present in ultraSPARC-T2/T2plus DIMM unums
*/
} else {
}
#else
#endif /* sun4v */
}
static void
{
#ifdef sun4v
#endif
}
}
#ifdef sun4v
#endif
if (destroy)
}
void
{
int i;
cmd_mq_t *q;
for (i = 0; i < CMD_MAX_CKWDS; i++) {
}
}
}
static cmd_dimm_t *
dimm_lookup_by_unum(const char *unum)
{
return (dimm);
}
return (NULL);
}
static void
{
dimm->dimm_asru_nvl)) {
return;
}
}
}
{
const char *unum;
return (NULL);
}
return (NULL);
}
return (NULL);
}
unum);
return (dimm);
}
{
const char *unum;
return (NULL);
}
/*
* The DIMM doesn't exist anymore, so we need to delete the
* state structure, which is now out of date. The containing
* bank (if any) is also out of date, so blow it away too.
*/
return (NULL);
}
return (dimm);
}
static cmd_dimm_t *
{
if (oldsz != sizeof (cmd_dimm_0_t)) {
"version 0 state (%u bytes).\n", sizeof (cmd_dimm_0_t));
}
return (new);
}
static cmd_dimm_t *
{
if (psz != sizeof (cmd_dimm_pers_t)) {
"version 1 state (%u bytes).\n", sizeof (cmd_dimm_pers_t));
}
return (dimm);
}
void *
{
break;
}
int migrated = 0;
"not exist in saved state\n",
} else if (dimmsz > CMD_DIMM_MAXSIZE ||
dimmsz < CMD_DIMM_MINSIZE) {
"is out of bounds (is %u bytes, max %u, min %u)\n",
}
}
dimm->dimm_version);
if (CMD_DIMM_VERSIONED(dimm)) {
switch (dimm->dimm_version) {
case CMD_DIMM_VERSION_1:
dimmsz);
break;
default:
"for dimm state referenced by case %s.\n",
break;
}
} else {
migrated = 1;
}
if (migrated) {
}
}
switch (ptr->ptr_subtype) {
case BUG_PTR_DIMM_CASE:
/*FALLTHROUGH*/
case CMD_PTR_DIMM_CASE:
break;
default:
}
return (dimm);
}
void
{
}
}
void
{
sizeof (cmd_dimm_pers_t))
/* No need to rewrite the FMRIs in the dimm - they don't change */
sizeof (cmd_dimm_pers_t));
}
void
{
}
void
{
}