chip_intel.c revision efd31e1d839d4665462b5c267a1c654548082663
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * CDDL HEADER START
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * The contents of this file are subject to the terms of the
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Common Development and Distribution License (the "License").
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * You may not use this file except in compliance with the License.
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * See the License for the specific language governing permissions
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * and limitations under the License.
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * When distributing Covered Code, include this CDDL HEADER in each
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * If applicable, add the following below this CDDL HEADER, with the
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * fields enclosed by brackets "[]" replaced with your own identifying
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * information: Portions Copyright [yyyy] [name of copyright owner]
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * CDDL HEADER END
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe#define MAX(a, b) ((a) > (b) ? (a) : (b))
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowestatic const topo_pgroup_info_t dimm_channel_pgroup =
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe { PGNAME(CHAN), TOPO_STABILITY_PRIVATE, TOPO_STABILITY_PRIVATE, 1 };
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe { PGNAME(DIMM), TOPO_STABILITY_PRIVATE, TOPO_STABILITY_PRIVATE, 1 };
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe { PGNAME(RANK), TOPO_STABILITY_PRIVATE, TOPO_STABILITY_PRIVATE, 1 };
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe { PGNAME(MCT), TOPO_STABILITY_PRIVATE, TOPO_STABILITY_PRIVATE, 1 };
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe { SIMPLE_DIMM_LBL, "Property method", 0, TOPO_STABILITY_INTERNAL,
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe { SIMPLE_DIMM_LBL_MP, "Property method", 0, TOPO_STABILITY_INTERNAL,
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe { SEQ_DIMM_LBL, "Property method", 0, TOPO_STABILITY_INTERNAL,
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Loweextern const topo_method_t ntv_page_retire_methods[];
10d63b7db37a83b39c7f511cf9426c9d03ea0760Richard Lowe (void) snprintf(path, sizeof (path), "/dev/mc/mc%d", id);
int rank;
int err = 0;
for (i = 0; i < nranks; i++) {
ntv_page_retire_methods) < 0)
rank++;
int err;
char *name;
for (i = 0; i < ndimms; i++) {
dimm_number = i;
int channum;
smbid);
smbid);
smbid);
dnode);
if (nranks) {
char *name;
int err;
&ndimms) == 0) {
int err;
int channel;
char *pname;
&nchannels) != 0) {
maxdimms = 0;
channel = 0;
for (i = 0; i < nmc; i++) {
for (j = 0; j < nchannels; j++) {
maxranks) < 0) {
channel++;
mcnode);
return (NULL);
int rc;
return (NULL);
return (NULL);
return (NULL);
return (rc);