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 2006 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@1/pci@0" 60 #define HURON_SWITCH_C_PATH "/pci@0/pci@0/pci@8/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_USB_0 "/pci@0/pci@0/pci@1/pci@0/pci@1/pci@0/usb@1c" 66 #define HURON_USB_1 "/pci@0/pci@0/pci@1/pci@0/pci@1/pci@0/usb@1c,1" 67 #define HURON_USB_2 "/pci@0/pci@0/pci@1/pci@0/pci@1/pci@0/usb@1c,2" 68 #define HURON_USB_3 "/pci@0/pci@0/pci@1/pci@0/pci@1/pci@0/usb@1c,3" 69 #define HURON_IDE "/pci@0/pci@0/pci@1/pci@0/pci@1/pci@0/ide@1f" 70 #define HURON_PCIE_SLOT1 "/pci@0/pci@0/pci@8/pci@0/pci@2" 71 #define HURON_PCIE_SLOT2 "/pci@0/pci@0/pci@8/pci@0/pci@1" 72 #define HURON_PCIE_SLOT3 "/pci@0/pci@0/pci@8/pci@0/pci@8" 73 #define HURON_PCIE_SLOT4 "/pci@0/pci@0/pci@9" 74 #define HURON_PCIE_SLOT5 "/pci@0/pci@0/pci@8/pci@0/pci@a" 75 #define HURON_PCIE_SLOT6 "/pci@0/pci@0/pci@8/pci@0/pci@9" 76 #define HURON_LSI_PATH "/pci@0/pci@0/pci@2/scsi@0" 77 #define HURON_N2_XAUI0 "/niu@80/network@0" 78 #define HURON_N2_XAUI1 "/niu@80/network@1" 79 #define SAS_SATA_HBA "SAS-SATA-HBA" 80 81 82 83 /* 84 * Property names 85 */ 86 #define OBP_PROP_REG "reg" 87 #define OBP_PROP_CLOCK_FREQ "clock-frequency" 88 #define OBP_PROP_BOARD_NUM "board#" 89 #define OBP_PROP_REVISION_ID "revision-id" 90 #define OBP_PROP_VERSION_NUM "version#" 91 #define OBP_PROP_BOARD_TYPE "board_type" 92 #define OBP_PROP_ECACHE_SIZE "ecache-size" 93 #define OBP_PROP_IMPLEMENTATION "implementation#" 94 #define OBP_PROP_MASK "mask#" 95 #define OBP_PROP_COMPATIBLE "compatible" 96 #define OBP_PROP_BANNER_NAME "banner-name" 97 #define OBP_PROP_MODEL "model" 98 #define OBP_PROP_66MHZ_CAPABLE "66mhz-capable" 99 #define OBP_PROP_FBC_REG_ID "fbc_reg_id" 100 #define OBP_PROP_VERSION "version" 101 #define OBP_PROP_INSTANCE "instance" 102 103 /* 104 * Function Headers 105 */ 106 107 108 /* local functions */ 109 110 int huron_pci_callback(picl_nodehdl_t pcih, void *args); 111 int huron_hw_rev_callback(picl_nodehdl_t pcih, void *args); 112 int huron_get_first_compatible_value(picl_nodehdl_t nodeh, 113 char **outbuf); 114 int64_t huron_get_int_propval(picl_nodehdl_t modh, char *prop_name, 115 int *ret); 116 void huron_get_nac(char bus_type[], char path[], int s, 117 char name[], char loc[], int size); 118 int huron_get_name(picl_nodehdl_t nodeh, char name[], int size); 119 int huron_get_model(picl_nodehdl_t nodeh, char model[], int size); 120 int huron_get_path(picl_nodehdl_t nodeh, char path[], int size); 121 int huron_get_class(picl_nodehdl_t nodeh, char piclclass[], int size); 122 #ifdef __cplusplus 123 } 124 #endif 125 126 #endif /* _HURON_H */ 127