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 2007 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 sun4v platform. The PROM 2N/A * tree-walking functions which contain sun4v 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 * sun4v_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. 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. 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 compatible=%s\n",
2N/A printf(
"ADDED BOARD name=%s type=%s compatible=%s\n",
2N/A * search children to get the node by the nodename 2N/A * This function is intentionally empty