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