144961713Sgirish /* 244961713Sgirish * CDDL HEADER START 344961713Sgirish * 444961713Sgirish * The contents of this file are subject to the terms of the 544961713Sgirish * Common Development and Distribution License (the "License"). 644961713Sgirish * You may not use this file except in compliance with the License. 744961713Sgirish * 844961713Sgirish * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 944961713Sgirish * or http://www.opensolaris.org/os/licensing. 1044961713Sgirish * See the License for the specific language governing permissions 1144961713Sgirish * and limitations under the License. 1244961713Sgirish * 1344961713Sgirish * When distributing Covered Code, include this CDDL HEADER in each 1444961713Sgirish * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 1544961713Sgirish * If applicable, add the following below this CDDL HEADER, with the 1644961713Sgirish * fields enclosed by brackets "[]" replaced with your own identifying 1744961713Sgirish * information: Portions Copyright [yyyy] [name of copyright owner] 1844961713Sgirish * 1944961713Sgirish * CDDL HEADER END 2044961713Sgirish */ 2144961713Sgirish /* 22758f2e04Szx * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 2344961713Sgirish * Use is subject to license terms. 2444961713Sgirish */ 2544961713Sgirish 2644961713Sgirish /* 2744961713Sgirish * Sun4v Platform header file. 2844961713Sgirish * 2944961713Sgirish * called when : 3044961713Sgirish * machine_type == huron 3144961713Sgirish * 3244961713Sgirish */ 3344961713Sgirish 3444961713Sgirish #ifndef _HURON_H 3544961713Sgirish #define _HURON_H 3644961713Sgirish 3744961713Sgirish #ifdef __cplusplus 3844961713Sgirish extern "C" { 3944961713Sgirish #endif 4044961713Sgirish 4144961713Sgirish #define HURON_2U_PLATFORM "SUNW,SPARC-Enterprise-T5220" 4244961713Sgirish #define HURON_1U_PLATFORM "SUNW,SPARC-Enterprise-T5120" 4344961713Sgirish #define HURON_PCIE_COMP 30 4444961713Sgirish #define HURON_XAUI_COMP 17 4544961713Sgirish #define NO_SLOT -1 4644961713Sgirish #define NET_COMP_NUM 3 4744961713Sgirish #define MOTHERBOARD "MB" 4844961713Sgirish #define HURON_SWITCH_A "PCI-SWITCH0" 4944961713Sgirish #define HURON_SWITCH_B "PCI-SWITCH1" 5044961713Sgirish #define HURON_SWITCH_C "PCI-SWITCH2" 5144961713Sgirish #define SOUTHBRIDGE "southbridge" 5244961713Sgirish #define OPHIR "GBE" 5344961713Sgirish #define NETWORK "network" 5444961713Sgirish #define PCIE "/PCIE" 5587c478a5Szx #define HURON_NIU "/niu@80" 5644961713Sgirish #define HURON_SWITCH_A_PATH "/pci@0/pci@0" 57*b423da26Szx #define HURON_SWITCH_B_PATH "/pci@0/pci@0/pci@8/pci@0" 58*b423da26Szx #define HURON_SWITCH_C_PATH "/pci@0/pci@0/pci@1/pci@0" 5944961713Sgirish #define HURON_NETWORK_0 "/pci@0/pci@0/pci@1/pci@0/pci@2/network@0" 6044961713Sgirish #define HURON_NETWORK_1 "/pci@0/pci@0/pci@1/pci@0/pci@2/network@0,1" 6144961713Sgirish #define HURON_NETWORK_2 "/pci@0/pci@0/pci@1/pci@0/pci@3/network@0" 6244961713Sgirish #define HURON_NETWORK_3 "/pci@0/pci@0/pci@1/pci@0/pci@3/network@0,1" 63*b423da26Szx #define HURON_PCIE_SLOT0 "/pci@0/pci@0/pci@8/pci@0/pci@9" 64*b423da26Szx #define HURON_PCIE_SLOT1 "/pci@0/pci@0/pci@8/pci@0/pci@1" 65*b423da26Szx #define HURON_PCIE_SLOT2 "/pci@0/pci@0/pci@9" 66*b423da26Szx #define HURON_PCIE_SLOT3 "/pci@0/pci@0/pci@8/pci@0/pci@a" 67*b423da26Szx #define HURON_PCIE_SLOT4 "/pci@0/pci@0/pci@8/pci@0/pci@2" 68*b423da26Szx #define HURON_PCIE_SLOT5 "/pci@0/pci@0/pci@8/pci@0/pci@8" 6944961713Sgirish #define HURON_LSI_PATH "/pci@0/pci@0/pci@2/scsi@0" 70*b423da26Szx #define HURON_N2_XAUI0 "/niu@80/network@1" 71*b423da26Szx #define HURON_N2_XAUI1 "/niu@80/network@0" 7244961713Sgirish #define SAS_SATA_HBA "SAS-SATA-HBA" 7344961713Sgirish 7444961713Sgirish /* 7544961713Sgirish * Property names 7644961713Sgirish */ 7744961713Sgirish #define OBP_PROP_REG "reg" 7844961713Sgirish #define OBP_PROP_CLOCK_FREQ "clock-frequency" 7944961713Sgirish #define OBP_PROP_BOARD_NUM "board#" 8044961713Sgirish #define OBP_PROP_REVISION_ID "revision-id" 8144961713Sgirish #define OBP_PROP_VERSION_NUM "version#" 8244961713Sgirish #define OBP_PROP_BOARD_TYPE "board_type" 8344961713Sgirish #define OBP_PROP_ECACHE_SIZE "ecache-size" 8444961713Sgirish #define OBP_PROP_IMPLEMENTATION "implementation#" 8544961713Sgirish #define OBP_PROP_MASK "mask#" 8644961713Sgirish #define OBP_PROP_COMPATIBLE "compatible" 8744961713Sgirish #define OBP_PROP_BANNER_NAME "banner-name" 8844961713Sgirish #define OBP_PROP_MODEL "model" 8944961713Sgirish #define OBP_PROP_66MHZ_CAPABLE "66mhz-capable" 9044961713Sgirish #define OBP_PROP_FBC_REG_ID "fbc_reg_id" 9144961713Sgirish #define OBP_PROP_VERSION "version" 9244961713Sgirish #define OBP_PROP_INSTANCE "instance" 9344961713Sgirish 9444961713Sgirish /* 9544961713Sgirish * Function Headers 9644961713Sgirish */ 9744961713Sgirish 9844961713Sgirish 9944961713Sgirish /* local functions */ 10044961713Sgirish 10144961713Sgirish int huron_pci_callback(picl_nodehdl_t pcih, void *args); 10244961713Sgirish int huron_hw_rev_callback(picl_nodehdl_t pcih, void *args); 10344961713Sgirish int huron_get_first_compatible_value(picl_nodehdl_t nodeh, 10444961713Sgirish char **outbuf); 10544961713Sgirish int64_t huron_get_int_propval(picl_nodehdl_t modh, char *prop_name, 10644961713Sgirish int *ret); 10744961713Sgirish void huron_get_nac(char bus_type[], char path[], int s, 10844961713Sgirish char name[], char loc[], int size); 10944961713Sgirish int huron_get_name(picl_nodehdl_t nodeh, char name[], int size); 11044961713Sgirish int huron_get_model(picl_nodehdl_t nodeh, char model[], int size); 11144961713Sgirish int huron_get_path(picl_nodehdl_t nodeh, char path[], int size); 11244961713Sgirish int huron_get_class(picl_nodehdl_t nodeh, char piclclass[], int size); 11344961713Sgirish #ifdef __cplusplus 11444961713Sgirish } 11544961713Sgirish #endif 11644961713Sgirish 11744961713Sgirish #endif /* _HURON_H */ 118