gmem_dimm.h 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.
*/
#ifndef _GMEM_DIMM_H
#define _GMEM_DIMM_H
/*
* Memory modules are described by the gmem_dimm general-purpose state
* structure.
*
* Data structure P? Case? Notes
* ---------------- --- ----- ----------------------------------------------
* gmem_dimm_t Yes No Name is derived from the serial ("dimm_%s")
* gmem_case_ptr_t Yes Yes Name is case's UUID
* dimm_asru Yes No Name is derived from the serial
* ("dimm_asru_%s")
* dimm_serial No No Pointer into ASRU - relinked during restore
*/
#include <gmem_mem.h>
#include <values.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* GMEM_MAX_CKWDS denotes the highest number, across all covered
* SPARC architectures, of checkwords per cache line.
*/
#define GMEM_MAX_CKWDS 8
#define FINDRSC 0
#define FINDFRU 1
#define FINDASRU 2
#define GMEM_DIMM_VERSION_0 DIMM_MKVERSION(0)
#define GMEM_DIMM_VERSION GMEM_DIMM_VERSION_0
#define GMEM_DIMM_STAT_PREFIX "DIMM_"
typedef struct gmem_dimm_pers {
/*
* Index block for MQSC rules 4A and 4B correlation of memory CEs
* on a single DIMM. "Unit Position" refers to bit or nibble depending
* on the memory ECC. This structure is not persisted.
*/
typedef struct gmem_mq {
char *mq_serdnm; /* serd eng to retain CE events */
} gmem_mq_t;
struct gmem_dimm {
char *dimm_serial; /* Dimm serial number */
};
#define GMEM_DIMM_MAXSIZE sizeof (gmem_dimm_pers_t)
#define GMEM_DIMM_MINSIZE sizeof (gmem_dimm_pers_t)
uint16_t);
extern void gmem_dimm_validate(fmd_hdl_t *);
extern void gmem_dimm_gc(fmd_hdl_t *);
extern void gmem_dimm_fini(fmd_hdl_t *);
#ifdef __cplusplus
}
#endif
#endif /* _GMEM_DIMM_H */