4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
22 * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
35 #include <sys/param.h>
37 #include <sys/types.h>
38 #include <sys/utsname.h>
39 #include <sys/openpromio.h>
45 #include "pdevinfo_sun4u.h"
46 #include "display_sun4u.h"
47 #include "libprtdiag.h"
50 #if !defined(TEXT_DOMAIN)
51 #define TEXT_DOMAIN "SYS_TEST"
57 display(Sys_tree
*tree
,
59 struct system_kstat_data
*kstats
,
62 int exit_code
= 0; /* init to all OK */
63 void *value
; /* used for opaque PROM data */
64 struct mem_total memory_total
; /* Total memory in system */
65 struct grp_info grps
; /* Info on all groups in system */
67 sys_clk
= -1; /* System clock freq. (in MHz) */
70 * silently check for any types of machine errors
72 exit_code
= error_check(tree
, kstats
);
75 * Now display the machine's configuration. We do this if we
76 * are not logging or exit_code is set (machine is broke).
78 if (!logging
|| exit_code
) {
79 struct utsname uts_buf
;
82 * Display system banner
84 (void) uname(&uts_buf
);
86 log_printf(dgettext(TEXT_DOMAIN
, "System Configuration: "
87 "Oracle Corporation %s %s\n"), uts_buf
.machine
,
88 get_prop_val(find_prop(root
, "banner-name")), 0);
90 /* display system clock frequency */
91 value
= get_prop_val(find_prop(root
, "clock-frequency"));
93 sys_clk
= ((*((int *)value
)) + 500000) / 1000000;
94 log_printf(dgettext(TEXT_DOMAIN
, "System clock "
95 "frequency: %d MHz\n"), sys_clk
, 0);
98 /* Display the Memory Size */
99 display_memorysize(tree
, kstats
, &grps
, &memory_total
);
101 /* Display platform specific configuration info */
102 display_platform_specific_header();
104 /* Display the CPU devices */
105 display_cpu_devices(tree
);
107 /* Display the Memory configuration */
108 display_memoryconf(tree
, &grps
);
110 /* Display all the IO cards. */
111 (void) display_io_devices(tree
);
115 * Display any Hot plugged, disabled and failed board(s)
118 display_hp_fail_fault(tree
, kstats
);
120 display_diaginfo((syserrlog
|| (logging
&& exit_code
)),
129 error_check(Sys_tree
*tree
, struct system_kstat_data
*kstats
)
136 * This function is intentionally empty
142 disp_fail_parts(Sys_tree
*tree
)
148 * This function is intentionally empty
155 display_hp_fail_fault(Sys_tree
*tree
, struct system_kstat_data
*kstats
)
162 * This function is intentionally empty
167 display_diaginfo(int flag
, Prom_node
*root
, Sys_tree
*tree
,
168 struct system_kstat_data
*kstats
)
177 * This function is intentionally empty
183 resolve_board_types(Sys_tree
*tree
)
189 * This function is intentionally empty
194 display_boardnum(int num
)
196 log_printf("%2d ", num
, 0);
201 * The various platforms can over-ride this function to
202 * return any platform specific configuration information
203 * they may wish to return in addition to the generic output.
206 display_platform_specific_header(void)
209 * This function is intentionally empty