cmd_branch.c revision fbd1c0dae6f4a2ccc2ce0527c7f19d3dd5ea90b8
/*
* 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 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <cmd_mem.h>
#include <cmd_branch.h>
#include <cmd_dimm.h>
#include <cmd.h>
#include <cmd_hc_sun4v.h>
#include <errno.h>
#include <string.h>
#include <strings.h>
#include <fcntl.h>
#include <unistd.h>
#define BUF_SIZE 120
void
{
return;
}
void
{
return;
}
}
"Attempt to disconnect dimm from non-parent branch\n");
}
static cmd_dimm_t *
{
return (dimm);
}
}
return (NULL);
}
/*
* The cmd_dimm_t structure created for a DIMM in a branch never has a
* Jxxx in its unum; the cmd_dimm_t structure created for a DIMM containing
* a page, or in a bank (i.e. for ECC errors)-always-has a Jxxx in its
* unum. Therefore the set of cmd_dimm_t's created for a branch is always
* the cmd_dimm_create will never link a 'branch' cmd_dimm_t into bank.
* Faulting a DIMM for ECC will not prevent subsequent faulting of "same"
*/
static int
{
int channel, d;
int dimm_count = 0;
for (d = 0; d < MAX_DIMMS_IN_CHANNEL; d++) {
dimm_count++;
}
}
}
return (dimm_count);
}
void
{
int dimm_count;
/* attach the dimms to the branch */
if (dimm_count != 0)
/* create motherboard fault */
/* create dimm faults */
flt);
}
}
}
{
const char *b_unum;
return (NULL);
}
"branch_%s", b_unum);
b_unum);
(char **)&branch->branch_unum);
return (branch);
}
{
/*
*/
return (NULL);
return (branch);
}
return (NULL);
}
{
const char *unum;
return (NULL);
}
return (branch);
}
return (NULL);
}
static cmd_branch_t *
{
if (psz != sizeof (cmd_branch_pers_t)) {
"version 0 state (%u bytes).\n",
sizeof (cmd_branch_pers_t));
}
return (branch);
}
void *
{
break;
}
"not exist in saved state\n",
} else if (branchsz > CMD_BRANCH_MAXSIZE ||
"branch buffer referenced by case %s "
"is out of bounds (is %u bytes, max %u, min %u)\n",
}
}
switch (branch->branch_version) {
case CMD_BRANCH_VERSION_0:
break;
default:
"for branch state referenced by case %s.\n",
cp));
break;
}
}
switch (ptr->ptr_subtype) {
case CMD_PTR_BRANCH_CASE:
break;
default:
}
return (branch);
}
void
{
sizeof (cmd_branch_pers_t))
/* No need to rewrite the FMRIs in the branch - they don't change */
sizeof (cmd_branch_pers_t));
}
static void
{
}
}
static void
{
if (destroy) {
}
}
}
if (destroy)
}
void
{
}
int
{
int channel, d;
for (d = 0; d < MAX_DIMMS_IN_CHANNEL; d++) {
return (1);
}
}
}
return (0);
}
/*
* If the case has been solved, don't need to check the dimmlist
* If the case has not been solved, the branch is valid if there is least one
* existing dimm in the branch
*/
void
{
continue;
continue;
}
}
void
{
}
void
{
}