summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2022-07-19 16:49:53 -0400
committerGarrett D'Amore <garrett@damore.org>2022-08-01 20:48:35 -0400
commit5c0b3261bd16d5eb356ffc864b6eab76c2e760e5 (patch)
treed577e0caf683670962e12ade2dc72720110a55f4
parent590c4b3e5288a54373957346db9d38c75ca28802 (diff)
downloadillumos-joyent-5c0b3261bd16d5eb356ffc864b6eab76c2e760e5.tar.gz
14828 remove SPARC FMA support
Reviewed by: Peter Tribble <peter.tribble@gmail.com> Reviewed by: Toomas Soome <tsoome@me.com> Approved by: Dan McDonald <danmcd@mnx.io>
-rw-r--r--usr/src/cmd/fm/dicts/Makefile19
-rw-r--r--usr/src/cmd/fm/dicts/SCF.dict198
-rw-r--r--usr/src/cmd/fm/dicts/SCF.po2713
-rw-r--r--usr/src/cmd/fm/dicts/SUN4.dict50
-rw-r--r--usr/src/cmd/fm/dicts/SUN4.po345
-rw-r--r--usr/src/cmd/fm/dicts/SUN4U.dict273
-rw-r--r--usr/src/cmd/fm/dicts/SUN4U.po3930
-rw-r--r--usr/src/cmd/fm/dicts/SUN4V.dict119
-rw-r--r--usr/src/cmd/fm/dicts/SUN4V.po1481
-rw-r--r--usr/src/cmd/fm/eversholt/eftinfo/sparc/Makefile29
-rw-r--r--usr/src/cmd/fm/eversholt/esc/sparc/Makefile29
-rw-r--r--usr/src/cmd/fm/eversholt/files/Makefile1
-rw-r--r--usr/src/cmd/fm/eversholt/files/sparc/Makefile42
-rw-r--r--usr/src/cmd/fm/eversholt/files/sparc/sun4/Makefile.sun436
-rw-r--r--usr/src/cmd/fm/eversholt/files/sparc/sun4/fire.esc672
-rw-r--r--usr/src/cmd/fm/eversholt/files/sparc/sun4u/Makefile33
-rw-r--r--usr/src/cmd/fm/eversholt/files/sparc/sun4u/oberon.esc160
-rw-r--r--usr/src/cmd/fm/eversholt/files/sparc/sun4u/psycho.esc252
-rw-r--r--usr/src/cmd/fm/eversholt/files/sparc/sun4u/schizo.esc441
-rw-r--r--usr/src/cmd/fm/eversholt/files/sparc/sun4u/tomatillo.esc430
-rw-r--r--usr/src/cmd/fm/eversholt/files/sparc/sun4u/xmits.esc449
-rw-r--r--usr/src/cmd/fm/eversholt/files/sparc/sun4v/Makefile34
-rw-r--r--usr/src/cmd/fm/eversholt/files/sparc/sun4v/gcpu.esc515
-rw-r--r--usr/src/cmd/fm/eversholt/files/sparc/sun4v/gmem.esc478
-rw-r--r--usr/src/cmd/fm/eversholt/files/sparc/sun4v/n2niu_xaui.esc50
-rw-r--r--usr/src/cmd/fm/eversholt/files/sparc/sun4v/n2niu_xfp.esc53
-rw-r--r--usr/src/cmd/fm/eversholt/files/sparc/sun4v/n2piu.esc288
-rw-r--r--usr/src/cmd/fm/eversholt/files/sparc/sun4v/sp.esc37
-rw-r--r--usr/src/cmd/fm/eversholt/files/sparc/sun4v/vfncx.esc58
-rw-r--r--usr/src/cmd/fm/eversholt/files/sparc/sun4v/zambezi.esc839
-rw-r--r--usr/src/cmd/fm/eversholt/native/sparc/Makefile28
-rw-r--r--usr/src/cmd/fm/fmadm/sparc/Makefile29
-rw-r--r--usr/src/cmd/fm/fmd/sparc/Makefile29
-rw-r--r--usr/src/cmd/fm/fmdump/sparc/Makefile29
-rw-r--r--usr/src/cmd/fm/fminject/sparc/Makefile29
-rw-r--r--usr/src/cmd/fm/fmstat/sparc/Makefile29
-rw-r--r--usr/src/cmd/fm/fmtopo/sparc/Makefile29
-rw-r--r--usr/src/cmd/fm/ipmitopo/sparc/Makefile28
-rw-r--r--usr/src/cmd/fm/modules/Makefile18
-rw-r--r--usr/src/cmd/fm/modules/SUNW,Netra-CP3060/Makefile29
-rw-r--r--usr/src/cmd/fm/modules/SUNW,Netra-CP3060/etm/Makefile29
-rw-r--r--usr/src/cmd/fm/modules/SUNW,Netra-CP3060/etm/etm.conf55
-rw-r--r--usr/src/cmd/fm/modules/SUNW,Netra-CP3260/Makefile29
-rw-r--r--usr/src/cmd/fm/modules/SUNW,Netra-CP3260/etm/Makefile29
-rw-r--r--usr/src/cmd/fm/modules/SUNW,Netra-CP3260/etm/etm.conf56
-rw-r--r--usr/src/cmd/fm/modules/SUNW,Netra-T5220/Makefile29
-rw-r--r--usr/src/cmd/fm/modules/SUNW,Netra-T5220/etm/Makefile29
-rw-r--r--usr/src/cmd/fm/modules/SUNW,Netra-T5220/etm/etm.conf56
-rw-r--r--usr/src/cmd/fm/modules/SUNW,Netra-T5440/Makefile29
-rw-r--r--usr/src/cmd/fm/modules/SUNW,Netra-T5440/etm/Makefile29
-rw-r--r--usr/src/cmd/fm/modules/SUNW,Netra-T5440/etm/etm.conf58
-rw-r--r--usr/src/cmd/fm/modules/SUNW,SPARC-Enterprise-T5120/Makefile29
-rw-r--r--usr/src/cmd/fm/modules/SUNW,SPARC-Enterprise-T5120/etm/Makefile29
-rw-r--r--usr/src/cmd/fm/modules/SUNW,SPARC-Enterprise-T5120/etm/etm.conf56
-rw-r--r--usr/src/cmd/fm/modules/SUNW,SPARC-Enterprise/Makefile29
-rw-r--r--usr/src/cmd/fm/modules/SUNW,SPARC-Enterprise/cpumem-retire/Makefile57
-rw-r--r--usr/src/cmd/fm/modules/SUNW,SPARC-Enterprise/cpumem-retire/cpumem-retire.conf39
-rw-r--r--usr/src/cmd/fm/modules/SUNW,SPARC-Enterprise/event-transport/Makefile36
-rw-r--r--usr/src/cmd/fm/modules/SUNW,SPARC-Enterprise/event-transport/event-transport.conf88
-rw-r--r--usr/src/cmd/fm/modules/SUNW,SPARC-Enterprise/event-transport/ex_dscp.c808
-rw-r--r--usr/src/cmd/fm/modules/SUNW,SPARC-Enterprise/event-transport/ex_dscp.h99
-rw-r--r--usr/src/cmd/fm/modules/SUNW,Sun-Blade-T6300/Makefile29
-rw-r--r--usr/src/cmd/fm/modules/SUNW,Sun-Blade-T6300/etm/Makefile29
-rw-r--r--usr/src/cmd/fm/modules/SUNW,Sun-Blade-T6300/etm/etm.conf55
-rw-r--r--usr/src/cmd/fm/modules/SUNW,Sun-Blade-T6320/Makefile29
-rw-r--r--usr/src/cmd/fm/modules/SUNW,Sun-Blade-T6320/etm/Makefile29
-rw-r--r--usr/src/cmd/fm/modules/SUNW,Sun-Blade-T6320/etm/etm.conf56
-rw-r--r--usr/src/cmd/fm/modules/SUNW,Sun-Fire-T200/Makefile29
-rw-r--r--usr/src/cmd/fm/modules/SUNW,Sun-Fire-T200/etm/Makefile29
-rw-r--r--usr/src/cmd/fm/modules/SUNW,Sun-Fire-T200/etm/etm.conf55
-rw-r--r--usr/src/cmd/fm/modules/SUNW,T5140/Makefile29
-rw-r--r--usr/src/cmd/fm/modules/SUNW,T5140/etm/Makefile29
-rw-r--r--usr/src/cmd/fm/modules/SUNW,T5140/etm/etm.conf58
-rw-r--r--usr/src/cmd/fm/modules/SUNW,USBRDT-5240/Makefile29
-rw-r--r--usr/src/cmd/fm/modules/SUNW,USBRDT-5240/etm/Makefile29
-rw-r--r--usr/src/cmd/fm/modules/SUNW,USBRDT-5240/etm/etm.conf57
-rw-r--r--usr/src/cmd/fm/modules/common/cpumem-retire/Makefile7
-rw-r--r--usr/src/cmd/fm/modules/common/cpumem-retire/cma_cache.c143
-rw-r--r--usr/src/cmd/fm/modules/common/fdd-msg/Makefile3
-rw-r--r--usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/Makefile.cpumem66
-rw-r--r--usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd.h277
-rw-r--r--usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_Lxcache.h206
-rw-r--r--usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_bank.c383
-rw-r--r--usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_bank.h164
-rw-r--r--usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_cpu.c2420
-rw-r--r--usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_cpu.h794
-rw-r--r--usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_cpuerr.c581
-rw-r--r--usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_dimm.c531
-rw-r--r--usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_dimm.h209
-rw-r--r--usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_fmri.c101
-rw-r--r--usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_fmri.h83
-rw-r--r--usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_list.c123
-rw-r--r--usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_list.h54
-rw-r--r--usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_main.c881
-rw-r--r--usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_mem.c291
-rw-r--r--usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_mem.h208
-rw-r--r--usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_memerr.c947
-rw-r--r--usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_page.c311
-rw-r--r--usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_page.h111
-rw-r--r--usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_pageerr.c100
-rw-r--r--usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_state.c259
-rw-r--r--usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_state.h227
-rw-r--r--usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_util.c83
-rw-r--r--usr/src/cmd/fm/modules/sun4u/Makefile28
-rw-r--r--usr/src/cmd/fm/modules/sun4u/USII-io-diagnosis/Makefile47
-rw-r--r--usr/src/cmd/fm/modules/sun4u/USII-io-diagnosis/USII-io-diagnosis.conf29
-rw-r--r--usr/src/cmd/fm/modules/sun4u/USII-io-diagnosis/iod_main.c170
-rw-r--r--usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/Makefile48
-rw-r--r--usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_Lxcache.c1511
-rw-r--r--usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_Lxcacheerr.c2048
-rw-r--r--usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_cpu_arch.c262
-rw-r--r--usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_dp.c442
-rw-r--r--usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_dp.h131
-rw-r--r--usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_dp_page.c276
-rw-r--r--usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_dp_page.h57
-rw-r--r--usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_dperr.c424
-rw-r--r--usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_ecache.c154
-rw-r--r--usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_ecache.h55
-rw-r--r--usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_hc_opl.c123
-rw-r--r--usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_memerr_arch.c932
-rw-r--r--usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_opl.c220
-rw-r--r--usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_opl.h162
-rw-r--r--usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_oplerr.c529
-rw-r--r--usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cpumem-diagnosis.conf67
-rw-r--r--usr/src/cmd/fm/modules/sun4u/datapath-retire/Makefile40
-rw-r--r--usr/src/cmd/fm/modules/sun4u/datapath-retire/cda.h66
-rw-r--r--usr/src/cmd/fm/modules/sun4u/datapath-retire/cda_cpu.c101
-rw-r--r--usr/src/cmd/fm/modules/sun4u/datapath-retire/cda_main.c222
-rw-r--r--usr/src/cmd/fm/modules/sun4u/datapath-retire/datapath-retire.conf26
-rw-r--r--usr/src/cmd/fm/modules/sun4v/Makefile28
-rw-r--r--usr/src/cmd/fm/modules/sun4v/cpumem-diagnosis/Makefile40
-rw-r--r--usr/src/cmd/fm/modules/sun4v/cpumem-diagnosis/cmd_branch.c702
-rw-r--r--usr/src/cmd/fm/modules/sun4v/cpumem-diagnosis/cmd_branch.h125
-rw-r--r--usr/src/cmd/fm/modules/sun4v/cpumem-diagnosis/cmd_cpu_arch.c469
-rw-r--r--usr/src/cmd/fm/modules/sun4v/cpumem-diagnosis/cmd_hc_sun4v.c646
-rw-r--r--usr/src/cmd/fm/modules/sun4v/cpumem-diagnosis/cmd_hc_sun4v.h56
-rw-r--r--usr/src/cmd/fm/modules/sun4v/cpumem-diagnosis/cmd_memerr_arch.c769
-rw-r--r--usr/src/cmd/fm/modules/sun4v/cpumem-diagnosis/cpumem-diagnosis.conf32
-rw-r--r--usr/src/cmd/fm/modules/sun4v/cpumem-retire/Makefile55
-rw-r--r--usr/src/cmd/fm/modules/sun4v/cpumem-retire/cma_cpu_sun4v.c324
-rw-r--r--usr/src/cmd/fm/modules/sun4v/cpumem-retire/cma_page_sun4v.c72
-rw-r--r--usr/src/cmd/fm/modules/sun4v/cpumem-retire/cpumem-retire.conf42
-rw-r--r--usr/src/cmd/fm/modules/sun4v/etm/Makefile44
-rw-r--r--usr/src/cmd/fm/modules/sun4v/etm/Makefile.etm70
-rw-r--r--usr/src/cmd/fm/modules/sun4v/etm/etm.c4307
-rw-r--r--usr/src/cmd/fm/modules/sun4v/etm/etm.conf52
-rw-r--r--usr/src/cmd/fm/modules/sun4v/etm/etm_ckpt.c681
-rw-r--r--usr/src/cmd/fm/modules/sun4v/etm/etm_ckpt.h108
-rw-r--r--usr/src/cmd/fm/modules/sun4v/etm/etm_etm_proto.h178
-rw-r--r--usr/src/cmd/fm/modules/sun4v/etm/etm_filter.c367
-rw-r--r--usr/src/cmd/fm/modules/sun4v/etm/etm_filter.h69
-rw-r--r--usr/src/cmd/fm/modules/sun4v/etm/etm_impl.h106
-rw-r--r--usr/src/cmd/fm/modules/sun4v/etm/etm_iosvc.h155
-rw-r--r--usr/src/cmd/fm/modules/sun4v/etm/etm_xport_api.h298
-rw-r--r--usr/src/cmd/fm/modules/sun4v/etm/etm_xport_api_dd.c1396
-rw-r--r--usr/src/cmd/fm/modules/sun4v/generic-mem/Makefile63
-rw-r--r--usr/src/cmd/fm/modules/sun4v/generic-mem/generic-mem.conf45
-rw-r--r--usr/src/cmd/fm/modules/sun4v/generic-mem/gmem.h81
-rw-r--r--usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_dimm.c555
-rw-r--r--usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_dimm.h165
-rw-r--r--usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_fmri.c99
-rw-r--r--usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_fmri.h80
-rw-r--r--usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_main.c214
-rw-r--r--usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_mem.c168
-rw-r--r--usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_mem.h103
-rw-r--r--usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_memerr.c912
-rw-r--r--usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_page.c361
-rw-r--r--usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_page.h104
-rw-r--r--usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_state.c166
-rw-r--r--usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_state.h149
-rw-r--r--usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_util.c165
-rw-r--r--usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_util.h60
-rw-r--r--usr/src/cmd/fm/notify/smtp-notify/sparc/Makefile27
-rw-r--r--usr/src/cmd/fm/notify/snmp-notify/sparc/Makefile27
-rw-r--r--usr/src/cmd/fm/schemes/cpu/sparc/Makefile39
-rw-r--r--usr/src/cmd/fm/schemes/cpu/sparcv9/Makefile39
-rw-r--r--usr/src/cmd/fm/schemes/dev/sparc/Makefile36
-rw-r--r--usr/src/cmd/fm/schemes/dev/sparcv9/Makefile37
-rw-r--r--usr/src/cmd/fm/schemes/fmd/sparc/Makefile32
-rw-r--r--usr/src/cmd/fm/schemes/fmd/sparcv9/Makefile33
-rw-r--r--usr/src/cmd/fm/schemes/hc/sparc/Makefile36
-rw-r--r--usr/src/cmd/fm/schemes/hc/sparcv9/Makefile37
-rw-r--r--usr/src/cmd/fm/schemes/legacy-hc/sparc/Makefile32
-rw-r--r--usr/src/cmd/fm/schemes/legacy-hc/sparcv9/Makefile33
-rw-r--r--usr/src/cmd/fm/schemes/mem/sparc/Makefile36
-rw-r--r--usr/src/cmd/fm/schemes/mem/sparc/mem_disc.c586
-rw-r--r--usr/src/cmd/fm/schemes/mem/sparcv9/Makefile36
-rw-r--r--usr/src/cmd/fm/schemes/mod/sparc/Makefile38
-rw-r--r--usr/src/cmd/fm/schemes/mod/sparcv9/Makefile38
-rw-r--r--usr/src/cmd/fm/schemes/pkg/sparc/Makefile38
-rw-r--r--usr/src/cmd/fm/schemes/pkg/sparcv9/Makefile38
-rw-r--r--usr/src/cmd/fm/schemes/svc/sparc/Makefile34
-rw-r--r--usr/src/cmd/fm/schemes/svc/sparcv9/Makefile35
-rw-r--r--usr/src/cmd/fm/schemes/sw/sparc/Makefile33
-rw-r--r--usr/src/cmd/fm/schemes/sw/sparcv9/Makefile34
-rw-r--r--usr/src/cmd/fm/schemes/zfs/sparc/Makefile32
-rw-r--r--usr/src/cmd/fm/schemes/zfs/sparcv9/Makefile33
-rw-r--r--usr/src/lib/fm/Makefile15
-rw-r--r--usr/src/lib/fm/libdiagcode/sparc/Makefile31
-rw-r--r--usr/src/lib/fm/libdiagcode/sparcv9/Makefile32
-rw-r--r--usr/src/lib/fm/libdiskstatus/sparc/Makefile28
-rw-r--r--usr/src/lib/fm/libdiskstatus/sparcv9/Makefile30
-rw-r--r--usr/src/lib/fm/libfmd_adm/sparc/Makefile28
-rw-r--r--usr/src/lib/fm/libfmd_adm/sparcv9/Makefile29
-rw-r--r--usr/src/lib/fm/libfmd_agent/sparc/Makefile27
-rw-r--r--usr/src/lib/fm/libfmd_agent/sparc/fmd_agent_sparc.c32
-rw-r--r--usr/src/lib/fm/libfmd_agent/sparcv9/Makefile28
-rw-r--r--usr/src/lib/fm/libfmd_log/sparc/Makefile28
-rw-r--r--usr/src/lib/fm/libfmd_log/sparcv9/Makefile29
-rw-r--r--usr/src/lib/fm/libfmd_msg/sparc/Makefile28
-rw-r--r--usr/src/lib/fm/libfmd_msg/sparcv9/Makefile29
-rw-r--r--usr/src/lib/fm/libfmd_snmp/sparc/Makefile32
-rw-r--r--usr/src/lib/fm/libfmd_snmp/sparcv9/Makefile33
-rw-r--r--usr/src/lib/fm/libfmevent/sparc/Makefile29
-rw-r--r--usr/src/lib/fm/libfmevent/sparcv9/Makefile30
-rw-r--r--usr/src/lib/fm/libfmnotify/sparc/Makefile31
-rw-r--r--usr/src/lib/fm/libfmnotify/sparcv9/Makefile32
-rw-r--r--usr/src/lib/fm/libldom/Makefile63
-rw-r--r--usr/src/lib/fm/libldom/Makefile.com61
-rw-r--r--usr/src/lib/fm/libldom/sparc/Makefile32
-rw-r--r--usr/src/lib/fm/libldom/sparc/ldmsvcs_utils.c1747
-rw-r--r--usr/src/lib/fm/libldom/sparc/ldmsvcs_utils.h220
-rw-r--r--usr/src/lib/fm/libldom/sparc/ldom.c817
-rw-r--r--usr/src/lib/fm/libldom/sparc/ldom.h109
-rw-r--r--usr/src/lib/fm/libldom/sparc/ldom_alloc.c38
-rw-r--r--usr/src/lib/fm/libldom/sparc/ldom_alloc.h43
-rw-r--r--usr/src/lib/fm/libldom/sparc/ldom_utils.c46
-rw-r--r--usr/src/lib/fm/libldom/sparc/ldom_utils.h43
-rw-r--r--usr/src/lib/fm/libldom/sparc/ldom_xmpp_client.c828
-rw-r--r--usr/src/lib/fm/libldom/sparc/ldom_xmpp_client.h114
-rw-r--r--usr/src/lib/fm/libldom/sparc/mapfile-vers58
-rw-r--r--usr/src/lib/fm/libldom/sparcv9/Makefile33
-rw-r--r--usr/src/lib/fm/libmdesc/Makefile56
-rw-r--r--usr/src/lib/fm/libmdesc/Makefile.com67
-rw-r--r--usr/src/lib/fm/libmdesc/common/mapfile-vers56
-rw-r--r--usr/src/lib/fm/libmdesc/sparc/Makefile28
-rw-r--r--usr/src/lib/fm/libmdesc/sparcv9/Makefile29
-rw-r--r--usr/src/lib/fm/libseslog/sparc/Makefile25
-rw-r--r--usr/src/lib/fm/libseslog/sparcv9/Makefile27
-rw-r--r--usr/src/lib/fm/topo/libtopo/sparc/Makefile33
-rw-r--r--usr/src/lib/fm/topo/libtopo/sparcv9/Makefile34
-rw-r--r--usr/src/lib/fm/topo/maps/Makefile17
-rw-r--r--usr/src/lib/fm/topo/maps/SUNW,Netra-CP3060/Makefile35
-rw-r--r--usr/src/lib/fm/topo/maps/SUNW,Netra-CP3060/Netra-CP3060-hc-topology.xml45
-rw-r--r--usr/src/lib/fm/topo/maps/SUNW,Netra-CP3260/Makefile35
-rw-r--r--usr/src/lib/fm/topo/maps/SUNW,Netra-CP3260/Netra-CP3260-hc-topology.xml58
-rw-r--r--usr/src/lib/fm/topo/maps/SUNW,Netra-T5220/Makefile33
-rw-r--r--usr/src/lib/fm/topo/maps/SUNW,Netra-T5220/Netra-T5220-hc-topology.xml56
-rw-r--r--usr/src/lib/fm/topo/maps/SUNW,Netra-T5440/Makefile33
-rw-r--r--usr/src/lib/fm/topo/maps/SUNW,Netra-T5440/Netra-T5440-hc-topology.xml50
-rw-r--r--usr/src/lib/fm/topo/maps/SUNW,SPARC-Enterprise-T5120/Makefile34
-rw-r--r--usr/src/lib/fm/topo/maps/SUNW,SPARC-Enterprise-T5120/SPARC-Enterprise-T5120-hc-topology.xml57
-rw-r--r--usr/src/lib/fm/topo/maps/SUNW,SPARC-Enterprise-T5120/SPARC-Enterprise-T5220-hc-topology.xml57
-rw-r--r--usr/src/lib/fm/topo/maps/SUNW,SPARC-Enterprise/Makefile34
-rw-r--r--usr/src/lib/fm/topo/maps/SUNW,SPARC-Enterprise/SPARC-Enterprise-hc-topology.xml47
-rw-r--r--usr/src/lib/fm/topo/maps/SUNW,Sun-Blade-T6300/Makefile33
-rw-r--r--usr/src/lib/fm/topo/maps/SUNW,Sun-Blade-T6300/Sun-Blade-T6300-hc-topology.xml43
-rw-r--r--usr/src/lib/fm/topo/maps/SUNW,Sun-Blade-T6320/Makefile34
-rw-r--r--usr/src/lib/fm/topo/maps/SUNW,Sun-Blade-T6320/Sun-Blade-T6320-hc-topology.xml57
-rw-r--r--usr/src/lib/fm/topo/maps/SUNW,Sun-Fire-T200/Makefile38
-rw-r--r--usr/src/lib/fm/topo/maps/SUNW,Sun-Fire-T200/Netra-T2000-hc-topology.xml58
-rw-r--r--usr/src/lib/fm/topo/maps/SUNW,Sun-Fire-T200/SPARC-Enterprise-T1000-hc-topology.xml44
-rw-r--r--usr/src/lib/fm/topo/maps/SUNW,Sun-Fire-T200/SPARC-Enterprise-T2000-hc-topology.xml55
-rw-r--r--usr/src/lib/fm/topo/maps/SUNW,Sun-Fire-T200/Sun-Fire-T1000-hc-topology.xml44
-rw-r--r--usr/src/lib/fm/topo/maps/SUNW,Sun-Fire-T200/Sun-Fire-T200-hc-topology.xml57
-rw-r--r--usr/src/lib/fm/topo/maps/SUNW,Sun-Fire/Makefile34
-rw-r--r--usr/src/lib/fm/topo/maps/SUNW,Sun-Fire/Sun-Fire-hc-topology.xml52
-rw-r--r--usr/src/lib/fm/topo/maps/SUNW,T5140/Makefile36
-rw-r--r--usr/src/lib/fm/topo/maps/SUNW,T5140/Sun-Blade-T6340-hc-topology.xml49
-rw-r--r--usr/src/lib/fm/topo/maps/SUNW,T5140/T5140-hc-topology.xml49
-rw-r--r--usr/src/lib/fm/topo/maps/SUNW,T5140/T5240-hc-topology.xml49
-rw-r--r--usr/src/lib/fm/topo/maps/SUNW,T5140/T5440-hc-topology.xml53
-rw-r--r--usr/src/lib/fm/topo/maps/SUNW,USBRDT-5240/Makefile33
-rw-r--r--usr/src/lib/fm/topo/maps/SUNW,USBRDT-5240/USBRDT-5240-hc-topology.xml49
-rw-r--r--usr/src/lib/fm/topo/maps/sparc/Makefile36
-rw-r--r--usr/src/lib/fm/topo/maps/sun4u/Makefile34
-rw-r--r--usr/src/lib/fm/topo/maps/sun4u/sun4u-hc-topology.xml50
-rw-r--r--usr/src/lib/fm/topo/maps/sun4v/Makefile34
-rw-r--r--usr/src/lib/fm/topo/maps/sun4v/sun4v-hc-topology.xml36
-rw-r--r--usr/src/lib/fm/topo/modules/Makefile6
-rw-r--r--usr/src/lib/fm/topo/modules/SUNW,SPARC-Enterprise/Makefile32
-rw-r--r--usr/src/lib/fm/topo/modules/SUNW,SPARC-Enterprise/ioboard/Makefile36
-rw-r--r--usr/src/lib/fm/topo/modules/SUNW,SPARC-Enterprise/ioboard/opl_hostbridge.c332
-rw-r--r--usr/src/lib/fm/topo/modules/SUNW,SPARC-Enterprise/ioboard/opl_ioboard.c351
-rw-r--r--usr/src/lib/fm/topo/modules/SUNW,SPARC-Enterprise/ioboard/opl_topo.h92
-rw-r--r--usr/src/lib/fm/topo/modules/SUNW,Sun-Fire/Makefile32
-rw-r--r--usr/src/lib/fm/topo/modules/SUNW,Sun-Fire/ioboard/Makefile31
-rw-r--r--usr/src/lib/fm/topo/modules/SUNW,Sun-Fire/ioboard/iob_platform.c145
-rw-r--r--usr/src/lib/fm/topo/modules/sun4/chip/Makefile.chip38
-rw-r--r--usr/src/lib/fm/topo/modules/sun4/hostbridge/Makefile.hb46
-rw-r--r--usr/src/lib/fm/topo/modules/sun4/hostbridge/hb_sun4.c349
-rw-r--r--usr/src/lib/fm/topo/modules/sun4/hostbridge/hb_sun4.h63
-rw-r--r--usr/src/lib/fm/topo/modules/sun4/ioboard/Makefile.iob46
-rw-r--r--usr/src/lib/fm/topo/modules/sun4/ioboard/ioboard.c270
-rw-r--r--usr/src/lib/fm/topo/modules/sun4/ioboard/ioboard.h66
-rw-r--r--usr/src/lib/fm/topo/modules/sun4/pcibus/Makefile.pci57
-rw-r--r--usr/src/lib/fm/topo/modules/sun4/pcibus/pci_sun4.c41
-rw-r--r--usr/src/lib/fm/topo/modules/sun4/pcibus/pci_sun4.h46
-rw-r--r--usr/src/lib/fm/topo/modules/sun4u/Makefile32
-rw-r--r--usr/src/lib/fm/topo/modules/sun4u/chip/Makefile33
-rw-r--r--usr/src/lib/fm/topo/modules/sun4u/chip/chip_sun4u.c277
-rw-r--r--usr/src/lib/fm/topo/modules/sun4u/hostbridge/Makefile32
-rw-r--r--usr/src/lib/fm/topo/modules/sun4u/hostbridge/hb_sun4u.c183
-rw-r--r--usr/src/lib/fm/topo/modules/sun4u/pcibus/Makefile30
-rw-r--r--usr/src/lib/fm/topo/modules/sun4u/pcibus/pci_sun4u.c120
-rw-r--r--usr/src/lib/fm/topo/modules/sun4u/pcibus/pci_sun4u.h87
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/Makefile41
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/chip/Makefile45
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/chip/chip_sun4v.c428
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/cpuboard/Makefile41
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/cpuboard/cpuboard.c554
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/cpuboard/cpuboard_hostbridge.c300
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/cpuboard/cpuboard_topo.h69
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/dimm/Makefile61
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/dimm/dimm_sun4v.c421
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/hostbridge/Makefile35
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/hostbridge/hb_mdesc.c226
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/hostbridge/hb_mdesc.h77
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/hostbridge/hb_rcid.c123
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/hostbridge/hb_rcid.h67
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/hostbridge/hb_sun4v.c420
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/motherboard/Makefile39
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/motherboard/motherboard.c413
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/niu/Makefile39
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/niu/niu.c402
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/pcibus/Makefile32
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/pcibus/pci_sun4v.c263
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/pcibus/pci_sun4v.h202
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/platform-cpu/Makefile36
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/platform-cpu/cpu.c523
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/platform-cpu/cpu_mdesc.c423
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/platform-cpu/cpu_mdesc.h98
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/platform-mem/Makefile36
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/platform-mem/mem.c697
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/platform-mem/mem_mdesc.c511
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/platform-mem/mem_mdesc.h100
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/sun4vpi/Makefile44
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_bay.c496
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_cpu.c182
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_defer.c239
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_generic.c128
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_hostbridge.c84
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_impl.h180
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_ldom.c139
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_mem.c85
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_meth.c520
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_niu.c79
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_pciexrc.c562
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_subr.c1456
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_top.c61
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_walker.c804
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/sun4vpi/sun4vpi.c287
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/xaui/Makefile38
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/xaui/xaui.c539
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/xaui/xaui.h106
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/zambezi/Makefile37
-rw-r--r--usr/src/lib/fm/topo/modules/sun4v/zambezi/zambezi.c188
-rw-r--r--usr/src/pkg/manifests/consolidation-osnet-osnet-message-files.p5m6
358 files changed, 14 insertions, 73110 deletions
diff --git a/usr/src/cmd/fm/dicts/Makefile b/usr/src/cmd/fm/dicts/Makefile
index 93e0303f83..223a770197 100644
--- a/usr/src/cmd/fm/dicts/Makefile
+++ b/usr/src/cmd/fm/dicts/Makefile
@@ -20,6 +20,7 @@
#
#
# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copryight 2022 Garrett D'Amore
#
include ../../Makefile.cmd
@@ -46,21 +47,10 @@ i386_DCNAMES = \
INTEL \
GMCA
-sparc_DCNAMES = \
- SCF \
- SUN4 \
- SUN4U \
- SUN4V
-
DCNAMES = \
$(common_DCNAMES) \
$($(MACH)_DCNAMES)
-ALLDCNAMES = \
- $(common_DCNAMES) \
- $(sparc_DCNAMES) \
- $(i386_DCNAMES)
-
DCFILES = $(DCNAMES:%=%.dict)
POFILES = $(DCNAMES:%=%.po)
MOFILES = $(DCNAMES:%=%.mo)
@@ -71,17 +61,16 @@ ROOTLCDIR = $(ROOTLIB)/locale/C/LC_MESSAGES
ROOTDCFILES = $(DCNAMES:%=$(ROOTDCDIR)/%.dict)
ROOTPOFILES = $(DCNAMES:%=$(ROOTLCDIR)/%.po)
ROOTMOFILES = $(DCNAMES:%=$(ROOTLCDIR)/%.mo)
-ROOTALLPOFILES = $(ALLDCNAMES:%=$(ROOTLCDIR)/%.po)
FILEMODE = 0444
-$(ROOTALLPOFILES) := FILEMODE = 0644
+$(ROOTPOFILES) := FILEMODE = 0644
DICTCK = ../scripts/dictck
DICTCKFLAGS = -b ../scripts/buildcode
all: $(MOFILES)
-_msg: $(ROOTALLPOFILES)
+_msg: $(ROOTPOFILES)
$(ROOTDCDIR):
$(INS.dir)
@@ -115,4 +104,4 @@ clobber:
$(RM) $(MOFILES)
install: all $(ROOTDCDIR) $(ROOTLCDIR) \
- $(ROOTDCFILES) $(ROOTALLPOFILES) $(ROOTMOFILES)
+ $(ROOTDCFILES) $(ROOTPOFILES) $(ROOTMOFILES)
diff --git a/usr/src/cmd/fm/dicts/SCF.dict b/usr/src/cmd/fm/dicts/SCF.dict
deleted file mode 100644
index 6ba8814343..0000000000
--- a/usr/src/cmd/fm/dicts/SCF.dict
+++ /dev/null
@@ -1,198 +0,0 @@
-#
-# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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
-#
-#ident "%Z%%M% %I% %E% SMI"
-#
-# DO NOT EDIT -- this file is generated by the Event Registry.
-#
-
-FMDICT: name=SCF version=1 maxkey=1 dictid=0x5346
-
-fault.chassis.SPARC-Enterprise.if.fe-asic-clk=1
-fault.chassis.SPARC-Enterprise.if.fe-clk-cable=2
-fault.chassis.SPARC-Enterprise.asic.clk.fe=3
-fault.chassis.SPARC-Enterprise.asic.clk.test=4
-fault.chassis.SPARC-Enterprise.cpu.SPARC64-VI.fe=11
-fault.chassis.SPARC-Enterprise.cpu.SPARC64-VI.core.fe=12
-fault.chassis.SPARC-Enterprise.cpu.SPARC64-VI.core.strand.fe=13
-fault.chassis.SPARC-Enterprise.cpu.SPARC64-VI.se=14
-fault.chassis.SPARC-Enterprise.cpu.SPARC64-VI.core.se=15
-fault.chassis.SPARC-Enterprise.cpu.SPARC64-VI.core.se-offlinereq=16
-fault.chassis.SPARC-Enterprise.cpu.SPARC64-VI.core.strand.se=17
-fault.chassis.SPARC-Enterprise.cpu.SPARC64-VI.ce=18
-fault.chassis.SPARC-Enterprise.cpu.SPARC64-VI.core.ce=19
-fault.chassis.SPARC-Enterprise.cpu.SPARC64-VI.core.ce-offlinereq=20
-fault.chassis.SPARC-Enterprise.cpu.SPARC64-VI.way.ce=21
-upset.chassis.SPARC-Enterprise.cpu.SPARC64-VI.fe=22
-upset.chassis.SPARC-Enterprise.cpu.SPARC64-VI.fe-unexpected-trap=23
-fault.chassis.SPARC-Enterprise.cpu.SPARC64-VI.se-tmo=24
-fault.chassis.SPARC-Enterprise.cpu.SPARC64-VI.se-uncertain=25
-fault.chassis.SPARC-Enterprise.cpu.SPARC64-VI.core.ce-warn=26
-fault.chassis.SPARC-Enterprise.memory.fe=31
-fault.chassis.SPARC-Enterprise.memory.block.ue=32
-fault.chassis.SPARC-Enterprise.memory.block.mirror.ue=33
-fault.chassis.SPARC-Enterprise.memory.block.pce=34
-fault.chassis.SPARC-Enterprise.memory.dimm.pce=35
-fault.chassis.SPARC-Enterprise.memory.bank.err=36
-fault.chassis.SPARC-Enterprise.asic.flp.fe=41
-fault.chassis.SPARC-Enterprise.asic.flp.ce=42
-upset.chassis.SPARC-Enterprise.io.disk.boot=50
-fault.chassis.SPARC-Enterprise.if.fe-ioc-flp=51
-fault.chassis.SPARC-Enterprise.asic.ioc.fe=52
-upset.chassis.SPARC-Enterprise.asic.ioc.fe-tmo-dma=53
-fault.chassis.SPARC-Enterprise.asic.ioc.ch.fe=54
-fault.chassis.SPARC-Enterprise.asic.ioc.ch.leaf.fe=55
-fault.chassis.SPARC-Enterprise.io.pciex.card.fe=56
-fault.chassis.SPARC-Enterprise.io.pci.card.fe=57
-fault.chassis.SPARC-Enterprise.io.pciex.bridge.fe=58
-fault.chassis.SPARC-Enterprise.io.pciex.switch.fe=59
-fault.chassis.SPARC-Enterprise.io.pci.gbe.fe=60
-fault.chassis.SPARC-Enterprise.io.pci.sas.fe=61
-fault.chassis.SPARC-Enterprise.if.se-ioc-flp=62
-fault.chassis.SPARC-Enterprise.asic.ioc.ch.se=63
-fault.chassis.SPARC-Enterprise.asic.ioc.ch.leaf.se=64
-fault.chassis.SPARC-Enterprise.asic.ioc.ch.leaf.se-no-credit-pci=65
-fault.chassis.SPARC-Enterprise.io.pciex.card.se=66
-fault.chassis.SPARC-Enterprise.io.pci.card.se=67
-fault.chassis.SPARC-Enterprise.io.pciex.bridge.se=68
-fault.chassis.SPARC-Enterprise.io.pciex.switch.se=69
-fault.chassis.SPARC-Enterprise.if.ce-ioc-flp=70
-fault.chassis.SPARC-Enterprise.asic.ioc.ch.ce=71
-fault.chassis.SPARC-Enterprise.asic.ioc.ch.leaf.ce=72
-upset.chassis.SPARC-Enterprise.asic.ioc.ch.boot=73
-upset.chassis.SPARC-Enterprise.asic.ioc.ch.leaf.boot=74
-upset.chassis.SPARC-Enterprise.io.pci.gbe.boot=75
-upset.chassis.SPARC-Enterprise.io.pci.card.boot=76
-upset.chassis.SPARC-Enterprise.io.pciex.card.boot=77
-upset.chassis.SPARC-Enterprise.io.pciex.bridge.boot=78
-upset.chassis.SPARC-Enterprise.io.pciex.switch.boot=79
-upset.chassis.SPARC-Enterprise.io.pci.sas.boot=80
-fault.chassis.jtag.device=81
-fault.chassis.jtag.device-internal=82
-fault.chassis.i2c.device=83
-fault.chassis.i2c.device-internal=84
-fault.chassis.SPARC-Enterprise.asic.mac.fe=91
-fault.chassis.SPARC-Enterprise.asic.mac.bank.fe=92
-fault.chassis.SPARC-Enterprise.asic.mac.se=93
-fault.chassis.SPARC-Enterprise.asic.mac.bank.se=94
-fault.chassis.SPARC-Enterprise.asic.mac.ce=95
-fault.chassis.SPARC-Enterprise.asic.mac.bank.ce=96
-fault.chassis.SPARC-Enterprise.madm.io.se=101
-fault.chassis.SPARC-Enterprise.madm.io.fe=102
-fault.chassis.SPARC-Enterprise.if.fe-mbc-sc=111
-fault.chassis.SPARC-Enterprise.asic.mbc.fe=112
-fault.chassis.SPARC-Enterprise.if.se-mbc-sc=113
-fault.chassis.SPARC-Enterprise.if.se-mbc-xscf=114
-fault.chassis.SPARC-Enterprise.asic.mbc.se=115
-fault.chassis.SPARC-Enterprise.asic.mbc.se-dma=116
-fault.chassis.SPARC-Enterprise.asic.mbc.se-dma-dscp=117
-fault.chassis.SPARC-Enterprise.asic.mbc.se-cmd=118
-fault.chassis.SPARC-Enterprise.if.ce-mbc-sc=119
-fault.chassis.SPARC-Enterprise.asic.mbc.ce=120
-fault.chassis.SPARC-Enterprise.asic.mbc.test=121
-fault.chassis.SPARC-Enterprise.asic.mac.power.fail=131
-fault.chassis.SPARC-Enterprise.asic.sc.power.fail=132
-fault.chassis.SPARC-Enterprise.asic.xb.power.fail=133
-fault.chassis.SPARC-Enterprise.asic.ioc.power.fail=134
-fault.chassis.SPARC-Enterprise.asic.clk.power.fail=135
-fault.chassis.SPARC-Enterprise.asic.cpu.power.fail=136
-fault.chassis.SPARC-Enterprise.asic.flp.power.fail=137
-fault.chassis.SPARC-Enterprise.asic.mbc.power.fail=138
-fault.chassis.SPARC-Enterprise.asic.power.fail=139
-fault.chassis.power.warning=140
-fault.chassis.power.undervoltage=141
-fault.chassis.power.power-off=142
-fault.chassis.device.fail=143
-fault.chassis.device.misconfig=144
-fault.chassis.device.missing=145
-fault.chassis.device.inserted=146
-fault.chassis.device.removed=147
-fault.chassis.env.power.loss=148
-fault.chassis.env.power.ups=149
-fault.chassis.SPARC-Enterprise.rci=151
-fault.chassis.SPARC-Enterprise.asic.sc.fe-multicmu=160
-fault.chassis.SPARC-Enterprise.if.fe-cpu-sc=161
-fault.chassis.SPARC-Enterprise.if.fe-sc-cpu=162
-fault.chassis.SPARC-Enterprise.if.fe-sc-xb=163
-fault.chassis.SPARC-Enterprise.if.fe-mac-sc=165
-fault.chassis.SPARC-Enterprise.if.fe-sc-mac=166
-fault.chassis.SPARC-Enterprise.if.fe-macbank-sc=167
-fault.chassis.SPARC-Enterprise.if.fe-ioc-sc=168
-fault.chassis.SPARC-Enterprise.if.fe-sc-ioc=169
-fault.chassis.SPARC-Enterprise.if.fe-sc-sc=170
-fault.chassis.SPARC-Enterprise.asic.sc.fe=171
-fault.chassis.SPARC-Enterprise.asic.sc.se=172
-fault.chassis.SPARC-Enterprise.if.ce-cpu-sc=173
-fault.chassis.SPARC-Enterprise.if.ce-sc-xb=174
-fault.chassis.SPARC-Enterprise.if.ce-mac-sc=175
-fault.chassis.SPARC-Enterprise.if.ce-ioc-sc=176
-fault.chassis.SPARC-Enterprise.if.ce-sc-sc=177
-fault.chassis.SPARC-Enterprise.asic.sc.ce=178
-fault.chassis.SPARC-Enterprise.asic.sc.ce-l2tagcpu=179
-fault.chassis.SPARC-Enterprise.asic.sc.test=180
-defect.chassis.software=181
-upset.chassis.domain.panic=182
-upset.chassis.domain.config=183
-upset.chassis.domain.post=184
-upset.chassis.domain.keepalive.msg-fail=185
-upset.chassis.domain.tty-overflow=186
-upset.chassis.domain.keepalive.panic-fail=187
-upset.chassis.domain.keepalive.xir-fail=188
-upset.chassis.domain.keepalive.reset-fail=189
-fault.chassis.device.fan.tooslow=191
-fault.chassis.device.fan.speedchange=192
-fault.chassis.env.temp.under=193
-fault.chassis.env.temp.over=194
-fault.chassis.env.temp.over-warn=195
-fault.chassis.env.temp.over-fail=196
-fault.chassis.SPARC-Enterprise.if.fe-ioc-xb=201
-fault.chassis.SPARC-Enterprise.if.fe-xb-ioc=202
-fault.chassis.SPARC-Enterprise.if.fe-xb-xbucable=203
-fault.chassis.SPARC-Enterprise.if.fe-xb-xb=204
-upset.chassis.SPARC-Enterprise.if.fe-xb=205
-fault.chassis.SPARC-Enterprise.asic.xb.fe=206
-fault.chassis.SPARC-Enterprise.if.ce-ioc-xb=207
-fault.chassis.SPARC-Enterprise.if.ce-xb-xbucable=208
-fault.chassis.SPARC-Enterprise.if.ce-xb-xb=209
-fault.chassis.SPARC-Enterprise.asic.xb.ce=210
-fault.chassis.SPARC-Enterprise.asic.xb.test=211
-fault.chassis.SPARC-Enterprise.asic.xb.fe-multicmu=212
-fault.chassis.SPARC-Enterprise.xscfu=221
-fault.chassis.device.mismatch=222
-upset.chassis.SPARC-Enterprise.xscfu=223
-fault.chassis.SPARC-Enterprise.cpu.SPARC64-VII.fe=224
-fault.chassis.SPARC-Enterprise.cpu.SPARC64-VII.core.fe=225
-fault.chassis.SPARC-Enterprise.cpu.SPARC64-VII.core.strand.fe=226
-fault.chassis.SPARC-Enterprise.cpu.SPARC64-VII.se=227
-fault.chassis.SPARC-Enterprise.cpu.SPARC64-VII.core.se=228
-fault.chassis.SPARC-Enterprise.cpu.SPARC64-VII.core.se-offlinereq=229
-fault.chassis.SPARC-Enterprise.cpu.SPARC64-VII.core.strand.se=230
-fault.chassis.SPARC-Enterprise.cpu.SPARC64-VII.ce=231
-fault.chassis.SPARC-Enterprise.cpu.SPARC64-VII.core.ce=232
-fault.chassis.SPARC-Enterprise.cpu.SPARC64-VII.core.ce-offlinereq=233
-fault.chassis.SPARC-Enterprise.cpu.SPARC64-VII.way.ce=234
-upset.chassis.SPARC-Enterprise.cpu.SPARC64-VII.fe=235
-upset.chassis.SPARC-Enterprise.cpu.SPARC64-VII.fe-unexpected-trap=236
-fault.chassis.SPARC-Enterprise.cpu.SPARC64-VII.se-tmo=237
-fault.chassis.SPARC-Enterprise.cpu.SPARC64-VII.se-uncertain=238
-fault.chassis.SPARC-Enterprise.cpu.SPARC64-VII.core.ce-warn=239
diff --git a/usr/src/cmd/fm/dicts/SCF.po b/usr/src/cmd/fm/dicts/SCF.po
deleted file mode 100644
index 160a515fdc..0000000000
--- a/usr/src/cmd/fm/dicts/SCF.po
+++ /dev/null
@@ -1,2713 +0,0 @@
-#
-# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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
-#
-# DO NOT EDIT -- this file is generated by the Event Registry.
-#
-#
-# code: SCF-8000-1D
-# keys: fault.chassis.SPARC-Enterprise.if.fe-asic-clk
-#
-msgid "SCF-8000-1D.type"
-msgstr "Fault"
-msgid "SCF-8000-1D.severity"
-msgstr "Critical"
-msgid "SCF-8000-1D.description"
-msgstr "A fatal clock distribution error was detected by an ASIC or a CPU chip.\n Refer to %s for more information."
-msgid "SCF-8000-1D.response"
-msgstr "An attempt will be made to deconfigure the faulty components after one or more domains are reset.\n"
-msgid "SCF-8000-1D.impact"
-msgstr "One or more domains will be reset. Please consult the detail section of the knowledge article for \nadditional information.\n"
-msgid "SCF-8000-1D.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8000-2Y
-# keys: fault.chassis.SPARC-Enterprise.if.fe-clk-cable
-#
-msgid "SCF-8000-2Y.type"
-msgstr "Fault"
-msgid "SCF-8000-2Y.severity"
-msgstr "Critical"
-msgid "SCF-8000-2Y.description"
-msgstr "A Clock chip has detected a lack of connectivity between the base cabinet and the expansion cabinet.\n Refer to %s for more information."
-msgid "SCF-8000-2Y.response"
-msgstr "The entire platform is reset and the active Clock Units are deconfigured during recovery.\n"
-msgid "SCF-8000-2Y.impact"
-msgstr "The entire platform is reset and the active Clock Units are deconfigured during recovery.\n"
-msgid "SCF-8000-2Y.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8000-33
-# keys: fault.chassis.SPARC-Enterprise.asic.clk.fe
-#
-msgid "SCF-8000-33.type"
-msgstr "Fault"
-msgid "SCF-8000-33.severity"
-msgstr "Critical"
-msgid "SCF-8000-33.description"
-msgstr "A fatal error was detected within a Clock chip.\n Refer to %s for more information."
-msgid "SCF-8000-33.response"
-msgstr "The platform will be reset. If there is redundant clock capability, an attempt will be made to deconfigure \nthe active Clock Unit from service. \n"
-msgid "SCF-8000-33.impact"
-msgstr "If the platform lacks redundant clock capability, the platform will be powered down and will not\npower up. If the platform has redundant clock capability, the platform will be reset and the\nfaulty Clock Unit will be deconfigured during recovery.\n"
-msgid "SCF-8000-33.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8000-4S
-# keys: fault.chassis.SPARC-Enterprise.asic.clk.test
-#
-msgid "SCF-8000-4S.type"
-msgstr "Fault"
-msgid "SCF-8000-4S.severity"
-msgstr "Critical"
-msgid "SCF-8000-4S.description"
-msgstr "Fault was detected during poweron self-test, either within a Clock chip with within one of the external\ninterfaces of a Clock chip.\n Refer to %s for more information."
-msgid "SCF-8000-4S.response"
-msgstr "An attempt will be made to remove the affected components from service. Please consult the detail \nsection of the knowledge article for additional information.\n"
-msgid "SCF-8000-4S.impact"
-msgstr "The entire platform is reset. If the platform lacks redundant clock capability, the platform will be \npowered down and will not power up. If the platform has redundant clock capability, the platform will be \nreset and the faulty Clock Unit will be deconfigured during recovery.\n"
-msgid "SCF-8000-4S.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8000-CJ
-# keys: fault.chassis.SPARC-Enterprise.cpu.SPARC64-VI.fe
-#
-msgid "SCF-8000-CJ.type"
-msgstr "Fault"
-msgid "SCF-8000-CJ.severity"
-msgstr "Critical"
-msgid "SCF-8000-CJ.description"
-msgstr "An internal fatal error within a CPU chip was detected.\n Refer to %s for more information."
-msgid "SCF-8000-CJ.response"
-msgstr "The domain using this CPU will be reset and the CPU chip will be deconfigured.\n"
-msgid "SCF-8000-CJ.impact"
-msgstr "The CPU chip will be deconfigured after the domain is reset.\n"
-msgid "SCF-8000-CJ.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8000-DC
-# keys: fault.chassis.SPARC-Enterprise.cpu.SPARC64-VI.core.fe
-#
-msgid "SCF-8000-DC.type"
-msgstr "Fault"
-msgid "SCF-8000-DC.severity"
-msgstr "Critical"
-msgid "SCF-8000-DC.description"
-msgstr "An internal fatal error within a core on a CPU chip was detected.\n Refer to %s for more information."
-msgid "SCF-8000-DC.response"
-msgstr "The domain using this CPU will be reset and the core will be deconfigured.\n"
-msgid "SCF-8000-DC.impact"
-msgstr "The domain using this CPU chip is reset.\n"
-msgid "SCF-8000-DC.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8000-EQ
-# keys: fault.chassis.SPARC-Enterprise.cpu.SPARC64-VI.core.strand.fe
-#
-msgid "SCF-8000-EQ.type"
-msgstr "Fault"
-msgid "SCF-8000-EQ.severity"
-msgstr "Critical"
-msgid "SCF-8000-EQ.description"
-msgstr "An internal fatal error within a strand on a CPU chip was detected.\n Refer to %s for more information."
-msgid "SCF-8000-EQ.response"
-msgstr "The domain using this CPU will be reset and the strand will be deconfigured.\n"
-msgid "SCF-8000-EQ.impact"
-msgstr "The domain using this CPU chip is reset.\n"
-msgid "SCF-8000-EQ.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8000-F4
-# keys: fault.chassis.SPARC-Enterprise.cpu.SPARC64-VI.se
-#
-msgid "SCF-8000-F4.type"
-msgstr "Fault"
-msgid "SCF-8000-F4.severity"
-msgstr "Major"
-msgid "SCF-8000-F4.description"
-msgstr "An internal non-fatal uncorrectable error within a CPU chip has been detected.\n Refer to %s for more information."
-msgid "SCF-8000-F4.response"
-msgstr "The CPU chip will be deconfigured after the platform is power cycled or after the domain reboots \nor after a Dynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8000-F4.impact"
-msgstr "The non-fatal uncorrectable error may cause domain to panic. The CPU chip will be deconfigured after the \nplatform is power cycled or after the domain reboots or after a Dynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8000-F4.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8000-GR
-# keys: fault.chassis.SPARC-Enterprise.cpu.SPARC64-VI.core.se
-#
-msgid "SCF-8000-GR.type"
-msgstr "Fault"
-msgid "SCF-8000-GR.severity"
-msgstr "Major"
-msgid "SCF-8000-GR.description"
-msgstr "A non-fatal uncorrectable error associated with a core on a CPU chip has been detected.\n Refer to %s for more information."
-msgid "SCF-8000-GR.response"
-msgstr "The domain software will attempt to offline the core on the CPU chip.\n"
-msgid "SCF-8000-GR.impact"
-msgstr "The non-fatal uncorrectable error trap may cause the domain to panic. If the domain\ndoes not panic, the domain software will attempt to offline the core on the CPU chip.\nThe core of the CPU chip will be deconfigured after the platform is power cycled or \nafter the domain reboots or after a Dynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8000-GR.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8000-H3
-# keys: fault.chassis.SPARC-Enterprise.cpu.SPARC64-VI.core.se-offlinereq
-#
-msgid "SCF-8000-H3.type"
-msgstr "Fault"
-msgid "SCF-8000-H3.severity"
-msgstr "Major"
-msgid "SCF-8000-H3.description"
-msgstr "When a non-fatal uncorrectable error occurs on a core on a CPU chip, domain software attempts to\noffline the core. This fault occurs when the number of offline attempts has exceeded an\nacceptable threshold.\n Refer to %s for more information."
-msgid "SCF-8000-H3.response"
-msgstr "Future non-fatal uncorrectable errors for this core on a CPU chip will not be recorded on the XSCF.\n"
-msgid "SCF-8000-H3.impact"
-msgstr "The uncorrectable error trap may cause the domain to panic.\n"
-msgid "SCF-8000-H3.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8000-JY
-# keys: fault.chassis.SPARC-Enterprise.cpu.SPARC64-VI.core.strand.se
-#
-msgid "SCF-8000-JY.type"
-msgstr "Fault"
-msgid "SCF-8000-JY.severity"
-msgstr "Major"
-msgid "SCF-8000-JY.description"
-msgstr "A non-fatal uncorrectable error has been detected on a strand on a CPU chip.\n Refer to %s for more information."
-msgid "SCF-8000-JY.response"
-msgstr "The strand on the CPU chip is deconfigured.\n"
-msgid "SCF-8000-JY.impact"
-msgstr "The non-fatal uncorrectable error trap may cause the domain to panic.\n"
-msgid "SCF-8000-JY.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8000-KD
-# keys: fault.chassis.SPARC-Enterprise.cpu.SPARC64-VI.ce
-#
-msgid "SCF-8000-KD.type"
-msgstr "Fault"
-msgid "SCF-8000-KD.severity"
-msgstr "Major"
-msgid "SCF-8000-KD.description"
-msgstr "The number of correctable errors associated with a CPU chip has exceeded an acceptable threshold.\n Refer to %s for more information."
-msgid "SCF-8000-KD.response"
-msgstr "The CPU chip will be deconfigured after the platform is power cycled or \nafter the domain reboots or after a Dynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8000-KD.impact"
-msgstr "No immediate impact. The CPU chip will be deconfigured after the platform is power cycled or \nafter the domain reboots or after a Dynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8000-KD.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8000-LH
-# keys: fault.chassis.SPARC-Enterprise.cpu.SPARC64-VI.core.ce
-#
-msgid "SCF-8000-LH.type"
-msgstr "Fault"
-msgid "SCF-8000-LH.severity"
-msgstr "Major"
-msgid "SCF-8000-LH.description"
-msgstr "The number of correctable errors associated with a core on a CPU chip have exceeded an acceptable threshold.\n Refer to %s for more information."
-msgid "SCF-8000-LH.response"
-msgstr "A request is sent to the domain software to attempt to offline the core on the CPU chip.\nThe core of the CPU chip will be deconfigured after the platform is power cycled or \nafter the domain reboots or after a Dynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8000-LH.impact"
-msgstr "No immediate impact.\n"
-msgid "SCF-8000-LH.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8000-MA
-# keys: fault.chassis.SPARC-Enterprise.cpu.SPARC64-VI.core.ce-offlinereq
-#
-msgid "SCF-8000-MA.type"
-msgstr "Fault"
-msgid "SCF-8000-MA.severity"
-msgstr "Major"
-msgid "SCF-8000-MA.description"
-msgstr "The number of correctable errors on a core on a CPU chip has exceeded an acceptable threshold. \nThis fault occurs when the number of offline attempts has exceeded an acceptable threshold.\n Refer to %s for more information."
-msgid "SCF-8000-MA.response"
-msgstr "Future correctable errors for this core on a CPU chip will not be recorded on the XSCF.\n"
-msgid "SCF-8000-MA.impact"
-msgstr "No immediate impact.\n"
-msgid "SCF-8000-MA.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8000-NP
-# keys: fault.chassis.SPARC-Enterprise.cpu.SPARC64-VI.way.ce
-#
-msgid "SCF-8000-NP.type"
-msgstr "Fault"
-msgid "SCF-8000-NP.severity"
-msgstr "Minor"
-msgid "SCF-8000-NP.description"
-msgstr "The number of correctable errors within a way of a CPU chip's L2 cache has exceeded an acceptable threshold.\n Refer to %s for more information."
-msgid "SCF-8000-NP.response"
-msgstr "The way of the CPU chip's cache is deconfigured. The performance of the CPU chip is reduced.\n"
-msgid "SCF-8000-NP.impact"
-msgstr "There is a performance loss for the CPU chip.\n"
-msgid "SCF-8000-NP.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8000-P5
-# keys: upset.chassis.SPARC-Enterprise.cpu.SPARC64-VI.fe
-#
-msgid "SCF-8000-P5.type"
-msgstr "Upset"
-msgid "SCF-8000-P5.severity"
-msgstr "Critical"
-msgid "SCF-8000-P5.description"
-msgstr "A hard-to-diagnose problem was detected by the CPU chip.\n Refer to %s for more information."
-msgid "SCF-8000-P5.response"
-msgstr "Nothing is deconfigured.\n"
-msgid "SCF-8000-P5.impact"
-msgstr "The domain may drop to the OpenBoot PROM 'OK' prompt.\n"
-msgid "SCF-8000-P5.action"
-msgstr "The platform administrator should check to see if any other hardware failure has occurred on the platform.\nIf the problem occurs while running OpenBoot PROM, then the platform administrator should check to make sure that \nthe OpenBoot PROM environment variables have not been set incorrectly. If neither of these courses of action \nprovide a resolution, then the platform administrator should schedule a service action.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8000-QS
-# keys: upset.chassis.SPARC-Enterprise.cpu.SPARC64-VI.fe-unexpected-trap
-#
-msgid "SCF-8000-QS.type"
-msgstr "upset"
-msgid "SCF-8000-QS.severity"
-msgstr "Critical"
-msgid "SCF-8000-QS.description"
-msgstr "An unexpected trap with some unknown cause was detected by a CPU chip during POST.\n Refer to %s for more information."
-msgid "SCF-8000-QS.response"
-msgstr "Nothing is deconfigured.\n"
-msgid "SCF-8000-QS.impact"
-msgstr "The domain is reset.\n"
-msgid "SCF-8000-QS.action"
-msgstr "Please consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8000-RJ
-# keys: fault.chassis.SPARC-Enterprise.cpu.SPARC64-VI.se-tmo
-#
-msgid "SCF-8000-RJ.type"
-msgstr "Fault"
-msgid "SCF-8000-RJ.severity"
-msgstr "Major"
-msgid "SCF-8000-RJ.description"
-msgstr "An internal non-fatal uncorrectable error has been detected within the CPU chip.\n Refer to %s for more information."
-msgid "SCF-8000-RJ.response"
-msgstr "Nothing is deconfigured.\n"
-msgid "SCF-8000-RJ.impact"
-msgstr "The non-fatal uncorrectable error may cause the domain to panic.\n"
-msgid "SCF-8000-RJ.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8000-SE
-# keys: fault.chassis.SPARC-Enterprise.cpu.SPARC64-VI.se-uncertain
-#
-msgid "SCF-8000-SE.type"
-msgstr "Fault"
-msgid "SCF-8000-SE.severity"
-msgstr "Major"
-msgid "SCF-8000-SE.description"
-msgstr "An internal non-fatal uncorrectable error has been detected within the CPU chip.\n Refer to %s for more information."
-msgid "SCF-8000-SE.response"
-msgstr "Nothing is deconfigured.\n"
-msgid "SCF-8000-SE.impact"
-msgstr "The non-fatal uncorrectable error may cause the domain to panic.\n"
-msgid "SCF-8000-SE.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8000-TX
-# keys: fault.chassis.SPARC-Enterprise.cpu.SPARC64-VI.core.ce-warn
-#
-msgid "SCF-8000-TX.type"
-msgstr "Fault"
-msgid "SCF-8000-TX.severity"
-msgstr "Minor"
-msgid "SCF-8000-TX.description"
-msgstr "The number of correctable errors associated with a CPU chip has exceeded an acceptable threshold.\n Refer to %s for more information."
-msgid "SCF-8000-TX.response"
-msgstr "Nothing is deconfigured.\n"
-msgid "SCF-8000-TX.impact"
-msgstr "No immediate impact.\n"
-msgid "SCF-8000-TX.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8000-YC
-# keys: fault.chassis.SPARC-Enterprise.memory.fe
-#
-msgid "SCF-8000-YC.type"
-msgstr "Fault"
-msgid "SCF-8000-YC.severity"
-msgstr "Major"
-msgid "SCF-8000-YC.description"
-msgstr "A fatal error in a DIMM was detected by POST.\n Refer to %s for more information."
-msgid "SCF-8000-YC.response"
-msgstr "The memory associated with the memory bank that contains this\nDIMM is deconfigured.\n"
-msgid "SCF-8000-YC.impact"
-msgstr "POST is restarted after the memory associated with the memory bank that contains\nthis DIMM has been deconfigured.\n"
-msgid "SCF-8000-YC.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8001-0Q
-# keys: fault.chassis.SPARC-Enterprise.memory.block.ue
-#
-msgid "SCF-8001-0Q.type"
-msgstr "Fault"
-msgid "SCF-8001-0Q.severity"
-msgstr "Major"
-msgid "SCF-8001-0Q.description"
-msgstr "An uncorrectable memory error (UE) has been detected.\n Refer to %s for more information."
-msgid "SCF-8001-0Q.response"
-msgstr "The 64MB of memory containing the memory that caused the UE will be deconfigured after the \nplatform is power cycled or after the domain reboots or after a Dynamic Reconfiguration operation \nis performed.\n"
-msgid "SCF-8001-0Q.impact"
-msgstr "The domain will receive an uncorrectable error trap which may cause the domain to panic. \n"
-msgid "SCF-8001-0Q.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8001-1C
-# keys: fault.chassis.SPARC-Enterprise.memory.block.mirror.ue
-#
-msgid "SCF-8001-1C.type"
-msgstr "Fault"
-msgid "SCF-8001-1C.severity"
-msgstr "Major"
-msgid "SCF-8001-1C.description"
-msgstr "A data compare error has been detected within a MAC chip when memory is in mirror mode.\n Refer to %s for more information."
-msgid "SCF-8001-1C.response"
-msgstr "The memory associated with the MAC chip will be deconfigured after the platform is power cycled \nor after the domain reboots or after a Dynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8001-1C.impact"
-msgstr "The domain will receive an uncorrectable error trap which may cause the domain to panic. \n"
-msgid "SCF-8001-1C.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8001-2R
-# keys: fault.chassis.SPARC-Enterprise.memory.block.pce
-#
-msgid "SCF-8001-2R.type"
-msgstr "Fault"
-msgid "SCF-8001-2R.severity"
-msgstr "Minor"
-msgid "SCF-8001-2R.description"
-msgstr "A permanent correctable memory error (PCE) has been detected.\n Refer to %s for more information."
-msgid "SCF-8001-2R.response"
-msgstr "The 64MB chunk of memory that contains the permanent correctable error will be deconfigured after the \nplatform is power cycled or after the domain reboots or after a Dynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8001-2R.impact"
-msgstr "Minimal impact.\n"
-msgid "SCF-8001-2R.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8001-34
-# keys: fault.chassis.SPARC-Enterprise.memory.dimm.pce
-#
-msgid "SCF-8001-34.type"
-msgstr "Fault"
-msgid "SCF-8001-34.severity"
-msgstr "Minor"
-msgid "SCF-8001-34.description"
-msgstr "The number of permanent correctable errors (PCE's) on single DIMM exceeds an\nacceptable threshold.\n Refer to %s for more information."
-msgid "SCF-8001-34.response"
-msgstr "No immediate action is taken and nothing is deconfigured.\n"
-msgid "SCF-8001-34.impact"
-msgstr "Minimal impact to system.\n"
-msgid "SCF-8001-34.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8001-4X
-# keys: fault.chassis.SPARC-Enterprise.memory.bank.err
-#
-msgid "SCF-8001-4X.type"
-msgstr "Fault"
-msgid "SCF-8001-4X.severity"
-msgstr "Major"
-msgid "SCF-8001-4X.description"
-msgstr "The number of uncorrectable and correctable errors on single DIMM exceeds an\nacceptable threshold. This fault is detected while running POST.\n Refer to %s for more information."
-msgid "SCF-8001-4X.response"
-msgstr "The memory associated with the memory bank containing the errors is deconfigured.\n"
-msgid "SCF-8001-4X.impact"
-msgstr "POST is restarted after the memory associated with the memory bank has been deconfigured.\n"
-msgid "SCF-8001-4X.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8001-9S
-# keys: fault.chassis.SPARC-Enterprise.asic.flp.fe
-#
-msgid "SCF-8001-9S.type"
-msgstr "Fault"
-msgid "SCF-8001-9S.severity"
-msgstr "Critical"
-msgid "SCF-8001-9S.description"
-msgstr "A fatal error has occurred within a FLP chip.\n Refer to %s for more information."
-msgid "SCF-8001-9S.response"
-msgstr "A single domain will be reset and the IO Channel associated with the\nFLP chip will be deconfigured during recovery.\n"
-msgid "SCF-8001-9S.impact"
-msgstr "Domain will be reset.\n"
-msgid "SCF-8001-9S.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8001-AA
-# keys: fault.chassis.SPARC-Enterprise.asic.flp.ce
-#
-msgid "SCF-8001-AA.type"
-msgstr "Fault"
-msgid "SCF-8001-AA.severity"
-msgstr "Major"
-msgid "SCF-8001-AA.description"
-msgstr "The number of correctable errors associated with a FLP chip has exceeded an\nacceptable threshold.\n Refer to %s for more information."
-msgid "SCF-8001-AA.response"
-msgstr "The IO Channel associated with the FLP chip will be deconfigured after the platform is power \ncycled or after the domain reboots or after a Dynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8001-AA.impact"
-msgstr "No immediate impact. The IO Channel associated with the FLP chip will be deconfigured after the \nplatform is power cycled or after the domain reboots or after a Dynamic Reconfiguration operation is \nperformed.\n"
-msgid "SCF-8001-AA.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8001-KC
-# keys: upset.chassis.SPARC-Enterprise.io.disk.boot
-#
-msgid "SCF-8001-KC.type"
-msgstr "upset"
-msgid "SCF-8001-KC.severity"
-msgstr "Critical"
-msgid "SCF-8001-KC.description"
-msgstr "Failure to boot illumos on a domain via an internal disk drive on the SAS controller.\n Refer to %s for more information."
-msgid "SCF-8001-KC.response"
-msgstr "Nothing is deconfigured.\n"
-msgid "SCF-8001-KC.impact"
-msgstr "The domain drops to the OpenBoot PROM 'ok' prompt.\n"
-msgid "SCF-8001-KC.action"
-msgstr "The platform administrator should investigate the cause of the boot problem\nand schedule a service action, if necessary.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8001-LQ
-# keys: fault.chassis.SPARC-Enterprise.if.fe-ioc-flp
-#
-msgid "SCF-8001-LQ.type"
-msgstr "Fault"
-msgid "SCF-8001-LQ.severity"
-msgstr "Critical"
-msgid "SCF-8001-LQ.description"
-msgstr "A fatal error occurred on the interface between an IOC chip and a FLP chip.\n Refer to %s for more information."
-msgid "SCF-8001-LQ.response"
-msgstr "The IO Channel associated with the FLP chip will be deconfigured after the domain\nusing the IO Channel is reset.\n"
-msgid "SCF-8001-LQ.impact"
-msgstr "The domain using the IO Channel associated with the FLP chip is reset. The IO Channel will\ndeconfigured after the domain is reset.\n"
-msgid "SCF-8001-LQ.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8001-ME
-# keys: fault.chassis.SPARC-Enterprise.asic.ioc.fe
-#
-msgid "SCF-8001-ME.type"
-msgstr "Fault"
-msgid "SCF-8001-ME.severity"
-msgstr "Critical"
-msgid "SCF-8001-ME.description"
-msgstr "A fatal error was detected within an IOC chip.\n Refer to %s for more information."
-msgid "SCF-8001-ME.response"
-msgstr "The IOC chip (two IO Channels) will be deconfigured after the domains (one or two domains) using\nthe IOC chip are reset.\n"
-msgid "SCF-8001-ME.impact"
-msgstr "The domains (one or two domains) using the IOC chip are reset. The IOC chip (two IO Channels) will be \ndeconfigured after the domains are reset.\n"
-msgid "SCF-8001-ME.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8001-NJ
-# keys: upset.chassis.SPARC-Enterprise.asic.ioc.fe-tmo-dma
-#
-msgid "SCF-8001-NJ.type"
-msgstr "Upset"
-msgid "SCF-8001-NJ.severity"
-msgstr "Critical"
-msgid "SCF-8001-NJ.description"
-msgstr "A fatal DMA master timeout detected by an IOC chip.\n Refer to %s for more information."
-msgid "SCF-8001-NJ.response"
-msgstr "The domains (one or two domains) using the IOC chip are reset. No components are deconfigured.\n"
-msgid "SCF-8001-NJ.impact"
-msgstr "The domains (one or two domains) using the IOC chip are reset.\n"
-msgid "SCF-8001-NJ.action"
-msgstr "The precise cause of the fault cannot be isolated. Please schedule a repair action.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8001-P2
-# keys: fault.chassis.SPARC-Enterprise.asic.ioc.ch.fe
-#
-msgid "SCF-8001-P2.type"
-msgstr "Fault"
-msgid "SCF-8001-P2.severity"
-msgstr "Critical"
-msgid "SCF-8001-P2.description"
-msgstr "A fatal error was detected within an IOC chip. This fatal error affects only a single\nIO Channel.\n Refer to %s for more information."
-msgid "SCF-8001-P2.response"
-msgstr "The IO Channel will be deconfigured after the domain is reset.\n"
-msgid "SCF-8001-P2.impact"
-msgstr "The domain using the IO Channel is reset. The IO Channel will be deconfigured after\nthe domain is reset.\n"
-msgid "SCF-8001-P2.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information\n"
-#
-# code: SCF-8001-QX
-# keys: fault.chassis.SPARC-Enterprise.asic.ioc.ch.leaf.fe
-#
-msgid "SCF-8001-QX.type"
-msgstr "Fault"
-msgid "SCF-8001-QX.severity"
-msgstr "Critical"
-msgid "SCF-8001-QX.description"
-msgstr "A fatal error was detected within an IOC chip. The fatal error affects only one leaf within\nan IO Channel (1/2 an IO Channel).\n Refer to %s for more information."
-msgid "SCF-8001-QX.response"
-msgstr "The IO Channel leaf (1/2 an IO Channel) will be deconfigured after the domain using the IO\nChannel is reset.\n"
-msgid "SCF-8001-QX.impact"
-msgstr "The domain using the IO Channel leaf is reset. The IO Channel leaf (1/2 an IO Channel) will be\ndeconfigured after the domain is reset.\n"
-msgid "SCF-8001-QX.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8001-RP
-# keys: fault.chassis.SPARC-Enterprise.io.pciex.card.fe
-#
-msgid "SCF-8001-RP.type"
-msgstr "Fault"
-msgid "SCF-8001-RP.severity"
-msgstr "Critical"
-msgid "SCF-8001-RP.description"
-msgstr "A fatal error was detected on a PCI-Express card in a PCI slot.\n Refer to %s for more information."
-msgid "SCF-8001-RP.response"
-msgstr "The PCI-Express card is deconfigured.\n"
-msgid "SCF-8001-RP.impact"
-msgstr "The domain using the PCI slot is reset.\n"
-msgid "SCF-8001-RP.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8001-SA
-# keys: fault.chassis.SPARC-Enterprise.io.pci.card.fe
-#
-msgid "SCF-8001-SA.type"
-msgstr "Fault"
-msgid "SCF-8001-SA.severity"
-msgstr "Critical"
-msgid "SCF-8001-SA.description"
-msgstr "A fatal error was detected on a PCI-X card in a PCI slot.\n Refer to %s for more information."
-msgid "SCF-8001-SA.response"
-msgstr "The PCI-X card is deconfigured.\n"
-msgid "SCF-8001-SA.impact"
-msgstr "The domain using the PCI slot is reset.\n"
-msgid "SCF-8001-SA.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8001-TS
-# keys: fault.chassis.SPARC-Enterprise.io.pciex.bridge.fe
-#
-msgid "SCF-8001-TS.type"
-msgstr "Fault"
-msgid "SCF-8001-TS.severity"
-msgstr "Critical"
-msgid "SCF-8001-TS.description"
-msgstr "A fatal error was detected within a PCIe/PCI-X bridge chip.\n Refer to %s for more information."
-msgid "SCF-8001-TS.response"
-msgstr "All internal I/O behind the PCIe/PCI-X bridge chip is deconfigured (if the\nPCIe/PCI-X bridge chip is located on an IOU or IOUA) or all the PCI-X slots \nin an I/O Boat are deconfigured (if the PCIe/PCI-X bridge chip is located on\nan I/O Boat).\n"
-msgid "SCF-8001-TS.impact"
-msgstr "The domain using the PCIe/PCI-X bridge chip is reset.\n"
-msgid "SCF-8001-TS.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8001-U5
-# keys: fault.chassis.SPARC-Enterprise.io.pciex.switch.fe
-#
-msgid "SCF-8001-U5.type"
-msgstr "Fault"
-msgid "SCF-8001-U5.severity"
-msgstr "Critical"
-msgid "SCF-8001-U5.description"
-msgstr "A fatal error was detected within a PCIe switch chip.\n Refer to %s for more information."
-msgid "SCF-8001-U5.response"
-msgstr "All internal I/O behind the PCIe switch chip is deconfigured (if the PCIe switch chip\nis located on an IOU) or all the PCI-Express slots or PCI-X slots in an I/O Boat are \ndeconfigured (if the PCIe switch chip is located on an I/O Boat).\n"
-msgid "SCF-8001-U5.impact"
-msgstr "The domain using the PCIe switch chip is reset.\n"
-msgid "SCF-8001-U5.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8001-VY
-# keys: fault.chassis.SPARC-Enterprise.io.pci.gbe.fe
-#
-msgid "SCF-8001-VY.type"
-msgstr "Fault"
-msgid "SCF-8001-VY.severity"
-msgstr "Critical"
-msgid "SCF-8001-VY.description"
-msgstr "A fatal error was detected within a Gigabit Ethernet (GbE) controller.\n Refer to %s for more information."
-msgid "SCF-8001-VY.response"
-msgstr "The Gigabit Ethernet (GbE) controller is deconfigured.\n"
-msgid "SCF-8001-VY.impact"
-msgstr "The domain using the Gigabit Ethernet (GbE) controller is reset.\n"
-msgid "SCF-8001-VY.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8001-W3
-# keys: fault.chassis.SPARC-Enterprise.io.pci.sas.fe
-#
-msgid "SCF-8001-W3.type"
-msgstr "Fault"
-msgid "SCF-8001-W3.severity"
-msgstr "Critical"
-msgid "SCF-8001-W3.description"
-msgstr "A fatal error was detected within a SAS (Serial Attached SCSI) controller.\n Refer to %s for more information."
-msgid "SCF-8001-W3.response"
-msgstr "The internal SAS devices behind the SAS controller (internal HDDs, internal DVD drives, internal\ntape drives) are deconfigured.\n"
-msgid "SCF-8001-W3.impact"
-msgstr "The domain using the SAS controller is reset.\n"
-msgid "SCF-8001-W3.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8001-XH
-# keys: fault.chassis.SPARC-Enterprise.if.se-ioc-flp
-#
-msgid "SCF-8001-XH.type"
-msgstr "Fault"
-msgid "SCF-8001-XH.severity"
-msgstr "Major"
-msgid "SCF-8001-XH.description"
-msgstr "A non-fatal uncorrectable error occurred on the interface between an IOC chip and a FLP chip.\n Refer to %s for more information."
-msgid "SCF-8001-XH.response"
-msgstr "The IO Channel corresponding to the FLP chip will be deconfigured after the platform is power cycled or \nafter the domain reboots or after a Dynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8001-XH.impact"
-msgstr "The non-fatal uncorrectable error trap may cause the domain to panic. \nThe IO Channel corresponding to the FLP chip will be deconfigured after the platform is power cycled or \nafter the domain reboots or after a Dynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8001-XH.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8001-YD
-# keys: fault.chassis.SPARC-Enterprise.asic.ioc.ch.se
-#
-msgid "SCF-8001-YD.type"
-msgstr "Fault"
-msgid "SCF-8001-YD.severity"
-msgstr "Major"
-msgid "SCF-8001-YD.description"
-msgstr "A non-fatal uncorrectable error was detected within an IOC chip. This error affects\na single IO Channel.\n Refer to %s for more information."
-msgid "SCF-8001-YD.response"
-msgstr "The IO Channel will be deconfigured after the platform is power cycled or after the domain reboots or \nafter a Dynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8001-YD.impact"
-msgstr "The non-fatal uncorrectable error trap may cause the domain to panic. The IO Channel will be deconfigured \nafter the platform is power cycled or after the domain reboots or after a Dynamic Reconfiguration operation \nis performed.\n"
-msgid "SCF-8001-YD.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8002-0X
-# keys: fault.chassis.SPARC-Enterprise.asic.ioc.ch.leaf.se
-#
-msgid "SCF-8002-0X.type"
-msgstr "Fault"
-msgid "SCF-8002-0X.severity"
-msgstr "Major"
-msgid "SCF-8002-0X.description"
-msgstr "Non-fatal uncorrectable error was detected within an IOC chip. This error affects\na single IO Channel leaf (1/2 an IO Channel).\n Refer to %s for more information."
-msgid "SCF-8002-0X.response"
-msgstr "The IO Channel leaf (1/2 an IO Channel) will be deconfigured after the platform is power cycled or \nafter the domain reboots or after a Dynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8002-0X.impact"
-msgstr "The non-fatal uncorrectable error trap may cause the domain to panic. \nThe IO Channel leaf (1/2 an IO Channel) will be deconfigured after the platform is power cycled or \nafter the domain reboots or after a Dynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8002-0X.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8002-12
-# keys: fault.chassis.SPARC-Enterprise.asic.ioc.ch.leaf.se-no-credit-pci
-#
-msgid "SCF-8002-12.type"
-msgstr "Fault"
-msgid "SCF-8002-12.severity"
-msgstr "Major"
-msgid "SCF-8002-12.description"
-msgstr "A non-fatal uncorrectable \"PCI-E card no-credit update\" error has been detected by an IOC chip.\n Refer to %s for more information."
-msgid "SCF-8002-12.response"
-msgstr "The IO Channel leaf (1/2 an IO Channel) will be deconfigured after the platform is power cycled or \nafter the domain reboots or after a Dynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8002-12.impact"
-msgstr "The non-fatal uncorrectable error trap may cause the domain to panic. \nThe IO Channel leaf (1/2 an IO Channel) will be deconfigured after the platform is power cycled or \nafter the domain reboots or after a Dynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8002-12.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8002-2J
-# keys: fault.chassis.SPARC-Enterprise.io.pciex.card.se
-#
-msgid "SCF-8002-2J.type"
-msgstr "Fault"
-msgid "SCF-8002-2J.severity"
-msgstr "Major"
-msgid "SCF-8002-2J.description"
-msgstr "A non-fatal uncorrectable error occurred due to a PCI-Express card in a PCI-Express slot.\n Refer to %s for more information."
-msgid "SCF-8002-2J.response"
-msgstr "The PCI-Express slot will be deconfigured after the platform is power cycled or \nafter the domain reboots or after a Dynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8002-2J.impact"
-msgstr "The non-fatal uncorrectable error trap may cause the domain to panic. \nThe PCI-Express slot will be deconfigured after the platform is power cycled or \nafter the domain reboots or after a Dynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8002-2J.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8002-3E
-# keys: fault.chassis.SPARC-Enterprise.io.pci.card.se
-#
-msgid "SCF-8002-3E.type"
-msgstr "Fault"
-msgid "SCF-8002-3E.severity"
-msgstr "Major"
-msgid "SCF-8002-3E.description"
-msgstr "A non-fatal uncorrectable error occcurred due to a PCI-X card in a PCI slot.\n Refer to %s for more information."
-msgid "SCF-8002-3E.response"
-msgstr "The PCI-X slot will be deconfigured after the platform is power cycled or \nafter the domain reboots or after a Dynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8002-3E.impact"
-msgstr "The non-fatal uncorrectable error trap may cause the domain to panic. \nThe PCI-X slot will be deconfigured after the platform is power cycled or \nafter the domain reboots or after a Dynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8002-3E.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8002-4Q
-# keys: fault.chassis.SPARC-Enterprise.io.pciex.bridge.se
-#
-msgid "SCF-8002-4Q.type"
-msgstr "Fault"
-msgid "SCF-8002-4Q.severity"
-msgstr "Major"
-msgid "SCF-8002-4Q.description"
-msgstr "A non-fatal uncorrectable error was detected within a PCIe/PCI-X bridge chip.\n Refer to %s for more information."
-msgid "SCF-8002-4Q.response"
-msgstr "All internal I/O behind the PCIe/PCI-X bridge chip is deconfigured (if the\nPCIe/PCI-X bridge chip is located on an IOU or IOUA) or all the PCI-X slots \nin an I/O Boat are deconfigured (if the PCIe/PCI-X bridge chip is located on\nan I/O Boat). The deconfiguration will take place after the platform is power cycled or \nafter the domain reboots or after a Dynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8002-4Q.impact"
-msgstr "The non-fatal uncorrectable error trap may cause the domain to panic. \nAll internal I/O behind the PCIe/PCI-X bridge chip is deconfigured (if the\nPCIe/PCI-X bridge chip is located on an IOU or IOUA) or all the PCI-X slots \nin an I/O Boat are deconfigured (if the PCIe/PCI-X bridge chip is located on\nan I/O Boat). The deconfiguration will take place after the platform is power cycled or \nafter the domain reboots or after a Dynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8002-4Q.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8002-5C
-# keys: fault.chassis.SPARC-Enterprise.io.pciex.switch.se
-#
-msgid "SCF-8002-5C.type"
-msgstr "Fault"
-msgid "SCF-8002-5C.severity"
-msgstr "Major"
-msgid "SCF-8002-5C.description"
-msgstr "A non-fatal uncorrectable error was detected within a PCIe switch chip.\n Refer to %s for more information."
-msgid "SCF-8002-5C.response"
-msgstr "All internal I/O behind the PCIe switch chip is deconfigured (if the PCIe switch chip\nis located on an IOU) or all the PCI-Express slots or PCI-X slots in an I/O Boat are \ndeconfigured (if the PCIe switch chip is located on an I/O Boat). The deconfiguration\nwill take place after the platform is power cycled or after the domain reboots or after a \nDynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8002-5C.impact"
-msgstr "The non-fatal uncorrectable error trap may cause the domain to panic. \nAll internal I/O behind the PCIe switch chip is deconfigured (if the PCIe switch chip\nis located on an IOU) or all the PCI-Express slots or PCI-X slots in an I/O Boat are \ndeconfigured (if the PCIe switch chip is located on an I/O Boat). The deconfiguration\nwill take place after the platform is power cycled or after the domain reboots or after a \nDynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8002-5C.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8002-6R
-# keys: fault.chassis.SPARC-Enterprise.if.ce-ioc-flp
-#
-msgid "SCF-8002-6R.type"
-msgstr "Fault"
-msgid "SCF-8002-6R.severity"
-msgstr "Major"
-msgid "SCF-8002-6R.description"
-msgstr "The number of correctable errors on the interface between an IOC chip and a FLP chip has exceeded \nan acceptable threshold.\n Refer to %s for more information."
-msgid "SCF-8002-6R.response"
-msgstr "The IO Channel that is associated with the FLP chip will be deconfigured after the platform is power \ncycled or after the domain reboots or after a Dynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8002-6R.impact"
-msgstr "No immediate impact. The IO Channel that is associated with the FLP chip will be deconfigured after the \nplatform is power cycled or after the domain reboots or after a Dynamic Reconfiguration operation is \nperformed.\n"
-msgid "SCF-8002-6R.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8002-74
-# keys: fault.chassis.SPARC-Enterprise.asic.ioc.ch.ce
-#
-msgid "SCF-8002-74.type"
-msgstr "Fault"
-msgid "SCF-8002-74.severity"
-msgstr "Major"
-msgid "SCF-8002-74.description"
-msgstr "The number of correctable errors within a IOC Chip has exceeded an acceptable threshold. This fault\naffects a single IO Channel.\n Refer to %s for more information."
-msgid "SCF-8002-74.response"
-msgstr "The IO Channel is deconfigured after the platform is power cycled or after the domain reboots or after a \nDynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8002-74.impact"
-msgstr "No immediate impact. The IO Channel is deconfigured after the platform is power cycled or after the \ndomain reboots or after a Dynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8002-74.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8002-8D
-# keys: fault.chassis.SPARC-Enterprise.asic.ioc.ch.leaf.ce
-#
-msgid "SCF-8002-8D.type"
-msgstr "Fault"
-msgid "SCF-8002-8D.severity"
-msgstr "Major"
-msgid "SCF-8002-8D.description"
-msgstr "The number of correctable errors within a IOC Chip has exceeded an acceptable threshold. This fault\naffects a single IO Channel leaf (1/2 an IO Channel).\n Refer to %s for more information."
-msgid "SCF-8002-8D.response"
-msgstr "The IO Channel leaf (1/2 an IO Channel) is deconfigured after the platform is power cycled or after \nthe domain reboots or after a Dynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8002-8D.impact"
-msgstr "No immediate impact. The IO Channel leaf (1/2 an IO Channel) is deconfigured after the platform is \npower cycled or after the domain reboots or after a Dynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8002-8D.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8002-9H
-# keys: upset.chassis.SPARC-Enterprise.asic.ioc.ch.boot
-#
-msgid "SCF-8002-9H.type"
-msgstr "Upset"
-msgid "SCF-8002-9H.severity"
-msgstr "Critical"
-msgid "SCF-8002-9H.description"
-msgstr "Failure to boot illumos on a domain using a device on an IO Channel.\n Refer to %s for more information."
-msgid "SCF-8002-9H.response"
-msgstr "Nothing is deconfigured.\n"
-msgid "SCF-8002-9H.impact"
-msgstr "The domain drops to the OpenBoot PROM 'ok' prompt.\n"
-msgid "SCF-8002-9H.action"
-msgstr "The platform administrator should investigate the cause of the boot problem\nand schedule a service action, if necessary. Please consult the detail section of the \nknowledge article for additional information.\n"
-#
-# code: SCF-8002-A3
-# keys: upset.chassis.SPARC-Enterprise.asic.ioc.ch.leaf.boot
-#
-msgid "SCF-8002-A3.type"
-msgstr "Upset"
-msgid "SCF-8002-A3.severity"
-msgstr "Critical"
-msgid "SCF-8002-A3.description"
-msgstr "Failure to boot illumos on a domain using a device on IO Channel leaf (1/2 an IO Channel).\n Refer to %s for more information."
-msgid "SCF-8002-A3.response"
-msgstr "Nothing is deconfigured.\n"
-msgid "SCF-8002-A3.impact"
-msgstr "The domain drops to the OpenBoot PROM 'ok' prompt.\n"
-msgid "SCF-8002-A3.action"
-msgstr "The platform administrator should investigate the cause of the boot problem\nand schedule a service action, if necessary. Please consult the detail section of the \nknowledge article for additional information.\n"
-#
-# code: SCF-8002-CY
-# keys: upset.chassis.SPARC-Enterprise.io.pci.gbe.boot
-#
-msgid "SCF-8002-CY.type"
-msgstr "Upset"
-msgid "SCF-8002-CY.severity"
-msgstr "Critical"
-msgid "SCF-8002-CY.description"
-msgstr "Failure to boot illumos on a domain via GbE.\n Refer to %s for more information."
-msgid "SCF-8002-CY.response"
-msgstr "Nothing is deconfigured.\n"
-msgid "SCF-8002-CY.impact"
-msgstr "The domain drops to the OpenBoot PROM 'ok' prompt.\n"
-msgid "SCF-8002-CY.action"
-msgstr "The platform administrator should investigate the cause of the boot\nproblem and schedule a service action, if necessary.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8002-D5
-# keys: upset.chassis.SPARC-Enterprise.io.pci.card.boot
-#
-msgid "SCF-8002-D5.type"
-msgstr "Upset"
-msgid "SCF-8002-D5.severity"
-msgstr "Critical"
-msgid "SCF-8002-D5.description"
-msgstr "Failure to boot illumos on a domain using a device in a PCI-X slot.\n Refer to %s for more information."
-msgid "SCF-8002-D5.response"
-msgstr "Nothing is deconfigured.\n"
-msgid "SCF-8002-D5.impact"
-msgstr "The domain drops to the OpenBoot PROM 'ok' prompt\n"
-msgid "SCF-8002-D5.action"
-msgstr "The platform administrator should investigate the cause of the boot\nproblem and schedule a service action, if necessary.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8002-ES
-# keys: upset.chassis.SPARC-Enterprise.io.pciex.card.boot
-#
-msgid "SCF-8002-ES.type"
-msgstr "Upset"
-msgid "SCF-8002-ES.severity"
-msgstr "Critical"
-msgid "SCF-8002-ES.description"
-msgstr "Failure to boot illumos on a domain using a device in a PCI-Express slot.\n Refer to %s for more information."
-msgid "SCF-8002-ES.response"
-msgstr "Nothing is deconfigured.\n"
-msgid "SCF-8002-ES.impact"
-msgstr "The domain drops to the OpenBoot PROM 'ok' prompt.\n"
-msgid "SCF-8002-ES.action"
-msgstr "The platform administrator should investigate the cause of the boot\nproblem and schedule a service action, if necessary.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8002-FA
-# keys: upset.chassis.SPARC-Enterprise.io.pciex.bridge.boot
-#
-msgid "SCF-8002-FA.type"
-msgstr "Upset"
-msgid "SCF-8002-FA.severity"
-msgstr "Critical"
-msgid "SCF-8002-FA.description"
-msgstr "Failure to boot illumos on a domain using a device behind a PCI-Express/PCI-X \nbridge chip. This includes the PCI-X slot and internal I/O on an IOU (if the\nPCI-Express/PCI-X bridge is located on an IOU or IOUA) and the PCI-X slots of\nan I/O Boat (if the PCI-Express/PCI-X bridge is located on an I/O Boat).\n Refer to %s for more information."
-msgid "SCF-8002-FA.response"
-msgstr "Nothing is deconfigured.\n"
-msgid "SCF-8002-FA.impact"
-msgstr "The domain drops to the OpenBoot PROM 'ok' prompt.\n"
-msgid "SCF-8002-FA.action"
-msgstr "The platform administrator should investigate the cause of the boot problem\nand schedule a service action, if necessary.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8002-GP
-# keys: upset.chassis.SPARC-Enterprise.io.pciex.switch.boot
-#
-msgid "SCF-8002-GP.type"
-msgstr "upset"
-msgid "SCF-8002-GP.severity"
-msgstr "Critical"
-msgid "SCF-8002-GP.description"
-msgstr "Failure to boot illumos on a domain using a device behind a PCI-Express switch chip.\nThis includes PCI-X slot and internal I/O devices (if the PCI-Express switch chip \nis located on an IOU), and the PCI-Express slots and PCI-X slots on an I/O Boat\n(if the PCI-Express switch chip is located on an I/O Boat).\n Refer to %s for more information."
-msgid "SCF-8002-GP.response"
-msgstr "Nothing is deconfigured.\n"
-msgid "SCF-8002-GP.impact"
-msgstr "The domain drops to the OpenBoot PROM 'ok' prompt.\n"
-msgid "SCF-8002-GP.action"
-msgstr "The platform administrator should investigate the cause of the boot problem\nand schedule a service action, if necessary.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8002-HE
-# keys: upset.chassis.SPARC-Enterprise.io.pci.sas.boot
-#
-msgid "SCF-8002-HE.type"
-msgstr "Upset"
-msgid "SCF-8002-HE.severity"
-msgstr "Critical"
-msgid "SCF-8002-HE.description"
-msgstr "Failure to boot illumos on a domain using an internal SAS (Serial Attached\nSCSI) device. This includes the internal hard drives and the internal DVD drives\nand the internal tape drives.\n Refer to %s for more information."
-msgid "SCF-8002-HE.response"
-msgstr "Nothing is deconfigured.\n"
-msgid "SCF-8002-HE.impact"
-msgstr "The domain drops to the OpenBoot PROM 'ok' prompt.\n"
-msgid "SCF-8002-HE.action"
-msgstr "The platform administrator should investigate the cause of the boot\nproblem and schedule a service action, if necessary.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8002-JJ
-# keys: fault.chassis.jtag.device
-#
-msgid "SCF-8002-JJ.type"
-msgstr "Fault"
-msgid "SCF-8002-JJ.severity"
-msgstr "Critical"
-msgid "SCF-8002-JJ.description"
-msgstr "JTAG read or write failure to a specific chip.\n Refer to %s for more information."
-msgid "SCF-8002-JJ.response"
-msgstr "The resources associated with the chip will be deconfigured. Please consult the detail section \nof the knowledge article for additional information.\n"
-msgid "SCF-8002-JJ.impact"
-msgstr "The platform may be reset or a domain may be reset. The platform may be unable to restart.\nPlease consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8002-JJ.action"
-msgstr "The platform administrator should schedule a service action to replace\nthe affected Field Replaceable Unit (FRU), the identity of which can be\ndetermined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8002-K2
-# keys: fault.chassis.jtag.device-internal
-#
-msgid "SCF-8002-K2.type"
-msgstr "Fault"
-msgid "SCF-8002-K2.severity"
-msgstr "Critical"
-msgid "SCF-8002-K2.description"
-msgstr "JTAG access failure to a specific chip when attempting a reconfiguration operation.\nPlease consult the detail section of the knowledge article for additional information.\n Refer to %s for more information."
-msgid "SCF-8002-K2.response"
-msgstr "The resources associated with the chip will be deconfigured. Please consult the detail section of \nthe knowledge article for additional information.\n"
-msgid "SCF-8002-K2.impact"
-msgstr "The platform may be reset or a domain may be reset. The platform may become unbootable.\nIt is also possible that some other problem may occur. Please consult the detail section of the \nknowledge article for additional information.\n"
-msgid "SCF-8002-K2.action"
-msgstr "The platform administrator should schedule a service action to replace\nthe affected Field Replaceable Unit (FRU), the identity of which can be\ndetermined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8002-LX
-# keys: fault.chassis.i2c.device
-#
-msgid "SCF-8002-LX.type"
-msgstr "Fault"
-msgid "SCF-8002-LX.severity"
-msgstr "Critical"
-msgid "SCF-8002-LX.description"
-msgstr "I2C access failure to an I2C device.\n Refer to %s for more information."
-msgid "SCF-8002-LX.response"
-msgstr "The resources associated with the I2C device may deconfigured. The speed of all fans on the platform\nmay be raised. Please consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8002-LX.impact"
-msgstr "It is possible that the platform will not be able to be be restarted. Please consult the detail section \nof the knowledge article for additional information.\n"
-msgid "SCF-8002-LX.action"
-msgstr "The platform administrator should schedule a service action to replace\nthe affected Field Replaceable Unit (FRU), the identity of which can be\ndetermined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8002-M4
-# keys: fault.chassis.i2c.device-internal
-#
-msgid "SCF-8002-M4.type"
-msgstr "Fault"
-msgid "SCF-8002-M4.severity"
-msgstr "Critical"
-msgid "SCF-8002-M4.description"
-msgstr "I2C access failure to a specific chip when attempting a reconfiguration operation.\nPlease consult the detail section of the knowledge article for additional information.\n Refer to %s for more information."
-msgid "SCF-8002-M4.response"
-msgstr "The resources associated with the chip will be deconfigured. Please consult the detail section of the \nknowledge article for additional information.\n"
-msgid "SCF-8002-M4.impact"
-msgstr "One or more domains may be reset. It is also possible that some other problem may occur. \nPlease consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8002-M4.action"
-msgstr "The platform administrator should schedule a service action to replace\nthe affected Field Replaceable Unit (FRU), the identity of which can be\ndetermined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8002-UD
-# keys: fault.chassis.SPARC-Enterprise.asic.mac.fe
-#
-msgid "SCF-8002-UD.type"
-msgstr "Fault"
-msgid "SCF-8002-UD.severity"
-msgstr "Critical"
-msgid "SCF-8002-UD.description"
-msgstr "A fatal error was detected within a MAC chip.\n Refer to %s for more information."
-msgid "SCF-8002-UD.response"
-msgstr "Memory associated within the MAC chip will be deconfigured.\n"
-msgid "SCF-8002-UD.impact"
-msgstr "Platform may be reset or domains using the MAC chip will be reset.\n"
-msgid "SCF-8002-UD.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8002-VP
-# keys: fault.chassis.SPARC-Enterprise.asic.mac.bank.fe
-#
-msgid "SCF-8002-VP.type"
-msgstr "Fault"
-msgid "SCF-8002-VP.severity"
-msgstr "Critical"
-msgid "SCF-8002-VP.description"
-msgstr "A fatal error was detected within the part of a MAC chip that controls a memory bank.\n Refer to %s for more information."
-msgid "SCF-8002-VP.response"
-msgstr "The bank of memory is deconfigured.\n"
-msgid "SCF-8002-VP.impact"
-msgstr "Domain using the memory bank will be reset.\n"
-msgid "SCF-8002-VP.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8002-WA
-# keys: fault.chassis.SPARC-Enterprise.asic.mac.se
-#
-msgid "SCF-8002-WA.type"
-msgstr "Fault"
-msgid "SCF-8002-WA.severity"
-msgstr "Major"
-msgid "SCF-8002-WA.description"
-msgstr "A non-fatal uncorrectable error was detected within a MAC chip.\n Refer to %s for more information."
-msgid "SCF-8002-WA.response"
-msgstr "Memory associated with the MAC chip will be deconfigured after the platform is power cycled or \nafter the domain reboots or after a Dynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8002-WA.impact"
-msgstr "The domain may panic, the MAC memory patrol feature may stop working, or access to MAC registers from the\ndomain may fail.\n"
-msgid "SCF-8002-WA.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8002-XS
-# keys: fault.chassis.SPARC-Enterprise.asic.mac.bank.se
-#
-msgid "SCF-8002-XS.type"
-msgstr "Fault"
-msgid "SCF-8002-XS.severity"
-msgstr "Major"
-msgid "SCF-8002-XS.description"
-msgstr "A non-fatal uncorrectable error was detected within the part of a MAC chip that controls a memory bank.\n Refer to %s for more information."
-msgid "SCF-8002-XS.response"
-msgstr "Memory associated with this memory bank is deconfigured after the platform is power cycled or \nafter the domain reboots or after a Dynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8002-XS.impact"
-msgstr "The domain will encounter an non-fatal uncorrectable error and the domain may panic.\n"
-msgid "SCF-8002-XS.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8002-Y5
-# keys: fault.chassis.SPARC-Enterprise.asic.mac.ce
-#
-msgid "SCF-8002-Y5.type"
-msgstr "Fault"
-msgid "SCF-8002-Y5.severity"
-msgstr "Major"
-msgid "SCF-8002-Y5.description"
-msgstr "The number of correctable errors detected within a MAC chip has exceeded an\nacceptable threshold.\n Refer to %s for more information."
-msgid "SCF-8002-Y5.response"
-msgstr "Memory associated to the MAC will be deconfigured after the platform is power cycled or after \nthe domain reboots or after a Dynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8002-Y5.impact"
-msgstr "No immediate impact. Memory associated to the MAC will be deconfigured after the platform is power \ncycled or after the domain reboots or after a Dynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8002-Y5.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8003-0S
-# keys: fault.chassis.SPARC-Enterprise.asic.mac.bank.ce
-#
-msgid "SCF-8003-0S.type"
-msgstr "Fault"
-msgid "SCF-8003-0S.severity"
-msgstr "Major"
-msgid "SCF-8003-0S.description"
-msgstr "The number of correctable errors detected within the part of a MAC chip that controls a memory\nbank has exceeded an acceptable threshold.\n Refer to %s for more information."
-msgid "SCF-8003-0S.response"
-msgstr "Memory associated with the memory bank will be deconfigured after the platform is power cycled or after \nthe domain reboots or after a Dynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8003-0S.impact"
-msgstr "No immediate impact. Memory associated with the memory bank will be deconfigured after the platform \nis power cycled or after the domain reboots or after a Dynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8003-0S.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8003-5D
-# keys: fault.chassis.SPARC-Enterprise.madm.io.se
-#
-msgid "SCF-8003-5D.type"
-msgstr "Fault"
-msgid "SCF-8003-5D.severity"
-msgstr "Major"
-msgid "SCF-8003-5D.description"
-msgstr "Machine Administration Sofware (MADM) on the domain detected a serious I/O problem.\n Refer to %s for more information."
-msgid "SCF-8003-5D.response"
-msgstr "No immediate action is taken and nothing is deconfigured.\n"
-msgid "SCF-8003-5D.impact"
-msgstr "Problem with an I/O device.\n"
-msgid "SCF-8003-5D.action"
-msgstr "The platform administrator should use the output of the showlogs command to determine\nif a service action is necessary. Please consult the detail section of the knowledge\narticle for additional information.\n"
-#
-# code: SCF-8003-6Y
-# keys: fault.chassis.SPARC-Enterprise.madm.io.fe
-#
-msgid "SCF-8003-6Y.type"
-msgstr "Fault"
-msgid "SCF-8003-6Y.severity"
-msgstr "Critical"
-msgid "SCF-8003-6Y.description"
-msgstr "Machine Administration Sofware (MADM) on the domain detected a fatal I/O problem.\n Refer to %s for more information."
-msgid "SCF-8003-6Y.response"
-msgstr "Nothing is deconfigured on the XSCF, but the domain will deconfigure the I/O device.\n"
-msgid "SCF-8003-6Y.impact"
-msgstr "Problem with an I/O device.\n"
-msgid "SCF-8003-6Y.action"
-msgstr "The platform administrator should use the output of the showlogs command to determine\nif a service action is necessary. Please consult the detail section of the knowledge\narticle for additional information.\n"
-#
-# code: SCF-8003-GJ
-# keys: fault.chassis.SPARC-Enterprise.if.fe-mbc-sc
-#
-msgid "SCF-8003-GJ.type"
-msgstr "Fault"
-msgid "SCF-8003-GJ.severity"
-msgstr "Critical"
-msgid "SCF-8003-GJ.description"
-msgstr "A fatal error occurred on the interface between a MBC chip and a SC chip.\n Refer to %s for more information."
-msgid "SCF-8003-GJ.response"
-msgstr "Resources associated with the faulty FRU will be deconfigured. Please consult the \ndetail section of the knowledge article for additional information.\n"
-msgid "SCF-8003-GJ.impact"
-msgstr "Either the platform or a domain is reset. The platform may become unbootable.\nPlease consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8003-GJ.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8003-HA
-# keys: fault.chassis.SPARC-Enterprise.asic.mbc.fe
-#
-msgid "SCF-8003-HA.type"
-msgstr "Fault"
-msgid "SCF-8003-HA.severity"
-msgstr "Critical"
-msgid "SCF-8003-HA.description"
-msgstr "A fatal error was detected within a MBC chip.\n Refer to %s for more information."
-msgid "SCF-8003-HA.response"
-msgstr "Resources associated with the faulty FRU will be deconfigured. Please consult the \ndetail section of the knowledge article for additional information.\n"
-msgid "SCF-8003-HA.impact"
-msgstr "Either the platform will be reset or a domain may be reset. The platform may become unbootable.\nPlease consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8003-HA.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8003-JP
-# keys: fault.chassis.SPARC-Enterprise.if.se-mbc-sc
-#
-msgid "SCF-8003-JP.type"
-msgstr "Fault"
-msgid "SCF-8003-JP.severity"
-msgstr "Critical"
-msgid "SCF-8003-JP.description"
-msgstr "A non-fatal uncorrectable error occurred on the interface between a MBC chip and a SC chip.\n Refer to %s for more information."
-msgid "SCF-8003-JP.response"
-msgstr "No immediate action is taken by XSCF software due to this fault.\nResources associated with the faulty FRU will be deconfigured after the platform is\npower cycled or after the domain reboots or after a Dynamic Reconfiguration operation \nis performed. This resource deconfiguration may cause the platform to become\nunbootable. Please consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8003-JP.impact"
-msgstr "The non-fatal uncorrectable error trap may cause the domain to panic. \n"
-msgid "SCF-8003-JP.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8003-K5
-# keys: fault.chassis.SPARC-Enterprise.if.se-mbc-xscf
-#
-msgid "SCF-8003-K5.type"
-msgstr "Fault"
-msgid "SCF-8003-K5.severity"
-msgstr "Critical"
-msgid "SCF-8003-K5.description"
-msgstr "A non-fatal uncorrectable error occurred on the interface between a MBC chip and the XSCF.\n Refer to %s for more information."
-msgid "SCF-8003-K5.response"
-msgstr "No immediate action is taken by XSCF software due to this fault.\nResources associated with the faulty FRU will be deconfigured after the platform is\npower cycled or after the domain reboots or after a Dynamic Reconfiguration operation \nis performed. This resource deconfiguration may cause the platform to become\nunbootable. Please consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8003-K5.impact"
-msgstr "The non-fatal uncorrectable error trap may cause the domain to panic. \n"
-msgid "SCF-8003-K5.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8003-LS
-# keys: fault.chassis.SPARC-Enterprise.asic.mbc.se
-#
-msgid "SCF-8003-LS.type"
-msgstr "Fault"
-msgid "SCF-8003-LS.severity"
-msgstr "Critical"
-msgid "SCF-8003-LS.description"
-msgstr "A non-fatal uncorrectable error was detected within a MBC chip.\n Refer to %s for more information."
-msgid "SCF-8003-LS.response"
-msgstr "No immediate action is taken by XSCF software due to this fault.\nResources associated with the faulty FRU will be deconfigured after the platform is\npower cycled or after the domain reboots or after a Dynamic Reconfiguration operation \nis performed. This resource deconfiguration may cause the platform to become\nunbootable. Please consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8003-LS.impact"
-msgstr "The non-fatal uncorrectable error trap may cause the domain to panic. \n"
-msgid "SCF-8003-LS.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8003-M3
-# keys: fault.chassis.SPARC-Enterprise.asic.mbc.se-dma
-#
-msgid "SCF-8003-M3.type"
-msgstr "Fault"
-msgid "SCF-8003-M3.severity"
-msgstr "Major"
-msgid "SCF-8003-M3.description"
-msgstr "An uncorrectable error was detected on a DMA channel between two MBC chips on two\ndifferent FRUs. Please consult the detail section of the knowledge article for additional information.\n Refer to %s for more information."
-msgid "SCF-8003-M3.response"
-msgstr "There are two DMA channels between MBC chips. If the first DMA channel fails, the system\nwill switch to using the second DMA channel. If the second DMA channel fails, then the\nFRU with the MBC chip becomes unmanageable. If the second DMA channel fails, then resources\nassociated with the FRU with the MBC chip will be deconfigured after the platform is power cycled or \nafter the domain reboots or after a Dynamic Reconfiguration operation is performed.\nDeconfiguration of these resources may reduce system performance or may cause the\nplatform to become unbootable. Please consult the detail section of the knowledge article for \nadditional information.\n"
-msgid "SCF-8003-M3.impact"
-msgstr "If it is the second DMA channel for the MBC chip that has failed, the XSCF will no longer be able \nto contact the chips and devices that are connected to the faulty MBC chip.\n"
-msgid "SCF-8003-M3.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8003-NY
-# keys: fault.chassis.SPARC-Enterprise.asic.mbc.se-dma-dscp
-#
-msgid "SCF-8003-NY.type"
-msgstr "Fault"
-msgid "SCF-8003-NY.severity"
-msgstr "Major"
-msgid "SCF-8003-NY.description"
-msgstr "A non-fatal uncorrectable internal error was detected on the DMA interface used by DSCP \non a MBC chip.\n Refer to %s for more information."
-msgid "SCF-8003-NY.response"
-msgstr "DSCP will switch to use some other XSB's DMA interface, if there is an operational DMA interface\non another XSB in this domain. Otherwise, the system will continue to use the existing DMA interface.\nThe XSB with this DMA interface will be deconfigured after the platform is power cycled or \nafter the domain reboots or after a Dynamic Reconfiguration operation is performed.\nPlease consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8003-NY.impact"
-msgstr "The domain may encounter an uncorrectable error, but the domain will not panic.\n"
-msgid "SCF-8003-NY.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8003-PD
-# keys: fault.chassis.SPARC-Enterprise.asic.mbc.se-cmd
-#
-msgid "SCF-8003-PD.type"
-msgstr "Fault"
-msgid "SCF-8003-PD.severity"
-msgstr "Major"
-msgid "SCF-8003-PD.description"
-msgstr "XSCF software detected a problem on the command interface between the XSCF and an XSB.\n Refer to %s for more information."
-msgid "SCF-8003-PD.response"
-msgstr "If the problem can be isolated to a specific XSB, the system will switch to use some other XSB's \ncommand interface, if there is an operational command interface on another XSB in this domain. Otherwise, \nthe system will continue to use the existing command interface. The XSB with this command interface will \nbe deconfigured after the platform is power cycled or after the domain reboots or after a Dynamic \nReconfiguration operation is performed. If the problem cannot be isolated to a specific XSB, no\ndeconfiguration is performed. Please consult the detail section of the knowledge article for additional \ninformation.\n"
-msgid "SCF-8003-PD.impact"
-msgstr "No immediate impact.\n"
-msgid "SCF-8003-PD.action"
-msgstr "If the problem can be isolated to a specific XSB, schedule a repair action to replace the affected \nField Replaceable Unit (FRU), the identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8003-QH
-# keys: fault.chassis.SPARC-Enterprise.if.ce-mbc-sc
-#
-msgid "SCF-8003-QH.type"
-msgstr "Fault"
-msgid "SCF-8003-QH.severity"
-msgstr "Major"
-msgid "SCF-8003-QH.description"
-msgstr "The number of correctable errors on the interface between a MBC chip and a SC chip has exceeded \nan acceptable threshold.\n Refer to %s for more information."
-msgid "SCF-8003-QH.response"
-msgstr "Resources associated with this SC chip (this includes CPU chips, memory, and I/O) will be deconfigured\nafter the platform is power cycled or after the domain reboots or after a Dynamic Reconfiguration \noperation is performed. Please consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8003-QH.impact"
-msgstr "No immediate action. Resources associated with this SC chip (this includes CPU chips, memory, and I/O) \nwill be deconfigured after the platform is power cycled or after the domain reboots or after a Dynamic \nReconfiguration operation is performed. Please consult the detail section of the knowledge article for \nadditional information.\n"
-msgid "SCF-8003-QH.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8003-RR
-# keys: fault.chassis.SPARC-Enterprise.asic.mbc.ce
-#
-msgid "SCF-8003-RR.type"
-msgstr "Fault"
-msgid "SCF-8003-RR.severity"
-msgstr "Major"
-msgid "SCF-8003-RR.description"
-msgstr "The number of correctable errors within the SRAM of a MBC chip has exceeded an acceptable threshold.\n Refer to %s for more information."
-msgid "SCF-8003-RR.response"
-msgstr "The resources associated with this MBC chip will be deconfigured after the platform is power cycled or \nafter the domain reboots or after a Dynamic Reconfiguration operation is performed.\nThe platform may become unbootable. Please consult the detail section of the knowledge article for \nadditional information.\n"
-msgid "SCF-8003-RR.impact"
-msgstr "No immediate impact.\n"
-msgid "SCF-8003-RR.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8003-S4
-# keys: fault.chassis.SPARC-Enterprise.asic.mbc.test
-#
-msgid "SCF-8003-S4.type"
-msgstr "Fault"
-msgid "SCF-8003-S4.severity"
-msgstr "Major"
-msgid "SCF-8003-S4.description"
-msgstr "An error was detected within the section of a MBC chip dealing with a specific\nXSB. This error is detected during self-test.\n Refer to %s for more information."
-msgid "SCF-8003-S4.response"
-msgstr "The XSB is deconfigured.\n"
-msgid "SCF-8003-S4.impact"
-msgstr "No immediate impact. The XSB is deconfigured.\n"
-msgid "SCF-8003-S4.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8004-3Y
-# keys: fault.chassis.SPARC-Enterprise.asic.mac.power.fail
-#
-msgid "SCF-8004-3Y.type"
-msgstr "Fault"
-msgid "SCF-8004-3Y.severity"
-msgstr "Critical"
-msgid "SCF-8004-3Y.description"
-msgstr "The MAC chip has detected it does not have sufficient power to continue operating.\n Refer to %s for more information."
-msgid "SCF-8004-3Y.response"
-msgstr "Nothing is deconfigured.\n"
-msgid "SCF-8004-3Y.impact"
-msgstr "The domain using the MAC chip will be reset.\n"
-msgid "SCF-8004-3Y.action"
-msgstr "Please consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8004-45
-# keys: fault.chassis.SPARC-Enterprise.asic.sc.power.fail
-#
-msgid "SCF-8004-45.type"
-msgstr "Fault"
-msgid "SCF-8004-45.severity"
-msgstr "Critical"
-msgid "SCF-8004-45.description"
-msgstr "The SC chip has detected it does not have sufficient power to continue operating.\n Refer to %s for more information."
-msgid "SCF-8004-45.response"
-msgstr "Resources may be deconfigured after a platform reset.\nPlease consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8004-45.impact"
-msgstr "Either the platform or a domain will be reset. Please consult the detail section of the \nknowledge article for additional information.\n"
-msgid "SCF-8004-45.action"
-msgstr "Please consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8004-5S
-# keys: fault.chassis.SPARC-Enterprise.asic.xb.power.fail
-#
-msgid "SCF-8004-5S.type"
-msgstr "Fault"
-msgid "SCF-8004-5S.severity"
-msgstr "Critical"
-msgid "SCF-8004-5S.description"
-msgstr "The XB chip has detected it does not have sufficient power to continue operating.\n Refer to %s for more information."
-msgid "SCF-8004-5S.response"
-msgstr "Resources may be deconfigured after a platform reset.\nPlease consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8004-5S.impact"
-msgstr "The platform will be reset.\n"
-msgid "SCF-8004-5S.action"
-msgstr "Please consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8004-6A
-# keys: fault.chassis.SPARC-Enterprise.asic.ioc.power.fail
-#
-msgid "SCF-8004-6A.type"
-msgstr "Fault"
-msgid "SCF-8004-6A.severity"
-msgstr "Critical"
-msgid "SCF-8004-6A.description"
-msgstr "The IOC chip has detected it does not have sufficient power to continue operating.\n Refer to %s for more information."
-msgid "SCF-8004-6A.response"
-msgstr "Nothing is deconfigured.\nPlease consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8004-6A.impact"
-msgstr "The domains using the IOC chip will be reset.\n"
-msgid "SCF-8004-6A.action"
-msgstr "Please consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8004-7P
-# keys: fault.chassis.SPARC-Enterprise.asic.clk.power.fail
-#
-msgid "SCF-8004-7P.type"
-msgstr "Fault"
-msgid "SCF-8004-7P.severity"
-msgstr "Critical"
-msgid "SCF-8004-7P.description"
-msgstr "The Clock chip has detected it does not have sufficient power to continue operating.\n Refer to %s for more information."
-msgid "SCF-8004-7P.response"
-msgstr "Nothing is deconfigured.\nPlease consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8004-7P.impact"
-msgstr "The platform will be reset.\n"
-msgid "SCF-8004-7P.action"
-msgstr "Please consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8004-8X
-# keys: fault.chassis.SPARC-Enterprise.asic.cpu.power.fail
-#
-msgid "SCF-8004-8X.type"
-msgstr "Fault"
-msgid "SCF-8004-8X.severity"
-msgstr "Critical"
-msgid "SCF-8004-8X.description"
-msgstr "A CPU chip has detected it does not have sufficient power to continue operating.\n Refer to %s for more information."
-msgid "SCF-8004-8X.response"
-msgstr "Nothing is deconfigured.\nPlease consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8004-8X.impact"
-msgstr "The domain using the CPU chip will reset.\n"
-msgid "SCF-8004-8X.action"
-msgstr "Please consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8004-92
-# keys: fault.chassis.SPARC-Enterprise.asic.flp.power.fail
-#
-msgid "SCF-8004-92.type"
-msgstr "Fault"
-msgid "SCF-8004-92.severity"
-msgstr "Critical"
-msgid "SCF-8004-92.description"
-msgstr "A FLP chip has detected it does not have sufficient power to continue operating.\n Refer to %s for more information."
-msgid "SCF-8004-92.response"
-msgstr "Nothing is deconfigured.\nPlease consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8004-92.impact"
-msgstr "The domain using the FLP chip will be reset.\n"
-msgid "SCF-8004-92.action"
-msgstr "Please consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8004-AJ
-# keys: fault.chassis.SPARC-Enterprise.asic.mbc.power.fail
-#
-msgid "SCF-8004-AJ.type"
-msgstr "Fault"
-msgid "SCF-8004-AJ.severity"
-msgstr "Critical"
-msgid "SCF-8004-AJ.description"
-msgstr "A MBC chip has detected it does not have sufficient power to continue operating.\n Refer to %s for more information."
-msgid "SCF-8004-AJ.response"
-msgstr "Nothing is deconfigured.\nPlease consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8004-AJ.impact"
-msgstr "Either the platform or a domain will be reset. Please consult the detail section of \nthe knowledge article for additional information.\n"
-msgid "SCF-8004-AJ.action"
-msgstr "Please consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8004-CE
-# keys: fault.chassis.SPARC-Enterprise.asic.power.fail
-#
-msgid "SCF-8004-CE.type"
-msgstr "Fault"
-msgid "SCF-8004-CE.severity"
-msgstr "Critical"
-msgid "SCF-8004-CE.description"
-msgstr "Some ASIC has detected it does not have sufficient power to continue operating. It is unknown\nwhich type of ASIC detected the falure.\n Refer to %s for more information."
-msgid "SCF-8004-CE.response"
-msgstr "Nothing is deconfigured.\nPlease consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8004-CE.impact"
-msgstr "Either the platform or a domain will be reset. Please consult the detail section of \nthe knowledge article for additional information.\n"
-msgid "SCF-8004-CE.action"
-msgstr "Please consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8004-DQ
-# keys: fault.chassis.power.warning
-#
-msgid "SCF-8004-DQ.type"
-msgstr "Fault"
-msgid "SCF-8004-DQ.severity"
-msgstr "Minor"
-msgid "SCF-8004-DQ.description"
-msgstr "An undervoltage or overvoltage warning was detected by a device or FRU.\n Refer to %s for more information."
-msgid "SCF-8004-DQ.response"
-msgstr "Nothing is deconfigured and no action is taken as a result of this warning.\n"
-msgid "SCF-8004-DQ.impact"
-msgstr "None.\n"
-msgid "SCF-8004-DQ.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8004-EC
-# keys: fault.chassis.power.undervoltage
-#
-msgid "SCF-8004-EC.type"
-msgstr "Fault"
-msgid "SCF-8004-EC.severity"
-msgstr "Critical"
-msgid "SCF-8004-EC.description"
-msgstr "A serious undervoltage failure has occurred on a device or FRU.\n Refer to %s for more information."
-msgid "SCF-8004-EC.response"
-msgstr "The device or FRU will be deconfigured. Please consult the detail section of the \nknowledge article for additional information.\n"
-msgid "SCF-8004-EC.impact"
-msgstr "Domains may be reset, platform may become unbootable, or the platform may be powered down.\nPlease consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8004-EC.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8004-FR
-# keys: fault.chassis.power.power-off
-#
-msgid "SCF-8004-FR.type"
-msgstr "Fault"
-msgid "SCF-8004-FR.severity"
-msgstr "Critical"
-msgid "SCF-8004-FR.description"
-msgstr "An attempt to power-off a FRU or a device has failed during a power-off sequence. \nPlease consult the detail section of the knowledge article for additional information.\n Refer to %s for more information."
-msgid "SCF-8004-FR.response"
-msgstr "The poweroff sequence continues. The FRU or device will be deconfigured and will\nnot be powered up during the next power-on sequence. Please consult the detail section \nof the knowledge article for additional information.\n"
-msgid "SCF-8004-FR.impact"
-msgstr "Platform may become unbootable. Please consult the detail section of the knowledge \narticle for additional information.\n"
-msgid "SCF-8004-FR.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8004-G4
-# keys: fault.chassis.device.fail
-#
-msgid "SCF-8004-G4.type"
-msgstr "Fault"
-msgid "SCF-8004-G4.severity"
-msgstr "Critical"
-msgid "SCF-8004-G4.description"
-msgstr "A component in a FRU has signaled it has failed. Please consult the detail section of \nthe knowledge article for additional information.\n Refer to %s for more information."
-msgid "SCF-8004-G4.response"
-msgstr "The component in the FRU will be deconfigured (which may cause the FRU to be deconfigured). Please \nconsult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8004-G4.impact"
-msgstr "Domains may be reset, the platform may become unbootable, or the platform may be powered down.\nPlease consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8004-G4.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8004-HY
-# keys: fault.chassis.device.misconfig
-#
-msgid "SCF-8004-HY.type"
-msgstr "Fault"
-msgid "SCF-8004-HY.severity"
-msgstr "Critical"
-msgid "SCF-8004-HY.description"
-msgstr "An misconfigured FRU or device has been detected during powerup. Please consult the detail \nsection of the knowledge article for additional information.\n Refer to %s for more information."
-msgid "SCF-8004-HY.response"
-msgstr "The misconfigured FRU or device will not be powered up. Please consult the detail section of \nthe knowledge article for additional information.\n"
-msgid "SCF-8004-HY.impact"
-msgstr "The misconfigured FRU or device will not be powered up. The platform may not powerup.\nPlease consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8004-HY.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8004-J3
-# keys: fault.chassis.device.missing
-#
-msgid "SCF-8004-J3.type"
-msgstr "Fault"
-msgid "SCF-8004-J3.severity"
-msgstr "Critical"
-msgid "SCF-8004-J3.description"
-msgstr "A FRU or device is missing or could not be detected during powerup. Please consult the detail section \nof the knowledge article for additional information.\n Refer to %s for more information."
-msgid "SCF-8004-J3.response"
-msgstr "If the device is not redundant, powerup of the FRU will be rejected.\nPlease consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8004-J3.impact"
-msgstr "The powerup request for FRU or device may be rejected, or the entire platform may not be powered up.\nPlease consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8004-J3.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8004-KH
-# keys: fault.chassis.device.inserted
-#
-msgid "SCF-8004-KH.type"
-msgstr "Fault"
-msgid "SCF-8004-KH.severity"
-msgstr "Minor"
-msgid "SCF-8004-KH.description"
-msgstr "A FRU's presence was unexpectedly detected. This may be caused by insertion\nof the FRU without following the correct procedure. Please consult the detail section of the \nknowledge article for additional information.\n Refer to %s for more information."
-msgid "SCF-8004-KH.response"
-msgstr "Nothing is deconfigured and no immediate action is taken. The FRU will not be\nconfigured into the system.\n"
-msgid "SCF-8004-KH.impact"
-msgstr "None.\n"
-msgid "SCF-8004-KH.action"
-msgstr "If the FRU was inserted without following correct procedure, please use the\ncorrect procedure. Otherwise, schedule a repair action to replace the affected Field \nReplaceable Unit (FRU), the identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8004-LD
-# keys: fault.chassis.device.removed
-#
-msgid "SCF-8004-LD.type"
-msgstr "Fault"
-msgid "SCF-8004-LD.severity"
-msgstr "Major"
-msgid "SCF-8004-LD.description"
-msgstr "A FRU's presence detect signal has suddenly disappeared. This may be caused\nby removal of the FRU without following the correct procedure.\nPlease consult the detail section of the knowledge article for additional information.\n Refer to %s for more information."
-msgid "SCF-8004-LD.response"
-msgstr "The FRU will be deconfigured. Please consult the detail section of the \nknowledge article for additional information.\n"
-msgid "SCF-8004-LD.impact"
-msgstr "The platform may be reset, or the platform may be powered down, or a domain may be reset.\nPlease consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8004-LD.action"
-msgstr "If the FRU has not been removed without following the correct procedure,\nschedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8004-MP
-# keys: fault.chassis.env.power.loss
-#
-msgid "SCF-8004-MP.type"
-msgstr "Fault"
-msgid "SCF-8004-MP.severity"
-msgstr "Major"
-msgid "SCF-8004-MP.description"
-msgstr "PSU has detected a loss of AC power.\n Refer to %s for more information."
-msgid "SCF-8004-MP.response"
-msgstr "The PSU will be deconfigured. If sufficient operational PSU's remain, the fan speeds of\nall fans will be increased. Please consult the detail section of the knowledge article for \nadditional information.\n"
-msgid "SCF-8004-MP.impact"
-msgstr "If there are insufficient operational PSU's, the platform will be powered down.\nPlease consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8004-MP.action"
-msgstr "The platform administrator should check the AC power connections and schedule a \nservice action, if necessary. Please consult the detail section of the knowledge article \nfor additional information.\n"
-#
-# code: SCF-8004-NA
-# keys: fault.chassis.env.power.ups
-#
-msgid "SCF-8004-NA.type"
-msgstr "Fault"
-msgid "SCF-8004-NA.severity"
-msgstr "Major"
-msgid "SCF-8004-NA.description"
-msgstr "Problems have been detected with an external UPS.\n Refer to %s for more information."
-msgid "SCF-8004-NA.response"
-msgstr "Nothing is deconfigured and no immediate action is taken.\n"
-msgid "SCF-8004-NA.impact"
-msgstr "None.\n"
-msgid "SCF-8004-NA.action"
-msgstr "The platform administrator should investigate the UPS.\n"
-#
-# code: SCF-8004-Q5
-# keys: fault.chassis.SPARC-Enterprise.rci
-#
-msgid "SCF-8004-Q5.type"
-msgstr "Fault"
-msgid "SCF-8004-Q5.severity"
-msgstr "Critical"
-msgid "SCF-8004-Q5.description"
-msgstr "Error detected by an RCI device on the RCI Network.\n Refer to %s for more information."
-msgid "SCF-8004-Q5.response"
-msgstr "Nothing is deconfigured. The entire system may be powered down or there may be no \ncommunication with RCI devices. Please consult the detail section of the knowledge article \nfor additional information.\n"
-msgid "SCF-8004-Q5.impact"
-msgstr "The entire system may be powered down or there may be no communication with RCI devices.\nPlease consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8004-Q5.action"
-msgstr "The platform administrator should use the output of the showlogs command to determine\nwhat type of service action is necessary. Please consult the detail section of the knowledge\narticle for additional information.\n"
-#
-# code: SCF-8005-0C
-# keys: fault.chassis.SPARC-Enterprise.asic.sc.fe-multicmu
-#
-msgid "SCF-8005-0C.type"
-msgstr "Fault"
-msgid "SCF-8005-0C.severity"
-msgstr "Critical"
-msgid "SCF-8005-0C.description"
-msgstr "A fatal error was detected within a SC chip. This error may affect multiple CMU's.\n Refer to %s for more information."
-msgid "SCF-8005-0C.response"
-msgstr "The CMU that contains this SC chip and all its associated IO are deconfigured.\n"
-msgid "SCF-8005-0C.impact"
-msgstr "One or more domains are reset. Please consult the detail section of the knowledge article for \nadditional information.\n"
-msgid "SCF-8005-0C.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8005-1Q
-# keys: fault.chassis.SPARC-Enterprise.if.fe-cpu-sc
-#
-msgid "SCF-8005-1Q.type"
-msgstr "Fault"
-msgid "SCF-8005-1Q.severity"
-msgstr "Critical"
-msgid "SCF-8005-1Q.description"
-msgstr "A fatal error occurred on the interface between a CPU chip and a SC chip.\n Refer to %s for more information."
-msgid "SCF-8005-1Q.response"
-msgstr "The CPU chip is deconfigured.\n"
-msgid "SCF-8005-1Q.impact"
-msgstr "The single domain using the CPU chip is reset.\n"
-msgid "SCF-8005-1Q.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8005-24
-# keys: fault.chassis.SPARC-Enterprise.if.fe-sc-cpu
-#
-msgid "SCF-8005-24.type"
-msgstr "Fault"
-msgid "SCF-8005-24.severity"
-msgstr "Critical"
-msgid "SCF-8005-24.description"
-msgstr "A fatal error occurred on the interface between a SC chip and a CPU chip.\n Refer to %s for more information."
-msgid "SCF-8005-24.response"
-msgstr "The CPU chip is deconfigured.\n"
-msgid "SCF-8005-24.impact"
-msgstr "The single domain using the CPU chip is reset.\n"
-msgid "SCF-8005-24.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8005-3R
-# keys: fault.chassis.SPARC-Enterprise.if.fe-sc-xb
-#
-msgid "SCF-8005-3R.type"
-msgstr "Fault"
-msgid "SCF-8005-3R.severity"
-msgstr "Critical"
-msgid "SCF-8005-3R.description"
-msgstr "A fatal error occurred on the interface between a SC chip and a XB chip.\n Refer to %s for more information."
-msgid "SCF-8005-3R.response"
-msgstr "The CMU containing the SC chip along with all its associated IO is deconfigured.\n"
-msgid "SCF-8005-3R.impact"
-msgstr "All domains using the CMU are reset.\n"
-msgid "SCF-8005-3R.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8005-5X
-# keys: fault.chassis.SPARC-Enterprise.if.fe-mac-sc
-#
-msgid "SCF-8005-5X.type"
-msgstr "Fault"
-msgid "SCF-8005-5X.severity"
-msgstr "Critical"
-msgid "SCF-8005-5X.description"
-msgstr "A fatal error occurred on the interface between a MAC chip and a SC chip.\n Refer to %s for more information."
-msgid "SCF-8005-5X.response"
-msgstr "Memory associated with the MAC chip is deconfigured.\n"
-msgid "SCF-8005-5X.impact"
-msgstr "One or more domains will be reset. Please consult the detail section of the knowledge \narticle for additional information.\n"
-msgid "SCF-8005-5X.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8005-6E
-# keys: fault.chassis.SPARC-Enterprise.if.fe-sc-mac
-#
-msgid "SCF-8005-6E.type"
-msgstr "Fault"
-msgid "SCF-8005-6E.severity"
-msgstr "Critical"
-msgid "SCF-8005-6E.description"
-msgstr "A fatal error occurred on the interface between a SC chip and a MAC chip.\n Refer to %s for more information."
-msgid "SCF-8005-6E.response"
-msgstr "Memory associated with the MAC chip is deconfigured.\n"
-msgid "SCF-8005-6E.impact"
-msgstr "One or more domains will be reset. Please consult the detail section of the knowledge \narticle for additional information.\n"
-msgid "SCF-8005-6E.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8005-7J
-# keys: fault.chassis.SPARC-Enterprise.if.fe-macbank-sc
-#
-msgid "SCF-8005-7J.type"
-msgstr "Fault"
-msgid "SCF-8005-7J.severity"
-msgstr "Critical"
-msgid "SCF-8005-7J.description"
-msgstr "A fatal error occurred on the interface between a SC chip and the portion of the MAC chip \ninterfaces with a single memory bank.\n Refer to %s for more information."
-msgid "SCF-8005-7J.response"
-msgstr "Memory associated with the memory bank is deconfigured.\n"
-msgid "SCF-8005-7J.impact"
-msgstr "One or more domains will be reset. Please consult the detail section of the knowledge \narticle for additional information.\n"
-msgid "SCF-8005-7J.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8005-8S
-# keys: fault.chassis.SPARC-Enterprise.if.fe-ioc-sc
-#
-msgid "SCF-8005-8S.type"
-msgstr "Fault"
-msgid "SCF-8005-8S.severity"
-msgstr "Critical"
-msgid "SCF-8005-8S.description"
-msgstr "A fatal error occurred on the interface between an IO Channel and a SC chip.\n Refer to %s for more information."
-msgid "SCF-8005-8S.response"
-msgstr "The IO Channel is deconfigured.\n"
-msgid "SCF-8005-8S.impact"
-msgstr "The domain that is using the IO Channel is reset.\n"
-msgid "SCF-8005-8S.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8005-95
-# keys: fault.chassis.SPARC-Enterprise.if.fe-sc-ioc
-#
-msgid "SCF-8005-95.type"
-msgstr "Fault"
-msgid "SCF-8005-95.severity"
-msgstr "Critical"
-msgid "SCF-8005-95.description"
-msgstr "A fatal error occurred on the interface between a SC chip and an IO Channel.\n Refer to %s for more information."
-msgid "SCF-8005-95.response"
-msgstr "The IO Channel is deconfigured.\n"
-msgid "SCF-8005-95.impact"
-msgstr "The domain that is using the IO Channel is reset.\n"
-msgid "SCF-8005-95.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8005-AP
-# keys: fault.chassis.SPARC-Enterprise.if.fe-sc-sc
-#
-msgid "SCF-8005-AP.type"
-msgstr "Fault"
-msgid "SCF-8005-AP.severity"
-msgstr "Critical"
-msgid "SCF-8005-AP.description"
-msgstr "A fatal error on the interface between two SC chips has occurred.\n Refer to %s for more information."
-msgid "SCF-8005-AP.response"
-msgstr "Some number of CPU chips, some number of MAC chips, and some amount of IO will be deconfigured.\nThe platform may become unbootable. Please consult the detail section of the knowledge article for \nadditional information.\n"
-msgid "SCF-8005-AP.impact"
-msgstr "One or more domains will be reset. The platform may become unbootable. \nPlease consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8005-AP.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8005-CA
-# keys: fault.chassis.SPARC-Enterprise.asic.sc.fe
-#
-msgid "SCF-8005-CA.type"
-msgstr "Fault"
-msgid "SCF-8005-CA.severity"
-msgstr "Critical"
-msgid "SCF-8005-CA.description"
-msgstr "A fatal error was detected within a SC chip.\n Refer to %s for more information."
-msgid "SCF-8005-CA.response"
-msgstr "Some number of CPU chips, some number of MAC chips, and some amount of IO will be deconfigured.\nThe platform may become unbootable. Please consult the detail section of the knowledge article for \nadditional information.\n"
-msgid "SCF-8005-CA.impact"
-msgstr "One or more domains will be reset. The platform may become unbootable. Please consult the \ndetail section of the knowledge article for additional information.\n"
-msgid "SCF-8005-CA.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8005-DH
-# keys: fault.chassis.SPARC-Enterprise.asic.sc.se
-#
-msgid "SCF-8005-DH.type"
-msgstr "Fault"
-msgid "SCF-8005-DH.severity"
-msgstr "Critical"
-msgid "SCF-8005-DH.description"
-msgstr "A non-fatal uncorrectable error was detected within a SC chip.\n Refer to %s for more information."
-msgid "SCF-8005-DH.response"
-msgstr "Nothing is deconfigured.\n"
-msgid "SCF-8005-DH.impact"
-msgstr "No immediate action is taken as a result of this fault. The domain may not\nbe operational. Please consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8005-DH.action"
-msgstr "The platform administrator should investigate and see if there is some other\nhardware fault that might possibly be related to this fault.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8005-ED
-# keys: fault.chassis.SPARC-Enterprise.if.ce-cpu-sc
-#
-msgid "SCF-8005-ED.type"
-msgstr "Fault"
-msgid "SCF-8005-ED.severity"
-msgstr "Minor"
-msgid "SCF-8005-ED.description"
-msgstr "The number of correctable errors on the interface between a CPU chip and a SC chip \nhas exceeded an acceptable threshold.\n Refer to %s for more information."
-msgid "SCF-8005-ED.response"
-msgstr "The CPU chip is deconfigured after the platform is power cycled or \nafter the domain reboots or after a Dynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8005-ED.impact"
-msgstr "No immediate impact. The CPU chip is deconfigured after the platform is power cycled or \nafter the domain reboots or after a Dynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8005-ED.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8005-FY
-# keys: fault.chassis.SPARC-Enterprise.if.ce-sc-xb
-#
-msgid "SCF-8005-FY.type"
-msgstr "Fault"
-msgid "SCF-8005-FY.severity"
-msgstr "Major"
-msgid "SCF-8005-FY.description"
-msgstr "The number of correctable errors on the interface between a SC chip and a XB chip \nhas exceeded an acceptable threshold.\n Refer to %s for more information."
-msgid "SCF-8005-FY.response"
-msgstr "The CMU and all its associated IO are deconfigured after the platform is power cycled or \nafter the domains using the CMU reboot or after a Dynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8005-FY.impact"
-msgstr "No immediate impact. The CMU and all its associated IO are deconfigured after the platform is power \ncycled or after the domains using the CMU reboot or after a Dynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8005-FY.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8005-G3
-# keys: fault.chassis.SPARC-Enterprise.if.ce-mac-sc
-#
-msgid "SCF-8005-G3.type"
-msgstr "Fault"
-msgid "SCF-8005-G3.severity"
-msgstr "Minor"
-msgid "SCF-8005-G3.description"
-msgstr "The number of correctable errors on the interface between a MAC chip and a SC chip\nhas exceeded an acceptable threshold.\n Refer to %s for more information."
-msgid "SCF-8005-G3.response"
-msgstr "Memory associated with the MAC is deconfigured after the platform is power cycled or \nafter the domain reboots or after a Dynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8005-G3.impact"
-msgstr "No immediate impact. Memory associated with the MAC is deconfigured after the platform is power \ncycled or after the domain reboots or after a Dynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8005-G3.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8005-HR
-# keys: fault.chassis.SPARC-Enterprise.if.ce-ioc-sc
-#
-msgid "SCF-8005-HR.type"
-msgstr "Fault"
-msgid "SCF-8005-HR.severity"
-msgstr "Major"
-msgid "SCF-8005-HR.description"
-msgstr "The number of correctable errors on the interface between an IO Channel and a SC chip \nhas exceeded an acceptable threshold.\n Refer to %s for more information."
-msgid "SCF-8005-HR.response"
-msgstr "The IO Channel is deconfigured after the platform is power cycled or after the domain reboots or after a \nDynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8005-HR.impact"
-msgstr "No immediate impact. The IO Channel is deconfigured after the platform is power cycled or after the domain \nreboots or after a Dynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8005-HR.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8005-J4
-# keys: fault.chassis.SPARC-Enterprise.if.ce-sc-sc
-#
-msgid "SCF-8005-J4.type"
-msgstr "Fault"
-msgid "SCF-8005-J4.severity"
-msgstr "Critical"
-msgid "SCF-8005-J4.description"
-msgstr "The number of correctable errors on the interface between two SC chips has exceeded an acceptable threshold.\n Refer to %s for more information."
-msgid "SCF-8005-J4.response"
-msgstr "Some resources associated with the SC chips (CPU chips, memory, IO Channels) will be deconfigured\nafter the platform is power cycled or after the domain reboots or after a Dynamic Reconfiguration operation is performed.\nThe platform may become unbootable. Please consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8005-J4.impact"
-msgstr "No immediate impact. Some resources associated with the SC chips (CPU chips, memory, IO Channels) will be deconfigured\nafter the platform is power cycled or after the domain reboots or after a Dynamic Reconfiguration operation is performed.\nThe platform may become unbootable. Please consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8005-J4.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8005-KQ
-# keys: fault.chassis.SPARC-Enterprise.asic.sc.ce
-#
-msgid "SCF-8005-KQ.type"
-msgstr "Fault"
-msgid "SCF-8005-KQ.severity"
-msgstr "Critical"
-msgid "SCF-8005-KQ.description"
-msgstr "The number of correctable errors detected within a SC chip has exceeded an acceptable threshold.\n Refer to %s for more information."
-msgid "SCF-8005-KQ.response"
-msgstr "Some resources associated with the SC chip (CPU chips, memory, IO Channels) will be deconfigured\nafter the platform is power cycled or after the domain reboots or after a Dynamic Reconfiguration operation is performed.\nThe platform may become unbootable. Please consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8005-KQ.impact"
-msgstr "No immediate impact. Some resources associated with the SC chip (CPU chips, memory, IO Channels) will be deconfigured\nafter the platform is power cycled or after the domain reboots or after a Dynamic Reconfiguration operation is performed.\nThe platform may become unbootable. Please consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8005-KQ.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8005-LC
-# keys: fault.chassis.SPARC-Enterprise.asic.sc.ce-l2tagcpu
-#
-msgid "SCF-8005-LC.type"
-msgstr "Fault"
-msgid "SCF-8005-LC.severity"
-msgstr "Minor"
-msgid "SCF-8005-LC.description"
-msgstr "The number of correctable errors within the L2 cache tags of a SC chip has exceeded an acceptable threshold.\n Refer to %s for more information."
-msgid "SCF-8005-LC.response"
-msgstr "One of the L2 cache ways is deconfigured for all the CPU chips associated with this SC chip.\n"
-msgid "SCF-8005-LC.impact"
-msgstr "The domain is unaffected, except for the performance of the CPU chips.\n"
-msgid "SCF-8005-LC.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8005-MJ
-# keys: fault.chassis.SPARC-Enterprise.asic.sc.test
-#
-msgid "SCF-8005-MJ.type"
-msgstr "Fault"
-msgid "SCF-8005-MJ.severity"
-msgstr "Critical"
-msgid "SCF-8005-MJ.description"
-msgstr "Self-test error detected within a SC chip or a SC chip interface to another chip.\n Refer to %s for more information."
-msgid "SCF-8005-MJ.response"
-msgstr "Some number of CPU chips, some number of MAC chips, and some amount of IO will be deconfigured.\nThe platform may become unbootable. Please consult the detail section of the knowledge article for \nadditional information.\n"
-msgid "SCF-8005-MJ.impact"
-msgstr "Running domains are unaffected by this fault, as this occurs during self-test. The\nplatform may become unbootable. Please consult the detail section of the knowledge article for \nadditional information.\n"
-msgid "SCF-8005-MJ.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8005-NE
-# keys: defect.chassis.software
-#
-msgid "SCF-8005-NE.type"
-msgstr "Defect"
-msgid "SCF-8005-NE.severity"
-msgstr "Major"
-msgid "SCF-8005-NE.description"
-msgstr "An XSCF firmware process has unexpectedly terminated. \n Refer to %s for more information."
-msgid "SCF-8005-NE.response"
-msgstr "The XSCF firmware will be rebooted.\n"
-msgid "SCF-8005-NE.impact"
-msgstr "XSCF functionality will be unavailable until the XSCF has restarted.\n"
-msgid "SCF-8005-NE.action"
-msgstr "Schedule a repair action to upgrade the XCP firmware. Please consult the detail section \nof the knowledge article for additional information.\n"
-#
-# code: SCF-8005-PX
-# keys: upset.chassis.domain.panic
-#
-msgid "SCF-8005-PX.type"
-msgstr "Upset"
-msgid "SCF-8005-PX.severity"
-msgstr "Major"
-msgid "SCF-8005-PX.description"
-msgstr "The XSCF has detected that an illumos domain has panic'ed.\n Refer to %s for more information."
-msgid "SCF-8005-PX.response"
-msgstr "No action is taken due to this fault.\n"
-msgid "SCF-8005-PX.impact"
-msgstr "The illumos domain has panic'ed.\n"
-msgid "SCF-8005-PX.action"
-msgstr "The administrator should look at the domain's console to identify the cause of the panic.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8005-Q2
-# keys: upset.chassis.domain.config
-#
-msgid "SCF-8005-Q2.type"
-msgstr "Upset"
-msgid "SCF-8005-Q2.severity"
-msgstr "Major"
-msgid "SCF-8005-Q2.description"
-msgstr "The XSB could not be successfully configured into a domain.\n Refer to %s for more information."
-msgid "SCF-8005-Q2.response"
-msgstr "Nothing is deconfigured.\n"
-msgid "SCF-8005-Q2.impact"
-msgstr "XSB is not successfully configured into a domain.\n"
-msgid "SCF-8005-Q2.action"
-msgstr "The platform administrator should investigate why the XSB could not be configured \ninto the domain. Please consult the detail section of the knowledge article for additional \ninformation.\n"
-#
-# code: SCF-8005-RA
-# keys: upset.chassis.domain.post
-#
-msgid "SCF-8005-RA.type"
-msgstr "Upset"
-msgid "SCF-8005-RA.severity"
-msgstr "Major"
-msgid "SCF-8005-RA.description"
-msgstr "The XSCF could not determine whether POST is running correctly on a domain/XSB.\n Refer to %s for more information."
-msgid "SCF-8005-RA.response"
-msgstr "Nothing is deconfigured.\n"
-msgid "SCF-8005-RA.impact"
-msgstr "The domain or the XSB will be powered down.\n"
-msgid "SCF-8005-RA.action"
-msgstr "The platform administrator should check for some sort of fault that could have\ncaused this failure. Please consult the detail section of the knowledge article for additional \ninformation.\n"
-#
-# code: SCF-8005-SP
-# keys: upset.chassis.domain.keepalive.msg-fail
-#
-msgid "SCF-8005-SP.type"
-msgstr "Upset"
-msgid "SCF-8005-SP.severity"
-msgstr "Major"
-msgid "SCF-8005-SP.description"
-msgstr "Domain does not respond to XSCF keep-alive messages.\n Refer to %s for more information."
-msgid "SCF-8005-SP.response"
-msgstr "The XSCF will send a message to the domain asking it to panic.\n"
-msgid "SCF-8005-SP.impact"
-msgstr "The XSCF will send a message to the domain asking it to panic.\n"
-msgid "SCF-8005-SP.action"
-msgstr "To investigate potential hardware problems, the platform administrator should\nlook at the fault logs on the XSCF to determine if there is some other hardware\nproblem that may be causing the upset. Please consult the detail section of \nthe knowledge article for additional information.\n"
-#
-# code: SCF-8005-T5
-# keys: upset.chassis.domain.tty-overflow
-#
-msgid "SCF-8005-T5.type"
-msgstr "Upset"
-msgid "SCF-8005-T5.severity"
-msgstr "Minor"
-msgid "SCF-8005-T5.description"
-msgstr "TTY buffer for a domain overflowed, resulting in lost domain console data.\n Refer to %s for more information."
-msgid "SCF-8005-T5.response"
-msgstr "No action is taken as a result of this fault.\n"
-msgid "SCF-8005-T5.impact"
-msgstr "Domain console data is lost.\n"
-msgid "SCF-8005-T5.action"
-msgstr "None. Please consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8005-US
-# keys: upset.chassis.domain.keepalive.panic-fail
-#
-msgid "SCF-8005-US.type"
-msgstr "Upset"
-msgid "SCF-8005-US.severity"
-msgstr "Major"
-msgid "SCF-8005-US.description"
-msgstr "Domain did not respond to an XSCF request for it to panic.\n Refer to %s for more information."
-msgid "SCF-8005-US.response"
-msgstr "The XSCF will send an XIR interrupt to the domain.\n"
-msgid "SCF-8005-US.impact"
-msgstr "The XSCF will send an XIR interrupt to the domain.\n"
-msgid "SCF-8005-US.action"
-msgstr "The platform administrator should look at the fault logs on the XSCF to determine if there is \nsome hardware problem that may be causing the upset. Please consult the detail section of \nthe knowledge article for additional information.\n"
-#
-# code: SCF-8005-V3
-# keys: upset.chassis.domain.keepalive.xir-fail
-#
-msgid "SCF-8005-V3.type"
-msgstr "Upset"
-msgid "SCF-8005-V3.severity"
-msgstr "Major"
-msgid "SCF-8005-V3.description"
-msgstr "Domain did not respond to an XIR interrupt sent by the XSCF.\n Refer to %s for more information."
-msgid "SCF-8005-V3.response"
-msgstr "The XSCF will attempt to reset the domain.\n"
-msgid "SCF-8005-V3.impact"
-msgstr "The XSCF will attempt to reset the domain.\n"
-msgid "SCF-8005-V3.action"
-msgstr "The platform administrator should look at the fault logs on the XSCF to determine if there is \nsome hardware problem that may be causing the upset. Please consult the detail section of \nthe knowledge article for additional information.\n"
-#
-# code: SCF-8005-WY
-# keys: upset.chassis.domain.keepalive.reset-fail
-#
-msgid "SCF-8005-WY.type"
-msgstr "Upset"
-msgid "SCF-8005-WY.severity"
-msgstr "Major"
-msgid "SCF-8005-WY.description"
-msgstr "Domain does not respond to the XSCF's request to reset itself.\n Refer to %s for more information."
-msgid "SCF-8005-WY.response"
-msgstr "The XSCF will power the domain down.\n"
-msgid "SCF-8005-WY.impact"
-msgstr "The XSCF will power the domain down.\n"
-msgid "SCF-8005-WY.action"
-msgstr "The platform administrator should look at the fault logs on the XSCF to determine if there is \nsome hardware problem that may be causing the upset. Please consult the detail section of \nthe knowledge article for additional information.\n"
-#
-# code: SCF-8005-YH
-# keys: fault.chassis.device.fan.tooslow
-#
-msgid "SCF-8005-YH.type"
-msgstr "Fault"
-msgid "SCF-8005-YH.severity"
-msgstr "Major"
-msgid "SCF-8005-YH.description"
-msgstr "The fan rotation speed for a fan is lower is than its predefined threshold or a fan \nhas stopped completely.\n Refer to %s for more information."
-msgid "SCF-8005-YH.response"
-msgstr "If there are sufficient fans to maintain normal operation, fan speeds for fans on the \nrest of the platform are raised. If there are insufficient fans to maintain normal\noperation, domains are requested to shut down.\n"
-msgid "SCF-8005-YH.impact"
-msgstr "If there are insufficient fans to maintain normal operation, domains are sent shutdown requests.\nIf the fan is in a PSU, the PSU is deconfigured.\n"
-msgid "SCF-8005-YH.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8006-02
-# keys: fault.chassis.device.fan.speedchange
-#
-msgid "SCF-8006-02.type"
-msgstr "Fault"
-msgid "SCF-8006-02.severity"
-msgstr "Minor"
-msgid "SCF-8006-02.description"
-msgstr "Fan rotation speed either dropped below a threshold or rose above a threshold during fan speed change\ntesting.\n Refer to %s for more information."
-msgid "SCF-8006-02.response"
-msgstr "Nothing is deconfigured.\n"
-msgid "SCF-8006-02.impact"
-msgstr "No action is taken.\n"
-msgid "SCF-8006-02.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8006-1X
-# keys: fault.chassis.env.temp.under
-#
-msgid "SCF-8006-1X.type"
-msgstr "Fault"
-msgid "SCF-8006-1X.severity"
-msgstr "Critical"
-msgid "SCF-8006-1X.description"
-msgstr "Under temperature condition detected by the inlet temperature sensor.\n Refer to %s for more information."
-msgid "SCF-8006-1X.response"
-msgstr "Nothing is deconfigured.\n"
-msgid "SCF-8006-1X.impact"
-msgstr "System may crash due to ASIC's operating outside their intended temperature ranges.\n"
-msgid "SCF-8006-1X.action"
-msgstr "The platform administrator should check for the cause of the under temperature condition.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8006-2E
-# keys: fault.chassis.env.temp.over
-#
-msgid "SCF-8006-2E.type"
-msgstr "Fault"
-msgid "SCF-8006-2E.severity"
-msgstr "Major"
-msgid "SCF-8006-2E.description"
-msgstr "Over-temperature condition detected by an inlet temperature sensor, exhaust temperature sensor, \nor CPU temperature sensor.\n Refer to %s for more information."
-msgid "SCF-8006-2E.response"
-msgstr "Fan speed will be raised for all fans on the platform.\n"
-msgid "SCF-8006-2E.impact"
-msgstr "No immediate impact.\n"
-msgid "SCF-8006-2E.action"
-msgstr "Platform administrator should investigate the cause of the over-temperature condition.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8006-3J
-# keys: fault.chassis.env.temp.over-warn
-#
-msgid "SCF-8006-3J.type"
-msgstr "Fault"
-msgid "SCF-8006-3J.severity"
-msgstr "Critical"
-msgid "SCF-8006-3J.description"
-msgstr "Over-temperature warning condition has been detected by inlet temperature sensor, exhaust temperature \nsensor, or CPU temperature sensor.\n Refer to %s for more information."
-msgid "SCF-8006-3J.response"
-msgstr "Fan speed will be raised for all fans on the platform. Shutdown messages will be sent to \ndomains on the platform.\n"
-msgid "SCF-8006-3J.impact"
-msgstr "Shutdown messages will be sent to domains on the platform.\n"
-msgid "SCF-8006-3J.action"
-msgstr "Platform administrator should investigate the cause of the over-temperature condition.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8006-4C
-# keys: fault.chassis.env.temp.over-fail
-#
-msgid "SCF-8006-4C.type"
-msgstr "Fault"
-msgid "SCF-8006-4C.severity"
-msgstr "Critical"
-msgid "SCF-8006-4C.description"
-msgstr "Dangerous over-temperature condition detected by an exhaust temperature sensor or CPU \ntemperature sensor.\n Refer to %s for more information."
-msgid "SCF-8006-4C.response"
-msgstr "Nothing is deconfigured. Either the platform will be powered down or specific domains will \nbe powered down. Please consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8006-4C.impact"
-msgstr "Either the platform will be powered down or specific domains will be powered down.\nPlease consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8006-4C.action"
-msgstr "Platform administrator should investigate the cause of the over-temperature condition.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8006-9D
-# keys: fault.chassis.SPARC-Enterprise.if.fe-ioc-xb
-#
-msgid "SCF-8006-9D.type"
-msgstr "Fault"
-msgid "SCF-8006-9D.severity"
-msgstr "Critical"
-msgid "SCF-8006-9D.description"
-msgstr "A fatal error occurred on an interface between a XB chip and an IOC chip.\n Refer to %s for more information."
-msgid "SCF-8006-9D.response"
-msgstr "Either the entire IOC chip or a single IO Channel will be deconfigured,\ndepending upon whether a crossbar way was deconfigured prior to the fault.\nPlease consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8006-9D.impact"
-msgstr "One or two domains will be reset, depending upon whether a crossbar way was deconfigured\nprior to the fault. Please consult the detail section of the knowledge article for additional \ninformation.\n"
-msgid "SCF-8006-9D.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8006-AY
-# keys: fault.chassis.SPARC-Enterprise.if.fe-xb-ioc
-#
-msgid "SCF-8006-AY.type"
-msgstr "Fault"
-msgid "SCF-8006-AY.severity"
-msgstr "Critical"
-msgid "SCF-8006-AY.description"
-msgstr "A fatal error has occurred on an interface between a SC chip and an IOC chip,\nvia an XB chip.\n Refer to %s for more information."
-msgid "SCF-8006-AY.response"
-msgstr "Either the entire IOC chip or a single IO Channel will be deconfigured depending upon whether a \ncrossbar way was deconfigured prior to the fault. Please consult the detail section of the \nknowledge article for additional information.\n"
-msgid "SCF-8006-AY.impact"
-msgstr "One or two domains will be reset, depending upon whether a crossbar way was deconfigured\nprior to the fault. Please consult the detail section of the knowledge article for additional \ninformation.\n"
-msgid "SCF-8006-AY.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8006-C3
-# keys: fault.chassis.SPARC-Enterprise.if.fe-xb-xbucable
-#
-msgid "SCF-8006-C3.type"
-msgstr "Fault"
-msgid "SCF-8006-C3.severity"
-msgstr "Major"
-msgid "SCF-8006-C3.description"
-msgstr "A fatal error has been detected on the cable interface between two XBU's.\n Refer to %s for more information."
-msgid "SCF-8006-C3.response"
-msgstr "If a crossbar way has been deconfigured, the platform is powered down. Otherwise,\na crossbar way is deconfigured. Please consult the detail section of the knowledge \narticle for additional information.\n"
-msgid "SCF-8006-C3.impact"
-msgstr "The entire platform is reset. If a crossbar way has been deconfigured, the platform is \npowered down. Otherwise, a crossbar way is deconfigured and the platform continues\nto operate with reduced performance. Please consult the detail section of the \nknowledge article for additional information.\n"
-msgid "SCF-8006-C3.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8006-DS
-# keys: fault.chassis.SPARC-Enterprise.if.fe-xb-xb
-#
-msgid "SCF-8006-DS.type"
-msgstr "Fault"
-msgid "SCF-8006-DS.severity"
-msgstr "Critical"
-msgid "SCF-8006-DS.description"
-msgstr "A fatal error has been detected on the interface between two XB chips.\n Refer to %s for more information."
-msgid "SCF-8006-DS.response"
-msgstr "If the fault can be isolated to a CMU, the CMU and all its associated IO are deconfigured. \nIf the fault cannot be isolated to a single CMU, if a crossbar way has been deconfigured, the platform \nis powered down. Otherwise, a crossbar way is deconfigured and the platform continues to operate with \nreduced performance. Please consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8006-DS.impact"
-msgstr "If the fault can be isolated to a CMU, then one or more domains are reset and the CMU and all\nits associated IO are deconfigured. If the fault cannot be isolated to a single CMU, the entire platform is \nreset. If a crossbar way has been deconfigured, the platform is powered down. Otherwise, a crossbar way \nis deconfigured and the platform continues to operate with reduced performance.\nPlease consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8006-DS.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8006-E5
-# keys: upset.chassis.SPARC-Enterprise.if.fe-xb
-#
-msgid "SCF-8006-E5.type"
-msgstr "Upset"
-msgid "SCF-8006-E5.severity"
-msgstr "Critical"
-msgid "SCF-8006-E5.description"
-msgstr "A fatal protocol error detected by a XB chip.\n Refer to %s for more information."
-msgid "SCF-8006-E5.response"
-msgstr "Nothing is deconfigured.\n"
-msgid "SCF-8006-E5.impact"
-msgstr "The entire platform is reset.\n"
-msgid "SCF-8006-E5.action"
-msgstr "The component that is at fault is difficult to determine.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8006-FP
-# keys: fault.chassis.SPARC-Enterprise.asic.xb.fe
-#
-msgid "SCF-8006-FP.type"
-msgstr "Fault"
-msgid "SCF-8006-FP.severity"
-msgstr "Critical"
-msgid "SCF-8006-FP.description"
-msgstr "A fatal error was detected within a XB chip.\n Refer to %s for more information."
-msgid "SCF-8006-FP.response"
-msgstr "Depending upon which part of the XB chip is faulty, either a crossbar way is deconfigured,\nor a CMU and all its associated IO are deconfigured, or an IOC chip is deconfigured,\nor an IO Channel within an IOC chip is deconfigured. Please consult the detail section of the \nknowledge article for additional information.\n"
-msgid "SCF-8006-FP.impact"
-msgstr "Depending upon which part of the XB chip is faulty, either the entire platform is\nreset, or one or more domains are reset. If the response includes deconfiguring a crossbar\nway and this is the first crossbar way to be deconfigured, the platform will operate\nwith reduced performance. If the response includes deconfiguring a crossbar way\nand a crossbar way has already been deconfigured, the platform is powered down.\nPlease consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8006-FP.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8006-GA
-# keys: fault.chassis.SPARC-Enterprise.if.ce-ioc-xb
-#
-msgid "SCF-8006-GA.type"
-msgstr "Fault"
-msgid "SCF-8006-GA.severity"
-msgstr "Major"
-msgid "SCF-8006-GA.description"
-msgstr "The number of correctable errors on the interface between an XB chip and an IOC chip\nhas exceeded an acceptable threshold.\n Refer to %s for more information."
-msgid "SCF-8006-GA.response"
-msgstr "Depending upon whether a crossbar way has already been deconfigured, either an IOC chip or an\nIOC channel will be deconfigured after the platform is power cycled or \nafter the domain reboots or after a Dynamic Reconfiguration operation is performed.\nPlease consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8006-GA.impact"
-msgstr "No immediate impact. Depending upon whether a crossbar way has already been deconfigured, either an IOC \nchip or an IOC channel will be deconfigured after the platform is power cycled or \nafter the domain reboots or after a Dynamic Reconfiguration operation is performed.\nPlease consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8006-GA.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8006-HJ
-# keys: fault.chassis.SPARC-Enterprise.if.ce-xb-xbucable
-#
-msgid "SCF-8006-HJ.type"
-msgstr "Fault"
-msgid "SCF-8006-HJ.severity"
-msgstr "Major"
-msgid "SCF-8006-HJ.description"
-msgstr "The number of correctable errors on the interface between two XB chips communicating\nover an XBU cable has exceeded an acceptable threshold.\n Refer to %s for more information."
-msgid "SCF-8006-HJ.response"
-msgstr "The crossbar way is deconfigured the next time the platform is restarted. If this is the\nfirst crossbar way to be deconfigured, the platform will operate with reduced performance.\nIf a crossbar way has already been deconfigured, the platform will be powered down.\nPlease consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8006-HJ.impact"
-msgstr "No immediate impact. The crossbar way is deconfigured the next time the platform is restarted. \nIf this is the first crossbar way to be deconfigured, the platform will operate with reduced \nperformance. If a crossbar way has already been deconfigured, the platform will be powered down.\nPlease consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8006-HJ.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8006-JE
-# keys: fault.chassis.SPARC-Enterprise.if.ce-xb-xb
-#
-msgid "SCF-8006-JE.type"
-msgstr "Fault"
-msgid "SCF-8006-JE.severity"
-msgstr "Major"
-msgid "SCF-8006-JE.description"
-msgstr "The number of correctable errors on the interface between two XB chips on the same XBU\nhas exceeded an acceptable threshold.\n Refer to %s for more information."
-msgid "SCF-8006-JE.response"
-msgstr "The crossbar way is deconfigured the next time the platform is restarted. If this is the\nfirst crossbar way to be deconfigured, the platform will operate with reduced performance.\nIf a crossbar way has already been deconfigured, the platform will be powered down.\nPlease consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8006-JE.impact"
-msgstr "No immediate impact. The crossbar way is deconfigured the next time the platform is restarted. \nIf this is the first crossbar way to be deconfigured, the platform will operate with reduced \nperformance. If a crossbar way has already been deconfigured, the platform will be powered down.\nPlease consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8006-JE.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8006-KX
-# keys: fault.chassis.SPARC-Enterprise.asic.xb.ce
-#
-msgid "SCF-8006-KX.type"
-msgstr "Fault"
-msgid "SCF-8006-KX.severity"
-msgstr "Major"
-msgid "SCF-8006-KX.description"
-msgstr "The number of correctable errors within a XB chip has exceeded an acceptable threshold.\n Refer to %s for more information."
-msgid "SCF-8006-KX.response"
-msgstr "The crossbar way is deconfigured the next time the platform is restarted. If this is the\nfirst crossbar way to be deconfigured, the platform will operate with reduced performance.\nIf a crossbar way has already been deconfigured, the platform will be powered down.\nPlease consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8006-KX.impact"
-msgstr "No immediate impact. The crossbar way is deconfigured the next time the platform is restarted. \nIf this is the first crossbar way to be deconfigured, the platform will operate with reduced \nperformance. If a crossbar way has already been deconfigured, the platform will be powered down.\nPlease consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8006-KX.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8006-L2
-# keys: fault.chassis.SPARC-Enterprise.asic.xb.test
-#
-msgid "SCF-8006-L2.type"
-msgstr "Fault"
-msgid "SCF-8006-L2.severity"
-msgstr "Major"
-msgid "SCF-8006-L2.description"
-msgstr "Self-test error detected within a XB chip or within the interface of the\nXB chip to another chip.\n Refer to %s for more information."
-msgid "SCF-8006-L2.response"
-msgstr "Depending upon which part of the XB chip is faulty, either a crossbar way is deconfigured,\nor a CMU and all its associated IO are deconfigured, or an IOC chip is deconfigured,\nor an IO Channel within an IOC chip is deconfigured. Please consult the detail section of the \nknowledge article for additional information.\n"
-msgid "SCF-8006-L2.impact"
-msgstr "Depending upon which part of the XB chip is faulty, either the entire platform is\nreset, or one or more domains are reset. If the response includes deconfiguring a crossbar\nway and this is the first crossbar way to be deconfigured, the platform will operate\nwith reduced performance. If the response includes deconfiguring a crossbar way\nand a crossbar way has already been deconfigured, the platform is powered down.\nDomains are not affected, as this fault can only occur while the platform is powering up.\nPlease consult the detail section of the knowledge article for additional information.\n"
-msgid "SCF-8006-L2.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8006-MR
-# keys: fault.chassis.SPARC-Enterprise.asic.xb.fe-multicmu
-#
-msgid "SCF-8006-MR.type"
-msgstr "Fault"
-msgid "SCF-8006-MR.severity"
-msgstr "Critical"
-msgid "SCF-8006-MR.description"
-msgstr "Fatal error detected within a XB chip. This fatal error may affect multiple CMU's.\n Refer to %s for more information."
-msgid "SCF-8006-MR.response"
-msgstr "The CMU and all its associated IO are deconfigured.\n"
-msgid "SCF-8006-MR.impact"
-msgstr "The domains running on the CMU that is deconfigured will be reset. Other\ndomains on the platform may also be reset. The CMU and all its associated \nIO are deconfigured.\n"
-msgid "SCF-8006-MR.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8006-WP
-# keys: fault.chassis.SPARC-Enterprise.xscfu
-#
-msgid "SCF-8006-WP.type"
-msgstr "Fault"
-msgid "SCF-8006-WP.severity"
-msgstr "Major"
-msgid "SCF-8006-WP.description"
-msgstr "Hardware problem detected within an XSCFU.\n Refer to %s for more information."
-msgid "SCF-8006-WP.response"
-msgstr "The platform may become unmanageable. The platform may not be able to reboot. If the configuration\nhas redundant XSCFUs, the XSCF software may fail over to the other XSCFU. If the configuration has\nredundant XSCFUs, XSCFU failover may be disabled. Please consult the detail section of the knowledge \narticle for additional information.\n"
-msgid "SCF-8006-WP.impact"
-msgstr "The domains will continue to run. The platform may become unmanageable. The platform\nmay not be able to reboot. If the configuration has redundant XSCFUs, the XSCF software may\nfail over to the other XSCFU. If the configuration has redundant XSCFUs, XSCFU failover may\nbe disabled. Please consult the detail section of the knowledge article for additional \ninformation.\n"
-msgid "SCF-8006-WP.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8006-X5
-# keys: fault.chassis.device.mismatch
-#
-msgid "SCF-8006-X5.type"
-msgstr "Fault"
-msgid "SCF-8006-X5.severity"
-msgstr "Critical"
-msgid "SCF-8006-X5.description"
-msgstr "The XSCFU_C and XSCFU_B have mismatched board numbers. This problem will only\noccur during platform power-on.\n Refer to %s for more information."
-msgid "SCF-8006-X5.response"
-msgstr "No domains will be allowed to be powered up until the problem is corrected.\n"
-msgid "SCF-8006-X5.impact"
-msgstr "The entire platform is unbootable.\n"
-msgid "SCF-8006-X5.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8006-YS
-# keys: upset.chassis.SPARC-Enterprise.xscfu
-#
-msgid "SCF-8006-YS.type"
-msgstr "upset"
-msgid "SCF-8006-YS.severity"
-msgstr "Minor"
-msgid "SCF-8006-YS.description"
-msgstr "A hard-to-diagnose failure of the XSCF has occurred.\n Refer to %s for more information."
-msgid "SCF-8006-YS.response"
-msgstr "The XSCFU will reboot. If the configuration has redundant XSCFU's, the standby XSCFU \nmay take over as the active XSCFU.\n"
-msgid "SCF-8006-YS.impact"
-msgstr "The XSCFU will reboot. If the configuration has redundant XSCFU's, the standby XSCFU \nmay take over as the active XSCFU. There is no impact to the domains.\n"
-msgid "SCF-8006-YS.action"
-msgstr "Please consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8007-05
-# keys: fault.chassis.SPARC-Enterprise.cpu.SPARC64-VII.fe
-#
-msgid "SCF-8007-05.type"
-msgstr "Fault"
-msgid "SCF-8007-05.severity"
-msgstr "Critical"
-msgid "SCF-8007-05.description"
-msgstr "An internal fatal error within a CPU chip was detected.\n Refer to %s for more information."
-msgid "SCF-8007-05.response"
-msgstr "The domain using this CPU will be reset and the CPU chip will be deconfigured.\n"
-msgid "SCF-8007-05.impact"
-msgstr "The CPU chip will be deconfigured after the domain is reset.\n"
-msgid "SCF-8007-05.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8007-1S
-# keys: fault.chassis.SPARC-Enterprise.cpu.SPARC64-VII.core.fe
-#
-msgid "SCF-8007-1S.type"
-msgstr "Fault"
-msgid "SCF-8007-1S.severity"
-msgstr "Critical"
-msgid "SCF-8007-1S.description"
-msgstr "An internal fatal error within a core on a CPU chip was detected.\n Refer to %s for more information."
-msgid "SCF-8007-1S.response"
-msgstr "The domain using this CPU will be reset and the core will be deconfigured.\n"
-msgid "SCF-8007-1S.impact"
-msgstr "The domain using this CPU chip is reset.\n"
-msgid "SCF-8007-1S.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8007-2A
-# keys: fault.chassis.SPARC-Enterprise.cpu.SPARC64-VII.core.strand.fe
-#
-msgid "SCF-8007-2A.type"
-msgstr "Fault"
-msgid "SCF-8007-2A.severity"
-msgstr "Critical"
-msgid "SCF-8007-2A.description"
-msgstr "An internal fatal error within a strand on a CPU chip was detected.\n Refer to %s for more information."
-msgid "SCF-8007-2A.response"
-msgstr "The domain using this CPU will be reset and the strand will be deconfigured.\n"
-msgid "SCF-8007-2A.impact"
-msgstr "The domain using this CPU chip is reset.\n"
-msgid "SCF-8007-2A.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8007-3P
-# keys: fault.chassis.SPARC-Enterprise.cpu.SPARC64-VII.se
-#
-msgid "SCF-8007-3P.type"
-msgstr "Fault"
-msgid "SCF-8007-3P.severity"
-msgstr "Major"
-msgid "SCF-8007-3P.description"
-msgstr "An internal non-fatal uncorrectable error within a CPU chip has been detected.\n Refer to %s for more information."
-msgid "SCF-8007-3P.response"
-msgstr "The CPU chip will be deconfigured after the platform is power cycled or after the domain reboots \nor after a Dynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8007-3P.impact"
-msgstr "The non-fatal uncorrectable error may cause domain to panic. The CPU chip will be deconfigured after the \nplatform is power cycled or after the domain reboots or after a Dynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8007-3P.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8007-4D
-# keys: fault.chassis.SPARC-Enterprise.cpu.SPARC64-VII.core.se
-#
-msgid "SCF-8007-4D.type"
-msgstr "Fault"
-msgid "SCF-8007-4D.severity"
-msgstr "Major"
-msgid "SCF-8007-4D.description"
-msgstr "A non-fatal uncorrectable error associated with a core on a CPU chip has been detected.\n Refer to %s for more information."
-msgid "SCF-8007-4D.response"
-msgstr "The domain software will attempt to offline the core on the CPU chip.\n"
-msgid "SCF-8007-4D.impact"
-msgstr "The non-fatal uncorrectable error trap may cause the domain to panic. If the domain\ndoes not panic, the domain software will attempt to offline the core on the CPU chip.\nThe core of the CPU chip will be deconfigured after the platform is power cycled or \nafter the domain reboots or after a Dynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8007-4D.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8007-5H
-# keys: fault.chassis.SPARC-Enterprise.cpu.SPARC64-VII.core.se-offlinereq
-#
-msgid "SCF-8007-5H.type"
-msgstr "Fault"
-msgid "SCF-8007-5H.severity"
-msgstr "Major"
-msgid "SCF-8007-5H.description"
-msgstr "When a non-fatal uncorrectable error occurs on a core on a CPU chip, domain software attempts to\noffline the core. This fault occurs when the number of offline attempts has exceeded an\nacceptable threshold.\n Refer to %s for more information."
-msgid "SCF-8007-5H.response"
-msgstr "Future non-fatal uncorrectable errors for this core on a CPU chip will not be recorded on the XSCF.\n"
-msgid "SCF-8007-5H.impact"
-msgstr "The uncorrectable error trap may cause the domain to panic.\n"
-msgid "SCF-8007-5H.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8007-63
-# keys: fault.chassis.SPARC-Enterprise.cpu.SPARC64-VII.core.strand.se
-#
-msgid "SCF-8007-63.type"
-msgstr "Fault"
-msgid "SCF-8007-63.severity"
-msgstr "Major"
-msgid "SCF-8007-63.description"
-msgstr "A non-fatal uncorrectable error has been detected on a strand on a CPU chip.\n Refer to %s for more information."
-msgid "SCF-8007-63.response"
-msgstr "The strand on the CPU chip is deconfigured.\n"
-msgid "SCF-8007-63.impact"
-msgstr "The non-fatal uncorrectable error trap may cause the domain to panic.\n"
-msgid "SCF-8007-63.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8007-7Y
-# keys: fault.chassis.SPARC-Enterprise.cpu.SPARC64-VII.ce
-#
-msgid "SCF-8007-7Y.type"
-msgstr "Fault"
-msgid "SCF-8007-7Y.severity"
-msgstr "Major"
-msgid "SCF-8007-7Y.description"
-msgstr "The number of correctable errors associated with a CPU chip has exceeded an acceptable threshold.\n Refer to %s for more information."
-msgid "SCF-8007-7Y.response"
-msgstr "The CPU chip will be deconfigured after the platform is power cycled or \nafter the domain reboots or after a Dynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8007-7Y.impact"
-msgstr "No immediate impact. The CPU chip will be deconfigured after the platform is power cycled or \nafter the domain reboots or after a Dynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8007-7Y.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8007-8Q
-# keys: fault.chassis.SPARC-Enterprise.cpu.SPARC64-VII.core.ce
-#
-msgid "SCF-8007-8Q.type"
-msgstr "Fault"
-msgid "SCF-8007-8Q.severity"
-msgstr "Major"
-msgid "SCF-8007-8Q.description"
-msgstr "The number of correctable errors associated with a core on a CPU chip have exceeded an acceptable threshold.\n Refer to %s for more information."
-msgid "SCF-8007-8Q.response"
-msgstr "A request is sent to the domain software to attempt to offline the core on the CPU chip.\nThe core of the CPU chip will be deconfigured after the platform is power cycled or \nafter the domain reboots or after a Dynamic Reconfiguration operation is performed.\n"
-msgid "SCF-8007-8Q.impact"
-msgstr "No immediate impact.\n"
-msgid "SCF-8007-8Q.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8007-9C
-# keys: fault.chassis.SPARC-Enterprise.cpu.SPARC64-VII.core.ce-offlinereq
-#
-msgid "SCF-8007-9C.type"
-msgstr "Fault"
-msgid "SCF-8007-9C.severity"
-msgstr "Major"
-msgid "SCF-8007-9C.description"
-msgstr "The number of correctable errors on a core on a CPU chip has exceeded an acceptable threshold. \nThis fault occurs when the number of offline attempts has exceeded an acceptable threshold.\n Refer to %s for more information."
-msgid "SCF-8007-9C.response"
-msgstr "Future correctable errors for this core on a CPU chip will not be recorded on the XSCF.\n"
-msgid "SCF-8007-9C.impact"
-msgstr "No immediate impact.\n"
-msgid "SCF-8007-9C.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8007-AR
-# keys: fault.chassis.SPARC-Enterprise.cpu.SPARC64-VII.way.ce
-#
-msgid "SCF-8007-AR.type"
-msgstr "Fault"
-msgid "SCF-8007-AR.severity"
-msgstr "Minor"
-msgid "SCF-8007-AR.description"
-msgstr "The number of correctable errors within a way of a CPU chip's L2 cache has exceeded an acceptable threshold.\n Refer to %s for more information."
-msgid "SCF-8007-AR.response"
-msgstr "The way of the CPU chip's cache is deconfigured. The performance of the CPU chip is reduced.\n"
-msgid "SCF-8007-AR.impact"
-msgstr "There is a performance loss for the CPU chip.\n"
-msgid "SCF-8007-AR.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8007-C4
-# keys: upset.chassis.SPARC-Enterprise.cpu.SPARC64-VII.fe
-#
-msgid "SCF-8007-C4.type"
-msgstr "Upset"
-msgid "SCF-8007-C4.severity"
-msgstr "Critical"
-msgid "SCF-8007-C4.description"
-msgstr "A hard-to-diagnose problem was detected by the CPU chip.\n Refer to %s for more information."
-msgid "SCF-8007-C4.response"
-msgstr "Nothing is deconfigured.\n"
-msgid "SCF-8007-C4.impact"
-msgstr "The domain may drop to the OpenBoot PROM 'OK' prompt.\n"
-msgid "SCF-8007-C4.action"
-msgstr "The platform administrator should check to see if any other hardware failure has occurred on the platform.\nIf the problem occurs while running OpenBoot PROM, then the platform administrator should check to make sure that \nthe OpenBoot PROM environment variables have not been set incorrectly. If neither of these courses of action \nprovide a resolution, then the platform administrator should schedule a service action.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8007-DX
-# keys: upset.chassis.SPARC-Enterprise.cpu.SPARC64-VII.fe-unexpected-trap
-#
-msgid "SCF-8007-DX.type"
-msgstr "upset"
-msgid "SCF-8007-DX.severity"
-msgstr "Critical"
-msgid "SCF-8007-DX.description"
-msgstr "An unexpected trap with some unknown cause was detected by a CPU chip during POST.\n Refer to %s for more information."
-msgid "SCF-8007-DX.response"
-msgstr "Nothing is deconfigured.\n"
-msgid "SCF-8007-DX.impact"
-msgstr "The domain is reset.\n"
-msgid "SCF-8007-DX.action"
-msgstr "Please consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8007-E2
-# keys: fault.chassis.SPARC-Enterprise.cpu.SPARC64-VII.se-tmo
-#
-msgid "SCF-8007-E2.type"
-msgstr "Fault"
-msgid "SCF-8007-E2.severity"
-msgstr "Major"
-msgid "SCF-8007-E2.description"
-msgstr "An internal non-fatal uncorrectable error has been detected within the CPU chip.\n Refer to %s for more information."
-msgid "SCF-8007-E2.response"
-msgstr "Nothing is deconfigured.\n"
-msgid "SCF-8007-E2.impact"
-msgstr "The non-fatal uncorrectable error may cause the domain to panic.\n"
-msgid "SCF-8007-E2.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8007-FJ
-# keys: fault.chassis.SPARC-Enterprise.cpu.SPARC64-VII.se-uncertain
-#
-msgid "SCF-8007-FJ.type"
-msgstr "Fault"
-msgid "SCF-8007-FJ.severity"
-msgstr "Major"
-msgid "SCF-8007-FJ.description"
-msgstr "An internal non-fatal uncorrectable error has been detected within the CPU chip.\n Refer to %s for more information."
-msgid "SCF-8007-FJ.response"
-msgstr "Nothing is deconfigured.\n"
-msgid "SCF-8007-FJ.impact"
-msgstr "The non-fatal uncorrectable error may cause the domain to panic.\n"
-msgid "SCF-8007-FJ.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
-#
-# code: SCF-8007-GE
-# keys: fault.chassis.SPARC-Enterprise.cpu.SPARC64-VII.core.ce-warn
-#
-msgid "SCF-8007-GE.type"
-msgstr "Fault"
-msgid "SCF-8007-GE.severity"
-msgstr "Minor"
-msgid "SCF-8007-GE.description"
-msgstr "The number of correctable errors associated with a CPU chip has exceeded an acceptable threshold.\n Refer to %s for more information."
-msgid "SCF-8007-GE.response"
-msgstr "Nothing is deconfigured.\n"
-msgid "SCF-8007-GE.impact"
-msgstr "No immediate impact.\n"
-msgid "SCF-8007-GE.action"
-msgstr "Schedule a repair action to replace the affected Field Replaceable Unit (FRU),\nthe identity of which can be determined using fmdump -v -u EVENT_ID.\nPlease consult the detail section of the knowledge article for additional information.\n"
diff --git a/usr/src/cmd/fm/dicts/SUN4.dict b/usr/src/cmd/fm/dicts/SUN4.dict
deleted file mode 100644
index 3234ae5aa9..0000000000
--- a/usr/src/cmd/fm/dicts/SUN4.dict
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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
-#
-#ident "%Z%%M% %I% %E% SMI"
-#
-# DO NOT EDIT -- this file is generated by the Event Registry.
-#
-
-FMDICT: name=SUN4 version=1 maxkey=3 dictid=0x5334
-
-fault.io.fire.asic=0
-fault.io.ebus=1
-fault.io.datapath=2
-fault.io.hbus=3
-fault.io.fire.pciex.device=4
-defect.io.fire.pciex.driver=5
-fault.io.datapath fault.io.fire.asic=6
-fault.io.fire.asic fault.io.fire.pciex.device=7
-defect.io.fire.pci.driver defect.io.fire.pciex.driver=8
-fault.io.fire.pci.device fault.io.fire.pciex.device=9
-fault.io.fire.pci.device=10
-defect.io.fire.pciex.driver fault.io.datapath fault.io.fire.asic=11
-fault.io.fire.asic fault.io.fire.pci.device fault.io.fire.pciex.device=12
-fault.io.fire.asic fault.io.fire.pci.device=13
-fault.io.fire.hbus=14
-fault.io.fire.datapath fault.io.fire.hbus=15
-fault.io.fire.hb.sw-config=16
-fault.io.fire.dmc.sw-algorithm=17
-fault.io.fire.dmc.sw-state=18
-fault.io.fire.pec.sw-algorithm=19
diff --git a/usr/src/cmd/fm/dicts/SUN4.po b/usr/src/cmd/fm/dicts/SUN4.po
deleted file mode 100644
index b1df0f35b1..0000000000
--- a/usr/src/cmd/fm/dicts/SUN4.po
+++ /dev/null
@@ -1,345 +0,0 @@
-#
-# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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
-#
-# DO NOT EDIT -- this file is generated by the Event Registry.
-#
-#
-# code: SUN4-8000-0Y
-# keys: fault.io.fire.asic
-#
-msgid "SUN4-8000-0Y.type"
-msgstr "Fault"
-msgid "SUN4-8000-0Y.severity"
-msgstr "Critical"
-msgid "SUN4-8000-0Y.description"
-msgstr "A problem was detected in the PCI-Express subsystem.\n Refer to %s for more information."
-msgid "SUN4-8000-0Y.response"
-msgstr "This fault does not have an automated response agent and thus requires interaction \nfrom the user and/or your illumos distribution team."
-msgid "SUN4-8000-0Y.impact"
-msgstr "Loss of services provided by the device instances associated with this fault"
-msgid "SUN4-8000-0Y.action"
-msgstr "Schedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support. If this message occurs on a Sun Fire T2000 also refer to the NOTE\nat the end of the Details section below.\n"
-#
-# code: SUN4-8000-13
-# keys: fault.io.ebus
-#
-msgid "SUN4-8000-13.type"
-msgstr "Fault"
-msgid "SUN4-8000-13.severity"
-msgstr "Critical"
-msgid "SUN4-8000-13.description"
-msgstr "A problem was detected in the Ebus. Refer to %s for more information."
-msgid "SUN4-8000-13.response"
-msgstr "This fault does not have an automated response agent and thus requires interaction \nfrom the user and/or your illumos distribution team."
-msgid "SUN4-8000-13.impact"
-msgstr "Loss of services provided by the device instances associated with this fault"
-msgid "SUN4-8000-13.action"
-msgstr "Use fmdump -v -u EVENT_ID and fmdump -eV -u \nEVENT_ID to collect information to help illumos personnel \nidentify the device in need of repair. Schedule a repair procedure to replace \nthe affected device.\n"
-#
-# code: SUN4-8000-2H
-# keys: fault.io.datapath
-#
-msgid "SUN4-8000-2H.type"
-msgstr "Fault"
-msgid "SUN4-8000-2H.severity"
-msgstr "Critical"
-msgid "SUN4-8000-2H.description"
-msgstr "This is an unexpected diagnosis. Please contact your illumos distribution team for details. Refer to %s for more information."
-msgid "SUN4-8000-2H.response"
-msgstr "None"
-msgid "SUN4-8000-2H.impact"
-msgstr "None"
-msgid "SUN4-8000-2H.action"
-msgstr "None"
-#
-# code: SUN4-8000-3D
-# keys: fault.io.hbus
-#
-msgid "SUN4-8000-3D.type"
-msgstr "Fault"
-msgid "SUN4-8000-3D.severity"
-msgstr "Critical"
-msgid "SUN4-8000-3D.description"
-msgstr "A problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4-8000-3D.response"
-msgstr "This fault does not have an automated response agent and thus requires interaction \nfrom the user and/or your illumos distribution team."
-msgid "SUN4-8000-3D.impact"
-msgstr "Loss of services provided by the device instances associated with this fault"
-msgid "SUN4-8000-3D.action"
-msgstr "Use fmdump -v -u EVENT_ID and fmdump -eV -u\nEVENT_ID to collect information to \nhelp illumos personnel identify the device in need of repair. Schedule \na repair procedure to replace the affected device.\n"
-#
-# code: SUN4-8000-4P
-# keys: fault.io.fire.pciex.device
-#
-msgid "SUN4-8000-4P.type"
-msgstr "Fault"
-msgid "SUN4-8000-4P.severity"
-msgstr "Critical"
-msgid "SUN4-8000-4P.description"
-msgstr "A problem was detected in the PCI-Express subsystem.\n Refer to %s for more information."
-msgid "SUN4-8000-4P.response"
-msgstr "This fault does not have an automated response agent and thus requires interaction \nfrom the user and/or your illumos distribution team."
-msgid "SUN4-8000-4P.impact"
-msgstr "Loss of services provided by the device instances associated with this fault"
-msgid "SUN4-8000-4P.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support. \nIf this message occurs on a Sun Fire T2000 also refer to the NOTE\nat the end of the Details section below."
-#
-# code: SUN4-8000-5A
-# keys: defect.io.fire.pciex.driver
-#
-msgid "SUN4-8000-5A.type"
-msgstr "Defect"
-msgid "SUN4-8000-5A.severity"
-msgstr "Critical"
-msgid "SUN4-8000-5A.description"
-msgstr "A problem was detected in the PCI-Express subsystem software.\n Refer to %s for more information."
-msgid "SUN4-8000-5A.response"
-msgstr "This fault does not have an automated response agent and thus requires interaction \nfrom the user and/or your illumos distribution team."
-msgid "SUN4-8000-5A.impact"
-msgstr "Loss of services provided by the device instances associated with\nthis problem"
-msgid "SUN4-8000-5A.action"
-msgstr "Ensure latest driver and patch are installed. Use fmdump -v -u <EVENT_ID> to identify the module/package, or contact your illumos distribution team for support."
-#
-# code: SUN4-8000-6S
-# keys: fault.io.datapath fault.io.fire.asic
-#
-msgid "SUN4-8000-6S.type"
-msgstr "Fault"
-msgid "SUN4-8000-6S.severity"
-msgstr "Critical"
-msgid "SUN4-8000-6S.description"
-msgstr "This is an unexpected diagnosis. Please contact your illumos distribution team for details. Refer to %s for more information."
-msgid "SUN4-8000-6S.response"
-msgstr "None"
-msgid "SUN4-8000-6S.impact"
-msgstr "None"
-msgid "SUN4-8000-6S.action"
-msgstr "None"
-#
-# code: SUN4-8000-75
-# keys: fault.io.fire.asic fault.io.fire.pciex.device
-#
-msgid "SUN4-8000-75.type"
-msgstr "Fault"
-msgid "SUN4-8000-75.severity"
-msgstr "Critical"
-msgid "SUN4-8000-75.description"
-msgstr "A problem was detected in the PCI-Express subsystem.\n Refer to %s for more information."
-msgid "SUN4-8000-75.response"
-msgstr "This fault does not have an automated response agent and thus requires interaction \nfrom the user and/or your illumos distribution team."
-msgid "SUN4-8000-75.impact"
-msgstr "Loss of services provided by the device instances associated with this fault"
-msgid "SUN4-8000-75.action"
-msgstr "Schedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support. If this message occurs on a Sun Fire T2000 also refer to the NOTE\nat the end of the Details section below.\n"
-#
-# code: SUN4-8000-8E
-# keys: defect.io.fire.pci.driver defect.io.fire.pciex.driver
-#
-msgid "SUN4-8000-8E.type"
-msgstr "Defect"
-msgid "SUN4-8000-8E.severity"
-msgstr "Critical"
-msgid "SUN4-8000-8E.description"
-msgstr "A problem was detected in the PCI-Express subsystem software. Refer to %s for more information."
-msgid "SUN4-8000-8E.response"
-msgstr "This fault does not have an automated response agent and thus requires interaction \nfrom the user and/or your illumos distribution team."
-msgid "SUN4-8000-8E.impact"
-msgstr "Loss of services provided by the device instances associated with this problem"
-msgid "SUN4-8000-8E.action"
-msgstr "Ensure latest driver and patch are installed. Use fmdump -v -u <EVENT_ID> to identify the module/package, or contact your illumos distribution team for support."
-#
-# code: SUN4-8000-9J
-# keys: fault.io.fire.pci.device fault.io.fire.pciex.device
-#
-msgid "SUN4-8000-9J.type"
-msgstr "Fault"
-msgid "SUN4-8000-9J.severity"
-msgstr "Critical"
-msgid "SUN4-8000-9J.description"
-msgstr "This is an unexpected diagnosis. Please contact your illumos distribution team for details. Refer to %s for more information."
-msgid "SUN4-8000-9J.response"
-msgstr "None"
-msgid "SUN4-8000-9J.impact"
-msgstr "None"
-msgid "SUN4-8000-9J.action"
-msgstr "None"
-#
-# code: SUN4-8000-A2
-# keys: fault.io.fire.pci.device
-#
-msgid "SUN4-8000-A2.type"
-msgstr "Fault"
-msgid "SUN4-8000-A2.severity"
-msgstr "Critical"
-msgid "SUN4-8000-A2.description"
-msgstr "A problem was detected in the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4-8000-A2.response"
-msgstr "This fault does not have an automated response agent and thus requires interaction \nfrom the user and/or your illumos distribution team."
-msgid "SUN4-8000-A2.impact"
-msgstr "Loss of services provided by the device instances associated with this fault"
-msgid "SUN4-8000-A2.action"
-msgstr "Schedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4-8000-CX
-# keys: defect.io.fire.pciex.driver fault.io.datapath fault.io.fire.asic
-#
-msgid "SUN4-8000-CX.type"
-msgstr "Fault"
-msgid "SUN4-8000-CX.severity"
-msgstr "Critical"
-msgid "SUN4-8000-CX.description"
-msgstr "This is an unexpected diagnosis. Please contact your illumos distribution team for details. Refer to %s for more information."
-msgid "SUN4-8000-CX.response"
-msgstr "None"
-msgid "SUN4-8000-CX.impact"
-msgstr "None"
-msgid "SUN4-8000-CX.action"
-msgstr "None"
-#
-# code: SUN4-8000-D4
-# keys: fault.io.fire.asic fault.io.fire.pci.device fault.io.fire.pciex.device
-#
-msgid "SUN4-8000-D4.type"
-msgstr "Fault"
-msgid "SUN4-8000-D4.severity"
-msgstr "Critical"
-msgid "SUN4-8000-D4.description"
-msgstr "A problem has been detected in the PCI/PCI-Express subsystem. Refer to %s for more information."
-msgid "SUN4-8000-D4.response"
-msgstr "This fault does not have an automated response agent and thus requires interaction \nfrom the user and/or your illumos distribution team."
-msgid "SUN4-8000-D4.impact"
-msgstr "Loss of services provided by the device instances associated with this fault"
-msgid "SUN4-8000-D4.action"
-msgstr "Schedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support. If this message occurs on a Sun Fire T2000 also refer to the NOTE\nat the end of the Details section below.\n"
-#
-# code: SUN4-8000-ER
-# keys: fault.io.fire.asic fault.io.fire.pci.device
-#
-msgid "SUN4-8000-ER.type"
-msgstr "Fault"
-msgid "SUN4-8000-ER.severity"
-msgstr "Critical"
-msgid "SUN4-8000-ER.description"
-msgstr "A problem has been detected in the PCI/PCI-Express subsystem. Refer to %s for more information."
-msgid "SUN4-8000-ER.response"
-msgstr "This fault does not have an automated response agent and thus requires interaction \nfrom the user and/or your illumos distribution team."
-msgid "SUN4-8000-ER.impact"
-msgstr "Loss of services provided by the device instances associated with this fault"
-msgid "SUN4-8000-ER.action"
-msgstr "Schedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support. If this message occurs on a Sun Fire T2000 also refer to the NOTE\nat the end of the Details section below.\n"
-#
-# code: SUN4-8000-FC
-# keys: fault.io.fire.hbus
-#
-msgid "SUN4-8000-FC.type"
-msgstr "Fault"
-msgid "SUN4-8000-FC.severity"
-msgstr "Major"
-msgid "SUN4-8000-FC.description"
-msgstr "A problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4-8000-FC.response"
-msgstr "This fault does not have an automated response agent and thus requires interaction \nfrom the user and/or your illumos distribution team."
-msgid "SUN4-8000-FC.impact"
-msgstr "Loss of services provided by the device instances associated with this fault"
-msgid "SUN4-8000-FC.action"
-msgstr "Use fmdump -v -u EVENT_ID and fmdump -eV -u\nEVENT_ID to collect information to \nhelp illumos personnel identify the device in need of repair. Schedule \na repair procedure to replace the affected device.\n"
-#
-# code: SUN4-8000-GQ
-# keys: fault.io.fire.datapath fault.io.fire.hbus
-#
-msgid "SUN4-8000-GQ.type"
-msgstr "Fault"
-msgid "SUN4-8000-GQ.severity"
-msgstr "Critical"
-msgid "SUN4-8000-GQ.description"
-msgstr "Fault in either the PCIe asic's internal hostbus or connector between IO and CPU Board\n Refer to %s for more information."
-msgid "SUN4-8000-GQ.response"
-msgstr "One or more device instances may be disabled\n"
-msgid "SUN4-8000-GQ.impact"
-msgstr "Loss of services provided by the device\ninstances associated with this fault\n"
-msgid "SUN4-8000-GQ.action"
-msgstr "Schedule a repair procedure to replace the affected\ndevice if necessary, or contact your illumos distribution team for support.\n"
-#
-# code: SUN4-8000-HD
-# keys: fault.io.fire.hb.sw-config
-#
-msgid "SUN4-8000-HD.type"
-msgstr "Fault"
-msgid "SUN4-8000-HD.severity"
-msgstr "Critical"
-msgid "SUN4-8000-HD.description"
-msgstr "The IO hostbridge's hostbus has been found to be configured improperly\nwhich is preventing the system from functioning properly.\n Refer to %s for more information."
-msgid "SUN4-8000-HD.response"
-msgstr "One or more device instances may be disabled\n"
-msgid "SUN4-8000-HD.impact"
-msgstr "Loss of services provided by the device\ninstances associated with this fault\n"
-msgid "SUN4-8000-HD.action"
-msgstr "Schedule a repair procedure to replace the affected\ndevice if necessary, or contact your illumos distribution team for support.\n"
-#
-# code: SUN4-8000-JH
-# keys: fault.io.fire.dmc.sw-algorithm
-#
-msgid "SUN4-8000-JH.type"
-msgstr "Fault"
-msgid "SUN4-8000-JH.severity"
-msgstr "Critical"
-msgid "SUN4-8000-JH.description"
-msgstr "An uncorrectable software problem was detected in the IO hostbridge's \nData Management Unit which is preventing the system from functioning properly.\n Refer to %s for more information."
-msgid "SUN4-8000-JH.response"
-msgstr "One or more device instances may be disabled\n"
-msgid "SUN4-8000-JH.impact"
-msgstr "Loss of services provided by the device\ninstances associated with this fault\n"
-msgid "SUN4-8000-JH.action"
-msgstr "Schedule a repair procedure to replace the affected\ndevice if necessary, or contact your illumos distribution team for support.\n"
-#
-# code: SUN4-8000-K3
-# keys: fault.io.fire.dmc.sw-state
-#
-msgid "SUN4-8000-K3.type"
-msgstr "Fault"
-msgid "SUN4-8000-K3.severity"
-msgstr "Critical"
-msgid "SUN4-8000-K3.description"
-msgstr "The IO hostbridge's Data Management Unit has been found to be in an illegal state\nwhich is preventing the system from functioning properly.\n Refer to %s for more information."
-msgid "SUN4-8000-K3.response"
-msgstr "One or more device instances may be disabled\n"
-msgid "SUN4-8000-K3.impact"
-msgstr "Loss of services provided by the device\ninstances associated with this fault\n"
-msgid "SUN4-8000-K3.action"
-msgstr "Schedule a repair procedure to replace the affected\ndevice if necessary, or contact your illumos distribution team for support.\n"
-#
-# code: SUN4-8000-LY
-# keys: fault.io.fire.pec.sw-algorithm
-#
-msgid "SUN4-8000-LY.type"
-msgstr "Fault"
-msgid "SUN4-8000-LY.severity"
-msgstr "Critical"
-msgid "SUN4-8000-LY.description"
-msgstr "An uncorrectable software problem was detected in the IO hostbridge's \nData Management Unit which is preventing the system from functioning properly.\n Refer to %s for more information."
-msgid "SUN4-8000-LY.response"
-msgstr "One or more device instances may be disabled\n"
-msgid "SUN4-8000-LY.impact"
-msgstr "Loss of services provided by the device\ninstances associated with this fault\n"
-msgid "SUN4-8000-LY.action"
-msgstr "Schedule a repair procedure to replace the affected\ndevice if necessary, or contact your illumos distribution team for support.\n"
diff --git a/usr/src/cmd/fm/dicts/SUN4U.dict b/usr/src/cmd/fm/dicts/SUN4U.dict
deleted file mode 100644
index 23d106ad63..0000000000
--- a/usr/src/cmd/fm/dicts/SUN4U.dict
+++ /dev/null
@@ -1,273 +0,0 @@
-#
-# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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
-#
-#
-# DO NOT EDIT -- this file is generated by the Event Registry.
-#
-
-FMDICT: name=SUN4U version=1 maxkey=7 dictid=0x3455
-
-fault.memory.page=1
-fault.memory.dimm=2
-fault.memory.bank=3
-fault.cpu.ultraSPARC-III.dcache=4
-fault.cpu.ultraSPARC-III.icache=5
-fault.cpu.ultraSPARC-III.l2cachedata=6
-fault.cpu.ultraSPARC-III.l2cachetag=7
-fault.cpu.ultraSPARC-IIIi.dcache=8
-fault.cpu.ultraSPARC-IIIi.icache=9
-fault.cpu.ultraSPARC-IIIi.l2cachedata=10
-fault.cpu.ultraSPARC-IIIi.l2cachetag=11
-fault.cpu.ultraSPARC-IIIplus.dcache=12
-fault.cpu.ultraSPARC-IIIplus.icache=13
-fault.cpu.ultraSPARC-IIIplus.l2cachedata=14
-fault.cpu.ultraSPARC-IIIplus.l2cachetag=15
-fault.cpu.ultraSPARC-IV.dcache=16
-fault.cpu.ultraSPARC-IV.icache=17
-fault.cpu.ultraSPARC-IV.l2cachedata=18
-fault.cpu.ultraSPARC-IV.l2cachetag=19
-fault.cpu.ultraSPARC-III.fpu=20
-fault.cpu.ultraSPARC-IIIi.fpu=21
-fault.cpu.ultraSPARC-IIIplus.fpu=22
-fault.cpu.ultraSPARC-IV.fpu=23
-fault.cpu.ultraSPARC-IVplus.fpu=24
-fault.cpu.ultraSPARC-IVplus.dcache=25
-fault.cpu.ultraSPARC-IVplus.icache=26
-fault.cpu.ultraSPARC-IVplus.pcache=27
-fault.cpu.ultraSPARC-IVplus.dtlb=28
-fault.cpu.ultraSPARC-IVplus.itlb=29
-fault.cpu.ultraSPARC-IVplus.l2cachedata=30
-fault.cpu.ultraSPARC-IVplus.l2cachetag=31
-fault.cpu.ultraSPARC-IVplus.l3cachedata=32
-fault.cpu.ultraSPARC-IVplus.l3cachetag=33
-defect.ultraSPARC-II.memory.nodiag=34
-fault.memory.datapath=35
-fault.io.datapath=36
-defect.io.pci.driver fault.io.datapath=37
-fault.io.datapath fault.io.pci.bus=38
-defect.io.pci.driver fault.io.datapath fault.io.pci.bus=39
-fault.io.datapath fault.io.pci.device=40
-defect.io.pci.driver fault.io.datapath fault.io.pci.device=41
-fault.io.datapath fault.io.pci.bus fault.io.pci.device=42
-defect.io.pci.driver fault.io.datapath fault.io.pci.bus fault.io.pci.device=43
-fault.io.hbus=44
-defect.io.pci.driver fault.io.hbus=45
-fault.io.hbus fault.io.pci.bus=46
-defect.io.pci.driver fault.io.hbus fault.io.pci.bus=47
-fault.io.hbus fault.io.pci.device=48
-defect.io.pci.driver fault.io.hbus fault.io.pci.device=49
-fault.io.hbus fault.io.pci.bus fault.io.pci.device=50
-defect.io.pci.driver fault.io.hbus fault.io.pci.bus fault.io.pci.device=51
-fault.io.datapath fault.io.hbus=52
-defect.io.pci.driver fault.io.datapath fault.io.hbus=53
-fault.io.datapath fault.io.hbus fault.io.pci.bus=54
-defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.pci.bus=55
-fault.io.datapath fault.io.hbus fault.io.pci.device=56
-defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.pci.device=57
-fault.io.datapath fault.io.hbus fault.io.pci.bus fault.io.pci.device=58
-defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.pci.bus fault.io.pci.device=59
-fault.io.schizo=60
-defect.io.pci.driver fault.io.schizo=61
-fault.io.pci.bus fault.io.schizo=62
-defect.io.pci.driver fault.io.pci.bus fault.io.schizo=63
-fault.io.pci.device fault.io.schizo=64
-defect.io.pci.driver fault.io.pci.device fault.io.schizo=65
-fault.io.pci.bus fault.io.pci.device fault.io.schizo=66
-defect.io.pci.driver fault.io.pci.bus fault.io.pci.device fault.io.schizo=67
-fault.io.datapath fault.io.schizo=68
-defect.io.pci.driver fault.io.datapath fault.io.schizo=69
-fault.io.datapath fault.io.pci.bus fault.io.schizo=70
-defect.io.pci.driver fault.io.datapath fault.io.pci.bus fault.io.schizo=71
-fault.io.datapath fault.io.pci.device fault.io.schizo=72
-defect.io.pci.driver fault.io.datapath fault.io.pci.device fault.io.schizo=73
-fault.io.datapath fault.io.pci.bus fault.io.pci.device fault.io.schizo=74
-defect.io.pci.driver fault.io.datapath fault.io.pci.bus fault.io.pci.device fault.io.schizo=75
-fault.io.hbus fault.io.schizo=76
-defect.io.pci.driver fault.io.hbus fault.io.schizo=77
-fault.io.hbus fault.io.pci.bus fault.io.schizo=78
-defect.io.pci.driver fault.io.hbus fault.io.pci.bus fault.io.schizo=79
-fault.io.hbus fault.io.pci.device fault.io.schizo=80
-defect.io.pci.driver fault.io.hbus fault.io.pci.device fault.io.schizo=81
-fault.io.hbus fault.io.pci.bus fault.io.pci.device fault.io.schizo=82
-defect.io.pci.driver fault.io.hbus fault.io.pci.bus fault.io.pci.device fault.io.schizo=83
-fault.io.datapath fault.io.hbus fault.io.schizo=84
-defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.schizo=85
-fault.io.datapath fault.io.hbus fault.io.pci.bus fault.io.schizo=86
-defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.pci.bus fault.io.schizo=87
-fault.io.datapath fault.io.hbus fault.io.pci.device fault.io.schizo=88
-defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.pci.device fault.io.schizo=89
-fault.io.datapath fault.io.hbus fault.io.pci.bus fault.io.pci.device fault.io.schizo=90
-defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.pci.bus fault.io.pci.device fault.io.schizo=91
-fault.io.xmits=92
-defect.io.pci.driver fault.io.xmits=93
-fault.io.pci.bus fault.io.xmits=94
-defect.io.pci.driver fault.io.pci.bus fault.io.xmits=95
-fault.io.pci.device fault.io.xmits=96
-defect.io.pci.driver fault.io.pci.device fault.io.xmits=97
-fault.io.pci.bus fault.io.pci.device fault.io.xmits=98
-defect.io.pci.driver fault.io.pci.bus fault.io.pci.device fault.io.xmits=99
-fault.io.datapath fault.io.xmits=100
-defect.io.pci.driver fault.io.datapath fault.io.xmits=101
-fault.io.datapath fault.io.pci.bus fault.io.xmits=102
-defect.io.pci.driver fault.io.datapath fault.io.pci.bus fault.io.xmits=103
-fault.io.datapath fault.io.pci.device fault.io.xmits=104
-defect.io.pci.driver fault.io.datapath fault.io.pci.device fault.io.xmits=105
-fault.io.datapath fault.io.pci.bus fault.io.pci.device fault.io.xmits=106
-defect.io.pci.driver fault.io.datapath fault.io.pci.bus fault.io.pci.device fault.io.xmits=107
-fault.io.hbus fault.io.xmits=108
-defect.io.pci.driver fault.io.hbus fault.io.xmits=109
-fault.io.hbus fault.io.pci.bus fault.io.xmits=110
-defect.io.pci.driver fault.io.hbus fault.io.pci.bus fault.io.xmits=111
-fault.io.hbus fault.io.pci.device fault.io.xmits=112
-defect.io.pci.driver fault.io.hbus fault.io.pci.device fault.io.xmits=113
-fault.io.hbus fault.io.pci.bus fault.io.pci.device fault.io.xmits=114
-defect.io.pci.driver fault.io.hbus fault.io.pci.bus fault.io.pci.device fault.io.xmits=115
-fault.io.datapath fault.io.hbus fault.io.xmits=116
-defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.xmits=117
-fault.io.datapath fault.io.hbus fault.io.pci.bus fault.io.xmits=118
-defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.pci.bus fault.io.xmits=119
-fault.io.datapath fault.io.hbus fault.io.pci.device fault.io.xmits=120
-defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.pci.device fault.io.xmits=121
-fault.io.datapath fault.io.hbus fault.io.pci.bus fault.io.pci.device fault.io.xmits=122
-defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.pci.bus fault.io.pci.device fault.io.xmits=123
-fault.io.schizo fault.io.xmits=124
-defect.io.pci.driver fault.io.schizo fault.io.xmits=125
-fault.io.pci.bus fault.io.schizo fault.io.xmits=126
-defect.io.pci.driver fault.io.pci.bus fault.io.schizo fault.io.xmits=127
-fault.io.pci.device fault.io.schizo fault.io.xmits=128
-defect.io.pci.driver fault.io.pci.device fault.io.schizo fault.io.xmits=129
-fault.io.pci.bus fault.io.pci.device fault.io.schizo fault.io.xmits=130
-defect.io.pci.driver fault.io.pci.bus fault.io.pci.device fault.io.schizo fault.io.xmits=131
-fault.io.datapath fault.io.schizo fault.io.xmits=132
-defect.io.pci.driver fault.io.datapath fault.io.schizo fault.io.xmits=133
-fault.io.datapath fault.io.pci.bus fault.io.schizo fault.io.xmits=134
-defect.io.pci.driver fault.io.datapath fault.io.pci.bus fault.io.schizo fault.io.xmits=135
-fault.io.datapath fault.io.pci.device fault.io.schizo fault.io.xmits=136
-defect.io.pci.driver fault.io.datapath fault.io.pci.device fault.io.schizo fault.io.xmits=137
-fault.io.datapath fault.io.pci.bus fault.io.pci.device fault.io.schizo fault.io.xmits=138
-defect.io.pci.driver fault.io.datapath fault.io.pci.bus fault.io.pci.device fault.io.schizo fault.io.xmits=139
-fault.io.hbus fault.io.schizo fault.io.xmits=140
-defect.io.pci.driver fault.io.hbus fault.io.schizo fault.io.xmits=141
-fault.io.hbus fault.io.pci.bus fault.io.schizo fault.io.xmits=142
-defect.io.pci.driver fault.io.hbus fault.io.pci.bus fault.io.schizo fault.io.xmits=143
-fault.io.hbus fault.io.pci.device fault.io.schizo fault.io.xmits=144
-defect.io.pci.driver fault.io.hbus fault.io.pci.device fault.io.schizo fault.io.xmits=145
-fault.io.hbus fault.io.pci.bus fault.io.pci.device fault.io.schizo fault.io.xmits=146
-defect.io.pci.driver fault.io.hbus fault.io.pci.bus fault.io.pci.device fault.io.schizo fault.io.xmits=147
-fault.io.datapath fault.io.hbus fault.io.schizo fault.io.xmits=148
-defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.schizo fault.io.xmits=149
-fault.io.datapath fault.io.hbus fault.io.pci.bus fault.io.schizo fault.io.xmits=150
-defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.pci.bus fault.io.schizo fault.io.xmits=151
-fault.io.datapath fault.io.hbus fault.io.pci.device fault.io.schizo fault.io.xmits=152
-defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.pci.device fault.io.schizo fault.io.xmits=153
-fault.io.datapath fault.io.hbus fault.io.pci.bus fault.io.pci.device fault.io.schizo fault.io.xmits=154
-defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.pci.bus fault.io.pci.device fault.io.schizo fault.io.xmits=155
-fault.io.psycho=156
-defect.io.pci.driver fault.io.psycho=157
-fault.io.datapath fault.io.psycho=158
-defect.io.pci.driver fault.io.datapath fault.io.psycho=159
-fault.io.hbus fault.io.psycho=160
-defect.io.pci.driver fault.io.hbus fault.io.psycho=161
-fault.io.datapath fault.io.hbus fault.io.psycho=162
-defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.psycho=163
-fault.io.pci.bus fault.io.psycho=164
-defect.io.pci.driver fault.io.pci.bus fault.io.psycho=165
-fault.io.datapath fault.io.pci.bus fault.io.psycho=166
-defect.io.pci.driver fault.io.datapath fault.io.pci.bus fault.io.psycho=167
-fault.io.hbus fault.io.pci.bus fault.io.psycho=168
-defect.io.pci.driver fault.io.hbus fault.io.pci.bus fault.io.psycho=169
-fault.io.datapath fault.io.hbus fault.io.pci.bus fault.io.psycho=170
-defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.pci.bus fault.io.psycho=171
-fault.io.pci.device fault.io.psycho=172
-defect.io.pci.driver fault.io.pci.device fault.io.psycho=173
-fault.io.datapath fault.io.pci.device fault.io.psycho=174
-defect.io.pci.driver fault.io.datapath fault.io.pci.device fault.io.psycho=175
-fault.io.hbus fault.io.pci.device fault.io.psycho=176
-defect.io.pci.driver fault.io.hbus fault.io.pci.device fault.io.psycho=177
-fault.io.datapath fault.io.hbus fault.io.pci.device fault.io.psycho=178
-defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.pci.device fault.io.psycho=179
-fault.io.pci.bus fault.io.pci.device fault.io.psycho=180
-defect.io.pci.driver fault.io.pci.bus fault.io.pci.device fault.io.psycho=181
-fault.io.datapath fault.io.pci.bus fault.io.pci.device fault.io.psycho=182
-defect.io.pci.driver fault.io.datapath fault.io.pci.bus fault.io.pci.device fault.io.psycho=183
-fault.io.hbus fault.io.pci.bus fault.io.pci.device fault.io.psycho=184
-defect.io.pci.driver fault.io.hbus fault.io.pci.bus fault.io.pci.device fault.io.psycho=185
-fault.io.datapath fault.io.hbus fault.io.pci.bus fault.io.pci.device fault.io.psycho=186
-defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.pci.bus fault.io.pci.device fault.io.psycho=187
-fault.io.tomatillo=188
-defect.io.pci.driver fault.io.tomatillo=189
-fault.io.datapath fault.io.tomatillo=190
-defect.io.pci.driver fault.io.datapath fault.io.tomatillo=191
-fault.io.hbus fault.io.tomatillo=192
-defect.io.pci.driver fault.io.hbus fault.io.tomatillo=193
-fault.io.datapath fault.io.hbus fault.io.tomatillo=194
-defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.tomatillo=195
-fault.io.pci.bus fault.io.tomatillo=196
-defect.io.pci.driver fault.io.pci.bus fault.io.tomatillo=197
-fault.io.datapath fault.io.pci.bus fault.io.tomatillo=198
-defect.io.pci.driver fault.io.datapath fault.io.pci.bus fault.io.tomatillo=199
-fault.io.hbus fault.io.pci.bus fault.io.tomatillo=200
-defect.io.pci.driver fault.io.hbus fault.io.pci.bus fault.io.tomatillo=201
-fault.io.datapath fault.io.hbus fault.io.pci.bus fault.io.tomatillo=202
-defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.pci.bus fault.io.tomatillo=203
-fault.io.pci.device fault.io.tomatillo=204
-defect.io.pci.driver fault.io.pci.device fault.io.tomatillo=205
-fault.io.datapath fault.io.pci.device fault.io.tomatillo=206
-defect.io.pci.driver fault.io.datapath fault.io.pci.device fault.io.tomatillo=207
-fault.io.hbus fault.io.pci.device fault.io.tomatillo=208
-defect.io.pci.driver fault.io.hbus fault.io.pci.device fault.io.tomatillo=209
-fault.io.datapath fault.io.hbus fault.io.pci.device fault.io.tomatillo=210
-defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.pci.device fault.io.tomatillo=211
-fault.io.pci.bus fault.io.pci.device fault.io.tomatillo=212
-defect.io.pci.driver fault.io.pci.bus fault.io.pci.device fault.io.tomatillo=213
-fault.io.datapath fault.io.pci.bus fault.io.pci.device fault.io.tomatillo=214
-defect.io.pci.driver fault.io.datapath fault.io.pci.bus fault.io.pci.device fault.io.tomatillo=215
-fault.io.hbus fault.io.pci.bus fault.io.pci.device fault.io.tomatillo=216
-defect.io.pci.driver fault.io.hbus fault.io.pci.bus fault.io.pci.device fault.io.tomatillo=217
-fault.io.datapath fault.io.hbus fault.io.pci.bus fault.io.pci.device fault.io.tomatillo=218
-defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.pci.bus fault.io.pci.device fault.io.tomatillo=219
-fault.cpu.ultraSPARC-IIIiplus.dcache=220
-fault.cpu.ultraSPARC-IIIiplus.icache=221
-fault.cpu.ultraSPARC-IIIiplus.l2cachedata=222
-fault.cpu.ultraSPARC-IIIiplus.l2cachetag=223
-fault.cpu.ultraSPARC-IIIiplus.fpu=224
-fault.asic.cds.dp=225
-fault.asic.dx.dp=226
-fault.asic.sdi.dp=227
-fault.asic.cp.dp=228
-fault.asic.rp.dp=229
-fault.io.oberon=230
-fault.cpu.SPARC64-VI.chip=231
-fault.cpu.SPARC64-VI.core=232
-fault.cpu.SPARC64-VI.strand=233
-fault.io.pci.device-invreq fault.io.tomatillo=234
-fault.cpu.SPARC64-VII.chip=235
-fault.cpu.SPARC64-VII.core=236
-fault.cpu.SPARC64-VII.strand=237
-fault.cpu.ultraSPARC-IVplus.l2cachedata-line=238
-fault.cpu.ultraSPARC-IVplus.l3cachedata-line=239
-fault.cpu.ultraSPARC-IVplus.l2cachetag-line=240
-fault.cpu.ultraSPARC-IVplus.l3cachetag-line=241
-fault.memory.dimm-page-retires-excessive=242
-fault.memory.dimm-ue-imminent=243
-fault.memory.dram-ue-imminent=244
diff --git a/usr/src/cmd/fm/dicts/SUN4U.po b/usr/src/cmd/fm/dicts/SUN4U.po
deleted file mode 100644
index 5451b04642..0000000000
--- a/usr/src/cmd/fm/dicts/SUN4U.po
+++ /dev/null
@@ -1,3930 +0,0 @@
-#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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
-#
-#
-# DO NOT EDIT -- this file is generated by the Event Registry.
-#
-#
-# code: SUN4U-8000-1A
-# keys: fault.memory.page
-#
-msgid "SUN4U-8000-1A.type"
-msgstr "Fault"
-msgid "SUN4U-8000-1A.severity"
-msgstr "Minor"
-msgid "SUN4U-8000-1A.description"
-msgstr "The number of errors associated with this memory module continues to exceed acceptable levels. Refer to %s for more information."
-msgid "SUN4U-8000-1A.response"
-msgstr "An attempt will be made to remove this memory page from service."
-msgid "SUN4U-8000-1A.impact"
-msgstr "The performance of the system may be minimally impacted as a result of removing the memory page from operation."
-msgid "SUN4U-8000-1A.action"
-msgstr "No repair action is recommended at this time."
-#
-# code: SUN4U-8000-2S
-# keys: fault.memory.dimm
-#
-msgid "SUN4U-8000-2S.type"
-msgstr "Fault"
-msgid "SUN4U-8000-2S.severity"
-msgstr "Major"
-msgid "SUN4U-8000-2S.description"
-msgstr "The number of correctable errors associated with this memory module has exceeded acceptable levels. Refer to %s for more information."
-msgid "SUN4U-8000-2S.response"
-msgstr "Pages of memory associated with this memory module have been removed from service, up to a limit which has now been reached."
-msgid "SUN4U-8000-2S.impact"
-msgstr "Total system memory capacity has been reduced."
-msgid "SUN4U-8000-2S.action"
-msgstr "Schedule a repair procedure to replace the affected memory module. Use 'fmadm faulty' to identify the memory module."
-#
-# code: SUN4U-8000-35
-# keys: fault.memory.bank
-#
-msgid "SUN4U-8000-35.type"
-msgstr "Fault"
-msgid "SUN4U-8000-35.severity"
-msgstr "Critical"
-msgid "SUN4U-8000-35.description"
-msgstr "The number of errors associated with this memory module has exceeded acceptable levels. Refer to %s for more information."
-msgid "SUN4U-8000-35.response"
-msgstr "Pages of memory associated with this memory module are being removed from service as errors are reported."
-msgid "SUN4U-8000-35.impact"
-msgstr "Total system memory capacity will be reduced as pages are retired."
-msgid "SUN4U-8000-35.action"
-msgstr "Schedule a repair procedure to replace the affected memory module. Use fmdump -v -u <EVENT_ID> to identify the module."
-#
-# code: SUN4U-8000-4Y
-# keys: fault.cpu.ultraSPARC-III.dcache
-#
-msgid "SUN4U-8000-4Y.type"
-msgstr "Fault"
-msgid "SUN4U-8000-4Y.severity"
-msgstr "Major"
-msgid "SUN4U-8000-4Y.description"
-msgstr "The number of errors associated with a CPU has exceeded acceptable levels. Refer to %s for more information."
-msgid "SUN4U-8000-4Y.response"
-msgstr "The fault manager will attempt to remove the affected CPU from service."
-msgid "SUN4U-8000-4Y.impact"
-msgstr "System performance may be affected."
-msgid "SUN4U-8000-4Y.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>."
-#
-# code: SUN4U-8000-53
-# keys: fault.cpu.ultraSPARC-III.icache
-#
-msgid "SUN4U-8000-53.type"
-msgstr "Fault"
-msgid "SUN4U-8000-53.severity"
-msgstr "Major"
-msgid "SUN4U-8000-53.description"
-msgstr "The number of errors associated with a CPU has exceeded acceptable levels. Refer to %s for more information."
-msgid "SUN4U-8000-53.response"
-msgstr "The fault manager will attempt to remove the affected CPU from service."
-msgid "SUN4U-8000-53.impact"
-msgstr "System performance may be affected."
-msgid "SUN4U-8000-53.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>."
-#
-# code: SUN4U-8000-6H
-# keys: fault.cpu.ultraSPARC-III.l2cachedata
-#
-msgid "SUN4U-8000-6H.type"
-msgstr "Fault"
-msgid "SUN4U-8000-6H.severity"
-msgstr "Major"
-msgid "SUN4U-8000-6H.description"
-msgstr "The number of errors associated with this CPU has exceeded acceptable levels. Refer to %s for more information."
-msgid "SUN4U-8000-6H.response"
-msgstr "The fault manager will attempt to remove the affected CPU from service."
-msgid "SUN4U-8000-6H.impact"
-msgstr "System performance may be affected."
-msgid "SUN4U-8000-6H.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>."
-#
-# code: SUN4U-8000-7D
-# keys: fault.cpu.ultraSPARC-III.l2cachetag
-#
-msgid "SUN4U-8000-7D.type"
-msgstr "Fault"
-msgid "SUN4U-8000-7D.severity"
-msgstr "Major"
-msgid "SUN4U-8000-7D.description"
-msgstr "The number of errors associated with this CPU has exceeded acceptable levels. Refer to %s for more information."
-msgid "SUN4U-8000-7D.response"
-msgstr "The fault manager will attempt to remove the affected CPU from service."
-msgid "SUN4U-8000-7D.impact"
-msgstr "System performance may be affected."
-msgid "SUN4U-8000-7D.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>."
-#
-# code: SUN4U-8000-84
-# keys: fault.cpu.ultraSPARC-IIIi.dcache
-#
-msgid "SUN4U-8000-84.type"
-msgstr "Fault"
-msgid "SUN4U-8000-84.severity"
-msgstr "Major"
-msgid "SUN4U-8000-84.description"
-msgstr "The number of errors associated with this CPU has exceeded acceptable levels. Refer to %s for more information."
-msgid "SUN4U-8000-84.response"
-msgstr "The fault manager will attempt to remove the affected CPU from service."
-msgid "SUN4U-8000-84.impact"
-msgstr "System performance system may be affected."
-msgid "SUN4U-8000-84.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>."
-#
-# code: SUN4U-8000-9R
-# keys: fault.cpu.ultraSPARC-IIIi.icache
-#
-msgid "SUN4U-8000-9R.type"
-msgstr "Fault"
-msgid "SUN4U-8000-9R.severity"
-msgstr "Major"
-msgid "SUN4U-8000-9R.description"
-msgstr "The number of errors associated with this CPU has exceeded acceptable levels. Refer to %s for more information."
-msgid "SUN4U-8000-9R.response"
-msgstr "The fault manager will attempt to remove the affected CPU from service."
-msgid "SUN4U-8000-9R.impact"
-msgstr "System performance may be affected."
-msgid "SUN4U-8000-9R.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>."
-#
-# code: SUN4U-8000-AC
-# keys: fault.cpu.ultraSPARC-IIIi.l2cachedata
-#
-msgid "SUN4U-8000-AC.type"
-msgstr "Fault"
-msgid "SUN4U-8000-AC.severity"
-msgstr "Major"
-msgid "SUN4U-8000-AC.description"
-msgstr "The number of errors associated with this CPU has exceeded acceptable levels. Refer to %s for more information."
-msgid "SUN4U-8000-AC.response"
-msgstr "The fault manager will attempt to remove the affected CPU from service."
-msgid "SUN4U-8000-AC.impact"
-msgstr "System performance may be affected."
-msgid "SUN4U-8000-AC.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>."
-#
-# code: SUN4U-8000-CQ
-# keys: fault.cpu.ultraSPARC-IIIi.l2cachetag
-#
-msgid "SUN4U-8000-CQ.type"
-msgstr "Fault"
-msgid "SUN4U-8000-CQ.severity"
-msgstr "Major"
-msgid "SUN4U-8000-CQ.description"
-msgstr "The number of errors associated with this CPU has exceeded acceptable levels. Refer to %s for more information."
-msgid "SUN4U-8000-CQ.response"
-msgstr "The fault manager will attempt to remove the affected CPU from service."
-msgid "SUN4U-8000-CQ.impact"
-msgstr "System performance may be affected."
-msgid "SUN4U-8000-CQ.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>."
-#
-# code: SUN4U-8000-DE
-# keys: fault.cpu.ultraSPARC-IIIplus.dcache
-#
-msgid "SUN4U-8000-DE.type"
-msgstr "Fault"
-msgid "SUN4U-8000-DE.severity"
-msgstr "Major"
-msgid "SUN4U-8000-DE.description"
-msgstr "The number of errors associated with this CPU has exceeded acceptable levels. Refer to %s for more information."
-msgid "SUN4U-8000-DE.response"
-msgstr "The fault manager will attempt to remove the affected CPU from service."
-msgid "SUN4U-8000-DE.impact"
-msgstr "System performance may be affected."
-msgid "SUN4U-8000-DE.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>."
-#
-# code: SUN4U-8000-EJ
-# keys: fault.cpu.ultraSPARC-IIIplus.icache
-#
-msgid "SUN4U-8000-EJ.type"
-msgstr "Fault"
-msgid "SUN4U-8000-EJ.severity"
-msgstr "Major"
-msgid "SUN4U-8000-EJ.description"
-msgstr "The number of errors associated with this CPU has exceeded acceptable levels. Refer to %s for more information."
-msgid "SUN4U-8000-EJ.response"
-msgstr "The fault manager will attempt to remove the affected CPU from service."
-msgid "SUN4U-8000-EJ.impact"
-msgstr "System performance may be affected."
-msgid "SUN4U-8000-EJ.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>."
-#
-# code: SUN4U-8000-F2
-# keys: fault.cpu.ultraSPARC-IIIplus.l2cachedata
-#
-msgid "SUN4U-8000-F2.type"
-msgstr "Fault"
-msgid "SUN4U-8000-F2.severity"
-msgstr "Major"
-msgid "SUN4U-8000-F2.description"
-msgstr "The number of errors associated with this CPU has exceeded acceptable levels. Refer to %s for more information."
-msgid "SUN4U-8000-F2.response"
-msgstr "The fault manager will attempt to remove the affected CPU from service."
-msgid "SUN4U-8000-F2.impact"
-msgstr "System performance may be affected."
-msgid "SUN4U-8000-F2.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>."
-#
-# code: SUN4U-8000-GX
-# keys: fault.cpu.ultraSPARC-IIIplus.l2cachetag
-#
-msgid "SUN4U-8000-GX.type"
-msgstr "Fault"
-msgid "SUN4U-8000-GX.severity"
-msgstr "Major"
-msgid "SUN4U-8000-GX.description"
-msgstr "The number of errors associated with this CPU has exceeded acceptable levels. Refer to %s for more information."
-msgid "SUN4U-8000-GX.response"
-msgstr "An attempt will be made to remove the affected CPU from service."
-msgid "SUN4U-8000-GX.impact"
-msgstr "System performance may be affected."
-msgid "SUN4U-8000-GX.action"
-msgstr "Schedule a repair procedure to replace the affected CPU. Use fmdump -v -u <EVENT_ID> to identify the CPU."
-#
-# code: SUN4U-8000-H5
-# keys: fault.cpu.ultraSPARC-IV.dcache
-#
-msgid "SUN4U-8000-H5.type"
-msgstr "Fault"
-msgid "SUN4U-8000-H5.severity"
-msgstr "Major"
-msgid "SUN4U-8000-H5.description"
-msgstr "The number of errors associated with this CPU has exceeded acceptable levels. Refer to %s for more information."
-msgid "SUN4U-8000-H5.response"
-msgstr "The fault manager will attempt to remove the affected CPU from service."
-msgid "SUN4U-8000-H5.impact"
-msgstr "System performance may be affected."
-msgid "SUN4U-8000-H5.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>."
-#
-# code: SUN4U-8000-JS
-# keys: fault.cpu.ultraSPARC-IV.icache
-#
-msgid "SUN4U-8000-JS.type"
-msgstr "Fault"
-msgid "SUN4U-8000-JS.severity"
-msgstr "Major"
-msgid "SUN4U-8000-JS.description"
-msgstr "The number of errors associated with this CPU has exceeded acceptable levels. Refer to %s for more information."
-msgid "SUN4U-8000-JS.response"
-msgstr "The fault manager will attempt to remove the affected CPU from service."
-msgid "SUN4U-8000-JS.impact"
-msgstr "System performance may be affected."
-msgid "SUN4U-8000-JS.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>."
-#
-# code: SUN4U-8000-KA
-# keys: fault.cpu.ultraSPARC-IV.l2cachedata
-#
-msgid "SUN4U-8000-KA.type"
-msgstr "Fault"
-msgid "SUN4U-8000-KA.severity"
-msgstr "Major"
-msgid "SUN4U-8000-KA.description"
-msgstr "The number of errors associated with this CPU has exceeded acceptable levels. Refer to %s for more information."
-msgid "SUN4U-8000-KA.response"
-msgstr "The fault manager will attempt to remove the affected CPU from service."
-msgid "SUN4U-8000-KA.impact"
-msgstr "System performance may be affected."
-msgid "SUN4U-8000-KA.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>."
-#
-# code: SUN4U-8000-LP
-# keys: fault.cpu.ultraSPARC-IV.l2cachetag
-#
-msgid "SUN4U-8000-LP.type"
-msgstr "Fault"
-msgid "SUN4U-8000-LP.severity"
-msgstr "Major"
-msgid "SUN4U-8000-LP.description"
-msgstr "The number of errors associated with this CPU has exceeded acceptable levels. Refer to %s for more information."
-msgid "SUN4U-8000-LP.response"
-msgstr "The fault manager will attempt to remove the affected CPU from service."
-msgid "SUN4U-8000-LP.impact"
-msgstr "System performance may be affected."
-msgid "SUN4U-8000-LP.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>."
-#
-# code: SUN4U-8000-MD
-# keys: fault.cpu.ultraSPARC-III.fpu
-#
-msgid "SUN4U-8000-MD.type"
-msgstr "Fault"
-msgid "SUN4U-8000-MD.severity"
-msgstr "Major"
-msgid "SUN4U-8000-MD.description"
-msgstr "A fault has been detected in the FPU of this CPU. Refer to %s for more information."
-msgid "SUN4U-8000-MD.response"
-msgstr "The fault manager will attempt to remove the affected CPU from service."
-msgid "SUN4U-8000-MD.impact"
-msgstr "System performance may be affected."
-msgid "SUN4U-8000-MD.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>."
-#
-# code: SUN4U-8000-NH
-# keys: fault.cpu.ultraSPARC-IIIi.fpu
-#
-msgid "SUN4U-8000-NH.type"
-msgstr "Fault"
-msgid "SUN4U-8000-NH.severity"
-msgstr "Major"
-msgid "SUN4U-8000-NH.description"
-msgstr "A fault has been detected in the FPU of this CPU. Refer to %s for more information."
-msgid "SUN4U-8000-NH.response"
-msgstr "The fault manager will attempt to remove the affected CPU from service."
-msgid "SUN4U-8000-NH.impact"
-msgstr "System performance may be affected."
-msgid "SUN4U-8000-NH.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>."
-#
-# code: SUN4U-8000-P3
-# keys: fault.cpu.ultraSPARC-IIIplus.fpu
-#
-msgid "SUN4U-8000-P3.type"
-msgstr "Fault"
-msgid "SUN4U-8000-P3.severity"
-msgstr "Major"
-msgid "SUN4U-8000-P3.description"
-msgstr "A fault has been detected in the FPU of this CPU. Refer to %s for more information."
-msgid "SUN4U-8000-P3.response"
-msgstr "The fault manager will attempt to remove the affected CPU from service."
-msgid "SUN4U-8000-P3.impact"
-msgstr "System performance may be affected."
-msgid "SUN4U-8000-P3.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>."
-#
-# code: SUN4U-8000-QY
-# keys: fault.cpu.ultraSPARC-IV.fpu
-#
-msgid "SUN4U-8000-QY.type"
-msgstr "Fault"
-msgid "SUN4U-8000-QY.severity"
-msgstr "Major"
-msgid "SUN4U-8000-QY.description"
-msgstr "A fault has been detected in the FPU of this CPU. Refer to %s for more information."
-msgid "SUN4U-8000-QY.response"
-msgstr "The fault manager will attempt to remove the affected CPU from service."
-msgid "SUN4U-8000-QY.impact"
-msgstr "System performance may be affected."
-msgid "SUN4U-8000-QY.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>."
-#
-# code: SUN4U-8000-RQ
-# keys: fault.cpu.ultraSPARC-IVplus.fpu
-#
-msgid "SUN4U-8000-RQ.type"
-msgstr "Fault"
-msgid "SUN4U-8000-RQ.severity"
-msgstr "Major"
-msgid "SUN4U-8000-RQ.description"
-msgstr "A fault has been detected in the FPU of this CPU. Refer to %s for more information."
-msgid "SUN4U-8000-RQ.response"
-msgstr "The fault manager will attempt to remove the affected CPU from service."
-msgid "SUN4U-8000-RQ.impact"
-msgstr "System performance may be affected."
-msgid "SUN4U-8000-RQ.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>."
-#
-# code: SUN4U-8000-SC
-# keys: fault.cpu.ultraSPARC-IVplus.dcache
-#
-msgid "SUN4U-8000-SC.type"
-msgstr "Fault"
-msgid "SUN4U-8000-SC.severity"
-msgstr "Major"
-msgid "SUN4U-8000-SC.description"
-msgstr "The number of errors associated with this CPU has exceeded acceptable levels. Refer to %s for more information."
-msgid "SUN4U-8000-SC.response"
-msgstr "The fault manager will attempt to remove the affected CPU from service."
-msgid "SUN4U-8000-SC.impact"
-msgstr "System performance may be affected."
-msgid "SUN4U-8000-SC.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>."
-#
-# code: SUN4U-8000-TR
-# keys: fault.cpu.ultraSPARC-IVplus.icache
-#
-msgid "SUN4U-8000-TR.type"
-msgstr "Fault"
-msgid "SUN4U-8000-TR.severity"
-msgstr "Major"
-msgid "SUN4U-8000-TR.description"
-msgstr "The number of errors associated with this CPU has exceeded acceptable levels. Refer to %s for more information."
-msgid "SUN4U-8000-TR.response"
-msgstr "The fault manager will attempt to remove the affected CPU from service."
-msgid "SUN4U-8000-TR.impact"
-msgstr "System performance may be affected."
-msgid "SUN4U-8000-TR.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>."
-#
-# code: SUN4U-8000-U4
-# keys: fault.cpu.ultraSPARC-IVplus.pcache
-#
-msgid "SUN4U-8000-U4.type"
-msgstr "Fault"
-msgid "SUN4U-8000-U4.severity"
-msgstr "Major"
-msgid "SUN4U-8000-U4.description"
-msgstr "The number of errors associated with this CPU has exceeded acceptable levels. Refer to %s for more information."
-msgid "SUN4U-8000-U4.response"
-msgstr "The fault manager will attempt to remove the affected CPU from service."
-msgid "SUN4U-8000-U4.impact"
-msgstr "System performance may be affected."
-msgid "SUN4U-8000-U4.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>."
-#
-# code: SUN4U-8000-VX
-# keys: fault.cpu.ultraSPARC-IVplus.dtlb
-#
-msgid "SUN4U-8000-VX.type"
-msgstr "Fault"
-msgid "SUN4U-8000-VX.severity"
-msgstr "Major"
-msgid "SUN4U-8000-VX.description"
-msgstr "The number of errors associated with this CPU has exceeded acceptable levels. Refer to %s for more information."
-msgid "SUN4U-8000-VX.response"
-msgstr "The fault manager will attempt to remove the affected CPU from service."
-msgid "SUN4U-8000-VX.impact"
-msgstr "System performance may be affected."
-msgid "SUN4U-8000-VX.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>."
-#
-# code: SUN4U-8000-W2
-# keys: fault.cpu.ultraSPARC-IVplus.itlb
-#
-msgid "SUN4U-8000-W2.type"
-msgstr "Fault"
-msgid "SUN4U-8000-W2.severity"
-msgstr "Major"
-msgid "SUN4U-8000-W2.description"
-msgstr "The number of errors associated with this CPU has exceeded acceptable levels. Refer to %s for more information."
-msgid "SUN4U-8000-W2.response"
-msgstr "The fault manager will attempt to remove the affected CPU from service."
-msgid "SUN4U-8000-W2.impact"
-msgstr "System performance may be affected."
-msgid "SUN4U-8000-W2.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>."
-#
-# code: SUN4U-8000-XJ
-# keys: fault.cpu.ultraSPARC-IVplus.l2cachedata
-#
-msgid "SUN4U-8000-XJ.type"
-msgstr "Fault"
-msgid "SUN4U-8000-XJ.severity"
-msgstr "Major"
-msgid "SUN4U-8000-XJ.description"
-msgstr "The number of errors associated with this CPU has exceeded acceptable levels. Refer to %s for more information."
-msgid "SUN4U-8000-XJ.response"
-msgstr "The fault manager will attempt to remove the affected CPU from service."
-msgid "SUN4U-8000-XJ.impact"
-msgstr "System performance may be affected."
-msgid "SUN4U-8000-XJ.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>."
-#
-# code: SUN4U-8000-YE
-# keys: fault.cpu.ultraSPARC-IVplus.l2cachetag
-#
-msgid "SUN4U-8000-YE.type"
-msgstr "Fault"
-msgid "SUN4U-8000-YE.severity"
-msgstr "Major"
-msgid "SUN4U-8000-YE.description"
-msgstr "The number of errors associated with this CPU has exceeded acceptable levels. Refer to %s for more information."
-msgid "SUN4U-8000-YE.response"
-msgstr "The fault manager will attempt to remove the affected CPU from service."
-msgid "SUN4U-8000-YE.impact"
-msgstr "System performance may be affected."
-msgid "SUN4U-8000-YE.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>."
-#
-# code: SUN4U-8001-0J
-# keys: fault.cpu.ultraSPARC-IVplus.l3cachedata
-#
-msgid "SUN4U-8001-0J.type"
-msgstr "Fault"
-msgid "SUN4U-8001-0J.severity"
-msgstr "Major"
-msgid "SUN4U-8001-0J.description"
-msgstr "The number of errors associated with this CPU has exceeded acceptable levels. Refer to %s for more information."
-msgid "SUN4U-8001-0J.response"
-msgstr "The fault manager will attempt to remove the affected CPU from service."
-msgid "SUN4U-8001-0J.impact"
-msgstr "System performance may be affected."
-msgid "SUN4U-8001-0J.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>."
-#
-# code: SUN4U-8001-1E
-# keys: fault.cpu.ultraSPARC-IVplus.l3cachetag
-#
-msgid "SUN4U-8001-1E.type"
-msgstr "Fault"
-msgid "SUN4U-8001-1E.severity"
-msgstr "Major"
-msgid "SUN4U-8001-1E.description"
-msgstr "The number of errors associated with this CPU has exceeded acceptable levels. Refer to %s for more information."
-msgid "SUN4U-8001-1E.response"
-msgstr "The fault manager will attempt to remove the affected CPU from service."
-msgid "SUN4U-8001-1E.impact"
-msgstr "System performance may be affected."
-msgid "SUN4U-8001-1E.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>."
-#
-# code: SUN4U-8001-2X
-# keys: defect.ultraSPARC-II.memory.nodiag
-#
-msgid "SUN4U-8001-2X.type"
-msgstr "Defect"
-msgid "SUN4U-8001-2X.severity"
-msgstr "Minor"
-msgid "SUN4U-8001-2X.description"
-msgstr "The illumos Fault Manager received an event from the IO subsystem for which automated diagnosis software is currently unavailable. Refer to %s for more information."
-msgid "SUN4U-8001-2X.response"
-msgstr "The error information has been saved for examination by your illumos distribution team."
-msgid "SUN4U-8001-2X.impact"
-msgstr "The error log will need to be manually examined using fmdump(8) in order to determine if any human response is required."
-msgid "SUN4U-8001-2X.action"
-msgstr "Use fmdump -ev -u <EVENT-ID> to view and record the undiagnosed errors."
-#
-# code: SUN4U-8001-32
-# keys: fault.memory.datapath
-#
-msgid "SUN4U-8001-32.type"
-msgstr "Fault"
-msgid "SUN4U-8001-32.severity"
-msgstr "Major"
-msgid "SUN4U-8001-32.description"
-msgstr "Errors have been detected on multiple memory modules, suggesting that a problem exists somewhere else in the system. Refer to %s for more information."
-msgid "SUN4U-8001-32.response"
-msgstr "Error reports from the affected components will be logged for examination by your illumos distribution team."
-msgid "SUN4U-8001-32.impact"
-msgstr "System performance and stability may be affected."
-msgid "SUN4U-8001-32.action"
-msgstr "Contact your service provider for further diagnosis."
-#
-# code: SUN4U-8001-4R
-# keys: fault.io.datapath
-#
-msgid "SUN4U-8001-4R.type"
-msgstr "Fault"
-msgid "SUN4U-8001-4R.severity"
-msgstr "Critical"
-msgid "SUN4U-8001-4R.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8001-4R.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8001-4R.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8001-4R.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8001-54
-# keys: defect.io.pci.driver fault.io.datapath
-#
-msgid "SUN4U-8001-54.type"
-msgstr "Fault"
-msgid "SUN4U-8001-54.severity"
-msgstr "Critical"
-msgid "SUN4U-8001-54.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8001-54.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8001-54.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8001-54.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8001-6Q
-# keys: fault.io.datapath fault.io.pci.bus
-#
-msgid "SUN4U-8001-6Q.type"
-msgstr "Fault"
-msgid "SUN4U-8001-6Q.severity"
-msgstr "Critical"
-msgid "SUN4U-8001-6Q.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8001-6Q.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8001-6Q.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8001-6Q.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8001-7C
-# keys: defect.io.pci.driver fault.io.datapath fault.io.pci.bus
-#
-msgid "SUN4U-8001-7C.type"
-msgstr "Fault"
-msgid "SUN4U-8001-7C.severity"
-msgstr "Critical"
-msgid "SUN4U-8001-7C.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8001-7C.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8001-7C.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8001-7C.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8001-83
-# keys: fault.io.datapath fault.io.pci.device
-#
-msgid "SUN4U-8001-83.type"
-msgstr "Fault"
-msgid "SUN4U-8001-83.severity"
-msgstr "Critical"
-msgid "SUN4U-8001-83.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8001-83.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8001-83.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8001-83.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8001-9Y
-# keys: defect.io.pci.driver fault.io.datapath fault.io.pci.device
-#
-msgid "SUN4U-8001-9Y.type"
-msgstr "Fault"
-msgid "SUN4U-8001-9Y.severity"
-msgstr "Critical"
-msgid "SUN4U-8001-9Y.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8001-9Y.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8001-9Y.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8001-9Y.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8001-AD
-# keys: fault.io.datapath fault.io.pci.bus fault.io.pci.device
-#
-msgid "SUN4U-8001-AD.type"
-msgstr "Fault"
-msgid "SUN4U-8001-AD.severity"
-msgstr "Critical"
-msgid "SUN4U-8001-AD.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8001-AD.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8001-AD.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8001-AD.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8001-CH
-# keys: defect.io.pci.driver fault.io.datapath fault.io.pci.bus fault.io.pci.device
-#
-msgid "SUN4U-8001-CH.type"
-msgstr "Fault"
-msgid "SUN4U-8001-CH.severity"
-msgstr "Critical"
-msgid "SUN4U-8001-CH.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8001-CH.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8001-CH.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8001-CH.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8001-DA
-# keys: fault.io.hbus
-#
-msgid "SUN4U-8001-DA.type"
-msgstr "Fault"
-msgid "SUN4U-8001-DA.severity"
-msgstr "Critical"
-msgid "SUN4U-8001-DA.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8001-DA.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8001-DA.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8001-DA.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8001-EP
-# keys: defect.io.pci.driver fault.io.hbus
-#
-msgid "SUN4U-8001-EP.type"
-msgstr "Fault"
-msgid "SUN4U-8001-EP.severity"
-msgstr "Critical"
-msgid "SUN4U-8001-EP.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8001-EP.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8001-EP.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8001-EP.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8001-F5
-# keys: fault.io.hbus fault.io.pci.bus
-#
-msgid "SUN4U-8001-F5.type"
-msgstr "Fault"
-msgid "SUN4U-8001-F5.severity"
-msgstr "Critical"
-msgid "SUN4U-8001-F5.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8001-F5.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8001-F5.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8001-F5.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8001-GS
-# keys: defect.io.pci.driver fault.io.hbus fault.io.pci.bus
-#
-msgid "SUN4U-8001-GS.type"
-msgstr "Fault"
-msgid "SUN4U-8001-GS.severity"
-msgstr "Critical"
-msgid "SUN4U-8001-GS.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8001-GS.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8001-GS.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8001-GS.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8001-H2
-# keys: fault.io.hbus fault.io.pci.device
-#
-msgid "SUN4U-8001-H2.type"
-msgstr "Fault"
-msgid "SUN4U-8001-H2.severity"
-msgstr "Critical"
-msgid "SUN4U-8001-H2.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8001-H2.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8001-H2.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8001-H2.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8001-JX
-# keys: defect.io.pci.driver fault.io.hbus fault.io.pci.device
-#
-msgid "SUN4U-8001-JX.type"
-msgstr "Fault"
-msgid "SUN4U-8001-JX.severity"
-msgstr "Critical"
-msgid "SUN4U-8001-JX.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8001-JX.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8001-JX.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8001-JX.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8001-KE
-# keys: fault.io.hbus fault.io.pci.bus fault.io.pci.device
-#
-msgid "SUN4U-8001-KE.type"
-msgstr "Fault"
-msgid "SUN4U-8001-KE.severity"
-msgstr "Critical"
-msgid "SUN4U-8001-KE.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8001-KE.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8001-KE.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8001-KE.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8001-LJ
-# keys: defect.io.pci.driver fault.io.hbus fault.io.pci.bus fault.io.pci.device
-#
-msgid "SUN4U-8001-LJ.type"
-msgstr "Fault"
-msgid "SUN4U-8001-LJ.severity"
-msgstr "Critical"
-msgid "SUN4U-8001-LJ.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8001-LJ.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8001-LJ.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8001-LJ.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8001-MC
-# keys: fault.io.datapath fault.io.hbus
-#
-msgid "SUN4U-8001-MC.type"
-msgstr "Fault"
-msgid "SUN4U-8001-MC.severity"
-msgstr "Critical"
-msgid "SUN4U-8001-MC.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8001-MC.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8001-MC.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8001-MC.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8001-NQ
-# keys: defect.io.pci.driver fault.io.datapath fault.io.hbus
-#
-msgid "SUN4U-8001-NQ.type"
-msgstr "Fault"
-msgid "SUN4U-8001-NQ.severity"
-msgstr "Critical"
-msgid "SUN4U-8001-NQ.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8001-NQ.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8001-NQ.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8001-NQ.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8001-P4
-# keys: fault.io.datapath fault.io.hbus fault.io.pci.bus
-#
-msgid "SUN4U-8001-P4.type"
-msgstr "Fault"
-msgid "SUN4U-8001-P4.severity"
-msgstr "Critical"
-msgid "SUN4U-8001-P4.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8001-P4.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8001-P4.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8001-P4.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8001-QR
-# keys: defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.pci.bus
-#
-msgid "SUN4U-8001-QR.type"
-msgstr "Fault"
-msgid "SUN4U-8001-QR.severity"
-msgstr "Critical"
-msgid "SUN4U-8001-QR.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8001-QR.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8001-QR.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8001-QR.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8001-RH
-# keys: fault.io.datapath fault.io.hbus fault.io.pci.device
-#
-msgid "SUN4U-8001-RH.type"
-msgstr "Fault"
-msgid "SUN4U-8001-RH.severity"
-msgstr "Critical"
-msgid "SUN4U-8001-RH.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8001-RH.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8001-RH.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8001-RH.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8001-SD
-# keys: defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.pci.device
-#
-msgid "SUN4U-8001-SD.type"
-msgstr "Fault"
-msgid "SUN4U-8001-SD.severity"
-msgstr "Critical"
-msgid "SUN4U-8001-SD.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8001-SD.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8001-SD.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8001-SD.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8001-TY
-# keys: fault.io.datapath fault.io.hbus fault.io.pci.bus fault.io.pci.device
-#
-msgid "SUN4U-8001-TY.type"
-msgstr "Fault"
-msgid "SUN4U-8001-TY.severity"
-msgstr "Critical"
-msgid "SUN4U-8001-TY.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8001-TY.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8001-TY.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8001-TY.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8001-U3
-# keys: defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.pci.bus fault.io.pci.device
-#
-msgid "SUN4U-8001-U3.type"
-msgstr "Fault"
-msgid "SUN4U-8001-U3.severity"
-msgstr "Critical"
-msgid "SUN4U-8001-U3.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8001-U3.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8001-U3.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8001-U3.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8001-VS
-# keys: fault.io.schizo
-#
-msgid "SUN4U-8001-VS.type"
-msgstr "Fault"
-msgid "SUN4U-8001-VS.severity"
-msgstr "Critical"
-msgid "SUN4U-8001-VS.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8001-VS.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8001-VS.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8001-VS.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8001-W5
-# keys: defect.io.pci.driver fault.io.schizo
-#
-msgid "SUN4U-8001-W5.type"
-msgstr "Fault"
-msgid "SUN4U-8001-W5.severity"
-msgstr "Critical"
-msgid "SUN4U-8001-W5.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8001-W5.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8001-W5.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8001-W5.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8001-XP
-# keys: fault.io.pci.bus fault.io.schizo
-#
-msgid "SUN4U-8001-XP.type"
-msgstr "Fault"
-msgid "SUN4U-8001-XP.severity"
-msgstr "Critical"
-msgid "SUN4U-8001-XP.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8001-XP.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8001-XP.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8001-XP.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8001-YA
-# keys: defect.io.pci.driver fault.io.pci.bus fault.io.schizo
-#
-msgid "SUN4U-8001-YA.type"
-msgstr "Fault"
-msgid "SUN4U-8001-YA.severity"
-msgstr "Critical"
-msgid "SUN4U-8001-YA.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8001-YA.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8001-YA.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8001-YA.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8002-0R
-# keys: fault.io.pci.device fault.io.schizo
-#
-msgid "SUN4U-8002-0R.type"
-msgstr "Fault"
-msgid "SUN4U-8002-0R.severity"
-msgstr "Critical"
-msgid "SUN4U-8002-0R.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8002-0R.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8002-0R.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8002-0R.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8002-14
-# keys: defect.io.pci.driver fault.io.pci.device fault.io.schizo
-#
-msgid "SUN4U-8002-14.type"
-msgstr "Fault"
-msgid "SUN4U-8002-14.severity"
-msgstr "Critical"
-msgid "SUN4U-8002-14.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8002-14.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8002-14.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8002-14.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8002-2Q
-# keys: fault.io.pci.bus fault.io.pci.device fault.io.schizo
-#
-msgid "SUN4U-8002-2Q.type"
-msgstr "Fault"
-msgid "SUN4U-8002-2Q.severity"
-msgstr "Critical"
-msgid "SUN4U-8002-2Q.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8002-2Q.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8002-2Q.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8002-2Q.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8002-3C
-# keys: defect.io.pci.driver fault.io.pci.bus fault.io.pci.device fault.io.schizo
-#
-msgid "SUN4U-8002-3C.type"
-msgstr "Fault"
-msgid "SUN4U-8002-3C.severity"
-msgstr "Critical"
-msgid "SUN4U-8002-3C.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8002-3C.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8002-3C.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8002-3C.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8002-4J
-# keys: fault.io.datapath fault.io.schizo
-#
-msgid "SUN4U-8002-4J.type"
-msgstr "Fault"
-msgid "SUN4U-8002-4J.severity"
-msgstr "Critical"
-msgid "SUN4U-8002-4J.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8002-4J.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8002-4J.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8002-4J.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8002-5E
-# keys: defect.io.pci.driver fault.io.datapath fault.io.schizo
-#
-msgid "SUN4U-8002-5E.type"
-msgstr "Fault"
-msgid "SUN4U-8002-5E.severity"
-msgstr "Critical"
-msgid "SUN4U-8002-5E.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8002-5E.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8002-5E.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8002-5E.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8002-6X
-# keys: fault.io.datapath fault.io.pci.bus fault.io.schizo
-#
-msgid "SUN4U-8002-6X.type"
-msgstr "Fault"
-msgid "SUN4U-8002-6X.severity"
-msgstr "Critical"
-msgid "SUN4U-8002-6X.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8002-6X.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8002-6X.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8002-6X.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8002-72
-# keys: defect.io.pci.driver fault.io.datapath fault.io.pci.bus fault.io.schizo
-#
-msgid "SUN4U-8002-72.type"
-msgstr "Fault"
-msgid "SUN4U-8002-72.severity"
-msgstr "Critical"
-msgid "SUN4U-8002-72.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8002-72.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8002-72.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8002-72.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8002-8A
-# keys: fault.io.datapath fault.io.pci.device fault.io.schizo
-#
-msgid "SUN4U-8002-8A.type"
-msgstr "Fault"
-msgid "SUN4U-8002-8A.severity"
-msgstr "Critical"
-msgid "SUN4U-8002-8A.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8002-8A.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8002-8A.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8002-8A.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8002-9P
-# keys: defect.io.pci.driver fault.io.datapath fault.io.pci.device fault.io.schizo
-#
-msgid "SUN4U-8002-9P.type"
-msgstr "Fault"
-msgid "SUN4U-8002-9P.severity"
-msgstr "Critical"
-msgid "SUN4U-8002-9P.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8002-9P.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8002-9P.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8002-9P.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8002-A5
-# keys: fault.io.datapath fault.io.pci.bus fault.io.pci.device fault.io.schizo
-#
-msgid "SUN4U-8002-A5.type"
-msgstr "Fault"
-msgid "SUN4U-8002-A5.severity"
-msgstr "Critical"
-msgid "SUN4U-8002-A5.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8002-A5.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8002-A5.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8002-A5.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8002-CS
-# keys: defect.io.pci.driver fault.io.datapath fault.io.pci.bus fault.io.pci.device fault.io.schizo
-#
-msgid "SUN4U-8002-CS.type"
-msgstr "Fault"
-msgid "SUN4U-8002-CS.severity"
-msgstr "Critical"
-msgid "SUN4U-8002-CS.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8002-CS.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8002-CS.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8002-CS.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8002-D3
-# keys: fault.io.hbus fault.io.schizo
-#
-msgid "SUN4U-8002-D3.type"
-msgstr "Fault"
-msgid "SUN4U-8002-D3.severity"
-msgstr "Critical"
-msgid "SUN4U-8002-D3.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8002-D3.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8002-D3.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8002-D3.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8002-EY
-# keys: defect.io.pci.driver fault.io.hbus fault.io.schizo
-#
-msgid "SUN4U-8002-EY.type"
-msgstr "Fault"
-msgid "SUN4U-8002-EY.severity"
-msgstr "Critical"
-msgid "SUN4U-8002-EY.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8002-EY.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8002-EY.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8002-EY.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8002-FD
-# keys: fault.io.hbus fault.io.pci.bus fault.io.schizo
-#
-msgid "SUN4U-8002-FD.type"
-msgstr "Fault"
-msgid "SUN4U-8002-FD.severity"
-msgstr "Critical"
-msgid "SUN4U-8002-FD.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8002-FD.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8002-FD.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8002-FD.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8002-GH
-# keys: defect.io.pci.driver fault.io.hbus fault.io.pci.bus fault.io.schizo
-#
-msgid "SUN4U-8002-GH.type"
-msgstr "Fault"
-msgid "SUN4U-8002-GH.severity"
-msgstr "Critical"
-msgid "SUN4U-8002-GH.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8002-GH.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8002-GH.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8002-GH.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8002-HC
-# keys: fault.io.hbus fault.io.pci.device fault.io.schizo
-#
-msgid "SUN4U-8002-HC.type"
-msgstr "Fault"
-msgid "SUN4U-8002-HC.severity"
-msgstr "Critical"
-msgid "SUN4U-8002-HC.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8002-HC.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8002-HC.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8002-HC.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8002-JQ
-# keys: defect.io.pci.driver fault.io.hbus fault.io.pci.device fault.io.schizo
-#
-msgid "SUN4U-8002-JQ.type"
-msgstr "Fault"
-msgid "SUN4U-8002-JQ.severity"
-msgstr "Critical"
-msgid "SUN4U-8002-JQ.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8002-JQ.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8002-JQ.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8002-JQ.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8002-K4
-# keys: fault.io.hbus fault.io.pci.bus fault.io.pci.device fault.io.schizo
-#
-msgid "SUN4U-8002-K4.type"
-msgstr "Fault"
-msgid "SUN4U-8002-K4.severity"
-msgstr "Critical"
-msgid "SUN4U-8002-K4.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8002-K4.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8002-K4.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8002-K4.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8002-LR
-# keys: defect.io.pci.driver fault.io.hbus fault.io.pci.bus fault.io.pci.device fault.io.schizo
-#
-msgid "SUN4U-8002-LR.type"
-msgstr "Fault"
-msgid "SUN4U-8002-LR.severity"
-msgstr "Critical"
-msgid "SUN4U-8002-LR.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8002-LR.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8002-LR.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8002-LR.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8002-M2
-# keys: fault.io.datapath fault.io.hbus fault.io.schizo
-#
-msgid "SUN4U-8002-M2.type"
-msgstr "Fault"
-msgid "SUN4U-8002-M2.severity"
-msgstr "Critical"
-msgid "SUN4U-8002-M2.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8002-M2.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8002-M2.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8002-M2.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8002-NX
-# keys: defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.schizo
-#
-msgid "SUN4U-8002-NX.type"
-msgstr "Fault"
-msgid "SUN4U-8002-NX.severity"
-msgstr "Critical"
-msgid "SUN4U-8002-NX.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8002-NX.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8002-NX.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8002-NX.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8002-PE
-# keys: fault.io.datapath fault.io.hbus fault.io.pci.bus fault.io.schizo
-#
-msgid "SUN4U-8002-PE.type"
-msgstr "Fault"
-msgid "SUN4U-8002-PE.severity"
-msgstr "Critical"
-msgid "SUN4U-8002-PE.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8002-PE.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8002-PE.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8002-PE.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8002-QJ
-# keys: defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.pci.bus fault.io.schizo
-#
-msgid "SUN4U-8002-QJ.type"
-msgstr "Fault"
-msgid "SUN4U-8002-QJ.severity"
-msgstr "Critical"
-msgid "SUN4U-8002-QJ.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8002-QJ.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8002-QJ.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8002-QJ.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8002-RS
-# keys: fault.io.datapath fault.io.hbus fault.io.pci.device fault.io.schizo
-#
-msgid "SUN4U-8002-RS.type"
-msgstr "Fault"
-msgid "SUN4U-8002-RS.severity"
-msgstr "Critical"
-msgid "SUN4U-8002-RS.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8002-RS.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8002-RS.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8002-RS.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8002-S5
-# keys: defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.pci.device fault.io.schizo
-#
-msgid "SUN4U-8002-S5.type"
-msgstr "Fault"
-msgid "SUN4U-8002-S5.severity"
-msgstr "Critical"
-msgid "SUN4U-8002-S5.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8002-S5.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8002-S5.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8002-S5.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8002-TP
-# keys: fault.io.datapath fault.io.hbus fault.io.pci.bus fault.io.pci.device fault.io.schizo
-#
-msgid "SUN4U-8002-TP.type"
-msgstr "Fault"
-msgid "SUN4U-8002-TP.severity"
-msgstr "Critical"
-msgid "SUN4U-8002-TP.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8002-TP.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8002-TP.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8002-TP.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8002-UA
-# keys: defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.pci.bus fault.io.pci.device fault.io.schizo
-#
-msgid "SUN4U-8002-UA.type"
-msgstr "Fault"
-msgid "SUN4U-8002-UA.severity"
-msgstr "Critical"
-msgid "SUN4U-8002-UA.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8002-UA.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8002-UA.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8002-UA.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8002-VH
-# keys: fault.io.xmits
-#
-msgid "SUN4U-8002-VH.type"
-msgstr "Fault"
-msgid "SUN4U-8002-VH.severity"
-msgstr "Critical"
-msgid "SUN4U-8002-VH.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8002-VH.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8002-VH.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8002-VH.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8002-WD
-# keys: defect.io.pci.driver fault.io.xmits
-#
-msgid "SUN4U-8002-WD.type"
-msgstr "Fault"
-msgid "SUN4U-8002-WD.severity"
-msgstr "Critical"
-msgid "SUN4U-8002-WD.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8002-WD.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8002-WD.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8002-WD.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8002-XY
-# keys: fault.io.pci.bus fault.io.xmits
-#
-msgid "SUN4U-8002-XY.type"
-msgstr "Fault"
-msgid "SUN4U-8002-XY.severity"
-msgstr "Critical"
-msgid "SUN4U-8002-XY.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8002-XY.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8002-XY.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8002-XY.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8002-Y3
-# keys: defect.io.pci.driver fault.io.pci.bus fault.io.xmits
-#
-msgid "SUN4U-8002-Y3.type"
-msgstr "Fault"
-msgid "SUN4U-8002-Y3.severity"
-msgstr "Critical"
-msgid "SUN4U-8002-Y3.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8002-Y3.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8002-Y3.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8002-Y3.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8003-0Y
-# keys: fault.io.pci.device fault.io.xmits
-#
-msgid "SUN4U-8003-0Y.type"
-msgstr "Fault"
-msgid "SUN4U-8003-0Y.severity"
-msgstr "Critical"
-msgid "SUN4U-8003-0Y.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8003-0Y.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8003-0Y.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8003-0Y.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8003-13
-# keys: defect.io.pci.driver fault.io.pci.device fault.io.xmits
-#
-msgid "SUN4U-8003-13.type"
-msgstr "Fault"
-msgid "SUN4U-8003-13.severity"
-msgstr "Critical"
-msgid "SUN4U-8003-13.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8003-13.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8003-13.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8003-13.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8003-2H
-# keys: fault.io.pci.bus fault.io.pci.device fault.io.xmits
-#
-msgid "SUN4U-8003-2H.type"
-msgstr "Fault"
-msgid "SUN4U-8003-2H.severity"
-msgstr "Critical"
-msgid "SUN4U-8003-2H.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8003-2H.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8003-2H.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8003-2H.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8003-3D
-# keys: defect.io.pci.driver fault.io.pci.bus fault.io.pci.device fault.io.xmits
-#
-msgid "SUN4U-8003-3D.type"
-msgstr "Fault"
-msgid "SUN4U-8003-3D.severity"
-msgstr "Critical"
-msgid "SUN4U-8003-3D.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8003-3D.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8003-3D.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8003-3D.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8003-4P
-# keys: fault.io.datapath fault.io.xmits
-#
-msgid "SUN4U-8003-4P.type"
-msgstr "Fault"
-msgid "SUN4U-8003-4P.severity"
-msgstr "Critical"
-msgid "SUN4U-8003-4P.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8003-4P.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8003-4P.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8003-4P.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8003-5A
-# keys: defect.io.pci.driver fault.io.datapath fault.io.xmits
-#
-msgid "SUN4U-8003-5A.type"
-msgstr "Fault"
-msgid "SUN4U-8003-5A.severity"
-msgstr "Critical"
-msgid "SUN4U-8003-5A.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8003-5A.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8003-5A.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8003-5A.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8003-6S
-# keys: fault.io.datapath fault.io.pci.bus fault.io.xmits
-#
-msgid "SUN4U-8003-6S.type"
-msgstr "Fault"
-msgid "SUN4U-8003-6S.severity"
-msgstr "Critical"
-msgid "SUN4U-8003-6S.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8003-6S.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8003-6S.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8003-6S.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8003-75
-# keys: defect.io.pci.driver fault.io.datapath fault.io.pci.bus fault.io.xmits
-#
-msgid "SUN4U-8003-75.type"
-msgstr "Fault"
-msgid "SUN4U-8003-75.severity"
-msgstr "Critical"
-msgid "SUN4U-8003-75.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8003-75.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8003-75.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8003-75.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8003-8E
-# keys: fault.io.datapath fault.io.pci.device fault.io.xmits
-#
-msgid "SUN4U-8003-8E.type"
-msgstr "Fault"
-msgid "SUN4U-8003-8E.severity"
-msgstr "Critical"
-msgid "SUN4U-8003-8E.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8003-8E.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8003-8E.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8003-8E.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8003-9J
-# keys: defect.io.pci.driver fault.io.datapath fault.io.pci.device fault.io.xmits
-#
-msgid "SUN4U-8003-9J.type"
-msgstr "Fault"
-msgid "SUN4U-8003-9J.severity"
-msgstr "Critical"
-msgid "SUN4U-8003-9J.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8003-9J.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8003-9J.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8003-9J.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8003-A2
-# keys: fault.io.datapath fault.io.pci.bus fault.io.pci.device fault.io.xmits
-#
-msgid "SUN4U-8003-A2.type"
-msgstr "Fault"
-msgid "SUN4U-8003-A2.severity"
-msgstr "Critical"
-msgid "SUN4U-8003-A2.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8003-A2.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8003-A2.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8003-A2.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8003-CX
-# keys: defect.io.pci.driver fault.io.datapath fault.io.pci.bus fault.io.pci.device fault.io.xmits
-#
-msgid "SUN4U-8003-CX.type"
-msgstr "Fault"
-msgid "SUN4U-8003-CX.severity"
-msgstr "Critical"
-msgid "SUN4U-8003-CX.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8003-CX.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8003-CX.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8003-CX.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8003-D4
-# keys: fault.io.hbus fault.io.xmits
-#
-msgid "SUN4U-8003-D4.type"
-msgstr "Fault"
-msgid "SUN4U-8003-D4.severity"
-msgstr "Critical"
-msgid "SUN4U-8003-D4.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8003-D4.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8003-D4.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8003-D4.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8003-ER
-# keys: defect.io.pci.driver fault.io.hbus fault.io.xmits
-#
-msgid "SUN4U-8003-ER.type"
-msgstr "Fault"
-msgid "SUN4U-8003-ER.severity"
-msgstr "Critical"
-msgid "SUN4U-8003-ER.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8003-ER.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8003-ER.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8003-ER.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8003-FC
-# keys: fault.io.hbus fault.io.pci.bus fault.io.xmits
-#
-msgid "SUN4U-8003-FC.type"
-msgstr "Fault"
-msgid "SUN4U-8003-FC.severity"
-msgstr "Critical"
-msgid "SUN4U-8003-FC.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8003-FC.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8003-FC.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8003-FC.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8003-GQ
-# keys: defect.io.pci.driver fault.io.hbus fault.io.pci.bus fault.io.xmits
-#
-msgid "SUN4U-8003-GQ.type"
-msgstr "Fault"
-msgid "SUN4U-8003-GQ.severity"
-msgstr "Critical"
-msgid "SUN4U-8003-GQ.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8003-GQ.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8003-GQ.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8003-GQ.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8003-HD
-# keys: fault.io.hbus fault.io.pci.device fault.io.xmits
-#
-msgid "SUN4U-8003-HD.type"
-msgstr "Fault"
-msgid "SUN4U-8003-HD.severity"
-msgstr "Critical"
-msgid "SUN4U-8003-HD.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8003-HD.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8003-HD.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8003-HD.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8003-JH
-# keys: defect.io.pci.driver fault.io.hbus fault.io.pci.device fault.io.xmits
-#
-msgid "SUN4U-8003-JH.type"
-msgstr "Fault"
-msgid "SUN4U-8003-JH.severity"
-msgstr "Critical"
-msgid "SUN4U-8003-JH.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8003-JH.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8003-JH.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8003-JH.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8003-K3
-# keys: fault.io.hbus fault.io.pci.bus fault.io.pci.device fault.io.xmits
-#
-msgid "SUN4U-8003-K3.type"
-msgstr "Fault"
-msgid "SUN4U-8003-K3.severity"
-msgstr "Critical"
-msgid "SUN4U-8003-K3.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8003-K3.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8003-K3.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8003-K3.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8003-LY
-# keys: defect.io.pci.driver fault.io.hbus fault.io.pci.bus fault.io.pci.device fault.io.xmits
-#
-msgid "SUN4U-8003-LY.type"
-msgstr "Fault"
-msgid "SUN4U-8003-LY.severity"
-msgstr "Critical"
-msgid "SUN4U-8003-LY.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8003-LY.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8003-LY.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8003-LY.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8003-M5
-# keys: fault.io.datapath fault.io.hbus fault.io.xmits
-#
-msgid "SUN4U-8003-M5.type"
-msgstr "Fault"
-msgid "SUN4U-8003-M5.severity"
-msgstr "Critical"
-msgid "SUN4U-8003-M5.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8003-M5.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8003-M5.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8003-M5.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8003-NS
-# keys: defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.xmits
-#
-msgid "SUN4U-8003-NS.type"
-msgstr "Fault"
-msgid "SUN4U-8003-NS.severity"
-msgstr "Critical"
-msgid "SUN4U-8003-NS.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8003-NS.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8003-NS.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8003-NS.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8003-PA
-# keys: fault.io.datapath fault.io.hbus fault.io.pci.bus fault.io.xmits
-#
-msgid "SUN4U-8003-PA.type"
-msgstr "Fault"
-msgid "SUN4U-8003-PA.severity"
-msgstr "Critical"
-msgid "SUN4U-8003-PA.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8003-PA.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8003-PA.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8003-PA.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8003-QP
-# keys: defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.pci.bus fault.io.xmits
-#
-msgid "SUN4U-8003-QP.type"
-msgstr "Fault"
-msgid "SUN4U-8003-QP.severity"
-msgstr "Critical"
-msgid "SUN4U-8003-QP.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8003-QP.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8003-QP.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8003-QP.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8003-RX
-# keys: fault.io.datapath fault.io.hbus fault.io.pci.device fault.io.xmits
-#
-msgid "SUN4U-8003-RX.type"
-msgstr "Fault"
-msgid "SUN4U-8003-RX.severity"
-msgstr "Critical"
-msgid "SUN4U-8003-RX.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8003-RX.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8003-RX.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8003-RX.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8003-S2
-# keys: defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.pci.device fault.io.xmits
-#
-msgid "SUN4U-8003-S2.type"
-msgstr "Fault"
-msgid "SUN4U-8003-S2.severity"
-msgstr "Critical"
-msgid "SUN4U-8003-S2.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8003-S2.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8003-S2.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8003-S2.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8003-TJ
-# keys: fault.io.datapath fault.io.hbus fault.io.pci.bus fault.io.pci.device fault.io.xmits
-#
-msgid "SUN4U-8003-TJ.type"
-msgstr "Fault"
-msgid "SUN4U-8003-TJ.severity"
-msgstr "Critical"
-msgid "SUN4U-8003-TJ.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8003-TJ.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8003-TJ.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8003-TJ.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8003-UE
-# keys: defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.pci.bus fault.io.pci.device fault.io.xmits
-#
-msgid "SUN4U-8003-UE.type"
-msgstr "Fault"
-msgid "SUN4U-8003-UE.severity"
-msgstr "Critical"
-msgid "SUN4U-8003-UE.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8003-UE.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8003-UE.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8003-UE.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8003-VQ
-# keys: fault.io.schizo fault.io.xmits
-#
-msgid "SUN4U-8003-VQ.type"
-msgstr "Fault"
-msgid "SUN4U-8003-VQ.severity"
-msgstr "Critical"
-msgid "SUN4U-8003-VQ.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8003-VQ.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8003-VQ.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8003-VQ.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8003-WC
-# keys: defect.io.pci.driver fault.io.schizo fault.io.xmits
-#
-msgid "SUN4U-8003-WC.type"
-msgstr "Fault"
-msgid "SUN4U-8003-WC.severity"
-msgstr "Critical"
-msgid "SUN4U-8003-WC.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8003-WC.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8003-WC.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8003-WC.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8003-XR
-# keys: fault.io.pci.bus fault.io.schizo fault.io.xmits
-#
-msgid "SUN4U-8003-XR.type"
-msgstr "Fault"
-msgid "SUN4U-8003-XR.severity"
-msgstr "Critical"
-msgid "SUN4U-8003-XR.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8003-XR.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8003-XR.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8003-XR.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8003-Y4
-# keys: defect.io.pci.driver fault.io.pci.bus fault.io.schizo fault.io.xmits
-#
-msgid "SUN4U-8003-Y4.type"
-msgstr "Fault"
-msgid "SUN4U-8003-Y4.severity"
-msgstr "Critical"
-msgid "SUN4U-8003-Y4.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8003-Y4.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8003-Y4.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8003-Y4.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8004-0A
-# keys: fault.io.pci.device fault.io.schizo fault.io.xmits
-#
-msgid "SUN4U-8004-0A.type"
-msgstr "Fault"
-msgid "SUN4U-8004-0A.severity"
-msgstr "Critical"
-msgid "SUN4U-8004-0A.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8004-0A.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8004-0A.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8004-0A.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8004-1P
-# keys: defect.io.pci.driver fault.io.pci.device fault.io.schizo fault.io.xmits
-#
-msgid "SUN4U-8004-1P.type"
-msgstr "Fault"
-msgid "SUN4U-8004-1P.severity"
-msgstr "Critical"
-msgid "SUN4U-8004-1P.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8004-1P.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8004-1P.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8004-1P.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8004-25
-# keys: fault.io.pci.bus fault.io.pci.device fault.io.schizo fault.io.xmits
-#
-msgid "SUN4U-8004-25.type"
-msgstr "Fault"
-msgid "SUN4U-8004-25.severity"
-msgstr "Critical"
-msgid "SUN4U-8004-25.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8004-25.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8004-25.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8004-25.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8004-3S
-# keys: defect.io.pci.driver fault.io.pci.bus fault.io.pci.device fault.io.schizo fault.io.xmits
-#
-msgid "SUN4U-8004-3S.type"
-msgstr "Fault"
-msgid "SUN4U-8004-3S.severity"
-msgstr "Critical"
-msgid "SUN4U-8004-3S.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8004-3S.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8004-3S.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8004-3S.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8004-43
-# keys: fault.io.datapath fault.io.schizo fault.io.xmits
-#
-msgid "SUN4U-8004-43.type"
-msgstr "Fault"
-msgid "SUN4U-8004-43.severity"
-msgstr "Critical"
-msgid "SUN4U-8004-43.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8004-43.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8004-43.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8004-43.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8004-5Y
-# keys: defect.io.pci.driver fault.io.datapath fault.io.schizo fault.io.xmits
-#
-msgid "SUN4U-8004-5Y.type"
-msgstr "Fault"
-msgid "SUN4U-8004-5Y.severity"
-msgstr "Critical"
-msgid "SUN4U-8004-5Y.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8004-5Y.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8004-5Y.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8004-5Y.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8004-6D
-# keys: fault.io.datapath fault.io.pci.bus fault.io.schizo fault.io.xmits
-#
-msgid "SUN4U-8004-6D.type"
-msgstr "Fault"
-msgid "SUN4U-8004-6D.severity"
-msgstr "Critical"
-msgid "SUN4U-8004-6D.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8004-6D.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8004-6D.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8004-6D.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8004-7H
-# keys: defect.io.pci.driver fault.io.datapath fault.io.pci.bus fault.io.schizo fault.io.xmits
-#
-msgid "SUN4U-8004-7H.type"
-msgstr "Fault"
-msgid "SUN4U-8004-7H.severity"
-msgstr "Critical"
-msgid "SUN4U-8004-7H.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8004-7H.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8004-7H.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8004-7H.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8004-8R
-# keys: fault.io.datapath fault.io.pci.device fault.io.schizo fault.io.xmits
-#
-msgid "SUN4U-8004-8R.type"
-msgstr "Fault"
-msgid "SUN4U-8004-8R.severity"
-msgstr "Critical"
-msgid "SUN4U-8004-8R.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8004-8R.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8004-8R.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8004-8R.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8004-94
-# keys: defect.io.pci.driver fault.io.datapath fault.io.pci.device fault.io.schizo fault.io.xmits
-#
-msgid "SUN4U-8004-94.type"
-msgstr "Fault"
-msgid "SUN4U-8004-94.severity"
-msgstr "Critical"
-msgid "SUN4U-8004-94.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8004-94.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8004-94.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8004-94.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8004-AQ
-# keys: fault.io.datapath fault.io.pci.bus fault.io.pci.device fault.io.schizo fault.io.xmits
-#
-msgid "SUN4U-8004-AQ.type"
-msgstr "Fault"
-msgid "SUN4U-8004-AQ.severity"
-msgstr "Critical"
-msgid "SUN4U-8004-AQ.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8004-AQ.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8004-AQ.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8004-AQ.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8004-CC
-# keys: defect.io.pci.driver fault.io.datapath fault.io.pci.bus fault.io.pci.device fault.io.schizo fault.io.xmits
-#
-msgid "SUN4U-8004-CC.type"
-msgstr "Fault"
-msgid "SUN4U-8004-CC.severity"
-msgstr "Critical"
-msgid "SUN4U-8004-CC.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8004-CC.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8004-CC.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8004-CC.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8004-DJ
-# keys: fault.io.hbus fault.io.schizo fault.io.xmits
-#
-msgid "SUN4U-8004-DJ.type"
-msgstr "Fault"
-msgid "SUN4U-8004-DJ.severity"
-msgstr "Critical"
-msgid "SUN4U-8004-DJ.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8004-DJ.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8004-DJ.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8004-DJ.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8004-EE
-# keys: defect.io.pci.driver fault.io.hbus fault.io.schizo fault.io.xmits
-#
-msgid "SUN4U-8004-EE.type"
-msgstr "Fault"
-msgid "SUN4U-8004-EE.severity"
-msgstr "Critical"
-msgid "SUN4U-8004-EE.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8004-EE.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8004-EE.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8004-EE.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8004-FX
-# keys: fault.io.hbus fault.io.pci.bus fault.io.schizo fault.io.xmits
-#
-msgid "SUN4U-8004-FX.type"
-msgstr "Fault"
-msgid "SUN4U-8004-FX.severity"
-msgstr "Critical"
-msgid "SUN4U-8004-FX.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8004-FX.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8004-FX.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8004-FX.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8004-G2
-# keys: defect.io.pci.driver fault.io.hbus fault.io.pci.bus fault.io.schizo fault.io.xmits
-#
-msgid "SUN4U-8004-G2.type"
-msgstr "Fault"
-msgid "SUN4U-8004-G2.severity"
-msgstr "Critical"
-msgid "SUN4U-8004-G2.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8004-G2.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8004-G2.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8004-G2.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8004-HS
-# keys: fault.io.hbus fault.io.pci.device fault.io.schizo fault.io.xmits
-#
-msgid "SUN4U-8004-HS.type"
-msgstr "Fault"
-msgid "SUN4U-8004-HS.severity"
-msgstr "Critical"
-msgid "SUN4U-8004-HS.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8004-HS.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8004-HS.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8004-HS.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8004-J5
-# keys: defect.io.pci.driver fault.io.hbus fault.io.pci.device fault.io.schizo fault.io.xmits
-#
-msgid "SUN4U-8004-J5.type"
-msgstr "Fault"
-msgid "SUN4U-8004-J5.severity"
-msgstr "Critical"
-msgid "SUN4U-8004-J5.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8004-J5.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8004-J5.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8004-J5.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8004-KP
-# keys: fault.io.hbus fault.io.pci.bus fault.io.pci.device fault.io.schizo fault.io.xmits
-#
-msgid "SUN4U-8004-KP.type"
-msgstr "Fault"
-msgid "SUN4U-8004-KP.severity"
-msgstr "Critical"
-msgid "SUN4U-8004-KP.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8004-KP.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8004-KP.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8004-KP.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8004-LA
-# keys: defect.io.pci.driver fault.io.hbus fault.io.pci.bus fault.io.pci.device fault.io.schizo fault.io.xmits
-#
-msgid "SUN4U-8004-LA.type"
-msgstr "Fault"
-msgid "SUN4U-8004-LA.severity"
-msgstr "Critical"
-msgid "SUN4U-8004-LA.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8004-LA.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8004-LA.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8004-LA.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8004-MH
-# keys: fault.io.datapath fault.io.hbus fault.io.schizo fault.io.xmits
-#
-msgid "SUN4U-8004-MH.type"
-msgstr "Fault"
-msgid "SUN4U-8004-MH.severity"
-msgstr "Critical"
-msgid "SUN4U-8004-MH.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8004-MH.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8004-MH.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8004-MH.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8004-ND
-# keys: defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.schizo fault.io.xmits
-#
-msgid "SUN4U-8004-ND.type"
-msgstr "Fault"
-msgid "SUN4U-8004-ND.severity"
-msgstr "Critical"
-msgid "SUN4U-8004-ND.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8004-ND.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8004-ND.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8004-ND.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8004-PY
-# keys: fault.io.datapath fault.io.hbus fault.io.pci.bus fault.io.schizo fault.io.xmits
-#
-msgid "SUN4U-8004-PY.type"
-msgstr "Fault"
-msgid "SUN4U-8004-PY.severity"
-msgstr "Critical"
-msgid "SUN4U-8004-PY.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8004-PY.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8004-PY.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8004-PY.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8004-Q3
-# keys: defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.pci.bus fault.io.schizo fault.io.xmits
-#
-msgid "SUN4U-8004-Q3.type"
-msgstr "Fault"
-msgid "SUN4U-8004-Q3.severity"
-msgstr "Critical"
-msgid "SUN4U-8004-Q3.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8004-Q3.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8004-Q3.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8004-Q3.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8004-RC
-# keys: fault.io.datapath fault.io.hbus fault.io.pci.device fault.io.schizo fault.io.xmits
-#
-msgid "SUN4U-8004-RC.type"
-msgstr "Fault"
-msgid "SUN4U-8004-RC.severity"
-msgstr "Critical"
-msgid "SUN4U-8004-RC.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8004-RC.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8004-RC.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8004-RC.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8004-SQ
-# keys: defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.pci.device fault.io.schizo fault.io.xmits
-#
-msgid "SUN4U-8004-SQ.type"
-msgstr "Fault"
-msgid "SUN4U-8004-SQ.severity"
-msgstr "Critical"
-msgid "SUN4U-8004-SQ.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8004-SQ.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8004-SQ.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8004-SQ.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8004-T4
-# keys: fault.io.datapath fault.io.hbus fault.io.pci.bus fault.io.pci.device fault.io.schizo fault.io.xmits
-#
-msgid "SUN4U-8004-T4.type"
-msgstr "Fault"
-msgid "SUN4U-8004-T4.severity"
-msgstr "Critical"
-msgid "SUN4U-8004-T4.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8004-T4.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8004-T4.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8004-T4.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8004-UR
-# keys: defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.pci.bus fault.io.pci.device fault.io.schizo fault.io.xmits
-#
-msgid "SUN4U-8004-UR.type"
-msgstr "Fault"
-msgid "SUN4U-8004-UR.severity"
-msgstr "Critical"
-msgid "SUN4U-8004-UR.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8004-UR.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8004-UR.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8004-UR.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8004-V2
-# keys: fault.io.psycho
-#
-msgid "SUN4U-8004-V2.type"
-msgstr "Fault"
-msgid "SUN4U-8004-V2.severity"
-msgstr "Critical"
-msgid "SUN4U-8004-V2.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8004-V2.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8004-V2.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8004-V2.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8004-WX
-# keys: defect.io.pci.driver fault.io.psycho
-#
-msgid "SUN4U-8004-WX.type"
-msgstr "Fault"
-msgid "SUN4U-8004-WX.severity"
-msgstr "Critical"
-msgid "SUN4U-8004-WX.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8004-WX.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8004-WX.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8004-WX.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8004-XE
-# keys: fault.io.datapath fault.io.psycho
-#
-msgid "SUN4U-8004-XE.type"
-msgstr "Fault"
-msgid "SUN4U-8004-XE.severity"
-msgstr "Critical"
-msgid "SUN4U-8004-XE.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8004-XE.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8004-XE.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8004-XE.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8004-YJ
-# keys: defect.io.pci.driver fault.io.datapath fault.io.psycho
-#
-msgid "SUN4U-8004-YJ.type"
-msgstr "Fault"
-msgid "SUN4U-8004-YJ.severity"
-msgstr "Critical"
-msgid "SUN4U-8004-YJ.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8004-YJ.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8004-YJ.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8004-YJ.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8005-0E
-# keys: fault.io.hbus fault.io.psycho
-#
-msgid "SUN4U-8005-0E.type"
-msgstr "Fault"
-msgid "SUN4U-8005-0E.severity"
-msgstr "Critical"
-msgid "SUN4U-8005-0E.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8005-0E.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8005-0E.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8005-0E.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8005-1J
-# keys: defect.io.pci.driver fault.io.hbus fault.io.psycho
-#
-msgid "SUN4U-8005-1J.type"
-msgstr "Fault"
-msgid "SUN4U-8005-1J.severity"
-msgstr "Critical"
-msgid "SUN4U-8005-1J.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8005-1J.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8005-1J.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8005-1J.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8005-22
-# keys: fault.io.datapath fault.io.hbus fault.io.psycho
-#
-msgid "SUN4U-8005-22.type"
-msgstr "Fault"
-msgid "SUN4U-8005-22.severity"
-msgstr "Critical"
-msgid "SUN4U-8005-22.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8005-22.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8005-22.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8005-22.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8005-3X
-# keys: defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.psycho
-#
-msgid "SUN4U-8005-3X.type"
-msgstr "Fault"
-msgid "SUN4U-8005-3X.severity"
-msgstr "Critical"
-msgid "SUN4U-8005-3X.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8005-3X.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8005-3X.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8005-3X.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8005-44
-# keys: fault.io.pci.bus fault.io.psycho
-#
-msgid "SUN4U-8005-44.type"
-msgstr "Fault"
-msgid "SUN4U-8005-44.severity"
-msgstr "Critical"
-msgid "SUN4U-8005-44.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8005-44.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8005-44.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8005-44.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8005-5R
-# keys: defect.io.pci.driver fault.io.pci.bus fault.io.psycho
-#
-msgid "SUN4U-8005-5R.type"
-msgstr "Fault"
-msgid "SUN4U-8005-5R.severity"
-msgstr "Critical"
-msgid "SUN4U-8005-5R.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8005-5R.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8005-5R.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8005-5R.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8005-6C
-# keys: fault.io.datapath fault.io.pci.bus fault.io.psycho
-#
-msgid "SUN4U-8005-6C.type"
-msgstr "Fault"
-msgid "SUN4U-8005-6C.severity"
-msgstr "Critical"
-msgid "SUN4U-8005-6C.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8005-6C.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8005-6C.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8005-6C.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8005-7Q
-# keys: defect.io.pci.driver fault.io.datapath fault.io.pci.bus fault.io.psycho
-#
-msgid "SUN4U-8005-7Q.type"
-msgstr "Fault"
-msgid "SUN4U-8005-7Q.severity"
-msgstr "Critical"
-msgid "SUN4U-8005-7Q.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8005-7Q.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8005-7Q.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8005-7Q.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8005-8Y
-# keys: fault.io.hbus fault.io.pci.bus fault.io.psycho
-#
-msgid "SUN4U-8005-8Y.type"
-msgstr "Fault"
-msgid "SUN4U-8005-8Y.severity"
-msgstr "Critical"
-msgid "SUN4U-8005-8Y.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8005-8Y.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8005-8Y.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8005-8Y.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8005-93
-# keys: defect.io.pci.driver fault.io.hbus fault.io.pci.bus fault.io.psycho
-#
-msgid "SUN4U-8005-93.type"
-msgstr "Fault"
-msgid "SUN4U-8005-93.severity"
-msgstr "Critical"
-msgid "SUN4U-8005-93.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8005-93.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8005-93.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8005-93.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8005-AH
-# keys: fault.io.datapath fault.io.hbus fault.io.pci.bus fault.io.psycho
-#
-msgid "SUN4U-8005-AH.type"
-msgstr "Fault"
-msgid "SUN4U-8005-AH.severity"
-msgstr "Critical"
-msgid "SUN4U-8005-AH.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8005-AH.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8005-AH.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8005-AH.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8005-CD
-# keys: defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.pci.bus fault.io.psycho
-#
-msgid "SUN4U-8005-CD.type"
-msgstr "Fault"
-msgid "SUN4U-8005-CD.severity"
-msgstr "Critical"
-msgid "SUN4U-8005-CD.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8005-CD.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8005-CD.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8005-CD.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8005-DP
-# keys: fault.io.pci.device fault.io.psycho
-#
-msgid "SUN4U-8005-DP.type"
-msgstr "Fault"
-msgid "SUN4U-8005-DP.severity"
-msgstr "Critical"
-msgid "SUN4U-8005-DP.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8005-DP.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8005-DP.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8005-DP.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8005-EA
-# keys: defect.io.pci.driver fault.io.pci.device fault.io.psycho
-#
-msgid "SUN4U-8005-EA.type"
-msgstr "Fault"
-msgid "SUN4U-8005-EA.severity"
-msgstr "Critical"
-msgid "SUN4U-8005-EA.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8005-EA.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8005-EA.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8005-EA.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8005-FS
-# keys: fault.io.datapath fault.io.pci.device fault.io.psycho
-#
-msgid "SUN4U-8005-FS.type"
-msgstr "Fault"
-msgid "SUN4U-8005-FS.severity"
-msgstr "Critical"
-msgid "SUN4U-8005-FS.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8005-FS.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8005-FS.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8005-FS.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8005-G5
-# keys: defect.io.pci.driver fault.io.datapath fault.io.pci.device fault.io.psycho
-#
-msgid "SUN4U-8005-G5.type"
-msgstr "Fault"
-msgid "SUN4U-8005-G5.severity"
-msgstr "Critical"
-msgid "SUN4U-8005-G5.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8005-G5.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8005-G5.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8005-G5.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8005-HX
-# keys: fault.io.hbus fault.io.pci.device fault.io.psycho
-#
-msgid "SUN4U-8005-HX.type"
-msgstr "Fault"
-msgid "SUN4U-8005-HX.severity"
-msgstr "Critical"
-msgid "SUN4U-8005-HX.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8005-HX.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8005-HX.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8005-HX.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8005-J2
-# keys: defect.io.pci.driver fault.io.hbus fault.io.pci.device fault.io.psycho
-#
-msgid "SUN4U-8005-J2.type"
-msgstr "Fault"
-msgid "SUN4U-8005-J2.severity"
-msgstr "Critical"
-msgid "SUN4U-8005-J2.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8005-J2.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8005-J2.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8005-J2.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8005-KJ
-# keys: fault.io.datapath fault.io.hbus fault.io.pci.device fault.io.psycho
-#
-msgid "SUN4U-8005-KJ.type"
-msgstr "Fault"
-msgid "SUN4U-8005-KJ.severity"
-msgstr "Critical"
-msgid "SUN4U-8005-KJ.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8005-KJ.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8005-KJ.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8005-KJ.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8005-LE
-# keys: defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.pci.device fault.io.psycho
-#
-msgid "SUN4U-8005-LE.type"
-msgstr "Fault"
-msgid "SUN4U-8005-LE.severity"
-msgstr "Critical"
-msgid "SUN4U-8005-LE.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8005-LE.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8005-LE.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8005-LE.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8005-MQ
-# keys: fault.io.pci.bus fault.io.pci.device fault.io.psycho
-#
-msgid "SUN4U-8005-MQ.type"
-msgstr "Fault"
-msgid "SUN4U-8005-MQ.severity"
-msgstr "Critical"
-msgid "SUN4U-8005-MQ.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8005-MQ.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8005-MQ.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8005-MQ.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8005-NC
-# keys: defect.io.pci.driver fault.io.pci.bus fault.io.pci.device fault.io.psycho
-#
-msgid "SUN4U-8005-NC.type"
-msgstr "Fault"
-msgid "SUN4U-8005-NC.severity"
-msgstr "Critical"
-msgid "SUN4U-8005-NC.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8005-NC.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8005-NC.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8005-NC.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8005-PR
-# keys: fault.io.datapath fault.io.pci.bus fault.io.pci.device fault.io.psycho
-#
-msgid "SUN4U-8005-PR.type"
-msgstr "Fault"
-msgid "SUN4U-8005-PR.severity"
-msgstr "Critical"
-msgid "SUN4U-8005-PR.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8005-PR.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8005-PR.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8005-PR.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8005-Q4
-# keys: defect.io.pci.driver fault.io.datapath fault.io.pci.bus fault.io.pci.device fault.io.psycho
-#
-msgid "SUN4U-8005-Q4.type"
-msgstr "Fault"
-msgid "SUN4U-8005-Q4.severity"
-msgstr "Critical"
-msgid "SUN4U-8005-Q4.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8005-Q4.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8005-Q4.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8005-Q4.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8005-RD
-# keys: fault.io.hbus fault.io.pci.bus fault.io.pci.device fault.io.psycho
-#
-msgid "SUN4U-8005-RD.type"
-msgstr "Fault"
-msgid "SUN4U-8005-RD.severity"
-msgstr "Critical"
-msgid "SUN4U-8005-RD.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8005-RD.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8005-RD.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8005-RD.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8005-SH
-# keys: defect.io.pci.driver fault.io.hbus fault.io.pci.bus fault.io.pci.device fault.io.psycho
-#
-msgid "SUN4U-8005-SH.type"
-msgstr "Fault"
-msgid "SUN4U-8005-SH.severity"
-msgstr "Critical"
-msgid "SUN4U-8005-SH.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8005-SH.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8005-SH.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8005-SH.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8005-T3
-# keys: fault.io.datapath fault.io.hbus fault.io.pci.bus fault.io.pci.device fault.io.psycho
-#
-msgid "SUN4U-8005-T3.type"
-msgstr "Fault"
-msgid "SUN4U-8005-T3.severity"
-msgstr "Critical"
-msgid "SUN4U-8005-T3.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8005-T3.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8005-T3.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8005-T3.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8005-UY
-# keys: defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.pci.bus fault.io.pci.device fault.io.psycho
-#
-msgid "SUN4U-8005-UY.type"
-msgstr "Fault"
-msgid "SUN4U-8005-UY.severity"
-msgstr "Critical"
-msgid "SUN4U-8005-UY.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8005-UY.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8005-UY.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8005-UY.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8005-V5
-# keys: fault.io.tomatillo
-#
-msgid "SUN4U-8005-V5.type"
-msgstr "Fault"
-msgid "SUN4U-8005-V5.severity"
-msgstr "Critical"
-msgid "SUN4U-8005-V5.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8005-V5.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8005-V5.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8005-V5.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8005-WS
-# keys: defect.io.pci.driver fault.io.tomatillo
-#
-msgid "SUN4U-8005-WS.type"
-msgstr "Fault"
-msgid "SUN4U-8005-WS.severity"
-msgstr "Critical"
-msgid "SUN4U-8005-WS.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8005-WS.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8005-WS.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8005-WS.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8005-XA
-# keys: fault.io.datapath fault.io.tomatillo
-#
-msgid "SUN4U-8005-XA.type"
-msgstr "Fault"
-msgid "SUN4U-8005-XA.severity"
-msgstr "Critical"
-msgid "SUN4U-8005-XA.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8005-XA.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8005-XA.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8005-XA.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8005-YP
-# keys: defect.io.pci.driver fault.io.datapath fault.io.tomatillo
-#
-msgid "SUN4U-8005-YP.type"
-msgstr "Fault"
-msgid "SUN4U-8005-YP.severity"
-msgstr "Critical"
-msgid "SUN4U-8005-YP.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8005-YP.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8005-YP.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8005-YP.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8006-04
-# keys: fault.io.hbus fault.io.tomatillo
-#
-msgid "SUN4U-8006-04.type"
-msgstr "Fault"
-msgid "SUN4U-8006-04.severity"
-msgstr "Critical"
-msgid "SUN4U-8006-04.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8006-04.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8006-04.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8006-04.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8006-1R
-# keys: defect.io.pci.driver fault.io.hbus fault.io.tomatillo
-#
-msgid "SUN4U-8006-1R.type"
-msgstr "Fault"
-msgid "SUN4U-8006-1R.severity"
-msgstr "Critical"
-msgid "SUN4U-8006-1R.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8006-1R.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8006-1R.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8006-1R.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8006-2C
-# keys: fault.io.datapath fault.io.hbus fault.io.tomatillo
-#
-msgid "SUN4U-8006-2C.type"
-msgstr "Fault"
-msgid "SUN4U-8006-2C.severity"
-msgstr "Critical"
-msgid "SUN4U-8006-2C.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8006-2C.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8006-2C.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8006-2C.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8006-3Q
-# keys: defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.tomatillo
-#
-msgid "SUN4U-8006-3Q.type"
-msgstr "Fault"
-msgid "SUN4U-8006-3Q.severity"
-msgstr "Critical"
-msgid "SUN4U-8006-3Q.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8006-3Q.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8006-3Q.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8006-3Q.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8006-4E
-# keys: fault.io.pci.bus fault.io.tomatillo
-#
-msgid "SUN4U-8006-4E.type"
-msgstr "Fault"
-msgid "SUN4U-8006-4E.severity"
-msgstr "Critical"
-msgid "SUN4U-8006-4E.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8006-4E.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8006-4E.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8006-4E.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8006-5J
-# keys: defect.io.pci.driver fault.io.pci.bus fault.io.tomatillo
-#
-msgid "SUN4U-8006-5J.type"
-msgstr "Fault"
-msgid "SUN4U-8006-5J.severity"
-msgstr "Critical"
-msgid "SUN4U-8006-5J.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8006-5J.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8006-5J.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8006-5J.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8006-62
-# keys: fault.io.datapath fault.io.pci.bus fault.io.tomatillo
-#
-msgid "SUN4U-8006-62.type"
-msgstr "Fault"
-msgid "SUN4U-8006-62.severity"
-msgstr "Critical"
-msgid "SUN4U-8006-62.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8006-62.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8006-62.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8006-62.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8006-7X
-# keys: defect.io.pci.driver fault.io.datapath fault.io.pci.bus fault.io.tomatillo
-#
-msgid "SUN4U-8006-7X.type"
-msgstr "Fault"
-msgid "SUN4U-8006-7X.severity"
-msgstr "Critical"
-msgid "SUN4U-8006-7X.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8006-7X.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8006-7X.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8006-7X.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8006-8P
-# keys: fault.io.hbus fault.io.pci.bus fault.io.tomatillo
-#
-msgid "SUN4U-8006-8P.type"
-msgstr "Fault"
-msgid "SUN4U-8006-8P.severity"
-msgstr "Critical"
-msgid "SUN4U-8006-8P.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8006-8P.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8006-8P.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8006-8P.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8006-9A
-# keys: defect.io.pci.driver fault.io.hbus fault.io.pci.bus fault.io.tomatillo
-#
-msgid "SUN4U-8006-9A.type"
-msgstr "Fault"
-msgid "SUN4U-8006-9A.severity"
-msgstr "Critical"
-msgid "SUN4U-8006-9A.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8006-9A.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8006-9A.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8006-9A.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8006-AS
-# keys: fault.io.datapath fault.io.hbus fault.io.pci.bus fault.io.tomatillo
-#
-msgid "SUN4U-8006-AS.type"
-msgstr "Fault"
-msgid "SUN4U-8006-AS.severity"
-msgstr "Critical"
-msgid "SUN4U-8006-AS.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8006-AS.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8006-AS.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8006-AS.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8006-C5
-# keys: defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.pci.bus fault.io.tomatillo
-#
-msgid "SUN4U-8006-C5.type"
-msgstr "Fault"
-msgid "SUN4U-8006-C5.severity"
-msgstr "Critical"
-msgid "SUN4U-8006-C5.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8006-C5.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8006-C5.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8006-C5.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8006-DY
-# keys: fault.io.pci.device fault.io.tomatillo
-#
-msgid "SUN4U-8006-DY.type"
-msgstr "Fault"
-msgid "SUN4U-8006-DY.severity"
-msgstr "Critical"
-msgid "SUN4U-8006-DY.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8006-DY.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8006-DY.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8006-DY.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8006-E3
-# keys: defect.io.pci.driver fault.io.pci.device fault.io.tomatillo
-#
-msgid "SUN4U-8006-E3.type"
-msgstr "Fault"
-msgid "SUN4U-8006-E3.severity"
-msgstr "Critical"
-msgid "SUN4U-8006-E3.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8006-E3.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8006-E3.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8006-E3.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8006-FH
-# keys: fault.io.datapath fault.io.pci.device fault.io.tomatillo
-#
-msgid "SUN4U-8006-FH.type"
-msgstr "Fault"
-msgid "SUN4U-8006-FH.severity"
-msgstr "Critical"
-msgid "SUN4U-8006-FH.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8006-FH.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8006-FH.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8006-FH.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8006-GD
-# keys: defect.io.pci.driver fault.io.datapath fault.io.pci.device fault.io.tomatillo
-#
-msgid "SUN4U-8006-GD.type"
-msgstr "Fault"
-msgid "SUN4U-8006-GD.severity"
-msgstr "Critical"
-msgid "SUN4U-8006-GD.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8006-GD.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8006-GD.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8006-GD.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8006-HQ
-# keys: fault.io.hbus fault.io.pci.device fault.io.tomatillo
-#
-msgid "SUN4U-8006-HQ.type"
-msgstr "Fault"
-msgid "SUN4U-8006-HQ.severity"
-msgstr "Critical"
-msgid "SUN4U-8006-HQ.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8006-HQ.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8006-HQ.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8006-HQ.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8006-JC
-# keys: defect.io.pci.driver fault.io.hbus fault.io.pci.device fault.io.tomatillo
-#
-msgid "SUN4U-8006-JC.type"
-msgstr "Fault"
-msgid "SUN4U-8006-JC.severity"
-msgstr "Critical"
-msgid "SUN4U-8006-JC.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8006-JC.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8006-JC.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8006-JC.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8006-KR
-# keys: fault.io.datapath fault.io.hbus fault.io.pci.device fault.io.tomatillo
-#
-msgid "SUN4U-8006-KR.type"
-msgstr "Fault"
-msgid "SUN4U-8006-KR.severity"
-msgstr "Critical"
-msgid "SUN4U-8006-KR.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8006-KR.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8006-KR.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8006-KR.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8006-L4
-# keys: defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.pci.device fault.io.tomatillo
-#
-msgid "SUN4U-8006-L4.type"
-msgstr "Fault"
-msgid "SUN4U-8006-L4.severity"
-msgstr "Critical"
-msgid "SUN4U-8006-L4.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8006-L4.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8006-L4.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8006-L4.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8006-MX
-# keys: fault.io.pci.bus fault.io.pci.device fault.io.tomatillo
-#
-msgid "SUN4U-8006-MX.type"
-msgstr "Fault"
-msgid "SUN4U-8006-MX.severity"
-msgstr "Critical"
-msgid "SUN4U-8006-MX.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8006-MX.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8006-MX.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8006-MX.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8006-N2
-# keys: defect.io.pci.driver fault.io.pci.bus fault.io.pci.device fault.io.tomatillo
-#
-msgid "SUN4U-8006-N2.type"
-msgstr "Fault"
-msgid "SUN4U-8006-N2.severity"
-msgstr "Critical"
-msgid "SUN4U-8006-N2.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8006-N2.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8006-N2.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8006-N2.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8006-PJ
-# keys: fault.io.datapath fault.io.pci.bus fault.io.pci.device fault.io.tomatillo
-#
-msgid "SUN4U-8006-PJ.type"
-msgstr "Fault"
-msgid "SUN4U-8006-PJ.severity"
-msgstr "Critical"
-msgid "SUN4U-8006-PJ.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8006-PJ.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8006-PJ.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8006-PJ.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8006-QE
-# keys: defect.io.pci.driver fault.io.datapath fault.io.pci.bus fault.io.pci.device fault.io.tomatillo
-#
-msgid "SUN4U-8006-QE.type"
-msgstr "Fault"
-msgid "SUN4U-8006-QE.severity"
-msgstr "Critical"
-msgid "SUN4U-8006-QE.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8006-QE.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8006-QE.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8006-QE.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8006-R5
-# keys: fault.io.hbus fault.io.pci.bus fault.io.pci.device fault.io.tomatillo
-#
-msgid "SUN4U-8006-R5.type"
-msgstr "Fault"
-msgid "SUN4U-8006-R5.severity"
-msgstr "Critical"
-msgid "SUN4U-8006-R5.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8006-R5.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8006-R5.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8006-R5.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8006-SS
-# keys: defect.io.pci.driver fault.io.hbus fault.io.pci.bus fault.io.pci.device fault.io.tomatillo
-#
-msgid "SUN4U-8006-SS.type"
-msgstr "Fault"
-msgid "SUN4U-8006-SS.severity"
-msgstr "Critical"
-msgid "SUN4U-8006-SS.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8006-SS.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8006-SS.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8006-SS.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8006-TA
-# keys: fault.io.datapath fault.io.hbus fault.io.pci.bus fault.io.pci.device fault.io.tomatillo
-#
-msgid "SUN4U-8006-TA.type"
-msgstr "Fault"
-msgid "SUN4U-8006-TA.severity"
-msgstr "Critical"
-msgid "SUN4U-8006-TA.description"
-msgstr "\nA problem was detected in a system core bus.\n Refer to %s for more information."
-msgid "SUN4U-8006-TA.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8006-TA.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8006-TA.action"
-msgstr "\nSchedule a repair procedure to replace the affected device. Use\nfmdump -v -u EVENT_ID to identify the device or contact\nyour illumos distribution team for support.\n"
-#
-# code: SUN4U-8006-UP
-# keys: defect.io.pci.driver fault.io.datapath fault.io.hbus fault.io.pci.bus fault.io.pci.device fault.io.tomatillo
-#
-msgid "SUN4U-8006-UP.type"
-msgstr "Fault"
-msgid "SUN4U-8006-UP.severity"
-msgstr "Critical"
-msgid "SUN4U-8006-UP.description"
-msgstr "\nThe system has diagnosed a problem, the suspects include one or more \nPCI buses, devices and one or more PCI controller drivers, based on the \nerror telemetry detected by the PCI subsystem.\n Refer to %s for more information."
-msgid "SUN4U-8006-UP.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8006-UP.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8006-UP.action"
-msgstr "\nUse fmdump -v -u <EVENT_ID> to identify the \nsuspected device(s). Schedule a repair of the most likely suspect \nlisted in the output. If the most likely suspect is software, then consult\nyour illumos distribution team.\n"
-#
-# code: SUN4U-8006-VD
-# keys: fault.cpu.ultraSPARC-IIIiplus.dcache
-#
-msgid "SUN4U-8006-VD.type"
-msgstr "Fault"
-msgid "SUN4U-8006-VD.severity"
-msgstr "Major"
-msgid "SUN4U-8006-VD.description"
-msgstr "The number of errors associated with a CPU has exceeded acceptable levels. Refer to %s for more information."
-msgid "SUN4U-8006-VD.response"
-msgstr "The fault manager will attempt to remove the affected CPU from service."
-msgid "SUN4U-8006-VD.impact"
-msgstr "System performance may be affected."
-msgid "SUN4U-8006-VD.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>."
-#
-# code: SUN4U-8006-WH
-# keys: fault.cpu.ultraSPARC-IIIiplus.icache
-#
-msgid "SUN4U-8006-WH.type"
-msgstr "Fault"
-msgid "SUN4U-8006-WH.severity"
-msgstr "Major"
-msgid "SUN4U-8006-WH.description"
-msgstr "The number of errors associated with a CPU has exceeded acceptable levels. Refer to %s for more information."
-msgid "SUN4U-8006-WH.response"
-msgstr "The fault manager will attempt to remove the affected CPU from service."
-msgid "SUN4U-8006-WH.impact"
-msgstr "System performance may be affected."
-msgid "SUN4U-8006-WH.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>."
-#
-# code: SUN4U-8006-X3
-# keys: fault.cpu.ultraSPARC-IIIiplus.l2cachedata
-#
-msgid "SUN4U-8006-X3.type"
-msgstr "Fault"
-msgid "SUN4U-8006-X3.severity"
-msgstr "Major"
-msgid "SUN4U-8006-X3.description"
-msgstr "The number of errors associated with a CPU has exceeded acceptable levels. Refer to %s for more information."
-msgid "SUN4U-8006-X3.response"
-msgstr "The fault manager will attempt to remove the affected CPU from service."
-msgid "SUN4U-8006-X3.impact"
-msgstr "System performance may be affected."
-msgid "SUN4U-8006-X3.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>."
-#
-# code: SUN4U-8006-YY
-# keys: fault.cpu.ultraSPARC-IIIiplus.l2cachetag
-#
-msgid "SUN4U-8006-YY.type"
-msgstr "Fault"
-msgid "SUN4U-8006-YY.severity"
-msgstr "Major"
-msgid "SUN4U-8006-YY.description"
-msgstr "The number of errors associated with a CPU has exceeded acceptable levels. Refer to %s for more information."
-msgid "SUN4U-8006-YY.response"
-msgstr "The fault manager will attempt to remove the affected CPU from service."
-msgid "SUN4U-8006-YY.impact"
-msgstr "System performance may be affected."
-msgid "SUN4U-8006-YY.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>."
-#
-# code: SUN4U-8007-03
-# keys: fault.cpu.ultraSPARC-IIIiplus.fpu
-#
-msgid "SUN4U-8007-03.type"
-msgstr "Fault"
-msgid "SUN4U-8007-03.severity"
-msgstr "Major"
-msgid "SUN4U-8007-03.description"
-msgstr "The number of errors associated with a CPU has exceeded acceptable levels. Refer to %s for more information."
-msgid "SUN4U-8007-03.response"
-msgstr "The fault manager will attempt to remove the affected CPU from service."
-msgid "SUN4U-8007-03.impact"
-msgstr "System performance may be affected."
-msgid "SUN4U-8007-03.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>."
-#
-# code: SUN4U-8007-1Y
-# keys: fault.asic.cds.dp
-#
-msgid "SUN4U-8007-1Y.type"
-msgstr "Fault"
-msgid "SUN4U-8007-1Y.severity"
-msgstr "Critical"
-msgid "SUN4U-8007-1Y.description"
-msgstr "A hardware problem was detected on the datapath interconnect.\n Refer to %s for more information."
-msgid "SUN4U-8007-1Y.response"
-msgstr "One or more CPUs may be offlined. Additionally, page retires for memory in the impacted region may be disabled.\n"
-msgid "SUN4U-8007-1Y.impact"
-msgstr "System performace may be affected.\n"
-msgid "SUN4U-8007-1Y.action"
-msgstr "Schedule a repair procedure to replace the affected component(s). The System Controller (SC) diagnostic messages have the authoritative information on the affected component(s). fmdump -v -u <EVENT-ID> can also be used, but the SC is authoritative.\n"
-#
-# code: SUN4U-8007-2D
-# keys: fault.asic.dx.dp
-#
-msgid "SUN4U-8007-2D.type"
-msgstr "Fault"
-msgid "SUN4U-8007-2D.severity"
-msgstr "Critical"
-msgid "SUN4U-8007-2D.description"
-msgstr "A hardware problem was detected on the datapath interconnect.\n Refer to %s for more information."
-msgid "SUN4U-8007-2D.response"
-msgstr "One or more CPUs may be offlined. Additionally, page retires for memory in the impacted region may be disabled.\n"
-msgid "SUN4U-8007-2D.impact"
-msgstr "System performace may be affected.\n"
-msgid "SUN4U-8007-2D.action"
-msgstr "Schedule a repair procedure to replace the affected component(s). The System Controller (SC) diagnostic messages have the authoritative information on the affected component(s). fmdump -v -u <EVENT-ID> can also be used, but the SC is authoritative.\n"
-#
-# code: SUN4U-8007-3H
-# keys: fault.asic.sdi.dp
-#
-msgid "SUN4U-8007-3H.type"
-msgstr "Fault"
-msgid "SUN4U-8007-3H.severity"
-msgstr "Critical"
-msgid "SUN4U-8007-3H.description"
-msgstr "A hardware problem was detected on the datapath interconnect.\n Refer to %s for more information."
-msgid "SUN4U-8007-3H.response"
-msgstr "One or more CPUs may be offlined. Additionally, page retires for memory in the impacted region may be disabled.\n"
-msgid "SUN4U-8007-3H.impact"
-msgstr "System performace may be affected.\n"
-msgid "SUN4U-8007-3H.action"
-msgstr "Schedule a repair procedure to replace the affected component(s). The System Controller (SC) diagnostic messages have the authoritative information on the affected component(s). fmdump -v -u <EVENT-ID> can also be used, but the SC is authoritative.\n"
-#
-# code: SUN4U-8007-4A
-# keys: fault.asic.cp.dp
-#
-msgid "SUN4U-8007-4A.type"
-msgstr "Fault"
-msgid "SUN4U-8007-4A.severity"
-msgstr "Critical"
-msgid "SUN4U-8007-4A.description"
-msgstr "A hardware problem was detected on the datapath interconnect.\n Refer to %s for more information."
-msgid "SUN4U-8007-4A.response"
-msgstr "One or more CPUs may be offlined. Additionally, page retires for memory in the impacted region may be disabled.\n"
-msgid "SUN4U-8007-4A.impact"
-msgstr "System performace may be affected.\n"
-msgid "SUN4U-8007-4A.action"
-msgstr "Schedule a repair procedure to replace the affected component(s). The System Controller (SC) diagnostic messages have the authoritative information on the affected component(s). fmdump -v -u <EVENT-ID> can also be used, but the SC is authoritative.\n"
-#
-# code: SUN4U-8007-5P
-# keys: fault.asic.rp.dp
-#
-msgid "SUN4U-8007-5P.type"
-msgstr "Fault"
-msgid "SUN4U-8007-5P.severity"
-msgstr "Critical"
-msgid "SUN4U-8007-5P.description"
-msgstr "A hardware problem was detected on the datapath interconnect.\n Refer to %s for more information."
-msgid "SUN4U-8007-5P.response"
-msgstr "One or more CPUs may be offlined. Additionally, page retires for memory in the impacted region may be disabled.\n"
-msgid "SUN4U-8007-5P.impact"
-msgstr "System performace may be affected.\n"
-msgid "SUN4U-8007-5P.action"
-msgstr "Schedule a repair procedure to replace the affected component(s). The System Controller (SC) diagnostic messages have the authoritative information on the affected component(s). fmdump -v -u <EVENT-ID> can also be used, but the SC is authoritative.\n"
-#
-# code: SUN4U-8007-65
-# keys: fault.io.oberon
-#
-msgid "SUN4U-8007-65.type"
-msgstr "Fault"
-msgid "SUN4U-8007-65.severity"
-msgstr "Critical"
-msgid "SUN4U-8007-65.description"
-msgstr "Oberon PCI-Express hostbridge fault\n Refer to %s for more information."
-msgid "SUN4U-8007-65.response"
-msgstr "This fault requires user and/or service interaction and currently does not have an automated response agent."
-msgid "SUN4U-8007-65.impact"
-msgstr "Possible loss of devices that may be attached to the system via this device/bus and/or system downtime."
-msgid "SUN4U-8007-65.action"
-msgstr "Ensure that the latest drivers and patches are installed, schedule a repair procedure to replace the affected device if necessary, or contact your illumos distribution team for support."
-#
-# code: SUN4U-8007-7S
-# keys: fault.cpu.SPARC64-VI.chip
-#
-msgid "SUN4U-8007-7S.type"
-msgstr "Fault"
-msgid "SUN4U-8007-7S.severity"
-msgstr "Critical"
-msgid "SUN4U-8007-7S.description"
-msgstr "The number of errors associated with this CHIP has exceeded acceptable levels. Refer to %s for more information."
-msgid "SUN4U-8007-7S.response"
-msgstr "An attempt will be made to remove the affected CHIP from service."
-msgid "SUN4U-8007-7S.impact"
-msgstr "The system will not be functioning at the same performance level with the CHIP removal."
-msgid "SUN4U-8007-7S.action"
-msgstr "Schedule a repair procedure to replace the affected CHIP. Use fmdump -v -u <EVENT_ID>\nto identify the smallest CPU/Strand ID of the affected CORE on this\nCHIP."
-#
-# code: SUN4U-8007-8J
-# keys: fault.cpu.SPARC64-VI.core
-#
-msgid "SUN4U-8007-8J.type"
-msgstr "Fault"
-msgid "SUN4U-8007-8J.severity"
-msgstr "Critical"
-msgid "SUN4U-8007-8J.description"
-msgstr "The number of errors associated with this CORE has exceeded acceptable levels. Refer to %s for more information."
-msgid "SUN4U-8007-8J.response"
-msgstr "An attempt will be made to remove the affected CORE from service."
-msgid "SUN4U-8007-8J.impact"
-msgstr "The system will not be functioning at the same performance level with the CORE removal."
-msgid "SUN4U-8007-8J.action"
-msgstr "Schedule a repair procedure to replace the affected CORE. Use fmdump -v -u <EVENT_ID>\nto identify the smallest CPU/Strand ID of the affected CORE on this\nCORE.\n"
-#
-# code: SUN4U-8007-9E
-# keys: fault.cpu.SPARC64-VI.strand
-#
-msgid "SUN4U-8007-9E.type"
-msgstr "Fault"
-msgid "SUN4U-8007-9E.severity"
-msgstr "Critical"
-msgid "SUN4U-8007-9E.description"
-msgstr "The number of errors associated with this STRAND has exceeded acceptable levels. Refer to %s for more information."
-msgid "SUN4U-8007-9E.response"
-msgstr "An attempt will be made to remove the affected STRAND from service."
-msgid "SUN4U-8007-9E.impact"
-msgstr "The system will not be functioning at the same performance level with the STRAND removal."
-msgid "SUN4U-8007-9E.action"
-msgstr "Schedule a repair procedure to replace the affected STRAND. Use fmdump -v -u <EVENT_ID>\nto identify the smallest CPU/Strand ID of the affected CORE on this\nSTRAND.\n"
-#
-# code: SUN4U-8007-AX
-# keys: fault.io.pci.device-invreq fault.io.tomatillo
-#
-msgid "SUN4U-8007-AX.type"
-msgstr "Fault"
-msgid "SUN4U-8007-AX.severity"
-msgstr "Critical"
-msgid "SUN4U-8007-AX.description"
-msgstr "Either the transmitting device sent an invalid request or the receiving device failed to respond.\n Refer to %s for more information."
-msgid "SUN4U-8007-AX.response"
-msgstr "One or more device instances may be disabled\n"
-msgid "SUN4U-8007-AX.impact"
-msgstr "Loss of services provided by the device instances associated with this fault\n"
-msgid "SUN4U-8007-AX.action"
-msgstr "Ensure that the latest drivers and patches are installed. If a plug-in card is involved check for badly-seated cards or bent pins. Otherwise schedule a repair procedure to replace the affected device(s). Use fmdump -v -u <EVENT_ID> to identify the devices or contact your illumos distribution team for support.\n"
-#
-# code: SUN4U-8007-C2
-# keys: fault.cpu.SPARC64-VII.chip
-#
-msgid "SUN4U-8007-C2.type"
-msgstr "Fault"
-msgid "SUN4U-8007-C2.severity"
-msgstr "Critical"
-msgid "SUN4U-8007-C2.description"
-msgstr "The number of errors associated with this CHIP has exceeded acceptable levels. Refer to %s for more information."
-msgid "SUN4U-8007-C2.response"
-msgstr "An attempt will be made to remove the affected CHIP from service."
-msgid "SUN4U-8007-C2.impact"
-msgstr "The system will not be functioning at the same performance level with the CHIP removal."
-msgid "SUN4U-8007-C2.action"
-msgstr "Schedule a repair procedure to replace the affected CHIP. Use fmdump -v -u <EVENT_ID>\nto identify the smallest CPU/Strand ID of the affected CORE on this\nCHIP."
-#
-# code: SUN4U-8007-DR
-# keys: fault.cpu.SPARC64-VII.core
-#
-msgid "SUN4U-8007-DR.type"
-msgstr "Fault"
-msgid "SUN4U-8007-DR.severity"
-msgstr "Critical"
-msgid "SUN4U-8007-DR.description"
-msgstr "The number of errors associated with this CORE has exceeded acceptable levels. Refer to %s for more information."
-msgid "SUN4U-8007-DR.response"
-msgstr "An attempt will be made to remove the affected CORE from service."
-msgid "SUN4U-8007-DR.impact"
-msgstr "The system will not be functioning at the same performance level with the CORE removal."
-msgid "SUN4U-8007-DR.action"
-msgstr "Schedule a repair procedure to replace the affected CORE. Use fmdump -v -u <EVENT_ID>\nto identify the smallest CPU/Strand ID of the affected CORE on this\nCORE.\n"
-#
-# code: SUN4U-8007-E4
-# keys: fault.cpu.SPARC64-VII.strand
-#
-msgid "SUN4U-8007-E4.type"
-msgstr "Fault"
-msgid "SUN4U-8007-E4.severity"
-msgstr "Critical"
-msgid "SUN4U-8007-E4.description"
-msgstr "The number of errors associated with this STRAND has exceeded acceptable levels. Refer to %s for more information."
-msgid "SUN4U-8007-E4.response"
-msgstr "An attempt will be made to remove the affected STRAND from service."
-msgid "SUN4U-8007-E4.impact"
-msgstr "The system will not be functioning at the same performance level with the STRAND removal."
-msgid "SUN4U-8007-E4.action"
-msgstr "Schedule a repair procedure to replace the affected STRAND. Use fmdump -v -u <EVENT_ID>\nto identify the smallest CPU/Strand ID of the affected CORE on this\nSTRAND.\n"
-#
-# code: SUN4U-8007-FQ
-# keys: fault.cpu.ultraSPARC-IVplus.l2cachedata-line
-#
-msgid "SUN4U-8007-FQ.type"
-msgstr "Fault"
-msgid "SUN4U-8007-FQ.severity"
-msgstr "Minor"
-msgid "SUN4U-8007-FQ.description"
-msgstr "The illumos Fault Manager has determined that the\nnumber of correctable errors against a\nparticular CPU's cache index and way exceeds recommended\nlimts.\n Refer to %s for more information."
-msgid "SUN4U-8007-FQ.response"
-msgstr "The system will attempt to remove the CPU's offending\ncache index and way from service.\n"
-msgid "SUN4U-8007-FQ.impact"
-msgstr "The performace of the system may be minimally impacted as\na result of removing the cache line and way from service.\nLoss of service will be limited to this CPU's cache\nline and way.\n"
-msgid "SUN4U-8007-FQ.action"
-msgstr "No repair action is recommended at this time.\n"
-#
-# code: SUN4U-8007-GC
-# keys: fault.cpu.ultraSPARC-IVplus.l3cachedata-line
-#
-msgid "SUN4U-8007-GC.type"
-msgstr "Fault"
-msgid "SUN4U-8007-GC.severity"
-msgstr "Minor"
-msgid "SUN4U-8007-GC.description"
-msgstr "The illumos Fault Manager has determined that the\nnumber of correctable errors against a\nparticular CPU's cache index and way exceeds recommended\nlimts.\n Refer to %s for more information."
-msgid "SUN4U-8007-GC.response"
-msgstr "The system will attempt to remove the CPU's offending\ncache index and way from service.\n"
-msgid "SUN4U-8007-GC.impact"
-msgstr "The performace of the system may be minimally impacted as\na result of removing the cache line and way from service.\nLoss of service will be limited to this CPU's cache\nline and way.\n"
-msgid "SUN4U-8007-GC.action"
-msgstr "No repair action is recommended at this time.\n"
-#
-# code: SUN4U-8007-HH
-# keys: fault.cpu.ultraSPARC-IVplus.l2cachetag-line
-#
-msgid "SUN4U-8007-HH.type"
-msgstr "Fault"
-msgid "SUN4U-8007-HH.severity"
-msgstr "Minor"
-msgid "SUN4U-8007-HH.description"
-msgstr "The illumos Fault Manager has determined that the\nnumber of correctable errors against a\nparticular CPU's cache index and way exceeds recommended\nlimts.\n Refer to %s for more information."
-msgid "SUN4U-8007-HH.response"
-msgstr "The system will attempt to remove the CPU's offending\ncache index and way from service.\n"
-msgid "SUN4U-8007-HH.impact"
-msgstr "The performace of the system may be minimally impacted as\na result of removing the cache line and way from service.\nLoss of service will be limited to this CPU's cache\nline and way.\n"
-msgid "SUN4U-8007-HH.action"
-msgstr "No repair action is recommended at this time.\n"
-#
-# code: SUN4U-8007-JD
-# keys: fault.cpu.ultraSPARC-IVplus.l3cachetag-line
-#
-msgid "SUN4U-8007-JD.type"
-msgstr "Fault"
-msgid "SUN4U-8007-JD.severity"
-msgstr "Minor"
-msgid "SUN4U-8007-JD.description"
-msgstr "The illumos Fault Manager has determined that the\nnumber of correctable errors against a\nparticular CPU's cache index and way exceeds recommended\nlimts.\n Refer to %s for more information."
-msgid "SUN4U-8007-JD.response"
-msgstr "The system will attempt to remove the CPU's offending\ncache index and way from service.\n"
-msgid "SUN4U-8007-JD.impact"
-msgstr "The performace of the system may be minimally impacted as\na result of removing the cache line and way from service.\nLoss of service will be limited to this CPU's cache\nline and way.\n"
-msgid "SUN4U-8007-JD.action"
-msgstr "No repair action is recommended at this time.\n"
-#
-# code: SUN4U-8007-KY
-# keys: fault.memory.dimm-page-retires-excessive
-#
-msgid "SUN4U-8007-KY.type"
-msgstr "Fault"
-msgid "SUN4U-8007-KY.severity"
-msgstr "Major"
-msgid "SUN4U-8007-KY.description"
-msgstr "The number of correctable errors associated with this memory module has exceeded acceptable levels.\n Refer to %s for more information."
-msgid "SUN4U-8007-KY.response"
-msgstr "Pages of memory associated with this memory module have been removed from service, up to a limit which has now been reached.\n"
-msgid "SUN4U-8007-KY.impact"
-msgstr "Total system memory capacity has been reduced.\n"
-msgid "SUN4U-8007-KY.action"
-msgstr "Schedule a repair procedure to replace the DIMM. Use fmadm faulty to identify the DIMM to replace.\n"
-#
-# code: SUN4U-8007-L3
-# keys: fault.memory.dimm-ue-imminent
-#
-msgid "SUN4U-8007-L3.type"
-msgstr "Fault"
-msgid "SUN4U-8007-L3.severity"
-msgstr "Critical"
-msgid "SUN4U-8007-L3.description"
-msgstr "A pattern of correctable errors has been observed suggesting the potential exists that an uncorrectable error may occur.\n Refer to %s for more information."
-msgid "SUN4U-8007-L3.response"
-msgstr "None at this time.\n"
-msgid "SUN4U-8007-L3.impact"
-msgstr "None at this time. However, the potential uncorrectable error warrants proactive service action to avoid any unplanned system outages.\n"
-msgid "SUN4U-8007-L3.action"
-msgstr "Schedule a repair procedure to replace the DIMM. Use fmadm faulty to identify the DIMM to replace.\n"
-#
-# code: SUN4U-8007-MS
-# keys: fault.memory.dram-ue-imminent
-#
-msgid "SUN4U-8007-MS.type"
-msgstr "Fault"
-msgid "SUN4U-8007-MS.severity"
-msgstr "Critical"
-msgid "SUN4U-8007-MS.description"
-msgstr "A pattern of correctable errors has been observed suggesting the potential exists that an uncorrectable error may occur.\n Refer to %s for more information."
-msgid "SUN4U-8007-MS.response"
-msgstr "None at this time.\n"
-msgid "SUN4U-8007-MS.impact"
-msgstr "None at this time. However, the potential uncorrectable error warrants proactive service action to avoid any unplanned system outages.\n"
-msgid "SUN4U-8007-MS.action"
-msgstr "Schedule a repair procedure to replace the DIMM. Use fmadm faulty to identify the DIMM to replace.\n"
diff --git a/usr/src/cmd/fm/dicts/SUN4V.dict b/usr/src/cmd/fm/dicts/SUN4V.dict
deleted file mode 100644
index ba51084f36..0000000000
--- a/usr/src/cmd/fm/dicts/SUN4V.dict
+++ /dev/null
@@ -1,119 +0,0 @@
-#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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
-#
-# DO NOT EDIT -- this file is generated by the Event Registry.
-#
-
-FMDICT: name=SUN4V version=1 maxkey=3 dictid=0x3456
-
-fault.cpu.ultraSPARC-T1.ireg=1
-fault.cpu.ultraSPARC-T1.freg=2
-fault.cpu.ultraSPARC-T1.itlb=3
-fault.cpu.ultraSPARC-T1.dtlb=4
-fault.cpu.ultraSPARC-T1.icache=5
-fault.cpu.ultraSPARC-T1.dcache=6
-fault.cpu.ultraSPARC-T1.mau=7
-fault.cpu.ultraSPARC-T1.l2cachedata=8
-fault.cpu.ultraSPARC-T1.l2cachetag=9
-fault.cpu.ultraSPARC-T1.l2cachectl=10
-fault.memory.page=11
-fault.memory.dimm=12
-fault.memory.bank=13
-fault.memory.link-c=14
-fault.cpu.ultraSPARC-T2.ireg=15
-fault.cpu.ultraSPARC-T2.freg=16
-fault.cpu.ultraSPARC-T2.misc_reg=17
-fault.cpu.ultraSPARC-T2.itlb=18
-fault.cpu.ultraSPARC-T2.dtlb=19
-fault.cpu.ultraSPARC-T2.icache=20
-fault.cpu.ultraSPARC-T2.dcache=21
-fault.cpu.ultraSPARC-T2.mau=22
-fault.cpu.ultraSPARC-T2.l2data-c=23
-fault.cpu.ultraSPARC-T2.l2cachetag=24
-fault.cpu.ultraSPARC-T2.l2cachectl=25
-fault.memory.link-u=26
-fault.cpu.ultraSPARC-T2.l2data-u=27
-fault.cpu.ultraSPARC-T1.l2data-c=28
-fault.cpu.ultraSPARC-T1.l2data-u=29
-fault.memory.datapath=30
-fault.io.n2.ncu=31
-fault.io.n2.dmu=32
-fault.io.n2.niu=33
-fault.io.n2.siu=34
-fault.io.n2.soc=35
-fault.io.n2.crossbar=36
-fault.io.fire.fw-epkt fault.io.fire.sw-epkt fault.io.fire.sw-fw-mismatch=37
-fault.io.vf.ncx=38
-fault.memory.link-f=39
-fault.cpu.ultraSPARC-T2plus.ireg=40
-fault.cpu.ultraSPARC-T2plus.freg=41
-fault.cpu.ultraSPARC-T2plus.misc_reg=42
-fault.cpu.ultraSPARC-T2plus.itlb=43
-fault.cpu.ultraSPARC-T2plus.dtlb=44
-fault.cpu.ultraSPARC-T2plus.icache=45
-fault.cpu.ultraSPARC-T2plus.dcache=46
-fault.cpu.ultraSPARC-T2plus.mau=47
-fault.cpu.ultraSPARC-T2plus.l2data-c=48
-fault.cpu.ultraSPARC-T2plus.l2cachetag=49
-fault.cpu.ultraSPARC-T2plus.l2cachectl=50
-fault.cpu.ultraSPARC-T2plus.l2data-u=51
-fault.cpu.ultraSPARC-T2plus.lfu-f=52
-fault.cpu.ultraSPARC-T2plus.lfu-p=53
-fault.cpu.ultraSPARC-T2plus.lfu-u=54
-fault.asic.ultraSPARC-T2plus.interconnect.opu-u=55
-fault.asic.ultraSPARC-T2plus.interconnect.opu-c=56
-fault.cpu.ultraSPARC-T2plus.chip=57
-fault.asic.ultraSPARC-T2plus.interconnect.lfu-c fault.cpu.ultraSPARC-T2plus.chip=58
-fault.asic.ultraSPARC-T2plus.interconnect.lfu-f fault.cpu.ultraSPARC-T2plus.chip=59
-fault.asic.ultraSPARC-T2plus.interconnect.lfu-u fault.cpu.ultraSPARC-T2plus.chip=60
-fault.asic.ultraSPARC-T2plus.interconnect.lfu-u=61
-fault.asic.ultraSPARC-T2plus.interconnect.gpd-u fault.cpu.ultraSPARC-T2plus.chip=62
-fault.asic.ultraSPARC-T2plus.interconnect.gpd-c fault.cpu.ultraSPARC-T2plus.chip=63
-fault.asic.ultraSPARC-T2plus.interconnect.gpd-c=64
-fault.asic.fpga fault.asic.ultraSPARC-T2plus.interconnect.gpd-c=65
-fault.asic.ultraSPARC-T2plus.interconnect.asu=66
-fault.memory.dimm-page-retires-excessive=67
-fault.memory.dimm-ue-imminent=68
-fault.memory.dram-ue-imminent=69
-fault.cpu.generic-sparc.strand=70
-fault.cpu.generic-sparc.strand-nr=71
-fault.cpu.generic-sparc.strand-uc=72
-fault.cpu.generic-sparc.strand-uc-nr=73
-fault.cpu.generic-sparc.core=74
-fault.cpu.generic-sparc.core-nr=75
-fault.cpu.generic-sparc.core-uc=76
-fault.cpu.generic-sparc.core-uc-nr=77
-fault.cpu.generic-sparc.chip=78
-fault.cpu.generic-sparc.chip-nr=79
-fault.cpu.generic-sparc.chip-uc=80
-fault.cpu.generic-sparc.chip-uc-nr=81
-fault.cpu.generic-sparc.c2c=82
-fault.cpu.generic-sparc.c2c-failover=83
-fault.cpu.generic-sparc.c2c-uc=84
-fault.memory.memlink=85
-fault.memory.memlink-failover=86
-fault.memory.memlink-uc=87
-defect.fw.generic-sparc.addr-oob=88
-defect.fw.generic-sparc.erpt-gen=89
-fault.cpu.generic-sparc.bootbus=90
-fault.sp.failed=91
diff --git a/usr/src/cmd/fm/dicts/SUN4V.po b/usr/src/cmd/fm/dicts/SUN4V.po
deleted file mode 100644
index 39c9320a24..0000000000
--- a/usr/src/cmd/fm/dicts/SUN4V.po
+++ /dev/null
@@ -1,1481 +0,0 @@
-#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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
-#
-# DO NOT EDIT -- this file is generated by the Event Registry.
-#
-#
-# code: SUN4V-8000-1S
-# keys: fault.cpu.ultraSPARC-T1.ireg
-#
-msgid "SUN4V-8000-1S.type"
-msgstr "Fault"
-msgid "SUN4V-8000-1S.severity"
-msgstr "Minor"
-msgid "SUN4V-8000-1S.description"
-msgstr "The number of errors associated with this CPU has exceeded \n acceptable levels. Refer to %s for more information."
-msgid "SUN4V-8000-1S.response"
-msgstr "The fault manager will attempt to remove the affected CPU from service."
-msgid "SUN4V-8000-1S.impact"
-msgstr "System performance may be affected."
-msgid "SUN4V-8000-1S.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>."
-#
-# code: SUN4V-8000-2A
-# keys: fault.cpu.ultraSPARC-T1.freg
-#
-msgid "SUN4V-8000-2A.type"
-msgstr "Fault"
-msgid "SUN4V-8000-2A.severity"
-msgstr "Major"
-msgid "SUN4V-8000-2A.description"
-msgstr "The number of errors associated with this CPU has exceeded \n acceptable levels. Refer to %s for more information."
-msgid "SUN4V-8000-2A.response"
-msgstr "None"
-msgid "SUN4V-8000-2A.impact"
-msgstr "System performance may be affected."
-msgid "SUN4V-8000-2A.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>."
-#
-# code: SUN4V-8000-3P
-# keys: fault.cpu.ultraSPARC-T1.itlb
-#
-msgid "SUN4V-8000-3P.type"
-msgstr "Fault"
-msgid "SUN4V-8000-3P.severity"
-msgstr "Minor"
-msgid "SUN4V-8000-3P.description"
-msgstr "The number of errors associated with this CPU has exceeded \n acceptable levels. Refer to %s for more information."
-msgid "SUN4V-8000-3P.response"
-msgstr "The fault manager will attempt to remove the affected CPU from service."
-msgid "SUN4V-8000-3P.impact"
-msgstr "System performance may be affected.\n"
-msgid "SUN4V-8000-3P.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>."
-#
-# code: SUN4V-8000-4D
-# keys: fault.cpu.ultraSPARC-T1.dtlb
-#
-msgid "SUN4V-8000-4D.type"
-msgstr "Fault"
-msgid "SUN4V-8000-4D.severity"
-msgstr "Minor"
-msgid "SUN4V-8000-4D.description"
-msgstr "The number of errors associated with this CPU has exceeded \n acceptable levels. Refer to %s for more information."
-msgid "SUN4V-8000-4D.response"
-msgstr "The fault manager will attempt to remove the affected CPU from service."
-msgid "SUN4V-8000-4D.impact"
-msgstr "System performance may be affected.\n"
-msgid "SUN4V-8000-4D.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>."
-#
-# code: SUN4V-8000-5H
-# keys: fault.cpu.ultraSPARC-T1.icache
-#
-msgid "SUN4V-8000-5H.type"
-msgstr "Fault"
-msgid "SUN4V-8000-5H.severity"
-msgstr "Minor"
-msgid "SUN4V-8000-5H.description"
-msgstr "The number of errors associated with this CPU has exceeded \n acceptable levels. Refer to %s for more information."
-msgid "SUN4V-8000-5H.response"
-msgstr "The fault manager will attempt to remove the affected CPU from service."
-msgid "SUN4V-8000-5H.impact"
-msgstr "System performance may be affected.\n"
-msgid "SUN4V-8000-5H.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>."
-#
-# code: SUN4V-8000-63
-# keys: fault.cpu.ultraSPARC-T1.dcache
-#
-msgid "SUN4V-8000-63.type"
-msgstr "Fault"
-msgid "SUN4V-8000-63.severity"
-msgstr "Minor"
-msgid "SUN4V-8000-63.description"
-msgstr "The number of errors associated with this CPU has exceeded \n acceptable levels. Refer to %s for more information."
-msgid "SUN4V-8000-63.response"
-msgstr "The fault manager will attempt to remove the affected CPU from service."
-msgid "SUN4V-8000-63.impact"
-msgstr "System performance may be affected.\n"
-msgid "SUN4V-8000-63.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>."
-#
-# code: SUN4V-8000-7Y
-# keys: fault.cpu.ultraSPARC-T1.mau
-#
-msgid "SUN4V-8000-7Y.type"
-msgstr "Fault"
-msgid "SUN4V-8000-7Y.severity"
-msgstr "Major"
-msgid "SUN4V-8000-7Y.description"
-msgstr "The number of errors associated with this CPU has exceeded \n acceptable levels. Refer to %s for more information."
-msgid "SUN4V-8000-7Y.response"
-msgstr "None"
-msgid "SUN4V-8000-7Y.impact"
-msgstr "System performance may be affected.\n"
-msgid "SUN4V-8000-7Y.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>."
-#
-# code: SUN4V-8000-8Q
-# keys: fault.cpu.ultraSPARC-T1.l2cachedata
-#
-msgid "SUN4V-8000-8Q.type"
-msgstr "Fault"
-msgid "SUN4V-8000-8Q.severity"
-msgstr "Critical"
-msgid "SUN4V-8000-8Q.description"
-msgstr "The number of errors associated with this CPU has exceeded \n acceptable levels. Refer to %s for more information."
-msgid "SUN4V-8000-8Q.response"
-msgstr "None"
-msgid "SUN4V-8000-8Q.impact"
-msgstr "System performance may be affected.\n"
-msgid "SUN4V-8000-8Q.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>."
-#
-# code: SUN4V-8000-9C
-# keys: fault.cpu.ultraSPARC-T1.l2cachetag
-#
-msgid "SUN4V-8000-9C.type"
-msgstr "Fault"
-msgid "SUN4V-8000-9C.severity"
-msgstr "Critical"
-msgid "SUN4V-8000-9C.description"
-msgstr "The number of errors associated with this CPU has exceeded \n acceptable levels. Refer to %s for more information."
-msgid "SUN4V-8000-9C.response"
-msgstr "None"
-msgid "SUN4V-8000-9C.impact"
-msgstr "System performance may be affected.\n"
-msgid "SUN4V-8000-9C.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>."
-#
-# code: SUN4V-8000-AR
-# keys: fault.cpu.ultraSPARC-T1.l2cachectl
-#
-msgid "SUN4V-8000-AR.type"
-msgstr "Fault"
-msgid "SUN4V-8000-AR.severity"
-msgstr "Critical"
-msgid "SUN4V-8000-AR.description"
-msgstr "The number of errors associated with this CPU has exceeded \n acceptable levels. Refer to %s for more information."
-msgid "SUN4V-8000-AR.response"
-msgstr "None"
-msgid "SUN4V-8000-AR.impact"
-msgstr "System performance may be affected.\n"
-msgid "SUN4V-8000-AR.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>."
-#
-# code: SUN4V-8000-C4
-# keys: fault.memory.page
-#
-msgid "SUN4V-8000-C4.type"
-msgstr "Fault"
-msgid "SUN4V-8000-C4.severity"
-msgstr "Minor"
-msgid "SUN4V-8000-C4.description"
-msgstr "The number of errors associated with this memory module continues to exceed acceptable levels. Refer to %s for more information."
-msgid "SUN4V-8000-C4.response"
-msgstr "An attempt will be made to remove this memory page from service."
-msgid "SUN4V-8000-C4.impact"
-msgstr "The performance of the system may be minimally impacted as a result of removing the memory page from operation."
-msgid "SUN4V-8000-C4.action"
-msgstr "No repair action is recommended at this time."
-#
-# code: SUN4V-8000-DX
-# keys: fault.memory.dimm
-#
-msgid "SUN4V-8000-DX.type"
-msgstr "Fault"
-msgid "SUN4V-8000-DX.severity"
-msgstr "Major"
-msgid "SUN4V-8000-DX.description"
-msgstr "The number of correctable errors associated with this memory module has exceeded acceptable levels. Refer to %s for more information."
-msgid "SUN4V-8000-DX.response"
-msgstr "Pages of memory associated with this memory module have been removed from service, up to a limit which has now been reached."
-msgid "SUN4V-8000-DX.impact"
-msgstr "Total system memory capacity has been reduced."
-msgid "SUN4V-8000-DX.action"
-msgstr "Schedule a repair procedure to replace the affected memory module. Use 'fmadm faulty' to identify the memory module."
-#
-# code: SUN4V-8000-E2
-# keys: fault.memory.bank
-#
-msgid "SUN4V-8000-E2.type"
-msgstr "Fault"
-msgid "SUN4V-8000-E2.severity"
-msgstr "Critical"
-msgid "SUN4V-8000-E2.description"
-msgstr "The number of errors associated with this memory module has exceeded acceptable levels. Refer to %s for more information."
-msgid "SUN4V-8000-E2.response"
-msgstr "Pages of memory associated with this memory module are being removed from service as errors are reported."
-msgid "SUN4V-8000-E2.impact"
-msgstr "Total system memory capacity will be reduced as pages are retired."
-msgid "SUN4V-8000-E2.action"
-msgstr "Schedule a repair procedure to replace the affected memory module. Use fmdump -v -u <EVENT_ID> to identify the module."
-#
-# code: SUN4V-8000-FJ
-# keys: fault.memory.link-c
-#
-msgid "SUN4V-8000-FJ.type"
-msgstr "Fault"
-msgid "SUN4V-8000-FJ.severity"
-msgstr "Major"
-msgid "SUN4V-8000-FJ.description"
-msgstr "A problem was detected in the interconnect between a memory DIMM module and\nits memory controller. \n Refer to %s for more information."
-msgid "SUN4V-8000-FJ.response"
-msgstr "No automated response.\n"
-msgid "SUN4V-8000-FJ.impact"
-msgstr "System performance may be impacted.\n"
-msgid "SUN4V-8000-FJ.action"
-msgstr "At a convenient time, try reseating the memory module(s). If the problem persists,\ncontact your hardware support team to schedule part replacement.\n"
-#
-# code: SUN4V-8000-GE
-# keys: fault.cpu.ultraSPARC-T2.ireg
-#
-msgid "SUN4V-8000-GE.type"
-msgstr "Fault"
-msgid "SUN4V-8000-GE.severity"
-msgstr "Minor"
-msgid "SUN4V-8000-GE.description"
-msgstr "The number of integer register errors associated with this thread has exceeded acceptable levels.\n Refer to %s for more information."
-msgid "SUN4V-8000-GE.response"
-msgstr "The fault manager will attempt to remove the affected thread\nfrom service.\n"
-msgid "SUN4V-8000-GE.impact"
-msgstr "System performance may be affected. \n"
-msgid "SUN4V-8000-GE.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>.\n"
-#
-# code: SUN4V-8000-HP
-# keys: fault.cpu.ultraSPARC-T2.freg
-#
-msgid "SUN4V-8000-HP.type"
-msgstr "Fault"
-msgid "SUN4V-8000-HP.severity"
-msgstr "Minor"
-msgid "SUN4V-8000-HP.description"
-msgstr "The number of floating register errors associated with this thread has exceeded acceptable levels.\n Refer to %s for more information."
-msgid "SUN4V-8000-HP.response"
-msgstr "The fault manager will attempt to remove the affected thread\nfrom service.\n"
-msgid "SUN4V-8000-HP.impact"
-msgstr "System performance may be affected. \n"
-msgid "SUN4V-8000-HP.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>.\n"
-#
-# code: SUN4V-8000-JA
-# keys: fault.cpu.ultraSPARC-T2.misc_reg
-#
-msgid "SUN4V-8000-JA.type"
-msgstr "Fault"
-msgid "SUN4V-8000-JA.severity"
-msgstr "Minor"
-msgid "SUN4V-8000-JA.description"
-msgstr "The number of ancillary register errors associated with this thread has exceeded acceptable levels.\n Refer to %s for more information."
-msgid "SUN4V-8000-JA.response"
-msgstr "The fault manager will attempt to remove the affected thread\nfrom service.\n"
-msgid "SUN4V-8000-JA.impact"
-msgstr "System performance may be affected. \n"
-msgid "SUN4V-8000-JA.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>.\n"
-#
-# code: SUN4V-8000-KS
-# keys: fault.cpu.ultraSPARC-T2.itlb
-#
-msgid "SUN4V-8000-KS.type"
-msgstr "Fault"
-msgid "SUN4V-8000-KS.severity"
-msgstr "Major"
-msgid "SUN4V-8000-KS.description"
-msgstr "The number of ITLB errors associated with this thread has exceeded acceptable levels.\n Refer to %s for more information."
-msgid "SUN4V-8000-KS.response"
-msgstr "The fault manager will attempt to remove all threads associated with\nthis resource from service.\n"
-msgid "SUN4V-8000-KS.impact"
-msgstr "System performance is likely to be affected. \n"
-msgid "SUN4V-8000-KS.action"
-msgstr "Schedule a repair procedure to replace the affected resource, the identity of which can be determined using fmdump -v -u <EVENT_ID>.\n"
-#
-# code: SUN4V-8000-L5
-# keys: fault.cpu.ultraSPARC-T2.dtlb
-#
-msgid "SUN4V-8000-L5.type"
-msgstr "Fault"
-msgid "SUN4V-8000-L5.severity"
-msgstr "Major"
-msgid "SUN4V-8000-L5.description"
-msgstr "The number of DTLB errors associated with this thread has exceeded acceptable levels.\n Refer to %s for more information."
-msgid "SUN4V-8000-L5.response"
-msgstr "The fault manager will attempt to remove all threads associated with\nthis resource from service.\n"
-msgid "SUN4V-8000-L5.impact"
-msgstr "System performance is likely to be affected. \n"
-msgid "SUN4V-8000-L5.action"
-msgstr "Schedule a repair procedure to replace the affected resource, the identity of which can be determined using fmdump -v -u <EVENT_ID>.\n"
-#
-# code: SUN4V-8000-MY
-# keys: fault.cpu.ultraSPARC-T2.icache
-#
-msgid "SUN4V-8000-MY.type"
-msgstr "Fault"
-msgid "SUN4V-8000-MY.severity"
-msgstr "Major"
-msgid "SUN4V-8000-MY.description"
-msgstr "The number of I-cache errors associated with this thread has exceeded acceptable levels.\n Refer to %s for more information."
-msgid "SUN4V-8000-MY.response"
-msgstr "The fault manager will attempt to remove all threads associated with\nthis resource from service.\n"
-msgid "SUN4V-8000-MY.impact"
-msgstr "System performance is likely to be affected. \n"
-msgid "SUN4V-8000-MY.action"
-msgstr "Schedule a repair procedure to replace the affected resource, the identity of which can be determined using fmdump -v -u <EVENT_ID>.\n"
-#
-# code: SUN4V-8000-N3
-# keys: fault.cpu.ultraSPARC-T2.dcache
-#
-msgid "SUN4V-8000-N3.type"
-msgstr "Fault"
-msgid "SUN4V-8000-N3.severity"
-msgstr "Major"
-msgid "SUN4V-8000-N3.description"
-msgstr "The number of D-cache errors associated with this thread has exceeded acceptable levels.\n Refer to %s for more information."
-msgid "SUN4V-8000-N3.response"
-msgstr "The fault manager will attempt to remove all threads associated with\nthis resource from service.\n"
-msgid "SUN4V-8000-N3.impact"
-msgstr "System performance is likely to be affected. \n"
-msgid "SUN4V-8000-N3.action"
-msgstr "Schedule a repair procedure to replace the affected resource, the identity of which can be determined using fmdump -v -u <EVENT_ID>.\n"
-#
-# code: SUN4V-8000-PH
-# keys: fault.cpu.ultraSPARC-T2.mau
-#
-msgid "SUN4V-8000-PH.type"
-msgstr "Fault"
-msgid "SUN4V-8000-PH.severity"
-msgstr "Major"
-msgid "SUN4V-8000-PH.description"
-msgstr "The number of modular arithmetic unit errors associated with this unit has exceeded acceptable levels.\n Refer to %s for more information."
-msgid "SUN4V-8000-PH.response"
-msgstr "Cryptographic software will not use this modular arithmetic unit.\n"
-msgid "SUN4V-8000-PH.impact"
-msgstr "System performance is likely to be affected. \n"
-msgid "SUN4V-8000-PH.action"
-msgstr "Schedule a repair procedure to replace the affected resource, the identity of which can be determined using fmdump -v -u <EVENT_ID>.\n"
-#
-# code: SUN4V-8000-QD
-# keys: fault.cpu.ultraSPARC-T2.l2data-c
-#
-msgid "SUN4V-8000-QD.type"
-msgstr "Fault"
-msgid "SUN4V-8000-QD.severity"
-msgstr "Critical"
-msgid "SUN4V-8000-QD.description"
-msgstr "The number of level 2 cache correctable data errors has exceeded acceptable levels.\n Refer to %s for more information."
-msgid "SUN4V-8000-QD.response"
-msgstr "No automated response.\n"
-msgid "SUN4V-8000-QD.impact"
-msgstr "System performance is likely to be affected. \n"
-msgid "SUN4V-8000-QD.action"
-msgstr "Schedule a repair procedure to replace the affected resource, the identity of which can be determined using fmdump -v -u <EVENT_ID>.\n"
-#
-# code: SUN4V-8000-R4
-# keys: fault.cpu.ultraSPARC-T2.l2cachetag
-#
-msgid "SUN4V-8000-R4.type"
-msgstr "Fault"
-msgid "SUN4V-8000-R4.severity"
-msgstr "Critical"
-msgid "SUN4V-8000-R4.description"
-msgstr "The number of level 2 cache tag errors has exceeded acceptable levels.\n Refer to %s for more information."
-msgid "SUN4V-8000-R4.response"
-msgstr "No automated response.\n"
-msgid "SUN4V-8000-R4.impact"
-msgstr "System performance is likely to be affected. \n"
-msgid "SUN4V-8000-R4.action"
-msgstr "Schedule a repair procedure to replace the affected resource, the identity of which can be determined using fmdump -v -u <EVENT_ID>.\n"
-#
-# code: SUN4V-8000-SR
-# keys: fault.cpu.ultraSPARC-T2.l2cachectl
-#
-msgid "SUN4V-8000-SR.type"
-msgstr "Fault"
-msgid "SUN4V-8000-SR.severity"
-msgstr "Critical"
-msgid "SUN4V-8000-SR.description"
-msgstr "The number of level 2 cache control errors has exceeded acceptable levels.\n Refer to %s for more information."
-msgid "SUN4V-8000-SR.response"
-msgstr "No automated response.\n"
-msgid "SUN4V-8000-SR.impact"
-msgstr "System performance is likely to be affected. System may be unstable.\n"
-msgid "SUN4V-8000-SR.action"
-msgstr "Schedule a repair procedure to replace the affected resource, the identity of which can be determined using fmdump -v -u <EVENT_ID>.\n"
-#
-# code: SUN4V-8000-TC
-# keys: fault.memory.link-u
-#
-msgid "SUN4V-8000-TC.type"
-msgstr "Fault"
-msgid "SUN4V-8000-TC.severity"
-msgstr "Critical"
-msgid "SUN4V-8000-TC.description"
-msgstr "A problem was detected in the interconnect between a memory DIMM module and\nits memory controller. \n Refer to %s for more information."
-msgid "SUN4V-8000-TC.response"
-msgstr "No automated response.\n"
-msgid "SUN4V-8000-TC.impact"
-msgstr "System performance may be impacted.\n"
-msgid "SUN4V-8000-TC.action"
-msgstr "At a convenient time, try reseating the memory module. If the problem persists,\ncontact your hardware support team to schedule part replacement.\n"
-#
-# code: SUN4V-8000-UQ
-# keys: fault.cpu.ultraSPARC-T2.l2data-u
-#
-msgid "SUN4V-8000-UQ.type"
-msgstr "Fault"
-msgid "SUN4V-8000-UQ.severity"
-msgstr "Critical"
-msgid "SUN4V-8000-UQ.description"
-msgstr "The number of level 2 cache uncorrectable data errors has exceeded acceptable levels.\n Refer to %s for more information."
-msgid "SUN4V-8000-UQ.response"
-msgstr "No automated response.\n"
-msgid "SUN4V-8000-UQ.impact"
-msgstr "System performance is likely to be affected. \n"
-msgid "SUN4V-8000-UQ.action"
-msgstr "Schedule a repair procedure to replace the affected resource, the identity of which can be determined using fmdump -v -u <EVENT_ID>.\n"
-#
-# code: SUN4V-8000-VE
-# keys: fault.cpu.ultraSPARC-T1.l2data-c
-#
-msgid "SUN4V-8000-VE.type"
-msgstr "Fault"
-msgid "SUN4V-8000-VE.severity"
-msgstr "Critical"
-msgid "SUN4V-8000-VE.description"
-msgstr "The number of level 2 cache correctable data errors has exceeded acceptable levels.\n Refer to %s for more information."
-msgid "SUN4V-8000-VE.response"
-msgstr "No automated response.\n"
-msgid "SUN4V-8000-VE.impact"
-msgstr "System performance is likely to be affected. \n"
-msgid "SUN4V-8000-VE.action"
-msgstr "Schedule a repair procedure to replace the affected resource, the identity of which can be determined using fmdump -v -u <EVENT_ID>.\n"
-#
-# code: SUN4V-8000-WJ
-# keys: fault.cpu.ultraSPARC-T1.l2data-u
-#
-msgid "SUN4V-8000-WJ.type"
-msgstr "Fault"
-msgid "SUN4V-8000-WJ.severity"
-msgstr "Critical"
-msgid "SUN4V-8000-WJ.description"
-msgstr "The number of level 2 cache uncorrectable data errors has exceeded acceptable levels.\n Refer to %s for more information."
-msgid "SUN4V-8000-WJ.response"
-msgstr "No automated response.\n"
-msgid "SUN4V-8000-WJ.impact"
-msgstr "System performance is likely to be affected. \n"
-msgid "SUN4V-8000-WJ.action"
-msgstr "Schedule a repair procedure to replace the affected resource, the identity of which can be determined using fmdump -v -u <EVENT_ID>.\n"
-#
-# code: SUN4V-8000-X2
-# keys: fault.memory.datapath
-#
-msgid "SUN4V-8000-X2.type"
-msgstr "Fault"
-msgid "SUN4V-8000-X2.severity"
-msgstr "Major"
-msgid "SUN4V-8000-X2.description"
-msgstr "Errors have been detected on multiple memory modules, suggesting that a problem exists somewhere else in the system.\n Refer to %s for more information."
-msgid "SUN4V-8000-X2.response"
-msgstr "Error reports from the affected components will be logged for examination by your illumos distribution team.\n"
-msgid "SUN4V-8000-X2.impact"
-msgstr "System performance and stability may be affected. \n"
-msgid "SUN4V-8000-X2.action"
-msgstr "Contact your service provider for further diagnosis.\n"
-#
-# code: SUN4V-8000-YX
-# keys: fault.io.n2.ncu
-#
-msgid "SUN4V-8000-YX.type"
-msgstr "Fault"
-msgid "SUN4V-8000-YX.severity"
-msgstr "Critical"
-msgid "SUN4V-8000-YX.description"
-msgstr "A problem was detected in the NCU subsystem of the N2's SOC\n Refer to %s for more information."
-msgid "SUN4V-8000-YX.response"
-msgstr "One or more device instances may be disabled\n"
-msgid "SUN4V-8000-YX.impact"
-msgstr "Loss of services provided by the device\ninstances associated with this fault\n"
-msgid "SUN4V-8000-YX.action"
-msgstr "Schedule a repair procedure to replace the affected\ndevice if necessary, or contact your hardware support team for support.\n"
-#
-# code: SUN4V-8001-02
-# keys: fault.io.n2.dmu
-#
-msgid "SUN4V-8001-02.type"
-msgstr "Fault"
-msgid "SUN4V-8001-02.severity"
-msgstr "Critical"
-msgid "SUN4V-8001-02.description"
-msgstr "A problem was detected in the DMU subsystem of the N2's SOC\n Refer to %s for more information."
-msgid "SUN4V-8001-02.response"
-msgstr "One or more device instances may be disabled\n"
-msgid "SUN4V-8001-02.impact"
-msgstr "Loss of services provided by the device\ninstances associated with this fault\n"
-msgid "SUN4V-8001-02.action"
-msgstr "Schedule a repair procedure to replace the affected\ndevice if necessary, or contact your illumos distribution team for support.\n"
-#
-# code: SUN4V-8001-1X
-# keys: fault.io.n2.niu
-#
-msgid "SUN4V-8001-1X.type"
-msgstr "Fault"
-msgid "SUN4V-8001-1X.severity"
-msgstr "Critical"
-msgid "SUN4V-8001-1X.description"
-msgstr "A problem was detected in the NIU subsystem of the N2's SOC\n Refer to %s for more information."
-msgid "SUN4V-8001-1X.response"
-msgstr "One or more device instances may be disabled\n"
-msgid "SUN4V-8001-1X.impact"
-msgstr "Loss of services provided by the device\ninstances associated with this fault\n"
-msgid "SUN4V-8001-1X.action"
-msgstr "Schedule a repair procedure to replace the affected\ndevice if necessary, or contact your illumos distribution team for support.\n"
-#
-# code: SUN4V-8001-2E
-# keys: fault.io.n2.siu
-#
-msgid "SUN4V-8001-2E.type"
-msgstr "Fault"
-msgid "SUN4V-8001-2E.severity"
-msgstr "Critical"
-msgid "SUN4V-8001-2E.description"
-msgstr "A problem was detected in the SIU subsystem of the N2's SOC\n Refer to %s for more information."
-msgid "SUN4V-8001-2E.response"
-msgstr "One or more device instances may be disabled\n"
-msgid "SUN4V-8001-2E.impact"
-msgstr "Loss of services provided by the device\ninstances associated with this fault\n"
-msgid "SUN4V-8001-2E.action"
-msgstr "Schedule a repair procedure to replace the affected\ndevice if necessary, or contact your illumos distribution team for support.\n"
-#
-# code: SUN4V-8001-3J
-# keys: fault.io.n2.soc
-#
-msgid "SUN4V-8001-3J.type"
-msgstr "Fault"
-msgid "SUN4V-8001-3J.severity"
-msgstr "Critical"
-msgid "SUN4V-8001-3J.description"
-msgstr "A problem was detected in N2's SOC\n Refer to %s for more information."
-msgid "SUN4V-8001-3J.response"
-msgstr "One or more device instances may be disabled\n"
-msgid "SUN4V-8001-3J.impact"
-msgstr "Loss of services provided by the device\ninstances associated with this fault\n"
-msgid "SUN4V-8001-3J.action"
-msgstr "Schedule a repair procedure to replace the affected\ndevice if necessary, or contact your illumos distribution team for support.\n"
-#
-# code: SUN4V-8001-4C
-# keys: fault.io.n2.crossbar
-#
-msgid "SUN4V-8001-4C.type"
-msgstr "Fault"
-msgid "SUN4V-8001-4C.severity"
-msgstr "Critical"
-msgid "SUN4V-8001-4C.description"
-msgstr "A problem was detected in the crossbar of the N2's SOC\n Refer to %s for more information."
-msgid "SUN4V-8001-4C.response"
-msgstr "One or more device instances may be disabled\n"
-msgid "SUN4V-8001-4C.impact"
-msgstr "Loss of services provided by the device\ninstances associated with this fault\n"
-msgid "SUN4V-8001-4C.action"
-msgstr "Schedule a repair procedure to replace the affected\ndevice if necessary, or contact your illumos distribution team for support.\n"
-#
-# code: SUN4V-8001-5Q
-# keys: fault.io.fire.fw-epkt fault.io.fire.sw-epkt fault.io.fire.sw-fw-mismatch
-#
-msgid "SUN4V-8001-5Q.type"
-msgstr "Fault"
-msgid "SUN4V-8001-5Q.severity"
-msgstr "Critical"
-msgid "SUN4V-8001-5Q.description"
-msgstr "An uncorrectable problem was detected in the IO hostbridge in which a mismatch\nin the SW and FW prevents the error to be properly handled.\n Refer to %s for more information."
-msgid "SUN4V-8001-5Q.response"
-msgstr "One or more device instances may be disabled\n"
-msgid "SUN4V-8001-5Q.impact"
-msgstr "Loss of services provided by the device\ninstances associated with this fault\n"
-msgid "SUN4V-8001-5Q.action"
-msgstr "Schedule a repair procedure to replace the affected\ndevice if necessary, or contact your illumos distribution team for support.\n"
-#
-# code: SUN4V-8001-64
-# keys: fault.io.vf.ncx
-#
-msgid "SUN4V-8001-64.type"
-msgstr "Fault"
-msgid "SUN4V-8001-64.severity"
-msgstr "Critical"
-msgid "SUN4V-8001-64.description"
-msgstr "An uncorrectable problem was detected in the NCX subsystem.\n Refer to %s for more information."
-msgid "SUN4V-8001-64.response"
-msgstr "One or more device instances may be disabled\n"
-msgid "SUN4V-8001-64.impact"
-msgstr "Loss of services provided by the device\ninstances associated with this fault\n"
-msgid "SUN4V-8001-64.action"
-msgstr "Schedule a repair procedure to replace the affected\ndevice if necessary, or contact your illumos distribution team for support.\n"
-#
-# code: SUN4V-8001-7R
-# keys: fault.memory.link-f
-#
-msgid "SUN4V-8001-7R.type"
-msgstr "Fault"
-msgid "SUN4V-8001-7R.severity"
-msgstr "Major"
-msgid "SUN4V-8001-7R.description"
-msgstr "A problem was detected in the interconnect between a memory DIMM module and\nits memory controller. A lane failover has taken place.\n Refer to %s for more information."
-msgid "SUN4V-8001-7R.response"
-msgstr "No automated response.\n"
-msgid "SUN4V-8001-7R.impact"
-msgstr "System performance may be impacted.\n"
-msgid "SUN4V-8001-7R.action"
-msgstr "At a convenient time, try reseating the memory module(s). If the problem persists,\ncontact your hardware support team to schedule part replacement.\n"
-#
-# code: SUN4V-8001-8H
-# keys: fault.cpu.ultraSPARC-T2plus.ireg
-#
-msgid "SUN4V-8001-8H.type"
-msgstr "Fault"
-msgid "SUN4V-8001-8H.severity"
-msgstr "Minor"
-msgid "SUN4V-8001-8H.description"
-msgstr "The number of integer register errors associated with this thread has exceeded acceptable levels.\n Refer to %s for more information."
-msgid "SUN4V-8001-8H.response"
-msgstr "The fault manager will attempt to remove the affected thread\nfrom service.\n"
-msgid "SUN4V-8001-8H.impact"
-msgstr "System performance may be affected. \n"
-msgid "SUN4V-8001-8H.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>.\n"
-#
-# code: SUN4V-8001-9D
-# keys: fault.cpu.ultraSPARC-T2plus.freg
-#
-msgid "SUN4V-8001-9D.type"
-msgstr "Fault"
-msgid "SUN4V-8001-9D.severity"
-msgstr "Minor"
-msgid "SUN4V-8001-9D.description"
-msgstr "The number of floating register errors associated with this thread has exceeded acceptable levels.\n Refer to %s for more information."
-msgid "SUN4V-8001-9D.response"
-msgstr "The fault manager will attempt to remove the affected thread\nfrom service.\n"
-msgid "SUN4V-8001-9D.impact"
-msgstr "System performance may be affected. \n"
-msgid "SUN4V-8001-9D.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>.\n"
-#
-# code: SUN4V-8001-AY
-# keys: fault.cpu.ultraSPARC-T2plus.misc_reg
-#
-msgid "SUN4V-8001-AY.type"
-msgstr "Fault"
-msgid "SUN4V-8001-AY.severity"
-msgstr "Minor"
-msgid "SUN4V-8001-AY.description"
-msgstr "The number of ancillary register errors associated with this thread has exceeded acceptable levels.\n Refer to %s for more information."
-msgid "SUN4V-8001-AY.response"
-msgstr "The fault manager will attempt to remove the affected thread\nfrom service.\n"
-msgid "SUN4V-8001-AY.impact"
-msgstr "System performance may be affected. \n"
-msgid "SUN4V-8001-AY.action"
-msgstr "Schedule a repair procedure to replace the affected CPU, the identity of which can be determined using fmdump -v -u <EVENT_ID>.\n"
-#
-# code: SUN4V-8001-C3
-# keys: fault.cpu.ultraSPARC-T2plus.itlb
-#
-msgid "SUN4V-8001-C3.type"
-msgstr "Fault"
-msgid "SUN4V-8001-C3.severity"
-msgstr "Major"
-msgid "SUN4V-8001-C3.description"
-msgstr "The number of ITLB errors associated with this thread has exceeded acceptable levels.\n Refer to %s for more information."
-msgid "SUN4V-8001-C3.response"
-msgstr "The fault manager will attempt to remove all threads associated with\nthis resource from service.\n"
-msgid "SUN4V-8001-C3.impact"
-msgstr "System performance is likely to be affected. \n"
-msgid "SUN4V-8001-C3.action"
-msgstr "Schedule a repair procedure to replace the affected resource, the identity of which can be determined using fmdump -v -u <EVENT_ID>.\n"
-#
-# code: SUN4V-8001-DS
-# keys: fault.cpu.ultraSPARC-T2plus.dtlb
-#
-msgid "SUN4V-8001-DS.type"
-msgstr "Fault"
-msgid "SUN4V-8001-DS.severity"
-msgstr "Major"
-msgid "SUN4V-8001-DS.description"
-msgstr "The number of DTLB errors associated with this thread has exceeded acceptable levels.\n Refer to %s for more information."
-msgid "SUN4V-8001-DS.response"
-msgstr "The fault manager will attempt to remove all threads associated with\nthis resource from service.\n"
-msgid "SUN4V-8001-DS.impact"
-msgstr "System performance is likely to be affected. \n"
-msgid "SUN4V-8001-DS.action"
-msgstr "Schedule a repair procedure to replace the affected resource, the identity of which can be determined using fmdump -v -u <EVENT_ID>.\n"
-#
-# code: SUN4V-8001-E5
-# keys: fault.cpu.ultraSPARC-T2plus.icache
-#
-msgid "SUN4V-8001-E5.type"
-msgstr "Fault"
-msgid "SUN4V-8001-E5.severity"
-msgstr "Major"
-msgid "SUN4V-8001-E5.description"
-msgstr "The number of I-cache errors associated with this thread has exceeded acceptable levels.\n Refer to %s for more information."
-msgid "SUN4V-8001-E5.response"
-msgstr "The fault manager will attempt to remove all threads associated with\nthis resource from service.\n"
-msgid "SUN4V-8001-E5.impact"
-msgstr "System performance is likely to be affected. \n"
-msgid "SUN4V-8001-E5.action"
-msgstr "Schedule a repair procedure to replace the affected resource, the identity of which can be determined using fmdump -v -u <EVENT_ID>.\n"
-#
-# code: SUN4V-8001-FP
-# keys: fault.cpu.ultraSPARC-T2plus.dcache
-#
-msgid "SUN4V-8001-FP.type"
-msgstr "Fault"
-msgid "SUN4V-8001-FP.severity"
-msgstr "Major"
-msgid "SUN4V-8001-FP.description"
-msgstr "The number of D-cache errors associated with this thread has exceeded acceptable levels.\n Refer to %s for more information."
-msgid "SUN4V-8001-FP.response"
-msgstr "The fault manager will attempt to remove all threads associated with\nthis resource from service.\n"
-msgid "SUN4V-8001-FP.impact"
-msgstr "System performance is likely to be affected. \n"
-msgid "SUN4V-8001-FP.action"
-msgstr "Schedule a repair procedure to replace the affected resource, the identity of which can be determined using fmdump -v -u <EVENT_ID>.\n"
-#
-# code: SUN4V-8001-GA
-# keys: fault.cpu.ultraSPARC-T2plus.mau
-#
-msgid "SUN4V-8001-GA.type"
-msgstr "Fault"
-msgid "SUN4V-8001-GA.severity"
-msgstr "Major"
-msgid "SUN4V-8001-GA.description"
-msgstr "The number of modular arithmetic unit errors associated with this thread has exceeded acceptable levels.\n Refer to %s for more information."
-msgid "SUN4V-8001-GA.response"
-msgstr "Cryptographic software will not use this modular arithmetic unit.\n\n"
-msgid "SUN4V-8001-GA.impact"
-msgstr "System performance is likely to be affected. \n"
-msgid "SUN4V-8001-GA.action"
-msgstr "Schedule a repair procedure to replace the affected resource, the identity of which can be determined using fmdump -v -u <EVENT_ID>.\n"
-#
-# code: SUN4V-8001-HJ
-# keys: fault.cpu.ultraSPARC-T2plus.l2data-c
-#
-msgid "SUN4V-8001-HJ.type"
-msgstr "Fault"
-msgid "SUN4V-8001-HJ.severity"
-msgstr "Critical"
-msgid "SUN4V-8001-HJ.description"
-msgstr "The number of level 2 cache correctable data errors has exceeded acceptable levels.\n Refer to %s for more information."
-msgid "SUN4V-8001-HJ.response"
-msgstr "No automated response.\n"
-msgid "SUN4V-8001-HJ.impact"
-msgstr "System performance is likely to be affected. \n"
-msgid "SUN4V-8001-HJ.action"
-msgstr "Schedule a repair procedure to replace the affected resource, the identity of which can be determined using fmdump -v -u <EVENT_ID>.\n"
-#
-# code: SUN4V-8001-JE
-# keys: fault.cpu.ultraSPARC-T2plus.l2cachetag
-#
-msgid "SUN4V-8001-JE.type"
-msgstr "Fault"
-msgid "SUN4V-8001-JE.severity"
-msgstr "Critical"
-msgid "SUN4V-8001-JE.description"
-msgstr "The number of level 2 cache tag errors has exceeded acceptable levels.\n Refer to %s for more information."
-msgid "SUN4V-8001-JE.response"
-msgstr "No automated response.\n"
-msgid "SUN4V-8001-JE.impact"
-msgstr "System performance is likely to be affected. \n"
-msgid "SUN4V-8001-JE.action"
-msgstr "Schedule a repair procedure to replace the affected resource, the identity of which can be determined using fmdump -v -u <EVENT_ID>.\n"
-#
-# code: SUN4V-8001-KX
-# keys: fault.cpu.ultraSPARC-T2plus.l2cachectl
-#
-msgid "SUN4V-8001-KX.type"
-msgstr "Fault"
-msgid "SUN4V-8001-KX.severity"
-msgstr "Critical"
-msgid "SUN4V-8001-KX.description"
-msgstr "The number of level 2 cache control errors has exceeded acceptable levels.\n Refer to %s for more information."
-msgid "SUN4V-8001-KX.response"
-msgstr "No automated response.\n"
-msgid "SUN4V-8001-KX.impact"
-msgstr "System performance is likely to be affected. System may be unstable.\n"
-msgid "SUN4V-8001-KX.action"
-msgstr "Schedule a repair procedure to replace the affected resource, the identity of which can be determined using fmdump -v -u <EVENT_ID>.\n"
-#
-# code: SUN4V-8001-L2
-# keys: fault.cpu.ultraSPARC-T2plus.l2data-u
-#
-msgid "SUN4V-8001-L2.type"
-msgstr "Fault"
-msgid "SUN4V-8001-L2.severity"
-msgstr "Critical"
-msgid "SUN4V-8001-L2.description"
-msgstr "The number of level 2 cache uncorrectable data errors has exceeded acceptable levels.\n Refer to %s for more information."
-msgid "SUN4V-8001-L2.response"
-msgstr "No automated response.\n"
-msgid "SUN4V-8001-L2.impact"
-msgstr "System performance is likely to be affected. \n"
-msgid "SUN4V-8001-L2.action"
-msgstr "Schedule a repair procedure to replace the affected resource, the identity of which can be determined using fmdump -v -u <EVENT_ID>.\n"
-#
-# code: SUN4V-8001-MR
-# keys: fault.cpu.ultraSPARC-T2plus.lfu-f
-#
-msgid "SUN4V-8001-MR.type"
-msgstr "Fault"
-msgid "SUN4V-8001-MR.severity"
-msgstr "Major"
-msgid "SUN4V-8001-MR.description"
-msgstr "A CPU chip's Link Framing Unit has stopped using a bad lane.\n Refer to %s for more information."
-msgid "SUN4V-8001-MR.response"
-msgstr "No other automated response.\n"
-msgid "SUN4V-8001-MR.impact"
-msgstr "The system's capacity to correct transmission errors between CPU chips has been reduced.\n"
-msgid "SUN4V-8001-MR.action"
-msgstr "Schedule a repair procedure to replace the affected resource, the identity of which can be determined using fmdump -v -u <EVENT_ID>.\n"
-#
-# code: SUN4V-8001-N4
-# keys: fault.cpu.ultraSPARC-T2plus.lfu-p
-#
-msgid "SUN4V-8001-N4.type"
-msgstr "Fault"
-msgid "SUN4V-8001-N4.severity"
-msgstr "Major"
-msgid "SUN4V-8001-N4.description"
-msgstr "A CPU chip's Link Framing Unit has encountered a protocol error.\n Refer to %s for more information."
-msgid "SUN4V-8001-N4.response"
-msgstr "No automated response.\n"
-msgid "SUN4V-8001-N4.impact"
-msgstr "The system has most likely taken a fatal reset.\n"
-msgid "SUN4V-8001-N4.action"
-msgstr "Schedule a repair procedure to replace the affected resource, the identity of which can be determined using fmdump -v -u <EVENT_ID>.\n"
-#
-# code: SUN4V-8001-PQ
-# keys: fault.cpu.ultraSPARC-T2plus.lfu-u
-#
-msgid "SUN4V-8001-PQ.type"
-msgstr "Fault"
-msgid "SUN4V-8001-PQ.severity"
-msgstr "Major"
-msgid "SUN4V-8001-PQ.description"
-msgstr "A CPU chip's Link Framing Unit has encountered an unrecoverable lane failure.\n Refer to %s for more information."
-msgid "SUN4V-8001-PQ.response"
-msgstr "No automated response.\n"
-msgid "SUN4V-8001-PQ.impact"
-msgstr "The system's integrity is seriously compromised.\n"
-msgid "SUN4V-8001-PQ.action"
-msgstr "Do not rely on this system for mission-critical tasks.\nSchedule a repair procedure to replace the affected resource, the identity of which can be determined using fmdump -v -u <EVENT_ID>.\n"
-#
-# code: SUN4V-8001-QC
-# keys: fault.asic.ultraSPARC-T2plus.interconnect.opu-u
-#
-msgid "SUN4V-8001-QC.type"
-msgstr "Fault"
-msgid "SUN4V-8001-QC.severity"
-msgstr "Critical"
-msgid "SUN4V-8001-QC.description"
-msgstr "The ultraSPARC-T2plus Coherency Interconnect has detected a fatal\ninternal problem.\n Refer to %s for more information."
-msgid "SUN4V-8001-QC.response"
-msgstr "No automated reponse.\n"
-msgid "SUN4V-8001-QC.impact"
-msgstr "The system's integrity is compromised.\n"
-msgid "SUN4V-8001-QC.action"
-msgstr "Schedule a repair procedure to replace the affected component, the identity\nof which can be determined by using fmdump -v -u <EVENT_ID>.\n"
-#
-# code: SUN4V-8001-R3
-# keys: fault.asic.ultraSPARC-T2plus.interconnect.opu-c
-#
-msgid "SUN4V-8001-R3.type"
-msgstr "Fault"
-msgid "SUN4V-8001-R3.severity"
-msgstr "Major"
-msgid "SUN4V-8001-R3.description"
-msgstr "The ultraSPARC-T2plus Coherency Interconnect has detected an internal problem.\n Refer to %s for more information."
-msgid "SUN4V-8001-R3.response"
-msgstr "No automated reponse.\n"
-msgid "SUN4V-8001-R3.impact"
-msgstr "The system's integrity is compromised.\n"
-msgid "SUN4V-8001-R3.action"
-msgstr "Schedule a repair procedure to replace the affected component, the identity\nof which can be determined by using fmdump -v -u <EVENT_ID>.\n"
-#
-# code: SUN4V-8001-SY
-# keys: fault.cpu.ultraSPARC-T2plus.chip
-#
-msgid "SUN4V-8001-SY.type"
-msgstr "Fault"
-msgid "SUN4V-8001-SY.severity"
-msgstr "Critical"
-msgid "SUN4V-8001-SY.description"
-msgstr "An ultraSPARC-T2plus Interconnect has detected a fatal communication\nproblem with a CPU.\n Refer to %s for more information."
-msgid "SUN4V-8001-SY.response"
-msgstr "No automated reponse.\n"
-msgid "SUN4V-8001-SY.impact"
-msgstr "The system's integrity is seriously compromised.\n"
-msgid "SUN4V-8001-SY.action"
-msgstr "Schedule a repair procedure to replace the affected component, the identity\nof which can be determined by using fmdump -v -u <EVENT_ID>.\n"
-#
-# code: SUN4V-8001-TD
-# keys: fault.asic.ultraSPARC-T2plus.interconnect.lfu-c fault.cpu.ultraSPARC-T2plus.chip
-#
-msgid "SUN4V-8001-TD.type"
-msgstr "Fault"
-msgid "SUN4V-8001-TD.severity"
-msgstr "Minor"
-msgid "SUN4V-8001-TD.description"
-msgstr "The number of CRC errors between an ultraSPARC-T2plus\nCoherency Interconnect and a CPU has exceeded acceptable levels.\n Refer to %s for more information."
-msgid "SUN4V-8001-TD.response"
-msgstr "No automated reponse.\n"
-msgid "SUN4V-8001-TD.impact"
-msgstr "The system's integrity is seriously compromised.\n"
-msgid "SUN4V-8001-TD.action"
-msgstr "Schedule a repair procedure to replace the affected component, the identity\nof which can be determined by using fmdump -v -u <EVENT_ID>.\n"
-#
-# code: SUN4V-8001-UH
-# keys: fault.asic.ultraSPARC-T2plus.interconnect.lfu-f fault.cpu.ultraSPARC-T2plus.chip
-#
-msgid "SUN4V-8001-UH.type"
-msgstr "Fault"
-msgid "SUN4V-8001-UH.severity"
-msgstr "Major"
-msgid "SUN4V-8001-UH.description"
-msgstr "An ultraSPARC-T2plus Coherency Interconnect has detected a single-lane\nfailure communicating with a CPU.\n Refer to %s for more information."
-msgid "SUN4V-8001-UH.response"
-msgstr "No automated reponse.\n"
-msgid "SUN4V-8001-UH.impact"
-msgstr "The system's performance may be impacted.\n"
-msgid "SUN4V-8001-UH.action"
-msgstr "Schedule a repair procedure to replace the affected component, the identity\nof which can be determined by using fmdump -v -u <EVENT_ID>.\n"
-#
-# code: SUN4V-8001-VA
-# keys: fault.asic.ultraSPARC-T2plus.interconnect.lfu-u fault.cpu.ultraSPARC-T2plus.chip
-#
-msgid "SUN4V-8001-VA.type"
-msgstr "Fault"
-msgid "SUN4V-8001-VA.severity"
-msgstr "Critical"
-msgid "SUN4V-8001-VA.description"
-msgstr "An ultraSPARC-T2plus Coherency Interconnect has detected a fatal\nfault commnicating with a CPU.\n Refer to %s for more information."
-msgid "SUN4V-8001-VA.response"
-msgstr "No automated reponse.\n"
-msgid "SUN4V-8001-VA.impact"
-msgstr "The system's integrity is seriously compromised.\n"
-msgid "SUN4V-8001-VA.action"
-msgstr "Schedule a repair procedure to replace the affected component, the identity\nof which can be determined by using fmdump -v -u <EVENT_ID>.\n"
-#
-# code: SUN4V-8001-WP
-# keys: fault.asic.ultraSPARC-T2plus.interconnect.lfu-u
-#
-msgid "SUN4V-8001-WP.type"
-msgstr "Fault"
-msgid "SUN4V-8001-WP.severity"
-msgstr "Critical"
-msgid "SUN4V-8001-WP.description"
-msgstr "An ultraSPARC-T2plus Coherency Interconnect has detected a fatal internal\nfault and has automatically reset.\n Refer to %s for more information."
-msgid "SUN4V-8001-WP.response"
-msgstr "No automated reponse.\n"
-msgid "SUN4V-8001-WP.impact"
-msgstr "The system's integrity is seriously compromised.\n"
-msgid "SUN4V-8001-WP.action"
-msgstr "Schedule a repair procedure to replace the affected component, the identity\nof which can be determined by using fmdump -v -u <EVENT_ID>.\n"
-#
-# code: SUN4V-8001-X5
-# keys: fault.asic.ultraSPARC-T2plus.interconnect.gpd-u fault.cpu.ultraSPARC-T2plus.chip
-#
-msgid "SUN4V-8001-X5.type"
-msgstr "Fault"
-msgid "SUN4V-8001-X5.severity"
-msgstr "Critical"
-msgid "SUN4V-8001-X5.description"
-msgstr "An ultraSPARC-T2plus Coherency Interconnect has detected a fatal communication\nfault with a CPU.\n Refer to %s for more information."
-msgid "SUN4V-8001-X5.response"
-msgstr "No automated reponse.\n"
-msgid "SUN4V-8001-X5.impact"
-msgstr "The system's performance may be compromised.\n"
-msgid "SUN4V-8001-X5.action"
-msgstr "Schedule a repair procedure to replace the affected component, the identity\nof which can be determined by using fmdump -v -u <EVENT_ID>.\n"
-#
-# code: SUN4V-8001-YS
-# keys: fault.asic.ultraSPARC-T2plus.interconnect.gpd-c fault.cpu.ultraSPARC-T2plus.chip
-#
-msgid "SUN4V-8001-YS.type"
-msgstr "Fault"
-msgid "SUN4V-8001-YS.severity"
-msgstr "Major"
-msgid "SUN4V-8001-YS.description"
-msgstr "An ultraSPARC-T2plus Coherency Interconnect has detected a fault\ncommunicating with a CPU.\n Refer to %s for more information."
-msgid "SUN4V-8001-YS.response"
-msgstr "No automated reponse.\n"
-msgid "SUN4V-8001-YS.impact"
-msgstr "The system's integrity may be seriously compromised.\n"
-msgid "SUN4V-8001-YS.action"
-msgstr "Schedule a repair procedure to replace the affected component, the identity\nof which can be determined by using fmdump -v -u <EVENT_ID>.\n"
-#
-# code: SUN4V-8002-0C
-# keys: fault.asic.ultraSPARC-T2plus.interconnect.gpd-c
-#
-msgid "SUN4V-8002-0C.type"
-msgstr "Fault"
-msgid "SUN4V-8002-0C.severity"
-msgstr "Major"
-msgid "SUN4V-8002-0C.description"
-msgstr "The ultraSPARC-T2plus Interconnect has detected a fault communicating\nwith the service processor.\n Refer to %s for more information."
-msgid "SUN4V-8002-0C.response"
-msgstr "No automated reponse.\n"
-msgid "SUN4V-8002-0C.impact"
-msgstr "The system's performance may be impacted.\n"
-msgid "SUN4V-8002-0C.action"
-msgstr "Schedule a repair procedure to replace the affected component, the identity\nof which can be determined by using fmdump -v -u <EVENT_ID>.\n"
-#
-# code: SUN4V-8002-1Q
-# keys: fault.asic.fpga fault.asic.ultraSPARC-T2plus.interconnect.gpd-c
-#
-msgid "SUN4V-8002-1Q.type"
-msgstr "Fault"
-msgid "SUN4V-8002-1Q.severity"
-msgstr "Major"
-msgid "SUN4V-8002-1Q.description"
-msgstr "ultraSPARC-T2plus Coherency Interconnect detected a fault on the LPC bus.\n Refer to %s for more information."
-msgid "SUN4V-8002-1Q.response"
-msgstr "No automated reponse.\n"
-msgid "SUN4V-8002-1Q.impact"
-msgstr "The system's performance may be impacted.\n"
-msgid "SUN4V-8002-1Q.action"
-msgstr "Schedule a repair procedure to replace the affected component, the identity\nof which can be determined by using fmdump -v -u <EVENT_ID>.\n"
-#
-# code: SUN4V-8002-24
-# keys: fault.asic.ultraSPARC-T2plus.interconnect.asu
-#
-msgid "SUN4V-8002-24.type"
-msgstr "Fault"
-msgid "SUN4V-8002-24.severity"
-msgstr "Critical"
-msgid "SUN4V-8002-24.description"
-msgstr "An ultraSPARC-T2plus Coherency Interconnect has detected a fatal fault.\n Refer to %s for more information."
-msgid "SUN4V-8002-24.response"
-msgstr "No automated reponse.\n"
-msgid "SUN4V-8002-24.impact"
-msgstr "The system's integrity is seriously compromised.\n"
-msgid "SUN4V-8002-24.action"
-msgstr "Schedule a repair procedure to replace the affected component, the identity\nof which can be determined by using fmdump -v -u <EVENT_ID>.\n"
-#
-# code: SUN4V-8002-3R
-# keys: fault.memory.dimm-page-retires-excessive
-#
-msgid "SUN4V-8002-3R.type"
-msgstr "Fault"
-msgid "SUN4V-8002-3R.severity"
-msgstr "Major"
-msgid "SUN4V-8002-3R.description"
-msgstr "The number of correctable errors associated with this memory module has exceeded acceptable levels.\n Refer to %s for more information."
-msgid "SUN4V-8002-3R.response"
-msgstr "Pages of memory associated with this memory module have been removed from service, up to a limit which has now been reached.\n"
-msgid "SUN4V-8002-3R.impact"
-msgstr "Total system memory capacity has been reduced.\n"
-msgid "SUN4V-8002-3R.action"
-msgstr "Schedule a repair procedure to replace the DIMM. Use fmadm faulty to identify the DIMM to replace.\n"
-#
-# code: SUN4V-8002-42
-# keys: fault.memory.dimm-ue-imminent
-#
-msgid "SUN4V-8002-42.type"
-msgstr "Fault"
-msgid "SUN4V-8002-42.severity"
-msgstr "Critical"
-msgid "SUN4V-8002-42.description"
-msgstr "A pattern of correctable errors has been observed suggesting the potential exists that an uncorrectable error may occur.\n Refer to %s for more information."
-msgid "SUN4V-8002-42.response"
-msgstr "None at this time.\n"
-msgid "SUN4V-8002-42.impact"
-msgstr "None at this time. However, the potential uncorrectable error warrants proactive service action to avoid any unplanned system outages.\n"
-msgid "SUN4V-8002-42.action"
-msgstr "Schedule a repair procedure to replace the DIMM. Use fmadm faulty to identify the DIMM to replace.\n"
-#
-# code: SUN4V-8002-5X
-# keys: fault.memory.dram-ue-imminent
-#
-msgid "SUN4V-8002-5X.type"
-msgstr "Fault"
-msgid "SUN4V-8002-5X.severity"
-msgstr "Critical"
-msgid "SUN4V-8002-5X.description"
-msgstr "A pattern of correctable errors has been observed suggesting the potential exists that an uncorrectable error may occur.\n Refer to %s for more information."
-msgid "SUN4V-8002-5X.response"
-msgstr "None at this time.\n"
-msgid "SUN4V-8002-5X.impact"
-msgstr "None at this time. However, the potential uncorrectable error warrants proactive service action to avoid any unplanned system outages.\n"
-msgid "SUN4V-8002-5X.action"
-msgstr "Schedule a repair procedure to replace the DIMM. Use fmadm faulty to identify the DIMM to replace.\n"
-#
-# code: SUN4V-8002-6E
-# keys: fault.cpu.generic-sparc.strand
-#
-msgid "SUN4V-8002-6E.type"
-msgstr "Fault"
-msgid "SUN4V-8002-6E.severity"
-msgstr "Major"
-msgid "SUN4V-8002-6E.description"
-msgstr "The number of correctable errors associated with this strand has exceeded acceptable levels.\n Refer to %s for more information."
-msgid "SUN4V-8002-6E.response"
-msgstr "The fault manager will attempt to remove the affected strand\nfrom service.\n"
-msgid "SUN4V-8002-6E.impact"
-msgstr "System performance may be affected. \n"
-msgid "SUN4V-8002-6E.action"
-msgstr "Schedule a repair procedure to replace the affected resource, the identity of which can be determined using 'fmadm faulty'.\n"
-#
-# code: SUN4V-8002-7J
-# keys: fault.cpu.generic-sparc.strand-nr
-#
-msgid "SUN4V-8002-7J.type"
-msgstr "Fault"
-msgid "SUN4V-8002-7J.severity"
-msgstr "Major"
-msgid "SUN4V-8002-7J.description"
-msgstr "The number of correctable errors in internal memory associated with this strand have exceeded acceptable levels.\n Refer to %s for more information."
-msgid "SUN4V-8002-7J.response"
-msgstr "The system may attempt to avoid using internal memory associated with this\nstrand.\n"
-msgid "SUN4V-8002-7J.impact"
-msgstr "System performance may be affected. \n"
-msgid "SUN4V-8002-7J.action"
-msgstr "Schedule a repair procedure to replace the affected resource, the identity of which can be determined using 'fmadm faulty'.\n"
-#
-# code: SUN4V-8002-8S
-# keys: fault.cpu.generic-sparc.strand-uc
-#
-msgid "SUN4V-8002-8S.type"
-msgstr "Fault"
-msgid "SUN4V-8002-8S.severity"
-msgstr "Critical"
-msgid "SUN4V-8002-8S.description"
-msgstr "This strand has encountered an uncorrectable error.\n Refer to %s for more information."
-msgid "SUN4V-8002-8S.response"
-msgstr "The fault manager will attempt to remove the affected strand\nfrom service.\n"
-msgid "SUN4V-8002-8S.impact"
-msgstr "System performance may be affected. \n"
-msgid "SUN4V-8002-8S.action"
-msgstr "Schedule a repair procedure to replace the affected resource, the identity of which can be determined using 'fmadm faulty'.\n"
-#
-# code: SUN4V-8002-95
-# keys: fault.cpu.generic-sparc.strand-uc-nr
-#
-msgid "SUN4V-8002-95.type"
-msgstr "Fault"
-msgid "SUN4V-8002-95.severity"
-msgstr "Critical"
-msgid "SUN4V-8002-95.description"
-msgstr "Internal memory associated with this strand has encountered an uncorrectable error.\n Refer to %s for more information."
-msgid "SUN4V-8002-95.response"
-msgstr "The system may attempt to avoid using internal memory associated with\nthis strand.\n"
-msgid "SUN4V-8002-95.impact"
-msgstr "System performance may be affected. \n"
-msgid "SUN4V-8002-95.action"
-msgstr "Schedule a repair procedure to replace the affected resource, the identity of which can be determined using 'fmadm faulty'.\n"
-#
-# code: SUN4V-8002-AP
-# keys: fault.cpu.generic-sparc.core
-#
-msgid "SUN4V-8002-AP.type"
-msgstr "Fault"
-msgid "SUN4V-8002-AP.severity"
-msgstr "Major"
-msgid "SUN4V-8002-AP.description"
-msgstr "The number of correctable errors associated with this core has exceeded acceptable levels.\n Refer to %s for more information."
-msgid "SUN4V-8002-AP.response"
-msgstr "The fault manager will attempt to remove all strands associated with\nthis resource from service.\n"
-msgid "SUN4V-8002-AP.impact"
-msgstr "System performance may be affected. \n"
-msgid "SUN4V-8002-AP.action"
-msgstr "Schedule a repair procedure to replace the affected resource, the identity of which can be determined using 'fmadm faulty'.\n"
-#
-# code: SUN4V-8002-CA
-# keys: fault.cpu.generic-sparc.core-nr
-#
-msgid "SUN4V-8002-CA.type"
-msgstr "Fault"
-msgid "SUN4V-8002-CA.severity"
-msgstr "Major"
-msgid "SUN4V-8002-CA.description"
-msgstr "The number of correctable errors in internal memory associated with this core have exceeded acceptable levels.\n Refer to %s for more information."
-msgid "SUN4V-8002-CA.response"
-msgstr "The system may attempt to avoid using internal memory associated with this\ncore.\n"
-msgid "SUN4V-8002-CA.impact"
-msgstr "System performance may be affected. \n"
-msgid "SUN4V-8002-CA.action"
-msgstr "Schedule a repair procedure to replace the affected resource, the identity of which can be determined using 'fmadm faulty'.\n"
-#
-# code: SUN4V-8002-DH
-# keys: fault.cpu.generic-sparc.core-uc
-#
-msgid "SUN4V-8002-DH.type"
-msgstr "Fault"
-msgid "SUN4V-8002-DH.severity"
-msgstr "Critical"
-msgid "SUN4V-8002-DH.description"
-msgstr "This core has encountered an uncorrectable error.\n Refer to %s for more information."
-msgid "SUN4V-8002-DH.response"
-msgstr "The fault manager will attempt to remove all strands associated with\nthis resource from service.\n"
-msgid "SUN4V-8002-DH.impact"
-msgstr "System performance may be affected. \n"
-msgid "SUN4V-8002-DH.action"
-msgstr "Schedule a repair procedure to replace the affected resource, the identity of which can be determined using 'fmadm faulty'.\n"
-#
-# code: SUN4V-8002-ED
-# keys: fault.cpu.generic-sparc.core-uc-nr
-#
-msgid "SUN4V-8002-ED.type"
-msgstr "Fault"
-msgid "SUN4V-8002-ED.severity"
-msgstr "Critical"
-msgid "SUN4V-8002-ED.description"
-msgstr "An uncorrectable error has occurred in internal memory associated with this core.\n Refer to %s for more information."
-msgid "SUN4V-8002-ED.response"
-msgstr "The system may attempt to avoid using internal memory associated with this\ncore.\n"
-msgid "SUN4V-8002-ED.impact"
-msgstr "System performance may be affected. \n"
-msgid "SUN4V-8002-ED.action"
-msgstr "Schedule a repair procedure to replace the affected resource, the identity of which can be determined using 'fmadm faulty'.\n"
-#
-# code: SUN4V-8002-FY
-# keys: fault.cpu.generic-sparc.chip
-#
-msgid "SUN4V-8002-FY.type"
-msgstr "Fault"
-msgid "SUN4V-8002-FY.severity"
-msgstr "Critical"
-msgid "SUN4V-8002-FY.description"
-msgstr "The number of chip-level correctable errors has exceeded acceptable levels.\n Refer to %s for more information."
-msgid "SUN4V-8002-FY.response"
-msgstr "No automated response.\n"
-msgid "SUN4V-8002-FY.impact"
-msgstr "System performance may be affected. \n"
-msgid "SUN4V-8002-FY.action"
-msgstr "Schedule a repair procedure to replace the affected resource, the identity of which can be determined using 'fmadm faulty'.\n"
-#
-# code: SUN4V-8002-G3
-# keys: fault.cpu.generic-sparc.chip-nr
-#
-msgid "SUN4V-8002-G3.type"
-msgstr "Fault"
-msgid "SUN4V-8002-G3.severity"
-msgstr "Critical"
-msgid "SUN4V-8002-G3.description"
-msgstr "The number of correctable errors in internal memory associated with this chip have exceeded acceptable levels.\n Refer to %s for more information."
-msgid "SUN4V-8002-G3.response"
-msgstr "The system may attempt to avoid using internal memory associated with this\nchip.\n"
-msgid "SUN4V-8002-G3.impact"
-msgstr "System performance may be affected. \n"
-msgid "SUN4V-8002-G3.action"
-msgstr "Schedule a repair procedure to replace the affected resource, the identity of which can be determined using 'fmadm faulty'.\n"
-#
-# code: SUN4V-8002-HR
-# keys: fault.cpu.generic-sparc.chip-uc
-#
-msgid "SUN4V-8002-HR.type"
-msgstr "Fault"
-msgid "SUN4V-8002-HR.severity"
-msgstr "Critical"
-msgid "SUN4V-8002-HR.description"
-msgstr "This chip has encountered a chip-level uncorrectable error.\n Refer to %s for more information."
-msgid "SUN4V-8002-HR.response"
-msgstr "The system will attempt to retire all strands in this chip.\n"
-msgid "SUN4V-8002-HR.impact"
-msgstr "System performance may be affected. \n"
-msgid "SUN4V-8002-HR.action"
-msgstr "Schedule a repair procedure to replace the affected resource, the identity of which can be determined using 'fmadm faulty'.\n"
-#
-# code: SUN4V-8002-J4
-# keys: fault.cpu.generic-sparc.chip-uc-nr
-#
-msgid "SUN4V-8002-J4.type"
-msgstr "Fault"
-msgid "SUN4V-8002-J4.severity"
-msgstr "Critical"
-msgid "SUN4V-8002-J4.description"
-msgstr "Internal memory associated with this chip has encountered an uncorrectable\nerror.\n Refer to %s for more information."
-msgid "SUN4V-8002-J4.response"
-msgstr "The system may attempt to avoid using internal memory associated with this\nchip.\n"
-msgid "SUN4V-8002-J4.impact"
-msgstr "System performance may be affected. \n"
-msgid "SUN4V-8002-J4.action"
-msgstr "Schedule a repair procedure to replace the affected resource, the identity of which can be determined using 'fmadm faulty'.\n"
-#
-# code: SUN4V-8002-KQ
-# keys: fault.cpu.generic-sparc.c2c
-#
-msgid "SUN4V-8002-KQ.type"
-msgstr "Fault"
-msgid "SUN4V-8002-KQ.severity"
-msgstr "Major"
-msgid "SUN4V-8002-KQ.description"
-msgstr "The number of chip-to-chip recoverable errors has exceeded acceptable levels.\n Refer to %s for more information."
-msgid "SUN4V-8002-KQ.response"
-msgstr "No automated response.\n"
-msgid "SUN4V-8002-KQ.impact"
-msgstr "System performance may be affected.\n"
-msgid "SUN4V-8002-KQ.action"
-msgstr "Schedule a repair procedure to replace the affected resource(s), the identity of which can be determined using 'fmadm faulty'.\n"
-#
-# code: SUN4V-8002-LC
-# keys: fault.cpu.generic-sparc.c2c-failover
-#
-msgid "SUN4V-8002-LC.type"
-msgstr "Fault"
-msgid "SUN4V-8002-LC.severity"
-msgstr "Major"
-msgid "SUN4V-8002-LC.description"
-msgstr "A CRC error has occurred in the interconnect between two CPU chips.\nWhile no data has been lost, a lane failover has taken place.\n Refer to %s for more information."
-msgid "SUN4V-8002-LC.response"
-msgstr "The hardware has automatically reconfigured the link to isolate the\nfailing lane, and successful retransmission of the data has occurred.\n"
-msgid "SUN4V-8002-LC.impact"
-msgstr "The system's capacity to correct transmission errors between CPU chips\nhas been reduced.\n"
-msgid "SUN4V-8002-LC.action"
-msgstr "Schedule a repair procedure to replace the affected resource(s), the identity of which can be determined using 'fmadm faulty'.\n"
-#
-# code: SUN4V-8002-MJ
-# keys: fault.cpu.generic-sparc.c2c-uc
-#
-msgid "SUN4V-8002-MJ.type"
-msgstr "Fault"
-msgid "SUN4V-8002-MJ.severity"
-msgstr "Critical"
-msgid "SUN4V-8002-MJ.description"
-msgstr "A chip-to-chip unrecoverable CRC error has occurred.\n Refer to %s for more information."
-msgid "SUN4V-8002-MJ.response"
-msgstr "The system has halted in order to prevent corruption of data.\nNo further automated response.\n"
-msgid "SUN4V-8002-MJ.impact"
-msgstr "The system halts and must be restarted. The integrity of this system has\nbeen compromised.\n"
-msgid "SUN4V-8002-MJ.action"
-msgstr "Schedule a repair procedure to replace the affected resource(s), the identity of which can be determined using 'fmadm faulty'.\n"
-#
-# code: SUN4V-8002-NE
-# keys: fault.memory.memlink
-#
-msgid "SUN4V-8002-NE.type"
-msgstr "Fault"
-msgid "SUN4V-8002-NE.severity"
-msgstr "Major"
-msgid "SUN4V-8002-NE.description"
-msgstr "Recoverable CRC errors have occurred in the interconnect between a\nmemory buffer and its memory controller. No data has been lost;\nhowever, the number of CRC errors associated with this memory buffer-controller\npair has exceeded acceptable levels.\n Refer to %s for more information."
-msgid "SUN4V-8002-NE.response"
-msgstr "The system has recovered from the CRC errors.\n"
-msgid "SUN4V-8002-NE.impact"
-msgstr "System performance may be impacted by a slight reduction in effective\nmemory bandwidth.\n"
-msgid "SUN4V-8002-NE.action"
-msgstr "At a convenient time, schedule a repair procedure to replace the affected resource(s), the identity of which can be determined using 'fmadm faulty'.\n"
-#
-# code: SUN4V-8002-PX
-# keys: fault.memory.memlink-failover
-#
-msgid "SUN4V-8002-PX.type"
-msgstr "Fault"
-msgid "SUN4V-8002-PX.severity"
-msgstr "Major"
-msgid "SUN4V-8002-PX.description"
-msgstr "A CRC error has occurred in the interconnect between a memory buffer and\nits memory controller. While no data has been lost, a lane failover\nhas taken place.\n Refer to %s for more information."
-msgid "SUN4V-8002-PX.response"
-msgstr "The hardware has automatically reconfigured the link to isolate the\nfailing lane, and successful retransmission of the data has occurred.\n"
-msgid "SUN4V-8002-PX.impact"
-msgstr "The system's capacity to correct transmission errors between the memory\nDIMM and its memory controller has been reduced.\n"
-msgid "SUN4V-8002-PX.action"
-msgstr "At your earliest convenience, schedule a repair procedure to replace the\naffected resource(s), the identity of which can be determined using\n'fmadm faulty'.\n"
-#
-# code: SUN4V-8002-Q2
-# keys: fault.memory.memlink-uc
-#
-msgid "SUN4V-8002-Q2.type"
-msgstr "Fault"
-msgid "SUN4V-8002-Q2.severity"
-msgstr "Critical"
-msgid "SUN4V-8002-Q2.description"
-msgstr "A problem was detected in the interconnect between a memory buffer\nand its memory controller.\n Refer to %s for more information."
-msgid "SUN4V-8002-Q2.response"
-msgstr "The system crashed to prevent data corruption. Memory in the affected\npartition may have been deconfigured. (Consult system-specific\ndocumentation to find out how to determine if memory has been\ndeconfigured.)\n"
-msgid "SUN4V-8002-Q2.impact"
-msgstr "If memory has been deconfigured, system performance may be impacted. \n"
-msgid "SUN4V-8002-Q2.action"
-msgstr "Schedule a repair procedure to replace the appropriate part(s), the identity of which can be determined using 'fmadm faulty'.\n"
-#
-# code: SUN4V-8002-RA
-# keys: defect.fw.generic-sparc.addr-oob
-#
-msgid "SUN4V-8002-RA.type"
-msgstr "Fault"
-msgid "SUN4V-8002-RA.severity"
-msgstr "Critical"
-msgid "SUN4V-8002-RA.description"
-msgstr "An address-out-of-bounds error has occurred.\n Refer to %s for more information."
-msgid "SUN4V-8002-RA.response"
-msgstr "No automated response.\n"
-msgid "SUN4V-8002-RA.impact"
-msgstr "The system may have taken a fatal reset.\n"
-msgid "SUN4V-8002-RA.action"
-msgstr "Call your service provider to determine if your system requires a firmware upgrade.\n"
-#
-# code: SUN4V-8002-SP
-# keys: defect.fw.generic-sparc.erpt-gen
-#
-msgid "SUN4V-8002-SP.type"
-msgstr "Fault"
-msgid "SUN4V-8002-SP.severity"
-msgstr "Major"
-msgid "SUN4V-8002-SP.description"
-msgstr "The error report generator has received input data that is inconsistent or\nimproperly formatted.\n Refer to %s for more information."
-msgid "SUN4V-8002-SP.response"
-msgstr "No automated response.\n"
-msgid "SUN4V-8002-SP.impact"
-msgstr "This error does not affect system operation. The error which\ncould not be reported may have more serious impact which cannot be determined.\n"
-msgid "SUN4V-8002-SP.action"
-msgstr "Call your service provider to determine if your system requires a firmware\nupgrade. Please retain the error log file.\n"
-#
-# code: SUN4V-8002-T5
-# keys: fault.cpu.generic-sparc.bootbus
-#
-msgid "SUN4V-8002-T5.type"
-msgstr "Fault"
-msgid "SUN4V-8002-T5.severity"
-msgstr "Critical"
-msgid "SUN4V-8002-T5.description"
-msgstr "A system boot bus error has occurred.\n Refer to %s for more information."
-msgid "SUN4V-8002-T5.response"
-msgstr "No automated response.\n"
-msgid "SUN4V-8002-T5.impact"
-msgstr "The system's integrity is seriously compromised. Processor chip(s)\nmay be unavailable.\n"
-msgid "SUN4V-8002-T5.action"
-msgstr "Schedule a repair procedure to replace the affected resource, the identity of which can be determined using 'fmadm faulty'.\n"
-#
-# code: SUN4V-8002-US
-# keys: fault.sp.failed
-#
-msgid "SUN4V-8002-US.type"
-msgstr "Fault"
-msgid "SUN4V-8002-US.severity"
-msgstr "Critical"
-msgid "SUN4V-8002-US.description"
-msgstr "The Service Processor failed.\n Refer to %s for more information."
-msgid "SUN4V-8002-US.response"
-msgstr "No automated response.\n"
-msgid "SUN4V-8002-US.impact"
-msgstr "Some services such as Fault Diagnosis may be degraded as a result.\n"
-msgid "SUN4V-8002-US.action"
-msgstr "Schedule a repair procedure for the Service Processor, or contact your illumos distribution team for support.\n"
diff --git a/usr/src/cmd/fm/eversholt/eftinfo/sparc/Makefile b/usr/src/cmd/fm/eversholt/eftinfo/sparc/Makefile
deleted file mode 100644
index 617fb6a35b..0000000000
--- a/usr/src/cmd/fm/eversholt/eftinfo/sparc/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2004 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-include ../../../../Makefile.cmd
-include ../Makefile.com
diff --git a/usr/src/cmd/fm/eversholt/esc/sparc/Makefile b/usr/src/cmd/fm/eversholt/esc/sparc/Makefile
deleted file mode 100644
index 617fb6a35b..0000000000
--- a/usr/src/cmd/fm/eversholt/esc/sparc/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2004 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-include ../../../../Makefile.cmd
-include ../Makefile.com
diff --git a/usr/src/cmd/fm/eversholt/files/Makefile b/usr/src/cmd/fm/eversholt/files/Makefile
index 9e178bfddc..91757a6a67 100644
--- a/usr/src/cmd/fm/eversholt/files/Makefile
+++ b/usr/src/cmd/fm/eversholt/files/Makefile
@@ -23,7 +23,6 @@
# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
SUBDIRS=$(MACH)
diff --git a/usr/src/cmd/fm/eversholt/files/sparc/Makefile b/usr/src/cmd/fm/eversholt/files/sparc/Makefile
deleted file mode 100644
index 0482b12b33..0000000000
--- a/usr/src/cmd/fm/eversholt/files/sparc/Makefile
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
-# Copyright 2019 Peter Tribble.
-#
-
-SUBDIRS=sun4u sun4v
-EFT_COMMON_FILES= \
- disk.eft \
- neptune_xaui.eft \
- neptune_xfp.eft \
- pci.eft \
- pciex.eft \
- pciexrc.eft \
- sca500.eft \
- sca1000.eft \
- sensor.eft \
- storage.eft \
- nic.eft
-
-include ../../../Makefile.subdirs
-
-include ../Makefile.com
diff --git a/usr/src/cmd/fm/eversholt/files/sparc/sun4/Makefile.sun4 b/usr/src/cmd/fm/eversholt/files/sparc/sun4/Makefile.sun4
deleted file mode 100644
index b8da67e8d0..0000000000
--- a/usr/src/cmd/fm/eversholt/files/sparc/sun4/Makefile.sun4
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2005 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-ESC=$(SRC)/cmd/fm/eversholt/esc/$(MACH)/esc
-
-SUN4DIR= ../sun4
-
-SUN4EFTFILES= fire.eft
-
-%.eft: $(SUN4DIR)/%.esc
- $(ESC) -o $@ $<
-
diff --git a/usr/src/cmd/fm/eversholt/files/sparc/sun4/fire.esc b/usr/src/cmd/fm/eversholt/files/sparc/sun4/fire.esc
deleted file mode 100644
index ce5e9b1755..0000000000
--- a/usr/src/cmd/fm/eversholt/files/sparc/sun4/fire.esc
+++ /dev/null
@@ -1,672 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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.
- */
-
-#pragma dictionary "SUN4"
-
-/*
- * Eversholt rules for the Fire nexus driver
- */
-
-#define SW_FIT 5000 /* No real fit rate, SW */
-#define HV_FIT 5000 /* No real fit rate, SW */
-#define SW_HV_MISMATCH_FIT 20000 /* No real fit rate, SW */
-#define HB_FIT 400
-#define HBUS_FIT 400
-#define CPU_FIT 500
-#define PCI_DEV_FIT 1000
-#define PCIEX_DEV_FIT 1000
-#define EBUS_FIT 1000
-#define LINK_EVENTS_COUNT 10
-#define LINK_EVENTS_TIME 1h
-#define CE_EVENTS_COUNT 10
-#define CE_EVENTS_TIME 1h
-
-/*
- * Macros for CE Fabric ereports
- *
- * The current kernel sends ereports with a severity of PF_CE and PF_NO_ERROR.
- * However, a simple change in the kernel may end up sending only a severity
- * of PF_CE for CE errors. Since both methods are correct, we match on
- * an ereport severity of either PF_CE only or PF_CE plus PF_NO_ERROR.
- */
-#define PF_NO_ERROR (1 << 0)
-#define PF_CE (1 << 1)
-#define MATCH_CE ((payloadprop("severity") == PF_CE) || \
- (payloadprop("severity") == (PF_CE | PF_NO_ERROR)))
-
-
-#define MATCH_UNRECOGNIZED ((payloadprop("sysino") == 0) && \
- (payloadprop("ehdl") == 0) && \
- (payloadprop("stick") == 0))
-
-/*
- * Test for primary or secondary ereports
- */
-#define IS_PRIMARY (payloadprop("primary"))
-#define IS_SECONDARY (! payloadprop("primary"))
-
-/*
- * payload: imu-rds
- *
- * Extract the request id, the BDF, value in the IMU RDS log register
- * Example:
- * 0x7766554433221100
- * ^^^^
- */
-#define IMU_MATCH_BDF(b, d, f) \
- ( IS_PRIMARY && ((payloadprop("imu-rds") >> 32) & 0xFFFF) == \
- ((b << 8) | (d << 3) | f))
-
-/***************
- * JBC ereports
- ***************/
-event ereport.io.fire.jbc.ape@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.jbc.bjc@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.jbc.ce_asyn@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.jbc.cpe@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.jbc.ebus_to@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.jbc.ebus_to@hostbridge{within(5s)};
-event ereport.io.fire.jbc.icise@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.jbc.ijp@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.jbc.ill_acc@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.jbc.ill_acc_rd@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.jbc.ill_bmr@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.jbc.ill_bmw@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.jbc.jbe@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.jbc.jtceei@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.jbc.jtceer@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.jbc.jtceew@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.jbc.jte@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.jbc.jue@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.jbc.mb_pea@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.jbc.mb_per@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.jbc.mb_pew@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.jbc.pio_cpe@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.jbc.pio_dpe@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.jbc.pio_unmap@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.jbc.pio_unmap_rd@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.jbc.rd_dpe@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.jbc.ue_asyn@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.jbc.unsol_intr@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.jbc.unsol_rd@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.jbc.wr_dpe@hostbridge/pciexrc{within(5s)};
-
-/***************
- * DMC ereports
- ***************/
-event ereport.io.fire.dmc.cor_not_en@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.dmc.eq_not_en@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.dmc.eq_over@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.dmc.fatal_not_en@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.dmc.msi_mal_err@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.dmc.msi_not_en@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.dmc.msi_par_err@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.dmc.nonfatal_not_en@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.dmc.pmeack_not_en@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.dmc.pmpme_not_en@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.dmc.tbw_dme@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.dmc.tbw_dpe@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.dmc.tbw_err@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.dmc.tbw_ude@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.dmc.trn_err@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.dmc.ttc_cae@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.dmc.ttc_dpe@hostbridge/pciexrc{within(5s)};
-
-/***************
- * TLU Other Event ereports
- ***************/
-event ereport.io.fire.pec.crs@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.pec.edp@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.pec.ehp@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.pec.eip@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.pec.erp@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.pec.ihb_pe@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.pec.iip@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.pec.ldn@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.pec.lin@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.pec.lrs@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.pec.lup@hostbridge/pciexrc{within(5s)};
-event ereport.io.fire.pec.mrc@hostbridge/pciexrc{within(5s)};
-
-/***************
- * Fire Fabric ereport
- * -------------
- * Whenever a leaf device sends an error message (fatal, non-fatal, or CE) to
- * root complex, the nexus driver publishes this ereport to log the ereport.
- ***************/
-event ereport.io.fire.fabric@pciexbus/pciexdev/pciexfn {within(1s)};
-event ereport.io.fire.fabric@pcibus/pcidev/pcifn {within(1s)};
-event error.io.fire.fabric-sib@hostbridge/pciexrc;
-event error.io.fire.fabric@pciexbus/pciexdev/pciexfn;
-event error.io.fire.fabric@pcibus/pcidev/pcifn;
-
-/***************
- * sun4v unknown error packets
- * -------------
- * In a sun4v system, if HV sends an epkt to the guest the following wrong
- * things can happen.
- * o HV sends malformed epkt
- * o Guest has coding error and doesn't understand epkt
- * o HV and Guest are out of sync.
- ***************/
-event ereport.io.fire.epkt@hostbridge/pciexrc {within(5s)};
-event ereport.io.fire.epkt@hostbridge {within(5s)};
-
-/******************************
- * Generic Rules Begin Here *
- ******************************/
-
-/***************
- * Fire Asic HW error
- * -------------
- * Errors caused by parity or unexpected behaviors in the asic.
- ***************/
-fru hostbridge/pciexrc;
-asru hostbridge/pciexrc;
-event fault.io.fire.asic@hostbridge/pciexrc,
- FITrate=HB_FIT,
- ASRU=hostbridge/pciexrc,
- FRU=hostbridge/pciexrc;
-
-event error.io.fire.jbc.asic@hostbridge/pciexrc;
-event error.io.fire.dmc.asic@hostbridge/pciexrc;
-event error.io.fire.pec.asic@hostbridge/pciexrc;
-
-prop fault.io.fire.asic@hostbridge/pciexrc (0)->
- error.io.fire.jbc.asic@hostbridge/pciexrc,
- error.io.fire.dmc.asic@hostbridge/pciexrc,
- error.io.fire.pec.asic@hostbridge/pciexrc;
-
-/***************
- * Fire PX SW/HV error
- * -------------
- * Errors caused by bad SW or HV
- ***************/
-event fault.io.fire.sw-epkt@hostbridge/pciexrc, retire=0, response=0,
- FITrate=SW_FIT;
-event fault.io.fire.fw-epkt@hostbridge/pciexrc, retire=0, response=0,
- FITrate=HV_FIT;
-event fault.io.fire.sw-fw-mismatch@hostbridge/pciexrc, retire=0, response=0,
- FITrate=SW_HV_MISMATCH_FIT;
-event fault.io.fire.sw-epkt@hostbridge, retire=0, response=0,
- FITrate=SW_FIT;
-event fault.io.fire.fw-epkt@hostbridge, retire=0, response=0,
- FITrate=HV_FIT;
-event fault.io.fire.sw-fw-mismatch@hostbridge, retire=0, response=0,
- FITrate=SW_HV_MISMATCH_FIT;
-event fault.io.fire.hb.sw-config@hostbridge/pciexrc, retire=0, response=0,
- FITrate=SW_FIT;
-event fault.io.fire.dmc.sw-algorithm@hostbridge/pciexrc, retire=0, response=0,
- FITrate=SW_FIT;
-event fault.io.fire.dmc.sw-state@hostbridge/pciexrc, retire=0, response=0,
- FITrate=SW_FIT;
-event fault.io.fire.pec.sw-algorithm@hostbridge/pciexrc, retire=0, response=0,
- FITrate=SW_FIT;
-
-event error.io.fire.jbc.driver@hostbridge/pciexrc;
-event error.io.fire.dmc.driver@hostbridge/pciexrc;
-event error.io.fire.dmc.bad_state@hostbridge/pciexrc;
-
-prop fault.io.fire.sw-epkt@hostbridge/pciexrc,
- fault.io.fire.fw-epkt@hostbridge/pciexrc,
- fault.io.fire.sw-fw-mismatch@hostbridge/pciexrc->(A)
- ereport.io.fire.epkt@hostbridge/pciexrc { MATCH_UNRECOGNIZED };
-
-prop fault.io.fire.sw-epkt@hostbridge,
- fault.io.fire.fw-epkt@hostbridge,
- fault.io.fire.sw-fw-mismatch@hostbridge->(A)
- ereport.io.fire.epkt@hostbridge { MATCH_UNRECOGNIZED };
-
-prop fault.io.fire.hb.sw-config@hostbridge/pciexrc (0)->
- error.io.fire.jbc.driver@hostbridge/pciexrc;
-
-prop fault.io.fire.dmc.sw-algorithm@hostbridge/pciexrc (0)->
- error.io.fire.dmc.driver@hostbridge/pciexrc;
-
-prop fault.io.fire.dmc.sw-state@hostbridge/pciexrc (0)->
- error.io.fire.dmc.bad_state@hostbridge/pciexrc;
-
-/***************
- * PCI-E/PCI device fault and SW defects
- ***************/
-fru pciexbus/pciexdev;
-asru pciexbus/pciexdev/pciexfn;
-event fault.io.fire.pciex.device@pciexbus/pciexdev/pciexfn,
- FRU=pciexbus/pciexdev,
- ASRU=pciexbus/pciexdev/pciexfn,
- FITrate=PCIEX_DEV_FIT;
-
-fru pcibus/pcidev;
-asru pcibus/pcidev/pcifn;
-event fault.io.fire.pci.device@pcibus/pcidev/pcifn,
- FITrate=PCI_DEV_FIT,
- FRU=pcibus/pcidev,
- ASRU=pcibus/pcidev/pcifn;
-
-/******************************
- * JBC Rules Begin Here *
- ******************************/
-
-/***************
- * EBUS fault
- * -------------
- * Errors involving the ebus
- ***************/
-fru hostbridge/pciexrc;
-asru hostbridge/pciexrc;
-event fault.io.ebus@hostbridge/pciexrc,
- FITrate=EBUS_FIT,
- FRU=hostbridge/pciexrc,
- ASRU=hostbridge/pciexrc;
-
-/*
- * A faulty ebus can cause ebus timeout ebus_to
- * ebus_to ereport:
- * sun4v: The fmri of the ereport is ioboard/hostbridge
- * sun4u: The fmri of the ereport is pciexrc
- */
-prop fault.io.ebus@hostbridge/pciexrc (1)->
- ereport.io.fire.jbc.ebus_to@hostbridge,
- ereport.io.fire.jbc.ebus_to@hostbridge/pciexrc;
-
-/***************
- * Fire Asic HW error
- * -------------
- * Errors caused by parity or unexpected behaviors in the asic.
- ***************/
-prop error.io.fire.jbc.asic@hostbridge/pciexrc (1)->
- ereport.io.fire.jbc.cpe@hostbridge/pciexrc,
- ereport.io.fire.jbc.mb_pea@hostbridge/pciexrc,
- ereport.io.fire.jbc.mb_per@hostbridge/pciexrc,
- ereport.io.fire.jbc.mb_pew@hostbridge/pciexrc,
- ereport.io.fire.jbc.pio_cpe@hostbridge/pciexrc,
- ereport.io.fire.jbc.pio_dpe@hostbridge/pciexrc;
-
-/***************
- * JBC Hostbus Link Errors
- * -------------
- * Possible Parity Errors caused by bad links traces or cables.
- * For instance on Ontarios there is a flex cable. For Chicagos
- * it could be the link trace between the CPU and Fire.
- ***************/
-event error.io.fire.jbc.bad_link@hostbridge/pciexrc;
-
-prop error.io.fire.jbc.bad_link@hostbridge/pciexrc (1)->
- ereport.io.fire.jbc.ape@hostbridge/pciexrc,
- ereport.io.fire.jbc.bjc@hostbridge/pciexrc,
- ereport.io.fire.jbc.rd_dpe@hostbridge/pciexrc,
- ereport.io.fire.jbc.wr_dpe@hostbridge/pciexrc;
-
-/***************
- * JBC Hostbus Errors
- * -------------
- * Errors being returned from the hostbus side and detected by fire asic.
- ***************/
-fru hostbridge/pciexrc;
-asru hostbridge/pciexrc;
-event fault.io.fire.hbus@hostbridge/pciexrc,
- FITrate=HBUS_FIT,
- FRU=hostbridge/pciexrc,
- ASRU=hostbridge/pciexrc;
-
-prop fault.io.fire.hbus@hostbridge/pciexrc (0)->
- error.io.fire.jbc.bad_link@hostbridge/pciexrc,
- ereport.io.fire.jbc.icise@hostbridge/pciexrc,
- ereport.io.fire.jbc.ill_bmr@hostbridge/pciexrc,
- ereport.io.fire.jbc.jtceei@hostbridge/pciexrc,
- ereport.io.fire.jbc.jtceer@hostbridge/pciexrc,
- ereport.io.fire.jbc.jtceew@hostbridge/pciexrc;
-
-/***************
- * JBC Datapath Errors
- * -------------
- * Errors resulting from the datapath of the hostbus and detected by fire asic.
- ***************/
-fru cmp;
-asru cmp;
-event fault.io.fire.datapath@cmp,
- FITrate=CPU_FIT,
- FRU=cmp,
- ASRU=cmp;
-
-prop fault.io.fire.datapath@cmp (0)->
- error.io.fire.jbc.bad_link@hostbridge/pciexrc;
-
-/* Duplicate the above fault prop for cpumodule */
-fru cpumodule/cpu;
-asru cpumodule/cpu;
-event fault.io.fire.datapath@cpumodule/cpu,
- FITrate=CPU_FIT,
- FRU=cpumodule/cpu,
- ASRU=cpumodule/cpu;
-
-prop fault.io.fire.datapath@cpumodule/cpu (0)->
- error.io.fire.jbc.bad_link@hostbridge/pciexrc,
- ereport.io.fire.jbc.wr_dpe@hostbridge/pciexrc;
-
-/***************
- * Fire driver is at fault.
- * -------------
- * The px driver should not have been in this state. Defect the px driver.
- ***************/
-prop error.io.fire.jbc.driver@hostbridge/pciexrc (1)->
- ereport.io.fire.jbc.ijp@hostbridge/pciexrc,
- ereport.io.fire.jbc.ill_acc@hostbridge/pciexrc,
- ereport.io.fire.jbc.ill_acc_rd@hostbridge/pciexrc,
- ereport.io.fire.jbc.ill_bmw@hostbridge/pciexrc,
- ereport.io.fire.jbc.jue@hostbridge/pciexrc,
- ereport.io.fire.jbc.pio_unmap@hostbridge/pciexrc,
- ereport.io.fire.jbc.pio_unmap_rd@hostbridge/pciexrc;
-
-
-/******************************
- * DMC Rules Begin Here *
- ******************************/
-
-/***************
- * Fire PX SW error
- * -------------
- * Errors caused by bad SW
- ***************/
-prop error.io.fire.dmc.driver@hostbridge/pciexrc (1)->
- ereport.io.fire.dmc.ttc_cae@hostbridge/pciexrc;
-
-/***************
- * Unexpected Fire State
- * -------------
- * The px driver should not have been in this state. Defect the px driver.
- ***************/
-event error.io.fire.dmc.bad_state-mmu@hostbridge/pciexrc;
-
-prop error.io.fire.dmc.bad_state@hostbridge/pciexrc (1)->
- ereport.io.fire.dmc.cor_not_en@hostbridge/pciexrc,
- ereport.io.fire.dmc.eq_not_en@hostbridge/pciexrc,
- ereport.io.fire.dmc.fatal_not_en@hostbridge/pciexrc,
- ereport.io.fire.dmc.msi_not_en@hostbridge/pciexrc,
- ereport.io.fire.dmc.nonfatal_not_en@hostbridge/pciexrc,
- ereport.io.fire.dmc.pmeack_not_en@hostbridge/pciexrc,
- ereport.io.fire.dmc.pmpme_not_en@hostbridge/pciexrc;
-
-prop error.io.fire.dmc.bad_state-mmu@hostbridge/pciexrc (1)->
- ereport.io.fire.dmc.tbw_dme@hostbridge/pciexrc,
- ereport.io.fire.dmc.trn_err@hostbridge/pciexrc;
-
-/***************
- * Fire Asic HW error
- * -------------
- * Errors caused by parity or unexpected behaviors in the asic.
- ***************/
-event error.io.fire.dmc.bad_parity@hostbridge/pciexrc;
-
-prop error.io.fire.dmc.asic@hostbridge/pciexrc (1)->
- error.io.fire.dmc.bad_parity@hostbridge/pciexrc,
- ereport.io.fire.dmc.eq_over@hostbridge/pciexrc;
-
-/***************
- * Parity errors caused by dmc
- * -------------
- * Fire asic error.
- ***************/
-event error.io.fire.dmc.bad_parity-mmu@hostbridge/pciexrc;
-
-prop error.io.fire.dmc.bad_parity@hostbridge/pciexrc (1)->
- ereport.io.fire.dmc.msi_par_err@hostbridge/pciexrc;
-
-prop error.io.fire.dmc.bad_parity-mmu@hostbridge/pciexrc (1)->
- ereport.io.fire.dmc.tbw_dpe@hostbridge/pciexrc,
- ereport.io.fire.dmc.tbw_ude@hostbridge/pciexrc,
- ereport.io.fire.dmc.ttc_dpe@hostbridge/pciexrc;
-
-/***************
- * Malformed MSI
- * -------------
- * A non-compliant PCIe/PCI device sent a malformed MSI.
- ***************/
-prop fault.io.fire.pciex.device@pciexbus[b]/pciexdev[d]/pciexfn[f] (0) ->
- ereport.io.fire.dmc.msi_mal_err@hostbridge/pciexrc
- {
- IMU_MATCH_BDF(b, d, f) &&
- is_under(hostbridge/pciexrc, pciexbus[b]/pciexdev[d]/pciexfn[f])
- };
-prop fault.io.fire.pci.device@pcibus[b]/pcidev[d]/pcifn[f] (0) ->
- ereport.io.fire.dmc.msi_mal_err@hostbridge/pciexrc
- {
- IMU_MATCH_BDF(b, d, f) &&
- is_under(hostbridge/pciexrc, pcibus[b]/pcidev[d]/pcifn[f])
- };
-
-/***************
- * Event queue overflow
- * -------------
- * Since we don't know which devices are sending too many EQ's, we must
- * indict Fire asic and all PCIe/PCI devices
- ***************/
-#define PROP_PLAT_FRU "FRU"
-#define GET_HB_FRU (confprop(asru(hostbridge/pciexrc), PROP_PLAT_FRU))
-#define GET_PCIE_FRU (confprop(asru(pciexbus[b]/pciexdev[d]/pciexfn[0]), PROP_PLAT_FRU))
-#define GET_PCI_FRU (confprop(asru(pcibus[b]/pcidev[d]/pcifn[0]), PROP_PLAT_FRU))
-
-prop fault.io.fire.pciex.device@pciexbus[b]/pciexdev[d]/pciexfn[0] (0) ->
- ereport.io.fire.dmc.eq_over@hostbridge/pciexrc
- {
- /*
- * Indict PCI-E FRU(s) under this root complex excluding the
- * one that the Fire ASIC resides on.
- */
- is_under(hostbridge/pciexrc, pciexbus[b]/pciexdev[d]/pciexfn[0]) &&
- (GET_HB_FRU != GET_PCIE_FRU)
- };
-
-prop fault.io.fire.pci.device@pcibus[b]/pcidev[d]/pcifn[0] (0) ->
- ereport.io.fire.dmc.eq_over@hostbridge/pciexrc
- {
- /*
- * Indict PCI FRU(s) under this root complex excluding the
- * one that the Fire ASIC resides on.
- */
- is_under(hostbridge/pciexrc, pcibus[b]/pcidev[d]/pcifn[0]) &&
- (GET_HB_FRU != GET_PCI_FRU)
- };
-
-/***************
- * Secondary errors
- * -------------
- * These are errors that require logs to be diagnosable. Secondary errors
- * do not have logs so, just propagate them to no-diag.
- ***************/
-event error.io.fire.dmc.secondary@hostbridge/pciexrc;
-
-prop error.io.fire.dmc.secondary@hostbridge/pciexrc (0) ->
- ereport.io.fire.dmc.msi_mal_err@hostbridge/pciexrc{ IS_SECONDARY };
-
-/******************************
- * PEC Rules Begin Here *
- ******************************/
-
-event error.io.fire.pec.buffer-parity@hostbridge/pciexrc;
-event error.io.fire.pec.adjacentnode@hostbridge/pciexrc ;
-
-/***************
- * Fire PX SW error
- * -------------
- * Errors caused by bad SW
- ***************/
-
-prop fault.io.fire.pec.sw-algorithm@hostbridge/pciexrc (0) ->
- ereport.io.fire.pec.crs@hostbridge/pciexrc,
- ereport.io.fire.pec.mrc@hostbridge/pciexrc;
-
-/***************
- * Fire Asic HW error
- * -------------
- * Errors caused by parity or unexpected behaviors in the asic.
- ***************/
-prop error.io.fire.pec.asic@hostbridge/pciexrc (1)->
- error.io.fire.pec.buffer-parity@hostbridge/pciexrc,
- error.io.fire.pec.adjacentnode@hostbridge/pciexrc;
-
-prop error.io.fire.pec.buffer-parity@hostbridge/pciexrc (1) ->
- ereport.io.fire.pec.edp@hostbridge/pciexrc,
- ereport.io.fire.pec.ehp@hostbridge/pciexrc,
- ereport.io.fire.pec.eip@hostbridge/pciexrc,
- ereport.io.fire.pec.erp@hostbridge/pciexrc,
- ereport.io.fire.pec.ihb_pe@hostbridge/pciexrc,
- ereport.io.fire.pec.iip@hostbridge/pciexrc;
-
-/***************
- * Failed Links
- * -------------
- * They will cause the fabric to be scanned and a fire.fabric ereport
- * for the suspected devices will be sent. Do no diagnose these
- * ereports and let the fire.fabric ereport be diagnosed.
- ***************/
-event ereport.io.fire.link-events-trip@hostbridge/pciexrc ;
-
-engine serd.io.fire.link-events@hostbridge/pciexrc,
- N=LINK_EVENTS_COUNT, T=LINK_EVENTS_TIME, method=persistent,
- trip=ereport.io.fire.link-events-trip@hostbridge/pciexrc ;
-
-event upset.io.fire.link-events@hostbridge/pciexrc,
- engine=serd.io.fire.link-events@hostbridge/pciexrc ;
-
-event error.io.fire.link-events@hostbridge/pciexrc;
-
-prop upset.io.fire.link-events@hostbridge/pciexrc (0)->
- error.io.fire.link-events@hostbridge/pciexrc;
-
-prop error.io.fire.link-events@hostbridge/pciexrc (1)->
- ereport.io.fire.pec.lrs@hostbridge/pciexrc,
- ereport.io.fire.pec.ldn@hostbridge/pciexrc;
-
-
-/*
- * Fault at the adjacent node which is right below the Fire ASIC
- */
-fru hostbridge/pciexrc/pciexbus/pciexdev;
-asru hostbridge/pciexrc/pciexbus/pciexdev/pciexfn;
-event fault.io.fire.pciex.device@hostbridge/pciexrc/pciexbus/pciexdev/pciexfn,
- FITrate=HB_FIT, FRU=hostbridge/pciexrc/pciexbus/pciexdev,
- ASRU=hostbridge/pciexrc/pciexbus/pciexdev/pciexfn;
-
-prop fault.io.fire.asic@hostbridge/pciexrc (0) ->
- error.io.fire.pec.adjacentnode@hostbridge/pciexrc;
-
-prop fault.io.fire.pciex.device@hostbridge/pciexrc/pciexbus/pciexdev/pciexfn
-(0) ->
- error.io.fire.pec.adjacentnode@hostbridge/pciexrc
- {
- is_under(hostbridge/pciexrc,
- hostbridge/pciexrc/pciexbus/pciexdev/pciexfn)
- };
-
-prop error.io.fire.pec.adjacentnode@hostbridge/pciexrc (0) ->
- ereport.io.fire.link-events-trip@hostbridge/pciexrc;
-
-
-/******************************
- * Fabric Rules Begin Here *
- ******************************/
-
-/***************
- * fire.fabric rules
- * -------------
- * Below rules are so we get a single suspect list in 1 fault with percentage
- * of indiction being equal among all the suspect FRUs
- ***************/
-prop fault.io.fire.pciex.device@pciexbus/pciexdev/pciexfn (0) ->
- error.io.fire.fabric@pciexbus/pciexdev/pciexfn;
-
-prop fault.io.fire.pci.device@pcibus/pcidev/pcifn (0) ->
- error.io.fire.fabric@pcibus/pcidev/pcifn;
-
-prop error.io.fire.fabric@pciexbus/pciexdev/pciexfn (1) ->
- ereport.io.fire.fabric@pciexbus/pciexdev/pciexfn { !MATCH_CE };
-
-prop error.io.fire.fabric@pcibus/pcidev/pcifn (1) ->
- ereport.io.fire.fabric@pcibus/pcidev/pcifn;
-
-prop error.io.fire.fabric-sib@hostbridge/pciexrc (0) ->
- ereport.io.fire.fabric@pciexbus/pciexdev/pciexfn {
- is_under(hostbridge/pciexrc, pciexbus/pciexdev/pciexfn) && !MATCH_CE
- };
-
-prop error.io.fire.fabric-sib@hostbridge/pciexrc (0) ->
- ereport.io.fire.fabric@pcibus/pcidev/pcifn {
- is_under(hostbridge/pciexrc, pcibus/pcidev/pcifn)
- };
-
-prop error.io.fire.fabric@pciexbus/pciexdev/pciexfn (1) ->
- error.io.fire.fabric-sib@hostbridge/pciexrc {
- is_under(hostbridge/pciexrc, pciexbus/pciexdev/pciexfn)
- };
-
-prop error.io.fire.fabric@pcibus/pcidev/pcifn (1) ->
- error.io.fire.fabric-sib@hostbridge/pciexrc {
- is_under(hostbridge/pciexrc, pcibus/pcidev/pcifn)
- };
-
-event upset.io.fire.fabric@pciexbus/pciexdev/pciexfn{within(1s)};
-event ereport.io.fire.pciex.ce@pciexbus/pciexdev/pciexfn{within(1s)};
-
-/* SERD CEs */
-prop upset.io.fire.fabric@pciexbus[b]/pciexdev[d]/pciexfn[f] (0) ->
- ereport.io.fire.fabric@pciexbus[b]/pciexdev[d]/pciexfn[f]
- { MATCH_CE };
-
-event upset.io.fire.fabric@pciexbus/pciexdev/pciexfn,
- engine=serd.io.fire.fabric@pciexbus/pciexdev/pciexfn;
-
-engine serd.io.fire.fabric@pciexbus/pciexdev/pciexfn,
- N=CE_EVENTS_COUNT, T=CE_EVENTS_TIME, method=persistent,
- trip=ereport.io.fire.pciex.ce@pciexbus/pciexdev/pciexfn;
-
-prop fault.io.fire.pciex.device@pciexbus/pciexdev/pciexfn (0) ->
- ereport.io.fire.pciex.ce@pciexbus/pciexdev/pciexfn;
-
-/***************
- * Upsets
- * -------------
- * Used to hide ereports that are not currently diagnose or should not be
- * diagnosed
- ***************/
-event upset.io.fire.nodiag@hostbridge/pciexrc;
-event error.io.fire.dmc.nodiag@hostbridge/pciexrc;
-
-prop error.io.fire.dmc.nodiag@hostbridge/pciexrc (1)->
- ereport.io.fire.dmc.tbw_err@hostbridge/pciexrc;
-
-prop upset.io.fire.nodiag@hostbridge/pciexrc (0)->
- ereport.io.fire.jbc.ce_asyn@hostbridge/pciexrc, /* CPU */
- ereport.io.fire.jbc.jbe@hostbridge/pciexrc, /* CPU */
- ereport.io.fire.jbc.jte@hostbridge/pciexrc, /* CPU */
- ereport.io.fire.jbc.ue_asyn@hostbridge/pciexrc, /* CPU */
- ereport.io.fire.jbc.unsol_intr@hostbridge/pciexrc, /* CPU */
- ereport.io.fire.jbc.unsol_rd@hostbridge/pciexrc, /* CPU */
- ereport.io.fire.pec.lin@hostbridge/pciexrc,
- ereport.io.fire.pec.lup@hostbridge/pciexrc,
- error.io.fire.dmc.nodiag@hostbridge/pciexrc,
- error.io.fire.dmc.secondary@hostbridge/pciexrc,
- ereport.io.fire.epkt@hostbridge { !MATCH_UNRECOGNIZED },
- ereport.io.fire.epkt@hostbridge/pciexrc { !MATCH_UNRECOGNIZED };
diff --git a/usr/src/cmd/fm/eversholt/files/sparc/sun4u/Makefile b/usr/src/cmd/fm/eversholt/files/sparc/sun4u/Makefile
deleted file mode 100644
index 630ed0348e..0000000000
--- a/usr/src/cmd/fm/eversholt/files/sparc/sun4u/Makefile
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2006 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-include ../sun4/Makefile.sun4
-
-EFT_PLAT= sun4u
-SUN4UEFTFILES= schizo.eft psycho.eft tomatillo.eft xmits.eft oberon.eft
-EFT_PLAT_FILES= $(SUN4UEFTFILES) $(SUN4EFTFILES)
-
-include ../../Makefile.com
diff --git a/usr/src/cmd/fm/eversholt/files/sparc/sun4u/oberon.esc b/usr/src/cmd/fm/eversholt/files/sparc/sun4u/oberon.esc
deleted file mode 100644
index 0a18f85a71..0000000000
--- a/usr/src/cmd/fm/eversholt/files/sparc/sun4u/oberon.esc
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-/*
- * Eversholt rules for Oberon ASICs
- */
-
-#pragma dictionary "SUN4U"
-
-#define HB_FIT 1000
-
-/*
- * Test for primary or secondary ereports
- */
-#define IS_PRIMARY (payloadprop("primary"))
-#define IS_SECONDARY (! payloadprop("primary"))
-
-event error.io.oberon.pec.secondary@hostbridge/pciexrc;
-event error.io.oberon.pec.fabric_error@hostbridge/pciexrc;
-
-/*
- * Ereports derived from the
- * UBC Status Clear Register
- *
- * dmarduea-channel DMA read uncorrectable error (UE) in leaf A
- * dmawtuea DMA write UE in leaf A
- * memrdaxa Memory read invalid address error in leaf A
- * memwtaxa Memory write invalid address error in leaf A
- * dmardueb-channel DMA read uncorrectable error (UE) in leaf B
- * dmawtueb DMA write UE in leaf B
- * memrdaxb Memory read invalid address error in leaf B
- * memwtaxb Memory write invalid address error in leaf B
- * piowtue-channel PIO write UE
- * piowbeue-channel PIO write byte enable UE
- * piorbeue-channel PIO read byte enable UE
- */
-event ereport.io.oberon.ubc.dmarduea-channel@hostbridge/pciexrc{within(5s)};
-event ereport.io.oberon.ubc.dmawtuea@hostbridge/pciexrc{within(5s)};
-event ereport.io.oberon.ubc.memrdaxa@hostbridge/pciexrc{within(5s)};
-event ereport.io.oberon.ubc.memwtaxa@hostbridge/pciexrc{within(5s)};
-event ereport.io.oberon.ubc.dmardueb-channel@hostbridge/pciexrc{within(5s)};
-event ereport.io.oberon.ubc.dmawtueb@hostbridge/pciexrc{within(5s)};
-event ereport.io.oberon.ubc.memrdaxb@hostbridge/pciexrc{within(5s)};
-event ereport.io.oberon.ubc.memwtaxb@hostbridge/pciexrc{within(5s)};
-event ereport.io.oberon.ubc.piowtue-channel@hostbridge/pciexrc{within(5s)};
-event ereport.io.oberon.ubc.piowbeue-channel@hostbridge/pciexrc{within(5s)};
-event ereport.io.oberon.ubc.piorbeue-channel@hostbridge/pciexrc{within(5s)};
-
-/*
- * tlueitmo TLU Egress Issue Timeout
- */
-event ereport.io.oberon.pec.tlueitmo@hostbridge/pciexrc{within(5s)};
-
-/*
- * TLU Uncorrectable and Correctable ereports
- *
- * ecrc End-to-end CRC error
- */
-event ereport.io.oberon.pec.ecrc@hostbridge/pciexrc{within(5s)};
-
-/*
- * A faulty Oberon may cause;
- *
- * - DMA write internal RAM UE: dmawtuea, dmawtueb
- * - TLU ECRC
- *
- * Errors marked with * may cause PCI-E abort
- */
-
-fru hostbridge;
-asru hostbridge;
-event fault.io.oberon@hostbridge,
- FITrate=HB_FIT, FRU=hostbridge, ASRU=hostbridge;
-prop fault.io.oberon@hostbridge (0)->
- ereport.io.oberon.ubc.dmawtuea@hostbridge/pciexrc,
- ereport.io.oberon.ubc.dmawtueb@hostbridge/pciexrc;
-event fault.io.oberon@hostbridge/pciexrc,
- FITrate=HB_FIT, FRU=hostbridge, ASRU=hostbridge;
-prop fault.io.oberon@hostbridge/pciexrc (0)->
- ereport.io.oberon.pec.ecrc@hostbridge/pciexrc { IS_PRIMARY };
-
-/*
- * A faulty PX nexus driver can cause
- * - Jbus unmapped error
- * - mmu invalid, out of range, protection etc. all except data parity
- * - invalid pio r/w
- * - unsolicited read or interrupt return
- * - msg received to unenabled queue
- */
-
-#define SW_FIT 5000 /* No real fit rate, SW */
-event fault.io.fire.hb.sw-config@hostbridge/pciexrc, retire=0, response=0,
- FITrate=SW_FIT;
-
-prop fault.io.fire.hb.sw-config@hostbridge/pciexrc (0)->
- ereport.io.oberon.ubc.memrdaxa@hostbridge/pciexrc,
- ereport.io.oberon.ubc.memrdaxb@hostbridge/pciexrc,
- ereport.io.oberon.ubc.memwtaxa@hostbridge/pciexrc,
- ereport.io.oberon.ubc.memwtaxb@hostbridge/pciexrc;
-
-/*
- * Secondary errors of the ereport that the device is at fault.
- * Undiagnosed the secondary errors since the payload is invalid.
- */
-prop error.io.oberon.pec.secondary@hostbridge/pciexrc (0) ->
- ereport.io.oberon.pec.ecrc@hostbridge/pciexrc{ IS_SECONDARY };
-
-/*
- * For logging purpose only.
- * The px nexus driver generates equivalent pciex ereports for the
- * common pciex rules to diagnose.
- */
-prop error.io.oberon.pec.fabric_error@hostbridge/pciexrc(0) ->
- ereport.io.oberon.pec.ecrc@hostbridge/pciexrc;
-
-event ereport.io.oberon.nodiag@hostbridge;
-
-/*
- * Upset used to hide ereports that are not currently diagnosed.
- */
-engine serd.io.oberon.nodiag@hostbridge,
- N=1000, T=1s, method=persistent,
- trip=ereport.io.oberon.nodiag@hostbridge;
-
-event upset.io.oberon.nodiag@hostbridge,
- engine=serd.io.oberon.nodiag@hostbridge;
-
-prop upset.io.oberon.nodiag@hostbridge (0)->
- ereport.io.oberon.ubc.dmarduea-channel@hostbridge/pciexrc,
- ereport.io.oberon.ubc.dmardueb-channel@hostbridge/pciexrc,
- ereport.io.oberon.ubc.piowtue-channel@hostbridge/pciexrc,
- ereport.io.oberon.ubc.piowbeue-channel@hostbridge/pciexrc,
- ereport.io.oberon.ubc.piorbeue-channel@hostbridge/pciexrc,
- ereport.io.oberon.pec.tlueitmo@hostbridge/pciexrc,
- error.io.oberon.pec.fabric_error@hostbridge/pciexrc,
- ereport.io.oberon.nodiag@hostbridge;
diff --git a/usr/src/cmd/fm/eversholt/files/sparc/sun4u/psycho.esc b/usr/src/cmd/fm/eversholt/files/sparc/sun4u/psycho.esc
deleted file mode 100644
index da5ece375b..0000000000
--- a/usr/src/cmd/fm/eversholt/files/sparc/sun4u/psycho.esc
+++ /dev/null
@@ -1,252 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#pragma dictionary "SUN4U"
-
-#define AGENT_ID_MASK 0x1f
-#define AGENT_ID_SHIFT 24
-
-#define HB_FIT 1000
-#define HBUS_FIT 1000
-#define PCI_BUS_FIT 500
-#define PCI_DEV_FIT 1000
-#define CPU_FIT 500
-
-#define PCI_HB_DEV_PATH hostbridge/pcibus/pcidev[32]/pcifn[0]
-
-fru hostbridge;
-asru hostbridge;
-
-event fault.io.psycho@hostbridge,
- FITrate=HB_FIT, FRU=hostbridge, ASRU=hostbridge;
-
-event error.io.psy.ecc.thresh@hostbridge;
-event ereport.io.psy.ecc.pue@hostbridge{within(5s)};
-event ereport.io.psy.ecc.s-pue@hostbridge{within(5s)};
-event ereport.io.psy.ecc.thresh@hostbridge;
-
-/*
- * A faulty Psycho hostbridge may cause:
- *
- * - pue: the psycho to detect a PIO uncorrectable error, bad reader.
- * - s-pue: the psycho to detect a secondary PIO UE, bad reader.
- * - ecc: the SERD engine to gather enough PIO CEs to generate an ereport.
- */
-prop fault.io.psycho@hostbridge (0)->
- ereport.io.psy.ecc.pue@hostbridge,
- ereport.io.psy.ecc.s-pue@hostbridge,
- error.io.psy.ecc.thresh@hostbridge;
-
-engine serd.io.psycho.ecc@hostbridge,
- N=3, T=1day, method=persistent,
- trip=ereport.io.psy.ecc.thresh@hostbridge;
-
-event upset.io.psycho@hostbridge,
- engine=serd.io.psycho.ecc@hostbridge;
-
-event ereport.io.psy.ecc.pce@hostbridge{within(5s)};
-event ereport.io.psy.ecc.s-pce@hostbridge{within(5s)};
-
-prop error.io.psy.ecc.thresh@hostbridge (2)->
- ereport.io.psy.ecc.thresh@hostbridge,
- ereport.io.psy.ecc.pce@hostbridge;
-
-/*
- * An upset Psycho may cause:
- *
- * - pce: the psycho to detect a PIO correctable error, bad reader.
- */
-prop upset.io.psycho@hostbridge (0)->
- ereport.io.psy.ecc.pce@hostbridge;
-
-event fault.io.hbus@hostbridge,
- FITrate=HBUS_FIT, FRU=hostbridge, ASRU=hostbridge;
-
-/*
- * A faulty host bus may cause:
- *
- * - pue: a PIO uncorrectable error.
- * - s-pue: a secondary PIO UE.
- * - ecc: the SERD engine to gather enough PIO CEs to generate an ereport.
- */
-prop fault.io.hbus@hostbridge (0)->
- ereport.io.psy.ecc.pue@hostbridge,
- ereport.io.psy.ecc.s-pue@hostbridge,
- error.io.psy.ecc.thresh@hostbridge;
-
-fru cpu;
-
-event fault.io.datapath@cpu, retire=0,
- FITrate=CPU_FIT, FRU=cpu;
-
-event error.io.cpu.ecc.thresh@cpu;
-
-/*
- * A faulty CPU may cause:
- *
- * - pue: a PIO uncorrectable error, where the captured Agentid matches
- * the cpuid.
- * - ecc: the SERD engine for the CPU to fire due to PIO CEs from this
- * CPU
- */
-prop fault.io.datapath@cpu[cpuid] (0)->
- ereport.io.psy.ecc.pue@hostbridge
- {((payloadprop("ecc-afsr") >> AGENT_ID_SHIFT) & AGENT_ID_MASK) == cpuid};
-
-prop fault.io.datapath@cpu (0)->
- error.io.cpu.ecc.thresh@cpu;
-
-prop error.io.cpu.ecc.thresh@cpu (1)->
- ereport.io.psy.ecc.thresh@hostbridge<>;
-
-prop error.io.cpu.ecc.thresh@cpu[cpuid] (1)->
- ereport.io.psy.ecc.pce@hostbridge<>
- {((payloadprop("ecc-afsr") >> AGENT_ID_SHIFT) & AGENT_ID_MASK) == cpuid};
-
-asru pcibus/pcidev/pcifn;
-fru pcibus/pcidev;
-
-event fault.io.pci.device-interr@hostbridge/pcibus/pcidev/pcifn,
- FITrate=PCI_DEV_FIT, FRU=pcibus/pcidev, ASRU=pcibus/pcidev/pcifn;
-
-event fault.io.pci.device-interr@pcibus/pcidev/pcifn,
- FITrate=PCI_DEV_FIT, FRU=pcibus/pcidev, ASRU=pcibus/pcidev/pcifn;
-
-event error.io.psy.pbm.rl@hostbridge/pcibus/pcidev/pcifn;
-event error.io.psy.pbm.rl@pcibus/pcidev/pcifn;
-event error.io.psy.pbm.rl@pcibus/pcidev/pcifn/pcibus/pcidev/pcifn;
-event error.io.psy.pbm.target-rl@pcibus/pcidev/pcifn;
-event error.io.psy.pbm.target-rl@pcibus/pcidev/pcifn/pcibus/pcidev/pcifn;
-event error.io.pci.ma-u@hostbridge/pcibus/pcidev/pcifn;
-event error.io.pci.perr-pw-u@hostbridge/pcibus/pcidev/pcifn;
-event error.io.pci.perr-dw-u@hostbridge/pcibus/pcidev/pcifn;
-event error.io.pci.dpdata-dr-u@hostbridge/pcibus/pcidev/pcifn;
-event error.io.pci.ta-u@hostbridge/pcibus/pcidev/pcifn;
-event error.io.pci.serr-u@hostbridge/pcibus/pcidev/pcifn;
-event error.io.pci.retry-to-d@hostbridge/pcibus/pcidev/pcifn;
-event error.psy.cpu.berr@cpu;
-
-event ereport.io.psy.sbh@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.psy.pbm.rl@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.psy.pbm.s-rl@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.psy.pbm.s-ma@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.psy.pbm.s-rta@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.psy.pbm.s-mdpe@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.psy.pbm.target-rl@pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.pci.rserr@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-event ereport.cpu.ultraSPARC-II.berr@cpu{within(5s)};
-
-/*
- * A faulty PCI device may cause:
- *
- * - rl: it to retry a transaction beyond the specified limit.
- * - sbh: it to generate a streaming byte hole.
- *
- * For rl, there may be a target-rl ereport on a child device. There may also be
- * an associated dto - the retry-to-d error propagates into the pci.esc rules
- * to handle this.
- */
-
-prop fault.io.pci.device-interr@pcibus/pcidev[fromdev]/pcifn (0)->
- error.io.psy.pbm.rl@pcibus/pcidev<todev>/pcifn {
- fromdev == todev && fromdev != 32 },
- error.io.psy.pbm.target-rl@pcibus/pcidev<todev>/pcifn {
- fromdev == todev && fromdev != 32 };
-
-prop error.io.psy.pbm.rl@pcibus/pcidev/pcifn/pcibus/pcidev/pcifn (1)->
- error.io.psy.pbm.rl@pcibus/pcidev/pcifn;
-
-prop error.io.psy.pbm.rl@hostbridge/pcibus/pcidev/pcifn (1)->
- ereport.io.psy.pbm.rl@PCI_HB_DEV_PATH,
- ereport.io.psy.pbm.s-rl@PCI_HB_DEV_PATH;
-
-prop error.io.psy.pbm.target-rl@pcibus/pcidev/pcifn (1)->
- error.io.psy.pbm.target-rl@pcibus/pcidev/pcifn/pcibus<>/pcidev<>/pcifn<>;
-
-prop error.io.psy.pbm.target-rl@pcibus/pcidev/pcifn (0)->
- ereport.io.psy.pbm.target-rl@pcibus/pcidev/pcifn;
-
-prop error.io.psy.pbm.rl@hostbridge/pcibus/pcidev/pcifn (0)->
- error.io.pci.retry-to-d@hostbridge/pcibus/pcidev/pcifn;
-
-prop error.io.psy.pbm.rl@hostbridge/pcibus/pcidev/pcifn (0)->
- error.psy.cpu.berr@cpu;
-
-prop fault.io.pci.device-interr@hostbridge/pcibus/pcidev/pcifn (0)->
- ereport.io.psy.sbh@PCI_HB_DEV_PATH;
-
-/*
- * Need to add the following psycho specific propagations to complete the PCI
- * fault tree. These are to allow propagations to secondary errors and cpu
- * bus errors, and to represent the way the chip raises rserr
- * on detection of SERR#
- */
-prop error.io.pci.ma-u@hostbridge/pcibus/pcidev/pcifn (0)->
- ereport.io.psy.pbm.s-ma@PCI_HB_DEV_PATH;
-
-prop error.io.pci.ta-u@hostbridge/pcibus/pcidev/pcifn (0)->
- ereport.io.psy.pbm.s-rta@PCI_HB_DEV_PATH;
-
-prop error.io.pci.perr-pw-u@hostbridge/pcibus/pcidev/pcifn (0)->
- ereport.io.psy.pbm.s-mdpe@PCI_HB_DEV_PATH;
-
-prop error.io.pci.perr-dw-u@hostbridge/pcibus/pcidev/pcifn (0)->
- ereport.io.psy.pbm.s-mdpe@PCI_HB_DEV_PATH;
-
-prop error.io.pci.dpdata-dr-u@hostbridge/pcibus/pcidev/pcifn (0)->
- ereport.io.psy.pbm.s-mdpe@PCI_HB_DEV_PATH;
-
-prop error.io.pci.ta-u@hostbridge/pcibus/pcidev/pcifn (0)->
- error.psy.cpu.berr@cpu;
-
-prop error.io.pci.dpdata-dr-u@hostbridge/pcibus/pcidev/pcifn (0)->
- error.psy.cpu.berr@cpu;
-
-prop error.io.pci.ma-u@hostbridge/pcibus/pcidev/pcifn (0)->
- error.psy.cpu.berr@cpu;
-
-prop error.psy.cpu.berr@cpu (0)->
- ereport.cpu.ultraSPARC-II.berr@cpu;
-
-prop error.io.pci.serr-u@hostbridge/pcibus/pcidev/pcifn (1)->
- ereport.io.pci.rserr@PCI_HB_DEV_PATH;
-
-event ereport.io.psy.nodiag@hostbridge;
-
-/*
- * Upset used to hide ereports that can not be currently diagnosed.
- */
-engine serd.io.psy.nodiag@hostbridge,
- N=1000, T=1hour, method=persistent,
- trip=ereport.io.psy.nodiag@hostbridge;
-
-event upset.io.psy.nodiag@hostbridge,
- engine=serd.io.psy.nodiag@hostbridge;
-
-prop upset.io.psy.nodiag@hostbridge (0)->
- ereport.io.psy.ecc.s-pce@hostbridge,
- ereport.io.psy.nodiag@hostbridge;
diff --git a/usr/src/cmd/fm/eversholt/files/sparc/sun4u/schizo.esc b/usr/src/cmd/fm/eversholt/files/sparc/sun4u/schizo.esc
deleted file mode 100644
index 09957e8654..0000000000
--- a/usr/src/cmd/fm/eversholt/files/sparc/sun4u/schizo.esc
+++ /dev/null
@@ -1,441 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#pragma dictionary "SUN4U"
-
-#define AGENT_ID_MASK 0x1f
-#define AGENT_ID_SHIFT 24
-
-#define HB_FIT 1000
-#define HBUS_FIT 1000
-#define PCI_BUS_FIT 500
-#define PCI_DEV_FIT 1000
-#define CPU_FIT 500
-
-#define PCI_HB_DEV_PATH hostbridge/pcibus/pcidev[32]/pcifn[0]
-
-fru hostbridge;
-asru hostbridge;
-
-event fault.io.schizo@hostbridge,
- FITrate=HB_FIT, FRU=hostbridge, ASRU=hostbridge;
-
-event error.io.sch.saf.dstat@hostbridge;
-event error.io.sch.saf.to@hostbridge;
-event error.io.sch.saf.bus@hostbridge;
-event error.io.sch.ecc.thresh@hostbridge;
-event error.io.pci.device-ta@hostbridge/pcibus/pcidev/pcifn;
-
-event ereport.io.sch.saf.to@hostbridge{within(5s)};
-event ereport.io.sch.saf.bus@hostbridge{within(5s)};
-event ereport.io.sch.saf.bca@hostbridge{within(5s)};
-event ereport.io.sch.saf.bcb@hostbridge{within(5s)};
-event ereport.io.sch.saf.ciq-to@hostbridge{within(5s)};
-event ereport.io.sch.saf.lpq-to@hostbridge{within(5s)};
-event ereport.io.sch.saf.sfpq-to@hostbridge{within(5s)};
-event ereport.io.sch.saf.ufpq-to@hostbridge{within(5s)};
-event ereport.io.sch.saf.ape@hostbridge{within(5s)};
-event ereport.io.sch.ecc.pce@hostbridge{within(5s)};
-event ereport.io.sch.ecc.pue@hostbridge{within(5s)};
-event ereport.io.sch.ecc.s-pce@hostbridge{within(5s)};
-event ereport.io.sch.ecc.s-pue@hostbridge{within(5s)};
-event ereport.io.sch.ecc.thresh@hostbridge{within(5s)};
-event ereport.io.sch.saf.dstat@hostbridge{within(5s)};
-
-/*
- * A faulty Schizo hostbridge may cause:
- *
- * - bca: bad safari command from PCI block A.
- * - bcb: bad safari command from PCI block B.
- * - ciq-to: coherent input queue timeout.
- * - lpq-to: local PIO queue timeout.
- * - sfpq-to: safari foreign PIO queue timeout.
- * - ufpq-to: UPA foreign PIO queue timeout.
- * - ape: address parity error.
- * - pue: PIO uncorrectable error, bad reader.
- * - s-pue: secondary PIO UE, bad reader.
- * - ecc: multiple PIO CEs.
- * - to: safari bus timeout.
- * - bus: safari bus error.
- * - dstat: errant dstat on incoming data.
- *
- * The to, bus and dstat errors can cause a target abort to be sent onto the
- * pci bus in response to a dma request. We represent this using a device-ta
- * error to propagate into the generic pci.esc rules.
- */
-prop fault.io.schizo@hostbridge (0)->
- ereport.io.sch.saf.bca@hostbridge,
- ereport.io.sch.saf.bcb@hostbridge,
- ereport.io.sch.saf.ciq-to@hostbridge,
- ereport.io.sch.saf.lpq-to@hostbridge,
- ereport.io.sch.saf.sfpq-to@hostbridge,
- ereport.io.sch.saf.ufpq-to@hostbridge,
- ereport.io.sch.saf.ape@hostbridge,
- ereport.io.sch.ecc.pue@hostbridge,
- ereport.io.sch.ecc.s-pue@hostbridge,
- error.io.sch.ecc.thresh@hostbridge,
- error.io.sch.saf.to@hostbridge,
- error.io.sch.saf.bus@hostbridge,
- error.io.sch.saf.dstat@hostbridge;
-
-prop error.io.sch.ecc.thresh@hostbridge (2)->
- ereport.io.sch.ecc.thresh@hostbridge,
- ereport.io.sch.ecc.pce@hostbridge;
-
-prop error.io.sch.saf.to@hostbridge (2)->
- ereport.io.sch.saf.to@hostbridge,
- error.io.pci.device-ta@PCI_HB_DEV_PATH;
-
-prop error.io.sch.saf.bus@hostbridge (2)->
- ereport.io.sch.saf.bus@hostbridge,
- error.io.pci.device-ta@PCI_HB_DEV_PATH;
-
-prop error.io.sch.saf.dstat@hostbridge (1)->
- ereport.io.sch.saf.dstat@hostbridge;
-
-prop error.io.sch.saf.dstat@hostbridge (0)->
- error.io.pci.device-ta@PCI_HB_DEV_PATH;
-
-engine serd.io.schizo.ecc@hostbridge,
- N=3, T=1day, method=persistent,
- trip=ereport.io.sch.ecc.thresh@hostbridge;
-
-event upset.io.schizo@hostbridge,
- engine=serd.io.schizo.ecc@hostbridge;
-
-/*
- * An upset schizo may cause:
- *
- * - pce: PIO correctable error.
- */
-prop upset.io.schizo@hostbridge (0)->
- ereport.io.sch.ecc.pce@hostbridge;
-
-fru cpu;
-
-event fault.io.datapath@cpu, FITrate=CPU_FIT, FRU=cpu, retire=0;
-
-event error.io.cpu.ecc.thresh@cpu;
-event ereport.io.sch.saf.ssm-dis@hostbridge{within(5s)};
-event ereport.io.sch.saf.cpu0-par@hostbridge{within(5s)};
-event ereport.io.sch.saf.cpu0-bidi@hostbridge{within(5s)};
-event ereport.io.sch.saf.cpu1-par@hostbridge{within(5s)};
-event ereport.io.sch.saf.cpu1-bidi@hostbridge{within(5s)};
-
-/*
- * A faulty xcal CPU[0] may cause:
- *
- * - cpu0-par: parity error on the unidirectional signals.
- * - cpu0-bidi: parity error on the bi-directional signals.
- */
-prop fault.io.datapath@cpu[0] (0)->
- ereport.io.sch.saf.cpu0-par@hostbridge,
- ereport.io.sch.saf.cpu0-bidi@hostbridge;
-
-/*
- * A faulty xcal CPU[1] may cause:
- *
- * - cpu1-par: parity error on the unidirectional signals.
- * - cpu1-bidi: parity error on the bidirectional signals.
- */
-prop fault.io.datapath@cpu[1] (0)->
- ereport.io.sch.saf.cpu1-par@hostbridge,
- ereport.io.sch.saf.cpu1-bidi@hostbridge;
-
-/*
- * A faulty CPU may cause:
- *
- * - to: safari bus timeout.
- * - bus: safari bus error.
- * - dstat: incorrect dstat sent to hostbridge.
- * - ssm-dis: ssm command sent to hostbridge when not enabled.
- * - ape: safari address parity error.
- * - pue: PIO uncorrectable error.
- * - ecc: multiple PIO CEs.
- */
-prop fault.io.datapath@cpu (0)->
- error.io.sch.saf.to@hostbridge,
- error.io.sch.saf.bus@hostbridge,
- error.io.sch.saf.dstat@hostbridge,
- ereport.io.sch.saf.ssm-dis@hostbridge,
- ereport.io.sch.saf.ape@hostbridge;
-
-prop fault.io.datapath@cpu[cpuid] (0)->
- ereport.io.sch.ecc.pue@hostbridge
- {((payloadprop("ecc-afsr") >> AGENT_ID_SHIFT) & AGENT_ID_MASK) == cpuid};
-
-prop fault.io.datapath@cpu (0)->
- error.io.cpu.ecc.thresh@cpu;
-
-prop error.io.cpu.ecc.thresh@cpu (1)->
- ereport.io.sch.ecc.thresh@hostbridge<>;
-
-prop error.io.cpu.ecc.thresh@cpu[cpuid] (1)->
- ereport.io.sch.ecc.pce@hostbridge<>
- {((payloadprop("ecc-afsr") >> AGENT_ID_SHIFT) & AGENT_ID_MASK) == cpuid};
-
-event fault.io.hbus@hostbridge,
- FITrate=HBUS_FIT, FRU=hostbridge, ASRU=hostbridge;
-
-/*
- * A faulty host bus may cause:
- *
- * - ape: address parity error.
- * - cpu0-par: parity error on the unidirectional signals.
- * - cpu0-bidi: parity error on the bidirectional signals.
- * - cpu1-par: parity error on the unidirectional signals.
- * - cpu1-bidi: parity error on the bidirectional signals.
- * - pue: PIO uncorrectable error.
- * - s-pue: secondary PIO UE.
- * - ecc: multiple PIO CEs.
- */
-prop fault.io.hbus@hostbridge (0)->
- ereport.io.sch.saf.ape@hostbridge,
- ereport.io.sch.saf.cpu0-par@hostbridge,
- ereport.io.sch.saf.cpu0-bidi@hostbridge,
- ereport.io.sch.saf.cpu1-par@hostbridge,
- ereport.io.sch.saf.cpu1-bidi@hostbridge,
- ereport.io.sch.ecc.pue@hostbridge,
- ereport.io.sch.ecc.s-pue@hostbridge,
- error.io.sch.ecc.thresh@hostbridge;
-
-/*
- * A bad request from a downstream device/driver may cause
- *
- * - um: safari unmapped address error.
- * - mmu: a iommu translation error.
- */
-event error.io.pci.badreq-pw-u@hostbridge/pcibus/pcidev/pcifn;
-event error.io.pci.badreq-drw-u@hostbridge/pcibus/pcidev/pcifn;
-
-event ereport.io.pci.rserr@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.sch.mmu@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.sch.saf.um@hostbridge{within(5s)};
-
-prop error.io.pci.badreq-pw-u@hostbridge/pcibus/pcidev/pcifn (0)->
- ereport.io.sch.saf.um@hostbridge;
-
-prop error.io.pci.badreq-pw-u@hostbridge/pcibus/pcidev/pcifn (0)->
- ereport.io.sch.mmu@PCI_HB_DEV_PATH;
-
-prop error.io.pci.badreq-drw-u@hostbridge/pcibus/pcidev/pcifn (0)->
- ereport.io.sch.saf.um@hostbridge;
-
-prop error.io.pci.badreq-drw-u@hostbridge/pcibus/pcidev/pcifn (0)->
- ereport.io.sch.mmu@PCI_HB_DEV_PATH;
-
-fru pcibus;
-asru pcibus;
-
-event fault.io.pci.bus@hostbridge/pcibus,
- FITrate=PCI_BUS_FIT, FRU=pcibus, ASRU=pcibus;
-
-event ereport.io.sch.bu@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.sch.s-bu@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-
-/*
- * A faulty PCI bus may cause:
- *
- * - bu: PCI bus unusable error.
- * - s-bu: secondary PCI bus unusable error.
- */
-prop fault.io.pci.bus@hostbridge/pcibus (0)->
- ereport.io.sch.bu@PCI_HB_DEV_PATH,
- ereport.io.sch.s-bu@PCI_HB_DEV_PATH;
-
-fru pcibus/pcidev;
-asru pcibus/pcidev/pcifn;
-
-event fault.io.pci.device-interr@hostbridge/pcibus/pcidev/pcifn,
- FITrate=PCI_DEV_FIT, FRU=pcibus/pcidev, ASRU=pcibus/pcidev/pcifn;
-
-event fault.io.pci.device-interr@pcibus/pcidev/pcifn,
- FITrate=PCI_DEV_FIT, FRU=pcibus/pcidev, ASRU=pcibus/pcidev/pcifn;
-
-event error.io.sch.pbm.rl@hostbridge/pcibus/pcidev/pcifn;
-event error.io.sch.pbm.rl@pcibus/pcidev/pcifn;
-event error.io.sch.pbm.rl@pcibus/pcidev/pcifn/pcibus/pcidev/pcifn;
-event error.io.sch.pbm.target-rl@pcibus/pcidev/pcifn;
-event error.io.sch.pbm.target-rl@pcibus/pcidev/pcifn/pcibus/pcidev/pcifn;
-event error.io.sch.pbm.tto@hostbridge/pcibus/pcidev/pcifn;
-event error.io.sch.pbm.target-tto@hostbridge/pcibus/pcidev/pcifn;
-event error.io.sch.pbm.target-tto@pcibus/pcidev/pcifn;
-event error.io.sch.pbm.target-tto@pcibus/pcidev/pcifn/pcibus/pcidev/pcifn;
-event error.sch.cpu.berr@cpu;
-event error.io.pci.ma-u@hostbridge/pcibus/pcidev/pcifn;
-event error.io.pci.perr-pw-u@hostbridge/pcibus/pcidev/pcifn;
-event error.io.pci.perr-dw-u@hostbridge/pcibus/pcidev/pcifn;
-event error.io.pci.dpdata-dr-u@hostbridge/pcibus/pcidev/pcifn;
-event error.io.pci.ta-u@hostbridge/pcibus/pcidev/pcifn;
-event error.io.pci.serr-u@hostbridge/pcibus/pcidev/pcifn;
-event error.io.pci.retry-to-d@hostbridge/pcibus/pcidev/pcifn;
-
-event ereport.io.sch.sbh@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.sch.pbm.rl@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.sch.pbm.tto@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.sch.pbm.s-rl@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.sch.pbm.s-tto@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.sch.pbm.s-ma@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.sch.pbm.s-rta@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.sch.pbm.s-mdpe@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.sch.pbm.target-rl@pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.sch.pbm.target-tto@pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.pci.sserr@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-event ereport.cpu.ultraSPARC-III.berr@cpu{within(5s)};
-event ereport.cpu.ultraSPARC-IIIplus.berr@cpu{within(5s)};
-event ereport.cpu.ultraSPARC-IV.berr@cpu{within(5s)};
-event ereport.cpu.ultraSPARC-IVplus.berr@cpu{within(5s)};
-
-/*
- * A faulty PCI device may cause:
- *
- * - sbh: a streaming byte hole error.
- * - rl: it to exceed the number retriesfor a transaction.
- * - tto: it to not assert trdy# within the alloted timeout.
- *
- * For rl and tto, there may be a target- ereport on a child device. For rl,
- * there may also be an associated dto - the retry-to-d error propagates into
- * the pci.esc rules to handle this.
- */
-prop fault.io.pci.device-interr@hostbridge/pcibus/pcidev/pcifn (0)->
- ereport.io.sch.sbh@PCI_HB_DEV_PATH;
-
-prop fault.io.pci.device-interr@pcibus/pcidev[fromdev]/pcifn (0)->
- error.io.sch.pbm.rl@pcibus/pcidev<todev>/pcifn {
- fromdev == todev && fromdev != 32 },
- error.io.sch.pbm.target-rl@pcibus/pcidev<todev>/pcifn {
- fromdev == todev && fromdev != 32 };
-
-prop error.io.sch.pbm.rl@pcibus/pcidev/pcifn/pcibus/pcidev/pcifn (1)->
- error.io.sch.pbm.rl@pcibus/pcidev/pcifn;
-
-prop error.io.sch.pbm.rl@hostbridge/pcibus/pcidev/pcifn (1)->
- ereport.io.sch.pbm.rl@PCI_HB_DEV_PATH,
- ereport.io.sch.pbm.s-rl@PCI_HB_DEV_PATH;
-
-prop error.io.sch.pbm.target-rl@pcibus/pcidev/pcifn (1)->
- error.io.sch.pbm.target-rl@pcibus/pcidev/pcifn/pcibus<>/pcidev<>/pcifn<>;
-
-prop error.io.sch.pbm.target-rl@pcibus/pcidev/pcifn (0)->
- ereport.io.sch.pbm.target-rl@pcibus/pcidev/pcifn;
-
-prop error.io.sch.pbm.rl@hostbridge/pcibus/pcidev/pcifn (0)->
- error.io.pci.retry-to-d@hostbridge/pcibus/pcidev/pcifn;
-
-prop error.io.sch.pbm.rl@hostbridge/pcibus/pcidev/pcifn (0)->
- error.sch.cpu.berr@cpu;
-
-prop fault.io.pci.device-interr@hostbridge/pcibus/pcidev[fromdev]/pcifn (0)->
- error.io.sch.pbm.tto@hostbridge/pcibus/pcidev<todev>/pcifn {
- fromdev == todev && fromdev != 32 };
-
-prop error.io.sch.pbm.tto@hostbridge/pcibus/pcidev/pcifn (1)->
- ereport.io.sch.pbm.tto@PCI_HB_DEV_PATH,
- ereport.io.sch.pbm.s-tto@PCI_HB_DEV_PATH;
-
-prop error.io.sch.pbm.tto@hostbridge/pcibus/pcidev/pcifn (1)->
- error.io.sch.pbm.target-tto@hostbridge/pcibus/pcidev/pcifn;
-
-prop error.io.sch.pbm.target-tto@pcibus/pcidev/pcifn (0)->
- ereport.io.sch.pbm.target-tto@pcibus/pcidev/pcifn;
-
-prop error.io.sch.pbm.target-tto@pcibus/pcidev/pcifn (1)->
- error.io.sch.pbm.target-tto@pcibus/pcidev/pcifn/pcibus<>/pcidev<>/pcifn<>;
-
-prop error.io.sch.pbm.tto@hostbridge/pcibus/pcidev/pcifn (1)->
- ereport.io.sch.bu@PCI_HB_DEV_PATH;
-
-/*
- * Need to add the following schizo specific propagations to complete the PCI
- * fault tree. These are to allow propagations to secondary errors and cpu
- * bus errors, and to represent the way the chip can raise both rserr and sserr
- * on detection of SERR#
- */
-prop error.io.pci.ma-u@hostbridge/pcibus/pcidev/pcifn (0)->
- ereport.io.sch.pbm.s-ma@PCI_HB_DEV_PATH;
-
-prop error.io.pci.ta-u@hostbridge/pcibus/pcidev/pcifn (0)->
- ereport.io.sch.pbm.s-rta@PCI_HB_DEV_PATH;
-
-prop error.io.pci.perr-pw-u@hostbridge/pcibus/pcidev/pcifn (0)->
- ereport.io.sch.pbm.s-mdpe@PCI_HB_DEV_PATH;
-
-prop error.io.pci.perr-dw-u@hostbridge/pcibus/pcidev/pcifn (0)->
- ereport.io.sch.pbm.s-mdpe@PCI_HB_DEV_PATH;
-
-prop error.io.pci.dpdata-dr-u@hostbridge/pcibus/pcidev/pcifn (0)->
- ereport.io.sch.pbm.s-mdpe@PCI_HB_DEV_PATH;
-
-prop error.io.pci.ta-u@hostbridge/pcibus/pcidev/pcifn (0)->
- error.sch.cpu.berr@cpu;
-
-prop error.io.pci.dpdata-dr-u@hostbridge/pcibus/pcidev/pcifn (0)->
- error.sch.cpu.berr@cpu;
-
-prop error.io.pci.ma-u@hostbridge/pcibus/pcidev/pcifn (0)->
- error.sch.cpu.berr@cpu;
-
-prop error.io.pci.serr-u@hostbridge/pcibus/pcidev/pcifn (1)->
- ereport.io.pci.rserr@PCI_HB_DEV_PATH;
-
-prop error.io.pci.serr-u@hostbridge/pcibus/pcidev/pcifn (0)->
- ereport.io.pci.sserr@PCI_HB_DEV_PATH;
-
-prop error.sch.cpu.berr@cpu (1)->
- ereport.cpu.ultraSPARC-III.berr@cpu,
- ereport.cpu.ultraSPARC-IIIplus.berr@cpu,
- ereport.cpu.ultraSPARC-IV.berr@cpu,
- ereport.cpu.ultraSPARC-IVplus.berr@cpu;
-
-event error.io.sch.ecc.drue@hostbridge;
-event ereport.io.sch.ecc.drue@hostbridge{within(5s)};
-event ereport.io.sch.nodiag@hostbridge;
-
-/*
- * Upset used to hide ereports that can not be currently diagnosed.
- *
- * The drue error can cause a target abort to be sent onto the
- * pci bus in response to a dma request. We represent this using a device-ta
- * error to propagate into the generic pci.esc rules.
- */
-engine serd.io.sch.nodiag@hostbridge,
- N=1000, T=1hour, method=persistent,
- trip=ereport.io.sch.nodiag@hostbridge;
-
-event upset.io.sch.nodiag@hostbridge,
- engine=serd.io.sch.nodiag@hostbridge;
-
-prop upset.io.sch.nodiag@hostbridge (0)->
- ereport.io.sch.ecc.s-pce@hostbridge,
- error.io.sch.ecc.drue@hostbridge,
- ereport.io.sch.nodiag@hostbridge;
-
-prop error.io.sch.ecc.drue@hostbridge (1)->
- ereport.io.sch.ecc.drue@hostbridge;
-
-prop error.io.sch.ecc.drue@hostbridge (0)->
- error.io.pci.device-ta@PCI_HB_DEV_PATH;
diff --git a/usr/src/cmd/fm/eversholt/files/sparc/sun4u/tomatillo.esc b/usr/src/cmd/fm/eversholt/files/sparc/sun4u/tomatillo.esc
deleted file mode 100644
index 3e3a15fe44..0000000000
--- a/usr/src/cmd/fm/eversholt/files/sparc/sun4u/tomatillo.esc
+++ /dev/null
@@ -1,430 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#pragma dictionary "SUN4U"
-
-#define HB_FIT 1000
-#define HBUS_FIT 1000
-#define PCI_BUS_FIT 500
-#define PCI_DEV_FIT 1000
-#define CPU_FIT 500
-
-#define PCI_HB_DEV_PATH hostbridge/pcibus/pcidev[32]/pcifn[0]
-
-fru hostbridge;
-asru hostbridge;
-
-event fault.io.tomatillo@hostbridge,
- FITrate=HB_FIT, FRU=hostbridge, ASRU=hostbridge;
-
-event error.io.tom.jbus.um@hostbridge;
-event error.io.tom.jbus.to@hostbridge;
-event error.io.tom.jbus.bus@hostbridge;
-event error.io.tom.jbus.iis@hostbridge;
-event error.io.tom.mmu.inval@hostbridge/pcibus;
-event error.io.tom.mmu.prot@hostbridge/pcibus;
-event error.io.tom.mmu.bva@hostbridge/pcibus;
-event error.io.tom.mmu.btt@hostbridge/pcibus;
-event error.io.pci.device-ta@hostbridge/pcibus/pcidev/pcifn;
-
-event ereport.io.tom.jbus.um@hostbridge{within(5s)};
-event ereport.io.tom.jbus.to@hostbridge{within(5s)};
-event ereport.io.tom.jbus.bus@hostbridge{within(5s)};
-event ereport.io.tom.jbus.to-exp@hostbridge{within(5s)};
-event ereport.io.tom.jbus.iis@hostbridge{within(5s)};
-event ereport.io.tom.mmu.btt@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.tom.mmu.bva@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.tom.mmu.prot@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.tom.mmu.inval@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.tom.jbus.srds@hostbridge{within(5s)};
-event ereport.io.tom.jbus.srdsa@hostbridge{within(5s)};
-event ereport.io.tom.jbus.sown@hostbridge{within(5s)};
-event ereport.io.tom.jbus.srdo@hostbridge{within(5s)};
-
-/*
- * A faulty Tomatillo hostbridge may cause:
- *
- * - um: jbus unmapped address error.
- * - to: jbus timeout.
- * - bus: jbus bus error.
- * - iis: illegal coherency install state error.
- * - inval: iommu invalid entry error.
- * - prot: iommu protection error, attempted to write a read-only page.
- * - bva: iommu bad virtual address, address out of range.
- * - btt: iommu bad tsb size tbw size combination.
- * - srds: snoop error due to own RDS hitting cache line in S, O or M.
- * - srdsa: snoop error due to own RDSA hitting cache line in S, O or M.
- * - sown: snoop error due to own OWN hitting cache line in S or M.
- * - srdo: snoop error due to own RDO hitting cache line in O or M.
- *
- * The um, to, bus, btt, inval, prot and bva errors can cause a target abort to
- * be sent onto the pci bus in response to a dma request. We represent this
- * using a device-ta error to propagate into the generic pci.esc rules.
- */
-prop fault.io.tomatillo@hostbridge (0)->
- error.io.tom.jbus.um@hostbridge,
- error.io.tom.jbus.to@hostbridge,
- error.io.tom.jbus.bus@hostbridge,
- error.io.tom.jbus.iis@hostbridge,
- error.io.tom.mmu.inval@hostbridge/pcibus,
- error.io.tom.mmu.prot@hostbridge/pcibus,
- error.io.tom.mmu.bva@hostbridge/pcibus,
- error.io.tom.mmu.btt@hostbridge/pcibus,
- ereport.io.tom.jbus.srds@hostbridge,
- ereport.io.tom.jbus.srdsa@hostbridge,
- ereport.io.tom.jbus.sown@hostbridge,
- ereport.io.tom.jbus.srdo@hostbridge;
-
-prop error.io.tom.jbus.um@hostbridge (1)->
- ereport.io.tom.jbus.um@hostbridge;
-
-prop error.io.tom.jbus.um@hostbridge (0)->
- error.io.pci.device-ta@PCI_HB_DEV_PATH;
-
-prop error.io.tom.jbus.to@hostbridge (1)->
- ereport.io.tom.jbus.to@hostbridge,
- ereport.io.tom.jbus.to-exp@hostbridge;
-
-prop error.io.tom.jbus.to@hostbridge (0)->
- error.io.pci.device-ta@PCI_HB_DEV_PATH;
-
-prop error.io.tom.jbus.bus@hostbridge (1)->
- ereport.io.tom.jbus.bus@hostbridge;
-
-prop error.io.tom.jbus.bus@hostbridge (0)->
- error.io.pci.device-ta@PCI_HB_DEV_PATH;
-
-prop error.io.tom.jbus.iis@hostbridge (1)->
- ereport.io.tom.jbus.iis@hostbridge;
-
-prop error.io.tom.mmu.btt@hostbridge/pcibus (1)->
- ereport.io.tom.mmu.btt@PCI_HB_DEV_PATH;
-
-prop error.io.tom.mmu.btt@hostbridge/pcibus (0)->
- error.io.pci.device-ta@PCI_HB_DEV_PATH,
- error.io.tom.mmu.inval@hostbridge/pcibus;
-
-prop error.io.tom.mmu.inval@hostbridge/pcibus (1)->
- ereport.io.tom.mmu.inval@PCI_HB_DEV_PATH;
-
-prop error.io.tom.mmu.inval@hostbridge/pcibus (0)->
- error.io.pci.device-ta@PCI_HB_DEV_PATH;
-
-prop error.io.tom.mmu.prot@hostbridge/pcibus (1)->
- ereport.io.tom.mmu.prot@PCI_HB_DEV_PATH;
-
-prop error.io.tom.mmu.prot@hostbridge/pcibus (0)->
- error.io.pci.device-ta@PCI_HB_DEV_PATH;
-
-prop error.io.tom.mmu.bva@hostbridge/pcibus (1)->
- ereport.io.tom.mmu.bva@PCI_HB_DEV_PATH;
-
-prop error.io.tom.mmu.bva@hostbridge/pcibus (0)->
- error.io.pci.device-ta@PCI_HB_DEV_PATH;
-
-fru cpu;
-
-event fault.io.datapath@cpu, FITrate=CPU_FIT, FRU=cpu, retire=0;
-
-event error.io.tom.jbus.ibe@hostbridge;
-
-event ereport.io.tom.jbus.ibe@hostbridge{within(5s)};
-event ereport.io.tom.jbus.srd@hostbridge{within(5s)};
-event ereport.io.tom.jbus.bc@hostbridge{within(5s)};
-
-/*
- * A faulty CPU may cause:
- *
- * - to: jbus timeout error.
- * - bus: jbus bus error.
- * - ibe: illegal byte enable error.
- * - iis: illegal coherency install state error.
- * - um: jbus unmapped error.
- * - srd: foreign RD hitting cache line in S, O or M.
- * - bc: bad jbus command.
- *
- * The ibe error can cause a target abort to
- * be sent onto the pci bus in response to a dma request. We represent this
- * using a device-ta error to propagate into the generic pci.esc rules.
- */
-prop fault.io.datapath@cpu (0)->
- error.io.tom.jbus.to@hostbridge,
- error.io.tom.jbus.bus@hostbridge,
- error.io.tom.jbus.ibe@hostbridge,
- error.io.tom.jbus.iis@hostbridge,
- error.io.tom.jbus.um@hostbridge,
- ereport.io.tom.jbus.srd@hostbridge,
- ereport.io.tom.jbus.bc@hostbridge;
-
-prop error.io.tom.jbus.ibe@hostbridge (1)->
- ereport.io.tom.jbus.ibe@hostbridge;
-
-prop error.io.tom.jbus.ibe@hostbridge (0)->
- error.io.pci.device-ta@PCI_HB_DEV_PATH;
-
-event fault.io.hbus@hostbridge,
- FITrate=HBUS_FIT, FRU=hostbridge, ASRU=hostbridge;
-
-event error.io.tom.jbus.drpe@hostbridge;
-event ereport.io.tom.jbus.ape@hostbridge{within(5s)};
-event ereport.io.tom.jbus.pwpe@hostbridge{within(5s)};
-event ereport.io.tom.jbus.drpe@hostbridge{within(5s)};
-event ereport.io.tom.jbus.dwpe@hostbridge{within(5s)};
-event ereport.io.tom.jbus.cpe@hostbridge{within(5s)};
-
-/*
- * A faulty host bus may cause:
- *
- * - ape: jbus address parity error.
- * - pwpe: jbus PIO write parity error.
- * - drpe: jbus DMA read parity error.
- * - dwpe: jbus DMA write parity error.
- * - cpe: jbus control parity error.
- *
- * The drpe error can cause a target abort to
- * be sent onto the pci bus in response to a dma request. We represent this
- * using a device-ta error to propagate into the generic pci.esc rules.
- */
-prop fault.io.hbus@hostbridge(0)->
- ereport.io.tom.jbus.ape@hostbridge,
- ereport.io.tom.jbus.pwpe@hostbridge,
- error.io.tom.jbus.drpe@hostbridge,
- ereport.io.tom.jbus.dwpe@hostbridge,
- ereport.io.tom.jbus.cpe@hostbridge;
-
-prop error.io.tom.jbus.drpe@hostbridge(1)->
- ereport.io.tom.jbus.drpe@hostbridge;
-
-prop error.io.tom.jbus.drpe@hostbridge(0)->
- error.io.pci.device-ta@PCI_HB_DEV_PATH;
-
-fru pcibus/pcidev;
-asru pcibus/pcidev/pcifn;
-
-event fault.io.pci.device-interr@hostbridge/pcibus/pcidev/pcifn,
- FITrate=PCI_DEV_FIT, FRU=pcibus/pcidev, ASRU=pcibus/pcidev/pcifn;
-
-event fault.io.pci.device-interr@pcibus/pcidev/pcifn,
- FITrate=PCI_DEV_FIT, FRU=pcibus/pcidev, ASRU=pcibus/pcidev/pcifn;
-
-event error.io.tom.pbm.rl@hostbridge/pcibus/pcidev/pcifn;
-event error.io.tom.pbm.rl@pcibus/pcidev/pcifn;
-event error.io.tom.pbm.rl@pcibus/pcidev/pcifn/pcibus/pcidev/pcifn;
-event error.io.tom.pbm.target-rl@pcibus/pcidev/pcifn;
-event error.io.tom.pbm.target-rl@pcibus/pcidev/pcifn/pcibus/pcidev/pcifn;
-event error.io.tom.pbm.tto@hostbridge/pcibus/pcidev/pcifn;
-event error.io.tom.pbm.target-tto@hostbridge/pcibus/pcidev/pcifn;
-event error.io.tom.pbm.target-tto@pcibus/pcidev/pcifn;
-event error.io.tom.pbm.target-tto@pcibus/pcidev/pcifn/pcibus/pcidev/pcifn;
-event error.tom.cpu.berr@cpu;
-event error.io.pci.ma-u@hostbridge/pcibus/pcidev/pcifn;
-event error.io.pci.perr-pw-u@hostbridge/pcibus/pcidev/pcifn;
-event error.io.pci.perr-dw-u@hostbridge/pcibus/pcidev/pcifn;
-event error.io.pci.dpdata-dr-u@hostbridge/pcibus/pcidev/pcifn;
-event error.io.pci.ta-u@hostbridge/pcibus/pcidev/pcifn;
-event error.io.pci.serr-u@hostbridge/pcibus/pcidev/pcifn;
-event error.io.pci.retry-to-d@hostbridge/pcibus/pcidev/pcifn;
-
-event ereport.io.tom.pbm.tto@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.tom.pbm.rl@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.tom.pbm.s-tto@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.tom.pbm.s-rl@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.tom.pbm.s-ma@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.tom.pbm.s-rta@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.tom.pbm.s-mdpe@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.tom.pbm.target-tto@pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.tom.pbm.target-rl@pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.pci.rserr@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-
-/*
- * A faulty PCI device may cause:
- *
- * - rl: it to exceed the limit on retrying a transaction.
- * - tto: it to not assert trdy# within the set timeout.
- *
- * For rl and tto, there may be a target- ereport on a child device. For rl,
- * there may also be an associated dto - the retry-to-d error propagates into
- * the pci.esc rules to handle this.
- */
-prop fault.io.pci.device-interr@pcibus/pcidev[fromdev]/pcifn (0)->
- error.io.tom.pbm.rl@pcibus/pcidev<todev>/pcifn {
- fromdev == todev && fromdev != 32 },
- error.io.tom.pbm.target-rl@pcibus/pcidev<todev>/pcifn {
- fromdev == todev && fromdev != 32 };
-
-prop error.io.tom.pbm.rl@pcibus/pcidev/pcifn/pcibus/pcidev/pcifn (1)->
- error.io.tom.pbm.rl@pcibus/pcidev/pcifn;
-
-prop error.io.tom.pbm.rl@hostbridge/pcibus/pcidev/pcifn (1)->
- ereport.io.tom.pbm.rl@PCI_HB_DEV_PATH,
- ereport.io.tom.pbm.s-rl@PCI_HB_DEV_PATH;
-
-prop error.io.tom.pbm.target-rl@pcibus/pcidev/pcifn (1)->
- error.io.tom.pbm.target-rl@pcibus/pcidev/pcifn/pcibus<>/pcidev<>/pcifn<>;
-
-prop error.io.tom.pbm.target-rl@pcibus/pcidev/pcifn (0)->
- ereport.io.tom.pbm.target-rl@pcibus/pcidev/pcifn;
-
-prop error.io.tom.pbm.rl@hostbridge/pcibus/pcidev/pcifn (0)->
- error.tom.cpu.berr@cpu;
-
-prop error.io.tom.pbm.rl@hostbridge/pcibus/pcidev/pcifn (0)->
- error.io.pci.retry-to-d@hostbridge/pcibus/pcidev/pcifn;
-
-prop fault.io.pci.device-interr@hostbridge/pcibus/pcidev[fromdev]/pcifn (0)->
- error.io.tom.pbm.tto@hostbridge/pcibus/pcidev<todev>/pcifn {
- fromdev == todev && fromdev != 32};
-
-prop error.io.tom.pbm.tto@hostbridge/pcibus/pcidev/pcifn (1)->
- ereport.io.tom.pbm.tto@PCI_HB_DEV_PATH,
- ereport.io.tom.pbm.s-tto@PCI_HB_DEV_PATH;
-
-prop error.io.tom.pbm.tto@hostbridge/pcibus/pcidev/pcifn (1)->
- error.io.tom.pbm.target-tto@hostbridge/pcibus/pcidev/pcifn;
-
-prop error.io.tom.pbm.target-tto@pcibus/pcidev/pcifn (0)->
- ereport.io.tom.pbm.target-tto@pcibus/pcidev/pcifn;
-
-prop error.io.tom.pbm.target-tto@pcibus/pcidev/pcifn (1)->
- error.io.tom.pbm.target-tto@pcibus/pcidev/pcifn/pcibus<>/pcidev<>/pcifn<>;
-
-/*
- * Need to add the following tomatillo specific propagations to complete the
- * fault tree. These are to allow propagations to secondary errors and cpu
- * bus errors, and to represent the way the chip raises rserr
- * on detection of SERR#
- */
-prop error.io.pci.ma-u@hostbridge/pcibus/pcidev/pcifn (0)->
- ereport.io.tom.pbm.s-ma@PCI_HB_DEV_PATH;
-
-prop error.io.pci.ta-u@hostbridge/pcibus/pcidev/pcifn (0)->
- ereport.io.tom.pbm.s-rta@PCI_HB_DEV_PATH;
-
-prop error.io.pci.perr-pw-u@hostbridge/pcibus/pcidev/pcifn (0)->
- ereport.io.tom.pbm.s-mdpe@PCI_HB_DEV_PATH;
-
-prop error.io.pci.perr-dw-u@hostbridge/pcibus/pcidev/pcifn (0)->
- ereport.io.tom.pbm.s-mdpe@PCI_HB_DEV_PATH;
-
-prop error.io.pci.dpdata-dr-u@hostbridge/pcibus/pcidev/pcifn (0)->
- ereport.io.tom.pbm.s-mdpe@PCI_HB_DEV_PATH;
-
-prop error.io.pci.ta-u@hostbridge/pcibus/pcidev/pcifn (0)->
- error.tom.cpu.berr@cpu;
-
-prop error.io.pci.dpdata-dr-u@hostbridge/pcibus/pcidev/pcifn (0)->
- error.tom.cpu.berr@cpu;
-
-prop error.io.pci.ma-u@hostbridge/pcibus/pcidev/pcifn (0)->
- error.tom.cpu.berr@cpu;
-
-prop error.io.pci.serr-u@hostbridge/pcibus/pcidev/pcifn (1)->
- ereport.io.pci.rserr@PCI_HB_DEV_PATH;
-
-event ereport.cpu.ultraSPARC-IIIi.berr@cpu{within(5s)};
-
-prop error.tom.cpu.berr@cpu (1)->
- ereport.cpu.ultraSPARC-IIIi.berr@cpu;
-
-/*
- * A bad request from a downstream device/driver may cause
- *
- * - inval: iommu invalid entry error.
- * - prot: iommu protection error, attempted to write a read-only page.
- * - bva: iommu bad virtual address, address out of range.
- * - btt: iommu bad tsb size tbw size combination.
- */
-event error.io.pci.badreq-pw-u@hostbridge/pcibus/pcidev/pcifn;
-
-prop error.io.pci.badreq-pw-u@hostbridge/pcibus/pcidev/pcifn (0)->
- ereport.io.tom.mmu.inval@PCI_HB_DEV_PATH,
- ereport.io.tom.mmu.prot@PCI_HB_DEV_PATH,
- ereport.io.tom.mmu.bva@PCI_HB_DEV_PATH,
- ereport.io.tom.mmu.btt@PCI_HB_DEV_PATH;
-
-event error.io.pci.badreq-drw-u@hostbridge/pcibus/pcidev/pcifn;
-
-prop error.io.pci.badreq-drw-u@hostbridge/pcibus/pcidev/pcifn (0)->
- ereport.io.tom.mmu.inval@PCI_HB_DEV_PATH,
- ereport.io.tom.mmu.prot@PCI_HB_DEV_PATH,
- ereport.io.tom.mmu.bva@PCI_HB_DEV_PATH,
- ereport.io.tom.mmu.btt@PCI_HB_DEV_PATH;
-
-event error.io.tom.ecc.drue@hostbridge;
-event error.io.tom.mmu.ue@hostbridge/pcibus;
-event error.io.tom.mmu.to@hostbridge/pcibus;
-event ereport.io.tom.jbus.sgr@hostbridge{within(5s)};
-event ereport.io.tom.jbus.spci@hostbridge{within(5s)};
-event ereport.io.tom.jbus.snp@hostbridge{within(5s)};
-event ereport.io.tom.ecc.drue@hostbridge{within(5s)};
-event ereport.io.tom.mmu.ue@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.tom.mmu.to@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-
-event ereport.io.tom.nodiag@hostbridge;
-
-/*
- * Upset used to hide ereports that can not be currently diagnosed.
- *
- * The ue, to and drue errors can cause a target abort to
- * be sent onto the pci bus in response to a dma request. We represent this
- * using a device-ta error to propagate into the generic pci.esc rules.
- */
-engine serd.io.tom.nodiag@hostbridge,
- N=1000, T=1hour, method=persistent,
- trip=ereport.io.tom.nodiag@hostbridge;
-
-event upset.io.tom.nodiag@hostbridge,
- engine=serd.io.tom.nodiag@hostbridge;
-
-prop upset.io.tom.nodiag@hostbridge (0)->
- ereport.io.tom.jbus.sgr@hostbridge,
- ereport.io.tom.jbus.spci@hostbridge,
- ereport.io.tom.jbus.snp@hostbridge,
- ereport.io.tom.nodiag@hostbridge;
-
-prop upset.io.tom.nodiag@hostbridge (0)->
- error.io.tom.ecc.drue@hostbridge,
- error.io.tom.mmu.to@hostbridge/pcibus,
- error.io.tom.mmu.ue@hostbridge/pcibus;
-
-prop error.io.tom.mmu.ue@hostbridge/pcibus (1)->
- ereport.io.tom.mmu.ue@PCI_HB_DEV_PATH;
-
-prop error.io.tom.mmu.ue@hostbridge/pcibus (0)->
- error.io.pci.device-ta@PCI_HB_DEV_PATH;
-
-prop error.io.tom.mmu.to@hostbridge/pcibus (1)->
- ereport.io.tom.mmu.to@PCI_HB_DEV_PATH;
-
-prop error.io.tom.mmu.to@hostbridge/pcibus (0)->
- error.io.pci.device-ta@PCI_HB_DEV_PATH;
-
-prop error.io.tom.ecc.drue@hostbridge (1)->
- ereport.io.tom.ecc.drue@hostbridge;
-
-prop error.io.tom.ecc.drue@hostbridge (0)->
- error.io.pci.device-ta@PCI_HB_DEV_PATH;
diff --git a/usr/src/cmd/fm/eversholt/files/sparc/sun4u/xmits.esc b/usr/src/cmd/fm/eversholt/files/sparc/sun4u/xmits.esc
deleted file mode 100644
index 51217ef94d..0000000000
--- a/usr/src/cmd/fm/eversholt/files/sparc/sun4u/xmits.esc
+++ /dev/null
@@ -1,449 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#pragma dictionary "SUN4U"
-
-#define AGENT_ID_MASK 0x1f
-#define AGENT_ID_SHIFT 24
-
-#define HB_FIT 1000
-#define HBUS_FIT 1000
-#define PCI_BUS_FIT 500
-#define PCI_DEV_FIT 1000
-#define CPU_FIT 500
-
-#define PCI_HB_DEV_PATH hostbridge/pcibus/pcidev[32]/pcifn[0]
-
-fru hostbridge;
-asru hostbridge;
-
-event fault.io.xmits@hostbridge,
- FITrate=HB_FIT, FRU=hostbridge, ASRU=hostbridge;
-
-event error.io.xmits.saf.dstat@hostbridge;
-event error.io.xmits.saf.to@hostbridge;
-event error.io.xmits.saf.bus@hostbridge;
-event error.io.xmits.ecc.thresh@hostbridge;
-event error.io.pci.device-ta@hostbridge/pcibus/pcidev/pcifn;
-
-event ereport.io.xmits.saf.ape@hostbridge{within(5s)};
-event ereport.io.xmits.saf.to@hostbridge{within(5s)};
-event ereport.io.xmits.saf.bus@hostbridge{within(5s)};
-event ereport.io.xmits.saf.bca@hostbridge{within(5s)};
-event ereport.io.xmits.saf.bcb@hostbridge{within(5s)};
-event ereport.io.xmits.saf.ciq-to@hostbridge{within(5s)};
-event ereport.io.xmits.saf.lpq-to@hostbridge{within(5s)};
-event ereport.io.xmits.saf.sfpq-to@hostbridge{within(5s)};
-event ereport.io.xmits.ecc.pce@hostbridge{within(5s)};
-event ereport.io.xmits.ecc.pue@hostbridge{within(5s)};
-event ereport.io.xmits.ecc.s-pce@hostbridge{within(5s)};
-event ereport.io.xmits.ecc.s-pue@hostbridge{within(5s)};
-event ereport.io.xmits.saf.para@hostbridge{within(5s)};
-event ereport.io.xmits.saf.parb@hostbridge{within(5s)};
-event ereport.io.xmits.saf.pars@hostbridge{within(5s)};
-event ereport.io.xmits.saf.plla@hostbridge{within(5s)};
-event ereport.io.xmits.saf.pllb@hostbridge{within(5s)};
-event ereport.io.xmits.saf.plls@hostbridge{within(5s)};
-event ereport.io.xmits.ecc.thresh@hostbridge{within(5s)};
-event ereport.io.xmits.saf.dstat@hostbridge{within(5s)};
-event ereport.io.xmits.pbmx.stdst@PCI_HB_DEV_PATH{within(5s)};
-event ereport.io.xmits.pbmx.cndst@PCI_HB_DEV_PATH{within(5s)};
-event ereport.io.xmits.pbmx.tato@PCI_HB_DEV_PATH{within(5s)};
-event ereport.io.xmits.pbmx.stmmu@PCI_HB_DEV_PATH{within(5s)};
-event ereport.io.xmits.pbmx.cnmmu@PCI_HB_DEV_PATH{within(5s)};
-
-/*
- * A faulty Xmits hostbridge may cause:
- *
- * - para: a parity error on the internal memories of PCI block A.
- * - parb: a parity error on the internal memories of PCI block B.
- * - pars: a parity error on the internal memories of the Safari block.
- * - plla: a PLL lock error on the PCIA Leaf PLL.
- * - pllb: a PLL lock error on the PCIB Leaf PLL.
- * - plls: a PLL lock error on the Safari block PLL.
- * - stdst a streaming DMA split completion encounters a DSTAT error
- * - cndst a consistant DMA split completion encounters a DSTAT error
- * - bca: bad safari command from PCI block A.
- * - bcb: bad safari command from PCI block B.
- * - ciq-to: coherent input queue timeout.
- * - lpq-to: local PIO queue timeout.
- * - sfpq-to: safari foreign PIO queue timeout.
- * - ape: address parity error.
- * - pue: PIO uncorrectable error, bad reader.
- * - s-pue: secondary PIO UE, bad reader.
- * - ecc: multiple PIO CEs.
- * - to: safari bus timeout.
- * - bus: safari bus error.
- * - dstat: errant dstat on incoming data.
- *
- * The to, bus and dstat errors can cause a target abort to be sent onto the
- * pci bus in response to a dma request. We represent this using a device-ta
- * error to propagate into the generic pci.esc rules.
- */
-prop fault.io.xmits@hostbridge (0)->
- ereport.io.xmits.saf.para@hostbridge,
- ereport.io.xmits.saf.parb@hostbridge,
- ereport.io.xmits.saf.pars@hostbridge,
- ereport.io.xmits.saf.plla@hostbridge,
- ereport.io.xmits.saf.pllb@hostbridge,
- ereport.io.xmits.saf.plls@hostbridge,
- ereport.io.xmits.saf.bca@hostbridge,
- ereport.io.xmits.saf.bcb@hostbridge,
- ereport.io.xmits.saf.ciq-to@hostbridge,
- ereport.io.xmits.saf.lpq-to@hostbridge,
- ereport.io.xmits.saf.sfpq-to@hostbridge,
- ereport.io.xmits.saf.ape@hostbridge,
- ereport.io.xmits.ecc.pue@hostbridge,
- ereport.io.xmits.ecc.s-pue@hostbridge,
- ereport.io.xmits.pbmx.stdst@PCI_HB_DEV_PATH,
- ereport.io.xmits.pbmx.cndst@PCI_HB_DEV_PATH,
- error.io.xmits.ecc.thresh@hostbridge,
- error.io.xmits.saf.to@hostbridge,
- error.io.xmits.saf.bus@hostbridge,
- error.io.xmits.saf.dstat@hostbridge;
-
-prop error.io.xmits.ecc.thresh@hostbridge (2)->
- ereport.io.xmits.ecc.thresh@hostbridge,
- ereport.io.xmits.ecc.pce@hostbridge;
-
-prop error.io.xmits.saf.to@hostbridge (2)->
- ereport.io.xmits.saf.to@hostbridge,
- error.io.pci.device-ta@PCI_HB_DEV_PATH;
-
-prop error.io.xmits.saf.bus@hostbridge (2)->
- ereport.io.xmits.saf.bus@hostbridge,
- error.io.pci.device-ta@PCI_HB_DEV_PATH;
-
-prop error.io.xmits.saf.dstat@hostbridge (1)->
- ereport.io.xmits.saf.dstat@hostbridge;
-
-prop error.io.xmits.saf.dstat@hostbridge (0)->
- error.io.pci.device-ta@PCI_HB_DEV_PATH;
-
-engine serd.io.xmits.ecc@hostbridge,
- N=3, T=1day, method=persistent,
- trip=ereport.io.xmits.ecc.thresh@hostbridge;
-
-event upset.io.xmits@hostbridge,
- engine=serd.io.xmits.ecc@hostbridge;
-
-/*
- * An upset xmits may cause:
- *
- * - pce: PIO correctable error.
- */
-prop upset.io.xmits@hostbridge (0)->
- ereport.io.xmits.ecc.pce@hostbridge;
-
-fru cpu;
-
-event fault.io.datapath@cpu, FITrate=CPU_FIT, FRU=cpu, retire=0;
-
-event error.io.cpu.ecc.thresh@cpu;
-event ereport.io.xmits.saf.ssm-dis@hostbridge{within(5s)};
-
-/*
- * A faulty CPU may cause:
- *
- * - to: safari bus timeout.
- * - bus: safari bus error.
- * - dstat: incorrect dstat sent to hostbridge.
- * - ssm-dis: ssm command sent to hostbridge when not enabled.
- * - ape: safari address parity error.
- * - pue: PIO uncorrectable error.
- * - ecc: multiple PIO CEs.
- */
-prop fault.io.datapath@cpu (0)->
- error.io.xmits.saf.to@hostbridge,
- error.io.xmits.saf.bus@hostbridge,
- error.io.xmits.saf.dstat@hostbridge,
- ereport.io.xmits.saf.ssm-dis@hostbridge,
- ereport.io.xmits.saf.ape@hostbridge;
-
-prop fault.io.datapath@cpu[cpuid] (0)->
- ereport.io.xmits.ecc.pue@hostbridge
- {((payloadprop("ecc-afsr") >> AGENT_ID_SHIFT) & AGENT_ID_MASK) == cpuid};
-
-prop fault.io.datapath@cpu (0)->
- error.io.cpu.ecc.thresh@cpu;
-
-prop error.io.cpu.ecc.thresh@cpu (1)->
- ereport.io.xmits.ecc.thresh@hostbridge<>;
-
-prop error.io.cpu.ecc.thresh@cpu[cpuid] (1)->
- ereport.io.xmits.ecc.pce@hostbridge<>
- {((payloadprop("ecc-afsr") >> AGENT_ID_SHIFT) & AGENT_ID_MASK) == cpuid};
-
-event fault.io.hbus@hostbridge,
- FITrate=HBUS_FIT, FRU=hostbridge, ASRU=hostbridge;
-
-/*
- * A faulty host bus may cause:
- *
- * - ape: address parity error.
- * - pue: PIO uncorrectable error.
- * - s-pue: secondary PIO UE.
- * - ecc: multiple PIO CEs.
- */
-prop fault.io.hbus@hostbridge (0)->
- ereport.io.xmits.saf.ape@hostbridge,
- ereport.io.xmits.ecc.pue@hostbridge,
- ereport.io.xmits.ecc.s-pue@hostbridge,
- error.io.xmits.ecc.thresh@hostbridge;
-
-/*
- * A defective PCI driver may cause:
- *
- * - um: safari unmapped address error.
- * - mmu: a iommu translation error.
- */
-event error.io.pci.badreq-pw-u@hostbridge/pcibus/pcidev/pcifn;
-event error.io.pci.badreq-drw-u@hostbridge/pcibus/pcidev/pcifn;
-
-event ereport.io.xmits.mmu@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.xmits.saf.um@hostbridge{within(5s)};
-event ereport.io.pci.rserr@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-
-prop error.io.pci.badreq-pw-u@hostbridge/pcibus/pcidev/pcifn (0)->
- ereport.io.xmits.saf.um@hostbridge;
-
-prop error.io.pci.badreq-pw-u@hostbridge/pcibus/pcidev/pcifn (0)->
- ereport.io.xmits.mmu@PCI_HB_DEV_PATH;
-
-prop error.io.pci.badreq-drw-u@hostbridge/pcibus/pcidev/pcifn (0)->
- ereport.io.xmits.saf.um@hostbridge;
-
-prop error.io.pci.badreq-drw-u@hostbridge/pcibus/pcidev/pcifn (0)->
- ereport.io.xmits.mmu@PCI_HB_DEV_PATH;
-
-event defect.io.pci.driver@hostbridge;
-
-/*
- * A defective PCI nexus driver may cause:
- *
- * - stmmu: A streaming DMA split completion transaction
- * encounters an MMU error.
- * - cnmmu: A consistant DMA split completion transaction
- * encounters an MMU error.
- */
-prop defect.io.pci.driver@hostbridge (0)->
- ereport.io.xmits.pbmx.stmmu@PCI_HB_DEV_PATH,
- ereport.io.xmits.pbmx.cnmmu@PCI_HB_DEV_PATH;
-
-fru pcibus;
-asru pcibus;
-
-event fault.io.pci.bus@hostbridge/pcibus,
- FITrate=PCI_BUS_FIT, FRU=pcibus, ASRU=pcibus;
-
-event ereport.io.xmits.bu@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.xmits.s-bu@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-
-/*
- * A faulty PCI bus may cause:
- *
- * - bu: PCI bus unusable error.
- * - s-bu: secondary PCI bus unusable error.
- * - tato: DMA split completion target timeout error
- */
-prop fault.io.pci.bus@hostbridge/pcibus (0)->
- ereport.io.xmits.bu@PCI_HB_DEV_PATH,
- ereport.io.xmits.s-bu@PCI_HB_DEV_PATH,
- ereport.io.xmits.pbmx.tato@PCI_HB_DEV_PATH;
-
-fru pcibus/pcidev;
-asru pcibus/pcidev/pcifn;
-
-event fault.io.pci.device-interr@hostbridge/pcibus/pcidev/pcifn,
- FITrate=PCI_DEV_FIT, FRU=pcibus/pcidev, ASRU=pcibus/pcidev/pcifn;
-
-event fault.io.pci.device-interr@pcibus/pcidev/pcifn,
- FITrate=PCI_DEV_FIT, FRU=pcibus/pcidev, ASRU=pcibus/pcidev/pcifn;
-
-event error.io.xmits.pbm.rl@hostbridge/pcibus/pcidev/pcifn;
-event error.io.xmits.pbm.rl@pcibus/pcidev/pcifn;
-event error.io.xmits.pbm.rl@pcibus/pcidev/pcifn/pcibus/pcidev/pcifn;
-event error.io.xmits.pbm.target-rl@pcibus/pcidev/pcifn;
-event error.io.xmits.pbm.target-rl@pcibus/pcidev/pcifn/pcibus/pcidev/pcifn;
-event error.io.xmits.pbm.tto@hostbridge/pcibus/pcidev/pcifn;
-event error.io.xmits.pbm.target-tto@hostbridge/pcibus/pcidev/pcifn;
-event error.io.xmits.pbm.target-tto@pcibus/pcidev/pcifn;
-event error.io.xmits.pbm.target-tto@pcibus/pcidev/pcifn/pcibus/pcidev/pcifn;
-event error.xmits.cpu.berr@cpu;
-event error.io.pci.ma-u@hostbridge/pcibus/pcidev/pcifn;
-event error.io.pci.perr-pw-u@hostbridge/pcibus/pcidev/pcifn;
-event error.io.pci.perr-dw-u@hostbridge/pcibus/pcidev/pcifn;
-event error.io.pci.dpdata-dr-u@hostbridge/pcibus/pcidev/pcifn;
-event error.io.pci.ta-u@hostbridge/pcibus/pcidev/pcifn;
-event error.io.pci.serr-u@hostbridge/pcibus/pcidev/pcifn;
-event error.io.pci.retry-to-d@hostbridge/pcibus/pcidev/pcifn;
-
-event ereport.io.xmits.sbh@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.xmits.pbm.rl@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.xmits.pbm.tto@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.xmits.pbm.s-rl@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.xmits.pbm.s-tto@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.xmits.pbm.s-ma@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.xmits.pbm.s-rta@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.xmits.pbm.s-mdpe@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.xmits.pbm.target-rl@pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.xmits.pbm.target-tto@pcibus/pcidev/pcifn{within(5s)};
-event ereport.io.pci.sserr@hostbridge/pcibus/pcidev/pcifn{within(5s)};
-event ereport.cpu.ultraSPARC-III.berr@cpu{within(5s)};
-event ereport.cpu.ultraSPARC-IIIplus.berr@cpu{within(5s)};
-event ereport.cpu.ultraSPARC-IV.berr@cpu{within(5s)};
-event ereport.cpu.ultraSPARC-IVplus.berr@cpu{within(5s)};
-
-/*
- * A faulty PCI device may cause:
- *
- * - sbh: a streaming byte hole error.
- * - rl: it to exceed the number retriesfor a transaction.
- * - tto: it to not assert trdy# within the alloted timeout.
- *
- * For rl and tto, there may be a target- ereport on a child device. For rl,
- * there may also be an associated dto - the retry-to-d error propagates into
- * the pci.esc rules to handle this.
- */
-prop fault.io.pci.device-interr@hostbridge/pcibus/pcidev/pcifn (0)->
- ereport.io.xmits.sbh@PCI_HB_DEV_PATH;
-
-prop fault.io.pci.device-interr@pcibus/pcidev[fromdev]/pcifn (0)->
- error.io.xmits.pbm.rl@pcibus/pcidev<todev>/pcifn {
- fromdev == todev && fromdev != 32 },
- error.io.xmits.pbm.target-rl@pcibus/pcidev<todev>/pcifn {
- fromdev == todev && fromdev != 32 };
-
-prop error.io.xmits.pbm.rl@pcibus/pcidev/pcifn/pcibus/pcidev/pcifn (1)->
- error.io.xmits.pbm.rl@pcibus/pcidev/pcifn;
-
-prop error.io.xmits.pbm.rl@hostbridge/pcibus/pcidev/pcifn (1)->
- ereport.io.xmits.pbm.rl@PCI_HB_DEV_PATH,
- ereport.io.xmits.pbm.s-rl@PCI_HB_DEV_PATH;
-
-prop error.io.xmits.pbm.target-rl@pcibus/pcidev/pcifn (1)->
- error.io.xmits.pbm.target-rl@pcibus/pcidev/pcifn/pcibus<>/pcidev<>/pcifn<>;
-
-prop error.io.xmits.pbm.target-rl@pcibus/pcidev/pcifn (0)->
- ereport.io.xmits.pbm.target-rl@pcibus/pcidev/pcifn;
-
-prop error.io.xmits.pbm.rl@hostbridge/pcibus/pcidev/pcifn (0)->
- error.io.pci.retry-to-d@hostbridge/pcibus/pcidev/pcifn;
-
-prop error.io.xmits.pbm.rl@hostbridge/pcibus/pcidev/pcifn (0)->
- error.xmits.cpu.berr@cpu;
-
-prop fault.io.pci.device-interr@hostbridge/pcibus/pcidev[fromdev]/pcifn (0)->
- error.io.xmits.pbm.tto@hostbridge/pcibus/pcidev<todev>/pcifn {
- fromdev == todev && fromdev != 32 };
-
-prop error.io.xmits.pbm.tto@hostbridge/pcibus/pcidev/pcifn (1)->
- ereport.io.xmits.pbm.tto@PCI_HB_DEV_PATH,
- ereport.io.xmits.pbm.s-tto@PCI_HB_DEV_PATH;
-
-prop error.io.xmits.pbm.tto@hostbridge/pcibus/pcidev/pcifn (1)->
- ereport.io.xmits.bu@PCI_HB_DEV_PATH;
-
-prop error.io.xmits.pbm.tto@hostbridge/pcibus/pcidev/pcifn (1)->
- error.io.xmits.pbm.target-tto@hostbridge/pcibus/pcidev/pcifn;
-
-prop error.io.xmits.pbm.target-tto@pcibus/pcidev/pcifn (0)->
- ereport.io.xmits.pbm.target-tto@pcibus/pcidev/pcifn;
-
-prop error.io.xmits.pbm.target-tto@pcibus/pcidev/pcifn (1)->
- error.io.xmits.pbm.target-tto@pcibus/pcidev/pcifn/pcibus<>/pcidev<>/pcifn<>;
-
-/*
- * Need to add the following xmits specific propagations to complete the PCI
- * fault tree. These are to allow propagations to secondary errors and cpu
- * bus errors, and to represent the way the chip can raise both rserr and sserr
- * on detection of SERR#
- */
-prop error.io.pci.ma-u@hostbridge/pcibus/pcidev/pcifn (0)->
- ereport.io.xmits.pbm.s-ma@PCI_HB_DEV_PATH;
-
-prop error.io.pci.ta-u@hostbridge/pcibus/pcidev/pcifn (0)->
- ereport.io.xmits.pbm.s-rta@PCI_HB_DEV_PATH;
-
-prop error.io.pci.perr-dw-u@hostbridge/pcibus/pcidev/pcifn (0)->
- ereport.io.xmits.pbm.s-mdpe@PCI_HB_DEV_PATH;
-
-prop error.io.pci.perr-pw-u@hostbridge/pcibus/pcidev/pcifn (0)->
- ereport.io.xmits.pbm.s-mdpe@PCI_HB_DEV_PATH;
-
-prop error.io.pci.dpdata-dr-u@hostbridge/pcibus/pcidev/pcifn (0)->
- ereport.io.xmits.pbm.s-mdpe@PCI_HB_DEV_PATH;
-
-prop error.io.pci.ta-u@hostbridge/pcibus/pcidev/pcifn (0)->
- error.xmits.cpu.berr@cpu;
-
-prop error.io.pci.dpdata-dr-u@hostbridge/pcibus/pcidev/pcifn (0)->
- error.xmits.cpu.berr@cpu;
-
-prop error.io.pci.ma-u@hostbridge/pcibus/pcidev/pcifn (0)->
- error.xmits.cpu.berr@cpu;
-
-prop error.io.pci.serr-u@hostbridge/pcibus/pcidev/pcifn (1)->
- ereport.io.pci.rserr@PCI_HB_DEV_PATH;
-
-prop error.io.pci.serr-u@hostbridge/pcibus/pcidev/pcifn (0)->
- ereport.io.pci.sserr@PCI_HB_DEV_PATH;
-
-prop error.xmits.cpu.berr@cpu (1)->
- ereport.cpu.ultraSPARC-III.berr@cpu,
- ereport.cpu.ultraSPARC-IIIplus.berr@cpu,
- ereport.cpu.ultraSPARC-IV.berr@cpu,
- ereport.cpu.ultraSPARC-IVplus.berr@cpu;
-
-event error.io.xmits.ecc.drue@hostbridge;
-event ereport.io.xmits.ecc.drue@hostbridge{within(5s)};
-event ereport.io.xmits.nodiag@hostbridge;
-
-/*
- * Upset used to hide ereports that can not be currently diagnosed.
- *
- * The drue error can cause a target abort to be sent onto the
- * pci bus in response to a dma request. We represent this using a device-ta
- * error to propagate into the generic pci.esc rules.
- */
-engine serd.io.xmits.nodiag@hostbridge,
- N=1000, T=1hour, method=persistent,
- trip=ereport.io.xmits.nodiag@hostbridge;
-
-event upset.io.xmits.nodiag@hostbridge,
- engine=serd.io.xmits.nodiag@hostbridge;
-
-prop upset.io.xmits.nodiag@hostbridge (0)->
- ereport.io.xmits.ecc.s-pce@hostbridge,
- error.io.xmits.ecc.drue@hostbridge,
- ereport.io.xmits.nodiag@hostbridge;
-
-prop error.io.xmits.ecc.drue@hostbridge (1)->
- ereport.io.xmits.ecc.drue@hostbridge;
-
-prop error.io.xmits.ecc.drue@hostbridge (0)->
- error.io.pci.device-ta@PCI_HB_DEV_PATH;
diff --git a/usr/src/cmd/fm/eversholt/files/sparc/sun4v/Makefile b/usr/src/cmd/fm/eversholt/files/sparc/sun4v/Makefile
deleted file mode 100644
index f884926bd5..0000000000
--- a/usr/src/cmd/fm/eversholt/files/sparc/sun4v/Makefile
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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.
-#
-#
-
-include ../sun4/Makefile.sun4
-
-EFT_PLAT= sun4v
-SUN4VEFTFILES= n2piu.eft vfncx.eft n2niu_xaui.eft n2niu_xfp.eft zambezi.eft \
-gcpu.eft gmem.eft sp.eft
-EFT_PLAT_FILES= $(SUN4VEFTFILES) $(SUN4EFTFILES)
-
-include ../../Makefile.com
diff --git a/usr/src/cmd/fm/eversholt/files/sparc/sun4v/gcpu.esc b/usr/src/cmd/fm/eversholt/files/sparc/sun4v/gcpu.esc
deleted file mode 100644
index 696567d677..0000000000
--- a/usr/src/cmd/fm/eversholt/files/sparc/sun4v/gcpu.esc
+++ /dev/null
@@ -1,515 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2010 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * eversholt rules for generic-sparc sparc cpu errors.
- *
- * Most propagations are generated by preprocessor macros. The event
- * declarations are deliberately not part of the propagation macros
- * so that we know we have full coverage - propagations defined without
- * events, or events not used in propagations, will produce compiler
- * whinges.
- */
-
-#define DIAGNOSE_ERPT (payloadprop_defined("diagnose") && \
- payloadprop("diagnose") != 0x0)
-
-#define SET_SERDT (!payloadprop_defined("serd_t") || \
- setserdt(payloadprop("serd_t")))
-
-#define SET_SERDN (!payloadprop_defined("serd_n") || \
- setserdn(payloadprop("serd_n")))
-
-#define SET_RATIO \
- ((payloadprop_defined("filter_ratio") && \
- payloadprop("filter_ratio") != 0x0) ? \
- (setserdincrement(payloadprop("filter_ratio"))) : 1)
-
-/*
- * The ereport and fault events are declared at multiple levels:
- * some set of @chip, @core, and @strand resources since this is
- * a generic DE and must be flexible and handle present and future
- * sun4v platforms. For example, one processor may have an L2
- * cache per chip, another may have an L2 per core.
- *
- * For UE errors, faults are produced immediately.
- *
- * For CE errors, the errors are put through a SERD engine. If
- * the SERD engine trips, the fault is produced. SERD engine
- * names are of the format:
- * serd.cpu.generic-sparc.<resource><suffix>
- * Ex: serd.cpu.generic-sparc.chipitlb
- * SERD N/T values are set to default values, but can be
- * overridden via the ereport or the eft.conf file. The
- * order or precedence of the SERD N/T values is:
- * - the 'serd_override' tunable via eft.conf
- * - the 'serd_n' and 'serd_t' payload members in the
- * incoming ereport
- * - the built-in default values
- *
- * The increment rate of the SERD engines can also be
- * controlled via the ereport payload using the 'filter_ratio'
- * payload member. N in incremented by the value of
- * 'filter_ratio' if the payload member is present, 1 otherwise.
- */
-/*
- * Ereport event for cpu errors
- */
-#define ERPT_EVENT(level, leafclass) \
- event ereport.cpu.generic-sparc.leafclass@level { within(1s) }
-
-/*
- * Ereports for uncorrectable cpu errors
- */
-ERPT_EVENT(chip, itlb-uc);
-ERPT_EVENT(core, itlb-uc);
-ERPT_EVENT(strand, itlb-uc);
-ERPT_EVENT(chip, dtlb-uc);
-ERPT_EVENT(core, dtlb-uc);
-ERPT_EVENT(strand, dtlb-uc);
-ERPT_EVENT(chip, icache-uc);
-ERPT_EVENT(core, icache-uc);
-ERPT_EVENT(chip, dcache-uc);
-ERPT_EVENT(core, dcache-uc);
-ERPT_EVENT(chip, ireg-uc);
-ERPT_EVENT(core, ireg-uc);
-ERPT_EVENT(strand, ireg-uc);
-ERPT_EVENT(chip, freg-uc);
-ERPT_EVENT(core, freg-uc);
-ERPT_EVENT(strand, freg-uc);
-ERPT_EVENT(chip, mreg-uc);
-ERPT_EVENT(core, mreg-uc);
-ERPT_EVENT(strand, mreg-uc);
-ERPT_EVENT(chip, l2data-uc);
-ERPT_EVENT(core, l2data-uc);
-ERPT_EVENT(chip, l2tagctl-uc);
-ERPT_EVENT(core, l2tagctl-uc);
-ERPT_EVENT(chip, l3data-uc);
-ERPT_EVENT(core, l3data-uc);
-ERPT_EVENT(chip, l3tagctl-uc);
-ERPT_EVENT(core, l3tagctl-uc);
-ERPT_EVENT(chip, int-mem-ue);
-ERPT_EVENT(core, int-mem-ue);
-ERPT_EVENT(strand, int-mem-ue);
-ERPT_EVENT(chip, gchip-uc);
-ERPT_EVENT(core, gcore-uc);
-ERPT_EVENT(strand, gstrand-uc);
-
-/*
- * Propagations for CPU UE errors
- * A fault is produced immediately for a CPU UE errors.
- */
-#define FLT_CPU_UE(level, erptleaf, fltleaf) \
- event fault.cpu.generic-sparc.fltleaf@level; \
- \
- prop fault.cpu.generic-sparc.fltleaf@level \
- { DIAGNOSE_ERPT } (0)-> \
- ereport.cpu.generic-sparc.erptleaf@level; \
- \
- event upset.cpu.generic-sparc.fltleaf@level; \
- \
- prop upset.cpu.generic-sparc.fltleaf@level \
- { !DIAGNOSE_ERPT } (0)-> \
- ereport.cpu.generic-sparc.erptleaf@level
-
-
-FLT_CPU_UE(chip, itlb-uc, chip-uc);
-FLT_CPU_UE(core, itlb-uc, core-uc);
-FLT_CPU_UE(strand, itlb-uc, strand-uc);
-FLT_CPU_UE(chip, dtlb-uc, chip-uc);
-FLT_CPU_UE(core, dtlb-uc, core-uc);
-FLT_CPU_UE(strand, dtlb-uc, strand-uc);
-FLT_CPU_UE(chip, icache-uc, chip-uc);
-FLT_CPU_UE(core, icache-uc, core-uc);
-FLT_CPU_UE(chip, dcache-uc, chip-uc);
-FLT_CPU_UE(core, dcache-uc, core-uc);
-FLT_CPU_UE(chip, ireg-uc, chip-uc);
-FLT_CPU_UE(core, ireg-uc, core-uc);
-FLT_CPU_UE(strand, ireg-uc, strand-uc);
-FLT_CPU_UE(chip, mreg-uc, chip-uc);
-FLT_CPU_UE(core, mreg-uc, core-uc);
-FLT_CPU_UE(strand, mreg-uc, strand-uc);
-FLT_CPU_UE(chip, freg-uc, chip-uc);
-FLT_CPU_UE(core, freg-uc, core-uc);
-FLT_CPU_UE(strand, freg-uc, strand-uc);
-FLT_CPU_UE(chip, l2data-uc, chip-uc);
-FLT_CPU_UE(core, l2data-uc, core-uc);
-FLT_CPU_UE(chip, l2tagctl-uc, chip-uc);
-FLT_CPU_UE(core, l2tagctl-uc, core-uc);
-FLT_CPU_UE(chip, l3data-uc, chip-uc);
-FLT_CPU_UE(core, l3data-uc, core-uc);
-FLT_CPU_UE(chip, l3tagctl-uc, chip-uc);
-FLT_CPU_UE(core, l3tagctl-uc, core-uc);
-FLT_CPU_UE(chip, gchip-uc, chip-uc);
-FLT_CPU_UE(core, gcore-uc, core-uc);
-FLT_CPU_UE(strand, gstrand-uc, strand-uc);
-
-
-
-#define FLT_CPU_UE_UNRETIRED(level, erptleaf, fltleaf) \
- event fault.cpu.generic-sparc.fltleaf@level, \
- retire=0; \
- \
- prop fault.cpu.generic-sparc.fltleaf@level \
- { DIAGNOSE_ERPT } (0)-> \
- ereport.cpu.generic-sparc.erptleaf@level; \
- \
- event upset.cpu.generic-sparc.fltleaf@level; \
- \
- prop upset.cpu.generic-sparc.fltleaf@level \
- { !DIAGNOSE_ERPT } (0)-> \
- ereport.cpu.generic-sparc.erptleaf@level
-
-FLT_CPU_UE_UNRETIRED(chip, int-mem-ue, chip-uc-nr);
-FLT_CPU_UE_UNRETIRED(core, int-mem-ue, core-uc-nr);
-FLT_CPU_UE_UNRETIRED(strand, int-mem-ue, strand-uc-nr);
-
-/*
- * Ereport events for corectable errors.
- */
-ERPT_EVENT(chip, itlb);
-ERPT_EVENT(core, itlb);
-ERPT_EVENT(strand, itlb);
-ERPT_EVENT(chip, dtlb);
-ERPT_EVENT(core, dtlb);
-ERPT_EVENT(strand, dtlb);
-ERPT_EVENT(chip, icache);
-ERPT_EVENT(core, icache);
-ERPT_EVENT(chip, dcache);
-ERPT_EVENT(core, dcache);
-ERPT_EVENT(chip, ireg);
-ERPT_EVENT(core, ireg);
-ERPT_EVENT(strand, ireg);
-ERPT_EVENT(chip, freg);
-ERPT_EVENT(core, freg);
-ERPT_EVENT(strand, freg);
-ERPT_EVENT(chip, mreg);
-ERPT_EVENT(core, mreg);
-ERPT_EVENT(strand, mreg);
-ERPT_EVENT(chip, l2data);
-ERPT_EVENT(core, l2data);
-ERPT_EVENT(chip, l2tagctl);
-ERPT_EVENT(core, l2tagctl);
-ERPT_EVENT(chip, l3data);
-ERPT_EVENT(core, l3data);
-ERPT_EVENT(chip, l3tagctl);
-ERPT_EVENT(core, l3tagctl);
-ERPT_EVENT(chip, int-mem);
-ERPT_EVENT(core, int-mem);
-ERPT_EVENT(strand, int-mem);
-ERPT_EVENT(chip, gchip);
-ERPT_EVENT(core, gcore);
-ERPT_EVENT(strand, gstrand);
-
-/*
- * Propagations for CE errors
- * Errors are serded and fault is generated when the SERD engine trips
- * The serd name & the N & T values are set at the running time.
- */
-engine serd.cpu.generic-sparc.core@core, N=8, T=1week;
-engine serd.cpu.generic-sparc.strand@strand, N=8, T=1week;
-
-
-#define FLT_CPU_CE(erptleaf, level, fltleaf, n, t) \
- \
- /* Simple fault event */ \
- event fault.cpu.generic-sparc.fltleaf@level, \
- engine=serd.cpu.generic-sparc.fltleaf@level; \
- \
- /* When the correctable engine trips, diagnose a fault */ \
- prop fault.cpu.generic-sparc.fltleaf@level \
- { DIAGNOSE_ERPT && setserdsuffix("erptleaf") && \
- setserdn(n) && setserdt(t) && SET_SERDN && \
- SET_SERDT && SET_RATIO } (0) -> \
- ereport.cpu.generic-sparc.erptleaf@level; \
- \
- event upset.cpu.generic-sparc.fltleaf@level; \
- \
- prop upset.cpu.generic-sparc.fltleaf@level \
- { !DIAGNOSE_ERPT } (0) -> \
- ereport.cpu.generic-sparc.erptleaf@level
-
-FLT_CPU_CE(itlb, core, core, 8, 1week);
-FLT_CPU_CE(itlb, strand, strand, 8, 1week);
-FLT_CPU_CE(dtlb, core, core, 8, 1week);
-FLT_CPU_CE(dtlb, strand, strand, 8, 1week);
-FLT_CPU_CE(icache, core, core, 8, 1week);
-FLT_CPU_CE(dcache, core, core, 8, 1week);
-FLT_CPU_CE(ireg, core, core, 8, 1week);
-FLT_CPU_CE(ireg, strand, strand, 8, 1week);
-FLT_CPU_CE(freg, core, core, 8, 1week);
-FLT_CPU_CE(freg, strand, strand, 8, 1week);
-FLT_CPU_CE(mreg, core, core, 8, 1week);
-FLT_CPU_CE(mreg, strand, strand, 8, 1week);
-FLT_CPU_CE(l2data, core, core, 8, 1week);
-FLT_CPU_CE(l2tagctl, core, core, 8, 1week);
-FLT_CPU_CE(l3data, core, core, 8, 1week);
-FLT_CPU_CE(l3tagctl, core, core, 8, 1week);
-FLT_CPU_CE(gcore, core, core, 8, 1week);
-FLT_CPU_CE(gstrand, strand, strand, 8, 1week);
-
-engine serd.cpu.generic-sparc.chip-nr@chip, N=8, T=1week;
-engine serd.cpu.generic-sparc.core-nr@core, N=8, T=1week;
-engine serd.cpu.generic-sparc.strand-nr@strand, N=8, T=1week;
-
-#define FLT_CPU_CE_UNRETIRED(erptleaf, level, fltleaf, n, t) \
- \
- /* Simple fault event */ \
- event fault.cpu.generic-sparc.fltleaf@level, \
- retire=0, \
- engine=serd.cpu.generic-sparc.fltleaf@level; \
- \
- /* When the correctable engine trips, diagnose a fault */ \
- prop fault.cpu.generic-sparc.fltleaf@level \
- { DIAGNOSE_ERPT && setserdsuffix("erptleaf") && setserdn(n) && \
- setserdt(t) && SET_SERDN && SET_SERDT && SET_RATIO } (0) -> \
- ereport.cpu.generic-sparc.erptleaf@level; \
- \
- event upset.fault.cpu.generic-sparc.fltleaf@level; \
- \
- prop upset.fault.cpu.generic-sparc.fltleaf@level \
- { !DIAGNOSE_ERPT } (0)-> \
- ereport.cpu.generic-sparc.erptleaf@level
-
-FLT_CPU_CE_UNRETIRED(itlb, chip, chip-nr, 8, 1week);
-FLT_CPU_CE_UNRETIRED(dtlb, chip, chip-nr, 8, 1week);
-FLT_CPU_CE_UNRETIRED(icache, chip, chip-nr, 8, 1week);
-FLT_CPU_CE_UNRETIRED(dcache, chip, chip-nr, 8, 1week);
-FLT_CPU_CE_UNRETIRED(ireg, chip, chip-nr, 8, 1week);
-FLT_CPU_CE_UNRETIRED(freg, chip, chip-nr, 8, 1week);
-FLT_CPU_CE_UNRETIRED(mreg, chip, chip-nr, 8, 1week);
-FLT_CPU_CE_UNRETIRED(l2data, chip, chip-nr, 8, 2h);
-FLT_CPU_CE_UNRETIRED(l2tagctl, chip, chip-nr, 8, 2h);
-FLT_CPU_CE_UNRETIRED(l3data, chip, chip-nr, 8, 2h);
-FLT_CPU_CE_UNRETIRED(l3tagctl, chip, chip-nr, 8, 2h);
-FLT_CPU_CE_UNRETIRED(gchip, chip, chip-nr, 8, 1week);
-FLT_CPU_CE_UNRETIRED(int-mem, chip, chip-nr, 8, 1week);
-FLT_CPU_CE_UNRETIRED(int-mem, core, core-nr, 8, 1week);
-FLT_CPU_CE_UNRETIRED(int-mem, strand, strand-nr, 8, 1week);
-
-/*
- * c2c-link-uc, c2c-prot-uc, c2c-failover errors
- * The detector and sender are faulted immediately.
- * If ereport does not have a sender, all chips are faulted
- */
-
-#define CONTAINS_SENDER (payloadprop_contains("sender", asru(chip)))
-#define HAS_SENDER (payloadprop_defined("sender"))
-#define HAS_C2C_FAULT(c) has_fault(c, "fault.cpu.generic-sparc.c2c")
-#define CONTAINS_DET (payloadprop_contains("detector", asru(chip)))
-
-event ereport.cpu.generic-sparc.c2c-link-uc@chip { within(1s) };
-event ereport.cpu.generic-sparc.c2c-prot-uc@chip { within(1s) };
-event ereport.cpu.generic-sparc.c2c-failover@chip { within(1s) };
-
-event fault.cpu.generic-sparc.c2c-uc@chip, retire=0;
-event fault.cpu.generic-sparc.c2c-failover@chip, retire=0;
-event upset.cpu.generic-sparc.c2c-uc@chip;
-event upset.cpu.generic-sparc.c2c-failover@chip;
-
-prop fault.cpu.generic-sparc.c2c-uc@chip
- { DIAGNOSE_ERPT && CONTAINS_SENDER } (0) ->
- ereport.cpu.generic-sparc.c2c-link-uc@chip<x>;
-
-prop fault.cpu.generic-sparc.c2c-uc@chip
- { DIAGNOSE_ERPT } (0) ->
- ereport.cpu.generic-sparc.c2c-link-uc@chip;
-
-prop fault.cpu.generic-sparc.c2c-uc@chip
- { DIAGNOSE_ERPT && !HAS_SENDER } (0) ->
- ereport.cpu.generic-sparc.c2c-link-uc@chip<x>;
-
-prop fault.cpu.generic-sparc.c2c-uc@chip
- { DIAGNOSE_ERPT && CONTAINS_SENDER } (0) ->
- ereport.cpu.generic-sparc.c2c-prot-uc@chip<x>;
-
-prop fault.cpu.generic-sparc.c2c-uc@chip
- { DIAGNOSE_ERPT } (0) ->
- ereport.cpu.generic-sparc.c2c-prot-uc@chip;
-
-prop fault.cpu.generic-sparc.c2c-uc@chip
- { DIAGNOSE_ERPT && !HAS_SENDER } (0) ->
- ereport.cpu.generic-sparc.c2c-prot-uc@chip<x>;
-
-prop upset.cpu.generic-sparc.c2c-uc@chip
- { !DIAGNOSE_ERPT } (0) ->
- ereport.cpu.generic-sparc.c2c-prot-uc@chip,
- ereport.cpu.generic-sparc.c2c-link-uc@chip;
-
-prop fault.cpu.generic-sparc.c2c-failover@chip
- { DIAGNOSE_ERPT && CONTAINS_SENDER } (0) ->
- ereport.cpu.generic-sparc.c2c-failover@chip<x>;
-
-prop fault.cpu.generic-sparc.c2c-failover@chip
- { DIAGNOSE_ERPT } (0) ->
- ereport.cpu.generic-sparc.c2c-failover@chip;
-
-prop fault.cpu.generic-sparc.c2c-failover@chip
- { DIAGNOSE_ERPT && !HAS_SENDER } (0) ->
- ereport.cpu.generic-sparc.c2c-failover@chip<x>;
-
-prop upset.cpu.generic-sparc.c2c-failover@chip
- { !DIAGNOSE_ERPT } (0) ->
- ereport.cpu.generic-sparc.c2c-failover@chip;
-
-/*
- * c2c-link, c2c-prot. Errors are serded. When the serd trips,
- * the detector & sender will be faulted.
- * If ereport does not have a sender, all chips will be faulted
- * If ereport sender or detector was faulted, discard ereport
- */
-event ereport.cpu.generic-sparc.c2c-link@chip { within(1s) };
-event ereport.cpu.generic-sparc.c2c-prot@chip { within(1s) };
-
-engine serd.cpu.generic-sparc.c2c@chip, N=120, T=30min;
-
-event fault.cpu.generic-sparc.c2c@chip, retire=0,
- engine=serd.cpu.generic-sparc.c2c@chip;
-
-event upset.cpu.generic-sparc.c2c-link@chip;
-event upset.cpu.generic-sparc.c2c_discard@chip;
-
-prop fault.cpu.generic-sparc.c2c@chip
- { DIAGNOSE_ERPT && CONTAINS_SENDER
- && !HAS_C2C_FAULT(asru(chip)) && !HAS_C2C_FAULT(payloadprop("detector"))
- && setserdsuffix("link") && SET_SERDN
- && SET_SERDT && SET_RATIO } (0) ->
- ereport.cpu.generic-sparc.c2c-link@chip<x>;
-
-prop fault.cpu.generic-sparc.c2c@chip
- { DIAGNOSE_ERPT && !HAS_C2C_FAULT(asru(chip))
- && !HAS_C2C_FAULT(payloadprop("sender"))
- && setserdsuffix("link") && SET_SERDN
- && SET_SERDT && SET_RATIO } (0) ->
- ereport.cpu.generic-sparc.c2c-link@chip;
-
-prop fault.cpu.generic-sparc.c2c@chip
- { DIAGNOSE_ERPT && !HAS_SENDER && setserdsuffix("link") &&
- SET_SERDN && SET_SERDT && SET_RATIO } (0) ->
- ereport.cpu.generic-sparc.c2c-link@chip<x>;
-
-prop fault.cpu.generic-sparc.c2c@chip
- { DIAGNOSE_ERPT && CONTAINS_SENDER
- && !HAS_C2C_FAULT(asru(chip)) && !HAS_C2C_FAULT(payloadprop("detector"))
- && setserdsuffix("prot") && SET_SERDN
- && SET_SERDT && SET_RATIO } (0) ->
- ereport.cpu.generic-sparc.c2c-prot@chip<x>;
-
-prop fault.cpu.generic-sparc.c2c@chip
- { DIAGNOSE_ERPT && !HAS_C2C_FAULT(asru(chip))
- && !HAS_C2C_FAULT(payloadprop("sender"))
- && setserdsuffix("prot") && SET_SERDN
- && SET_SERDT && SET_RATIO } (0) ->
- ereport.cpu.generic-sparc.c2c-prot@chip;
-
-prop fault.cpu.generic-sparc.c2c@chip
- { DIAGNOSE_ERPT && !HAS_SENDER && setserdsuffix("prot") &&
- SET_SERDN && SET_SERDT && SET_RATIO } (0) ->
- ereport.cpu.generic-sparc.c2c-prot@chip<x>;
-
-prop upset.cpu.generic-sparc.c2c-link@chip
- { !DIAGNOSE_ERPT } (0) ->
- ereport.cpu.generic-sparc.c2c-prot@chip,
- ereport.cpu.generic-sparc.c2c-link@chip;
-
-prop upset.cpu.generic-sparc.c2c_discard@chip (0) ->
- ereport.cpu.generic-sparc.c2c-link@chip,
- ereport.cpu.generic-sparc.c2c-prot@chip;
-
-/*
- * addr-oob is a firmware error - there is no associated FRU/ASRU
- * and firmware is not represented in topology. Rather than ignore
- * the error, the DE generates a defect with no FRU or ASRU. It
- * is generated @chassis so no location (label) is picked up out
- * of the topology. The associated knowledge article can instruct
- * users what steps to take to address the error.
- */
-fru NULL;
-asru NULL;
-
-event ereport.cpu.generic-sparc.addr-oob@chassis;
-event defect.fw.generic-sparc.addr-oob@chassis,
- ASRU=NULL,
- FRU=NULL;
-event upset.fw.generic-sparc.addr-oob@chassis;
-
-prop defect.fw.generic-sparc.addr-oob@chassis
- { DIAGNOSE_ERPT } (0) ->
- ereport.cpu.generic-sparc.addr-oob@chassis;
-
-prop upset.fw.generic-sparc.addr-oob@chassis
- { !DIAGNOSE_ERPT } (0) ->
- ereport.cpu.generic-sparc.addr-oob@chassis;
-
-event ereport.cpu.generic-sparc.inconsistent@chassis;
-event defect.fw.generic-sparc.erpt-gen@chassis,
- ASRU=NULL,
- FRU=NULL;
-event upset.fw.generic-sparc.erpt-gen@chassis;
-
-prop defect.fw.generic-sparc.erpt-gen@chassis
- { DIAGNOSE_ERPT } (0) ->
- ereport.cpu.generic-sparc.inconsistent@chassis;
-
-prop upset.fw.generic-sparc.erpt-gen@chassis
- { !DIAGNOSE_ERPT } (0) ->
- ereport.cpu.generic-sparc.inconsistent@chassis;
-/*
- * bootbus-prot, bootbus-to and bootbus-par errors. Fault the detector.
- */
-event ereport.cpu.generic-sparc.bootbus-to@chip;
-event ereport.cpu.generic-sparc.bootbus-par@chip;
-event ereport.cpu.generic-sparc.bootbus-prot@chip;
-event upset.cpu.generic-sparc.bootbus@chip;
-
-event fault.cpu.generic-sparc.bootbus@chip, retire=0;
-
-prop fault.cpu.generic-sparc.bootbus@chip
- { DIAGNOSE_ERPT } (0) ->
- ereport.cpu.generic-sparc.bootbus-to@chip;
-
-prop fault.cpu.generic-sparc.bootbus@chip
- { DIAGNOSE_ERPT } (0) ->
- ereport.cpu.generic-sparc.bootbus-par@chip;
-
-prop fault.cpu.generic-sparc.bootbus@chip
- { DIAGNOSE_ERPT } (0) ->
- ereport.cpu.generic-sparc.bootbus-prot@chip;
-
-prop upset.cpu.generic-sparc.bootbus@chip
- { !DIAGNOSE_ERPT } (0) ->
- ereport.cpu.generic-sparc.bootbus-to@chip,
- ereport.cpu.generic-sparc.bootbus-par@chip,
- ereport.cpu.generic-sparc.bootbus-prot@chip;
-
-/*
- * ignore the pio-read error.
- */
-event ereport.cpu.generic-sparc.pio-read@chip;
-event upset.cpu.generic-sparc.discard@chip;
-
-prop upset.cpu.generic-sparc.discard@chip (0) ->
- ereport.cpu.generic-sparc.pio-read@chip;
diff --git a/usr/src/cmd/fm/eversholt/files/sparc/sun4v/gmem.esc b/usr/src/cmd/fm/eversholt/files/sparc/sun4v/gmem.esc
deleted file mode 100644
index 8c322272da..0000000000
--- a/usr/src/cmd/fm/eversholt/files/sparc/sun4v/gmem.esc
+++ /dev/null
@@ -1,478 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2010 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#define DIAGNOSE_ERPT (payloadprop_defined("diagnose") && \
- payloadprop("diagnose") != 0x0)
-
-#define DIMMPATH dimm
-
-#define CONTAINS_DIMM (payloadprop_contains("resource", asru(DIMMPATH)))
-
-#define SET_ADDR (!payloadprop_defined("phys-addr") || \
- setpayloadprop("physaddr", payloadprop("phys-addr")))
-
-#define SET_OFFSET (!payloadprop_defined("offset") || \
- setpayloadprop("offset",\
- payloadprop("offset")))
-
-#define SET_SERDT (!payloadprop_defined("serd_t") || \
- setserdt(payloadprop("serd_t")))
-
-#define SET_SERDN (!payloadprop_defined("serd_n") || \
- setserdn(payloadprop("serd_n")))
-
-#define SET_RATIO \
- ((payloadprop_defined("filter_ratio") && \
- payloadprop("filter_ratio") != 0x0) ? \
- (setserdincrement(payloadprop("filter_ratio"))) : 1)
-
-/*
- * fault.memory.generic-sparc.bank & fault.memory.generic-sparc.page
- * are generated for memory ue error.
- */
-#define MEMUE_ERPT(level) \
- event ereport.cpu.generic-sparc.mem-uc@level { within(1s)}
-
-MEMUE_ERPT(chip);
-MEMUE_ERPT(core);
-MEMUE_ERPT(strand);
-
-#define FLT_MEM_UE_BANK(level) \
- event fault.memory.bank@DIMMPATH; \
- \
- prop fault.memory.bank@DIMMPATH \
- { DIAGNOSE_ERPT && CONTAINS_DIMM } (0)-> \
- ereport.cpu.generic-sparc.mem-uc@level<>; \
- \
- event upset.memory.bank@DIMMPATH; \
- \
- prop upset.memory.bank@DIMMPATH \
- { !DIAGNOSE_ERPT } (0)-> \
- ereport.cpu.generic-sparc.mem-uc@level<>
-
-FLT_MEM_UE_BANK(chip);
-FLT_MEM_UE_BANK(core);
-FLT_MEM_UE_BANK(strand);
-
-#define FLT_MEM_UE_PAGE(level) \
- event fault.memory.page@DIMMPATH, \
- message=0; \
- \
- prop fault.memory.page@DIMMPATH \
- { DIAGNOSE_ERPT && CONTAINS_DIMM && SET_ADDR && SET_OFFSET } (0)-> \
- ereport.cpu.generic-sparc.mem-uc@level<>; \
- \
- event upset.memory.page@DIMMPATH; \
- \
- prop upset.memory.page@DIMMPATH \
- { !DIAGNOSE_ERPT } (0)-> \
- ereport.cpu.generic-sparc.mem-uc@level<>
-
-FLT_MEM_UE_PAGE(chip);
-FLT_MEM_UE_PAGE(core);
-FLT_MEM_UE_PAGE(strand);
-
-
-#define CHIP chip
-#define MEM_BUFF memory-buffer
-#define MEM_CTRL memory-controller
-
-#define CONTAINS_CHIP (payloadprop_contains("sender", asru(CHIP)))
-#define CONTAINS_MEMBUFF (payloadprop_contains("sender", asru(MEM_BUFF)))
-#define CONTAINS_MEMCTRL (payloadprop_contains("sender", asru(MEM_CTRL)))
-
-engine serd.memory.generic-sparc.membuf-crc@CHIP, N=120, T=30min;
-engine serd.memory.generic-sparc.membuf-crc@MEM_BUFF, N=120, T=30min;
-engine serd.memory.generic-sparc.membuf-crc@MEM_CTRL, N=120, T=30min;
-
-
-event fault.memory.memlink@CHIP,
- engine=serd.memory.generic-sparc.membuf-crc@CHIP;
-event fault.memory.memlink@MEM_BUFF,
- engine=serd.memory.generic-sparc.membuf-crc@MEM_BUFF;
-event fault.memory.memlink@MEM_CTRL,
- engine=serd.memory.generic-sparc.membuf-crc@MEM_CTRL;
-
-/*
- * 1. if ereport has both sender & detector: membuf-crc errors will fault
- * both detector & sender.
- * - if detector is chip or memory-controller, the sender is memory-buffer.
- * - if detector is memory-buffer, the sender is chip or memory-controller
- * 2. if ereport does not have sender:
- * - if detector is chip, sender is memory-buffer
- * - if detector is memory-controller, sender is memory-buffer
- * - if detector is memory-buffer:
- * + if topology is chip/memory-buffer, sender is chip
- * + if topology is memory-controller/memory-buffer, sender is
- * memory-controller.
- */
-
-#define HAS_SENDER (payloadprop_defined("sender"))
-
-event ereport.cpu.generic-sparc.membuf-crc@CHIP { within(1s) };
-event ereport.cpu.generic-sparc.membuf-crc@MEM_BUFF { within(1s) };
-event ereport.cpu.generic-sparc.membuf-crc@MEM_CTRL { within(1s) };
-
-/*
- * detector is chip and ereport has a sender
- */
-prop fault.memory.memlink@CHIP
- { DIAGNOSE_ERPT && SET_SERDN && SET_SERDT && SET_RATIO } (0) ->
- ereport.cpu.generic-sparc.membuf-crc@CHIP;
-
-prop fault.memory.memlink@MEM_BUFF
- { DIAGNOSE_ERPT && CONTAINS_MEMBUFF && SET_SERDN &&
- SET_SERDT && SET_RATIO } (0)->
- ereport.cpu.generic-sparc.membuf-crc@CHIP<>;
-
-/*
- * detector is chip and ereport does not have sender
- */
-engine serd.memory.generic-sparc.membuf-crc@CHIP/MEM_BUFF, N=120, T=30min;
-event fault.memory.memlink@CHIP/MEM_BUFF,
- engine=serd.memory.generic-sparc.membuf-crc@CHIP/MEM_BUFF;
-
-prop fault.memory.memlink@CHIP/MEM_BUFF
- { DIAGNOSE_ERPT && !HAS_SENDER &&
- SET_SERDN && SET_SERDT && SET_RATIO } (0)->
- ereport.cpu.generic-sparc.membuf-crc@CHIP;
-
-event upset.memory.memlink@CHIP;
-
-prop upset.memory.memlink@CHIP
- { !DIAGNOSE_ERPT } (0)->
- ereport.cpu.generic-sparc.membuf-crc@CHIP;
-
-/*
- * detector is memory-buffer and ereport has sender
- */
-prop fault.memory.memlink@MEM_BUFF
- { DIAGNOSE_ERPT && SET_SERDN && SET_SERDT && SET_RATIO } (0) ->
- ereport.cpu.generic-sparc.membuf-crc@MEM_BUFF;
-
-prop fault.memory.memlink@CHIP
- { DIAGNOSE_ERPT && CONTAINS_CHIP && SET_SERDN &&
- SET_SERDT && SET_RATIO } (0) ->
- ereport.cpu.generic-sparc.membuf-crc@MEM_BUFF<>;
-
-prop fault.memory.memlink@MEM_CTRL
- { DIAGNOSE_ERPT && CONTAINS_MEMCTRL && SET_SERDN &&
- SET_SERDT && SET_RATIO } (0)->
- ereport.cpu.generic-sparc.membuf-crc@MEM_BUFF<>;
-
-/*
- * detector is memory-buffer and ereport does not have sender
- */
-event ereport.cpu.generic-sparc.membuf-crc@CHIP/MEM_BUFF { within(1s) };
-event ereport.cpu.generic-sparc.membuf-crc@MEM_CTRL/MEM_BUFF { within(1s) };
-
-prop fault.memory.memlink@CHIP
- { DIAGNOSE_ERPT && !HAS_SENDER &&
- SET_SERDN && SET_SERDT && SET_RATIO } (0) ->
- ereport.cpu.generic-sparc.membuf-crc@CHIP/MEM_BUFF<>;
-
-prop fault.memory.memlink@MEM_CTRL
- { DIAGNOSE_ERPT && !HAS_SENDER &&
- SET_SERDN && SET_SERDT && SET_RATIO } (0) ->
- ereport.cpu.generic-sparc.membuf-crc@MEM_CTRL/MEM_BUFF<>;
-
-event upset.memory.memlink@MEM_BUFF;
-
-prop upset.memory.memlink@MEM_BUFF
- { !DIAGNOSE_ERPT } (0)->
- ereport.cpu.generic-sparc.membuf-crc@MEM_BUFF;
-
-/*
- * detector is memory-controller and ereport has a sender
- */
-prop fault.memory.memlink@MEM_CTRL
- { DIAGNOSE_ERPT && SET_SERDN && SET_SERDT && SET_RATIO } (0)->
- ereport.cpu.generic-sparc.membuf-crc@MEM_CTRL;
-
-prop fault.memory.memlink@MEM_BUFF
- { DIAGNOSE_ERPT && CONTAINS_MEMBUFF && SET_SERDN &&
- SET_SERDT && SET_RATIO } (0)->
- ereport.cpu.generic-sparc.membuf-crc@MEM_CTRL<>;
-
-/*
- * detector is memory-controller and ereport does not have a sender
- */
-engine serd.cpu.generic-sparc.membuf-crc@MEM_CTRL/MEM_BUFF, N=120, T=30min;
-event fault.memory.memlink@MEM_CTRL/MEM_BUFF,
- engine=serd.cpu.generic-sparc.membuf-crc@MEM_CTRL/MEM_BUFF;
-
-prop fault.memory.memlink@MEM_CTRL/MEM_BUFF
- { DIAGNOSE_ERPT && !HAS_SENDER &&
- SET_SERDN && SET_SERDT && SET_RATIO } (0)->
- ereport.cpu.generic-sparc.membuf-crc@MEM_CTRL;
-
-event upset.memory.memlink@MEM_CTRL;
-
-prop upset.memory.memlink@MEM_CTRL
- { !DIAGNOSE_ERPT } (0)->
- ereport.cpu.generic-sparc.membuf-crc@MEM_CTRL;
-
-/*
- * membuf-crc-uc, membuf-other-uc will fault the detector FRU and sender FRU
- * if detector is CHIP or MEM_CTRL, the sender is MEM_BUFF.
- * if detector is MEM_BUFF, the sender is CHIP or MEM_CTRL
- */
-event ereport.cpu.generic-sparc.membuf-crc-uc@CHIP { within(1s) };
-event ereport.cpu.generic-sparc.membuf-crc-uc@MEM_BUFF { within(1s) };
-event ereport.cpu.generic-sparc.membuf-crc-uc@MEM_CTRL { within(1s) };
-
-event ereport.cpu.generic-sparc.membuf-other-uc@CHIP { within(1s) };
-event ereport.cpu.generic-sparc.membuf-other-uc@MEM_BUFF { within(1s) };
-event ereport.cpu.generic-sparc.membuf-other-uc@MEM_CTRL { within(1s) };
-
-event fault.memory.memlink-uc@CHIP;
-event fault.memory.memlink-uc@MEM_BUFF;
-event fault.memory.memlink-uc@MEM_CTRL;
-
-/*
- * chip is detector and ereport has a sender
- */
-prop fault.memory.memlink-uc@CHIP
- { DIAGNOSE_ERPT } (0) ->
- ereport.cpu.generic-sparc.membuf-crc-uc@CHIP,
- ereport.cpu.generic-sparc.membuf-other-uc@CHIP;
-
-prop fault.memory.memlink-uc@MEM_BUFF
- { DIAGNOSE_ERPT && CONTAINS_MEMBUFF } (0) ->
- ereport.cpu.generic-sparc.membuf-crc-uc@CHIP<>,
- ereport.cpu.generic-sparc.membuf-other-uc@CHIP<>;
-
-/*
- * chip is detector and ereport does not have a sender
- */
-event fault.memory.memlink-uc@CHIP/MEM_BUFF;
-
-prop fault.memory.memlink-uc@CHIP/MEM_BUFF
- { DIAGNOSE_ERPT && !HAS_SENDER } (0) ->
- ereport.cpu.generic-sparc.membuf-crc-uc@CHIP,
- ereport.cpu.generic-sparc.membuf-other-uc@CHIP;
-
-event upset.memory.memlink-uc@CHIP;
-
-prop upset.memory.memlink-uc@CHIP
- { !DIAGNOSE_ERPT } (0)->
- ereport.cpu.generic-sparc.membuf-crc-uc@CHIP,
- ereport.cpu.generic-sparc.membuf-other-uc@CHIP;
-
-/*
- * memory-buffer is detector and ereport has a sender
- */
-prop fault.memory.memlink-uc@MEM_BUFF
- { DIAGNOSE_ERPT } (0) ->
- ereport.cpu.generic-sparc.membuf-crc-uc@MEM_BUFF,
- ereport.cpu.generic-sparc.membuf-other-uc@MEM_BUFF;
-
-prop fault.memory.memlink-uc@CHIP
- { DIAGNOSE_ERPT && CONTAINS_CHIP } (0) ->
- ereport.cpu.generic-sparc.membuf-crc-uc@MEM_BUFF<>,
- ereport.cpu.generic-sparc.membuf-other-uc@MEM_BUFF<>;
-
-prop fault.memory.memlink-uc@MEM_CTRL
- { DIAGNOSE_ERPT && CONTAINS_MEMCTRL } (0) ->
- ereport.cpu.generic-sparc.membuf-crc-uc@MEM_BUFF<>,
- ereport.cpu.generic-sparc.membuf-other-uc@MEM_BUFF<>;
-
-/*
- * memory-buffer is detector and ereport does not have sender
- */
-event ereport.cpu.generic-sparc.membuf-crc-uc@CHIP/MEM_BUFF { within(1s) };
-event ereport.cpu.generic-sparc.membuf-other-uc@CHIP/MEM_BUFF { within(1s) };
-event ereport.cpu.generic-sparc.membuf-crc-uc@MEM_CTRL/MEM_BUFF { within(1s) };
-event ereport.cpu.generic-sparc.membuf-other-uc@MEM_CTRL/MEM_BUFF
- { within(1s) };
-
-prop fault.memory.memlink-uc@CHIP
- { DIAGNOSE_ERPT && !HAS_SENDER } (0) ->
- ereport.cpu.generic-sparc.membuf-crc-uc@CHIP/MEM_BUFF<>,
- ereport.cpu.generic-sparc.membuf-other-uc@CHIP/MEM_BUFF<>;
-
-prop fault.memory.memlink-uc@MEM_CTRL
- { DIAGNOSE_ERPT && !HAS_SENDER } (0) ->
- ereport.cpu.generic-sparc.membuf-crc-uc@MEM_CTRL/MEM_BUFF<>,
- ereport.cpu.generic-sparc.membuf-other-uc@MEM_CTRL/MEM_BUFF<>;
-
-event upset.memory.memlink-uc@MEM_BUFF;
-
-prop upset.memory.memlink-uc@MEM_BUFF
- { !DIAGNOSE_ERPT } (0)->
- ereport.cpu.generic-sparc.membuf-crc-uc@MEM_BUFF,
- ereport.cpu.generic-sparc.membuf-other-uc@MEM_BUFF;
-
-/*
- * memory-controller is detector and ereport has a sender
- */
-prop fault.memory.memlink-uc@MEM_CTRL
- { DIAGNOSE_ERPT } (0) ->
- ereport.cpu.generic-sparc.membuf-crc-uc@MEM_CTRL,
- ereport.cpu.generic-sparc.membuf-other-uc@MEM_CTRL;
-
-prop fault.memory.memlink-uc@MEM_BUFF
- { DIAGNOSE_ERPT && CONTAINS_MEMBUFF } (0) ->
- ereport.cpu.generic-sparc.membuf-crc-uc@MEM_CTRL<>,
- ereport.cpu.generic-sparc.membuf-other-uc@MEM_CTRL<>;
-
-/*
- * memory-controller is detector and ereport does not have sender
- */
-event fault.memory.memlink-uc@MEM_CTRL/MEM_BUFF;
-
-prop fault.memory.memlink-uc@MEM_CTRL/MEM_BUFF
- { DIAGNOSE_ERPT && !HAS_SENDER } (0) ->
- ereport.cpu.generic-sparc.membuf-crc-uc@MEM_CTRL,
- ereport.cpu.generic-sparc.membuf-other-uc@MEM_CTRL;
-
-event upset.memory.memlink-uc@MEM_CTRL;
-
-prop upset.memory.memlink-uc@MEM_CTRL
- { !DIAGNOSE_ERPT } (0)->
- ereport.cpu.generic-sparc.membuf-crc-uc@MEM_CTRL,
- ereport.cpu.generic-sparc.membuf-other-uc@MEM_CTRL;
-
-/*
- * membuf-crc-failover will fault the detector FRU and sender FRU
- * if detector is chip or memory-controller, the sender is memory-buffer.
- * if detector is memory-buffer, the sender is chip or memory-controller
- */
-event ereport.cpu.generic-sparc.membuf-crc-failover@CHIP { within(1s) };
-event ereport.cpu.generic-sparc.membuf-crc-failover@MEM_BUFF
- { within(1s) };
-event ereport.cpu.generic-sparc.membuf-crc-failover@MEM_CTRL
- { within(1s) };
-
-event fault.memory.memlink-failover@CHIP;
-event fault.memory.memlink-failover@MEM_BUFF;
-event fault.memory.memlink-failover@MEM_CTRL;
-
-/*
- * chip is detector and ereport has a sender
- */
-prop fault.memory.memlink-failover@CHIP
- { DIAGNOSE_ERPT } (0) ->
- ereport.cpu.generic-sparc.membuf-crc-failover@CHIP;
-
-prop fault.memory.memlink-failover@MEM_BUFF
- { DIAGNOSE_ERPT && CONTAINS_MEMBUFF } (0) ->
- ereport.cpu.generic-sparc.membuf-crc-failover@CHIP<>;
-
-/*
- * chip is detector and ereport does not have sender
- */
-event fault.memory.memlink-failover@CHIP/MEM_BUFF;
-
-prop fault.memory.memlink-failover@CHIP/MEM_BUFF
- { DIAGNOSE_ERPT && !HAS_SENDER } (0) ->
- ereport.cpu.generic-sparc.membuf-crc-failover@CHIP;
-
-event upset.memory.memlink-failover@CHIP;
-
-prop upset.memory.memlink-failover@CHIP
- { !DIAGNOSE_ERPT } (0)->
- ereport.cpu.generic-sparc.membuf-crc-failover@CHIP;
-/*
- * memory-buffer is detector and ereport has a sender
- */
-prop fault.memory.memlink-failover@MEM_BUFF
- { DIAGNOSE_ERPT } (0) ->
- ereport.cpu.generic-sparc.membuf-crc-failover@MEM_BUFF;
-
-prop fault.memory.memlink-failover@CHIP
- { DIAGNOSE_ERPT && CONTAINS_CHIP } (0) ->
- ereport.cpu.generic-sparc.membuf-crc-failover@MEM_BUFF<>;
-
-prop fault.memory.memlink-failover@MEM_CTRL
- { DIAGNOSE_ERPT && CONTAINS_MEMCTRL } (0) ->
- ereport.cpu.generic-sparc.membuf-crc-failover@MEM_BUFF<>;
-
-/*
- * memory-buffer is detector and ereport does not have sender
- */
-event ereport.cpu.generic-sparc.membuf-crc-failover@CHIP/MEM_BUFF
- { within(1s) };
-event ereport.cpu.generic-sparc.membuf-crc-failover@MEM_CTRL/MEM_BUFF
- { within(1s) };
-
-prop fault.memory.memlink-failover@CHIP
- { DIAGNOSE_ERPT && !HAS_SENDER } (0) ->
- ereport.cpu.generic-sparc.membuf-crc-failover@CHIP/MEM_BUFF<>;
-
-prop fault.memory.memlink-failover@MEM_CTRL
- { DIAGNOSE_ERPT && !HAS_SENDER } (0) ->
- ereport.cpu.generic-sparc.membuf-crc-failover@MEM_CTRL/MEM_BUFF<>;
-
-event upset.memory.memlink-failover@MEM_BUFF;
-
-prop upset.memory.memlink-failover@MEM_BUFF
- { !DIAGNOSE_ERPT } (0)->
- ereport.cpu.generic-sparc.membuf-crc-failover@MEM_BUFF;
-/*
- * memory-controller is detector and ereport has a sender
- */
-prop fault.memory.memlink-failover@MEM_CTRL
- { DIAGNOSE_ERPT } (0) ->
- ereport.cpu.generic-sparc.membuf-crc-failover@MEM_CTRL;
-
-prop fault.memory.memlink-failover@MEM_BUFF
- { DIAGNOSE_ERPT && CONTAINS_MEMBUFF } (0) ->
- ereport.cpu.generic-sparc.membuf-crc-failover@MEM_CTRL<>;
-
-/*
- * memory-controller is detector and ereport does not have sender
- */
-event fault.memory.memlink-failover@MEM_CTRL/MEM_BUFF;
-
-prop fault.memory.memlink-failover@MEM_CTRL/MEM_BUFF
- { DIAGNOSE_ERPT && !HAS_SENDER } (0) ->
- ereport.cpu.generic-sparc.membuf-crc-failover@MEM_CTRL;
-
-event upset.memory.memlink-failover@MEM_CTRL;
-
-prop upset.memory.memlink-failover@MEM_CTRL
- { !DIAGNOSE_ERPT } (0)->
- ereport.cpu.generic-sparc.membuf-crc-failover@MEM_CTRL;
-/*
- * ignore the membuf-other errors
- */
-event ereport.cpu.generic-sparc.membuf-other@CHIP;
-event ereport.cpu.generic-sparc.membuf-other@MEM_BUFF;
-event ereport.cpu.generic-sparc.membuf-other@MEM_CTRL;
-
-event upset.memory.discard@CHIP;
-event upset.memory.discard@MEM_BUFF;
-event upset.memory.discard@MEM_CTRL;
-
-prop upset.memory.discard@CHIP (1)->
- ereport.cpu.generic-sparc.membuf-other@CHIP;
-
-prop upset.memory.discard@MEM_BUFF (1)->
- ereport.cpu.generic-sparc.membuf-other@MEM_BUFF;
-
-prop upset.memory.discard@MEM_CTRL (1)->
- ereport.cpu.generic-sparc.membuf-other@MEM_CTRL;
diff --git a/usr/src/cmd/fm/eversholt/files/sparc/sun4v/n2niu_xaui.esc b/usr/src/cmd/fm/eversholt/files/sparc/sun4v/n2niu_xaui.esc
deleted file mode 100644
index 22583ce334..0000000000
--- a/usr/src/cmd/fm/eversholt/files/sparc/sun4v/n2niu_xaui.esc
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#pragma dictionary "NXGE"
-/*
- * Eversholt rules for a XAUI card connected to the NIU of Niagara2 CPU
- */
-
-#define XAUI_FIT 100
-
-asru niufn;
-fru xaui;
-
-event fault.io.n2.niu-xaui@niufn/xaui,
- FITrate=XAUI_FIT, ASRU=niufn, FRU=xaui;
-
-event error.io.device.nxge.xaui-err@niufn;
-event ereport.io.device.nxge.xaui-err@niufn {within(10s)};
-event ereport.io.service.lost@niufn {within(10s)};
-
-prop fault.io.n2.niu-xaui@niufn/xaui (1) ->
- error.io.device.nxge.xaui-err@niufn;
-
-prop error.io.device.nxge.xaui-err@niufn (2) ->
- ereport.io.device.nxge.xaui-err@niufn,
- ereport.io.service.lost@niufn;
diff --git a/usr/src/cmd/fm/eversholt/files/sparc/sun4v/n2niu_xfp.esc b/usr/src/cmd/fm/eversholt/files/sparc/sun4v/n2niu_xfp.esc
deleted file mode 100644
index 31c5517bf8..0000000000
--- a/usr/src/cmd/fm/eversholt/files/sparc/sun4v/n2niu_xfp.esc
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#pragma dictionary "NXGE"
-/*
- * Eversholt rules for the XFP optical module inserted in the XAUI card,
- * which is connected to the NIU of the Niagara2 CPU
- */
-
-#define XFP_FIT 100
-
-asru niufn;
-fru xaui/xfp;
-
-event fault.io.n2.niu-xfp@niufn/xaui/xfp,
- FITrate=XFP_FIT, ASRU=niufn, FRU=xaui/xfp;
-
-event error.io.device.nxge.xfp-err@niufn;
-event ereport.io.device.nxge.xfp-err@niufn {within(10s)};
-event ereport.io.service.lost@niufn {within(10s)};
-
-
-prop fault.io.n2.niu-xfp@niufn/xaui/xfp (1) ->
- error.io.device.nxge.xfp-err@niufn;
-
-prop error.io.device.nxge.xfp-err@niufn (2) ->
- ereport.io.device.nxge.xfp-err@niufn,
- ereport.io.service.lost@niufn;
-
diff --git a/usr/src/cmd/fm/eversholt/files/sparc/sun4v/n2piu.esc b/usr/src/cmd/fm/eversholt/files/sparc/sun4v/n2piu.esc
deleted file mode 100644
index 70a319b7f5..0000000000
--- a/usr/src/cmd/fm/eversholt/files/sparc/sun4v/n2piu.esc
+++ /dev/null
@@ -1,288 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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.
- */
-
-#pragma dictionary "SUN4V"
-
-/*
- * Eversholt rules for the N2 PIU extention to Fire nexus driver
- */
-#define HB_FIT 400
-#define NONFATAL_COUNT 10
-#define NONFATAL_TIME 1hour
-#define PCIEX_DEV_FIT 1000
-#define LINK_EVENTS_COUNT 10
-#define LINK_EVENTS_TIME 1h
-
-/*
- * Test for primary or secondary ereports
- */
-#define IS_PRIMARY (payloadprop("primary"))
-#define IS_SECONDARY (! payloadprop("primary"))
-
-/*
- * payload: mmu-tfsr
- *
- * Extract the request id, the BDF value, in the MMU TFSR register
- *
- * PRM 2.0, pg 243
- * Request ID: bits 15:0
- *
- * Example:
- * 0x7766554433221100
- * ^^^^
- */
-#define MMU_REQ_ID_BIT_MODULO (1 << 16)
-#define MMU_MATCH_BDF(mmu_tfsr, b, d, f) \
- ( IS_PRIMARY && \
- (((mmu_tfsr) % MMU_REQ_ID_BIT_MODULO) == ((b << 8) | (d << 3) | f)) \
- )
-
-/*
- * Faults, upsets and defects
- */
-/* N2 Asic */
-fru hostbridge/pciexrc;
-asru hostbridge/pciexrc;
-event fault.io.fire.asic@hostbridge/pciexrc,
- FITrate=HB_FIT, FRU=hostbridge/pciexrc, ASRU=hostbridge/pciexrc;
-event fault.io.n2.soc@hostbridge/pciexrc,
- FITrate=HB_FIT, FRU=hostbridge/pciexrc, ASRU=hostbridge/pciexrc;
-event fault.io.n2.crossbar@hostbridge/pciexrc,
- FITrate=HB_FIT, FRU=hostbridge/pciexrc, ASRU=hostbridge/pciexrc;
-event fault.io.n2.dmu@hostbridge/pciexrc,
- FITrate=HB_FIT, FRU=hostbridge/pciexrc, ASRU=hostbridge/pciexrc;
-event fault.io.n2.ncu@hostbridge/pciexrc,
- FITrate=HB_FIT, FRU=hostbridge/pciexrc, ASRU=hostbridge/pciexrc;
-event fault.io.n2.siu@hostbridge/pciexrc,
- FITrate=HB_FIT, FRU=hostbridge/pciexrc, ASRU=hostbridge/pciexrc;
-event fault.io.n2.niu@hostbridge/pciexrc,
- FITrate=HB_FIT, FRU=hostbridge/pciexrc, ASRU=hostbridge/pciexrc;
-
-/* No diagnosis */
-event upset.io.fire.nodiag@hostbridge;
-
-/*
- * Additional "DMC" errors to fire.
- * N2 asic parity error
- */
-event ereport.io.n2.dmu.iotsbdesc_dpe@hostbridge/pciexrc{within(5s)};
-
-/*
- * Additional "PEC" errors to fire.
- */
-event ereport.io.n2.peu.err_sds_los@hostbridge/pciexrc{within(5s)};
-event ereport.io.n2.peu.lwc@hostbridge/pciexrc{within(5s)};
-event ereport.io.n2.peu.nfp@hostbridge/pciexrc{within(5s)};
-
-/*
- * Unique SOC errors to N2
- */
-/* fault.io.n2.soc */
-event ereport.io.n2.soc.ncumondotable@hostbridge/pciexrc{within(5s)};
-event ereport.io.n2.soc.ncuctagce@hostbridge/pciexrc{within(5s)};
-event ereport.io.n2.soc.ncuinttable@hostbridge/pciexrc{within(5s)};
-event ereport.io.n2.soc.ncudataparity@hostbridge/pciexrc{within(5s)};
-
-/* fault.io.n2.crossbar */
-event ereport.io.n2.soc.ncupcxdata@hostbridge/pciexrc{within(5s)};
-event ereport.io.n2.soc.ncudmucredit@hostbridge/pciexrc{within(5s)};
-
-/* fault.io.n2.dmu */
-event ereport.io.n2.soc.siidmuctague@hostbridge/pciexrc{within(5s)};
-event ereport.io.n2.soc.siidmuctagce@hostbridge/pciexrc{within(5s)};
-event ereport.io.n2.soc.siidmuaparity@hostbridge/pciexrc{within(5s)};
-event ereport.io.n2.soc.siidmudparity@hostbridge/pciexrc{within(5s)};
-event ereport.io.n2.soc.dmuinternal@hostbridge/pciexrc;
-
-/* fault.io.n2.ncu */
-event ereport.io.n2.soc.ncupcxue@hostbridge/pciexrc{within(5s)};
-event ereport.io.n2.soc.dmuncucredit@hostbridge/pciexrc{within(5s)};
-event ereport.io.n2.soc.ncumondofifo@hostbridge/pciexrc{within(5s)};
-event ereport.io.n2.soc.ncucpxue@hostbridge/pciexrc{within(5s)};
-event ereport.io.n2.soc.ncudmuue@hostbridge/pciexrc{within(5s)};
-
-/* fault.io.n2.siu */
-event ereport.io.n2.soc.ncuctague@hostbridge/pciexrc{within(5s)};
-event ereport.io.n2.soc.sioctague@hostbridge/pciexrc{within(5s)};
-event ereport.io.n2.soc.dmusiicredit@hostbridge/pciexrc{within(5s)};
-event ereport.io.n2.soc.dmudataparity@hostbridge/pciexrc{within(5s)};
-event ereport.io.n2.soc.sioctagce@hostbridge/pciexrc{within(5s)};
-event ereport.io.n2.soc.dmuctagce@hostbridge/pciexrc{within(5s)};
-event ereport.io.n2.soc.dmuctague@hostbridge/pciexrc{within(5s)};
-
-/* fault.io.n2.niu */
-event ereport.io.n2.soc.siiniuctagce@hostbridge/pciexrc{within(5s)};
-event ereport.io.n2.soc.siiniuctague@hostbridge/pciexrc{within(5s)};
-event ereport.io.n2.soc.siiniuaparity@hostbridge/pciexrc{within(5s)};
-event ereport.io.n2.soc.siiniudparity@hostbridge/pciexrc{within(5s)};
-event ereport.io.n2.soc.niuctague@hostbridge/pciexrc{within(5s)};
-event ereport.io.n2.soc.niuctagce@hostbridge/pciexrc{within(5s)};
-event ereport.io.n2.soc.niudataparity@hostbridge/pciexrc{within(5s)};
-
-/* fault.io.niu/niufn */
-event ereport.io.device.inval_state@niu/niufn{within(5s)};
-event ereport.io.device.no_response@niu/niufn{within(5s)};
-event ereport.io.device.stall@niu/niufn{within(5s)};
-event ereport.io.device.badint_limit@niu/niufn{within(5s)};
-event ereport.io.device.intern_corr@niu/niufn{within(5s)};
-event ereport.io.device.intern_uncorr@niu/niufn{within(5s)};
-event ereport.io.device.nf-device@niu/niufn;
-
-/*
- * Fault at the adjacent node which is right below the Fire ASIC
- */
-event error.io.fire.pec.adjacentnode@hostbridge/pciexrc;
-
-prop error.io.fire.pec.adjacentnode@hostbridge/pciexrc (0) ->
- ereport.io.n2.peu.nfp@hostbridge/pciexrc;
-
-/*
- * DMU N2 asic parity error
- */
-prop fault.io.fire.asic@hostbridge/pciexrc (0)->
- ereport.io.n2.dmu.iotsbdesc_dpe@hostbridge/pciexrc;
-
-/*
- * Surprise remove or serdes los, similar to fire ldn event,
- * don't diag.
- */
-prop upset.io.fire.nodiag@hostbridge (0)->
- ereport.io.n2.peu.err_sds_los@hostbridge/pciexrc,
- ereport.io.n2.peu.lwc@hostbridge/pciexrc;
-
-/* SOC Errors */
-/* fault.io.n2.soc */
-prop fault.io.n2.soc@hostbridge/pciexrc (1)->
- ereport.io.n2.soc.ncumondotable@hostbridge/pciexrc,
- ereport.io.n2.soc.ncuctagce@hostbridge/pciexrc,
- ereport.io.n2.soc.ncuinttable@hostbridge/pciexrc,
- ereport.io.n2.soc.ncudataparity@hostbridge/pciexrc;
-
-/* fault.io.n2.crossbar */
-prop fault.io.n2.crossbar@hostbridge/pciexrc (1)->
- ereport.io.n2.soc.ncudmucredit@hostbridge/pciexrc,
- ereport.io.n2.soc.ncupcxdata@hostbridge/pciexrc;
-
-/* fault.io.n2.dmu */
-prop fault.io.n2.dmu@hostbridge/pciexrc (1)->
- ereport.io.n2.soc.siidmuctague@hostbridge/pciexrc,
- ereport.io.n2.soc.siidmuctagce@hostbridge/pciexrc,
- ereport.io.n2.soc.siidmuaparity@hostbridge/pciexrc,
- ereport.io.n2.soc.siidmudparity@hostbridge/pciexrc,
- ereport.io.n2.soc.dmuinternal@hostbridge/pciexrc;
-
-/* fault.io.n2.ncu */
-prop fault.io.n2.ncu@hostbridge/pciexrc (1)->
- ereport.io.n2.soc.ncupcxue@hostbridge/pciexrc,
- ereport.io.n2.soc.dmuncucredit@hostbridge/pciexrc,
- ereport.io.n2.soc.ncumondofifo@hostbridge/pciexrc,
- ereport.io.n2.soc.ncucpxue@hostbridge/pciexrc,
- ereport.io.n2.soc.ncudmuue@hostbridge/pciexrc;
-
-/* fault.io.n2.siu */
-prop fault.io.n2.siu@hostbridge/pciexrc (1)->
- ereport.io.n2.soc.ncuctague@hostbridge/pciexrc,
- ereport.io.n2.soc.sioctague@hostbridge/pciexrc,
- ereport.io.n2.soc.dmusiicredit@hostbridge/pciexrc,
- ereport.io.n2.soc.dmudataparity@hostbridge/pciexrc,
- ereport.io.n2.soc.sioctagce@hostbridge/pciexrc,
- ereport.io.n2.soc.dmuctagce@hostbridge/pciexrc,
- ereport.io.n2.soc.dmuctague@hostbridge/pciexrc;
-
-/* fault.io.n2.niu */
-prop fault.io.n2.niu@hostbridge/pciexrc (0)->
- ereport.io.n2.soc.siiniuctague@hostbridge/pciexrc,
- ereport.io.n2.soc.siiniuaparity@hostbridge/pciexrc,
- ereport.io.n2.soc.siiniudparity@hostbridge/pciexrc,
- ereport.io.n2.soc.siiniuctagce@hostbridge/pciexrc,
- ereport.io.n2.soc.niuctague@hostbridge/pciexrc,
- ereport.io.n2.soc.niuctagce@hostbridge/pciexrc,
- ereport.io.n2.soc.niudataparity@hostbridge/pciexrc;
-
-/* n2 niu/niufn */
-event error.io.device.f-device@niu/niufn;
-event error.io.device.nf-device@niu/niufn;
-event error.io.service.restored@niu/niufn;
-event ereport.io.service.lost@niu/niufn{within(5s)};
-event ereport.io.service.restored@niu/niufn{within(30s)};
-event ereport.io.service.degraded@niu/niufn{within(5s)};
-event ereport.io.service.unaffected@niu/niufn{within(5s)};
-
-/* fault error propogation */
-prop fault.io.n2.niu@hostbridge/pciexrc (0)->
- error.io.device.f-device@niu/niufn,
- error.io.device.nf-device@niu/niufn;
-
-/* fault.io.niu/niufn */
-prop error.io.service.restored@niu/niufn (1)->
- ereport.io.service.lost@niu/niufn,
- ereport.io.service.degraded@niu/niufn;
-
-prop error.io.service.restored@niu/niufn (1)->
- ereport.io.service.restored@niu/niufn;
-
-prop error.io.device.f-device@niu/niufn (1)->
- ereport.io.device.inval_state@niu/niufn,
- ereport.io.device.no_response@niu/niufn,
- ereport.io.device.stall@niu/niufn,
- ereport.io.device.badint_limit@niu/niufn,
- ereport.io.device.intern_corr@niu/niufn,
- ereport.io.device.intern_uncorr@niu/niufn;
-
-prop error.io.device.f-device@niu/niufn (1)->
- ereport.io.service.lost@niu/niufn,
- ereport.io.service.degraded@niu/niufn;
-
-engine serd.io.device.nonfatal@niu/niufn,
- N=NONFATAL_COUNT, T=NONFATAL_TIME, method=persistent,
- trip=ereport.io.device.nf-device@niu/niufn;
-
-event upset.io.device.nonfatal@niu/niufn,
- engine=serd.io.device.nonfatal@niu/niufn;
-
-prop error.io.device.nf-device@niu/niufn (1)->
- ereport.io.device.nf-device@niu/niufn;
-
-prop error.io.device.nf-device@niu/niufn (0)->
- ereport.io.device.inval_state@niu/niufn,
- ereport.io.device.no_response@niu/niufn,
- ereport.io.device.stall@niu/niufn,
- ereport.io.device.badint_limit@niu/niufn,
- ereport.io.device.intern_corr@niu/niufn,
- ereport.io.device.intern_uncorr@niu/niufn,
- ereport.io.service.unaffected@niu/niufn,
- error.io.service.restored@niu/niufn;
-
-prop upset.io.device.nonfatal@niu/niufn (1)->
- ereport.io.device.inval_state@niu/niufn,
- ereport.io.device.no_response@niu/niufn,
- ereport.io.device.stall@niu/niufn,
- ereport.io.device.badint_limit@niu/niufn,
- ereport.io.device.intern_corr@niu/niufn,
- ereport.io.device.intern_uncorr@niu/niufn;
-
-prop upset.io.device.nonfatal@niu/niufn (1)->
- ereport.io.service.unaffected@niu/niufn,
- error.io.service.restored@niu/niufn;
diff --git a/usr/src/cmd/fm/eversholt/files/sparc/sun4v/sp.esc b/usr/src/cmd/fm/eversholt/files/sparc/sun4v/sp.esc
deleted file mode 100644
index c1f272b244..0000000000
--- a/usr/src/cmd/fm/eversholt/files/sparc/sun4v/sp.esc
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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.
- */
-
-#pragma dictionary "SUN4V"
-
-/*
- * Eversholt rule for a faulted Service Processor
- */
-
-event fault.sp.failed@sp;
-
-event ereport.chassis.sp.unavailable@chassis;
-
-prop fault.sp.failed@sp ->
- ereport.chassis.sp.unavailable@chassis;
diff --git a/usr/src/cmd/fm/eversholt/files/sparc/sun4v/vfncx.esc b/usr/src/cmd/fm/eversholt/files/sparc/sun4v/vfncx.esc
deleted file mode 100644
index 732bbfdfa5..0000000000
--- a/usr/src/cmd/fm/eversholt/files/sparc/sun4v/vfncx.esc
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#pragma dictionary "SUN4V"
-
-/*
- * Eversholt rules for the VF PIU extention to Fire nexus driver
- */
-#define HB_FIT 400
-
-/*
- * Faults, upsets and defects
- */
-/* VF Asic */
-fru hostbridge/pciexrc;
-asru hostbridge/pciexrc;
-event fault.io.vf.ncx@hostbridge/pciexrc,
- FITrate=HB_FIT, FRU=hostbridge/pciexrc, ASRU=hostbridge/pciexrc;
-
-/* fault.io.vf.ncx */
-event ereport.io.vf.ncx.to-fdr@hostbridge/pciexrc{within(0s)};
-event ereport.io.vf.ncx.to-fsr@hostbridge/pciexrc{within(0s)};
-event ereport.io.vf.ncx.fre@hostbridge/pciexrc{within(0s)};
-event ereport.io.vf.ncx.fse@hostbridge/pciexrc{within(0s)};
-event ereport.io.vf.ncx.fde@hostbridge/pciexrc{within(0s)};
-
-/* fault.io.vf.ncx */
-prop fault.io.vf.ncx@hostbridge/pciexrc (1)->
- ereport.io.vf.ncx.to-fdr@hostbridge/pciexrc,
- ereport.io.vf.ncx.to-fsr@hostbridge/pciexrc,
- ereport.io.vf.ncx.fre@hostbridge/pciexrc,
- ereport.io.vf.ncx.fse@hostbridge/pciexrc,
- ereport.io.vf.ncx.fde@hostbridge/pciexrc;
-
diff --git a/usr/src/cmd/fm/eversholt/files/sparc/sun4v/zambezi.esc b/usr/src/cmd/fm/eversholt/files/sparc/sun4v/zambezi.esc
deleted file mode 100644
index 4d3303a3ec..0000000000
--- a/usr/src/cmd/fm/eversholt/files/sparc/sun4v/zambezi.esc
+++ /dev/null
@@ -1,839 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#pragma dictionary "SUN4V"
-
-/*
- * Define FITrates for different types of errors. For the ultrSPARC-T2plus
- * interconnect, they are all defined to provide relative likelihood as
- * actual FITrates are unavailable. We define them here in case more
- * accurate values become available in future.
- */
-#define CPU_CHIP_FIT 400
-#define FPGA_FIT 400
-#define FIRMWARE_HYPERVISOR_FIT 400
-#define FIRMWARE_VBSC_FIT 400
-#define INTERCONNECT_OPU_FIT 400
-#define INTERCONNECT_LFU_F_FIT 400
-#define INTERCONNECT_LFU_U_FIT 400
-#define INTERCONNECT_LFU_C_FIT 400
-#define INTERCONNECT_GPD_FIT 400
-#define INTERCONNECT_ASU_FIT 400
-
-/*
- * Define propogation delays for the ereports.
- *
- * For immediate processing, we specify a very short delay, which seems to
- * work better than 0. For ereports that are to be ignored, we delay longer,
- * 1 second.
- */
-#define IGNORE_DELAY 1s
-#define IMMEDIATE_DELAY 5ms
-#define SERD_DELAY 1ms
-#define RETRAIN_DELAY 5s
-
-
-/*
- * Test for primary or secondary ereports
- */
-#define IS_PRIMARY (payloadprop("primary"))
-#define IS_SECONDARY (! payloadprop("primary"))
-
-
-/*
- * Tests to determine what CHIP is associated with an ereport
- */
-#define MATCH_CPUID(n) (payloadprop("cpu-nodeid") == n)
-
-
-/*
- * SERD values used by the LFU subsystem
- */
-#define LFU_CRC_SERD_N 22
-#define LFU_CRC_SERD_T 30 min
-
-
-/*
- * ASRU and FRU definitions used by this diagnosis engine.
- */
-asru motherboard;
-asru interconnect;
-asru chip;
-fru motherboard;
-fru cpuboard;
-
-
-/*
- * Define the errors that propogate to a CHIP fault.
- */
-event error.cpu.ultraSPARC-T2plus.opu.protocol@chip;
-event error.cpu.ultraSPARC-T2plus.lfu-c.chip@chip;
-event error.cpu.ultraSPARC-T2plus.lfu-f.chip@chip;
-event error.cpu.ultraSPARC-T2plus.lfu-u.chip@chip;
-event error.cpu.ultraSPARC-T2plus.gpd-u.chip@chip;
-event error.cpu.ultraSPARC-T2plus.gpd-c.chip@chip;
-event error.cpu.ultraSPARC-T2plus.asu.protocol@chip;
-
-event fault.cpu.ultraSPARC-T2plus.chip@chip
- FITrate=CPU_CHIP_FIT, ASRU=chip, FRU=cpuboard;
-
-prop fault.cpu.ultraSPARC-T2plus.chip@chip ->
- error.cpu.ultraSPARC-T2plus.opu.protocol@chip,
- error.cpu.ultraSPARC-T2plus.lfu-c.chip@chip,
- error.cpu.ultraSPARC-T2plus.lfu-f.chip@chip,
- error.cpu.ultraSPARC-T2plus.lfu-u.chip@chip,
- error.cpu.ultraSPARC-T2plus.gpd-u.chip@chip,
- error.cpu.ultraSPARC-T2plus.gpd-c.chip@chip,
- error.cpu.ultraSPARC-T2plus.asu.protocol@chip;
-
-
-/*
- * OPU Subsystem
- */
-event ereport.asic.zambezi.opu.ods-ctrl-parity@interconnect
- {within (IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.opu.ods-data-coherent-read@interconnect
- {within (IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.opu.ods-data-coherent-writeback@interconnect
- {within (IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.opu.ods-data-destid@interconnect
- {within (IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.opu.ods-data-parity@interconnect
- {within (IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.opu.oqs-request-bad-nc-type@interconnect
- {within (IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.opu.oqs-request-bad-read-type@interconnect
- {within (IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.opu.oqs-request-bad-writeback-type@interconnect
- {within (IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.opu.oqs-request-duplicate@interconnect
- {within (IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.opu.ors-response-bad-nc-type@interconnect
- {within (IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.opu.ors-response-bad-read-type@interconnect
- {within (IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.opu.ors-response-bad-writeback-type@interconnect
- {within (IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.opu.ors-response-duplicate@interconnect
- {within (IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.opu.ors-response-inconsistent@interconnect
- {within (IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.opu.ors-response-unexpected@interconnect
- {within (IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.opu.ors-timeout-read@interconnect
- {within (IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.opu.ors-timeout-writeback@interconnect
- {within (IMMEDIATE_DELAY)};
-
-
-/*
- * Declare the intermediate errors that will be generated by the ereports
- * in this subsystem. These errors will, in turn, propogate to the
- * appropriate fault.
- */
-event error.asic.ultraSPARC-T2plus.interconnect.opu-u@interconnect;
-event error.asic.ultraSPARC-T2plus.interconnect.opu-c@interconnect;
-
-
-/*
- * This fault is diagnosed for uncorrectible OPU errors
- */
-event fault.asic.ultraSPARC-T2plus.interconnect.opu-u@interconnect
- FITrate=INTERCONNECT_OPU_FIT, ASRU=interconnect, FRU=motherboard;
-
-prop error.asic.ultraSPARC-T2plus.interconnect.opu-u@interconnect ->
- ereport.asic.zambezi.opu.ods-ctrl-parity@interconnect;
-
-prop fault.asic.ultraSPARC-T2plus.interconnect.opu-u@interconnect ->
- error.asic.ultraSPARC-T2plus.interconnect.opu-u@interconnect;
-
-
-/*
- * This fault is diagnosed for correctible OPU errors.
- */
-event fault.asic.ultraSPARC-T2plus.interconnect.opu-c@interconnect
- FITrate=INTERCONNECT_OPU_FIT, ASRU=interconnect, FRU=motherboard;
-
-prop error.asic.ultraSPARC-T2plus.interconnect.opu-c@interconnect ->
- ereport.asic.zambezi.opu.ods-data-parity@interconnect;
-
-prop fault.asic.ultraSPARC-T2plus.interconnect.opu-c@interconnect ->
- error.asic.ultraSPARC-T2plus.interconnect.opu-c@interconnect;
-
-
-/*
- * All of the following ereports are associated with a CHIP. Propogate
- * them to the appropriate error for diagnosis to a CHIP fault, above.
- */
-prop error.cpu.ultraSPARC-T2plus.opu.protocol@chip[chip_num] (0) ->
- ereport.asic.zambezi.opu.ods-data-destid@interconnect
- {MATCH_CPUID(chip_num)},
- ereport.asic.zambezi.opu.ods-data-coherent-read@interconnect
- {MATCH_CPUID(chip_num)},
- ereport.asic.zambezi.opu.ods-data-coherent-writeback@interconnect
- {MATCH_CPUID(chip_num)},
- ereport.asic.zambezi.opu.oqs-request-bad-read-type@interconnect
- {MATCH_CPUID(chip_num)},
- ereport.asic.zambezi.opu.oqs-request-bad-writeback-type@interconnect
- {MATCH_CPUID(chip_num)},
- ereport.asic.zambezi.opu.oqs-request-bad-nc-type@interconnect
- {MATCH_CPUID(chip_num)},
- ereport.asic.zambezi.opu.oqs-request-duplicate@interconnect
- {MATCH_CPUID(chip_num)},
- ereport.asic.zambezi.opu.ors-response-unexpected@interconnect
- {MATCH_CPUID(chip_num)},
- ereport.asic.zambezi.opu.ors-response-duplicate@interconnect
- {MATCH_CPUID(chip_num)},
- ereport.asic.zambezi.opu.ors-response-inconsistent@interconnect
- {MATCH_CPUID(chip_num)},
- ereport.asic.zambezi.opu.ors-response-bad-read-type@interconnect
- {MATCH_CPUID(chip_num)},
- ereport.asic.zambezi.opu.ors-response-bad-writeback-type@interconnect
- {MATCH_CPUID(chip_num)},
- ereport.asic.zambezi.opu.ors-response-bad-nc-type@interconnect
- {MATCH_CPUID(chip_num)},
- ereport.asic.zambezi.opu.ors-timeout-read@interconnect
- {MATCH_CPUID(chip_num)},
- ereport.asic.zambezi.opu.ors-timeout-writeback@interconnect
- {MATCH_CPUID(chip_num)};
-
-
-
-/*
- * LFU Subsystem
- */
-event ereport.asic.zambezi.lfu.crc-error@interconnect
- {within (SERD_DELAY)};
-event ereport.asic.zambezi.lfu.data-invalid-or-unmapped@interconnect
- {within (IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.lfu.electric-idle@interconnect
- {within (RETRAIN_DELAY)};
-event ereport.asic.zambezi.lfu.irq-overflow@interconnect
- {within (IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.lfu.irq-parity@interconnect
- {within (IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.lfu.irq-underflow@interconnect
- {within (IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.lfu.lane-failure-slf@interconnect
- {within (IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.lfu.lane-failure-mlf@interconnect
- {within (IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.lfu.link-down-retrain@interconnect
- {within (RETRAIN_DELAY)};
-event ereport.asic.zambezi.lfu.link-down-retrain-failed@interconnect
- {within (IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.lfu.link-down-second-replay@interconnect
- {within (SERD_DELAY)};
-event ereport.asic.zambezi.lfu.link-training-l05@interconnect
- {within (IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.lfu.link-training-config@interconnect
- {within (IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.lfu.link-training-state@interconnect
- {within (IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.lfu.link-training-testing@interconnect
- {within (IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.lfu.replay-lcf-rcvd-error@interconnect
- {within (RETRAIN_DELAY)};
-event ereport.asic.zambezi.lfu.replay-lcf-sent-error@interconnect
- {within (RETRAIN_DELAY)};
-event ereport.asic.zambezi.lfu.replay-parity@interconnect
- {within (IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.lfu.reply-invalid-or-unmapped@interconnect
- {within (IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.lfu.reply-tid-release-set@interconnect
- {within (IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.lfu.retrain-error-disabled@interconnect
- {within (RETRAIN_DELAY)};
-event ereport.asic.zambezi.lfu.retrain-error-resume-timeout@interconnect
- {within (RETRAIN_DELAY)};
-event ereport.asic.zambezi.lfu.retrain-error-second-crc@interconnect
- {within (RETRAIN_DELAY)};
-event ereport.asic.zambezi.lfu.retrain-failed-disabled@interconnect
- {within (IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.lfu.retrain-failed-resume-timeout@interconnect
- {within (IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.lfu.retrain-failed-second-crc@interconnect
- {within (IMMEDIATE_DELAY)};
-
-/*
- * Declare the intermediate errors that will be generated by the ereports
- * in this subsystem. These errors will, in turn, propogate to the
- * appropriate fault.
- */
-event error.asic.ultraSPARC-T2plus.interconnect.lfu-c@interconnect;
-event error.asic.ultraSPARC-T2plus.interconnect.lfu-f@interconnect;
-event error.asic.ultraSPARC-T2plus.interconnect.lfu-u@interconnect;
-event error.asic.ultraSPARC-T2plus.interconnect.lfu.ignore@interconnect;
-
-
-/*
- * Declare the upsets that may be diagnosed for the LFU subsystem
- */
-event upset.asic.ultraSPARC-T2plus.interconnect.lfu.ignore@interconnect;
-
-
-/*
- * Declare the faults that may be generated for the LFU subsystem.
- */
-event fault.asic.ultraSPARC-T2plus.interconnect.lfu-c@interconnect
- FITrate=INTERCONNECT_LFU_C_FIT, ASRU=interconnect, FRU=motherboard;
-
-event fault.asic.ultraSPARC-T2plus.interconnect.lfu-f@interconnect
- FITrate=INTERCONNECT_LFU_F_FIT, ASRU=interconnect, FRU=motherboard;
-
-event fault.asic.ultraSPARC-T2plus.interconnect.lfu-u@interconnect
- FITrate=INTERCONNECT_LFU_U_FIT, ASRU=interconnect, FRU=motherboard;
-
-/*
- * Define how the intermediate errors propogate to faults for the LFU
- * subsystem.
- */
-prop upset.asic.ultraSPARC-T2plus.interconnect.lfu.ignore@interconnect ->
- error.asic.ultraSPARC-T2plus.interconnect.lfu.ignore@interconnect;
-
-prop fault.asic.ultraSPARC-T2plus.interconnect.lfu-c@interconnect ->
- error.asic.ultraSPARC-T2plus.interconnect.lfu-c@interconnect;
-
-prop fault.asic.ultraSPARC-T2plus.interconnect.lfu-f@interconnect ->
- error.asic.ultraSPARC-T2plus.interconnect.lfu-f@interconnect;
-
-prop fault.asic.ultraSPARC-T2plus.interconnect.lfu-u@interconnect ->
- error.asic.ultraSPARC-T2plus.interconnect.lfu-u@interconnect;
-
-
-/*
- * We want to count CRC errors on each connection between an interconnect
- * and a CHIP. Each interconnect is connected to each CHIP, so we need 16
- * SERD engines (4 interconnects, and 4 CHIPs).
- *
- * The topology does not include interconnect/chip, so we cannot do this
- * automatically. Instead, we explicitly declare 4 sets of serd engine
- * propogations, one for each CHIP, and let eversholt expand to all available
- * interconnects.
- */
-event ereport.asic.ultraSPARC-T2plus.interconnect.lfu.crc-trip0@interconnect;
-event ereport.asic.ultraSPARC-T2plus.interconnect.lfu.crc-trip1@interconnect;
-event ereport.asic.ultraSPARC-T2plus.interconnect.lfu.crc-trip2@interconnect;
-event ereport.asic.ultraSPARC-T2plus.interconnect.lfu.crc-trip3@interconnect;
-
-prop error.asic.ultraSPARC-T2plus.interconnect.lfu-c@interconnect ->
- ereport.asic.ultraSPARC-T2plus.interconnect.lfu.crc-trip0@interconnect,
- ereport.asic.ultraSPARC-T2plus.interconnect.lfu.crc-trip1@interconnect,
- ereport.asic.ultraSPARC-T2plus.interconnect.lfu.crc-trip2@interconnect,
- ereport.asic.ultraSPARC-T2plus.interconnect.lfu.crc-trip3@interconnect;
-
-/*
- * CHIP0 SERD rules
- *
- * These rules create a SERD engine for the connection between each
- * interconnect and CHIP 0.
- */
-engine serd.asic.ultraSPARC-T2plus.interconnect.lfu.chip0@interconnect,
- N=LFU_CRC_SERD_N, T=LFU_CRC_SERD_T, method=persistent,
- trip=ereport.asic.ultraSPARC-T2plus.interconnect.lfu.crc-trip0@interconnect;
-
-event upset.asic.ultraSPARC-T2plus.interconnect.lfu.crc.chip0@interconnect,
- engine=serd.asic.ultraSPARC-T2plus.interconnect.lfu.chip0@interconnect;
-
-event upset.asic.ultraSPARC-T2plus.interconnect.lfu.replay.chip0@interconnect,
- engine=serd.asic.ultraSPARC-T2plus.interconnect.lfu.chip0@interconnect;
-
-prop upset.asic.ultraSPARC-T2plus.interconnect.lfu.crc.chip0@interconnect ->
- ereport.asic.zambezi.lfu.crc-error@interconnect
- {MATCH_CPUID(0)};
-
-prop upset.asic.ultraSPARC-T2plus.interconnect.lfu.replay.chip0@interconnect ->
- ereport.asic.zambezi.lfu.link-down-second-replay@interconnect
- {MATCH_CPUID(0)};
-
-
-/*
- * CHIP1 SERD rules
- *
- * These rules create a SERD engine for the connection between each
- * interconnect and CHIP 1.
- */
-engine serd.asic.ultraSPARC-T2plus.interconnect.lfu.chip1@interconnect,
- N=LFU_CRC_SERD_N, T=LFU_CRC_SERD_T, method=persistent,
- trip=ereport.asic.ultraSPARC-T2plus.interconnect.lfu.crc-trip1@interconnect;
-
-event upset.asic.ultraSPARC-T2plus.interconnect.lfu.crc.chip1@interconnect,
- engine=serd.asic.ultraSPARC-T2plus.interconnect.lfu.chip1@interconnect;
-
-event upset.asic.ultraSPARC-T2plus.interconnect.lfu.replay.chip1@interconnect,
- engine=serd.asic.ultraSPARC-T2plus.interconnect.lfu.chip1@interconnect;
-
-prop upset.asic.ultraSPARC-T2plus.interconnect.lfu.crc.chip1@interconnect ->
- ereport.asic.zambezi.lfu.crc-error@interconnect
- {MATCH_CPUID(1)};
-
-prop upset.asic.ultraSPARC-T2plus.interconnect.lfu.replay.chip1@interconnect ->
- ereport.asic.zambezi.lfu.link-down-second-replay@interconnect
- {MATCH_CPUID(1)};
-
-
-/*
- * CHIP2 SERD rules
- *
- * These rules create a SERD engine for the connection between each
- * interconnect and CHIP 2.
- */
-engine serd.asic.ultraSPARC-T2plus.interconnect.lfu.chip2@interconnect,
- N=LFU_CRC_SERD_N, T=LFU_CRC_SERD_T, method=persistent,
- trip=ereport.asic.ultraSPARC-T2plus.interconnect.lfu.crc-trip2@interconnect;
-
-event upset.asic.ultraSPARC-T2plus.interconnect.lfu.crc.chip2@interconnect,
- engine=serd.asic.ultraSPARC-T2plus.interconnect.lfu.chip2@interconnect;
-
-event upset.asic.ultraSPARC-T2plus.interconnect.lfu.replay.chip2@interconnect,
- engine=serd.asic.ultraSPARC-T2plus.interconnect.lfu.chip2@interconnect;
-
-prop upset.asic.ultraSPARC-T2plus.interconnect.lfu.crc.chip2@interconnect ->
- ereport.asic.zambezi.lfu.crc-error@interconnect
- {MATCH_CPUID(2)};
-
-prop upset.asic.ultraSPARC-T2plus.interconnect.lfu.replay.chip2@interconnect ->
- ereport.asic.zambezi.lfu.link-down-second-replay@interconnect
- {MATCH_CPUID(2)};
-
-
-/*
- * CHIP3 SERD rules
- *
- * These rules create a SERD engine for the connection between each
- * interconnect and CHIP 3.
- */
-engine serd.asic.ultraSPARC-T2plus.interconnect.lfu.chip3@interconnect,
- N=LFU_CRC_SERD_N, T=LFU_CRC_SERD_T, method=persistent,
- trip=ereport.asic.ultraSPARC-T2plus.interconnect.lfu.crc-trip3@interconnect;
-
-event upset.asic.ultraSPARC-T2plus.interconnect.lfu.crc.chip3@interconnect,
- engine=serd.asic.ultraSPARC-T2plus.interconnect.lfu.chip3@interconnect;
-
-event upset.asic.ultraSPARC-T2plus.interconnect.lfu.replay.chip3@interconnect,
- engine=serd.asic.ultraSPARC-T2plus.interconnect.lfu.chip3@interconnect;
-
-prop upset.asic.ultraSPARC-T2plus.interconnect.lfu.crc.chip3@interconnect ->
- ereport.asic.zambezi.lfu.crc-error@interconnect
- {MATCH_CPUID(3)};
-
-prop upset.asic.ultraSPARC-T2plus.interconnect.lfu.replay.chip3@interconnect ->
- ereport.asic.zambezi.lfu.link-down-second-replay@interconnect
- {MATCH_CPUID(3)};
-
-
-/*
- * LFU propogations that generate
- * error.asic.ultraSPARC-T2plus.interconnect.lfu-f@interconnect
- */
-prop error.asic.ultraSPARC-T2plus.interconnect.lfu-f@interconnect ->
- ereport.asic.zambezi.lfu.lane-failure-slf@interconnect;
-
-
-/*
- * LFU propogations that generate
- * error.cpu.ultraSPARC-T2plus.lfu-f.chip@chip
- */
-prop error.cpu.ultraSPARC-T2plus.lfu-f.chip@chip[chip_num] (0) ->
- ereport.asic.zambezi.lfu.lane-failure-slf@interconnect
- {MATCH_CPUID(chip_num)};
-
-
-/*
- * LFU propogations that generate
- * error.cpu.ultrSPARC-T2plus.lfu-u.chip
- */
-prop error.cpu.ultraSPARC-T2plus.lfu-u.chip@chip[chip_num] (0) ->
- ereport.asic.zambezi.lfu.lane-failure-mlf@interconnect
- {MATCH_CPUID(chip_num)},
- ereport.asic.zambezi.lfu.link-training-state@interconnect
- {MATCH_CPUID(chip_num)},
- ereport.asic.zambezi.lfu.link-training-testing@interconnect
- {MATCH_CPUID(chip_num)},
- ereport.asic.zambezi.lfu.link-training-config@interconnect
- {MATCH_CPUID(chip_num)},
- ereport.asic.zambezi.lfu.link-training-l05@interconnect
- {MATCH_CPUID(chip_num)},
- ereport.asic.zambezi.lfu.link-down-retrain-failed@interconnect
- {MATCH_CPUID(chip_num)},
- ereport.asic.zambezi.lfu.retrain-failed-second-crc@interconnect
- {MATCH_CPUID(chip_num)},
- ereport.asic.zambezi.lfu.retrain-failed-resume-timeout@interconnect
- {MATCH_CPUID(chip_num)},
- ereport.asic.zambezi.lfu.retrain-failed-disabled@interconnect
- {MATCH_CPUID(chip_num)};
-
-/*
- * LFU propogations that generate
- * error.asic.ultraSPARC-T2plus.interconnect.lfu-u@interconnect
- */
-prop error.asic.ultraSPARC-T2plus.interconnect.lfu-u@interconnect ->
- ereport.asic.zambezi.lfu.lane-failure-mlf@interconnect,
- ereport.asic.zambezi.lfu.link-training-state@interconnect,
- ereport.asic.zambezi.lfu.link-training-testing@interconnect,
- ereport.asic.zambezi.lfu.link-training-config@interconnect,
- ereport.asic.zambezi.lfu.link-training-l05@interconnect,
- ereport.asic.zambezi.lfu.link-down-retrain-failed@interconnect,
- ereport.asic.zambezi.lfu.retrain-failed-second-crc@interconnect,
- ereport.asic.zambezi.lfu.retrain-failed-resume-timeout@interconnect,
- ereport.asic.zambezi.lfu.retrain-failed-disabled@interconnect,
- ereport.asic.zambezi.lfu.replay-parity@interconnect,
- ereport.asic.zambezi.lfu.irq-parity@interconnect,
- ereport.asic.zambezi.lfu.irq-underflow@interconnect;
-
-/*
- * LFU propogations that generate
- * error.asic.ultraSPARC-T2plus.interconnect.lfu.ignore@interconnect
- */
-prop error.asic.ultraSPARC-T2plus.interconnect.lfu.ignore@interconnect ->
- ereport.asic.zambezi.lfu.link-down-retrain@interconnect,
- ereport.asic.zambezi.lfu.electric-idle@interconnect,
- ereport.asic.zambezi.lfu.retrain-error-resume-timeout@interconnect,
- ereport.asic.zambezi.lfu.retrain-error-second-crc@interconnect,
- ereport.asic.zambezi.lfu.retrain-error-disabled@interconnect,
- ereport.asic.zambezi.lfu.replay-lcf-rcvd-error@interconnect,
- ereport.asic.zambezi.lfu.replay-lcf-sent-error@interconnect;
-
-
-/*
- * LFU propogations that generate
- * error.cpu.ultraSPARC-T2plus.lfu-c.chip@chip
- */
-prop error.cpu.ultraSPARC-T2plus.lfu-c.chip@chip[chip_num] (0) ->
- ereport.asic.ultraSPARC-T2plus.interconnect.lfu.crc-trip0@interconnect
- {chip_num == 0},
- ereport.asic.ultraSPARC-T2plus.interconnect.lfu.crc-trip1@interconnect
- {chip_num == 1},
- ereport.asic.ultraSPARC-T2plus.interconnect.lfu.crc-trip2@interconnect
- {chip_num == 2},
- ereport.asic.ultraSPARC-T2plus.interconnect.lfu.crc-trip3@interconnect
- {chip_num == 3},
- ereport.asic.zambezi.lfu.data-invalid-or-unmapped@interconnect
- {MATCH_CPUID(chip_num)},
- ereport.asic.zambezi.lfu.reply-invalid-or-unmapped@interconnect
- {MATCH_CPUID(chip_num)},
- ereport.asic.zambezi.lfu.reply-tid-release-set@interconnect
- {MATCH_CPUID(chip_num)},
- ereport.asic.zambezi.lfu.irq-overflow@interconnect
- {MATCH_CPUID(chip_num)};
-
-
-/*
- * GPD Subsystem
- */
-event ereport.asic.zambezi.gpd.jtag-access-violation@interconnect
- {within(IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.gpd.jtag-mapped-timeout@interconnect
- {within(IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.gpd.link-access-violation@interconnect
- {within(IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.gpd.link-invalid-read-request@interconnect
- {within(IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.gpd.link-invalid-write-request@interconnect
- {within(IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.gpd.link-mapped-timeout@interconnect
- {within(IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.gpd.link-unexpected-data-rcvd@interconnect
- {within(IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.gpd.link-unexpected-request-rcvd@interconnect
- {within(IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.gpd.link-write-data-bytemask-error@interconnect
- {within(IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.gpd.link-write-data-c2c-set@interconnect
- {within(IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.gpd.link-write-data-chunk-error@interconnect
- {within(IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.gpd.link-write-data-error-bit-set@interconnect
- {within(IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.gpd.link-write-data-timeout@interconnect
- {within(IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.gpd.link-write-request-tid-invalid@interconnect
- {within(IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.gpd.link-write-request-timeout@interconnect
- {within(IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.gpd.link-write-tid-invalid@interconnect
- {within(IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.gpd.lpc-access-violation@interconnect
- {within(IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.gpd.lpc-invalid-abort@interconnect
- {within(IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.gpd.lpc-invalid-cycle-type@interconnect
- {within(IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.gpd.lpc-invalid-start@interconnect
- {within(IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.gpd.lpc-mapped-timeout@interconnect
- {within(IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.gpd.lpc-rw-interleave-error@interconnect
- {within(IMMEDIATE_DELAY)};
-
-/*
- * Declare the intermediate errors that will be generated by the ereports
- * in this subsystem. These errors will, in turn, propogate to the
- * appropriate fault.
- */
-event error.asic.fpga@motherboard;
-event error.asic.ultraSPARC-T2plus.interconnect.gpd@interconnect;
-event error.asic.ultraSPARC-T2plus.interconnect.gpd.ignore@interconnect;
-event error.asic.ultraSPARC-T2plus.interconnect.gpd-c@interconnect;
-event error.asic.ultraSPARC-T2plus.interconnect.gpd-u@interconnect;
-
-
-/*
- * Declare the upsets that may be diagnosed for this subsystem
- */
-event upset.asic.ultraSPARC-T2plus.interconnect.gpd.ignore@interconnect;
-
-
-/*
- * Declare the faults that may be generated for this subsystem.
- */
-event fault.asic.fpga@motherboard
- FITrate=FPGA_FIT, ASRU=motherboard, FRU=motherboard;
-
-event fault.asic.ultraSPARC-T2plus.interconnect.gpd-c@interconnect
- FITrate=INTERCONNECT_GPD_FIT, ASRU=interconnect, FRU=motherboard;
-
-event fault.asic.ultraSPARC-T2plus.interconnect.gpd-u@interconnect
- FITrate=INTERCONNECT_GPD_FIT, ASRU=interconnect, FRU=motherboard;
-
-
-/*
- * Define how the intermediate errors propogate to faults for this subsystem.
- */
-prop fault.asic.fpga@motherboard ->
- error.asic.fpga@motherboard;
-
-prop upset.asic.ultraSPARC-T2plus.interconnect.gpd.ignore@interconnect ->
- error.asic.ultraSPARC-T2plus.interconnect.gpd.ignore@interconnect;
-
-prop fault.asic.ultraSPARC-T2plus.interconnect.gpd-u@interconnect ->
- error.asic.ultraSPARC-T2plus.interconnect.gpd-u@interconnect;
-
-prop fault.asic.ultraSPARC-T2plus.interconnect.gpd-c@interconnect ->
- error.asic.ultraSPARC-T2plus.interconnect.gpd@interconnect,
- error.asic.ultraSPARC-T2plus.interconnect.gpd-c@interconnect;
-
-/*
- * GPD suspect list
- * fault.asic.ultraSPARC-T2plus.interconnect.gpd-u
- * fault.cpu.ultraSPARC-T2plus.chip
- *
- * Events in this list are diagnosed only if they are primary errors.
- * The necessary information is unavailable for secondary errors, so
- * they are logged but not diagnosed.
- */
-prop error.cpu.ultraSPARC-T2plus.gpd-u.chip@chip[chip_num] (0) ->
- ereport.asic.zambezi.gpd.link-write-request-timeout@interconnect
- {IS_PRIMARY && MATCH_CPUID(chip_num)},
- ereport.asic.zambezi.gpd.link-write-data-timeout@interconnect
- {IS_PRIMARY && MATCH_CPUID(chip_num)},
- ereport.asic.zambezi.gpd.link-write-request-tid-invalid@interconnect
- {IS_PRIMARY && MATCH_CPUID(chip_num)},
- ereport.asic.zambezi.gpd.link-unexpected-data-rcvd@interconnect
- {IS_PRIMARY && MATCH_CPUID(chip_num)},
- ereport.asic.zambezi.gpd.link-unexpected-request-rcvd@interconnect
- {IS_PRIMARY && MATCH_CPUID(chip_num)};
-
-prop error.cpu.ultraSPARC-T2plus.gpd-c.chip@chip[chip_num] (0) ->
- ereport.asic.zambezi.gpd.link-write-tid-invalid@interconnect
- {IS_PRIMARY && MATCH_CPUID(chip_num)},
- ereport.asic.zambezi.gpd.link-write-data-chunk-error@interconnect
- {IS_PRIMARY && MATCH_CPUID(chip_num)},
- ereport.asic.zambezi.gpd.link-write-data-c2c-set@interconnect
- {IS_PRIMARY && MATCH_CPUID(chip_num)},
- ereport.asic.zambezi.gpd.link-write-data-error-bit-set@interconnect
- {IS_PRIMARY && MATCH_CPUID(chip_num)},
- ereport.asic.zambezi.gpd.link-invalid-write-request@interconnect
- {IS_PRIMARY && MATCH_CPUID(chip_num)},
- ereport.asic.zambezi.gpd.link-write-data-bytemask-error@interconnect
- {IS_PRIMARY && MATCH_CPUID(chip_num)},
- ereport.asic.zambezi.gpd.link-mapped-timeout@interconnect
- {IS_PRIMARY && MATCH_CPUID(chip_num)},
- ereport.asic.zambezi.gpd.link-access-violation@interconnect
- {IS_PRIMARY && MATCH_CPUID(chip_num)},
- ereport.asic.zambezi.gpd.link-invalid-read-request@interconnect
- {IS_PRIMARY && MATCH_CPUID(chip_num)};
-
-prop error.asic.ultraSPARC-T2plus.interconnect.gpd-u@interconnect ->
- ereport.asic.zambezi.gpd.link-write-request-timeout@interconnect
- {IS_PRIMARY},
- ereport.asic.zambezi.gpd.link-write-data-timeout@interconnect
- {IS_PRIMARY},
- ereport.asic.zambezi.gpd.link-write-request-tid-invalid@interconnect
- {IS_PRIMARY},
- ereport.asic.zambezi.gpd.link-unexpected-data-rcvd@interconnect
- {IS_PRIMARY},
- ereport.asic.zambezi.gpd.link-unexpected-request-rcvd@interconnect
- {IS_PRIMARY};
-
-prop error.asic.ultraSPARC-T2plus.interconnect.gpd.ignore@interconnect ->
- ereport.asic.zambezi.gpd.link-write-request-timeout@interconnect
- {IS_SECONDARY},
- ereport.asic.zambezi.gpd.link-write-data-timeout@interconnect
- {IS_SECONDARY},
- ereport.asic.zambezi.gpd.link-write-request-tid-invalid@interconnect
- {IS_SECONDARY},
- ereport.asic.zambezi.gpd.link-unexpected-data-rcvd@interconnect
- {IS_SECONDARY},
- ereport.asic.zambezi.gpd.link-unexpected-request-rcvd@interconnect
- {IS_SECONDARY},
- ereport.asic.zambezi.gpd.link-write-tid-invalid@interconnect
- {IS_SECONDARY},
- ereport.asic.zambezi.gpd.link-write-data-chunk-error@interconnect
- {IS_SECONDARY},
- ereport.asic.zambezi.gpd.link-write-data-c2c-set@interconnect
- {IS_SECONDARY},
- ereport.asic.zambezi.gpd.link-write-data-error-bit-set@interconnect
- {IS_SECONDARY},
- ereport.asic.zambezi.gpd.link-invalid-write-request@interconnect
- {IS_SECONDARY},
- ereport.asic.zambezi.gpd.link-write-data-bytemask-error@interconnect
- {IS_SECONDARY},
- ereport.asic.zambezi.gpd.link-mapped-timeout@interconnect
- {IS_SECONDARY},
- ereport.asic.zambezi.gpd.link-access-violation@interconnect
- {IS_SECONDARY},
- ereport.asic.zambezi.gpd.link-invalid-read-request@interconnect
- {IS_SECONDARY};
-
-prop error.asic.ultraSPARC-T2plus.interconnect.gpd-c@interconnect ->
- ereport.asic.zambezi.gpd.link-write-tid-invalid@interconnect
- {IS_PRIMARY},
- ereport.asic.zambezi.gpd.link-write-data-chunk-error@interconnect
- {IS_PRIMARY},
- ereport.asic.zambezi.gpd.link-write-data-c2c-set@interconnect
- {IS_PRIMARY},
- ereport.asic.zambezi.gpd.link-write-data-error-bit-set@interconnect
- {IS_PRIMARY},
- ereport.asic.zambezi.gpd.link-invalid-write-request@interconnect
- {IS_PRIMARY},
- ereport.asic.zambezi.gpd.link-write-data-bytemask-error@interconnect
- {IS_PRIMARY},
- ereport.asic.zambezi.gpd.link-mapped-timeout@interconnect
- {IS_PRIMARY},
- ereport.asic.zambezi.gpd.link-access-violation@interconnect
- {IS_PRIMARY},
- ereport.asic.zambezi.gpd.link-invalid-read-request@interconnect
- {IS_PRIMARY};
-
-prop error.asic.ultraSPARC-T2plus.interconnect.gpd@interconnect ->
- ereport.asic.zambezi.gpd.jtag-access-violation@interconnect,
- ereport.asic.zambezi.gpd.jtag-mapped-timeout@interconnect,
- ereport.asic.zambezi.gpd.lpc-mapped-timeout@interconnect,
- ereport.asic.zambezi.gpd.lpc-access-violation@interconnect,
- ereport.asic.zambezi.gpd.lpc-rw-interleave-error@interconnect,
- ereport.asic.zambezi.gpd.lpc-invalid-abort@interconnect,
- ereport.asic.zambezi.gpd.lpc-invalid-start@interconnect,
- ereport.asic.zambezi.gpd.lpc-invalid-cycle-type@interconnect;
-
-prop error.asic.fpga@motherboard (0) ->
- ereport.asic.zambezi.gpd.lpc-invalid-abort@interconnect,
- ereport.asic.zambezi.gpd.lpc-invalid-start@interconnect,
- ereport.asic.zambezi.gpd.lpc-invalid-cycle-type@interconnect;
-
-
-/*
- * ASU Subsystem
- */
-event ereport.asic.zambezi.asu.cam-parity-error@interconnect
- {within(IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.asu.invalid-nc-destid@interconnect
- {within(IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.asu.invalid-tid-cacheable@interconnect
- {within(IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.asu.invalid-tid-non-cacheable@interconnect
- {within(IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.asu.invalid-wb-destid@interconnect
- {within(IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.asu.malformed-wb@interconnect
- {within(IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.asu.pending-ram-parity-error@interconnect
- {within(IMMEDIATE_DELAY)};
-event ereport.asic.zambezi.asu.pending-tid-ram-parity-error@interconnect
- {within(IMMEDIATE_DELAY)};
-
-/*
- * Declare the intermediate errors that will be generated by the ereports
- * in this subsystem. These errors will, in turn, propogate to the
- * appropriate fault.
- */
-event error.asic.ultraSPARC-T2plus.interconnect.asu.ignore@interconnect;
-event error.asic.ultraSPARC-T2plus.interconnect.asu@interconnect;
-
-
-/*
- * Declare the upsets that may be diagnosed for this subsystem
- */
-event upset.asic.ultraSPARC-T2plus.interconnect.asu.ignore@interconnect;
-
-
-/*
- * Declare the faults that may be generated for this subsystem.
- */
-event fault.asic.ultraSPARC-T2plus.interconnect.asu@interconnect
- FITrate=INTERCONNECT_ASU_FIT, ASRU=interconnect, FRU=motherboard;
-
-
-/*
- * Define how the intermediate errors propogate to faults for this subsystem.
- */
-prop upset.asic.ultraSPARC-T2plus.interconnect.asu.ignore@interconnect ->
- error.asic.ultraSPARC-T2plus.interconnect.asu.ignore@interconnect;
-
-prop fault.asic.ultraSPARC-T2plus.interconnect.asu@interconnect ->
- error.asic.ultraSPARC-T2plus.interconnect.asu@interconnect;
-
-
-prop error.cpu.ultraSPARC-T2plus.asu.protocol@chip[chip_num] (0) ->
- ereport.asic.zambezi.asu.invalid-nc-destid@interconnect
- {IS_PRIMARY && MATCH_CPUID(chip_num)},
- ereport.asic.zambezi.asu.invalid-tid-non-cacheable@interconnect
- {IS_PRIMARY && MATCH_CPUID(chip_num)},
- ereport.asic.zambezi.asu.invalid-wb-destid@interconnect
- {IS_PRIMARY && MATCH_CPUID(chip_num)},
- ereport.asic.zambezi.asu.malformed-wb@interconnect
- {IS_PRIMARY && MATCH_CPUID(chip_num)},
- ereport.asic.zambezi.asu.invalid-tid-cacheable@interconnect
- {IS_PRIMARY && MATCH_CPUID(chip_num)};
-
-prop error.asic.ultraSPARC-T2plus.interconnect.asu.ignore@interconnect ->
- ereport.asic.zambezi.asu.invalid-nc-destid@interconnect
- {IS_SECONDARY},
- ereport.asic.zambezi.asu.invalid-tid-non-cacheable@interconnect
- {IS_SECONDARY},
- ereport.asic.zambezi.asu.invalid-wb-destid@interconnect
- {IS_SECONDARY},
- ereport.asic.zambezi.asu.malformed-wb@interconnect
- {IS_SECONDARY},
- ereport.asic.zambezi.asu.invalid-tid-cacheable@interconnect
- {IS_SECONDARY};
-
-prop error.asic.ultraSPARC-T2plus.interconnect.asu@interconnect ->
- ereport.asic.zambezi.asu.pending-ram-parity-error@interconnect,
- ereport.asic.zambezi.asu.pending-tid-ram-parity-error@interconnect,
- ereport.asic.zambezi.asu.cam-parity-error@interconnect;
diff --git a/usr/src/cmd/fm/eversholt/native/sparc/Makefile b/usr/src/cmd/fm/eversholt/native/sparc/Makefile
deleted file mode 100644
index 9af309e868..0000000000
--- a/usr/src/cmd/fm/eversholt/native/sparc/Makefile
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2004 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-include ../../../../Makefile.cmd
-include ../Makefile.com
diff --git a/usr/src/cmd/fm/fmadm/sparc/Makefile b/usr/src/cmd/fm/fmadm/sparc/Makefile
deleted file mode 100644
index 7bca6cefe5..0000000000
--- a/usr/src/cmd/fm/fmadm/sparc/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2004 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-include ../../../Makefile.cmd
-include ../Makefile.com
diff --git a/usr/src/cmd/fm/fmd/sparc/Makefile b/usr/src/cmd/fm/fmd/sparc/Makefile
deleted file mode 100644
index a2e4d5c324..0000000000
--- a/usr/src/cmd/fm/fmd/sparc/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2004 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-include ../../../Makefile.cmd
-include ../Makefile.fmd
diff --git a/usr/src/cmd/fm/fmdump/sparc/Makefile b/usr/src/cmd/fm/fmdump/sparc/Makefile
deleted file mode 100644
index 7bca6cefe5..0000000000
--- a/usr/src/cmd/fm/fmdump/sparc/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2004 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-include ../../../Makefile.cmd
-include ../Makefile.com
diff --git a/usr/src/cmd/fm/fminject/sparc/Makefile b/usr/src/cmd/fm/fminject/sparc/Makefile
deleted file mode 100644
index 7bca6cefe5..0000000000
--- a/usr/src/cmd/fm/fminject/sparc/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2004 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-include ../../../Makefile.cmd
-include ../Makefile.com
diff --git a/usr/src/cmd/fm/fmstat/sparc/Makefile b/usr/src/cmd/fm/fmstat/sparc/Makefile
deleted file mode 100644
index 7bca6cefe5..0000000000
--- a/usr/src/cmd/fm/fmstat/sparc/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2004 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-include ../../../Makefile.cmd
-include ../Makefile.com
diff --git a/usr/src/cmd/fm/fmtopo/sparc/Makefile b/usr/src/cmd/fm/fmtopo/sparc/Makefile
deleted file mode 100644
index 719d6803ef..0000000000
--- a/usr/src/cmd/fm/fmtopo/sparc/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2006 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-include ../../../Makefile.cmd
-include ../Makefile.com
diff --git a/usr/src/cmd/fm/ipmitopo/sparc/Makefile b/usr/src/cmd/fm/ipmitopo/sparc/Makefile
deleted file mode 100644
index 16356f9dd8..0000000000
--- a/usr/src/cmd/fm/ipmitopo/sparc/Makefile
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-include ../../../Makefile.cmd
-include ../Makefile.com
diff --git a/usr/src/cmd/fm/modules/Makefile b/usr/src/cmd/fm/modules/Makefile
index dbdcfd3d13..bf4ddeb680 100644
--- a/usr/src/cmd/fm/modules/Makefile
+++ b/usr/src/cmd/fm/modules/Makefile
@@ -23,22 +23,6 @@
# Use is subject to license terms.
#
-sparc_SUBDIRS = sun4u \
- sun4v \
- SUNW,SPARC-Enterprise \
- SUNW,Netra-CP3060 \
- SUNW,Netra-CP3260 \
- SUNW,Sun-Blade-T6300 \
- SUNW,Sun-Blade-T6320 \
- SUNW,Netra-T5220 \
- SUNW,Sun-Fire-T200 \
- SUNW,Netra-T5440 \
- SUNW,T5140 \
- SUNW,USBRDT-5240 \
- SUNW,SPARC-Enterprise-T5120
-
-i386_SUBDIRS =
-
-SUBDIRS = common $($(MACH)_SUBDIRS)
+SUBDIRS = common
include ../Makefile.subdirs
diff --git a/usr/src/cmd/fm/modules/SUNW,Netra-CP3060/Makefile b/usr/src/cmd/fm/modules/SUNW,Netra-CP3060/Makefile
deleted file mode 100644
index 79eaa7bff8..0000000000
--- a/usr/src/cmd/fm/modules/SUNW,Netra-CP3060/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-SUBDIRS = etm
-
-include ../../Makefile.subdirs
diff --git a/usr/src/cmd/fm/modules/SUNW,Netra-CP3060/etm/Makefile b/usr/src/cmd/fm/modules/SUNW,Netra-CP3060/etm/Makefile
deleted file mode 100644
index e4edf33b64..0000000000
--- a/usr/src/cmd/fm/modules/SUNW,Netra-CP3060/etm/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-PLATFORMS = SUNW,Netra-CP3060
-
-include ../../sun4v/etm/Makefile.etm
diff --git a/usr/src/cmd/fm/modules/SUNW,Netra-CP3060/etm/etm.conf b/usr/src/cmd/fm/modules/SUNW,Netra-CP3060/etm/etm.conf
deleted file mode 100644
index f90226df2c..0000000000
--- a/usr/src/cmd/fm/modules/SUNW,Netra-CP3060/etm/etm.conf
+++ /dev/null
@@ -1,55 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-# transport these FMA events from the domain to the SP
-subscribe fault.cpu.*
-subscribe fault.memory.*
-subscribe fault.io.fire.*
-subscribe fault.io.pci.*
-subscribe fault.io.pciex.*
-subscribe list.repaired
-
-#
-# etm agent properties:
-#
-# On supported systems, ETM can transport SP Alert event messages from the
-# SP to Solaris. SP Alert messages are generated by the Service Processor
-# and indicate various conditions monitored by the SP. The following
-# properties define how those messages are handled by Solaris.
-#
-# etm_alert_console - bool - log messages to system console (default=false)
-# etm_alert_syslogd - bool - log messages to messages file through
-# syslogd (default=true)
-# etm_alert_facility - string - syslog(3C) log facility to use
-# (default=LOG_DAEMON)
-#
-# The "etm_alert_facility" property may only be configured to use
-# LOG_DAEMON (which is the default) or one of LOG_LOCAL[0-7]. For
-# information about the use of local log facilities, refer to syslog(3C),
-# syslogd(8), and syslog.conf(5).
-#
-# Example settings:
-# setprop etm_alert_console true
-# setprop etm_alert_facility LOG_LOCAL0
-#
diff --git a/usr/src/cmd/fm/modules/SUNW,Netra-CP3260/Makefile b/usr/src/cmd/fm/modules/SUNW,Netra-CP3260/Makefile
deleted file mode 100644
index 79eaa7bff8..0000000000
--- a/usr/src/cmd/fm/modules/SUNW,Netra-CP3260/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-SUBDIRS = etm
-
-include ../../Makefile.subdirs
diff --git a/usr/src/cmd/fm/modules/SUNW,Netra-CP3260/etm/Makefile b/usr/src/cmd/fm/modules/SUNW,Netra-CP3260/etm/Makefile
deleted file mode 100644
index 3cec42ef09..0000000000
--- a/usr/src/cmd/fm/modules/SUNW,Netra-CP3260/etm/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-PLATFORMS = SUNW,Netra-CP3260
-
-include ../../sun4v/etm/Makefile.etm
diff --git a/usr/src/cmd/fm/modules/SUNW,Netra-CP3260/etm/etm.conf b/usr/src/cmd/fm/modules/SUNW,Netra-CP3260/etm/etm.conf
deleted file mode 100644
index 301291548c..0000000000
--- a/usr/src/cmd/fm/modules/SUNW,Netra-CP3260/etm/etm.conf
+++ /dev/null
@@ -1,56 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-# transport these FMA events from the domain to the SP
-subscribe fault.cpu.*
-subscribe fault.memory.*
-subscribe fault.io.fire.*
-subscribe fault.io.pci.*
-subscribe fault.io.pciex.*
-subscribe fault.io.n2.*
-subscribe list.repaired
-
-#
-# etm agent properties:
-#
-# On supported systems, ETM can transport SP Alert event messages from the
-# SP to Solaris. SP Alert messages are generated by the Service Processor
-# and indicate various conditions monitored by the SP. The following
-# properties define how those messages are handled by Solaris.
-#
-# etm_alert_console - bool - log messages to system console (default=false)
-# etm_alert_syslogd - bool - log messages to messages file through
-# syslogd (default=true)
-# etm_alert_facility - string - syslog(3C) log facility to use
-# (default=LOG_DAEMON)
-#
-# The "etm_alert_facility" property may only be configured to use
-# LOG_DAEMON (which is the default) or one of LOG_LOCAL[0-7]. For
-# information about the use of local log facilities, refer to syslog(3C),
-# syslogd(8), and syslog.conf(5).
-#
-# Example settings:
-# setprop etm_alert_console true
-# setprop etm_alert_facility LOG_LOCAL0
-#
diff --git a/usr/src/cmd/fm/modules/SUNW,Netra-T5220/Makefile b/usr/src/cmd/fm/modules/SUNW,Netra-T5220/Makefile
deleted file mode 100644
index 79eaa7bff8..0000000000
--- a/usr/src/cmd/fm/modules/SUNW,Netra-T5220/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-SUBDIRS = etm
-
-include ../../Makefile.subdirs
diff --git a/usr/src/cmd/fm/modules/SUNW,Netra-T5220/etm/Makefile b/usr/src/cmd/fm/modules/SUNW,Netra-T5220/etm/Makefile
deleted file mode 100644
index 2e291b1875..0000000000
--- a/usr/src/cmd/fm/modules/SUNW,Netra-T5220/etm/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-PLATFORMS = SUNW,Netra-T5220
-
-include ../../sun4v/etm/Makefile.etm
diff --git a/usr/src/cmd/fm/modules/SUNW,Netra-T5220/etm/etm.conf b/usr/src/cmd/fm/modules/SUNW,Netra-T5220/etm/etm.conf
deleted file mode 100644
index 301291548c..0000000000
--- a/usr/src/cmd/fm/modules/SUNW,Netra-T5220/etm/etm.conf
+++ /dev/null
@@ -1,56 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-# transport these FMA events from the domain to the SP
-subscribe fault.cpu.*
-subscribe fault.memory.*
-subscribe fault.io.fire.*
-subscribe fault.io.pci.*
-subscribe fault.io.pciex.*
-subscribe fault.io.n2.*
-subscribe list.repaired
-
-#
-# etm agent properties:
-#
-# On supported systems, ETM can transport SP Alert event messages from the
-# SP to Solaris. SP Alert messages are generated by the Service Processor
-# and indicate various conditions monitored by the SP. The following
-# properties define how those messages are handled by Solaris.
-#
-# etm_alert_console - bool - log messages to system console (default=false)
-# etm_alert_syslogd - bool - log messages to messages file through
-# syslogd (default=true)
-# etm_alert_facility - string - syslog(3C) log facility to use
-# (default=LOG_DAEMON)
-#
-# The "etm_alert_facility" property may only be configured to use
-# LOG_DAEMON (which is the default) or one of LOG_LOCAL[0-7]. For
-# information about the use of local log facilities, refer to syslog(3C),
-# syslogd(8), and syslog.conf(5).
-#
-# Example settings:
-# setprop etm_alert_console true
-# setprop etm_alert_facility LOG_LOCAL0
-#
diff --git a/usr/src/cmd/fm/modules/SUNW,Netra-T5440/Makefile b/usr/src/cmd/fm/modules/SUNW,Netra-T5440/Makefile
deleted file mode 100644
index 79eaa7bff8..0000000000
--- a/usr/src/cmd/fm/modules/SUNW,Netra-T5440/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-SUBDIRS = etm
-
-include ../../Makefile.subdirs
diff --git a/usr/src/cmd/fm/modules/SUNW,Netra-T5440/etm/Makefile b/usr/src/cmd/fm/modules/SUNW,Netra-T5440/etm/Makefile
deleted file mode 100644
index 82a04dec99..0000000000
--- a/usr/src/cmd/fm/modules/SUNW,Netra-T5440/etm/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-PLATFORMS = SUNW,Netra-T5440
-
-include ../../sun4v/etm/Makefile.etm
diff --git a/usr/src/cmd/fm/modules/SUNW,Netra-T5440/etm/etm.conf b/usr/src/cmd/fm/modules/SUNW,Netra-T5440/etm/etm.conf
deleted file mode 100644
index 463952123c..0000000000
--- a/usr/src/cmd/fm/modules/SUNW,Netra-T5440/etm/etm.conf
+++ /dev/null
@@ -1,58 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-# transport these FMA events from the domain to the SP
-subscribe fault.cpu.*
-subscribe fault.memory.*
-subscribe fault.io.fire.*
-subscribe fault.io.pci.*
-subscribe fault.io.pciex.*
-subscribe fault.io.n2.*
-subscribe fault.io.vf.*
-subscribe fault.asic.ultraSPARC-T2plus.*
-subscribe list.repaired
-
-#
-# etm agent properties:
-#
-# On supported systems, ETM can transport SP Alert event messages from the
-# SP to Solaris. SP Alert messages are generated by the Service Processor
-# and indicate various conditions monitored by the SP. The following
-# properties define how those messages are handled by Solaris.
-#
-# etm_alert_console - bool - log messages to system console (default=false)
-# etm_alert_syslogd - bool - log messages to messages file through
-# syslogd (default=true)
-# etm_alert_facility - string - syslog(3C) log facility to use
-# (default=LOG_DAEMON)
-#
-# The "etm_alert_facility" property may only be configured to use
-# LOG_DAEMON (which is the default) or one of LOG_LOCAL[0-7]. For
-# information about the use of local log facilities, refer to syslog(3C),
-# syslogd(8), and syslog.conf(5).
-#
-# Example settings:
-# setprop etm_alert_console true
-# setprop etm_alert_facility LOG_LOCAL0
-#
diff --git a/usr/src/cmd/fm/modules/SUNW,SPARC-Enterprise-T5120/Makefile b/usr/src/cmd/fm/modules/SUNW,SPARC-Enterprise-T5120/Makefile
deleted file mode 100644
index 79eaa7bff8..0000000000
--- a/usr/src/cmd/fm/modules/SUNW,SPARC-Enterprise-T5120/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-SUBDIRS = etm
-
-include ../../Makefile.subdirs
diff --git a/usr/src/cmd/fm/modules/SUNW,SPARC-Enterprise-T5120/etm/Makefile b/usr/src/cmd/fm/modules/SUNW,SPARC-Enterprise-T5120/etm/Makefile
deleted file mode 100644
index 41a63cd804..0000000000
--- a/usr/src/cmd/fm/modules/SUNW,SPARC-Enterprise-T5120/etm/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-PLATFORMS = SUNW,SPARC-Enterprise-T5120
-
-include ../../sun4v/etm/Makefile.etm
diff --git a/usr/src/cmd/fm/modules/SUNW,SPARC-Enterprise-T5120/etm/etm.conf b/usr/src/cmd/fm/modules/SUNW,SPARC-Enterprise-T5120/etm/etm.conf
deleted file mode 100644
index 301291548c..0000000000
--- a/usr/src/cmd/fm/modules/SUNW,SPARC-Enterprise-T5120/etm/etm.conf
+++ /dev/null
@@ -1,56 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-# transport these FMA events from the domain to the SP
-subscribe fault.cpu.*
-subscribe fault.memory.*
-subscribe fault.io.fire.*
-subscribe fault.io.pci.*
-subscribe fault.io.pciex.*
-subscribe fault.io.n2.*
-subscribe list.repaired
-
-#
-# etm agent properties:
-#
-# On supported systems, ETM can transport SP Alert event messages from the
-# SP to Solaris. SP Alert messages are generated by the Service Processor
-# and indicate various conditions monitored by the SP. The following
-# properties define how those messages are handled by Solaris.
-#
-# etm_alert_console - bool - log messages to system console (default=false)
-# etm_alert_syslogd - bool - log messages to messages file through
-# syslogd (default=true)
-# etm_alert_facility - string - syslog(3C) log facility to use
-# (default=LOG_DAEMON)
-#
-# The "etm_alert_facility" property may only be configured to use
-# LOG_DAEMON (which is the default) or one of LOG_LOCAL[0-7]. For
-# information about the use of local log facilities, refer to syslog(3C),
-# syslogd(8), and syslog.conf(5).
-#
-# Example settings:
-# setprop etm_alert_console true
-# setprop etm_alert_facility LOG_LOCAL0
-#
diff --git a/usr/src/cmd/fm/modules/SUNW,SPARC-Enterprise/Makefile b/usr/src/cmd/fm/modules/SUNW,SPARC-Enterprise/Makefile
deleted file mode 100644
index ecea0e4fb9..0000000000
--- a/usr/src/cmd/fm/modules/SUNW,SPARC-Enterprise/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2006 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-SUBDIRS = event-transport cpumem-retire
-
-include ../../Makefile.subdirs
diff --git a/usr/src/cmd/fm/modules/SUNW,SPARC-Enterprise/cpumem-retire/Makefile b/usr/src/cmd/fm/modules/SUNW,SPARC-Enterprise/cpumem-retire/Makefile
deleted file mode 100644
index 5ca1dfcbbb..0000000000
--- a/usr/src/cmd/fm/modules/SUNW,SPARC-Enterprise/cpumem-retire/Makefile
+++ /dev/null
@@ -1,57 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-PLATFORMS = SUNW,SPARC-Enterprise
-CLASS = plat
-MODULE = cpumem-retire
-
-CPUMEM_RETIRE_COMMON = ../../common/$(MODULE)
-
-INCDIRS += .
-INCDIRS += $(CPUMEM_RETIRE_COMMON)
-
-SRCS = \
- cma_main.c \
- cma_cpu.c \
- cma_cpu_arch.c \
- cma_page.c \
- cma_page_arch.c
-
-include ../../Makefile.plugin
-
-CMA_VERSION = "1.1"
-
-
-LIBDIRS = $(ROOT)/usr/platform/$(PLATFORMS)/lib
-CPPFLAGS += $(INCDIRS:%=-I%) -DCMA_VERSION='$(CMA_VERSION)' -Dopl
-LDFLAGS += -R/usr/lib/fm
-LDLIBS += -L$(ROOTLIB)/fm -lfmd_agent
-
-%.o: $(CPUMEM_RETIRE_COMMON)/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
-%.ln: $(CPUMEM_RETIRE_COMMON)/%.c
- $(LINT.c) -c $<
diff --git a/usr/src/cmd/fm/modules/SUNW,SPARC-Enterprise/cpumem-retire/cpumem-retire.conf b/usr/src/cmd/fm/modules/SUNW,SPARC-Enterprise/cpumem-retire/cpumem-retire.conf
deleted file mode 100644
index 96cef6e863..0000000000
--- a/usr/src/cmd/fm/modules/SUNW,SPARC-Enterprise/cpumem-retire/cpumem-retire.conf
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2006 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#
-# cpumem-retire
-#
-setprop cpu_tries 10
-setprop cpu_delay 1sec
-#
-setprop page_ret_mindelay 1sec
-setprop page_ret_maxdelay 5min
-#
-setprop cpu_offline_enable true
-setprop cpu_forced_offline true
-setprop cpu_blacklist_enable false
-setprop page_retire_enable true
diff --git a/usr/src/cmd/fm/modules/SUNW,SPARC-Enterprise/event-transport/Makefile b/usr/src/cmd/fm/modules/SUNW,SPARC-Enterprise/event-transport/Makefile
deleted file mode 100644
index c9a3f21f3f..0000000000
--- a/usr/src/cmd/fm/modules/SUNW,SPARC-Enterprise/event-transport/Makefile
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2006 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-PLATFORMS = SUNW,SPARC-Enterprise
-
-$(PLATFORMS)_SRCS = ex_dscp.c
-
-LIBDIRS = $(ROOT)/usr/platform/$(PLATFORMS)/lib
-LIBFLAGS = \$$ORIGIN/../../../../lib
-XPORTLIBS = -lsocket -lnsl -ldscp
-
-include ../../common/event-transport/Makefile.etm
-
-CERRWARN += -_gcc=-Wno-parentheses
diff --git a/usr/src/cmd/fm/modules/SUNW,SPARC-Enterprise/event-transport/event-transport.conf b/usr/src/cmd/fm/modules/SUNW,SPARC-Enterprise/event-transport/event-transport.conf
deleted file mode 100644
index 739e04eb72..0000000000
--- a/usr/src/cmd/fm/modules/SUNW,SPARC-Enterprise/event-transport/event-transport.conf
+++ /dev/null
@@ -1,88 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2006 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-#
-# fmd configuration file for the event-transport.so plugin module.
-#
-# The following configuration options are valid:
-#
-# setprop reconnect_timeout <time>
-#
-# Sets the total time spent attempting to connect with a peer
-# after a connection has been lost. Time is in nanoseconds.
-#
-# setprop reconnect_interval <time>
-#
-# Sets the timeout value in between individual reconnection
-# attempts. Time is in nanoseconds.
-#
-# setprop rw_timeout <time>
-#
-# Sets the timeout value for a read or write I/O operation.
-# Time is in nanoseconds.
-#
-# setprop filter_path <path>
-#
-# Specifies the location of a platform-specific filter plugin
-# for incoming and outgoing events. No assumptions are made
-# regarding the relative path or the name of the filter plugin.
-# Therefore, the absolute path and the name of the binary must
-# be used.
-#
-# setprop client_list <FMRI string>
-#
-# Specifies a list of peers this module will accept a
-# connection from.
-#
-# This list may take the following forms:
-#
-# (1) A space-separated list.
-#
-# setprop client_list "dev:///dom0 dev:///dom1 dev:///dom2"
-#
-# (2) An array syntax for a range of endpoints. The following
-# example is equivalent to the previous example.
-#
-# setprop client_list "dev:///dom[0:2]"
-#
-# (3) A combination of both. The following example is
-# equivalent to the previous examples.
-#
-# setprop client_list "dev:///dom0 dev:///dom[1:2]"
-#
-# setprop server_list <FMRI string>
-#
-# Specifies a list of peers this module will initiate a
-# connection to.
-#
-# The syntax of this property is the same as the "client_list"
-# property above.
-#
-# If a peer is found in both client_list and server_list,
-# a connection will not be initiated to the peer, but a
-# connection will be accepted from the peer.
-#
-
-setprop server_list "dev:///sp0"
diff --git a/usr/src/cmd/fm/modules/SUNW,SPARC-Enterprise/event-transport/ex_dscp.c b/usr/src/cmd/fm/modules/SUNW,SPARC-Enterprise/event-transport/ex_dscp.c
deleted file mode 100644
index bae00c6d2c..0000000000
--- a/usr/src/cmd/fm/modules/SUNW,SPARC-Enterprise/event-transport/ex_dscp.c
+++ /dev/null
@@ -1,808 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2010 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * FMA Event Transport Module Transport Layer API implementation.
- *
- * Library for establishing connections and transporting FMA events between
- * ETMs (event-transport modules) in separate fault domains.
- *
- * The transport for this library is internet socket based and uses the DSCP
- * client services library (libdscp).
- */
-
-#include "ex_dscp.h"
-
-/*
- * On the SP, there is one DSCP interface for every domain.
- * Each domain has one and only one DSCP interface to the SP.
- *
- * The DSCP interface is created when the domain powers-on. On the SP,
- * a sysevent will be generated when the DSCP interface is up. On the domain,
- * the DSCP interface should be up when ETM loads.
- */
-
-exs_conn_t Acc; /* Connection for accepting/listening */
-pthread_t Acc_tid; /* Thread ID for accepting conns */
-int Acc_quit; /* Signal to quit the acceptor thread */
-int Acc_destroy; /* Destroy accept/listen thread? */
-exs_hdl_t *Exh_head = NULL; /* Head of ex_hdl_t list */
-pthread_mutex_t List_lock = PTHREAD_MUTEX_INITIALIZER;
- /* Protects linked list of ex_hdl_t */
-static void *Dlp = NULL; /* Handle for dlopen/dlclose/dlsym */
-static int (*Send_filter)(fmd_hdl_t *hdl, nvlist_t *event, const char *dest);
-static int (*Post_filter)(fmd_hdl_t *hdl, nvlist_t *event, const char *src);
-
-/*
- * * * * * * * * * * * * * *
- * Module specific routines
- * * * * * * * * * * * * * *
- */
-
-/*
- * Allocate and initialize a transport instance handle.
- * Return hdl pointer for success, NULL for failure.
- */
-static exs_hdl_t *
-exs_hdl_alloc(fmd_hdl_t *hdl, char *endpoint_id,
- int (*cb_func)(fmd_hdl_t *hdl, etm_xport_conn_t conn, etm_cb_flag_t flag,
- void *arg), void *cb_func_arg, int dom)
-{
- exs_hdl_t *hp;
-
- hp = fmd_hdl_zalloc(hdl, sizeof (exs_hdl_t), FMD_SLEEP);
-
- hp->h_endpt_id = fmd_hdl_strdup(hdl, endpoint_id, FMD_SLEEP);
- hp->h_dom = dom;
- hp->h_client.c_sd = EXS_SD_FREE;
- hp->h_server.c_sd = EXS_SD_FREE;
- hp->h_tid = EXS_TID_FREE;
- hp->h_destroy = 0;
- hp->h_hdl = hdl;
- hp->h_cb_func = cb_func;
- hp->h_cb_func_arg = cb_func_arg;
- hp->h_quit = 0;
-
- return (hp);
-}
-
-/*
- * dlopen() the platform filter library and dlsym() the filter funcs.
- */
-static void
-exs_filter_init(fmd_hdl_t *hdl)
-{
- char *propstr = fmd_prop_get_string(hdl, "filter_path");
-
- if (propstr == NULL) {
- fmd_hdl_debug(hdl, "No filter plugin specified");
- Send_filter = NULL;
- Post_filter = NULL;
- return;
- } else {
- if ((Dlp = dlopen(propstr, RTLD_LOCAL | RTLD_NOW)) == NULL) {
- fmd_hdl_debug(hdl, "Failed to dlopen filter plugin");
- Send_filter = NULL;
- Post_filter = NULL;
- fmd_prop_free_string(hdl, propstr);
- return;
- }
-
- if ((Send_filter = (int (*)())dlsym(Dlp, "send_filter"))
- == NULL) {
- fmd_hdl_debug(hdl, "failed to dlsym send_filter()");
- Send_filter = NULL;
- }
-
- if ((Post_filter = (int (*)())dlsym(Dlp, "post_filter"))
- == NULL) {
- fmd_hdl_debug(hdl, "failed to dlsym post_filter()");
- Post_filter = NULL;
- }
- }
-
- fmd_prop_free_string(hdl, propstr);
-}
-
-/*
- * If open, dlclose() the platform filter library.
- */
-/*ARGSUSED*/
-static void
-exs_filter_fini(fmd_hdl_t *hdl)
-{
- if (Dlp != NULL)
- (void) dlclose(Dlp);
-}
-
-/*
- * Translate endpoint_id string to int.
- * Return the domain ID via "dom_id".
- * Return 0 for success, nonzero for failure
- */
-static int
-exs_get_id(fmd_hdl_t *hdl, char *endpoint_id, int *dom_id)
-{
- char *ptr;
-
- if (strstr(endpoint_id, EXS_SP_PREFIX) != NULL) {
- /* Remote endpoint is the SP */
- *dom_id = DSCP_IDENT_SP;
- return (0);
- } else {
- if ((ptr = strstr(endpoint_id, EXS_DOMAIN_PREFIX)) == NULL) {
- fmd_hdl_error(hdl, "Property parsing error : %s not "
- "found in %s. Check event-transport.conf\n",
- EXS_DOMAIN_PREFIX, endpoint_id);
- return (1);
- }
-
- ptr += EXS_DOMAIN_PREFIX_LEN;
-
- if ((sscanf(ptr, "%d", dom_id)) != 1) {
- fmd_hdl_error(hdl, "Property parsing error : no "
- "integer found in %s. Check event-transport.conf\n",
- endpoint_id);
- return (2);
- }
- }
-
- return (0);
-}
-
-/*
- * Prepare the client connection.
- * Return 0 for success, nonzero for failure.
- */
-static int
-exs_prep_client(exs_hdl_t *hp)
-{
- int rv, optval = 1;
- struct linger ling;
-
- /* Find the DSCP address for the remote endpoint */
- if ((rv = dscpAddr(hp->h_dom, DSCP_ADDR_REMOTE,
- (struct sockaddr *)&hp->h_client.c_saddr,
- &hp->h_client.c_len)) != DSCP_OK) {
- fmd_hdl_debug(hp->h_hdl, "dscpAddr on the client socket "
- "failed for %s : rv = %d\n", hp->h_endpt_id, rv);
- return (1);
- }
-
- if ((hp->h_client.c_sd = socket(AF_INET, SOCK_STREAM, 0)) == -1) {
- fmd_hdl_error(hp->h_hdl, "Failed to create the client socket "
- "for %s", hp->h_endpt_id);
- return (2);
- }
-
- if (setsockopt(hp->h_client.c_sd, SOL_SOCKET, SO_REUSEADDR,
- &optval, sizeof (optval))) {
- fmd_hdl_error(hp->h_hdl, "Failed to set REUSEADDR on the "
- "client socket for %s", hp->h_endpt_id);
- EXS_CLOSE_CLR(hp->h_client);
- return (3);
- }
-
- /*
- * Set SO_LINGER so TCP aborts the connection when closed.
- * If the domain's client socket goes into the TIME_WAIT state,
- * ETM will be unable to connect to the SP until this clears.
- * This connection is over DSCP, which is a simple point-to-point
- * connection and therefore has no routers or multiple forwarding.
- * The risk of receiving old packets from a previously terminated
- * connection is very small.
- */
- ling.l_onoff = 1;
- ling.l_linger = 0;
- if (setsockopt(hp->h_client.c_sd, SOL_SOCKET, SO_LINGER, &ling,
- sizeof (ling))) {
- fmd_hdl_error(hp->h_hdl, "Failed to set SO_LINGER on the "
- "client socket for %s", hp->h_endpt_id);
- EXS_CLOSE_CLR(hp->h_client);
- return (4);
- }
-
- /* Bind the socket to the local IP address of the DSCP link */
- if ((rv = dscpBind(hp->h_dom, hp->h_client.c_sd,
- EXS_CLIENT_PORT)) != DSCP_OK) {
- if (rv == DSCP_ERROR_DOWN) {
- fmd_hdl_debug(hp->h_hdl, "xport - dscp link for %s "
- "is down", hp->h_endpt_id);
- } else {
- fmd_hdl_debug(hp->h_hdl, "dscpBind on the client "
- "socket failed : rv = %d\n", rv);
- }
- EXS_CLOSE_CLR(hp->h_client);
- return (5);
- }
-
- hp->h_client.c_saddr.sin_port = htons(EXS_SERVER_PORT);
-
- /* Set IPsec security policy for this socket */
- if ((rv = dscpSecure(hp->h_dom, hp->h_client.c_sd)) != DSCP_OK) {
- fmd_hdl_error(hp->h_hdl, "dscpSecure on the client socket "
- "failed for %s : rv = %d\n", hp->h_endpt_id, rv);
- EXS_CLOSE_CLR(hp->h_client);
- return (6);
- }
-
- return (0);
-}
-
-/*
- * Server function/thread. There is one thread per endpoint.
- * Accepts incoming connections and notifies ETM of incoming data.
- */
-void
-exs_server(void *arg)
-{
- exs_hdl_t *hp = (exs_hdl_t *)arg;
- struct pollfd pfd;
-
- while (!hp->h_quit) {
- pfd.events = POLLIN;
- pfd.revents = 0;
- pfd.fd = hp->h_server.c_sd;
-
- if (poll(&pfd, 1, -1) <= 0)
- continue; /* loop around and check h_quit */
-
- if (pfd.revents & (POLLHUP | POLLERR)) {
- fmd_hdl_debug(hp->h_hdl, "xport - poll hangup/err for "
- "%s server socket", hp->h_endpt_id);
- EXS_CLOSE_CLR(hp->h_server);
- hp->h_destroy++;
- break; /* thread exits */
- }
-
- if (pfd.revents & POLLIN) {
- /* Notify ETM that incoming data is available */
- if (hp->h_cb_func(hp->h_hdl, &hp->h_server,
- ETM_CBFLAG_RECV, hp->h_cb_func_arg)) {
- /*
- * For any non-zero return, close the
- * connection and exit the thread.
- */
- EXS_CLOSE_CLR(hp->h_server);
- hp->h_destroy++;
- break; /* thread exits */
- }
- }
- }
-
- fmd_hdl_debug(hp->h_hdl, "xport - exiting server thread for %s",
- hp->h_endpt_id);
-}
-
-/*
- * Accept a new incoming connection.
- */
-static void
-exs_accept(fmd_hdl_t *hdl)
-{
- int new_sd, dom, flags, rv;
- struct sockaddr_in new_saddr;
- socklen_t new_len = sizeof (struct sockaddr);
- exs_hdl_t *hp;
-
- if ((new_sd = accept(Acc.c_sd, (struct sockaddr *)&new_saddr,
- &new_len)) != -1) {
- /* Translate saddr to domain id */
- if ((rv = dscpIdent((struct sockaddr *)&new_saddr, (int)new_len,
- &dom)) != DSCP_OK) {
- fmd_hdl_error(hdl, "dscpIdent failed : rv = %d\n", rv);
- (void) close(new_sd);
- return;
- }
-
- /* Find the exs_hdl_t for the domain trying to connect */
- (void) pthread_mutex_lock(&List_lock);
- for (hp = Exh_head; hp; hp = hp->h_next) {
- if (hp->h_dom == dom)
- break;
- }
- (void) pthread_mutex_unlock(&List_lock);
-
- if (hp == NULL) {
- fmd_hdl_error(hdl, "Not configured to accept a "
- "connection from domain %d. Check "
- "event-transport.conf\n", dom);
- (void) close(new_sd);
- return;
- }
-
- /* Authenticate this connection request */
- if ((rv = dscpAuth(dom, (struct sockaddr *)&new_saddr,
- (int)new_len)) != DSCP_OK) {
- fmd_hdl_error(hdl, "dscpAuth failed for %s : rv = %d ",
- " Possible spoofing attack\n", hp->h_endpt_id, rv);
- (void) close(new_sd);
- return;
- }
-
- if (hp->h_tid != EXS_TID_FREE) {
- hp->h_quit = 1;
- fmd_thr_signal(hp->h_hdl, hp->h_tid);
- fmd_thr_destroy(hp->h_hdl, hp->h_tid);
- hp->h_destroy = 0;
- hp->h_quit = 0;
- }
-
- if (hp->h_server.c_sd != EXS_SD_FREE)
- EXS_CLOSE_CLR(hp->h_server);
-
- /* Set the socket to be non-blocking */
- flags = fcntl(new_sd, F_GETFL, 0);
- (void) fcntl(new_sd, F_SETFL, flags | O_NONBLOCK);
-
- hp->h_server.c_sd = new_sd;
-
- hp->h_tid = fmd_thr_create(hdl, exs_server, hp);
-
- } else {
- fmd_hdl_error(hdl, "Failed to accept() a new connection");
- }
-}
-
-/*
- * Listen for and accept incoming connections.
- * There is only one such thread.
- */
-void
-exs_listen(void *arg)
-{
- fmd_hdl_t *hdl = (fmd_hdl_t *)arg;
- struct pollfd pfd;
-
- while (!Acc_quit) {
- pfd.events = POLLIN;
- pfd.revents = 0;
- pfd.fd = Acc.c_sd;
-
- if (poll(&pfd, 1, -1) <= 0)
- continue; /* loop around and check Acc_quit */
-
- if (pfd.revents & (POLLHUP | POLLERR)) {
- fmd_hdl_debug(hdl, "xport - poll hangup/err on "
- "accept socket");
- EXS_CLOSE_CLR(Acc);
- Acc_destroy++;
- break; /* thread exits */
- }
-
- if (pfd.revents & POLLIN)
- exs_accept(hdl);
- }
-
- fmd_hdl_debug(hdl, "xport - exiting accept-listen thread");
-}
-
-/*
- * Prepare to accept a connection.
- * Return 0 for success, nonzero for failure.
- */
-void
-exs_prep_accept(fmd_hdl_t *hdl, int dom)
-{
- int flags, optval = 1;
- int rv;
-
- if (Acc.c_sd != EXS_SD_FREE)
- return; /* nothing to do */
-
- if (Acc_destroy) {
- fmd_thr_destroy(hdl, Acc_tid);
- Acc_tid = EXS_TID_FREE;
- }
-
- /* Check to see if the DSCP interface is configured */
- if ((rv = dscpAddr(dom, DSCP_ADDR_LOCAL,
- (struct sockaddr *)&Acc.c_saddr, &Acc.c_len)) != DSCP_OK) {
- fmd_hdl_debug(hdl, "xport - dscpAddr on the accept socket "
- "failed for domain %d : rv = %d", dom, rv);
- return;
- }
-
- if ((Acc.c_sd = socket(AF_INET, SOCK_STREAM, 0)) == -1) {
- fmd_hdl_error(hdl, "Failed to create the accept socket");
- return;
- }
-
- if (setsockopt(Acc.c_sd, SOL_SOCKET, SO_REUSEADDR, &optval,
- sizeof (optval))) {
- fmd_hdl_error(hdl, "Failed to set REUSEADDR for the accept "
- "socket");
- EXS_CLOSE_CLR(Acc);
- return;
- }
-
- /* Bind the socket to the local IP address of the DSCP link */
- if ((rv = dscpBind(dom, Acc.c_sd, EXS_SERVER_PORT)) != DSCP_OK) {
- if (rv == DSCP_ERROR_DOWN) {
- fmd_hdl_debug(hdl, "xport - dscp link for domain %d "
- "is down", dom);
- } else {
- fmd_hdl_debug(hdl, "dscpBind on the accept socket "
- "failed : rv = %d\n", rv);
- }
- EXS_CLOSE_CLR(Acc);
- return;
- }
-
- /* Activate IPsec security policy for this socket */
- if ((rv = dscpSecure(dom, Acc.c_sd)) != DSCP_OK) {
- fmd_hdl_error(hdl, "dscpSecure on the accept socket failed : "
- "rv = %d\n", dom, rv);
- EXS_CLOSE_CLR(Acc);
- return;
- }
-
- if ((listen(Acc.c_sd, EXS_NUM_SOCKS)) == -1) {
- fmd_hdl_debug(hdl, "Failed to listen() for connections");
- EXS_CLOSE_CLR(Acc);
- return;
- }
-
- flags = fcntl(Acc.c_sd, F_GETFL, 0);
- (void) fcntl(Acc.c_sd, F_SETFL, flags | O_NONBLOCK);
-
- Acc_tid = fmd_thr_create(hdl, exs_listen, hdl);
-}
-
-/*
- * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * ETM-to-Transport API Connection Management routines
- * * * * * * * * * * * * * * * * * * * * * * * * * * *
- */
-
-/*
- * Initialize and setup any transport infrastructure before any connections
- * are opened.
- * Return etm_xport_hdl_t for success, NULL for failure.
- */
-etm_xport_hdl_t
-etm_xport_init(fmd_hdl_t *hdl, char *endpoint_id,
- int (*cb_func)(fmd_hdl_t *hdl, etm_xport_conn_t conn, etm_cb_flag_t flag,
- void *arg), void *cb_func_arg)
-{
- exs_hdl_t *hp, *curr;
- int dom;
-
- if (exs_get_id(hdl, endpoint_id, &dom))
- return (NULL);
-
- (void) pthread_mutex_lock(&List_lock);
-
- /* Check for a duplicate endpoint_id on the list */
- for (curr = Exh_head; curr; curr = curr->h_next) {
- if (dom == curr->h_dom) {
- fmd_hdl_debug(hdl, "xport - init failed, "
- "duplicate domain id : %d\n", dom);
- (void) pthread_mutex_unlock(&List_lock);
- return (NULL);
- }
- }
-
- if (Exh_head == NULL) {
- /* Do one-time initializations */
- exs_filter_init(hdl);
-
- /* Initialize the accept/listen vars */
- Acc.c_sd = EXS_SD_FREE;
- Acc_tid = EXS_TID_FREE;
- Acc_destroy = 0;
- Acc_quit = 0;
- }
-
- hp = exs_hdl_alloc(hdl, endpoint_id, cb_func, cb_func_arg, dom);
-
- /* Add this transport instance handle to the list */
- hp->h_next = Exh_head;
- Exh_head = hp;
-
- (void) pthread_mutex_unlock(&List_lock);
-
- exs_prep_accept(hdl, dom);
-
- return ((etm_xport_hdl_t)hp);
-}
-
-/*
- * Teardown any transport infrastructure after all connections are closed.
- * Return 0 for success, or nonzero for failure.
- */
-int
-etm_xport_fini(fmd_hdl_t *hdl, etm_xport_hdl_t tlhdl)
-{
- exs_hdl_t *hp = (exs_hdl_t *)tlhdl;
- exs_hdl_t *xp, **ppx;
-
- (void) pthread_mutex_lock(&List_lock);
-
- ppx = &Exh_head;
-
- for (xp = *ppx; xp; xp = xp->h_next) {
- if (xp != hp)
- ppx = &xp->h_next;
- else
- break;
- }
-
- if (xp != hp) {
- (void) pthread_mutex_unlock(&List_lock);
- fmd_hdl_abort(hdl, "xport - fini failed, tlhdl %p not on list",
- (void *)hp);
- }
-
- *ppx = hp->h_next;
- hp->h_next = NULL;
-
- if (hp->h_tid != EXS_TID_FREE) {
- hp->h_quit = 1;
- fmd_thr_signal(hdl, hp->h_tid);
- fmd_thr_destroy(hdl, hp->h_tid);
- }
-
- if (hp->h_server.c_sd != EXS_SD_FREE)
- (void) close(hp->h_server.c_sd);
-
- if (hp->h_client.c_sd != EXS_SD_FREE)
- (void) close(hp->h_client.c_sd);
-
- fmd_hdl_strfree(hdl, hp->h_endpt_id);
- fmd_hdl_free(hdl, hp, sizeof (exs_hdl_t));
-
- if (Exh_head == NULL) {
- /* Undo one-time initializations */
- exs_filter_fini(hdl);
-
- /* Destroy the accept/listen thread */
- if (Acc_tid != EXS_TID_FREE) {
- Acc_quit = 1;
- fmd_thr_signal(hdl, Acc_tid);
- fmd_thr_destroy(hdl, Acc_tid);
- }
-
- if (Acc.c_sd != EXS_SD_FREE)
- EXS_CLOSE_CLR(Acc);
- }
-
- (void) pthread_mutex_unlock(&List_lock);
-
- return (0);
-}
-
-/*
- * Open a connection with the given endpoint,
- * Return etm_xport_conn_t for success, NULL and set errno for failure.
- */
-etm_xport_conn_t
-etm_xport_open(fmd_hdl_t *hdl, etm_xport_hdl_t tlhdl)
-{
- int flags;
- exs_hdl_t *hp = (exs_hdl_t *)tlhdl;
-
- if (hp->h_destroy) {
- fmd_thr_destroy(hp->h_hdl, hp->h_tid);
- hp->h_tid = EXS_TID_FREE;
- hp->h_destroy = 0;
- }
-
- if (hp->h_client.c_sd == EXS_SD_FREE) {
- if (exs_prep_client(hp) != 0)
- return (NULL);
- }
-
- /* Set the socket to be non-blocking */
- flags = fcntl(hp->h_client.c_sd, F_GETFL, 0);
- (void) fcntl(hp->h_client.c_sd, F_SETFL, flags | O_NONBLOCK);
-
- if ((connect(hp->h_client.c_sd,
- (struct sockaddr *)&hp->h_client.c_saddr,
- hp->h_client.c_len)) == -1) {
- if (errno != EINPROGRESS) {
- fmd_hdl_debug(hdl, "xport - failed to connect to %s",
- hp->h_endpt_id);
- EXS_CLOSE_CLR(hp->h_client);
- return (NULL);
- }
- }
-
- fmd_hdl_debug(hdl, "xport - connected client socket for %s",
- hp->h_endpt_id);
-
- return (&hp->h_client);
-}
-
-/*
- * Close a connection from either endpoint.
- * Return zero for success, nonzero for failure.
- */
-/*ARGSUSED*/
-int
-etm_xport_close(fmd_hdl_t *hdl, etm_xport_conn_t conn)
-{
- exs_conn_t *cp = (exs_conn_t *)conn;
-
- if (cp->c_sd == EXS_SD_FREE)
- return (0); /* Connection already closed */
-
- (void) close(cp->c_sd);
- cp->c_sd = EXS_SD_FREE;
-
- return (0);
-}
-
-/*
- * * * * * * * * * * * * * * * * * *
- * ETM-to-Transport API I/O routines
- * * * * * * * * * * * * * * * * * *
- */
-
-/*
- * Try to read byte_cnt bytes from the connection into the given buffer.
- * Return how many bytes actually read for success, negative value for failure.
- */
-ssize_t
-etm_xport_read(fmd_hdl_t *hdl, etm_xport_conn_t conn, hrtime_t timeout,
- void *buf, size_t byte_cnt)
-{
- ssize_t len, nbytes = 0;
- hrtime_t endtime, sleeptime;
- struct timespec tms;
- char *ptr = (char *)buf;
- exs_conn_t *cp = (exs_conn_t *)conn;
-
- if (cp->c_sd == EXS_SD_FREE) {
- fmd_hdl_debug(hdl, "xport - read socket %d is closed\n",
- cp->c_sd);
- return (-EBADF);
- }
-
- endtime = gethrtime() + timeout;
- sleeptime = timeout / EXS_IO_SLEEP_DIV;
-
- tms.tv_sec = 0;
- tms.tv_nsec = sleeptime;
-
- while (nbytes < byte_cnt) {
- if (gethrtime() < endtime) {
- if ((len = recv(cp->c_sd, ptr, byte_cnt - nbytes,
- 0)) < 0) {
- if (errno != EINTR && errno != EWOULDBLOCK) {
- fmd_hdl_debug(hdl, "xport - recv "
- "failed for socket %d", cp->c_sd);
- }
-
- (void) nanosleep(&tms, 0);
- continue;
- } else if (len == 0) {
- fmd_hdl_debug(hdl, "xport - remote endpt "
- "closed for socket %d", cp->c_sd);
- return (0);
- }
-
- ptr += len;
- nbytes += len;
- } else {
- fmd_hdl_debug(hdl, "xport - read timed out for socket "
- "%d", cp->c_sd);
- break;
- }
- }
-
- if (nbytes)
- return (nbytes);
- else
- return (-1);
-}
-
-/*
- * Try to write byte_cnt bytes to the connection from the given buffer.
- * Return how many bytes actually written for success, negative value
- * for failure.
- */
-ssize_t
-etm_xport_write(fmd_hdl_t *hdl, etm_xport_conn_t conn, hrtime_t timeout,
- void *buf, size_t byte_cnt)
-{
- ssize_t len, nbytes = 0;
- hrtime_t endtime, sleeptime;
- struct timespec tms;
- char *ptr = (char *)buf;
- exs_conn_t *cp = (exs_conn_t *)conn;
-
- if (cp->c_sd == EXS_SD_FREE) {
- fmd_hdl_debug(hdl, "xport - write socket %d is closed\n",
- cp->c_sd);
- return (-EBADF);
- }
-
- endtime = gethrtime() + timeout;
- sleeptime = timeout / EXS_IO_SLEEP_DIV;
-
- tms.tv_sec = 0;
- tms.tv_nsec = sleeptime;
-
- while (nbytes < byte_cnt) {
- if (gethrtime() < endtime) {
- if ((len = send(cp->c_sd, ptr, byte_cnt - nbytes,
- 0)) < 0) {
- if (errno != EINTR && errno != EWOULDBLOCK) {
- fmd_hdl_debug(hdl, "xport - send "
- "failed for socket %d", cp->c_sd);
- }
-
- (void) nanosleep(&tms, 0);
- continue;
- }
-
- ptr += len;
- nbytes += len;
- } else {
- fmd_hdl_debug(hdl, "xport - write timed out for socket "
- "%d", cp->c_sd);
- break;
- }
- }
-
- if (nbytes)
- return (nbytes);
- else
- return (-1);
-}
-
-/*
- * * * * * * * * * * * * * * * * * * * *
- * ETM-to-Transport API Filter routines
- * * * * * * * * * * * * * * * * * * * *
- */
-
-/*
- * Call the platform's send_filter function.
- * Otherwise return ETM_XPORT_FILTER_OK.
- */
-int
-etm_xport_send_filter(fmd_hdl_t *hdl, nvlist_t *event, const char *dest)
-{
- if (Send_filter != NULL)
- return (Send_filter(hdl, event, dest));
- else
- return (ETM_XPORT_FILTER_OK);
-}
-
-/*
- * Call the platform's post_filter function.
- * Otherwise return ETM_XPORT_FILTER_OK.
- */
-int
-etm_xport_post_filter(fmd_hdl_t *hdl, nvlist_t *event, const char *src)
-{
- if (Post_filter != NULL)
- return (Post_filter(hdl, event, src));
- else
- return (ETM_XPORT_FILTER_OK);
-}
diff --git a/usr/src/cmd/fm/modules/SUNW,SPARC-Enterprise/event-transport/ex_dscp.h b/usr/src/cmd/fm/modules/SUNW,SPARC-Enterprise/event-transport/ex_dscp.h
deleted file mode 100644
index 468f2e45a0..0000000000
--- a/usr/src/cmd/fm/modules/SUNW,SPARC-Enterprise/event-transport/ex_dscp.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2006 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * FMA Event Transport Module Transport Layer API implementation.
- *
- * Library for establishing connections and transporting FMA events between
- * ETMs (event-transport modules) in separate fault domains.
- *
- * The transport for this library is internet socket based and uses the DSCP
- * client services library (libdscp).
- */
-
-#ifndef _EX_DSCP_H
-#define _EX_DSCP_H
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <unistd.h>
-#include <strings.h>
-#include <sys/socket.h>
-#include <fcntl.h>
-#include <netdb.h>
-#include <pthread.h>
-#include <errno.h>
-#include <time.h>
-#include <poll.h>
-#include <dlfcn.h>
-#include <libdscp.h>
-#include "etm_xport_api.h"
-
-/* Connection handle */
-typedef struct etm_xport_sock_conn {
- int c_len; /* Length of saddr */
- int c_sd; /* Socket descriptor */
- struct sockaddr_in c_saddr; /* Sockaddr for DSCP connection */
-} exs_conn_t;
-
-/* Transport instance handle */
-typedef struct etm_xport_sock_hdl {
- exs_conn_t h_client; /* Sending connection handle */
- exs_conn_t h_server; /* Receiving connection handle */
- pthread_t h_tid; /* Thread ID of server thread */
- int h_destroy; /* Destroy the server thread? */
- char *h_endpt_id; /* Endpoint id from ETM common */
- int h_dom; /* Domain ID from platform (libdscp) */
- fmd_hdl_t *h_hdl; /* fmd handle */
- int (*h_cb_func)(fmd_hdl_t *, etm_xport_conn_t, etm_cb_flag_t, void *);
- /* Callback function for ETM common */
- void *h_cb_func_arg; /* Arg to pass when calling h_cb_func */
- int h_quit; /* Signal to quit */
- struct etm_xport_sock_hdl *h_next;
-} exs_hdl_t;
-
-#define EXS_SERVER_PORT 24 /* Port number for server */
-#define EXS_SERVER_ADDR in6addr_any /* Address for server */
-#define EXS_CLIENT_PORT 12 /* Port number for client */
-#define EXS_NUM_SOCKS 24 /* Length of socket queue */
-#define EXS_SD_FREE -1 /* Socket descr value when unset */
-#define EXS_TID_FREE 0 /* Thread ID value when unset */
-#define EXS_DOMAIN_PREFIX "dom" /* Domain auth prefix in FMRI string */
-#define EXS_DOMAIN_PREFIX_LEN 3 /* Length of domain prefix */
-#define EXS_SP_PREFIX "sp" /* SP auth prefix in FMRI string */
-#define EXS_IO_SLEEP_DIV 100 /* Divisor for I/O sleeptime */
-
-#define EXS_CLOSE_CLR(x) { (void) close(x.c_sd); x.c_sd = EXS_SD_FREE; }
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _EX_DSCP_H */
diff --git a/usr/src/cmd/fm/modules/SUNW,Sun-Blade-T6300/Makefile b/usr/src/cmd/fm/modules/SUNW,Sun-Blade-T6300/Makefile
deleted file mode 100644
index e308b53487..0000000000
--- a/usr/src/cmd/fm/modules/SUNW,Sun-Blade-T6300/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-
-SUBDIRS = etm
-
-include ../../Makefile.subdirs
diff --git a/usr/src/cmd/fm/modules/SUNW,Sun-Blade-T6300/etm/Makefile b/usr/src/cmd/fm/modules/SUNW,Sun-Blade-T6300/etm/Makefile
deleted file mode 100644
index b8f2704d14..0000000000
--- a/usr/src/cmd/fm/modules/SUNW,Sun-Blade-T6300/etm/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-PLATFORMS = SUNW,Sun-Blade-T6300
-
-include ../../sun4v/etm/Makefile.etm
diff --git a/usr/src/cmd/fm/modules/SUNW,Sun-Blade-T6300/etm/etm.conf b/usr/src/cmd/fm/modules/SUNW,Sun-Blade-T6300/etm/etm.conf
deleted file mode 100644
index f90226df2c..0000000000
--- a/usr/src/cmd/fm/modules/SUNW,Sun-Blade-T6300/etm/etm.conf
+++ /dev/null
@@ -1,55 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-# transport these FMA events from the domain to the SP
-subscribe fault.cpu.*
-subscribe fault.memory.*
-subscribe fault.io.fire.*
-subscribe fault.io.pci.*
-subscribe fault.io.pciex.*
-subscribe list.repaired
-
-#
-# etm agent properties:
-#
-# On supported systems, ETM can transport SP Alert event messages from the
-# SP to Solaris. SP Alert messages are generated by the Service Processor
-# and indicate various conditions monitored by the SP. The following
-# properties define how those messages are handled by Solaris.
-#
-# etm_alert_console - bool - log messages to system console (default=false)
-# etm_alert_syslogd - bool - log messages to messages file through
-# syslogd (default=true)
-# etm_alert_facility - string - syslog(3C) log facility to use
-# (default=LOG_DAEMON)
-#
-# The "etm_alert_facility" property may only be configured to use
-# LOG_DAEMON (which is the default) or one of LOG_LOCAL[0-7]. For
-# information about the use of local log facilities, refer to syslog(3C),
-# syslogd(8), and syslog.conf(5).
-#
-# Example settings:
-# setprop etm_alert_console true
-# setprop etm_alert_facility LOG_LOCAL0
-#
diff --git a/usr/src/cmd/fm/modules/SUNW,Sun-Blade-T6320/Makefile b/usr/src/cmd/fm/modules/SUNW,Sun-Blade-T6320/Makefile
deleted file mode 100644
index e308b53487..0000000000
--- a/usr/src/cmd/fm/modules/SUNW,Sun-Blade-T6320/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-
-SUBDIRS = etm
-
-include ../../Makefile.subdirs
diff --git a/usr/src/cmd/fm/modules/SUNW,Sun-Blade-T6320/etm/Makefile b/usr/src/cmd/fm/modules/SUNW,Sun-Blade-T6320/etm/Makefile
deleted file mode 100644
index 7a3597f4e2..0000000000
--- a/usr/src/cmd/fm/modules/SUNW,Sun-Blade-T6320/etm/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-PLATFORMS = SUNW,Sun-Blade-T6320
-
-include ../../sun4v/etm/Makefile.etm
diff --git a/usr/src/cmd/fm/modules/SUNW,Sun-Blade-T6320/etm/etm.conf b/usr/src/cmd/fm/modules/SUNW,Sun-Blade-T6320/etm/etm.conf
deleted file mode 100644
index 301291548c..0000000000
--- a/usr/src/cmd/fm/modules/SUNW,Sun-Blade-T6320/etm/etm.conf
+++ /dev/null
@@ -1,56 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-# transport these FMA events from the domain to the SP
-subscribe fault.cpu.*
-subscribe fault.memory.*
-subscribe fault.io.fire.*
-subscribe fault.io.pci.*
-subscribe fault.io.pciex.*
-subscribe fault.io.n2.*
-subscribe list.repaired
-
-#
-# etm agent properties:
-#
-# On supported systems, ETM can transport SP Alert event messages from the
-# SP to Solaris. SP Alert messages are generated by the Service Processor
-# and indicate various conditions monitored by the SP. The following
-# properties define how those messages are handled by Solaris.
-#
-# etm_alert_console - bool - log messages to system console (default=false)
-# etm_alert_syslogd - bool - log messages to messages file through
-# syslogd (default=true)
-# etm_alert_facility - string - syslog(3C) log facility to use
-# (default=LOG_DAEMON)
-#
-# The "etm_alert_facility" property may only be configured to use
-# LOG_DAEMON (which is the default) or one of LOG_LOCAL[0-7]. For
-# information about the use of local log facilities, refer to syslog(3C),
-# syslogd(8), and syslog.conf(5).
-#
-# Example settings:
-# setprop etm_alert_console true
-# setprop etm_alert_facility LOG_LOCAL0
-#
diff --git a/usr/src/cmd/fm/modules/SUNW,Sun-Fire-T200/Makefile b/usr/src/cmd/fm/modules/SUNW,Sun-Fire-T200/Makefile
deleted file mode 100644
index e308b53487..0000000000
--- a/usr/src/cmd/fm/modules/SUNW,Sun-Fire-T200/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-
-SUBDIRS = etm
-
-include ../../Makefile.subdirs
diff --git a/usr/src/cmd/fm/modules/SUNW,Sun-Fire-T200/etm/Makefile b/usr/src/cmd/fm/modules/SUNW,Sun-Fire-T200/etm/Makefile
deleted file mode 100644
index 50ed9268a3..0000000000
--- a/usr/src/cmd/fm/modules/SUNW,Sun-Fire-T200/etm/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-
-PLATFORMS = SUNW,Sun-Fire-T200
-
-include ../../sun4v/etm/Makefile.etm
diff --git a/usr/src/cmd/fm/modules/SUNW,Sun-Fire-T200/etm/etm.conf b/usr/src/cmd/fm/modules/SUNW,Sun-Fire-T200/etm/etm.conf
deleted file mode 100644
index f90226df2c..0000000000
--- a/usr/src/cmd/fm/modules/SUNW,Sun-Fire-T200/etm/etm.conf
+++ /dev/null
@@ -1,55 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-# transport these FMA events from the domain to the SP
-subscribe fault.cpu.*
-subscribe fault.memory.*
-subscribe fault.io.fire.*
-subscribe fault.io.pci.*
-subscribe fault.io.pciex.*
-subscribe list.repaired
-
-#
-# etm agent properties:
-#
-# On supported systems, ETM can transport SP Alert event messages from the
-# SP to Solaris. SP Alert messages are generated by the Service Processor
-# and indicate various conditions monitored by the SP. The following
-# properties define how those messages are handled by Solaris.
-#
-# etm_alert_console - bool - log messages to system console (default=false)
-# etm_alert_syslogd - bool - log messages to messages file through
-# syslogd (default=true)
-# etm_alert_facility - string - syslog(3C) log facility to use
-# (default=LOG_DAEMON)
-#
-# The "etm_alert_facility" property may only be configured to use
-# LOG_DAEMON (which is the default) or one of LOG_LOCAL[0-7]. For
-# information about the use of local log facilities, refer to syslog(3C),
-# syslogd(8), and syslog.conf(5).
-#
-# Example settings:
-# setprop etm_alert_console true
-# setprop etm_alert_facility LOG_LOCAL0
-#
diff --git a/usr/src/cmd/fm/modules/SUNW,T5140/Makefile b/usr/src/cmd/fm/modules/SUNW,T5140/Makefile
deleted file mode 100644
index 79eaa7bff8..0000000000
--- a/usr/src/cmd/fm/modules/SUNW,T5140/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-SUBDIRS = etm
-
-include ../../Makefile.subdirs
diff --git a/usr/src/cmd/fm/modules/SUNW,T5140/etm/Makefile b/usr/src/cmd/fm/modules/SUNW,T5140/etm/Makefile
deleted file mode 100644
index d4c69a1d82..0000000000
--- a/usr/src/cmd/fm/modules/SUNW,T5140/etm/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-
-PLATFORMS = SUNW,T5140
-
-include ../../sun4v/etm/Makefile.etm
diff --git a/usr/src/cmd/fm/modules/SUNW,T5140/etm/etm.conf b/usr/src/cmd/fm/modules/SUNW,T5140/etm/etm.conf
deleted file mode 100644
index 463952123c..0000000000
--- a/usr/src/cmd/fm/modules/SUNW,T5140/etm/etm.conf
+++ /dev/null
@@ -1,58 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-# transport these FMA events from the domain to the SP
-subscribe fault.cpu.*
-subscribe fault.memory.*
-subscribe fault.io.fire.*
-subscribe fault.io.pci.*
-subscribe fault.io.pciex.*
-subscribe fault.io.n2.*
-subscribe fault.io.vf.*
-subscribe fault.asic.ultraSPARC-T2plus.*
-subscribe list.repaired
-
-#
-# etm agent properties:
-#
-# On supported systems, ETM can transport SP Alert event messages from the
-# SP to Solaris. SP Alert messages are generated by the Service Processor
-# and indicate various conditions monitored by the SP. The following
-# properties define how those messages are handled by Solaris.
-#
-# etm_alert_console - bool - log messages to system console (default=false)
-# etm_alert_syslogd - bool - log messages to messages file through
-# syslogd (default=true)
-# etm_alert_facility - string - syslog(3C) log facility to use
-# (default=LOG_DAEMON)
-#
-# The "etm_alert_facility" property may only be configured to use
-# LOG_DAEMON (which is the default) or one of LOG_LOCAL[0-7]. For
-# information about the use of local log facilities, refer to syslog(3C),
-# syslogd(8), and syslog.conf(5).
-#
-# Example settings:
-# setprop etm_alert_console true
-# setprop etm_alert_facility LOG_LOCAL0
-#
diff --git a/usr/src/cmd/fm/modules/SUNW,USBRDT-5240/Makefile b/usr/src/cmd/fm/modules/SUNW,USBRDT-5240/Makefile
deleted file mode 100644
index e308b53487..0000000000
--- a/usr/src/cmd/fm/modules/SUNW,USBRDT-5240/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-
-SUBDIRS = etm
-
-include ../../Makefile.subdirs
diff --git a/usr/src/cmd/fm/modules/SUNW,USBRDT-5240/etm/Makefile b/usr/src/cmd/fm/modules/SUNW,USBRDT-5240/etm/Makefile
deleted file mode 100644
index 3835bc7552..0000000000
--- a/usr/src/cmd/fm/modules/SUNW,USBRDT-5240/etm/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-
-PLATFORMS = SUNW,USBRDT-5240
-
-include ../../sun4v/etm/Makefile.etm
diff --git a/usr/src/cmd/fm/modules/SUNW,USBRDT-5240/etm/etm.conf b/usr/src/cmd/fm/modules/SUNW,USBRDT-5240/etm/etm.conf
deleted file mode 100644
index f481dd6f77..0000000000
--- a/usr/src/cmd/fm/modules/SUNW,USBRDT-5240/etm/etm.conf
+++ /dev/null
@@ -1,57 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-# transport these FMA events from the domain to the SP
-subscribe fault.cpu.*
-subscribe fault.memory.*
-subscribe fault.io.fire.*
-subscribe fault.io.pci.*
-subscribe fault.io.pciex.*
-subscribe fault.io.n2.*
-subscribe fault.io.vf.*
-subscribe list.repaired
-
-#
-# etm agent properties:
-#
-# On supported systems, ETM can transport SP Alert event messages from the
-# SP to Solaris. SP Alert messages are generated by the Service Processor
-# and indicate various conditions monitored by the SP. The following
-# properties define how those messages are handled by Solaris.
-#
-# etm_alert_console - bool - log messages to system console (default=false)
-# etm_alert_syslogd - bool - log messages to messages file through
-# syslogd (default=true)
-# etm_alert_facility - string - syslog(3C) log facility to use
-# (default=LOG_DAEMON)
-#
-# The "etm_alert_facility" property may only be configured to use
-# LOG_DAEMON (which is the default) or one of LOG_LOCAL[0-7]. For
-# information about the use of local log facilities, refer to syslog(3C),
-# syslogd(8), and syslog.conf(5).
-#
-# Example settings:
-# setprop etm_alert_console true
-# setprop etm_alert_facility LOG_LOCAL0
-#
diff --git a/usr/src/cmd/fm/modules/common/cpumem-retire/Makefile b/usr/src/cmd/fm/modules/common/cpumem-retire/Makefile
index e4da8b532d..b081d51654 100644
--- a/usr/src/cmd/fm/modules/common/cpumem-retire/Makefile
+++ b/usr/src/cmd/fm/modules/common/cpumem-retire/Makefile
@@ -22,6 +22,8 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
+# Copyright 2022 Garrett D'Amore
+#
MODULE = cpumem-retire
CLASS = common
@@ -32,16 +34,11 @@ SRCS = \
cma_page.c \
cma_page_arch.c
-SRCS_sparc = cma_cache.c
-
-SRCS += $(SRCS_$(MACH))
-
include ../../Makefile.plugin
CMA_VERSION = "1.1"
INCDIRS = .
-$(SPARC_BLD)INCDIRS += $(SRC)/uts/sun4u
CPPFLAGS += $(INCDIRS:%=-I%) -DCMA_VERSION='$(CMA_VERSION)'
diff --git a/usr/src/cmd/fm/modules/common/cpumem-retire/cma_cache.c b/usr/src/cmd/fm/modules/common/cpumem-retire/cma_cache.c
deleted file mode 100644
index 2026502330..0000000000
--- a/usr/src/cmd/fm/modules/common/cpumem-retire/cma_cache.c
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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.
- */
-
-#include <cma.h>
-#include <fcntl.h>
-#include <strings.h>
-#include <unistd.h>
-#include <errno.h>
-#include <fm/fmd_api.h>
-#include <sys/fm/protocol.h>
-#include <sys/mem_cache.h>
-
-int
-/* ARGSUSED 4 */
-cma_cache_way_retire(fmd_hdl_t *hdl, nvlist_t *nvl, nvlist_t *asru,
- const char *uuid, boolean_t repair)
-{
- uint_t cpuid;
- uint32_t way;
- uint32_t index;
- uint16_t bit = 0;
- uint8_t type;
- cache_info_t cache_info;
- int ret, fd;
- int err;
-
- fmd_hdl_debug(hdl, "cpu cache *line* fault processing\n");
- fmd_hdl_debug(hdl, "asru %lx\n", asru);
-
- /*
- * This added expansion is needed to cover the situation where a
- * cpu fault from the resource cache is replayed at fmd restart,
- * and the cpu resource has been remapped or replaced. The stored
- * FMRI is expanded, but may have stale data.
- */
-
- if (fmd_nvl_fmri_expand(hdl, asru) < 0) {
- fmd_hdl_debug(hdl, "failed to expand cpu asru\n");
- cma_stats.bad_flts.fmds_value.ui64++;
- return (CMA_RA_FAILURE);
- }
-
- if (nvlist_lookup_uint32(asru, FM_FMRI_CPU_ID, &cpuid) != 0) {
- fmd_hdl_debug(hdl, "cpu cache fault missing '%s'\n",
- FM_FMRI_CPU_ID);
- cma_stats.bad_flts.fmds_value.ui64++;
- return (CMA_RA_FAILURE);
- }
-
- if (nvlist_lookup_uint32(asru, FM_FMRI_CPU_CACHE_INDEX, &index) != 0) {
- fmd_hdl_debug(hdl, "cpu cache fault missing '%s'\n",
- FM_FMRI_CPU_CACHE_INDEX);
- cma_stats.bad_flts.fmds_value.ui64++;
- return (CMA_RA_FAILURE);
- }
-
- if (nvlist_lookup_uint32(asru, FM_FMRI_CPU_CACHE_WAY, &way) != 0) {
- fmd_hdl_debug(hdl, "cpu cache fault missing '%s'\n",
- FM_FMRI_CPU_CACHE_WAY);
- cma_stats.bad_flts.fmds_value.ui64++;
- return (CMA_RA_FAILURE);
- }
-
- if (nvlist_lookup_uint8(asru, FM_FMRI_CPU_CACHE_TYPE, &type) != 0) {
- fmd_hdl_debug(hdl, "cpu cache fault missing '%s'\n",
- FM_FMRI_CPU_CACHE_TYPE);
- cma_stats.bad_flts.fmds_value.ui64++;
- return (CMA_RA_FAILURE);
- }
-
- /*
- * Tag faults will use it to set the bit to a stable state
- */
-
- if (nvlist_lookup_uint16(asru, FM_FMRI_CPU_CACHE_BIT, &bit) != 0) {
- fmd_hdl_debug(hdl, "cpu cache fault missing '%s'\n",
- FM_FMRI_CPU_CACHE_BIT);
- cma_stats.bad_flts.fmds_value.ui64++;
- return (CMA_RA_FAILURE);
- }
- if (repair) {
- fmd_hdl_debug(hdl,
- "cpu %d: Unretire for index %d, way %d\n bit %d"
- " type 0x%02x is being called now. We will not unretire"
- " cacheline. This message is for information.\n",
- cpuid, index, way, bit, type);
- /*
- * The DE will do the actual unretire.
- * The agent is called because the DE informs the fmd
- * that the resource is repaired.
- */
- return (CMA_RA_SUCCESS);
- }
- fmd_hdl_debug(hdl,
- "cpu %d: Retiring index %d, way %d\n bit %d"
- " type 0x%02x", cpuid, index, way, bit, type);
- fd = open(mem_cache_device, O_RDWR);
- if (fd == -1) {
- fmd_hdl_debug(hdl, "Driver open failed\n");
- return (CMA_RA_FAILURE);
- }
- cache_info.cpu_id = cpuid;
- cache_info.way = way;
- cache_info.bit = bit;
- cache_info.index = index;
- cache_info.cache = type == FM_FMRI_CPU_CACHE_TYPE_L3 ?
- L3_CACHE_DATA : L2_CACHE_DATA;
-
- ret = ioctl(fd, MEM_CACHE_RETIRE, &cache_info);
- /*
- * save errno before we call close.
- * Need errno to display the error if ioctl fails.
- */
- err = errno;
- (void) close(fd);
- if (ret == -1) {
- fmd_hdl_debug(hdl, "Driver call failed errno = %d\n", err);
- return (CMA_RA_FAILURE);
- }
- return (CMA_RA_SUCCESS);
-}
diff --git a/usr/src/cmd/fm/modules/common/fdd-msg/Makefile b/usr/src/cmd/fm/modules/common/fdd-msg/Makefile
index be3a173e7f..a7025bc304 100644
--- a/usr/src/cmd/fm/modules/common/fdd-msg/Makefile
+++ b/usr/src/cmd/fm/modules/common/fdd-msg/Makefile
@@ -20,6 +20,7 @@
#
#
# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2022 Garrett D'Amore
#
MODULE = fdd-msg
@@ -28,9 +29,7 @@ SRCS = fdd_msg.c
include ../../Makefile.plugin
-LDLIBS_sparc = -lipmi
LDLIBS_i386 = -L$(ROOT)/usr/lib/fm -lipmi -lumem -lfmd_agent
-LDFLAGS_sparc =
LDFLAGS_i386 = -R/usr/lib/fm
LDLIBS += $(LDLIBS_$(MACH))
LDFLAGS += $(LDFLAGS_$(MACH))
diff --git a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/Makefile.cpumem b/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/Makefile.cpumem
deleted file mode 100644
index 1ebeddda4f..0000000000
--- a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/Makefile.cpumem
+++ /dev/null
@@ -1,66 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-MODULE = cpumem-diagnosis
-CLASS = arch
-SUN4DIR = ../../sun4/$(MODULE)
-SRCS = \
- cmd_bank.c \
- cmd_cpu.c \
- cmd_cpu_arch.c \
- cmd_cpuerr.c \
- cmd_dimm.c \
- cmd_fmri.c \
- cmd_list.c \
- cmd_main.c \
- cmd_mem.c \
- cmd_memerr.c \
- cmd_memerr_arch.c \
- cmd_page.c \
- cmd_pageerr.c \
- cmd_state.c \
- cmd_util.c \
- $($(ARCH)_SRCS)
-
-include ../../Makefile.plugin
-
-CMD_VERSION = "1.7"
-
-INCDIRS += \
- . \
- $(SRC)/uts/sun4 \
- $(SRC)/uts/sparc/v9 \
- $(SUN4DIR)
-
-CPPFLAGS += $(INCDIRS:%=-I%) -DCMD_VERSION='$(CMD_VERSION)' -D$(ARCH)
-
-LDLIBS += -lkstat -L$(ROOTLIB)/fm -ltopo
-
-%.o: $(SUN4DIR)/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
-%.ln: $(SUN4DIR)/%.c
- $(LINT.c) -c $<
diff --git a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd.h b/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd.h
deleted file mode 100644
index f0f99b0f6c..0000000000
--- a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd.h
+++ /dev/null
@@ -1,277 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
- */
-
-#ifndef _CMD_H
-#define _CMD_H
-
-#include <stdarg.h>
-#include <fm/fmd_api.h>
-#include <sys/param.h>
-
-#include <cmd_list.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Diagnosis of certain errors requires that either a) the type of ereport be
- * recorded in a persistent buffer or b) that a single value be used to
- * represent multiple ereport classes. We start the values at 0x8 to avoid
- * collisions with an earlier class code enum. While we have 64 bits available
- * to us, cmd_errcl_t's are saved in persistent buffers, and thus can't easily
- * grow beyond that size. As such, ereports should only be assigned class codes
- * when needed. NEVER CHANGE the values of these constants once assigned.
- */
-#ifdef sun4u
-#define CMD_ERRCL_UCC 0x0000000000000008ULL
-#define CMD_ERRCL_UCU 0x0000000000000010ULL
-#define CMD_ERRCL_CPC 0x0000000000000020ULL
-#define CMD_ERRCL_CPU 0x0000000000000040ULL
-#define CMD_ERRCL_WDC 0x0000000000000080ULL
-#define CMD_ERRCL_WDU 0x0000000000000100ULL
-#define CMD_ERRCL_EDC 0x0000000000000200ULL
-#define CMD_ERRCL_EDU_ST 0x0000000000000400ULL
-#define CMD_ERRCL_EDU_BL 0x0000000000000800ULL
-#define CMD_ERRCL_L3_UCC 0x0000000000001000ULL
-#define CMD_ERRCL_L3_UCU 0x0000000000002000ULL
-#define CMD_ERRCL_L3_CPC 0x0000000000004000ULL
-#define CMD_ERRCL_L3_CPU 0x0000000000008000ULL
-#define CMD_ERRCL_L3_WDC 0x0000000000010000ULL
-#define CMD_ERRCL_L3_WDU 0x0000000000020000ULL
-#define CMD_ERRCL_L3_EDC 0x0000000000040000ULL
-#define CMD_ERRCL_L3_EDU_ST 0x0000000000080000ULL
-#define CMD_ERRCL_L3_EDU_BL 0x0000000000100000ULL
-#define CMD_ERRCL_L3_MECC 0x0000000000200000ULL
- /* hole for sequential expansion */
-#define CMD_ERRCL_RCE 0x0000040000000000ULL
-#define CMD_ERRCL_RUE 0x0000080000000000ULL
-#define CMD_ERRCL_FRC 0x0000100000000000ULL
-#define CMD_ERRCL_FRU 0x0000200000000000ULL
-#define CMD_ERRCL_IOCE 0x0000400000000000ULL
-#define CMD_ERRCL_IOUE 0x0000800000000000ULL
-#else /* sun4u */
-#define CMD_ERRCL_IL2U 0x0000000000000008ULL
-#define CMD_ERRCL_DL2U 0x0000000000000010ULL
-#define CMD_ERRCL_L2ND 0x0000000000000020ULL
-#define CMD_ERRCL_IL2ND 0x0000000000000040ULL
-#define CMD_ERRCL_DL2ND 0x0000000000000080ULL
-#define CMD_ERRCL_DBU 0x0000000000000100ULL
-#define CMD_ERRCL_FBU 0x0000000000000200ULL
-#define CMD_ERRCL_DCDP 0x0000000000000400ULL
-#define CMD_ERRCL_ICDP 0x0000000000000800ULL
-#define CMD_ERRCL_WBUE 0x0000000000001000ULL
-#define CMD_ERRCL_CBCE 0x0000000000002000ULL
-#define CMD_ERRCL_DAC 0x0001000000000000ULL
-#define CMD_ERRCL_DSC 0x0002000000000000ULL
-#define CMD_ERRCL_DAU 0x0004000000000000ULL
-#define CMD_ERRCL_DSU 0x0008000000000000ULL
-#define CMD_ERRCL_LDAC 0x0010000000000000ULL
-#define CMD_ERRCL_LDWC 0x0020000000000000ULL
-#define CMD_ERRCL_LDRC 0x0040000000000000ULL
-#define CMD_ERRCL_LDSC 0x0080000000000000ULL
-#define CMD_ERRCL_LDAU 0x0100000000000000ULL
-#define CMD_ERRCL_LDWU 0x0200000000000000ULL
-#define CMD_ERRCL_LDRU 0x0400000000000000ULL
-#define CMD_ERRCL_LDSU 0x0800000000000000ULL
-
-#define CMD_ERRCL_SBDPC 0x1000000000000000ULL
-#define CMD_ERRCL_SBDLC 0x2000000000000000ULL
-#define CMD_ERRCL_TCCP 0x4000000000000000ULL
-#define CMD_ERRCL_TCCD 0x8000000000000000ULL
-#endif /* sun4u */
-
-#ifdef sun4u
-#define CMD_ERRCL_ISL2XXCU(clcode) \
- ((clcode) >= CMD_ERRCL_UCC && (clcode) <= CMD_ERRCL_EDU_BL)
-#define CMD_ERRCL_ISL3XXCU(clcode) \
- ((clcode) >= CMD_ERRCL_L3_UCC && (clcode) <= CMD_ERRCL_L3_MECC)
-
-#define CMD_ERRCL_ISIOXE(clcode) \
- (((clcode) & (CMD_ERRCL_IOCE | CMD_ERRCL_IOUE)) != 0)
-#else /* sun4u */
-/*
- * If changing the CMD_ERRCL_ISL2XXCU definition, should also
- * change all the lines below it.
- */
-#define CMD_ERRCL_ISL2XXCU(clcode) \
- (((clcode) >= CMD_ERRCL_LDAC && (clcode) <= CMD_ERRCL_LDSU) || \
- ((clcode) >= CMD_ERRCL_IL2U && (clcode) <= CMD_ERRCL_DL2U))
-
-#define CMD_ERRCL_ISMISCREGS(clcode) \
- ((clcode) >= CMD_ERRCL_SBDPC && (clcode) <= CMD_ERRCL_TCCD)
-
-#define CMD_ERRCL_ISL2CE(clcode) \
- (((clcode) >= CMD_ERRCL_LDAC && (clcode) <= CMD_ERRCL_LDSC) || \
- (clcode == CMD_ERRCL_CBCE))
-
-#define CMD_ERRCL_ISL2ND(clcode) \
- ((clcode) >= CMD_ERRCL_L2ND && (clcode) <= CMD_ERRCL_DL2ND)
-
-#define CMD_ERRCL_ISMEM(clcode) \
- ((clcode & (CMD_ERRCL_DAU | CMD_ERRCL_DBU | CMD_ERRCL_FBU)) != 0)
-
-#define CMD_ERRCL_ISDCDP(clcode) \
- (clcode == CMD_ERRCL_DCDP)
-
-#define CMD_ERRCL_ISICDP(clcode) \
- (clcode == CMD_ERRCL_ICDP)
-
-#define CMD_ERRCL_L2UE_WRITEBACK(clcode) \
- ((clcode & (CMD_ERRCL_LDWU | CMD_ERRCL_WBUE)) != 0)
-
-#define CMD_ERRCL_REMOTEL2(clcode) \
- ((clcode & (CMD_ERRCL_WBUE | CMD_ERRCL_CBCE)) != 0)
-
-#endif /* sun4u */
-
-#ifdef sun4v
-#define L2_ERR 1
-#define MISCREGS_ERR 2
-#define L2ND_ERR 3
-#define MEM_ERR 4
-#define DCDP_ERR 5
-#define ICDP_ERR 6
-#define REMOTE_L2ERR 7
-#define UNKNOWN_ERR 8
-#endif
-
-
-#define CMD_ERRCL_MATCH(clcode, mask) \
- (((clcode) & (mask)) != 0)
-
-typedef uint64_t cmd_errcl_t;
-
-/*
- * Use low order 2 bits of cmd_errcl_t in order to pass cpu grouping level.
- * The DE never shipped with code using low order 3 bits.
- */
-
-#define CMD_ERRCL_LEVEL_EXTRACT 0X0000000000000003ULL
-#define CMD_ERRCL_LEVEL_MASK 0XFFFFFFFFFFFFFFF8ULL
-
-#define CMD_STAT_BUMP(name) cmd.cmd_stats->name.fmds_value.ui64++
-
-#define CMD_FLTMAXCONF 95 /* maximum confidence for faults */
-
-struct cmd_xxcu_trw;
-
-typedef struct cmd_stat {
- fmd_stat_t bad_det; /* # of malformed detectors */
- fmd_stat_t bad_cpu_asru; /* # of malformed cpu-scheme ASRUs */
- fmd_stat_t bad_mem_asru; /* # of malformed mem-scheme ASRUs */
- fmd_stat_t bad_close; /* # of inapplicable case closes */
- fmd_stat_t old_erpt; /* # of erpts for removed components */
- fmd_stat_t cpu_creat; /* # of CPU state structs created */
- fmd_stat_t dimm_creat; /* # of DIMM state structs created */
- fmd_stat_t bank_creat; /* # of bank state structs created */
- fmd_stat_t page_creat; /* # of page state structs created */
- fmd_stat_t cache_creat; /* # of cache state structs created */
- fmd_stat_t ce_unknown; /* # of unknown CEs seen */
- fmd_stat_t ce_interm; /* # of intermittent CEs seen */
- fmd_stat_t ce_ppersis; /* # of possible persistent CEs seen */
- fmd_stat_t ce_persis; /* # of persistent CEs seen */
- fmd_stat_t ce_leaky; /* # of leaky CEs seen */
- /* # of possible sticky CEs: */
- fmd_stat_t ce_psticky_noptnr; /* - no valid partner test */
- fmd_stat_t ce_psticky_ptnrnoerr; /* - partner could not see CE */
- fmd_stat_t ce_psticky_ptnrclrd; /* - partner could fix CE */
- fmd_stat_t ce_sticky; /* # of sticky CEs seen */
- fmd_stat_t xxu_ue_match; /* # of xxUs that matched in a UE $ */
- fmd_stat_t xxu_retr_flt; /* # of xxUs unnecessary by fault */
- fmd_stat_t cpu_migrat; /* # of CPUs migrated to new version */
- fmd_stat_t dimm_migrat; /* # of DIMMs migrated to new version */
- fmd_stat_t bank_migrat; /* # of banks migrated to new version */
-#ifdef sun4u
- fmd_stat_t dp_ignored_ce; /* # of CEs ignored due to DP flt/err */
- fmd_stat_t dp_ignored_ue; /* # of UEs ignored due to DP fault */
- fmd_stat_t dp_deferred_ue; /* # of UEs deferred due to DP error */
-#endif
-#ifdef sun4v
- fmd_stat_t branch_creat; /* # of branch state structs created */
-#endif
-} cmd_stat_t;
-
-typedef struct cmd_serd {
- const char *cs_name;
- uint_t cs_n;
- hrtime_t cs_t;
-} cmd_serd_t;
-
-typedef struct cmd {
- cmd_list_t cmd_cpus; /* List of CPU state structures */
- cmd_list_t cmd_dimms; /* List of DIMM state structures */
- cmd_list_t cmd_banks; /* List of bank state structures */
- cmd_list_t cmd_pages; /* List of page state structures */
- cmd_list_t cmd_iorxefrx; /* List of IOxE/RxE/FRx correlation */
-#ifdef sun4u
- cmd_list_t cmd_datapaths; /* List of datapath state structures */
- cmd_list_t cmd_deferred_pages; /* Pages deferred due to a DP error */
-#endif
- hrtime_t cmd_iorxefrx_window; /* Max int between IOxE/RxE/FRx pairs */
- cmd_stat_t *cmd_stats; /* Module statistics */
- size_t cmd_pagesize; /* Page size, in bytes */
- uint64_t cmd_pagemask; /* Mask for page alignments */
- char cmd_ecache_dev[MAXPATHLEN]; /* Mem ctrlr drv path for E$ flush */
- struct cmd_xxcu_trw *cmd_xxcu_trw; /* Array of xxC/U train waiters */
- size_t cmd_xxcu_ntrw; /* Number of waiters in array */
- hrtime_t cmd_xxcu_trdelay; /* Delay for xxC/U redelivery */
- cmd_list_t cmd_xxcu_redelivs; /* Pending xxC/U redeliveries */
- cmd_serd_t cmd_l2data_serd; /* Params for L2$ SERD engine */
- cmd_serd_t cmd_l3data_serd; /* Params for L3$ SERD engine */
- uint64_t cmd_thresh_tpct_sysmem; /* Pg ret warning thresh (% of mem) */
- uint64_t cmd_thresh_abs_sysmem; /* Pg ret warning thresh (# of pages) */
- uint64_t cmd_thresh_abs_badrw; /* Bad r/w retire thresh (# of pages) */
- cmd_serd_t cmd_miscregs_serd; /* params for misregs serd */
- cmd_serd_t cmd_dcache_serd; /* params for dcache serd */
- cmd_serd_t cmd_icache_serd; /* params for icache serd */
- uint32_t cmd_low_ce_thresh; /* low ce thershold */
- uint32_t cmd_hi_ce_thresh; /* hi ce threshold */
- uint32_t cmd_dupce; /* max 5b CEs */
- uint32_t cmd_nupos; /* min number of equal upos */
-#ifdef sun4u
- uint16_t cmd_dp_flag; /* datapath error in progress if set */
-#endif
-#ifdef sun4v
- cmd_list_t cmd_branches; /* List of branches state structures */
- uint64_t cmd_delta_ena; /* the sun4v train delta ena */
-#endif
- nvlist_t *cmd_auth; /* DE's fault authority value */
-} cmd_t;
-
-extern cmd_t cmd;
-
-extern int cmd_set_errno(int);
-
-extern void *cmd_buf_read(fmd_hdl_t *, fmd_case_t *, const char *, size_t);
-extern void cmd_bufname(char *, size_t, const char *, ...);
-extern void cmd_vbufname(char *, size_t, const char *, va_list);
-extern nvlist_t *cmd_nvl_create_fault(fmd_hdl_t *,
- const char *, uint8_t, nvlist_t *, nvlist_t *, nvlist_t *);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _CMD_H */
diff --git a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_Lxcache.h b/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_Lxcache.h
deleted file mode 100644
index 488439183b..0000000000
--- a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_Lxcache.h
+++ /dev/null
@@ -1,206 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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.
- */
-
-#ifndef _CMD_LxCACHE_H
-#define _CMD_LxCACHE_H
-
-/*
- * Routines for the creation of Lxcache retirement faults and for the
- * management of Lxcache-related state.
- */
-
-#include <cmd_state.h>
-#include <cmd_cpu.h>
-#include <cmd_fmri.h>
-
-#include <fm/fmd_api.h>
-#include <sys/types.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define QTCLR 1
-#define CMD_ANON_WAY -1
-#define MAX_WAYS 8
-#define HUNDRED_PERCENT 100
-#define SUSPECT_PERCENT 50
-
-#define CMD_LxCACHE_F_ACTIVE 0x0
-#define CMD_LxCACHE_F_FAULTING 0x1
-#define CMD_LxCACHE_F_RETIRED 0x2
-#define CMD_LxCACHE_F_UNRETIRED 0x4
-#define CMD_LxCACHE_F_RERETIRED 0x8
-
-#define LxCACHE_MKVERSION(version) ((version) << 4 | 1)
-
-#define CMD_LxCACHE_VERSION_1 LxCACHE_MKVERSION(1) /* 17 */
-#define CMD_LxCACHE_VERSION CMD_LxCACHE_VERSION_1
-
-#define CMD_LxCACHE_VERSIONED(Lxcache) ((Lxcache)->Lxcache_version & 1)
-
-#define MAX_FMRI_LEN 128
-
-#define IS_TAG(type) ((type == CMD_PTR_CPU_L2TAG) ||\
- (type == CMD_PTR_CPU_L3TAG))
-
-typedef struct cmd_Lxcache_pers {
- cmd_header_t Lxcachep_header; /* Nodetype must be CMD_NT_LxCACHE */
- /*
- * We need the cpu_hdr_bufname in order to restore the Lxcache.
- */
- char Lxcachep_cpu_hdr_bufname[CMD_BUFNMLEN];
- uint_t Lxcachep_version;
- cmd_fmri_t Lxcachep_asru; /* ASRU for this LxCACHE */
- char Lxcachep_retired_fmri[MAX_FMRI_LEN];
- cmd_ptrsubtype_t Lxcachep_type; /* L2 or L3 */
- uint32_t Lxcachep_index; /* cache index Lxcache represents */
- uint32_t Lxcachep_way; /* cache way this Lxcache represents */
- uint16_t Lxcachep_bit; /* bit in Lxcache that has fault */
- uint_t Lxcachep_flags; /* CMD_MEM_F_* */
- uint_t Lxreason; /* Suspicion or convicted */
-} cmd_Lxcache_pers_t;
-
-#define CMD_LXFUNCTIONING 0 /* Initial value */
-#define CMD_LXSUSPICIOUS 0x1
-#define CMD_LXSUSPECT_DATA 0x1
-#define CMD_LXCONVICTED 0x2
-#define CMD_LXSUSPECT_0_TAG 0x4
-#define CMD_LXSUSPECT_1_TAG 0x8
-#define CMD_LXSUSPICIOUS_BY_ASSOCIATION 0x10
-#define CMD_LXCONVICTED_BY_ASSOCIATION 0x20
-
-typedef struct cmd_Lxcache {
- cmd_Lxcache_pers_t Lxcache_pers;
- int Lxcache_retry_count; /* retry count for recheck taga */
- id_t Lxcache_timeout_id;
- cmd_errcl_t Lxcache_clcode;
- char *Lxcache_class;
- fmd_event_t *Lxcache_ep;
- nvlist_t *Lxcache_nvl;
- char *Lxcache_serdnm; /* SERD to hold the ep during */
- /* recheck of tags */
- cmd_case_t Lxcache_case; /* Open CE case against this Lxcache */
- cmd_xr_t *xr; /* The associated XR struct */
-} cmd_Lxcache_t;
-
-#define Lxcache_header Lxcache_pers.Lxcachep_header
-#define Lxcache_nodetype Lxcache_pers.Lxcachep_header.hdr_nodetype
-#define Lxcache_bufname Lxcache_pers.Lxcachep_header.hdr_bufname
-#define Lxcache_cpu_bufname Lxcache_pers.Lxcachep_cpu_hdr_bufname
-#define Lxcache_version Lxcache_pers.Lxcachep_version
-#define Lxcache_asru Lxcache_pers.Lxcachep_asru
-#define Lxcache_asru_nvl Lxcache_pers.Lxcachep_asru.fmri_nvl
-#define Lxcache_flags Lxcache_pers.Lxcachep_flags
-#define Lxcache_type Lxcache_pers.Lxcachep_type
-#define Lxcache_index Lxcache_pers.Lxcachep_index
-#define Lxcache_way Lxcache_pers.Lxcachep_way
-#define Lxcache_bit Lxcache_pers.Lxcachep_bit
-#define Lxcache_retired_fmri Lxcache_pers.Lxcachep_retired_fmri
-#define Lxcache_reason Lxcache_pers.Lxreason
-#define Lxcache_list Lxcache_header.hdr_list
-
-/*
- * Lxcache retirement
- *
- * When a Lxcache is to be retired, these routines are called to generate and
- * manage a fault.memory.Lxcache against the Lxcache.
- */
-#ifdef sun4u
-extern int cmd_cache_ce_panther(fmd_hdl_t *, fmd_event_t *, cmd_xr_t *);
-extern int cmd_xr_pn_cache_fill(fmd_hdl_t *, nvlist_t *, cmd_xr_t *,
- cmd_cpu_t *, cmd_errcl_t);
-#endif
-extern cmd_evdisp_t cmd_us4plus_tag_err(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- cmd_cpu_t *, cmd_ptrsubtype_t,
- const char *, const char *, const char *, cmd_errcl_t);
-extern void cmd_Lxcache_close(fmd_hdl_t *, void *);
-extern void cmd_Lxcache_write(fmd_hdl_t *, cmd_Lxcache_t *);
-
-extern cmd_Lxcache_t *cmd_Lxcache_create(fmd_hdl_t *, cmd_xr_t *xr,
- cmd_cpu_t *, nvlist_t *, cmd_ptrsubtype_t, int32_t, int8_t, int16_t);
-
-extern cmd_Lxcache_t *cmd_Lxcache_lookup_by_type_index_way_bit(cmd_cpu_t *,
- cmd_ptrsubtype_t, int32_t, int8_t, int16_t);
-
-extern cmd_Lxcache_t *
-cmd_Lxcache_lookup_by_index_way(cmd_cpu_t *, cmd_ptrsubtype_t,
- int32_t, int8_t);
-extern cmd_Lxcache_t *
-cmd_Lxcache_lookup_by_type_index_way_reason(cmd_cpu_t *, cmd_ptrsubtype_t,
- int32_t, int8_t, int32_t);
-extern cmd_Lxcache_t *
-cmd_Lxcache_lookup_by_type_index_bit_reason(cmd_cpu_t *, cmd_ptrsubtype_t,
- int32_t, int16_t, int32_t);
-extern int8_t cmd_Lxcache_get_next_retirable_way(cmd_cpu_t *, int32_t,
- cmd_ptrsubtype_t, int8_t);
-extern int8_t cmd_Lxcache_get_lowest_retirable_way(cmd_cpu_t *,
- int32_t, cmd_ptrsubtype_t);
-extern void cmd_Lxcache_destroy_anonymous_serd_engines(fmd_hdl_t *,
- cmd_cpu_t *, cmd_ptrsubtype_t, int32_t, int16_t);
-extern const char *cmd_type_to_str(cmd_ptrsubtype_t);
-extern const char *cmd_reason_to_str(int);
-extern const char *cmd_flags_to_str(int);
-extern boolean_t cmd_Lxcache_unretire(fmd_hdl_t *, cmd_cpu_t *,
- cmd_Lxcache_t *, const char *);
-extern boolean_t cmd_Lxcache_retire(fmd_hdl_t *, cmd_cpu_t *,
- cmd_Lxcache_t *, const char *, uint_t);
-extern int cmd_Lx_repair_rsrc(fmd_hdl_t *, nvlist_t *);
-extern ssize_t cmd_fmri_nvl2str(fmd_hdl_t *hdl, nvlist_t *nvl, char *,
- size_t);
-extern void cmd_Lxcache_dirty(fmd_hdl_t *, cmd_Lxcache_t *);
-extern void *cmd_Lxcache_restore(fmd_hdl_t *, fmd_case_t *, cmd_case_ptr_t *);
-extern void cmd_Lxcache_validate(fmd_hdl_t *, cmd_cpu_t *);
-extern void cmd_Lxcache_destroy(fmd_hdl_t *, cmd_cpu_t *, cmd_Lxcache_t *);
-extern void cmd_Lxcache_free(fmd_hdl_t *, cmd_cpu_t *, cmd_Lxcache_t *, int);
-extern void cmd_Lxcache_fini(fmd_hdl_t *, cmd_cpu_t *);
-extern char *cmd_Lxcache_serdnm_create(fmd_hdl_t *, uint32_t, cmd_ptrsubtype_t,
- int32_t, int8_t, int16_t);
-extern char *cmd_Lxcache_anonymous_serdnm_create(fmd_hdl_t *, uint32_t,
- cmd_ptrsubtype_t, int32_t, int8_t, int16_t);
-extern void cmd_Lxcache_gc(fmd_hdl_t *);
-extern void cmd_Lxcache_fault(fmd_hdl_t *, cmd_cpu_t *, cmd_Lxcache_t *,
- const char *, nvlist_t *, uint_t);
-extern cmd_evdisp_t get_tagdata(cmd_cpu_t *, cmd_ptrsubtype_t,
- int32_t, uint64_t *);
-
-extern int get_cpu_retired_ways(cmd_cpu_t *, cmd_ptrsubtype_t);
-extern int get_index_retired_ways(cmd_cpu_t *, cmd_ptrsubtype_t, int32_t);
-extern int is_index_way_retired(cmd_cpu_t *, cmd_ptrsubtype_t, int32_t,
- int8_t);
-extern void cmd_fault_the_cpu(fmd_hdl_t *, cmd_cpu_t *, cmd_ptrsubtype_t,
- const char *);
-extern uint32_t cmd_Lx_index_count_type1_ways(cmd_cpu_t *);
-extern uint32_t cmd_Lx_index_count_type2_ways(cmd_cpu_t *);
-extern void cmd_Lxcache_anonymous_tag_error_timeout(fmd_hdl_t *, id_t);
-extern cmd_Lxcache_t *cmd_Lxcache_lookup_by_timeout_id(id_t);
-extern boolean_t cmd_create_case_for_Lxcache(fmd_hdl_t *, cmd_cpu_t *,
- cmd_Lxcache_t *);
-extern int test_mode;
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _CMD_LxCACHE_H */
diff --git a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_bank.c b/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_bank.c
deleted file mode 100644
index f58ad6acb9..0000000000
--- a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_bank.c
+++ /dev/null
@@ -1,383 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include <cmd_mem.h>
-#include <cmd_bank.h>
-#include <cmd_dimm.h>
-#include <cmd.h>
-
-#include <errno.h>
-#include <string.h>
-#include <strings.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <fm/fmd_api.h>
-#include <sys/fm/protocol.h>
-#include <sys/mem.h>
-#include <sys/nvpair.h>
-
-void
-cmd_bank_add_dimm(fmd_hdl_t *hdl, cmd_bank_t *bank, cmd_dimm_t *dimm)
-{
- cmd_bank_memb_t *bm;
-
- fmd_hdl_debug(hdl, "attaching dimm %s to bank %s\n", dimm->dimm_unum,
- bank->bank_unum);
-
- dimm->dimm_bank = bank;
-
- bm = fmd_hdl_zalloc(hdl, sizeof (cmd_bank_memb_t), FMD_SLEEP);
- bm->bm_dimm = dimm;
- cmd_list_append(&bank->bank_dimms, bm);
-}
-
-void
-cmd_bank_remove_dimm(fmd_hdl_t *hdl, cmd_bank_t *bank, cmd_dimm_t *dimm)
-{
- cmd_bank_memb_t *bm;
-
- fmd_hdl_debug(hdl, "detaching dimm %s from bank %s\n", dimm->dimm_unum,
- bank->bank_unum);
-
- for (bm = cmd_list_next(&bank->bank_dimms); bm != NULL;
- bm = cmd_list_next(bm)) {
- if (bm->bm_dimm != dimm)
- continue;
-
- cmd_list_delete(&bank->bank_dimms, bm);
- dimm->dimm_bank = NULL;
- fmd_hdl_free(hdl, bm, sizeof (cmd_bank_memb_t));
- return;
- }
-
- fmd_hdl_abort(hdl, "attempt to disconnect dimm from non-parent bank\n");
-}
-
-static void
-bank_dimmlist_create(fmd_hdl_t *hdl, cmd_bank_t *bank)
-{
- cmd_dimm_t *dimm;
-
- for (dimm = cmd_list_next(&cmd.cmd_dimms); dimm != NULL;
- dimm = cmd_list_next(dimm)) {
- if (fmd_nvl_fmri_contains(hdl, bank->bank_asru_nvl,
- dimm->dimm_asru_nvl))
- cmd_bank_add_dimm(hdl, bank, dimm);
- }
-}
-
-static void
-bank_dimmlist_free(fmd_hdl_t *hdl, cmd_bank_t *bank)
-{
- cmd_bank_memb_t *bm;
-
- while ((bm = cmd_list_next(&bank->bank_dimms)) != NULL) {
- cmd_list_delete(&bank->bank_dimms, bm);
- bm->bm_dimm->dimm_bank = NULL;
- fmd_hdl_free(hdl, bm, sizeof (cmd_bank_memb_t));
- }
-}
-
-nvlist_t *
-cmd_bank_fru(cmd_bank_t *bank)
-{
- return (bank->bank_asru_nvl);
-}
-
-nvlist_t *
-cmd_bank_create_fault(fmd_hdl_t *hdl, cmd_bank_t *bank, const char *fltnm,
- uint_t cert)
-{
- return (cmd_nvl_create_fault(hdl, fltnm, cert, bank->bank_asru_nvl,
- bank->bank_asru_nvl, NULL));
-}
-
-static void
-bank_free(fmd_hdl_t *hdl, cmd_bank_t *bank, int destroy)
-{
- if (bank->bank_case.cc_cp != NULL)
- cmd_case_fini(hdl, bank->bank_case.cc_cp, destroy);
-
- bank_dimmlist_free(hdl, bank);
- cmd_fmri_fini(hdl, &bank->bank_asru, destroy);
-
- if (destroy)
- fmd_buf_destroy(hdl, NULL, bank->bank_bufname);
- cmd_list_delete(&cmd.cmd_banks, bank);
- fmd_hdl_free(hdl, bank, sizeof (cmd_bank_t));
-}
-
-void
-cmd_bank_destroy(fmd_hdl_t *hdl, cmd_bank_t *bank)
-{
- fmd_stat_destroy(hdl, 1, &(bank->bank_retstat));
- bank_free(hdl, bank, FMD_B_TRUE);
-}
-
-static cmd_bank_t *
-bank_lookup_by_unum(const char *unum)
-{
- cmd_bank_t *bank;
-
- for (bank = cmd_list_next(&cmd.cmd_banks); bank != NULL;
- bank = cmd_list_next(bank)) {
- if (strcmp(bank->bank_unum, unum) == 0)
- return (bank);
- }
-
- return (NULL);
-}
-
-cmd_bank_t *
-cmd_bank_create(fmd_hdl_t *hdl, nvlist_t *asru)
-{
- cmd_bank_t *bank;
- const char *unum;
-
- if (!fmd_nvl_fmri_present(hdl, asru)) {
- fmd_hdl_debug(hdl, "dimm_lookup: discarding old ereport\n");
- return (NULL);
- }
-
- if ((unum = cmd_fmri_get_unum(asru)) == NULL) {
- CMD_STAT_BUMP(bad_mem_asru);
- return (NULL);
- }
-
- fmd_hdl_debug(hdl, "bank_create: creating new bank %s\n", unum);
- CMD_STAT_BUMP(bank_creat);
-
- bank = fmd_hdl_zalloc(hdl, sizeof (cmd_bank_t), FMD_SLEEP);
- bank->bank_nodetype = CMD_NT_BANK;
- bank->bank_version = CMD_BANK_VERSION;
-
- cmd_bufname(bank->bank_bufname, sizeof (bank->bank_bufname), "bank_%s",
- unum);
- cmd_fmri_init(hdl, &bank->bank_asru, asru, "bank_asru_%s", unum);
-
- (void) nvlist_lookup_string(bank->bank_asru_nvl, FM_FMRI_MEM_UNUM,
- (char **)&bank->bank_unum);
-
- bank_dimmlist_create(hdl, bank);
-
- cmd_mem_retirestat_create(hdl, &bank->bank_retstat, bank->bank_unum, 0,
- CMD_BANK_STAT_PREFIX);
-
- cmd_list_append(&cmd.cmd_banks, bank);
- cmd_bank_dirty(hdl, bank);
-
- return (bank);
-}
-
-cmd_bank_t *
-cmd_bank_lookup(fmd_hdl_t *hdl, nvlist_t *asru)
-{
- cmd_bank_t *bank;
- const char *unum;
-
- if ((unum = cmd_fmri_get_unum(asru)) == NULL) {
- CMD_STAT_BUMP(bad_mem_asru);
- return (NULL);
- }
-
- bank = bank_lookup_by_unum(unum);
-
- if (bank != NULL && !fmd_nvl_fmri_present(hdl, bank->bank_asru_nvl)) {
- fmd_hdl_debug(hdl, "bank_lookup: discarding old bank\n");
- cmd_bank_destroy(hdl, bank);
- return (NULL);
- }
-
- return (bank);
-}
-
-static cmd_bank_t *
-bank_v0tov1(fmd_hdl_t *hdl, cmd_bank_0_t *old, size_t oldsz)
-{
- cmd_bank_t *new;
-
- if (oldsz != sizeof (cmd_bank_0_t)) {
- fmd_hdl_abort(hdl, "size of state doesn't match size of "
- "version 0 state (%u bytes).\n", sizeof (cmd_bank_0_t));
- }
-
- new = fmd_hdl_zalloc(hdl, sizeof (cmd_bank_t), FMD_SLEEP);
- new->bank_header = old->bank0_header;
- new->bank_version = CMD_BANK_VERSION;
- new->bank_asru = old->bank0_asru;
- new->bank_nretired = old->bank0_nretired;
-
- fmd_hdl_free(hdl, old, oldsz);
- return (new);
-}
-
-static cmd_bank_t *
-bank_wrapv1(fmd_hdl_t *hdl, cmd_bank_pers_t *pers, size_t psz)
-{
- cmd_bank_t *bank;
-
- if (psz != sizeof (cmd_bank_pers_t)) {
- fmd_hdl_abort(hdl, "size of state doesn't match size of "
- "version 1 state (%u bytes).\n", sizeof (cmd_bank_pers_t));
- }
-
- bank = fmd_hdl_zalloc(hdl, sizeof (cmd_bank_t), FMD_SLEEP);
- bcopy(pers, bank, sizeof (cmd_bank_pers_t));
- fmd_hdl_free(hdl, pers, psz);
- return (bank);
-}
-
-void *
-cmd_bank_restore(fmd_hdl_t *hdl, fmd_case_t *cp, cmd_case_ptr_t *ptr)
-{
- cmd_bank_t *bank;
-
- for (bank = cmd_list_next(&cmd.cmd_banks); bank != NULL;
- bank = cmd_list_next(bank)) {
- if (strcmp(bank->bank_bufname, ptr->ptr_name) == 0)
- break;
- }
-
- if (bank == NULL) {
- int migrated = 0;
- size_t banksz;
-
- fmd_hdl_debug(hdl, "restoring bank from %s\n", ptr->ptr_name);
-
- if ((banksz = fmd_buf_size(hdl, NULL, ptr->ptr_name)) == 0) {
- fmd_hdl_abort(hdl, "bank referenced by case %s does "
- "not exist in saved state\n",
- fmd_case_uuid(hdl, cp));
- } else if (banksz > CMD_BANK_MAXSIZE ||
- banksz < CMD_BANK_MINSIZE) {
- fmd_hdl_abort(hdl, "bank buffer referenced by case %s "
- "is out of bounds (is %u bytes, max %u, min %u)\n",
- fmd_case_uuid(hdl, cp), banksz,
- CMD_BANK_MAXSIZE, CMD_BANK_MAXSIZE);
- }
-
- if ((bank = cmd_buf_read(hdl, NULL, ptr->ptr_name,
- banksz)) == NULL) {
- fmd_hdl_abort(hdl, "failed to read bank buf %s",
- ptr->ptr_name);
- }
-
- fmd_hdl_debug(hdl, "found %d in version field\n",
- bank->bank_version);
-
- if (CMD_BANK_VERSIONED(bank)) {
- switch (bank->bank_version) {
- case CMD_BANK_VERSION_1:
- bank = bank_wrapv1(hdl, (cmd_bank_pers_t *)bank,
- banksz);
- break;
- default:
- fmd_hdl_abort(hdl, "unknown version (found %d) "
- "for bank state referenced by case %s.\n",
- bank->bank_version, fmd_case_uuid(hdl, cp));
- break;
- }
- } else {
- bank = bank_v0tov1(hdl, (cmd_bank_0_t *)bank, banksz);
- migrated = 1;
- }
-
- if (migrated) {
- CMD_STAT_BUMP(bank_migrat);
- cmd_bank_dirty(hdl, bank);
- }
-
- cmd_fmri_restore(hdl, &bank->bank_asru);
-
- if ((errno = nvlist_lookup_string(bank->bank_asru_nvl,
- FM_FMRI_MEM_UNUM, (char **)&bank->bank_unum)) != 0)
- fmd_hdl_abort(hdl, "failed to retrieve nuum from asru");
-
- bank_dimmlist_create(hdl, bank);
-
- cmd_mem_retirestat_create(hdl, &bank->bank_retstat,
- bank->bank_unum, bank->bank_nretired, CMD_BANK_STAT_PREFIX);
-
- cmd_list_append(&cmd.cmd_banks, bank);
- }
-
- switch (ptr->ptr_subtype) {
- case BUG_PTR_BANK_CASE:
- fmd_hdl_debug(hdl, "recovering from out of order page ptr\n");
- cmd_case_redirect(hdl, cp, CMD_PTR_BANK_CASE);
- /*FALLTHROUGH*/
- case CMD_PTR_BANK_CASE:
- cmd_mem_case_restore(hdl, &bank->bank_case, cp, "bank",
- bank->bank_unum);
- break;
- default:
- fmd_hdl_abort(hdl, "invalid %s subtype %d\n",
- ptr->ptr_name, ptr->ptr_subtype);
- }
-
- return (bank);
-}
-
-void
-cmd_bank_validate(fmd_hdl_t *hdl)
-{
- cmd_bank_t *bank, *next;
-
- for (bank = cmd_list_next(&cmd.cmd_banks); bank != NULL; bank = next) {
- next = cmd_list_next(bank);
-
- if (!fmd_nvl_fmri_present(hdl, bank->bank_asru_nvl))
- cmd_bank_destroy(hdl, bank);
- }
-}
-
-void
-cmd_bank_dirty(fmd_hdl_t *hdl, cmd_bank_t *bank)
-{
- if (fmd_buf_size(hdl, NULL, bank->bank_bufname) !=
- sizeof (cmd_bank_pers_t))
- fmd_buf_destroy(hdl, NULL, bank->bank_bufname);
-
- /* No need to rewrite the FMRIs in the bank - they don't change */
- fmd_buf_write(hdl, NULL, bank->bank_bufname, &bank->bank_pers,
- sizeof (cmd_bank_pers_t));
-}
-
-void
-cmd_bank_gc(fmd_hdl_t *hdl)
-{
- cmd_bank_validate(hdl);
-}
-
-void
-cmd_bank_fini(fmd_hdl_t *hdl)
-{
- cmd_bank_t *bank;
-
- while ((bank = cmd_list_next(&cmd.cmd_banks)) != NULL)
- bank_free(hdl, bank, FMD_B_FALSE);
-}
diff --git a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_bank.h b/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_bank.h
deleted file mode 100644
index cd6bfd8d96..0000000000
--- a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_bank.h
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _CMD_BANK_H
-#define _CMD_BANK_H
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-/*
- * Collections of memory modules are known as banks, and are described by
- * the cmd_bank general-purpose state structure. The bank structure --
- * cmd_bank_t -- is itself comprised of a persistent (cmd_bank_pers_t) and
- * dynamic (the rest of cmd_bank_t) portions. While we'd prefer to associate
- * errors with individual modules, some errors (UEs) may only be attributed to
- * a bank of modules. This structure is used to track the UEs. Links are made
- * (via bank_dimms) to the known memory modules that comprise the bank. Note
- * that memory modules are discovered lazily - as ereports naming them are
- * processed. As such, the bank_dimms list may be empty, or may only list a
- * subset of the modules in the bank.
- *
- * Data structures:
- *
- * ,--------. ,--------.
- * |bank | <---- |case_ptr| (CMD_PTR_BANK_CASE)
- * | | `--------'
- * |,-------| ,-------------.
- * ,->||asru_t | ----> |packed nvlist|
- * | |`-------| `-------------'
- * `--| unum | ,---------. ,---------.
- * | dimms | ----> |bank_memb| ----> |bank_memb| ----> ...
- * `--------' `---------' `---------'
- * | |
- * V V
- * dimm buffer dimm buffer
- *
- * Data structure P? Case? Notes
- * ---------------- --- ----- -------------------------------------
- * cmd_bank_pers_t Yes No Name is unum-derived ("bank_%s")
- * cmd_case_ptr_t Yes Yes Name is case's UUID
- * bank_asru Yes No Name is unum-derived ("bank_asru_%d")
- * bank_unum No No Pointer into ASRU - relinked during restore
- * bank_dimms No No Recreated during restore
- */
-
-#include <cmd_mem.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Tracks the discovered DIMMs that make up a given bank. Only DIMMs that have
- * experienced errors independently of the bank will be included in this list.
- */
-typedef struct cmd_bank_memb {
- cmd_list_t bm_list; /* Memory module list */
- cmd_dimm_t *bm_dimm; /* This memory module */
-} cmd_bank_memb_t;
-
-/*
- * The bank structure started life without a version number. Making things more
- * complicated, the version number in the new struct occupies the space used for
- * the case pointer in the non-versioned struct. We therefore have to use
- * somewhat unorthodox version numbers so as to allow us to easily tell the
- * difference between a version number and a case pointer. Case pointers will
- * be zero or (this being SPARC), a value with the bottom two bits clear. Our
- * version numbers will begin with 0x11, and will increase by 0x10 each time.
- */
-
-#define BANK_MKVERSION(version) ((version) << 4 | 1)
-
-#define CMD_BANK_VERSION_1 BANK_MKVERSION(1) /* 17 */
-#define CMD_BANK_VERSION CMD_DIMM_VERSION_1
-
-#define CMD_BANK_VERSIONED(bank) ((bank)->bank_version & 1)
-
-#define CMD_BANK_STAT_PREFIX "b" /* b = bank */
-
-typedef struct cmd_bank_0 {
- cmd_header_t bank0_header; /* Nodetype must be CMD_NT_BANK */
- fmd_case_t *bank0_case; /* Open UE case against this bank */
- cmd_fmri_t bank0_asru; /* ASRU for this bank */
- const char *bank0_unum; /* This bank's name (ptr into ASRU) */
- cmd_list_t bank0_dimms; /* List of discovered DIMMs in bank */
- uint_t bank0_wrnthresh; /* # of pages retired before warning */
- uint_t bank0_nretired; /* # ret'd pages for UEs in bank */
-} cmd_bank_0_t;
-
-/* Portion of the bank structure which must be persisted */
-typedef struct cmd_bank_pers {
- cmd_header_t bankp_header; /* Nodetype must be CMD_NT_BANK */
- uint_t bankp_version; /* Version of this persistent buffer */
- cmd_fmri_t bankp_asru; /* ASRU for this bank */
- uint_t bankp_flags; /* CMD_MEM_F_* */
- uint_t bankp_nretired; /* # ret'd pages for UEs in bank */
-} cmd_bank_pers_t;
-
-/* Persistent and dynamic bank data */
-struct cmd_bank {
- cmd_bank_pers_t bank_pers; /* Persistent data for this bank */
- const char *bank_unum; /* This bank's name (ptr into ASRU) */
- cmd_list_t bank_dimms; /* List of discovered DIMMs in bank */
- cmd_case_t bank_case; /* Open UE case against this bank */
- fmd_stat_t bank_retstat; /* Publicizes num of page retirements */
-};
-
-#define CMD_BANK_MAXSIZE \
- MAX(sizeof (cmd_bank_0_t), sizeof (cmd_bank_pers_t))
-#define CMD_BANK_MINSIZE \
- MIN(sizeof (cmd_bank_0_t), sizeof (cmd_bank_pers_t))
-
-#define bank_header bank_pers.bankp_header
-#define bank_nodetype bank_pers.bankp_header.hdr_nodetype
-#define bank_bufname bank_pers.bankp_header.hdr_bufname
-#define bank_version bank_pers.bankp_version
-#define bank_asru bank_pers.bankp_asru
-#define bank_asru_nvl bank_pers.bankp_asru.fmri_nvl
-#define bank_flags bank_pers.bankp_flags
-#define bank_nretired bank_pers.bankp_nretired
-
-extern cmd_bank_t *cmd_bank_lookup(fmd_hdl_t *, nvlist_t *);
-extern cmd_bank_t *cmd_bank_create(fmd_hdl_t *, nvlist_t *);
-
-extern nvlist_t *cmd_bank_fru(cmd_bank_t *);
-extern nvlist_t *cmd_bank_create_fault(fmd_hdl_t *, cmd_bank_t *, const char *,
- uint_t);
-
-extern void cmd_bank_add_dimm(fmd_hdl_t *, cmd_bank_t *, cmd_dimm_t *);
-extern void cmd_bank_remove_dimm(fmd_hdl_t *, cmd_bank_t *, cmd_dimm_t *);
-
-extern void cmd_bank_dirty(fmd_hdl_t *, cmd_bank_t *);
-extern void *cmd_bank_restore(fmd_hdl_t *, fmd_case_t *, cmd_case_ptr_t *);
-extern void cmd_bank_destroy(fmd_hdl_t *, cmd_bank_t *);
-extern void cmd_bank_validate(fmd_hdl_t *);
-extern void cmd_bank_gc(fmd_hdl_t *);
-extern void cmd_bank_fini(fmd_hdl_t *);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _CMD_BANK_H */
diff --git a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_cpu.c b/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_cpu.c
deleted file mode 100644
index 266af44b0d..0000000000
--- a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_cpu.c
+++ /dev/null
@@ -1,2420 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- * Copyright (c) 2019 Peter Tribble.
- */
-
-/*
- * Support routines for managing per-CPU state.
- */
-
-#include <cmd_cpu.h>
-
-#ifdef sun4u
-#include <cmd_ecache.h>
-#endif /* sun4u */
-
-#include <cmd_mem.h>
-#include <cmd.h>
-
-#include <stdio.h>
-#include <string.h>
-#include <strings.h>
-#include <errno.h>
-#include <kstat.h>
-#include <fm/fmd_api.h>
-#include <sys/async.h>
-#include <sys/fm/protocol.h>
-
-#ifdef sun4u
-#include <sys/cheetahregs.h>
-#include <sys/fm/cpu/UltraSPARC-III.h>
-#include <cmd_opl.h>
-#include <cmd_Lxcache.h>
-#else /* sun4u */
-#include <sys/niagararegs.h>
-#include <sys/fm/cpu/UltraSPARC-T1.h>
-#include <cmd_hc_sun4v.h>
-#endif /* sun4u */
-
-#define CMD_CPU_UEC_INCR 10
-
-/* Must be in sync with cmd_cpu_type_t */
-static const char *const cpu_names[] = {
- NULL,
- "ultraSPARC-III",
- "ultraSPARC-IIIplus",
- "ultraSPARC-IIIi",
- "ultraSPARC-IV",
- "ultraSPARC-IVplus",
- "ultraSPARC-IIIiplus",
- "ultraSPARC-T1",
- "SPARC64-VI",
- "SPARC64-VII",
- "ultraSPARC-T2",
- "ultraSPARC-T2plus"
-};
-
-/*
- * This needs to be in sync with cpu_family_t.
- */
-static const faminfo_t fam_info_tbl[] = {
- { CMD_CPU_FAM_UNSUPPORTED, B_FALSE },
- { CMD_CPU_FAM_CHEETAH, B_TRUE },
- { CMD_CPU_FAM_NIAGARA, B_FALSE },
- { CMD_CPU_FAM_SPARC64, B_FALSE }
-};
-
-static cmd_cpu_t *cpu_lookup_by_cpuid(uint32_t, uint8_t);
-static cmd_cpu_t *cpu_create(fmd_hdl_t *, nvlist_t *, uint32_t,
- uint8_t, cmd_cpu_type_t);
-static void cpu_buf_write(fmd_hdl_t *, cmd_cpu_t *);
-
-const char *
-cmd_cpu_type2name(fmd_hdl_t *hdl, cmd_cpu_type_t type)
-{
- if (type < 1 || type > sizeof (cpu_names) / sizeof (char *))
- fmd_hdl_abort(hdl, "illegal CPU type %d\n", type);
-
- return (cpu_names[type]);
-}
-
-static cmd_cpu_type_t
-cpu_nname2type(fmd_hdl_t *hdl, const char *name, size_t n)
-{
- int i;
-
- for (i = 1; i < sizeof (cpu_names) / sizeof (char *); i++) {
- if (strlen(cpu_names[i]) == n &&
- strncmp(cpu_names[i], name, n) == 0)
- return (i);
- }
-
- fmd_hdl_abort(hdl, "illegal CPU name %*.*s\n", n, n, name);
- /*NOTREACHED*/
- return (0);
-}
-
-const char *fmd_fmri_get_platform();
-#define is_serengeti (strcmp(fmd_fmri_get_platform(), \
-"SUNW,Sun-Fire") == 0)
-
-static void
-core2cpus(uint32_t core, cmd_cpu_type_t type, uint8_t level,
- uint32_t *cpuinit, uint32_t *cpufinal, uint32_t *cpustep)
-{
- switch (type) {
-#ifdef sun4u
-
-#define US4P_SGTI_CPUS_PER_CORE 2
-#define US4P_SGTI_CPU_CORE_STEP 512
-#define US4P_DAKC_CPUS_PER_CORE 2
-#define US4P_DAKC_CPU_CORE_STEP 16
-
- case CPU_ULTRASPARC_IVplus:
- switch (level) {
- case CMD_CPU_LEVEL_CORE:
- if (is_serengeti)
- *cpustep = US4P_SGTI_CPU_CORE_STEP;
- else
- *cpustep = US4P_DAKC_CPU_CORE_STEP;
- *cpuinit = core;
- *cpufinal = *cpuinit + *cpustep;
- return;
- default:
- *cpuinit = *cpufinal = core;
- *cpustep = 1;
- return;
- }
-#else /* i.e. sun4v */
-
-#define UST1_CPUS_PER_CORE 4
-#define UST1_CPU_CORE_STEP 1
-#define UST1_CPUS_PER_CHIP 32
-#define UST1_CPU_CHIP_STEP 1
-#define UST2_CPUS_PER_CORE 8
-#define UST2_CPU_CORE_STEP 1
-#define UST2_CPUS_PER_CHIP 64
-#define UST2_CPU_CHIP_STEP 1
-
- case CPU_ULTRASPARC_T1:
- switch (level) {
- case CMD_CPU_LEVEL_CORE:
- *cpuinit = core * UST1_CPUS_PER_CORE;
- *cpufinal = *cpuinit + UST1_CPUS_PER_CORE - 1;
- *cpustep = UST1_CPU_CORE_STEP;
- return;
- case CMD_CPU_LEVEL_CHIP:
- *cpuinit = core * UST1_CPUS_PER_CHIP;
- *cpufinal = *cpuinit + UST1_CPUS_PER_CHIP - 1;
- *cpustep = UST1_CPU_CHIP_STEP;
- return;
- default:
- *cpuinit = *cpufinal = core;
- *cpustep = 1;
- return;
- }
- case CPU_ULTRASPARC_T2:
- case CPU_ULTRASPARC_T2plus:
- switch (level) {
- case CMD_CPU_LEVEL_CORE:
- *cpuinit = core * UST2_CPUS_PER_CORE;
- *cpufinal = *cpuinit + UST2_CPUS_PER_CORE - 1;
- *cpustep = UST2_CPU_CORE_STEP;
- return;
- case CMD_CPU_LEVEL_CHIP:
- *cpuinit = core * UST2_CPUS_PER_CHIP;
- *cpufinal = *cpuinit + UST2_CPUS_PER_CHIP - 1;
- *cpustep = UST2_CPU_CHIP_STEP;
- return;
- default:
- *cpuinit = *cpufinal = core;
- *cpustep = 1;
- return;
- }
-
-#endif /* sun4u */
- default:
- *cpuinit = *cpufinal = core;
- *cpustep = 1;
- return;
- }
-}
-
-uint32_t
-cmd_cpu2core(uint32_t cpuid, cmd_cpu_type_t type, uint8_t level)
-{
- switch (type) {
-#ifdef sun4u
-
- case CPU_ULTRASPARC_IVplus:
- switch (level) {
- case CMD_CPU_LEVEL_CORE:
- if (is_serengeti)
- return (cpuid % US4P_SGTI_CPU_CORE_STEP);
- else
- return (cpuid % US4P_DAKC_CPU_CORE_STEP);
- default:
- return (cpuid);
- }
-#else /* i.e. sun4v */
- case CPU_ULTRASPARC_T1:
- switch (level) {
- case CMD_CPU_LEVEL_CORE:
- return (cpuid/UST1_CPUS_PER_CORE);
- case CMD_CPU_LEVEL_CHIP:
- return (cpuid/UST1_CPUS_PER_CHIP);
- default:
- return (cpuid);
- }
- case CPU_ULTRASPARC_T2:
- case CPU_ULTRASPARC_T2plus:
- switch (level) {
- case CMD_CPU_LEVEL_CORE:
- return (cpuid/UST2_CPUS_PER_CORE);
- case CMD_CPU_LEVEL_CHIP:
- return (cpuid/UST2_CPUS_PER_CHIP);
- default:
- return (cpuid);
- }
-
-#endif /* sun4u */
- default:
- return (cpuid);
- }
-}
-
-#ifdef sun4u
-static void
-cpu_uec_write(fmd_hdl_t *hdl, cmd_cpu_t *cpu, cmd_cpu_uec_t *uec)
-{
- /*
- * The UE cache may change size. fmd expects statically-sized buffers,
- * so we must delete and re-create it if the size has changed from the
- * last time it was written.
- */
- if (fmd_buf_size(hdl, NULL, uec->uec_bufname) != sizeof (uint64_t) *
- uec->uec_nent)
- fmd_buf_destroy(hdl, NULL, uec->uec_bufname);
-
- if (uec->uec_cache != NULL) {
- fmd_buf_write(hdl, NULL, uec->uec_bufname, uec->uec_cache,
- sizeof (uint64_t) * uec->uec_nent);
- }
-
- cpu_buf_write(hdl, cpu);
-}
-
-static void
-cpu_uec_create(fmd_hdl_t *hdl, cmd_cpu_t *cpu, cmd_cpu_uec_t *uec,
- const char *fmt, ...)
-{
- va_list ap;
-
- va_start(ap, fmt);
- cmd_vbufname(uec->uec_bufname, sizeof (uec->uec_bufname), fmt, ap);
- va_end(ap);
-
- cpu_uec_write(hdl, cpu, uec);
-}
-
-static void
-cpu_uec_restore(fmd_hdl_t *hdl, cmd_cpu_uec_t *uec)
-{
- if (uec->uec_cache != NULL) {
- uec->uec_cache = cmd_buf_read(hdl, NULL, uec->uec_bufname,
- sizeof (uint64_t) * uec->uec_nent);
- }
-}
-
-static void
-cpu_uec_free(fmd_hdl_t *hdl, cmd_cpu_uec_t *uec, int destroy)
-{
- if (uec->uec_cache == NULL)
- return;
-
- if (destroy)
- fmd_buf_destroy(hdl, NULL, uec->uec_bufname);
-
- fmd_hdl_free(hdl, uec->uec_cache, sizeof (uint64_t) * uec->uec_nent);
-}
-
-static void
-cpu_uec_flush_finish(fmd_hdl_t *hdl, cmd_cpu_t *cpu)
-{
- fmd_hdl_debug(hdl, "completing UE cache flush\n");
- if (cpu->cpu_olduec.uec_cache != NULL) {
- fmd_hdl_free(hdl, cpu->cpu_olduec.uec_cache, sizeof (uint64_t) *
- cpu->cpu_olduec.uec_nent);
-
- cpu->cpu_olduec.uec_cache = NULL;
- cpu->cpu_olduec.uec_nent = 0;
- cpu->cpu_olduec.uec_flags = 0;
- cpu_uec_write(hdl, cpu, &cpu->cpu_olduec);
- }
-
- cpu->cpu_uec_flush = 0;
- cpu_buf_write(hdl, cpu);
-}
-
-static void
-cpu_uec_flush(fmd_hdl_t *hdl, cmd_cpu_t *cpu)
-{
- if (cpu->cpu_uec.uec_cache == NULL && !cpu->cpu_uec.uec_flags)
- return; /* nothing to flush */
-
- fmd_hdl_debug(hdl, "flushing UE cache for CPU %d\n", cpu->cpu_cpuid);
-
- if (cmd_ecache_flush(cpu->cpu_cpuid) < 0) {
- fmd_hdl_debug(hdl, "failed to flush E$ for CPU %d\n",
- cpu->cpu_cpuid);
- return; /* don't flush the UE cache unless we can flush E$ */
- }
-
- if (cpu->cpu_olduec.uec_cache != NULL) {
- /*
- * If there's already an old UE cache, we're racing with another
- * flush. For safety, we'll add the current contents of the
- * cache to the existing old cache.
- */
- size_t nent = cpu->cpu_olduec.uec_nent + cpu->cpu_uec.uec_nent;
- uint64_t *new = fmd_hdl_alloc(hdl, sizeof (uint64_t) * nent,
- FMD_SLEEP);
-
- bcopy(cpu->cpu_olduec.uec_cache, new,
- sizeof (uint64_t) * cpu->cpu_olduec.uec_nent);
- bcopy(cpu->cpu_uec.uec_cache, new + cpu->cpu_olduec.uec_nent,
- sizeof (uint64_t) * cpu->cpu_uec.uec_nent);
-
- fmd_hdl_free(hdl, cpu->cpu_olduec.uec_cache,
- sizeof (uint64_t) * cpu->cpu_olduec.uec_nent);
- fmd_hdl_free(hdl, cpu->cpu_uec.uec_cache,
- sizeof (uint64_t) * cpu->cpu_uec.uec_nent);
-
- cpu->cpu_olduec.uec_cache = new;
- cpu->cpu_olduec.uec_nent = nent;
- cpu->cpu_olduec.uec_flags |= cpu->cpu_uec.uec_flags;
- } else {
- cpu->cpu_olduec.uec_cache = cpu->cpu_uec.uec_cache;
- cpu->cpu_olduec.uec_nent = cpu->cpu_uec.uec_nent;
- cpu->cpu_olduec.uec_flags = cpu->cpu_uec.uec_flags;
- }
- cpu_uec_write(hdl, cpu, &cpu->cpu_olduec);
-
- cpu->cpu_uec.uec_cache = NULL;
- cpu->cpu_uec.uec_nent = 0;
- cpu->cpu_uec.uec_flags = 0;
- cpu_uec_write(hdl, cpu, &cpu->cpu_uec);
-
- if (cpu->cpu_uec_flush != 0)
- fmd_timer_remove(hdl, cpu->cpu_uec_flush);
-
- cpu->cpu_uec_flush = fmd_timer_install(hdl,
- (void *)CMD_TIMERTYPE_CPU_UEC_FLUSH, NULL, NANOSEC);
- cpu_buf_write(hdl, cpu);
-}
-
-void
-cmd_cpu_uec_add(fmd_hdl_t *hdl, cmd_cpu_t *cpu, uint64_t pa)
-{
- cmd_cpu_uec_t *uec = &cpu->cpu_uec;
- uint64_t *new, *tgt = NULL;
- int i;
-
- pa = pa & cmd.cmd_pagemask;
-
- fmd_hdl_debug(hdl, "adding 0x%llx to CPU %d's UE cache\n",
- (u_longlong_t)pa, cpu->cpu_cpuid);
-
- if (uec->uec_cache != NULL) {
- for (tgt = NULL, i = 0; i < uec->uec_nent; i++) {
- if (tgt == NULL && uec->uec_cache[i] == 0)
- tgt = &uec->uec_cache[i];
-
- if (uec->uec_cache[i] == pa)
- return; /* already there */
- }
- }
-
- if (tgt == NULL) {
- /* no space - resize the cache */
- new = fmd_hdl_zalloc(hdl, sizeof (uint64_t) *
- (uec->uec_nent + CMD_CPU_UEC_INCR), FMD_SLEEP);
-
- if (uec->uec_cache != NULL) {
- bcopy(uec->uec_cache, new, sizeof (uint64_t) *
- uec->uec_nent);
- fmd_hdl_free(hdl, uec->uec_cache, sizeof (uint64_t) *
- uec->uec_nent);
- }
-
- uec->uec_cache = new;
- tgt = &uec->uec_cache[uec->uec_nent];
- uec->uec_nent += CMD_CPU_UEC_INCR;
- }
-
- *tgt = pa;
- cpu_uec_write(hdl, cpu, uec);
-}
-
-void
-cmd_cpu_uec_set_allmatch(fmd_hdl_t *hdl, cmd_cpu_t *cpu)
-{
- fmd_hdl_debug(hdl, "setting cpu %d's uec to allmatch\n",
- cpu->cpu_cpuid);
-
- cpu->cpu_uec.uec_flags |= CPU_UEC_F_ALLMATCH;
- cpu_uec_write(hdl, cpu, &cpu->cpu_uec);
-
- if (++cpu->cpu_uec_nflushes <= CPU_UEC_FLUSH_MAX)
- cpu_uec_flush(hdl, cpu);
-}
-
-int
-cmd_cpu_uec_match(cmd_cpu_t *cpu, uint64_t pa)
-{
- int i;
-
- /*
- * The UE cache works as long as we are able to add an entry for every
- * UE seen by a given CPU. If we see a UE with a non-valid AFAR, we
- * can't guarantee our ability to filter a corresponding xxU, and must,
- * for safety, assume that every subsequent xxU (until the E$ and UE
- * cache are flushed) has a matching UE.
- */
- if ((cpu->cpu_uec.uec_flags & CPU_UEC_F_ALLMATCH) ||
- (cpu->cpu_olduec.uec_flags & CPU_UEC_F_ALLMATCH))
- return (1);
-
- pa = pa & cmd.cmd_pagemask;
-
- for (i = 0; i < cpu->cpu_uec.uec_nent; i++) {
- if (cpu->cpu_uec.uec_cache[i] == pa)
- return (1);
- }
-
- for (i = 0; i < cpu->cpu_olduec.uec_nent; i++) {
- if (cpu->cpu_olduec.uec_cache[i] == pa)
- return (1);
- }
-
- return (0);
-}
-#endif /* sun4u */
-
-void
-cmd_xr_write(fmd_hdl_t *hdl, cmd_xr_t *xr)
-{
- fmd_hdl_debug(hdl, "writing redelivery clcode %llx for case %s\n",
- xr->xr_clcode, fmd_case_uuid(hdl, xr->xr_case));
-
- fmd_buf_write(hdl, xr->xr_case, "redelivery", xr,
- sizeof (cmd_xr_t));
-}
-
-static cmd_xr_hdlr_f *
-cmd_xr_id2hdlr(fmd_hdl_t *hdl, uint_t id)
-{
- switch (id) {
- case CMD_XR_HDLR_XXC:
- return (cmd_xxc_resolve);
- case CMD_XR_HDLR_XXU:
- return (cmd_xxu_resolve);
- case CMD_XR_HDLR_NOP:
- return (cmd_nop_resolve);
- default:
- fmd_hdl_abort(hdl, "cmd_xr_id2hdlr called with bad hdlrid %x\n",
- id);
- }
-
- return (NULL);
-}
-
-cmd_xr_t *
-cmd_xr_create(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl,
- cmd_cpu_t *cpu, cmd_errcl_t clcode)
-{
- cmd_xr_t *xr = fmd_hdl_zalloc(hdl, sizeof (cmd_xr_t),
- FMD_SLEEP);
- nvlist_t *rsrc = NULL;
- const char *uuid;
- int err = 0;
-
- err |= nvlist_lookup_uint64(nvl, FM_EREPORT_ENA, &xr->xr_ena);
-
- err |= cmd_xr_fill(hdl, nvl, xr, clcode);
-#ifdef sun4u
- err |= cmd_xr_pn_cache_fill(hdl, nvl, xr, cpu, clcode);
-#endif
- (void) nvlist_lookup_nvlist(nvl, FM_EREPORT_PAYLOAD_NAME_RESOURCE,
- &rsrc);
-
- if (err != 0) {
- fmd_hdl_free(hdl, xr, sizeof (cmd_xr_t));
- return (NULL);
- }
-
- xr->xr_cpu = cpu;
- xr->xr_cpuid = cpu->cpu_cpuid;
- xr->xr_clcode = clcode;
- xr->xr_case = cmd_case_create(hdl, &cpu->cpu_header,
- CMD_PTR_CPU_XR_RETRY, &uuid);
- fmd_case_setprincipal(hdl, xr->xr_case, ep);
-
- if (rsrc != NULL) {
- cmd_fmri_init(hdl, &xr->xr_rsrc, rsrc, "%s_rsrc",
- fmd_case_uuid(hdl, xr->xr_case));
- }
-
- cmd_xr_write(hdl, xr);
- return (xr);
-}
-
-cmd_evdisp_t
-cmd_xr_reschedule(fmd_hdl_t *hdl, cmd_xr_t *xr, uint_t hdlrid)
-{
-
- fmd_hdl_debug(hdl, "scheduling redelivery of %llx with xr %p\n",
- xr->xr_clcode, xr);
-
- xr->xr_hdlrid = hdlrid;
- xr->xr_hdlr = cmd_xr_id2hdlr(hdl, hdlrid);
-
- xr->xr_id = fmd_timer_install(hdl, (void *)CMD_TIMERTYPE_CPU_XR_WAITER,
- NULL, cmd.cmd_xxcu_trdelay);
-
- if (xr->xr_ref++ == 0)
- cmd_list_append(&cmd.cmd_xxcu_redelivs, xr);
-
- cmd_xr_write(hdl, xr);
- return (CMD_EVD_OK);
-}
-
-static void
-cmd_xr_destroy(fmd_hdl_t *hdl, cmd_xr_t *xr)
-{
- fmd_hdl_debug(hdl, "destroying xr (clcode %llx) at %p\n",
- xr->xr_clcode, xr);
-
- fmd_case_reset(hdl, xr->xr_case);
- cmd_case_fini(hdl, xr->xr_case, FMD_B_TRUE);
-
- if (xr->xr_rsrc_nvl != NULL)
- cmd_fmri_fini(hdl, &xr->xr_rsrc, FMD_B_TRUE);
-
- fmd_buf_destroy(hdl, xr->xr_case, "redelivery");
- fmd_hdl_free(hdl, xr, sizeof (cmd_xr_t));
-}
-
-void
-cmd_xr_deref(fmd_hdl_t *hdl, cmd_xr_t *xr)
-{
- if (xr->xr_ref == 0)
- fmd_hdl_abort(hdl, "attempt to deref xr with zero ref\n");
-
- fmd_hdl_debug(hdl, "deref xr %p [%d]\n", xr, xr->xr_ref);
-
- if (--xr->xr_ref == 0) {
- cmd_list_delete(&cmd.cmd_xxcu_redelivs, xr);
- cmd_xr_destroy(hdl, xr);
- }
-}
-
-static void
-cmd_xr_restore(fmd_hdl_t *hdl, cmd_cpu_t *cpu, fmd_case_t *cp)
-{
- cmd_xr_t *xr;
-
- if ((xr = cmd_buf_read(hdl, cp, "redelivery", sizeof (cmd_xr_t))) ==
- NULL) {
- fmd_hdl_abort(hdl, "failed to find redelivery for case %s\n",
- fmd_case_uuid(hdl, cp));
- }
-
- xr->xr_case = cp;
- xr->xr_hdlr = cmd_xr_id2hdlr(hdl, xr->xr_hdlrid);
- if (xr->xr_rsrc_nvl != NULL)
- cmd_fmri_restore(hdl, &xr->xr_rsrc);
- xr->xr_cpu = cpu;
-
- /*
- * fmd is still in the process of starting up. If we reschedule this
- * event with the normal redelivery timeout, it'll get redelivered
- * before initialization has completed, we'll potentially fail to
- * match the train, deref() the waiter (causing any subsequent side-
- * effects to miss the waiter), and use this ereport to blame the CPU.
- * The other side-effects will blame the CPU too, since we'll have
- * deref()'d the waiter out of existence. We can get up to three
- * additions to the SERD engine this way, which is bad. To keep that
- * from happening, we're going to schedule an arbitrarily long timeout,
- * which *should* be long enough. It's pretty bad, but there's no
- * real way to keep the other side-effects from taking out the CPU.
- */
- xr->xr_id = fmd_timer_install(hdl, (void *)CMD_TIMERTYPE_CPU_XR_WAITER,
- NULL, fmd_prop_get_int64(hdl, "xxcu_restart_delay"));
-
- cmd_list_append(&cmd.cmd_xxcu_redelivs, xr);
-
- fmd_hdl_debug(hdl, "revived xr for class %llx\n", xr->xr_clcode);
-}
-
-typedef struct cmd_xxcu_train {
- cmd_errcl_t tr_mask; /* errors we must see to match this train */
- cmd_errcl_t tr_cause; /* the error at the root of this train */
-} cmd_xxcu_train_t;
-
-#define CMD_TRAIN(cause, side_effects) { (cause) | (side_effects), (cause) }
-
-static const cmd_xxcu_train_t cmd_xxcu_trains[] = {
-#ifdef sun4u
- /* UCC: WDC */
- CMD_TRAIN(CMD_ERRCL_UCC, CMD_ERRCL_WDC),
-
- /* UCU: WDU, WDU+L3_WDU */
- CMD_TRAIN(CMD_ERRCL_UCU, CMD_ERRCL_WDU),
- CMD_TRAIN(CMD_ERRCL_UCU, CMD_ERRCL_L3_WDU | CMD_ERRCL_WDU),
-
- /* EDC: WDC */
- CMD_TRAIN(CMD_ERRCL_EDC, CMD_ERRCL_WDC),
-
- /* EDU: WDU, WDU+L3_WDU */
- CMD_TRAIN(CMD_ERRCL_EDU_ST, CMD_ERRCL_WDU),
- CMD_TRAIN(CMD_ERRCL_EDU_BL, CMD_ERRCL_WDU),
- CMD_TRAIN(CMD_ERRCL_EDU_ST, CMD_ERRCL_L3_WDU | CMD_ERRCL_WDU),
- CMD_TRAIN(CMD_ERRCL_EDU_BL, CMD_ERRCL_L3_WDU | CMD_ERRCL_WDU),
-
- /* CPC: WDC, EDC+WDC, UCC+WDC, EDC+UCC+WDC */
- CMD_TRAIN(CMD_ERRCL_CPC, CMD_ERRCL_WDC),
- CMD_TRAIN(CMD_ERRCL_CPC, CMD_ERRCL_EDC | CMD_ERRCL_WDC),
- CMD_TRAIN(CMD_ERRCL_CPC, CMD_ERRCL_UCC | CMD_ERRCL_WDC),
- CMD_TRAIN(CMD_ERRCL_CPC, CMD_ERRCL_EDC | CMD_ERRCL_UCC |
- CMD_ERRCL_WDC),
-
- /* CPU: WDU, WDU+L3_WDU, UCU+WDU, UCU+WDU+L3_WDU */
- CMD_TRAIN(CMD_ERRCL_CPU, CMD_ERRCL_WDU),
- CMD_TRAIN(CMD_ERRCL_CPU, CMD_ERRCL_L3_WDU | CMD_ERRCL_WDU),
- CMD_TRAIN(CMD_ERRCL_CPU, CMD_ERRCL_UCU | CMD_ERRCL_WDU),
- CMD_TRAIN(CMD_ERRCL_CPU, CMD_ERRCL_UCU | CMD_ERRCL_L3_WDU |
- CMD_ERRCL_WDU),
-
- /* CPU: EDU+WDU, EDU+WDU+L3_WDU, EDU+UCU+WDU, EDU+UCU+WDU+L3_WDU */
- CMD_TRAIN(CMD_ERRCL_CPU, CMD_ERRCL_EDU_ST | CMD_ERRCL_WDU),
- CMD_TRAIN(CMD_ERRCL_CPU, CMD_ERRCL_EDU_BL | CMD_ERRCL_WDU),
- CMD_TRAIN(CMD_ERRCL_CPU, CMD_ERRCL_EDU_ST | CMD_ERRCL_EDU_BL |
- CMD_ERRCL_WDU),
- CMD_TRAIN(CMD_ERRCL_CPU, CMD_ERRCL_EDU_ST | CMD_ERRCL_WDU |
- CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_CPU, CMD_ERRCL_EDU_BL | CMD_ERRCL_WDU |
- CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_CPU, CMD_ERRCL_EDU_ST | CMD_ERRCL_EDU_BL |
- CMD_ERRCL_WDU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_CPU, CMD_ERRCL_EDU_ST | CMD_ERRCL_UCU |
- CMD_ERRCL_WDU),
- CMD_TRAIN(CMD_ERRCL_CPU, CMD_ERRCL_EDU_BL | CMD_ERRCL_UCU |
- CMD_ERRCL_WDU),
- CMD_TRAIN(CMD_ERRCL_CPU, CMD_ERRCL_EDU_ST | CMD_ERRCL_EDU_BL |
- CMD_ERRCL_UCU | CMD_ERRCL_WDU),
- CMD_TRAIN(CMD_ERRCL_CPU, CMD_ERRCL_EDU_ST | CMD_ERRCL_UCU |
- CMD_ERRCL_WDU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_CPU, CMD_ERRCL_EDU_BL | CMD_ERRCL_UCU |
- CMD_ERRCL_WDU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_CPU, CMD_ERRCL_EDU_ST | CMD_ERRCL_EDU_BL |
- CMD_ERRCL_UCU | CMD_ERRCL_WDU | CMD_ERRCL_L3_WDU),
-
- /* WDU: L3_WDU */
- CMD_TRAIN(CMD_ERRCL_WDU, CMD_ERRCL_L3_WDU),
-
- /* L3_UCC: WDC+(zero or more of EDC, CPC, UCC) */
- CMD_TRAIN(CMD_ERRCL_L3_UCC, CMD_ERRCL_WDC),
- CMD_TRAIN(CMD_ERRCL_L3_UCC, CMD_ERRCL_WDC | CMD_ERRCL_EDC),
- CMD_TRAIN(CMD_ERRCL_L3_UCC, CMD_ERRCL_WDC | CMD_ERRCL_CPC),
- CMD_TRAIN(CMD_ERRCL_L3_UCC, CMD_ERRCL_WDC | CMD_ERRCL_UCC),
- CMD_TRAIN(CMD_ERRCL_L3_UCC, CMD_ERRCL_WDC | CMD_ERRCL_EDC |
- CMD_ERRCL_CPC),
- CMD_TRAIN(CMD_ERRCL_L3_UCC, CMD_ERRCL_WDC | CMD_ERRCL_EDC |
- CMD_ERRCL_UCC),
- CMD_TRAIN(CMD_ERRCL_L3_UCC, CMD_ERRCL_WDC | CMD_ERRCL_CPC |
- CMD_ERRCL_UCC),
- CMD_TRAIN(CMD_ERRCL_L3_UCC, CMD_ERRCL_WDC | CMD_ERRCL_EDC |
- CMD_ERRCL_CPC | CMD_ERRCL_UCC),
-
- /* L3_UCU: WDU+(zero or more of EDU, CPU, UCU) */
- CMD_TRAIN(CMD_ERRCL_L3_UCU, CMD_ERRCL_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_UCU, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST),
- CMD_TRAIN(CMD_ERRCL_L3_UCU, CMD_ERRCL_WDU | CMD_ERRCL_EDU_BL),
- CMD_TRAIN(CMD_ERRCL_L3_UCU, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_EDU_BL),
- CMD_TRAIN(CMD_ERRCL_L3_UCU, CMD_ERRCL_WDU | CMD_ERRCL_CPU),
- CMD_TRAIN(CMD_ERRCL_L3_UCU, CMD_ERRCL_WDU | CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_UCU, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_CPU),
- CMD_TRAIN(CMD_ERRCL_L3_UCU, CMD_ERRCL_WDU | CMD_ERRCL_EDU_BL |
- CMD_ERRCL_CPU),
- CMD_TRAIN(CMD_ERRCL_L3_UCU, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_CPU),
- CMD_TRAIN(CMD_ERRCL_L3_UCU, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_UCU, CMD_ERRCL_WDU | CMD_ERRCL_EDU_BL |
- CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_UCU, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_UCU, CMD_ERRCL_WDU | CMD_ERRCL_CPU |
- CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_UCU, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_CPU | CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_UCU, CMD_ERRCL_WDU | CMD_ERRCL_EDU_BL |
- CMD_ERRCL_CPU | CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_UCU, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_CPU | CMD_ERRCL_UCU),
-
- /* L3_UCU: WDU+(zero or more of EDU, CPU, UCU)+L3_WDU */
- CMD_TRAIN(CMD_ERRCL_L3_UCU, CMD_ERRCL_WDU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_UCU, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_UCU, CMD_ERRCL_WDU | CMD_ERRCL_EDU_BL |
- CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_UCU, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_UCU, CMD_ERRCL_WDU | CMD_ERRCL_CPU |
- CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_UCU, CMD_ERRCL_WDU | CMD_ERRCL_UCU |
- CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_UCU, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_CPU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_UCU, CMD_ERRCL_WDU | CMD_ERRCL_EDU_BL |
- CMD_ERRCL_CPU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_UCU, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_CPU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_UCU, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_UCU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_UCU, CMD_ERRCL_WDU | CMD_ERRCL_EDU_BL |
- CMD_ERRCL_UCU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_UCU, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_UCU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_UCU, CMD_ERRCL_WDU | CMD_ERRCL_CPU |
- CMD_ERRCL_UCU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_UCU, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_CPU | CMD_ERRCL_UCU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_UCU, CMD_ERRCL_WDU | CMD_ERRCL_EDU_BL |
- CMD_ERRCL_CPU | CMD_ERRCL_UCU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_UCU, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_CPU | CMD_ERRCL_UCU |
- CMD_ERRCL_L3_WDU),
-
- /* L3_EDC: WDC+(zero or more of EDC, CPC, UCC) */
- CMD_TRAIN(CMD_ERRCL_L3_EDC, CMD_ERRCL_WDC),
- CMD_TRAIN(CMD_ERRCL_L3_EDC, CMD_ERRCL_WDC | CMD_ERRCL_EDC),
- CMD_TRAIN(CMD_ERRCL_L3_EDC, CMD_ERRCL_WDC | CMD_ERRCL_CPC),
- CMD_TRAIN(CMD_ERRCL_L3_EDC, CMD_ERRCL_WDC | CMD_ERRCL_UCC),
- CMD_TRAIN(CMD_ERRCL_L3_EDC, CMD_ERRCL_WDC | CMD_ERRCL_EDC |
- CMD_ERRCL_CPC),
- CMD_TRAIN(CMD_ERRCL_L3_EDC, CMD_ERRCL_WDC | CMD_ERRCL_EDC |
- CMD_ERRCL_UCC),
- CMD_TRAIN(CMD_ERRCL_L3_EDC, CMD_ERRCL_WDC | CMD_ERRCL_CPC |
- CMD_ERRCL_UCC),
- CMD_TRAIN(CMD_ERRCL_L3_EDC, CMD_ERRCL_WDC | CMD_ERRCL_EDC |
- CMD_ERRCL_CPC | CMD_ERRCL_UCC),
-
- /* L3_EDU: WDU+(zero or more of EDU, CPU, UCU) */
- CMD_TRAIN(CMD_ERRCL_L3_EDU_ST, CMD_ERRCL_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_ST, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_ST, CMD_ERRCL_WDU | CMD_ERRCL_EDU_BL),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_ST, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_EDU_BL),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_ST, CMD_ERRCL_WDU | CMD_ERRCL_CPU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_ST, CMD_ERRCL_WDU | CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_ST, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_CPU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_ST, CMD_ERRCL_WDU | CMD_ERRCL_EDU_BL |
- CMD_ERRCL_CPU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_ST, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_CPU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_ST, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_ST, CMD_ERRCL_WDU | CMD_ERRCL_EDU_BL |
- CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_ST, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_ST, CMD_ERRCL_WDU | CMD_ERRCL_CPU |
- CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_ST, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_CPU | CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_ST, CMD_ERRCL_WDU | CMD_ERRCL_EDU_BL |
- CMD_ERRCL_CPU | CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_ST, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_CPU | CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_BL, CMD_ERRCL_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_BL, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_BL, CMD_ERRCL_WDU | CMD_ERRCL_EDU_BL),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_BL, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_EDU_BL),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_BL, CMD_ERRCL_WDU | CMD_ERRCL_CPU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_BL, CMD_ERRCL_WDU | CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_BL, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_CPU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_BL, CMD_ERRCL_WDU | CMD_ERRCL_EDU_BL |
- CMD_ERRCL_CPU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_BL, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_CPU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_BL, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_BL, CMD_ERRCL_WDU | CMD_ERRCL_EDU_BL |
- CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_BL, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_BL, CMD_ERRCL_WDU | CMD_ERRCL_CPU |
- CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_BL, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_CPU | CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_BL, CMD_ERRCL_WDU | CMD_ERRCL_EDU_BL |
- CMD_ERRCL_CPU | CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_BL, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_CPU | CMD_ERRCL_UCU),
-
- /* L3_EDU: WDU+(zero or more of EDU, CPU, UCU)+L3_WDU */
- CMD_TRAIN(CMD_ERRCL_L3_EDU_ST, CMD_ERRCL_WDU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_ST, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_ST, CMD_ERRCL_WDU | CMD_ERRCL_EDU_BL |
- CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_ST, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_ST, CMD_ERRCL_WDU | CMD_ERRCL_CPU |
- CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_ST, CMD_ERRCL_WDU | CMD_ERRCL_UCU |
- CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_ST, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_CPU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_ST, CMD_ERRCL_WDU | CMD_ERRCL_EDU_BL |
- CMD_ERRCL_CPU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_ST, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_CPU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_ST, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_UCU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_ST, CMD_ERRCL_WDU | CMD_ERRCL_EDU_BL |
- CMD_ERRCL_UCU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_ST, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_UCU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_ST, CMD_ERRCL_WDU | CMD_ERRCL_CPU |
- CMD_ERRCL_UCU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_ST, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_CPU | CMD_ERRCL_UCU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_ST, CMD_ERRCL_WDU | CMD_ERRCL_EDU_BL |
- CMD_ERRCL_CPU | CMD_ERRCL_UCU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_ST, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_CPU | CMD_ERRCL_UCU |
- CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_BL, CMD_ERRCL_WDU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_BL, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_BL, CMD_ERRCL_WDU | CMD_ERRCL_EDU_BL |
- CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_BL, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_BL, CMD_ERRCL_WDU | CMD_ERRCL_CPU |
- CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_BL, CMD_ERRCL_WDU | CMD_ERRCL_UCU |
- CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_BL, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_CPU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_BL, CMD_ERRCL_WDU | CMD_ERRCL_EDU_BL |
- CMD_ERRCL_CPU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_BL, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_CPU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_BL, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_UCU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_BL, CMD_ERRCL_WDU | CMD_ERRCL_EDU_BL |
- CMD_ERRCL_UCU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_BL, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_UCU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_BL, CMD_ERRCL_WDU | CMD_ERRCL_CPU |
- CMD_ERRCL_UCU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_BL, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_CPU | CMD_ERRCL_UCU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_BL, CMD_ERRCL_WDU | CMD_ERRCL_EDU_BL |
- CMD_ERRCL_CPU | CMD_ERRCL_UCU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_EDU_BL, CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_CPU | CMD_ERRCL_UCU |
- CMD_ERRCL_L3_WDU),
-
- /* L3_CPC: L3_WDC */
- CMD_TRAIN(CMD_ERRCL_L3_CPC, CMD_ERRCL_L3_WDC),
-
- /* L3_CPC: L3_EDC+ WDC+(zero or more of EDC, CPC, UCC) */
- CMD_TRAIN(CMD_ERRCL_L3_CPC, CMD_ERRCL_L3_EDC | CMD_ERRCL_WDC),
- CMD_TRAIN(CMD_ERRCL_L3_CPC, CMD_ERRCL_L3_EDC | CMD_ERRCL_WDC |
- CMD_ERRCL_EDC),
- CMD_TRAIN(CMD_ERRCL_L3_CPC, CMD_ERRCL_L3_EDC | CMD_ERRCL_WDC |
- CMD_ERRCL_CPC),
- CMD_TRAIN(CMD_ERRCL_L3_CPC, CMD_ERRCL_L3_EDC | CMD_ERRCL_WDC |
- CMD_ERRCL_UCC),
- CMD_TRAIN(CMD_ERRCL_L3_CPC, CMD_ERRCL_L3_EDC | CMD_ERRCL_WDC |
- CMD_ERRCL_EDC | CMD_ERRCL_CPC),
- CMD_TRAIN(CMD_ERRCL_L3_CPC, CMD_ERRCL_L3_EDC | CMD_ERRCL_WDC |
- CMD_ERRCL_EDC | CMD_ERRCL_UCC),
- CMD_TRAIN(CMD_ERRCL_L3_CPC, CMD_ERRCL_L3_EDC | CMD_ERRCL_WDC |
- CMD_ERRCL_CPC | CMD_ERRCL_UCC),
- CMD_TRAIN(CMD_ERRCL_L3_CPC, CMD_ERRCL_L3_EDC | CMD_ERRCL_WDC |
- CMD_ERRCL_EDC | CMD_ERRCL_CPC | CMD_ERRCL_UCC),
-
- /* L3_CPC: L3_UCC+WDC+(zero or more of EDC, CPC, UCC) */
- CMD_TRAIN(CMD_ERRCL_L3_CPC, CMD_ERRCL_L3_UCC | CMD_ERRCL_WDC),
- CMD_TRAIN(CMD_ERRCL_L3_CPC, CMD_ERRCL_L3_UCC | CMD_ERRCL_WDC |
- CMD_ERRCL_EDC),
- CMD_TRAIN(CMD_ERRCL_L3_CPC, CMD_ERRCL_L3_UCC | CMD_ERRCL_WDC |
- CMD_ERRCL_CPC),
- CMD_TRAIN(CMD_ERRCL_L3_CPC, CMD_ERRCL_L3_UCC | CMD_ERRCL_WDC |
- CMD_ERRCL_UCC),
- CMD_TRAIN(CMD_ERRCL_L3_CPC, CMD_ERRCL_L3_UCC | CMD_ERRCL_WDC |
- CMD_ERRCL_EDC | CMD_ERRCL_CPC),
- CMD_TRAIN(CMD_ERRCL_L3_CPC, CMD_ERRCL_L3_UCC | CMD_ERRCL_WDC |
- CMD_ERRCL_EDC | CMD_ERRCL_UCC),
- CMD_TRAIN(CMD_ERRCL_L3_CPC, CMD_ERRCL_L3_UCC | CMD_ERRCL_WDC |
- CMD_ERRCL_CPC | CMD_ERRCL_UCC),
- CMD_TRAIN(CMD_ERRCL_L3_CPC, CMD_ERRCL_L3_UCC | CMD_ERRCL_WDC |
- CMD_ERRCL_EDC | CMD_ERRCL_CPC | CMD_ERRCL_UCC),
-
- /* L3_CPU: L3_WDU */
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_WDU),
-
- /* L3_CPU: L3_EDU+WDU+(zero or more of EDU, CPU, UCU) */
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST | CMD_ERRCL_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST |
- CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST |
- CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_BL),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_BL),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST |
- CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU | CMD_ERRCL_EDU_BL),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST | CMD_ERRCL_EDU_BL),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST | CMD_ERRCL_EDU_BL),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST |
- CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_EDU_BL),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST | CMD_ERRCL_WDU |
- CMD_ERRCL_CPU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU |
- CMD_ERRCL_CPU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST |
- CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU | CMD_ERRCL_CPU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST | CMD_ERRCL_WDU |
- CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU |
- CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST |
- CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU | CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST | CMD_ERRCL_CPU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST | CMD_ERRCL_CPU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST |
- CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_CPU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_CPU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_CPU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST |
- CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU | CMD_ERRCL_EDU_BL |
- CMD_ERRCL_CPU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST | CMD_ERRCL_EDU_BL | CMD_ERRCL_CPU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST | CMD_ERRCL_EDU_BL | CMD_ERRCL_CPU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST |
- CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_CPU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST | CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST | CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST |
- CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST |
- CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU | CMD_ERRCL_EDU_BL |
- CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST | CMD_ERRCL_EDU_BL | CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST | CMD_ERRCL_EDU_BL | CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST |
- CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST | CMD_ERRCL_WDU |
- CMD_ERRCL_CPU | CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU |
- CMD_ERRCL_CPU | CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST |
- CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU | CMD_ERRCL_CPU |
- CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST | CMD_ERRCL_CPU | CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST | CMD_ERRCL_CPU | CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST |
- CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_CPU | CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_CPU | CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_CPU | CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST |
- CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU | CMD_ERRCL_EDU_BL |
- CMD_ERRCL_CPU | CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST | CMD_ERRCL_EDU_BL | CMD_ERRCL_CPU |
- CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST | CMD_ERRCL_EDU_BL | CMD_ERRCL_CPU |
- CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST |
- CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_CPU | CMD_ERRCL_UCU),
-
- /* L3_CPU: L3_UCU+WDU+(zero or more of EDU, CPU, UCU) */
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_UCU | CMD_ERRCL_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_UCU | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_UCU | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_BL),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_UCU | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST |CMD_ERRCL_EDU_BL),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_UCU | CMD_ERRCL_WDU |
- CMD_ERRCL_CPU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_UCU | CMD_ERRCL_WDU |
- CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_UCU | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST | CMD_ERRCL_CPU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_UCU | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_CPU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_UCU | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST | CMD_ERRCL_EDU_BL | CMD_ERRCL_CPU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_UCU | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST | CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_UCU | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_UCU | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST | CMD_ERRCL_EDU_BL | CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_UCU | CMD_ERRCL_WDU |
- CMD_ERRCL_CPU | CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_UCU | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST | CMD_ERRCL_CPU | CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_UCU | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_CPU | CMD_ERRCL_UCU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_UCU | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST | CMD_ERRCL_EDU_BL | CMD_ERRCL_CPU |
- CMD_ERRCL_UCU),
-
- /* L3_CPU: L3_EDU+WDU+(zero or more of EDU, CPU, UCU)+L3_WDU */
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST | CMD_ERRCL_WDU |
- CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU |
- CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST |
- CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST |
- CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST |
- CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU | CMD_ERRCL_EDU_BL |
- CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST | CMD_ERRCL_EDU_BL | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST | CMD_ERRCL_EDU_BL | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST |
- CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST | CMD_ERRCL_WDU |
- CMD_ERRCL_CPU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU |
- CMD_ERRCL_CPU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST |
- CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU | CMD_ERRCL_CPU |
- CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST | CMD_ERRCL_WDU |
- CMD_ERRCL_UCU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU |
- CMD_ERRCL_UCU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST |
- CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU | CMD_ERRCL_UCU |
- CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST | CMD_ERRCL_CPU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST | CMD_ERRCL_CPU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST |
- CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_CPU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_CPU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_CPU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST |
- CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU | CMD_ERRCL_EDU_BL |
- CMD_ERRCL_CPU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST | CMD_ERRCL_EDU_BL | CMD_ERRCL_CPU |
- CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST | CMD_ERRCL_EDU_BL | CMD_ERRCL_CPU |
- CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST |
- CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_CPU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST | CMD_ERRCL_UCU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST | CMD_ERRCL_UCU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST |
- CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_UCU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_UCU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_UCU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST |
- CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU | CMD_ERRCL_EDU_BL |
- CMD_ERRCL_UCU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST | CMD_ERRCL_EDU_BL | CMD_ERRCL_UCU |
- CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST | CMD_ERRCL_EDU_BL | CMD_ERRCL_UCU |
- CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST |
- CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_UCU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST | CMD_ERRCL_WDU |
- CMD_ERRCL_CPU | CMD_ERRCL_UCU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU |
- CMD_ERRCL_CPU | CMD_ERRCL_UCU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST |
- CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU | CMD_ERRCL_CPU |
- CMD_ERRCL_UCU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST | CMD_ERRCL_CPU | CMD_ERRCL_UCU |
- CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST | CMD_ERRCL_CPU | CMD_ERRCL_UCU |
- CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST |
- CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_CPU | CMD_ERRCL_UCU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_CPU | CMD_ERRCL_UCU |
- CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_CPU | CMD_ERRCL_UCU |
- CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST |
- CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU | CMD_ERRCL_EDU_BL |
- CMD_ERRCL_CPU | CMD_ERRCL_UCU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST | CMD_ERRCL_EDU_BL | CMD_ERRCL_CPU |
- CMD_ERRCL_UCU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST | CMD_ERRCL_EDU_BL | CMD_ERRCL_CPU |
- CMD_ERRCL_UCU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_EDU_ST |
- CMD_ERRCL_L3_EDU_BL | CMD_ERRCL_WDU | CMD_ERRCL_EDU_ST |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_CPU | CMD_ERRCL_UCU |
- CMD_ERRCL_L3_WDU),
-
- /* L3_CPU: L3_UCU+WDU+(zero or more of EDU, CPU, UCU)+L3_WDU */
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_UCU | CMD_ERRCL_WDU
- | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_UCU | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_UCU | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_UCU | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST |CMD_ERRCL_EDU_BL | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_UCU | CMD_ERRCL_WDU |
- CMD_ERRCL_CPU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_UCU | CMD_ERRCL_WDU |
- CMD_ERRCL_UCU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_UCU | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST | CMD_ERRCL_CPU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_UCU | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_CPU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_UCU | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST | CMD_ERRCL_EDU_BL | CMD_ERRCL_CPU |
- CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_UCU | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST | CMD_ERRCL_UCU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_UCU | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_UCU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_UCU | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST | CMD_ERRCL_EDU_BL | CMD_ERRCL_UCU |
- CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_UCU | CMD_ERRCL_WDU |
- CMD_ERRCL_CPU | CMD_ERRCL_UCU | CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_UCU | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST | CMD_ERRCL_CPU | CMD_ERRCL_UCU |
- CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_UCU | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_BL | CMD_ERRCL_CPU | CMD_ERRCL_UCU |
- CMD_ERRCL_L3_WDU),
- CMD_TRAIN(CMD_ERRCL_L3_CPU, CMD_ERRCL_L3_UCU | CMD_ERRCL_WDU |
- CMD_ERRCL_EDU_ST | CMD_ERRCL_EDU_BL | CMD_ERRCL_CPU |
- CMD_ERRCL_UCU | CMD_ERRCL_L3_WDU),
-#else /* sun4u */
- CMD_TRAIN(CMD_ERRCL_LDAC, CMD_ERRCL_LDWC),
- CMD_TRAIN(CMD_ERRCL_LDRC, CMD_ERRCL_LDWC),
- CMD_TRAIN(CMD_ERRCL_LDSC, CMD_ERRCL_LDWC),
- CMD_TRAIN(CMD_ERRCL_CBCE, CMD_ERRCL_LDWC),
- CMD_TRAIN(CMD_ERRCL_LDAU, CMD_ERRCL_LDWU),
- CMD_TRAIN(CMD_ERRCL_LDAU, CMD_ERRCL_WBUE),
- CMD_TRAIN(CMD_ERRCL_LDAU, CMD_ERRCL_DCDP),
- CMD_TRAIN(CMD_ERRCL_LDRU, CMD_ERRCL_LDWU),
- CMD_TRAIN(CMD_ERRCL_LDRU, CMD_ERRCL_WBUE),
- CMD_TRAIN(CMD_ERRCL_LDRU, CMD_ERRCL_DCDP),
- CMD_TRAIN(CMD_ERRCL_LDSU, CMD_ERRCL_LDWU),
- CMD_TRAIN(CMD_ERRCL_LDSU, CMD_ERRCL_WBUE),
- CMD_TRAIN(CMD_ERRCL_LDSU, CMD_ERRCL_DCDP),
- CMD_TRAIN(CMD_ERRCL_SBDLC, CMD_ERRCL_SBDPC),
- CMD_TRAIN(CMD_ERRCL_TCCP, CMD_ERRCL_TCCD),
- CMD_TRAIN(CMD_ERRCL_TCCD, CMD_ERRCL_TCCD),
- CMD_TRAIN(CMD_ERRCL_DBU, CMD_ERRCL_DCDP),
- CMD_TRAIN(CMD_ERRCL_DBU, CMD_ERRCL_ICDP),
- CMD_TRAIN(CMD_ERRCL_FBU, CMD_ERRCL_DCDP),
- CMD_TRAIN(CMD_ERRCL_FBU, CMD_ERRCL_ICDP),
- CMD_TRAIN(CMD_ERRCL_DAU, CMD_ERRCL_DCDP),
- CMD_TRAIN(CMD_ERRCL_DAU, CMD_ERRCL_ICDP),
- /*
- * sun4v also has the following trains, but the train
- * algorithm does an exhaustive search and compare
- * all pairs in the train mask, so we don't need
- * to define these trains
- * dl2nd->ldwu (wbue), dcdp
- * il2nd->ldwu (wbue), icdp
- * dxl2u->ldwu (wbue), dcdp
- * ixl2u->ldwu (wbue), icdp
- */
- CMD_TRAIN(CMD_ERRCL_DL2ND, CMD_ERRCL_DCDP),
- CMD_TRAIN(CMD_ERRCL_DL2ND, CMD_ERRCL_LDWU),
- CMD_TRAIN(CMD_ERRCL_DL2ND, CMD_ERRCL_WBUE),
- CMD_TRAIN(CMD_ERRCL_IL2ND, CMD_ERRCL_ICDP),
- CMD_TRAIN(CMD_ERRCL_IL2ND, CMD_ERRCL_LDWU),
- CMD_TRAIN(CMD_ERRCL_IL2ND, CMD_ERRCL_WBUE),
- CMD_TRAIN(CMD_ERRCL_L2ND, CMD_ERRCL_LDWU),
- CMD_TRAIN(CMD_ERRCL_L2ND, CMD_ERRCL_WBUE),
- CMD_TRAIN(CMD_ERRCL_DL2U, CMD_ERRCL_DCDP),
- CMD_TRAIN(CMD_ERRCL_DL2U, CMD_ERRCL_LDWU),
- CMD_TRAIN(CMD_ERRCL_DL2U, CMD_ERRCL_WBUE),
- CMD_TRAIN(CMD_ERRCL_IL2U, CMD_ERRCL_ICDP),
- CMD_TRAIN(CMD_ERRCL_IL2U, CMD_ERRCL_LDWU),
- CMD_TRAIN(CMD_ERRCL_IL2U, CMD_ERRCL_WBUE),
-#endif /* sun4u */
- CMD_TRAIN(0, 0)
-};
-
-cmd_errcl_t
-cmd_xxcu_train_match(cmd_errcl_t mask)
-{
- int i;
-
- for (i = 0; cmd_xxcu_trains[i].tr_mask != 0; i++) {
- if (cmd_xxcu_trains[i].tr_mask == mask)
- return (cmd_xxcu_trains[i].tr_cause);
- }
-
- return (0);
-}
-
-cmd_xxcu_trw_t *
-cmd_trw_alloc(uint64_t ena, uint64_t afar)
-{
- int i;
-
- for (i = 0; i < cmd.cmd_xxcu_ntrw; i++) {
- cmd_xxcu_trw_t *trw = &cmd.cmd_xxcu_trw[i];
- if (trw->trw_ena == 0) {
- trw->trw_ena = ena;
- trw->trw_afar = afar;
- return (trw);
- }
- }
-
- return (NULL);
-}
-
-void
-cmd_trw_write(fmd_hdl_t *hdl)
-{
- fmd_buf_write(hdl, NULL, "waiters", cmd.cmd_xxcu_trw,
- cmd.cmd_xxcu_ntrw * sizeof (cmd_xxcu_trw_t));
-}
-
-/*ARGSUSED*/
-void
-cmd_trw_ref(fmd_hdl_t *hdl, cmd_xxcu_trw_t *trw, cmd_errcl_t clcode)
-{
- trw->trw_ref++;
- trw->trw_mask |= clcode;
- cmd_trw_write(hdl);
-}
-
-void
-cmd_trw_deref(fmd_hdl_t *hdl, cmd_xxcu_trw_t *trw)
-{
- if (trw->trw_ref == 0)
- fmd_hdl_abort(hdl, "attempt to deref trw with zero ref\n");
-
- if (--trw->trw_ref == 0)
- bzero(trw, sizeof (cmd_xxcu_trw_t));
-
- cmd_trw_write(hdl);
-}
-
-void
-cmd_trw_restore(fmd_hdl_t *hdl)
-{
- size_t sz = fmd_buf_size(hdl, NULL, "waiters");
- if (sz == cmd.cmd_xxcu_ntrw * sizeof (cmd_xxcu_trw_t)) {
- /*
- * Previous size == current size. In absence of
- * versioning, assume that the structure and # of elements
- * have not changed.
- */
- fmd_buf_read(hdl, NULL, "waiters", cmd.cmd_xxcu_trw,
- cmd.cmd_xxcu_ntrw * sizeof (cmd_xxcu_trw_t));
- } else {
- /*
- * Previous size != current size. Something has changed;
- * hence we cannot rely on the contents of this buffer.
- * Delete the buffer and start fresh.
- */
- fmd_buf_destroy(hdl, NULL, "waiters");
- fmd_buf_write(hdl, NULL, "waiters", cmd.cmd_xxcu_trw,
- cmd.cmd_xxcu_ntrw * sizeof (cmd_xxcu_trw_t));
- }
-}
-
-char *
-cmd_cpu_serdnm_create(fmd_hdl_t *hdl, cmd_cpu_t *cpu, const char *serdbase)
-{
- char *nm;
- const char *fmt;
- size_t sz;
- if (cpu->cpu_level == CMD_CPU_LEVEL_THREAD) {
- fmt = "cpu_%d_%s_serd";
- sz = snprintf(NULL, 0, fmt, cpu->cpu_cpuid, serdbase) + 1;
- nm = fmd_hdl_alloc(hdl, sz, FMD_SLEEP);
- (void) snprintf(nm, sz, fmt, cpu->cpu_cpuid, serdbase);
- } else {
- fmt = "cpu_%d_%d_%s_serd";
- sz = snprintf(NULL, 0, fmt, cpu->cpu_cpuid, cpu->cpu_level,
- serdbase) + 1;
- nm = fmd_hdl_alloc(hdl, sz, FMD_SLEEP);
- (void) snprintf(nm, sz, fmt, cpu->cpu_cpuid, cpu->cpu_level,
- serdbase);
- }
-
- return (nm);
-}
-
-/*
- * cmd_cpu_create_faultlist is a combination of the former cmd_cpu_create_fault
- * and fmd_case_add_suspect. If a 'cpu' structure represents a set of threads
- * (level > CMD_CPU_LEVEL_THREAD), then we must add multiple faults to
- * this case, under loop control. Use call to cmd_cpu_create_faultlist to
- * replace the sequence
- *
- * flt = cmd_cpu_create_fault(...);
- * fmd_case_add_suspect(hdl, cc->cp, flt);
- */
-
-void
-cmd_cpu_create_faultlist(fmd_hdl_t *hdl, fmd_case_t *casep, cmd_cpu_t *cpu,
- const char *type, nvlist_t *rsrc, uint_t cert)
-{
- char fltnm[64];
- uint32_t cpuinit, cpufinal, cpustep, i;
- nvlist_t *flt;
-#ifdef sun4v
- char *loc;
- nvlist_t *mb_rsrc;
-#endif
-
- (void) snprintf(fltnm, sizeof (fltnm), "fault.cpu.%s.%s",
- cmd_cpu_type2name(hdl, cpu->cpu_type), type);
-
- cpu->cpu_faulting = FMD_B_TRUE;
- cpu_buf_write(hdl, cpu);
-#ifdef sun4v
-
- loc = cmd_getfru_loc(hdl, cpu->cpu_asru_nvl);
-
- /*
- * Add motherboard fault to t5440 lfu suspect.list.
- */
- if ((strstr(loc, CPUBOARD) != NULL) && (strstr(fltnm, "lfu") != NULL)) {
- /* get mb fmri from libtopo */
- mb_rsrc = init_mb(hdl);
- if (mb_rsrc != NULL) {
- fmd_hdl_debug(hdl, "cmd_cpu: create MB fault\n");
- cert = BK_LFUFAULT_CERT;
- flt = cmd_boardfru_create_fault(hdl, mb_rsrc, fltnm,
- cert, "MB");
- fmd_case_add_suspect(hdl, casep, flt);
- nvlist_free(mb_rsrc);
- }
- }
-#endif
-
- if (cpu->cpu_level > CMD_CPU_LEVEL_THREAD) {
- core2cpus(cpu->cpu_cpuid, cpu->cpu_type, cpu->cpu_level,
- &cpuinit, &cpufinal, &cpustep);
- for (i = cpuinit; i <= cpufinal; i += cpustep) {
- cmd_cpu_t *cpui = cpu_lookup_by_cpuid(i,
- CMD_CPU_LEVEL_THREAD);
- if (cpui == NULL) {
- nvlist_t *asru;
- if (nvlist_dup(cpu->cpu_asru_nvl,
- &asru, 0) != 0) {
- fmd_hdl_abort(hdl, "unable to alloc"
- "ASRU for thread in core\n");
- }
- (void) nvlist_remove_all(asru,
- FM_FMRI_CPU_ID);
- if (nvlist_add_uint32(asru,
- FM_FMRI_CPU_ID, i) != 0) {
- fmd_hdl_abort(hdl,
- "unable to create thread struct\n");
- }
- cpui = cpu_create(hdl, asru, i,
- CMD_CPU_LEVEL_THREAD, cpu->cpu_type);
- nvlist_free(asru);
- }
- if (!fmd_nvl_fmri_present(hdl, cpui->cpu_asru_nvl))
- continue;
- cpui->cpu_faulting = FMD_B_TRUE;
- cpu_buf_write(hdl, cpui);
- flt = cmd_nvl_create_fault(hdl, fltnm, cert,
- cpui->cpu_asru_nvl, cpu->cpu_fru_nvl, rsrc);
-#ifdef sun4v
- flt = cmd_fault_add_location(hdl, flt, loc);
-#endif /* sun4v */
- fmd_case_add_suspect(hdl, casep, flt);
- }
- } else {
- flt = cmd_nvl_create_fault(hdl, fltnm, cert,
- cpu->cpu_asru_nvl, cpu->cpu_fru_nvl, rsrc);
-#ifdef sun4v
- flt = cmd_fault_add_location(hdl, flt, loc);
-
-#endif /* sun4v */
- fmd_case_add_suspect(hdl, casep, flt);
- }
-#ifdef sun4v
- if (loc != NULL)
- fmd_hdl_strfree(hdl, loc);
-#endif
-}
-
-static void
-cmd_cpu_free(fmd_hdl_t *hdl, cmd_cpu_t *cpu, int destroy)
-{
- int i;
-#ifdef sun4u
- cmd_Lxcache_t *Lxcache;
-#endif
-
- for (i = 0; i < sizeof (cmd_cpu_cases_t) / sizeof (cmd_case_t); i++) {
- cmd_case_t *cc = &(((cmd_case_t *)&cpu->cpu_cases)[i]);
-
- if (cc->cc_cp != NULL) {
- cmd_case_fini(hdl, cc->cc_cp, destroy);
- if (cc->cc_serdnm != NULL) {
- if (fmd_serd_exists(hdl, cc->cc_serdnm) &&
- destroy)
- fmd_serd_destroy(hdl, cc->cc_serdnm);
- fmd_hdl_strfree(hdl, cc->cc_serdnm);
- }
- }
- }
-
-#ifdef sun4u
- /*
- * free Lxcache also.
- */
-
- for (Lxcache = cmd_list_next(&cpu->cpu_Lxcaches); Lxcache != NULL;
- Lxcache = cmd_list_next(&cpu->cpu_Lxcaches)) {
- (void) cmd_Lxcache_free(hdl, cpu, Lxcache, destroy);
- }
- cpu_uec_free(hdl, &cpu->cpu_uec, destroy);
- cpu_uec_free(hdl, &cpu->cpu_olduec, destroy);
-#endif /* sun4u */
-
- cmd_fmri_fini(hdl, &cpu->cpu_asru, destroy);
- cmd_fmri_fini(hdl, &cpu->cpu_fru, destroy);
-
- cmd_list_delete(&cmd.cmd_cpus, cpu);
-
- if (destroy)
- fmd_buf_destroy(hdl, NULL, cpu->cpu_bufname);
- fmd_hdl_free(hdl, cpu, sizeof (cmd_cpu_t));
-}
-
-void
-cmd_cpu_destroy(fmd_hdl_t *hdl, cmd_cpu_t *cpu)
-{
- cmd_cpu_free(hdl, cpu, FMD_B_TRUE);
-}
-
-static cmd_cpu_t *
-cpu_lookup_by_cpuid(uint32_t cpuid, uint8_t level)
-{
- cmd_cpu_t *cpu;
-
- for (cpu = cmd_list_next(&cmd.cmd_cpus); cpu != NULL;
- cpu = cmd_list_next(cpu)) {
- if ((cpu->cpu_cpuid == cpuid) &&
- (cpu->cpu_level == level))
- return (cpu);
- }
-
- return (NULL);
-}
-
-static nvlist_t *
-cpu_getfru(fmd_hdl_t *hdl, cmd_cpu_t *cp)
-{
- char *frustr, *partstr, *serialstr;
- nvlist_t *nvlp;
-
- if ((frustr = cmd_cpu_getfrustr(hdl, cp)) == NULL) {
- return (NULL);
- }
- partstr = cmd_cpu_getpartstr(hdl, cp);
- serialstr = cmd_cpu_getserialstr(hdl, cp);
- nvlp = cmd_cpu_mkfru(hdl, frustr, serialstr, partstr);
- fmd_hdl_strfree(hdl, frustr);
- fmd_hdl_strfree(hdl, partstr);
- fmd_hdl_strfree(hdl, serialstr);
-
- return (nvlp);
-}
-
-static void
-cpu_buf_write(fmd_hdl_t *hdl, cmd_cpu_t *cpu)
-{
- if (fmd_buf_size(hdl, NULL, cpu->cpu_bufname) !=
- sizeof (cmd_cpu_pers_t))
- fmd_buf_destroy(hdl, NULL, cpu->cpu_bufname);
-
- fmd_buf_write(hdl, NULL, cpu->cpu_bufname, &cpu->cpu_pers,
- sizeof (cmd_cpu_pers_t));
-}
-
-static void
-cpu_buf_create(fmd_hdl_t *hdl, cmd_cpu_t *cpu)
-{
- size_t sz;
-
- /*
- * We need to be tolerant of leaked CPU buffers, as their effects can
- * be severe. Consider the following scenario: we create a version 0
- * cmd_cpu_t in response to some error, commit it to a persistent
- * buffer, and then leak it. We then upgrade, and restart the DE using
- * version 1 cmd_cpu_t's. Another error comes along, for the same CPU
- * whose struct was leaked. Not knowing about the leaked buffer, we
- * create a new cmd_cpu_t for that CPU, and create a buffer for it. As
- * the v1 cmd_cpu_t is smaller than the v0 cmd_cpu_t, fmd will use the
- * pre-existing (leaked) buffer. We'll therefore have an x-byte, v1
- * cmd_cpu_t in a y-byte buffer, where y > x. Upon the next DE restart,
- * we'll attempt to restore the cmd_cpu_t, but will do version
- * validation using the size of the buffer (y). This won't match what
- * we're expecting (x), and the DE will abort.
- *
- * To protect against such a scenario, we're going to check for and
- * remove the pre-existing cmd_cpu_t for this CPU, if one exists. While
- * this won't fix the leak, it'll allow us to continue functioning
- * properly in spite of it.
- */
- if ((sz = fmd_buf_size(hdl, NULL, cpu->cpu_bufname)) != 0 &&
- sz != sizeof (cmd_cpu_pers_t)) {
- fmd_hdl_debug(hdl, "removing unexpected pre-existing cpu "
- "buffer %s (size %u bytes)\n", cpu->cpu_bufname, sz);
- fmd_buf_destroy(hdl, NULL, cpu->cpu_bufname);
- }
-
- cpu_buf_write(hdl, cpu);
-}
-
-static cmd_cpu_t *
-cpu_create(fmd_hdl_t *hdl, nvlist_t *asru, uint32_t cpuid, uint8_t level,
- cmd_cpu_type_t type)
-{
- cmd_cpu_t *cpu;
- nvlist_t *fru;
-
- /*
- * No CPU state matches the CPU described in the ereport. Create a new
- * one, add it to the list, and pass it back.
- */
- fmd_hdl_debug(hdl, "cpu_lookup: creating new cpuid %u\n", cpuid);
- CMD_STAT_BUMP(cpu_creat);
-
- cpu = fmd_hdl_zalloc(hdl, sizeof (cmd_cpu_t), FMD_SLEEP);
- cpu->cpu_nodetype = CMD_NT_CPU;
- cpu->cpu_cpuid = cpuid;
- cpu->cpu_level = level;
- cpu->cpu_type = type;
- cpu->cpu_version = CMD_CPU_VERSION;
-
- if (cpu->cpu_level == CMD_CPU_LEVEL_THREAD) {
- cmd_bufname(cpu->cpu_bufname, sizeof (cpu->cpu_bufname),
- "cpu_%d", cpu->cpu_cpuid);
- } else {
- cmd_bufname(cpu->cpu_bufname, sizeof (cpu->cpu_bufname),
- "cpu_%d_%d", cpu->cpu_cpuid, cpu->cpu_level);
- }
-
-#ifdef sun4u
- cpu_uec_create(hdl, cpu, &cpu->cpu_uec, "cpu_uec_%d", cpu->cpu_cpuid);
- cpu_uec_create(hdl, cpu, &cpu->cpu_olduec, "cpu_olduec_%d",
- cpu->cpu_cpuid);
-#endif /* sun4u */
-
- if (cpu->cpu_level == CMD_CPU_LEVEL_THREAD) {
- cmd_fmri_init(hdl, &cpu->cpu_asru, asru, "cpu_asru_%d",
- cpu->cpu_cpuid);
- } else {
- cmd_fmri_init(hdl, &cpu->cpu_asru, asru, "cpu_asru_%d_%d",
- cpu->cpu_cpuid, cpu->cpu_level);
- }
-
- if ((fru = cpu_getfru(hdl, cpu)) != NULL) {
- if (cpu->cpu_level == CMD_CPU_LEVEL_THREAD) {
- cmd_fmri_init(hdl, &cpu->cpu_fru, fru, "cpu_fru_%d",
- cpu->cpu_cpuid);
- } else {
- cmd_fmri_init(hdl, &cpu->cpu_fru, fru, "cpu_fru_%d_%d",
- cpu->cpu_cpuid, cpu->cpu_level);
- }
- nvlist_free(fru);
- } else {
- if (cpu->cpu_level == CMD_CPU_LEVEL_THREAD) {
- cmd_fmri_init(hdl, &cpu->cpu_fru, asru, "cpu_fru_%d",
- cpu->cpu_cpuid);
- } else {
- cmd_fmri_init(hdl, &cpu->cpu_fru, asru, "cpu_fru_%d_%d",
- cpu->cpu_cpuid, cpu->cpu_level);
- }
- }
-
- cpu_buf_create(hdl, cpu);
-
- cmd_list_append(&cmd.cmd_cpus, cpu);
-
- return (cpu);
-}
-
-/*
- * As its name implies, 'cpu_all_threads_invalid' determines if all cpu
- * threads (level 0) contained within the cpu structure are invalid.
- * This is done by checking all the (level 0) threads which may be
- * contained within this chip, core, or thread; if all are invalid, return
- * FMD_B_TRUE; if any are valid, return FMD_B_FALSE.
- */
-
-int
-cpu_all_threads_invalid(fmd_hdl_t *hdl, cmd_cpu_t *cpu)
-{
- nvlist_t *asru;
- uint32_t cpuinit, cpufinal, cpustep, i;
-
- core2cpus(cpu->cpu_cpuid, cpu->cpu_type, cpu->cpu_level,
- &cpuinit, &cpufinal, &cpustep);
-
- if (cpuinit == cpufinal) {
- if (fmd_nvl_fmri_present(hdl, cpu->cpu_asru_nvl) &&
- !fmd_nvl_fmri_unusable(hdl, cpu->cpu_asru_nvl))
- return (FMD_B_FALSE);
- else return (FMD_B_TRUE);
- } else {
-
- if (nvlist_dup(cpu->cpu_asru_nvl, &asru, 0) != 0)
- fmd_hdl_abort(hdl, "cannot copy asru\n");
- for (i = cpuinit; i <= cpufinal; i += cpustep) {
- (void) nvlist_remove_all(asru, FM_FMRI_CPU_ID);
- if (nvlist_add_uint32(asru, FM_FMRI_CPU_ID, i) != 0) {
- fmd_hdl_abort(hdl, "cpu_all_threads_invalid: ",
- "cannot add thread %d to asru\n", i);
- }
- if (fmd_nvl_fmri_present(hdl, asru) &&
- !fmd_nvl_fmri_unusable(hdl, asru)) {
- nvlist_free(asru);
- return (FMD_B_FALSE);
- }
- }
- }
- nvlist_free(asru);
- return (FMD_B_TRUE);
-}
-
-/*
- * Locate the state structure for this CPU, creating a new one if one doesn't
- * already exist. Before passing it back, we also need to validate it against
- * the current state of the world, checking to ensure that the CPU described by
- * the ereport, the CPU indicated in the cmd_cpu_t, and the CPU currently
- * residing at the indicated cpuid are the same. We do this by comparing the
- * serial IDs from the three entities.
- */
-cmd_cpu_t *
-cmd_cpu_lookup(fmd_hdl_t *hdl, nvlist_t *asru, const char *class,
- uint8_t level)
-{
- cmd_cpu_t *cpu;
- uint8_t vers;
- const char *scheme, *cpuname;
- uint32_t cpuid;
- cmd_cpu_type_t ct;
-
- if (fmd_nvl_fmri_expand(hdl, asru) < 0) {
- CMD_STAT_BUMP(bad_cpu_asru);
- return (NULL);
- }
-
- if (nvlist_lookup_pairs(asru, 0,
- FM_VERSION, DATA_TYPE_UINT8, &vers,
- FM_FMRI_SCHEME, DATA_TYPE_STRING, &scheme,
- FM_FMRI_CPU_ID, DATA_TYPE_UINT32, &cpuid,
- NULL) != 0 || (vers != CPU_SCHEME_VERSION0 &&
- vers != CPU_SCHEME_VERSION1) ||
- strcmp(scheme, FM_FMRI_SCHEME_CPU) != 0) {
- CMD_STAT_BUMP(bad_cpu_asru);
- return (NULL);
- }
-
- /*
- * 'cpuid' at this point refers to a thread, because it
- * was extracted from a detector FMRI
- */
-
- cpuname = class + sizeof ("ereport.cpu");
- ct = cpu_nname2type(hdl, cpuname,
- (size_t)(strchr(cpuname, '.') - cpuname));
-
- cpu = cpu_lookup_by_cpuid(cmd_cpu2core(cpuid, ct, level), level);
-
- if (cpu != NULL &&
- cpu_all_threads_invalid(hdl, cpu) == FMD_B_TRUE) {
- fmd_hdl_debug(hdl, "cpu_lookup: discarding old state\n");
- cmd_cpu_destroy(hdl, cpu);
- cpu = NULL;
- }
-
- /*
- * Check to see if the CPU described by the ereport has been removed
- * from the system. If it has, return to the caller without a CPU.
- */
- if (!fmd_nvl_fmri_present(hdl, asru) ||
- fmd_nvl_fmri_unusable(hdl, asru)) {
- fmd_hdl_debug(hdl, "cpu_lookup: discarding old ereport\n");
- return (NULL);
- }
-
- if (cpu == NULL) {
- cpu = cpu_create(hdl, asru,
- cmd_cpu2core(cpuid, ct, level), level, ct);
- }
-
- return (cpu);
-}
-
-cmd_cpu_t *
-cmd_cpu_lookup_from_detector(fmd_hdl_t *hdl, nvlist_t *nvl, const char *class,
- uint8_t level)
-{
- nvlist_t *det;
-
- (void) nvlist_lookup_nvlist(nvl, FM_EREPORT_DETECTOR, &det);
-
- return (cmd_cpu_lookup(hdl, det, class, level));
-}
-
-static cmd_cpu_t *
-cpu_v0tov3(fmd_hdl_t *hdl, cmd_cpu_0_t *old, size_t oldsz)
-{
- cmd_cpu_t *new;
-
- if (oldsz != sizeof (cmd_cpu_0_t)) {
- fmd_hdl_abort(hdl, "size of state doesn't match size of "
- "version 0 state (%u bytes).\n", sizeof (cmd_cpu_0_t));
- }
-
- new = fmd_hdl_zalloc(hdl, sizeof (cmd_cpu_t), FMD_SLEEP);
- new->cpu_header = old->cpu0_header;
- new->cpu_version = CMD_CPU_VERSION;
- new->cpu_cpuid = old->cpu0_cpuid;
- new->cpu_type = old->cpu0_type;
- new->cpu_faulting = old->cpu0_faulting;
- new->cpu_level = CMD_CPU_LEVEL_THREAD;
- new->cpu_asru = old->cpu0_asru;
- new->cpu_fru = old->cpu0_fru;
- new->cpu_uec = old->cpu0_uec;
- new->cpu_olduec = old->cpu0_olduec;
-
- fmd_hdl_free(hdl, old, oldsz);
- return (new);
-}
-
-static cmd_cpu_t *
-cpu_v1tov3(fmd_hdl_t *hdl, cmd_cpu_1_t *old, size_t oldsz)
-{
- cmd_cpu_t *new;
-
- if (oldsz != sizeof (cmd_cpu_1_t)) {
- fmd_hdl_abort(hdl, "size of state doesn't match size of "
- "version 1 state (%u bytes).\n", sizeof (cmd_cpu_1_t));
- }
-
- new = fmd_hdl_zalloc(hdl, sizeof (cmd_cpu_t), FMD_SLEEP);
- new->cpu_header = old->cpu1_header;
- new->cpu_version = CMD_CPU_VERSION;
- new->cpu_cpuid = old->cpu1_cpuid;
- new->cpu_type = old->cpu1_type;
- new->cpu_faulting = old->cpu1_faulting;
- new->cpu_level = CMD_CPU_LEVEL_THREAD;
- new->cpu_asru = old->cpu1_asru;
- new->cpu_fru = old->cpu1_fru;
- new->cpu_uec = old->cpu1_uec;
- new->cpu_olduec = old->cpu1_olduec;
-
- fmd_hdl_free(hdl, old, oldsz);
- return (new);
-}
-
-static cmd_cpu_t *
-cpu_v2tov3(fmd_hdl_t *hdl, cmd_cpu_2_t *old, size_t oldsz)
-{
- cmd_cpu_t *new;
-
- if (oldsz != sizeof (cmd_cpu_2_t)) {
- fmd_hdl_abort(hdl, "size of state doesn't match size of "
- "version 2 state (%u bytes).\n", sizeof (cmd_cpu_2_t));
- }
-
- new = fmd_hdl_zalloc(hdl, sizeof (cmd_cpu_t), FMD_SLEEP);
-
- new->cpu_header = old->cpu2_header;
- new->cpu_cpuid = old->cpu2_cpuid;
- new->cpu_type = old->cpu2_type;
- new->cpu_faulting = old->cpu2_faulting;
- new->cpu_asru = old->cpu2_asru;
- new->cpu_fru = old->cpu2_fru;
- new->cpu_uec = old->cpu2_uec;
- new->cpu_olduec = old->cpu2_olduec;
- new->cpu_version = CMD_CPU_VERSION;
- new->cpu_level = CMD_CPU_LEVEL_THREAD;
- fmd_hdl_free(hdl, old, oldsz);
- return (new);
-}
-
-static cmd_cpu_t *
-cpu_wrapv3(fmd_hdl_t *hdl, cmd_cpu_pers_t *pers, size_t psz)
-{
- cmd_cpu_t *cpu;
-
- if (psz != sizeof (cmd_cpu_pers_t)) {
- fmd_hdl_abort(hdl, "size of state doesn't match size of "
- "version 3 state (%u bytes).\n", sizeof (cmd_cpu_pers_t));
- }
-
- cpu = fmd_hdl_zalloc(hdl, sizeof (cmd_cpu_t), FMD_SLEEP);
- bcopy(pers, cpu, sizeof (cmd_cpu_pers_t));
- fmd_hdl_free(hdl, pers, psz);
- return (cpu);
-}
-
-static void
-cpu_case_restore(fmd_hdl_t *hdl, cmd_cpu_t *cpu, cmd_case_t *cc, fmd_case_t *cp,
- const char *serdbase)
-{
- cmd_case_restore(hdl, cc, cp, cmd_cpu_serdnm_create(hdl, cpu,
- serdbase));
-}
-
-cmd_cpu_t *
-cmd_restore_cpu_only(fmd_hdl_t *hdl, fmd_case_t *cp, char *cpu_hdr_bufname)
-{
- cmd_cpu_t *cpu;
-
- for (cpu = cmd_list_next(&cmd.cmd_cpus); cpu != NULL;
- cpu = cmd_list_next(cpu)) {
- if (strcmp(cpu->cpu_bufname, cpu_hdr_bufname) == 0)
- break;
- }
-
- if (cpu == NULL) {
- int migrated = 0;
- size_t cpusz;
-
- fmd_hdl_debug(hdl, "restoring cpu from %s\n", cpu_hdr_bufname);
-
- if ((cpusz = fmd_buf_size(hdl, NULL, cpu_hdr_bufname)) == 0) {
- if (fmd_case_solved(hdl, cp) ||
- fmd_case_closed(hdl, cp)) {
- fmd_hdl_debug(hdl, "cpu buffer %s from case %s "
- "not found. Case is already solved or "
- "closed\n",
- cpu_hdr_bufname, fmd_case_uuid(hdl, cp));
- return (NULL);
- } else {
- fmd_hdl_abort(hdl, "cpu referenced by case %s "
- "does not exist in saved state\n",
- fmd_case_uuid(hdl, cp));
- }
- } else if (cpusz > CMD_CPU_MAXSIZE || cpusz < CMD_CPU_MINSIZE) {
- fmd_hdl_abort(hdl, "cpu buffer referenced by case %s "
- "is out of bounds (is %u bytes)\n",
- fmd_case_uuid(hdl, cp), cpusz);
- }
-
- if ((cpu = cmd_buf_read(hdl, NULL, cpu_hdr_bufname,
- cpusz)) == NULL) {
- fmd_hdl_abort(hdl, "failed to read buf %s",
- cpu_hdr_bufname);
- }
-
- fmd_hdl_debug(hdl, "found %d in version field\n",
- cpu->cpu_version);
-
- if (CMD_CPU_VERSIONED(cpu)) {
- switch (cpu->cpu_version) {
- case CMD_CPU_VERSION_1:
- cpu = cpu_v1tov3(hdl, (cmd_cpu_1_t *)cpu,
- cpusz);
- migrated = 1;
- break;
- case CMD_CPU_VERSION_2:
- cpu = cpu_v2tov3(hdl, (cmd_cpu_2_t *)cpu,
- cpusz);
- migrated = 1;
- break;
- case CMD_CPU_VERSION_3:
- cpu = cpu_wrapv3(hdl, (cmd_cpu_pers_t *)cpu,
- cpusz);
- break;
- default:
- fmd_hdl_abort(hdl, "unknown version (found %d) "
- "for cpu state referenced by case %s.\n",
- cpu->cpu_version, fmd_case_uuid(hdl, cp));
- break;
- }
- } else {
- cpu = cpu_v0tov3(hdl, (cmd_cpu_0_t *)cpu, cpusz);
- migrated = 1;
- }
-
- if (migrated) {
- CMD_STAT_BUMP(cpu_migrat);
- cpu_buf_write(hdl, cpu);
- }
-
- cmd_fmri_restore(hdl, &cpu->cpu_asru);
- cmd_fmri_restore(hdl, &cpu->cpu_fru);
-#ifdef sun4u
- cpu_uec_restore(hdl, &cpu->cpu_uec);
- cpu_uec_restore(hdl, &cpu->cpu_olduec);
-
- if (cpu->cpu_uec.uec_cache != NULL)
- cpu_uec_flush(hdl, cpu);
-#endif /* sun4u */
- bzero(&cpu->cpu_xxu_retries, sizeof (cmd_list_t));
-
- cmd_list_append(&cmd.cmd_cpus, cpu);
- }
- return (cpu);
-}
-
-void *
-cmd_cpu_restore(fmd_hdl_t *hdl, fmd_case_t *cp, cmd_case_ptr_t *ptr)
-{
- cmd_cpu_t *cpu;
-
- cpu = cmd_restore_cpu_only(hdl, cp, ptr->ptr_name);
- if (cpu == NULL)
- return (NULL);
-
- switch (ptr->ptr_subtype) {
- case CMD_PTR_CPU_ICACHE:
- cpu_case_restore(hdl, cpu, &cpu->cpu_icache, cp, "icache");
- break;
- case CMD_PTR_CPU_DCACHE:
- cpu_case_restore(hdl, cpu, &cpu->cpu_dcache, cp, "dcache");
- break;
- case CMD_PTR_CPU_PCACHE:
- cpu_case_restore(hdl, cpu, &cpu->cpu_pcache, cp, "pcache");
- break;
- case CMD_PTR_CPU_ITLB:
- cpu_case_restore(hdl, cpu, &cpu->cpu_itlb, cp, "itlb");
- break;
- case CMD_PTR_CPU_DTLB:
- cpu_case_restore(hdl, cpu, &cpu->cpu_dtlb, cp, "dtlb");
- break;
- case CMD_PTR_CPU_L2DATA:
- cpu_case_restore(hdl, cpu, &cpu->cpu_l2data, cp,
- cmd.cmd_l2data_serd.cs_name);
- break;
- case CMD_PTR_CPU_L2DATA_UERETRY:
- /* No longer used -- discard */
- break;
- case CMD_PTR_CPU_L2TAG:
- cpu_case_restore(hdl, cpu, &cpu->cpu_l2tag, cp, "l2tag");
- break;
- case CMD_PTR_CPU_L3DATA:
- cpu_case_restore(hdl, cpu, &cpu->cpu_l3data, cp,
- cmd.cmd_l3data_serd.cs_name);
- break;
- case CMD_PTR_CPU_L3DATA_UERETRY:
- /* No longer used -- discard */
- break;
- case CMD_PTR_CPU_L3TAG:
- cpu_case_restore(hdl, cpu, &cpu->cpu_l3tag, cp, "l3tag");
- break;
- case CMD_PTR_CPU_FPU:
- cpu_case_restore(hdl, cpu, &cpu->cpu_fpu, cp, "fpu");
- break;
- case CMD_PTR_CPU_XR_RETRY:
- cmd_xr_restore(hdl, cpu, cp);
- break;
- case CMD_PTR_CPU_IREG:
- cpu_case_restore(hdl, cpu, &cpu->cpu_ireg, cp, "ireg");
- break;
- case CMD_PTR_CPU_FREG:
- cpu_case_restore(hdl, cpu, &cpu->cpu_freg, cp, "freg");
- break;
- case CMD_PTR_CPU_MAU:
- cpu_case_restore(hdl, cpu, &cpu->cpu_mau, cp, "mau");
- break;
- case CMD_PTR_CPU_L2CTL:
- cpu_case_restore(hdl, cpu, &cpu->cpu_l2ctl, cp, "l2ctl");
- break;
- case CMD_PTR_CPU_MISC_REGS:
- cpu_case_restore(hdl, cpu, &cpu->cpu_misc_regs, cp,
- "misc_regs");
- break;
- case CMD_PTR_CPU_LFU:
- cpu_case_restore(hdl, cpu, &cpu->cpu_lfu, cp, "lfu");
- break;
-#ifdef sun4u
- case CMD_PTR_CPU_INV_SFSR:
- cpu_case_restore(hdl, cpu, &cpu->cpu_opl_invsfsr, cp,
- "opl_invsfsr");
- break;
- case CMD_PTR_CPU_UE_DET_CPU:
- cpu_case_restore(hdl, cpu, &cpu->cpu_oplue_detcpu, cp,
- "oplue_detcpu");
- break;
- case CMD_PTR_CPU_UE_DET_IO:
- cpu_case_restore(hdl, cpu, &cpu->cpu_oplue_detio, cp,
- "oplue_detio");
- break;
- case CMD_PTR_CPU_MTLB:
- cpu_case_restore(hdl, cpu, &cpu->cpu_opl_mtlb, cp,
- "opl_mtlb");
- break;
- case CMD_PTR_CPU_TLBP:
- cpu_case_restore(hdl, cpu, &cpu->cpu_opl_tlbp, cp,
- "opl_tlbp");
- break;
- case CMD_PTR_CPU_UGESR_INV_URG:
- cpu_case_restore(hdl, cpu, &cpu->cpu_opl_inv_urg, cp,
- "opl_inv_urg");
- break;
- case CMD_PTR_CPU_UGESR_CRE:
- cpu_case_restore(hdl, cpu, &cpu->cpu_opl_cre, cp,
- "opl_cre");
- break;
- case CMD_PTR_CPU_UGESR_TSB_CTX:
- cpu_case_restore(hdl, cpu, &cpu->cpu_opl_tsb_ctx, cp,
- "opl_tsb_ctx");
- break;
- case CMD_PTR_CPU_UGESR_TSBP:
- cpu_case_restore(hdl, cpu, &cpu->cpu_opl_tsbp, cp,
- "opl_tsbp");
- break;
- case CMD_PTR_CPU_UGESR_PSTATE:
- cpu_case_restore(hdl, cpu, &cpu->cpu_opl_pstate, cp,
- "opl_pstate");
- break;
- case CMD_PTR_CPU_UGESR_TSTATE:
- cpu_case_restore(hdl, cpu, &cpu->cpu_opl_tstate, cp,
- "opl_tstate");
- break;
- case CMD_PTR_CPU_UGESR_IUG_F:
- cpu_case_restore(hdl, cpu, &cpu->cpu_opl_iug_f, cp,
- "opl_iug_f");
- break;
- case CMD_PTR_CPU_UGESR_IUG_R:
- cpu_case_restore(hdl, cpu, &cpu->cpu_opl_iug_r, cp,
- "opl_iug_r");
- break;
- case CMD_PTR_CPU_UGESR_SDC:
- cpu_case_restore(hdl, cpu, &cpu->cpu_opl_sdc, cp,
- "opl_sdc");
- break;
- case CMD_PTR_CPU_UGESR_WDT:
- cpu_case_restore(hdl, cpu, &cpu->cpu_opl_wdt, cp,
- "opl_wdt");
- break;
- case CMD_PTR_CPU_UGESR_DTLB:
- cpu_case_restore(hdl, cpu, &cpu->cpu_opl_dtlb, cp,
- "opl_dtlb");
- break;
- case CMD_PTR_CPU_UGESR_ITLB:
- cpu_case_restore(hdl, cpu, &cpu->cpu_opl_itlb, cp,
- "opl_itlb");
- break;
- case CMD_PTR_CPU_UGESR_CORE_ERR:
- cpu_case_restore(hdl, cpu, &cpu->cpu_opl_core_err, cp,
- "opl_core_err");
- break;
- case CMD_PTR_CPU_UGESR_DAE:
- cpu_case_restore(hdl, cpu, &cpu->cpu_opl_dae, cp,
- "opl_dae");
- break;
- case CMD_PTR_CPU_UGESR_IAE:
- cpu_case_restore(hdl, cpu, &cpu->cpu_opl_iae, cp,
- "opl_iae");
- break;
- case CMD_PTR_CPU_UGESR_UGE:
- cpu_case_restore(hdl, cpu, &cpu->cpu_opl_uge, cp,
- "opl_uge");
- break;
-#endif /* sun4u */
- default:
- fmd_hdl_abort(hdl, "invalid %s subtype %d\n",
- ptr->ptr_name, ptr->ptr_subtype);
- }
-
- return (cpu);
-}
-
-void
-cmd_cpu_validate(fmd_hdl_t *hdl)
-{
- cmd_xr_t *xr, *xrn;
- cmd_cpu_t *cpu, *cpun;
-
- for (cpu = cmd_list_next(&cmd.cmd_cpus); cpu != NULL;
- cpu = cmd_list_next(cpu)) {
- if (cpu_all_threads_invalid(hdl, cpu) == FMD_B_TRUE)
- cpu->cpu_flags |= CMD_CPU_F_DELETING;
- }
-
- for (xr = cmd_list_next(&cmd.cmd_xxcu_redelivs); xr != NULL; xr = xrn) {
- xrn = cmd_list_next(xr);
-
- if (xr->xr_cpu->cpu_flags & CMD_CPU_F_DELETING)
- cmd_xr_destroy(hdl, xr);
- }
-
- for (cpu = cmd_list_next(&cmd.cmd_cpus); cpu != NULL; cpu = cpun) {
- cpun = cmd_list_next(cpu);
-
- if (cpu->cpu_flags & CMD_CPU_F_DELETING)
- cmd_cpu_destroy(hdl, cpu);
- }
-}
-
-static void
-cmd_xxcu_timeout(fmd_hdl_t *hdl, id_t id)
-{
- cmd_xr_t *xr;
-
- for (xr = cmd_list_next(&cmd.cmd_xxcu_redelivs); xr != NULL;
- xr = cmd_list_next(xr)) {
- if (xr->xr_id == id) {
- fmd_event_t *ep = fmd_case_getprincipal(hdl,
- xr->xr_case);
- xr->xr_hdlr(hdl, xr, ep);
- cmd_xr_deref(hdl, xr);
- return;
- }
- }
-}
-
-/*ARGSUSED*/
-static void
-cmd_xxu_flush_timeout(fmd_hdl_t *hdl, id_t id)
-{
-#ifdef sun4u
- cmd_cpu_t *cpu;
-
- for (cpu = cmd_list_next(&cmd.cmd_cpus); cpu != NULL;
- cpu = cmd_list_next(cpu)) {
- if (cpu->cpu_uec_flush == id) {
- cpu_uec_flush_finish(hdl, cpu);
- return;
- }
- }
-#else /* sun4u */
- return;
-#endif /* sun4u */
-}
-
-void
-cmd_cpu_timeout(fmd_hdl_t *hdl, id_t id, void *type)
-{
- switch ((uintptr_t)type) {
- case (uintptr_t)CMD_TIMERTYPE_CPU_UEC_FLUSH:
- cmd_xxu_flush_timeout(hdl, id);
- break;
- case (uintptr_t)CMD_TIMERTYPE_CPU_XR_WAITER:
- cmd_xxcu_timeout(hdl, id);
- break;
- }
-}
-
-static int
-cpu_gc_keep_one(fmd_hdl_t *hdl, cmd_cpu_t *cpu)
-{
- int i;
-
- if (cpu_all_threads_invalid(hdl, cpu) == FMD_B_TRUE) {
- fmd_hdl_debug(hdl, "GC of CPU %d: no longer working\n",
- cpu->cpu_cpuid);
- return (0);
- }
-
- for (i = 0; i < sizeof (cmd_cpu_cases_t) / sizeof (cmd_case_t); i++) {
- cmd_case_t *cp = &((cmd_case_t *)&cpu->cpu_cases)[i];
-
- if (cp->cc_cp == NULL || cp->cc_serdnm == NULL)
- continue;
-
- if (fmd_serd_exists(hdl, cp->cc_serdnm) &&
- !fmd_serd_empty(hdl, cp->cc_serdnm))
- return (1);
- }
-
- if (cmd_list_next(&cpu->cpu_xxu_retries) != NULL)
- return (1);
-
- if (cpu->cpu_uec.uec_cache != NULL ||
- cpu->cpu_olduec.uec_cache != NULL)
- return (1);
-
- return (0);
-}
-
-/*ARGSUSED*/
-void
-cmd_cpu_gc(fmd_hdl_t *hdl)
-{
- cmd_cpu_t *cpu, *next;
-
- fmd_hdl_debug(hdl, "GC of CPUs\n");
-
- for (cpu = cmd_list_next(&cmd.cmd_cpus); cpu != NULL; cpu = next) {
- next = cmd_list_next(cpu);
-
- if (!cpu_gc_keep_one(hdl, cpu)) {
- fmd_hdl_debug(hdl, "GC of CPU %d: destroying\n",
- cpu->cpu_cpuid);
- continue;
- }
-#ifdef sun4u
- if (cpu->cpu_uec.uec_cache != NULL)
- cpu_uec_flush(hdl, cpu);
-#endif /* sun4u */
- cpu->cpu_uec_nflushes = 0;
- }
-}
-
-void
-cmd_cpu_fini(fmd_hdl_t *hdl)
-{
- cmd_cpu_t *cpu;
-
- while ((cpu = cmd_list_next(&cmd.cmd_cpus)) != NULL)
- cmd_cpu_free(hdl, cpu, FMD_B_FALSE);
-}
-
-typedef struct {
- const char *fam_name;
- cpu_family_t fam_value;
-} famdata_t;
-
-static famdata_t famdata_tbl[] = {
- {"UltraSPARC-III", CMD_CPU_FAM_CHEETAH},
- {"UltraSPARC-IV", CMD_CPU_FAM_CHEETAH},
- {"UltraSPARC-T", CMD_CPU_FAM_NIAGARA},
- {"SPARC64-VI", CMD_CPU_FAM_SPARC64},
- {"SPARC64-VII", CMD_CPU_FAM_SPARC64}
-};
-
-cpu_family_t
-cpu_family(char *knsp)
-{
- int j;
-
- for (j = 0; j < sizeof (famdata_tbl)/sizeof (famdata_t); j++) {
- if (strncmp(knsp, famdata_tbl[j].fam_name,
- strlen(famdata_tbl[j].fam_name)) == 0) {
- return (famdata_tbl[j].fam_value);
- }
- }
- return (CMD_CPU_FAM_UNSUPPORTED);
-}
-
-/*
- * Determine which CPU family this diagnosis is being run on.
- * This assumes that ereports are being generated by this system.
- */
-
-cpu_family_t
-cmd_cpu_check_support(void)
-{
- kstat_named_t *kn;
- kstat_ctl_t *kc;
- kstat_t *ksp;
- int i;
-
- if ((kc = kstat_open()) == NULL)
- return (CMD_CPU_FAM_UNSUPPORTED);
-
- for (ksp = kc->kc_chain; ksp != NULL; ksp = ksp->ks_next) {
- if (strcmp(ksp->ks_module, "cpu_info") != 0)
- continue;
-
- if (kstat_read(kc, ksp, NULL) == -1) {
- (void) kstat_close(kc);
- return (CMD_CPU_FAM_UNSUPPORTED);
- }
-
- for (kn = ksp->ks_data, i = 0; i < ksp->ks_ndata; i++, kn++) {
- cpu_family_t family;
- if (strcmp(kn->name, "implementation") != 0)
- continue;
- family = cpu_family(KSTAT_NAMED_STR_PTR(kn));
- (void) kstat_close(kc);
- return (family);
- }
- }
- (void) kstat_close(kc);
- return (CMD_CPU_FAM_UNSUPPORTED);
-}
-
-boolean_t
-cmd_cpu_ecache_support(void)
-{
- cpu_family_t value;
-
- value = cmd_cpu_check_support();
- return (fam_info_tbl[value].ecache_flush_needed);
-}
-
-/*
- * This function builds the fmri of the
- * given cpuid based on the cpu scheme.
- */
-nvlist_t *
-cmd_cpu_fmri_create(uint32_t cpuid, uint8_t cpumask)
-{
- nvlist_t *fmri;
-
- if ((errno = nvlist_alloc(&fmri, NV_UNIQUE_NAME, 0)) != 0)
- return (NULL);
-
- if (nvlist_add_uint8(fmri, FM_VERSION,
- FM_CPU_SCHEME_VERSION) != 0 || nvlist_add_string(fmri,
- FM_FMRI_SCHEME, FM_FMRI_SCHEME_CPU) != 0 ||
- nvlist_add_uint32(fmri, FM_FMRI_CPU_ID, cpuid) != 0 ||
- nvlist_add_uint8(fmri, FM_FMRI_CPU_MASK, cpumask) != 0) {
- nvlist_free(fmri);
- return (NULL);
- }
-
- return (fmri);
-}
diff --git a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_cpu.h b/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_cpu.h
deleted file mode 100644
index 80d562ed13..0000000000
--- a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_cpu.h
+++ /dev/null
@@ -1,794 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _CMD_CPU_H
-#define _CMD_CPU_H
-
-/*
- * Each CPU of interest has a cmd_cpu_t structure. CPUs become of interest when
- * they are the focus of ereports, or when they detect UEs. CPUs may be the
- * target of several different kinds of ereport, each of which is tracked
- * differently. cpu_cases lists the types of cases that can be open against a
- * given CPU. The life of a CPU is complicated by the fact that xxCs and xxUs
- * received by the DE may in fact be side-effects of earlier UEs, xxCs, or xxUs.
- * Causes of side-effects, and actions taken to resolve them, can be found below
- * and in cmd_memerr.h.
- *
- * Data structures:
- * ________ CMD_PTR_CPU_ICACHE
- * / \ ,--------. CMD_PTR_CPU_DCACHE
- * |CPU | <---- |case_ptr| (one or more of CMD_PTR_CPU_PCACHE )
- * | | `--------' CMD_PTR_CPU_ITLB
- * |,-------| ,-------. CMD_PTR_CPU_DTLB
- * ||asru | ----> |fmri_t | CMD_PTR_CPU_L2DATA
- * |:-------| :-------: CMD_PTR_CPU_L2DATA_UERETRY
- * ||fru | ----> |fmri_t | CMD_PTR_CPU_L2TAG
- * |`-------| `-------' CMD_PTR_CPU_L3DATA
- * | | ,---------. CMD_PTR_CPU_L3DATA_UERETRY
- * | uec | ----> |UE cache | CMD_PTR_CPU_L3TAG
- * \________/ `---------' CMD_PTR_CPU_FPU
- * CMD_PTR_CPU_IREG
- * CMD_PTR_CPU_FREG
- * CMD_PTR_CPU_MAU
- * CMD_PTR_CPU_L2CTL
- *
- * ________
- * / \ ,--------.
- * | xr | <---- |case_ptr| (CMD_PTR_XR_WAITER)
- * | | `--------'
- * |,-------| ,-------.
- * ||rsrc | ----> |fmri_t |
- * |`-------| `-------'
- * | cpu | ----> detecting CPU
- * \________/
- *
- * Data structure P? Case- Notes
- * Rel?
- * ---------------- --- ----- --------------------------------------
- * cmd_cpu_t Yes No Name is derived from CPU ID ("cpu_%d")
- * cmd_case_ptr_t Yes Yes Name is case's UUID
- * cpu_asru (fmri_t) Yes No Name is derived from CPU ID ("cpu_asru_%d")
- * cpu_fru (fmri_t) Yes No Name is derived from CPU ID ("cpu_fru_%d")
- * cpu_uec Yes No Name is derived from CPU ID ("cpu_uec_%d")
- * cmd_xr_t Yes Yes Name is `redelivery'
- * xr_rsrc (fmri_t) Yes No Name is derived from case's UUID ("%s_rsrc")
- */
-
-#include <cmd.h>
-#include <cmd_state.h>
-#include <cmd_fmri.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define CPU_FRU_FMRI FM_FMRI_SCHEME_HC":///" \
- FM_FMRI_LEGACY_HC"="
-
-#define BK_LFUFAULT_CERT 50
-
-typedef struct cmd_cpu cmd_cpu_t;
-
-typedef enum cmd_cpu_type {
- CPU_ULTRASPARC_III = 1,
- CPU_ULTRASPARC_IIIplus,
- CPU_ULTRASPARC_IIIi,
- CPU_ULTRASPARC_IV,
- CPU_ULTRASPARC_IVplus,
- CPU_ULTRASPARC_IIIiplus,
- CPU_ULTRASPARC_T1,
- CPU_SPARC64_VI,
- CPU_SPARC64_VII,
- CPU_ULTRASPARC_T2,
- CPU_ULTRASPARC_T2plus
-} cmd_cpu_type_t;
-
-typedef struct cmd_cpu_cases {
- cmd_case_t cpuc_icache; /* All I$ errors (IPE, IDSPE, etc) */
- cmd_case_t cpuc_dcache; /* All D$ errors (DPE, DDSPE, etc) */
- cmd_case_t cpuc_pcache; /* All P$ errors (PDSPE) */
- cmd_case_t cpuc_itlb; /* ITLB errors (ITLBPE) */
- cmd_case_t cpuc_dtlb; /* DTLB errors (DTLBPE) */
- cmd_case_t cpuc_l2data; /* All correctable L2$ data errors */
- cmd_case_t cpuc_l2tag; /* All correctable L2$ tag errors */
- cmd_case_t cpuc_l3data; /* All correctable L3$ data errors */
- cmd_case_t cpuc_l3tag; /* All correctable L3$ tag errors */
- cmd_case_t cpuc_fpu; /* FPU errors */
- cmd_case_t cpuc_ireg; /* Integer reg errors (IRC, IRU) */
- cmd_case_t cpuc_freg; /* Floatpnt reg errors (frc, fru) */
- cmd_case_t cpuc_mau; /* Modular arith errors (MAU) */
- cmd_case_t cpuc_l2ctl; /* L2$ directory, VUAD parity */
- cmd_case_t cpuc_misc_regs; /* Scratchpad array (SCA) */
- /* Tick compare (TC) */
- /* Store buffer (SBD) */
- /* Trap stack array errors (TSA) */
- cmd_case_t cpuc_lfu; /* Coherency link error (LFU) */
-#ifdef sun4u
- cmd_case_t cpuc_opl_invsfsr; /* Olympus-C cpu inv-sfsr errors */
- cmd_case_t cpuc_oplue_detcpu; /* Olympus-C cpu det. ue (eid=CPU) */
- cmd_case_t cpuc_oplue_detio; /* Olympus-C io det. ue (eid=CPU) */
- cmd_case_t cpuc_opl_mtlb; /* Olympus-C mtlb errors */
- cmd_case_t cpuc_opl_tlbp; /* Olympus-C tlbp errors */
- cmd_case_t cpuc_opl_inv_urg; /* Olympus-C inv-urg invalid urgent */
- cmd_case_t cpuc_opl_cre; /* Olympus-C cre urgent errors */
- cmd_case_t cpuc_opl_tsb_ctx; /* Olympus-C tsb_ctx urgent errors */
- cmd_case_t cpuc_opl_tsbp; /* Olympus-C tsbp urgent errors */
- cmd_case_t cpuc_opl_pstate; /* Olympus-C pstate urgent errors */
- cmd_case_t cpuc_opl_tstate; /* Olympus-C tstate urgent errors */
- cmd_case_t cpuc_opl_iug_f; /* Olympus-C iug_f urgent errors */
- cmd_case_t cpuc_opl_iug_r; /* Olympus-C iug_r urgent errors */
- cmd_case_t cpuc_opl_sdc; /* Olympus-C sdc urgent errors */
- cmd_case_t cpuc_opl_wdt; /* Olympus-C wdt urgent errors */
- cmd_case_t cpuc_opl_dtlb; /* Olympus-C dtlb urgent errors */
- cmd_case_t cpuc_opl_itlb; /* Olympus-C itlb urgent errors */
- cmd_case_t cpuc_opl_core_err; /* Olympus-C core-err urgent errors */
- cmd_case_t cpuc_opl_dae; /* Olympus-C dae urgent errors */
- cmd_case_t cpuc_opl_iae; /* Olympus-C iae urgent errors */
- cmd_case_t cpuc_opl_uge; /* Olympus-C uge urgent errors */
-#endif /* sun4u */
-} cmd_cpu_cases_t;
-
-/*
- * The UE cache. We actually have two UE caches - the current one and the old
- * one. When it's time to flush the UE cache, we move the current UE cache to
- * the old position and flush the E$. Then, we schedule the removal of the old
- * UE cache. This allows a) xxUs triggered by the flush to match against the
- * old cache, while b) still allowing new UEs to be added to the current UE
- * cache. UE matches will always search in both caches (if present), but
- * additions will only end up in the current cache. We go to all of this
- * effort because the cost of a missed ereport (discarding due to a false match
- * in the cache) is much less than that of a missed match. In the latter case,
- * the CPU will be erroneously offlined.
- *
- * A special case is triggered if we see a UE with a not valid AFAR. Without
- * the AFAR, we aren't able to properly match subsequent xxU's. As a result,
- * we need to throw the cache into all-match mode, wherein all subsequent match
- * attempts will succeed until the UE cache is flushed.
- */
-
-#define CPU_UEC_F_ALLMATCH 0x1 /* all-match mode active */
-
-typedef struct cmd_cpu_uec {
- uint64_t *uec_cache; /* The UE cache */
- uint_t uec_nent; /* Number of allocated slots in cache */
- uint_t uec_flags; /* CPU_UEC_F_* */
- char uec_bufname[CMD_BUFNMLEN]; /* Name of buffer used for cache */
-} cmd_cpu_uec_t;
-
-extern const char *cmd_cpu_type2name(fmd_hdl_t *, cmd_cpu_type_t);
-extern void cmd_cpu_uec_add(fmd_hdl_t *, cmd_cpu_t *, uint64_t);
-extern int cmd_cpu_uec_match(cmd_cpu_t *, uint64_t);
-extern void cmd_cpu_uec_clear(fmd_hdl_t *, cmd_cpu_t *);
-extern void cmd_cpu_uec_set_allmatch(fmd_hdl_t *, cmd_cpu_t *);
-
-/*
- * Certain types of xxC and xxU can trigger other types as side-effects. These
- * secondary ereports need to be discarded, as treating them as legitimate
- * ereports in their own right will cause erroneous diagnosis. As an example
- * (see cmd_xxcu_trains for more), an L2$ UCC will usually trigger an L2$ WDC
- * resulting from the trap handler's flushing of the L2$. If we treat both as
- * legitimate, we'll end up adding two ereports to the SERD engine,
- * significantly cutting the threshold for retiring the CPU.
- *
- * Our saving grace is the fact that the side-effect ereports will have the same
- * ENA as the primary. As such, we can keep track of groups of ereports by ENA.
- * These groups, which we'll call trains, can then be matched against a list of
- * known trains. The list (an array of cmd_xxcu_train_t structures) has both a
- * description of the composition of the train and an indication as to which of
- * the received ereports is the primary.
- *
- * The cmd_xxcu_trw_t is used to gather the members of the train. When the
- * first member comes in, we allocate a trw, recording the ENA of the ereport,
- * as well as noting its class in trw_mask. We then reschedule the delivery of
- * the ereport for some configurable time in the future, trusting that all
- * members of the train will have arrived by that time. Subsequent ereports in
- * the same train match the recorded ENA, and add themselves to the mask.
- * When the first ereport is redelivered, trw_mask is used to determine whether
- * or not a train has been seen. An exact match is required. If a match is
- * made, the ereport indicated as the primary cause is used for diagnosis.
- */
-
-#define CMD_TRW_F_DELETING 0x1 /* reclaiming events */
-#define CMD_TRW_F_CAUSESEEN 0x2 /* cause of train already processed */
-#define CMD_TRW_F_GCSEEN 0x4 /* seen by GC, erased next time */
-
-typedef struct cmd_xxcu_trw {
- uint64_t trw_ena; /* the ENA for this group of ereports */
- uint64_t trw_afar; /* the AFAR for this group of ereports */
- cmd_errcl_t trw_mask; /* ereports seen thus far with this ENA */
- uint16_t trw_cpuid; /* CPU to which this watcher belongs */
- uint8_t trw_ref; /* number of ereports with this ENA */
- uint8_t trw_flags; /* CMD_TRW_F_* */
- uint32_t trw_pad;
-} cmd_xxcu_trw_t;
-
-extern cmd_xxcu_trw_t *cmd_trw_lookup(uint64_t, uint8_t, uint64_t);
-extern cmd_xxcu_trw_t *cmd_trw_alloc(uint64_t, uint64_t);
-extern void cmd_trw_restore(fmd_hdl_t *);
-extern void cmd_trw_write(fmd_hdl_t *);
-extern void cmd_trw_ref(fmd_hdl_t *, cmd_xxcu_trw_t *, cmd_errcl_t);
-extern void cmd_trw_deref(fmd_hdl_t *, cmd_xxcu_trw_t *);
-
-extern cmd_errcl_t cmd_xxcu_train_match(cmd_errcl_t);
-
-/*
- * We don't have access to ereport nvlists when they are redelivered via timer.
- * As such, we have to retrieve everything we might need for diagnosis when we
- * first receive the ereport. The retrieved information is stored in the
- * cmd_xr_t, which is persisted.
- */
-
-typedef struct cmd_xr cmd_xr_t;
-
-/*
- * xr_hdlr can't be persisted, so we use these in xr_hdlrid to indicate the
- * handler to be used. xr_hdlr is then updated so it can be used directly.
- */
-#define CMD_XR_HDLR_XXC 1
-#define CMD_XR_HDLR_XXU 2
-#define CMD_XR_HDLR_NOP 3
-
-typedef void cmd_xr_hdlr_f(fmd_hdl_t *, cmd_xr_t *, fmd_event_t *);
-
-/*
- * For sun4v, the size of xr_synd is expanded to 32 bits in order to
- * accomodate the Niagara L2 syndrome (4x7 bits).
- */
-
-struct cmd_xr {
- cmd_list_t xr_list;
- id_t xr_id; /* ID of timer used for redelivery */
- cmd_cpu_t *xr_cpu; /* Detecting CPU, recalc'd from cpuid */
- uint32_t xr_cpuid; /* ID of detecting CPU */
- uint64_t xr_ena; /* ENA from ereport */
- uint64_t xr_afar; /* AFAR from ereport nvlist */
-#ifdef sun4u
- uint16_t xr_synd; /* syndrome from ereport nvlist */
-#else /* sun4u */
- uint32_t xr_synd; /* for Niagara, enlarged to 32 bits */
-#endif /* sun4u */
- uint8_t xr_afar_status; /* AFAR status from ereport nvlist */
- uint8_t xr_synd_status; /* syndrome status from ereport nvlist */
- cmd_fmri_t xr_rsrc; /* resource from ereport nvlist */
- cmd_errcl_t xr_clcode; /* CMD_ERRCL_* for this ereport */
- cmd_xr_hdlr_f *xr_hdlr; /* handler, recalc'd from hdlrid on restart */
- uint_t xr_hdlrid; /* CMD_XR_HDLR_*, used for recalc of hdlr */
- fmd_case_t *xr_case; /* Throwaway case used to track redelivery */
- uint_t xr_ref; /* Number of references to this struct */
-#ifdef sun4u
- uint64_t xr_afsr; /* AFSR from ereport nvlist */
- uint8_t xr_num_ways; /* Number of Cache ways reporting from nvlist */
- uint32_t xr_error_way; /* The way from the ereport nvlist payload */
- uint64_t xr_error_tag; /* The tag from the ereport nvlist payload */
- uint32_t xr_error_index; /* the index from the ereport payload */
- uint64_t *xr_cache_data; /* The cache data */
- nvlist_t *xr_detector_nvlist; /* The detecting resource */
-#endif
-};
-
-#define xr_rsrc_nvl xr_rsrc.fmri_nvl
-
-extern cmd_xr_t *cmd_xr_create(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- cmd_cpu_t *, cmd_errcl_t);
-extern cmd_evdisp_t cmd_xr_reschedule(fmd_hdl_t *, cmd_xr_t *, uint_t);
-extern void cmd_xr_deref(fmd_hdl_t *, cmd_xr_t *);
-extern void cmd_xr_write(fmd_hdl_t *, cmd_xr_t *);
-
-extern void cmd_xxc_resolve(fmd_hdl_t *, cmd_xr_t *, fmd_event_t *);
-extern void cmd_xxu_resolve(fmd_hdl_t *, cmd_xr_t *, fmd_event_t *);
-extern void cmd_nop_resolve(fmd_hdl_t *, cmd_xr_t *, fmd_event_t *);
-extern cmd_evdisp_t cmd_xxcu_initial(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t, uint_t);
-
-/*
- * The master structure containing or referencing all of the state for a given
- * CPU.
- */
-
-/*
- * We periodically flush the E$, thus allowing us to flush the UE cache (see
- * above for a description of the UE cache). In particular, we flush it
- * whenever we see a UE with a non-valid AFAR. To keep from overflushing the
- * CPU, we cap the number of flushes that we'll do in response to UEs with
- * non-valid AFARs. The cap is the number of permitted flushes per GC/restart
- * cycle, and was determined arbitrarily.
- */
-#define CPU_UEC_FLUSH_MAX 3
-
-/*
- * The CPU structure started life without a version number. Making things more
- * complicated, the version number in the new struct occupies the space used for
- * cpu_cpuid in the non-versioned struct. We therefore have to use somewhat
- * unorthodox version numbers to distinguish between the two types of struct
- * (pre- and post-versioning) -- version numbers that can't be mistaken for
- * CPUIDs. Our version numbers, therefore, will be negative.
- *
- * For future expansion, the version member must always stay where it is. At
- * some point in the future, when more structs get versions, the version member
- * should move into the cmd_header_t.
- */
-#define CPU_MKVERSION(version) ((uint_t)(0 - (version)))
-
-#define CMD_CPU_VERSION_1 CPU_MKVERSION(1) /* -1 */
-#define CMD_CPU_VERSION_2 CPU_MKVERSION(2) /* -2 */
-#define CMD_CPU_VERSION_3 CPU_MKVERSION(3) /* -3 */
-#define CMD_CPU_VERSION CMD_CPU_VERSION_3
-
-#define CMD_CPU_VERSIONED(cpu) ((int)(cpu)->cpu_version < 0)
-
-#define CMD_CPU_F_DELETING 0x1
-
-typedef struct cmd_cpu_0 {
- cmd_header_t cpu0_header; /* Nodetype must be CMD_NT_CPU */
- uint32_t cpu0_cpuid; /* Logical ID for this CPU */
- cmd_cpu_type_t cpu0_type; /* CPU model */
- fmd_case_t *cpu0_cases[4]; /* v0 had embedded case_t w/4 cases */
- uint8_t cpu0_faulting; /* Set if fault has been issued */
- cmd_fmri_t cpu0_asru; /* ASRU for this CPU */
- cmd_fmri_t cpu0_fru; /* FRU for this CPU */
- cmd_cpu_uec_t cpu0_uec; /* UE cache */
- cmd_cpu_uec_t cpu0_olduec; /* To-be-flushed UE cache */
- id_t cpu0_uec_flush; /* Timer ID for UE cache flush */
- uint_t cpu0_uec_nflushes; /* # of flushes since last restart/GC */
- cmd_list_t cpu0_xxu_retries; /* List of pending xxU retries */
-} cmd_cpu_0_t;
-
-typedef struct cmd_cpu_1 {
- cmd_header_t cpu1_header; /* Nodetype must be CMD_NT_CPU */
- uint_t cpu1_version; /* struct version - must follow hdr */
- uint32_t cpu1_cpuid; /* Logical ID for this CPU */
- cmd_cpu_type_t cpu1_type; /* CPU model */
- uintptr_t *cpu1_cases; /* v1 had a pointer to a case array */
- uint8_t cpu1_faulting; /* Set if fault has been issued */
- cmd_fmri_t cpu1_asru; /* ASRU for this CPU */
- cmd_fmri_t cpu1_fru; /* FRU for this CPU */
- cmd_cpu_uec_t cpu1_uec; /* UE cache */
- cmd_cpu_uec_t cpu1_olduec; /* To-be-flushed UE cache */
- id_t cpu1_uec_flush; /* Timer ID for UE cache flush */
- uint_t cpu1_uec_nflushes; /* # of flushes since last restart/GC */
- cmd_list_t cpu1_xxu_retries; /* List of pending xxU retries */
-} cmd_cpu_1_t;
-
-typedef struct cmd_cpu_2 {
- cmd_header_t cpu2_header; /* Nodetype must be CMD_NT_CPU */
- uint_t cpu2_version; /* struct version - must follow hdr */
- uint32_t cpu2_cpuid; /* Logical ID for this CPU */
- cmd_cpu_type_t cpu2_type; /* CPU model */
- uint8_t cpu2_faulting; /* Set if fault has been issued */
- cmd_fmri_t cpu2_asru; /* ASRU for this CPU */
- cmd_fmri_t cpu2_fru; /* FRU for this CPU */
- cmd_cpu_uec_t cpu2_uec; /* UE cache */
- cmd_cpu_uec_t cpu2_olduec; /* To-be-flushed UE cache */
-} cmd_cpu_2_t;
-
-/* Portion of the cpu structure which must be persisted */
-typedef struct cmd_cpu_pers {
- cmd_header_t cpup_header; /* Nodetype must be CMD_NT_CPU */
- uint_t cpup_version; /* struct version - must follow hdr */
- uint32_t cpup_cpuid; /* Logical ID for this CPU */
- cmd_cpu_type_t cpup_type; /* CPU model */
- uint8_t cpup_faulting; /* Set if fault has been issued */
- uint8_t cpup_level; /* cpu group level - 0 == thread */
- cmd_fmri_t cpup_asru; /* ASRU for this CPU */
- cmd_fmri_t cpup_fru; /* FRU for this CPU */
- cmd_cpu_uec_t cpup_uec; /* UE cache */
- cmd_cpu_uec_t cpup_olduec; /* To-be-flushed UE cache */
-} cmd_cpu_pers_t;
-
-/* Persistent and dynamic CPU data */
-struct cmd_cpu {
- cmd_cpu_pers_t cpu_pers;
- cmd_cpu_cases_t cpu_cases;
- id_t cpu_uec_flush; /* Timer ID for UE cache flush */
- uint_t cpu_uec_nflushes; /* # of flushes since last restart/GC */
- cmd_list_t cpu_xxu_retries; /* List of pending xxU retries */
- uint_t cpu_flags;
- cmd_list_t cpu_Lxcaches; /* List of Lxcache state structures */
- fmd_stat_t Lxcache_creat; /* num of Lxcache states created */
-};
-
-#define CMD_CPU_MAXSIZE \
- MAX(MAX(sizeof (cmd_cpu_0_t), sizeof (cmd_cpu_1_t)), \
- MAX(sizeof (cmd_cpu_2_t), sizeof (cmd_cpu_pers_t)))
-#define CMD_CPU_MINSIZE \
- MIN(MIN(sizeof (cmd_cpu_0_t), sizeof (cmd_cpu_1_t)), \
- MIN(sizeof (cmd_cpu_2_t), sizeof (cmd_cpu_pers_t)))
-
-#define cpu_header cpu_pers.cpup_header
-#define cpu_nodetype cpu_pers.cpup_header.hdr_nodetype
-#define cpu_bufname cpu_pers.cpup_header.hdr_bufname
-#define cpu_version cpu_pers.cpup_version
-#define cpu_cpuid cpu_pers.cpup_cpuid
-#define cpu_type cpu_pers.cpup_type
-#define cpu_faulting cpu_pers.cpup_faulting
-#define cpu_level cpu_pers.cpup_level
-#define cpu_asru cpu_pers.cpup_asru
-#define cpu_fru cpu_pers.cpup_fru
-#define cpu_uec cpu_pers.cpup_uec
-#define cpu_olduec cpu_pers.cpup_olduec
-#define cpu_icache cpu_cases.cpuc_icache
-#define cpu_dcache cpu_cases.cpuc_dcache
-#define cpu_pcache cpu_cases.cpuc_pcache
-#define cpu_itlb cpu_cases.cpuc_itlb
-#define cpu_dtlb cpu_cases.cpuc_dtlb
-#define cpu_l2data cpu_cases.cpuc_l2data
-#define cpu_l2tag cpu_cases.cpuc_l2tag
-#define cpu_l3data cpu_cases.cpuc_l3data
-#define cpu_l3tag cpu_cases.cpuc_l3tag
-#define cpu_fpu cpu_cases.cpuc_fpu
-#define cpu_ireg cpu_cases.cpuc_ireg
-#define cpu_freg cpu_cases.cpuc_freg
-#define cpu_mau cpu_cases.cpuc_mau
-#define cpu_l2ctl cpu_cases.cpuc_l2ctl
-#define cpu_misc_regs cpu_cases.cpuc_misc_regs
-#define cpu_lfu cpu_cases.cpuc_lfu
-#ifdef sun4u
-#define cpu_opl_invsfsr cpu_cases.cpuc_opl_invsfsr
-#define cpu_oplue_detcpu cpu_cases.cpuc_oplue_detcpu
-#define cpu_oplue_detio cpu_cases.cpuc_oplue_detio
-#define cpu_opl_mtlb cpu_cases.cpuc_opl_mtlb
-#define cpu_opl_tlbp cpu_cases.cpuc_opl_tlbp
-#define cpu_opl_inv_urg cpu_cases.cpuc_opl_inv_urg
-#define cpu_opl_cre cpu_cases.cpuc_opl_cre
-#define cpu_opl_tsb_ctx cpu_cases.cpuc_opl_tsb_ctx
-#define cpu_opl_tsbp cpu_cases.cpuc_opl_tsbp
-#define cpu_opl_pstate cpu_cases.cpuc_opl_pstate
-#define cpu_opl_tstate cpu_cases.cpuc_opl_tstate
-#define cpu_opl_iug_f cpu_cases.cpuc_opl_iug_f
-#define cpu_opl_iug_r cpu_cases.cpuc_opl_iug_r
-#define cpu_opl_sdc cpu_cases.cpuc_opl_sdc
-#define cpu_opl_wdt cpu_cases.cpuc_opl_wdt
-#define cpu_opl_dtlb cpu_cases.cpuc_opl_dtlb
-#define cpu_opl_itlb cpu_cases.cpuc_opl_itlb
-#define cpu_opl_core_err cpu_cases.cpuc_opl_core_err
-#define cpu_opl_dae cpu_cases.cpuc_opl_dae
-#define cpu_opl_iae cpu_cases.cpuc_opl_iae
-#define cpu_opl_uge cpu_cases.cpuc_opl_uge
-#endif /* sun4u */
-
-#define cpu_asru_nvl cpu_asru.fmri_nvl
-#define cpu_fru_nvl cpu_fru.fmri_nvl
-
-/*
- * L2$ and L3$ Data errors
- *
- * SERD name
- * Type (if any) Fault
- * ------ ----------- -------------------------------
- * xxC l2cachedata fault.cpu.<cputype>.l2cachedata
- * xxU - fault.cpu.<cputype>.l2cachedata
- * L3_xxC l3cachedata fault.cpu.<cputype>.l3cachedata
- * L3_xxU - fault.cpu.<cputype>.l3cachedata
- *
- * NOTE: For the purposes of the discussion below, xxC and xxU refer to both
- * L2$ and L3$ data errors.
- *
- * These ereports will be dropped if (among other things) they are side-effects
- * of UEs (xxUs only) or other xxCs or xxUs. Whenever UEs are detected, they
- * are added to a per-CPU cache. xxUs are then compared to this cache. If a
- * xxU's AFAR refers to an address which recently saw a UE, the xxU is dropped,
- * as it was most likely caused by the UE. When multiple xxCs and xxUs are seen
- * with the same ENA, all save one are generally side-effects. We track these
- * groups (referred to as trains), matching them against a premade list. If one
- * of the trains matches, we drop all but the primary, which is indicated in the
- * list.
- *
- * The expected resolution of l2cachedata and l3cachedata faults is the
- * disabling of the indicated CPU.
- */
-extern cmd_evdisp_t cmd_xxc(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-extern cmd_evdisp_t cmd_xxu(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-
-/*
- * As of Niagara-2, we ignore writeback (ldwc, ldwu) errors. Since these were
- * the only defined follow-on errors for sun4v trains, sun4v L2 cache data
- * errors no longer need to use the train mechanism.
- */
-
-extern cmd_evdisp_t cmd_l2c(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-extern cmd_evdisp_t cmd_l2u(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-
-/*
- * Common Errdata structure for SERD engines
- */
-typedef struct errdata {
- cmd_serd_t *ed_serd;
- const char *ed_fltnm;
- const cmd_ptrsubtype_t ed_pst;
-} errdata_t;
-
-/*
- * L2$ and L3$ Tag errors
- *
- * SERD name
- * Type (if any) Fault
- * ------- ----------- -------------------------------
- * TxCE l2cachetag fault.cpu.<cputype>.l2cachetag
- * L3_THCE l3cachetag fault.cpu.<cputype>.l3cachetag
- * LTC l2cachetag fault.cpu.<cputype>.l2cachetag
- *
- * We'll never see the uncorrectable Tag errors - they'll cause the machine to
- * reset, and we'll be ne'er the wiser.
- *
- * The expected resolution of l2cachetag and l3cachetag faults is the disabling
- * of the indicated CPU.
- */
-extern cmd_evdisp_t cmd_txce(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-
-extern cmd_evdisp_t cmd_l3_thce(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-
-/*
- * L1$ errors
- *
- * SERD name
- * Type (if any) Fault
- * ------- --------- -------------------------------
- * IPE icache fault.cpu.<cputype>.icache
- * IxSPE icache fault.cpu.<cputype>.icache
- * DPE dcache fault.cpu.<cputype>.dcache
- * DxSPE dcache fault.cpu.<cputype>.dcache
- * PDSPE pcache fault.cpu.<cputype>.pcache
- *
- * The I$, D$, and P$ are clean, and thus have no uncorrectable errors.
- *
- * The expected resolution of icache, dcache, and pcache faults is the disabling
- * of the indicated CPU.
- */
-extern cmd_evdisp_t cmd_icache(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-extern cmd_evdisp_t cmd_dcache(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-extern cmd_evdisp_t cmd_pcache(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-
-/*
- * TLB errors
- *
- * SERD name
- * Type (if any) Fault
- * ------ --------- -------------------------------
- * ITLBPE itlb fault.cpu.<cputype>.itlb
- * DTLBPE dtlb fault.cpu.<cputype>.dtlb
- *
- * The expected resolution of itlb and dtlb faults is the disabling of the
- * indicated CPU.
- */
-extern cmd_evdisp_t cmd_itlb(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-extern cmd_evdisp_t cmd_dtlb(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-
-extern void cmd_cpuerr_close(fmd_hdl_t *, void *);
-
-/*
- * FPU errors
- *
- * SERD name
- * Type (if any) Fault
- * ------ --------- -------------------------------
- * FPU - fault.cpu.<cputype>.fpu
- *
- * The expected resolution of FPU faults is the disabling of the indicated CPU.
- */
-extern cmd_evdisp_t cmd_fpu(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-
-
-/*
- * ireg errors
- *
- * SERD name
- * Type (if any) Fault
- * ------ --------- -------------------------------
- * IRC ireg fault.cpu.<cputype>.ireg
- * IRU - "
- *
- * The expected resolution of ireg faults is the disabling of the indicated CPU.
- */
-extern cmd_evdisp_t cmd_irc(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-extern cmd_evdisp_t cmd_iru(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-
-/*
- * freg errors
- *
- * SERD name
- * Type (if any) Fault
- * ------ --------- -------------------------------
- * FRC freg fault.cpu.ultraSPARC-T1.frc
- * FRU - " .fru
- *
- * The expected resolution of freg faults is the repair of the indicated CPU.
- */
-extern cmd_evdisp_t cmd_frc(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-extern cmd_evdisp_t cmd_fru(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-
-/*
- * MAU errors
- *
- * SERD name
- * Type (if any) Fault
- * ------ --------- -------------------------------
- * MAU mau fault.cpu.<cputype>.mau
- *
- * The expected resolution of mau faults is the repair of the indicated CPU.
- */
-extern cmd_evdisp_t cmd_mau(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-
-/*
- * L2CTL errors
- *
- * SERD name
- * Type (if any) Fault
- * ------ --------- -------------------------------
- * L2CTL - fault.cpu.<cputype>.l2ctl
- *
- * The expected resolution of l2ctl faults is the repair of the indicated CPU.
- */
-extern cmd_evdisp_t cmd_l2ctl(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-
-/*
- * SBD (Storage Buffer Data) errors
- * SCA (Scratchpath Array) erros
- * TC (Tick compare) errors
- * TSA (Trap stack Array) errors
- *
- * SERD name
- * Type (if any) Fault
- * ------ --------- -------------------------------
- * SBDC misc_regs fault.cpu.<cputype>.misc_regs
- * SBDU
- * SCAC, SCAU
- * TCC, TCU
- * TSAC, TSAU
- *
- * The expected resolution of misc_regs faults is the repair of
- * the indicated CPU.
- */
-extern cmd_evdisp_t cmd_miscregs_ce(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-extern cmd_evdisp_t cmd_miscregs_ue(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-
-extern cmd_evdisp_t cmd_miscregs_train(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-
-/*
- * Type Fault
- * ---------------------------------------------------------------------
- * LFU-RTF uncorrectable link retrain fail error fault.cpu.T2plus.lfu-u
- * LFU-TTO uncorrectable training timeout error
- * LFU-CTO uncorrectable config timeout error
- * LFU-MLF uncorrectable multi lanes link fail error
- * LFU-SLF correctable single lane failover fault.cpu.T2plus.lfu-f
- *
- * The expected resolution of lfu faults is the repair of the indicated CPU.
- */
-extern cmd_evdisp_t cmd_lfu_ue(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-extern cmd_evdisp_t cmd_lfu_ce(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-/*
- * Type Fault
- * ---------------------------------------------------------------------
- * Coherency link protocol errors
- * to Transaction timed out fault.cpu.T2plus.lfu-p
- * frack Invalid or redundant request ack
- * fsr Invalid or redundant snoop response
- * fdr Invalid or redundant data return
- * snptyp Invalid snoop type received from
- * coherency link
- *
- * The expected resolution of lfu faults is the repair of the indicated CPU.
- */
-extern cmd_evdisp_t cmd_lfu_pe(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-
-/*
- * CPUs are described by FMRIs. This routine will retrieve the CPU state
- * structure (creating a new one if necessary) described by the detector
- * FMRI in the passed ereport.
- */
-extern cmd_cpu_t *cmd_cpu_lookup_from_detector(fmd_hdl_t *, nvlist_t *,
- const char *, uint8_t);
-
-extern char *cmd_cpu_getfrustr(fmd_hdl_t *, cmd_cpu_t *);
-extern char *cmd_cpu_getpartstr(fmd_hdl_t *, cmd_cpu_t *);
-
-extern char *cmd_cpu_getserialstr(fmd_hdl_t *, cmd_cpu_t *);
-extern nvlist_t *cmd_cpu_mkfru(fmd_hdl_t *, char *, char *, char *);
-
-extern cmd_cpu_t *cmd_cpu_lookup(fmd_hdl_t *, nvlist_t *, const char *,
- uint8_t);
-
-extern void cmd_cpu_create_faultlist(fmd_hdl_t *, fmd_case_t *, cmd_cpu_t *,
- const char *, nvlist_t *, uint_t);
-
-extern cmd_cpu_t *cmd_restore_cpu_only(fmd_hdl_t *, fmd_case_t *, char *);
-extern void cmd_cpu_destroy(fmd_hdl_t *, cmd_cpu_t *);
-extern void *cmd_cpu_restore(fmd_hdl_t *, fmd_case_t *, cmd_case_ptr_t *);
-extern void cmd_cpu_validate(fmd_hdl_t *);
-extern void cmd_cpu_timeout(fmd_hdl_t *, id_t, void *);
-extern void cmd_cpu_gc(fmd_hdl_t *);
-extern void cmd_cpu_fini(fmd_hdl_t *hdl);
-extern char *cmd_cpu_serdnm_create(fmd_hdl_t *, cmd_cpu_t *, const char *);
-extern nvlist_t *cmd_cpu_fmri_create(uint32_t, uint8_t);
-
-extern uint32_t cmd_cpu2core(uint32_t, cmd_cpu_type_t, uint8_t);
-
-#define CMD_CPU_LEVEL_THREAD 0
-#define CMD_CPU_LEVEL_CORE 1
-#define CMD_CPU_LEVEL_CHIP 2
-#define CMD_CPU_STAT_BUMP(cpu, name) cpu->name.fmds_value.ui64++
-
-typedef enum {
- CMD_CPU_FAM_UNSUPPORTED,
- CMD_CPU_FAM_CHEETAH,
- CMD_CPU_FAM_NIAGARA,
- CMD_CPU_FAM_SPARC64
-} cpu_family_t;
-
-typedef struct faminfo {
- cpu_family_t fam_value;
- boolean_t ecache_flush_needed;
-} faminfo_t;
-
-extern cpu_family_t cmd_cpu_check_support(void);
-extern boolean_t cmd_cpu_ecache_support(void);
-
-extern int cmd_xr_fill(fmd_hdl_t *, nvlist_t *, cmd_xr_t *, cmd_errcl_t);
-extern void cmd_fill_errdata(cmd_errcl_t, cmd_cpu_t *, cmd_case_t **,
- const errdata_t **);
-extern cmd_xxcu_trw_t *cmd_trw_lookup(uint64_t, uint8_t, uint64_t);
-extern cmd_evdisp_t cmd_nop_train(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-extern cmd_errcl_t cmd_train_match(cmd_errcl_t, cmd_errcl_t);
-extern int cmd_afar_status_check(uint8_t, cmd_errcl_t);
-
-#ifdef sun4u
-extern int cmd_cpu_synd_check(uint16_t, cmd_errcl_t clcode);
-#else /* sun4u */
-extern int cmd_cpu_synd_check(uint32_t, cmd_errcl_t clcode);
-#endif /* sun4u */
-
-extern int cmd_afar_valid(fmd_hdl_t *hdl, nvlist_t *nvl, cmd_errcl_t,
- uint64_t *afar);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _CMD_CPU_H */
diff --git a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_cpuerr.c b/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_cpuerr.c
deleted file mode 100644
index 711624846c..0000000000
--- a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_cpuerr.c
+++ /dev/null
@@ -1,581 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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.
- */
-
-/*
- * Ereport-handling routines for CPU errors
- */
-
-#include <cmd_cpu.h>
-#include <cmd.h>
-
-#include <strings.h>
-#include <string.h>
-#include <errno.h>
-#include <fm/fmd_api.h>
-#include <sys/fm/protocol.h>
-#include <sys/async.h>
-#ifdef sun4u
-#include <sys/fm/cpu/UltraSPARC-III.h>
-#include <cmd_Lxcache.h>
-#include <cmd_opl.h>
-#endif
-
-/*
- * We follow the same algorithm for handling all L1$, TLB, and L2/L3 cache
- * tag events so we can have one common routine into which each handler
- * calls. The two tests of (strcmp(serdnm, "") != 0) are used to eliminate
- * the need for a separate macro for UEs which override SERD engine
- * counting CEs leading to same fault.
- */
-/*ARGSUSED9*/
-static cmd_evdisp_t
-cmd_cpuerr_common(fmd_hdl_t *hdl, fmd_event_t *ep, cmd_cpu_t *cpu,
- cmd_case_t *cc, cmd_ptrsubtype_t pstype, const char *serdnm,
- const char *serdn, const char *serdt, const char *fltnm,
- cmd_errcl_t clcode)
-{
- const char *uuid;
-
- if (cc->cc_cp != NULL && fmd_case_solved(hdl, cc->cc_cp))
- return (CMD_EVD_REDUND);
-
- if (cc->cc_cp == NULL) {
- cc->cc_cp = cmd_case_create(hdl, &cpu->cpu_header, pstype,
- &uuid);
- if (strcmp(serdnm, "") != 0) {
- cc->cc_serdnm = cmd_cpu_serdnm_create(hdl, cpu,
- serdnm);
- fmd_serd_create(hdl, cc->cc_serdnm,
- fmd_prop_get_int32(hdl, serdn),
- fmd_prop_get_int64(hdl, serdt));
- }
- }
-
- if (strcmp(serdnm, "") != 0) {
- fmd_hdl_debug(hdl, "adding event to %s\n", cc->cc_serdnm);
- if (fmd_serd_record(hdl, cc->cc_serdnm, ep) == FMD_B_FALSE)
- return (CMD_EVD_OK); /* serd engine hasn't fired yet */
-
- fmd_case_add_serd(hdl, cc->cc_cp, cc->cc_serdnm);
- } else {
- if (cc->cc_serdnm != NULL) {
- fmd_hdl_debug(hdl,
- "destroying existing %s state for class %x\n",
- cc->cc_serdnm, clcode);
- fmd_serd_destroy(hdl, cc->cc_serdnm);
- fmd_hdl_strfree(hdl, cc->cc_serdnm);
- cc->cc_serdnm = NULL;
- }
- fmd_case_reset(hdl, cc->cc_cp);
- fmd_case_add_ereport(hdl, cc->cc_cp, ep);
- }
-
- cmd_cpu_create_faultlist(hdl, cc->cc_cp, cpu, fltnm, NULL, 100);
-
- fmd_case_solve(hdl, cc->cc_cp);
-
- return (CMD_EVD_OK);
-}
-#ifdef sun4u
-
-#define CMD_CPU_TAGHANDLER(name, casenm, ptr, ntname, fltname) \
-cmd_evdisp_t \
-cmd_##name(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl, \
- const char *class, cmd_errcl_t clcode) \
-{ \
- uint8_t level = clcode & CMD_ERRCL_LEVEL_EXTRACT; \
- cmd_cpu_t *cpu; \
- \
- clcode &= CMD_ERRCL_LEVEL_MASK; \
- if ((cpu = cmd_cpu_lookup_from_detector(hdl, nvl, class, \
- level)) == NULL || cpu->cpu_faulting) \
- return (CMD_EVD_UNUSED); \
- \
- if ((strstr(class, "ultraSPARC-IVplus.l3-thce") != 0) || \
- (strstr(class, "ultraSPARC-IVplus.thce") != 0)) { \
- return (cmd_us4plus_tag_err(hdl, ep, nvl, cpu, \
- ptr, ntname "_n", ntname "_t", fltname, clcode)); \
- } \
- return (cmd_cpuerr_common(hdl, ep, cpu, &cpu->cpu_##casenm, \
- ptr, ntname, ntname "_n", ntname "_t", fltname, clcode)); \
-}
-#endif
-
-#define CMD_CPU_SIMPLEHANDLER(name, casenm, ptr, ntname, fltname) \
-cmd_evdisp_t \
-cmd_##name(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl, \
- const char *class, cmd_errcl_t clcode) \
-{ \
- uint8_t level = clcode & CMD_ERRCL_LEVEL_EXTRACT; \
- cmd_cpu_t *cpu; \
- \
- clcode &= CMD_ERRCL_LEVEL_MASK; \
- if ((cpu = cmd_cpu_lookup_from_detector(hdl, nvl, class, \
- level)) == NULL || cpu->cpu_faulting) \
- return (CMD_EVD_UNUSED); \
- \
- return (cmd_cpuerr_common(hdl, ep, cpu, &cpu->cpu_##casenm, \
- ptr, ntname, ntname "_n", ntname "_t", fltname, clcode)); \
-}
-
-#ifdef sun4u
-CMD_CPU_TAGHANDLER(txce, l2tag, CMD_PTR_CPU_L2TAG, "l2tag", "l2cachetag")
-CMD_CPU_TAGHANDLER(l3_thce, l3tag, CMD_PTR_CPU_L3TAG, "l3tag", "l3cachetag")
-#else
-CMD_CPU_SIMPLEHANDLER(txce, l2tag, CMD_PTR_CPU_L2TAG, "l2tag", "l2cachetag")
-CMD_CPU_SIMPLEHANDLER(l3_thce, l3tag, CMD_PTR_CPU_L3TAG, "l3tag", "l3cachetag")
-#endif
-CMD_CPU_SIMPLEHANDLER(icache, icache, CMD_PTR_CPU_ICACHE, "icache", "icache")
-CMD_CPU_SIMPLEHANDLER(dcache, dcache, CMD_PTR_CPU_DCACHE, "dcache", "dcache")
-CMD_CPU_SIMPLEHANDLER(pcache, pcache, CMD_PTR_CPU_PCACHE, "pcache", "pcache")
-CMD_CPU_SIMPLEHANDLER(itlb, itlb, CMD_PTR_CPU_ITLB, "itlb", "itlb")
-CMD_CPU_SIMPLEHANDLER(dtlb, dtlb, CMD_PTR_CPU_DTLB, "dtlb", "dtlb")
-CMD_CPU_SIMPLEHANDLER(irc, ireg, CMD_PTR_CPU_IREG, "ireg", "ireg")
-CMD_CPU_SIMPLEHANDLER(frc, freg, CMD_PTR_CPU_FREG, "freg", "freg")
-CMD_CPU_SIMPLEHANDLER(mau, mau, CMD_PTR_CPU_MAU, "mau", "mau")
-CMD_CPU_SIMPLEHANDLER(miscregs_ce, misc_regs, CMD_PTR_CPU_MISC_REGS,
- "misc_regs", "misc_reg")
-CMD_CPU_SIMPLEHANDLER(l2c, l2data, CMD_PTR_CPU_L2DATA, "l2data", "l2data-c")
-
-CMD_CPU_SIMPLEHANDLER(fpu, fpu, CMD_PTR_CPU_FPU, "", "fpu")
-CMD_CPU_SIMPLEHANDLER(l2ctl, l2ctl, CMD_PTR_CPU_L2CTL, "", "l2cachectl")
-CMD_CPU_SIMPLEHANDLER(iru, ireg, CMD_PTR_CPU_IREG, "", "ireg")
-CMD_CPU_SIMPLEHANDLER(fru, freg, CMD_PTR_CPU_FREG, "", "freg")
-CMD_CPU_SIMPLEHANDLER(miscregs_ue, misc_regs, CMD_PTR_CPU_MISC_REGS,
- "", "misc_reg")
-CMD_CPU_SIMPLEHANDLER(l2u, l2data, CMD_PTR_CPU_L2DATA, "", "l2data-u")
-CMD_CPU_SIMPLEHANDLER(lfu_ue, lfu, CMD_PTR_CPU_LFU, "", "lfu-u")
-CMD_CPU_SIMPLEHANDLER(lfu_ce, lfu, CMD_PTR_CPU_LFU, "", "lfu-f")
-CMD_CPU_SIMPLEHANDLER(lfu_pe, lfu, CMD_PTR_CPU_LFU, "", "lfu-p")
-
-
-#ifdef sun4u
-/*
- * The following macro handles UEs or CPU errors.
- * It handles the error cases in which there is with or
- * without "resource".
- *
- * If the "fltname" "core" is to be generated, the sibling CPUs
- * within the core will be added to the suspect list.
- * If the "fltname" "chip" is to be generated, the sibling CPUs
- * within the chip will be added to the suspect list.
- * If the "fltname" "strand" is to be generated, the strand
- * itself will be in the suspect list.
- */
-#define CMD_OPL_UEHANDLER(name, casenm, ptr, fltname, has_rsrc) \
-cmd_evdisp_t \
-cmd_##name(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl, \
- const char *class, cmd_errcl_t clcode) \
-{ \
- cmd_cpu_t *cpu; \
- cmd_case_t *cc; \
- cmd_evdisp_t rc; \
- nvlist_t *rsrc = NULL; \
- uint8_t cpumask, version = 1; \
- uint8_t lookup_rsrc = has_rsrc; \
- \
- fmd_hdl_debug(hdl, \
- "Enter cmd_opl_ue_cpu for class %x\n", clcode); \
- \
- if (lookup_rsrc) { \
- if (nvlist_lookup_nvlist(nvl, \
- FM_EREPORT_PAYLOAD_NAME_RESOURCE, &rsrc) != 0) \
- return (CMD_EVD_BAD); \
- \
- if ((cpu = cmd_cpu_lookup(hdl, rsrc, class, \
- CMD_CPU_LEVEL_THREAD)) == NULL || \
- cpu->cpu_faulting) \
- return (CMD_EVD_UNUSED); \
- } else { \
- if ((cpu = cmd_cpu_lookup_from_detector(hdl, nvl, class,\
- CMD_CPU_LEVEL_THREAD)) == NULL || cpu->cpu_faulting)\
- return (CMD_EVD_UNUSED); \
- \
- (void) nvlist_lookup_nvlist(nvl, \
- FM_EREPORT_DETECTOR, &rsrc); \
- } \
- \
- if (nvlist_lookup_uint8(rsrc, FM_VERSION, &version) != 0 || \
- version > FM_CPU_SCHEME_VERSION || \
- nvlist_lookup_uint8(rsrc, FM_FMRI_CPU_MASK, &cpumask) != 0) \
- return (CMD_EVD_BAD); \
- \
- cc = &cpu->cpu_##casenm; \
- rc = cmd_opl_ue_cpu(hdl, ep, class, fltname, \
- ptr, cpu, cc, cpumask); \
- return (rc); \
-}
-
-/*
- * CPU errors without resource
- */
-CMD_OPL_UEHANDLER(oplinv_urg, opl_inv_urg, CMD_PTR_CPU_UGESR_INV_URG, "core", 0)
-CMD_OPL_UEHANDLER(oplcre, opl_cre, CMD_PTR_CPU_UGESR_CRE, "core", 0)
-CMD_OPL_UEHANDLER(opltsb_ctx, opl_tsb_ctx, CMD_PTR_CPU_UGESR_TSB_CTX, "core", 0)
-CMD_OPL_UEHANDLER(opltsbp, opl_tsbp, CMD_PTR_CPU_UGESR_TSBP, "core", 0)
-CMD_OPL_UEHANDLER(oplpstate, opl_pstate, CMD_PTR_CPU_UGESR_PSTATE, "core", 0)
-CMD_OPL_UEHANDLER(opltstate, opl_tstate, CMD_PTR_CPU_UGESR_TSTATE, "core", 0)
-CMD_OPL_UEHANDLER(opliug_f, opl_iug_f, CMD_PTR_CPU_UGESR_IUG_F, "core", 0)
-CMD_OPL_UEHANDLER(opliug_r, opl_iug_r, CMD_PTR_CPU_UGESR_IUG_R, "core", 0)
-CMD_OPL_UEHANDLER(oplsdc, opl_sdc, CMD_PTR_CPU_UGESR_SDC, "chip", 0)
-CMD_OPL_UEHANDLER(oplwdt, opl_wdt, CMD_PTR_CPU_UGESR_WDT, "core", 0)
-CMD_OPL_UEHANDLER(opldtlb, opl_dtlb, CMD_PTR_CPU_UGESR_DTLB, "core", 0)
-CMD_OPL_UEHANDLER(oplitlb, opl_itlb, CMD_PTR_CPU_UGESR_ITLB, "core", 0)
-CMD_OPL_UEHANDLER(oplcore_err, opl_core_err, CMD_PTR_CPU_UGESR_CORE_ERR,
-"core", 0)
-CMD_OPL_UEHANDLER(opldae, opl_dae, CMD_PTR_CPU_UGESR_DAE, "core", 0)
-CMD_OPL_UEHANDLER(opliae, opl_iae, CMD_PTR_CPU_UGESR_IAE, "core", 0)
-CMD_OPL_UEHANDLER(opluge, opl_uge, CMD_PTR_CPU_UGESR_UGE, "core", 0)
-
-/*
- * UEs with resource
- */
-CMD_OPL_UEHANDLER(oplinv_sfsr, opl_invsfsr, CMD_PTR_CPU_INV_SFSR, "strand", 1)
-CMD_OPL_UEHANDLER(opluecpu_detcpu, oplue_detcpu, CMD_PTR_CPU_UE_DET_CPU,
-"core", 1)
-CMD_OPL_UEHANDLER(opluecpu_detio, oplue_detio, CMD_PTR_CPU_UE_DET_IO, "core", 1)
-CMD_OPL_UEHANDLER(oplmtlb, opl_mtlb, CMD_PTR_CPU_MTLB, "core", 1)
-CMD_OPL_UEHANDLER(opltlbp, opl_tlbp, CMD_PTR_CPU_TLBP, "core", 1)
-#endif /* sun4u */
-
-/*ARGSUSED*/
-static void
-cmd_nop_hdlr(fmd_hdl_t *hdl, cmd_xr_t *xr, fmd_event_t *ep)
-{
- fmd_hdl_debug(hdl, "nop train resolved for clcode %llx\n",
- xr->xr_clcode);
-}
-
-/*ARGSUSED*/
-static void
-cmd_xxu_hdlr(fmd_hdl_t *hdl, cmd_xr_t *xr, fmd_event_t *ep)
-{
- const errdata_t *ed;
- cmd_cpu_t *cpu = xr->xr_cpu;
- cmd_case_t *cc;
- const char *uuid;
- nvlist_t *rsrc = NULL;
-
- cmd_fill_errdata(xr->xr_clcode, cpu, &cc, &ed);
-
- if (cpu->cpu_faulting) {
- CMD_STAT_BUMP(xxu_retr_flt);
- return;
- }
-
- if (cmd_afar_status_check(xr->xr_afar_status, xr->xr_clcode) < 0) {
- fmd_hdl_debug(hdl, "xxU dropped, afar not VALID\n");
- return;
- }
-
- if (cmd_cpu_synd_check(xr->xr_synd, xr->xr_clcode) < 0) {
- fmd_hdl_debug(hdl, "xxU/LDxU dropped due to syndrome\n");
- return;
- }
-
-#ifdef sun4u
- /*
- * UE cache needed for sun4u only, because sun4u doesn't poison
- * uncorrectable data loaded into L2/L3 cache.
- */
- if (cmd_cpu_uec_match(xr->xr_cpu, xr->xr_afar)) {
- fmd_hdl_debug(hdl, "ue matched in UE cache\n");
- CMD_STAT_BUMP(xxu_ue_match);
- return;
- }
-#endif /* sun4u */
-
- /*
- * We didn't match in the UE cache. We don't need to sleep for UE
- * arrival, as we've already slept once for the train match.
- */
-
- if (cc->cc_cp == NULL) {
- cc->cc_cp = cmd_case_create(hdl, &cpu->cpu_header, ed->ed_pst,
- &uuid);
- } else if (cc->cc_serdnm != NULL) {
- fmd_hdl_debug(hdl, "destroying existing %s state\n",
- cc->cc_serdnm);
-
- fmd_serd_destroy(hdl, cc->cc_serdnm);
- fmd_hdl_strfree(hdl, cc->cc_serdnm);
- cc->cc_serdnm = NULL;
-
- fmd_case_reset(hdl, cc->cc_cp);
- }
-
- if (xr->xr_rsrc_nvl != NULL && nvlist_dup(xr->xr_rsrc_nvl,
- &rsrc, 0) != 0) {
- fmd_hdl_abort(hdl, "failed to duplicate resource FMRI for "
- "%s fault", ed->ed_fltnm);
- }
-
- fmd_case_add_ereport(hdl, cc->cc_cp, ep);
-
- cmd_cpu_create_faultlist(hdl, cc->cc_cp, cpu, ed->ed_fltnm, rsrc, 100);
- nvlist_free(rsrc);
- fmd_case_solve(hdl, cc->cc_cp);
-}
-
-static void
-cmd_xxc_hdlr(fmd_hdl_t *hdl, cmd_xr_t *xr, fmd_event_t *ep)
-{
- const errdata_t *ed;
- cmd_cpu_t *cpu = xr->xr_cpu;
- cmd_case_t *cc;
- const char *uuid;
- nvlist_t *rsrc = NULL;
-
-#ifdef sun4u
- if (cmd_cache_ce_panther(hdl, ep, xr) == 0) {
- return;
- }
-#endif
- cmd_fill_errdata(xr->xr_clcode, cpu, &cc, &ed);
-
- if (cpu->cpu_faulting || (cc->cc_cp != NULL &&
- fmd_case_solved(hdl, cc->cc_cp)))
- return;
-
- if (cc->cc_cp == NULL) {
- cc->cc_cp = cmd_case_create(hdl, &cpu->cpu_header, ed->ed_pst,
- &uuid);
- cc->cc_serdnm = cmd_cpu_serdnm_create(hdl, cpu,
- ed->ed_serd->cs_name);
-
- fmd_serd_create(hdl, cc->cc_serdnm, ed->ed_serd->cs_n,
- ed->ed_serd->cs_t);
- }
-
- fmd_hdl_debug(hdl, "adding event to %s\n", cc->cc_serdnm);
-
- if (fmd_serd_record(hdl, cc->cc_serdnm, ep) == FMD_B_FALSE)
- return; /* serd engine hasn't fired yet */
-
- if (xr->xr_rsrc_nvl != NULL && nvlist_dup(xr->xr_rsrc_nvl,
- &rsrc, 0) != 0) {
- fmd_hdl_abort(hdl, "failed to duplicate resource FMRI for "
- "%s fault", ed->ed_fltnm);
- }
-
- fmd_case_add_serd(hdl, cc->cc_cp, cc->cc_serdnm);
- cmd_cpu_create_faultlist(hdl, cc->cc_cp, cpu, ed->ed_fltnm, rsrc, 100);
- nvlist_free(rsrc);
- fmd_case_solve(hdl, cc->cc_cp);
-}
-
-/*
- * We're back from the timeout. Check to see if this event was part of a train.
- * If it was, make sure to only process the cause of the train. If not,
- * process the event directly.
- */
-static void
-cmd_xxcu_resolve(fmd_hdl_t *hdl, cmd_xr_t *xr, fmd_event_t *ep,
- cmd_xr_hdlr_f *hdlr)
-{
- cmd_xxcu_trw_t *trw;
- cmd_errcl_t cause;
- uint64_t afar;
-
-
- afar = 0;
-
- if (xr->xr_afar_status == AFLT_STAT_VALID)
- afar = xr->xr_afar;
-
- if ((trw = cmd_trw_lookup(xr->xr_ena,
- xr->xr_afar_status, afar)) == NULL) {
- fmd_hdl_debug(hdl, "cmd_trw_lookup: Not found\n");
- return;
- }
-
- fmd_hdl_debug(hdl, "found waiter with mask 0x%08llx\n", trw->trw_mask);
-
- trw->trw_flags |= CMD_TRW_F_DELETING;
-
- /*
- * In sun4v, the matching train rule is changed. It matches only
- * a portion of the train mask, so can't discard the rest of
- * the error in the train mask.
- */
-#ifdef sun4u
- if (trw->trw_flags & CMD_TRW_F_CAUSESEEN) {
- fmd_hdl_debug(hdl, "cause already seen -- discarding\n");
- goto done;
- }
-#endif
-
- if ((cause = cmd_train_match(trw->trw_mask, xr->xr_clcode)) == 0) {
- /*
- * We didn't match in a train, so we're going to process each
- * event individually.
- */
- fmd_hdl_debug(hdl, "didn't match in a train\n");
- hdlr(hdl, xr, ep);
- goto done;
- }
-
- fmd_hdl_debug(hdl, "found a match for train. cause is %llx, "
- "this is %llx\n", cause, xr->xr_clcode);
-
- /*
- * We've got a train match. If this event is the cause of the train,
- * process it.
- */
- if (cause == xr->xr_clcode) {
- trw->trw_flags |= CMD_TRW_F_CAUSESEEN;
- hdlr(hdl, xr, ep);
- }
-
-done:
- cmd_trw_deref(hdl, trw);
-}
-
-void
-cmd_xxc_resolve(fmd_hdl_t *hdl, cmd_xr_t *xr, fmd_event_t *ep)
-{
- cmd_xxcu_resolve(hdl, xr, ep, cmd_xxc_hdlr);
-}
-
-void
-cmd_xxu_resolve(fmd_hdl_t *hdl, cmd_xr_t *xr, fmd_event_t *ep)
-{
- cmd_xxcu_resolve(hdl, xr, ep, cmd_xxu_hdlr);
-}
-
-void
-cmd_nop_resolve(fmd_hdl_t *hdl, cmd_xr_t *xr, fmd_event_t *ep)
-{
- cmd_xxcu_resolve(hdl, xr, ep, cmd_nop_hdlr);
-}
-
-cmd_evdisp_t
-cmd_xxcu_initial(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl,
- const char *class, cmd_errcl_t clcode, uint_t hdlrid)
-{
- cmd_xxcu_trw_t *trw;
- cmd_case_t *cc;
- cmd_cpu_t *cpu;
- cmd_xr_t *xr;
- uint64_t ena;
- uint64_t afar;
- uint8_t level = clcode & CMD_ERRCL_LEVEL_EXTRACT;
- uint8_t afar_status;
- const errdata_t *ed = NULL;
- int ref_incremented = 0;
-
- clcode &= CMD_ERRCL_LEVEL_MASK; /* keep level bits out of train masks */
-
- if ((cpu = cmd_cpu_lookup_from_detector(hdl, nvl, class,
- level)) == NULL || cpu->cpu_faulting)
- return (CMD_EVD_UNUSED);
-
- cmd_fill_errdata(clcode, cpu, &cc, &ed);
-
- if (cc->cc_cp != NULL && fmd_case_solved(hdl, cc->cc_cp))
- return (CMD_EVD_REDUND);
-
- (void) nvlist_lookup_uint64(nvl, FM_EREPORT_ENA, &ena);
-
- if (cmd_afar_valid(hdl, nvl, clcode, &afar) != 0) {
- afar_status = AFLT_STAT_INVALID;
- afar = 0;
- } else {
- afar_status = AFLT_STAT_VALID;
- }
-
- fmd_hdl_debug(hdl, "scheduling %s (%llx) for redelivery\n",
- class, clcode);
- fmd_hdl_debug(hdl, "looking up ena %llx,afar %llx with\n", ena, afar);
-
- fmd_hdl_debug(hdl, "afar status of %02x\n", afar_status);
-
- if ((trw = cmd_trw_lookup(ena, afar_status, afar)) == NULL) {
- if ((trw = cmd_trw_alloc(ena, afar)) == NULL) {
- fmd_hdl_debug(hdl, "failed to get new trw\n");
- goto redeliver;
- }
- }
-
- if (trw->trw_flags & CMD_TRW_F_DELETING)
- goto redeliver;
-
- if (trw->trw_mask & clcode) {
- fmd_hdl_debug(hdl, "clcode %llx is already in trw "
- "(mask %llx)\n", clcode, trw->trw_mask);
- return (CMD_EVD_UNUSED);
- }
-
- cmd_trw_ref(hdl, trw, clcode);
- ref_incremented++;
-
- fmd_hdl_debug(hdl, "trw rescheduled for train delivery\n");
-
-redeliver:
- if ((xr = cmd_xr_create(hdl, ep, nvl, cpu, clcode)) == NULL) {
- fmd_hdl_debug(hdl, "cmd_xr_create failed");
- if (ref_incremented)
- cmd_trw_deref(hdl, trw);
- return (CMD_EVD_BAD);
- }
-
- return (cmd_xr_reschedule(hdl, xr, hdlrid));
-}
-
-
-cmd_evdisp_t
-cmd_xxu(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl, const char *class,
- cmd_errcl_t clcode)
-{
- return (cmd_xxcu_initial(hdl, ep, nvl, class, clcode, CMD_XR_HDLR_XXU));
-}
-
-cmd_evdisp_t
-cmd_xxc(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl, const char *class,
- cmd_errcl_t clcode)
-{
- return (cmd_xxcu_initial(hdl, ep, nvl, class, clcode, CMD_XR_HDLR_XXC));
-}
-
-cmd_evdisp_t
-cmd_nop_train(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl,
- const char *class, cmd_errcl_t clcode)
-{
- return (cmd_xxcu_initial(hdl, ep, nvl, class, clcode, CMD_XR_HDLR_NOP));
-}
-
-cmd_evdisp_t
-cmd_miscregs_train(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl,
- const char *class, cmd_errcl_t clcode)
-{
- return (cmd_xxcu_initial(hdl, ep, nvl, class, clcode,
- CMD_XR_HDLR_XXC));
-}
-
-void
-cmd_cpuerr_close(fmd_hdl_t *hdl, void *arg)
-{
- cmd_cpu_destroy(hdl, arg);
-}
diff --git a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_dimm.c b/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_dimm.c
deleted file mode 100644
index 8422a3dcfb..0000000000
--- a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_dimm.c
+++ /dev/null
@@ -1,531 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
- */
-
-/*
- * Support routines for DIMMs.
- */
-
-#include <cmd_mem.h>
-#include <limits.h>
-#include <cmd_dimm.h>
-#include <cmd_bank.h>
-#include <cmd.h>
-
-#include <errno.h>
-#include <string.h>
-#include <strings.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <fm/fmd_api.h>
-#include <sys/fm/protocol.h>
-#include <sys/mem.h>
-#include <sys/nvpair.h>
-#ifdef sun4v
-#include <cmd_hc_sun4v.h>
-#include <cmd_branch.h>
-#endif /* sun4v */
-
-/*
- * Some errors (RxE/FRx pairs) don't have accurate DIMM (resource) FMRIs,
- * because sufficient information was unavailable prior to correlation.
- * When the DE completes the pair, it uses this routine to retrieve the
- * correct FMRI.
- */
-nvlist_t *
-cmd_dimm_fmri_derive(fmd_hdl_t *hdl, uint64_t afar, uint16_t synd,
- uint64_t afsr)
-{
- nvlist_t *fmri;
-
- if ((fmri = cmd_mem_fmri_derive(hdl, afar, afsr, synd)) == NULL)
- return (NULL);
-
- if (fmd_nvl_fmri_expand(hdl, fmri) < 0) {
- nvlist_free(fmri);
- return (NULL);
- }
-
- return (fmri);
-}
-
-nvlist_t *
-cmd_dimm_fru(cmd_dimm_t *dimm)
-{
- return (dimm->dimm_asru_nvl);
-}
-
-nvlist_t *
-cmd_dimm_create_fault(fmd_hdl_t *hdl, cmd_dimm_t *dimm, const char *fltnm,
- uint_t cert)
-{
-#ifdef sun4v
- nvlist_t *flt, *nvlfru;
- /*
- * Do NOT issue hc scheme FRU FMRIs for ultraSPARC-T1 platforms.
- * The SP will misinterpret the FRU. Instead, reuse the ASRU FMRI
- *
- * Use the BR string as a distinguisher. BR (branch) is only
- * present in ultraSPARC-T2/T2plus DIMM unums
- */
- if (strstr(dimm->dimm_unum, "BR") == NULL) {
- flt = cmd_nvl_create_fault(hdl, fltnm, cert,
- dimm->dimm_asru_nvl, dimm->dimm_asru_nvl, NULL);
- } else {
- nvlfru = cmd_mem2hc(hdl, dimm->dimm_asru_nvl);
- flt = cmd_nvl_create_fault(hdl, fltnm, cert,
- dimm->dimm_asru_nvl, nvlfru, NULL);
- nvlist_free(nvlfru);
- }
- return (cmd_fault_add_location(hdl, flt, dimm->dimm_unum));
-#else
- return (cmd_nvl_create_fault(hdl, fltnm, cert, dimm->dimm_asru_nvl,
- dimm->dimm_asru_nvl, NULL));
-#endif /* sun4v */
-}
-
-static void
-cmd_dimm_free(fmd_hdl_t *hdl, cmd_dimm_t *dimm, int destroy)
-{
- cmd_case_t *cc = &dimm->dimm_case;
- int i;
- cmd_mq_t *q;
- tstamp_t *tsp, *next;
-
-#ifdef sun4v
- cmd_branch_t *branch;
-#endif
- if (cc->cc_cp != NULL) {
- cmd_case_fini(hdl, cc->cc_cp, destroy);
- if (cc->cc_serdnm != NULL) {
- if (fmd_serd_exists(hdl, cc->cc_serdnm) &&
- destroy)
- fmd_serd_destroy(hdl, cc->cc_serdnm);
- fmd_hdl_strfree(hdl, cc->cc_serdnm);
- }
- }
-
- for (i = 0; i < CMD_MAX_CKWDS; i++) {
- while ((q = cmd_list_next(&dimm->mq_root[i])) != NULL) {
- if (q->mq_serdnm != NULL) {
- if (fmd_serd_exists(hdl, q->mq_serdnm)) {
- fmd_serd_destroy(hdl, q->mq_serdnm);
- }
- fmd_hdl_strfree(hdl, q->mq_serdnm);
- q->mq_serdnm = NULL;
- }
-
- for (tsp = cmd_list_next(&q->mq_dupce_tstamp);
- tsp != NULL; tsp = next) {
- next = cmd_list_next(tsp);
- cmd_list_delete(&q->mq_dupce_tstamp,
- &tsp->ts_l);
- fmd_hdl_free(hdl, tsp, sizeof (tstamp_t));
- }
-
- cmd_list_delete(&dimm->mq_root[i], q);
- fmd_hdl_free(hdl, q, sizeof (cmd_mq_t));
- }
- }
-
- if (dimm->dimm_bank != NULL)
- cmd_bank_remove_dimm(hdl, dimm->dimm_bank, dimm);
-
-#ifdef sun4v
- branch = cmd_branch_lookup_by_unum(hdl, dimm->dimm_unum);
- if (branch != NULL)
- cmd_branch_remove_dimm(hdl, branch, dimm);
-#endif
-
- cmd_fmri_fini(hdl, &dimm->dimm_asru, destroy);
-
- if (destroy)
- fmd_buf_destroy(hdl, NULL, dimm->dimm_bufname);
-
- cmd_list_delete(&cmd.cmd_dimms, dimm);
- fmd_hdl_free(hdl, dimm, sizeof (cmd_dimm_t));
-}
-
-void
-cmd_dimm_destroy(fmd_hdl_t *hdl, cmd_dimm_t *dimm)
-{
-
- fmd_stat_destroy(hdl, 1, &(dimm->dimm_retstat));
- cmd_dimm_free(hdl, dimm, FMD_B_TRUE);
-}
-
-static cmd_dimm_t *
-dimm_lookup_by_unum(const char *unum)
-{
- cmd_dimm_t *dimm;
-
- for (dimm = cmd_list_next(&cmd.cmd_dimms); dimm != NULL;
- dimm = cmd_list_next(dimm)) {
- if (strcmp(dimm->dimm_unum, unum) == 0)
- return (dimm);
- }
-
- return (NULL);
-}
-
-static void
-dimm_attach_to_bank(fmd_hdl_t *hdl, cmd_dimm_t *dimm)
-{
- cmd_bank_t *bank;
-
- for (bank = cmd_list_next(&cmd.cmd_banks); bank != NULL;
- bank = cmd_list_next(bank)) {
- if (fmd_nvl_fmri_contains(hdl, bank->bank_asru_nvl,
- dimm->dimm_asru_nvl)) {
- cmd_bank_add_dimm(hdl, bank, dimm);
- return;
- }
- }
-}
-
-cmd_dimm_t *
-cmd_dimm_create(fmd_hdl_t *hdl, nvlist_t *asru)
-{
- cmd_dimm_t *dimm;
- const char *unum;
- nvlist_t *fmri;
- size_t nserids = 0;
- char **serids = NULL;
-
- if (!fmd_nvl_fmri_present(hdl, asru)) {
- fmd_hdl_debug(hdl, "dimm_lookup: discarding old ereport\n");
- return (NULL);
- }
-
- if ((unum = cmd_fmri_get_unum(asru)) == NULL) {
- CMD_STAT_BUMP(bad_mem_asru);
- return (NULL);
- }
-
-#ifdef sun4v
- if (nvlist_lookup_string_array(asru, FM_FMRI_HC_SERIAL_ID, &serids,
- &nserids) != 0) {
- fmd_hdl_debug(hdl, "sun4v mem: FMRI does not"
- " have serial_ids\n");
- CMD_STAT_BUMP(bad_mem_asru);
- return (NULL);
- }
-#endif
- fmri = cmd_mem_fmri_create(unum, serids, nserids);
- if (fmd_nvl_fmri_expand(hdl, fmri) < 0) {
- CMD_STAT_BUMP(bad_mem_asru);
- nvlist_free(fmri);
- return (NULL);
- }
-
- fmd_hdl_debug(hdl, "dimm_create: creating new DIMM %s\n", unum);
- CMD_STAT_BUMP(dimm_creat);
-
- dimm = fmd_hdl_zalloc(hdl, sizeof (cmd_dimm_t), FMD_SLEEP);
- dimm->dimm_nodetype = CMD_NT_DIMM;
- dimm->dimm_version = CMD_DIMM_VERSION;
- dimm->dimm_phys_addr_low = ULLONG_MAX;
- dimm->dimm_phys_addr_hi = 0;
- dimm->dimm_syl_error = USHRT_MAX;
-
- cmd_bufname(dimm->dimm_bufname, sizeof (dimm->dimm_bufname), "dimm_%s",
- unum);
- cmd_fmri_init(hdl, &dimm->dimm_asru, fmri, "dimm_asru_%s", unum);
-
- nvlist_free(fmri);
-
- (void) nvlist_lookup_string(dimm->dimm_asru_nvl, FM_FMRI_MEM_UNUM,
- (char **)&dimm->dimm_unum);
-
- dimm_attach_to_bank(hdl, dimm);
-
- cmd_mem_retirestat_create(hdl, &dimm->dimm_retstat, dimm->dimm_unum, 0,
- CMD_DIMM_STAT_PREFIX);
-
- cmd_list_append(&cmd.cmd_dimms, dimm);
- cmd_dimm_dirty(hdl, dimm);
-
- return (dimm);
-}
-
-cmd_dimm_t *
-cmd_dimm_lookup(fmd_hdl_t *hdl, nvlist_t *asru)
-{
- cmd_dimm_t *dimm;
- const char *unum;
-
- if ((unum = cmd_fmri_get_unum(asru)) == NULL) {
- CMD_STAT_BUMP(bad_mem_asru);
- return (NULL);
- }
-
- dimm = dimm_lookup_by_unum(unum);
-
- if (dimm != NULL && !fmd_nvl_fmri_present(hdl, dimm->dimm_asru_nvl)) {
- /*
- * The DIMM doesn't exist anymore, so we need to delete the
- * state structure, which is now out of date. The containing
- * bank (if any) is also out of date, so blow it away too.
- */
- fmd_hdl_debug(hdl, "dimm_lookup: discarding old dimm\n");
-
- if (dimm->dimm_bank != NULL)
- cmd_bank_destroy(hdl, dimm->dimm_bank);
- cmd_dimm_destroy(hdl, dimm);
-
- return (NULL);
- }
-
- return (dimm);
-}
-
-static cmd_dimm_t *
-dimm_v0tov2(fmd_hdl_t *hdl, cmd_dimm_0_t *old, size_t oldsz)
-{
- cmd_dimm_t *new;
-
- if (oldsz != sizeof (cmd_dimm_0_t)) {
- fmd_hdl_abort(hdl, "size of state doesn't match size of "
- "version 0 state (%u bytes).\n", sizeof (cmd_dimm_0_t));
- }
-
- new = fmd_hdl_zalloc(hdl, sizeof (cmd_dimm_t), FMD_SLEEP);
- new->dimm_header = old->dimm0_header;
- new->dimm_version = CMD_DIMM_VERSION;
- new->dimm_asru = old->dimm0_asru;
- new->dimm_nretired = old->dimm0_nretired;
- new->dimm_phys_addr_hi = 0;
- new->dimm_phys_addr_low = ULLONG_MAX;
-
- fmd_hdl_free(hdl, old, oldsz);
- return (new);
-}
-
-static cmd_dimm_t *
-dimm_v1tov2(fmd_hdl_t *hdl, cmd_dimm_1_t *old, size_t oldsz)
-{
-
- cmd_dimm_t *new;
-
- if (oldsz != sizeof (cmd_dimm_1_t)) {
- fmd_hdl_abort(hdl, "size of state doesn't match size of "
- "version 1 state (%u bytes).\n", sizeof (cmd_dimm_1_t));
- }
-
- new = fmd_hdl_zalloc(hdl, sizeof (cmd_dimm_t), FMD_SLEEP);
-
- new->dimm_header = old->dimm1_header;
- new->dimm_version = CMD_DIMM_VERSION;
- new->dimm_asru = old->dimm1_asru;
- new->dimm_nretired = old->dimm1_nretired;
- new->dimm_flags = old->dimm1_flags;
- new->dimm_phys_addr_hi = 0;
- new->dimm_phys_addr_low = ULLONG_MAX;
-
- fmd_hdl_free(hdl, old, oldsz);
- return (new);
-}
-
-static cmd_dimm_t *
-dimm_wrapv2(fmd_hdl_t *hdl, cmd_dimm_pers_t *pers, size_t psz)
-{
- cmd_dimm_t *dimm;
-
- if (psz != sizeof (cmd_dimm_pers_t)) {
- fmd_hdl_abort(hdl, "size of state doesn't match size of "
- "version 1 state (%u bytes).\n", sizeof (cmd_dimm_pers_t));
- }
-
- dimm = fmd_hdl_zalloc(hdl, sizeof (cmd_dimm_t), FMD_SLEEP);
- bcopy(pers, dimm, sizeof (cmd_dimm_pers_t));
- fmd_hdl_free(hdl, pers, psz);
- return (dimm);
-}
-
-void *
-cmd_dimm_restore(fmd_hdl_t *hdl, fmd_case_t *cp, cmd_case_ptr_t *ptr)
-{
- cmd_dimm_t *dimm;
-
- for (dimm = cmd_list_next(&cmd.cmd_dimms); dimm != NULL;
- dimm = cmd_list_next(dimm)) {
- if (strcmp(dimm->dimm_bufname, ptr->ptr_name) == 0)
- break;
- }
-
- if (dimm == NULL) {
- int migrated = 0;
- size_t dimmsz;
-
- fmd_hdl_debug(hdl, "restoring dimm from %s\n", ptr->ptr_name);
-
- if ((dimmsz = fmd_buf_size(hdl, NULL, ptr->ptr_name)) == 0) {
- fmd_hdl_abort(hdl, "dimm referenced by case %s does "
- "not exist in saved state\n",
- fmd_case_uuid(hdl, cp));
- } else if (dimmsz > CMD_DIMM_MAXSIZE ||
- dimmsz < CMD_DIMM_MINSIZE) {
- fmd_hdl_abort(hdl,
- "dimm buffer referenced by case %s "
- "is out of bounds (is %u bytes, max %u, min %u)\n",
- fmd_case_uuid(hdl, cp), dimmsz,
- CMD_DIMM_MAXSIZE, CMD_DIMM_MINSIZE);
- }
-
- if ((dimm = cmd_buf_read(hdl, NULL, ptr->ptr_name,
- dimmsz)) == NULL) {
- fmd_hdl_abort(hdl, "failed to read dimm buf %s",
- ptr->ptr_name);
- }
-
- fmd_hdl_debug(hdl, "found %d in version field\n",
- dimm->dimm_version);
-
- if (CMD_DIMM_VERSIONED(dimm)) {
- switch (dimm->dimm_version) {
- case CMD_DIMM_VERSION_1:
- dimm = dimm_v1tov2(hdl, (cmd_dimm_1_t *)dimm,
- dimmsz);
- break;
- case CMD_DIMM_VERSION_2:
- dimm = dimm_wrapv2(hdl, (cmd_dimm_pers_t *)dimm,
- dimmsz);
- break;
- default:
- fmd_hdl_abort(hdl, "unknown version (found %d) "
- "for dimm state referenced by case %s.\n",
- dimm->dimm_version, fmd_case_uuid(hdl, cp));
- break;
- }
- } else {
- dimm = dimm_v0tov2(hdl, (cmd_dimm_0_t *)dimm, dimmsz);
- migrated = 1;
- }
-
- if (migrated) {
- CMD_STAT_BUMP(dimm_migrat);
- cmd_dimm_dirty(hdl, dimm);
- }
-
- cmd_fmri_restore(hdl, &dimm->dimm_asru);
-
- if ((errno = nvlist_lookup_string(dimm->dimm_asru_nvl,
- FM_FMRI_MEM_UNUM, (char **)&dimm->dimm_unum)) != 0)
- fmd_hdl_abort(hdl, "failed to retrieve unum from asru");
-
- dimm_attach_to_bank(hdl, dimm);
-
- cmd_mem_retirestat_create(hdl, &dimm->dimm_retstat,
- dimm->dimm_unum, dimm->dimm_nretired, CMD_DIMM_STAT_PREFIX);
-
- cmd_list_append(&cmd.cmd_dimms, dimm);
- }
-
- switch (ptr->ptr_subtype) {
- case BUG_PTR_DIMM_CASE:
- fmd_hdl_debug(hdl, "recovering from out of order dimm ptr\n");
- cmd_case_redirect(hdl, cp, CMD_PTR_DIMM_CASE);
- /*FALLTHROUGH*/
- case CMD_PTR_DIMM_CASE:
- cmd_mem_case_restore(hdl, &dimm->dimm_case, cp, "dimm",
- dimm->dimm_unum);
- break;
- default:
- fmd_hdl_abort(hdl, "invalid %s subtype %d\n",
- ptr->ptr_name, ptr->ptr_subtype);
- }
-
- return (dimm);
-}
-
-void
-cmd_dimm_validate(fmd_hdl_t *hdl)
-{
- cmd_dimm_t *dimm, *next;
-
- for (dimm = cmd_list_next(&cmd.cmd_dimms); dimm != NULL; dimm = next) {
- next = cmd_list_next(dimm);
-
- if (!fmd_nvl_fmri_present(hdl, dimm->dimm_asru_nvl))
- cmd_dimm_destroy(hdl, dimm);
- }
-}
-
-void
-cmd_dimm_dirty(fmd_hdl_t *hdl, cmd_dimm_t *dimm)
-{
- if (fmd_buf_size(hdl, NULL, dimm->dimm_bufname) !=
- sizeof (cmd_dimm_pers_t))
- fmd_buf_destroy(hdl, NULL, dimm->dimm_bufname);
-
- /* No need to rewrite the FMRIs in the dimm - they don't change */
- fmd_buf_write(hdl, NULL, dimm->dimm_bufname, &dimm->dimm_pers,
- sizeof (cmd_dimm_pers_t));
-}
-
-void
-cmd_dimm_gc(fmd_hdl_t *hdl)
-{
- cmd_dimm_validate(hdl);
-}
-
-void
-cmd_dimm_fini(fmd_hdl_t *hdl)
-{
- cmd_dimm_t *dimm;
-
- while ((dimm = cmd_list_next(&cmd.cmd_dimms)) != NULL)
- cmd_dimm_free(hdl, dimm, FMD_B_FALSE);
-}
-
-
-void
-cmd_dimm_save_symbol_error(cmd_dimm_t *dimm, uint16_t upos)
-{
- cmd_dimm_t *d = NULL, *next = NULL;
-
- for (d = cmd_list_next(&cmd.cmd_dimms); d != NULL; d = next) {
- next = cmd_list_next(d);
- if (cmd_same_datapath_dimms(dimm, d))
- d->dimm_syl_error = upos;
- }
-}
-
-int
-cmd_dimm_check_symbol_error(cmd_dimm_t *dimm, uint16_t synd)
-{
- int upos;
- cmd_dimm_t *d, *next;
-
- if ((upos = cmd_synd2upos(synd)) < 0)
- return (0);
-
- for (d = cmd_list_next(&cmd.cmd_dimms); d != NULL; d = next) {
- next = cmd_list_next(d);
- if (cmd_same_datapath_dimms(dimm, d) &&
- (d->dimm_syl_error == upos))
- return (1);
- }
-
- return (0);
-}
diff --git a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_dimm.h b/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_dimm.h
deleted file mode 100644
index c2803c9366..0000000000
--- a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_dimm.h
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
- */
-
-#ifndef _CMD_DIMM_H
-#define _CMD_DIMM_H
-
-/*
- * Memory modules are described by the cmd_dimm general-purpose state structure.
- * Whereas banks are primarily used to track UEs, this structure is used to
- * track CEs, which can be associated with individual modules. Each memory
- * module is part of a bank, and will have a link to the bank if the bank is
- * known to the diagnosis engine. Banks will be known if UEs have occurred.
- *
- * Data structures:
- *
- * ,--------. ,--------.
- * |dimm | <---- |case_ptr| (CMD_PTR_DIMM_CASE)
- * | | `--------'
- * |,-------| ,-------------.
- * ,->||asru_t | ----> |packed nvlist|
- * | |`-------| `-------------'
- * `--| unum |
- * | bank | ----> bank buffer
- * `--------'
- *
- * Data structure P? Case? Notes
- * ---------------- --- ----- ----------------------------------------------
- * cmd_dimm_t Yes No Name is derived from the unum ("dimm_%s")
- * cmd_case_ptr_t Yes Yes Name is case's UUID
- * dimm_asru Yes No Name is derived from the unum ("dimm_asru_%d")
- * dimm_unum No No Pointer into ASRU - relinked during restore
- * dimm_bank No No Recreated during restore
- */
-
-#include <cmd_mem.h>
-#include <values.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * CMD_MAX_CKWDS denotes the highest number, across all covered
- * SPARC architectures, of checkwords per cache line.
- */
-
-#define CMD_MAX_CKWDS 4
-
-/*
- * The DIMM structure started life without a version number. Making things more
- * complicated, the version number in the new struct occupies the space used for
- * the case pointer in the non-versioned struct. We therefore have to use
- * somewhat unorthodox version numbers so as to allow us to easily tell the
- * difference between a version number and a case pointer. Case pointers will
- * be zero or (this being SPARC), a value with the bottom two bits clear. Our
- * version numbers will begin with 0x11, and will increase by 0x10 each time.
- */
-
-#define DIMM_MKVERSION(version) ((version) << 4 | 1)
-
-#define CMD_DIMM_VERSION_1 DIMM_MKVERSION(1) /* 17 */
-#define CMD_DIMM_VERSION_2 DIMM_MKVERSION(2) /* 33 */
-#define CMD_DIMM_VERSION CMD_DIMM_VERSION_2
-
-#define CMD_DIMM_VERSIONED(dimm) ((dimm)->dimm_version & 1)
-
-#define CMD_DIMM_STAT_PREFIX "d" /* d = dimm */
-
-typedef struct cmd_dimm_0 {
- cmd_header_t dimm0_header; /* Nodetype must be CMD_NT_DIMM */
- fmd_case_t *dimm0_case; /* Open CE case against this DIMM */
- cmd_fmri_t dimm0_asru; /* ASRU for this DIMM */
- const char *dimm0_unum; /* This DIMM's name */
- uint_t dimm0_wrnthresh; /* # of pages retired before warning */
- uint_t dimm0_nretired; /* # ret'd pages for CEs in DIMM */
- cmd_bank_t *dimm0_bank; /* This DIMM's bank (if discovered) */
-} cmd_dimm_0_t;
-
-typedef struct cmd_dimm_1 {
- cmd_header_t dimm1_header; /* Nodetype must be CMD_NT_DIMM */
- uint_t dimm1_version; /* DIMM version */
- cmd_fmri_t dimm1_asru; /* ASRU for this DIMM */
- uint_t dimm1_flags; /* CMD_MEM_F_* */
- uint_t dimm1_nretired; /* # ret'd pages for CEs in DIMM */
-} cmd_dimm_1_t;
-
-
-typedef struct cmd_dimm_pers {
- cmd_header_t dimmp_header; /* Nodetype must be CMD_NT_DIMM */
- uint_t dimmp_version;
- cmd_fmri_t dimmp_asru; /* ASRU for this DIMM */
- uint_t dimmp_flags; /* CMD_MEM_F_* */
- uint_t dimmp_nretired; /* # ret'd pages for CEs in DIMM */
- uint64_t dimmp_phys_addr_low; /* retired pages low addr */
- uint64_t dimmp_phys_addr_hi; /* retired pages hi addr */
-} cmd_dimm_pers_t;
-
-/*
- * Index block for MQSC rules 4A and 4B correlation of memory CEs
- * on a single DIMM. "Unit Position" refers to bit or nibble depending
- * on the memory ECC. This structure is not persisted.
- */
-
-typedef struct cmd_mq {
- cmd_list_t mq_l; /* pointers to prev and next */
- uint64_t mq_tstamp; /* timestamp of ereport in secs */
- uint16_t mq_ckwd; /* phys addr mod 64 */
- uint64_t mq_phys_addr; /* from ereport */
- uint16_t mq_unit_position; /* bit for sun4u, nibble for sun4v */
- fmd_event_t *mq_ep; /* ereport - for potential fault */
- char *mq_serdnm; /* serd eng to retain CE events */
- uint16_t mq_dupce_count; /* dup CEs */
- cmd_list_t mq_dupce_tstamp; /* list of dup CEs time stamp */
- uint32_t mq_cpuid; /* ereport detector */
-} cmd_mq_t;
-
-typedef struct tstamp {
- cmd_list_t ts_l;
- uint64_t tstamp;
-} tstamp_t;
-
-struct cmd_dimm {
- cmd_dimm_pers_t dimm_pers;
- cmd_bank_t *dimm_bank; /* This DIMM's bank (if discovered) */
- const char *dimm_unum; /* This DIMM's name */
- cmd_case_t dimm_case; /* Open CE case against this DIMM */
- fmd_stat_t dimm_retstat; /* retirement statistics, this DIMM */
- uint16_t dimm_syl_error; /* bad r/w symbol-in-error */
- cmd_list_t
- mq_root[CMD_MAX_CKWDS]; /* per-checkword CEs to correlate */
-};
-
-#define CMD_MQ_TIMELIM (72*60*60) /* 72 hours */
-#define CMD_MQ_SERDT MAXINT /* Never expected to fire */
-#define CMD_MQ_SERDN 2 /* Dup CEs not allowed */
-#define CMD_MQ_512KB 0x80000 /* space between low & hi retired */
- /* page addrss */
-#define CMD_PAGE_RATIO 0.0625 /* bad r/w page ratio (1/16) */
-
-#define CMD_DIMM_MAXSIZE \
- MAX(MAX(sizeof (cmd_dimm_0_t), sizeof (cmd_dimm_pers_t)), \
- MAX(sizeof (cmd_dimm_1_t), sizeof (cmd_dimm_pers_t)))
-#define CMD_DIMM_MINSIZE \
- MIN(MIN(sizeof (cmd_dimm_0_t), sizeof (cmd_dimm_pers_t)), \
- MIN(sizeof (cmd_dimm_1_t), sizeof (cmd_dimm_pers_t)))
-
-#define dimm_header dimm_pers.dimmp_header
-#define dimm_nodetype dimm_pers.dimmp_header.hdr_nodetype
-#define dimm_bufname dimm_pers.dimmp_header.hdr_bufname
-#define dimm_version dimm_pers.dimmp_version
-#define dimm_asru dimm_pers.dimmp_asru
-#define dimm_asru_nvl dimm_pers.dimmp_asru.fmri_nvl
-#define dimm_flags dimm_pers.dimmp_flags
-#define dimm_nretired dimm_pers.dimmp_nretired
-#define dimm_phys_addr_hi dimm_pers.dimmp_phys_addr_hi
-#define dimm_phys_addr_low dimm_pers.dimmp_phys_addr_low
-
-extern cmd_dimm_t *cmd_dimm_lookup(fmd_hdl_t *, nvlist_t *);
-extern cmd_dimm_t *cmd_dimm_create(fmd_hdl_t *, nvlist_t *);
-
-extern nvlist_t *cmd_dimm_fru(cmd_dimm_t *);
-extern nvlist_t *cmd_dimm_create_fault(fmd_hdl_t *, cmd_dimm_t *, const char *,
- uint_t);
-#ifdef sun4v
-extern nvlist_t *cmd_mem2hc(fmd_hdl_t *, nvlist_t *);
-#endif /* sun4v */
-
-extern nvlist_t *cmd_dimm_fmri_derive(fmd_hdl_t *, uint64_t, uint16_t,
- uint64_t);
-extern int cmd_dimm_thresh_reached(fmd_hdl_t *, cmd_dimm_t *, uint64_t,
- uint16_t);
-
-extern void cmd_dimm_dirty(fmd_hdl_t *, cmd_dimm_t *);
-extern void *cmd_dimm_restore(fmd_hdl_t *, fmd_case_t *, cmd_case_ptr_t *);
-extern void cmd_dimm_destroy(fmd_hdl_t *, cmd_dimm_t *);
-extern void cmd_dimm_validate(fmd_hdl_t *);
-extern void cmd_dimm_gc(fmd_hdl_t *);
-extern void cmd_dimm_fini(fmd_hdl_t *);
-
-extern void cmd_dimmlist_free(fmd_hdl_t *);
-extern void cmd_dimm_save_symbol_error(cmd_dimm_t *, uint16_t);
-extern int cmd_dimm_check_symbol_error(cmd_dimm_t *, uint16_t);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _CMD_DIMM_H */
diff --git a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_fmri.c b/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_fmri.c
deleted file mode 100644
index e4e53f5c2b..0000000000
--- a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_fmri.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2004 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include <errno.h>
-#include <strings.h>
-
-#include <cmd_fmri.h>
-#include <cmd.h>
-
-void
-cmd_fmri_init(fmd_hdl_t *hdl, cmd_fmri_t *fmri, nvlist_t *nvl,
- const char *fmt, ...)
-{
- va_list ap;
-
- va_start(ap, fmt);
- cmd_vbufname(fmri->fmri_packnm, sizeof (fmri->fmri_packnm), fmt, ap);
- va_end(ap);
-
- if ((errno = nvlist_dup(nvl, &fmri->fmri_nvl, 0)) != 0 ||
- (errno = nvlist_size(nvl, &fmri->fmri_packsz,
- NV_ENCODE_NATIVE)) != 0)
- fmd_hdl_abort(hdl, "failed to copy fmri for fmri create");
-
- fmri->fmri_packbuf = fmd_hdl_alloc(hdl, fmri->fmri_packsz, FMD_SLEEP);
-
- if ((errno = nvlist_pack(nvl, &fmri->fmri_packbuf, &fmri->fmri_packsz,
- NV_ENCODE_NATIVE, 0)) != 0)
- fmd_hdl_abort(hdl, "failed to pack fmri for fmri create");
-
- cmd_fmri_write(hdl, fmri);
-}
-
-void
-cmd_fmri_fini(fmd_hdl_t *hdl, cmd_fmri_t *fmri, int destroy)
-{
- if (destroy)
- fmd_buf_destroy(hdl, NULL, fmri->fmri_packnm);
-
- fmd_hdl_free(hdl, fmri->fmri_packbuf, fmri->fmri_packsz);
- nvlist_free(fmri->fmri_nvl);
-}
-
-void
-cmd_fmri_restore(fmd_hdl_t *hdl, cmd_fmri_t *fmri)
-{
- if (fmd_buf_size(hdl, NULL, fmri->fmri_packnm) == 0) {
- bzero(fmri, sizeof (cmd_fmri_t));
- return;
- }
-
- if ((fmri->fmri_packbuf = cmd_buf_read(hdl, NULL, fmri->fmri_packnm,
- fmri->fmri_packsz)) == NULL) {
- fmd_hdl_abort(hdl, "failed to read fmri buffer %s",
- fmri->fmri_packnm);
- }
-
- if (nvlist_unpack(fmri->fmri_packbuf, fmri->fmri_packsz,
- &fmri->fmri_nvl, 0) != 0) {
- fmd_hdl_abort(hdl, "failed to unpack fmri buffer %s\n",
- fmri->fmri_packnm);
- }
-}
-
-void
-cmd_fmri_write(fmd_hdl_t *hdl, cmd_fmri_t *fmri)
-{
- size_t sz;
-
- if ((sz = fmd_buf_size(hdl, NULL, fmri->fmri_packnm)) !=
- fmri->fmri_packsz && sz != 0)
- fmd_buf_destroy(hdl, NULL, fmri->fmri_packnm);
-
- fmd_buf_write(hdl, NULL, fmri->fmri_packnm, fmri->fmri_packbuf,
- fmri->fmri_packsz);
-}
diff --git a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_fmri.h b/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_fmri.h
deleted file mode 100644
index 1cd3da6354..0000000000
--- a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_fmri.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2004 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _CMD_FMRI_H
-#define _CMD_FMRI_H
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-/*
- * Each general-purpose state structure is named by an FMRI - the FMRI of the
- * piece of hardware being described. FMRIs are nvlists, and thus require
- * special handling if they are to be persisted along with the general-purpose
- * buffer. The cmd_fmri_t manages the FMRI, both in packed (persistable) and
- * unpacked formats. The packed FMRI is stored in a separate buffer (named by
- * the fmri_packnm member), from which it can be unpacked on restore.
- *
- * Data structures:
- *
- * ,--------.
- * |G.P. |
- * |buffer |
- * |,-------| ,-------------.
- * ||fmri_t | ----> |packed nvlist|
- * |`-------| `-------------'
- * `--------'
- *
- * The buffer for the general purpose buffer is named and stored independently.
- * This subsystem creates and manages the packed nvlist buffer, using a name
- * provided by the caller.
- */
-
-#include <libnvpair.h>
-#include <fm/fmd_api.h>
-#include <sys/types.h>
-
-#include <cmd_state.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct cmd_fmri {
- nvlist_t *fmri_nvl; /* The unpacked FMRI FMRI */
- char *fmri_packbuf; /* In-core packed nvlist buffer */
- size_t fmri_packsz; /* Size of packed nvlist buffer */
- char fmri_packnm[CMD_BUFNMLEN]; /* Persistent buffer name for FMRI */
-} cmd_fmri_t;
-
-extern void cmd_fmri_init(fmd_hdl_t *, cmd_fmri_t *, nvlist_t *,
- const char *, ...);
-extern void cmd_fmri_fini(fmd_hdl_t *, cmd_fmri_t *, int);
-
-extern void cmd_fmri_restore(fmd_hdl_t *, cmd_fmri_t *);
-extern void cmd_fmri_write(fmd_hdl_t *, cmd_fmri_t *);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _CMD_FMRI_H */
diff --git a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_list.c b/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_list.c
deleted file mode 100644
index 301ecbc43a..0000000000
--- a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_list.c
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2004 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-/*
- * Embedded Linked Lists
- *
- * Simple doubly-linked list implementation. This implementation assumes that
- * each list element contains an embedded cmd_list_t (previous and next
- * pointers), which is typically the first member of the element struct.
- * An additional cmd_list_t is used to store the head (l_next) and tail
- * (l_prev) pointers. The current head and tail list elements have their
- * previous and next pointers set to NULL, respectively.
- */
-
-#include <cmd_list.h>
-#include <cmd.h>
-
-void
-cmd_list_append(cmd_list_t *lp, void *new)
-{
- cmd_list_t *p = lp->l_prev; /* p = tail list element */
- cmd_list_t *q = new; /* q = new list element */
-
- lp->l_prev = q;
- q->l_prev = p;
- q->l_next = NULL;
-
- if (p != NULL)
- p->l_next = q;
- else
- lp->l_next = q;
-}
-
-void
-cmd_list_prepend(cmd_list_t *lp, void *new)
-{
- cmd_list_t *p = new; /* p = new list element */
- cmd_list_t *q = lp->l_next; /* q = head list element */
-
- lp->l_next = p;
- p->l_prev = NULL;
- p->l_next = q;
-
- if (q != NULL)
- q->l_prev = p;
- else
- lp->l_prev = p;
-}
-
-void
-cmd_list_insert_before(cmd_list_t *lp, void *before_me, void *new)
-{
- cmd_list_t *p = before_me;
- cmd_list_t *q = new;
-
- if (p == NULL || p->l_prev == NULL) {
- cmd_list_prepend(lp, new);
- return;
- }
-
- q->l_prev = p->l_prev;
- q->l_next = p;
- p->l_prev = q;
- q->l_prev->l_next = q;
-}
-
-void
-cmd_list_insert_after(cmd_list_t *lp, void *after_me, void *new)
-{
- cmd_list_t *p = after_me;
- cmd_list_t *q = new;
-
- if (p == NULL || p->l_next == NULL) {
- cmd_list_append(lp, new);
- return;
- }
-
- q->l_next = p->l_next;
- q->l_prev = p;
- p->l_next = q;
- q->l_next->l_prev = q;
-}
-
-void
-cmd_list_delete(cmd_list_t *lp, void *existing)
-{
- cmd_list_t *p = existing;
-
- if (p->l_prev != NULL)
- p->l_prev->l_next = p->l_next;
- else
- lp->l_next = p->l_next;
-
- if (p->l_next != NULL)
- p->l_next->l_prev = p->l_prev;
- else
- lp->l_prev = p->l_prev;
-}
diff --git a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_list.h b/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_list.h
deleted file mode 100644
index 903494555a..0000000000
--- a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_list.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2004 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _CMD_LIST_H
-#define _CMD_LIST_H
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct cmd_list {
- struct cmd_list *l_prev;
- struct cmd_list *l_next;
-} cmd_list_t;
-
-#define cmd_list_prev(elem) ((void *)(((cmd_list_t *)(elem))->l_prev))
-#define cmd_list_next(elem) ((void *)(((cmd_list_t *)(elem))->l_next))
-
-extern void cmd_list_append(cmd_list_t *, void *);
-extern void cmd_list_prepend(cmd_list_t *, void *);
-extern void cmd_list_insert_before(cmd_list_t *, void *, void *);
-extern void cmd_list_insert_after(cmd_list_t *, void *, void *);
-extern void cmd_list_delete(cmd_list_t *, void *);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _CMD_LIST_H */
diff --git a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_main.c b/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_main.c
deleted file mode 100644
index 3626650153..0000000000
--- a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_main.c
+++ /dev/null
@@ -1,881 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
- */
-
-/*
- * CPU/Memory error diagnosis engine for the UltraSPARC III, IV, T1,
- * SPARC64 VI and SPARC64 VII families of processors.
- */
-
-#include <cmd_state.h>
-#include <cmd_cpu.h>
-
-#ifdef sun4u
-#include <cmd_ecache.h>
-#include <cmd_Lxcache.h>
-#endif /* sun4u */
-
-#include <cmd_mem.h>
-#include <cmd_page.h>
-#include <cmd_dimm.h>
-#ifdef sun4u
-#include <cmd_dp.h>
-#include <cmd_opl.h>
-#endif
-#include <cmd_bank.h>
-#include <cmd.h>
-
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-#include <strings.h>
-#include <fm/fmd_api.h>
-#include <fm/libtopo.h>
-#include <sys/fm/protocol.h>
-#include <sys/async.h>
-
-#ifdef sun4v
-#include <sys/fm/ldom.h>
-static fmd_hdl_t *init_hdl;
-ldom_hdl_t *cpumem_diagnosis_lhp;
-#endif
-
-cmd_t cmd;
-
-#ifdef sun4u
-cmd_list_t opl_cpu_list;
-#endif /* sun4u */
-
-typedef struct cmd_subscriber {
- const char *subr_class;
- cmd_evdisp_t (*subr_func)(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
- cmd_errcl_t subr_arg;
- cmd_evdisp_stat_t subr_stat;
-} cmd_subscriber_t;
-
-/*ARGSUSED*/
-cmd_evdisp_t
-cmd_nop(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl, const char *class,
- cmd_errcl_t clcode)
-{
- return (CMD_EVD_UNUSED);
-}
-
-#ifdef sun4u
-/*
- * It used to be that cmd_opluecpu_detio() was called directly, with a
- * 'class' argument of ereport.io.oberon.xxx. But the code underlying
- * cmd_opluecpu_detio() assumed that the class would always be of the form
- * ereport.cpu.<cputype>.<subclass>.
- *
- * Rather than generalizing the underlying code, the following adjusts the
- * input to cmd_opluecpu_detio() so that it conforms to the above expectation.
- */
-
-/*ARGSUSED*/
-cmd_evdisp_t
-opl_opluecpu_detio(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl,
- const char *class, cmd_errcl_t clcode)
-{
- return (cmd_opluecpu_detio(hdl, ep, nvl,
- "ereport.cpu.SPARC64-VI.", clcode));
-}
-#endif /* sun4u */
-
-static cmd_subscriber_t cmd_subscribers[] = {
-#ifdef sun4u
- { "ereport.cpu.*.ucc", cmd_xxc, CMD_ERRCL_UCC |
- CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.ucu", cmd_xxu, CMD_ERRCL_UCU |
- CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.cpc", cmd_xxc, CMD_ERRCL_CPC |
- CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.cpu", cmd_xxu, CMD_ERRCL_CPU |
- CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.wdc", cmd_xxc, CMD_ERRCL_WDC |
- CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.wdu", cmd_xxu, CMD_ERRCL_WDU |
- CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.edc", cmd_xxc, CMD_ERRCL_EDC |
- CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.edu-st", cmd_xxu, CMD_ERRCL_EDU_ST |
- CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.edu-bl", cmd_xxu, CMD_ERRCL_EDU_BL |
- CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.l3-ucc", cmd_xxc, CMD_ERRCL_L3_UCC |
- CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.l3-ucu", cmd_xxu, CMD_ERRCL_L3_UCU |
- CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.l3-cpc", cmd_xxc, CMD_ERRCL_L3_CPC |
- CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.l3-cpu", cmd_xxu, CMD_ERRCL_L3_CPU |
- CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.l3-wdc", cmd_xxc, CMD_ERRCL_L3_WDC |
- CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.l3-wdu", cmd_xxu, CMD_ERRCL_L3_WDU |
- CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.l3-edc", cmd_xxc, CMD_ERRCL_L3_EDC |
- CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.l3-edu-st", cmd_xxu, CMD_ERRCL_L3_EDU_ST |
- CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.l3-edu-bl", cmd_xxu, CMD_ERRCL_L3_EDU_BL |
- CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.l3-mecc", cmd_xxu, CMD_ERRCL_L3_MECC |
- CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.ipe", cmd_icache },
- { "ereport.cpu.*.idspe", cmd_icache },
- { "ereport.cpu.*.itspe", cmd_icache },
- { "ereport.cpu.*.dpe", cmd_dcache },
- { "ereport.cpu.*.ddspe", cmd_dcache },
- { "ereport.cpu.*.dtspe", cmd_dcache },
- { "ereport.cpu.*.pdspe", cmd_pcache },
- { "ereport.cpu.*.itlbpe", cmd_itlb },
- { "ereport.cpu.*.dtlbpe", cmd_dtlb },
- { "ereport.cpu.*.thce", cmd_txce, CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.tsce", cmd_txce },
- { "ereport.cpu.*.l3-thce", cmd_l3_thce, CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.ce", cmd_ce },
- { "ereport.cpu.*.emc", cmd_ce },
- { "ereport.cpu.*.ue", cmd_ue },
- { "ereport.cpu.*.due", cmd_ue },
- { "ereport.cpu.*.emu", cmd_ue },
- { "ereport.cpu.*.frc", cmd_frx, CMD_ERRCL_FRC },
- { "ereport.cpu.*.rce", cmd_rxe, CMD_ERRCL_RCE },
- { "ereport.cpu.*.fru", cmd_frx, CMD_ERRCL_FRU },
- { "ereport.cpu.*.rue", cmd_rxe, CMD_ERRCL_RUE },
- { "ereport.cpu.*.eti", cmd_txce },
- { "ereport.cpu.*.etc", cmd_txce },
- { "ereport.io.*.ecc.drce", cmd_ioxe, CMD_ERRCL_IOCE },
- { "ereport.io.*.ecc.dwce", cmd_ioxe, CMD_ERRCL_IOCE },
- { "ereport.io.*.ecc.drue", cmd_ioxe, CMD_ERRCL_IOUE },
- { "ereport.io.*.ecc.dwue", cmd_ioxe, CMD_ERRCL_IOUE },
- { "ereport.io.*.ecc.s-drce", cmd_ioxe_sec },
- { "ereport.io.*.ecc.s-dwce", cmd_ioxe_sec },
- { "ereport.io.*.ecc.s-drue", cmd_ioxe_sec },
- { "ereport.io.*.ecc.s-dwue", cmd_ioxe_sec },
- { "ereport.io.fire.jbc.ce_asyn", cmd_ioxe, CMD_ERRCL_IOCE },
- { "ereport.io.fire.jbc.ue_asyn", cmd_ioxe, CMD_ERRCL_IOUE },
- { "ereport.asic.*.cds.cds-dp", cmd_dp_cds },
- { "ereport.asic.*.dx.dx-dp", cmd_dp_dx },
- { "ereport.asic.*.sdi.sdi-dp", cmd_dp_ex },
- { "ereport.asic.*.cp.cp-dp", cmd_dp_cp },
- { "ereport.asic.*.rp.rp-dp", cmd_dp_cp },
- { "ereport.asic.mac.mi-ue", cmd_opl_mac_common },
- { "ereport.asic.mac.ptrl-ue", cmd_opl_mac_common },
- { "ereport.asic.mac.mi-ce", cmd_opl_mac_common },
- { "ereport.asic.mac.ptrl-ce", cmd_opl_mac_common },
- { "ereport.asic.mac.ptrl-ice", cmd_opl_mac_common },
- { "ereport.asic.mac.mi-cmpe", cmd_opl_mac_common },
- { "ereport.asic.mac.ptrl-cmpe", cmd_opl_mac_common },
- { "ereport.asic.mac.mi-sue", cmd_opl_mac_common },
- { "ereport.asic.mac.ptrl-sue", cmd_opl_mac_common },
- { "ereport.asic.mac.mi-mue", cmd_opl_mac_common },
- { "ereport.asic.mac.ptrl-mue", cmd_opl_mac_common },
- { "ereport.cpu.*.ue-mem", cmd_opl_cpu_mem },
- { "ereport.cpu.*.ue-channel", cmd_nop },
- { "ereport.cpu.*.ue-cpu", cmd_opluecpu_detcpu },
- { "ereport.cpu.*.ue-path", cmd_nop },
- { "ereport.cpu.*.inv-sfsr", cmd_oplinv_sfsr },
- { "ereport.cpu.*.berr", cmd_nop },
- { "ereport.cpu.*.bto", cmd_nop },
- { "ereport.cpu.*.mtlb", cmd_oplmtlb },
- { "ereport.cpu.*.tlbp", cmd_opltlbp },
- { "ereport.cpu.*.inv-uge", cmd_oplinv_urg },
- { "ereport.cpu.*.cre", cmd_oplcre },
- { "ereport.cpu.*.tsb-ctx", cmd_opltsb_ctx },
- { "ereport.cpu.*.tsbp", cmd_opltsbp },
- { "ereport.cpu.*.pstate", cmd_oplpstate },
- { "ereport.cpu.*.tstate", cmd_opltstate },
- { "ereport.cpu.*.iug-f", cmd_opliug_f },
- { "ereport.cpu.*.iug-r", cmd_opliug_r },
- { "ereport.cpu.*.sdc", cmd_oplsdc },
- { "ereport.cpu.*.wdt", cmd_oplwdt },
- { "ereport.cpu.*.dtlb", cmd_opldtlb },
- { "ereport.cpu.*.itlb", cmd_oplitlb },
- { "ereport.cpu.*.core-err", cmd_oplcore_err },
- { "ereport.cpu.*.dae", cmd_opldae },
- { "ereport.cpu.*.iae", cmd_opliae },
- { "ereport.cpu.*.uge", cmd_opluge },
- { "ereport.io.oberon.ubc.dmarduea-mem", cmd_opl_io_mem },
- { "ereport.io.oberon.ubc.dmarduea-channel", cmd_nop },
- { "ereport.io.oberon.ubc.dmarduea-cpu", opl_opluecpu_detio },
- { "ereport.io.oberon.ubc.dmarduea-path", cmd_nop },
- { "ereport.io.oberon.ubc.dmardueb-mem", cmd_opl_io_mem },
- { "ereport.io.oberon.ubc.dmardueb-channel", cmd_nop },
- { "ereport.io.oberon.ubc.dmardueb-cpu", opl_opluecpu_detio },
- { "ereport.io.oberon.ubc.dmardueb-path", cmd_nop },
- { "ereport.io.oberon.ubc.piowtue-mem", cmd_opl_io_mem },
- { "ereport.io.oberon.ubc.piowtue-channel", cmd_nop },
- { "ereport.io.oberon.ubc.piowtue-cpu", opl_opluecpu_detio },
- { "ereport.io.oberon.ubc.piowtue-path", cmd_nop },
- { "ereport.io.oberon.ubc.piowbeue-mem", cmd_opl_io_mem },
- { "ereport.io.oberon.ubc.piowbeue-channel", cmd_nop },
- { "ereport.io.oberon.ubc.piowbeue-cpu", opl_opluecpu_detio },
- { "ereport.io.oberon.ubc.piowbeue-path", cmd_nop },
- { "ereport.io.oberon.ubc.piorbeue-mem", cmd_opl_io_mem },
- { "ereport.io.oberon.ubc.piorbeue-channel", cmd_nop },
- { "ereport.io.oberon.ubc.piorbeue-cpu", opl_opluecpu_detio },
- { "ereport.io.oberon.ubc.piorbeue-path", cmd_nop },
-#else /* i.e. sun4v */
- { "ereport.cpu.*.irc", cmd_irc },
- { "ereport.cpu.*.iru", cmd_iru },
- { "ereport.cpu.*.frc", cmd_frc },
- { "ereport.cpu.*.fru", cmd_fru },
- { "ereport.cpu.*.mau", cmd_mau },
- { "ereport.cpu.*.imdu", cmd_itlb, CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.dmdu", cmd_dtlb, CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.dmsu", cmd_dtlb, CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.imtu", cmd_itlb, CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.dmtu", cmd_dtlb, CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.itc", cmd_icache, CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.idc", cmd_icache, CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.dtc", cmd_dcache, CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.ddc", cmd_dcache, CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.irfc", cmd_irc },
- { "ereport.cpu.*.irfu", cmd_iru },
- { "ereport.cpu.*.frfc", cmd_frc },
- { "ereport.cpu.*.frfu", cmd_fru },
-
-
-
-
-
- { "ereport.cpu.*.mamu", cmd_mau, CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.ittm", cmd_itlb, CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.ittp", cmd_itlb, CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.itdp", cmd_itlb, CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.itmu", cmd_itlb, CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.dttm", cmd_dtlb, CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.dttp", cmd_dtlb, CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.dtdp", cmd_dtlb, CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.dtmu", cmd_dtlb, CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.icvp", cmd_icache, CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.ictp", cmd_icache, CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.ictm", cmd_icache, CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.icdp", cmd_xxc,
- CMD_ERRCL_ICDP | CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.dcvp", cmd_dcache, CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.dctp", cmd_dcache, CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.dctm", cmd_dcache, CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.dcdp", cmd_xxc,
- CMD_ERRCL_DCDP | CMD_CPU_LEVEL_CORE },
- { "ereport.cpu.*.itl2c", cmd_xxc, CMD_ERRCL_LDAC |
- CMD_CPU_LEVEL_CHIP },
- { "ereport.cpu.*.dtl2c", cmd_xxc, CMD_ERRCL_LDAC |
- CMD_CPU_LEVEL_CHIP },
- { "ereport.cpu.*.icl2c", cmd_xxc, CMD_ERRCL_LDAC |
- CMD_CPU_LEVEL_CHIP },
- { "ereport.cpu.*.dcl2c", cmd_xxc, CMD_ERRCL_LDAC |
- CMD_CPU_LEVEL_CHIP },
- { "ereport.cpu.*.mal2c", cmd_xxc, CMD_ERRCL_LDAC |
- CMD_CPU_LEVEL_CHIP },
- { "ereport.cpu.*.cwql2c", cmd_xxc, CMD_ERRCL_LDAC |
- CMD_CPU_LEVEL_CHIP },
- { "ereport.cpu.*.lvc", cmd_txce, CMD_CPU_LEVEL_CHIP },
- { "ereport.cpu.*.itl2u", cmd_xxu, CMD_ERRCL_IL2U |
- CMD_CPU_LEVEL_CHIP },
- { "ereport.cpu.*.dtl2u", cmd_xxu, CMD_ERRCL_DL2U |
- CMD_CPU_LEVEL_CHIP },
- { "ereport.cpu.*.icl2u", cmd_xxu, CMD_ERRCL_IL2U |
- CMD_CPU_LEVEL_CHIP },
- { "ereport.cpu.*.dcl2u", cmd_xxu, CMD_ERRCL_DL2U |
- CMD_CPU_LEVEL_CHIP },
- { "ereport.cpu.*.mal2u", cmd_xxu, CMD_ERRCL_LDAU |
- CMD_CPU_LEVEL_CHIP },
- { "ereport.cpu.*.cwql2u", cmd_xxu, CMD_ERRCL_LDAU |
- CMD_CPU_LEVEL_CHIP },
- { "ereport.cpu.*.lvf", cmd_l2ctl, CMD_CPU_LEVEL_CHIP },
- { "ereport.cpu.*.lrf", cmd_l2ctl, CMD_CPU_LEVEL_CHIP },
- { "ereport.cpu.*.ltu", cmd_l2ctl, CMD_CPU_LEVEL_CHIP },
- { "ereport.cpu.*.itl2nd", cmd_nop_train, CMD_ERRCL_IL2ND },
- { "ereport.cpu.*.dtl2nd", cmd_nop_train, CMD_ERRCL_DL2ND },
- { "ereport.cpu.*.icl2nd", cmd_nop_train, CMD_ERRCL_IL2ND },
- { "ereport.cpu.*.dcl2nd", cmd_nop_train, CMD_ERRCL_DL2ND },
- { "ereport.cpu.*.l2nd", cmd_nop_train, CMD_ERRCL_L2ND },
- { "ereport.cpu.*.mal2nd", cmd_nop_train, CMD_ERRCL_L2ND },
- { "ereport.cpu.*.cwql2nd", cmd_nop_train, CMD_ERRCL_L2ND },
- { "ereport.cpu.*.ldac", cmd_xxc, CMD_ERRCL_LDAC |
- CMD_CPU_LEVEL_CHIP },
- { "ereport.cpu.*.ldwc", cmd_xxc, CMD_ERRCL_LDWC |
- CMD_CPU_LEVEL_CHIP },
- { "ereport.cpu.*.ldrc", cmd_xxc, CMD_ERRCL_LDRC |
- CMD_CPU_LEVEL_CHIP },
- { "ereport.cpu.*.ldsc", cmd_xxc, CMD_ERRCL_LDSC |
- CMD_CPU_LEVEL_CHIP },
- { "ereport.cpu.*.ltc", cmd_txce, CMD_CPU_LEVEL_CHIP },
- { "ereport.cpu.*.ldau", cmd_xxu, CMD_ERRCL_LDAU |
- CMD_CPU_LEVEL_CHIP },
- { "ereport.cpu.*.ldwu", cmd_xxu, CMD_ERRCL_LDWU |
- CMD_CPU_LEVEL_CHIP },
- { "ereport.cpu.*.ldru", cmd_xxu, CMD_ERRCL_LDRU |
- CMD_CPU_LEVEL_CHIP },
- { "ereport.cpu.*.ldsu", cmd_xxu, CMD_ERRCL_LDSU |
- CMD_CPU_LEVEL_CHIP },
- { "ereport.cpu.*.lvu", cmd_l2ctl, CMD_CPU_LEVEL_CHIP },
- { "ereport.cpu.*.lru", cmd_l2ctl, CMD_CPU_LEVEL_CHIP },
- { "ereport.cpu.*.fbr", cmd_fb },
- { "ereport.cpu.*.fbu", cmd_fb_train, CMD_ERRCL_FBU },
- { "ereport.cpu.*.dac", cmd_ce, CMD_ERRCL_DAC },
- { "ereport.cpu.*.dsc", cmd_ce, CMD_ERRCL_DSC },
- { "ereport.cpu.*.dau", cmd_ue_train, CMD_ERRCL_DAU },
- { "ereport.cpu.*.dbu", cmd_fw_defect, CMD_ERRCL_DBU },
- { "ereport.cpu.*.dsu", cmd_ue, CMD_ERRCL_DSU },
- { "ereport.cpu.*.sbdpc", cmd_miscregs_train,
- CMD_ERRCL_SBDPC | CMD_CPU_LEVEL_THREAD },
- { "ereport.cpu.*.sbdlc", cmd_miscregs_train,
- CMD_ERRCL_SBDLC | CMD_CPU_LEVEL_THREAD },
- { "ereport.cpu.*.sbdpu", cmd_miscregs_ue,
- CMD_CPU_LEVEL_THREAD },
- { "ereport.cpu.*.sbdlu", cmd_miscregs_ue,
- CMD_CPU_LEVEL_THREAD },
- { "ereport.cpu.*.sbdio", cmd_miscregs_ue,
- CMD_CPU_LEVEL_THREAD },
- { "ereport.cpu.*.sbapp", cmd_miscregs_ue,
- CMD_CPU_LEVEL_THREAD },
- { "ereport.cpu.*.mrau", cmd_miscregs_ue,
- CMD_CPU_LEVEL_THREAD },
- { "ereport.cpu.*.scac", cmd_miscregs_train,
- CMD_ERRCL_SBDPC | CMD_CPU_LEVEL_THREAD },
- { "ereport.cpu.*.scau", cmd_miscregs_ue,
- CMD_CPU_LEVEL_THREAD },
- { "ereport.cpu.*.tccp", cmd_miscregs_train,
- CMD_ERRCL_TCCP | CMD_CPU_LEVEL_THREAD },
- { "ereport.cpu.*.tccd", cmd_miscregs_train,
- CMD_ERRCL_TCCD | CMD_CPU_LEVEL_THREAD },
- { "ereport.cpu.*.tcup", cmd_miscregs_ue,
- CMD_CPU_LEVEL_THREAD },
- { "ereport.cpu.*.tcud", cmd_miscregs_ue,
- CMD_CPU_LEVEL_THREAD },
- { "ereport.cpu.*.tsac", cmd_miscregs_train,
- CMD_ERRCL_SBDPC | CMD_CPU_LEVEL_THREAD },
- { "ereport.cpu.*.tsau", cmd_miscregs_ue,
- CMD_CPU_LEVEL_THREAD },
- { "ereport.cpu.*.cbce", cmd_xxc, CMD_ERRCL_CBCE |
- CMD_CPU_LEVEL_CHIP },
- { "ereport.cpu.*.dce", cmd_nop },
- { "ereport.cpu.*.wbue", cmd_xxu, CMD_ERRCL_WBUE |
- CMD_CPU_LEVEL_CHIP },
- { "ereport.cpu.*.lfu-slf", cmd_lfu_ce, CMD_CPU_LEVEL_CHIP },
- { "ereport.cpu.*.lfu-rtf", cmd_lfu_ue, CMD_CPU_LEVEL_CHIP },
- { "ereport.cpu.*.lfu-tto", cmd_lfu_ue, CMD_CPU_LEVEL_CHIP },
- { "ereport.cpu.*.lfu-cto", cmd_lfu_ue, CMD_CPU_LEVEL_CHIP },
- { "ereport.cpu.*.lfu-mlf", cmd_lfu_ue, CMD_CPU_LEVEL_CHIP },
- { "ereport.cpu.*.frack", cmd_lfu_pe, CMD_CPU_LEVEL_CHIP },
- { "ereport.cpu.*.fsr", cmd_lfu_pe, CMD_CPU_LEVEL_CHIP },
- { "ereport.cpu.*.fdr", cmd_lfu_pe, CMD_CPU_LEVEL_CHIP },
- { "ereport.cpu.*.to", cmd_lfu_pe, CMD_CPU_LEVEL_CHIP },
- { "ereport.cpu.*.snptyp", cmd_lfu_pe, CMD_CPU_LEVEL_CHIP },
- { "ereport.fm.ferg.invalid", cmd_fw_defect },
-#endif /* sun4u */
- { "ereport.cpu.*.fpu.hwcopy", cmd_fpu },
- { NULL, NULL }
-};
-
-static void
-cmd_recv(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl, const char *class)
-{
- cmd_subscriber_t *sp;
- int disp;
-
- fmd_hdl_debug(hdl, "cmd_recv: begin: %s\n", strrchr(class, '.') + 1);
-
- for (sp = cmd_subscribers; sp->subr_class != NULL; sp++) {
- if (fmd_nvl_class_match(hdl, nvl, sp->subr_class)) {
- disp = sp->subr_func(hdl, ep, nvl, class, sp->subr_arg);
- ((fmd_stat_t *)&sp->subr_stat)[disp].fmds_value.ui64++;
- fmd_hdl_debug(hdl, "cmd_recv: done: %s (disp %d)\n",
- strrchr(class, '.') + 1, disp);
- return;
- }
- }
-
- fmd_hdl_debug(hdl, "cmd_recv: dropping %s - unable to handle\n", class);
-}
-
-static void
-cmd_timeout(fmd_hdl_t *hdl, id_t id, void *arg)
-{
- uintptr_t timertype = (uintptr_t)arg;
-
- switch (timertype) {
- case CMD_TIMERTYPE_MEM:
- cmd_mem_timeout(hdl, id);
- break;
-
-#ifdef sun4u
- case CMD_TIMERTYPE_DP:
-
- cmd_dp_timeout(hdl, id);
- break;
- case CMD_TIMERTYPE_ANONYMOUS_TAG_ERROR:
-
- cmd_Lxcache_anonymous_tag_error_timeout(hdl, id);
- break;
-#endif
-
- case CMD_TIMERTYPE_CPU_UEC_FLUSH:
- case CMD_TIMERTYPE_CPU_XR_WAITER:
- cmd_cpu_timeout(hdl, id, (void *)timertype);
- break;
-
- default:
- break;
- }
-}
-
-static void
-cmd_close(fmd_hdl_t *hdl, fmd_case_t *cp)
-{
- cmd_case_closer_t *cl = fmd_case_getspecific(hdl, cp);
- const char *uuid = fmd_case_uuid(hdl, cp);
-
- /*
- * Our active cases all have closers registered in case-specific data.
- * Cases in the process of closing (for which we've freed all associated
- * data, but which haven't had an fmd-initiated fmdo_close callback)
- * have had their case-specific data nulled out.
- */
- fmd_hdl_debug(hdl, "close case %s%s\n", uuid,
- (cl == NULL ? " (no cl)" : ""));
-
- if (cl != NULL)
- cl->cl_func(hdl, cl->cl_arg);
-}
-
-static void
-cmd_gc(fmd_hdl_t *hdl)
-{
- cmd_cpu_gc(hdl);
- cmd_mem_gc(hdl);
-#ifdef sun4u
- cmd_Lxcache_gc(hdl);
-#endif
-}
-
-static cmd_stat_t cmd_stats = {
- { "bad_det", FMD_TYPE_UINT64, "detector missing or malformed" },
- { "bad_cpu_asru", FMD_TYPE_UINT64, "CPU ASRU missing or malformed" },
- { "bad_mem_asru", FMD_TYPE_UINT64, "memory ASRU missing or malformed" },
- { "bad_close", FMD_TYPE_UINT64, "case close for nonexistent case" },
- { "old_erpt", FMD_TYPE_UINT64, "ereport out of date wrt hardware" },
- { "cpu_creat", FMD_TYPE_UINT64, "created new cpu structure" },
- { "dimm_creat", FMD_TYPE_UINT64, "created new mem module structure" },
- { "bank_creat", FMD_TYPE_UINT64, "created new mem bank structure" },
- { "page_creat", FMD_TYPE_UINT64, "created new page structure" },
- { "cache_creat", FMD_TYPE_UINT64, "created new cache structure" },
- { "ce_unknown", FMD_TYPE_UINT64, "unknown CEs" },
- { "ce_interm", FMD_TYPE_UINT64, "intermittent CEs" },
- { "ce_ppersis", FMD_TYPE_UINT64, "possibly persistent CEs" },
- { "ce_persis", FMD_TYPE_UINT64, "persistent CEs" },
- { "ce_leaky", FMD_TYPE_UINT64, "leaky CEs" },
- { "ce_psticky_noptnr", FMD_TYPE_UINT64,
- "possibly sticky CEs, no partner test" },
- { "ce_psticky_ptnrnoerr", FMD_TYPE_UINT64,
- "possibly sticky CEs, partner sees no CE" },
- { "ce_psticky_ptnrclrd", FMD_TYPE_UINT64,
- "possibly sticky CEs, partner can clear CE" },
- { "ce_sticky", FMD_TYPE_UINT64, "sticky CEs" },
- { "xxu_ue_match", FMD_TYPE_UINT64, "xxUs obviated by UEs" },
- { "xxu_retr_flt", FMD_TYPE_UINT64, "xxUs obviated by faults" },
- { "cpu_migrat", FMD_TYPE_UINT64, "CPUs migrated to new version" },
- { "dimm_migrat", FMD_TYPE_UINT64, "DIMMs migrated to new version" },
- { "bank_migrat", FMD_TYPE_UINT64, "banks migrated to new version" },
-#ifdef sun4u
- { "dp_ignored_ce", FMD_TYPE_UINT64,
- "memory CEs ignored due to DP error or fault" },
- { "dp_ignored_ue", FMD_TYPE_UINT64,
- "memory UEs ignored due to DP fault" },
- { "dp_deferred_ue", FMD_TYPE_UINT64,
- "memory UEs deferred due to DP error" },
-#endif
-#ifdef sun4v
- { "branch_creat", FMD_TYPE_UINT64, "created new mem branch structure" },
-#endif
-};
-
-static const fmd_prop_t fmd_props[] = {
- { "icache_n", FMD_TYPE_UINT32, "8" },
- { "icache_t", FMD_TYPE_TIME, "168h" },
- { "dcache_n", FMD_TYPE_UINT32, "8" },
- { "dcache_t", FMD_TYPE_TIME, "168h" },
- { "pcache_n", FMD_TYPE_UINT32, "2" },
- { "pcache_t", FMD_TYPE_TIME, "168h" },
-#ifdef sun4u
- { "itlb_n", FMD_TYPE_UINT32, "2" },
- { "itlb_t", FMD_TYPE_TIME, "168h" },
- { "dtlb_n", FMD_TYPE_UINT32, "2" },
- { "dtlb_t", FMD_TYPE_TIME, "168h" },
- { "l2tag_n", FMD_TYPE_UINT32, "4" },
- { "l2tag_t", FMD_TYPE_TIME, "1h" },
- { "l2data_n", FMD_TYPE_UINT32, "12" },
- { "l2data_t", FMD_TYPE_TIME, "1h" },
-#else
- { "itlb_n", FMD_TYPE_UINT32, "8" },
- { "itlb_t", FMD_TYPE_TIME, "168h" },
- { "dtlb_n", FMD_TYPE_UINT32, "8" },
- { "dtlb_t", FMD_TYPE_TIME, "168h" },
- { "l2tag_n", FMD_TYPE_UINT32, "8" },
- { "l2tag_t", FMD_TYPE_TIME, "20h" },
- { "l2data_n", FMD_TYPE_UINT32, "8" },
- { "l2data_t", FMD_TYPE_TIME, "2h" },
-#endif
- { "l3tag_n", FMD_TYPE_UINT32, "4" },
- { "l3tag_t", FMD_TYPE_TIME, "1h" },
- { "l3data_n", FMD_TYPE_UINT32, "12" },
- { "l3data_t", FMD_TYPE_TIME, "1h" },
- { "ce_n", FMD_TYPE_UINT32, "2" },
- { "ce_t", FMD_TYPE_TIME, "72h" },
- { "ireg_n", FMD_TYPE_UINT32, "8" },
- { "ireg_t", FMD_TYPE_TIME, "168h" },
- { "freg_n", FMD_TYPE_UINT32, "8" },
- { "freg_t", FMD_TYPE_TIME, "168h" },
- { "mau_n", FMD_TYPE_UINT32, "0" },
- { "mau_t", FMD_TYPE_TIME, "168h" },
- { "misc_regs_n", FMD_TYPE_UINT32, "8"},
- { "misc_regs_t", FMD_TYPE_TIME, "168h" },
- { "iorxefrx_window", FMD_TYPE_TIME, "3s" },
-#ifdef sun4u
- { "xxcu_trdelay", FMD_TYPE_TIME, "200ms" },
-#else
- { "xxcu_trdelay", FMD_TYPE_TIME, "15s"},
-#endif /* sun4u */
- { "xxcu_restart_delay", FMD_TYPE_TIME, "1s" },
- { "num_xxcu_waiters", FMD_TYPE_UINT32, "128" },
- { "thresh_tpct_sysmem", FMD_TYPE_UINT64, "100" },
- { "thresh_abs_sysmem", FMD_TYPE_UINT64, "0" },
- { "thresh_abs_badrw", FMD_TYPE_UINT64, "128" },
- { "max_perm_ce_dimm", FMD_TYPE_UINT32, "128" },
- { "low_ce_thresh", FMD_TYPE_UINT32, "128" },
- { "hi_ce_thresh", FMD_TYPE_UINT32, "512" },
- { "dupce", FMD_TYPE_UINT32, "120"},
- { "nupos", FMD_TYPE_UINT32, "4"},
-#ifdef sun4v
- { "fbr_n", FMD_TYPE_UINT32, "14" },
- { "fbr_t", FMD_TYPE_TIME, "30min"},
- /* delta_ena value = 0x500000000nsec ~= 22sec */
- { "delta_ena", FMD_TYPE_UINT64, "0x50000000000000"},
-#endif
- { NULL, 0, NULL }
-};
-
-static const fmd_hdl_ops_t fmd_ops = {
- cmd_recv, /* fmdo_recv */
- cmd_timeout, /* fmdo_timeout */
- cmd_close, /* fmdo_close */
- NULL, /* fmdo_stats */
- cmd_gc /* fmdo_gc */
-};
-
-static const fmd_hdl_info_t fmd_info = {
- "CPU/Memory Diagnosis", CMD_VERSION, &fmd_ops, fmd_props
-};
-
-static const struct cmd_evdisp_name {
- const char *evn_name;
- const char *evn_desc;
-} cmd_evdisp_names[] = {
- { "%s", "ok %s ereports" }, /* CMD_EVD_OK */
- { "bad_%s", "bad %s ereports" }, /* CMD_EVD_BAD */
- { "unused_%s", "unused %s ereports" }, /* CMD_EVD_UNUSED */
- { "redun_%s", "redundant %s ereports" }, /* CMD_EVD_REDUN */
-};
-
-void
-_fmd_fini(fmd_hdl_t *hdl)
-{
-
-#ifdef sun4v
- ldom_fini(cpumem_diagnosis_lhp);
-#endif
- cmd_cpu_fini(hdl);
- cmd_mem_fini(hdl);
- cmd_page_fini(hdl);
-#ifdef sun4u
- cmd_dp_fini(hdl);
-#endif
-
- fmd_hdl_free(hdl, cmd.cmd_xxcu_trw,
- sizeof (cmd_xxcu_trw_t) * cmd.cmd_xxcu_ntrw);
- nvlist_free(cmd.cmd_auth);
-}
-
-#ifdef sun4v
-static void *
-cpumem_diagnosis_init_alloc(size_t size)
-{
- return (fmd_hdl_alloc(init_hdl, size, FMD_SLEEP));
-}
-
-static void
-cpumem_diagnosis_init_free(void *addr, size_t size)
-{
- fmd_hdl_free(init_hdl, addr, size);
-}
-#endif
-
-/* find_auth -- find hardware platform authority within libtopo */
-
-/* ARGSUSED */
-static int
-find_auth(topo_hdl_t *thp, tnode_t *node, void *arg)
-{
- int err;
- nvlist_t *rsrc, *auth;
-
- if (cmd.cmd_auth != NULL)
- return (TOPO_WALK_TERMINATE); /* don't overwrite previous */
-
- if (topo_node_resource(node, &rsrc, &err) < 0)
- return (TOPO_WALK_NEXT); /* no resource, try next */
- if (nvlist_lookup_nvlist(rsrc, FM_FMRI_AUTHORITY, &auth) < 0) {
- nvlist_free(rsrc);
- return (TOPO_WALK_NEXT); /* no authority, try next */
- }
- (void) nvlist_dup(auth, &cmd.cmd_auth, NV_UNIQUE_NAME);
- nvlist_free(rsrc);
- return (TOPO_WALK_TERMINATE); /* if no space, give up */
-}
-
-/* init_auth -- read hardware platform authority from libtopo */
-
-void
-init_auth(fmd_hdl_t *hdl)
-{
- topo_hdl_t *thp;
- topo_walk_t *twp;
- int err;
-
- if ((thp = fmd_hdl_topo_hold(hdl, TOPO_VERSION)) == NULL)
- return;
- if ((twp = topo_walk_init(thp,
- FM_FMRI_SCHEME_HC, find_auth, NULL, &err))
- == NULL) {
- fmd_hdl_topo_rele(hdl, thp);
- return;
- }
- (void) topo_walk_step(twp, TOPO_WALK_CHILD);
- topo_walk_fini(twp);
- fmd_hdl_topo_rele(hdl, thp);
-}
-
-void
-_fmd_init(fmd_hdl_t *hdl)
-{
- cmd_subscriber_t *sp;
- cpu_family_t cpu_family;
-
- if (fmd_hdl_register(hdl, FMD_API_VERSION, &fmd_info) != 0)
- return; /* error in configuration file or fmd_info */
-
- cpu_family = cmd_cpu_check_support();
-
- if (cpu_family == CMD_CPU_FAM_UNSUPPORTED) {
- fmd_hdl_debug(hdl, "no supported CPUs found");
- fmd_hdl_unregister(hdl);
- return;
- }
-
- fmd_hdl_subscribe(hdl, "ereport.cpu.ultraSPARC-III.*");
- fmd_hdl_subscribe(hdl, "ereport.cpu.ultraSPARC-IIIplus.*");
- fmd_hdl_subscribe(hdl, "ereport.cpu.ultraSPARC-IIIi.*");
- fmd_hdl_subscribe(hdl, "ereport.cpu.ultraSPARC-IIIiplus.*");
- fmd_hdl_subscribe(hdl, "ereport.cpu.ultraSPARC-IV.*");
- fmd_hdl_subscribe(hdl, "ereport.cpu.ultraSPARC-IVplus.*");
- fmd_hdl_subscribe(hdl, "ereport.cpu.ultraSPARC-T2.*");
- fmd_hdl_subscribe(hdl, "ereport.cpu.ultraSPARC-T2plus.*");
- fmd_hdl_subscribe(hdl, "ereport.cpu.ultraSPARC-T1.*");
- fmd_hdl_subscribe(hdl, "ereport.fm.ferg.invalid");
-
- fmd_hdl_subscribe(hdl, "ereport.io.tom.ecc.drce");
- fmd_hdl_subscribe(hdl, "ereport.io.tom.ecc.dwce");
- fmd_hdl_subscribe(hdl, "ereport.io.tom.ecc.drue");
- fmd_hdl_subscribe(hdl, "ereport.io.tom.ecc.dwue");
- fmd_hdl_subscribe(hdl, "ereport.io.sch.ecc.drce");
- fmd_hdl_subscribe(hdl, "ereport.io.sch.ecc.dwce");
- fmd_hdl_subscribe(hdl, "ereport.io.sch.ecc.drue");
- fmd_hdl_subscribe(hdl, "ereport.io.sch.ecc.dwue");
- fmd_hdl_subscribe(hdl, "ereport.io.xmits.ecc.drce");
- fmd_hdl_subscribe(hdl, "ereport.io.xmits.ecc.dwce");
- fmd_hdl_subscribe(hdl, "ereport.io.xmits.ecc.drue");
- fmd_hdl_subscribe(hdl, "ereport.io.xmits.ecc.dwue");
-
- /*
- * Need to subscribe to secondary I/O ECC ereports, but
- * since they contain no data regarding the failure we
- * are unable to do anything with them.
- */
- fmd_hdl_subscribe(hdl, "ereport.io.tom.ecc.s-drce");
- fmd_hdl_subscribe(hdl, "ereport.io.tom.ecc.s-dwce");
- fmd_hdl_subscribe(hdl, "ereport.io.tom.ecc.s-drue");
- fmd_hdl_subscribe(hdl, "ereport.io.tom.ecc.s-dwue");
- fmd_hdl_subscribe(hdl, "ereport.io.sch.ecc.s-drce");
- fmd_hdl_subscribe(hdl, "ereport.io.sch.ecc.s-dwce");
- fmd_hdl_subscribe(hdl, "ereport.io.sch.ecc.s-drue");
- fmd_hdl_subscribe(hdl, "ereport.io.sch.ecc.s-dwue");
- fmd_hdl_subscribe(hdl, "ereport.io.xmits.ecc.s-drce");
- fmd_hdl_subscribe(hdl, "ereport.io.xmits.ecc.s-dwce");
- fmd_hdl_subscribe(hdl, "ereport.io.xmits.ecc.s-drue");
- fmd_hdl_subscribe(hdl, "ereport.io.xmits.ecc.s-dwue");
-
-#ifdef sun4u
- /*
- * Subscribe to datapath events
- */
- fmd_hdl_subscribe(hdl, "ereport.asic.*.cds.cds-dp");
- fmd_hdl_subscribe(hdl, "ereport.asic.*.dx.dx-dp");
- fmd_hdl_subscribe(hdl, "ereport.asic.*.sdi.sdi-dp");
- fmd_hdl_subscribe(hdl, "ereport.asic.*.cp.cp-dp");
- fmd_hdl_subscribe(hdl, "ereport.asic.*.rp.rp-dp");
-
- /*
- * OPL platform specific subscriptions.
- */
- fmd_hdl_subscribe(hdl, "ereport.cpu.SPARC64-VI.*");
- fmd_hdl_subscribe(hdl, "ereport.cpu.SPARC64-VII.*");
- fmd_hdl_subscribe(hdl, "ereport.asic.mac.*");
- fmd_hdl_subscribe(hdl, "ereport.io.oberon.ubc.dmarduea-mem");
- fmd_hdl_subscribe(hdl, "ereport.io.oberon.ubc.dmarduea-channel");
- fmd_hdl_subscribe(hdl, "ereport.io.oberon.ubc.dmarduea-cpu");
- fmd_hdl_subscribe(hdl, "ereport.io.oberon.ubc.dmarduea-path");
- fmd_hdl_subscribe(hdl, "ereport.io.oberon.ubc.dmardueb-mem");
- fmd_hdl_subscribe(hdl, "ereport.io.oberon.ubc.dmardueb-channel");
- fmd_hdl_subscribe(hdl, "ereport.io.oberon.ubc.dmardueb-cpu");
- fmd_hdl_subscribe(hdl, "ereport.io.oberon.ubc.dmardueb-path");
- fmd_hdl_subscribe(hdl, "ereport.io.oberon.ubc.piowtue-mem");
- fmd_hdl_subscribe(hdl, "ereport.io.oberon.ubc.piowtue-channel");
- fmd_hdl_subscribe(hdl, "ereport.io.oberon.ubc.piowtue-cpu");
- fmd_hdl_subscribe(hdl, "ereport.io.oberon.ubc.piowtue-path");
- fmd_hdl_subscribe(hdl, "ereport.io.oberon.ubc.piowbeue-mem");
- fmd_hdl_subscribe(hdl, "ereport.io.oberon.ubc.piowbeue-channel");
- fmd_hdl_subscribe(hdl, "ereport.io.oberon.ubc.piowbeue-cpu");
- fmd_hdl_subscribe(hdl, "ereport.io.oberon.ubc.piowbeue-path");
- fmd_hdl_subscribe(hdl, "ereport.io.oberon.ubc.piorbeue-mem");
- fmd_hdl_subscribe(hdl, "ereport.io.oberon.ubc.piorbeue-channel");
- fmd_hdl_subscribe(hdl, "ereport.io.oberon.ubc.piorbeue-cpu");
- fmd_hdl_subscribe(hdl, "ereport.io.oberon.ubc.piorbeue-path");
-#endif
- fmd_hdl_subscribe(hdl, "ereport.io.fire.jbc.ce_asyn");
- fmd_hdl_subscribe(hdl, "ereport.io.fire.jbc.ue_asyn");
-
- bzero(&cmd, sizeof (cmd_t));
-
-#ifdef sun4u
- bzero(&opl_cpu_list, sizeof (cmd_list_t));
-#endif /* sun4u */
-
- cmd.cmd_stats = (cmd_stat_t *)fmd_stat_create(hdl, FMD_STAT_NOALLOC,
- sizeof (cmd_stats) / sizeof (fmd_stat_t),
- (fmd_stat_t *)&cmd_stats);
-
- for (sp = cmd_subscribers; sp->subr_class != NULL; sp++) {
- const char *type = strrchr(sp->subr_class, '.') + 1;
- int i;
-
- for (i = 0; i < sizeof (cmd_evdisp_names) /
- sizeof (struct cmd_evdisp_name); i++) {
- fmd_stat_t *stat = ((fmd_stat_t *)&sp->subr_stat) + i;
-
- (void) snprintf(stat->fmds_name,
- sizeof (stat->fmds_name),
- cmd_evdisp_names[i].evn_name, type);
-
- stat->fmds_type = FMD_TYPE_UINT64;
- (void) snprintf(stat->fmds_desc,
- sizeof (stat->fmds_desc),
- cmd_evdisp_names[i].evn_desc, type);
-
- (void) fmd_stat_create(hdl, FMD_STAT_NOALLOC, 1, stat);
- }
- }
-
- cmd.cmd_pagesize = sysconf(_SC_PAGESIZE);
- cmd.cmd_pagemask = ~((uint64_t)cmd.cmd_pagesize - 1);
-
- cmd.cmd_iorxefrx_window = fmd_prop_get_int64(hdl, "iorxefrx_window");
-
-#ifdef sun4u
- if (cmd_cpu_ecache_support() && cmd_ecache_init() < 0) {
- _fmd_fini(hdl);
- fmd_hdl_abort(hdl, "failed to find device for E-cache flush");
- }
-#endif
-
- if ((cmd.cmd_thresh_tpct_sysmem = fmd_prop_get_int64(hdl,
- "thresh_tpct_sysmem")) > 100000) {
- _fmd_fini(hdl);
- fmd_hdl_abort(hdl, "page retirement threshold is >100%");
- }
-
- cmd.cmd_thresh_abs_sysmem = fmd_prop_get_int64(hdl,
- "thresh_abs_sysmem");
- cmd.cmd_thresh_abs_badrw = fmd_prop_get_int64(hdl,
- "thresh_abs_badrw");
-
- cmd.cmd_xxcu_trdelay = fmd_prop_get_int64(hdl, "xxcu_trdelay");
-
- cmd.cmd_xxcu_ntrw = fmd_prop_get_int32(hdl, "num_xxcu_waiters");
- cmd.cmd_xxcu_trw = fmd_hdl_zalloc(hdl, sizeof (cmd_xxcu_trw_t) *
- cmd.cmd_xxcu_ntrw, FMD_SLEEP);
- cmd.cmd_low_ce_thresh = fmd_prop_get_int32(hdl, "low_ce_thresh");
- cmd.cmd_hi_ce_thresh = fmd_prop_get_int32(hdl, "hi_ce_thresh");
- cmd.cmd_dupce = fmd_prop_get_int32(hdl, "dupce");
- cmd.cmd_nupos = fmd_prop_get_int32(hdl, "nupos");
-
-#ifdef sun4v
- cmd.cmd_delta_ena = fmd_prop_get_int64(hdl, "delta_ena");
-#endif
-
- cmd.cmd_l2data_serd.cs_name = "l2data";
- cmd.cmd_l2data_serd.cs_n = fmd_prop_get_int32(hdl, "l2data_n");
- cmd.cmd_l2data_serd.cs_t = fmd_prop_get_int64(hdl, "l2data_t");
-
- cmd.cmd_l3data_serd.cs_name = "l3data";
- cmd.cmd_l3data_serd.cs_n = fmd_prop_get_int32(hdl, "l3data_n");
- cmd.cmd_l3data_serd.cs_t = fmd_prop_get_int64(hdl, "l3data_t");
-
- cmd.cmd_miscregs_serd.cs_name = "misc_regs";
- cmd.cmd_miscregs_serd.cs_n = fmd_prop_get_int32(hdl, "misc_regs_n");
- cmd.cmd_miscregs_serd.cs_t = fmd_prop_get_int64(hdl, "misc_regs_t");
-
- cmd.cmd_dcache_serd.cs_name = "dcache";
- cmd.cmd_dcache_serd.cs_n = fmd_prop_get_int32(hdl, "dcache_n");
- cmd.cmd_dcache_serd.cs_t = fmd_prop_get_int64(hdl, "dcache_t");
-
- cmd.cmd_icache_serd.cs_name = "icache";
- cmd.cmd_icache_serd.cs_n = fmd_prop_get_int32(hdl, "icache_n");
- cmd.cmd_icache_serd.cs_t = fmd_prop_get_int64(hdl, "icache_t");
-
- if (cmd_state_restore(hdl) < 0) {
- _fmd_fini(hdl);
- fmd_hdl_abort(hdl, "failed to restore saved state\n");
- }
-
-#ifdef sun4v
- init_hdl = hdl;
- cpumem_diagnosis_lhp = ldom_init(cpumem_diagnosis_init_alloc,
- cpumem_diagnosis_init_free);
-#endif
-
- init_auth(hdl);
-}
diff --git a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_mem.c b/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_mem.c
deleted file mode 100644
index 176b515715..0000000000
--- a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_mem.c
+++ /dev/null
@@ -1,291 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * Support routines for managing state related to memory modules.
- */
-
-#include <cmd_mem.h>
-#include <cmd_dimm.h>
-#include <cmd_bank.h>
-#include <cmd.h>
-#ifdef sun4u
-#include <cmd_dp.h>
-#endif
-#ifdef sun4v
-#include <cmd_branch.h>
-#endif
-
-#include <errno.h>
-#include <strings.h>
-#include <ctype.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <fm/fmd_api.h>
-#include <sys/fm/protocol.h>
-#include <sys/mem.h>
-#include <sys/nvpair.h>
-
-const char *
-cmd_fmri_get_unum(nvlist_t *fmri)
-{
- const char *scheme, *unum;
- uint8_t vers;
-
- if (nvlist_lookup_pairs(fmri, 0,
- FM_VERSION, DATA_TYPE_UINT8, &vers,
- FM_FMRI_SCHEME, DATA_TYPE_STRING, &scheme,
- FM_FMRI_MEM_UNUM, DATA_TYPE_STRING, &unum,
- NULL) != 0 || vers > FM_MEM_SCHEME_VERSION ||
- strcmp(scheme, FM_FMRI_SCHEME_MEM) != 0)
- return (NULL);
-
- return (unum);
-}
-
-char *
-cmd_mem_serdnm_create(fmd_hdl_t *hdl, const char *serdbase, const char *unum)
-{
- const char *fmt = "%s_%s_serd";
- size_t sz = snprintf(NULL, 0, fmt, serdbase, unum) + 1;
- char *nm = fmd_hdl_alloc(hdl, sz, FMD_SLEEP);
- (void) snprintf(nm, sz, fmt, serdbase, unum);
-
- return (nm);
-}
-
-char *
-cmd_page_serdnm_create(fmd_hdl_t *hdl, const char *serdbase,
- uint64_t phys_addr)
-{
- const char *fmt = "%s_%llXserd";
- size_t sz = snprintf(NULL, 0, fmt, serdbase, phys_addr) + 1;
- char *nm = fmd_hdl_alloc(hdl, sz, FMD_SLEEP);
- (void) snprintf(nm, sz, fmt, serdbase, phys_addr);
-
- return (nm);
-}
-
-char *
-cmd_mq_serdnm_create(fmd_hdl_t *hdl, const char *serdbase,
- uint64_t phys_addr, uint16_t cw, uint16_t pos)
-{
- const char *fmt = "%s_%llX_%x_%x_serd";
- size_t sz = snprintf(NULL, 0, fmt, serdbase, phys_addr, cw, pos) + 1;
- char *nm = fmd_hdl_alloc(hdl, sz, FMD_SLEEP);
- (void) snprintf(nm, sz, fmt, serdbase, phys_addr, cw, pos);
-
- return (nm);
-}
-
-void
-cmd_mem_case_restore(fmd_hdl_t *hdl, cmd_case_t *cc, fmd_case_t *cp,
- const char *serdbase, const char *unum)
-{
- cmd_case_restore(hdl, cc, cp, cmd_mem_serdnm_create(hdl, serdbase,
- unum));
-}
-
-void
-cmd_mem_retirestat_create(fmd_hdl_t *hdl, fmd_stat_t *st, const char *unum,
- uint64_t value, const char *prefix)
-{
- char *c;
-
- /*
- * Prior to Niagara-2, every bank had to have at least two dimms; it
- * was therefore impossible for the retirestat of a bank to ever have
- * the same name (strcmp() == 0) as that of a dimm.
- *
- * Niagara-2 and VF, in "single channel mode" , retrieve an entire
- * cache line from a single dimm. We therefore use a different
- * prefix to name the bank retirestat vs. the dimm retirestat,
- * or else the DE will abort trying to register a duplicate stat name
- * with fmd.
- */
- (void) snprintf(st->fmds_name, sizeof (st->fmds_name), "%s%s",
- prefix, unum);
- (void) snprintf(st->fmds_desc, sizeof (st->fmds_desc),
- "retirements for %s", unum);
- st->fmds_type = FMD_TYPE_UINT64;
- st->fmds_value.ui64 = value;
-
- /*
- * Sanitize the name of the statistic -- standard unums won't get
- * by fmd's validity checker.
- */
- for (c = st->fmds_name; *c != '\0'; c++) {
- if (!isupper(*c) && !islower(*c) &&
- !isdigit(*c) && *c != '-' && *c != '_' && *c != '.')
- *c = '_';
- }
-
- (void) fmd_stat_create(hdl, FMD_STAT_NOALLOC, 1, st);
-}
-
-int
-cmd_mem_thresh_check(fmd_hdl_t *hdl, uint_t nret)
-{
- ulong_t npages = cmd_mem_get_phys_pages(hdl);
- ulong_t wrnpgs;
-
- fmd_hdl_debug(hdl, "thresh_check: npages is %lu\n", npages);
- if (npages == 0) {
- return (0);
- }
-
- if (cmd.cmd_thresh_abs_sysmem != 0) {
- wrnpgs = cmd.cmd_thresh_abs_sysmem;
- } else {
- /* threshold is in thousandths of a percent */
- wrnpgs = npages * cmd.cmd_thresh_tpct_sysmem / 100000;
- }
-
- fmd_hdl_debug(hdl, "thresh_check: nret %u, wrn %lu\n", nret, wrnpgs);
-
- return (nret > wrnpgs);
-}
-
-nvlist_t *
-cmd_mem_fmri_create(const char *unum, char **serids, size_t nserids)
-{
- nvlist_t *fmri;
-
- if ((errno = nvlist_alloc(&fmri, NV_UNIQUE_NAME, 0)) != 0)
- return (NULL);
-
- if ((errno = nvlist_add_uint8(fmri, FM_VERSION,
- FM_MEM_SCHEME_VERSION)) != 0 || (errno = nvlist_add_string(fmri,
- FM_FMRI_SCHEME, FM_FMRI_SCHEME_MEM)) != 0 || (errno =
- nvlist_add_string(fmri, FM_FMRI_MEM_UNUM, unum)) != 0) {
- nvlist_free(fmri);
- return (NULL);
- }
-
- if ((nserids > 0) && (serids != NULL)) {
- (void) nvlist_add_string_array(fmri, FM_FMRI_MEM_SERIAL_ID,
- serids, nserids);
- }
- return (fmri);
-}
-
-nvlist_t *
-cmd_mem_fmri_derive(fmd_hdl_t *hdl, uint64_t afar, uint64_t afsr, uint16_t synd)
-{
- mem_name_t mn;
- nvlist_t *fmri;
- int fd;
-
- if ((fd = open("/dev/mem", O_RDONLY)) < 0)
- return (NULL);
-
- mn.m_addr = afar;
- mn.m_synd = synd;
- mn.m_type[0] = afsr;
- mn.m_type[1] = 0;
- mn.m_namelen = 100;
-
- for (;;) {
- mn.m_name = fmd_hdl_alloc(hdl, mn.m_namelen, FMD_SLEEP);
-
- if (ioctl(fd, MEM_NAME, &mn) == 0)
- break;
-
- fmd_hdl_free(hdl, mn.m_name, mn.m_namelen);
-
- if (errno != ENOSPC) {
- (void) close(fd);
- return (NULL);
- }
-
- mn.m_namelen *= 2;
- }
-
- (void) close(fd);
-
- fmri = cmd_mem_fmri_create(mn.m_name, NULL, 0);
- fmd_hdl_free(hdl, mn.m_name, mn.m_namelen);
-
- return (fmri);
-}
-
-void
-cmd_iorxefrx_queue(fmd_hdl_t *hdl, cmd_iorxefrx_t *rf)
-{
-
- fmd_hdl_debug(hdl, "queueing IOxE/RxE/FRx for matching\n");
-
- rf->rf_expid = fmd_timer_install(hdl, (void *)CMD_TIMERTYPE_MEM, NULL,
- cmd.cmd_iorxefrx_window);
- cmd_list_append(&cmd.cmd_iorxefrx, rf);
-}
-
-void
-cmd_iorxefrx_free(fmd_hdl_t *hdl, cmd_iorxefrx_t *rf)
-{
- /* It's not persisted, so just remove it */
- cmd_list_delete(&cmd.cmd_iorxefrx, rf);
- fmd_hdl_free(hdl, rf, sizeof (cmd_iorxefrx_t));
-}
-
-void
-cmd_mem_timeout(fmd_hdl_t *hdl, id_t id)
-{
- cmd_iorxefrx_t *rf;
-
- for (rf = cmd_list_next(&cmd.cmd_iorxefrx); rf != NULL;
- rf = cmd_list_next(rf)) {
- if (rf->rf_expid == id) {
- fmd_hdl_debug(hdl, "reclaiming iorxefrx tid %d\n", id);
- cmd_iorxefrx_free(hdl, rf);
- return;
- }
- }
-}
-
-void
-cmd_mem_gc(fmd_hdl_t *hdl)
-{
- cmd_dimm_gc(hdl);
- cmd_bank_gc(hdl);
-#ifdef sun4v
- cmd_branch_gc(hdl);
-#endif
-}
-
-void
-cmd_mem_fini(fmd_hdl_t *hdl)
-{
- cmd_iorxefrx_t *rf;
-
- cmd_dimm_fini(hdl);
- cmd_bank_fini(hdl);
-#ifdef sun4v
- cmd_branch_fini(hdl);
-#endif
-
- while ((rf = cmd_list_next(&cmd.cmd_iorxefrx)) != NULL)
- cmd_iorxefrx_free(hdl, rf);
-}
diff --git a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_mem.h b/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_mem.h
deleted file mode 100644
index 3bb5013ffc..0000000000
--- a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_mem.h
+++ /dev/null
@@ -1,208 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
- */
-
-#ifndef _CMD_MEM_H
-#define _CMD_MEM_H
-
-/*
- * Support routines for managing state related to memory modules.
- *
- * Correctable errors generally cause changes to the DIMM-related state (see
- * cmd_dimm.c), whereas uncorrectable errors tend to use the bank-related
- * routines (see cmd_bank.c). The primary exception to this division (though
- * it eventually devolves to one of the two) is the RxE/FRx pair emitted by
- * UltraSPARC-IIIi processors. With these errors, a complete pair must be
- * received and matched before we know whether we're dealing with a CE or a UE.
- */
-
-#include <cmd.h>
-#include <cmd_state.h>
-#include <cmd_fmri.h>
-#include <sys/errclassify.h>
-#include <cmd_cpu.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define CMD_MEM_F_FAULTING 0x1
-
-/*
- * Used to store as-yet unmatched IOxEs, RxEs, and FRxs. When a new IOxE,
- * RxE or FRx arrives, we traverse the cmd.cmd_iorxefrx list, looking for
- * matching entries. Matching has a cpuid-based component, as well as a
- * temporal one. We can compare the cpuids directly, using the cmd_iorxefrx_t
- * and the newly-received event. Temporal comparison isn't performed directly.
- * Instead, we ensure that entries in the iorxefrx list are removed when they
- * expire by means of timers. This frees the matching code from the need to
- * worry about time.
- */
-typedef struct cmd_iorxefrx {
- cmd_list_t rf_list; /* List of cmd_iorxefrx_t's */
- cmd_errcl_t rf_errcl; /* Error type (CMD_ERRCL_*) */
- uint_t rf_afsr_agentid; /* Remote Agent ID (from AFSR) */
- uint_t rf_det_agentid; /* Locat Agent ID (from detector) */
- id_t rf_expid; /* Timer ID for entry expiration */
- uint64_t rf_afar; /* Valid for RxE only */
- uint8_t rf_afar_status; /* Valid for RxE only */
- ce_dispact_t rf_type; /* Valid for RxE only */
- uint16_t rf_synd; /* Valid for FRx only */
- uint8_t rf_synd_status; /* Valid for FRx only */
- uint64_t rf_afsr; /* Valid for FRx only */
- uint64_t rf_disp; /* Valid for RCE only */
-} cmd_iorxefrx_t;
-
-typedef struct cmd_dimm cmd_dimm_t;
-typedef struct cmd_bank cmd_bank_t;
-#ifdef sun4v
-typedef struct cmd_branch cmd_branch_t;
-#endif
-
-/*
- * Correctable and Uncorrectable memory errors
- *
- * CEs of "Unknown" or "Intermittent" classification are not used in diagnosis.
- *
- * "Persistent" CEs are added to per-DIMM SERD engines. When the
- * engine for a given DIMM fires, the page corresponding to the CE that
- * caused the engine to fire is retired, and the SERD engine for that
- * DIMM is reset.
- *
- * "Possibly Persistent" CEs are at least Persistent and so are treated
- * as "Persistent" errors above, being added to the same SERD engines.
- *
- * "Leaky" CEs and "Sticky" CEs trigger immediate page retirement.
- *
- * "Possibly Sticky" CEs to which no valid partner test has been applied
- * are not used in diagnosis. Where a valid partner test has been applied
- * but did not confirm "Sticky" status there is a _suggestion_ that the
- * original cpu may be a bad reader or writer or suffering from other
- * datapath issues. To avoid retiring pages for such non-DIMM problems
- * these classifications are also not used in diagnosis.
- *
- * UEs immediately trigger page retirements, but do not affect the CE SERD
- * engines. In addition, UEs are recorded in the UE caches of the detecting
- * CPUs. When a page is to be retired, a fault.memory.page fault is
- * generated.
- *
- */
-
-typedef cmd_evdisp_t cmd_xe_handler_f(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, uint64_t, uint8_t, uint16_t, uint8_t, ce_dispact_t, uint64_t,
- nvlist_t *);
-
-extern ce_dispact_t cmd_mem_name2type(const char *, int);
-extern int cmd_synd2upos(uint16_t);
-extern cmd_evdisp_t cmd_ce(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-extern cmd_evdisp_t cmd_ue(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-extern cmd_evdisp_t cmd_ce_common(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, uint64_t, uint8_t, uint16_t, uint8_t,
- ce_dispact_t, uint64_t, nvlist_t *);
-extern cmd_evdisp_t cmd_ue_common(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, uint64_t, uint8_t, uint16_t, uint8_t,
- ce_dispact_t, uint64_t, nvlist_t *);
-extern cmd_evdisp_t cmd_mem_synd_check(fmd_hdl_t *, uint64_t, uint8_t,
- uint16_t, uint8_t, cmd_cpu_t *);
-extern void cmd_dimm_close(fmd_hdl_t *, void *);
-extern void cmd_bank_close(fmd_hdl_t *, void *);
-extern int cmd_same_datapath_dimms(cmd_dimm_t *, cmd_dimm_t *);
-extern void cmd_gen_datapath_fault(fmd_hdl_t *, cmd_dimm_t *, cmd_dimm_t *,
- uint16_t, nvlist_t *);
-extern void cmd_to_hashed_addr(uint64_t *, uint64_t, const char *);
-
-#ifdef sun4u
-extern char *cmd_cpu_getfrustr_by_id(fmd_hdl_t *, uint32_t);
-#endif
-
-#ifdef sun4v
-extern void cmd_branch_close(fmd_hdl_t *, void *);
-extern cmd_evdisp_t cmd_fb(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-extern cmd_evdisp_t cmd_fw_defect(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-extern cmd_evdisp_t cmd_fb_train(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-extern cmd_evdisp_t cmd_ue_train(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-#endif
-
-/*
- * US-IIIi I/O, Remote and Foreign Read memory errors
- *
- * When one processor or I/O bridge attempts to read memory local to
- * another processor, one each of IOCE/IOUE/RCE/RUE and FRC/FRU will be
- * generated, depending on the type of error. Both the IOxE/RxE and the FRx
- * are needed, as each contains data necessary to the diagnosis of the error.
- * Upon receipt of one of the errors, we wait until we receive the other.
- * When the pair has been successfully received and matched, a CE or UE,
- * as appropriate, is synthesized from the data in the matched ereports.
- * The synthesized ereports are handled by the normal CE and UE mechanisms.
- */
-extern cmd_evdisp_t cmd_frx(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-extern cmd_evdisp_t cmd_rxe(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-extern cmd_evdisp_t cmd_ioxe(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-extern cmd_evdisp_t cmd_ioxe_sec(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-extern cmd_evdisp_t cmd_rxefrx_common(fmd_hdl_t *hdl, fmd_event_t *ep,
- nvlist_t *nvl, const char *class, cmd_errcl_t clcode,
- cmd_errcl_t matchmask);
-
-/*
- * A list of received IOxE/RxE/FRx ereports is maintained for correlation
- * purposes (see above). These two routines manage the addition of new
- * ereports, and the retrieval of existing ones. Pruning of the list is
- * handled automatically.
- */
-extern void cmd_iorxefrx_queue(fmd_hdl_t *, cmd_iorxefrx_t *);
-extern void cmd_iorxefrx_free(fmd_hdl_t *, cmd_iorxefrx_t *);
-
-extern const char *cmd_fmri_get_unum(nvlist_t *);
-extern nvlist_t *cmd_mem_fmri_create(const char *, char **, size_t);
-extern nvlist_t *cmd_mem_fmri_derive(fmd_hdl_t *, uint64_t, uint64_t, uint16_t);
-
-extern void cmd_mem_case_restore(fmd_hdl_t *, cmd_case_t *, fmd_case_t *,
- const char *, const char *);
-extern char *cmd_mem_serdnm_create(fmd_hdl_t *, const char *, const char *);
-extern char *cmd_page_serdnm_create(fmd_hdl_t *, const char *, uint64_t);
-extern char *cmd_mq_serdnm_create(fmd_hdl_t *, const char *, uint64_t,
- uint16_t, uint16_t);
-extern void cmd_mem_retirestat_create(fmd_hdl_t *, fmd_stat_t *, const char *,
- uint64_t, const char *);
-extern int cmd_mem_thresh_check(fmd_hdl_t *, uint_t);
-extern ulong_t cmd_mem_get_phys_pages(fmd_hdl_t *);
-
-extern void cmd_mem_timeout(fmd_hdl_t *, id_t);
-extern void cmd_mem_gc(fmd_hdl_t *);
-extern void cmd_mem_fini(fmd_hdl_t *);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _CMD_MEM_H */
diff --git a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_memerr.c b/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_memerr.c
deleted file mode 100644
index 7258d7860a..0000000000
--- a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_memerr.c
+++ /dev/null
@@ -1,947 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
- */
-
-/*
- * Ereport-handling routines for memory errors
- */
-
-#include <cmd_mem.h>
-#include <cmd_dimm.h>
-#include <cmd_bank.h>
-#include <cmd_page.h>
-#include <cmd_cpu.h>
-#ifdef sun4u
-#include <cmd_dp.h>
-#include <cmd_dp_page.h>
-#endif
-#include <cmd.h>
-
-#include <strings.h>
-#include <string.h>
-#include <errno.h>
-#include <limits.h>
-#include <fm/fmd_api.h>
-#include <sys/fm/protocol.h>
-#include <sys/async.h>
-#include <sys/errclassify.h>
-#include <assert.h>
-
-#ifdef sun4v
-#include <cmd_hc_sun4v.h>
-#endif /* sun4v */
-
-struct ce_name2type {
- const char *name;
- ce_dispact_t type;
-};
-
-ce_dispact_t
-cmd_mem_name2type(const char *name, int minorvers)
-{
- static const struct ce_name2type old[] = {
- { ERR_TYPE_DESC_INTERMITTENT, CE_DISP_INTERMITTENT },
- { ERR_TYPE_DESC_PERSISTENT, CE_DISP_PERS },
- { ERR_TYPE_DESC_STICKY, CE_DISP_STICKY },
- { ERR_TYPE_DESC_UNKNOWN, CE_DISP_UNKNOWN },
- { NULL }
- };
- static const struct ce_name2type new[] = {
- { CE_DISP_DESC_U, CE_DISP_UNKNOWN },
- { CE_DISP_DESC_I, CE_DISP_INTERMITTENT },
- { CE_DISP_DESC_PP, CE_DISP_POSS_PERS },
- { CE_DISP_DESC_P, CE_DISP_PERS },
- { CE_DISP_DESC_L, CE_DISP_LEAKY },
- { CE_DISP_DESC_PS, CE_DISP_POSS_STICKY },
- { CE_DISP_DESC_S, CE_DISP_STICKY },
- { NULL }
- };
- const struct ce_name2type *names = (minorvers == 0) ? &old[0] : &new[0];
- const struct ce_name2type *tp;
-
- for (tp = names; tp->name != NULL; tp++)
- if (strcasecmp(name, tp->name) == 0)
- return (tp->type);
-
- return (CE_DISP_UNKNOWN);
-}
-
-/*
- * check if a dimm has n CEs with the same symbol-in-error
- */
-static int
-upos_thresh_check(cmd_dimm_t *dimm, uint16_t upos, uint32_t threshold)
-{
- int i;
- cmd_mq_t *ip, *next;
- int count = 0;
-
- for (i = 0; i < CMD_MAX_CKWDS; i++) {
- for (ip = cmd_list_next(&dimm->mq_root[i]); ip != NULL;
- ip = next) {
- next = cmd_list_next(ip);
- if (ip->mq_unit_position == upos) {
- count++;
- if (count >= threshold)
- return (1);
- }
- }
- }
- return (0);
-}
-
-/*
- * check if smaller number of retired pages > 1/16 of larger
- * number of retired pages
- */
-static int
-check_bad_rw_retired_pages(fmd_hdl_t *hdl, cmd_dimm_t *d1, cmd_dimm_t *d2)
-{
- uint_t sret, lret;
- double ratio;
- uint_t d1_nretired, d2_nretired;
-
- sret = lret = 0;
-
- d1_nretired = d1->dimm_nretired;
- d2_nretired = d2->dimm_nretired;
-
- if (d1->dimm_bank != NULL)
- d1_nretired += d1->dimm_bank->bank_nretired;
-
- if (d2->dimm_bank != NULL)
- d2_nretired += d2->dimm_bank->bank_nretired;
-
- if (d2_nretired < d1_nretired) {
- sret = d2_nretired;
- lret = d1_nretired;
- } else if (d2_nretired > d1_nretired) {
- sret = d1_nretired;
- lret = d2_nretired;
- } else
- return (0);
-
- ratio = lret * CMD_PAGE_RATIO;
-
- if (sret > ratio) {
- fmd_hdl_debug(hdl, "sret=%d lret=%d ratio=%.3f\n",
- sret, lret, ratio);
- return (1);
- }
- return (0);
-}
-
-/*
- * check bad rw between two DIMMs
- * the check succeeds if
- * - each DIMM has 4 CEs with the same symbol-in-error.
- * - the smaller number of retired pages > 1/16 larger number of retired pages
- */
-static int
-check_bad_rw_between_dimms(fmd_hdl_t *hdl, cmd_dimm_t *d1, cmd_dimm_t *d2,
- uint16_t *rupos)
-{
- int i;
- cmd_mq_t *ip, *next;
- uint16_t upos;
-
- for (i = 0; i < CMD_MAX_CKWDS; i++) {
- for (ip = cmd_list_next(&d1->mq_root[i]); ip != NULL;
- ip = next) {
- next = cmd_list_next(ip);
- upos = ip->mq_unit_position;
- if (upos_thresh_check(d1, upos, cmd.cmd_nupos)) {
- if (upos_thresh_check(d2, upos,
- cmd.cmd_nupos)) {
- if (check_bad_rw_retired_pages(hdl,
- d1, d2)) {
- *rupos = upos;
- return (1);
- }
- }
- }
- }
- }
-
- return (0);
-}
-
-static void
-bad_reader_writer_check(fmd_hdl_t *hdl, cmd_dimm_t *ce_dimm, nvlist_t *det)
-{
- cmd_dimm_t *d, *next;
- uint16_t upos;
-
- for (d = cmd_list_next(&cmd.cmd_dimms); d != NULL; d = next) {
- next = cmd_list_next(d);
- if (d == ce_dimm)
- continue;
- if (!cmd_same_datapath_dimms(ce_dimm, d))
- continue;
- if (check_bad_rw_between_dimms(hdl, ce_dimm, d, &upos)) {
- cmd_gen_datapath_fault(hdl, ce_dimm, d, upos, det);
- cmd_dimm_save_symbol_error(ce_dimm, upos);
- fmd_hdl_debug(hdl,
- "check_bad_rw_dimms succeeded: %s %s",
- ce_dimm->dimm_unum, d->dimm_unum);
- return;
- }
- }
-}
-
-/*
- * rule 5a checking. The check succeeds if
- * - nretired >= 512
- * - nretired >= 128 and (addr_hi - addr_low) / (nretired - 1) > 512KB
- */
-static void
-ce_thresh_check(fmd_hdl_t *hdl, cmd_dimm_t *dimm)
-{
- nvlist_t *flt;
- fmd_case_t *cp;
- uint_t nret;
- uint64_t delta_addr = 0;
-
- if (dimm->dimm_flags & CMD_MEM_F_FAULTING)
- /* We've already complained about this DIMM */
- return;
-
- nret = dimm->dimm_nretired;
- if (dimm->dimm_bank != NULL)
- nret += dimm->dimm_bank->bank_nretired;
-
- if (nret < cmd.cmd_low_ce_thresh)
- return;
-
- if (dimm->dimm_phys_addr_hi >= dimm->dimm_phys_addr_low)
- delta_addr =
- (dimm->dimm_phys_addr_hi - dimm->dimm_phys_addr_low) /
- (nret - 1);
-
- if (nret >= cmd.cmd_hi_ce_thresh || delta_addr > CMD_MQ_512KB) {
-
- dimm->dimm_flags |= CMD_MEM_F_FAULTING;
- cmd_dimm_dirty(hdl, dimm);
-
- cp = fmd_case_open(hdl, NULL);
- flt = cmd_dimm_create_fault(hdl, dimm,
- "fault.memory.dimm-page-retires-excessive", CMD_FLTMAXCONF);
- fmd_case_add_suspect(hdl, cp, flt);
- fmd_case_solve(hdl, cp);
- fmd_hdl_debug(hdl, "ce_thresh_check succeeded nretired %d\n",
- nret);
-
- }
-}
-
-/*
- * rule 5b checking. The check succeeds if
- * more than 120 non-intermittent CEs are reported against one symbol
- * position of one afar in 72 hours.
- */
-static void
-mq_5b_check(fmd_hdl_t *hdl, cmd_dimm_t *dimm)
-{
- nvlist_t *flt;
- fmd_case_t *cp;
- cmd_mq_t *ip, *next;
- int cw;
-
- for (cw = 0; cw < CMD_MAX_CKWDS; cw++) {
- for (ip = cmd_list_next(&dimm->mq_root[cw]);
- ip != NULL; ip = next) {
- next = cmd_list_next(ip);
- if (ip->mq_dupce_count >= cmd.cmd_dupce) {
- cp = fmd_case_open(hdl, NULL);
- flt = cmd_dimm_create_fault(hdl, dimm,
- "fault.memory.dimm-page-retires-excessive",
- CMD_FLTMAXCONF);
- dimm->dimm_flags |= CMD_MEM_F_FAULTING;
- cmd_dimm_dirty(hdl, dimm);
- fmd_case_add_suspect(hdl, cp, flt);
- fmd_case_solve(hdl, cp);
- fmd_hdl_debug(hdl,
- "mq_5b_check succeeded: duplicate CE=%d",
- ip->mq_dupce_count);
- return;
- }
- }
- }
-}
-
-/*
- * delete the expired duplicate CE time stamps
- */
-void
-mq_prune_dup(fmd_hdl_t *hdl, cmd_mq_t *ip, uint64_t now)
-{
- tstamp_t *tsp, *next;
-
- for (tsp = cmd_list_next(&ip->mq_dupce_tstamp); tsp != NULL;
- tsp = next) {
- next = cmd_list_next(tsp);
- if (tsp->tstamp < now - CMD_MQ_TIMELIM) {
- cmd_list_delete(&ip->mq_dupce_tstamp, &tsp->ts_l);
- fmd_hdl_free(hdl, tsp, sizeof (tstamp_t));
- ip->mq_dupce_count--;
- }
- }
-}
-
-void
-mq_update(fmd_hdl_t *hdl, fmd_event_t *ep, cmd_mq_t *ip, uint64_t now,
- uint32_t cpuid)
-{
- tstamp_t *tsp;
-
- ip->mq_tstamp = now;
- ip->mq_cpuid = cpuid;
- ip->mq_ep = ep;
-
- if (fmd_serd_exists(hdl, ip->mq_serdnm))
- fmd_serd_destroy(hdl, ip->mq_serdnm);
- fmd_serd_create(hdl, ip->mq_serdnm, CMD_MQ_SERDN, CMD_MQ_SERDT);
- (void) fmd_serd_record(hdl, ip->mq_serdnm, ep);
-
- tsp = fmd_hdl_zalloc(hdl, sizeof (tstamp_t), FMD_SLEEP);
- tsp->tstamp = now;
- cmd_list_append(&ip->mq_dupce_tstamp, tsp);
- ip->mq_dupce_count++;
-}
-
-/* Create a fresh index block for MQSC CE correlation. */
-cmd_mq_t *
-mq_create(fmd_hdl_t *hdl, fmd_event_t *ep,
- uint64_t afar, uint16_t upos, uint64_t now, uint32_t cpuid)
-{
- cmd_mq_t *cp;
- tstamp_t *tsp;
- uint16_t ckwd = (afar & 0x30) >> 4;
-
- cp = fmd_hdl_zalloc(hdl, sizeof (cmd_mq_t), FMD_SLEEP);
- cp->mq_tstamp = now;
- cp->mq_ckwd = ckwd;
- cp->mq_phys_addr = afar;
- cp->mq_unit_position = upos;
- cp->mq_ep = ep;
- cp->mq_serdnm =
- cmd_mq_serdnm_create(hdl, "mq", afar, ckwd, upos);
-
- tsp = fmd_hdl_zalloc(hdl, sizeof (tstamp_t), FMD_SLEEP);
- tsp->tstamp = now;
- cmd_list_append(&cp->mq_dupce_tstamp, tsp);
- cp->mq_dupce_count = 1;
- cp->mq_cpuid = cpuid;
-
- /*
- * Create SERD to keep this event from being removed
- * by fmd which may not know there is an event pointer
- * saved here. This SERD is *never* meant to fire.
- * NOTE: wouldn't need to do this if there were an fmd
- * api to 'hold' an event.
- */
- if (fmd_serd_exists(hdl, cp->mq_serdnm)) {
- /* clean up dup */
- fmd_serd_destroy(hdl, cp->mq_serdnm);
- }
- fmd_serd_create(hdl, cp->mq_serdnm, CMD_MQ_SERDN, CMD_MQ_SERDT);
- (void) fmd_serd_record(hdl, cp->mq_serdnm, ep);
-
- return (cp);
-}
-
-/* Destroy MQSC tracking block as well as event tracking SERD. */
-
-cmd_mq_t *
-mq_destroy(fmd_hdl_t *hdl, cmd_list_t *lp, cmd_mq_t *ip)
-{
- cmd_mq_t *jp = cmd_list_next(ip);
- tstamp_t *tsp, *next;
-
- if (ip->mq_serdnm != NULL) {
- if (fmd_serd_exists(hdl, ip->mq_serdnm))
- fmd_serd_destroy(hdl, ip->mq_serdnm);
- fmd_hdl_strfree(hdl, ip->mq_serdnm);
- ip->mq_serdnm = NULL;
- }
-
- for (tsp = cmd_list_next(&ip->mq_dupce_tstamp); tsp != NULL;
- tsp = next) {
- next = cmd_list_next(tsp);
- cmd_list_delete(&ip->mq_dupce_tstamp, &tsp->ts_l);
- fmd_hdl_free(hdl, tsp, sizeof (tstamp_t));
- }
-
- cmd_list_delete(lp, &ip->mq_l);
- fmd_hdl_free(hdl, ip, sizeof (cmd_mq_t));
-
- return (jp);
-}
-
-/*
- * Add an index block for a new CE, sorted
- * a) by ascending unit position
- * b) order of arrival (~= time order)
- */
-
-void
-mq_add(fmd_hdl_t *hdl, cmd_dimm_t *dimm, fmd_event_t *ep,
- uint64_t afar, uint16_t synd, uint64_t now, uint32_t cpuid)
-{
- cmd_mq_t *ip, *jp;
- int cw, unit_position;
-
- cw = (afar & 0x30) >> 4; /* 0:3 */
- if ((unit_position = cmd_synd2upos(synd)) < 0)
- return; /* not a CE */
-
- for (ip = cmd_list_next(&dimm->mq_root[cw]); ip != NULL; ) {
- if (ip->mq_unit_position > unit_position) {
- /* list is in unit position order */
- break;
- } else if (ip->mq_unit_position == unit_position &&
- ip->mq_phys_addr == afar) {
- /*
- * Found a duplicate cw, unit_position, and afar.
- * update the mq_t with the new information
- */
- mq_update(hdl, ep, ip, now, cpuid);
- return;
- } else {
- ip = cmd_list_next(ip);
- }
- }
-
- jp = mq_create(hdl, ep, afar, unit_position, now, cpuid);
- if (ip == NULL)
- cmd_list_append(&dimm->mq_root[cw], jp);
- else
- cmd_list_insert_before(&dimm->mq_root[cw], ip, jp);
-}
-
-/*
- * Prune the MQSC index lists (one for each checkword), by deleting
- * outdated index blocks from each list.
- */
-
-void
-mq_prune(fmd_hdl_t *hdl, cmd_dimm_t *dimm, uint64_t now)
-{
- cmd_mq_t *ip;
- int cw;
-
- for (cw = 0; cw < CMD_MAX_CKWDS; cw++) {
- for (ip = cmd_list_next(&dimm->mq_root[cw]); ip != NULL; ) {
- if (ip->mq_tstamp < now - CMD_MQ_TIMELIM) {
- /*
- * This event has timed out - delete the
- * mq block as well as serd for the event.
- */
- ip = mq_destroy(hdl, &dimm->mq_root[cw], ip);
- } else {
- /* tstamp < now - ce_t */
- mq_prune_dup(hdl, ip, now);
- ip = cmd_list_next(ip);
- }
- } /* per checkword */
- } /* cw = 0...3 */
-}
-
-/*
- * Check the MQSC index lists (one for each checkword) by making a
- * complete pass through each list, checking if the criteria for
- * Rule 4A has been met. Rule 4A checking is done for each checkword.
- *
- * Rule 4A: fault a DIMM "whenever Solaris reports two or more CEs from
- * two or more different physical addresses on each of two or more different
- * bit positions from the same DIMM within 72 hours of each other, and all
- * the addresses are in the same relative checkword (that is, the AFARs
- * are all the same modulo 64). [Note: This means at least 4 CEs; two
- * from one bit position, with unique addresses, and two from another,
- * also with unique addresses, and the lower 6 bits of all the addresses
- * are the same."
- */
-
-void
-mq_check(fmd_hdl_t *hdl, cmd_dimm_t *dimm)
-{
- int upos_pairs, curr_upos, cw, i, j;
- nvlist_t *flt;
- typedef struct upos_pair {
- int upos;
- cmd_mq_t *mq1;
- cmd_mq_t *mq2;
- } upos_pair_t;
- upos_pair_t upos_array[8]; /* max per cw = 2, * 4 cw's */
- cmd_mq_t *ip;
-
- /*
- * Each upos_array[] member represents a pair of CEs for the same
- * unit position (symbol) which on a sun4u is a bit, and on sun4v
- * is a (4 bit) nibble.
- * MQSC rule 4 requires pairs of CEs from the same symbol (same DIMM
- * for rule 4A, and same DRAM for rule 4B) for a violation - this
- * is why CE pairs are tracked.
- */
- upos_pairs = 0;
- upos_array[0].mq1 = NULL;
-
- /* Loop through all checkwords */
- for (cw = 0; cw < CMD_MAX_CKWDS; cw++) {
- i = upos_pairs;
- curr_upos = -1;
-
- /*
- * mq_root[] is an array of cumulative lists of CEs
- * indexed by checkword where the list is in unit position
- * order. Loop through checking for duplicate unit position
- * entries (filled in at mq_create()).
- * The upos_array[] is filled in each time a duplicate
- * unit position is found; the first time through the loop
- * of a unit position sets curr_upos but does not fill in
- * upos_array[] until the second symbol is found.
- */
- for (ip = cmd_list_next(&dimm->mq_root[cw]); ip != NULL;
- ip = cmd_list_next(ip)) {
- if (curr_upos != ip->mq_unit_position) {
- /* Set initial current position */
- curr_upos = ip->mq_unit_position;
- } else if (i > upos_pairs &&
- curr_upos == upos_array[i-1].upos) {
- /*
- * Only keep track of CE pairs; skip
- * triples, quads, etc...
- */
- continue;
- } else if (upos_array[i].mq1 == NULL) {
- /*
- * Have a pair, add to upos_array[].
- */
- upos_array[i].upos = curr_upos;
- upos_array[i].mq1 = cmd_list_prev(ip);
- upos_array[i].mq2 = ip;
- upos_array[++i].mq1 = NULL;
- }
- }
-
- if (i - upos_pairs >= 2) {
- /* Rule 4A Violation. */
- flt = cmd_dimm_create_fault(hdl,
- dimm, "fault.memory.dimm-ue-imminent",
- CMD_FLTMAXCONF);
- for (j = upos_pairs; j < i; j++) {
- fmd_case_add_ereport(hdl,
- dimm->dimm_case.cc_cp,
- upos_array[j].mq1->mq_ep);
- fmd_case_add_ereport(hdl,
- dimm->dimm_case.cc_cp,
- upos_array[j].mq2->mq_ep);
- }
- dimm->dimm_flags |= CMD_MEM_F_FAULTING;
- cmd_dimm_dirty(hdl, dimm);
- fmd_case_add_suspect(hdl, dimm->dimm_case.cc_cp, flt);
- fmd_case_solve(hdl, dimm->dimm_case.cc_cp);
- return;
- }
- upos_pairs = i;
- assert(upos_pairs < 8);
- }
-}
-
-/*ARGSUSED*/
-cmd_evdisp_t
-cmd_ce_common(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl,
- const char *class, uint64_t afar, uint8_t afar_status, uint16_t synd,
- uint8_t synd_status, ce_dispact_t type, uint64_t disp, nvlist_t *asru)
-{
- cmd_dimm_t *dimm;
- cmd_page_t *page;
- const char *uuid;
- uint64_t *now;
- uint_t nelem;
- uint32_t cpuid;
- nvlist_t *det;
- uint64_t addr;
- int skip_error = 0;
-
- if (afar_status != AFLT_STAT_VALID ||
- synd_status != AFLT_STAT_VALID)
- return (CMD_EVD_UNUSED);
-
- if ((page = cmd_page_lookup(afar)) != NULL &&
- page->page_case.cc_cp != NULL &&
- fmd_case_solved(hdl, page->page_case.cc_cp))
- return (CMD_EVD_REDUND);
-
-#ifdef sun4u
- if (cmd_dp_error(hdl) || cmd_dp_fault(hdl, afar)) {
- CMD_STAT_BUMP(dp_ignored_ce);
- return (CMD_EVD_UNUSED);
- }
-#endif /* sun4u */
-
- if (fmd_nvl_fmri_expand(hdl, asru) < 0) {
- CMD_STAT_BUMP(bad_mem_asru);
- return (CMD_EVD_BAD);
- }
-
- if ((dimm = cmd_dimm_lookup(hdl, asru)) == NULL &&
- (dimm = cmd_dimm_create(hdl, asru)) == NULL)
- return (CMD_EVD_UNUSED);
-
- if (dimm->dimm_case.cc_cp == NULL) {
- dimm->dimm_case.cc_cp = cmd_case_create(hdl,
- &dimm->dimm_header, CMD_PTR_DIMM_CASE, &uuid);
- }
-
- if (nvlist_lookup_nvlist(nvl, FM_EREPORT_DETECTOR, &det) != 0)
- return (CMD_EVD_BAD);
-
- /*
- * Add to MQSC correlation lists all CEs which pass validity
- * checks above.
- * Add mq_t when there is no bad r/w or dimm fault.
- * Always prune the expired mq_t.
- */
- skip_error = cmd_dimm_check_symbol_error(dimm, synd);
-
- if (nvlist_lookup_uint64_array(nvl,
- "__tod", &now, &nelem) == 0) {
-
- if (!skip_error || !(dimm->dimm_flags & CMD_MEM_F_FAULTING)) {
- if (nvlist_lookup_uint32(det, FM_FMRI_CPU_ID, &cpuid)
- != 0)
- cpuid = ULONG_MAX;
-
- mq_add(hdl, dimm, ep, afar, synd, *now, cpuid);
- }
-
- mq_prune(hdl, dimm, *now);
-
- if (!skip_error)
- bad_reader_writer_check(hdl, dimm, det);
-
- if (!(dimm->dimm_flags & CMD_MEM_F_FAULTING)) {
- mq_check(hdl, dimm);
- mq_5b_check(hdl, dimm);
- }
- }
-
- switch (type) {
- case CE_DISP_UNKNOWN:
- CMD_STAT_BUMP(ce_unknown);
- return (CMD_EVD_UNUSED);
- case CE_DISP_INTERMITTENT:
- CMD_STAT_BUMP(ce_interm);
- return (CMD_EVD_UNUSED);
- case CE_DISP_POSS_PERS:
- CMD_STAT_BUMP(ce_ppersis);
- break;
- case CE_DISP_PERS:
- CMD_STAT_BUMP(ce_persis);
- break;
- case CE_DISP_LEAKY:
- CMD_STAT_BUMP(ce_leaky);
- break;
- case CE_DISP_POSS_STICKY:
- {
- uchar_t ptnrinfo = CE_XDIAG_PTNRINFO(disp);
-
- if (CE_XDIAG_TESTVALID(ptnrinfo)) {
- int ce1 = CE_XDIAG_CE1SEEN(ptnrinfo);
- int ce2 = CE_XDIAG_CE2SEEN(ptnrinfo);
-
- if (ce1 && ce2) {
- /* Should have been CE_DISP_STICKY */
- return (CMD_EVD_BAD);
- } else if (ce1) {
- /* Partner could see and could fix CE */
- CMD_STAT_BUMP(ce_psticky_ptnrclrd);
- } else {
- /* Partner could not see ce1 (ignore ce2) */
- CMD_STAT_BUMP(ce_psticky_ptnrnoerr);
- }
- } else {
- CMD_STAT_BUMP(ce_psticky_noptnr);
- }
- return (CMD_EVD_UNUSED);
- }
- case CE_DISP_STICKY:
- CMD_STAT_BUMP(ce_sticky);
- break;
- default:
- return (CMD_EVD_BAD);
- }
-
- if (cmd_dimm_check_symbol_error(dimm, synd))
- return (CMD_EVD_REDUND);
-
- if (page == NULL)
- page = cmd_page_create(hdl, asru, afar);
-
- if (page->page_case.cc_cp == NULL) {
- page->page_case.cc_cp = cmd_case_create(hdl,
- &page->page_header, CMD_PTR_PAGE_CASE, &uuid);
- }
-
- switch (type) {
- case CE_DISP_POSS_PERS:
- case CE_DISP_PERS:
- fmd_hdl_debug(hdl, "adding %sPersistent event to CE serd "
- "engine\n", type == CE_DISP_POSS_PERS ? "Possible-" : "");
-
- if (page->page_case.cc_serdnm == NULL) {
- page->page_case.cc_serdnm = cmd_page_serdnm_create(hdl,
- "page", page->page_physbase);
-
- fmd_serd_create(hdl, page->page_case.cc_serdnm,
- fmd_prop_get_int32(hdl, "ce_n"),
- fmd_prop_get_int64(hdl, "ce_t"));
- }
-
- if (fmd_serd_record(hdl, page->page_case.cc_serdnm, ep) ==
- FMD_B_FALSE)
- return (CMD_EVD_OK); /* engine hasn't fired */
-
- fmd_hdl_debug(hdl, "ce page serd fired\n");
- fmd_case_add_serd(hdl, page->page_case.cc_cp,
- page->page_case.cc_serdnm);
- fmd_serd_reset(hdl, page->page_case.cc_serdnm);
- break; /* to retire */
-
- case CE_DISP_LEAKY:
- case CE_DISP_STICKY:
- fmd_case_add_ereport(hdl, page->page_case.cc_cp, ep);
- break; /* to retire */
- }
-
- if (page->page_flags & CMD_MEM_F_FAULTING ||
- fmd_nvl_fmri_unusable(hdl, page->page_asru_nvl))
- return (CMD_EVD_OK);
-
- /*
- * convert a unhashed address to hashed address
- */
- cmd_to_hashed_addr(&addr, afar, class);
-
- if (afar > dimm->dimm_phys_addr_hi)
- dimm->dimm_phys_addr_hi = addr;
-
- if (afar < dimm->dimm_phys_addr_low)
- dimm->dimm_phys_addr_low = addr;
-
- dimm->dimm_nretired++;
- dimm->dimm_retstat.fmds_value.ui64++;
- cmd_dimm_dirty(hdl, dimm);
-
- cmd_page_fault(hdl, asru, cmd_dimm_fru(dimm), ep, afar);
- ce_thresh_check(hdl, dimm);
-
- return (CMD_EVD_OK);
-}
-
-/*
- * Solve a bank case with suspect "fault.memory.bank". The caller must
- * have populated bank->bank_case.cc_cp and is also responsible for adding
- * associated ereport(s) to that case.
- */
-void
-cmd_bank_fault(fmd_hdl_t *hdl, cmd_bank_t *bank)
-{
- fmd_case_t *cp = bank->bank_case.cc_cp;
- nvlist_t *flt;
-
- if (bank->bank_flags & CMD_MEM_F_FAULTING)
- return; /* Only complain once per bank */
-
- bank->bank_flags |= CMD_MEM_F_FAULTING;
- cmd_bank_dirty(hdl, bank);
-
-#ifdef sun4u
- flt = cmd_bank_create_fault(hdl, bank, "fault.memory.bank",
- CMD_FLTMAXCONF);
- fmd_case_add_suspect(hdl, cp, flt);
-#else /* sun4v */
- {
- cmd_bank_memb_t *d;
-
- /* create separate fault for each dimm in bank */
-
- for (d = cmd_list_next(&bank->bank_dimms);
- d != NULL; d = cmd_list_next(d)) {
- flt = cmd_dimm_create_fault(hdl, d->bm_dimm,
- "fault.memory.bank", CMD_FLTMAXCONF);
- fmd_case_add_suspect(hdl, cp, flt);
- }
- }
-#endif /* sun4u */
- fmd_case_solve(hdl, cp);
-}
-
-/*ARGSUSED*/
-cmd_evdisp_t
-cmd_ue_common(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl,
- const char *class, uint64_t afar, uint8_t afar_status, uint16_t synd,
- uint8_t synd_status, ce_dispact_t type, uint64_t disp, nvlist_t *asru)
-{
- cmd_page_t *page;
- cmd_bank_t *bank;
- cmd_cpu_t *cpu;
-
-#ifdef sun4u
- /*
- * Note: Currently all sun4u processors using this code share
- * L2 and L3 cache at CMD_CPU_LEVEL_CORE.
- */
- cpu = cmd_cpu_lookup_from_detector(hdl, nvl, class,
- CMD_CPU_LEVEL_CORE);
-#else /* sun4v */
- cpu = cmd_cpu_lookup_from_detector(hdl, nvl, class,
- CMD_CPU_LEVEL_THREAD);
-#endif /* sun4u */
-
- if (cpu == NULL) {
- fmd_hdl_debug(hdl, "cmd_ue_common: cpu not found\n");
- return (CMD_EVD_UNUSED);
- }
-
- /*
- * The following code applies only to sun4u, because sun4u does
- * not poison data in L2 cache resulting from the fetch of a
- * memory UE.
- */
-
-#ifdef sun4u
- if (afar_status != AFLT_STAT_VALID) {
- /*
- * Had this report's AFAR been valid, it would have
- * contributed an address to the UE cache. We don't
- * know what the AFAR would have been, and thus we can't
- * add anything to the cache. If a xxU is caused by
- * this UE, we won't be able to detect it, and will thus
- * erroneously offline the CPU. To prevent this
- * situation, we need to assume that all xxUs generated
- * through the next E$ flush are attributable to the UE.
- */
- cmd_cpu_uec_set_allmatch(hdl, cpu);
- } else {
- cmd_cpu_uec_add(hdl, cpu, afar);
- }
-#endif /* sun4u */
-
- if (synd_status != AFLT_STAT_VALID) {
- fmd_hdl_debug(hdl, "cmd_ue_common: syndrome not valid\n");
- return (CMD_EVD_UNUSED);
- }
-
- if (cmd_mem_synd_check(hdl, afar, afar_status, synd, synd_status,
- cpu) == CMD_EVD_UNUSED)
- return (CMD_EVD_UNUSED);
-
- if (afar_status != AFLT_STAT_VALID)
- return (CMD_EVD_UNUSED);
-
- if ((page = cmd_page_lookup(afar)) != NULL &&
- page->page_case.cc_cp != NULL &&
- fmd_case_solved(hdl, page->page_case.cc_cp))
- return (CMD_EVD_REDUND);
-
- if (fmd_nvl_fmri_expand(hdl, asru) < 0) {
- CMD_STAT_BUMP(bad_mem_asru);
- return (CMD_EVD_BAD);
- }
-
- if ((bank = cmd_bank_lookup(hdl, asru)) == NULL &&
- (bank = cmd_bank_create(hdl, asru)) == NULL)
- return (CMD_EVD_UNUSED);
-
-#ifdef sun4v
- {
- nvlist_t *fmri;
- char **snarray;
- unsigned int i, n;
-
- /*
- * 1: locate the array of serial numbers inside the bank asru.
- * 2: for each serial #, lookup its mem: FMRI in libtopo
- * 3: ensure that each DIMM's FMRI is on bank's dimmlist
- */
-
- if (nvlist_lookup_string_array(asru,
- FM_FMRI_MEM_SERIAL_ID, &snarray, &n) != 0)
- fmd_hdl_abort(hdl, "Cannot locate serial #s for bank");
-
- for (i = 0; i < n; i++) {
- fmri = cmd_find_dimm_by_sn(hdl, FM_FMRI_SCHEME_MEM,
- snarray[i]);
- /*
- * If dimm structure doesn't already exist for
- * each dimm, create and link to bank.
- */
- if (cmd_dimm_lookup(hdl, fmri) == NULL)
- (void) cmd_dimm_create(hdl, fmri);
- nvlist_free(fmri);
- }
- }
-#endif /* sun4v */
-
- if (bank->bank_case.cc_cp == NULL) {
- const char *uuid;
- bank->bank_case.cc_cp = cmd_case_create(hdl, &bank->bank_header,
- CMD_PTR_BANK_CASE, &uuid);
- }
-
-#ifdef sun4u
- if (cmd_dp_error(hdl)) {
- CMD_STAT_BUMP(dp_deferred_ue);
- cmd_dp_page_defer(hdl, asru, ep, afar);
- return (CMD_EVD_OK);
- } else if (cmd_dp_fault(hdl, afar)) {
- CMD_STAT_BUMP(dp_ignored_ue);
- return (CMD_EVD_UNUSED);
- }
-#endif /* sun4u */
-
- fmd_case_add_ereport(hdl, bank->bank_case.cc_cp, ep);
-
- bank->bank_nretired++;
- bank->bank_retstat.fmds_value.ui64++;
- cmd_bank_dirty(hdl, bank);
-
- cmd_page_fault(hdl, bank->bank_asru_nvl, cmd_bank_fru(bank), ep, afar);
- cmd_bank_fault(hdl, bank);
-
- return (CMD_EVD_OK);
-}
-
-void
-cmd_dimm_close(fmd_hdl_t *hdl, void *arg)
-{
- cmd_dimm_destroy(hdl, arg);
-}
-
-void
-cmd_bank_close(fmd_hdl_t *hdl, void *arg)
-{
- cmd_bank_destroy(hdl, arg);
-}
diff --git a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_page.c b/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_page.c
deleted file mode 100644
index 49fb9855bd..0000000000
--- a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_page.c
+++ /dev/null
@@ -1,311 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-/*
- * Support routines for managing per-page state.
- */
-
-#include <cmd_page.h>
-#include <cmd_mem.h>
-#include <cmd.h>
-#ifdef sun4u
-#include <cmd_dp_page.h>
-#endif
-
-#include <errno.h>
-#include <strings.h>
-#include <fm/fmd_api.h>
-#include <sys/fm/protocol.h>
-
-static void
-page_write(fmd_hdl_t *hdl, cmd_page_t *page)
-{
- fmd_buf_write(hdl, NULL, page->page_bufname, page,
- sizeof (cmd_page_pers_t));
-}
-
-static void
-cmd_page_free(fmd_hdl_t *hdl, cmd_page_t *page, int destroy)
-{
- cmd_case_t *cc = &page->page_case;
-
- if (cc->cc_cp != NULL)
- cmd_case_fini(hdl, cc->cc_cp, destroy);
-
- if (cc->cc_serdnm != NULL) {
- if (fmd_serd_exists(hdl, cc->cc_serdnm) && destroy)
- fmd_serd_destroy(hdl, cc->cc_serdnm);
- fmd_hdl_strfree(hdl, cc->cc_serdnm);
- }
-
- if (destroy)
- fmd_buf_destroy(hdl, NULL, page->page_bufname);
-
- cmd_fmri_fini(hdl, &page->page_asru, destroy);
-
- cmd_list_delete(&cmd.cmd_pages, page);
- fmd_hdl_free(hdl, page, sizeof (cmd_page_t));
-}
-
-void
-cmd_page_destroy(fmd_hdl_t *hdl, cmd_page_t *page)
-{
- cmd_page_free(hdl, page, FMD_B_TRUE);
-}
-
-static cmd_page_t *
-page_lookup_by_physaddr(uint64_t pa)
-{
- cmd_page_t *page;
-
- for (page = cmd_list_next(&cmd.cmd_pages); page != NULL;
- page = cmd_list_next(page)) {
- if (page->page_physbase == pa)
- return (page);
- }
-
- return (NULL);
-}
-
-cmd_page_t *
-cmd_page_create(fmd_hdl_t *hdl, nvlist_t *modasru, uint64_t pa)
-{
- cmd_page_t *page;
- nvlist_t *asru;
-
- pa = pa & cmd.cmd_pagemask;
-
- fmd_hdl_debug(hdl, "page_lookup: creating new page for %llx\n",
- (u_longlong_t)pa);
- CMD_STAT_BUMP(page_creat);
-
- page = fmd_hdl_zalloc(hdl, sizeof (cmd_page_t), FMD_SLEEP);
- page->page_nodetype = CMD_NT_PAGE;
- page->page_version = CMD_PAGE_VERSION;
- page->page_physbase = pa;
-
- cmd_bufname(page->page_bufname, sizeof (page->page_bufname),
- "page_%llx", (u_longlong_t)pa);
-
- if ((errno = nvlist_dup(modasru, &asru, 0)) != 0 ||
- (errno = nvlist_add_uint64(asru, FM_FMRI_MEM_PHYSADDR,
- page->page_physbase)) != 0 ||
- (errno = fmd_nvl_fmri_expand(hdl, asru)) != 0)
- fmd_hdl_abort(hdl, "failed to build page fmri");
-
- cmd_fmri_init(hdl, &page->page_asru, asru, "page_asru_%llx",
- (u_longlong_t)pa);
-
- nvlist_free(asru);
-
- cmd_list_append(&cmd.cmd_pages, page);
- page_write(hdl, page);
-
- return (page);
-}
-
-cmd_page_t *
-cmd_page_lookup(uint64_t pa)
-{
- pa = pa & cmd.cmd_pagemask;
-
- return (page_lookup_by_physaddr(pa));
-}
-
-static cmd_page_t *
-page_v0tov1(fmd_hdl_t *hdl, cmd_page_0_t *old, size_t oldsz)
-{
- cmd_page_t *new;
-
- if (oldsz != sizeof (cmd_page_0_t)) {
- fmd_hdl_abort(hdl, "size of state doesn't match size of "
- "version 0 state (%u bytes).\n", sizeof (cmd_page_0_t));
- }
-
- new = fmd_hdl_zalloc(hdl, sizeof (cmd_page_t), FMD_SLEEP);
- new->page_header = old->page0_header;
- new->page_version = CMD_PAGE_VERSION;
- new->page_asru = old->page0_asru;
-
- fmd_hdl_free(hdl, old, oldsz);
- return (new);
-}
-
-static cmd_page_t *
-page_wrapv1(fmd_hdl_t *hdl, cmd_page_pers_t *pers, size_t psz)
-{
- cmd_page_t *page;
-
- if (psz != sizeof (cmd_page_pers_t)) {
- fmd_hdl_abort(hdl, "size of state doesn't match size of "
- "version 1 state (%u bytes).\n", sizeof (cmd_page_pers_t));
- }
-
- page = fmd_hdl_zalloc(hdl, sizeof (cmd_page_t), FMD_SLEEP);
- bcopy(pers, page, sizeof (cmd_page_pers_t));
- fmd_hdl_free(hdl, pers, psz);
- return (page);
-}
-
-void *
-cmd_page_restore(fmd_hdl_t *hdl, fmd_case_t *cp, cmd_case_ptr_t *ptr)
-{
- cmd_page_t *page;
-
- for (page = cmd_list_next(&cmd.cmd_pages); page != NULL;
- page = cmd_list_next(page)) {
- if (strcmp(page->page_bufname, ptr->ptr_name) == 0)
- break;
- }
-
- if (page == NULL) {
- int migrated = 0;
- size_t pagesz;
-
- fmd_hdl_debug(hdl, "restoring page from %s\n", ptr->ptr_name);
-
- if ((pagesz = fmd_buf_size(hdl, NULL, ptr->ptr_name)) == 0) {
- if (fmd_case_solved(hdl, cp) ||
- fmd_case_closed(hdl, cp)) {
- fmd_hdl_debug(hdl, "page %s from case %s not "
- "found. Case is already solved or closed\n",
- ptr->ptr_name, fmd_case_uuid(hdl, cp));
- return (NULL);
- } else {
- fmd_hdl_abort(hdl, "page referenced by case %s "
- "does not exist in saved state\n",
- fmd_case_uuid(hdl, cp));
- }
- } else if (pagesz > CMD_PAGE_MAXSIZE ||
- pagesz < CMD_PAGE_MINSIZE) {
- fmd_hdl_abort(hdl, "page buffer referenced by case %s "
- "is out of bounds (is %u bytes, max %u, min %u)\n",
- fmd_case_uuid(hdl, cp), pagesz,
- CMD_PAGE_MAXSIZE, CMD_PAGE_MINSIZE);
- }
-
- if ((page = cmd_buf_read(hdl, NULL, ptr->ptr_name,
- pagesz)) == NULL) {
- fmd_hdl_abort(hdl, "failed to read page buf %s",
- ptr->ptr_name);
- }
-
- fmd_hdl_debug(hdl, "found %d in version field\n",
- page->page_version);
-
- if (CMD_PAGE_VERSIONED(page)) {
- switch (page->page_version) {
- case CMD_PAGE_VERSION_1:
- page = page_wrapv1(hdl, (cmd_page_pers_t *)page,
- pagesz);
- break;
- default:
- fmd_hdl_abort(hdl, "unknown version (found %d) "
- "for page state referenced by case %s.\n",
- page->page_version, fmd_case_uuid(hdl, cp));
- break;
- }
- } else {
- page = page_v0tov1(hdl, (cmd_page_0_t *)page, pagesz);
- migrated = 1;
- }
-
- if (migrated) {
-/* CMD_STAT_BUMP(page_migrat); */
- cmd_page_dirty(hdl, page);
- }
-
- cmd_fmri_restore(hdl, &page->page_asru);
-
- cmd_list_append(&cmd.cmd_pages, page);
- }
-
- switch (ptr->ptr_subtype) {
- case BUG_PTR_PAGE_CASE:
- fmd_hdl_debug(hdl, "recovering from out of order page ptr\n");
- cmd_case_redirect(hdl, cp, CMD_PTR_PAGE_CASE);
- /*FALLTHROUGH*/
- case CMD_PTR_PAGE_CASE:
- cmd_case_restore(hdl, &page->page_case, cp,
- cmd_page_serdnm_create(hdl, "page", page->page_physbase));
- break;
-
-#ifdef sun4u
- case CMD_PTR_DP_PAGE_DEFER:
- page->page_case.cc_cp = cp;
- cmd_dp_page_restore(hdl, page);
- break;
-#endif
- default:
- fmd_hdl_abort(hdl, "invalid %s subtype %d\n",
- ptr->ptr_name, ptr->ptr_subtype);
- }
-
- return (page);
-}
-
-
-/*ARGSUSED*/
-void
-cmd_page_validate(fmd_hdl_t *hdl)
-{
- cmd_page_t *page, *next;
-
- for (page = cmd_list_next(&cmd.cmd_pages); page != NULL; page = next) {
- next = cmd_list_next(page);
-
- if (fmd_nvl_fmri_unusable(hdl, page->page_asru_nvl)) {
-#ifdef sun4u
- if (cmd_dp_page_isdeferred(hdl, page) &&
- fmd_nvl_fmri_present(hdl, page->page_asru_nvl))
- continue;
-#endif
- cmd_page_destroy(hdl, page);
- }
- }
-}
-
-void
-cmd_page_dirty(fmd_hdl_t *hdl, cmd_page_t *page)
-{
- if (fmd_buf_size(hdl, NULL, page->page_bufname) !=
- sizeof (cmd_page_pers_t))
- fmd_buf_destroy(hdl, NULL, page->page_bufname);
-
- /* No need to rewrite the FMRIs in the page - they don't change */
- fmd_buf_write(hdl, NULL, page->page_bufname, &page->page_pers,
- sizeof (cmd_page_pers_t));
-}
-
-void
-cmd_page_fini(fmd_hdl_t *hdl)
-{
- cmd_page_t *page;
-
- while ((page = cmd_list_next(&cmd.cmd_pages)) != NULL)
- cmd_page_free(hdl, page, FMD_B_FALSE);
-}
diff --git a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_page.h b/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_page.h
deleted file mode 100644
index f58787767c..0000000000
--- a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_page.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2006 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _CMD_PAGE_H
-#define _CMD_PAGE_H
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-/*
- * Routines for the creation of page retirement faults and for the management of
- * page-related state.
- */
-
-#include <cmd_state.h>
-#include <cmd_fmri.h>
-
-#include <fm/fmd_api.h>
-#include <sys/types.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define PAGE_MKVERSION(version) ((version) << 4 | 1)
-
-#define CMD_PAGE_VERSION_1 PAGE_MKVERSION(1) /* 17 */
-#define CMD_PAGE_VERSION CMD_PAGE_VERSION_1
-
-#define CMD_PAGE_VERSIONED(page) ((page)->page_version & 1)
-
-typedef struct cmd_page_0 {
- cmd_header_t page0_header; /* Nodetype must be CMD_NT_PAGE */
- fmd_case_t *page0_case; /* Open ret. case against this page */
- cmd_fmri_t page0_asru; /* ASRU for this page */
- uint64_t page0_physbase; /* Base phys addr for this page */
-} cmd_page_0_t;
-
-typedef struct cmd_page_pers {
- cmd_header_t pagep_header; /* Nodetype must be CMD_NT_PAGE */
- uint_t pagep_version;
- cmd_fmri_t pagep_asru; /* ASRU for this DIMM */
- uint64_t pagep_physbase; /* base phys addr for page */
- uint_t pagep_flags; /* CMD_MEM_F_* */
-} cmd_page_pers_t;
-
-typedef struct cmd_page {
- cmd_page_pers_t page_pers;
- cmd_case_t page_case; /* Open CE case against this page */
-} cmd_page_t;
-
-#define CMD_PAGE_MAXSIZE \
- MAX(sizeof (cmd_page_0_t), sizeof (cmd_page_pers_t))
-#define CMD_PAGE_MINSIZE \
- MIN(sizeof (cmd_page_0_t), sizeof (cmd_page_pers_t))
-
-#define page_header page_pers.pagep_header
-#define page_nodetype page_pers.pagep_header.hdr_nodetype
-#define page_bufname page_pers.pagep_header.hdr_bufname
-#define page_version page_pers.pagep_version
-#define page_asru page_pers.pagep_asru
-#define page_asru_nvl page_pers.pagep_asru.fmri_nvl
-#define page_flags page_pers.pagep_flags
-#define page_physbase page_pers.pagep_physbase
-#define page_list page_header.hdr_list
-
-/*
- * Page retirement
- *
- * When a page is to be retired, these routines are called to generate and
- * manage a fault.memory.page against the page.
- */
-extern void cmd_page_fault(fmd_hdl_t *, nvlist_t *, nvlist_t *, fmd_event_t *,
- uint64_t);
-extern void cmd_page_close(fmd_hdl_t *, void *);
-
-extern cmd_page_t *cmd_page_create(fmd_hdl_t *, nvlist_t *, uint64_t);
-extern cmd_page_t *cmd_page_lookup(uint64_t);
-
-extern void cmd_page_dirty(fmd_hdl_t *, cmd_page_t *);
-extern void *cmd_page_restore(fmd_hdl_t *, fmd_case_t *, cmd_case_ptr_t *);
-extern void cmd_page_validate(fmd_hdl_t *);
-extern void cmd_page_destroy(fmd_hdl_t *, cmd_page_t *);
-extern void cmd_page_fini(fmd_hdl_t *);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _CMD_PAGE_H */
diff --git a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_pageerr.c b/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_pageerr.c
deleted file mode 100644
index 909e098101..0000000000
--- a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_pageerr.c
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * Fault-handling routines for page retirement faults
- */
-
-#include <cmd_page.h>
-#include <cmd.h>
-#include <cmd_mem.h>
-
-#include <errno.h>
-#include <string.h>
-#include <fm/fmd_api.h>
-#include <sys/fm/protocol.h>
-#ifdef sun4v
-#include <cmd_hc_sun4v.h>
-#include <cmd_dimm.h>
-#endif
-
-void
-cmd_page_fault(fmd_hdl_t *hdl, nvlist_t *modasru, nvlist_t *modfru,
- fmd_event_t *ep, uint64_t afar)
-{
- cmd_page_t *page = NULL;
- const char *uuid;
- nvlist_t *flt;
-#ifdef sun4v
- nvlist_t *nvlfru;
-#endif
-
- page = cmd_page_lookup(afar);
- if (page != NULL) {
- /*
- * If the page has already been retired then *page
- * would have been freed and recreated. Thus the
- * flag would be 0x0 - check to see if the page
- * is unusable (retired).
- */
- if (page->page_flags & CMD_MEM_F_FAULTING ||
- fmd_nvl_fmri_unusable(hdl, page->page_asru_nvl)) {
- /* Page already faulted, don't fault again. */
- page->page_flags |= CMD_MEM_F_FAULTING;
- return;
- }
- } else {
- page = cmd_page_create(hdl, modasru, afar);
- }
-
- page->page_flags |= CMD_MEM_F_FAULTING;
- if (page->page_case.cc_cp == NULL)
- page->page_case.cc_cp = cmd_case_create(hdl,
- &page->page_header, CMD_PTR_PAGE_CASE, &uuid);
-
-#ifdef sun4v
- nvlfru = cmd_mem2hc(hdl, modfru);
- flt = cmd_nvl_create_fault(hdl, "fault.memory.page", 100,
- page->page_asru_nvl, nvlfru, NULL);
- flt = cmd_fault_add_location(hdl, flt, cmd_fmri_get_unum(modfru));
- nvlist_free(nvlfru);
-#else /* sun4v */
- flt = cmd_nvl_create_fault(hdl, "fault.memory.page", 100,
- page->page_asru_nvl, modfru, NULL);
-#endif /* sun4v */
-
- if (nvlist_add_boolean_value(flt, FM_SUSPECT_MESSAGE, B_FALSE) != 0)
- fmd_hdl_abort(hdl, "failed to add no-message member to fault");
-
- fmd_case_add_ereport(hdl, page->page_case.cc_cp, ep);
- fmd_case_add_suspect(hdl, page->page_case.cc_cp, flt);
- fmd_case_solve(hdl, page->page_case.cc_cp);
-}
-
-void
-cmd_page_close(fmd_hdl_t *hdl, void *arg)
-{
- cmd_page_destroy(hdl, arg);
-}
diff --git a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_state.c b/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_state.c
deleted file mode 100644
index 54a0cfb210..0000000000
--- a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_state.c
+++ /dev/null
@@ -1,259 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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.
- */
-
-
-/*
- * Case management and saved state restoration
- */
-
-#include <cmd_state.h>
-#include <cmd_cpu.h>
-#include <cmd_mem.h>
-#include <cmd_page.h>
-#include <cmd_dimm.h>
-#ifdef sun4u
-#include <cmd_dp.h>
-#include <cmd_dp_page.h>
-#include <cmd_Lxcache.h>
-#endif
-#include <cmd_bank.h>
-#include <cmd.h>
-#ifdef sun4v
-#include <cmd_branch.h>
-#endif
-
-#include <string.h>
-#include <fm/fmd_api.h>
-
-#ifdef sun4u
-#include <cmd_opl.h>
-#endif
-
-/* Must be in sync with cmd_ptrsubtype_t */
-static cmd_case_closer_f *const cmd_case_closers[] = {
- NULL,
- cmd_cpuerr_close, /* CMD_PTR_CPU_ICACHE */
- cmd_cpuerr_close, /* CMD_PTR_CPU_DCACHE */
- cmd_cpuerr_close, /* CMD_PTR_CPU_PCACHE */
- cmd_cpuerr_close, /* CMD_PTR_CPU_ITLB */
- cmd_cpuerr_close, /* CMD_PTR_CPU_DTLB */
- cmd_cpuerr_close, /* CMD_PTR_CPU_L2DATA */
- cmd_cpuerr_close, /* CMD_PTR_CPU_L2DATA_UERETRY */
- cmd_cpuerr_close, /* CMD_PTR_CPU_L2TAG */
- cmd_cpuerr_close, /* CMD_PTR_CPU_L3DATA */
- cmd_cpuerr_close, /* CMD_PTR_CPU_L3DATA_UERETRY */
- cmd_cpuerr_close, /* CMD_PTR_CPU_L3TAG */
- cmd_dimm_close, /* CMD_PTR_DIMM_CASE */
- cmd_bank_close, /* CMD_PTR_BANK_CASE */
- cmd_page_close, /* CMD_PTR_PAGE_CASE */
- cmd_cpuerr_close, /* CMD_PTR_CPU_FPU */
- NULL, /* CMD_PTR_CPU_XR_RETRY */
- cmd_cpuerr_close, /* CMD_PTR_CPU_IREG */
- cmd_cpuerr_close, /* CMD_PTR_CPU_FREG */
- cmd_cpuerr_close, /* CMD_PTR_CPU_MAU */
- cmd_cpuerr_close, /* CMD_PTR_CPU_L2CTL */
-#ifdef sun4u
- cmd_dp_close, /* CMD_PTR_DP_CASE */
-#else
- NULL, /* CMD_PTR_DP_CASE */
-#endif
- NULL, /* CMD_PTR_DP_PAGE_DEFER */
- cmd_cpuerr_close, /* CMD_PTR_CPU_INV_SFSR */
- cmd_cpuerr_close, /* CMD_PTR_CPU_UE_DET_CPU */
- cmd_cpuerr_close, /* CMD_PTR_CPU_UE_DET_IO */
- cmd_cpuerr_close, /* CMD_PTR_CPU_MTLB */
- cmd_cpuerr_close, /* CMD_PTR_CPU_TLBP */
- cmd_cpuerr_close, /* CMD_PTR_CPU_UGESR_INV_URG */
- cmd_cpuerr_close, /* CMD_PTR_CPU_UGESR_CRE */
- cmd_cpuerr_close, /* CMD_PTR_CPU_UGESR_TSB_CTX */
- cmd_cpuerr_close, /* CMD_PTR_CPU_UGESR_TSBP */
- cmd_cpuerr_close, /* CMD_PTR_CPU_UGESR_PSTATE */
- cmd_cpuerr_close, /* CMD_PTR_CPU_UGESR_TSTATE */
- cmd_cpuerr_close, /* CMD_PTR_CPU_UGESR_IUG_F */
- cmd_cpuerr_close, /* CMD_PTR_CPU_UGESR_IUG_R */
- cmd_cpuerr_close, /* CMD_PTR_CPU_UGESR_SDC */
- cmd_cpuerr_close, /* CMD_PTR_CPU_UGESR_WDT */
- cmd_cpuerr_close, /* CMD_PTR_CPU_UGESR_DTLB */
- cmd_cpuerr_close, /* CMD_PTR_CPU_UGESR_ITLB */
- cmd_cpuerr_close, /* CMD_PTR_CPU_UGESR_CORE_ERR */
- cmd_cpuerr_close, /* CMD_PTR_CPU_UGESR_DAE */
- cmd_cpuerr_close, /* CMD_PTR_CPU_UGESR_IAE */
- cmd_cpuerr_close, /* CMD_PTR_CPU_UGESR_UGE */
- cmd_cpuerr_close, /* CMD_PTR_CPU_MISC_REGS */
- cmd_cpuerr_close, /* CMD_PTR_CPU_LFU */
-#ifdef sun4v
- cmd_branch_close /* CMD_PTR_BRANCH_CASE */
-#else
- NULL,
- cmd_Lxcache_close, /* CMD_PTR_CACHE_CASE */
-
-#endif
-};
-
-fmd_case_t *
-cmd_case_create(fmd_hdl_t *hdl, cmd_header_t *hdr, cmd_ptrsubtype_t ptrsubtype,
- const char **uuidp)
-{
- cmd_case_ptr_t ptr;
- cmd_case_closer_t *cl;
- fmd_case_t *cp;
-
- cl = fmd_hdl_alloc(hdl, sizeof (cmd_case_closer_t), FMD_SLEEP);
- cl->cl_func = cmd_case_closers[ptrsubtype];
- cl->cl_arg = hdr;
-
- cp = fmd_case_open(hdl, cl);
-
- ptr.ptr_type = hdr->hdr_nodetype;
- ptr.ptr_subtype = ptrsubtype;
- (void) strcpy(ptr.ptr_name, hdr->hdr_bufname);
-
- *uuidp = fmd_case_uuid(hdl, cp);
- fmd_buf_write(hdl, cp, *uuidp, &ptr, sizeof (cmd_case_ptr_t));
-
- return (cp);
-}
-
-void
-cmd_case_redirect(fmd_hdl_t *hdl, fmd_case_t *cp, cmd_ptrsubtype_t newsubtype)
-{
- const char *uuid = fmd_case_uuid(hdl, cp);
- cmd_case_ptr_t ptr;
-
- fmd_buf_read(hdl, cp, uuid, &ptr, sizeof (cmd_case_ptr_t));
- fmd_hdl_debug(hdl, "redirecting case %s from %d to %d\n", uuid,
- ptr.ptr_subtype, newsubtype);
- ptr.ptr_subtype = newsubtype;
- fmd_buf_write(hdl, cp, uuid, &ptr, sizeof (cmd_case_ptr_t));
-}
-
-void
-cmd_case_fini(fmd_hdl_t *hdl, fmd_case_t *cp, int close)
-{
- const char *uuid = fmd_case_uuid(hdl, cp);
- cmd_case_closer_t *cl = fmd_case_getspecific(hdl, cp);
-
- if (close) {
- fmd_hdl_debug(hdl, "closing case %s\n", uuid);
-
- if (fmd_serd_exists(hdl, uuid))
- fmd_serd_destroy(hdl, uuid);
-
- if (fmd_buf_size(hdl, cp, uuid) != 0)
- fmd_buf_destroy(hdl, cp, uuid);
-
- fmd_case_setspecific(hdl, cp, NULL);
- fmd_case_close(hdl, cp);
- }
-
- if (cl != NULL)
- fmd_hdl_free(hdl, cl, sizeof (cmd_case_closer_t));
-}
-
-/* Must be in sync with cmd_nodetype_t */
-static cmd_case_restorer_f *const cmd_case_restorers[] = {
- NULL,
- cmd_cpu_restore, /* CMD_NT_CPU */
- cmd_dimm_restore, /* CMD_NT_DIMM */
- cmd_bank_restore, /* CMD_NT_BANK */
- cmd_page_restore, /* CMD_NT_PAGE */
-#ifdef sun4u
- cmd_dp_restore, /* CMD_NT_DP */
- cmd_Lxcache_restore, /* CMD_NT_CACHE */
-#endif
-#ifdef sun4v
- cmd_branch_restore /* CMD_NT_BRANCH */
-#endif
-};
-
-int
-cmd_state_restore(fmd_hdl_t *hdl)
-{
- fmd_case_t *cp = NULL;
-
- while ((cp = fmd_case_next(hdl, cp)) != NULL) {
- const char *uuid = fmd_case_uuid(hdl, cp);
- cmd_case_closer_t *cl;
- cmd_case_ptr_t ptr;
- void *thing;
- size_t sz;
-
- if ((sz = fmd_buf_size(hdl, cp, uuid)) == 0)
- continue;
- else if (sz != sizeof (cmd_case_ptr_t))
- return (cmd_set_errno(EINVAL));
-
- fmd_buf_read(hdl, cp, fmd_case_uuid(hdl, cp), &ptr,
- sizeof (cmd_case_ptr_t));
-
- if (ptr.ptr_type == 0 || ptr.ptr_type >=
- sizeof (cmd_case_restorers) /
- sizeof (cmd_case_restorer_f *))
- return (cmd_set_errno(EINVAL));
-
- if ((thing = cmd_case_restorers[ptr.ptr_type](hdl,
- cp, &ptr)) == NULL) {
- fmd_hdl_debug(hdl, "Unable to restore case %s\n", uuid);
- continue;
- }
-
- cl = fmd_hdl_alloc(hdl, sizeof (cmd_case_closer_t), FMD_SLEEP);
- cl->cl_func = cmd_case_closers[ptr.ptr_subtype];
- cl->cl_arg = thing;
- fmd_case_setspecific(hdl, cp, cl);
- }
-
- cmd_trw_restore(hdl);
-
- cmd_cpu_validate(hdl);
- cmd_bank_validate(hdl);
- cmd_dimm_validate(hdl);
-#ifdef sun4u
- /*
- * cmd_dp_page_validate() must be done before cmd_dp_validate()
- * and cmd_page_validate()
- */
- cmd_dp_page_validate(hdl);
- cmd_dp_validate(hdl);
-#endif
- cmd_page_validate(hdl);
-#ifdef sun4v
- cmd_branch_validate(hdl);
-#endif
-
- return (0);
-}
-
-void
-cmd_case_restore(fmd_hdl_t *hdl, cmd_case_t *cc, fmd_case_t *cp, char *serdnm)
-{
- if (!fmd_serd_exists(hdl, serdnm)) {
- fmd_hdl_strfree(hdl, serdnm);
- serdnm = NULL;
- }
-
- cc->cc_cp = cp;
- cc->cc_serdnm = serdnm;
-}
diff --git a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_state.h b/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_state.h
deleted file mode 100644
index 3916b018b0..0000000000
--- a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_state.h
+++ /dev/null
@@ -1,227 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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.
- */
-
-#ifndef _CMD_STATE_H
-#define _CMD_STATE_H
-
-/*
- * Case management and saved state restoration
- */
-
-#include <cmd_list.h>
-
-#include <fm/fmd_api.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Our maximum persistent buffer name length, used to allocate fixed-size
- * arrays for name storage.
- */
-#define CMD_BUFNMLEN 48
-
-/* cmd_evdisp_t, cmd_evdisp_stat_t, and cmd_evdisp_names must be in sync */
-typedef enum cmd_evdisp {
- CMD_EVD_OK,
- CMD_EVD_BAD,
- CMD_EVD_UNUSED,
- CMD_EVD_REDUND
-} cmd_evdisp_t;
-
-/*
- * Each handled ereport type has four statistics, designed to indicate the
- * eventual disposition of the ereport.
- */
-typedef struct cmd_evdisp_stat {
- fmd_stat_t evs_ok; /* # of erpts processed successfully */
- fmd_stat_t evs_bad; /* # of malformed ereports */
- fmd_stat_t evs_unused; /* # of erpts unusable or not needed */
- fmd_stat_t evs_redund; /* # of erpts already explained */
-} cmd_evdisp_stat_t;
-
-/* Must be in sync with cmd_case_restorers */
-typedef enum cmd_nodetype {
- CMD_NT_CPU = 1,
- CMD_NT_DIMM,
- CMD_NT_BANK,
- CMD_NT_PAGE,
-#ifdef sun4u
- CMD_NT_DP,
- CMD_NT_LxCACHE
-#endif
-#ifdef sun4v
- CMD_NT_BRANCH
-#endif
-} cmd_nodetype_t;
-
-/*
- * Must be in sync with cmd_case_closers. Additional types must be
- * appended to this enum otherwise interpretation of existing logs
- * and checkpoints will be confused.
- */
-typedef enum cmd_ptrsubtype {
- CMD_PTR_CPU_ICACHE = 1,
- CMD_PTR_CPU_DCACHE,
- CMD_PTR_CPU_PCACHE,
- CMD_PTR_CPU_ITLB,
- CMD_PTR_CPU_DTLB,
- CMD_PTR_CPU_L2DATA,
- CMD_PTR_CPU_L2DATA_UERETRY, /* no longer used */
- CMD_PTR_CPU_L2TAG,
- CMD_PTR_CPU_L3DATA,
- CMD_PTR_CPU_L3DATA_UERETRY, /* no longer used */
- CMD_PTR_CPU_L3TAG,
- CMD_PTR_DIMM_CASE,
- CMD_PTR_BANK_CASE,
- CMD_PTR_PAGE_CASE,
- CMD_PTR_CPU_FPU,
- CMD_PTR_CPU_XR_RETRY,
- CMD_PTR_CPU_IREG,
- CMD_PTR_CPU_FREG,
- CMD_PTR_CPU_MAU,
- CMD_PTR_CPU_L2CTL,
- CMD_PTR_DP_CASE,
- CMD_PTR_DP_PAGE_DEFER,
- CMD_PTR_CPU_INV_SFSR,
- CMD_PTR_CPU_UE_DET_CPU,
- CMD_PTR_CPU_UE_DET_IO,
- CMD_PTR_CPU_MTLB,
- CMD_PTR_CPU_TLBP,
- CMD_PTR_CPU_UGESR_INV_URG,
- CMD_PTR_CPU_UGESR_CRE,
- CMD_PTR_CPU_UGESR_TSB_CTX,
- CMD_PTR_CPU_UGESR_TSBP,
- CMD_PTR_CPU_UGESR_PSTATE,
- CMD_PTR_CPU_UGESR_TSTATE,
- CMD_PTR_CPU_UGESR_IUG_F,
- CMD_PTR_CPU_UGESR_IUG_R,
- CMD_PTR_CPU_UGESR_SDC,
- CMD_PTR_CPU_UGESR_WDT,
- CMD_PTR_CPU_UGESR_DTLB,
- CMD_PTR_CPU_UGESR_ITLB,
- CMD_PTR_CPU_UGESR_CORE_ERR,
- CMD_PTR_CPU_UGESR_DAE,
- CMD_PTR_CPU_UGESR_IAE,
- CMD_PTR_CPU_UGESR_UGE,
- CMD_PTR_CPU_MISC_REGS,
- CMD_PTR_CPU_LFU,
- CMD_PTR_BRANCH_CASE,
- CMD_PTR_LxCACHE_CASE
-} cmd_ptrsubtype_t;
-
-/*
- * A change was made to the above enum that violated the ordering requirement
- * described in the comment. As such, there exist development machines in
- * the wild that have pre-violation pointer buffers. Attempts to run the DE
- * on those machines will cause the state-restoration code to fail, as it
- * won't know what to do with the old pointer types. Unfortunately, the old
- * and new values overlapped for the CPU pointers, so there's not much we
- * can do there. The memory pointers, on the other hand, changed from 6-8 to
- * 12-14, thus allowing us to make the dimm, bank, and page restoration code
- * check for both values.
- *
- * This should go away soon into the next release.
- */
-typedef enum cmd_BUG_ptrsubtype {
- BUG_PTR_DIMM_CASE = 6,
- BUG_PTR_BANK_CASE = 7,
- BUG_PTR_PAGE_CASE = 8
-} cmd_BUG_ptrsubtype_t;
-
-#define CMD_TIMERTYPE_CPU_UEC_FLUSH 1
-#define CMD_TIMERTYPE_CPU_XR_WAITER 2
-#define CMD_TIMERTYPE_MEM 3
-#define CMD_TIMERTYPE_DP 4
-#define CMD_TIMERTYPE_ANONYMOUS_TAG_ERROR 5
-
-#define CMD_TIMERTYPE_ISCPU(timer) ((timer) != CMD_TIMERTYPE_MEM && \
- (timer) != CMD_TIMERTYPE_DP)
-
-/*
- * There are three types of general-purpose buffers, used to track CPUs, DIMMs,
- * and pages. Created on-demand as ereports arrive, one buffer is created for
- * each thing tracked. The general-purpose buffers are used to track common
- * state, and are used to support case-specific buffers. Each open case has
- * a case-specific pointer buffer, used to aid in the rediscovery of the
- * associated general-purpose buffer. When restoration begins, we iterate
- * through each of the open cases, restoring the case-specific pointer buffers
- * for each. The pointer buffers are then used to restore the general-purpose
- * buffers.
- */
-
-typedef struct cmd_case_ptr {
- cmd_nodetype_t ptr_type; /* The type of associated G.P. buffer */
- cmd_ptrsubtype_t ptr_subtype; /* The case within the G.P. buffer */
- char ptr_name[CMD_BUFNMLEN]; /* G.P. buffer name */
-} cmd_case_ptr_t;
-
-/*
- * All general-purpose buffers begin with a common header. This header contains
- * identification information used in the construction of new cases.
- *
- * Note that versioned structs (currently cmd_cpu_t) depend upon the size of
- * this struct remaining fixed.
- */
-typedef struct cmd_header {
- cmd_list_t hdr_list; /* List of G.P. structs of this type */
- cmd_nodetype_t hdr_nodetype; /* Type of this G.P. struct */
- char hdr_bufname[CMD_BUFNMLEN]; /* G.P. buffer name */
-} cmd_header_t;
-
-/*
- * Per-case-subtype case closing routines. Stored in per-case state when the
- * case is generated, and regenerated from saved state upon restore.
- */
-typedef void cmd_case_closer_f(fmd_hdl_t *, void *);
-typedef void *cmd_case_restorer_f(fmd_hdl_t *, fmd_case_t *, cmd_case_ptr_t *);
-
-typedef struct cmd_case_closer {
- cmd_case_closer_f *cl_func;
- void *cl_arg;
-} cmd_case_closer_t;
-
-typedef struct cmd_case {
- fmd_case_t *cc_cp;
- char *cc_serdnm;
-} cmd_case_t;
-
-/*
- * Utility functions which ease the management of cases.
- */
-extern fmd_case_t *cmd_case_create(fmd_hdl_t *, cmd_header_t *,
- cmd_ptrsubtype_t, const char **);
-extern void cmd_case_redirect(fmd_hdl_t *, fmd_case_t *, cmd_ptrsubtype_t);
-extern void cmd_case_fini(fmd_hdl_t *, fmd_case_t *, int);
-extern void cmd_case_restore(fmd_hdl_t *, cmd_case_t *, fmd_case_t *, char *);
-
-extern int cmd_state_restore(fmd_hdl_t *);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _CMD_STATE_H */
diff --git a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_util.c b/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_util.c
deleted file mode 100644
index cadcd7e414..0000000000
--- a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_util.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-
-#include <cmd.h>
-
-#include <errno.h>
-#include <stdarg.h>
-#include <string.h>
-#include <fm/fmd_api.h>
-#include <sys/fm/protocol.h>
-
-int
-cmd_set_errno(int err)
-{
- errno = err;
- return (-1);
-}
-
-void *
-cmd_buf_read(fmd_hdl_t *hdl, fmd_case_t *cp, const char *bufname, size_t bufsz)
-{
- void *buf;
- size_t sz;
-
- if ((sz = fmd_buf_size(hdl, cp, bufname)) == 0) {
- (void) cmd_set_errno(ENOENT);
- return (NULL);
- } else if (sz != bufsz) {
- (void) cmd_set_errno(EINVAL);
- return (NULL);
- }
-
- buf = fmd_hdl_alloc(hdl, bufsz, FMD_SLEEP);
- fmd_buf_read(hdl, cp, bufname, buf, bufsz);
-
- return (buf);
-}
-
-void
-cmd_vbufname(char *buf, size_t bufsz, const char *fmt, va_list ap)
-{
- char *c;
-
- (void) vsnprintf(buf, bufsz, fmt, ap);
-
- for (c = buf; *c != '\0'; c++) {
- if (*c == ' ' || *c == '/' || *c == ':')
- *c = '_';
- }
-}
-
-void
-cmd_bufname(char *buf, size_t bufsz, const char *fmt, ...)
-{
- va_list ap;
-
- va_start(ap, fmt);
- cmd_vbufname(buf, bufsz, fmt, ap);
- va_end(ap);
-}
diff --git a/usr/src/cmd/fm/modules/sun4u/Makefile b/usr/src/cmd/fm/modules/sun4u/Makefile
deleted file mode 100644
index 4457208b03..0000000000
--- a/usr/src/cmd/fm/modules/sun4u/Makefile
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-SUBDIRS = cpumem-diagnosis datapath-retire USII-io-diagnosis
-
-include ../../Makefile.subdirs
diff --git a/usr/src/cmd/fm/modules/sun4u/USII-io-diagnosis/Makefile b/usr/src/cmd/fm/modules/sun4u/USII-io-diagnosis/Makefile
deleted file mode 100644
index 5e9920b8b0..0000000000
--- a/usr/src/cmd/fm/modules/sun4u/USII-io-diagnosis/Makefile
+++ /dev/null
@@ -1,47 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2005 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-MODULE = USII-io-diagnosis
-CLASS = arch
-ARCH = sun4u
-SRCS = \
- iod_main.c
-
-include ../../Makefile.plugin
-
-IOD_VERSION = "1.0"
-
-INCDIRS = \
- . \
- $(SRC)/uts/sun4 \
- $(SRC)/uts/sun4u \
- $(SRC)/uts/sparc/v9
-
-CPPFLAGS += $(INCDIRS:%=-I%) -DIOD_VERSION='$(IOD_VERSION)'
-
-LDFLAGS += -lkstat
diff --git a/usr/src/cmd/fm/modules/sun4u/USII-io-diagnosis/USII-io-diagnosis.conf b/usr/src/cmd/fm/modules/sun4u/USII-io-diagnosis/USII-io-diagnosis.conf
deleted file mode 100644
index a78aaf6424..0000000000
--- a/usr/src/cmd/fm/modules/sun4u/USII-io-diagnosis/USII-io-diagnosis.conf
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2004 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-dictionary SUN4U
diff --git a/usr/src/cmd/fm/modules/sun4u/USII-io-diagnosis/iod_main.c b/usr/src/cmd/fm/modules/sun4u/USII-io-diagnosis/iod_main.c
deleted file mode 100644
index e1cf4b28ce..0000000000
--- a/usr/src/cmd/fm/modules/sun4u/USII-io-diagnosis/iod_main.c
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2005 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include <stdarg.h>
-#include <sys/param.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-#include <strings.h>
-#include <kstat.h>
-#include <fm/fmd_api.h>
-#include <sys/fm/protocol.h>
-#include <sys/async.h>
-
-#define IOD_STAT_BUMP(name) iod.iod_stats->name.fmds_value.ui64++
-
-/*
- * USII-io-diagnosis:
- *
- * This diagnosis engine consumes the Psycho based IO UEs and CEs
- * which are generated due to DMA Reads or Writes.
- *
- * When a UE is received it will generate the appropriate fault
- * (defect.ultraSPARC-II.memory.nodiag). This is because we do not plan
- * to currently add greater diagnosis capabilities for USII systems.
- *
- * When a CE is received we allow the legacy in kernel SERD do it's job
- * and we just bump a counter here. The legacy SERD algorithm will print
- * out a message and retire pages when the SERD threshold is reached.
- *
- */
-static void iod_recv(fmd_hdl_t *, fmd_event_t *, nvlist_t *, const char *);
-
-typedef struct iod_stat {
- fmd_stat_t ue; /* # of UEs received */
- fmd_stat_t ce; /* # of CEs received */
-} iod_stat_t;
-
-typedef struct iod {
- iod_stat_t *iod_stats; /* Module statistics */
-} iod_t;
-
-static const fmd_hdl_ops_t fmd_ops = {
- iod_recv, /* fmdo_recv */
- NULL, /* fmdo_timeout */
- NULL, /* fmdo_close */
- NULL, /* fmdo_stats */
- NULL /* fmdo_gc */
-};
-
-static const fmd_hdl_info_t fmd_info = {
- "UltraSPARC-II I/O Diagnosis", IOD_VERSION, &fmd_ops, NULL
-};
-
-static const iod_stat_t iod_stat = {
- { "ue", FMD_TYPE_UINT64, "number of received IO UEs" },
- { "ce", FMD_TYPE_UINT64, "number of received IO CEs" }
-};
-
-iod_t iod;
-
-/*ARGSUSED*/
-static void
-iod_recv(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl, const char *class)
-{
- fmd_case_t *cp;
- nvlist_t *fault;
- char flt[] = "defect.ultraSPARC-II.memory.nodiag";
-
- if (fmd_nvl_class_match(hdl, nvl, "*ue")) {
- IOD_STAT_BUMP(ue);
- cp = fmd_case_open(hdl, NULL);
- fault = fmd_nvl_create_fault(hdl, flt, 100, NULL, NULL, NULL);
- fmd_case_add_ereport(hdl, cp, ep);
- fmd_case_add_suspect(hdl, cp, fault);
- fmd_case_solve(hdl, cp);
- } else if (fmd_nvl_class_match(hdl, nvl, "*ce")) {
- IOD_STAT_BUMP(ce);
- }
-}
-
-int
-iod_cpu_check_support(void)
-{
- kstat_named_t *kn;
- kstat_ctl_t *kc;
- kstat_t *ksp;
- int i;
-
- if ((kc = kstat_open()) == NULL)
- return (0);
-
- for (ksp = kc->kc_chain; ksp != NULL; ksp = ksp->ks_next) {
- if (strcmp(ksp->ks_module, "cpu_info") != 0)
- continue;
-
- if (kstat_read(kc, ksp, NULL) == -1) {
- (void) kstat_close(kc);
- return (0);
- }
-
- for (kn = ksp->ks_data, i = 0; i < ksp->ks_ndata; i++, kn++) {
- if (strcmp(kn->name, "implementation") != 0)
- continue;
-
- if (strncmp(KSTAT_NAMED_STR_PTR(kn), "UltraSPARC-II",
- sizeof ("UltraSPARC-II") - 1) == 0 &&
- strncmp(KSTAT_NAMED_STR_PTR(kn), "UltraSPARC-III",
- sizeof ("UltraSPARC-III") - 1) != 0) {
- (void) kstat_close(kc);
- return (1);
- }
- }
- }
-
- (void) kstat_close(kc);
- return (0);
-}
-
-void
-_fmd_init(fmd_hdl_t *hdl)
-{
- if (fmd_hdl_register(hdl, FMD_API_VERSION, &fmd_info) != 0)
- return; /* error in configuration file or fmd_info */
-
- if (!iod_cpu_check_support()) {
- fmd_hdl_debug(hdl, "no supported CPUs found");
- fmd_hdl_unregister(hdl);
- return;
- }
-
- fmd_hdl_subscribe(hdl, "ereport.io.psy.ecc.drue");
- fmd_hdl_subscribe(hdl, "ereport.io.psy.ecc.s-drue");
- fmd_hdl_subscribe(hdl, "ereport.io.psy.ecc.dwue");
- fmd_hdl_subscribe(hdl, "ereport.io.psy.ecc.s-dwue");
- fmd_hdl_subscribe(hdl, "ereport.io.psy.ecc.drce");
- fmd_hdl_subscribe(hdl, "ereport.io.psy.ecc.s-drce");
- fmd_hdl_subscribe(hdl, "ereport.io.psy.ecc.dwce");
- fmd_hdl_subscribe(hdl, "ereport.io.psy.ecc.s-dwce");
-
- bzero(&iod, sizeof (iod_t));
-
- iod.iod_stats = (iod_stat_t *)fmd_stat_create(hdl, FMD_STAT_NOALLOC,
- sizeof (iod_stat) / sizeof (fmd_stat_t), (fmd_stat_t *)&iod_stat);
-}
diff --git a/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/Makefile b/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/Makefile
deleted file mode 100644
index 8569d3628e..0000000000
--- a/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/Makefile
+++ /dev/null
@@ -1,48 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-ARCH = sun4u
-
-sun4u_SRCS = cmd_ecache.c \
- cmd_dp.c \
- cmd_dperr.c \
- cmd_dp_page.c \
- cmd_hc_opl.c \
- cmd_opl.c \
- cmd_oplerr.c \
- cmd_Lxcache.c \
- cmd_Lxcacheerr.c \
-
-INCDIRS = $(SRC)/uts/sun4u
-INCDIRS += $(SRC)/lib/fm/libfmd_adm/common
-INCDIRS += $(SRC)/lib/fm/libfmd_adm/sparcv9
-
-include ../../sun4/cpumem-diagnosis/Makefile.cpumem
-LDLIBS += -L$(ROOT)/usr/lib/fm -lfmd_adm
-LDFLAGS += -R/usr/lib/fm
-
-CERRWARN += -_gcc=-Wno-switch
-CERRWARN += $(CNOWARN_UNINIT)
-CERRWARN += -_gcc=-Wno-char-subscripts
diff --git a/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_Lxcache.c b/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_Lxcache.c
deleted file mode 100644
index b0e5d163fe..0000000000
--- a/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_Lxcache.c
+++ /dev/null
@@ -1,1511 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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.
- */
-
-
-/*
- * Support routines for managing per-Lxcache state.
- */
-
-#include <cmd_Lxcache.h>
-#include <cmd_mem.h>
-#include <cmd_cpu.h>
-#include <cmd.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <strings.h>
-#include <fm/fmd_api.h>
-#include <sys/fm/protocol.h>
-#include <sys/cheetahregs.h>
-#include <sys/mem_cache.h>
-
-#define PN_ECSTATE_NA 5
-/*
- * These values are our threshold values for SERDing CPU's based on the
- * the # of times we have retired a cache line for each category.
- */
-
-#define CMD_CPU_SERD_AGG_1 64
-#define CMD_CPU_SERD_AGG_2 64
-
-static int8_t cmd_lowest_way[16] = {
-/* 0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf */
- -1, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0};
-static int cmd_num_of_bits[16] = {
-/* 0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf */
- 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4};
-
-
-void
-cmd_Lxcache_write(fmd_hdl_t *hdl, cmd_Lxcache_t *Lxcache)
-{
- fmd_buf_write(hdl, NULL, Lxcache->Lxcache_bufname, Lxcache,
- sizeof (cmd_Lxcache_pers_t));
-}
-
-const char *
-cmd_type_to_str(cmd_ptrsubtype_t pstype)
-{
- switch (pstype) {
- case CMD_PTR_CPU_L2DATA:
- return ("l2data");
- break;
- case CMD_PTR_CPU_L3DATA:
- return ("l3data");
- break;
- case CMD_PTR_CPU_L2TAG:
- return ("l2tag");
- break;
- case CMD_PTR_CPU_L3TAG:
- return ("l3tag");
- break;
- default:
- return ("unknown");
- break;
- }
-}
-
-const char *
-cmd_flags_to_str(int flags)
-{
- switch (flags) {
- case CMD_LxCACHE_F_ACTIVE:
- return ("ACTIVE");
- case CMD_LxCACHE_F_FAULTING:
- return ("FAULTING");
- case CMD_LxCACHE_F_RETIRED:
- return ("RETIRED");
- case CMD_LxCACHE_F_UNRETIRED:
- return ("UNRETIRED");
- case CMD_LxCACHE_F_RERETIRED:
- return ("RERETIRED");
- default:
- return ("Unknown_flags");
- }
-}
-
-const char *
-cmd_reason_to_str(int reason)
-{
- switch (reason) {
- case CMD_LXSUSPECT_DATA:
- return ("SUSPECT_DATA");
- case CMD_LXSUSPECT_0_TAG:
- return ("SUSPECT_0_TAG");
- case CMD_LXSUSPECT_1_TAG:
- return ("SUSPECT_1_TAG");
- case CMD_LXCONVICTED:
- return ("CONVICTED");
- case CMD_LXFUNCTIONING:
- return ("FUNCTIONING");
- default:
- return ("Unknown_reason");
- }
-}
-
-static void
-cmd_pretty_print_Lxcache(fmd_hdl_t *hdl, cmd_Lxcache_t *Lxcache)
-{
- fmd_hdl_debug(hdl,
- "\n"
- " cpu = %s\n"
- " type = %s\n"
- " index = %d\n"
- " way = %d\n"
- " bit = %d\n"
- " reason = %s\n"
- " flags = %s\n",
- Lxcache->Lxcache_cpu_bufname,
- cmd_type_to_str(Lxcache->Lxcache_type),
- Lxcache->Lxcache_index,
- Lxcache->Lxcache_way,
- Lxcache->Lxcache_bit,
- cmd_reason_to_str(Lxcache->Lxcache_reason),
- cmd_flags_to_str(Lxcache->Lxcache_flags));
-}
-
-void
-cmd_Lxcache_free(fmd_hdl_t *hdl, cmd_cpu_t *cpu, cmd_Lxcache_t *Lxcache,
- int destroy)
-{
- cmd_case_t *cc = &Lxcache->Lxcache_case;
-
- fmd_hdl_debug(hdl, "Entering cmd_Lxcache_free for %s destroy = %d\n",
- Lxcache->Lxcache_bufname, destroy);
-
- if (cc->cc_cp != NULL)
- cmd_case_fini(hdl, cc->cc_cp, destroy);
- if (cc->cc_serdnm != NULL) {
- if (fmd_serd_exists(hdl, cc->cc_serdnm) && destroy) {
- fmd_serd_destroy(hdl, cc->cc_serdnm);
- fmd_hdl_strfree(hdl, cc->cc_serdnm);
- cc->cc_serdnm = NULL;
- }
- }
- if (Lxcache->Lxcache_nvl) {
- nvlist_free(Lxcache->Lxcache_nvl);
- Lxcache->Lxcache_nvl = NULL;
- }
- /*
- * Clean up the SERD engine created to handle recheck of TAGS.
- * This SERD engine was created to save the event pointer.
- */
- if (Lxcache->Lxcache_serdnm != NULL) {
- if (fmd_serd_exists(hdl, Lxcache->Lxcache_serdnm) && destroy) {
- fmd_serd_destroy(hdl, Lxcache->Lxcache_serdnm);
- fmd_hdl_strfree(hdl, Lxcache->Lxcache_serdnm);
- Lxcache->Lxcache_serdnm = NULL;
- }
- }
- Lxcache->Lxcache_timeout_id = -1;
- Lxcache->Lxcache_ep = NULL;
- Lxcache->Lxcache_retry_count = 0;
- if (destroy)
- fmd_buf_destroy(hdl, NULL, Lxcache->Lxcache_bufname);
- cmd_fmri_fini(hdl, &Lxcache->Lxcache_asru, destroy);
- cmd_list_delete(&cpu->cpu_Lxcaches, Lxcache);
- fmd_hdl_free(hdl, Lxcache, sizeof (cmd_Lxcache_t));
-}
-
-void
-cmd_Lxcache_destroy(fmd_hdl_t *hdl, cmd_cpu_t *cpu, cmd_Lxcache_t *Lxcache)
-{
- cmd_Lxcache_free(hdl, cpu, Lxcache, FMD_B_TRUE);
-}
-
-cmd_Lxcache_t *
-cmd_Lxcache_lookup_by_type_index_way_bit(cmd_cpu_t *cpu,
- cmd_ptrsubtype_t pstype, int32_t index, int8_t way, int16_t bit)
-{
- cmd_Lxcache_t *Lxcache;
-
- for (Lxcache = cmd_list_next(&cpu->cpu_Lxcaches); Lxcache != NULL;
- Lxcache = cmd_list_next(Lxcache)) {
- if ((Lxcache->Lxcache_type == pstype) &&
- (Lxcache->Lxcache_index == (uint32_t)index) &&
- (Lxcache->Lxcache_way == (uint32_t)way) &&
- (Lxcache->Lxcache_bit == (uint16_t)bit))
- return (Lxcache);
- }
-
- return (NULL);
-}
-
-cmd_Lxcache_t *
-cmd_Lxcache_create(fmd_hdl_t *hdl, cmd_xr_t *xr, cmd_cpu_t *cpu,
- nvlist_t *modasru, cmd_ptrsubtype_t pstype, int32_t index,
- int8_t way, int16_t bit)
-{
- cmd_Lxcache_t *Lxcache;
- nvlist_t *asru;
- const char *pstype_name;
- uint8_t fmri_Lxcache_type;
-
- pstype_name = cmd_type_to_str(pstype);
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id %d:Creating new Lxcache for index=%d way=%d bit=%d\n",
- pstype_name, cpu->cpu_cpuid, index, way, bit);
-
- CMD_CPU_STAT_BUMP(cpu, Lxcache_creat);
-
- Lxcache = fmd_hdl_zalloc(hdl, sizeof (cmd_Lxcache_t), FMD_SLEEP);
- (void) strncpy(Lxcache->Lxcache_cpu_bufname,
- cpu->cpu_bufname, CMD_BUFNMLEN);
- Lxcache->Lxcache_nodetype = CMD_NT_LxCACHE;
- Lxcache->Lxcache_version = CMD_LxCACHE_VERSION;
- Lxcache->Lxcache_type = pstype;
- Lxcache->Lxcache_index = (uint32_t)index;
- Lxcache->Lxcache_way = (uint32_t)way;
- Lxcache->Lxcache_bit = (uint16_t)bit;
- Lxcache->Lxcache_reason = CMD_LXFUNCTIONING;
- Lxcache->Lxcache_flags = CMD_LxCACHE_F_ACTIVE;
- Lxcache->Lxcache_timeout_id = -1;
- Lxcache->Lxcache_retry_count = 0;
- Lxcache->Lxcache_nvl = NULL;
- Lxcache->Lxcache_ep = NULL;
- Lxcache->Lxcache_serdnm = NULL;
- Lxcache->Lxcache_clcode = 0;
- Lxcache->xr = xr;
- Lxcache->Lxcache_retired_fmri[0] = '\0';
- switch (pstype) {
- case CMD_PTR_CPU_L2DATA:
- fmri_Lxcache_type = FM_FMRI_CPU_CACHE_TYPE_L2;
- break;
- case CMD_PTR_CPU_L3DATA:
- fmri_Lxcache_type = FM_FMRI_CPU_CACHE_TYPE_L3;
- break;
- case CMD_PTR_CPU_L2TAG:
- fmri_Lxcache_type = FM_FMRI_CPU_CACHE_TYPE_L2;
- break;
- case CMD_PTR_CPU_L3TAG:
- fmri_Lxcache_type = FM_FMRI_CPU_CACHE_TYPE_L3;
- break;
- default:
- break;
- }
-
- cmd_bufname(Lxcache->Lxcache_bufname, sizeof (Lxcache->Lxcache_bufname),
- "Lxcache_%s_%d_%d_%d_%d", pstype_name, cpu->cpu_cpuid,
- index, way, bit);
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id %d: new Lxcache name is %s\n",
- pstype_name, cpu->cpu_cpuid, Lxcache->Lxcache_bufname);
- if ((errno = nvlist_dup(modasru, &asru, 0)) != 0 ||
- (errno = nvlist_add_uint32(asru, FM_FMRI_CPU_CACHE_INDEX,
- index)) != 0 ||
- (errno = nvlist_add_uint32(asru, FM_FMRI_CPU_CACHE_WAY,
- (uint32_t)way)) != 0 ||
- (errno = nvlist_add_uint16(asru, FM_FMRI_CPU_CACHE_BIT,
- bit)) != 0 ||
- (errno = nvlist_add_uint8(asru, FM_FMRI_CPU_CACHE_TYPE,
- fmri_Lxcache_type)) != 0 ||
- (errno = fmd_nvl_fmri_expand(hdl, asru)) != 0)
- fmd_hdl_abort(hdl, "failed to build Lxcache fmri");
- asru->nvl_nvflag |= NV_UNIQUE_NAME_TYPE;
-
- cmd_fmri_init(hdl, &Lxcache->Lxcache_asru, asru,
- "%s_asru_%d_%d_%d", pstype_name, index, way, bit);
-
- nvlist_free(asru);
-
- cmd_list_append(&cpu->cpu_Lxcaches, Lxcache);
- cmd_Lxcache_write(hdl, Lxcache);
-
- return (Lxcache);
-}
-
-cmd_Lxcache_t *
-cmd_Lxcache_lookup_by_index_way(cmd_cpu_t *cpu, cmd_ptrsubtype_t pstype,
- int32_t index, int8_t way)
-{
- cmd_Lxcache_t *cache;
-
- for (cache = cmd_list_next(&cpu->cpu_Lxcaches); cache != NULL;
- cache = cmd_list_next(cache)) {
- if ((cache->Lxcache_index == (uint32_t)index) &&
- (cache->Lxcache_way == (uint32_t)way) &&
- (cache->Lxcache_type == pstype)) {
- return (cache);
- }
- }
-
- return (NULL);
-}
-
-static cmd_Lxcache_t *
-Lxcache_wrapv1(fmd_hdl_t *hdl, cmd_Lxcache_pers_t *pers, size_t psz)
-{
- cmd_Lxcache_t *Lxcache;
-
- if (psz != sizeof (cmd_Lxcache_pers_t)) {
- fmd_hdl_abort(hdl, "size of state doesn't match size of "
- "version 1 state (%u bytes).\n",
- sizeof (cmd_Lxcache_pers_t));
- }
-
- Lxcache = fmd_hdl_zalloc(hdl, sizeof (cmd_Lxcache_t), FMD_SLEEP);
- bcopy(pers, Lxcache, sizeof (cmd_Lxcache_pers_t));
- fmd_hdl_free(hdl, pers, psz);
- return (Lxcache);
-}
-
-void *
-cmd_Lxcache_restore(fmd_hdl_t *hdl, fmd_case_t *cp, cmd_case_ptr_t *ptr)
-{
- cmd_Lxcache_t *Lxcache;
- cmd_Lxcache_t *recovered_Lxcache;
- cmd_cpu_t *cpu;
- size_t Lxcachesz;
- char *serdnm;
-
- /*
- * We need to first extract the cpu name by reading directly
- * from fmd buffers in order to begin our search for Lxcache in
- * the appropriate cpu list.
- * After we identify the cpu list using buf name we look
- * in cpu list for our Lxcache states.
- */
- fmd_hdl_debug(hdl, "restoring Lxcache from %s\n", ptr->ptr_name);
-
- if ((Lxcachesz = fmd_buf_size(hdl, NULL, ptr->ptr_name)) == 0) {
- fmd_hdl_abort(hdl, "Lxcache referenced by case %s does "
- "not exist in saved state\n",
- fmd_case_uuid(hdl, cp));
- } else if (Lxcachesz != sizeof (cmd_Lxcache_pers_t)) {
- fmd_hdl_abort(hdl, "Lxcache buffer referenced by case %s "
- "is %d bytes. Expected size is %d bytes\n",
- fmd_case_uuid(hdl, cp), Lxcachesz,
- sizeof (cmd_Lxcache_pers_t));
- }
-
- if ((Lxcache = cmd_buf_read(hdl, NULL, ptr->ptr_name,
- Lxcachesz)) == NULL) {
- fmd_hdl_abort(hdl, "failed to read Lxcache buf %s",
- ptr->ptr_name);
- }
- cmd_pretty_print_Lxcache(hdl, Lxcache);
-
- fmd_hdl_debug(hdl, "found %d in version field\n",
- Lxcache->Lxcache_version);
- cpu = cmd_restore_cpu_only(hdl, cp, Lxcache->Lxcache_cpu_bufname);
- if (cpu == NULL) {
- fmd_hdl_debug(hdl,
- "\nCould not restore cpu %s\n",
- Lxcache->Lxcache_cpu_bufname);
- return (NULL);
- }
- recovered_Lxcache = Lxcache; /* save the recovered Lxcache */
-
- for (Lxcache = cmd_list_next(&cpu->cpu_Lxcaches); Lxcache != NULL;
- Lxcache = cmd_list_next(Lxcache)) {
- if (strcmp(Lxcache->Lxcache_bufname, ptr->ptr_name) == 0)
- break;
- }
-
- if (Lxcache == NULL) {
-
- switch (recovered_Lxcache->Lxcache_version) {
- case CMD_LxCACHE_VERSION_1:
- Lxcache = Lxcache_wrapv1(hdl,
- (cmd_Lxcache_pers_t *)recovered_Lxcache,
- Lxcachesz);
- break;
- default:
- fmd_hdl_abort(hdl, "unknown version (found %d) "
- "for Lxcache state referenced by case %s.\n",
- recovered_Lxcache->Lxcache_version,
- fmd_case_uuid(hdl, cp));
- break;
- }
-
- cmd_fmri_restore(hdl, &Lxcache->Lxcache_asru);
- /*
- * We need to cleanup the information associated with
- * the timeout routine because these are not checkpointed
- * and cannot be retored.
- */
- Lxcache->Lxcache_timeout_id = -1;
- Lxcache->Lxcache_retry_count = 0;
- Lxcache->Lxcache_nvl = NULL;
- Lxcache->Lxcache_ep = NULL;
- Lxcache->Lxcache_serdnm = NULL;
-
- cmd_list_append(&cpu->cpu_Lxcaches, Lxcache);
- }
- serdnm = cmd_Lxcache_serdnm_create(hdl, cpu->cpu_cpuid,
- Lxcache->Lxcache_type, Lxcache->Lxcache_index,
- Lxcache->Lxcache_way, Lxcache->Lxcache_bit);
- fmd_hdl_debug(hdl,
- "cpu_id %d: serdname for the case is %s\n",
- cpu->cpu_cpuid, serdnm);
- fmd_hdl_debug(hdl,
- "cpu_id %d: restoring the case for index %d way %d bit %d\n",
- cpu->cpu_cpuid, Lxcache->Lxcache_index,
- Lxcache->Lxcache_way, Lxcache->Lxcache_bit);
- cmd_case_restore(hdl, &Lxcache->Lxcache_case, cp, serdnm);
-
- return (Lxcache);
-}
-
-/*ARGSUSED*/
-void
-cmd_Lxcache_validate(fmd_hdl_t *hdl, cmd_cpu_t *cpu)
-{
- cmd_Lxcache_t *Lxcache, *next;
-
- for (Lxcache = cmd_list_next(&cpu->cpu_Lxcaches);
- Lxcache != NULL; Lxcache = next) {
- next = cmd_list_next(Lxcache);
-
- if (fmd_nvl_fmri_unusable(hdl, Lxcache->Lxcache_asru_nvl)) {
- cmd_Lxcache_destroy(hdl, cpu, Lxcache);
- }
- }
-}
-
-void
-cmd_Lxcache_dirty(fmd_hdl_t *hdl, cmd_Lxcache_t *Lxcache)
-{
- if (fmd_buf_size(hdl, NULL, Lxcache->Lxcache_bufname) !=
- sizeof (cmd_Lxcache_pers_t))
- fmd_buf_destroy(hdl, NULL, Lxcache->Lxcache_bufname);
-
- /* No need to rewrite the FMRIs in the Lxcache - they don't change */
- fmd_buf_write(hdl, NULL,
- Lxcache->Lxcache_bufname, &Lxcache->Lxcache_pers,
- sizeof (cmd_Lxcache_pers_t));
-}
-
-void
-cmd_Lxcache_fini(fmd_hdl_t *hdl, cmd_cpu_t *cpu)
-{
- cmd_Lxcache_t *Lxcache;
-
- while ((Lxcache = cmd_list_next(&cpu->cpu_Lxcaches)) != NULL)
- cmd_Lxcache_free(hdl, cpu, Lxcache, FMD_B_FALSE);
-}
-
-char *
-cmd_Lxcache_serdnm_create(fmd_hdl_t *hdl, uint32_t cpu_id,
- cmd_ptrsubtype_t pstype,
- int32_t index, int8_t way, int16_t bit)
-{
- const char *fmt = "cpu_%d:%s_%d_%d_%d_serd";
- const char *serdbase;
- size_t sz;
- char *nm;
-
- serdbase = cmd_type_to_str(pstype);
- sz = (snprintf(NULL, 0, fmt, cpu_id, serdbase, index, way, bit) + 1);
- nm = fmd_hdl_alloc(hdl, sz, FMD_SLEEP);
- (void) snprintf(nm, sz, fmt, cpu_id, serdbase, index, way, bit);
- return (nm);
-}
-
-char *
-cmd_Lxcache_anonymous_serdnm_create(fmd_hdl_t *hdl, uint32_t cpu_id,
- cmd_ptrsubtype_t pstype,
- int32_t index, int8_t way, int16_t bit)
-{
- const char *fmt = "cpu_%d:%s_%d_%d_%d_anonymous_serd";
- const char *serdbase;
- size_t sz;
- char *nm;
-
- serdbase = cmd_type_to_str(pstype);
- sz = (snprintf(NULL, 0, fmt, cpu_id, serdbase, index, way, bit) + 1);
- nm = fmd_hdl_alloc(hdl, sz, FMD_SLEEP);
- (void) snprintf(nm, sz, fmt, cpu_id, serdbase, index, way, bit);
- return (nm);
-}
-
-/*
- * Count the number of SERD type 2 ways retired for a given cpu
- * These are defined to be L3 Cache data retirements
- */
-
-uint32_t
-cmd_Lx_index_count_type2_ways(cmd_cpu_t *cpu)
-{
- cmd_Lxcache_t *cache = NULL;
- uint32_t ret_count = 0;
-
- for (cache = cmd_list_next(&cpu->cpu_Lxcaches); cache != NULL;
- cache = cmd_list_next(cache)) {
- if ((cache->Lxcache_flags & CMD_LxCACHE_F_RETIRED) &&
- (cache->Lxcache_type == CMD_PTR_CPU_L3DATA)) {
- ret_count++;
- }
- }
- return (ret_count);
-}
-/*
- * Count the number of SERD type 1 ways retired for a given cpu
- * These are defined to be L2 Data, tag and L3 Tag retirements
- */
-
-uint32_t
-cmd_Lx_index_count_type1_ways(cmd_cpu_t *cpu)
-{
- cmd_Lxcache_t *cache = NULL;
- uint32_t ret_count = 0;
-
- for (cache = cmd_list_next(&cpu->cpu_Lxcaches); cache != NULL;
- cache = cmd_list_next(cache)) {
- if ((cache->Lxcache_flags & CMD_LxCACHE_F_RETIRED) &&
- ((cache->Lxcache_type == CMD_PTR_CPU_L2DATA) ||
- IS_TAG(cache->Lxcache_type))) {
- ret_count++;
- }
- }
- return (ret_count);
-}
-
-void
-cmd_fault_the_cpu(fmd_hdl_t *hdl, cmd_cpu_t *cpu, cmd_ptrsubtype_t pstype,
- const char *fltnm)
-{
- fmd_case_t *cp;
- const char *uuid;
-
- cp = cmd_case_create(hdl, &cpu->cpu_header, pstype,
- &uuid);
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id %d Created case %s to retire CPU\n",
- fltnm, cpu->cpu_cpuid);
-
- if ((errno = fmd_nvl_fmri_expand(hdl, cpu->cpu_asru_nvl)) != 0)
- fmd_hdl_abort(hdl, "failed to build CPU fmri");
-
- cmd_cpu_create_faultlist(hdl, cp, cpu, fltnm, NULL, HUNDRED_PERCENT);
- fmd_case_solve(hdl, cp);
-}
-
-void
-cmd_retire_cpu_if_limits_exceeded(fmd_hdl_t *hdl, cmd_cpu_t *cpu,
- cmd_ptrsubtype_t pstype, const char *fltnm)
-{
- int cpu_retired_1, cpu_retired_2;
-
- /* Retrieve the number of retired ways for each category */
-
- cpu_retired_1 = cmd_Lx_index_count_type1_ways(cpu);
- cpu_retired_2 = cmd_Lx_index_count_type2_ways(cpu);
- fmd_hdl_debug(hdl,
- "\n%s:CPU %d retired Type 1 way count is: %d\n",
- fltnm, cpu->cpu_cpuid, cpu_retired_1);
- fmd_hdl_debug(hdl, "\n%s:CPU %d retired Type 2 way count is: %d\n",
- fltnm, cpu->cpu_cpuid, cpu_retired_2);
-
- if (((cpu_retired_1 > CMD_CPU_SERD_AGG_1) ||
- (cpu_retired_2 > CMD_CPU_SERD_AGG_2)) &&
- (cpu->cpu_faulting != FMD_B_TRUE)) {
- cmd_fault_the_cpu(hdl, cpu, pstype, fltnm);
- }
-}
-
-void
-cmd_Lxcache_fault(fmd_hdl_t *hdl, cmd_cpu_t *cpu, cmd_Lxcache_t *Lxcache,
- const char *fltnm, nvlist_t *rsrc, uint_t cert)
-{
- char fltmsg[64];
- nvlist_t *flt;
-
- (void) snprintf(fltmsg, sizeof (fltmsg), "fault.cpu.%s.%s-line",
- cmd_cpu_type2name(hdl, cpu->cpu_type), fltnm);
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id %d: fltmsg = %s\n",
- fltnm, cpu->cpu_cpuid, fltmsg);
- if (Lxcache->Lxcache_flags & CMD_LxCACHE_F_FAULTING) {
- return;
- }
- Lxcache->Lxcache_flags |= CMD_LxCACHE_F_FAULTING;
- flt = fmd_nvl_create_fault(hdl, fltmsg, cert,
- Lxcache->Lxcache_asru.fmri_nvl, cpu->cpu_fru_nvl, rsrc);
- if (nvlist_add_boolean_value(flt, FM_SUSPECT_MESSAGE, B_FALSE) != 0)
- fmd_hdl_abort(hdl, "failed to add no-message member to fault");
-
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id %d: adding suspect list to case %s\n",
- fltnm, cpu->cpu_cpuid,
- fmd_case_uuid(hdl, Lxcache->Lxcache_case.cc_cp));
- fmd_case_add_suspect(hdl, Lxcache->Lxcache_case.cc_cp, flt);
- fmd_case_solve(hdl, Lxcache->Lxcache_case.cc_cp);
- if (Lxcache->Lxcache_retired_fmri[0] == 0) {
- if (cmd_fmri_nvl2str(hdl, Lxcache->Lxcache_asru.fmri_nvl,
- Lxcache->Lxcache_retired_fmri,
- sizeof (Lxcache->Lxcache_retired_fmri)) == -1)
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id %d: Failed to save the"
- " retired fmri string\n",
- fltnm, cpu->cpu_cpuid);
- else
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id %d:Saved the retired fmri string %s\n",
- fltnm, cpu->cpu_cpuid,
- Lxcache->Lxcache_retired_fmri);
- }
- Lxcache->Lxcache_flags &= ~(CMD_LxCACHE_F_FAULTING);
-
-}
-
-void
-cmd_Lxcache_close(fmd_hdl_t *hdl, void *arg)
-{
- cmd_cpu_t *cpu;
- cmd_Lxcache_t *Lxcache;
- cmd_case_t *cc;
-
- Lxcache = (cmd_Lxcache_t *)arg;
- fmd_hdl_debug(hdl, "cmd_Lxcache_close called for %s\n",
- Lxcache->Lxcache_bufname);
- cc = &Lxcache->Lxcache_case;
-
- for (cpu = cmd_list_next(&cmd.cmd_cpus); cpu != NULL;
- cpu = cmd_list_next(cpu)) {
- if (strcmp(cpu->cpu_bufname,
- Lxcache->Lxcache_cpu_bufname) == 0)
- break;
- }
- if (cpu == NULL)
- fmd_hdl_abort(hdl, "failed to find the cpu %s for %s\n",
- Lxcache->Lxcache_cpu_bufname,
- Lxcache->Lxcache_bufname);
- /*
- * We will destroy the case and serd engine.
- * The rest will be destroyed when we retire the CPU
- * until then we keep the Lxcache strutures alive.
- */
- if (cc->cc_cp != NULL) {
- cmd_case_fini(hdl, cc->cc_cp, FMD_B_TRUE);
- cc->cc_cp = NULL;
- }
- if (cc->cc_serdnm != NULL) {
- if (fmd_serd_exists(hdl, cc->cc_serdnm))
- fmd_serd_destroy(hdl, cc->cc_serdnm);
- fmd_hdl_strfree(hdl, cc->cc_serdnm);
- cc->cc_serdnm = NULL;
- }
-
-}
-
-cmd_Lxcache_t *
-cmd_Lxcache_lookup_by_timeout_id(id_t id)
-{
- cmd_cpu_t *cpu;
- cmd_Lxcache_t *cmd_Lxcache;
-
- for (cpu = cmd_list_next(&cmd.cmd_cpus); cpu != NULL;
- cpu = cmd_list_next(cpu)) {
- for (cmd_Lxcache = cmd_list_next(&cpu->cpu_Lxcaches);
- cmd_Lxcache != NULL;
- cmd_Lxcache = cmd_list_next(cmd_Lxcache)) {
- if (cmd_Lxcache->Lxcache_timeout_id == id)
- return (cmd_Lxcache);
- }
- }
- return (NULL);
-}
-
-void
-cmd_Lxcache_gc(fmd_hdl_t *hdl)
-{
- cmd_cpu_t *cpu;
-
- for (cpu = cmd_list_next(&cmd.cmd_cpus); cpu != NULL;
- cpu = cmd_list_next(cpu))
- cmd_Lxcache_validate(hdl, cpu);
-}
-
-cmd_evdisp_t
-get_tagdata(cmd_cpu_t *cpu, cmd_ptrsubtype_t pstype,
- int32_t index, uint64_t *tag_data)
-{
- int fd;
- cache_info_t cache_info;
-
- fd = open(mem_cache_device, O_RDONLY);
- if (fd == -1) {
- (void) printf(
- "cpu_id = %d could not open %s to read tag info.\n",
- cpu->cpu_cpuid, mem_cache_device);
- return (CMD_EVD_BAD);
- }
- switch (pstype) {
- case CMD_PTR_CPU_L2TAG:
- case CMD_PTR_CPU_L2DATA:
- cache_info.cache = L2_CACHE_TAG;
- break;
- case CMD_PTR_CPU_L3TAG:
- case CMD_PTR_CPU_L3DATA:
- cache_info.cache = L3_CACHE_TAG;
- break;
- }
- cache_info.cpu_id = cpu->cpu_cpuid;
- cache_info.index = index;
- cache_info.datap = tag_data;
- cache_info.way = 0;
-
- if (test_mode) {
-
- if (ioctl(fd, MEM_CACHE_READ_ERROR_INJECTED_TAGS, &cache_info)
- == -1) {
- (void) printf("cpu_id = %d ioctl"
- " MEM_CACHE_READ_ERROR_INJECTED_TAGS failed"
- " errno = %d\n",
- cpu->cpu_cpuid, errno);
- (void) close(fd);
- return (CMD_EVD_BAD);
- }
- } else {
- if (ioctl(fd, MEM_CACHE_READ_TAGS, &cache_info)
- == -1) {
- (void) printf("cpu_id = %d ioctl"
- " MEM_CACHE_READ_TAGS failed"
- " errno = %d\n",
- cpu->cpu_cpuid, errno);
- (void) close(fd);
- return (CMD_EVD_BAD);
- }
- }
- (void) close(fd);
- return (CMD_EVD_OK);
-}
-
-int
-get_index_retired_ways(cmd_cpu_t *cpu, cmd_ptrsubtype_t pstype, int32_t index)
-{
- int i, retired_ways;
- uint64_t tag_data[PN_CACHE_NWAYS];
-
- if (get_tagdata(cpu, pstype, index, tag_data) != 0) {
- return (-1);
- }
- retired_ways = 0;
- for (i = 0; i < PN_CACHE_NWAYS; i++) {
- if ((tag_data[i] & CH_ECSTATE_MASK) ==
- PN_ECSTATE_NA)
- retired_ways++;
- }
- return (retired_ways);
-}
-
-boolean_t
-cmd_cache_way_retire(fmd_hdl_t *hdl, cmd_cpu_t *cpu, cmd_Lxcache_t *Lxcache)
-{
- const char *fltnm;
- cache_info_t cache_info;
- int ret, fd;
-
- fltnm = cmd_type_to_str(Lxcache->Lxcache_type);
- fd = open(mem_cache_device, O_RDWR);
- if (fd == -1) {
- fmd_hdl_debug(hdl,
- "fltnm:cpu_id %d open of %s failed\n",
- fltnm, cpu->cpu_cpuid, mem_cache_device);
- return (B_FALSE);
- }
- cache_info.cpu_id = cpu->cpu_cpuid;
- cache_info.way = Lxcache->Lxcache_way;
- cache_info.bit = Lxcache->Lxcache_bit;
- cache_info.index = Lxcache->Lxcache_index;
-
- switch (Lxcache->Lxcache_type) {
- case CMD_PTR_CPU_L2TAG:
- cache_info.cache = L2_CACHE_TAG;
- break;
- case CMD_PTR_CPU_L2DATA:
- cache_info.cache = L2_CACHE_DATA;
- break;
- case CMD_PTR_CPU_L3TAG:
- cache_info.cache = L3_CACHE_TAG;
- break;
- case CMD_PTR_CPU_L3DATA:
- cache_info.cache = L3_CACHE_DATA;
- break;
- }
-
- fmd_hdl_debug(hdl,
- "\n%s:cpu %d: Retiring index %d, way %d bit %d\n",
- fltnm, cpu->cpu_cpuid, cache_info.index, cache_info.way,
- (int16_t)cache_info.bit);
- ret = ioctl(fd, MEM_CACHE_RETIRE, &cache_info);
- (void) close(fd);
- if (ret == -1) {
- fmd_hdl_debug(hdl,
- "fltnm:cpu_id %d MEM_CACHE_RETIRE ioctl failed\n",
- fltnm, cpu->cpu_cpuid);
- return (B_FALSE);
- }
-
- return (B_TRUE);
-}
-
-boolean_t
-cmd_cache_way_unretire(fmd_hdl_t *hdl, cmd_cpu_t *cpu, cmd_Lxcache_t *Lxcache)
-{
- const char *fltnm;
- cache_info_t cache_info;
- int ret, fd;
-
- fltnm = cmd_type_to_str(Lxcache->Lxcache_type);
- fd = open(mem_cache_device, O_RDWR);
- if (fd == -1) {
- fmd_hdl_debug(hdl,
- "fltnm:cpu_id %d open of %s failed\n",
- fltnm, cpu->cpu_cpuid, mem_cache_device);
- return (B_FALSE);
- }
- cache_info.cpu_id = cpu->cpu_cpuid;
- cache_info.way = Lxcache->Lxcache_way;
- cache_info.bit = Lxcache->Lxcache_bit;
- cache_info.index = Lxcache->Lxcache_index;
-
- switch (Lxcache->Lxcache_type) {
- case CMD_PTR_CPU_L2TAG:
- cache_info.cache = L2_CACHE_TAG;
- break;
- case CMD_PTR_CPU_L2DATA:
- cache_info.cache = L2_CACHE_DATA;
- break;
- case CMD_PTR_CPU_L3TAG:
- cache_info.cache = L3_CACHE_TAG;
- break;
- case CMD_PTR_CPU_L3DATA:
- cache_info.cache = L3_CACHE_DATA;
- break;
- }
-
- fmd_hdl_debug(hdl,
- "\n%s:cpu %d: Unretiring index %d, way %d bit %d\n",
- fltnm, cpu->cpu_cpuid, cache_info.index, cache_info.way,
- (int16_t)cache_info.bit);
- ret = ioctl(fd, MEM_CACHE_UNRETIRE, &cache_info);
- (void) close(fd);
- if (ret == -1) {
- fmd_hdl_debug(hdl,
- "fltnm:cpu_id %d MEM_CACHE_UNRETIRE ioctl failed\n",
- fltnm, cpu->cpu_cpuid);
- return (B_FALSE);
- }
-
- return (B_TRUE);
-}
-
-static cmd_Lxcache_t *
-cmd_Lxcache_lookup_by_type_index_way_flags(cmd_cpu_t *cpu,
- cmd_ptrsubtype_t type, int32_t index, int8_t way, int32_t flags)
-{
- cmd_Lxcache_t *cmd_Lxcache;
-
- for (cmd_Lxcache = cmd_list_next(&cpu->cpu_Lxcaches);
- cmd_Lxcache != NULL;
- cmd_Lxcache = cmd_list_next(cmd_Lxcache)) {
- if ((cmd_Lxcache->Lxcache_index == index) &&
- (cmd_Lxcache->Lxcache_way == way) &&
- (cmd_Lxcache->Lxcache_type == type) &&
- (cmd_Lxcache->Lxcache_flags & flags))
- return (cmd_Lxcache);
- }
- return (NULL);
-}
-
-static int8_t
-cmd_Lxcache_get_bit_array_of_available_ways(cmd_cpu_t *cpu,
- cmd_ptrsubtype_t type, int32_t index)
-{
- uint8_t bit_array_of_unavailable_ways;
- uint8_t bit_array_of_available_ways;
- cmd_ptrsubtype_t match_type;
- cmd_Lxcache_t *cmd_Lxcache;
- uint8_t bit_array_of_retired_ways;
-
-
- /*
- * We scan the Lxcache structures for this CPU and collect
- * the following 2 information.
- * - bit_array_of_retired_ways
- * - bit_array_of_unavailable_ways
- * If type is Lx_TAG then unavailable_ways will not include ways that
- * were retired due to DATA faults, because these ways can still be
- * re-retired for TAG faults.
- * If 3 ways have been retired then we protect the only remaining
- * unretired way by marking it as unavailable.
- */
- bit_array_of_unavailable_ways = 0;
- bit_array_of_retired_ways = 0;
- switch (type) {
- case CMD_PTR_CPU_L2TAG:
- match_type = CMD_PTR_CPU_L2DATA;
- break;
- case CMD_PTR_CPU_L2DATA:
- match_type = CMD_PTR_CPU_L2TAG;
- break;
- case CMD_PTR_CPU_L3TAG:
- match_type = CMD_PTR_CPU_L3DATA;
- break;
- case CMD_PTR_CPU_L3DATA:
- match_type = CMD_PTR_CPU_L3TAG;
- break;
- }
-
- for (cmd_Lxcache = cmd_list_next(&cpu->cpu_Lxcaches);
- cmd_Lxcache != NULL;
- cmd_Lxcache = cmd_list_next(cmd_Lxcache)) {
- if ((cmd_Lxcache->Lxcache_index == index) &&
- ((cmd_Lxcache->Lxcache_type == type) ||
- (cmd_Lxcache->Lxcache_type == match_type)) &&
- (cmd_Lxcache->Lxcache_flags &
- (CMD_LxCACHE_F_RETIRED | CMD_LxCACHE_F_RERETIRED))) {
- bit_array_of_retired_ways |=
- (1 << cmd_Lxcache->Lxcache_way);
- /*
- * If we are calling this while handling TAG errors
- * we can reretire the cachelines retired due to DATA
- * errors. We will ignore the cachelnes that are
- * retired due to DATA faults.
- */
- if ((type == CMD_PTR_CPU_L2TAG) &&
- (cmd_Lxcache->Lxcache_type == CMD_PTR_CPU_L2DATA))
- continue;
- if ((type == CMD_PTR_CPU_L3TAG) &&
- (cmd_Lxcache->Lxcache_type == CMD_PTR_CPU_L3DATA))
- continue;
- bit_array_of_unavailable_ways |=
- (1 << cmd_Lxcache->Lxcache_way);
- }
- }
- if (cmd_num_of_bits[bit_array_of_retired_ways & 0xf] == 3) {
- /*
- * special case: 3 ways are already retired.
- * The Lone unretired way is set as 1, rest are set as 0.
- * We now OR this with bit_array_of_unavailable_ways
- * so that this unretired way will not be allocated.
- */
- bit_array_of_retired_ways ^= 0xf;
- bit_array_of_retired_ways &= 0xf;
- bit_array_of_unavailable_ways |= bit_array_of_retired_ways;
- }
- bit_array_of_available_ways =
- ((bit_array_of_unavailable_ways ^ 0xf) & 0xf);
- return (bit_array_of_available_ways);
-}
-
-
-/*
- * Look for a way next to the specified way that is
- * not in a retired state.
- * We stop when way 3 is reached.
- */
-int8_t
-cmd_Lxcache_get_next_retirable_way(cmd_cpu_t *cpu,
- int32_t index, cmd_ptrsubtype_t pstype, int8_t specified_way)
-{
- uint8_t bit_array_of_ways;
- int8_t mask;
-
- if (specified_way == 3)
- return (-1);
- bit_array_of_ways = cmd_Lxcache_get_bit_array_of_available_ways(
- cpu,
- pstype, index);
- if (specified_way == 2)
- mask = 0x8;
- else if (specified_way == 1)
- mask = 0xc;
- else
- mask = 0xe;
- return (cmd_lowest_way[bit_array_of_ways & mask]);
-}
-
-int8_t
-cmd_Lxcache_get_lowest_retirable_way(cmd_cpu_t *cpu,
- int32_t index, cmd_ptrsubtype_t pstype)
-{
- uint8_t bit_array_of_ways;
-
- bit_array_of_ways = cmd_Lxcache_get_bit_array_of_available_ways(
- cpu,
- pstype, index);
- return (cmd_lowest_way[bit_array_of_ways]);
-}
-
-cmd_Lxcache_t *
-cmd_Lxcache_lookup_by_type_index_way_reason(cmd_cpu_t *cpu,
- cmd_ptrsubtype_t pstype, int32_t index, int8_t way, int32_t reason)
-{
- cmd_Lxcache_t *cmd_Lxcache;
-
- for (cmd_Lxcache = cmd_list_next(&cpu->cpu_Lxcaches);
- cmd_Lxcache != NULL;
- cmd_Lxcache = cmd_list_next(cmd_Lxcache)) {
- if ((cmd_Lxcache->Lxcache_index == (uint32_t)index) &&
- (cmd_Lxcache->Lxcache_way == (uint32_t)way) &&
- (cmd_Lxcache->Lxcache_reason & reason) &&
- (cmd_Lxcache->Lxcache_type == pstype)) {
- return (cmd_Lxcache);
- }
- }
- return (NULL);
-}
-
-cmd_Lxcache_t *
-cmd_Lxcache_lookup_by_type_index_bit_reason(cmd_cpu_t *cpu,
- cmd_ptrsubtype_t pstype, int32_t index, int16_t bit, int32_t reason)
-{
- cmd_Lxcache_t *cmd_Lxcache;
-
- for (cmd_Lxcache = cmd_list_next(&cpu->cpu_Lxcaches);
- cmd_Lxcache != NULL;
- cmd_Lxcache = cmd_list_next(cmd_Lxcache)) {
- if ((cmd_Lxcache->Lxcache_index == (uint32_t)index) &&
- (cmd_Lxcache->Lxcache_bit == (uint16_t)bit) &&
- (cmd_Lxcache->Lxcache_reason & reason) &&
- (cmd_Lxcache->Lxcache_type == pstype)) {
- return (cmd_Lxcache);
- }
- }
- return (NULL);
-}
-
-void
-cmd_Lxcache_destroy_anonymous_serd_engines(fmd_hdl_t *hdl, cmd_cpu_t *cpu,
- cmd_ptrsubtype_t type, int32_t index, int16_t bit)
-{
- cmd_Lxcache_t *cmd_Lxcache;
- cmd_case_t *cc;
-
- for (cmd_Lxcache = cmd_list_next(&cpu->cpu_Lxcaches);
- cmd_Lxcache != NULL;
- cmd_Lxcache = cmd_list_next(cmd_Lxcache)) {
- if ((cmd_Lxcache->Lxcache_type == type) &&
- (cmd_Lxcache->Lxcache_index == (uint32_t)index) &&
- (cmd_Lxcache->Lxcache_bit == (uint16_t)bit) &&
- (cmd_Lxcache->Lxcache_way == (uint32_t)CMD_ANON_WAY)) {
- cc = &cmd_Lxcache->Lxcache_case;
- if (cc == NULL)
- continue;
- if (cc->cc_serdnm != NULL) {
- if (fmd_serd_exists(hdl, cc->cc_serdnm)) {
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id %d destroying SERD"
- " engine %s\n",
- cmd_type_to_str(type),
- cpu->cpu_cpuid, cc->cc_serdnm);
- fmd_serd_destroy(hdl, cc->cc_serdnm);
- }
- fmd_hdl_strfree(hdl, cc->cc_serdnm);
- cc->cc_serdnm = NULL;
- }
- }
- }
-}
-
-ssize_t
-cmd_fmri_nvl2str(fmd_hdl_t *hdl, nvlist_t *nvl, char *buf, size_t buflen)
-{
- uint8_t type;
- uint32_t cpuid, way;
- uint32_t index;
- uint16_t bit;
- char *serstr = NULL;
- char missing_list[128];
-
- missing_list[0] = 0;
- if (nvlist_lookup_uint32(nvl, FM_FMRI_CPU_ID, &cpuid) != 0)
- (void) strcat(missing_list, FM_FMRI_CPU_ID);
- if (nvlist_lookup_string(nvl, FM_FMRI_CPU_SERIAL_ID, &serstr) != 0)
- (void) strcat(missing_list, FM_FMRI_CPU_SERIAL_ID);
- if (nvlist_lookup_uint32(nvl, FM_FMRI_CPU_CACHE_INDEX, &index) != 0)
- (void) strcat(missing_list, FM_FMRI_CPU_CACHE_INDEX);
- if (nvlist_lookup_uint32(nvl, FM_FMRI_CPU_CACHE_WAY, &way) != 0)
- (void) strcat(missing_list, FM_FMRI_CPU_CACHE_WAY);
- if (nvlist_lookup_uint16(nvl, FM_FMRI_CPU_CACHE_BIT, &bit) != 0)
- (void) strcat(missing_list, FM_FMRI_CPU_CACHE_BIT);
- if (nvlist_lookup_uint8(nvl, FM_FMRI_CPU_CACHE_TYPE, &type) != 0)
- (void) strcat(missing_list, FM_FMRI_CPU_CACHE_TYPE);
-
- if (strlen(missing_list) != 0) {
- fmd_hdl_debug(hdl,
- "\ncmd_fmri_nvl2str: missing %s in fmri\n",
- missing_list);
- return (-1);
- }
-
- return (snprintf(buf, buflen,
- "cpu:///%s=%u/%s=%s/%s=%u/%s=%u/%s=%d/%s=%d",
- FM_FMRI_CPU_ID, cpuid,
- FM_FMRI_CPU_SERIAL_ID, serstr,
- FM_FMRI_CPU_CACHE_INDEX, index,
- FM_FMRI_CPU_CACHE_WAY, way,
- FM_FMRI_CPU_CACHE_BIT, bit,
- FM_FMRI_CPU_CACHE_TYPE, type));
-}
-
-boolean_t
-cmd_create_case_for_Lxcache(fmd_hdl_t *hdl, cmd_cpu_t *cpu,
- cmd_Lxcache_t *cmd_Lxcache)
-{
- const char *fltnm;
- const char *uuid;
-
- if (cmd_Lxcache->Lxcache_case.cc_cp != NULL)
- return (B_TRUE);
- cmd_Lxcache->Lxcache_case.cc_cp = cmd_case_create(hdl,
- &cmd_Lxcache->Lxcache_header, CMD_PTR_LxCACHE_CASE,
- &uuid);
- fltnm = cmd_type_to_str(cmd_Lxcache->Lxcache_type);
- if (cmd_Lxcache->Lxcache_case.cc_cp == NULL) {
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id %d:Failed to create a case for"
- " index %d way %d bit %d\n",
- fltnm, cpu->cpu_cpuid,
- cmd_Lxcache->Lxcache_index,
- cmd_Lxcache->Lxcache_way, cmd_Lxcache->Lxcache_bit);
- return (B_FALSE);
- }
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id %d: New case %s created.\n",
- fltnm, cpu->cpu_cpuid, uuid);
- if (cmd_Lxcache->Lxcache_ep)
- fmd_case_add_ereport(hdl, cmd_Lxcache->Lxcache_case.cc_cp,
- cmd_Lxcache->Lxcache_ep);
- return (B_TRUE);
-}
-
-static int
-cmd_repair_fmri(fmd_hdl_t *hdl, char *buf)
-{
- int err;
-
- err = fmd_repair_asru(hdl, buf);
- if (err) {
- fmd_hdl_debug(hdl,
- "Failed to repair %s err = %d\n", buf, err);
- }
- return (err);
-}
-
-boolean_t
-cmd_Lxcache_unretire(fmd_hdl_t *hdl, cmd_cpu_t *cpu,
- cmd_Lxcache_t *unretire_this_Lxcache, const char *fltnm)
-{
- cmd_ptrsubtype_t data_type;
- cmd_Lxcache_t *previously_retired_Lxcache;
- int found_reretired_cacheline = 0;
- int certainty;
-
- /*
- * If we are unretiring a cacheline retired due to suspected TAG
- * fault, then we must first check if we are using a cacheline
- * that was retired earlier for DATA fault.
- * If so we will not unretire the cacheline.
- * We will change the flags to reflect the current condition.
- * We will return success, though.
- */
- if (IS_TAG(unretire_this_Lxcache->Lxcache_type)) {
- if (unretire_this_Lxcache->Lxcache_type == CMD_PTR_CPU_L2TAG)
- data_type = CMD_PTR_CPU_L2DATA;
- if (unretire_this_Lxcache->Lxcache_type == CMD_PTR_CPU_L3TAG)
- data_type = CMD_PTR_CPU_L3DATA;
- fmd_hdl_debug(hdl,
- "\n%s:cpuid %d checking if there is a %s"
- " cacheline re-retired at this index %d and way %d\n",
- fltnm, cpu->cpu_cpuid, cmd_type_to_str(data_type),
- unretire_this_Lxcache->Lxcache_index,
- unretire_this_Lxcache->Lxcache_way);
- previously_retired_Lxcache =
- cmd_Lxcache_lookup_by_type_index_way_flags(
- cpu, data_type, unretire_this_Lxcache->Lxcache_index,
- unretire_this_Lxcache->Lxcache_way,
- CMD_LxCACHE_F_RERETIRED);
- if (previously_retired_Lxcache) {
- fmd_hdl_debug(hdl,
- "\n%s:cpuid %d Found a %s cacheline re-retired at"
- " this index %d and way %d. Will mark this"
- " RETIRED\n",
- fltnm, cpu->cpu_cpuid, cmd_type_to_str(data_type),
- unretire_this_Lxcache->Lxcache_index,
- unretire_this_Lxcache->Lxcache_way);
- /*
- * We call the cmd_Lxcache_fault to inform fmd
- * about the suspect fmri. The cacheline is already
- * retired but the existing suspect fmri is for TAG
- * fault which will be removed in this routine.
- */
- if (previously_retired_Lxcache->Lxcache_reason
- == CMD_LXCONVICTED)
- certainty = HUNDRED_PERCENT;
- else
- certainty = SUSPECT_PERCENT;
- cmd_Lxcache_fault(hdl, cpu, previously_retired_Lxcache,
- fltnm, cpu->cpu_fru_nvl, certainty);
- previously_retired_Lxcache->Lxcache_flags =
- CMD_LxCACHE_F_RETIRED;
- /*
- * Update persistent storage
- */
- cmd_Lxcache_write(hdl, previously_retired_Lxcache);
- found_reretired_cacheline = 1;
- }
- } else {
- /*
- * We have been called to unretire a cacheline retired
- * earlier due to DATA errors.
- * If this cacheline is marked RERETIRED then it means that
- * the cacheline has been retired due to TAG errors and
- * we should not be unretiring the cacheline.
- */
- if (unretire_this_Lxcache->Lxcache_flags &
- CMD_LxCACHE_F_RERETIRED) {
- fmd_hdl_debug(hdl,
- "\n%s:cpuid %d The cacheline at index %d and"
- " way %d which we are attempting to unretire"
- " is in RERETIRED state. Therefore we will not"
- " unretire it but will mark it as RETIRED.\n",
- fltnm, cpu->cpu_cpuid,
- unretire_this_Lxcache->Lxcache_index,
- unretire_this_Lxcache->Lxcache_way);
- found_reretired_cacheline = 1;
- }
- }
- /*
- * if we did not find a RERETIRED cacheline above
- * unretire the cacheline.
- */
- if (!found_reretired_cacheline) {
- if (cmd_cache_way_unretire(hdl, cpu, unretire_this_Lxcache)
- == B_FALSE)
- return (B_FALSE);
- }
- unretire_this_Lxcache->Lxcache_flags = CMD_LxCACHE_F_UNRETIRED;
- /*
- * We have exonerated the cacheline. We need to inform the fmd
- * that we have repaired the suspect fmri that we retired earlier.
- * The cpumem agent will not unretire cacheline in response to
- * the list.repair events it receives.
- */
- if (unretire_this_Lxcache->Lxcache_retired_fmri[0] != 0) {
- fmd_hdl_debug(hdl,
- "\n%s:cpuid %d Repairing the retired fmri %s",
- fltnm, cpu->cpu_cpuid,
- unretire_this_Lxcache->Lxcache_retired_fmri);
- if (cmd_repair_fmri(hdl,
- unretire_this_Lxcache->Lxcache_retired_fmri) != 0) {
- fmd_hdl_debug(hdl,
- "\n%s:cpuid %d Failed to repair retired fmri.",
- fltnm, cpu->cpu_cpuid);
- /*
- * We need to retire the cacheline that we just
- * unretired.
- */
- if (cmd_cache_way_retire(hdl, cpu,
- unretire_this_Lxcache) == B_FALSE) {
- /*
- * A hopeless situation.
- * cannot maintain consistency of cacheline
- * sate between fmd and DE.
- * Aborting the DE.
- */
- fmd_hdl_abort(hdl,
- "\n%s:cpuid %d We are unable to repair"
- " the fmri we just unretired and are"
- " unable to restore the DE and fmd to"
- " a sane state.\n",
- fltnm, cpu->cpu_cpuid);
- }
- return (B_FALSE);
- } else {
- unretire_this_Lxcache->Lxcache_retired_fmri[0] = 0;
- }
- }
- return (B_TRUE);
-}
-
-boolean_t
-cmd_Lxcache_retire(fmd_hdl_t *hdl, cmd_cpu_t *cpu,
- cmd_Lxcache_t *retire_this_Lxcache, const char *fltnm, uint_t cert)
-{
- cmd_Lxcache_t *previously_retired_Lxcache;
- cmd_ptrsubtype_t data_type;
- const char *uuid;
- char suspect_list[128];
-
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id %d: cmd_Lxcache_retire called for index %d"
- " way %d bit %d\n",
- fltnm, cpu->cpu_cpuid, retire_this_Lxcache->Lxcache_index,
- retire_this_Lxcache->Lxcache_way, retire_this_Lxcache->Lxcache_bit);
- if (fmd_case_solved(hdl, retire_this_Lxcache->Lxcache_case.cc_cp)) {
- /*
- * Case solved implies that the cache line is already
- * retired as SUSPECT_0_TAG and we are here to retire this
- * as SUSPECT_1_TAG.
- * We will first repair the retired cacheline
- * so that it does not get retired during replay for
- * wrong reason.
- * If we are able to repair the retired cacheline we close the
- * case and open a new case for it.
- */
- if (retire_this_Lxcache->Lxcache_reason !=
- CMD_LXSUSPECT_0_TAG) {
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id %d: Unexpected condition encountered."
- " Expected the reason for retirement as"
- " SUSPECT_0_TAG however found the reason"
- " to be %s\n",
- fltnm, cpu->cpu_cpuid,
- cmd_reason_to_str(
- retire_this_Lxcache->Lxcache_reason));
- return (B_FALSE);
- }
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id %d: We are re-retiring SUSPECT_0_TAG as"
- " SUSPECT_1_TAG index %d way %d bit %d\n",
- fltnm, cpu->cpu_cpuid,
- retire_this_Lxcache->Lxcache_index,
- retire_this_Lxcache->Lxcache_way,
- retire_this_Lxcache->Lxcache_bit);
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id %d: The existing case for this Lxcache has"
- " has been already solved. We will first repair the suspect"
- " cacheline and if we are successful then close this case,"
- " and open a new case.\n",
- fltnm, cpu->cpu_cpuid);
- /*
- * repair the retired cacheline.
- */
- if (retire_this_Lxcache->Lxcache_retired_fmri[0] != 0) {
- fmd_hdl_debug(hdl,
- "\n%s:cpuid %d Repairing the retired suspect"
- " cacheline %s\n",
- fltnm, cpu->cpu_cpuid,
- retire_this_Lxcache->Lxcache_retired_fmri);
- if (cmd_repair_fmri(hdl,
- retire_this_Lxcache->Lxcache_retired_fmri) != 0) {
- fmd_hdl_debug(hdl,
- "\n%s:cpuid %d Failed to repair the"
- " retired fmri.",
- fltnm, cpu->cpu_cpuid);
- return (B_FALSE);
- } else {
- retire_this_Lxcache->Lxcache_retired_fmri[0] =
- 0;
- }
- }
- uuid = fmd_case_uuid(hdl,
- retire_this_Lxcache->Lxcache_case.cc_cp);
- fmd_hdl_debug(hdl,
- "\n%s:cpuid %d: Closing the case %s\n",
- fltnm, cpu->cpu_cpuid, uuid);
- cmd_case_fini(hdl, retire_this_Lxcache->Lxcache_case.cc_cp,
- FMD_B_TRUE);
- retire_this_Lxcache->Lxcache_case.cc_cp = NULL;
- if (cmd_create_case_for_Lxcache(hdl, cpu, retire_this_Lxcache)
- == B_FALSE)
- return (B_FALSE);
- } else {
- /*
- * Not a SUSPECT_0_TAG.
- * We should be entering this path if the cacheline is
- * transitioning from ACTIVE/UNRETIRED to RETIRED state.
- * If the cacheline state is not as expected we print debug
- * message and return failure.
- */
- if ((retire_this_Lxcache->Lxcache_flags !=
- CMD_LxCACHE_F_ACTIVE) &&
- (retire_this_Lxcache->Lxcache_flags
- != CMD_LxCACHE_F_UNRETIRED)) {
- /*
- * Unexpected condition.
- */
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id %d:Unexpected state %s for the"
- " cacheline at index %d way %d encountered.\n",
- fltnm, cpu->cpu_cpuid,
- cmd_flags_to_str(
- retire_this_Lxcache->Lxcache_flags),
- retire_this_Lxcache->Lxcache_index,
- retire_this_Lxcache->Lxcache_way);
- return (B_FALSE);
- }
- }
- suspect_list[0] = 0;
- (void) cmd_fmri_nvl2str(hdl, retire_this_Lxcache->Lxcache_asru.fmri_nvl,
- suspect_list, sizeof (suspect_list));
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id %d:current suspect list is %s\n",
- fltnm, cpu->cpu_cpuid, suspect_list);
- cmd_Lxcache_fault(hdl, cpu, retire_this_Lxcache, fltnm,
- cpu->cpu_fru_nvl,
- cert);
- retire_this_Lxcache->Lxcache_flags = CMD_LxCACHE_F_RETIRED;
- if (IS_TAG(retire_this_Lxcache->Lxcache_type)) {
- /*
- * If the cacheline we just retired was retired earlier
- * due to DATA faults we mark the Lxcache
- * corresponding to DATA as RERETIRED.
- */
- if (retire_this_Lxcache->Lxcache_type == CMD_PTR_CPU_L2TAG)
- data_type = CMD_PTR_CPU_L2DATA;
- if (retire_this_Lxcache->Lxcache_type == CMD_PTR_CPU_L3TAG)
- data_type = CMD_PTR_CPU_L3DATA;
- fmd_hdl_debug(hdl,
- "\n%s:cpuid %d checking if there is a %s"
- " cacheline retired at this index %d way %d\n",
- fltnm, cpu->cpu_cpuid,
- cmd_type_to_str(data_type),
- retire_this_Lxcache->Lxcache_index,
- retire_this_Lxcache->Lxcache_way);
- previously_retired_Lxcache =
- cmd_Lxcache_lookup_by_type_index_way_flags(cpu,
- data_type, retire_this_Lxcache->Lxcache_index,
- retire_this_Lxcache->Lxcache_way, CMD_LxCACHE_F_RETIRED);
- if (previously_retired_Lxcache) {
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id %d: Found index %d way %d"
- " retired earlier. Will mark this Lxcache"
- " as RERETIRED.\n",
- fltnm, cpu->cpu_cpuid,
- retire_this_Lxcache->Lxcache_index,
- retire_this_Lxcache->Lxcache_way);
- /*
- * First repair the retired cacheline and if successful
- * close the existing case and create a new case.
- */
-
- /*
- * This cacheline has already been retired for
- * TAG fault.
- * Repair the previously retired DATA fault cacheline so
- * that it does not get retired by fmd during replay.
- */
- if (previously_retired_Lxcache->Lxcache_retired_fmri[0]
- != 0) {
- fmd_hdl_debug(hdl,
- "\n%s:cpuid %d Repairing the cacheline"
- " retired due to data errors. %s\n",
- fltnm, cpu->cpu_cpuid,
- previously_retired_Lxcache->
- Lxcache_retired_fmri);
- if (cmd_repair_fmri(hdl,
- previously_retired_Lxcache->
- Lxcache_retired_fmri)
- != 0) {
- fmd_hdl_debug(hdl,
- "\n%s:cpuid %d Failed to repair the"
- " retired fmri.",
- fltnm, cpu->cpu_cpuid);
- return (B_FALSE);
- } else {
- previously_retired_Lxcache->
- Lxcache_retired_fmri[0] = 0;
- }
- }
- cmd_case_fini(hdl,
- previously_retired_Lxcache->Lxcache_case.cc_cp,
- FMD_B_TRUE);
- previously_retired_Lxcache->Lxcache_case.cc_cp = NULL;
- previously_retired_Lxcache->Lxcache_flags =
- CMD_LxCACHE_F_RERETIRED;
- /*
- * Update persistent storage
- */
- cmd_Lxcache_write(hdl, previously_retired_Lxcache);
- /*
- * Create a new case so that this Lxcache structure
- * gets restored on replay.
- */
- if (cmd_create_case_for_Lxcache(hdl, cpu,
- previously_retired_Lxcache) == B_FALSE)
- return (B_FALSE);
- }
- }
- cmd_retire_cpu_if_limits_exceeded(hdl, cpu,
- retire_this_Lxcache->Lxcache_type,
- fltnm);
- return (B_TRUE);
-}
diff --git a/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_Lxcacheerr.c b/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_Lxcacheerr.c
deleted file mode 100644
index 6dd58d5a2c..0000000000
--- a/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_Lxcacheerr.c
+++ /dev/null
@@ -1,2048 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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.
- */
-
-
-/*
- * Support routines for managing per-Lxcache state.
- */
-
-#include <sys/types.h>
-#include <errno.h>
-#include <strings.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <stropts.h>
-#include <fm/fmd_api.h>
-#include <sys/fm/protocol.h>
-#include <sys/fm/cpu/UltraSPARC-III.h>
-#include <sys/cpuvar.h>
-#include <cmd_Lxcache.h>
-#include <cmd_mem.h>
-#include <cmd_cpu.h>
-#include <cmd_state.h>
-#include <cmd.h>
-#define _KERNEL
-#include <sys/cheetahregs.h>
-#include <sys/mem_cache.h>
-#undef _KERNEL
-#include <sys/errclassify.h>
-#include <sys/fm/io/sun4upci.h>
-
-#include <fmd_adm.h>
-#include <fmd_adm_impl.h>
-#include <fmd_rpc_adm.h>
-
-#define PN_CACHE_ERRORS (CMD_ERRCL_UCC | CMD_ERRCL_WDC | \
- CMD_ERRCL_CPC | CMD_ERRCL_EDC | \
- CMD_ERRCL_L3_UCC | CMD_ERRCL_L3_CPC |\
- CMD_ERRCL_L3_WDC | CMD_ERRCL_L3_EDC)
-
-/* Note that these are the same for panther L2 and L3 (see prm) */
-
-#define LX_INDEX_MASK PN_L2_INDEX_MASK
-#define LX_INDEX_SHIFT 6
-#define PN_ECSTATE_NA 5
-#define PN_ECSTATE_INV 0
-
-#define PN_L3_INDEX_MASK PN_L3_TAG_RD_MASK
-
-static const errdata_t l3errdata =
- { &cmd.cmd_l3data_serd, "l3cachedata", CMD_PTR_LxCACHE_CASE };
-static const errdata_t l2errdata =
- { &cmd.cmd_l2data_serd, "l2cachedata", CMD_PTR_LxCACHE_CASE };
-
-/* Macro for putting 64-bit onto stack as two 32-bit ints */
-#define PRTF_64_TO_32(x) (uint32_t)((x)>>32), (uint32_t)(x)
-
-#define LX_PA_MASK2_32BIT_CORRECT 16
-#define LX_PA_MASK3_32BIT_CORRECT 24
-#define LX_PA_MASK2 0x7fffff8
-#define LX_PA_MASK3 0x7ffff8
-
-
-#define MAX_RETRIES_FOR_ECC_MATCH 3
-#define PN_TAG_ECC_MASK 0x7fc0
-#define PN_L2_PTAG_SHIFT 19
-#define PN_L3_PTAG_SHIFT 24
-#define L2_PTAG_MASK 0xffffff
-#define L3_PTAG_MASK 0xfffff
-#define BIT_MASK 0x7f
-#define MSB_BIT 0x8000
-#define SET_MSB_BIT 0x8000
-#define CLEAR_MSB_BIT 0x7fff
-#define PN_LX_TAG_ECC_START_BIT 6
-#define PN_LX_TAG_ECC_END_BIT 14
-#define PN_LX_STATE_END_BIT 2
-#define PN_LX_NUM_OF_BITS_IN_ECC 9
-
-#define LX_NWAYS 4
-
-int test_mode = 0; /* should be 0 in production version. */
-#define FM_EREPORT_RECHECK_OF_TAGS "recheck_tags"
-#define RETRIES_TO_BE_DONE_WHEN_SYND_IS_ZERO 3
-uint32_t cmd_Lxcache_recheck_tags_delay
- [RETRIES_TO_BE_DONE_WHEN_SYND_IS_ZERO + 1] = {0, 1, 2, 4};
-
-/*
- * e (for ecctable) maps single bit positions (0-127, or 0-0x7F) to the
- * corresponding ECC syndromes for an error in that position.
- */
-int e[] = {
- /* From Table P-4, JPS1 US-III Supplement */
- /* 0 1 2 3 4 5 6 7 */
-/* 00 */ 0x03B, 0x127, 0x067, 0x097, 0x10F, 0x08F, 0x04F, 0x02C,
-/* 08 */ 0x147, 0x0C7, 0x02F, 0x01C, 0x117, 0x032, 0x08A, 0x04A,
-/* 10 */ 0x01F, 0x086, 0x046, 0x026, 0x09B, 0x08C, 0x0C1, 0x0A1,
-/* 18 */ 0x01A, 0x016, 0x061, 0x091, 0x052, 0x00E, 0x109, 0x029,
-/* 20 */ 0x02A, 0x019, 0x105, 0x085, 0x045, 0x025, 0x015, 0x103,
-/* 28 */ 0x031, 0x00D, 0x083, 0x043, 0x051, 0x089, 0x023, 0x007,
-/* 30 */ 0x0B9, 0x049, 0x013, 0x0A7, 0x057, 0x00B, 0x07A, 0x187,
-/* 38 */ 0x0F8, 0x11B, 0x079, 0x034, 0x178, 0x1D8, 0x05B, 0x04C,
-/* 40 */ 0x064, 0x1B4, 0x037, 0x03D, 0x058, 0x13C, 0x1B1, 0x03E,
-/* 48 */ 0x1C3, 0x0BC, 0x1A0, 0x1D4, 0x1CA, 0x190, 0x124, 0x13A,
-/* 50 */ 0x1C0, 0x188, 0x122, 0x114, 0x184, 0x182, 0x160, 0x118,
-/* 58 */ 0x181, 0x150, 0x148, 0x144, 0x142, 0x141, 0x130, 0x0A8,
-/* 60 */ 0x128, 0x121, 0x0E0, 0x094, 0x112, 0x10C, 0x0D0, 0x0B0,
-/* 68 */ 0x10A, 0x106, 0x062, 0x1B2, 0x0C8, 0x0C4, 0x0C2, 0x1F0,
-/* 70 */ 0x0A4, 0x0A2, 0x098, 0x1D1, 0x070, 0x1E8, 0x1C6, 0x1C5,
-/* 78 */ 0x068, 0x1E4, 0x1E2, 0x1E1, 0x1D2, 0x1CC, 0x1C9, 0x1B8,
- /* Now we have the check bits */
- /* C0 C1 C2 C3 C4 C5 C6 C7 C8 */
- 0x001, 0x002, 0x004, 0x008, 0x010, 0x020, 0x040, 0x080, 0x100,
-};
-
-#define NBITS (sizeof (e)/sizeof (e[0]))
-#define NDATABITS (128)
-/*
- * This table is used to determine which bit(s) is(are) bad when an ECC
- * error occurs. The array is indexed by an 9-bit syndrome. The entries
- * of this array have the following semantics:
- *
- * 00-127 The number of the bad bit, when only one bit is bad.
- * 128 ECC bit C0 is bad.
- * 129 ECC bit C1 is bad.
- * 130 ECC bit C2 is bad.
- * 131 ECC bit C3 is bad.
- * 132 ECC bit C4 is bad.
- * 133 ECC bit C5 is bad.
- * 134 ECC bit C6 is bad.
- * 135 ECC bit C7 is bad.
- * 136 ECC bit C8 is bad.
- * 137-143 reserved for Mtag Data and ECC.
- * 144(M2) Two bits are bad within a nibble.
- * 145(M3) Three bits are bad within a nibble.
- * 146(M3) Four bits are bad within a nibble.
- * 147(M) Multiple bits (5 or more) are bad.
- * 148 NO bits are bad.
- * Based on "Cheetah Programmer's Reference Manual" rev 1.1, Tables 11-4,11-5.
- */
-
-#define C0 128
-#define C1 129
-#define C2 130
-#define C3 131
-#define C4 132
-#define C5 133
-#define C6 134
-#define C7 135
-#define C8 136
-#define MT0 137 /* Mtag Data bit 0 */
-#define MT1 138
-#define MT2 139
-#define MTC0 140 /* Mtag Check bit 0 */
-#define MTC1 141
-#define MTC2 142
-#define MTC3 143
-#define M2 144
-#define M3 145
-#define M4 146
-#define M 147
-#define NA 148
-#if defined(JALAPENO) || defined(SERRANO)
-#define S003 149 /* Syndrome 0x003 => likely from CPU/EDU:ST/FRU/BP */
-#define S003MEM 150 /* Syndrome 0x003 => likely from WDU/WBP */
-#define SLAST S003MEM /* last special syndrome */
-#else /* JALAPENO || SERRANO */
-#define S003 149 /* Syndrome 0x003 => likely from EDU:ST */
-#define S071 150 /* Syndrome 0x071 => likely from WDU/CPU */
-#define S11C 151 /* Syndrome 0x11c => likely from BERR/DBERR */
-#define SLAST S11C /* last special syndrome */
-#endif /* JALAPENO || SERRANO */
-#if defined(JALAPENO) || defined(SERRANO)
-#define BPAR0 152 /* syndrom 152 through 167 for bus parity */
-#define BPAR15 167
-#endif /* JALAPENO || SERRANO */
-
-static uint8_t ecc_syndrome_tab[] =
-{
-NA, C0, C1, S003, C2, M2, M3, 47, C3, M2, M2, 53, M2, 41, 29, M,
-C4, M, M, 50, M2, 38, 25, M2, M2, 33, 24, M2, 11, M, M2, 16,
-C5, M, M, 46, M2, 37, 19, M2, M, 31, 32, M, 7, M2, M2, 10,
-M2, 40, 13, M2, 59, M, M2, 66, M, M2, M2, 0, M2, 67, 71, M,
-C6, M, M, 43, M, 36, 18, M, M2, 49, 15, M, 63, M2, M2, 6,
-M2, 44, 28, M2, M, M2, M2, 52, 68, M2, M2, 62, M2, M3, M3, M4,
-M2, 26, 106, M2, 64, M, M2, 2, 120, M, M2, M3, M, M3, M3, M4,
-#if defined(JALAPENO) || defined(SERRANO)
-116, M2, M2, M3, M2, M3, M, M4, M2, 58, 54, M2, M, M4, M4, M3,
-#else /* JALAPENO || SERRANO */
-116, S071, M2, M3, M2, M3, M, M4, M2, 58, 54, M2, M, M4, M4, M3,
-#endif /* JALAPENO || SERRANO */
-C7, M2, M, 42, M, 35, 17, M2, M, 45, 14, M2, 21, M2, M2, 5,
-M, 27, M, M, 99, M, M, 3, 114, M2, M2, 20, M2, M3, M3, M,
-M2, 23, 113, M2, 112, M2, M, 51, 95, M, M2, M3, M2, M3, M3, M2,
-103, M, M2, M3, M2, M3, M3, M4, M2, 48, M, M, 73, M2, M, M3,
-M2, 22, 110, M2, 109, M2, M, 9, 108, M2, M, M3, M2, M3, M3, M,
-102, M2, M, M, M2, M3, M3, M, M2, M3, M3, M2, M, M4, M, M3,
-98, M, M2, M3, M2, M, M3, M4, M2, M3, M3, M4, M3, M, M, M,
-M2, M3, M3, M, M3, M, M, M, 56, M4, M, M3, M4, M, M, M,
-C8, M, M2, 39, M, 34, 105, M2, M, 30, 104, M, 101, M, M, 4,
-#if defined(JALAPENO) || defined(SERRANO)
-M, M, 100, M, 83, M, M2, 12, 87, M, M, 57, M2, M, M3, M,
-#else /* JALAPENO || SERRANO */
-M, M, 100, M, 83, M, M2, 12, 87, M, M, 57, S11C, M, M3, M,
-#endif /* JALAPENO || SERRANO */
-M2, 97, 82, M2, 78, M2, M2, 1, 96, M, M, M, M, M, M3, M2,
-94, M, M2, M3, M2, M, M3, M, M2, M, 79, M, 69, M, M4, M,
-M2, 93, 92, M, 91, M, M2, 8, 90, M2, M2, M, M, M, M, M4,
-89, M, M, M3, M2, M3, M3, M, M, M, M3, M2, M3, M2, M, M3,
-86, M, M2, M3, M2, M, M3, M, M2, M, M3, M, M3, M, M, M3,
-M, M, M3, M2, M3, M2, M4, M, 60, M, M2, M3, M4, M, M, M2,
-M2, 88, 85, M2, 84, M, M2, 55, 81, M2, M2, M3, M2, M3, M3, M4,
-77, M, M, M, M2, M3, M, M, M2, M3, M3, M4, M3, M2, M, M,
-74, M, M2, M3, M, M, M3, M, M, M, M3, M, M3, M, M4, M3,
-M2, 70, 107, M4, 65, M2, M2, M, 127, M, M, M, M2, M3, M3, M,
-80, M2, M2, 72, M, 119, 118, M, M2, 126, 76, M, 125, M, M4, M3,
-M2, 115, 124, M, 75, M, M, M3, 61, M, M4, M, M4, M, M, M,
-M, 123, 122, M4, 121, M4, M, M3, 117, M2, M2, M3, M4, M3, M, M,
-111, M, M, M, M4, M3, M3, M, M, M, M3, M, M3, M2, M, M
-};
-
-#define ESYND_TBL_SIZE (sizeof (ecc_syndrome_tab) / sizeof (uint8_t))
-
-int8_t L2TAG_bit_to_way_map[128] = {
-/* 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
-/* 1 */ 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 0, 0, 0, 0,
-/* 2 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-/* 3 */ 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
-/* 4 */ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -1, -1, -1, -1,
-/* 5 */-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 1,
-/* 6 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-/* 7 */ 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
-/* 8 */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, -1, -1, -1, -1,
-};
-
-uint8_t L2TAG_bit_to_way_bit[128] = {
-/* 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
-/* 1 */ 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 19, 20, 21, 22,
-/* 2 */23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
-/* 3 */39, 40, 41, 42, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
-/* 4 */31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, C0, C0, C0, C0,
-/* 5 */C0, C0, C0, C0, C0, C0, C0, C0, C0, C0, C0, C0, 19, 20, 21, 22,
-/* 6 */23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
-/* 7 */39, 40, 41, 42, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
-/* 8 */31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, C0, C0, C0, C0,
-};
-
-int8_t L3TAG_bit_to_way_map[128] = {
-/* 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
-/* 1 */ 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3,
-/* 2 */ 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3,
-/* 3 */ 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, -1, -1,
-/* 4 */-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-/* 5 */ 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2,
-/* 6 */ 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2,
-/* 7 */ 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, -1, -1,
-/* 8 */-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-};
-
-uint8_t L3TAG_bit_to_way_bit[128] = {
-/* 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
-/* 1 */ 0, 0, 1, 1, 2, 2, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28,
-/* 2 */29, 29, 30, 30, 31, 31, 32, 32, 33, 33, 34, 34, 35, 35, 36, 36,
-/* 3 */37, 37, 38, 38, 39, 39, 40, 40, 41, 41, 42, 42, 43, 43, C0, C0,
-/* 4 */C0, C0, C0, C0, C0, C0, C0, C0, C0, C0, C0, C0, C0, C0, C0, C0,
-/* 5 */ 0, 0, 1, 1, 2, 2, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28,
-/* 6 */29, 29, 30, 30, 31, 31, 32, 32, 33, 33, 34, 34, 35, 35, 36, 36,
-/* 7 */37, 37, 38, 38, 39, 39, 40, 40, 41, 41, 42, 42, 43, 43, C0, C0,
-/* 8 */C0, C0, C0, C0, C0, C0, C0, C0, C0, C0, C0, C0, C0, C0, C0, C0,
-};
-
-uint16_t
-calcecc(uint64_t chi, uint64_t clo)
-{
- int i;
- uint64_t syndrome = 0;
-
- for (i = 0; i < (NDATABITS/2); i++) {
- syndrome ^= ((chi & 1) ? e[(NDATABITS/2) + i] : 0) ^
- ((clo & 1) ? e[i] : 0);
- chi >>= 1;
- clo >>= 1;
- }
- return (uint16_t)(syndrome);
-}
-
-uint64_t
-calcsynd(uint64_t chi, uint64_t clo, uint64_t ecc)
-{
- return (calcecc(chi, clo) ^ ecc);
-}
-
-static uint8_t
-tag_bit_to_way_bit(cmd_ptrsubtype_t pstype, int16_t tag_bit)
-{
- uint8_t way_bit = C0;
-
- switch (pstype) {
- case CMD_PTR_CPU_L2TAG:
- way_bit = L2TAG_bit_to_way_bit[tag_bit];
- break;
- case CMD_PTR_CPU_L3TAG:
- way_bit = L3TAG_bit_to_way_bit[tag_bit];
- break;
- }
- return (way_bit);
-}
-
-static int8_t
-bit_to_way(cmd_ptrsubtype_t pstype, uint32_t bit)
-{
- int8_t way = -1;
-
- switch (pstype) {
- case CMD_PTR_CPU_L2TAG:
- way = L2TAG_bit_to_way_map[bit & BIT_MASK];
- break;
- case CMD_PTR_CPU_L3TAG:
- way = L3TAG_bit_to_way_map[bit & BIT_MASK];
- break;
- }
- return (way);
-}
-
-static int32_t
-get_index(cmd_ptrsubtype_t pstype, uint64_t tag_afar)
-{
- int32_t index = -1;
-
- switch (pstype) {
- case CMD_PTR_CPU_L2TAG:
- index = (int32_t)((tag_afar & PN_L2_INDEX_MASK)
- >> PN_CACHE_LINE_SHIFT);
- break;
- case CMD_PTR_CPU_L3TAG:
- index = (int32_t)((tag_afar & PN_L3_TAG_RD_MASK)
- >> PN_CACHE_LINE_SHIFT);
- break;
- }
- return (index);
-}
-
-static int
-get_retired_ways(uint64_t *tag_data)
-{
- int i, retired_ways;
-
- retired_ways = 0;
- for (i = 0; i < PN_CACHE_NWAYS; i++) {
- if ((tag_data[i] & CH_ECSTATE_MASK) ==
- PN_ECSTATE_NA)
- retired_ways++;
- }
- return (retired_ways);
-}
-
-static cmd_evdisp_t
-extract_data_from_ereport_payload(fmd_hdl_t *hdl, nvlist_t *nvl,
- cmd_cpu_t *cpu,
- cmd_ptrsubtype_t pstype,
- uint64_t *afarp, uint64_t *tag_data,
- const char *fltnm)
-{
- ch_ec_data_t *ec_data;
- char *payload_namep;
- int tag_afar_status;
- uint64_t tag_afar;
- int i;
- uint_t sz;
- int32_t index;
- int32_t recheck_of_tags;
-
- tag_afar_status = cmd_afar_valid(hdl, nvl, 0, &tag_afar);
- if (tag_afar_status == -1) {
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id = %d Invalid afar status in nvlist\n",
- fltnm, cpu->cpu_cpuid);
- return (CMD_EVD_BAD);
- }
- *afarp = tag_afar;
- index = get_index(pstype, tag_afar);
- switch (pstype) {
- case CMD_PTR_CPU_L2TAG:
- payload_namep = FM_EREPORT_PAYLOAD_NAME_L2_DATA;
- break;
- case CMD_PTR_CPU_L3TAG:
- payload_namep = FM_EREPORT_PAYLOAD_NAME_L3_DATA;
- break;
- default:
- return (CMD_EVD_BAD);
- }
- if (nvlist_lookup_int32(nvl, FM_EREPORT_RECHECK_OF_TAGS,
- &recheck_of_tags) != 0)
- recheck_of_tags = 0;
- if ((recheck_of_tags) || (test_mode))
- return (get_tagdata(cpu, pstype, index, tag_data));
- if (nvlist_lookup_uint64_array(nvl, payload_namep,
- (uint64_t **)&ec_data, &sz) != 0) {
- fmd_hdl_debug(hdl,
- "\n%s: cpu_id = %d index = %d could not find %s"
- " in nvlist\n",
- fltnm, cpu->cpu_cpuid, index, payload_namep);
- fmd_hdl_debug(hdl,
- "\n%s: cpu_id = %d Reading tag data through"
- " mem_cache driver.\n",
- fltnm, cpu->cpu_cpuid);
- return (get_tagdata(cpu, pstype, index,
- tag_data));
- }
- for (i = 0; i < PN_CACHE_NWAYS; i++) {
- tag_data[i] = ec_data[i].ec_tag;
- }
- return (CMD_EVD_OK);
-}
-
-static void
-print_ecc(fmd_hdl_t *hdl, cmd_cpu_t *cpu, const char *fltnm, uint64_t *tag_data)
-{
- int i;
- uint16_t tag_ecc[PN_CACHE_NWAYS];
-
- for (i = 0; i < PN_CACHE_NWAYS; i++) {
- tag_ecc[i] =
- ((tag_data[i] & PN_TAG_ECC_MASK)
- >> PN_LX_TAG_ECC_START_BIT);
- }
- fmd_hdl_debug(hdl,
- "\n%s: cpu_id = %d ecc[0] = 0x%03x ecc[1] = 0x%03x"
- " ecc[2] = 0x%03x ecc[3] = 0x%03x\n",
- fltnm, cpu->cpu_cpuid, tag_ecc[0], tag_ecc[1], tag_ecc[2],
- tag_ecc[3]);
-
-}
-
-static int
-matching_ecc(uint64_t *tag_data)
-{
- int i;
- uint16_t tag_ecc[PN_CACHE_NWAYS];
-
- for (i = 0; i < PN_CACHE_NWAYS; i++) {
- tag_ecc[i] =
- ((tag_data[i] & PN_TAG_ECC_MASK)
- >> PN_LX_TAG_ECC_START_BIT);
- if (tag_ecc[i] != tag_ecc[0]) {
- return (1);
- }
- }
- return (0);
-}
-
-static void
-gen_data_for_ecc(uint64_t *tag_data, uint64_t *data_for_ecc_gen,
- cmd_ptrsubtype_t pstype)
-{
- uint64_t ptag[PN_CACHE_NWAYS];
- uint8_t state[PN_CACHE_NWAYS];
- int i;
- uint8_t bit_position;
-
- for (i = 0; i < PN_CACHE_NWAYS; i++) {
- state[i] = tag_data[i] & CH_ECSTATE_MASK;
- switch (pstype) {
- case CMD_PTR_CPU_L2TAG:
- ptag[i] = (tag_data[i] >> PN_L2_PTAG_SHIFT) &
- L2_PTAG_MASK;
- break;
- case CMD_PTR_CPU_L3TAG:
- ptag[i] = (tag_data[i] >> PN_L3_PTAG_SHIFT) &
- L3_PTAG_MASK;
- break;
- }
- }
- /*
- * We now assemble the 128 bit data swizzling the Physical tags
- * and states we obtained for all the 4 ways.
- */
- data_for_ecc_gen[0] = 0; /* high order 64 bits */
- data_for_ecc_gen[1] = 0; /* low order 64 bits */
- switch (pstype) {
- case CMD_PTR_CPU_L2TAG:
- data_for_ecc_gen[1] = state[0]; /* way 0 state */
- data_for_ecc_gen[1] |=
- (state[1] << 3); /* way 1 state */
- data_for_ecc_gen[1] |=
- (state[2] << 6); /* way 2 state */
- data_for_ecc_gen[1] |=
- (state[3] << 9); /* way 3 state */
- data_for_ecc_gen[1] |= (ptag[0] << 12); /* way 0 ptag */
- data_for_ecc_gen[1] |= (ptag[2] << 36); /* way 2 ptag */
- /* bits 63:60 of low order 64 bits are 0s */
-
- /*
- * We now start with hig order 64 bits.
- * the low 12 bits are 0s
- */
- data_for_ecc_gen[0] |= (ptag[1] << 12); /* way 1 ptag */
- data_for_ecc_gen[0] |= (ptag[3] << 36); /* way 3 ptag */
- break;
- case CMD_PTR_CPU_L3TAG:
- bit_position = 0;
- /*
- * Swizzle state bits for way 1 and way 3
- */
- for (i = 0; i < 3; i++) {
- data_for_ecc_gen[1] |=
- (((state[1] >> i) & 1) << bit_position);
- bit_position++;
- data_for_ecc_gen[1] |=
- (((state[3] >> i) & 1) << bit_position);
- bit_position++;
- }
- /*
- * Swizzle physical tag bits for way 1 and way 3
- */
- for (i = 0; i < 20; i++) {
- data_for_ecc_gen[1] |=
- (((ptag[1] >> i) & 1) << bit_position);
- bit_position++;
- data_for_ecc_gen[1] |=
- (((ptag[3] >> i) & 1) << bit_position);
- bit_position++;
- }
- /*
- * start the high order 64 bits.
- */
- bit_position = 0;
- /*
- * Swizzle state bits for way 0 and way 2
- */
- for (i = 0; i < 3; i++) {
- data_for_ecc_gen[0] |=
- (((state[0] >> i) & 1) << bit_position);
- bit_position++;
- data_for_ecc_gen[0] |=
- (((state[2] >> i) & 1) << bit_position);
- bit_position++;
- }
- /*
- * Swizzle physical tag bits for way 0 and way 2
- */
- for (i = 0; i < 20; i++) {
- data_for_ecc_gen[0] |=
- (((ptag[0] >> i) & 1) << bit_position);
- bit_position++;
- data_for_ecc_gen[0] |=
- (((ptag[2] >> i) & 1) << bit_position);
- bit_position++;
- }
- break;
- }
-}
-
-static uint16_t
-compute_syndrome(uint64_t *tag_data, cmd_ptrsubtype_t pstype)
-{
- uint64_t tag_synd;
- uint64_t data_for_ecc_gen[2];
- uint16_t tag_ecc;
-
- gen_data_for_ecc(tag_data, data_for_ecc_gen, pstype);
- tag_ecc = ((tag_data[0] & PN_TAG_ECC_MASK) >> PN_LX_TAG_ECC_START_BIT);
- tag_synd = calcsynd(data_for_ecc_gen[0], data_for_ecc_gen[1],
- (uint64_t)tag_ecc);
- return (tag_synd);
-}
-
-static int16_t
-find_bit_stickiness(uint64_t *tag_data, int8_t way, int16_t bit)
-{
- int16_t sticky_bit;
-
- sticky_bit = bit;
- if ((tag_data[way] & ((uint64_t)1 << bit)) != 0)
- sticky_bit |= MSB_BIT;
- return (sticky_bit);
-}
-
-static cmd_Lxcache_t *
-cmd_create_and_destroy_Lxcache(fmd_hdl_t *hdl, cmd_cpu_t *cpu,
- cmd_Lxcache_t *Lxcache)
-{
- const char *fltnm;
- cmd_Lxcache_t *new_Lxcache;
-
- fltnm = cmd_type_to_str(Lxcache->Lxcache_type);
-
- /*
- * We first create a new Lxcache and add the event ep
- * that is in Lxcache to the new case we create.
- * we then destroy the Lxcache that has the event ep in its SERD engine.
- */
- new_Lxcache = cmd_Lxcache_create(hdl, Lxcache->xr, cpu,
- cpu->cpu_asru_nvl,
- Lxcache->Lxcache_type,
- Lxcache->Lxcache_index, Lxcache->Lxcache_way, Lxcache->Lxcache_bit);
- if (new_Lxcache == NULL) {
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id %d:Failed to create a Lxcache for"
- " index %d way %d bit %d\n",
- fltnm, cpu->cpu_cpuid, Lxcache->Lxcache_index,
- Lxcache->Lxcache_way, Lxcache->Lxcache_bit);
- return (NULL);
- }
- (void) cmd_create_case_for_Lxcache(hdl, cpu, new_Lxcache);
- cmd_Lxcache_destroy(hdl, cpu, Lxcache);
- return (new_Lxcache);
-}
-
-int
-cmd_Lxcache_retire_as_reason(fmd_hdl_t *hdl, cmd_cpu_t *cpu,
- cmd_Lxcache_t *Lxcache, const char *fltnm, int32_t reason)
-{
- boolean_t ret;
- uint_t certainty;
-
- if (reason == CMD_LXSUSPECT_0_TAG) {
- /*
- * clear MSB bit to retire as SUSPECT_0_TAG
- * We need to update the Lxcache asru to reflect
- * the change in bit value.
- */
- Lxcache->Lxcache_bit &= CLEAR_MSB_BIT;
- errno = nvlist_add_uint16(
- Lxcache->Lxcache_asru_nvl,
- FM_FMRI_CPU_CACHE_BIT,
- Lxcache->Lxcache_bit);
- if (errno) {
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id %d: failed to update",
- " CACHE_BIT in asru.\n",
- fltnm, cpu->cpu_cpuid);
- return (CMD_EVD_BAD);
- }
- }
- if (reason == CMD_LXCONVICTED)
- certainty = HUNDRED_PERCENT;
- else
- certainty = SUSPECT_PERCENT;
- ret = cmd_Lxcache_retire(hdl, cpu, Lxcache, fltnm, certainty);
- if (reason == CMD_LXSUSPECT_0_TAG)
- Lxcache->Lxcache_bit |= SET_MSB_BIT;
- if (ret == B_FALSE)
- return (CMD_EVD_BAD);
- Lxcache->Lxcache_reason = reason;
- /*
- * Update the persistence storage of
- * Lxcache.
- */
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id %d:reason = %s flags = %s\n",
- fltnm, cpu->cpu_cpuid,
- cmd_reason_to_str(Lxcache->Lxcache_reason),
- cmd_flags_to_str(Lxcache->Lxcache_flags));
- cmd_Lxcache_write(hdl, Lxcache);
- return (CMD_EVD_OK);
-}
-
-int
-retire_lowest_retirable_way_as_suspect(fmd_hdl_t *hdl, cmd_cpu_t *cpu,
- cmd_Lxcache_t *anonymous_Lxcache, const char *fltnm)
-{
- /*
- * This routine is called only when handling anonymous TAG or DATA
- * errors. When we exit this routine we would have destroyed the
- * anonymous_Lxcache structure that was passed to us and created
- * a new Lxcache if we were successful in determining a way to retire.
- */
- int8_t lowest_retirable_way, ways_retired;
- int32_t reason;
- cmd_ptrsubtype_t type;
- cmd_Lxcache_t *new_Lxcache;
-
- ways_retired = get_index_retired_ways(cpu,
- anonymous_Lxcache->Lxcache_type,
- anonymous_Lxcache->Lxcache_index);
- if (ways_retired == -1) {
- /*
- * Couldn't determine how many ways have been retired at this
- * index. Destroy the anonymous_Lxcache and return failure.
- */
- cmd_Lxcache_destroy(hdl, cpu, anonymous_Lxcache);
- return (CMD_EVD_BAD);
- }
- /*
- * Before retiring a way check if we have already
- * retired 3 ways for this index.
- * For TAG errors we will not perform this check because
- * we could reretire cachlines retired for DATA errors.
- * The get_lowest_retirable_way() will ensure that we do
- * not end up retiring all 4 ways.
- */
- if (!IS_TAG(anonymous_Lxcache->Lxcache_type)) {
- if (ways_retired >= 3) {
- fmd_hdl_debug(hdl,
- "\n%s: cpu %d: num of ways retired for index %d"
- " is %d will fault the CPU\n",
- fltnm, cpu->cpu_cpuid,
- anonymous_Lxcache->Lxcache_index, ways_retired);
- type = anonymous_Lxcache->Lxcache_type;
- /*
- * destroy the anonymous_Lxcache
- */
- cmd_Lxcache_destroy(hdl, cpu, anonymous_Lxcache);
- cmd_fault_the_cpu(hdl, cpu, type, fltnm);
- return (CMD_EVD_OK);
- }
- }
- /*
- * No ways have been retired as "SUSPECT" for this bit.
- * We need to retire the lowest unretired way as suspect.
- */
- fmd_hdl_debug(hdl,
- "\n%s: cpu_id %d Checking for the lowest retirable"
- " way at index %d\n",
- fltnm, cpu->cpu_cpuid, anonymous_Lxcache->Lxcache_index);
- lowest_retirable_way = cmd_Lxcache_get_lowest_retirable_way(cpu,
- anonymous_Lxcache->Lxcache_index, anonymous_Lxcache->Lxcache_type);
- if (lowest_retirable_way != -1) {
- fmd_hdl_debug(hdl,
- "\n%s: cpu_id %d lowest retirable way is %d\n",
- fltnm, cpu->cpu_cpuid, lowest_retirable_way);
- anonymous_Lxcache->Lxcache_way = lowest_retirable_way;
- new_Lxcache = cmd_create_and_destroy_Lxcache(hdl, cpu,
- anonymous_Lxcache);
- if ((new_Lxcache == NULL) ||
- (new_Lxcache->Lxcache_case.cc_cp == NULL)) {
- return (CMD_EVD_BAD);
- }
- if (IS_TAG(new_Lxcache->Lxcache_type))
- reason = CMD_LXSUSPECT_0_TAG;
- else
- reason = CMD_LXSUSPECT_DATA;
- return (cmd_Lxcache_retire_as_reason(hdl, cpu, new_Lxcache,
- fltnm, reason));
- } else {
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id %d we are unable to determine which"
- " way is faulty at cache index %d."
- " Will retire the CPU.\nRecommended-Action:"
- " Service action required\n",
- fltnm, cpu->cpu_cpuid, anonymous_Lxcache->Lxcache_index);
- type = anonymous_Lxcache->Lxcache_type;
- /*
- * destroy the anonymous_Lxcache
- */
- cmd_Lxcache_destroy(hdl, cpu, anonymous_Lxcache);
- cmd_fault_the_cpu(hdl, cpu, type, fltnm);
- return (CMD_EVD_OK);
- }
-}
-
-int
-unretire_suspect_and_retire_next_retirable_way(fmd_hdl_t *hdl, cmd_cpu_t *cpu,
- cmd_Lxcache_t *suspect_Lxcache, cmd_Lxcache_t *anonymous_Lxcache,
- const char *fltnm)
-{
- int8_t retired_way, next_retirable_way;
- int32_t retired_index;
- cmd_ptrsubtype_t retired_type;
- int32_t reason;
- cmd_Lxcache_t *new_Lxcache;
-
- /*
- * This routine is called only when handling anonymous TAG or DATA
- * errors. When we exit this routine we would have destroyed the
- * anonymous_Lxcache structure that was passed to us.
- */
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id %d found index %d way %d"
- " bit %d retired as %s. Will unretire this now.\n",
- fltnm, cpu->cpu_cpuid, suspect_Lxcache->Lxcache_index,
- suspect_Lxcache->Lxcache_way, suspect_Lxcache->Lxcache_bit,
- cmd_reason_to_str(suspect_Lxcache->Lxcache_reason));
- /*
- * Save the way because we will destroy the
- * suspect_Lxcache after we successfully unretire it.
- */
- retired_way = suspect_Lxcache->Lxcache_way;
- retired_index = suspect_Lxcache->Lxcache_index;
- retired_type = suspect_Lxcache->Lxcache_type;
- /*
- * unretire the retired_way.
- */
- if (cmd_Lxcache_unretire(hdl, cpu, suspect_Lxcache,
- fltnm)
- == B_TRUE) {
- suspect_Lxcache->Lxcache_reason =
- CMD_LXFUNCTIONING;
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id %d index %d way %d"
- " successfully unretired. Will"
- " destroy this Lxcache now.\n",
- fltnm, cpu->cpu_cpuid, suspect_Lxcache->Lxcache_index,
- suspect_Lxcache->Lxcache_way);
- cmd_Lxcache_destroy(hdl, cpu, suspect_Lxcache);
- } else {
- /*
- * destroy the anonymous_Lxcache
- */
- cmd_Lxcache_destroy(hdl, cpu, anonymous_Lxcache);
- return (CMD_EVD_BAD);
- }
- /*
- * retire the next retirable way
- */
- next_retirable_way = cmd_Lxcache_get_next_retirable_way(cpu,
- retired_index,
- retired_type, retired_way);
- if (next_retirable_way == -1) {
- /*
- * There is no retirable way that is next to the
- * one we just retired. We need to offline the
- * CPU since we are unable to determine which
- * way is reporting the errors.
- */
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id %d we are unable to determine"
- " which way is faulty at cache index %d."
- " It is likely that we have a leaky bit"
- " that gets corrected.\n Will retire"
- " the CPU.\nRecommended-Action: Service"
- " action required\n",
- fltnm, cpu->cpu_cpuid, retired_index);
- /*
- * destroy the anonymous_Lxcache
- */
- cmd_Lxcache_destroy(hdl, cpu, anonymous_Lxcache);
- cmd_fault_the_cpu(hdl, cpu, retired_type, fltnm);
- return (CMD_EVD_OK);
- } else {
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id %d found way %d at index %d to"
- " retire as SUSPECT_0/SUSPECT_DATA\n",
- fltnm, cpu->cpu_cpuid, next_retirable_way, retired_index);
- /*
- * We need to create a new Lxcache struture.
- * The existing Lxcache is for anonymous way.
- */
- anonymous_Lxcache->Lxcache_way = next_retirable_way;
- new_Lxcache = cmd_create_and_destroy_Lxcache(hdl,
- cpu, anonymous_Lxcache);
- if ((new_Lxcache == NULL) ||
- (new_Lxcache->Lxcache_case.cc_cp == NULL)) {
- return (CMD_EVD_BAD);
- }
- if (IS_TAG(new_Lxcache->Lxcache_type))
- reason = CMD_LXSUSPECT_0_TAG;
- else
- reason = CMD_LXSUSPECT_DATA;
- return (cmd_Lxcache_retire_as_reason(hdl, cpu, new_Lxcache,
- fltnm, reason));
- }
-}
-
-void
-find_and_destroy_anonymous_Lxcache(fmd_hdl_t *hdl, cmd_cpu_t *cpu,
- cmd_ptrsubtype_t pstype, int32_t index)
-{
- cmd_Lxcache_t *anonymous_Lxcache;
- const char *fltnm;
-
- fltnm = cmd_type_to_str(pstype);
- anonymous_Lxcache =
- cmd_Lxcache_lookup_by_type_index_way_bit(cpu,
- pstype, index, -1, -1);
- if (anonymous_Lxcache != NULL) {
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id = %d index = %d We are destroying the"
- " anonymous Lxcache now.\n",
- fltnm, cpu->cpu_cpuid, index);
- /*
- * Free the resources allocated to handle
- * recheck_of_tags. Delete the Lxcache.
- */
- cmd_Lxcache_destroy(hdl, cpu,
- anonymous_Lxcache);
- }
-}
-
-void
-cmd_Lxcache_anonymous_tag_error_timeout(fmd_hdl_t *hdl, id_t id)
-{
- cmd_Lxcache_t *Lxcache;
- const char *class;
-
-
- /*
- * We search thru the entire Lxcache structures to find
- * a matching id.
- */
- Lxcache = cmd_Lxcache_lookup_by_timeout_id(id);
- if (Lxcache == NULL) {
- fmd_hdl_debug(hdl,
- "Could not find Lxcache for timeout_id 0x%x\n", id);
- return;
- }
- fmd_hdl_debug(hdl,
- "\n%s:anonymous_tag_error_timeout:index = %d\n",
- cmd_type_to_str(Lxcache->Lxcache_type),
- Lxcache->Lxcache_index);
- /*
- * Set timeout_id to -1 to indicate that we have processed the
- * timeout.
- */
- Lxcache->Lxcache_timeout_id = -1;
- switch (Lxcache->Lxcache_type) {
- case CMD_PTR_CPU_L2TAG:
- class = "ereport.cpu.ultraSPARC-IVplus.thce";
- (void) cmd_txce(hdl, Lxcache->Lxcache_ep,
- Lxcache->Lxcache_nvl,
- class, Lxcache->Lxcache_clcode);
- break;
- case CMD_PTR_CPU_L3TAG:
- class = "ereport.cpu.ultraSPARC-IVplus.l3-thce";
- (void) cmd_l3_thce(hdl, Lxcache->Lxcache_ep,
- Lxcache->Lxcache_nvl,
- class, Lxcache->Lxcache_clcode);
- break;
- default:
- fmd_hdl_debug(hdl,
- "Unexpected pstype 0x%x found in"
- " anonymous_tag_error_timeout: index = %d\n",
- Lxcache->Lxcache_type,
- Lxcache->Lxcache_index);
- return;
- }
-}
-
-cmd_evdisp_t
-cmd_us4plus_tag_err(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl,
- cmd_cpu_t *cpu, cmd_ptrsubtype_t pstype,
- const char *serdn, const char *serdt,
- const char *fltnm, cmd_errcl_t clcode)
-{
- uint64_t tag_afar;
- int32_t index;
- int8_t way;
- int16_t tag_bit, bit, sticky_bit;
- cmd_Lxcache_t *Lxcache, *suspect_Lxcache, *retired_Lxcache;
- cmd_Lxcache_t *anonymous_Lxcache;
- uint64_t tag_synd;
- uint64_t tag_data[PN_CACHE_NWAYS];
- uint8_t state;
- int ways_retired, ret;
- int retries_for_ecc_match;
- int32_t recheck_of_tags;
- int way_already_retired = 0;
-
- /*
- * We now extract physical tags and states
- * and also look for matching ECC on all 4 ways.
- */
- ret = extract_data_from_ereport_payload(hdl, nvl, cpu, pstype,
- &tag_afar, tag_data, fltnm);
- if (ret != 0)
- return (ret);
- index = get_index(pstype, tag_afar);
- retries_for_ecc_match = 0;
- while (matching_ecc(tag_data) != 0) {
- if (retries_for_ecc_match >= MAX_RETRIES_FOR_ECC_MATCH)
- return (CMD_EVD_BAD);
- print_ecc(hdl, cpu, fltnm, tag_data);
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id = %d index = %d ECCs don't match.\n"
- "Reading tag info again.\n",
- fltnm, cpu->cpu_cpuid, index);
- (void) get_tagdata(cpu, pstype, index, tag_data);
- retries_for_ecc_match++;
- }
- ways_retired = get_retired_ways(tag_data);
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id %d: found %d ways retired at the index %d\n",
- fltnm, cpu->cpu_cpuid, ways_retired, index);
- tag_synd = compute_syndrome(tag_data, pstype);
- ret = nvlist_lookup_int32(nvl, FM_EREPORT_RECHECK_OF_TAGS,
- &recheck_of_tags);
- if (ret != CMD_EVD_OK) {
- fmd_hdl_debug(hdl,
- "ret value = %d for nvlist_lookup of recheck_of_tags\n",
- ret);
- recheck_of_tags = 0;
- }
- if (tag_synd == 0) {
- /*
- * The bit has been corrected by writeback, we will
- * first check if we are processing the re-check of tags
- * that we scheduled thru the timeout call.
- * if so we will exit if we reached the max retries.
- * Else we start a timeout and exit.
- * We will create a Lxcache structure for this index with way
- * as -1 and bit as -1. We will also keep a count of
- * attempts we made to check the tag data at this index.
- *
- */
- way = -1;
- bit = -1;
- Lxcache = cmd_Lxcache_lookup_by_type_index_way_bit(cpu, pstype,
- index, way, bit);
- if (recheck_of_tags) {
- /*
- * We are processing the re-read of tags scheduled by
- * timeout. Exit if retry limit has been
- * reached. Else start another timeout.
- */
- if (Lxcache == NULL) {
- /*
- * This shouldn't happen.
- */
- fmd_hdl_debug(hdl,
- "\n%s: cpu_id = %d failed to lookup"
- " index = %d way %d bit %d\n",
- fltnm, cpu->cpu_cpuid, index, way, bit);
- return (CMD_EVD_BAD);
- }
- fmd_hdl_debug(hdl,
- "\n%s: cpu_id = %d index = %d syndrome"
- " computed is 0 in attempt #%d.\n",
- fltnm, cpu->cpu_cpuid, index,
- Lxcache->Lxcache_retry_count);
- if (Lxcache->Lxcache_retry_count >=
- RETRIES_TO_BE_DONE_WHEN_SYND_IS_ZERO) {
- /*
- * We free only the nvl list here.
- * anonymous SERD engine will be freed
- * when the Lxcache gets destroyed.
- * We need the anonymous SERD engine still
- * because it has the event ep.
- * reset or destroy of SERD engine frees the
- * event ep.
- */
- if (Lxcache->Lxcache_nvl != NULL) {
- nvlist_free(Lxcache->Lxcache_nvl);
- Lxcache->Lxcache_nvl = NULL;
- }
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id %d Max retry count reached. Giving up.\n",
- fltnm, cpu->cpu_cpuid);
- Lxcache->Lxcache_timeout_id = -1;
- Lxcache->Lxcache_retry_count = 0;
- goto process_after_finding_way_bit;
- } else {
- Lxcache->Lxcache_retry_count++;
- Lxcache->Lxcache_timeout_id =
- fmd_timer_install(hdl,
- (void *)CMD_TIMERTYPE_ANONYMOUS_TAG_ERROR,
- NULL,
- (cmd_Lxcache_recheck_tags_delay[
- Lxcache->Lxcache_retry_count] * NANOSEC));
- return (CMD_EVD_OK);
- }
- }
- /*
- * Check if we already have a Lxcache structure
- * with anonymous way and bit created.
- */
- if (Lxcache == NULL) {
- Lxcache = cmd_Lxcache_create(hdl, 0, cpu,
- cpu->cpu_asru_nvl, pstype, index, way, bit);
- if (Lxcache == NULL) {
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id %d Failed to create Lxcache"
- " for index=%d\n",
- fltnm, cpu->cpu_cpuid, index);
- return (CMD_EVD_BAD);
- }
- }
- if (Lxcache->Lxcache_timeout_id != -1) {
- /*
- * We have another syndrome = 0 condition while we are
- * still in the process of retrying for the previous
- * condition.
- */
- fmd_hdl_debug(hdl,
- "\n%s: cpu_id = %d index = %d We have another"
- " syndrome = 0 condition while we have already"
- " scheduled a timeout. We will ignore this"
- " event.\n",
- fltnm, cpu->cpu_cpuid, index);
- return (CMD_EVD_OK);
- }
- fmd_hdl_debug(hdl,
- "\n%s: cpu_id = %d index = %d syndrome computed is 0."
- "Looks like the bit got corrected."
- " Will check later to see if it is OK.\n",
- fltnm, cpu->cpu_cpuid, index);
- /*
- * We need to store the following arguments passed to
- * this function(tag_error_handler) so that we can
- * invoke this function from timeout routine.
- *
- * nvl, ep, clcode
- */
- if (Lxcache->Lxcache_nvl == NULL) {
- if (nvlist_dup(nvl, &Lxcache->Lxcache_nvl, 0) != 0) {
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id %d Failed to duplicate nvl"
- " for index=%d\n",
- fltnm, cpu->cpu_cpuid, index);
- return (CMD_EVD_BAD);
- }
- if (nvlist_add_int32(Lxcache->Lxcache_nvl,
- FM_EREPORT_RECHECK_OF_TAGS, 1) != 0) {
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id %d Failed to add"
- " RECHECK_OF_TAGS in nvl for index=%d\n",
- fltnm, cpu->cpu_cpuid, index);
- return (CMD_EVD_BAD);
- }
- }
- /*
- * We are called with CMP_CPU_LEVEL_CORE masked out
- * from cmd_txce(), cmd_l3_thce() routines.
- * We need to set CMD_CPU_LEVEL_CORE because we want to handle
- * both the cores on the Chip as one single cpu_id.
- */
- Lxcache->Lxcache_clcode = (clcode | CMD_CPU_LEVEL_CORE);
- if (Lxcache->Lxcache_ep == NULL) {
- Lxcache->Lxcache_ep = ep;
- /*
- * we need to preserve the event ep so that it does
- * not get destroyed when we return from this call.
- * We do that by adding the event ep to the SERD engine.
- * The SERD engine we create is different from the one
- * we create when we handle the actual event at label
- * process_after_finding_way_bit.
- */
- Lxcache->Lxcache_serdnm =
- cmd_Lxcache_anonymous_serdnm_create(hdl,
- cpu->cpu_cpuid, pstype, index,
- way, bit);
- if (!fmd_serd_exists(hdl, Lxcache->Lxcache_serdnm)) {
- fmd_serd_create(hdl, Lxcache->Lxcache_serdnm,
- fmd_prop_get_int32(hdl, serdn),
- fmd_prop_get_int64(hdl, serdt));
- fmd_hdl_debug(hdl,
- "\n%s: cpu_id %d: created a SERD engine"
- " %s\n",
- fltnm, cpu->cpu_cpuid,
- Lxcache->Lxcache_serdnm);
- }
- (void) fmd_serd_record(hdl,
- Lxcache->Lxcache_serdnm,
- ep);
- }
- Lxcache->Lxcache_retry_count++;
- Lxcache->Lxcache_timeout_id =
- fmd_timer_install(hdl,
- (void *)CMD_TIMERTYPE_ANONYMOUS_TAG_ERROR, NULL,
- (cmd_Lxcache_recheck_tags_delay[
- Lxcache->Lxcache_retry_count] * NANOSEC));
- return (CMD_EVD_OK);
-
- } else {
- /*
- * tag_synd != 0
- * determine way and bit
- */
- tag_bit = ecc_syndrome_tab[tag_synd & 0x1ff];
- fmd_hdl_debug(hdl,
- "\n%s: cpu_id = %d index = %d tag_bit %03d is faulty.\n",
- fltnm, cpu->cpu_cpuid, index, tag_bit);
- if ((tag_bit > C8)) {
- fmd_hdl_debug(hdl, "%s: cpu_id = %d"
- " Unexpected MTAG or Multiple bit error detected\n",
- fltnm, cpu->cpu_cpuid);
- find_and_destroy_anonymous_Lxcache(hdl, cpu, pstype,
- index);
- return (CMD_EVD_BAD);
- }
- if ((tag_bit >= C0) && (tag_bit <= C8)) {
- /*
- * ECC bit is corrupted.
- * Need to offline the CPU
- */
- bit = (tag_bit - C0) + PN_LX_TAG_ECC_START_BIT;
- way = 0;
- fmd_hdl_debug(hdl,
- "\n%s: cpu_id = %d ECC bit is faulty.\n",
- fltnm, cpu->cpu_cpuid);
- } else {
- bit = tag_bit_to_way_bit(pstype, tag_bit);
- way = bit_to_way(pstype, tag_bit);
- if (way < 0) {
- fmd_hdl_debug(hdl,
- "\n%s: cpu_id = %d %d bit indicted is a"
- " meta bit !!\n",
- fltnm, cpu->cpu_cpuid, bit);
- find_and_destroy_anonymous_Lxcache(hdl, cpu,
- pstype,
- index);
- return (CMD_EVD_BAD);
- }
- }
- } /* end of tag_synd != 0 */
-process_after_finding_way_bit:
- if ((Lxcache = cmd_Lxcache_lookup_by_type_index_way_bit(cpu, pstype,
- index, way,
- bit)) != NULL &&
- Lxcache->Lxcache_case.cc_cp != NULL &&
- fmd_case_solved(hdl, Lxcache->Lxcache_case.cc_cp)) {
- fmd_hdl_debug(hdl,
- "\n%s:cpu %d: the case for %s is already solved.\n",
- fltnm, cpu->cpu_cpuid, Lxcache->Lxcache_bufname);
- find_and_destroy_anonymous_Lxcache(hdl, cpu, pstype, index);
- return (CMD_EVD_REDUND);
- }
-
- if (Lxcache == NULL)
- Lxcache = cmd_Lxcache_create(hdl, 0, cpu, cpu->cpu_asru_nvl,
- pstype, index, way, bit);
- if (Lxcache == NULL) {
- fmd_hdl_debug(hdl,
- "\n%s:cpu %d: Failed to create Lxcache for index %d",
- " way %d bit %d\n",
- fltnm, cpu->cpu_cpuid, index, way, bit);
- find_and_destroy_anonymous_Lxcache(hdl, cpu, pstype, index);
- return (CMD_EVD_BAD);
- }
- if (cmd_create_case_for_Lxcache(hdl, cpu, Lxcache) == B_FALSE) {
- find_and_destroy_anonymous_Lxcache(hdl, cpu, pstype, index);
- return (CMD_EVD_BAD);
- }
- if (Lxcache->Lxcache_case.cc_serdnm == NULL) {
- Lxcache->Lxcache_case.cc_serdnm = cmd_Lxcache_serdnm_create(hdl,
- cpu->cpu_cpuid, pstype, index,
- way, bit);
- if (!fmd_serd_exists(hdl, Lxcache->Lxcache_case.cc_serdnm)) {
- fmd_serd_create(hdl, Lxcache->Lxcache_case.cc_serdnm,
- fmd_prop_get_int32(hdl, serdn),
- fmd_prop_get_int64(hdl, serdt));
- fmd_hdl_debug(hdl,
- "\n%s: cpu_id %d: created a SERD engine %s\n",
- fltnm, cpu->cpu_cpuid,
- Lxcache->Lxcache_case.cc_serdnm);
- }
- }
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id %d: Checking if the SERD engine %s has fired.\n",
- fltnm, cpu->cpu_cpuid, Lxcache->Lxcache_case.cc_serdnm);
-
- (void) fmd_serd_record(hdl, Lxcache->Lxcache_case.cc_serdnm, ep);
- if (way >= 0) {
- /*
- * Now that we have recorded the event ep we can do the
- * necessary cleanup of resources allocated for recheck of tags.
- */
- find_and_destroy_anonymous_Lxcache(hdl, cpu, pstype, index);
- }
- if (fmd_serd_fired(hdl, Lxcache->Lxcache_case.cc_serdnm) ==
- FMD_B_FALSE)
- return (CMD_EVD_OK);
-
- fmd_hdl_debug(hdl, "\n%s: cpu_id = %d creating fault %s\n",
- fltnm, cpu->cpu_cpuid, Lxcache->Lxcache_case.cc_serdnm);
- fmd_case_add_serd(hdl, Lxcache->Lxcache_case.cc_cp,
- Lxcache->Lxcache_case.cc_serdnm);
- fmd_serd_reset(hdl, Lxcache->Lxcache_case.cc_serdnm);
- if (way == -1) {
- /*
- * The assignment below is to make the code easier to maintain.
- * We need to destroy the anonymous_Lxcache after we have
- * identifed a way to retire. If we cannot detrmine a way to
- * retire we will destrory the anonymous_Lxcache and fault the
- * cpu.
- */
- anonymous_Lxcache = Lxcache;
- /*
- * Anonymous TAG way retirement.
- * - if a way at this index has already been retired as
- * "suspect-1", unretire that way, and retire the next
- * unretired way as "suspect-0", using a pattern of all zeros
- * for the PA bits.
- * - if a way at this index has already been retired as
- * "suspect-0", re-retire that way as "suspect-1", using a
- * pattern of all ones for the PA bits.
- * - if no ways have been retired as "suspect" for this index,
- * retire the lowest unretired way as "suspect-0" for this
- * bit, using a pattern of all zeros for the PA bits.
- * - if there is no next retirable way, fault the CPU.
- */
- suspect_Lxcache = cmd_Lxcache_lookup_by_type_index_bit_reason(
- cpu, pstype, index, bit, CMD_LXSUSPECT_1_TAG);
- anonymous_Lxcache->Lxcache_ep = ep;
- if (suspect_Lxcache) {
- ret = unretire_suspect_and_retire_next_retirable_way(
- hdl, cpu, suspect_Lxcache, anonymous_Lxcache,
- fltnm);
- return (ret);
- } /* end SUSPECT_1_TAG */
- suspect_Lxcache = cmd_Lxcache_lookup_by_type_index_bit_reason(
- cpu, pstype, index, bit, CMD_LXSUSPECT_0_TAG);
- if (suspect_Lxcache) {
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id %d found index %d way %d"
- " bit %d retired as SUSPECT_0_TAG. Will"
- " re-retire this now as SUSPECT_1_TAG.\n",
- fltnm, cpu->cpu_cpuid, index,
- suspect_Lxcache->Lxcache_way, bit);
- /*
- * destroy the anonymous_Lxcache
- */
- cmd_Lxcache_destroy(hdl, cpu, anonymous_Lxcache);
- suspect_Lxcache->Lxcache_ep = ep;
- /*
- * We need to update the FM_FMRI_CPU_CACHE_BIT entry
- * in the Lxcache_asru_nvl. This entry was last updated
- * when the cacheline was retired as SUSPECT_0.
- * Therefore the MSB of FM_FMRI_CPU_CACHE_BIT entry
- * value will be reset. To retire cacheline as
- * SUSPECT_1 the MSB has to be set.
- */
- errno = nvlist_add_uint16(
- suspect_Lxcache->Lxcache_asru_nvl,
- FM_FMRI_CPU_CACHE_BIT,
- suspect_Lxcache->Lxcache_bit);
- if (errno) {
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id %d: failed to update",
- " CACHE_BIT in asru.\n",
- fltnm, cpu->cpu_cpuid);
- }
- return (cmd_Lxcache_retire_as_reason(hdl, cpu,
- suspect_Lxcache, fltnm, CMD_LXSUSPECT_1_TAG));
- } /* end of SUSPECT_0_TAG */
- /*
- * No ways have been retired as "SUSPECT_x" for this bit.
- * We need to retire the lowest unretired way as suspect.
- */
- ret = retire_lowest_retirable_way_as_suspect(hdl, cpu,
- anonymous_Lxcache,
- fltnm);
- return (ret);
- } /* End of Anonymous TAG retirement */
- /*
- * Identified bit and way has fired.
- * - Destroy any anonymous SERD engine at that index.
- * - If the bad bit is an ECC bit, fault the CPU.
- * - If the way was already convicted due to tag errors, fault the CPU.
- * - If the bad bit is a state bit, then:
- * - if the stable value of the bad bit will hold the NA encoding,
- * retire the containing way as "convicted".
- * - if the stable value of the bad bit will not hold the NA
- * encoding, fault the CPU.
- */
- cmd_Lxcache_destroy_anonymous_serd_engines(hdl, cpu, pstype, index, -1);
- sticky_bit = find_bit_stickiness(tag_data, way, bit);
- if ((bit >= PN_LX_TAG_ECC_START_BIT) &&
- (bit <= PN_LX_TAG_ECC_END_BIT)) {
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id %d Bad ECC bit %d at cache index %d way %d"
- " detected. Will offline the CPU.\n",
- fltnm, cpu->cpu_cpuid, bit, index, way);
- cmd_fault_the_cpu(hdl, cpu, pstype, fltnm);
- return (CMD_EVD_OK);
- }
- /*
- * Check if a STATE bit is faulty.
- * If so we need to ensure that we will be able to
- * make the way NA, else fault the CPU.
- */
- if (bit <= PN_LX_STATE_END_BIT) {
- fmd_hdl_debug(hdl,
- "%s cpu_id = %d: STATE bit %d is faulty.\n",
- fltnm, cpu->cpu_cpuid, bit);
- /*
- * If the stable value of bit will hold the NA encoding
- * retire the containing way Else fault the cpu.
- */
- state = tag_data[way] & CH_ECSTATE_MASK;
- if ((state & (1 << bit)) != (PN_ECSTATE_NA & (1 << bit))) {
- /*
- * The stable value of the bad bit will not hold the
- * NA encoding. will fault the CPU.
- */
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id %d STATE bit %d is faulty at"
- " cache index %d way %d. STATE = 0x%x\n"
- " The bad bit will not hold the encoding we need"
- " to mark the cacheline as retired, so will offline"
- " the CPU.\n",
- fltnm, cpu->cpu_cpuid, bit, index, way, state);
- cmd_fault_the_cpu(hdl, cpu, pstype, fltnm);
- return (CMD_EVD_OK);
- }
- }
- /*
- * Check if we are getting fault on a way that is already retired.
- * if the way was already convicted due to tag errors, fault the CPU.
- * Note that the way could have previously been retired due to
- * data errors. This is okay; we just re-retire it due to tag errors,
- * so that we can write the offending tag bit to a stable value.
- */
- if ((tag_data[way] & CH_ECSTATE_MASK) == PN_ECSTATE_NA) {
- /*
- * Looking for CONVICTED TAG fault first.
- * If found retire the CPU.
- */
- retired_Lxcache = cmd_Lxcache_lookup_by_type_index_way_reason(
- cpu, pstype, index, way, CMD_LXCONVICTED);
- if (retired_Lxcache) {
- fmd_hdl_debug(hdl,
- "\n%s: cpu %d: The cache index %d way %d previously"
- " retired for %s fault at bit %d is reporting"
- " fault. Will fault the CPU\n",
- fltnm, cpu->cpu_cpuid, index, way,
- cmd_type_to_str(
- retired_Lxcache->Lxcache_type),
- retired_Lxcache->Lxcache_bit);
- cmd_fault_the_cpu(hdl, cpu, pstype, fltnm);
- return (CMD_EVD_OK);
- }
- way_already_retired = 1;
- }
- /*
- * If any way(Including the current way) at this index is retired as
- * "suspect" due to tag errors, unretire it. (If that suspect way
- * really was bad, it will start producing errors again and will
- * eventually be retired again.)
- */
- suspect_Lxcache = cmd_Lxcache_lookup_by_type_index_bit_reason(
- cpu, pstype, index, -1,
- (CMD_LXSUSPECT_0_TAG | CMD_LXSUSPECT_1_TAG));
- if (suspect_Lxcache) {
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id %d found index %d way %d"
- " bit %d retired as SUSPECT_x. Will"
- " unretire this now.\n",
- fltnm, cpu->cpu_cpuid, index,
- suspect_Lxcache->Lxcache_way, -1);
- /*
- * unretire the suspect_x retired_way.
- */
- if (cmd_Lxcache_unretire(hdl, cpu, suspect_Lxcache, fltnm)
- == B_TRUE) {
- suspect_Lxcache->Lxcache_reason =
- CMD_LXFUNCTIONING;
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id %d index %d way %d"
- " successfully unretired. Will"
- " destroy this Lxcache now.\n",
- fltnm, cpu->cpu_cpuid, index,
- suspect_Lxcache->Lxcache_way);
- cmd_Lxcache_destroy(hdl, cpu, suspect_Lxcache);
- } else {
- /*
- * We are unable to unretire the previously retired
- * SUSPECT way at the fault index.
- * If the previously retired way is same as the way
- * we are attempting to retire then return failure.
- */
- if (suspect_Lxcache->Lxcache_way ==
- Lxcache->Lxcache_way)
- return (CMD_EVD_BAD);
- }
- }
- ways_retired = get_index_retired_ways(cpu, pstype, index);
- if (ways_retired == -1)
- return (CMD_EVD_BAD);
- /*
- * Before retiring a way check if we have already
- * retired 3 ways for this index.
- * If the way was already retired due to DATA error or
- * SUSPECT_X TAG error then we skip the check.
- */
- if (!way_already_retired) {
- if (ways_retired >= 3) {
- fmd_hdl_debug(hdl,
- "\n%s: cpu %d: num of ways retired for index %d"
- " is %d will fault the CPU\n",
- fltnm, cpu->cpu_cpuid, index, ways_retired);
- cmd_fault_the_cpu(hdl, cpu, pstype, fltnm);
- return (CMD_EVD_OK);
- }
- }
- fmd_hdl_debug(hdl,
- "\n%s: cpu %d: num of ways retired for index %d is %d\n",
- fltnm, cpu->cpu_cpuid, index, ways_retired);
- if ((errno = nvlist_add_uint16(Lxcache->Lxcache_asru_nvl,
- FM_FMRI_CPU_CACHE_BIT,
- sticky_bit)) != 0 ||
- (errno = fmd_nvl_fmri_expand(hdl, Lxcache->Lxcache_asru_nvl)) != 0)
- fmd_hdl_abort(hdl, "failed to build Lxcache fmri");
- Lxcache->Lxcache_ep = ep;
- return (cmd_Lxcache_retire_as_reason(hdl, cpu, Lxcache, fltnm,
- CMD_LXCONVICTED));
-}
-
-static boolean_t
-pn_there_is_a_matching_synd(fmd_hdl_t *hdl, cmd_xr_t *xr)
-{
- int ec_data_idx, i;
- int8_t way;
- uint64_t ec_tag, data_hi, data_lo;
- int ecc, calc_synd;
- ec_data_elm_t *ecdptr = NULL;
- uint8_t state;
- ch_ec_data_t *ecp;
-
- ecp = (ch_ec_data_t *)(xr->xr_cache_data);
- for (way = 0; way < xr->xr_num_ways; way++, ecp++) {
- ec_tag = ecp->ec_tag;
- /*
- * skip Retired and Invalid ways
- */
- state = ec_tag & CH_ECSTATE_MASK;
- if ((state == PN_ECSTATE_NA) ||
- (state == CH_ECSTATE_INV))
- continue;
- /*
- * Each 16 bytes of data are protected by 9-bit ECC field.
- */
-
- for (i = 0; i < (CH_ECACHE_SUBBLK_SIZE/16); i++) {
- ec_data_idx = (i/2);
-
- ecdptr = &ecp->ec_data[ec_data_idx];
- if ((i & 1) == 0) {
- ecc = (ecdptr->ec_eccd >> 9) & 0x1ff;
- data_hi = ecdptr->ec_d8[0];
- data_lo = ecdptr->ec_d8[1];
- } else {
- ecc = ecdptr->ec_eccd & 0x1ff;
- data_hi = ecdptr->ec_d8[2];
- data_lo = ecdptr->ec_d8[3];
- }
-
- calc_synd = calcsynd(data_hi, data_lo, ecc);
- if ((calc_synd != 0) &&
- (xr->xr_synd == calc_synd)) {
- if (xr->xr_num_ways == 1) {
- fmd_hdl_debug(hdl,
- "\ncomputed syndrome matches with the reported syndrome"
- " 0x%x index = %d way = %d\n",
- xr->xr_synd, xr->xr_error_index,
- xr->xr_error_way);
- } else {
- fmd_hdl_debug(hdl,
- "\ncomputed syndrome matches with"
- " the reported syndrome"
- " 0x%x index = %d way = %d\n",
- xr->xr_synd, xr->xr_error_index,
- way);
- xr->xr_error_way = way;
- }
- return (B_TRUE);
- }
- }
- }
- return (B_FALSE);
-}
-
-/* add to cheetahregs.h */
-#define CH_ECSTATE_NA 5
-
-static int32_t
-pn_extract_index(int32_t type, uint64_t afar)
-{
- int32_t index = -1;
-
- switch (type) {
- case CMD_PTR_CPU_L2DATA:
- index = (int32_t)((afar & PN_L2_INDEX_MASK)
- >> PN_CACHE_LINE_SHIFT);
- break;
- case CMD_PTR_CPU_L3DATA:
- index = (int32_t)((afar & PN_L3_INDEX_MASK)
- >> PN_CACHE_LINE_SHIFT);
- break;
- }
- return (index);
-}
-
-/*
- * cmd_cache_ce_panther
- *
- * This routine handles L2 and L3 cachedata errors for the Panther.
- * It's called when the train processing for L2 and L3 correctable
- * data errors are about to issue a fault.
- *
- * This routine retrieves payload information gathered during the XR
- * processing and generates a unique SERD engine and cache data
- * associated with the CPU if one does not exist.
- * If the SERD fires for the given engine it will initiate a cache
- * line fault if the way is not anonomyous.
- * If the way is anonomyous, it will attempt to choose a way for the
- * given index to fault. If the maximum for the index has not been
- * reached, it will attempt to unretire a different way previously retired
- * under suspicion for the index prior to faulting
- * the selected way.
- * The routine will also fault the CPU if the maximum number of
- * retired ways for the CPU has been exceeded based on the category.
- */
-/*ARGSUSED*/
-int
-cmd_cache_ce_panther(fmd_hdl_t *hdl, fmd_event_t *ep, cmd_xr_t *xr)
-{
- cmd_Lxcache_t *suspect_Lxcache, *Lxcache, *anonymous_Lxcache;
- cmd_cpu_t *cpu = xr->xr_cpu;
- cmd_case_t *cpu_cc;
- cmd_ptrsubtype_t type;
- const errdata_t *cache_ed;
- uint16_t offset;
- int16_t bit;
- int ways_retired;
- int ret;
-
- /*
- * The caller of this routine cmd_xxc_hdlr() expects us to
- * return CMD_EVD_OK for success and CMD_EVD_BAD for failures.
- * If this is not a Panther or one of the Panther specific
- * errors that we handle here, then exit
- */
-
- if (cpu->cpu_pers.cpup_type != CPU_ULTRASPARC_IVplus)
- return (CMD_EVD_BAD);
-
- if (!(xr->xr_clcode & (int)PN_CACHE_ERRORS))
- return (CMD_EVD_BAD);
-
-
- /* Set up Cache specific structs */
-
- if (CMD_ERRCL_ISL2XXCU(xr->xr_clcode)) {
- type = CMD_PTR_CPU_L2DATA;
- cpu_cc = &cpu->cpu_l2data;
- cache_ed = &l2errdata;
- } else {
- type = CMD_PTR_CPU_L3DATA;
- cpu_cc = &cpu->cpu_l3data;
- cache_ed = &l3errdata;
- }
-
- /* Ensure that our case is not solved */
-
- if (cpu->cpu_faulting || (cpu_cc->cc_cp != NULL &&
- fmd_case_solved(hdl, cpu_cc->cc_cp)))
- return (CMD_EVD_OK);
-
- fmd_hdl_debug(hdl, "Processing Panther %s Error\n",
- cache_ed->ed_fltnm);
-
- /* L3 errors arrive as mem scheme errors - convert to CPU */
- if (type == CMD_PTR_CPU_L3DATA) {
- cmd_fmri_init(hdl, &xr->xr_rsrc,
- xr->xr_detector_nvlist, "%s_rsrc",
- fmd_case_uuid(hdl, xr->xr_case));
- }
- bit = (uint8_t)ecc_syndrome_tab[xr->xr_synd];
- offset = (uint16_t)xr->xr_afar & 0x3f;
- if (bit > C8) {
- fmd_hdl_debug(hdl, "xxC/LDxC dropped due to syndrome\n");
- return (CMD_EVD_BAD);
- }
- if (bit < C0) {
- /*
- * Data bit. Set bit in the range 0-511
- */
- bit += ((3 - (offset/16)) * 128);
- } else {
- /*
- * ECC bit. Set bit in the range 512-547
- */
- bit -= C0;
- bit += 512 + ((3 - (offset/16)) * PN_LX_NUM_OF_BITS_IN_ECC);
- }
- xr->xr_error_index = pn_extract_index(type, xr->xr_afar);
- if (xr->xr_error_index == 0xffffffff) {
- fmd_hdl_debug(hdl, "xxC/LDxC dropped due to index\n");
- return (CMD_EVD_BAD);
- }
- fmd_hdl_debug(hdl, "cpu_id: %d, syndrome: 0x%x, afar: 0x%llx\n",
- xr->xr_cpuid, xr->xr_synd, xr->xr_afar);
- fmd_hdl_debug(hdl, "index: 0x%x(%d) bit: %d\n",
- xr->xr_error_index, xr->xr_error_index, bit);
- /*
- * The payload information for the DATA errors are assembled
- * after first looking for a valid line that matches the fault AFAR.
- * If no match is found all 4 ways are logged and xr_num_ways
- * will be 4. If a matching way is found only that entry is logged
- * and xr_num_ways is set as 1.
- * The xr_error_way is set as -1 when xr_num_ways is 4, else
- * xr_error_way is set to the matching way.
- * what we do below is to force the xr_error_way to -1 for WDC/CPC
- * errors.
- * For UCC and EDC errors the xr_error_way will be set correctly.
- */
-
- switch (xr->xr_clcode) {
- case CMD_ERRCL_WDC:
- case CMD_ERRCL_L3_WDC:
- /*
- * WDC is a disrupting trap, and invalidates and
- * overwrites the problematic way. Any match is due to
- * a refetch of the AFAR, which could have been to any
- * way. So these are treated as "anonymous".
- */
- fmd_hdl_debug(hdl, "WDC fault detected\n");
- xr->xr_error_way = (uint32_t)CMD_ANON_WAY;
- break;
- case CMD_ERRCL_CPC:
- case CMD_ERRCL_L3_CPC:
- /*
- * CPC is a disrupting trap, but since it happens due to
- * a snoop, the problematic way could become invalid,
- * overwritten by a different cache line, and then the
- * AFAR accessed and pulled into a different way,
- * causing a false positive match. So it's best to not
- * look for a matching way and just ascribe these to
- * the "anonymous" way.
- */
- fmd_hdl_debug(hdl, "CPC fault detected\n");
- xr->xr_error_way = (uint32_t)CMD_ANON_WAY;
- break;
- case CMD_ERRCL_UCC:
- case CMD_ERRCL_L3_UCC:
- /*
- * UCC is a precise trap, so, absent activity from the
- * other core, the tag address values read by the TL=1
- * trap handler are likely to be the same as those at
- * the time of the trap.
- * (A snoop from another CPU might cause a change in
- * state from valid to invalid, but the tag address
- * won't change.) If we find a matching valid tag,
- * that identifies the way.
- */
- fmd_hdl_debug(hdl, "UCC fault detected\n");
- fmd_hdl_debug(hdl, "# of ways collected are %d\n",
- xr->xr_num_ways);
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id %d: error way = %d\n",
- cache_ed->ed_fltnm, cpu->cpu_cpuid,
- xr->xr_error_way);
- break;
- case CMD_ERRCL_EDC:
- case CMD_ERRCL_L3_EDC:
- /*
- * EDC is a disrupting trap, but again if a matching
- * valid way is found, it is likely to be the correct
- * way.
- */
- fmd_hdl_debug(hdl, "EDC fault detected\n");
- fmd_hdl_debug(hdl, "# of ways collected are %d\n",
- xr->xr_num_ways);
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id %d: error way = %d\n",
- cache_ed->ed_fltnm, cpu->cpu_cpuid,
- xr->xr_error_way);
- break;
- default:
- fmd_hdl_debug(hdl, "Unexpected fault detected\n");
- xr->xr_error_way = (uint32_t)CMD_ANON_WAY;
- }
- if ((type == CMD_PTR_CPU_L2DATA) &&
- (xr->xr_cache_data != NULL) &&
- (!pn_there_is_a_matching_synd(hdl, xr))) {
- fmd_hdl_debug(hdl, "No matching syndrome\n");
- }
- Lxcache = cmd_Lxcache_lookup_by_type_index_way_bit(xr->xr_cpu, type,
- xr->xr_error_index, xr->xr_error_way, bit);
-
- if (Lxcache == NULL) {
- fmd_hdl_debug(hdl,
- "\n%s: cpu %d: creating a case for index %d way %d"
- " bit %d\n",
- cache_ed->ed_fltnm, xr->xr_cpuid,
- xr->xr_error_index, xr->xr_error_way, bit);
- Lxcache = cmd_Lxcache_create(hdl, xr, xr->xr_cpu,
- xr->xr_cpu->cpu_asru_nvl,
- type, xr->xr_error_index,
- xr->xr_error_way, bit);
- if (Lxcache == NULL) {
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id %d:Failed to create a Lxcache for"
- " index %d way %d bit %d\n",
- cache_ed->ed_fltnm, cpu->cpu_cpuid,
- Lxcache->Lxcache_index,
- Lxcache->Lxcache_way, Lxcache->Lxcache_bit);
- return (CMD_EVD_BAD);
- }
- }
- if (cmd_create_case_for_Lxcache(hdl, cpu, Lxcache) == B_FALSE)
- return (CMD_EVD_BAD);
- if (Lxcache->Lxcache_case.cc_serdnm == NULL) {
- Lxcache->Lxcache_case.cc_serdnm =
- cmd_Lxcache_serdnm_create(hdl, xr->xr_cpuid,
- type, xr->xr_error_index, xr->xr_error_way, bit);
-
- if (!fmd_serd_exists(hdl,
- Lxcache->Lxcache_case.cc_serdnm)) {
- fmd_serd_create(hdl,
- Lxcache->Lxcache_case.cc_serdnm,
- cache_ed->ed_serd->cs_n,
- cache_ed->ed_serd->cs_t);
- fmd_hdl_debug(hdl,
- "\n%s: cpu_id %d: created a SERD engine %s\n",
- cache_ed->ed_fltnm, cpu->cpu_cpuid,
- Lxcache->Lxcache_case.cc_serdnm);
- }
- }
- /* Ensure that our case is not solved */
- if ((Lxcache->Lxcache_case.cc_cp != NULL) &&
- fmd_case_solved(hdl, Lxcache->Lxcache_case.cc_cp)) {
- fmd_hdl_debug(hdl,
- "\n%s:cpu %d: the case for %s is already solved.\n",
- cache_ed->ed_fltnm, cpu->cpu_cpuid,
- Lxcache->Lxcache_bufname);
- return (CMD_EVD_REDUND);
- }
-
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id %d: checking if SERD engine %s has fired.\n",
- cache_ed->ed_fltnm, xr->xr_cpuid, Lxcache->Lxcache_case.cc_serdnm);
-
- if (fmd_serd_record(hdl, Lxcache->Lxcache_case.cc_serdnm, ep)
- == FMD_B_FALSE)
- return (CMD_EVD_OK); /* serd engine hasn't fired yet */
-
- fmd_hdl_debug(hdl, "\n%s: cpu_id = %d creating fault %s\n",
- cache_ed->ed_fltnm, cpu->cpu_cpuid,
- Lxcache->Lxcache_case.cc_serdnm);
- fmd_case_add_serd(hdl, Lxcache->Lxcache_case.cc_cp,
- Lxcache->Lxcache_case.cc_serdnm);
- fmd_serd_reset(hdl, Lxcache->Lxcache_case.cc_serdnm);
- /*
- * Find out if there is a way at the fault index/bit that was retired
- * as suspect. We need this information for both anonymous way and
- * identified way handling. We store this info in suspect_Lxcache.
- */
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id %d checking if there is a way at"
- " index %d retired as suspect due to bit %d\n",
- cache_ed->ed_fltnm, cpu->cpu_cpuid,
- Lxcache->Lxcache_index, Lxcache->Lxcache_bit);
- suspect_Lxcache = cmd_Lxcache_lookup_by_type_index_bit_reason(
- cpu, type, Lxcache->Lxcache_index, Lxcache->Lxcache_bit,
- CMD_LXSUSPECT_DATA);
- if (xr->xr_error_way != (uint32_t)CMD_ANON_WAY) {
- /*
- * IDENTIFIED WAY DATA error handling.
- *
- * If there is a way at that index retired as suspect due
- * to that bit, unretire it.
- * retire the identified way, and mark the way as "convicted"
- * for this bit. Destroy any anonymous SERD engine named by
- * that index and bit.
- */
- if (suspect_Lxcache != NULL) {
- fmd_hdl_debug(hdl,
- "\n%s:cpu_id %d found index %d way %d"
- " bit %d retired on suspicion. Will"
- " unretire this now.\n",
- cache_ed->ed_fltnm, cpu->cpu_cpuid,
- suspect_Lxcache->Lxcache_index,
- suspect_Lxcache->Lxcache_way,
- suspect_Lxcache->Lxcache_bit);
- /*
- * unretire the retired_way.
- */
- if (cmd_Lxcache_unretire(hdl, cpu, suspect_Lxcache,
- cache_ed->ed_fltnm) == B_TRUE) {
- suspect_Lxcache->Lxcache_reason =
- CMD_LXFUNCTIONING;
- cmd_Lxcache_destroy(hdl, cpu, suspect_Lxcache);
- }
- /*
- * We proceed to retire the identified way even if
- * we are unable to unretire the suspect way.
- * We will not end up retiring all 4 ways because
- * we check the actual number of ways retired
- * at this index by reading the info from processor
- * directly. The call to get_index_retired_ways() does
- * that.
- */
- }
- /*
- * Before retiring a way check if we have already
- * retired 3 ways for this index.
- */
- ways_retired = get_index_retired_ways(cpu, type,
- Lxcache->Lxcache_index);
- if (ways_retired == -1) {
- fmd_hdl_debug(hdl,
- "\n%s: cpu %d: We are unable to determine how many"
- " ways are retired at this index. We will not be"
- " retiring the identified cacheline at index %d"
- " way %d\n",
- cache_ed->ed_fltnm, cpu->cpu_cpuid,
- Lxcache->Lxcache_index, Lxcache->Lxcache_way);
- return (CMD_EVD_BAD);
- }
- if (ways_retired >= 3) {
- fmd_hdl_debug(hdl,
- "\n%s: cpu %d: num of ways retired for index %d"
- " is %d. Will fault the CPU\n",
- cache_ed->ed_fltnm, cpu->cpu_cpuid,
- Lxcache->Lxcache_index, ways_retired);
- cmd_fault_the_cpu(hdl, cpu, type, cache_ed->ed_fltnm);
- return (CMD_EVD_OK);
- }
- /*
- * retire the cache line
- */
- ret = cmd_Lxcache_retire_as_reason(hdl, cpu, Lxcache,
- cache_ed->ed_fltnm, CMD_LXCONVICTED);
- if (ret != CMD_EVD_OK)
- return (ret);
- /*
- * anonymous serd engines for DATA faults will have valid bit
- * but way as -1.
- */
- cmd_Lxcache_destroy_anonymous_serd_engines(hdl, cpu, type,
- Lxcache->Lxcache_index,
- bit);
- return (CMD_EVD_OK);
- } /* end of IDENTIFIED WAY error handling */
- /*
- * ANONYMOUS WAY DATA error handling.
- *
- * - if a way at this index has already been retired as "suspect"
- * for this bit, unretire that way, and retire the next retirable
- * way as "suspect" for this bit.
- * - if no ways have been retired as "suspect" for this bit,
- * retire the lowest unretired way as "suspect" for this bit.
- * - if there is no next retirable way, fault the CPU.
- */
- /*
- * The assignment below is to make the code easier to maintain.
- * We need to destroy the anonymous_Lxcache after we have
- * identifed a way to retire. If we cannot detrmine a way to
- * retire we will destrory the anonymous_Lxcache and fault the cpu.
- */
- anonymous_Lxcache = Lxcache;
- anonymous_Lxcache->Lxcache_ep = ep;
- if (suspect_Lxcache != NULL) {
- ret = unretire_suspect_and_retire_next_retirable_way(hdl,
- cpu, suspect_Lxcache, anonymous_Lxcache,
- cache_ed->ed_fltnm);
- } else {
- ret = retire_lowest_retirable_way_as_suspect(hdl, cpu,
- anonymous_Lxcache, cache_ed->ed_fltnm);
- }
- return (ret);
-}
-
-/* ARGSUSED */
-int
-cmd_xr_pn_cache_fill(fmd_hdl_t *hdl, nvlist_t *nvl, cmd_xr_t *xr,
- cmd_cpu_t *cpu, cmd_errcl_t clcode)
-{
- struct ch_ec_data *data_ptr;
- uint64_t *cache_data = NULL;
- uint_t sz;
-
- if (cpu->cpu_pers.cpup_type != CPU_ULTRASPARC_IVplus)
- return (0);
-
- if (nvlist_lookup_nvlist(nvl, FM_EREPORT_DETECTOR,
- &xr->xr_detector_nvlist) != 0) {
- fmd_hdl_debug(hdl, "look up for FM_EREPORT_DETECTOR failed\n");
- return (-1);
- }
- if (nvlist_lookup_uint64(nvl, FM_EREPORT_PAYLOAD_NAME_AFSR,
- &xr->xr_afsr) != 0) {
- fmd_hdl_debug(hdl,
- "look up for FM_EREPORT_PAYLOAD_NAME_AFSR failed\n");
- return (-1);
- }
-
- /* check clcode for l2/l3 first */
- if (CMD_ERRCL_ISL3XXCU(clcode)) {
- if (nvlist_lookup_uint8(nvl, FM_EREPORT_PAYLOAD_NAME_L3_WAYS,
- &xr->xr_num_ways) != 0) {
- fmd_hdl_debug(hdl,
- "look up for FM_EREPORT_PAYLOAD_NAME_L3_WAYS failed\n");
- return (-1);
- }
-
- if (nvlist_lookup_uint64_array(nvl,
- FM_EREPORT_PAYLOAD_NAME_L3_DATA, (uint64_t **)&cache_data,
- &sz) != 0) {
- fmd_hdl_debug(hdl,
- "look up for FM_EREPORT_PAYLOAD_NAME_L3_DATA failed\n");
- }
- } else {
- if (nvlist_lookup_uint8(nvl, FM_EREPORT_PAYLOAD_NAME_L2_WAYS,
- &xr->xr_num_ways) != 0) {
- fmd_hdl_debug(hdl,
- "look up for FM_EREPORT_PAYLOAD_NAME_L2_WAYS failed\n");
- return (-1);
- }
-
- if (nvlist_lookup_uint64_array(nvl,
- FM_EREPORT_PAYLOAD_NAME_L2_DATA, (uint64_t **)&cache_data,
- &sz) != 0) {
- fmd_hdl_debug(hdl,
- "look up for FM_EREPORT_PAYLOAD_NAME_L2_DATA failed\n");
- }
- }
- if (xr->xr_num_ways > PN_CACHE_NWAYS) {
- fmd_hdl_debug(hdl,
- "xr_num_ways > PN_CACHE_WAYS\n");
- return (-1);
- }
-
- xr->xr_cache_data = cache_data;
- data_ptr = (struct ch_ec_data *)cache_data;
- if (cache_data == NULL) {
- xr->xr_error_way = (uint32_t)CMD_ANON_WAY;
- return (0);
- }
-
- /*
- * Our error handler checks for a matching valid way
- * If there is a match, there is only 1 data set, the set
- * associated with the cache-line/way that was "valid"
- * Otherwise, it stores all of the ways
- */
- xr->xr_error_tag = data_ptr[0].ec_tag;
- xr->xr_error_way = (uint32_t)data_ptr[0].ec_way;
-
- /* If there is more than 1 way structure, set way to Anonymous */
- if (xr->xr_num_ways > 1)
- xr->xr_error_way = (uint32_t)CMD_ANON_WAY;
-
- return (0);
-}
diff --git a/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_cpu_arch.c b/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_cpu_arch.c
deleted file mode 100644
index ff94b70bfe..0000000000
--- a/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_cpu_arch.c
+++ /dev/null
@@ -1,262 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-
-/*
- * Support routines for managing per-CPU state.
- */
-
-#include <cmd_cpu.h>
-#include <cmd_ecache.h>
-#include <cmd_mem.h>
-#include <cmd.h>
-
-#include <stdio.h>
-#include <string.h>
-#include <strings.h>
-#include <errno.h>
-#include <kstat.h>
-#include <fm/fmd_api.h>
-#include <sys/async.h>
-#include <sys/fm/protocol.h>
-#include <sys/fm/cpu/UltraSPARC-III.h>
-#include <sys/cheetahregs.h>
-
-/*
- * The unused argument 'clcode' is needed for our sun4v sibling.
- */
-
-/*ARGSUSED*/
-int
-cmd_xr_fill(fmd_hdl_t *hdl, nvlist_t *nvl, cmd_xr_t *xr, cmd_errcl_t clcode)
-{
- if (nvlist_lookup_uint16(nvl, FM_EREPORT_PAYLOAD_NAME_SYND,
- &xr->xr_synd) != 0)
- return (-1);
- if (nvlist_lookup_uint8(nvl, FM_EREPORT_PAYLOAD_NAME_SYND_STATUS,
- &xr->xr_synd_status) != 0)
- return (-1);
- if (nvlist_lookup_uint64(nvl, FM_EREPORT_PAYLOAD_NAME_AFAR,
- &xr->xr_afar) != 0)
- return (-1);
- if (nvlist_lookup_uint8(nvl, FM_EREPORT_PAYLOAD_NAME_AFAR_STATUS,
- &xr->xr_afar_status) != 0)
- return (-1);
- return (0);
-}
-
-/*
- * Search for the entry that matches the ena and the AFAR
- * if we have a valid AFAR, otherwise just match the ENA
- */
-cmd_xxcu_trw_t *
-cmd_trw_lookup(uint64_t ena, uint8_t afar_status, uint64_t afar)
-{
- int i;
-
- if (afar_status == AFLT_STAT_VALID) {
- for (i = 0; i < cmd.cmd_xxcu_ntrw; i++) {
- if (cmd.cmd_xxcu_trw[i].trw_ena == ena &&
- cmd.cmd_xxcu_trw[i].trw_afar == afar)
- return (&cmd.cmd_xxcu_trw[i]);
- }
- } else {
- for (i = 0; i < cmd.cmd_xxcu_ntrw; i++) {
- if (cmd.cmd_xxcu_trw[i].trw_ena == ena)
- return (&cmd.cmd_xxcu_trw[i]);
- }
- }
- return (NULL);
-}
-
-/*ARGSUSED*/
-cmd_errcl_t
-cmd_train_match(cmd_errcl_t trw_mask, cmd_errcl_t resolved_err)
-{
- return (cmd_xxcu_train_match(trw_mask));
-}
-
-/*ARGSUSED*/
-int
-cmd_afar_status_check(uint8_t afar_status, cmd_errcl_t clcode)
-{
- if (afar_status == AFLT_STAT_VALID)
- return (0);
- return (-1);
-}
-
-const errdata_t l3errdata =
- { &cmd.cmd_l3data_serd, "l3cachedata", CMD_PTR_CPU_L3DATA };
-const errdata_t l2errdata =
- { &cmd.cmd_l2data_serd, "l2cachedata", CMD_PTR_CPU_L2DATA };
-
-void
-cmd_fill_errdata(cmd_errcl_t clcode, cmd_cpu_t *cpu, cmd_case_t **cc,
- const errdata_t **ed)
-{
- if (CMD_ERRCL_ISL2XXCU(clcode)) {
- *ed = &l2errdata;
- *cc = &cpu->cpu_l2data;
- } else {
- *ed = &l3errdata;
- *cc = &cpu->cpu_l3data;
- }
-}
-
-/*ARGSUSED*/
-int
-cmd_cpu_synd_check(uint16_t synd, cmd_errcl_t clcode)
-{
- if (synd == CH_POISON_SYND_FROM_XXU_WRITE ||
- synd == CH_POISON_SYND_FROM_XXU_WRMERGE ||
- synd == CH_POISON_SYND_FROM_DSTAT23)
- return (-1);
- else
- return (0);
-}
-/*ARGSUSED*/
-int
-cmd_afar_valid(fmd_hdl_t *hdl, nvlist_t *nvl, cmd_errcl_t clcode,
- uint64_t *afar)
-{
- uint8_t afar_status;
-
- if (nvlist_lookup_uint8(nvl,
- FM_EREPORT_PAYLOAD_NAME_AFAR_STATUS, &afar_status) == 0) {
- if (afar_status == AFLT_STAT_VALID) {
- (void) nvlist_lookup_uint64(nvl,
- FM_EREPORT_PAYLOAD_NAME_AFAR, afar);
- return (0);
- } else
- return (-1);
- } else
- return (-1);
-}
-
-char *
-cmd_cpu_getfrustr_by_id(fmd_hdl_t *hdl, uint32_t cpuid)
-{
- kstat_named_t *kn;
- kstat_ctl_t *kc;
- kstat_t *ksp;
- int i;
-
- if ((kc = kstat_open()) == NULL)
- return (NULL); /* errno is set for us */
-
- if ((ksp = kstat_lookup(kc, "cpu_info", cpuid, NULL)) == NULL ||
- kstat_read(kc, ksp, NULL) == -1) {
- int oserr = errno;
- (void) kstat_close(kc);
- (void) cmd_set_errno(oserr);
- return (NULL);
- }
-
- for (kn = ksp->ks_data, i = 0; i < ksp->ks_ndata; i++, kn++) {
- if (strcmp(kn->name, "cpu_fru") == 0) {
- char *str = fmd_hdl_strdup(hdl,
- KSTAT_NAMED_STR_PTR(kn), FMD_SLEEP);
- (void) kstat_close(kc);
- return (str);
- }
- }
-
- (void) kstat_close(kc);
- (void) cmd_set_errno(ENOENT);
- return (NULL);
-}
-
-char *
-cmd_cpu_getfrustr(fmd_hdl_t *hdl, cmd_cpu_t *cp)
-{
- return (cmd_cpu_getfrustr_by_id(hdl, cp->cpu_cpuid));
-}
-
-/*ARGSUSED*/
-char *
-cmd_cpu_getpartstr(fmd_hdl_t *hdl, cmd_cpu_t *cp) {
- return (NULL);
-}
-
-/*ARGSUSED*/
-char *
-cmd_cpu_getserialstr(fmd_hdl_t *hdl, cmd_cpu_t *cp) {
- return (NULL);
-}
-
-/*ARGSUSED*/
-nvlist_t *
-cmd_cpu_mkfru(fmd_hdl_t *hdl, char *frustr, char *serialstr, char *partstr)
-{
- char *comp;
- nvlist_t *fru, *hcelem;
-
- if (strncmp(frustr, CPU_FRU_FMRI, sizeof (CPU_FRU_FMRI) - 1) != 0)
- return (NULL);
-
- comp = frustr + sizeof (CPU_FRU_FMRI) - 1;
-
- if (nvlist_alloc(&hcelem, NV_UNIQUE_NAME, 0) != 0)
- return (NULL);
-
- if (nvlist_add_string(hcelem, FM_FMRI_HC_NAME,
- FM_FMRI_LEGACY_HC) != 0 ||
- nvlist_add_string(hcelem, FM_FMRI_HC_ID, comp) != 0) {
- nvlist_free(hcelem);
- return (NULL);
- }
-
- if (nvlist_alloc(&fru, NV_UNIQUE_NAME, 0) != 0) {
- nvlist_free(hcelem);
- return (NULL);
- }
-
- if (nvlist_add_uint8(fru, FM_VERSION, FM_HC_SCHEME_VERSION) != 0 ||
- nvlist_add_string(fru, FM_FMRI_SCHEME, FM_FMRI_SCHEME_HC) != 0 ||
- (partstr != NULL &&
- nvlist_add_string(fru, FM_FMRI_HC_PART, partstr) != 0) ||
- (serialstr != NULL &&
- nvlist_add_string(fru, FM_FMRI_HC_SERIAL_ID,
- serialstr) != 0) ||
- nvlist_add_string(fru, FM_FMRI_HC_ROOT, "") != 0 ||
- nvlist_add_uint32(fru, FM_FMRI_HC_LIST_SZ, 1) != 0 ||
- nvlist_add_nvlist_array(fru, FM_FMRI_HC_LIST, &hcelem, 1) != 0) {
- nvlist_free(hcelem);
- nvlist_free(fru);
- return (NULL);
- }
-
- nvlist_free(hcelem);
- return (fru);
-}
-
-nvlist_t *
-cmd_nvl_create_fault(fmd_hdl_t *hdl, const char *class, uint8_t cert,
- nvlist_t *asru, nvlist_t *fru, nvlist_t *rsrc)
-{
- (void) nvlist_add_nvlist(fru, FM_FMRI_AUTHORITY,
- cmd.cmd_auth);
- return (fmd_nvl_create_fault(hdl, class, cert, asru, fru, rsrc));
-}
diff --git a/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_dp.c b/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_dp.c
deleted file mode 100644
index cf91caa1f5..0000000000
--- a/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_dp.c
+++ /dev/null
@@ -1,442 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include <strings.h>
-#include <string.h>
-#include <errno.h>
-#include <fm/fmd_api.h>
-#include <sys/fm/protocol.h>
-#include <sys/async.h>
-#include <sys/time.h>
-#include <cmd.h>
-#include <cmd_state.h>
-#include <cmd_mem.h>
-#include <cmd_dp.h>
-#include <cmd_dp_page.h>
-#include <libnvpair.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <sys/mem.h>
-#include <sys/plat_datapath.h>
-
-/*ARGSUSED*/
-static nvlist_t *
-dp_cpu_fmri(fmd_hdl_t *hdl, uint32_t cpuid, uint64_t serial_id)
-{
- nvlist_t *nvl = NULL;
- int err;
- char sbuf[21]; /* sizeof (UINT64_MAX) + '\0' */
-
- if (nvlist_alloc(&nvl, NV_UNIQUE_NAME, 0) != 0)
- return (NULL);
-
- err = nvlist_add_string(nvl, FM_FMRI_SCHEME, FM_FMRI_SCHEME_CPU);
- err |= nvlist_add_uint8(nvl, FM_VERSION, FM_CPU_SCHEME_VERSION);
- err |= nvlist_add_uint32(nvl, FM_FMRI_CPU_ID, cpuid);
-
- /*
- * Version 1 calls for a string-based serial number
- */
- (void) snprintf(sbuf, sizeof (sbuf), "%llX", (u_longlong_t)serial_id);
- err |= nvlist_add_string(nvl, FM_FMRI_CPU_SERIAL_ID, sbuf);
- if (err != 0) {
- nvlist_free(nvl);
- return (NULL);
- }
- return (nvl);
-}
-
-cmd_dp_t *
-cmd_dp_lookup_fault(fmd_hdl_t *hdl, uint32_t cpuid)
-{
- cmd_dp_t *ptr;
- int i, found = 0;
-
- /*
- * Scan the cmd.cmd_datapaths list to see if there is
- * a fault event present that impacts 'cpuid'
- */
- for (ptr = cmd_list_next(&cmd.cmd_datapaths); ptr != NULL;
- ptr = cmd_list_next(ptr)) {
- if (ptr->dp_erpt_type == DP_FAULT) {
- for (i = 0; i < ptr->dp_ncpus; i++) {
- if (ptr->dp_cpuid_list[i] == cpuid) {
- found = 1;
- break;
- }
- }
- }
- if (found)
- break;
- }
-
- /*
- * Check if the FMRI for the found cpuid exists in the domain.
- * If it does not, it implies a DR has been done and this DP_FAULT
- * is no longer needed.
- */
- if (ptr != NULL) {
- nvlist_t *nvl;
-
- nvl = dp_cpu_fmri(hdl, ptr->dp_cpuid_list[i],
- ptr->dp_serid_list[i]);
-
- if (nvl != NULL) {
- if (!fmd_nvl_fmri_present(hdl, nvl)) {
- cmd_dp_destroy(hdl, ptr);
- ptr = NULL;
- }
- nvlist_free(nvl);
- }
- }
- return (ptr);
-}
-
-cmd_dp_t *
-cmd_dp_lookup_error(cmd_dp_t *dp)
-{
- cmd_dp_t *ptr;
-
- /*
- * Scan the cmd.cmd_datapaths list to see if there is
- * an existing error that matches 'dp'. A match is if
- * both dp_err and the base cpuid are identical
- */
- for (ptr = cmd_list_next(&cmd.cmd_datapaths); ptr != NULL;
- ptr = cmd_list_next(ptr)) {
- if (ptr->dp_erpt_type == DP_ERROR) {
- if ((ptr->dp_err == dp->dp_err) &&
- (ptr->dp_cpuid_list[0] == dp->dp_cpuid_list[0]))
- return (ptr);
- }
- }
- return (NULL);
-}
-
-/*
- * Allocates an nvlist_t, and sets ASRU information according to
- * the cmd_dp_t provided.
- */
-/*ARGSUSED*/
-nvlist_t *
-cmd_dp_setasru(fmd_hdl_t *hdl, cmd_dp_t *dpt)
-{
- nvlist_t *asru, *hcelem[DP_MAX_ASRUS];
- int i, j, sz, err;
- char buf[DP_MAX_BUF];
-
- sz = dpt->dp_ncpus;
-
- /* put ASRUs in an nvlist */
- for (i = 0; i < sz; i++) {
- (void) snprintf(buf, DP_MAX_BUF, "%d", dpt->dp_cpuid_list[i]);
- if (nvlist_alloc(&hcelem[i], NV_UNIQUE_NAME, 0) != 0)
- return (NULL);
-
- err = nvlist_add_string(hcelem[i], FM_FMRI_HC_NAME,
- FM_FMRI_CPU_ID);
- err |= nvlist_add_string(hcelem[i], FM_FMRI_HC_ID, buf);
- if (err != 0) {
- for (j = 0; j < i + 1; j++)
- nvlist_free(hcelem[j]);
- return (NULL);
- }
- }
-
- /* put it in an HC scheme */
- if (nvlist_alloc(&asru, NV_UNIQUE_NAME, 0) != 0) {
- for (j = 0; j < sz; j++)
- nvlist_free(hcelem[j]);
- return (NULL);
- }
- err = nvlist_add_uint8(asru, FM_VERSION, FM_HC_SCHEME_VERSION);
- err |= nvlist_add_string(asru, FM_FMRI_SCHEME, FM_FMRI_SCHEME_HC);
- err |= nvlist_add_string(asru, FM_FMRI_HC_ROOT, "");
- err |= nvlist_add_uint32(asru, FM_FMRI_HC_LIST_SZ, sz);
- err |= nvlist_add_nvlist_array(asru, FM_FMRI_HC_LIST, &hcelem[0],
- dpt->dp_ncpus);
- if (err != 0) {
- for (j = 0; j < sz; j++)
- nvlist_free(hcelem[j]);
- nvlist_free(asru);
- return (NULL);
- }
-
- /* free up memory */
- for (j = 0; j < sz; j++)
- nvlist_free(hcelem[j]);
-
- /* return the ASRU */
- return (asru);
-}
-
-void
-dp_buf_write(fmd_hdl_t *hdl, cmd_dp_t *dp)
-{
- size_t sz;
-
- if ((sz = fmd_buf_size(hdl, NULL, dp->dp_bufname)) != 0 &&
- sz != sizeof (cmd_dp_pers_t))
- fmd_buf_destroy(hdl, NULL, dp->dp_bufname);
-
- fmd_buf_write(hdl, NULL, dp->dp_bufname, &dp->dp_pers,
- sizeof (cmd_dp_pers_t));
-}
-
-static cmd_dp_t *
-dp_wrapv0(fmd_hdl_t *hdl, cmd_dp_pers_t *pers, size_t psz)
-{
- cmd_dp_t *dp;
-
- if (psz != sizeof (cmd_dp_pers_t)) {
- fmd_hdl_abort(hdl, "size of state doesn't match size of "
- "version 1 state (%u bytes).\n", sizeof (cmd_dp_pers_t));
- }
-
- dp = fmd_hdl_zalloc(hdl, sizeof (cmd_dp_t), FMD_SLEEP);
- bcopy(pers, dp, sizeof (cmd_dp_pers_t));
- fmd_hdl_free(hdl, pers, psz);
- return (dp);
-}
-
-void *
-cmd_dp_restore(fmd_hdl_t *hdl, fmd_case_t *cp, cmd_case_ptr_t *ptr)
-{
- cmd_dp_t *dp;
-
- for (dp = cmd_list_next(&cmd.cmd_datapaths); dp != NULL;
- dp = cmd_list_next(dp)) {
- if (dp->dp_case == cp)
- break;
- }
-
- if (dp == NULL) {
- size_t dpsz;
-
- fmd_hdl_debug(hdl, "restoring dp from %s\n", ptr->ptr_name);
-
- if ((dpsz = fmd_buf_size(hdl, NULL, ptr->ptr_name)) == 0) {
- if (fmd_case_solved(hdl, cp) ||
- fmd_case_closed(hdl, cp)) {
- fmd_hdl_debug(hdl, "dp %s from case %s not "
- "found. Case is already solved or closed\n",
- ptr->ptr_name, fmd_case_uuid(hdl, cp));
- return (NULL);
- } else {
- fmd_hdl_abort(hdl, "dp referenced by case %s "
- "does not exist in saved state\n",
- fmd_case_uuid(hdl, cp));
- }
- } else if (dpsz > CMD_DP_MAXSIZE ||
- dpsz < CMD_DP_MINSIZE) {
- fmd_hdl_abort(hdl, "dp buffer referenced by "
- "case %s is out of bounds (is %u bytes, "
- "max %u, min %u)\n", fmd_case_uuid(hdl, cp),
- dpsz, CMD_DP_MAXSIZE, CMD_DP_MINSIZE);
- }
-
- if ((dp = cmd_buf_read(hdl, NULL, ptr->ptr_name, dpsz)) == NULL)
- fmd_hdl_abort(hdl, "failed to read dp buf %s",
- ptr->ptr_name);
-
- switch (dp->dp_version) {
- case CMD_DP_VERSION_0:
- dp = dp_wrapv0(hdl, (cmd_dp_pers_t *)dp, dpsz);
- break;
- default:
- fmd_hdl_abort(hdl, "unknown version (found %d) "
- "for dp state referenced by case %s.\n",
- dp->dp_version, fmd_case_uuid(hdl, cp));
- break;
- }
-
- dp->dp_case = cp;
-
- if (dp->dp_erpt_type == DP_ERROR) {
- fmd_event_t *ep = fmd_case_getprincipal(hdl, cp);
-
- ++cmd.cmd_dp_flag;
-
- dp->dp_id = fmd_timer_install(hdl,
- (void *)CMD_TIMERTYPE_DP, ep,
- (hrtime_t)NANOSEC * (dp->dp_t_value + 120));
- }
-
- cmd_list_append(&cmd.cmd_datapaths, dp);
- }
-
- return (dp);
-}
-
-void
-cmd_dp_close(fmd_hdl_t *hdl, void *arg)
-{
- cmd_dp_destroy(hdl, arg);
-}
-
-void
-cmd_dp_timeout(fmd_hdl_t *hdl, id_t id)
-{
- cmd_dp_t *dp;
-
- /* close case associated with the timer */
- for (dp = cmd_list_next(&cmd.cmd_datapaths); dp != NULL;
- dp = cmd_list_next(dp)) {
- if (dp->dp_id == id) {
- cmd_dp_destroy(hdl, dp);
- break;
- }
- }
-
- fmd_hdl_debug(hdl, "cmd_dp_timeout() complete\n");
-}
-
-/*
- * Validate by matching each cmd_dp_t cpu and serial id to what is
- * installed and active on this machine or domain. Delete the cmd_dp_t
- * if no match is made.
- */
-void
-cmd_dp_validate(fmd_hdl_t *hdl)
-{
- cmd_dp_t *dp, *next;
- nvlist_t *nvl;
- int i, no_match;
-
- for (dp = cmd_list_next(&cmd.cmd_datapaths); dp != NULL; dp = next) {
- next = cmd_list_next(dp);
-
- for (i = 0, no_match = 0; i < dp->dp_ncpus; i++) {
- nvl = dp_cpu_fmri(hdl, dp->dp_cpuid_list[i],
- dp->dp_serid_list[i]);
-
- if (nvl == NULL)
- fmd_hdl_abort(hdl, "could not make CPU fmri");
-
- if (!fmd_nvl_fmri_present(hdl, nvl))
- no_match = 1;
-
- nvlist_free(nvl);
-
- if (no_match) {
- cmd_dp_destroy(hdl, dp);
- break;
- }
- }
- }
-}
-
-static void
-cmd_dp_free(fmd_hdl_t *hdl, cmd_dp_t *dp, int destroy)
-{
- if (dp->dp_case != NULL)
- cmd_case_fini(hdl, dp->dp_case, destroy);
-
- if (destroy && dp->dp_erpt_type == DP_ERROR) {
- --cmd.cmd_dp_flag;
- /*
- * If there are no active datapath events, replay any
- * pages that were deferred.
- */
- if (cmd.cmd_dp_flag == 0)
- cmd_dp_page_replay(hdl);
- }
-
- if (destroy)
- fmd_buf_destroy(hdl, NULL, dp->dp_bufname);
-
- cmd_list_delete(&cmd.cmd_datapaths, dp);
- fmd_hdl_free(hdl, dp, sizeof (cmd_dp_t));
-}
-
-void
-cmd_dp_destroy(fmd_hdl_t *hdl, cmd_dp_t *dp)
-{
- cmd_dp_free(hdl, dp, FMD_B_TRUE);
-}
-
-/*ARGSUSED*/
-int
-cmd_dp_error(fmd_hdl_t *hdl)
-{
- if (cmd.cmd_dp_flag)
- return (1);
- else
- return (0);
-}
-
-int
-cmd_dp_get_mcid(uint64_t addr, int *mcid)
-{
- int fd, rc;
- mem_info_t data;
-
- if ((fd = open("/dev/mem", O_RDONLY)) < 0)
- return (-1);
-
- data.m_addr = addr;
- data.m_synd = 0;
- if ((rc = ioctl(fd, MEM_INFO, &data)) < 0) {
- (void) close(fd);
- return (rc);
- }
-
- (void) close(fd);
- *mcid = data.m_mcid;
-
- return (0);
-}
-
-/*ARGSUSED*/
-int
-cmd_dp_fault(fmd_hdl_t *hdl, uint64_t addr)
-{
- int mcid;
-
- if (cmd_dp_get_mcid(addr, &mcid) < 0)
- fmd_hdl_abort(hdl, "cmd_dp_get_mcid failed");
-
- if (cmd_dp_lookup_fault(hdl, mcid) != NULL)
- return (1);
- else
- return (0);
-}
-
-void
-cmd_dp_fini(fmd_hdl_t *hdl)
-{
- cmd_dp_t *dp;
- cmd_dp_defer_t *dpage;
-
- while ((dp = cmd_list_next(&cmd.cmd_datapaths)) != NULL)
- cmd_dp_free(hdl, dp, FMD_B_FALSE);
-
- while ((dpage = cmd_list_next(&cmd.cmd_deferred_pages)) != NULL) {
- cmd_list_delete(&cmd.cmd_deferred_pages, dpage);
- fmd_hdl_free(hdl, dpage, sizeof (cmd_dp_defer_t));
- }
-}
diff --git a/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_dp.h b/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_dp.h
deleted file mode 100644
index 5b8ee7b859..0000000000
--- a/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_dp.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2005 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _CMD_DATAPATH_H
-#define _CMD_DATAPATH_H
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include <cmd_fmri.h>
-
-/*
- * Member Name Data Type Comments
- * ----------- --------- -----------
- * version uint8 0
- * class string "asic"
- * ENA uint64 ENA Format 1
- * detector fmri aggregated ID data for SC-DE
- *
- * Datapath ereport subclasses and data payloads:
- * There will be two types of ereports (error and fault) which will be
- * identified by the "type" member.
- *
- * ereport.asic.*.cds.cds-dp
- * ereport.asic.*.dx.dx-dp
- * ereport.asic.*.sdi.sdi-dp
- * ereport.asic.*.cp.cp-dp
- * ereport.asic.*.rp.rp-dp
- *
- * Member Name Data Type Comments
- * ----------- --------- -----------
- * erptype uint16 derived from message type: error or
- * fault
- * t-value uint32 SC's datapath SERD timeout threshold
- * dp-list-sz uint8 number of dp-list array elements
- * dp-list array of uint16 Safari IDs of affected cpus
- * sn-list array of uint64 Serial numbers of affected cpus
- */
-
-#define DP_MAX_FRU 23 /* maximum char length of dp FRUs */
-#define DP_MAX_ASRUS 12 /* maximum number of dp ASRUs */
-#define DP_MAX_CLASS 32 /* max length of dp fault class */
-#define DP_MAX_BUF 16 /* max len for general purpose buffer */
-#define DP_MAX_NUM_CPUS 8 /* max number of CPUs in a DP ereport */
-#define DP_MAX_MCS 4 /* max # of MCs per memory page */
-
-#define CMD_DP_VERSION_0 0
-#define CMD_DP_VERSION CMD_DP_VERSION_0
-
-/* Portion of datapath structure to be persisted */
-typedef struct cmd_dp_pers {
- cmd_header_t dpp_header; /* Nodetype must be CMD_NT_DP */
- uint_t dpp_version; /* struct version */
- uint16_t dpp_erpt_type; /* ereport type (fault or error) */
- uint8_t dpp_err; /* CDS, DX, EX, CP (xc), RP (sg) */
- uint32_t dpp_t_value; /* SERD timeout threshold (seconds) */
- uint32_t dpp_ncpus; /* number of associated CPUs */
- uint16_t dpp_cpuid_list[DP_MAX_NUM_CPUS]; /* array of CPU ids */
- uint64_t dpp_serid_list[DP_MAX_NUM_CPUS]; /* CPU serial #'s */
-} cmd_dp_pers_t;
-
-typedef struct cmd_dp {
- cmd_dp_pers_t dp_pers;
- fmd_case_t *dp_case; /* fmd case pointer */
- id_t dp_id; /* timer id */
-} cmd_dp_t;
-
-#define CMD_DP_MAXSIZE sizeof (cmd_dp_pers_t)
-#define CMD_DP_MINSIZE sizeof (cmd_dp_pers_t)
-
-#define dp_header dp_pers.dpp_header
-#define dp_nodetype dp_pers.dpp_header.hdr_nodetype
-#define dp_bufname dp_pers.dpp_header.hdr_bufname
-#define dp_version dp_pers.dpp_version
-#define dp_erpt_type dp_pers.dpp_erpt_type
-#define dp_err dp_pers.dpp_err
-#define dp_cpuid dp_pers.dpp_cpuid
-#define dp_ncpus dp_pers.dpp_ncpus
-#define dp_t_value dp_pers.dpp_t_value
-#define dp_cpuid_list dp_pers.dpp_cpuid_list
-#define dp_serid_list dp_pers.dpp_serid_list
-
-extern cmd_evdisp_t cmd_dp_cds(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-
-extern cmd_evdisp_t cmd_dp_dx(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-
-extern cmd_evdisp_t cmd_dp_ex(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-
-extern cmd_evdisp_t cmd_dp_cp(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-
-extern void cmd_dp_close(fmd_hdl_t *, void *);
-extern void cmd_dp_timeout(fmd_hdl_t *, id_t);
-extern cmd_dp_t *cmd_dp_lookup_fault(fmd_hdl_t *, uint32_t);
-extern void *cmd_dp_restore(fmd_hdl_t *, fmd_case_t *, cmd_case_ptr_t *);
-extern void cmd_dp_validate(fmd_hdl_t *);
-extern void cmd_dp_destroy(fmd_hdl_t *, cmd_dp_t *);
-extern nvlist_t *cmd_dp_setasru(fmd_hdl_t *, cmd_dp_t *);
-extern cmd_dp_t *cmd_dp_lookup_error(cmd_dp_t *);
-extern void dp_buf_write(fmd_hdl_t *, cmd_dp_t *);
-extern int cmd_dp_error(fmd_hdl_t *);
-extern int cmd_dp_fault(fmd_hdl_t *, uint64_t);
-extern int cmd_dp_get_mcid(uint64_t, int *);
-extern void cmd_dp_fini(fmd_hdl_t *);
-
-#endif /* _CMD_DATAPATH_H */
diff --git a/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_dp_page.c b/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_dp_page.c
deleted file mode 100644
index e7912df20a..0000000000
--- a/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_dp_page.c
+++ /dev/null
@@ -1,276 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2006 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-/*
- * Support routines for managing potential page and bank faults that have
- * been deferred due to a datapath error. Currently deferment only occurs
- * if a memory UE occurs while a datapath error is active. When this happens
- * a page case is created with a special subtype of CMD_PTR_DP_PAGE_DEFER. An
- * entry (a cmd_dp_defer_t) is added to a list of deferred pages. The entry
- * links to the cmd_page_t in the cmd_pages list and also keeps track of what
- * memory controller ids are associated with the first AFAR and any more that
- * are seen while the page is deferred. This information is used to determine
- * if the page should be faulted if the fault should be skipped because an
- * intervening datapath fault has occurred. If a page is faulted when it is
- * replayed, the corresponding bank is faulted, too, since the original error
- * was a UE. Note that no action is taken to undo any action taken by the
- * kernel when the UE was detected. Currently the kernel will attempt to
- * immediately retire the page where a UE is detected and the retire may or
- * may not have completed by the time FMA receives an ereport. The possibility
- * of a datapath fault resulting in memory UEs is very small, so the likelihood
- * of encountering this scenario is also very small.
- */
-
-#include <cmd.h>
-#include <cmd_dp.h>
-#include <cmd_dp_page.h>
-#include <cmd_bank.h>
-#include <cmd_page.h>
-
-#include <fm/fmd_api.h>
-#include <sys/nvpair.h>
-
-extern void cmd_bank_fault(fmd_hdl_t *, cmd_bank_t *);
-
-static void
-dp_page_defer_data_write(fmd_hdl_t *hdl, cmd_dp_defer_t *dpage)
-{
- fmd_buf_write(hdl, dpage->dp_defer_page->page_case.cc_cp, "mcids",
- &dpage->dp_defer_mcids, sizeof (dpage->dp_defer_mcids));
-}
-
-static void
-dp_page_defer_data_restore(fmd_hdl_t *hdl, cmd_dp_defer_t *dpage)
-{
- fmd_buf_read(hdl, dpage->dp_defer_page->page_case.cc_cp, "mcids",
- &dpage->dp_defer_mcids, sizeof (dpage->dp_defer_mcids));
-}
-
-static void
-dp_page_defer_add_data(fmd_hdl_t *hdl, cmd_dp_defer_t *dpage, uint64_t afar)
-{
- int mcid;
- int i;
-
- if (cmd_dp_get_mcid(afar, &mcid) < 0)
- fmd_hdl_abort(hdl, "cmd_dp_get_mcid failed");
-
- for (i = 0; i < DP_MAX_MCS; i++) {
- if (dpage->dp_defer_mcids[i] == -1) {
- dpage->dp_defer_mcids[i] = mcid;
- break;
- }
- if (dpage->dp_defer_mcids[i] == mcid)
- break;
- }
-
- if (i == DP_MAX_MCS)
- fmd_hdl_abort(hdl, "too many mcids for deferred page");
-
- dp_page_defer_data_write(hdl, dpage);
-}
-
-static cmd_dp_defer_t *
-dp_page_defer_create(fmd_hdl_t *hdl, cmd_page_t *page, uint64_t afar)
-{
- cmd_dp_defer_t *dpage;
- int i;
-
- dpage = fmd_hdl_zalloc(hdl, sizeof (cmd_dp_defer_t), FMD_SLEEP);
-
- dpage->dp_defer_page = page;
-
- for (i = 0; i < DP_MAX_MCS; i++)
- dpage->dp_defer_mcids[i] = -1;
-
- dp_page_defer_add_data(hdl, dpage, afar);
-
- cmd_list_append(&cmd.cmd_deferred_pages, dpage);
-
- return (dpage);
-}
-
-static cmd_dp_defer_t *
-dp_page_defer_lookup(cmd_page_t *page)
-{
- cmd_dp_defer_t *dpage;
-
- for (dpage = cmd_list_next(&cmd.cmd_deferred_pages); dpage != NULL;
- dpage = cmd_list_next(dpage)) {
- if (dpage->dp_defer_page == page)
- return (dpage);
- }
-
- return (NULL);
-}
-
-void
-cmd_dp_page_defer(fmd_hdl_t *hdl, nvlist_t *modasru, fmd_event_t *ep,
- uint64_t afar)
-{
- cmd_dp_defer_t *dpage;
- cmd_page_t *page = cmd_page_lookup(afar);
- const char *uuid;
-
- if (page == NULL) {
- page = cmd_page_create(hdl, modasru, afar);
- dpage = dp_page_defer_create(hdl, page, afar);
- page->page_case.cc_cp = cmd_case_create(hdl, &page->page_header,
- CMD_PTR_DP_PAGE_DEFER, &uuid);
- fmd_case_setprincipal(hdl, page->page_case.cc_cp, ep);
- } else {
- dpage = dp_page_defer_lookup(page);
- if (dpage == NULL)
- fmd_hdl_abort(hdl, "deferred page with no defer data");
- fmd_case_add_ereport(hdl, page->page_case.cc_cp, ep);
- }
-
- dp_page_defer_add_data(hdl, dpage, afar);
-}
-
-int
-cmd_dp_page_check(fmd_hdl_t *hdl, cmd_dp_defer_t *dpage)
-{
- int i;
-
- for (i = 0; i < DP_MAX_MCS; i++) {
- if (dpage->dp_defer_mcids[i] == -1)
- break;
- /*
- * If there's no datapath fault corresponding to
- * an mcid, that means the page incurred an error
- * not attributable to a datapath fault.
- */
- if (cmd_dp_lookup_fault(hdl, dpage->dp_defer_mcids[i]) == 0)
- return (0);
- }
-
- return (1);
-}
-
-void
-cmd_dp_page_replay(fmd_hdl_t *hdl)
-{
- fmd_event_t *ep;
- cmd_page_t *page;
- cmd_bank_t *bank;
- cmd_dp_defer_t *dpage;
- nvlist_t *nvl;
-
- while ((dpage = cmd_list_next(&cmd.cmd_deferred_pages)) != NULL) {
- fmd_hdl_debug(hdl, "replaying deferred page, "
- "pa=%llx\n", dpage->dp_defer_page->page_physbase);
-
- page = dpage->dp_defer_page;
-
- if (cmd_dp_page_check(hdl, dpage)) {
- fmd_hdl_debug(hdl, "deferred memory UE overtaken by "
- "dp fault");
- CMD_STAT_BUMP(dp_ignored_ue);
- fmd_case_close(hdl, page->page_case.cc_cp);
- cmd_list_delete(&cmd.cmd_deferred_pages, dpage);
- fmd_hdl_free(hdl, dpage, sizeof (cmd_dp_defer_t));
- cmd_page_destroy(hdl, page);
- continue;
- }
-
- nvl = page->page_asru_nvl;
-
- bank = cmd_bank_lookup(hdl, nvl);
-
- ep = fmd_case_getprincipal(hdl, page->page_case.cc_cp);
- fmd_case_add_ereport(hdl, bank->bank_case.cc_cp, ep);
-
- bank->bank_nretired++;
- bank->bank_retstat.fmds_value.ui64++;
- cmd_bank_dirty(hdl, bank);
-
- fmd_case_reset(hdl, page->page_case.cc_cp);
- cmd_case_fini(hdl, page->page_case.cc_cp, FMD_B_TRUE);
-
- page->page_case.cc_cp = NULL;
- cmd_page_fault(hdl, nvl, nvl, ep, page->page_physbase);
- cmd_bank_fault(hdl, bank);
-
- cmd_list_delete(&cmd.cmd_deferred_pages, dpage);
- fmd_hdl_free(hdl, dpage, sizeof (cmd_dp_defer_t));
- }
-
- fmd_hdl_debug(hdl, "cmd_page_defer_replay() complete\n");
-}
-
-void
-cmd_dp_page_restore(fmd_hdl_t *hdl, cmd_page_t *page)
-{
- cmd_dp_defer_t *dpage;
-
- dpage = fmd_hdl_zalloc(hdl, sizeof (cmd_dp_defer_t), FMD_SLEEP);
-
- dpage->dp_defer_page = page;
-
- dp_page_defer_data_restore(hdl, dpage);
-
- cmd_list_append(&cmd.cmd_deferred_pages, dpage);
-}
-
-void
-cmd_dp_page_validate(fmd_hdl_t *hdl)
-{
- cmd_dp_defer_t *dpage, *next;
- cmd_page_t *page;
-
- for (dpage = cmd_list_next(&cmd.cmd_deferred_pages); dpage != NULL;
- dpage = next) {
- next = cmd_list_next(dpage);
-
- page = dpage->dp_defer_page;
-
- if (!fmd_nvl_fmri_present(hdl, page->page_asru_nvl)) {
- cmd_page_destroy(hdl, page);
- cmd_list_delete(&cmd.cmd_deferred_pages, dpage);
- fmd_hdl_free(hdl, dpage, sizeof (cmd_dp_defer_t));
- }
- }
-}
-
-/*ARGSUSED*/
-int
-cmd_dp_page_isdeferred(fmd_hdl_t *hdl, cmd_page_t *page)
-{
- cmd_dp_defer_t *dpage, *next;
-
- for (dpage = cmd_list_next(&cmd.cmd_deferred_pages); dpage != NULL;
- dpage = next) {
- next = cmd_list_next(dpage);
-
- if (dpage->dp_defer_page == page) {
- return (1);
- }
- }
-
- return (0);
-}
diff --git a/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_dp_page.h b/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_dp_page.h
deleted file mode 100644
index c51216c924..0000000000
--- a/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_dp_page.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2006 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _CMD_DP_PAGE_H
-#define _CMD_DP_PAGE_H
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include <cmd.h>
-#include <cmd_page.h>
-#include <cmd_dp.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct cmd_dp_defer {
- cmd_header_t dp_defer_hdr;
- cmd_page_t *dp_defer_page; /* ptr to cmd_page_t of deferred page */
- int dp_defer_mcids[DP_MAX_MCS]; /* mem ctrl ids for AFARs seen */
-} cmd_dp_defer_t;
-
-extern void cmd_dp_page_defer(fmd_hdl_t *, nvlist_t *, fmd_event_t *,
- uint64_t);
-extern void cmd_dp_page_replay(fmd_hdl_t *);
-extern void cmd_dp_page_restore(fmd_hdl_t *, cmd_page_t *);
-extern void cmd_dp_page_validate(fmd_hdl_t *);
-extern int cmd_dp_page_isdeferred(fmd_hdl_t *, cmd_page_t *);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _CMD_DP_PAGE_H */
diff --git a/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_dperr.c b/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_dperr.c
deleted file mode 100644
index c7d0c9da80..0000000000
--- a/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_dperr.c
+++ /dev/null
@@ -1,424 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-/*
- * Ereport-handling routines for Datapath errors
- * - receive datapath ereports and open datapath case
- * - solve datapath case when datapath fault ereports are received
- * - maintain state of datapath error flag
- * - close datapath case when timeout occurs (w/o fault)
- */
-
-
-#include <strings.h>
-#include <string.h>
-#include <errno.h>
-#include <fm/fmd_api.h>
-#include <sys/fm/protocol.h>
-#include <sys/async.h>
-#include <sys/time.h>
-#include <cmd.h>
-#include <cmd_state.h>
-#include <cmd_dp.h>
-#include <cmd_dp_page.h>
-#include <cmd_page.h>
-#include <libnvpair.h>
-#include <sys/plat_datapath.h>
-
-/*
- * Member Name Data Type Comments
- * ----------- --------- -----------
- * version uint8 0
- * class string "asic"
- * ENA uint64 ENA Format 1
- * detector fmri aggregated ID data for SC-DE
- *
- * Datapath ereport subclasses and data payloads:
- * There will be two types of ereports (error and fault) which will be
- * identified by the "type" member.
- *
- * ereport.asic.*.cds.cds-dp
- * ereport.asic.*.dx.dx-dp
- * ereport.asic.*.sdi.sdi-dp
- * ereport.asic.*.cp.cp-dp
- * ereport.asic.*.rp.rp-dp // serengeti doesn't use "cp" term
- *
- * Member Name Data Type Comments
- * ----------- --------- -----------
- * erptype uint16 derived from message type: error or
- * fault
- * t-value uint32 SC's datapath SERD timeout threshold
- * dp-list-sz uint8 number of dp-list array elements
- * dp-list array of uint16 Safari IDs of affected cpus
- */
-
-static char *dperrtype[] = {
- DP_ERROR_CDS, /* Starcat types */
- DP_ERROR_DX,
- DP_ERROR_EX,
- DP_ERROR_CP,
- DP_ERROR_CDS, /* Serengeti types */
- DP_ERROR_DX,
- DP_ERROR_RP
-};
-
-/*
- * Construct the ASRU(s)/FRU(s) associated with a data path fault,
- * construct the fault(s), and add the suspect(s) to the case
- *
- */
-void
-cmd_dp_add_suspects(fmd_hdl_t *hdl, cmd_dp_t *dp)
-{
- const char *funcname = "cmd_dp_add_suspects()";
- char class[DP_MAX_CLASS];
- char frustr[3][DP_MAX_FRU];
- int cpuid, numfru, sgpos, xcpos, i, err;
- nvlist_t *asru, *fru = NULL, *flt, *hcel;
-
- /* build ASRU, fault event class */
- asru = cmd_dp_setasru(hdl, dp);
- (void) snprintf(class, DP_MAX_CLASS, "fault.asic.%s.%s",
- dperrtype[dp->dp_err], FM_ERROR_DATAPATH);
-
- cpuid = dp->dp_cpuid_list[0];
-
- /* extract fru position */
- sgpos = ((cpuid & 0x1f) / 4);
- xcpos = ((cpuid >> 5) & 0x1f);
-
- /* build FRU(s) for the particular error */
- numfru = 0;
- switch (dp->dp_err) {
- case SC_DP_CDS_TYPE:
- case SC_DP_DX_TYPE:
- /* check for slot 1 (maxcat) */
- if ((cpuid >> 3) & 0x1)
- (void) snprintf(frustr[0], DP_MAX_FRU, "IO%d", xcpos);
- else
- (void) snprintf(frustr[0], DP_MAX_FRU, "SB%d", xcpos);
-
- numfru = 1;
- break;
-
- case SC_DP_EX_TYPE:
- /* check for slot 1 (maxcat) */
- if ((cpuid >> 3) & 0x1)
- (void) snprintf(frustr[0], DP_MAX_FRU, "IO%d", xcpos);
- else
- (void) snprintf(frustr[0], DP_MAX_FRU, "SB%d", xcpos);
-
- (void) snprintf(frustr[1], DP_MAX_FRU, "EX%d", xcpos);
- numfru = 2;
- break;
-
- case SC_DP_CP_TYPE:
- /* no way to know which CP half, be generic */
- (void) snprintf(frustr[0], DP_MAX_FRU, "EX%d", xcpos);
- (void) snprintf(frustr[1], DP_MAX_FRU, "CP");
- (void) snprintf(frustr[2], DP_MAX_FRU, "CS");
- numfru = 3;
- break;
-
- case SG_DP_CDS_TYPE:
- case SG_DP_DX_TYPE:
- (void) snprintf(frustr[0], DP_MAX_FRU, "/N0/SB%d", sgpos);
- numfru = 1;
- break;
-
- case SG_DP_RP_TYPE:
- /* no way to know which RP, be generic */
- (void) snprintf(frustr[0], DP_MAX_FRU, "/N0/SB%d", sgpos);
- (void) snprintf(frustr[1], DP_MAX_FRU, "RP");
- numfru = 2;
- break;
-
- default:
- fmd_hdl_debug(hdl, "%s: invalid DP error type %d", funcname,
- dp->dp_err);
- nvlist_free(asru);
- return;
- }
-
- /* For each FRU, build an FMRI, create fault, add as suspect */
- for (i = 0; i < numfru; i++) {
- /* build a FRU FMRI */
- if (nvlist_alloc(&hcel, NV_UNIQUE_NAME, 0) != 0) {
- nvlist_free(asru);
- return;
- }
- err = nvlist_add_string(hcel, FM_FMRI_HC_NAME,
- FM_FMRI_LEGACY_HC);
- err |= nvlist_add_string(hcel, FM_FMRI_HC_ID, frustr[i]);
- if (err != 0) {
- nvlist_free(hcel);
- nvlist_free(asru);
- return;
- }
-
- /* put it in an HC scheme */
- if (nvlist_alloc(&fru, NV_UNIQUE_NAME, 0) != 0) {
- nvlist_free(hcel);
- nvlist_free(asru);
- return;
- }
- err = nvlist_add_uint8(fru, FM_VERSION, FM_HC_SCHEME_VERSION);
- err |= nvlist_add_string(fru, FM_FMRI_SCHEME,
- FM_FMRI_SCHEME_HC);
- err |= nvlist_add_string(fru, FM_FMRI_HC_ROOT, "");
- err |= nvlist_add_uint32(fru, FM_FMRI_HC_LIST_SZ, 1);
- err |= nvlist_add_nvlist_array(fru, FM_FMRI_HC_LIST, &hcel, 1);
- if (err != 0) {
- nvlist_free(fru);
- nvlist_free(hcel);
- nvlist_free(asru);
- return;
- }
-
- /* create the fault, add to case. */
- flt = cmd_nvl_create_fault(hdl, class, 100/numfru,
- asru, fru, NULL);
- fmd_case_add_suspect(hdl, dp->dp_case, flt);
-
- /* free up memory */
- nvlist_free(fru);
- nvlist_free(hcel);
- }
-
- /* free up ASRU */
- nvlist_free(asru);
-}
-
-/*ARGSUSED*/
-cmd_evdisp_t
-cmd_dp_common(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl, const char *class,
- cmd_errcl_t clcode, uint8_t dperr)
-{
- const char *funcname = "cmd_dp_common()";
- const char *uuidp;
- cmd_dp_t *dpt, *ept;
- int err, i, fltflg;
- uint16_t *cpuid_list;
- uint64_t *serid_list;
- uint32_t ncpuids;
-
- /* extract common ereport contents */
- dpt = fmd_hdl_zalloc(hdl, sizeof (cmd_dp_t), FMD_SLEEP);
- dpt->dp_nodetype = CMD_NT_DP;
- dpt->dp_version = CMD_DP_VERSION;
- dpt->dp_err = dperr;
- err = nvlist_lookup_pairs(nvl, 0,
- DP_EREPORT_TYPE, DATA_TYPE_UINT16, &dpt->dp_erpt_type,
- DP_TVALUE, DATA_TYPE_UINT32, &dpt->dp_t_value,
- DP_LIST_SIZE, DATA_TYPE_UINT32, &ncpuids, NULL);
- if (err != 0) {
- fmd_hdl_debug(hdl, "%s: unable to verify ereport contents "
- "(erptype, ena, t_value, dp_list_sz)", funcname);
- fmd_hdl_free(hdl, dpt, sizeof (cmd_dp_t));
- return (CMD_EVD_UNUSED);
- }
-
- /* extract cpuid list from ereport */
- err = nvlist_lookup_uint16_array(nvl, DP_LIST, &cpuid_list,
- &ncpuids);
- err |= nvlist_lookup_uint64_array(nvl, SN_LIST, &serid_list,
- &ncpuids);
- if (err != 0) {
- fmd_hdl_debug(hdl, "%s: unable to verify ereport contents "
- "(dp_list, sn_list)", funcname);
- fmd_hdl_free(hdl, dpt, sizeof (cmd_dp_t));
- return (CMD_EVD_UNUSED);
- }
-
- for (i = 0; i < ncpuids; i++) {
- dpt->dp_cpuid_list[i] = cpuid_list[i];
- dpt->dp_serid_list[i] = serid_list[i];
- }
-
- dpt->dp_ncpus = ncpuids;
-
- switch (dpt->dp_erpt_type) {
-
- case DP_ERROR:
-
- /*
- * Scan existing faults on cmd.cmd_datapaths. If each
- * cpuid in the current datapath event already has an
- * associated DP fault, this is an uninteresting event.
- */
- fltflg = 0;
- for (i = 0; i < ncpuids; i++)
- if (cmd_dp_lookup_fault(hdl, cpuid_list[i]) != NULL)
- fltflg++;
- if (fltflg == ncpuids) {
- fmd_hdl_debug(hdl, "%s: datapath fault(s) already "
- "experienced, event uninteresting\n", funcname);
- fmd_hdl_free(hdl, dpt, sizeof (cmd_dp_t));
- return (CMD_EVD_UNUSED);
- }
-
- /*
- * Check for an existing datapath error, and if found
- * add this event to the existing case
- */
- ept = cmd_dp_lookup_error(dpt);
- if (ept != NULL && !fmd_case_closed(hdl, ept->dp_case)) {
- fmd_hdl_debug(hdl, "%s: found existing datapath error, "
- "adding event to case\n", funcname);
- fmd_case_add_ereport(hdl, ept->dp_case, ep);
- /* check for t-value change */
- if (dpt->dp_t_value != ept->dp_t_value) {
- fmd_event_t *ep;
-
- fmd_timer_remove(hdl, ept->dp_id);
- ep = fmd_case_getprincipal(hdl, ept->dp_case);
- ept->dp_id = fmd_timer_install(hdl,
- (void *)CMD_TIMERTYPE_DP, ep,
- (hrtime_t)NANOSEC *
- (dpt->dp_t_value + 120));
- }
- fmd_hdl_free(hdl, dpt, sizeof (cmd_dp_t));
- return (CMD_EVD_OK);
- }
-
- /*
- * Didn't find an existing datapath error. Create a new
- * case, add the event. Also, stash the datapath event on the
- * cmd.cmd_datapaths list
- */
- fmd_hdl_debug(hdl, "%s: new datapath error, create case and "
- "add to cmd.cmd_datapaths\n", funcname);
- ++cmd.cmd_dp_flag;
-
- cmd_bufname(dpt->dp_bufname, sizeof (dpt->dp_bufname),
- "dp_err_%d_%s", dpt->dp_cpuid_list[0],
- dperrtype[dpt->dp_err]);
-
- dp_buf_write(hdl, dpt);
-
- dpt->dp_case = cmd_case_create(hdl, &dpt->dp_header,
- CMD_PTR_DP_CASE, &uuidp);
- fmd_case_setprincipal(hdl, dpt->dp_case, ep);
- dpt->dp_id = fmd_timer_install(hdl, (void *)CMD_TIMERTYPE_DP,
- ep, (hrtime_t)NANOSEC * (dpt->dp_t_value + 120));
- cmd_list_append(&cmd.cmd_datapaths, dpt);
- break;
-
- case DP_FAULT:
- ++cmd.cmd_dp_flag;
- dpt->dp_erpt_type = DP_FAULT;
- dpt->dp_id = 0;
-
- cmd_bufname(dpt->dp_bufname, sizeof (dpt->dp_bufname),
- "dp_flt_%d_%s", dpt->dp_cpuid_list[0],
- dperrtype[dpt->dp_err]);
-
- dp_buf_write(hdl, dpt);
-
- /*
- * Check for an existing DP_ERROR on cmd.cmd_datapaths, and
- * if found, remove the DP_ERROR and close the case before
- * creating the DP_FAULT case.
- */
- ept = cmd_dp_lookup_error(dpt);
- if (ept != NULL && !fmd_case_closed(hdl, ept->dp_case)) {
- fmd_hdl_debug(hdl, "%s: existing datapath error "
- "overtaken by datapath fault\n", funcname);
- fmd_timer_remove(hdl, ept->dp_id);
- cmd_dp_destroy(hdl, ept);
- }
-
- dpt->dp_case = cmd_case_create(hdl, &dpt->dp_header,
- CMD_PTR_DP_CASE, &uuidp);
- fmd_case_setprincipal(hdl, dpt->dp_case, ep);
-
- /* Add suspect(s) and solve the case. */
- cmd_dp_add_suspects(hdl, dpt);
- fmd_case_solve(hdl, dpt->dp_case);
-
- /* add it to cmd.cmd_datapaths */
- cmd_list_append(&cmd.cmd_datapaths, dpt);
-
- --cmd.cmd_dp_flag;
- if (cmd.cmd_dp_flag == 0)
- cmd_dp_page_replay(hdl);
-
- break;
-
- default:
- fmd_hdl_debug(hdl, "%s: unknown ereport type", funcname);
- fmd_hdl_free(hdl, dpt, sizeof (cmd_dp_t));
- return (CMD_EVD_UNUSED);
- }
-
- return (CMD_EVD_OK);
-}
-
-cmd_evdisp_t
-cmd_dp_cds(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl, const char *class,
- cmd_errcl_t clcode)
-{
- if (fmd_nvl_class_match(hdl, nvl, "ereport.asic.starcat.*")) {
- return (cmd_dp_common(hdl, ep, nvl, class, clcode,
- SC_DP_CDS_TYPE));
- } else
- return (cmd_dp_common(hdl, ep, nvl, class, clcode,
- SG_DP_CDS_TYPE));
-}
-
-cmd_evdisp_t
-cmd_dp_dx(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl, const char *class,
- cmd_errcl_t clcode)
-{
- if (fmd_nvl_class_match(hdl, nvl, "ereport.asic.starcat.*")) {
- return (cmd_dp_common(hdl, ep, nvl, class, clcode,
- SC_DP_DX_TYPE));
-
- } else
- return (cmd_dp_common(hdl, ep, nvl, class, clcode,
- SG_DP_DX_TYPE));
-}
-
-cmd_evdisp_t
-cmd_dp_ex(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl, const char *class,
- cmd_errcl_t clcode)
-{
- return (cmd_dp_common(hdl, ep, nvl, class, clcode,
- SC_DP_EX_TYPE));
-}
-
-cmd_evdisp_t
-cmd_dp_cp(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl, const char *class,
- cmd_errcl_t clcode)
-{
- if (fmd_nvl_class_match(hdl, nvl, "ereport.asic.starcat.*")) {
- return (cmd_dp_common(hdl, ep, nvl, class, clcode,
- SC_DP_CP_TYPE));
- } else
- return (cmd_dp_common(hdl, ep, nvl, class, clcode,
- SG_DP_RP_TYPE));
-}
diff --git a/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_ecache.c b/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_ecache.c
deleted file mode 100644
index 9f231fa589..0000000000
--- a/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_ecache.c
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2004 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-/*
- * E-cache flushing
- *
- * Prior to clearing the UE cache, the CPU state code needs to ensure that the
- * CPU's E-cache has been flushed. The flushing is handled by the routines in
- * in this file, which use the memory controller (mc) driver to perform the
- * flush.
- *
- * Matters are complicated by the fact that there isn't a well-known device name
- * for driver access - we have to hunt around for one. Furthermore, the minor
- * nodes that are created correspond to individual memory controllers, and as
- * such can change during a DR. We'll search for a memory controller device
- * during initialization just to make sure that we can do E$ flushing on this
- * platform, but we're also able to rescan if the device we found suddenly
- * disappears.
- */
-
-#include <cmd_ecache.h>
-#include <cmd.h>
-
-#include <string.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <dirent.h>
-#include <fm/fmd_api.h>
-#include <sys/mc.h>
-#include <sys/param.h>
-
-static int
-ecache_scan_dir(const char *dir, const char *pref, char *buf, size_t bufsz)
-{
- struct dirent *dp;
- char path[MAXPATHLEN];
- DIR *mcdir;
-
- if ((mcdir = opendir(dir)) == NULL)
- return (-1); /* errno is set for us */
-
- while ((dp = readdir(mcdir)) != NULL) {
- struct mc_ctrlconf mcc;
- int fd;
-
- if (strncmp(dp->d_name, pref, strlen(pref)) != 0)
- continue;
-
- (void) snprintf(path, sizeof (path), "%s/%s", dir, dp->d_name);
-
- if ((fd = open(path, O_RDONLY)) < 0)
- continue;
-
- mcc.nmcs = 0;
- if (ioctl(fd, MCIOC_CTRLCONF, &mcc) >= 0 || errno != EINVAL ||
- mcc.nmcs == 0) {
- (void) close(fd);
- continue;
- }
-
- (void) close(fd);
- (void) closedir(mcdir);
-
- if (strlen(path) >= bufsz)
- return (cmd_set_errno(ENOSPC));
- (void) strcpy(buf, path);
- return (0);
- }
-
- (void) closedir(mcdir);
- return (cmd_set_errno(ENOENT));
-}
-
-static int
-ecache_find_device(char *buf, size_t bufsz)
-{
- if (ecache_scan_dir("/dev/mc", "mc", buf, bufsz) != 0) {
- /*
- * Yet more platform-specific hackery. It's possible that the
- * /dev/mc links could be out of date, and thus we may not be
- * able to use any of them. As a fallback, therefore, we're
- * going to search a couple of well-known locations in /devices.
- */
- const char *dir = "/devices/ssm@0,0";
-
- if (access(dir, R_OK) != 0)
- dir = "/devices";
-
- return (ecache_scan_dir(dir, "memory-controller", buf, bufsz));
- }
-
- return (0);
-}
-
-int
-cmd_ecache_init(void)
-{
- return (ecache_find_device(cmd.cmd_ecache_dev,
- sizeof (cmd.cmd_ecache_dev)));
-}
-
-int
-cmd_ecache_flush(int cpuid)
-{
- int fd;
-
- if ((fd = open(cmd.cmd_ecache_dev, O_RDONLY)) < 0) {
- if (errno != ENOENT)
- return (-1); /* errno is set for us */
-
- /*
- * A DR may have occurred, thus rendering our path invalid.
- * Try once to find another one.
- */
- if (cmd_ecache_init() < 0 ||
- (fd = open(cmd.cmd_ecache_dev, O_RDONLY)) < 0)
- return (-1); /* errno is set for us */
- }
-
- if (ioctl(fd, MCIOC_ECFLUSH, cpuid) < 0) {
- int oserr = errno;
- (void) close(fd);
- return (cmd_set_errno(oserr));
- }
-
- (void) close(fd);
- return (0);
-}
diff --git a/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_ecache.h b/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_ecache.h
deleted file mode 100644
index 00baa093bb..0000000000
--- a/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_ecache.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2004 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _CMD_EC_H
-#define _CMD_EC_H
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-/*
- * E-cache flushing
- *
- * Prior to clearing the UE cache, the CPU state code needs to ensure that the
- * CPU's E-cache has been flushed. The flushing is handled by the routines in
- * in this file, which use the memory controller (mc) driver to perform the
- * flush.
- */
-
-#include <fm/fmd_api.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-extern int cmd_ecache_init(void);
-
-extern int cmd_ecache_flush(int);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _CMD_EC_H */
diff --git a/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_hc_opl.c b/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_hc_opl.c
deleted file mode 100644
index 9a5a153ba8..0000000000
--- a/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_hc_opl.c
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2006 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/nvpair.h>
-#include <cmd.h>
-#include <errno.h>
-#include <string.h>
-#include <sys/fm/util.h>
-#include <fm/fmd_api.h>
-#include <sys/fm/protocol.h>
-
-
-/*
- * Set-up and validate the members of an hc fmri according to;
- *
- * Member name Type Value
- * ===================================================
- * version uint8_t 0
- * auth nvlist_t <auth>
- * hc-name string <name>
- * hc-id string <id>
- *
- * Note that auth and hc-id are optional members.
- */
-
-#define HC_MAXPAIRS 20
-#define HC_MAXNAMELEN 50
-
-static int
-cmd_fmri_hc_set_common(nvlist_t *fmri, int version, const nvlist_t *auth)
-{
- if (version != FM_HC_SCHEME_VERSION) {
- return (0);
- }
-
- if (nvlist_add_uint8(fmri, FM_VERSION, version) != 0 ||
- nvlist_add_string(fmri, FM_FMRI_SCHEME, FM_FMRI_SCHEME_HC) != 0) {
- return (0);
- }
-
- if (auth != NULL && nvlist_add_nvlist(fmri, FM_FMRI_AUTHORITY,
- (nvlist_t *)auth) != 0) {
- return (0);
- }
-
- return (1);
-}
-
-int
-cmd_fmri_hc_set(fmd_hdl_t *hdl, nvlist_t *fmri, int version,
- const nvlist_t *auth, nvlist_t *snvl, int npairs, ...)
-{
- nvlist_t *pairs[HC_MAXPAIRS];
- va_list ap;
- int err = 0;
- int i, j;
-
- if (!cmd_fmri_hc_set_common(fmri, version, auth))
- return (1);
-
- npairs = MIN(npairs, HC_MAXPAIRS);
-
- va_start(ap, npairs);
- for (i = 0; i < npairs; i++) {
- const char *name = va_arg(ap, const char *);
- uint32_t id = va_arg(ap, uint32_t);
- char idstr[11];
-
- (void) snprintf(idstr, sizeof (idstr), "%u", id);
-
- if (nvlist_alloc(&pairs[i], NV_UNIQUE_NAME, 0) != 0) {
- fmd_hdl_debug(hdl, "nvlist_alloc failed\n");
- goto cleanup;
- }
-
- err |= nvlist_add_string(pairs[i], FM_FMRI_HC_NAME, name);
- err |= nvlist_add_string(pairs[i], FM_FMRI_HC_ID, idstr);
- }
- va_end(ap);
-
- err |= nvlist_add_string(fmri, FM_FMRI_HC_ROOT, "");
- err |= nvlist_add_uint32(fmri, FM_FMRI_HC_LIST_SZ, npairs);
- err |= nvlist_add_nvlist_array(fmri, FM_FMRI_HC_LIST, pairs, npairs);
-
- if (snvl != NULL)
- err |= nvlist_add_nvlist(fmri, FM_FMRI_HC_SPECIFIC, snvl);
-
-cleanup:
- for (j = 0; j < i; j++)
- nvlist_free(pairs[j]);
-
- if (err)
- fmd_hdl_debug(hdl, "cmd_fmri_hc_set: failed to set fmri\n");
-
- return (err);
-}
diff --git a/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_memerr_arch.c b/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_memerr_arch.c
deleted file mode 100644
index 448852c4c4..0000000000
--- a/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_memerr_arch.c
+++ /dev/null
@@ -1,932 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- */
-
-/*
- * Ereport-handling routines for memory errors
- */
-
-#include <cmd_mem.h>
-#include <cmd_dimm.h>
-#include <cmd_bank.h>
-#include <cmd_page.h>
-#include <cmd_cpu.h>
-#include <cmd.h>
-
-#include <strings.h>
-#include <string.h>
-#include <errno.h>
-#include <limits.h>
-#include <unistd.h>
-#include <fm/fmd_api.h>
-#include <sys/fm/protocol.h>
-#include <sys/fm/cpu/UltraSPARC-III.h>
-#include <sys/async.h>
-#include <sys/cheetahregs.h>
-#include <sys/errclassify.h>
-#include <sys/fm/io/sun4upci.h>
-#include <sys/pci/pcisch.h>
-
-/* Jalapeno-specific values from cheetahregs.h */
-#define USIIIi_AFSR_AID 0x0000000000003e00ull /* AID causing UE/CE */
-#define USIIIi_AFSR_AID_SHIFT 9
-#define USIIIi_AFSR_JREQ 0x0000000007000000ull /* Active JBus req */
-#define USIIIi_AFSR_JREQ_SHIFT 24
-#define TOM_AID_MATCH_MASK 0xe
-
-#define FIRE_AID 0xe
-#define FIRE_JBC_ADDR_MASK 0x000007ffffffffffull
-#define FIRE_JBC_JITEL1 "jbc-jitel1"
-
-/*ARGSUSED*/
-cmd_evdisp_t
-cmd_mem_synd_check(fmd_hdl_t *hdl, uint64_t afar, uint8_t afar_status,
- uint16_t synd, uint8_t synd_status, cmd_cpu_t *cpu)
-{
- if (synd == CH_POISON_SYND_FROM_XXU_WRITE ||
- ((cpu->cpu_type == CPU_ULTRASPARC_IIIi ||
- cpu->cpu_type == CPU_ULTRASPARC_IIIiplus) &&
- synd == CH_POISON_SYND_FROM_XXU_WRMERGE)) {
- fmd_hdl_debug(hdl,
- "discarding UE due to magic syndrome %x\n", synd);
- return (CMD_EVD_UNUSED);
- }
- return (CMD_EVD_OK);
-}
-
-static cmd_evdisp_t
-xe_common(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl,
- const char *class, cmd_xe_handler_f *hdlr)
-{
- uint64_t afar;
- uint16_t synd;
- uint8_t afar_status, synd_status;
- nvlist_t *rsrc;
- char *typenm;
- uint64_t disp;
- int minorvers = 1;
-
- if (nvlist_lookup_pairs(nvl, 0,
- FM_EREPORT_PAYLOAD_NAME_AFAR, DATA_TYPE_UINT64, &afar,
- FM_EREPORT_PAYLOAD_NAME_AFAR_STATUS, DATA_TYPE_UINT8, &afar_status,
- FM_EREPORT_PAYLOAD_NAME_SYND, DATA_TYPE_UINT16, &synd,
- FM_EREPORT_PAYLOAD_NAME_SYND_STATUS, DATA_TYPE_UINT8, &synd_status,
- FM_EREPORT_PAYLOAD_NAME_ERR_TYPE, DATA_TYPE_STRING, &typenm,
- FM_EREPORT_PAYLOAD_NAME_RESOURCE, DATA_TYPE_NVLIST, &rsrc,
- NULL) != 0)
- return (CMD_EVD_BAD);
-
- if (nvlist_lookup_uint64(nvl, FM_EREPORT_PAYLOAD_NAME_ERR_DISP,
- &disp) != 0)
- minorvers = 0;
-
- return (hdlr(hdl, ep, nvl, class, afar, afar_status, synd,
- synd_status, cmd_mem_name2type(typenm, minorvers), disp, rsrc));
-}
-
-/*ARGSUSED*/
-cmd_evdisp_t
-cmd_ce(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl, const char *class,
- cmd_errcl_t clcode)
-{
- return (xe_common(hdl, ep, nvl, class, cmd_ce_common));
-}
-
-/*ARGSUSED*/
-cmd_evdisp_t
-cmd_ue(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl, const char *class,
- cmd_errcl_t clcode)
-{
- return (xe_common(hdl, ep, nvl, class, cmd_ue_common));
-}
-
-cmd_evdisp_t
-cmd_frx(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl, const char *class,
- cmd_errcl_t clcode)
-{
- cmd_errcl_t matchmask = (clcode == CMD_ERRCL_FRC ? (CMD_ERRCL_RCE |
- CMD_ERRCL_IOCE) : (CMD_ERRCL_RUE | CMD_ERRCL_IOUE));
-
- return (cmd_rxefrx_common(hdl, ep, nvl, class, clcode, matchmask));
-}
-
-/*
- * When we complete an IOxE/RxE FRx pair, we have enough information to
- * create either a CE or a UE, as appropriate. Before dispatching the
- * joined event to the xE handler, we need to generate the FMRI for the
- * named DIMM. While one of the events may already contain a resource FMRI,
- * said FMRI is incomplete. The detector didn't have the necessary
- * information (the AFAR, the AFSR, *and* the syndrome) needed to create
- * a DIMM-level FMRI.
- */
-static cmd_evdisp_t
-iorxefrx_synthesize(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl,
- const char *class, uint64_t afar, uint8_t afar_status, uint64_t afsr,
- uint16_t synd, uint8_t synd_status, ce_dispact_t type, uint64_t disp,
- cmd_xe_handler_f *hdlr)
-{
- nvlist_t *fmri;
- int rc;
-
- if ((fmri = cmd_dimm_fmri_derive(hdl, afar, synd, afsr)) == NULL)
- return (CMD_EVD_UNUSED);
-
- rc = hdlr(hdl, ep, nvl, class, afar, afar_status, synd, synd_status,
- type, disp, fmri);
-
- nvlist_free(fmri);
-
- return (rc);
-}
-
-static cmd_iorxefrx_t *
-iorxefrx_match(fmd_hdl_t *hdl, cmd_errcl_t errcl, cmd_errcl_t matchmask,
- uint_t det_agentid, uint_t afsr_agentid)
-{
- cmd_iorxefrx_t *rf;
-
- for (rf = cmd_list_next(&cmd.cmd_iorxefrx); rf != NULL;
- rf = cmd_list_next(rf)) {
-
- fmd_hdl_debug(hdl, "rf->rf_errcl = %llx, matchmask = %llx\n"
- "rf->rf_det_agentid = %lx, afsr_agentid = %lx\n"
- "rf->rf_afsr_agentid = %lx, det_agentid = %lx\n",
- rf->rf_errcl, matchmask, rf->rf_det_agentid, afsr_agentid,
- rf->rf_afsr_agentid, det_agentid);
-
- if ((rf->rf_errcl & matchmask) == 0)
- continue;
-
- /*
- * For IOxEs we are unable to match based on both the detector
- * and the captured Agent Id in the AFSR, because the bridge
- * captures it's own Agent Id instead of the remote CPUs.
- *
- * Also, the LSB of Tomatillo's jpid is aliased for each chip
- * and therefore needs to be factored out of our matching.
- */
- if ((CMD_ERRCL_ISIOXE(rf->rf_errcl) ||
- CMD_ERRCL_ISIOXE(errcl)) &&
- ((rf->rf_afsr_agentid & TOM_AID_MATCH_MASK) ==
- (afsr_agentid & TOM_AID_MATCH_MASK)))
- return (rf);
-
- /*
- * Check for both here since IOxE is not involved
- */
- if ((rf->rf_afsr_agentid == det_agentid) &&
- (rf->rf_det_agentid == afsr_agentid))
- return (rf);
- }
-
- return (NULL);
-}
-
-/*
- * Got an RxE or an FRx. FRx ereports can be matched with RxE ereports and
- * vice versa. FRx ereports can also be matched with IOxE ereports.
- */
-cmd_evdisp_t
-cmd_rxefrx_common(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl,
- const char *class, cmd_errcl_t clcode, cmd_errcl_t matchmask)
-{
- cmd_xe_handler_f *hdlr;
- cmd_iorxefrx_t *rfmatch, *rferr;
- cmd_cpu_t *cpu;
- char *typenm;
- int isrxe = CMD_ERRCL_MATCH(clcode, CMD_ERRCL_RCE | CMD_ERRCL_RUE);
- int isce = CMD_ERRCL_MATCH(clcode, CMD_ERRCL_RCE | CMD_ERRCL_FRC);
- int rc;
- int minorvers = 1;
- uint8_t level = clcode & CMD_ERRCL_LEVEL_EXTRACT;
-
- clcode &= CMD_ERRCL_LEVEL_MASK;
- rferr = fmd_hdl_zalloc(hdl, sizeof (cmd_iorxefrx_t), FMD_SLEEP);
-
- if (nvlist_lookup_pairs(nvl, 0,
- FM_EREPORT_PAYLOAD_NAME_SYND, DATA_TYPE_UINT16, &rferr->rf_synd,
- FM_EREPORT_PAYLOAD_NAME_SYND_STATUS, DATA_TYPE_UINT8,
- &rferr->rf_synd_status,
- FM_EREPORT_PAYLOAD_NAME_AFAR, DATA_TYPE_UINT64, &rferr->rf_afar,
- FM_EREPORT_PAYLOAD_NAME_AFAR_STATUS, DATA_TYPE_UINT8,
- &rferr->rf_afar_status,
- FM_EREPORT_PAYLOAD_NAME_AFSR, DATA_TYPE_UINT64, &rferr->rf_afsr,
- FM_EREPORT_PAYLOAD_NAME_ERR_TYPE, DATA_TYPE_STRING, &typenm,
- NULL) != 0) {
- fmd_hdl_free(hdl, rferr, sizeof (cmd_iorxefrx_t));
- return (CMD_EVD_BAD);
- }
- if (nvlist_lookup_uint64(nvl, FM_EREPORT_PAYLOAD_NAME_ERR_DISP,
- &rferr->rf_disp) != 0)
- minorvers = 0;
-
- rferr->rf_type = cmd_mem_name2type(typenm, minorvers);
-
- if ((cpu = cmd_cpu_lookup_from_detector(hdl, nvl, class,
- level)) == NULL) {
- fmd_hdl_free(hdl, rferr, sizeof (cmd_iorxefrx_t));
- return (CMD_EVD_UNUSED);
- }
-
- if (!isrxe && rferr->rf_synd_status != AFLT_STAT_VALID) {
- fmd_hdl_free(hdl, rferr, sizeof (cmd_iorxefrx_t));
- return (CMD_EVD_UNUSED);
- }
-
- if (isrxe) {
- rferr->rf_afsr_agentid = (rferr->rf_afsr &
- USIIIi_AFSR_JREQ) >> USIIIi_AFSR_JREQ_SHIFT;
- } else {
- rferr->rf_afsr_agentid = (rferr->rf_afsr &
- USIIIi_AFSR_AID) >> USIIIi_AFSR_AID_SHIFT;
- }
-
- rferr->rf_errcl = clcode;
- rferr->rf_det_agentid = cpu->cpu_cpuid;
-
- if ((rfmatch = iorxefrx_match(hdl, clcode, matchmask,
- rferr->rf_det_agentid, rferr->rf_afsr_agentid)) == NULL) {
- cmd_iorxefrx_queue(hdl, rferr);
- return (CMD_EVD_OK);
- }
-
- /*
- * Found a match. Send a synthesized ereport to the appropriate
- * routine.
- */
- fmd_hdl_debug(hdl, "matched %cE %llx with %llx", "UC"[isce],
- rferr->rf_errcl, rfmatch->rf_errcl);
-
- hdlr = (isce ? cmd_ce_common : cmd_ue_common);
- if (isrxe) {
- rc = iorxefrx_synthesize(hdl, ep, nvl, class, rferr->rf_afar,
- rferr->rf_afar_status, rfmatch->rf_afsr, rfmatch->rf_synd,
- rfmatch->rf_synd_status, rferr->rf_type, rferr->rf_disp,
- hdlr);
- } else {
- rc = iorxefrx_synthesize(hdl, ep, nvl, class, rfmatch->rf_afar,
- rfmatch->rf_afar_status, rferr->rf_afsr, rferr->rf_synd,
- rferr->rf_synd_status, rfmatch->rf_type, rferr->rf_disp,
- hdlr);
- }
-
- cmd_iorxefrx_free(hdl, rfmatch);
- fmd_hdl_free(hdl, rferr, sizeof (cmd_iorxefrx_t));
-
- return (rc);
-}
-
-/*
- * This fire IOxE must be matched with an FRx before UE/CE processing
- * is possible.
- *
- * Note that for fire ereports we don't receive AFSR, AFAR, AFAR-Status
- * and SYND values but we can derive the AFAR from the payload value
- * FIRE_JBC_JITEL1. We may receive a TYPNM value.
- */
-static cmd_evdisp_t
-cmd_ioxefrx_fire(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl,
- const char *class, cmd_errcl_t errcl, cmd_errcl_t matchmask)
-{
- cmd_xe_handler_f *hdlr;
- cmd_iorxefrx_t *rfmatch, *rferr;
- uint64_t afar;
- int isce = CMD_ERRCL_MATCH(errcl, CMD_ERRCL_IOCE);
- char *portid_str;
- char *path = NULL;
- char *typenm = NULL;
- nvlist_t *det = NULL;
- int rc;
- int minorvers = 1;
-
- rferr = fmd_hdl_zalloc(hdl, sizeof (cmd_iorxefrx_t), FMD_SLEEP);
-
- /*
- * Lookup device path of host bridge.
- */
- (void) nvlist_lookup_nvlist(nvl, FM_EREPORT_DETECTOR, &det);
- (void) nvlist_lookup_string(det, FM_FMRI_DEV_PATH, &path);
-
- /*
- * get Jbus port id from the device path
- */
- portid_str = strrchr(path, '@') + 1;
- rferr->rf_det_agentid = strtol(portid_str, NULL, 16);
-
- rferr->rf_errcl = errcl;
- rferr->rf_afsr_agentid = FIRE_AID;
- rferr->rf_afar_status = AFLT_STAT_VALID;
- rferr->rf_synd_status = AFLT_STAT_VALID;
-
- /*
- * Extract the afar from the payload
- */
- (void) nvlist_lookup_uint64(nvl, FIRE_JBC_JITEL1, &afar);
- rferr->rf_afar = afar & FIRE_JBC_ADDR_MASK;
-
- rferr->rf_afsr = 0;
- rferr->rf_synd = 0;
-
- if (nvlist_lookup_string(nvl, FM_EREPORT_PAYLOAD_NAME_ERR_TYPE,
- &typenm) == 0)
- rferr->rf_type = cmd_mem_name2type(typenm, minorvers);
-
- /*
- * Need to send in the io_jpid that we get from the device path above
- * for both the det_agentid and the afsr_agentid, since the CPU does not
- * capture the same address as the bridge. The bridge has the LSB
- * aliased and the CPU is missing the MSB.
- */
- if ((rfmatch = iorxefrx_match(hdl, rferr->rf_errcl, matchmask,
- rferr->rf_det_agentid, rferr->rf_afsr_agentid)) == NULL) {
- cmd_iorxefrx_queue(hdl, rferr);
- return (CMD_EVD_OK);
- }
-
- /* Found a match. Synthesize an ereport for UE/CE processing. */
- fmd_hdl_debug(hdl, "matched %cE %llx with %llx\n", "UC"[isce],
- rferr->rf_errcl, rfmatch->rf_errcl);
-
- hdlr = (isce ? cmd_ce_common : cmd_ue_common);
- rc = iorxefrx_synthesize(hdl, ep, nvl, class, rferr->rf_afar,
- rferr->rf_afar_status, rfmatch->rf_afsr, rfmatch->rf_synd,
- rfmatch->rf_synd_status, rferr->rf_type, rferr->rf_disp, hdlr);
-
- cmd_iorxefrx_free(hdl, rfmatch);
- fmd_hdl_free(hdl, rferr, sizeof (cmd_iorxefrx_t));
-
- return (rc);
-}
-
-/* This IOxE must be matched with an FRx before UE/CE processing is possible */
-static cmd_evdisp_t
-cmd_ioxefrx_common(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl,
- const char *class, cmd_errcl_t errcl, cmd_errcl_t matchmask)
-{
- cmd_xe_handler_f *hdlr;
- cmd_iorxefrx_t *rfmatch, *rferr;
- char *typenm;
- int isce = CMD_ERRCL_MATCH(errcl, CMD_ERRCL_IOCE);
- char *portid_str;
- char *path = NULL;
- nvlist_t *det = NULL;
- int rc;
- int minorvers = 1;
-
- rferr = fmd_hdl_zalloc(hdl, sizeof (cmd_iorxefrx_t), FMD_SLEEP);
-
- if (nvlist_lookup_pairs(nvl, 0,
- PCI_ECC_AFAR, DATA_TYPE_UINT64, &rferr->rf_afar,
- PCI_ECC_AFSR, DATA_TYPE_UINT64, &rferr->rf_afsr,
- PCI_ECC_SYND, DATA_TYPE_UINT16, &rferr->rf_synd,
- PCI_ECC_TYPE, DATA_TYPE_STRING, &typenm,
- NULL) != 0) {
- fmd_hdl_free(hdl, rferr, sizeof (cmd_iorxefrx_t));
- return (CMD_EVD_BAD);
- }
-
- if (nvlist_lookup_uint64(nvl, PCI_ECC_DISP, &rferr->rf_disp) != 0)
- minorvers = 0;
-
- rferr->rf_type = cmd_mem_name2type(typenm, minorvers);
- rferr->rf_errcl = errcl;
-
- /*
- * Lookup device path of host bridge.
- */
- (void) nvlist_lookup_nvlist(nvl, FM_EREPORT_DETECTOR, &det);
- (void) nvlist_lookup_string(det, FM_FMRI_DEV_PATH, &path);
-
- /*
- * get Jbus port id from the device path
- */
- portid_str = strrchr(path, '@') + 1;
- rferr->rf_det_agentid = strtol(portid_str, NULL, 16);
-
- rferr->rf_afsr_agentid = (rferr->rf_afsr &
- SCHIZO_ECC_UE_AFSR_AGENT_MID) >> SCHIZO_ECC_UE_AFSR_AGENT_MID_SHIFT;
-
- /*
- * Only 4 bits of the Jbus AID are sent on the Jbus. MSB is the one
- * that is chosen not to make the trip. This is not in any of the Jbus
- * or Tomatillo documents and was discovered during testing and verified
- * by Jalapeno H/W designer.
- */
- rferr->rf_afsr_agentid &= 0xf;
- rferr->rf_afar_status = AFLT_STAT_VALID;
- rferr->rf_synd_status = AFLT_STAT_VALID;
-
- /*
- * Need to send in the io_jpid that we get from the device path above
- * for both the det_agentid and the afsr_agentid, since the CPU does not
- * capture the same address as the bridge. The bridge has the LSB
- * aliased and the CPU is missing the MSB.
- */
- if ((rfmatch = iorxefrx_match(hdl, rferr->rf_errcl, matchmask,
- rferr->rf_det_agentid, rferr->rf_afsr_agentid)) == NULL) {
- cmd_iorxefrx_queue(hdl, rferr);
- return (CMD_EVD_OK);
- }
-
- /* Found a match. Synthesize an ereport for UE/CE processing. */
- fmd_hdl_debug(hdl, "matched %cE %llx with %llx\n", "UC"[isce],
- rferr->rf_errcl, rfmatch->rf_errcl);
-
- hdlr = (isce ? cmd_ce_common : cmd_ue_common);
- rc = iorxefrx_synthesize(hdl, ep, nvl, class, rferr->rf_afar,
- rferr->rf_afar_status, rfmatch->rf_afsr, rfmatch->rf_synd,
- rfmatch->rf_synd_status, rferr->rf_type, rferr->rf_disp, hdlr);
-
- cmd_iorxefrx_free(hdl, rfmatch);
- fmd_hdl_free(hdl, rferr, sizeof (cmd_iorxefrx_t));
-
- return (rc);
-}
-
-/* IOxE ereports that don't need matching with FRx ereports */
-static cmd_evdisp_t
-ioxe_common(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl, const char *class,
- cmd_errcl_t clcode)
-{
- int isce = CMD_ERRCL_MATCH(clcode, CMD_ERRCL_IOCE);
- cmd_xe_handler_f *hdlr = isce ? cmd_ce_common : cmd_ue_common;
- uint64_t afar;
- uint16_t synd;
- nvlist_t *rsrc;
- char *typenm;
- uint64_t disp;
- int minorvers = 1;
-
- if (nvlist_lookup_pairs(nvl, 0,
- PCI_ECC_AFAR, DATA_TYPE_UINT64, &afar,
- PCI_ECC_SYND, DATA_TYPE_UINT16, &synd,
- PCI_ECC_TYPE, DATA_TYPE_STRING, &typenm,
- PCI_ECC_RESOURCE, DATA_TYPE_NVLIST, &rsrc,
- NULL) != 0)
- return (CMD_EVD_BAD);
-
- if (nvlist_lookup_uint64(nvl, PCI_ECC_DISP, &disp) != 0)
- minorvers = 0;
-
- return (hdlr(hdl, ep, nvl, class, afar, AFLT_STAT_VALID, synd,
- AFLT_STAT_VALID, cmd_mem_name2type(typenm, minorvers), disp,
- rsrc));
-}
-
-cmd_evdisp_t
-cmd_rxe(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl, const char *class,
- cmd_errcl_t clcode)
-{
- cmd_errcl_t matchmask = (clcode == CMD_ERRCL_RCE ? CMD_ERRCL_FRC :
- CMD_ERRCL_FRU);
-
- return (cmd_rxefrx_common(hdl, ep, nvl, class, clcode, matchmask));
-}
-
-cmd_evdisp_t
-cmd_ioxe(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl, const char *class,
- cmd_errcl_t clcode)
-{
- cmd_errcl_t matchmask = (clcode == CMD_ERRCL_IOCE ? CMD_ERRCL_FRC :
- CMD_ERRCL_FRU);
-
- if (fmd_nvl_class_match(hdl, nvl, "ereport.io.tom.*")) {
- return (cmd_ioxefrx_common(hdl, ep, nvl, class, clcode,
- matchmask));
- } else if (fmd_nvl_class_match(hdl, nvl, "ereport.io.fire.*")) {
- return (cmd_ioxefrx_fire(hdl, ep, nvl, class, clcode,
- matchmask));
- } else
- return (ioxe_common(hdl, ep, nvl, class, clcode));
-}
-
-/*ARGSUSED*/
-cmd_evdisp_t
-cmd_ioxe_sec(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl, const char *class,
- cmd_errcl_t clcode)
-{
- /*
- * Secondary IOxE's can't be used to identify failed or failing
- * resources, as they don't contain enough information. Ignore them.
- */
- return (CMD_EVD_OK);
-}
-
-/*ARGSUSED*/
-ulong_t
-cmd_mem_get_phys_pages(fmd_hdl_t *hdl)
-{
- return (sysconf(_SC_PHYS_PAGES));
-}
-
-/*
- * sun4u bit position as function of e_synd,
- * from JPS1 Implementation Supplement table P-7
- * Encode bit positions as follows:
- * 0-127 data bits 0-127
- * 128-136 check bits 0-8 (Cn = 128+n)
- * no error or multibit error = -1 (not valid CE)
- */
-
-int esynd2bit [] = {
- -1, 128, 129, -1, 130, -1, -1, 47,
- 131, -1, -1, 53, -1, 41, 29, -1, /* 000-00F */
- 132, -1, -1, 50, -1, 38, 25, -1,
- -1, 33, 24, -1, 11, -1, -1, 16, /* 010-01F */
- 133, -1, -1, 46, -1, 37, 19, -1,
- -1, 31, 32, -1, 7, -1, -1, 10, /* 020-02F */
- -1, 40, 13, -1, 59, -1, -1, 66,
- -1, -1, -1, 0, -1, 67, 71, -1, /* 030-03F */
- 134, -1, -1, 43, -1, 36, 18, -1,
- -1, 49, 15, -1, 63, -1, -1, 6, /* 040-04F */
- -1, 44, 28, -1, -1, -1, -1, 52,
- 68, -1, -1, 62, -1, -1, -1, -1, /* 050-05F */
- -1, 26, 106, -1, 64, -1, -1, 2,
- 120, -1, -1, -1, -1, -1, -1, -1, /* 060-06F */
- 116, -1, -1, -1, -1, -1, -1, -1,
- -1, 58, 54, -1, -1, -1, -1, -1, /* 070-07F */
- 135, -1, -1, 42, -1, 35, 17, -1,
- -1, 45, 14, -1, 21, -1, -1, 5, /* 080-08F */
- -1, 27, -1, -1, 99, -1, -1, 3,
- 114, -1, -1, 20, -1, -1, -1, -1, /* 090-09F */
- -1, 23, 113, -1, 112, -1, -1, 51,
- 95, -1, -1, -1, -1, -1, -1, -1, /* 0A0-0AF */
- 103, -1, -1, -1, -1, -1, -1, -1,
- -1, 48, -1, -1, 73, -1, -1, -1, /* 0B0-0BF */
- -1, 22, 110, -1, 109, -1, -1, 9,
- 108, -1, -1, -1, -1, -1, -1, -1, /* 0C0-0CF */
- 102, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, /* 0D0-0DF */
- 98, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, /* 0E0-0EF */
- -1, -1, -1, -1, -1, -1, -1, -1,
- 56, -1, -1, -1, -1, -1, -1, -1, /* 0F0-0FF */
- 136, -1, -1, 39, -1, 34, 105, -1,
- -1, 30, 104, -1, 101, -1, -1, 4, /* 100-10F */
- -1, -1, 100, -1, 83, -1, -1, 12,
- 87, -1, -1, 57, -1, -1, -1, -1, /* 110-11F */
- -1, 97, 82, -1, 78, -1, -1, 1,
- 96, -1, -1, -1, -1, -1, -1, -1, /* 120-12F */
- 94, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 79, -1, 69, -1, -1, -1, /* 130-13F */
- -1, 93, 92, -1, 91, -1, -1, 8,
- 90, -1, -1, -1, -1, -1, -1, -1, /* 140-14F */
- 89, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, /* 150-15F */
- 86, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, /* 160-16F */
- -1, -1, -1, -1, -1, -1, -1, -1,
- 60, -1, -1, -1, -1, -1, -1, -1, /* 170-17F */
- -1, 88, 85, -1, 84, -1, -1, 55,
- 81, -1, -1, -1, -1, -1, -1, -1, /* 180-18F */
- 77, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, /* 190-19F */
- 74, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, /* 1A0-1AF */
- -1, 70, 107, -1, 65, -1, -1, -1,
- 127, -1, -1, -1, -1, -1, -1, -1, /* 1B0-1BF */
- 80, -1, -1, 72, -1, 119, 118, -1,
- -1, 126, 76, -1, 125, -1, -1, -1, /* 1C0-1CF */
- -1, 115, 124, -1, 75, -1, -1, -1,
- 61, -1, -1, -1, -1, -1, -1, -1, /* 1D0-1DF */
- -1, 123, 122, -1, 121, -1, -1, -1,
- 117, -1, -1, -1, -1, -1, -1, -1, /* 1E0-1EF */
- 111, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1 /* 1F0-1FF */
-};
-
-int msynd2bit [] = { /* msynd 0-F */
- -1, 140, 141, -1,
- 142, -1, -1, 137,
- 143, -1, -1, 138,
- -1, 139, -1, -1
-};
-
-int
-cmd_synd2upos(uint16_t syndrome)
-{
- return (esynd2bit[syndrome]);
-}
-
-const char *fmd_fmri_get_platform();
-
-#define DP_MAX 25
-
-const char *slotname[] = {
- "Slot A", "Slot B", "Slot C", "Slot D"};
-
-typedef struct fault_info {
- uint32_t id;
- int count;
-} fault_info_t;
-
-struct plat2id_map {
- char *platnm;
- int id;
-} id_plat[] = {
- {"SUNW,Sun-Fire-15000", 1},
- {"SUNW,Sun-Fire", 2},
- {"SUNW,Netra-T12", 2},
- {"SUNW,Sun-Fire-480R", 3},
- {"SUNW,Sun-Fire-V490", 3},
- {"SUNW,Sun-Fire-V440", 3},
- {"SUNW,Sun-Fire-V445", 3},
- {"SUNW,Netra-440", 3},
- {"SUNW,Sun-Fire-880", 4},
- {"SUNW,Sun-Fire-V890", 4},
- {NULL, 0}
-};
-
-/*ARGSUSED*/
-void
-cmd_to_hashed_addr(uint64_t *addr, uint64_t afar, const char *class)
-{
- *addr = afar;
-}
-
-/*ARGSUSED*/
-int
-cmd_same_datapath_dimms(cmd_dimm_t *d1, cmd_dimm_t *d2)
-{
- return (1);
-}
-
-static int
-cmd_get_platform()
-{
- const char *platname;
- int id = -1;
- int i;
-
- platname = fmd_fmri_get_platform();
- for (i = 0; id_plat[i].platnm != NULL; i++) {
- if (strcmp(platname, id_plat[i].platnm) == 0) {
- id = id_plat[i].id;
- break;
- }
- }
- return (id);
-}
-
-static int
-cmd_get_boardid(uint32_t cpuid)
-{
- int boardid;
- int id = cmd_get_platform();
-
- switch (id) {
- case 1:
- boardid = ((cpuid >> 5) & 0x1f);
- break;
- case 2:
- boardid = ((cpuid & 0x1f) / 4);
- break;
-
- case 3:
- cpuid = cpuid & 0x07;
- boardid = ((cpuid % 2) == 0) ? 0 : 1;
- break;
- case 4:
- cpuid = cpuid & 0x07;
- if ((cpuid % 2) == 0)
- boardid = (cpuid < 4) ? 0 : 2;
- else
- boardid = (cpuid < 5) ? 1 : 3;
- break;
- default:
- boardid = 5;
- break;
- }
-
- return (boardid);
-}
-
-static void
-cmd_get_faulted_comp(fmd_hdl_t *hdl, cmd_dimm_t *d1, cmd_dimm_t *d2,
- uint16_t upos, fault_info_t **fault_list, int cpu)
-{
- cmd_mq_t *ip;
- int i, j, k, idj;
- uint32_t id;
- uint32_t *cpuid = NULL;
- int max_rpt;
-
- max_rpt = 2 * cmd.cmd_nupos;
-
- cpuid = fmd_hdl_alloc(hdl, max_rpt * sizeof (uint32_t), FMD_SLEEP);
-
- if (cpuid == NULL)
- return;
-
- for (i = 0, j = 0; i < CMD_MAX_CKWDS; i++) {
- for (ip = cmd_list_next(&d1->mq_root[i]); ip != NULL;
- ip = cmd_list_next(ip)) {
- if (upos == ip->mq_unit_position) {
- cpuid[j] = ip->mq_cpuid;
- j++;
- }
- if (j >= cmd.cmd_nupos)
- break;
- }
- if (j >= cmd.cmd_nupos)
- break;
- }
-
- for (i = 0; i < CMD_MAX_CKWDS; i++) {
- for (ip = cmd_list_next(&d2->mq_root[i]); ip != NULL;
- ip = cmd_list_next(ip)) {
- if (upos == ip->mq_unit_position) {
- cpuid[j] = ip->mq_cpuid;
- j++;
- }
- if (j >= max_rpt)
- break;
- }
- if (j >= max_rpt)
- break;
- }
-
- for (i = 0, k = 0; i < max_rpt; i++) {
- if (cpuid[i] == ULONG_MAX)
- continue;
- id = (cpu == 0) ? cmd_get_boardid(cpuid[i]) : cpuid[i];
- fault_list[k] = fmd_hdl_alloc(hdl,
- sizeof (fault_info_t), FMD_SLEEP);
- if (fault_list[k] == NULL)
- break;
- fault_list[k]->count = 1;
- fault_list[k]->id = id;
- for (j = i + 1; j < max_rpt; j++) {
- if (cpuid[j] == ULONG_MAX)
- continue;
- idj = (cpu == 0) ? cmd_get_boardid(cpuid[j]) : cpuid[j];
- if (id == idj) {
- fault_list[k]->count++;
- cpuid[j] = ULONG_MAX;
- }
- }
- k++;
- }
-
- fmd_hdl_free(hdl, cpuid, max_rpt * sizeof (uint32_t));
-}
-
-/*ARGSUSED*/
-static nvlist_t *
-cmd_board_mkfru(fmd_hdl_t *hdl, char *frustr)
-{
- nvlist_t *hcel, *fru;
- int err;
-
- if (frustr == NULL)
- return (NULL);
-
- if (nvlist_alloc(&hcel, NV_UNIQUE_NAME, 0) != 0)
- return (NULL);
-
- err = nvlist_add_string(hcel, FM_FMRI_HC_NAME,
- FM_FMRI_LEGACY_HC);
- err |= nvlist_add_string(hcel, FM_FMRI_HC_ID, frustr);
- if (err != 0) {
- nvlist_free(hcel);
- return (NULL);
- }
-
- if (nvlist_alloc(&fru, NV_UNIQUE_NAME, 0) != 0) {
- nvlist_free(hcel);
- return (NULL);
- }
- err = nvlist_add_uint8(fru, FM_VERSION, FM_HC_SCHEME_VERSION);
- err |= nvlist_add_string(fru, FM_FMRI_SCHEME,
- FM_FMRI_SCHEME_HC);
- err |= nvlist_add_string(fru, FM_FMRI_HC_ROOT, "");
- err |= nvlist_add_uint32(fru, FM_FMRI_HC_LIST_SZ, 1);
- err |= nvlist_add_nvlist_array(fru, FM_FMRI_HC_LIST, &hcel, 1);
- if (err != 0) {
- nvlist_free(fru);
- nvlist_free(hcel);
- return (NULL);
- }
- nvlist_free(hcel);
- return (fru);
-}
-
-/*
- * Startcat, Serengeti, V4xx, and V8xx: fault the system boards of
- * the detectors in proportion to the number of ereports out of 8
- * Other systems: fault the detectors in proportion to the number of
- * ereports out of 8
- */
-void
-cmd_gen_datapath_fault(fmd_hdl_t *hdl, cmd_dimm_t *d1, cmd_dimm_t *d2,
- uint16_t upos, nvlist_t *det)
-{
- char frustr[DP_MAX];
- fmd_case_t *cp;
- int i, ratio, type, fault_cpu, max_rpt;
- uint32_t id;
- uint8_t cpumask;
- char *cpustr;
- fault_info_t **fault_list = NULL;
- nvlist_t *fru = NULL, *asru = NULL, *flt = NULL;
-
- max_rpt = cmd.cmd_nupos * 2;
- fault_list = fmd_hdl_alloc(hdl,
- max_rpt * sizeof (fault_info_t *), FMD_SLEEP);
-
- if (fault_list == NULL)
- return;
-
- for (i = 0; i < max_rpt; i++)
- fault_list[i] = NULL;
-
- type = cmd_get_platform();
-
- fault_cpu = (type == -1) ? 1 : 0;
-
- cmd_get_faulted_comp(hdl, d1, d2, upos, fault_list, fault_cpu);
-
- cp = fmd_case_open(hdl, NULL);
-
- for (i = 0; i < max_rpt; i++) {
- if (fault_list[i] == NULL)
- continue;
- id = fault_list[i]->id;
-
- switch (type) {
- case 1:
- (void) snprintf(frustr, DP_MAX, "EX%d", id);
- break;
- case 2:
- (void) snprintf(frustr, DP_MAX, "/N0/SB%d", id);
- break;
- case 3:
- case 4:
- (void) snprintf(frustr, DP_MAX, slotname[id]);
- break;
- default:
- cpustr = cmd_cpu_getfrustr_by_id(hdl, id);
- if (nvlist_lookup_uint8(det, FM_FMRI_CPU_MASK, &cpumask)
- == 0) {
- asru = cmd_cpu_fmri_create(id, cpumask);
- (void) fmd_nvl_fmri_expand(hdl, asru);
- }
- break;
- }
-
- ratio = (fault_list[i]->count * 100) / (cmd.cmd_nupos * 2);
-
- if (fault_cpu) {
- fru = cmd_cpu_mkfru(hdl, cpustr, NULL, NULL);
- fmd_hdl_strfree(hdl, cpustr);
- if (fru == NULL) {
- nvlist_free(asru);
- break;
- }
- flt = cmd_nvl_create_fault(hdl, "fault.memory.datapath",
- ratio, asru, fru, asru);
- nvlist_free(asru);
- } else {
- fru = cmd_board_mkfru(hdl, frustr);
- if (fru == NULL)
- break;
- flt = cmd_nvl_create_fault(hdl, "fault.memory.datapath",
- ratio, fru, fru, fru);
- }
-
- fmd_case_add_suspect(hdl, cp, flt);
-
- /* free up memory */
- nvlist_free(fru);
- }
-
- fmd_case_solve(hdl, cp);
-
- for (i = 0; i < max_rpt; i++) {
- if (fault_list[i] != NULL)
- fmd_hdl_free(hdl, fault_list[i], sizeof (fault_info_t));
- }
-
- fmd_hdl_free(hdl, fault_list, sizeof (fault_info_t *) * max_rpt);
-}
diff --git a/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_opl.c b/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_opl.c
deleted file mode 100644
index 80ff688b9a..0000000000
--- a/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_opl.c
+++ /dev/null
@@ -1,220 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-/*
- * OPL platform specific functions for
- * CPU/Memory error diagnosis engine.
- */
-#include <cmd_opl.h>
-#include <string.h>
-#include <errno.h>
-#include <cmd_mem.h>
-#include <sys/fm/protocol.h>
-#include <sys/int_const.h>
-
-cmd_list_t *
-opl_cpulist_insert(fmd_hdl_t *hdl, uint32_t cpuid, int flt_type)
-{
- opl_cpu_t *opl_cpu = NULL;
- cmd_list_t *list_head = NULL;
- uint32_t c, s, sib_cpuid, base_cpuid;
-
- switch (flt_type) {
- case IS_STRAND:
- opl_cpu = fmd_hdl_alloc(hdl, sizeof (opl_cpu_t), FMD_SLEEP);
- opl_cpu->oc_cpuid = cpuid;
- cmd_list_append(&opl_cpu_list, opl_cpu);
- list_head = &opl_cpu_list;
- break;
-
- case IS_CORE:
- /*
- * Currently there are only two strands per core.
- * Xor the least significant bit to get the sibling strand
- */
- sib_cpuid = cpuid ^ 1;
- for (s = 0; s <= STRAND_UPPER_BOUND; s++) {
- opl_cpu = fmd_hdl_alloc(hdl, sizeof (opl_cpu_t),
- FMD_SLEEP);
- if (s == 0) {
- opl_cpu->oc_cpuid = cpuid;
- cmd_list_append(&opl_cpu_list, opl_cpu);
- list_head = &opl_cpu_list;
- } else {
- opl_cpu->oc_cpuid = sib_cpuid;
- cmd_list_insert_after(&opl_cpu_list,
- list_head, opl_cpu);
- }
- }
- break;
-
- case IS_CHIP:
- /*
- * Enumerate all the cpus/strands based on the max # of cores
- * within a chip and max # of strands within a core.
- */
- base_cpuid = (cpuid >> CHIPID_SHIFT) << CHIPID_SHIFT;
- for (c = 0; c <= CORE_UPPER_BOUND; c++) {
- for (s = 0; s <= STRAND_UPPER_BOUND; s++) {
- opl_cpu = fmd_hdl_alloc(hdl,
- sizeof (opl_cpu_t), FMD_SLEEP);
- opl_cpu->oc_cpuid = base_cpuid |
- c << COREID_SHIFT | s;
- if (c == 0 && s == 0) {
- cmd_list_append(&opl_cpu_list, opl_cpu);
- list_head = &opl_cpu_list;
- } else
- cmd_list_insert_after(&opl_cpu_list,
- list_head, opl_cpu);
- }
- }
- break;
-
- default:
- list_head = NULL;
- break;
- }
-
- return (list_head);
-}
-
-void
-opl_cpulist_free(fmd_hdl_t *hdl, cmd_list_t *cpu_list)
-{
- opl_cpu_t *opl_cpu;
-
- fmd_hdl_debug(hdl,
- "Enter opl_cpulist_free for cpulist %llx\n", cpu_list);
-
- while ((opl_cpu = cmd_list_next(cpu_list)) != NULL) {
- cmd_list_delete(cpu_list, opl_cpu);
- fmd_hdl_free(hdl, opl_cpu, sizeof (opl_cpu_t));
- }
-}
-
-/*
- * Based on "avg" function of eversholt
- */
-uint8_t
-opl_avg(uint_t sum, uint_t cnt)
-{
- unsigned long long s = sum * 10;
-
- return ((s / cnt / 10) + (((s / cnt % 10) >= 5) ? 1 : 0));
-}
-
-/*
- * This function builds the resource fmri page based on
- * the kstat "cpu_fru" of the faulted cpu and cpuid
- * using the "hc" scheme.
- */
-nvlist_t *
-opl_cpursrc_create(fmd_hdl_t *hdl, uint32_t cpuid)
-{
- nvlist_t *fmri;
- char *frustr, *comp;
- int cmu_num;
-
- if ((errno = nvlist_alloc(&fmri, NV_UNIQUE_NAME, 0)) != 0)
- return (NULL);
-
- if ((frustr = cmd_cpu_getfrustr_by_id(hdl, cpuid)) == NULL) {
- nvlist_free(fmri);
- return (NULL);
- }
-
- /*
- * get the CMU # from cpu_fru for each model
- * exit with an error if we can not find one.
- */
- if (strncmp(frustr, OPL_CPU_FRU_FMRI_DC,
- sizeof (OPL_CPU_FRU_FMRI_DC) - 1) == 0) {
- comp = frustr + sizeof (OPL_CPU_FRU_FMRI_DC) - 1;
- (void) sscanf(comp, "%2d", &cmu_num);
- } else if (strncmp(frustr, OPL_CPU_FRU_FMRI_FF1,
- sizeof (OPL_CPU_FRU_FMRI_FF1) - 1) == 0) {
- comp = frustr + sizeof (OPL_CPU_FRU_FMRI_FF1) - 1;
- (void) sscanf(comp, "%d", &cmu_num);
- cmu_num /= 2;
- } else if (strncmp(frustr, OPL_CPU_FRU_FMRI_FF2,
- sizeof (OPL_CPU_FRU_FMRI_FF2) - 1) == 0) {
- comp = frustr + sizeof (OPL_CPU_FRU_FMRI_FF2) - 1;
- (void) sscanf(comp, "%d", &cmu_num);
- cmu_num /= 2;
- } else if (strncmp(frustr, OPL_CPU_FRU_FMRI_IKKAKU,
- sizeof (OPL_CPU_FRU_FMRI_IKKAKU) - 1) == 0) {
- cmu_num = 0;
- } else {
- CMD_STAT_BUMP(bad_cpu_asru);
- fmd_hdl_strfree(hdl, frustr);
- nvlist_free(fmri);
- return (NULL);
- }
-
- if (cmd_fmri_hc_set(hdl, fmri, FM_HC_SCHEME_VERSION, NULL, NULL,
- NPAIRS, "chassis", 0, "cmu", cmu_num, "chip",
- ((cpuid >> CHIPID_SHIFT) & CHIP_OR_CORE_MASK),
- "core", ((cpuid >> COREID_SHIFT) & CHIP_OR_CORE_MASK),
- "strand", (cpuid & STRAND_MASK)) != 0) {
- fmd_hdl_strfree(hdl, frustr);
- nvlist_free(fmri);
- return (NULL);
- }
-
- fmd_hdl_strfree(hdl, frustr);
- return (fmri);
-}
-
-nvlist_t *
-opl_mem_fru_create(fmd_hdl_t *hdl, nvlist_t *nvl)
-{
- nvlist_t *fmri;
- char *unum;
- char **serids;
- size_t nserids;
-
-
- if (nvlist_lookup_string(nvl, FM_FMRI_MEM_UNUM, &unum) != 0)
- return (NULL);
-
- fmd_hdl_debug(hdl, "opl_mem_fru_create for mem %s\n", unum);
-
- if ((fmri = cmd_mem_fmri_create(unum, NULL, 0)) == NULL)
- return (NULL);
-
- if ((nvlist_lookup_string_array(nvl, FM_FMRI_MEM_SERIAL_ID, &serids,
- &nserids)) == 0) {
- if ((nvlist_add_string_array(fmri, FM_FMRI_MEM_SERIAL_ID,
- serids, nserids)) != 0) {
- nvlist_free(fmri);
- return (NULL);
- }
- }
-
- return (fmri);
-}
diff --git a/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_opl.h b/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_opl.h
deleted file mode 100644
index 3a10abda05..0000000000
--- a/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_opl.h
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _CMD_OPL_H
-#define _CMD_OPL_H
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include <cmd.h>
-#include <cmd_cpu.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct opl_cpu {
- cmd_list_t oc_list;
- cmd_cpu_t *oc_cmd_cpu;
- uint32_t oc_cpuid;
-} opl_cpu_t;
-
-extern cmd_evdisp_t cmd_oplinv_urg(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-extern cmd_evdisp_t cmd_oplcre(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-extern cmd_evdisp_t cmd_opltsb_ctx(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-extern cmd_evdisp_t cmd_opltsbp(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-extern cmd_evdisp_t cmd_oplpstate(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-extern cmd_evdisp_t cmd_opltstate(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-extern cmd_evdisp_t cmd_opliug_f(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-extern cmd_evdisp_t cmd_opliug_r(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-extern cmd_evdisp_t cmd_oplsdc(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-extern cmd_evdisp_t cmd_oplwdt(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-extern cmd_evdisp_t cmd_opldtlb(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-extern cmd_evdisp_t cmd_oplitlb(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-extern cmd_evdisp_t cmd_oplcore_err(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-extern cmd_evdisp_t cmd_opldae(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-extern cmd_evdisp_t cmd_opliae(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-extern cmd_evdisp_t cmd_opluge(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-extern cmd_evdisp_t cmd_oplmtlb(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-extern cmd_evdisp_t cmd_opltlbp(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-extern cmd_evdisp_t cmd_oplinv_sfsr(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-extern cmd_evdisp_t cmd_opluecpu_detcpu(fmd_hdl_t *, fmd_event_t *,
- nvlist_t *, const char *, cmd_errcl_t);
-extern cmd_evdisp_t cmd_opluecpu_detio(fmd_hdl_t *, fmd_event_t *,
- nvlist_t *, const char *, cmd_errcl_t);
-
-extern cmd_evdisp_t cmd_opl_mac_common(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-extern cmd_evdisp_t cmd_opl_cpu_mem(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-extern cmd_evdisp_t cmd_opl_io_mem(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-
-extern nvlist_t *opl_cpursrc_create(fmd_hdl_t *, uint32_t);
-extern char *cmd_cpu_getfrustr_by_id(fmd_hdl_t *, uint32_t);
-extern cmd_list_t *opl_cpulist_insert(fmd_hdl_t *, uint32_t, int);
-extern void opl_cpulist_free(fmd_hdl_t *, cmd_list_t *);
-extern uint8_t opl_avg(uint_t, uint_t);
-
-extern cmd_evdisp_t cmd_opl_ue_cpu(fmd_hdl_t *, fmd_event_t *,
- const char *, const char *, cmd_ptrsubtype_t, cmd_cpu_t *, cmd_case_t *,
- uint8_t);
-
-extern cmd_list_t *opl_cpulist_insert(fmd_hdl_t *, uint32_t, int);
-extern int cmd_fmri_hc_set(fmd_hdl_t *, nvlist_t *, int, const nvlist_t *,
- nvlist_t *, int, ...);
-extern nvlist_t *opl_mem_fru_create(fmd_hdl_t *, nvlist_t *);
-
-extern cmd_list_t opl_cpu_list;
-
-#define OPL_CHASSIS_DEFAULT "0"
-#define OPL_CPU_FRU_FMRI_DC FM_FMRI_SCHEME_HC":///" \
- FM_FMRI_LEGACY_HC"=/CMU"
-#define OPL_CPU_FRU_FMRI_FF1 FM_FMRI_SCHEME_HC":///" \
- FM_FMRI_LEGACY_HC"=/MBU_A/CPUM"
-#define OPL_CPU_FRU_FMRI_FF2 FM_FMRI_SCHEME_HC":///" \
- FM_FMRI_LEGACY_HC"=/MBU_B/CPUM"
-#define OPL_CPU_FRU_FMRI_IKKAKU FM_FMRI_SCHEME_HC":///" \
- FM_FMRI_LEGACY_HC"=/MBU_A"
-#define STR_BUFLEN 32
-#define NPAIRS 5
-
-/*
- * Mask for getting the fault address
- * from MARKEDID in UBC Memory UE
- * Log Register (Oberon)
- */
-#define UBC_UE_ADR_MASK 0x00007FFFFFFFFFFFULL
-
-/*
- * To indicate if the CPU/IO handler is to be used.
- */
-#define CMD_OPL_HDLR_CPU 1
-#define CMD_OPL_HDLR_IO 2
-
-/*
- * Macors for dealing with "core", "chip"
- * or "strand" related operations.
- */
-#define IS_STRAND 0
-#define IS_CORE 1
-#define IS_CHIP 2
-#define STRAND_UPPER_BOUND 1
-#define CORE_UPPER_BOUND 3
-
-#define COREID_SHIFT 1
-#define CHIPID_SHIFT 3
-#define STRAND_MASK 1
-#define CHIP_OR_CORE_MASK 3
-
-/*
- * This is to reference the Oberon
- * UBC memory UE log register payload.
- */
-#define OBERON_UBC_MUE "ubc-mue"
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _CMD_OPL_H */
diff --git a/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_oplerr.c b/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_oplerr.c
deleted file mode 100644
index 6c3e36d981..0000000000
--- a/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cmd_oplerr.c
+++ /dev/null
@@ -1,529 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * OPL platform specific functions for
- * CPU/Memory error diagnosis engine.
- */
-#include <cmd.h>
-#include <cmd_dimm.h>
-#include <cmd_bank.h>
-#include <cmd_page.h>
-#include <cmd_opl.h>
-#include <string.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <dirent.h>
-#include <sys/stat.h>
-
-#include <sys/fm/protocol.h>
-#include <sys/fm/io/opl_mc_fm.h>
-#include <sys/async.h>
-#include <sys/opl_olympus_regs.h>
-#include <sys/fm/cpu/SPARC64-VI.h>
-#include <sys/int_const.h>
-#include <sys/mutex.h>
-#include <sys/dditypes.h>
-#include <opl/sys/mc-opl.h>
-
-/*
- * The following is the common function for handling
- * memory UE with EID=MEM.
- * The error could be detected by either CPU/IO.
- */
-cmd_evdisp_t
-opl_ue_mem(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl,
- int hdlr_type)
-{
- nvlist_t *rsrc = NULL, *asru = NULL, *fru = NULL;
- uint64_t ubc_ue_log_reg, pa;
- cmd_page_t *page;
-
- if (nvlist_lookup_nvlist(nvl,
- FM_EREPORT_PAYLOAD_NAME_RESOURCE, &rsrc) != 0)
- return (CMD_EVD_BAD);
-
- switch (hdlr_type) {
- case CMD_OPL_HDLR_CPU:
-
- if (nvlist_lookup_uint64(nvl,
- FM_EREPORT_PAYLOAD_NAME_SFAR, &pa) != 0)
- return (CMD_EVD_BAD);
-
- fmd_hdl_debug(hdl, "cmd_ue_mem: pa=%llx\n",
- (u_longlong_t)pa);
- break;
-
- case CMD_OPL_HDLR_IO:
-
- if (nvlist_lookup_uint64(nvl, OBERON_UBC_MUE,
- &ubc_ue_log_reg) != 0)
- return (CMD_EVD_BAD);
-
- pa = (ubc_ue_log_reg & UBC_UE_ADR_MASK);
-
- fmd_hdl_debug(hdl, "cmd_ue_mem: ue_log_reg=%llx\n",
- (u_longlong_t)ubc_ue_log_reg);
- fmd_hdl_debug(hdl, "cmd_ue_mem: pa=%llx\n",
- (u_longlong_t)pa);
- break;
-
- default:
-
- return (CMD_EVD_BAD);
- }
-
- if ((page = cmd_page_lookup(pa)) != NULL &&
- page->page_case.cc_cp != NULL &&
- fmd_case_solved(hdl, page->page_case.cc_cp))
- return (CMD_EVD_REDUND);
-
- if (nvlist_dup(rsrc, &asru, 0) != 0) {
- fmd_hdl_debug(hdl, "opl_ue_mem nvlist dup failed\n");
- return (CMD_EVD_BAD);
- }
-
- if (fmd_nvl_fmri_expand(hdl, asru) < 0) {
- nvlist_free(asru);
- CMD_STAT_BUMP(bad_mem_asru);
- return (CMD_EVD_BAD);
- }
-
- if ((fru = opl_mem_fru_create(hdl, asru)) == NULL) {
- nvlist_free(asru);
- return (CMD_EVD_BAD);
- }
-
- cmd_page_fault(hdl, asru, fru, ep, pa);
- nvlist_free(asru);
- nvlist_free(fru);
- return (CMD_EVD_OK);
-}
-
-/*
- * The following is the main function to handle generating
- * the sibling cpu suspect list for the CPU detected UE
- * error cases. This is to handle the
- * multiple strand/core architecture on the OPL platform.
- */
-cmd_evdisp_t
-cmd_opl_ue_cpu(fmd_hdl_t *hdl, fmd_event_t *ep,
- const char *class, const char *fltname,
- cmd_ptrsubtype_t ptr, cmd_cpu_t *cpu,
- cmd_case_t *cc, uint8_t cpumask)
-{
- const char *uuid;
- cmd_cpu_t *main_cpu, *sib_cpu;
- nvlist_t *fmri;
- cmd_list_t *cpu_list;
- opl_cpu_t *opl_cpu;
- uint32_t main_cpuid, nsusp = 1;
- uint8_t cert;
-
- fmd_hdl_debug(hdl,
- "Enter OPL_CPUUE_HANDLER for class %x\n", class);
-
- main_cpu = cpu;
- main_cpuid = cpu->cpu_cpuid;
-
- if (strcmp(fltname, "core") == 0)
- cpu_list = opl_cpulist_insert(hdl, cpu->cpu_cpuid,
- IS_CORE);
- else if (strcmp(fltname, "chip") == 0)
- cpu_list = opl_cpulist_insert(hdl, cpu->cpu_cpuid,
- IS_CHIP);
- else
- cpu_list = opl_cpulist_insert(hdl, cpu->cpu_cpuid,
- IS_STRAND);
-
- for (opl_cpu = cmd_list_next(cpu_list); opl_cpu != NULL;
- opl_cpu = cmd_list_next(opl_cpu)) {
- if (opl_cpu->oc_cpuid == main_cpuid) {
- sib_cpu = main_cpu;
- opl_cpu->oc_cmd_cpu = main_cpu;
- } else {
- fmri = cmd_cpu_fmri_create(opl_cpu->oc_cpuid, cpumask);
- if (fmri == NULL) {
- opl_cpu->oc_cmd_cpu = NULL;
- fmd_hdl_debug(hdl,
- "missing asru, cpuid %u excluded\n",
- opl_cpu->oc_cpuid);
- continue;
- }
-
- sib_cpu = cmd_cpu_lookup(hdl, fmri, class,
- CMD_CPU_LEVEL_THREAD);
- if (sib_cpu == NULL || sib_cpu->cpu_faulting) {
- nvlist_free(fmri);
- opl_cpu->oc_cmd_cpu = NULL;
- fmd_hdl_debug(hdl,
- "cpu not present, cpuid %u excluded\n",
- opl_cpu->oc_cpuid);
- continue;
- }
- opl_cpu->oc_cmd_cpu = sib_cpu;
- nvlist_free(fmri);
- nsusp++;
- }
- if (cpu->cpu_cpuid == main_cpuid) {
- if (cc->cc_cp != NULL &&
- fmd_case_solved(hdl, cc->cc_cp)) {
- if (cpu_list != NULL)
- opl_cpulist_free(hdl, cpu_list);
- return (CMD_EVD_REDUND);
- }
-
- if (cc->cc_cp == NULL)
- cc->cc_cp = cmd_case_create(hdl,
- &cpu->cpu_header, ptr, &uuid);
-
- if (cc->cc_serdnm != NULL) {
- fmd_hdl_debug(hdl,
- "destroying existing %s state for class %x\n",
- cc->cc_serdnm, class);
- fmd_serd_destroy(hdl, cc->cc_serdnm);
- fmd_hdl_strfree(hdl, cc->cc_serdnm);
- cc->cc_serdnm = NULL;
- fmd_case_reset(hdl, cc->cc_cp);
- }
- fmd_case_add_ereport(hdl, cc->cc_cp, ep);
- }
- }
- cert = opl_avg(100, nsusp);
- for (opl_cpu = cmd_list_next(cpu_list); opl_cpu != NULL;
- opl_cpu = cmd_list_next(opl_cpu)) {
- if (opl_cpu->oc_cmd_cpu != NULL) {
- nvlist_t *cpu_rsrc;
-
- cpu_rsrc = opl_cpursrc_create(hdl, opl_cpu->oc_cpuid);
- if (cpu_rsrc == NULL) {
- fmd_hdl_debug(hdl,
- "missing rsrc, cpuid %u excluded\n",
- opl_cpu->oc_cpuid);
- continue;
- }
- cmd_cpu_create_faultlist(hdl, cc->cc_cp,
- opl_cpu->oc_cmd_cpu, fltname, cpu_rsrc, cert);
- nvlist_free(cpu_rsrc);
- }
- }
- fmd_case_solve(hdl, cc->cc_cp);
- if (cpu_list != NULL)
- opl_cpulist_free(hdl, cpu_list);
- return (CMD_EVD_OK);
-}
-
-/*
- * Generates DIMM fault if the number of Permanent CE
- * threshold is exceeded.
- */
-static void
-opl_ce_thresh_check(fmd_hdl_t *hdl, cmd_dimm_t *dimm)
-{
- nvlist_t *dflt;
- fmd_case_t *cp;
-
- fmd_hdl_debug(hdl,
- "Permanent CE event threshold checking.\n");
-
- if (dimm->dimm_flags & CMD_MEM_F_FAULTING) {
- /* We've already complained about this DIMM */
- return;
- }
-
- if (dimm->dimm_nretired >= fmd_prop_get_int32(hdl,
- "max_perm_ce_dimm")) {
- dimm->dimm_flags |= CMD_MEM_F_FAULTING;
- cp = fmd_case_open(hdl, NULL);
- dflt = cmd_dimm_create_fault(hdl, dimm, "fault.memory.dimm",
- CMD_FLTMAXCONF);
- fmd_case_add_suspect(hdl, cp, dflt);
- fmd_case_solve(hdl, cp);
- }
-}
-
-/*
- * Notify fault page information (pa and errlog) to XSCF via mc-opl
- */
-#define MC_PHYDEV_DIR "/devices"
-#define MC_PHYPREFIX "pseudo-mc@"
-static int
-opl_scf_log(fmd_hdl_t *hdl, nvlist_t *nvl)
-{
- uint32_t *eadd, *elog;
- uint_t n;
- uint64_t pa;
- char path[MAXPATHLEN];
- char *unum;
- nvlist_t *rsrc;
- DIR *mcdir;
- struct dirent *dp;
- mc_flt_page_t flt_page;
- cmd_page_t *page;
- struct stat statbuf;
-
- /*
- * Extract ereport.
- * Sanity check of pa is already done at cmd_opl_mac_common().
- * mc-opl sets only one entry for MC_OPL_ERR_ADD, MC_OPL_ERR_LOG,
- * and MC_OPL_BANK.
- */
- if ((nvlist_lookup_uint64(nvl, MC_OPL_PA, &pa) != 0) ||
- (nvlist_lookup_uint32_array(nvl, MC_OPL_ERR_ADD, &eadd, &n) != 0) ||
- (nvlist_lookup_uint32_array(nvl, MC_OPL_ERR_LOG, &elog, &n) != 0)) {
- fmd_hdl_debug(hdl, "opl_scf_log failed to extract ereport.\n");
- return (-1);
- }
- if (nvlist_lookup_nvlist(nvl, FM_EREPORT_PAYLOAD_NAME_RESOURCE,
- &rsrc) != 0) {
- fmd_hdl_debug(hdl, "opl_scf_log failed to get resource.\n");
- return (-1);
- }
- if (nvlist_lookup_string(rsrc, FM_FMRI_MEM_UNUM, &unum) != 0) {
- fmd_hdl_debug(hdl, "opl_scf_log failed to get unum.\n");
- return (-1);
- }
-
- page = cmd_page_lookup(pa);
- if (page != NULL && page->page_flags & CMD_MEM_F_FAULTING) {
- /*
- * fault.memory.page will not be created.
- */
- return (0);
- }
-
- flt_page.err_add = eadd[0];
- flt_page.err_log = elog[0];
- flt_page.fmri_addr = (uint64_t)(uint32_t)unum;
- flt_page.fmri_sz = strlen(unum) + 1;
-
- fmd_hdl_debug(hdl, "opl_scf_log DIMM: %s (%d)\n",
- unum, strlen(unum) + 1);
- fmd_hdl_debug(hdl, "opl_scf_log pa:%llx add:%x log:%x\n",
- pa, eadd[0], elog[0]);
-
- if ((mcdir = opendir(MC_PHYDEV_DIR)) != NULL) {
- while ((dp = readdir(mcdir)) != NULL) {
- int fd;
-
- if (strncmp(dp->d_name, MC_PHYPREFIX,
- strlen(MC_PHYPREFIX)) != 0)
- continue;
-
- (void) snprintf(path, sizeof (path),
- "%s/%s", MC_PHYDEV_DIR, dp->d_name);
-
- if (stat(path, &statbuf) != 0 ||
- (statbuf.st_mode & S_IFCHR) == 0) {
- /* skip if not a character device */
- continue;
- }
-
- if ((fd = open(path, O_RDONLY)) < 0)
- continue;
-
- if (ioctl(fd, MCIOC_FAULT_PAGE, &flt_page) == 0) {
- fmd_hdl_debug(hdl, "opl_scf_log ioctl(%s)\n",
- path);
- (void) close(fd);
- (void) closedir(mcdir);
- return (0);
- }
- (void) close(fd);
- }
- (void) closedir(mcdir);
- }
-
- fmd_hdl_debug(hdl, "opl_scf_log failed ioctl().\n");
-
- return (-1);
-}
-
-/*
- * This is the common function for processing MAC detected
- * Intermittent and Permanent CEs.
- */
-
-cmd_evdisp_t
-cmd_opl_mac_ce(fmd_hdl_t *hdl, fmd_event_t *ep, const char *class,
- nvlist_t *asru, nvlist_t *fru, uint64_t pa, nvlist_t *nvl)
-{
- cmd_dimm_t *dimm;
- const char *uuid;
-
- fmd_hdl_debug(hdl,
- "Processing CE ereport\n");
-
- if ((dimm = cmd_dimm_lookup(hdl, asru)) == NULL &&
- (dimm = cmd_dimm_create(hdl, asru)) == NULL)
- return (CMD_EVD_UNUSED);
-
- if (dimm->dimm_case.cc_cp == NULL) {
- dimm->dimm_case.cc_cp = cmd_case_create(hdl,
- &dimm->dimm_header, CMD_PTR_DIMM_CASE, &uuid);
- }
-
- if (strcmp(class, "ereport.asic.mac.ptrl-ice") == 0) {
- CMD_STAT_BUMP(ce_interm);
- fmd_hdl_debug(hdl, "adding FJ-Intermittent event "
- "to CE serd engine\n");
-
- if (dimm->dimm_case.cc_serdnm == NULL) {
- dimm->dimm_case.cc_serdnm =
- cmd_mem_serdnm_create(hdl,
- "dimm", dimm->dimm_unum);
- fmd_serd_create(hdl, dimm->dimm_case.cc_serdnm,
- fmd_prop_get_int32(hdl, "ce_n"),
- fmd_prop_get_int64(hdl, "ce_t"));
- }
-
- if (fmd_serd_record(hdl, dimm->dimm_case.cc_serdnm, ep) ==
- FMD_B_FALSE) {
- return (CMD_EVD_OK); /* engine hasn't fired */
- }
- fmd_hdl_debug(hdl, "ce serd fired\n");
- fmd_case_add_serd(hdl, dimm->dimm_case.cc_cp,
- dimm->dimm_case.cc_serdnm);
- fmd_serd_reset(hdl, dimm->dimm_case.cc_serdnm);
-
- (void) opl_scf_log(hdl, nvl);
- } else {
- CMD_STAT_BUMP(ce_sticky);
- }
-
- dimm->dimm_nretired++;
- dimm->dimm_retstat.fmds_value.ui64++;
- cmd_dimm_dirty(hdl, dimm);
-
- cmd_page_fault(hdl, asru, fru, ep, pa);
- opl_ce_thresh_check(hdl, dimm);
-
- return (CMD_EVD_OK);
-}
-
-/*
- * This is the common entry for processing MAC detected errors.
- * It is responsible for generating the memory page fault event.
- * The permanent CE (sticky) in normal mode is handled here also
- * in the same way as in the UE case.
- */
-/*ARGSUSED*/
-cmd_evdisp_t
-cmd_opl_mac_common(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl,
- const char *class, cmd_errcl_t clcode)
-{
- uint64_t pa;
- nvlist_t *rsrc = NULL, *asru = NULL, *fru = NULL;
- cmd_page_t *page;
-
- fmd_hdl_debug(hdl, "cmd_mac_common: clcode=%ll\n", clcode);
-
- if (nvlist_lookup_nvlist(nvl, MC_OPL_RESOURCE, &rsrc) != 0)
- return (CMD_EVD_BAD);
-
- if (nvlist_lookup_uint64(nvl, MC_OPL_PA, &pa)
- != 0)
- return (CMD_EVD_BAD);
-
- /*
- * Check for invalid pa.
- * The most sig. bit should not be on.
- * It would be out of the range of possible pa
- * in MAC's view.
- */
- if (((uint64_t)1 << 63) & pa)
- return (CMD_EVD_BAD);
-
- if ((page = cmd_page_lookup(pa)) != NULL &&
- page->page_case.cc_cp != NULL &&
- fmd_case_solved(hdl, page->page_case.cc_cp))
- return (CMD_EVD_REDUND);
-
- if (nvlist_dup(rsrc, &asru, 0) != 0) {
- fmd_hdl_debug(hdl, "cmd_opl_mac_common nvlist dup failed\n");
- return (CMD_EVD_BAD);
- }
-
- if (fmd_nvl_fmri_expand(hdl, asru) < 0) {
- fmd_hdl_debug(hdl, "cmd_opl_mac_common expand failed\n");
- nvlist_free(asru);
- CMD_STAT_BUMP(bad_mem_asru);
- return (CMD_EVD_BAD);
- }
-
- if ((fru = opl_mem_fru_create(hdl, asru)) == NULL) {
- fmd_hdl_debug(hdl, "cmd_opl_mac_common fru_create failed\n");
- nvlist_free(asru);
- return (CMD_EVD_BAD);
- }
-
- /*
- * process PCE and ICE to create DIMM fault
- */
- if (strcmp(class, "ereport.asic.mac.mi-ce") == 0 ||
- strcmp(class, "ereport.asic.mac.ptrl-ce") == 0 ||
- strcmp(class, "ereport.asic.mac.ptrl-ice") == 0) {
- cmd_evdisp_t ret;
-
- ret = cmd_opl_mac_ce(hdl, ep, class, asru, fru, pa, nvl);
- nvlist_free(asru);
- nvlist_free(fru);
- if (ret != CMD_EVD_OK) {
- fmd_hdl_debug(hdl,
- "cmd_opl_mac_common: mac_ce failed\n");
- return (CMD_EVD_BAD);
- } else
- return (CMD_EVD_OK);
- }
-
- /* The following code handles page retires for UEs and CMPEs. */
-
- cmd_page_fault(hdl, asru, fru, ep, pa);
- nvlist_free(asru);
- nvlist_free(fru);
- return (CMD_EVD_OK);
-}
-
-/*
- * Common entry points for handling CPU/IO detected UE with
- * respect to EID=MEM.
- */
-/*ARGSUSED*/
-cmd_evdisp_t
-cmd_opl_cpu_mem(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl,
- const char *class, cmd_errcl_t clcode)
-{
- return (opl_ue_mem(hdl, ep, nvl, CMD_OPL_HDLR_CPU));
-}
-
-/*ARGSUSED*/
-cmd_evdisp_t
-cmd_opl_io_mem(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl,
- const char *class, cmd_errcl_t clcode)
-{
- return (opl_ue_mem(hdl, ep, nvl, CMD_OPL_HDLR_IO));
-}
diff --git a/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cpumem-diagnosis.conf b/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cpumem-diagnosis.conf
deleted file mode 100644
index 17fd51f7dd..0000000000
--- a/usr/src/cmd/fm/modules/sun4u/cpumem-diagnosis/cpumem-diagnosis.conf
+++ /dev/null
@@ -1,67 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2006 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-#
-# cpumem-diagnosis
-#
-setprop icache_n 8
-setprop icache_t 168h
-
-setprop dcache_n 8
-setprop dcache_t 168h
-
-setprop pcache_n 2
-setprop pcache_t 168h
-
-setprop itlb_n 2
-setprop itlb_t 168h
-
-setprop dtlb_n 2
-setprop dtlb_t 168h
-
-setprop l2tag_n 4
-setprop l2tag_t 1h
-
-setprop l2data_n 12
-setprop l2data_t 1h
-
-setprop l3tag_n 4
-setprop l3tag_t 1h
-
-setprop l3data_n 12
-setprop l3data_t 1h
-
-setprop ce_n 2
-setprop ce_t 72h
-
-#
-# The parameter value below is an integer, measured in thousandths of a percent
-# of the number of system pages. A value of 100 means 0.1% of system memory.
-# The value given cannot exceed 100000, or 100%.
-#
-setprop thresh_tpct_sysmem 100
-
-dictionary SUN4U
diff --git a/usr/src/cmd/fm/modules/sun4u/datapath-retire/Makefile b/usr/src/cmd/fm/modules/sun4u/datapath-retire/Makefile
deleted file mode 100644
index e7a58cc4d8..0000000000
--- a/usr/src/cmd/fm/modules/sun4u/datapath-retire/Makefile
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2006 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-MODULE = datapath-retire
-CLASS = arch
-ARCH = sun4u
-SRCS = \
- cda_cpu.c \
- cda_main.c
-
-include ../../Makefile.plugin
-
-CDA_VERSION = "1.0"
-
-INCDIRS = .
-
-CPPFLAGS += $(INCDIRS:%=-I%) -DCDA_VERSION='$(CDA_VERSION)'
diff --git a/usr/src/cmd/fm/modules/sun4u/datapath-retire/cda.h b/usr/src/cmd/fm/modules/sun4u/datapath-retire/cda.h
deleted file mode 100644
index e7f3b94054..0000000000
--- a/usr/src/cmd/fm/modules/sun4u/datapath-retire/cda.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2005 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _CDA_H
-#define _CDA_H
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include <fm/fmd_api.h>
-
-#include <sys/types.h>
-
-#define DP_MAX_BUF 16 /* max len of general purpose buffer */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct cda {
- struct timespec cda_cpu_delay; /* CPU offline retry interval */
- uint_t cda_cpu_tries; /* Number of CPU offline retries */
- uint_t cda_cpu_dooffline; /* Whether to offline CPUs */
- uint_t cda_cpu_forcedoffline; /* Whether to do forced CPU offline */
-} cda_t;
-
-typedef struct cda_stats {
- fmd_stat_t dp_offs; /* Successful offlines */
- fmd_stat_t dp_fails; /* Failed offlines */
- fmd_stat_t dp_supp; /* Suppressed offlines */
- fmd_stat_t bad_flts; /* Malformed faults */
- fmd_stat_t nop_flts; /* Inapplicable faults */
-} cda_stats_t;
-
-extern cda_stats_t cda_stats;
-extern cda_t cda;
-
-extern void cda_dp_retire(fmd_hdl_t *, nvlist_t *, nvlist_t *, const char *);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _CDA_H */
diff --git a/usr/src/cmd/fm/modules/sun4u/datapath-retire/cda_cpu.c b/usr/src/cmd/fm/modules/sun4u/datapath-retire/cda_cpu.c
deleted file mode 100644
index f65672f1cd..0000000000
--- a/usr/src/cmd/fm/modules/sun4u/datapath-retire/cda_cpu.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2005 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include <cda.h>
-
-#include <fcntl.h>
-#include <unistd.h>
-#include <strings.h>
-#include <errno.h>
-#include <time.h>
-#include <fm/fmd_api.h>
-#include <sys/fm/protocol.h>
-#include <sys/processor.h>
-
-static void
-cda_cpu_offline(fmd_hdl_t *hdl, uint_t cpuid, int cpustate)
-{
- int i;
-
- for (i = 0; i < cda.cda_cpu_tries;
- i++, (void) nanosleep(&cda.cda_cpu_delay, NULL)) {
- if (p_online(cpuid, cpustate) != -1) {
- fmd_hdl_debug(hdl, "offlined cpu %u\n", cpuid);
- cda_stats.dp_offs.fmds_value.ui64++;
- return;
- }
- }
-
- fmd_hdl_debug(hdl, "failed to offline %u: %s\n", cpuid,
- strerror(errno));
- cda_stats.dp_fails.fmds_value.ui64++;
-}
-
-/*ARGSUSED*/
-void
-cda_dp_retire(fmd_hdl_t *hdl, nvlist_t *nvl, nvlist_t *asru, const char *uuid)
-{
- int ii;
- uint_t cpuid;
- uint_t hc_nprs;
- nvlist_t **hc_prs;
- char *id;
-
- /* Get the hc-list of elements in FMRI, and the size of the list */
- if (nvlist_lookup_nvlist_array(asru, FM_FMRI_HC_LIST, &hc_prs,
- &hc_nprs) != 0) {
- fmd_hdl_debug(hdl, "failed to get '%s' from dp fault\n",
- FM_FMRI_HC_LIST);
- return;
- }
-
- /* walk hc-list and offline each CPU present */
- for (ii = 0; ii < hc_nprs; ii++) {
- int cpustate = P_FAULTED;
-
- if (nvlist_lookup_string(hc_prs[ii], FM_FMRI_HC_ID, &id) != 0) {
- fmd_hdl_debug(hdl, "dp fault missing '%s'\n",
- FM_FMRI_HC_ID);
- cda_stats.bad_flts.fmds_value.ui64++;
- return;
- }
-
- cpuid = atoi(id);
- if (!cda.cda_cpu_dooffline) {
- fmd_hdl_debug(hdl, "dp suppressed offline of "
- "CPU %u\n", cpuid);
- cda_stats.dp_supp.fmds_value.ui64++;
- continue;
- }
-
- if (cda.cda_cpu_forcedoffline)
- cpustate |= P_FORCED;
-
- cda_cpu_offline(hdl, cpuid, cpustate);
- }
-}
diff --git a/usr/src/cmd/fm/modules/sun4u/datapath-retire/cda_main.c b/usr/src/cmd/fm/modules/sun4u/datapath-retire/cda_main.c
deleted file mode 100644
index 6cf411e49d..0000000000
--- a/usr/src/cmd/fm/modules/sun4u/datapath-retire/cda_main.c
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2005 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * Copyright 2019 Peter Tribble.
- */
-
-#include <cda.h>
-
-#include <strings.h>
-#include <errno.h>
-#include <time.h>
-#include <sys/utsname.h>
-#include <sys/systeminfo.h>
-#include <fm/fmd_api.h>
-#include <sys/fm/protocol.h>
-
-cda_t cda;
-
-cda_stats_t cda_stats = {
- { "dp_offs", FMD_TYPE_UINT64, "successful cpu offlines" },
- { "dp_fails", FMD_TYPE_UINT64, "datapath faults unresolveable" },
- { "cpu_supp", FMD_TYPE_UINT64, "cpu offlines suppressed" },
- { "bad_flts", FMD_TYPE_UINT64, "invalid fault events received" },
- { "nop_flts", FMD_TYPE_UINT64, "inapplicable fault events received" },
-};
-
-typedef struct cda_subscriber {
- const char *subr_class;
- const char *subr_sname;
- uint_t subr_svers;
- void (*subr_func)(fmd_hdl_t *, nvlist_t *, nvlist_t *, const char *);
-} cda_subscriber_t;
-
-static const cda_subscriber_t cda_subrs[] = {
- { "fault.asic.*.dp", FM_FMRI_SCHEME_HC, FM_HC_SCHEME_VERSION,
- cda_dp_retire },
- { NULL, NULL, 0, NULL }
-};
-
-static const cda_subscriber_t *
-cda_get_subr(fmd_hdl_t *hdl, nvlist_t *nvl, nvlist_t **asrup)
-{
- const cda_subscriber_t *sp;
- nvlist_t *asru;
- char *scheme;
- uint8_t version;
-
- if (nvlist_lookup_nvlist(nvl, FM_FAULT_ASRU, &asru) != 0 ||
- nvlist_lookup_string(asru, FM_FMRI_SCHEME, &scheme) != 0 ||
- nvlist_lookup_uint8(asru, FM_VERSION, &version) != 0) {
- cda_stats.bad_flts.fmds_value.ui64++;
- return (NULL);
- }
-
- for (sp = cda_subrs; sp->subr_class != NULL; sp++) {
- if (fmd_nvl_class_match(hdl, nvl, sp->subr_class) &&
- strcmp(scheme, sp->subr_sname) == 0 &&
- version <= sp->subr_svers) {
- *asrup = asru;
- return (sp);
- }
- }
-
- cda_stats.nop_flts.fmds_value.ui64++;
- return (NULL);
-}
-
-static void
-cda_recv_list(fmd_hdl_t *hdl, nvlist_t *nvl)
-{
- char *uuid = NULL;
- nvlist_t **nva;
- uint_t nvc;
- int err = 0;
-
- err |= nvlist_lookup_string(nvl, FM_SUSPECT_UUID, &uuid);
- err |= nvlist_lookup_nvlist_array(nvl, FM_SUSPECT_FAULT_LIST,
- &nva, &nvc);
- if (err != 0) {
- cda_stats.bad_flts.fmds_value.ui64++;
- return;
- }
-
- while (nvc-- != 0) {
- nvlist_t *nvl = *nva++;
- const cda_subscriber_t *subr;
- nvlist_t *asru;
-
- if (fmd_case_uuclosed(hdl, uuid))
- break;
-
- if ((subr = cda_get_subr(hdl, nvl, &asru)) == NULL)
- continue;
-
- if (subr->subr_func != NULL)
- subr->subr_func(hdl, nvl, asru, uuid);
- }
-}
-
-static void
-cda_recv_one(fmd_hdl_t *hdl, nvlist_t *nvl)
-{
- const cda_subscriber_t *subr;
- nvlist_t *asru;
-
- if ((subr = cda_get_subr(hdl, nvl, &asru)) == NULL)
- return;
-
- if (subr->subr_func != NULL)
- subr->subr_func(hdl, nvl, asru, NULL);
-}
-
-/*ARGSUSED*/
-static void
-cda_recv(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl, const char *class)
-{
- fmd_hdl_debug(hdl, "received %s\n", class);
-
- if (strcmp(class, FM_LIST_SUSPECT_CLASS) == 0)
- cda_recv_list(hdl, nvl);
- else
- cda_recv_one(hdl, nvl);
-}
-
-static const fmd_hdl_ops_t fmd_ops = {
- cda_recv, /* fmdo_recv */
- NULL, /* fmdo_timeout */
- NULL, /* fmdo_close */
- NULL, /* fmdo_stats */
- NULL, /* fmdo_gc */
-};
-
-static const fmd_prop_t fmd_props[] = {
- { "cpu_tries", FMD_TYPE_UINT32, "10" },
- { "cpu_delay", FMD_TYPE_TIME, "1sec" },
- { "cpu_offline_enable", FMD_TYPE_BOOL, "true" },
- { "cpu_forced_offline", FMD_TYPE_BOOL, "true" },
- { NULL, 0, NULL }
-};
-
-static const fmd_hdl_info_t fmd_info = {
- "Datapath Retire Agent", CDA_VERSION, &fmd_ops, fmd_props
-};
-
-static int
-cda_platform_check_support(fmd_hdl_t *hdl)
-{
- char buf[SYS_NMLN];
-
- if (sysinfo(SI_PLATFORM, buf, sizeof (buf)) == -1) {
- fmd_hdl_debug(hdl, "sysinfo failed");
- return (0);
- }
-
- if (strcmp(buf, "SUNW,Sun-Fire") == 0 ||
- strcmp(buf, "SUNW,Netra-T12") == 0)
- return (1);
- else
- return (0);
-}
-
-void
-_fmd_init(fmd_hdl_t *hdl)
-{
- hrtime_t nsec;
-
- if (fmd_hdl_register(hdl, FMD_API_VERSION, &fmd_info) != 0)
- return; /* invalid data in configuration file */
-
- if (cda_platform_check_support(hdl) == 0) {
- fmd_hdl_debug(hdl, "platform not supported");
- fmd_hdl_unregister(hdl);
- return;
- }
-
- fmd_hdl_subscribe(hdl, "fault.asic.*.dp");
-
- (void) fmd_stat_create(hdl, FMD_STAT_NOALLOC, sizeof (cda_stats) /
- sizeof (fmd_stat_t), (fmd_stat_t *)&cda_stats);
-
- cda.cda_cpu_tries = fmd_prop_get_int32(hdl, "cpu_tries");
-
- nsec = fmd_prop_get_int64(hdl, "cpu_delay");
- cda.cda_cpu_delay.tv_sec = nsec / NANOSEC;
- cda.cda_cpu_delay.tv_nsec = nsec % NANOSEC;
-
- cda.cda_cpu_dooffline = fmd_prop_get_int32(hdl,
- "cpu_offline_enable");
- cda.cda_cpu_forcedoffline = fmd_prop_get_int32(hdl,
- "cpu_forced_offline");
-}
-
-/*ARGSUSED*/
-void
-_fmd_fini(fmd_hdl_t *hdl)
-{
-}
diff --git a/usr/src/cmd/fm/modules/sun4u/datapath-retire/datapath-retire.conf b/usr/src/cmd/fm/modules/sun4u/datapath-retire/datapath-retire.conf
deleted file mode 100644
index c09832552a..0000000000
--- a/usr/src/cmd/fm/modules/sun4u/datapath-retire/datapath-retire.conf
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2005 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
diff --git a/usr/src/cmd/fm/modules/sun4v/Makefile b/usr/src/cmd/fm/modules/sun4v/Makefile
deleted file mode 100644
index a1336fb45e..0000000000
--- a/usr/src/cmd/fm/modules/sun4v/Makefile
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-SUBDIRS = etm cpumem-diagnosis cpumem-retire generic-mem
-
-include ../../Makefile.subdirs
diff --git a/usr/src/cmd/fm/modules/sun4v/cpumem-diagnosis/Makefile b/usr/src/cmd/fm/modules/sun4v/cpumem-diagnosis/Makefile
deleted file mode 100644
index a44e656a47..0000000000
--- a/usr/src/cmd/fm/modules/sun4v/cpumem-diagnosis/Makefile
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2007 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-ARCH = sun4v
-
-sun4v_SRCS = cmd_hc_sun4v.c \
- cmd_branch.c
-
-INCDIRS = $(SRC)/uts/sun4v \
- $(ROOT)/usr/platform/sun4v/include
-
-include ../../sun4/cpumem-diagnosis/Makefile.cpumem
-
-LDLIBS += -L$(ROOTLIB)/fm -lmdesc -lldom
-LDFLAGS += -R/usr/lib/fm
-
-CERRWARN += -_gcc=-Wno-switch
-CERRWARN += -_gcc=-Wno-parentheses
diff --git a/usr/src/cmd/fm/modules/sun4v/cpumem-diagnosis/cmd_branch.c b/usr/src/cmd/fm/modules/sun4v/cpumem-diagnosis/cmd_branch.c
deleted file mode 100644
index a496584060..0000000000
--- a/usr/src/cmd/fm/modules/sun4v/cpumem-diagnosis/cmd_branch.c
+++ /dev/null
@@ -1,702 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#include <cmd_mem.h>
-#include <cmd_branch.h>
-#include <cmd_dimm.h>
-#include <cmd.h>
-#include <cmd_hc_sun4v.h>
-
-#include <errno.h>
-#include <string.h>
-#include <strings.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <fm/fmd_api.h>
-#include <fm/libtopo.h>
-#include <sys/fm/protocol.h>
-#include <sys/mem.h>
-#include <sys/nvpair.h>
-
-#define BUF_SIZE 120
-#define LEN_CMP 6
-
-/*
- * mbd_label: If a DIMM associated with this branch is located on a memory
- * expansion board or riser board, return (pointer to) the label of that board;
- * otherwise return NULL.
- * We assume that there will be at most one such board for any branch.
- */
-
-char *
-mbd_label(fmd_hdl_t *hdl, cmd_branch_t *branch, const char *nacname)
-{
- cmd_dimm_t *dimm;
- cmd_branch_memb_t *bm;
- char *p;
- size_t s;
-
- for (bm = cmd_list_next(&branch->branch_dimms); bm != NULL;
- bm = cmd_list_next(bm)) {
- dimm = bm->dimm;
- if ((p = strstr(dimm->dimm_unum, nacname)) != NULL) {
- p = strchr(p, '/'); /* include instance number */
- s = p - dimm->dimm_unum;
- p = fmd_hdl_zalloc(hdl, s+1, FMD_SLEEP);
- (void) strncpy(p, dimm->dimm_unum, s);
- *(p + s) = '\0';
- return (p);
- }
- }
- return (NULL);
-}
-
-void
-cmd_branch_add_dimm(fmd_hdl_t *hdl, cmd_branch_t *branch, cmd_dimm_t *dimm)
-{
- cmd_branch_memb_t *bm;
-
- if (dimm == NULL)
- return;
-
- fmd_hdl_debug(hdl, "Attaching dimm %s to branch %s\n",
- dimm->dimm_unum, branch->branch_unum);
- bm = fmd_hdl_zalloc(hdl, sizeof (cmd_branch_memb_t), FMD_SLEEP);
- bm->dimm = dimm;
- cmd_list_append(&branch->branch_dimms, bm);
-}
-
-void
-cmd_branch_remove_dimm(fmd_hdl_t *hdl, cmd_branch_t *branch, cmd_dimm_t *dimm)
-{
- cmd_branch_memb_t *bm;
-
- fmd_hdl_debug(hdl, "Detaching dimm %s from branch %s\n",
- dimm->dimm_unum, branch->branch_unum);
-
- for (bm = cmd_list_next(&branch->branch_dimms); bm != NULL;
- bm = cmd_list_next(bm)) {
- if (bm->dimm == dimm) {
- cmd_list_delete(&branch->branch_dimms, bm);
- fmd_hdl_free(hdl, bm, sizeof (cmd_branch_memb_t));
- return;
- }
- }
-
- fmd_hdl_abort(hdl,
- "Attempt to disconnect dimm from non-parent branch\n");
-}
-
-static cmd_dimm_t *
-branch_dimm_create(fmd_hdl_t *hdl, char *dimm_unum, char **serids,
- size_t nserids)
-{
- nvlist_t *fmri;
- cmd_dimm_t *dimm;
-
- fmri = cmd_mem_fmri_create(dimm_unum, serids, nserids);
-
- if (fmri != NULL && (fmd_nvl_fmri_expand(hdl, fmri) == 0)) {
- dimm = cmd_dimm_create(hdl, fmri);
- if (dimm != NULL) {
- nvlist_free(fmri);
- return (dimm);
- }
- }
-
- nvlist_free(fmri);
- return (NULL);
-}
-
-static fmd_hdl_t *br_hdl; /* for use by callbacks */
-static int br_dimmcount;
-static nvlist_t *br_memb_nvl;
-
-/*ARGSUSED*/
-static int
-branch_dimm_cb(topo_hdl_t *thp, tnode_t *node, void *arg)
-{
- char *lbl, *p, *q;
- char cx[BUF_SIZE], cy[BUF_SIZE];
- nvlist_t *rsrc;
- int err;
- cmd_branch_t *branch = (cmd_branch_t *)arg;
- cmd_dimm_t *dimm;
- size_t nserids;
- char **serids;
-
- if (topo_node_resource(node, &rsrc, &err) < 0)
- return (TOPO_WALK_NEXT); /* no label, try next */
-
- if ((nvlist_lookup_string(rsrc, FM_FMRI_MEM_UNUM, &lbl) != 0) ||
- (nvlist_lookup_string_array(rsrc, FM_FMRI_MEM_SERIAL_ID,
- &serids, &nserids) != 0)) {
- nvlist_free(rsrc);
- return (TOPO_WALK_NEXT);
- }
-
- /*
- * Massage the unum of the candidate DIMM as follows:
- * a) remove any trailing J number. Use result for cmd_dimm_t.
- * b) for branch membership purposes only, remove reference to
- * a riser card (MR%d) if one exists.
- */
- if ((p = strstr(lbl, "/J")) != NULL) {
- (void) strncpy(cx, lbl, p - lbl);
- cx[p - lbl] = '\0';
- } else {
- (void) strcpy(cx, lbl);
- }
- (void) strcpy(cy, cx);
- if ((p = strstr(cy, "/MR")) != NULL) {
- if ((q = strchr(p + 1, '/')) != NULL)
- (void) strcpy(p, q);
- else
- *p = '\0';
- }
-
- /*
- * For benefit of Batoka-like platforms, start comparison with
- * "CMP", so that any leading "MEM" or "CPU" makes no difference.
- */
-
- p = strstr(branch->branch_unum, "CMP");
- q = strstr(cy, "CMP");
-
- if ((p != NULL) && (q != NULL) && strncmp(p, q, strlen(p)) == 0) {
- dimm = branch_dimm_create(br_hdl, cx, serids, nserids);
- if (dimm != NULL)
- cmd_branch_add_dimm(br_hdl, branch, dimm);
- }
- nvlist_free(rsrc);
- return (TOPO_WALK_NEXT);
-}
-
-
-/*
- * The cmd_dimm_t structure created for a DIMM in a branch never has a
- * Jxxx in its unum; the cmd_dimm_t structure created for a DIMM containing
- * a page, or in a bank (i.e. for ECC errors)-always-has a Jxxx in its
- * unum. Therefore the set of cmd_dimm_t's created for a branch is always
- * disjoint from the set of cmd_dimm_t's created for pages and/or banks, so
- * the cmd_dimm_create will never link a 'branch' cmd_dimm_t into bank.
- * Faulting a DIMM for ECC will not prevent subsequent faulting of "same"
- * dimm for FBR/FBU and vice versa
- */
-static int
-branch_dimmlist_create(fmd_hdl_t *hdl, cmd_branch_t *branch)
-{
- topo_hdl_t *thp;
- topo_walk_t *twp;
- int err, dimm_count;
- cmd_list_t *bp;
-
- if ((thp = fmd_hdl_topo_hold(hdl, TOPO_VERSION)) == NULL)
- return (0);
- if ((twp = topo_walk_init(thp,
- FM_FMRI_SCHEME_MEM, branch_dimm_cb, branch, &err))
- == NULL) {
- fmd_hdl_topo_rele(hdl, thp);
- return (0);
- }
- br_hdl = hdl;
- (void) topo_walk_step(twp, TOPO_WALK_CHILD);
- topo_walk_fini(twp);
- fmd_hdl_topo_rele(hdl, thp);
-
- for (dimm_count = 0, bp = cmd_list_next(&branch->branch_dimms);
- bp != NULL; bp = cmd_list_next(bp), dimm_count++)
- ;
- return (dimm_count);
-}
-
-/*ARGSUSED*/
-static int
-fru_by_label_cb(topo_hdl_t *thp, tnode_t *node, void *arg)
-{
- char *lbl;
- int err;
- char *target = (char *)arg;
-
- if (topo_node_label(node, &lbl, &err) < 0)
- return (TOPO_WALK_NEXT); /* no label, try next */
-
- if ((strcmp(target, lbl) == 0) &&
- (topo_node_fru(node, &br_memb_nvl, NULL, &err) == 0)) {
- topo_hdl_strfree(thp, lbl);
- return (TOPO_WALK_TERMINATE);
- }
- topo_hdl_strfree(thp, lbl);
- return (TOPO_WALK_NEXT);
-}
-
-static nvlist_t *
-fru_by_label(fmd_hdl_t *hdl, const char *target)
-{
- topo_hdl_t *thp;
- topo_walk_t *twp;
- int err;
-
- br_memb_nvl = NULL;
- if (((thp = fmd_hdl_topo_hold(hdl, TOPO_VERSION)) != NULL) &&
- ((twp = topo_walk_init(thp, FM_FMRI_SCHEME_HC,
- fru_by_label_cb, (void *)target, &err)) != NULL)) {
- br_hdl = hdl;
- (void) topo_walk_step(twp, TOPO_WALK_CHILD);
- topo_walk_fini(twp);
- }
- fmd_hdl_topo_rele(hdl, thp);
- return (br_memb_nvl);
-}
-
-static void
-add_bdflt_to_case(fmd_hdl_t *hdl, char *label, const char *fltnm,
- uint8_t board_cert, fmd_case_t *cp)
-{
- nvlist_t *memb_nvl, *flt;
-
- memb_nvl = fru_by_label(hdl, label);
- if (memb_nvl != NULL) {
- flt = cmd_nvl_create_fault(hdl, fltnm, board_cert,
- memb_nvl, memb_nvl, NULL);
- flt = cmd_fault_add_location(hdl, flt, label);
- if (flt != NULL) {
- fmd_case_add_suspect(hdl, cp, flt);
- }
- nvlist_free(memb_nvl);
- }
-}
-
-/*
- * For t5440, the memory channel goes like this:
- * VF -> cpuboard -> D0 -> motherboard -> memboard -> D[1..3]
- * If there is a dimm on the memory board, the memory board,
- * motherboard, cpuboard, and dimms are in the suspect list.
- * If there is no dimm on the memory board, the cpu board and
- * the dimms are in the suspect list
- * The board certainty = total board certainty / number of
- * the faulty boards in the suspect list.
- */
-void
-cmd_branch_create_fault(fmd_hdl_t *hdl, cmd_branch_t *branch,
- const char *fltnm, nvlist_t *asru)
-{
- nvlist_t *flt;
- cmd_branch_memb_t *bm;
- cmd_dimm_t *dimm;
- int dimm_count = 0;
- uint_t cert = 0;
- uint_t board_cert = 0;
- char *fruloc = NULL, *membd_label;
-
- /* attach the dimms to the branch */
- dimm_count = branch_dimmlist_create(hdl, branch);
-
- if ((membd_label = mbd_label(hdl, branch, "MEM")) != NULL) {
- board_cert = CMD_BOARDS_CERT / 3; /* CPU, MEM, MB */
-
- /*
- * Batoka with memory expansion. CPU expansion board will
- * be added below. Add memory expansion board and motherboard
- * FRUs here.
- */
-
- add_bdflt_to_case(hdl, membd_label, fltnm, board_cert,
- branch->branch_case.cc_cp);
- fmd_hdl_strfree(hdl, membd_label);
- add_bdflt_to_case(hdl, "MB", fltnm, board_cert,
- branch->branch_case.cc_cp);
-
- } else if ((membd_label = mbd_label(hdl, branch, "MR")) != NULL) {
-
- board_cert = CMD_BOARDS_CERT / 2; /* MB, MR */
-
- /*
- * Maramba or similar platform with mezzanine board.
- * Motherboard FRU will be added below. Add the mezzanine
- * board here.
- */
-
- add_bdflt_to_case(hdl, membd_label, fltnm, board_cert,
- branch->branch_case.cc_cp);
- fmd_hdl_strfree(hdl, membd_label);
- } else {
- board_cert = CMD_BOARDS_CERT; /* only MB or CPU */
- }
-
- /*
- * The code which follows adds to the suspect list the FRU which
- * contains the ereport 'detector'. This can be either a CPU
- * expansion board (Batoka), or motherboard (Huron, Maramba, or
- * derivative).
- */
-
- fruloc = cmd_getfru_loc(hdl, asru);
- flt = cmd_boardfru_create_fault(hdl, asru, fltnm, board_cert, fruloc);
- if (flt != NULL)
- fmd_case_add_suspect(hdl, branch->branch_case.cc_cp, flt);
-
- if (dimm_count != 0)
- cert = (100 - CMD_BOARDS_CERT) / dimm_count;
-
- /* create dimm faults */
- for (bm = cmd_list_next(&branch->branch_dimms); bm != NULL;
- bm = cmd_list_next(bm)) {
- dimm = bm->dimm;
- if (dimm != NULL) {
- dimm->dimm_flags |= CMD_MEM_F_FAULTING;
- cmd_dimm_dirty(hdl, dimm);
- flt = cmd_dimm_create_fault(hdl, dimm, fltnm, cert);
- fmd_case_add_suspect(hdl, branch->branch_case.cc_cp,
- flt);
- }
- }
- if (fruloc != NULL)
- fmd_hdl_strfree(hdl, fruloc);
-}
-
-cmd_branch_t *
-cmd_branch_create(fmd_hdl_t *hdl, nvlist_t *asru)
-{
- cmd_branch_t *branch;
- const char *b_unum;
-
- if ((b_unum = cmd_fmri_get_unum(asru)) == NULL) {
- CMD_STAT_BUMP(bad_mem_asru);
- return (NULL);
- }
-
- fmd_hdl_debug(hdl, "branch_create: creating new branch %s\n", b_unum);
- CMD_STAT_BUMP(branch_creat);
-
- branch = fmd_hdl_zalloc(hdl, sizeof (cmd_branch_t), FMD_SLEEP);
- branch->branch_nodetype = CMD_NT_BRANCH;
- branch->branch_version = CMD_BRANCH_VERSION;
-
- cmd_bufname(branch->branch_bufname, sizeof (branch->branch_bufname),
- "branch_%s", b_unum);
- cmd_fmri_init(hdl, &branch->branch_asru, asru, "branch_asru_%s",
- b_unum);
-
- (void) nvlist_lookup_string(branch->branch_asru_nvl, FM_FMRI_MEM_UNUM,
- (char **)&branch->branch_unum);
-
- cmd_list_append(&cmd.cmd_branches, branch);
- cmd_branch_dirty(hdl, branch);
-
- return (branch);
-}
-
-cmd_branch_t *
-cmd_branch_lookup_by_unum(fmd_hdl_t *hdl, const char *unum)
-{
- cmd_branch_t *branch;
-
- fmd_hdl_debug(hdl, "branch_lookup: dimm_unum %s", unum);
- /*
- * fbr/fbu unum dimm does not have a J number
- */
- if (strstr(unum, "J") != NULL)
- return (NULL);
-
- for (branch = cmd_list_next(&cmd.cmd_branches); branch != NULL;
- branch = cmd_list_next(branch)) {
- if (strcmp(branch->branch_unum, unum) == 0)
- return (branch);
- }
-
- fmd_hdl_debug(hdl, "branch_lookup_by_unum: no branch is found\n");
- return (NULL);
-}
-
-cmd_branch_t *
-cmd_branch_lookup(fmd_hdl_t *hdl, nvlist_t *asru)
-{
- cmd_branch_t *branch;
- const char *unum;
-
- if ((unum = cmd_fmri_get_unum(asru)) == NULL) {
- CMD_STAT_BUMP(bad_mem_asru);
- return (NULL);
- }
-
- for (branch = cmd_list_next(&cmd.cmd_branches); branch != NULL;
- branch = cmd_list_next(branch)) {
- if (strcmp(branch->branch_unum, unum) == 0)
- return (branch);
- }
-
- fmd_hdl_debug(hdl, "cmd_branch_lookup: discarding old \n");
- return (NULL);
-}
-
-static cmd_branch_t *
-branch_wrapv0(fmd_hdl_t *hdl, cmd_branch_pers_t *pers, size_t psz)
-{
- cmd_branch_t *branch;
-
- if (psz != sizeof (cmd_branch_pers_t)) {
- fmd_hdl_abort(hdl, "size of state doesn't match size of "
- "version 0 state (%u bytes).\n",
- sizeof (cmd_branch_pers_t));
- }
-
- branch = fmd_hdl_zalloc(hdl, sizeof (cmd_branch_t), FMD_SLEEP);
- bcopy(pers, branch, sizeof (cmd_branch_pers_t));
- fmd_hdl_free(hdl, pers, psz);
- return (branch);
-}
-
-void *
-cmd_branch_restore(fmd_hdl_t *hdl, fmd_case_t *cp, cmd_case_ptr_t *ptr)
-{
- cmd_branch_t *branch;
- size_t branchsz;
-
-
- for (branch = cmd_list_next(&cmd.cmd_branches); branch != NULL;
- branch = cmd_list_next(branch)) {
- if (strcmp(branch->branch_bufname, ptr->ptr_name) == 0)
- break;
- }
-
- if (branch == NULL) {
- fmd_hdl_debug(hdl, "restoring branch from %s\n", ptr->ptr_name);
-
- if ((branchsz = fmd_buf_size(hdl, NULL, ptr->ptr_name)) == 0) {
- fmd_hdl_abort(hdl, "branch referenced by case %s does "
- "not exist in saved state\n",
- fmd_case_uuid(hdl, cp));
- } else if (branchsz > CMD_BRANCH_MAXSIZE ||
- branchsz < CMD_BRANCH_MINSIZE) {
- fmd_hdl_abort(hdl,
- "branch buffer referenced by case %s "
- "is out of bounds (is %u bytes, max %u, min %u)\n",
- fmd_case_uuid(hdl, cp), branchsz,
- CMD_BRANCH_MAXSIZE, CMD_BRANCH_MINSIZE);
- }
-
- if ((branch = cmd_buf_read(hdl, NULL, ptr->ptr_name,
- branchsz)) == NULL) {
- fmd_hdl_abort(hdl, "failed to read branch buf %s",
- ptr->ptr_name);
- }
-
- fmd_hdl_debug(hdl, "found %d in version field\n",
- branch->branch_version);
-
- switch (branch->branch_version) {
- case CMD_BRANCH_VERSION_0:
- branch = branch_wrapv0(hdl,
- (cmd_branch_pers_t *)branch, branchsz);
- break;
- default:
- fmd_hdl_abort(hdl, "unknown version (found %d) "
- "for branch state referenced by case %s.\n",
- branch->branch_version, fmd_case_uuid(hdl,
- cp));
- break;
- }
-
- cmd_fmri_restore(hdl, &branch->branch_asru);
-
- if ((errno = nvlist_lookup_string(branch->branch_asru_nvl,
- FM_FMRI_MEM_UNUM, (char **)&branch->branch_unum)) != 0)
- fmd_hdl_abort(hdl, "failed to retrieve unum from asru");
-
-
- cmd_list_append(&cmd.cmd_branches, branch);
- }
-
- switch (ptr->ptr_subtype) {
- case CMD_PTR_BRANCH_CASE:
- cmd_mem_case_restore(hdl, &branch->branch_case, cp, "branch",
- branch->branch_unum);
- break;
- default:
- fmd_hdl_abort(hdl, "invalid %s subtype %d\n",
- ptr->ptr_name, ptr->ptr_subtype);
- }
-
- return (branch);
-}
-
-void
-cmd_branch_dirty(fmd_hdl_t *hdl, cmd_branch_t *branch)
-{
- if (fmd_buf_size(hdl, NULL, branch->branch_bufname) !=
- sizeof (cmd_branch_pers_t))
- fmd_buf_destroy(hdl, NULL, branch->branch_bufname);
-
- /* No need to rewrite the FMRIs in the branch - they don't change */
- fmd_buf_write(hdl, NULL, branch->branch_bufname, &branch->branch_pers,
- sizeof (cmd_branch_pers_t));
-}
-
-static void
-branch_dimmlist_free(fmd_hdl_t *hdl, cmd_branch_t *branch)
-{
- cmd_branch_memb_t *bm;
-
- while ((bm = cmd_list_next(&branch->branch_dimms)) != NULL) {
- cmd_list_delete(&branch->branch_dimms, bm);
- fmd_hdl_free(hdl, bm, sizeof (cmd_branch_memb_t));
- }
-}
-
-static void
-branch_free(fmd_hdl_t *hdl, cmd_branch_t *branch, int destroy)
-{
- fmd_hdl_debug(hdl, "Free branch %s\n", branch->branch_unum);
- if (branch->branch_case.cc_cp != NULL) {
- if (destroy) {
- if (branch->branch_case.cc_serdnm != NULL) {
- fmd_serd_destroy(hdl,
- branch->branch_case.cc_serdnm);
- fmd_hdl_strfree(hdl,
- branch->branch_case.cc_serdnm);
- branch->branch_case.cc_serdnm = NULL;
- }
- }
- cmd_case_fini(hdl, branch->branch_case.cc_cp, destroy);
- }
-
- branch_dimmlist_free(hdl, branch);
- cmd_fmri_fini(hdl, &branch->branch_asru, destroy);
-
- if (destroy)
- fmd_buf_destroy(hdl, NULL, branch->branch_bufname);
- cmd_list_delete(&cmd.cmd_branches, branch);
- fmd_hdl_free(hdl, branch, sizeof (cmd_branch_t));
-}
-
-void
-cmd_branch_destroy(fmd_hdl_t *hdl, cmd_branch_t *branch)
-{
- branch_free(hdl, branch, FMD_B_TRUE);
-}
-
-/*ARGSUSED*/
-static int
-branch_exist_cb(topo_hdl_t *thp, tnode_t *node, void *arg)
-{
- char *lbl, *p, *q;
- char cy[BUF_SIZE];
- nvlist_t *rsrc;
- int err;
-
- cmd_branch_t *branch = (cmd_branch_t *)arg;
-
- if (topo_node_resource(node, &rsrc, &err) < 0)
- return (TOPO_WALK_NEXT); /* no label, try next */
-
- if (nvlist_lookup_string(rsrc, "unum", &lbl) != 0) {
- nvlist_free(rsrc);
- return (TOPO_WALK_NEXT);
- }
- /*
- * for branch membership purposes only, remove reference to
- * a riser card (MR%d) if one exists.
- */
- (void) strcpy(cy, lbl);
- if ((p = strstr(cy, "/MR")) != NULL) {
- if ((q = strchr(p + 1, '/')) != NULL)
- (void) strcpy(p, q);
- else
- *p = '\0';
- }
- if (strncmp(branch->branch_unum, cy,
- strlen(branch->branch_unum)) == 0) {
- br_dimmcount++;
- nvlist_free(rsrc);
- return (TOPO_WALK_TERMINATE);
- }
- nvlist_free(rsrc);
- return (TOPO_WALK_NEXT);
-}
-
-static int
-branch_exist(fmd_hdl_t *hdl, cmd_branch_t *branch)
-{
- topo_hdl_t *thp;
- topo_walk_t *twp;
- int err;
-
- if ((thp = fmd_hdl_topo_hold(hdl, TOPO_VERSION)) == NULL)
- return (0);
- if ((twp = topo_walk_init(thp,
- FM_FMRI_SCHEME_MEM, branch_exist_cb, branch, &err))
- == NULL) {
- fmd_hdl_topo_rele(hdl, thp);
- return (0);
- }
- br_dimmcount = 0;
- (void) topo_walk_step(twp, TOPO_WALK_CHILD);
- topo_walk_fini(twp);
- fmd_hdl_topo_rele(hdl, thp);
-
- return (br_dimmcount);
-}
-
-/*
- * If the case has been solved, don't need to check the dimmlist
- * If the case has not been solved, the branch is valid if there is least one
- * existing dimm in the branch
- */
-void
-cmd_branch_validate(fmd_hdl_t *hdl)
-{
- cmd_branch_t *branch, *next;
-
- fmd_hdl_debug(hdl, "cmd_branch_validate\n");
-
- for (branch = cmd_list_next(&cmd.cmd_branches); branch != NULL;
- branch = next) {
- next = cmd_list_next(branch);
- if (branch->branch_case.cc_cp != NULL &&
- fmd_case_solved(hdl, branch->branch_case.cc_cp))
- continue;
- if (branch_exist(hdl, branch))
- continue;
- cmd_branch_destroy(hdl, branch);
- }
-}
-
-void
-cmd_branch_gc(fmd_hdl_t *hdl)
-{
- fmd_hdl_debug(hdl, "cmd_branch_gc\n");
- cmd_branch_validate(hdl);
-}
-
-void
-cmd_branch_fini(fmd_hdl_t *hdl)
-{
- cmd_branch_t *branch;
- fmd_hdl_debug(hdl, "cmd_branch_fini\n");
-
- while ((branch = cmd_list_next(&cmd.cmd_branches)) != NULL)
- branch_free(hdl, branch, FMD_B_FALSE);
-}
diff --git a/usr/src/cmd/fm/modules/sun4v/cpumem-diagnosis/cmd_branch.h b/usr/src/cmd/fm/modules/sun4v/cpumem-diagnosis/cmd_branch.h
deleted file mode 100644
index 451cf5da7f..0000000000
--- a/usr/src/cmd/fm/modules/sun4v/cpumem-diagnosis/cmd_branch.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _CMD_BRANCH_H
-#define _CMD_BRANCH_H
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-/*
- * Memory modules are described by the cmd_branch general-purpose state
- * structure. This structure is used to track FBR errors
- *
- * Data structures:
- *
- * ,--------. ,--------.
- * |branch | <---- |case_ptr| (CMD_PTR_BRANCH_CASE)
- * | | `--------'
- * |,-------| ,-------------.
- * ,->||asru_t | ----> |packed nvlist|
- * | |`-------| `-------------'
- * `--| |
- * | dimms | ----> cmd_branch_memb_t -----> cmd_branch_memb_t -----> ...
- * `--------' | |
- * cmd_dimm_t cmd_dimm_t
- *
- * Data structure P? Case? Notes
- * ---------------- --- ----- ----------------------------------------------
- * cmd_branch_pers_t Yes No Name is derived from the unum ("branch_%s")
- * cmd_case_ptr_t Yes Yes Name is case's UUID
- * branch_asru Yes No Name is derived from the unum
- * ("branch_asru_%d")
- * branch_unum No No Pointer into ASRU - relinked during restore
- * branch_dimms No No Recreated during restore
- */
-
-#include <cmd_mem.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define MAX_CHANNELS_ON_CHIP 4
-#define MAX_DIMMS_IN_CHANNEL 4
-#define BTK_MAX_CHANNEL 2
-#define CMD_BOARDS_CERT 30
-
-typedef struct cmd_branch_memb {
- cmd_list_t bm_list;
- cmd_dimm_t *dimm;
-} cmd_branch_memb_t;
-
-#define CMD_BRANCH_VERSION_0 0
-#define CMD_BRANCH_VERSION CMD_BRANCH_VERSION_0
-
-typedef struct cmd_branch_pers {
- cmd_header_t branchp_header; /* Nodetype must be CMD_NT_BRANCH */
- uint_t branchp_version;
- cmd_fmri_t branchp_asru; /* ASRU for this BRANCH */
- uint_t branchp_flags; /* CMD_MEM_F_* */
-} cmd_branch_pers_t;
-
-struct cmd_branch {
- cmd_branch_pers_t branch_pers;
- const char *branch_unum; /* This BRANCH's name */
- cmd_case_t branch_case; /* Open link errors case against */
- /* this BRANCH */
- cmd_list_t branch_dimms; /* This BRANCH's dimms */
-};
-
-#define CMD_BRANCH_MAXSIZE sizeof (cmd_branch_pers_t)
-#define CMD_BRANCH_MINSIZE sizeof (cmd_branch_pers_t)
-
-#define branch_header branch_pers.branchp_header
-#define branch_nodetype branch_pers.branchp_header.hdr_nodetype
-#define branch_bufname branch_pers.branchp_header.hdr_bufname
-#define branch_version branch_pers.branchp_version
-#define branch_asru branch_pers.branchp_asru
-#define branch_asru_nvl branch_pers.branchp_asru.fmri_nvl
-#define branch_flags branch_pers.branchp_flags
-
-extern cmd_branch_t *cmd_branch_lookup(fmd_hdl_t *, nvlist_t *);
-extern cmd_branch_t *cmd_branch_create(fmd_hdl_t *, nvlist_t *);
-extern cmd_branch_t *cmd_branch_lookup_by_unum(fmd_hdl_t *, const char *);
-
-extern void cmd_branch_create_fault(fmd_hdl_t *, cmd_branch_t *,
- const char *, nvlist_t *);
-extern void cmd_branch_add_dimm(fmd_hdl_t *, cmd_branch_t *, cmd_dimm_t *);
-extern void cmd_branch_remove_dimm(fmd_hdl_t *, cmd_branch_t *, cmd_dimm_t *);
-
-
-extern void *cmd_branch_restore(fmd_hdl_t *, fmd_case_t *, cmd_case_ptr_t *);
-extern void cmd_branch_destroy(fmd_hdl_t *, cmd_branch_t *);
-extern void cmd_branch_validate(fmd_hdl_t *);
-extern void cmd_branch_gc(fmd_hdl_t *);
-extern void cmd_branch_fini(fmd_hdl_t *);
-extern void cmd_branch_dirty(fmd_hdl_t *, cmd_branch_t *);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _CMD_BRANCH_H */
diff --git a/usr/src/cmd/fm/modules/sun4v/cpumem-diagnosis/cmd_cpu_arch.c b/usr/src/cmd/fm/modules/sun4v/cpumem-diagnosis/cmd_cpu_arch.c
deleted file mode 100644
index e6e3bad01f..0000000000
--- a/usr/src/cmd/fm/modules/sun4v/cpumem-diagnosis/cmd_cpu_arch.c
+++ /dev/null
@@ -1,469 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-/*
- * Support routines for managing per-CPU state.
- */
-
-#include <cmd_cpu.h>
-#include <cmd_mem.h>
-#include <cmd.h>
-
-#include <stdio.h>
-#include <string.h>
-#include <strings.h>
-#include <errno.h>
-#include <kstat.h>
-#include <fm/fmd_api.h>
-#include <sys/async.h>
-#include <sys/fm/protocol.h>
-#include <sys/fm/cpu/UltraSPARC-T1.h>
-#include <sys/niagararegs.h>
-#include <cmd_hc_sun4v.h>
-
-int cmd_afsr_check(fmd_hdl_t *, uint64_t, cmd_errcl_t, uint8_t *);
-
-const errdata_t l3errdata =
- { &cmd.cmd_l3data_serd, "l3cachedata", CMD_PTR_CPU_L3DATA };
-const errdata_t n1l2errdata =
- { &cmd.cmd_l2data_serd, "l2cachedata", CMD_PTR_CPU_L2DATA };
-const errdata_t n2ce_l2errdata =
- { &cmd.cmd_l2data_serd, "l2data-c", CMD_PTR_CPU_L2DATA };
-const errdata_t n2ue_l2errdata =
- { &cmd.cmd_l2data_serd, "l2data-u", CMD_PTR_CPU_L2DATA };
-const errdata_t miscregsdata =
- { &cmd.cmd_miscregs_serd, "misc_reg", CMD_PTR_CPU_MISC_REGS };
-const errdata_t dcachedata =
- { &cmd.cmd_dcache_serd, "dcache", CMD_PTR_CPU_DCACHE };
-const errdata_t icachedata =
- { &cmd.cmd_icache_serd, "icache", CMD_PTR_CPU_ICACHE };
-
-static int
-cmd_xr_error_type(cmd_errcl_t clcode)
-{
- if (CMD_ERRCL_ISMISCREGS(clcode))
- return (MISCREGS_ERR);
- else if (CMD_ERRCL_ISL2XXCU(clcode))
- return (L2_ERR);
- else if (CMD_ERRCL_ISL2ND(clcode))
- return (L2ND_ERR);
- else if (CMD_ERRCL_ISMEM(clcode))
- return (MEM_ERR);
- else if (CMD_ERRCL_ISDCDP(clcode))
- return (DCDP_ERR);
- else if (CMD_ERRCL_ISICDP(clcode))
- return (ICDP_ERR);
- else if (CMD_ERRCL_REMOTEL2(clcode))
- return (REMOTE_L2ERR);
- else
- return (UNKNOWN_ERR);
-}
-
-void
-cmd_fill_errdata(cmd_errcl_t clcode, cmd_cpu_t *cpu, cmd_case_t **cc,
- const errdata_t **ed)
-{
- int err_type;
-
- err_type = cmd_xr_error_type(clcode);
- switch (err_type) {
- case MISCREGS_ERR:
- *ed = &miscregsdata;
- *cc = &cpu->cpu_misc_regs;
- break;
- case L2_ERR:
- case REMOTE_L2ERR:
- if (cpu->cpu_type == CPU_ULTRASPARC_T1) {
- *ed = &n1l2errdata;
- *cc = &cpu->cpu_l2data;
- } else {
- if (CMD_ERRCL_ISL2CE(clcode)) {
- *ed = &n2ce_l2errdata;
- *cc = &cpu->cpu_l2data;
- } else {
- *ed = &n2ue_l2errdata;
- *cc = &cpu->cpu_l2data;
- }
- }
- break;
- case DCDP_ERR:
- *ed = &dcachedata;
- *cc = &cpu->cpu_dcache;
- break;
- case ICDP_ERR:
- *ed = &icachedata;
- *cc = &cpu->cpu_icache;
- break;
- /*
- * When an error goes through the train, it requires
- * to have cmd_case_t & errdata_t structures even it is not
- * diagnosed when the error is resolved. Sun4v does
- * does not have a L3 error, but the L3 cpu case was defined,
- * so its data structures are used for the default cases.
- */
- default:
- *ed = &l3errdata;
- *cc = &cpu->cpu_l3data;
- break;
- }
-}
-
-int
-cmd_afar_status_check(uint8_t afar_status, cmd_errcl_t clcode)
-{
-
- /*
- * There is no L2 data for a remote write back
- * cache error in the ereport, so skip the status check
- */
- if (clcode == CMD_ERRCL_WBUE)
- return (0);
-
- if (afar_status == AFLT_STAT_VALID)
- return (0);
- return (-1);
-}
-
-/*
- * Search for the entry that matches the ena and the AFAR
- * if we have a valid AFAR, otherwise search for the entry
- * that its's ena is < delta ENA.
- */
-/*ARGSUSED*/
-cmd_xxcu_trw_t *
-cmd_trw_lookup(uint64_t ena, uint8_t afar_status, uint64_t afar)
-{
- int i;
-
- if (afar_status == AFLT_STAT_VALID) {
- for (i = 0; i < cmd.cmd_xxcu_ntrw; i++) {
- if (cmd.cmd_xxcu_trw[i].trw_ena != 0) {
- if ((llabs(ena - cmd.cmd_xxcu_trw[i].trw_ena) <
- cmd.cmd_delta_ena) &&
- (cmd.cmd_xxcu_trw[i].trw_afar == afar))
- return (&cmd.cmd_xxcu_trw[i]);
- }
- }
- }
-
- for (i = 0; i < cmd.cmd_xxcu_ntrw; i++) {
- if (cmd.cmd_xxcu_trw[i].trw_ena != 0) {
- if (llabs(ena - cmd.cmd_xxcu_trw[i].trw_ena)
- < cmd.cmd_delta_ena)
- return (&cmd.cmd_xxcu_trw[i]);
- }
- }
-
- return (NULL);
-}
-
-cmd_errcl_t
-cmd_get_nextbit(cmd_errcl_t trw_mask)
-{
- cmd_errcl_t tmp_mask = 0;
- cmd_errcl_t tmp;
- int i;
-
- for (i = 0; i < 64; i++) {
- tmp = (0x0000000000000001ULL << i);
- if (tmp & trw_mask) {
- tmp_mask = tmp;
- break;
- }
- }
- return (tmp_mask);
-}
-
-/*
- * For a resolved error, its error code will be paired with
- * each error code in the train mask and compared against the
- * pre-defined trains in the cmd_cpu.c to determine if the error
- * is in the train.
- */
-cmd_errcl_t
-cmd_combine_two_train(cmd_errcl_t trw_mask, cmd_errcl_t resolved_err)
-{
- cmd_errcl_t tmp_mask = 0;
- cmd_errcl_t train_mask = 0;
- cmd_errcl_t cause = 0;
- cmd_errcl_t error_mask = trw_mask ^ resolved_err;
-
- while (error_mask) {
- tmp_mask = cmd_get_nextbit(error_mask);
- if (tmp_mask == 0)
- break;
- train_mask = tmp_mask | resolved_err;
- cause = cmd_xxcu_train_match(train_mask);
- if (cause) {
- return (cause);
- }
- error_mask = error_mask ^ tmp_mask;
- }
- return (0);
-}
-
-cmd_errcl_t
-cmd_train_match(cmd_errcl_t trw_mask, cmd_errcl_t resolved_err)
-{
- return (cmd_combine_two_train(trw_mask, resolved_err));
-}
-
-int
-cmd_xr_fill(fmd_hdl_t *hdl, nvlist_t *nvl, cmd_xr_t *xr, cmd_errcl_t clcode)
-{
- uint64_t niagara_l2_afsr = 0;
- int errtype;
-
- errtype = cmd_xr_error_type(clcode);
- /*
- * skip the fill data for the errors which is not L2 errors.
- */
- if (errtype != L2_ERR) {
- fmd_hdl_debug(hdl, "Skip fill L2 data for errtype %d\n",
- errtype);
- return (0);
- }
-
- if (nvlist_lookup_uint64(nvl, FM_EREPORT_PAYLOAD_NAME_L2_AFSR,
- &niagara_l2_afsr) != 0 &&
- nvlist_lookup_uint64(nvl, FM_EREPORT_PAYLOAD_NAME_L2_ESR,
- &niagara_l2_afsr) != 0) {
- fmd_hdl_debug(hdl, "No L2 AFSR data");
- return (-1);
- }
- if (nvlist_lookup_uint64(nvl, FM_EREPORT_PAYLOAD_NAME_L2_AFAR,
- &xr->xr_afar) != 0 &&
- nvlist_lookup_uint64(nvl, FM_EREPORT_PAYLOAD_NAME_L2_EAR,
- &xr->xr_afar) != 0) {
- fmd_hdl_debug(hdl, "No L2 AFAR data");
- return (-1);
- }
- if (nvlist_lookup_uint32(nvl, FM_EREPORT_PAYLOAD_NAME_L2_SYND,
- &xr->xr_synd) != 0) {
- /* Niagara-2 doesn't provide separate (redundant) l2-synd */
- xr->xr_synd = niagara_l2_afsr & NI2_L2AFSR_SYND;
- }
-
- if (cmd_afsr_check(hdl, niagara_l2_afsr, clcode,
- &xr->xr_synd_status) != 0) {
- fmd_hdl_debug(hdl, "Invalid L2 syndrome");
- return (-1);
- }
-
- xr->xr_afar_status = xr->xr_synd_status;
- return (0);
-}
-
-int
-cmd_cpu_synd_check(uint32_t synd, cmd_errcl_t clcode)
-{
- int i;
-
- /*
- * Niagara L2 fetches from a memory location containing a UE
- * are given a poison syndrome in one or more 7 bit subsyndromes
- * each covering one of 4 4 byte checkwords.
- *
- * 0 is an invalid syndrome because it denotes no error, but
- * is associated with an ereport -- meaning there WAS an error.
- */
- /*
- * HW does not store the syndrome value for write-back cache
- * error, so skip the synd check for L2 write-back error
- */
- if (CMD_ERRCL_L2UE_WRITEBACK(clcode))
- return (0);
-
- if (synd == 0)
- return (-1);
-
- for (i = 0; i < 4; i++) {
- if (((synd >> i*NI_L2_POISON_SYND_SIZE) &
- NI_L2_POISON_SYND_MASK) == NI_L2_POISON_SYND_FROM_DAU)
- return (-1);
- }
- return (0);
-}
-
-int
-cmd_afsr_check(fmd_hdl_t *hdl, uint64_t afsr,
- cmd_errcl_t clcode, uint8_t *stat_val)
-{
- /*
- * Set Niagara afar and synd validity.
- * For a given set of error registers, the payload value is valid iff
- * no higher priority error status bit is set. See niagararegs.h
- * for error status bit values and priority settings.
- */
- switch (clcode) {
- case CMD_ERRCL_LDAU:
- case CMD_ERRCL_LDSU:
- case CMD_ERRCL_DL2U:
- case CMD_ERRCL_IL2U:
- *stat_val =
- ((afsr & NI_L2AFSR_P02) == 0) ?
- AFLT_STAT_VALID: AFLT_STAT_INVALID;
- break;
- case CMD_ERRCL_LDWU:
- *stat_val =
- ((afsr & NI_L2AFSR_P03) == 0) ?
- AFLT_STAT_VALID : AFLT_STAT_INVALID;
- break;
- case CMD_ERRCL_LDRU:
- *stat_val =
- ((afsr & NI_L2AFSR_P04) == 0) ?
- AFLT_STAT_VALID : AFLT_STAT_INVALID;
- break;
- case CMD_ERRCL_LDAC:
- case CMD_ERRCL_LDSC:
- *stat_val =
- ((afsr & NI_L2AFSR_P08) == 0) ?
- AFLT_STAT_VALID : AFLT_STAT_INVALID;
- break;
- case CMD_ERRCL_LDWC:
- *stat_val =
- ((afsr & NI_L2AFSR_P09) == 0) ?
- AFLT_STAT_VALID : AFLT_STAT_INVALID;
- break;
- case CMD_ERRCL_LDRC:
- *stat_val =
- ((afsr & NI_L2AFSR_P10) == 0) ?
- AFLT_STAT_VALID : AFLT_STAT_INVALID;
- break;
- default:
- fmd_hdl_debug(hdl, "Niagara unrecognized l2cache error\n");
- return (-1);
- }
- return (0);
-}
-
-
-int
-cmd_afar_valid(fmd_hdl_t *hdl, nvlist_t *nvl, cmd_errcl_t clcode,
- uint64_t *afar)
-{
- uint64_t niagara_l2_afsr = 0;
- uint8_t stat_val;
-
- /*
- * In Niagara-1, we carried forward the register names afsr and afar
- * in ereports from sun4u, even though the hardware registers were
- * named esr and ear respectively. In Niagara-2 we decided to conform
- * to the hardware names.
- */
-
- if (nvlist_lookup_uint64(nvl, FM_EREPORT_PAYLOAD_NAME_L2_AFSR,
- &niagara_l2_afsr) != 0 &&
- nvlist_lookup_uint64(nvl, FM_EREPORT_PAYLOAD_NAME_L2_ESR,
- &niagara_l2_afsr) != 0)
- return (-1);
-
- if (cmd_afsr_check(hdl, niagara_l2_afsr, clcode, &stat_val) != 0)
- return (-1);
-
- if (stat_val == AFLT_STAT_VALID) {
- if (nvlist_lookup_uint64(nvl,
- FM_EREPORT_PAYLOAD_NAME_L2_AFAR, afar) == 0 ||
- nvlist_lookup_uint64(nvl,
- FM_EREPORT_PAYLOAD_NAME_L2_EAR, afar) == 0)
- return (0);
- }
- return (-1);
-}
-
-/*
- * sun4v cmd_cpu_get_frustr expects a 'cpufru' element in 'detector' FMRI
- * of ereport (which is stored as 'asru' of cmd_cpu_t). For early sun4v,
- * this was mistakenly spec'ed as "hc://MB" instead of "hc:///component=MB",
- * so this situation must be remediated when found.
- */
-
-char *
-cmd_cpu_getfrustr(fmd_hdl_t *hdl, cmd_cpu_t *cp)
-{
- char *frustr;
- nvlist_t *asru = cp->cpu_asru_nvl;
-
- if (nvlist_lookup_string(asru, FM_FMRI_CPU_CPUFRU, &frustr) == 0) {
- fmd_hdl_debug(hdl, "cmd_cpu_getfrustr: cpufru=%s\n", frustr);
- if (strncmp(frustr, CPU_FRU_FMRI,
- sizeof (CPU_FRU_FMRI) -1) == 0)
- return (fmd_hdl_strdup(hdl, frustr, FMD_SLEEP));
- else {
- char *s1, *s2;
- size_t frustrlen;
-
- s2 = strstr(frustr, "MB");
- if ((s2 == NULL) || strcmp(s2, EMPTY_STR) == 0) {
- fmd_hdl_debug(hdl,
- "cmd_cpu_getfrustr: no cpufru");
- return (NULL);
- }
- frustrlen = strlen(s2) + sizeof (CPU_FRU_FMRI);
- s1 = fmd_hdl_alloc(hdl, frustrlen, FMD_SLEEP);
- s1 = strcpy(s1, CPU_FRU_FMRI);
- s1 = strcat(s1, s2);
- fmd_hdl_debug(hdl, "cmd_cpu_getfrustr frustr=%s\n", s1);
- return (s1);
- }
- }
- (void) cmd_set_errno(ENOENT);
- return (NULL);
-}
-
-char *
-cmd_cpu_getpartstr(fmd_hdl_t *hdl, cmd_cpu_t *cp) {
- char *partstr;
- nvlist_t *asru = cp->cpu_asru_nvl;
-
- if (nvlist_lookup_string(asru, FM_FMRI_HC_PART, &partstr) == 0)
- return (fmd_hdl_strdup(hdl, partstr, FMD_SLEEP));
- else
- return (NULL);
-}
-
-char *
-cmd_cpu_getserialstr(fmd_hdl_t *hdl, cmd_cpu_t *cp) {
- char *serialstr;
- nvlist_t *asru = cp->cpu_asru_nvl;
-
- if (nvlist_lookup_string(asru, FM_FMRI_HC_SERIAL_ID, &serialstr) == 0)
- return (fmd_hdl_strdup(hdl, serialstr, FMD_SLEEP));
- else
- return (NULL);
-}
-
-nvlist_t *
-cmd_cpu_mkfru(fmd_hdl_t *hdl, char *frustr, char *serialstr, char *partstr)
-{
-
- nvlist_t *fru;
- if (strncmp(frustr, CPU_FRU_FMRI, sizeof (CPU_FRU_FMRI) - 1) != 0)
- return (NULL);
- fru = cmd_mkboard_fru(hdl, frustr, serialstr, partstr);
- return (fru);
-}
diff --git a/usr/src/cmd/fm/modules/sun4v/cpumem-diagnosis/cmd_hc_sun4v.c b/usr/src/cmd/fm/modules/sun4v/cpumem-diagnosis/cmd_hc_sun4v.c
deleted file mode 100644
index 967db9daef..0000000000
--- a/usr/src/cmd/fm/modules/sun4v/cpumem-diagnosis/cmd_hc_sun4v.c
+++ /dev/null
@@ -1,646 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-
-#include <fm/fmd_api.h>
-#include <fm/libtopo.h>
-#include <sys/fm/protocol.h>
-#include <cmd.h>
-#include <string.h>
-#include <cmd_hc_sun4v.h>
-
-/* Using a global variable is safe because the DE is single threaded */
-
-nvlist_t *dimm_nvl;
-nvlist_t *mb_nvl;
-nvlist_t *rsc_nvl;
-
-nvlist_t *
-cmd_fault_add_location(fmd_hdl_t *hdl, nvlist_t *flt, const char *locstr) {
-
- char *t, *s;
-
- if (nvlist_lookup_string(flt, FM_FAULT_LOCATION, &t) == 0)
- return (flt); /* already has location value */
-
- /* Replace occurrence of ": " with "/" to avoid confusing ILOM. */
- t = fmd_hdl_zalloc(hdl, strlen(locstr) + 1, FMD_SLEEP);
- s = strstr(locstr, ": ");
- if (s != NULL) {
- (void) strncpy(t, locstr, s - locstr);
- (void) strcat(t, "/");
- (void) strcat(t, s + 2);
- } else {
- (void) strcpy(t, locstr);
- }
-
- /* Also, remove any J number from end of this string. */
- s = strstr(t, "/J");
- if (s != NULL)
- *s = '\0';
-
- if (nvlist_add_string(flt, FM_FAULT_LOCATION, t) != 0)
- fmd_hdl_error(hdl, "unable to alloc location for fault\n");
- fmd_hdl_free(hdl, t, strlen(locstr) + 1);
- return (flt);
-}
-
-typedef struct tr_ent {
- const char *nac_component;
- const char *hc_component;
-} tr_ent_t;
-
-static tr_ent_t tr_tbl[] = {
- { "MB", "motherboard" },
- { "CPU", "cpuboard" },
- { "MEM", "memboard" },
- { "CMP", "chip" },
- { "BR", "branch" },
- { "CH", "dram-channel" },
- { "R", "rank" },
- { "D", "dimm" }
-};
-
-#define tr_tbl_n sizeof (tr_tbl) / sizeof (tr_ent_t)
-
-int
-map_name(const char *p) {
- int i;
-
- for (i = 0; i < tr_tbl_n; i++) {
- if (strncmp(p, tr_tbl[i].nac_component,
- strlen(tr_tbl[i].nac_component)) == 0)
- return (i);
- }
- return (-1);
-}
-
-int
-cmd_count_components(const char *str, char sep)
-{
- int num = 0;
- const char *cptr = str;
-
- if (*cptr == sep) cptr++; /* skip initial sep */
- if (strlen(cptr) > 0) num = 1;
- while ((cptr = strchr(cptr, sep)) != NULL) {
- cptr++;
- if (cptr == NULL || strcmp(cptr, "") == 0) break;
- if (map_name(cptr) >= 0) num++;
- }
- return (num);
-}
-
-/*
- * This version of breakup_components assumes that all component names which
- * it sees are of the form: <nonnumeric piece><numeric piece>
- * i.e. no embedded numerals in component name which have to be spelled out.
- */
-
-int
-cmd_breakup_components(char *str, char *sep, nvlist_t **hc_nvl)
-{
- char namebuf[64], instbuf[64];
- char *token, *tokbuf;
- int i, j, namelen, instlen;
-
- i = 0;
- for (token = strtok_r(str, sep, &tokbuf);
- token != NULL;
- token = strtok_r(NULL, sep, &tokbuf)) {
- namelen = strcspn(token, "0123456789");
- instlen = strspn(token+namelen, "0123456789");
- (void) strncpy(namebuf, token, namelen);
- namebuf[namelen] = '\0';
-
- if ((j = map_name(namebuf)) < 0)
- continue; /* skip names that don't map */
-
- if (instlen == 0) {
- (void) strncpy(instbuf, "0", 2);
- } else {
- (void) strncpy(instbuf, token+namelen, instlen);
- instbuf[instlen] = '\0';
- }
- if (nvlist_add_string(hc_nvl[i], FM_FMRI_HC_NAME,
- tr_tbl[j].hc_component) != 0 ||
- nvlist_add_string(hc_nvl[i], FM_FMRI_HC_ID, instbuf) != 0)
- return (-1);
- i++;
- }
- return (1);
-}
-
-char *
-cmd_getfru_loc(fmd_hdl_t *hdl, nvlist_t *asru) {
-
- char *fru_loc, *cpufru;
- if (nvlist_lookup_string(asru, FM_FMRI_CPU_CPUFRU, &cpufru) == 0) {
- fru_loc = strstr(cpufru, "MB");
- if (fru_loc != NULL) {
- fmd_hdl_debug(hdl, "cmd_getfru_loc: fruloc=%s\n",
- fru_loc);
- return (fmd_hdl_strdup(hdl, fru_loc, FMD_SLEEP));
- }
- }
- fmd_hdl_debug(hdl, "cmd_getfru_loc: Default fruloc=empty string\n");
- return (fmd_hdl_strdup(hdl, EMPTY_STR, FMD_SLEEP));
-}
-
-nvlist_t *
-cmd_mkboard_fru(fmd_hdl_t *hdl, char *frustr, char *serialstr, char *partstr) {
-
- char *nac, *nac_name;
- int n, i, len;
- nvlist_t *fru, **hc_list;
-
- if (frustr == NULL)
- return (NULL);
-
- if ((nac_name = strstr(frustr, "MB")) == NULL)
- return (NULL);
-
- len = strlen(nac_name) + 1;
-
- nac = fmd_hdl_zalloc(hdl, len, FMD_SLEEP);
- (void) strcpy(nac, nac_name);
-
- n = cmd_count_components(nac, '/');
-
- fmd_hdl_debug(hdl, "cmd_mkboard_fru: nac=%s components=%d\n", nac, n);
-
- hc_list = fmd_hdl_zalloc(hdl, sizeof (nvlist_t *)*n, FMD_SLEEP);
-
- for (i = 0; i < n; i++) {
- (void) nvlist_alloc(&hc_list[i],
- NV_UNIQUE_NAME|NV_UNIQUE_NAME_TYPE, 0);
- }
-
- if (cmd_breakup_components(nac, "/", hc_list) < 0) {
- for (i = 0; i < n; i++) {
- nvlist_free(hc_list[i]);
- }
- fmd_hdl_free(hdl, hc_list, sizeof (nvlist_t *)*n);
- fmd_hdl_free(hdl, nac, len);
- return (NULL);
- }
-
- if (nvlist_alloc(&fru, NV_UNIQUE_NAME, 0) != 0) {
- for (i = 0; i < n; i++) {
- nvlist_free(hc_list[i]);
- }
- fmd_hdl_free(hdl, hc_list, sizeof (nvlist_t *)*n);
- fmd_hdl_free(hdl, nac, len);
- return (NULL);
- }
-
- if (nvlist_add_uint8(fru, FM_VERSION, FM_HC_SCHEME_VERSION) != 0 ||
- nvlist_add_string(fru, FM_FMRI_SCHEME, FM_FMRI_SCHEME_HC) != 0 ||
- nvlist_add_string(fru, FM_FMRI_HC_ROOT, "") != 0 ||
- nvlist_add_uint32(fru, FM_FMRI_HC_LIST_SZ, n) != 0 ||
- nvlist_add_nvlist_array(fru, FM_FMRI_HC_LIST, hc_list, n) != 0) {
- for (i = 0; i < n; i++) {
- nvlist_free(hc_list[i]);
- }
- fmd_hdl_free(hdl, hc_list, sizeof (nvlist_t *)*n);
- fmd_hdl_free(hdl, nac, len);
- nvlist_free(fru);
- return (NULL);
- }
-
- for (i = 0; i < n; i++) {
- nvlist_free(hc_list[i]);
- }
- fmd_hdl_free(hdl, hc_list, sizeof (nvlist_t *)*n);
- fmd_hdl_free(hdl, nac, len);
-
- if ((serialstr != NULL &&
- nvlist_add_string(fru, FM_FMRI_HC_SERIAL_ID, serialstr) != 0) ||
- (partstr != NULL &&
- nvlist_add_string(fru, FM_FMRI_HC_PART, partstr) != 0)) {
- nvlist_free(fru);
- return (NULL);
- }
-
- return (fru);
-}
-
-nvlist_t *
-cmd_boardfru_create_fault(fmd_hdl_t *hdl, nvlist_t *asru, const char *fltnm,
- uint_t cert, char *loc)
-{
- nvlist_t *flt, *nvlfru;
- char *serialstr, *partstr;
-
- if ((loc == NULL) || (strcmp(loc, EMPTY_STR) == 0))
- return (NULL);
-
- if (nvlist_lookup_string(asru, FM_FMRI_HC_SERIAL_ID, &serialstr) != 0)
- serialstr = NULL;
- if (nvlist_lookup_string(asru, FM_FMRI_HC_PART, &partstr) != 0)
- partstr = NULL;
-
- nvlfru = cmd_mkboard_fru(hdl, loc, serialstr, partstr);
- if (nvlfru == NULL)
- return (NULL);
-
- flt = cmd_nvl_create_fault(hdl, fltnm, cert, nvlfru, nvlfru, NULL);
- flt = cmd_fault_add_location(hdl, flt, loc);
- nvlist_free(nvlfru);
- return (flt);
-}
-
-/* find_mb -- find hardware platform motherboard within libtopo */
-
-/* ARGSUSED */
-static int
-find_mb(topo_hdl_t *thp, tnode_t *node, void *arg)
-{
- int err;
- nvlist_t *rsrc, **hcl;
- char *name;
- uint_t n;
-
- if (topo_node_resource(node, &rsrc, &err) < 0) {
- return (TOPO_WALK_NEXT); /* no resource, try next */
- }
-
- if (nvlist_lookup_nvlist_array(rsrc, FM_FMRI_HC_LIST, &hcl, &n) < 0) {
- nvlist_free(rsrc);
- return (TOPO_WALK_NEXT);
- }
-
- if (nvlist_lookup_string(hcl[0], FM_FMRI_HC_NAME, &name) != 0) {
- nvlist_free(rsrc);
- return (TOPO_WALK_NEXT);
- }
-
- if (strcmp(name, "motherboard") != 0) {
- nvlist_free(rsrc);
- return (TOPO_WALK_NEXT); /* not MB hc list, try next */
- }
-
- (void) nvlist_dup(rsrc, &mb_nvl, NV_UNIQUE_NAME);
-
- nvlist_free(rsrc);
- return (TOPO_WALK_TERMINATE); /* if no space, give up */
-}
-
-/* init_mb -- read hardware platform motherboard from libtopo */
-
-nvlist_t *
-init_mb(fmd_hdl_t *hdl)
-{
- topo_hdl_t *thp;
- topo_walk_t *twp;
- int err;
-
- if ((thp = fmd_hdl_topo_hold(hdl, TOPO_VERSION)) == NULL)
- return (NULL);
- if ((twp = topo_walk_init(thp,
- FM_FMRI_SCHEME_HC, find_mb, NULL, &err))
- == NULL) {
- fmd_hdl_topo_rele(hdl, thp);
- return (NULL);
- }
- (void) topo_walk_step(twp, TOPO_WALK_CHILD);
- topo_walk_fini(twp);
- fmd_hdl_topo_rele(hdl, thp);
- return (mb_nvl);
-}
-
-/*ARGSUSED*/
-static int
-find_dimm_sn_mem(topo_hdl_t *thp, tnode_t *node, void *arg)
-{
- int err;
- uint_t n;
- nvlist_t *rsrc;
- char **sn;
-
- if (topo_node_resource(node, &rsrc, &err) < 0) {
- return (TOPO_WALK_NEXT); /* no resource, try next */
- }
- if (nvlist_lookup_string_array(rsrc,
- FM_FMRI_HC_SERIAL_ID, &sn, &n) != 0) {
- nvlist_free(rsrc);
- return (TOPO_WALK_NEXT);
- }
- if (strcmp(*sn, (char *)arg) != 0) {
- nvlist_free(rsrc);
- return (TOPO_WALK_NEXT);
- }
- (void) nvlist_dup(rsrc, &dimm_nvl, NV_UNIQUE_NAME);
- nvlist_free(rsrc);
- return (TOPO_WALK_TERMINATE); /* if no space, give up */
-}
-
-/*ARGSUSED*/
-static int
-find_dimm_sn_hc(topo_hdl_t *thp, tnode_t *node, void *arg)
-{
- int err;
- nvlist_t *fru;
- char *sn;
-
- if (topo_node_fru(node, &fru, 0, &err) < 0) {
- return (TOPO_WALK_NEXT); /* no fru, try next */
- }
- if (nvlist_lookup_string(fru, FM_FMRI_HC_SERIAL_ID, &sn) != 0) {
- nvlist_free(fru);
- return (TOPO_WALK_NEXT);
- }
- if (strcmp(sn, (char *)arg) != 0) {
- nvlist_free(fru);
- return (TOPO_WALK_NEXT);
- }
- (void) nvlist_dup(fru, &dimm_nvl, NV_UNIQUE_NAME);
- nvlist_free(fru);
- return (TOPO_WALK_TERMINATE); /* if no space, give up */
-}
-
-/* cmd_find_dimm_by_sn -- find fmri by sn from libtopo */
-
-nvlist_t *
-cmd_find_dimm_by_sn(fmd_hdl_t *hdl, char *schemename, char *sn)
-{
- topo_hdl_t *thp;
- topo_walk_t *twp;
- int err;
-
- dimm_nvl = NULL;
-
- if ((thp = fmd_hdl_topo_hold(hdl, TOPO_VERSION)) == NULL)
- return (NULL);
- if (strcmp(schemename, FM_FMRI_SCHEME_MEM) == 0) {
- if ((twp = topo_walk_init(thp,
- schemename, find_dimm_sn_mem, sn, &err)) == NULL) {
- fmd_hdl_topo_rele(hdl, thp);
- return (NULL);
- }
- } else {
- if ((twp = topo_walk_init(thp,
- schemename, find_dimm_sn_hc, sn, &err)) == NULL) {
- fmd_hdl_topo_rele(hdl, thp);
- return (NULL);
- }
- }
- (void) topo_walk_step(twp, TOPO_WALK_CHILD);
- topo_walk_fini(twp);
- fmd_hdl_topo_rele(hdl, thp);
- return (dimm_nvl);
-}
-
-typedef struct cpuid {
- char serial[100];
- char id[10];
-} cpuid_t;
-
-/*ARGSUSED*/
-static int
-find_cpu_rsc_by_sn(topo_hdl_t *thp, tnode_t *node, void *arg)
-{
- int err;
- nvlist_t *rsc;
- cpuid_t *rscid = (cpuid_t *)arg;
- char *sn, *name, *id;
- nvlist_t **hcl;
- uint_t n;
-
- if (topo_node_resource(node, &rsc, &err) < 0) {
- return (TOPO_WALK_NEXT); /* no rsc, try next */
- }
-
- if (nvlist_lookup_string(rsc, FM_FMRI_HC_SERIAL_ID, &sn) != 0) {
- nvlist_free(rsc);
- return (TOPO_WALK_NEXT);
- }
- if (strcmp(rscid->serial, sn) != 0) {
- nvlist_free(rsc);
- return (TOPO_WALK_NEXT);
- }
-
- if (nvlist_lookup_nvlist_array(rsc, FM_FMRI_HC_LIST, &hcl, &n) != 0) {
- nvlist_free(rsc);
- return (TOPO_WALK_NEXT);
- }
-
- if ((nvlist_lookup_string(hcl[n - 1], FM_FMRI_HC_NAME, &name) != 0) ||
- (nvlist_lookup_string(hcl[n - 1], FM_FMRI_HC_ID, &id) != 0)) {
- nvlist_free(rsc);
- return (TOPO_WALK_NEXT);
- }
-
- if ((strcmp(name, "cpu") != 0) || (strcmp(rscid->id, id) != 0)) {
- nvlist_free(rsc);
- return (TOPO_WALK_NEXT);
- }
-
- (void) nvlist_dup(rsc, &rsc_nvl, NV_UNIQUE_NAME);
-
- nvlist_free(rsc);
- return (TOPO_WALK_TERMINATE); /* if no space, give up */
-}
-
-nvlist_t *
-cmd_find_cpu_rsc_by_sn(fmd_hdl_t *hdl, cpuid_t *cpuid)
-{
- topo_hdl_t *thp;
- topo_walk_t *twp;
- int err;
-
- rsc_nvl = NULL;
- if ((thp = fmd_hdl_topo_hold(hdl, TOPO_VERSION)) == NULL)
- return (NULL);
- if ((twp = topo_walk_init(thp, FM_FMRI_SCHEME_HC,
- find_cpu_rsc_by_sn, cpuid, &err)) == NULL) {
- fmd_hdl_topo_rele(hdl, thp);
- return (NULL);
- }
- (void) topo_walk_step(twp, TOPO_WALK_CHILD);
- topo_walk_fini(twp);
- fmd_hdl_topo_rele(hdl, thp);
- return (rsc_nvl);
-}
-
-nvlist_t *
-get_cpu_fault_resource(fmd_hdl_t *hdl, nvlist_t *asru)
-{
- uint32_t cpu;
- uint64_t serint;
- char serial[64];
- nvlist_t *rsc = NULL;
- cpuid_t cpuid;
- char strid[10];
-
- if (nvlist_lookup_uint64(asru, FM_FMRI_CPU_SERIAL_ID, &serint) != 0 ||
- nvlist_lookup_uint32(asru, FM_FMRI_CPU_ID, &cpu) != 0)
- return (rsc);
-
- (void) snprintf(serial, sizeof (serial), "%llx", serint);
- (void) snprintf(strid, sizeof (strid), "%d", cpu);
-
- (void) strcpy(cpuid.serial, serial);
- (void) strcpy(cpuid.id, strid);
-
- rsc = cmd_find_cpu_rsc_by_sn(hdl, &cpuid);
- return (rsc);
-}
-
-/*ARGSUSED*/
-static int
-find_mem_rsc_hc(topo_hdl_t *thp, tnode_t *node, void *arg)
-{
- int err;
- nvlist_t *rsc;
- char *sn;
-
- if (topo_node_resource(node, &rsc, &err) < 0) {
- return (TOPO_WALK_NEXT); /* no rsc, try next */
- }
- if (nvlist_lookup_string(rsc, FM_FMRI_HC_SERIAL_ID, &sn) != 0) {
- nvlist_free(rsc);
- return (TOPO_WALK_NEXT);
- }
- if (strcmp(sn, (char *)arg) != 0) {
- nvlist_free(rsc);
- return (TOPO_WALK_NEXT);
- }
- (void) nvlist_dup(rsc, &rsc_nvl, NV_UNIQUE_NAME);
- nvlist_free(rsc);
- return (TOPO_WALK_TERMINATE); /* if no space, give up */
-}
-
-nvlist_t *
-cmd_find_mem_rsc_by_sn(fmd_hdl_t *hdl, char *sn)
-{
- topo_hdl_t *thp;
- topo_walk_t *twp;
- int err;
-
- rsc_nvl = NULL;
-
- if ((thp = fmd_hdl_topo_hold(hdl, TOPO_VERSION)) == NULL)
- return (NULL);
- if ((twp = topo_walk_init(thp, FM_FMRI_SCHEME_HC,
- find_mem_rsc_hc, sn, &err)) == NULL) {
- fmd_hdl_topo_rele(hdl, thp);
- return (NULL);
- }
- (void) topo_walk_step(twp, TOPO_WALK_CHILD);
- topo_walk_fini(twp);
- fmd_hdl_topo_rele(hdl, thp);
- return (rsc_nvl);
-}
-
-nvlist_t *
-get_mem_fault_resource(fmd_hdl_t *hdl, nvlist_t *fru)
-{
- char *sn;
- uint_t n;
- char **snarray;
-
- if (nvlist_lookup_string(fru, FM_FMRI_HC_SERIAL_ID, &sn) == 0)
- return (cmd_find_mem_rsc_by_sn(hdl, sn));
-
- /*
- * T1 platform fru is in mem scheme
- */
- if (nvlist_lookup_string_array(fru, FM_FMRI_MEM_SERIAL_ID,
- &snarray, &n) == 0)
- return (cmd_find_mem_rsc_by_sn(hdl, snarray[0]));
-
- return (NULL);
-}
-
-int
-is_T1_platform(nvlist_t *asru)
-{
- char *unum;
- if (nvlist_lookup_string(asru, FM_FMRI_MEM_UNUM, &unum) == 0) {
- if (strstr(unum, "BR") == NULL)
- return (1);
- }
- return (0);
-}
-
-nvlist_t *
-cmd_nvl_create_fault(fmd_hdl_t *hdl, const char *class, uint8_t cert,
- nvlist_t *asru, nvlist_t *fru, nvlist_t *rsrc)
-{
- nvlist_t *fllist;
- uint64_t offset, phyaddr;
- nvlist_t *hsp = NULL;
-
- rsrc = NULL;
- (void) nvlist_add_nvlist(fru, FM_FMRI_AUTHORITY,
- cmd.cmd_auth); /* not an error if this fails */
-
- if (strstr(class, "fault.memory.") != NULL) {
- /*
- * For T1 platform fault.memory.bank and fault.memory.dimm,
- * do not issue the hc schmem for resource and fru
- */
- if (is_T1_platform(asru) && (strstr(class, ".page") == NULL)) {
- fllist = fmd_nvl_create_fault(hdl, class, cert, asru,
- fru, fru);
- return (fllist);
- }
-
- rsrc = get_mem_fault_resource(hdl, fru);
- /*
- * Need to append the phyaddr & offset into the
- * hc-specific of the fault.memory.page resource
- */
- if ((rsrc != NULL) && strstr(class, ".page") != NULL) {
- if (nvlist_alloc(&hsp, NV_UNIQUE_NAME, 0) == 0) {
- if (nvlist_lookup_uint64(asru,
- FM_FMRI_MEM_PHYSADDR, &phyaddr) == 0)
- (void) (nvlist_add_uint64(hsp,
- FM_FMRI_MEM_PHYSADDR,
- phyaddr));
-
- if (nvlist_lookup_uint64(asru,
- FM_FMRI_MEM_OFFSET, &offset) == 0)
- (void) nvlist_add_uint64(hsp,
- FM_FMRI_HC_SPECIFIC_OFFSET, offset);
-
- (void) nvlist_add_nvlist(rsrc,
- FM_FMRI_HC_SPECIFIC, hsp);
- }
- }
- fllist = fmd_nvl_create_fault(hdl, class, cert, asru,
- fru, rsrc);
- nvlist_free(hsp);
- } else {
- rsrc = get_cpu_fault_resource(hdl, asru);
- fllist = fmd_nvl_create_fault(hdl, class, cert, asru,
- fru, rsrc);
- }
-
- nvlist_free(rsrc);
-
- return (fllist);
-}
diff --git a/usr/src/cmd/fm/modules/sun4v/cpumem-diagnosis/cmd_hc_sun4v.h b/usr/src/cmd/fm/modules/sun4v/cpumem-diagnosis/cmd_hc_sun4v.h
deleted file mode 100644
index f2388df3e4..0000000000
--- a/usr/src/cmd/fm/modules/sun4v/cpumem-diagnosis/cmd_hc_sun4v.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _CMD_HC_SUN4V_H
-#define _CMD_HC_SUN4V_H
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include <fm/fmd_api.h>
-#include <sys/nvpair.h>
-#include <cmd_cpu.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define CPUBOARD "MB/CPU"
-#define EMPTY_STR "-"
-
-extern nvlist_t *cmd_fault_add_location(fmd_hdl_t *, nvlist_t *, const char *);
-extern nvlist_t *cmd_boardfru_create_fault(fmd_hdl_t *, nvlist_t *,
- const char *, uint_t, char *);
-extern nvlist_t *init_mb(fmd_hdl_t *);
-extern nvlist_t *cmd_find_dimm_by_sn(fmd_hdl_t *, char *, char *);
-extern char *cmd_getfru_loc(fmd_hdl_t *, nvlist_t *);
-extern int cmd_count_components(const char *, char sep);
-extern int cmd_breakup_components(char *, char *, nvlist_t **);
-extern nvlist_t *cmd_mkboard_fru(fmd_hdl_t *, char *, char *, char *);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _CMD_HC_SUN4V_H */
diff --git a/usr/src/cmd/fm/modules/sun4v/cpumem-diagnosis/cmd_memerr_arch.c b/usr/src/cmd/fm/modules/sun4v/cpumem-diagnosis/cmd_memerr_arch.c
deleted file mode 100644
index d784fb4c91..0000000000
--- a/usr/src/cmd/fm/modules/sun4v/cpumem-diagnosis/cmd_memerr_arch.c
+++ /dev/null
@@ -1,769 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- */
-
-/*
- * Ereport-handling routines for memory errors
- */
-
-#include <cmd_mem.h>
-#include <cmd_dimm.h>
-#include <cmd_bank.h>
-#include <cmd_page.h>
-#include <cmd_cpu.h>
-#include <cmd_branch.h>
-#include <cmd_state.h>
-#include <cmd.h>
-#include <cmd_hc_sun4v.h>
-
-#include <assert.h>
-#include <strings.h>
-#include <string.h>
-#include <errno.h>
-#include <unistd.h>
-#include <fm/fmd_api.h>
-#include <sys/fm/ldom.h>
-#include <sys/fm/protocol.h>
-
-#include <sys/fm/cpu/UltraSPARC-T1.h>
-#include <sys/mdesc.h>
-#include <sys/async.h>
-#include <sys/errclassify.h>
-#include <sys/niagararegs.h>
-#include <sys/fm/ldom.h>
-#include <ctype.h>
-
-#define VF_TS3_FCR 0x000000000000FFFFULL
-#define VF_L2ESYR_C2C 0x8000000000000000ULL
-#define OFFBIT 0xFFFFFFFFFFFC07FFULL
-#define BIT28_32 0x00000001F0000000ULL
-#define BIT13_17 0x000000000003E000ULL
-#define BIT18_19 0x00000000000C0000ULL
-#define BIT11_12 0x0000000000001800ULL
-#define UTS2_CPUS_PER_CHIP 64
-#define FBR_ERROR ".fbr"
-#define DSU_ERROR ".dsu"
-#define FERG_INVALID ".invalid"
-#define DBU_ERROR ".dbu"
-
-extern ldom_hdl_t *cpumem_diagnosis_lhp;
-
-static fmd_hdl_t *cpumem_hdl = NULL;
-
-#define ERR_CLASS(x, y) (strcmp(strrchr(x, '.'), y))
-
-static void *
-cpumem_alloc(size_t size)
-{
- assert(cpumem_hdl != NULL);
-
- return (fmd_hdl_alloc(cpumem_hdl, size, FMD_SLEEP));
-}
-
-static void
-cpumem_free(void *addr, size_t size)
-{
- assert(cpumem_hdl != NULL);
-
- fmd_hdl_free(cpumem_hdl, addr, size);
-}
-
-/*ARGSUSED*/
-cmd_evdisp_t
-cmd_mem_synd_check(fmd_hdl_t *hdl, uint64_t afar, uint8_t afar_status,
- uint16_t synd, uint8_t synd_status, cmd_cpu_t *cpu)
-{
- /*
- * Niagara writebacks from L2 containing UEs are placed in memory
- * with the poison syndrome NI_DRAM_POISON_SYND_FROM_LDWU.
- * Memory UE ereports showing this syndrome are dropped because they
- * indicate an L2 problem, which should be diagnosed from the
- * corresponding L2 cache ereport.
- */
- switch (cpu->cpu_type) {
- case CPU_ULTRASPARC_T1:
- if (synd == NI_DRAM_POISON_SYND_FROM_LDWU) {
- fmd_hdl_debug(hdl,
- "discarding UE due to magic syndrome %x\n",
- synd);
- return (CMD_EVD_UNUSED);
- }
- break;
- case CPU_ULTRASPARC_T2:
- case CPU_ULTRASPARC_T2plus:
- if (synd == N2_DRAM_POISON_SYND_FROM_LDWU) {
- fmd_hdl_debug(hdl,
- "discarding UE due to magic syndrome %x\n",
- synd);
- return (CMD_EVD_UNUSED);
- }
- break;
- default:
- break;
- }
- return (CMD_EVD_OK);
-}
-
-static int
-cpu_present(fmd_hdl_t *hdl, nvlist_t *asru, uint32_t *cpuid)
-{
- nvlist_t *cp_asru;
- uint32_t i;
-
- if (nvlist_dup(asru, &cp_asru, 0) != 0) {
- fmd_hdl_debug(hdl, "unable to alloc asru for thread\n");
- return (-1);
- }
-
- for (i = *cpuid; i < *cpuid + UTS2_CPUS_PER_CHIP; i++) {
-
- (void) nvlist_remove_all(cp_asru, FM_FMRI_CPU_ID);
-
- if (nvlist_add_uint32(cp_asru, FM_FMRI_CPU_ID, i) == 0) {
- if (fmd_nvl_fmri_present(hdl, cp_asru) &&
- !fmd_nvl_fmri_unusable(hdl, cp_asru)) {
- nvlist_free(cp_asru);
- *cpuid = i;
- return (0);
- }
- }
- }
- nvlist_free(cp_asru);
- return (-1);
-}
-
-/*ARGSUSED*/
-cmd_evdisp_t
-cmd_c2c(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl, const char *class,
- cmd_errcl_t clcode)
-{
- uint32_t cpuid;
- nvlist_t *det;
- int rc;
-
- (void) nvlist_lookup_nvlist(nvl, FM_EREPORT_DETECTOR, &det);
- if (nvlist_lookup_uint32(det, FM_FMRI_CPU_ID, &cpuid) == 0) {
-
- /*
- * If the c2c bit is set, the sending cache of the
- * cpu must be faulted instead of the memory.
- * If the detector is chip0, the cache of the chip1
- * is faulted and vice versa.
- */
- if (cpuid < UTS2_CPUS_PER_CHIP)
- cpuid = UTS2_CPUS_PER_CHIP;
- else
- cpuid = 0;
-
- rc = cpu_present(hdl, det, &cpuid);
-
- if (rc != -1) {
- (void) nvlist_remove(det, FM_FMRI_CPU_ID,
- DATA_TYPE_UINT32);
- if (nvlist_add_uint32(det,
- FM_FMRI_CPU_ID, cpuid) == 0) {
- clcode |= CMD_CPU_LEVEL_CHIP;
- return (cmd_l2u(hdl, ep, nvl, class, clcode));
- }
-
- }
- }
- fmd_hdl_debug(hdl, "cmd_c2c: no cpuid discarding C2C error");
- return (CMD_EVD_BAD);
-}
-
-/*
- * sun4v's xe_common routine has an extra argument, clcode, compared
- * to routine of same name in sun4u.
- */
-
-static cmd_evdisp_t
-xe_common(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl,
- const char *class, cmd_errcl_t clcode, cmd_xe_handler_f *hdlr)
-{
- uint64_t afar, l2_afar, dram_afar;
- uint64_t l2_afsr, dram_afsr, l2_esyr;
- uint16_t synd;
- uint8_t afar_status, synd_status;
- nvlist_t *rsrc;
- char *typenm;
- uint64_t disp = 0;
- int minorvers = 1;
-
- if (nvlist_lookup_uint64(nvl,
- FM_EREPORT_PAYLOAD_NAME_L2_AFSR, &l2_afsr) != 0 &&
- nvlist_lookup_uint64(nvl,
- FM_EREPORT_PAYLOAD_NAME_L2_ESR, &l2_afsr) != 0)
- return (CMD_EVD_BAD);
-
- if (nvlist_lookup_uint64(nvl,
- FM_EREPORT_PAYLOAD_NAME_DRAM_AFSR, &dram_afsr) != 0 &&
- nvlist_lookup_uint64(nvl,
- FM_EREPORT_PAYLOAD_NAME_DRAM_ESR, &dram_afsr) != 0)
- return (CMD_EVD_BAD);
-
- if (nvlist_lookup_uint64(nvl,
- FM_EREPORT_PAYLOAD_NAME_L2_AFAR, &l2_afar) != 0 &&
- nvlist_lookup_uint64(nvl,
- FM_EREPORT_PAYLOAD_NAME_L2_EAR, &l2_afar) != 0)
- return (CMD_EVD_BAD);
-
- if (nvlist_lookup_uint64(nvl,
- FM_EREPORT_PAYLOAD_NAME_DRAM_AFAR, &dram_afar) != 0 &&
- nvlist_lookup_uint64(nvl,
- FM_EREPORT_PAYLOAD_NAME_DRAM_EAR, &dram_afar) != 0)
- return (CMD_EVD_BAD);
-
- if (nvlist_lookup_pairs(nvl, 0,
- FM_EREPORT_PAYLOAD_NAME_ERR_TYPE, DATA_TYPE_STRING, &typenm,
- FM_EREPORT_PAYLOAD_NAME_RESOURCE, DATA_TYPE_NVLIST, &rsrc,
- NULL) != 0)
- return (CMD_EVD_BAD);
-
- synd = dram_afsr;
-
- /*
- * Niagara afar and synd validity.
- * For a given set of error registers, the payload value is valid if
- * no higher priority error status bit is set. See UltraSPARC-T1.h for
- * error status bit values and priority settings. Note that for DAC
- * and DAU, afar value is taken from l2 error registers, syndrome
- * from dram error * registers; for DSC and DSU, both afar and
- * syndrome are taken from dram * error registers. DSU afar and
- * syndrome are always valid because no
- * higher priority error will override.
- */
- switch (clcode) {
- case CMD_ERRCL_DAC:
- afar = l2_afar;
- afar_status = ((l2_afsr & NI_L2AFSR_P10) == 0) ?
- AFLT_STAT_VALID : AFLT_STAT_INVALID;
- synd_status = ((dram_afsr & NI_DMAFSR_P01) == 0) ?
- AFLT_STAT_VALID : AFLT_STAT_INVALID;
- break;
- case CMD_ERRCL_DSC:
- afar = dram_afar;
- afar_status = ((dram_afsr & NI_DMAFSR_P01) == 0) ?
- AFLT_STAT_VALID : AFLT_STAT_INVALID;
- synd_status = afar_status;
- break;
- case CMD_ERRCL_DAU:
- afar = l2_afar;
- afar_status = ((l2_afsr & NI_L2AFSR_P05) == 0) ?
- AFLT_STAT_VALID : AFLT_STAT_INVALID;
- synd_status = AFLT_STAT_VALID;
-
- if (nvlist_lookup_uint64(nvl, FM_EREPORT_PAYLOAD_NAME_L2_ESYR,
- &l2_esyr) == 0) {
- if (l2_esyr & VF_L2ESYR_C2C) {
- return (cmd_c2c(hdl, ep, nvl, class, clcode));
- }
- }
- break;
- case CMD_ERRCL_DSU:
- afar = dram_afar;
- afar_status = synd_status = AFLT_STAT_VALID;
- break;
- default:
- fmd_hdl_debug(hdl, "Niagara unrecognized mem error %llx\n",
- clcode);
- return (CMD_EVD_UNUSED);
- }
-
- return (hdlr(hdl, ep, nvl, class, afar, afar_status, synd,
- synd_status, cmd_mem_name2type(typenm, minorvers), disp, rsrc));
-}
-
-
-/*ARGSUSED*/
-cmd_evdisp_t
-cmd_ce(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl, const char *class,
- cmd_errcl_t clcode)
-{
- if (strcmp(class, "ereport.cpu.ultraSPARC-T2plus.dsc") == 0)
- return (CMD_EVD_UNUSED); /* drop VF dsc's */
- else
- return (xe_common(hdl, ep, nvl, class, clcode, cmd_ce_common));
-}
-
-/*ARGSUSED*/
-cmd_evdisp_t
-cmd_ue_train(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl, const char *class,
- cmd_errcl_t clcode)
-{
- cmd_evdisp_t rc, rc1;
-
- /*
- * The DAU is cause of the DAU->DCDP/ICDP train:
- * - process the cause of the event.
- * - register the error to the nop event train, so the effected errors
- * (DCDP/ICDP) will be dropped.
- */
- rc = xe_common(hdl, ep, nvl, class, clcode, cmd_ue_common);
-
- rc1 = cmd_xxcu_initial(hdl, ep, nvl, class, clcode, CMD_XR_HDLR_NOP);
- if (rc1 != 0)
- fmd_hdl_debug(hdl,
- "Fail to add error (%llx) to the train, rc = %d",
- clcode, rc1);
-
- return (rc);
-}
-
-/*ARGSUSED*/
-cmd_evdisp_t
-cmd_ue(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl, const char *class,
- cmd_errcl_t clcode)
-{
- if (strcmp(class, "ereport.cpu.ultraSPARC-T2plus.dsu") == 0)
- /*
- * VF dsu's need to be treated like branch errors,
- * because we can't localize to a single DIMM or pair of
- * DIMMs given missing/invalid parts of the dram-ear.
- */
- return (cmd_fb(hdl, ep, nvl, class, clcode));
- else
- return (xe_common(hdl, ep, nvl, class, clcode, cmd_ue_common));
-}
-
-/*ARGSUSED*/
-cmd_evdisp_t
-cmd_frx(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl, const char *class,
- cmd_errcl_t clcode)
-{
- return (CMD_EVD_UNUSED);
-}
-
-
-/*ARGSUSED*/
-cmd_evdisp_t
-cmd_fb(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl, const char *class,
- cmd_errcl_t clcode)
-{
- cmd_branch_t *branch;
- const char *uuid;
- nvlist_t *asru, *det;
- uint64_t ts3_fcr;
-
- if (nvlist_lookup_nvlist(nvl, FM_RSRC_RESOURCE, &asru) < 0) {
- CMD_STAT_BUMP(bad_mem_asru);
- return (CMD_EVD_UNUSED);
- }
-
- if (nvlist_lookup_nvlist(nvl, FM_EREPORT_DETECTOR, &det) < 0) {
- CMD_STAT_BUMP(bad_mem_asru);
- return (CMD_EVD_UNUSED);
- }
-
- if (fmd_nvl_fmri_expand(hdl, det) < 0) {
- fmd_hdl_debug(hdl, "Failed to expand detector");
- return (CMD_EVD_UNUSED);
- }
-
- branch = cmd_branch_lookup(hdl, asru);
- if (branch == NULL) {
- if ((branch = cmd_branch_create(hdl, asru)) == NULL)
- return (CMD_EVD_UNUSED);
- }
-
- if (branch->branch_case.cc_cp != NULL &&
- fmd_case_solved(hdl, branch->branch_case.cc_cp)) {
- fmd_hdl_debug(hdl, "Case solved\n");
- return (CMD_EVD_REDUND);
- }
-
- if (branch->branch_case.cc_cp == NULL) {
- branch->branch_case.cc_cp = cmd_case_create(hdl,
- &branch->branch_header, CMD_PTR_BRANCH_CASE, &uuid);
- }
-
- if (ERR_CLASS(class, FBR_ERROR) == 0) {
- if (nvlist_lookup_uint64(nvl, FM_EREPORT_PAYLOAD_NAME_TS3_FCR,
- &ts3_fcr) == 0 && (ts3_fcr != VF_TS3_FCR)) {
- fmd_hdl_debug(hdl,
- "Processing fbr with lane failover\n");
- cmd_branch_create_fault(hdl, branch,
- "fault.memory.link-f", det);
-
- } else {
- fmd_hdl_debug(hdl, "Adding fbr event to serd engine\n");
- if (branch->branch_case.cc_serdnm == NULL) {
- branch->branch_case.cc_serdnm =
- cmd_mem_serdnm_create(hdl,
- "branch", branch->branch_unum);
-
- fmd_serd_create(hdl,
- branch->branch_case.cc_serdnm,
- fmd_prop_get_int32(hdl, "fbr_n"),
- fmd_prop_get_int64(hdl, "fbr_t"));
- }
-
- if (fmd_serd_record(hdl,
- branch->branch_case.cc_serdnm, ep) == FMD_B_FALSE)
- return (CMD_EVD_OK); /* engine hasn't fired */
-
- fmd_hdl_debug(hdl, "fbr serd fired\n");
-
- fmd_case_add_serd(hdl, branch->branch_case.cc_cp,
- branch->branch_case.cc_serdnm);
-
- cmd_branch_create_fault(hdl, branch,
- "fault.memory.link-c", det);
- }
- } else if (ERR_CLASS(class, DSU_ERROR) == 0) {
- fmd_hdl_debug(hdl, "Processing dsu event");
- cmd_branch_create_fault(hdl, branch, "fault.memory.bank", det);
- } else {
- fmd_hdl_debug(hdl, "Processing fbu event");
- cmd_branch_create_fault(hdl, branch, "fault.memory.link-u",
- det);
- }
-
- branch->branch_flags |= CMD_MEM_F_FAULTING;
-
- if (branch->branch_case.cc_serdnm != NULL) {
- fmd_serd_destroy(hdl, branch->branch_case.cc_serdnm);
- fmd_hdl_strfree(hdl, branch->branch_case.cc_serdnm);
- branch->branch_case.cc_serdnm = NULL;
- }
-
- fmd_case_add_ereport(hdl, branch->branch_case.cc_cp, ep);
- fmd_case_solve(hdl, branch->branch_case.cc_cp);
- cmd_branch_dirty(hdl, branch);
-
- return (CMD_EVD_OK);
-}
-
-/*ARGSUSED*/
-cmd_evdisp_t
-cmd_fb_train(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl, const char *class,
- cmd_errcl_t clcode)
-{
- cmd_evdisp_t rc, rc1;
-
- /*
- * The FBU is cause of the FBU->DCDP/ICDP train:
- * - process the cause of the event.
- * - register the error to the nop event train, so the effected errors
- * (DCDP/ICDP) will be dropped.
- */
- rc = cmd_fb(hdl, ep, nvl, class, clcode);
-
- rc1 = cmd_xxcu_initial(hdl, ep, nvl, class, clcode, CMD_XR_HDLR_NOP);
- if (rc1 != 0)
- fmd_hdl_debug(hdl,
- "Fail to add error (%llx) to the train, rc = %d",
- clcode, rc1);
-
- return (rc);
-}
-
-
-/*ARGSUSED*/
-cmd_evdisp_t
-cmd_fw_defect(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl, const char *class,
- cmd_errcl_t clcode)
-{
- const char *fltclass = NULL;
- nvlist_t *rsc = NULL;
- int solve = 0;
-
- if ((rsc = init_mb(hdl)) == NULL)
- return (CMD_EVD_UNUSED);
-
- if (ERR_CLASS(class, FERG_INVALID) == 0) {
- fltclass = "defect.fw.generic-sparc.erpt-gen";
- } else if (ERR_CLASS(class, DBU_ERROR) == 0) {
- cmd_evdisp_t rc;
- fltclass = "defect.fw.generic-sparc.addr-oob";
- /*
- * add dbu to nop error train
- */
- rc = cmd_xxcu_initial(hdl, ep, nvl, class, clcode,
- CMD_XR_HDLR_NOP);
- if (rc != 0)
- fmd_hdl_debug(hdl,
- "Failed to add error (%llx) to the train, rc = %d",
- clcode, rc);
- } else {
- fmd_hdl_debug(hdl, "Unexpected fw defect event %s", class);
- }
-
- if (fltclass) {
- fmd_case_t *cp = NULL;
- nvlist_t *fault = NULL;
-
- fault = fmd_nvl_create_fault(hdl, fltclass, 100, NULL,
- NULL, rsc);
- if (fault != NULL) {
- cp = fmd_case_open(hdl, NULL);
- fmd_case_add_ereport(hdl, cp, ep);
- fmd_case_add_suspect(hdl, cp, fault);
- fmd_case_solve(hdl, cp);
- solve = 1;
- }
- }
-
- nvlist_free(rsc);
-
- return (solve ? CMD_EVD_OK : CMD_EVD_UNUSED);
-}
-
-void
-cmd_branch_close(fmd_hdl_t *hdl, void *arg)
-{
- cmd_branch_destroy(hdl, arg);
-}
-
-
-/*ARGSUSED*/
-ulong_t
-cmd_mem_get_phys_pages(fmd_hdl_t *hdl)
-{
- /*
- * Compute and return the total physical memory in pages from the
- * MD/PRI.
- * Cache its value.
- */
- static ulong_t npage = 0;
- md_t *mdp;
- mde_cookie_t *listp;
- uint64_t bmem, physmem = 0;
- ssize_t bufsiz = 0;
- uint64_t *bufp;
- int num_nodes, nmblocks, i;
-
- if (npage > 0) {
- return (npage);
- }
-
- if (cpumem_hdl == NULL) {
- cpumem_hdl = hdl;
- }
-
- if ((bufsiz = ldom_get_core_md(cpumem_diagnosis_lhp, &bufp)) <= 0) {
- return (0);
- }
- if ((mdp = md_init_intern(bufp, cpumem_alloc, cpumem_free)) == NULL ||
- (num_nodes = md_node_count(mdp)) <= 0) {
- cpumem_free(bufp, (size_t)bufsiz);
- return (0);
- }
-
- listp = (mde_cookie_t *)cpumem_alloc(sizeof (mde_cookie_t) *
- num_nodes);
- nmblocks = md_scan_dag(mdp, MDE_INVAL_ELEM_COOKIE,
- md_find_name(mdp, "mblock"),
- md_find_name(mdp, "fwd"), listp);
- for (i = 0; i < nmblocks; i++) {
- if (md_get_prop_val(mdp, listp[i], "size", &bmem) < 0) {
- physmem = 0;
- break;
- }
- physmem += bmem;
- }
- npage = (ulong_t)(physmem / cmd.cmd_pagesize);
-
- cpumem_free(listp, sizeof (mde_cookie_t) * num_nodes);
- cpumem_free(bufp, (size_t)bufsiz);
- (void) md_fini(mdp);
-
- return (npage);
-}
-
-static int galois_mul[16][16] = {
-/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
-{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, /* 0 */
-{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}, /* 1 */
-{ 0, 2, 4, 6, 8, 10, 12, 14, 3, 1, 7, 5, 11, 9, 15, 13}, /* 2 */
-{ 0, 3, 6, 5, 12, 15, 10, 9, 11, 8, 13, 14, 7, 4, 1, 2}, /* 3 */
-{ 0, 4, 8, 12, 3, 7, 11, 15, 6, 2, 14, 10, 5, 1, 13, 9}, /* 4 */
-{ 0, 5, 10, 15, 7, 2, 13, 8, 14, 11, 4, 1, 9, 12, 3, 6}, /* 5 */
-{ 0, 6, 12, 10, 11, 13, 7, 1, 5, 3, 9, 15, 14, 8, 2, 4}, /* 6 */
-{ 0, 7, 14, 9, 15, 8, 1, 6, 13, 10, 3, 4, 2, 5, 12, 11}, /* 7 */
-{ 0, 8, 3, 11, 6, 14, 5, 13, 12, 4, 15, 7, 10, 2, 9, 1}, /* 8 */
-{ 0, 9, 1, 8, 2, 11, 3, 10, 4, 13, 5, 12, 6, 15, 7, 14}, /* 9 */
-{ 0, 10, 7, 13, 14, 4, 9, 3, 15, 5, 8, 2, 1, 11, 6, 12}, /* A */
-{ 0, 11, 5, 14, 10, 1, 15, 4, 7, 12, 2, 9, 13, 6, 8, 3}, /* B */
-{ 0, 12, 11, 7, 5, 9, 14, 2, 10, 6, 1, 13, 15, 3, 4, 8}, /* C */
-{ 0, 13, 9, 4, 1, 12, 8, 5, 2, 15, 11, 6, 3, 14, 10, 7}, /* D */
-{ 0, 14, 15, 1, 13, 3, 2, 12, 9, 7, 6, 8, 4, 10, 11, 5}, /* E */
-{ 0, 15, 13, 2, 9, 6, 4, 11, 1, 14, 12, 3, 8, 7, 5, 10} /* F */
-};
-
-static int
-galois_div(int num, int denom)
-{
- int i;
-
- for (i = 0; i < 16; i++) {
- if (galois_mul[denom][i] == num)
- return (i);
- }
- return (-1);
-}
-
-/*
- * Data nibbles N0-N31 => 0-31
- * check nibbles C0-3 => 32-35
- */
-
-int
-cmd_synd2upos(uint16_t syndrome)
-{
- uint16_t s0, s1, s2, s3;
-
- if (syndrome == 0)
- return (-1); /* clean syndrome, not a CE */
-
- s0 = syndrome & 0xF;
- s1 = (syndrome >> 4) & 0xF;
- s2 = (syndrome >> 8) & 0xF;
- s3 = (syndrome >> 12) & 0xF;
-
- if (s3 == 0) {
- if (s2 == 0 && s1 == 0)
- return (32); /* 0 0 0 e => C0 */
- if (s2 == 0 && s0 == 0)
- return (33); /* 0 0 e 0 => C1 */
- if (s1 == 0 && s0 == 0)
- return (34); /* 0 e 0 0 => C2 */
- if (s2 == s1 && s1 == s0)
- return (31); /* 0 d d d => N31 */
- return (-1); /* multibit error */
- } else if (s2 == 0) {
- if (s1 == 0 && s0 == 0)
- return (35); /* e 0 0 0 => C4 */
- if (s1 == 0 || s0 == 0)
- return (-1); /* not a 0 b c */
- if (s3 != galois_div(galois_mul[s1][s1], s0))
- return (-1); /* check nibble not valid */
- return (galois_div(s0, s1) - 1); /* N0 - N14 */
- } else if (s1 == 0) {
- if (s2 == 0 || s0 == 0)
- return (-1); /* not a b 0 c */
- if (s3 != galois_div(galois_mul[s2][s2], s0))
- return (-1); /* check nibble not valid */
- return (galois_div(s0, s2) + 14); /* N15 - N29 */
- } else if (s0 == 0) {
- if (s3 == s2 && s2 == s1)
- return (30); /* d d d 0 => N30 */
- return (-1);
- } else return (-1);
-}
-
-nvlist_t *
-cmd_mem2hc(fmd_hdl_t *hdl, nvlist_t *mem_fmri)
-{
- char **snp;
- uint_t n;
-
- if (nvlist_lookup_string_array(mem_fmri, FM_FMRI_HC_SERIAL_ID,
- &snp, &n) != 0)
- return (NULL); /* doesn't have serial id */
-
- return (cmd_find_dimm_by_sn(hdl, FM_FMRI_SCHEME_HC, *snp));
-}
-
-/*
- * formula to convert an unhashed address to hashed address
- * PA[17:11] = (PA[32:28] xor PA[17:13]) :: ((PA[19:18] xor PA[12:11])
- */
-void
-cmd_to_hashed_addr(uint64_t *addr, uint64_t afar, const char *class)
-{
-
- if (strstr(class, "ultraSPARC-T1") != NULL)
- *addr = afar;
- else {
- *addr = (afar & OFFBIT) |
- ((afar & BIT28_32) >> 15) ^ (afar & BIT13_17) |
- ((afar & BIT18_19) >> 7) ^ (afar & BIT11_12);
- }
-}
-
-int
-cmd_same_datapath_dimms(cmd_dimm_t *d1, cmd_dimm_t *d2)
-{
- char *p, *q;
-
- p = strstr(d1->dimm_unum, "CMP");
- q = strstr(d2->dimm_unum, "CMP");
- if (p != NULL && q != NULL) {
- if (strncmp(p, q, 4) == 0)
- return (1);
- }
- return (0);
-}
-
-/*
- * fault the FRU of the common CMP
- */
-/*ARGSUSED*/
-void
-cmd_gen_datapath_fault(fmd_hdl_t *hdl, cmd_dimm_t *d1, cmd_dimm_t *d2,
- uint16_t upos, nvlist_t *det)
-{
- fmd_case_t *cp;
- char *frustr;
- nvlist_t *rsrc, *fltlist;
- char *s;
- char const *str1, *str2;
- uint_t len, i;
-
- s = strstr(d1->dimm_unum, "CMP");
- if (s == NULL)
- return;
-
- frustr = fmd_hdl_zalloc(hdl, strlen(d1->dimm_unum), FMD_SLEEP);
- len = strlen(d1->dimm_unum) - strlen(s);
-
- if (strncmp(d1->dimm_unum, d2->dimm_unum, len) != 0) {
- for (i = 0, str1 = d1->dimm_unum, str2 = d2->dimm_unum;
- *str1 == *str2 && i <= len;
- str1++, str2++, i++)
- ;
- len = i;
- }
-
- (void) strncpy(frustr, d1->dimm_unum, len);
-
- rsrc = cmd_mkboard_fru(hdl, frustr, NULL, NULL);
-
- fmd_hdl_free(hdl, frustr, strlen(d1->dimm_unum));
-
- if (rsrc == NULL)
- return;
-
- (void) nvlist_add_nvlist(rsrc, FM_FMRI_AUTHORITY, cmd.cmd_auth);
-
- cp = fmd_case_open(hdl, NULL);
-
- fltlist = fmd_nvl_create_fault(hdl, "fault.memory.datapath", 100,
- rsrc, NULL, rsrc);
-
- fmd_case_add_suspect(hdl, cp, fltlist);
- fmd_case_solve(hdl, cp);
-
- nvlist_free(rsrc);
-}
diff --git a/usr/src/cmd/fm/modules/sun4v/cpumem-diagnosis/cpumem-diagnosis.conf b/usr/src/cmd/fm/modules/sun4v/cpumem-diagnosis/cpumem-diagnosis.conf
deleted file mode 100644
index 24bbbacc74..0000000000
--- a/usr/src/cmd/fm/modules/sun4v/cpumem-diagnosis/cpumem-diagnosis.conf
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2005 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-#
-# cpumem-diagnosis
-#
-
-dictionary SUN4V
diff --git a/usr/src/cmd/fm/modules/sun4v/cpumem-retire/Makefile b/usr/src/cmd/fm/modules/sun4v/cpumem-retire/Makefile
deleted file mode 100644
index d956a3ea34..0000000000
--- a/usr/src/cmd/fm/modules/sun4v/cpumem-retire/Makefile
+++ /dev/null
@@ -1,55 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-MODULE = cpumem-retire
-CLASS = arch
-ARCH = sun4v
-SRCS = \
- cma_main.c \
- cma_cpu.c \
- cma_cpu_sun4v.c \
- cma_page.c \
- cma_page_sun4v.c
-
-include ../../Makefile.plugin
-
-CMA_VERSION = "1.1"
-
-CPUMEM_RETIRE_COMMON = ../../common/$(MODULE)
-
-INCDIRS = . \
- $(ROOT)/usr/platform/sun4v/include \
- $(CPUMEM_RETIRE_COMMON)
-
-CPPFLAGS += $(INCDIRS:%=-I%) -DCMA_VERSION='$(CMA_VERSION)' -Dsun4v
-LDFLAGS += -R/usr/lib/fm
-LDLIBS += -L$(ROOTLIB)/fm -lldom -ltopo
-
-%.o: $(CPUMEM_RETIRE_COMMON)/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
-%.ln: $(CPUMEM_RETIRE_COMMON)/%.c
- $(LINT.c) -c $<
diff --git a/usr/src/cmd/fm/modules/sun4v/cpumem-retire/cma_cpu_sun4v.c b/usr/src/cmd/fm/modules/sun4v/cpumem-retire/cma_cpu_sun4v.c
deleted file mode 100644
index a70af3904d..0000000000
--- a/usr/src/cmd/fm/modules/sun4v/cpumem-retire/cma_cpu_sun4v.c
+++ /dev/null
@@ -1,324 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#include <cma.h>
-
-#include <sys/fm/ldom.h>
-#include <sys/fm/protocol.h>
-#include <fm/fmd_fmri.h>
-#include <fm/libtopo.h>
-
-#include <assert.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <strings.h>
-
-#include <sys/types.h>
-#include <sys/processor.h>
-
-extern ldom_hdl_t *cma_lhp;
-
-/*ARGSUSED*/
-int
-cpu_blacklist_cmd(fmd_hdl_t *hdl, nvlist_t *fmri, boolean_t repair)
-{
- if (repair)
- return (ldom_fmri_unblacklist(cma_lhp, fmri));
- else
- return (ldom_fmri_blacklist(cma_lhp, fmri));
-}
-
-int
-cma_cpu_blacklist(fmd_hdl_t *hdl, nvlist_t *nvl, nvlist_t *asru,
- boolean_t repair)
-{
- nvlist_t *fmri;
- int rc, err;
-
- /*
- * Some platforms have special unums for the E$ DIMMs. If we're dealing
- * with a platform that has these unums, one will have been added to the
- * fault as the resource. We'll use that for the blacklisting. If we
- * can't find a resource, we'll fall back to the ASRU.
- */
- if (nvlist_lookup_nvlist(nvl, FM_FAULT_RESOURCE, &fmri) != 0)
- fmri = asru;
-
- rc = cpu_blacklist_cmd(hdl, fmri, repair);
- err = errno;
-
- if (rc < 0 && err != ENOTSUP) {
- errno = err;
- return (-1);
- }
-
- return (0);
-}
-
-/*ARGSUSED*/
-static int
-cpu_cmd(fmd_hdl_t *hdl, nvlist_t *fmri, int cmd)
-{
- int rc = 0;
- char *scheme;
-
- /*
- * We're using topo retire if the fmri is in "hc" scheme.
- */
- if (nvlist_lookup_string(fmri, FM_FMRI_SCHEME, &scheme) == 0 &&
- strcmp(scheme, FM_FMRI_SCHEME_HC) == 0) {
- if (cmd != P_STATUS) {
- errno = EINVAL;
- return (-1);
- }
- rc = fmd_nvl_fmri_service_state(hdl, fmri);
- switch (rc) {
- case FMD_SERVICE_STATE_UNUSABLE:
- return (P_FAULTED);
- case -1:
- return (-1);
- default:
- return (P_ONLINE);
- }
- }
-
- switch (cmd & ~P_FORCED) {
- case P_STATUS:
- rc = ldom_fmri_status(cma_lhp, fmri);
- break;
- case P_FAULTED:
- rc = ldom_fmri_retire(cma_lhp, fmri);
- break;
- case P_ONLINE:
- rc = ldom_fmri_unretire(cma_lhp, fmri);
- break;
- default:
- errno = EINVAL;
- return (-1);
- }
-
- if (rc != P_OFFLINE && rc != P_ONLINE && rc != P_FAULTED) {
- errno = rc;
- return (-1);
- }
-
- return (rc);
-}
-
-void
-cma_cpu_start_retry(fmd_hdl_t *hdl, nvlist_t *fmri, const char *uuid,
- boolean_t repair)
-{
- cma_cpu_t *cpu;
- char *scheme;
- uint_t cpuid;
- nvlist_t *asru = NULL;
- topo_hdl_t *thp;
- int err;
-
- if (repair || nvlist_lookup_string(fmri, FM_FMRI_SCHEME, &scheme) != 0)
- return;
- if (strcmp(scheme, FM_FMRI_SCHEME_CPU) == 0) {
- if (nvlist_lookup_uint32(fmri, FM_FMRI_CPU_ID, &cpuid) != 0)
- return;
- } else if (strcmp(scheme, FM_FMRI_SCHEME_HC) != 0) {
- return;
- } else {
- /* lookup cpuid from ASRU */
- thp = fmd_fmri_topo_hold(TOPO_VERSION);
- if (thp != NULL) {
- (void) topo_fmri_asru(thp, fmri, &asru, &err);
- fmd_fmri_topo_rele(thp);
- }
- if (nvlist_lookup_uint32(asru, FM_FMRI_CPU_ID, &cpuid) != 0) {
- nvlist_free(asru);
- return;
- }
- }
-
- /*
- * check to see if the cpu has been offline.
- */
- fmd_hdl_debug(hdl, "cpu %u is not offline yet - sleeping\n", cpuid);
-
- /*
- * Create a cpu node and add to the head of the cpu list
- */
- cpu = fmd_hdl_zalloc(hdl, sizeof (cma_cpu_t), FMD_SLEEP);
- (void) nvlist_dup(fmri, &cpu->cpu_fmri, 0);
- if (uuid != NULL)
- cpu->cpu_uuid = fmd_hdl_strdup(hdl, uuid, FMD_SLEEP);
-
- cpu->cpuid = cpuid;
- cpu->cpu_next = cma.cma_cpus;
- cma.cma_cpus = cpu;
-
- if (cma.cma_cpu_timerid != 0)
- fmd_timer_remove(hdl, cma.cma_cpu_timerid);
-
- cma.cma_cpu_curdelay = cma.cma_cpu_mindelay;
-
- cma.cma_cpu_timerid =
- fmd_timer_install(hdl, NULL, NULL, cma.cma_cpu_curdelay);
-}
-
-
-int
-cma_cpu_statechange(fmd_hdl_t *hdl, nvlist_t *asru, const char *uuid,
- int cpustate, boolean_t repair)
-{
- int i;
- uint_t cpuid;
-
- if (nvlist_lookup_uint32(asru, FM_FMRI_CPU_ID, &cpuid) != 0) {
- fmd_hdl_debug(hdl, "missing '%s'\n", FM_FMRI_CPU_ID);
- cma_stats.bad_flts.fmds_value.ui64++;
- return (CMA_RA_FAILURE);
- }
-
- /*
- * cpu offlining using ldom_fmri_retire() may be asynchronous, so we
- * have to set the timer and check the cpu status later.
- */
- for (i = 0; i < cma.cma_cpu_tries;
- i++, (void) nanosleep(&cma.cma_cpu_delay, NULL)) {
- if (cpu_cmd(hdl, asru, cpustate) != -1) {
- if (repair)
- cma_stats.cpu_repairs.fmds_value.ui64++;
- else
- cma_stats.cpu_flts.fmds_value.ui64++;
- break;
- }
- }
-
- if (i >= cma.cma_cpu_tries) {
- cma_stats.cpu_fails.fmds_value.ui64++;
- }
-
- cma_cpu_start_retry(hdl, asru, uuid, repair);
-
- return (CMA_RA_FAILURE);
-}
-
-static int
-cpu_retry(fmd_hdl_t *hdl, cma_cpu_t *cpu)
-{
- int rc = 0;
-
- fmd_hdl_debug(hdl, "cpu_retry()\n");
-
- if (cpu->cpu_fmri == NULL) {
- return (1);
- }
-
- if (!fmd_nvl_fmri_present(hdl, cpu->cpu_fmri)) {
- fmd_hdl_debug(hdl, "cpu %u is not present", cpu->cpuid);
- return (1);
- }
-
- rc = cpu_cmd(hdl, cpu->cpu_fmri, P_STATUS);
- if (rc == P_FAULTED || rc == P_OFFLINE) {
- fmd_hdl_debug(hdl, "cpu %u is offlined on retry %u\n",
- cpu->cpuid, cpu->cpu_nretries);
- cma_stats.cpu_flts.fmds_value.ui64++;
-
- if (cpu->cpu_uuid != NULL)
- fmd_case_uuclose(hdl, cpu->cpu_uuid);
- return (1); /* success */
- }
-
- if (rc == -1) {
- fmd_hdl_debug(hdl, "failed to retry cpu %u\n", cpu->cpuid);
- cma_stats.page_fails.fmds_value.ui64++;
- return (1); /* give up */
- }
-
- return (0);
-}
-
-static void
-cma_cpu_free(fmd_hdl_t *hdl, cma_cpu_t *cpu)
-{
- nvlist_free(cpu->cpu_fmri);
- if (cpu->cpu_uuid != NULL)
- fmd_hdl_strfree(hdl, cpu->cpu_uuid);
- fmd_hdl_free(hdl, cpu, sizeof (cma_cpu_t));
-}
-
-void
-cma_cpu_retry(fmd_hdl_t *hdl)
-{
- cma_cpu_t **cpup;
-
- fmd_hdl_debug(hdl, "cma_cpu_retry: timer fired\n");
-
- cma.cma_cpu_timerid = 0;
-
- cpup = &cma.cma_cpus;
- while (*cpup != NULL) {
- cma_cpu_t *cpu = *cpup;
-
- if (cpu_retry(hdl, cpu)) {
- /*
- * Successful retry or we're giving up - remove from
- * the list
- */
- *cpup = cpu->cpu_next;
-
- cma_cpu_free(hdl, cpu);
- } else {
- cpu->cpu_nretries++;
- cpup = &cpu->cpu_next;
- }
- }
-
- if (cma.cma_cpus == NULL)
- return; /* no more cpus */
-
- /*
- * We still have cpus to check. Back the delay
- * off, and schedule a retry.
- */
- cma.cma_cpu_curdelay = MIN(cma.cma_cpu_curdelay * 2,
- cma.cma_cpu_maxdelay);
-
- fmd_hdl_debug(hdl, "scheduled cpu offline retry for %llu secs\n",
- (u_longlong_t)(cma.cma_cpu_curdelay / NANOSEC));
-
- cma.cma_cpu_timerid =
- fmd_timer_install(hdl, NULL, NULL, cma.cma_cpu_curdelay);
-}
-
-void
-cma_cpu_fini(fmd_hdl_t *hdl)
-{
- cma_cpu_t *cpu;
-
- while ((cpu = cma.cma_cpus) != NULL) {
- cma.cma_cpus = cpu->cpu_next;
- cma_cpu_free(hdl, cpu);
- }
-}
diff --git a/usr/src/cmd/fm/modules/sun4v/cpumem-retire/cma_page_sun4v.c b/usr/src/cmd/fm/modules/sun4v/cpumem-retire/cma_page_sun4v.c
deleted file mode 100644
index 867f528119..0000000000
--- a/usr/src/cmd/fm/modules/sun4v/cpumem-retire/cma_page_sun4v.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#include <sys/fm/ldom.h>
-#include <errno.h>
-#include <fm/fmd_api.h>
-#include <fm/fmd_agent.h>
-#include <fm/fmd_fmri.h>
-
-extern ldom_hdl_t *cma_lhp;
-
-/* ARGSUSED */
-int
-cma_fmri_page_service_state(fmd_hdl_t *hdl, nvlist_t *nvl)
-{
- errno = ldom_fmri_status(cma_lhp, nvl);
-
- if (errno == 0 || errno == EINVAL)
- return (FMD_SERVICE_STATE_UNUSABLE);
- if (errno == EAGAIN)
- return (FMD_SERVICE_STATE_ISOLATE_PENDING);
-
- return (FMD_SERVICE_STATE_OK);
-}
-
-/* ARGSUSED */
-int
-cma_fmri_page_retire(fmd_hdl_t *hdl, nvlist_t *nvl)
-{
- errno = ldom_fmri_retire(cma_lhp, nvl);
-
- if (errno == 0 || errno == EIO || errno == EINVAL)
- return (FMD_AGENT_RETIRE_DONE);
- if (errno == EAGAIN)
- return (FMD_AGENT_RETIRE_ASYNC);
-
- return (FMD_AGENT_RETIRE_FAIL);
-}
-
-/* ARGSUSED */
-int
-cma_fmri_page_unretire(fmd_hdl_t *hdl, nvlist_t *nvl)
-{
- errno = ldom_fmri_unretire(cma_lhp, nvl);
-
- if (errno == 0 || errno == EIO)
- return (FMD_AGENT_RETIRE_DONE);
-
- return (FMD_AGENT_RETIRE_FAIL);
-}
diff --git a/usr/src/cmd/fm/modules/sun4v/cpumem-retire/cpumem-retire.conf b/usr/src/cmd/fm/modules/sun4v/cpumem-retire/cpumem-retire.conf
deleted file mode 100644
index 5162fc4da6..0000000000
--- a/usr/src/cmd/fm/modules/sun4v/cpumem-retire/cpumem-retire.conf
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2006 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-#
-# cpumem-retire
-#
-setprop cpu_tries 10
-setprop cpu_delay 1sec
-#
-setprop cpu_ret_mindelay 5sec
-setprop cpu_ret_maxdelay 5min
-#
-setprop page_ret_mindelay 1sec
-setprop page_ret_maxdelay 5min
-#
-setprop cpu_offline_enable true
-setprop cpu_forced_offline true
-setprop cpu_blacklist_enable true
-setprop page_retire_enable true
diff --git a/usr/src/cmd/fm/modules/sun4v/etm/Makefile b/usr/src/cmd/fm/modules/sun4v/etm/Makefile
deleted file mode 100644
index 0e3e1cc8d1..0000000000
--- a/usr/src/cmd/fm/modules/sun4v/etm/Makefile
+++ /dev/null
@@ -1,44 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-MODULE = etm
-CLASS = arch
-ARCH = sun4v
-
-SRCS = etm.c etm_xport_api_dd.c etm_filter.c etm_ckpt.c
-
-include ../../Makefile.plugin
-
-CPPFLAGS += -I$(SRC)/uts/sun4v \
- -I$(SRC)/uts/common \
- -I$(ROOT)/usr/platform/sun4v/include
-LDLIBS += -L$(ROOT)/usr/lib/fm -lldom -ltopo
-LDFLAGS += -R/usr/lib/fm
-
-DYNFLAGS += -R/usr/lib
-
-CERRWARN += -_gcc=-Wno-unused-value
-CERRWARN += -_gcc=-Wno-parentheses
-CERRWARN += $(CNOWARN_UNINIT)
diff --git a/usr/src/cmd/fm/modules/sun4v/etm/Makefile.etm b/usr/src/cmd/fm/modules/sun4v/etm/Makefile.etm
deleted file mode 100644
index 8e205d7125..0000000000
--- a/usr/src/cmd/fm/modules/sun4v/etm/Makefile.etm
+++ /dev/null
@@ -1,70 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-.KEEP_STATE:
-.SUFFIXES:
-
-include ../../../../Makefile.cmd
-
-MODULE = etm
-CLASS = plat
-
-MODCLASS = plugins
-
-#
-#
-CONF = $(MODULE:%=%.conf)
-
-common_ROOTCONF = $(ROOT)/usr/lib/fm/fmd/plugins/$(CONF)
-arch_ROOTCONF = $(ROOT)/usr/platform/$(ARCH)/lib/fm/fmd/plugins/$(CONF)
-plat_ROOTCONF = $(PLATFORMS:%=$(ROOT)/usr/platform/%/lib/fm/fmd/plugins/$(CONF))
-ROOTCONF = $($(CLASS)_ROOTCONF)
-
-sun4v_ROOTPROG = ../../../../../sun4v/lib/fm/fmd/plugins/$(MODULE).so
-plat_ROOTPROG = $(ROOT)/usr/platform/$(PLATFORMS)/lib/fm/fmd/plugins/$(MODULE).so
-
-all:
-
-.NO_PARALLEL:
-.PARALLEL:
-
-clean:
-
-clobber: clean
-
-lint:
-
-install_h:
-
-$(ROOTCONF): $$(@D) $(CONF)
- $(RM) $@
- $(INS) -s -m 0644 -f $(@D) $(CONF)
- $(RM) $(plat_ROOTPROG)
- $(LN) -s $(sun4v_ROOTPROG) $(plat_ROOTPROG)
-
-install: $(ROOTCONF)
-
-include ../../Makefile.rootdirs
diff --git a/usr/src/cmd/fm/modules/sun4v/etm/etm.c b/usr/src/cmd/fm/modules/sun4v/etm/etm.c
deleted file mode 100644
index cde89e5065..0000000000
--- a/usr/src/cmd/fm/modules/sun4v/etm/etm.c
+++ /dev/null
@@ -1,4307 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2010 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * etm.c FMA Event Transport Module implementation, a plugin of FMD
- * for sun4v/Ontario
- *
- * plugin for sending/receiving FMA events to/from service processor
- */
-
-/*
- * --------------------------------- includes --------------------------------
- */
-
-#include <sys/fm/protocol.h>
-#include <sys/fm/util.h>
-#include <sys/fm/ldom.h>
-#include <sys/strlog.h>
-#include <sys/syslog.h>
-#include <sys/libds.h>
-#include <netinet/in.h>
-#include <fm/fmd_api.h>
-
-#include "etm_xport_api.h"
-#include "etm_etm_proto.h"
-#include "etm_impl.h"
-#include "etm_iosvc.h"
-#include "etm_filter.h"
-#include "etm_ckpt.h"
-
-#include <pthread.h>
-#include <signal.h>
-#include <stropts.h>
-#include <locale.h>
-#include <strings.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <limits.h>
-#include <values.h>
-#include <alloca.h>
-#include <errno.h>
-#include <dlfcn.h>
-#include <link.h>
-#include <fcntl.h>
-#include <time.h>
-
-/*
- * ----------------------------- forward decls -------------------------------
- */
-
-static void
-etm_recv(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl, const char *class);
-
-static int
-etm_send(fmd_hdl_t *hdl, fmd_xprt_t *xp, fmd_event_t *event, nvlist_t *nvl);
-
-static void
-etm_send_to_remote_root(void *arg);
-
-static void
-etm_recv_from_remote_root(void *arg);
-
-static void
-etm_ckpt_remove(fmd_hdl_t *hdl, etm_iosvc_q_ele_t *ele);
-
-/*
- * ------------------------- data structs for FMD ----------------------------
- */
-
-static const fmd_hdl_ops_t fmd_ops = {
- etm_recv, /* fmdo_recv */
- NULL, /* fmdo_timeout */
- NULL, /* fmdo_close */
- NULL, /* fmdo_stats */
- NULL, /* fmdo_gc */
- etm_send, /* fmdo_send */
-};
-
-static const fmd_prop_t fmd_props[] = {
- { ETM_PROP_NM_XPORT_ADDRS, FMD_TYPE_STRING, "" },
- { ETM_PROP_NM_DEBUG_LVL, FMD_TYPE_INT32, "0" },
- { ETM_PROP_NM_DEBUG_MAX_EV_CNT, FMD_TYPE_INT32, "-1" },
- { ETM_PROP_NM_CONSOLE, FMD_TYPE_BOOL, "false" },
- { ETM_PROP_NM_SYSLOGD, FMD_TYPE_BOOL, "true" },
- { ETM_PROP_NM_FACILITY, FMD_TYPE_STRING, "LOG_DAEMON" },
- { ETM_PROP_NM_MAX_RESP_Q_LEN, FMD_TYPE_UINT32, "32" },
- { ETM_PROP_NM_BAD_ACC_TO_SEC, FMD_TYPE_UINT32, "1" },
- { ETM_PROP_NM_FMA_RESP_WAIT_TIME, FMD_TYPE_INT32, "240" },
- { NULL, 0, NULL }
-};
-
-
-static const fmd_hdl_info_t fmd_info = {
- "FMA Event Transport Module", "1.2", &fmd_ops, fmd_props
-};
-
-/*
- * ----------------------- private consts and defns --------------------------
- */
-
-/* misc buffer for variable sized protocol header fields */
-
-#define ETM_MISC_BUF_SZ (4 * 1024)
-
-static uint32_t
-etm_ldom_type = LDOM_TYPE_LEGACY;
-
-/* try limit for IO operations w/ capped exp backoff sleep on retry */
-
-/*
- * Design_Note: ETM will potentially retry forever IO operations that the
- * transport fails with EAGAIN (aka EWOULDBLOCK) rather than
- * giving up after some number of seconds. This avoids
- * dropping FMA events while the service processor is down,
- * but at the risk of pending fmdo_recv() forever and
- * overflowing FMD's event queue for ETM.
- * A future TBD enhancement would be to always recv
- * and send each ETM msg in a single read/write() to reduce
- * the risk of failure between ETM msg hdr and body,
- * assuming the MTU_SZ is large enough.
- */
-
-#define ETM_TRY_MAX_CNT (MAXINT - 1)
-#define ETM_TRY_BACKOFF_RATE (4)
-#define ETM_TRY_BACKOFF_CAP (60)
-
-/* amount to increment protocol transaction id on each new send */
-
-#define ETM_XID_INC (2)
-
-typedef struct etm_resp_q_ele {
-
- etm_xport_conn_t rqe_conn; /* open connection to send on */
- etm_proto_v1_pp_t *rqe_hdrp; /* ptr to ETM msg hdr */
- size_t rqe_hdr_sz; /* sizeof ETM msg hdr */
- int32_t rqe_resp_code; /* response code to send */
-
- struct etm_resp_q_ele *rqe_nextp; /* PRIVATE - next ele ptr */
-
-} etm_resp_q_ele_t; /* responder queue element */
-
-/*
- * ---------------------------- global data ----------------------------------
- */
-
-static fmd_hdl_t
-*init_hdl = NULL; /* used in mem allocator and several other places */
-
-static int
-etm_debug_lvl = 0; /* debug level: 0 is off, 1 is on, 2 is more, etc */
-
-static int
-etm_debug_max_ev_cnt = -1; /* max allowed event count for debugging */
-
-static fmd_xprt_t
-*etm_fmd_xprt = NULL; /* FMD transport layer handle */
-
-static pthread_t
-etm_svr_tid = 0; /* thread id of connection acceptance server */
-
-static pthread_t
-etm_resp_tid = 0; /* thread id of msg responder */
-
-static etm_resp_q_ele_t
-*etm_resp_q_head = NULL; /* ptr to cur head of responder queue */
-
-static etm_resp_q_ele_t
-*etm_resp_q_tail = NULL; /* ptr to cur tail of responder queue */
-
-static uint32_t
-etm_resp_q_cur_len = 0; /* cur length (ele cnt) of responder queue */
-
-static uint32_t
-etm_resp_q_max_len = 0; /* max length (ele cnt) of responder queue */
-
-static uint32_t
-etm_bad_acc_to_sec = 0; /* sleep timeout (in sec) after bad conn accept */
-
-static pthread_mutex_t
-etm_resp_q_lock = PTHREAD_MUTEX_INITIALIZER; /* protects responder queue */
-
-static pthread_cond_t
-etm_resp_q_cv = PTHREAD_COND_INITIALIZER; /* nudges msg responder */
-
-static volatile int
-etm_is_dying = 0; /* bool for dying (killing self) */
-
-static uint32_t
-etm_xid_cur = 0; /* current transaction id for sends */
-
-static uint32_t
-etm_xid_ping = 0; /* xid of last CONTROL msg sent requesting ping */
-
-static uint32_t
-etm_xid_ver_negot = 0; /* xid of last CONTROL msg sent requesting ver negot */
-
-static uint32_t
-etm_xid_posted_logged_ev = 0;
- /* xid of last FMA_EVENT msg/event posted OK to FMD */
-
-static uint32_t
-etm_xid_posted_sa = 0; /* xid of last ALERT msg/event posted OK to syslog */
-
-static uint8_t
-etm_resp_ver = ETM_PROTO_V1; /* proto ver [negotiated] for msg sends */
-
-static uint32_t
-etm_fma_resp_wait_time = 30; /* time (sec) wait for fma event resp */
-
-static pthread_mutex_t
-etm_write_lock = PTHREAD_MUTEX_INITIALIZER; /* for write operations */
-
-static log_ctl_t syslog_ctl; /* log(4D) meta-data for each msg */
-static int syslog_facility; /* log(4D) facility (part of priority) */
-static int syslog_logfd = -1; /* log(4D) file descriptor */
-static int syslog_msgfd = -1; /* sysmsg(4D) file descriptor */
-static int syslog_file = 0; /* log to syslog_logfd */
-static int syslog_cons = 0; /* log to syslog_msgfd */
-
-static const struct facility {
- const char *fac_name;
- int fac_value;
-} syslog_facs[] = {
- { "LOG_DAEMON", LOG_DAEMON },
- { "LOG_LOCAL0", LOG_LOCAL0 },
- { "LOG_LOCAL1", LOG_LOCAL1 },
- { "LOG_LOCAL2", LOG_LOCAL2 },
- { "LOG_LOCAL3", LOG_LOCAL3 },
- { "LOG_LOCAL4", LOG_LOCAL4 },
- { "LOG_LOCAL5", LOG_LOCAL5 },
- { "LOG_LOCAL6", LOG_LOCAL6 },
- { "LOG_LOCAL7", LOG_LOCAL7 },
- { NULL, 0 }
-};
-
-static struct stats {
-
- /* ETM msg counters */
-
- fmd_stat_t etm_rd_hdr_fmaevent;
- fmd_stat_t etm_rd_hdr_control;
- fmd_stat_t etm_rd_hdr_alert;
- fmd_stat_t etm_rd_hdr_response;
- fmd_stat_t etm_rd_body_fmaevent;
- fmd_stat_t etm_rd_body_control;
- fmd_stat_t etm_rd_body_alert;
- fmd_stat_t etm_rd_body_response;
- fmd_stat_t etm_wr_hdr_fmaevent;
- fmd_stat_t etm_wr_hdr_control;
- fmd_stat_t etm_wr_hdr_response;
- fmd_stat_t etm_wr_body_fmaevent;
- fmd_stat_t etm_wr_body_control;
- fmd_stat_t etm_wr_body_response;
-
- fmd_stat_t etm_rd_max_ev_per_msg;
- fmd_stat_t etm_wr_max_ev_per_msg;
-
- fmd_stat_t etm_resp_q_cur_len;
- fmd_stat_t etm_resp_q_max_len;
-
- /* ETM byte counters */
-
- fmd_stat_t etm_wr_fmd_bytes;
- fmd_stat_t etm_rd_fmd_bytes;
- fmd_stat_t etm_wr_xport_bytes;
- fmd_stat_t etm_rd_xport_bytes;
-
- fmd_stat_t etm_magic_drop_bytes;
-
- /* ETM [dropped] FMA event counters */
-
- fmd_stat_t etm_rd_fmd_fmaevent;
- fmd_stat_t etm_wr_fmd_fmaevent;
-
- fmd_stat_t etm_rd_drop_fmaevent;
- fmd_stat_t etm_wr_drop_fmaevent;
-
- fmd_stat_t etm_rd_dup_fmaevent;
- fmd_stat_t etm_wr_dup_fmaevent;
-
- fmd_stat_t etm_rd_dup_alert;
- fmd_stat_t etm_wr_dup_alert;
-
- fmd_stat_t etm_enq_drop_resp_q;
- fmd_stat_t etm_deq_drop_resp_q;
-
- /* ETM protocol failures */
-
- fmd_stat_t etm_magic_bad;
- fmd_stat_t etm_ver_bad;
- fmd_stat_t etm_msgtype_bad;
- fmd_stat_t etm_subtype_bad;
- fmd_stat_t etm_xid_bad;
- fmd_stat_t etm_fmaeventlen_bad;
- fmd_stat_t etm_respcode_bad;
- fmd_stat_t etm_timeout_bad;
- fmd_stat_t etm_evlens_bad;
-
- /* IO operation failures */
-
- fmd_stat_t etm_xport_wr_fail;
- fmd_stat_t etm_xport_rd_fail;
- fmd_stat_t etm_xport_pk_fail;
-
- /* IO operation retries */
-
- fmd_stat_t etm_xport_wr_retry;
- fmd_stat_t etm_xport_rd_retry;
- fmd_stat_t etm_xport_pk_retry;
-
- /* system and library failures */
-
- fmd_stat_t etm_os_nvlist_pack_fail;
- fmd_stat_t etm_os_nvlist_unpack_fail;
- fmd_stat_t etm_os_nvlist_size_fail;
- fmd_stat_t etm_os_pthread_create_fail;
-
- /* xport API failures */
-
- fmd_stat_t etm_xport_get_ev_addrv_fail;
- fmd_stat_t etm_xport_open_fail;
- fmd_stat_t etm_xport_close_fail;
- fmd_stat_t etm_xport_accept_fail;
- fmd_stat_t etm_xport_open_retry;
-
- /* FMD entry point bad arguments */
-
- fmd_stat_t etm_fmd_init_badargs;
- fmd_stat_t etm_fmd_fini_badargs;
-
- /* Alert logging errors */
-
- fmd_stat_t etm_log_err;
- fmd_stat_t etm_msg_err;
-
- /* miscellaneous stats */
-
- fmd_stat_t etm_reset_xport;
-
-} etm_stats = {
-
- /* ETM msg counters */
-
- { "etm_rd_hdr_fmaevent", FMD_TYPE_UINT64,
- "ETM fmaevent msg headers rcvd from xport" },
- { "etm_rd_hdr_control", FMD_TYPE_UINT64,
- "ETM control msg headers rcvd from xport" },
- { "etm_rd_hdr_alert", FMD_TYPE_UINT64,
- "ETM alert msg headers rcvd from xport" },
- { "etm_rd_hdr_response", FMD_TYPE_UINT64,
- "ETM response msg headers rcvd from xport" },
- { "etm_rd_body_fmaevent", FMD_TYPE_UINT64,
- "ETM fmaevent msg bodies rcvd from xport" },
- { "etm_rd_body_control", FMD_TYPE_UINT64,
- "ETM control msg bodies rcvd from xport" },
- { "etm_rd_body_alert", FMD_TYPE_UINT64,
- "ETM alert msg bodies rcvd from xport" },
- { "etm_rd_body_response", FMD_TYPE_UINT64,
- "ETM response msg bodies rcvd from xport" },
- { "etm_wr_hdr_fmaevent", FMD_TYPE_UINT64,
- "ETM fmaevent msg headers sent to xport" },
- { "etm_wr_hdr_control", FMD_TYPE_UINT64,
- "ETM control msg headers sent to xport" },
- { "etm_wr_hdr_response", FMD_TYPE_UINT64,
- "ETM response msg headers sent to xport" },
- { "etm_wr_body_fmaevent", FMD_TYPE_UINT64,
- "ETM fmaevent msg bodies sent to xport" },
- { "etm_wr_body_control", FMD_TYPE_UINT64,
- "ETM control msg bodies sent to xport" },
- { "etm_wr_body_response", FMD_TYPE_UINT64,
- "ETM response msg bodies sent to xport" },
-
- { "etm_rd_max_ev_per_msg", FMD_TYPE_UINT64,
- "max FMA events per ETM msg from xport" },
- { "etm_wr_max_ev_per_msg", FMD_TYPE_UINT64,
- "max FMA events per ETM msg to xport" },
-
- { "etm_resp_q_cur_len", FMD_TYPE_UINT64,
- "cur enqueued response msgs to xport" },
- { "etm_resp_q_max_len", FMD_TYPE_UINT64,
- "max enqueable response msgs to xport" },
-
- /* ETM byte counters */
-
- { "etm_wr_fmd_bytes", FMD_TYPE_UINT64,
- "bytes of FMA events sent to FMD" },
- { "etm_rd_fmd_bytes", FMD_TYPE_UINT64,
- "bytes of FMA events rcvd from FMD" },
- { "etm_wr_xport_bytes", FMD_TYPE_UINT64,
- "bytes of FMA events sent to xport" },
- { "etm_rd_xport_bytes", FMD_TYPE_UINT64,
- "bytes of FMA events rcvd from xport" },
-
- { "etm_magic_drop_bytes", FMD_TYPE_UINT64,
- "bytes dropped from xport pre magic num" },
-
- /* ETM [dropped] FMA event counters */
-
- { "etm_rd_fmd_fmaevent", FMD_TYPE_UINT64,
- "FMA events rcvd from FMD" },
- { "etm_wr_fmd_fmaevent", FMD_TYPE_UINT64,
- "FMA events sent to FMD" },
-
- { "etm_rd_drop_fmaevent", FMD_TYPE_UINT64,
- "dropped FMA events from xport" },
- { "etm_wr_drop_fmaevent", FMD_TYPE_UINT64,
- "dropped FMA events to xport" },
-
- { "etm_rd_dup_fmaevent", FMD_TYPE_UINT64,
- "duplicate FMA events rcvd from xport" },
- { "etm_wr_dup_fmaevent", FMD_TYPE_UINT64,
- "duplicate FMA events sent to xport" },
-
- { "etm_rd_dup_alert", FMD_TYPE_UINT64,
- "duplicate ALERTs rcvd from xport" },
- { "etm_wr_dup_alert", FMD_TYPE_UINT64,
- "duplicate ALERTs sent to xport" },
-
- { "etm_enq_drop_resp_q", FMD_TYPE_UINT64,
- "dropped response msgs on enq" },
- { "etm_deq_drop_resp_q", FMD_TYPE_UINT64,
- "dropped response msgs on deq" },
-
- /* ETM protocol failures */
-
- { "etm_magic_bad", FMD_TYPE_UINT64,
- "ETM msgs w/ invalid magic num" },
- { "etm_ver_bad", FMD_TYPE_UINT64,
- "ETM msgs w/ invalid protocol version" },
- { "etm_msgtype_bad", FMD_TYPE_UINT64,
- "ETM msgs w/ invalid message type" },
- { "etm_subtype_bad", FMD_TYPE_UINT64,
- "ETM msgs w/ invalid sub type" },
- { "etm_xid_bad", FMD_TYPE_UINT64,
- "ETM msgs w/ unmatched xid" },
- { "etm_fmaeventlen_bad", FMD_TYPE_UINT64,
- "ETM msgs w/ invalid FMA event length" },
- { "etm_respcode_bad", FMD_TYPE_UINT64,
- "ETM msgs w/ invalid response code" },
- { "etm_timeout_bad", FMD_TYPE_UINT64,
- "ETM msgs w/ invalid timeout value" },
- { "etm_evlens_bad", FMD_TYPE_UINT64,
- "ETM msgs w/ too many event lengths" },
-
- /* IO operation failures */
-
- { "etm_xport_wr_fail", FMD_TYPE_UINT64,
- "xport write failures" },
- { "etm_xport_rd_fail", FMD_TYPE_UINT64,
- "xport read failures" },
- { "etm_xport_pk_fail", FMD_TYPE_UINT64,
- "xport peek failures" },
-
- /* IO operation retries */
-
- { "etm_xport_wr_retry", FMD_TYPE_UINT64,
- "xport write retries" },
- { "etm_xport_rd_retry", FMD_TYPE_UINT64,
- "xport read retries" },
- { "etm_xport_pk_retry", FMD_TYPE_UINT64,
- "xport peek retries" },
-
- /* system and library failures */
-
- { "etm_os_nvlist_pack_fail", FMD_TYPE_UINT64,
- "nvlist_pack failures" },
- { "etm_os_nvlist_unpack_fail", FMD_TYPE_UINT64,
- "nvlist_unpack failures" },
- { "etm_os_nvlist_size_fail", FMD_TYPE_UINT64,
- "nvlist_size failures" },
- { "etm_os_pthread_create_fail", FMD_TYPE_UINT64,
- "pthread_create failures" },
-
- /* transport API failures */
-
- { "etm_xport_get_ev_addrv_fail", FMD_TYPE_UINT64,
- "xport get event addrv API failures" },
- { "etm_xport_open_fail", FMD_TYPE_UINT64,
- "xport open API failures" },
- { "etm_xport_close_fail", FMD_TYPE_UINT64,
- "xport close API failures" },
- { "etm_xport_accept_fail", FMD_TYPE_UINT64,
- "xport accept API failures" },
- { "etm_xport_open_retry", FMD_TYPE_UINT64,
- "xport open API retries" },
-
- /* FMD entry point bad arguments */
-
- { "etm_fmd_init_badargs", FMD_TYPE_UINT64,
- "bad arguments from fmd_init entry point" },
- { "etm_fmd_fini_badargs", FMD_TYPE_UINT64,
- "bad arguments from fmd_fini entry point" },
-
- /* Alert logging errors */
-
- { "etm_log_err", FMD_TYPE_UINT64,
- "failed to log message to log(4D)" },
- { "etm_msg_err", FMD_TYPE_UINT64,
- "failed to log message to sysmsg(4D)" },
-
- /* miscellaneous stats */
-
- { "etm_reset_xport", FMD_TYPE_UINT64,
- "xport resets after xport API failure" }
-};
-
-
-/*
- * -------------------- global data for Root ldom-------------------------
- */
-
-ldom_hdl_t
-*etm_lhp = NULL; /* ldom pointer */
-
-static void *etm_dl_hdl = (void *)NULL;
-static const char *etm_dl_path = "libds.so.1";
-static int etm_dl_mode = (RTLD_NOW | RTLD_LOCAL);
-
-static int(*etm_ds_svc_reg)(ds_capability_t *cap, ds_ops_t *ops) =
- (int (*)(ds_capability_t *cap, ds_ops_t *ops))NULL;
-static int(*etm_ds_clnt_reg)(ds_capability_t *cap, ds_ops_t *ops) =
- (int (*)(ds_capability_t *cap, ds_ops_t *ops))NULL;
-static int(*etm_ds_send_msg)(ds_hdl_t hdl, void *buf, size_t buflen) =
- (int (*)(ds_hdl_t hdl, void *buf, size_t buflen))NULL;
-static int(*etm_ds_recv_msg)(ds_hdl_t hdl, void *buf, size_t buflen,
- size_t *msglen) =
- (int (*)(ds_hdl_t hdl, void *buf, size_t buflen, size_t *msglen))NULL;
-static int (*etm_ds_fini)(void) = (int (*)(void))NULL;
-
-static pthread_mutex_t
-iosvc_list_lock = PTHREAD_MUTEX_INITIALIZER;
-
-static pthread_t
-etm_async_e_tid = 0; /* thread id of io svc async event handler */
-
-static etm_proto_v1_ev_hdr_t iosvc_hdr = {
- ETM_PROTO_MAGIC_NUM, /* magic number */
- ETM_PROTO_V1, /* default to V1, not checked */
- ETM_MSG_TYPE_FMA_EVENT, /* Root Domain inteoduces only FMA events */
- 0, /* sub-type */
- 0, /* pad */
- 0, /* add the xid at the Q send time */
- ETM_PROTO_V1_TIMEOUT_NONE,
- 0 /* ev_lens, 0-termed, after 1 FMA event */
-};
-
-/*
- * static iosvc_list
- */
-static etm_iosvc_t iosvc_list[NUM_OF_ROOT_DOMAINS] = {
- {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0},
- {"", 0}, {"", 0}
-};
-
-static etm_iosvc_t io_svc = {
- "\0", /* ldom_name */
- PTHREAD_COND_INITIALIZER, /* nudges */
- PTHREAD_MUTEX_INITIALIZER, /* protects the iosvc msg Q */
- NULL, /* iosvc msg Q head */
- NULL, /* iosvc msg Q tail */
- 0, /* msg Q current length */
- 100, /* msg Q max length */
- 0, /* current transaction id */
- 0, /* xid of last event posted to FMD */
- DS_INVALID_HDL, /* DS handle */
- NULL, /* fmd xprt handle */
- 0, /* tid 4 send to remote RootDomain */
- 0, /* tid 4 recv from remote RootDomain */
- PTHREAD_COND_INITIALIZER, /* nudges etm_send_to_remote_root */
- PTHREAD_MUTEX_INITIALIZER, /* protects msg_ack_cv */
- 0, /* send/recv threads are not dying */
- 0, /* flag for start sending msg Q */
- 0 /* indicate if the ACK has come */
-};
-etm_iosvc_t *io_svc_p = &io_svc;
-
-
-static uint32_t
-flags; /* flags for fmd_xprt_open */
-
-static etm_async_event_ele_t
-async_event_q[ASYNC_EVENT_Q_SIZE]; /* holds the async events */
-
-static uint32_t
-etm_async_q_head = 0; /* ptr to cur head of async event queue */
-
-static uint32_t
-etm_async_q_tail = 0; /* ptr to cur tail of async event queue */
-
-static uint32_t
-etm_async_q_cur_len = 0; /* cur length (ele cnt) of async event queue */
-
-static uint32_t
-etm_async_q_max_len = ASYNC_EVENT_Q_SIZE;
- /* max length (ele cnt) of async event queue */
-
-static pthread_cond_t
-etm_async_event_q_cv = PTHREAD_COND_INITIALIZER;
- /* nudges async event handler */
-
-static pthread_mutex_t
-etm_async_event_q_lock = PTHREAD_MUTEX_INITIALIZER;
- /* protects async event q */
-
-static ds_ver_t
-etm_iosvc_vers[] = { { 1, 0} };
-
-#define ETM_NVERS (sizeof (etm_iosvc_vers) / sizeof (ds_ver_t))
-
-static ds_capability_t
-iosvc_caps = {
- "ETM", /* svc_id */
- etm_iosvc_vers, /* vers */
- ETM_NVERS /* number of vers */
-};
-
-static void
-etm_iosvc_reg_handler(ds_hdl_t hdl, ds_cb_arg_t arg, ds_ver_t *ver,
- ds_domain_hdl_t did);
-
-static void
-etm_iosvc_unreg_handler(ds_hdl_t hdl, ds_cb_arg_t arg);
-
-static ds_ops_t
-iosvc_ops = {
- etm_iosvc_reg_handler, /* ds_reg_cb */
- etm_iosvc_unreg_handler, /* ds_unreg_cb */
- NULL, /* ds_data_cb */
- NULL /* cb_arg */
-};
-
-
-/*
- * -------------------------- support functions ------------------------------
- */
-
-/*
- * Design_Note: Each failure worth reporting to FMD should be done using
- * a single call to fmd_hdl_error() as it logs an FMA event
- * for each call. Also be aware that all the fmd_hdl_*()
- * format strings currently use platform specific *printf()
- * routines; so "%p" under Solaris does not prepend "0x" to
- * the outputted hex digits, while Linux and VxWorks do.
- */
-
-
-/*
- * etm_show_time - display the current time of day (for debugging) using
- * the given FMD module handle and annotation string
- */
-
-static void
-etm_show_time(fmd_hdl_t *hdl, char *note_str)
-{
- struct timeval tmv; /* timeval */
-
- (void) gettimeofday(&tmv, NULL);
- fmd_hdl_debug(hdl, "info: %s: cur Unix Epoch time %d.%06d\n",
- note_str, tmv.tv_sec, tmv.tv_usec);
-
-} /* etm_show_time() */
-
-/*
- * etm_hexdump - hexdump the given buffer (for debugging) using
- * the given FMD module handle
- */
-
-static void
-etm_hexdump(fmd_hdl_t *hdl, void *buf, size_t byte_cnt)
-{
- uint8_t *bp; /* byte ptr */
- int i, j; /* index */
- char cb[80]; /* char buf */
- unsigned int n; /* a byte of data for sprintf() */
-
- bp = buf;
- j = 0;
-
- /*
- * Design_Note: fmd_hdl_debug() auto adds a newline if missing;
- * hence cb exists to accumulate a longer string.
- */
-
- for (i = 1; i <= byte_cnt; i++) {
- n = *bp++;
- (void) sprintf(&cb[j], "%2.2x ", n);
- j += 3;
- /* add a newline every 16 bytes or at the buffer's end */
- if (((i % 16) == 0) || (i >= byte_cnt)) {
- cb[j-1] = '\0';
- fmd_hdl_debug(hdl, "%s\n", cb);
- j = 0;
- }
- } /* for each byte in the buffer */
-
-} /* etm_hexdump() */
-
-/*
- * etm_sleep - sleep the caller for the given number of seconds,
- * return 0 or -errno value
- *
- * Design_Note: To avoid interfering with FMD's signal mask (SIGALRM)
- * do not use [Solaris] sleep(3C) and instead use
- * pthread_cond_wait() or nanosleep(), both of which
- * are POSIX spec-ed to leave signal masks alone.
- * This is needed for Solaris and Linux (domain and SP).
- */
-
-static int
-etm_sleep(unsigned sleep_sec)
-{
- struct timespec tms; /* for nanosleep() */
-
- tms.tv_sec = sleep_sec;
- tms.tv_nsec = 0;
-
- if (nanosleep(&tms, NULL) < 0) {
- /* errno assumed set by above call */
- return (-errno);
- }
- return (0);
-
-} /* etm_sleep() */
-
-/*
- * etm_conn_open - open a connection to the given transport address,
- * return 0 and the opened connection handle
- * or -errno value
- *
- * caveats: the err_substr is used in failure cases for calling
- * fmd_hdl_error()
- */
-
-static int
-etm_conn_open(fmd_hdl_t *hdl, char *err_substr,
- etm_xport_addr_t addr, etm_xport_conn_t *connp)
-{
- etm_xport_conn_t conn; /* connection to return */
- int nev; /* -errno value */
-
- if ((conn = etm_xport_open(hdl, addr)) == NULL) {
- nev = (-errno);
- fmd_hdl_error(hdl, "error: %s: errno %d\n",
- err_substr, errno);
- etm_stats.etm_xport_open_fail.fmds_value.ui64++;
- return (nev);
- } else {
- *connp = conn;
- return (0);
- }
-} /* etm_conn_open() */
-
-/*
- * etm_conn_close - close the given connection,
- * return 0 or -errno value
- *
- * caveats: the err_substr is used in failure cases for calling
- * fmd_hdl_error()
- */
-
-static int
-etm_conn_close(fmd_hdl_t *hdl, char *err_substr, etm_xport_conn_t conn)
-{
- int nev; /* -errno value */
-
- if (etm_xport_close(hdl, conn) == NULL) {
- nev = (-errno);
- fmd_hdl_error(hdl, "warning: %s: errno %d\n",
- err_substr, errno);
- etm_stats.etm_xport_close_fail.fmds_value.ui64++;
- return (nev);
- } else {
- return (0);
- }
-} /* etm_conn_close() */
-
-/*
- * etm_io_op - perform an IO operation on the given connection
- * with the given buffer,
- * accommodating MTU size and retrying op if needed,
- * return how many bytes actually done by the op
- * or -errno value
- *
- * caveats: the err_substr is used in failure cases for calling
- * fmd_hdl_error()
- */
-
-static ssize_t
-etm_io_op(fmd_hdl_t *hdl, char *err_substr, etm_xport_conn_t conn,
- void *buf, size_t byte_cnt, int io_op)
-{
- ssize_t rv; /* ret val / byte count */
- ssize_t n; /* gen use */
- uint8_t *datap; /* ptr to data */
- size_t mtu_sz; /* MTU size in bytes */
- int (*io_func_ptr)(fmd_hdl_t *, etm_xport_conn_t,
- void *, size_t);
- size_t io_sz; /* byte count for io_func_ptr */
- int try_cnt; /* number of tries done */
- int sleep_sec; /* exp backoff sleep period in sec */
- int sleep_rv; /* ret val from sleeping */
- fmd_stat_t io_retry_stat; /* IO retry stat to update */
- fmd_stat_t io_fail_stat; /* IO failure stat to update */
-
- if ((conn == NULL) || (buf == NULL)) {
- return (-EINVAL);
- }
- switch (io_op) {
- case ETM_IO_OP_RD:
- io_func_ptr = etm_xport_read;
- io_retry_stat = etm_stats.etm_xport_rd_retry;
- io_fail_stat = etm_stats.etm_xport_rd_fail;
- break;
- case ETM_IO_OP_WR:
- io_func_ptr = etm_xport_write;
- io_retry_stat = etm_stats.etm_xport_wr_retry;
- io_fail_stat = etm_stats.etm_xport_wr_fail;
- break;
- default:
- return (-EINVAL);
- }
- if (byte_cnt == 0) {
- return (byte_cnt); /* nop */
- }
-
- /* obtain [current] MTU size */
-
- if ((n = etm_xport_get_opt(hdl, conn, ETM_XPORT_OPT_MTU_SZ)) < 0) {
- mtu_sz = ETM_XPORT_MTU_SZ_DEF;
- } else {
- mtu_sz = n;
- }
-
- /* loop until all IO done, try limit exceeded, or real failure */
-
- rv = 0;
- datap = buf;
- while (rv < byte_cnt) {
- io_sz = MIN((byte_cnt - rv), mtu_sz);
- try_cnt = 0;
- sleep_sec = 0;
-
- /* when give up, return -errno value even if partly done */
-
- while ((n = (*io_func_ptr)(hdl, conn, datap, io_sz)) ==
- (-EAGAIN)) {
- try_cnt++;
- if (try_cnt > ETM_TRY_MAX_CNT) {
- rv = n;
- goto func_ret;
- }
- if (etm_is_dying) {
- rv = (-EINTR);
- goto func_ret;
- }
- if ((sleep_rv = etm_sleep(sleep_sec)) < 0) {
- rv = sleep_rv;
- goto func_ret;
- }
- sleep_sec = ((sleep_sec == 0) ? 1 :
- (sleep_sec * ETM_TRY_BACKOFF_RATE));
- sleep_sec = MIN(sleep_sec, ETM_TRY_BACKOFF_CAP);
- io_retry_stat.fmds_value.ui64++;
- if (etm_debug_lvl >= 1) {
- fmd_hdl_debug(hdl, "info: retrying io op %d "
- "due to EAGAIN\n", io_op);
- }
- } /* while trying the io operation */
-
- if (etm_is_dying) {
- rv = (-EINTR);
- goto func_ret;
- }
- if (n < 0) {
- rv = n;
- goto func_ret;
- }
- /* avoid spinning CPU when given 0 bytes but no error */
- if (n == 0) {
- if ((sleep_rv = etm_sleep(ETM_SLEEP_QUIK)) < 0) {
- rv = sleep_rv;
- goto func_ret;
- }
- }
- rv += n;
- datap += n;
- } /* while still have more data */
-
-func_ret:
-
- if (rv < 0) {
- io_fail_stat.fmds_value.ui64++;
- fmd_hdl_debug(hdl, "error: %s: errno %d\n",
- err_substr, (int)(-rv));
- }
- if (etm_debug_lvl >= 3) {
- fmd_hdl_debug(hdl, "info: io op %d ret %d of %d\n",
- io_op, (int)rv, (int)byte_cnt);
- }
- return (rv);
-
-} /* etm_io_op() */
-
-/*
- * etm_magic_read - read the magic number of an ETM message header
- * from the given connection into the given buffer,
- * return 0 or -errno value
- *
- * Design_Note: This routine is intended to help protect ETM from protocol
- * framing errors as might be caused by an SP reset / crash in
- * the middle of an ETM message send; the connection will be
- * read from for as many bytes as needed until the magic number
- * is found using a sliding buffer for comparisons.
- */
-
-static int
-etm_magic_read(fmd_hdl_t *hdl, etm_xport_conn_t conn, uint32_t *magic_ptr)
-{
- int rv; /* ret val */
- uint32_t magic_num; /* magic number */
- int byte_cnt; /* count of bytes read */
- uint8_t buf5[4+1]; /* sliding input buffer */
- int i, j; /* indices into buf5 */
- ssize_t n; /* gen use */
- uint8_t drop_buf[1024]; /* dropped bytes buffer */
-
- rv = 0; /* assume success */
- magic_num = 0;
- byte_cnt = 0;
- j = 0;
-
- /* magic number bytes are sent in network (big endian) order */
-
- while (magic_num != ETM_PROTO_MAGIC_NUM) {
- if ((n = etm_io_op(hdl, "bad io read on magic",
- conn, &buf5[j], 1, ETM_IO_OP_RD)) < 0) {
- rv = n;
- goto func_ret;
- }
- byte_cnt++;
- j = MIN((j + 1), sizeof (magic_num));
- if (byte_cnt < sizeof (magic_num)) {
- continue;
- }
-
- if (byte_cnt > sizeof (magic_num)) {
- etm_stats.etm_magic_drop_bytes.fmds_value.ui64++;
- i = MIN(byte_cnt - j - 1, sizeof (drop_buf) - 1);
- drop_buf[i] = buf5[0];
- for (i = 0; i < j; i++) {
- buf5[i] = buf5[i+1];
- } /* for sliding the buffer contents */
- }
- (void) memcpy(&magic_num, &buf5[0], sizeof (magic_num));
- magic_num = ntohl(magic_num);
- } /* for reading bytes until find magic number */
-
-func_ret:
-
- if (byte_cnt != sizeof (magic_num)) {
- fmd_hdl_debug(hdl, "warning: bad proto frame "
- "implies corrupt/lost msg(s)\n");
- }
- if ((byte_cnt > sizeof (magic_num)) && (etm_debug_lvl >= 2)) {
- i = MIN(byte_cnt - sizeof (magic_num), sizeof (drop_buf));
- fmd_hdl_debug(hdl, "info: magic drop hexdump "
- "first %d of %d bytes:\n", i,
- byte_cnt - sizeof (magic_num));
- etm_hexdump(hdl, drop_buf, i);
- }
-
- if (rv == 0) {
- *magic_ptr = magic_num;
- }
- return (rv);
-
-} /* etm_magic_read() */
-
-/*
- * etm_hdr_read - allocate, read, and validate a [variable sized]
- * ETM message header from the given connection,
- * return the allocated ETM message header
- * (which is guaranteed to be large enough to reuse as a
- * RESPONSE msg hdr) and its size
- * or NULL and set errno on failure
- */
-
-static void *
-etm_hdr_read(fmd_hdl_t *hdl, etm_xport_conn_t conn, size_t *szp)
-{
- uint8_t *hdrp; /* ptr to header to return */
- size_t hdr_sz; /* sizeof *hdrp */
- etm_proto_v1_pp_t pp; /* protocol preamble */
- etm_proto_v1_ev_hdr_t *ev_hdrp; /* for FMA_EVENT msg */
- etm_proto_v1_ctl_hdr_t *ctl_hdrp; /* for CONTROL msg */
- etm_proto_v1_resp_hdr_t *resp_hdrp; /* for RESPONSE msg */
- etm_proto_v3_sa_hdr_t *sa_hdrp; /* for ALERT msg */
- uint32_t *lenp; /* ptr to FMA event length */
- ssize_t i, n; /* gen use */
- uint8_t misc_buf[ETM_MISC_BUF_SZ]; /* for var sized hdrs */
- int dummy_int; /* dummy var to appease lint */
-
- hdrp = NULL; hdr_sz = 0;
-
- /* read the magic number which starts the protocol preamble */
-
- if ((n = etm_magic_read(hdl, conn, &pp.pp_magic_num)) < 0) {
- errno = (-n);
- etm_stats.etm_magic_bad.fmds_value.ui64++;
- return (NULL);
- }
-
- /* read the rest of the protocol preamble all at once */
-
- if ((n = etm_io_op(hdl, "bad io read on preamble",
- conn, &pp.pp_proto_ver, sizeof (pp) - sizeof (pp.pp_magic_num),
- ETM_IO_OP_RD)) < 0) {
- errno = (-n);
- return (NULL);
- }
-
- /*
- * Design_Note: The magic number was already network decoded; but
- * some other preamble fields also need to be decoded,
- * specifically pp_xid and pp_timeout. The rest of the
- * preamble fields are byte sized and hence need no
- * decoding.
- */
-
- pp.pp_xid = ntohl(pp.pp_xid);
- pp.pp_timeout = ntohl(pp.pp_timeout);
-
- /* sanity check the header as best we can */
-
- if ((pp.pp_proto_ver < ETM_PROTO_V1) ||
- (pp.pp_proto_ver > ETM_PROTO_V3)) {
- fmd_hdl_error(hdl, "error: bad proto ver %d\n",
- (int)pp.pp_proto_ver);
- errno = EPROTO;
- etm_stats.etm_ver_bad.fmds_value.ui64++;
- return (NULL);
- }
-
- dummy_int = pp.pp_msg_type;
- if ((dummy_int <= ETM_MSG_TYPE_TOO_LOW) ||
- (dummy_int >= ETM_MSG_TYPE_TOO_BIG)) {
- fmd_hdl_error(hdl, "error: bad msg type %d", dummy_int);
- errno = EBADMSG;
- etm_stats.etm_msgtype_bad.fmds_value.ui64++;
- return (NULL);
- }
-
- /* handle [var sized] hdrs for FMA_EVENT, CONTROL, RESPONSE msgs */
-
- if (pp.pp_msg_type == ETM_MSG_TYPE_FMA_EVENT) {
-
- ev_hdrp = (void*)&misc_buf[0];
- hdr_sz = sizeof (*ev_hdrp);
- (void) memcpy(&ev_hdrp->ev_pp, &pp, sizeof (pp));
-
- /* sanity check the header's timeout */
-
- if ((ev_hdrp->ev_pp.pp_proto_ver == ETM_PROTO_V1) &&
- (ev_hdrp->ev_pp.pp_timeout != ETM_PROTO_V1_TIMEOUT_NONE)) {
- errno = ETIME;
- etm_stats.etm_timeout_bad.fmds_value.ui64++;
- return (NULL);
- }
-
- /* get all FMA event lengths from the header */
-
- lenp = (uint32_t *)&ev_hdrp->ev_lens[0]; lenp--;
- i = -1; /* cnt of length entries preceding 0 */
- do {
- i++; lenp++;
- if ((sizeof (*ev_hdrp) + (i * sizeof (*lenp))) >=
- ETM_MISC_BUF_SZ) {
- errno = E2BIG; /* ridiculous size */
- etm_stats.etm_evlens_bad.fmds_value.ui64++;
- return (NULL);
- }
- if ((n = etm_io_op(hdl, "bad io read on event len",
- conn, lenp, sizeof (*lenp), ETM_IO_OP_RD)) < 0) {
- errno = (-n);
- return (NULL);
- }
- *lenp = ntohl(*lenp);
-
- } while (*lenp != 0);
- i += 0; /* first len already counted by sizeof(ev_hdr) */
- hdr_sz += (i * sizeof (*lenp));
-
- etm_stats.etm_rd_hdr_fmaevent.fmds_value.ui64++;
-
- } else if (pp.pp_msg_type == ETM_MSG_TYPE_CONTROL) {
-
- ctl_hdrp = (void*)&misc_buf[0];
- hdr_sz = sizeof (*ctl_hdrp);
- (void) memcpy(&ctl_hdrp->ctl_pp, &pp, sizeof (pp));
-
- /* sanity check the header's sub type (control selector) */
-
- if ((ctl_hdrp->ctl_pp.pp_sub_type <= ETM_CTL_SEL_TOO_LOW) ||
- (ctl_hdrp->ctl_pp.pp_sub_type >= ETM_CTL_SEL_TOO_BIG)) {
- fmd_hdl_error(hdl, "error: bad ctl sub type %d\n",
- (int)ctl_hdrp->ctl_pp.pp_sub_type);
- errno = EBADMSG;
- etm_stats.etm_subtype_bad.fmds_value.ui64++;
- return (NULL);
- }
-
- /* get the control length */
-
- if ((n = etm_io_op(hdl, "bad io read on ctl len",
- conn, &ctl_hdrp->ctl_len, sizeof (ctl_hdrp->ctl_len),
- ETM_IO_OP_RD)) < 0) {
- errno = (-n);
- return (NULL);
- }
-
- ctl_hdrp->ctl_len = ntohl(ctl_hdrp->ctl_len);
-
- etm_stats.etm_rd_hdr_control.fmds_value.ui64++;
-
- } else if (pp.pp_msg_type == ETM_MSG_TYPE_RESPONSE) {
-
- resp_hdrp = (void*)&misc_buf[0];
- hdr_sz = sizeof (*resp_hdrp);
- (void) memcpy(&resp_hdrp->resp_pp, &pp, sizeof (pp));
-
- /* sanity check the header's timeout */
-
- if (resp_hdrp->resp_pp.pp_timeout !=
- ETM_PROTO_V1_TIMEOUT_NONE) {
- errno = ETIME;
- etm_stats.etm_timeout_bad.fmds_value.ui64++;
- return (NULL);
- }
-
- /* get the response code and length */
-
- if ((n = etm_io_op(hdl, "bad io read on resp code+len",
- conn, &resp_hdrp->resp_code,
- sizeof (resp_hdrp->resp_code)
- + sizeof (resp_hdrp->resp_len),
- ETM_IO_OP_RD)) < 0) {
- errno = (-n);
- return (NULL);
- }
-
- resp_hdrp->resp_code = ntohl(resp_hdrp->resp_code);
- resp_hdrp->resp_len = ntohl(resp_hdrp->resp_len);
-
- etm_stats.etm_rd_hdr_response.fmds_value.ui64++;
-
- } else if (pp.pp_msg_type == ETM_MSG_TYPE_ALERT) {
-
- sa_hdrp = (void*)&misc_buf[0];
- hdr_sz = sizeof (*sa_hdrp);
- (void) memcpy(&sa_hdrp->sa_pp, &pp, sizeof (pp));
-
- /* sanity check the header's protocol version */
-
- if (sa_hdrp->sa_pp.pp_proto_ver != ETM_PROTO_V3) {
- errno = EPROTO;
- etm_stats.etm_ver_bad.fmds_value.ui64++;
- return (NULL);
- }
-
- /* get the priority and length */
-
- if ((n = etm_io_op(hdl, "bad io read on sa priority+len",
- conn, &sa_hdrp->sa_priority,
- sizeof (sa_hdrp->sa_priority)
- + sizeof (sa_hdrp->sa_len),
- ETM_IO_OP_RD)) < 0) {
- errno = (-n);
- return (NULL);
- }
-
- sa_hdrp->sa_priority = ntohl(sa_hdrp->sa_priority);
- sa_hdrp->sa_len = ntohl(sa_hdrp->sa_len);
-
- etm_stats.etm_rd_hdr_alert.fmds_value.ui64++;
-
- } /* whether we have FMA_EVENT, ALERT, CONTROL, or RESPONSE msg */
-
- /*
- * choose a header size that allows hdr reuse for RESPONSE msgs,
- * allocate and populate the message header, and
- * return alloc size to caller for later free of hdrp
- */
-
- hdr_sz = MAX(hdr_sz, sizeof (*resp_hdrp));
- hdrp = fmd_hdl_zalloc(hdl, hdr_sz, FMD_SLEEP);
- (void) memcpy(hdrp, misc_buf, hdr_sz);
-
- if (etm_debug_lvl >= 3) {
- fmd_hdl_debug(hdl, "info: msg hdr hexdump %d bytes:\n", hdr_sz);
- etm_hexdump(hdl, hdrp, hdr_sz);
- }
- *szp = hdr_sz;
- return (hdrp);
-
-} /* etm_hdr_read() */
-
-/*
- * etm_hdr_write - create and write a [variable sized] ETM message header
- * to the given connection appropriate for the given FMA event
- * and type of nvlist encoding,
- * return the allocated ETM message header and its size
- * or NULL and set errno on failure
- */
-
-static void*
-etm_hdr_write(fmd_hdl_t *hdl, etm_xport_conn_t conn, nvlist_t *evp,
- int encoding, size_t *szp)
-{
- etm_proto_v1_ev_hdr_t *hdrp; /* for FMA_EVENT msg */
- size_t hdr_sz; /* sizeof *hdrp */
- uint32_t *lenp; /* ptr to FMA event length */
- size_t evsz; /* packed FMA event size */
- ssize_t n; /* gen use */
-
- /* allocate and populate the message header for 1 FMA event */
-
- hdr_sz = sizeof (*hdrp) + (1 * sizeof (hdrp->ev_lens[0]));
-
- hdrp = fmd_hdl_zalloc(hdl, hdr_sz, FMD_SLEEP);
-
- /*
- * Design_Note: Although the ETM protocol supports it, we do not (yet)
- * want responses/ACKs on FMA events that we send. All
- * such messages are sent with ETM_PROTO_V1_TIMEOUT_NONE.
- */
-
- hdrp->ev_pp.pp_magic_num = ETM_PROTO_MAGIC_NUM;
- hdrp->ev_pp.pp_magic_num = htonl(hdrp->ev_pp.pp_magic_num);
- hdrp->ev_pp.pp_proto_ver = ETM_PROTO_V1;
- hdrp->ev_pp.pp_msg_type = ETM_MSG_TYPE_FMA_EVENT;
- hdrp->ev_pp.pp_sub_type = 0;
- hdrp->ev_pp.pp_rsvd_pad = 0;
- hdrp->ev_pp.pp_xid = etm_xid_cur;
- hdrp->ev_pp.pp_xid = htonl(hdrp->ev_pp.pp_xid);
- etm_xid_cur += ETM_XID_INC;
- hdrp->ev_pp.pp_timeout = ETM_PROTO_V1_TIMEOUT_NONE;
- hdrp->ev_pp.pp_timeout = htonl(hdrp->ev_pp.pp_timeout);
-
- lenp = &hdrp->ev_lens[0];
-
- if ((n = nvlist_size(evp, &evsz, encoding)) != 0) {
- errno = n;
- fmd_hdl_free(hdl, hdrp, hdr_sz);
- etm_stats.etm_os_nvlist_size_fail.fmds_value.ui64++;
- return (NULL);
- }
-
- /* indicate 1 FMA event, network encode its length, and 0-terminate */
-
- etm_stats.etm_wr_max_ev_per_msg.fmds_value.ui64 = 1;
-
- *lenp = evsz; *lenp = htonl(*lenp); lenp++;
- *lenp = 0; *lenp = htonl(*lenp); lenp++;
-
- /*
- * write the network encoded header to the transport, and
- * return alloc size to caller for later free
- */
-
- if ((n = etm_io_op(hdl, "bad io write on event hdr",
- conn, hdrp, hdr_sz, ETM_IO_OP_WR)) < 0) {
- errno = (-n);
- fmd_hdl_free(hdl, hdrp, hdr_sz);
- return (NULL);
- }
-
- *szp = hdr_sz;
- return (hdrp);
-
-} /* etm_hdr_write() */
-
-/*
- * etm_post_to_fmd - post the given FMA event to FMD
- * via a FMD transport API call,
- * return 0 or -errno value
- *
- * caveats: the FMA event (evp) is freed by FMD,
- * thus callers of this function should
- * immediately discard any ptr they have to the
- * nvlist without freeing or dereferencing it
- */
-
-static int
-etm_post_to_fmd(fmd_hdl_t *hdl, fmd_xprt_t *fmd_xprt, nvlist_t *evp)
-{
- ssize_t ev_sz; /* sizeof *evp */
-
- (void) nvlist_size(evp, (size_t *)&ev_sz, NV_ENCODE_XDR);
-
- if (etm_debug_lvl >= 2) {
- etm_show_time(hdl, "ante ev post");
- }
- fmd_xprt_post(hdl, fmd_xprt, evp, 0);
- etm_stats.etm_wr_fmd_fmaevent.fmds_value.ui64++;
- etm_stats.etm_wr_fmd_bytes.fmds_value.ui64 += ev_sz;
- if (etm_debug_lvl >= 1) {
- fmd_hdl_debug(hdl, "info: event %p post ok to FMD\n", evp);
- }
- if (etm_debug_lvl >= 2) {
- etm_show_time(hdl, "post ev post");
- }
- return (0);
-
-} /* etm_post_to_fmd() */
-
-/*
- * Ideally we would just use syslog(3C) for outputting our messages.
- * Unfortunately, as this module is running within the FMA daemon context,
- * that would create the situation where this module's openlog() would
- * have the monopoly on syslog(3C) for the daemon and all its modules.
- * To avoid that situation, this module uses the same logic as the
- * syslog-msgs FM module to directly call into the log(4D) and sysmsg(4D)
- * devices for syslog and console.
- */
-
-static int
-etm_post_to_syslog(fmd_hdl_t *hdl, uint32_t priority, uint32_t body_sz,
- uint8_t *body_buf)
-{
- char *sysmessage; /* Formatted message */
- size_t formatlen; /* maximum length of sysmessage */
- struct strbuf ctl, dat; /* structs pushed to the logfd */
- uint32_t msgid; /* syslog message ID number */
-
- if ((syslog_file == 0) && (syslog_cons == 0)) {
- return (0);
- }
-
- if (etm_debug_lvl >= 2) {
- etm_show_time(hdl, "ante syslog post");
- }
-
- formatlen = body_sz + 64; /* +64 for prefix strings added below */
- sysmessage = fmd_hdl_zalloc(hdl, formatlen, FMD_SLEEP);
-
- if (syslog_file) {
- STRLOG_MAKE_MSGID(body_buf, msgid);
- (void) snprintf(sysmessage, formatlen,
- "SC Alert: [ID %u FACILITY_AND_PRIORITY] %s", msgid,
- body_buf);
-
- syslog_ctl.pri = syslog_facility | priority;
-
- ctl.buf = (void *)&syslog_ctl;
- ctl.len = sizeof (syslog_ctl);
-
- dat.buf = sysmessage;
- dat.len = strlen(sysmessage) + 1;
-
- if (putmsg(syslog_logfd, &ctl, &dat, 0) != 0) {
- fmd_hdl_debug(hdl, "putmsg failed: %s\n",
- strerror(errno));
- etm_stats.etm_log_err.fmds_value.ui64++;
- }
- }
-
- if (syslog_cons) {
- (void) snprintf(sysmessage, formatlen,
- "SC Alert: %s\r\n", body_buf);
-
- dat.buf = sysmessage;
- dat.len = strlen(sysmessage) + 1;
-
- if (write(syslog_msgfd, dat.buf, dat.len) != dat.len) {
- fmd_hdl_debug(hdl, "write failed: %s\n",
- strerror(errno));
- etm_stats.etm_msg_err.fmds_value.ui64++;
- }
- }
-
- fmd_hdl_free(hdl, sysmessage, formatlen);
-
- if (etm_debug_lvl >= 2) {
- etm_show_time(hdl, "post syslog post");
- }
-
- return (0);
-}
-
-
-/*
- * etm_req_ver_negot - send an ETM control message to the other end requesting
- * that the ETM protocol version be negotiated/set
- */
-
-static void
-etm_req_ver_negot(fmd_hdl_t *hdl)
-{
- etm_xport_addr_t *addrv; /* default dst addr(s) */
- etm_xport_conn_t conn; /* connection to other end */
- etm_proto_v1_ctl_hdr_t *ctl_hdrp; /* for CONTROL msg */
- size_t hdr_sz; /* sizeof header */
- uint8_t *body_buf; /* msg body buffer */
- uint32_t body_sz; /* sizeof *body_buf */
- ssize_t i; /* gen use */
-
- /* populate an ETM control msg to send */
-
- hdr_sz = sizeof (*ctl_hdrp);
- body_sz = (3 + 1); /* version bytes plus null byte */
-
- ctl_hdrp = fmd_hdl_zalloc(hdl, hdr_sz + body_sz, FMD_SLEEP);
-
- ctl_hdrp->ctl_pp.pp_magic_num = htonl(ETM_PROTO_MAGIC_NUM);
- ctl_hdrp->ctl_pp.pp_proto_ver = ETM_PROTO_V1;
- ctl_hdrp->ctl_pp.pp_msg_type = ETM_MSG_TYPE_CONTROL;
- ctl_hdrp->ctl_pp.pp_sub_type = ETM_CTL_SEL_VER_NEGOT_REQ;
- ctl_hdrp->ctl_pp.pp_rsvd_pad = 0;
- etm_xid_ver_negot = etm_xid_cur;
- etm_xid_cur += ETM_XID_INC;
- ctl_hdrp->ctl_pp.pp_xid = htonl(etm_xid_ver_negot);
- ctl_hdrp->ctl_pp.pp_timeout = htonl(ETM_PROTO_V1_TIMEOUT_FOREVER);
- ctl_hdrp->ctl_len = htonl(body_sz);
-
- body_buf = (void*)&ctl_hdrp->ctl_len;
- body_buf += sizeof (ctl_hdrp->ctl_len);
- *body_buf++ = ETM_PROTO_V3;
- *body_buf++ = ETM_PROTO_V2;
- *body_buf++ = ETM_PROTO_V1;
- *body_buf++ = '\0';
-
- /*
- * open and close a connection to send the ETM control msg
- * to any/all of the default dst addrs
- */
-
- if ((addrv = etm_xport_get_ev_addrv(hdl, NULL)) == NULL) {
- fmd_hdl_error(hdl,
- "error: bad ctl dst addrs errno %d\n", errno);
- etm_stats.etm_xport_get_ev_addrv_fail.fmds_value.ui64++;
- goto func_ret;
- }
-
- for (i = 0; addrv[i] != NULL; i++) {
-
- if (etm_conn_open(hdl, "bad conn open during ver negot",
- addrv[i], &conn) < 0) {
- continue;
- }
- if (etm_io_op(hdl, "bad io write on ctl hdr+body",
- conn, ctl_hdrp, hdr_sz + body_sz, ETM_IO_OP_WR) >= 0) {
- etm_stats.etm_wr_hdr_control.fmds_value.ui64++;
- etm_stats.etm_wr_body_control.fmds_value.ui64++;
- }
- (void) etm_conn_close(hdl, "bad conn close during ver negot",
- conn);
-
- } /* foreach dst addr */
-
-func_ret:
-
- if (addrv != NULL) {
- etm_xport_free_addrv(hdl, addrv);
- }
- fmd_hdl_free(hdl, ctl_hdrp, hdr_sz + body_sz);
-
-} /* etm_req_ver_negot() */
-
-
-
-/*
- * etm_iosvc_msg_enq - add element to tail of ETM iosvc msg queue
- * etm_iosvc_msg_deq - del element from head of ETM iosvc msg queue
- * need to grab the mutex lock before calling this routine
- * return >0 for success, or -errno value
- */
-static int
-etm_iosvc_msg_enq(fmd_hdl_t *hdl, etm_iosvc_t *iosvc, etm_iosvc_q_ele_t *msgp)
-{
- etm_iosvc_q_ele_t *newp; /* ptr to new msg q ele */
-
- if (iosvc->msg_q_cur_len >= iosvc->msg_q_max_len) {
- fmd_hdl_debug(hdl, "warning: enq to full msg queue\n");
- return (-E2BIG);
- }
-
- newp = fmd_hdl_zalloc(hdl, sizeof (*newp), FMD_SLEEP);
- (void) memcpy(newp, msgp, sizeof (*newp));
- newp->msg_nextp = NULL;
-
- if (iosvc->msg_q_cur_len == 0) {
- iosvc->msg_q_head = newp;
- } else {
- iosvc->msg_q_tail->msg_nextp = newp;
- }
-
- iosvc->msg_q_tail = newp;
- iosvc->msg_q_cur_len++;
- fmd_hdl_debug(hdl, "info: current msg queue length %d\n",
- iosvc->msg_q_cur_len);
-
- return (1);
-
-} /* etm_iosvc_msg_enq() */
-
-static int
-etm_iosvc_msg_deq(fmd_hdl_t *hdl, etm_iosvc_t *iosvc, etm_iosvc_q_ele_t *msgp)
-{
- etm_iosvc_q_ele_t *oldp; /* ptr to old msg q ele */
-
- if (iosvc->msg_q_cur_len == 0) {
- fmd_hdl_debug(hdl, "warning: deq from empty responder queue\n");
- return (-ENOENT);
- }
-
- (void) memcpy(msgp, iosvc->msg_q_head, sizeof (*msgp));
- msgp->msg_nextp = NULL;
-
- oldp = iosvc->msg_q_head;
- iosvc->msg_q_head = iosvc->msg_q_head->msg_nextp;
-
- /*
- * free the mem alloc-ed in etm_iosvc_msg_enq()
- */
- fmd_hdl_free(hdl, oldp, sizeof (*oldp));
-
- iosvc->msg_q_cur_len--;
- if (iosvc->msg_q_cur_len == 0) {
- iosvc->msg_q_tail = NULL;
- }
-
- return (1);
-
-} /* etm_iosvc_msg_deq() */
-
-
-/*
- * etm_msg_enq_head():
- * enq the msg to the head of the Q.
- * If the Q is full, drop the msg at the tail then enq the msg at head.
- * need to grab mutex lock iosvc->msg_q_lock before calling this routine.
- */
-static void
-etm_msg_enq_head(fmd_hdl_t *fmd_hdl, etm_iosvc_t *iosvc,
- etm_iosvc_q_ele_t *msg_ele)
-{
-
- etm_iosvc_q_ele_t *newp; /* iosvc msg ele ptr */
-
- if (iosvc->msg_q_cur_len >= iosvc->msg_q_max_len) {
- fmd_hdl_debug(fmd_hdl,
- "warning: add to head of a full msg queue."
- " Drop the msg at the tail\n");
- /*
- * drop the msg at the tail
- */
- newp = iosvc->msg_q_head;
- while (newp->msg_nextp != iosvc->msg_q_tail) {
- newp = newp->msg_nextp;
- }
-
- /*
- * free the msg in iosvc->msg_q_tail->msg
- * free the mem pointed to by iosvc->msg_q_tail
- */
- fmd_hdl_free(fmd_hdl, iosvc->msg_q_tail->msg,
- iosvc->msg_q_tail->msg_size);
- fmd_hdl_free(fmd_hdl, iosvc->msg_q_tail, sizeof (*newp));
- iosvc->msg_q_tail = newp;
- iosvc->msg_q_tail->msg_nextp = NULL;
- iosvc->msg_q_cur_len--;
- }
-
- /*
- * enq the msg to the head
- */
- newp = fmd_hdl_zalloc(fmd_hdl, sizeof (*newp), FMD_SLEEP);
- (void) memcpy(newp, msg_ele, sizeof (*newp));
- if (iosvc->msg_q_cur_len == 0) {
- newp->msg_nextp = NULL;
- iosvc->msg_q_tail = newp;
- } else {
- newp->msg_nextp = iosvc->msg_q_head;
- }
- iosvc->msg_q_head = newp;
- iosvc->msg_q_cur_len++;
-} /* etm_msg_enq_head() */
-
-/*
- * etm_iosvc_cleanup():
- * Clean up an iosvc structure
- * 1) close the fmd_xprt if it has not been closed
- * 2) Terminate the send/revc threads
- * 3) If the clean_msg_q flag is set, free all fma events in the queue. In
- * addition, if the chpt_remove flag is set, delete the checkpoint so that
- * the events are not persisted.
- */
-static void
-etm_iosvc_cleanup(fmd_hdl_t *fmd_hdl, etm_iosvc_t *iosvc, boolean_t clean_msg_q,
- boolean_t ckpt_remove)
-{
-
- etm_iosvc_q_ele_t msg_ele; /* io svc msg Q ele */
-
- iosvc->thr_is_dying = 1;
-
- iosvc->ds_hdl = DS_INVALID_HDL;
- if (iosvc->fmd_xprt != NULL) {
- fmd_xprt_close(fmd_hdl, iosvc->fmd_xprt);
- iosvc->fmd_xprt = NULL;
- } /* if fmd-xprt has been opened */
-
- if (iosvc->send_tid != 0) {
- fmd_thr_signal(fmd_hdl, iosvc->send_tid);
- fmd_thr_destroy(fmd_hdl, iosvc->send_tid);
- iosvc->send_tid = 0;
- } /* if io svc send thread was created ok */
-
- if (iosvc->recv_tid != 0) {
- fmd_thr_signal(fmd_hdl, iosvc->recv_tid);
- fmd_thr_destroy(fmd_hdl, iosvc->recv_tid);
- iosvc->recv_tid = 0;
- } /* if root domain recv thread was created */
-
-
- if (clean_msg_q) {
- iosvc->ldom_name[0] = '\0';
-
- (void) pthread_mutex_lock(&iosvc->msg_q_lock);
- while (iosvc->msg_q_cur_len > 0) {
- (void) etm_iosvc_msg_deq(fmd_hdl, iosvc, &msg_ele);
- if (ckpt_remove == B_TRUE &&
- msg_ele.ckpt_flag != ETM_CKPT_NOOP) {
- etm_ckpt_remove(fmd_hdl, &msg_ele);
- }
- fmd_hdl_free(fmd_hdl, msg_ele.msg, msg_ele.msg_size);
- }
- (void) pthread_mutex_unlock(&iosvc->msg_q_lock);
- }
-
- return;
-
-} /* etm_iosvc_cleanup() */
-
-/*
- * etm_iosvc_lookup(using ldom_name or ds_hdl when ldom_name is empty)
- * not found, create one, add to iosvc_list
- */
-etm_iosvc_t *
-etm_iosvc_lookup(fmd_hdl_t *fmd_hdl, char *ldom_name, ds_hdl_t ds_hdl,
- boolean_t iosvc_create)
-{
- uint32_t i; /* for loop var */
- int32_t first_empty_slot = -1; /* remember that */
-
- for (i = 0; i < NUM_OF_ROOT_DOMAINS; i++) {
- if (ldom_name[0] == '\0') {
- /*
- * search by hdl passed in
- * the only time this is used is at ds_unreg_cb time.
- * there is no ldom name, only the valid ds_hdl.
- * find an iosvc with the matching ds_hdl.
- * ignore the iosvc_create flag, should never need to
- * create an iosvc for ds_unreg_cb
- */
- if (ds_hdl == iosvc_list[i].ds_hdl) {
- if (etm_debug_lvl >= 2) {
- fmd_hdl_debug(fmd_hdl,
- "info: found an iosvc at slot %d w/ ds_hdl %d \n",
- i, iosvc_list[i].ds_hdl);
- }
- if (iosvc_list[i].ldom_name[0] != '\0')
- if (etm_debug_lvl >= 2) {
- fmd_hdl_debug(fmd_hdl,
- "info: found an iosvc w/ ldom_name %s \n",
- iosvc_list[i].ldom_name);
- }
- return (&iosvc_list[i]);
- } else {
- continue;
- }
- } else if (iosvc_list[i].ldom_name[0] != '\0') {
- /*
- * this is an non-empty iosvc structure slot
- */
- if (strcmp(ldom_name, iosvc_list[i].ldom_name) == 0) {
- /*
- * found an iosvc structure that matches the
- * passed in ldom_name, return the ptr
- */
- if (etm_debug_lvl >= 2) {
- fmd_hdl_debug(fmd_hdl, "info: found an "
- "iosvc at slot %d w/ ds_hdl %d \n",
- i, iosvc_list[i].ds_hdl);
- fmd_hdl_debug(fmd_hdl, "info: found an "
- "iosvc w/ ldom_name %s \n",
- iosvc_list[i].ldom_name);
- }
- return (&iosvc_list[i]);
- } else {
- /*
- * non-empty slot with no-matching name,
- * move on to next slot.
- */
- continue;
- }
- } else {
- /*
- * found the 1st slot with ldom name being empty
- * remember the slot #, will be used for creating one
- */
- if (first_empty_slot == -1) {
- first_empty_slot = i;
- }
- }
- }
- if (iosvc_create == B_TRUE && first_empty_slot >= 0) {
- /*
- * this is the case we need to add an iosvc at first_empty_slot
- * for the ldom_name at iosvc_list[first_empty_slot]
- */
- fmd_hdl_debug(fmd_hdl,
- "info: create an iosvc with ldom name %s\n",
- ldom_name);
- i = first_empty_slot;
- (void) memcpy(&iosvc_list[i], &io_svc, sizeof (etm_iosvc_t));
- (void) strcpy(iosvc_list[i].ldom_name, ldom_name);
- fmd_hdl_debug(fmd_hdl, "info: iosvc #%d has ldom name %s\n",
- i, iosvc_list[i].ldom_name);
- return (&iosvc_list[i]);
- } else {
- return (NULL);
- }
-
-} /* etm_iosvc_lookup() */
-
-
-/*
- * etm_ckpt_remove:
- * remove the ckpt for the iosvc element
- */
-static void
-etm_ckpt_remove(fmd_hdl_t *hdl, etm_iosvc_q_ele_t *ele)
-{
- int err; /* temp error */
- nvlist_t *evp = NULL; /* event pointer */
- etm_proto_v1_ev_hdr_t *hdrp; /* hdr for FMA_EVENT */
- char *buf; /* packed event pointer */
-
- if ((ele->ckpt_flag == ETM_CKPT_NOOP) ||
- (etm_ldom_type != LDOM_TYPE_CONTROL)) {
- return;
- }
-
- /* the pointer to the packed event in the etm message */
- hdrp = (etm_proto_v1_ev_hdr_t *)((ptrdiff_t)ele->msg);
- buf = (char *)((ptrdiff_t)hdrp + sizeof (*hdrp)
- + (1 * sizeof (hdrp->ev_lens[0])));
-
- /* unpack it, then uncheckpoited it */
- if ((err = nvlist_unpack(buf, hdrp->ev_lens[0], &evp, 0)) != 0) {
- fmd_hdl_debug(hdl, "failed to unpack event(rc=%d)\n", err);
- return;
- }
- (void) etm_ckpt_delete(hdl, evp);
- nvlist_free(evp);
-}
-
-/*
- * etm_send_ds_msg()
- * call ds_send_msg() to send the msg passed in.
- * timedcond_wait for the ACK to come back.
- * if the ACK doesn't come in the specified time, retrun -EAGAIN.
- * other wise, return 1.
- */
-int
-etm_send_ds_msg(fmd_hdl_t *fmd_hdl, boolean_t ckpt_remove, etm_iosvc_t *iosvc,
- etm_iosvc_q_ele_t *msg_ele, etm_proto_v1_ev_hdr_t *evhdrp)
-{
- uint32_t rc; /* for return code */
-
- struct timeval tv;
- struct timespec timeout;
-
-
- /*
- * call ds_send_msg(). Return (-EAGAIN) if not successful
- */
- if ((rc = (*etm_ds_send_msg)(iosvc->ds_hdl, msg_ele->msg,
- msg_ele->msg_size)) != 0) {
- fmd_hdl_debug(fmd_hdl, "info: ds_send_msg rc %d xid %d\n",
- rc, evhdrp->ev_pp.pp_xid);
- return (-EAGAIN);
- }
-
- /*
- * wait on the cv for resp msg for cur_send_xid
- */
- (void *) pthread_mutex_lock(&iosvc->msg_ack_lock);
-
- (void) gettimeofday(&tv, 0);
- timeout.tv_sec = tv.tv_sec + etm_fma_resp_wait_time;
- timeout.tv_nsec = 0;
-
- fmd_hdl_debug(fmd_hdl, "info: waiting on msg_ack_cv for ldom %s\n",
- iosvc->ldom_name);
- rc = pthread_cond_timedwait(&iosvc->msg_ack_cv, &iosvc->msg_ack_lock,
- &timeout);
- (void *) pthread_mutex_unlock(&iosvc->msg_ack_lock);
- fmd_hdl_debug(fmd_hdl, "info: msg_ack_cv returns with rc %d\n", rc);
-
- /*
- * check to see if ack_ok is non-zero
- * if non-zero, resp msg has been received
- */
- if (iosvc->ack_ok != 0) {
- /*
- * ACK came ok, this send is successful,
- * tell the caller ready to send next.
- * free mem alloc-ed in
- * etm_pack_ds_msg
- */
- if (ckpt_remove == B_TRUE &&
- etm_ldom_type == LDOM_TYPE_CONTROL) {
- etm_ckpt_remove(fmd_hdl, msg_ele);
- }
- fmd_hdl_free(fmd_hdl, msg_ele->msg, msg_ele->msg_size);
- iosvc->cur_send_xid++;
- return (1);
- } else {
- /*
- * the ACK did not come on time
- * tell the caller to resend cur_send_xid
- */
- return (-EAGAIN);
- } /* iosvc->ack_ok != 0 */
-} /* etm_send_ds_msg() */
-
-/*
- * both events from fmdo_send entry point and from SP are using the
- * etm_proto_v1_ev_hdr_t as its header and it will be the same header for all
- * ds send/recv msgs.
- * Idealy, we should use the hdr coming with the SP FMA event. Since fmdo_send
- * entry point can be called before FMA events from SP, we can't rely on
- * the SP FMA event hdr. Use the static hdr for packing ds msgs for fmdo_send
- * events.
- * return >0 for success, or -errno value
- * Design assumption: there is one FMA event per ds msg
- */
-int
-etm_pack_ds_msg(fmd_hdl_t *fmd_hdl, etm_iosvc_t *iosvc,
- etm_proto_v1_ev_hdr_t *ev_hdrp, size_t hdr_sz, nvlist_t *evp,
- etm_pack_msg_type_t msg_type, uint_t ckpt_opt)
-{
- etm_proto_v1_ev_hdr_t *hdrp; /* for FMA_EVENT msg */
- uint32_t *lenp; /* ptr to FMA event length */
- size_t evsz; /* packed FMA event size */
- char *buf;
- uint32_t rc; /* for return code */
- char *msg; /* body of msg to be Qed */
-
- etm_iosvc_q_ele_t msg_ele; /* io svc msg Q ele */
- etm_proto_v1_ev_hdr_t *evhdrp;
-
-
- if (ev_hdrp == NULL) {
- hdrp = &iosvc_hdr;
- } else {
- hdrp = ev_hdrp;
- }
-
- /*
- * determine hdr_sz if 0, otherwise use the one passed in hdr_sz
- */
-
- if (hdr_sz == 0) {
- hdr_sz = sizeof (*hdrp) + (1 * sizeof (hdrp->ev_lens[0]));
- }
-
- /*
- * determine evp size
- */
- (void) nvlist_size(evp, &evsz, NV_ENCODE_XDR);
-
- /* indicate 1 FMA event, no network encoding, and 0-terminate */
- lenp = &hdrp->ev_lens[0];
- *lenp = evsz;
-
- /*
- * now the total of mem needs to be alloc-ed/ds msg size is
- * hdr_sz + evsz
- * msg will be freed in etm_send_to_remote_root() after ds_send_msg()
- */
- msg = fmd_hdl_zalloc(fmd_hdl, hdr_sz + evsz, FMD_SLEEP);
-
-
- /*
- * copy hdr, 0 terminate the length vector, and then evp
- */
- (void) memcpy(msg, hdrp, sizeof (*hdrp));
- hdrp = (etm_proto_v1_ev_hdr_t *)((ptrdiff_t)msg);
- lenp = &hdrp->ev_lens[0];
- lenp++;
- *lenp = 0;
-
- buf = fmd_hdl_zalloc(fmd_hdl, evsz, FMD_SLEEP);
- (void) nvlist_pack(evp, (char **)&buf, &evsz, NV_ENCODE_XDR, 0);
- (void) memcpy(msg + hdr_sz, buf, evsz);
- fmd_hdl_free(fmd_hdl, buf, evsz);
-
- fmd_hdl_debug(fmd_hdl, "info: hdr_sz= %d evsz= %d in etm_pack_ds_msg"
- "for ldom %s\n", hdr_sz, evsz, iosvc->ldom_name);
- msg_ele.msg = msg;
- msg_ele.msg_size = hdr_sz + evsz;
- msg_ele.ckpt_flag = ckpt_opt;
-
- /*
- * decide what to do with the msg:
- * if SP ereports (msg_type == SP_MSG), always enq the msg
- * if not SP ereports, ie, fmd xprt control msgs, enq it _only_ after
- * resource.fm.xprt.run has been sent (which sets start_sending_Q to 1)
- */
- if ((msg_type == SP_MSG) ||
- (msg_type != SP_MSG) && (iosvc->start_sending_Q == 1)) {
- /*
- * this is the case when the msg needs to be enq-ed
- */
- (void) pthread_mutex_lock(&iosvc->msg_q_lock);
- rc = etm_iosvc_msg_enq(fmd_hdl, iosvc, &msg_ele);
- if ((rc > 0) && (ckpt_opt & ETM_CKPT_SAVE) &&
- (etm_ldom_type == LDOM_TYPE_CONTROL)) {
- (void) etm_ckpt_add(fmd_hdl, evp);
- }
- if (iosvc->msg_q_cur_len == 1)
- (void) pthread_cond_signal(&iosvc->msg_q_cv);
- (void) pthread_mutex_unlock(&iosvc->msg_q_lock);
- } else {
- /*
- * fmd RDWR xprt procotol startup msgs, send it now!
- */
- iosvc->ack_ok = 0;
- evhdrp = (etm_proto_v1_ev_hdr_t *)((ptrdiff_t)msg_ele.msg);
- evhdrp->ev_pp.pp_xid = iosvc->cur_send_xid + 1;
- while (!iosvc->ack_ok && iosvc->ds_hdl != DS_INVALID_HDL &&
- !etm_is_dying) {
- if (etm_send_ds_msg(fmd_hdl, B_FALSE, iosvc, &msg_ele,
- evhdrp) < 0) {
- continue;
- }
- }
- if (msg_type == FMD_XPRT_RUN_MSG)
- iosvc->start_sending_Q = 1;
- }
-
- return (rc);
-
-} /* etm_pack_ds_msg() */
-
-/*
- * Design_Note: For all etm_resp_q_*() functions and etm_resp_q_* globals,
- * the mutex etm_resp_q_lock must be held by the caller.
- */
-
-/*
- * etm_resp_q_enq - add element to tail of ETM responder queue
- * etm_resp_q_deq - del element from head of ETM responder queue
- *
- * return >0 for success, or -errno value
- */
-
-static int
-etm_resp_q_enq(fmd_hdl_t *hdl, etm_resp_q_ele_t *rqep)
-{
- etm_resp_q_ele_t *newp; /* ptr to new resp q ele */
-
- if (etm_resp_q_cur_len >= etm_resp_q_max_len) {
- fmd_hdl_debug(hdl, "warning: enq to full responder queue\n");
- etm_stats.etm_enq_drop_resp_q.fmds_value.ui64++;
- return (-E2BIG);
- }
-
- newp = fmd_hdl_zalloc(hdl, sizeof (*newp), FMD_SLEEP);
- (void) memcpy(newp, rqep, sizeof (*newp));
- newp->rqe_nextp = NULL;
-
- if (etm_resp_q_cur_len == 0) {
- etm_resp_q_head = newp;
- } else {
- etm_resp_q_tail->rqe_nextp = newp;
- }
- etm_resp_q_tail = newp;
- etm_resp_q_cur_len++;
- etm_stats.etm_resp_q_cur_len.fmds_value.ui64 = etm_resp_q_cur_len;
-
- return (1);
-
-} /* etm_resp_q_enq() */
-
-static int
-etm_resp_q_deq(fmd_hdl_t *hdl, etm_resp_q_ele_t *rqep)
-{
- etm_resp_q_ele_t *oldp; /* ptr to old resp q ele */
-
- if (etm_resp_q_cur_len == 0) {
- fmd_hdl_debug(hdl, "warning: deq from empty responder queue\n");
- etm_stats.etm_deq_drop_resp_q.fmds_value.ui64++;
- return (-ENOENT);
- }
-
- (void) memcpy(rqep, etm_resp_q_head, sizeof (*rqep));
- rqep->rqe_nextp = NULL;
-
- oldp = etm_resp_q_head;
- etm_resp_q_head = etm_resp_q_head->rqe_nextp;
- fmd_hdl_free(hdl, oldp, sizeof (*oldp));
-
- etm_resp_q_cur_len--;
- etm_stats.etm_resp_q_cur_len.fmds_value.ui64 = etm_resp_q_cur_len;
- if (etm_resp_q_cur_len == 0) {
- etm_resp_q_tail = NULL;
- }
-
- return (1);
-
-} /* etm_resp_q_deq() */
-
-/*
- * etm_maybe_enq_response - check the given message header to see
- * whether a response has been requested,
- * if so then enqueue the given connection
- * and header for later transport by the
- * responder thread as an ETM response msg,
- * return 0 for nop, >0 success, or -errno value
- */
-
-static ssize_t
-etm_maybe_enq_response(fmd_hdl_t *hdl, etm_xport_conn_t conn,
- void *hdrp, uint32_t hdr_sz, int32_t resp_code)
-{
- ssize_t rv; /* ret val */
- etm_proto_v1_pp_t *ppp; /* protocol preamble ptr */
- uint8_t orig_msg_type; /* orig hdr's message type */
- uint32_t orig_timeout; /* orig hdr's timeout */
- etm_resp_q_ele_t rqe; /* responder queue ele */
-
- ppp = hdrp;
- orig_msg_type = ppp->pp_msg_type;
- orig_timeout = ppp->pp_timeout;
-
- /* bail out now if no response is to be sent */
-
- if (orig_timeout == ETM_PROTO_V1_TIMEOUT_NONE) {
- return (0);
- } /* if a nop */
-
- if ((orig_msg_type != ETM_MSG_TYPE_FMA_EVENT) &&
- (orig_msg_type != ETM_MSG_TYPE_ALERT) &&
- (orig_msg_type != ETM_MSG_TYPE_CONTROL)) {
- fmd_hdl_debug(hdl, "warning: bad msg type 0x%x\n",
- orig_msg_type);
- return (-EINVAL);
- } /* if inappropriate hdr for a response msg */
-
- /*
- * enqueue the msg hdr and nudge the responder thread
- * if the responder queue was previously empty
- */
-
- rqe.rqe_conn = conn;
- rqe.rqe_hdrp = hdrp;
- rqe.rqe_hdr_sz = hdr_sz;
- rqe.rqe_resp_code = resp_code;
-
- (void) pthread_mutex_lock(&etm_resp_q_lock);
-
- if (etm_resp_q_cur_len == etm_resp_q_max_len)
- (void) pthread_cond_wait(&etm_resp_q_cv, &etm_resp_q_lock);
-
- rv = etm_resp_q_enq(hdl, &rqe);
- if (etm_resp_q_cur_len == 1)
- (void) pthread_cond_signal(&etm_resp_q_cv);
- (void) pthread_mutex_unlock(&etm_resp_q_lock);
-
- return (rv);
-
-} /* etm_maybe_enq_response() */
-
-/*
- * Design_Note: We rely on the fact that all message types have
- * a common protocol preamble; if this fact should
- * ever change it may break the code below. We also
- * rely on the fact that FMA_EVENT and CONTROL headers
- * returned by etm_hdr_read() will be sized large enough
- * to reuse them as RESPONSE headers if the remote endpt
- * asked for a response via the pp_timeout field.
- */
-
-/*
- * etm_send_response - use the given message header and response code
- * to construct an appropriate response message,
- * and send it back on the given connection,
- * return >0 for success, or -errno value
- */
-
-static ssize_t
-etm_send_response(fmd_hdl_t *hdl, etm_xport_conn_t conn,
- void *hdrp, int32_t resp_code)
-{
- ssize_t rv; /* ret val */
- etm_proto_v1_pp_t *ppp; /* protocol preamble ptr */
- etm_proto_v1_resp_hdr_t *resp_hdrp; /* for RESPONSE msg */
- uint8_t resp_body[4]; /* response body if needed */
- uint8_t *resp_msg; /* response hdr+body */
- size_t hdr_sz; /* sizeof response hdr */
- uint8_t orig_msg_type; /* orig hdr's message type */
-
- ppp = hdrp;
- orig_msg_type = ppp->pp_msg_type;
-
- if (etm_debug_lvl >= 2) {
- etm_show_time(hdl, "ante resp send");
- }
-
- /* reuse the given header as a response header */
-
- resp_hdrp = hdrp;
- resp_hdrp->resp_code = resp_code;
- resp_hdrp->resp_len = 0; /* default is empty body */
-
- if ((orig_msg_type == ETM_MSG_TYPE_CONTROL) &&
- (ppp->pp_sub_type == ETM_CTL_SEL_VER_NEGOT_REQ)) {
- resp_body[0] = ETM_PROTO_V2;
- resp_body[1] = ETM_PROTO_V3;
- resp_body[2] = 0;
- resp_hdrp->resp_len = 3;
- } /* if should send our/negotiated proto ver in resp body */
-
- /* respond with the proto ver that was negotiated */
-
- resp_hdrp->resp_pp.pp_proto_ver = etm_resp_ver;
- resp_hdrp->resp_pp.pp_msg_type = ETM_MSG_TYPE_RESPONSE;
- resp_hdrp->resp_pp.pp_timeout = ETM_PROTO_V1_TIMEOUT_NONE;
-
- /*
- * send the whole response msg in one write, header and body;
- * avoid the alloc-and-copy if we can reuse the hdr as the msg,
- * ie, if the body is empty. update the response stats.
- */
-
- hdr_sz = sizeof (etm_proto_v1_resp_hdr_t);
-
- resp_msg = hdrp;
- if (resp_hdrp->resp_len > 0) {
- resp_msg = fmd_hdl_zalloc(hdl, hdr_sz + resp_hdrp->resp_len,
- FMD_SLEEP);
- (void) memcpy(resp_msg, resp_hdrp, hdr_sz);
- (void) memcpy(resp_msg + hdr_sz, resp_body,
- resp_hdrp->resp_len);
- }
-
- (void) pthread_mutex_lock(&etm_write_lock);
- rv = etm_io_op(hdl, "bad io write on resp msg", conn,
- resp_msg, hdr_sz + resp_hdrp->resp_len, ETM_IO_OP_WR);
- (void) pthread_mutex_unlock(&etm_write_lock);
- if (rv < 0) {
- goto func_ret;
- }
-
- etm_stats.etm_wr_hdr_response.fmds_value.ui64++;
- etm_stats.etm_wr_body_response.fmds_value.ui64++;
-
- fmd_hdl_debug(hdl, "info: sent V%u RESPONSE msg to xport "
- "xid 0x%x code %d len %u\n",
- (unsigned int)resp_hdrp->resp_pp.pp_proto_ver,
- resp_hdrp->resp_pp.pp_xid, resp_hdrp->resp_code,
- resp_hdrp->resp_len);
-func_ret:
-
- if (resp_hdrp->resp_len > 0) {
- fmd_hdl_free(hdl, resp_msg, hdr_sz + resp_hdrp->resp_len);
- }
- if (etm_debug_lvl >= 2) {
- etm_show_time(hdl, "post resp send");
- }
- return (rv);
-
-} /* etm_send_response() */
-
-/*
- * etm_reset_xport - reset the transport layer (via fini;init)
- * presumably for an error condition we cannot
- * otherwise recover from (ex: hung LDC channel)
- *
- * caveats - no checking/locking is done to ensure an existing connection
- * is idle during an xport reset; we don't want to deadlock
- * and presumably the transport is stuck/unusable anyway
- */
-
-static void
-etm_reset_xport(fmd_hdl_t *hdl)
-{
- (void) etm_xport_fini(hdl);
- (void) etm_xport_init(hdl);
- etm_stats.etm_reset_xport.fmds_value.ui64++;
-
-} /* etm_reset_xport() */
-
-/*
- * etm_handle_new_conn - receive an ETM message sent from the other end via
- * the given open connection, pull out any FMA events
- * and post them to the local FMD (or handle any ETM
- * control or response msg); when done, close the
- * connection
- */
-
-static void
-etm_handle_new_conn(fmd_hdl_t *hdl, etm_xport_conn_t conn)
-{
- etm_proto_v1_ev_hdr_t *ev_hdrp; /* for FMA_EVENT msg */
- etm_proto_v1_ctl_hdr_t *ctl_hdrp; /* for CONTROL msg */
- etm_proto_v1_resp_hdr_t *resp_hdrp; /* for RESPONSE msg */
- etm_proto_v3_sa_hdr_t *sa_hdrp; /* for ALERT msg */
- etm_iosvc_t *iosvc; /* iosvc data structure */
- int32_t resp_code; /* response code */
- ssize_t enq_rv; /* resp_q enqueue status */
- size_t hdr_sz; /* sizeof header */
- size_t evsz; /* FMA event size */
- uint8_t *body_buf; /* msg body buffer */
- uint32_t body_sz; /* sizeof body_buf */
- uint32_t ev_cnt; /* count of FMA events */
- uint8_t *bp; /* byte ptr within body_buf */
- nvlist_t *evp; /* ptr to unpacked FMA event */
- char *class; /* FMA event class */
- ssize_t i, n; /* gen use */
- int should_reset_xport; /* bool to reset xport */
- char ldom_name[MAX_LDOM_NAME]; /* ldom name */
- int rc; /* return code */
- uint64_t did; /* domain id */
-
-
- if (etm_debug_lvl >= 2) {
- etm_show_time(hdl, "ante conn handle");
- }
- fmd_hdl_debug(hdl, "info: handling new conn %p\n", conn);
-
- should_reset_xport = 0;
- ev_hdrp = NULL;
- ctl_hdrp = NULL;
- resp_hdrp = NULL;
- sa_hdrp = NULL;
- body_buf = NULL;
- class = NULL;
- evp = NULL;
- resp_code = 0; /* default is success */
- enq_rv = 0; /* default is nop, ie, did not enqueue */
-
- /* read a network decoded message header from the connection */
-
- if ((ev_hdrp = etm_hdr_read(hdl, conn, &hdr_sz)) == NULL) {
- /* errno assumed set by above call */
- should_reset_xport = (errno == ENOTACTIVE);
- fmd_hdl_debug(hdl, "error: FMA event dropped: "
- "bad hdr read errno %d\n", errno);
- etm_stats.etm_rd_drop_fmaevent.fmds_value.ui64++;
- goto func_ret;
- }
-
- /*
- * handle the message based on its preamble pp_msg_type
- * which is known to be valid from etm_hdr_read() checks
- */
-
- if (ev_hdrp->ev_pp.pp_msg_type == ETM_MSG_TYPE_FMA_EVENT) {
-
- fmd_hdl_debug(hdl, "info: rcvd FMA_EVENT msg from xport\n");
-
- /* allocate buf large enough for whole body / all FMA events */
-
- body_sz = 0;
- for (i = 0; ev_hdrp->ev_lens[i] != 0; i++) {
- body_sz += ev_hdrp->ev_lens[i];
- } /* for summing sizes of all FMA events */
- if (i > etm_stats.etm_rd_max_ev_per_msg.fmds_value.ui64)
- etm_stats.etm_rd_max_ev_per_msg.fmds_value.ui64 = i;
- ev_cnt = i;
-
- if (etm_debug_lvl >= 1) {
- fmd_hdl_debug(hdl, "info: event lengths %u sum %u\n",
- ev_cnt, body_sz);
- }
-
- body_buf = fmd_hdl_zalloc(hdl, body_sz, FMD_SLEEP);
-
- /* read all the FMA events at once */
-
- if ((n = etm_io_op(hdl, "FMA event dropped: "
- "bad io read on event bodies", conn, body_buf, body_sz,
- ETM_IO_OP_RD)) < 0) {
- should_reset_xport = (n == -ENOTACTIVE);
- etm_stats.etm_rd_drop_fmaevent.fmds_value.ui64++;
- goto func_ret;
- }
-
- etm_stats.etm_rd_xport_bytes.fmds_value.ui64 += body_sz;
- etm_stats.etm_rd_body_fmaevent.fmds_value.ui64 += ev_cnt;
-
- /*
- * now that we've read the entire ETM msg from the conn,
- * which avoids later ETM protocol framing errors if we didn't,
- * check for dup msg/xid against last good FMD posting,
- * if a dup then resend response but skip repost to FMD
- */
-
- if (ev_hdrp->ev_pp.pp_xid == etm_xid_posted_logged_ev) {
- enq_rv = etm_maybe_enq_response(hdl, conn,
- ev_hdrp, hdr_sz, 0);
- fmd_hdl_debug(hdl, "info: skipping dup FMA event post "
- "xid 0x%x\n", etm_xid_posted_logged_ev);
- etm_stats.etm_rd_dup_fmaevent.fmds_value.ui64++;
- goto func_ret;
- }
-
- /* unpack each FMA event and post it to FMD */
-
- bp = body_buf;
- for (i = 0; i < ev_cnt; i++) {
- if ((n = nvlist_unpack((char *)bp,
- ev_hdrp->ev_lens[i], &evp, 0)) != 0) {
- resp_code = (-n);
- enq_rv = etm_maybe_enq_response(hdl, conn,
- ev_hdrp, hdr_sz, resp_code);
- fmd_hdl_error(hdl, "error: FMA event dropped: "
- "bad event body unpack errno %d\n", n);
- if (etm_debug_lvl >= 2) {
- fmd_hdl_debug(hdl, "info: FMA event "
- "hexdump %d bytes:\n",
- ev_hdrp->ev_lens[i]);
- etm_hexdump(hdl, bp,
- ev_hdrp->ev_lens[i]);
- }
- etm_stats.etm_os_nvlist_unpack_fail.fmds_value.
- ui64++;
- etm_stats.etm_rd_drop_fmaevent.fmds_value.
- ui64++;
- bp += ev_hdrp->ev_lens[i];
- continue;
- }
-
- if (etm_debug_lvl >= 1) {
- (void) nvlist_lookup_string(evp, FM_CLASS,
- &class);
- if (class == NULL) {
- class = "NULL";
- }
- fmd_hdl_debug(hdl, "info: FMA event %p "
- "class %s\n", evp, class);
- }
-
- rc = nvlist_size(evp, &evsz, NV_ENCODE_XDR);
- fmd_hdl_debug(hdl,
- "info: evp size before pack ds msg %d\n", evsz);
- ldom_name[0] = '\0';
- rc = etm_filter_find_ldom_id(hdl, evp, ldom_name,
- MAX_LDOM_NAME, &did);
-
- /*
- * if rc is zero and the ldom_name is not "primary",
- * the evp belongs to a root domain, put the evp in an
- * outgoing etm queue,
- * in all other cases, whether ldom_name is primary or
- * can't find a ldom name, call etm_post_to_fmd
- */
- if ((rc == 0) && strcmp(ldom_name, "primary") &&
- strcmp(ldom_name, "")) {
- /*
- * use the ldom_name, guaranteered at this point
- * to be a valid ldom name/non-NULL, to find the
- * iosvc data.
- * add an iosvc struct if can not find one
- */
- (void) pthread_mutex_unlock(&iosvc_list_lock);
- iosvc = etm_iosvc_lookup(hdl, ldom_name,
- DS_INVALID_HDL, B_TRUE);
- (void) pthread_mutex_unlock(&iosvc_list_lock);
- if (iosvc == NULL) {
- fmd_hdl_debug(hdl,
- "error: can't find iosvc for ldom "
- "name %s\n", ldom_name);
- } else {
- resp_code = 0;
- (void) etm_pack_ds_msg(hdl, iosvc,
- ev_hdrp, hdr_sz, evp,
- SP_MSG, ETM_CKPT_SAVE);
- /*
- * call the new fmd_xprt_log()
- */
- fmd_xprt_log(hdl, etm_fmd_xprt, evp, 0);
- etm_xid_posted_logged_ev =
- ev_hdrp->ev_pp.pp_xid;
- }
- } else {
- /*
- * post the fma event to the control fmd
- */
- resp_code = etm_post_to_fmd(hdl, etm_fmd_xprt,
- evp);
- if (resp_code >= 0) {
- etm_xid_posted_logged_ev =
- ev_hdrp->ev_pp.pp_xid;
- }
- }
-
- evp = NULL;
- enq_rv = etm_maybe_enq_response(hdl, conn,
- ev_hdrp, hdr_sz, resp_code);
- bp += ev_hdrp->ev_lens[i];
- } /* foreach FMA event in the body buffer */
-
- } else if (ev_hdrp->ev_pp.pp_msg_type == ETM_MSG_TYPE_CONTROL) {
-
- ctl_hdrp = (void*)ev_hdrp;
-
- fmd_hdl_debug(hdl, "info: rcvd CONTROL msg from xport\n");
- if (etm_debug_lvl >= 1) {
- fmd_hdl_debug(hdl, "info: ctl sel %d xid 0x%x\n",
- (int)ctl_hdrp->ctl_pp.pp_sub_type,
- ctl_hdrp->ctl_pp.pp_xid);
- }
-
- /*
- * if we have a VER_NEGOT_REQ read the body and validate
- * the protocol version set contained therein,
- * otherwise we have a PING_REQ (which has no body)
- * and we [also] fall thru to the code which sends a
- * response msg if the pp_timeout field requested one
- */
-
- if (ctl_hdrp->ctl_pp.pp_sub_type == ETM_CTL_SEL_VER_NEGOT_REQ) {
-
- body_sz = ctl_hdrp->ctl_len;
- body_buf = fmd_hdl_zalloc(hdl, body_sz, FMD_SLEEP);
-
- if ((n = etm_io_op(hdl, "bad io read on ctl body",
- conn, body_buf, body_sz, ETM_IO_OP_RD)) < 0) {
- should_reset_xport = (n == -ENOTACTIVE);
- goto func_ret;
- }
-
- /* complain if version set completely incompatible */
-
- for (i = 0; i < body_sz; i++) {
- if ((body_buf[i] == ETM_PROTO_V1) ||
- (body_buf[i] == ETM_PROTO_V2) ||
- (body_buf[i] == ETM_PROTO_V3)) {
- break;
- }
- }
- if (i >= body_sz) {
- etm_stats.etm_ver_bad.fmds_value.ui64++;
- resp_code = (-EPROTO);
- }
-
- } /* if got version set request */
-
- etm_stats.etm_rd_body_control.fmds_value.ui64++;
-
- enq_rv = etm_maybe_enq_response(hdl, conn,
- ctl_hdrp, hdr_sz, resp_code);
-
- } else if (ev_hdrp->ev_pp.pp_msg_type == ETM_MSG_TYPE_RESPONSE) {
-
- resp_hdrp = (void*)ev_hdrp;
-
- fmd_hdl_debug(hdl, "info: rcvd RESPONSE msg from xport\n");
- if (etm_debug_lvl >= 1) {
- fmd_hdl_debug(hdl, "info: resp xid 0x%x\n",
- (int)resp_hdrp->resp_pp.pp_xid);
- }
-
- body_sz = resp_hdrp->resp_len;
- body_buf = fmd_hdl_zalloc(hdl, body_sz, FMD_SLEEP);
-
- if ((n = etm_io_op(hdl, "bad io read on resp len",
- conn, body_buf, body_sz, ETM_IO_OP_RD)) < 0) {
- should_reset_xport = (n == -ENOTACTIVE);
- goto func_ret;
- }
-
- etm_stats.etm_rd_body_response.fmds_value.ui64++;
-
- /*
- * look up the xid to interpret the response body
- *
- * ping is a nop; for ver negot confirm that a supported
- * protocol version was negotiated and remember which one
- */
-
- if ((resp_hdrp->resp_pp.pp_xid != etm_xid_ping) &&
- (resp_hdrp->resp_pp.pp_xid != etm_xid_ver_negot)) {
- etm_stats.etm_xid_bad.fmds_value.ui64++;
- goto func_ret;
- }
-
- if (resp_hdrp->resp_pp.pp_xid == etm_xid_ver_negot) {
- if ((body_buf[0] < ETM_PROTO_V1) ||
- (body_buf[0] > ETM_PROTO_V3)) {
- etm_stats.etm_ver_bad.fmds_value.ui64++;
- goto func_ret;
- }
- etm_resp_ver = body_buf[0];
- } /* if have resp to last req to negotiate proto ver */
-
- } else if (ev_hdrp->ev_pp.pp_msg_type == ETM_MSG_TYPE_ALERT) {
-
- sa_hdrp = (void*)ev_hdrp;
-
- fmd_hdl_debug(hdl, "info: rcvd ALERT msg from xport\n");
- if (etm_debug_lvl >= 1) {
- fmd_hdl_debug(hdl, "info: sa sel %d xid 0x%x\n",
- (int)sa_hdrp->sa_pp.pp_sub_type,
- sa_hdrp->sa_pp.pp_xid);
- }
-
- body_sz = sa_hdrp->sa_len;
- body_buf = fmd_hdl_zalloc(hdl, body_sz, FMD_SLEEP);
-
- if ((n = etm_io_op(hdl, "bad io read on sa body",
- conn, body_buf, body_sz, ETM_IO_OP_RD)) < 0) {
- should_reset_xport = (n == -ENOTACTIVE);
- goto func_ret;
- }
-
- etm_stats.etm_rd_body_alert.fmds_value.ui64++;
-
- /*
- * now that we've read the entire ETM msg from the conn,
- * which avoids later ETM protocol framing errors if we didn't,
- * check for dup msg/xid against last good syslog posting,
- * if a dup then resend response but skip repost to syslog
- */
-
- if (sa_hdrp->sa_pp.pp_xid == etm_xid_posted_sa) {
- enq_rv = etm_maybe_enq_response(hdl, conn,
- sa_hdrp, hdr_sz, 0);
- fmd_hdl_debug(hdl, "info: skipping dup ALERT post "
- "xid 0x%x\n", etm_xid_posted_sa);
- etm_stats.etm_rd_dup_alert.fmds_value.ui64++;
- goto func_ret;
- }
-
- resp_code = etm_post_to_syslog(hdl, sa_hdrp->sa_priority,
- body_sz, body_buf);
- if (resp_code >= 0) {
- etm_xid_posted_sa = sa_hdrp->sa_pp.pp_xid;
- }
- enq_rv = etm_maybe_enq_response(hdl, conn,
- sa_hdrp, hdr_sz, resp_code);
- } /* whether we have a FMA_EVENT, CONTROL, RESPONSE or ALERT msg */
-
-func_ret:
-
- if (etm_debug_lvl >= 2) {
- etm_show_time(hdl, "post conn handle");
- }
-
- /*
- * if no responder ele was enqueued, close the conn now
- * and free the ETM msg hdr; the ETM msg body is not needed
- * by the responder thread and should always be freed here
- */
-
- if (enq_rv <= 0) {
- (void) etm_conn_close(hdl, "bad conn close after msg recv",
- conn);
- if (ev_hdrp != NULL) {
- fmd_hdl_free(hdl, ev_hdrp, hdr_sz);
- }
- }
- if (body_buf != NULL) {
- fmd_hdl_free(hdl, body_buf, body_sz);
- }
- if (should_reset_xport) {
- etm_reset_xport(hdl);
- }
-} /* etm_handle_new_conn() */
-
-/*
- * etm_handle_bad_accept - recover from a failed connection acceptance
- */
-
-static void
-etm_handle_bad_accept(fmd_hdl_t *hdl, int nev)
-{
- int should_reset_xport; /* bool to reset xport */
-
- should_reset_xport = (nev == -ENOTACTIVE);
- fmd_hdl_debug(hdl, "error: bad conn accept errno %d\n", (-nev));
- etm_stats.etm_xport_accept_fail.fmds_value.ui64++;
- (void) etm_sleep(etm_bad_acc_to_sec); /* avoid spinning CPU */
- if (should_reset_xport) {
- etm_reset_xport(hdl);
- }
-} /* etm_handle_bad_accept() */
-
-/*
- * etm_server - loop forever accepting new connections
- * using the given FMD handle,
- * handling any ETM msgs sent from the other side
- * via each such connection
- */
-
-static void
-etm_server(void *arg)
-{
- etm_xport_conn_t conn; /* connection handle */
- int nev; /* -errno val */
- fmd_hdl_t *hdl; /* FMD handle */
-
- hdl = arg;
-
- fmd_hdl_debug(hdl, "info: connection server starting\n");
-
- /*
- * Restore the checkpointed events and dispatch them before starting to
- * receive more events from the sp.
- */
- etm_ckpt_recover(hdl);
-
- while (!etm_is_dying) {
-
- if ((conn = etm_xport_accept(hdl, NULL)) == NULL) {
- /* errno assumed set by above call */
- nev = (-errno);
- if (etm_is_dying) {
- break;
- }
- etm_handle_bad_accept(hdl, nev);
- continue;
- }
-
- /* handle the new message/connection, closing it when done */
-
- etm_handle_new_conn(hdl, conn);
-
- } /* while accepting new connections until ETM dies */
-
- /* ETM is dying (probably due to "fmadm unload etm") */
-
- fmd_hdl_debug(hdl, "info: connection server is dying\n");
-
-} /* etm_server() */
-
-/*
- * etm_responder - loop forever waiting for new responder queue elements
- * to be enqueued, for each one constructing and sending
- * an ETM response msg to the other side, and closing its
- * associated connection when appropriate
- *
- * this thread exists to ensure that the etm_server() thread
- * never pends indefinitely waiting on the xport write lock, and is
- * hence always available to accept new connections and handle
- * incoming messages
- *
- * this design relies on the fact that each connection accepted and
- * returned by the ETM xport layer is unique, and each can be closed
- * independently of the others while multiple connections are
- * outstanding
- */
-
-static void
-etm_responder(void *arg)
-{
- ssize_t n; /* gen use */
- fmd_hdl_t *hdl; /* FMD handle */
- etm_resp_q_ele_t rqe; /* responder queue ele */
-
- hdl = arg;
-
- fmd_hdl_debug(hdl, "info: responder server starting\n");
-
- while (!etm_is_dying) {
-
- (void) pthread_mutex_lock(&etm_resp_q_lock);
-
- while (etm_resp_q_cur_len == 0) {
- (void) pthread_cond_wait(&etm_resp_q_cv,
- &etm_resp_q_lock);
- if (etm_is_dying) {
- (void) pthread_mutex_unlock(&etm_resp_q_lock);
- goto func_ret;
- }
- } /* while the responder queue is empty, wait to be nudged */
-
- /*
- * for every responder ele that has been enqueued,
- * dequeue and send it as an ETM response msg,
- * closing its associated conn and freeing its hdr
- *
- * enter the queue draining loop holding the responder
- * queue lock, but do not hold the lock indefinitely
- * (the actual send may pend us indefinitely),
- * so that other threads will never pend for long
- * trying to enqueue a new element
- */
-
- while (etm_resp_q_cur_len > 0) {
-
- (void) etm_resp_q_deq(hdl, &rqe);
-
- if ((etm_resp_q_cur_len + 1) == etm_resp_q_max_len)
- (void) pthread_cond_signal(&etm_resp_q_cv);
-
- (void) pthread_mutex_unlock(&etm_resp_q_lock);
-
- if ((n = etm_send_response(hdl, rqe.rqe_conn,
- rqe.rqe_hdrp, rqe.rqe_resp_code)) < 0) {
- fmd_hdl_error(hdl, "error: bad resp send "
- "errno %d\n", (-n));
- }
-
- (void) etm_conn_close(hdl, "bad conn close after resp",
- rqe.rqe_conn);
- fmd_hdl_free(hdl, rqe.rqe_hdrp, rqe.rqe_hdr_sz);
-
- if (etm_is_dying) {
- goto func_ret;
- }
- (void) pthread_mutex_lock(&etm_resp_q_lock);
-
- } /* while draining the responder queue */
-
- (void) pthread_mutex_unlock(&etm_resp_q_lock);
-
- } /* while awaiting and sending resp msgs until ETM dies */
-
-func_ret:
-
- /* ETM is dying (probably due to "fmadm unload etm") */
-
- fmd_hdl_debug(hdl, "info: responder server is dying\n");
-
- (void) pthread_mutex_lock(&etm_resp_q_lock);
- if (etm_resp_q_cur_len > 0) {
- fmd_hdl_error(hdl, "warning: %d response msgs dropped\n",
- (int)etm_resp_q_cur_len);
- while (etm_resp_q_cur_len > 0) {
- (void) etm_resp_q_deq(hdl, &rqe);
- (void) etm_conn_close(hdl, "bad conn close after deq",
- rqe.rqe_conn);
- fmd_hdl_free(hdl, rqe.rqe_hdrp, rqe.rqe_hdr_sz);
- }
- }
- (void) pthread_mutex_unlock(&etm_resp_q_lock);
-
-} /* etm_responder() */
-
-static void *
-etm_init_alloc(size_t size)
-{
- return (fmd_hdl_alloc(init_hdl, size, FMD_SLEEP));
-}
-
-static void
-etm_init_free(void *addr, size_t size)
-{
- fmd_hdl_free(init_hdl, addr, size);
-}
-
-/*
- * ---------------------root ldom support functions -----------------------
- */
-
-/*
- * use a static array async_event_q instead of dynamicaly allocated mem queue
- * for etm_async_q_enq and etm_async_q_deq.
- * This is not running in an fmd aux thread, can't use the fmd_hdl_* funcs.
- * caller needs to grab the mutex lock before calling this func.
- * return >0 for success, or -errno value
- */
-static int
-etm_async_q_enq(etm_async_event_ele_t *async_e)
-{
-
- if (etm_async_q_cur_len >= etm_async_q_max_len) {
- /* etm_stats.etm_enq_drop_async_q.fmds_value.ui64++; */
- return (-E2BIG);
- }
-
- (void) memcpy(&async_event_q[etm_async_q_tail], async_e,
- sizeof (*async_e));
-
- etm_async_q_tail++;
- if (etm_async_q_tail == etm_async_q_max_len) {
- etm_async_q_tail = 0;
- }
- etm_async_q_cur_len++;
-
-/* etm_stats.etm_async_q_cur_len.fmds_value.ui64 = etm_async_q_cur_len; */
-
- return (1);
-
-} /* etm_async_q_enq() */
-
-
-static int
-etm_async_q_deq(etm_async_event_ele_t *async_e)
-{
-
- if (etm_async_q_cur_len == 0) {
- /* etm_stats.etm_deq_drop_async_q.fmds_value.ui64++; */
- return (-ENOENT);
- }
-
- (void) memcpy(async_e, &async_event_q[etm_async_q_head],
- sizeof (*async_e));
-
- etm_async_q_head++;
- if (etm_async_q_head == etm_async_q_max_len) {
- etm_async_q_head = 0;
- }
- etm_async_q_cur_len--;
-
- return (1);
-} /* etm_async_q_deq */
-
-
-/*
- * setting up the fields in iosvc at DS_REG_CB time
- */
-void
-etm_iosvc_setup(fmd_hdl_t *fmd_hdl, etm_iosvc_t *iosvc,
- etm_async_event_ele_t *async_e)
-{
- iosvc->ds_hdl = async_e->ds_hdl;
- iosvc->cur_send_xid = 0;
- iosvc->xid_posted_ev = 0;
- iosvc->start_sending_Q = 0;
-
- /*
- * open the fmd xprt if it
- * hasn't been previously opened
- */
- fmd_hdl_debug(fmd_hdl, "info: before fmd_xprt_open ldom_name is %s\n",
- async_e->ldom_name);
-
- if (iosvc->fmd_xprt == NULL) {
- iosvc->fmd_xprt = fmd_xprt_open(fmd_hdl, flags, NULL, iosvc);
- }
-
- iosvc->thr_is_dying = 0;
- if (iosvc->recv_tid == 0) {
- iosvc->recv_tid = fmd_thr_create(fmd_hdl,
- etm_recv_from_remote_root, iosvc);
- }
- if (iosvc->send_tid == 0) {
- iosvc->send_tid = fmd_thr_create(fmd_hdl,
- etm_send_to_remote_root, iosvc);
- }
-} /* etm_iosvc_setup() */
-
-
-/*
- * ds userland interface ds_reg_cb callback func
- */
-
-/* ARGSUSED */
-static void
-etm_iosvc_reg_handler(ds_hdl_t ds_hdl, ds_cb_arg_t arg, ds_ver_t *ver,
- ds_domain_hdl_t dhdl)
-{
- etm_async_event_ele_t async_ele;
-
-
- /*
- * do version check here.
- * checked the ver received here against etm_iosvc_vers here
- */
- if (etm_iosvc_vers[0].major != ver->major ||
- etm_iosvc_vers[0].minor != ver->minor) {
- /*
- * can't log an fmd debug msg,
- * not running in an fmd aux thread
- */
- return;
- }
-
- /*
- * the callback should have a valid ldom_name
- * can't log fmd debugging msg here since this is not in an fmd aux
- * thread. log fmd debug msg in etm_async_event_handle()
- */
- async_ele.ds_hdl = ds_hdl;
- async_ele.dhdl = dhdl;
- async_ele.ldom_name[0] = '\0';
- async_ele.event_type = ETM_ASYNC_EVENT_DS_REG_CB;
- (void) pthread_mutex_lock(&etm_async_event_q_lock);
- (void) etm_async_q_enq(&async_ele);
- if (etm_async_q_cur_len == 1)
- (void) pthread_cond_signal(&etm_async_event_q_cv);
- (void) pthread_mutex_unlock(&etm_async_event_q_lock);
-
-} /* etm_iosvc_reg_handler */
-
-
-/*
- * ds userland interface ds_unreg_cb callback func
- */
-
-/*ARGSUSED*/
-static void
-etm_iosvc_unreg_handler(ds_hdl_t hdl, ds_cb_arg_t arg)
-{
- etm_async_event_ele_t async_ele;
-
- /*
- * fill in async_ele and enqueue async_ele
- */
- async_ele.ldom_name[0] = '\0';
- async_ele.ds_hdl = hdl;
- async_ele.event_type = ETM_ASYNC_EVENT_DS_UNREG_CB;
- (void) pthread_mutex_lock(&etm_async_event_q_lock);
- (void) etm_async_q_enq(&async_ele);
- if (etm_async_q_cur_len == 1)
- (void) pthread_cond_signal(&etm_async_event_q_cv);
- (void) pthread_mutex_unlock(&etm_async_event_q_lock);
-} /* etm_iosvc_unreg_handler */
-
-/*
- * ldom event registration callback func
- */
-
-/* ARGSUSED */
-static void
-ldom_event_handler(char *ldom_name, ldom_event_t event, ldom_cb_arg_t data)
-{
- etm_async_event_ele_t async_ele;
-
- /*
- * the callback will have a valid ldom_name
- */
- async_ele.ldom_name[0] = '\0';
- if (ldom_name)
- (void) strcpy(async_ele.ldom_name, ldom_name);
- async_ele.ds_hdl = DS_INVALID_HDL;
-
- /*
- * fill in async_ele and enq async_ele
- */
- switch (event) {
- case LDOM_EVENT_BIND:
- async_ele.event_type = ETM_ASYNC_EVENT_LDOM_BIND;
- break;
- case LDOM_EVENT_UNBIND:
- async_ele.event_type = ETM_ASYNC_EVENT_LDOM_UNBIND;
- break;
- case LDOM_EVENT_ADD:
- async_ele.event_type = ETM_ASYNC_EVENT_LDOM_ADD;
- break;
- case LDOM_EVENT_REMOVE:
- async_ele.event_type = ETM_ASYNC_EVENT_LDOM_REMOVE;
- break;
- default:
- /*
- * for all other ldom events, do nothing
- */
- return;
- } /* switch (event) */
-
- (void) pthread_mutex_lock(&etm_async_event_q_lock);
- (void) etm_async_q_enq(&async_ele);
- if (etm_async_q_cur_len == 1)
- (void) pthread_cond_signal(&etm_async_event_q_cv);
- (void) pthread_mutex_unlock(&etm_async_event_q_lock);
-
-} /* ldom_event_handler */
-
-
-/*
- * This is running as an fmd aux thread.
- * This is the func that actually handle the events, which include:
- * 1. ldom events. ldom events are on Control Domain only
- * 2. any DS userland callback funcs
- * these events are already Q-ed in the async_event_ele_q
- * deQ and process the events accordingly
- */
-static void
-etm_async_event_handler(void *arg)
-{
-
- fmd_hdl_t *fmd_hdl = (fmd_hdl_t *)arg;
- etm_iosvc_t *iosvc; /* ptr 2 iosvc struct */
- etm_async_event_ele_t async_e;
-
- fmd_hdl_debug(fmd_hdl, "info: etm_async_event_handler starting\n");
- /*
- * handle etm is not dying and Q len > 0
- */
- while (!etm_is_dying) {
- /*
- * grab the lock to check the Q len
- */
- (void) pthread_mutex_lock(&etm_async_event_q_lock);
- fmd_hdl_debug(fmd_hdl, "info: etm_async_q_cur_len %d\n",
- etm_async_q_cur_len);
-
- while (etm_async_q_cur_len > 0) {
- (void) etm_async_q_deq(&async_e);
- (void) pthread_mutex_unlock(&etm_async_event_q_lock);
- fmd_hdl_debug(fmd_hdl,
- "info: processing an async event type %d ds_hdl"
- " %d\n", async_e.event_type, async_e.ds_hdl);
- if (async_e.ldom_name[0] != '\0') {
- fmd_hdl_debug(fmd_hdl,
- "info: procssing async evt ldom_name %s\n",
- async_e.ldom_name);
- }
-
- /*
- * at this point, if async_e.ldom_name is not NULL,
- * we have a valid iosvc strcut ptr.
- * the only time async_e.ldom_name is NULL is at
- * ds_unreg_cb()
- */
- switch (async_e.event_type) {
- case ETM_ASYNC_EVENT_LDOM_UNBIND:
- case ETM_ASYNC_EVENT_LDOM_REMOVE:
- /*
- * we have a valid ldom_name,
- * etm_lookup_struct(ldom_name)
- * do nothing if can't find an iosvc
- * no iosvc clean up to do
- */
- (void) pthread_mutex_lock(
- &iosvc_list_lock);
- iosvc = etm_iosvc_lookup(fmd_hdl,
- async_e.ldom_name,
- async_e.ds_hdl, B_FALSE);
- if (iosvc == NULL) {
- fmd_hdl_debug(fmd_hdl,
- "error: can't find iosvc for ldom "
- "name %s\n",
- async_e.ldom_name);
- (void) pthread_mutex_unlock(
- &iosvc_list_lock);
- break;
- }
- /*
- * Clean up the queue, delete all messages and
- * do not persist checkpointed fma events.
- */
- etm_iosvc_cleanup(fmd_hdl, iosvc, B_TRUE,
- B_TRUE);
- (void) pthread_mutex_unlock(
- &iosvc_list_lock);
- break;
-
- case ETM_ASYNC_EVENT_LDOM_BIND:
-
- /*
- * create iosvc if it has not been
- * created
- * async_e.ds_hdl is invalid
- * async_e.ldom_name is valid ldom_name
- */
- (void) pthread_mutex_lock(
- &iosvc_list_lock);
- iosvc = etm_iosvc_lookup(fmd_hdl,
- async_e.ldom_name,
- async_e.ds_hdl, B_TRUE);
- if (iosvc == NULL) {
- fmd_hdl_debug(fmd_hdl,
- "error: can't create iosvc for "
- "async evnt %d\n",
- async_e.event_type);
- (void) pthread_mutex_unlock(
- &iosvc_list_lock);
- break;
- }
- (void) strcpy(iosvc->ldom_name,
- async_e.ldom_name);
- iosvc->ds_hdl = async_e.ds_hdl;
- (void) pthread_mutex_unlock(
- &iosvc_list_lock);
- break;
-
- case ETM_ASYNC_EVENT_DS_REG_CB:
- if (etm_ldom_type == LDOM_TYPE_CONTROL) {
- /*
- * find the root ldom name from
- * ldom domain hdl/id
- */
- if (etm_filter_find_ldom_name(
- fmd_hdl, async_e.dhdl,
- async_e.ldom_name,
- MAX_LDOM_NAME) != 0) {
- fmd_hdl_debug(fmd_hdl,
- "error: can't find root "
- "domain name from did %d\n",
- async_e.dhdl);
- break;
- } else {
- fmd_hdl_debug(fmd_hdl,
- "info: etm_filter_find_"
- "ldom_name returned %s\n",
- async_e.ldom_name);
- }
- /*
- * now we should have a valid
- * root domain name.
- * lookup the iosvc struct
- * associated with the ldom_name
- * and init the iosvc struct
- */
- (void) pthread_mutex_lock(
- &iosvc_list_lock);
- iosvc = etm_iosvc_lookup(
- fmd_hdl, async_e.ldom_name,
- async_e.ds_hdl, B_TRUE);
- if (iosvc == NULL) {
- fmd_hdl_debug(fmd_hdl,
- "error: can't create iosvc "
- "for async evnt %d\n",
- async_e.event_type);
- (void) pthread_mutex_unlock(
- &iosvc_list_lock);
- break;
- }
-
- etm_iosvc_setup(fmd_hdl, iosvc,
- &async_e);
- (void) pthread_mutex_unlock(
- &iosvc_list_lock);
- } else {
- iosvc = &io_svc;
- (void) strcpy(iosvc->ldom_name,
- async_e.ldom_name);
-
- etm_iosvc_setup(fmd_hdl, iosvc,
- &async_e);
- }
- break;
-
- case ETM_ASYNC_EVENT_DS_UNREG_CB:
- /*
- * decide which iosvc struct to perform
- * this UNREG callback on.
- */
- if (etm_ldom_type == LDOM_TYPE_CONTROL) {
- (void) pthread_mutex_lock(
- &iosvc_list_lock);
- /*
- * lookup the iosvc struct w/
- * ds_hdl
- */
- iosvc = etm_iosvc_lookup(
- fmd_hdl, async_e.ldom_name,
- async_e.ds_hdl, B_FALSE);
- if (iosvc == NULL) {
- fmd_hdl_debug(fmd_hdl,
- "error: can't find iosvc "
- "for async evnt %d\n",
- async_e.event_type);
- (void) pthread_mutex_unlock(
- &iosvc_list_lock);
- break;
- }
-
- /*
- * ds_hdl and fmd_xprt_open
- * go hand to hand together
- * after unreg_cb,
- * ds_hdl is INVALID and
- * fmd_xprt is closed.
- * the ldom name and the msg Q
- * remains in iosvc_list
- */
- if (*iosvc->ldom_name != '\0')
- fmd_hdl_debug(fmd_hdl,
- "info: iosvc w/ ldom_name "
- "%s \n", iosvc->ldom_name);
-
- /*
- * destroy send/recv threads and
- * other clean up on Control side.
- */
- etm_iosvc_cleanup(fmd_hdl, iosvc,
- B_FALSE, B_FALSE);
- (void) pthread_mutex_unlock(
- &iosvc_list_lock);
- } else {
- iosvc = &io_svc;
- /*
- * destroy send/recv threads and
- * then clean up on Root side.
- */
- etm_iosvc_cleanup(fmd_hdl, iosvc,
- B_FALSE, B_FALSE);
- }
- break;
-
- default:
- /*
- * for all other events, etm doesn't care.
- * already logged an fmd info msg w/
- * the event type. Do nothing here.
- */
- break;
- } /* switch (async_e.event_type) */
-
- if (etm_ldom_type == LDOM_TYPE_CONTROL) {
- etm_filter_handle_ldom_event(fmd_hdl,
- async_e.event_type, async_e.ldom_name);
- }
-
- /*
- * grab the lock to check the q length again
- */
- (void) pthread_mutex_lock(&etm_async_event_q_lock);
-
- if (etm_is_dying) {
- break;
- }
- } /* etm_async_q_cur_len */
-
- /*
- * we have the mutex lock at this point, whether
- * . etm_is_dying and/or
- * . q_len == 0
- */
- if (!etm_is_dying && etm_async_q_cur_len == 0) {
- fmd_hdl_debug(fmd_hdl,
- "info: cond wait on async_event_q_cv\n");
- (void) pthread_cond_wait(&etm_async_event_q_cv,
- &etm_async_event_q_lock);
- fmd_hdl_debug(fmd_hdl,
- "info: cond wait on async_event_q_cv rtns\n");
- }
- (void) pthread_mutex_unlock(&etm_async_event_q_lock);
- } /* etm_is_dying */
-
- fmd_hdl_debug(fmd_hdl,
- "info: etm async event handler thread exiting\n");
-
-} /* etm_async_event_handler */
-
-/*
- * deQ what's in iosvc msg Q
- * send iosvc_msgp to the remote io svc ldom by calling ds_send_msg()
- * the iosvc_msgp already has the packed msg, which is hdr + 1 fma event
- */
-static void
-etm_send_to_remote_root(void *arg)
-{
-
- etm_iosvc_t *iosvc = (etm_iosvc_t *)arg; /* iosvc ptr */
- etm_iosvc_q_ele_t msg_ele; /* iosvc msg ele */
- etm_proto_v1_ev_hdr_t *ev_hdrp; /* hdr for FMA_EVENT */
- fmd_hdl_t *fmd_hdl = init_hdl; /* fmd handle */
-
-
- fmd_hdl_debug(fmd_hdl,
- "info: send to remote iosvc starting w/ ldom_name %s\n",
- iosvc->ldom_name);
-
- /*
- * loop forever until etm_is_dying or thr_is_dying
- */
- while (!etm_is_dying && !iosvc->thr_is_dying) {
- if (iosvc->ds_hdl != DS_INVALID_HDL &&
- iosvc->start_sending_Q > 0) {
- (void) pthread_mutex_lock(&iosvc->msg_q_lock);
- while (iosvc->msg_q_cur_len > 0 &&
- iosvc->ds_hdl != DS_INVALID_HDL) {
- (void) etm_iosvc_msg_deq(fmd_hdl, iosvc,
- &msg_ele);
- if (etm_debug_lvl >= 3) {
- fmd_hdl_debug(fmd_hdl, "info: valid "
- "ds_hdl before ds_send_msg \n");
- }
- (void) pthread_mutex_unlock(&iosvc->msg_q_lock);
-
- iosvc->ack_ok = 0;
- ev_hdrp = (etm_proto_v1_ev_hdr_t *)
- ((ptrdiff_t)msg_ele.msg);
- ev_hdrp->ev_pp.pp_xid = iosvc->cur_send_xid + 1;
- while (!iosvc->ack_ok &&
- iosvc->ds_hdl != DS_INVALID_HDL &&
- !etm_is_dying) {
- /*
- * call ds_send_msg() to send the msg,
- * wait for the recv end to send the
- * resp msg back.
- * If resp msg is recv-ed, ack_ok
- * will be set to 1.
- * otherwise, retry.
- */
- if (etm_send_ds_msg(fmd_hdl, B_TRUE,
- iosvc, &msg_ele, ev_hdrp) < 0) {
- continue;
- }
-
- if (etm_is_dying || iosvc->thr_is_dying)
- break;
- }
-
- /*
- * if out of the while loop but !ack_ok, ie,
- * ds_hdl becomes invalid at some point
- * while waiting the resp msg, we need to put
- * the msg back to the head of the Q.
- */
- if (!iosvc->ack_ok) {
- (void) pthread_mutex_lock(
- &iosvc->msg_q_lock);
- /*
- * put the msg back to the head of Q.
- * If the Q is full at this point,
- * drop the msg at the tail, enq this
- * msg to the head.
- */
- etm_msg_enq_head(fmd_hdl, iosvc,
- &msg_ele);
- (void) pthread_mutex_unlock(
- &iosvc->msg_q_lock);
- }
-
- /*
- *
- * grab the lock to check the Q len again
- */
- (void) pthread_mutex_lock(&iosvc->msg_q_lock);
- if (etm_is_dying || iosvc->thr_is_dying) {
- break;
- }
- } /* while dequeing iosvc msgs to send */
-
- /*
- * we have the mutex lock for msg_q_lock at this point
- * we are here because
- * 1) q_len == 0: then wait on the cv for Q to be filled
- * 2) etm_is_dying
- */
- if (!etm_is_dying && !iosvc->thr_is_dying &&
- iosvc->msg_q_cur_len == 0) {
- fmd_hdl_debug(fmd_hdl,
- "info: waiting on msg_q_cv\n");
- (void) pthread_cond_wait(&iosvc->msg_q_cv,
- &iosvc->msg_q_lock);
- }
- (void) pthread_mutex_unlock(&iosvc->msg_q_lock);
- if (etm_is_dying || iosvc->thr_is_dying) {
- break;
- }
- } else {
- (void) etm_sleep(1);
- } /* wait for the start_sendingQ > 0 */
- } /* etm_is_dying or thr_is_dying */
- fmd_hdl_debug(fmd_hdl, "info; etm send thread exiting \n");
-} /* etm_send_to_remote_root */
-
-
-/*
- * receive etm msgs from the remote root ldom by calling ds_recv_msg()
- * if FMA events/ereports, call fmd_xprt_post() to post to fmd
- * send ACK back by calling ds_send_msg()
- */
-static void
-etm_recv_from_remote_root(void *arg)
-{
- etm_iosvc_t *iosvc = (etm_iosvc_t *)arg; /* iosvc ptr */
- etm_proto_v1_pp_t *pp; /* protocol preamble */
- etm_proto_v1_ev_hdr_t *ev_hdrp; /* for FMA_EVENT msg */
- etm_proto_v1_resp_hdr_t *resp_hdrp; /* for RESPONSE msg */
- int32_t resp_code = 0; /* default is success */
- int32_t rc; /* return value */
- size_t maxlen = MAXLEN;
- /* max msg len */
- char msgbuf[MAXLEN]; /* recv msg buf */
- size_t msg_size; /* recv msg size */
- size_t hdr_sz; /* sizeof *hdrp */
- size_t evsz; /* sizeof *evp */
- size_t fma_event_size; /* sizeof FMA event */
- nvlist_t *evp; /* ptr to the nvlist */
- char *buf; /* ptr to the nvlist */
- static uint32_t mem_alloc = 0; /* indicate if alloc mem */
- char *msg; /* ptr to alloc mem */
- fmd_hdl_t *fmd_hdl = init_hdl;
-
-
-
- fmd_hdl_debug(fmd_hdl,
- "info: recv from remote iosvc starting with ldom name %s \n",
- iosvc->ldom_name);
-
- /*
- * loop forever until etm_is_dying or the thread is dying
- */
-
- msg = msgbuf;
- while (!etm_is_dying && !iosvc->thr_is_dying) {
- if (iosvc->ds_hdl == DS_INVALID_HDL) {
- fmd_hdl_debug(fmd_hdl,
- "info: ds_hdl is invalid in recv thr\n");
- (void) etm_sleep(1);
- continue;
- }
-
- /*
- * for now, there are FMA_EVENT and ACK msg type.
- * use FMA_EVENT buf as the maxlen, hdr+1 fma event.
- * FMA_EVENT is big enough to hold an ACK msg.
- * the actual msg size received is in msg_size.
- */
- rc = (*etm_ds_recv_msg)(iosvc->ds_hdl, msg, maxlen, &msg_size);
- if (rc == EFBIG) {
- fmd_hdl_debug(fmd_hdl,
- "info: ds_recv_msg needs mem the size of %d\n",
- msg_size);
- msg = fmd_hdl_zalloc(fmd_hdl, msg_size, FMD_SLEEP);
- mem_alloc = 1;
- } else if (rc == 0) {
- fmd_hdl_debug(fmd_hdl,
- "info: ds_recv_msg received a msg ok\n");
- /*
- * check the magic # in msg.hdr
- */
- pp = (etm_proto_v1_pp_t *)((ptrdiff_t)msg);
- if (pp->pp_magic_num != ETM_PROTO_MAGIC_NUM) {
- fmd_hdl_debug(fmd_hdl,
- "info: bad ds recv on magic\n");
- continue;
- }
-
- /*
- * check the msg type against msg_size to be sure
- * that received msg is not a truncated msg
- */
- if (pp->pp_msg_type == ETM_MSG_TYPE_FMA_EVENT) {
-
- ev_hdrp = (etm_proto_v1_ev_hdr_t *)
- ((ptrdiff_t)msg);
- fmd_hdl_debug(fmd_hdl, "info: ds received "
- "FMA EVENT xid=%d msg_size=%d\n",
- ev_hdrp->ev_pp.pp_xid, msg_size);
- hdr_sz = sizeof (*ev_hdrp) +
- 1*(sizeof (ev_hdrp->ev_lens[0]));
- fma_event_size = hdr_sz + ev_hdrp->ev_lens[0];
- if (fma_event_size != msg_size) {
- fmd_hdl_debug(fmd_hdl, "info: wrong "
- "ev msg size received\n");
- continue;
- /*
- * Simply do nothing. The send side
- * will timedcond_wait waiting on the
- * resp msg will timeout and
- * re-send the same msg.
- */
- }
- if (etm_debug_lvl >= 3) {
- fmd_hdl_debug(fmd_hdl, "info: recv msg"
- " size %d hdrsz %d evp size %d\n",
- msg_size, hdr_sz,
- ev_hdrp->ev_lens[0]);
- }
-
- if (ev_hdrp->ev_pp.pp_xid !=
- iosvc->xid_posted_ev) {
- /*
- * different from last xid posted to
- * fmd, post to fmd now.
- */
- buf = msg + hdr_sz;
- rc = nvlist_unpack(buf,
- ev_hdrp->ev_lens[0], &evp, 0);
- rc = nvlist_size(evp, &evsz,
- NV_ENCODE_XDR);
- fmd_hdl_debug(fmd_hdl,
- "info: evp size %d before fmd"
- "post\n", evsz);
-
- if ((rc = etm_post_to_fmd(fmd_hdl,
- iosvc->fmd_xprt, evp)) >= 0) {
- fmd_hdl_debug(fmd_hdl,
- "info: xid posted to fmd %d"
- "\n",
- ev_hdrp->ev_pp.pp_xid);
- iosvc->xid_posted_ev =
- ev_hdrp->ev_pp.pp_xid;
- }
- }
-
- /*
- * ready to send the RESPONSE msg back
- * reuse the msg buffer as the response buffer
- */
- resp_hdrp = (etm_proto_v1_resp_hdr_t *)
- ((ptrdiff_t)msg);
- resp_hdrp->resp_pp.pp_msg_type =
- ETM_MSG_TYPE_RESPONSE;
-
- resp_hdrp->resp_code = resp_code;
- resp_hdrp->resp_len = sizeof (*resp_hdrp);
-
- /*
- * send the whole response msg in one send
- */
- if ((*etm_ds_send_msg)(iosvc->ds_hdl, msg,
- sizeof (*resp_hdrp)) != 0) {
- fmd_hdl_debug(fmd_hdl,
- "info: send response msg failed\n");
- } else {
- fmd_hdl_debug(fmd_hdl,
- "info: ds send resp msg ok"
- "size %d\n", sizeof (*resp_hdrp));
- }
- } else if (pp->pp_msg_type == ETM_MSG_TYPE_RESPONSE) {
- fmd_hdl_debug(fmd_hdl,
- "info: ds received respond msg xid=%d"
- "msg_size=%d for ldom %s\n", pp->pp_xid,
- msg_size, iosvc->ldom_name);
- if (sizeof (*resp_hdrp) != msg_size) {
- fmd_hdl_debug(fmd_hdl,
- "info: wrong resp msg size"
- "received\n");
- fmd_hdl_debug(fmd_hdl,
- "info: resp msg size %d recv resp"
- "msg size %d\n",
- sizeof (*resp_hdrp), msg_size);
- continue;
- }
- /*
- * is the pp.pp_xid == iosvc->cur_send_xid+1,
- * if so, nudge the send routine to send next
- */
- if (pp->pp_xid != iosvc->cur_send_xid+1) {
- fmd_hdl_debug(fmd_hdl,
- "info: ds received resp msg xid=%d "
- "doesn't match cur_send_id=%d\n",
- pp->pp_xid, iosvc->cur_send_xid+1);
- continue;
- }
- (void) pthread_mutex_lock(&iosvc->msg_ack_lock);
- iosvc->ack_ok = 1;
- (void) pthread_cond_signal(&iosvc->msg_ack_cv);
- (void) pthread_mutex_unlock(
- &iosvc->msg_ack_lock);
- fmd_hdl_debug(fmd_hdl,
- "info: signaling msg_ack_cv\n");
- } else {
- /*
- * place holder for future msg types
- */
- fmd_hdl_debug(fmd_hdl,
- "info: ds received unrecognized msg\n");
- }
- if (mem_alloc) {
- fmd_hdl_free(fmd_hdl, msg, msg_size);
- mem_alloc = 0;
- msg = msgbuf;
- }
- } else {
- if (etm_debug_lvl >= 3) {
- fmd_hdl_debug(fmd_hdl,
- "info: ds_recv_msg() failed\n");
- }
- } /* ds_recv_msg() returns */
- } /* etm_is_dying */
-
- /*
- * need to free the mem allocated in msg upon exiting the thread
- */
- if (mem_alloc) {
- fmd_hdl_free(fmd_hdl, msg, msg_size);
- mem_alloc = 0;
- msg = msgbuf;
- }
- fmd_hdl_debug(fmd_hdl, "info; etm recv thread exiting \n");
-} /* etm_recv_from_remote_root */
-
-
-
-/*
- * etm_ds_init
- * initialize DS services function pointers by calling
- * dlopen() followed by dlsym() for each ds func.
- * if any dlopen() or dlsym() call fails, return -ENOENT
- * return >0 for successs, -ENOENT for failure
- */
-static int
-etm_ds_init(fmd_hdl_t *hdl)
-{
- int rc = 0;
-
- if ((etm_dl_hdl = dlopen(etm_dl_path, etm_dl_mode)) == NULL) {
- fmd_hdl_debug(hdl, "error: failed to dlopen %s\n", etm_dl_path);
- return (-ENOENT);
- }
-
- etm_ds_svc_reg = (int (*)(ds_capability_t *cap, ds_ops_t *ops))
- dlsym(etm_dl_hdl, "ds_svc_reg");
- if (etm_ds_svc_reg == NULL) {
- fmd_hdl_debug(hdl,
- "error: failed to dlsym ds_svc_reg() w/ error %s\n",
- dlerror());
- rc = -ENOENT;
- }
-
-
- etm_ds_clnt_reg = (int (*)(ds_capability_t *cap, ds_ops_t *ops))
- dlsym(etm_dl_hdl, "ds_clnt_reg");
- if (etm_ds_clnt_reg == NULL) {
- fmd_hdl_debug(hdl,
- "error: dlsym(ds_clnt_reg) failed w/ errno %d\n", errno);
- rc = -ENOENT;
- }
-
- etm_ds_send_msg = (int (*)(ds_hdl_t hdl, void *buf, size_t buflen))
- dlsym(etm_dl_hdl, "ds_send_msg");
- if (etm_ds_send_msg == NULL) {
- fmd_hdl_debug(hdl, "error: dlsym(ds_send_msg) failed\n");
- rc = -ENOENT;
- }
-
- etm_ds_recv_msg = (int (*)(ds_hdl_t hdl, void *buf, size_t buflen,
- size_t *msglen))dlsym(etm_dl_hdl, "ds_recv_msg");
- if (etm_ds_recv_msg == NULL) {
- fmd_hdl_debug(hdl, "error: dlsym(ds_recv_msg) failed\n");
- rc = -ENOENT;
- }
-
- etm_ds_fini = (int (*)(void))dlsym(etm_dl_hdl, "ds_fini");
- if (etm_ds_fini == NULL) {
- fmd_hdl_debug(hdl, "error: dlsym(ds_fini) failed\n");
- rc = -ENOENT;
- }
-
- if (rc == -ENOENT) {
- (void) dlclose(etm_dl_hdl);
- }
- return (rc);
-
-} /* etm_ds_init() */
-
-
-/*
- * -------------------------- FMD entry points -------------------------------
- */
-
-/*
- * _fmd_init - initialize the transport for use by ETM and start the
- * server daemon to accept new connections to us
- *
- * FMD will read our *.conf and subscribe us to FMA events
- */
-
-void
-_fmd_init(fmd_hdl_t *hdl)
-{
- struct timeval tmv; /* timeval */
- ssize_t n; /* gen use */
- const struct facility *fp; /* syslog facility matching */
- char *facname; /* syslog facility property */
- uint32_t type_mask; /* type of the local host */
- int rc; /* funcs return code */
-
-
- if (fmd_hdl_register(hdl, FMD_API_VERSION, &fmd_info) != 0) {
- return; /* invalid data in configuration file */
- }
-
- fmd_hdl_debug(hdl, "info: module initializing\n");
-
- init_hdl = hdl;
- etm_lhp = ldom_init(etm_init_alloc, etm_init_free);
-
- /*
- * decide the ldom type, do initialization accordingly
- */
- if ((rc = ldom_get_type(etm_lhp, &type_mask)) != 0) {
- fmd_hdl_debug(hdl, "error: can't decide ldom type\n");
- fmd_hdl_debug(hdl, "info: module unregistering\n");
- ldom_fini(etm_lhp);
- fmd_hdl_unregister(hdl);
- return;
- }
-
- if ((type_mask & LDOM_TYPE_LEGACY) || (type_mask & LDOM_TYPE_CONTROL)) {
- if (type_mask & LDOM_TYPE_LEGACY) {
- /*
- * running on a legacy sun4v domain,
- * act as the the old sun4v
- */
- etm_ldom_type = LDOM_TYPE_LEGACY;
- fmd_hdl_debug(hdl, "info: running as the old sun4v\n");
- ldom_fini(etm_lhp);
- } else if (type_mask & LDOM_TYPE_CONTROL) {
- etm_ldom_type = LDOM_TYPE_CONTROL;
- fmd_hdl_debug(hdl, "info: running as control domain\n");
-
- /*
- * looking for libds.so.1.
- * If not found, don't do DS registration. As a result,
- * there will be no DS callbacks or other DS services.
- */
- if (etm_ds_init(hdl) >= 0) {
- etm_filter_init(hdl);
- etm_ckpt_init(hdl);
-
- flags = FMD_XPRT_RDWR | FMD_XPRT_ACCEPT;
-
- /*
- * ds client registration
- */
- if ((rc = (*etm_ds_clnt_reg)(&iosvc_caps,
- &iosvc_ops))) {
- fmd_hdl_debug(hdl,
- "error: ds_clnt_reg(): errno %d\n", rc);
- }
- } else {
- fmd_hdl_debug(hdl, "error: dlopen() libds "
- "failed, continue without the DS services");
- }
-
- /*
- * register for ldom status events
- */
- if ((rc = ldom_register_event(etm_lhp,
- ldom_event_handler, hdl))) {
- fmd_hdl_debug(hdl,
- "error: ldom_register_event():"
- " errno %d\n", rc);
- }
-
- /*
- * create the thread for handling both the ldom status
- * change and service events
- */
- etm_async_e_tid = fmd_thr_create(hdl,
- etm_async_event_handler, hdl);
- }
-
- /* setup statistics and properties from FMD */
-
- (void) fmd_stat_create(hdl, FMD_STAT_NOALLOC,
- sizeof (etm_stats) / sizeof (fmd_stat_t),
- (fmd_stat_t *)&etm_stats);
-
- etm_fma_resp_wait_time = fmd_prop_get_int32(hdl,
- ETM_PROP_NM_FMA_RESP_WAIT_TIME);
- etm_debug_lvl = fmd_prop_get_int32(hdl, ETM_PROP_NM_DEBUG_LVL);
- etm_debug_max_ev_cnt = fmd_prop_get_int32(hdl,
- ETM_PROP_NM_DEBUG_MAX_EV_CNT);
- fmd_hdl_debug(hdl, "info: etm_debug_lvl %d "
- "etm_debug_max_ev_cnt %d\n", etm_debug_lvl,
- etm_debug_max_ev_cnt);
-
- etm_resp_q_max_len = fmd_prop_get_int32(hdl,
- ETM_PROP_NM_MAX_RESP_Q_LEN);
- etm_stats.etm_resp_q_max_len.fmds_value.ui64 =
- etm_resp_q_max_len;
- etm_bad_acc_to_sec = fmd_prop_get_int32(hdl,
- ETM_PROP_NM_BAD_ACC_TO_SEC);
-
- /*
- * obtain an FMD transport handle so we can post
- * FMA events later
- */
-
- etm_fmd_xprt = fmd_xprt_open(hdl, FMD_XPRT_RDONLY, NULL, NULL);
-
- /*
- * encourage protocol transaction id to be unique per module
- * load
- */
-
- (void) gettimeofday(&tmv, NULL);
- etm_xid_cur = (uint32_t)((tmv.tv_sec << 10) |
- ((unsigned long)tmv.tv_usec >> 10));
-
- /* init the ETM transport */
-
- if ((n = etm_xport_init(hdl)) != 0) {
- fmd_hdl_error(hdl, "error: bad xport init errno %d\n",
- (-n));
- fmd_hdl_unregister(hdl);
- return;
- }
-
- /*
- * Cache any properties we use every time we receive an alert.
- */
- syslog_file = fmd_prop_get_int32(hdl, ETM_PROP_NM_SYSLOGD);
- syslog_cons = fmd_prop_get_int32(hdl, ETM_PROP_NM_CONSOLE);
-
- if (syslog_file && (syslog_logfd = open("/dev/conslog",
- O_WRONLY | O_NOCTTY)) == -1) {
- fmd_hdl_error(hdl,
- "error: failed to open /dev/conslog");
- syslog_file = 0;
- }
-
- if (syslog_cons && (syslog_msgfd = open("/dev/sysmsg",
- O_WRONLY | O_NOCTTY)) == -1) {
- fmd_hdl_error(hdl, "error: failed to open /dev/sysmsg");
- syslog_cons = 0;
- }
-
- if (syslog_file) {
- /*
- * Look up the value of the "facility" property and
- * use it to determine * what syslog LOG_* facility
- * value we use to fill in our log_ctl_t.
- */
- facname = fmd_prop_get_string(hdl,
- ETM_PROP_NM_FACILITY);
-
- for (fp = syslog_facs; fp->fac_name != NULL; fp++) {
- if (strcmp(fp->fac_name, facname) == 0)
- break;
- }
-
- if (fp->fac_name == NULL) {
- fmd_hdl_error(hdl, "error: invalid 'facility'"
- " setting: %s\n", facname);
- syslog_file = 0;
- } else {
- syslog_facility = fp->fac_value;
- syslog_ctl.flags = SL_CONSOLE | SL_LOGONLY;
- }
-
- fmd_prop_free_string(hdl, facname);
- }
-
- /*
- * start the message responder and the connection acceptance
- * server; request protocol version be negotiated after waiting
- * a second for the receiver to be ready to start handshaking
- */
-
- etm_resp_tid = fmd_thr_create(hdl, etm_responder, hdl);
- etm_svr_tid = fmd_thr_create(hdl, etm_server, hdl);
-
- (void) etm_sleep(ETM_SLEEP_QUIK);
- etm_req_ver_negot(hdl);
-
- } else if (type_mask & LDOM_TYPE_ROOT) {
- etm_ldom_type = LDOM_TYPE_ROOT;
- fmd_hdl_debug(hdl, "info: running as root domain\n");
-
- /*
- * looking for libds.so.1.
- * If not found, don't do DS registration. As a result,
- * there will be no DS callbacks or other DS services.
- */
- if (etm_ds_init(hdl) < 0) {
- fmd_hdl_debug(hdl,
- "error: dlopen() libds failed, "
- "module unregistering\n");
- ldom_fini(etm_lhp);
- fmd_hdl_unregister(hdl);
- return;
- }
-
- /*
- * DS service registration
- */
- if ((rc = (*etm_ds_svc_reg)(&iosvc_caps, &iosvc_ops))) {
- fmd_hdl_debug(hdl, "error: ds_svc_reg(): errno %d\n",
- rc);
- }
-
- /*
- * this thread is created for ds_reg_cb/ds_unreg_cb
- */
- etm_async_e_tid = fmd_thr_create(hdl,
- etm_async_event_handler, hdl);
-
- flags = FMD_XPRT_RDWR;
- } else if ((type_mask & LDOM_TYPE_IO) || (type_mask == 0)) {
- /*
- * Do not load this module if it is
- * . runing on a non-root ldom
- * . the domain owns no io devices
- */
- fmd_hdl_debug(hdl,
- "info: non-root ldom, module unregistering\n");
- ldom_fini(etm_lhp);
- fmd_hdl_unregister(hdl);
- return;
- } else {
- /*
- * place holder, all other cases. unload etm for now
- */
- fmd_hdl_debug(hdl,
- "info: other ldom type, module unregistering\n");
- ldom_fini(etm_lhp);
- fmd_hdl_unregister(hdl);
- return;
- }
-
- fmd_hdl_debug(hdl, "info: module initialized ok\n");
-
-} /* _fmd_init() */
-
-/*
- * etm_recv - receive an FMA event from FMD and transport it
- * to the remote endpoint
- */
-
-/*ARGSUSED*/
-void
-etm_recv(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *evp, const char *class)
-{
- etm_xport_addr_t *addrv; /* vector of transport addresses */
- etm_xport_conn_t conn; /* connection handle */
- etm_proto_v1_ev_hdr_t *hdrp; /* for FMA_EVENT msg */
- ssize_t i, n; /* gen use */
- size_t sz; /* header size */
- size_t buflen; /* size of packed FMA event */
- uint8_t *buf; /* tmp buffer for packed FMA event */
-
- /*
- * if this is running on a Root Domain, ignore the events,
- * return right away
- */
- if (etm_ldom_type == LDOM_TYPE_ROOT)
- return;
-
- buflen = 0;
- if ((n = nvlist_size(evp, &buflen, NV_ENCODE_XDR)) != 0) {
- fmd_hdl_error(hdl, "error: FMA event dropped: "
- "event size errno %d class %s\n", n, class);
- etm_stats.etm_os_nvlist_size_fail.fmds_value.ui64++;
- etm_stats.etm_wr_drop_fmaevent.fmds_value.ui64++;
- return;
- }
-
- fmd_hdl_debug(hdl, "info: rcvd event %p from FMD\n", evp);
- fmd_hdl_debug(hdl, "info: cnt %llu class %s\n",
- etm_stats.etm_rd_fmd_fmaevent.fmds_value.ui64, class);
-
- etm_stats.etm_rd_fmd_bytes.fmds_value.ui64 += buflen;
- etm_stats.etm_rd_fmd_fmaevent.fmds_value.ui64++;
-
- /*
- * if the debug limit has been set, avoid excessive traffic,
- * for example, an infinite cycle using loopback nodes
- */
-
- if ((etm_debug_max_ev_cnt >= 0) &&
- (etm_stats.etm_rd_fmd_fmaevent.fmds_value.ui64 >
- etm_debug_max_ev_cnt)) {
- fmd_hdl_debug(hdl, "warning: FMA event dropped: "
- "event %p cnt %llu > debug max %d\n", evp,
- etm_stats.etm_rd_fmd_fmaevent.fmds_value.ui64,
- etm_debug_max_ev_cnt);
- etm_stats.etm_wr_drop_fmaevent.fmds_value.ui64++;
- return;
- }
-
- /* allocate a buffer for the FMA event and nvlist pack it */
-
- buf = fmd_hdl_zalloc(hdl, buflen, FMD_SLEEP);
-
- /*
- * increment the ttl value if the event is from remote (a root domain)
- * uncomment this when enabling fault forwarding from Root domains
- * to Control domain.
- *
- * uint8_t ttl;
- * if (fmd_event_local(hdl, evp) != FMD_EVF_LOCAL) {
- * if (nvlist_lookup_uint8(evp, FMD_EVN_TTL, &ttl) == 0) {
- * (void) nvlist_remove(evp, FMD_EVN_TTL, DATA_TYPE_UINT8);
- * (void) nvlist_add_uint8(evp, FMD_EVN_TTL, ttl + 1);
- * }
- * }
- */
-
- if ((n = nvlist_pack(evp, (char **)&buf, &buflen,
- NV_ENCODE_XDR, 0)) != 0) {
- fmd_hdl_error(hdl, "error: FMA event dropped: "
- "event pack errno %d class %s\n", n, class);
- etm_stats.etm_os_nvlist_pack_fail.fmds_value.ui64++;
- etm_stats.etm_wr_drop_fmaevent.fmds_value.ui64++;
- fmd_hdl_free(hdl, buf, buflen);
- return;
- }
-
- /* get vector of dst addrs and send the FMA event to each one */
-
- if ((addrv = etm_xport_get_ev_addrv(hdl, evp)) == NULL) {
- fmd_hdl_error(hdl, "error: FMA event dropped: "
- "bad event dst addrs errno %d\n", errno);
- etm_stats.etm_xport_get_ev_addrv_fail.fmds_value.ui64++;
- etm_stats.etm_wr_drop_fmaevent.fmds_value.ui64++;
- fmd_hdl_free(hdl, buf, buflen);
- return;
- }
-
- for (i = 0; addrv[i] != NULL; i++) {
-
- /* open a new connection to this dst addr */
-
- if ((n = etm_conn_open(hdl, "FMA event dropped: "
- "bad conn open on new ev", addrv[i], &conn)) < 0) {
- etm_stats.etm_wr_drop_fmaevent.fmds_value.ui64++;
- continue;
- }
-
- (void) pthread_mutex_lock(&etm_write_lock);
-
- /* write the ETM message header */
-
- if ((hdrp = etm_hdr_write(hdl, conn, evp, NV_ENCODE_XDR,
- &sz)) == NULL) {
- (void) pthread_mutex_unlock(&etm_write_lock);
- fmd_hdl_error(hdl, "error: FMA event dropped: "
- "bad hdr write errno %d\n", errno);
- (void) etm_conn_close(hdl,
- "bad conn close per bad hdr wr", conn);
- etm_stats.etm_wr_drop_fmaevent.fmds_value.ui64++;
- continue;
- }
-
- fmd_hdl_free(hdl, hdrp, sz); /* header not needed */
- etm_stats.etm_wr_hdr_fmaevent.fmds_value.ui64++;
- fmd_hdl_debug(hdl, "info: hdr xport write ok for event %p\n",
- evp);
-
- /* write the ETM message body, ie, the packed nvlist */
-
- if ((n = etm_io_op(hdl, "FMA event dropped: "
- "bad io write on event", conn,
- buf, buflen, ETM_IO_OP_WR)) < 0) {
- (void) pthread_mutex_unlock(&etm_write_lock);
- (void) etm_conn_close(hdl,
- "bad conn close per bad body wr", conn);
- etm_stats.etm_wr_drop_fmaevent.fmds_value.ui64++;
- continue;
- }
-
- (void) pthread_mutex_unlock(&etm_write_lock);
-
- etm_stats.etm_wr_body_fmaevent.fmds_value.ui64++;
- etm_stats.etm_wr_xport_bytes.fmds_value.ui64 += buflen;
- fmd_hdl_debug(hdl, "info: body xport write ok for event %p\n",
- evp);
-
- /* close the connection */
-
- (void) etm_conn_close(hdl, "bad conn close after event send",
- conn);
- } /* foreach dst addr in the vector */
-
- etm_xport_free_addrv(hdl, addrv);
- fmd_hdl_free(hdl, buf, buflen);
-
-} /* etm_recv() */
-
-
-/*
- * etm_send - receive an FMA event from FMD and enQ it in the iosvc.Q.
- * etm_send_to_remote_root() deQ and xprt the FMA events to a
- * remote root domain
- * return FMD_SEND_SUCCESS for success,
- * FMD_SEND_FAILED for error
- */
-
-/*ARGSUSED*/
-int
-etm_send(fmd_hdl_t *fmd_hdl, fmd_xprt_t *xp, fmd_event_t *ep, nvlist_t *nvl)
-{
- uint32_t pack_it; /* whether to pack/enq the event */
- etm_pack_msg_type_t msg_type;
- /* tell etm_pack_ds_msg() what to do */
- etm_iosvc_t *iosvc; /* ptr to cur iosvc struct */
- char *class; /* nvlist class name */
-
- pack_it = 1;
- msg_type = FMD_XPRT_OTHER_MSG;
-
- (void) nvlist_lookup_string(nvl, FM_CLASS, &class);
- if (class == NULL) {
- pack_it = 0;
- } else {
- if (etm_debug_lvl >= 1) {
- fmd_hdl_debug(fmd_hdl,
- "info: evp class= %s in etm_send\n", class);
- }
-
- if (etm_ldom_type == LDOM_TYPE_CONTROL) {
- iosvc =
- (etm_iosvc_t *)fmd_xprt_getspecific(fmd_hdl, xp);
-
- /*
- * check the flag FORWARDING_FAULTS_TO_CONTROL to
- * decide if or not to drop fault subscription
- * control msgs
- */
- if (strcmp(class, "resource.fm.xprt.subscribe") == 0) {
- pack_it = 0;
- /*
- * if (FORWARDING_FAULTS_TO_CONTROL == 1) {
- * (void) nvlist_lookup_string(nvl,
- * FM_RSRC_XPRT_SUBCLASS, &subclass);
- * if (strcmp(subclass, "list.suspect")
- * == 0) {
- * pack_it = 1;
- * msg_action = FMD_XPRT_OTHER_MSG;
- * }
- * if (strcmp(subclass, "list.repaired")
- * == 0) {
- * pack_it = 1;
- * msg_action = FMD_XPRT_OTHER_MSG;
- * }
- * }
- */
- }
- if (strcmp(class, "resource.fm.xprt.run") == 0) {
- pack_it = 1;
- msg_type = FMD_XPRT_RUN_MSG;
- }
- } else { /* has to be the root domain ldom */
- iosvc = &io_svc;
- /*
- * drop all ereport and fault subscriptions
- * are we dropping too much here, more than just ereport
- * and fault subscriptions? need to check
- */
- if (strcmp(class, "resource.fm.xprt.subscribe") == 0)
- pack_it = 0;
- if (strcmp(class, "resource.fm.xprt.run") == 0) {
- pack_it = 1;
- msg_type = FMD_XPRT_RUN_MSG;
- }
- }
- }
-
- if (pack_it) {
- if (etm_debug_lvl >= 1) {
- fmd_hdl_debug(fmd_hdl,
- "info: ldom name returned from xprt get specific="
- "%s xprt=%lld\n", iosvc->ldom_name, xp);
- }
- /*
- * pack the etm msg for the DS library and enq in io_svc->Q
- * when the hdrp is NULL, the packing func will use the static
- * iosvc_hdr
- */
- (void) etm_pack_ds_msg(fmd_hdl, iosvc, NULL, 0, nvl, msg_type,
- ETM_CKPT_NOOP);
- }
-
- return (FMD_SEND_SUCCESS);
-
-} /* etm_send() */
-
-
-
-/*
- * _fmd_fini - stop the server daemon and teardown the transport
- */
-
-void
-_fmd_fini(fmd_hdl_t *hdl)
-{
- ssize_t n; /* gen use */
- etm_iosvc_t *iosvc; /* ptr to insvc struct */
- etm_iosvc_q_ele_t msg_ele; /* iosvc msg ele */
- uint32_t i; /* for loop var */
-
- fmd_hdl_debug(hdl, "info: module finalizing\n");
-
- /* kill the connection server and responder ; wait for them to die */
-
- etm_is_dying = 1;
-
- if (etm_svr_tid != 0) {
- fmd_thr_signal(hdl, etm_svr_tid);
- fmd_thr_destroy(hdl, etm_svr_tid);
- etm_svr_tid = 0;
- } /* if server thread was successfully created */
-
- if (etm_resp_tid != 0) {
- fmd_thr_signal(hdl, etm_resp_tid);
- fmd_thr_destroy(hdl, etm_resp_tid);
- etm_resp_tid = 0;
- } /* if responder thread was successfully created */
-
- if (etm_async_e_tid != 0) {
- fmd_thr_signal(hdl, etm_async_e_tid);
- fmd_thr_destroy(hdl, etm_async_e_tid);
- etm_async_e_tid = 0;
- } /* if async event handler thread was successfully created */
-
-
- if ((etm_ldom_type == LDOM_TYPE_LEGACY) ||
- (etm_ldom_type == LDOM_TYPE_CONTROL)) {
-
- /* teardown the transport and cleanup syslogging */
- if ((n = etm_xport_fini(hdl)) != 0) {
- fmd_hdl_error(hdl, "warning: xport fini errno %d\n",
- (-n));
- }
- if (etm_fmd_xprt != NULL) {
- fmd_xprt_close(hdl, etm_fmd_xprt);
- }
-
- if (syslog_logfd != -1) {
- (void) close(syslog_logfd);
- }
- if (syslog_msgfd != -1) {
- (void) close(syslog_msgfd);
- }
- }
-
- if (etm_ldom_type == LDOM_TYPE_CONTROL) {
- if (ldom_unregister_event(etm_lhp))
- fmd_hdl_debug(hdl, "ldom_unregister_event() failed\n");
-
- /*
- * On control domain side, there may be multiple iosvc struct
- * in use, one for each bound/active domain. Each struct
- * manages a queue of fma events destined to the root domain.
- * Need to go thru every iosvc struct to clean up its resources.
- */
- for (i = 0; i < NUM_OF_ROOT_DOMAINS; i++) {
- if (iosvc_list[i].ldom_name[0] != '\0') {
- /*
- * found an iosvc struct for a root domain
- */
- iosvc = &iosvc_list[i];
- (void) pthread_mutex_lock(&iosvc_list_lock);
- etm_iosvc_cleanup(hdl, iosvc, B_TRUE, B_FALSE);
- (void) pthread_mutex_unlock(&iosvc_list_lock);
-
- } else {
- /*
- * reach the end of existing iosvc structures
- */
- continue;
- }
- } /* for i<NUM_OF_ROOT_DOMAINS */
- etm_ckpt_fini(hdl);
- etm_filter_fini(hdl);
-
- ldom_fini(etm_lhp);
-
- } else if (etm_ldom_type == LDOM_TYPE_ROOT) {
- /*
- * On root domain side, there is only one iosvc struct in use.
- */
- iosvc = &io_svc;
- if (iosvc->send_tid != 0) {
- fmd_thr_signal(hdl, iosvc->send_tid);
- fmd_thr_destroy(hdl, iosvc->send_tid);
- iosvc->send_tid = 0;
- } /* if io svc send thread was successfully created */
-
- if (iosvc->recv_tid != 0) {
- fmd_thr_signal(hdl, iosvc->recv_tid);
- fmd_thr_destroy(hdl, iosvc->recv_tid);
- iosvc->recv_tid = 0;
- } /* if io svc receive thread was successfully created */
-
- (void) pthread_mutex_lock(&iosvc->msg_q_lock);
- while (iosvc->msg_q_cur_len > 0) {
- (void) etm_iosvc_msg_deq(hdl, iosvc, &msg_ele);
- fmd_hdl_free(hdl, msg_ele.msg, msg_ele.msg_size);
- }
- (void) pthread_mutex_unlock(&iosvc->msg_q_lock);
-
- if (iosvc->fmd_xprt != NULL)
- fmd_xprt_close(hdl, iosvc->fmd_xprt);
- ldom_fini(etm_lhp);
- }
- if (etm_ds_fini) {
- (*etm_ds_fini)();
- (void) dlclose(etm_dl_hdl);
- }
-
- fmd_hdl_debug(hdl, "info: module finalized ok\n");
-
-} /* _fmd_fini() */
diff --git a/usr/src/cmd/fm/modules/sun4v/etm/etm.conf b/usr/src/cmd/fm/modules/sun4v/etm/etm.conf
deleted file mode 100644
index 4291a9ca20..0000000000
--- a/usr/src/cmd/fm/modules/sun4v/etm/etm.conf
+++ /dev/null
@@ -1,52 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2006 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-# transport these FMA events from the domain to the SP
-
-subscribe fault.*
-subscribe list.repaired
-
-#
-# etm agent properties:
-#
-# On supported systems, ETM can transport SP Alert event messages from the
-# SP to Solaris. SP Alert messages are generated by the Service Processor
-# and indicate various conditions monitored by the SP. The following
-# properties define how those messages are handled by Solaris.
-#
-# etm_alert_console - bool - log messages to system console (default=false)
-# etm_alert_syslogd - bool - log messages to messages file through
-# syslogd (default=true)
-# etm_alert_facility - string - syslog(3C) log facility to use
-# (default=LOG_DAEMON)
-#
-# The "etm_alert_facility" property may only be configured to use
-# LOG_DAEMON (which is the default) or one of LOG_LOCAL[0-7]. For
-# information about the use of local log facilities, refer to syslog(3C),
-# syslogd(8), and syslog.conf(5).
-#
-# Example settings:
-# setprop etm_alert_console true
-# setprop etm_alert_facility LOG_LOCAL0
-#
diff --git a/usr/src/cmd/fm/modules/sun4v/etm/etm_ckpt.c b/usr/src/cmd/fm/modules/sun4v/etm/etm_ckpt.c
deleted file mode 100644
index 36edbd8332..0000000000
--- a/usr/src/cmd/fm/modules/sun4v/etm/etm_ckpt.c
+++ /dev/null
@@ -1,681 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * etm_ckpt.c
- * Description:
- * Checkpoint the ereport events for persitence across fmd restart.
- *
- * Each ereport is stored in a named buffer. Each ereport is uniquely
- * indentified by a id which is consists of a number of ereport fields. The
- * name of the buffer is derived from the id.
- *
- * All ereport ids are stored in the circular list which is saved in a
- * separate buffer.
- */
-
-#include <assert.h>
-#include <stdio.h>
-#include <pthread.h>
-#include <strings.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/fm/ldom.h>
-#include <sys/fm/protocol.h>
-#include <fm/fmd_api.h>
-#include <fm/libtopo.h>
-#include <fm/topo_hc.h>
-
-#include "etm_etm_proto.h"
-#include "etm_iosvc.h"
-#include "etm_ckpt.h"
-#include "etm_filter.h"
-
-#define ETM_ATTR_PRIMARY "primary"
-#define ETM_ATTR_TOD "__tod"
-#define ETM_LDOM_PRIMARY "primary"
-
-/*
- * -------------------------- private variables ------------------------------
- */
-
-static etm_ckpt_id_list_t *etm_id_lst = NULL; /* list of ereports ids */
-
-static pthread_mutex_t etm_id_lst_lock; /* list lock */
-
-/*
- * -------------------------- functions --------------------------------------
- */
-
-/*
- * etm_ckpt_str_hash()
- * Description:
- * Hash a class name to a number
- */
-static uint_t
-etm_ckpt_str_hash(char *str)
-{
- uint_t hash = 0; /* hash value */
-
- if (str == NULL)
- return (0);
-
- while (*str != '\0')
- hash += *str++;
-
- return (hash);
-}
-
-/*
- * etm_ckpt_id2str()
- * Description:
- * Get the string of an ereport id. It is used as the named buffer that
- * store the ereport.
- */
-static void
-etm_ckpt_id2str(etm_ckpt_erpt_id_t *id, char *str, size_t size) {
- (void) snprintf(str, size, "%s_%llx_%d_%x_%d", ETM_CKPT_ERPT_PREFIX,
- id->ei_ena, id->ei_hash, id->ei_tod1, id->ei_pri);
-}
-
-/*
- * etm_ckpt_erpt2id()
- * Description:
- * Get the buffer name and ereport id of a given ereport
- */
-static int
-etm_ckpt_erpt2id(fmd_hdl_t *hdl, nvlist_t *erpt, etm_ckpt_erpt_id_t *id,
- char *str, int size) {
- char *class = NULL;
- uint64_t *tod;
- uint_t sz;
- boolean_t pri = B_FALSE;
-
- bzero(id, sizeof (etm_ckpt_erpt_id_t));
-
- /* ena */
- if (nvlist_lookup_uint64(erpt, FM_EREPORT_ENA, &id->ei_ena) != 0) {
- fmd_hdl_debug(hdl, "Ena not found\n");
- return (-1);
- }
-
- /* class name */
- (void) nvlist_lookup_string(erpt, FM_CLASS, &class);
- if (class == NULL) {
- fmd_hdl_debug(hdl, "%s not found\n", FM_CLASS);
- return (-1);
- }
- if (strncmp(class, FM_EREPORT_CLASS, strlen(FM_EREPORT_CLASS)) != 0) {
- fmd_hdl_debug(hdl, "Only support checkpointing %s\n",
- FM_EREPORT_CLASS);
- return (-1);
- }
- id->ei_hash = etm_ckpt_str_hash(class);
-
- /* tod[1]: fractional of a second */
- if (nvlist_lookup_uint64_array(erpt, ETM_ATTR_TOD, &tod, &sz) == 0) {
- if (sz >= 2) {
- id->ei_tod1 = (uint32_t)tod[1];
- }
- }
-
- /* primary flag */
- if (nvlist_lookup_boolean_value(erpt, ETM_ATTR_PRIMARY, &pri) == 0) {
- id->ei_pri = pri ? 1 : 0;
- }
-
- etm_ckpt_id2str(id, str, size);
-
- return (0);
-}
-
-/*
- * etm_ckpt_il_equal()
- * Description:
- * Test if two ereport ids are equal.
- */
-static boolean_t
-etm_ckpt_il_equal(etm_ckpt_erpt_id_t *i1, etm_ckpt_erpt_id_t *i2)
-{
- return ((i1->ei_ena == i2->ei_ena) && (i1->ei_tod1 == i2->ei_tod1) &&
- (i1->ei_pri == i2->ei_pri) && (i1->ei_hash == i2->ei_hash));
-}
-
-/*
- * etm_ckpt_il_resize()
- * Description:
- * Increase the size of the circular list and pack its entries.
- */
-static void
-etm_ckpt_il_resize(fmd_hdl_t *hdl, uint_t factor)
-{
- etm_ckpt_id_list_t *il1, *il2; /* temp lists */
- size_t sz1, sz2; /* sizes of lists */
- int i, next; /* temp counters */
- etm_ckpt_erpt_id_t *p1, *p2, *s1, *s2; /* temp id pointers */
- etm_ckpt_erpt_id_t blank; /* blank ereport id */
-
- if (factor == 0)
- return;
-
- /* the present queue */
- il1 = etm_id_lst;
- sz1 = sizeof (etm_ckpt_id_list_t) + il1->il_ids_sz;
-
- /* Create an empty queue with a new size */
- sz2 = sizeof (etm_ckpt_id_list_t) + (factor * il1->il_ids_sz);
- il2 = fmd_hdl_zalloc(hdl, sz2, FMD_SLEEP);
- il2->il_ver = ETM_CKPT_VERSION;
- il2->il_max = factor * etm_id_lst->il_max;
- il2->il_ids_sz = factor * il1->il_ids_sz;
-
- /* pointers to the two arrays of entries */
- bzero(&blank, sizeof (blank));
- s1 = (etm_ckpt_erpt_id_t *)
- ((ptrdiff_t)il1 + sizeof (etm_ckpt_id_list_t));
- s2 = (etm_ckpt_erpt_id_t *)
- ((ptrdiff_t)il2 + sizeof (etm_ckpt_id_list_t));
-
- /* copy non-empty ereport ids from list il1 to il2. Toss the blank. */
- if (il1->il_head != il1->il_tail) {
- for (i = il1->il_head; i != il1->il_tail; i = next) {
- next = (i + 1) % il1->il_max;
- p1 = s1 + next;
- if (!etm_ckpt_il_equal(p1, &blank)) {
- /* copy non-empty entries */
- il2->il_tail = (il2->il_tail + 1) % il2->il_max;
- fmd_hdl_debug(hdl, "Copying entry %d to %d\n",
- next, il2->il_tail);
- p2 = s2 + il2->il_tail;
- *p2 = *p1;
- il2->il_cnt++;
- }
- }
- }
-
- if (factor == 1) {
- /* both lists have the same size, update the present list */
- bcopy(il2, il1, sz1);
- fmd_hdl_free(hdl, il2, sz2);
- fmd_buf_write(hdl, NULL, ETM_CKPT_IL_BUF, (void *) il1, sz1);
- } else {
- /* replace the present list */
- etm_id_lst = il2;
- fmd_hdl_free(hdl, il1, sz1);
- /* write to new buffer */
- fmd_buf_destroy(hdl, NULL, ETM_CKPT_IL_BUF);
- fmd_buf_create(hdl, NULL, ETM_CKPT_IL_BUF, sz2);
- fmd_buf_write(hdl, NULL, ETM_CKPT_IL_BUF, (void *) il2, sz2);
- }
-}
-
-/*
- * etm_ckpt_il_find()
- * Description:
- * Find the ereport id in the list.
- */
-/* ARGSUSED */
-static int
-etm_ckpt_il_find(fmd_hdl_t *hdl, etm_ckpt_erpt_id_t *id)
-{
- int i, next; /* temp counter */
- etm_ckpt_erpt_id_t *p, *s; /* temp erpt id */
-
- fmd_hdl_debug(hdl, "etm_ckpt_il_find()\n");
-
- /* empty list */
- if (etm_id_lst->il_head == etm_id_lst->il_tail) {
- fmd_hdl_debug(hdl, "find an empty list\n");
- return (-1);
- }
- s = (etm_ckpt_erpt_id_t *)((ptrdiff_t)etm_id_lst +
- sizeof (etm_ckpt_id_list_t));
- for (i = etm_id_lst->il_head; i != etm_id_lst->il_tail; i = next) {
- next = (i + 1) % etm_id_lst->il_max;
- p = s + next;
- if (etm_ckpt_il_equal(p, id))
- return (i);
- }
-
- return (-1);
-}
-
-/*
- * etm_ckpt_il_add()
- * Description:
- * Add an ereport id in the list.
- */
-static int
-etm_ckpt_il_add(fmd_hdl_t *hdl, etm_ckpt_erpt_id_t *id) {
- int next;
- etm_ckpt_erpt_id_t *p, *s; /* temp id */
-
- /*
- * resize the q if it is full.
- * If the capacity is less 80%, purge the emtpy entries to make more
- * room for new entries. Otherwise, double the queue size.
- */
- next = (etm_id_lst->il_tail + 1) % etm_id_lst->il_max;
- if (next == etm_id_lst->il_head) {
- if ((etm_id_lst->il_cnt * 1.0 / etm_id_lst->il_max) < 0.8) {
- etm_ckpt_il_resize(hdl, 1);
- } else {
- etm_ckpt_il_resize(hdl, 2);
- }
-
- /* test if the list again */
- next = (etm_id_lst->il_tail + 1) % etm_id_lst->il_max;
- if (next == etm_id_lst->il_head) {
- fmd_hdl_error(hdl, "List is full %d %d\n",
- etm_id_lst->il_head, etm_id_lst->il_tail);
- }
- }
-
- /* Add the id entry at the head */
- s = (etm_ckpt_erpt_id_t *)((ptrdiff_t)etm_id_lst +
- sizeof (etm_ckpt_id_list_t));
- etm_id_lst->il_tail = (etm_id_lst->il_tail + 1) % etm_id_lst->il_max;
- p = s + etm_id_lst->il_tail;
- *p = *id;
- etm_id_lst->il_cnt++;
-
- return (etm_id_lst->il_tail);
-}
-
-/*
- * etm_ckpt_il_delete()
- * Description:
- * Delete an ereport id from the list.
- */
-int
-etm_ckpt_il_delete(fmd_hdl_t *hdl, etm_ckpt_erpt_id_t *id) {
-
- int i, next; /* temp counter */
- etm_ckpt_erpt_id_t *p, *s; /* temp id pointers */
- etm_ckpt_erpt_id_t blank; /* blank id */
-
- /* empty list */
- if (etm_id_lst->il_tail == etm_id_lst->il_head) {
- fmd_hdl_debug(hdl, "Empty queue(%d)\n", etm_id_lst->il_head);
- return (-1);
- }
-
- bzero(&blank, sizeof (blank));
- s = (etm_ckpt_erpt_id_t *)((ptrdiff_t)etm_id_lst +
- sizeof (etm_ckpt_id_list_t));
-
- /* delete leading empty entries */
- for (i = etm_id_lst->il_head; i != etm_id_lst->il_tail; i = next) {
- next = (i + 1) % etm_id_lst->il_max;
- p = s + next;
- if (!etm_ckpt_il_equal(p, &blank)) {
- break;
- }
- etm_id_lst->il_cnt--;
- etm_id_lst->il_head = next;
- }
-
- /* empty queue */
- if (etm_id_lst->il_head == etm_id_lst->il_tail) {
- fmd_hdl_debug(hdl, "Empty queue(%d)\n", etm_id_lst->il_head);
- return (-1);
- }
-
- /* find the entry and clear it */
- for (i = etm_id_lst->il_head; i != etm_id_lst->il_tail; i = next) {
- next = (i + 1) % etm_id_lst->il_max;
- p = s + next;
- if (etm_ckpt_il_equal(p, id)) {
- /* clear the entry */
- *p = blank;
- etm_id_lst->il_cnt--;
-
- /* remove the entry if it is the last one */
- if (i == etm_id_lst->il_head) {
- etm_id_lst->il_head = next;
- }
- return (i);
- }
- }
-
- return (-1);
-}
-
-
-/*
- * etm_ckpt_il_restore()
- * Description:
- * Restore the idlist named buffer which is the circular list of the
- * the ereport ids.
- */
-void
-etm_ckpt_il_restore(fmd_hdl_t *hdl)
-{
- size_t size; /* buffer size */
-
- /* get the buffer of the id list */
- size = fmd_buf_size(hdl, NULL, ETM_CKPT_IL_BUF);
- if (size < sizeof (etm_ckpt_id_list_t)) {
- fmd_hdl_debug(hdl, "Buffer name %s do not exist\n",
- ETM_CKPT_IL_BUF);
- return;
- }
- etm_id_lst = (etm_ckpt_id_list_t *)fmd_hdl_zalloc(hdl, size, FMD_SLEEP);
- fmd_buf_read(hdl, NULL, ETM_CKPT_IL_BUF, (void *) etm_id_lst, size);
-
- /* check version */
- if (etm_id_lst->il_ver > ETM_CKPT_VERSION) {
-
- fmd_hdl_error(hdl, "Unsupport checkpoint version (%#x)\n",
- etm_id_lst->il_ver);
- fmd_hdl_free(hdl, (void *) etm_id_lst, size);
- etm_id_lst = NULL;
- return;
- }
-
- /* check the length */
- if (etm_id_lst->il_ids_sz != (size - sizeof (etm_ckpt_id_list_t))) {
- fmd_hdl_debug(hdl, "Invalid ids buffer size (%d, %d)\n",
- etm_id_lst->il_ids_sz, size);
- fmd_hdl_free(hdl, (void *) etm_id_lst, size);
- etm_id_lst = NULL;
- return;
- }
-}
-
-/*
- * etm_ckpt_recover()
- * Description:
- * Recover ereports from the checkpointed data and dispatch them to the
- * ldom queue(s).
- */
-void
-etm_ckpt_recover(fmd_hdl_t *hdl)
-{
- int size; /* buffer size */
- int i, next; /* temp counter */
- boolean_t dirty = B_FALSE; /* dirty flag */
- uint64_t did; /* domain id */
- char name[ETM_LINE_LEN]; /* temp str */
- char ldom[ETM_LINE_LEN]; /* ldom id */
- etm_ckpt_erpt_id_t *p, *s; /* temp ereport id */
- etm_ckpt_erpt_id_t blank; /* blank ereport id */
- etm_ckpt_erpt_buf_t *ep; /* ereport buffer */
- size_t sz; /* size of ep */
- char *buf; /* temp buf */
- nvlist_t *nvl; /* ereport */
- etm_iosvc_t *iosvc; /* iosvc data struct */
-
- /*
- * restore the circular list of ereport ids
- */
- etm_ckpt_il_restore(hdl);
- if (etm_id_lst == NULL) {
- fmd_hdl_debug(hdl, "Initialize a new id list\n");
- size = sizeof (etm_ckpt_id_list_t) +
- ETM_CKPT_IL_MIN_SIZE * sizeof (etm_ckpt_erpt_id_t);
- etm_id_lst = fmd_hdl_zalloc(hdl, size, FMD_SLEEP);
- etm_id_lst->il_ver = ETM_CKPT_VERSION;
- etm_id_lst->il_max = ETM_CKPT_IL_MIN_SIZE;
- etm_id_lst->il_head = 0;
- etm_id_lst->il_tail = 0;
- etm_id_lst->il_ids_sz =
- ETM_CKPT_IL_MIN_SIZE * sizeof (etm_ckpt_erpt_id_t);
- fmd_buf_destroy(hdl, NULL, ETM_CKPT_IL_BUF);
- fmd_buf_create(hdl, NULL, ETM_CKPT_IL_BUF, size);
- fmd_buf_write(hdl, NULL, ETM_CKPT_IL_BUF, (void *) etm_id_lst,
- size);
-
- /* commit */
- fmd_thr_checkpoint(hdl);
-
- return;
- }
-
- /* Empty list */
- if ((etm_id_lst->il_head == etm_id_lst->il_tail) ||
- (etm_id_lst->il_cnt == 0)) {
- return;
- }
-
- /* Visit all the entries in the list */
- bzero(&blank, sizeof (blank));
- s = (etm_ckpt_erpt_id_t *)((ptrdiff_t)etm_id_lst +
- sizeof (etm_ckpt_id_list_t));
- for (i = etm_id_lst->il_head; i != etm_id_lst->il_tail; i = next) {
- next = (i + 1) % etm_id_lst->il_max;
- p = s + next;
- if (etm_ckpt_il_equal(p, &blank)) {
- fmd_hdl_debug(hdl, "Skip empty entry %d\n", i);
- continue;
- }
-
- etm_ckpt_id2str(p, name, sizeof (name));
- fmd_hdl_debug(hdl, "Restoring entry %s\n", name);
- if ((sz = fmd_buf_size(hdl, NULL, name)) == 0) {
- fmd_hdl_error(hdl, "Clear the stale entry %s\n", name);
- *p = blank;
- continue;
- }
- ep = (etm_ckpt_erpt_buf_t *)fmd_hdl_zalloc(hdl, sz, FMD_SLEEP);
- fmd_buf_read(hdl, NULL, name, (void *) ep, sz);
- buf = (char *)((ptrdiff_t)ep + sizeof (etm_ckpt_erpt_buf_t));
- nvl = NULL;
- if (nvlist_unpack(buf, ep->eb_len, &nvl, 0)) {
- fmd_hdl_debug(hdl, "failed to unpack %s\n", name);
- fmd_hdl_free(hdl, ep, sz);
- continue;
- }
- fmd_hdl_free(hdl, ep, sz);
- if (etm_filter_find_ldom_id(hdl, nvl, ldom, ETM_LINE_LEN,
- &did) || (strcmp(name, ETM_LDOM_PRIMARY) == 0)) {
- fmd_hdl_debug(hdl, "Discard event %s\n", name);
- fmd_buf_destroy(hdl, NULL, name);
- *p = blank;
- nvlist_free(nvl);
- dirty = B_TRUE;
- continue;
- }
-
- fmd_hdl_debug(hdl, "Dispatch %s to ldom %s\n", name, ldom);
-
- /*
- * Find the queue of the ldom, create it if not exist.
- * Then insert this event into the queue.
- */
- iosvc = etm_iosvc_lookup(hdl, ldom, DS_INVALID_HDL, B_TRUE);
- if (iosvc != NULL) {
- (void) etm_pack_ds_msg(hdl, iosvc, NULL, 0, nvl, SP_MSG,
- ETM_CKPT_RESTORE);
- }
- nvlist_free(nvl);
- }
- if (dirty) {
- /* update the buffer of the queue */
- size = sizeof (etm_ckpt_id_list_t) + etm_id_lst->il_ids_sz;
- fmd_buf_write(hdl, NULL, ETM_CKPT_IL_BUF, (void *) etm_id_lst,
- size);
-
- /* commit */
- fmd_thr_checkpoint(hdl);
- }
-
-} /* etm_ckpt_recover */
-
-
-/*
- * etm_ckpt_add_entry()
- * Description:
- * Save an ereport for persistence.
- */
-int
-etm_ckpt_add_entry(fmd_hdl_t *hdl, nvlist_t *erpt) {
- etm_ckpt_erpt_id_t id;
- char name[ETM_LINE_LEN];
- int rc; /* gen use */
- size_t sz; /* size */
- size_t buflen; /* sz of packed erpt */
- uint8_t *buf; /* buffer of erpt */
- etm_ckpt_erpt_buf_t *hdr;
-
- /* map ereport to id */
- bzero(name, ETM_LINE_LEN);
- rc = etm_ckpt_erpt2id(hdl, erpt, &id, name, ETM_LINE_LEN);
- if (rc != 0) {
- fmd_hdl_debug(hdl, "Invalid ereport\n");
- return (rc);
- }
-
- /*
- * check for a duplicate entry in the id list
- * find the ereport buffer and search for the id
- */
- if (fmd_buf_size(hdl, NULL, name) > 0 &&
- etm_ckpt_il_find(hdl, &id) >= 0) {
- fmd_hdl_debug(hdl, "Duplicate id %s\n", name);
- return (-1);
- }
-
- /* Create the ereport buffer */
- if (nvlist_size(erpt, &buflen, NV_ENCODE_XDR) != 0) {
- fmd_hdl_debug(hdl, "nvlist_size fails\n");
- return (-1);
- }
- sz = sizeof (etm_ckpt_erpt_buf_t) + buflen;
- hdr = (etm_ckpt_erpt_buf_t *)fmd_hdl_zalloc(hdl, sz, FMD_SLEEP);
- buf = (uint8_t *)((ptrdiff_t)hdr + sizeof (etm_ckpt_erpt_buf_t));
- hdr->eb_ver = ETM_CKPT_VERSION;
- hdr->eb_len = buflen;
- if (nvlist_pack(erpt, (char **)&buf, &buflen, NV_ENCODE_XDR, 0) != 0) {
- fmd_hdl_free(hdl, hdr, sz);
- fmd_hdl_debug(hdl, "unpack fails\n");
- return (-1);
- }
- fmd_hdl_debug(hdl, "Add ckpt event(%s, %d)\n", name, sz);
- fmd_buf_create(hdl, NULL, name, sz);
- fmd_buf_write(hdl, NULL, name, hdr, sz);
- fmd_hdl_free(hdl, hdr, sz);
-
- /* Insert the ereport id into the id list */
- if (etm_ckpt_il_add(hdl, &id) < 0) {
- fmd_hdl_debug(hdl, "Insert id %s failed\n", name);
- fmd_buf_destroy(hdl, NULL, name);
- return (-1);
- }
-
- /* update the buffer of the queue */
- sz = sizeof (etm_ckpt_id_list_t) + etm_id_lst->il_ids_sz;
- fmd_buf_write(hdl, NULL, ETM_CKPT_IL_BUF, (void *) etm_id_lst, sz);
-
- /* commit */
- fmd_thr_checkpoint(hdl);
-
- return (0);
-}
-
-/*
- * etm_ckpt_delete_entry()
- * Description:
- * Delete an ereport id in the list.
- */
-static int
-etm_ckpt_delete_entry(fmd_hdl_t *hdl, nvlist_t *erpt) {
- etm_ckpt_erpt_id_t id;
- char name[ETM_LINE_LEN];
- int rc; /* return code */
- size_t sz; /* size */
-
- /* get id, id name */
- bzero(name, ETM_LINE_LEN);
- if (etm_ckpt_erpt2id(hdl, erpt, &id, name, ETM_LINE_LEN) != 0) {
- fmd_hdl_debug(hdl, "Invalid ereport\n");
- return (-1);
- }
- fmd_hdl_debug(hdl, "Delete ckpt event(%s)\n", name);
-
- /* delete the ereport buffer */
- if (fmd_buf_size(hdl, NULL, name) > 0) {
- fmd_buf_destroy(hdl, NULL, name);
- }
-
- rc = etm_ckpt_il_delete(hdl, &id);
- if (rc < 0) {
- fmd_hdl_debug(hdl, "Delete id %s failed\n", name);
- return (rc);
- }
-
- /* update the buffer of the queue */
- sz = sizeof (etm_ckpt_id_list_t) + etm_id_lst->il_ids_sz;
- fmd_buf_write(hdl, NULL, ETM_CKPT_IL_BUF, (void *) etm_id_lst, sz);
-
- /* commit */
- fmd_thr_checkpoint(hdl);
-
- return (rc);
-}
-
-int
-etm_ckpt_add(fmd_hdl_t *hdl, nvlist_t *erpt) {
-
- int rc; /* return code */
-
- (void) pthread_mutex_lock(&etm_id_lst_lock);
-
- rc = etm_ckpt_add_entry(hdl, erpt);
-
- (void) pthread_mutex_unlock(&etm_id_lst_lock);
-
- return (rc >= 0 ? 0 : rc);
-}
-
-int
-etm_ckpt_delete(fmd_hdl_t *hdl, nvlist_t *erpt) {
- int rc; /* return code */
-
- (void) pthread_mutex_lock(&etm_id_lst_lock);
-
- rc = etm_ckpt_delete_entry(hdl, erpt);
-
- (void) pthread_mutex_unlock(&etm_id_lst_lock);
-
- return (rc >= 0 ? 0 : rc);
-}
-
-/* ARGSUSED */
-void
-etm_ckpt_init(fmd_hdl_t *hdl) {
- (void) pthread_mutex_init(&etm_id_lst_lock, NULL);
- etm_id_lst = NULL;
-}
-
-void
-etm_ckpt_fini(fmd_hdl_t *hdl) {
- if (etm_id_lst != NULL) {
- fmd_hdl_free(hdl, etm_id_lst,
- sizeof (etm_ckpt_id_list_t) + etm_id_lst->il_ids_sz);
- }
- (void) pthread_mutex_destroy(&etm_id_lst_lock);
-}
diff --git a/usr/src/cmd/fm/modules/sun4v/etm/etm_ckpt.h b/usr/src/cmd/fm/modules/sun4v/etm/etm_ckpt.h
deleted file mode 100644
index d25be56d22..0000000000
--- a/usr/src/cmd/fm/modules/sun4v/etm/etm_ckpt.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * etm_ckpt.h
- *
- * Header file of checkpointing ereports for persistence
- *
- */
-
-#ifndef _ETM_CKPT_H
-#define _ETM_CKPT_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <fm/fmd_api.h>
-
-#define ETM_CKPT_VERSION 0x10
-#define ETM_CKPT_ERPT_PREFIX "ev"
-#define ETM_LINE_LEN 256
-
-/*
- * Format of a named buffer that stores an ereport.
- */
-typedef struct etm_ckpt_erpt_buf {
- uint8_t eb_ver; /* version major.minor */
- uint8_t eb_rev; /* reserved field */
- uint16_t eb_len; /* size of packed ereport */
- /* nvlist packed erpt event */
-} etm_ckpt_erpt_buf_t;
-
-/*
- * Ereport id
- * Each ereport, which is stored in a named buffer, is uniquely identified by
- * fields in the ereport. The named buffer name is derived from this struct
- * as following
- * ev_${ena}_${hash{class)}_${tod[1]}_${primary}
- */
-typedef struct etm_ckpt_erpt_id {
- uint64_t ei_ena; /* ereport ena */
- uint32_t ei_tod1; /* tod[1]: fractional second */
- uint16_t ei_hash; /* hash(ereport class name) */
- uint8_t ei_pri; /* primary field */
- uint8_t ei_rev; /* reserved field */
-} etm_ckpt_erpt_id_t;
-
-/*
- * A circular list of ereport ids
- */
-typedef struct etm_ckpt_id_list {
- uint8_t il_ver; /* version major.minor */
- uint8_t il_rev1; /* reserve field */
- uint16_t il_max; /* max number of erpt ids in list */
- uint16_t il_cnt; /* number of valid ids in list */
- uint16_t il_head; /* head of the list */
- uint16_t il_tail; /* tail of the list */
- uint16_t il_ids_sz; /* size of the array of ids */
- uint32_t il_rev2; /* reserve field */
- /* array of ids */
-} etm_ckpt_id_list_t;
-
-#define ETM_CKPT_IL_BUF "idlist"
-#define ETM_CKPT_IL_MIN_SIZE 0x8
-
-/*
- * Checkpoint options
- */
-#define ETM_CKPT_NOOP 0x0
-#define ETM_CKPT_SAVE 0x1
-#define ETM_CKPT_RESTORE 0x2
-
-void etm_ckpt_recover(fmd_hdl_t *hdl);
-int etm_ckpt_add(fmd_hdl_t *hdl, nvlist_t *evp);
-int etm_ckpt_delete(fmd_hdl_t *hdl, nvlist_t *evp);
-
-void etm_ckpt_init(fmd_hdl_t *hdl);
-void etm_ckpt_fini(fmd_hdl_t *hdl);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _ETM_CKPT_H */
diff --git a/usr/src/cmd/fm/modules/sun4v/etm/etm_etm_proto.h b/usr/src/cmd/fm/modules/sun4v/etm/etm_etm_proto.h
deleted file mode 100644
index fa3b0f8174..0000000000
--- a/usr/src/cmd/fm/modules/sun4v/etm/etm_etm_proto.h
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2006 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * etm_etm_proto.h FMA ETM-to-ETM Protocol header
- * for sun4v/Ontario
- *
- * const/type defns for protocol used between two event transport
- * modules (ETMs)
- */
-
-#ifndef _ETM_ETM_PROTO_H
-#define _ETM_ETM_PROTO_H
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * --------------------------------- includes --------------------------------
- */
-
-#include <sys/types.h>
-
-/*
- * ------------------------ etm protocol all versions ------------------------
- */
-
-/* magic number for ETM protocol (start of msg hdr) */
-
-#define ETM_PROTO_MAGIC_NUM (0xADB8A5A0)
-
-/* protocol version numbers 1, 2, ... */
-
-#define ETM_PROTO_V1 (1)
-#define ETM_PROTO_V2 (2)
-#define ETM_PROTO_V3 (3)
-
-/*
- * Design_Note: Protocol V2 uses the same headers and constants as V1.
- * The V1 and V2 protocols differ from each other only in the
- * support of response messages for FMA event messages with
- * non-NONE timeout fields. In V1 it is invalid to supply a
- * timeout value that is non-NONE when sending an ETM message
- * containing an FMA event; in V2 it is valid. In both V1 and
- * V2 it is valid to supply a non-NONE timeout when sending an
- * ETM control message. V1 is the initial bootup protocol version;
- * from there version is negotiated upward.
- */
-
-/*
- * Design_Note: Protocol V3 introduces a new message type for
- * syslog alerting. It uses the same protocols and preambles.
- */
-
-/*
- * Design_Note: Care should be taken for any future V4 protocol, particularly
- * if the size of the protocol preamble shrinks vs the current
- * size, so that if ETM is implemented to receive each message
- * header as a whole, it won't pend indefinitely when sent a
- * [tiny] V4 message.
- */
-
-/*
- * ------------------------ etm protocol versions 1,2 ----------------------
- */
-
-typedef enum {
-
- ETM_MSG_TYPE_TOO_LOW = 0, /* range check place holder */
- ETM_MSG_TYPE_FMA_EVENT, /* pp_msg_type: FMA event */
- ETM_MSG_TYPE_CONTROL, /* pp_msg_type: ETM control */
- ETM_MSG_TYPE_RESPONSE, /* pp_msg_type: ETM response */
- ETM_MSG_TYPE_ALERT, /* pp_msg_type: Syslog alert */
- ETM_MSG_TYPE_TOO_BIG /* range check place holder */
-
-} etm_proto_v3_msg_type_t; /* 8-bit pp_msg_type ETM message types */
-
-#define ETM_PROTO_V1_TIMEOUT_NONE ((uint32_t)(-1))
-#define ETM_PROTO_V1_TIMEOUT_FOREVER ((uint32_t)(-2))
-
-typedef struct etm_proto_v1_pp {
-
- uint32_t pp_magic_num; /* magic number */
- uint8_t pp_proto_ver; /* version of ETM protocol */
- uint8_t pp_msg_type; /* type of ETM msg */
- uint8_t pp_sub_type; /* sub type within pp_msg_type */
- uint8_t pp_rsvd_pad; /* reserved/padding/alignment */
- uint32_t pp_xid; /* transaction id */
- uint32_t pp_timeout; /* timeout (in sec) for response */
-
-} etm_proto_v1_pp_t; /* protocol preamble for all v1 msg hdrs */
-
-typedef struct etm_proto_v1_ev_hdr {
-
- etm_proto_v1_pp_t ev_pp; /* protocol preamble */
- uint32_t ev_lens[1]; /* 0-termed lengths vector */
-
- /* uint8_t ev_bodies[]; contig packed FMA events */
-
-} etm_proto_v1_ev_hdr_t; /* header for FMA_EVENT msgs */
-
-/*
- * V3 addition: Syslog Alert. Uses the same protocol preamble as V1/V2
- */
-
-typedef struct etm_proto_v3_sa_hdr {
-
- etm_proto_v1_pp_t sa_pp; /* protocol preamble */
- uint32_t sa_priority; /* priority for syslog */
- uint32_t sa_len; /* message string length */
-
- /* uint8_t sa_message[]; contig message string */
-
-} etm_proto_v3_sa_hdr_t; /* header for ALERT msgs */
-
-typedef enum {
-
- ETM_CTL_SEL_TOO_LOW = 16, /* range check place holder */
- ETM_CTL_SEL_PING_REQ, /* ping request */
- ETM_CTL_SEL_VER_NEGOT_REQ, /* negotiate proto version request */
- ETM_CTL_SEL_TOO_BIG /* range check place holder */
-
-} etm_proto_v1_ctl_sel_t; /* 8-bit pp_sub_type control selectors */
-
-typedef struct etm_proto_v1_ctl_hdr {
-
- etm_proto_v1_pp_t ctl_pp; /* protocol preamble */
- uint32_t ctl_len; /* length of control body */
-
- /* uint8_t ctl_body[]; contig accompanying control data */
-
-} etm_proto_v1_ctl_hdr_t; /* header for CONTROL msgs */
-
-typedef struct etm_proto_v1_resp_hdr {
-
- etm_proto_v1_pp_t resp_pp; /* protocol preamble */
- int32_t resp_code; /* -errno or success code */
- uint32_t resp_len; /* length of response body */
-
- /* uint8_t resp_body[]; contig accompanying response data */
-
-} etm_proto_v1_resp_hdr_t;
-
-/*
- * --------------------------------- prolog ----------------------------------
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _ETM_ETM_PROTO_H */
diff --git a/usr/src/cmd/fm/modules/sun4v/etm/etm_filter.c b/usr/src/cmd/fm/modules/sun4v/etm/etm_filter.c
deleted file mode 100644
index 6cb898db78..0000000000
--- a/usr/src/cmd/fm/modules/sun4v/etm/etm_filter.c
+++ /dev/null
@@ -1,367 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * etm_filter.c
- * Description:
- * Find the ldom that own the resource specified in the detector field
- * of the ereport.
- */
-
-#include <pthread.h>
-#include <stdio.h>
-#include <strings.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/fm/ldom.h>
-#include <sys/fm/protocol.h>
-#include <fm/fmd_api.h>
-#include <fm/libtopo.h>
-#include <fm/topo_hc.h>
-
-#include "etm_filter.h"
-
-static etm_prc_t *etm_rcs; /* vector of root complexes */
-static uint16_t etm_rc_cnt; /* count of rc entries in rcs */
-static uint16_t etm_rc_max; /* max entries allowed in rcs */
-static pthread_mutex_t etm_rc_lock; /* lock of the rc vector */
-
-
-extern ldom_hdl_t *etm_lhp; /* libldom handle */
-
-/* ARGSUSED */
-static int
-etm_pciexrc_walker(topo_hdl_t *thp, tnode_t *node, void *arg)
-{
- int i; /* temp counter */
- int n; /* temp size of new vector */
- int err; /* temp error var */
- char *str; /* topo node value */
- fmd_hdl_t *hdl = arg; /* etm mod hdl */
- etm_prc_t *rcl; /* root complex vector */
- etm_prc_t *p; /* temp pointer */
- topo_instance_t ins; /* rc id */
- uint64_t ba; /* bus address */
-
- /* pciexrc node */
- if (strcmp(topo_node_name(node), PCIEX_ROOT) != 0)
- return (TOPO_WALK_NEXT);
-
- if (topo_prop_get_string(node, TOPO_PGROUP_IO, TOPO_IO_DEV, &str,
- &err) != 0)
- return (TOPO_WALK_NEXT);
-
- /* physical id and bus address of a root complex */
- ins = topo_node_instance(node);
- (void) sscanf(str, "/pci@%llx", &ba);
- topo_hdl_strfree(thp, str);
-
- /*
- * prc vector is full, so double its size
- */
- if (etm_rc_cnt >= etm_rc_max) {
- n = (etm_rc_max == 0) ? 1 : 2 * etm_rc_max;
- rcl = fmd_hdl_zalloc(hdl, n * sizeof (etm_prc_t), FMD_SLEEP);
- for (i = 0, p = rcl; i < n; i++, p++) {
- p->prc_id = -1;
- p->prc_status = -1;
- }
- if (etm_rcs != NULL) {
- bcopy(etm_rcs, rcl, etm_rc_max * sizeof (etm_prc_t));
- fmd_hdl_free(hdl, etm_rcs,
- etm_rc_max * sizeof (etm_prc_t));
- }
- etm_rcs = rcl;
- etm_rc_max = n;
- }
-
- if (etm_rc_cnt >= etm_rc_max) {
- fmd_hdl_abort(hdl, "rcs is full. Expect counter value %d<%d\n",
- etm_rc_cnt, etm_rc_max);
- }
-
- /* Add the rc at the end of the list */
- p = etm_rcs + etm_rc_cnt;
- p->prc_id = ins;
- p->prc_cfg_handle = ba;
- etm_rc_cnt++;
-
- return (TOPO_WALK_NEXT);
-}
-
-/*
- * etm_pciexrc_init()
- * Description:
- * Walk through the topology to find the pciexrc nodes. Then save the
- * physical instances and bus addreses in a vector.
- */
-static void
-etm_pciexrc_init(fmd_hdl_t *hdl)
-{
- topo_hdl_t *thp; /* topo handle */
- topo_walk_t *twp; /* topo walk handle */
- int err; /* topo error */
-
- if ((thp = fmd_hdl_topo_hold(hdl, TOPO_VERSION)) == NULL)
- return;
- twp = topo_walk_init(thp, FM_FMRI_SCHEME_HC, etm_pciexrc_walker,
- (void *) hdl, &err);
- if (twp == NULL) {
- fmd_hdl_topo_rele(hdl, thp);
- return;
- }
- (void) topo_walk_step(twp, TOPO_WALK_CHILD);
- topo_walk_fini(twp);
- fmd_hdl_topo_rele(hdl, thp);
-}
-
-/*
- * etm_update_prc()
- * Description:
- * Query ldmd for the ldom id
- */
-void
-etm_update_prc(fmd_hdl_t *hdl, etm_prc_t *prc)
-{
- char name[MAX_LDOM_NAME]; /* domain name */
- uint64_t virt_cfg_handle; /* bus address from ldmd */
- uint64_t did; /* domain id */
-
- if (prc == NULL)
- return;
-
- /* call libldom to find the ldom id */
- prc->prc_status = ldom_find_id(etm_lhp, prc->prc_cfg_handle,
- LDOM_RSRC_PCI, &virt_cfg_handle, name, MAX_LDOM_NAME, &did);
- if (prc->prc_status) {
- return;
- }
-
- /* cache the ldom id */
- prc->prc_did = did;
- if (prc->prc_name != NULL) {
- fmd_hdl_free(hdl, prc->prc_name, prc->prc_name_sz);
- }
- prc->prc_name_sz = strlen(name) + 1;
- prc->prc_name = fmd_hdl_zalloc(hdl, prc->prc_name_sz, FMD_SLEEP);
- (void) strncpy(prc->prc_name, name, prc->prc_name_sz);
-}
-
-/*
- * etm_find_ldom_id()
- * Description:
- * Find the ldom name and the domain id that owns the resource specified in
- * the ereport detector
- */
-int
-etm_filter_find_ldom_id(fmd_hdl_t *hdl, nvlist_t *evp, char *name,
- int name_size, uint64_t *did)
-{
- char *str; /* temp string */
- char *s; /* temp string */
- int i; /* loop counter */
- int ins; /* instance number */
- nvlist_t *det; /* ereport detector */
- nvlist_t **hcl; /* hc name-value pair list */
- uint_t sz; /* size of hcl */
- etm_prc_t *prc; /* root complex */
-
- /* check paramters */
- if (name == NULL || name_size <= 0) {
- fmd_hdl_debug(hdl, "Invalid parameters");
- return (-1);
- }
-
- /* must be an ereport */
- if ((nvlist_lookup_string(evp, FM_CLASS, &str) != 0) ||
- (strncmp(str, FM_EREPORT_CLASS, strlen(FM_EREPORT_CLASS)) != 0)) {
- fmd_hdl_debug(hdl, "not an ereport");
- return (-1);
- }
-
- /* the detector is of hc-scheme */
- if (nvlist_lookup_nvlist(evp, FM_EREPORT_DETECTOR, &det) != 0) {
- fmd_hdl_debug(hdl, "ereport detector not found");
- return (-1);
- }
- if ((nvlist_lookup_string(det, FM_FMRI_SCHEME, &str) != 0) ||
- (strcmp(str, FM_FMRI_SCHEME_HC) != 0)) {
- fmd_hdl_debug(hdl, "detector is not hc-schemed\n");
- return (-1);
- }
-
- /*
- * Find the pciexrc and extract the instance number
- */
- if (nvlist_lookup_nvlist_array(det, FM_FMRI_HC_LIST, &hcl, &sz) != 0) {
- fmd_hdl_debug(hdl, "%s is not found\n", FM_FMRI_HC_LIST);
- return (-1);
- }
- for (i = 0; i < sz; i++) {
- if (nvlist_lookup_string(hcl[i], FM_FMRI_HC_NAME, &str) == 0 &&
- nvlist_lookup_string(hcl[i], FM_FMRI_HC_ID, &s) == 0 &&
- strcmp(str, PCIEX_ROOT) == 0) {
- (void) sscanf(s, "%d", &ins);
- break;
- }
- }
- if (i >= sz) {
- fmd_hdl_debug(hdl, "%s not found\n", PCIEX_ROOT);
- return (-1);
- }
-
- (void) pthread_mutex_lock(&etm_rc_lock);
-
- /* search the entry by the physical instance number */
- for (i = 0, prc = etm_rcs; prc != NULL && i < etm_rc_cnt;
- i++, prc++) {
- if (prc->prc_id == ins) {
- /* update the cached entry */
- if (prc->prc_status != 0) {
- etm_update_prc(hdl, prc);
- }
- /* check for cached ldom name */
- if (prc->prc_status == 0 && prc->prc_name != NULL) {
- *did = prc->prc_did;
- (void) strncpy(name, prc->prc_name, name_size);
- (void) pthread_mutex_unlock(&etm_rc_lock);
- return (0);
- }
- break;
- }
- }
- if (i >= etm_rc_cnt) {
- fmd_hdl_debug(hdl, "prc[%d] not found\n", ins);
- }
-
- (void) pthread_mutex_unlock(&etm_rc_lock);
-
- return (-1);
-} /* etm_find_ldom_id */
-
-/*
- * etm_find_ldom_name()
- * Description:
- * Find the ldom name of a given domain id (did)
- */
-int
-etm_filter_find_ldom_name(fmd_hdl_t *hdl, uint64_t did, char *name,
- int name_size)
-{
- int rc = -1; /* return value */
- int i; /* loop counter */
- etm_prc_t *prc; /* root complex */
-
- (void) pthread_mutex_lock(&etm_rc_lock);
-
- /* visit all the root complexes to find an entry that matches the did */
- for (i = 0, prc = etm_rcs; prc != NULL && i < etm_rc_cnt;
- i++, prc++) {
- /* update the cached entry */
- if (prc->prc_status != 0) {
- etm_update_prc(hdl, prc);
- }
- /* find the cached ldom name */
- if (prc->prc_status == 0 && prc->prc_did == did) {
- rc = 0;
- (void) strncpy(name, prc->prc_name ? prc->prc_name : "",
- name_size);
- break;
- }
- }
-
- (void) pthread_mutex_unlock(&etm_rc_lock);
-
- return (rc);
-} /* etm_find_ldom_name */
-
-/*
- * etm_filter_handle_ldom_event()
- * Description:
- * Invalidate the ldom name in the physical root complex vector.
- */
-void
-etm_filter_handle_ldom_event(fmd_hdl_t *hdl, etm_async_event_type_t event,
- char *name) {
- int i; /* loop counter */
- etm_prc_t *prc; /* root complex */
-
- /*
- * Clear the cached ldom name
- */
- switch (event) {
- case ETM_ASYNC_EVENT_LDOM_ADD:
- case ETM_ASYNC_EVENT_LDOM_REMOVE:
- case ETM_ASYNC_EVENT_LDOM_BIND:
- case ETM_ASYNC_EVENT_LDOM_UNBIND:
- (void) pthread_mutex_lock(&etm_rc_lock);
- for (i = 0, prc = etm_rcs; prc != NULL && i < etm_rc_cnt;
- i++, prc++) {
- if (prc->prc_name != NULL &&
- strcmp(prc->prc_name, name) == 0) {
- fmd_hdl_free(hdl, prc->prc_name,
- prc->prc_name_sz);
- prc->prc_name = NULL;
- prc->prc_name_sz = 0;
- prc->prc_status = -1;
- }
- }
- (void) pthread_mutex_unlock(&etm_rc_lock);
- break;
- default:
- break;
- }
-}
-
-/* ARGSUSED */
-void
-etm_filter_init(fmd_hdl_t *hdl) {
- etm_rcs = NULL;
- etm_rc_cnt = 0;
- etm_rc_max = 0;
- (void) pthread_mutex_init(&etm_rc_lock, NULL);
- etm_pciexrc_init(hdl);
-}
-
-void
-etm_filter_fini(fmd_hdl_t *hdl) {
- int i; /* loop counter */
- etm_prc_t *prc; /* root complex pointer */
-
- for (i = 0, prc = etm_rcs; prc != NULL && i < etm_rc_cnt;
- i++, prc++) {
- if (prc->prc_name != NULL) {
- fmd_hdl_free(hdl, prc->prc_name, prc->prc_name_sz);
- prc->prc_name = NULL;
- prc->prc_name_sz = 0;
- prc->prc_status = -1;
- }
- }
- if (etm_rcs != NULL && etm_rc_max > 0) {
- fmd_hdl_free(hdl, etm_rcs, etm_rc_max * sizeof (etm_prc_t));
- }
- (void) pthread_mutex_destroy(&etm_rc_lock);
-}
diff --git a/usr/src/cmd/fm/modules/sun4v/etm/etm_filter.h b/usr/src/cmd/fm/modules/sun4v/etm/etm_filter.h
deleted file mode 100644
index ef27f4d468..0000000000
--- a/usr/src/cmd/fm/modules/sun4v/etm/etm_filter.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * etm_filter.h
- *
- * Header file of the event filter
- *
- */
-
-#ifndef _ETM_FILTER_H
-#define _ETM_FILTER_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <fm/fmd_api.h>
-
-#include "etm_iosvc.h"
-
-/* A physical root complex */
-typedef struct etm_prc {
- int32_t prc_id; /* physical id of the rc */
- uint64_t prc_cfg_handle; /* bus address */
- char *prc_name; /* bound ldom name */
- size_t prc_name_sz; /* size of name */
- int prc_status; /* ldom query status */
- uint64_t prc_did; /* ldom id */
-} etm_prc_t;
-
-void etm_filter_init(fmd_hdl_t *hdl);
-void etm_filter_fini(fmd_hdl_t *hdl);
-
-int etm_filter_find_ldom_id(fmd_hdl_t *hdl, nvlist_t *erpt, char *name,
- int name_size, uint64_t *did);
-int etm_filter_find_ldom_name(fmd_hdl_t *hdl, uint64_t did, char *name,
- int name_size);
-void etm_filter_handle_ldom_event(fmd_hdl_t *hdl, etm_async_event_type_t event,
- char *name);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _ETM_FILTER_H */
diff --git a/usr/src/cmd/fm/modules/sun4v/etm/etm_impl.h b/usr/src/cmd/fm/modules/sun4v/etm/etm_impl.h
deleted file mode 100644
index 9647b8e19d..0000000000
--- a/usr/src/cmd/fm/modules/sun4v/etm/etm_impl.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * etm_impl.h FMA ETM and Transport shared implementation header
- * for sun4v/Ontario
- *
- * const/type defns shared between the event transport module (ETM)
- * and the ETM-to-Transport API
- */
-
-#ifndef _ETM_IMPL_H
-#define _ETM_IMPL_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * ------------------------------ includes -----------------------------------
- */
-
-#include <sys/fm/protocol.h>
-#include <fm/fmd_api.h>
-
-#include "etm_xport_api.h"
-
-/*
- * ------------------------------- macros ------------------------------------
- */
-
-/* define common macros here vs #include to ease Solaris-Linux portability */
-
-#ifndef MIN
-#define MIN(x, y) ((x) < (y) ? (x) : (y))
-#endif
-#ifndef MAX
-#define MAX(x, y) ((x) > (y) ? (x) : (y))
-#endif
-#ifndef ABS
-#define ABS(x) ((x) < (0) ? (-(x)) : (x))
-#endif
-
-/* ETM I/O operations: read, write, peek */
-
-#define ETM_IO_OP_RD (1)
-#define ETM_IO_OP_WR (2)
-#define ETM_IO_OP_PK (3)
-
-/* ETM sleep times */
-
-#define ETM_SLEEP_VERY_QUIK (0)
-#define ETM_SLEEP_QUIK (1)
-#define ETM_SLEEP_SLOW (16)
-#define ETM_SLEEP_VERY_SLOW (16 * 16)
-
-/*
- * ----------------------------- property names ------------------------------
- */
-
-#define ETM_PROP_NM_XPORT_ADDRS "etm_xport_addrs"
-
-#define ETM_PROP_NM_DEBUG_LVL "etm_debug_lvl"
-#define ETM_PROP_NM_DEBUG_MAX_EV_CNT "etm_debug_max_ev_cnt"
-
-#define ETM_PROP_NM_CONSOLE "etm_alert_console"
-#define ETM_PROP_NM_SYSLOGD "etm_alert_syslog"
-#define ETM_PROP_NM_FACILITY "etm_alert_facility"
-
-#define ETM_PROP_NM_MAX_RESP_Q_LEN "etm_resp_q_max_len"
-#define ETM_PROP_NM_FMA_RESP_WAIT_TIME "etm_fma_resp_wait_time"
-
-#define ETM_PROP_NM_BAD_ACC_TO_SEC "etm_bad_acc_to_sec"
-
-/*
- * --------------------------------- prolog ----------------------------------
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _ETM_IMPL_H */
diff --git a/usr/src/cmd/fm/modules/sun4v/etm/etm_iosvc.h b/usr/src/cmd/fm/modules/sun4v/etm/etm_iosvc.h
deleted file mode 100644
index bf862e7fc5..0000000000
--- a/usr/src/cmd/fm/modules/sun4v/etm/etm_iosvc.h
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * etm_iosvc.h
- *
- * Header file of the support for io service ldom
- *
- */
-
-#ifndef _ETM_IO_SVC_H
-#define _ETM_IO_SVC_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * ------------------------------ includes -----------------------------------
- */
-
-#include <sys/fm/protocol.h>
-#include <sys/libds.h>
-#include <sys/fm/ldom.h>
-#include <fm/fmd_api.h>
-#include "etm_xport_api.h"
-#include "etm_etm_proto.h"
-
-#include <libnvpair.h>
-
-#include <pthread.h>
-
-#define FORWARDING_FAULTS_TO_CONTROL 0 /* not to forward faults to control */
-#define ASYNC_EVENT_Q_SIZE 100 /* size of the async event q */
-#define NUM_OF_ROOT_DOMAINS 8 /* size of iosvc_list structure array */
-#define MAXLEN 0x6000 /* max size of an FMA event */
-#define FMD_EVN_TTL "__ttl" /* name-value pair for ev_ttl */
-
-typedef enum {
-
- ETM_ASYNC_EVENT_TOO_LOW = 0, /* range check place holder */
- ETM_ASYNC_EVENT_LDOM_BIND, /* async event type: ldom event */
- ETM_ASYNC_EVENT_LDOM_UNBIND, /* async event type: ldom event */
- ETM_ASYNC_EVENT_LDOM_ADD, /* async event type: ldom event */
- ETM_ASYNC_EVENT_LDOM_REMOVE, /* async event type: ldom event */
- ETM_ASYNC_EVENT_DS_REG_CB, /* async event type: DS reg callback */
- ETM_ASYNC_EVENT_DS_UNREG_CB, /* async event type: DS unreg cllback */
- ETM_ASYNC_EVENT_TOO_BIG /* range check place holder */
-
-} etm_async_event_type_t; /* async etm event type */
-
-
-typedef enum {
-
- SP_MSG = 0, /* msg for ereports from SP */
- FMD_XPRT_OTHER_MSG, /* fmd all other xprt msg */
- FMD_XPRT_RUN_MSG /* fmd xprt run msg */
-
-} etm_pack_msg_type_t; /* msg type for etm_pack_ds_msg() */
-
-typedef struct etm_iosvc_q_ele {
-
- char *msg; /* ptr to ETM io svc msg */
- size_t msg_size; /* sizeof ETM io svc msg */
- uint_t ckpt_flag; /* checkpoint flags */
-
- struct etm_iosvc_q_ele *msg_nextp; /* PRIVATE - next ele ptr */
-
-} etm_iosvc_q_ele_t; /* out-going etm msg queue element */
-
-
-
-typedef struct etm_iosvc {
- char ldom_name[MAX_LDOM_NAME]; /* ldom_name */
- pthread_cond_t msg_q_cv; /* nudges send msg func more to send */
- pthread_mutex_t msg_q_lock; /* protects iosvc msg Q */
- etm_iosvc_q_ele_t
- *msg_q_head;
- /* ptr to cur head of the msg Q */
- etm_iosvc_q_ele_t
- *msg_q_tail;
- /* ptr to cur tail of the msg Q */
- uint32_t msg_q_cur_len;
- /* cur len of the msg Q */
- uint32_t msg_q_max_len;
- /* max len of the msg Q */
- uint32_t cur_send_xid; /* current trnsaction id for io svc q */
- uint32_t xid_posted_ev; /* xid of last event posted ok to fmd */
- ds_hdl_t ds_hdl; /* the ds hdl for this io svc ldom */
- fmd_xprt_t *fmd_xprt; /* fmd transport layer handle */
- pthread_t send_tid; /* tid of sending msgs 2 remote iosvc */
- pthread_t recv_tid; /* tid of recving msgs frm rmte iosvc */
- pthread_cond_t msg_ack_cv; /* ready 2 send nxt or resend cur one */
- pthread_mutex_t msg_ack_lock; /* protects msg_ack_cv */
- int thr_is_dying; /* flag to exit the thread */
- uint32_t start_sending_Q; /* flag to strt sending msg Q */
- uint32_t ack_ok; /* indicate if the ACK has come */
-} etm_iosvc_t; /* structure to support io service ldom */
-
-
-typedef struct etm_async_event_ele {
-
- etm_async_event_type_t event_type; /* async event type */
- ds_hdl_t ds_hdl; /* ds handle */
- char ldom_name[MAX_LDOM_NAME]; /* ldom name */
- ds_domain_hdl_t dhdl; /* ldom handle */
-
- struct etm_async_event_ele *async_event_nextp;
- /* next ele ptr */
-
-} etm_async_event_ele_t; /* etm async event queue element */
-
-
-/*
- * This function
- */
-extern etm_iosvc_t *etm_iosvc_lookup(fmd_hdl_t *fmd_hdl, char *ldom_name,
- ds_hdl_t ds_hdl, boolean_t iosvc_create);
-
-
-/*
- * extern etm_iosvc_t *etm_lookup_iosvc(char *ldom_name);
- */
-extern int etm_pack_ds_msg(fmd_hdl_t *fmd_hdl, etm_iosvc_t *iosvc,
- etm_proto_v1_ev_hdr_t *ev_hdrp, size_t hdr_sz, nvlist_t *evp,
- etm_pack_msg_type_t msg_type, uint_t ckpt_opt);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _ETM_IO_SVC_H */
diff --git a/usr/src/cmd/fm/modules/sun4v/etm/etm_xport_api.h b/usr/src/cmd/fm/modules/sun4v/etm/etm_xport_api.h
deleted file mode 100644
index adc20c3c40..0000000000
--- a/usr/src/cmd/fm/modules/sun4v/etm/etm_xport_api.h
+++ /dev/null
@@ -1,298 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2006 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * etm_xport_api.h FMA ETM-to-Transport API header
- * for sun4v/Ontario
- *
- * const/type defns for transporting data between an
- * event transport module (ETM) and its associated transport
- * within a fault domain
- */
-
-#ifndef _ETM_XPORT_API_H
-#define _ETM_XPORT_API_H
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * ------------------------------ includes -----------------------------------
- */
-
-#include <sys/fm/protocol.h>
-#include <fm/fmd_api.h>
-
-#include <libnvpair.h>
-
-/*
- * -------------------------------- typdefs ----------------------------------
- */
-
-typedef void* etm_xport_addr_t; /* transport address handle */
-typedef void* etm_xport_conn_t; /* transport connection handle */
-
-typedef enum {
-
- ETM_XPORT_LCC_TOO_LOW, /* place holder to ease range checking */
- ETM_XPORT_LCC_CAME_UP, /* endpoint came up (booted) */
- ETM_XPORT_LCC_WENT_DN, /* endpoint went down (crashed/shutdown) */
- ETM_XPORT_LCC_TOO_BIG /* place holder to ease range checking */
-
-} etm_xport_lcc_t; /* life cycle change of an endpoint */
-
-/*
- * -------------------- connection management functions ----------------------
- */
-
-/*
- * etm_xport_init - initialize/setup any transport infrastructure
- * before any connections are opened,
- * return 0 or -errno value if initialization failed
- */
-
-int
-etm_xport_init(fmd_hdl_t *hdl);
-
-/*
- * etm_xport_open - open a connection with the given endpoint,
- * return the connection handle,
- * or NULL and set errno if open failed
- */
-
-etm_xport_conn_t
-etm_xport_open(fmd_hdl_t *hdl, etm_xport_addr_t addr);
-
-/*
- * etm_xport_accept - accept a request to open a connection,
- * pending until a remote endpoint opens a
- * a new connection to us [and sends an ETM msg],
- * per non-NULL addrp optionally indicate the
- * remote address if known/avail (NULL if not),
- * return the connection handle,
- * or NULL and set errno on failure
- *
- * caveats:
- * any returned transport address is valid only for
- * as long as the associated connection remains open;
- * callers should NOT try to free the transport address
- *
- * if new connections are rapid relative to how
- * frequently this function is called, fairness will
- * be provided among which connections are accepted
- *
- * this function may maintain state to recognize [new]
- * connections and/or to provide fairness
- */
-
-etm_xport_conn_t
-etm_xport_accept(fmd_hdl_t *hdl, etm_xport_addr_t *addrp);
-
-/*
- * etm_xport_close - close a connection from either endpoint,
- * return the original connection handle,
- * or NULL and set errno if close failed
- */
-
-etm_xport_conn_t
-etm_xport_close(fmd_hdl_t *hdl, etm_xport_conn_t conn);
-
-/*
- * etm_xport_get_ev_addrv - indicate which transport addresses
- * are implied as destinations by the
- * given FMA event, if given no FMA event
- * (NULL) indicate default or policy
- * driven dst transport addresses,
- * return an allocated NULL terminated
- * vector of allocated transport addresses,
- * or NULL and set errno if none
- * caveats:
- * callers should never try to individually free an addr
- * within the returned vector
- */
-
-etm_xport_addr_t *
-etm_xport_get_ev_addrv(fmd_hdl_t *hdl, nvlist_t *ev);
-
-/*
- * etm_xport_free_addrv - free the given vector of transport addresses,
- * including each transport address
- */
-
-void
-etm_xport_free_addrv(fmd_hdl_t *hdl, etm_xport_addr_t *addrv);
-
-/*
- * etm_xport_get_addr_conn - indicate which connections in a NULL
- * terminated vector of connection
- * handles are associated with the
- * given transport address,
- * return an allocated NULL terminated
- * vector of those connection handles,
- * or NULL and set errno if none
- */
-
-etm_xport_conn_t *
-etm_xport_get_addr_conn(fmd_hdl_t *hdl, etm_xport_conn_t *connv,
- etm_xport_addr_t addr);
-
-/*
- * etm_xport_get_any_lcc - indicate which endpoint has undergone
- * a life cycle change and what that change
- * was (ex: come up), pending until a change
- * has occured for some/any endpoint,
- * return the appropriate address handle,
- * or NULL and set errno if problem
- *
- * caveats:
- * this function maintains or accesses state/history
- * regarding life cycle changes of endpoints
- *
- * if life cycle changes are rapid relative to how
- * frequently this function is called, fairness will
- * be provided among which endpoints are reported
- */
-
-etm_xport_addr_t
-etm_xport_get_any_lcc(fmd_hdl_t *hdl, etm_xport_lcc_t *lccp);
-
-/*
- * etm_xport_fini - finish/teardown any transport infrastructure
- * after all connections are closed,
- * return 0 or -errno value if teardown failed
- */
-
-int
-etm_xport_fini(fmd_hdl_t *hdl);
-
-/*
- * ------------------------ input/output functions ---------------------------
- */
-
-/*
- * etm_xport_read - try to read N bytes from the connection
- * into the given buffer,
- * return how many bytes actually read
- * or -errno value
- */
-
-ssize_t
-etm_xport_read(fmd_hdl_t *hdl, etm_xport_conn_t conn, void* buf,
- size_t byte_cnt);
-
-/*
- * etm_xport_write - try to write N bytes to the connection
- * from the given buffer,
- * return how many bytes actually written
- * or -errno value
- */
-
-ssize_t
-etm_xport_write(fmd_hdl_t *hdl, etm_xport_conn_t conn, void* buf,
- size_t byte_cnt);
-
-/*
- * ------------------------ miscellaneous functions --------------------------
- */
-
-typedef enum {
-
- ETM_XPORT_OPT_TOO_LOW = 0, /* range check place holder */
- ETM_XPORT_OPT_MTU_SZ, /* read/write MTU in bytes */
- ETM_XPORT_OPT_LINGER_TO, /* close linger timeout in sec */
- ETM_XPORT_OPT_TOO_BIG /* range check place holder */
-
-} etm_xport_opt_t; /* transport options w/ non-neg values */
-
-/*
- * etm_xport_get_opt - get a connection's transport option value,
- * return the current value
- * or -errno value (ex: -ENOTSUP)
- */
-
-ssize_t
-etm_xport_get_opt(fmd_hdl_t *hdl, etm_xport_conn_t conn, etm_xport_opt_t opt);
-
-
-/*
- * -------------------------- device driver defns ----------------------------
- *
- * Design_Note: These device driver interface defns should be based upon a
- * public sys include file provided by the transport device
- * driver; the header uts/sun4v/sys/glvc.h was not accessible
- * from the build's default include paths. Until that issue
- * is resolved they need to be manually synced based upon the
- * Ontario FMA Phase 1 ETM-to-Transport API Interface Spec.
- */
-
-/* ioctls for peeking data and getting/setting options */
-
-#define ETM_XPORT_IOCTL_DATA_PEEK (1)
-#define ETM_XPORT_IOCTL_OPT_OP (2)
-
-typedef struct etm_xport_msg_peek {
- void* pk_buf; /* ptr to buffer to hold peeked data */
- size_t pk_buflen; /* number of bytes of peeked data */
- uint16_t pk_flags; /* future control flags -- set to 0 */
- uint16_t pk_rsvd; /* reserved/padding -- set to 0 */
-} etm_xport_msg_peek_t;
-
-#define ETM_XPORT_OPT_GET (1)
-#define ETM_XPORT_OPT_SET (2)
-
-/* options for MTU size in bytes and linger timeout in sec */
-
-#define ETM_XPORT_OPT_MTU_SZ (1)
-#define ETM_XPORT_OPT_LINGER_TO (2)
-
-typedef struct etm_xport_opt_op {
- int oo_op; /* which operation (ex: GET) */
- int oo_opt; /* which option (ex: MTU_SZ) */
- size_t oo_val; /* option value to use (ex: 512) */
-} etm_xport_opt_op_t;
-
-/* default values for options [if unable to get/set] */
-
-/*
- * Design_Note: These might need to be made into properties in prep
- * for internet domain sockets as a future transport.
- */
-
-#define ETM_XPORT_MTU_SZ_DEF (64)
-#define ETM_XPORT_LINGER_TO_DEF (0)
-
-/*
- * --------------------------------- prolog ----------------------------------
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _ETM_XPORT_API_H */
diff --git a/usr/src/cmd/fm/modules/sun4v/etm/etm_xport_api_dd.c b/usr/src/cmd/fm/modules/sun4v/etm/etm_xport_api_dd.c
deleted file mode 100644
index 35dee4522c..0000000000
--- a/usr/src/cmd/fm/modules/sun4v/etm/etm_xport_api_dd.c
+++ /dev/null
@@ -1,1396 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * etm_xport_api_dd.c FMA ETM-to-Transport API implementation
- * for sun4v/Ontario
- *
- * library for establishing connections and transporting FMA events
- * between ETMs (event transport modules) in separate fault domain,
- * ie, between domain and service processor in same chassis, using
- * a character device driver based transport
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-/*
- * --------------------------------- includes --------------------------------
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/fm/protocol.h>
-#include <fm/fmd_api.h>
-
-#include <pthread.h>
-#include <stdio.h>
-#include <stropts.h>
-#include <locale.h>
-#include <strings.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <limits.h>
-#include <alloca.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <time.h>
-#include <poll.h>
-#include <sys/ldc.h>
-#include <sys/vldc.h>
-
-#include "etm_xport_api.h"
-#include "etm_etm_proto.h"
-#include "etm_impl.h"
-
-/*
- * ----------------------- private consts and defns --------------------------
- */
-
-/* magic numbers (32 bits) for transport address and connection handle */
-
-#define ETM_XPORT_DD_MAGIC_ADDR (0x45544D41)
-#define ETM_XPORT_DD_MAGIC_CONN (0x45544D43)
-
-/* flags to use in opening transport device */
-
-#define ETM_XPORT_OPEN_FLAGS (O_RDWR | O_NOCTTY)
-
-/*
- * transport address and connection handle structures overload fn and fd
- * fields to include state information:
- *
- * fn file name NULL means unused or closed
- * fd file descriptor -1 means unused or closed
- */
-
-typedef struct _etm_xport_addr {
- uint32_t magic_num; /* magic number */
- char *fn; /* fullpath to device node */
-} _etm_xport_addr_t;
-
-typedef struct _etm_xport_conn {
- uint32_t magic_num; /* magic number */
- int fd; /* open dev file descriptor */
- _etm_xport_addr_t *addr; /* associated transport addr */
-} _etm_xport_conn_t;
-
-/*
- * filename of device node to reach SP from domain. one of these two
- * device nodes will be used:
- * ETM_XPORT_DEV_FN_SP - the Ontario glvc
- * ETM_XPORT_DEV_VLDC - the more recent LDOMS 1.0 (a.k.a. Ontario+) vldc
- * When the latter is in use, use_vldc is set to 1.
- *
- * filenames of device nodes to reach domains from SP
- * are NA because SP runs ALOM vs Solaris or Linux
- * and ETM is for Unix based OSes
- */
-#define ETM_XPORT_DEV_FN_SP "/dev/spfma"
-
-#define ETM_XPORT_DEV_VLDC \
- "/devices/virtual-devices@100/channel-devices@200" \
- "/virtual-channel-client@2:spfma"
-
-/*
- * -------------------------- global variables -------------------------------
- */
-
-static int use_vldc = 0;
-
-static struct stats {
-
- /* address handle failures */
-
- fmd_stat_t xport_addr_magicnum_bad;
- fmd_stat_t xport_addr_fn_bad;
-
- /* connection handle failures */
-
- fmd_stat_t xport_conn_magicnum_bad;
- fmd_stat_t xport_conn_fd_bad;
-
- /* internal read/peek failures */
-
- fmd_stat_t xport_buffread_badargs;
- fmd_stat_t xport_rawpeek_badargs;
-
- /* xport API failures */
-
- fmd_stat_t xport_accept_badargs;
- fmd_stat_t xport_get_addr_conn_badargs;
- fmd_stat_t xport_free_addr_badargs;
- fmd_stat_t xport_free_addrv_badargs;
- fmd_stat_t xport_get_any_lcc_badargs;
-
- /* system and library failures */
-
- fmd_stat_t xport_os_open_fail;
- fmd_stat_t xport_os_close_fail;
- fmd_stat_t xport_os_read_fail;
- fmd_stat_t xport_os_write_fail;
- fmd_stat_t xport_os_peek_fail;
- fmd_stat_t xport_os_ioctl_fail;
-
-} etm_xport_stats = {
-
- /* address handle failures */
-
- { "xport_addr_magicnum_bad", FMD_TYPE_UINT64,
- "invalid address handle magic number" },
- { "xport_addr_fn_bad", FMD_TYPE_UINT64,
- "invalid address handle file name" },
-
- /* connection handle failures */
-
- { "xport_conn_magicnum_bad", FMD_TYPE_UINT64,
- "invalid connection handle magic number" },
- { "xport_conn_fd_bad", FMD_TYPE_UINT64,
- "invalid connection handle file descriptor" },
-
- /* internal read/peek failures */
-
- { "xport_buffread_badargs", FMD_TYPE_UINT64,
- "bad arguments in etm_xport_buffered_read" },
- { "xport_rawpeek_badargs", FMD_TYPE_UINT64,
- "bad arguments in etm_xport_raw_peek" },
-
- /* xport API failures */
-
- { "xport_accept_badargs", FMD_TYPE_UINT64,
- "bad arguments in etm_xport_accept" },
- { "xport_get_addr_conn_badargs", FMD_TYPE_UINT64,
- "bad arguments in etm_xport_get_addr_conn" },
- { "xport_free_addr_badargs", FMD_TYPE_UINT64,
- "bad arguments in etm_xport_free_addr" },
- { "xport_free_addrv_badargs", FMD_TYPE_UINT64,
- "bad arguments in etm_xport_free_addrv" },
- { "xport_get_any_lcc_badargs", FMD_TYPE_UINT64,
- "bad arguments in etm_xport_get_any_lcc" },
-
- /* system and library failures */
-
- { "xport_os_open_fail", FMD_TYPE_UINT64,
- "open system call failures" },
- { "xport_os_close_fail", FMD_TYPE_UINT64,
- "close system call failures" },
- { "xport_os_read_fail", FMD_TYPE_UINT64,
- "read system call failures" },
- { "xport_os_write_fail", FMD_TYPE_UINT64,
- "write system call failures" },
- { "xport_os_peek_fail", FMD_TYPE_UINT64,
- "peek (ioctl) failures" },
- { "xport_os_ioctl_fail", FMD_TYPE_UINT64,
- "ioctl system call failures" }
-};
-
-/* intermediate read buffer to [partially] emulate byte stream semantics */
-
-static uint8_t *etm_xport_irb_area = NULL; /* buffered read area */
-static uint8_t *etm_xport_irb_head = NULL; /* read head (dequeue) */
-static uint8_t *etm_xport_irb_tail = NULL; /* read tail (enqueue) */
-static size_t etm_xport_irb_mtu_sz = 0; /* MTU size (in bytes) */
-
-/*
- * -------------------------- private variables ------------------------------
- */
-
-static _etm_xport_conn_t *
-etm_xport_vldc_conn = NULL; /* single connection handle for VLDC */
-
-static pthread_mutex_t
-etm_xport_vldc_lock = PTHREAD_MUTEX_INITIALIZER;
- /* lock for open()/close() VLDC */
-
-static int
-etm_xport_debug_lvl = 0; /* debug level: 0 off, 1 on, 2 more, ... */
-
-static char *
-etm_xport_addrs = ""; /* spec str for transport addrs to use */
-
-static int
-etm_xport_should_fake_dd = 0; /* bool for whether to fake device driver */
-
-/*
- * -------------------------- private functions ------------------------------
- */
-
-/*
- * etm_fake_ioctl - fake/simulate transport driver's ioctl() behavior
- * [for unit testing with device driver absent or
- * for alternative directory entry based transports],
- * return 0 for success
- * or -1 and set errno
- * caveats:
- * simulation may be incomplete, especially wrt peek()
- *
- * Design_Note: To avoid interfering with FMD's signal mask (SIGALRM)
- * do not use [Solaris] sleep(3C) and instead use
- * pthread_cond_wait() or nanosleep(), both of which
- * are POSIX spec-ed to leave signal masks alone.
- * This is needed for Solaris and Linux (domain and SP).
- */
-
-static int
-etm_fake_ioctl(int fd, int op, void *buf)
-{
- int rv; /* ret val */
- etm_xport_opt_op_t *op_ctl_ptr; /* ptr for option ops */
- etm_xport_msg_peek_t *peek_ctl_ptr; /* ptr for peeking */
- struct stat stat_buf; /* file stat struct */
- ssize_t n; /* gen use */
- struct timespec tms; /* for nanosleep() */
-
- tms.tv_sec = 0;
- tms.tv_nsec = 0;
-
- rv = 0; /* default is success */
-
- if (op == ETM_XPORT_IOCTL_DATA_PEEK) {
- peek_ctl_ptr = buf;
- /* sleep until some data avail, potentially forever */
- for (;;) {
- if (fstat(fd, &stat_buf) < 0) {
- rv = -1;
- goto func_ret;
- }
- if (stat_buf.st_size > 0) {
- n = MIN(peek_ctl_ptr->pk_buflen,
- stat_buf.st_size);
- peek_ctl_ptr->pk_buflen = n;
- /* return bogus data assuming content unused */
- (void) memset(peek_ctl_ptr->pk_buf, 0xA5, n);
- goto func_ret;
- }
- tms.tv_sec = ETM_SLEEP_QUIK;
- tms.tv_nsec = 0;
- if ((n = nanosleep(&tms, NULL)) < 0) {
- rv = -1;
- goto func_ret;
- }
- } /* forever awaiting data */
- } else if (op == ETM_XPORT_IOCTL_OPT_OP) {
- op_ctl_ptr = buf;
- /* default near MTU_SZ gets and agree with everything else */
- if ((op_ctl_ptr->oo_op == ETM_XPORT_OPT_GET) &&
- (op_ctl_ptr->oo_opt == ETM_XPORT_OPT_MTU_SZ)) {
- op_ctl_ptr->oo_val = 7 * ETM_XPORT_MTU_SZ_DEF / 8;
- }
- goto func_ret;
- } /* whether ioctl op is handled */
-
- rv = -1;
- errno = EINVAL;
-
-func_ret:
-
- return (rv);
-
-} /* etm_fake_ioctl() */
-
-/*
- * etm_xport_get_fn - return a cached read-only copy
- * of the device node name to use
- * for the given I/O operation
- */
-
-static char *
-etm_xport_get_fn(fmd_hdl_t *hdl, int io_op)
-{
- static char fn_wr[PATH_MAX] = {0}; /* fn for write */
- static char fn_rd[PATH_MAX] = {0}; /* fn for read/peek */
- char *rv; /* ret val */
- char *prop_str; /* property string */
- char *cp; /* char ptr */
-
- rv = NULL;
-
- /* use cached copies if avail */
-
- if ((io_op == ETM_IO_OP_WR) && (fn_wr[0] != '\0')) {
- return (fn_wr);
- }
- if (((io_op == ETM_IO_OP_RD) || (io_op == ETM_IO_OP_PK)) &&
- (fn_rd[0] != '\0')) {
- return (fn_rd);
- }
-
- /* create cached copies if empty "" property string */
-
- prop_str = fmd_prop_get_string(hdl, ETM_PROP_NM_XPORT_ADDRS);
- if (etm_xport_debug_lvl >= 2) {
- fmd_hdl_debug(hdl, "info: etm_xport_get_fn prop_str %s\n",
- prop_str);
- }
-
- if (strlen(prop_str) == 0) {
- struct stat buf;
- char *fname;
-
- if (stat(ETM_XPORT_DEV_VLDC, &buf) == 0) {
- use_vldc = 1;
- fname = ETM_XPORT_DEV_VLDC;
- } else {
- use_vldc = 0;
- fname = ETM_XPORT_DEV_FN_SP;
- }
-
- (void) strncpy(fn_wr, fname, PATH_MAX - 1);
- (void) strncpy(fn_rd, fname, PATH_MAX - 1);
- rv = fn_rd;
- if (io_op == ETM_IO_OP_WR) {
- rv = fn_wr;
- }
- goto func_ret;
- } /* if no/empty property set */
-
- /* create cached copies if "write[|read]" property string */
-
- if (io_op == ETM_IO_OP_WR) {
- (void) strncpy(fn_wr, prop_str, PATH_MAX - 1);
- if ((cp = strchr(fn_wr, '|')) != NULL) {
- *cp = '\0';
- }
- rv = fn_wr;
- } else {
- if ((cp = strchr(prop_str, '|')) != NULL) {
- cp++;
- } else {
- cp = prop_str;
- }
- (void) strncpy(fn_rd, cp, PATH_MAX - 1);
- rv = fn_rd;
- } /* whether io op is write/read/peek */
-
-func_ret:
-
- if (etm_xport_debug_lvl >= 2) {
- fmd_hdl_debug(hdl, "info: etm_xport_get_fn fn_wr %s fn_rd %s\n",
- fn_wr, fn_rd);
- }
- fmd_prop_free_string(hdl, prop_str);
- return (rv);
-
-} /* etm_xport_get_fn() */
-
-/*
- * etm_xport_valid_addr - validate the given transport address,
- * return 0 if valid
- * or -errno value if not
- */
-
-static int
-etm_xport_valid_addr(etm_xport_addr_t addr)
-{
- _etm_xport_addr_t *_addr; /* transport address */
- struct stat stat_buf; /* buffer for stat() results */
-
- _addr = addr;
-
- if (_addr == NULL) {
- return (-EINVAL);
- }
-
- if (_addr->magic_num != ETM_XPORT_DD_MAGIC_ADDR) {
- etm_xport_stats.xport_addr_magicnum_bad.fmds_value.ui64++;
- return (-EFAULT);
- }
-
- if (stat(_addr->fn, &stat_buf) < 0) {
- /* errno assumed set by above call */
- etm_xport_stats.xport_addr_fn_bad.fmds_value.ui64++;
- return (-errno);
- }
-
- return (0);
-
-} /* etm_xport_valid_addr() */
-
-/*
- * etm_xport_valid_conn - validate the given connection handle,
- * return 0 if valid
- * or -errno value if not
- */
-
-static int
-etm_xport_valid_conn(etm_xport_conn_t conn)
-{
- _etm_xport_conn_t *_conn; /* connection handle */
-
- _conn = conn;
-
- if (_conn == NULL) {
- return (-EINVAL);
- }
-
- if (_conn->magic_num != ETM_XPORT_DD_MAGIC_CONN) {
- etm_xport_stats.xport_conn_magicnum_bad.fmds_value.ui64++;
- return (-EFAULT);
- }
-
- if (_conn->fd <= -1) {
- etm_xport_stats.xport_conn_fd_bad.fmds_value.ui64++;
- return (-EBADF);
- }
-
- return (0);
-
-} /* etm_xport_valid_conn() */
-
-/*
- * etm_xport_free_addr - free the given transport address
- */
-
-static void
-etm_xport_free_addr(fmd_hdl_t *hdl, etm_xport_addr_t addr)
-{
- if (addr == NULL) {
- etm_xport_stats.xport_free_addr_badargs.fmds_value.ui64++;
- return;
- }
-
- fmd_hdl_free(hdl, addr, sizeof (_etm_xport_addr_t));
-
-} /* etm_xport_free_addr() */
-
-/*
- * etm_xport_dup_addr - duplicate the given transport address,
- * which is to be freed separately,
- * return the newly allocated transport address
- * pending until possible to do so
- */
-
-static etm_xport_addr_t
-etm_xport_dup_addr(fmd_hdl_t *hdl, etm_xport_addr_t addr)
-{
- etm_xport_addr_t new_addr; /* new transport address */
-
- new_addr = fmd_hdl_zalloc(hdl, sizeof (_etm_xport_addr_t), FMD_SLEEP);
- (void) memcpy(new_addr, addr, sizeof (_etm_xport_addr_t));
- return (new_addr);
-
-} /* etm_xport_dup_addr() */
-
-/*
- * etm_xport_raw_peek - try to peek N <= MTU bytes from the connection
- * into the caller's given buffer,
- * return how many bytes actually peeked
- * or -errno value
- * caveats:
- * peeked data is NOT guaranteed by all platform transports
- * to remain enqueued if this process/thread crashes;
- * this casts some doubt on the utility of this func
- *
- * transport does NOT support peek sizes > MTU
- */
-
-static ssize_t
-etm_xport_raw_peek(fmd_hdl_t *hdl, _etm_xport_conn_t *_conn,
- void *buf, size_t byte_cnt)
-{
- ssize_t rv; /* ret val */
- ssize_t n; /* gen use */
- etm_xport_msg_peek_t peek_ctl; /* struct for peeking */
-
- rv = 0;
-
- /* sanity check args */
-
- if ((hdl == NULL) || (_conn == NULL) || (buf == NULL)) {
- etm_xport_stats.xport_rawpeek_badargs.fmds_value.ui64++;
- return (-EINVAL);
- }
-
- if ((etm_xport_irb_mtu_sz > 0) && (byte_cnt > etm_xport_irb_mtu_sz)) {
- etm_xport_stats.xport_rawpeek_badargs.fmds_value.ui64++;
- return (-EINVAL);
- }
-
- /* try to peek requested amt of data */
-
- peek_ctl.pk_buf = buf;
- peek_ctl.pk_buflen = byte_cnt;
- peek_ctl.pk_flags = 0;
- peek_ctl.pk_rsvd = 0;
-
- if (etm_xport_should_fake_dd) {
- n = etm_fake_ioctl(_conn->fd, ETM_XPORT_IOCTL_DATA_PEEK,
- &peek_ctl);
- } else {
- n = ioctl(_conn->fd, ETM_XPORT_IOCTL_DATA_PEEK, &peek_ctl);
- }
- if (n < 0) {
- /* errno assumed set by above call */
- etm_xport_stats.xport_os_peek_fail.fmds_value.ui64++;
- rv = (-errno);
- } else {
- rv = peek_ctl.pk_buflen;
- }
-
- if (etm_xport_debug_lvl >= 3) {
- fmd_hdl_debug(hdl, "info: [fake] ioctl(_PEEK) ~= %d bytes\n",
- rv);
- }
- return (rv);
-
-} /* etm_xport_raw_peek() */
-
-/*
- * Design_Note:
- *
- * The transport device driver did not implement byte stream semantics
- * per the spec; its behavior is closer to that of a block device.
- * Consequently, ETM within its Transport API attempts to make the device
- * look like a byte stream by using an intermediate buffer in user space
- * and maintaining progress pointers within that buffer which is populated
- * in near-MTU sized reads. We think it's OK to leave the write side
- * implementation as it was originally written for byte stream semantics
- * because we were told subsequent write()s will pend until the earlier
- * content is read() at the remote end -- essentially each write() must be
- * paired with a single read() -- the device driver does not buffer any I/O.
- *
- * The early driver bugs of returning more data than requested (thus
- * causing buffer overrun corruptions/crashes) and requiring user buffers
- * to be stack based vs heap based, have both been corrected.
- */
-
-/*
- * etm_xport_buffered_read - try to read N <= MTU bytes from the connection
- * or from an privately maintained intermediate buffer,
- * into the caller's given buffer,
- * return how many bytes actually read
- * or -errno value
- *
- * caveats:
- * simple buffer scheme consumes 2x MTU bytes of memory and
- * may do unnecesssary memory copies for ease of coding
- */
-
-static ssize_t
-etm_xport_buffered_read(fmd_hdl_t *hdl, _etm_xport_conn_t *_conn,
- void *buf, size_t byte_cnt)
-{
- ssize_t i, n; /* gen use */
-
- /* perform one-time initializations */
-
- /*
- * Design_Note:
- *
- * These initializations are not done in etm_xport_init() because
- * the connection/device is not yet open and hence the MTU size
- * is not yet known. However, the corresponding cleanup is done
- * in etm_xport_fini(). The buffering for byte stream semantics
- * should be done on a per device vs per connection basis; the
- * MTU size is assumed to remain constant across all connections.
- */
-
- if (etm_xport_irb_mtu_sz == 0) {
- if ((n = etm_xport_get_opt(hdl, _conn,
- ETM_XPORT_OPT_MTU_SZ)) < 0) {
- etm_xport_irb_mtu_sz = ETM_XPORT_MTU_SZ_DEF;
- } else {
- etm_xport_irb_mtu_sz = n;
- }
- }
- if (etm_xport_irb_area == NULL) {
- etm_xport_irb_area = fmd_hdl_zalloc(hdl,
- 2 * etm_xport_irb_mtu_sz, FMD_SLEEP);
- etm_xport_irb_head = etm_xport_irb_area;
- etm_xport_irb_tail = etm_xport_irb_head;
- }
-
- /* sanity check the byte count after have MTU */
-
- if (byte_cnt > etm_xport_irb_mtu_sz) {
- etm_xport_stats.xport_buffread_badargs.fmds_value.ui64++;
- return (-EINVAL);
- }
-
- /* if intermediate buffer can satisfy request do so w/out xport read */
-
- if (byte_cnt <= (etm_xport_irb_tail - etm_xport_irb_head)) {
- (void) memcpy(buf, etm_xport_irb_head, byte_cnt);
- etm_xport_irb_head += byte_cnt;
- if (etm_xport_debug_lvl >= 2) {
- fmd_hdl_debug(hdl, "info: quik buffered read == %d\n",
- byte_cnt);
- }
- return (byte_cnt);
- }
-
- /* slide buffer contents to front to make room for [MTU] more bytes */
-
- n = etm_xport_irb_tail - etm_xport_irb_head;
- (void) memmove(etm_xport_irb_area, etm_xport_irb_head, n);
- etm_xport_irb_head = etm_xport_irb_area;
- etm_xport_irb_tail = etm_xport_irb_head + n;
-
- /*
- * peek to see how much data is avail and read all of it;
- * there is no race condition between peeking and reading
- * due to unbuffered design of the device driver
- */
- if (use_vldc) {
- pollfd_t pollfd;
-
- pollfd.events = POLLIN;
- pollfd.revents = 0;
- pollfd.fd = _conn->fd;
-
- if ((n = poll(&pollfd, 1, -1)) < 1) {
- if (n == 0)
- return (-EIO);
- else
- return (-errno);
- }
-
- /*
- * set i to the maximum size --- read(..., i) below will
- * pull in n bytes (n <= i) anyway
- */
- i = etm_xport_irb_mtu_sz;
- } else {
- if ((i = etm_xport_raw_peek(hdl, _conn, etm_xport_irb_tail,
- etm_xport_irb_mtu_sz)) < 0) {
- return (i);
- }
- }
- if ((n = read(_conn->fd, etm_xport_irb_tail, i)) < 0) {
- /* errno assumed set by above call */
- etm_xport_stats.xport_os_read_fail.fmds_value.ui64++;
- return (-errno);
- }
- etm_xport_irb_tail += n;
-
- /* satisfy request as best we can with what we now have */
-
- n = MIN(byte_cnt, (etm_xport_irb_tail - etm_xport_irb_head));
- (void) memcpy(buf, etm_xport_irb_head, n);
- etm_xport_irb_head += n;
- if (etm_xport_debug_lvl >= 2) {
- fmd_hdl_debug(hdl, "info: slow buffered read == %d\n", n);
- }
- return (n);
-
-} /* etm_xport_buffered_read() */
-
-/*
- * ------------------ connection establishment functions ---------------------
- */
-
-/*
- * etm_xport_init - initialize/setup any transport infrastructure
- * before any connections are opened,
- * return 0 or -errno value if initialization failed
- */
-
-int
-etm_xport_init(fmd_hdl_t *hdl)
-{
- _etm_xport_addr_t **_addrv; /* address vector */
- int i; /* vector index */
- ssize_t n; /* gen use */
- int rv; /* ret val */
- struct stat stat_buf; /* file stat struct */
- char *fn; /* filename of dev node */
-
- rv = 0; /* assume good */
-
- _addrv = NULL;
-
- if (hdl == NULL) {
- rv = (-EINVAL);
- goto func_ret;
- }
-
- fmd_hdl_debug(hdl, "info: xport initializing\n");
-
- /* setup statistics and properties from FMD */
-
- (void) fmd_stat_create(hdl, FMD_STAT_NOALLOC,
- sizeof (etm_xport_stats) / sizeof (fmd_stat_t),
- (fmd_stat_t *)&etm_xport_stats);
-
- etm_xport_debug_lvl = fmd_prop_get_int32(hdl, ETM_PROP_NM_DEBUG_LVL);
- etm_xport_addrs = fmd_prop_get_string(hdl, ETM_PROP_NM_XPORT_ADDRS);
- fmd_hdl_debug(hdl, "info: etm_xport_debug_lvl %d\n",
- etm_xport_debug_lvl);
- fmd_hdl_debug(hdl, "info: etm_xport_addrs %s\n", etm_xport_addrs);
-
- /* decide whether to fake [some of] the device driver behavior */
-
- etm_xport_should_fake_dd = 0; /* default to false */
-
- fn = etm_xport_get_fn(hdl, ETM_IO_OP_RD);
- if (stat(fn, &stat_buf) < 0) {
- /* errno assumed set by above call */
- fmd_hdl_error(hdl, "error: bad device node %s errno %d\n",
- fn, errno);
- rv = (-errno);
- goto func_ret;
- }
- if (!S_ISCHR(stat_buf.st_mode) && use_vldc == 0) {
- etm_xport_should_fake_dd = 1; /* not a char driver */
- }
- fmd_hdl_debug(hdl, "info: etm_xport_should_fake_dd %d\n",
- etm_xport_should_fake_dd);
-
- /* validate each default dst transport address */
-
- if ((_addrv = (void *)etm_xport_get_ev_addrv(hdl, NULL)) == NULL) {
- /* errno assumed set by above call */
- rv = (-errno);
- goto func_ret;
- }
-
- for (i = 0; _addrv[i] != NULL; i++) {
- if ((n = etm_xport_valid_addr(_addrv[i])) < 0) {
- fmd_hdl_error(hdl, "error: bad xport addr %p\n",
- _addrv[i]);
- rv = n;
- goto func_ret;
- }
- } /* foreach dst addr */
-
- if (use_vldc) {
- etm_xport_vldc_conn = etm_xport_open(hdl, _addrv[0]);
- if (etm_xport_vldc_conn == NULL) {
- fmd_hdl_debug(hdl, "info: etm_xport_open() failed\n");
- }
- }
-
-func_ret:
-
- if (_addrv != NULL) {
- etm_xport_free_addrv(hdl, (void *)_addrv);
- }
- if (rv >= 0) {
- fmd_hdl_debug(hdl, "info: xport initialized ok\n");
- }
- return (rv);
-
-} /* etm_xport_init() */
-
-/*
- * etm_xport_open - open a connection with the given endpoint,
- * return the connection handle,
- * or NULL and set errno if open failed
- *
- * Design_Note: The current transport device driver's open()
- * call will succeed even if the SP is down;
- * hence there's currently no need for a retry
- * mechanism.
- */
-
-etm_xport_conn_t
-etm_xport_open(fmd_hdl_t *hdl, etm_xport_addr_t addr)
-{
- _etm_xport_addr_t *_addr; /* address handle */
- _etm_xport_conn_t *_conn; /* connection handle */
- ssize_t n; /* gen use */
-
- if ((n = etm_xport_valid_addr(addr)) < 0) {
- errno = (-n);
- return (NULL);
- }
-
- _addr = etm_xport_dup_addr(hdl, addr);
-
- /* allocate a connection handle and start populating it */
-
- _conn = fmd_hdl_zalloc(hdl, sizeof (_etm_xport_conn_t), FMD_SLEEP);
-
- (void) pthread_mutex_lock(&etm_xport_vldc_lock);
-
- if (use_vldc == 0 || etm_xport_vldc_conn == NULL) {
- if ((_conn->fd = open(_addr->fn,
- ETM_XPORT_OPEN_FLAGS, 0)) == -1) {
- /* errno assumed set by above call */
- etm_xport_free_addr(hdl, _addr);
- fmd_hdl_free(hdl, _conn, sizeof (_etm_xport_conn_t));
- etm_xport_stats.xport_os_open_fail.fmds_value.ui64++;
- (void) pthread_mutex_unlock(&etm_xport_vldc_lock);
- return (NULL);
- }
- }
-
- if (use_vldc && etm_xport_vldc_conn == NULL) {
- vldc_opt_op_t op;
-
- /* Set the channel to reliable mode */
- op.op_sel = VLDC_OP_SET;
- op.opt_sel = VLDC_OPT_MODE;
- op.opt_val = LDC_MODE_RELIABLE;
-
- if (ioctl(_conn->fd, VLDC_IOCTL_OPT_OP, &op) != 0) {
- /* errno assumed set by above call */
- (void) close(_conn->fd);
- etm_xport_free_addr(hdl, _addr);
- fmd_hdl_free(hdl, _conn, sizeof (_etm_xport_conn_t));
- etm_xport_stats.xport_os_ioctl_fail.fmds_value.ui64++;
- (void) pthread_mutex_unlock(&etm_xport_vldc_lock);
- return (NULL);
- }
-
- etm_xport_vldc_conn = _conn;
- } else if (use_vldc && etm_xport_vldc_conn != NULL) {
- _conn->fd = dup(etm_xport_vldc_conn->fd);
- }
-
- (void) pthread_mutex_unlock(&etm_xport_vldc_lock);
-
- /* return the fully formed connection handle */
-
- _conn->magic_num = ETM_XPORT_DD_MAGIC_CONN;
- _conn->addr = _addr;
-
- return (_conn);
-
-} /* etm_xport_open() */
-
-/*
- * etm_xport_accept - accept a request to open a connection,
- * pending until a remote endpoint opens a
- * a new connection to us [and sends an ETM msg],
- * per non-NULL addrp optionally indicate the
- * remote address if known/avail (NULL if not),
- * return the connection handle,
- * or NULL and set errno on failure
- *
- * caveats:
- * any returned transport address is valid only for
- * as long as the associated connection remains open;
- * callers should not try to free the transport address
- *
- * if new connections are rapid relative to how
- * frequently this function is called, fairness will
- * be provided among which connections are accepted
- *
- * this function may maintain state to recognize [new]
- * connections and/or to provide fairness
- */
-
-etm_xport_conn_t
-etm_xport_accept(fmd_hdl_t *hdl, etm_xport_addr_t *addrp)
-{
- _etm_xport_addr_t *_addr; /* address handle */
- _etm_xport_addr_t **_addrv; /* vector of addresses */
- _etm_xport_conn_t *_conn; /* connection handle */
- _etm_xport_conn_t *rv; /* ret val */
- uint8_t buf[4]; /* buffer for peeking */
- int n; /* byte cnt */
- struct timespec tms; /* for nanosleep() */
-
- rv = NULL; /* default is failure */
-
- _conn = NULL;
- _addrv = NULL;
-
- tms.tv_sec = ETM_SLEEP_QUIK;
- tms.tv_nsec = 0;
-
- /*
- * get the default dst transport address and open a connection to it;
- * there is only 1 default addr
- */
-
- if ((_addrv = (void*)etm_xport_get_ev_addrv(hdl, NULL)) == NULL) {
- /* errno assumed set by above call */
- goto func_ret;
- }
-
- if (_addrv[0] == NULL) {
- errno = ENXIO; /* missing addr */
- etm_xport_stats.xport_accept_badargs.fmds_value.ui64++;
- goto func_ret;
- }
-
- if (_addrv[1] != NULL) {
- errno = E2BIG; /* too many addrs */
- etm_xport_stats.xport_accept_badargs.fmds_value.ui64++;
- goto func_ret;
- }
-
- _addr = _addrv[0];
- _addr->fn = etm_xport_get_fn(hdl, ETM_IO_OP_RD);
-
- if ((_conn = etm_xport_open(hdl, _addr)) == NULL) {
- /* errno assumed set by above call */
- goto func_ret;
- }
-
- if (etm_xport_should_fake_dd) {
- (void) nanosleep(&tms, NULL); /* delay [for resp capture] */
- (void) ftruncate(_conn->fd, 0); /* act like socket/queue/pipe */
- }
-
- /*
- * peek from the connection to simulate an accept() system call
- * behavior; this will pend until some ETM message is written
- * from the other end
- */
-
- if (use_vldc) {
- pollfd_t pollfd;
-
- pollfd.events = POLLIN;
- pollfd.revents = 0;
- pollfd.fd = _conn->fd;
-
- if ((n = poll(&pollfd, 1, -1)) < 1) {
- if (n == 0) {
- errno = EIO;
- }
- goto func_ret;
- }
- } else {
- if ((n = etm_xport_raw_peek(hdl, _conn, buf, 1)) < 0) {
- errno = (-n);
- goto func_ret;
- }
- }
-
- rv = _conn; /* success, return the open connection */
-
-func_ret:
-
- /* cleanup the connection if failed */
-
- if (rv == NULL) {
- if (_conn != NULL) {
- (void) etm_xport_close(hdl, _conn);
- }
- } else {
- if (addrp != NULL) {
- *addrp = _conn->addr;
- }
- }
-
- /* free _addrv and all its transport addresses */
-
- if (_addrv != NULL) {
- etm_xport_free_addrv(hdl, (void *)_addrv);
- }
-
- if (etm_xport_debug_lvl >= 2) {
- fmd_hdl_debug(hdl, "info: accept conn %p w/ *addrp %p\n",
- rv, (addrp != NULL ? *addrp : NULL));
- }
-
- return (rv);
-
-} /* etm_xport_accept() */
-
-/*
- * etm_xport_close - close a connection from either endpoint,
- * return the original connection handle,
- * or NULL and set errno if close failed
- */
-
-etm_xport_conn_t
-etm_xport_close(fmd_hdl_t *hdl, etm_xport_conn_t conn)
-{
- etm_xport_conn_t rv; /* ret val */
- _etm_xport_conn_t *_conn; /* connection handle */
- int nev; /* -errno val */
-
- _conn = conn;
-
- rv = _conn; /* assume success */
-
- if ((nev = etm_xport_valid_conn(_conn)) < 0) {
- _conn = NULL;
- rv = NULL;
- goto func_ret;
- }
-
- /* close the device node */
-
- (void) pthread_mutex_lock(&etm_xport_vldc_lock);
-
- if (close(_conn->fd) < 0) {
- /* errno assumed set by above call */
- etm_xport_stats.xport_os_close_fail.fmds_value.ui64++;
- nev = (-errno);
- rv = NULL;
- }
-
- if (use_vldc && (_conn == etm_xport_vldc_conn)) {
- etm_xport_vldc_conn = NULL;
- }
-
- (void) pthread_mutex_unlock(&etm_xport_vldc_lock);
-
-func_ret:
-
- /* cleanup the connection */
-
- if (_conn != NULL) {
- etm_xport_free_addr(hdl, _conn->addr);
- _conn->addr = NULL;
- _conn->magic_num = 0;
- _conn->fd = -1;
- fmd_hdl_free(hdl, _conn, sizeof (_etm_xport_conn_t));
- }
-
- if (rv == NULL) {
- errno = (-nev);
- }
- return (rv);
-
-} /* etm_xport_close() */
-
-/*
- * etm_xport_get_ev_addrv - indicate which transport addresses
- * are implied as destinations by the
- * given FMA event, if given no FMA event
- * (NULL) indicate default or policy
- * driven dst transport addresses,
- * return an allocated NULL terminated
- * vector of allocated transport addresses,
- * or NULL and set errno if none
- * caveats:
- * callers should never try to individually free an addr
- * within the returned vector
- */
-
-etm_xport_addr_t *
-etm_xport_get_ev_addrv(fmd_hdl_t *hdl, nvlist_t *evp)
-{
- _etm_xport_addr_t *_addr; /* address handle */
- _etm_xport_addr_t **_addrv; /* vector of addresses */
-
- if (evp == NULL) {
-
- /*
- * allocate address handles for default/policy destinations
- *
- * in reality we have just 1 dst transport addr
- */
-
- _addr = fmd_hdl_zalloc(hdl, sizeof (_etm_xport_addr_t),
- FMD_SLEEP);
- } else {
-
- /*
- * allocate address handles per FMA event content
- *
- * in reality we have just 1 dst transport addr
- */
-
- _addr = fmd_hdl_zalloc(hdl, sizeof (_etm_xport_addr_t),
- FMD_SLEEP);
- } /* whether caller passed in a FMA event */
-
- /* allocate vector with 1 non-NULL transport addr */
-
- _addrv = fmd_hdl_zalloc(hdl, 2 * sizeof (_etm_xport_addr_t *),
- FMD_SLEEP);
-
- _addr->fn = etm_xport_get_fn(hdl, ETM_IO_OP_WR);
- _addr->magic_num = ETM_XPORT_DD_MAGIC_ADDR;
- _addrv[0] = _addr;
- _addrv[1] = NULL;
-
- return ((void *) _addrv);
-
-} /* etm_xport_get_ev_addrv() */
-
-/*
- * etm_xport_free_addrv - free the given vector of transport addresses,
- * including each transport address
- */
-
-void
-etm_xport_free_addrv(fmd_hdl_t *hdl, etm_xport_addr_t *addrv)
-{
- _etm_xport_addr_t **_addrv; /* vector of addrs */
- int i; /* vector index */
-
- if (addrv == NULL) {
- etm_xport_stats.xport_free_addrv_badargs.fmds_value.ui64++;
- return;
- }
-
- _addrv = (void*)addrv;
-
- for (i = 0; _addrv[i] != NULL; i++) {
- etm_xport_free_addr(hdl, _addrv[i]);
- _addrv[i] = NULL;
- }
- fmd_hdl_free(hdl, _addrv, (i + 1) * sizeof (_etm_xport_addr_t *));
-
-} /* etm_xport_free_addrv() */
-
-/*
- * etm_xport_get_addr_conn - indicate which connections in a NULL
- * terminated vector of connection
- * handles are associated with the
- * given transport address,
- * return an allocated NULL terminated
- * vector of those connection handles,
- * or NULL and set errno if none
- */
-
-etm_xport_conn_t *
-etm_xport_get_addr_conn(fmd_hdl_t *hdl, etm_xport_conn_t *connv,
- etm_xport_addr_t addr)
-{
- _etm_xport_conn_t **_connv; /* vector of connections */
- _etm_xport_conn_t **_mcv; /* matching connections vector */
- _etm_xport_addr_t *_addr; /* transport addr to match */
- int n; /* matching transport addr cnt */
- int i; /* vector index */
-
- if ((connv == NULL) || (addr == NULL)) {
- errno = EINVAL;
- etm_xport_stats.xport_get_addr_conn_badargs.fmds_value.ui64++;
- return (NULL);
- }
-
- _connv = (void*)connv;
- _addr = (void*)addr;
-
- /* count, allocate space for, and copy, all matching addrs */
-
- n = 0;
- for (i = 0; _connv[i] != NULL; i++) {
- if ((_connv[i]->addr == _addr) ||
- ((_connv[i]->addr != NULL) &&
- (_connv[i]->addr->fn == _addr->fn))) {
- n++;
- }
- } /* for counting how many addresses match */
-
- _mcv = fmd_hdl_zalloc(hdl, (n + 1) * sizeof (_etm_xport_conn_t *),
- FMD_SLEEP);
- n = 0;
- for (i = 0; _connv[i] != NULL; i++) {
- if ((_connv[i]->addr == _addr) ||
- ((_connv[i]->addr != NULL) &&
- (_connv[i]->addr->fn == _addr->fn))) {
- _mcv[n] = _connv[i];
- n++;
- }
- } /* for copying matching address pointers */
- _mcv[n] = NULL;
-
- return ((void *) _mcv);
-
-} /* etm_xport_get_addr_conn() */
-
-/*
- * etm_xport_get_any_lcc - indicate which endpoint has undergone
- * a life cycle change and what that change
- * was (ex: came up), pending until a change
- * has occured for some/any endpoint,
- * return the appropriate address handle,
- * or NULL and set errno if problem
- *
- * caveats:
- * this function maintains or accesses state/history
- * regarding life cycle changes of endpoints
- *
- * if life cycle changes are rapid relative to how
- * frequently this function is called, fairness will
- * be provided among which endpoints are reported
- */
-
-etm_xport_addr_t
-etm_xport_get_any_lcc(fmd_hdl_t *hdl, etm_xport_lcc_t *lccp)
-{
- if ((hdl == NULL) || (lccp == NULL)) {
- etm_xport_stats.xport_get_any_lcc_badargs.fmds_value.ui64++;
- errno = EINVAL;
- return (NULL);
- }
-
- /*
- * function not needed in FMA Phase 1 for sun4v/Ontario
- */
-
- errno = ENOTSUP;
- return (NULL);
-
-} /* etm_xport_get_any_lcc() */
-
-/*
- * etm_xport_fini - finish/teardown any transport infrastructure
- * after all connections are closed,
- * return 0 or -errno value if teardown failed
- */
-
-int
-etm_xport_fini(fmd_hdl_t *hdl)
-{
- fmd_hdl_debug(hdl, "info: xport finalizing\n");
-
- if (use_vldc && (etm_xport_vldc_conn != NULL)) {
- (void) etm_xport_close(hdl, etm_xport_vldc_conn);
- etm_xport_vldc_conn = NULL;
- }
-
- /* free any long standing properties from FMD */
-
- fmd_prop_free_string(hdl, etm_xport_addrs);
-
- /* cleanup the intermediate read buffer */
-
- if (etm_xport_irb_tail != etm_xport_irb_head) {
- fmd_hdl_debug(hdl, "warning: xport %d bytes stale data\n",
- (int)(etm_xport_irb_tail - etm_xport_irb_head));
- }
- fmd_hdl_free(hdl, etm_xport_irb_area, 2 * etm_xport_irb_mtu_sz);
- etm_xport_irb_area = NULL;
- etm_xport_irb_head = NULL;
- etm_xport_irb_tail = NULL;
- etm_xport_irb_mtu_sz = 0;
-
- /* cleanup statistics from FMD */
-
- (void) fmd_stat_destroy(hdl,
- sizeof (etm_xport_stats) / sizeof (fmd_stat_t),
- (fmd_stat_t *)&etm_xport_stats);
-
- fmd_hdl_debug(hdl, "info: xport finalized ok\n");
- return (0);
-
-} /* etm_xport_fini() */
-
-/*
- * ------------------------ input/output functions ---------------------------
- */
-
-/*
- * etm_xport_read - try to read N bytes from the connection
- * into the given buffer,
- * return how many bytes actually read
- * or -errno value
- */
-
-ssize_t
-etm_xport_read(fmd_hdl_t *hdl, etm_xport_conn_t conn, void *buf,
- size_t byte_cnt)
-{
- return (etm_xport_buffered_read(hdl, conn, buf, byte_cnt));
-
-} /* etm_xport_read() */
-
-/*
- * etm_xport_write - try to write N bytes to the connection
- * from the given buffer,
- * return how many bytes actually written
- * or -errno value
- */
-
-ssize_t
-etm_xport_write(fmd_hdl_t *hdl, etm_xport_conn_t conn, void *buf,
- size_t byte_cnt)
-{
- _etm_xport_conn_t *_conn; /* connection handle */
- int n; /* byte cnt */
-
- _conn = conn;
-
- if (hdl == NULL) { /* appease lint */
- return (-EINVAL);
- }
- if ((n = etm_xport_valid_conn(_conn)) < 0) {
- return (n);
- }
-
- /* write to the connection device's open file descriptor */
-
- if ((n = write(_conn->fd, buf, byte_cnt)) < 0) {
- /* errno assumed set by above call */
- etm_xport_stats.xport_os_write_fail.fmds_value.ui64++;
- n = (-errno);
- }
-
- return (n);
-
-} /* etm_xport_write() */
-
-/*
- * ------------------------ miscellaneous functions --------------------------
- */
-
-/*
- * etm_xport_get_opt - get a connection's transport option value,
- * return the current value
- * or -errno value (ex: -ENOTSUP)
- */
-
-ssize_t
-etm_xport_get_opt(fmd_hdl_t *hdl, etm_xport_conn_t conn, etm_xport_opt_t opt)
-{
- ssize_t rv; /* ret val */
- _etm_xport_conn_t *_conn; /* connection handle */
- etm_xport_opt_op_t op_ctl; /* struct for option ops */
- ssize_t n; /* gen use */
-
- rv = 0;
- _conn = conn;
-
- if (hdl == NULL) { /* appease lint */
- return (-EINVAL);
- }
- if ((n = etm_xport_valid_conn(_conn)) < 0) {
- return (n);
- }
-
- op_ctl.oo_op = ETM_XPORT_OPT_GET;
- op_ctl.oo_opt = opt;
-
- if (etm_xport_should_fake_dd) {
- n = etm_fake_ioctl(_conn->fd, ETM_XPORT_IOCTL_OPT_OP, &op_ctl);
- } else if (use_vldc) {
- if (opt == ETM_XPORT_OPT_MTU_SZ) {
- vldc_opt_op_t operation;
-
- operation.op_sel = VLDC_OP_GET;
- operation.opt_sel = VLDC_OPT_MTU_SZ;
-
- n = ioctl(_conn->fd, VLDC_IOCTL_OPT_OP, &operation);
-
- op_ctl.oo_val = operation.opt_val;
- } else {
- return (-EINVAL);
- }
- } else {
- n = ioctl(_conn->fd, ETM_XPORT_IOCTL_OPT_OP, &op_ctl);
- }
- if (n < 0) {
- /* errno assumed set by above call */
- rv = (-errno);
- etm_xport_stats.xport_os_ioctl_fail.fmds_value.ui64++;
- } else {
- rv = (int)op_ctl.oo_val;
- }
-
- return (rv);
-
-} /* etm_xport_get_opt() */
diff --git a/usr/src/cmd/fm/modules/sun4v/generic-mem/Makefile b/usr/src/cmd/fm/modules/sun4v/generic-mem/Makefile
deleted file mode 100644
index 21e2c40b62..0000000000
--- a/usr/src/cmd/fm/modules/sun4v/generic-mem/Makefile
+++ /dev/null
@@ -1,63 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-CLASS = arch
-ARCH = sun4v
-MODULE = generic-mem
-GENERIC_MEM = ../../sun4v/$(MODULE)
-
-SRCS = \
- gmem_main.c \
- gmem_mem.c \
- gmem_dimm.c \
- gmem_memerr.c \
- gmem_page.c \
- gmem_state.c \
- gmem_fmri.c \
- gmem_util.c
-
-include ../../Makefile.plugin
-
-INCDIRS += \
- $(SRC)/uts/sun4 \
- $(SRC)/uts/sparc/v9 \
- $(SRC)/uts/sun4v \
- $(ROOT)/usr/platform/sun4v/include \
- $(GENERIC_MEM)
-
-GMEM_VERSION = "1.0"
-
-LDLIBS += -L$(ROOTLIB)/fm -ltopo
-LDFLAGS += -R/usr/lib/fm
-CPPFLAGS += $(INCDIRS:%=-I%) -DGMEM_VERSION='$(GMEM_VERSION)' -D$(ARCH)
-CERRWARN += -_gcc=-Wno-switch
-CERRWARN += -_gcc=-Wno-parentheses
-
-%.o: $(GENERIC_MEM)/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
-%.ln: $(GENERIC_MEM)/%.c
- $(LINT.c) -c $<
diff --git a/usr/src/cmd/fm/modules/sun4v/generic-mem/generic-mem.conf b/usr/src/cmd/fm/modules/sun4v/generic-mem/generic-mem.conf
deleted file mode 100644
index ee344c2bf6..0000000000
--- a/usr/src/cmd/fm/modules/sun4v/generic-mem/generic-mem.conf
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-#
-# configuration file for the generic-mem.so diagnosis engine
-#
-# The following configuration are valid:
-#
-# setprop ce_n <interger>
-# Sets the serd N value for memory ce.
-#
-# setprop ce_t <hrtime> (1h, 2day, 2week,..)
-# Sets the serd T value for memory ce
-#
-# setprop filter_ratio <interger>
-# Sets the serd increment value for the memory ce
-#
-# setprop max_retired_pages <interger>
-# Sets the max number of retired pages in a dimm.
-# When this number is reached, the dimm is faulted
-#
-
-dictionary SUN4V
diff --git a/usr/src/cmd/fm/modules/sun4v/generic-mem/gmem.h b/usr/src/cmd/fm/modules/sun4v/generic-mem/gmem.h
deleted file mode 100644
index f00a53e07e..0000000000
--- a/usr/src/cmd/fm/modules/sun4v/generic-mem/gmem.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
- */
-
-#ifndef _GMEM_H
-#define _GMEM_H
-
-#include <stdarg.h>
-#include <fm/fmd_api.h>
-#include <sys/param.h>
-
-#include <gmem_util.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define GMEM_STAT_BUMP(name) gmem.gm_stats->name.fmds_value.ui64++
-#define GMEM_FLTMAXCONF 95
-
-typedef struct gmem_stat {
- fmd_stat_t bad_mem_resource; /* # of malformed hc-scheme resource */
- fmd_stat_t bad_close; /* # of inapplicable case closes */
- fmd_stat_t old_erpt; /* # of erpts for removed components */
- fmd_stat_t dimm_creat; /* # of DIMM state structs created */
- fmd_stat_t page_creat; /* # of page state structs created */
- fmd_stat_t ce_unknown; /* # of unknown CEs seen */
- fmd_stat_t ce_interm; /* # of intermittent CEs seen */
- fmd_stat_t ce_clearable_persis; /* # of clearable persistent CEs seen */
- fmd_stat_t ce_sticky; /* # of sticky CEs seen */
- fmd_stat_t dimm_migrat; /* # of DIMMs migrated to new version */
-} gmem_stat_t;
-
-typedef struct gmem_serd {
- const char *cs_name;
- uint_t cs_n;
- hrtime_t cs_t;
-} gmem_serd_t;
-
-typedef struct gmem {
- gmem_list_t gm_dimms; /* List of DIMM state structures */
- gmem_list_t gm_pages; /* List of page state structures */
- gmem_stat_t *gm_stats; /* Module statistics */
- size_t gm_pagesize; /* Page size, in bytes */
- uint64_t gm_pagemask; /* Mask for page alignments */
- uint32_t gm_max_retired_pages; /* max num retired pages */
- uint32_t gm_ce_n; /* serd n */
- uint64_t gm_ce_t; /* serd t */
- uint32_t gm_filter_ratio; /* serd filter ratio */
- uint32_t gm_low_ce_thresh; /* low threshold retired pages */
- uint32_t gm_nupos; /* same number of upos */
- uint32_t gm_dupce; /* number of dup CEs */
-} gmem_t;
-
-extern gmem_t gmem;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _GMEM_H */
diff --git a/usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_dimm.c b/usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_dimm.c
deleted file mode 100644
index c64ab7ccfe..0000000000
--- a/usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_dimm.c
+++ /dev/null
@@ -1,555 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
- */
-
-
-/*
- * Support routines for DIMMs.
- */
-
-#include <gmem_mem.h>
-#include <gmem_dimm.h>
-#include <gmem.h>
-#include <errno.h>
-#include <limits.h>
-#include <string.h>
-#include <strings.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <fm/fmd_api.h>
-#include <fm/libtopo.h>
-#include <sys/fm/protocol.h>
-#include <sys/mem.h>
-#include <sys/nvpair.h>
-
-nvlist_t *dimm_nvl;
-
-typedef struct dimmid {
- char serial[100];
- int type;
-} dimmid_t;
-
-static int gmem_find_dimm_chip(nvlist_t *, uint32_t *);
-
-nvlist_t *
-gmem_dimm_fru(gmem_dimm_t *dimm)
-{
- return (dimm->dimm_asru_nvl);
-}
-
-static void
-gmem_dimm_free(fmd_hdl_t *hdl, gmem_dimm_t *dimm, int destroy)
-{
- gmem_case_t *cc = &dimm->dimm_case;
- int i;
- gmem_mq_t *q;
- tstamp_t *tsp, *next;
-
- if (cc->cc_cp != NULL) {
- gmem_case_fini(hdl, cc->cc_cp, destroy);
- if (cc->cc_serdnm != NULL) {
- if (fmd_serd_exists(hdl, cc->cc_serdnm) &&
- destroy)
- fmd_serd_destroy(hdl, cc->cc_serdnm);
- fmd_hdl_strfree(hdl, cc->cc_serdnm);
- }
- }
-
- gmem_fmri_fini(hdl, &dimm->dimm_asru, destroy);
-
- for (i = 0; i < GMEM_MAX_CKWDS; i++) {
- while ((q = gmem_list_next(&dimm->mq_root[i])) != NULL) {
- if (q->mq_serdnm != NULL) {
- if (fmd_serd_exists(hdl, q->mq_serdnm))
- fmd_serd_destroy(hdl, q->mq_serdnm);
- fmd_hdl_strfree(hdl, q->mq_serdnm);
- q->mq_serdnm = NULL;
- }
-
- for (tsp = gmem_list_next(&q->mq_dupce_tstamp);
- tsp != NULL; tsp = next) {
- next = gmem_list_next(tsp);
- gmem_list_delete(&q->mq_dupce_tstamp,
- &tsp->ts_l);
- fmd_hdl_free(hdl, tsp, sizeof (tstamp_t));
- }
-
- gmem_list_delete(&dimm->mq_root[i], q);
- fmd_hdl_free(hdl, q, sizeof (gmem_mq_t));
- }
- }
-
- if (destroy)
- fmd_buf_destroy(hdl, NULL, dimm->dimm_bufname);
-
- gmem_list_delete(&gmem.gm_dimms, dimm);
- fmd_hdl_free(hdl, dimm, sizeof (gmem_dimm_t));
-}
-
-void
-gmem_dimm_destroy(fmd_hdl_t *hdl, gmem_dimm_t *dimm)
-{
- fmd_stat_destroy(hdl, 1, &(dimm->dimm_retstat));
- gmem_dimm_free(hdl, dimm, FMD_B_TRUE);
-}
-
-static gmem_dimm_t *
-dimm_lookup_by_serial(const char *serial)
-{
- gmem_dimm_t *dimm;
-
- for (dimm = gmem_list_next(&gmem.gm_dimms); dimm != NULL;
- dimm = gmem_list_next(dimm)) {
- if (strcmp(dimm->dimm_serial, serial) == 0)
- return (dimm);
- }
-
- return (NULL);
-}
-
-gmem_dimm_t *
-gmem_dimm_create(fmd_hdl_t *hdl, nvlist_t *asru, nvlist_t *det)
-{
- gmem_dimm_t *dimm;
- nvlist_t *fmri;
- char *serial;
- uint32_t chip_id;
-
- if (nvlist_lookup_string(asru, FM_FMRI_HC_SERIAL_ID, &serial) != 0) {
- fmd_hdl_debug(hdl, "Unable to get dimm serial\n");
- return (NULL);
- }
-
- if (nvlist_dup(asru, &fmri, 0) != 0) {
- fmd_hdl_debug(hdl, "dimm create nvlist dup failed");
- return (NULL);
- }
-
- (void) gmem_find_dimm_chip(det, &chip_id);
-
- fmd_hdl_debug(hdl, "dimm_create: creating new DIMM serial=%s\n",
- serial);
- GMEM_STAT_BUMP(dimm_creat);
-
- dimm = fmd_hdl_zalloc(hdl, sizeof (gmem_dimm_t), FMD_SLEEP);
- dimm->dimm_nodetype = GMEM_NT_DIMM;
- dimm->dimm_version = GMEM_DIMM_VERSION;
- dimm->dimm_phys_addr_low = ULLONG_MAX;
- dimm->dimm_phys_addr_hi = 0;
- dimm->dimm_syl_error = USHRT_MAX;
- dimm->dimm_chipid = chip_id;
-
- gmem_bufname(dimm->dimm_bufname, sizeof (dimm->dimm_bufname), "dimm_%s",
- serial);
- gmem_fmri_init(hdl, &dimm->dimm_asru, fmri, "dimm_asru_%s", serial);
-
- nvlist_free(fmri);
-
- (void) nvlist_lookup_string(dimm->dimm_asru_nvl, FM_FMRI_HC_SERIAL_ID,
- (char **)&dimm->dimm_serial);
-
- gmem_mem_retirestat_create(hdl, &dimm->dimm_retstat, dimm->dimm_serial,
- 0, GMEM_DIMM_STAT_PREFIX);
-
- gmem_list_append(&gmem.gm_dimms, dimm);
- gmem_dimm_dirty(hdl, dimm);
-
- return (dimm);
-}
-
-gmem_dimm_t *
-gmem_dimm_lookup(fmd_hdl_t *hdl, nvlist_t *asru)
-{
- gmem_dimm_t *dimm;
- char *serial;
- int err;
-
- err = nvlist_lookup_string(asru, FM_FMRI_HC_SERIAL_ID, &serial);
-
- if (err != 0) {
- fmd_hdl_debug(hdl, "Can't get dimm serial number\n");
- GMEM_STAT_BUMP(bad_mem_resource);
- return (NULL);
- }
-
- dimm = dimm_lookup_by_serial(serial);
- return (dimm);
-}
-
-
-static gmem_dimm_t *
-gmem_dimm_v0tov1(fmd_hdl_t *hdl, gmem_dimm_0_t *old, size_t oldsz)
-{
- gmem_dimm_t *new;
- if (oldsz != sizeof (gmem_dimm_0_t)) {
- fmd_hdl_abort(hdl, "size of state doesn't match size of "
- "version 0 state (%u bytes).\n", sizeof (gmem_dimm_0_t));
- }
-
- new = fmd_hdl_zalloc(hdl, sizeof (gmem_dimm_t), FMD_SLEEP);
- new->dimm_header = old->dimm0_header;
- new->dimm_version = GMEM_DIMM_VERSION;
- new->dimm_asru = old->dimm0_asru;
- new->dimm_nretired = old->dimm0_nretired;
- new->dimm_phys_addr_hi = 0;
- new->dimm_phys_addr_low = ULLONG_MAX;
-
- fmd_hdl_free(hdl, old, oldsz);
- return (new);
-}
-
-static gmem_dimm_t *
-gmem_dimm_wrapv1(fmd_hdl_t *hdl, gmem_dimm_pers_t *pers, size_t psz)
-{
- gmem_dimm_t *dimm;
-
- if (psz != sizeof (gmem_dimm_pers_t)) {
- fmd_hdl_abort(hdl, "size of state doesn't match size of "
- "version 0 state (%u bytes).\n", sizeof (gmem_dimm_pers_t));
- }
-
- dimm = fmd_hdl_zalloc(hdl, sizeof (gmem_dimm_t), FMD_SLEEP);
- bcopy(pers, dimm, sizeof (gmem_dimm_pers_t));
- fmd_hdl_free(hdl, pers, psz);
- return (dimm);
-}
-
-void *
-gmem_dimm_restore(fmd_hdl_t *hdl, fmd_case_t *cp, gmem_case_ptr_t *ptr)
-{
- gmem_dimm_t *dimm;
-
- for (dimm = gmem_list_next(&gmem.gm_dimms); dimm != NULL;
- dimm = gmem_list_next(dimm)) {
- if (strcmp(dimm->dimm_bufname, ptr->ptr_name) == 0)
- break;
- }
-
- if (dimm == NULL) {
- int migrated = 0;
- size_t dimmsz;
-
- fmd_hdl_debug(hdl, "restoring dimm from %s\n", ptr->ptr_name);
-
- if ((dimmsz = fmd_buf_size(hdl, NULL, ptr->ptr_name)) == 0) {
- fmd_hdl_abort(hdl, "dimm referenced by case %s does "
- "not exist in saved state\n",
- fmd_case_uuid(hdl, cp));
- } else if (dimmsz > GMEM_DIMM_MAXSIZE ||
- dimmsz < GMEM_DIMM_MINSIZE) {
- fmd_hdl_abort(hdl, "dimm buffer referenced by case %s "
- "is out of bounds (is %u bytes, max %u, min %u)\n",
- fmd_case_uuid(hdl, cp), dimmsz,
- GMEM_DIMM_MAXSIZE, GMEM_DIMM_MINSIZE);
- }
-
- if ((dimm = gmem_buf_read(hdl, NULL, ptr->ptr_name,
- dimmsz)) == NULL) {
- fmd_hdl_abort(hdl, "failed to read dimm buf %s",
- ptr->ptr_name);
- }
-
- fmd_hdl_debug(hdl, "found %d in version field\n",
- dimm->dimm_version);
-
- if (GMEM_DIMM_VERSIONED(dimm)) {
-
- switch (dimm->dimm_version) {
- case GMEM_DIMM_VERSION_1:
- dimm = gmem_dimm_wrapv1(hdl,
- (gmem_dimm_pers_t *)dimm, dimmsz);
- break;
- default:
- fmd_hdl_abort(hdl, "unknown version (found %d) "
- "for dimm state referenced by case %s.\n",
- dimm->dimm_version, fmd_case_uuid(hdl, cp));
- break;
- }
- } else {
- dimm = gmem_dimm_v0tov1(hdl, (gmem_dimm_0_t *)dimm,
- dimmsz);
- migrated = 1;
- }
-
- if (migrated) {
- GMEM_STAT_BUMP(dimm_migrat);
- gmem_dimm_dirty(hdl, dimm);
- }
-
- gmem_fmri_restore(hdl, &dimm->dimm_asru);
-
- if ((errno = nvlist_lookup_string(dimm->dimm_asru_nvl,
- FM_FMRI_HC_SERIAL_ID, (char **)&dimm->dimm_serial)) != 0)
- fmd_hdl_abort(hdl,
- "failed to retrieve serial from asru");
-
-
- gmem_mem_retirestat_create(hdl, &dimm->dimm_retstat,
- dimm->dimm_serial, dimm->dimm_nretired,
- GMEM_DIMM_STAT_PREFIX);
-
- gmem_list_append(&gmem.gm_dimms, dimm);
- }
-
- switch (ptr->ptr_subtype) {
- case GMEM_PTR_DIMM_CASE:
- gmem_mem_case_restore(hdl, &dimm->dimm_case, cp, "dimm",
- dimm->dimm_serial);
- break;
- default:
- fmd_hdl_abort(hdl, "invalid %s subtype %d\n",
- ptr->ptr_name, ptr->ptr_subtype);
- }
-
- return (dimm);
-}
-
-void
-gmem_dimm_validate(fmd_hdl_t *hdl)
-{
- gmem_dimm_t *dimm, *next;
-
- for (dimm = gmem_list_next(&gmem.gm_dimms); dimm != NULL; dimm = next) {
- next = gmem_list_next(dimm);
-
- if (!gmem_dimm_present(hdl, dimm->dimm_asru_nvl))
- gmem_dimm_destroy(hdl, dimm);
- }
-}
-
-void
-gmem_dimm_dirty(fmd_hdl_t *hdl, gmem_dimm_t *dimm)
-{
- if (fmd_buf_size(hdl, NULL, dimm->dimm_bufname) !=
- sizeof (gmem_dimm_pers_t))
- fmd_buf_destroy(hdl, NULL, dimm->dimm_bufname);
-
- /* No need to rewrite the FMRIs in the dimm - they don't change */
- fmd_buf_write(hdl, NULL, dimm->dimm_bufname, &dimm->dimm_pers,
- sizeof (gmem_dimm_pers_t));
-}
-
-void
-gmem_dimm_gc(fmd_hdl_t *hdl)
-{
- gmem_dimm_validate(hdl);
-}
-
-void
-gmem_dimm_fini(fmd_hdl_t *hdl)
-{
- gmem_dimm_t *dimm;
-
- while ((dimm = gmem_list_next(&gmem.gm_dimms)) != NULL)
- gmem_dimm_free(hdl, dimm, FMD_B_FALSE);
-}
-
-
-/*ARGSUSED*/
-static int
-find_dimm_hc_fmri(topo_hdl_t *thp, tnode_t *node, void *arg)
-{
-
- char *topo_sn;
- dimmid_t *dimmid = (dimmid_t *)arg;
- nvlist_t *fru = NULL;
- nvlist_t *rsc = NULL;
- nvlist_t *asru = NULL;
- int err;
-
- if (topo_node_fru(node, &fru, NULL, &err) < 0)
- return (TOPO_WALK_NEXT);
-
- err = nvlist_lookup_string(fru, FM_FMRI_HC_SERIAL_ID, &topo_sn);
- if (err != 0) {
- nvlist_free(fru);
- return (TOPO_WALK_NEXT);
- }
-
- if (strcmp(dimmid->serial, topo_sn) != 0) {
- nvlist_free(fru);
- return (TOPO_WALK_NEXT);
- }
-
- switch (dimmid->type) {
- case FINDFRU:
- (void) nvlist_dup(fru, &dimm_nvl, NV_UNIQUE_NAME);
- break;
- case FINDRSC:
- (void) topo_node_resource(node, &rsc, &err);
- if (rsc != NULL) {
- (void) nvlist_dup(rsc, &dimm_nvl,
- NV_UNIQUE_NAME);
- nvlist_free(rsc);
- }
- break;
- case FINDASRU:
- (void) topo_node_asru(node, &asru, NULL, &err);
- if (asru != NULL) {
- (void) nvlist_dup(asru, &dimm_nvl,
- NV_UNIQUE_NAME);
- nvlist_free(asru);
- }
- break;
- default:
- break;
- }
- nvlist_free(fru);
- return (TOPO_WALK_TERMINATE);
-}
-
-nvlist_t *
-gmem_find_dimm_by_sn(fmd_hdl_t *hdl, dimmid_t *dimmid) {
- topo_hdl_t *thp;
- topo_walk_t *twp;
- int err;
- dimm_nvl = NULL;
-
- if ((thp = fmd_hdl_topo_hold(hdl, TOPO_VERSION)) == NULL)
- return (NULL);
-
- if ((twp = topo_walk_init(thp, FM_FMRI_SCHEME_HC,
- find_dimm_hc_fmri, dimmid, &err)) == NULL) {
- fmd_hdl_topo_rele(hdl, thp);
- return (NULL);
- }
-
- (void) topo_walk_step(twp, TOPO_WALK_CHILD);
- topo_walk_fini(twp);
- fmd_hdl_topo_rele(hdl, thp);
- return (dimm_nvl);
-}
-
-nvlist_t *
-gmem_find_dimm_fru(fmd_hdl_t *hdl, char *sn)
-{
- dimmid_t fru;
- (void) strcpy(fru.serial, sn);
- fru.type = FINDFRU;
- return (gmem_find_dimm_by_sn(hdl, &fru));
-}
-
-nvlist_t *
-gmem_find_dimm_rsc(fmd_hdl_t *hdl, char *sn)
-{
- dimmid_t rsc;
- (void) strcpy(rsc.serial, sn);
- rsc.type = FINDRSC;
- return (gmem_find_dimm_by_sn(hdl, &rsc));
-}
-
-nvlist_t *
-gmem_find_dimm_asru(fmd_hdl_t *hdl, char *sn)
-{
- dimmid_t asru;
- (void) strcpy(asru.serial, sn);
- asru.type = FINDASRU;
- return (gmem_find_dimm_by_sn(hdl, &asru));
-}
-
-int
-gmem_dimm_present(fmd_hdl_t *hdl, nvlist_t *asru)
-{
- char *sn;
- nvlist_t *dimm = NULL;
-
- if (nvlist_lookup_string(asru, FM_FMRI_HC_SERIAL_ID, &sn) != 0) {
- fmd_hdl_debug(hdl, "Unable to get dimm serial\n");
- return (0);
- }
- dimm = gmem_find_dimm_fru(hdl, sn);
- if (dimm == NULL) {
- fmd_hdl_debug(hdl, "Dimm sn=%s is not present\n", sn);
- return (0);
- }
- nvlist_free(dimm);
- return (1);
-}
-
-static int
-gmem_find_dimm_chip(nvlist_t *nvl, uint32_t *chip)
-{
-
- char *name, *id, *end;
- nvlist_t **hcl;
- uint_t n;
- int i;
- int rc = 0;
- *chip = ULONG_MAX;
-
- if (nvlist_lookup_nvlist_array(nvl, FM_FMRI_HC_LIST, &hcl, &n) < 0)
- return (0);
- for (i = 0; i < n; i++) {
- (void) nvlist_lookup_string(hcl[i], FM_FMRI_HC_NAME, &name);
- (void) nvlist_lookup_string(hcl[i], FM_FMRI_HC_ID, &id);
-
- if (strcmp(name, "chip") == 0) {
- *chip = (uint32_t)strtoul(id, &end, 10);
- rc = 1;
- break;
- }
- }
- return (rc);
-}
-
-/*ARGSUSED*/
-int
-gmem_same_datapath_dimms(fmd_hdl_t *hdl, gmem_dimm_t *d1, gmem_dimm_t *d2)
-{
-
- if (d1->dimm_chipid == ULONG_MAX || d2->dimm_chipid == ULONG_MAX)
- return (0);
-
- if (d1->dimm_chipid == d2->dimm_chipid)
- return (1);
-
- return (0);
-}
-
-int
-gmem_check_symbol_error(fmd_hdl_t *hdl, gmem_dimm_t *d, uint16_t upos)
-{
- gmem_dimm_t *dimm = NULL, *next = NULL;
-
- for (dimm = gmem_list_next(&gmem.gm_dimms); dimm != NULL;
- dimm = next) {
- next = gmem_list_next(dimm);
- if (gmem_same_datapath_dimms(hdl, dimm, d) &&
- dimm->dimm_syl_error == upos)
- return (1);
- }
- return (0);
-}
-
-void
-gmem_save_symbol_error(fmd_hdl_t *hdl, gmem_dimm_t *d, uint16_t upos)
-{
- gmem_dimm_t *dimm = NULL, *next = NULL;
-
- for (dimm = gmem_list_next(&gmem.gm_dimms); dimm != NULL;
- dimm = next) {
- next = gmem_list_next(dimm);
- if (gmem_same_datapath_dimms(hdl, dimm, d))
- dimm->dimm_syl_error = upos;
- }
-}
diff --git a/usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_dimm.h b/usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_dimm.h
deleted file mode 100644
index 972b788345..0000000000
--- a/usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_dimm.h
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
- */
-
-#ifndef _GMEM_DIMM_H
-#define _GMEM_DIMM_H
-
-
-/*
- * Memory modules are described by the gmem_dimm general-purpose state
- * structure.
- *
- * Data structure P? Case? Notes
- * ---------------- --- ----- ----------------------------------------------
- * gmem_dimm_t Yes No Name is derived from the serial ("dimm_%s")
- * gmem_case_ptr_t Yes Yes Name is case's UUID
- * dimm_asru Yes No Name is derived from the serial
- * ("dimm_asru_%s")
- * dimm_serial No No Pointer into ASRU - relinked during restore
- */
-
-#include <gmem_mem.h>
-#include <values.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * GMEM_MAX_CKWDS denotes the highest number, across all covered
- * SPARC architectures, of checkwords per cache line.
- */
-
-#define GMEM_MAX_CKWDS 8
-#define FINDRSC 0
-#define FINDFRU 1
-#define FINDASRU 2
-
-#define DIMM_MKVERSION(version) (version)
-
-#define GMEM_DIMM_VERSION_0 DIMM_MKVERSION(0)
-#define GMEM_DIMM_VERSION_1 DIMM_MKVERSION(1)
-#define GMEM_DIMM_VERSION GMEM_DIMM_VERSION_1
-
-#define GMEM_DIMM_VERSIONED(dimm) ((dimm)->dimm_version)
-
-#define GMEM_DIMM_STAT_PREFIX "DIMM_"
-
-typedef struct gmem_dimm_0 {
- gmem_header_t dimm0_header; /* Nodetype must be GMEM_NT_DIMM */
- uint_t dimm0_version; /* DIMM version */
- gmem_fmri_t dimm0_asru; /* ASRU for this DIMM */
- uint_t dimm0_flags; /* GMEM_MEM_F_* */
- uint_t dimm0_nretired; /* # ret'd pages for CEs in DIMM */
-} gmem_dimm_0_t;
-
-typedef struct gmem_dimm_pers {
- gmem_header_t dimmp_header; /* Nodetype must be GMEM_NT_DIMM */
- uint_t dimmp_version;
- gmem_fmri_t dimmp_asru; /* ASRU for this DIMM */
- uint_t dimmp_flags; /* GMEM_MEM_F_* */
- uint_t dimmp_nretired; /* # ret'd pages for CEs in DIMM */
- uint64_t dimmp_phys_addr_hi; /* retired page addr high */
- uint64_t dimmp_phys_addr_low; /* retired page addr low */
-} gmem_dimm_pers_t;
-
-/*
- * Index block for MQSC rules 4A and 4B correlation of memory CEs
- * on a single DIMM. "Unit Position" refers to bit or nibble depending
- * on the memory ECC. This structure is not persisted.
- */
-
-typedef struct gmem_mq {
- gmem_list_t mq_l; /* pointers to prev and next */
- uint64_t mq_tstamp; /* timestamp of ereport in secs */
- uint16_t mq_ckwd; /* phys addr mod 64 */
- uint64_t mq_phys_addr; /* from ereport */
- uint16_t mq_unit_position; /* bit for sun4u, nibble for sun4v */
- fmd_event_t *mq_ep; /* ereport - for potential fault */
- char *mq_serdnm; /* serd eng to retain CE events */
- uint16_t mq_dupce_count; /* count dup CEs */
- gmem_list_t mq_dupce_tstamp; /* list dup CE time stamp */
-} gmem_mq_t;
-
-typedef struct tstamp {
- gmem_list_t ts_l;
- uint64_t tstamp;
-} tstamp_t;
-
-struct gmem_dimm {
- gmem_dimm_pers_t dimm_pers;
- char *dimm_serial; /* Dimm serial number */
- gmem_case_t dimm_case; /* Open CE case against this DIMM */
- fmd_stat_t dimm_retstat; /* retirement statistics, this DIMM */
- uint16_t dimm_syl_error; /* bad rw symbol-in-error */
- uint32_t dimm_chipid; /* detector */
- gmem_list_t
- mq_root[GMEM_MAX_CKWDS]; /* per-checkword CEs to correlate */
-};
-
-#define GMEM_MQ_TIMELIM (72*60*60) /* 72 hours */
-#define GMEM_MQ_SERDT MAXINT /* Never expected to fire */
-#define GMEM_MQ_SERDN 2 /* Dup CEs not allowed */
-#define GMEM_MQ_512KB 0x80000 /* space between hi-low addr */
-#define GMEM_MQ_RATIO 0.0625 /* bad r/w page ratio (1/16) */
-
-
-#define GMEM_DIMM_MAXSIZE MAX(sizeof (gmem_dimm_0_t), sizeof (gmem_dimm_pers_t))
-#define GMEM_DIMM_MINSIZE MIN(sizeof (gmem_dimm_0_t), sizeof (gmem_dimm_pers_t))
-
-#define dimm_header dimm_pers.dimmp_header
-#define dimm_nodetype dimm_pers.dimmp_header.hdr_nodetype
-#define dimm_bufname dimm_pers.dimmp_header.hdr_bufname
-#define dimm_version dimm_pers.dimmp_version
-#define dimm_asru dimm_pers.dimmp_asru
-#define dimm_asru_nvl dimm_pers.dimmp_asru.fmri_nvl
-#define dimm_flags dimm_pers.dimmp_flags
-#define dimm_nretired dimm_pers.dimmp_nretired
-#define dimm_phys_addr_hi dimm_pers.dimmp_phys_addr_hi
-#define dimm_phys_addr_low dimm_pers.dimmp_phys_addr_low
-
-extern gmem_dimm_t *gmem_dimm_lookup(fmd_hdl_t *, nvlist_t *);
-extern gmem_dimm_t *gmem_dimm_create(fmd_hdl_t *, nvlist_t *, nvlist_t *);
-extern nvlist_t *gmem_dimm_fru(gmem_dimm_t *);
-extern int gmem_dimm_thresh_reached(fmd_hdl_t *, gmem_dimm_t *, uint64_t,
- uint16_t);
-extern nvlist_t *gmem_find_dimm_fru(fmd_hdl_t *, char *);
-extern nvlist_t *gmem_find_dimm_rsc(fmd_hdl_t *, char *);
-extern nvlist_t *gmem_find_dimm_asru(fmd_hdl_t *, char *);
-extern int gmem_dimm_present(fmd_hdl_t *, nvlist_t *asru);
-extern void gmem_dimm_dirty(fmd_hdl_t *, gmem_dimm_t *);
-extern void *gmem_dimm_restore(fmd_hdl_t *, fmd_case_t *, gmem_case_ptr_t *);
-extern void gmem_dimm_destroy(fmd_hdl_t *, gmem_dimm_t *);
-extern void gmem_dimm_validate(fmd_hdl_t *);
-extern void gmem_dimm_gc(fmd_hdl_t *);
-extern void gmem_dimm_fini(fmd_hdl_t *);
-extern int gmem_same_datapath_dimms(fmd_hdl_t *, gmem_dimm_t *, gmem_dimm_t *);
-extern int gmem_check_symbol_error(fmd_hdl_t *, gmem_dimm_t *, uint16_t);
-extern void gmem_save_symbol_error(fmd_hdl_t *, gmem_dimm_t *, uint16_t);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _GMEM_DIMM_H */
diff --git a/usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_fmri.c b/usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_fmri.c
deleted file mode 100644
index d3924da501..0000000000
--- a/usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_fmri.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-
-#include <errno.h>
-#include <strings.h>
-
-#include <gmem_fmri.h>
-#include <gmem.h>
-
-void
-gmem_fmri_init(fmd_hdl_t *hdl, gmem_fmri_t *fmri, nvlist_t *nvl,
- const char *fmt, ...)
-{
- va_list ap;
-
- va_start(ap, fmt);
- gmem_vbufname(fmri->fmri_packnm, sizeof (fmri->fmri_packnm), fmt, ap);
- va_end(ap);
-
- if ((errno = nvlist_dup(nvl, &fmri->fmri_nvl, 0)) != 0 ||
- (errno = nvlist_size(nvl, &fmri->fmri_packsz,
- NV_ENCODE_NATIVE)) != 0)
- fmd_hdl_abort(hdl, "failed to copy fmri for fmri create");
-
- fmri->fmri_packbuf = fmd_hdl_alloc(hdl, fmri->fmri_packsz, FMD_SLEEP);
-
- if ((errno = nvlist_pack(nvl, &fmri->fmri_packbuf, &fmri->fmri_packsz,
- NV_ENCODE_NATIVE, 0)) != 0)
- fmd_hdl_abort(hdl, "failed to pack fmri for fmri create");
-
- gmem_fmri_write(hdl, fmri);
-}
-
-void
-gmem_fmri_fini(fmd_hdl_t *hdl, gmem_fmri_t *fmri, int destroy)
-{
- if (destroy)
- fmd_buf_destroy(hdl, NULL, fmri->fmri_packnm);
-
- fmd_hdl_free(hdl, fmri->fmri_packbuf, fmri->fmri_packsz);
- nvlist_free(fmri->fmri_nvl);
-}
-
-void
-gmem_fmri_restore(fmd_hdl_t *hdl, gmem_fmri_t *fmri)
-{
- if (fmd_buf_size(hdl, NULL, fmri->fmri_packnm) == 0) {
- bzero(fmri, sizeof (gmem_fmri_t));
- return;
- }
-
- if ((fmri->fmri_packbuf = gmem_buf_read(hdl, NULL, fmri->fmri_packnm,
- fmri->fmri_packsz)) == NULL) {
- fmd_hdl_abort(hdl, "failed to read fmri buffer %s",
- fmri->fmri_packnm);
- }
-
- if (nvlist_unpack(fmri->fmri_packbuf, fmri->fmri_packsz,
- &fmri->fmri_nvl, 0) != 0) {
- fmd_hdl_abort(hdl, "failed to unpack fmri buffer %s\n",
- fmri->fmri_packnm);
- }
-}
-
-void
-gmem_fmri_write(fmd_hdl_t *hdl, gmem_fmri_t *fmri)
-{
- size_t sz;
-
- if ((sz = fmd_buf_size(hdl, NULL, fmri->fmri_packnm)) !=
- fmri->fmri_packsz && sz != 0)
- fmd_buf_destroy(hdl, NULL, fmri->fmri_packnm);
-
- fmd_buf_write(hdl, NULL, fmri->fmri_packnm, fmri->fmri_packbuf,
- fmri->fmri_packsz);
-}
diff --git a/usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_fmri.h b/usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_fmri.h
deleted file mode 100644
index 6135759b10..0000000000
--- a/usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_fmri.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _GMEM_FMRI_H
-#define _GMEM_FMRI_H
-
-/*
- * Each general-purpose state structure is named by an FMRI - the FMRI of the
- * piece of hardware being described. FMRIs are nvlists, and thus require
- * special handling if they are to be persisted along with the general-purpose
- * buffer. The gmem_fmri_t manages the FMRI, both in packed (persistable) and
- * unpacked formats. The packed FMRI is stored in a separate buffer (named by
- * the fmri_packnm member), from which it can be unpacked on restore.
- *
- * Data structures:
- *
- * ,--------.
- * |G.P. |
- * |buffer |
- * |,-------| ,-------------.
- * ||fmri_t | ----> |packed nvlist|
- * |`-------| `-------------'
- * `--------'
- *
- * The buffer for the general purpose buffer is named and stored independently.
- * This subsystem creates and manages the packed nvlist buffer, using a name
- * provided by the caller.
- */
-
-#include <libnvpair.h>
-#include <fm/fmd_api.h>
-#include <sys/types.h>
-
-#include <gmem_state.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct gmem_fmri {
- nvlist_t *fmri_nvl; /* The unpacked FMRI FMRI */
- char *fmri_packbuf; /* In-core packed nvlist buffer */
- size_t fmri_packsz; /* Size of packed nvlist buffer */
- char fmri_packnm[GMEM_BUFNMLEN]; /* Persistent buffer name for FMRI */
-} gmem_fmri_t;
-
-extern void gmem_fmri_init(fmd_hdl_t *, gmem_fmri_t *, nvlist_t *,
- const char *, ...);
-extern void gmem_fmri_fini(fmd_hdl_t *, gmem_fmri_t *, int);
-
-extern void gmem_fmri_restore(fmd_hdl_t *, gmem_fmri_t *);
-extern void gmem_fmri_write(fmd_hdl_t *, gmem_fmri_t *);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _GMEM_FMRI_H */
diff --git a/usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_main.c b/usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_main.c
deleted file mode 100644
index 8886dde21e..0000000000
--- a/usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_main.c
+++ /dev/null
@@ -1,214 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
- */
-
-#include <gmem_state.h>
-#include <gmem_mem.h>
-#include <gmem_page.h>
-#include <gmem_dimm.h>
-#include <gmem.h>
-
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-#include <strings.h>
-#include <fm/fmd_api.h>
-#include <fm/libtopo.h>
-#include <sys/fm/protocol.h>
-#include <sys/async.h>
-
-gmem_t gmem;
-
-typedef struct gmem_subscriber {
- const char *subr_class;
- gmem_evdisp_t (*subr_func)(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *);
- gmem_evdisp_stat_t subr_stat;
-} gmem_subscriber_t;
-
-static gmem_subscriber_t gmem_subscribers[] = {
- { "ereport.cpu.generic-sparc.mem-is", gmem_ce },
- { "ereport.cpu.generic-sparc.mem-unk", gmem_ce },
- { "ereport.cpu.generic-sparc.mem-cs", gmem_ce },
- { "ereport.cpu.generic-sparc.mem-ss", gmem_ce },
- { NULL, NULL }
-};
-
-static void
-gmem_recv(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl, const char *class)
-{
- gmem_subscriber_t *sp;
- int disp;
-
- fmd_hdl_debug(hdl, "gmem_recv: begin: %s\n", strrchr(class, '.') + 1);
-
- for (sp = gmem_subscribers; sp->subr_class != NULL; sp++) {
- if (fmd_nvl_class_match(hdl, nvl, sp->subr_class)) {
- disp = sp->subr_func(hdl, ep, nvl, class);
- ((fmd_stat_t *)&sp->subr_stat)[disp].fmds_value.ui64++;
- fmd_hdl_debug(hdl, "gmem_recv: done: %s (disp %d)\n",
- strrchr(class, '.') + 1, disp);
- return;
- }
- }
-
- fmd_hdl_debug(hdl, "gmem_recv: dropping %s - unable to handle\n",
- class);
-}
-
-static void
-gmem_close(fmd_hdl_t *hdl, fmd_case_t *cp)
-{
- gmem_case_closer_t *cl = fmd_case_getspecific(hdl, cp);
- const char *uuid = fmd_case_uuid(hdl, cp);
-
- /*
- * Our active cases all have closers registered in case-specific data.
- * Cases in the process of closing (for which we've freed all associated
- * data, but which haven't had an fmd-initiated fmdo_close callback)
- * have had their case-specific data nulled out.
- */
- fmd_hdl_debug(hdl, "close case %s%s\n", uuid,
- (cl == NULL ? " (no cl)" : ""));
-
- if (cl != NULL)
- cl->cl_func(hdl, cl->cl_arg);
-}
-
-static void
-gmem_gc(fmd_hdl_t *hdl)
-{
- gmem_mem_gc(hdl);
-}
-
-static gmem_stat_t gm_stats = {
- { "bad_mem_resource", FMD_TYPE_UINT64,
- "memory resource missing or malformed" },
- { "bad_close", FMD_TYPE_UINT64, "case close for nonexistent case" },
- { "old_erpt", FMD_TYPE_UINT64, "ereport out of date wrt hardware" },
- { "dimm_creat", FMD_TYPE_UINT64, "created new mem module structure" },
- { "page_creat", FMD_TYPE_UINT64, "created new page structure" },
- { "ce_unknown", FMD_TYPE_UINT64, "unknown CEs" },
- { "ce_interm", FMD_TYPE_UINT64, "intermittent CEs" },
- { "ce_clearable_persis", FMD_TYPE_UINT64, "clearable persistent CEs" },
- { "ce_sticky", FMD_TYPE_UINT64, "sticky CEs" },
- { "dimm_migrat", FMD_TYPE_UINT64, "DIMMs migrated to new version" }
-};
-
-static const fmd_prop_t fmd_props[] = {
- { "ce_n", FMD_TYPE_UINT32, "3" },
- { "ce_t", FMD_TYPE_TIME, "72h" },
- { "filter_ratio", FMD_TYPE_UINT32, "0" },
- { "max_retired_pages", FMD_TYPE_UINT32, "512" },
- { "low_ce_thresh", FMD_TYPE_UINT32, "128"},
- { "nupos", FMD_TYPE_UINT32, "4"},
- { "dupce", FMD_TYPE_UINT32, "120"},
- { NULL, 0, NULL }
-};
-
-static const fmd_hdl_ops_t fmd_ops = {
- gmem_recv, /* fmdo_recv */
- NULL,
- gmem_close, /* fmdo_close */
- NULL, /* fmdo_stats */
- gmem_gc /* fmdo_gc */
-};
-
-static const fmd_hdl_info_t fmd_info = {
- "SPARC-Generic-Memory Diagnosis", GMEM_VERSION, &fmd_ops, fmd_props
-};
-
-static const struct gmem_evdisp_name {
- const char *evn_name;
- const char *evn_desc;
-} gmem_evdisp_names[] = {
- { "%s", "ok %s ereports" }, /* GMEM_EVD_OK */
- { "bad_%s", "bad %s ereports" }, /* GMEM_EVD_BAD */
- { "unused_%s", "unused %s ereports" }, /* GMEM_EVD_UNUSED */
- { "redun_%s", "redundant %s ereports" }, /* GMEM_EVD_REDUN */
-};
-
-void
-_fmd_fini(fmd_hdl_t *hdl)
-{
- gmem_mem_fini(hdl);
- gmem_page_fini(hdl);
-}
-
-void
-_fmd_init(fmd_hdl_t *hdl)
-{
- gmem_subscriber_t *sp;
-
- if (fmd_hdl_register(hdl, FMD_API_VERSION, &fmd_info) != 0)
- return; /* error in configuration file or fmd_info */
-
- for (sp = gmem_subscribers; sp->subr_class != NULL; sp++)
- fmd_hdl_subscribe(hdl, sp->subr_class);
-
- bzero(&gmem, sizeof (gmem_t));
-
- gmem.gm_stats = (gmem_stat_t *)fmd_stat_create(hdl, FMD_STAT_NOALLOC,
- sizeof (gm_stats) / sizeof (fmd_stat_t),
- (fmd_stat_t *)&gm_stats);
-
- for (sp = gmem_subscribers; sp->subr_class != NULL; sp++) {
- const char *type = strrchr(sp->subr_class, '.') + 1;
- int i;
-
- for (i = 0; i < sizeof (gmem_evdisp_names) /
- sizeof (struct gmem_evdisp_name); i++) {
- fmd_stat_t *stat = ((fmd_stat_t *)&sp->subr_stat) + i;
-
- (void) snprintf(stat->fmds_name,
- sizeof (stat->fmds_name),
- gmem_evdisp_names[i].evn_name, type);
-
- stat->fmds_type = FMD_TYPE_UINT64;
- (void) snprintf(stat->fmds_desc,
- sizeof (stat->fmds_desc),
- gmem_evdisp_names[i].evn_desc, type);
-
- (void) fmd_stat_create(hdl, FMD_STAT_NOALLOC, 1, stat);
- }
- }
-
- gmem.gm_pagesize = sysconf(_SC_PAGESIZE);
- gmem.gm_pagemask = ~((uint64_t)gmem.gm_pagesize - 1);
-
- gmem.gm_max_retired_pages = fmd_prop_get_int32(hdl,
- "max_retired_pages");
-
- gmem.gm_ce_n = fmd_prop_get_int32(hdl, "ce_n");
- gmem.gm_ce_t = fmd_prop_get_int64(hdl, "ce_t");
- gmem.gm_filter_ratio = fmd_prop_get_int32(hdl, "filter_ratio");
- gmem.gm_low_ce_thresh = fmd_prop_get_int32(hdl, "low_ce_thresh");
- gmem.gm_nupos = fmd_prop_get_int32(hdl, "nupos");
- gmem.gm_dupce = fmd_prop_get_int32(hdl, "dupce");
-
-
- if (gmem_state_restore(hdl) < 0) {
- _fmd_fini(hdl);
- fmd_hdl_abort(hdl, "failed to restore saved state\n");
- }
-}
diff --git a/usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_mem.c b/usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_mem.c
deleted file mode 100644
index d9760737ea..0000000000
--- a/usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_mem.c
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * Support routines for managing state related to memory modules.
- */
-
-#include <gmem_mem.h>
-#include <gmem_dimm.h>
-#include <gmem.h>
-
-#include <assert.h>
-#include <errno.h>
-#include <strings.h>
-#include <ctype.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <fm/fmd_api.h>
-#include <sys/fm/protocol.h>
-#include <sys/mem.h>
-#include <sys/nvpair.h>
-
-char *
-gmem_mem_serdnm_create(fmd_hdl_t *hdl, const char *serdbase, const char *serial)
-{
- const char *fmt = "%s_%s_serd";
- size_t sz = snprintf(NULL, 0, fmt, serdbase, serial) + 1;
- char *nm = fmd_hdl_alloc(hdl, sz, FMD_SLEEP);
- (void) snprintf(nm, sz, fmt, serdbase, serial);
-
- return (nm);
-}
-
-char *
-gmem_page_serdnm_create(fmd_hdl_t *hdl, const char *serdbase,
- uint64_t phys_addr)
-{
- const char *fmt = "%s_%llXserd";
- size_t sz = snprintf(NULL, 0, fmt, serdbase, phys_addr) + 1;
- char *nm = fmd_hdl_alloc(hdl, sz, FMD_SLEEP);
- (void) snprintf(nm, sz, fmt, serdbase, phys_addr);
-
- return (nm);
-}
-
-char *
-gmem_mq_serdnm_create(fmd_hdl_t *hdl, const char *serdbase,
- uint64_t phys_addr, uint16_t cw, uint16_t pos)
-{
- const char *fmt = "%s_%llX_%x_%x_serd";
- size_t sz = snprintf(NULL, 0, fmt, serdbase, phys_addr, cw, pos) + 1;
- char *nm = fmd_hdl_alloc(hdl, sz, FMD_SLEEP);
- (void) snprintf(nm, sz, fmt, serdbase, phys_addr, cw, pos);
-
- return (nm);
-}
-
-uint32_t
-gmem_get_serd_filter_ratio(nvlist_t *nvl)
-{
- uint32_t filter_ratio = 0;
- uint32_t erpt_ratio;
-
- if (gmem.gm_filter_ratio == 0) {
- if (nvlist_lookup_uint32(nvl,
- GMEM_ERPT_PAYLOAD_FILTER_RATIO, &erpt_ratio) == 0)
- filter_ratio = erpt_ratio;
- } else
- filter_ratio = gmem.gm_filter_ratio;
-
- return (filter_ratio);
-}
-
-void
-gmem_page_serd_create(fmd_hdl_t *hdl, gmem_page_t *page, nvlist_t *nvl)
-{
- uint32_t erpt_serdn, serd_n;
- uint64_t erpt_serdt, serd_t;
-
- serd_n = gmem.gm_ce_n;
- serd_t = gmem.gm_ce_t;
-
- if (serd_n == DEFAULT_SERDN && serd_t == DEFAULT_SERDT) {
- if (nvlist_lookup_uint32(nvl, GMEM_ERPT_PAYLOAD_SERDN,
- &erpt_serdn) == 0)
- serd_n = erpt_serdn;
- if (nvlist_lookup_uint64(nvl, GMEM_ERPT_PAYLOAD_SERDT,
- &erpt_serdt) == 0)
- serd_t = erpt_serdt;
- }
-
- page->page_case.cc_serdnm = gmem_page_serdnm_create(hdl, "page",
- page->page_physbase);
-
- fmd_serd_create(hdl, page->page_case.cc_serdnm, serd_n, serd_t);
-}
-
-int
-gmem_serd_record(fmd_hdl_t *hdl, const char *serdbaser, uint32_t ratio,
- fmd_event_t *ep)
-{
- int i, rc;
- if (ratio == 0)
- return (fmd_serd_record(hdl, serdbaser, ep));
- for (i = 0; i < ratio; i++) {
- rc = fmd_serd_record(hdl, serdbaser, ep);
- if (rc != FMD_B_FALSE)
- break;
- }
- return (rc);
-}
-
-void
-gmem_mem_case_restore(fmd_hdl_t *hdl, gmem_case_t *cc, fmd_case_t *cp,
- const char *serdbase, const char *serial)
-{
- gmem_case_restore(hdl, cc, cp, gmem_mem_serdnm_create(hdl, serdbase,
- serial));
-}
-
-void
-gmem_mem_retirestat_create(fmd_hdl_t *hdl, fmd_stat_t *st, const char *serial,
- uint64_t value, const char *prefix)
-{
-
- (void) snprintf(st->fmds_name, sizeof (st->fmds_name), "%s%s",
- prefix, serial);
- (void) snprintf(st->fmds_desc, sizeof (st->fmds_desc),
- "retirements for %s%s", prefix, serial);
- st->fmds_type = FMD_TYPE_UINT64;
- st->fmds_value.ui64 = value;
-
- (void) fmd_stat_create(hdl, FMD_STAT_NOALLOC, 1, st);
-}
-
-void
-gmem_mem_gc(fmd_hdl_t *hdl)
-{
- gmem_dimm_gc(hdl);
-}
-
-void
-gmem_mem_fini(fmd_hdl_t *hdl)
-{
- gmem_dimm_fini(hdl);
-}
diff --git a/usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_mem.h b/usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_mem.h
deleted file mode 100644
index 3510531d55..0000000000
--- a/usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_mem.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
- */
-
-#ifndef _GMEM_MEM_H
-#define _GMEM_MEM_H
-
-/*
- * Support routines for managing state related to memory modules.
- * Correctable errors generally cause changes to the DIMM-related state.
- */
-
-#include <gmem.h>
-#include <gmem_page.h>
-#include <gmem_state.h>
-#include <gmem_fmri.h>
-#include <sys/errclassify.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define GMEM_ERPT_PAYLOAD_DIAGNOSE "diagnose"
-#define GMEM_ERPT_PAYLOAD_RESOURCE "resource"
-#define GMEM_ERPT_PAYLOAD_DETECTOR "detector"
-#define GMEM_ERPT_PAYLOAD_PHYSADDR "phys-addr"
-#define GMEM_ERPT_PAYLOAD_OFFSET "offset"
-#define GMEM_ERPT_PAYLOAD_SERDN "serd_n"
-#define GMEM_ERPT_PAYLOAD_SERDT "serd_t"
-#define GMEM_ERPT_PAYLOAD_SYMBOLPOS "symbol-pos"
-#define GMEM_ERPT_PAYLOAD_DRAM "dram"
-#define GMEM_ERPT_PAYLOAD_FILTER_RATIO "filter_ratio"
-#define GMEM_ERPT_PAYLOAD_CKW "relative-ckword"
-
-#define GMEM_F_FAULTING 0x1
-#define GMEM_FAULT_DIMM_PAGES "fault.memory.dimm-page-retires-excessive"
-#define GMEM_FAULT_DIMM_4A "fault.memory.dimm-ue-imminent"
-#define GMEM_FAULT_DIMM_4B "fault.memory.dram-ue-imminent"
-#define GMEM_FAULT_PAGE "fault.memory.page"
-#define INVALID_DRAM -1
-
-#define DEFAULT_SERDN 0x2
-#define DEFAULT_SERDT 0xebbdb3ed0000ULL
-
-typedef struct gmem_dimm gmem_dimm_t;
-
-/*
- * Correctable memory errors
- * "unknown symbol" (mem-us) and "intermittent symbol" (mem-is) CEs are
- * not used in diagnosis, except for rules 4A & 4B checking.
- *
- * "clearable symbol" (mem-cs) CEs are added to the SERD engines. When the
- * engine the page corresponding to the CE that caused the engine to
- * fire is retired
- *
- * "sticky symbol" (mem-ss) CEs trigger immediate page retirement.
- *
- */
-
-extern gmem_evdisp_t gmem_ce(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *);
-extern void gmem_dimm_close(fmd_hdl_t *, void *);
-
-extern void gmem_mem_case_restore(fmd_hdl_t *, gmem_case_t *, fmd_case_t *,
- const char *, const char *);
-extern char *gmem_mem_serdnm_create(fmd_hdl_t *, const char *, const char *);
-extern char *gmem_page_serdnm_create(fmd_hdl_t *, const char *, uint64_t);
-extern char *gmem_mq_serdnm_create(fmd_hdl_t *, const char *, uint64_t,
- uint16_t, uint16_t);
-extern void gmem_page_serd_create(fmd_hdl_t *, gmem_page_t *, nvlist_t *);
-extern uint32_t gmem_get_serd_filter_ratio(nvlist_t *);
-extern int gmem_serd_record(fmd_hdl_t *, const char *, uint32_t, fmd_event_t *);
-extern void gmem_mem_retirestat_create(fmd_hdl_t *, fmd_stat_t *, const char *,
- uint64_t, const char *);
-
-extern void gmem_mem_gc(fmd_hdl_t *);
-extern void gmem_mem_fini(fmd_hdl_t *);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _GMEM_MEM_H */
diff --git a/usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_memerr.c b/usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_memerr.c
deleted file mode 100644
index 63edd68945..0000000000
--- a/usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_memerr.c
+++ /dev/null
@@ -1,912 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
- */
-
-
-/*
- * Ereport-handling routines for memory errors
- */
-
-#include <gmem_mem.h>
-#include <gmem_dimm.h>
-#include <gmem_page.h>
-#include <gmem.h>
-
-#include <strings.h>
-#include <string.h>
-#include <errno.h>
-#include <assert.h>
-#include <fm/fmd_api.h>
-#include <fm/libtopo.h>
-#include <sys/fm/protocol.h>
-#include <sys/async.h>
-#include <sys/errclassify.h>
-
-#define OFFBIT 0xFFFFFFFFFFFC07FFULL
-#define BIT28_32 0x00000001F0000000ULL
-#define BIT13_17 0x000000000003E000ULL
-#define BIT18_19 0x00000000000C0000ULL
-#define BIT11_12 0x0000000000001800ULL
-
-struct ce_name2type {
- const char *name;
- ce_dispact_t type;
-};
-
-nvlist_t *fru_nvl;
-
-static ce_dispact_t
-gmem_mem_name2type(const char *name)
-{
- static const struct ce_name2type new[] = {
- { "mem-unk", CE_DISP_UNKNOWN },
- { "mem-is", CE_DISP_INTERMITTENT },
- { "mem-cs", CE_DISP_PERS },
- { "mem-ss", CE_DISP_STICKY },
- { NULL }
- };
- const struct ce_name2type *names = &new[0];
- const struct ce_name2type *tp;
-
- for (tp = names; tp->name != NULL; tp++) {
- if (strcasecmp(name, tp->name) == 0)
- return (tp->type);
- }
-
- return (CE_DISP_UNKNOWN);
-}
-
-/*ARGSUSED*/
-static int
-find_fault_fru(topo_hdl_t *thp, tnode_t *node, void *arg)
-{
- nvlist_t *nvl = (nvlist_t *)arg;
- nvlist_t *rsc = NULL, *fru = NULL;
- nvlist_t **hcl, **topo_hcl;
- uint_t n1, n2;
- char *name, *name1, *name2;
- char *id1, *id2;
- int err, i;
-
- if (topo_node_resource(node, &rsc, &err) < 0)
- return (TOPO_WALK_NEXT);
-
- err = nvlist_lookup_nvlist_array(rsc, FM_FMRI_HC_LIST, &topo_hcl, &n1);
-
- if (err != 0) {
- nvlist_free(rsc);
- return (TOPO_WALK_NEXT);
- }
-
- (void) nvlist_lookup_string(topo_hcl[n1 - 1], FM_FMRI_HC_NAME, &name);
- if (strcmp(name, "chip") != 0) {
- nvlist_free(rsc);
- return (TOPO_WALK_NEXT);
- }
-
- (void) nvlist_lookup_nvlist_array(nvl, FM_FMRI_HC_LIST, &hcl, &n2);
-
- if (n1 != n2) {
- nvlist_free(rsc);
- return (TOPO_WALK_NEXT);
- }
-
- for (i = 0; i < n1; i++) {
- (void) nvlist_lookup_string(topo_hcl[i], FM_FMRI_HC_NAME,
- &name1);
- (void) nvlist_lookup_string(topo_hcl[i], FM_FMRI_HC_ID, &id1);
- (void) nvlist_lookup_string(hcl[i], FM_FMRI_HC_NAME, &name2);
- (void) nvlist_lookup_string(hcl[i], FM_FMRI_HC_ID, &id2);
- if (strcmp(name1, name2) != 0 || strcmp(id1, id2) != 0) {
- nvlist_free(rsc);
- return (TOPO_WALK_NEXT);
- }
- }
-
- (void) topo_node_fru(node, &fru, NULL, &err);
- if (fru != NULL) {
- (void) nvlist_dup(fru, &fru_nvl, NV_UNIQUE_NAME);
- nvlist_free(fru);
- }
- nvlist_free(rsc);
- return (TOPO_WALK_TERMINATE);
-}
-
-nvlist_t *
-gmem_find_fault_fru(fmd_hdl_t *hdl, nvlist_t *nvl) {
- topo_hdl_t *thp;
- topo_walk_t *twp;
- int err;
- fru_nvl = NULL;
-
- if ((thp = fmd_hdl_topo_hold(hdl, TOPO_VERSION)) == NULL)
- return (NULL);
-
- if ((twp = topo_walk_init(thp, FM_FMRI_SCHEME_HC,
- find_fault_fru, nvl, &err)) == NULL) {
- fmd_hdl_topo_rele(hdl, thp);
- return (NULL);
- }
-
- (void) topo_walk_step(twp, TOPO_WALK_CHILD);
- topo_walk_fini(twp);
- fmd_hdl_topo_rele(hdl, thp);
- return (fru_nvl);
-}
-
-/*
- * fault the FRU of the common detector between two DIMMs
- */
-void
-gmem_gen_datapath_fault(fmd_hdl_t *hdl, nvlist_t *det)
-{
- char *name, *id;
- nvlist_t **hcl1, **hcl;
- uint_t n;
- int i, j;
- fmd_case_t *cp;
- nvlist_t *fltlist, *rsrc;
- nvlist_t *fru = NULL;
-
- if (nvlist_lookup_nvlist_array(det, FM_FMRI_HC_LIST, &hcl1, &n) < 0)
- return;
-
- for (i = 0; i < n; i++) {
- (void) nvlist_lookup_string(hcl1[i], FM_FMRI_HC_NAME, &name);
- if (strcmp(name, "chip") == 0)
- break;
- }
-
- n = i + 1;
- hcl = fmd_hdl_zalloc(hdl, sizeof (nvlist_t *) * n, FMD_SLEEP);
- if (hcl == NULL)
- return;
-
- for (i = 0; i < n; i++) {
- (void) nvlist_alloc(&hcl[i],
- NV_UNIQUE_NAME|NV_UNIQUE_NAME_TYPE, 0);
- }
-
- for (i = 0, j = 0; i < n; i++) {
- (void) nvlist_lookup_string(hcl1[i], FM_FMRI_HC_NAME, &name);
- (void) nvlist_lookup_string(hcl1[i], FM_FMRI_HC_ID, &id);
- (void) nvlist_add_string(hcl[j], FM_FMRI_HC_NAME, name);
- (void) nvlist_add_string(hcl[j], FM_FMRI_HC_ID, id);
- j++;
- if (strcmp(name, "chip") == 0)
- break;
- }
-
- if (nvlist_alloc(&rsrc, NV_UNIQUE_NAME|NV_UNIQUE_NAME_TYPE, 0) != 0) {
- for (i = 0; i < n; i++) {
- nvlist_free(hcl[i]);
- }
- fmd_hdl_free(hdl, hcl, sizeof (nvlist_t *) * n);
- }
-
- if (nvlist_add_uint8(rsrc, FM_VERSION, FM_HC_SCHEME_VERSION) != 0 ||
- nvlist_add_string(rsrc, FM_FMRI_SCHEME, FM_FMRI_SCHEME_HC) != 0 ||
- nvlist_add_string(rsrc, FM_FMRI_HC_ROOT, "") != 0 ||
- nvlist_add_uint32(rsrc, FM_FMRI_HC_LIST_SZ, n) != 0 ||
- nvlist_add_nvlist_array(rsrc, FM_FMRI_HC_LIST, hcl, n) != 0) {
- for (i = 0; i < n; i++) {
- nvlist_free(hcl[i]);
- }
- fmd_hdl_free(hdl, hcl, sizeof (nvlist_t *) * n);
- nvlist_free(rsrc);
- }
-
- fru = gmem_find_fault_fru(hdl, rsrc);
- if (fru != NULL) {
- cp = fmd_case_open(hdl, NULL);
- fltlist = fmd_nvl_create_fault(hdl, "fault.memory.datapath",
- 100, fru, fru, fru);
- fmd_case_add_suspect(hdl, cp, fltlist);
- fmd_case_solve(hdl, cp);
- nvlist_free(fru);
- }
-
- for (i = 0; i < n; i++) {
- nvlist_free(hcl[i]);
- }
-
- fmd_hdl_free(hdl, hcl, sizeof (nvlist_t *) * n);
- nvlist_free(rsrc);
-}
-
-/*
- * formula to conver an unhashed address to hashed address
- * PA[17:11] = (PA[32:28] xor PA[17:13]) :: ((PA[19:18] xor PA[12:11])
- */
-static void
-gmem_to_hashed_addr(uint64_t *addr, uint64_t afar)
-{
-
- *addr = (afar & OFFBIT) | ((afar & BIT28_32) >> 15) ^ (afar & BIT13_17)
- | ((afar & BIT18_19) >> 7) ^ (afar & BIT11_12);
-}
-
-/*
- * check if a dimm has n CEs that have the same symbol-in-error
- */
-int
-upos_thresh_check(gmem_dimm_t *dimm, uint16_t upos, uint32_t threshold)
-{
- int i;
- gmem_mq_t *ip, *next;
- int count = 0;
-
- for (i = 0; i < GMEM_MAX_CKWDS; i++) {
- for (ip = gmem_list_next(&dimm->mq_root[i]); ip != NULL;
- ip = next) {
- next = gmem_list_next(ip);
- if (ip->mq_unit_position == upos) {
- count++;
- if (count >= threshold)
- return (1);
- }
- }
- }
- return (0);
-}
-
-/*
- * check if smaller number of retired pages > 1/16 of larger number of
- * retired pages
- */
-int
-check_bad_rw_retired_pages(fmd_hdl_t *hdl, gmem_dimm_t *d1, gmem_dimm_t *d2)
-{
- uint_t sret, lret;
- double ratio;
-
- sret = lret = 0;
-
- if (d2->dimm_nretired < d1->dimm_nretired) {
- sret = d2->dimm_nretired;
- lret = d1->dimm_nretired;
- } else if (d2->dimm_nretired > d1->dimm_nretired) {
- sret = d1->dimm_nretired;
- lret = d2->dimm_nretired;
- } else
- return (0);
-
- ratio = lret * GMEM_MQ_RATIO;
-
- if (sret > ratio) {
- fmd_hdl_debug(hdl, "sret=%d lret=%d ratio=%.3f",
- sret, lret, ratio);
- return (1);
- }
- return (0);
-}
-
-/*
- * check bad rw on any two DIMMs. The check succeeds if
- * - each DIMM has a n CEs which have the same symbol-in-error,
- * - the smaller number of retired pages > 1/16 larger number of retired pages
- */
-static int
-check_bad_rw_between_dimms(fmd_hdl_t *hdl, gmem_dimm_t *d1, gmem_dimm_t *d2,
- uint16_t *rupos)
-{
- int i;
- gmem_mq_t *ip, *next;
- uint16_t upos;
-
- for (i = 0; i < GMEM_MAX_CKWDS; i++) {
- for (ip = gmem_list_next(&d1->mq_root[i]); ip != NULL;
- ip = next) {
- next = gmem_list_next(ip);
- upos = ip->mq_unit_position;
- if (upos_thresh_check(d1, upos, gmem.gm_nupos)) {
- if (upos_thresh_check(d2, upos,
- gmem.gm_nupos)) {
- if (check_bad_rw_retired_pages(hdl,
- d1, d2)) {
- *rupos = upos;
- return (1);
- }
- }
- }
- }
- }
-
- return (0);
-}
-
-static void
-bad_reader_writer_check(fmd_hdl_t *hdl, nvlist_t *det, gmem_dimm_t *ce_dimm)
-{
- gmem_dimm_t *d, *next;
- uint16_t upos;
-
- for (d = gmem_list_next(&gmem.gm_dimms); d != NULL; d = next) {
- next = gmem_list_next(d);
- if (d == ce_dimm)
- continue;
- if (!gmem_same_datapath_dimms(hdl, ce_dimm, d))
- continue;
- if (check_bad_rw_between_dimms(hdl, ce_dimm, d, &upos)) {
- gmem_gen_datapath_fault(hdl, det);
- gmem_save_symbol_error(hdl, ce_dimm, upos);
- fmd_hdl_debug(hdl,
- "check_bad_rw_dimms succeeded: %s %s\n",
- ce_dimm->dimm_serial, d->dimm_serial);
- return;
- }
- }
-}
-
-/*
- * rule 5a checking. The check succeeds if
- * - nretired >= 512
- * - nretired >= 128 and (addr_hi - addr_low) / (nretired -1 ) > 512KB
- */
-static void
-ce_thresh_check(fmd_hdl_t *hdl, gmem_dimm_t *dimm)
-{
- nvlist_t *flt, *rsrc;
- fmd_case_t *cp;
- uint_t nret;
- uint64_t delta_addr = 0;
-
- if (dimm->dimm_flags & GMEM_F_FAULTING)
- return;
-
- nret = dimm->dimm_nretired;
-
- if (nret < gmem.gm_low_ce_thresh)
- return;
-
- if (dimm->dimm_phys_addr_hi >= dimm->dimm_phys_addr_low)
- delta_addr =
- (dimm->dimm_phys_addr_hi - dimm->dimm_phys_addr_low) /
- (nret - 1);
-
- if (nret >= gmem.gm_max_retired_pages || delta_addr > GMEM_MQ_512KB) {
-
- fmd_hdl_debug(hdl, "ce_thresh_check succeeded nret=%d", nret);
- dimm->dimm_flags |= GMEM_F_FAULTING;
- gmem_dimm_dirty(hdl, dimm);
-
- cp = fmd_case_open(hdl, NULL);
- rsrc = gmem_find_dimm_rsc(hdl, dimm->dimm_serial);
- flt = fmd_nvl_create_fault(hdl, GMEM_FAULT_DIMM_PAGES,
- GMEM_FLTMAXCONF, NULL, gmem_dimm_fru(dimm), rsrc);
- fmd_case_add_suspect(hdl, cp, flt);
- fmd_case_solve(hdl, cp);
- nvlist_free(rsrc);
- }
-}
-
-/*
- * rule 5b checking. The check succeeds if more than 120
- * non-intermittent CEs are reported against one symbol
- * position of one afar in 72 hours
- */
-static void
-mq_5b_check(fmd_hdl_t *hdl, gmem_dimm_t *dimm)
-{
- nvlist_t *flt, *rsrc;
- fmd_case_t *cp;
- gmem_mq_t *ip, *next;
- int cw;
-
- for (cw = 0; cw < GMEM_MAX_CKWDS; cw++) {
- for (ip = gmem_list_next(&dimm->mq_root[cw]);
- ip != NULL; ip = next) {
- next = gmem_list_next(ip);
- if (ip->mq_dupce_count >= gmem.gm_dupce) {
- fmd_hdl_debug(hdl,
- "mq_5b_check succeeded: duplicate CE=%d",
- ip->mq_dupce_count);
- cp = fmd_case_open(hdl, NULL);
- rsrc = gmem_find_dimm_rsc(hdl,
- dimm->dimm_serial);
- flt = fmd_nvl_create_fault(hdl,
- GMEM_FAULT_DIMM_PAGES, GMEM_FLTMAXCONF,
- NULL, gmem_dimm_fru(dimm), rsrc);
- dimm->dimm_flags |= GMEM_F_FAULTING;
- gmem_dimm_dirty(hdl, dimm);
- fmd_case_add_suspect(hdl, cp, flt);
- fmd_case_solve(hdl, cp);
- nvlist_free(rsrc);
- return;
- }
- }
- }
-}
-
-/*
- * delete the expired duplicate CE time stamps
- */
-static void
-mq_prune_dup(fmd_hdl_t *hdl, gmem_mq_t *ip, uint64_t now)
-{
- tstamp_t *tsp, *next;
-
- for (tsp = gmem_list_next(&ip->mq_dupce_tstamp); tsp != NULL;
- tsp = next) {
- next = gmem_list_next(tsp);
- if (tsp->tstamp < now - GMEM_MQ_TIMELIM) {
- gmem_list_delete(&ip->mq_dupce_tstamp, &tsp->ts_l);
- fmd_hdl_free(hdl, tsp, sizeof (tstamp_t));
- ip->mq_dupce_count--;
- }
- }
-}
-
-static void
-mq_update(fmd_hdl_t *hdl, fmd_event_t *ep, gmem_mq_t *ip, uint64_t now)
-{
- tstamp_t *tsp;
-
- ip->mq_tstamp = now;
- ip->mq_ep = ep;
- if (fmd_serd_exists(hdl, ip->mq_serdnm))
- fmd_serd_destroy(hdl, ip->mq_serdnm);
-
- fmd_serd_create(hdl, ip->mq_serdnm, GMEM_MQ_SERDN, GMEM_MQ_SERDT);
- (void) fmd_serd_record(hdl, ip->mq_serdnm, ep);
-
- tsp = fmd_hdl_zalloc(hdl, sizeof (tstamp_t), FMD_SLEEP);
- tsp->tstamp = now;
- gmem_list_append(&ip->mq_dupce_tstamp, tsp);
- ip->mq_dupce_count++;
-}
-
-/*
- * Create a fresh index block for MQSC CE correlation.
- */
-gmem_mq_t *
-mq_create(fmd_hdl_t *hdl, fmd_event_t *ep,
- uint64_t afar, uint16_t upos, uint16_t ckwd, uint64_t now)
-{
- gmem_mq_t *cp;
- tstamp_t *tsp;
-
- cp = fmd_hdl_zalloc(hdl, sizeof (gmem_mq_t), FMD_SLEEP);
- cp->mq_tstamp = now;
- cp->mq_ckwd = ckwd;
- cp->mq_phys_addr = afar;
- cp->mq_unit_position = upos;
- cp->mq_ep = ep;
- cp->mq_serdnm =
- gmem_mq_serdnm_create(hdl, "mq", afar, ckwd, upos);
-
- tsp = fmd_hdl_zalloc(hdl, sizeof (tstamp_t), FMD_SLEEP);
- tsp->tstamp = now;
- gmem_list_append(&cp->mq_dupce_tstamp, tsp);
- cp->mq_dupce_count = 1;
-
- /*
- * Create SERD to keep this event from being removed
- * by fmd which may not know there is an event pointer
- * saved here. This SERD is *never* meant to fire.
- */
- if (fmd_serd_exists(hdl, cp->mq_serdnm))
- fmd_serd_destroy(hdl, cp->mq_serdnm);
-
- fmd_serd_create(hdl, cp->mq_serdnm, GMEM_MQ_SERDN, GMEM_MQ_SERDT);
- (void) fmd_serd_record(hdl, cp->mq_serdnm, ep);
-
- return (cp);
-}
-
-gmem_mq_t *
-mq_destroy(fmd_hdl_t *hdl, gmem_list_t *lp, gmem_mq_t *ip)
-{
- gmem_mq_t *jp = gmem_list_next(ip);
- tstamp_t *tsp, *next;
-
-
- if (ip->mq_serdnm != NULL) {
- if (fmd_serd_exists(hdl, ip->mq_serdnm))
- fmd_serd_destroy(hdl, ip->mq_serdnm);
- fmd_hdl_strfree(hdl, ip->mq_serdnm);
- ip->mq_serdnm = NULL;
- }
-
- for (tsp = gmem_list_next(&ip->mq_dupce_tstamp); tsp != NULL;
- tsp = next) {
- next = gmem_list_next(tsp);
- gmem_list_delete(&ip->mq_dupce_tstamp, &tsp->ts_l);
- fmd_hdl_free(hdl, tsp, sizeof (tstamp_t));
- }
-
- gmem_list_delete(lp, &ip->mq_l);
- fmd_hdl_free(hdl, ip, sizeof (gmem_mq_t));
-
- return (jp);
-}
-
-
-/*
- * Add an index block for a new CE, sorted
- * a) by ascending unit position
- * b) order of arrival (~= time order)
- */
-void
-mq_add(fmd_hdl_t *hdl, gmem_dimm_t *dimm, fmd_event_t *ep,
- uint64_t afar, uint16_t unit_position, uint16_t ckwd,
- uint64_t now)
-{
- gmem_mq_t *ip, *jp;
- int cw = (int)ckwd;
-
- for (ip = gmem_list_next(&dimm->mq_root[cw]); ip != NULL; ) {
- if (ip->mq_unit_position > unit_position) {
- /* list is in unit position order */
- break;
- } else if (ip->mq_unit_position == unit_position &&
- ip->mq_phys_addr == afar) {
- /*
- * Found a duplicate cw, unit_position, and afar.
- * Delete this node, to be superseded by the new
- * node added below.
- * update the mq_t structure
- */
- mq_update(hdl, ep, ip, now);
- return;
- } else {
- ip = gmem_list_next(ip);
- }
- }
-
- jp = mq_create(hdl, ep, afar, unit_position, cw, now);
- if (ip == NULL)
- gmem_list_append(&dimm->mq_root[cw], jp);
- else
- gmem_list_insert_before(&dimm->mq_root[cw], ip, jp);
-}
-
-/*
- * Prune the MQSC index lists (one for each checkword), by deleting
- * outdated index blocks from each list.
- */
-
-void
-mq_prune(fmd_hdl_t *hdl, gmem_dimm_t *dimm, uint64_t now)
-{
- gmem_mq_t *ip;
- int cw;
-
- for (cw = 0; cw < GMEM_MAX_CKWDS; cw++) {
- for (ip = gmem_list_next(&dimm->mq_root[cw]); ip != NULL; ) {
- if (ip->mq_tstamp < now - GMEM_MQ_TIMELIM) {
- /*
- * This event has timed out - delete the
- * mq block as well as serd for the event.
- */
- ip = mq_destroy(hdl, &dimm->mq_root[cw], ip);
- } else {
- mq_prune_dup(hdl, ip, now);
- /* tstamp < now - ce_t */
- ip = gmem_list_next(ip);
- }
- } /* per checkword */
- } /* cw = 0...3 */
-}
-
-/*
- * Check the MQSC index lists (one for each checkword) by making a
- * complete pass through each list, checking if the criteria for
- * Rule 4A has been met. Rule 4A checking is done for each checkword.
- *
- * Rule 4A: fault a DIMM "whenever Solaris reports two or more CEs from
- * two or more different physical addresses on each of two or more different
- * bit positions from the same DIMM within 72 hours of each other, and all
- * the addresses are in the same relative checkword (that is, the AFARs
- * are all the same modulo 64). [Note: This means at least 4 CEs; two
- * from one bit position, with unique addresses, and two from another,
- * also with unique addresses, and the lower 6 bits of all the addresses
- * are the same."
- */
-
-void
-mq_check(fmd_hdl_t *hdl, gmem_dimm_t *dimm)
-{
- int upos_pairs, curr_upos, cw, i, j;
- nvlist_t *flt, *rsc;
- typedef struct upos_pair {
- int upos;
- gmem_mq_t *mq1;
- gmem_mq_t *mq2;
- } upos_pair_t;
- upos_pair_t upos_array[16]; /* max per cw = 2, * 8 cw's */
- gmem_mq_t *ip;
-
- /*
- * Each upos_array[] member represents a pair of CEs for the same
- * unit position (symbol) which is a 4 bit nibble.
- * MQSC rule 4 requires pairs of CEs from the same symbol (same DIMM
- * for rule 4A, and same DRAM for rule 4B) for a violation - this
- * is why CE pairs are tracked.
- */
- upos_pairs = 0;
- upos_array[0].mq1 = NULL;
-
- for (cw = 0; cw < GMEM_MAX_CKWDS; cw++) {
- i = upos_pairs;
- curr_upos = -1;
-
- /*
- * mq_root[] is an array of cumulative lists of CEs
- * indexed by checkword where the list is in unit position
- * order. Loop through checking for duplicate unit position
- * entries (filled in at mq_create()).
- * The upos_array[] is filled in each time a duplicate
- * unit position is found; the first time through the loop
- * of a unit position sets curr_upos but does not fill in
- * upos_array[] until the second symbol is found.
- */
- for (ip = gmem_list_next(&dimm->mq_root[cw]); ip != NULL;
- ip = gmem_list_next(ip)) {
- if (curr_upos != ip->mq_unit_position) {
- /* Set initial current position */
- curr_upos = ip->mq_unit_position;
- } else if (i > upos_pairs &&
- curr_upos == upos_array[i-1].upos) {
- /*
- * Only keep track of CE pairs; skip
- * triples, quads, etc...
- */
- continue;
- } else if (upos_array[i].mq1 == NULL) {
- /* Have a pair. Add to upos_array[] */
- fmd_hdl_debug(hdl, "pair:upos=%d",
- curr_upos);
- upos_array[i].upos = curr_upos;
- upos_array[i].mq1 = gmem_list_prev(ip);
- upos_array[i].mq2 = ip;
- upos_array[++i].mq1 = NULL;
- }
- }
- if (i - upos_pairs >= 2) {
- /* Rule 4A violation */
- rsc = gmem_find_dimm_rsc(hdl, dimm->dimm_serial);
- flt = fmd_nvl_create_fault(hdl, GMEM_FAULT_DIMM_4A,
- GMEM_FLTMAXCONF, NULL, gmem_dimm_fru(dimm), rsc);
- for (j = upos_pairs; j < i; j++) {
- fmd_case_add_ereport(hdl,
- dimm->dimm_case.cc_cp,
- upos_array[j].mq1->mq_ep);
- fmd_case_add_ereport(hdl,
- dimm->dimm_case.cc_cp,
- upos_array[j].mq2->mq_ep);
- }
- dimm->dimm_flags |= GMEM_F_FAULTING;
- gmem_dimm_dirty(hdl, dimm);
- fmd_case_add_suspect(hdl, dimm->dimm_case.cc_cp, flt);
- fmd_case_solve(hdl, dimm->dimm_case.cc_cp);
- nvlist_free(rsc);
- return;
- }
- upos_pairs = i;
- assert(upos_pairs < 16);
- }
-}
-
-/*ARGSUSED*/
-gmem_evdisp_t
-gmem_ce(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl, const char *class)
-{
- uint16_t symbol_pos, cw;
- uint64_t phyaddr, offset, addr;
- uint32_t filter_ratio = 0;
- gmem_dimm_t *dimm;
- gmem_page_t *page;
- nvlist_t *fru = NULL;
- nvlist_t *topo_rsc = NULL;
- nvlist_t *rsrc, *det;
- const char *uuid;
- ce_dispact_t type;
- boolean_t diagnose;
- char *sn;
- int err, rc;
- uint64_t *now;
- uint_t nelem;
- int skip_error = 0;
-
- err = nvlist_lookup_boolean_value(nvl, GMEM_ERPT_PAYLOAD_DIAGNOSE,
- &diagnose);
- if (err != 0 || diagnose == 0)
- return (GMEM_EVD_UNUSED);
-
- if ((nvlist_lookup_uint64(nvl, GMEM_ERPT_PAYLOAD_PHYSADDR,
- &phyaddr) != 0) ||
- (nvlist_lookup_uint64(nvl, GMEM_ERPT_PAYLOAD_OFFSET,
- &offset) != 0)) {
- fmd_hdl_debug(hdl, "Can't get page phyaddr or offset");
- return (GMEM_EVD_BAD);
- }
-
- fmd_hdl_debug(hdl, "phyaddr %llx offset %llx", phyaddr, offset);
-
- if ((page = gmem_page_lookup(phyaddr)) != NULL &&
- page->page_case.cc_cp != NULL &&
- fmd_case_solved(hdl, page->page_case.cc_cp))
- return (GMEM_EVD_REDUND);
-
- if (nvlist_lookup_nvlist(nvl, GMEM_ERPT_PAYLOAD_RESOURCE,
- &rsrc) != 0 ||
- nvlist_lookup_string(rsrc, FM_FMRI_HC_SERIAL_ID, &sn) != 0) {
- fmd_hdl_debug(hdl, "Can't get dimm serial\n");
- return (GMEM_EVD_BAD);
- }
-
- fmd_hdl_debug(hdl, "serial %s", sn);
-
- if (nvlist_lookup_nvlist(nvl, GMEM_ERPT_PAYLOAD_DETECTOR, &det) != 0)
- return (GMEM_EVD_BAD);
-
- /*
- * Find dimm fru by serial number.
- */
- fru = gmem_find_dimm_fru(hdl, sn);
-
- if (fru == NULL) {
- fmd_hdl_debug(hdl, "Dimm is not present\n");
- return (GMEM_EVD_UNUSED);
- }
-
- if ((dimm = gmem_dimm_lookup(hdl, fru)) == NULL &&
- (dimm = gmem_dimm_create(hdl, fru, det)) == NULL) {
- nvlist_free(fru);
- return (GMEM_EVD_UNUSED);
- }
-
- if (dimm->dimm_case.cc_cp == NULL) {
- dimm->dimm_case.cc_cp = gmem_case_create(hdl,
- &dimm->dimm_header, GMEM_PTR_DIMM_CASE, &uuid);
- }
-
- /*
- * Add to MQSC correlation lists all CEs which pass validity
- * checks above. If there is no symbol_pos & relative ckword
- * in the ereport, skip rule 4A checking.
- */
-
- err = nvlist_lookup_uint16(nvl, GMEM_ERPT_PAYLOAD_SYMBOLPOS,
- &symbol_pos);
- err |= nvlist_lookup_uint16(nvl, GMEM_ERPT_PAYLOAD_CKW, &cw);
-
- if (err == 0) {
- fmd_hdl_debug(hdl, "symbol_pos=%d cw=%d", symbol_pos, cw);
-
- if (nvlist_lookup_uint64_array(nvl,
- "__tod", &now, &nelem) == 0) {
- skip_error = gmem_check_symbol_error(hdl, dimm,
- symbol_pos);
-
- if (!skip_error ||
- !(dimm->dimm_flags & GMEM_F_FAULTING))
- mq_add(hdl, dimm, ep, phyaddr, symbol_pos,
- cw, *now);
-
- mq_prune(hdl, dimm, *now);
-
- if (!skip_error)
- bad_reader_writer_check(hdl, det, dimm);
- if (!(dimm->dimm_flags & GMEM_F_FAULTING)) {
- mq_check(hdl, dimm);
- mq_5b_check(hdl, dimm);
- }
- }
- }
-
- type = gmem_mem_name2type(strstr(class, "mem"));
-
- switch (type) {
- case CE_DISP_UNKNOWN:
- GMEM_STAT_BUMP(ce_unknown);
- nvlist_free(fru);
- return (GMEM_EVD_UNUSED);
- case CE_DISP_INTERMITTENT:
- GMEM_STAT_BUMP(ce_interm);
- nvlist_free(fru);
- return (GMEM_EVD_UNUSED);
- case CE_DISP_PERS:
- GMEM_STAT_BUMP(ce_clearable_persis);
- break;
- case CE_DISP_STICKY:
- GMEM_STAT_BUMP(ce_sticky);
- break;
- default:
- nvlist_free(fru);
- return (GMEM_EVD_BAD);
- }
-
- if (gmem_check_symbol_error(hdl, dimm, symbol_pos)) {
- nvlist_free(fru);
- return (GMEM_EVD_REDUND);
- }
-
- if (page == NULL) {
- page = gmem_page_create(hdl, fru, phyaddr, offset);
- if (page == NULL) {
- nvlist_free(fru);
- return (GMEM_EVD_UNUSED);
- }
- }
-
- nvlist_free(fru);
-
- if (page->page_case.cc_cp == NULL) {
- page->page_case.cc_cp = gmem_case_create(hdl,
- &page->page_header, GMEM_PTR_PAGE_CASE, &uuid);
- }
-
- switch (type) {
- case CE_DISP_PERS:
- fmd_hdl_debug(hdl, "adding persistent event to CE serd");
- if (page->page_case.cc_serdnm == NULL)
- gmem_page_serd_create(hdl, page, nvl);
-
- filter_ratio = gmem_get_serd_filter_ratio(nvl);
-
- fmd_hdl_debug(hdl, "filter_ratio %d\n", filter_ratio);
-
- if (gmem_serd_record(hdl, page->page_case.cc_serdnm,
- filter_ratio, ep) == FMD_B_FALSE) {
- return (GMEM_EVD_OK); /* engine hasn't fired */
- }
-
- fmd_hdl_debug(hdl, "ce page serd fired\n");
- fmd_case_add_serd(hdl, page->page_case.cc_cp,
- page->page_case.cc_serdnm);
- fmd_serd_reset(hdl, page->page_case.cc_serdnm);
- break; /* to retire */
-
- case CE_DISP_STICKY:
- fmd_case_add_ereport(hdl, page->page_case.cc_cp, ep);
- break; /* to retire */
- }
-
-
- topo_rsc = gmem_find_dimm_rsc(hdl, dimm->dimm_serial);
- rc = gmem_page_fault(hdl, gmem_dimm_fru(dimm), topo_rsc,
- ep, phyaddr, offset);
-
- if (rc) {
- gmem_to_hashed_addr(&addr, phyaddr);
-
- if (addr > dimm->dimm_phys_addr_hi)
- dimm->dimm_phys_addr_hi = addr;
- if (addr < dimm->dimm_phys_addr_low)
- dimm->dimm_phys_addr_low = addr;
-
- dimm->dimm_nretired++;
- dimm->dimm_retstat.fmds_value.ui64++;
- gmem_dimm_dirty(hdl, dimm);
- ce_thresh_check(hdl, dimm);
- }
- return (GMEM_EVD_OK);
-}
-
-void
-gmem_dimm_close(fmd_hdl_t *hdl, void *arg)
-{
- gmem_dimm_destroy(hdl, arg);
-}
diff --git a/usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_page.c b/usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_page.c
deleted file mode 100644
index e71a03df48..0000000000
--- a/usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_page.c
+++ /dev/null
@@ -1,361 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
- */
-
-
-/*
- * Support routines for managing per-page state.
- */
-
-#include <gmem_page.h>
-#include <gmem_mem.h>
-#include <gmem_dimm.h>
-#include <gmem.h>
-
-#include <errno.h>
-#include <strings.h>
-#include <fm/fmd_api.h>
-#include <sys/fm/protocol.h>
-
-static void
-page_write(fmd_hdl_t *hdl, gmem_page_t *page)
-{
- fmd_buf_write(hdl, NULL, page->page_bufname, page,
- sizeof (gmem_page_pers_t));
-}
-
-static void
-gmem_page_free(fmd_hdl_t *hdl, gmem_page_t *page, int destroy)
-{
- gmem_case_t *cc = &page->page_case;
-
- if (cc->cc_cp != NULL)
- gmem_case_fini(hdl, cc->cc_cp, destroy);
-
- if (cc->cc_serdnm != NULL) {
- if (fmd_serd_exists(hdl, cc->cc_serdnm) && destroy)
- fmd_serd_destroy(hdl, cc->cc_serdnm);
- fmd_hdl_strfree(hdl, cc->cc_serdnm);
- }
-
- if (destroy)
- fmd_buf_destroy(hdl, NULL, page->page_bufname);
-
- gmem_fmri_fini(hdl, &page->page_asru, destroy);
-
- gmem_list_delete(&gmem.gm_pages, page);
- fmd_hdl_free(hdl, page, sizeof (gmem_page_t));
-}
-
-void
-gmem_page_destroy(fmd_hdl_t *hdl, gmem_page_t *page)
-{
- fmd_hdl_debug(hdl, "destroying the page\n");
- gmem_page_free(hdl, page, FMD_B_TRUE);
-}
-
-static gmem_page_t *
-page_lookup_by_physaddr(uint64_t pa)
-{
- gmem_page_t *page;
-
- for (page = gmem_list_next(&gmem.gm_pages); page != NULL;
- page = gmem_list_next(page)) {
- if (page->page_physbase == pa)
- return (page);
- }
-
- return (NULL);
-}
-
-gmem_page_t *
-gmem_page_create(fmd_hdl_t *hdl, nvlist_t *modasru, uint64_t pa,
- uint64_t offset)
-{
- gmem_page_t *page;
- nvlist_t *asru, *hsp;
-
- pa = pa & gmem.gm_pagemask;
-
- fmd_hdl_debug(hdl, "page_lookup: creating new page for %llx\n",
- (u_longlong_t)pa);
- GMEM_STAT_BUMP(page_creat);
-
- page = fmd_hdl_zalloc(hdl, sizeof (gmem_page_t), FMD_SLEEP);
- page->page_nodetype = GMEM_NT_PAGE;
- page->page_version = CMD_PAGE_VERSION;
- page->page_physbase = pa;
- page->page_offset = offset;
-
- gmem_bufname(page->page_bufname, sizeof (page->page_bufname),
- "page_%llx", (u_longlong_t)pa);
-
- if (nvlist_dup(modasru, &asru, 0) != 0) {
- fmd_hdl_debug(hdl, "Page create nvlist dup failed");
- return (NULL);
- }
-
- if (nvlist_alloc(&hsp, NV_UNIQUE_NAME, 0) != 0) {
- fmd_hdl_debug(hdl, "Page create nvlist alloc failed");
- nvlist_free(asru);
- return (NULL);
- }
-
- if (nvlist_add_uint64(hsp, FM_FMRI_MEM_PHYSADDR,
- page->page_physbase) != 0 ||
- nvlist_add_uint64(hsp, FM_FMRI_HC_SPECIFIC_OFFSET,
- page->page_offset) != 0 ||
- nvlist_add_nvlist(asru, FM_FMRI_HC_SPECIFIC, hsp) != 0) {
- fmd_hdl_debug(hdl, "Page create failed to build page fmri");
- nvlist_free(asru);
- nvlist_free(hsp);
- return (NULL);
- }
-
- gmem_fmri_init(hdl, &page->page_asru, asru, "page_asru_%llx",
- (u_longlong_t)pa);
-
- nvlist_free(asru);
- nvlist_free(hsp);
-
- gmem_list_append(&gmem.gm_pages, page);
- page_write(hdl, page);
-
- return (page);
-}
-
-gmem_page_t *
-gmem_page_lookup(uint64_t pa)
-{
- pa = pa & gmem.gm_pagemask;
-
- return (page_lookup_by_physaddr(pa));
-}
-
-static gmem_page_t *
-page_wrapv0(fmd_hdl_t *hdl, gmem_page_pers_t *pers, size_t psz)
-{
- gmem_page_t *page;
-
- if (psz != sizeof (gmem_page_pers_t)) {
- fmd_hdl_abort(hdl, "size of state doesn't match size of "
- "version 0 state (%u bytes).\n", sizeof (gmem_page_pers_t));
- }
-
- page = fmd_hdl_zalloc(hdl, sizeof (gmem_page_t), FMD_SLEEP);
- bcopy(pers, page, sizeof (gmem_page_pers_t));
- fmd_hdl_free(hdl, pers, psz);
- return (page);
-}
-
-void *
-gmem_page_restore(fmd_hdl_t *hdl, fmd_case_t *cp, gmem_case_ptr_t *ptr)
-{
- gmem_page_t *page;
-
- for (page = gmem_list_next(&gmem.gm_pages); page != NULL;
- page = gmem_list_next(page)) {
- if (strcmp(page->page_bufname, ptr->ptr_name) == 0)
- break;
- }
-
- if (page == NULL) {
- size_t pagesz;
-
- fmd_hdl_debug(hdl, "restoring page from %s\n", ptr->ptr_name);
-
- if ((pagesz = fmd_buf_size(hdl, NULL, ptr->ptr_name)) == 0) {
- if (fmd_case_solved(hdl, cp) ||
- fmd_case_closed(hdl, cp)) {
- fmd_hdl_debug(hdl, "page %s from case %s not "
- "found. Case is already solved or closed\n",
- ptr->ptr_name, fmd_case_uuid(hdl, cp));
- return (NULL);
- } else {
- fmd_hdl_abort(hdl, "page referenced by case %s "
- "does not exist in saved state\n",
- fmd_case_uuid(hdl, cp));
- }
- } else if (pagesz > CMD_PAGE_MAXSIZE ||
- pagesz < CMD_PAGE_MINSIZE) {
- fmd_hdl_abort(hdl, "page buffer referenced by case %s "
- "is out of bounds (is %u bytes, max %u, min %u)\n",
- fmd_case_uuid(hdl, cp), pagesz,
- CMD_PAGE_MAXSIZE, CMD_PAGE_MINSIZE);
- }
-
- if ((page = gmem_buf_read(hdl, NULL, ptr->ptr_name,
- pagesz)) == NULL) {
- fmd_hdl_abort(hdl, "failed to read page buf %s",
- ptr->ptr_name);
- }
-
- fmd_hdl_debug(hdl, "found %d in version field\n",
- page->page_version);
-
- switch (page->page_version) {
- case CMD_PAGE_VERSION_0:
- page = page_wrapv0(hdl, (gmem_page_pers_t *)page,
- pagesz);
- break;
- default:
- fmd_hdl_abort(hdl, "unknown version (found %d) "
- "for page state referenced by case %s.\n",
- page->page_version, fmd_case_uuid(hdl, cp));
- break;
- }
-
- gmem_fmri_restore(hdl, &page->page_asru);
-
- gmem_list_append(&gmem.gm_pages, page);
- }
-
- switch (ptr->ptr_subtype) {
- case GMEM_PTR_PAGE_CASE:
- gmem_case_restore(hdl, &page->page_case, cp,
- gmem_page_serdnm_create(hdl, "page", page->page_physbase));
- break;
- default:
- fmd_hdl_abort(hdl, "invalid %s subtype %d\n",
- ptr->ptr_name, ptr->ptr_subtype);
- }
-
- return (page);
-}
-
-/*ARGSUSED*/
-int
-gmem_page_unusable(fmd_hdl_t *hdl, gmem_page_t *page)
-{
- nvlist_t *asru = NULL;
- char *sn;
-
- if (nvlist_lookup_string(page->page_asru_nvl,
- FM_FMRI_HC_SERIAL_ID, &sn) != 0)
- return (1);
-
- /*
- * get asru in mem scheme from topology
- */
- asru = gmem_find_dimm_asru(hdl, sn);
- if (asru == NULL)
- return (1);
-
- (void) nvlist_add_string_array(asru, FM_FMRI_MEM_SERIAL_ID, &sn, 1);
- (void) nvlist_add_uint64(asru, FM_FMRI_MEM_PHYSADDR,
- page->page_physbase);
- (void) nvlist_add_uint64(asru, FM_FMRI_MEM_OFFSET, page->page_offset);
-
- if (fmd_nvl_fmri_unusable(hdl, asru)) {
- nvlist_free(asru);
- return (1);
- }
-
- nvlist_free(asru);
-
- return (0);
-}
-
-
-/*ARGSUSED*/
-void
-gmem_page_validate(fmd_hdl_t *hdl)
-{
- gmem_page_t *page, *next;
-
- for (page = gmem_list_next(&gmem.gm_pages); page != NULL; page = next) {
- next = gmem_list_next(page);
-
- if (gmem_page_unusable(hdl, page))
- gmem_page_destroy(hdl, page);
- }
-}
-
-void
-gmem_page_dirty(fmd_hdl_t *hdl, gmem_page_t *page)
-{
- if (fmd_buf_size(hdl, NULL, page->page_bufname) !=
- sizeof (gmem_page_pers_t))
- fmd_buf_destroy(hdl, NULL, page->page_bufname);
-
- /* No need to rewrite the FMRIs in the page - they don't change */
- fmd_buf_write(hdl, NULL, page->page_bufname, &page->page_pers,
- sizeof (gmem_page_pers_t));
-}
-
-void
-gmem_page_fini(fmd_hdl_t *hdl)
-{
- gmem_page_t *page;
-
- while ((page = gmem_list_next(&gmem.gm_pages)) != NULL)
- gmem_page_free(hdl, page, FMD_B_FALSE);
-}
-
-
-int
-gmem_page_fault(fmd_hdl_t *hdl, nvlist_t *fru, nvlist_t *rsc,
- fmd_event_t *ep, uint64_t afar, uint64_t offset)
-{
- gmem_page_t *page = NULL;
- const char *uuid;
- nvlist_t *flt, *hsp;
-
- page = gmem_page_lookup(afar);
- if (page != NULL) {
- if (page->page_flags & GMEM_F_FAULTING ||
- gmem_page_unusable(hdl, page)) {
- nvlist_free(rsc);
- page->page_flags |= GMEM_F_FAULTING;
- return (0);
- }
- } else {
- page = gmem_page_create(hdl, fru, afar, offset);
- }
-
- page->page_flags |= GMEM_F_FAULTING;
- if (page->page_case.cc_cp == NULL)
- page->page_case.cc_cp = gmem_case_create(hdl,
- &page->page_header, GMEM_PTR_PAGE_CASE, &uuid);
-
- if (nvlist_lookup_nvlist(page->page_asru_nvl, FM_FMRI_HC_SPECIFIC,
- &hsp) == 0)
- (void) nvlist_add_nvlist(rsc, FM_FMRI_HC_SPECIFIC, hsp);
-
- flt = fmd_nvl_create_fault(hdl, GMEM_FAULT_PAGE, 100, NULL, fru, rsc);
- nvlist_free(rsc);
-
- if (nvlist_add_boolean_value(flt, FM_SUSPECT_MESSAGE, B_FALSE) != 0)
- fmd_hdl_abort(hdl, "failed to add no-message member to fault");
-
- fmd_case_add_ereport(hdl, page->page_case.cc_cp, ep);
- fmd_case_add_suspect(hdl, page->page_case.cc_cp, flt);
- fmd_case_solve(hdl, page->page_case.cc_cp);
- return (1);
-}
-
-void
-gmem_page_close(fmd_hdl_t *hdl, void *arg)
-{
- gmem_page_destroy(hdl, arg);
-}
diff --git a/usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_page.h b/usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_page.h
deleted file mode 100644
index e476f7f93b..0000000000
--- a/usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_page.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _GMEM_PAGE_H
-#define _GMEM_PAGE_H
-
-
-/*
- * Routines for the creation of page retirement faults and for the management of
- * page-related state.
- */
-
-#include <gmem_state.h>
-#include <gmem_fmri.h>
-
-#include <fm/fmd_api.h>
-#include <sys/types.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define PAGE_MKVERSION(version) (version)
-
-#define CMD_PAGE_VERSION_0 PAGE_MKVERSION(0)
-#define CMD_PAGE_VERSION CMD_PAGE_VERSION_0
-
-#define CMD_PAGE_VERSIONED(page) ((page)->page_version)
-
-typedef struct gmem_page_pers {
- gmem_header_t pagep_header; /* Nodetype must be CMD_NT_PAGE */
- uint_t pagep_version;
- gmem_fmri_t pagep_asru; /* ASRU for this DIMM */
- uint64_t pagep_physbase; /* base phys addr for page */
- uint64_t pagep_offset; /* page offset */
- uint_t pagep_flags; /* CMD_MEM_F_* */
-} gmem_page_pers_t;
-
-typedef struct gmem_page {
- gmem_page_pers_t page_pers;
- gmem_case_t page_case; /* Open CE case against this page */
-} gmem_page_t;
-
-#define CMD_PAGE_MAXSIZE sizeof (gmem_page_pers_t)
-#define CMD_PAGE_MINSIZE sizeof (gmem_page_pers_t)
-
-#define page_header page_pers.pagep_header
-#define page_nodetype page_pers.pagep_header.hdr_nodetype
-#define page_bufname page_pers.pagep_header.hdr_bufname
-#define page_version page_pers.pagep_version
-#define page_asru page_pers.pagep_asru
-#define page_asru_nvl page_pers.pagep_asru.fmri_nvl
-#define page_flags page_pers.pagep_flags
-#define page_physbase page_pers.pagep_physbase
-#define page_offset page_pers.pagep_offset
-#define page_list page_header.hdr_list
-
-/*
- * Page retirement
- *
- * When a page is to be retired, these routines are called to generate and
- * manage a fault.memory.page against the page.
- */
-extern int gmem_page_fault(fmd_hdl_t *, nvlist_t *, nvlist_t *, fmd_event_t *,
- uint64_t, uint64_t);
-extern void gmem_page_close(fmd_hdl_t *, void *);
-
-extern gmem_page_t *gmem_page_create(fmd_hdl_t *, nvlist_t *, uint64_t,
- uint64_t);
-extern gmem_page_t *gmem_page_lookup(uint64_t);
-
-extern void gmem_page_dirty(fmd_hdl_t *, gmem_page_t *);
-extern void *gmem_page_restore(fmd_hdl_t *, fmd_case_t *, gmem_case_ptr_t *);
-extern void gmem_page_validate(fmd_hdl_t *);
-extern void gmem_page_destroy(fmd_hdl_t *, gmem_page_t *);
-extern void gmem_page_fini(fmd_hdl_t *);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _GMEM_PAGE_H */
diff --git a/usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_state.c b/usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_state.c
deleted file mode 100644
index e5a66688d2..0000000000
--- a/usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_state.c
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * Case management and saved state restoration
- */
-
-#include <gmem_state.h>
-#include <gmem_mem.h>
-#include <gmem_page.h>
-#include <gmem_dimm.h>
-#include <gmem.h>
-
-#include <string.h>
-#include <fm/fmd_api.h>
-
-/* Must be in sync with gmem_ptrsubtype_t */
-static gmem_case_closer_f *const gmem_case_closers[] = {
- NULL,
- gmem_dimm_close, /* GMEM_PTR_DIMM_CASE */
- gmem_page_close, /* GMEM_PTR_PAGE_CASE */
-};
-
-fmd_case_t *
-gmem_case_create(fmd_hdl_t *hdl, gmem_header_t *hdr,
- gmem_ptrsubtype_t ptrsubtype, const char **uuidp)
-{
- gmem_case_ptr_t ptr;
- gmem_case_closer_t *cl;
- fmd_case_t *cp;
-
- cl = fmd_hdl_alloc(hdl, sizeof (gmem_case_closer_t), FMD_SLEEP);
- cl->cl_func = gmem_case_closers[ptrsubtype];
- cl->cl_arg = hdr;
-
- cp = fmd_case_open(hdl, cl);
-
- ptr.ptr_type = hdr->hdr_nodetype;
- ptr.ptr_subtype = ptrsubtype;
- (void) strcpy(ptr.ptr_name, hdr->hdr_bufname);
-
- *uuidp = fmd_case_uuid(hdl, cp);
- fmd_buf_write(hdl, cp, *uuidp, &ptr, sizeof (gmem_case_ptr_t));
-
- return (cp);
-}
-
-void
-gmem_case_redirect(fmd_hdl_t *hdl, fmd_case_t *cp, gmem_ptrsubtype_t newsubtype)
-{
- const char *uuid = fmd_case_uuid(hdl, cp);
- gmem_case_ptr_t ptr;
-
- fmd_buf_read(hdl, cp, uuid, &ptr, sizeof (gmem_case_ptr_t));
- fmd_hdl_debug(hdl, "redirecting case %s from %d to %d\n", uuid,
- ptr.ptr_subtype, newsubtype);
- ptr.ptr_subtype = newsubtype;
- fmd_buf_write(hdl, cp, uuid, &ptr, sizeof (gmem_case_ptr_t));
-}
-
-void
-gmem_case_fini(fmd_hdl_t *hdl, fmd_case_t *cp, int close)
-{
- const char *uuid = fmd_case_uuid(hdl, cp);
- gmem_case_closer_t *cl = fmd_case_getspecific(hdl, cp);
-
- if (close) {
- fmd_hdl_debug(hdl, "closing case %s\n", uuid);
-
- if (fmd_serd_exists(hdl, uuid))
- fmd_serd_destroy(hdl, uuid);
-
- if (fmd_buf_size(hdl, cp, uuid) != 0)
- fmd_buf_destroy(hdl, cp, uuid);
-
- fmd_case_setspecific(hdl, cp, NULL);
- fmd_case_close(hdl, cp);
- }
-
- if (cl != NULL)
- fmd_hdl_free(hdl, cl, sizeof (gmem_case_closer_t));
-}
-
-/* Must be in sync with gmem_nodetype_t */
-static gmem_case_restorer_f *const gmem_case_restorers[] = {
- NULL,
- gmem_dimm_restore, /* CMD_NT_DIMM */
- gmem_page_restore, /* CMD_NT_PAGE */
-};
-
-int
-gmem_state_restore(fmd_hdl_t *hdl)
-{
- fmd_case_t *cp = NULL;
-
- while ((cp = fmd_case_next(hdl, cp)) != NULL) {
- const char *uuid = fmd_case_uuid(hdl, cp);
- gmem_case_closer_t *cl;
- gmem_case_ptr_t ptr;
- void *thing;
- size_t sz;
-
- if ((sz = fmd_buf_size(hdl, cp, uuid)) == 0)
- continue;
- else if (sz != sizeof (gmem_case_ptr_t))
- return (gmem_set_errno(EINVAL));
-
- fmd_buf_read(hdl, cp, fmd_case_uuid(hdl, cp), &ptr,
- sizeof (gmem_case_ptr_t));
-
- if (ptr.ptr_type == 0 || ptr.ptr_type >
- sizeof (gmem_case_restorers) /
- sizeof (gmem_case_restorer_f *))
- return (gmem_set_errno(EINVAL));
-
- if ((thing = gmem_case_restorers[ptr.ptr_type](hdl,
- cp, &ptr)) == NULL) {
- fmd_hdl_debug(hdl, "Unable to restore case %s\n", uuid);
- continue;
- }
-
- cl = fmd_hdl_alloc(hdl, sizeof (gmem_case_closer_t), FMD_SLEEP);
- cl->cl_func = gmem_case_closers[ptr.ptr_subtype];
- cl->cl_arg = thing;
- fmd_case_setspecific(hdl, cp, cl);
- }
-
- gmem_dimm_validate(hdl);
- gmem_page_validate(hdl);
-
- return (0);
-}
-
-void
-gmem_case_restore(fmd_hdl_t *hdl, gmem_case_t *cc, fmd_case_t *cp, char *serdnm)
-{
- if (!fmd_serd_exists(hdl, serdnm)) {
- fmd_hdl_strfree(hdl, serdnm);
- serdnm = NULL;
- }
-
- cc->cc_cp = cp;
- cc->cc_serdnm = serdnm;
-}
diff --git a/usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_state.h b/usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_state.h
deleted file mode 100644
index 0f284a474a..0000000000
--- a/usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_state.h
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _GMEM_STATE_H
-#define _GMEM_STATE_H
-
-/*
- * Case management and saved state restoration
- */
-
-#include <gmem_util.h>
-
-#include <fm/fmd_api.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Our maximum persistent buffer name length, used to allocate fixed-size
- * arrays for name storage.
- */
-/*
- * The current name DIMM_+serial number
- */
-#define GMEM_BUFNMLEN 48
-
-/* gmem_evdisp_t, gmem_evdisp_stat_t, and gmem_evdisp_names must be in sync */
-typedef enum gmem_evdisp {
- GMEM_EVD_OK,
- GMEM_EVD_BAD,
- GMEM_EVD_UNUSED,
- GMEM_EVD_REDUND
-} gmem_evdisp_t;
-
-/*
- * Each handled ereport type has four statistics, designed to indicate the
- * eventual disposition of the ereport.
- */
-typedef struct gmem_evdisp_stat {
- fmd_stat_t evs_ok; /* # of erpts processed successfully */
- fmd_stat_t evs_bad; /* # of malformed ereports */
- fmd_stat_t evs_unused; /* # of erpts unusable or not needed */
- fmd_stat_t evs_redund; /* # of erpts already explained */
-} gmem_evdisp_stat_t;
-
-/* Must be in sync with gmem_case_restorers */
-typedef enum gmem_nodetype {
- GMEM_NT_DIMM = 1,
- GMEM_NT_PAGE
-} gmem_nodetype_t;
-
-/*
- * Must be in sync with gmem_case_closers. Additional types must be
- * appended to this enum otherwise interpretation of existing logs
- * and checkpoints will be confused.
- */
-typedef enum gmem_ptrsubtype {
- GMEM_PTR_DIMM_CASE = 1,
- GMEM_PTR_PAGE_CASE
-} gmem_ptrsubtype_t;
-
-/*
- * There are three types of general-purpose buffers, used to track DIMMs,
- * and pages. Created on-demand as ereports arrive, one buffer is created for
- * each thing tracked. The general-purpose buffers are used to track common
- * state, and are used to support case-specific buffers. Each open case has
- * a case-specific pointer buffer, used to aid in the rediscovery of the
- * associated general-purpose buffer. When restoration begins, we iterate
- * through each of the open cases, restoring the case-specific pointer buffers
- * for each. The pointer buffers are then used to restore the general-purpose
- * buffers.
- */
-
-typedef struct gmem_case_ptr {
- gmem_nodetype_t ptr_type; /* The type of associated G.P. buffer */
- gmem_ptrsubtype_t ptr_subtype; /* The case within the G.P. buffer */
- char ptr_name[GMEM_BUFNMLEN]; /* G.P. buffer name */
-} gmem_case_ptr_t;
-
-/*
- * All general-purpose buffers begin with a common header. This header contains
- * identification information used in the construction of new cases.
- *
- * Note that versioned structs depend upon the size of
- * this struct remaining fixed.
- */
-typedef struct gmem_header {
- gmem_list_t hdr_list; /* List of G.P. structs of this type */
- gmem_nodetype_t hdr_nodetype; /* Type of this G.P. struct */
- char hdr_bufname[GMEM_BUFNMLEN]; /* G.P. buffer name */
-} gmem_header_t;
-
-/*
- * Per-case-subtype case closing routines. Stored in per-case state when the
- * case is generated, and regenerated from saved state upon restore.
- */
-typedef void gmem_case_closer_f(fmd_hdl_t *, void *);
-typedef void *gmem_case_restorer_f(fmd_hdl_t *, fmd_case_t *,
- gmem_case_ptr_t *);
-
-typedef struct gmem_case_closer {
- gmem_case_closer_f *cl_func;
- void *cl_arg;
-} gmem_case_closer_t;
-
-typedef struct gmem_case {
- fmd_case_t *cc_cp;
- char *cc_serdnm;
-} gmem_case_t;
-
-/*
- * Utility functions which ease the management of cases.
- */
-extern fmd_case_t *gmem_case_create(fmd_hdl_t *, gmem_header_t *,
- gmem_ptrsubtype_t, const char **);
-extern void gmem_case_redirect(fmd_hdl_t *, fmd_case_t *, gmem_ptrsubtype_t);
-extern void gmem_case_fini(fmd_hdl_t *, fmd_case_t *, int);
-extern void gmem_case_restore(fmd_hdl_t *, gmem_case_t *, fmd_case_t *, char *);
-
-extern int gmem_state_restore(fmd_hdl_t *);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _GMEM_STATE_H */
diff --git a/usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_util.c b/usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_util.c
deleted file mode 100644
index 5ce2a4980a..0000000000
--- a/usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_util.c
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#include <gmem.h>
-#include <gmem_util.h>
-
-#include <errno.h>
-#include <stdarg.h>
-#include <string.h>
-#include <fm/fmd_api.h>
-#include <sys/fm/protocol.h>
-
-int
-gmem_set_errno(int err)
-{
- errno = err;
- return (-1);
-}
-
-void *
-gmem_buf_read(fmd_hdl_t *hdl, fmd_case_t *cp, const char *bufname, size_t bufsz)
-{
- void *buf;
- size_t sz;
-
- if ((sz = fmd_buf_size(hdl, cp, bufname)) == 0) {
- (void) gmem_set_errno(ENOENT);
- return (NULL);
- } else if (sz != bufsz) {
- (void) gmem_set_errno(EINVAL);
- return (NULL);
- }
-
- buf = fmd_hdl_alloc(hdl, bufsz, FMD_SLEEP);
- fmd_buf_read(hdl, cp, bufname, buf, bufsz);
-
- return (buf);
-}
-
-void
-gmem_vbufname(char *buf, size_t bufsz, const char *fmt, va_list ap)
-{
- char *c;
-
- (void) vsnprintf(buf, bufsz, fmt, ap);
-
- for (c = buf; *c != '\0'; c++) {
- if (*c == ' ' || *c == '/' || *c == ':')
- *c = '_';
- }
-}
-
-void
-gmem_bufname(char *buf, size_t bufsz, const char *fmt, ...)
-{
- va_list ap;
-
- va_start(ap, fmt);
- gmem_vbufname(buf, bufsz, fmt, ap);
- va_end(ap);
-}
-
-void
-gmem_list_append(gmem_list_t *lp, void *new)
-{
- gmem_list_t *p = lp->l_prev; /* p = tail list element */
- gmem_list_t *q = new; /* q = new list element */
-
- lp->l_prev = q;
- q->l_prev = p;
- q->l_next = NULL;
-
- if (p != NULL)
- p->l_next = q;
- else
- lp->l_next = q;
-}
-
-void
-gmem_list_prepend(gmem_list_t *lp, void *new)
-{
- gmem_list_t *p = new; /* p = new list element */
- gmem_list_t *q = lp->l_next; /* q = head list element */
-
- lp->l_next = p;
- p->l_prev = NULL;
- p->l_next = q;
-
- if (q != NULL)
- q->l_prev = p;
- else
- lp->l_prev = p;
-}
-
-void
-gmem_list_insert_before(gmem_list_t *lp, void *before_me, void *new)
-{
- gmem_list_t *p = before_me;
- gmem_list_t *q = new;
-
- if (p == NULL || p->l_prev == NULL) {
- gmem_list_prepend(lp, new);
- return;
- }
-
- q->l_prev = p->l_prev;
- q->l_next = p;
- p->l_prev = q;
- q->l_prev->l_next = q;
-}
-
-void
-gmem_list_insert_after(gmem_list_t *lp, void *after_me, void *new)
-{
- gmem_list_t *p = after_me;
- gmem_list_t *q = new;
-
- if (p == NULL || p->l_next == NULL) {
- gmem_list_append(lp, new);
- return;
- }
-
- q->l_next = p->l_next;
- q->l_prev = p;
- p->l_next = q;
- q->l_next->l_prev = q;
-}
-
-void
-gmem_list_delete(gmem_list_t *lp, void *existing)
-{
- gmem_list_t *p = existing;
-
- if (p->l_prev != NULL)
- p->l_prev->l_next = p->l_next;
- else
- lp->l_next = p->l_next;
-
- if (p->l_next != NULL)
- p->l_next->l_prev = p->l_prev;
- else
- lp->l_prev = p->l_prev;
-}
diff --git a/usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_util.h b/usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_util.h
deleted file mode 100644
index 03d3442c41..0000000000
--- a/usr/src/cmd/fm/modules/sun4v/generic-mem/gmem_util.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _GMEM_UTIL_H
-#define _GMEM_UTIL_H
-
-
-#include <sys/param.h>
-#include <sys/param.h>
-#include <fm/fmd_api.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct gmem_list {
- struct gmem_list *l_prev;
- struct gmem_list *l_next;
-} gmem_list_t;
-
-#define gmem_list_prev(elem) ((void *)(((gmem_list_t *)(elem))->l_prev))
-#define gmem_list_next(elem) ((void *)(((gmem_list_t *)(elem))->l_next))
-
-extern void gmem_list_append(gmem_list_t *, void *);
-extern void gmem_list_prepend(gmem_list_t *, void *);
-extern void gmem_list_insert_before(gmem_list_t *, void *, void *);
-extern void gmem_list_insert_after(gmem_list_t *, void *, void *);
-extern void gmem_list_delete(gmem_list_t *, void *);
-
-extern int gmem_set_errno(int);
-extern void *gmem_buf_read(fmd_hdl_t *, fmd_case_t *, const char *, size_t);
-extern void gmem_bufname(char *, size_t, const char *, ...);
-extern void gmem_vbufname(char *, size_t, const char *, va_list);
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _GMEM_UTIL_H */
diff --git a/usr/src/cmd/fm/notify/smtp-notify/sparc/Makefile b/usr/src/cmd/fm/notify/smtp-notify/sparc/Makefile
deleted file mode 100644
index ebcbee3118..0000000000
--- a/usr/src/cmd/fm/notify/smtp-notify/sparc/Makefile
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 (c) 2010, Oracle and/or its affiliates. All rights reserved.
-#
-
-include ../../../../Makefile.cmd
-include ../Makefile.com
diff --git a/usr/src/cmd/fm/notify/snmp-notify/sparc/Makefile b/usr/src/cmd/fm/notify/snmp-notify/sparc/Makefile
deleted file mode 100644
index ebcbee3118..0000000000
--- a/usr/src/cmd/fm/notify/snmp-notify/sparc/Makefile
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 (c) 2010, Oracle and/or its affiliates. All rights reserved.
-#
-
-include ../../../../Makefile.cmd
-include ../Makefile.com
diff --git a/usr/src/cmd/fm/schemes/cpu/sparc/Makefile b/usr/src/cmd/fm/schemes/cpu/sparc/Makefile
deleted file mode 100644
index 35d2336a56..0000000000
--- a/usr/src/cmd/fm/schemes/cpu/sparc/Makefile
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2007 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-include ../../Makefile.com
-
-SRCS = cpu.c
-
-LDLIBS += -lkstat \
- -L$(ROOTLIB)/fm -ltopo
-LDFLAGS += -R/usr/lib/fm
-
-CERRWARN += -_gcc=-Wno-parentheses
-
-include ../../Makefile.targ
-
-install: all $(ROOTPROG)
diff --git a/usr/src/cmd/fm/schemes/cpu/sparcv9/Makefile b/usr/src/cmd/fm/schemes/cpu/sparcv9/Makefile
deleted file mode 100644
index 321e124237..0000000000
--- a/usr/src/cmd/fm/schemes/cpu/sparcv9/Makefile
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2007 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-include ../../Makefile.com
-include $(SRC)/Makefile.master.64
-
-SRCS = cpu.c
-LDLIBS += -lkstat \
- -L$(ROOTLIB)/fm/$(MACH64) -ltopo
-LDFLAGS += -R/usr/lib/fm/$(MACH64)
-
-CERRWARN += -_gcc=-Wno-parentheses
-
-include ../../Makefile.targ
-
-install: all $(ROOTPROG64)
diff --git a/usr/src/cmd/fm/schemes/dev/sparc/Makefile b/usr/src/cmd/fm/schemes/dev/sparc/Makefile
deleted file mode 100644
index cc9200a467..0000000000
--- a/usr/src/cmd/fm/schemes/dev/sparc/Makefile
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2007 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-#
-
-include ../Makefile.com
-include ../../Makefile.targ
-
-LDLIBS += -ltopo
-LDFLAGS += -L$(ROOT)/usr/lib/fm -R/usr/lib/fm
-LINTFLAGS += -L$(ROOT)/usr/lib/fm
-
-install: all $(ROOTPROG)
diff --git a/usr/src/cmd/fm/schemes/dev/sparcv9/Makefile b/usr/src/cmd/fm/schemes/dev/sparcv9/Makefile
deleted file mode 100644
index 145b89b8d3..0000000000
--- a/usr/src/cmd/fm/schemes/dev/sparcv9/Makefile
+++ /dev/null
@@ -1,37 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2007 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-#
-
-include ../Makefile.com
-include $(SRC)/Makefile.master.64
-include ../../Makefile.targ
-
-LDLIBS += -ltopo
-LDFLAGS += -L$(ROOT)/usr/lib/fm/sparcv9 -R/usr/lib/fm/sparcv9
-LINTFLAGS += -L$(ROOT)/usr/lib/fm/sparcv9
-
-install: all $(ROOTPROG64)
diff --git a/usr/src/cmd/fm/schemes/fmd/sparc/Makefile b/usr/src/cmd/fm/schemes/fmd/sparc/Makefile
deleted file mode 100644
index b2953a27d9..0000000000
--- a/usr/src/cmd/fm/schemes/fmd/sparc/Makefile
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2006 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-#
-
-include ../../Makefile.com
-include ../../Makefile.targ
-
-install: all $(ROOTPROG)
diff --git a/usr/src/cmd/fm/schemes/fmd/sparcv9/Makefile b/usr/src/cmd/fm/schemes/fmd/sparcv9/Makefile
deleted file mode 100644
index b12450b1d8..0000000000
--- a/usr/src/cmd/fm/schemes/fmd/sparcv9/Makefile
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2006 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-#
-
-include ../../Makefile.com
-include $(SRC)/Makefile.master.64
-include ../../Makefile.targ
-
-install: all $(ROOTPROG64)
diff --git a/usr/src/cmd/fm/schemes/hc/sparc/Makefile b/usr/src/cmd/fm/schemes/hc/sparc/Makefile
deleted file mode 100644
index 76b53aefdc..0000000000
--- a/usr/src/cmd/fm/schemes/hc/sparc/Makefile
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2006 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-#
-
-include ../../Makefile.com
-include ../../Makefile.targ
-
-LDLIBS += -ltopo
-LDFLAGS += -L$(ROOT)/usr/lib/fm -R/usr/lib/fm
-LINTFLAGS += -L$(ROOT)/usr/lib/fm
-
-install: all $(ROOTPROG)
diff --git a/usr/src/cmd/fm/schemes/hc/sparcv9/Makefile b/usr/src/cmd/fm/schemes/hc/sparcv9/Makefile
deleted file mode 100644
index 40f689eb05..0000000000
--- a/usr/src/cmd/fm/schemes/hc/sparcv9/Makefile
+++ /dev/null
@@ -1,37 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2006 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-#
-
-include ../../Makefile.com
-include $(SRC)/Makefile.master.64
-include ../../Makefile.targ
-
-LDLIBS += -ltopo
-LDFLAGS += -L$(ROOT)/usr/lib/fm/sparcv9 -R/usr/lib/fm/sparcv9
-LINTFLAGS += -L$(ROOT)/usr/lib/fm/sparcv9
-
-install: all $(ROOTPROG64)
diff --git a/usr/src/cmd/fm/schemes/legacy-hc/sparc/Makefile b/usr/src/cmd/fm/schemes/legacy-hc/sparc/Makefile
deleted file mode 100644
index b2953a27d9..0000000000
--- a/usr/src/cmd/fm/schemes/legacy-hc/sparc/Makefile
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2006 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-#
-
-include ../../Makefile.com
-include ../../Makefile.targ
-
-install: all $(ROOTPROG)
diff --git a/usr/src/cmd/fm/schemes/legacy-hc/sparcv9/Makefile b/usr/src/cmd/fm/schemes/legacy-hc/sparcv9/Makefile
deleted file mode 100644
index b12450b1d8..0000000000
--- a/usr/src/cmd/fm/schemes/legacy-hc/sparcv9/Makefile
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2006 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-#
-
-include ../../Makefile.com
-include $(SRC)/Makefile.master.64
-include ../../Makefile.targ
-
-install: all $(ROOTPROG64)
diff --git a/usr/src/cmd/fm/schemes/mem/sparc/Makefile b/usr/src/cmd/fm/schemes/mem/sparc/Makefile
deleted file mode 100644
index 2a74de007f..0000000000
--- a/usr/src/cmd/fm/schemes/mem/sparc/Makefile
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-include ../Makefile.com
-
-
-CPPFLAGS += -I$(ROOT)/usr/platform/sun4v/include
-LDLIBS += -L$(ROOTLIB)/fm -lfmd_agent -lmdesc -ltopo -lldom
-LDFLAGS += -R/usr/lib/fm
-
-include ../../Makefile.targ
-
-install: all $(ROOTPROG)
diff --git a/usr/src/cmd/fm/schemes/mem/sparc/mem_disc.c b/usr/src/cmd/fm/schemes/mem/sparc/mem_disc.c
deleted file mode 100644
index e3da4f48d5..0000000000
--- a/usr/src/cmd/fm/schemes/mem/sparc/mem_disc.c
+++ /dev/null
@@ -1,586 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-/*
- * DIMM unum/device map construction
- *
- * The map is constructed from PICL configuration files, which contain a map
- * between a form of the unum and the device to be used for serial number
- * retrieval. We massage the PICL unum into a form that matches the one used
- * by mem FMRIs, creating a map entry from the munged version. As described
- * below, two configuration files must be correlated to determine the correct
- * device path, and thus to build the mem_dimm_map_t list. While platforms
- * without PICL configuration files are acceptable (some platforms, like
- * Serengeti and Starcat, don't have configuration files as of this writing),
- * platforms with only one or the other aren't.
- *
- * On Sun4v platforms, we read the 'mdesc' machine description file in order
- * to obtain the mapping between dimm unum+jnum strings (which denote slot
- * names) and the serial numbers of the dimms occupying those slots.
- */
-
-#include <sys/param.h>
-#include <sys/mdesc.h>
-
-#include <mem.h>
-#include <fm/fmd_fmri.h>
-
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <strings.h>
-#include <errno.h>
-#include <time.h>
-#include <sys/mem.h>
-#include <sys/fm/ldom.h>
-
-extern ldom_hdl_t *mem_scheme_lhp;
-
-#define PICL_FRUTREE_PATH \
- "%s/usr/platform/%s/lib/picl/plugins/piclfrutree.conf"
-
-#define PICL_FRUDATA_PATH \
- "%s/usr/platform/%s/lib/picl/plugins/libpiclfrudata.conf"
-
-typedef struct mem_path_map {
- struct mem_path_map *pm_next;
- char *pm_path;
- char *pm_fullpath;
-} mem_path_map_t;
-
-typedef struct label_xlators {
- const char *lx_infmt;
- uint_t lx_matches;
- const char *lx_outfmt;
-} label_xlators_t;
-
-/*
- * PICL configuration files use a different format for the DIMM name (unum)
- * than that used in mem FMRIs. The following patterns and routine are used
- * to convert between the PICL and unum formats.
- */
-static const label_xlators_t label_xlators[] = {
- { "/system-board/mem-slot?Label=J%4d%5$n", 1,
- "J%04d" },
- { "/system-board/mem-slot?Label=DIMM%1d%5$n", 1,
- "DIMM%d" },
- { "/system-board/cpu-mem-slot?Label=%4$c/mem-slot?Label=J%1$4d%5$n", 2,
- "Slot %4$c: J%1$4d" },
- { "/MB/system-board/mem-slot?Label=DIMM%1d%5$n", 1,
- "DIMM%d" },
- { "/MB/system-board/P%1d/cpu/B%1d/bank/D%1d%5$n", 3,
- "MB/P%d/B%d/D%d" },
- { "/MB/system-board/C%1d/cpu-module/P0/cpu/B%1d/bank/D%1d%5$n", 3,
- "MB/C%d/P0/B%d/D%d" },
- { "/MB/system-board/DIMM%1d%5$n", 1,
- "MB/DIMM%d" },
- { "/C%1d/system-board/P0/cpu/B%1d/bank/D%1d%5$n", 3,
- "C%d/P0/B%d/D%d" },
- { NULL }
-};
-
-static int
-label_xlate(char *buf)
-{
- const label_xlators_t *xlator;
-
- if (strncmp(buf, "/frutree/chassis", 16) != 0)
- return (0);
-
- for (xlator = label_xlators; xlator->lx_infmt != NULL; xlator++) {
- uint_t len, a1, a2, a3;
- char a4;
-
- if (sscanf(buf + 16, xlator->lx_infmt, &a1, &a2, &a3, &a4,
- &len) == xlator->lx_matches && len == strlen(buf + 16)) {
- (void) sprintf(buf, xlator->lx_outfmt, a1, a2, a3, a4);
- return (0);
- }
- }
-
- return (fmd_fmri_set_errno(EINVAL));
-}
-
-/*
- * Match two paths taken from picl files. This is a normal component-based path
- * comparison, but for the fact that components `foo' and `foo@1,2' are assumed
- * to be equal. `foo@1,2' and `foo@3,4', however, are not assumed to be equal.
- */
-static int
-picl_path_eq(const char *p1, const char *p2)
-{
- for (;;) {
- if (*p1 == *p2) {
- if (*p1 == '\0')
- return (1);
- else {
- p1++;
- p2++;
- continue;
- }
- }
-
- if (*p1 == '@' && (*p2 == '/' || *p2 == '\0')) {
- while (*p1 != '/' && *p1 != '\0')
- p1++;
- continue;
- }
-
- if ((*p1 == '/' || *p1 == '\0') && *p2 == '@') {
- while (*p2 != '/' && *p2 != '\0')
- p2++;
- continue;
- }
-
- return (0);
- }
-}
-
-/*
- * PICL paths begin with `/platform' instead of `/devices', as they are
- * intended to reference points in the PICL tree, rather than places in the
- * device tree. Furthermore, some paths use the construct `?UnitAddress=a,b'
- * instead of `@a,b' to indicate unit number and address. This routine
- * replaces both constructs with forms more appropriate for /devices path
- * lookup.
- */
-static void
-path_depicl(char *path)
-{
- char *c;
-
- if (strncmp(path, "name:", 4) == 0)
- bcopy(path + 5, path, strlen(path + 5) + 1);
-
- for (c = path; (c = strstr(c, "?UnitAddress=")) != NULL; c++) {
- uint_t len = 0;
-
- (void) sscanf(c + 13, "%*x,%*x%n", &len);
- if (len == 0)
- continue;
-
- *c = '@';
- bcopy(c + 13, c + 1, strlen(c + 13) + 1);
- }
-}
-
-/*
- * The libpiclfrudata configuration file contains a map between the generic
- * (minor-less) device and the specific device to be used for SPD/SEEPROM
- * data access.
- *
- * Entries are of the form:
- *
- * name:/platform/generic-path
- * PROP FRUDevicePath string r 0 "full-path"
- *
- * Where `generic-path' is the path, sans minor name, to be used for DIMM
- * data access, and `full-path' is the path with the minor name.
- */
-static int
-picl_frudata_parse(char *buf, char *path, void *arg)
-{
- mem_path_map_t **mapp = arg;
- mem_path_map_t *pm = NULL;
- char fullpath[BUFSIZ];
- uint_t len;
-
- if (sscanf(buf, " PROP FRUDevicePath string r 0 \"%[^\"]\" \n%n",
- fullpath, &len) != 1 || fullpath[0] == '\0' || len != strlen(buf))
- return (0);
-
- path_depicl(path);
-
- pm = fmd_fmri_alloc(sizeof (mem_path_map_t));
- pm->pm_path = fmd_fmri_strdup(path);
- pm->pm_fullpath = fmd_fmri_strdup(fullpath);
-
- pm->pm_next = *mapp;
- *mapp = pm;
-
- return (1);
-}
-
-/*
- * The piclfrutree configuration file contains a map between a form of the
- * DIMM's unum and the generic (minor-less) device used for SPD/SEEPROM data
- * access.
- *
- * Entries are of the form:
- *
- * name:/frutree/chassis/picl-unum
- * REFNODE mem-module fru WITH /platform/generic-path
- *
- * Where `picl-unum' is the PICL form of the unum, which we'll massage into
- * the form compatible with FMRIs (see label_xlate), and `generic-path' is
- * the minor-less path into the PICL tree for the device used to access the
- * DIMM. It is this path that will be used as the key in the frudata
- * configuration file to determine the proper /devices path.
- */
-typedef struct dimm_map_arg {
- mem_path_map_t *dma_pm;
- mem_dimm_map_t *dma_dm;
-} dimm_map_arg_t;
-
-static int
-picl_frutree_parse(char *buf, char *label, void *arg)
-{
- dimm_map_arg_t *dma = arg;
- mem_dimm_map_t *dm = NULL;
- mem_path_map_t *pm;
- char path[BUFSIZ];
- uint_t len;
-
- /* LINTED - sscanf cannot exceed sizeof (path) */
- if (sscanf(buf, " REFNODE mem-module fru WITH %s \n%n",
- path, &len) != 1 || path[0] == '\0' || len != strlen(buf))
- return (0);
-
- if (label_xlate(label) < 0)
- return (-1); /* errno is set for us */
-
- path_depicl(path);
-
- for (pm = dma->dma_pm; pm != NULL; pm = pm->pm_next) {
- if (picl_path_eq(pm->pm_path, path)) {
- (void) strcpy(path, pm->pm_fullpath);
- break;
- }
- }
-
- dm = fmd_fmri_zalloc(sizeof (mem_dimm_map_t));
- dm->dm_label = fmd_fmri_strdup(label);
- dm->dm_device = fmd_fmri_strdup(path);
-
- dm->dm_next = dma->dma_dm;
- dma->dma_dm = dm;
-
- return (1);
-}
-
-/*
- * Both configuration files use the same format, thus allowing us to use the
- * same parser to process them.
- */
-static int
-picl_conf_parse(const char *pathpat, int (*func)(char *, char *, void *),
- void *arg)
-{
- char confpath[MAXPATHLEN];
- char buf[BUFSIZ], label[BUFSIZ];
- int line, len, rc;
- FILE *fp;
-
- (void) snprintf(confpath, sizeof (confpath), pathpat,
- fmd_fmri_get_rootdir(), fmd_fmri_get_platform());
-
- if ((fp = fopen(confpath, "r")) == NULL)
- return (-1); /* errno is set for us */
-
- label[0] = '\0';
- for (line = 1; fgets(buf, sizeof (buf), fp) != NULL; line++) {
- if (buf[0] == '#')
- continue;
-
- if (buf[0] == '\n') {
- label[0] = '\0';
- continue;
- }
-
- /* LINTED - label length cannot exceed length of buf */
- if (sscanf(buf, " name:%s \n%n", label, &len) == 1 &&
- label[0] != '\0' && len == strlen(buf))
- continue;
-
- if (label[0] != '\0') {
- if ((rc = func(buf, label, arg)) < 0) {
- int err = errno;
- (void) fclose(fp);
- return (fmd_fmri_set_errno(err));
- } else if (rc != 0) {
- label[0] = '\0';
- }
- }
- }
-
- (void) fclose(fp);
- return (0);
-}
-
-static void
-path_map_destroy(mem_path_map_t *pm)
-{
- mem_path_map_t *next;
-
- for (/* */; pm != NULL; pm = next) {
- next = pm->pm_next;
-
- fmd_fmri_strfree(pm->pm_path);
- fmd_fmri_strfree(pm->pm_fullpath);
- fmd_fmri_free(pm, sizeof (mem_path_map_t));
- }
-}
-
-int
-mem_discover(void)
-{
- mem_path_map_t *path_map = NULL;
- dimm_map_arg_t dma;
- int rc;
-
- if (picl_conf_parse(PICL_FRUDATA_PATH, picl_frudata_parse,
- &path_map) < 0 && errno != ENOENT)
- return (-1); /* errno is set for us */
-
- dma.dma_pm = path_map;
- dma.dma_dm = NULL;
-
- if ((rc = picl_conf_parse(PICL_FRUTREE_PATH, picl_frutree_parse,
- &dma)) < 0 && errno == ENOENT && path_map == NULL) {
- /*
- * This platform doesn't support serial number retrieval via
- * PICL mapping files. Unfortunate, but not an error.
- */
- return (0);
- }
-
- path_map_destroy(path_map);
-
- if (rc < 0)
- return (-1); /* errno is set for us */
-
- if (dma.dma_dm == NULL) {
- /*
- * This platform should support DIMM serial numbers, but we
- * weren't able to derive the paths. Return an error.
- */
- return (fmd_fmri_set_errno(EIO));
- }
-
- mem.mem_dm = dma.dma_dm;
- return (0);
-}
-
-/*
- * Retry values for handling the case where the kernel is not yet ready
- * to provide DIMM serial ids. Some platforms acquire DIMM serial id
- * information from their System Controller via a mailbox interface.
- * The values chosen are for 10 retries 3 seconds apart to approximate the
- * possible 30 second timeout length of a mailbox message request.
- */
-#define MAX_MEM_SID_RETRIES 10
-#define MEM_SID_RETRY_WAIT 3
-
-/*
- * The comparison is asymmetric. It compares up to the length of the
- * argument unum.
- */
-static mem_dimm_map_t *
-dm_lookup(const char *name)
-{
- mem_dimm_map_t *dm;
-
- for (dm = mem.mem_dm; dm != NULL; dm = dm->dm_next) {
- if (strncmp(name, dm->dm_label, strlen(name)) == 0)
- return (dm);
- }
-
- return (NULL);
-}
-
-/*
- * Returns 0 with serial numbers if found, -1 (with errno set) for errors. If
- * the unum (or a component of same) wasn't found, -1 is returned with errno
- * set to ENOENT. If the kernel doesn't have support for serial numbers,
- * -1 is returned with errno set to ENOTSUP.
- */
-static int
-mem_get_serids_from_kernel(const char *unum, char ***seridsp, size_t *nseridsp)
-{
- char **dimms, **serids;
- size_t ndimms, nserids;
- int i, rc = 0;
- int fd;
- int retries = MAX_MEM_SID_RETRIES;
- mem_name_t mn;
- struct timespec rqt;
-
- if ((fd = open("/dev/mem", O_RDONLY)) < 0)
- return (-1);
-
- if (mem_unum_burst(unum, &dimms, &ndimms) < 0) {
- (void) close(fd);
- return (-1); /* errno is set for us */
- }
-
- serids = fmd_fmri_zalloc(sizeof (char *) * ndimms);
- nserids = ndimms;
-
- bzero(&mn, sizeof (mn));
-
- for (i = 0; i < ndimms; i++) {
- mn.m_namelen = strlen(dimms[i]) + 1;
- mn.m_sidlen = MEM_SERID_MAXLEN;
-
- mn.m_name = fmd_fmri_alloc(mn.m_namelen);
- mn.m_sid = fmd_fmri_alloc(mn.m_sidlen);
-
- (void) strcpy(mn.m_name, dimms[i]);
-
- do {
- rc = ioctl(fd, MEM_SID, &mn);
-
- if (rc >= 0 || errno != EAGAIN)
- break;
-
- if (retries == 0) {
- errno = ETIMEDOUT;
- break;
- }
-
- /*
- * EAGAIN indicates the kernel is
- * not ready to provide DIMM serial
- * ids. Sleep MEM_SID_RETRY_WAIT seconds
- * and try again.
- * nanosleep() is used instead of sleep()
- * to avoid interfering with fmd timers.
- */
- rqt.tv_sec = MEM_SID_RETRY_WAIT;
- rqt.tv_nsec = 0;
- (void) nanosleep(&rqt, NULL);
-
- } while (retries--);
-
- if (rc < 0) {
- /*
- * ENXIO can happen if the kernel memory driver
- * doesn't have the MEM_SID ioctl (e.g. if the
- * kernel hasn't been patched to provide the
- * support).
- *
- * If the MEM_SID ioctl is available but the
- * particular platform doesn't support providing
- * serial ids, ENOTSUP will be returned by the ioctl.
- */
- if (errno == ENXIO)
- errno = ENOTSUP;
- fmd_fmri_free(mn.m_name, mn.m_namelen);
- fmd_fmri_free(mn.m_sid, mn.m_sidlen);
- mem_strarray_free(serids, nserids);
- mem_strarray_free(dimms, ndimms);
- (void) close(fd);
- return (-1);
- }
-
- serids[i] = fmd_fmri_strdup(mn.m_sid);
-
- fmd_fmri_free(mn.m_name, mn.m_namelen);
- fmd_fmri_free(mn.m_sid, mn.m_sidlen);
- }
-
- mem_strarray_free(dimms, ndimms);
-
- (void) close(fd);
-
- *seridsp = serids;
- *nseridsp = nserids;
-
- return (0);
-}
-
-/*
- * Returns 0 with serial numbers if found, -1 (with errno set) for errors. If
- * the unum (or a component of same) wasn't found, -1 is returned with errno
- * set to ENOENT.
- */
-static int
-mem_get_serids_from_cache(const char *unum, char ***seridsp, size_t *nseridsp)
-{
- uint64_t drgen = fmd_fmri_get_drgen();
- char **dimms, **serids;
- size_t ndimms, nserids;
- mem_dimm_map_t *dm;
- int i, rc = 0;
-
- if (mem_unum_burst(unum, &dimms, &ndimms) < 0)
- return (-1); /* errno is set for us */
-
- serids = fmd_fmri_zalloc(sizeof (char *) * ndimms);
- nserids = ndimms;
-
- for (i = 0; i < ndimms; i++) {
- if ((dm = dm_lookup(dimms[i])) == NULL) {
- rc = fmd_fmri_set_errno(EINVAL);
- break;
- }
-
- if (*dm->dm_serid == '\0' || dm->dm_drgen != drgen) {
- /*
- * We don't have a cached copy, or the copy we've got is
- * out of date. Look it up again.
- */
- if (mem_get_serid(dm->dm_device, dm->dm_serid,
- sizeof (dm->dm_serid)) < 0) {
- rc = -1; /* errno is set for us */
- break;
- }
-
- dm->dm_drgen = drgen;
- }
-
- serids[i] = fmd_fmri_strdup(dm->dm_serid);
- }
-
- mem_strarray_free(dimms, ndimms);
-
- if (rc == 0) {
- *seridsp = serids;
- *nseridsp = nserids;
- } else {
- mem_strarray_free(serids, nserids);
- }
-
- return (rc);
-}
-
-int
-mem_get_serids_by_unum(const char *unum, char ***seridsp, size_t *nseridsp)
-{
- /*
- * Some platforms do not support the caching of serial ids by the
- * mem scheme plugin but instead support making serial ids available
- * via the kernel.
- */
- if (mem.mem_dm == NULL)
- return (mem_get_serids_from_kernel(unum, seridsp, nseridsp));
- else
- return (mem_get_serids_from_cache(unum, seridsp, nseridsp));
-}
diff --git a/usr/src/cmd/fm/schemes/mem/sparcv9/Makefile b/usr/src/cmd/fm/schemes/mem/sparcv9/Makefile
deleted file mode 100644
index 5f8948eab1..0000000000
--- a/usr/src/cmd/fm/schemes/mem/sparcv9/Makefile
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-include ../Makefile.com
-include $(SRC)/Makefile.master.64
-
-CPPFLAGS += -I$(ROOT)/usr/platform/sun4v/include
-LDLIBS += -L$(ROOTLIB)/fm/$(MACH64) -lfmd_agent -lmdesc -ltopo -lldom
-LDFLAGS += -R/usr/lib/fm/$(MACH64)
-
-include ../../Makefile.targ
-
-install: all $(ROOTPROG64)
diff --git a/usr/src/cmd/fm/schemes/mod/sparc/Makefile b/usr/src/cmd/fm/schemes/mod/sparc/Makefile
deleted file mode 100644
index 71a7f04c9c..0000000000
--- a/usr/src/cmd/fm/schemes/mod/sparc/Makefile
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-#
-
-include ../../Makefile.com
-
-
-LDLIBS += \
- -L$(ROOTLIB)/fm -ltopo
-LDFLAGS += -R/usr/lib/fm
-
-include ../../Makefile.targ
-
-install: all $(ROOTPROG)
diff --git a/usr/src/cmd/fm/schemes/mod/sparcv9/Makefile b/usr/src/cmd/fm/schemes/mod/sparcv9/Makefile
deleted file mode 100644
index 2b3df05680..0000000000
--- a/usr/src/cmd/fm/schemes/mod/sparcv9/Makefile
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-#
-
-include ../../Makefile.com
-include $(SRC)/Makefile.master.64
-
-LDLIBS += \
- -L$(ROOTLIB)/fm/$(MACH64) -ltopo
-LDFLAGS += -R/usr/lib/fm/$(MACH64)
-
-include ../../Makefile.targ
-
-install: all $(ROOTPROG64)
diff --git a/usr/src/cmd/fm/schemes/pkg/sparc/Makefile b/usr/src/cmd/fm/schemes/pkg/sparc/Makefile
deleted file mode 100644
index 71a7f04c9c..0000000000
--- a/usr/src/cmd/fm/schemes/pkg/sparc/Makefile
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-#
-
-include ../../Makefile.com
-
-
-LDLIBS += \
- -L$(ROOTLIB)/fm -ltopo
-LDFLAGS += -R/usr/lib/fm
-
-include ../../Makefile.targ
-
-install: all $(ROOTPROG)
diff --git a/usr/src/cmd/fm/schemes/pkg/sparcv9/Makefile b/usr/src/cmd/fm/schemes/pkg/sparcv9/Makefile
deleted file mode 100644
index 2b3df05680..0000000000
--- a/usr/src/cmd/fm/schemes/pkg/sparcv9/Makefile
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-#
-
-include ../../Makefile.com
-include $(SRC)/Makefile.master.64
-
-LDLIBS += \
- -L$(ROOTLIB)/fm/$(MACH64) -ltopo
-LDFLAGS += -R/usr/lib/fm/$(MACH64)
-
-include ../../Makefile.targ
-
-install: all $(ROOTPROG64)
diff --git a/usr/src/cmd/fm/schemes/svc/sparc/Makefile b/usr/src/cmd/fm/schemes/svc/sparc/Makefile
deleted file mode 100644
index c416452930..0000000000
--- a/usr/src/cmd/fm/schemes/svc/sparc/Makefile
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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.
-#
-
-include ../Makefile.com
-include ../../Makefile.targ
-
-LDLIBS += -ltopo
-LDFLAGS += -L$(ROOT)/usr/lib/fm -R/usr/lib/fm
-LINTFLAGS += -L$(ROOT)/usr/lib/fm
-
-install: all $(ROOTPROG)
diff --git a/usr/src/cmd/fm/schemes/svc/sparcv9/Makefile b/usr/src/cmd/fm/schemes/svc/sparcv9/Makefile
deleted file mode 100644
index 29af6b2566..0000000000
--- a/usr/src/cmd/fm/schemes/svc/sparcv9/Makefile
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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.
-#
-
-include ../Makefile.com
-include $(SRC)/Makefile.master.64
-include ../../Makefile.targ
-
-LDLIBS += -ltopo
-LDFLAGS += -L$(ROOT)/usr/lib/fm/$(MACH64) -R/usr/lib/fm/$(MACH64)
-LINTFLAGS += -L$(ROOT)/usr/lib/fm/$(MACH64)
-
-install: all $(ROOTPROG64)
diff --git a/usr/src/cmd/fm/schemes/sw/sparc/Makefile b/usr/src/cmd/fm/schemes/sw/sparc/Makefile
deleted file mode 100644
index b85ad39b94..0000000000
--- a/usr/src/cmd/fm/schemes/sw/sparc/Makefile
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 (c) 2010, Oracle and/or its affiliates. All rights reserved.
-#
-
-include ../Makefile.com
-include ../../Makefile.targ
-
-LDLIBS += -ltopo
-LDFLAGS += -L$(ROOT)/usr/lib/fm -R/usr/lib/fm
-LINTFLAGS += -L$(ROOT)/usr/lib/fm
-
-install: all $(ROOTPROG)
diff --git a/usr/src/cmd/fm/schemes/sw/sparcv9/Makefile b/usr/src/cmd/fm/schemes/sw/sparcv9/Makefile
deleted file mode 100644
index eeb5380cf2..0000000000
--- a/usr/src/cmd/fm/schemes/sw/sparcv9/Makefile
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 (c) 2010, Oracle and/or its affiliates. All rights reserved.
-#
-
-include ../Makefile.com
-include $(SRC)/Makefile.master.64
-include ../../Makefile.targ
-
-LDLIBS += -ltopo
-LDFLAGS += -L$(ROOT)/usr/lib/fm/$(MACH64) -R/usr/lib/fm/$(MACH64)
-LINTFLAGS += -L$(ROOT)/usr/lib/fm/$(MACH64)
-
-install: all $(ROOTPROG64)
diff --git a/usr/src/cmd/fm/schemes/zfs/sparc/Makefile b/usr/src/cmd/fm/schemes/zfs/sparc/Makefile
deleted file mode 100644
index 11a1534892..0000000000
--- a/usr/src/cmd/fm/schemes/zfs/sparc/Makefile
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2006 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-include ../../Makefile.com
-include ../../Makefile.targ
-
-LDLIBS += -lzfs
-
-install: all $(ROOTPROG)
diff --git a/usr/src/cmd/fm/schemes/zfs/sparcv9/Makefile b/usr/src/cmd/fm/schemes/zfs/sparcv9/Makefile
deleted file mode 100644
index b3e2565271..0000000000
--- a/usr/src/cmd/fm/schemes/zfs/sparcv9/Makefile
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2006 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-include ../../Makefile.com
-include $(SRC)/Makefile.master.64
-include ../../Makefile.targ
-
-LDLIBS += -lzfs
-
-install: all $(ROOTPROG64)
diff --git a/usr/src/lib/fm/Makefile b/usr/src/lib/fm/Makefile
index d0bcbfe8c9..c46590e21d 100644
--- a/usr/src/lib/fm/Makefile
+++ b/usr/src/lib/fm/Makefile
@@ -21,11 +21,12 @@
#
# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2022 Garrett D'Amore
#
include ../Makefile.lib
-common_SUBDIRS = \
+SUBDIRS = \
libfmd_agent \
libdiagcode \
libdiskstatus \
@@ -39,18 +40,8 @@ common_SUBDIRS = \
libfmnotify \
topo
-sparc_SUBDIRS = \
- libmdesc \
- libldom
-
-i386_SUBDIRS =
-
-SUBDIRS = $(common_SUBDIRS) $($(MACH)_SUBDIRS)
-
-libldom: libmdesc libfmd_agent
-
libfmd_snmp: libfmd_adm topo
-topo: $($(MACH)_SUBDIRS) libfmd_agent libdiskstatus
+topo: libfmd_agent libdiskstatus
include ./Makefile.subdirs
diff --git a/usr/src/lib/fm/libdiagcode/sparc/Makefile b/usr/src/lib/fm/libdiagcode/sparc/Makefile
deleted file mode 100644
index 5da8e64ac5..0000000000
--- a/usr/src/lib/fm/libdiagcode/sparc/Makefile
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2004 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-include ../Makefile.com
-
-all: $(LIBS)
-
-install: all $(ROOTLIBS) $(ROOTLINKS)
diff --git a/usr/src/lib/fm/libdiagcode/sparcv9/Makefile b/usr/src/lib/fm/libdiagcode/sparcv9/Makefile
deleted file mode 100644
index 857d6be59c..0000000000
--- a/usr/src/lib/fm/libdiagcode/sparcv9/Makefile
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2004 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-include ../Makefile.com
-include ../../../Makefile.lib.64
-
-all: $(LIBS)
-
-install: all $(ROOTLIBS64) $(ROOTLINKS64)
diff --git a/usr/src/lib/fm/libdiskstatus/sparc/Makefile b/usr/src/lib/fm/libdiskstatus/sparc/Makefile
deleted file mode 100644
index 2845cd3c2d..0000000000
--- a/usr/src/lib/fm/libdiskstatus/sparc/Makefile
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2007 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-include ../Makefile.com
-
-install: all $(ROOTLIBS) $(ROOTLINKS)
diff --git a/usr/src/lib/fm/libdiskstatus/sparcv9/Makefile b/usr/src/lib/fm/libdiskstatus/sparcv9/Makefile
deleted file mode 100644
index 5375e35120..0000000000
--- a/usr/src/lib/fm/libdiskstatus/sparcv9/Makefile
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2007 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-include ../Makefile.com
-include ../../../Makefile.lib.64
-
-install: all $(ROOTLIBS64) $(ROOTLINKS64)
diff --git a/usr/src/lib/fm/libfmd_adm/sparc/Makefile b/usr/src/lib/fm/libfmd_adm/sparc/Makefile
deleted file mode 100644
index 282da97a76..0000000000
--- a/usr/src/lib/fm/libfmd_adm/sparc/Makefile
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2006 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-include ../Makefile.com
-
-install: all $(ROOTLIBS) $(ROOTLINKS)
diff --git a/usr/src/lib/fm/libfmd_adm/sparcv9/Makefile b/usr/src/lib/fm/libfmd_adm/sparcv9/Makefile
deleted file mode 100644
index 9ebd5174c4..0000000000
--- a/usr/src/lib/fm/libfmd_adm/sparcv9/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2006 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-include ../Makefile.com
-include ../../../Makefile.lib.64
-
-install: all $(ROOTLIBS64) $(ROOTLINKS64)
diff --git a/usr/src/lib/fm/libfmd_agent/sparc/Makefile b/usr/src/lib/fm/libfmd_agent/sparc/Makefile
deleted file mode 100644
index 09efe516c2..0000000000
--- a/usr/src/lib/fm/libfmd_agent/sparc/Makefile
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
-#
-
-include ../Makefile.com
-
-install: all $(ROOTLIBS) $(ROOTLINKS)
diff --git a/usr/src/lib/fm/libfmd_agent/sparc/fmd_agent_sparc.c b/usr/src/lib/fm/libfmd_agent/sparc/fmd_agent_sparc.c
deleted file mode 100644
index bd5b3fc1f0..0000000000
--- a/usr/src/lib/fm/libfmd_agent/sparc/fmd_agent_sparc.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#include <stdlib.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <libnvpair.h>
-#include <sys/devfm.h>
-#include <fmd_agent_impl.h>
diff --git a/usr/src/lib/fm/libfmd_agent/sparcv9/Makefile b/usr/src/lib/fm/libfmd_agent/sparcv9/Makefile
deleted file mode 100644
index c3c9b36567..0000000000
--- a/usr/src/lib/fm/libfmd_agent/sparcv9/Makefile
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
-#
-
-include ../Makefile.com
-include ../../../Makefile.lib.64
-
-install: all $(ROOTLIBS64) $(ROOTLINKS64)
diff --git a/usr/src/lib/fm/libfmd_log/sparc/Makefile b/usr/src/lib/fm/libfmd_log/sparc/Makefile
deleted file mode 100644
index 282da97a76..0000000000
--- a/usr/src/lib/fm/libfmd_log/sparc/Makefile
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2006 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-include ../Makefile.com
-
-install: all $(ROOTLIBS) $(ROOTLINKS)
diff --git a/usr/src/lib/fm/libfmd_log/sparcv9/Makefile b/usr/src/lib/fm/libfmd_log/sparcv9/Makefile
deleted file mode 100644
index 9ebd5174c4..0000000000
--- a/usr/src/lib/fm/libfmd_log/sparcv9/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2006 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-include ../Makefile.com
-include ../../../Makefile.lib.64
-
-install: all $(ROOTLIBS64) $(ROOTLINKS64)
diff --git a/usr/src/lib/fm/libfmd_msg/sparc/Makefile b/usr/src/lib/fm/libfmd_msg/sparc/Makefile
deleted file mode 100644
index 2845cd3c2d..0000000000
--- a/usr/src/lib/fm/libfmd_msg/sparc/Makefile
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2007 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-include ../Makefile.com
-
-install: all $(ROOTLIBS) $(ROOTLINKS)
diff --git a/usr/src/lib/fm/libfmd_msg/sparcv9/Makefile b/usr/src/lib/fm/libfmd_msg/sparcv9/Makefile
deleted file mode 100644
index 5cf65c4171..0000000000
--- a/usr/src/lib/fm/libfmd_msg/sparcv9/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2007 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-include ../Makefile.com
-include ../../../Makefile.lib.64
-
-install: all $(ROOTLIBS64) $(ROOTLINKS64)
diff --git a/usr/src/lib/fm/libfmd_snmp/sparc/Makefile b/usr/src/lib/fm/libfmd_snmp/sparc/Makefile
deleted file mode 100644
index bcf3356f62..0000000000
--- a/usr/src/lib/fm/libfmd_snmp/sparc/Makefile
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2006 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-MACH_LDLIBS = -L$(ROOT)/usr/lib/fm
-
-include ../Makefile.com
-
-DYNFLAGS += -R/usr/lib/fm
-
-install: all $(ROOTLIBS) $(ROOTLINKS)
diff --git a/usr/src/lib/fm/libfmd_snmp/sparcv9/Makefile b/usr/src/lib/fm/libfmd_snmp/sparcv9/Makefile
deleted file mode 100644
index 9cdb9ed123..0000000000
--- a/usr/src/lib/fm/libfmd_snmp/sparcv9/Makefile
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2006 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-MACH_LDLIBS = -L$(ROOT)/usr/lib/fm/$(MACH64)
-
-include ../Makefile.com
-include ../../../Makefile.lib.64
-
-DYNFLAGS += -R/usr/lib/fm/$(MACH64)
-
-install: all $(ROOTLIBS64) $(ROOTLINKS64)
diff --git a/usr/src/lib/fm/libfmevent/sparc/Makefile b/usr/src/lib/fm/libfmevent/sparc/Makefile
deleted file mode 100644
index 36ac38389b..0000000000
--- a/usr/src/lib/fm/libfmevent/sparc/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
-#
-
-include ../Makefile.com
-
-DYNFLAGS += -R/usr/lib/fm
-
-install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTCOMPATLINKS)
diff --git a/usr/src/lib/fm/libfmevent/sparcv9/Makefile b/usr/src/lib/fm/libfmevent/sparcv9/Makefile
deleted file mode 100644
index e3196f9733..0000000000
--- a/usr/src/lib/fm/libfmevent/sparcv9/Makefile
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
-#
-
-include ../Makefile.com
-include ../../../Makefile.lib.64
-
-DYNFLAGS += -R/usr/lib/fm/$(MACH64)
-
-install: all $(ROOTLIBS64) $(ROOTLINKS64) $(ROOTCOMPATLINKS64)
diff --git a/usr/src/lib/fm/libfmnotify/sparc/Makefile b/usr/src/lib/fm/libfmnotify/sparc/Makefile
deleted file mode 100644
index e2c5373839..0000000000
--- a/usr/src/lib/fm/libfmnotify/sparc/Makefile
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 (c) 2010, Oracle and/or its affiliates. All rights reserved.
-#
-
-include ../Makefile.com
-
-install: all $(ROOTLIBS) $(ROOTLINKS)
-
-MACH_LDLIBS = -L$(ROOT)/usr/lib/fm
-
-DYNFLAGS += -R/usr/lib/fm
diff --git a/usr/src/lib/fm/libfmnotify/sparcv9/Makefile b/usr/src/lib/fm/libfmnotify/sparcv9/Makefile
deleted file mode 100644
index b2435f5f59..0000000000
--- a/usr/src/lib/fm/libfmnotify/sparcv9/Makefile
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 (c) 2010, Oracle and/or its affiliates. All rights reserved.
-#
-
-MACH_LDLIBS = -L$(ROOT)/usr/lib/fm/$(MACH64)
-
-include ../Makefile.com
-include ../../../Makefile.lib.64
-
-DYNFLAGS += -R/usr/lib/fm/$(MACH64)
-
-install: all $(ROOTLIBS64) $(ROOTLINKS64)
diff --git a/usr/src/lib/fm/libldom/Makefile b/usr/src/lib/fm/libldom/Makefile
deleted file mode 100644
index 36a5ff1dce..0000000000
--- a/usr/src/lib/fm/libldom/Makefile
+++ /dev/null
@@ -1,63 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-include ../../Makefile.lib
-include ../Makefile.lib
-
-FMHDRS = ldom.h
-HDRDIR = sparc
-
-ROOTFMHDRDIR = $(ROOT)/usr/platform/sun4v/include/sys/fm
-
-SUBDIRS = $(MACH)
-$(BUILD64)SUBDIRS += $(MACH64)
-
-all := TARGET = all
-clean := TARGET = clean
-clobber := TARGET = clobber
-install := TARGET = install
-
-.KEEP_STATE:
-
-all clean clobber: $(SUBDIRS)
-
-install: install_h .WAIT $(SUBDIRS)
-
-install_h: $(ROOTFMHDRS)
-
-$(ROOTFMHDRS): $(ROOTFMHDRDIR)
-
-$(ROOTFMHDRDIR)/%: $(HDRDIR)/%
- $(INS.file)
-
-check: $(CHECKHDRS)
-
-$(SUBDIRS): FRC
- @cd $@; pwd; $(MAKE) $(TARGET)
-
-FRC:
-
-include ../../Makefile.targ
-include ../Makefile.targ
diff --git a/usr/src/lib/fm/libldom/Makefile.com b/usr/src/lib/fm/libldom/Makefile.com
deleted file mode 100644
index 49e9ad5a41..0000000000
--- a/usr/src/lib/fm/libldom/Makefile.com
+++ /dev/null
@@ -1,61 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2010 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-LIBRARY = libldom.a
-VERS = .1
-
-LIBSRCS = ldom.c ldom_alloc.c ldmsvcs_utils.c ldom_xmpp_client.c ldom_utils.c
-OBJECTS = $(LIBSRCS:%.c=%.o)
-
-include ../../../Makefile.lib
-include ../../Makefile.lib
-
-SRCS = $(LIBSRCS:%.c=../sparc/%.c)
-SRCDIR = ../sparc
-
-LIBS = $(DYNLIB)
-
-CPPFLAGS += -I. -I$(SRC)/uts/sun4v -I$(ROOT)/usr/platform/sun4v/include \
- -I$(ADJUNCT_PROTO)/usr/include/libxml2
-CFLAGS += $(CCVERBOSE) $(C_BIGPICFLAGS)
-CFLAGS64 += $(CCVERBOSE) $(C_BIGPICFLAGS)
-
-CERRWARN += -_gcc=-Wno-parentheses
-
-LDLIBS += $(MACH_LDLIBS)
-LDLIBS += -lfmd_agent -lnvpair -lscf -lmdesc -lc -lxml2
-LDLIBS += -lsocket -lumem
-NATIVE_LIBS += libxml2.so
-
-.KEEP_STATE:
-
-all: $(LIBS)
-
-pics/%.o: ../$(MACH)/%.c
- $(COMPILE.c) -o $@ $<
- $(POST_PROCESS_O)
-
-include ../../../Makefile.targ
-include ../../Makefile.targ
diff --git a/usr/src/lib/fm/libldom/sparc/Makefile b/usr/src/lib/fm/libldom/sparc/Makefile
deleted file mode 100644
index 1f81c94cba..0000000000
--- a/usr/src/lib/fm/libldom/sparc/Makefile
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-MACH_LDLIBS = -L$(ROOT)/usr/lib/fm
-
-include ../Makefile.com
-
-DYNFLAGS += -R/usr/lib/fm
-
-install: all $(ROOTLIBS) $(ROOTLINKS)
diff --git a/usr/src/lib/fm/libldom/sparc/ldmsvcs_utils.c b/usr/src/lib/fm/libldom/sparc/ldmsvcs_utils.c
deleted file mode 100644
index be9e78cc3e..0000000000
--- a/usr/src/lib/fm/libldom/sparc/ldmsvcs_utils.c
+++ /dev/null
@@ -1,1747 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
- */
-
-#include <stdlib.h>
-#include <stdio.h>
-
-#include <strings.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <time.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <assert.h>
-#include <umem.h>
-#include <alloca.h>
-#include <sys/processor.h>
-#include <poll.h>
-#include <pthread.h>
-#include <signal.h>
-#include <values.h>
-#include <libscf.h>
-
-#include <ctype.h>
-
-#include "ldmsvcs_utils.h"
-#include "ldom_alloc.h"
-#include "ldom_utils.h"
-
-#define ASSERT(cnd) \
- ((void) ((cnd) || ((void) fprintf(stderr, \
- "assertion failure in %s:%d: %s\n", \
- __FILE__, __LINE__, #cnd), 0)))
-
-#define FDS_VLDC \
- "/devices/virtual-devices@100/channel-devices@200/" \
- "/virtual-channel-client@1:ldmfma"
-
-/* allow timeouts in sec that are nearly forever but small enough for an int */
-#define LDM_TIMEOUT_CEILING (MAXINT / 2)
-
-#define MIN(x, y) ((x) < (y) ? (x) : (y))
-
-/*
- * functions in this file are for version 1.0 of FMA domain services
- */
-static ds_ver_t ds_vers[] = {
- { 1, 0 }
-};
-
-#define DS_NUM_VER (sizeof (ds_vers) / sizeof (ds_ver_t))
-
-/*
- * information for each channel
- */
-struct ldmsvcs_info {
- pthread_mutex_t mt;
- pthread_cond_t cv;
- fds_channel_t fds_chan;
- fds_reg_svcs_t fmas_svcs;
- int cv_twait;
-};
-
-/*
- * struct listdata_s and struct poller_s are used to maintain the state of
- * the poller thread. this thread is used to manage incoming messages and
- * pass those messages onto the correct requesting thread. see the "poller
- * functions" section for more details.
- */
-struct listdata_s {
- enum {
- UNUSED,
- PENDING,
- ARRIVED
- } status;
- uint64_t req_num;
- int fd;
- size_t datalen;
-};
-
-static struct poller_s {
- pthread_mutex_t mt;
- pthread_cond_t cv;
- pthread_t polling_tid;
- int notify_pipe[2];
- int doreset;
- int doexit;
- int nclients;
- struct listdata_s **list;
- int list_len;
- int pending_count;
-} pollbase = {
- PTHREAD_MUTEX_INITIALIZER,
- PTHREAD_COND_INITIALIZER,
- 0,
- {-1, -1},
- 1,
- 0,
- 0,
- NULL,
- 0,
- 0
-};
-
-
-static struct ldmsvcs_info *channel_init(struct ldom_hdl *lhp);
-static int channel_openreset(struct ldmsvcs_info *lsp);
-static int read_msg(struct ldmsvcs_info *lsp);
-
-static int
-get_smf_int_val(char *prop_nm, int min, int max, int default_val)
-{
- scf_simple_prop_t *prop; /* SMF property */
- int64_t *valp; /* prop value ptr */
- int64_t val; /* prop value to return */
-
- val = default_val;
- if ((prop = scf_simple_prop_get(NULL, LDM_SVC_NM, LDM_PROP_GROUP_NM,
- prop_nm)) != NULL) {
- if ((valp = scf_simple_prop_next_integer(prop)) != NULL) {
- val = *valp;
- if (val < min)
- val = min;
- else if (val > max)
- val = max;
- }
- scf_simple_prop_free(prop);
- }
- return ((int)val);
-}
-
-static void
-channel_close(struct ldmsvcs_info *lsp)
-{
- (void) pthread_mutex_lock(&lsp->mt);
-
- if (lsp->fds_chan.state == CHANNEL_OPEN ||
- lsp->fds_chan.state == CHANNEL_READY) {
- (void) close(lsp->fds_chan.fd);
- lsp->cv_twait = get_smf_int_val(LDM_INIT_TO_PROP_NM,
- 0, LDM_TIMEOUT_CEILING, LDM_INIT_WAIT_TIME);
- lsp->fds_chan.state = CHANNEL_CLOSED;
- }
-
- (void) pthread_mutex_unlock(&lsp->mt);
-}
-
-/*
- * read size bytes of data from a streaming fd into buf
- */
-static int
-read_stream(int fd, void *buf, size_t size)
-{
- pollfd_t pollfd;
- ssize_t rv;
- size_t data_left;
- ptrdiff_t currentp;
-
- pollfd.events = POLLIN;
- pollfd.revents = 0;
- pollfd.fd = fd;
-
- currentp = (ptrdiff_t)buf;
- data_left = size;
-
- /*
- * data may come in bits and pieces
- */
- do {
- if ((rv = read(fd, (void *)currentp, data_left)) < 0) {
- if (errno == EAGAIN && poll(&pollfd, 1, 3000) > 0)
- continue; /* retry */
- else
- return (1);
- }
-
- data_left -= rv;
- currentp += rv;
- } while (data_left > 0);
-
- return (0);
-}
-
-
-/*
- * poller functions
- *
- * at init time, a thread is created for the purpose of monitoring incoming
- * messages and doing one of the following:
- *
- * 1. doing the initial handshake and version negotiation
- *
- * 2. handing incoming data off to the requesting thread (which is an fmd
- * module or scheme thread)
- */
-static int
-poller_handle_data(int fd, size_t payloadsize)
-{
- uint64_t *req_num;
- void *pr;
- size_t prlen;
- int i;
-
- prlen = sizeof (ds_data_handle_t) + sizeof (uint64_t);
-
- if (payloadsize < prlen)
- return (1);
-
- pr = alloca(prlen);
-
- if (read_stream(fd, pr, prlen) != 0)
- return (1);
-
- req_num = (uint64_t *)((ptrdiff_t)pr + sizeof (ds_data_handle_t));
-
- (void) pthread_mutex_lock(&pollbase.mt);
-
- for (i = 0; i < pollbase.list_len; i++) {
- if (pollbase.list[i]->req_num == *req_num) {
- ASSERT(pollbase.list[i]->status == PENDING);
-
- pollbase.list[i]->status = ARRIVED;
- pollbase.list[i]->fd = fd;
- pollbase.list[i]->datalen = payloadsize - prlen;
-
- pollbase.pending_count--;
- (void) pthread_cond_broadcast(&pollbase.cv);
- break;
- }
- }
-
- /*
- * now wait for receiving thread to read in the data
- */
- if (i < pollbase.list_len) {
- while (pollbase.list[i]->status == ARRIVED)
- (void) pthread_cond_wait(&pollbase.cv, &pollbase.mt);
- }
-
- (void) pthread_mutex_unlock(&pollbase.mt);
-
- return (0);
-}
-
-
-/*
- * note that this function is meant to handle only DS_DATA messages
- */
-static int
-poller_recv_data(struct ldom_hdl *lhp, uint64_t req_num, int index,
- void **resp, size_t *resplen)
-{
- struct timespec twait;
- int ier;
-
- ier = 0;
- twait.tv_sec = time(NULL) + lhp->lsinfo->cv_twait;
- twait.tv_nsec = 0;
-
- (void) pthread_mutex_lock(&pollbase.mt);
-
- ASSERT(pollbase.list[index]->req_num == req_num);
-
- while (pollbase.list[index]->status == PENDING &&
- pollbase.doreset == 0 && ier == 0)
- ier = pthread_cond_timedwait(&pollbase.cv, &pollbase.mt,
- &twait);
-
- if (ier == 0) {
- if (pollbase.doreset == 0) {
- ASSERT(pollbase.list[index]->status == ARRIVED);
-
- /*
- * need to add req_num to beginning of resp
- */
- *resplen = pollbase.list[index]->datalen +
- sizeof (uint64_t);
- *resp = lhp->allocp(*resplen);
- *((uint64_t *)*resp) = req_num;
-
- if (read_stream(pollbase.list[index]->fd,
- (void *)((ptrdiff_t)*resp + sizeof (uint64_t)),
- *resplen - sizeof (uint64_t)) != 0)
- ier = ETIMEDOUT;
-
- pollbase.list[index]->status = UNUSED;
- pollbase.list[index]->req_num = 0;
- (void) pthread_cond_broadcast(&pollbase.cv);
- } else {
- if (--(pollbase.pending_count) == 0)
- (void) pthread_cond_broadcast(&pollbase.cv);
- }
- }
-
- (void) pthread_mutex_unlock(&pollbase.mt);
-
- ASSERT(ier == 0 || ier == ETIMEDOUT);
-
- return (ier);
-}
-
-
-static void
-poller_add_client(void)
-{
- (void) pthread_mutex_lock(&pollbase.mt);
- pollbase.nclients++;
- (void) pthread_mutex_unlock(&pollbase.mt);
-}
-
-
-static void
-poller_remove_client(void)
-{
- (void) pthread_mutex_lock(&pollbase.mt);
- pollbase.nclients--;
- ASSERT(pollbase.nclients >= 0);
- (void) pthread_mutex_unlock(&pollbase.mt);
-}
-
-
-static int
-poller_add_pending(uint64_t req_num)
-{
- int newlen, index, i, j;
-
- (void) pthread_mutex_lock(&pollbase.mt);
- pollbase.pending_count++;
-
- for (j = 0, index = -1; j < 2 && index == -1; j++) {
- for (i = 0; i < pollbase.list_len; i++) {
- if (pollbase.list[i]->status == UNUSED) {
- pollbase.list[i]->status = PENDING;
- pollbase.list[i]->req_num = req_num;
- pollbase.list[i]->datalen = 0;
- index = i;
- break;
- }
- }
-
- if (index == -1) {
- struct listdata_s **newlist, **oldlist;
-
- /*
- * get to this point if list is not long enough.
- * check for a runaway list. since requests are
- * synchronous (clients send a request and need to
- * wait for the result before returning) the size
- * of the list cannot be much more than the number
- * of clients.
- */
- ASSERT(pollbase.list_len < pollbase.nclients + 1);
-
- newlen = pollbase.list_len + 5;
- newlist = ldom_alloc(newlen *
- sizeof (struct listdata_s *));
-
- for (i = 0; i < pollbase.list_len; i++)
- newlist[i] = pollbase.list[i];
-
- oldlist = pollbase.list;
- pollbase.list = newlist;
- ldom_free(oldlist, pollbase.list_len *
- sizeof (struct listdata_s *));
-
- for (i = pollbase.list_len; i < newlen; i++) {
- pollbase.list[i] =
- ldom_alloc(sizeof (struct listdata_s));
- pollbase.list[i]->status = UNUSED;
- }
-
- pollbase.list_len = newlen;
- }
- }
-
- (void) pthread_mutex_unlock(&pollbase.mt);
- ASSERT(index != -1);
-
- return (index);
-}
-
-
-static void
-poller_delete_pending(uint64_t req_num, int index)
-{
- (void) pthread_mutex_lock(&pollbase.mt);
-
- ASSERT(pollbase.list[index]->req_num == req_num);
- pollbase.list[index]->status = UNUSED;
-
- if (--(pollbase.pending_count) == 0 && pollbase.doreset == 1)
- (void) pthread_cond_broadcast(&pollbase.cv);
-
- (void) pthread_mutex_unlock(&pollbase.mt);
-}
-
-
-static void
-poller_shutdown(boolean_t wait)
-{
- (void) pthread_mutex_lock(&pollbase.mt);
-
- pollbase.doexit = 1;
-
- (void) pthread_mutex_unlock(&pollbase.mt);
-
- if (wait == B_TRUE) {
- /*
- * Write a byte to the pipe to notify the poller thread to exit.
- * Then wait for it to exit.
- */
- (void) write(pollbase.notify_pipe[0], "1", 1);
- (void) pthread_join(pollbase.polling_tid, NULL);
- }
-}
-
-
-/*
- * perform the polling of incoming messages. manage any resets (usually
- * due to one end of the connection being closed) as well as exit
- * conditions.
- */
-static void *
-poller_loop(void *arg)
-{
- struct ldmsvcs_info *lsp;
- pollfd_t pollfd[2];
- struct pollfd *pipe_fd = &pollfd[0];
- struct pollfd *recv_fd = &pollfd[1];
- int ier;
-
- lsp = (struct ldmsvcs_info *)arg;
-
- for (;;) {
- (void) pthread_mutex_lock(&pollbase.mt);
-
- if (pollbase.doexit) {
- (void) pthread_mutex_unlock(&pollbase.mt);
- break;
- }
-
- if (pollbase.doreset) {
- int i;
-
- while (pollbase.pending_count > 0)
- (void) pthread_cond_wait(&pollbase.cv,
- &pollbase.mt);
-
- ASSERT(pollbase.pending_count == 0);
- for (i = 0; i < pollbase.list_len; i++)
- pollbase.list[i]->status = UNUSED;
-
- pollbase.doreset = 0;
- }
-
- (void) pthread_mutex_unlock(&pollbase.mt);
-
- if ((ier = channel_openreset(lsp)) == 1) {
- continue;
- } else if (ier == 2) {
- /*
- * start exit preparations
- */
- poller_shutdown(B_FALSE);
- continue;
- }
-
- pipe_fd->fd = pollbase.notify_pipe[1]; /* notification pipe */
- pipe_fd->events = POLLIN;
- pipe_fd->revents = 0;
- recv_fd->fd = lsp->fds_chan.fd; /* FMA LDC */
- recv_fd->events = POLLIN;
- recv_fd->revents = 0;
-
- if (poll(pollfd, 2, -1) <= 0) {
- /* fd got closed */
- (void) pthread_mutex_lock(&pollbase.mt);
- pollbase.doreset = 1;
- (void) pthread_mutex_unlock(&pollbase.mt);
- channel_close(lsp);
- } else if (pipe_fd->revents & POLLIN) {
- /* Receive a notification to exit */
- channel_close(lsp);
- pthread_exit((void *)NULL);
- } else if (read_msg(lsp) != 0) {
- /* fail to read a message from the LDOM manager */
- (void) pthread_mutex_lock(&pollbase.mt);
- pollbase.doreset = 1;
- (void) pthread_mutex_unlock(&pollbase.mt);
- channel_close(lsp);
- }
- }
-
- return (NULL);
-}
-
-
-/*
- * create the polling thread
- */
-static int
-poller_init(struct ldmsvcs_info *lsp)
-{
- int rc = 0;
-
- (void) pthread_mutex_lock(&pollbase.mt);
-
- if (pollbase.polling_tid == 0) {
- pthread_attr_t *attr = NULL;
-
- /*
- * create a joinable polling thread for receiving messages
- * The notify pipe is for stopping the thread
- */
- (void) notify_setup(pollbase.notify_pipe);
- if (pthread_create(&pollbase.polling_tid, attr,
- poller_loop, lsp) != 0)
- rc = 1;
- }
-
- (void) pthread_mutex_unlock(&pollbase.mt);
-
- return (rc);
-}
-
-/*
- * Cleanup the polling thread
- */
-static void
-poller_fini(void)
-{
- int i;
-
- /* stop the poller thread */
- poller_shutdown(B_TRUE);
-
- (void) pthread_mutex_lock(&pollbase.mt);
-
- /* Free up the list of outstanding requests */
- if (pollbase.list != NULL) {
- for (i = 0; i < pollbase.list_len; i++) {
- if (pollbase.list[i]) {
- ldom_free(pollbase.list[i],
- sizeof (struct listdata_s));
- }
- }
- ldom_free(pollbase.list, pollbase.list_len *
- sizeof (struct listdata_s *));
- pollbase.list = NULL;
- pollbase.list_len = 0;
- }
-
- (void) pthread_mutex_unlock(&pollbase.mt);
-}
-
-/*
- * utilities for message handlers
- */
-static int
-fds_send(struct ldmsvcs_info *lsp, void *msg, size_t msglen)
-{
- static pthread_mutex_t mt = PTHREAD_MUTEX_INITIALIZER;
-
- (void) pthread_mutex_lock(&mt);
-
- if (write(lsp->fds_chan.fd, msg, msglen) != msglen) {
- channel_close(lsp);
- (void) pthread_mutex_unlock(&mt);
- return (ETIMEDOUT);
- }
-
- (void) pthread_mutex_unlock(&mt);
- return (0);
-}
-
-
-/*
- * Find the max and min version supported
- */
-static void
-fds_min_max_versions(uint16_t *min_major, uint16_t *max_major)
-{
- int i;
-
- *min_major = ds_vers[0].major;
- *max_major = *min_major;
-
- for (i = 1; i < DS_NUM_VER; i++) {
- if (ds_vers[i].major < *min_major)
- *min_major = ds_vers[i].major;
-
- if (ds_vers[i].major > *max_major)
- *max_major = ds_vers[i].major;
- }
-}
-
-/*
- * check whether the major and minor numbers requested by remote ds client
- * can be satisfied. if the requested major is supported, true is
- * returned, and the agreed minor is returned in new_minor. if the
- * requested major is not supported, the routine returns false, and the
- * closest major is returned in *new_major, upon which the ds client should
- * renegotiate. the closest major is the just lower that the requested
- * major number.
- */
-static boolean_t
-fds_negotiate_version(uint16_t req_major, uint16_t *new_majorp,
- uint16_t *new_minorp)
-{
- int i = 0;
- uint16_t major, lower_major;
- uint16_t min_major, max_major;
- boolean_t found_match = B_FALSE;
-
- fds_min_max_versions(&min_major, &max_major);
-
- /*
- * if the minimum version supported is greater than the version
- * requested, return the lowest version supported
- */
- if (min_major > req_major) {
- *new_majorp = min_major;
- return (B_FALSE);
- }
-
- /*
- * if the largest version supported is lower than the version
- * requested, return the largest version supported
- */
- if (max_major < req_major) {
- *new_majorp = max_major;
- return (B_FALSE);
- }
-
- /*
- * now we know that the requested version lies between the min and
- * max versions supported. check if the requested major can be
- * found in supported versions.
- */
- lower_major = min_major;
- for (i = 0; i < DS_NUM_VER; i++) {
- major = ds_vers[i].major;
- if (major == req_major) {
- found_match = B_TRUE;
- *new_minorp = ds_vers[i].minor;
- *new_majorp = major;
- break;
- } else if ((major < req_major) && (major > lower_major))
- lower_major = major;
- }
-
- /*
- * If no match is found, return the closest available number
- */
- if (!found_match)
- *new_majorp = lower_major;
-
- return (found_match);
-}
-
-
-/*
- * return 0 if service is added; 1 if service is a duplicate
- */
-static int
-fds_svc_add(struct ldmsvcs_info *lsp, ds_reg_req_t *req, int minor)
-{
- fds_svc_t *svc;
- int i, rc;
-
- svc = NULL;
- for (i = 0; i < lsp->fmas_svcs.nsvcs; i++) {
- if (strcmp(lsp->fmas_svcs.tbl[i]->name, req->svc_id) == 0) {
- svc = lsp->fmas_svcs.tbl[i];
- break;
- }
- }
-
- if (svc == NULL)
- return (0); /* we don't need this service */
-
- (void) pthread_mutex_lock(&lsp->fmas_svcs.mt);
-
- /*
- * duplicate registration is OK --- we retain the previous entry
- * (which has not been unregistered anyway)
- */
- if (svc->state == DS_SVC_ACTIVE) {
- rc = 1;
- } else {
- svc->state = DS_SVC_ACTIVE;
- svc->hdl = req->svc_handle;
- svc->ver.major = req->major_vers;
- svc->ver.minor = minor;
-
- rc = 0;
- (void) pthread_cond_broadcast(&lsp->fmas_svcs.cv);
- }
-
- (void) pthread_mutex_unlock(&lsp->fmas_svcs.mt);
-
- return (rc);
-}
-
-
-static void
-fds_svc_reset(struct ldmsvcs_info *lsp, int index)
-{
- int i, start, end;
-
- if (index >= 0) {
- start = index;
- end = index + 1;
- } else {
- start = 0;
- end = lsp->fmas_svcs.nsvcs;
- }
-
- (void) pthread_mutex_lock(&lsp->fmas_svcs.mt);
-
- for (i = start; i < end; i++) {
- lsp->fmas_svcs.tbl[i]->hdl = 0;
- lsp->fmas_svcs.tbl[i]->state = DS_SVC_INVAL;
- lsp->fmas_svcs.tbl[i]->ver.major =
- ds_vers[DS_NUM_VER - 1].major;
- lsp->fmas_svcs.tbl[i]->ver.minor =
- ds_vers[DS_NUM_VER - 1].minor;
- }
-
- (void) pthread_mutex_unlock(&lsp->fmas_svcs.mt);
-}
-
-
-static int
-fds_svc_remove(struct ldmsvcs_info *lsp, ds_svc_hdl_t svc_handle)
-{
- int i;
-
- for (i = 0; i < lsp->fmas_svcs.nsvcs; i++) {
- if (lsp->fmas_svcs.tbl[i]->hdl == svc_handle) {
- fds_svc_reset(lsp, i);
- return (0);
- }
- }
-
- return (1);
-}
-
-
-/*
- * message handlers
- */
-/*ARGSUSED*/
-static void
-ds_handle_msg_noop(struct ldmsvcs_info *lsp, void *buf, size_t len)
-{
-}
-
-static void
-ds_handle_init_req(struct ldmsvcs_info *lsp, void *buf, size_t len)
-{
- ds_init_req_t *req;
- uint16_t new_major, new_minor;
- size_t msglen;
-
- req = (ds_init_req_t *)buf;
-
- /* sanity check the incoming message */
- if (len != sizeof (ds_init_req_t)) {
- channel_close(lsp);
- return;
- }
-
- /*
- * Check version info. ACK only if the major numbers exactly
- * match. The service entity can retry with a new minor
- * based on the response sent as part of the NACK.
- */
- if (fds_negotiate_version(req->major_vers, &new_major, &new_minor)) {
- ds_hdr_t *H;
- ds_init_ack_t *R;
-
- msglen = sizeof (ds_hdr_t) + sizeof (ds_init_ack_t);
- H = alloca(msglen);
- R = (void *)((ptrdiff_t)H + sizeof (ds_hdr_t));
-
- H->msg_type = DS_INIT_ACK;
- H->payload_len = sizeof (ds_init_ack_t);
- R->minor_vers = MIN(new_minor, req->minor_vers);
-
- if (fds_send(lsp, H, msglen) != 0)
- return;
-
- (void) pthread_mutex_lock(&lsp->mt);
- ASSERT(lsp->fds_chan.state == CHANNEL_OPEN);
- lsp->fds_chan.state = CHANNEL_READY;
-
- /*
- * Now the channel is ready after the handshake completes.
- * Reset the timeout to a smaller value for receiving messages
- * from the domain services.
- */
- lsp->cv_twait = get_smf_int_val(LDM_RUNNING_TO_PROP_NM,
- 0, LDM_TIMEOUT_CEILING, LDM_RUNNING_WAIT_TIME);
-
- (void) pthread_mutex_unlock(&lsp->mt);
- } else {
- ds_hdr_t *H;
- ds_init_nack_t *R;
-
- msglen = sizeof (ds_hdr_t) + sizeof (ds_init_nack_t);
- H = alloca(msglen);
- R = (void *)((ptrdiff_t)H + sizeof (ds_hdr_t));
-
- H->msg_type = DS_INIT_NACK;
- H->payload_len = sizeof (ds_init_nack_t);
- R->major_vers = new_major;
-
- (void) fds_send(lsp, H, msglen);
- /*
- * do not update state; remote end may attempt to initiate
- * connection with a different version
- */
- }
-}
-
-
-/*ARGSUSED*/
-static void
-ds_handle_reg_req(struct ldmsvcs_info *lsp, void *buf, size_t len)
-{
- ds_reg_req_t *req;
- char *msg;
- uint16_t new_major, new_minor;
- size_t msglen;
- int dup_svcreg = 0;
-
- req = (ds_reg_req_t *)buf;
- msg = (char *)req->svc_id;
-
- /*
- * Service must be NULL terminated
- */
- if (req->svc_id == NULL || strlen(req->svc_id) == 0 ||
- msg[strlen(req->svc_id)] != '\0') {
- channel_close(lsp);
- return;
- }
-
- if (fds_negotiate_version(req->major_vers, &new_major, &new_minor) &&
- (dup_svcreg = fds_svc_add(lsp, req,
- MIN(new_minor, req->minor_vers))) == 0) {
-
- /*
- * Check version info. ACK only if the major numbers
- * exactly match. The service entity can retry with a new
- * minor based on the response sent as part of the NACK.
- */
- ds_hdr_t *H;
- ds_reg_ack_t *R;
-
- msglen = sizeof (ds_hdr_t) + sizeof (ds_reg_ack_t);
- H = alloca(msglen);
- bzero(H, msglen);
- R = (void *)((ptrdiff_t)H + sizeof (ds_hdr_t));
-
- H->msg_type = DS_REG_ACK;
- H->payload_len = sizeof (ds_reg_ack_t);
- R->svc_handle = req->svc_handle;
- R->minor_vers = MIN(new_minor, req->minor_vers);
-
- (void) fds_send(lsp, H, msglen);
- } else {
- ds_hdr_t *H;
- ds_reg_nack_t *R;
-
- msglen = sizeof (ds_hdr_t) + sizeof (ds_reg_nack_t);
- H = alloca(msglen);
- bzero(H, msglen);
- R = (void *)((ptrdiff_t)H + sizeof (ds_hdr_t));
-
- H->msg_type = DS_REG_NACK;
- H->payload_len = sizeof (ds_reg_nack_t);
- R->svc_handle = req->svc_handle;
- R->major_vers = new_major;
-
- if (dup_svcreg)
- R->result = DS_REG_DUP;
- else
- R->result = DS_REG_VER_NACK;
-
- (void) fds_send(lsp, H, msglen);
- }
-}
-
-
-/*ARGSUSED*/
-static void
-ds_handle_unreg(struct ldmsvcs_info *lsp, void *buf, size_t len)
-{
- ds_unreg_req_t *req;
- size_t msglen;
-
- req = (ds_unreg_req_t *)buf;
-
- if (fds_svc_remove(lsp, req->svc_handle) == 0) {
- ds_hdr_t *H;
- ds_unreg_ack_t *R;
-
- msglen = sizeof (ds_hdr_t) + sizeof (ds_unreg_ack_t);
- H = alloca(msglen);
- R = (void *)((ptrdiff_t)H + sizeof (ds_hdr_t));
-
- H->msg_type = DS_REG_ACK;
- H->payload_len = sizeof (ds_unreg_ack_t);
- R->svc_handle = req->svc_handle;
-
- (void) fds_send(lsp, H, msglen);
- } else {
- ds_hdr_t *H;
- ds_unreg_nack_t *R;
-
- msglen = sizeof (ds_hdr_t) + sizeof (ds_unreg_nack_t);
- H = alloca(msglen);
- R = (void *)((ptrdiff_t)H + sizeof (ds_hdr_t));
-
- H->msg_type = DS_REG_NACK;
- H->payload_len = sizeof (ds_unreg_nack_t);
- R->svc_handle = req->svc_handle;
-
- (void) fds_send(lsp, H, msglen);
- }
-}
-
-
-/*
- * Message handler lookup table (v1.0 only for now) Future
- * versions can add their own lookup table.
- */
-typedef void (*ds_msg_handler_t)(struct ldmsvcs_info *lsp,
- void *buf, size_t len);
-
-static const ds_msg_handler_t ds_msg_handlers[] = {
- ds_handle_init_req, /* DS_INIT_REQ */
- ds_handle_msg_noop, /* DS_INIT_ACK */
- ds_handle_msg_noop, /* DS_INIT_NACK */
- ds_handle_reg_req, /* DS_REG_REQ */
- ds_handle_msg_noop, /* DS_REG_ACK */
- ds_handle_msg_noop, /* DS_REG_NACK */
- ds_handle_unreg, /* DS_UNREG */
- ds_handle_msg_noop, /* DS_UNREG_ACK */
- ds_handle_msg_noop, /* DS_UNREG_NACK */
- ds_handle_msg_noop, /* DS_DATA */
- ds_handle_msg_noop /* DS_NACK */
-};
-
-
-/*
- * message and service internal functions
- */
-static void
-fds_svc_alloc(struct ldmsvcs_info *lsp)
-{
- int i;
- static char *name[] = { LDM_DS_NAME_CPU, LDM_DS_NAME_MEM,
- LDM_DS_NAME_PRI, LDM_DS_NAME_IOD, NULL };
-
- (void) pthread_mutex_init(&lsp->fmas_svcs.mt, NULL);
- (void) pthread_cond_init(&lsp->fmas_svcs.cv, NULL);
-
- for (lsp->fmas_svcs.nsvcs = 0; name[lsp->fmas_svcs.nsvcs] != NULL;
- lsp->fmas_svcs.nsvcs++)
- ;
-
- lsp->fmas_svcs.tbl = (fds_svc_t **)ldom_alloc(sizeof (fds_svc_t *) *
- lsp->fmas_svcs.nsvcs);
-
- for (i = 0; i < lsp->fmas_svcs.nsvcs; i++) {
- lsp->fmas_svcs.tbl[i] =
- (fds_svc_t *)ldom_alloc(sizeof (fds_svc_t));
- bzero(lsp->fmas_svcs.tbl[i], sizeof (fds_svc_t));
- lsp->fmas_svcs.tbl[i]->name = name[i];
- }
-}
-
-
-static fds_svc_t *
-fds_svc_lookup(struct ldmsvcs_info *lsp, char *name)
-{
- struct timespec twait;
- fds_svc_t *svc;
- int i, ier;
-
- if (pthread_mutex_lock(&lsp->fmas_svcs.mt) == EINVAL)
- return (NULL); /* uninitialized or destroyed mutex */
-
- svc = NULL;
- for (i = 0; i < lsp->fmas_svcs.nsvcs; i++) {
- if (strcmp(lsp->fmas_svcs.tbl[i]->name, name) == 0) {
- svc = lsp->fmas_svcs.tbl[i];
- break;
- }
- }
-
- ASSERT(svc != NULL);
-
- if (svc->state == DS_SVC_INACTIVE) {
- /* service is not registered */
- ier = ETIMEDOUT;
- } else {
- ier = 0;
- twait.tv_sec = time(NULL) + lsp->cv_twait;
- twait.tv_nsec = 0;
-
- while (svc->state != DS_SVC_ACTIVE && ier == 0 &&
- lsp->fds_chan.state != CHANNEL_UNUSABLE)
- ier = pthread_cond_timedwait(&lsp->fmas_svcs.cv,
- &lsp->fmas_svcs.mt, &twait);
-
- /*
- * By now, the ds service should have registered already.
- * If it does not, ldmd probably does not support this service.
- * Then mark the service state as inactive.
- */
- if (ier == ETIMEDOUT) {
- svc->state = DS_SVC_INACTIVE;
- }
- }
-
- (void) pthread_mutex_unlock(&lsp->fmas_svcs.mt);
-
- if (ier == 0)
- return (svc);
- else
- return (NULL);
-}
-
-
-static uint64_t
-fds_svc_req_num(void)
-{
- static uint64_t req_num = 1;
-
- return (req_num++);
-}
-
-
-/*
- * return 0 if successful, 1 if otherwise
- */
-static int
-read_msg(struct ldmsvcs_info *lsp)
-{
- ds_hdr_t header;
- void *msg_buf;
-
- /*
- * read the header
- */
- if (read_stream(lsp->fds_chan.fd, &header, sizeof (ds_hdr_t)) != 0)
- return (1);
-
- if (header.msg_type >=
- sizeof (ds_msg_handlers) / sizeof (ds_msg_handler_t))
- return (1);
-
- /*
- * handle data as a special case
- */
- if (header.msg_type == 9)
- return (poller_handle_data(lsp->fds_chan.fd,
- header.payload_len));
-
- /*
- * all other types of messages should be small
- */
- ASSERT(header.payload_len < 1024);
- msg_buf = alloca(header.payload_len);
-
- /*
- * read the payload
- */
- if (read_stream(lsp->fds_chan.fd, msg_buf, header.payload_len) != 0)
- return (1);
-
- (*ds_msg_handlers[header.msg_type])(lsp, msg_buf, header.payload_len);
-
- return (0);
-}
-
-
-/*
- * return values:
- * 0 - success
- * 1 - problem with opening the channel
- * 2 - channed not opened; request to exit has been detected
- */
-static int
-channel_openreset(struct ldmsvcs_info *lsp)
-{
- int ier;
-
- ier = pthread_mutex_lock(&lsp->mt);
-
- if (ier == EINVAL || lsp->fds_chan.state == CHANNEL_EXIT ||
- lsp->fds_chan.state == CHANNEL_UNUSABLE) {
- (void) pthread_mutex_unlock(&lsp->mt);
- return (2);
- }
-
- if (lsp->fds_chan.state == CHANNEL_UNINITIALIZED ||
- lsp->fds_chan.state == CHANNEL_CLOSED) {
- (void) pthread_cond_broadcast(&lsp->cv);
-
- if ((lsp->fds_chan.fd = open(FDS_VLDC, O_RDWR)) < 0) {
- lsp->fds_chan.state = CHANNEL_UNUSABLE;
- lsp->cv_twait = get_smf_int_val(LDM_RUNNING_TO_PROP_NM,
- 0, LDM_TIMEOUT_CEILING, LDM_RUNNING_WAIT_TIME);
- (void) pthread_mutex_unlock(&lsp->mt);
- (void) pthread_cond_broadcast(&lsp->fmas_svcs.cv);
-
- return (2);
- } else {
- vldc_opt_op_t op;
-
- op.op_sel = VLDC_OP_SET;
- op.opt_sel = VLDC_OPT_MODE;
- op.opt_val = LDC_MODE_RELIABLE;
-
- if (ioctl(lsp->fds_chan.fd, VLDC_IOCTL_OPT_OP,
- &op) != 0) {
- (void) close(lsp->fds_chan.fd);
- (void) pthread_mutex_unlock(&lsp->mt);
- return (1);
- }
- }
- lsp->fds_chan.state = CHANNEL_OPEN;
- }
-
- if (lsp->fds_chan.state == CHANNEL_OPEN) {
- /*
- * reset various channel parameters
- */
- lsp->fds_chan.ver.major = 0;
- lsp->fds_chan.ver.minor = 0;
- fds_svc_reset(lsp, -1);
- }
- (void) pthread_mutex_unlock(&lsp->mt);
-
- return (0);
-}
-
-
-static void
-channel_fini(void)
-{
- int i;
- struct ldmsvcs_info *lsp;
-
- /*
- * End the poller thread
- */
- poller_fini();
-
- if ((lsp = channel_init(NULL)) == NULL)
- return;
-
- (void) pthread_mutex_lock(&lsp->mt);
-
- lsp->fds_chan.state = CHANNEL_EXIT;
- (void) close(lsp->fds_chan.fd);
-
- (void) pthread_mutex_unlock(&lsp->mt);
-
- /* Free the ldom service structure */
- for (i = 0; i < lsp->fmas_svcs.nsvcs; i++) {
- ldom_free(lsp->fmas_svcs.tbl[i], sizeof (fds_svc_t));
- }
- ldom_free(lsp->fmas_svcs.tbl,
- lsp->fmas_svcs.nsvcs * sizeof (fds_svc_t *));
- ldom_free(lsp, sizeof (struct ldmsvcs_info));
-}
-
-
-static struct ldmsvcs_info *
-channel_init(struct ldom_hdl *lhp)
-{
- static pthread_mutex_t mt = PTHREAD_MUTEX_INITIALIZER;
- static pthread_cond_t cv = PTHREAD_COND_INITIALIZER;
- static struct ldmsvcs_info *root = NULL;
- static int busy_init = 0;
-
- struct timespec twait;
- int expired;
-
- (void) pthread_mutex_lock(&mt);
-
- while (busy_init == 1)
- (void) pthread_cond_wait(&cv, &mt);
-
- if (root != NULL || (lhp == NULL && root == NULL)) {
- (void) pthread_mutex_unlock(&mt);
- return (root);
- }
-
- /*
- * get to this point if we need to open the channel
- */
- busy_init = 1;
- (void) pthread_mutex_unlock(&mt);
-
- root = (struct ldmsvcs_info *)
- ldom_alloc(sizeof (struct ldmsvcs_info));
- bzero(root, sizeof (struct ldmsvcs_info));
-
- root->fds_chan.state = CHANNEL_UNINITIALIZED;
- root->cv_twait = get_smf_int_val(LDM_INIT_TO_PROP_NM,
- 0, LDM_TIMEOUT_CEILING, LDM_INIT_WAIT_TIME);
-
- if (pthread_mutex_init(&root->mt, NULL) != 0 ||
- pthread_cond_init(&root->cv, NULL) != 0) {
- ldom_free(root, sizeof (struct ldmsvcs_info));
- return (NULL);
- }
-
- fds_svc_alloc(root);
- fds_svc_reset(root, -1);
-
- (void) poller_init(root);
-
- expired = 0;
- twait.tv_sec = time(NULL) + 10;
- twait.tv_nsec = 0;
-
- (void) pthread_mutex_lock(&root->mt);
-
- /*
- * wait for channel to become uninitialized. this should be quick.
- */
- while (root->fds_chan.state == CHANNEL_UNINITIALIZED && expired == 0)
- expired = pthread_cond_timedwait(&root->cv, &root->mt, &twait);
-
- if (root->fds_chan.state == CHANNEL_UNUSABLE)
- expired = 1;
-
- (void) pthread_mutex_unlock(&root->mt);
-
- (void) pthread_mutex_lock(&mt);
- busy_init = 0;
- (void) pthread_mutex_unlock(&mt);
- (void) pthread_cond_broadcast(&cv);
-
- (void) atexit(channel_fini);
-
- if (expired == 0)
- return (root);
- else
- return (NULL);
-}
-
-
-static int
-sendrecv(struct ldom_hdl *lhp, uint64_t req_num,
- void *msg, size_t msglen, ds_svc_hdl_t *svc_hdl, char *svcname,
- void **resp, size_t *resplen)
-{
- struct ldmsvcs_info *lsp;
- fds_svc_t *svc;
- int maxretries, index, i, ier;
-
- lsp = lhp->lsinfo;
- i = 0;
- maxretries = 1;
-
- do {
- /*
- * if any of the calls in this loop fail, retry some number
- * of times before giving up.
- */
- if ((svc = fds_svc_lookup(lsp, svcname)) == NULL) {
- (void) pthread_mutex_lock(&lsp->mt);
-
- if (lsp->fds_chan.state != CHANNEL_READY)
- ier = ETIMEDOUT; /* channel not ready */
- else
- ier = ENOTSUP; /* service not ready */
-
- (void) pthread_mutex_unlock(&lsp->mt);
-
- continue;
- } else {
- ier = 0;
- *svc_hdl = svc->hdl;
- }
-
- index = poller_add_pending(req_num);
-
- if ((ier = fds_send(lsp, msg, msglen)) != 0 ||
- (ier = poller_recv_data(lhp, req_num, index, resp,
- resplen)) != 0)
- poller_delete_pending(req_num, index);
-
- } while (i++ < maxretries && ier != 0);
-
- ASSERT(ier == 0 || ier == ETIMEDOUT || ier == ENOTSUP);
-
- return (ier);
-}
-
-
-/*
- * input:
- * msg_type - requested operation: FMA_CPU_REQ_STATUS or FMA_CPU_REQ_OFFLINE
- * cpuid - physical cpu id
- *
- * normal return values:
- * P_OFFLINE - cpu is offline
- * P_ONLINE - cpu is online
- *
- * abnormal return values:
- * ETIMEDOUT - LDOM manager is not responding
- * ENOTSUP - LDOM service for cpu offlining/status is not available
- * ENOMSG - got an unexpected response from the LDOM cpu service
- */
-static int
-cpu_request(struct ldom_hdl *lhp, uint32_t msg_type, uint32_t cpuid)
-{
- ds_hdr_t *H;
- ds_data_handle_t *D;
- fma_cpu_service_req_t *R;
-
- char *svcname = LDM_DS_NAME_CPU;
- fma_cpu_resp_t *respmsg;
- void *resp;
- size_t resplen, reqmsglen;
- int rc;
-
- if (lhp->lsinfo == NULL)
- return (ENOMSG);
-
- reqmsglen = sizeof (ds_hdr_t) + sizeof (ds_data_handle_t) +
- sizeof (fma_cpu_service_req_t);
-
- H = lhp->allocp(reqmsglen);
- D = (void *)((ptrdiff_t)H + sizeof (ds_hdr_t));
- R = (void *)((ptrdiff_t)D + sizeof (ds_data_handle_t));
-
- H->msg_type = DS_DATA;
- H->payload_len = sizeof (ds_data_handle_t) +
- sizeof (fma_cpu_service_req_t);
-
- R->req_num = fds_svc_req_num();
- R->msg_type = msg_type;
- R->cpu_id = cpuid;
-
- if ((rc = sendrecv(lhp, R->req_num, H, reqmsglen,
- &D->svc_handle, svcname, &resp, &resplen)) != 0) {
- lhp->freep(H, reqmsglen);
- return (rc);
- }
-
- lhp->freep(H, reqmsglen);
-
- ASSERT(resplen == sizeof (fma_cpu_resp_t));
- respmsg = (fma_cpu_resp_t *)resp;
-
- rc = ENOMSG;
- if (respmsg->result == FMA_CPU_RESP_OK) {
- if (respmsg->status == FMA_CPU_STAT_ONLINE)
- rc = P_ONLINE;
- else if (respmsg->status == FMA_CPU_STAT_OFFLINE)
- rc = P_OFFLINE;
- } else {
- if (msg_type == FMA_CPU_REQ_OFFLINE &&
- respmsg->status == FMA_CPU_STAT_OFFLINE)
- rc = P_OFFLINE;
- }
-
- lhp->freep(resp, resplen);
-
- return (rc);
-}
-
-
-/*
- * input:
- * msg_type - requested operation: FMA_MEM_REQ_STATUS or FMA_MEM_REQ_RETIRE
- * pa - starting address of memory page
- * pgsize - memory page size in bytes
- *
- * normal return values for msg_type == FMA_MEM_REQ_STATUS:
- * 0 - page is retired
- * EAGAIN - page is scheduled for retirement
- * EIO - page not scheduled for retirement
- * EINVAL - error
- *
- * normal return values for msg_type == FMA_MEM_REQ_RETIRE:
- * 0 - success in retiring page
- * EIO - page is already retired
- * EAGAIN - page is scheduled for retirement
- * EINVAL - error
- *
- * abnormal return values (regardless of msg_type)
- * ETIMEDOUT - LDOM manager is not responding
- * ENOTSUP - LDOM service for cpu offlining/status is not available
- * ENOMSG - got an unexpected response from the LDOM cpu service
- */
-static int
-mem_request(struct ldom_hdl *lhp, uint32_t msg_type, uint64_t pa,
- uint64_t pgsize)
-{
- ds_hdr_t *H;
- ds_data_handle_t *D;
- fma_mem_service_req_t *R;
-
- char *svcname = LDM_DS_NAME_MEM;
- fma_mem_resp_t *respmsg;
- void *resp;
- size_t resplen, reqmsglen;
- int rc;
-
- if (lhp->lsinfo == NULL)
- return (ENOMSG);
-
- reqmsglen = sizeof (ds_hdr_t) + sizeof (ds_data_handle_t) +
- sizeof (fma_mem_service_req_t);
-
- H = lhp->allocp(reqmsglen);
- bzero(H, reqmsglen);
- D = (void *)((ptrdiff_t)H + sizeof (ds_hdr_t));
- R = (void *)((ptrdiff_t)D + sizeof (ds_data_handle_t));
-
- H->msg_type = DS_DATA;
- H->payload_len = sizeof (ds_data_handle_t) +
- sizeof (fma_mem_service_req_t);
-
- R->req_num = fds_svc_req_num();
- R->msg_type = msg_type;
- R->real_addr = pa;
- R->length = pgsize;
-
- if ((rc = sendrecv(lhp, R->req_num, H, reqmsglen,
- &D->svc_handle, svcname, &resp, &resplen)) != 0) {
- lhp->freep(H, reqmsglen);
- return (rc);
- }
-
- lhp->freep(H, reqmsglen);
-
- ASSERT(resplen == sizeof (fma_mem_resp_t));
- respmsg = (fma_mem_resp_t *)resp;
-
- rc = ENOMSG;
- if (msg_type == FMA_MEM_REQ_STATUS) {
- if (respmsg->result == FMA_MEM_RESP_OK) {
- if (respmsg->status == FMA_MEM_STAT_RETIRED)
- rc = 0; /* page is retired */
- else if (respmsg->status == FMA_MEM_STAT_NOTRETIRED)
- rc = EIO; /* page is not scheduled */
- } else if (respmsg->result == FMA_MEM_RESP_FAILURE) {
- if (respmsg->status == FMA_MEM_STAT_NOTRETIRED)
- rc = EAGAIN; /* page is scheduled */
- else if (respmsg->status == FMA_MEM_STAT_ILLEGAL)
- rc = EINVAL;
- }
- } else if (msg_type == FMA_MEM_REQ_RETIRE) {
- if (respmsg->result == FMA_MEM_RESP_OK) {
- if (respmsg->status == FMA_MEM_STAT_RETIRED)
- rc = 0; /* is successfully retired */
- } else if (respmsg->result == FMA_MEM_RESP_FAILURE) {
- if (respmsg->status == FMA_MEM_STAT_RETIRED)
- rc = EIO; /* is already retired */
- else if (respmsg->status == FMA_MEM_STAT_NOTRETIRED)
- rc = EAGAIN; /* is scheduled to retire */
- else if (respmsg->status == FMA_MEM_STAT_ILLEGAL)
- rc = EINVAL;
- }
- } else if (msg_type == FMA_MEM_REQ_RESURRECT) {
- if (respmsg->result == FMA_MEM_RESP_OK) {
- if (respmsg->status == FMA_MEM_STAT_NOTRETIRED)
- rc = 0; /* is successfully unretired */
- } if (respmsg->result == FMA_MEM_RESP_FAILURE) {
- if (respmsg->status == FMA_MEM_STAT_RETIRED)
- rc = EAGAIN; /* page couldn't be locked */
- else if (respmsg->status == FMA_MEM_STAT_NOTRETIRED)
- rc = EIO; /* page isn't retired already */
- else if (respmsg->status == FMA_MEM_STAT_ILLEGAL)
- rc = EINVAL;
- }
- }
-
- lhp->freep(resp, resplen);
-
- return (rc);
-}
-
-
-/*
- * APIs
- */
-int
-ldmsvcs_check_channel(void)
-{
- struct stat buf;
-
- if (stat(FDS_VLDC, &buf) == 0)
- return (0); /* vldc exists */
- else if (errno == ENOENT || errno == ENOTDIR)
- return (1); /* vldc does not exist */
- else
- return (-1); /* miscellaneous error */
-}
-
-
-/*ARGSUSED*/
-void
-ldmsvcs_init(struct ldom_hdl *lhp)
-{
- if (ldmsvcs_check_channel() != 0)
- return;
-
- lhp->lsinfo = channel_init(lhp);
- poller_add_client();
-}
-
-
-/*ARGSUSED*/
-void
-ldmsvcs_fini(struct ldom_hdl *lhp)
-{
- if (ldmsvcs_check_channel() != 0)
- return;
-
- poller_remove_client();
-}
-
-
-/*ARGSUSED*/
-ssize_t
-ldmsvcs_get_core_md(struct ldom_hdl *lhp, uint64_t **buf)
-{
- ds_hdr_t *H;
- ds_data_handle_t *D;
- fma_req_pri_t *R;
-
- char *svcname = LDM_DS_NAME_PRI;
- void *resp;
- size_t resplen, reqmsglen;
- ssize_t buflen;
- int rc;
-
- if (lhp->lsinfo == NULL)
- return (-1);
-
- reqmsglen = sizeof (ds_hdr_t) + sizeof (ds_data_handle_t) +
- sizeof (fma_req_pri_t);
-
- H = lhp->allocp(reqmsglen);
- D = (void *)((ptrdiff_t)H + sizeof (ds_hdr_t));
- R = (void *)((ptrdiff_t)D + sizeof (ds_data_handle_t));
-
- H->msg_type = DS_DATA;
- H->payload_len = sizeof (ds_data_handle_t) +
- sizeof (fma_req_pri_t);
-
- R->req_num = fds_svc_req_num();
-
- if ((rc = sendrecv(lhp, R->req_num, H, reqmsglen,
- &D->svc_handle, svcname, &resp, &resplen)) != 0) {
- lhp->freep(H, reqmsglen);
- errno = rc;
- return (-1);
- }
-
- lhp->freep(H, reqmsglen);
-
- /*
- * resp should contain the req_num immediately followed by the PRI
- * (the latter may or may not be present). unfortunately, the
- * current compiler flags cause a warning for the following
- * definition
- *
- * typedef struct {
- * uint64_t req_num;
- * uint8_t pri[];
- * } fma_pri_resp_t;
- *
- * so we do not use the struct here.
- */
- if (resplen <= sizeof (uint64_t)) {
- lhp->freep(resp, resplen);
- if (resplen == sizeof (uint64_t))
- return (0);
- else
- return (-1);
- }
-
- buflen = resplen - sizeof (uint64_t);
- *buf = lhp->allocp(buflen);
-
- bcopy((void *)((ptrdiff_t)resp + sizeof (uint64_t)), *buf, buflen);
- lhp->freep(resp, resplen);
-
- return (buflen);
-}
-
-
-/*
- * see cpu_request() for a description of return values
- */
-int
-ldmsvcs_cpu_req_status(struct ldom_hdl *lhp, uint32_t cpuid)
-{
- return (cpu_request(lhp, FMA_CPU_REQ_STATUS, cpuid));
-}
-
-
-int
-ldmsvcs_cpu_req_offline(struct ldom_hdl *lhp, uint32_t cpuid)
-{
- return (cpu_request(lhp, FMA_CPU_REQ_OFFLINE, cpuid));
-}
-
-int
-ldmsvcs_cpu_req_online(struct ldom_hdl *lhp, uint32_t cpuid)
-{
- return (cpu_request(lhp, FMA_CPU_REQ_ONLINE, cpuid));
-}
-
-/*
- * see mem_request() for a description of return values
- */
-int
-ldmsvcs_mem_req_status(struct ldom_hdl *lhp, uint64_t pa)
-{
- return (mem_request(lhp, FMA_MEM_REQ_STATUS, pa, getpagesize()));
-}
-
-int
-ldmsvcs_mem_req_retire(struct ldom_hdl *lhp, uint64_t pa)
-{
- return (mem_request(lhp, FMA_MEM_REQ_RETIRE, pa, getpagesize()));
-}
-
-int
-ldmsvcs_mem_req_unretire(struct ldom_hdl *lhp, uint64_t pa)
-{
- return (mem_request(lhp, FMA_MEM_REQ_RESURRECT, pa, getpagesize()));
-}
-
-int
-ldmsvcs_io_req_id(struct ldom_hdl *lhp, uint64_t addr, uint_t type,
- uint64_t *virt_addr, char *name, int name_len, uint64_t *did)
-{
-
- ds_hdr_t *H;
- ds_data_handle_t *D;
- fma_io_req_t *R;
-
- char *svcname = LDM_DS_NAME_IOD;
- void *resp;
- fma_io_resp_t *iop;
- size_t resplen, reqmsglen;
- int offset;
- int rc;
-
- if (lhp->lsinfo == NULL)
- return (-1);
-
- reqmsglen = sizeof (ds_hdr_t) + sizeof (ds_data_handle_t) +
- sizeof (fma_io_req_t);
-
- H = lhp->allocp(reqmsglen);
- D = (void *)((ptrdiff_t)H + sizeof (ds_hdr_t));
- R = (void *)((ptrdiff_t)D + sizeof (ds_data_handle_t));
-
- H->msg_type = DS_DATA;
- H->payload_len = sizeof (ds_data_handle_t) + sizeof (fma_io_req_t);
-
- R->req_num = fds_svc_req_num();
- R->msg_type = type;
- R->rsrc_address = addr;
-
- rc = ENOMSG;
- if ((rc = sendrecv(lhp, R->req_num, H, reqmsglen,
- &D->svc_handle, svcname, &resp, &resplen)) != 0) {
- lhp->freep(H, reqmsglen);
- return (rc);
- }
- lhp->freep(H, reqmsglen);
-
- /*
- * resp should contain the req_num, status, virtual addr, domain id
- * and the domain name. The domain name may or may not be present.
- */
- offset = sizeof (fma_io_resp_t);
- if (resplen < offset) {
- lhp->freep(resp, resplen);
- return (-1);
- }
-
- iop = (fma_io_resp_t *)resp;
- switch (iop->result) {
- case FMA_IO_RESP_OK:
- /* success */
- rc = 0;
- *virt_addr = iop->virt_rsrc_address;
- *did = iop->domain_id;
- if (name == NULL || name_len <= 0)
- break;
- *name = '\0';
- if (resplen > offset) {
- (void) strncpy(name, (char *)((ptrdiff_t)resp + offset),
- name_len);
- }
- break;
- default:
- rc = -1;
- break;
- }
-
- lhp->freep(resp, resplen);
- return (rc);
-}
-
-/* end file */
diff --git a/usr/src/lib/fm/libldom/sparc/ldmsvcs_utils.h b/usr/src/lib/fm/libldom/sparc/ldmsvcs_utils.h
deleted file mode 100644
index 135109152f..0000000000
--- a/usr/src/lib/fm/libldom/sparc/ldmsvcs_utils.h
+++ /dev/null
@@ -1,220 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _LDMSVCS_UTILS_H
-#define _LDMSVCS_UTILS_H
-
-#include <stdlib.h>
-#include <sys/types.h>
-#include <sys/ldc.h>
-#include <sys/vldc.h>
-#include <sys/ds.h>
-#include <sys/ds_impl.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Service Information
- */
-typedef struct fds_svc {
- ds_svc_hdl_t hdl; /* handle assigned by DS */
- ds_svc_state_t state; /* current service state */
- ds_ver_t ver; /* svc protocol version in use */
- char *name;
-} fds_svc_t;
-
-/*
- * table of registered services
- */
-typedef struct fds_reg_svcs {
- pthread_mutex_t mt;
- pthread_cond_t cv;
- fds_svc_t **tbl; /* the table itself */
- uint_t nsvcs; /* current number of items */
-} fds_reg_svcs_t;
-
-
-typedef enum {
- CHANNEL_UNINITIALIZED, /* status of channel unknown */
- CHANNEL_CLOSED, /* port structure not in use */
- CHANNEL_OPEN, /* open but not initialized/reset */
- CHANNEL_READY, /* init/reset done */
- CHANNEL_UNUSABLE, /* cannot be used (possibly busy) */
- CHANNEL_EXIT /* normal exit */
-} fds_chan_state_t;
-
-typedef struct fds_channel {
- int fd; /* FD for this channel */
- fds_chan_state_t state; /* state of the port */
- ds_ver_t ver; /* DS protocol version in use */
-} fds_channel_t;
-
-
-/*
- * FMA services
- */
-
-#define LDM_DS_NAME_CPU "fma-phys-cpu-service"
-#define LDM_DS_NAME_MEM "fma-phys-mem-service"
-#define LDM_DS_NAME_PRI "fma-pri-service"
-#define LDM_DS_NAME_IOD "fma-io-domain-service"
-
-typedef struct {
- uint64_t req_num;
-} fma_req_pri_t;
-
-/*
- * definition of fma_pri_resp_t is not shown here. for more details,
- * see ldmsvcs_utils.c:ldmsvcs_get_core_md().
- */
-
-#define FMA_CPU_REQ_STATUS 0
-#define FMA_CPU_REQ_OFFLINE 1
-#define FMA_CPU_REQ_ONLINE 2
-
-#define FMA_CPU_RESP_OK 0
-#define FMA_CPU_RESP_FAILURE 1
-
-#define FMA_CPU_STAT_ONLINE 0
-#define FMA_CPU_STAT_OFFLINE 1
-#define FMA_CPU_STAT_ILLEGAL 2
-
-typedef struct {
- uint64_t req_num;
- uint32_t msg_type;
- uint32_t cpu_id;
-} fma_cpu_service_req_t;
-
-typedef struct {
- uint64_t req_num;
- uint32_t result;
- uint32_t status;
-} fma_cpu_resp_t;
-
-#define FMA_MEM_REQ_STATUS 0
-#define FMA_MEM_REQ_RETIRE 1
-#define FMA_MEM_REQ_RESURRECT 2
-
-#define FMA_MEM_RESP_OK 0
-#define FMA_MEM_RESP_FAILURE 1
-
-#define FMA_MEM_STAT_NOTRETIRED 0
-#define FMA_MEM_STAT_RETIRED 1
-#define FMA_MEM_STAT_ILLEGAL 2
-
-typedef struct {
- uint64_t req_num;
- uint32_t msg_type;
- uint32_t _resvd;
- uint64_t real_addr;
- uint64_t length;
-} fma_mem_service_req_t;
-
-typedef struct {
- uint64_t req_num;
- uint32_t result;
- uint32_t status;
- uint64_t res_addr;
- uint64_t res_length;
-} fma_mem_resp_t;
-
-
-#define FMA_IO_RESP_OK 0
-#define FMA_IO_RESP_FAILURE 1
-#define FMA_IO_RESP_ILLEGAL 2
-#define FMA_IO_RESP_UNASSIGNED 3
-
-typedef struct {
- uint64_t req_num;
- uint32_t msg_type;
- uint32_t reserved;
- uint64_t rsrc_address;
-} fma_io_req_t;
-
-typedef struct {
- uint64_t req_num;
- uint32_t result;
- uint32_t reserved;
- uint64_t virt_rsrc_address;
- uint64_t domain_id;
-} fma_io_resp_t;
-
-
-struct ldom_hdl {
- void *(*allocp)(size_t size);
- void (*freep)(void *addr, size_t size);
- struct ldmsvcs_info *lsinfo;
-};
-
-/*
- * in the default case of ldmd (the LDOM manager daemon/service)
- * not installed/running, set short timeouts for contacting ldmd,
- * so that higher levels in the software stack (ex: diagnosis engines)
- * are not excessively delayed by ldmd's absence. both timeouts are tunable
- * via SMF properties in ldmd's service manifest, and expected to be set
- * thusly to appropriate values when ldmd is installed.
- *
- * timeouts are in seconds. init is the initial timeout; running is
- * for subsequent timeouts.
- */
-#define LDM_INIT_WAIT_TIME 2
-#define LDM_RUNNING_WAIT_TIME 2
-
-#define LDM_SVC_NM "svc:/ldoms/ldmd:default"
-#define LDM_PROP_GROUP_NM "fmd_config"
-
-#define LDM_INIT_TO_PROP_NM "fmd_to_ldmd_init_timeout"
-#define LDM_RUNNING_TO_PROP_NM "fmd_to_ldmd_running_timeout"
-
-extern int ldmsvcs_check_channel(void);
-
-extern void ldmsvcs_init(struct ldom_hdl *lhp);
-
-extern void ldmsvcs_fini(struct ldom_hdl *lhp);
-
-extern ssize_t ldmsvcs_get_core_md(struct ldom_hdl *lhp, uint64_t **buf);
-
-extern int ldmsvcs_cpu_req_status(struct ldom_hdl *lhp, uint32_t cpuid);
-
-extern int ldmsvcs_mem_req_status(struct ldom_hdl *lhp, uint64_t pa);
-
-extern int ldmsvcs_cpu_req_offline(struct ldom_hdl *lhp, uint32_t cpuid);
-
-extern int ldmsvcs_mem_req_retire(struct ldom_hdl *lhp, uint64_t pa);
-
-extern int ldmsvcs_cpu_req_online(struct ldom_hdl *lhp, uint32_t cpuid);
-
-extern int ldmsvcs_mem_req_unretire(struct ldom_hdl *lhp, uint64_t pa);
-
-extern int ldmsvcs_io_req_id(struct ldom_hdl *lhp, uint64_t addr, uint_t type,
- uint64_t *virt_addr, char *name, int name_len, uint64_t *did);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _LDMSVCS_UTILS_H */
diff --git a/usr/src/lib/fm/libldom/sparc/ldom.c b/usr/src/lib/fm/libldom/sparc/ldom.c
deleted file mode 100644
index 90afe5d481..0000000000
--- a/usr/src/lib/fm/libldom/sparc/ldom.c
+++ /dev/null
@@ -1,817 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#include <stdio.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <strings.h>
-#include <fcntl.h>
-#include <pthread.h>
-#include <errno.h>
-#include <libnvpair.h>
-#include <dlfcn.h>
-#include <link.h>
-#include <assert.h>
-
-#include <fm/libtopo.h>
-#include <sys/processor.h>
-#include <sys/stat.h>
-#include <sys/mdesc.h>
-#include <sys/param.h>
-#include <sys/systeminfo.h>
-#include <sys/mem.h>
-#include <sys/bl.h>
-#include <sys/fm/protocol.h>
-#include <fm/fmd_fmri.h>
-#include <fm/fmd_agent.h>
-#include <sys/pri.h>
-
-#include "ldom.h"
-#include "ldom_alloc.h"
-#include "ldmsvcs_utils.h"
-#include "ldom_xmpp_client.h"
-
-#define MD_STR_PLATFORM "platform"
-#define MD_STR_DOM_CAPABLE "domaining-enabled"
-#define MD_STR_IODEVICE "iodevice"
-#define MD_STR_NAME "name"
-#define MD_STR_DEVICE_TYPE "device-type"
-#define MD_STR_CFGHDL "cfg-handle"
-#define MD_STR_PCIEX "pciex"
-#define MD_STR_PCI "pci"
-#define MD_STR_NIU "niu"
-
-static int ldom_ldmd_is_up = 0; /* assume stays up if ever seen up */
-
-static void *ldom_dl_hp = (void *)NULL;
-static const char *ldom_dl_path = "libpri.so.1";
-static int ldom_dl_mode = (RTLD_NOW | RTLD_LOCAL);
-
-static pthread_mutex_t ldom_pri_lock = PTHREAD_MUTEX_INITIALIZER;
-static int ldom_pri_ref_cnt = 0; /* num of outstanding ldom_pri_init()s */
-static int ldom_pri_init_done = 0; /* bool for real pri_init() done */
-static int (*ldom_pri_fp_init)(void) = (int (*)(void))NULL;
-static void (*ldom_pri_fp_fini)(void) = (void (*)(void))NULL;
-static ssize_t (*ldom_pri_fp_get)(uint8_t wait, uint64_t *token, uint64_t **buf,
- void *(*allocp)(size_t), void (*freep)(void *, size_t)) =
- (ssize_t (*)(uint8_t wait, uint64_t *token, uint64_t **buf,
- void *(*allocp)(size_t), void (*freep)(void *, size_t)))NULL;
-
-static void
-ldom_pri_config(void)
-{
- char isa[MAXNAMELEN]; /* used to see if machine is sun4v */
-
- if (sysinfo(SI_MACHINE, isa, MAXNAMELEN) < 0)
- return;
- if (strcmp(isa, "sun4v") != 0)
- return;
- if ((ldom_dl_hp = dlopen(ldom_dl_path, ldom_dl_mode)) == NULL)
- return;
-
- ldom_pri_fp_init = (int (*)(void))dlsym(ldom_dl_hp, "pri_init");
- ldom_pri_fp_fini = (void (*)(void))dlsym(ldom_dl_hp, "pri_fini");
- ldom_pri_fp_get = (ssize_t (*)(uint8_t wait, uint64_t *token,
- uint64_t **buf, void *(*allocp)(size_t),
- void (*freep)(void *, size_t)))dlsym(ldom_dl_hp, "pri_get");
-}
-
-static void
-ldom_pri_unconfig(void)
-{
- if (ldom_dl_hp == NULL)
- return;
-
- ldom_pri_fp_init = (int (*)(void))NULL;
- ldom_pri_fp_fini = (void (*)(void))NULL;
- ldom_pri_fp_get = (ssize_t (*)(uint8_t wait, uint64_t *token,
- uint64_t **buf, void *(*allocp)(size_t),
- void (*freep)(void *, size_t)))NULL;
- (void) dlclose(ldom_dl_hp);
- ldom_dl_hp = (void *)NULL;
-}
-
-/*
- * ldom_pri_lock is assumed already held by anyone accessing ldom_pri_ref_cnt
- */
-
-static int
-ldom_pri_init(void)
-{
- if (ldom_pri_ref_cnt == 0) {
- ldom_pri_config();
- /*
- * ldom_pri_init() is called before we know whether we
- * have LDOMS FW or not; defer calling pri_init() via
- * ldom_pri_fp_init until the first time we try to
- * actually get a PRI
- */
- }
- ldom_pri_ref_cnt++;
-
- assert(ldom_pri_ref_cnt > 0);
-
- return (0);
-}
-
-static void
-ldom_pri_fini(void)
-{
- assert(ldom_pri_ref_cnt > 0);
-
- ldom_pri_ref_cnt--;
- if (ldom_pri_ref_cnt == 0) {
- if (ldom_pri_init_done && (ldom_pri_fp_fini != NULL)) {
- (*ldom_pri_fp_fini)();
- ldom_pri_init_done = 0;
- }
- ldom_pri_unconfig();
- }
-}
-
-static ssize_t
-ldom_pri_get(uint8_t wait, uint64_t *token, uint64_t **buf,
- void *(*allocp)(size_t), void (*freep)(void *, size_t))
-{
- assert(ldom_pri_ref_cnt > 0);
-
- if ((!ldom_pri_init_done) && (ldom_pri_fp_init != NULL)) {
- if ((*ldom_pri_fp_init)() < 0)
- return (-1);
- ldom_pri_init_done = 1;
- }
-
- if (ldom_pri_fp_get != NULL)
- return ((*ldom_pri_fp_get)(wait, token, buf, allocp, freep));
- else
- return (-1);
-}
-
-static ssize_t
-get_local_core_md(ldom_hdl_t *lhp, uint64_t **buf)
-{
- int fh;
- size_t size;
- uint64_t *bufp;
-
- if ((fh = open("/devices/pseudo/mdesc@0:mdesc", O_RDONLY, 0)) < 0)
- return (-1);
-
- if (ioctl(fh, MDESCIOCGSZ, &size) < 0) {
- (void) close(fh);
- return (-1);
- }
-
- bufp = (uint64_t *)lhp->allocp(size);
-
- if (read(fh, bufp, size) < 0) {
- lhp->freep(bufp, size);
- (void) close(fh);
- return (-1);
- }
- (void) close(fh);
-
- *buf = bufp;
-
- return ((ssize_t)size);
-}
-
-
-static int
-get_local_md_prop_value(ldom_hdl_t *lhp, char *node, char *prop, uint64_t *val)
-{
- int rc = 1;
- uint64_t *bufp;
- ssize_t bufsiz;
-
- if ((bufsiz = get_local_core_md(lhp, &bufp)) > 0) {
- md_t *mdp;
-
- if (mdp = md_init_intern(bufp, lhp->allocp, lhp->freep)) {
- int num_nodes;
- mde_cookie_t *listp;
-
- num_nodes = md_node_count(mdp);
- listp = lhp->allocp(sizeof (mde_cookie_t) * num_nodes);
-
- if (md_scan_dag(mdp, MDE_INVAL_ELEM_COOKIE,
- md_find_name(mdp, node),
- md_find_name(mdp, "fwd"), listp) > 0 &&
- md_get_prop_val(mdp, listp[0], prop, val) >= 0) {
- /* found the property */
- rc = 0;
- }
-
- lhp->freep(listp, sizeof (mde_cookie_t) * num_nodes);
- (void) md_fini(mdp);
- }
- lhp->freep(bufp, bufsiz);
- }
- return (rc);
-}
-
-/*
- * search the machine description for a "pid" entry (physical cpuid) and
- * return the corresponding "id" entry (virtual cpuid).
- * return -1 if not found.
- * if the pid property does not exist in a cpu node, assume pid = id.
- */
-static processorid_t
-cpu_phys2virt(ldom_hdl_t *lhp, uint32_t cpuid)
-{
- char isa[MAXNAMELEN];
- md_t *mdp;
- mde_cookie_t *listp;
- ssize_t bufsize;
- processorid_t vid;
- uint64_t *bufp;
- uint64_t pval, pid, id;
- int num_nodes, ncpus, i;
-
- (void) sysinfo(SI_MACHINE, isa, MAXNAMELEN);
-
- if (strcmp(isa, "sun4v") != 0)
- return ((processorid_t)cpuid);
-
- /*
- * convert the physical cpuid to a virtual cpuid
- */
- if ((bufsize = get_local_core_md(lhp, &bufp)) < 1)
- return (-1);
-
- if ((mdp = md_init_intern(bufp, lhp->allocp, lhp->freep)) == NULL ||
- (num_nodes = md_node_count(mdp)) < 1) {
- lhp->freep(bufp, bufsize);
- return (-1);
- }
-
- listp = (mde_cookie_t *)lhp->allocp(sizeof (mde_cookie_t) * num_nodes);
- ncpus = md_scan_dag(mdp, MDE_INVAL_ELEM_COOKIE,
- md_find_name(mdp, "cpu"), md_find_name(mdp, "fwd"), listp);
-
- vid = -1;
- for (i = 0; i < ncpus; i++) {
- if (md_get_prop_val(mdp, listp[i], "id", &pval) < 0)
- pval = (uint64_t)-1;
- id = pval;
-
- /* if pid does not exist, assume pid=id */
- if (md_get_prop_val(mdp, listp[i], "pid", &pval) < 0)
- pval = id;
- pid = pval;
-
- if (pid == (uint64_t)cpuid) {
- /* Found the entry */
- vid = (processorid_t)id;
- break;
- }
- }
-
- lhp->freep(listp, sizeof (mde_cookie_t) * num_nodes);
- (void) md_fini(mdp);
- lhp->freep(bufp, bufsize);
-
- return (vid);
-}
-
-static int
-get_type(ldom_hdl_t *lhp, uint32_t *type)
-{
- int num_nodes, cnt, i, rc;
- char *p;
- mde_cookie_t *listp;
- md_t *mdp;
- uint64_t domain_capable;
- uint64_t *bufp;
- ssize_t bufsize;
-
- *type = 0;
-
- /* legacy system */
- if (get_local_md_prop_value(lhp, MD_STR_PLATFORM, MD_STR_DOM_CAPABLE,
- &domain_capable) != 0) {
- *type = LDOM_TYPE_LEGACY;
- return (0);
- }
-
- /*
- * LDOMS capable FW is installed; it should be ok to
- * try to communicate with ldmd
- */
- if ((rc = ldmsvcs_check_channel()) == 0) {
- /*
- * control ldom
- * ldmfma channel between FMA and ldmd only exists
- * on the control domain.
- */
- *type |= LDOM_TYPE_CONTROL;
- } else if (rc == -1) {
- return (rc);
- }
-
- /*
- * root domain and io domain
- */
- if ((bufsize = get_local_core_md(lhp, &bufp)) < 1)
- return (-1);
- if ((mdp = md_init_intern(bufp, lhp->allocp, lhp->freep)) == NULL) {
- lhp->freep(bufp, bufsize);
- return (-1);
- }
- if ((num_nodes = md_node_count(mdp)) < 1) {
- lhp->freep(bufp, bufsize);
- (void) md_fini(mdp);
- return (-1);
- }
-
- /* Search for the root complex and niu nodes */
- listp = lhp->allocp(sizeof (mde_cookie_t) * num_nodes);
- cnt = md_scan_dag(mdp, MDE_INVAL_ELEM_COOKIE,
- md_find_name(mdp, MD_STR_IODEVICE), md_find_name(mdp, "fwd"),
- listp);
- for (i = 0, p = NULL; i < cnt; i++) {
- if ((md_get_prop_str(mdp, listp[i], MD_STR_DEVICE_TYPE, &p)
- == 0) &&
- (p != NULL) && (strcmp(p, MD_STR_PCIEX) == 0)) {
- *type |= LDOM_TYPE_ROOT;
- break;
- }
- }
- for (i = 0, p = NULL; i < cnt; i++) {
- if ((md_get_prop_str(mdp, listp[i], MD_STR_NAME, &p) == 0) &&
- (p != NULL) && (strcmp(p, MD_STR_NIU) == 0)) {
- *type |= LDOM_TYPE_IO;
- break;
- }
- }
- lhp->freep(listp, sizeof (mde_cookie_t) * num_nodes);
- (void) md_fini(mdp);
- lhp->freep(bufp, bufsize);
-
- return (0);
-}
-
-int
-ldom_get_type(ldom_hdl_t *lhp, uint32_t *type)
-{
- static pthread_mutex_t mt = PTHREAD_MUTEX_INITIALIZER;
- static pthread_cond_t cv = PTHREAD_COND_INITIALIZER;
- static uint32_t ltype = 0;
- static int busy_init = 0;
-
- int rc = 0;
-
- (void) pthread_mutex_lock(&mt);
-
- while (busy_init == 1)
- (void) pthread_cond_wait(&cv, &mt);
-
- if (VALID_LDOM_TYPE(ltype) != 0) {
- *type = ltype;
- (void) pthread_mutex_unlock(&mt);
- return (0);
- }
-
- /*
- * get to this point if the ldom_type has not yet been determined
- */
- busy_init = 1;
- (void) pthread_mutex_unlock(&mt);
-
- rc = get_type(lhp, &ltype);
- if (rc == 0) {
- *type = ltype;
- }
-
- (void) pthread_mutex_lock(&mt);
- busy_init = 0;
- (void) pthread_mutex_unlock(&mt);
-
- (void) pthread_cond_broadcast(&cv);
-
- return (rc);
-}
-
-int
-ldom_fmri_status(ldom_hdl_t *lhp, nvlist_t *nvl)
-{
- char *name;
- int ret = ENOTSUP;
-
- if (nvlist_lookup_string(nvl, FM_FMRI_SCHEME, &name) != 0)
- return (EINVAL);
-
- /*
- * ldom_ldmd_is_up can only be true if a pri can be obtained from ldmd.
- */
- if (!ldom_ldmd_is_up) {
- /* Zeus is unavail; use local routines for status/retire */
-
- if (strcmp(name, FM_FMRI_SCHEME_CPU) == 0) {
- processorid_t vid;
- uint32_t cpuid;
-
- if (nvlist_lookup_uint32(nvl, FM_FMRI_CPU_ID, &cpuid)
- == 0 && (vid = cpu_phys2virt(lhp, cpuid)) != -1)
- return (p_online(vid, P_STATUS));
- } else if (strcmp(name, FM_FMRI_SCHEME_MEM) == 0) {
- fmd_agent_hdl_t *hdl;
- int err;
- if ((hdl = fmd_agent_open(FMD_AGENT_VERSION)) == NULL) {
- err = errno;
- } else {
- err = fmd_agent_page_isretired(hdl, nvl);
- if (err == FMD_AGENT_RETIRE_DONE)
- err = 0;
- else
- err = fmd_agent_errno(hdl);
- fmd_agent_close(hdl);
- }
- return (err);
- }
-
- return (EINVAL);
- } else {
- /* Zeus is avail; use Zeus for status/retire */
-
- if (strcmp(name, FM_FMRI_SCHEME_CPU) == 0) {
- uint32_t cpuid;
-
- if (nvlist_lookup_uint32(nvl, FM_FMRI_CPU_ID,
- &cpuid) == 0)
- ret = ldmsvcs_cpu_req_status(lhp, cpuid);
- } else if (strcmp(name, FM_FMRI_SCHEME_MEM) == 0) {
- uint64_t pa;
-
- if (nvlist_lookup_uint64(nvl, FM_FMRI_MEM_PHYSADDR,
- &pa) == 0)
- ret = ldmsvcs_mem_req_status(lhp, pa);
- else
- ret = EINVAL;
- }
- return (ret);
- }
-}
-
-
-int
-ldom_fmri_retire(ldom_hdl_t *lhp, nvlist_t *nvl)
-{
- char *name;
- int ret = ENOTSUP;
-
- if (nvlist_lookup_string(nvl, FM_FMRI_SCHEME, &name) != 0)
- return (EINVAL);
-
- /*
- * ldom_ldmd_is_up can only be true if a pri can be obtained from ldmd.
- */
- if (!ldom_ldmd_is_up) {
- /* Zeus is unavail; use local routines for status/retire */
-
- if (strcmp(name, FM_FMRI_SCHEME_CPU) == 0) {
- processorid_t vid;
- uint32_t cpuid;
-
- if (nvlist_lookup_uint32(nvl, FM_FMRI_CPU_ID, &cpuid)
- == 0 && (vid = cpu_phys2virt(lhp, cpuid)) != -1)
- return (p_online(vid, P_FAULTED));
- } else if (strcmp(name, FM_FMRI_SCHEME_MEM) == 0) {
- fmd_agent_hdl_t *hdl;
- int err;
- if ((hdl = fmd_agent_open(FMD_AGENT_VERSION)) == NULL) {
- err = errno;
- } else {
- err = fmd_agent_page_retire(hdl, nvl);
- if (err == FMD_AGENT_RETIRE_DONE)
- err = 0;
- else
- err = fmd_agent_errno(hdl);
- fmd_agent_close(hdl);
- }
- return (err);
- }
-
- return (EINVAL);
- } else {
- /* Zeus is avail; use Zeus for status/retire */
-
- if (strcmp(name, FM_FMRI_SCHEME_CPU) == 0) {
- uint32_t cpuid;
-
- if (nvlist_lookup_uint32(nvl, FM_FMRI_CPU_ID,
- &cpuid) == 0)
- ret = ldmsvcs_cpu_req_offline(lhp, cpuid);
- } else if (strcmp(name, FM_FMRI_SCHEME_MEM) == 0) {
- uint64_t pa;
-
- if (nvlist_lookup_uint64(nvl, FM_FMRI_MEM_PHYSADDR,
- &pa) == 0)
- ret = ldmsvcs_mem_req_retire(lhp, pa);
- else
- ret = EINVAL;
- }
- return (ret);
- }
-}
-
-int
-ldom_fmri_unretire(ldom_hdl_t *lhp, nvlist_t *nvl)
-{
- char *name;
- int ret = ENOTSUP;
-
- if (nvlist_lookup_string(nvl, FM_FMRI_SCHEME, &name) != 0)
- return (EINVAL);
-
- /*
- * ldom_ldmd_is_up can only be true if a pri can be obtained from ldmd.
- */
- if (!ldom_ldmd_is_up) {
- /* Zeus is unavail; use local routines for status/retire */
-
- if (strcmp(name, FM_FMRI_SCHEME_CPU) == 0) {
- processorid_t vid;
- uint32_t cpuid;
-
- if (nvlist_lookup_uint32(nvl, FM_FMRI_CPU_ID, &cpuid)
- == 0 && (vid = cpu_phys2virt(lhp, cpuid)) != -1)
- return (p_online(vid, P_ONLINE));
- } else if (strcmp(name, FM_FMRI_SCHEME_MEM) == 0) {
- fmd_agent_hdl_t *hdl;
- int err;
- if ((hdl = fmd_agent_open(FMD_AGENT_VERSION)) == NULL) {
- err = errno;
- } else {
- err = fmd_agent_page_unretire(hdl, nvl);
- if (err == FMD_AGENT_RETIRE_DONE)
- err = 0;
- else
- err = fmd_agent_errno(hdl);
- fmd_agent_close(hdl);
- }
- return (err);
- }
-
- return (EINVAL);
- } else {
- /* Zeus is avail; use Zeus for status/retire */
-
- if (strcmp(name, FM_FMRI_SCHEME_CPU) == 0) {
- uint32_t cpuid;
-
- if (nvlist_lookup_uint32(nvl, FM_FMRI_CPU_ID,
- &cpuid) == 0)
- ret = ldmsvcs_cpu_req_online(lhp, cpuid);
- } else if (strcmp(name, FM_FMRI_SCHEME_MEM) == 0) {
- uint64_t pa;
-
- if (nvlist_lookup_uint64(nvl, FM_FMRI_MEM_PHYSADDR,
- &pa) == 0)
- ret = ldmsvcs_mem_req_unretire(lhp, pa);
- else
- ret = EINVAL;
- }
- return (ret);
- }
-}
-
-static int
-fmri_blacklist(ldom_hdl_t *lhp, nvlist_t *nvl, int cmd)
-{
- char *name;
- uint32_t type = 0;
-
- if ((ldom_get_type(lhp, &type) != 0) ||
- ((type & LDOM_TYPE_LEGACY) == 0))
- return (0);
-
- if (nvlist_lookup_string(nvl, FM_FMRI_SCHEME, &name) != 0)
- return (EINVAL);
-
- if (strcmp(name, FM_FMRI_SCHEME_CPU) == 0) {
- bl_req_t blr;
- char *class;
- int fd, rc, err;
-
- if ((nvlist_lookup_string(nvl, FM_CLASS, &class) != 0) ||
- (class == NULL) || (*class == '\0'))
- return (EINVAL);
-
- if ((fd = open("/dev/bl", O_RDONLY)) < 0)
- return (EIO);
-
- if (nvlist_size(nvl, &blr.bl_fmrisz, NV_ENCODE_NATIVE) != 0 ||
- blr.bl_fmrisz == 0 ||
- (blr.bl_fmri = (caddr_t)lhp->allocp(blr.bl_fmrisz)) ==
- NULL) {
- (void) close(fd);
- return (EINVAL);
- }
-
- blr.bl_class = class;
-
- rc = ioctl(fd, cmd, &blr);
- err = errno;
-
- lhp->freep((void *)&blr.bl_fmri, blr.bl_fmrisz);
- (void) close(fd);
-
- if (rc < 0 && err != ENOTSUP) {
- errno = err;
- return (-1);
- }
- }
-
- return (0);
-}
-
-/*
- * blacklist cpus in a non-LDOMS environment
- */
-int
-ldom_fmri_blacklist(ldom_hdl_t *lhp, nvlist_t *nvl)
-{
- return (fmri_blacklist(lhp, nvl, BLIOC_INSERT));
-}
-
-/*
- * unblacklist cpus
- */
-int
-ldom_fmri_unblacklist(ldom_hdl_t *lhp, nvlist_t *nvl)
-{
- return (fmri_blacklist(lhp, nvl, BLIOC_DELETE));
-}
-
-
-ssize_t
-ldom_get_local_md(ldom_hdl_t *lhp, uint64_t **buf)
-{
- return (get_local_core_md(lhp, buf));
-}
-
-ssize_t
-ldom_get_core_md(ldom_hdl_t *lhp, uint64_t **buf)
-{
- ssize_t rv; /* return value */
- uint64_t tok; /* opaque PRI token */
- uint32_t type = 0;
-
- if (ldom_get_type(lhp, &type) != 0) {
- return (-1);
- }
-
- if ((type & LDOM_TYPE_CONTROL) != 0) {
- /* Get the pri from Zeus first. If failed, get it from libpri */
- if ((rv = ldmsvcs_get_core_md(lhp, buf)) < 1) {
- (void) pthread_mutex_lock(&ldom_pri_lock);
- rv = ldom_pri_get(PRI_GET, &tok,
- buf, lhp->allocp, lhp->freep);
- (void) pthread_mutex_unlock(&ldom_pri_lock);
- } else {
- ldom_ldmd_is_up = 1;
- xmpp_start();
- }
- } else {
- /* get the pruned PRI from the libpri */
- (void) pthread_mutex_lock(&ldom_pri_lock);
- rv = ldom_pri_get(PRI_GET, &tok, buf, lhp->allocp, lhp->freep);
- (void) pthread_mutex_unlock(&ldom_pri_lock);
- }
-
- return (rv);
-}
-
-int
-ldom_find_id(ldom_hdl_t *lhp, uint64_t addr, ldom_rsrc_t rsrc,
- uint64_t *virt_addr, char *name, int name_size, uint64_t *did)
-{
- uint32_t type = 0;
-
- (void) ldom_get_type(lhp, &type);
- if ((type & LDOM_TYPE_CONTROL) == 0) {
- return (ENOTSUP);
- }
- if (!ldom_ldmd_is_up) {
- return (EAGAIN);
- }
- return (ldmsvcs_io_req_id(lhp, addr, rsrc, virt_addr,
- name, name_size, did));
-}
-
-int
-ldom_register_event(ldom_hdl_t *lhp, ldom_reg_cb_t cb, ldom_cb_arg_t data)
-{
- uint32_t type = 0;
-
- (void) ldom_get_type(lhp, &type);
- if ((type & LDOM_TYPE_CONTROL) == 0) {
- return (ENOTSUP);
- }
-
- return (xmpp_add_client(lhp, cb, data));
-}
-
-int
-ldom_unregister_event(ldom_hdl_t *lhp)
-{
- uint32_t type = 0;
-
- (void) ldom_get_type(lhp, &type);
- if ((type & LDOM_TYPE_CONTROL) == 0) {
- return (ENOTSUP);
- }
-
- return (xmpp_remove_client(lhp));
-}
-
-/*
- * ldom_init()
- * Description:
- * Return a libldom handle to the caller for uniquely identify the session
- * betweem the caller and the libldom.so. The handle is used in
- * subsequent calls into the libldom.so
- *
- * If the caller does not provide a alloc()/free(), the libldom uses its
- * own functions.
- */
-ldom_hdl_t *
-ldom_init(void *(*allocp)(size_t size),
- void (*freep)(void *addr, size_t size))
-{
- struct ldom_hdl *lhp;
-
- if (allocp == NULL && freep == NULL) {
- allocp = ldom_alloc;
- freep = ldom_free;
- } else if (allocp == NULL || freep == NULL) {
- /* missing alloc or free functions */
- return (NULL);
- }
-
- (void) pthread_mutex_lock(&ldom_pri_lock);
-
- if (ldom_pri_init() < 0) {
- (void) pthread_mutex_unlock(&ldom_pri_lock);
- return (NULL);
- }
-
- if ((lhp = allocp(sizeof (struct ldom_hdl))) == NULL) {
- ldom_pri_fini();
- (void) pthread_mutex_unlock(&ldom_pri_lock);
- return (NULL);
- }
-
- (void) pthread_mutex_unlock(&ldom_pri_lock);
-
- lhp->allocp = allocp;
- lhp->freep = freep;
-
- ldmsvcs_init(lhp);
-
- return (lhp);
-}
-
-
-void
-ldom_fini(ldom_hdl_t *lhp)
-{
- if (lhp == NULL)
- return;
-
- (void) xmpp_remove_client(lhp);
- ldmsvcs_fini(lhp);
- lhp->freep(lhp, sizeof (struct ldom_hdl));
-
- (void) pthread_mutex_lock(&ldom_pri_lock);
-
- ldom_pri_fini();
-
- (void) pthread_mutex_unlock(&ldom_pri_lock);
-}
-
-/* end file */
diff --git a/usr/src/lib/fm/libldom/sparc/ldom.h b/usr/src/lib/fm/libldom/sparc/ldom.h
deleted file mode 100644
index 54b57ff698..0000000000
--- a/usr/src/lib/fm/libldom/sparc/ldom.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _LDOM_H
-#define _LDOM_H
-
-#include <stdlib.h>
-#include <libnvpair.h>
-#include <sys/types.h>
-#include <umem.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct ldom_hdl ldom_hdl_t;
-
-extern ldom_hdl_t *ldom_init(void *(*allocp)(size_t size),
- void (*freep)(void *addr, size_t size));
-extern void ldom_fini(ldom_hdl_t *lhp);
-
-extern int ldom_fmri_status(ldom_hdl_t *lhp, nvlist_t *nvl_fmri);
-extern int ldom_fmri_retire(ldom_hdl_t *lhp, nvlist_t *nvl_fmri);
-extern int ldom_fmri_unretire(ldom_hdl_t *lhp, nvlist_t *nvl_fmri);
-extern int ldom_fmri_blacklist(ldom_hdl_t *lhp, nvlist_t *nvl_fmri);
-extern int ldom_fmri_unblacklist(ldom_hdl_t *lhp, nvlist_t *nvl_fmri);
-
-extern ssize_t ldom_get_core_md(ldom_hdl_t *lhp, uint64_t **buf);
-extern ssize_t ldom_get_local_md(ldom_hdl_t *lhp, uint64_t **buf);
-
-/*
- * domain type
- */
-#define LDOM_TYPE_LEGACY 0x1
-#define LDOM_TYPE_CONTROL 0x2
-#define LDOM_TYPE_ROOT 0x4
-#define LDOM_TYPE_IO 0x8
-#define LDOM_TYPE_ALL \
- (LDOM_TYPE_LEGACY | LDOM_TYPE_CONTROL | LDOM_TYPE_ROOT | LDOM_TYPE_IO)
-#define VALID_LDOM_TYPE(t) ((t) & LDOM_TYPE_ALL)
-
-extern int ldom_get_type(ldom_hdl_t *lhp, uint32_t *type_mask);
-
-/*
- * Resource map
- */
-typedef enum ldom_rsrc {
- LDOM_RSRC_PCI,
- LDOM_RSRC_NIU,
- LDOM_RSRC_MAX
-} ldom_rsrc_t;
-
-extern int
-ldom_find_id(ldom_hdl_t *lhp, uint64_t addr, ldom_rsrc_t type,
- uint64_t *virt_addr, char *name, int name_size, uint64_t *id);
-
-/*
- * event notification
- */
-typedef enum ldom_event {
- LDOM_EVENT_UNKNOWN,
- LDOM_EVENT_ADD,
- LDOM_EVENT_REMOVE,
- LDOM_EVENT_BIND,
- LDOM_EVENT_UNBIND,
- LDOM_EVENT_START,
- LDOM_EVENT_STOP,
- LDOM_EVENT_RESET,
- LDOM_EVENT_PANIC,
- LDOM_EVENT_MAX
-} ldom_event_t;
-#define VALID_LDOM_EVENT(e) ((e) > LDOM_EVENT_UNKNOWN && \
- (e) < LDOM_EVENT_MAX)
-#define MAX_LDOM_NAME 256
-
-typedef void *ldom_cb_arg_t;
-typedef void (*ldom_reg_cb_t)(char *ldom_name, ldom_event_t event,
- ldom_cb_arg_t data);
-extern int ldom_register_event(ldom_hdl_t *lhp, ldom_reg_cb_t cb,
- ldom_cb_arg_t data);
-extern int ldom_unregister_event(ldom_hdl_t *lhp);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _LDOM_H */
diff --git a/usr/src/lib/fm/libldom/sparc/ldom_alloc.c b/usr/src/lib/fm/libldom/sparc/ldom_alloc.c
deleted file mode 100644
index c5c6903111..0000000000
--- a/usr/src/lib/fm/libldom/sparc/ldom_alloc.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#include <umem.h>
-
-void *
-ldom_alloc(size_t size)
-{
- return (umem_alloc(size, UMEM_DEFAULT));
-}
-
-void
-ldom_free(void *data, size_t size)
-{
- umem_free(data, size);
-}
diff --git a/usr/src/lib/fm/libldom/sparc/ldom_alloc.h b/usr/src/lib/fm/libldom/sparc/ldom_alloc.h
deleted file mode 100644
index c73b47dc72..0000000000
--- a/usr/src/lib/fm/libldom/sparc/ldom_alloc.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _LDOM_ALLOC_H
-#define _LDOM_ALLOC_H
-
-#include <sys/types.h>
-#include <umem.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-extern void *ldom_alloc(size_t size);
-extern void ldom_free(void *data, size_t size);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _LDOM_ALLOC_H */
diff --git a/usr/src/lib/fm/libldom/sparc/ldom_utils.c b/usr/src/lib/fm/libldom/sparc/ldom_utils.c
deleted file mode 100644
index c8e3003b33..0000000000
--- a/usr/src/lib/fm/libldom/sparc/ldom_utils.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2010, Oracle and/or its affiliates. All rights reserved.
- */
-
-/*
- * ldom_utils.c
- *
- * Common functions within the library
- *
- */
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <fcntl.h>
-
-boolean_t
-notify_setup(int *notify_pipe)
-{
- if (pipe(notify_pipe) < 0) {
- return (B_FALSE);
- } else {
- (void) fcntl(notify_pipe[1], F_SETFL, O_NONBLOCK);
- }
- return (B_TRUE);
-}
diff --git a/usr/src/lib/fm/libldom/sparc/ldom_utils.h b/usr/src/lib/fm/libldom/sparc/ldom_utils.h
deleted file mode 100644
index 995a956213..0000000000
--- a/usr/src/lib/fm/libldom/sparc/ldom_utils.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2010, Oracle and/or its affiliates. All rights reserved.
- */
-
-/*
- * ldom_utils.h
- */
-
-#ifndef _LDOM_UTILS_H
-#define _LDOM_UTILS_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-extern boolean_t notify_setup(int *);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _LDOM_UTILS_H */
diff --git a/usr/src/lib/fm/libldom/sparc/ldom_xmpp_client.c b/usr/src/lib/fm/libldom/sparc/ldom_xmpp_client.c
deleted file mode 100644
index b12cd868e9..0000000000
--- a/usr/src/lib/fm/libldom/sparc/ldom_xmpp_client.c
+++ /dev/null
@@ -1,828 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
- */
-
-/*
- * ldom_xmpp_client.c Extensible Messaging and Presence Protocol (XMPP)
- *
- * Implement an xmpp client to subscribe for domain events from the ldmd.
- * Notify fmd module clients upon receiving the events.
- *
- */
-
-#include "ldom_xmpp_client.h"
-#include "ldom_alloc.h"
-#include "ldom_utils.h"
-
-#include <stdio.h>
-#include <signal.h>
-#include <strings.h>
-#include <unistd.h>
-#include <errno.h>
-
-#include <netdb.h>
-#include <dlfcn.h>
-#include <fcntl.h>
-#include <sys/socket.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <libxml/parser.h>
-#include <openssl/ssl.h>
-
-typedef enum conn_state {
- CONN_STATE_UNKNOWN,
- CONN_STATE_TLS,
- CONN_STATE_FEATURE,
- CONN_STATE_LDM_INTERFACE,
- CONN_STATE_LDM_EVENT,
- CONN_STATE_DONE,
- CONN_STATE_FAILURE,
- CONN_STATE_MAX
-} conn_state_t;
-
-typedef struct xmpp_conn {
- int fd;
- int state;
- boolean_t tls_started;
- SSL *ssl;
- xmlParserCtxtPtr parser;
-} xmpp_conn_t;
-
-/* Forward declaration */
-static int iowrite(xmpp_conn_t *conn, char *buf, int size);
-static void start_element(void *state, const xmlChar *name,
- const xmlChar **attrs);
-static void end_element(void *state, const xmlChar *name);
-static void error_func(void *state, const char *msg, ...);
-static void xmpp_close(xmpp_conn_t *conn);
-static int start_tls(xmpp_conn_t *conn);
-static void handle_ldm_resp(xmpp_conn_t *conn, char *buf, size_t buf_size);
-static void handle_ldm_event(xmpp_conn_t *conn, char *buf, size_t buf_size);
-
-static int xmpp_enable = 0;
-static int xmpp_notify_pipe[2];
-static pthread_t xmpp_tid = 0;
-static pthread_mutex_t xmpp_tid_lock = PTHREAD_MUTEX_INITIALIZER;
-
-static client_list_t clt_list = { NULL, NULL, PTHREAD_MUTEX_INITIALIZER };
-
-
-#define FUNCTION_ADD(_function, _pointer, _lib, _func_name, _ret) \
- _function = (_pointer)dlsym(_lib, _func_name); \
- if (_function == NULL) { \
- _ret += -1; \
- }
-
-/*
- * Prototypes and pointers to functions needed from libssl.
- */
-typedef void (*SSL_load_error_strings_pt)(void);
-typedef int (*SSL_library_init_pt)(void);
-typedef SSL_CTX *(*SSL_CTX_new_pt)(const SSL_METHOD *method);
-typedef SSL_METHOD *(*SSLv23_client_method_pt)(void);
-typedef int (*SSL_write_pt)(SSL *ssl, const void *buf, int num);
-typedef int (*SSL_CTX_use_PrivateKey_file_pt)(SSL_CTX *ctx, const char *file,
- int type);
-typedef void (*RAND_seed_pt)(const void *buf, int num);
-typedef int (*SSL_get_error_pt)(const SSL *ssl, int ret);
-typedef long (*ERR_get_error_pt)(void);
-typedef char *(*ERR_error_string_pt)(unsigned long e, char *buf);
-typedef int (*SSL_connect_pt)(SSL *ssl);
-typedef int (*SSL_CTX_use_certificate_chain_file_pt)(SSL_CTX *ctx,
- const char *file);
-typedef int (*SSL_set_fd_pt)(SSL *ssl, int fd);
-typedef void (*SSL_free_pt)(SSL *ssl);
-typedef int (*SSL_read_pt)(SSL *ssl, void *buf, int num);
-typedef SSL *(*SSL_new_pt)(SSL_CTX *ctx);
-typedef SSL_CTX *(*SSL_get_SSL_CTX_pt)(const SSL *ssl);
-typedef void (*SSL_CTX_free_pt)(SSL_CTX *ctx);
-
-static SSL_load_error_strings_pt SSL_load_error_strings_f = NULL;
-static SSL_library_init_pt SSL_library_init_f = NULL;
-static SSL_CTX_new_pt SSL_CTX_new_f = NULL;
-static SSLv23_client_method_pt SSLv23_client_method_f = NULL;
-static SSL_write_pt SSL_write_f = NULL;
-static SSL_CTX_use_PrivateKey_file_pt SSL_CTX_use_PrivateKey_file_f = NULL;
-static RAND_seed_pt RAND_seed_f = NULL;
-static SSL_get_error_pt SSL_get_error_f = NULL;
-static ERR_get_error_pt ERR_get_error_f = NULL;
-static ERR_error_string_pt ERR_error_string_f = NULL;
-static SSL_connect_pt SSL_connect_f = NULL;
-static SSL_CTX_use_certificate_chain_file_pt
-SSL_CTX_use_certificate_chain_file_f = NULL;
-static SSL_set_fd_pt SSL_set_fd_f = NULL;
-static SSL_free_pt SSL_free_f = NULL;
-static SSL_read_pt SSL_read_f = NULL;
-static SSL_new_pt SSL_new_f = NULL;
-static SSL_get_SSL_CTX_pt SSL_get_SSL_CTX_f = NULL;
-static SSL_CTX_free_pt SSL_CTX_free_f = NULL;
-
-static void *xmpp_dl = NULL;
-
-static ldom_event_info_t event_table[] = {
- { LDOM_EVENT_UNKNOWN, "unknown" },
- { LDOM_EVENT_ADD, "add-domain" },
- { LDOM_EVENT_REMOVE, "remove-domain" },
- { LDOM_EVENT_BIND, "bind-domain" },
- { LDOM_EVENT_UNBIND, "unbind-domain" },
- { LDOM_EVENT_START, "start-domain" },
- { LDOM_EVENT_STOP, "stop-domain" },
- { LDOM_EVENT_RESET, "domain-reset" },
- { LDOM_EVENT_PANIC, "panic-domain" },
- { LDOM_EVENT_MAX, NULL }
-};
-static int event_table_size = \
- sizeof (event_table) / sizeof (ldom_event_info_t);
-
-static xmlSAXHandler xml_handler = {
- NULL, /* internalSubsetSAXFunc */
- NULL, /* isStandaloneSAXFunc */
- NULL, /* hasInternalSubsetSAXFunc */
- NULL, /* hasExternalSubsetSAXFunc */
- NULL, /* resolveEntitySAXFunc */
- NULL, /* getEntitySAXFunc */
- NULL, /* entityDeclSAXFunc */
- NULL, /* notationDeclSAXFunc */
- NULL, /* attributeDeclSAXFunc */
- NULL, /* elementDeclSAXFunc */
- NULL, /* unparsedEntityDeclSAXFunc */
- NULL, /* setDocumentLocatorSAXFunc */
- NULL, /* startDocumentSAXFunc */
- NULL, /* endDocumentSAXFunc */
- start_element, /* startElementSAXFunc */
- end_element, /* endElementSAXFunc */
- NULL, /* referenceSAXFunc */
- NULL, /* charactersSAXFunc */
- NULL, /* ignorableWhitespaceSAXFunc */
- NULL, /* processingInstructionSAXFunc */
- NULL, /* commentSAXFunc */
- NULL, /* warningSAXFunc */
- error_func, /* errorSAXFunc */
- NULL, /* fatalErrorSAXFunc */
- NULL, /* getParameterEntitySAXFunc */
- NULL, /* cdataBlockSAXFunc */
- NULL, /* externalSubsetSAXFunc */
- 0, /* unsigned int */
- NULL, /* void * _private */
- NULL, /* startElementNsSAX2Func */
- NULL, /* endElementNsSAX2Func */
- NULL /* xmlStructuredErrorFunc */
-};
-
-static void
-end_element(void *state, const xmlChar *name)
-{
- xmpp_conn_t *conn = (xmpp_conn_t *)state;
-
- if (xmlStrcmp(name, STREAM_NODE) == 0) {
- conn->state = CONN_STATE_DONE;
- } else if (xmlStrcmp(name, STARTTLS_NODE) == 0) {
- (void) iowrite(conn, START_TLS, strlen(START_TLS));
- } else if (xmlStrcmp(name, PROCEED_NODE) == 0) {
- if (start_tls(conn)) {
- conn->state = CONN_STATE_FAILURE;
- }
- } else if (xmlStrcmp(name, FEATURE_NODE) == 0) {
- if (conn->state == CONN_STATE_TLS) {
- conn->state = CONN_STATE_FEATURE;
- (void) iowrite(conn, (char *)LDM_REG_DOMAIN_EVENTS,
- strlen((char *)LDM_REG_DOMAIN_EVENTS));
- }
- } else if (xmlStrcmp(name, XML_LDM_INTERFACE) == 0) {
- conn->state = CONN_STATE_LDM_INTERFACE;
- } else if (xmlStrcmp(name, XML_LDM_EVENT) == 0) {
- conn->state = CONN_STATE_LDM_EVENT;
- } else if (xmlStrcmp(name, XML_FAILURE) == 0) {
- conn->state = CONN_STATE_FAILURE;
- }
-}
-
-/*ARGSUSED*/
-static void
-start_element(void *state, const xmlChar *name, const xmlChar **attrs)
-{
-}
-
-/*ARGSUSED*/
-static void
-error_func(void *state, const char *msg, ...)
-{
-}
-
-static int
-xmpp_connect(xmpp_conn_t *conn)
-{
- int sock;
- struct sockaddr_in serveraddr;
-
- if ((sock = socket(AF_INET, SOCK_STREAM, 0)) == -1) {
- return (-1);
- }
-
- serveraddr.sin_family = AF_INET;
- serveraddr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
- serveraddr.sin_port = htons(XMPP_DEFAULT_PORT);
- if (connect(sock, (struct sockaddr *)(&serveraddr),
- sizeof (struct sockaddr_in)) < 0) {
- return (-1);
- }
-
- (void) bzero(conn, sizeof (xmpp_conn_t));
- conn->fd = sock;
- conn->tls_started = B_FALSE;
-
- conn->parser = xmlCreatePushParserCtxt(&xml_handler, (void *) conn,
- NULL, 0, NULL);
- if (conn->parser == NULL) {
- return (-1);
- }
-
- return (0);
-}
-
-static void
-xmpp_close(xmpp_conn_t *conn)
-{
- (void) close(conn->fd);
- conn->fd = -1;
- conn->state = CONN_STATE_UNKNOWN;
- if (conn->parser != NULL) {
- xmlFreeParserCtxt(conn->parser);
- conn->parser = NULL;
- }
- if (conn->tls_started) {
- SSL_free_f(conn->ssl);
- conn->ssl = NULL;
- }
- conn->tls_started = B_FALSE;
-}
-
-static int
-ioread(xmpp_conn_t *conn, char *buf, int size)
-{
- int count;
- if (conn->tls_started) {
- count = SSL_read_f(conn->ssl, buf, size);
- } else {
- count = read(conn->fd, buf, size);
- }
- if (count <= 0) {
- conn->state = CONN_STATE_FAILURE;
- }
-
- return (count);
-}
-
-static int
-iowrite(xmpp_conn_t *conn, char *buf, int size)
-{
- int count;
-
- if (conn->tls_started) {
- count = SSL_write_f(conn->ssl, buf, size);
- } else {
- count = send(conn->fd, buf, size, 0);
- }
- if (count <= 0) {
- conn->state = CONN_STATE_FAILURE;
- }
-
- return (count);
-}
-
-/*
- * notify_event()
- * Description:
- * Notify all clients an event by going through the client list and invoke
- * the callback functions.
- */
-static void
-notify_event(ldom_event_t event, char *ldom_name)
-{
- client_info_t *p;
-
- (void) pthread_mutex_lock(&clt_list.lock);
-
- for (p = clt_list.head; p != NULL; p = p->next) {
- p->cb(ldom_name, event, p->data);
- }
-
- (void) pthread_mutex_unlock(&clt_list.lock);
-}
-
-/*
- * xmpp_client_thr()
- * Description:
- * The main entry fo the xmpp client thread.
- */
-/*ARGSUSED*/
-static void *
-xmpp_client_thr(void *data)
-{
- int rc = 0;
- int cnt;
- char buf[XMPP_BUF_SIZE];
- xmpp_conn_t conn;
- pollfd_t pollfd[2];
- struct pollfd *pipe_fd = &pollfd[0];
- struct pollfd *recv_fd = &pollfd[1];
-
- while (xmpp_enable) {
- /* clear the conn struct */
- bzero(&conn, sizeof (xmpp_conn_t));
-
- /* keep making a connection until successfully */
- do {
- if (rc = xmpp_connect(&conn))
- (void) sleep(XMPP_SLEEP);
- } while (rc != 0 && xmpp_enable);
-
- /* write the stream node */
- cnt = iowrite(&conn, (char *)STREAM_START,
- strlen((char *)STREAM_START));
- if (cnt != strlen((char *)STREAM_START)) {
- xmpp_close(&conn);
- (void) sleep(XMPP_SLEEP);
- continue;
- }
-
- pipe_fd->fd = xmpp_notify_pipe[1]; /* notification pipe */
- pipe_fd->events = POLLIN;
- recv_fd->fd = conn.fd; /* XMPP connection */
- recv_fd->events = POLLIN;
-
- /* process input */
- while ((conn.state != CONN_STATE_FAILURE) &&
- (conn.state != CONN_STATE_DONE) && xmpp_enable) {
-
- /* Wait for xmpp input or the notification */
- pipe_fd->revents = 0;
- recv_fd->revents = 0;
- if (poll(pollfd, 2, -1) <= 0) {
- break;
- } else if (pipe_fd->revents & POLLIN) {
- /* Receive a notification to exit */
- xmpp_close(&conn);
- pthread_exit((void *)NULL);
- }
-
- /*
- * Assume the document size of a ldmd response is
- * less than 1KB. This assumption is valid with the
- * current ldmd implementation.
- * Should the document size exceeds 1KB, the buffer
- * size should be revisited accordingly.
- */
- (void) memset(buf, 0, XMPP_BUF_SIZE);
- cnt = ioread(&conn, buf, XMPP_BUF_SIZE);
- if (cnt <= 0)
- break;
- if (rc = xmlParseChunk(conn.parser, buf, cnt, 0)) {
- conn.state = CONN_STATE_FAILURE;
- }
-
- switch (conn.state) {
- case CONN_STATE_LDM_INTERFACE:
- handle_ldm_resp(&conn, buf, cnt);
- break;
- case CONN_STATE_LDM_EVENT:
- handle_ldm_event(&conn, buf, cnt);
- break;
- default:
- break;
- }
-
- /*
- * For now, the parser is reset after every read.
- * It should only be reset once after the ssl is opened
- * in the start_tls().
- */
- (void) xmlCtxtResetPush(conn.parser, NULL, 0, NULL,
- NULL);
- }
- xmpp_close(&conn);
- (void) sleep(XMPP_SLEEP);
- }
- return (NULL);
-}
-
-/*
- * find_client()
- * Description:
- * Walk to the list to find a libldom client
- */
-static client_info_t *
-find_client(ldom_hdl_t *lhp)
-{
- client_info_t *p;
-
- for (p = clt_list.head; p != NULL; p = p->next) {
- if (p->lhp == lhp)
- return (p);
- }
-
- return (NULL);
-}
-
-/*
- * xmpp_add_client()
- * Description:
- * Add a libldom client from the client list.
- */
-int
-xmpp_add_client(ldom_hdl_t *lhp, ldom_reg_cb_t cb, ldom_cb_arg_t data)
-{
- client_info_t *clt;
-
- (void) pthread_mutex_lock(&clt_list.lock);
- if (find_client(lhp)) {
- /* already exists */
- (void) pthread_mutex_unlock(&clt_list.lock);
- return (-1);
- }
-
- /* new client */
- clt = (client_info_t *)ldom_alloc(sizeof (client_info_t));
- clt->lhp = lhp;
- clt->cb = cb;
- clt->data = data;
- clt->next = NULL;
- clt->prev = NULL;
-
- if (clt_list.head == NULL && clt_list.tail == NULL) {
- clt_list.head = clt;
- clt_list.tail = clt;
- } else {
- /* append to the list */
- clt->prev = clt_list.tail;
- clt_list.tail->next = clt;
- clt_list.tail = clt;
- }
-
- (void) pthread_mutex_unlock(&clt_list.lock);
- return (0);
-}
-
-/*
- * xmpp_remove_client()
- * Description:
- * Remove a libldom client from the client list.
- */
-int
-xmpp_remove_client(ldom_hdl_t *lhp)
-{
- client_info_t *p;
-
- (void) pthread_mutex_lock(&clt_list.lock);
- if ((p = find_client(lhp)) == NULL) {
- /* not present */
- (void) pthread_mutex_unlock(&clt_list.lock);
- return (-1);
- }
-
- if (clt_list.head == p && clt_list.tail == p) {
- /* single item list */
- clt_list.head = NULL;
- clt_list.tail = NULL;
- } else if (clt_list.head == p) {
- /* delete the head */
- clt_list.head = p->next;
- clt_list.head->prev = NULL;
- } else if (clt_list.tail == p) {
- /* delete the tail */
- clt_list.tail = p->prev;
- clt_list.tail->next = NULL;
- } else {
- /* delete a middle node */
- p->next->prev = p->prev;
- p->prev->next = p->next;
- }
- ldom_free(p, sizeof (client_info_t));
-
- (void) pthread_mutex_unlock(&clt_list.lock);
- return (0);
-}
-
-/*
- * xmpp_stop()
- * Description:
- * Stop the xmpp client thread
- */
-/*ARGSUSED*/
-void
-xmpp_stop(void)
-{
- (void) pthread_mutex_lock(&xmpp_tid_lock);
- xmpp_enable = 0;
- if (xmpp_tid) {
- /*
- * Write a byte to the pipe to notify the xmpp thread to exit.
- * Then wait for it to exit.
- */
- (void) write(xmpp_notify_pipe[0], "1", 1);
- (void) pthread_join(xmpp_tid, NULL);
- xmpp_tid = 0;
- }
- (void) pthread_mutex_unlock(&xmpp_tid_lock);
-}
-
-/*
- * xmpp_start()
- * Description:
- * Start the xmpp client thread if have not done so.
- */
-void
-xmpp_start(void)
-{
- xmpp_conn_t conn;
-
- /* Check if the xmmp thread has already started */
- (void) pthread_mutex_lock(&xmpp_tid_lock);
- if (xmpp_tid != 0) {
- (void) pthread_mutex_unlock(&xmpp_tid_lock);
- return;
- }
-
- /* Check if the ldmd supports xmpp by opening a connection */
- if (xmpp_connect(&conn)) {
- (void) pthread_mutex_unlock(&xmpp_tid_lock);
- return;
- }
- xmpp_close(&conn);
- xmpp_enable = 1;
-
- /*
- * create xmpp client thread for receiving domain events.
- * The notification pipe is for stopping the thread.
- */
- (void) notify_setup(xmpp_notify_pipe);
- (void) pthread_create(&xmpp_tid, NULL, xmpp_client_thr, NULL);
-
- (void) pthread_mutex_unlock(&xmpp_tid_lock);
-
- /*
- * Register a function to stop the above thread upon a termination
- */
- (void) atexit(xmpp_stop);
-}
-
-/*
- * This routine will run through the first time we get a remote XMPP
- * connection. After that we will not need to do this again. It cannot be run
- * from main thread at start as we need to alert remote users if the TLS
- * handshake failed.
- */
-static int
-load_SSL_lib()
-{
- int ret = 0;
-
- /* If we have already opened the library no need to do it again. */
- if (xmpp_dl != NULL)
- return (0);
-
- /*
- * If the libssl.so in not in the default path, attempt to open it
- * under /usr/sfw/lib.
- */
- xmpp_dl = dlopen("libssl.so", RTLD_NOW);
- if (xmpp_dl == NULL) {
- xmpp_dl = dlopen("/usr/sfw/lib/libssl.so", RTLD_NOW);
- if (xmpp_dl == NULL)
- return (-1);
- }
-
- FUNCTION_ADD(SSL_load_error_strings_f, SSL_load_error_strings_pt,
- xmpp_dl, "SSL_load_error_strings", ret);
- FUNCTION_ADD(SSL_library_init_f, SSL_library_init_pt, xmpp_dl,
- "SSL_library_init", ret);
- FUNCTION_ADD(SSL_CTX_new_f, SSL_CTX_new_pt, xmpp_dl,
- "SSL_CTX_new", ret);
- FUNCTION_ADD(SSLv23_client_method_f, SSLv23_client_method_pt, xmpp_dl,
- "SSLv23_client_method", ret);
- FUNCTION_ADD(SSL_write_f, SSL_write_pt, xmpp_dl, "SSL_write", ret);
- FUNCTION_ADD(SSL_CTX_use_PrivateKey_file_f,
- SSL_CTX_use_PrivateKey_file_pt, xmpp_dl,
- "SSL_CTX_use_PrivateKey_file", ret);
- FUNCTION_ADD(RAND_seed_f, RAND_seed_pt, xmpp_dl, "RAND_seed", ret);
- FUNCTION_ADD(SSL_get_error_f, SSL_get_error_pt, xmpp_dl,
- "SSL_get_error", ret);
- FUNCTION_ADD(ERR_get_error_f, ERR_get_error_pt, xmpp_dl,
- "ERR_get_error", ret);
- FUNCTION_ADD(ERR_error_string_f, ERR_error_string_pt, xmpp_dl,
- "ERR_error_string", ret);
- FUNCTION_ADD(SSL_connect_f, SSL_connect_pt, xmpp_dl, "SSL_connect",
- ret);
- FUNCTION_ADD(SSL_CTX_use_certificate_chain_file_f,
- SSL_CTX_use_certificate_chain_file_pt, xmpp_dl,
- "SSL_CTX_use_certificate_chain_file", ret);
- FUNCTION_ADD(SSL_set_fd_f, SSL_set_fd_pt, xmpp_dl, "SSL_set_fd", ret);
- FUNCTION_ADD(SSL_free_f, SSL_free_pt, xmpp_dl, "SSL_free", ret);
- FUNCTION_ADD(SSL_read_f, SSL_read_pt, xmpp_dl, "SSL_read", ret);
- FUNCTION_ADD(SSL_new_f, SSL_new_pt, xmpp_dl, "SSL_new", ret);
- FUNCTION_ADD(SSL_get_SSL_CTX_f, SSL_get_SSL_CTX_pt, xmpp_dl,
- "SSL_get_SSL_CTX", ret);
- FUNCTION_ADD(SSL_CTX_free_f, SSL_CTX_free_pt, xmpp_dl,
- "SSL_CTX_free", ret);
-
- if (ret < 0)
- return (-1);
- else
- return (0);
-}
-
-/*
- * start_tls()
- * Description:
- * Load the libssl.so if has not done so and open a ssl connection.
- * It is assumed that there is one xmpp thread to use the ssl connection.
- * If multi-thread xmpp clients use the ssl connection, addtional work is
- * needed to ensure the usage of the ssl be thread-safe.
- */
-static int
-start_tls(xmpp_conn_t *conn)
-{
- int rv, urand_fd;
- SSL_CTX *ssl_ctx;
- char rand_buf[RAND_BUF_SIZE];
-
- rv = load_SSL_lib();
- if (rv == -1) {
- return (rv);
- }
-
- urand_fd = open("/dev/random", O_RDONLY);
- if (urand_fd == -1) {
- return (-1);
- }
- (void) read(urand_fd, rand_buf, RAND_BUF_SIZE);
-
- SSL_library_init_f();
- RAND_seed_f(rand_buf, RAND_BUF_SIZE);
-
- ssl_ctx = SSL_CTX_new_f(SSLv23_client_method_f());
- if (ssl_ctx == NULL) {
- return (-1);
- }
- conn->ssl = SSL_new_f(ssl_ctx);
- rv = SSL_set_fd_f(conn->ssl, conn->fd);
- if (rv == 0) {
- return (-1);
- }
- rv = SSL_connect_f(conn->ssl);
- if (rv != 1) {
- return (-1);
- }
- conn->tls_started = B_TRUE;
- conn->state = CONN_STATE_TLS;
-
- (void) iowrite(conn, STREAM_START, strlen(STREAM_START));
-
- return (0);
-}
-
-/*
- * Find and return the first-level subnode (if any) of 'node' which has name
- * 'name'.
- */
-xmlNodePtr
-xml_find_subnode(xmlNodePtr node, const xmlChar *name)
-{
- xmlNodePtr subnode;
-
- if (node == NULL)
- return (NULL);
-
- subnode = node->xmlChildrenNode;
- while (subnode != NULL) {
- if (((char *)subnode->name != NULL) &&
- (xmlStrcmp(subnode->name, name) == 0))
- break;
- subnode = subnode->next;
- }
-
- return (subnode);
-}
-
-/*
- * handle_ldm_resp()
- * Description:
- * Parse the ldmd response of the domain event registration for the failure
- * status. If found, set the connection to failure so that it will be
- * closed and a new xmpp connection is established.
- */
-void
-handle_ldm_resp(xmpp_conn_t *conn, char *buf, size_t buf_size)
-{
- xmlDocPtr xml_output;
- xmlNodePtr root, resp, status, cmd, action;
- char *status_str, *action_str;
-
- if ((xml_output = xmlParseMemory((const char *)buf, buf_size)) == NULL)
- return;
- if ((root = xmlDocGetRootElement(xml_output)) == NULL)
- return;
-
- /* get the cmd node */
- if ((cmd = xml_find_subnode(root, XML_CMD)) == NULL)
- return;
- if (strcmp((char *)cmd->name, (char *)XML_CMD) != 0)
- return;
-
- /* get the action node and make sure it is the reg-domain-events */
- if ((action = xml_find_subnode(cmd, XML_ACTION)) == NULL) {
- return;
- }
- if ((action_str = (char *)xmlNodeGetContent(action)) == NULL)
- return;
- if (strcmp(action_str, XML_REGISTER_ACTION) != 0) {
- xmlFree(action_str);
- return;
- }
- xmlFree(action_str);
-
- /* check the status of the response */
- if ((resp = xml_find_subnode(cmd, XML_RESPONSE)) == NULL)
- return;
- if ((status = xml_find_subnode(resp, XML_STATUS)) == NULL)
- return;
- if ((status_str = (char *)xmlNodeGetContent(status)) == NULL)
- return;
- if (strcmp(status_str, (char *)XML_FAILURE) == 0) {
- conn->state = CONN_STATE_FAILURE;
- }
- xmlFree(status_str);
-}
-
-/*
- * handle_ldm_event()
- * Description:
- * Parse the LDM_event for the ldom name and domain action. Then invokes
- * the clients's callback to notify them the event.
- */
-/*ARGSUSED*/
-void
-handle_ldm_event(xmpp_conn_t *conn, char *buf, size_t buf_size)
-{
- int i;
- xmlDocPtr xml_output;
- xmlNodePtr root, cmd, action, data, envelope, content;
- char *action_str, *ldom_name;
- ldom_event_t event = LDOM_EVENT_UNKNOWN;
-
- if ((xml_output = xmlParseMemory((const char *)buf, buf_size)) == NULL)
- return;
- if ((root = xmlDocGetRootElement(xml_output)) == NULL)
- return;
-
- /* get the action such as bind-domain, unbind-domain, etc. */
- if ((cmd = xml_find_subnode(root, XML_CMD)) == NULL)
- return;
- if ((action = xml_find_subnode(cmd, XML_ACTION)) == NULL) {
- return;
- }
- if ((action_str = (char *)xmlNodeGetContent(action)) == NULL)
- return;
- for (i = 0; i < event_table_size; i++) {
- if (event_table[i].name != NULL &&
- strcasecmp(event_table[i].name, action_str) == 0) {
- event = event_table[i].id;
- break;
- }
- }
- xmlFree(action_str);
-
- /* get the ldom name */
- data = xml_find_subnode(cmd, XML_DATA);
- envelope = xml_find_subnode(data, XML_ENVELOPE);
- content = xml_find_subnode(envelope, XML_CONTENT);
- if ((ldom_name = (char *)xmlGetProp(content, XML_ATTR_ID)) == NULL)
- return;
-
- /* Notifies all the clients the event */
- if (VALID_LDOM_EVENT(event)) {
- notify_event(event, ldom_name);
- }
-
- xmlFree(ldom_name);
-}
diff --git a/usr/src/lib/fm/libldom/sparc/ldom_xmpp_client.h b/usr/src/lib/fm/libldom/sparc/ldom_xmpp_client.h
deleted file mode 100644
index aa19f41cd4..0000000000
--- a/usr/src/lib/fm/libldom/sparc/ldom_xmpp_client.h
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * ldom_xmpp_client.h Extensible Messaging and Presence Protocol
- */
-
-#ifndef _LDOM_XMPP_CLIENT_H
-#define _LDOM_XMPP_CLIENT_H
-
-#include <sys/fm/ldom.h>
-
-#include <pthread.h>
-#include <libxml/xmlstring.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define XMPP_DEFAULT_PORT 6482
-#define XMPP_BUF_SIZE 1024
-#define RAND_BUF_SIZE 1024
-#define XMPP_SLEEP 3
-
-#define STREAM_NODE (xmlChar *)"stream:stream"
-#define FEATURE_NODE (xmlChar *)"stream:features"
-#define STARTTLS_NODE (xmlChar *)"starttls"
-#define PROCEED_NODE (xmlChar *)"proceed"
-#define XML_LDM_INTERFACE ((xmlChar *)"LDM_interface")
-#define XML_LDM_EVENT ((xmlChar *)"LDM_event")
-
-#define XML_SUCCESS ((xmlChar *)"success")
-#define XML_FAILURE ((xmlChar *)"failure")
-
-#define XML_CMD ((xmlChar *)"cmd")
-#define XML_ACTION ((xmlChar *)"action")
-#define XML_RESPONSE ((xmlChar *)"response")
-#define XML_STATUS ((xmlChar *)"status")
-#define XML_DATA ((xmlChar *)"data")
-#define XML_ENVELOPE ((xmlChar *)"Envelope")
-#define XML_CONTENT ((xmlChar *)"Content")
-
-#define XML_ATTR_ID ((xmlChar *)"id")
-
-#define XML_REGISTER_ACTION "reg-domain-events"
-
-#define STREAM_START "<?xml version='1.0'?><stream:stream " \
- "xml:lang=\"en\" version=\"1.0\" id=\"xmpp\"" \
- ">"
-#define START_TLS "<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>"
-
-#define LDM_REG_DOMAIN_EVENTS \
- "<LDM_interface version=\"1.1\">" \
- " <cmd>" \
- " <action>reg-domain-events</action>" \
- " <data version=\"3.0\"> </data>" \
- " </cmd>" \
- "</LDM_interface>"
-
-
-typedef struct ldom_event_info {
- ldom_event_t id;
- char *name;
-} ldom_event_info_t;
-
-
-typedef struct client_info {
- ldom_hdl_t *lhp;
- ldom_reg_cb_t cb;
- ldom_cb_arg_t data;
- struct client_info *next;
- struct client_info *prev;
-} client_info_t;
-
-typedef struct client_list {
- client_info_t *head;
- client_info_t *tail;
- pthread_mutex_t lock;
-} client_list_t;
-
-
-extern int xmpp_add_client(ldom_hdl_t *lhp, ldom_reg_cb_t cb,
- ldom_cb_arg_t data);
-extern int xmpp_remove_client(ldom_hdl_t *lhp);
-extern void xmpp_start(void);
-extern void xmpp_stop(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _LDOM_XMPP_CLIENT_H */
diff --git a/usr/src/lib/fm/libldom/sparc/mapfile-vers b/usr/src/lib/fm/libldom/sparc/mapfile-vers
deleted file mode 100644
index 5b7f6d71e3..0000000000
--- a/usr/src/lib/fm/libldom/sparc/mapfile-vers
+++ /dev/null
@@ -1,58 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
-#
-
-#
-# MAPFILE HEADER START
-#
-# WARNING: STOP NOW. DO NOT MODIFY THIS FILE.
-# Object versioning must comply with the rules detailed in
-#
-# usr/src/lib/README.mapfiles
-#
-# You should not be making modifications here until you've read the most current
-# copy of that file. If you need help, contact a gatekeeper for guidance.
-#
-# MAPFILE HEADER END
-#
-
-$mapfile_version 2
-
-SYMBOL_VERSION SUNWprivate {
- global:
- ldom_fini;
- ldom_find_id;
- ldom_fmri_blacklist;
- ldom_fmri_unblacklist;
- ldom_fmri_retire;
- ldom_fmri_unretire;
- ldom_fmri_status;
- ldom_get_core_md;
- ldom_get_local_md;
- ldom_get_type;
- ldom_init;
- ldom_register_event;
- ldom_unregister_event;
- local:
- *;
-};
diff --git a/usr/src/lib/fm/libldom/sparcv9/Makefile b/usr/src/lib/fm/libldom/sparcv9/Makefile
deleted file mode 100644
index c641c73a5c..0000000000
--- a/usr/src/lib/fm/libldom/sparcv9/Makefile
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-MACH_LDLIBS = -L$(ROOT)/usr/lib/fm/$(MACH64)
-
-include ../Makefile.com
-include ../../../Makefile.lib.64
-
-DYNFLAGS += -R/usr/lib/fm/$(MACH64)
-
-install: all $(ROOTLIBS64) $(ROOTLINKS64)
diff --git a/usr/src/lib/fm/libmdesc/Makefile b/usr/src/lib/fm/libmdesc/Makefile
deleted file mode 100644
index a3c7959a98..0000000000
--- a/usr/src/lib/fm/libmdesc/Makefile
+++ /dev/null
@@ -1,56 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2006 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-include ../../Makefile.lib
-include ../Makefile.lib
-
-FMHDRS =
-HDRDIR = common
-
-SUBDIRS = $(MACH)
-$(BUILD64)SUBDIRS += $(MACH64)
-
-all := TARGET = all
-clean := TARGET = clean
-clobber := TARGET = clobber
-install := TARGET = install
-
-.KEEP_STATE:
-
-all clean clobber: $(SUBDIRS)
-
-install: install_h .WAIT $(SUBDIRS)
-
-install_h: $(ROOTFMHDRS)
-
-check: $(CHECKHDRS)
-
-$(SUBDIRS): FRC
- @cd $@; pwd; $(MAKE) $(TARGET)
-
-FRC:
-
-include ../../Makefile.targ
-include ../Makefile.targ
diff --git a/usr/src/lib/fm/libmdesc/Makefile.com b/usr/src/lib/fm/libmdesc/Makefile.com
deleted file mode 100644
index bdc979605c..0000000000
--- a/usr/src/lib/fm/libmdesc/Makefile.com
+++ /dev/null
@@ -1,67 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
-#
-
-LIBRARY = libmdesc.a
-VERS = .1
-
-LIBSRCS = \
- mdesc_fini.c \
- mdesc_findname.c \
- mdesc_findnodeprop.c \
- mdesc_getproparcs.c \
- mdesc_getpropdata.c \
- mdesc_getpropstr.c \
- mdesc_getpropval.c \
- mdesc_init_intern.c \
- mdesc_nodecount.c \
- mdesc_scandag.c \
- mdesc_walkdag.c
-
-OBJECTS = $(LIBSRCS:%.c=%.o)
-
-include ../../../Makefile.lib
-include ../../Makefile.lib
-
-SRCS = $(LIBSRCS:%.c=$(SRC)/common/mdesc/%.c)
-
-LIBS = $(DYNLIB)
-
-SRCDIR = ../common
-
-CPPFLAGS += -I../common -I.
-CFLAGS += $(CCVERBOSE) $(C_BIGPICFLAGS)
-CFLAGS64 += $(CCVERBOSE) $(C_BIGPICFLAGS64)
-LDLIBS += -lc
-
-
-.KEEP_STATE:
-
-all: $(LIBS)
-
-pics/%.o: $(SRC)/common/mdesc/%.c
- $(COMPILE.c) -o $@ $<
- $(POST_PROCESS_O)
-
-include ../../../Makefile.targ
-include ../../Makefile.targ
diff --git a/usr/src/lib/fm/libmdesc/common/mapfile-vers b/usr/src/lib/fm/libmdesc/common/mapfile-vers
deleted file mode 100644
index 3ba3cfd4fc..0000000000
--- a/usr/src/lib/fm/libmdesc/common/mapfile-vers
+++ /dev/null
@@ -1,56 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
-#
-
-#
-# MAPFILE HEADER START
-#
-# WARNING: STOP NOW. DO NOT MODIFY THIS FILE.
-# Object versioning must comply with the rules detailed in
-#
-# usr/src/lib/README.mapfiles
-#
-# You should not be making modifications here until you've read the most current
-# copy of that file. If you need help, contact a gatekeeper for guidance.
-#
-# MAPFILE HEADER END
-#
-
-$mapfile_version 2
-
-SYMBOL_VERSION SUNWprivate {
- global:
- md_find_name;
- md_find_node_prop;
- md_fini;
- md_get_prop_arcs;
- md_get_prop_data;
- md_get_prop_str;
- md_get_prop_val;
- md_init_intern;
- md_node_count;
- md_scan_dag;
- md_walk_dag;
- local:
- *;
-};
diff --git a/usr/src/lib/fm/libmdesc/sparc/Makefile b/usr/src/lib/fm/libmdesc/sparc/Makefile
deleted file mode 100644
index 282da97a76..0000000000
--- a/usr/src/lib/fm/libmdesc/sparc/Makefile
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2006 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-include ../Makefile.com
-
-install: all $(ROOTLIBS) $(ROOTLINKS)
diff --git a/usr/src/lib/fm/libmdesc/sparcv9/Makefile b/usr/src/lib/fm/libmdesc/sparcv9/Makefile
deleted file mode 100644
index 9ebd5174c4..0000000000
--- a/usr/src/lib/fm/libmdesc/sparcv9/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2006 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-include ../Makefile.com
-include ../../../Makefile.lib.64
-
-install: all $(ROOTLIBS64) $(ROOTLINKS64)
diff --git a/usr/src/lib/fm/libseslog/sparc/Makefile b/usr/src/lib/fm/libseslog/sparc/Makefile
deleted file mode 100644
index 68ca1b3183..0000000000
--- a/usr/src/lib/fm/libseslog/sparc/Makefile
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 (c) 2010, Oracle and/or its affiliates. All rights reserved.
-#
-include ../Makefile.com
-
-install: all $(ROOTLIBS) $(ROOTLINKS)
diff --git a/usr/src/lib/fm/libseslog/sparcv9/Makefile b/usr/src/lib/fm/libseslog/sparcv9/Makefile
deleted file mode 100644
index 911f84d980..0000000000
--- a/usr/src/lib/fm/libseslog/sparcv9/Makefile
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 (c) 2010, Oracle and/or its affiliates. All rights reserved.
-#
-include ../Makefile.com
-include ../../../Makefile.lib.64
-
-install: all $(ROOTLIBS64) $(ROOTLINKS64)
diff --git a/usr/src/lib/fm/topo/libtopo/sparc/Makefile b/usr/src/lib/fm/topo/libtopo/sparc/Makefile
deleted file mode 100644
index 1ed4f42d3b..0000000000
--- a/usr/src/lib/fm/topo/libtopo/sparc/Makefile
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-include ../Makefile.com
-
-CPPFLAGS += -I $(ROOT)/usr/platform/sun4v/include
-LDLIBS += -L$(ROOTLIBDIR)
-
-LDLIBS += -lzfs
-
-install: all $(ROOTLIBS) $(ROOTLINKS)
diff --git a/usr/src/lib/fm/topo/libtopo/sparcv9/Makefile b/usr/src/lib/fm/topo/libtopo/sparcv9/Makefile
deleted file mode 100644
index 7987e15fa0..0000000000
--- a/usr/src/lib/fm/topo/libtopo/sparcv9/Makefile
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-include ../Makefile.com
-include ../../../../Makefile.lib.64
-
-CPPFLAGS += -I $(ROOT)/usr/platform/sun4v/include
-LDLIBS += -L$(ROOTLIBDIR64)
-
-LDLIBS += -lzfs
-
-install: all $(ROOTLIBS64) $(ROOTLINKS64)
diff --git a/usr/src/lib/fm/topo/maps/Makefile b/usr/src/lib/fm/topo/maps/Makefile
index db3ec89603..750bf7b6c8 100644
--- a/usr/src/lib/fm/topo/maps/Makefile
+++ b/usr/src/lib/fm/topo/maps/Makefile
@@ -24,24 +24,9 @@
# Use is subject to license terms.
# Copyright 2020 Joyent, Inc.
# Copyright 2019 Peter Tribble.
+# Copyright 2022 Garrett D'Amore
#
-sparc_SUBDIRS = sun4u \
- sun4v \
- sparc \
- SUNW,Sun-Fire \
- SUNW,Sun-Fire-T200 \
- SUNW,SPARC-Enterprise \
- SUNW,Sun-Blade-T6300 \
- SUNW,Sun-Blade-T6320 \
- SUNW,SPARC-Enterprise-T5120 \
- SUNW,T5140 \
- SUNW,Netra-CP3060 \
- SUNW,Netra-CP3260 \
- SUNW,USBRDT-5240 \
- SUNW,Netra-T5220 \
- SUNW,Netra-T5440
-
i386_SUBDIRS = i86pc \
i386 \
SUNW,Sun-Fire-X4200-Server \
diff --git a/usr/src/lib/fm/topo/maps/SUNW,Netra-CP3060/Makefile b/usr/src/lib/fm/topo/maps/SUNW,Netra-CP3060/Makefile
deleted file mode 100644
index c014b47667..0000000000
--- a/usr/src/lib/fm/topo/maps/SUNW,Netra-CP3060/Makefile
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-PLATFORMS = SUNW,Netra-CP3060
-CLASS = platform
-DTDFILE = topology.dtd.1
-TOPOFILE = Netra-CP3060-hc-topology.xml
-
-SRCDIR = ../SUNW,Netra-CP3060
-
-include ../Makefile.map
diff --git a/usr/src/lib/fm/topo/maps/SUNW,Netra-CP3060/Netra-CP3060-hc-topology.xml b/usr/src/lib/fm/topo/maps/SUNW,Netra-CP3060/Netra-CP3060-hc-topology.xml
deleted file mode 100644
index 676515f705..0000000000
--- a/usr/src/lib/fm/topo/maps/SUNW,Netra-CP3060/Netra-CP3060-hc-topology.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE topology SYSTEM "/usr/share/lib/xml/dtd/topology.dtd.1">
-<!--
- Copyright 2008 Sun Microsystems, Inc. All rights reserved.
- Use is subject to license terms.
-
- 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
- or http://www.opensolaris.org/os/licensing.
- 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
-
- ident "%Z%%M% %I% %E% SMI"
--->
-
-<topology name='SUNW,Netra-CP3060' scheme='hc'>
- <range name='motherboard' min='0' max='0'>
- <enum-method name='motherboard' version='1' />
- <dependents grouping='children'>
- <range name='chip' min='0' max='32'>
- <enum-method name='chip' version='1' />
- </range>
- <range name='hostbridge' min='0' max='254'>
- <enum-method name='hostbridge' version='1' />
- </range>
- </dependents>
- </range>
-
- <range name='ses-enclosure' min='0' max='1024'>
- <enum-method name='ses' version='1' />
- </range>
-</topology>
diff --git a/usr/src/lib/fm/topo/maps/SUNW,Netra-CP3260/Makefile b/usr/src/lib/fm/topo/maps/SUNW,Netra-CP3260/Makefile
deleted file mode 100644
index b4c16369d3..0000000000
--- a/usr/src/lib/fm/topo/maps/SUNW,Netra-CP3260/Makefile
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-PLATFORMS = SUNW,Netra-CP3260
-CLASS = platform
-DTDFILE = topology.dtd.1
-TOPOFILE = Netra-CP3260-hc-topology.xml
-
-SRCDIR = ../SUNW,Netra-CP3260
-
-include ../Makefile.map
diff --git a/usr/src/lib/fm/topo/maps/SUNW,Netra-CP3260/Netra-CP3260-hc-topology.xml b/usr/src/lib/fm/topo/maps/SUNW,Netra-CP3260/Netra-CP3260-hc-topology.xml
deleted file mode 100644
index 137812ffba..0000000000
--- a/usr/src/lib/fm/topo/maps/SUNW,Netra-CP3260/Netra-CP3260-hc-topology.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE topology SYSTEM "/usr/share/lib/xml/dtd/topology.dtd.1">
-<!--
- Copyright 2008 Sun Microsystems, Inc. All rights reserved.
- Use is subject to license terms.
-
- 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
- or http://www.opensolaris.org/os/licensing.
- 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
-
- ident "%Z%%M% %I% %E% SMI"
--->
-
-<topology name='SUNW,Netra-CP3260' scheme='hc'>
- <range name='motherboard' min='0' max='0'>
- <enum-method name='motherboard' version='1'/>
-
- <dependents grouping='children'>
- <range name='chip' min='0' max='0'>
- <enum-method name='chip' version='1'/>
-
- <dependents grouping='children'>
- <range name='hostbridge' min='0' max='254'>
- <enum-method name='hostbridge' version='1'/>
-
- <dependents grouping='children'>
- <range name='niu' min='0' max='0'>
- <enum-method name='niu' version='1'/>
- </range>
- </dependents>
-
- </range>
- </dependents>
-
- </range>
- </dependents>
-
- </range>
-
- <range name='ses-enclosure' min='0' max='1024'>
- <enum-method name='ses' version='1' />
- </range>
-</topology>
diff --git a/usr/src/lib/fm/topo/maps/SUNW,Netra-T5220/Makefile b/usr/src/lib/fm/topo/maps/SUNW,Netra-T5220/Makefile
deleted file mode 100644
index 5b10ea2a3f..0000000000
--- a/usr/src/lib/fm/topo/maps/SUNW,Netra-T5220/Makefile
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-PLATFORMS = SUNW,Netra-T5220
-CLASS = platform
-DTDFILE = topology.dtd.1
-TOPOFILE = Netra-T5220-hc-topology.xml
-SRCDIR = ../SUNW,Netra-T5220
-
-include ../Makefile.map
diff --git a/usr/src/lib/fm/topo/maps/SUNW,Netra-T5220/Netra-T5220-hc-topology.xml b/usr/src/lib/fm/topo/maps/SUNW,Netra-T5220/Netra-T5220-hc-topology.xml
deleted file mode 100644
index 04f197f2a3..0000000000
--- a/usr/src/lib/fm/topo/maps/SUNW,Netra-T5220/Netra-T5220-hc-topology.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE topology SYSTEM "/usr/share/lib/xml/dtd/topology.dtd.1">
-<!--
- Copyright 2008 Sun Microsystems, Inc. All rights reserved.
- Use is subject to license terms.
-
- 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
- or http://www.opensolaris.org/os/licensing.
- 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
-
- ident "%Z%%M% %I% %E% SMI"
--->
-
-<topology name='SUNW,Netra-T5220' scheme='hc'>
- <range name='motherboard' min='0' max='0'>
- <enum-method name='motherboard' version='1'/>
-
- <dependents grouping='children'>
- <range name='chip' min='0' max='0'>
- <enum-method name='chip' version='1'/>
-
- <dependents grouping='children'>
- <range name='hostbridge' min='0' max='254'>
- <enum-method name='hostbridge' version='1' />
-
- <dependents grouping='children'>
- <range name='niu' min='0' max='0'>
- <enum-method name='niu' version='1'/>
- </range>
- </dependents>
- </range>
- </dependents>
- </range>
- </dependents>
-
- </range>
-
- <range name='ses-enclosure' min='0' max='1024'>
- <enum-method name='ses' version='1' />
- </range>
-</topology>
diff --git a/usr/src/lib/fm/topo/maps/SUNW,Netra-T5440/Makefile b/usr/src/lib/fm/topo/maps/SUNW,Netra-T5440/Makefile
deleted file mode 100644
index 79d0c1e67b..0000000000
--- a/usr/src/lib/fm/topo/maps/SUNW,Netra-T5440/Makefile
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-PLATFORMS = SUNW,Netra-T5440
-CLASS = platform
-DTDFILE = topology.dtd.1
-TOPOFILE = Netra-T5440-hc-topology.xml
-SRCDIR = ../SUNW,Netra-T5440
-
-include ../Makefile.map
diff --git a/usr/src/lib/fm/topo/maps/SUNW,Netra-T5440/Netra-T5440-hc-topology.xml b/usr/src/lib/fm/topo/maps/SUNW,Netra-T5440/Netra-T5440-hc-topology.xml
deleted file mode 100644
index c6ec70f7df..0000000000
--- a/usr/src/lib/fm/topo/maps/SUNW,Netra-T5440/Netra-T5440-hc-topology.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE topology SYSTEM "/usr/share/lib/xml/dtd/topology.dtd.1">
-<!--
- Copyright 2008 Sun Microsystems, Inc. All rights reserved.
- Use is subject to license terms.
-
- 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
- or http://www.opensolaris.org/os/licensing.
- 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
-
- ident "%Z%%M% %I% %E% SMI"
--->
-
-<topology name='SUNW,Netra-T5440' scheme='hc'>
- <range name='motherboard' min='0' max='0'>
- <enum-method name='motherboard' version='1'/>
-
- <dependents grouping='children'>
- <range name='chip' min='0' max='1'>
- <enum-method name='chip' version='1'/>
- </range>
- </dependents>
-
- <dependents grouping='children'>
- <range name='hostbridge' min='0' max='254'>
- <enum-method name='hostbridge' version='1'/>
- </range>
- </dependents>
-
- </range>
-
- <range name='ses-enclosure' min='0' max='1024'>
- <enum-method name='ses' version='1' />
- </range>
-</topology>
diff --git a/usr/src/lib/fm/topo/maps/SUNW,SPARC-Enterprise-T5120/Makefile b/usr/src/lib/fm/topo/maps/SUNW,SPARC-Enterprise-T5120/Makefile
deleted file mode 100644
index 934ffd36b7..0000000000
--- a/usr/src/lib/fm/topo/maps/SUNW,SPARC-Enterprise-T5120/Makefile
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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.
-#
-
-PLATFORMS = SUNW,SPARC-Enterprise-T5120
-CLASS = platform
-DTDFILE = topology.dtd.1
-TOPOFILE = SPARC-Enterprise-T5120-hc-topology.xml \
- SPARC-Enterprise-T5220-hc-topology.xml
-SRCDIR = ../SUNW,SPARC-Enterprise-T5120
-
-include ../Makefile.map
diff --git a/usr/src/lib/fm/topo/maps/SUNW,SPARC-Enterprise-T5120/SPARC-Enterprise-T5120-hc-topology.xml b/usr/src/lib/fm/topo/maps/SUNW,SPARC-Enterprise-T5120/SPARC-Enterprise-T5120-hc-topology.xml
deleted file mode 100644
index b6e86d85c6..0000000000
--- a/usr/src/lib/fm/topo/maps/SUNW,SPARC-Enterprise-T5120/SPARC-Enterprise-T5120-hc-topology.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE topology SYSTEM "/usr/share/lib/xml/dtd/topology.dtd.1">
-<!--
- Copyright 2008 Sun Microsystems, Inc. All rights reserved.
- Use is subject to license terms.
-
- 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
- or http://www.opensolaris.org/os/licensing.
- 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
-
- ident "%Z%%M% %I% %E% SMI"
--->
-
-<topology name='SUNW,SPARC-Enterprise-T5120' scheme='hc'>
- <range name='motherboard' min='0' max='0'>
- <enum-method name='motherboard' version='1'/>
-
- <dependents grouping='children'>
- <range name='chip' min='0' max='0'>
- <enum-method name='chip' version='1'/>
-
- <dependents grouping='children'>
- <range name='hostbridge' min='0' max='254'>
- <enum-method name='hostbridge' version='1'/>
-
- <dependents grouping='children'>
- <range name='niu' min='0' max='0'>
- <enum-method name='niu' version='1'/>
- </range>
- </dependents>
-
- </range>
- </dependents>
-
- </range>
- </dependents>
-
- </range>
- <range name='ses-enclosure' min='0' max='1024'>
- <enum-method name='ses' version='1' />
- </range>
-</topology>
diff --git a/usr/src/lib/fm/topo/maps/SUNW,SPARC-Enterprise-T5120/SPARC-Enterprise-T5220-hc-topology.xml b/usr/src/lib/fm/topo/maps/SUNW,SPARC-Enterprise-T5120/SPARC-Enterprise-T5220-hc-topology.xml
deleted file mode 100644
index c154722f58..0000000000
--- a/usr/src/lib/fm/topo/maps/SUNW,SPARC-Enterprise-T5120/SPARC-Enterprise-T5220-hc-topology.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE topology SYSTEM "/usr/share/lib/xml/dtd/topology.dtd.1">
-<!--
- Copyright 2008 Sun Microsystems, Inc. All rights reserved.
- Use is subject to license terms.
-
- 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
- or http://www.opensolaris.org/os/licensing.
- 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
-
- ident "%Z%%M% %I% %E% SMI"
--->
-
-<topology name='SUNW,SPARC-Enterprise-T5220' scheme='hc'>
- <range name='motherboard' min='0' max='0'>
- <enum-method name='motherboard' version='1'/>
-
- <dependents grouping='children'>
- <range name='chip' min='0' max='0'>
- <enum-method name='chip' version='1'/>
-
- <dependents grouping='children'>
- <range name='hostbridge' min='0' max='254'>
- <enum-method name='hostbridge' version='1' />
-
- <dependents grouping='children'>
- <range name='niu' min='0' max='0'>
- <enum-method name='niu' version='1'/>
- </range>
- </dependents>
-
- </range>
- </dependents>
- </range>
-
- </dependents>
-
- </range>
- <range name='ses-enclosure' min='0' max='1024'>
- <enum-method name='ses' version='1' />
- </range>
-</topology>
diff --git a/usr/src/lib/fm/topo/maps/SUNW,SPARC-Enterprise/Makefile b/usr/src/lib/fm/topo/maps/SUNW,SPARC-Enterprise/Makefile
deleted file mode 100644
index 6b5c129ab6..0000000000
--- a/usr/src/lib/fm/topo/maps/SUNW,SPARC-Enterprise/Makefile
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-PLATFORMS = SUNW,SPARC-Enterprise
-CLASS = platform
-DTDFILE = topology.dtd.1
-TOPOFILE = SPARC-Enterprise-hc-topology.xml
-SRCDIR = ../SUNW,SPARC-Enterprise
-
-include ../Makefile.map
diff --git a/usr/src/lib/fm/topo/maps/SUNW,SPARC-Enterprise/SPARC-Enterprise-hc-topology.xml b/usr/src/lib/fm/topo/maps/SUNW,SPARC-Enterprise/SPARC-Enterprise-hc-topology.xml
deleted file mode 100644
index 0e92c58b9d..0000000000
--- a/usr/src/lib/fm/topo/maps/SUNW,SPARC-Enterprise/SPARC-Enterprise-hc-topology.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE topology SYSTEM "/usr/share/lib/xml/dtd/topology.dtd.1">
-<!--
- Copyright 2008 Sun Microsystems, Inc. All rights reserved.
- Use is subject to license terms.
-
- 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
- or http://www.opensolaris.org/os/licensing.
- 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
-
- ident "%Z%%M% %I% %E% SMI"
--->
-
-<topology name='SUNW,SPARC-Enterprise' scheme='hc'>
- <range name='chassis' min='0' max='0'>
- <node instance='0'>
- <propgroup name='protocol' version='1'
- name-stability='Private' data-stability='Private' >
- <propval name='FRU' type='fmri'
- value='hc:///chassis=0' />
- </propgroup>
- </node>
- <dependents grouping='children'>
- <range name='ioboard' min='0' max='15'>
- <enum-method name='ioboard' version='1' />
- </range>
- </dependents>
- </range>
- <range name='ses-enclosure' min='0' max='1024'>
- <enum-method name='ses' version='1' />
- </range>
-</topology>
diff --git a/usr/src/lib/fm/topo/maps/SUNW,Sun-Blade-T6300/Makefile b/usr/src/lib/fm/topo/maps/SUNW,Sun-Blade-T6300/Makefile
deleted file mode 100644
index f55dcf7809..0000000000
--- a/usr/src/lib/fm/topo/maps/SUNW,Sun-Blade-T6300/Makefile
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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.
-#
-
-PLATFORMS = SUNW,Sun-Blade-T6300
-CLASS = platform
-DTDFILE = topology.dtd.1
-TOPOFILE = Sun-Blade-T6300-hc-topology.xml
-SRCDIR = ../SUNW,Sun-Blade-T6300
-
-include ../Makefile.map
diff --git a/usr/src/lib/fm/topo/maps/SUNW,Sun-Blade-T6300/Sun-Blade-T6300-hc-topology.xml b/usr/src/lib/fm/topo/maps/SUNW,Sun-Blade-T6300/Sun-Blade-T6300-hc-topology.xml
deleted file mode 100644
index 2fdb861f72..0000000000
--- a/usr/src/lib/fm/topo/maps/SUNW,Sun-Blade-T6300/Sun-Blade-T6300-hc-topology.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE topology SYSTEM "/usr/share/lib/xml/dtd/topology.dtd.1">
-<!--
- Copyright 2009 Sun Microsystems, Inc. All rights reserved.
- Use is subject to license terms.
-
- 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
- or http://www.opensolaris.org/os/licensing.
- 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
-
--->
-
-<topology name='SUNW,Sun-Blade-T6300' scheme='hc'>
- <range name='motherboard' min='0' max='0'>
- <enum-method name='motherboard' version='1'/>
- <dependents grouping='children'>
- <range name='chip' min='0' max='0'>
- <enum-method name='chip' version='1' />
- </range>
- <range name='hostbridge' min='0' max='254'>
- <enum-method name='hostbridge' version='1' />
- </range>
- </dependents>
- </range>
- <range name='ses-enclosure' min='0' max='1024'>
- <enum-method name='ses' version='1' />
- </range>
-</topology>
diff --git a/usr/src/lib/fm/topo/maps/SUNW,Sun-Blade-T6320/Makefile b/usr/src/lib/fm/topo/maps/SUNW,Sun-Blade-T6320/Makefile
deleted file mode 100644
index c6d35f4a38..0000000000
--- a/usr/src/lib/fm/topo/maps/SUNW,Sun-Blade-T6320/Makefile
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-PLATFORMS = SUNW,Sun-Blade-T6320
-CLASS = platform
-DTDFILE = topology.dtd.1
-TOPOFILE = Sun-Blade-T6320-hc-topology.xml
-SRCDIR = ../SUNW,Sun-Blade-T6320
-
-include ../Makefile.map
diff --git a/usr/src/lib/fm/topo/maps/SUNW,Sun-Blade-T6320/Sun-Blade-T6320-hc-topology.xml b/usr/src/lib/fm/topo/maps/SUNW,Sun-Blade-T6320/Sun-Blade-T6320-hc-topology.xml
deleted file mode 100644
index 3882386e5c..0000000000
--- a/usr/src/lib/fm/topo/maps/SUNW,Sun-Blade-T6320/Sun-Blade-T6320-hc-topology.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE topology SYSTEM "/usr/share/lib/xml/dtd/topology.dtd.1">
-<!--
- Copyright 2008 Sun Microsystems, Inc. All rights reserved.
- Use is subject to license terms.
-
- 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
- or http://www.opensolaris.org/os/licensing.
- 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
-
- ident "%Z%%M% %I% %E% SMI"
--->
-
-<topology name='SUNW,Sun-Blade-T6320' scheme='hc'>
- <range name='motherboard' min='0' max='0'>
- <enum-method name='motherboard' version='1'/>
-
- <dependents grouping='children'>
- <range name='chip' min='0' max='0'>
- <enum-method name='chip' version='1'/>
-
- <dependents grouping='children'>
- <range name='hostbridge' min='0' max='254'>
- <enum-method name='hostbridge' version='1'/>
-
- <dependents grouping='children'>
- <range name='niu' min='0' max='0'>
- <enum-method name='niu' version='1'/>
- </range>
- </dependents>
-
- </range>
- </dependents>
-
- </range>
- </dependents>
-
- </range>
- <range name='ses-enclosure' min='0' max='1024'>
- <enum-method name='ses' version='1' />
- </range>
-</topology>
diff --git a/usr/src/lib/fm/topo/maps/SUNW,Sun-Fire-T200/Makefile b/usr/src/lib/fm/topo/maps/SUNW,Sun-Fire-T200/Makefile
deleted file mode 100644
index 104ac6082e..0000000000
--- a/usr/src/lib/fm/topo/maps/SUNW,Sun-Fire-T200/Makefile
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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.
-#
-
-PLATFORMS = SUNW,Sun-Fire-T200
-CLASS = platform
-DTDFILE = topology.dtd.1
-TOPOFILE = Sun-Fire-T200-hc-topology.xml \
- Sun-Fire-T1000-hc-topology.xml \
- SPARC-Enterprise-T1000-hc-topology.xml \
- SPARC-Enterprise-T2000-hc-topology.xml \
- Netra-T2000-hc-topology.xml
-
-SRCDIR = ../SUNW,Sun-Fire-T200
-
-include ../Makefile.map
diff --git a/usr/src/lib/fm/topo/maps/SUNW,Sun-Fire-T200/Netra-T2000-hc-topology.xml b/usr/src/lib/fm/topo/maps/SUNW,Sun-Fire-T200/Netra-T2000-hc-topology.xml
deleted file mode 100644
index a1e97e8614..0000000000
--- a/usr/src/lib/fm/topo/maps/SUNW,Sun-Fire-T200/Netra-T2000-hc-topology.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE topology SYSTEM "/usr/share/lib/xml/dtd/topology.dtd.1">
-<!--
- Copyright 2008 Sun Microsystems, Inc. All rights reserved.
- Use is subject to license terms.
-
- 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
- or http://www.opensolaris.org/os/licensing.
- 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
-
- ident "%Z%%M% %I% %E% SMI"
--->
-
-<topology name='SUNW,Netra-T2000' scheme='hc'>
- <range name='motherboard' min='0' max='0'>
- <enum-method name='motherboard' version='1'/>
- <dependents grouping='children'>
- <range name='chip' min='0' max='0'>
- <enum-method name='chip' version='1' />
- </range>
- </dependents>
- </range>
- <range name='ioboard' min='0' max='0'>
- <node instance='0'>
- <propgroup name='protocol' version='1'
- name-stability='Private' data-stability='Private' >
- <propval name='FRU' type='fmri'
- value='hc:///component=IOBD' />
- <propval name='label' type='string'
- value='IOBD' />
- </propgroup>
- </node>
- <dependents grouping='children'>
- <range name='hostbridge' min='0' max='254'>
- <enum-method name='hostbridge' version='1' />
- </range>
- </dependents>
- </range>
-
- <range name='ses-enclosure' min='0' max='1024'>
- <enum-method name='ses' version='1' />
- </range>
-</topology>
diff --git a/usr/src/lib/fm/topo/maps/SUNW,Sun-Fire-T200/SPARC-Enterprise-T1000-hc-topology.xml b/usr/src/lib/fm/topo/maps/SUNW,Sun-Fire-T200/SPARC-Enterprise-T1000-hc-topology.xml
deleted file mode 100644
index bc13be6ede..0000000000
--- a/usr/src/lib/fm/topo/maps/SUNW,Sun-Fire-T200/SPARC-Enterprise-T1000-hc-topology.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE topology SYSTEM "/usr/share/lib/xml/dtd/topology.dtd.1">
-<!--
- Copyright 2008 Sun Microsystems, Inc. All rights reserved.
- Use is subject to license terms.
-
- 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
- or http://www.opensolaris.org/os/licensing.
- 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
-
- ident "%Z%%M% %I% %E% SMI"
--->
-
-<topology name='SUNW,SPARC-Enterprise-T1000' scheme='hc'>
- <range name='motherboard' min='0' max='0'>
- <enum-method name='motherboard' version='1'/>
- <dependents grouping='children'>
- <range name='chip' min='0' max='0'>
- <enum-method name='chip' version='1' />
- </range>
- <range name='hostbridge' min='0' max='254'>
- <enum-method name='hostbridge' version='1' />
- </range>
- </dependents>
- </range>
- <range name='ses-enclosure' min='0' max='1024'>
- <enum-method name='ses' version='1' />
- </range>
-</topology>
diff --git a/usr/src/lib/fm/topo/maps/SUNW,Sun-Fire-T200/SPARC-Enterprise-T2000-hc-topology.xml b/usr/src/lib/fm/topo/maps/SUNW,Sun-Fire-T200/SPARC-Enterprise-T2000-hc-topology.xml
deleted file mode 100644
index 3109e0eacc..0000000000
--- a/usr/src/lib/fm/topo/maps/SUNW,Sun-Fire-T200/SPARC-Enterprise-T2000-hc-topology.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE topology SYSTEM "/usr/share/lib/xml/dtd/topology.dtd.1">
-<!--
- Copyright 2008 Sun Microsystems, Inc. All rights reserved.
- Use is subject to license terms.
-
- 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
- or http://www.opensolaris.org/os/licensing.
- 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
--->
-
-<topology name='SUNW,SPARC-Enterprise-T2000' scheme='hc'>
- <range name='motherboard' min='0' max='0'>
- <enum-method name='motherboard' version='1'/>
- <dependents grouping='children'>
- <range name='chip' min='0' max='0'>
- <enum-method name='chip' version='1' />
- </range>
- </dependents>
- </range>
- <range name='ioboard' min='0' max='0'>
- <node instance='0'>
- <propgroup name='protocol' version='1'
- name-stability='Private' data-stability='Private' >
- <propval name='FRU' type='fmri'
- value='hc:///component=IOBD' />
- <propval name='label' type='string'
- value='IOBD' />
- </propgroup>
- </node>
- <dependents grouping='children'>
- <range name='hostbridge' min='0' max='254'>
- <enum-method name='hostbridge' version='1' />
- </range>
- </dependents>
- </range>
- <range name='ses-enclosure' min='0' max='1024'>
- <enum-method name='ses' version='1' />
- </range>
-</topology>
diff --git a/usr/src/lib/fm/topo/maps/SUNW,Sun-Fire-T200/Sun-Fire-T1000-hc-topology.xml b/usr/src/lib/fm/topo/maps/SUNW,Sun-Fire-T200/Sun-Fire-T1000-hc-topology.xml
deleted file mode 100644
index 92edb03ed7..0000000000
--- a/usr/src/lib/fm/topo/maps/SUNW,Sun-Fire-T200/Sun-Fire-T1000-hc-topology.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE topology SYSTEM "/usr/share/lib/xml/dtd/topology.dtd.1">
-<!--
- Copyright 2008 Sun Microsystems, Inc. All rights reserved.
- Use is subject to license terms.
-
- 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
- or http://www.opensolaris.org/os/licensing.
- 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
-
- ident "%Z%%M% %I% %E% SMI"
--->
-
-<topology name='SUNW,Sun-Fire-T1000' scheme='hc'>
- <range name='motherboard' min='0' max='0'>
- <enum-method name='motherboard' version='1'/>
- <dependents grouping='children'>
- <range name='chip' min='0' max='0'>
- <enum-method name='chip' version='1' />
- </range>
- <range name='hostbridge' min='0' max='254'>
- <enum-method name='hostbridge' version='1' />
- </range>
- </dependents>
- </range>
- <range name='ses-enclosure' min='0' max='1024'>
- <enum-method name='ses' version='1' />
- </range>
-</topology>
diff --git a/usr/src/lib/fm/topo/maps/SUNW,Sun-Fire-T200/Sun-Fire-T200-hc-topology.xml b/usr/src/lib/fm/topo/maps/SUNW,Sun-Fire-T200/Sun-Fire-T200-hc-topology.xml
deleted file mode 100644
index 4b943e5032..0000000000
--- a/usr/src/lib/fm/topo/maps/SUNW,Sun-Fire-T200/Sun-Fire-T200-hc-topology.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE topology SYSTEM "/usr/share/lib/xml/dtd/topology.dtd.1">
-<!--
- Copyright 2008 Sun Microsystems, Inc. All rights reserved.
- Use is subject to license terms.
-
- 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
- or http://www.opensolaris.org/os/licensing.
- 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
-
- ident "%Z%%M% %I% %E% SMI"
--->
-
-<topology name='SUNW,Sun-Fire-T200' scheme='hc'>
- <range name='motherboard' min='0' max='0'>
- <enum-method name='motherboard' version='1'/>
- <dependents grouping='children'>
- <range name='chip' min='0' max='0'>
- <enum-method name='chip' version='1' />
- </range>
- </dependents>
- </range>
- <range name='ioboard' min='0' max='0'>
- <node instance='0'>
- <propgroup name='protocol' version='1'
- name-stability='Private' data-stability='Private' >
- <propval name='FRU' type='fmri'
- value='hc:///component=IOBD' />
- <propval name='label' type='string'
- value='IOBD' />
- </propgroup>
- </node>
- <dependents grouping='children'>
- <range name='hostbridge' min='0' max='254'>
- <enum-method name='hostbridge' version='1' />
- </range>
- </dependents>
- </range>
- <range name='ses-enclosure' min='0' max='1024'>
- <enum-method name='ses' version='1' />
- </range>
-</topology>
diff --git a/usr/src/lib/fm/topo/maps/SUNW,Sun-Fire/Makefile b/usr/src/lib/fm/topo/maps/SUNW,Sun-Fire/Makefile
deleted file mode 100644
index dc26ff28a0..0000000000
--- a/usr/src/lib/fm/topo/maps/SUNW,Sun-Fire/Makefile
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-PLATFORMS = SUNW,Sun-Fire
-CLASS = platform
-DTDFILE = topology.dtd.1
-TOPOFILE = Sun-Fire-hc-topology.xml
-SRCDIR = ../SUNW,Sun-Fire
-
-include ../Makefile.map
diff --git a/usr/src/lib/fm/topo/maps/SUNW,Sun-Fire/Sun-Fire-hc-topology.xml b/usr/src/lib/fm/topo/maps/SUNW,Sun-Fire/Sun-Fire-hc-topology.xml
deleted file mode 100644
index 7050062017..0000000000
--- a/usr/src/lib/fm/topo/maps/SUNW,Sun-Fire/Sun-Fire-hc-topology.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE topology SYSTEM "/usr/share/lib/xml/dtd/topology.dtd.1">
-<!--
- Copyright 2008 Sun Microsystems, Inc. All rights reserved.
- Use is subject to license terms.
-
- 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
- or http://www.opensolaris.org/os/licensing.
- 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
-
- ident "%Z%%M% %I% %E% SMI"
--->
-
-<topology name='SUNW,Sun-Fire' scheme='hc'>
- <range name='centerplane' min='0' max='0'>
- <node instance='0'>
- <propgroup name='protocol' version='1'
- name-stability='Private' data-stability='Private' >
- <propval name='FRU' type='fmri'
- value='hc:///component=centerplane' />
- <propval name='label' type='string'
- value='centerplane' />
- </propgroup>
- </node>
- <dependents grouping='children'>
- <range name='ioboard' min='0' max='9'>
- <enum-method name='ioboard' version='1' />
- </range>
- <range name='cpu' min='0' max='100'>
- <enum-method name='chip' version='1' />
- </range>
- </dependents>
- </range>
- <range name='ses-enclosure' min='0' max='1024'>
- <enum-method name='ses' version='1' />
- </range>
-</topology>
diff --git a/usr/src/lib/fm/topo/maps/SUNW,T5140/Makefile b/usr/src/lib/fm/topo/maps/SUNW,T5140/Makefile
deleted file mode 100644
index edf2184408..0000000000
--- a/usr/src/lib/fm/topo/maps/SUNW,T5140/Makefile
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-PLATFORMS = SUNW,T5140
-CLASS = platform
-DTDFILE = topology.dtd.1
-TOPOFILE = T5140-hc-topology.xml \
- T5240-hc-topology.xml \
- T5440-hc-topology.xml \
- Sun-Blade-T6340-hc-topology.xml
-SRCDIR = ../SUNW,T5140
-
-include ../Makefile.map
diff --git a/usr/src/lib/fm/topo/maps/SUNW,T5140/Sun-Blade-T6340-hc-topology.xml b/usr/src/lib/fm/topo/maps/SUNW,T5140/Sun-Blade-T6340-hc-topology.xml
deleted file mode 100644
index 3f1e09a251..0000000000
--- a/usr/src/lib/fm/topo/maps/SUNW,T5140/Sun-Blade-T6340-hc-topology.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE topology SYSTEM "/usr/share/lib/xml/dtd/topology.dtd.1">
-<!--
- Copyright 2008 Sun Microsystems, Inc. All rights reserved.
- Use is subject to license terms.
-
- 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
- or http://www.opensolaris.org/os/licensing.
- 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
-
- ident "%Z%%M% %I% %E% SMI"
--->
-
-<topology name='SUNW,Sun-Blade-T6340' scheme='hc'>
- <range name='motherboard' min='0' max='0'>
- <enum-method name='motherboard' version='1'/>
-
- <dependents grouping='children'>
- <range name='chip' min='0' max='1'>
- <enum-method name='chip' version='1'/>
- </range>
- </dependents>
-
- <dependents grouping='children'>
- <range name='hostbridge' min='0' max='254'>
- <enum-method name='hostbridge' version='1'/>
- </range>
- </dependents>
-
- </range>
- <range name='ses-enclosure' min='0' max='1024'>
- <enum-method name='ses' version='1' />
- </range>
-</topology>
diff --git a/usr/src/lib/fm/topo/maps/SUNW,T5140/T5140-hc-topology.xml b/usr/src/lib/fm/topo/maps/SUNW,T5140/T5140-hc-topology.xml
deleted file mode 100644
index 775149ab3f..0000000000
--- a/usr/src/lib/fm/topo/maps/SUNW,T5140/T5140-hc-topology.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE topology SYSTEM "/usr/share/lib/xml/dtd/topology.dtd.1">
-<!--
- Copyright 2008 Sun Microsystems, Inc. All rights reserved.
- Use is subject to license terms.
-
- 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
- or http://www.opensolaris.org/os/licensing.
- 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
-
- ident "%Z%%M% %I% %E% SMI"
--->
-
-<topology name='SUNW,T5140' scheme='hc'>
- <range name='motherboard' min='0' max='0'>
- <enum-method name='motherboard' version='1'/>
-
- <dependents grouping='children'>
- <range name='chip' min='0' max='1'>
- <enum-method name='chip' version='1'/>
- </range>
- </dependents>
-
- <dependents grouping='children'>
- <range name='hostbridge' min='0' max='254'>
- <enum-method name='hostbridge' version='1'/>
- </range>
- </dependents>
-
- </range>
- <range name='ses-enclosure' min='0' max='1024'>
- <enum-method name='ses' version='1' />
- </range>
-</topology>
diff --git a/usr/src/lib/fm/topo/maps/SUNW,T5140/T5240-hc-topology.xml b/usr/src/lib/fm/topo/maps/SUNW,T5140/T5240-hc-topology.xml
deleted file mode 100644
index fe1a72cf2b..0000000000
--- a/usr/src/lib/fm/topo/maps/SUNW,T5140/T5240-hc-topology.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE topology SYSTEM "/usr/share/lib/xml/dtd/topology.dtd.1">
-<!--
- Copyright 2008 Sun Microsystems, Inc. All rights reserved.
- Use is subject to license terms.
-
- 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
- or http://www.opensolaris.org/os/licensing.
- 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
-
- ident "%Z%%M% %I% %E% SMI"
--->
-
-<topology name='SUNW,T5240' scheme='hc'>
- <range name='motherboard' min='0' max='0'>
- <enum-method name='motherboard' version='1'/>
-
- <dependents grouping='children'>
- <range name='chip' min='0' max='1'>
- <enum-method name='chip' version='1'/>
- </range>
- </dependents>
-
- <dependents grouping='children'>
- <range name='hostbridge' min='0' max='254'>
- <enum-method name='hostbridge' version='1'/>
- </range>
- </dependents>
-
- </range>
- <range name='ses-enclosure' min='0' max='1024'>
- <enum-method name='ses' version='1' />
- </range>
-</topology>
diff --git a/usr/src/lib/fm/topo/maps/SUNW,T5140/T5440-hc-topology.xml b/usr/src/lib/fm/topo/maps/SUNW,T5140/T5440-hc-topology.xml
deleted file mode 100644
index 64e008c40c..0000000000
--- a/usr/src/lib/fm/topo/maps/SUNW,T5140/T5440-hc-topology.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE topology SYSTEM "/usr/share/lib/xml/dtd/topology.dtd.1">
-<!--
- Copyright 2008 Sun Microsystems, Inc. All rights reserved.
- Use is subject to license terms.
-
- 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
- or http://www.opensolaris.org/os/licensing.
- 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
-
- ident "%Z%%M% %I% %E% SMI"
--->
-
-<topology name='SUNW,T5440' scheme='hc'>
- <range name='motherboard' min='0' max='0'>
- <enum-method name='motherboard' version='1'/>
-
- <dependents grouping='children'>
- <range name='cpuboard' min='0' max='3'>
- <enum-method name='cpuboard' version='1'/>
- </range>
- </dependents>
-
- <dependents grouping='children'>
- <range name='interconnect' min='0' max='3'>
- <enum-method name='zambezi' version='1'/>
- </range>
- <range name='dimm' min='0' max='0'>
- <enum-method name='dimm' version='1'/>
- </range>
- </dependents>
- </range>
-
- <range name='ses-enclosure' min='0' max='1024'>
- <enum-method name='ses' version='1' />
- </range>
-</topology>
-
diff --git a/usr/src/lib/fm/topo/maps/SUNW,USBRDT-5240/Makefile b/usr/src/lib/fm/topo/maps/SUNW,USBRDT-5240/Makefile
deleted file mode 100644
index eaaa1623fa..0000000000
--- a/usr/src/lib/fm/topo/maps/SUNW,USBRDT-5240/Makefile
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-PLATFORMS = SUNW,USBRDT-5240
-CLASS = platform
-DTDFILE = topology.dtd.1
-TOPOFILE = USBRDT-5240-hc-topology.xml
-SRCDIR = ../SUNW,USBRDT-5240
-
-include ../Makefile.map
diff --git a/usr/src/lib/fm/topo/maps/SUNW,USBRDT-5240/USBRDT-5240-hc-topology.xml b/usr/src/lib/fm/topo/maps/SUNW,USBRDT-5240/USBRDT-5240-hc-topology.xml
deleted file mode 100644
index 4256a1652f..0000000000
--- a/usr/src/lib/fm/topo/maps/SUNW,USBRDT-5240/USBRDT-5240-hc-topology.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE topology SYSTEM "/usr/share/lib/xml/dtd/topology.dtd.1">
-<!--
- Copyright 2008 Sun Microsystems, Inc. All rights reserved.
- Use is subject to license terms.
-
- 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
- or http://www.opensolaris.org/os/licensing.
- 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
-
- ident "%Z%%M% %I% %E% SMI"
--->
-
-<topology name='SUNW,USBRDT-5240' scheme='hc'>
- <range name='motherboard' min='0' max='0'>
- <enum-method name='motherboard' version='1'/>
-
- <dependents grouping='children'>
- <range name='chip' min='0' max='1'>
- <enum-method name='chip' version='1'/>
- </range>
- </dependents>
-
- <dependents grouping='children'>
- <range name='hostbridge' min='0' max='254'>
- <enum-method name='hostbridge' version='1'/>
- </range>
- </dependents>
-
- </range>
- <range name='ses-enclosure' min='0' max='1024'>
- <enum-method name='ses' version='1' />
- </range>
-</topology>
diff --git a/usr/src/lib/fm/topo/maps/sparc/Makefile b/usr/src/lib/fm/topo/maps/sparc/Makefile
deleted file mode 100644
index a0a2cf17c4..0000000000
--- a/usr/src/lib/fm/topo/maps/sparc/Makefile
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2007 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-CLASS = common
-DTDFILE = topology.dtd.1
-TOPOFILE = xfp-hc-topology.xml
-SRCDIR = ../sparc
-
-# TEMPTOPOFILE is copied from ../common and deleted by "make clean"
-TEMPTOPOFILE = xfp-hc-topology.xml
-
-include ../Makefile.map
diff --git a/usr/src/lib/fm/topo/maps/sun4u/Makefile b/usr/src/lib/fm/topo/maps/sun4u/Makefile
deleted file mode 100644
index eb09d092c2..0000000000
--- a/usr/src/lib/fm/topo/maps/sun4u/Makefile
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2006 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-ARCH = sun4u
-CLASS = arch
-DTDFILE = topology.dtd.1
-TOPOFILE = sun4u-hc-topology.xml
-SRCDIR = ../sun4u
-
-include ../Makefile.map
diff --git a/usr/src/lib/fm/topo/maps/sun4u/sun4u-hc-topology.xml b/usr/src/lib/fm/topo/maps/sun4u/sun4u-hc-topology.xml
deleted file mode 100644
index 88d73e27d9..0000000000
--- a/usr/src/lib/fm/topo/maps/sun4u/sun4u-hc-topology.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE topology SYSTEM "/usr/share/lib/xml/dtd/topology.dtd.1">
-<!--
- Copyright 2008 Sun Microsystems, Inc. All rights reserved.
- Use is subject to license terms.
-
- 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
- or http://www.opensolaris.org/os/licensing.
- 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
-
- ident "%Z%%M% %I% %E% SMI"
--->
-
-<topology name='sun4u' scheme='hc'>
- <range name='motherboard' min='0' max='0'>
- <node instance='0'>
- <propgroup name='protocol' version='1'
- name-stability='Private' data-stability='Private' >
- <propval name='label' type='string'
- value='MB' />
- </propgroup>
- </node>
- <dependents grouping='children'>
- <range name='hostbridge' min='0' max='254'>
- <enum-method name='hostbridge' version='1' />
- </range>
- <range name='cpu' min='0' max='100'>
- <enum-method name='chip' version='1' />
- </range>
- </dependents>
- </range>
- <range name='ses-enclosure' min='0' max='1024'>
- <enum-method name='ses' version='1' />
- </range>
-</topology>
diff --git a/usr/src/lib/fm/topo/maps/sun4v/Makefile b/usr/src/lib/fm/topo/maps/sun4v/Makefile
deleted file mode 100644
index 2374d133ea..0000000000
--- a/usr/src/lib/fm/topo/maps/sun4v/Makefile
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-ARCH = sun4v
-CLASS = arch
-DTDFILE = topology.dtd.1
-TOPOFILE = sun4v-hc-topology.xml
-SRCDIR = ../sun4v
-
-include ../Makefile.map
diff --git a/usr/src/lib/fm/topo/maps/sun4v/sun4v-hc-topology.xml b/usr/src/lib/fm/topo/maps/sun4v/sun4v-hc-topology.xml
deleted file mode 100644
index 1dfb749b1d..0000000000
--- a/usr/src/lib/fm/topo/maps/sun4v/sun4v-hc-topology.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE topology SYSTEM "/usr/share/lib/xml/dtd/topology.dtd.1">
-<!--
- Copyright 2008 Sun Microsystems, Inc. All rights reserved.
- Use is subject to license terms.
-
- 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
- or http://www.opensolaris.org/os/licensing.
- 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
-
- ident "%Z%%M% %I% %E% SMI"
--->
-
-<topology name='sun4v' scheme='hc'>
- <range name='chassis' min='0' max='0'>
- <enum-method name='sun4vpi' version='1' />
- </range>
- <range name='ses-enclosure' min='0' max='1024'>
- <enum-method name='ses' version='1' />
- </range>
-</topology>
diff --git a/usr/src/lib/fm/topo/modules/Makefile b/usr/src/lib/fm/topo/modules/Makefile
index c079a37976..880a94d72c 100644
--- a/usr/src/lib/fm/topo/modules/Makefile
+++ b/usr/src/lib/fm/topo/modules/Makefile
@@ -23,13 +23,9 @@
# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
# Copyright 2019 Peter Tribble.
+# Copyright 2022 Garrett D'Amore
#
-sparc_SUBDIRS = sun4u \
- sun4v \
- SUNW,Sun-Fire \
- SUNW,SPARC-Enterprise
-
i386_SUBDIRS = i86pc
SUBDIRS = common $($(MACH)_SUBDIRS)
diff --git a/usr/src/lib/fm/topo/modules/SUNW,SPARC-Enterprise/Makefile b/usr/src/lib/fm/topo/modules/SUNW,SPARC-Enterprise/Makefile
deleted file mode 100644
index 122db7a134..0000000000
--- a/usr/src/lib/fm/topo/modules/SUNW,SPARC-Enterprise/Makefile
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2006 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-
-SUBDIRS = ioboard
-
-.PARALLEL: $(SUBDIRS)
-
-include ../../../Makefile.subdirs
diff --git a/usr/src/lib/fm/topo/modules/SUNW,SPARC-Enterprise/ioboard/Makefile b/usr/src/lib/fm/topo/modules/SUNW,SPARC-Enterprise/ioboard/Makefile
deleted file mode 100644
index d1db6ad332..0000000000
--- a/usr/src/lib/fm/topo/modules/SUNW,SPARC-Enterprise/ioboard/Makefile
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2006 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-
-CLASS = arch
-ARCH = SUNW,SPARC-Enterprise
-
-MODULE = ioboard
-MODULESRCS = opl_ioboard.c opl_hostbridge.c
-
-include ../../Makefile.plugin
-
-LDLIBS += -ldevinfo
diff --git a/usr/src/lib/fm/topo/modules/SUNW,SPARC-Enterprise/ioboard/opl_hostbridge.c b/usr/src/lib/fm/topo/modules/SUNW,SPARC-Enterprise/ioboard/opl_hostbridge.c
deleted file mode 100644
index bef0828f89..0000000000
--- a/usr/src/lib/fm/topo/modules/SUNW,SPARC-Enterprise/ioboard/opl_hostbridge.c
+++ /dev/null
@@ -1,332 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2010 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#include <string.h>
-#include <strings.h>
-#include <libdevinfo.h>
-#include <fm/topo_mod.h>
-#include <fm/topo_hc.h>
-#include <sys/fm/protocol.h>
-#include "opl_topo.h"
-
-static const topo_pgroup_info_t io_pgroup =
- { TOPO_PGROUP_IO, TOPO_STABILITY_PRIVATE, TOPO_STABILITY_PRIVATE, 1 };
-static const topo_pgroup_info_t pci_pgroup =
- { TOPO_PGROUP_PCI, TOPO_STABILITY_PRIVATE, TOPO_STABILITY_PRIVATE, 1 };
-
-/*
- * Check the root complex device node for a slot-names property.
- */
-const char *
-opl_get_slot_name(topo_mod_t *mod, di_node_t n)
-{
- di_prom_handle_t ptp = DI_PROM_HANDLE_NIL;
- di_prom_prop_t pp = DI_PROM_PROP_NIL;
- uchar_t *buf;
-
- if ((ptp = topo_mod_prominfo(mod)) == DI_PROM_PROP_NIL)
- return (NULL);
-
- for (pp = di_prom_prop_next(ptp, n, pp);
- pp != DI_PROM_PROP_NIL;
- pp = di_prom_prop_next(ptp, n, pp)) {
- if (strcmp(di_prom_prop_name(pp), OPL_SLOT_NAMES) == 0) {
- if (di_prom_prop_data(pp, &buf) <= sizeof (uint32_t))
- continue;
- return ((const char *)&buf[4]);
- }
- }
- return (NULL);
-}
-
-static tnode_t *
-opl_node_create(topo_mod_t *mp, tnode_t *parent, const char *name, int inst,
- void *priv)
-{
- tnode_t *node;
- nvlist_t *fmri;
- nvlist_t *auth = topo_mod_auth(mp, parent);
-
- if (parent == NULL || inst < 0) {
- return (NULL);
- }
-
- /* Create FMRI */
- if ((fmri = topo_mod_hcfmri(mp, parent, FM_HC_SCHEME_VERSION, name,
- inst, NULL, auth, NULL, NULL, NULL)) == NULL) {
- topo_mod_dprintf(mp, "create of tnode for %s failed: %s",
- name, topo_strerror(topo_mod_errno(mp)));
- nvlist_free(auth);
- return (NULL);
- }
- nvlist_free(auth);
-
- /* Create and bind node */
- node = topo_node_bind(mp, parent, name, inst, fmri);
- if (node == NULL) {
- nvlist_free(fmri);
- topo_mod_dprintf(mp, "unable to bind root complex: %s\n",
- topo_strerror(topo_mod_errno(mp)));
- return (NULL); /* mod_errno already set */
- }
-
- nvlist_free(fmri);
- topo_node_setspecific(node, priv);
-
- return (node);
-}
-
-/*
- * Create a root complex node.
- */
-static tnode_t *
-opl_rc_node_create(topo_mod_t *mp, tnode_t *parent, di_node_t dnode, int inst)
-{
- int err;
- tnode_t *rcn;
- const char *slot_name;
- char *dnpath;
- nvlist_t *mod;
-
- rcn = opl_node_create(mp, parent, PCIEX_ROOT, inst, (void *)dnode);
- if (rcn == NULL) {
- return (NULL);
- }
-
- /*
- * If this root complex connects to a slot, it will have a
- * slot-names property.
- */
- slot_name = opl_get_slot_name(mp, dnode);
- if (slot_name) {
- char fru_str[64];
- nvlist_t *fru_fmri;
- /* Add FRU fmri */
- (void) snprintf(fru_str, sizeof (fru_str), "hc:///component=%s",
- slot_name);
- if (topo_mod_str2nvl(mp, fru_str, &fru_fmri) == 0) {
- (void) topo_node_fru_set(rcn, fru_fmri, 0, &err);
- nvlist_free(fru_fmri);
- }
- /* Add label */
- (void) topo_node_label_set(rcn, (char *)slot_name, &err);
- } else {
- /* Inherit parent FRU's label */
- (void) topo_node_fru_set(rcn, NULL, 0, &err);
- (void) topo_node_label_set(rcn, NULL, &err);
- }
-
- /*
- * Set ASRU to be the dev-scheme ASRU
- */
- if ((dnpath = di_devfs_path(dnode)) != NULL) {
- nvlist_t *fmri;
-
- fmri = topo_mod_devfmri(mp, FM_DEV_SCHEME_VERSION,
- dnpath, NULL);
- if (fmri == NULL) {
- topo_mod_dprintf(mp,
- "dev:///%s fmri creation failed.\n",
- dnpath);
- (void) topo_mod_seterrno(mp, err);
- di_devfs_path_free(dnpath);
- return (NULL);
- }
- if (topo_node_asru_set(rcn, fmri, 0, &err) < 0) {
- topo_mod_dprintf(mp, "topo_node_asru_set failed\n");
- (void) topo_mod_seterrno(mp, err);
- nvlist_free(fmri);
- di_devfs_path_free(dnpath);
- return (NULL);
- }
- nvlist_free(fmri);
- } else {
- topo_mod_dprintf(mp, "NULL di_devfs_path.\n");
- }
-
- /*
- * Set pciexrc properties for root complex nodes
- */
-
- /* Add the io and pci property groups */
- if (topo_pgroup_create(rcn, &io_pgroup, &err) < 0) {
- topo_mod_dprintf(mp, "topo_pgroup_create failed\n");
- di_devfs_path_free(dnpath);
- (void) topo_mod_seterrno(mp, err);
- return (NULL);
- }
- if (topo_pgroup_create(rcn, &pci_pgroup, &err) < 0) {
- topo_mod_dprintf(mp, "topo_pgroup_create failed\n");
- di_devfs_path_free(dnpath);
- (void) topo_mod_seterrno(mp, err);
- return (NULL);
- }
- /* Add the devfs path property */
- if (dnpath) {
- if (topo_prop_set_string(rcn, TOPO_PGROUP_IO, TOPO_IO_DEV,
- TOPO_PROP_IMMUTABLE, dnpath, &err) != 0) {
- topo_mod_dprintf(mp, "Failed to set DEV property\n");
- di_devfs_path_free(dnpath);
- (void) topo_mod_seterrno(mp, err);
- }
- di_devfs_path_free(dnpath);
- }
- /* Oberon device type is always "pciex" */
- if (topo_prop_set_string(rcn, TOPO_PGROUP_IO, TOPO_IO_DEVTYPE,
- TOPO_PROP_IMMUTABLE, OPL_PX_DEVTYPE, &err) != 0) {
- topo_mod_dprintf(mp, "Failed to set DEVTYPE property\n");
- }
- /* Oberon driver is always "px" */
- if (topo_prop_set_string(rcn, TOPO_PGROUP_IO, TOPO_IO_DRIVER,
- TOPO_PROP_IMMUTABLE, OPL_PX_DRV, &err) != 0) {
- topo_mod_dprintf(mp, "Failed to set DRIVER property\n");
- }
- if ((mod = topo_mod_modfmri(mp, FM_MOD_SCHEME_VERSION, OPL_PX_DRV))
- == NULL || topo_prop_set_fmri(rcn, TOPO_PGROUP_IO,
- TOPO_IO_MODULE, TOPO_PROP_IMMUTABLE, mod, &err) != 0) {
- topo_mod_dprintf(mp, "Failed to set MODULE property\n");
- }
- nvlist_free(mod);
-
- /* This is a PCIEX Root Complex */
- if (topo_prop_set_string(rcn, TOPO_PGROUP_PCI, TOPO_PCI_EXCAP,
- TOPO_PROP_IMMUTABLE, PCIEX_ROOT, &err) != 0) {
- topo_mod_dprintf(mp, "Failed to set EXCAP property\n");
- }
- /* BDF of Oberon root complex is constant */
- if (topo_prop_set_string(rcn, TOPO_PGROUP_PCI,
- TOPO_PCI_BDF, TOPO_PROP_IMMUTABLE, OPL_PX_BDF, &err) != 0) {
- topo_mod_dprintf(mp, "Failed to set EXCAP property\n");
- }
-
- /* Make room for children */
- (void) topo_node_range_create(mp, rcn, PCIEX_BUS, 0, OPL_BUS_MAX);
- return (rcn);
-}
-
-/*
- * Create a hostbridge node.
- */
-static tnode_t *
-opl_hb_node_create(topo_mod_t *mp, tnode_t *parent, int inst)
-{
- int err;
- tnode_t *hbn;
-
- hbn = opl_node_create(mp, parent, HOSTBRIDGE, inst, NULL);
- if (hbn == NULL) {
- return (NULL);
- }
-
- /* Inherit parent FRU's label */
- (void) topo_node_fru_set(hbn, NULL, 0, &err);
- (void) topo_node_label_set(hbn, NULL, &err);
-
- /* Make room for children */
- (void) topo_node_range_create(mp, hbn, PCIEX_ROOT, 0, OPL_RC_MAX);
-
- return (hbn);
-}
-
-/*
- * opl_hb_enum gets the ioboard instance passed in, and determines the
- * hostbridge and root complex instances numbers based on the bus addresses.
- */
-int
-opl_hb_enum(topo_mod_t *mp, const ioboard_contents_t *iob, tnode_t *ion,
- int brd)
-{
- int hb;
- int rc;
- di_node_t p;
- tnode_t *hbnode;
- tnode_t *rcnode;
- topo_mod_t *pcimod;
-
- /* Load the pcibus module. We'll need it later. */
- pcimod = topo_mod_load(mp, PCI_BUS, PCI_BUS_VERS);
- if (pcimod == NULL) {
- topo_mod_dprintf(mp, "can't load pcibus module: %s\n",
- topo_strerror(topo_mod_errno(mp)));
- return (-1);
- }
-
- /* For each hostbridge on an ioboard... */
- for (hb = 0; hb < OPL_HB_MAX; hb++) {
- hbnode = NULL;
- /* For each root complex in a hostbridge... */
- for (rc = 0; rc < OPL_RC_MAX; rc++) {
- p = iob->rcs[hb][rc];
- /* If no root complex, continue */
- if (p == DI_NODE_NIL) {
- continue;
- }
-
- /* The root complex exists! */
- topo_mod_dprintf(mp, "declaring "
- "/chassis=0/ioboard=%d/hostbridge=%d/pciexrc=%d\n",
- brd, hb, rc);
-
- /*
- * If we haven't created a hostbridge node yet, do it
- * now.
- */
- if (hbnode == NULL) {
- hbnode = opl_hb_node_create(mp, ion, hb);
- if (hbnode == NULL) {
- topo_mod_dprintf(mp,
- "unable to create hbnode: %s\n",
- topo_strerror(topo_mod_errno(mp)));
- topo_mod_unload(pcimod);
- return (-1);
- }
-
- }
-
- /* Create the root complex node */
- rcnode = opl_rc_node_create(mp, hbnode, p, rc);
- if (rcnode == NULL) {
- topo_mod_dprintf(mp,
- "unable to create rcnode: %s\n",
- topo_strerror(topo_mod_errno(mp)));
- topo_mod_unload(pcimod);
- return (-1);
- }
-
- /* Enumerate pcibus nodes under the root complex */
- if (topo_mod_enumerate(pcimod, rcnode,
- PCI_BUS, PCIEX_BUS, 0, 255, NULL) != 0) {
- topo_mod_dprintf(mp,
- "error enumerating pcibus: %s\n",
- topo_strerror(topo_mod_errno(mp)));
- topo_mod_unload(pcimod);
- return (-1);
- }
- }
- }
- topo_mod_unload(pcimod);
- return (0);
-}
diff --git a/usr/src/lib/fm/topo/modules/SUNW,SPARC-Enterprise/ioboard/opl_ioboard.c b/usr/src/lib/fm/topo/modules/SUNW,SPARC-Enterprise/ioboard/opl_ioboard.c
deleted file mode 100644
index ac82b9941b..0000000000
--- a/usr/src/lib/fm/topo/modules/SUNW,SPARC-Enterprise/ioboard/opl_ioboard.c
+++ /dev/null
@@ -1,351 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2010 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * SUNW,OPL-Enterprise platform ioboard topology enumerator
- */
-#include <string.h>
-#include <strings.h>
-#include <libdevinfo.h>
-#include <fm/topo_mod.h>
-#include <fm/topo_hc.h>
-#include <sys/fm/protocol.h>
-#include "opl_topo.h"
-
-#define IOB_ENUMR_VERS 1
-#define FRUNAME "iou"
-#define LABEL FRUNAME "#%d"
-#define IOBDFRU "hc:///component=" LABEL
-
-#define IKKAKU_FRUNAME "MBU_A"
-#define IKKAKU_LABEL IKKAKU_FRUNAME
-#define IKKAKU_IOBDFRU "hc:///component=" IKKAKU_LABEL
-
-static int opl_iob_enum(topo_mod_t *hdl, tnode_t *parent, const char *name,
- topo_instance_t imin, topo_instance_t imax, void *notused1, void *notused2);
-
-static const topo_modops_t Iobops =
- { opl_iob_enum, NULL };
-
-static const topo_modinfo_t IobInfo = {
- IOBOARD,
- FM_FMRI_SCHEME_HC,
- IOB_ENUMR_VERS,
- &Iobops};
-
-/* OPL model type */
-typedef enum {
- MODEL_FF,
- MODEL_DC,
- MODEL_IKKAKU
-} opl_model_t;
-
-void
-_topo_init(topo_mod_t *modhdl)
-{
- /*
- * Turn on module debugging output
- */
- if (getenv("TOPOIOBDBG") != NULL)
- topo_mod_setdebug(modhdl);
- topo_mod_dprintf(modhdl, "initializing ioboard enumerator\n");
-
- (void) topo_mod_register(modhdl, &IobInfo, TOPO_VERSION);
-}
-
-void
-_topo_fini(topo_mod_t *modhdl)
-{
- topo_mod_unregister(modhdl);
-}
-
-/*
- * Checks to see if there's a physical board number property on this
- * device node.
- */
-static int
-opl_get_physical_board(topo_mod_t *mod, di_node_t n)
-{
- di_prom_handle_t ptp = DI_PROM_HANDLE_NIL;
- di_prom_prop_t pp = DI_PROM_PROP_NIL;
- uchar_t *buf;
- int val;
-
- if ((ptp = topo_mod_prominfo(mod)) == DI_PROM_HANDLE_NIL)
- return (-1);
-
- for (pp = di_prom_prop_next(ptp, n, pp);
- pp != DI_PROM_PROP_NIL;
- pp = di_prom_prop_next(ptp, n, pp)) {
- if (strcmp(di_prom_prop_name(pp), OPL_PHYSICAL_BD) == 0) {
- if (di_prom_prop_data(pp, &buf) < sizeof (val))
- continue;
- bcopy(buf, &val, sizeof (val));
- return (val);
- }
- }
- return (-1);
-}
-
-/*
- * Creates a map of logical boards to physical location.
- */
-static void
-opl_map_boards(topo_mod_t *mod, di_node_t opl_devtree,
- int lsb_to_psb[OPL_IOB_MAX])
-{
- di_node_t n;
- int i;
-
- /* Initialize all entries to no mapping */
- for (i = 0; i < OPL_IOB_MAX; i++) {
- lsb_to_psb[i] = i;
- }
- /*
- * Get LSB-to-PSB (logical-to-physical board) mapping by finding the
- * memory controller driver per LSB. The MC driver will have a
- * physical-board# property.
- */
- for (n = di_drv_first_node(OPL_MC_DRV, opl_devtree);
- n != DI_NODE_NIL;
- n = di_drv_next_node(n)) {
- int a, lsb, psb;
- char *ba = di_bus_addr(n);
- if (ba == NULL) {
- /*
- * di_bus_addr returned NULL. This can happen during
- * DR attach/detach of the mc driver. Just skip this
- * node for now.
- */
- continue;
- }
- a = OPL_MC_STR2BA(ba);
- lsb = OPL_MC_LSB(a);
-
- psb = opl_get_physical_board(mod, n);
- if (psb < 0 || psb >= OPL_IOB_MAX) {
- /* psb mapping is out of range, skip */
- continue;
- }
- lsb_to_psb[lsb] = psb;
- }
-}
-
-/*
- * Create the ioboard node. Add fru and label properties, and create room
- * for child hostbridge nodes.
- *
- * Only IKKAKU model has different IO topology.
- */
-static tnode_t *
-opl_iob_node_create(topo_mod_t *mp, tnode_t *parent, int inst,
- opl_model_t opl_model)
-{
- int err;
- tnode_t *ion;
- nvlist_t *fmri;
- char label[8];
- char fmri_str[32];
- nvlist_t *auth = topo_mod_auth(mp, parent);
-
- if (parent == NULL || inst < 0) {
- return (NULL);
- }
-
- /* Create ioboard FMRI */
- if ((fmri = topo_mod_hcfmri(mp, parent, FM_HC_SCHEME_VERSION, IOBOARD,
- inst, NULL, auth, NULL, NULL, NULL)) == NULL) {
- nvlist_free(auth);
- topo_mod_dprintf(mp, "create of tnode for ioboard failed: %s\n",
- topo_strerror(topo_mod_errno(mp)));
- return (NULL);
- }
- nvlist_free(auth);
- /* Create node for this ioboard */
- ion = topo_node_bind(mp, parent, IOBOARD, inst, fmri);
- if (ion == NULL) {
- nvlist_free(fmri);
- topo_mod_dprintf(mp, "unable to bind ioboard: %s\n",
- topo_strerror(topo_mod_errno(mp)));
- return (NULL); /* mod_errno already set */
- }
- nvlist_free(fmri);
- /* Create and add FRU fmri for this ioboard */
- if (opl_model == MODEL_IKKAKU)
- (void) snprintf(fmri_str, sizeof (fmri_str), IKKAKU_IOBDFRU);
- else
- (void) snprintf(fmri_str, sizeof (fmri_str), IOBDFRU, inst);
- if (topo_mod_str2nvl(mp, fmri_str, &fmri) == 0) {
- (void) topo_node_fru_set(ion, fmri, 0, &err);
- nvlist_free(fmri);
- }
- /* Add label for this ioboard */
- if (opl_model == MODEL_IKKAKU)
- (void) snprintf(label, sizeof (label), IKKAKU_LABEL);
- else
- (void) snprintf(label, sizeof (label), LABEL, inst);
- (void) topo_node_label_set(ion, label, &err);
-
- /* Create range of hostbridges on this ioboard */
- if (topo_node_range_create(mp, ion, HOSTBRIDGE, 0, OPL_HB_MAX) != 0) {
- topo_mod_dprintf(mp, "topo_node_range_create failed: %s\n",
- topo_strerror(topo_mod_errno(mp)));
- return (NULL);
- }
-
- return (ion);
-}
-
-/*
- * get the OPL model name from rootnode property "model"
- */
-static int
-opl_get_model(topo_mod_t *mp, di_node_t opl_devtree, char *model)
-{
- char *bufp;
- di_prom_handle_t promh = DI_PROM_HANDLE_NIL;
-
- if (opl_devtree == DI_NODE_NIL ||
- (promh = topo_mod_prominfo(mp)) == DI_PROM_HANDLE_NIL)
- return (-1);
-
- if (di_prom_prop_lookup_bytes(promh, opl_devtree, "model",
- (unsigned char **)&bufp) != -1) {
- (void) strlcpy(model, bufp, MAXNAMELEN);
- return (0);
- } else {
- return (-1);
- }
-
-}
-
-/*ARGSUSED*/
-static int
-opl_iob_enum(topo_mod_t *mp, tnode_t *parent, const char *name,
- topo_instance_t imin, topo_instance_t imax, void *notused1, void *notused2)
-{
- di_node_t opl_devtree;
- di_node_t pnode;
- tnode_t *ion;
- topo_instance_t inst;
- int lsb_to_psb[OPL_IOB_MAX];
- ioboard_contents_t ioboard_list[OPL_IOB_MAX];
- int retval = 0;
- char model[MAXNAMELEN];
- opl_model_t opl_model = MODEL_FF;
-
- /* Validate the name is correct */
- if (strcmp(name, "ioboard") != 0) {
- return (-1);
- }
- /* Make sure we don't exceed OPL_IOB_MAX */
- if (imax >= OPL_IOB_MAX) {
- imax = OPL_IOB_MAX;
- }
-
- bzero(ioboard_list, sizeof (ioboard_list));
-
- opl_devtree = topo_mod_devinfo(mp);
- if (opl_devtree == DI_NODE_NIL) {
- (void) topo_mod_seterrno(mp, errno);
- topo_mod_dprintf(mp, "devinfo init failed.\n");
- return (-1);
- }
-
- if (opl_get_model(mp, opl_devtree, model) == -1) {
- topo_mod_dprintf(mp, "opl_get_model failed.\n");
- } else {
- if (strncmp(model, "FF", 2) == 0)
- opl_model = MODEL_FF;
- else if (strncmp(model, "DC", 2) == 0)
- opl_model = MODEL_DC;
- else if (strcmp(model, "IKKAKU") == 0)
- opl_model = MODEL_IKKAKU;
-
- topo_mod_dprintf(mp, "opl_get_model %s found.\n", model);
- }
-
- /*
- * Create a mapping from logical board numbers (which are part of
- * the device node bus address) to physical board numbers, so we
- * can create meaningful fru labels.
- */
- opl_map_boards(mp, opl_devtree, lsb_to_psb);
-
- /*
- * Figure out which boards are installed by finding hostbridges
- * with matching bus addresses.
- */
- for (pnode = di_drv_first_node(OPL_PX_DRV, opl_devtree);
- pnode != DI_NODE_NIL;
- pnode = di_drv_next_node(pnode)) {
- int psb = -1;
- int a, lsb, hb, rc;
-
- /* Get the bus address */
- char *ba = di_bus_addr(pnode);
- if (ba == NULL || (*ba == '\0')) {
- return (-1); /* Return if it's not assigned */
- }
-
- a = OPL_PX_STR2BA(ba);
- lsb = OPL_PX_LSB(a);
- hb = OPL_PX_HB(a);
- rc = OPL_PX_RC(a);
- /* Map logical system board to physical system board */
- if (lsb >= 0 && lsb <= OPL_IOB_MAX) {
- psb = lsb_to_psb[lsb];
- }
- /* If valid psb, note that this board exists */
- if (psb >= 0 && psb < OPL_IOB_MAX) {
- ioboard_list[psb].count++;
- ioboard_list[psb].rcs[hb][rc] = pnode;
- }
- }
-
- /*
- * Now enumerate each existing board Exit loop if retval is
- * ever set to non-zero.
- */
- for (inst = imin; inst <= imax && retval == 0; inst++) {
- /* If this board doesn't contain any hostbridges, skip it */
- if (ioboard_list[inst].count == 0) {
- continue;
- }
- /* Create node for this ioboard */
- ion = opl_iob_node_create(mp, parent, inst, opl_model);
- if (ion == NULL) {
- topo_mod_dprintf(mp,
- "enumeration of ioboard failed: %s\n",
- topo_strerror(topo_mod_errno(mp)));
- retval = -1;
- break;
- }
- /* Enumerate hostbridges on this ioboard, sets errno */
- retval = opl_hb_enum(mp, &ioboard_list[inst], ion, inst);
- }
- return (retval);
-}
diff --git a/usr/src/lib/fm/topo/modules/SUNW,SPARC-Enterprise/ioboard/opl_topo.h b/usr/src/lib/fm/topo/modules/SUNW,SPARC-Enterprise/ioboard/opl_topo.h
deleted file mode 100644
index 8447e20960..0000000000
--- a/usr/src/lib/fm/topo/modules/SUNW,SPARC-Enterprise/ioboard/opl_topo.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _OPL_TOPO_H
-#define _OPL_TOPO_H
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include <fm/topo_hc.h>
-#include <fm/topo_mod.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define PCI_BUS_VERS 1
-
-/*
- * OPL uses the Jupiter Bus Bindings (see FWARC/2005/076) which specifies
- * the hostbridge port id (the part of the bus address before the comma) as
- * [10:9] = 00
- * [8] = LSB_ID[4] = 0
- * [7:4] = LSB_ID[3:0]
- * [3] = IO_Channel#[2] = 0
- * [2:1] = IO_Channel#[1:0]
- * [0] = PCI Leaf Number (0=leaf-A, 1=leaf-B)
- * where the LSB_ID is the logical system board, the IO_Channel is the
- * hostbridge, and the PCI leaf is the root complex. The definitions
- * allow up to 32 system boards, 8 hostbridges per system board, and
- * two root complexes per hostbridge.
- */
-
-/* Common OPL limits */
-#define OPL_IOB_MAX 32 /* Max 32 IOBs per machine */
-#define OPL_HB_MAX 8 /* Max 8 hostbridges per IOB */
-#define OPL_RC_MAX 2 /* Max 2 root complexes per hostbridge */
-#define OPL_BUS_MAX 4 /* Max PCI-Ex buses under root complex */
-
-/* Macros for manipulating px driver bus address. */
-#define OPL_PX_DRV "px" /* Oberon driver name */
-#define OPL_PX_STR2BA(s) strtol(s, NULL, 16) /* Convert ba string to int */
-#define OPL_PX_LSB(a) (((a) >> 4) & 0x1f) /* Extract board from ba */
-#define OPL_PX_HB(a) (((a) >> 1) & 0x07) /* Extract hb from ba */
-#define OPL_PX_RC(a) ((a) & 0x01) /* Extract rc from ba */
-#define OPL_SLOT_NAMES "slot-names" /* Slot name property */
-#define OPL_PX_DEVTYPE "pciex" /* Oberon is PCI-Ex devtype */
-#define OPL_PX_BDF "0x08" /* BDF is always 0/1/0 */
-
-/* Macros for manipulating mc-opl driver bus address. */
-#define OPL_MC_DRV "mc-opl" /* Driver name */
-#define OPL_MC_STR2BA(s) strtol(s, NULL, 16) /* Convert ba string to int */
-#define OPL_MC_LSB(a) (((a) >> 4) & 0x1f) /* Extract board from ba */
-#define OPL_PHYSICAL_BD "physical-board#" /* Physical board for the mc */
-
-/* Structure listing devices on an ioboard */
-typedef struct {
- int count;
- di_node_t rcs[OPL_HB_MAX][OPL_RC_MAX];
-} ioboard_contents_t;
-
-/* Shared device tree root node */
-int opl_hb_enum(topo_mod_t *mp, const ioboard_contents_t *iob,
- tnode_t *parent, int brd);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _OPL_TOPO_H */
diff --git a/usr/src/lib/fm/topo/modules/SUNW,Sun-Fire/Makefile b/usr/src/lib/fm/topo/modules/SUNW,Sun-Fire/Makefile
deleted file mode 100644
index 122db7a134..0000000000
--- a/usr/src/lib/fm/topo/modules/SUNW,Sun-Fire/Makefile
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2006 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-
-SUBDIRS = ioboard
-
-.PARALLEL: $(SUBDIRS)
-
-include ../../../Makefile.subdirs
diff --git a/usr/src/lib/fm/topo/modules/SUNW,Sun-Fire/ioboard/Makefile b/usr/src/lib/fm/topo/modules/SUNW,Sun-Fire/ioboard/Makefile
deleted file mode 100644
index 50e84d2e91..0000000000
--- a/usr/src/lib/fm/topo/modules/SUNW,Sun-Fire/ioboard/Makefile
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2006 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-
-CLASS = plat
-PLATFORMS = SUNW,Sun-Fire
-
-include ../../sun4/ioboard/Makefile.iob
diff --git a/usr/src/lib/fm/topo/modules/SUNW,Sun-Fire/ioboard/iob_platform.c b/usr/src/lib/fm/topo/modules/SUNW,Sun-Fire/ioboard/iob_platform.c
deleted file mode 100644
index 98ef8b20bc..0000000000
--- a/usr/src/lib/fm/topo/modules/SUNW,Sun-Fire/ioboard/iob_platform.c
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2006 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-/*
- * SUNW,Sun-Fire platform ioboard topology enumerator
- */
-
-#include <string.h>
-#include <libdevinfo.h>
-#include <fm/topo_mod.h>
-#include <fm/topo_hc.h>
-
-#include <did.h>
-#include <hostbridge.h>
-#include <ioboard.h>
-#include <util.h>
-
-/*ARGSUSED*/
-int
-platform_iob_label(topo_mod_t *mod, tnode_t *node, nvlist_t *ignored,
- nvlist_t **out)
-{
- /*
- * For SUNW,Sun-Fire the label is simply N0.IBXX where XX is the
- * instance number of the ioboard.
- */
- char buf[13]; /* up to a million I/O boards :-) */
-
- *out = NULL;
- (void) snprintf(buf, 10, "N0.IB%d", topo_node_instance(node));
- if (topo_mod_nvalloc(mod, out, NV_UNIQUE_NAME) == 0 &&
- nvlist_add_string(*out, TOPO_METH_LABEL_RET_STR, buf) == 0)
- return (0);
- nvlist_free(*out);
- *out = NULL;
- return (-1);
-}
-
-#define IOB_BASEADDR 0x18
-#define BUS_ADDRDIST 0x2
-
-/*ARGSUSED*/
-int
-platform_iob_enum(topo_mod_t *mod, tnode_t *parent, topo_instance_t imin,
- topo_instance_t imax)
-{
- /*
- * A SUNW,Sun-Fire and its successors may have up to 4 I/O boards,
- * numbered 6 through 9. Each board has two hostbridges, and
- * there are a pair of PCI buses under each hostbridge. We can
- * discover the existence of a board by the presence of
- * devinfo nodes for those hostbridges. We let the hostbridge
- * enumerator actually create nodes for the hostbridges,
- * passing them the did_t's for all the hostbridge nodes we
- * know indicate that the ioboard exists.
- */
- di_node_t devtree;
- di_node_t pnode;
- did_t *iobs[18][2][2];
- int brd, br, bus, i;
-
- devtree = topo_mod_devinfo(mod);
- if (devtree == DI_NODE_NIL) {
- topo_mod_dprintf(mod, "devinfo init failed.");
- return (-1);
- }
-
- for (i = 6; i <= 9; i++) {
- iobs[i][0][0] = iobs[i][0][1] = NULL;
- iobs[i][1][0] = iobs[i][1][1] = NULL;
- }
-
- pnode = di_drv_first_node(SCHIZO, devtree);
- while (pnode != DI_NODE_NIL) {
- did_t *d;
-
- d = split_bus_address(mod,
- pnode, IOB_BASEADDR, BUS_ADDRDIST, 6, 9, &brd, &br, &bus);
- if (d == NULL) {
- pnode = di_drv_next_node(pnode);
- continue;
- }
- iobs[brd][br][bus] = d;
- pnode = di_drv_next_node(pnode);
- }
-
- for (i = 6; i < 9; i++) {
- tnode_t *ion;
- /*
- * Make sure we found all the buses and bridges
- */
- if (iobs[i][0][0] == NULL || iobs[i][0][1] == NULL ||
- iobs[i][1][0] == NULL || iobs[i][1][1] == NULL)
- continue;
- did_did_link_set(iobs[i][0][0], iobs[i][0][1]);
- did_did_link_set(iobs[i][1][0], iobs[i][1][1]);
- did_did_chain_set(iobs[i][0][0], iobs[i][1][0]);
- if ((ion = ioboard_declare(mod, parent, i, iobs[i][0][0]))
- == NULL) {
- topo_mod_dprintf(mod,
- "Creation of tnode for %s%d failed.\n", IOBOARD, i);
- continue;
- }
- if (topo_mod_enumerate(mod,
- ion, HOSTBRIDGE, HOSTBRIDGE, 0, 0, iobs[i][0][0]) < 0) {
- topo_mod_dprintf(mod,
- "Enumeration of %s%d/%s%d failed.\n",
- IOBOARD, i, HOSTBRIDGE, 0);
- continue;
- }
- if (topo_mod_enumerate(mod,
- ion, HOSTBRIDGE, HOSTBRIDGE, 1, 1, iobs[i][0][0]) < 0) {
- topo_mod_dprintf(mod,
- "Enumeration of %s%d/%s%d failed.\n",
- IOBOARD, i, HOSTBRIDGE, 1);
- continue;
- }
- }
- return (0);
-}
diff --git a/usr/src/lib/fm/topo/modules/sun4/chip/Makefile.chip b/usr/src/lib/fm/topo/modules/sun4/chip/Makefile.chip
deleted file mode 100644
index 473518739f..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4/chip/Makefile.chip
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2007 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-MODULE = chip
-CLASS = arch
-SUN4DIR = ../../sun4/$(MODULE)
-MODULESRCS = $($(ARCH)_SRCS)
-
-include ../../Makefile.plugin
-
-INCDIRS += $(SUN4DIR)
-
-CPPFLAGS += $(INCDIRS:%=-I%)
-
-%.o: $(SUN4DIR)/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
diff --git a/usr/src/lib/fm/topo/modules/sun4/hostbridge/Makefile.hb b/usr/src/lib/fm/topo/modules/sun4/hostbridge/Makefile.hb
deleted file mode 100644
index 287c845354..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4/hostbridge/Makefile.hb
+++ /dev/null
@@ -1,46 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
-# Copyright (c) 2018, Joyent, Inc.
-#
-
-MODULE = hostbridge
-CLASS = arch
-SUN4DIR = ../../sun4/$(MODULE)
-UTILDIR = ../../common/pcibus
-HBDIR = ../../common/hostbridge
-HBSRCS = hostbridge.c hb_sun4.c did.c did_hash.c did_props.c util.c
-MODULESRCS = $(HBSRCS) $($(ARCH)_SRCS)
-
-include ../../Makefile.plugin
-
-LDLIBS += -ldevinfo -lsmbios -lpcidb
-CPPFLAGS += -I$(SUN4DIR) -I$(UTILDIR) -I$(HBDIR)
-
-%.o: $(SUN4DIR)/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
-%.o: $(UTILDIR)/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
diff --git a/usr/src/lib/fm/topo/modules/sun4/hostbridge/hb_sun4.c b/usr/src/lib/fm/topo/modules/sun4/hostbridge/hb_sun4.c
deleted file mode 100644
index 700058c9a5..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4/hostbridge/hb_sun4.c
+++ /dev/null
@@ -1,349 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#include <string.h>
-#include <fm/topo_mod.h>
-#include <libdevinfo.h>
-#include <sys/param.h>
-#include <sys/systeminfo.h>
-
-#include <hb_sun4.h>
-#include <util.h>
-#include <hostbridge.h>
-#include <pcibus.h>
-#include <did.h>
-
-busorrc_t *
-busorrc_new(topo_mod_t *mod, const char *bus_addr, di_node_t di)
-{
- busorrc_t *pp;
- char *comma;
- char *bac;
- int e;
-
- if ((pp = topo_mod_zalloc(mod, sizeof (busorrc_t))) == NULL)
- return (NULL);
- pp->br_din = di;
- bac = topo_mod_strdup(mod, bus_addr);
- if ((comma = strchr(bac, ',')) != NULL)
- *comma = '\0';
- pp->br_ba_bc = fm_strtonum(mod, bac, &e);
- if (e < 0) {
- topo_mod_dprintf(mod,
- "Trouble interpreting bus_addr before comma.\n");
- if (comma != NULL)
- *comma = ',';
- topo_mod_strfree(mod, bac);
- topo_mod_free(mod, pp, sizeof (busorrc_t));
- return (NULL);
- }
- if (comma == NULL) {
- pp->br_ba_ac = 0;
- topo_mod_strfree(mod, bac);
- return (pp);
- }
- pp->br_ba_ac = fm_strtonum(mod, comma + 1, &e);
- if (e < 0) {
- topo_mod_dprintf(mod,
- "Trouble interpreting bus_addr after comma.\n");
- *comma = ',';
- topo_mod_strfree(mod, bac);
- topo_mod_free(mod, pp, sizeof (busorrc_t));
- return (NULL);
- }
- *comma = ',';
- topo_mod_strfree(mod, bac);
- return (pp);
-}
-
-void
-busorrc_insert(topo_mod_t *mod, busorrc_t **head, busorrc_t *new)
-{
- busorrc_t *ppci, *pci;
-
- topo_mod_dprintf(mod,
- "inserting (%x,%x)\n", new->br_ba_bc, new->br_ba_ac);
-
- /* No entries yet? */
- if (*head == NULL) {
- *head = new;
- return;
- }
-
- ppci = NULL;
- pci = *head;
-
- while (pci != NULL) {
- if (new->br_ba_ac == pci->br_ba_ac)
- if (new->br_ba_bc < pci->br_ba_bc)
- break;
- if (new->br_ba_ac < pci->br_ba_ac)
- break;
- ppci = pci;
- pci = pci->br_nextbus;
- }
- if (ppci == NULL) {
- new->br_nextbus = pci;
- pci->br_prevbus = new;
- *head = new;
- } else {
- new->br_nextbus = ppci->br_nextbus;
- if (new->br_nextbus != NULL)
- new->br_nextbus->br_prevbus = new;
- ppci->br_nextbus = new;
- new->br_prevbus = ppci;
- }
-}
-
-int
-busorrc_add(topo_mod_t *mod, busorrc_t **list, di_node_t n)
-{
- busorrc_t *nb;
- char *ba;
-
- topo_mod_dprintf(mod, "busorrc_add\n");
- ba = di_bus_addr(n);
- if (ba == NULL ||
- (nb = busorrc_new(mod, ba, n)) == NULL) {
- topo_mod_dprintf(mod, "busorrc_new() failed.\n");
- return (-1);
- }
- busorrc_insert(mod, list, nb);
- return (0);
-}
-
-void
-busorrc_free(topo_mod_t *mod, busorrc_t *pb)
-{
- if (pb == NULL)
- return;
- busorrc_free(mod, pb->br_nextbus);
- topo_mod_free(mod, pb, sizeof (busorrc_t));
-}
-
-tnode_t *
-hb_process(topo_mod_t *mod, tnode_t *ptn, topo_instance_t hbi,
- topo_instance_t bi, di_node_t bn, did_t *hbdid)
-{
- tnode_t *hb;
-
- if ((hb = pcihostbridge_declare(mod, ptn, bn, hbi)) == NULL)
- return (NULL);
- if (topo_mod_enumerate(mod, hb, PCI_BUS, PCI_BUS, bi, bi, hbdid) == 0)
- return (hb);
-
- topo_node_unbind(hb);
-
- return (NULL);
-}
-
-tnode_t *
-rc_process(topo_mod_t *mod, tnode_t *ptn, topo_instance_t rci, di_node_t bn)
-{
- tnode_t *rc;
-
- if ((rc = pciexrc_declare(mod, ptn, bn, rci)) == NULL)
- return (NULL);
- if (topo_mod_enumerate(mod,
- rc, PCI_BUS, PCIEX_BUS, 0, MAX_HB_BUSES, NULL) == 0)
- return (rc);
-
- topo_node_unbind(rc);
-
- return (NULL);
-}
-
-/*
- * declare_exbuses() assumes the elements in the provided busorrc list
- * are sorted thusly:
- *
- * (Hostbridge #0, Root Complex #0, ExBus #0)
- * (Hostbridge #0, Root Complex #0, ExBus #1)
- * ...
- * (Hostbridge #0, Root Complex #0, ExBus #(buses/rc))
- * (Hostbridge #0, Root Complex #1, ExBus #0)
- * ...
- * (Hostbridge #0, Root Complex #1, ExBus #(buses/rc))
- * ...
- * ...
- * (Hostbridge #0, Root Complex #(rcs/hostbridge), ExBus #(buses/rc))
- * (Hostbridge #1, Root Complex #0, ExBus #0)
- * ...
- * ...
- * ...
- * ...
- * (Hostbridge #nhb, Root Complex #(rcs/hostbridge), ExBus #(buses/rc))
- */
-int
-declare_exbuses(topo_mod_t *mod, busorrc_t *list, tnode_t *ptn, int nhb,
- int nrc)
-{
- int err = 0;
- tnode_t **rcs;
- tnode_t **hb;
- busorrc_t *p;
- int br, rc;
-
- /*
- * Allocate an array to point at the hostbridge tnode_t pointers.
- */
- if ((hb = topo_mod_zalloc(mod, nhb * sizeof (tnode_t *))) == NULL)
- return (topo_mod_seterrno(mod, EMOD_NOMEM));
-
- /*
- * Allocate an array to point at the root complex tnode_t pointers.
- */
- if ((rcs = topo_mod_zalloc(mod, nrc * sizeof (tnode_t *))) == NULL) {
- topo_mod_free(mod, hb, nhb * sizeof (tnode_t *));
- return (topo_mod_seterrno(mod, EMOD_NOMEM));
- }
-
- br = rc = 0;
- for (p = list; p != NULL; p = p->br_nextbus) {
- topo_mod_dprintf(mod,
- "declaring (%x,%x)\n", p->br_ba_bc, p->br_ba_ac);
-
- if (did_create(mod, p->br_din, 0, br, rc, rc) == NULL) {
- err = -1;
- break;
- }
-
- if (hb[br] == NULL) {
- hb[br] = pciexhostbridge_declare(mod, ptn, p->br_din,
- br);
- if (hb[br] == NULL) {
- err = -1;
- break;
- }
- }
- if (rcs[rc] == NULL) {
- rcs[rc] = rc_process(mod, hb[br], rc, p->br_din);
- if (rcs[rc] == NULL) {
- err = -1;
- break;
- }
- } else {
- if (topo_mod_enumerate(mod,
- rcs[rc], PCI_BUS, PCIEX_BUS, 0, MAX_HB_BUSES,
- NULL) < 0) {
- err = -1;
- break;
- }
- }
- rc++;
- if (rc == nrc) {
- rc = 0;
- br++;
- if (br == nhb)
- br = 0;
- }
- }
-
- if (err != 0) {
- int i;
-
- for (i = 0; i < nhb; ++i)
- topo_node_unbind(hb[br]);
- for (i = 0; i < nrc; ++i)
- topo_node_unbind(rcs[rc]);
- }
-
- topo_mod_free(mod, rcs, nrc * sizeof (tnode_t *));
- topo_mod_free(mod, hb, nhb * sizeof (tnode_t *));
-
- return (err);
-}
-
-/*
- * declare_buses() assumes the elements in the provided busorrc list
- * are sorted thusly:
- *
- * (Hostbridge #0, Bus #0)
- * (Hostbridge #1, Bus #0)
- * ...
- * (Hostbridge #nhb, Bus #0)
- * (Hostbridge #0, Bus #1)
- * ...
- * ...
- * (Hostbridge #nhb, Bus #(buses/hostbridge))
- */
-int
-declare_buses(topo_mod_t *mod, busorrc_t *list, tnode_t *ptn, int nhb)
-{
- int err = 0;
- busorrc_t *p;
- tnode_t **hb;
- did_t *link;
- int br, bus;
-
- /*
- * Allocate an array to point at the hostbridge tnode_t pointers.
- */
- if ((hb = topo_mod_zalloc(mod, nhb * sizeof (tnode_t *))) == NULL)
- return (topo_mod_seterrno(mod, EMOD_NOMEM));
-
- br = bus = 0;
- for (p = list; p != NULL; p = p->br_nextbus) {
- topo_mod_dprintf(mod,
- "declaring (%x,%x)\n", p->br_ba_bc, p->br_ba_ac);
-
- if ((link =
- did_create(mod, p->br_din, 0, br, NO_RC, bus)) == NULL) {
- err = -1;
- break;
- }
-
- if (hb[br] == NULL) {
- hb[br] = hb_process(mod, ptn, br, bus, p->br_din, link);
- if (hb[br] == NULL) {
- err = -1;
- break;
- }
- } else {
- did_link_set(mod, hb[br], link);
- if (topo_mod_enumerate(mod,
- hb[br], PCI_BUS, PCI_BUS, bus, bus, link) < 0) {
- err = -1;
- break;
- }
- }
- br++;
- if (br == nhb) {
- br = 0;
- bus++;
- }
- }
-
- if (err != 0) {
- int i;
-
- for (i = 0; i < nhb; ++i)
- topo_node_unbind(hb[br]);
- }
-
- topo_mod_free(mod, hb, nhb * sizeof (tnode_t *));
- return (err);
-}
diff --git a/usr/src/lib/fm/topo/modules/sun4/hostbridge/hb_sun4.h b/usr/src/lib/fm/topo/modules/sun4/hostbridge/hb_sun4.h
deleted file mode 100644
index 22b85efe37..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4/hostbridge/hb_sun4.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2006 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _HB_SUN4_H
-#define _HB_SUN4_H
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include <fm/topo_mod.h>
-#include <sys/types.h>
-#include <libdevinfo.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct busorrc {
- struct busorrc *br_nextbus; /* next bus or root complex */
- struct busorrc *br_prevbus; /* previous bus or root complex */
- ulong_t br_ba_ac; /* bus addr, after the comma */
- ulong_t br_ba_bc; /* bus addr, before the comma */
- di_node_t br_din; /* devinfo node */
-} busorrc_t;
-
-struct did_hash;
-
-extern busorrc_t *busorrc_new(topo_mod_t *, const char *, di_node_t);
-extern void busorrc_insert(topo_mod_t *, busorrc_t **, busorrc_t *);
-extern int busorrc_add(topo_mod_t *, busorrc_t **, di_node_t);
-extern void busorrc_free(topo_mod_t *, busorrc_t *);
-
-extern tnode_t *rc_process(topo_mod_t *, tnode_t *, topo_instance_t, di_node_t);
-extern int declare_buses(topo_mod_t *, busorrc_t *, tnode_t *, int);
-extern int declare_exbuses(topo_mod_t *, busorrc_t *, tnode_t *, int, int);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _HB_SUN4_H */
diff --git a/usr/src/lib/fm/topo/modules/sun4/ioboard/Makefile.iob b/usr/src/lib/fm/topo/modules/sun4/ioboard/Makefile.iob
deleted file mode 100644
index b86ee55548..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4/ioboard/Makefile.iob
+++ /dev/null
@@ -1,46 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
-# Copyright (c) 2018, Joyent, Inc.
-#
-
-MODULE = ioboard
-SUN4DIR = ../../sun4/$(MODULE)
-UTILDIR = ../../common/pcibus
-UTILSRCS = did.c did_hash.c did_props.c util.c
-HBDIR = ../../common/hostbridge
-IOBSRCS = ioboard.c
-MODULESRCS = $(UTILSRCS) $(IOBSRCS) iob_platform.c
-
-include ../../Makefile.plugin
-
-LDLIBS += -ldevinfo -lsmbios -lpcidb
-CPPFLAGS += -I$(UTILDIR) -I$(HBDIR) -I$(SUN4DIR)
-
-%.o: $(UTILDIR)/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
-%.o: $(SUN4DIR)/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
diff --git a/usr/src/lib/fm/topo/modules/sun4/ioboard/ioboard.c b/usr/src/lib/fm/topo/modules/sun4/ioboard/ioboard.c
deleted file mode 100644
index 70f1108f1b..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4/ioboard/ioboard.c
+++ /dev/null
@@ -1,270 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2010 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#include <string.h>
-#include <sys/fm/protocol.h>
-#include <fm/topo_mod.h>
-#include <fm/topo_hc.h>
-#include <libdevinfo.h>
-#include <limits.h>
-#include <sys/param.h>
-#include <sys/systeminfo.h>
-
-#include <hostbridge.h>
-#include <ioboard.h>
-#include <did.h>
-#include <did_props.h>
-#include <util.h>
-
-/*
- * ioboard.c
- * Generic code shared by all the ioboard enumerators
- */
-
-static void iob_release(topo_mod_t *, tnode_t *);
-static int iob_enum(topo_mod_t *, tnode_t *, const char *, topo_instance_t,
- topo_instance_t, void *, void *);
-static int iob_label(topo_mod_t *, tnode_t *, topo_version_t, nvlist_t *,
- nvlist_t **);
-
-extern int platform_iob_enum(topo_mod_t *, tnode_t *, topo_instance_t,
- topo_instance_t);
-extern int platform_iob_label(topo_mod_t *, tnode_t *, nvlist_t *, nvlist_t **);
-
-extern txprop_t IOB_common_props[];
-extern int IOB_propcnt;
-
-static const topo_modops_t Iob_ops =
- { iob_enum, iob_release };
-static const topo_modinfo_t Iob_info =
- { IOBOARD, FM_FMRI_SCHEME_HC, IOB_ENUMR_VERS, &Iob_ops };
-
-static const topo_method_t Iob_methods[] = {
- { TOPO_METH_LABEL, TOPO_METH_LABEL_DESC,
- TOPO_METH_LABEL_VERSION, TOPO_STABILITY_INTERNAL, iob_label },
- { NULL }
-};
-
-void
-_topo_init(topo_mod_t *modhdl)
-{
- /*
- * Turn on module debugging output
- */
- if (getenv("TOPOIOBDBG") != NULL)
- topo_mod_setdebug(modhdl);
- topo_mod_dprintf(modhdl, "initializing ioboard enumerator\n");
-
- (void) topo_mod_register(modhdl, &Iob_info, TOPO_VERSION);
-
- topo_mod_dprintf(modhdl, "Ioboard enumr initd\n");
-}
-
-void
-_topo_fini(topo_mod_t *modhdl)
-{
- topo_mod_unregister(modhdl);
-}
-
-static int
-iob_label(topo_mod_t *mp, tnode_t *node, topo_version_t version,
- nvlist_t *in, nvlist_t **out)
-{
- if (version > TOPO_METH_LABEL_VERSION)
- return (topo_mod_seterrno(mp, EMOD_VER_NEW));
- return (platform_iob_label(mp, node, in, out));
-}
-
-static topo_mod_t *
-hb_enumr_load(topo_mod_t *mp)
-{
- topo_mod_t *rp = NULL;
-
- if ((rp = topo_mod_load(mp, HOSTBRIDGE, HB_ENUMR_VERS)) == NULL) {
- topo_mod_dprintf(mp,
- "%s enumerator could not load %s.\n", IOBOARD, HOSTBRIDGE);
- }
- return (rp);
-}
-
-/*ARGSUSED*/
-static int
-iob_enum(topo_mod_t *mp, tnode_t *pn, const char *name, topo_instance_t imin,
- topo_instance_t imax, void *notused1, void *notused2)
-{
- topo_mod_t *hbmod;
- int rv;
-
- if (strcmp(name, IOBOARD) != 0) {
- topo_mod_dprintf(mp,
- "Currently only know how to enumerate %s components.\n",
- IOBOARD);
- return (0);
- }
- /*
- * Load the hostbridge enumerator, we'll soon need it!
- */
- if ((hbmod = hb_enumr_load(mp)) == NULL) {
- return (-1);
- }
-
- if (did_hash_init(mp) != 0)
- return (-1);
-
- rv = platform_iob_enum(mp, pn, imin, imax);
-
- did_hash_fini(mp);
- topo_mod_unload(hbmod);
-
- if (rv < 0)
- return (topo_mod_seterrno(mp, EMOD_PARTIAL_ENUM));
- else
- return (0);
-}
-
-/*ARGSUSED*/
-static void
-iob_release(topo_mod_t *mp, tnode_t *node)
-{
-
- /*
- * node private data (did_t) for this node is destroyed in
- * did_hash_destroy()
- */
-
- topo_method_unregister_all(mp, node);
-}
-
-static tnode_t *
-iob_tnode_create(topo_mod_t *mod, tnode_t *parent,
- const char *name, topo_instance_t i, void *priv)
-{
- nvlist_t *fmri;
- tnode_t *ntn;
- nvlist_t *auth = topo_mod_auth(mod, parent);
-
- fmri = topo_mod_hcfmri(mod, parent, FM_HC_SCHEME_VERSION, name, i,
- NULL, auth, NULL, NULL, NULL);
- nvlist_free(auth);
- if (fmri == NULL) {
- topo_mod_dprintf(mod,
- "Unable to make nvlist for %s bind.\n", name);
- return (NULL);
- }
- ntn = topo_node_bind(mod, parent, name, i, fmri);
- if (ntn == NULL) {
- topo_mod_dprintf(mod,
- "topo_node_bind (%s%d/%s%d) failed: %s\n",
- topo_node_name(parent), topo_node_instance(parent),
- name, i,
- topo_strerror(topo_mod_errno(mod)));
- nvlist_free(fmri);
- return (NULL);
- }
- nvlist_free(fmri);
- topo_node_setspecific(ntn, priv);
-
- if (topo_method_register(mod, ntn, Iob_methods) < 0) {
- topo_mod_dprintf(mod, "topo_method_register failed: %s\n",
- topo_strerror(topo_mod_errno(mod)));
- topo_node_unbind(ntn);
- return (NULL);
- }
- return (ntn);
-}
-
-tnode_t *
-ioboard_declare(topo_mod_t *mod, tnode_t *parent, topo_instance_t i, void *priv)
-{
- tnode_t *ntn;
-
- if ((ntn = iob_tnode_create(mod, parent, IOBOARD, i, priv)) == NULL)
- return (NULL);
- if (did_props_set(ntn, priv, IOB_common_props, IOB_propcnt) < 0) {
- topo_node_unbind(ntn);
- return (NULL);
- }
- /*
- * We expect to find host bridges beneath the ioboard.
- */
- if (child_range_add(mod, ntn, HOSTBRIDGE, 0, MAX_HBS) < 0) {
- topo_node_unbind(ntn);
- return (NULL);
- }
- return (ntn);
-}
-
-did_t *
-split_bus_address(topo_mod_t *mod, di_node_t dp, uint_t baseaddr,
- uint_t bussep, int minbrd, int maxbrd, int *brd, int *br, int *bus)
-{
- uint_t bc, ac;
- char *comma;
- char *bac;
- char *ba;
- int e;
-
- if ((ba = di_bus_addr(dp)) == NULL ||
- (bac = topo_mod_strdup(mod, ba)) == NULL)
- return (NULL);
-
- topo_mod_dprintf(mod,
- "Transcribing %s into board, bus, etc.\n", bac);
-
- if ((comma = strchr(bac, ',')) == NULL) {
- topo_mod_strfree(mod, bac);
- return (NULL);
- }
- *comma = '\0';
- bc = fm_strtonum(mod, bac, &e);
- *comma = ',';
- if (e < 0) {
- topo_mod_dprintf(mod,
- "Trouble interpreting %s before comma.\n", bac);
- topo_mod_strfree(mod, bac);
- return (NULL);
- }
- ac = fm_strtonum(mod, comma + 1, &e);
- if (e < 0) {
- topo_mod_dprintf(mod,
- "Trouble interpreting %s after comma.\n", bac);
- topo_mod_strfree(mod, bac);
- return (NULL);
- }
- topo_mod_strfree(mod, bac);
-
- *brd = ((bc - baseaddr) / bussep) + minbrd;
- *br = (bc - baseaddr) % bussep;
- *bus = ((ac == IOB_BUSADDR1) ? 0 : 1);
- if (*brd < minbrd || *brd > maxbrd || (*br != 0 && *br != 1) ||
- (ac != IOB_BUSADDR1 && ac != IOB_BUSADDR2)) {
- topo_mod_dprintf(mod, "Trouble with transcription\n");
- topo_mod_dprintf(mod, "brd=%d br=%d bus=%d bc=%x ac=%x\n",
- *brd, *br, *bus, bc, ac);
- return (NULL);
- }
- return (did_create(mod, dp, *brd, *br, NO_RC, *bus));
-}
diff --git a/usr/src/lib/fm/topo/modules/sun4/ioboard/ioboard.h b/usr/src/lib/fm/topo/modules/sun4/ioboard/ioboard.h
deleted file mode 100644
index 6bd3058da5..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4/ioboard/ioboard.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2006 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _IOBOARD_H
-#define _IOBOARD_H
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include <libdevinfo.h>
-#include <did.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define IOB_ENUMR_VERS 1
-
-/*
- * For all machines that currently use this enumerator, buses have one
- * of the following addresses.
- */
-#define IOB_BUSADDR1 0x600000
-#define IOB_BUSADDR2 0x700000
-
-extern tnode_t *ioboard_declare(topo_mod_t *, tnode_t *, topo_instance_t,
- void *);
-
-extern int platform_iob_enum(topo_mod_t *, tnode_t *, topo_instance_t,
- topo_instance_t);
-extern int platform_iob_label(topo_mod_t *, tnode_t *, nvlist_t *, nvlist_t **);
-
-/*
- * This routine works for splitting up the string we get from
- * di_bus_addr() for all machines that currently use this enumerator.
- */
-extern did_t *split_bus_address(topo_mod_t *, di_node_t, uint_t, uint_t,
- int, int, int *, int *, int *);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _IOBOARD_H */
diff --git a/usr/src/lib/fm/topo/modules/sun4/pcibus/Makefile.pci b/usr/src/lib/fm/topo/modules/sun4/pcibus/Makefile.pci
deleted file mode 100644
index 39f106451e..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4/pcibus/Makefile.pci
+++ /dev/null
@@ -1,57 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
-# Copyright (c) 2018, Joyent, Inc.
-#
-
-MODULE = pcibus
-CLASS = arch
-SUN4DIR = ../../sun4/$(MODULE)
-UTILDIR = ../../common/pcibus
-NICDIR = ../../common/nic
-USBDIR = ../../common/usb
-HBDIR = ../../common/hostbridge
-SHAREDDIR = ../../common/shared
-UTILSRCS = did.c did_hash.c did_props.c util.c
-PCISRCS = pcibus.c pcibus_labels.c pci_sun4.c pcibus_hba.c pci_sensor.c
-SHAREDSRCS = topo_sensor.c
-
-MODULESRCS = $(PCISRCS) $(UTILSRCS) pci_$(ARCH).c
-
-include ../../Makefile.plugin
-
-LDLIBS += -ldevinfo -lsmbios -lpcidb
-CPPFLAGS += -I$(SUN4DIR) -I$(UTILDIR) -I$(HBDIR) -I$(NICDIR) -I$(USBDIR)
-CPPFLAGS += -I$(SHAREDDIR)
-
-%.o: $(SUN4DIR)/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
-%.o: $(UTILDIR)/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
-%.o: $(SHAREDDIR)/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
diff --git a/usr/src/lib/fm/topo/modules/sun4/pcibus/pci_sun4.c b/usr/src/lib/fm/topo/modules/sun4/pcibus/pci_sun4.c
deleted file mode 100644
index d03fbe6d64..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4/pcibus/pci_sun4.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include <string.h>
-#include <fm/topo_mod.h>
-#include <libnvpair.h>
-#include <util.h>
-#include <pcibus.h>
-#include <did.h>
-#include <pcibus_labels.h>
-
-int
-pci_fru_compute(topo_mod_t *mod, tnode_t *node, nvlist_t *in, nvlist_t **out)
-{
- return (pci_fru_cmn(mod, node, in, out));
-}
diff --git a/usr/src/lib/fm/topo/modules/sun4/pcibus/pci_sun4.h b/usr/src/lib/fm/topo/modules/sun4/pcibus/pci_sun4.h
deleted file mode 100644
index a8681fb5f0..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4/pcibus/pci_sun4.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _HB_SUN4_H
-#define _HB_SUN4_H
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include <fm/topo_mod.h>
-#include <libnvpair.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-extern int
-pci_fru_compute(topo_mod_t *mod, tnode_t *node, nvlist_t *in, nvlist_t **out);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _HB_SUN4_H */
diff --git a/usr/src/lib/fm/topo/modules/sun4u/Makefile b/usr/src/lib/fm/topo/modules/sun4u/Makefile
deleted file mode 100644
index 7cc4f0e51e..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4u/Makefile
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2006 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-
-SUBDIRS = chip hostbridge pcibus
-
-.PARALLEL: $(SUBDIRS)
-
-include ../../../Makefile.subdirs
diff --git a/usr/src/lib/fm/topo/modules/sun4u/chip/Makefile b/usr/src/lib/fm/topo/modules/sun4u/chip/Makefile
deleted file mode 100644
index ded8670afc..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4u/chip/Makefile
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2007 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-ARCH = sun4u
-
-sun4u_SRCS = chip_sun4u.c
-
-include ../../sun4/chip/Makefile.chip
-
-LDLIBS += -lkstat
diff --git a/usr/src/lib/fm/topo/modules/sun4u/chip/chip_sun4u.c b/usr/src/lib/fm/topo/modules/sun4u/chip/chip_sun4u.c
deleted file mode 100644
index e743a9bca6..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4u/chip/chip_sun4u.c
+++ /dev/null
@@ -1,277 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2006 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include <unistd.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <strings.h>
-#include <limits.h>
-#include <alloca.h>
-#include <kstat.h>
-#include <errno.h>
-#include <libnvpair.h>
-#include <sys/types.h>
-#include <sys/bitmap.h>
-#include <sys/processor.h>
-#include <sys/param.h>
-#include <sys/fm/protocol.h>
-#include <sys/systeminfo.h>
-#include <fm/topo_mod.h>
-
-/*
- * Enumerates the processing chips, or sockets, (as distinct from cores) in a
- * system. For each chip found, the necessary nodes (one or more cores, and
- * possibly a memory controller) are constructed underneath.
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define CHIP_VERSION TOPO_VERSION
-#define CPU_NODE_NAME "cpu"
-#define CHIP_NODE_NAME "chip"
-
-typedef struct chip {
- kstat_ctl_t *chip_kc;
- kstat_t **chip_cpustats;
- uint_t chip_ncpustats;
-} chip_t;
-
-static int chip_enum(topo_mod_t *, tnode_t *, const char *, topo_instance_t,
- topo_instance_t, void *, void *);
-
-static const topo_modops_t chip_ops =
- { chip_enum, NULL};
-static const topo_modinfo_t chip_info =
- { "chip", FM_FMRI_SCHEME_HC, CHIP_VERSION, &chip_ops };
-
-int
-_topo_init(topo_mod_t *mod)
-{
- chip_t *chip;
-
- if (getenv("TOPOCHIPDBG"))
- topo_mod_setdebug(mod);
- topo_mod_dprintf(mod, "initializing chip enumerator\n");
-
- if ((chip = topo_mod_zalloc(mod, sizeof (chip_t))) == NULL)
- return (-1);
-
- if ((chip->chip_kc = kstat_open()) == NULL) {
- topo_mod_dprintf(mod, "kstat_open failed: %s\n",
- strerror(errno));
- topo_mod_free(mod, chip, sizeof (chip_t));
- return (-1);
- }
-
- chip->chip_ncpustats = sysconf(_SC_CPUID_MAX);
- if ((chip->chip_cpustats = topo_mod_zalloc(mod, (
- chip->chip_ncpustats + 1) * sizeof (kstat_t *))) == NULL) {
- (void) kstat_close(chip->chip_kc);
- topo_mod_free(mod, chip, sizeof (chip_t));
- return (-1);
- }
-
- if (topo_mod_register(mod, &chip_info, TOPO_VERSION) != 0) {
- topo_mod_dprintf(mod, "failed to register hc: "
- "%s\n", topo_mod_errmsg(mod));
- topo_mod_free(mod, chip->chip_cpustats,
- (chip->chip_ncpustats + 1) * sizeof (kstat_t *));
- (void) kstat_close(chip->chip_kc);
- topo_mod_free(mod, chip, sizeof (chip_t));
- return (-1);
- }
- topo_mod_setspecific(mod, (void *)chip);
-
- return (0);
-}
-
-void
-_topo_fini(topo_mod_t *mod)
-{
- chip_t *chip;
-
- chip = topo_mod_getspecific(mod);
-
- if (chip->chip_cpustats != NULL)
- topo_mod_free(mod, chip->chip_cpustats,
- (chip->chip_ncpustats + 1) * sizeof (kstat_t *));
-
- (void) kstat_close(chip->chip_kc);
- topo_mod_free(mod, chip, sizeof (chip_t));
-
- topo_mod_unregister(mod);
-}
-
-static int
-cpu_kstat_init(chip_t *chip, int i)
-{
- kstat_t *ksp;
-
- if (chip->chip_cpustats[i] == NULL) {
- if ((ksp = kstat_lookup(chip->chip_kc, "cpu_info", i, NULL)) ==
- NULL || kstat_read(chip->chip_kc, ksp, NULL) < 0)
- return (-1);
-
- chip->chip_cpustats[i] = ksp;
- } else {
- ksp = chip->chip_cpustats[i];
- }
-
- return (ksp->ks_instance);
-}
-
-static nvlist_t *
-cpu_fmri_create(topo_mod_t *mod, uint32_t cpuid, char *s, uint8_t cpumask)
-{
- int err;
- nvlist_t *asru;
-
- if (topo_mod_nvalloc(mod, &asru, NV_UNIQUE_NAME) != 0)
- return (NULL);
-
- err = nvlist_add_uint8(asru, FM_VERSION, FM_CPU_SCHEME_VERSION);
- err |= nvlist_add_string(asru, FM_FMRI_SCHEME, FM_FMRI_SCHEME_CPU);
- err |= nvlist_add_uint32(asru, FM_FMRI_CPU_ID, cpuid);
- err |= nvlist_add_uint8(asru, FM_FMRI_CPU_MASK, cpumask);
- if (s != NULL)
- err |= nvlist_add_string(asru, FM_FMRI_CPU_SERIAL_ID, s);
- if (err != 0) {
- nvlist_free(asru);
- (void) topo_mod_seterrno(mod, EMOD_FMRI_NVL);
- return (NULL);
- }
-
- return (asru);
-}
-
-/*ARGSUSED*/
-static int
-cpu_create(topo_mod_t *mod, tnode_t *rnode, const char *name,
- topo_instance_t min, topo_instance_t max, chip_t *chip)
-{
- int i, err, chip_id, nerr = 0;
- char *s, sbuf[21];
- tnode_t *cnode;
- kstat_named_t *ks, *kf;
- nvlist_t *fmri, *asru;
- nvlist_t *auth = topo_mod_auth(mod, rnode);
-
- /*
- * Override what was created for us
- */
- topo_node_range_destroy(rnode, name);
- if (topo_node_range_create(mod, rnode, name, 0, chip->chip_ncpustats)
- < 0)
- return (topo_mod_seterrno(mod, EMOD_PARTIAL_ENUM));
-
- for (i = 0; i <= chip->chip_ncpustats; i++) {
-
- if ((chip_id = cpu_kstat_init(chip, i)) < 0)
- continue;
-
- if ((ks = kstat_data_lookup(chip->chip_cpustats[i],
- "device_ID")) != NULL) {
- (void) snprintf(sbuf, 21, "%llX", ks->value.ui64);
- s = sbuf;
- } else {
- s = NULL;
- }
-
- fmri = topo_mod_hcfmri(mod, rnode, FM_HC_SCHEME_VERSION, name,
- (topo_instance_t)chip_id, NULL, auth, NULL, NULL, s);
- if (fmri == NULL || (cnode = topo_node_bind(mod,
- rnode, name, i, fmri)) == NULL) {
- ++nerr;
- nvlist_free(fmri);
- continue;
- }
- nvlist_free(fmri);
-
- if ((asru = cpu_fmri_create(mod, i, s, 0)) != NULL) {
- (void) topo_node_asru_set(cnode, asru, 0, &err);
- nvlist_free(asru);
- } else {
- ++nerr;
- }
-
- /*
- * We look for a cpu_fru kstat. If one is available and
- * it contains something useful, use it as the label and
- * and the FRU.
- *
- * This is a problem for platforms that do not properly
- * support the cpu_fru kstat like Ontario or if
- * we start exporting a different type of FRU label
- */
- if ((kf = kstat_data_lookup(chip->chip_cpustats[i], "cpu_fru"))
- != NULL && strcmp(KSTAT_NAMED_STR_PTR(kf),
- "hc:///component=") != 0) {
- nvlist_t *fru;
- char *lp;
-
- if (topo_mod_str2nvl(mod, KSTAT_NAMED_STR_PTR(kf),
- &fru) == 0) {
- (void) topo_node_fru_set(cnode, fru, 0, &err);
- nvlist_free(fru);
- }
-
- if ((lp = strchr(KSTAT_NAMED_STR_PTR(kf), '='))
- == NULL) {
- (void) topo_node_label_set(cnode, NULL, &err);
- } else {
- ++lp;
- (void) topo_node_label_set(cnode, lp, &err);
- }
- } else {
- (void) topo_node_label_set(cnode, NULL, &err);
- }
- }
-
- nvlist_free(auth);
-
- if (nerr != 0)
- return (topo_mod_seterrno(mod, EMOD_PARTIAL_ENUM));
- else
- return (0);
-}
-
-/*ARGSUSED*/
-static int
-chip_enum(topo_mod_t *mod, tnode_t *rnode, const char *name,
- topo_instance_t min, topo_instance_t max, void *arg, void *notused)
-{
- chip_t *chip = (chip_t *)arg;
-
- if (strcmp(name, CPU_NODE_NAME) == 0)
- return (cpu_create(mod, rnode, name, min, max, chip));
-
- return (0);
-}
diff --git a/usr/src/lib/fm/topo/modules/sun4u/hostbridge/Makefile b/usr/src/lib/fm/topo/modules/sun4u/hostbridge/Makefile
deleted file mode 100644
index 003ffab149..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4u/hostbridge/Makefile
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-
-ARCH = sun4u
-
-sun4u_SRCS = hb_sun4u.c
-
-include ../../sun4/hostbridge/Makefile.hb
diff --git a/usr/src/lib/fm/topo/modules/sun4u/hostbridge/hb_sun4u.c b/usr/src/lib/fm/topo/modules/sun4u/hostbridge/hb_sun4u.c
deleted file mode 100644
index 58c251f9d5..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4u/hostbridge/hb_sun4u.c
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2006 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include <fm/topo_hc.h>
-
-#include <hb_sun4.h>
-#include <hostbridge.h>
-#include <pcibus.h>
-#include <util.h>
-
-int
-count_busorrc(topo_mod_t *mod, busorrc_t *list, int *hbc, int *bph)
-{
- ulong_t start;
- busorrc_t *p;
- int bt;
-
- start = list->br_ba_ac;
- p = list->br_nextbus;
- bt = *hbc = 1;
- while (p != NULL) {
- if (p->br_ba_ac == start)
- (*hbc)++;
- bt++;
- p = p->br_nextbus;
- }
-
- /*
- * sanity check that we have the correct number of buses/root
- * complexes in the list to have the same number of buses on
- * each hostbridge
- */
- if (bt % *hbc != 0) {
- topo_mod_dprintf(mod,
- "Imbalance between bus/root complex count and "
- "the number of hostbridges.\n");
- return (topo_mod_seterrno(mod, EMOD_PARTIAL_ENUM));
- }
- *bph = bt / *hbc;
- topo_mod_dprintf(mod,
- "%d hostbridge%s\n", *hbc, (*hbc > 1) ? "s." : ".");
- topo_mod_dprintf(mod, "%d buses total.\n", bt);
- return (0);
-}
-
-static int
-busorrc_process(topo_mod_t *mod, busorrc_t *list, int isrc, tnode_t *ptn)
-{
- int hbc, busper;
-
- if (list == NULL) {
- if (isrc == 1)
- topo_mod_dprintf(mod, "No root complexes found.\n");
- else
- topo_mod_dprintf(mod, "No pci buses found.\n");
- return (0);
- }
-
- /*
- * At this point we've looked through all the top-level device
- * tree nodes for instances of drivers that represent logical
- * PCI buses or root complexes. We've sorted them into a
- * list, ordered by "bus address". We retrieved "bus address"
- * using di_bus_addr(). That gave us a string that contains
- * either a single hex number or a pair of them separated by a
- * comma. If there was a single number, we've assumed the
- * second number to be zero.
- *
- * So, we always have a pair of numbers describing a bus/root
- * complex, X1 and X2, with X1 being the number before the
- * comma, and X2 being the number after (or the assumed zero).
- * As each node was examined, we then sorted these buses/root
- * complexes, first by the value of X2, and using X1 to order
- * amongst buses/root complexes with the same value for X2.
- *
- * We infer the existence of hostbridges by observing a
- * pattern that X2 is recycled for different hostbridges, and
- * that sorting by X1 within buses/root complexes with equal
- * values of X2 maintains the correct associations of
- * buses/root complexes and bridges.
- */
- if (count_busorrc(mod, list, &hbc, &busper) < 0)
- return (-1);
- if (isrc == 1)
- return (declare_exbuses(mod, list, ptn, hbc, busper));
- else
- return (declare_buses(mod, list, ptn, hbc));
-}
-
-static int
-pci_hostbridges_find(topo_mod_t *mod, tnode_t *ptn)
-{
- busorrc_t *buses = NULL;
- busorrc_t *rcs = NULL;
- di_node_t devtree;
- di_node_t pnode;
-
- /* Scan for buses, top-level devinfo nodes with the right driver */
- devtree = topo_mod_devinfo(mod);
- if (devtree == DI_NODE_NIL) {
- topo_mod_dprintf(mod, "devinfo init failed.");
- topo_node_range_destroy(ptn, HOSTBRIDGE);
- return (topo_mod_seterrno(mod, EMOD_PARTIAL_ENUM));
- }
-
- pnode = di_drv_first_node(PCI, devtree);
- while (pnode != DI_NODE_NIL) {
- if (busorrc_add(mod, &buses, pnode) < 0) {
- return (topo_mod_seterrno(mod, EMOD_PARTIAL_ENUM));
- }
- pnode = di_drv_next_node(pnode);
- }
- pnode = di_drv_first_node(PSYCHO, devtree);
- while (pnode != DI_NODE_NIL) {
- if (busorrc_add(mod, &buses, pnode) < 0) {
- return (topo_mod_seterrno(mod, EMOD_PARTIAL_ENUM));
- }
- pnode = di_drv_next_node(pnode);
- }
- pnode = di_drv_first_node(SCHIZO, devtree);
- while (pnode != DI_NODE_NIL) {
- if (busorrc_add(mod, &buses, pnode) < 0) {
- return (topo_mod_seterrno(mod, EMOD_PARTIAL_ENUM));
- }
- pnode = di_drv_next_node(pnode);
- }
- pnode = di_drv_first_node(PX, devtree);
- while (pnode != DI_NODE_NIL) {
- if (busorrc_add(mod, &rcs, pnode) < 0) {
- return (topo_mod_seterrno(mod, EMOD_PARTIAL_ENUM));
- }
- pnode = di_drv_next_node(pnode);
- }
- if (busorrc_process(mod, buses, 0, ptn) < 0)
- return (topo_mod_seterrno(mod, EMOD_PARTIAL_ENUM));
-
- if (busorrc_process(mod, rcs, 1, ptn) < 0)
- return (topo_mod_seterrno(mod, EMOD_PARTIAL_ENUM));
-
- busorrc_free(mod, buses);
- busorrc_free(mod, rcs);
- return (0);
-}
-
-/*ARGSUSED*/
-int
-platform_hb_enum(topo_mod_t *mod, tnode_t *parent, const char *name,
- topo_instance_t imin, topo_instance_t imax)
-{
- return (pci_hostbridges_find(mod, parent));
-}
-
-/*ARGSUSED*/
-int
-platform_hb_label(topo_mod_t *mod, tnode_t *node, nvlist_t *in, nvlist_t **out)
-{
- return (labelmethod_inherit(mod, node, in, out));
-}
diff --git a/usr/src/lib/fm/topo/modules/sun4u/pcibus/Makefile b/usr/src/lib/fm/topo/modules/sun4u/pcibus/Makefile
deleted file mode 100644
index f9d3a81033..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4u/pcibus/Makefile
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2007 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-#
-ARCH = sun4u
-include ../../sun4/pcibus/Makefile.pci
-
diff --git a/usr/src/lib/fm/topo/modules/sun4u/pcibus/pci_sun4u.c b/usr/src/lib/fm/topo/modules/sun4u/pcibus/pci_sun4u.c
deleted file mode 100644
index 52677805d0..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4u/pcibus/pci_sun4u.c
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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.
- */
-
-#include <fm/topo_mod.h>
-#include <did_props.h>
-
-/*
- * Including the following file gives us definitions of the three
- * global arrays used to adjust labels, Slot_Rewrites, Physlot_Names,
- * and Missing_Names. With those defined we can use the common labeling
- * routines for pci.
- */
-#include "pci_sun4u.h"
-
-#include "pci_sun4.h"
-#include <strings.h>
-
-int
-platform_pci_label(topo_mod_t *mod, tnode_t *node, nvlist_t *in,
- nvlist_t **out)
-{
- return (pci_label_cmn(mod, node, in, out));
-}
-int
-platform_pci_fru(topo_mod_t *mod, tnode_t *node, nvlist_t *in,
- nvlist_t **out)
-{
- return (pci_fru_compute(mod, node, in, out));
-}
-
-/*
- * Sun-Fire platform function to test whether the hostbridge which
- * this PCI device is associated with is an Xmits or not. This
- * function applies to E3800, E48xx, E4900, E6800, and E6900.
- *
- * Return 1 if the hostbridge is an Xmits otherwise return 0.
- *
- * This check is done by walking up the topo tree and checking the
- * associated device info nodes for a binding name or a compatible
- * name matching that of Xmits.
- */
-int
-sunfire_test_func(topo_mod_t *mod, did_t *dp)
-{
- tnode_t *tp;
- int done, xmits_found, i, n;
- char *compatible_names, *binding_name;
-
- done = xmits_found = 0;
- tp = did_gettnode(dp);
-
- while (!done) {
- topo_mod_dprintf(mod, "%s: dp=0x%p, tp=0x%p\n",
- __func__, dp, tp);
-
- /*
- * Check binding name.
- */
- binding_name = di_binding_name(did_dinode(dp));
- if (binding_name != NULL) {
- topo_mod_dprintf(mod, "%s: binding_name=%s\n",
- __func__, binding_name);
- if (strncmp(binding_name, XMITS_COMPAT,
- sizeof (XMITS_COMPAT)) == 0) {
- done = xmits_found = 1;
- break;
- }
- }
-
- /*
- * Check compatible names.
- */
- n = di_compatible_names(did_dinode(dp), &compatible_names);
- for (i = 0; i < n; i++) {
- topo_mod_dprintf(mod, "%s: compatible_name[%d]=%s\n",
- __func__, i, compatible_names);
- if (strncmp(compatible_names, XMITS_COMPAT,
- sizeof (XMITS_COMPAT)) == 0) {
- done = xmits_found = 1;
- break;
- }
- compatible_names += strlen(compatible_names) + 1;
- }
-
- /*
- * Walk up the tree until we hit the top or hit
- * a non-PCI device.
- */
- if (((tp = topo_node_parent(tp)) == NULL) ||
- (dp = did_find(mod, topo_node_getspecific(tp))) == NULL) {
- done = 1;
- break;
- }
- }
-
- return (xmits_found);
-}
diff --git a/usr/src/lib/fm/topo/modules/sun4u/pcibus/pci_sun4u.h b/usr/src/lib/fm/topo/modules/sun4u/pcibus/pci_sun4u.h
deleted file mode 100644
index 62392a6e37..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4u/pcibus/pci_sun4u.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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.
- */
-
-#ifndef _PCI_SUN4U_H
-#define _PCI_SUN4U_H
-
-#include <pcibus_labels.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define XMITS_COMPAT "pci108e,8002" /* compatible property for XMits */
-
-/*
- * Functions for platforms that need a label lookup
- * test in addition to the standard ones provided.
- */
-extern int sunfire_test_func(topo_mod_t *, did_t *);
-
-/*
- * Data for label lookup based on existing slot label.
- *
- * Platforms may need entries here if the slot labels
- * provided by firmware are incorrect.
- */
-
-slot_rwd_t v240_rewrites[] = {
- /* from OBP, should be, test func */
- { "PCI3", "PCI0", NULL },
- { "PCI1", "PCI2", NULL },
- { "PCI2", "PCI1", NULL }
-};
-
-slot_rwd_t sunfire_rewrites[] = {
- { "slot 2", "slot 3", sunfire_test_func },
- { "slot 3", "slot 2", sunfire_test_func },
- { "slot 6", "slot 7", sunfire_test_func },
- { "slot 7", "slot 6", sunfire_test_func }
-};
-
-plat_rwd_t plat_rewrites[] = {
- { "Sun-Fire-V240",
- sizeof (v240_rewrites) / sizeof (slot_rwd_t),
- v240_rewrites },
- { "Sun-Fire",
- sizeof (sunfire_rewrites) / sizeof (slot_rwd_t),
- sunfire_rewrites }
-};
-
-slotnm_rewrite_t SlotRWs = {
- sizeof (plat_rewrites) / sizeof (plat_rwd_t),
- plat_rewrites
-};
-
-slotnm_rewrite_t *Slot_Rewrites = &SlotRWs;
-physlot_names_t *Physlot_Names = NULL;
-missing_names_t *Missing_Names = NULL;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _PCI_SUN4U_H */
diff --git a/usr/src/lib/fm/topo/modules/sun4v/Makefile b/usr/src/lib/fm/topo/modules/sun4v/Makefile
deleted file mode 100644
index 392e7898bc..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/Makefile
+++ /dev/null
@@ -1,41 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-
-SUBDIRS = chip \
- cpuboard \
- dimm \
- hostbridge \
- pcibus \
- motherboard \
- niu \
- platform-cpu \
- platform-mem \
- sun4vpi \
- xaui \
- zambezi
-
-include ../../../Makefile.subdirs
diff --git a/usr/src/lib/fm/topo/modules/sun4v/chip/Makefile b/usr/src/lib/fm/topo/modules/sun4v/chip/Makefile
deleted file mode 100644
index c2d3d85d4a..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/chip/Makefile
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-ARCH = sun4v
-PRIDIR=../platform-cpu
-PIDIR=../sun4vpi
-
-sun4v_SRCS = chip_sun4v.c cpu_mdesc.c pi_meth.c
-
-INCDIRS = $(ROOT)/usr/platform/sun4v/include \
- $(PRIDIR)
-
-include ../../sun4/chip/Makefile.chip
-
-LDLIBS += -lumem -lmdesc -lldom
-
-%.o: $(PRIDIR)/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
-%.o: $(PIDIR)/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
diff --git a/usr/src/lib/fm/topo/modules/sun4v/chip/chip_sun4v.c b/usr/src/lib/fm/topo/modules/sun4v/chip/chip_sun4v.c
deleted file mode 100644
index 1860094bbe..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/chip/chip_sun4v.c
+++ /dev/null
@@ -1,428 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <strings.h>
-#include <sys/types.h>
-#include <fm/topo_mod.h>
-#include <fm/topo_hc.h>
-#include <sys/fm/protocol.h>
-
-#include <unistd.h>
-#include <sys/param.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <umem.h>
-
-#include <cpu_mdesc.h>
-
-
-/*
- * Enumerates the processing chips, or sockets, (as distinct from cores) in a
- * system. For each chip found, the necessary nodes (one or more cores, and
- * possibly a memory controller) are constructed underneath.
- */
-
-#define CHIP_VERSION TOPO_VERSION
-#define CPU_NODE_NAME "cpu"
-#define CHIP_NODE_NAME "chip"
-
-extern topo_method_t pi_cpu_methods[];
-
-/* Forward declaration */
-static int chip_enum(topo_mod_t *, tnode_t *, const char *, topo_instance_t,
- topo_instance_t, void *, void *);
-static void chip_release(topo_mod_t *, tnode_t *);
-
-static const topo_modops_t chip_ops =
- { chip_enum, chip_release };
-static const topo_modinfo_t chip_info =
- { "chip", FM_FMRI_SCHEME_HC, CHIP_VERSION, &chip_ops };
-
-
-static const topo_pgroup_info_t chip_auth_pgroup = {
- FM_FMRI_AUTHORITY,
- TOPO_STABILITY_PRIVATE,
- TOPO_STABILITY_PRIVATE,
- 1
-};
-
-int
-_topo_init(topo_mod_t *mod)
-{
- md_info_t *chip;
-
- if (getenv("TOPOCHIPDBG"))
- topo_mod_setdebug(mod);
- topo_mod_dprintf(mod, "initializing chip enumerator\n");
-
- if ((chip = topo_mod_zalloc(mod, sizeof (md_info_t))) == NULL)
- return (-1);
-
- if (cpu_mdesc_init(mod, chip) != 0) {
- topo_mod_dprintf(mod, "failed to get cpus from the PRI/MD\n");
- topo_mod_free(mod, chip, sizeof (md_info_t));
- return (-1);
- }
-
- topo_mod_setspecific(mod, (void *)chip);
-
- if (topo_mod_register(mod, &chip_info, TOPO_VERSION) != 0) {
- topo_mod_dprintf(mod, "failed to register hc: "
- "%s\n", topo_mod_errmsg(mod));
- cpu_mdesc_fini(mod, chip);
- topo_mod_free(mod, chip, sizeof (md_info_t));
- return (-1);
- }
-
- topo_mod_dprintf(mod, "chip enumerator inited\n");
-
- return (0);
-}
-
-void
-_topo_fini(topo_mod_t *mod)
-{
- md_info_t *chip;
-
- chip = (md_info_t *)topo_mod_getspecific(mod);
-
- cpu_mdesc_fini(mod, chip);
-
- topo_mod_free(mod, chip, sizeof (md_info_t));
-
- topo_mod_unregister(mod);
-}
-
-static tnode_t *
-chip_tnode_create(topo_mod_t *mod, tnode_t *parent,
- const char *name, topo_instance_t i, char *serial,
- nvlist_t *fru, char *label, void *priv)
-{
- int err;
- nvlist_t *fmri;
- tnode_t *ntn;
- char *prod = NULL, *psn = NULL, *csn = NULL, *server = NULL;
- nvlist_t *auth = NULL;
-
- if (topo_mod_nvalloc(mod, &auth, NV_UNIQUE_NAME) == 0) {
- if (topo_prop_get_string(parent, FM_FMRI_AUTHORITY,
- FM_FMRI_AUTH_PRODUCT, &prod, &err) == 0) {
- (void) nvlist_add_string(auth, FM_FMRI_AUTH_PRODUCT,
- prod);
- topo_mod_strfree(mod, prod);
- }
- if (topo_prop_get_string(parent, FM_FMRI_AUTHORITY,
- FM_FMRI_AUTH_PRODUCT_SN, &psn, &err) == 0) {
- (void) nvlist_add_string(auth, FM_FMRI_AUTH_PRODUCT_SN,
- psn);
- topo_mod_strfree(mod, psn);
- }
- if (topo_prop_get_string(parent, FM_FMRI_AUTHORITY,
- FM_FMRI_AUTH_SERVER, &server, &err) == 0) {
- (void) nvlist_add_string(auth, FM_FMRI_AUTH_SERVER,
- server);
- topo_mod_strfree(mod, server);
- }
- if (topo_prop_get_string(parent, FM_FMRI_AUTHORITY,
- FM_FMRI_AUTH_CHASSIS, &csn, &err) == 0) {
- (void) nvlist_add_string(auth, FM_FMRI_AUTH_CHASSIS,
- csn);
- topo_mod_strfree(mod, csn);
- }
- }
-
-
- fmri = topo_mod_hcfmri(mod, parent, FM_HC_SCHEME_VERSION, name, i,
- NULL, auth, NULL, NULL, serial);
- nvlist_free(auth);
- if (fmri == NULL) {
- topo_mod_dprintf(mod,
- "Unable to make nvlist for %s bind: %s.\n",
- name, topo_mod_errmsg(mod));
- return (NULL);
- }
-
- ntn = topo_node_bind(mod, parent, name, i, fmri);
- if (ntn == NULL) {
- topo_mod_dprintf(mod,
- "topo_node_bind (%s%d/%s%d) failed: %s\n",
- topo_node_name(parent), topo_node_instance(parent),
- name, i,
- topo_strerror(topo_mod_errno(mod)));
- nvlist_free(fmri);
- return (NULL);
- }
- nvlist_free(fmri);
- topo_node_setspecific(ntn, priv);
-
- if (topo_pgroup_create(ntn, &chip_auth_pgroup, &err) == 0) {
- (void) topo_prop_inherit(ntn, FM_FMRI_AUTHORITY,
- FM_FMRI_AUTH_PRODUCT, &err);
- (void) topo_prop_inherit(ntn, FM_FMRI_AUTHORITY,
- FM_FMRI_AUTH_PRODUCT_SN, &err);
- (void) topo_prop_inherit(ntn, FM_FMRI_AUTHORITY,
- FM_FMRI_AUTH_CHASSIS, &err);
- (void) topo_prop_inherit(ntn, FM_FMRI_AUTHORITY,
- FM_FMRI_AUTH_SERVER, &err);
- }
-
- /* Inherit the Label FRU fields from the parent */
- (void) topo_node_label_set(ntn, label, &err);
- (void) topo_node_fru_set(ntn, fru, 0, &err);
-
- /* Register retire methods */
- if (topo_method_register(mod, ntn, pi_cpu_methods) < 0)
- topo_mod_dprintf(mod, "Unsable to register retire methods "
- "for %s%d/%s%d: %s\n",
- topo_node_name(parent), topo_node_instance(parent),
- name, i, topo_mod_errmsg(mod));
-
- return (ntn);
-}
-
-static nvlist_t *
-cpu_fmri_create(topo_mod_t *mod, uint32_t cpuid, char *serial, uint8_t cpumask)
-{
- int err;
- nvlist_t *fmri;
-
- if (topo_mod_nvalloc(mod, &fmri, NV_UNIQUE_NAME) != 0)
- return (NULL);
- err = nvlist_add_uint8(fmri, FM_VERSION, FM_CPU_SCHEME_VERSION);
- err |= nvlist_add_string(fmri, FM_FMRI_SCHEME, FM_FMRI_SCHEME_CPU);
- err |= nvlist_add_uint32(fmri, FM_FMRI_CPU_ID, cpuid);
- err |= nvlist_add_uint8(fmri, FM_FMRI_CPU_MASK, cpumask);
- if (serial != NULL)
- err |= nvlist_add_string(fmri, FM_FMRI_CPU_SERIAL_ID, serial);
- if (err != 0) {
- nvlist_free(fmri);
- (void) topo_mod_seterrno(mod, EMOD_FMRI_NVL);
- return (NULL);
- }
-
- return (fmri);
-}
-
-/*ARGSUSED*/
-static int
-cpu_create(topo_mod_t *mod, tnode_t *rnode, const char *name, md_info_t *chip,
- uint64_t serial)
-{
- int i;
- int min = -1;
- int max = -1;
- int err;
- int nerr = 0;
- int pid;
- char sbuf[32];
- tnode_t *cnode;
- nvlist_t *asru;
- md_cpumap_t *mcmp;
-
- topo_mod_dprintf(mod, "enumerating cpus\n");
-
- /*
- * find the min/max id of cpus per this cmp and create a cpu range
- */
- for (i = 0, mcmp = chip->cpus; i < chip->ncpus; i++, mcmp++) {
- if (mcmp->cpumap_serialno != serial)
- continue;
- if ((min < 0) || (mcmp->cpumap_pid < min))
- min = mcmp->cpumap_pid;
- if ((max < 0) || (mcmp->cpumap_pid > max))
- max = mcmp->cpumap_pid;
- }
- if (min < 0 || max < 0) {
- topo_mod_dprintf(mod, "Invalid cpu range(%d,%d)\n", min, max);
- return (-1);
- }
- if (topo_node_range_create(mod, rnode, name, 0, max+1) < 0) {
- topo_mod_dprintf(mod, "failed to create cpu range[0,%d]: %s\n",
- max, topo_mod_errmsg(mod));
- return (-1);
- }
-
- (void) snprintf(sbuf, sizeof (sbuf), "%llx", serial);
-
- /*
- * Create the cpu[i] nodes of a given cmp i
- */
- for (i = 0, mcmp = chip->cpus; i < chip->ncpus; i++, mcmp++) {
-
- if (mcmp->cpumap_serialno == 0 ||
- mcmp->cpumap_serialno != serial) {
- continue;
- }
-
- /* physical cpuid */
- pid = mcmp->cpumap_pid;
- cnode = chip_tnode_create(mod, rnode, name,
- (topo_instance_t)pid, sbuf, NULL, NULL, NULL);
- if (cnode == NULL) {
- topo_mod_dprintf(mod,
- "failed to create a cpu=%d node: %s\n",
- pid, topo_mod_errmsg(mod));
- nerr++;
- continue;
- }
-
- if ((asru = cpu_fmri_create(mod, pid, sbuf, 0)) != NULL) {
- (void) topo_node_asru_set(cnode, asru, 0, &err);
- nvlist_free(asru);
- } else {
- nerr++;
- }
- }
-
- if (nerr != 0)
- (void) topo_mod_seterrno(mod, EMOD_PARTIAL_ENUM);
-
- return (0);
-}
-
-static int
-dimm_instantiate(tnode_t *parent, const char *name, topo_mod_t *mod)
-{
- if (strcmp(name, CHIP) != 0) {
- topo_mod_dprintf(mod,
- "Currently only know how to enumerate %s components.\n",
- CHIP);
- return (0);
- }
- topo_mod_dprintf(mod,
- "Calling dimm_enum\n");
- if (topo_mod_enumerate(mod,
- parent, DIMM, DIMM, 0, 0, NULL) != 0) {
- return (topo_mod_seterrno(mod, EMOD_PARTIAL_ENUM));
- }
- return (0);
-}
-
-static topo_mod_t *
-dimm_enum_load(topo_mod_t *mp)
-{
- topo_mod_t *rp = NULL;
-
- topo_mod_dprintf(mp, "dimm_enum_load: %s\n", CHIP);
- if ((rp = topo_mod_load(mp, DIMM, TOPO_VERSION)) == NULL) {
- topo_mod_dprintf(mp,
- "%s enumerator could not load %s enum. (%d: %s)\n",
- CHIP, DIMM, errno, strerror(errno));
- }
- topo_mod_dprintf(mp, "dimm_enum_load(EXIT): %s, rp=%p\n", CHIP, rp);
- return (rp);
-}
-
-/*ARGSUSED*/
-static int
-chip_create(topo_mod_t *mod, tnode_t *rnode, const char *name,
- topo_instance_t min, topo_instance_t max, md_info_t *chip)
-{
- int nerr = 0;
- int err;
- int i;
- char sbuf[32];
- tnode_t *cnode;
- nvlist_t *fru = NULL;
- char *label = NULL;
- md_proc_t *procp;
-
- topo_mod_dprintf(mod, "enumerating cmp chip\n");
- if (min > max) {
- topo_mod_dprintf(mod, "Invalid chip range(%d,%d)\n", min, max);
- return (-1);
- }
-
- if (dimm_enum_load(mod) == NULL)
- return (-1);
-
- /*
- * Create the chip[i] nodes, one for each CMP chip uniquely identified
- * by the serial number.
- */
- for (i = min; i <= max; i++) {
-
- /* Skip the processors with no serial number */
- if ((procp = cpu_find_proc(chip, i)) == NULL) {
- continue;
- }
- if (procp->serialno == 0) {
- continue;
- }
-
- (void) snprintf(sbuf, sizeof (sbuf), "%llx", procp->serialno);
- topo_mod_dprintf(mod, "node chip[%d], sn=%s\n", i, sbuf);
-
- cnode = chip_tnode_create(mod, rnode, name, (topo_instance_t)i,
- sbuf, fru, label, NULL);
- if (cnode == NULL) {
- topo_mod_dprintf(mod, "failed to create a chip node: "
- "%s\n", topo_mod_errmsg(mod));
- nerr++;
- continue;
- }
-
- /* Enumerate all cpu strands of this CMP chip */
- err = cpu_create(mod, cnode, CPU_NODE_NAME, chip,
- procp->serialno);
- if (err != 0) {
- nerr++;
- }
-
- /* Enumerate all DIMMs belonging to this chip */
- if (dimm_instantiate(cnode, CHIP, mod) < 0) {
- topo_mod_dprintf(mod, "Enumeration of dimm "
- "failed %s\n", topo_mod_errmsg(mod));
- return (-1);
- }
- }
-
- if (nerr != 0)
- (void) topo_mod_seterrno(mod, EMOD_PARTIAL_ENUM);
-
- return (0);
-}
-
-/*ARGSUSED*/
-static int
-chip_enum(topo_mod_t *mod, tnode_t *rnode, const char *name,
- topo_instance_t min, topo_instance_t max, void *arg, void *notused)
-{
- md_info_t *chip = (md_info_t *)arg;
-
- if (strcmp(name, CHIP_NODE_NAME) == 0)
- return (chip_create(mod, rnode, name, min, max, chip));
-
- return (0);
-}
-
-/*ARGSUSED*/
-static void
-chip_release(topo_mod_t *mp, tnode_t *node)
-{
-}
diff --git a/usr/src/lib/fm/topo/modules/sun4v/cpuboard/Makefile b/usr/src/lib/fm/topo/modules/sun4v/cpuboard/Makefile
deleted file mode 100644
index eb26166950..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/cpuboard/Makefile
+++ /dev/null
@@ -1,41 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2007 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-#
-
-MODULE = cpuboard
-ARCH = sun4v
-CLASS = arch
-TOPODIR = ../../../libtopo/common
-
-MODULESRCS = cpuboard.c cpuboard_hostbridge.c
-
-include ../../Makefile.plugin
-
-LDLIBS += -ldevinfo -lmdesc -lldom
-
-CPPFLAGS += -I. -I$(ROOT)/usr/platform/sun4v/include -I$(TOPODIR)
-
diff --git a/usr/src/lib/fm/topo/modules/sun4v/cpuboard/cpuboard.c b/usr/src/lib/fm/topo/modules/sun4v/cpuboard/cpuboard.c
deleted file mode 100644
index ba33e58195..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/cpuboard/cpuboard.c
+++ /dev/null
@@ -1,554 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
- */
-
-#include <stdlib.h>
-#include <string.h>
-#include <strings.h>
-#include <fm/topo_mod.h>
-#include <fm/topo_hc.h>
-#include <libdevinfo.h>
-#include <limits.h>
-#include <sys/fm/protocol.h>
-#include <sys/param.h>
-#include <sys/systeminfo.h>
-#include <assert.h>
-#include <sys/utsname.h>
-#include <sys/systeminfo.h>
-#include <fm/fmd_fmri.h>
-#include <sys/types.h>
-#include <sys/mdesc.h>
-#include <sys/fm/ldom.h>
-
-#include "cpuboard_topo.h"
-
-/*
- * cpuboard.c
- * sun4v specific cpuboard enumerator
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define CPUBOARD_VERSION TOPO_VERSION
-
-/* Until future PRI changes, make connection between cpuboard id and RC */
-char *cpub_rcs[] = { CPUBOARD0_RC, CPUBOARD1_RC, CPUBOARD2_RC, CPUBOARD3_RC };
-
-static int cpuboard_enum(topo_mod_t *, tnode_t *, const char *, topo_instance_t,
- topo_instance_t, void *, void *);
-
-static const topo_modops_t cpuboard_ops =
- { cpuboard_enum, NULL };
-
-const topo_modinfo_t cpuboard_info =
- {CPUBOARD, FM_FMRI_SCHEME_HC, CPUBOARD_VERSION, &cpuboard_ops};
-
-static const topo_pgroup_info_t cpuboard_auth_pgroup =
- { FM_FMRI_AUTHORITY, TOPO_STABILITY_PRIVATE,
- TOPO_STABILITY_PRIVATE, 1 };
-
-static topo_mod_t *cpuboard_mod_hdl = NULL;
-
-static void *
-cpuboard_topo_alloc(size_t size)
-{
- assert(cpuboard_mod_hdl != NULL);
- return (topo_mod_alloc(cpuboard_mod_hdl, size));
-}
-
-static void
-cpuboard_topo_free(void *data, size_t size)
-{
- assert(cpuboard_mod_hdl != NULL);
- topo_mod_free(cpuboard_mod_hdl, data, size);
-}
-
-static int
-cpuboard_get_pri_info(topo_mod_t *mod, cpuboard_contents_t cpubs[])
-{
- char isa[MAXNAMELEN];
- md_t *mdp;
- mde_cookie_t *listp;
- uint64_t *bufp;
- ssize_t bufsize = 0;
- int ncomp, num_nodes, i, len;
- char *pstr = NULL;
- char *sn = NULL, *pn = NULL;
- char *dn = NULL;
- uint32_t type = 0;
- ldom_hdl_t *lhp;
- uint64_t id;
- int cpuboards_found = 0;
-
- lhp = ldom_init(cpuboard_topo_alloc, cpuboard_topo_free);
- if (lhp == NULL) {
- topo_mod_dprintf(mod, "ldom_init failed\n");
- return (0);
- }
-
- (void) sysinfo(SI_MACHINE, isa, MAXNAMELEN);
- if (strcmp(isa, "sun4v") != 0) {
- topo_mod_dprintf(mod, "not sun4v architecture%s\n", isa);
- ldom_fini(lhp);
- return (0);
- }
-
- (void) ldom_get_type(lhp, &type);
- if ((type & LDOM_TYPE_CONTROL) != 0) {
- bufsize = ldom_get_core_md(lhp, &bufp);
- } else {
- bufsize = ldom_get_local_md(lhp, &bufp);
- }
- if (bufsize < 1) {
- topo_mod_dprintf(mod, "Failed to get pri/md, bufsize=%d\n",
- bufsize);
- ldom_fini(lhp);
- return (0);
- }
- topo_mod_dprintf(mod, "pri/md bufsize=%d\n", bufsize);
-
- if ((mdp = md_init_intern(bufp, cpuboard_topo_alloc,
- cpuboard_topo_free)) == NULL ||
- (num_nodes = md_node_count(mdp)) < 1) {
- topo_mod_dprintf(mod, "md_init_intern error\n");
- cpuboard_topo_free(bufp, (size_t)bufsize);
- ldom_fini(lhp);
- return (0);
- }
- topo_mod_dprintf(mod, "num_nodes=%d\n", num_nodes);
-
- if ((listp = (mde_cookie_t *)cpuboard_topo_alloc(
- sizeof (mde_cookie_t) * num_nodes)) == NULL) {
- topo_mod_dprintf(mod, "alloc listp error\n");
- cpuboard_topo_free(bufp, (size_t)bufsize);
- (void) md_fini(mdp);
- ldom_fini(lhp);
- return (0);
- }
- ncomp = md_scan_dag(mdp, MDE_INVAL_ELEM_COOKIE,
- md_find_name(mdp, "component"),
- md_find_name(mdp, "fwd"), listp);
- topo_mod_dprintf(mod, "ncomp=%d\n", ncomp);
- if (ncomp <= 0) {
- cpuboard_topo_free(listp, sizeof (mde_cookie_t) * num_nodes);
- cpuboard_topo_free(bufp, (size_t)bufsize);
- (void) md_fini(mdp);
- ldom_fini(lhp);
- return (0);
- }
- for (i = 0; i < ncomp; i++) {
- /*
- * PRI nodes are still named "cpu-board", but the canonical
- * names are "cpuboard".
- */
- if (md_get_prop_str(mdp, listp[i], "type", &pstr) == 0 &&
- pstr != NULL && strcmp(pstr, "cpu-board") == 0) {
- if (md_get_prop_val(mdp, listp[i], "id", &id) < 0) {
- topo_mod_dprintf(mod, "cpuboard_get_pri_info: "
- "id md_get_prop_val() failed. (%d: %s)\n",
- errno, strerror(errno));
- continue;
- }
- if ((id >= CPUBOARD_MAX) || cpubs[id].present) {
- (void) topo_mod_seterrno(mod, EMOD_NVL_INVAL);
- topo_mod_dprintf(mod, "cpuboard_get_pri_info: "
- "id %llx out of range. (%d: %s)\n",
- id, errno, strerror(errno));
- continue;
- }
- cpubs[id].present = 1;
- cpuboards_found++;
-
- topo_mod_dprintf(mod, "got cpu-board: %llx\n", id);
-
- sn = pn = dn = NULL;
-
- (void) md_get_prop_str(mdp, listp[i],
- "serial_number", &sn);
- cpubs[id].sn = topo_mod_strdup(mod, sn);
-
- (void) md_get_prop_str(mdp, listp[i],
- "part_number", &pn);
-
- (void) md_get_prop_str(mdp, listp[i],
- "dash_number", &dn);
- len = (pn ? strlen(pn) : 0) + (dn ? strlen(dn) : 0) + 1;
- pstr = cpuboard_topo_alloc(len);
- (void) snprintf(pstr, len, "%s%s",
- pn ? pn : "", dn ? dn : "");
- cpubs[id].pn = topo_mod_strdup(mod, pstr);
- cpuboard_topo_free(pstr, len);
- }
- }
- cpuboard_topo_free(listp, sizeof (mde_cookie_t) * num_nodes);
- cpuboard_topo_free(bufp, (size_t)bufsize);
- (void) md_fini(mdp);
- ldom_fini(lhp);
-
- return (cpuboards_found);
-}
-
-/*ARGSUSED*/
-void
-_topo_init(topo_mod_t *mod, topo_version_t version)
-{
- /*
- * Turn on module debugging output
- */
- if (getenv("TOPOCPUBOARDDBG") != NULL) {
- topo_mod_setdebug(mod);
- }
- topo_mod_dprintf(mod, "initializing cpuboard enumerator\n");
-
- if (topo_mod_register(mod, &cpuboard_info, TOPO_VERSION) < 0) {
- topo_mod_dprintf(mod, "cpuboard registration failed: %s\n",
- topo_mod_errmsg(mod));
- return; /* mod errno already set */
- }
- topo_mod_dprintf(mod, "cpuboard enumr initd\n");
-}
-
-void
-_topo_fini(topo_mod_t *mod)
-{
- topo_mod_unregister(mod);
-}
-
-static tnode_t *
-cpuboard_tnode_create(topo_mod_t *mod, tnode_t *parent,
- const char *name, topo_instance_t i, void *priv, cpuboard_contents_t *cpubc)
-{
- int err;
- nvlist_t *fmri;
- tnode_t *ntn;
- nvlist_t *auth = topo_mod_auth(mod, parent);
-
- fmri = topo_mod_hcfmri(mod, parent, FM_HC_SCHEME_VERSION, name, i,
- NULL, auth, cpubc->pn, NULL, cpubc->sn);
- nvlist_free(auth);
-
- if (fmri == NULL) {
- topo_mod_dprintf(mod,
- "Unable to make nvlist for %s bind: %s.\n",
- name, topo_mod_errmsg(mod));
- return (NULL);
- }
-
- ntn = topo_node_bind(mod, parent, name, i, fmri);
- if (ntn == NULL) {
- topo_mod_dprintf(mod,
- "topo_node_bind (%s%d/%s%d) failed: %s\n",
- topo_node_name(parent), topo_node_instance(parent),
- name, i,
- topo_strerror(topo_mod_errno(mod)));
- nvlist_free(fmri);
- return (NULL);
- }
- topo_mod_dprintf(mod,
- "cpuboard_tnode_create: topo_node_bind (%s%d/%s%d) created!\n",
- topo_node_name(parent), topo_node_instance(parent), name, i);
- nvlist_free(fmri);
- topo_node_setspecific(ntn, priv);
-
- if (topo_pgroup_create(ntn, &cpuboard_auth_pgroup, &err) == 0) {
- (void) topo_prop_inherit(ntn, FM_FMRI_AUTHORITY,
- FM_FMRI_AUTH_PRODUCT, &err);
- (void) topo_prop_inherit(ntn, FM_FMRI_AUTHORITY,
- FM_FMRI_AUTH_PRODUCT_SN, &err);
- (void) topo_prop_inherit(ntn, FM_FMRI_AUTHORITY,
- FM_FMRI_AUTH_CHASSIS, &err);
- (void) topo_prop_inherit(ntn, FM_FMRI_AUTHORITY,
- FM_FMRI_AUTH_SERVER, &err);
- }
-
- return (ntn);
-}
-
-static int
-cpuboard_fru_set(topo_mod_t *mp, tnode_t *tn)
-{
- nvlist_t *fmri;
- int err, e;
-
- if (topo_node_resource(tn, &fmri, &err) < 0 ||
- fmri == NULL) {
- topo_mod_dprintf(mp, "FRU_fmri_set error: %s\n",
- topo_strerror(topo_mod_errno(mp)));
- return (topo_mod_seterrno(mp, err));
- }
- e = topo_node_fru_set(tn, fmri, 0, &err);
- nvlist_free(fmri);
- if (e < 0)
- return (topo_mod_seterrno(mp, err));
- return (0);
-}
-
-static int
-cpuboard_label_set(topo_mod_t *mod, tnode_t *parent, tnode_t *node,
- topo_instance_t n)
-{
- char *label = NULL;
- char *plabel = NULL;
- const char *cpuboard_label = "/CPU";
- int err, len;
-
- if (topo_node_label(parent, &plabel, &err) != 0 ||
- plabel == NULL) {
- return (-1);
- }
-
- len = strlen(plabel) + strlen(cpuboard_label) + 2;
- label = topo_mod_alloc(mod, len);
- (void) snprintf(label, len, "%s%s%d", plabel, cpuboard_label, n);
- topo_mod_strfree(mod, plabel);
-
- if (label != NULL) {
- if (topo_prop_set_string(node, TOPO_PGROUP_PROTOCOL,
- TOPO_PROP_LABEL, TOPO_PROP_IMMUTABLE, label,
- &err) != 0) {
- topo_mod_strfree(mod, label);
- return (topo_mod_seterrno(mod, err));
- }
- }
- topo_mod_free(mod, label, len);
- return (0);
-}
-
-
-/*ARGSUSED*/
-static tnode_t *
-cpuboard_declare(tnode_t *parent, const char *name, topo_instance_t i,
- void *priv, topo_mod_t *mod, cpuboard_contents_t *cpubc)
-{
- tnode_t *ntn;
- nvlist_t *fmri = NULL;
- int err;
-
- if ((ntn = cpuboard_tnode_create(mod, parent, name, i, priv,
- cpubc)) == NULL) {
- topo_mod_dprintf(mod, "%s ntn = NULL\n", name);
- return (NULL);
- }
-
- (void) cpuboard_fru_set(mod, ntn);
-
- (void) cpuboard_label_set(mod, parent, ntn, i);
-
- /* set ASRU to resource fmri */
- if (topo_prop_get_fmri(ntn, TOPO_PGROUP_PROTOCOL,
- TOPO_PROP_RESOURCE, &fmri, &err) == 0)
- (void) topo_node_asru_set(ntn, fmri, 0, &err);
- nvlist_free(fmri);
-
- return (ntn);
-}
-
-static int
-chip_instantiate(tnode_t *parent, const char *name, topo_mod_t *mod,
- topo_instance_t inst)
-{
- if (strcmp(name, CPUBOARD) != 0) {
- topo_mod_dprintf(mod,
- "Currently only know how to enumerate %s components.\n",
- CPUBOARD);
- return (0);
- }
- topo_mod_dprintf(mod,
- "Calling chip_enum for inst: %lx\n", inst);
- if (topo_mod_enumerate(mod,
- parent, CHIP, CHIP, inst, inst, NULL) != 0) {
- return (topo_mod_seterrno(mod, EMOD_PARTIAL_ENUM));
- }
- return (0);
-}
-
-static topo_mod_t *
-chip_enum_load(topo_mod_t *mp)
-{
- topo_mod_t *rp = NULL;
-
- topo_mod_dprintf(mp, "chip_enum_load: %s\n", CPUBOARD);
- if ((rp = topo_mod_load(mp, CHIP, TOPO_VERSION)) == NULL) {
- topo_mod_dprintf(mp,
- "%s enumerator could not load %s enum. (%d: %s)\n",
- CPUBOARD, CHIP, errno, strerror(errno));
- }
- topo_mod_dprintf(mp, "chip_enum_load(EXIT): %s, rp=%p\n", CPUBOARD, rp);
- return (rp);
-}
-
-static di_node_t
-cpuboard_findrc(topo_mod_t *mod, uint64_t id)
-{
- di_node_t devtree;
- di_node_t dnode;
-
- if ((devtree = topo_mod_devinfo(mod)) == DI_NODE_NIL) {
- topo_mod_dprintf(mod, "devinfo init failed.");
- return (NULL);
- }
- dnode = di_drv_first_node(CPUBOARD_PX_DRV, devtree);
- while (dnode != DI_NODE_NIL) {
- char *path;
-
- if ((path = di_devfs_path(dnode)) == NULL) {
- topo_mod_dprintf(mod, "cpuboard_findrc: "
- "NULL di_devfs_path.\n");
- (void) topo_mod_seterrno(mod, ETOPO_PROP_NOENT);
- return (NULL);
- }
- topo_mod_dprintf(mod, "cpuboard_findrc: "
- "got px %d, node named: %s, path: %s\n",
- di_instance(dnode), di_node_name(dnode), path);
-
- if (strcmp(cpub_rcs[id], path) == 0) {
- di_devfs_path_free(path);
- return (dnode);
- }
-
- di_devfs_path_free(path);
-
- dnode = di_drv_next_node(dnode);
- }
- return (NULL);
-}
-
-static void
-cpuboard_free_pri_info(topo_mod_t *mod, cpuboard_contents_t cpuboard_list[],
- topo_instance_t min, topo_instance_t max)
-{
- int i;
-
- for (i = min; i <= max; i++) {
- if (cpuboard_list[i].present == 0)
- continue;
- if (cpuboard_list[i].sn != NULL)
- topo_mod_strfree(mod, cpuboard_list[i].sn);
- if (cpuboard_list[i].pn != NULL)
- topo_mod_strfree(mod, cpuboard_list[i].pn);
- }
-}
-
-/*ARGSUSED*/
-static int
-cpuboard_enum(topo_mod_t *mod, tnode_t *parent, const char *name,
- topo_instance_t min, topo_instance_t max, void *arg, void *notused)
-{
- tnode_t *cpuboardn;
- topo_instance_t i = 0;
- cpuboard_contents_t cpuboard_list[CPUBOARD_MAX];
-
- if (strcmp(name, CPUBOARD) != 0) {
- topo_mod_dprintf(mod,
- "Currently only know how to enumerate %s components.\n",
- CPUBOARD);
- return (-1);
- }
- /* Make sure we don't exceed CPUBOARD_MAX */
- if (max >= CPUBOARD_MAX) {
- max = CPUBOARD_MAX;
- }
-
- bzero(cpuboard_list, sizeof (cpuboard_list));
-
- /* Scan PRI for cpu-boards. */
- cpuboard_mod_hdl = mod;
- if (cpuboard_get_pri_info(mod, cpuboard_list) == 0) {
- int cpuboards_found = 0;
- /*
- * if no PRI available (i.e. not in Control Domain),
- * use px driver to determine cpuboard presence.
- * NOTE: with this approach there will be no
- * identity information - no SN nor PN.
- */
- bzero(cpuboard_list, sizeof (cpuboard_list));
- for (i = min; i <= max; i++) {
- if (cpuboard_findrc(mod, i) != NULL) {
- cpuboard_list[i].present = 1;
- cpuboards_found++;
- }
- }
- if (cpuboards_found == 0) {
- topo_mod_dprintf(mod, "No cpuboards found.\n");
- return (-1);
- }
- }
-
- if (chip_enum_load(mod) == NULL) {
- cpuboard_free_pri_info(mod, cpuboard_list, min, max);
- return (-1);
- }
-
- for (i = min; i <= max; i++) {
- if (cpuboard_list[i].present == 0)
- continue;
-
- cpuboardn = cpuboard_declare(parent, name, i,
- NULL, mod, &cpuboard_list[i]);
- if (cpuboardn == NULL) {
- topo_mod_dprintf(mod,
- "Enumeration of cpuboard failed: %s\n",
- topo_strerror(topo_mod_errno(mod)));
- cpuboard_free_pri_info(mod, cpuboard_list, min, max);
- return (-1); /* mod_errno already set */
- }
- if (topo_node_range_create(mod, cpuboardn, CHIP, 0,
- CHIP_MAX) < 0) {
- topo_node_unbind(cpuboardn);
- topo_mod_dprintf(mod, "topo_node_range_create CHIP "
- "failed: %s\n", topo_strerror(topo_mod_errno(mod)));
- cpuboard_free_pri_info(mod, cpuboard_list, min, max);
- return (-1); /* mod_errno already set */
- }
- if (chip_instantiate(cpuboardn, CPUBOARD, mod, i) < 0) {
- topo_mod_dprintf(mod, "Enumeration of chip "
- "failed %s\n",
- topo_strerror(topo_mod_errno(mod)));
- cpuboard_free_pri_info(mod, cpuboard_list, min, max);
- return (-1);
- }
- if (topo_node_range_create(mod, cpuboardn, HOSTBRIDGE, 0,
- HOSTBRIDGE_MAX) < 0) {
- topo_node_unbind(cpuboardn);
- topo_mod_dprintf(mod, "topo_node_range_create: "
- "HOSTBRIDGE failed: %s\n",
- topo_strerror(topo_mod_errno(mod)));
- cpuboard_free_pri_info(mod, cpuboard_list, min, max);
- return (-1);
- }
- if (cpuboard_hb_enum(mod, cpuboard_findrc(mod, i), cpub_rcs[i],
- cpuboardn, i) < 0) {
- topo_node_unbind(cpuboardn);
- topo_mod_dprintf(mod, "cpuboard_hb_enum: "
- "failed: %s\n",
- topo_strerror(topo_mod_errno(mod)));
- cpuboard_free_pri_info(mod, cpuboard_list, min, max);
- return (-1);
- }
- }
- cpuboard_free_pri_info(mod, cpuboard_list, min, max);
- return (0);
-}
diff --git a/usr/src/lib/fm/topo/modules/sun4v/cpuboard/cpuboard_hostbridge.c b/usr/src/lib/fm/topo/modules/sun4v/cpuboard/cpuboard_hostbridge.c
deleted file mode 100644
index 15e685c1d4..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/cpuboard/cpuboard_hostbridge.c
+++ /dev/null
@@ -1,300 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2010 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#include <string.h>
-#include <strings.h>
-#include <libdevinfo.h>
-#include <fm/topo_mod.h>
-#include <fm/topo_hc.h>
-#include <sys/fm/protocol.h>
-#include "cpuboard_topo.h"
-
-static const topo_pgroup_info_t io_pgroup =
- { TOPO_PGROUP_IO, TOPO_STABILITY_PRIVATE, TOPO_STABILITY_PRIVATE, 1 };
-static const topo_pgroup_info_t pci_pgroup =
- { TOPO_PGROUP_PCI, TOPO_STABILITY_PRIVATE, TOPO_STABILITY_PRIVATE, 1 };
-
-static tnode_t *
-cpuboard_node_create(topo_mod_t *mp, tnode_t *parent, const char *name,
- int inst, void *priv)
-{
- tnode_t *node;
- nvlist_t *fmri;
- nvlist_t *auth = topo_mod_auth(mp, parent);
-
- topo_mod_dprintf(mp, "cpuboard_node_create:\n");
-
- if (parent == NULL || inst < 0) {
- return (NULL);
- }
-
- /* Create FMRI */
- if ((fmri = topo_mod_hcfmri(mp, parent, FM_HC_SCHEME_VERSION, name,
- inst, NULL, auth, NULL, NULL, NULL)) == NULL) {
- topo_mod_dprintf(mp, "create of tnode for %s failed: %s",
- name, topo_strerror(topo_mod_errno(mp)));
- nvlist_free(auth);
- return (NULL);
- }
- nvlist_free(auth);
-
- /* Create and bind node */
- node = topo_node_bind(mp, parent, name, inst, fmri);
- if (node == NULL) {
- nvlist_free(fmri);
- topo_mod_dprintf(mp, "unable to bind root complex: %s\n",
- topo_strerror(topo_mod_errno(mp)));
- return (NULL); /* mod_errno already set */
- }
-
- nvlist_free(fmri);
- topo_node_setspecific(node, priv);
-
- return (node);
-}
-
-/*
- * cpuboard_rc_node_create()
- * Description:
- * Create a root complex node pciexrc
- * Parameters:
- * mp: topo module pointer
- * parent: topo parent node of the newly created pciexrc node
- * dnode: Solaris device node of the root complex
- * rcpath: Used to populated the dev property of the topo pciexrc node if
- * the local host does not own the root complex.
- */
-static tnode_t *
-cpuboard_rc_node_create(topo_mod_t *mp, tnode_t *parent, di_node_t dnode,
- char *rcpath, int inst)
-{
- int err;
- tnode_t *rcn;
- char *dnpath;
- nvlist_t *mod;
-
- topo_mod_dprintf(mp, "cpuboard_rc_node_create:\n");
-
- rcn = cpuboard_node_create(mp, parent, PCIEX_ROOT, inst, (void *)dnode);
- if (rcn == NULL) {
- return (NULL);
- }
-
- /* Inherit parent FRU's label */
- (void) topo_node_fru_set(rcn, NULL, 0, &err);
- (void) topo_node_label_set(rcn, NULL, &err);
-
- /*
- * Set ASRU to be the dev-scheme ASRU
- */
- if ((dnpath = di_devfs_path(dnode)) != NULL) {
- nvlist_t *fmri;
-
- /*
- * The local host owns the root complex, so use the dev path
- * from the di_devfs_path(), instead of the passed in rcpath,
- * to populate the dev property.
- */
- rcpath = dnpath;
- fmri = topo_mod_devfmri(mp, FM_DEV_SCHEME_VERSION,
- dnpath, NULL);
- if (fmri == NULL) {
- topo_mod_dprintf(mp,
- "dev:///%s fmri creation failed.\n",
- dnpath);
- (void) topo_mod_seterrno(mp, err);
- di_devfs_path_free(dnpath);
- return (NULL);
- }
- if (topo_node_asru_set(rcn, fmri, 0, &err) < 0) {
- topo_mod_dprintf(mp, "topo_node_asru_set failed\n");
- (void) topo_mod_seterrno(mp, err);
- nvlist_free(fmri);
- di_devfs_path_free(dnpath);
- return (NULL);
- }
- nvlist_free(fmri);
- } else {
- topo_mod_dprintf(mp, "NULL di_devfs_path.\n");
- }
-
- /*
- * Set pciexrc properties for root complex nodes
- */
-
- /* Add the io and pci property groups */
- if (topo_pgroup_create(rcn, &io_pgroup, &err) < 0) {
- topo_mod_dprintf(mp, "topo_pgroup_create failed\n");
- di_devfs_path_free(dnpath);
- (void) topo_mod_seterrno(mp, err);
- return (NULL);
- }
- if (topo_pgroup_create(rcn, &pci_pgroup, &err) < 0) {
- topo_mod_dprintf(mp, "topo_pgroup_create failed\n");
- di_devfs_path_free(dnpath);
- (void) topo_mod_seterrno(mp, err);
- return (NULL);
- }
- /* Add the devfs path property */
- if (rcpath) {
- if (topo_prop_set_string(rcn, TOPO_PGROUP_IO, TOPO_IO_DEV,
- TOPO_PROP_IMMUTABLE, rcpath, &err) != 0) {
- topo_mod_dprintf(mp, "Failed to set DEV property\n");
- (void) topo_mod_seterrno(mp, err);
- }
- }
- if (dnpath) {
- di_devfs_path_free(dnpath);
- }
- /* T5440 device type is always "pciex" */
- if (topo_prop_set_string(rcn, TOPO_PGROUP_IO, TOPO_IO_DEVTYPE,
- TOPO_PROP_IMMUTABLE, CPUBOARD_PX_DEVTYPE, &err) != 0) {
- topo_mod_dprintf(mp, "Failed to set DEVTYPE property\n");
- }
- /* T5440 driver is always "px" */
- if (topo_prop_set_string(rcn, TOPO_PGROUP_IO, TOPO_IO_DRIVER,
- TOPO_PROP_IMMUTABLE, CPUBOARD_PX_DRV, &err) != 0) {
- topo_mod_dprintf(mp, "Failed to set DRIVER property\n");
- }
- if ((mod = topo_mod_modfmri(mp, FM_MOD_SCHEME_VERSION, CPUBOARD_PX_DRV))
- == NULL || topo_prop_set_fmri(rcn, TOPO_PGROUP_IO,
- TOPO_IO_MODULE, TOPO_PROP_IMMUTABLE, mod, &err) != 0) {
- topo_mod_dprintf(mp, "Failed to set MODULE property\n");
- }
- nvlist_free(mod);
-
- /* This is a PCIEX Root Complex */
- if (topo_prop_set_string(rcn, TOPO_PGROUP_PCI, TOPO_PCI_EXCAP,
- TOPO_PROP_IMMUTABLE, PCIEX_ROOT, &err) != 0) {
- topo_mod_dprintf(mp, "Failed to set EXCAP property\n");
- }
- /* BDF of T5440 root complex is constant */
- if (topo_prop_set_string(rcn, TOPO_PGROUP_PCI,
- TOPO_PCI_BDF, TOPO_PROP_IMMUTABLE, CPUBOARD_PX_BDF, &err) != 0) {
- topo_mod_dprintf(mp, "Failed to set EXCAP property\n");
- }
-
- /* Make room for children */
- (void) topo_node_range_create(mp, rcn, PCIEX_BUS, 0, CPUBOARD_MAX);
- return (rcn);
-}
-
-/*
- * Create a hostbridge node.
- */
-static tnode_t *
-cpuboard_hb_node_create(topo_mod_t *mp, tnode_t *parent, int inst)
-{
- int err;
- tnode_t *hbn;
-
- topo_mod_dprintf(mp, "cpuboard_hb_node_create: parent=%p, inst=%d\n",
- parent, inst);
-
- hbn = cpuboard_node_create(mp, parent, HOSTBRIDGE, inst, NULL);
- if (hbn == NULL) {
- topo_mod_dprintf(mp, "cpuboard_hb_node_create: "
- "cpuboard_node_create() failed.\n");
- return (NULL);
- }
-
- /* Inherit parent FRU's label */
- (void) topo_node_fru_set(hbn, NULL, 0, &err);
- (void) topo_node_label_set(hbn, NULL, &err);
-
- /* Make room for children */
- (void) topo_node_range_create(mp, hbn, PCIEX_ROOT, 0, CPUBOARD_MAX);
-
- topo_mod_dprintf(mp, "cpuboard_hb_node_create: EXIT hbn=%p\n", hbn);
-
- return (hbn);
-}
-
-/*
- * Enumerate hostbridge on the cpuboard. Hostbridge and root complex instances
- * match the cpuboard instance.
- */
-int
-cpuboard_hb_enum(topo_mod_t *mp, di_node_t dnode, char *rcpath,
- tnode_t *cpubn, int brd)
-{
- int hb;
- int rc;
- tnode_t *hbnode;
- tnode_t *rcnode;
- topo_mod_t *pcimod;
-
- topo_mod_dprintf(mp, "cpuboard_hb_enum: brd: %d, cpubn=%p\n",
- brd, cpubn);
-
- /* Load the pcibus module. We'll need it later. */
- pcimod = topo_mod_load(mp, PCI_BUS, PCI_BUS_VERS);
- if (pcimod == NULL) {
- topo_mod_dprintf(mp, "can't load pcibus module: %s\n",
- topo_strerror(topo_mod_errno(mp)));
- return (-1);
- }
- hb = rc = brd;
-
- /* The root complex exists! */
- topo_mod_dprintf(mp, "declaring "
- "/motherboard=0/cpuboard=%d/hostbridge=%d/"
- "pciexrc=%d\n", brd, hb, rc);
-
- /* Create the hostbridge node */
- hbnode = cpuboard_hb_node_create(mp, cpubn, hb);
- if (hbnode == NULL) {
- topo_mod_dprintf(mp,
- "unable to create hbnode: %s\n",
- topo_strerror(topo_mod_errno(mp)));
- topo_mod_unload(pcimod);
- return (-1);
- }
- /* Create the root complex node */
- rcnode = cpuboard_rc_node_create(mp, hbnode, dnode, rcpath, rc);
- if (rcnode == NULL) {
- topo_mod_dprintf(mp,
- "unable to create rcnode: %s\n",
- topo_strerror(topo_mod_errno(mp)));
- topo_mod_unload(pcimod);
- return (-1);
- }
- /*
- * If dnode not NULL, enumerate pcibus nodes under the root complex.
- * If dnode NULL, skip enumeration. Condition could occur if the RC
- * is assigned to non-control domain.
- */
- if ((dnode != NULL) && topo_mod_enumerate(pcimod, rcnode,
- PCI_BUS, PCIEX_BUS, 0, 255, NULL) != 0) {
- topo_mod_dprintf(mp,
- "error enumerating pcibus: %s\n",
- topo_strerror(topo_mod_errno(mp)));
- topo_mod_unload(pcimod);
- return (-1);
- }
- topo_mod_unload(pcimod);
- return (0);
-}
diff --git a/usr/src/lib/fm/topo/modules/sun4v/cpuboard/cpuboard_topo.h b/usr/src/lib/fm/topo/modules/sun4v/cpuboard/cpuboard_topo.h
deleted file mode 100644
index 7d12291f03..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/cpuboard/cpuboard_topo.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _CPUBOARD_TOPO_H
-#define _CPUBOARD_TOPO_H
-
-#include <fm/topo_hc.h>
-#include <fm/topo_mod.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define PCI_BUS_VERS 1
-
-#define CPUBOARD_PX_DEVTYPE "pciex" /* T5440 is PCI-Ex devtype */
-#define CPUBOARD_PX_DRV "px"
-
-#define CPUBOARD_MAX 4 /* Max 4 cpuboards */
-#define CHIP_MAX CPUBOARD_MAX /* Max 4 chips */
-#define HOSTBRIDGE_MAX CPUBOARD_MAX /* Max 4 hostbridges */
-
-#define CPUBOARD_PX_BDF "0x200" /* BDF is always 2/0/0 */
-
-/* cpuboard info */
-typedef struct {
- int present; /* cpuboard present */
- char *sn; /* cpuboard serial # */
- char *pn; /* cpuboard part # + dash # */
-} cpuboard_contents_t;
-
-/* Shared device tree root node */
-int cpuboard_hb_enum(topo_mod_t *mp, di_node_t dnode, char *rcpath,
- tnode_t *cpubn, int brd);
-
-/* Until future PRI changes, make connection between cpuboard id and RC */
-#define CPUBOARD0_RC "/pci@400"
-#define CPUBOARD1_RC "/pci@500"
-#define CPUBOARD2_RC "/pci@600"
-#define CPUBOARD3_RC "/pci@700"
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _CPUBOARD_TOPO_H */
diff --git a/usr/src/lib/fm/topo/modules/sun4v/dimm/Makefile b/usr/src/lib/fm/topo/modules/sun4v/dimm/Makefile
deleted file mode 100644
index 20c0db5cbe..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/dimm/Makefile
+++ /dev/null
@@ -1,61 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-ARCH = sun4v
-PRIDIR=../platform-mem
-PIDIR=../sun4vpi
-
-sun4v_SRCS = dimm_sun4v.c mem_mdesc.c pi_meth.c
-
-INCDIRS = $(ROOT)/usr/platform/sun4v/include \
- $(PRIDIR)
-
-# include ../../sun4/chip/Makefile.chip
-
-MODULE = dimm
-CLASS = arch
-SUN4DIR = ../../sun4/$(MODULE)
-MODULESRCS = $($(ARCH)_SRCS)
-
-include ../../Makefile.plugin
-
-INCDIRS += $(SUN4DIR)
-
-CPPFLAGS += $(INCDIRS:%=-I%)
-
-%.o: $(SUN4DIR)/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
-# end of what would be body of ../../sun4/mem/Makefile.mem
-LDLIBS += -lumem -lmdesc -lldom
-
-%.o: $(PRIDIR)/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
-%.o: $(PIDIR)/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
diff --git a/usr/src/lib/fm/topo/modules/sun4v/dimm/dimm_sun4v.c b/usr/src/lib/fm/topo/modules/sun4v/dimm/dimm_sun4v.c
deleted file mode 100644
index cdc212e780..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/dimm/dimm_sun4v.c
+++ /dev/null
@@ -1,421 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <strings.h>
-#include <sys/types.h>
-#include <fm/topo_mod.h>
-#include <sys/fm/protocol.h>
-
-#include <unistd.h>
-#include <sys/param.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <umem.h>
-
-#include <mem_mdesc.h>
-
-/*
- * Enumerates the DIMMS in a system. For each DIMM found, the necessary nodes
- * are also constructed.
- */
-
-#define DIMM_VERSION TOPO_VERSION
-#define DIMM_NODE_NAME "dimm"
-
-extern topo_method_t pi_mem_methods[];
-
-/* Forward declaration */
-static int dimm_enum(topo_mod_t *, tnode_t *, const char *, topo_instance_t,
- topo_instance_t, void *, void *);
-static void dimm_release(topo_mod_t *, tnode_t *);
-
-static const topo_modops_t dimm_ops =
- { dimm_enum, dimm_release };
-static const topo_modinfo_t dimm_info =
- { "dimm", FM_FMRI_SCHEME_HC, DIMM_VERSION, &dimm_ops };
-
-static const topo_pgroup_info_t mem_auth_pgroup = {
- FM_FMRI_AUTHORITY,
- TOPO_STABILITY_PRIVATE,
- TOPO_STABILITY_PRIVATE,
- 1
-};
-
-int
-_topo_init(topo_mod_t *mod)
-{
- md_mem_info_t *mem;
-
- if (getenv("TOPOMEMDBG"))
- topo_mod_setdebug(mod);
- topo_mod_dprintf(mod, "initializing mem enumerator\n");
-
- if ((mem = topo_mod_zalloc(mod, sizeof (md_mem_info_t))) == NULL)
- return (-1);
-
- if (mem_mdesc_init(mod, mem) != 0) {
- topo_mod_dprintf(mod, "failed to get dimms from the PRI/MD\n");
- topo_mod_free(mod, mem, sizeof (md_mem_info_t));
- return (-1);
- }
-
- topo_mod_setspecific(mod, (void *)mem);
-
- if (topo_mod_register(mod, &dimm_info, TOPO_VERSION) != 0) {
- topo_mod_dprintf(mod, "failed to register hc: "
- "%s\n", topo_mod_errmsg(mod));
- mem_mdesc_fini(mod, mem);
- topo_mod_free(mod, mem, sizeof (md_mem_info_t));
- return (-1);
- }
-
- topo_mod_dprintf(mod, "mem enumerator inited\n");
-
- return (0);
-}
-
-void
-_topo_fini(topo_mod_t *mod)
-{
- md_mem_info_t *mem;
-
- mem = (md_mem_info_t *)topo_mod_getspecific(mod);
-
- mem_mdesc_fini(mod, mem);
-
- topo_mod_free(mod, mem, sizeof (md_mem_info_t));
-
- topo_mod_unregister(mod);
-}
-
-static tnode_t *
-mem_tnode_create(topo_mod_t *mod, tnode_t *parent,
- const char *name, topo_instance_t i, char *serial,
- nvlist_t *fru, char *label, void *priv)
-{
- int err;
- nvlist_t *fmri;
- tnode_t *ntn;
- nvlist_t *auth = topo_mod_auth(mod, parent);
-
- fmri = topo_mod_hcfmri(mod, parent, FM_HC_SCHEME_VERSION, name, i,
- NULL, auth, NULL, NULL, serial);
- nvlist_free(auth);
- if (fmri == NULL) {
- topo_mod_dprintf(mod,
- "Unable to make nvlist for %s bind: %s.\n",
- name, topo_mod_errmsg(mod));
- return (NULL);
- }
-
- ntn = topo_node_bind(mod, parent, name, i, fmri);
- if (ntn == NULL) {
- topo_mod_dprintf(mod,
- "topo_node_bind (%s%d/%s%d) failed: %s\n",
- topo_node_name(parent), topo_node_instance(parent),
- name, i,
- topo_strerror(topo_mod_errno(mod)));
- nvlist_free(fmri);
- return (NULL);
- }
- nvlist_free(fmri);
- topo_node_setspecific(ntn, priv);
-
- if (topo_pgroup_create(ntn, &mem_auth_pgroup, &err) == 0) {
- (void) topo_prop_inherit(ntn, FM_FMRI_AUTHORITY,
- FM_FMRI_AUTH_PRODUCT, &err);
- (void) topo_prop_inherit(ntn, FM_FMRI_AUTHORITY,
- FM_FMRI_AUTH_PRODUCT_SN, &err);
- (void) topo_prop_inherit(ntn, FM_FMRI_AUTHORITY,
- FM_FMRI_AUTH_CHASSIS, &err);
- (void) topo_prop_inherit(ntn, FM_FMRI_AUTHORITY,
- FM_FMRI_AUTH_SERVER, &err);
- }
-
- (void) topo_node_label_set(ntn, label, &err);
- (void) topo_node_fru_set(ntn, fru, 0, &err);
-
- return (ntn);
-}
-
-typedef struct {
- const char *nh_name;
- const char *nh_sscan;
-} nac_hc_t;
-
-static const nac_hc_t nac_mem_tbl[] = {
- {"branch", "BR%d" },
- {"dram-channel", "CH%d" },
- {"rank", "R%d" },
- {"dimm", "D%d" },
- {"memboard", "MR%d" },
- {"memboard", "MEM%d" },
- {"chip", "CMP%d" }
-};
-
-static const char *
-nac2hc(const char *s, int *inst)
-{
- int i;
-
- if (s == NULL)
- return (NULL);
-
- for (i = 0; i < sizeof (nac_mem_tbl) / sizeof (nac_hc_t); i++) {
- if (sscanf(s, nac_mem_tbl[i].nh_sscan, inst) == 1)
- return (nac_mem_tbl[i].nh_name);
- }
- return (NULL);
-}
-
-static int
-create_one_dimm(topo_mod_t *mod, tnode_t *pnode, int inst, mem_dimm_map_t *dp)
-{
- tnode_t *cnode;
- nvlist_t *rsrc, *fru;
- int nerr = 0, err;
- nvlist_t *auth = NULL;
-
- /*
- * Because mem_tnode_create will fill in a "FRU" value by default,
- * but not an "ASRU" value, we have to compute the desired "FRU"
- * value -before- calling mem_tnode_create, but it's ok to
- * topo_mod_asru_set() the ASRU value after the topo_node is
- * created.
- */
-
- auth = topo_mod_auth(mod, pnode);
- if ((fru = topo_mod_hcfmri(mod, pnode, FM_HC_SCHEME_VERSION, "dimm",
- inst, NULL, auth, dp->dm_part, NULL, dp->dm_serid)) == NULL)
- nerr++;
- nvlist_free(auth);
-
- cnode = mem_tnode_create(mod, pnode, "dimm", inst,
- dp->dm_serid, fru, dp->dm_label, NULL);
- nvlist_free(fru);
- if (cnode == NULL)
- return (++nerr);
-
- rsrc = NULL;
- /* ASRU will be computed by topo method */
- if (topo_node_resource(cnode, &rsrc, &err) < 0 ||
- topo_method_register(mod, cnode, pi_mem_methods) < 0 ||
- topo_node_asru_set(cnode, rsrc, TOPO_ASRU_COMPUTE, &err) < 0)
- nerr++;
- nvlist_free(rsrc);
-
- return (nerr);
-}
-
-int
-slashorend(const char *s, int start)
-{
- const char *t = s + start;
-
- if ((t = strchr(t, '/')) == NULL)
- return (strlen(s)); /* end */
- else
- return (t - s); /* next slash */
-}
-
-/*
- * mem_range_create and mem_inst_create are mutually recursive routines which
- * together create the node hierarchy for one dimm and its siblings.
- * mem_range_create is called when creating the first instance of a given node
- * type as child of a parent instance, because it is then, and only then,
- * that a topo range must be created. It calls mem_inst_create for its first
- * and subsequent instances. The recursion always starts with
- * mem_range_create, so it performs the up-front sanity checks.
- *
- * Note: the list of mem_dimm_map_t's pointed at by dp must be sorted
- * alphabetically by *dm_label.
- */
-
-static int mem_range_create(topo_mod_t *, tnode_t *, int, mem_dimm_map_t *);
-
-static int
-mem_inst_create(topo_mod_t *mod, tnode_t *pnode, int pflen, mem_dimm_map_t *dp)
-{
- int inst, pfnext;
- const char *nodename;
- tnode_t *cnode;
- mem_dimm_map_t *d;
- nvlist_t *fru;
- int nerr = 0;
-
- pfnext = slashorend(dp->dm_label, pflen);
- nodename = nac2hc((dp->dm_label) + pflen, &inst);
- d = dp;
- if (strcmp(nodename, "dimm") == 0) {
- return (create_one_dimm(mod, pnode, inst, dp));
- } else if (*(d->dm_label + pfnext) == '\0') { /* this node has a fru */
- fru = topo_mod_hcfmri(mod, pnode, FM_HC_SCHEME_VERSION,
- nodename, inst, NULL, NULL, dp->dm_part, NULL,
- dp->dm_serid);
- cnode = mem_tnode_create(mod, pnode, nodename, inst,
- dp->dm_serid, fru, dp->dm_label, NULL);
- nvlist_free(fru);
- d = dp->dm_next; /* next mem_dimm_map_t could be child */
- } else {
- cnode = mem_tnode_create(mod, pnode, nodename, inst,
- NULL, NULL, NULL, NULL);
- }
- if ((d != NULL) &&
- strncmp(dp->dm_label, d->dm_label, pfnext) == 0)
- nerr += mem_range_create(mod, cnode, pfnext+1, d);
- return (nerr);
-}
-
-int
-mem_range_create(topo_mod_t *mod, tnode_t *pnode, int pflen,
- mem_dimm_map_t *dp)
-{
- int inst, pfnext;
- const char *nodename;
- mem_dimm_map_t *d;
- int nerr = 0;
-
- if (pnode == NULL)
- return (1); /* definitely an error */
- if (*(dp->dm_label + pflen) == '\0')
- return (1); /* recursed too far */
-
- pfnext = slashorend(dp->dm_label, pflen);
- nodename = nac2hc(dp->dm_label + pflen, &inst);
-
- if (nodename != NULL) {
- if (topo_node_range_create(mod, pnode, nodename, 0,
- MEM_DIMM_MAX) < 0) {
- topo_mod_dprintf(mod, "failed to create "
- "DIMM range %s error %s\n", nodename,
- topo_mod_errmsg(mod));
- return (-1);
- }
- } else {
- /*
- * Skip over NAC elements other than those listed
- * above. These elements will appear
- * in the DIMM's unum, but not in hc: scheme hierarchy.
- */
-
- return (mem_range_create(mod, pnode, pfnext+1, dp));
- }
-
- nerr += mem_inst_create(mod, pnode, pflen, dp);
-
- for (d = dp->dm_next; d != NULL; d = d->dm_next) {
- if (strncmp(dp->dm_label, d->dm_label, pfnext) == 0)
- continue; /* child of 1st instance -- already done */
- else if (strncmp(dp->dm_label, d->dm_label,
- pflen) == 0) { /* child of same parent */
- if (nodename == nac2hc((d->dm_label)+pflen, &inst)) {
- /*
- * Same nodename as sibling. Don't create
- * new range, or the enumeration will die.
- */
- nerr += mem_inst_create(mod, pnode, pflen, d);
- dp = d;
- } else {
- nodename = nac2hc((d->dm_label)+pflen, &inst);
- nerr += mem_range_create(mod, pnode, pflen, d);
- dp = d;
- }
- }
- else
- return (nerr); /* finished all children of my parent */
- }
- return (nerr); /* reached end of mem_dimm_map_t list */
-}
-static int
-mem_create(topo_mod_t *mod, tnode_t *rnode, md_mem_info_t *cm)
-{
- int l, nerrs;
- char nodename[10]; /* allows up to 10^6 chips in system */
- char *p;
- mem_dimm_map_t *dp;
-
- if (strcmp(topo_node_name(rnode), "chip") == 0) {
-
- (void) snprintf(nodename, 10, "CMP%d",
- topo_node_instance(rnode));
-
- for (dp = cm->mem_dm; dp != NULL; dp = dp->dm_next) {
- p = strstr(dp->dm_label, nodename);
- if (p != NULL && (p = strchr(p, '/')) != NULL) {
- l = p - (dp->dm_label) + 1;
- break;
- }
- }
- } else if (strcmp(topo_node_name(rnode), "motherboard") == 0) {
- for (dp = cm->mem_dm; dp != NULL; dp = dp->dm_next) {
- p = strstr(dp->dm_label, "MB/MEM");
- if (p != NULL) {
- l = 3; /* start with MEM */
- break;
- }
- }
- } else {
- return (1);
- }
-
- if (dp != NULL)
- nerrs = mem_range_create(mod, rnode, l, dp);
- else
- nerrs = 1;
- return (nerrs);
-}
-
-
-/*
- * The hc-scheme memory enumerator is invoked from within a platform
- * toplogy file. Make sure that the invocation is either
- * 1) a child of the chip enumerator, which will cause the argument "rnode"
- * below to be a chip node, and the dimm structures specific for that chip can
- * then be built from its specific node, or
- * 2) a child of the motherboard enumerator -- for Batoka and similar machines
- * with cpu-boards.
- */
-
-/*ARGSUSED*/
-static int
-dimm_enum(topo_mod_t *mod, tnode_t *rnode, const char *name,
- topo_instance_t min, topo_instance_t max, void *arg, void *notused)
-{
- md_mem_info_t *mem = (md_mem_info_t *)arg;
-
- if (strcmp(name, DIMM_NODE_NAME) == 0)
- return (mem_create(mod, rnode, mem));
-
- return (-1);
-}
-
-/*ARGSUSED*/
-static void
-dimm_release(topo_mod_t *mp, tnode_t *node)
-{
-}
diff --git a/usr/src/lib/fm/topo/modules/sun4v/hostbridge/Makefile b/usr/src/lib/fm/topo/modules/sun4v/hostbridge/Makefile
deleted file mode 100644
index d2dffc2ffa..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/hostbridge/Makefile
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-
-ARCH = sun4v
-
-sun4v_SRCS = hb_sun4v.c hb_mdesc.c hb_rcid.c
-
-include ../../sun4/hostbridge/Makefile.hb
-
-CPPFLAGS += -I$(ROOT)/usr/platform/sun4v/include
-LDLIBS += -lumem -lmdesc -lldom
diff --git a/usr/src/lib/fm/topo/modules/sun4v/hostbridge/hb_mdesc.c b/usr/src/lib/fm/topo/modules/sun4v/hostbridge/hb_mdesc.c
deleted file mode 100644
index 6c81e62107..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/hostbridge/hb_mdesc.c
+++ /dev/null
@@ -1,226 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#include <string.h>
-#include <strings.h>
-#include <umem.h>
-#include <sys/mdesc.h>
-#include <sys/systeminfo.h>
-#include <sys/fm/ldom.h>
-
-#include <hb_mdesc.h>
-
-#include "hb_rcid.h"
-
-static void *
-hb_alloc(size_t size)
-{
- return (umem_alloc(size, UMEM_DEFAULT));
-}
-
-static void
-hb_free(void *data, size_t size)
-{
- umem_free(data, size);
-}
-
-/*
- * hb_find_hb()
- * Description:
- * Return the pointer of hostbridge entry
- */
-md_hb_t *
-hb_find_hb(md_info_t *phbmd, int hbid) {
- int i;
- md_hb_t *phb;
-
- /* search the processor based on the physical id */
- for (i = 0, phb = phbmd->hbs; i < phbmd->nhbs; i++, phb++) {
- if (phb->rcs != NULL && phb->id == hbid) {
- return (phb);
- }
- }
-
- return (NULL);
-}
-
-/*
- * hb_rc_init()
- * Description:
- * Read the hostbridge/pciexrc information from the MD
- * The hostbridge/pciexrc information is not specified in the PRI of
- * the existing sun4v platforms, the enumerator assumes there is only
- * one hostbridge and its physical id is 0. It will create all the
- * pciexrc nodes under the topo node hostbridge=0.
- */
-static int
-hb_rc_init(topo_mod_t *mod, md_t *mdp, md_info_t *hbmdp)
-{
- int i, rc;
- int id, nnode, nio, nrcs;
- char *s = NULL;
- uint64_t x;
- mde_cookie_t *listp;
- md_hb_t *hbp;
- char platform[MAXNAMELEN];
-
- bzero(hbmdp, sizeof (md_info_t));
- nnode = md_node_count(mdp);
- listp = topo_mod_zalloc(mod, sizeof (mde_cookie_t) * nnode);
-
- /* find the pciex bus nodes */
- nio = md_scan_dag(mdp,
- MDE_INVAL_ELEM_COOKIE,
- md_find_name(mdp, MD_STR_IODEVICE),
- md_find_name(mdp, "fwd"),
- listp);
- if (nio <= 0) {
- topo_mod_dprintf(mod, "iodevice nodes not found\n");
- topo_mod_free(mod, listp, sizeof (mde_cookie_t) * nnode);
- return (-1);
- }
- topo_mod_dprintf(mod, "Found %d %s nodes\n", nio, MD_STR_IODEVICE);
-
- for (i = 0, nrcs = 0; i < nio; i++) {
- rc = md_get_prop_str(mdp, listp[i], MD_STR_DEVICE_TYPE, &s);
- if ((rc == 0) && (s != NULL) && (strcmp(s, MD_STR_PCIEX) == 0))
- nrcs++;
- }
- topo_mod_dprintf(mod, "Found %d pciex buses\n", nrcs);
- if (nrcs == 0) {
- topo_mod_dprintf(mod, "pciex nodes not found\n");
- topo_mod_free(mod, listp, sizeof (mde_cookie_t) * nnode);
- return (-1);
- }
-
- platform[0] = '\0';
- (void) sysinfo(SI_PLATFORM, platform, sizeof (platform));
-
- /*
- * All existing sun4v platforms have only one hostdridge.
- */
- hbmdp->shbs = hbmdp->nhbs = 1;
- hbp = topo_mod_zalloc(mod, sizeof (md_hb_t) * hbmdp->nhbs);
- hbp->id = 0;
- hbmdp->hbs = hbp;
-
- hbp->srcs = nrcs;
- hbp->rcs = topo_mod_zalloc(mod, sizeof (md_rc_t) * nrcs);
- hbp->nrcs = 0;
- for (i = 0, nrcs = 0; i < nio; i++) {
- rc = md_get_prop_str(mdp, listp[i], MD_STR_DEVICE_TYPE, &s);
- if ((rc != 0) || s == NULL || strcmp(s, MD_STR_PCIEX) != 0)
- continue;
-
- hbp->rcs[nrcs].id = -1; /* invalidate the entry */
-
- /* bus address */
- if (md_get_prop_val(mdp, listp[i], MD_STR_CFGHDL, &x) < 0) {
- nrcs++;
- continue;
- }
- hbp->rcs[nrcs].cfg_handle = x;
- topo_mod_dprintf(mod, "Found rc=%d ba=%llx\n", nrcs, x);
-
- /* Assign the physical id of the pciexrc */
- if ((id = hb_find_rc_pid(platform, x)) >= 0)
- hbp->rcs[nrcs].id = id;
- else
- hbp->rcs[nrcs].id = hbp->nrcs;
-
- nrcs++;
- hbp->nrcs++;
- }
-
- topo_mod_free(mod, listp, sizeof (mde_cookie_t) * nnode);
-
- return (0);
-}
-
-/*
- * Get the info. of the hb and rc from the PRI/MD
- */
-int
-hb_mdesc_init(topo_mod_t *mod, md_info_t *phbmd)
-{
- int rc = -1;
- md_t *mdp;
- ssize_t bufsiz = 0;
- uint64_t *bufp;
- uint32_t type = 0;
- ldom_hdl_t *lhp;
-
- /* get the PRI/MD */
- if ((lhp = ldom_init(hb_alloc, hb_free)) == NULL) {
- topo_mod_dprintf(mod, "ldom_init() failed\n");
- return (topo_mod_seterrno(mod, EMOD_NOMEM));
- }
-
- (void) ldom_get_type(lhp, &type);
- if ((type & LDOM_TYPE_CONTROL) != 0) {
- bufsiz = ldom_get_core_md(lhp, &bufp);
- } else {
- bufsiz = ldom_get_local_md(lhp, &bufp);
- }
- if (bufsiz <= 0) {
- topo_mod_dprintf(mod, "failed to get the PRI/MD\n");
- ldom_fini(lhp);
- return (-1);
- }
-
- if ((mdp = md_init_intern(bufp, hb_alloc, hb_free)) == NULL ||
- md_node_count(mdp) <= 0) {
- hb_free(bufp, (size_t)bufsiz);
- ldom_fini(lhp);
- return (-1);
- }
-
- rc = hb_rc_init(mod, mdp, phbmd);
-
- hb_free(bufp, (size_t)bufsiz);
- (void) md_fini(mdp);
- ldom_fini(lhp);
-
- return (rc);
-}
-
-void
-hb_mdesc_fini(topo_mod_t *mod, md_info_t *hbmdp)
-{
- int i;
- md_hb_t *hbp;
-
- if (hbmdp->hbs == NULL)
- return;
-
- for (i = 0, hbp = hbmdp->hbs; i < hbmdp->nhbs; i++, hbp++) {
- if (hbp->rcs == NULL)
- continue;
- topo_mod_free(mod, hbp->rcs, hbp->srcs * sizeof (md_rc_t));
- }
- topo_mod_free(mod, hbmdp->hbs, hbmdp->shbs * sizeof (md_hb_t));
-
-}
diff --git a/usr/src/lib/fm/topo/modules/sun4v/hostbridge/hb_mdesc.h b/usr/src/lib/fm/topo/modules/sun4v/hostbridge/hb_mdesc.h
deleted file mode 100644
index 55a937c9e6..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/hostbridge/hb_mdesc.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _HB_MDESC_H
-#define _HB_MDESC_H
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include <fm/topo_mod.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Node/Field names in the PRI/MD
- */
-#define MD_STR_ID "id"
-#define MD_STR_IODEVICE "iodevice"
-#define MD_STR_DEVICE_TYPE "device-type"
-#define MD_STR_PCIEX "pciex"
-#define MD_STR_CFGHDL "cfg-handle"
-
-/* A root complex */
-typedef struct md_rc {
- int16_t id; /* physical id of the rc */
- uint64_t cfg_handle; /* bus address */
-} md_rc_t;
-
-/* A hostbridge */
-typedef struct md_hb {
- int16_t id; /* physiscal id of the hostbridge */
- md_rc_t *rcs; /* a list of pciex root complexes */
- int16_t srcs; /* size of the rcs */
- int16_t nrcs; /* count of rc entries in rcs */
-} md_hb_t;
-
-typedef struct md_info {
- md_hb_t *hbs; /* a list of hostbridges */
- int16_t shbs; /* size of the hbs */
- int16_t nhbs; /* count of hb entries in hbs */
-} md_info_t;
-
-
-extern int hb_mdesc_init(topo_mod_t *mod, md_info_t *hbmdp);
-extern void hb_mdesc_fini(topo_mod_t *mod, md_info_t *hbmdp);
-
-extern md_hb_t *hb_find_hb(md_info_t *hbmd, int hbid);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _HB_MDESC_H */
diff --git a/usr/src/lib/fm/topo/modules/sun4v/hostbridge/hb_rcid.c b/usr/src/lib/fm/topo/modules/sun4v/hostbridge/hb_rcid.c
deleted file mode 100644
index 94721343ac..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/hostbridge/hb_rcid.c
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#include <strings.h>
-
-#include "hb_rcid.h"
-
-/* A list of physical root complexes of the SUNW,Sun-Fire-T200 platform */
-prc_t t200_prcs[] = {
- /* physical id, bus address */
- { 0, 0x780 },
- { 1, 0x7c0 }
-};
-
-/* A list of physical root complexes of the SUNW,T5140 platform */
-prc_t t5140_prcs[] = {
- /* physical id, bus address */
- { 0, 0x400 },
- { 1, 0x500 }
-};
-
-
-pprc_t plat_prcids[] = {
- /*
- * platforms that have the same map with T200
- */
- { "SUNW,Sun-Fire-T200",
- sizeof (t200_prcs) / sizeof (prc_t),
- t200_prcs },
- { "SUNW,Sun-Fire-T1000",
- sizeof (t200_prcs) / sizeof (prc_t),
- t200_prcs },
- { "SUNW,SPARC-Enterprise-T2000",
- sizeof (t200_prcs) / sizeof (prc_t),
- t200_prcs },
- { "SUNW,SPARC-Enterprise-T1000",
- sizeof (t200_prcs) / sizeof (prc_t),
- t200_prcs },
- { "SUNW,Netra-CP3060",
- sizeof (t200_prcs) / sizeof (prc_t),
- t200_prcs },
- { "SUNW,Netra-T2000",
- sizeof (t200_prcs) / sizeof (prc_t),
- t200_prcs },
- { "SUNW,Sun-Blade-T6300",
- sizeof (t200_prcs) / sizeof (prc_t),
- t200_prcs },
-
- /*
- * platforms that have the same map with T5140
- */
- { "SUNW,T5140",
- sizeof (t5140_prcs) / sizeof (prc_t),
- t5140_prcs },
- { "SUNW,T5240",
- sizeof (t5140_prcs) / sizeof (prc_t),
- t5140_prcs },
- { "SUNW,Netra-T5440",
- sizeof (t5140_prcs) / sizeof (prc_t),
- t5140_prcs },
- { "SUNW,Sun-Blade-T6340",
- sizeof (t5140_prcs) / sizeof (prc_t),
- t5140_prcs },
- { "SUNW,USBRDT-5240",
- sizeof (t5140_prcs) / sizeof (prc_t),
- t5140_prcs }
-};
-
-pprcs_t prcids = {
- sizeof (plat_prcids) / sizeof (pprc_t),
- plat_prcids
-};
-
-/*
- * hb_find_rc_pid()
- * Description:
- * Return the physical id (non-negative) of a root complex given the
- * plaform name and its bus address.
- */
-int
-hb_find_rc_pid(char *platform, uint64_t ba)
-{
- int rcid = -1;
- int p, i;
-
- for (p = 0; p < prcids.nplats; p++) {
- if (strcmp(prcids.plats[p].platform, platform) != 0)
- continue;
- for (i = 0; i < prcids.plats[p].nrcs; i++) {
- prc_t pciexrc;
- pciexrc = prcids.plats[p].rcs[i];
- if (pciexrc.ba == ba) {
- rcid = pciexrc.id;
- break;
- }
- }
- break;
- }
- return (rcid);
-}
diff --git a/usr/src/lib/fm/topo/modules/sun4v/hostbridge/hb_rcid.h b/usr/src/lib/fm/topo/modules/sun4v/hostbridge/hb_rcid.h
deleted file mode 100644
index 2acd5f97d7..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/hostbridge/hb_rcid.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _HB_RCID_H
-#define _HB_RCID_H
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Physical information of a root complex (pciexrc)
- */
-typedef struct prc {
- int id; /* physical id of a rc */
- uint64_t ba; /* bus address */
-} prc_t;
-
-/*
- * A list of rc per platform
- */
-typedef struct pprc {
- const char *platform; /* platform on which the names apply */
- int nrcs; /* number of pciexrc */
- struct prc *rcs; /* array of pciexrc */
-} pprc_t;
-
-/*
- * A list of platforms
- */
-typedef struct pprcs {
- int nplats; /* Number of platforms */
- struct pprc *plats; /* Array of platforms */
-} pprcs_t;
-
-extern int hb_find_rc_pid(char *platform, uint64_t ba);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _HB_RCID_H */
diff --git a/usr/src/lib/fm/topo/modules/sun4v/hostbridge/hb_sun4v.c b/usr/src/lib/fm/topo/modules/sun4v/hostbridge/hb_sun4v.c
deleted file mode 100644
index fe8afd14c8..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/hostbridge/hb_sun4v.c
+++ /dev/null
@@ -1,420 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2010 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#include <strings.h>
-#include <sys/fm/protocol.h>
-#include <fm/topo_hc.h>
-#include <fm/topo_mod.h>
-
-#include <hb_sun4.h>
-#include <hostbridge.h>
-#include <pcibus.h>
-#include <did.h>
-#include <util.h>
-
-#include "hb_mdesc.h"
-
-static const topo_pgroup_info_t io_pgroup =
- { TOPO_PGROUP_IO, TOPO_STABILITY_PRIVATE, TOPO_STABILITY_PRIVATE, 1 };
-static const topo_pgroup_info_t pci_pgroup =
- { TOPO_PGROUP_PCI, TOPO_STABILITY_PRIVATE, TOPO_STABILITY_PRIVATE, 1 };
-
-/*
- * get_rcs()
- * Description:
- * Return a list of PX instances in the dev tree.
- */
-static busorrc_t *
-get_rcs(topo_mod_t *mod)
-{
- busorrc_t *rcs = NULL;
- di_node_t devtree;
- di_node_t pnode;
-
- /* Scan for buses, top-level devinfo nodes with the right driver */
- devtree = topo_mod_devinfo(mod);
- if (devtree == DI_NODE_NIL) {
- topo_mod_dprintf(mod, "devinfo init failed.\n");
- return (NULL);
- }
- pnode = di_drv_first_node(PX, devtree);
- while (pnode != DI_NODE_NIL) {
- if (busorrc_add(mod, &rcs, pnode) < 0) {
- topo_mod_dprintf(mod, "busorrc_add() failed.\n");
- busorrc_free(mod, rcs);
- return (NULL);
- }
- pnode = di_drv_next_node(pnode);
- }
- return (rcs);
-}
-
-/*
- * find_dnode()
- * Description:
- * Find the dev pointer of a rc given its bus address, ba
- */
-static di_node_t
-find_dnode(busorrc_t *rcs, uint64_t ba)
-{
- busorrc_t *p;
- for (p = rcs; p != NULL; p = p->br_nextbus) {
- if (ba == p->br_ba_bc) {
- return (p->br_din);
- }
- }
- return (NULL);
-}
-
-/*
- * hb_tnode_create()
- * Description:
- * Create a topo node
- */
-static tnode_t *
-hb_tnode_create(topo_mod_t *mod, tnode_t *parent, const char *name,
- int inst, void *priv)
-{
- int err;
- tnode_t *node;
- nvlist_t *fmri;
- nvlist_t *auth = topo_mod_auth(mod, parent);
-
- if (parent == NULL || inst < 0) {
- return (NULL);
- }
-
- /* Create FMRI */
- if ((fmri = topo_mod_hcfmri(mod, parent, FM_HC_SCHEME_VERSION, name,
- inst, NULL, auth, NULL, NULL, NULL)) == NULL) {
- topo_mod_dprintf(mod, "create of tnode for %s failed: %s\n",
- name, topo_strerror(topo_mod_errno(mod)));
- nvlist_free(auth);
- return (NULL);
- }
- nvlist_free(auth);
-
- /* Create and bind node */
- node = topo_node_bind(mod, parent, name, inst, fmri);
- if (node == NULL) {
- nvlist_free(fmri);
- topo_mod_dprintf(mod, "unable to bind a node(%s): %s\n",
- name, topo_strerror(topo_mod_errno(mod)));
- return (NULL); /* mod_errno already set */
- }
-
- nvlist_free(fmri);
- topo_node_setspecific(node, priv);
-
- /* Inherit the parent 's FRU and label */
- (void) topo_node_fru_set(node, NULL, 0, &err);
- (void) topo_node_label_set(node, NULL, &err);
-
- return (node);
-}
-
-/*
- * platform_pciexhostbridge_declare()
- * Description:
- * This is a sun4v specific function to create the hostbridge topo node.
- */
-tnode_t *
-platform_pciexhostbridge_declare(topo_mod_t *mod, tnode_t *parent,
- topo_instance_t inst)
-{
- tnode_t *hbn;
- void *priv = NULL;
-
- topo_mod_dprintf(mod, "Create node %s=%d\n", HOSTBRIDGE, inst);
-
- hbn = hb_tnode_create(mod, parent, HOSTBRIDGE, inst, priv);
- if (hbn == NULL) {
- topo_mod_dprintf(mod, "Failed to create node %s=%d\n",
- HOSTBRIDGE, inst);
- return (NULL);
- }
-
- /* Make room for children */
- (void) topo_node_range_create(mod, hbn, PCIEX_ROOT, 0, MAX_HB_BUSES);
-
- return (hbn);
-}
-
-/*
- * platform_pciexhostbridge_declare()
- * Description:
- * This is a sun4v specific function to create a root complex topo node,
- * but do not enumerate its pci buses.
- */
-static tnode_t *
-platform_pciexrc_declare(topo_mod_t *mod, tnode_t *parent, int inst,
- uint64_t ba)
-{
- int err;
- tnode_t *rcn;
- char dnpath[MAXPATHLEN];
- nvlist_t *fmri;
-
- topo_mod_dprintf(mod, "Create node %s=%d\n", PCIEX_ROOT, inst);
-
- rcn = hb_tnode_create(mod, parent, PCIEX_ROOT, inst, NULL);
- if (rcn == NULL) {
- topo_mod_dprintf(mod, "Failed to create node %s=%d\n",
- PCIEX_ROOT, inst);
- return (NULL);
- }
-
- /* Set ASRU to be the dev-scheme asru */
- (void) snprintf(dnpath, sizeof (dnpath), "/pci@%llx", ba);
- fmri = topo_mod_devfmri(mod, FM_DEV_SCHEME_VERSION, dnpath, NULL);
- if (fmri == NULL) {
- topo_mod_dprintf(mod, "dev:///%s fmri creation failed.\n",
- dnpath);
- return (NULL);
- }
- if (topo_node_asru_set(rcn, fmri, 0, &err) < 0) {
- topo_mod_dprintf(mod, "topo_node_asru_set failed\n");
- (void) topo_mod_seterrno(mod, err);
- nvlist_free(fmri);
- return (NULL);
- }
- nvlist_free(fmri);
-
- /*
- * Set properties of the root complex node pciexrc
- */
-
- /* Add the io and pci property groups */
- if (topo_pgroup_create(rcn, &io_pgroup, &err) < 0) {
- topo_mod_dprintf(mod, "topo_pgroup_create(iogrp) failed\n");
- (void) topo_mod_seterrno(mod, err);
- return (NULL);
- }
- if (topo_pgroup_create(rcn, &pci_pgroup, &err) < 0) {
- topo_mod_dprintf(mod, "topo_pgroup_create(pcigrp) failed\n");
- (void) topo_mod_seterrno(mod, err);
- return (NULL);
- }
- /* Add the devfs path property */
- if (topo_prop_set_string(rcn, TOPO_PGROUP_IO, TOPO_IO_DEV,
- TOPO_PROP_IMMUTABLE, dnpath, &err) != 0) {
- topo_mod_dprintf(mod, "Failed to set %s property\n",
- TOPO_IO_DEV);
- (void) topo_mod_seterrno(mod, err);
- return (NULL);
- }
-
- /* for sun4v, device type is always pciex */
- if (topo_prop_set_string(rcn, TOPO_PGROUP_IO, TOPO_IO_DEVTYPE,
- TOPO_PROP_IMMUTABLE, PCIEXTYPE, &err) != 0) {
- topo_mod_dprintf(mod, "Failed to set %s property\n",
- TOPO_IO_DEVTYPE);
- }
-
- /* sun4v rc driver is always "px" */
- if (topo_prop_set_string(rcn, TOPO_PGROUP_IO, TOPO_IO_DRIVER,
- TOPO_PROP_IMMUTABLE, PX, &err) != 0) {
- topo_mod_dprintf(mod, "Failed to set %s property\n",
- TOPO_IO_DRIVER);
- }
- if ((fmri = topo_mod_modfmri(mod, FM_MOD_SCHEME_VERSION, PX)) == NULL ||
- (topo_prop_set_fmri(rcn, TOPO_PGROUP_IO, TOPO_IO_MODULE,
- TOPO_PROP_IMMUTABLE, fmri, &err) != 0)) {
- topo_mod_dprintf(mod, "Failed to set %s property\n",
- TOPO_IO_MODULE);
- }
- nvlist_free(fmri);
-
- /* This is a PCIEX Root Complex */
- if (topo_prop_set_string(rcn, TOPO_PGROUP_PCI, TOPO_PCI_EXCAP,
- TOPO_PROP_IMMUTABLE, PCIEX_ROOT, &err) != 0) {
- topo_mod_dprintf(mod, "Failed to set %s property\n",
- TOPO_PCI_EXCAP);
- }
-
- /* Make room for children */
- (void) topo_node_range_create(mod, rcn, PCIEX_BUS, 0, MAX_HB_BUSES);
-
- return (rcn);
-}
-
-/*
- * platform_hb_enum()
- * Description:
- * This is an entry function to enumerate the sun4v hostbridges. First, it
- * reads the hostbridges and their pciexrc root complexes from the PRI or
- * MD.
- * For the current sun4v platforms, it is assummed that there is only one
- * hostbridge. All the pciex root complexes belong to this single hostbridge.
- * Given the hostbridge/pciexrc information, this enumerator creates the
- * the hostbridge topo node and pciexrc nodes. If the domain owns the
- * the root complex, it uses the common hostbridge code to enumerate the
- * pcibus. If not, it simply create the hostbridge/pciexrc nodes without the
- * fabric.
- */
-/*ARGSUSED*/
-int
-platform_hb_enum(topo_mod_t *mod, tnode_t *parent, const char *name,
- topo_instance_t imin, topo_instance_t imax)
-{
- int i, j;
- int err = 0;
- md_hb_t *hbp;
- md_rc_t *rcp;
- md_info_t hbmd;
- tnode_t **hbnode;
- int nhbnode = 0;
- tnode_t **rcnode;
- int nrcs, nrcnode = 0;
- busorrc_t *rcs;
-
- if (imin > imax) {
- topo_mod_dprintf(mod, "Invalid hb range(%d,%d)\n", imin, imax);
- return (-1);
- }
-
- /* get the hostbrige and rootcomplex information in the PRI/MD */
- (void) bzero((void *) &hbmd, sizeof (hbmd));
- if (hb_mdesc_init(mod, &hbmd) != 0) {
- topo_mod_dprintf(mod, "failed to get hb from the PRI/MD\n");
- return (-1);
- }
-
- /* count the number of hb and rc in the PRI/MD */
- nrcs = 0;
- for (i = 0, hbp = hbmd.hbs; i < hbmd.shbs; i++, hbp++) {
- if (hbp->id < 0)
- continue;
- nrcs += hbp->srcs;
- }
- if (hbmd.shbs <= 0 || nrcs <= 0) {
- topo_mod_dprintf(mod, "No hostbridge or pciex bus is found\n");
- topo_node_range_destroy(parent, HOSTBRIDGE);
- hb_mdesc_fini(mod, &hbmd);
- return (0);
- }
- hbnode = topo_mod_zalloc(mod, hbmd.shbs * sizeof (tnode_t *));
- rcnode = topo_mod_zalloc(mod, nrcs * sizeof (tnode_t *));
- rcs = get_rcs(mod);
-
- /* process the hostbridge */
- for (i = imin; (i <= imax) && (err == 0); i++) {
- int brd = 0;
- di_node_t dnode1, dnode2;
-
- if ((hbp = hb_find_hb(&hbmd, i)) == NULL) {
- continue;
- }
-
- dnode2 = NULL;
- for (j = 0, rcp = hbp->rcs; j < hbp->srcs; j++, rcp++) {
- if (rcp->id < 0)
- continue;
- dnode1 = find_dnode(rcs, rcp->cfg_handle);
- if (dnode1 != NULL) {
- dnode2 = dnode1;
- if (did_create(mod, dnode1, brd, hbp->id,
- rcp->id, rcp->id) == NULL) {
- err = -1;
- break;
- }
- }
- }
-
- if (err != 0)
- break;
-
- /*
- * If this hb has a rc in the dev tree, use the common code to
- * create a hostbridge node
- */
- if (dnode2 != NULL) {
- hbnode[nhbnode] = pciexhostbridge_declare(mod, parent,
- dnode2, hbp->id);
- } else {
- /* platformm specific */
- hbnode[nhbnode] = platform_pciexhostbridge_declare(mod,
- parent, hbp->id);
- }
- if (hbnode[nhbnode] == NULL) {
- err = -1;
- break;
- }
-
- /*
- * Create the pciexrc nodes under the hostbridge node
- * If a rc exists in the dev tree, use the common code to
- * create a pciexrc node and enumerate the fabric.
- * Otherwise, only create the pciexrc node.
- */
- for (j = 0, rcp = hbp->rcs; j < hbp->nrcs; j++, rcp++) {
- if (rcp->id < 0) {
- topo_mod_dprintf(mod, "skip invalid rc[%d]\n",
- j);
- continue;
- }
- dnode1 = find_dnode(rcs, rcp->cfg_handle);
- if (dnode1 != NULL) {
- /* declare a pciexrc and enumerate its pcibus */
- rcnode[nrcnode] = rc_process(mod,
- hbnode[nhbnode], rcp->id, dnode1);
- } else {
- /* only declare the pciexrc */
- rcnode[nrcnode] = platform_pciexrc_declare(mod,
- hbnode[nhbnode], rcp->id, rcp->cfg_handle);
- }
- if (rcnode[nrcnode] == NULL) {
- err = -1;
- break;
- }
- nrcnode++;
- }
-
- nhbnode++;
- }
-
- /* failure: unbind all hb and rc tnodes */
- if (err != 0) {
- for (i = 0; i < nhbnode; i++)
- topo_node_unbind(hbnode[i]);
- for (i = 0; i < nrcnode; i++)
- topo_node_unbind(rcnode[i]);
- }
-
- topo_mod_free(mod, hbnode, hbmd.shbs * sizeof (tnode_t *));
- topo_mod_free(mod, rcnode, nrcs * sizeof (tnode_t *));
- hb_mdesc_fini(mod, &hbmd);
- busorrc_free(mod, rcs);
-
- return (err);
-}
-
-/*ARGSUSED*/
-int
-platform_hb_label(topo_mod_t *mod, tnode_t *node, nvlist_t *in, nvlist_t **out)
-{
- return (labelmethod_inherit(mod, node, in, out));
-}
diff --git a/usr/src/lib/fm/topo/modules/sun4v/motherboard/Makefile b/usr/src/lib/fm/topo/modules/sun4v/motherboard/Makefile
deleted file mode 100644
index 85d31e5b1b..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/motherboard/Makefile
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2006 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-#
-
-MODULE = motherboard
-ARCH = sun4v
-CLASS = arch
-MBSRCS = motherboard.c
-
-MODULESRCS = $(MBSRCS)
-
-include ../../Makefile.plugin
-
-CPPFLAGS += -I. -I$(ROOT)/usr/platform/sun4v/include
-LDLIBS += -ldevinfo -lmdesc -lldom -lumem
diff --git a/usr/src/lib/fm/topo/modules/sun4v/motherboard/motherboard.c b/usr/src/lib/fm/topo/modules/sun4v/motherboard/motherboard.c
deleted file mode 100644
index 1e505bd414..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/motherboard/motherboard.c
+++ /dev/null
@@ -1,413 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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.
- */
-
-#include <stdlib.h>
-#include <string.h>
-#include <strings.h>
-#include <fm/topo_mod.h>
-#include <fm/topo_hc.h>
-#include <libdevinfo.h>
-#include <limits.h>
-#include <sys/fm/protocol.h>
-#include <sys/param.h>
-#include <sys/systeminfo.h>
-#include <assert.h>
-#include <sys/utsname.h>
-#include <sys/systeminfo.h>
-#include <fm/fmd_fmri.h>
-#include <sys/types.h>
-#include <sys/mdesc.h>
-#include <sys/fm/ldom.h>
-
-/*
- * motherboard.c
- * sun4v specific motherboard enumerators
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define MB_VERSION TOPO_VERSION
-
-static int mb_enum(topo_mod_t *, tnode_t *, const char *, topo_instance_t,
- topo_instance_t, void *, void *);
-
-static const topo_modops_t Mb_ops =
- { mb_enum, NULL};
-static const topo_modinfo_t mb_info =
- { MOTHERBOARD, FM_FMRI_SCHEME_HC, MB_VERSION, &Mb_ops};
-
-static const topo_pgroup_info_t mb_auth_pgroup = {
- FM_FMRI_AUTHORITY,
- TOPO_STABILITY_PRIVATE,
- TOPO_STABILITY_PRIVATE,
- 1
-};
-
-static const topo_pgroup_info_t mb_sys_pgroup = {
- TOPO_PGROUP_SYSTEM,
- TOPO_STABILITY_PRIVATE,
- TOPO_STABILITY_PRIVATE,
- 1
-};
-
-static topo_mod_t *mb_mod_hdl = NULL;
-
-/*ARGSUSED*/
-void
-_topo_init(topo_mod_t *mod, topo_version_t version)
-{
- /*
- * Turn on module debugging output
- */
- if (getenv("TOPOMBDBG") != NULL)
- topo_mod_setdebug(mod);
- topo_mod_dprintf(mod, "initializing motherboard enumerator\n");
-
- if (topo_mod_register(mod, &mb_info, TOPO_VERSION) < 0) {
- topo_mod_dprintf(mod, "motherboard registration failed: %s\n",
- topo_mod_errmsg(mod));
- return; /* mod errno already set */
- }
- topo_mod_dprintf(mod, "MB enumr initd\n");
-}
-
-void
-_topo_fini(topo_mod_t *mod)
-{
- topo_mod_unregister(mod);
-}
-
-static void *
-mb_topo_alloc(size_t size)
-{
- assert(mb_mod_hdl != NULL);
- return (topo_mod_alloc(mb_mod_hdl, size));
-}
-
-static void
-mb_topo_free(void *data, size_t size)
-{
- assert(mb_mod_hdl != NULL);
- topo_mod_free(mb_mod_hdl, data, size);
-}
-
-static int
-mb_get_pri_info(topo_mod_t *mod, char **serialp, char **partp, char **csnp,
- char **psnp)
-{
- char isa[MAXNAMELEN];
- md_t *mdp;
- mde_cookie_t *listp;
- uint64_t *bufp;
- ssize_t bufsize = 0;
- int nfrus, num_nodes, i;
- char *pstr = NULL;
- char *sn, *pn, *dn, *csn, *psn;
- uint32_t type = 0;
- ldom_hdl_t *lhp;
-
- lhp = ldom_init(mb_topo_alloc, mb_topo_free);
- if (lhp == NULL) {
- topo_mod_dprintf(mod, "ldom_init failed\n");
- return (-1);
- }
-
- (void) sysinfo(SI_MACHINE, isa, MAXNAMELEN);
- if (strcmp(isa, "sun4v") != 0) {
- topo_mod_dprintf(mod, "not sun4v architecture%s\n",
- isa);
- ldom_fini(lhp);
- return (-1);
- }
-
- (void) ldom_get_type(lhp, &type);
- if ((type & LDOM_TYPE_CONTROL) != 0) {
- bufsize = ldom_get_core_md(lhp, &bufp);
- } else {
- bufsize = ldom_get_local_md(lhp, &bufp);
- }
- if (bufsize < 1) {
- topo_mod_dprintf(mod, "Failed to get the pri/md (bufsize=%d)\n",
- bufsize);
- ldom_fini(lhp);
- return (-1);
- }
- topo_mod_dprintf(mod, "pri/md bufsize=%d\n", bufsize);
-
- if ((mdp = md_init_intern(bufp, mb_topo_alloc, mb_topo_free)) == NULL ||
- (num_nodes = md_node_count(mdp)) < 1) {
- topo_mod_dprintf(mod, "md_init_intern error\n");
- mb_topo_free(bufp, (size_t)bufsize);
- ldom_fini(lhp);
- return (-1);
- }
- topo_mod_dprintf(mod, "num_nodes=%d\n", num_nodes);
-
- if ((listp = (mde_cookie_t *)mb_topo_alloc(
- sizeof (mde_cookie_t) * num_nodes)) == NULL) {
- topo_mod_dprintf(mod, "alloc listp error\n");
- mb_topo_free(bufp, (size_t)bufsize);
- (void) md_fini(mdp);
- ldom_fini(lhp);
- return (-1);
- }
-
- nfrus = md_scan_dag(mdp, MDE_INVAL_ELEM_COOKIE,
- md_find_name(mdp, "component"),
- md_find_name(mdp, "fwd"), listp);
- if (nfrus <= 0) {
- topo_mod_dprintf(mod, "error: nfrus=%d\n", nfrus);
- mb_topo_free(listp, sizeof (mde_cookie_t) * num_nodes);
- mb_topo_free(bufp, (size_t)bufsize);
- (void) md_fini(mdp);
- ldom_fini(lhp);
- return (-1);
- }
- topo_mod_dprintf(mod, "nfrus=%d\n", nfrus);
-
- sn = pn = dn = psn = csn = NULL;
-
- for (i = 0; i < nfrus; i++) {
- if (md_get_prop_str(mdp, listp[i], "type", &pstr) == 0) {
- /* systemboard/motherboard component */
- if (strcmp("systemboard", pstr) == 0) {
- if (md_get_prop_str(mdp, listp[i],
- "serial_number", &sn) < 0)
- sn = NULL;
- if (md_get_prop_str(mdp, listp[i],
- "part_number", &pn) < 0)
- pn = NULL;
- if (md_get_prop_str(mdp, listp[i],
- "dash_number", &dn) < 0)
- dn = NULL;
- } else if (strcmp("product", pstr) == 0) {
- if (md_get_prop_str(mdp, listp[i],
- "serial_number", &psn) < 0)
- psn = NULL;
- }
- }
- /* redefined access method for chassis serial number */
- if (md_get_prop_str(mdp, listp[i], "nac", &pstr) == 0) {
- if (strcmp("SYS", pstr) == 0) {
- if (md_get_prop_str(mdp, listp[i],
- "serial_number", &csn) < 0)
- csn = NULL;
- }
- }
- }
-
- *serialp = topo_mod_strdup(mod, sn);
-
- i = (pn ? strlen(pn) : 0) + (dn ? strlen(dn) : 0) + 1;
- pstr = mb_topo_alloc(i);
- (void) snprintf(pstr, i, "%s%s", pn ? pn : "", dn ? dn : "");
- *partp = topo_mod_strdup(mod, pstr);
- mb_topo_free(pstr, i);
-
- *csnp = topo_mod_strdup(mod, csn);
- *psnp = topo_mod_strdup(mod, psn);
-
- mb_topo_free(listp, sizeof (mde_cookie_t) * num_nodes);
- mb_topo_free(bufp, (size_t)bufsize);
- (void) md_fini(mdp);
- ldom_fini(lhp);
-
- return (0);
-}
-
-static void
-mb_prop_set(tnode_t *node, nvlist_t *auth)
-{
- int err;
- char isa[MAXNAMELEN];
- struct utsname uts;
- char *prod, *psn, *csn, *server;
-
- if ((topo_pgroup_create(node, &mb_auth_pgroup, &err) != 0) &&
- (err != ETOPO_PROP_DEFD))
- return;
-
- if (nvlist_lookup_string(auth, FM_FMRI_AUTH_PRODUCT, &prod) == 0)
- (void) topo_prop_set_string(node, FM_FMRI_AUTHORITY,
- FM_FMRI_AUTH_PRODUCT, TOPO_PROP_IMMUTABLE, prod, &err);
- if (nvlist_lookup_string(auth, FM_FMRI_AUTH_PRODUCT_SN, &psn) == 0)
- (void) topo_prop_set_string(node, FM_FMRI_AUTHORITY,
- FM_FMRI_AUTH_PRODUCT_SN, TOPO_PROP_IMMUTABLE, psn, &err);
- if (nvlist_lookup_string(auth, FM_FMRI_AUTH_CHASSIS, &csn) == 0)
- (void) topo_prop_set_string(node, FM_FMRI_AUTHORITY,
- FM_FMRI_AUTH_CHASSIS, TOPO_PROP_IMMUTABLE, csn, &err);
- if (nvlist_lookup_string(auth, FM_FMRI_AUTH_SERVER, &server) == 0)
- (void) topo_prop_set_string(node, FM_FMRI_AUTHORITY,
- FM_FMRI_AUTH_SERVER, TOPO_PROP_IMMUTABLE, server, &err);
-
- if (topo_pgroup_create(node, &mb_sys_pgroup, &err) != 0)
- return;
-
- isa[0] = '\0';
- (void) sysinfo(SI_ARCHITECTURE, isa, sizeof (isa));
- (void) uname(&uts);
- (void) topo_prop_set_string(node, TOPO_PGROUP_SYSTEM, TOPO_PROP_ISA,
- TOPO_PROP_IMMUTABLE, isa, &err);
- (void) topo_prop_set_string(node, TOPO_PGROUP_SYSTEM, TOPO_PROP_MACHINE,
- TOPO_PROP_IMMUTABLE, uts.machine, &err);
-}
-
-static tnode_t *
-mb_tnode_create(topo_mod_t *mod, tnode_t *parent,
- const char *name, topo_instance_t i, void *priv)
-{
- nvlist_t *fmri;
- tnode_t *ntn;
- char *serial = NULL, *part = NULL;
- char *psn = NULL, *csn = NULL, *pstr = NULL;
- nvlist_t *auth = topo_mod_auth(mod, parent);
-
- /*
- * Get Product Serial Number, Chassis ID, MB Serial Number and
- * Part Number from PRI.
- */
- (void) mb_get_pri_info(mod, &serial, &part, &csn, &psn);
-
- if (nvlist_lookup_string(auth, FM_FMRI_AUTH_CHASSIS, &pstr) != 0 &&
- csn != NULL) {
- if (nvlist_add_string(auth, FM_FMRI_AUTH_CHASSIS, csn) != 0) {
- topo_mod_dprintf(mod,
- "failed to add chassis to auth");
- nvlist_free(auth);
- return (NULL);
- }
- }
-
- if (nvlist_lookup_string(auth, FM_FMRI_AUTH_PRODUCT_SN, &pstr) != 0 &&
- psn != NULL) {
- if (nvlist_add_string(auth, FM_FMRI_AUTH_PRODUCT_SN, psn)
- != 0) {
- topo_mod_dprintf(mod,
- "failed to add product-sn to auth");
- nvlist_free(auth);
- return (NULL);
- }
- }
-
- fmri = topo_mod_hcfmri(mod, NULL, FM_HC_SCHEME_VERSION, name, i,
- NULL, auth, part, NULL, serial);
-
- topo_mod_strfree(mod, serial);
- topo_mod_strfree(mod, part);
- topo_mod_strfree(mod, csn);
- topo_mod_strfree(mod, psn);
-
- if (fmri == NULL) {
- topo_mod_dprintf(mod,
- "Unable to make nvlist for %s bind: %s.\n",
- name, topo_mod_errmsg(mod));
- nvlist_free(auth);
- return (NULL);
- }
-
- ntn = topo_node_bind(mod, parent, name, i, fmri);
- if (ntn == NULL) {
- topo_mod_dprintf(mod,
- "topo_node_bind (%s%d/%s%d) failed: %s\n",
- topo_node_name(parent), topo_node_instance(parent),
- name, i,
- topo_strerror(topo_mod_errno(mod)));
- nvlist_free(auth);
- nvlist_free(fmri);
- return (NULL);
- }
-
- mb_prop_set(ntn, auth);
-
- nvlist_free(auth);
- nvlist_free(fmri);
-
- topo_node_setspecific(ntn, priv);
-
- return (ntn);
-}
-
-/*ARGSUSED*/
-static tnode_t *
-mb_declare(tnode_t *parent, const char *name, topo_instance_t i,
- void *priv, topo_mod_t *mp)
-{
- tnode_t *ntn;
- nvlist_t *fmri;
- char *label = "MB";
- int err;
-
- if ((ntn = mb_tnode_create(mp, parent, name, 0, NULL)) == NULL)
- return (NULL);
-
- /* Set FRU */
- if (topo_node_resource(ntn, &fmri, &err) < 0) {
- (void) topo_mod_seterrno(mp, err);
- topo_node_unbind(ntn);
- return (NULL);
- }
- if (topo_node_fru_set(ntn, fmri, 0, &err) < 0)
- (void) topo_mod_seterrno(mp, err);
- nvlist_free(fmri);
-
- /* Label is MB */
- if (topo_prop_set_string(ntn, TOPO_PGROUP_PROTOCOL,
- TOPO_PROP_LABEL, TOPO_PROP_IMMUTABLE, label, &err) < 0) {
- (void) topo_mod_seterrno(mp, err);
- }
-
- return (ntn);
-}
-
-/*ARGSUSED*/
-static int
-mb_enum(topo_mod_t *mod, tnode_t *pn, const char *name,
- topo_instance_t min, topo_instance_t max, void *arg, void *notused)
-{
- tnode_t *mbn;
-
- if (strcmp(name, MOTHERBOARD) != 0) {
- topo_mod_dprintf(mod,
- "Currently only know how to enumerate %s components.\n",
- MOTHERBOARD);
- return (0);
- }
-
- mb_mod_hdl = mod;
-
- mbn = mb_declare(pn, name, 0, NULL, mod);
-
- if (mbn == NULL) {
- topo_mod_dprintf(mod, "Enumeration of motherboard "
- "failed: %s\n",
- topo_strerror(topo_mod_errno(mod)));
- return (-1); /* mod_errno already set */
- }
-
- return (0);
-}
diff --git a/usr/src/lib/fm/topo/modules/sun4v/niu/Makefile b/usr/src/lib/fm/topo/modules/sun4v/niu/Makefile
deleted file mode 100644
index 272f51676c..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/niu/Makefile
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2006 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-#
-
-MODULE = niu
-ARCH = sun4v
-CLASS = arch
-NIUSRCS = niu.c
-
-MODULESRCS = $(NIUSRCS)
-
-include ../../Makefile.plugin
-
-LDLIBS += -ldevinfo
-
diff --git a/usr/src/lib/fm/topo/modules/sun4v/niu/niu.c b/usr/src/lib/fm/topo/modules/sun4v/niu/niu.c
deleted file mode 100644
index f3ce93e8c7..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/niu/niu.c
+++ /dev/null
@@ -1,402 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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.
- */
-
-#include <string.h>
-#include <fm/topo_mod.h>
-#include <fm/topo_hc.h>
-#include <libdevinfo.h>
-#include <limits.h>
-#include <sys/fm/protocol.h>
-#include <sys/param.h>
-#include <sys/systeminfo.h>
-#include <assert.h>
-#include <stdlib.h>
-
-/*
- * niu.c
- * sun4v specific niu enumerators
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define NIU_VERSION TOPO_VERSION
-#define NIUFN_MAX 2
-#define XAUI_MAX 1 /* max number of XAUIs per niufn */
-
-static int niu_enum(topo_mod_t *, tnode_t *, const char *, topo_instance_t,
- topo_instance_t, void *, void *);
-
-static const topo_modops_t niu_ops =
- { niu_enum, NULL };
-
-const topo_modinfo_t niu_info =
- {NIU, FM_FMRI_SCHEME_HC, NIU_VERSION, &niu_ops};
-
-static const topo_pgroup_info_t io_pgroup =
- { TOPO_PGROUP_IO, TOPO_STABILITY_PRIVATE, TOPO_STABILITY_PRIVATE, 1 };
-
-/*ARGSUSED*/
-void
-_topo_init(topo_mod_t *mod, topo_version_t version)
-{
- /*
- * Turn on module debugging output
- */
- if (getenv("TOPONIUDBG") != NULL)
- topo_mod_setdebug(mod);
- topo_mod_dprintf(mod, "initializing niu enumerator\n");
-
- if (topo_mod_register(mod, &niu_info, TOPO_VERSION) < 0) {
- topo_mod_dprintf(mod, "niu registration failed: %s\n",
- topo_mod_errmsg(mod));
- return; /* mod errno already set */
- }
- topo_mod_dprintf(mod, "NIU enumr initd\n");
-}
-
-void
-_topo_fini(topo_mod_t *mod)
-{
- topo_mod_unregister(mod);
-}
-static int
-devprop_set(tnode_t *tn, di_node_t dn,
- const char *tpgrp, const char *tpnm, topo_mod_t *mod)
-{
- char *path;
- int err, e;
-
- if ((path = di_devfs_path(dn)) == NULL) {
- topo_mod_dprintf(mod, "NULL di_devfs_path.\n");
- return (topo_mod_seterrno(mod, ETOPO_PROP_NOENT));
- }
- e = topo_prop_set_string(tn, tpgrp, tpnm, TOPO_PROP_IMMUTABLE,
- path, &err);
- di_devfs_path_free(path);
- if (e != 0)
- return (topo_mod_seterrno(mod, err));
- return (0);
-}
-/*ARGSUSED*/
-static int
-driverprop_set(tnode_t *tn, di_node_t dn,
- const char *tpgrp, const char *tpnm, topo_mod_t *mod)
-{
- char *dnm;
- int err;
-
- if ((dnm = di_driver_name(dn)) == NULL)
- return (0);
- if (topo_prop_set_string(tn,
- tpgrp, tpnm, TOPO_PROP_IMMUTABLE, dnm, &err) < 0)
- return (topo_mod_seterrno(mod, err));
- return (0);
-}
-/*ARGSUSED*/
-static int
-moduleprop_set(tnode_t *tn, di_node_t dn,
- const char *tpgrp, const char *tpnm, topo_mod_t *mod)
-{
- nvlist_t *module;
- char *dnm;
- int err;
-
- if ((dnm = di_driver_name(dn)) == NULL)
- return (0);
-
- if ((module = topo_mod_modfmri(mod, FM_MOD_SCHEME_VERSION, dnm))
- == NULL)
- return (0); /* driver maybe detached, return success */
-
- if (topo_prop_set_fmri(tn, tpgrp, tpnm, TOPO_PROP_IMMUTABLE, module,
- &err) < 0) {
- nvlist_free(module);
- return (topo_mod_seterrno(mod, err));
- }
- nvlist_free(module);
- return (0);
-}
-static tnode_t *
-niu_tnode_create(topo_mod_t *mod, tnode_t *parent,
- const char *name, topo_instance_t i, void *priv)
-{
- int err;
- nvlist_t *fmri;
- tnode_t *ntn;
- nvlist_t *auth = topo_mod_auth(mod, parent);
-
- fmri = topo_mod_hcfmri(mod, parent, FM_HC_SCHEME_VERSION, name, i,
- NULL, auth, NULL, NULL, NULL);
- nvlist_free(auth);
-
- if (fmri == NULL) {
- topo_mod_dprintf(mod,
- "Unable to make nvlist for %s bind: %s.\n",
- name, topo_mod_errmsg(mod));
- return (NULL);
- }
-
- ntn = topo_node_bind(mod, parent, name, i, fmri);
- if (ntn == NULL) {
- topo_mod_dprintf(mod,
- "topo_node_bind (%s%d/%s%d) failed: %s\n",
- topo_node_name(parent), topo_node_instance(parent),
- name, i,
- topo_strerror(topo_mod_errno(mod)));
- nvlist_free(fmri);
- return (NULL);
- }
- nvlist_free(fmri);
- topo_node_setspecific(ntn, priv);
-
- if (topo_pgroup_create(ntn, &io_pgroup, &err) == 0) {
- (void) devprop_set(ntn, priv, TOPO_PGROUP_IO, TOPO_IO_DEV, mod);
- (void) driverprop_set(ntn, priv, TOPO_PGROUP_IO, TOPO_IO_DRIVER,
- mod);
- (void) moduleprop_set(ntn, priv, TOPO_PGROUP_IO, TOPO_IO_MODULE,
- mod);
- }
- return (ntn);
-}
-static int
-niu_asru_set(tnode_t *tn, di_node_t dn, topo_mod_t *mod)
-{
- char *path;
- nvlist_t *fmri;
- int e;
-
- if ((path = di_devfs_path(dn)) != NULL) {
- fmri = topo_mod_devfmri(mod, FM_DEV_SCHEME_VERSION, path, NULL);
- if (fmri == NULL) {
- topo_mod_dprintf(mod,
- "dev:///%s fmri creation failed.\n", path);
- di_devfs_path_free(path);
- return (-1);
- }
- di_devfs_path_free(path);
- } else {
- topo_mod_dprintf(mod, "NULL di_devfs_path.\n");
- if (topo_prop_get_fmri(tn, TOPO_PGROUP_PROTOCOL,
- TOPO_PROP_RESOURCE, &fmri, &e) < 0)
- return (topo_mod_seterrno(mod, e));
- }
- if (topo_node_asru_set(tn, fmri, 0, &e) < 0) {
- nvlist_free(fmri);
- return (topo_mod_seterrno(mod, e));
- }
- nvlist_free(fmri);
- return (0);
-}
-
-/*ARGSUSED*/
-static tnode_t *
-niu_declare(tnode_t *parent, const char *name, topo_instance_t i,
- void *priv, topo_mod_t *mod)
-{
- tnode_t *ntn;
- int err;
-
- if ((ntn = niu_tnode_create(mod, parent, name, 0, priv)) == NULL) {
- topo_mod_dprintf(mod, "%s ntn = NULL\n", name);
- return (NULL);
- }
-
- /* inherit FRU from parent */
- (void) topo_node_fru_set(ntn, NULL, 0, &err);
- /* inherit parent's label */
- if (topo_node_label_set(ntn, NULL, &err) < 0) {
- topo_mod_dprintf(mod, "niu label error %d\n", err);
- }
- /* set ASRU */
- (void) niu_asru_set(ntn, priv, mod);
-
- return (ntn);
-}
-
-
-/*ARGSUSED*/
-static tnode_t *
-niufn_declare(tnode_t *parent, const char *name, topo_instance_t i,
- void *priv, topo_mod_t *mod)
-{
- tnode_t *ntn;
- int err;
-
- if ((ntn = niu_tnode_create(mod, parent, name, i, priv)) == NULL)
- return (NULL);
-
- /* inherit FRU from parent */
- (void) topo_node_fru_set(ntn, NULL, 0, &err);
- /* inherit parent's label */
- (void) topo_node_label_set(ntn, NULL, &err);
-
- /* set ASRU */
- (void) niu_asru_set(ntn, priv, mod);
-
- if (topo_node_range_create(mod, ntn, XAUI, 0, XAUI_MAX) < 0) {
- topo_node_unbind(ntn);
- topo_mod_dprintf(mod, "child_range_add of XAUI"
- "failed: %s\n",
- topo_strerror(topo_mod_errno(mod)));
- return (NULL); /* mod_errno already set */
- }
- return (ntn);
-}
-
-/*
- * Get the NIU/Neptune ethernet function number from the reg property
- */
-static int
-niufn_instance_get(topo_mod_t *mod, di_node_t node, topo_instance_t *inst)
-{
- di_prom_handle_t phan;
- int rval, *intp;
-
- *inst = (topo_instance_t)0;
- rval = -1;
- if ((phan = topo_mod_prominfo(mod)) != DI_PROM_HANDLE_NIL) {
- rval = di_prom_prop_lookup_ints(phan, node,
- DI_PROP_REG, &intp);
- }
- if (rval < 0) {
- rval = di_prop_lookup_ints(DDI_DEV_T_ANY, node,
- DI_PROP_REG, &intp);
- if (rval < 0)
- return (-1);
- }
- *inst = (topo_instance_t)intp[0];
-
- return (0);
-}
-
-static int
-niufn_instantiate(tnode_t *parent, const char *name, di_node_t pnode,
- topo_mod_t *mod)
-{
- di_node_t sib;
- tnode_t *ntn;
- topo_instance_t inst;
-
- if (strcmp(name, NIUFN) != 0) {
- topo_mod_dprintf(mod,
- "Currently only know how to enumerate %s components.\n",
- NIUFN);
- return (0);
- }
-
- sib = di_child_node(pnode);
- while (sib != DI_NODE_NIL) {
- if (niufn_instance_get(mod, sib, &inst) != 0) {
- topo_mod_dprintf(mod, "Enumeration of %s "
- "instance failed.\n", NIUFN);
- sib = di_sibling_node(sib);
- continue;
- }
- if ((ntn = niufn_declare(parent, NIUFN, inst, sib, mod))
- == NULL) {
- topo_mod_dprintf(mod, "Enumeration of %s=%d "
- "failed: %s\n", NIUFN, inst,
- topo_strerror(topo_mod_errno(mod)));
- return (-1);
- }
- if (topo_mod_enumerate(mod,
- ntn, XAUI, XAUI, inst, inst, sib) != 0) {
- return (topo_mod_seterrno(mod, EMOD_PARTIAL_ENUM));
- }
- sib = di_sibling_node(sib);
- }
- return (0);
-}
-
-static topo_mod_t *
-xaui_enum_load(topo_mod_t *mp)
-{
- topo_mod_t *rp = NULL;
-
- if ((rp = topo_mod_load(mp, XAUI, TOPO_VERSION)) == NULL) {
- topo_mod_dprintf(mp,
- "%s enumerator could not load %s enum.\n", NIU, XAUI);
- }
- return (rp);
-}
-/*ARGSUSED*/
-static int
-niu_enum(topo_mod_t *mod, tnode_t *rnode, const char *name,
- topo_instance_t min, topo_instance_t max, void *arg, void *notused)
-{
- tnode_t *niun;
- di_node_t devtree;
- di_node_t dnode;
-
- if (strcmp(name, NIU) != 0) {
- topo_mod_dprintf(mod,
- "Currently only know how to enumerate %s components.\n",
- NIU);
- return (0);
- }
-
- if ((devtree = topo_mod_devinfo(mod)) == DI_NODE_NIL) {
- topo_mod_dprintf(mod, "devinfo init failed.");
- return (-1);
- }
-
- /*
- * Load XAUI Enum
- */
- if (xaui_enum_load(mod) == NULL)
- return (-1);
-
- dnode = di_drv_first_node("niumx", devtree);
- if (dnode != DI_NODE_NIL) {
- niun = niu_declare(rnode, name, 0, dnode, mod);
- if (niun == NULL) {
- topo_mod_dprintf(mod, "Enumeration of niu failed: %s\n",
- topo_strerror(topo_mod_errno(mod)));
- return (-1); /* mod_errno already set */
- }
- if (topo_node_range_create(mod, niun, NIUFN,
- 0, NIUFN_MAX) < 0) {
- topo_node_unbind(niun);
- topo_mod_dprintf(mod, "child_range_add of NIUFN"
- "failed: %s\n",
- topo_strerror(topo_mod_errno(mod)));
- return (-1); /* mod_errno already set */
- }
- if (niufn_instantiate(niun, NIUFN, dnode, mod) < 0) {
- topo_mod_dprintf(mod, "Enumeration of niufn "
- "failed %s\n",
- topo_strerror(topo_mod_errno(mod)));
- }
- }
- if (di_drv_next_node(dnode) != DI_NODE_NIL)
- topo_mod_dprintf(mod,
- "Currently only know how to enumerate one niu "
- "components.\n");
-
- return (0);
-}
diff --git a/usr/src/lib/fm/topo/modules/sun4v/pcibus/Makefile b/usr/src/lib/fm/topo/modules/sun4v/pcibus/Makefile
deleted file mode 100644
index 1e5ab250df..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/pcibus/Makefile
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-#
-
-ARCH = sun4v
-include ../../sun4/pcibus/Makefile.pci
-
-LDLIBS += -ldevinfo
diff --git a/usr/src/lib/fm/topo/modules/sun4v/pcibus/pci_sun4v.c b/usr/src/lib/fm/topo/modules/sun4v/pcibus/pci_sun4v.c
deleted file mode 100644
index 9eea771ed0..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/pcibus/pci_sun4v.c
+++ /dev/null
@@ -1,263 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2010 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#include <fm/topo_mod.h>
-#include <sys/fm/protocol.h>
-#include <string.h>
-#include <alloca.h>
-#include <libdevinfo.h>
-#include <did_props.h>
-
-/*
- * Including the following file gives us definitions of the three
- * global arrays used to adjust labels, Slot_Rewrites, Physlot_Names,
- * and Missing_Names. With those defined we can use the common labeling
- * routines for pci.
- */
-#include "pci_sun4v.h"
-#include "pci_sun4.h"
-
-#define PI_PROP_CHASSIS_LOCATION_NAME "chassis-location-name"
-
-typedef struct _pci_fru {
- tnode_t *node;
- char *location;
- int locsiz;
-} _pci_fru_t;
-
-
-static int platform_pci_fru_location(topo_mod_t *, tnode_t *, uchar_t *, int);
-static int platform_pci_fru_cb(topo_mod_t *, tnode_t *, void *);
-
-
-int
-platform_pci_label(topo_mod_t *mod, tnode_t *node, nvlist_t *in,
- nvlist_t **out)
-{
- int result;
- int err;
- int locsiz = 0;
- uchar_t *loc = NULL;
- char *nac = NULL;
-
- topo_mod_dprintf(mod, "entering platform_pci_label\n");
-
- *out = NULL;
- result = di_bytes_get(mod, topo_node_getspecific(node),
- PI_PROP_CHASSIS_LOCATION_NAME, &locsiz, &loc);
- if (result == -1 || locsiz < 0) {
- topo_mod_dprintf(mod, "platform_pci_label: %s not found (%s)\n",
- PI_PROP_CHASSIS_LOCATION_NAME, strerror(errno));
-
- /* Invoke the generic label generator for this node */
- return (pci_label_cmn(mod, node, in, out));
- }
-
- /*
- * We have crossed a FRU boundary. Use the value in the
- * chassis-location-name property as the node label.
- */
- nac = alloca(locsiz+1);
- (void) memset(nac, 0, locsiz+1);
- (void) memcpy(nac, loc, locsiz);
- result = topo_node_label_set(node, nac, &err);
- if (result < 0) {
- if (err != ETOPO_PROP_NOENT) {
- return (topo_mod_seterrno(mod, err));
- }
- }
-
- return (0);
-}
-
-
-int
-platform_pci_fru(topo_mod_t *mod, tnode_t *node, nvlist_t *in,
- nvlist_t **out)
-{
- int err = 0;
- uint64_t ptr;
- did_t *dp, *pdp;
- tnode_t *pnode;
- char *nm, *plat, *pp, **cp;
- char *label;
- int found_t1plat = 0;
- uchar_t *loc;
- int locsiz;
-
- topo_mod_dprintf(mod, "entering platform_pci_fru\n");
-
- if (topo_prop_get_string(node, FM_FMRI_AUTHORITY,
- FM_FMRI_AUTH_PRODUCT, &plat, &err) < 0) {
- (void) topo_mod_seterrno(mod, err);
- return (-1);
- }
- /* Delete the "SUNW," */
- pp = strchr(plat, ',');
- if (pp == NULL)
- pp = plat;
- else
- ++pp;
-
- /* Is this an UltraSPARC-T1 platform? */
- cp = usT1_plats;
- while ((*cp != NULL) && (found_t1plat == 0)) {
- if (strcmp(pp, *cp) == 0)
- found_t1plat = 1;
- cp++;
- }
-
- topo_mod_strfree(mod, plat);
-
- /*
- * On UltraSPARC-T1 systems, use the legacy hc scheme on
- * the adapter slots to ensure ALOM on the SP can interpret
- * the FRU correctly. For everything else, follow the normal
- * code flow
- */
- if (found_t1plat) {
- *out = NULL;
- nm = topo_node_name(node);
- if (strcmp(nm, PCI_DEVICE) != 0 &&
- strcmp(nm, PCIEX_DEVICE) != 0 &&
- strcmp(nm, PCIEX_BUS) != 0)
- return (0);
-
- if (nvlist_lookup_uint64(in, "nv1", &ptr) != 0) {
- topo_mod_dprintf(mod, "label method argument "
- "not found.\n");
- return (-1);
- }
- dp = (did_t *)(uintptr_t)ptr;
- pnode = did_gettnode(dp);
- pdp = did_find(mod, topo_node_getspecific(pnode));
-
- /*
- * Is there a slotname associated with the device?
- */
- if ((label = pci_slot_label_lookup(mod, pnode, dp, pdp))
- != NULL) {
- nvlist_t *rnvl;
- char buf[PATH_MAX];
-
- (void) snprintf(buf, PATH_MAX, "hc:///component=%s",
- label);
- if (topo_mod_str2nvl(mod, buf, &rnvl) < 0)
- return (-1);
- *out = rnvl;
- }
- return (0);
- } else if (di_bytes_get(mod, topo_node_getspecific(node),
- PI_PROP_CHASSIS_LOCATION_NAME, &locsiz, &loc) == 0 && locsiz > 0) {
- /*
- * We have crossed a FRU boundary and need to find the parent
- * node with this location and set our FMRI to that value.
- */
- return (platform_pci_fru_location(mod, node, loc, locsiz));
- } else {
- return (pci_fru_compute(mod, node, in, out));
- }
-}
-
-
-static int
-platform_pci_fru_location(topo_mod_t *mod, tnode_t *node, uchar_t *loc,
- int locsiz)
-{
- int err;
- tnode_t *parent;
- tnode_t *top;
- topo_walk_t *wp;
- _pci_fru_t walkdata;
-
- topo_mod_dprintf(mod, "entering platform_pci_fru_location\n");
-
- /* Find the root node */
- top = node;
- while ((parent = topo_node_parent(top)) != NULL) {
- top = parent;
- }
- walkdata.node = node;
- walkdata.locsiz = locsiz;
- walkdata.location = alloca(locsiz+1);
- (void) memset(walkdata.location, 0, locsiz+1);
- (void) memcpy(walkdata.location, loc, locsiz);
-
- /* Create a walker starting at the root node */
- wp = topo_mod_walk_init(mod, top, platform_pci_fru_cb, &walkdata, &err);
- if (wp == NULL) {
- return (topo_mod_seterrno(mod, err));
- }
-
- /*
- * Walk the tree breadth first to hopefully avoid visiting too many
- * nodes while searching for the node with the appropriate FMRI.
- */
- (void) topo_walk_step(wp, TOPO_WALK_SIBLING);
- topo_walk_fini(wp);
-
- return (0);
-}
-
-
-static int
-platform_pci_fru_cb(topo_mod_t *mod, tnode_t *node, void *private)
-{
- int err;
- _pci_fru_t *walkdata = (_pci_fru_t *)private;
- nvlist_t *fmri;
- char *location;
- int result, rc;
-
- if (node == walkdata->node) {
- /* This is the starting node. Do not check the location */
- return (TOPO_WALK_NEXT);
- }
-
- if (topo_node_label(node, &location, &err) != 0) {
- /* This node has no location property. Continue the walk */
- return (TOPO_WALK_NEXT);
- }
-
- result = TOPO_WALK_NEXT;
- if (strncmp(location, walkdata->location, walkdata->locsiz) == 0) {
- /*
- * We have a match. Set the node's FRU FMRI to this nodes
- * FRU FMRI
- */
- rc = topo_node_fru(node, &fmri, NULL, &err);
- if (rc == 0) {
- rc = topo_node_fru_set(walkdata->node, fmri, 0, &err);
- nvlist_free(fmri);
- }
- if (rc != 0) {
- result = TOPO_WALK_TERMINATE;
- (void) topo_mod_seterrno(mod, err);
- }
- }
- topo_mod_strfree(mod, location);
- return (result);
-}
diff --git a/usr/src/lib/fm/topo/modules/sun4v/pcibus/pci_sun4v.h b/usr/src/lib/fm/topo/modules/sun4v/pcibus/pci_sun4v.h
deleted file mode 100644
index 96d00fe7f8..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/pcibus/pci_sun4v.h
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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.
- */
-
-#ifndef _PCI_SUN4V_H
-#define _PCI_SUN4V_H
-
-#include "pcibus_labels.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Data for label lookup based on physical slot number.
- *
- * Platforms may need entries here if the PCIe slot labels
- * provided by firmware are missing or are incorrect.
- */
-
-physnm_t t200_pnms[] = {
- /* Slot #, Label */
- { 224, "PCIE0" },
- { 225, "PCIE1" },
- { 226, "PCIE2" }
-};
-
-physnm_t t5120_pnms[] = {
- /* Slot #, Label */
- { 0, "MB/RISER0/PCIE0" },
- { 1, "MB/RISER1/PCIE1" },
- { 2, "MB/RISER2/PCIE2" }
-};
-
-physnm_t t5220_pnms[] = {
- /* Slot #, Label */
- { 0, "MB/RISER0/PCIE0" },
- { 1, "MB/RISER1/PCIE1" },
- { 2, "MB/RISER2/PCIE2" },
- { 3, "MB/RISER0/PCIE3" },
- { 4, "MB/RISER1/PCIE4" },
- { 5, "MB/RISER2/PCIE5" }
-};
-
-physnm_t usbrdt5240_pnms[] = {
- /* Slot #, Label */
- { 0, "MB/RISER0/EM0" },
- { 1, "MB/RISER0/EM1" },
- { 2, "MB/RISER1/EM2" },
- { 3, "MB/RISER1/EM3" }
-};
-
-physnm_t netra_t5220_pnms[] = {
- /* Slot #, Label */
- { 0, "MB/RISER0/PCIE0" },
- { 1, "MB/RISER1/PCIE1" },
- { 2, "MB/RISER2/PCIE2" },
- { 3, "MB/PCI_MEZZ/PCIX3" },
- { 4, "MB/PCI_MEZZ/PCIX4" },
- { 5, "MB/PCI_MEZZ/PCIE5" }
-};
-
-physnm_t netra_t5440_pnms[] = {
- /* Slot #, Label */
- { 0, "MB/PCI_AUX/PCIX0" },
- { 1, "MB/PCI_AUX/PCIX1" },
- { 2, "MB/PCI_AUX/PCIE2" },
- { 3, "MB/PCI_AUX/PCIE3" },
- { 4, "MB/PCI_MEZZ/XAUI4" },
- { 5, "MB/PCI_MEZZ/XAUI5" },
- { 6, "MB/PCI_MEZZ/PCIE6" },
- { 7, "MB/PCI_MEZZ/PCIE7" },
- { 8, "MB/PCI_MEZZ/PCIE8" },
- { 9, "MB/PCI_MEZZ/PCIE9" }
-};
-
-physnm_t t5440_pnms[] = {
- /* Slot #, Label */
- { 0, "MB/PCIE0" },
- { 1, "MB/PCIE1" },
- { 2, "MB/PCIE2" },
- { 3, "MB/PCIE3" },
- { 4, "MB/PCIE4" },
- { 5, "MB/PCIE5" },
- { 6, "MB/PCIE6" },
- { 7, "MB/PCIE7" }
-};
-
-physnm_t blade_t6340_pnms[] = {
- /* Slot #, Label */
- { 0, "SYS/EM0" },
- { 1, "SYS/EM1" }
-};
-
-pphysnm_t plat_pnames[] = {
- { "Sun-Fire-T200",
- sizeof (t200_pnms) / sizeof (physnm_t),
- t200_pnms },
- { "SPARC-Enterprise-T5120",
- sizeof (t5120_pnms) / sizeof (physnm_t),
- t5120_pnms },
- { "SPARC-Enterprise-T5220",
- sizeof (t5220_pnms) / sizeof (physnm_t),
- t5220_pnms },
- /*
- * T5140/T5240 uses the same chassis as T5120/T5220, hence
- * the same PCI slot mappings
- */
- { "T5140",
- sizeof (t5120_pnms) / sizeof (physnm_t),
- t5120_pnms },
- { "T5240",
- sizeof (t5220_pnms) / sizeof (physnm_t),
- t5220_pnms },
- { "T5440",
- sizeof (t5440_pnms) / sizeof (physnm_t),
- t5440_pnms },
- { "USBRDT-5240",
- sizeof (usbrdt5240_pnms) / sizeof (physnm_t),
- usbrdt5240_pnms },
- { "Netra-T5220",
- sizeof (netra_t5220_pnms) / sizeof (physnm_t),
- netra_t5220_pnms },
- { "Netra-T5440",
- sizeof (netra_t5440_pnms) / sizeof (physnm_t),
- netra_t5440_pnms },
- { "Sun-Blade-T6340",
- sizeof (blade_t6340_pnms) / sizeof (physnm_t),
- blade_t6340_pnms }
-};
-
-physlot_names_t PhyslotNMs = {
- sizeof (plat_pnames) / sizeof (pphysnm_t),
- plat_pnames
-};
-
-/*
- * Data for label lookup based on device info.
- *
- * Platforms need entries here if there is no physical slot number
- * (i.e. pci), and slot labels provided by firmware are missing.
- */
-
-devlab_t t200_missing[] = {
- /* board, bridge, root-complex, bus, dev, label, test func */
- { 0, 0, 1 - TO_PCI, 6, 1, "PCIX1", NULL },
- { 0, 0, 1 - TO_PCI, 6, 2, "PCIX0", NULL }
-};
-
-pdevlabs_t plats_missing[] = {
- { "Sun-Fire-T200",
- sizeof (t200_missing) / sizeof (devlab_t),
- t200_missing },
-};
-
-missing_names_t Missing = {
- sizeof (plats_missing) / sizeof (pdevlabs_t),
- plats_missing
-};
-
-char *usT1_plats[] = {
- "Sun-Fire-T200",
- "Netra-T2000",
- "SPARC-Enterprise-T1000",
- "SPARC-Enterprise-T2000",
- "Sun-Fire-T1000",
- "Netra-CP3060",
- "Sun-Blade-T6300",
- NULL
-};
-
-slotnm_rewrite_t *Slot_Rewrites = NULL;
-physlot_names_t *Physlot_Names = &PhyslotNMs;
-missing_names_t *Missing_Names = &Missing;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _PCI_SUN4V_H */
diff --git a/usr/src/lib/fm/topo/modules/sun4v/platform-cpu/Makefile b/usr/src/lib/fm/topo/modules/sun4v/platform-cpu/Makefile
deleted file mode 100644
index ca0a62b72b..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/platform-cpu/Makefile
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2007 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-MODULE = platform-cpu
-ARCH = sun4v
-CLASS = arch
-
-MODULESRCS = cpu.c cpu_mdesc.c
-
-include ../../Makefile.plugin
-
-CPPFLAGS += -I$(ROOT)/usr/platform/sun4v/include
-LDLIBS += -lumem -lmdesc -lldom
diff --git a/usr/src/lib/fm/topo/modules/sun4v/platform-cpu/cpu.c b/usr/src/lib/fm/topo/modules/sun4v/platform-cpu/cpu.c
deleted file mode 100644
index 9b942cc4ed..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/platform-cpu/cpu.c
+++ /dev/null
@@ -1,523 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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.
- */
-
-#include <strings.h>
-#include <umem.h>
-#include <fm/topo_mod.h>
-#include <fm/fmd_fmri.h>
-#include <sys/fm/ldom.h>
-#include <sys/fm/protocol.h>
-
-#include <cpu_mdesc.h>
-
-/*
- * This enumerator creates cpu-schemed nodes for each strand found in the
- * sun4v Physical Rource Inventory (PRI).
- * Each node export four methods present(), expand() replaced() and unusable().
- *
- */
-
-#define PLATFORM_CPU_NAME "platform-cpu"
-#define PLATFORM_CPU_VERSION TOPO_VERSION
-#define CPU_NODE_NAME "cpu"
-
-
-/* Forward declaration */
-static int cpu_enum(topo_mod_t *, tnode_t *, const char *, topo_instance_t,
- topo_instance_t, void *, void *);
-static void cpu_release(topo_mod_t *, tnode_t *);
-static int cpu_present(topo_mod_t *, tnode_t *, topo_version_t, nvlist_t *,
- nvlist_t **);
-static int cpu_replaced(topo_mod_t *, tnode_t *, topo_version_t, nvlist_t *,
- nvlist_t **);
-static int cpu_expand(topo_mod_t *, tnode_t *, topo_version_t, nvlist_t *,
- nvlist_t **);
-static int cpu_unusable(topo_mod_t *, tnode_t *, topo_version_t, nvlist_t *,
- nvlist_t **);
-
-static const topo_modops_t cpu_ops =
- { cpu_enum, cpu_release };
-static const topo_modinfo_t cpu_info =
- { PLATFORM_CPU_NAME, FM_FMRI_SCHEME_CPU, PLATFORM_CPU_VERSION,
- &cpu_ops };
-
-static const topo_method_t cpu_methods[] = {
- { TOPO_METH_PRESENT, TOPO_METH_PRESENT_DESC,
- TOPO_METH_PRESENT_VERSION, TOPO_STABILITY_INTERNAL, cpu_present },
- { TOPO_METH_REPLACED, TOPO_METH_REPLACED_DESC,
- TOPO_METH_REPLACED_VERSION, TOPO_STABILITY_INTERNAL, cpu_replaced },
- { TOPO_METH_EXPAND, TOPO_METH_EXPAND_DESC,
- TOPO_METH_EXPAND_VERSION, TOPO_STABILITY_INTERNAL, cpu_expand },
- { TOPO_METH_UNUSABLE, TOPO_METH_UNUSABLE_DESC,
- TOPO_METH_UNUSABLE_VERSION, TOPO_STABILITY_INTERNAL, cpu_unusable },
- { NULL }
-};
-
-static void *
-cpu_alloc(size_t size)
-{
- return (umem_alloc(size, UMEM_DEFAULT));
-}
-
-static void
-cpu_free(void *data, size_t size)
-{
- umem_free(data, size);
-}
-
-static int
-cpu_read_serial(nvlist_t *in, uint64_t *serial)
-{
- uint8_t version;
- uint64_t int_serial;
- char *str_serial, *end;
- int rc = 0;
-
- if (nvlist_lookup_uint8(in, FM_VERSION, &version) != 0)
- return (1);
-
- if (version == CPU_SCHEME_VERSION0) {
- if ((rc = nvlist_lookup_uint64(in, FM_FMRI_CPU_SERIAL_ID,
- &int_serial)) == 0) {
- *serial = int_serial;
- }
- } else {
- if ((rc = nvlist_lookup_string(in, FM_FMRI_CPU_SERIAL_ID,
- &str_serial)) == 0) {
- *serial = (uint64_t)strtoull(str_serial, &end, 16);
- if (str_serial == end)
- rc = 1;
- }
- }
- return (rc);
-}
-
-int
-_topo_init(topo_mod_t *mod)
-{
- md_info_t *chip;
-
- if (getenv("TOPOPLATFORMCPUDBG"))
- topo_mod_setdebug(mod);
- topo_mod_dprintf(mod, "initializing %s enumerator\n",
- PLATFORM_CPU_NAME);
-
- if ((chip = topo_mod_zalloc(mod, sizeof (md_info_t))) == NULL)
- return (-1);
-
- if (cpu_mdesc_init(mod, chip) != 0) {
- topo_mod_dprintf(mod, "failed to get cpus from the PRI/MD\n");
- topo_mod_free(mod, chip, sizeof (md_info_t));
- return (-1);
- }
-
- topo_mod_setspecific(mod, (void *)chip);
-
- if (topo_mod_register(mod, &cpu_info, TOPO_VERSION) != 0) {
- topo_mod_dprintf(mod, "failed to register %s: %s\n",
- PLATFORM_CPU_NAME, topo_mod_errmsg(mod));
- cpu_mdesc_fini(mod, chip);
- topo_mod_free(mod, chip, sizeof (md_info_t));
- return (-1);
- }
-
- topo_mod_dprintf(mod, "%s enumerator inited\n", PLATFORM_CPU_NAME);
-
- return (0);
-}
-
-void
-_topo_fini(topo_mod_t *mod)
-{
- md_info_t *chip;
-
- chip = (md_info_t *)topo_mod_getspecific(mod);
-
- cpu_mdesc_fini(mod, chip);
-
- topo_mod_free(mod, chip, sizeof (md_info_t));
-
- topo_mod_unregister(mod);
-
-}
-
-/*ARGSUSED*/
-static int
-cpu_present(topo_mod_t *mod, tnode_t *node, topo_version_t vers,
- nvlist_t *in, nvlist_t **out)
-{
- uint8_t version;
- uint32_t cpuid;
- uint64_t nvlserid;
- uint32_t present = 0;
- md_cpumap_t *mcmp;
- md_info_t *chip = (md_info_t *)topo_mod_getspecific(mod);
-
- /*
- * Get the physical cpuid
- */
- if (nvlist_lookup_uint8(in, FM_VERSION, &version) != 0 ||
- version > FM_CPU_SCHEME_VERSION ||
- nvlist_lookup_uint32(in, FM_FMRI_CPU_ID, &cpuid) != 0) {
- return (topo_mod_seterrno(mod, EMOD_NVL_INVAL));
- }
-
- /*
- * Find the cpuid entry
- * If the input nvl contains a serial number, the cpu is identified
- * by a tuple <cpuid, cpuserial>
- * Otherwise, the cpu is identified by the <cpuid>.
- */
- if ((mcmp = cpu_find_cpumap(chip, cpuid)) != NULL) {
- if (cpu_read_serial(in, &nvlserid) == 0)
- present = nvlserid == mcmp->cpumap_serialno;
- else
- present = 1;
- }
-
- /* return the present status */
- if (topo_mod_nvalloc(mod, out, NV_UNIQUE_NAME) != 0)
- return (topo_mod_seterrno(mod, EMOD_NVL_INVAL));
- if (nvlist_add_uint32(*out, TOPO_METH_PRESENT_RET, present) != 0) {
- nvlist_free(*out);
- return (topo_mod_seterrno(mod, EMOD_NVL_INVAL));
- }
-
- return (0);
-}
-
-/*ARGSUSED*/
-static int
-cpu_replaced(topo_mod_t *mod, tnode_t *node, topo_version_t vers,
- nvlist_t *in, nvlist_t **out)
-{
- uint8_t version;
- uint32_t cpuid;
- uint64_t nvlserid;
- uint32_t rval = FMD_OBJ_STATE_NOT_PRESENT;
- md_cpumap_t *mcmp;
- md_info_t *chip = (md_info_t *)topo_mod_getspecific(mod);
-
- /*
- * Get the physical cpuid
- */
- if (nvlist_lookup_uint8(in, FM_VERSION, &version) != 0 ||
- version > FM_CPU_SCHEME_VERSION ||
- nvlist_lookup_uint32(in, FM_FMRI_CPU_ID, &cpuid) != 0) {
- return (topo_mod_seterrno(mod, EMOD_NVL_INVAL));
- }
-
- /*
- * Find the cpuid entry
- * If the input nvl contains a serial number, the cpu is identified
- * by a tuple <cpuid, cpuserial>
- * Otherwise, the cpu is identified by the <cpuid>.
- */
- if ((mcmp = cpu_find_cpumap(chip, cpuid)) != NULL) {
- if (cpu_read_serial(in, &nvlserid) == 0)
- rval = (nvlserid == mcmp->cpumap_serialno) ?
- FMD_OBJ_STATE_STILL_PRESENT :
- FMD_OBJ_STATE_REPLACED;
- else
- rval = FMD_OBJ_STATE_UNKNOWN;
- }
-
- /* return the replaced status */
- if (topo_mod_nvalloc(mod, out, NV_UNIQUE_NAME) != 0)
- return (topo_mod_seterrno(mod, EMOD_NVL_INVAL));
- if (nvlist_add_uint32(*out, TOPO_METH_REPLACED_RET, rval) != 0) {
- nvlist_free(*out);
- return (topo_mod_seterrno(mod, EMOD_NVL_INVAL));
- }
-
- return (0);
-}
-
-/*ARGSUSED*/
-static int
-cpu_expand(topo_mod_t *mod, tnode_t *node, topo_version_t vers,
- nvlist_t *in, nvlist_t **out)
-{
- int rc;
- uint8_t version;
- uint32_t cpuid;
- uint64_t nvlserid;
- md_cpumap_t *mcmp = NULL;
- md_info_t *chip = (md_info_t *)topo_mod_getspecific(mod);
-
- if (nvlist_lookup_uint8(in, FM_VERSION, &version) != 0 ||
- version > FM_CPU_SCHEME_VERSION ||
- nvlist_lookup_uint32(in, FM_FMRI_CPU_ID, &cpuid) != 0) {
- return (topo_mod_seterrno(mod, EMOD_NVL_INVAL));
- }
-
- /* Find the cpuid entry */
- if ((mcmp = cpu_find_cpumap(chip, cpuid)) == NULL)
- return (-1);
-
- if ((rc = cpu_read_serial(in, &nvlserid)) == 0) {
- if (nvlserid != mcmp->cpumap_serialno)
- return (-1);
- } else if (rc != ENOENT)
- return (topo_mod_seterrno(mod, EMOD_NVL_INVAL));
- else {
- if ((rc = nvlist_add_uint64(in, FM_FMRI_CPU_SERIAL_ID,
- mcmp->cpumap_serialno)) != 0) {
- return (topo_mod_seterrno(mod, rc));
- }
- }
-
- topo_mod_dprintf(mod, "nvlserid=%llX\n", nvlserid);
-
- if (mcmp != NULL &&
- mcmp->cpumap_chipidx >= 0 &&
- mcmp->cpumap_chipidx < chip->nprocs &&
- chip->procs &&
- chip->procs[mcmp->cpumap_chipidx].fru) {
- int len;
- char *str;
- md_fru_t *frup = chip->procs[mcmp->cpumap_chipidx].fru;
-
- /* part number + dash number */
- len = (frup->part ? strlen(frup->part) : 0) +
- (frup->dash ? strlen(frup->dash) : 0) + 1;
- str = cpu_alloc(len);
- (void) snprintf(str, len, "%s%s",
- frup->part ? frup->part : MD_STR_BLANK,
- frup->dash ? frup->dash : MD_STR_BLANK);
- (void) nvlist_add_string(in, FM_FMRI_HC_PART, str);
- cpu_free(str, len);
-
- /* fru name */
- (void) nvlist_add_string(in, FM_FMRI_CPU_CPUFRU,
- frup->nac ? frup->nac : MD_STR_BLANK);
-
- /* fru serial */
- in->nvl_nvflag = NV_UNIQUE_NAME_TYPE;
- (void) nvlist_add_string(in, FM_FMRI_HC_SERIAL_ID,
- frup->serial ? frup->serial : MD_STR_BLANK);
- }
-
- return (0);
-}
-
-/*ARGSUSED*/
-static int
-cpu_unusable(topo_mod_t *mod, tnode_t *node, topo_version_t vers,
- nvlist_t *in, nvlist_t **out)
-{
- int rc = -1;
- uint8_t version;
- int status;
- uint32_t cpuid;
- ldom_hdl_t *lhp;
- uint64_t nvlserid;
- uint32_t present = 0;
- md_cpumap_t *mcmp;
- md_info_t *chip = (md_info_t *)topo_mod_getspecific(mod);
- uint32_t type = 0;
-
- if (nvlist_lookup_uint8(in, FM_VERSION, &version) != 0 ||
- version > FM_CPU_SCHEME_VERSION ||
- nvlist_lookup_uint32(in, FM_FMRI_CPU_ID, &cpuid) != 0) {
- return (topo_mod_seterrno(mod, EMOD_NVL_INVAL));
- }
-
- /*
- * Check the cpu presence
- */
- if ((mcmp = cpu_find_cpumap(chip, cpuid)) != NULL) {
- if (cpu_read_serial(in, &nvlserid) == 0)
- present = nvlserid == mcmp->cpumap_serialno;
- else
- present = 1;
- }
- if (present == 0) {
- return (topo_mod_seterrno(mod, EMOD_NVL_INVAL));
- }
-
- lhp = ldom_init(cpu_alloc, cpu_free);
- if (lhp == NULL) {
- return (topo_mod_seterrno(mod, EMOD_NOMEM));
- }
- (void) ldom_get_type(lhp, &type);
- status = ldom_fmri_status(lhp, in);
- rc = (status == P_FAULTED ||
- (status == P_OFFLINE && ((type & LDOM_TYPE_CONTROL) != 0)));
- ldom_fini(lhp);
-
- /* return the unusable status */
- if (topo_mod_nvalloc(mod, out, NV_UNIQUE_NAME) != 0)
- return (topo_mod_seterrno(mod, EMOD_NVL_INVAL));
- if (nvlist_add_uint32(*out, TOPO_METH_UNUSABLE_RET, rc) != 0) {
- nvlist_free(*out);
- return (topo_mod_seterrno(mod, EMOD_NVL_INVAL));
- }
-
- return (0);
-}
-
-
-static nvlist_t *
-cpu_fmri_create(topo_mod_t *mod, uint32_t cpuid, char *serial, uint8_t cpumask)
-{
- int err;
- nvlist_t *fmri;
-
- if (topo_mod_nvalloc(mod, &fmri, NV_UNIQUE_NAME) != 0)
- return (NULL);
- err = nvlist_add_uint8(fmri, FM_VERSION, FM_CPU_SCHEME_VERSION);
- err |= nvlist_add_string(fmri, FM_FMRI_SCHEME, FM_FMRI_SCHEME_CPU);
- err |= nvlist_add_uint32(fmri, FM_FMRI_CPU_ID, cpuid);
- err |= nvlist_add_uint8(fmri, FM_FMRI_CPU_MASK, cpumask);
- if (serial != NULL)
- err |= nvlist_add_string(fmri, FM_FMRI_CPU_SERIAL_ID, serial);
- if (err != 0) {
- nvlist_free(fmri);
- (void) topo_mod_seterrno(mod, EMOD_FMRI_NVL);
- return (NULL);
- }
-
- return (fmri);
-}
-
-static tnode_t *
-cpu_tnode_create(topo_mod_t *mod, tnode_t *parent,
- const char *name, topo_instance_t i, char *serial, void *priv)
-{
- int cpu_mask = 0;
- nvlist_t *fmri;
- tnode_t *ntn;
-
- fmri = cpu_fmri_create(mod, i, serial, cpu_mask);
- if (fmri == NULL) {
- topo_mod_dprintf(mod,
- "Unable to make nvlist for %s bind: %s.\n",
- name, topo_mod_errmsg(mod));
- return (NULL);
- }
-
- ntn = topo_node_bind(mod, parent, name, i, fmri);
- if (ntn == NULL) {
- topo_mod_dprintf(mod,
- "topo_node_bind (%s%d/%s%d) failed: %s\n",
- topo_node_name(parent), topo_node_instance(parent),
- name, i,
- topo_strerror(topo_mod_errno(mod)));
- nvlist_free(fmri);
- return (NULL);
- }
- nvlist_free(fmri);
- topo_node_setspecific(ntn, priv);
-
- return (ntn);
-}
-
-/*ARGSUSED*/
-static int
-cpu_create(topo_mod_t *mod, tnode_t *rnode, const char *name, md_info_t *chip)
-{
- int i;
- int min = -1;
- int max = -1;
- int nerr = 0;
- int pid;
- char sbuf[32];
- tnode_t *cnode;
-
- topo_mod_dprintf(mod, "enumerating cpus\n");
-
- /*
- * find the min/max id of cpus per this cmp and create a cpu range
- */
- for (i = 0; i < chip->ncpus; i++) {
- if ((min < 0) || (chip->cpus[i].cpumap_pid < min))
- min = chip->cpus[i].cpumap_pid;
- if ((max < 0) || (chip->cpus[i].cpumap_pid > max))
- max = chip->cpus[i].cpumap_pid;
- }
- if (min < 0 || max < 0)
- return (-1);
- topo_node_range_destroy(rnode, name);
- if (topo_node_range_create(mod, rnode, name, 0, max+1) < 0) {
- topo_mod_dprintf(mod, "failed to create cpu range[0,%d]: %s\n",
- max, topo_mod_errmsg(mod));
- return (-1);
- }
-
- /*
- * Create the cpu nodes
- */
- for (i = 0; i < chip->ncpus; i++) {
-
- (void) snprintf(sbuf, sizeof (sbuf), "%llx",
- chip->cpus[i].cpumap_serialno);
-
- /* physical cpuid */
- pid = chip->cpus[i].cpumap_pid;
- cnode = cpu_tnode_create(mod, rnode, name,
- (topo_instance_t)pid, sbuf, NULL);
- if (cnode == NULL) {
- topo_mod_dprintf(mod,
- "failed to create a cpu=%d node: %s\n",
- pid, topo_mod_errmsg(mod));
- nerr++;
- continue;
- }
-
- }
-
- if (nerr != 0)
- (void) topo_mod_seterrno(mod, EMOD_PARTIAL_ENUM);
-
- return (0);
-}
-
-/*ARGSUSED*/
-static int
-cpu_enum(topo_mod_t *mod, tnode_t *rnode, const char *name,
- topo_instance_t min, topo_instance_t max, void *arg, void *notused)
-{
- topo_mod_dprintf(mod, "%s enumerating %s\n", PLATFORM_CPU_NAME, name);
-
- if (topo_method_register(mod, rnode, cpu_methods) < 0) {
- topo_mod_dprintf(mod, "topo_method_register failed: %s\n",
- topo_strerror(topo_mod_errno(mod)));
- return (-1);
- }
-
- if (strcmp(name, CPU_NODE_NAME) == 0)
- return (cpu_create(mod, rnode, name, (md_info_t *)arg));
-
- return (0);
-}
-
-/*ARGSUSED*/
-static void
-cpu_release(topo_mod_t *mod, tnode_t *node)
-{
- topo_method_unregister_all(mod, node);
-}
diff --git a/usr/src/lib/fm/topo/modules/sun4v/platform-cpu/cpu_mdesc.c b/usr/src/lib/fm/topo/modules/sun4v/platform-cpu/cpu_mdesc.c
deleted file mode 100644
index f8df49405a..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/platform-cpu/cpu_mdesc.c
+++ /dev/null
@@ -1,423 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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.
- */
-
-#include <string.h>
-#include <umem.h>
-#include <sys/mdesc.h>
-#include <sys/fm/ldom.h>
-
-#include <cpu_mdesc.h>
-
-static void *
-cpu_alloc(size_t size)
-{
- return (umem_alloc(size, UMEM_DEFAULT));
-}
-
-static void
-cpu_free(void *data, size_t size)
-{
- umem_free(data, size);
-}
-
-md_proc_t *
-cpu_find_proc(md_info_t *chip, uint32_t procid) {
- int i;
- md_proc_t *procp;
-
- /* search the processor based on the physical id */
- for (i = 0, procp = chip->procs; i < chip->nprocs; i++, procp++) {
- if (procp->serialno != 0 && procid == procp->id) {
- return (procp);
- }
- }
-
- return (NULL);
-}
-
-md_cpumap_t *
-cpu_find_cpumap(md_info_t *chip, uint32_t cpuid) {
- int i;
- md_cpumap_t *mcmp;
-
- for (i = 0, mcmp = chip->cpus; i < chip->ncpus; i++, mcmp++) {
- if (cpuid == mcmp->cpumap_pid) {
- return (mcmp);
- }
- }
- return (NULL);
-}
-
-int
-cpu_get_serialid_mdesc(md_info_t *chip, uint32_t cpuid, uint64_t *serialidp)
-{
- md_cpumap_t *mcmp;
- if ((mcmp = cpu_find_cpumap(chip, cpuid)) != NULL) {
- *serialidp = mcmp->cpumap_serialno;
- return (0);
- }
- return (-1);
-}
-
-static int
-cpu_n1_mdesc_init(topo_mod_t *mod, md_t *mdp, md_info_t *chip)
-{
- mde_cookie_t *listp;
- md_cpumap_t *mcmp;
- int i, num_nodes, idx;
- uint64_t x;
-
- num_nodes = md_node_count(mdp);
- listp = topo_mod_zalloc(mod, sizeof (mde_cookie_t) * num_nodes);
-
- chip->ncpus = md_scan_dag(mdp,
- MDE_INVAL_ELEM_COOKIE,
- md_find_name(mdp, "cpu"),
- md_find_name(mdp, "fwd"),
- listp);
- topo_mod_dprintf(mod, "Found %d cpus\n", chip->ncpus);
-
- chip->cpus = topo_mod_zalloc(mod, chip->ncpus * sizeof (md_cpumap_t));
- chip->nprocs = chip->ncpus;
- chip->procs = topo_mod_zalloc(mod, chip->nprocs * sizeof (md_proc_t));
-
- for (idx = 0, mcmp = chip->cpus; idx < chip->ncpus; idx++, mcmp++) {
-
- if (md_get_prop_val(mdp, listp[idx], MD_STR_ID, &x) < 0)
- x = (uint64_t)-1; /* invalid value */
- mcmp->cpumap_id = x;
-
- if (md_get_prop_val(mdp, listp[idx], MD_STR_PID, &x) < 0)
- x = mcmp->cpumap_id;
- mcmp->cpumap_pid = x;
-
- mcmp->cpumap_serialno = 0;
- mcmp->cpumap_chipidx = -1;
- if (md_get_prop_val(mdp, listp[idx], MD_STR_CPU_SERIAL,
- &mcmp->cpumap_serialno) < 0) {
- continue;
- }
- if (mcmp->cpumap_serialno == 0) {
- continue;
- }
-
- /*
- * This PRI/MD has no indentity info. of the FRU and no
- * physical proc id.
- * Find if there is already an existing processor entry
- * Assign procid based on the order found during reading
- */
- for (i = 0; i < chip->nprocs &&
- chip->procs[i].serialno != 0; i++) {
- if (mcmp->cpumap_serialno == chip->procs[i].serialno) {
- break;
- }
- }
- if (i < chip->nprocs) {
- mcmp->cpumap_chipidx = i;
- if (chip->procs[i].serialno == 0) {
- chip->procs[i].id = i;
- chip->procs[i].serialno = mcmp->cpumap_serialno;
- topo_mod_dprintf(mod,
- "chip[%d] serial is %llx\n",
- i, chip->procs[i].serialno);
- }
- }
-
- }
-
- topo_mod_free(mod, listp, sizeof (mde_cookie_t) * num_nodes);
-
- return (0);
-}
-
-static int
-cpu_n2_mdesc_init(topo_mod_t *mod, md_t *mdp, md_info_t *chip)
-{
- mde_cookie_t *list1p, *list2p;
- md_cpumap_t *mcmp;
- md_proc_t *procp;
- md_fru_t *frup;
- int i, j, cnt;
- int procid_flag = 0;
- int nnode, ncomp, nproc, ncpu;
- char *str = NULL;
- uint64_t x, sn;
- char *strserial, *end;
-
- nnode = md_node_count(mdp);
- list1p = topo_mod_zalloc(mod, sizeof (mde_cookie_t) * nnode);
-
- /* Count the number of processors and strands */
- ncomp = md_scan_dag(mdp,
- MDE_INVAL_ELEM_COOKIE,
- md_find_name(mdp, MD_STR_COMPONENT),
- md_find_name(mdp, "fwd"),
- list1p);
- if (ncomp <= 0) {
- topo_mod_dprintf(mod, "Component nodes not found\n");
- topo_mod_free(mod, list1p, sizeof (mde_cookie_t) * nnode);
- return (-1);
- }
- for (i = 0, nproc = 0, ncpu = 0; i < ncomp; i++) {
- if (md_get_prop_str(mdp, list1p[i], MD_STR_TYPE, &str) == 0 &&
- str != NULL && strcmp(str, MD_STR_PROCESSOR) == 0) {
- nproc++;
- /* check if the physical id exists */
- if (md_get_prop_val(mdp, list1p[i], MD_STR_ID, &x)
- == 0) {
- procid_flag = 1;
- }
- }
- if (md_get_prop_str(mdp, list1p[i], MD_STR_TYPE, &str) == 0 &&
- str && strcmp(str, MD_STR_STRAND) == 0) {
- ncpu++;
- }
- }
- topo_mod_dprintf(mod, "Found %d procs and %d strands\n", nproc, ncpu);
- if (nproc == 0 || ncpu == 0) {
- topo_mod_free(mod, list1p, sizeof (mde_cookie_t) * nnode);
- return (-1);
- }
-
- /* Alloc processors and strand entries */
- list2p = topo_mod_zalloc(mod, sizeof (mde_cookie_t) * 2 * ncpu);
- chip->nprocs = nproc;
- chip->procs = topo_mod_zalloc(mod, nproc * sizeof (md_proc_t));
- chip->ncpus = ncpu;
- chip->cpus = topo_mod_zalloc(mod, ncpu * sizeof (md_cpumap_t));
-
- /* Visit each processor node */
- procp = chip->procs;
- mcmp = chip->cpus;
- for (i = 0, nproc = 0, ncpu = 0; i < ncomp; i++) {
- if (md_get_prop_str(mdp, list1p[i], MD_STR_TYPE, &str) < 0 ||
- str == NULL || strcmp(str, MD_STR_PROCESSOR))
- continue;
- if (md_get_prop_val(mdp, list1p[i], MD_STR_SERIAL, &sn) < 0) {
- if (md_get_prop_str(mdp, list1p[i], MD_STR_SERIAL,
- &strserial) < 0) {
- topo_mod_dprintf(mod,
- "Failed to get the serial number of"
- "proc[%d]\n", nproc);
- continue;
- } else {
- sn = (uint64_t)strtoull(strserial, &end, 16);
- if (strserial == end) {
- topo_mod_dprintf(mod,
- "Failed to convert the serial "
- "string to serial int of "
- "proc[%d]\n", nproc);
- continue;
- }
- }
- }
- procp->serialno = sn;
-
- /* Assign physical proc id */
- procp->id = -1;
- if (procid_flag) {
- if (md_get_prop_val(mdp, list1p[i], MD_STR_ID, &x)
- == 0) {
- procp->id = x;
- }
- } else {
- procp->id = nproc;
- }
- topo_mod_dprintf(mod, "proc %d: sn=%llx, id=%d\n", nproc,
- procp->serialno, procp->id);
-
- /* Get all the strands below this proc */
- cnt = md_scan_dag(mdp,
- list1p[i],
- md_find_name(mdp, MD_STR_COMPONENT),
- md_find_name(mdp, "fwd"),
- list2p);
- topo_mod_dprintf(mod, "proc[%llx]: Found %d fwd components\n",
- sn, cnt);
- if (cnt <= 0) {
- nproc++;
- procp++;
- continue;
- }
- for (j = 0; j < cnt; j++) {
- /* Consider only the strand nodes */
- if (md_get_prop_str(mdp, list2p[j], MD_STR_TYPE, &str)
- < 0 || str == NULL || strcmp(str, MD_STR_STRAND))
- continue;
-
- if (md_get_prop_val(mdp, list2p[j], MD_STR_ID, &x) < 0)
- x = (uint64_t)-1; /* invalid value */
- mcmp->cpumap_id = x;
-
- if (md_get_prop_val(mdp, list2p[j], MD_STR_PID, &x) < 0)
- x = mcmp->cpumap_id;
- mcmp->cpumap_pid = x;
-
- mcmp->cpumap_serialno = sn;
- mcmp->cpumap_chipidx = nproc;
- ncpu++;
- mcmp++;
- }
-
- /*
- * To get the fru of this proc, follow the back arc up to
- * find the first node whose fru field is set
- */
- cnt = md_scan_dag(mdp,
- list1p[i],
- md_find_name(mdp, MD_STR_COMPONENT),
- md_find_name(mdp, "back"),
- list2p);
- topo_mod_dprintf(mod, "proc[%d]: Found %d back components\n",
- nproc, cnt);
- if (cnt <= 0) {
- nproc++;
- procp++;
- continue;
- }
- for (j = 0; j < cnt; j++) {
- /* test the fru field which must be positive number */
- if ((md_get_prop_val(mdp, list2p[j], MD_STR_FRU, &x)
- == 0) && x > 0)
- break;
- }
- if (j < cnt) {
- /* Found the FRU node, get the fru identity */
- topo_mod_dprintf(mod, "proc[%d] sn=%llx has a fru %d\n",
- nproc, procp->serialno, j);
- frup = topo_mod_zalloc(mod, sizeof (md_fru_t));
- procp->fru = frup;
- if (!md_get_prop_str(mdp, list2p[j], MD_STR_NAC, &str))
- frup->nac = topo_mod_strdup(mod, str);
- else
- frup->nac = topo_mod_strdup(mod, MD_FRU_DEF);
- if (!md_get_prop_str(mdp, list2p[j], MD_STR_PART, &str))
- frup->part = topo_mod_strdup(mod, str);
- if (!md_get_prop_str(mdp, list2p[j], MD_STR_SERIAL,
- &str))
- frup->serial = topo_mod_strdup(mod, str);
- if (!md_get_prop_str(mdp, list2p[j], MD_STR_DASH, &str))
- frup->dash = topo_mod_strdup(mod, str);
- } else {
- topo_mod_dprintf(mod, "proc[%d] sn=%llx has no fru\n",
- i, procp->serialno);
- }
-
- nproc++;
- procp++;
- } /* for i */
-
- topo_mod_free(mod, list1p, sizeof (mde_cookie_t) * nnode);
- topo_mod_free(mod, list2p, sizeof (mde_cookie_t) * 2*chip->ncpus);
-
- return (0);
-}
-
-/*
- * Extract from the PRI the processor, strand and their fru identity
- */
-int
-cpu_mdesc_init(topo_mod_t *mod, md_info_t *chip)
-{
- int rc = -1;
- md_t *mdp;
- ssize_t bufsiz = 0;
- uint64_t *bufp;
- ldom_hdl_t *lhp;
- uint32_t type = 0;
-
- /* get the PRI/MD */
- if ((lhp = ldom_init(cpu_alloc, cpu_free)) == NULL) {
- topo_mod_dprintf(mod, "ldom_init() failed\n");
- return (topo_mod_seterrno(mod, EMOD_NOMEM));
- }
-
- (void) ldom_get_type(lhp, &type);
- if ((type & LDOM_TYPE_CONTROL) != 0) {
- bufsiz = ldom_get_core_md(lhp, &bufp);
- } else {
- bufsiz = ldom_get_local_md(lhp, &bufp);
- }
- if (bufsiz <= 0) {
- topo_mod_dprintf(mod, "failed to get the PRI/MD\n");
- ldom_fini(lhp);
- return (-1);
- }
-
- if ((mdp = md_init_intern(bufp, cpu_alloc, cpu_free)) == NULL ||
- md_node_count(mdp) <= 0) {
- cpu_free(bufp, (size_t)bufsiz);
- ldom_fini(lhp);
- return (-1);
- }
-
- /*
- * N1 MD contains cpu nodes while N2 MD contains component nodes.
- */
- if (md_find_name(mdp, MD_STR_COMPONENT) != MDE_INVAL_STR_COOKIE) {
- rc = cpu_n2_mdesc_init(mod, mdp, chip);
- } else if (md_find_name(mdp, MD_STR_CPU) != MDE_INVAL_STR_COOKIE) {
- rc = cpu_n1_mdesc_init(mod, mdp, chip);
- } else {
- topo_mod_dprintf(mod, "Unsupported PRI/MD\n");
- rc = -1;
- }
-
- cpu_free(bufp, (size_t)bufsiz);
- (void) md_fini(mdp);
- ldom_fini(lhp);
-
- return (rc);
-}
-
-void
-cpu_mdesc_fini(topo_mod_t *mod, md_info_t *chip)
-{
- int i;
- md_proc_t *procp;
- md_fru_t *frup;
-
- if (chip->cpus != NULL)
- topo_mod_free(mod, chip->cpus,
- chip->ncpus * sizeof (md_cpumap_t));
-
- if (chip->procs != NULL) {
- procp = chip->procs;
- for (i = 0; i < chip->nprocs; i++) {
- if ((frup = procp->fru) != NULL) {
- topo_mod_strfree(mod, frup->nac);
- topo_mod_strfree(mod, frup->serial);
- topo_mod_strfree(mod, frup->part);
- topo_mod_strfree(mod, frup->dash);
- topo_mod_free(mod, frup, sizeof (md_fru_t));
- }
- procp++;
- }
- topo_mod_free(mod, chip->procs,
- chip->nprocs * sizeof (md_proc_t));
- }
-}
diff --git a/usr/src/lib/fm/topo/modules/sun4v/platform-cpu/cpu_mdesc.h b/usr/src/lib/fm/topo/modules/sun4v/platform-cpu/cpu_mdesc.h
deleted file mode 100644
index 503416d494..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/platform-cpu/cpu_mdesc.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _CPU_MDESC_H
-#define _CPU_MDESC_H
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include <fm/topo_mod.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Node/Field names in the PRI/MD
- */
-#define MD_STR_ID "id"
-#define MD_STR_PID "pid"
-#define MD_STR_CPU_SERIAL "serial#"
-#define MD_STR_CPU "cpu"
-#define MD_STR_COMPONENT "component"
-#define MD_STR_TYPE "type"
-#define MD_STR_PROCESSOR "processor"
-#define MD_STR_STRAND "strand"
-#define MD_STR_FRU "fru"
-#define MD_STR_NAC "nac"
-#define MD_STR_SERIAL "serial_number"
-#define MD_STR_PART "part_number"
-#define MD_STR_DASH "dash_number"
-
-#define MD_FRU_DEF "MB"
-#define MD_STR_BLANK ""
-
-typedef struct md_cpumap {
- uint32_t cpumap_id; /* virtual cpuid/strandid */
- uint32_t cpumap_pid; /* physical cpuid/strandid */
- uint64_t cpumap_serialno; /* cpu serial number */
- int cpumap_chipidx; /* chip idx */
-} md_cpumap_t;
-
-typedef struct md_fru {
- char *nac; /* FRU or nac */
- char *serial; /* FRU serial */
- char *part; /* FRU part number */
- char *dash; /* FRU dash */
-} md_fru_t;
-
-typedef struct md_proc {
- int32_t id; /* physiscal id of the CMP processor */
- uint64_t serialno; /* processor serial number */
- md_fru_t *fru; /* FRU info */
-} md_proc_t;
-
-typedef struct md_info {
- md_proc_t *procs; /* list of processors */
- uint32_t nprocs; /* size */
- md_cpumap_t *cpus; /* List of cpu maps */
- uint32_t ncpus; /* size */
-} md_info_t;
-
-
-extern int cpu_mdesc_init(topo_mod_t *mod, md_info_t *chip);
-extern void cpu_mdesc_fini(topo_mod_t *mod, md_info_t *chip);
-
-extern int cpu_get_serialid_mdesc(md_info_t *chip, uint32_t cpuid,
- uint64_t *serialno);
-extern md_cpumap_t *cpu_find_cpumap(md_info_t *chip, uint32_t cpuid);
-extern md_proc_t *cpu_find_proc(md_info_t *chip, uint32_t procid);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _CPU_MDESC_H */
diff --git a/usr/src/lib/fm/topo/modules/sun4v/platform-mem/Makefile b/usr/src/lib/fm/topo/modules/sun4v/platform-mem/Makefile
deleted file mode 100644
index 6ef8db7cf3..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/platform-mem/Makefile
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
-
-MODULE = platform-mem
-ARCH = sun4v
-CLASS = arch
-
-MODULESRCS = mem.c mem_mdesc.c
-
-include ../../Makefile.plugin
-
-CPPFLAGS += -I$(ROOT)/usr/platform/sun4v/include
-LDLIBS += -lumem -lmdesc -lldom
diff --git a/usr/src/lib/fm/topo/modules/sun4v/platform-mem/mem.c b/usr/src/lib/fm/topo/modules/sun4v/platform-mem/mem.c
deleted file mode 100644
index 080c85720f..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/platform-mem/mem.c
+++ /dev/null
@@ -1,697 +0,0 @@
-
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2010 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-/*
- * Copyright 2019 Joyent, Inc.
- */
-
-#include <strings.h>
-#include <umem.h>
-#include <fm/topo_mod.h>
-#include <fm/fmd_fmri.h>
-#include <fm/fmd_agent.h>
-#include <sys/fm/protocol.h>
-
-#include <mem_mdesc.h>
-
-/*
- * This enumerator creates mem-schemed nodes for each dimm found in the
- * sun4v Physical Resource Inventory (PRI).
- * Each node exports five methods: present(), expand(), unusable(), replaced(),
- * and contains().
- *
- */
-
-#define PLATFORM_MEM_NAME "platform-mem"
-#define PLATFORM_MEM_VERSION TOPO_VERSION
-#define MEM_NODE_NAME "mem"
-
-
-/* Forward declaration */
-static int mem_enum(topo_mod_t *, tnode_t *, const char *, topo_instance_t,
- topo_instance_t, void *, void *);
-static void mem_release(topo_mod_t *, tnode_t *);
-static int mem_present(topo_mod_t *, tnode_t *, topo_version_t, nvlist_t *,
- nvlist_t **);
-static int mem_replaced(topo_mod_t *, tnode_t *, topo_version_t, nvlist_t *,
- nvlist_t **);
-static int mem_expand(topo_mod_t *, tnode_t *, topo_version_t, nvlist_t *,
- nvlist_t **);
-static int mem_unusable(topo_mod_t *, tnode_t *, topo_version_t, nvlist_t *,
- nvlist_t **);
-static int mem_contains(topo_mod_t *, tnode_t *, topo_version_t, nvlist_t *,
- nvlist_t **);
-
-static const topo_modops_t mem_ops =
- { mem_enum, mem_release };
-static const topo_modinfo_t mem_info =
- { PLATFORM_MEM_NAME, FM_FMRI_SCHEME_MEM, PLATFORM_MEM_VERSION,
- &mem_ops };
-
-static const topo_method_t mem_methods[] = {
- { TOPO_METH_PRESENT, TOPO_METH_PRESENT_DESC,
- TOPO_METH_PRESENT_VERSION, TOPO_STABILITY_INTERNAL, mem_present },
- { TOPO_METH_REPLACED, TOPO_METH_REPLACED_DESC,
- TOPO_METH_REPLACED_VERSION, TOPO_STABILITY_INTERNAL, mem_replaced },
- { TOPO_METH_EXPAND, TOPO_METH_EXPAND_DESC,
- TOPO_METH_EXPAND_VERSION, TOPO_STABILITY_INTERNAL, mem_expand },
- { TOPO_METH_UNUSABLE, TOPO_METH_UNUSABLE_DESC,
- TOPO_METH_UNUSABLE_VERSION, TOPO_STABILITY_INTERNAL, mem_unusable },
- { TOPO_METH_CONTAINS, TOPO_METH_CONTAINS_DESC,
- TOPO_METH_CONTAINS_VERSION, TOPO_STABILITY_INTERNAL, mem_contains },
- { NULL }
-};
-
-int
-_topo_init(topo_mod_t *mod)
-{
- md_mem_info_t *mem;
-
- if (getenv("TOPOPLATFORMMEMDBG"))
- topo_mod_setdebug(mod);
- topo_mod_dprintf(mod, "initializing %s enumerator\n",
- PLATFORM_MEM_NAME);
-
- if ((mem = topo_mod_zalloc(mod, sizeof (md_mem_info_t))) == NULL)
- return (-1);
-
- if (mem_mdesc_init(mod, mem) != 0) {
- topo_mod_dprintf(mod, "failed to get dimms from the PRI/MD\n");
- topo_mod_free(mod, mem, sizeof (md_mem_info_t));
- return (-1);
- }
-
- topo_mod_setspecific(mod, (void *)mem);
-
- if (topo_mod_register(mod, &mem_info, TOPO_VERSION) != 0) {
- topo_mod_dprintf(mod, "failed to register %s: %s\n",
- PLATFORM_MEM_NAME, topo_mod_errmsg(mod));
- mem_mdesc_fini(mod, mem);
- topo_mod_free(mod, mem, sizeof (md_mem_info_t));
- return (-1);
- }
-
- topo_mod_dprintf(mod, "%s enumerator inited\n", PLATFORM_MEM_NAME);
-
- return (0);
-}
-
-void
-_topo_fini(topo_mod_t *mod)
-{
- md_mem_info_t *mem;
-
- mem = (md_mem_info_t *)topo_mod_getspecific(mod);
-
- mem_mdesc_fini(mod, mem);
-
- topo_mod_free(mod, mem, sizeof (md_mem_info_t));
-
- topo_mod_unregister(mod);
-
-}
-
-/*ARGSUSED*/
-static int
-mem_present(topo_mod_t *mod, tnode_t *node, topo_version_t vers,
- nvlist_t *in, nvlist_t **out)
-{
- uint8_t version;
- char **nvlserids;
- size_t n, nserids;
- uint32_t present = 0;
- md_mem_info_t *mem = (md_mem_info_t *)topo_mod_getspecific(mod);
-
- /* sun4v platforms all support dimm serial numbers */
-
- if (nvlist_lookup_uint8(in, FM_VERSION, &version) != 0 ||
- version > FM_MEM_SCHEME_VERSION ||
- nvlist_lookup_string_array(in, FM_FMRI_MEM_SERIAL_ID,
- &nvlserids, &nserids) != 0) {
- return (topo_mod_seterrno(mod, EMOD_NVL_INVAL));
- }
-
- /* Find the dimm entry */
- for (n = 0; n < nserids; n++) {
- if (mem_get_dimm_by_sn(nvlserids[n], mem) != NULL) {
- present = 1;
- break;
- }
- }
-
- /* return the present status */
- if (topo_mod_nvalloc(mod, out, NV_UNIQUE_NAME) != 0)
- return (topo_mod_seterrno(mod, EMOD_NVL_INVAL));
- if (nvlist_add_uint32(*out, TOPO_METH_PRESENT_RET, present) != 0) {
- nvlist_free(*out);
- return (topo_mod_seterrno(mod, EMOD_NVL_INVAL));
- }
-
- return (0);
-}
-
-/*ARGSUSED*/
-static int
-mem_replaced(topo_mod_t *mod, tnode_t *node, topo_version_t vers,
- nvlist_t *in, nvlist_t **out)
-{
- uint8_t version;
- char **nvlserids;
- size_t n, nserids;
- uint32_t rval = FMD_OBJ_STATE_NOT_PRESENT;
- md_mem_info_t *mem = (md_mem_info_t *)topo_mod_getspecific(mod);
-
- /* sun4v platforms all support dimm serial numbers */
-
- if (nvlist_lookup_uint8(in, FM_VERSION, &version) != 0 ||
- version > FM_MEM_SCHEME_VERSION ||
- nvlist_lookup_string_array(in, FM_FMRI_MEM_SERIAL_ID,
- &nvlserids, &nserids) != 0) {
- return (topo_mod_seterrno(mod, EMOD_NVL_INVAL));
- }
-
- /* Find the dimm entry */
- for (n = 0; n < nserids; n++) {
- if (mem_get_dimm_by_sn(nvlserids[n], mem) != NULL) {
- rval = FMD_OBJ_STATE_STILL_PRESENT;
- break;
- }
- }
-
- /* return the replaced status */
- if (topo_mod_nvalloc(mod, out, NV_UNIQUE_NAME) != 0)
- return (topo_mod_seterrno(mod, EMOD_NVL_INVAL));
- if (nvlist_add_uint32(*out, TOPO_METH_REPLACED_RET, rval) != 0) {
- nvlist_free(*out);
- return (topo_mod_seterrno(mod, EMOD_NVL_INVAL));
- }
-
- return (0);
-}
-
-/*
- * Niagara-1, Niagara-2, and Victoria Falls all have physical address
- * spaces of 40 bits.
- */
-
-#define MEM_PHYS_ADDRESS_LIMIT 0x10000000000ULL
-
-/*
- * The 'mask' argument to extract_bits has 1's in those bit positions of
- * the physical address used to select the DIMM (or set of DIMMs) which will
- * store the contents of the physical address. If we extract those bits, ie.
- * remove them and collapse the holes, the result is the 'address' within the
- * DIMM or set of DIMMs where the contents are stored.
- */
-
-static uint64_t
-extract_bits(uint64_t paddr, uint64_t mask)
-{
- uint64_t from, to;
- uint64_t result = 0;
-
- to = 1;
- for (from = 1; from <= MEM_PHYS_ADDRESS_LIMIT; from <<= 1) {
- if ((from & mask) == 0) {
- if ((from & paddr) != 0)
- result |= to;
- to <<= 1;
- }
- }
- return (result);
-}
-
-/*
- * insert_bits is the reverse operation to extract_bits. Where extract_bits
- * removes from the physical address those bits which select a DIMM or set
- * of DIMMs, insert_bits reconstitutes a physical address given the DIMM
- * selection 'mask' and the 'value' for the address bits denoted by 1s in
- * the 'mask'.
- */
-static uint64_t
-insert_bits(uint64_t offset, uint64_t mask, uint64_t value)
-{
- uint64_t result = 0;
- uint64_t from, to;
-
- from = 1;
- for (to = 1; to <= MEM_PHYS_ADDRESS_LIMIT; to <<= 1) {
- if ((to & mask) == 0) {
- if ((offset & from) != 0)
- result |= to;
- from <<= 1;
- } else {
- result |= to & value;
- }
- }
- return (result);
-}
-
-uint64_t
-calc_phys_addr(mem_seg_map_t *seg, char *ds, uint64_t offset)
-{
- mem_bank_map_t *bm;
- mem_dimm_list_t *dl;
-
- for (bm = seg->sm_grp->mg_bank; bm != NULL; bm = bm->bm_grp) {
- dl = bm->bm_dlist;
- while (dl != NULL) {
- if (strcmp(dl->dl_dimm->dm_serid, ds) == 0)
- return (insert_bits(offset<<bm->bm_shift,
- bm->bm_mask, bm->bm_match));
- dl = dl->dl_next;
- }
- }
- return ((uint64_t)-1);
-}
-
-void
-mem_expand_opt(topo_mod_t *mod, nvlist_t *nvl, char **serids)
-{
- md_mem_info_t *mem = (md_mem_info_t *)topo_mod_getspecific(mod);
- mem_seg_map_t *seg;
- mem_bank_map_t *bm;
- uint64_t offset, physaddr;
-
- /*
- * The following additional expansions are all optional.
- * Failure to retrieve a data value, or failure to add it
- * successfully to the FMRI, does NOT cause a failure of
- * fmd_fmri_expand. All optional expansions will be attempted
- * once expand_opt is entered.
- */
-
- if (nvlist_lookup_uint64(nvl, FM_FMRI_MEM_OFFSET, &offset) == 0) {
- for (seg = mem->mem_seg; seg != NULL; seg = seg->sm_next) {
- physaddr = calc_phys_addr(seg, *serids, offset);
- if (physaddr >= seg->sm_base &&
- physaddr < seg->sm_base + seg->sm_size) {
- (void) nvlist_add_uint64(nvl,
- FM_FMRI_MEM_PHYSADDR, physaddr);
- }
- }
- } else if (nvlist_lookup_uint64(nvl,
- FM_FMRI_MEM_PHYSADDR, &physaddr) == 0) {
- for (seg = mem->mem_seg; seg != NULL; seg = seg->sm_next) {
- if (physaddr >= seg->sm_base &&
- physaddr < seg->sm_base + seg->sm_size) {
- bm = seg->sm_grp->mg_bank;
- /*
- * The mask & shift values for all banks in a
- * segment are always the same; only the match
- * values differ, in order to specify a
- * dimm-pair. But we already have a full unum.
- */
- offset = extract_bits(physaddr,
- bm->bm_mask) >> bm->bm_shift;
- (void) (nvlist_add_uint64(nvl,
- FM_FMRI_MEM_OFFSET, offset));
- }
- }
- }
-}
-
-/*
- * The sun4v mem: scheme expand() now assumes that the FMRI -has- serial
- * numbers, therefore we should never have to call mem_unum_burst again.
- * Part numbers will be supplied in hc: scheme from the hc: enumeration.
- * What's left: physical address and offset calculations.
- */
-
-/*ARGSUSED*/
-static int
-mem_expand(topo_mod_t *mod, tnode_t *node, topo_version_t vers,
- nvlist_t *in, nvlist_t **out)
-{
- int rc;
- uint8_t version;
- char *unum, **nvlserids;
- size_t nserids;
-
- if (nvlist_lookup_uint8(in, FM_VERSION, &version) != 0 ||
- version > FM_MEM_SCHEME_VERSION ||
- nvlist_lookup_string(in, FM_FMRI_MEM_UNUM, &unum) != 0)
- return (topo_mod_seterrno(mod, EMOD_NVL_INVAL));
-
- if ((rc = nvlist_lookup_string_array(in, FM_FMRI_MEM_SERIAL_ID,
- &nvlserids, &nserids)) == 0) { /* already have serial #s */
- mem_expand_opt(mod, in, nvlserids);
- return (0);
- } else if (rc != ENOENT)
- return (topo_mod_seterrno(mod, EMOD_NVL_INVAL));
- else
- return (-1);
-}
-
-int
-mem_page_isretired(topo_mod_t *mod, nvlist_t *nvl)
-{
- ldom_hdl_t *lhp;
- int rc;
-
- if ((lhp = ldom_init(mem_alloc, mem_free)) == NULL) {
- (void) topo_mod_seterrno(mod, EMOD_NOMEM);
- errno = ENOMEM;
- return (FMD_AGENT_RETIRE_FAIL);
- }
-
- rc = ldom_fmri_status(lhp, nvl);
-
- ldom_fini(lhp);
- errno = rc;
-
- if (rc == 0 || rc == EINVAL)
- return (FMD_AGENT_RETIRE_DONE);
- if (rc == EAGAIN)
- return (FMD_AGENT_RETIRE_ASYNC);
-
- return (FMD_AGENT_RETIRE_FAIL);
-}
-
-int
-mem_page_retire(topo_mod_t *mod, nvlist_t *nvl)
-{
- ldom_hdl_t *lhp;
- int rc;
-
- if ((lhp = ldom_init(mem_alloc, mem_free)) == NULL) {
- (void) topo_mod_seterrno(mod, EMOD_NOMEM);
- errno = ENOMEM;
- return (FMD_AGENT_RETIRE_FAIL);
- }
-
- rc = ldom_fmri_retire(lhp, nvl);
-
- ldom_fini(lhp);
- errno = rc;
-
- if (rc == 0 || rc == EIO || rc == EINVAL)
- return (FMD_AGENT_RETIRE_DONE);
- if (rc == EAGAIN)
- return (FMD_AGENT_RETIRE_ASYNC);
-
- return (FMD_AGENT_RETIRE_FAIL);
-}
-
-int
-mem_page_unretire(topo_mod_t *mod, nvlist_t *nvl)
-{
- ldom_hdl_t *lhp;
- int rc;
-
- if ((lhp = ldom_init(mem_alloc, mem_free)) == NULL) {
- (void) topo_mod_seterrno(mod, EMOD_NOMEM);
- errno = ENOMEM;
- return (FMD_AGENT_RETIRE_FAIL);
- }
-
- rc = ldom_fmri_unretire(lhp, nvl);
-
- ldom_fini(lhp);
- errno = rc;
-
- if (rc == 0 || rc == EIO)
- return (FMD_AGENT_RETIRE_DONE);
-
- return (FMD_AGENT_RETIRE_FAIL);
-
-}
-
-/*ARGSUSED*/
-static int
-mem_unusable(topo_mod_t *mod, tnode_t *node, topo_version_t vers,
- nvlist_t *in, nvlist_t **out)
-{
- int rc = -1;
- uint8_t version;
- uint64_t val1, val2;
- int err1, err2;
- uint32_t retval;
-
- if (nvlist_lookup_uint8(in, FM_VERSION, &version) != 0 ||
- version > FM_MEM_SCHEME_VERSION)
- return (topo_mod_seterrno(mod, EMOD_NVL_INVAL));
-
- err1 = nvlist_lookup_uint64(in, FM_FMRI_MEM_OFFSET, &val1);
- err2 = nvlist_lookup_uint64(in, FM_FMRI_MEM_PHYSADDR, &val2);
-
- if (err1 == ENOENT && err2 == ENOENT)
- return (0); /* no page, so assume it's still usable */
-
- if ((err1 != 0 && err1 != ENOENT) || (err2 != 0 && err2 != ENOENT))
- return (topo_mod_seterrno(mod, EMOD_NVL_INVAL));
-
- /*
- * Ask the kernel if the page is retired, using
- * the original mem FMRI with the specified offset or PA.
- * Refer to the kernel's page_retire_check() for the error codes.
- */
- rc = mem_page_isretired(mod, in);
-
- if (rc == FMD_AGENT_RETIRE_FAIL) {
- /*
- * The page is not retired and is not scheduled for retirement
- * (i.e. no request pending and has not seen any errors)
- */
- retval = 0;
- } else if (rc == FMD_AGENT_RETIRE_DONE ||
- rc == FMD_AGENT_RETIRE_ASYNC) {
- /*
- * The page has been retired, is in the process of being
- * retired, or doesn't exist. The latter is valid if the page
- * existed in the past but has been DR'd out.
- */
- retval = 1;
- } else {
- /*
- * Errors are only signalled to the caller if they're the
- * caller's fault. This isn't - it's a failure of the
- * retirement-check code. We'll whine about it and tell
- * the caller the page is unusable.
- */
- topo_mod_dprintf(mod,
- "failed to determine page %s=%llx usability: "
- "rc=%d errno=%d\n", err1 == 0 ? FM_FMRI_MEM_OFFSET :
- FM_FMRI_MEM_PHYSADDR, err1 == 0 ? (u_longlong_t)val1 :
- (u_longlong_t)val2, rc, errno);
- retval = 1;
- }
-
- if (topo_mod_nvalloc(mod, out, NV_UNIQUE_NAME) != 0)
- return (topo_mod_seterrno(mod, EMOD_NVL_INVAL));
- if (nvlist_add_uint32(*out, TOPO_METH_UNUSABLE_RET, retval) != 0) {
- nvlist_free(*out);
- return (topo_mod_seterrno(mod, EMOD_NVL_INVAL));
- }
- return (0);
-}
-
-/* ARGSUSED */
-static int
-mem_contains(topo_mod_t *mod, tnode_t *node, topo_version_t vers,
- nvlist_t *in, nvlist_t **out)
-{
- int rc = -1, ret = 1;
- uint8_t version;
- unsigned int erx, eex, ersiz, eesiz;
- nvlist_t *er, *ee;
- char **ersna, **eesna;
-
- /*
- * Unlike the other exported functions, the 'in' argument here is
- * not a pass-through -- it is a composite of the 'container' and
- * 'containee' FMRIs. Rather than checking the version of 'in',
- * check the versions of the container and containee.
- */
- if (nvlist_lookup_nvlist(in, TOPO_METH_FMRI_ARG_FMRI, &er) != 0 ||
- nvlist_lookup_nvlist(in, TOPO_METH_FMRI_ARG_SUBFMRI, &ee) != 0 ||
- nvlist_lookup_uint8(er, FM_VERSION, &version) != 0 ||
- version > FM_MEM_SCHEME_VERSION ||
- nvlist_lookup_uint8(ee, FM_VERSION, &version) != 0 ||
- version > FM_MEM_SCHEME_VERSION ||
- nvlist_lookup_string_array(er, FM_FMRI_MEM_SERIAL_ID,
- &ersna, &ersiz) != 0 ||
- nvlist_lookup_string_array(ee, FM_FMRI_MEM_SERIAL_ID,
- &eesna, &eesiz) != 0)
- return (topo_mod_seterrno(mod, EMOD_NVL_INVAL));
-
- /*
- * Look up each 'ee' serial number in serial number list of 'er'.
- * If any are not found, return "false"; if all are found, return
- * "true".
- */
-
- for (eex = 0; eex < eesiz; eex++) {
- for (erx = 0; erx < ersiz; erx++) {
- rc = strcmp(ersna[erx], eesna[eex]);
- if (rc == 0)
- break;
- }
- if (rc != 0) {
- /* failed -- no containment */
- ret = 0;
- break;
- }
- }
- /* success */
- if (topo_mod_nvalloc(mod, out, NV_UNIQUE_NAME) == 0) {
- if (nvlist_add_uint32(*out, TOPO_METH_CONTAINS_RET, ret) != 0) {
- nvlist_free(*out);
- return (topo_mod_seterrno(mod, EMOD_NVL_INVAL));
- }
- return (0);
- }
- return (-1);
-}
-
-static nvlist_t *
-mem_fmri_create(topo_mod_t *mod, char *unum, char *serial)
-{
- int err;
- nvlist_t *fmri;
-
- if (topo_mod_nvalloc(mod, &fmri, NV_UNIQUE_NAME) != 0)
- return (NULL);
- err = nvlist_add_uint8(fmri, FM_VERSION, FM_MEM_SCHEME_VERSION);
- err |= nvlist_add_string(fmri, FM_FMRI_SCHEME, FM_FMRI_SCHEME_MEM);
- err |= nvlist_add_string(fmri, FM_FMRI_MEM_UNUM, unum);
- if (serial != NULL)
- err |= nvlist_add_string_array(fmri,
- FM_FMRI_MEM_SERIAL_ID, &serial, 1);
- if (err != 0) {
- nvlist_free(fmri);
- (void) topo_mod_seterrno(mod, EMOD_FMRI_NVL);
- return (NULL);
- }
-
- return (fmri);
-}
-
-static tnode_t *
-mem_tnode_create(topo_mod_t *mod, tnode_t *parent,
- const char *name, topo_instance_t i, char *unum, char *serial, void *priv)
-{
- nvlist_t *fmri;
- tnode_t *ntn;
-
- fmri = mem_fmri_create(mod, unum, serial);
- if (fmri == NULL) {
- topo_mod_dprintf(mod,
- "Unable to make nvlist for %s bind: %s.\n",
- name, topo_mod_errmsg(mod));
- return (NULL);
- }
-
- ntn = topo_node_bind(mod, parent, name, i, fmri);
- if (ntn == NULL) {
- topo_mod_dprintf(mod,
- "topo_node_bind (%s%d/%s%d) failed: %s\n",
- topo_node_name(parent), topo_node_instance(parent),
- name, i,
- topo_strerror(topo_mod_errno(mod)));
- nvlist_free(fmri);
- return (NULL);
- }
- nvlist_free(fmri);
- topo_node_setspecific(ntn, priv);
-
- return (ntn);
-}
-
-/*ARGSUSED*/
-static int
-mem_create(topo_mod_t *mod, tnode_t *rnode, const char *name,
- md_mem_info_t *mem)
-{
- int i;
- int nerr = 0;
- int ndimms = 0;
- mem_dimm_map_t *mp;
- tnode_t *cnode;
-
- topo_mod_dprintf(mod, "enumerating memory\n");
-
- /*
- * Count the dimms and create a range. The instance numbers
- * are not meaningful in this context.
- */
- for (mp = mem->mem_dm; mp != NULL; mp = mp->dm_next) {
- ndimms++;
- }
- if (ndimms == 0)
- return (-1);
- topo_node_range_destroy(rnode, name);
- if (topo_node_range_create(mod, rnode, name, 0, ndimms+1) < 0) {
- topo_mod_dprintf(mod, "failed to create dimm range[0,%d]: %s\n",
- ndimms, topo_mod_errmsg(mod));
- return (-1);
- }
-
- /*
- * Create the dimm nodes
- */
- for (mp = mem->mem_dm, i = 0; mp != NULL; mp = mp->dm_next, i++) {
- cnode = mem_tnode_create(mod, rnode, name, (topo_instance_t)i,
- mp->dm_label, mp->dm_serid, NULL);
- if (cnode == NULL) {
- topo_mod_dprintf(mod,
- "failed to create dimm=%d node: %s\n",
- i, topo_mod_errmsg(mod));
- nerr++;
- }
- }
-
- if (nerr != 0)
- (void) topo_mod_seterrno(mod, EMOD_PARTIAL_ENUM);
-
- return (0);
-}
-
-/*ARGSUSED*/
-static int
-mem_enum(topo_mod_t *mod, tnode_t *rnode, const char *name,
- topo_instance_t min, topo_instance_t max, void *arg, void *notused)
-{
- topo_mod_dprintf(mod, "%s enumerating %s\n", PLATFORM_MEM_NAME, name);
-
- if (topo_method_register(mod, rnode, mem_methods) < 0) {
- topo_mod_dprintf(mod, "topo_method_register failed: %s\n",
- topo_strerror(topo_mod_errno(mod)));
- return (-1);
- }
-
- if (strcmp(name, MEM_NODE_NAME) == 0)
- return (mem_create(mod, rnode, name, (md_mem_info_t *)arg));
-
- return (0);
-}
-
-/*ARGSUSED*/
-static void
-mem_release(topo_mod_t *mod, tnode_t *node)
-{
- topo_method_unregister_all(mod, node);
-}
diff --git a/usr/src/lib/fm/topo/modules/sun4v/platform-mem/mem_mdesc.c b/usr/src/lib/fm/topo/modules/sun4v/platform-mem/mem_mdesc.c
deleted file mode 100644
index 00ae460ccf..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/platform-mem/mem_mdesc.c
+++ /dev/null
@@ -1,511 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2010 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#include <string.h>
-#include <umem.h>
-#include <sys/mdesc.h>
-#include <sys/fm/ldom.h>
-
-#include <mem_mdesc.h>
-
-void *
-mem_alloc(size_t size)
-{
- return (umem_alloc(size, UMEM_DEFAULT));
-}
-
-void
-mem_free(void *data, size_t size)
-{
- umem_free(data, size);
-}
-
-#define MEM_BYTES_PER_CACHELINE 64
-
-static void
-mdesc_init_n1(topo_mod_t *mod, md_t *mdp, mde_cookie_t *listp,
- md_mem_info_t *mem)
-{
- int idx, mdesc_dimm_count;
- mem_dimm_map_t *dm, *d;
- uint64_t sysmem_size, i;
- int dimms, min_chan, max_chan, min_rank, max_rank;
- int chan, rank, dimm, chans, chan_step;
- uint64_t mask, chan_mask, chan_value;
- uint64_t rank_mask, rank_value;
- char *unum, *serial, *part;
- mem_seg_map_t *seg;
- mem_bank_map_t *bm;
- mem_dimm_list_t *dlp;
- mem_grp_t *mg;
- char s[20];
-
- mdesc_dimm_count = md_scan_dag(mdp,
- MDE_INVAL_ELEM_COOKIE, md_find_name(mdp, "dimm_data"),
- md_find_name(mdp, "fwd"), listp);
-
- for (idx = 0; idx < mdesc_dimm_count; idx++) {
-
- if (md_get_prop_str(mdp, listp[idx], "nac", &unum) < 0)
- unum = "";
- if (md_get_prop_str(mdp, listp[idx], "serial#",
- &serial) < 0)
- serial = "";
- if (md_get_prop_str(mdp, listp[idx], "part#",
- &part) < 0)
- part = "";
-
- dm = topo_mod_alloc(mod, sizeof (mem_dimm_map_t));
- dm->dm_label = topo_mod_strdup(mod, unum);
- dm->dm_serid = topo_mod_strdup(mod, serial);
- dm->dm_part = topo_mod_strdup(mod, part);
-
- dm->dm_next = mem->mem_dm;
- mem->mem_dm = dm;
- }
-
- /* N1 (MD) specific segment initialization */
-
- dimms = 0;
- min_chan = 99;
- max_chan = -1;
- min_rank = 99;
- max_rank = -1;
-
- for (d = mem->mem_dm; d != NULL; d = d->dm_next) {
- if (sscanf(d->dm_label, "MB/CMP0/CH%d/R%d/D%d",
- &chan, &rank, &dimm) != 3) /* didn't scan all 3 values */
- return;
- min_chan = MIN(min_chan, chan);
- max_chan = MAX(max_chan, chan);
- min_rank = MIN(min_rank, rank);
- max_rank = MAX(max_rank, rank);
- dimms++;
- }
-
- mdesc_dimm_count = md_scan_dag(mdp,
- MDE_INVAL_ELEM_COOKIE,
- md_find_name(mdp, "mblock"),
- md_find_name(mdp, "fwd"),
- listp);
- sysmem_size = 0;
- for (idx = 0; idx < mdesc_dimm_count; idx++) {
- uint64_t size = 0;
- if (md_get_prop_val(mdp, listp[idx], "size", &size) == 0)
- sysmem_size += size;
- }
-
- for (i = 1 << 30; i < sysmem_size; i = i << 1)
- ;
- if (max_rank > min_rank) {
- chans = dimms/4;
- rank_mask = i >> 1;
- } else {
- chans = dimms/2;
- rank_mask = 0;
- }
-
- chan_mask = (uint64_t)((chans - 1) * MEM_BYTES_PER_CACHELINE);
- mask = rank_mask | chan_mask;
-
- if (chans > 2)
- chan_step = 1;
- else
- chan_step = max_chan - min_chan;
-
- seg = topo_mod_zalloc(mod, sizeof (mem_seg_map_t));
- seg->sm_next = mem->mem_seg;
- mem->mem_seg = seg;
- seg->sm_base = 0;
- seg->sm_size = sysmem_size;
-
- mg = topo_mod_zalloc(mod, sizeof (mem_grp_t));
- seg->sm_grp = mg;
- mem->mem_group = mg;
-
- for (rank = min_rank, rank_value = 0;
- rank <= max_rank;
- rank++, rank_value += rank_mask) {
- for (chan = min_chan, chan_value = 0;
- chan <= max_chan;
- chan += chan_step,
- chan_value += MEM_BYTES_PER_CACHELINE) {
- bm = topo_mod_zalloc(mod, sizeof (mem_bank_map_t));
- bm->bm_mask = mask;
- bm->bm_match = chan_value | rank_value;
- bm->bm_shift = 1;
- bm->bm_grp = mg->mg_bank;
- mg->mg_bank = bm;
- bm->bm_next = mem->mem_bank;
- mem->mem_bank = bm;
- (void) sprintf(s, "MB/CMP0/CH%1d/R%1d", chan, rank);
- idx = 0;
- for (d = mem->mem_dm; d != NULL; d = d->dm_next) {
- if (strncmp(s, d->dm_label, strlen(s)) == 0) {
- dlp = topo_mod_zalloc(mod,
- sizeof (mem_dimm_list_t));
- dlp->dl_next = bm->bm_dlist;
- bm->bm_dlist = dlp;
- dlp->dl_dimm = d;
- }
- }
- }
- }
-}
-
-uint16_t
-mem_log2(uint64_t v)
-{
- uint16_t i;
- for (i = 0; v > 1; i++) {
- v = v >> 1;
- }
- return (i);
-}
-
-mem_dimm_map_t *
-mem_get_dimm_by_sn(char *sn, md_mem_info_t *mem)
-{
- mem_dimm_map_t *dp;
-
- for (dp = mem->mem_dm; dp != NULL; dp = dp->dm_next) {
- if (strcmp(sn, dp->dm_serid) == 0)
- return (dp);
- }
- return (NULL);
-}
-
-mem_grp_t *
-find_grp(mde_cookie_t *listp, size_t n, mde_cookie_t *bclist,
- mem_bank_map_t **banklist, size_t mem_bank_count, md_mem_info_t *mem)
-{
- mem_grp_t *mg;
- mem_bank_map_t *bp;
- size_t i, j;
- int err;
-
- err = 0;
- for (mg = mem->mem_group; mg != NULL; mg = mg->mg_next) {
- if (mg->mg_size == n) {
- err = 0;
- for (i = 0, bp = mg->mg_bank;
- i < n && bp != NULL;
- i++, bp = bp->bm_grp) {
- for (j = 0; j < mem_bank_count; j++) {
- if (listp[i] == *(bclist+j) &&
- bp == *(banklist+j))
- break;
- }
- if (bp == NULL) err++;
- }
- } else {
- err++;
- }
- if (err == 0)
- return (mg);
- }
- return (NULL);
-}
-
-mem_grp_t *
-create_grp(topo_mod_t *mod, mde_cookie_t *listp, size_t n, mde_cookie_t *bclist,
- mem_bank_map_t **banklist, size_t mem_bank_count, md_mem_info_t *mem)
-{
- mem_grp_t *mg;
- size_t i, j;
-
- mg = topo_mod_zalloc(mod, sizeof (mem_grp_t));
- mg->mg_size = n;
- mg->mg_next = mem->mem_group;
- mem->mem_group = mg;
-
- for (i = 0; i < n; i++) {
- for (j = 0; j < mem_bank_count; j++) {
- if (listp[i] == *(bclist+j)) {
- (*(banklist+j))->bm_grp = mg->mg_bank;
- mg->mg_bank = *(banklist+j);
- }
- }
- }
- return (mg);
-}
-
-static void
-mdesc_init_n2(topo_mod_t *mod, md_t *mdp, mde_cookie_t *listp,
- md_mem_info_t *mem, int num_comps)
-{
- mde_cookie_t *dl, *bl, *bclist;
- int bc, idx, mdesc_dimm_count, mdesc_bank_count;
- mem_dimm_map_t *dm, **dp;
- uint64_t i;
- int n;
- uint64_t mask, match, base, size;
- char *unum, *serial, *part, *dash;
- mem_seg_map_t *smp;
- mem_bank_map_t *bmp, **banklist;
- mem_dimm_list_t *dlp;
- mem_grp_t *gmp;
- char *type, *sp, *jnum, *nac;
- size_t ss;
-
- mdesc_dimm_count = 0;
- for (idx = 0; idx < num_comps; idx++) {
- if (md_get_prop_str(mdp, listp[idx], "type", &type) < 0)
- continue;
- if ((strcmp(type, "dimm") == 0) ||
- (strcmp(type, "mem-board") == 0) ||
- (strcmp(type, "memboard") == 0)) {
- mdesc_dimm_count++;
- if (md_get_prop_str(mdp, listp[idx], "nac",
- &nac) < 0)
- nac = "";
- if (md_get_prop_str(mdp, listp[idx], "label",
- &jnum) < 0)
- jnum = "";
- if (md_get_prop_str(mdp, listp[idx],
- "serial_number", &serial) < 0)
- serial = "";
- if (md_get_prop_str(mdp, listp[idx],
- "part_number", &part) < 0)
- part = "";
- if (md_get_prop_str(mdp, listp[idx],
- "dash_number", &dash) < 0)
- dash = "";
-
- ss = strlen(part) + strlen(dash) + 1;
- sp = topo_mod_alloc(mod, ss);
- sp = strcpy(sp, part);
- sp = strncat(sp, dash, strlen(dash) + 1);
-
- dm = topo_mod_alloc(mod, sizeof (mem_dimm_map_t));
-
- if ((strcmp(nac, "") != 0) &&
- (strcmp(jnum, "") != 0)) {
- ss = strlen(nac) + strlen(jnum) + 2;
- unum = topo_mod_alloc(mod, ss);
- (void) snprintf(unum, ss, "%s/%s", nac,
- jnum);
- dm->dm_label = unum;
- } else {
- unum = nac;
- dm->dm_label = topo_mod_strdup(mod, unum);
- }
-
- dm->dm_serid = topo_mod_strdup(mod, serial);
- dm->dm_part = sp;
-
- /* The following is an insertion sort. */
-
- for (dp = &(mem->mem_dm); ; dp = &((*dp)->dm_next)) {
- if ((*dp == NULL) ||
- (strcmp((*dp)->dm_label,
- dm->dm_label) > 0)) {
- dm->dm_next = *dp;
- *dp = dm;
- break;
- }
- }
- }
- }
-
- /* N2 (PRI) specific segment initialization occurs here */
-
- mdesc_bank_count = md_scan_dag(mdp, MDE_INVAL_ELEM_COOKIE,
- md_find_name(mdp, "memory-bank"),
- md_find_name(mdp, "fwd"),
- listp);
-
- /*
- * banklist and bclist will be parallel arrays. For a given bank,
- * bclist[i] will be the PRI node id, and *banklist+i will point to the
- * mem_bank_map_t for that bank.
- */
-
- banklist = topo_mod_zalloc(mod, mdesc_bank_count *
- sizeof (mem_bank_map_t *));
- bclist = topo_mod_zalloc(mod, mdesc_bank_count *
- sizeof (mde_cookie_t));
-
- dl = topo_mod_zalloc(mod, mdesc_dimm_count * sizeof (mde_cookie_t));
-
- for (idx = 0; idx < mdesc_bank_count; idx++) {
- if (md_get_prop_val(mdp, listp[idx], "mask", &mask) < 0)
- mask = 0;
- if (md_get_prop_val(mdp, listp[idx], "match", &match) < 0)
- match = 0;
-
- bmp = topo_mod_zalloc(mod, sizeof (mem_bank_map_t));
- bmp->bm_next = mem->mem_bank;
- mem->mem_bank = bmp;
- bmp->bm_mask = mask;
- bmp->bm_match = match;
- /* link this bank to its dimms */
- n = md_scan_dag(mdp, listp[idx],
- md_find_name(mdp, "component"),
- md_find_name(mdp, "fwd"),
- dl);
- bmp->bm_shift = mem_log2(n);
-
- bclist[idx] = listp[idx];
- *(banklist+idx) = bmp;
-
- for (i = 0; i < n; i++) {
- if (md_get_prop_str(mdp, dl[i],
- "serial_number", &serial) < 0)
- continue;
- if ((dm = mem_get_dimm_by_sn(serial, mem)) == NULL)
- continue;
- dlp = topo_mod_zalloc(mod, sizeof (mem_dimm_list_t));
- dlp->dl_next = bmp->bm_dlist;
- bmp->bm_dlist = dlp;
- dlp->dl_dimm = dm;
- }
- }
- topo_mod_free(mod, dl, mdesc_dimm_count * sizeof (mde_cookie_t));
-
- bl = topo_mod_zalloc(mod, mdesc_bank_count * sizeof (mde_cookie_t));
- n = md_scan_dag(mdp, MDE_INVAL_ELEM_COOKIE,
- md_find_name(mdp, "memory-segment"),
- md_find_name(mdp, "fwd"),
- listp);
- for (idx = 0; idx < n; idx++) {
- if (md_get_prop_val(mdp, listp[idx], "base", &base) < 0)
- base = 0;
- if (md_get_prop_val(mdp, listp[idx], "size", &size) < 0)
- size = 0;
- bc = md_scan_dag(mdp, listp[idx],
- md_find_name(mdp, "memory-bank"),
- md_find_name(mdp, "fwd"),
- bl);
- smp = topo_mod_zalloc(mod, sizeof (mem_seg_map_t));
- smp->sm_next = mem->mem_seg;
- mem->mem_seg = smp;
- smp->sm_base = base;
- smp->sm_size = size;
- gmp = find_grp(bl, bc, bclist, banklist, mdesc_bank_count, mem);
- if (gmp == NULL)
- smp->sm_grp = create_grp(mod, bl, bc,
- bclist, banklist, mdesc_bank_count, mem);
- else
- smp->sm_grp = gmp;
- }
- topo_mod_free(mod, bl, mdesc_bank_count * sizeof (mde_cookie_t));
- topo_mod_free(mod, bclist, mdesc_bank_count * sizeof (mde_cookie_t));
- topo_mod_free(mod, banklist,
- mdesc_bank_count * sizeof (mem_bank_map_t *));
-}
-
-int
-mem_mdesc_init(topo_mod_t *mod, md_mem_info_t *mem)
-{
- int rc = 0;
- md_t *mdp;
- ssize_t bufsiz = 0;
- uint64_t *bufp;
- ldom_hdl_t *lhp;
- mde_cookie_t *listp;
- int num_nodes;
- int num_comps = 0;
- uint32_t type = 0;
-
- /* get the PRI/MD */
- if ((lhp = ldom_init(mem_alloc, mem_free)) == NULL) {
- return (topo_mod_seterrno(mod, EMOD_NOMEM));
- }
- (void) ldom_get_type(lhp, &type);
- if ((type & LDOM_TYPE_CONTROL) != 0) {
- bufsiz = ldom_get_core_md(lhp, &bufp);
- } else {
- bufsiz = ldom_get_local_md(lhp, &bufp);
- }
- if (bufsiz <= 0) {
- topo_mod_dprintf(mod, "failed to get the PRI/MD\n");
- ldom_fini(lhp);
- return (-1);
- }
-
- if ((mdp = md_init_intern(bufp, mem_alloc, mem_free)) == NULL ||
- md_node_count(mdp) <= 0) {
- mem_free(bufp, (size_t)bufsiz);
- ldom_fini(lhp);
- return (-1);
- }
-
- num_nodes = md_node_count(mdp);
- listp = mem_alloc(sizeof (mde_cookie_t) * num_nodes);
-
- num_comps = md_scan_dag(mdp,
- MDE_INVAL_ELEM_COOKIE,
- md_find_name(mdp, "component"),
- md_find_name(mdp, "fwd"),
- listp);
- if (num_comps == 0)
- mdesc_init_n1(mod, mdp, listp, mem);
- else
- mdesc_init_n2(mod, mdp, listp, mem, num_comps);
-
- mem_free(listp, sizeof (mde_cookie_t) * num_nodes);
-
- mem_free(bufp, (size_t)bufsiz);
- (void) md_fini(mdp);
- ldom_fini(lhp);
-
- return (rc);
-}
-
-void
-mem_mdesc_fini(topo_mod_t *mod, md_mem_info_t *mem)
-{
- mem_dimm_map_t *dm, *next;
- mem_dimm_list_t *dl, *nl;
- mem_bank_map_t *bm, *cm;
- mem_grp_t *gm, *hm;
- mem_seg_map_t *sm, *snext;
-
- for (dm = mem->mem_dm; dm != NULL; dm = next) {
- next = dm->dm_next;
- topo_mod_strfree(mod, dm->dm_label);
- topo_mod_strfree(mod, dm->dm_serid);
- topo_mod_strfree(mod, dm->dm_part);
- topo_mod_free(mod, dm, sizeof (mem_dimm_map_t));
- }
- for (bm = mem->mem_bank; bm != NULL; bm = cm) {
- for (dl = bm->bm_dlist; dl != NULL; dl = nl) {
- nl = dl->dl_next;
- topo_mod_free(mod, dl, sizeof (mem_dimm_list_t));
- }
- cm = bm->bm_next;
- topo_mod_free(mod, bm, sizeof (mem_bank_map_t));
- }
- for (gm = mem->mem_group; gm != NULL; gm = hm) {
- hm = gm->mg_next;
- topo_mod_free(mod, gm, sizeof (mem_grp_t));
- }
- for (sm = mem->mem_seg; sm != NULL; sm = snext) {
- snext = sm->sm_next;
- topo_mod_free(mod, sm, sizeof (mem_seg_map_t));
- }
-}
diff --git a/usr/src/lib/fm/topo/modules/sun4v/platform-mem/mem_mdesc.h b/usr/src/lib/fm/topo/modules/sun4v/platform-mem/mem_mdesc.h
deleted file mode 100644
index 68a5a4e128..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/platform-mem/mem_mdesc.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2010 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _MEM_MDESC_H
-#define _MEM_MDESC_H
-
-#include <fm/topo_mod.h>
-#include <sys/fm/ldom.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define MEM_DIMM_MAX 8 /* max FB DIMM depth */
-
-#ifndef MIN
-#define MIN(x, y) ((x) < (y) ? (x) : (y))
-#endif
-
-#ifndef MAX
-#define MAX(x, y) ((x) > (y) ? (x) : (y))
-#endif
-
-typedef struct mem_dimm_map {
- struct mem_dimm_map *dm_next; /* The next DIMM map */
- char *dm_label; /* The UNUM for this DIMM */
- char *dm_serid; /* Cached serial number */
- char *dm_part; /* DIMM part number */
- uint64_t dm_drgen; /* DR gen count for cached S/N */
-} mem_dimm_map_t;
-
-typedef struct mem_dimm_list {
- struct mem_dimm_list *dl_next;
- mem_dimm_map_t *dl_dimm;
-} mem_dimm_list_t;
-
-typedef struct mem_bank_map {
- struct mem_bank_map *bm_next; /* the next bank map overall */
- struct mem_bank_map *bm_grp; /* next bank map in group */
- uint64_t bm_mask;
- uint64_t bm_match;
- uint16_t bm_shift; /* dimms-per-reference shift */
- mem_dimm_list_t *bm_dlist;
-} mem_bank_map_t;
-
-typedef struct mem_grp {
- struct mem_grp *mg_next;
- size_t mg_size;
- mem_bank_map_t *mg_bank;
-} mem_grp_t;
-
-typedef struct mem_seg_map {
- struct mem_seg_map *sm_next; /* the next segment map */
- uint64_t sm_base; /* base address for this segment */
- uint64_t sm_size; /* size for this segment */
- mem_grp_t *sm_grp;
-} mem_seg_map_t;
-
-typedef struct md_mem_info {
- mem_dimm_map_t *mem_dm; /* List supported DIMMs */
-/* uint64_t mem_memconfig; HV memory-configuration-id# */
- mem_seg_map_t *mem_seg; /* list of defined segments */
- mem_bank_map_t *mem_bank;
- mem_grp_t *mem_group; /* groups of banks for a segment */
-} md_mem_info_t;
-
-extern int mem_mdesc_init(topo_mod_t *, md_mem_info_t *);
-extern void mem_mdesc_fini(topo_mod_t *, md_mem_info_t *);
-extern mem_dimm_map_t *mem_get_dimm_by_sn(char *, md_mem_info_t *);
-extern void *mem_alloc(size_t);
-extern void mem_free(void *, size_t);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _MEM_MDESC_H */
diff --git a/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/Makefile b/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/Makefile
deleted file mode 100644
index 455c3219c2..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/Makefile
+++ /dev/null
@@ -1,44 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
-#
-
-MODULE = sun4vpi
-ARCH = sun4v
-CLASS = arch
-TOPODIR = ../../../libtopo/common
-
-MODULESRCS = pi_defer.c pi_ldom.c pi_walker.c pi_subr.c \
- pi_cpu.c pi_mem.c pi_generic.c pi_pciexrc.c \
- pi_hostbridge.c pi_niu.c pi_top.c sun4vpi.c \
- pi_meth.c pi_bay.c
-
-include ../../Makefile.plugin
-
-LDLIBS += -ldevinfo -lmdesc -lldom -luutil
-
-CPPFLAGS += -I. -I$(ROOT)/usr/platform/sun4v/include -I$(TOPODIR)
-
-%.o: ../../../../../common/mdesc/%.c
- $(COMPILE.c) $<
- $(CTFCONVERT_O)
diff --git a/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_bay.c b/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_bay.c
deleted file mode 100644
index a655fb09fc..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_bay.c
+++ /dev/null
@@ -1,496 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2010, Oracle and/or its affiliates. All rights reserved.
- */
-
-/*
- * Create a topology node for a PRI node of type 'bay'. Call the disk
- * enumerator to enumerate any disks that may be attached.
- */
-
-#include <sys/types.h>
-#include <strings.h>
-#include <sys/fm/protocol.h>
-#include <fm/topo_mod.h>
-#include <fm/topo_hc.h>
-#include <libdevinfo.h>
-#include <sys/pci.h>
-#include <sys/mdesc.h>
-#include "pi_impl.h"
-
-#define _ENUM_NAME "enum_bay"
-#define HBA_DRV_NAME "mpt_sas"
-#define DEVICES "/devices"
-
-#define PI_BAY_AP DDI_NT_SCSI_ATTACHMENT_POINT
-#define PI_MAX_LUN 255
-
-static boolean_t MPxIO_ENABLED = B_FALSE;
-
-static const topo_pgroup_info_t io_pgroup = {
- TOPO_PGROUP_IO,
- TOPO_STABILITY_PRIVATE,
- TOPO_STABILITY_PRIVATE,
- 1
-};
-
-static const topo_pgroup_info_t binding_pgroup = {
- TOPO_PGROUP_BINDING,
- TOPO_STABILITY_PRIVATE,
- TOPO_STABILITY_PRIVATE,
- 1
-};
-
-
-/*
- * Return the MPxIO occupant path bay property.
- *
- * The string must be freed with topo_mod_strfree().
- */
-static char *
-pi_bay_ocpath(topo_mod_t *mod, di_node_t dnode)
-{
-
- int lun;
- boolean_t got_w;
- char buf[MAXPATHLEN];
- char *tgt_port = NULL;
-
- /* 'target-port' property */
- tgt_port = pi_get_target_port(mod, dnode);
- if (tgt_port == NULL) {
- topo_mod_dprintf(mod, "pi_bay_ocpath: failed to get "
- "'target-port' property\n");
- return (NULL);
- }
-
- /* 'lun' property */
- lun = pi_get_lun(mod, dnode);
- if (lun < 0 || lun > PI_MAX_LUN) {
- topo_mod_dprintf(mod, "pi_bay_ocpath: failed to get 'lun' "
- "property\n");
- topo_mod_strfree(mod, tgt_port);
- return (NULL);
- }
-
- /* 'target-port' leading 'w' is not consistent */
- got_w = tgt_port[0] == 'w' ? B_TRUE : B_FALSE;
-
- /*
- * Build occupatnt path:
- * 'devfs_path' + "/disk@w" + 'target-port' + "," + 'lun'
- */
- (void) snprintf(buf, MAXPATHLEN, "%s%s%s,%x", di_devfs_path(dnode),
- (got_w ? "/disk@" : "/disk@w"), tgt_port, lun);
-
- topo_mod_strfree(mod, tgt_port);
- return (topo_mod_strdup(mod, buf));
-}
-
-
-/*
- * Create bay "io" pgroup, create and add "ap_path" property.
- * Create bay "binding" pgroup, create and add "oc_path" property.
- */
-static int
-pi_bay_pgroups(topo_mod_t *mod, tnode_t *t_node, di_node_t cnode,
- di_minor_t cminor)
-{
- int rv;
- int err;
- char *ap_path;
- char *oc_path;
-
- /* Create "io" pgroup and attachment point. */
- rv = topo_pgroup_create(t_node, &io_pgroup, &err);
- if (rv != 0) {
- topo_mod_dprintf(mod, "pi_bay_pgroups: failed to create "
- "\"io\" pgroup: %s\n", topo_mod_seterrno(mod, err));
- return (err);
- }
-
- /*
- * Create the ap_path property:
- */
- ap_path = topo_mod_alloc(mod, MAXPATHLEN);
- if (ap_path == NULL) {
- topo_mod_dprintf(mod, "pi_bay_pgroups: EMOD_NOMEM for "
- "ap_path\n");
- return (topo_mod_seterrno(mod, EMOD_NOMEM));
- }
-
- /* attachment point path: "/devices" + minor node path */
- (void) snprintf(ap_path, MAXPATHLEN, "%s%s", DEVICES,
- di_devfs_minor_path(cminor));
- topo_mod_dprintf(mod, "pi_bay_pgroups: ap_path (%s)\n", ap_path);
-
- /* add ap_path prop to io pgroup */
- rv = topo_prop_set_string(t_node, TOPO_PGROUP_IO, TOPO_IO_AP_PATH,
- TOPO_PROP_IMMUTABLE, ap_path, &err);
- if (rv != 0) {
- topo_mod_dprintf(mod, "pi_bay_pgroups: failed to set "
- "ap-path: %s\n", topo_strerror(err));
- topo_mod_free(mod, ap_path, MAXPATHLEN);
- (void) topo_mod_seterrno(mod, err);
- return (err);
- }
- topo_mod_free(mod, ap_path, MAXPATHLEN);
-
- /* Create "binding" pgroup */
- rv = topo_pgroup_create(t_node, &binding_pgroup, &err);
- if (rv != 0) {
- topo_mod_dprintf(mod, "pi_bay_pgroups: failed to "
- "create \"binding\" pgroup: %s\n", topo_strerror(err));
- (void) topo_mod_seterrno(mod, err);
- return (err);
- }
-
- /*
- * Create the oc_path property:
- */
- if (MPxIO_ENABLED) {
- oc_path = pi_bay_ocpath(mod, cnode);
- } else {
- oc_path = di_devfs_path(cnode);
- }
- if (oc_path == NULL) {
- topo_mod_dprintf(mod, "pi_bay_pgroups: no occupant path\n");
- return (-1);
- }
- topo_mod_dprintf(mod, "pi_bay_proups: oc_path (%s)\n", oc_path);
-
- /* add oc_path to binding pgroup */
- rv = topo_prop_set_string(t_node, TOPO_PGROUP_BINDING,
- TOPO_BINDING_OCCUPANT, TOPO_PROP_IMMUTABLE, oc_path, &err);
- if (rv != 0) {
- topo_mod_dprintf(mod, "pi_bay_pgroups: failed to set "
- "oc_path: %s\n", topo_strerror(err));
- (void) topo_mod_seterrno(mod, err);
- rv = err;
- }
-
- if (MPxIO_ENABLED) {
- topo_mod_strfree(mod, oc_path);
- } else {
- di_devfs_path_free(oc_path);
- }
- return (rv);
-}
-
-
-/*
- * Find the child devinfo node of the HBA that matches the PHY, capture the
- * minor attachment point node.
- */
-static void
-pi_bay_find_nodes(topo_mod_t *mod, di_node_t *nodep, di_node_t *sibp,
- di_minor_t *minorp, int phy)
-{
- di_node_t sib = DI_NODE_NIL;
- di_node_t gsib = DI_NODE_NIL;
- di_minor_t minor = DI_MINOR_NIL;
-
- /*
- * When MPxIO is enabled the child node of the HBA (iport) contains
- * the pathinfo property we're looking for; when MPxIO is disabled
- * the grand-child of the HBA (disk) contains the devinfo property
- * we're looking for.
- */
- sib = di_child_node(*nodep);
- while (sib != DI_NODE_NIL) {
- /* match the PHY */
- if (phy == pi_get_phynum(mod, sib)) {
- while ((minor = di_minor_next(sib, minor)) !=
- DI_MINOR_NIL) {
- /* scsi attachment point */
- if (strncmp(di_minor_nodetype(minor),
- PI_BAY_AP,
- strlen(di_minor_nodetype(minor))) == 0) {
- goto out;
- }
- }
- } else {
- /* look in grandchildren */
- gsib = di_child_node(sib);
- while (gsib != DI_NODE_NIL) {
- /* match the PHY */
- if (phy == pi_get_phynum(mod, gsib)) {
- while ((minor = di_minor_next(sib,
- minor)) != DI_MINOR_NIL) {
- /* scsi attachment point */
- if (strncmp(
- di_minor_nodetype(minor),
- PI_BAY_AP,
- strlen(di_minor_nodetype(
- minor))) == 0) {
- sib = gsib;
- goto out;
- }
- }
- }
- gsib = di_sibling_node(gsib);
- }
- }
- sib = di_sibling_node(sib);
- }
-out:
- if (sib == DI_NODE_NIL) {
- *sibp = DI_NODE_NIL;
- } else {
- bcopy(&sib, sibp, sizeof (di_node_t));
- }
-
- if (minor == DI_MINOR_NIL) {
- *minorp = DI_MINOR_NIL;
- } else {
- bcopy(&minor, minorp, sizeof (di_minor_t));
- }
-}
-
-
-/*
- * Decoreate "bay" node with required properties for disk enumerator.
- */
-static int
-pi_bay_update_node(topo_mod_t *mod, tnode_t *t_node, uint8_t phy,
- char *pri_path)
-{
- int rv;
- char *hba_path;
- char *mpxio_prop;
- di_node_t devtree;
- di_node_t dnode, sib;
- di_minor_t minor = DI_MINOR_NIL;
-
- /*
- * The hba path and bay PHY come from the PRI; find the
- * driver node that coresponds to the PHY and it's minor
- * node name and create the occupant path/attachmeent_point
- * path
- */
- devtree = di_init("/", DINFOFORCE | DINFOSUBTREE | DINFOMINOR |
- DINFOPROP | DINFOPATH);
-
- for (dnode = di_drv_first_node(HBA_DRV_NAME, devtree);
- dnode != DI_NODE_NIL;
- dnode = di_drv_next_node(dnode)) {
- /* find the dnode path that matches the pri path */
- hba_path = pi_get_dipath(mod, dnode);
- if (strcmp(pri_path, hba_path) == 0) {
- /* found our dnode */
- topo_mod_strfree(mod, hba_path);
- break;
- }
- topo_mod_strfree(mod, hba_path);
- }
- if (dnode == DI_NODE_NIL) {
- topo_mod_dprintf(mod, "pi_bay_update_node: failed to find "
- "devinfo path.\n");
- return (-1);
- }
-
- /*
- * The "mpxio-disable" variable determines if MPxIO (multipathing)
- * is disabled (or enabled).
- */
- if (di_prop_lookup_strings(DDI_DEV_T_ANY, dnode, "mpxio-disable",
- &mpxio_prop) < 0) {
- /* no way to determine if MPxIO is enabled */
- topo_mod_dprintf(mod,
- "pi_bay_update_node: no \"mpxio-disable\" property\n");
- return (-1);
- }
-
- /* set MPxIO_ENABLED inverse to "mpxio-disable" */
- topo_mod_dprintf(mod, "\"mpxio-disable\" = (%s)\n", mpxio_prop);
- MPxIO_ENABLED = strncmp("no", mpxio_prop, strlen(mpxio_prop)) == 0 ?
- B_TRUE : B_FALSE;
- topo_mod_dprintf(mod, "MPxIO_ENABLED: %s\n", MPxIO_ENABLED ? "TRUE" :
- "FALSE");
-
- /*
- * Find the child node matching the PRI phy_number and determine the
- * minor attachment point.
- */
- pi_bay_find_nodes(mod, &dnode, &sib, &minor, phy);
- if (sib == DI_NODE_NIL || minor == DI_MINOR_NIL) {
- topo_mod_dprintf(mod, "pi_bay_update_node: no disk on "
- "PHY %d.\n", phy);
- return (-1);
- }
-
- /* add pgroups */
- rv = pi_bay_pgroups(mod, t_node, sib, minor);
- if (rv != 0) {
- topo_mod_dprintf(mod, "pi_bay_update_node: failed to add "
- "pgroups.\n", _ENUM_NAME);
- return (rv);
- }
- return (0);
-}
-
-/* ARGSUSED */
-int
-pi_enum_bay(topo_mod_t *mod, md_t *mdp, mde_cookie_t mde_node,
- topo_instance_t inst, tnode_t *t_parent, const char *hc_name,
- tnode_t **t_node)
-{
- int i, rv;
- int min = 0, max = 0;
- int num_arcs;
- int nphy;
- size_t arcsize;
- uint8_t *phy = NULL;
- char *hba_pri_path;
- mde_cookie_t *arcp;
-
- /* count how many PHYs the bay node has */
- nphy = pi_get_priphy(mod, mdp, mde_node, phy);
- if (nphy <= 0) {
- topo_mod_dprintf(mod, "%s: node_0x%llx has no PHY\n",
- _ENUM_NAME, (uint64_t)mde_node);
- return (-1);
- }
-
- phy = topo_mod_alloc(mod, (nphy * sizeof (uint8_t)));
- if (phy == NULL) {
- topo_mod_dprintf(mod, "%s: node_0x%llx ENOMEM\n",
- _ENUM_NAME, (uint64_t)mde_node);
- return (-1);
- }
-
- /* get the PHY(s) for this bay node */
- rv = pi_get_priphy(mod, mdp, mde_node, phy);
- if (rv != nphy) {
- topo_mod_dprintf(mod, "%s: node_0x%llx failed to get PHY\n",
- _ENUM_NAME, (uint64_t)mde_node);
- return (-1);
- }
- topo_mod_dprintf(mod, "%s: node_0x%llx PHY: %d\n", _ENUM_NAME,
- mde_node, *phy);
-
- /* determine how many parent (HBA) nodes */
- num_arcs = md_get_prop_arcs(mdp, mde_node, MD_STR_BACK, NULL, 0);
- if (num_arcs == 0) {
- topo_mod_dprintf(mod, "%s: node_0x%llx has no \"back\" arcs\n",
- _ENUM_NAME, (uint64_t)mde_node);
- return (-1); /* return partial here? */
- }
- topo_mod_dprintf(mod, "%s: node_0x%llx has %d \"back\" arcs\n",
- _ENUM_NAME, mde_node, num_arcs);
-
- /* get the "back" nodes */
- arcsize = sizeof (mde_cookie_t) * num_arcs;
- arcp = topo_mod_zalloc(mod, arcsize);
- if (arcp == NULL) {
- topo_mod_dprintf(mod, "%s: no memory\n", _ENUM_NAME);
- (void) topo_mod_seterrno(mod, EMOD_NOMEM);
- return (-1);
- }
- num_arcs = md_get_prop_arcs(mdp, mde_node, MD_STR_BACK, arcp, arcsize);
-
- /* make sure there are as many HBA nodes as PHYs */
- if (num_arcs != nphy) {
- topo_mod_dprintf(mod, "%s: %d PHYs for %d back arcs.\n",
- _ENUM_NAME, nphy, num_arcs);
- return (-1);
- }
-
- /* create topo bay node for each HBA attached to this bay */
- for (i = 0; i < num_arcs; i++) {
- /* skip if topo-hc-skip = 1 */
- if (pi_skip_node(mod, mdp, arcp[i])) {
- topo_mod_dprintf(mod, "%s: skipping node_0x%llx\n",
- (uint64_t)arcp[i]);
- continue;
- }
-
- /*
- * Create a generic "bay" node; decorate below.
- *
- * If we have more than one HBA the bay inst here will be
- * the same for both. This is okay since the paths will
- * be different for each HBA.
- */
- rv = pi_enum_generic_impl(mod, mdp, mde_node, inst, t_parent,
- t_parent, hc_name, _ENUM_NAME, t_node, 0);
- if (rv != 0 || *t_node == NULL) {
- topo_mod_dprintf(mod,
- "%s: node_0x%llx failed to create topo node: %s\n",
- _ENUM_NAME, (uint64_t)mde_node,
- topo_strerror(topo_mod_errno(mod)));
- return (rv);
- }
-
- /* must be an ses expander if no path property - skip */
- rv = md_get_prop_str(mdp, arcp[i], MD_STR_PATH, &hba_pri_path);
- if (rv != 0 || hba_pri_path == NULL ||
- strlen(hba_pri_path) == 0) {
- topo_mod_dprintf(mod, "%s: node_0x%llx: no path "
- "property\n", _ENUM_NAME, (uint64_t)arcp[i]);
- continue;
- }
-
- /* Decorate the bay tnode */
- rv = pi_bay_update_node(mod, *t_node, phy[i], hba_pri_path);
- if (rv != 0) {
- topo_mod_dprintf(mod, "%s: failed to update "
- "node_0x%llx.\n", _ENUM_NAME, (uint64_t)mde_node);
- continue;
- }
-
-
- /*
- * Call the disk enum passing in decorated bay tnode.
- */
- if (topo_mod_load(mod, DISK, TOPO_VERSION) == NULL) {
- topo_mod_dprintf(mod,
- "%s: Failed to load %s module: %s\n",
- _ENUM_NAME, DISK,
- topo_strerror(topo_mod_errno(mod)));
- return (topo_mod_errno(mod));
- }
-
- rv = topo_node_range_create(mod, *t_node, DISK, min, max);
- if (rv != 0) {
- topo_mod_dprintf(mod,
- "%s: failed to create range: %s\n", _ENUM_NAME,
- topo_strerror(topo_mod_errno(mod)));
- return (topo_mod_errno(mod));
- }
-
- rv = topo_mod_enumerate(mod, *t_node, DISK, DISK, min, max,
- NULL);
- if (rv != 0) {
- topo_mod_dprintf(mod,
- "%s: %s enumeration failed: %s\n", _ENUM_NAME,
- DISK, topo_strerror(topo_mod_errno(mod)));
- return (topo_mod_errno(mod));
- }
- }
-
- /* clean up */
- topo_mod_free(mod, arcp, arcsize);
- topo_mod_free(mod, phy, (nphy * sizeof (uint8_t)));
- return (0);
-}
diff --git a/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_cpu.c b/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_cpu.c
deleted file mode 100644
index 973a3906c6..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_cpu.c
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * Enumerate a CPU node
- */
-#include <sys/types.h>
-#include <strings.h>
-#include <sys/fm/protocol.h>
-#include <fm/topo_mod.h>
-#include <fm/topo_hc.h>
-#include "pi_impl.h"
-
-#define _ENUM_NAME "enum_cpu"
-
-typedef struct cpuwalk_s {
- topo_mod_t *mod;
- char *serial;
-} cpuwalk_t;
-
-static int pi_enum_cpu_serial(topo_mod_t *, md_t *, mde_cookie_t, char **);
-static int pi_enum_cpu_serial_cb(md_t *, mde_cookie_t, mde_cookie_t, void *);
-
-int
-pi_enum_cpu(topo_mod_t *mod, md_t *mdp, mde_cookie_t mde_node,
- topo_instance_t inst, tnode_t *t_parent, const char *hc_name,
- tnode_t **t_node)
-{
- int result;
- int err;
- int cpumask;
- nvlist_t *asru = NULL;
- char *serial = NULL;
-
- *t_node = NULL;
-
- /*
- * Create the basic topology node for the CPU using the generic
- * enumerator.
- */
- result = pi_enum_generic_impl(mod, mdp, mde_node, inst, t_parent,
- t_parent, hc_name, _ENUM_NAME, t_node, 0);
- if (result != 0) {
- /* Error messages are printed by the generic routine */
- return (result);
- }
-
- /*
- * If the hc_name is "chip" or "core", set asru to resource,
- * otherwise for "cpu" and "strand", set asru to CPU scheme FMRI.
- */
- if (strcmp(hc_name, CHIP) == 0 || strcmp(hc_name, CORE) == 0) {
- result = topo_node_resource(*t_node, &asru, &err);
- if (result != 0) {
- topo_mod_dprintf(mod,
- "%s node_0x%llx failed to get resource: %s\n",
- _ENUM_NAME, (uint64_t)mde_node, topo_strerror(err));
- return (-1);
- }
- } else {
- /*
- * Compute ASRU for "cpu" and "strand" node.
- * Get the parameters required to create an FMRI. The cpumask
- * is on the chip itself and while it may be part of an ereport
- * payload is unavailable here, so we set it to zero.
- */
- cpumask = 0;
-
- /*
- * Find the serial number, which is on the "chip" node, not the
- * "cpu" node.
- */
- result = pi_enum_cpu_serial(mod, mdp, mde_node, &serial);
- if (result != 0 || serial == NULL) {
- topo_mod_dprintf(mod,
- "%s node_0x%llx failed to find serial number.\n",
- _ENUM_NAME, (uint64_t)mde_node);
- return (result);
- }
-
- /*
- * Create a CPU scheme FMRI and set it as the ASRU for the CPU
- * node
- */
- asru = topo_mod_cpufmri(mod, FM_CPU_SCHEME_VERSION, inst,
- cpumask, serial);
- topo_mod_strfree(mod, serial);
- if (asru == NULL) {
- topo_mod_dprintf(mod, "%s node_0x%llx failed to "
- "compute cpu scheme ASRU: %s\n",
- _ENUM_NAME, (uint64_t)mde_node,
- topo_strerror(topo_mod_errno(mod)));
- return (-1);
- }
- }
-
- /* Set the ASRU on the node without flags (the 0) */
- result = topo_node_asru_set(*t_node, asru, 0, &err);
- nvlist_free(asru);
- if (result != 0) {
- topo_mod_dprintf(mod,
- "%s node_0x%llx failed to set ASRU: %s\n", _ENUM_NAME,
- (uint64_t)mde_node, topo_strerror(err));
- return (-1);
- }
-
- return (0);
-}
-
-
-static int
-pi_enum_cpu_serial(topo_mod_t *mod, md_t *mdp, mde_cookie_t mde_node,
- char **serial)
-{
- int result;
- cpuwalk_t args;
- mde_str_cookie_t component_cookie;
- mde_str_cookie_t back_cookie;
-
- args.mod = mod;
- args.serial = NULL;
-
- /*
- * Search backwards through the PRI graph, starting at the current
- * strand (aka cpu) mde_node, and find the MD_STR_CHIP node. This
- * node has the serial number for the cpu.
- */
- component_cookie = md_find_name(mdp, MD_STR_COMPONENT);
- back_cookie = md_find_name(mdp, MD_STR_BACK);
-
- result = md_walk_dag(mdp, mde_node, component_cookie, back_cookie,
- pi_enum_cpu_serial_cb, (void *)&args);
- *serial = args.serial;
-
- return (result);
-}
-
-
-/*ARGSUSED*/
-static int
-pi_enum_cpu_serial_cb(md_t *mdp, mde_cookie_t mde_parent,
- mde_cookie_t mde_node, void *private)
-{
- char *hc_name;
- cpuwalk_t *args = (cpuwalk_t *)private;
-
- if (args == NULL) {
- return (MDE_WALK_ERROR);
- }
- args->serial = NULL;
-
- hc_name = pi_get_topo_hc_name(args->mod, mdp, mde_node);
- if (hc_name != NULL && strcmp(hc_name, MD_STR_CHIP) == 0) {
- args->serial = pi_get_serial(args->mod, mdp, mde_node);
- }
- topo_mod_strfree(args->mod, hc_name);
-
- return ((args->serial == NULL ? MDE_WALK_NEXT : MDE_WALK_DONE));
-}
diff --git a/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_defer.c b/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_defer.c
deleted file mode 100644
index d8e1e9f65f..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_defer.c
+++ /dev/null
@@ -1,239 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2010 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * Some topology creation routines may need to defer completing enumeration
- * until after the entire PRI graph has been visited. This file includes
- * the interfaces necessary to permit these routines to do this in a general
- * way.
- */
-
-#include <sys/types.h>
-#include <sys/time.h>
-#include <stddef.h>
-#include <inttypes.h>
-#include <strings.h>
-#include <string.h>
-#include <libuutil.h>
-#include <libnvpair.h>
-#include <sys/mdesc.h>
-#include <fm/topo_mod.h>
-#include <fm/topo_hc.h>
-#include "pi_impl.h"
-
-static uu_list_pool_t *defer_pool = NULL;
-static uu_list_t *defer_list = NULL;
-
-struct pi_defernode_s {
- uu_list_node_t defer_node;
-
- mde_cookie_t mde_node; /* MDE node index */
- tnode_t *t_parent; /* Parent topology node */
- tnode_t *t_node; /* Topo node associated with MDE node */
- void *private; /* Private data for defer routine */
-
- pi_deferenum_fn_t *func; /* Defered enumeration routine */
-};
-typedef struct pi_defernode_s pi_defernode_t;
-
-/* Routines to handle the list of topology parents and mde_nodes */
-static int pi_deferlist_create(topo_mod_t *);
-static int pi_deferlist_compare(const void *, const void *, void *);
-
-
-/*
- * Add a new routine to the list of deferred enumeration routines
- */
-int
-pi_defer_add(topo_mod_t *mod, mde_cookie_t mde_node, tnode_t *t_parent,
- tnode_t *t_node, pi_deferenum_fn_t func, void *private)
-{
- int result;
- uu_list_index_t idx;
- pi_defernode_t *dnp;
-
- if (defer_list == NULL) {
- result = pi_deferlist_create(mod);
- if (result != 0) {
- return (result);
- }
- }
-
- /*
- * Create a data structure to store information about the node for
- * which to defer enumeration. The defer_pool is created by the
- * list creation routine, above.
- */
- dnp = topo_mod_zalloc(mod, sizeof (pi_defernode_t));
- if (dnp == NULL) {
- (void) topo_mod_seterrno(mod, EMOD_NOMEM);
- return (-1);
- }
- uu_list_node_init(dnp, &(dnp->defer_node), defer_pool);
-
- dnp->mde_node = mde_node;
- dnp->t_parent = t_parent;
- dnp->t_node = t_node;
- dnp->private = private;
- dnp->func = func;
-
- (void) uu_list_find(defer_list, dnp, NULL, &idx);
- uu_list_insert(defer_list, dnp, idx);
-
- return (0);
-}
-
-
-/*
- * Execute the list of deferred enumeration routines, destroying the list as
- * we go.
- */
-int
-pi_defer_exec(topo_mod_t *mod, md_t *mdp)
-{
- int result;
-
- void *dvp;
- pi_defernode_t *dp;
- topo_instance_t inst;
- mde_cookie_t mde_node;
- tnode_t *t_parent;
- tnode_t *t_node;
- void *private;
- char *hc_name;
-
- pi_deferenum_fn_t *func;
-
- topo_mod_dprintf(mod, "beginning deferred enumerator execution\n");
- if (defer_list == NULL) {
- topo_mod_dprintf(mod, "no deferred enumerators. done.\n");
- return (0);
- }
-
- while ((dvp = uu_list_first(defer_list)) != NULL) {
- /* Extract the necessary information from the defernode_t */
- dp = (pi_defernode_t *)dvp;
- mde_node = dp->mde_node;
- t_parent = dp->t_parent;
- t_node = dp->t_node;
- private = dp->private;
- func = dp->func;
-
- /*
- * Remove the element from the list. Once we are done calling
- * the routine we do not need it any more.
- */
- uu_list_remove(defer_list, dvp);
- uu_list_node_fini(dp, &(dp->defer_node), defer_pool);
- topo_mod_free(mod, dp, sizeof (pi_defernode_t));
-
- /* Get the instance value from the mde node */
- if (pi_get_instance(mod, mdp, mde_node, &inst) != 0) {
- topo_mod_dprintf(mod, "deferred node_0x%llx invalid\n",
- (uint64_t)mde_node);
-
- /* Move on to the next node */
- (void) topo_mod_seterrno(mod, EMOD_PARTIAL_ENUM);
- continue;
- }
-
- /* Get the hc name from the mde node */
- hc_name = pi_get_topo_hc_name(mod, mdp, mde_node);
- if (hc_name == NULL) {
- topo_mod_dprintf(mod,
- "deferred node_0x%llx has invalid NULL hc_name\n",
- (uint64_t)mde_node);
-
- /* Move on to the next node */
- (void) topo_mod_seterrno(mod, EMOD_PARTIAL_ENUM);
- continue;
- }
- topo_mod_dprintf(mod,
- "calling deferred enumerator for node_0x%llx\n",
- (uint64_t)mde_node);
-
- /* Call the deferred enumeration function */
- result = (func)(mod, mdp, mde_node, inst, t_parent, hc_name,
- t_node, private);
- if (result != 0) {
- topo_mod_dprintf(mod,
- "deferred enumeration for node_0x%llx failed\n",
- (uint64_t)mde_node);
- (void) topo_mod_seterrno(mod, EMOD_PARTIAL_ENUM);
- }
-
- /* Clean up from the deferred call */
- topo_mod_strfree(mod, hc_name);
- }
- topo_mod_dprintf(mod, "deferred enumeration completed.\n");
-
- uu_list_destroy(defer_list);
- uu_list_pool_destroy(defer_pool);
- defer_list = NULL;
- defer_pool = NULL;
-
- return (0);
-}
-
-
-static int
-pi_deferlist_create(topo_mod_t *mod)
-{
- /* Initialize the uutil list structure */
- defer_pool = uu_list_pool_create("pi_defer_pool",
- sizeof (pi_defernode_t), offsetof(pi_defernode_t, defer_node),
- pi_deferlist_compare, 0);
- if (defer_pool == NULL) {
- (void) topo_mod_seterrno(mod, EMOD_NOMEM);
- return (-1);
- }
- defer_list = uu_list_create(defer_pool, NULL, 0);
- if (defer_list == NULL) {
- uu_list_pool_destroy(defer_pool);
- defer_pool = NULL;
- (void) topo_mod_seterrno(mod, EMOD_NOMEM);
- return (-1);
- }
-
- return (0);
-}
-
-
-/* ARGSUSED */
-static int
-pi_deferlist_compare(const void *l_arg, const void *r_arg, void *private)
-{
- pi_defernode_t *lp = (pi_defernode_t *)l_arg;
- pi_defernode_t *rp = (pi_defernode_t *)r_arg;
-
- if (lp->func != rp->func) {
- return (1);
- }
- if (lp->t_parent != rp->t_parent) {
- return (-1);
- }
- return (0);
-}
diff --git a/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_generic.c b/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_generic.c
deleted file mode 100644
index 5255e88e85..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_generic.c
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * Create a generic topology node for a given PRI node.
- */
-#include <sys/types.h>
-#include <strings.h>
-#include <sys/fm/protocol.h>
-#include <fm/topo_mod.h>
-#include <fm/topo_hc.h>
-#include "pi_impl.h"
-
-#define _ENUM_NAME "enum_generic"
-
-/* Topo methods definitions */
-extern nvlist_t *pi_meths;
-
-int
-pi_enum_generic(topo_mod_t *mod, md_t *mdp, mde_cookie_t mde_node,
- topo_instance_t inst, tnode_t *t_parent, const char *hc_name,
- tnode_t **t_node)
-{
- int result;
-
- /*
- * For a generic node that is not a top-level node, we use the
- * same parent topology node to generate the FMRI as well as
- * to bind the new node.
- */
- result = pi_enum_generic_impl(mod, mdp, mde_node, inst, t_parent,
- t_parent, hc_name, _ENUM_NAME, t_node, 0);
-
- return (result);
-}
-
-
-/*
- * Create a generic topo node based on the PRI information in the machine
- * description information.
- */
-int
-pi_enum_generic_impl(topo_mod_t *mod, md_t *mdp, mde_cookie_t mde_node,
- topo_instance_t inst, tnode_t *t_bindparent, tnode_t *t_fmriparent,
- const char *hc_name, const char *enum_name, tnode_t **t_node, int flag)
-{
- nvlist_t *fmri;
- nvlist_t *auth;
- uint64_t maddr;
- char *serial = NULL;
-
- topo_mod_dprintf(mod, "%s adding entry for node_0x%llx type %s\n",
- enum_name, (uint64_t)mde_node, hc_name);
-
- if (t_bindparent == NULL) {
- topo_mod_dprintf(mod,
- "%s called with NULL parent for node_0x%llx type %s\n",
- enum_name, (uint64_t)mde_node, hc_name);
- return (-1);
- }
-
- /* Create the FMRI for this node */
- auth = topo_mod_auth(mod, t_bindparent);
- if (flag & SUN4VPI_ENUM_ADD_SERIAL)
- serial = pi_get_serial(mod, mdp, mde_node);
-
- fmri = topo_mod_hcfmri(mod, t_fmriparent, FM_HC_SCHEME_VERSION, hc_name,
- inst, NULL, auth, NULL, NULL, serial);
-
- if (serial != NULL)
- topo_mod_strfree(mod, serial);
- nvlist_free(auth);
-
- if (fmri == NULL) {
- topo_mod_dprintf(mod,
- "%s failed to create fmri node_0x%llx: %s\n", enum_name,
- (uint64_t)mde_node, topo_strerror(topo_mod_errno(mod)));
- return (-1);
- }
-
- /* Bind this node to the parent */
- *t_node = pi_node_bind(mod, mdp, mde_node, t_bindparent, hc_name, inst,
- fmri);
- nvlist_free(fmri);
- if (*t_node == NULL) {
- topo_mod_dprintf(mod,
- "%s failed to bind node_0x%llx instance %d: %s\n",
- enum_name, (uint64_t)mde_node, (uint32_t)inst,
- topo_strerror(topo_mod_errno(mod)));
- return (-1);
- }
-
- /* Register topo methods that match hc_name */
- if (nvlist_lookup_uint64(pi_meths, hc_name, &maddr) == 0 &&
- topo_method_register(mod, *t_node,
- (topo_method_t *)(uintptr_t)maddr) != 0)
- topo_mod_dprintf(mod,
- "failed to register methods for node_0x%llx type %s\n",
- (uint64_t)mde_node, hc_name);
-
- topo_mod_dprintf(mod, "%s added node_0x%llx type %s\n",
- enum_name, (uint64_t)mde_node, hc_name);
-
- return (0);
-}
diff --git a/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_hostbridge.c b/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_hostbridge.c
deleted file mode 100644
index d4cf6b4be2..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_hostbridge.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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.
- */
-
-/*
- * Create a topology node for a PRI node of type 'hostbridge'
- */
-#include <sys/types.h>
-#include <strings.h>
-#include <sys/fm/protocol.h>
-#include <fm/topo_mod.h>
-#include <fm/topo_hc.h>
-#include "pi_impl.h"
-
-#define _ENUM_NAME "enum_hostbridge"
-
-
-/*
- * Create a hostbridge topo node.
- */
-int
-pi_enum_hostbridge(topo_mod_t *mod, md_t *mdp, mde_cookie_t mde_node,
- topo_instance_t inst, tnode_t *t_parent, const char *hc_name,
- tnode_t **t_node)
-{
- int result;
-
- topo_mod_dprintf(mod, "%s called for node_0x%llx type %s\n",
- _ENUM_NAME, (uint64_t)mde_node, hc_name);
-
- *t_node = NULL;
-
- /*
- * Create the hostbridge topo node. Use the generic enumerator to
- * do this, and then we will add more attributes below.
- */
- result = pi_enum_generic_impl(mod, mdp, mde_node, inst, t_parent,
- t_parent, hc_name, _ENUM_NAME, t_node, 0);
- if (result != 0 || *t_node == NULL) {
- topo_mod_dprintf(mod,
- "%s node_0x%llx failed to create topo node: %s\n",
- _ENUM_NAME, (uint64_t)mde_node,
- topo_strerror(topo_mod_errno(mod)));
- return (result);
- }
-
- /* Update the topo node with more specific information */
- result = pi_enum_update(mod, mdp, mde_node, t_parent, *t_node,
- hc_name);
- if (result != 0) {
- topo_mod_dprintf(mod,
- "%s node_0x%llx failed to create node properites: %s\n",
- _ENUM_NAME, (uint64_t)mde_node,
- topo_strerror(topo_mod_errno(mod)));
- return (result);
- }
-
- topo_mod_dprintf(mod, "%s added node_0x%llx type %s\n",
- _ENUM_NAME, (uint64_t)mde_node, hc_name);
-
- return (result);
-}
diff --git a/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_impl.h b/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_impl.h
deleted file mode 100644
index bcc5353017..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_impl.h
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
- */
-
-#ifndef _PI_IMPL_H
-#define _PI_IMPL_H
-
-/*
- * SUN4V Platform Independent Enumerator private interfaces
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <sys/types.h>
-#include <pthread.h>
-#include <libuutil.h>
-#include <sys/mdesc.h>
-#include <sys/fm/ldom.h>
-#include <fm/topo_mod.h>
-#include <fm/topo_hc.h>
-
-/* Definitions used when registering the enumerator with libtopo */
-#define SUN4VPI_DESC "SUN4V Platform independent topology enumerator"
-#define SUN4VPI_SCHEME "hc"
-#define SUN4VPI_VERSION TOPO_VERSION
-
-/* Flags used by pi_enum_generic_impl */
-#define SUN4VPI_ENUM_ADD_SERIAL 1 /* Add serial to resource */
-
-/* Definitions used when working with PRI machine description nodes */
-#define MD_STR_BACK "back"
-#define MD_STR_CFG_HANDLE "cfg-handle" /* FWARC/2008/300 */
-#define MD_STR_CHIP "chip"
-#define MD_STR_COMPONENT "component" /* FWARC/2006/700 */
-#define MD_STR_CHASSIS "chassis"
-#define MD_STR_COMPONENTS "components" /* FWARC/2006/700 */
-#define MD_STR_DASH_NUMBER "dash_number" /* FWARC/2006/700 */
-#define MD_STR_FRU "fru" /* FWARC/2006/700 */
-#define MD_STR_FWD "fwd"
-#define MD_STR_ID "id" /* FWARC/2008/300 */
-#define MD_STR_NAC "nac" /* FWARC/2008/300 */
-#define MD_STR_NAME "name"
-#define MD_STR_PART_NUMBER "part_number" /* FWARC/2008/300 */
-#define MD_STR_PATH "path"
-#define MD_STR_PHY_NUMBER "phy_number" /* FWARC/2010/185 */
-#define MD_STR_PLATFORM "platform"
-#define MD_STR_PRODUCT "product" /* FWARC/2009/390 */
-#define MD_STR_REVISION_NUMBER "rev_number" /* FWARC/2008/300 */
-#define MD_STR_SERIAL_NUMBER "serial_number" /* FWARC/2008/300 */
-#define MD_STR_TOPO_HC_NAME "topo-hc-name" /* FWARC/2008/300 */
-#define MD_STR_TOPO_SKIP "topo-skip" /* FWARC/2008/300 */
-#define MD_STR_TYPE "type"
-
-
-/*
- * The enumerator needs to pass some state in to the function that walks
- * the PRI graph. This structure contains the necessary information.
- */
-struct pi_enum_s {
- topo_mod_t *mod; /* Topo module handle */
-
- ldom_hdl_t *ldomp; /* LDOM connection handle */
- uint64_t *ldom_bufp; /* LDOM connection data */
- ssize_t ldom_bufsize; /* LDOM connection data size */
-
- md_t *mdp; /* Machine Description handle */
- int md_nodes; /* Number of md nodes */
-
- void *wp; /* Walker private data */
-};
-typedef struct pi_enum_s pi_enum_t;
-
-
-/*
- * Some node types require custom functions to create their topology nodes.
- * This function prototype defines the interface to these functions.
- */
-typedef int pi_enum_fn_t(topo_mod_t *, md_t *, mde_cookie_t, topo_instance_t,
- tnode_t *, const char *, tnode_t **);
-
-pi_enum_fn_t pi_enum_cpu; /* Enumerate a CHIP/CORE/CPU node */
-pi_enum_fn_t pi_enum_mem; /* Enumerate a DIMM node */
-pi_enum_fn_t pi_enum_generic; /* Enumerate a generic PRI node */
-pi_enum_fn_t pi_enum_niu; /* Enumerate an NIU node */
-pi_enum_fn_t pi_enum_hostbridge; /* Enumerate a hostbridge node */
-pi_enum_fn_t pi_enum_pciexrc; /* Enumerate a PCIEX root complex */
-pi_enum_fn_t pi_enum_bay; /* Enumerate a bay PRI node */
-pi_enum_fn_t pi_enum_top; /* Enumerate a top-level PRI node */
-
-int pi_enum_generic_impl(topo_mod_t *, md_t *, mde_cookie_t, topo_instance_t,
- tnode_t *, tnode_t *, const char *, const char *, tnode_t **, int flag);
-
-
-/*
- * Some enumeration functions may need to defer execution until after the
- * entire PRI graph has been walked for some nodes. This interface is
- * provided to allow for the registration of routines to execute after the
- * entire graph has been walked (for example, to execute sub-enumerators).
- */
-typedef int pi_deferenum_fn_t(topo_mod_t *, md_t *, mde_cookie_t,
- topo_instance_t, tnode_t *, const char *, tnode_t *, void *);
-
-int pi_defer_add(topo_mod_t *, mde_cookie_t, tnode_t *, tnode_t *,
- pi_deferenum_fn_t, void *);
-int pi_defer_exec(topo_mod_t *, md_t *);
-
-/* Decorate a PCI-E node. */
-int pi_enum_update(topo_mod_t *, md_t *, mde_cookie_t, tnode_t *, tnode_t *,
- const char *);
-
-/* Functions to handle LDOM PRI sessions */
-int pi_ldompri_open(topo_mod_t *, pi_enum_t *);
-void pi_ldompri_close(topo_mod_t *, pi_enum_t *);
-
-
-/* Walk the PRI and create a topology starting at a particular PRI node */
-int pi_walker(pi_enum_t *, tnode_t *, const char *, mde_cookie_t,
- mde_str_cookie_t, mde_str_cookie_t);
-int pi_walker_init(topo_mod_t *);
-void pi_walker_fini(topo_mod_t *);
-
-/* PRI machine description node data access routines */
-int pi_find_mdenodes(topo_mod_t *, md_t *, mde_cookie_t, char *, char *,
- mde_cookie_t **, size_t *);
-int pi_skip_node(topo_mod_t *, md_t *, mde_cookie_t);
-char *pi_get_dipath(topo_mod_t *, di_node_t);
-char *pi_get_productsn(topo_mod_t *, md_t *, mde_cookie_t);
-char *pi_get_chassisid(topo_mod_t *, md_t *, mde_cookie_t);
-int pi_get_fru(topo_mod_t *, md_t *, mde_cookie_t, int *);
-int pi_get_instance(topo_mod_t *, md_t *, mde_cookie_t, topo_instance_t *);
-char *pi_get_label(topo_mod_t *, md_t *, mde_cookie_t);
-int pi_get_lun(topo_mod_t *, di_node_t);
-char *pi_get_part(topo_mod_t *, md_t *, mde_cookie_t);
-char *pi_get_path(topo_mod_t *, md_t *, mde_cookie_t);
-char *pi_get_productid(topo_mod_t *, md_t *);
-int pi_get_priphy(topo_mod_t *, md_t *, mde_cookie_t, uint8_t *);
-int pi_get_phynum(topo_mod_t *, di_node_t);
-char *pi_get_revision(topo_mod_t *, md_t *, mde_cookie_t);
-char *pi_get_serial(topo_mod_t *, md_t *, mde_cookie_t);
-char *pi_get_serverid(topo_mod_t *);
-char *pi_get_target_port(topo_mod_t *, di_node_t);
-char *pi_get_topo_hc_name(topo_mod_t *, md_t *, mde_cookie_t);
-
-int pi_set_auth(topo_mod_t *, md_t *, mde_cookie_t, tnode_t *, tnode_t *);
-int pi_set_frufmri(topo_mod_t *, md_t *, mde_cookie_t, const char *,
- topo_instance_t, tnode_t *, tnode_t *);
-int pi_set_label(topo_mod_t *, md_t *, mde_cookie_t, tnode_t *);
-int pi_set_system(topo_mod_t *, tnode_t *);
-
-tnode_t *pi_node_bind(topo_mod_t *, md_t *, mde_cookie_t, tnode_t *,
- const char *, topo_instance_t, nvlist_t *);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _PI_IMPL_H */
diff --git a/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_ldom.c b/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_ldom.c
deleted file mode 100644
index a75a341fef..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_ldom.c
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-/*
- * Open connections to the LDOM and Machine Description libraries used during
- * enumeration.
- */
-
-#include <sys/types.h>
-#include <string.h>
-#include <strings.h>
-#include <sys/mdesc.h>
-#include <sys/fm/ldom.h>
-#include <sys/systeminfo.h>
-
-#include "pi_impl.h"
-
-static topo_mod_t *Pi_mod;
-
-static void pi_free(void *, size_t);
-static void * pi_alloc(size_t);
-
-/*
- * Initialize a connection to the LDOM machine description interface.
- */
-int
-pi_ldompri_open(topo_mod_t *mod, pi_enum_t *pip)
-{
- if (mod == NULL || pip == NULL) {
- return (-1);
- }
-
- /*
- * Store the module pointer for this session. This file-global
- * is used by the allocators called by libldom and libmdesc.
- */
- Pi_mod = mod;
-
- /* Initialize the LDOM connection */
- pip->ldomp = ldom_init(pi_alloc, pi_free);
- if (pip->ldomp == NULL) {
- topo_mod_dprintf(mod,
- "sun4vpi failed to initialize LDOM layer.\n");
- Pi_mod = NULL;
- return (-1);
- }
-
- /* Initialize the machine description layer for this ldom instance */
- pip->ldom_bufsize = ldom_get_core_md(pip->ldomp, &(pip->ldom_bufp));
- if (pip->ldom_bufsize < 1) {
- topo_mod_dprintf(mod, "ldom_get_core_md error: bufsize = %d\n",
- pip->ldom_bufsize);
- ldom_fini(pip->ldomp);
- Pi_mod = NULL;
- return (-1);
- }
-
- /* Initialize the machine description internal layer */
- pip->mdp = md_init_intern(pip->ldom_bufp, pi_alloc, pi_free);
- if (pip->mdp == NULL ||
- (pip->md_nodes = md_node_count(pip->mdp)) < 1) {
- topo_mod_dprintf(mod, "md_init_intern error\n");
- pi_free(pip->ldom_bufp, pip->ldom_bufsize);
- ldom_fini(pip->ldomp);
- Pi_mod = NULL;
- return (-1);
- }
-
- return (0);
-}
-
-
-/* ARGSUSED */
-void
-pi_ldompri_close(topo_mod_t *mod, pi_enum_t *pip)
-{
- if (pip == NULL) {
- return;
- }
-
- /* Close the machine description connection */
- (void) md_fini(pip->mdp);
-
- /* Close the connection to the LDOM layer */
- ldom_fini(pip->ldomp);
-
- /* Free the ldom connection data */
- pi_free(pip->ldom_bufp, pip->ldom_bufsize);
-
- /* Reset the file-global module pointer */
- Pi_mod = NULL;
-}
-
-
-static void *
-pi_alloc(size_t size)
-{
- if (Pi_mod == NULL) {
- /* Cannot allocate memory without a module pointer */
- return (NULL);
- }
- return (topo_mod_alloc(Pi_mod, size));
-}
-
-
-static void
-pi_free(void *buf, size_t size)
-{
- if (Pi_mod == NULL) {
- /* Cannot free memory without a module pointer */
- return;
- }
- topo_mod_free(Pi_mod, buf, size);
-}
diff --git a/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_mem.c b/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_mem.c
deleted file mode 100644
index 888a503a75..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_mem.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * Enumerate a DIMM node
- */
-#include <sys/types.h>
-#include <strings.h>
-#include <sys/fm/protocol.h>
-#include <fm/topo_mod.h>
-#include <fm/topo_hc.h>
-#include "pi_impl.h"
-
-#define _ENUM_NAME "enum_mem"
-
-int
-pi_enum_mem(topo_mod_t *mod, md_t *mdp, mde_cookie_t mde_node,
- topo_instance_t inst, tnode_t *t_parent, const char *hc_name,
- tnode_t **t_node)
-{
- int result;
- int err;
- nvlist_t *rsrc = NULL;
-
- *t_node = NULL;
-
- /*
- * Create the basic topology node for the DIMM using the generic
- * enumerator. The dimm serial is added to the resource so
- * the retire agent can retire correct page whether the dimm
- * has been moved or not.
- */
- result = pi_enum_generic_impl(mod, mdp, mde_node, inst, t_parent,
- t_parent, hc_name, _ENUM_NAME, t_node, SUN4VPI_ENUM_ADD_SERIAL);
- if (result != 0) {
- /* Error messages are printed by the generic routine */
- return (result);
- }
-
- /*
- * Set ASRU compute method, using resource as argument.
- */
- result = topo_node_resource(*t_node, &rsrc, &err);
- if (result != 0) {
- topo_mod_dprintf(mod,
- "%s node_0x%llx failed to get resource: %s\n",
- _ENUM_NAME, (uint64_t)mde_node, topo_strerror(err));
- return (-1);
- }
-
- /* Set the ASRU on the node with COMPUTE flag */
- result = topo_node_asru_set(*t_node, rsrc, TOPO_ASRU_COMPUTE, &err);
- nvlist_free(rsrc);
- if (result != 0) {
- topo_mod_dprintf(mod,
- "%s node_0x%llx failed to set ASRU: %s\n", _ENUM_NAME,
- (uint64_t)mde_node, topo_strerror(err));
- return (-1);
- }
-
- return (0);
-}
diff --git a/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_meth.c b/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_meth.c
deleted file mode 100644
index 81b7e542c0..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_meth.c
+++ /dev/null
@@ -1,520 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#include <strings.h>
-#include <string.h>
-#include <libnvpair.h>
-#include <sys/fm/ldom.h>
-#include <fm/libtopo.h>
-#include <fm/topo_mod.h>
-#include <fm/fmd_fmri.h>
-#include <fm/fmd_agent.h>
-#include <sys/fm/ldom.h>
-
-struct cpu_walk_data {
- tnode_t *parent; /* walk start node */
- ldom_hdl_t *lhp; /* ldom handle */
- int (*func)(ldom_hdl_t *, nvlist_t *); /* callback func */
- int err; /* walk errors count */
- int online; /* online cpus count */
- int offline; /* offline cpus count */
- int fail; /* callback fails */
-};
-
-static topo_method_f
- cpu_retire, cpu_unretire, cpu_service_state,
- cpu_unusable, mem_asru_compute, dimm_page_unusable,
- dimm_page_service_state, dimm_page_retire, dimm_page_unretire;
-
-const topo_method_t pi_cpu_methods[] = {
- { TOPO_METH_RETIRE, TOPO_METH_RETIRE_DESC,
- TOPO_METH_RETIRE_VERSION, TOPO_STABILITY_INTERNAL,
- cpu_retire },
- { TOPO_METH_UNRETIRE, TOPO_METH_UNRETIRE_DESC,
- TOPO_METH_UNRETIRE_VERSION, TOPO_STABILITY_INTERNAL,
- cpu_unretire },
- { TOPO_METH_SERVICE_STATE, TOPO_METH_SERVICE_STATE_DESC,
- TOPO_METH_SERVICE_STATE_VERSION, TOPO_STABILITY_INTERNAL,
- cpu_service_state },
- { TOPO_METH_UNUSABLE, TOPO_METH_UNUSABLE_DESC,
- TOPO_METH_UNUSABLE_VERSION, TOPO_STABILITY_INTERNAL,
- cpu_unusable },
- { NULL }
-};
-
-const topo_method_t pi_mem_methods[] = {
- { TOPO_METH_ASRU_COMPUTE, TOPO_METH_ASRU_COMPUTE_DESC,
- TOPO_METH_ASRU_COMPUTE_VERSION, TOPO_STABILITY_INTERNAL,
- mem_asru_compute },
- { TOPO_METH_SERVICE_STATE, TOPO_METH_SERVICE_STATE_DESC,
- TOPO_METH_SERVICE_STATE_VERSION, TOPO_STABILITY_INTERNAL,
- dimm_page_service_state },
- { TOPO_METH_UNUSABLE, TOPO_METH_UNUSABLE_DESC,
- TOPO_METH_UNUSABLE_VERSION, TOPO_STABILITY_INTERNAL,
- dimm_page_unusable },
- { TOPO_METH_RETIRE, TOPO_METH_RETIRE_DESC,
- TOPO_METH_RETIRE_VERSION, TOPO_STABILITY_INTERNAL,
- dimm_page_retire },
- { TOPO_METH_UNRETIRE, TOPO_METH_UNRETIRE_DESC,
- TOPO_METH_UNRETIRE_VERSION, TOPO_STABILITY_INTERNAL,
- dimm_page_unretire },
- { NULL }
-};
-
-static ldom_hdl_t *pi_lhp = NULL;
-
-#pragma init(pi_ldom_init)
-static void
-pi_ldom_init(void)
-{
- pi_lhp = ldom_init(NULL, NULL);
-}
-
-#pragma fini(pi_ldom_fini)
-static void
-pi_ldom_fini(void)
-{
- if (pi_lhp != NULL)
- ldom_fini(pi_lhp);
-}
-
-static int
-set_retnvl(topo_mod_t *mod, nvlist_t **out, const char *retname, uint32_t ret)
-{
- nvlist_t *nvl;
-
- topo_mod_dprintf(mod, "topo method set \"%s\" = %u\n", retname, ret);
-
- if (topo_mod_nvalloc(mod, &nvl, NV_UNIQUE_NAME) < 0)
- return (topo_mod_seterrno(mod, EMOD_NOMEM));
-
- if (nvlist_add_uint32(nvl, retname, ret) != 0) {
- nvlist_free(nvl);
- return (topo_mod_seterrno(mod, EMOD_NVL_INVAL));
- }
-
- *out = nvl;
- return (0);
-}
-
-/*
- * For each visited cpu node, call the callback function with its ASRU.
- */
-static int
-cpu_walker(topo_mod_t *mod, tnode_t *node, void *pdata)
-{
- struct cpu_walk_data *swdp = pdata;
- nvlist_t *asru;
- int err, rc;
-
- /*
- * Terminate the walk if we reach start-node's sibling
- */
- if (node != swdp->parent &&
- topo_node_parent(node) == topo_node_parent(swdp->parent))
- return (TOPO_WALK_TERMINATE);
-
- if (strcmp(topo_node_name(node), CPU) != 0 &&
- strcmp(topo_node_name(node), STRAND) != 0)
- return (TOPO_WALK_NEXT);
-
- if (topo_node_asru(node, &asru, NULL, &err) != 0) {
- swdp->fail++;
- return (TOPO_WALK_NEXT);
- }
-
- rc = swdp->func(swdp->lhp, asru);
-
- /*
- * The "offline" and "online" counter are only useful for the "status"
- * callback.
- */
- if (rc == P_OFFLINE || rc == P_FAULTED) {
- swdp->offline++;
- err = 0;
- } else if (rc == P_ONLINE) {
- swdp->online++;
- err = 0;
- } else {
- swdp->fail++;
- err = errno;
- }
-
- /* dump out status info if debug is turned on. */
- if (getenv("TOPOCHIPDBG") != NULL ||
- getenv("TOPOSUN4VPIDBG") != NULL) {
- const char *op;
- char *fmristr = NULL;
-
- if (swdp->func == ldom_fmri_retire)
- op = "retire";
- else if (swdp->func == ldom_fmri_unretire)
- op = "unretire";
- else if (swdp->func == ldom_fmri_status)
- op = "check status";
- else
- op = "unknown op";
-
- (void) topo_mod_nvl2str(mod, asru, &fmristr);
- topo_mod_dprintf(mod, "%s cpu (%s): rc = %d, err = %s\n",
- op, fmristr == NULL ? "unknown fmri" : fmristr,
- rc, strerror(err));
- if (fmristr != NULL)
- topo_mod_strfree(mod, fmristr);
- }
-
- nvlist_free(asru);
- return (TOPO_WALK_NEXT);
-}
-
-static int
-walk_cpus(topo_mod_t *mod, struct cpu_walk_data *swdp, tnode_t *parent,
- int (*func)(ldom_hdl_t *, nvlist_t *))
-{
- topo_walk_t *twp;
- int err;
-
- swdp->lhp = pi_lhp;
- swdp->parent = parent;
- swdp->func = func;
- swdp->err = swdp->offline = swdp->online = swdp->fail = 0;
-
- /*
- * Return failure if ldom service is not initialized.
- */
- if (pi_lhp == NULL) {
- swdp->fail++;
- return (0);
- }
-
- twp = topo_mod_walk_init(mod, parent, cpu_walker, swdp, &err);
- if (twp == NULL)
- return (-1);
-
- err = topo_walk_step(twp, TOPO_WALK_CHILD);
- topo_walk_fini(twp);
-
- if (err == TOPO_WALK_ERR || swdp->err > 0)
- return (-1);
-
- return (0);
-}
-
-/* ARGSUSED */
-int
-cpu_retire(topo_mod_t *mod, tnode_t *node, topo_version_t version,
- nvlist_t *in, nvlist_t **out)
-{
- struct cpu_walk_data swd;
- uint32_t rc;
-
- if (version > TOPO_METH_RETIRE_VERSION)
- return (topo_mod_seterrno(mod, EMOD_VER_NEW));
-
- if (walk_cpus(mod, &swd, node, ldom_fmri_retire) == -1)
- return (-1);
-
- rc = swd.fail > 0 ? FMD_AGENT_RETIRE_FAIL : FMD_AGENT_RETIRE_DONE;
-
- return (set_retnvl(mod, out, TOPO_METH_RETIRE_RET, rc));
-}
-
-/* ARGSUSED */
-int
-cpu_unretire(topo_mod_t *mod, tnode_t *node, topo_version_t version,
- nvlist_t *in, nvlist_t **out)
-{
- struct cpu_walk_data swd;
- uint32_t rc;
-
- if (version > TOPO_METH_UNRETIRE_VERSION)
- return (topo_mod_seterrno(mod, EMOD_VER_NEW));
-
- if (walk_cpus(mod, &swd, node, ldom_fmri_unretire) == -1)
- return (-1);
-
- rc = swd.fail > 0 ? FMD_AGENT_RETIRE_FAIL : FMD_AGENT_RETIRE_DONE;
-
- return (set_retnvl(mod, out, TOPO_METH_UNRETIRE_RET, rc));
-}
-
-/* ARGSUSED */
-int
-cpu_service_state(topo_mod_t *mod, tnode_t *node, topo_version_t version,
- nvlist_t *in, nvlist_t **out)
-{
- struct cpu_walk_data swd;
- uint32_t rc;
-
- if (version > TOPO_METH_SERVICE_STATE_VERSION)
- return (topo_mod_seterrno(mod, EMOD_VER_NEW));
-
- if (walk_cpus(mod, &swd, node, ldom_fmri_status) == -1)
- return (-1);
-
- if (swd.fail > 0)
- rc = FMD_SERVICE_STATE_UNKNOWN;
- else if (swd.offline > 0)
- rc = swd.online > 0 ? FMD_SERVICE_STATE_DEGRADED :
- FMD_SERVICE_STATE_UNUSABLE;
- else
- rc = FMD_SERVICE_STATE_OK;
-
- return (set_retnvl(mod, out, TOPO_METH_SERVICE_STATE_RET, rc));
-}
-
-/* ARGSUSED */
-int
-cpu_unusable(topo_mod_t *mod, tnode_t *node, topo_version_t version,
- nvlist_t *in, nvlist_t **out)
-{
- struct cpu_walk_data swd;
- uint32_t rc;
-
- if (version > TOPO_METH_UNUSABLE_VERSION)
- return (topo_mod_seterrno(mod, EMOD_VER_NEW));
-
- if (walk_cpus(mod, &swd, node, ldom_fmri_status) == -1)
- return (-1);
-
- rc = (swd.offline > 0 && swd.fail + swd.online == 0) ? 1 : 0;
-
- return (set_retnvl(mod, out, TOPO_METH_UNUSABLE_RET, rc));
-}
-
-static nvlist_t *
-mem_fmri_create(topo_mod_t *mod, char *serial, char *label)
-{
- int err;
- nvlist_t *fmri;
-
- if (topo_mod_nvalloc(mod, &fmri, NV_UNIQUE_NAME) != 0)
- return (NULL);
- err = nvlist_add_uint8(fmri, FM_VERSION, FM_MEM_SCHEME_VERSION);
- err |= nvlist_add_string(fmri, FM_FMRI_SCHEME, FM_FMRI_SCHEME_MEM);
- if (serial != NULL)
- err |= nvlist_add_string_array(fmri, FM_FMRI_MEM_SERIAL_ID,
- &serial, 1);
- if (label != NULL)
- err |= nvlist_add_string(fmri, FM_FMRI_MEM_UNUM, label);
- if (err != 0) {
- nvlist_free(fmri);
- (void) topo_mod_seterrno(mod, EMOD_FMRI_NVL);
- return (NULL);
- }
-
- return (fmri);
-}
-
-/* Topo Methods */
-static int
-mem_asru_compute(topo_mod_t *mod, tnode_t *node, topo_version_t version,
- nvlist_t *in, nvlist_t **out)
-{
- nvlist_t *asru, *pargs, *args, *hcsp;
- int err;
- char *serial = NULL, *label = NULL;
- uint64_t pa, offset;
-
- if (version > TOPO_METH_ASRU_COMPUTE_VERSION)
- return (topo_mod_seterrno(mod, EMOD_VER_NEW));
-
- if (strcmp(topo_node_name(node), DIMM) != 0)
- return (topo_mod_seterrno(mod, EMOD_METHOD_INVAL));
-
- pargs = NULL;
-
- if (nvlist_lookup_nvlist(in, TOPO_PROP_PARGS, &pargs) == 0)
- (void) nvlist_lookup_string(pargs, FM_FMRI_HC_SERIAL_ID,
- &serial);
- if (serial == NULL &&
- nvlist_lookup_nvlist(in, TOPO_PROP_ARGS, &args) == 0)
- (void) nvlist_lookup_string(args, FM_FMRI_HC_SERIAL_ID,
- &serial);
-
- (void) topo_node_label(node, &label, &err);
-
- asru = mem_fmri_create(mod, serial, label);
-
- if (label != NULL)
- topo_mod_strfree(mod, label);
-
- if (asru == NULL)
- return (topo_mod_seterrno(mod, EMOD_NOMEM));
-
- err = 0;
-
- /*
- * For a memory page, 'in' includes an hc-specific member which
- * specifies physaddr and/or offset. Set them in asru as well.
- */
- if (pargs && nvlist_lookup_nvlist(pargs,
- FM_FMRI_HC_SPECIFIC, &hcsp) == 0) {
- if (nvlist_lookup_uint64(hcsp,
- FM_FMRI_HC_SPECIFIC_PHYSADDR, &pa) == 0)
- err += nvlist_add_uint64(asru, FM_FMRI_MEM_PHYSADDR,
- pa);
- if (nvlist_lookup_uint64(hcsp,
- FM_FMRI_HC_SPECIFIC_OFFSET, &offset) == 0)
- err += nvlist_add_uint64(asru, FM_FMRI_MEM_OFFSET,
- offset);
- }
-
-
- if (err != 0 || topo_mod_nvalloc(mod, out, NV_UNIQUE_NAME) < 0) {
- nvlist_free(asru);
- return (topo_mod_seterrno(mod, EMOD_NOMEM));
- }
-
- err = nvlist_add_string(*out, TOPO_PROP_VAL_NAME, TOPO_PROP_ASRU);
- err |= nvlist_add_uint32(*out, TOPO_PROP_VAL_TYPE, TOPO_TYPE_FMRI);
- err |= nvlist_add_nvlist(*out, TOPO_PROP_VAL_VAL, asru);
- nvlist_free(asru);
-
- if (err != 0) {
- nvlist_free(*out);
- *out = NULL;
- return (topo_mod_seterrno(mod, EMOD_NVL_INVAL));
- }
-
- return (0);
-}
-
-static boolean_t
-is_page_fmri(nvlist_t *nvl)
-{
- nvlist_t *hcsp;
- uint64_t val;
-
- if (nvlist_lookup_nvlist(nvl, FM_FMRI_HC_SPECIFIC, &hcsp) == 0 &&
- (nvlist_lookup_uint64(hcsp, FM_FMRI_HC_SPECIFIC_OFFSET,
- &val) == 0 ||
- nvlist_lookup_uint64(hcsp, "asru-" FM_FMRI_HC_SPECIFIC_OFFSET,
- &val) == 0 ||
- nvlist_lookup_uint64(hcsp, FM_FMRI_HC_SPECIFIC_PHYSADDR,
- &val) == 0 ||
- nvlist_lookup_uint64(hcsp, "asru-" FM_FMRI_HC_SPECIFIC_PHYSADDR,
- &val) == 0))
- return (B_TRUE);
-
- return (B_FALSE);
-}
-
-static int
-dimm_page_service_state(topo_mod_t *mod, tnode_t *node, topo_version_t version,
- nvlist_t *in, nvlist_t **out)
-{
- uint32_t rc = FMD_SERVICE_STATE_OK;
- nvlist_t *asru;
- int err;
-
- if (version > TOPO_METH_SERVICE_STATE_VERSION)
- return (topo_mod_seterrno(mod, EMOD_VER_NEW));
-
- if (pi_lhp != NULL && is_page_fmri(in) &&
- topo_node_asru(node, &asru, in, &err) == 0) {
- err = ldom_fmri_status(pi_lhp, asru);
-
- if (err == 0 || err == EINVAL)
- rc = FMD_SERVICE_STATE_UNUSABLE;
- else if (err == EAGAIN)
- rc = FMD_SERVICE_STATE_ISOLATE_PENDING;
- nvlist_free(asru);
- }
-
- return (set_retnvl(mod, out, TOPO_METH_SERVICE_STATE_RET, rc));
-}
-
-static int
-dimm_page_unusable(topo_mod_t *mod, tnode_t *node, topo_version_t version,
- nvlist_t *in, nvlist_t **out)
-{
- uint32_t rc = 0;
- nvlist_t *asru;
- int err;
-
- if (version > TOPO_METH_UNUSABLE_VERSION)
- return (topo_mod_seterrno(mod, EMOD_VER_NEW));
-
- if (pi_lhp != NULL && is_page_fmri(in) &&
- topo_node_asru(node, &asru, in, &err) == 0) {
- err = ldom_fmri_status(pi_lhp, asru);
-
- if (err == 0 || err == EINVAL)
- rc = 1;
- nvlist_free(asru);
- }
-
- return (set_retnvl(mod, out, TOPO_METH_UNUSABLE_RET, rc));
-}
-
-static int
-dimm_page_retire(topo_mod_t *mod, tnode_t *node, topo_version_t version,
- nvlist_t *in, nvlist_t **out)
-{
- uint32_t rc = FMD_AGENT_RETIRE_FAIL;
- nvlist_t *asru;
- int err;
-
- if (version > TOPO_METH_RETIRE_VERSION)
- return (topo_mod_seterrno(mod, EMOD_VER_NEW));
-
- if (pi_lhp != NULL && is_page_fmri(in) &&
- topo_node_asru(node, &asru, in, &err) == 0) {
- err = ldom_fmri_retire(pi_lhp, asru);
-
- if (err == 0 || err == EIO || err == EINVAL)
- rc = FMD_AGENT_RETIRE_DONE;
- else if (err == EAGAIN)
- rc = FMD_AGENT_RETIRE_ASYNC;
- nvlist_free(asru);
- }
-
- return (set_retnvl(mod, out, TOPO_METH_RETIRE_RET, rc));
-}
-
-static int
-dimm_page_unretire(topo_mod_t *mod, tnode_t *node, topo_version_t version,
- nvlist_t *in, nvlist_t **out)
-{
- uint32_t rc = FMD_AGENT_RETIRE_FAIL;
- nvlist_t *asru;
- int err;
-
- if (version > TOPO_METH_UNRETIRE_VERSION)
- return (topo_mod_seterrno(mod, EMOD_VER_NEW));
-
- if (pi_lhp != NULL && is_page_fmri(in) &&
- topo_node_asru(node, &asru, in, &err) == 0) {
- err = ldom_fmri_unretire(pi_lhp, asru);
-
- if (err == 0 || err == EIO)
- rc = FMD_AGENT_RETIRE_DONE;
- nvlist_free(asru);
- }
-
- return (set_retnvl(mod, out, TOPO_METH_UNRETIRE_RET, rc));
-}
diff --git a/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_niu.c b/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_niu.c
deleted file mode 100644
index 4b1b3e2076..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_niu.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-/*
- * Create a topology node for a PRI node of type 'niu'
- */
-#include <sys/types.h>
-#include <strings.h>
-#include <sys/fm/protocol.h>
-#include <fm/topo_mod.h>
-#include <fm/topo_hc.h>
-#include "pi_impl.h"
-
-#define _ENUM_NAME "enum_niu"
-
-
-/* ARGSUSED */
-int
-pi_enum_niu(topo_mod_t *mod, md_t *mdp, mde_cookie_t mde_node,
- topo_instance_t inst, tnode_t *t_parent, const char *hc_name,
- tnode_t **t_node)
-{
- int result;
-
- *t_node = NULL;
-
- topo_mod_dprintf(mod,
- "%s node_0x%llx enumeration starting\n", _ENUM_NAME,
- (uint64_t)mde_node);
-
- /* Make sure our dependent modules are loaded */
- if (topo_mod_load(mod, NIU, TOPO_VERSION) == NULL) {
- topo_mod_dprintf(mod, "%s could not load %s module: %s\n",
- _ENUM_NAME, NIU, topo_strerror(topo_mod_errno(mod)));
- return (-1);
- }
-
- /*
- * Invoke the niu enumerator for this node.
- */
- result = topo_mod_enumerate(mod, t_parent, NIU, hc_name, inst, inst,
- NULL);
- if (result != 0) {
- topo_mod_dprintf(mod,
- "%s node_0x%llx enumeration failed: %s\n", _ENUM_NAME,
- (uint64_t)mde_node, topo_strerror(topo_mod_errno(mod)));
- return (-1);
- }
-
- topo_mod_dprintf(mod, "%s added node_0x%llx type %s\n",
- _ENUM_NAME, (uint64_t)mde_node, hc_name);
-
- return (0);
-}
diff --git a/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_pciexrc.c b/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_pciexrc.c
deleted file mode 100644
index ce893191cd..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_pciexrc.c
+++ /dev/null
@@ -1,562 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2010 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * Create a topology node for a PRI node of type 'pciexrc'
- */
-#include <sys/types.h>
-#include <strings.h>
-#include <sys/fm/protocol.h>
-#include <fm/topo_mod.h>
-#include <fm/topo_hc.h>
-#include <libdevinfo.h>
-#include <sys/pci.h>
-#include "pi_impl.h"
-
-#define PCIEX_MAX_DEVICE 255
-#define PCIEX_MAX_BDF_SIZE 23 /* '0x' + sizeof (UNIT64_MAX) + '\0' */
-
-#define TOPO_PGROUP_PCIEX "pciex"
-#define _ENUM_NAME "enum_pciexrc"
-
-static char *drv_name = NULL;
-
-static const topo_pgroup_info_t io_pgroup =
- { TOPO_PGROUP_IO, TOPO_STABILITY_PRIVATE, TOPO_STABILITY_PRIVATE, 1 };
-
-static const topo_pgroup_info_t pci_pgroup =
- { TOPO_PGROUP_PCI, TOPO_STABILITY_PRIVATE, TOPO_STABILITY_PRIVATE, 1 };
-
-static int pi_enum_pciexrc_finddev(topo_mod_t *, md_t *, mde_cookie_t,
- tnode_t *);
-
-static char *pi_enum_pciexrc_findbdf(topo_mod_t *, di_node_t);
-
-static int pi_enum_pciexrc_defer(topo_mod_t *, md_t *, mde_cookie_t,
- topo_instance_t, tnode_t *, const char *, tnode_t *, void *);
-
-
-/*
- * Create a pciexrc topo by calling the pciexrc enumerator for this instance.
- */
-int
-pi_enum_pciexrc(topo_mod_t *mod, md_t *mdp, mde_cookie_t mde_node,
- topo_instance_t inst, tnode_t *t_parent, const char *hc_name,
- tnode_t **t_node)
-{
- int result;
-
- topo_mod_dprintf(mod, "%s called for node_0x%llx type %s\n",
- _ENUM_NAME, (uint64_t)mde_node, hc_name);
-
- *t_node = NULL;
-
- /*
- * Create the root complex topo node. Use the generic enumerator to
- * do this, and then we will add more attributes below.
- */
- result = pi_enum_generic_impl(mod, mdp, mde_node, inst, t_parent,
- t_parent, hc_name, _ENUM_NAME, t_node, 0);
- if (result != 0 || *t_node == NULL) {
- topo_mod_dprintf(mod,
- "%s node_0x%llx failed to create topo node: %s\n",
- _ENUM_NAME, (uint64_t)mde_node,
- topo_strerror(topo_mod_errno(mod)));
- return (result);
- }
-
- /* Update the topo node with more specific information */
- result = pi_enum_update(mod, mdp, mde_node, t_parent, *t_node,
- hc_name);
- if (result != 0) {
- topo_mod_dprintf(mod,
- "%s node_0x%llx failed to create node properites: %s\n",
- _ENUM_NAME, (uint64_t)mde_node,
- topo_strerror(topo_mod_errno(mod)));
- return (result);
- }
-
- result = pi_enum_pciexrc_finddev(mod, mdp, mde_node, *t_node);
- if (result == 0) {
- /*
- * The node exists in this domain. We will call the PCIBUS
- * enumerator after the entire PRI graph has been walked so
- * that all the possible FRU nodes are available for bus's
- * that span multiple FRU boundaries.
- */
- result = pi_defer_add(mod, mde_node, t_parent, *t_node,
- pi_enum_pciexrc_defer, NULL);
- if (result != 0) {
- /* We cannot defer the call, so we need to do it now */
- result = pi_enum_pciexrc_defer(mod, mdp, mde_node, inst,
- t_parent, hc_name, *t_node, NULL);
- }
- } else {
- /*
- * It is OK if the node does not exist for further PCIBUS
- * enumeration. We can return success having created the
- * root complex node itself.
- */
- result = 0;
- }
- topo_mod_dprintf(mod, "%s added node_0x%llx type %s\n",
- _ENUM_NAME, (uint64_t)mde_node, hc_name);
-
- return (result);
-}
-
-
-/* ARGSUSED */
-static int
-pi_enum_pciexrc_defer(topo_mod_t *mod, md_t *mdp, mde_cookie_t mde_node,
- topo_instance_t inst, tnode_t *t_parent, const char *hc_name,
- tnode_t *t_node, void *private)
-{
- int result;
- topo_instance_t min;
- topo_instance_t max;
-
- topo_mod_dprintf(mod,
- "%s node_0x%llx deferred enumeration starting\n", _ENUM_NAME,
- (uint64_t)mde_node);
-
- /* Make sure our dependent modules are loaded */
- if (topo_mod_load(mod, PCI_BUS, TOPO_VERSION) == NULL) {
- topo_mod_dprintf(mod, "%s could not load %s module: %s\n",
- _ENUM_NAME, PCI_BUS, topo_strerror(topo_mod_errno(mod)));
- return (-1);
- }
-
- /* Create a node range for children of this bus */
- min = 0;
- max = PCIEX_MAX_DEVICE;
- result = topo_node_range_create(mod, t_node, PCI_BUS, min, max);
- if (result != 0) {
- topo_mod_dprintf(mod,
- "%s node_0x%llx failed to create node range: %s\n",
- _ENUM_NAME, topo_strerror(topo_mod_errno(mod)));
- return (-1);
- }
-
- /*
- * Invoke the pcibus enumerator for this node.
- */
- result = topo_mod_enumerate(mod, t_node, PCI_BUS, PCIEX_BUS,
- min, max, NULL);
- if (result != 0) {
- topo_mod_dprintf(mod,
- "%s node_0x%llx enumeration failed: %s\n", _ENUM_NAME,
- (uint64_t)mde_node, topo_strerror(topo_mod_errno(mod)));
- }
-
- topo_mod_dprintf(mod, "%s added node_0x%llx type %s\n",
- _ENUM_NAME, (uint64_t)mde_node, hc_name);
-
- return (result);
-}
-
-
-/*
- * Update PCIEXRC/HOSTBRIDGE topo node with node-specific information
- *
- * The following is mostly a duplicate of code contained in:
- * usr/src/lib/fm/topo/modules/sun4v/cpuboard/
- * cpuboard_hostbridge.c:cpuboard_rc_node_create
- */
-int
-pi_enum_update(topo_mod_t *mod, md_t *mdp, mde_cookie_t mde_node,
- tnode_t *t_parent, tnode_t *t_node, const char *hc_name)
-{
- int result;
- int err;
- int is_hbridge = 0;
- int is_pciexrc = 0;
- char *path = NULL;
- char *bdf = NULL;
- char *_enum_name;
- nvlist_t *modfmri;
- nvlist_t *devfmri;
- di_node_t dnode;
-
- /*
- * Determine if decorating a PCIE root complex or a hostbridge
- * node.
- */
- if (strncmp(hc_name, PCIEX_ROOT, strlen(hc_name)) == 0) {
- is_pciexrc = 1;
- _enum_name = "enum_pciexrc";
- } else if (strncmp(hc_name, HOSTBRIDGE, strlen(hc_name)) == 0) {
- is_hbridge = 1;
- _enum_name = "enum_hostbridge";
- } else {
- topo_mod_dprintf(mod,
- "pi_enum_update node_0x%llx unknown hc name %s\n",
- (uint64_t)mde_node, hc_name);
- return (-1);
- }
-
- if (t_parent == NULL || t_node == NULL) {
- topo_mod_dprintf(mod, "%s node_0x%llx has no parent\n",
- _enum_name, (uint64_t)mde_node);
- return (-1);
- }
-
- /*
- * Calculate the device path for this root complex node.
- */
- path = pi_get_path(mod, mdp, mde_node);
- if (path == NULL) {
- if (is_hbridge == 1) {
- /* "path" not required for hostbridge */
- return (0);
- }
- topo_mod_dprintf(mod, "%s node_0x%llx has no path\n",
- _enum_name, (uint64_t)mde_node);
- return (-1);
- }
-
- /*
- * Set the ASRU for this node using the dev scheme
- */
- devfmri = topo_mod_devfmri(mod, FM_DEV_SCHEME_VERSION, path, NULL);
- if (devfmri == NULL) {
- topo_mod_dprintf(mod, "%s node_0x%llx fmri creation failed\n",
- _enum_name, (uint64_t)mde_node);
- result = -1;
- goto out;
- }
-
- result = topo_node_asru_set(t_node, devfmri, 0, &err);
- nvlist_free(devfmri);
- if (result != 0) {
- topo_mod_dprintf(mod, "%s node_0x%llx failed to set ASRU\n",
- _enum_name, (uint64_t)mde_node);
- (void) topo_mod_seterrno(mod, err);
- goto out;
- }
-
- /*
- * Create property groups.
- */
- result = topo_pgroup_create(t_node, &io_pgroup, &err);
- if (result < 0) {
- topo_mod_dprintf(mod, "%s node_0x%llx "
- "topo_pgroup_create for io pgroup failed\n",
- _enum_name, (uint64_t)mde_node);
- (void) topo_mod_seterrno(mod, err);
- goto out;
- }
-
- if (is_pciexrc == 1) {
- result = topo_pgroup_create(t_node, &pci_pgroup, &err);
- if (result < 0) {
- topo_mod_dprintf(mod, "%s node_0x%llx "
- "topo_pgroup_create for pci pgroup failed\n",
- _enum_name, (uint64_t)mde_node);
- (void) topo_mod_seterrno(mod, err);
- goto out;
- }
- }
-
- result = topo_prop_set_string(t_node, TOPO_PGROUP_IO, TOPO_IO_DEV,
- TOPO_PROP_IMMUTABLE, path, &err);
- if (result != 0) {
- topo_mod_dprintf(mod,
- "%s node_0x%llx failed to set DEV property\n",
- _enum_name, (uint64_t)mde_node);
- (void) topo_mod_seterrno(mod, err);
- goto out;
- }
-
- /* device type is always "pciex" */
- result = topo_prop_set_string(t_node, TOPO_PGROUP_IO, TOPO_IO_DEVTYPE,
- TOPO_PROP_IMMUTABLE, TOPO_PGROUP_PCIEX, &err);
- if (result < 0) {
- topo_mod_dprintf(mod,
- "%s node_0x%llx failed to set DEVTYPE property\n",
- _enum_name, (uint64_t)mde_node);
- (void) topo_mod_seterrno(mod, err);
- goto out;
- }
-
- /*
- * Derived the driver name from the device path.
- */
- dnode = di_init(path, DIIOC);
- if (dnode == DI_NODE_NIL) {
- topo_mod_dprintf(mod, "%s node_0x%llx failed to get node\n",
- _enum_name, (uint64_t)mde_node);
- result = -1;
- goto out;
- }
- drv_name = di_driver_name(dnode);
- if (drv_name == NULL) {
- topo_mod_dprintf(mod, "%s node_0x%llx failed to get driver "
- " name\n", _enum_name, (uint64_t)mde_node);
- di_fini(dnode);
- result = -1;
- goto out;
- }
-
- if (is_pciexrc == 1) {
- /*
- * Derived the BDF property from the devinfo node.
- */
- bdf = pi_enum_pciexrc_findbdf(mod, dnode);
- if (bdf == NULL) {
- topo_mod_dprintf(mod, "%s: node_0x%llx failed to "
- "find BDF", _enum_name, (uint64_t)mde_node);
- di_fini(dnode);
- result = -1;
- goto out;
- }
- }
- di_fini(dnode);
- topo_mod_dprintf(mod, "%s node_0x%llx driver name is %s\n",
- _enum_name, (uint64_t)mde_node, drv_name);
-
- result = topo_prop_set_string(t_node, TOPO_PGROUP_IO, TOPO_IO_DRIVER,
- TOPO_PROP_IMMUTABLE, drv_name, &err);
- if (result < 0) {
- topo_mod_dprintf(mod,
- "%s node_0x%llx failed to set DRIVER property\n",
- _enum_name, (uint64_t)mde_node);
- (void) topo_mod_seterrno(mod, err);
- goto out;
- }
-
- modfmri = topo_mod_modfmri(mod, FM_MOD_SCHEME_VERSION, drv_name);
- if (modfmri == NULL) {
- topo_mod_dprintf(mod,
- "%s node_0x%llx failed to create module fmri\n",
- _enum_name, (uint64_t)mde_node);
- (void) topo_mod_seterrno(mod, err);
- result = -1;
- goto out;
- }
- result = topo_prop_set_fmri(t_node, TOPO_PGROUP_IO, TOPO_IO_MODULE,
- TOPO_PROP_IMMUTABLE, modfmri, &err);
- nvlist_free(modfmri);
- if (result < 0) {
- topo_mod_dprintf(mod,
- "%s node_0x%llx failed to set MODULE property\n",
- _enum_name, (uint64_t)mde_node);
- (void) topo_mod_seterrno(mod, err);
- goto out;
- }
-
- if (is_pciexrc == 1) {
- /* This is a PCIEX root complex */
- result = topo_prop_set_string(t_node, TOPO_PGROUP_PCI,
- TOPO_PCI_EXCAP, TOPO_PROP_IMMUTABLE, PCIEX_ROOT, &err);
- if (result < 0) {
- topo_mod_dprintf(mod,
- "%s node_0x%llx failed to set EXCAP property\n",
- _enum_name, (uint64_t)mde_node);
- (void) topo_mod_seterrno(mod, err);
- goto out;
- }
-
- /* Set BDF for root complex */
- result = topo_prop_set_string(t_node, TOPO_PGROUP_PCI,
- TOPO_PCI_BDF, TOPO_PROP_IMMUTABLE, bdf, &err);
- if (result < 0) {
- topo_mod_dprintf(mod,
- "%s node_0x%llx failed to set BDF property\n",
- _enum_name, (uint64_t)mde_node);
- (void) topo_mod_seterrno(mod, err);
- goto out;
- }
-
- /* Create a node range for the children of this root complex */
- result = topo_node_range_create(mod, t_node, PCIEX_BUS, 0,
- PCIEX_MAX_DEVICE);
- if (result != 0) {
- topo_mod_dprintf(mod,
- "%s node_0x%llx failed to create %s range\n",
- _enum_name, (uint64_t)mde_node, PCIEX_BUS);
- result = -1;
- }
- }
-
-out:
- if (path != NULL) {
- topo_mod_strfree(mod, path);
- }
- if (bdf != NULL) {
- topo_mod_strfree(mod, bdf);
- }
- return (result);
-}
-
-
-static int
-pi_enum_pciexrc_finddev(topo_mod_t *mod, md_t *mdp, mde_cookie_t mde_node,
- tnode_t *t_node)
-{
- di_node_t devtree;
- di_node_t dnode;
- char *path;
-
- /* Initialize the device information structure for this module */
- devtree = topo_mod_devinfo(mod);
- if (devtree == DI_NODE_NIL) {
- topo_mod_dprintf(mod, "devinfo init failed\n");
- return (-1);
- }
-
- /*
- * Find the PRI node path property. This will be used to associate
- * the PRI node with the device node.
- */
- path = pi_get_path(mod, mdp, mde_node);
- if (path == NULL) {
- topo_mod_dprintf(mod, "node_0x%llx has no path\n",
- (uint64_t)mde_node);
- return (-1);
- }
-
- /*
- * Scan the device node list and find the node associated with
- * the given PRI node. Equality is defined when the PRI path
- * is the same as the device node path.
- */
- dnode = di_drv_first_node(drv_name, devtree);
- while (dnode != DI_NODE_NIL) {
- char *devfs_path;
-
- devfs_path = di_devfs_path(dnode);
- if (devfs_path != NULL) {
- if (strncmp(devfs_path, path, strlen(path)) == 0) {
- /* We have found the matching dnode */
- break;
- }
- }
-
- /* We have not found the matching dnode yet */
- dnode = di_drv_next_node(dnode);
- }
- if (dnode != DI_NODE_NIL) {
- topo_mod_dprintf(mod, "%s node_0x%llx found dev path %s\n",
- _ENUM_NAME, (uint64_t)mde_node, path);
-
- /*
- * Associate this dnode with the topo node. The PCI
- * enumerator requires this information.
- */
- topo_node_setspecific(t_node, (void *)dnode);
- }
-
- topo_mod_strfree(mod, path);
- return (0);
-}
-
-
-/*
- * Find the BDF property and return as a string.
- *
- * The string must be freed with topo_mod_strfree()
- */
-static char *
-pi_enum_pciexrc_findbdf(topo_mod_t *mod, di_node_t dnode)
-{
- uint_t reg;
- uint_t bdf;
- char bdf_str[PCIEX_MAX_BDF_SIZE];
- unsigned char *buf;
- di_prop_t di_prop;
- di_prom_handle_t di_prom_hdl;
- di_prom_prop_t di_prom_prop;
-
- /*
- * Look for the "reg" property from the devinfo node.
- */
- for (di_prop = di_prop_next(dnode, DI_PROP_NIL);
- di_prop != DI_PROP_NIL;
- di_prop = di_prop_next(dnode, di_prop)) {
- if (strncmp(di_prop_name(di_prop), "reg",
- sizeof (reg)) == 0) {
- if (di_prop_bytes(di_prop, &buf) < sizeof (uint_t)) {
- continue;
- }
- bcopy(buf, &reg, sizeof (uint_t));
- break;
- }
- }
-
- /*
- * If the "reg" property is not found in the di_node; look for it in
- * OBP prom data.
- */
- if (di_prop == DI_PROP_NIL) {
- if ((di_prom_hdl = topo_mod_prominfo(mod)) ==
- DI_PROM_HANDLE_NIL) {
- topo_mod_dprintf(mod,
- "%s failed to get prom handle\n", _ENUM_NAME);
- return (NULL);
- }
- for (di_prom_prop =
- di_prom_prop_next(di_prom_hdl, dnode, DI_PROM_PROP_NIL);
- di_prom_prop != DI_PROM_PROP_NIL;
- di_prom_prop =
- di_prom_prop_next(di_prom_hdl, dnode, di_prom_prop)) {
- if (strncmp(di_prom_prop_name(di_prom_prop), "reg",
- sizeof (reg)) == 0) {
- if (di_prom_prop_data(di_prom_prop, &buf) <
- sizeof (uint_t)) {
- continue;
- }
- bcopy(buf, &reg, sizeof (uint_t));
- break;
- }
- }
- if (di_prom_prop == DI_PROP_NIL) {
- topo_mod_dprintf(mod,
- "%s failed to get reg property\n", _ENUM_NAME);
- return (NULL);
- }
- }
-
- /*
- * Caculate BDF
- *
- * The reg property is divided like this:
- * -----------------------------------------------------
- * | 23 Bus 16 | 15 Dev 11 | 10 Fn 8 | 7 Reg 0 |
- * -----------------------------------------------------
- *
- * PCI_REG_* macros strip off Reg and shift to get individual
- * Bus/Dev/Fn bits. Shift and OR each to get bdf value.
- */
- bdf = (PCI_REG_BUS_G(reg) << 8) | (PCI_REG_DEV_G(reg) << 3) |
- PCI_REG_FUNC_G(reg);
-
- /* Pass BDF back as a string */
- (void) snprintf(bdf_str, PCIEX_MAX_BDF_SIZE, "0x%x", bdf);
- topo_mod_dprintf(mod, "%s found BDF %s\n", _ENUM_NAME, bdf_str);
-
- return (topo_mod_strdup(mod, bdf_str));
-}
diff --git a/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_subr.c b/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_subr.c
deleted file mode 100644
index 60ceb89b21..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_subr.c
+++ /dev/null
@@ -1,1456 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
- */
-
-
-/*
- * Subroutines used by various components of the Sun4v PI enumerator
- */
-
-#include <sys/types.h>
-#include <sys/systeminfo.h>
-#include <sys/utsname.h>
-#include <string.h>
-#include <strings.h>
-#include <sys/fm/protocol.h>
-#include <fm/topo_mod.h>
-#include <fm/topo_hc.h>
-#include <sys/mdesc.h>
-#include <libnvpair.h>
-
-#include "pi_impl.h"
-
-/* max pci path = 256 */
-#define MAX_PATH_DEPTH (MAXPATHLEN / 256)
-
-/* max pci path + child + minor */
-#define MAX_DIPATH_DEPTH (MAX_PATH_DEPTH + 2)
-
-static const topo_pgroup_info_t sys_pgroup = {
- TOPO_PGROUP_SYSTEM,
- TOPO_STABILITY_PRIVATE,
- TOPO_STABILITY_PRIVATE,
- 1
-};
-
-static const topo_pgroup_info_t auth_pgroup = {
- FM_FMRI_AUTHORITY,
- TOPO_STABILITY_PRIVATE,
- TOPO_STABILITY_PRIVATE,
- 1
-};
-
-
-/*
- * Search the PRI for MDE nodes using md_scan_dag. Using this routine
- * consolodates similar searches used in a few places within the sun4vpi
- * enumerator.
- *
- * The routine returns the number of nodes found, or -1. If the node array
- * is non-NULL on return, then it must be freed:
- * topo_mod_free(mod, nodes, nsize);
- *
- */
-int
-pi_find_mdenodes(topo_mod_t *mod, md_t *mdp, mde_cookie_t mde_start,
- char *type_str, char *arc_str, mde_cookie_t **nodes, size_t *nsize)
-{
- int result;
- int total_mdenodes;
-
- mde_str_cookie_t start_cookie;
- mde_str_cookie_t arc_cookie;
-
- /* Prepare to scan the PRI using the start string and given arc */
- total_mdenodes = md_node_count(mdp);
- start_cookie = md_find_name(mdp, type_str);
- arc_cookie = md_find_name(mdp, arc_str);
-
- /* Allocate an array to hold the results of the scan */
- *nsize = sizeof (mde_cookie_t) * total_mdenodes;
- *nodes = topo_mod_zalloc(mod, *nsize);
- if (*nodes == NULL) {
- /* We have no memory. Set an error code and return failure */
- *nsize = 0;
- (void) topo_mod_seterrno(mod, EMOD_NOMEM);
- return (-1);
- }
-
- result = md_scan_dag(mdp, mde_start, start_cookie, arc_cookie, *nodes);
- if (result <= 0) {
- /* No nodes found. Free the node array before returning */
- topo_mod_free(mod, *nodes, *nsize);
- *nodes = NULL;
- *nsize = 0;
- }
-
- return (result);
-}
-
-
-/*
- * Determine if this node should be skipped by finding the topo-skip property.
- */
-int
-pi_skip_node(topo_mod_t *mod, md_t *mdp, mde_cookie_t mde_node)
-{
- int result;
- uint64_t skip;
-
- if (mod == NULL || mdp == NULL) {
- /*
- * These parameters are required. Tell the caller to skip
- * all nodes.
- */
- return (1);
- }
-
- skip = 0; /* do not skip by default */
- result = md_get_prop_val(mdp, mde_node, MD_STR_TOPO_SKIP, &skip);
- if (result != 0) {
- /*
- * There is no topo-skip property. Assume we are not skipping
- * the mde node.
- */
- skip = 0;
- }
-
- /*
- * If skip is present and non-zero we want to skip this node. We
- * return 1 to indicate this.
- */
- if (skip != 0) {
- return (1);
- }
- return (0);
-}
-
-
-/*
- * Build a device path without device names (PRI like) from a devinfo
- * node. Return the PRI like path.
- *
- * The string must be freed with topo_mod_strfree()
- */
-char *
-pi_get_dipath(topo_mod_t *mod, di_node_t dnode)
-{
- int i, j, rv;
- int depth = 0;
- char *bus_addr[MAX_DIPATH_DEPTH] = { NULL };
- char *dev_path[MAX_DIPATH_DEPTH] = { NULL };
- char *path = NULL;
- size_t path_len = 0;
-
- /* loop through collecting bus addresses */
- do {
- /* stop at '/' */
- if (strcmp(di_devfs_path(dnode), "/") == 0) {
- break;
- }
-
- if (depth < MAX_DIPATH_DEPTH) {
- bus_addr[depth] = topo_mod_strdup(mod,
- di_bus_addr(dnode));
- ++depth;
- } else {
- topo_mod_dprintf(mod, "pi_get_dipath: path too "
- "long (%d)\n", depth);
- return (NULL);
- }
- } while ((dnode = di_parent_node(dnode)) != DI_NODE_NIL);
-
- /* prepend '/@' to each bus address */
- for (i = (depth - 1), j = 0; i >= 0; --i, j++) {
- int len = strlen(bus_addr[i]) + strlen("/@") + 1;
- path_len += len;
- dev_path[j] = (char *)topo_mod_alloc(mod, len);
- rv = snprintf(dev_path[j], len, "/@%s", bus_addr[i]);
- if (rv < 0) {
- return (NULL);
- }
- }
-
- /*
- * Build the path from the bus addresses.
- */
- path_len -= (depth - 1); /* leave room for one null char */
- path = (char *)topo_mod_alloc(mod, path_len);
- path = strcpy(path, dev_path[0]);
-
- for (i = 1; i < depth; i++) {
- path = strncat(path, dev_path[i], strlen(dev_path[i]) + 1);
- }
-
- for (i = 0; i < depth; i++) {
- if (bus_addr[i] != NULL) {
- topo_mod_strfree(mod, bus_addr[i]);
- }
- if (dev_path[i] != NULL) {
- topo_mod_strfree(mod, dev_path[i]);
- }
- }
-
- topo_mod_dprintf(mod, "pi_get_dipath: path (%s)\n", path);
- return (path);
-}
-
-
-/*
- * Get the product serial number (the ID as far as the topo authority is
- * concerned) either from the current node, if it is of type 'product', or
- * search for a product node in the PRI.
- *
- * The string must be freed with topo_mod_strfree()
- */
-char *
-pi_get_productsn(topo_mod_t *mod, md_t *mdp, mde_cookie_t mde_node)
-{
- int result;
- int idx;
- int num_nodes;
- char *id = NULL;
- char *type;
- size_t size;
- mde_cookie_t *nodes = NULL;
-
- topo_mod_dprintf(mod, "pi_get_productsn: enter\n");
-
- result = md_get_prop_str(mdp, mde_node, MD_STR_TYPE, &type);
- if (result == 0 && strcmp(type, MD_STR_PRODUCT) == 0) {
- /*
- * This is a product node. We need only search for the serial
- * number property on this node to return the ID.
- */
- result = md_get_prop_str(mdp, mde_node, MD_STR_SERIAL_NUMBER,
- &id);
- if (result != 0 || id == NULL || strlen(id) == 0)
- return (NULL);
-
- topo_mod_dprintf(mod, "pi_get_productsn: product-sn = %s\n",
- id);
- return (topo_mod_strdup(mod, id));
- }
-
- /*
- * Search the PRI for nodes of type MD_STR_COMPONENT and find the
- * first element with type of MD_STR_PRODUCT. This node
- * will contain the MD_STR_SERIAL_NUMBER property to use as the
- * product-sn.
- */
- num_nodes = pi_find_mdenodes(mod, mdp, MDE_INVAL_ELEM_COOKIE,
- MD_STR_COMPONENT, MD_STR_FWD, &nodes, &size);
- if (num_nodes <= 0 || nodes == NULL) {
- /* We did not find any component nodes */
- return (NULL);
- }
- topo_mod_dprintf(mod, "pi_get_productsn: found %d %s nodes\n",
- num_nodes, MD_STR_COMPONENT);
-
- idx = 0;
- while (id == NULL && idx < num_nodes) {
- result = md_get_prop_str(mdp, nodes[idx], MD_STR_TYPE, &type);
- if (result == 0 && strcmp(type, MD_STR_PRODUCT) == 0) {
- /*
- * This is a product node. Get the serial number
- * property from the node.
- */
- result = md_get_prop_str(mdp, nodes[idx],
- MD_STR_SERIAL_NUMBER, &id);
- if (result != 0)
- topo_mod_dprintf(mod, "pi_get_productsn: "
- "failed to read %s from node_0x%llx\n",
- MD_STR_SERIAL_NUMBER,
- (uint64_t)nodes[idx]);
- }
- /* Search the next node, if necessary */
- idx++;
- }
- topo_mod_free(mod, nodes, size);
-
- /* Everything is freed up and it's time to return the product-sn */
- if (result != 0 || id == NULL || strlen(id) == 0) {
- return (NULL);
- }
- topo_mod_dprintf(mod, "pi_get_productsn: product-sn %s\n", id);
-
- return (topo_mod_strdup(mod, id));
-}
-
-
-/*
- * Get the chassis serial number (the ID as far as the topo authority is
- * concerned) either from the current node, if it is of type 'chassis', or
- * search for a chassis node in the PRI.
- *
- * The string must be freed with topo_mod_strfree()
- */
-char *
-pi_get_chassisid(topo_mod_t *mod, md_t *mdp, mde_cookie_t mde_node)
-{
- int result;
- int idx;
- int num_nodes;
- char *id = NULL;
- char *hc_name = NULL;
- size_t chassis_size;
- mde_cookie_t *chassis_nodes = NULL;
-
- topo_mod_dprintf(mod, "pi_get_chassis: enter\n");
-
- hc_name = pi_get_topo_hc_name(mod, mdp, mde_node);
- if (hc_name != NULL && strcmp(hc_name, MD_STR_CHASSIS) == 0) {
- topo_mod_strfree(mod, hc_name);
-
- /*
- * This is a chassis node. We need only search for the serial
- * number property on this node to return the ID.
- */
- result = md_get_prop_str(mdp, mde_node, MD_STR_SERIAL_NUMBER,
- &id);
- if (result != 0 || id == NULL || strlen(id) == 0) {
- return (NULL);
- }
- topo_mod_dprintf(mod, "pi_get_chassis: chassis-id = %s\n", id);
- return (topo_mod_strdup(mod, id));
- }
- if (hc_name != NULL) {
- topo_mod_strfree(mod, hc_name);
- }
-
- /*
- * Search the PRI for nodes of type MD_STR_COMPONENT and find the
- * first element with topo-hc-type of MD_STR_CHASSIS. This node
- * will contain the MD_STR_SERIAL_NUMBER property to use as the
- * chassis-id.
- */
- num_nodes = pi_find_mdenodes(mod, mdp, MDE_INVAL_ELEM_COOKIE,
- MD_STR_COMPONENT, MD_STR_FWD, &chassis_nodes, &chassis_size);
- if (num_nodes <= 0 || chassis_nodes == NULL) {
- /* We did not find any chassis nodes */
- return (NULL);
- }
- topo_mod_dprintf(mod, "pi_get_chassisid: found %d %s nodes\n",
- num_nodes, MD_STR_COMPONENT);
-
- idx = 0;
- result = 0;
- while (id == NULL && idx < num_nodes) {
- hc_name = pi_get_topo_hc_name(mod, mdp, chassis_nodes[idx]);
- if (hc_name != NULL && strcmp(hc_name, MD_STR_CHASSIS) == 0) {
- /*
- * This is a chassis node. Get the serial number
- * property from the node.
- */
- result = md_get_prop_str(mdp, chassis_nodes[idx],
- MD_STR_SERIAL_NUMBER, &id);
- if (result != 0) {
- topo_mod_dprintf(mod, "pi_get_chassisid: "
- "failed to read %s from node_0x%llx\n",
- MD_STR_SERIAL_NUMBER,
- (uint64_t)chassis_nodes[idx]);
- }
- }
- topo_mod_strfree(mod, hc_name);
-
- /* Search the next node, if necessary */
- idx++;
- }
- topo_mod_free(mod, chassis_nodes, chassis_size);
-
- /* Everything is freed up and it's time to return the platform-id */
- if (result != 0 || id == NULL || strlen(id) == 0) {
- return (NULL);
- }
- topo_mod_dprintf(mod, "pi_get_chassis: chassis-id %s\n", id);
-
- return (topo_mod_strdup(mod, id));
-}
-
-
-/*
- * Determine if the node is a FRU by checking for the existance and non-zero
- * value of the 'fru' property on the mde node.
- */
-int
-pi_get_fru(topo_mod_t *mod, md_t *mdp, mde_cookie_t mde_node, int *is_fru)
-{
- int result;
- uint64_t fru;
-
- if (mod == NULL || mdp == NULL || is_fru == NULL) {
- return (-1);
- }
- fru = 0;
- *is_fru = 0;
-
- result = md_get_prop_val(mdp, mde_node, MD_STR_FRU, &fru);
- if (result != 0) {
- /* The node is not a FRU. */
- return (-1);
- }
- if (fru != 0) {
- *is_fru = 1;
- }
- return (0);
-}
-
-
-/*
- * Get the id property value from the given PRI node
- */
-int
-pi_get_instance(topo_mod_t *mod, md_t *mdp, mde_cookie_t mde_node,
- topo_instance_t *ip)
-{
- int result;
- uint64_t id;
-
- id = 0;
- result = md_get_prop_val(mdp, mde_node, MD_STR_ID, &id);
- if (result != 0) {
- /*
- * There is no id property.
- */
- topo_mod_dprintf(mod, "node_0x%llx has no id property\n",
- (uint64_t)mde_node);
- return (-1);
- }
- *ip = id;
-
- return (0);
-}
-
-
-/*
- * If the given MDE node is a FRU return the 'nac' property, if it exists,
- * to use as the label.
- *
- * The string must be freed with topo_mod_strfree()
- */
-char *
-pi_get_label(topo_mod_t *mod, md_t *mdp, mde_cookie_t mde_node)
-{
- int result;
- int is_fru;
- char *lp = NULL;
- char *hc_name = pi_get_topo_hc_name(mod, mdp, mde_node);
-
- /*
- * The disk enumerator will set the "bay" node as a FRU and
- * expect the label from the PRI. The "fru" property can not
- * be set because hostconfig has no way to set the S/N, P/N,
- * etc.. in the PRI.
- */
- if (strncmp(hc_name, BAY, strlen(BAY)) != 0) {
- result = pi_get_fru(mod, mdp, mde_node, &is_fru);
- if (result != 0 || is_fru == 0) {
- /* This node is not a FRU. It has no label */
- topo_mod_strfree(mod, hc_name);
- return (NULL);
- }
- }
- topo_mod_strfree(mod, hc_name);
-
- /*
- * The node is a FRU. Get the NAC name to use as a label.
- */
- result = md_get_prop_str(mdp, mde_node, MD_STR_NAC, &lp);
- if (result != 0 || lp == NULL || strlen(lp) == 0) {
- /* No NAC label. Return NULL */
- return (NULL);
- }
-
- /* Return a copy of the label */
- return (topo_mod_strdup(mod, lp));
-}
-
-
-/*
- * Return the "lun" property.
- */
-int
-pi_get_lun(topo_mod_t *mod, di_node_t node)
-{
- int lun;
- int *buf;
- unsigned char *chbuf;
- di_prop_t di_prop = DI_PROP_NIL;
- di_path_t dpath = DI_PATH_NIL;
- di_path_prop_t di_path_prop = DI_PROP_NIL;
-
- /* look for pathinfo property */
- while ((dpath = di_path_phci_next_path(node, dpath)) != DI_PATH_NIL) {
- while ((di_path_prop =
- di_path_prop_next(dpath, di_path_prop)) != DI_PROP_NIL) {
- if (strcmp("lun",
- di_path_prop_name(di_path_prop)) == 0) {
- (void) di_path_prop_ints(di_path_prop, &buf);
- bcopy(buf, &lun, sizeof (int));
- goto found;
- }
- }
- }
-
- /* look for devinfo property */
- for (di_prop = di_prop_next(node, DI_PROP_NIL);
- di_prop != DI_PROP_NIL;
- di_prop = di_prop_next(node, di_prop)) {
- if (strncmp("lun", di_prop_name(di_prop),
- strlen(di_prop_name(di_prop))) == 0) {
- if (di_prop_bytes(di_prop, &chbuf) < sizeof (uint_t)) {
- continue;
- }
- bcopy(chbuf, &lun, sizeof (uint_t));
- goto found;
- }
- }
-
- if (di_prop == DI_PROP_NIL && (dpath == DI_PATH_NIL ||
- di_path_prop == DI_PROP_NIL)) {
- return (-1);
- }
-found:
- topo_mod_dprintf(mod, "pi_get_lun: lun = (%d)\n", lun);
- return (lun);
-}
-
-
-/*
- * Return the complete part number string to the caller. The complete part
- * number is made up of the part number attribute concatenated with the dash
- * number attribute of the mde node.
- *
- * The string must be freed with topo_mod_strfree()
- */
-char *
-pi_get_part(topo_mod_t *mod, md_t *mdp, mde_cookie_t mde_node)
-{
- int result;
- size_t bufsize;
- char *buf = NULL;
- char *part = NULL;
- char *dash = NULL;
-
- result = md_get_prop_str(mdp, mde_node, MD_STR_PART_NUMBER, &part);
- if (result != 0) {
- part = NULL;
- }
- result = md_get_prop_str(mdp, mde_node, MD_STR_DASH_NUMBER, &dash);
- if (result != 0) {
- dash = NULL;
- }
- bufsize = 1 + (part ? strlen(part) : 0) + (dash ? strlen(dash) : 0);
- if (bufsize == 1) {
- return (NULL);
- }
-
- /* Construct the part number from the part and dash values */
- buf = topo_mod_alloc(mod, bufsize);
- if (buf != NULL) {
- (void) snprintf(buf, bufsize, "%s%s", (part ? part : ""),
- (dash ? dash : ""));
- }
-
- return (buf);
-}
-
-
-/*
- * Return the path string to the caller.
- *
- * The string must be freed with topo_mod_strfree()
- */
-char *
-pi_get_path(topo_mod_t *mod, md_t *mdp, mde_cookie_t mde_node)
-{
- int result;
- int i = 0;
- size_t max_addrs;
- size_t path_len = 0;
- size_t buf_len;
- char *propbuf = NULL;
- char *buf = NULL;
- char *buffree;
- char *path = NULL;
- char *token;
- char *dev_addr[MAX_PATH_DEPTH] = { NULL };
- char *dev_path[MAX_PATH_DEPTH] = { NULL };
- char *lastp;
-
- /*
- * Get the path property from PRI; should look something
- * like "/@600/@0".
- */
- result = md_get_prop_str(mdp, mde_node, MD_STR_PATH, &propbuf);
- if (result != 0 || propbuf == NULL || strlen(propbuf) == 0) {
- topo_mod_dprintf(mod, "pi_get_path: failed to get path\n");
- return (NULL);
- }
- buf_len = strlen(propbuf) + 1;
- buf = topo_mod_alloc(mod, buf_len);
- if (buf == NULL) {
- topo_mod_dprintf(mod, "pi_get_path: no memory\n");
- return (NULL);
- }
- buffree = buf; /* strtok_r is destructive */
- (void) strcpy(buf, propbuf);
-
- /*
- * Grab the address(es) from the path property.
- */
- if ((token = strtok_r(buf, "/@", &lastp)) != NULL) {
- dev_addr[i] = topo_mod_strdup(mod, token);
- while ((token = strtok_r(NULL, "/@", &lastp)) != NULL) {
- if (++i < MAX_PATH_DEPTH) {
- dev_addr[i] = topo_mod_strdup(mod, token);
- } else {
- topo_mod_dprintf(mod, "pi_get_path: path "
- "too long (%d)\n", i);
- topo_mod_free(mod, buffree, buf_len);
- return (NULL);
- }
- }
- } else {
- topo_mod_dprintf(mod, "pi_get_path: path wrong\n");
- topo_mod_free(mod, buffree, buf_len);
- return (NULL);
- }
- max_addrs = ++i;
- topo_mod_free(mod, buffree, buf_len);
-
- /*
- * Construct the path to look something like "/pci@600/pci@0".
- */
- for (i = 0; i < max_addrs; i++) {
- int len = strlen(dev_addr[i]) + strlen("/pci@") + 1;
- path_len += len;
- dev_path[i] = (char *)topo_mod_alloc(mod, len);
- result = snprintf(dev_path[i], len, "/pci@%s", dev_addr[i]);
- if (result < 0) {
- return (NULL);
- }
- }
-
- path_len -= (i - 1); /* leave room for one null char */
- path = (char *)topo_mod_alloc(mod, path_len);
- path = strcpy(path, dev_path[0]);
-
- /* put the parts together */
- for (i = 1; i < max_addrs; i++) {
- path = strncat(path, dev_path[i], strlen(dev_path[i]) + 1);
- }
-
- /*
- * Cleanup
- */
- for (i = 0; i < max_addrs; i++) {
- if (dev_addr[i] != NULL) {
- topo_mod_free(mod, dev_addr[i],
- strlen(dev_addr[i]) + 1);
- }
- if (dev_path[i] != NULL) {
- topo_mod_free(mod, dev_path[i],
- strlen(dev_path[i]) + 1);
- }
- }
-
- topo_mod_dprintf(mod, "pi_get_path: path = (%s)\n", path);
- return (path);
-}
-
-
-/*
- * Get the product ID from the 'platform' node in the PRI
- *
- * The string must be freed with topo_mod_strfree()
- */
-char *
-pi_get_productid(topo_mod_t *mod, md_t *mdp)
-{
- int result;
- char *id = NULL;
- size_t platform_size;
- mde_cookie_t *platform_nodes = NULL;
-
- topo_mod_dprintf(mod, "pi_get_product: enter\n");
-
- /*
- * Search the PRI for nodes of type MD_STR_PLATFORM, which contains
- * the product-id in it's MD_STR_NAME property.
- */
- result = pi_find_mdenodes(mod, mdp, MDE_INVAL_ELEM_COOKIE,
- MD_STR_PLATFORM, MD_STR_FWD, &platform_nodes, &platform_size);
- if (result <= 0 || platform_nodes == NULL) {
- /* We did not find any platform nodes */
- return (NULL);
- }
- topo_mod_dprintf(mod, "pi_get_productid: found %d platform nodes\n",
- result);
-
- /*
- * There should only be 1 platform node, so we will always
- * use the first if we find any at all.
- */
- result = md_get_prop_str(mdp, platform_nodes[0], MD_STR_NAME, &id);
- topo_mod_free(mod, platform_nodes, platform_size);
-
- /* Everything is freed up and it's time to return the platform-id */
- if (result != 0 || id == NULL || strlen(id) == 0) {
- return (NULL);
- }
- topo_mod_dprintf(mod, "pi_get_product: returning %s\n", id);
-
- return (topo_mod_strdup(mod, id));
-}
-
-
-/*
- * If the phy pointer is NULL just return the number of 'phy_number' properties
- * from the PRI; otherwise pass the 'phy_number' property values back to the
- * caller.
- *
- * The caller is responsible for managing allocated memory.
- */
-int
-pi_get_priphy(topo_mod_t *mod, md_t *mdp, mde_cookie_t mde_node, uint8_t *phyp)
-{
- int result;
- uint8_t *phy_num;
- int nphy;
-
- result = md_get_prop_data(mdp, mde_node, MD_STR_PHY_NUMBER,
- &phy_num, &nphy);
- if (result != 0) {
- /* no phy_number property */
- topo_mod_dprintf(mod,
- "node_0x%llx has no phy_number property\n",
- (uint64_t)mde_node);
- return (-1);
- }
-
- if (phyp != NULL) {
- bcopy(phy_num, phyp, nphy);
- }
- return (nphy);
-}
-
-
-/*
- * Return "phy-num" devinfo/pathinfo property.
- */
-int
-pi_get_phynum(topo_mod_t *mod, di_node_t node)
-{
- int phy;
- int *buf;
- unsigned char *chbuf;
- di_prop_t di_prop = DI_PROP_NIL;
- di_path_t dpath = DI_PATH_NIL;
- di_path_prop_t di_path_prop = DI_PROP_NIL;
-
-
- /* look for pathinfo property */
- while ((dpath = di_path_phci_next_path(node, dpath)) != DI_PATH_NIL) {
- while ((di_path_prop =
- di_path_prop_next(dpath, di_path_prop)) != DI_PROP_NIL) {
- if (strcmp("phy-num",
- di_path_prop_name(di_path_prop)) == 0) {
- (void) di_path_prop_ints(di_path_prop, &buf);
- bcopy(buf, &phy, sizeof (int));
- goto found;
- }
- }
- }
-
- /* look for devinfo property */
- for (di_prop = di_prop_next(node, DI_PROP_NIL);
- di_prop != DI_PROP_NIL;
- di_prop = di_prop_next(node, di_prop)) {
- if (strncmp("phy-num", di_prop_name(di_prop),
- strlen("phy-num")) == 0) {
- if (di_prop_bytes(di_prop, &chbuf) < sizeof (uint_t)) {
- continue;
- }
- bcopy(chbuf, &phy, sizeof (uint_t));
- goto found;
- }
- }
-
- if (di_prop == DI_PROP_NIL && (dpath == DI_PATH_NIL ||
- di_path_prop == DI_PROP_NIL)) {
- return (-1);
- }
-found:
- topo_mod_dprintf(mod, "pi_get_phynum: phy = %d\n", phy);
- return (phy);
-}
-
-
-/*
- * Return the revision string to the caller.
- *
- * The string must be freed with topo_mod_strfree()
- */
-char *
-pi_get_revision(topo_mod_t *mod, md_t *mdp, mde_cookie_t mde_node)
-{
- int result;
- char *rp = NULL;
-
- result = md_get_prop_str(mdp, mde_node, MD_STR_REVISION_NUMBER, &rp);
- if (result != 0 || rp == NULL || strlen(rp) == 0) {
- return (NULL);
- }
-
- return (topo_mod_strdup(mod, rp));
-}
-
-
-/*
- * Return the serial number string to the caller.
- *
- * The string must be freed with topo_mod_strfree()
- */
-char *
-pi_get_serial(topo_mod_t *mod, md_t *mdp, mde_cookie_t mde_node)
-{
- int result;
- uint64_t sn;
- char *sp = NULL;
- char buf[MAXNAMELEN];
-
- result = md_get_prop_str(mdp, mde_node, MD_STR_SERIAL_NUMBER, &sp);
- if (result != 0 || sp == NULL || strlen(sp) == 0) {
- /* Is this a uint64_t type serial number? */
- result = md_get_prop_val(mdp, mde_node, MD_STR_SERIAL_NUMBER,
- &sn);
- if (result != 0) {
- /* No. We have failed to find a serial number */
- return (NULL);
- }
- topo_mod_dprintf(mod, "pi_get_serial: node_0x%llx numeric "
- "serial number %llx\n", (uint64_t)mde_node, sn);
-
- /* Convert the acquired value to a string */
- result = snprintf(buf, sizeof (buf), "%llu", sn);
- if (result < 0) {
- return (NULL);
- }
- sp = buf;
- }
- topo_mod_dprintf(mod, "pi_get_serial: node_0x%llx = %s\n",
- (uint64_t)mde_node, (sp == NULL ? "NULL" : sp));
-
- return (topo_mod_strdup(mod, sp));
-}
-
-
-/*
- * Get the server hostname (the ID as far as the topo authority is
- * concerned) from sysinfo and return a copy to the caller.
- *
- * The string must be freed with topo_mod_strfree()
- */
-char *
-pi_get_serverid(topo_mod_t *mod)
-{
- int result;
- char hostname[MAXNAMELEN];
-
- topo_mod_dprintf(mod, "pi_get_serverid: enter\n");
-
- result = sysinfo(SI_HOSTNAME, hostname, sizeof (hostname));
- /* Everything is freed up and it's time to return the platform-id */
- if (result == -1) {
- return (NULL);
- }
- topo_mod_dprintf(mod, "pi_get_serverid: hostname = %s\n", hostname);
-
- return (topo_mod_strdup(mod, hostname));
-}
-
-
-/*
- * Return the "target-port" property.
- *
- * The string must be freed with topo_mod_strfree()
- */
-char *
-pi_get_target_port(topo_mod_t *mod, di_node_t node)
-{
- char *tport;
- di_prop_t di_prop = DI_PROP_NIL;
- di_path_t dpath = DI_PATH_NIL;
- di_path_prop_t di_path_prop = DI_PROP_NIL;
-
- /* look for pathinfo property */
- while ((dpath = di_path_phci_next_path(node, dpath)) != DI_PATH_NIL) {
- while ((di_path_prop =
- di_path_prop_next(dpath, di_path_prop)) != DI_PROP_NIL) {
- if (strcmp("target-port",
- di_path_prop_name(di_path_prop)) == 0) {
- (void) di_path_prop_strings(di_path_prop,
- &tport);
- goto found;
- }
- }
- }
-
- /* look for devinfo property */
- for (di_prop = di_prop_next(node, DI_PROP_NIL);
- di_prop != DI_PROP_NIL;
- di_prop = di_prop_next(node, di_prop)) {
- if (strcmp("target-port", di_prop_name(di_prop)) == 0) {
- if (di_prop_strings(di_prop, &tport) < 0) {
- continue;
- }
- goto found;
- }
- }
-
- if (di_prop == DI_PROP_NIL && (dpath == DI_PATH_NIL ||
- di_path_prop == DI_PROP_NIL)) {
- return (NULL);
- }
-found:
- topo_mod_dprintf(mod, "pi_get_target_port: 'target-port' = (%s)\n",
- tport);
- return (topo_mod_strdup(mod, tport));
-}
-
-
-/*
- * Get the hc scheme name for the given node.
- *
- * The string must be freed with topo_mod_strfree()
- */
-char *
-pi_get_topo_hc_name(topo_mod_t *mod, md_t *mdp, mde_cookie_t mde_node)
-{
- int result;
- char *hc_name;
-
- /*
- * Request the hc name from the node.
- */
- hc_name = NULL;
- result = md_get_prop_str(mdp, mde_node, MD_STR_TOPO_HC_NAME, &hc_name);
- if (result != 0 || hc_name == NULL) {
- topo_mod_dprintf(mod,
- "failed to get property %s from node_0x%llx\n",
- MD_STR_TOPO_HC_NAME, (uint64_t)mde_node);
- return (NULL);
- }
-
- /* Return a copy of the type string */
- return (topo_mod_strdup(mod, hc_name));
-}
-
-
-/*
- * Calculate the authority information for a node. Inherit the data if
- * possible, but always create an appropriate property group.
- */
-int
-pi_set_auth(topo_mod_t *mod, md_t *mdp, mde_cookie_t mde_node,
- tnode_t *t_parent, tnode_t *t_node)
-{
- int result;
- int err;
- nvlist_t *auth;
- char *val = NULL;
- char *prod = NULL;
- char *psn = NULL;
- char *csn = NULL;
- char *server = NULL;
-
- if (mod == NULL || mdp == NULL || t_parent == NULL || t_node == NULL) {
- return (-1);
- }
-
- result = topo_pgroup_create(t_node, &auth_pgroup, &err);
- if (result != 0 && err != ETOPO_PROP_DEFD) {
- /*
- * We failed to create the property group and it was not
- * already defined. Set the err code and return failure.
- */
- (void) topo_mod_seterrno(mod, err);
- return (-1);
- }
-
- /* Get the authority information already available from the parent */
- auth = topo_mod_auth(mod, t_parent);
-
- /*
- * Set the authority data, inheriting it if possible, but creating it
- * if necessary.
- */
-
- /* product-id */
- result = topo_prop_inherit(t_node, FM_FMRI_AUTHORITY,
- FM_FMRI_AUTH_PRODUCT, &err);
- if (result != 0 && err != ETOPO_PROP_DEFD) {
- val = NULL;
- result = nvlist_lookup_string(auth, FM_FMRI_AUTH_PRODUCT,
- &val);
- if (result != 0 || val == NULL) {
- /*
- * No product information in the parent node or auth
- * list. Find the product information in the PRI.
- */
- prod = pi_get_productid(mod, mdp);
- if (prod == NULL) {
- topo_mod_dprintf(mod, "pi_set_auth: product "
- "name not found for node_0x%llx\n",
- (uint64_t)mde_node);
- }
- } else {
- /*
- * Dup the string. If we cannot find it in the auth
- * nvlist we will need to free it, so this lets us
- * have a single code path.
- */
- prod = topo_mod_strdup(mod, val);
- }
-
- /*
- * We continue even if the product information is not available
- * to enumerate as much as possible.
- */
- if (prod != NULL) {
- result = topo_prop_set_string(t_node, FM_FMRI_AUTHORITY,
- FM_FMRI_AUTH_PRODUCT, TOPO_PROP_IMMUTABLE, prod,
- &err);
- if (result != 0) {
- /* Preserve the error and continue */
- (void) topo_mod_seterrno(mod, err);
- topo_mod_dprintf(mod, "pi_set_auth: failed to "
- "set property %s (%d) : %s\n",
- FM_FMRI_AUTH_CHASSIS, err,
- topo_strerror(err));
- }
- topo_mod_strfree(mod, prod);
- }
- }
-
- /* product-sn */
- result = topo_prop_inherit(t_node, FM_FMRI_AUTHORITY,
- FM_FMRI_AUTH_PRODUCT_SN, &err);
- if (result != 0 && err != ETOPO_PROP_DEFD) {
- val = NULL;
- result = nvlist_lookup_string(auth, FM_FMRI_AUTH_PRODUCT_SN,
- &val);
- if (result != 0 || val == NULL) {
- /*
- * No product-sn information in the parent node or auth
- * list. Find the product-sn information in the PRI.
- */
- psn = pi_get_productsn(mod, mdp, mde_node);
- if (psn == NULL) {
- topo_mod_dprintf(mod, "pi_set_auth: psn "
- "name not found for node_0x%llx\n",
- (uint64_t)mde_node);
- }
- } else {
- /*
- * Dup the string. If we cannot find it in the auth
- * nvlist we will need to free it, so this lets us
- * have a single code path.
- */
- psn = topo_mod_strdup(mod, val);
- }
-
- /*
- * We continue even if the product information is not available
- * to enumerate as much as possible.
- */
- if (psn != NULL) {
- result = topo_prop_set_string(t_node, FM_FMRI_AUTHORITY,
- FM_FMRI_AUTH_PRODUCT_SN, TOPO_PROP_IMMUTABLE, psn,
- &err);
- if (result != 0) {
- /* Preserve the error and continue */
- (void) topo_mod_seterrno(mod, err);
- topo_mod_dprintf(mod, "pi_set_auth: failed to "
- "set property %s (%d) : %s\n",
- FM_FMRI_AUTH_PRODUCT_SN, err,
- topo_strerror(err));
- }
- topo_mod_strfree(mod, psn);
- }
- }
-
- /* chassis-id */
- result = topo_prop_inherit(t_node, FM_FMRI_AUTHORITY,
- FM_FMRI_AUTH_CHASSIS, &err);
- if (result != 0 && err != ETOPO_PROP_DEFD) {
- val = NULL;
- result = nvlist_lookup_string(auth, FM_FMRI_AUTH_CHASSIS,
- &val);
- if (result != 0 || val == NULL) {
- /*
- * No product information in the parent node or auth
- * list. Find the product information in the PRI.
- */
- csn = pi_get_chassisid(mod, mdp, mde_node);
- if (csn == NULL) {
- topo_mod_dprintf(mod, "pi_set_auth: csn "
- "name not found for node_0x%llx\n",
- (uint64_t)mde_node);
- }
- } else {
- /*
- * Dup the string. If we cannot find it in the auth
- * nvlist we will need to free it, so this lets us
- * have a single code path.
- */
- csn = topo_mod_strdup(mod, val);
- }
-
- /*
- * We continue even if the product information is not available
- * to enumerate as much as possible.
- */
- if (csn != NULL) {
- result = topo_prop_set_string(t_node, FM_FMRI_AUTHORITY,
- FM_FMRI_AUTH_CHASSIS, TOPO_PROP_IMMUTABLE, csn,
- &err);
- if (result != 0) {
- /* Preserve the error and continue */
- (void) topo_mod_seterrno(mod, err);
- topo_mod_dprintf(mod, "pi_set_auth: failed to "
- "set property %s (%d) : %s\n",
- FM_FMRI_AUTH_CHASSIS, err,
- topo_strerror(err));
- }
- topo_mod_strfree(mod, csn);
- }
- }
-
- /* server-id */
- result = topo_prop_inherit(t_node, FM_FMRI_AUTHORITY,
- FM_FMRI_AUTH_SERVER, &err);
- if (result != 0 && err != ETOPO_PROP_DEFD) {
- val = NULL;
- result = nvlist_lookup_string(auth, FM_FMRI_AUTH_SERVER,
- &val);
- if (result != 0 || val == NULL) {
- /*
- * No product information in the parent node or auth
- * list. Find the product information in the PRI.
- */
- server = pi_get_serverid(mod);
- if (server == NULL) {
- topo_mod_dprintf(mod, "pi_set_auth: server "
- "name not found for node_0x%llx\n",
- (uint64_t)mde_node);
- }
- } else {
- /*
- * Dup the string. If we cannot find it in the auth
- * nvlist we will need to free it, so this lets us
- * have a single code path.
- */
- server = topo_mod_strdup(mod, val);
- }
-
- /*
- * We continue even if the product information is not available
- * to enumerate as much as possible.
- */
- if (server != NULL) {
- result = topo_prop_set_string(t_node, FM_FMRI_AUTHORITY,
- FM_FMRI_AUTH_SERVER, TOPO_PROP_IMMUTABLE, server,
- &err);
- if (result != 0) {
- /* Preserve the error and continue */
- (void) topo_mod_seterrno(mod, err);
- topo_mod_dprintf(mod, "pi_set_auth: failed to "
- "set property %s (%d) : %s\n",
- FM_FMRI_AUTH_SERVER, err,
- topo_strerror(err));
- }
- topo_mod_strfree(mod, server);
- }
- }
-
- nvlist_free(auth);
-
- return (0);
-}
-
-
-/*
- * Calculate a generic FRU for the given node. If the node is not a FRU,
- * then inherit the FRU data from the nodes parent.
- */
-int
-pi_set_frufmri(topo_mod_t *mod, md_t *mdp, mde_cookie_t mde_node,
- const char *name, topo_instance_t inst, tnode_t *t_parent, tnode_t *t_node)
-{
- int result;
- int err;
- int is_fru;
- char *part;
- char *rev;
- char *serial;
- nvlist_t *auth = NULL;
- nvlist_t *frufmri = NULL;
-
- if (t_node == NULL || mod == NULL || mdp == NULL) {
- return (-1);
- }
-
- /*
- * Determine if this node is a FRU
- */
- result = pi_get_fru(mod, mdp, mde_node, &is_fru);
- if (result != 0 || is_fru == 0) {
- /* This node is not a FRU. Inherit from parent and return */
- (void) topo_node_fru_set(t_node, NULL, 0, &result);
- return (0);
- }
-
- /*
- * This node is a FRU. Create an FMRI.
- */
- part = pi_get_part(mod, mdp, mde_node);
- rev = pi_get_revision(mod, mdp, mde_node);
- serial = pi_get_serial(mod, mdp, mde_node);
- auth = topo_mod_auth(mod, t_parent);
- frufmri = topo_mod_hcfmri(mod, t_parent, FM_HC_SCHEME_VERSION, name,
- inst, NULL, auth, part, rev, serial);
- if (frufmri == NULL) {
- topo_mod_dprintf(mod, "failed to create FRU: %s\n",
- topo_strerror(topo_mod_errno(mod)));
- }
- nvlist_free(auth);
- topo_mod_strfree(mod, part);
- topo_mod_strfree(mod, rev);
- topo_mod_strfree(mod, serial);
-
- /* Set the FRU, whether NULL or not */
- result = topo_node_fru_set(t_node, frufmri, 0, &err);
- if (result != 0) {
- (void) topo_mod_seterrno(mod, err);
- }
- nvlist_free(frufmri);
-
- return (result);
-}
-
-
-int
-pi_set_label(topo_mod_t *mod, md_t *mdp, mde_cookie_t mde_node, tnode_t *t_node)
-{
- int result;
- int err;
- char *label;
-
- if (mod == NULL || mdp == NULL) {
- return (-1);
- }
-
- /*
- * Get the label, if any, from the mde node and apply it as the label
- * for this topology node. Note that a NULL label will inherit the
- * label from topology node's parent.
- */
- label = pi_get_label(mod, mdp, mde_node);
- result = topo_node_label_set(t_node, label, &err);
- topo_mod_strfree(mod, label);
- if (result != 0) {
- (void) topo_mod_seterrno(mod, err);
- topo_mod_dprintf(mod, "pi_set_label: failed with label %s "
- "on node_0x%llx: %s\n", (label == NULL ? "NULL" : label),
- (uint64_t)mde_node, topo_strerror(err));
- }
-
- return (result);
-}
-
-
-/*
- * Calculate the system information for a node. Inherit the data if
- * possible, but always create an appropriate property group.
- */
-int
-pi_set_system(topo_mod_t *mod, tnode_t *t_node)
-{
- int result;
- int err;
- struct utsname uts;
- char isa[MAXNAMELEN];
-
- if (mod == NULL || t_node == NULL) {
- return (-1);
- }
-
- result = topo_pgroup_create(t_node, &sys_pgroup, &err);
- if (result != 0 && err != ETOPO_PROP_DEFD) {
- /*
- * We failed to create the property group and it was not
- * already defined. Set the err code and return failure.
- */
- (void) topo_mod_seterrno(mod, err);
- return (-1);
- }
-
- result = topo_prop_inherit(t_node, TOPO_PGROUP_SYSTEM, TOPO_PROP_ISA,
- &err);
- if (result != 0 && err != ETOPO_PROP_DEFD) {
- isa[0] = '\0';
- result = sysinfo(SI_ARCHITECTURE, isa, sizeof (isa));
- if (result == -1) {
- /* Preserve the error and continue */
- topo_mod_dprintf(mod, "pi_set_system: failed to "
- "read SI_ARCHITECTURE: %d\n", errno);
- }
- if (strnlen(isa, MAXNAMELEN) > 0) {
- result = topo_prop_set_string(t_node,
- TOPO_PGROUP_SYSTEM, TOPO_PROP_ISA,
- TOPO_PROP_IMMUTABLE, isa, &err);
- if (result != 0) {
- /* Preserve the error and continue */
- (void) topo_mod_seterrno(mod, err);
- topo_mod_dprintf(mod, "pi_set_auth: failed to "
- "set property %s (%d) : %s\n",
- TOPO_PROP_ISA, err, topo_strerror(err));
- }
- }
- }
-
- result = topo_prop_inherit(t_node, TOPO_PGROUP_SYSTEM,
- TOPO_PROP_MACHINE, &err);
- if (result != 0 && err != ETOPO_PROP_DEFD) {
- result = uname(&uts);
- if (result == -1) {
- /* Preserve the error and continue */
- (void) topo_mod_seterrno(mod, errno);
- topo_mod_dprintf(mod, "pi_set_system: failed to "
- "read uname: %d\n", errno);
- }
- if (strnlen(uts.machine, sizeof (uts.machine)) > 0) {
- result = topo_prop_set_string(t_node,
- TOPO_PGROUP_SYSTEM, TOPO_PROP_MACHINE,
- TOPO_PROP_IMMUTABLE, uts.machine, &err);
- if (result != 0) {
- /* Preserve the error and continue */
- (void) topo_mod_seterrno(mod, err);
- topo_mod_dprintf(mod, "pi_set_auth: failed to "
- "set property %s (%d) : %s\n",
- TOPO_PROP_MACHINE, err, topo_strerror(err));
- }
- }
- }
-
- return (0);
-}
-
-
-tnode_t *
-pi_node_bind(topo_mod_t *mod, md_t *mdp, mde_cookie_t mde_node,
- tnode_t *t_parent, const char *hc_name, topo_instance_t inst,
- nvlist_t *fmri)
-{
- int result;
- tnode_t *t_node;
-
- if (t_parent == NULL) {
- topo_mod_dprintf(mod,
- "cannot bind for node_0x%llx instance %d type %s\n",
- (uint64_t)mde_node, inst, hc_name);
- return (NULL);
- }
-
- /* Bind this node to the parent */
- t_node = topo_node_bind(mod, t_parent, hc_name, inst, fmri);
- if (t_node == NULL) {
- topo_mod_dprintf(mod,
- "failed to bind node_0x%llx instance %d: %s\n",
- (uint64_t)mde_node, (uint32_t)inst,
- topo_strerror(topo_mod_errno(mod)));
- return (NULL);
- }
- topo_mod_dprintf(mod, "bound node_0x%llx instance %d type %s\n",
- (uint64_t)mde_node, inst, hc_name);
-
- /*
- * We have bound the node. Now decorate it with an appropriate
- * FRU and label (which may be inherited from the parent).
- *
- * The disk enumerator requires that 'bay' nodes not set their
- * fru property.
- */
- if (strncmp(hc_name, BAY, strlen(BAY)) != 0) {
- result = pi_set_frufmri(mod, mdp, mde_node, hc_name, inst,
- t_parent, t_node);
- if (result != 0) {
- /*
- * Though we have failed to set the FRU FMRI we still
- * continue. The module errno is set by the called
- * routine, so we report the problem and move on.
- */
- topo_mod_dprintf(mod,
- "failed to set FRU FMRI for node_0x%llx\n",
- (uint64_t)mde_node);
- }
- }
-
- result = pi_set_label(mod, mdp, mde_node, t_node);
- if (result != 0) {
- /*
- * Though we have failed to set the label, we still continue.
- * The module errno is set by the called routine, so we report
- * the problem and move on.
- */
- topo_mod_dprintf(mod, "failed to set label for node_0x%llx\n",
- (uint64_t)mde_node);
- }
-
- result = pi_set_auth(mod, mdp, mde_node, t_parent, t_node);
- if (result != 0) {
- /*
- * Though we have failed to set the authority, we still
- * continue. The module errno is set by the called routine, so
- * we report the problem and move on.
- */
- topo_mod_dprintf(mod, "failed to set authority for "
- "node_0x%llx\n", (uint64_t)mde_node);
- }
-
- result = pi_set_system(mod, t_node);
- if (result != 0) {
- /*
- * Though we have failed to set the system group, we still
- * continue. The module errno is set by the called routine, so
- * we report the problem and move on.
- */
- topo_mod_dprintf(mod, "failed to set system for node_0x%llx\n",
- (uint64_t)mde_node);
- }
-
- return (t_node);
-}
diff --git a/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_top.c b/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_top.c
deleted file mode 100644
index 5794b7536d..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_top.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * Create a topology node for a top level PRI node, one that is a child
- * of the 'components' node.
- */
-#include <sys/types.h>
-#include <strings.h>
-#include <sys/fm/protocol.h>
-#include <fm/topo_mod.h>
-#include <fm/topo_hc.h>
-#include "pi_impl.h"
-
-#define _ENUM_NAME "enum_top"
-
-/*
- * This enumerator is the same as the generic enumerator, except that when
- * the FMRI is created, the parent node must be NULL. This is true for all
- * top level nodes.
- */
-int
-pi_enum_top(topo_mod_t *mod, md_t *mdp, mde_cookie_t mde_node,
- topo_instance_t inst, tnode_t *t_parent, const char *hc_name,
- tnode_t **t_node)
-{
- int result;
-
- /*
- * This is a top-level topology node and there is no resource data
- * from which to generate an FMRI. We use a NULL value for the FMRI
- * parent when creating the FMRI for this node so that the underlying
- * libtopo method does not fail.
- */
- result = pi_enum_generic_impl(mod, mdp, mde_node, inst, t_parent,
- NULL, hc_name, _ENUM_NAME, t_node, 0);
- return (result);
-}
diff --git a/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_walker.c b/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_walker.c
deleted file mode 100644
index a767df54d6..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/pi_walker.c
+++ /dev/null
@@ -1,804 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
- */
-
-/*
- * Walk the LDOM PRI component nodes and create appropriate topology nodes
- */
-
-#include <sys/types.h>
-#include <sys/time.h>
-#include <stddef.h>
-#include <inttypes.h>
-#include <strings.h>
-#include <string.h>
-#include <libuutil.h>
-#include <libnvpair.h>
-#include <sys/mdesc.h>
-#include <fm/topo_mod.h>
-#include <fm/topo_hc.h>
-#include "pi_impl.h"
-
-#define PI_STR_MIN "instance_min"
-#define PI_STR_MAX "instance_max"
-
-/*
- * Allow for custom topo node creation routines based on topo-hc-name.
- */
-struct pi_enum_functions_s {
- pi_enum_fn_t *func;
- char *hc_name; /* topo-hc-name */
-};
-typedef struct pi_enum_functions_s pi_enum_functions_t;
-
-struct pi_methods_s {
- topo_method_t *meths;
- char *hc_name;
-};
-typedef struct pi_methods_s pi_methods_t;
-
-extern topo_method_t pi_cpu_methods[], pi_mem_methods[];
-
-/*
- * List of custom enumerators for PRI nodes that require them. The most
- * common nodes are listed first.
- */
-static pi_enum_functions_t pi_enum_fns_builtin[] = {
- {pi_enum_cpu, STRAND},
- {pi_enum_cpu, CPU},
- {pi_enum_mem, DIMM},
- {pi_enum_cpu, CORE},
- {pi_enum_cpu, CHIP},
- {pi_enum_hostbridge, HOSTBRIDGE},
- {pi_enum_pciexrc, PCIEX_ROOT},
- {pi_enum_niu, NIU},
- {pi_enum_bay, BAY},
- {NULL, NULL}
-};
-static nvlist_t *pi_enum_fns;
-
-/* List of methods that will be registered in the nodes. */
-static pi_methods_t pi_meths_builtin[] = {
- {pi_cpu_methods, CHIP},
- {pi_cpu_methods, CORE},
- {pi_cpu_methods, STRAND},
- {pi_cpu_methods, CPU},
- {pi_mem_methods, DIMM},
- {NULL, NULL}
-};
-nvlist_t *pi_meths;
-
-/*
- * In order to create a topology node from a PRI MDE node we need to know the
- * topology parent node that should be used. So, after creating a topology
- * node from an MDE node, we associate children of the MDE node with the new
- * topology node. Thus, when the children are visited we can know the
- * appropriate parent topology node to use.
- *
- * We take advantage of the libtopo threading model here, which guarantees a
- * single thread and a single invocation at a time for an enumerator. This
- * makes using a file-global safe.
- */
-static uu_list_pool_t *walker_pool = NULL;
-static uu_list_t *walker_list = NULL;
-
-struct pi_walkernode_s {
- uu_list_node_t walker_node;
- tnode_t *t_parent; /* Parent topology node */
- mde_cookie_t mde_node; /* Child MDE node index */
-};
-typedef struct pi_walkernode_s pi_walkernode_t;
-
-
-/* The routine called for each node in the PRI while walking the graph */
-static int pi_walker_node(md_t *, mde_cookie_t, mde_cookie_t, void *);
-
-/*
- * Create a sub-range for a given PRI node and associate the given topology
- * node with the children.
- */
-static int pi_walker_node_range(topo_mod_t *, md_t *, tnode_t *, mde_cookie_t);
-static int pi_walker_node_create(topo_mod_t *, md_t *, mde_cookie_t, tnode_t *,
- topo_instance_t, tnode_t **);
-
-/* Routines to handle the list of topology parents and mde_nodes */
-static int pi_walkerlist_compare(const void *, const void *, void *);
-static int pi_walkerlist_create(topo_mod_t *);
-static void pi_walkerlist_destroy(topo_mod_t *);
-static int pi_walkerlist_add(topo_mod_t *, tnode_t *, mde_cookie_t);
-static int pi_walkerlist_addtype(topo_mod_t *, nvlist_t *, char *, uint32_t,
- uint32_t);
-static int pi_walkerlist_find(topo_mod_t *, mde_cookie_t, tnode_t **);
-
-
-int
-pi_walker_init(topo_mod_t *mod)
-{
- int result;
- pi_enum_functions_t *fp;
- pi_methods_t *mp;
-
- result = topo_mod_nvalloc(mod, &pi_enum_fns, NV_UNIQUE_NAME);
- result |= topo_mod_nvalloc(mod, &pi_meths, NV_UNIQUE_NAME);
- if (result != 0) {
- topo_mod_dprintf(mod, "pi_walker_init failed\n");
- nvlist_free(pi_enum_fns);
- nvlist_free(pi_meths);
- return (-1);
- }
-
- /* Add the builtin functions to the list */
- fp = pi_enum_fns_builtin;
- while (fp != NULL && fp->hc_name != NULL) {
- uint64_t faddr;
-
- faddr = (uint64_t)(uintptr_t)*(fp->func);
- result |= nvlist_add_uint64(pi_enum_fns, fp->hc_name, faddr);
- fp++;
- }
-
- /* Add the builtin methods to the list */
- mp = pi_meths_builtin;
- while (mp != NULL && mp->hc_name != NULL) {
- uint64_t maddr;
-
- maddr = (uint64_t)(uintptr_t)mp->meths;
- result |= nvlist_add_uint64(pi_meths, mp->hc_name, maddr);
- mp++;
- }
-
- if (result != 0) {
- topo_mod_dprintf(mod, "pi_walker_init failed\n");
- nvlist_free(pi_enum_fns);
- nvlist_free(pi_meths);
- return (-1);
- }
-
- return (0);
-}
-
-
-void
-pi_walker_fini(topo_mod_t *mod)
-{
- topo_mod_dprintf(mod, "pi_walker_fini: enter\n");
- nvlist_free(pi_enum_fns);
- nvlist_free(pi_meths);
-}
-
-
-/*
- * Begin to walk the machine description array starting at the given PRI node.
- */
-int
-pi_walker(pi_enum_t *pip, tnode_t *t_parent, const char *hc_name,
- mde_cookie_t mde_node, mde_str_cookie_t component_cookie,
- mde_str_cookie_t arc_cookie)
-{
- int result;
- hrtime_t starttime;
- hrtime_t endtime;
- topo_mod_t *mod;
-
- if (pip == NULL) {
- return (-1);
- }
- mod = pip->mod;
-
- starttime = gethrtime();
- topo_mod_dprintf(mod, "walker starting at node_0x%llx\n",
- mde_node);
-
- /*
- * Create a list to store topology nodes and their associated machine
- * description index. This allows the code to know the parent of a
- * node when creating topology entries.
- */
- result = pi_walkerlist_create(mod);
- if (result != 0) {
- topo_mod_dprintf(mod, "walker could not create list\n");
- return (result);
- }
-
- /* Create a walker node for the parent of the start node */
- result = pi_walkerlist_add(mod, t_parent, mde_node);
- if (result != 0) {
- pi_walkerlist_destroy(mod);
- topo_mod_dprintf(mod, "walker could not add to list\n");
- (void) topo_mod_seterrno(mod, EMOD_UKNOWN_ENUM);
- return (result);
- }
-
- /*
- * This is a top-level node. Make sure we call the top level
- * enumerator if there is not already a custom enumerator registered.
- */
- if (! nvlist_exists(pi_enum_fns, hc_name)) {
- uint64_t faddr;
-
- /*
- * There is no enumerator function registered for this
- * hc name. Automatically register the top level node
- * enumerator function.
- */
- faddr = (uint64_t)(uintptr_t)pi_enum_top;
- result = nvlist_add_uint64(pi_enum_fns, hc_name, faddr);
- if (result != 0) {
- pi_walkerlist_destroy(mod);
- topo_mod_dprintf(mod,
- "walker could not register enumerator for type "
- "%s\n", hc_name);
- (void) topo_mod_seterrno(mod, EMOD_UKNOWN_ENUM);
- return (-1);
- }
- topo_mod_dprintf(mod,
- "walker registered pi_enum_top enumerator for type %s\n",
- hc_name);
- }
-
- /* Walk the machine description list starting at the given node */
- result = md_walk_dag(pip->mdp, mde_node, component_cookie, arc_cookie,
- pi_walker_node, (void *)pip);
- switch (result) {
- case 0:
- /* Successful completion */
- /* DO NOTHING */
- break;
-
- case MDE_WALK_ERROR:
- /*
- * Store that we have a partial enumeration and return
- * that we have encountered an error.
- */
- (void) topo_mod_seterrno(mod, EMOD_PARTIAL_ENUM);
- result = -1;
- break;
-
- default:
- /*
- * This should not happen. We want to always produce
- * as complete a topology as possible, even in the face
- * of errors, however, so set an error and continue.
- */
- topo_mod_dprintf(mod,
- "walker encountered invalid result: %d. "
- "Continuing\n", result);
- (void) topo_mod_seterrno(mod, EMOD_UKNOWN_ENUM);
- result = 0;
- break;
- }
-
- /* Destroy the walker list, which is no longer necessary */
- pi_walkerlist_destroy(mod);
-
- topo_mod_dprintf(mod, "walker done with node_0x%llx\n", mde_node);
-
- endtime = gethrtime();
- topo_mod_dprintf(mod, "walker scan time %lld ms\n",
- (endtime-starttime)/MICROSEC);
-
- return (result);
-}
-
-
-/*
- * Visited once for each node in the machine description. Creates a topo
- * node for the machine description node and associates it with it's parent,
- * by calling an appropriate creation routine for the node type.
- *
- * Output:
- * This routine returns MDE_WALK_NEXT, MDE_WALK_DONE or MDE_WALK_ERROR
- * only.
- */
-static int
-pi_walker_node(md_t *mdp, mde_cookie_t parent_mde_node, mde_cookie_t mde_node,
- void *private)
-{
- int result;
- pi_enum_t *pip = (pi_enum_t *)private;
- uint64_t skip; /* flag in md to skip this node */
- tnode_t *t_parent; /* topo parent to this md node */
- tnode_t *t_node; /* topo parent to this md node */
- topo_instance_t inst;
-
- topo_mod_t *mod;
-
- /* Make sure we have our private data */
- if (pip == NULL) {
- return (MDE_WALK_ERROR);
- }
- mod = pip->mod;
-
- topo_mod_dprintf(pip->mod,
- "walker processing node_0x%llx parent node 0x%llx\n",
- (uint64_t)mde_node, (uint64_t)parent_mde_node);
-
- /* Should we skip this node ? */
- skip = pi_skip_node(mod, pip->mdp, mde_node);
- if (skip) {
- /* Skip this node and continue to the next node */
- topo_mod_dprintf(mod, "walker skipping node_0x%llx\n",
- (uint64_t)mde_node);
- return (MDE_WALK_NEXT);
- }
-
- result = pi_get_instance(mod, mdp, mde_node, &inst);
- if (result != 0) {
- /*
- * No ID available to place this mde node in the topology so
- * we cannot create a topology node.
- */
- topo_mod_dprintf(mod, "walker skipping node_0x%llx: "
- "no instance\n", (uint64_t)mde_node);
- (void) topo_mod_seterrno(mod, EMOD_PARTIAL_ENUM);
- return (MDE_WALK_NEXT);
- }
-
- /*
- * Find the parent topo node for this machine description node.
- *
- * If found, the element will also be removed from the list and the
- * memory used to keep track of it released. We will only visit an
- * MDE node once and so the memory is no longer needed.
- */
- t_parent = NULL;
- result = pi_walkerlist_find(mod, mde_node, &t_parent);
- if (result != 0 || t_parent == NULL) {
- /*
- * No parent was found or a NULL parent encountered. We
- * cannot create a new topology node without a parent (
- * even for top level nodes). We associate children of
- * this MDE node with a NULL parent to silently skip the
- * remainder of this MDE branch.
- */
- topo_mod_dprintf(mod, "no topo parent found for node_0x%llx\n",
- mde_node);
- result = pi_walker_node_range(mod, mdp, NULL, mde_node);
- (void) topo_mod_seterrno(mod, EMOD_PARTIAL_ENUM);
-
- return (result);
- }
-
- /*
- * We have the mde node instance and parent information.
- * Attempt to create a topology node for this mde node.
- */
- t_node = NULL;
- result = pi_walker_node_create(mod, mdp, mde_node, t_parent, inst,
- &t_node);
- if (result != MDE_WALK_NEXT || t_node == NULL) {
- /*
- * We have failed to create a new topology node based on
- * the current MDE node. We set partial enumeration and
- * return without associating the children of this MDE
- * node with a topology parent. This will propgate the
- * creation error down this MDE branch.
- */
- (void) topo_mod_seterrno(mod, EMOD_PARTIAL_ENUM);
- return (result);
- }
-
- /*
- * Associate the new topology node with any children of this mde node.
- */
- result = pi_walker_node_range(mod, mdp, t_node, mde_node);
-
- topo_mod_dprintf(mod, "walker completed node_0x%llx result = %d\n",
- (uint64_t)mde_node, result);
-
- return (result);
-}
-
-
-static int
-pi_walker_node_create(topo_mod_t *mod, md_t *mdp, mde_cookie_t mde_node,
- tnode_t *t_parent, topo_instance_t inst, tnode_t **t_node)
-{
- int result;
- char *hc_name;
- uint64_t faddr;
- pi_enum_fn_t *func;
-
- if (t_parent == NULL) {
- /*
- * A parent topology node is required even for top-level
- * nodes.
- */
- return (MDE_WALK_NEXT);
- }
-
- /*
- * Find the topo-hc-name for this node which is used to find
- * the specific creation function
- */
- hc_name = pi_get_topo_hc_name(mod, mdp, mde_node);
- if (hc_name == NULL) {
- /* Cannot get the hc-name */
- topo_mod_dprintf(mod,
- "failed to find hc-name for node_0x%llx\n", mde_node);
- return (MDE_WALK_NEXT);
- }
-
- /* Determine the topology node creation routine to use */
- func = pi_enum_generic;
- faddr = 0;
- result = nvlist_lookup_uint64(pi_enum_fns, hc_name, &faddr);
- if (result == 0) {
- /*
- * A function is registered for this node. Convert the
- * address to a pointer to function
- */
- func = (pi_enum_fn_t *)(uintptr_t)faddr;
- }
-
- /*
- * Create a topology node for this mde node by calling the identified
- * enumeration function
- */
- *t_node = NULL;
- result = (func)(mod, mdp, mde_node, inst, t_parent, hc_name, t_node);
- if (result != 0) {
- topo_mod_dprintf(mod,
- "failed to create topo entry for node_0x%llx type %s\n",
- (uint64_t)mde_node, hc_name);
- }
-
- topo_mod_strfree(mod, hc_name);
-
- return (MDE_WALK_NEXT);
-}
-
-
-/*
- * Scan the children of a given MDE node and find all the sets of topo-hc-name
- * types and their instance ranges. From this information we create topology
- * node ranges on the given parent so that when the children are visited and a
- * topology node is created, the range exists and the creation will succeed.
- */
-static int
-pi_walker_node_range(topo_mod_t *mod, md_t *mdp, tnode_t *t_parent,
- mde_cookie_t mde_node)
-{
- int result;
- int rc;
- int num_arcs;
- nvlist_t *typelist;
- nvpair_t *nvp;
- mde_cookie_t *arcp;
- size_t arcsize;
- int arcidx;
- char *hc_name;
- nvlist_t *hc_range;
- topo_instance_t inst;
- uint32_t min;
- uint32_t max;
-
- if (t_parent == NULL) {
- topo_mod_dprintf(mod,
- "walker failed to create node range with a NULL parent\n");
- return (MDE_WALK_NEXT);
- }
-
- /* Determine how many children the given node has */
- num_arcs = md_get_prop_arcs(mdp, mde_node, MD_STR_FWD, NULL, 0);
- if (num_arcs == 0) {
- /* This node has no children */
- return (MDE_WALK_NEXT);
- }
- topo_mod_dprintf(mod, "node_0x%llx has %d children\n",
- (uint64_t)mde_node, num_arcs);
-
- /* Get the indexes for all the child nodes and put them in an array */
- arcsize = sizeof (mde_cookie_t) * num_arcs;
- arcp = topo_mod_zalloc(mod, arcsize);
- if (arcp == NULL) {
- topo_mod_dprintf(mod, "out of memory\n");
- (void) topo_mod_seterrno(mod, EMOD_NOMEM);
- return (MDE_WALK_ERROR);
- }
- num_arcs = md_get_prop_arcs(mdp, mde_node, MD_STR_FWD, arcp, arcsize);
-
- /*
- * The children of the given node may have multiple types.
- * Potentially, each child may have a different type and we need to
- * create a topo node range for each one.
- *
- * We loop through the children and collect the type information for
- * each one and associate the child with the given parent topo node.
- */
- result = topo_mod_nvalloc(mod, &typelist, NV_UNIQUE_NAME);
- if (result != 0) {
- topo_mod_free(mod, arcp, arcsize);
- (void) topo_mod_seterrno(mod, EMOD_NOMEM);
- return (MDE_WALK_ERROR);
- }
-
- arcidx = 0;
- for (arcidx = 0; arcidx < num_arcs; arcidx++) {
- /* Should this node be skipped? */
- if (pi_skip_node(mod, mdp, arcp[arcidx])) {
- /* Skip this node */
- topo_mod_dprintf(mod, "skipping node_0x%llx\n",
- (uint64_t)arcp[arcidx]);
- continue;
- }
-
- /* Get the type of this node */
- hc_name = pi_get_topo_hc_name(mod, mdp, arcp[arcidx]);
- rc = pi_get_instance(mod, mdp, arcp[arcidx], &inst);
- if (rc == 0 && hc_name != NULL) {
- /* Increment the count of nodes with this type */
- hc_range = NULL;
- rc = nvlist_lookup_nvlist(typelist, hc_name, &hc_range);
- if (rc != 0) {
- /*
- * We have not visited this type yet. Create
- * a new range based on this nodes instance
- * information.
- */
- result = pi_walkerlist_addtype(mod, typelist,
- hc_name, (uint32_t)inst, (uint32_t)inst);
- if (result != 0) {
- /*
- * This error can only if there was a
- * memory failure of some kind. Stop
- * the walk or it will just get worse.
- */
- nvlist_free(typelist);
- topo_mod_strfree(mod, hc_name);
- topo_mod_free(mod, arcp, arcsize);
- (void) topo_mod_seterrno(mod,
- EMOD_PARTIAL_ENUM);
- return (MDE_WALK_ERROR);
- }
-
- /*
- * We know the list exists now or the above
- * would have failed. Just look it up.
- */
- (void) nvlist_lookup_nvlist(typelist, hc_name,
- &hc_range);
- }
-
- /* Re-calculate the range minimums and maximums */
- (void) nvlist_lookup_uint32(hc_range, PI_STR_MIN, &min);
- (void) nvlist_lookup_uint32(hc_range, PI_STR_MAX, &max);
- min = MIN(min, (uint32_t)inst);
- max = MAX(max, (uint32_t)inst);
- (void) nvlist_add_uint32(hc_range, PI_STR_MIN, min);
- (void) nvlist_add_uint32(hc_range, PI_STR_MAX, max);
-
- } else {
- if (hc_name == NULL) {
- topo_mod_dprintf(mod, "node_0x%llx has no "
- "topo_hc_name.", (uint64_t)arcp[arcidx]);
- (void) topo_mod_seterrno(mod,
- EMOD_PARTIAL_ENUM);
- return (MDE_WALK_ERROR);
- }
-
- topo_mod_dprintf(mod, "node_0x%llx type %s has no id. "
- "Excluding from range", (uint64_t)arcp[arcidx],
- hc_name);
- }
- topo_mod_strfree(mod, hc_name);
-
- /*
- * Associate this node with the given topo parent even if it
- * has no instance. We do this so that later an error with
- * the PRI node will be reported instead of an internal
- * error about not being able to find the parent of a node
- */
- rc = pi_walkerlist_add(mod, t_parent, arcp[arcidx]);
- if (rc != 0) {
- topo_mod_dprintf(mod,
- "could not add node_0x%llx to walker list\n",
- (uint64_t)arcp[arcidx]);
- }
- }
-
- /*
- * We have associated all the child nodes with the given topo parent
- * in the walker list. Now we need to create topo ranges for each
- * set of child types under the parent.
- */
- nvp = nvlist_next_nvpair(typelist, NULL);
- while (nvp != NULL) {
- /* Get the type name and count from the list element */
- hc_name = nvpair_name(nvp);
- (void) nvpair_value_nvlist(nvp, &hc_range);
- (void) nvlist_lookup_uint32(hc_range, PI_STR_MIN, &min);
- (void) nvlist_lookup_uint32(hc_range, PI_STR_MAX, &max);
-
- /*
- * We have the number of children with this type.
- * Create an appropriate range.
- */
- topo_mod_dprintf(mod,
- "creating instance range %d to %d of type %s\n",
- min, max, hc_name);
- rc = topo_node_range_create(mod, t_parent, hc_name,
- (topo_instance_t)min, (topo_instance_t)max);
- if (rc != 0) {
- topo_mod_dprintf(mod,
- "failed to created node range %d to %d for "
- "nodes of type %s\n", min, max, hc_name);
- }
-
- /* Check the next node */
- nvp = nvlist_next_nvpair(typelist, nvp);
- }
- topo_mod_free(mod, arcp, arcsize);
- nvlist_free(typelist);
-
- return (MDE_WALK_NEXT);
-}
-
-
-static int
-pi_walkerlist_addtype(topo_mod_t *mod, nvlist_t *typelist, char *hc_name,
- uint32_t min, uint32_t max)
-{
- int result;
- nvlist_t *nvl;
-
- result = topo_mod_nvalloc(mod, &nvl, NV_UNIQUE_NAME);
- if (result != 0) {
- return (result);
- }
-
- /* Create min and max elements in this list */
- if (nvlist_add_uint32(nvl, PI_STR_MIN, min) != 0 ||
- nvlist_add_uint32(nvl, PI_STR_MAX, max) != 0 ||
- nvlist_add_nvlist(typelist, hc_name, nvl) != 0) {
- nvlist_free(nvl);
- return (-1);
- }
- nvlist_free(nvl);
-
- return (0);
-}
-
-
-/* ARGSUSED */
-static int
-pi_walkerlist_compare(const void *left, const void *right, void *private)
-{
- pi_walkernode_t *lp = (pi_walkernode_t *)left;
- pi_walkernode_t *rp = (pi_walkernode_t *)right;
-
- if (lp->mde_node > rp->mde_node) {
- return (1);
- }
- if (lp->mde_node < rp->mde_node) {
- return (-1);
- }
- return (0);
-}
-
-
-static int
-pi_walkerlist_create(topo_mod_t *mod)
-{
- /* Initialize the uutil list structure */
- walker_pool = uu_list_pool_create("pi_walker_pool",
- sizeof (pi_walkernode_t), offsetof(pi_walkernode_t, walker_node),
- pi_walkerlist_compare, 0);
- if (walker_pool == NULL) {
- (void) topo_mod_seterrno(mod, EMOD_NOMEM);
- return (-1);
- }
- walker_list = uu_list_create(walker_pool, NULL, 0);
- if (walker_list == NULL) {
- uu_list_pool_destroy(walker_pool);
- walker_pool = NULL;
- return (-1);
- }
-
- return (0);
-}
-
-
-static void
-pi_walkerlist_destroy(topo_mod_t *mod)
-{
- void *wvp;
- pi_walkernode_t *wp;
-
- /* Destroy our list of items */
- while ((wvp = uu_list_first(walker_list)) != NULL) {
- /*
- * First, we empty the list of elements and free each one.
- * We do not free the data elements as they are libtopo nodes
- * and will be freed by libtopo
- */
- wp = (pi_walkernode_t *)wvp;
- uu_list_remove(walker_list, wvp);
- uu_list_node_fini(wp, &(wp->walker_node), walker_pool);
-
- topo_mod_free(mod, wvp, sizeof (pi_walkernode_t));
- }
- uu_list_destroy(walker_list);
- uu_list_pool_destroy(walker_pool);
- walker_list = NULL;
- walker_pool = NULL;
-}
-
-
-static int
-pi_walkerlist_add(topo_mod_t *mod, tnode_t *t_parent, mde_cookie_t mde_node)
-{
- uu_list_index_t idx;
- pi_walkernode_t *wnp;
-
- wnp = topo_mod_zalloc(mod, sizeof (pi_walkernode_t));
- if (wnp == NULL) {
- topo_mod_dprintf(mod, "failed to add node_0x%llx parent %p\n",
- (uint64_t)mde_node, t_parent);
- return (-1);
- }
- uu_list_node_init(wnp, &(wnp->walker_node), walker_pool);
-
- wnp->t_parent = t_parent;
- wnp->mde_node = mde_node;
-
- (void) uu_list_find(walker_list, wnp, NULL, &idx);
- uu_list_insert(walker_list, wnp, idx);
-
- return (0);
-}
-
-
-/*
- * Find the parent topo node for this machine description node.
- *
- * Nodes are removed from the list as they are found. They are only
- * visited once and this eliminates the need for a separate routine
- * that walks the list to free elements later.
- */
-static int
-pi_walkerlist_find(topo_mod_t *mod, mde_cookie_t mde_node, tnode_t **tpp)
-{
- pi_walkernode_t *result;
-
- uu_list_index_t idx;
- pi_walkernode_t search_criteria;
-
- search_criteria.mde_node = mde_node;
- search_criteria.t_parent = NULL;
-
- *tpp = NULL;
- result = uu_list_find(walker_list, &search_criteria, NULL, &idx);
- if (result == NULL) {
- return (-1);
- }
- *tpp = result->t_parent;
-
- /* Remove this element from the list */
- uu_list_remove(walker_list, result);
- uu_list_node_fini(result, &(result->walker_node), walker_pool);
- topo_mod_free(mod, result, sizeof (pi_walkernode_t));
-
- return (0);
-}
diff --git a/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/sun4vpi.c b/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/sun4vpi.c
deleted file mode 100644
index 78817e58eb..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/sun4vpi/sun4vpi.c
+++ /dev/null
@@ -1,287 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2010 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-/*
- * Main entry points for SUN4V Platform Independent topology enumerator
- */
-#include <sys/types.h>
-#include <strings.h>
-#include <fm/topo_mod.h>
-#include <fm/topo_hc.h>
-#include <sys/systeminfo.h>
-#include <pi_impl.h>
-
-/*
- * Entry point called by libtopo when enumeration is required
- */
-static topo_enum_f pi_enum; /* libtopo enumeration entry point */
-
-
-/*
- * Declare the operations vector and information structure used during
- * module registration
- */
-static topo_modops_t pi_ops = {pi_enum, NULL};
-static topo_modinfo_t pi_modinfo = {
- SUN4VPI_DESC, SUN4VPI_SCHEME, SUN4VPI_VERSION, &pi_ops
-};
-
-static int pi_enum_components(pi_enum_t *, tnode_t *, const char *,
- mde_cookie_t, mde_str_cookie_t, mde_str_cookie_t);
-
-
-/*
- * Called by libtopo when the topo module is loaded.
- */
-void
-_topo_init(topo_mod_t *mod, topo_version_t version)
-{
- int result;
- char isa[MAXNAMELEN];
-
- if (getenv("TOPOSUN4VPIDBG") != NULL) {
- /* Debugging is requested for this module */
- topo_mod_setdebug(mod);
- }
- topo_mod_dprintf(mod, "sun4vpi module initializing.\n");
-
- if (version != TOPO_VERSION) {
- (void) topo_mod_seterrno(mod, EMOD_VER_NEW);
- topo_mod_dprintf(mod, "incompatible topo version %d\n",
- version);
- return;
- }
-
- /* Verify that this is a SUN4V architecture machine */
- (void) sysinfo(SI_MACHINE, isa, MAXNAMELEN);
- if (strncmp(isa, "sun4v", MAXNAMELEN) != 0) {
- topo_mod_dprintf(mod, "not sun4v architecture: %s\n", isa);
- return;
- }
-
- result = topo_mod_register(mod, &pi_modinfo, TOPO_VERSION);
- if (result < 0) {
- topo_mod_dprintf(mod, "registration failed: %s\n",
- topo_mod_errmsg(mod));
-
- /* module errno already set */
- return;
- }
- topo_mod_dprintf(mod, "module ready.\n");
-}
-
-
-/*
- * Clean up any data used by the module before it is unloaded.
- */
-void
-_topo_fini(topo_mod_t *mod)
-{
- topo_mod_dprintf(mod, "module finishing.\n");
-
- /* Unregister from libtopo */
- topo_mod_unregister(mod);
-}
-
-
-/*
- * Enumeration entry point for the SUN4V topology enumerator
- */
-/* ARGSUSED */
-static int
-pi_enum(topo_mod_t *mod, tnode_t *t_parent, const char *name,
- topo_instance_t min, topo_instance_t max, void *pi_private, void *data)
-{
- int result;
- int idx;
- int num_components;
- size_t csize;
- hrtime_t starttime;
-
- pi_enum_t pi;
-
- mde_cookie_t *components;
- mde_str_cookie_t arc_cookie;
- mde_str_cookie_t component_cookie;
-
- /* Begin enumeration */
- starttime = gethrtime();
- topo_mod_dprintf(mod, "enumeration starting.\n");
-
- /* Initialize the walker */
- result = pi_walker_init(mod);
- if (result != 0) {
- (void) topo_mod_seterrno(mod, EMOD_UKNOWN_ENUM);
- return (-1);
- }
-
- /* Open a connection to the LDOM PRI */
- bzero(&pi, sizeof (pi_enum_t));
- result = pi_ldompri_open(mod, &pi);
- if (result != 0) {
- pi_walker_fini(mod);
- topo_mod_dprintf(mod, "could not open LDOM PRI\n");
- (void) topo_mod_seterrno(mod, EMOD_UKNOWN_ENUM);
- return (-1);
- }
- pi.mod = mod;
-
- /*
- * Find the top of the components graph in the PRI using the machine
- * description library.
- */
- num_components = pi_find_mdenodes(mod, pi.mdp, MDE_INVAL_ELEM_COOKIE,
- MD_STR_COMPONENTS, MD_STR_FWD, &components, &csize);
- if (num_components < 0 || components == NULL) {
- /* No nodes were found */
- pi_walker_fini(mod);
- topo_mod_dprintf(mod, "could not find components in PRI\n");
- (void) topo_mod_seterrno(mod, EMOD_UKNOWN_ENUM);
- return (-1);
- }
-
- /*
- * There should be a single components node. But scan all of the
- * results just in case a future machine has multiple hierarchies
- * for some unknown reason.
- *
- * We continue to walk components nodes until they are all exhausted
- * and do not stop if a node cannot be enumerated. Instead, we
- * enumerate what we can and return a partial-enumeration error if
- * there is a problem.
- */
- topo_mod_dprintf(mod, "enumerating %d components hierarchies\n",
- num_components);
-
- component_cookie = md_find_name(pi.mdp, MD_STR_COMPONENT);
- arc_cookie = md_find_name(pi.mdp, MD_STR_FWD);
- result = 0;
- for (idx = 0; idx < num_components; idx++) {
- int skip;
-
- /*
- * We have found a component hierarchy to process. First,
- * make sure we are not supposed to skip the graph.
- */
- skip = pi_skip_node(mod, pi.mdp, components[idx]);
- if (skip == 0) {
- /*
- * We have found a components node. Find the top-
- * level nodes and create a topology tree from them.
- */
- result = pi_enum_components(&pi, t_parent, name,
- components[idx], component_cookie, arc_cookie);
- }
- }
- topo_mod_free(mod, components, csize);
-
- /* Close our connection to the PRI */
- pi_ldompri_close(mod, &pi);
-
- /* Clean up after the walker */
- pi_walker_fini(mod);
-
- /* Complete enumeration */
- topo_mod_dprintf(mod, "enumeration complete in %lld ms.\n",
- ((gethrtime() - starttime)/MICROSEC));
-
- /* All done */
- return (result);
-}
-
-
-/*
- * This routined is called once for each mde node of type 'components'. It
- * initiates enumeration of the graph starting with with this node.
- */
-static int
-pi_enum_components(pi_enum_t *pip, tnode_t *t_parent, const char *hc_name,
- mde_cookie_t mde_node, mde_str_cookie_t component_cookie,
- mde_str_cookie_t arc_cookie)
-{
- int result;
-
- int num_arcs;
- mde_cookie_t *arcp;
- size_t arcsize;
- int arcidx;
-
- topo_mod_t *mod = pip->mod;
- md_t *mdp = pip->mdp;
-
- if (t_parent == NULL) {
- topo_mod_dprintf(mod,
- "walker failed to create node range with a NULL parent\n");
- (void) topo_mod_seterrno(mod, EMOD_METHOD_INVAL);
- return (-1);
- }
-
- /* Determine how many children the given node has */
- num_arcs = md_get_prop_arcs(mdp, mde_node, MD_STR_FWD, NULL, 0);
- if (num_arcs == 0) {
- /*
- * This components node has no children and is not a topo
- * node itself, so set partial enumeration and return.
- */
- (void) topo_mod_seterrno(mod, EMOD_PARTIAL_ENUM);
- return (0);
- }
- topo_mod_dprintf(mod, "node_0x%llx has %d children\n",
- (uint64_t)mde_node, num_arcs);
-
- /* Get the indexes for all the child nodes and put them in an array */
- arcsize = sizeof (mde_cookie_t) * num_arcs;
- arcp = topo_mod_zalloc(mod, arcsize);
- if (arcp == NULL) {
- topo_mod_dprintf(mod, "out of memory\n");
- (void) topo_mod_seterrno(mod, EMOD_NOMEM);
- return (-1);
- }
- num_arcs = md_get_prop_arcs(mdp, mde_node, MD_STR_FWD, arcp,
- arcsize);
-
- result = 0;
- for (arcidx = 0; arcidx < num_arcs; arcidx++) {
- /*
- * Initiate walking the PRI graph starting with the current
- * child of the components node.
- */
- result = pi_walker(pip, t_parent, hc_name,
- arcp[arcidx], component_cookie, arc_cookie);
- if (result != 0) {
- (void) topo_mod_seterrno(mod, EMOD_PARTIAL_ENUM);
- }
- }
- topo_mod_free(mod, arcp, arcsize);
-
- /*
- * We have now walked the entire PRI graph. Execute any deferred
- * enumeration routines that need all the nodes to be available.
- */
- result = pi_defer_exec(mod, mdp);
-
- return (result);
-}
diff --git a/usr/src/lib/fm/topo/modules/sun4v/xaui/Makefile b/usr/src/lib/fm/topo/modules/sun4v/xaui/Makefile
deleted file mode 100644
index 8a0f16a398..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/xaui/Makefile
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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.
-#
-
-MODULE = xaui
-ARCH = sun4v
-CLASS = arch
-XAUISRCS = xaui.c
-
-MODULESRCS = $(XAUISRCS)
-
-include ../../Makefile.plugin
-
-LDLIBS += -ldevinfo -lmdesc -lldom
-
-CPPFLAGS += -I. -I$(ROOT)/usr/platform/sun4v/include
diff --git a/usr/src/lib/fm/topo/modules/sun4v/xaui/xaui.c b/usr/src/lib/fm/topo/modules/sun4v/xaui/xaui.c
deleted file mode 100644
index f25e4dfbbc..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/xaui/xaui.c
+++ /dev/null
@@ -1,539 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2010 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-
-#include <strings.h>
-#include <fm/topo_mod.h>
-#include <fm/topo_hc.h>
-#include <sys/fm/protocol.h>
-#include <sys/fm/ldom.h>
-#include <sys/mdesc.h>
-#include <assert.h>
-#include <sys/systeminfo.h>
-#include "xaui.h"
-
-/*
- * xaui.c
- * sun4v specific xaui enumerators
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define XAUI_VERSION TOPO_VERSION
-#define XFP_MAX 1 /* max number of xfp per xaui card */
-
-static int xaui_enum(topo_mod_t *, tnode_t *, const char *, topo_instance_t,
- topo_instance_t, void *, void *);
-
-static const topo_modops_t xaui_ops =
- { xaui_enum, NULL };
-
-const topo_modinfo_t xaui_info =
- {XAUI, FM_FMRI_SCHEME_HC, XAUI_VERSION, &xaui_ops};
-
-static const topo_pgroup_info_t xaui_auth_pgroup = {
- FM_FMRI_AUTHORITY,
- TOPO_STABILITY_PRIVATE,
- TOPO_STABILITY_PRIVATE,
- 1
-};
-
-static topo_mod_t *xaui_mod_hdl = NULL;
-static int freeprilabel = 0;
-static int ispci = 0;
-
-/*ARGSUSED*/
-void
-_topo_init(topo_mod_t *mod, topo_version_t version)
-{
- /*
- * Turn on module debugging output
- */
- if (getenv("TOPOXAUIDBG") != NULL)
- topo_mod_setdebug(mod);
- topo_mod_dprintf(mod, "initializing xaui enumerator\n");
-
- if (topo_mod_register(mod, &xaui_info, TOPO_VERSION) < 0) {
- topo_mod_dprintf(mod, "xaui registration failed: %s\n",
- topo_mod_errmsg(mod));
- return; /* mod errno already set */
- }
- topo_mod_dprintf(mod, "xaui enum initd\n");
-}
-
-void
-_topo_fini(topo_mod_t *mod)
-{
- topo_mod_unregister(mod);
-}
-
-static tnode_t *
-xaui_tnode_create(topo_mod_t *mod, tnode_t *parent,
- const char *name, topo_instance_t i, void *priv)
-{
- int err;
- nvlist_t *fmri;
- tnode_t *ntn;
- nvlist_t *auth = topo_mod_auth(mod, parent);
-
- fmri = topo_mod_hcfmri(mod, parent, FM_HC_SCHEME_VERSION, name, i,
- NULL, auth, NULL, NULL, NULL);
- nvlist_free(auth);
-
- if (fmri == NULL) {
- topo_mod_dprintf(mod,
- "Unable to make nvlist for %s bind: %s.\n",
- name, topo_mod_errmsg(mod));
- return (NULL);
- }
-
- ntn = topo_node_bind(mod, parent, name, i, fmri);
- nvlist_free(fmri);
- if (ntn == NULL) {
- topo_mod_dprintf(mod,
- "topo_node_bind (%s%d/%s%d) failed: %s\n",
- topo_node_name(parent), topo_node_instance(parent),
- name, i,
- topo_strerror(topo_mod_errno(mod)));
- return (NULL);
- }
-
- topo_node_setspecific(ntn, priv);
- if (topo_pgroup_create(ntn, &xaui_auth_pgroup, &err) == 0) {
- (void) topo_prop_inherit(ntn, FM_FMRI_AUTHORITY,
- FM_FMRI_AUTH_PRODUCT, &err);
- (void) topo_prop_inherit(ntn, FM_FMRI_AUTHORITY,
- FM_FMRI_AUTH_PRODUCT_SN, &err);
- (void) topo_prop_inherit(ntn, FM_FMRI_AUTHORITY,
- FM_FMRI_AUTH_CHASSIS, &err);
- (void) topo_prop_inherit(ntn, FM_FMRI_AUTHORITY,
- FM_FMRI_AUTH_SERVER, &err);
- }
- return (ntn);
-}
-
-
-static int
-xaui_fru_set(topo_mod_t *mp, tnode_t *tn)
-{
- nvlist_t *fmri;
- int err, e;
-
- if (topo_node_resource(tn, &fmri, &err) < 0 ||
- fmri == NULL) {
- topo_mod_dprintf(mp, "FRU_fmri_set error: %s\n",
- topo_strerror(topo_mod_errno(mp)));
- return (topo_mod_seterrno(mp, err));
- }
- e = topo_node_fru_set(tn, fmri, 0, &err);
- nvlist_free(fmri);
- if (e < 0)
- return (topo_mod_seterrno(mp, err));
- return (0);
-}
-
-
-static void *
-xaui_topo_alloc(size_t size)
-{
- assert(xaui_mod_hdl != NULL);
- return (topo_mod_alloc(xaui_mod_hdl, size));
-}
-
-
-static void
-xaui_topo_free(void *data, size_t size)
-{
- assert(xaui_mod_hdl != NULL);
- topo_mod_free(xaui_mod_hdl, data, size);
-}
-
-
-/*
- * Remove the 3 character device name (pci/niu) from devfs path.
- */
-static char *
-xaui_trans_str(topo_mod_t *mod, char *dn, char *p, size_t buf_len)
-{
- int i = 0;
- int j = 0;
- char buf[MAXPATHLEN];
-
- topo_mod_dprintf(mod, "xaui_trans_str: dev path(%s) dev name(%s)\n",
- dn, p);
- do {
- /* strip out either "pci" or "niu" */
- if (dn[i] == p[0] && dn[i + 1] == p[1] && dn[i + 2] == p[2])
- i += 3;
- else
- buf[j++] = dn[i++];
- } while (i < buf_len);
-
- topo_mod_dprintf(mod, "xaui_trans_str: return(%s)\n", buf);
- return (topo_mod_strdup(mod, (char *)buf));
-}
-
-
-static char *
-xaui_get_path(topo_mod_t *mod, void *priv, topo_instance_t inst)
-{
- di_node_t dnode;
- char *devfs_path;
- char *path;
- char *buf = NULL;
- size_t buf_len;
- size_t dev_path_len;
- size_t path_len;
-
- /*
- * There are two ways to get here:
- * 1. niu enum - private data is the di_node_t for this xaui
- * - instance is the ethernet function number
- * device path looks like: /niu@80/network@0:nxge@0
- * PRI path looks like: /@80/@0
- *
- * 2. pcibus enum - private data is the parent tnode_t
- * - instance is the pci function number
- * device path looks like: /pci@500/pci@0/pci@8/network@0:nxge0
- * PRI path looks like: /@500/@0/@8/@0
- *
- * PRI path for pciex is /@Bus/@Dev/@Func/@Instance
- */
- if (ispci == 1) {
- /* coming from pcibus */
- topo_mod_dprintf(mod, "from pcibus\n");
- dnode = topo_node_getspecific((tnode_t *)priv);
- } else {
- /* coming from niu */
- topo_mod_dprintf(mod, "from niu\n");
- dnode = (struct di_node *)priv;
- }
- if (dnode == DI_NODE_NIL) {
- topo_mod_dprintf(mod, "DI_NODE_NIL\n");
- return (NULL);
- }
-
- /* get device path */
- devfs_path = di_devfs_path(dnode);
- if (devfs_path == NULL) {
- topo_mod_dprintf(mod, "NULL devfs_path\n");
- return (NULL);
- }
- topo_mod_dprintf(mod, "devfs_path (%s)\n", devfs_path);
- dev_path_len = strlen(devfs_path) + 1;
-
- /* remove device name from path */
- if (ispci == 1) {
- topo_mod_dprintf(mod, "ispci\n");
- buf = xaui_trans_str(mod, devfs_path, "pci", dev_path_len);
- buf_len = strlen(buf) + 1;
- } else {
- buf = xaui_trans_str(mod, devfs_path, "niu", dev_path_len);
- buf_len = strlen(buf) + 1;
- }
- di_devfs_path_free(devfs_path);
-
- /* lop off "/network@" */
- buf[(strstr(buf, "/network@") - buf)] = '\0';
-
- /* path: transposed address + '/@instance' (0/1) + '\0' */
- path_len = strlen(buf) + 3 + 1;
- path = (char *)xaui_topo_alloc(path_len);
- if (snprintf(path, path_len, "%s/@%d", buf, inst) < 0) {
- topo_mod_dprintf(mod, "snprintf failed\n");
- path = NULL;
- }
- xaui_topo_free(buf, buf_len);
-
- /* should return something like /@500/@0/@8/@0 or /@80/@0 */
- topo_mod_dprintf(mod, "xaui_get_path: path(%s)\n", path);
- return (path);
-}
-
-
-static int
-xaui_get_pri_label(topo_mod_t *mod, topo_instance_t n, void *priv,
- char **labelp)
-{
- ldom_hdl_t *hdlp;
- uint32_t type = 0;
- ssize_t bufsize = 0;
- uint64_t *bufp;
- md_t *mdp;
- int num_nodes, ncomp;
- mde_cookie_t *listp;
- char *pstr = NULL;
- int i;
- char *path;
-
- /* Get device path minus the device names */
- path = xaui_get_path(mod, priv, n);
- if (path == NULL) {
- topo_mod_dprintf(mod, "can't get path\n");
- return (-1);
- }
-
- hdlp = ldom_init(xaui_topo_alloc, xaui_topo_free);
- if (hdlp == NULL) {
- topo_mod_dprintf(mod, "ldom_init failed\n");
- return (-1);
- }
-
- (void) ldom_get_type(hdlp, &type);
- if ((type & LDOM_TYPE_CONTROL) != 0) {
- bufsize = ldom_get_core_md(hdlp, &bufp);
- } else {
- bufsize = ldom_get_local_md(hdlp, &bufp);
- }
- if (bufsize < 1) {
- topo_mod_dprintf(mod, "failed to get pri/md (%d)\n", bufsize);
- ldom_fini(hdlp);
- return (-1);
- }
-
- if ((mdp = md_init_intern(bufp, xaui_topo_alloc, xaui_topo_free)) ==
- NULL || (num_nodes = md_node_count(mdp)) < 1) {
- topo_mod_dprintf(mod, "md_init_intern failed\n");
- xaui_topo_free(bufp, (size_t)bufsize);
- ldom_fini(hdlp);
- return (-1);
- }
-
- if ((listp = (mde_cookie_t *)xaui_topo_alloc(
- sizeof (mde_cookie_t) * num_nodes)) == NULL) {
- topo_mod_dprintf(mod, "can't alloc listp\n");
- xaui_topo_free(bufp, (size_t)bufsize);
- (void) md_fini(mdp);
- ldom_fini(hdlp);
- return (-1);
- }
-
- ncomp = md_scan_dag(mdp, MDE_INVAL_ELEM_COOKIE,
- md_find_name(mdp, "component"),
- md_find_name(mdp, "fwd"), listp);
- if (ncomp <= 0) {
- topo_mod_dprintf(mod, "no component nodes found\n");
- xaui_topo_free(listp, sizeof (mde_cookie_t) * num_nodes);
- xaui_topo_free(bufp, (size_t)bufsize);
- (void) md_fini(mdp);
- ldom_fini(hdlp);
- return (-1);
- }
- topo_mod_dprintf(mod, "number of comps (%d)\n", ncomp);
-
- for (i = 0; i < ncomp; i++) {
- /*
- * Look for type == "io", topo-hc-name == "xaui";
- * match "path" md property.
- */
- if ((md_get_prop_str(mdp, listp[i], "type", &pstr) == 0) &&
- (pstr != NULL) &&
- (strncmp(pstr, "io", strlen(pstr)) == 0) &&
- (md_get_prop_str(mdp, listp[i], "topo-hc-name", &pstr)
- == 0) && (pstr != NULL) &&
- (strncmp(pstr, "xaui", strlen(pstr)) == 0) &&
- (md_get_prop_str(mdp, listp[i], "path", &pstr) == 0) &&
- (pstr != NULL)) {
- /* check node path */
- if (strncmp(pstr, path, sizeof (path)) == 0) {
- /* this is the node, grab the label */
- if (md_get_prop_str(mdp, listp[i], "nac",
- &pstr) == 0) {
- *labelp = topo_mod_strdup(mod, pstr);
- /* need to free this later */
- freeprilabel = 1;
- break;
- }
- }
- }
- }
-
- xaui_topo_free(listp, sizeof (mde_cookie_t) * num_nodes);
- xaui_topo_free(bufp, (size_t)bufsize);
- (void) md_fini(mdp);
- ldom_fini(hdlp);
-
- if (path != NULL) {
- xaui_topo_free(path, strlen(path) + 1);
- }
- return (0);
-}
-
-
-static int
-xaui_label_set(topo_mod_t *mod, tnode_t *node, topo_instance_t n, void *priv)
-{
- const char *label = NULL;
- char *plat, *pp;
- int err;
- int i, p;
-
- (void) xaui_get_pri_label(mod, n, priv, (char **)&label);
- if (label == NULL) {
- topo_mod_dprintf(mod, "no PRI node for label\n");
- if (Phyxaui_Names == NULL)
- return (-1);
-
- if (topo_prop_get_string(node,
- FM_FMRI_AUTHORITY, FM_FMRI_AUTH_PRODUCT, &plat, &err) < 0) {
- return (topo_mod_seterrno(mod, err));
- }
- /*
- * Trim SUNW, from the platform name
- */
- pp = strchr(plat, ',');
- if (pp == NULL)
- pp = plat;
- else
- ++pp;
-
- for (p = 0; p < Phyxaui_Names->psn_nplats; p++) {
- if (strcmp(Phyxaui_Names->psn_names[p].pnm_platform,
- pp) != 0)
- continue;
- for (i = 0; i < Phyxaui_Names->psn_names[p].pnm_nnames;
- i++) {
- physnm_t ps;
- ps = Phyxaui_Names->psn_names[p].pnm_names[i];
- if (ps.ps_num == n) {
- label = ps.ps_label;
- break;
- }
- }
- break;
- }
- topo_mod_strfree(mod, plat);
- }
-
- if (label != NULL) {
- if (topo_prop_set_string(node, TOPO_PGROUP_PROTOCOL,
- TOPO_PROP_LABEL, TOPO_PROP_IMMUTABLE,
- label, &err) != 0) {
- if (freeprilabel == 1) {
- topo_mod_strfree(mod, (char *)label);
- }
- return (topo_mod_seterrno(mod, err));
- }
- if (freeprilabel == 1) {
- topo_mod_strfree(mod, (char *)label);
- }
- }
-
- return (0);
-}
-
-
-/*ARGSUSED*/
-static tnode_t *
-xaui_declare(tnode_t *parent, const char *name, topo_instance_t i,
- void *priv, topo_mod_t *mod)
-{
- tnode_t *ntn;
- nvlist_t *fmri = NULL;
- int e;
-
- if ((ntn = xaui_tnode_create(mod, parent, name, i, NULL)) == NULL) {
- topo_mod_dprintf(mod, "%s ntn = NULL\n", name);
- return (NULL);
- }
-
- (void) xaui_fru_set(mod, ntn);
-
- /* when coming from pcibus: private data == parent tnode */
- if (priv == (void *)parent) {
- ispci = 1;
- }
-
- (void) xaui_label_set(mod, ntn, i, priv);
-
- /* reset pcibus/niu switch */
- ispci = 0;
-
- /* set ASRU to resource fmri */
- if (topo_prop_get_fmri(ntn, TOPO_PGROUP_PROTOCOL,
- TOPO_PROP_RESOURCE, &fmri, &e) == 0)
- (void) topo_node_asru_set(ntn, fmri, 0, &e);
- nvlist_free(fmri);
-
- if (topo_node_range_create(mod, ntn, XFP,
- 0, XFP_MAX) < 0) {
- topo_node_unbind(ntn);
- topo_mod_dprintf(mod, "child_range_add of XFP"
- "failed: %s\n",
- topo_strerror(topo_mod_errno(mod)));
- return (NULL); /* mod_errno already set */
- }
- return (ntn);
-}
-
-
-static topo_mod_t *
-xfp_enum_load(topo_mod_t *mp)
-{
- topo_mod_t *rp = NULL;
-
- if ((rp = topo_mod_load(mp, XFP, TOPO_VERSION)) == NULL) {
- topo_mod_dprintf(mp,
- "%s enumerator could not load %s enum.\n", XAUI, XFP);
- }
- return (rp);
-}
-
-
-/*ARGSUSED*/
-static int
-xaui_enum(topo_mod_t *mod, tnode_t *rnode, const char *name,
- topo_instance_t min, topo_instance_t max, void *arg, void *priv)
-{
- tnode_t *xauin;
-
- if (strcmp(name, XAUI) != 0) {
- topo_mod_dprintf(mod,
- "Currently only know how to enumerate %s components.\n",
- XAUI);
- return (0);
- }
-
- xaui_mod_hdl = mod;
-
- /*
- * Load XFP enum
- */
- if (xfp_enum_load(mod) == NULL)
- return (-1);
-
- if ((xauin = xaui_declare(rnode, name, min, priv, mod)) == NULL)
- return (-1);
-
- /* set the private data to be the instance number of niufn */
- if (topo_mod_enumerate(mod,
- xauin, XFP, XFP, 0, 0, NULL) != 0) {
- return (topo_mod_seterrno(mod, EMOD_PARTIAL_ENUM));
- }
- return (0);
-}
diff --git a/usr/src/lib/fm/topo/modules/sun4v/xaui/xaui.h b/usr/src/lib/fm/topo/modules/sun4v/xaui/xaui.h
deleted file mode 100644
index ab6d8b65a7..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/xaui/xaui.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _XAUI_H
-#define _XAUI_H
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * When all we're provided is a physical slot number, these structures
- * allow us to attach an accompanying label.
- */
-typedef struct physnm {
- int ps_num;
- const char *ps_label;
-} physnm_t;
-
-typedef struct pphysnm {
- const char *pnm_platform; /* platform on which the names apply */
- int pnm_nnames; /* number of names */
- struct physnm *pnm_names; /* array of labels */
-} pphysnm_t;
-
-typedef struct physlot_names {
- int psn_nplats;
- struct pphysnm *psn_names;
-} physlot_names_t;
-
-/* T5120/T5220 xaui slot numbers */
-physnm_t t5120_pnms[] = {
- /* Slot #, Label */
- { 0, "MB/RISER2/XAUI0" },
- { 1, "MB/RISER3/XAUI1" }
-};
-
-/* T5140/T5240 xaui slot numbers */
-physnm_t t5140_pnms[] = {
- /* Slot #, Label */
- { 0, "MB/RISER0/XAUI0" },
- { 1, "MB/RISER1/XAUI1" }
-};
-
-/* T5440 xaui slot numbers */
-physnm_t t5440_pnms[] = {
- /* Slot #, Label */
- { 0, "MB/XAUI0" },
- { 1, "MB/XAUI1" }
-};
-
-pphysnm_t plat_pnames[] = {
- { "SPARC-Enterprise-T5120",
- sizeof (t5120_pnms) / sizeof (physnm_t),
- t5120_pnms },
- { "SPARC-Enterprise-T5220",
- sizeof (t5120_pnms) / sizeof (physnm_t),
- t5120_pnms },
- { "T5140",
- sizeof (t5140_pnms) / sizeof (physnm_t),
- t5140_pnms },
- { "T5240",
- sizeof (t5140_pnms) / sizeof (physnm_t),
- t5140_pnms },
- { "T5440",
- sizeof (t5440_pnms) / sizeof (physnm_t),
- t5440_pnms }
-};
-
-physlot_names_t PhyxauiNMs = {
- sizeof (plat_pnames) / sizeof (pphysnm_t),
- plat_pnames
-};
-
-physlot_names_t *Phyxaui_Names = &PhyxauiNMs;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _XAUI_H */
diff --git a/usr/src/lib/fm/topo/modules/sun4v/zambezi/Makefile b/usr/src/lib/fm/topo/modules/sun4v/zambezi/Makefile
deleted file mode 100644
index 6c4f0463ec..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/zambezi/Makefile
+++ /dev/null
@@ -1,37 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2007 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-#
-
-MODULE = zambezi
-ARCH = sun4v
-CLASS = arch
-ZAMBEZISRCS = zambezi.c
-
-MODULESRCS = $(ZAMBEZISRCS)
-
-include ../../Makefile.plugin
-
diff --git a/usr/src/lib/fm/topo/modules/sun4v/zambezi/zambezi.c b/usr/src/lib/fm/topo/modules/sun4v/zambezi/zambezi.c
deleted file mode 100644
index 3fe6ff3049..0000000000
--- a/usr/src/lib/fm/topo/modules/sun4v/zambezi/zambezi.c
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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.
- */
-
-#include <string.h>
-#include <fm/topo_mod.h>
-#include <fm/topo_hc.h>
-#include <libdevinfo.h>
-#include <limits.h>
-#include <sys/fm/protocol.h>
-#include <sys/param.h>
-#include <sys/systeminfo.h>
-#include <assert.h>
-
-/*
- * zambezi.c
- * sun4v specific zambezi enumerators
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define ZAMBEZI_VERSION TOPO_VERSION
-#define ZAMBEZI_MAX 4
-
-static int zambezi_enum(topo_mod_t *, tnode_t *, const char *, topo_instance_t,
- topo_instance_t, void *, void *);
-
-static const topo_modops_t zambezi_ops =
- { zambezi_enum, NULL };
-
-const topo_modinfo_t zambezi_info =
- {INTERCONNECT, FM_FMRI_SCHEME_HC, ZAMBEZI_VERSION, &zambezi_ops};
-
-static const topo_pgroup_info_t zambezi_auth_pgroup = {
- FM_FMRI_AUTHORITY,
- TOPO_STABILITY_PRIVATE,
- TOPO_STABILITY_PRIVATE,
- 1
-};
-
-/*ARGSUSED*/
-void
-_topo_init(topo_mod_t *mod, topo_version_t version)
-{
- /*
- * Turn on module debugging output
- */
- if (getenv("TOPOZAMDBG") != NULL)
- topo_mod_setdebug(mod);
- topo_mod_dprintf(mod, "initializing zambezi enumerator\n");
-
- if (topo_mod_register(mod, &zambezi_info, TOPO_VERSION) < 0) {
- topo_mod_dprintf(mod, "zambezi registration failed: %s\n",
- topo_mod_errmsg(mod));
- return; /* mod errno already set */
- }
- topo_mod_dprintf(mod, "zambezi enumr initd\n");
-}
-
-void
-_topo_fini(topo_mod_t *mod)
-{
- topo_mod_unregister(mod);
-}
-
-static tnode_t *
-zam_tnode_create(topo_mod_t *mod, tnode_t *parent,
- const char *name, topo_instance_t i, void *priv)
-{
- int err;
- nvlist_t *fmri;
- tnode_t *ntn;
- nvlist_t *auth = topo_mod_auth(mod, parent);
-
- fmri = topo_mod_hcfmri(mod, parent, FM_HC_SCHEME_VERSION, name, i,
- NULL, auth, NULL, NULL, NULL);
- nvlist_free(auth);
-
- if (fmri == NULL) {
- topo_mod_dprintf(mod,
- "Unable to make nvlist for %s bind: %s.\n",
- name, topo_mod_errmsg(mod));
- return (NULL);
- }
-
- ntn = topo_node_bind(mod, parent, name, i, fmri);
- nvlist_free(fmri);
- if (ntn == NULL) {
- topo_mod_dprintf(mod,
- "topo_node_bind (%s%d/%s%d) failed: %s\n",
- topo_node_name(parent), topo_node_instance(parent),
- name, i,
- topo_strerror(topo_mod_errno(mod)));
- return (NULL);
- }
-
- topo_node_setspecific(ntn, priv);
- if (topo_pgroup_create(ntn, &zambezi_auth_pgroup, &err) == 0) {
- (void) topo_prop_inherit(ntn, FM_FMRI_AUTHORITY,
- FM_FMRI_AUTH_PRODUCT, &err);
- (void) topo_prop_inherit(ntn, FM_FMRI_AUTHORITY,
- FM_FMRI_AUTH_PRODUCT_SN, &err);
- (void) topo_prop_inherit(ntn, FM_FMRI_AUTHORITY,
- FM_FMRI_AUTH_CHASSIS, &err);
- (void) topo_prop_inherit(ntn, FM_FMRI_AUTHORITY,
- FM_FMRI_AUTH_SERVER, &err);
- }
- return (ntn);
-}
-
-/*ARGSUSED*/
-static tnode_t *
-zam_declare(tnode_t *parent, const char *name, topo_instance_t i,
- void *priv, topo_mod_t *mod)
-{
- tnode_t *ntn;
- nvlist_t *fmri = NULL;
- int err;
-
- if ((ntn = zam_tnode_create(mod, parent, name, i, NULL)) == NULL) {
- topo_mod_dprintf(mod, "%s ntn = NULL\n", name);
- return (NULL);
- }
- /* inherit FRU from parent */
- (void) topo_node_fru_set(ntn, NULL, 0, &err);
-
- /* inherit parent's label */
- if (topo_node_label_set(ntn, NULL, &err) < 0) {
- topo_mod_dprintf(mod, "cpuboard label error %d\n", err);
- }
-
- /* set ASRU to resource fmri */
- if (topo_prop_get_fmri(ntn, TOPO_PGROUP_PROTOCOL,
- TOPO_PROP_RESOURCE, &fmri, &err) == 0)
- (void) topo_node_asru_set(ntn, fmri, 0, &err);
- nvlist_free(fmri);
-
- return (ntn);
-}
-
-/*ARGSUSED*/
-static int
-zambezi_enum(topo_mod_t *mod, tnode_t *rnode, const char *name,
- topo_instance_t min, topo_instance_t max, void *notused, void *data)
-{
- int i;
-
- if (strcmp(name, INTERCONNECT) != 0) {
- topo_mod_dprintf(mod,
- "Currently only know how to enumerate %s components.\n",
- INTERCONNECT);
- return (0);
- }
-
- if (max >= ZAMBEZI_MAX)
- max = ZAMBEZI_MAX;
-
- for (i = 0; i <= max; i++) {
- if (zam_declare(rnode, name, i, data, mod) == NULL)
- return (-1);
- }
-
- return (0);
-}
diff --git a/usr/src/pkg/manifests/consolidation-osnet-osnet-message-files.p5m b/usr/src/pkg/manifests/consolidation-osnet-osnet-message-files.p5m
index b050630dfa..a16a248b96 100644
--- a/usr/src/pkg/manifests/consolidation-osnet-osnet-message-files.p5m
+++ b/usr/src/pkg/manifests/consolidation-osnet-osnet-message-files.p5m
@@ -20,7 +20,7 @@
#
# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
-# Copyright 2014 Garrett D'Amore <garrett@damore.org>
+# Copyright 2022 Garrett D'Amore
set name=pkg.fmri value=pkg:/consolidation/osnet/osnet-message-files@$(PKGVERS)
set name=pkg.summary value="Localizable ON message files"
@@ -277,13 +277,9 @@ file path=usr/lib/locale/C/LC_MESSAGES/PCI.po
file path=usr/lib/locale/C/LC_MESSAGES/PCIEX.po
file path=usr/lib/locale/C/LC_MESSAGES/SCA1000.po
file path=usr/lib/locale/C/LC_MESSAGES/SCA500.po
-file path=usr/lib/locale/C/LC_MESSAGES/SCF.po
file path=usr/lib/locale/C/LC_MESSAGES/SENSOR.po
file path=usr/lib/locale/C/LC_MESSAGES/SMF.po
file path=usr/lib/locale/C/LC_MESSAGES/STORAGE.po
-file path=usr/lib/locale/C/LC_MESSAGES/SUN4.po
-file path=usr/lib/locale/C/LC_MESSAGES/SUN4U.po
-file path=usr/lib/locale/C/LC_MESSAGES/SUN4V.po
file path=usr/lib/locale/C/LC_MESSAGES/SUNOS.po
file path=usr/lib/locale/C/LC_MESSAGES/SUNW_OST_ADMIN.po group=sys
file path=usr/lib/locale/C/LC_MESSAGES/SUNW_OST_LINFO group=sys