/*
* 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
*/
/*
*/
/*
* Support routines for DIMMs.
*/
#include <gmem_mem.h>
#include <gmem_dimm.h>
#include <gmem.h>
#include <errno.h>
#include <limits.h>
#include <string.h>
#include <strings.h>
#include <fcntl.h>
#include <unistd.h>
typedef struct dimmid {
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 *
{
return (dimm);
}
return (NULL);
}
{
char *serial;
return (NULL);
}
return (NULL);
}
serial);
dimm->dimm_phys_addr_hi = 0;
serial);
(char **)&dimm->dimm_serial);
return (dimm);
}
{
char *serial;
int err;
if (err != 0) {
return (NULL);
}
return (dimm);
}
static gmem_dimm_t *
{
if (oldsz != sizeof (gmem_dimm_0_t)) {
"version 0 state (%u bytes).\n", sizeof (gmem_dimm_0_t));
}
new->dimm_phys_addr_hi = 0;
return (new);
}
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;
}
int migrated = 0;
"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);
if (GMEM_DIMM_VERSIONED(dimm)) {
switch (dimm->dimm_version) {
case GMEM_DIMM_VERSION_1:
break;
default:
"for dimm state referenced by case %s.\n",
break;
}
} else {
dimmsz);
migrated = 1;
}
if (migrated) {
}
"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);
}
static int
{
uint_t n;
int i;
int rc = 0;
return (0);
for (i = 0; i < n; i++) {
rc = 1;
break;
}
}
return (rc);
}
/*ARGSUSED*/
int
{
return (0);
return (1);
return (0);
}
int
{
return (1);
}
return (0);
}
void
{
}
}