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 #ifdef __cplusplus 38 extern "C" { 39 #endif 40 41 #define HURON_2U_PLATFORM "SUNW,SPARC-Enterprise-T5220" 42 #define HURON_1U_PLATFORM "SUNW,SPARC-Enterprise-T5120" 43 #define HURON_PCIE_COMP 30 44 #define HURON_XAUI_COMP 17 45 #define NO_SLOT -1 46 #define NET_COMP_NUM 3 47 #define MOTHERBOARD "MB" 48 #define HURON_SWITCH_A "PCI-SWITCH0" 49 #define HURON_SWITCH_B "PCI-SWITCH1" 50 #define HURON_SWITCH_C "PCI-SWITCH2" 51 #define SOUTHBRIDGE "southbridge" 52 #define OPHIR "GBE" 53 #define NETWORK "network" 54 #define PCIE "/PCIE" 55 #define HURON_NIU "/niu@80" 56 #define HURON_SWITCH_A_PATH "/pci@0/pci@0" 57 #define HURON_SWITCH_B_PATH "/pci@0/pci@0/pci@8/pci@0" 58 #define HURON_SWITCH_C_PATH "/pci@0/pci@0/pci@1/pci@0" 59 #define HURON_NETWORK_0 "/pci@0/pci@0/pci@1/pci@0/pci@2/network@0" 60 #define HURON_NETWORK_1 "/pci@0/pci@0/pci@1/pci@0/pci@2/network@0,1" 61 #define HURON_NETWORK_2 "/pci@0/pci@0/pci@1/pci@0/pci@3/network@0" 62 #define HURON_NETWORK_3 "/pci@0/pci@0/pci@1/pci@0/pci@3/network@0,1" 63 #define HURON_PCIE_SLOT0 "/pci@0/pci@0/pci@8/pci@0/pci@9" 64 #define HURON_PCIE_SLOT1 "/pci@0/pci@0/pci@8/pci@0/pci@1" 65 #define HURON_PCIE_SLOT2 "/pci@0/pci@0/pci@9" 66 #define HURON_PCIE_SLOT3 "/pci@0/pci@0/pci@8/pci@0/pci@a" 67 #define HURON_PCIE_SLOT4 "/pci@0/pci@0/pci@8/pci@0/pci@2" 68 #define HURON_PCIE_SLOT5 "/pci@0/pci@0/pci@8/pci@0/pci@8" 69 #define HURON_LSI_PATH "/pci@0/pci@0/pci@2/scsi@0" 70 #define HURON_N2_XAUI0 "/niu@80/network@1" 71 #define HURON_N2_XAUI1 "/niu@80/network@0" 72 #define SAS_SATA_HBA "SAS-SATA-HBA" 73 74 /* 75 * Property names 76 */ 77 #define OBP_PROP_REG "reg" 78 #define OBP_PROP_CLOCK_FREQ "clock-frequency" 79 #define OBP_PROP_BOARD_NUM "board#" 80 #define OBP_PROP_REVISION_ID "revision-id" 81 #define OBP_PROP_VERSION_NUM "version#" 82 #define OBP_PROP_BOARD_TYPE "board_type" 83 #define OBP_PROP_ECACHE_SIZE "ecache-size" 84 #define OBP_PROP_IMPLEMENTATION "implementation#" 85 #define OBP_PROP_MASK "mask#" 86 #define OBP_PROP_COMPATIBLE "compatible" 87 #define OBP_PROP_BANNER_NAME "banner-name" 88 #define OBP_PROP_MODEL "model" 89 #define OBP_PROP_66MHZ_CAPABLE "66mhz-capable" 90 #define OBP_PROP_FBC_REG_ID "fbc_reg_id" 91 #define OBP_PROP_VERSION "version" 92 #define OBP_PROP_INSTANCE "instance" 93 94 /* 95 * Function Headers 96 */ 97 98 99 /* local functions */ 100 101 int huron_pci_callback(picl_nodehdl_t pcih, void *args); 102 int huron_hw_rev_callback(picl_nodehdl_t pcih, void *args); 103 int huron_get_first_compatible_value(picl_nodehdl_t nodeh, 104 char **outbuf); 105 int64_t huron_get_int_propval(picl_nodehdl_t modh, char *prop_name, 106 int *ret); 107 void huron_get_nac(char bus_type[], char path[], int s, 108 char name[], char loc[], int size); 109 int huron_get_name(picl_nodehdl_t nodeh, char name[], int size); 110 int huron_get_model(picl_nodehdl_t nodeh, char model[], int size); 111 int huron_get_path(picl_nodehdl_t nodeh, char path[], int size); 112 int huron_get_class(picl_nodehdl_t nodeh, char piclclass[], int size); 113 #ifdef __cplusplus 114 } 115 #endif 116 117 #endif /* _HURON_H */ 118