display_sun4v.c revision 03831d35f7499c87d51205817c93e9a8d42c4bae
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 2005 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 <time.h>
#include <dirent.h>
#include <fcntl.h>
#include <sys/openpromio.h>
#include <libintl.h>
#include <syslog.h>
#include "pdevinfo.h"
#include "display.h"
#include "display_sun4v.h"
#include "libprtdiag.h"
#if !defined(TEXT_DOMAIN)
#define TEXT_DOMAIN "SYS_TEST"
#endif
extern int sys_clk;
int
{
int exit_code = 0; /* init to all OK */
void *value; /* used for opaque PROM data */
/*
* Now display the machine's configuration. We do this if we
* are not logging.
*/
if (!logging) {
/*
* Display system banner
*/
"banner-name")), 0);
/* display system clock frequency */
"frequency: %d MHz\n"), sys_clk, 0);
}
/* Display the Memory Size */
/* Display the CPU devices */
/* Display the Memory configuration */
/* Display all the IO cards. */
(void) sun4v_display_pci(plafh);
}
return (exit_code);
}
/*
* display_pci
* Display all the PCI IO cards on this board.
*/
void
{
#ifdef lint
#endif
/*
* This function is intentionally empty
*/
}
void
{
#ifdef lint
#endif
/*
* This function is intentionally empty
*/
}
void
{
char *fmt = "%-12s %-5s %-8s %-19s %-5s";
/*
* Display the table header for CPUs . Then display the CPU
* frequency, cache size, and processor revision of all cpus.
*/
"\n"
"========================="
" CPUs "
"==============================================="
"\n"
"\n"));
log_printf("\n");
"Implementation", "Mask", 0);
log_printf("\n");
"-------------------", "-----", 0);
log_printf("\n");
log_printf("\n");
}
/*
* Display the CPUs present on this board.
*/
/*ARGSUSED*/
int
{
int status;
int *int_value;
char *comp_value;
char *no_prop_value = " ";
/*
* Get cpuid property and print it and the NAC name
*/
if (status == PICL_SUCCESS) {
if (status != PICL_SUCCESS) {
} else {
CPU_STRAND_NAC, (int)cpuid);
}
} else {
}
&proph);
if (status == PICL_SUCCESS) {
goto compatible;
}
if (status != PICL_SUCCESS) {
} else {
/* Running frequency */
}
} else
&proph);
if (status == PICL_SUCCESS) {
/*
* Compatible Property only has 1 value
*/
if (comp_value == NULL) {
goto mask;
}
if (status == PICL_SUCCESS) {
}
/*
* Compatible Property has multiple values
*/
if (status != PICL_SUCCESS) {
printf("Failed getting tblh\n");
goto mask;
}
if (status != PICL_SUCCESS) {
printf("Failed getting next by row\n");
goto mask;
}
if (status != PICL_SUCCESS) {
printf("Failed getting prop for rowproph\n");
goto mask;
}
if (comp_value == NULL) {
printf("Failed to get malloc value?\n");
goto mask;
}
if (status != PICL_SUCCESS) {
printf("Failed geting rowproph\n");
goto mask;
} else
}
} else
mask:
if (status == PICL_SUCCESS) {
if (status != PICL_SUCCESS) {
} else {
}
} else
done:
log_printf("\n");
return (PICL_WALK_CONTINUE);
}
void
{
#ifdef lint
#endif
/*
* This function is intentionally empty
*/
}
void
display_boardnum(int num)
{
}