fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * CDDL HEADER START
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * The contents of this file are subject to the terms of the
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * Common Development and Distribution License (the "License").
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * You may not use this file except in compliance with the License.
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * See the License for the specific language governing permissions
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * and limitations under the License.
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * When distributing Covered Code, include this CDDL HEADER in each
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * If applicable, add the following below this CDDL HEADER, with the
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * fields enclosed by brackets "[]" replaced with your own identifying
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * information: Portions Copyright [yyyy] [name of copyright owner]
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * CDDL HEADER END
0e7515250c8395f368aa45fb9acae7c4f8f8b786Eric Saxe * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * Use is subject to license terms.
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * Display processor group information
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * PG hardware types indexed by hardware ID
0e7515250c8395f368aa45fb9acae7c4f8f8b786Eric Saxe "active_pwr",
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * Convert HW id to symbolic name
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxestatic char *
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe return ((hw < 0 || hw > NHW) ? "UNKNOWN" : pg_hw_names[hw]);
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * Display processor group.
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe/* ARGSUSED */
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxepg(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe /* Should provide an address */
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe "HARDWARE",
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * Read pg at specified address
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * In quiet mode just print pg address
c0a3d87bd66ca5a9f1c81e383ee86d31aebd8ab7Rafael Vanoni if (mdb_vread(&pg_class, sizeof (struct pg_class),
c0a3d87bd66ca5a9f1c81e383ee86d31aebd8ab7Rafael Vanoni mdb_warn("unable to read 'pg_class' at %p", pg.pg_class);
0e7515250c8395f368aa45fb9acae7c4f8f8b786Eric Saxe if (mdb_vread(&pg_cmt, sizeof (pg_cmt_t), addr) == -1) {
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe if (mdb_vread(&pghw, sizeof (struct pghw), addr) == -1) {
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * Display the physical PG info.
fb2f18f820d90b001aea4fb27dd654bc1263c440esaxe * Display the basic PG info.