/*
* 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 <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <ctype.h>
#include <string.h>
#include <kvm.h>
#include <varargs.h>
#include <errno.h>
#include <time.h>
#include <dirent.h>
#include <fcntl.h>
#include <sys/openpromio.h>
#include <sys/spitregs.h>
#include <sys/cheetahregs.h>
#include <kstat.h>
#include <libintl.h>
#include <syslog.h>
#include "pdevinfo.h"
#include "display.h"
#include "pdevinfo_sun4u.h"
#include "display_sun4u.h"
#include "libprtdiag.h"
/*
* Return the operating frequency of a processor in Hertz. This function
* requires as input a legal prom node pointer. If a NULL
* is passed in or the clock-frequency property does not exist, the
* function returns 0.
*/
{
/* find the property */
return (0);
}
return (0);
}
return (*value);
}
/*
* returns the size of the given processors external cache in
* bytes. If the properties required to determine this are not
* present, then the function returns 0.
*/
int
{
/* find the properties */
"ecache-size"))) {
return (*cache_size_p);
}
"l3-cache-size"))) {
return (*cache_size_p);
}
"l2-cache-size"))) {
return (*cache_size_p);
}
return (0);
}
/*
* This routine is the generic link into displaying CPU and memory info.
* It displays the table header, then calls the CPU and memory display
* routine for all boards.
*/
void
{
/*
* Display the table header for CPUs . Then display the CPU
* frequency, cache size, and processor revision of all cpus.
*/
log_printf("\n", 0);
log_printf("=========================", 0);
log_printf(" CPUs ", 0);
log_printf("=========================", 0);
log_printf("\n", 0);
log_printf("\n", 0);
log_printf(" Run Ecache "
" CPU CPU\n", 0);
log_printf("Brd CPU Module MHz MB "
"Impl. Mask\n", 0);
log_printf("--- --- ------- ----- ------ "
"------ ----\n", 0);
/* Now display all of the cpus on each board */
}
log_printf("\n", 0);
}
/*
* Display the CPUs present on this board.
*/
void
{
/*
* display the CPUs' operating frequency, cache size, impl. field
* and mask revision.
*/
int *mid;
int *impl;
}
/* Do not display a failed CPU node */
/* Board number */
/* CPU MID */
/* Module number */
display_mid(*mid);
/* Running frequency */
/* Ecache size */
if (ecache_size == 0)
else
log_printf(" %4.1f ",
0);
/* Implementation */
} else {
switch (*impl) {
case SPITFIRE_IMPL:
break;
case BLACKBIRD_IMPL:
break;
case CHEETAH_IMPL:
break;
case CHEETAH_PLUS_IMPL:
break;
case JAGUAR_IMPL:
break;
default:
break;
}
}
/* CPU Mask */
} else {
else
decoded_mask = *mask;
decoded_mask & 0xf, 0);
}
log_printf("\n", 0);
}
}
}
void
{
}