x86pi.c revision 03f9f63d24f0494b7d47b927090ad9045e396402
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 * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 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 * Copyright 2010 Sun Microsystems, Inc. All rights reserved. 2N/A * Use is subject to license terms. 2N/A * x86 Generic FMA Topology Enumerator 2N/A * Entry point called by libtopo when enumeration is required 2N/A * Declare the operations vector and information structure used during 2N/A * module registration 2N/A * Used to pass SMBIOS' FM compatibility to the 2N/A * Called by libtopo when the topo module is loaded. 2N/A /* Debugging is requested for this module */ 2N/A /* Verify that this is a i86pc architecture machine */ 2N/A /* module errno already set */ 2N/A * Clean up any data used by the module before it is unloaded. 2N/A /* Unregister from libtopo */ 2N/A * Enumeration entry point for the x86 Generic topology enumerator 2N/A /* Begin enumeration */ 2N/A * Let's do some enumeration. 2N/A /* Complete enumeration */ 2N/A char *f =
"x86pi_enum_start";
2N/A * Verify BIOS compliance. /* fall back to legacy enumeration */ "%s: Calling legacy enumeration\n", f);
* Create the i86pc topology * walk them creating the topo. char *f =
"x86pi_enum_gentopo";
* Expect SMBIOS to set the first Chassis Structure to be the "%s: Failed to create chassis %d\n", f,
nch);
/* count SMBIOS extended port connector structures */ /* enumerate direct attached SATA disks */ "%s: Failed to create %s range: %s\n",
"smbios_info_export failed: id = %d\n",
* call "disk" enum passing in "bay" node "Failed to create disk %d\n", i);
* We have reached end of the array due to the * parent-child relationship, without visiting all * baseboards! so re-iterate.. * All baseboards are visited and their contained * processors are enumerated * More baseboards pending a visit * Get the Top-most Parent Baseboard, irrespective * of its index in the array of Type-2s * If this Baseboard has no Baseboard parents * place it under the chassis that contains it "Failed to get BaseBoard node (%d): parent\n",
"Failed to create BaseBoard node (%d)\n",
nbb);
* Look for contained handles here and if there are * make sure the chip handle below is part of it. /* make sure the chip enum is loaded */ "%s: Failed to load %s module: %s\n", f,
"%s: chip range %d to %d\n",
"%s: Failed to create node range: " /* call the chip enumerator */ "enumeration failed: \n",
/* enumerate the hostbridge node */ "%s: Failed to create %s range: %s\n",
"smbios_info_pciexrc failed: " "couldn't create hostbridge=%d\n",
hbri);