diff options
| author | girish <none@none> | 2006-11-22 11:47:19 -0800 |
|---|---|---|
| committer | girish <none@none> | 2006-11-22 11:47:19 -0800 |
| commit | 4496171313bed39e96f21bc2f9faf2868e267ae3 (patch) | |
| tree | d396d1596da772a70a5e7c1986a2ef9600c1fbf7 /usr/src/lib/libprtdiag_psr | |
| parent | 4e0386dffa68d848cdca5a6308d652c20d6fc454 (diff) | |
| download | illumos-joyent-4496171313bed39e96f21bc2f9faf2868e267ae3.tar.gz | |
FWARC/2006/175 MD definition for N2 CWQ
FWARC/2006/201 sun4v error handling update
FWARC/2006/425 NCS HV API Update 2
FWARC/2006/429 Niagara2 Perf Regs HV API
FWARC/2006/474 pci io hv iommu attributes update
FWARC/2006/481 Niagara-2 Random Number Generator API
FWARC/2006/524 Niagara2 Network Interface Unit Hypervisor API
FWARC/2006/556 NIU/SIU Device Tree Bindings and Machine Description Definitions
FWARC/2006/567 Niagara Crypto & RNG compatible property update
PSARC/2006/459 Huron 1u/2u Platform Support
PSARC/2006/520 Niagara 2 Random Number Generator
PSARC/2006/521 Niagara 2 Cryptographic Provider
PSARC/2006/645 Niagara II NIU 10Gbit Ethernet Driver
6477049 ON support for UltraSPARC-T2 processor
6375797 Add support for SUN4V IOMMU extensions
6480942 Crypto support for UltraSPARC-T2 processor
6480959 NIU support for UltraSPARC-T2 processor
6483040 ON platform support for Huron (SPARC-Enterprise-T5120 & SPARC-Enterprise-T5220)
Diffstat (limited to 'usr/src/lib/libprtdiag_psr')
4 files changed, 637 insertions, 3 deletions
diff --git a/usr/src/lib/libprtdiag_psr/sparc/ontario/Makefile b/usr/src/lib/libprtdiag_psr/sparc/ontario/Makefile index 41af200087..384b8c4f3f 100644 --- a/usr/src/lib/libprtdiag_psr/sparc/ontario/Makefile +++ b/usr/src/lib/libprtdiag_psr/sparc/ontario/Makefile @@ -28,7 +28,7 @@ UTSBASE = ../../../../uts -PLATFORM_OBJECTS= ontario.o erie.o pelton.o stpaul.o +PLATFORM_OBJECTS= ontario.o erie.o pelton.o stpaul.o huron.o include ../Makefile.com diff --git a/usr/src/lib/libprtdiag_psr/sparc/ontario/common/huron.c b/usr/src/lib/libprtdiag_psr/sparc/ontario/common/huron.c new file mode 100644 index 0000000000..ef2940adfc --- /dev/null +++ b/usr/src/lib/libprtdiag_psr/sparc/ontario/common/huron.c @@ -0,0 +1,489 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (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 + * or http://www.opensolaris.org/os/licensing. + * 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 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +/* + * Sun4v Platform specific functions. + * + * called when : + * machine_type == huron + * + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> +#include <kstat.h> +#include <fcntl.h> +#include <string.h> +#include <assert.h> +#include <libintl.h> +#include <note.h> +#include <sys/systeminfo.h> +#include <sys/openpromio.h> +#include <sys/sysmacros.h> +#include <picl.h> +#include "picldefs.h" +#include <pdevinfo.h> +#include <display.h> +#include <display_sun4v.h> +#include <libprtdiag.h> +#include "huron.h" + +#if !defined(TEXT_DOMAIN) +#define TEXT_DOMAIN "SYS_TEST" +#endif + +static void +huron_get_bus_type(char *path, struct io_card *card) +{ + if ((strcmp(path, HURON_N2_XAUI0) == 0) || + (strcmp(path, HURON_N2_XAUI1) == 0)) { + (void) strcpy(card->bus_type, "SIU"); + } else { + (void) strcpy(card->bus_type, "PCIE"); + } +} + +void +huron_get_slot_number(char *path, struct io_card *card) +{ + if (strcmp(path, HURON_N2_XAUI0) == 0) { + (void) strcpy(card->slot_str, "0"); + card->slot = 0; + } else if (strcmp(path, HURON_N2_XAUI1) == 0) { + (void) strcpy(card->slot_str, "1"); + card->slot = 1; + } else if (strncmp(path, HURON_PCIE_SLOT1, + strlen(HURON_PCIE_SLOT1)) == 0) { + (void) strcpy(card->slot_str, "1"); + card->slot = 1; + } else if (strncmp(path, HURON_PCIE_SLOT2, + strlen(HURON_PCIE_SLOT2)) == 0) { + (void) strcpy(card->slot_str, "2"); + card->slot = 2; + } else if (strncmp(path, HURON_PCIE_SLOT3, + strlen(HURON_PCIE_SLOT3)) == 0) { + (void) strcpy(card->slot_str, "3"); + card->slot = 3; + } else if (strncmp(path, HURON_PCIE_SLOT4, + strlen(HURON_PCIE_SLOT4)) == 0) { + (void) strcpy(card->slot_str, "4"); + card->slot = 4; + } else if (strncmp(path, HURON_PCIE_SLOT5, + strlen(HURON_PCIE_SLOT5)) == 0) { + (void) strcpy(card->slot_str, "5"); + card->slot = 5; + } else if (strncmp(path, HURON_PCIE_SLOT6, + strlen(HURON_PCIE_SLOT6)) == 0) { + (void) strcpy(card->slot_str, "6"); + card->slot = 6; + } else { + (void) strcpy(card->slot_str, MOTHERBOARD); + card->slot = NO_SLOT; + } +} + +int +huron_get_network_instance(char *path) +{ + if (strcmp(path, HURON_NETWORK_0) == 0) { + return (0); + } else if (strcmp(path, HURON_NETWORK_1) == 0) { + return (1); + } else if (strcmp(path, HURON_NETWORK_2) == 0) { + return (2); + } else if (strcmp(path, HURON_NETWORK_3) == 0) { + return (3); + } else if (strcmp(path, HURON_N2_XAUI0) == 0) { + return (0); + } else if (strcmp(path, HURON_N2_XAUI1) == 0) { + return (1); + } else { + return (-1); + } +} +/* + * add all io devices under pci in io list + */ +/* ARGSUSED */ +int +huron_pci_callback(picl_nodehdl_t pcih, void *args) +{ + int err = PICL_SUCCESS; + picl_nodehdl_t nodeh; + char path[MAXSTRLEN]; + char parent_path[MAXSTRLEN]; + char piclclass[PICL_CLASSNAMELEN_MAX]; + char name[MAXSTRLEN]; + char model[MAXSTRLEN]; + char *compatible; + char binding_name[MAXSTRLEN]; + struct io_card pci_card; + int32_t instance; + + err = picl_get_propval_by_name(pcih, PICL_PROP_DEVFS_PATH, parent_path, + sizeof (parent_path)); + if (err != PICL_SUCCESS) { + return (err); + } + + /* Walk through the children */ + + err = picl_get_propval_by_name(pcih, PICL_PROP_CHILD, &nodeh, + sizeof (picl_nodehdl_t)); + + while (err == PICL_SUCCESS) { + err = picl_get_propval_by_name(nodeh, PICL_PROP_CLASSNAME, + piclclass, sizeof (piclclass)); + if (err != PICL_SUCCESS) + return (err); + + if (strcmp(piclclass, "pciex") == 0) { + err = picl_get_propval_by_name(nodeh, PICL_PROP_PEER, + &nodeh, sizeof (picl_nodehdl_t)); + continue; + } + + if (strcmp(piclclass, "siu") == 0) { + err = picl_get_propval_by_name(nodeh, PICL_PROP_CHILD, + &nodeh, sizeof (picl_nodehdl_t)); + continue; + } + + err = picl_get_propval_by_name(nodeh, PICL_PROP_DEVFS_PATH, + path, sizeof (path)); + if (err != PICL_SUCCESS) { + return (err); + } + + (void) strlcpy(pci_card.notes, path, sizeof (pci_card.notes)); + + huron_get_bus_type(parent_path, &pci_card); + + huron_get_slot_number(parent_path, &pci_card); + + err = picl_get_propval_by_name(nodeh, PICL_PROP_NAME, &name, + sizeof (name)); + if (err == PICL_PROPNOTFOUND) + (void) strcpy(name, ""); + else if (err != PICL_SUCCESS) + return (err); + + + /* Figure NAC name */ + if ((strcmp(name, NETWORK) == 0) && + (strcmp(pci_card.slot_str, MOTHERBOARD) == 0)) { + instance = huron_get_network_instance(path); + (void) snprintf(pci_card.status, + sizeof (pci_card.status), "%s/%s%d", MOTHERBOARD, + "NET", instance); + } else { + if (pci_card.slot != NO_SLOT) { + (void) snprintf(pci_card.status, + sizeof (pci_card.status), "%s/%s%d", + MOTHERBOARD, pci_card.bus_type, + pci_card.slot); + } else { + (void) snprintf(pci_card.status, + sizeof (pci_card.status), "%s/%s", + MOTHERBOARD, pci_card.bus_type); + } + } + + /* + * Get the name of this card. Iif binding_name is found, + * name will be <nodename>-<binding_name> + */ + + err = picl_get_propval_by_name(nodeh, PICL_PROP_BINDING_NAME, + &binding_name, sizeof (binding_name)); + if (err == PICL_PROPNOTFOUND) { + /* + * if compatible prop is found, name will be + * <nodename>-<compatible> + */ + err = huron_get_first_compatible_value(nodeh, + &compatible); + if (err == PICL_SUCCESS) { + (void) strlcat(name, "-", MAXSTRLEN); + (void) strlcat(name, compatible, MAXSTRLEN); + free(compatible); + } else if (err != PICL_PROPNOTFOUND) { + return (err); + } + } else if (err != PICL_SUCCESS) { + return (err); + } else if (strcmp(name, binding_name) != 0) { + (void) strlcat(name, "-", MAXSTRLEN); + (void) strlcat(name, binding_name, MAXSTRLEN); + } + + (void) strlcpy(pci_card.name, name, sizeof (pci_card.name)); + + /* Get the model of this card */ + + err = picl_get_propval_by_name(nodeh, OBP_PROP_MODEL, + &model, sizeof (model)); + if (err == PICL_PROPNOTFOUND) + (void) strcpy(model, ""); + else if (err != PICL_SUCCESS) + return (err); + (void) strlcpy(pci_card.model, model, sizeof (pci_card.model)); + + /* Print NAC name */ + log_printf("%-11s", pci_card.status); + /* Print IO Type */ + log_printf("%6s", pci_card.bus_type); + /* Print Slot # */ + log_printf("%5s", pci_card.slot_str); + /* Print Parent Path */ + log_printf("%46.45s", pci_card.notes); + /* Printf Card Name */ + if (strlen(pci_card.name) > 24) + log_printf("%25.24s+", pci_card.name); + else + log_printf("%26s", pci_card.name); + /* Print Card Model */ + if (strlen(pci_card.model) > 10) + log_printf("%10.9s+", pci_card.model); + else + log_printf("%10s", pci_card.model); + log_printf("\n"); + + err = picl_get_propval_by_name(nodeh, PICL_PROP_PEER, &nodeh, + sizeof (picl_nodehdl_t)); + + } + + return (PICL_WALK_CONTINUE); +} + +/* + * local functions + */ +/* + * add all io devices under pci in io list + */ +/* ARGSUSED */ +int +huron_hw_rev_callback(picl_nodehdl_t pcih, void *args) +{ + int err = PICL_SUCCESS; + char path[MAXSTRLEN] = ""; + char device_path[MAXSTRLEN]; + char NAC[MAXSTRLEN]; + char *compatible; + int32_t revision; + int device_found = 0; + + err = picl_get_propval_by_name(pcih, PICL_PROP_DEVFS_PATH, path, + sizeof (path)); + if (err != PICL_SUCCESS) { + return (err); + } + + if ((strcmp(path, HURON_NETWORK_0) == 0) || + (strcmp(path, HURON_NETWORK_1) == 0)) { + device_found = 1; + (void) snprintf(NAC, sizeof (NAC), "%s/%s%d", + MOTHERBOARD, OPHIR, 0); + revision = huron_get_int_propval(pcih, OBP_PROP_REVISION_ID, + &err); + } + + if ((strcmp(path, HURON_NETWORK_2) == 0) || + (strcmp(path, HURON_NETWORK_3) == 0)) { + device_found = 1; + (void) snprintf(NAC, sizeof (NAC), "%s/%s%d", MOTHERBOARD, + OPHIR, 1); + revision = huron_get_int_propval(pcih, OBP_PROP_REVISION_ID, + &err); + } + + if (strcmp(path, HURON_SWITCH_A_PATH) == 0) { + device_found = 1; + (void) snprintf(NAC, sizeof (NAC), "%s/%s", + MOTHERBOARD, HURON_SWITCH_A); + revision = huron_get_int_propval(pcih, OBP_PROP_REVISION_ID, + &err); + } + + if (strcmp(path, HURON_SWITCH_B_PATH) == 0) { + device_found = 1; + (void) snprintf(NAC, sizeof (NAC), "%s/%s", MOTHERBOARD, + HURON_SWITCH_B); + revision = huron_get_int_propval(pcih, OBP_PROP_REVISION_ID, + &err); + } + + if (strcmp(path, HURON_SWITCH_C_PATH) == 0) { + device_found = 1; + (void) snprintf(NAC, sizeof (NAC), "%s/%s", MOTHERBOARD, + HURON_SWITCH_C); + revision = huron_get_int_propval(pcih, OBP_PROP_REVISION_ID, + &err); + } + + if (strcmp(path, HURON_LSI_PATH) == 0) { + device_found = 1; + (void) snprintf(NAC, sizeof (NAC), "%s/%s", MOTHERBOARD, + SAS_SATA_HBA); + revision = huron_get_int_propval(pcih, OBP_PROP_REVISION_ID, + &err); + } + if (device_found == 1) { + (void) strcpy(device_path, path); + err = huron_get_first_compatible_value(pcih, &compatible); + + /* Print NAC name */ + log_printf("%-20s", NAC); + /* Print Device Path */ + if (strlen(device_path) > 45) + log_printf("%45.44s+", device_path); + else + log_printf("%46s", device_path); + /* Print Compatible # */ + log_printf("%31s", compatible); + free(compatible); + /* Print Revision */ + log_printf("%6d", revision); + log_printf("\n"); + } + + return (PICL_WALK_CONTINUE); +} + +/* + * return the first compatible value + */ +int +huron_get_first_compatible_value(picl_nodehdl_t nodeh, char **outbuf) +{ + int err; + picl_prophdl_t proph; + picl_propinfo_t pinfo; + picl_prophdl_t tblh; + picl_prophdl_t rowproph; + char *pval; + + err = picl_get_propinfo_by_name(nodeh, OBP_PROP_COMPATIBLE, + &pinfo, &proph); + if (err != PICL_SUCCESS) + return (err); + + if (pinfo.type == PICL_PTYPE_CHARSTRING) { + pval = malloc(pinfo.size); + if (pval == NULL) + return (PICL_FAILURE); + err = picl_get_propval(proph, pval, pinfo.size); + if (err != PICL_SUCCESS) { + free(pval); + return (err); + } + *outbuf = pval; + return (PICL_SUCCESS); + } + + if (pinfo.type != PICL_PTYPE_TABLE) + return (PICL_FAILURE); + + /* get first string from table */ + err = picl_get_propval(proph, &tblh, pinfo.size); + if (err != PICL_SUCCESS) + return (err); + + err = picl_get_next_by_row(tblh, &rowproph); + if (err != PICL_SUCCESS) + return (err); + + err = picl_get_propinfo(rowproph, &pinfo); + if (err != PICL_SUCCESS) + return (err); + + pval = malloc(pinfo.size); + if (pval == NULL) + return (PICL_FAILURE); + + err = picl_get_propval(rowproph, pval, pinfo.size); + if (err != PICL_SUCCESS) { + free(pval); + return (err); + } + + *outbuf = pval; + return (PICL_SUCCESS); +} + +int64_t +huron_get_int_propval(picl_nodehdl_t modh, char *prop_name, int *ret) +{ + int err; + picl_prophdl_t proph; + picl_propinfo_t pinfo; + int8_t int8v; + int16_t int16v; + int32_t int32v; + int64_t int64v; + + err = picl_get_propinfo_by_name(modh, prop_name, &pinfo, &proph); + if (err != PICL_SUCCESS) { + *ret = err; + return (0); + } + + /* + * If it is not an int, uint or byte array prop, return failure + */ + if ((pinfo.type != PICL_PTYPE_INT) && + (pinfo.type != PICL_PTYPE_UNSIGNED_INT) && + (pinfo.type != PICL_PTYPE_BYTEARRAY)) { + *ret = PICL_FAILURE; + return (0); + } + + switch (pinfo.size) { + case sizeof (int8_t): + err = picl_get_propval(proph, &int8v, sizeof (int8v)); + *ret = err; + return (int8v); + case sizeof (int16_t): + err = picl_get_propval(proph, &int16v, sizeof (int16v)); + *ret = err; + return (int16v); + case sizeof (int32_t): + err = picl_get_propval(proph, &int32v, sizeof (int32v)); + *ret = err; + return (int32v); + case sizeof (int64_t): + err = picl_get_propval(proph, &int64v, sizeof (int64v)); + *ret = err; + return (int64v); + default: /* not supported size */ + *ret = PICL_FAILURE; + return (0); + } +} diff --git a/usr/src/lib/libprtdiag_psr/sparc/ontario/common/huron.h b/usr/src/lib/libprtdiag_psr/sparc/ontario/common/huron.h new file mode 100644 index 0000000000..d73fa48259 --- /dev/null +++ b/usr/src/lib/libprtdiag_psr/sparc/ontario/common/huron.h @@ -0,0 +1,126 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (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 + * or http://www.opensolaris.org/os/licensing. + * 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 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +/* + * Sun4v Platform header file. + * + * called when : + * machine_type == huron + * + */ + +#ifndef _HURON_H +#define _HURON_H + +#pragma ident "%Z%%M% %I% %E% SMI" + +#ifdef __cplusplus +extern "C" { +#endif + +#define HURON_2U_PLATFORM "SUNW,SPARC-Enterprise-T5220" +#define HURON_1U_PLATFORM "SUNW,SPARC-Enterprise-T5120" +#define HURON_PCIE_COMP 30 +#define HURON_XAUI_COMP 17 +#define NO_SLOT -1 +#define NET_COMP_NUM 3 +#define MOTHERBOARD "MB" +#define HURON_SWITCH_A "PCI-SWITCH0" +#define HURON_SWITCH_B "PCI-SWITCH1" +#define HURON_SWITCH_C "PCI-SWITCH2" +#define SOUTHBRIDGE "southbridge" +#define OPHIR "GBE" +#define NETWORK "network" +#define PCIE "/PCIE" +#define HURON_SIU "/siu@80" +#define HURON_SWITCH_A_PATH "/pci@0/pci@0" +#define HURON_SWITCH_B_PATH "/pci@0/pci@0/pci@1/pci@0" +#define HURON_SWITCH_C_PATH "/pci@0/pci@0/pci@8/pci@0" +#define HURON_NETWORK_0 "/pci@0/pci@0/pci@1/pci@0/pci@2/network@0" +#define HURON_NETWORK_1 "/pci@0/pci@0/pci@1/pci@0/pci@2/network@0,1" +#define HURON_NETWORK_2 "/pci@0/pci@0/pci@1/pci@0/pci@3/network@0" +#define HURON_NETWORK_3 "/pci@0/pci@0/pci@1/pci@0/pci@3/network@0,1" +#define HURON_USB_0 "/pci@0/pci@0/pci@1/pci@0/pci@1/pci@0/usb@1c" +#define HURON_USB_1 "/pci@0/pci@0/pci@1/pci@0/pci@1/pci@0/usb@1c,1" +#define HURON_USB_2 "/pci@0/pci@0/pci@1/pci@0/pci@1/pci@0/usb@1c,2" +#define HURON_USB_3 "/pci@0/pci@0/pci@1/pci@0/pci@1/pci@0/usb@1c,3" +#define HURON_IDE "/pci@0/pci@0/pci@1/pci@0/pci@1/pci@0/ide@1f" +#define HURON_PCIE_SLOT1 "/pci@0/pci@0/pci@8/pci@0/pci@2" +#define HURON_PCIE_SLOT2 "/pci@0/pci@0/pci@8/pci@0/pci@1" +#define HURON_PCIE_SLOT3 "/pci@0/pci@0/pci@8/pci@0/pci@8" +#define HURON_PCIE_SLOT4 "/pci@0/pci@0/pci@9" +#define HURON_PCIE_SLOT5 "/pci@0/pci@0/pci@8/pci@0/pci@a" +#define HURON_PCIE_SLOT6 "/pci@0/pci@0/pci@8/pci@0/pci@9" +#define HURON_LSI_PATH "/pci@0/pci@0/pci@2/scsi@0" +#define HURON_N2_XAUI0 "/siu@80/network@0" +#define HURON_N2_XAUI1 "/siu@80/network@1" +#define SAS_SATA_HBA "SAS-SATA-HBA" + + + +/* + * Property names + */ +#define OBP_PROP_REG "reg" +#define OBP_PROP_CLOCK_FREQ "clock-frequency" +#define OBP_PROP_BOARD_NUM "board#" +#define OBP_PROP_REVISION_ID "revision-id" +#define OBP_PROP_VERSION_NUM "version#" +#define OBP_PROP_BOARD_TYPE "board_type" +#define OBP_PROP_ECACHE_SIZE "ecache-size" +#define OBP_PROP_IMPLEMENTATION "implementation#" +#define OBP_PROP_MASK "mask#" +#define OBP_PROP_COMPATIBLE "compatible" +#define OBP_PROP_BANNER_NAME "banner-name" +#define OBP_PROP_MODEL "model" +#define OBP_PROP_66MHZ_CAPABLE "66mhz-capable" +#define OBP_PROP_FBC_REG_ID "fbc_reg_id" +#define OBP_PROP_VERSION "version" +#define OBP_PROP_INSTANCE "instance" + +/* + * Function Headers + */ + + +/* local functions */ + +int huron_pci_callback(picl_nodehdl_t pcih, void *args); +int huron_hw_rev_callback(picl_nodehdl_t pcih, void *args); +int huron_get_first_compatible_value(picl_nodehdl_t nodeh, + char **outbuf); +int64_t huron_get_int_propval(picl_nodehdl_t modh, char *prop_name, + int *ret); +void huron_get_nac(char bus_type[], char path[], int s, + char name[], char loc[], int size); +int huron_get_name(picl_nodehdl_t nodeh, char name[], int size); +int huron_get_model(picl_nodehdl_t nodeh, char model[], int size); +int huron_get_path(picl_nodehdl_t nodeh, char path[], int size); +int huron_get_class(picl_nodehdl_t nodeh, char piclclass[], int size); +#ifdef __cplusplus +} +#endif + +#endif /* _HURON_H */ diff --git a/usr/src/lib/libprtdiag_psr/sparc/ontario/common/ontario.c b/usr/src/lib/libprtdiag_psr/sparc/ontario/common/ontario.c index 9ec2c25c35..d64d2f3ef4 100644 --- a/usr/src/lib/libprtdiag_psr/sparc/ontario/common/ontario.c +++ b/usr/src/lib/libprtdiag_psr/sparc/ontario/common/ontario.c @@ -55,6 +55,7 @@ #include "erie.h" #include "pelton.h" #include "stpaul.h" +#include "huron.h" #if !defined(TEXT_DOMAIN) #define TEXT_DOMAIN "SYS_TEST" @@ -331,6 +332,13 @@ sun4v_display_pci(picl_nodehdl_t plafh) strlen(STPAUL_PLATFORM))) == 0) { (void) picl_walk_tree_by_class(plafh, "pciex", "pciex", stpaul_pci_callback); + } else if ((strncmp(platbuf, HURON_1U_PLATFORM, + strlen(HURON_1U_PLATFORM)) == 0) || (strncmp(platbuf, + HURON_2U_PLATFORM, strlen(HURON_2U_PLATFORM)) == 0)) { + (void) picl_walk_tree_by_class(plafh, "siu", + "siu", huron_pci_callback); + (void) picl_walk_tree_by_class(plafh, "pciex", + "pciex", huron_pci_callback); } else { (void) picl_walk_tree_by_class(plafh, "pciex", "pciex", erie_pci_callback); @@ -479,7 +487,7 @@ sun4v_display_hw_revisions(Prom_node *root, picl_nodehdl_t plafh) Prom_node *pnode; char *value; char platbuf[MAXSTRLEN]; - char *fmt = "%-20s %-40s %-30s %-9s"; + char *fmt = "%-20s %-45s %-30s %-9s"; log_printf(dgettext(TEXT_DOMAIN, "\n" "========================= HW Revisions " @@ -500,7 +508,7 @@ sun4v_display_hw_revisions(Prom_node *root, picl_nodehdl_t plafh) "------------------\n")); log_printf(fmt, "Location", "Path", "Device", "Revision\n", 0); log_printf(fmt, "--------------------", - "----------------------------------------", + "---------------------------------------------", "------------------------------", "---------\n", 0); @@ -542,6 +550,17 @@ sun4v_display_hw_revisions(Prom_node *root, picl_nodehdl_t plafh) "network", stpaul_hw_rev_callback); (void) picl_walk_tree_by_class(plafh, "scsi-2", "scsi-2", stpaul_hw_rev_callback); + } else if ((strncmp(platbuf, HURON_1U_PLATFORM, + strlen(HURON_1U_PLATFORM)) == 0) || (strncmp(platbuf, + HURON_2U_PLATFORM, strlen(HURON_2U_PLATFORM)) == 0)) { + (void) picl_walk_tree_by_class(plafh, "pciex", + "pciex", huron_hw_rev_callback); + (void) picl_walk_tree_by_class(plafh, "siu", + "siu", huron_hw_rev_callback); + (void) picl_walk_tree_by_class(plafh, "network", + "network", huron_hw_rev_callback); + (void) picl_walk_tree_by_class(plafh, "scsi-2", "scsi-2", + huron_hw_rev_callback); } else { (void) picl_walk_tree_by_class(plafh, "pciex", "pciex", erie_hw_rev_callback); |
