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 (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. 2N/A# The fan topologies can be quite complicated, but are ultimately regular. This 2N/A# perl file uses some simplified internal structures to generate an .xml file 2N/A# without the maintenance overhead. 2N/A# Master table of platforms. 2N/A # Galaxy 1/2 platforms. 2N/A # These systems have 2 fan-connector boards. Each fan-connector board has 3 2N/A # fan modules. Each fan module is an individual FRU. The fan-connector 2N/A # boards are also FRUs. 2N/A set => "Sun-Fire-X4100-Server|Sun-Fire-X4200-Server|" . 2N/A "Sun-Fire-X4100-M2|Sun-Fire-X4200-M2", 2N/A # These systems have 5 fan modules, with each fan module containing 2 fans. 2N/A # The FRUs for the individual fans are the containing fan module. 2N/A set => "Sun-Fire-X4500|Sun-Fire-X4540", 2N/A # There are two fan boards, which are FRU's. Each fan board has 2N/A # 3 fan modules for a total of 6 fan modules, with each fan module 2N/A # containing 2 fans. The FRU's for the individual fans are the 2N/A # containing fan module. 2N/A # Unfortunately, the IPMI topology on these systems is rather broken, and 2N/A # all the SDRs that should be separate entities in fact refer to the same 2N/A # entity IDs. So we have to use the alternative 'entity_present' option 2N/A # using a single SDR record. 2N/A set => "Sun-Fire-X4240|Sun-Fire-X4440", 2N/A # These systems have 4 fan assemblies with a single fan per assembly. 2N/A # Each fan assembly is a FRU. The fan assemblies have a service LED 2N/A # but no other indicators. 2N/A set => "Sun-Fire-X4600|Sun-Fire-X4600-M2", 2N/A # There are two fan boards, which are FRU's. The first fanboard has 4 2N/A # fanmodules (which are also FRU's). The second fan board has 3 fan 2N/A # modules. Each fanmodule contains two fans. 2N/A set => "Sun-Fire-X4140", 2N/A # There are two fan boards, which are FRU's. The first fanboard has 4 2N/A # fanmodules (which are also FRU's). The second fan board has 3 fan 2N/A # modules. Each fanmodule contains two fans. 2N/A set => "SUN-FIRE-X4150", 2N/A # There are two fan boards, which are FRU's. Both fanboards have 3 2N/A # fanmodules (which are also FRU's). Each fanmodule contains two fans. 2N/A set => "SUN-FIRE-X4250|SUN-FIRE-X4450", 2N/A # There is one fan board, which is a FRU. Connected to the fanboard are 2N/A # 6 fanmodules (which are also FRU's). Each fanmodule contains one fan. 2N/A set => "SUN-FIRE-X4470-SERVER", 2N/A # There is one fan board, which is a FRU. Connected to the fanboard are 2N/A # 6 fanmodules (which are also FRU's). Each fanmodule contains one fan. 2N/A set => "SUN-FIRE-X4470-M2-SERVER", 2N/A # There is one fan board, which is a FRU. Connected to the fanboard are 2N/A # 6 fanmodules (which are also FRU's). Each fanmodule contains two fans. 2N/A set => "SUN-FIRE-X4270-M2-SERVER", 2N/A # There is one fan board, which is a FRU. Connected to the fanboard are 2N/A # 4 fanmodules (which are also FRU's). Each fanmodule contains four fans. 2N/A set => "SUN-FIRE-X4170-M2-SERVER", 2N/A# Process an entry in the topology list. We are passed the indentation level, 2N/A# the current topology array, the set list, and any pushed indices. This is 2N/A# called recursively. 2N/A printf("%*s<range name='%s' min='%d' max='%d'>\n", 2N/A # Special case code for the 1U version of Durado and Duradi, 2N/A # both of which have an assymetric fan topology 2N/A # Facility enumerator 2N/A # Facility nodes for service and ok2rm LED's 2N/A printf("%*s<facility name='service' type='indicator' ". 2N/A printf("%*s<propgroup name='facility' version='1' ". 2N/A "name-stability='Private' data-stability='Private' >\n", 2N/A printf("%*s<propval name='type' type='uint32' ". 2N/A printf("%*s<propmethod name='ipmi_entity' version='0' ". 2N/A "propname='entity_ref' proptype='string_array' >\n", 2N/A printf("%*s<argval name='format' type='string_array'>\n", 2N/A printf("%*s<argval name='offset' type='uint32' ". 2N/A printf("%*s<argval name='nparams' type='uint32' ". 2N/A printf("%*s<propmethod name='ipmi_indicator_mode' ". 2N/A "version='0' propname='mode' proptype='uint32' ". 2N/A printf("%*s<facility name='ok2rm' type='indicator' ". 2N/A printf("%*s<propgroup name='facility' version='1' ". 2N/A "name-stability='Private' data-stability='Private' >\n", 2N/A printf("%*s<propval name='type' type='uint32' ". 2N/A printf("%*s<propmethod name='ipmi_entity' version='0' ". 2N/A "propname='entity_ref' proptype='string_array' >\n", 2N/A printf("%*s<argval name='format' type='string_array'>\n", 2N/A printf("%*s<argval name='offset' type='uint32' ". 2N/A printf("%*s<argval name='nparams' type='uint32' ". 2N/A printf("%*s<propmethod name='ipmi_indicator_mode' ". 2N/A "version='0' propname='mode' proptype='uint32' mutable='1' >\n", 2N/A # Protocol properties (label, fmri) 2N/A printf("%*s<propgroup name='protocol' version='1' " . 2N/A "name-stability='Private' data-stability='Private'>\n", 2N/A printf("%*s<propval name='label' type='string' " . 2N/A printf("%*s<propmethod name='ipmi_fru_fmri' " . 2N/A "version='0' propname='FRU' proptype='fmri'>\n", 2N/A printf("%*s<argval name='entity' type='string' " . 2N/A # Entity references (if any) 2N/A printf("%*s<propgroup name='ipmi' version='1' " . 2N/A "name-stability='Private' " . 2N/A printf("%*s<propgroup name='ipmi' version='1' " . 2N/A "name-stability='Private' " . 2N/A printf("%*s<propval name='entity_present' " . 2N/A # Post-process IPMI enumerator method 2N/A printf("%*s<enum-method name='ipmi' version='1' ". 2N/A printf("%*s<dependents grouping='children'>\n", 2N/A# Process a single platform file. 2N/Aprint "<topology name='fan' scheme='hc'>\n";
2N/Aprint "</topology>\n";