#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/param.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/utsname.h>
#include <sys/openpromio.h>
#include <libintl.h>
#include <syslog.h>
#include <sys/dkio.h>
#include "pdevinfo.h"
#include "display.h"
#include "pdevinfo_sun4u.h"
#include "display_sun4u.h"
#include "libprtdiag.h"
#if !defined(TEXT_DOMAIN)
#define TEXT_DOMAIN "SYS_TEST"
#endif
extern int sys_clk;
int
display(Sys_tree *tree,
Prom_node *root,
struct system_kstat_data *kstats,
int syserrlog)
{
int exit_code = 0;
void *value;
struct mem_total memory_total;
sys_clk = -1;
exit_code = error_check(tree, kstats);
if (!logging || exit_code) {
struct utsname uts_buf;
(void) uname(&uts_buf);
log_printf(dgettext(TEXT_DOMAIN, "System Configuration: "
"Oracle Corporation %s %s\n"), uts_buf.machine,
get_prop_val(find_prop(root, "banner-name")), 0);
value = get_prop_val(find_prop(root, "clock-frequency"));
if (value != NULL) {
sys_clk = ((*((int *)value)) + 500000) / 1000000;
log_printf(dgettext(TEXT_DOMAIN, "System clock "
"frequency: %d MHz\n"), sys_clk, 0);
}
display_memorysize(tree, kstats, &memory_total);
display_platform_specific_header();
display_cpu_devices(tree);
display_memoryconf(tree);
(void) display_io_devices(tree);
display_hp_fail_fault(tree, kstats);
display_diaginfo((syserrlog || (logging && exit_code)),
root, tree, kstats);
}
return (exit_code);
}
int
error_check(Sys_tree *tree, struct system_kstat_data *kstats)
{
#ifdef lint
tree = tree;
kstats = kstats;
#endif
return (0);
}
int
disp_fail_parts(Sys_tree *tree)
{
#ifdef lint
tree = tree;
#endif
return (0);
}
void
display_hp_fail_fault(Sys_tree *tree, struct system_kstat_data *kstats)
{
#ifdef lint
tree = tree;
kstats = kstats;
#endif
}
void
display_diaginfo(int flag, Prom_node *root, Sys_tree *tree,
struct system_kstat_data *kstats)
{
#ifdef lint
flag = flag;
root = root;
tree = tree;
kstats = kstats;
#endif
}
void
resolve_board_types(Sys_tree *tree)
{
#ifdef lint
tree = tree;
#endif
}
void
display_boardnum(int num)
{
log_printf("%2d ", num, 0);
}
void
display_platform_specific_header(void)
{
}