5 # The contents of this file are subject to the terms of the
6 # Common Development and Distribution License (the "License").
7 # You may not use this file except in compliance with the License.
9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 # or http://www.opensolaris.org/os/licensing.
11 # See the License for the specific language governing permissions
12 # and limitations under the License.
14 # When distributing Covered Code, include this CDDL HEADER in each
15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 # If applicable, add the following below this CDDL HEADER, with the
17 # fields enclosed by brackets "[]" replaced with your own identifying
18 # information: Portions Copyright [yyyy] [name of copyright owner]
23 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
24 # Use is subject to license terms.
28 $bay_label = "HD_ID_";
40 "amask=0x0001", "dmask=0x0001",
41 "amask=0x0008", "dmask=0x0008",
42 "amask=0x0002", "dmask=0x0002");
44 "absent>present", "present>configured",
45 "configured>unconfigured", "unconfigured>configured",
46 "unconfigured>absent", "configured>absent",
47 "present>absent", "absent>configured");
49 "+PRSNT&+OK2RM", "+PRSNT&-OK2RM",
51 "-OK2RM&-PRSNT", "-OK2RM&-PRSNT",
52 "-OK2RM&-PRSNT", "-OK2RM&+PRSNT");
55 printf " <propgroup name='%s-properties' version='1' " .
56 "name-stability='Private' data-stability='Private' >\n", $name;
57 printf " <propval name='fru-update-action' type='string' " .
58 "value='ipmi:fru gid=3 hdd=%d' />\n", $bay;
60 for ($i = 0; $i < 6; $i++) {
61 printf " <propval name='indicator-name-%d' " .
62 "type='string' value='%s' />\n", $i, $names[$i];
63 printf " <propval name='indicator-action-%d' " .
64 "type='string' value='ipmi:state sid=%d %s' />\n",
68 for ($i = 0; $i < 8; $i++) {
69 printf " <propval name='indicator-rule-states-%d' " .
70 "type='string' value='%s' />\n", $i, $states[$i];
71 printf " <propval name='indicator-rule-actions-%d' " .
72 "type='string' value='%s' />\n", $i, $actions[$i];
74 printf " </propgroup>\n\n";
78 <topology name='disk' scheme='hc'>
79 <range name='bay' min='0' max='47'>
80 <facility name='locate' type='indicator' provider='fac_prov_ipmi' >
81 <propgroup name='facility' version='1' name-stability='Private'
82 data-stability='Private' >
83 <propval name='type' type='uint32' value='1' />
84 <propmethod name='ipmi_entity' version='0' propname='entity_ref'
85 proptype='string_array' >
86 <argval name='format' type='string_array'>
87 <argitem value='hdd\%d.ok2rm.led' />
89 <argval name='offset' type='uint32' value='0' />
90 <argval name='nparams' type='uint32' value='1' />
92 <propmethod name='bay_locate_mode' version='0'
93 propname='mode' proptype='uint32' mutable='1'>
97 <facility name='ok2rm' type='indicator' provider='fac_prov_ipmi' >
98 <propgroup name='facility' version='1' name-stability='Private'
99 data-stability='Private' >
100 <propval name='type' type='uint32' value='2' />
101 <propmethod name='ipmi_entity' version='0' propname='entity_ref'
102 proptype='string_array' >
103 <argval name='format' type='string_array'>
104 <argitem value='hdd\%d.state' />
106 <argval name='offset' type='uint32' value='0' />
107 <argval name='nparams' type='uint32' value='1' />
109 <propmethod name='bay_indicator_mode' version='0'
110 propname='mode' proptype='uint32' mutable='1'>
114 <facility name='service' type='indicator' provider='fac_prov_ipmi' >
115 <propgroup name='facility' version='1' name-stability='Private'
116 data-stability='Private' >
117 <propval name='type' type='uint32' value='0' />
118 <propmethod name='ipmi_entity' version='0' propname='entity_ref'
119 proptype='string_array' >
120 <argval name='format' type='string_array'>
121 <argitem value='hdd\%d.state' />
123 <argval name='offset' type='uint32' value='0' />
124 <argval name='nparams' type='uint32' value='1' />
126 <propmethod name='bay_indicator_mode' version='0' propname='mode'
127 proptype='uint32' mutable='1'>
131 <facility name='present' type='indicator' provider='fac_prov_ipmi' >
132 <propgroup name='facility' version='1' name-stability='Private'
133 data-stability='Private' >
134 <propval name='type' type='uint32' value='3' />
135 <propmethod name='ipmi_entity' version='0' propname='entity_ref'
136 proptype='string_array' >
137 <argval name='format' type='string_array'>
138 <argitem value='hdd\%d.state' />
140 <argval name='offset' type='uint32' value='0' />
141 <argval name='nparams' type='uint32' value='1' />
143 <propmethod name='x4500_present_mode' version='0' propname='mode'
144 proptype='uint32' mutable='1'>
151 my @pci1=(4, 3, 8, 7, 2, 1);
153 for ($bay = 0; $bay < $num_bays; $bay++) {
155 $target = (($bay/12) + (($bay & 1) << 2));
156 $index = (($bay >> 2) % 3);
158 $index = (($bay >> 1) % 6);
161 $hpath = sprintf("/pci\@%x,0/pci1022,7458\@%x/pci11ab,11ab\@1",
163 $tpath = sprintf("/disk\@%x,0", $target);
164 $apoint = sprintf(":%d", $target);
167 <node instance='$bay'>
168 <propgroup name='protocol' version='1' name-stability='Private'
169 data-stability='Private'>
170 <propval name='label' type='string' value='$bay_label$bay' />
172 <propgroup name='io' version='1' name-stability='Private'
173 data-stability='Private'>
174 <propval name='ap-path' type='string' value='/devices$hpath$apoint' />
178 calc_sfx_prop
("sfx4500", $bay, $sid);
181 <propgroup name='binding' version='1' name-stability='Private'
182 data-stability='Private'>
183 <propval name='occupant-path' type='string'
184 value='$hpath$tpath' />
191 <dependents grouping='children'>
192 <range name='disk' min='0' max='0'>
193 <enum-method name='disk' version='1' />