gmem_dimm.c revision 1529f529004c61fcfd0d95ab79b0f257d6ad4451
/*
* 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 DIMMs.
*/
#include <gmem_mem.h>
#include <gmem_dimm.h>
#include <gmem.h>
#include <errno.h>
#include <string.h>
#include <strings.h>
#include <fcntl.h>
#include <unistd.h>
typedef struct dimmid {
char serial[100];
int type;
} dimmid_t;
nvlist_t *
{
return (dimm->dimm_asru_nvl);
}
static void
{
int i;
gmem_mq_t *q;
}
}
for (i = 0; i < GMEM_MAX_CKWDS; i++) {
}
}
}
if (destroy)
}
void
{
}
static gmem_dimm_t *
dimm_lookup_by_serial(const char *serial)
{
return (dimm);
}
return (NULL);
}
{
char *serial;
return (NULL);
}
return (NULL);
}
serial);
serial);
(char **)&dimm->dimm_serial);
return (dimm);
}
{
char *serial;
int err;
if (err != 0) {
return (NULL);
}
return (dimm);
}
static gmem_dimm_t *
{
if (psz != sizeof (gmem_dimm_pers_t)) {
"version 0 state (%u bytes).\n", sizeof (gmem_dimm_pers_t));
}
return (dimm);
}
void *
{
break;
}
"not exist in saved state\n",
} else if (dimmsz > GMEM_DIMM_MAXSIZE ||
dimmsz < GMEM_DIMM_MINSIZE) {
"is out of bounds (is %u bytes, max %u, min %u)\n",
}
}
dimm->dimm_version);
switch (dimm->dimm_version) {
case GMEM_DIMM_VERSION_0:
dimmsz);
break;
default:
"for dimm state referenced by case %s.\n",
break;
}
"failed to retrieve serial from asru");
}
switch (ptr->ptr_subtype) {
case GMEM_PTR_DIMM_CASE:
dimm->dimm_serial);
break;
default:
}
return (dimm);
}
void
{
}
}
void
{
sizeof (gmem_dimm_pers_t))
/* No need to rewrite the FMRIs in the dimm - they don't change */
sizeof (gmem_dimm_pers_t));
}
void
{
}
void
{
}
/*ARGSUSED*/
static int
{
char *topo_sn;
int err;
return (TOPO_WALK_NEXT);
if (err != 0) {
return (TOPO_WALK_NEXT);
}
return (TOPO_WALK_NEXT);
}
case FINDFRU:
break;
case FINDRSC:
}
break;
case FINDASRU:
}
break;
default:
break;
}
return (TOPO_WALK_TERMINATE);
}
nvlist_t *
int err;
return (NULL);
return (NULL);
}
return (dimm_nvl);
}
nvlist_t *
{
}
nvlist_t *
{
}
nvlist_t *
{
}
int
{
char *sn;
return (0);
}
return (0);
}
return (1);
}