cmd_dimm.c revision 6dfee4834394825da35b977ca71cdc965bc7b6a4
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 2005 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>
/*
* 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 *
{
}
static void
{
}
}
if (destroy)
}
void
{
}
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);
}
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
{
}