/*
* 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 <cmd_mem.h>
#include <limits.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
{
int i;
cmd_mq_t *q;
#ifdef sun4v
#endif
}
}
for (i = 0; i < CMD_MAX_CKWDS; i++) {
}
}
}
}
}
#ifdef sun4v
#endif
if (destroy)
}
void
{
}
static cmd_dimm_t *
{
return (dimm);
}
return (NULL);
}
static void
{
dimm->dimm_asru_nvl)) {
return;
}
}
}
{
const char *unum;
return (NULL);
}
return (NULL);
}
#ifdef sun4v
&nserids) != 0) {
" have serial_ids\n");
return (NULL);
}
#endif
return (NULL);
}
dimm->dimm_phys_addr_hi = 0;
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));
}
new->dimm_phys_addr_hi = 0;
return (new);
}
static cmd_dimm_t *
{
if (oldsz != sizeof (cmd_dimm_1_t)) {
"version 1 state (%u bytes).\n", sizeof (cmd_dimm_1_t));
}
new->dimm_phys_addr_hi = 0;
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) {
"dimm buffer referenced by case %s "
"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;
case CMD_DIMM_VERSION_2:
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
{
}
void
{
next = cmd_list_next(d);
if (cmd_same_datapath_dimms(dimm, d))
d->dimm_syl_error = upos;
}
}
int
{
int upos;
return (0);
next = cmd_list_next(d);
if (cmd_same_datapath_dimms(dimm, d) &&
(d->dimm_syl_error == upos))
return (1);
}
return (0);
}