2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License, Version 1.0 only 2N/A * (the "License"). You may not use this file except in compliance 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 1999-2003 Sun Microsystems, Inc. All rights reserved. 2N/A * Use is subject to license terms. 2N/A#
pragma ident "%Z%%M% %I% %E% SMI" 2N/A * This file represents the splitting out of some functionality 2N/A * of prtdiag due to the port to the sun4u platform. The PROM 2N/A * tree-walking functions which contain sun4u specifics were moved 2N/A/* Function prototypes */ 2N/A * This is the starting point for all platforms. However, this function 2N/A * can be overlayed by writing a do_prominfo() function 2N/A * in the libprtdiag_psr for a particular platform. 2N/A /* set the global flags */ 2N/A /* set the the system tree fields */ 2N/A "does not support this option of this " 2N/A /* resolve the board types now */ 2N/A * check for upa-portid on UI and UII systems 2N/A * check for portid on UIII systems 2N/A * Walk the PROM device tree and build the system tree and root tree. 2N/A * Nodes that have a board number property are placed in the board 2N/A * structures for easier processing later. Child nodes are placed 2N/A * under their parents. ffb (Fusion Frame Buffer) nodes are handled 2N/A * specially, because they do not contain board number properties. 2N/A * This was requested from OBP, but was not granted. So this code 2N/A * must parse the MID of the FFB to find the board#. 2N/A /* allocate a node for this level */ 2N/A exit(
2);
/* program errors cause exit 2 */ 2N/A /* assign parent Prom_node */ 2N/A /* read properties for this node */ 2N/A * Place a node in a 'board' if it has 'board'-ness. The definition 2N/A * is that all nodes that are children of root should have a 2N/A * board# property. But the PROM tree does not exactly follow 2N/A * this. This is where we start hacking. The name 'ffb' can 2N/A * change, so watch out for this. 2N/A * The UltraSPARC, sbus, pci and ffb nodes will exit in 2N/A * the desktops and will not have board# properties. These 2N/A * cases must be handled here. 2N/A * PCI to PCI bridges also have the name "pci", but with different 2N/A * model property values. They should not be put under 'board'. 2N/A printf(
"ADDED BOARD name=%s type=%s model=%s\n",
2N/A printf(
"ADDED BOARD name=%s type=%s model=%s\n",