dimm_addr.c revision e4b86885570d77af552e9cf94f142f4d744fb8c8
/*
* 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.
*/
#include <sys/mc_intel.h>
#include "dimm_addr.h"
#include "nb_log.h"
#include "rank.h"
#include "dimm_phys.h"
#include "nb5000.h"
struct dimm_geometry **dimm_geometry;
{
uint8_t i;
uint64_t m;
struct rank_geometry *rgp;
return (-1LL);
bank &= ~m;
}
}
cas &= ~m;
}
}
ras &= ~m;
}
}
i = 0;
if (rp->branch_interleave) {
if (branch) {
}
i++;
}
i++;
}
return (pa);
}
{
uint8_t i;
uint64_t m;
struct dimm_geometry *dgp;
struct rank_geometry *rgp;
offset = 0;
bank &= ~m;
}
}
cas &= ~m;
}
}
ras &= ~m;
}
}
return (-1LL);
}
}
static int
{
int i;
FM_FMRI_HC_SPECIFIC_OFFSET, &offset) != 0) ||
return (0);
for (i = 0; i < MC_UNUM_NDIMM; i++)
for (i = 0; i < npr; i++) {
long v;
return (0);
unump->unum_board = (int)v;
unump->unum_dimms[0] = (int)v;
}
return (1);
}
/*ARGSUSED*/
static cmi_errno_t
{
int i;
int last;
for (i = 0; i < last; i++) {
break;
}
if (i < last) {
rt = CMI_SUCCESS;
}
return (rt);
}
/*ARGSUSED*/
static cmi_errno_t
{
return (CMI_SUCCESS);
}
if (pa == -1LL)
return (CMIERR_MC_NOADDR);
return (CMI_SUCCESS);
}
return (CMI_SUCCESS);
}
void
{
dimm_geometry = kmem_zalloc(sizeof (void *) *
}
void
{
kmem_free(dimm_geometry, sizeof (void *) *
dimm_geometry = 0;
rank_base = 0;
}
void
int nrow)
{
int i;
for (i = 0; i < dimm_types; i++) {
&dimm_data[i];
break;
}
}
}
void
{
struct dimm_geometry *dimm;
int interleave_nbits;
if (interleave == 1)
interleave_nbits = 0;
else if (interleave == 2)
interleave_nbits = 1;
else if (interleave == 4)
interleave_nbits = 2;
else
interleave_nbits = 3;
if (dimm)
else
rp->rank_geometry = 0;
}
static const cmi_mc_ops_t inb_mc_ops = {
nb_error_trap /* cmi_mc_logout */
};
/*ARGSUSED*/
int
{
return (CMI_HDL_WALK_NEXT);
}