#
# 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 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#
# The fan topologies can be quite complicated, but are ultimately regular. This
# perl file uses some simplified internal structures to generate an .xml file
# without the maintenance overhead.
#
use strict;
#
# Master table of platforms.
#
my @platforms = (
#
# Galaxy 1/2 platforms.
#
# These systems have 2 fan-connector boards. Each fan-connector board has 3
# fan modules. Each fan module is an individual FRU. The fan-connector
# boards are also FRUs.
#
{
set => "Sun-Fire-X4100-Server|Sun-Fire-X4200-Server|" .
"Sun-Fire-X4100-M2|Sun-Fire-X4200-M2",
topology => [
{
count => 2,
fru => "self"
}, {
fac_enum => 1,
count => 3,
entity_ref_nparams => 2,
fru => "self"
}
]
},
#
# Thumper platforms
#
# These systems have 5 fan modules, with each fan module containing 2 fans.
# The FRUs for the individual fans are the containing fan module.
#
{
set => "Sun-Fire-X4500|Sun-Fire-X4540",
topology => [
{
fac_enum => 0,
count => 5,
entity_ref_nparams => 1,
}, {
fac_enum => 1,
count => 2,
entity_ref_nparams => 2,
fru => "parent"
}
]
},
#
#
# There are two fan boards, which are FRU's. Each fan board has
# 3 fan modules for a total of 6 fan modules, with each fan module
# containing 2 fans. The FRU's for the individual fans are the
# containing fan module.
#
# Unfortunately, the IPMI topology on these systems is rather broken, and
# all the SDRs that should be separate entities in fact refer to the same
# entity IDs. So we have to use the alternative 'entity_present' option
# using a single SDR record.
#
{
set => "Sun-Fire-X4240|Sun-Fire-X4440",
topology => [
{
count => 2,
fru => "self"
}, {
count => 3,
entity_ref_nparams => 2
}, {
fac_enum => 1,
count => 2,
entity_ref_nparams => 3
}
]
},
#
#
# These systems have 4 fan assemblies with a single fan per assembly.
# Each fan assembly is a FRU. The fan assemblies have a service LED
# but no other indicators.
#
{
set => "Sun-Fire-X4600|Sun-Fire-X4600-M2",
topology => [
{
fac_enum => 1,
count => 4,
entity_ref_nparams => 1,
fm_service_indctr => "ft%d.fm0.led"
}
]
},
#
#
# There are two fan boards, which are FRU's. The first fanboard has 4
# fanmodules (which are also FRU's). The second fan board has 3 fan
# modules. Each fanmodule contains two fans.
#
{
set => "Sun-Fire-X4140",
topology => [
{
count => 2,
}, {
fac_enum => 1,
count => 4,
entity_ref_nparams => 2
}, {
fac_enum => 1,
count => 2,
entity_ref_nparams => 3
}
]
},
#
#
# There are two fan boards, which are FRU's. The first fanboard has 4
# fanmodules (which are also FRU's). The second fan board has 3 fan
# modules. Each fanmodule contains two fans.
#
{
set => "SUN-FIRE-X4150",
topology => [
{
count => 2,
entity_present => "FB%d/PRSRNT"
}, {
count => 4,
entity_ref_nparams => 2
}, {
fac_enum => 1,
count => 2,
entity_ref_nparams => 3
}
]
},
#
#
# There are two fan boards, which are FRU's. Both fanboards have 3
# fanmodules (which are also FRU's). Each fanmodule contains two fans.
#
{
set => "SUN-FIRE-X4250|SUN-FIRE-X4450",
topology => [
{
count => 2,
entity_present => "FB%d/PRSRNT"
}, {
count => 3,
entity_ref_nparams => 2
}, {
fac_enum => 1,
count => 2,
entity_ref_nparams => 3
}
]
}
);
#
# Process an entry in the topology list. We are passed the indentation level,
# the current topology array, the set list, and any pushed indices. This is
# called recursively.
#
sub process_topology
{
$indent += 2;
#
# Special case code for the 1U version of Durado and Duradi,
# both of which have an assymetric fan topology
#
$indent += 2;
# Facility enumerator
}
# Facility nodes for service and ok2rm LED's
"name-stability='Private' data-stability='Private' >\n",
"propname='entity_ref' proptype='string_array' >\n",
}
$level->{entity_ref_nparams});
"version='0' propname='mode' proptype='uint32' ".
}
"name-stability='Private' data-stability='Private' >\n",
"propname='entity_ref' proptype='string_array' >\n",
}
$level->{entity_ref_nparams});
"version='0' propname='mode' proptype='uint32' mutable='1' >\n",
}
# Protocol properties (label, fmri)
"name-stability='Private' data-stability='Private'>\n",
$indent += 2;
}
"version='0' propname='FRU' proptype='fmri'>\n",
$indent -= 2;
#
# Entity references (if any)
#
my $val = $level->{entity_ref};
"name-stability='Private' " .
}
}
my $val = $level->{entity_present};
"name-stability='Private' " .
}
}
#
# Post-process IPMI enumerator method
#
#
# Children (if any)
#
}
$indent -= 2;
}
$indent -= 2;
}
#
# Process a single platform file.
#
sub process_platform
{
my $indent = 2;
$desc->{set});
}
print "<topology name='fan' scheme='hc'>\n";
my $desc;
}
print "</topology>\n";