03831d35f7499c87d51205817c93e9a8d42c4baestevel * CDDL HEADER START
03831d35f7499c87d51205817c93e9a8d42c4baestevel * The contents of this file are subject to the terms of the
e79c98e6c943cb3032f272714ff4ce6137d40394zk * Common Development and Distribution License (the "License").
e79c98e6c943cb3032f272714ff4ce6137d40394zk * You may not use this file except in compliance with the License.
03831d35f7499c87d51205817c93e9a8d42c4baestevel * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
03831d35f7499c87d51205817c93e9a8d42c4baestevel * See the License for the specific language governing permissions
03831d35f7499c87d51205817c93e9a8d42c4baestevel * and limitations under the License.
03831d35f7499c87d51205817c93e9a8d42c4baestevel * When distributing Covered Code, include this CDDL HEADER in each
03831d35f7499c87d51205817c93e9a8d42c4baestevel * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
03831d35f7499c87d51205817c93e9a8d42c4baestevel * If applicable, add the following below this CDDL HEADER, with the
03831d35f7499c87d51205817c93e9a8d42c4baestevel * fields enclosed by brackets "[]" replaced with your own identifying
03831d35f7499c87d51205817c93e9a8d42c4baestevel * information: Portions Copyright [yyyy] [name of copyright owner]
03831d35f7499c87d51205817c93e9a8d42c4baestevel * CDDL HEADER END
e79c98e6c943cb3032f272714ff4ce6137d40394zk * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Use is subject to license terms.
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Daktari Platform specific functions.
03831d35f7499c87d51205817c93e9a8d42c4baestevel * called when :
03831d35f7499c87d51205817c93e9a8d42c4baestevel * machine_type == MTYPE_DAKTARI
03831d35f7499c87d51205817c93e9a8d42c4baestevel#pragma ident "%Z%%M% %I% %E% SMI"
03831d35f7499c87d51205817c93e9a8d42c4baestevel * these functions will overlay the symbol table of libprtdiag
03831d35f7499c87d51205817c93e9a8d42c4baestevel * at runtime (workgroup server systems only)
03831d35f7499c87d51205817c93e9a8d42c4baestevelvoid display_diaginfo(int flag, Prom_node *root, Sys_tree *tree,
03831d35f7499c87d51205817c93e9a8d42c4baestevelvoid display_memoryconf(Sys_tree *tree, struct grp_info *grps);
03831d35f7499c87d51205817c93e9a8d42c4baestevel/* local functions */
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic int disp_envc_status(void);
03831d35f7499c87d51205817c93e9a8d42c4baestevelstatic void display_schizo_revisions(Board_node *bdlist);
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Defining the error_check function in order to return the
03831d35f7499c87d51205817c93e9a8d42c4baestevel * appropriate error code.
03831d35f7499c87d51205817c93e9a8d42c4baestevel/*ARGSUSED0*/
03831d35f7499c87d51205817c93e9a8d42c4baestevelerror_check(Sys_tree *tree, struct system_kstat_data *kstats)
03831d35f7499c87d51205817c93e9a8d42c4baestevel * silently check for any types of machine errors
03831d35f7499c87d51205817c93e9a8d42c4baestevel /* set exit_code to show failures */
03831d35f7499c87d51205817c93e9a8d42c4baestevel * disp_fail_parts
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Display the failed parts in the system. This function looks for
03831d35f7499c87d51205817c93e9a8d42c4baestevel * the status property in all PROM nodes. On systems where
03831d35f7499c87d51205817c93e9a8d42c4baestevel * the PROM does not support passing diagnostic information
03831d35f7499c87d51205817c93e9a8d42c4baestevel * through the device tree, this routine will be silent.
03831d35f7499c87d51205817c93e9a8d42c4baestevel /* go through all of the boards looking for failed units. */
03831d35f7499c87d51205817c93e9a8d42c4baestevel /* find failed chips */
e79c98e6c943cb3032f272714ff4ce6137d40394zk "Replaceable Units (FRU) in System:\n"));
e79c98e6c943cb3032f272714ff4ce6137d40394zk "====================\n");
03831d35f7499c87d51205817c93e9a8d42c4baestevel /* sanity check of data retrieved from PROM */
03831d35f7499c87d51205817c93e9a8d42c4baestevel /* Find the board type of this board */
e79c98e6c943cb3032f272714ff4ce6137d40394zk "\tFailed Field Replaceable Unit is "));
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Determine whether FRU is CPU module, system
03831d35f7499c87d51205817c93e9a8d42c4baestevel * board, or SBus card.
e79c98e6c943cb3032f272714ff4ce6137d40394zk "SBus Card %d\n"),
e79c98e6c943cb3032f272714ff4ce6137d40394zk "PCI Card %d"),
03831d35f7499c87d51205817c93e9a8d42c4baestevel } else if (((type = get_node_type(pnode)) != NULL) &&
e79c98e6c943cb3032f272714ff4ce6137d40394zk "module Board %d Module %d\n"), 0,
e79c98e6c943cb3032f272714ff4ce6137d40394zk "No failures found in System\n"));
03831d35f7499c87d51205817c93e9a8d42c4baestevel return (1);
03831d35f7499c87d51205817c93e9a8d42c4baestevel return (0);
03831d35f7499c87d51205817c93e9a8d42c4baestevel/*ARGSUSED*/
03831d35f7499c87d51205817c93e9a8d42c4baesteveldisplay_hp_fail_fault(Sys_tree *tree, struct system_kstat_data *kstats)
03831d35f7499c87d51205817c93e9a8d42c4baestevel /* Display failed units */
03831d35f7499c87d51205817c93e9a8d42c4baestevel/*ARGSUSED*/
03831d35f7499c87d51205817c93e9a8d42c4baesteveldisplay_memoryconf(Sys_tree *tree, struct grp_info *grps)
e79c98e6c943cb3032f272714ff4ce6137d40394zk "========================= Memory Configuration"
e79c98e6c943cb3032f272714ff4ce6137d40394zk " ===============================\n"
e79c98e6c943cb3032f272714ff4ce6137d40394zk "\n Logical Logical"
e79c98e6c943cb3032f272714ff4ce6137d40394zk " Logical "
e79c98e6c943cb3032f272714ff4ce6137d40394zk "\n MC Bank Bank Bank"
e79c98e6c943cb3032f272714ff4ce6137d40394zk " DIMM Interleave Interleaved"
e79c98e6c943cb3032f272714ff4ce6137d40394zk "\n Brd ID num size "
e79c98e6c943cb3032f272714ff4ce6137d40394zk "Status Size "
e79c98e6c943cb3032f272714ff4ce6137d40394zk "Factor with"
e79c98e6c943cb3032f272714ff4ce6137d40394zk "\n---- --- ---- ------ "
e79c98e6c943cb3032f272714ff4ce6137d40394zk "----------- ------ "
e79c98e6c943cb3032f272714ff4ce6137d40394zk "---------- -----------"));
e79c98e6c943cb3032f272714ff4ce6137d40394zk "\nFailed to get memory information.\n"));
03831d35f7499c87d51205817c93e9a8d42c4baestevel /* Display what we have found */
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Display the table header for CPUs . Then display the CPU
03831d35f7499c87d51205817c93e9a8d42c4baestevel * frequency, cache size, and processor revision of all cpus.
e79c98e6c943cb3032f272714ff4ce6137d40394zk "========================="
e79c98e6c943cb3032f272714ff4ce6137d40394zk "==============================================="
e79c98e6c943cb3032f272714ff4ce6137d40394zk " Run E$ CPU CPU \n"
e79c98e6c943cb3032f272714ff4ce6137d40394zk "Brd CPU MHz MB Impl. Mask \n"
e79c98e6c943cb3032f272714ff4ce6137d40394zk "--- ----- ---- ---- ------- ---- \n"));
03831d35f7499c87d51205817c93e9a8d42c4baestevel /* Now display all of the cpus on each board */
e79c98e6c943cb3032f272714ff4ce6137d40394zk "CPU Board list was NULL\n"));
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Display the CPUs present on this board.
03831d35f7499c87d51205817c93e9a8d42c4baestevel char fru_prev = 'X'; /* Valid frus are 'A','B','C','D' */
03831d35f7499c87d51205817c93e9a8d42c4baestevel * display the CPUs' operating frequency, cache size, impl. field
03831d35f7499c87d51205817c93e9a8d42c4baestevel * and mask revision.
03831d35f7499c87d51205817c93e9a8d42c4baestevel for (cpu = dev_find_type(board->nodes, "cpu"); cpu != NULL;
03831d35f7499c87d51205817c93e9a8d42c4baestevel impl = (int *)get_prop_val(find_prop(cpu, "implementation#"));
e79c98e6c943cb3032f272714ff4ce6137d40394zk "l3-cache-sharing"));
03831d35f7499c87d51205817c93e9a8d42c4baestevel /* Do not display a failed CPU node */
03831d35f7499c87d51205817c93e9a8d42c4baestevel if ((impl == NULL) || (freq == 0) || (node_failed(cpu)))
03831d35f7499c87d51205817c93e9a8d42c4baestevel /* Board number */
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Some CMP chips have a split E$,
03831d35f7499c87d51205817c93e9a8d42c4baestevel * so the size for both cores is added
03831d35f7499c87d51205817c93e9a8d42c4baestevel * together to get the total size for
03831d35f7499c87d51205817c93e9a8d42c4baestevel * the chip.
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Still, other CMP chips have E$ (L3)
03831d35f7499c87d51205817c93e9a8d42c4baestevel * which is logically shared, so the
03831d35f7499c87d51205817c93e9a8d42c4baestevel * total size is equal to the core size.
03831d35f7499c87d51205817c93e9a8d42c4baestevel /* CPU Module ID */
03831d35f7499c87d51205817c93e9a8d42c4baestevel /* Running frequency */
03831d35f7499c87d51205817c93e9a8d42c4baestevel /* Ecache size */
03831d35f7499c87d51205817c93e9a8d42c4baestevel /* Implementation */
03831d35f7499c87d51205817c93e9a8d42c4baestevel /* CPU Mask */
03831d35f7499c87d51205817c93e9a8d42c4baestevel * display_pci
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Display all the PCI IO cards on this board.
03831d35f7499c87d51205817c93e9a8d42c4baestevel char *slot_name_arr[DAK_MAX_SLOTS_PER_IO_BD] = {NULL};
03831d35f7499c87d51205817c93e9a8d42c4baestevel /* Initialize all the common information */
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Search for each pci instance, then find/display all nodes under
03831d35f7499c87d51205817c93e9a8d42c4baestevel * each instance node found.
03831d35f7499c87d51205817c93e9a8d42c4baestevel for (pci = dev_find_node_by_compat(board->nodes, SCHIZO_COMPAT_PROP);
e79c98e6c943cb3032f272714ff4ce6137d40394zk pci = dev_next_node_by_compat(pci, SCHIZO_COMPAT_PROP)) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Get slot-name properties from parent node and
03831d35f7499c87d51205817c93e9a8d42c4baestevel * store them in an array.
03831d35f7499c87d51205817c93e9a8d42c4baestevel /* save the 4 byte bitmask */
03831d35f7499c87d51205817c93e9a8d42c4baestevel /* array starts after first int */
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Search for Children of this node ie. Cards.
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Note: any of these cards can be a pci-bridge
03831d35f7499c87d51205817c93e9a8d42c4baestevel * that itself has children. If we find a
03831d35f7499c87d51205817c93e9a8d42c4baestevel * pci-bridge we need to handle it specially.
03831d35f7499c87d51205817c93e9a8d42c4baestevel /* Generate the list of pci cards on pci instance: pci */
03831d35f7499c87d51205817c93e9a8d42c4baestevel fill_pci_card_list(pci, card_node, &card, &card_list,
03831d35f7499c87d51205817c93e9a8d42c4baestevel } /* end-for */
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Print out all the io cards in the list. Also print the column
03831d35f7499c87d51205817c93e9a8d42c4baestevel * headers if told to do so.
03831d35f7499c87d51205817c93e9a8d42c4baestevel static int banner = 0; /* Have we printed the column headings? */
e79c98e6c943cb3032f272714ff4ce6137d40394zk " Bus Max\n"
e79c98e6c943cb3032f272714ff4ce6137d40394zk " IO Port Bus Freq Bus Dev,"
e79c98e6c943cb3032f272714ff4ce6137d40394zk "Brd Type ID Side Slot MHz Freq "
e79c98e6c943cb3032f272714ff4ce6137d40394zk "Func State Name "
03831d35f7499c87d51205817c93e9a8d42c4baestevel /* ---------Brd IO Port Bus Slot Bus Max Dev Stat */
e79c98e6c943cb3032f272714ff4ce6137d40394zk "---- ---- ---- ---- ---- ---- ---- ----"
e79c98e6c943cb3032f272714ff4ce6137d40394zk "-------------------------------- "
e79c98e6c943cb3032f272714ff4ce6137d40394zk "----------------------\n"));
03831d35f7499c87d51205817c93e9a8d42c4baestevel switch (p->pci_bus) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel * display_ffb
03831d35f7499c87d51205817c93e9a8d42c4baestevel * There are no FFB's on a Daktari, however in the generic library,
03831d35f7499c87d51205817c93e9a8d42c4baestevel * the display_ffb() function is implemented so we have to define an
03831d35f7499c87d51205817c93e9a8d42c4baestevel * empty function here.
03831d35f7499c87d51205817c93e9a8d42c4baestevel/* ARGSUSED */
03831d35f7499c87d51205817c93e9a8d42c4baestevel * ----------------------------------------------------------------------------
03831d35f7499c87d51205817c93e9a8d42c4baestevel/* ARGSUSED */
03831d35f7499c87d51205817c93e9a8d42c4baesteveldisplay_diaginfo(int flag, Prom_node *root, Sys_tree *tree,
03831d35f7499c87d51205817c93e9a8d42c4baestevel /* NOTE(ARGUNUSED(kstats)) */
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Now display the last powerfail time and the fatal hardware
03831d35f7499c87d51205817c93e9a8d42c4baestevel * reset information. We do this under a couple of conditions.
03831d35f7499c87d51205817c93e9a8d42c4baestevel * First if the user asks for it. The second is if the user
03831d35f7499c87d51205817c93e9a8d42c4baestevel * told us to do logging, and we found a system failure.
03831d35f7499c87d51205817c93e9a8d42c4baestevel * display time of latest powerfail. Not all systems
03831d35f7499c87d51205817c93e9a8d42c4baestevel * have this capability. For those that do not, this
03831d35f7499c87d51205817c93e9a8d42c4baestevel * is just a no-op.
03831d35f7499c87d51205817c93e9a8d42c4baestevel /* platform_disp_prom_version(tree); */
03831d35f7499c87d51205817c93e9a8d42c4baestevel * local functions
03831d35f7499c87d51205817c93e9a8d42c4baestevel * disp_envc_status
03831d35f7499c87d51205817c93e9a8d42c4baestevel * This routine displays the environmental status passed up from
03831d35f7499c87d51205817c93e9a8d42c4baestevel * device drivers via the envlibobj.so library.
03831d35f7499c87d51205817c93e9a8d42c4baestevel * This is a Daktari specific environmental information display routine.
e79c98e6c943cb3032f272714ff4ce6137d40394zk "picl_initialize failed\n"
e79c98e6c943cb3032f272714ff4ce6137d40394zk "%s\nCannot display environmental status\n"),
e79c98e6c943cb3032f272714ff4ce6137d40394zk "picl_get_node_by_path for the SYSTEM node "
e79c98e6c943cb3032f272714ff4ce6137d40394zk "failed\n"
e79c98e6c943cb3032f272714ff4ce6137d40394zk "%s\nCannot display environmental status\n"),
e79c98e6c943cb3032f272714ff4ce6137d40394zk "========================= "
e79c98e6c943cb3032f272714ff4ce6137d40394zk "Environmental Status "
e79c98e6c943cb3032f272714ff4ce6137d40394zk "========================="
03831d35f7499c87d51205817c93e9a8d42c4baestevel return (0);
03831d35f7499c87d51205817c93e9a8d42c4baestevel picl_nodehdl_t *ps_I_sensor[DAK_MAX_PS_VOLTAGE_SENSORS];
03831d35f7499c87d51205817c93e9a8d42c4baestevel /* Printing out the Power Supply Heading information */
e79c98e6c943cb3032f272714ff4ce6137d40394zk "Power Supplies:\n"
e79c98e6c943cb3032f272714ff4ce6137d40394zk "---------------\n"
e79c98e6c943cb3032f272714ff4ce6137d40394zk "Current Drain:\n"
e79c98e6c943cb3032f272714ff4ce6137d40394zk "Supply Status Fan Fail Temp Fail CS Fail "
e79c98e6c943cb3032f272714ff4ce6137d40394zk "3.3V 5V 12V 48V\n"
e79c98e6c943cb3032f272714ff4ce6137d40394zk "------ ------------ -------- --------- "
e79c98e6c943cb3032f272714ff4ce6137d40394zk "------- ---- -- --- ---\n"));
03831d35f7499c87d51205817c93e9a8d42c4baestevel err = fill_device_array_from_id(system_node, "PSVC_PS", &number,
e79c98e6c943cb3032f272714ff4ce6137d40394zk "failed in fill_device_array_from_id for PS\n"
03831d35f7499c87d51205817c93e9a8d42c4baestevel /* Printing out the Power Supply Status information */
03831d35f7499c87d51205817c93e9a8d42c4baestevel for (i = 0; i < DAK_MAX_PS; i++) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Re initialize the fail variable so that if
03831d35f7499c87d51205817c93e9a8d42c4baestevel * one power supply fails, they don't all do also.
03831d35f7499c87d51205817c93e9a8d42c4baestevel err = picl_get_propval_by_name(ps[i], PICL_PROP_NAME, name,
03831d35f7499c87d51205817c93e9a8d42c4baestevel err = picl_get_propval_by_name(ps[i], "State", ps_state,
e79c98e6c943cb3032f272714ff4ce6137d40394zk "Error getting ps[%d]'s state: %s"),
03831d35f7499c87d51205817c93e9a8d42c4baestevel err = fill_device_array_from_id(ps[i], "PSVC_DEV_FAULT_SENSOR",
e79c98e6c943cb3032f272714ff4ce6137d40394zk "failed to get present PS fault sensors\n"
03831d35f7499c87d51205817c93e9a8d42c4baestevel err = fill_device_array_from_id(ps[i], "PSVC_PS_I_SENSOR",
03831d35f7499c87d51205817c93e9a8d42c4baestevel if ((err != PICL_SUCCESS) && (err != PICL_INVALIDHANDLE)) {
e79c98e6c943cb3032f272714ff4ce6137d40394zk "failed to get present PS I sensors\n"
03831d35f7499c87d51205817c93e9a8d42c4baestevel * If the AC cord is unplugged, then the power supply
03831d35f7499c87d51205817c93e9a8d42c4baestevel * sensors will have unreliable values. In this case,
03831d35f7499c87d51205817c93e9a8d42c4baestevel * skip to the next power supply.
03831d35f7499c87d51205817c93e9a8d42c4baestevel " UNPLUGGED\n"));
03831d35f7499c87d51205817c93e9a8d42c4baestevel for (r = 0; r < DAK_MAX_PS_FAULT_SENSORS; r++) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel err = picl_get_propval_by_name(ps_fail[i][r], "State",
e79c98e6c943cb3032f272714ff4ce6137d40394zk "picl_get_propval_by_name for ps "
e79c98e6c943cb3032f272714ff4ce6137d40394zk "fault state failed\n"
03831d35f7499c87d51205817c93e9a8d42c4baestevel for (r = 0; r < DAK_MAX_PS_VOLTAGE_SENSORS; r++) {
8a88157cd7245729dea5d91a5181bb05a80164a8vb "failed to get A to D sensor "
8a88157cd7245729dea5d91a5181bb05a80164a8vb "failed to get low warning threshold "
03831d35f7499c87d51205817c93e9a8d42c4baestevel " FAIL "));
8a88157cd7245729dea5d91a5181bb05a80164a8vb if (fail != 0) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel for (r = 0; r < DAK_MAX_PS_FAULT_SENSORS; r++) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel for (r = 0; r < DAK_MAX_PS_FAULT_SENSORS; r++) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel for (r = 0; r < DAK_MAX_PS_VOLTAGE_SENSORS; r++) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel err = fill_device_array_from_id(system_node, "PSVC_FAN", &number,
e79c98e6c943cb3032f272714ff4ce6137d40394zk "failed in fill_device_array_from_id "
e79c98e6c943cb3032f272714ff4ce6137d40394zk "for FAN\n"
e79c98e6c943cb3032f272714ff4ce6137d40394zk "=================================\n"));
e79c98e6c943cb3032f272714ff4ce6137d40394zk " Status Fan State\n"));
e79c98e6c943cb3032f272714ff4ce6137d40394zk " --------- ---------\n"));
03831d35f7499c87d51205817c93e9a8d42c4baestevel for (i = 0; i < DAK_MAX_FANS; i++) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel err = picl_get_propval_by_name(fans[i], PICL_PROP_NAME, name,
03831d35f7499c87d51205817c93e9a8d42c4baestevel if ((err != PICL_SUCCESS) && (err != PICL_INVALIDHANDLE)) {
e79c98e6c943cb3032f272714ff4ce6137d40394zk "failed in picl_get_propval_by_name for "
e79c98e6c943cb3032f272714ff4ce6137d40394zk "fan speed\n"
03831d35f7499c87d51205817c93e9a8d42c4baestevel err = picl_get_propval_by_name(fans[i], "Fan-switch",
e79c98e6c943cb3032f272714ff4ce6137d40394zk "failed in picl_get_propval_by_name for"
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Display the fan's speed and whether or not
03831d35f7499c87d51205817c93e9a8d42c4baestevel * it's enabled.
e79c98e6c943cb3032f272714ff4ce6137d40394zk "\t %4d [ENABLED]"),
e79c98e6c943cb3032f272714ff4ce6137d40394zk "\t 0 [DISABLED]"));
03831d35f7499c87d51205817c93e9a8d42c4baestevel /* Display the fan's speed */
e79c98e6c943cb3032f272714ff4ce6137d40394zk " [ENABLED]"));
03831d35f7499c87d51205817c93e9a8d42c4baestevel err = picl_get_propval_by_name(fans[i], "State", fan_state,
e79c98e6c943cb3032f272714ff4ce6137d40394zk "picl_get_propval_by_name failed: %s"),
03831d35f7499c87d51205817c93e9a8d42c4baestevel log_printf(dgettext(TEXT_DOMAIN, "\t %s\n"), fan_state);
e79c98e6c943cb3032f272714ff4ce6137d40394zk "=================================\n"));
03831d35f7499c87d51205817c93e9a8d42c4baestevel err = fill_device_array_from_id(system_node, "PSVC_DISK", &number,
e79c98e6c943cb3032f272714ff4ce6137d40394zk "failed in fill_device_array_from_id for "
e79c98e6c943cb3032f272714ff4ce6137d40394zk "Disk Status:\n"
e79c98e6c943cb3032f272714ff4ce6137d40394zk " Presence Fault LED Remove LED\n"));
03831d35f7499c87d51205817c93e9a8d42c4baestevel for (i = 0; i < DAK_MAX_DISKS; i++) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel err = picl_get_propval_by_name(disks[i], PICL_PROP_NAME, name,
e79c98e6c943cb3032f272714ff4ce6137d40394zk i, "PRESENT");
e79c98e6c943cb3032f272714ff4ce6137d40394zk i, "EMPTY");
e79c98e6c943cb3032f272714ff4ce6137d40394zk "Failed picl_get_propval_by_name for "
e79c98e6c943cb3032f272714ff4ce6137d40394zk "failed in fill_device_from_id for disk "
03831d35f7499c87d51205817c93e9a8d42c4baestevel err = fill_device_from_id(disk_slots[i], "PSVC_SLOT_FAULT_LED",
e79c98e6c943cb3032f272714ff4ce6137d40394zk "failed in fill_device_from_id for disk slot "
e79c98e6c943cb3032f272714ff4ce6137d40394zk "fault led\n"
e79c98e6c943cb3032f272714ff4ce6137d40394zk "picl_get_propval_by_name for fault led_state"
e79c98e6c943cb3032f272714ff4ce6137d40394zk " failed\n"
03831d35f7499c87d51205817c93e9a8d42c4baestevel err = fill_device_from_id(disk_slots[i], "PSVC_SLOT_REMOVE_LED",
e79c98e6c943cb3032f272714ff4ce6137d40394zk "failed in fill_device_from_id for disk slot "
e79c98e6c943cb3032f272714ff4ce6137d40394zk "remove led\n"
e79c98e6c943cb3032f272714ff4ce6137d40394zk "picl_get_propval_by_name for remove"
e79c98e6c943cb3032f272714ff4ce6137d40394zk " led_state failed\n"
03831d35f7499c87d51205817c93e9a8d42c4baestevel err = fill_device_array_from_id(system_node, "PSVC_FSP_LED", &number,
e79c98e6c943cb3032f272714ff4ce6137d40394zk "failed in fill_device_array_from_id for "
e79c98e6c943cb3032f272714ff4ce6137d40394zk "FSP_LED\n"
e79c98e6c943cb3032f272714ff4ce6137d40394zk "System LED Status:\n"
e79c98e6c943cb3032f272714ff4ce6137d40394zk " GEN FAULT REMOVE\n"));
03831d35f7499c87d51205817c93e9a8d42c4baestevel for (i = 0; i < DAK_MAX_FSP_LEDS; i++) {
e79c98e6c943cb3032f272714ff4ce6137d40394zk "picl_get_propval_by_name for led_state"
e79c98e6c943cb3032f272714ff4ce6137d40394zk " failed\n"
e79c98e6c943cb3032f272714ff4ce6137d40394zk " DISK FAULT "));
e79c98e6c943cb3032f272714ff4ce6137d40394zk "picl_get_propval_by_name for led_state"
e79c98e6c943cb3032f272714ff4ce6137d40394zk " failed\n"
e79c98e6c943cb3032f272714ff4ce6137d40394zk " LEFT THERMAL FAULT "
e79c98e6c943cb3032f272714ff4ce6137d40394zk "RIGHT THERMAL FAULT\n"));
e79c98e6c943cb3032f272714ff4ce6137d40394zk "picl_get_propval_by_name for led_state "
e79c98e6c943cb3032f272714ff4ce6137d40394zk "failed\n"
e79c98e6c943cb3032f272714ff4ce6137d40394zk " LEFT DOOR "
e79c98e6c943cb3032f272714ff4ce6137d40394zk "RIGHT DOOR\n"));
e79c98e6c943cb3032f272714ff4ce6137d40394zk "picl_get_propval_by_name for led_state"
e79c98e6c943cb3032f272714ff4ce6137d40394zk " failed\n"
e79c98e6c943cb3032f272714ff4ce6137d40394zk "=================================\n"));
03831d35f7499c87d51205817c93e9a8d42c4baestevel err = fill_device_array_from_id(system_node, "PSVC_KEYSWITCH", &number,
e79c98e6c943cb3032f272714ff4ce6137d40394zk "failed in fill_device_array_from_id for "
e79c98e6c943cb3032f272714ff4ce6137d40394zk " PSVC_KEYSWITCH\n"
03831d35f7499c87d51205817c93e9a8d42c4baestevel err = picl_get_propval_by_name(keyswitch[0], "State", ks_pos,
e79c98e6c943cb3032f272714ff4ce6137d40394zk "picl_get_propval_by_name for keyswitch state "
e79c98e6c943cb3032f272714ff4ce6137d40394zk "failed\n"
e79c98e6c943cb3032f272714ff4ce6137d40394zk "Front Status Panel:\n"
e79c98e6c943cb3032f272714ff4ce6137d40394zk "-------------------\n"
e79c98e6c943cb3032f272714ff4ce6137d40394zk "Keyswitch position: "
03831d35f7499c87d51205817c93e9a8d42c4baestevel err = fill_device_array_from_id(system_node, "PSVC_TS", &number,
e79c98e6c943cb3032f272714ff4ce6137d40394zk "System Temperatures (Celsius):\n"
e79c98e6c943cb3032f272714ff4ce6137d40394zk "-------------------------------\n"
e79c98e6c943cb3032f272714ff4ce6137d40394zk "Device\t\tTemperature\tStatus\n"
e79c98e6c943cb3032f272714ff4ce6137d40394zk "---------------------------------------\n"));
03831d35f7499c87d51205817c93e9a8d42c4baestevel for (i = 0; i < number; i++) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel /* This FRU isn't present. Skip it. */
03831d35f7499c87d51205817c93e9a8d42c4baestevel * The names in the tree are like "CPU0_DIE_TEMPERATURE_SENSOR".
03831d35f7499c87d51205817c93e9a8d42c4baestevel * All we want to print is up to the first underscore.
e79c98e6c943cb3032f272714ff4ce6137d40394zk "\n=================================\n\n"));
03831d35f7499c87d51205817c93e9a8d42c4baesteveldak_display_hw_revisions(Prom_node *root, Board_node *bdlist)
e79c98e6c943cb3032f272714ff4ce6137d40394zk "========================= HW Revisions "
e79c98e6c943cb3032f272714ff4ce6137d40394zk "=======================================\n\n"));
e79c98e6c943cb3032f272714ff4ce6137d40394zk "System PROM revisions:\n"
e79c98e6c943cb3032f272714ff4ce6137d40394zk "----------------------\n"));
e79c98e6c943cb3032f272714ff4ce6137d40394zk value = (char *)get_prop_val(find_prop(pnode, "version"));
e79c98e6c943cb3032f272714ff4ce6137d40394zk "IO ASIC revisions:\n"
e79c98e6c943cb3032f272714ff4ce6137d40394zk "------------------\n"
e79c98e6c943cb3032f272714ff4ce6137d40394zk "Model ID Status Version\n"
e79c98e6c943cb3032f272714ff4ce6137d40394zk "-------- ---- ------ -------\n"));
03831d35f7499c87d51205817c93e9a8d42c4baestevel * search this board node for all Schizos
03831d35f7499c87d51205817c93e9a8d42c4baestevel * get the reg property to determine
03831d35f7499c87d51205817c93e9a8d42c4baestevel * whether we are looking at side A or B
03831d35f7499c87d51205817c93e9a8d42c4baestevel /* get portid */
03831d35f7499c87d51205817c93e9a8d42c4baestevel * If this is a new portid and it is PCI bus B,
03831d35f7499c87d51205817c93e9a8d42c4baestevel * we skip onto the PCI bus A.
03831d35f7499c87d51205817c93e9a8d42c4baestevel if ((portid != prev_portid) && (pci_bus == 0x700000)) {
03831d35f7499c87d51205817c93e9a8d42c4baestevel /* status */
03831d35f7499c87d51205817c93e9a8d42c4baestevel continue; /* skip to the next schizo */
03831d35f7499c87d51205817c93e9a8d42c4baestevel * This must be side A of the same Schizo.
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Gather all its props and display them.