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='DBP/HDD\%d/OK2RM' />
88 <argitem value='hdd\%d.ok2rm.led' />
90 <argval name='offset' type='uint32' value='0' />
91 <argval name='nparams' type='uint32' value='1' />
93 <propmethod name='bay_locate_mode' version='0'
94 propname='mode' proptype='uint32' mutable='1'>
98 <facility name='ok2rm' type='indicator' provider='fac_prov_ipmi' >
99 <propgroup name='facility' version='1' name-stability='Private'
100 data-stability='Private' >
101 <propval name='type' type='uint32' value='2' />
102 <propmethod name='ipmi_entity' version='0' propname='entity_ref'
103 proptype='string_array' >
104 <argval name='format' type='string_array'>
105 <argitem value='DBP/HDD\%d/STATE' />
106 <argitem value='hdd\%d.state' />
107 <argitem value='DBP/HDD\%d/OK2RM' />
108 <argitem value='hdd\%d.ok2rm.led' />
110 <argval name='offset' type='uint32' value='0' />
111 <argval name='nparams' type='uint32' value='1' />
113 <propmethod name='bay_indicator_mode' version='0'
114 propname='mode' proptype='uint32' mutable='1'>
118 <facility name='service' type='indicator' provider='fac_prov_ipmi' >
119 <propgroup name='facility' version='1' name-stability='Private'
120 data-stability='Private' >
121 <propval name='type' type='uint32' value='0' />
122 <propmethod name='ipmi_entity' version='0' propname='entity_ref'
123 proptype='string_array' >
124 <argval name='format' type='string_array'>
125 <argitem value='DBP/HDD\%d/STATE' />
126 <argitem value='hdd\%d.state' />
127 <argitem value='DBP/HDD\%d/SVC' />
128 <argitem value='hdd\%d.fail.led' />
130 <argval name='offset' type='uint32' value='0' />
131 <argval name='nparams' type='uint32' value='1' />
133 <propmethod name='bay_indicator_mode' version='0' propname='mode'
134 proptype='uint32' mutable='1'>
140 my @pci0=(0, 0, 0, 0x3c, 0x3c, 0x3c);
141 my @pci1=(0x377, 0x375, 0x376, 0x377, 0x375, 0x376);
142 my @pci2=(0xa, 0xb, 0xf, 0xa, 0xb, 0xf);
144 for ($bay = 0; $bay < $num_bays; $bay++) {
147 $controller = $bay / 8;
149 # set hba path, target path, bay path, and attachment point
150 $hpath = sprintf("/pci\@%x,0/pci10de,%x\@%x/pci1000,1000\@0",
151 $pci0[$controller], $pci1[$controller], $pci2[$controller]);
152 $tpath = sprintf("/sd\@%x,0", $target);
153 $apoint = sprintf(":scsi::dsk/c%dt%dd0",
154 $controller + 1, $target);
157 <node instance='$bay'>
158 <propgroup name='protocol' version='1' name-stability='Private'
159 data-stability='Private'>
160 <propval name='label' type='string' value='$bay_label$bay' />
162 <propgroup name='io' version='1' name-stability='Private'
163 data-stability='Private'>
164 <propval name='ap-path' type='string' value='/devices$hpath$apoint' />
168 calc_sfx_prop
("sfx4500", $bay, $sid);
171 <propgroup name='binding' version='1' name-stability='Private'
172 data-stability='Private'>
173 <propval name='occupant-path' type='string'
174 value='$hpath$tpath' />
181 <dependents grouping='children'>
182 <range name='disk' min='0' max='0'>
183 <enum-method name='disk' version='1' />