pci_sun4v.c revision cb3f2375234dff602cedb2b5e0afd6c27ec05ecb
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <fm/topo_mod.h>
#include <string.h>
/*
* Including the following file gives us definitions of the three
* global arrays used to adjust labels, Slot_Rewrites, Physlot_Names,
* and Missing_Names. With those defined we can use the common labeling
* routines for pci.
*/
#include "pci_sun4v.h"
#include "pci_sun4.h"
int
{
}
int
{
int err = 0;
const char *label;
int found_t1plat = 0;
return (-1);
}
/* Delete the "SUNW," */
else
++pp;
/* Is this an UltraSPARC-T1 platform? */
cp = usT1_plats;
found_t1plat = 1;
cp++;
}
/*
* On UltraSPARC-T1 systems, use the legacy hc scheme on
* the adapter slots to ensure ALOM on the SP can interpret
* the FRU correctly. For everything else, follow the normal
* code flow
*/
if (found_t1plat) {
return (0);
"not found.\n");
return (-1);
}
/*
* Is there a slotname associated with the device?
*/
!= NULL) {
label);
return (-1);
}
return (0);
} else {
}
}