summaryrefslogtreecommitdiff
path: root/usr/src/lib/fm/topo/maps/Joyent,Joyent-Compute-Platform-1101/Joyent-Compute-Platform-1101-disk-hc-topology.xmlgenksh
blob: 874bad142f69f41956cfbd7c131e44a3a279dae4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#!/bin/ksh
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source.  A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#

#
# Copyright (c) 2013, Joyent, Inc. All rights reserved.
#

function do_node
{
  cat <<EOF
    <node instance='${1}'>
      <propgroup name='protocol' version='1' name-stability='Private'
        data-stability='Private'>
        <propval name='label' type='string' value='${2}' />
      </propgroup>
      <propgroup name='binding' version='1' name-stability='Private'
        data-stability='Private'>
        <propval name='driver' type='string' value='mpt_sas' />
        <propval name='devctl' type='string' value='${3}' />
        <propval name='enclosure' type='uint32' value='${4}' />
        <propval name='slot' type='uint32' value='${5}' />
      </propgroup>
    </node>
EOF
}


cat <<EOF
<topology name='disk' scheme='hc'>
  <range name='bay' min='0' max='15'>
    <facility name='fail' type='indicator' provider='fac_prov_mptsas' >
      <propgroup name='facility' version='1' name-stability='Private'
        data-stability='Private' >
        <propval name='type' type='uint32' value='0' />
        <propmethod name='mptsas_led_mode' version='0' propname='mode'
          proptype='uint32' mutable='1'>
        </propmethod>
      </propgroup>
    </facility>
    <facility name='ident' type='indicator' provider='fac_prov_mptsas' >
      <propgroup name='facility' version='1' name-stability='Private'
        data-stability='Private' >
        <propval name='type' type='uint32' value='1' />
        <propmethod name='mptsas_led_mode' version='0' propname='mode'
          proptype='uint32' mutable='1'>
        </propmethod>
      </propgroup>
    </facility>
    <facility name='ok2rm' type='indicator' provider='fac_prov_mptsas' >
      <propgroup name='facility' version='1' name-stability='Private'
        data-stability='Private' >
        <propval name='type' type='uint32' value='2' />
        <propmethod name='mptsas_led_mode' version='0' propname='mode'
          proptype='uint32' mutable='1'>
        </propmethod>
      </propgroup>
    </facility>
EOF

enclosure=1
bay=0
slot=0
devctl0='/devices/pci@0,0/pci8086,3c02@1/pci15d9,691@0:devctl'
devctl1='/devices/pci@0,0/pci8086,e02@1/pci15d9,691@0:devctl'
while (( slot <= 7 )); do
  do_node $bay "Front Disk $bay" "$devctl0|$devctl1" $enclosure $slot
  (( bay = bay + 1 ))
  (( slot = slot + 1 ))
done

slot=0
devctl0='/devices/pci@0,0/pci8086,3c06@2,2/pci15d9,691@0:devctl'
devctl1='/devices/pci@0,0/pci8086,e06@2,2/pci15d9,691@0:devctl'
while (( slot <= 7 )); do
  do_node $bay "Front Disk $bay" "$devctl0|$devctl1" $enclosure $slot
  (( bay = bay + 1 ))
  (( slot = slot + 1 ))
done

cat <<EOF
    <dependents grouping='children'>
      <range name='disk' min='0' max='0'>
        <enum-method name='disk' version='1' />
      </range>
    </dependents>
  </range>
</topology>
EOF