2N/A/*
2N/A * CDDL HEADER START
2N/A *
2N/A * The contents of this file are subject to the terms of the
2N/A * Common Development and Distribution License (the "License").
2N/A * You may not use this file except in compliance with the License.
2N/A *
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * or http://www.opensolaris.org/os/licensing.
2N/A * See the License for the specific language governing permissions
2N/A * and limitations under the License.
2N/A *
2N/A * When distributing Covered Code, include this CDDL HEADER in each
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A * If applicable, add the following below this CDDL HEADER, with the
2N/A * fields enclosed by brackets "[]" replaced with your own identifying
2N/A * information: Portions Copyright [yyyy] [name of copyright owner]
2N/A *
2N/A * CDDL HEADER END
2N/A */
2N/A
2N/A/*
2N/A * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
2N/A */
2N/A
2N/A#ifndef _PCI_SUN4V_H
2N/A#define _PCI_SUN4V_H
2N/A
2N/A#include "pcibus_labels.h"
2N/A
2N/A#ifdef __cplusplus
2N/Aextern "C" {
2N/A#endif
2N/A
2N/A/*
2N/A * Data for label lookup based on physical slot number.
2N/A *
2N/A * Platforms may need entries here if the PCIe slot labels
2N/A * provided by firmware are missing or are incorrect.
2N/A */
2N/A
2N/Aphysnm_t t200_pnms[] = {
2N/A /* Slot #, Label */
2N/A { 224, "PCIE0" },
2N/A { 225, "PCIE1" },
2N/A { 226, "PCIE2" }
2N/A};
2N/A
2N/Aphysnm_t t5120_pnms[] = {
2N/A /* Slot #, Label */
2N/A { 0, "MB/RISER0/PCIE0" },
2N/A { 1, "MB/RISER1/PCIE1" },
2N/A { 2, "MB/RISER2/PCIE2" }
2N/A};
2N/A
2N/Aphysnm_t t5220_pnms[] = {
2N/A /* Slot #, Label */
2N/A { 0, "MB/RISER0/PCIE0" },
2N/A { 1, "MB/RISER1/PCIE1" },
2N/A { 2, "MB/RISER2/PCIE2" },
2N/A { 3, "MB/RISER0/PCIE3" },
2N/A { 4, "MB/RISER1/PCIE4" },
2N/A { 5, "MB/RISER2/PCIE5" }
2N/A};
2N/A
2N/Aphysnm_t usbrdt5240_pnms[] = {
2N/A /* Slot #, Label */
2N/A { 0, "MB/RISER0/EM0" },
2N/A { 1, "MB/RISER0/EM1" },
2N/A { 2, "MB/RISER1/EM2" },
2N/A { 3, "MB/RISER1/EM3" }
2N/A};
2N/A
2N/Aphysnm_t netra_t5220_pnms[] = {
2N/A /* Slot #, Label */
2N/A { 0, "MB/RISER0/PCIE0" },
2N/A { 1, "MB/RISER1/PCIE1" },
2N/A { 2, "MB/RISER2/PCIE2" },
2N/A { 3, "MB/PCI_MEZZ/PCIX3" },
2N/A { 4, "MB/PCI_MEZZ/PCIX4" },
2N/A { 5, "MB/PCI_MEZZ/PCIE5" }
2N/A};
2N/A
2N/Aphysnm_t netra_t5440_pnms[] = {
2N/A /* Slot #, Label */
2N/A { 0, "MB/PCI_AUX/PCIX0" },
2N/A { 1, "MB/PCI_AUX/PCIX1" },
2N/A { 2, "MB/PCI_AUX/PCIE2" },
2N/A { 3, "MB/PCI_AUX/PCIE3" },
2N/A { 4, "MB/PCI_MEZZ/XAUI4" },
2N/A { 5, "MB/PCI_MEZZ/XAUI5" },
2N/A { 6, "MB/PCI_MEZZ/PCIE6" },
2N/A { 7, "MB/PCI_MEZZ/PCIE7" },
2N/A { 8, "MB/PCI_MEZZ/PCIE8" },
2N/A { 9, "MB/PCI_MEZZ/PCIE9" }
2N/A};
2N/A
2N/Aphysnm_t t5440_pnms[] = {
2N/A /* Slot #, Label */
2N/A { 0, "MB/PCIE0" },
2N/A { 1, "MB/PCIE1" },
2N/A { 2, "MB/PCIE2" },
2N/A { 3, "MB/PCIE3" },
2N/A { 4, "MB/PCIE4" },
2N/A { 5, "MB/PCIE5" },
2N/A { 6, "MB/PCIE6" },
2N/A { 7, "MB/PCIE7" }
2N/A};
2N/A
2N/Aphysnm_t blade_t6340_pnms[] = {
2N/A /* Slot #, Label */
2N/A { 0, "SYS/EM0" },
2N/A { 1, "SYS/EM1" }
2N/A};
2N/A
2N/Apphysnm_t plat_pnames[] = {
2N/A { "Sun-Fire-T200",
2N/A sizeof (t200_pnms) / sizeof (physnm_t),
2N/A t200_pnms },
2N/A { "SPARC-Enterprise-T5120",
2N/A sizeof (t5120_pnms) / sizeof (physnm_t),
2N/A t5120_pnms },
2N/A { "SPARC-Enterprise-T5220",
2N/A sizeof (t5220_pnms) / sizeof (physnm_t),
2N/A t5220_pnms },
2N/A /*
2N/A * T5140/T5240 uses the same chassis as T5120/T5220, hence
2N/A * the same PCI slot mappings
2N/A */
2N/A { "T5140",
2N/A sizeof (t5120_pnms) / sizeof (physnm_t),
2N/A t5120_pnms },
2N/A { "T5240",
2N/A sizeof (t5220_pnms) / sizeof (physnm_t),
2N/A t5220_pnms },
2N/A { "T5440",
2N/A sizeof (t5440_pnms) / sizeof (physnm_t),
2N/A t5440_pnms },
2N/A { "USBRDT-5240",
2N/A sizeof (usbrdt5240_pnms) / sizeof (physnm_t),
2N/A usbrdt5240_pnms },
2N/A { "Netra-T5220",
2N/A sizeof (netra_t5220_pnms) / sizeof (physnm_t),
2N/A netra_t5220_pnms },
2N/A { "Netra-T5440",
2N/A sizeof (netra_t5440_pnms) / sizeof (physnm_t),
2N/A netra_t5440_pnms },
2N/A { "Sun-Blade-T6340",
2N/A sizeof (blade_t6340_pnms) / sizeof (physnm_t),
2N/A blade_t6340_pnms }
2N/A};
2N/A
2N/Aphyslot_names_t PhyslotNMs = {
2N/A sizeof (plat_pnames) / sizeof (pphysnm_t),
2N/A plat_pnames
2N/A};
2N/A
2N/A/*
2N/A * Data for label lookup based on device info.
2N/A *
2N/A * Platforms need entries here if there is no physical slot number
2N/A * (i.e. pci), and slot labels provided by firmware are missing.
2N/A */
2N/A
2N/Adevlab_t t200_missing[] = {
2N/A /* board, bridge, root-complex, bus, dev, label, test func */
2N/A { 0, 0, 1 - TO_PCI, 6, 1, "PCIX1", NULL },
2N/A { 0, 0, 1 - TO_PCI, 6, 2, "PCIX0", NULL }
2N/A};
2N/A
2N/Apdevlabs_t plats_missing[] = {
2N/A { "Sun-Fire-T200",
2N/A sizeof (t200_missing) / sizeof (devlab_t),
2N/A t200_missing },
2N/A};
2N/A
2N/Amissing_names_t Missing = {
2N/A sizeof (plats_missing) / sizeof (pdevlabs_t),
2N/A plats_missing
2N/A};
2N/A
2N/Achar *usT1_plats[] = {
2N/A "Sun-Fire-T200",
2N/A "Netra-T2000",
2N/A "SPARC-Enterprise-T1000",
2N/A "SPARC-Enterprise-T2000",
2N/A "Sun-Fire-T1000",
2N/A "Netra-CP3060",
2N/A "Sun-Blade-T6300",
2N/A NULL
2N/A};
2N/A
2N/Aslotnm_rewrite_t *Slot_Rewrites = NULL;
2N/Aphyslot_names_t *Physlot_Names = &PhyslotNMs;
2N/Amissing_names_t *Missing_Names = &Missing;
2N/A
2N/A#ifdef __cplusplus
2N/A}
2N/A#endif
2N/A
2N/A#endif /* _PCI_SUN4V_H */