/*
* 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.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "mdescplugin.h"
#include <limits.h>
/* These 3 variable are defined and set in mdescplugin.c */
extern picl_nodehdl_t root_node;
extern mde_cookie_t rootnode;
void
{
}
static boolean_t
{
int status;
if (status == PICL_SUCCESS)
return (B_TRUE);
else
return (B_FALSE);
}
static void
{
}
}
static void
{
int i;
for (i = 0; i < ntlbs; i++) {
&type_size)) {
return;
}
total_size = type_flag = 0;
while (total_size < type_size) {
sizeof (str));
type_flag |= ICACHE_FLAG;
type_flag |= DCACHE_FLAG;
total_size += str_size;
}
switch (type_flag) {
case 1:
"itlb");
break;
case 2:
"dtlb");
break;
default:
"Not a known cache type");
}
&int_value))) {
"%s-entries", tlb_str);
}
}
}
static void
{
int i;
for (i = 0; i < ncaches; i++) {
&type_size)) {
return;
}
return;
}
total_size = type_flag = 0;
while (total_size < type_size) {
sizeof (str));
type_flag |= ICACHE_FLAG;
type_flag |= DCACHE_FLAG;
total_size += str_size;
}
switch (type_flag) {
case 1:
"l%d-icache", (int)int_value);
break;
case 2:
"l%d-dcache", (int)int_value);
break;
case 3:
"l%d-cache", (int)int_value);
break;
default:
"Not a known cache type");
}
&int_value))) {
"%s-associativity", cache_str);
}
&int_value))) {
}
&int_value))) {
"%s-line-size", cache_str);
}
}
}
static void
{
&uint64_value)) {
return;
}
}
/*
* Return the number of strings in the buffer
*/
static int
{
int count;
char *lastnull;
char *nullptr;
count = 1;
count++;
return (count);
}
static void
{
char *compat;
int len;
int count;
void add_string_list_prop(picl_nodehdl_t, char *, char *,
unsigned int);
return;
&len)) {
return;
}
return;
if (count == 1) {
return;
}
}
static void
{
}
int
{
int x, num_nodes;
int status;
int int_value;
sizeof (reg_prop));
if (status != PICL_SUCCESS) {
return (PICL_WALK_TERMINATE);
}
/*
* Allocate space for our searches.
*/
return (PICL_WALK_TERMINATE);
}
if (cachelistp == NULL) {
return (PICL_WALK_TERMINATE);
}
return (PICL_WALK_TERMINATE);
}
/*
* Starting at the root node, scan the "fwd" dag for
* all the cpus in this description.
*/
if (ncpus < 0) {
return (PICL_WALK_TERMINATE);
}
/*
* Create PD cpus with a few select properties
*/
for (x = 0; x < ncpus; x++) {
continue;
}
if (int64_value != cpuid)
continue;
/* get caches for CPU */
/* get tlbs for CPU */
tlblistp);
}
return (PICL_WALK_CONTINUE);
}