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 /* 23 * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 */ 26 27 #ifndef _PCI_SUN4U_H 28 #define _PCI_SUN4U_H 29 30 #include <pcibus_labels.h> 31 32 #ifdef __cplusplus 33 extern "C" { 34 #endif 35 36 #define XMITS_COMPAT "pci108e,8002" /* compatible property for XMits */ 37 38 /* 39 * Functions for platforms that need a label lookup 40 * test in addition to the standard ones provided. 41 */ 42 extern int sunfire_test_func(topo_mod_t *, did_t *); 43 44 /* 45 * Data for label lookup based on existing slot label. 46 * 47 * Platforms may need entries here if the slot labels 48 * provided by firmware are incorrect. 49 */ 50 51 slot_rwd_t v240_rewrites[] = { 52 /* from OBP, should be, test func */ 53 { "PCI3", "PCI0", NULL }, 54 { "PCI1", "PCI2", NULL }, 55 { "PCI2", "PCI1", NULL } 56 }; 57 58 slot_rwd_t sunfire_rewrites[] = { 59 { "slot 2", "slot 3", sunfire_test_func }, 60 { "slot 3", "slot 2", sunfire_test_func }, 61 { "slot 6", "slot 7", sunfire_test_func }, 62 { "slot 7", "slot 6", sunfire_test_func } 63 }; 64 65 plat_rwd_t plat_rewrites[] = { 66 { "Sun-Fire-V240", 67 sizeof (v240_rewrites) / sizeof (slot_rwd_t), 68 v240_rewrites }, 69 { "Sun-Fire", 70 sizeof (sunfire_rewrites) / sizeof (slot_rwd_t), 71 sunfire_rewrites } 72 }; 73 74 slotnm_rewrite_t SlotRWs = { 75 sizeof (plat_rewrites) / sizeof (plat_rwd_t), 76 plat_rewrites 77 }; 78 79 slotnm_rewrite_t *Slot_Rewrites = &SlotRWs; 80 physlot_names_t *Physlot_Names = NULL; 81 missing_names_t *Missing_Names = NULL; 82 83 #ifdef __cplusplus 84 } 85 #endif 86 87 #endif /* _PCI_SUN4U_H */ 88