1 /* 2 * CDDL HEADER START 3 * 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. 7 * 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. 12 * 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] 18 * 19 * CDDL HEADER END 20 */ 21 /* 22 * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 23 * Use is subject to license terms. 24 */ 25 26 /* 27 * Sun4v Platform header file. 28 * 29 * called when : 30 * machine_type == huron 31 * 32 */ 33 34 #ifndef _HURON_H 35 #define _HURON_H 36 37 #pragma ident "%Z%%M% %I% %E% SMI" 38 39 #ifdef __cplusplus 40 extern "C" { 41 #endif 42 43 #define HURON_2U_PLATFORM "SUNW,SPARC-Enterprise-T5220" 44 #define HURON_1U_PLATFORM "SUNW,SPARC-Enterprise-T5120" 45 #define HURON_PCIE_COMP 30 46 #define HURON_XAUI_COMP 17 47 #define NO_SLOT -1 48 #define NET_COMP_NUM 3 49 #define MOTHERBOARD "MB" 50 #define HURON_SWITCH_A "PCI-SWITCH0" 51 #define HURON_SWITCH_B "PCI-SWITCH1" 52 #define HURON_SWITCH_C "PCI-SWITCH2" 53 #define SOUTHBRIDGE "southbridge" 54 #define OPHIR "GBE" 55 #define NETWORK "network" 56 #define PCIE "/PCIE" 57 #define HURON_NIU "/niu@80" 58 #define HURON_SWITCH_A_PATH "/pci@0/pci@0" 59 #define HURON_SWITCH_B_PATH "/pci@0/pci@0/pci@8/pci@0" 60 #define HURON_SWITCH_C_PATH "/pci@0/pci@0/pci@1/pci@0" 61 #define HURON_NETWORK_0 "/pci@0/pci@0/pci@1/pci@0/pci@2/network@0" 62 #define HURON_NETWORK_1 "/pci@0/pci@0/pci@1/pci@0/pci@2/network@0,1" 63 #define HURON_NETWORK_2 "/pci@0/pci@0/pci@1/pci@0/pci@3/network@0" 64 #define HURON_NETWORK_3 "/pci@0/pci@0/pci@1/pci@0/pci@3/network@0,1" 65 #define HURON_PCIE_SLOT0 "/pci@0/pci@0/pci@8/pci@0/pci@9" 66 #define HURON_PCIE_SLOT1 "/pci@0/pci@0/pci@8/pci@0/pci@1" 67 #define HURON_PCIE_SLOT2 "/pci@0/pci@0/pci@9" 68 #define HURON_PCIE_SLOT3 "/pci@0/pci@0/pci@8/pci@0/pci@a" 69 #define HURON_PCIE_SLOT4 "/pci@0/pci@0/pci@8/pci@0/pci@2" 70 #define HURON_PCIE_SLOT5 "/pci@0/pci@0/pci@8/pci@0/pci@8" 71 #define HURON_LSI_PATH "/pci@0/pci@0/pci@2/scsi@0" 72 #define HURON_N2_XAUI0 "/niu@80/network@1" 73 #define HURON_N2_XAUI1 "/niu@80/network@0" 74 #define SAS_SATA_HBA "SAS-SATA-HBA" 75 76 /* 77 * Property names 78 */ 79 #define OBP_PROP_REG "reg" 80 #define OBP_PROP_CLOCK_FREQ "clock-frequency" 81 #define OBP_PROP_BOARD_NUM "board#" 82 #define OBP_PROP_REVISION_ID "revision-id" 83 #define OBP_PROP_VERSION_NUM "version#" 84 #define OBP_PROP_BOARD_TYPE "board_type" 85 #define OBP_PROP_ECACHE_SIZE "ecache-size" 86 #define OBP_PROP_IMPLEMENTATION "implementation#" 87 #define OBP_PROP_MASK "mask#" 88 #define OBP_PROP_COMPATIBLE "compatible" 89 #define OBP_PROP_BANNER_NAME "banner-name" 90 #define OBP_PROP_MODEL "model" 91 #define OBP_PROP_66MHZ_CAPABLE "66mhz-capable" 92 #define OBP_PROP_FBC_REG_ID "fbc_reg_id" 93 #define OBP_PROP_VERSION "version" 94 #define OBP_PROP_INSTANCE "instance" 95 96 /* 97 * Function Headers 98 */ 99 100 101 /* local functions */ 102 103 int huron_pci_callback(picl_nodehdl_t pcih, void *args); 104 int huron_hw_rev_callback(picl_nodehdl_t pcih, void *args); 105 int huron_get_first_compatible_value(picl_nodehdl_t nodeh, 106 char **outbuf); 107 int64_t huron_get_int_propval(picl_nodehdl_t modh, char *prop_name, 108 int *ret); 109 void huron_get_nac(char bus_type[], char path[], int s, 110 char name[], char loc[], int size); 111 int huron_get_name(picl_nodehdl_t nodeh, char name[], int size); 112 int huron_get_model(picl_nodehdl_t nodeh, char model[], int size); 113 int huron_get_path(picl_nodehdl_t nodeh, char path[], int size); 114 int huron_get_class(picl_nodehdl_t nodeh, char piclclass[], int size); 115 #ifdef __cplusplus 116 } 117 #endif 118 119 #endif /* _HURON_H */ 120