From b8733f8d108da748904f9174344ddf20373fcbfd Mon Sep 17 00:00:00 2001 From: Josef 'Jeff' Sipek Date: Tue, 2 Oct 2018 17:41:17 -0400 Subject: [PATCH] picl: remove sparc-only plugins --- usr/src/cmd/picl/plugins/Makefile | 4 - usr/src/cmd/picl/plugins/sun4u/Makefile | 58 - usr/src/cmd/picl/plugins/sun4u/blade/Makefile | 49 - usr/src/cmd/picl/plugins/sun4u/blade/bsc/Makefile | 108 - usr/src/cmd/picl/plugins/sun4u/blade/bsc/picllom.c | 1431 ----- usr/src/cmd/picl/plugins/sun4u/blade/bsc/picllom.h | 104 - .../cmd/picl/plugins/sun4u/blade/bsc/picllom.info | 179 - .../cmd/picl/plugins/sun4u/blade/devtree/Makefile | 62 - .../plugins/sun4u/blade/devtree/picldevtree.conf | 28 - .../picl/plugins/sun4u/blade/fruaccess/Makefile | 111 - .../plugins/sun4u/blade/fruaccess/fru_access.c | 2746 --------- .../sun4u/blade/fruaccess/fru_access_impl.h | 206 - .../sun4u/blade/fruaccess/fru_container.conf | 36 - .../cmd/picl/plugins/sun4u/blade/frudata/Makefile | 63 - .../sun4u/blade/frudata/libpiclfrudata.conf | 34 - .../cmd/picl/plugins/sun4u/blade/frutree/Makefile | 70 - .../plugins/sun4u/blade/frutree/piclfrutree.info | 74 - .../plugins/sun4u/blade/frutree/system-board.info | 115 - usr/src/cmd/picl/plugins/sun4u/boston/Makefile | 45 - .../cmd/picl/plugins/sun4u/boston/devtree/Makefile | 64 - .../plugins/sun4u/boston/devtree/picl_asr.conf | 190 - .../plugins/sun4u/boston/devtree/picldevtree.conf | 45 - .../cmd/picl/plugins/sun4u/boston/envmon/Makefile | 76 - .../plugins/sun4u/boston/envmon/piclenvmon.info | 84 - .../cmd/picl/plugins/sun4u/boston/frudata/Makefile | 65 - .../sun4u/boston/frudata/libpiclfrudata.conf | 137 - .../cmd/picl/plugins/sun4u/boston/frudr/Makefile | 101 - .../picl/plugins/sun4u/boston/frudr/SB-tables.info | 501 -- .../picl/plugins/sun4u/boston/frudr/fru_FT0.info | 79 - .../plugins/sun4u/boston/frudr/fru_FT0_data.info | 89 - .../picl/plugins/sun4u/boston/frudr/fru_FT1.info | 79 - .../plugins/sun4u/boston/frudr/fru_FT1_data.info | 89 - .../picl/plugins/sun4u/boston/frudr/fru_FT2.info | 79 - .../plugins/sun4u/boston/frudr/fru_FT2_data.info | 89 - .../picl/plugins/sun4u/boston/frudr/fru_FT3.info | 79 - .../plugins/sun4u/boston/frudr/fru_FT3_data.info | 89 - .../picl/plugins/sun4u/boston/frudr/fru_FT4.info | 79 - .../plugins/sun4u/boston/frudr/fru_FT4_data.info | 89 - .../picl/plugins/sun4u/boston/frudr/fru_FT5.info | 79 - .../plugins/sun4u/boston/frudr/fru_FT5_data.info | 89 - .../picl/plugins/sun4u/boston/frudr/fru_HDD0.info | 73 - .../plugins/sun4u/boston/frudr/fru_HDD0_data.info | 107 - .../picl/plugins/sun4u/boston/frudr/fru_HDD1.info | 74 - .../plugins/sun4u/boston/frudr/fru_HDD1_data.info | 107 - .../picl/plugins/sun4u/boston/frudr/fru_HDD2.info | 75 - .../plugins/sun4u/boston/frudr/fru_HDD2_data.info | 107 - .../picl/plugins/sun4u/boston/frudr/fru_HDD3.info | 74 - .../plugins/sun4u/boston/frudr/fru_HDD3_data.info | 107 - .../picl/plugins/sun4u/boston/frudr/fru_HDD4.info | 74 - .../plugins/sun4u/boston/frudr/fru_HDD4_data.info | 113 - .../picl/plugins/sun4u/boston/frudr/fru_HDD5.info | 74 - .../plugins/sun4u/boston/frudr/fru_HDD5_data.info | 113 - .../picl/plugins/sun4u/boston/frudr/fru_HDD6.info | 74 - .../plugins/sun4u/boston/frudr/fru_HDD6_data.info | 113 - .../picl/plugins/sun4u/boston/frudr/fru_HDD7.info | 74 - .../plugins/sun4u/boston/frudr/fru_HDD7_data.info | 113 - .../picl/plugins/sun4u/boston/frudr/fru_PS0.info | 84 - .../plugins/sun4u/boston/frudr/fru_PS0_data.info | 144 - .../picl/plugins/sun4u/boston/frudr/fru_PS1.info | 84 - .../plugins/sun4u/boston/frudr/fru_PS1_data.info | 144 - .../picl/plugins/sun4u/boston/frudr/fru_PS2.info | 84 - .../plugins/sun4u/boston/frudr/fru_PS2_data.info | 144 - .../picl/plugins/sun4u/boston/frudr/fru_PS3.info | 84 - .../plugins/sun4u/boston/frudr/fru_PS3_data.info | 144 - .../picl/plugins/sun4u/boston/frudr/fru_SC.info | 77 - .../plugins/sun4u/boston/frudr/fru_SC_data.info | 251 - .../plugins/sun4u/boston/frudr/fru_usb-a-1.info | 76 - .../sun4u/boston/frudr/fru_usb-a-1_data.info | 83 - .../plugins/sun4u/boston/frudr/fru_usb-a-2.info | 76 - .../sun4u/boston/frudr/fru_usb-a-2_data.info | 83 - .../plugins/sun4u/boston/frudr/fru_usb-a-3.info | 76 - .../sun4u/boston/frudr/fru_usb-a-3_data.info | 83 - .../plugins/sun4u/boston/frudr/fru_usb-a-4.info | 76 - .../sun4u/boston/frudr/fru_usb-a-4_data.info | 83 - .../cmd/picl/plugins/sun4u/boston/frutree/Makefile | 105 - .../plugins/sun4u/boston/frutree/piclfrutree.info | 654 --- .../plugins/sun4u/boston/frutree/system-board.info | 619 -- usr/src/cmd/picl/plugins/sun4u/chalupa/Makefile | 45 - .../picl/plugins/sun4u/chalupa/devtree/Makefile | 61 - .../plugins/sun4u/chalupa/devtree/picldevtree.conf | 36 - .../cmd/picl/plugins/sun4u/chalupa/envmon/Makefile | 75 - .../plugins/sun4u/chalupa/envmon/piclenvmon.info | 84 - .../picl/plugins/sun4u/chalupa/frudata/Makefile | 63 - .../sun4u/chalupa/frudata/libpiclfrudata.conf | 115 - .../cmd/picl/plugins/sun4u/chalupa/frudr/Makefile | 81 - .../plugins/sun4u/chalupa/frudr/SB-tables.info | 560 -- .../picl/plugins/sun4u/chalupa/frudr/fru_FT0.info | 88 - .../picl/plugins/sun4u/chalupa/frudr/fru_FT1.info | 103 - .../picl/plugins/sun4u/chalupa/frudr/fru_FT2.info | 90 - .../picl/plugins/sun4u/chalupa/frudr/fru_FT3.info | 78 - .../picl/plugins/sun4u/chalupa/frudr/fru_HDD0.info | 74 - .../plugins/sun4u/chalupa/frudr/fru_HDD0_data.info | 82 - .../picl/plugins/sun4u/chalupa/frudr/fru_HDD1.info | 74 - .../plugins/sun4u/chalupa/frudr/fru_HDD1_data.info | 82 - .../picl/plugins/sun4u/chalupa/frudr/fru_HDD2.info | 74 - .../plugins/sun4u/chalupa/frudr/fru_HDD2_data.info | 82 - .../picl/plugins/sun4u/chalupa/frudr/fru_HDD3.info | 74 - .../plugins/sun4u/chalupa/frudr/fru_HDD3_data.info | 82 - .../picl/plugins/sun4u/chalupa/frudr/fru_PS0.info | 84 - .../plugins/sun4u/chalupa/frudr/fru_PS0_data.info | 127 - .../picl/plugins/sun4u/chalupa/frudr/fru_PS1.info | 84 - .../plugins/sun4u/chalupa/frudr/fru_PS1_data.info | 126 - .../picl/plugins/sun4u/chalupa/frudr/fru_PSU0.info | 84 - .../plugins/sun4u/chalupa/frudr/fru_PSU0_data.info | 144 - .../picl/plugins/sun4u/chalupa/frudr/fru_PSU1.info | 84 - .../plugins/sun4u/chalupa/frudr/fru_PSU1_data.info | 144 - .../picl/plugins/sun4u/chalupa/frudr/fru_PSU2.info | 84 - .../plugins/sun4u/chalupa/frudr/fru_PSU2_data.info | 144 - .../picl/plugins/sun4u/chalupa/frudr/fru_PSU3.info | 84 - .../plugins/sun4u/chalupa/frudr/fru_PSU3_data.info | 144 - .../picl/plugins/sun4u/chalupa/frudr/fru_SC.info | 75 - .../plugins/sun4u/chalupa/frudr/fru_SC_data.info | 239 - .../picl/plugins/sun4u/chalupa/frutree/Makefile | 85 - .../plugins/sun4u/chalupa/frutree/piclfrutree.info | 447 -- .../sun4u/chalupa/frutree/system-board.info | 554 -- .../cmd/picl/plugins/sun4u/cherrystone/Makefile | 50 - .../picl/plugins/sun4u/cherrystone/conf/Makefile | 79 - .../plugins/sun4u/cherrystone/conf/platsvcd.conf | 157 - .../plugins/sun4u/cherrystone/conf/psvcobj.conf | 966 ---- .../plugins/sun4u/cherrystone/devtree/Makefile | 63 - .../sun4u/cherrystone/devtree/picldevtree.conf | 28 - .../plugins/sun4u/cherrystone/frudata/Makefile | 63 - .../sun4u/cherrystone/frudata/libpiclfrudata.conf | 173 - .../plugins/sun4u/cherrystone/frutree/Makefile | 102 - .../sun4u/cherrystone/frutree/piclfrutree.c | 1147 ---- .../sun4u/cherrystone/frutree/piclfrutree.info | 97 - .../plugins/sun4u/cherrystone/psvcplugin/Makefile | 89 - .../sun4u/cherrystone/psvcplugin/psvcplugin.c | 291 - .../plugins/sun4u/cherrystone/psvcpolicy/Makefile | 105 - .../sun4u/cherrystone/psvcpolicy/psvcpolicy.c | 1845 ------ usr/src/cmd/picl/plugins/sun4u/chicago/Makefile | 50 - .../cmd/picl/plugins/sun4u/chicago/envd/Makefile | 109 - usr/src/cmd/picl/plugins/sun4u/chicago/envd/envd.h | 614 -- .../picl/plugins/sun4u/chicago/envd/envmodel.info | 201 - .../cmd/picl/plugins/sun4u/chicago/envd/piclenvd.c | 2217 -------- .../picl/plugins/sun4u/chicago/envd/piclenvsetup.c | 1018 ---- .../picl/plugins/sun4u/chicago/frudata/Makefile | 63 - .../sun4u/chicago/frudata/libpiclfrudata.conf | 66 - .../picl/plugins/sun4u/chicago/frutree/Makefile | 68 - .../plugins/sun4u/chicago/frutree/piclfrutree.info | 182 - .../sun4u/chicago/frutree/system-board.info | 528 -- usr/src/cmd/picl/plugins/sun4u/daktari/Makefile | 50 - .../cmd/picl/plugins/sun4u/daktari/conf/Makefile | 79 - .../picl/plugins/sun4u/daktari/conf/platsvcd.conf | 365 -- .../picl/plugins/sun4u/daktari/conf/psvcobj.conf | 2113 ------- .../picl/plugins/sun4u/daktari/devtree/Makefile | 64 - .../plugins/sun4u/daktari/devtree/picldevtree.conf | 28 - .../picl/plugins/sun4u/daktari/frudata/Makefile | 63 - .../sun4u/daktari/frudata/libpiclfrudata.conf | 292 - .../picl/plugins/sun4u/daktari/frutree/Makefile | 103 - .../plugins/sun4u/daktari/frutree/piclfrutree.c | 1348 ----- .../plugins/sun4u/daktari/frutree/piclfrutree.info | 162 - .../picl/plugins/sun4u/daktari/psvcplugin/Makefile | 92 - .../plugins/sun4u/daktari/psvcplugin/psvcplugin.c | 508 -- .../picl/plugins/sun4u/daktari/psvcpolicy/Makefile | 110 - .../plugins/sun4u/daktari/psvcpolicy/psvcpolicy.c | 2317 -------- usr/src/cmd/picl/plugins/sun4u/enchilada/Makefile | 50 - .../cmd/picl/plugins/sun4u/enchilada/envd/Makefile | 109 - .../cmd/picl/plugins/sun4u/enchilada/envd/envd.h | 546 -- .../plugins/sun4u/enchilada/envd/envmodel.info | 194 - .../picl/plugins/sun4u/enchilada/envd/piclenvd.c | 2879 ---------- .../plugins/sun4u/enchilada/envd/piclenvsetup.c | 1008 ---- .../picl/plugins/sun4u/enchilada/frudata/Makefile | 63 - .../sun4u/enchilada/frudata/libpiclfrudata.conf | 64 - .../picl/plugins/sun4u/enchilada/frutree/Makefile | 68 - .../sun4u/enchilada/frutree/piclfrutree.info | 134 - .../sun4u/enchilada/frutree/system-board.info | 412 -- usr/src/cmd/picl/plugins/sun4u/ents/Makefile | 50 - .../cmd/picl/plugins/sun4u/ents/devtree/Makefile | 62 - .../picl/plugins/sun4u/ents/devtree/picl_asr.conf | 69 - .../plugins/sun4u/ents/devtree/picldevtree.conf | 36 - .../cmd/picl/plugins/sun4u/ents/envmon/Makefile | 75 - .../picl/plugins/sun4u/ents/envmon/piclenvmon.info | 84 - .../cmd/picl/plugins/sun4u/ents/frudata/Makefile | 63 - .../plugins/sun4u/ents/frudata/libpiclfrudata.conf | 70 - usr/src/cmd/picl/plugins/sun4u/ents/frudr/Makefile | 94 - .../picl/plugins/sun4u/ents/frudr/SB-tables.info | 299 - .../picl/plugins/sun4u/ents/frudr/fru_HDD0.info | 74 - .../plugins/sun4u/ents/frudr/fru_HDD0_data.info | 82 - .../picl/plugins/sun4u/ents/frudr/fru_HDD1.info | 74 - .../plugins/sun4u/ents/frudr/fru_HDD1_data.info | 82 - .../picl/plugins/sun4u/ents/frudr/fru_HDD2.info | 74 - .../plugins/sun4u/ents/frudr/fru_HDD2_data.info | 82 - .../picl/plugins/sun4u/ents/frudr/fru_HDD3.info | 74 - .../plugins/sun4u/ents/frudr/fru_HDD3_data.info | 82 - .../picl/plugins/sun4u/ents/frudr/fru_HDD4.info | 74 - .../plugins/sun4u/ents/frudr/fru_HDD4_data.info | 82 - .../picl/plugins/sun4u/ents/frudr/fru_HDD5.info | 74 - .../plugins/sun4u/ents/frudr/fru_HDD5_data.info | 82 - .../picl/plugins/sun4u/ents/frudr/fru_HDD6.info | 74 - .../plugins/sun4u/ents/frudr/fru_HDD6_data.info | 82 - .../picl/plugins/sun4u/ents/frudr/fru_HDD7.info | 74 - .../plugins/sun4u/ents/frudr/fru_HDD7_data.info | 82 - .../cmd/picl/plugins/sun4u/ents/frudr/fru_PS0.info | 84 - .../plugins/sun4u/ents/frudr/fru_PS0_data.info | 156 - .../cmd/picl/plugins/sun4u/ents/frudr/fru_PS1.info | 84 - .../plugins/sun4u/ents/frudr/fru_PS1_data.info | 156 - .../cmd/picl/plugins/sun4u/ents/frudr/fru_SC.info | 75 - .../picl/plugins/sun4u/ents/frudr/fru_SC_data.info | 323 -- .../picl/plugins/sun4u/ents/frudr/fru_usb-a-1.info | 74 - .../plugins/sun4u/ents/frudr/fru_usb-a-1_data.info | 72 - .../picl/plugins/sun4u/ents/frudr/fru_usb-a-2.info | 74 - .../plugins/sun4u/ents/frudr/fru_usb-a-2_data.info | 72 - .../picl/plugins/sun4u/ents/frudr/fru_usb-b-1.info | 74 - .../plugins/sun4u/ents/frudr/fru_usb-b-1_data.info | 72 - .../picl/plugins/sun4u/ents/frudr/fru_usb-b-2.info | 74 - .../plugins/sun4u/ents/frudr/fru_usb-b-2_data.info | 72 - .../cmd/picl/plugins/sun4u/ents/frutree/Makefile | 94 - .../plugins/sun4u/ents/frutree/piclfrutree.info | 397 -- .../plugins/sun4u/ents/frutree/system-board.info | 253 - usr/src/cmd/picl/plugins/sun4u/envmon/Makefile | 98 - usr/src/cmd/picl/plugins/sun4u/envmon/piclenvmon.c | 1810 ------ usr/src/cmd/picl/plugins/sun4u/envmon/piclenvmon.h | 131 - usr/src/cmd/picl/plugins/sun4u/excalibur/Makefile | 51 - .../cmd/picl/plugins/sun4u/excalibur/envd/Makefile | 108 - .../cmd/picl/plugins/sun4u/excalibur/envd/envd.h | 446 -- .../plugins/sun4u/excalibur/envd/envmodel.info | 88 - .../picl/plugins/sun4u/excalibur/envd/piclenvd.c | 2843 ---------- .../plugins/sun4u/excalibur/envd/piclenvsetup.c | 893 --- .../picl/plugins/sun4u/excalibur/frudata/Makefile | 63 - .../sun4u/excalibur/frudata/libpiclfrudata.conf | 93 - .../picl/plugins/sun4u/excalibur/frutree/Makefile | 67 - .../plugins/sun4u/excalibur/frutree/envmodel.info | 119 - .../sun4u/excalibur/frutree/piclfrutree.info | 142 - .../sun4u/excalibur/frutree/system-board.info | 324 -- usr/src/cmd/picl/plugins/sun4u/frudata/Makefile | 110 - usr/src/cmd/picl/plugins/sun4u/frudata/fru_data.c | 2490 -------- usr/src/cmd/picl/plugins/sun4u/frudata/fru_data.h | 44 - .../cmd/picl/plugins/sun4u/frudata/fru_data_impl.h | 120 - usr/src/cmd/picl/plugins/sun4u/grover/Makefile | 50 - .../cmd/picl/plugins/sun4u/grover/envd/Makefile | 102 - usr/src/cmd/picl/plugins/sun4u/grover/envd/envd.h | 222 - .../picl/plugins/sun4u/grover/envd/envmodel.info | 56 - .../cmd/picl/plugins/sun4u/grover/envd/piclenvd.c | 1072 ---- .../picl/plugins/sun4u/grover/envd/piclenvsetup.c | 838 --- .../cmd/picl/plugins/sun4u/grover/frutree/Makefile | 67 - .../plugins/sun4u/grover/frutree/envmodel.info | 74 - .../plugins/sun4u/grover/frutree/piclfrutree.info | 118 - .../plugins/sun4u/grover/frutree/system-board.info | 214 - .../cmd/picl/plugins/sun4u/grover/memcfg/Makefile | 123 - .../picl/plugins/sun4u/grover/memcfg/memcfg_impl.h | 78 - .../picl/plugins/sun4u/grover/memcfg/piclmemcfg.c | 425 -- usr/src/cmd/picl/plugins/sun4u/lib/Makefile | 50 - .../cmd/picl/plugins/sun4u/lib/fruaccess/Makefile | 110 - .../picl/plugins/sun4u/lib/fruaccess/crcmodel.c | 171 - .../picl/plugins/sun4u/lib/fruaccess/crcmodel.h | 182 - .../picl/plugins/sun4u/lib/fruaccess/crcutils.c | 159 - .../plugins/sun4u/lib/fruaccess/cvrt_spd_data.c | 238 - .../picl/plugins/sun4u/lib/fruaccess/fru_access.c | 2839 ---------- .../picl/plugins/sun4u/lib/fruaccess/fru_access.h | 116 - .../plugins/sun4u/lib/fruaccess/fru_access_impl.h | 210 - .../plugins/sun4u/lib/fruaccess/fru_container.conf | 54 - .../picl/plugins/sun4u/lib/fruaccess/spd_data.h | 154 - usr/src/cmd/picl/plugins/sun4u/littleneck/Makefile | 50 - .../picl/plugins/sun4u/littleneck/conf/Makefile | 79 - .../plugins/sun4u/littleneck/conf/platsvcd.conf | 120 - .../plugins/sun4u/littleneck/conf/psvcobj.conf | 331 -- .../picl/plugins/sun4u/littleneck/devtree/Makefile | 64 - .../sun4u/littleneck/devtree/picldevtree.conf | 31 - .../picl/plugins/sun4u/littleneck/frudata/Makefile | 63 - .../sun4u/littleneck/frudata/libpiclfrudata.conf | 104 - .../picl/plugins/sun4u/littleneck/frutree/Makefile | 103 - .../plugins/sun4u/littleneck/frutree/piclfrutree.c | 960 ---- .../sun4u/littleneck/frutree/piclfrutree.info | 57 - .../plugins/sun4u/littleneck/psvcplugin/Makefile | 92 - .../sun4u/littleneck/psvcplugin/psvcplugin.c | 211 - .../plugins/sun4u/littleneck/psvcpolicy/Makefile | 105 - .../sun4u/littleneck/psvcpolicy/psvcpolicy.c | 882 --- usr/src/cmd/picl/plugins/sun4u/lw2plus/Makefile | 49 - .../picl/plugins/sun4u/lw2plus/devtree/Makefile | 62 - .../plugins/sun4u/lw2plus/devtree/picldevtree.conf | 31 - .../picl/plugins/sun4u/lw2plus/fcal_leds/Makefile | 109 - .../plugins/sun4u/lw2plus/fcal_leds/fc_led_parse.c | 634 --- .../plugins/sun4u/lw2plus/fcal_leds/fcal_leds.c | 681 --- .../plugins/sun4u/lw2plus/fcal_leds/fcal_leds.conf | 77 - .../plugins/sun4u/lw2plus/fcal_leds/fcal_leds.h | 311 - .../sun4u/lw2plus/fcal_leds/fcal_leds_thread.c | 861 --- .../picl/plugins/sun4u/lw2plus/frudata/Makefile | 63 - .../sun4u/lw2plus/frudata/libpiclfrudata.conf | 76 - .../picl/plugins/sun4u/lw2plus/frutree/Makefile | 69 - .../plugins/sun4u/lw2plus/frutree/piclfrutree.info | 112 - .../sun4u/lw2plus/frutree/system-board.info | 403 -- usr/src/cmd/picl/plugins/sun4u/lw8/Makefile | 48 - .../cmd/picl/plugins/sun4u/lw8/fruaccess/Makefile | 89 - .../plugins/sun4u/lw8/fruaccess/libfruaccess.c | 485 -- .../cmd/picl/plugins/sun4u/lw8/frutree/Makefile | 96 - .../picl/plugins/sun4u/lw8/frutree/piclfrutree.c | 4064 ------------- usr/src/cmd/picl/plugins/sun4u/mpxu/Makefile | 50 - .../cmd/picl/plugins/sun4u/mpxu/devtree/Makefile | 62 - .../picl/plugins/sun4u/mpxu/devtree/picl_asr.conf | 69 - .../plugins/sun4u/mpxu/devtree/picldevtree.conf | 42 - .../cmd/picl/plugins/sun4u/mpxu/envmon/Makefile | 74 - .../picl/plugins/sun4u/mpxu/envmon/piclenvmon.info | 84 - .../cmd/picl/plugins/sun4u/mpxu/frudata/Makefile | 63 - .../plugins/sun4u/mpxu/frudata/libpiclfrudata.conf | 76 - usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/Makefile | 161 - .../picl/plugins/sun4u/mpxu/frudr/SB-tables.info | 379 -- .../picl/plugins/sun4u/mpxu/frudr/fru_HDD0.info | 74 - .../plugins/sun4u/mpxu/frudr/fru_HDD0_data.info | 88 - .../picl/plugins/sun4u/mpxu/frudr/fru_HDD1.info | 74 - .../plugins/sun4u/mpxu/frudr/fru_HDD1_data.info | 88 - .../picl/plugins/sun4u/mpxu/frudr/fru_HDD2.info | 74 - .../plugins/sun4u/mpxu/frudr/fru_HDD2_data.info | 82 - .../picl/plugins/sun4u/mpxu/frudr/fru_HDD3.info | 74 - .../plugins/sun4u/mpxu/frudr/fru_HDD3_data.info | 82 - .../cmd/picl/plugins/sun4u/mpxu/frudr/fru_PS0.info | 84 - .../plugins/sun4u/mpxu/frudr/fru_PS0_data.info | 148 - .../cmd/picl/plugins/sun4u/mpxu/frudr/fru_PS1.info | 84 - .../plugins/sun4u/mpxu/frudr/fru_PS1_data.info | 144 - .../cmd/picl/plugins/sun4u/mpxu/frudr/fru_SC.info | 75 - .../picl/plugins/sun4u/mpxu/frudr/fru_SC_data.info | 247 - .../picl/plugins/sun4u/mpxu/frudr/fru_usb-a-1.info | 74 - .../plugins/sun4u/mpxu/frudr/fru_usb-a-1_data.info | 72 - .../picl/plugins/sun4u/mpxu/frudr/fru_usb-a-2.info | 74 - .../plugins/sun4u/mpxu/frudr/fru_usb-a-2_data.info | 72 - .../cmd/picl/plugins/sun4u/mpxu/frudr/piclfrudr.c | 2987 ---------- .../cmd/picl/plugins/sun4u/mpxu/frutree/Makefile | 87 - .../plugins/sun4u/mpxu/frutree/piclfrutree.info | 414 -- .../plugins/sun4u/mpxu/frutree/system-board.info | 283 - usr/src/cmd/picl/plugins/sun4u/psvc/Makefile | 50 - .../cmd/picl/plugins/sun4u/psvc/psvcobj/Makefile | 99 - .../picl/plugins/sun4u/psvc/psvcobj/psvc_objects.h | 333 -- .../sun4u/psvc/psvcobj/psvc_objects_class.h | 264 - .../cmd/picl/plugins/sun4u/psvc/psvcobj/psvcobj.c | 5231 ----------------- .../picl/plugins/sun4u/psvc/psvcplugin/Makefile | 131 - .../plugins/sun4u/psvc/psvcplugin/psvcplugin.c | 1808 ------ .../picl/plugins/sun4u/psvc/psvcpolicy/Makefile | 101 - .../plugins/sun4u/psvc/psvcpolicy/psvcpolicy.c | 1398 ----- usr/src/cmd/picl/plugins/sun4u/schumacher/Makefile | 46 - .../picl/plugins/sun4u/schumacher/frudata/Makefile | 63 - .../sun4u/schumacher/frudata/libpiclfrudata.conf | 46 - .../picl/plugins/sun4u/schumacher/frutree/Makefile | 68 - .../sun4u/schumacher/frutree/piclfrutree.info | 74 - .../sun4u/schumacher/frutree/system-board.info | 134 - usr/src/cmd/picl/plugins/sun4u/seattle/Makefile | 49 - .../picl/plugins/sun4u/seattle/devtree/Makefile | 67 - .../plugins/sun4u/seattle/devtree/picl_asr.conf | 85 - .../plugins/sun4u/seattle/devtree/picldevtree.conf | 41 - .../cmd/picl/plugins/sun4u/seattle/envmon/Makefile | 77 - .../plugins/sun4u/seattle/envmon/piclenvmon.info | 86 - .../picl/plugins/sun4u/seattle/frudata/Makefile | 67 - .../sun4u/seattle/frudata/libpiclfrudata.conf | 81 - .../cmd/picl/plugins/sun4u/seattle/frudr/Makefile | 96 - .../plugins/sun4u/seattle/frudr/SB-tables.info | 389 -- .../picl/plugins/sun4u/seattle/frudr/fru_FT0.info | 105 - .../plugins/sun4u/seattle/frudr/fru_FT0_data.info | 116 - .../picl/plugins/sun4u/seattle/frudr/fru_FT1.info | 105 - .../plugins/sun4u/seattle/frudr/fru_FT1_data.info | 116 - .../picl/plugins/sun4u/seattle/frudr/fru_FT2.info | 105 - .../plugins/sun4u/seattle/frudr/fru_FT2_data.info | 117 - .../picl/plugins/sun4u/seattle/frudr/fru_FT3.info | 105 - .../plugins/sun4u/seattle/frudr/fru_FT3_data.info | 117 - .../picl/plugins/sun4u/seattle/frudr/fru_FT4.info | 106 - .../plugins/sun4u/seattle/frudr/fru_FT4_data.info | 117 - .../picl/plugins/sun4u/seattle/frudr/fru_FT5.info | 106 - .../plugins/sun4u/seattle/frudr/fru_FT5_data.info | 117 - .../picl/plugins/sun4u/seattle/frudr/fru_FT6.info | 111 - .../plugins/sun4u/seattle/frudr/fru_FT6_data.info | 127 - .../picl/plugins/sun4u/seattle/frudr/fru_HDD0.info | 76 - .../plugins/sun4u/seattle/frudr/fru_HDD0_data.info | 105 - .../picl/plugins/sun4u/seattle/frudr/fru_HDD1.info | 76 - .../plugins/sun4u/seattle/frudr/fru_HDD1_data.info | 105 - .../picl/plugins/sun4u/seattle/frudr/fru_HDD2.info | 76 - .../plugins/sun4u/seattle/frudr/fru_HDD2_data.info | 88 - .../picl/plugins/sun4u/seattle/frudr/fru_HDD3.info | 76 - .../plugins/sun4u/seattle/frudr/fru_HDD3_data.info | 88 - .../picl/plugins/sun4u/seattle/frudr/fru_PS0.info | 88 - .../plugins/sun4u/seattle/frudr/fru_PS0_data.info | 152 - .../picl/plugins/sun4u/seattle/frudr/fru_PS1.info | 88 - .../plugins/sun4u/seattle/frudr/fru_PS1_data.info | 152 - .../picl/plugins/sun4u/seattle/frudr/fru_SC.info | 75 - .../plugins/sun4u/seattle/frudr/fru_SC_data.info | 254 - .../plugins/sun4u/seattle/frudr/fru_usb-a-1.info | 74 - .../sun4u/seattle/frudr/fru_usb-a-1_data.info | 74 - .../plugins/sun4u/seattle/frudr/fru_usb-a-2.info | 74 - .../sun4u/seattle/frudr/fru_usb-a-2_data.info | 74 - .../plugins/sun4u/seattle/frudr/fru_usb-a-3.info | 74 - .../sun4u/seattle/frudr/fru_usb-a-3_data.info | 78 - .../plugins/sun4u/seattle/frudr/fru_usb-a-4.info | 74 - .../sun4u/seattle/frudr/fru_usb-a-4_data.info | 72 - .../picl/plugins/sun4u/seattle/frutree/Makefile | 98 - .../plugins/sun4u/seattle/frutree/piclfrutree.info | 126 - .../sun4u/seattle/frutree/system-board.info | 938 --- usr/src/cmd/picl/plugins/sun4u/sebring/Makefile | 50 - .../cmd/picl/plugins/sun4u/sebring/conf/Makefile | 63 - .../picl/plugins/sun4u/sebring/conf/platsvcd.conf | 157 - .../picl/plugins/sun4u/sebring/conf/psvcobj.conf | 966 ---- .../picl/plugins/sun4u/sebring/devtree/Makefile | 63 - .../plugins/sun4u/sebring/devtree/picldevtree.conf | 29 - .../picl/plugins/sun4u/sebring/frudata/Makefile | 64 - .../sun4u/sebring/frudata/libpiclfrudata.conf | 173 - .../picl/plugins/sun4u/sebring/frutree/Makefile | 76 - .../picl/plugins/sun4u/sebring/psvcplugin/Makefile | 74 - .../picl/plugins/sun4u/sebring/psvcpolicy/Makefile | 74 - .../cmd/picl/plugins/sun4u/silverstone/Makefile | 50 - .../picl/plugins/sun4u/silverstone/conf/Makefile | 63 - .../plugins/sun4u/silverstone/conf/platsvcd.conf | 365 -- .../plugins/sun4u/silverstone/conf/psvcobj.conf | 2113 ------- .../plugins/sun4u/silverstone/devtree/Makefile | 64 - .../sun4u/silverstone/devtree/picldevtree.conf | 29 - .../plugins/sun4u/silverstone/frudata/Makefile | 63 - .../sun4u/silverstone/frudata/libpiclfrudata.conf | 292 - .../plugins/sun4u/silverstone/frutree/Makefile | 76 - .../plugins/sun4u/silverstone/psvcplugin/Makefile | 74 - .../plugins/sun4u/silverstone/psvcpolicy/Makefile | 74 - usr/src/cmd/picl/plugins/sun4u/snowbird/Makefile | 54 - .../cmd/picl/plugins/sun4u/snowbird/conf/Makefile | 67 - .../sun4u/snowbird/conf/SUNW,Netra-CP2300.RTM.conf | 100 - .../sun4u/snowbird/conf/SUNW,Netra-CP2300.conf | 83 - .../picl/plugins/sun4u/snowbird/conf/envmond.conf | 30 - .../picl/plugins/sun4u/snowbird/envmond/Makefile | 99 - .../picl/plugins/sun4u/snowbird/envmond/picldr.c | 822 --- .../picl/plugins/sun4u/snowbird/envmond/picldr.h | 94 - .../plugins/sun4u/snowbird/envmond/piclenvmond.c | 436 -- .../plugins/sun4u/snowbird/envmond/piclenvmond.h | 110 - .../plugins/sun4u/snowbird/envmond/piclplatmod.c | 837 --- .../plugins/sun4u/snowbird/envmond/piclsensors.c | 863 --- .../plugins/sun4u/snowbird/envmond/piclsensors.h | 119 - .../picl/plugins/sun4u/snowbird/frutree/Makefile | 99 - .../plugins/sun4u/snowbird/frutree/piclfrutree.c | 5969 -------------------- .../plugins/sun4u/snowbird/frutree/piclfrutree.h | 264 - .../plugins/sun4u/snowbird/frutree/piclkstat.c | 428 -- .../sun4u/snowbird/frutree/picllibdevinfo.c | 853 --- .../picl/plugins/sun4u/snowbird/frutree/piclscsi.c | 899 --- .../cmd/picl/plugins/sun4u/snowbird/lib/Makefile | 50 - .../plugins/sun4u/snowbird/lib/fruaccess/Makefile | 91 - .../sun4u/snowbird/lib/fruaccess/fru_access_impl.h | 262 - .../sun4u/snowbird/lib/fruaccess/libfruaccess.c | 3438 ----------- .../snowbird/lib/fruaccess/piclfruaccess_platmod.c | 116 - .../plugins/sun4u/snowbird/lib/fruaccess/piclsdr.c | 343 -- .../plugins/sun4u/snowbird/lib/fruaccess/piclsmc.c | 997 ---- .../plugins/sun4u/snowbird/lib/libctsmc/Makefile | 78 - .../plugins/sun4u/snowbird/lib/libctsmc/libctsmc.c | 476 -- .../plugins/sun4u/snowbird/lib/libctsmc/smclib.h | 69 - .../picl/plugins/sun4u/snowbird/watchdog/Makefile | 95 - .../plugins/sun4u/snowbird/watchdog/piclwatchdog.c | 1837 ------ .../plugins/sun4u/snowbird/watchdog/piclwatchdog.h | 288 - .../sun4u/snowbird/watchdog/piclwd_platmod.c | 59 - usr/src/cmd/picl/plugins/sun4u/taco/Makefile | 50 - usr/src/cmd/picl/plugins/sun4u/taco/envd/Makefile | 109 - usr/src/cmd/picl/plugins/sun4u/taco/envd/envd.h | 430 -- .../cmd/picl/plugins/sun4u/taco/envd/envmodel.info | 115 - .../cmd/picl/plugins/sun4u/taco/envd/piclenvd.c | 1849 ------ .../picl/plugins/sun4u/taco/envd/piclenvsetup.c | 769 --- .../cmd/picl/plugins/sun4u/taco/frudata/Makefile | 62 - .../plugins/sun4u/taco/frudata/libpiclfrudata.conf | 46 - .../cmd/picl/plugins/sun4u/taco/frutree/Makefile | 67 - .../plugins/sun4u/taco/frutree/piclfrutree.info | 122 - .../plugins/sun4u/taco/frutree/system-board.info | 275 - usr/src/cmd/picl/plugins/sun4v/Makefile | 52 - .../cmd/picl/plugins/sun4v/include/libpiclsnmp.h | 64 - usr/src/cmd/picl/plugins/sun4v/include/picloids.h | 355 -- usr/src/cmd/picl/plugins/sun4v/lib/Makefile | 47 - usr/src/cmd/picl/plugins/sun4v/lib/snmp/Makefile | 92 - usr/src/cmd/picl/plugins/sun4v/lib/snmp/asn1.c | 760 --- usr/src/cmd/picl/plugins/sun4v/lib/snmp/asn1.h | 154 - usr/src/cmd/picl/plugins/sun4v/lib/snmp/debug.c | 616 -- usr/src/cmd/picl/plugins/sun4v/lib/snmp/debug.h | 144 - usr/src/cmd/picl/plugins/sun4v/lib/snmp/pdu.c | 681 --- usr/src/cmd/picl/plugins/sun4v/lib/snmp/pdu.h | 159 - usr/src/cmd/picl/plugins/sun4v/lib/snmp/snmplib.c | 1636 ------ usr/src/cmd/picl/plugins/sun4v/lib/snmp/snmplib.h | 78 - usr/src/cmd/picl/plugins/sun4v/mdesc/Makefile | 87 - .../cmd/picl/plugins/sun4v/mdesc/cpu_prop_update.c | 373 -- .../cmd/picl/plugins/sun4v/mdesc/disk_discovery.c | 258 - usr/src/cmd/picl/plugins/sun4v/mdesc/dr.c | 548 -- usr/src/cmd/picl/plugins/sun4v/mdesc/init.c | 108 - usr/src/cmd/picl/plugins/sun4v/mdesc/mdescplugin.c | 330 -- usr/src/cmd/picl/plugins/sun4v/mdesc/mdescplugin.h | 77 - usr/src/cmd/picl/plugins/sun4v/piclsbl/Makefile | 81 - usr/src/cmd/picl/plugins/sun4v/piclsbl/piclsbl.c | 423 -- usr/src/cmd/picl/plugins/sun4v/piclsbl/piclsbl.h | 91 - usr/src/cmd/picl/plugins/sun4v/pri/Makefile | 99 - usr/src/cmd/picl/plugins/sun4v/pri/init.c | 108 - usr/src/cmd/picl/plugins/sun4v/pri/io_dev_label.c | 298 - .../cmd/picl/plugins/sun4v/pri/mem_prop_update.c | 329 -- usr/src/cmd/picl/plugins/sun4v/pri/priplugin.c | 433 -- usr/src/cmd/picl/plugins/sun4v/pri/priplugin.h | 81 - usr/src/cmd/picl/plugins/sun4v/snmp/Makefile | 90 - usr/src/cmd/picl/plugins/sun4v/snmp/snmpplugin.c | 2079 ------- usr/src/cmd/picl/plugins/sun4v/snmp/snmpplugin.h | 217 - 481 files changed, 137207 deletions(-) delete mode 100644 usr/src/cmd/picl/plugins/sun4u/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/blade/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/blade/bsc/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/blade/bsc/picllom.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/blade/bsc/picllom.h delete mode 100644 usr/src/cmd/picl/plugins/sun4u/blade/bsc/picllom.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/blade/devtree/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/blade/devtree/picldevtree.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/blade/fruaccess/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/blade/fruaccess/fru_access.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/blade/fruaccess/fru_access_impl.h delete mode 100644 usr/src/cmd/picl/plugins/sun4u/blade/fruaccess/fru_container.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/blade/frudata/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/blade/frudata/libpiclfrudata.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/blade/frutree/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/blade/frutree/piclfrutree.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/blade/frutree/system-board.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/devtree/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/devtree/picl_asr.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/devtree/picldevtree.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/envmon/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/envmon/piclenvmon.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudata/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudata/libpiclfrudata.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/SB-tables.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT0.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT0_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT1.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT1_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT2.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT2_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT3.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT3_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT4.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT4_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT5.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT5_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD0.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD0_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD1.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD1_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD2.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD2_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD3.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD3_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD4.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD4_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD5.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD5_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD6.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD6_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD7.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD7_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_PS0.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_PS0_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_PS1.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_PS1_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_PS2.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_PS2_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_PS3.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_PS3_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_SC.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_SC_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_usb-a-1.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_usb-a-1_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_usb-a-2.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_usb-a-2_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_usb-a-3.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_usb-a-3_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_usb-a-4.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_usb-a-4_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frutree/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frutree/piclfrutree.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/boston/frutree/system-board.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chalupa/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chalupa/devtree/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chalupa/devtree/picldevtree.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chalupa/envmon/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chalupa/envmon/piclenvmon.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chalupa/frudata/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chalupa/frudata/libpiclfrudata.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/SB-tables.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_FT0.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_FT1.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_FT2.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_FT3.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_HDD0.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_HDD0_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_HDD1.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_HDD1_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_HDD2.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_HDD2_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_HDD3.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_HDD3_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PS0.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PS0_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PS1.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PS1_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PSU0.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PSU0_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PSU1.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PSU1_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PSU2.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PSU2_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PSU3.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PSU3_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_SC.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_SC_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chalupa/frutree/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chalupa/frutree/piclfrutree.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chalupa/frutree/system-board.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/cherrystone/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/cherrystone/conf/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/cherrystone/conf/platsvcd.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/cherrystone/conf/psvcobj.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/cherrystone/devtree/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/cherrystone/devtree/picldevtree.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/cherrystone/frudata/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/cherrystone/frudata/libpiclfrudata.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/cherrystone/frutree/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/cherrystone/frutree/piclfrutree.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/cherrystone/frutree/piclfrutree.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/cherrystone/psvcplugin/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/cherrystone/psvcplugin/psvcplugin.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/cherrystone/psvcpolicy/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/cherrystone/psvcpolicy/psvcpolicy.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chicago/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chicago/envd/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chicago/envd/envd.h delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chicago/envd/envmodel.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chicago/envd/piclenvd.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chicago/envd/piclenvsetup.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chicago/frudata/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chicago/frudata/libpiclfrudata.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chicago/frutree/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chicago/frutree/piclfrutree.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/chicago/frutree/system-board.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/daktari/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/daktari/conf/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/daktari/conf/platsvcd.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/daktari/conf/psvcobj.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/daktari/devtree/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/daktari/devtree/picldevtree.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/daktari/frudata/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/daktari/frudata/libpiclfrudata.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/daktari/frutree/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/daktari/frutree/piclfrutree.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/daktari/frutree/piclfrutree.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/daktari/psvcplugin/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/daktari/psvcplugin/psvcplugin.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/daktari/psvcpolicy/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/daktari/psvcpolicy/psvcpolicy.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/enchilada/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/enchilada/envd/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/enchilada/envd/envd.h delete mode 100644 usr/src/cmd/picl/plugins/sun4u/enchilada/envd/envmodel.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/enchilada/envd/piclenvd.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/enchilada/envd/piclenvsetup.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/enchilada/frudata/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/enchilada/frudata/libpiclfrudata.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/enchilada/frutree/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/enchilada/frutree/piclfrutree.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/enchilada/frutree/system-board.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/ents/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/ents/devtree/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/ents/devtree/picl_asr.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/ents/devtree/picldevtree.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/ents/envmon/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/ents/envmon/piclenvmon.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/ents/frudata/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/ents/frudata/libpiclfrudata.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/ents/frudr/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/ents/frudr/SB-tables.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD0.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD0_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD1.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD1_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD2.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD2_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD3.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD3_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD4.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD4_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD5.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD5_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD6.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD6_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD7.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD7_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_PS0.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_PS0_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_PS1.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_PS1_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_SC.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_SC_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_usb-a-1.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_usb-a-1_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_usb-a-2.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_usb-a-2_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_usb-b-1.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_usb-b-1_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_usb-b-2.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_usb-b-2_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/ents/frutree/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/ents/frutree/piclfrutree.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/ents/frutree/system-board.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/envmon/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/envmon/piclenvmon.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/envmon/piclenvmon.h delete mode 100644 usr/src/cmd/picl/plugins/sun4u/excalibur/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/excalibur/envd/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/excalibur/envd/envd.h delete mode 100644 usr/src/cmd/picl/plugins/sun4u/excalibur/envd/envmodel.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/excalibur/envd/piclenvd.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/excalibur/envd/piclenvsetup.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/excalibur/frudata/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/excalibur/frudata/libpiclfrudata.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/excalibur/frutree/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/excalibur/frutree/envmodel.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/excalibur/frutree/piclfrutree.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/excalibur/frutree/system-board.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/frudata/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/frudata/fru_data.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/frudata/fru_data.h delete mode 100644 usr/src/cmd/picl/plugins/sun4u/frudata/fru_data_impl.h delete mode 100644 usr/src/cmd/picl/plugins/sun4u/grover/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/grover/envd/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/grover/envd/envd.h delete mode 100644 usr/src/cmd/picl/plugins/sun4u/grover/envd/envmodel.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/grover/envd/piclenvd.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/grover/envd/piclenvsetup.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/grover/frutree/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/grover/frutree/envmodel.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/grover/frutree/piclfrutree.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/grover/frutree/system-board.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/grover/memcfg/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/grover/memcfg/memcfg_impl.h delete mode 100644 usr/src/cmd/picl/plugins/sun4u/grover/memcfg/piclmemcfg.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/lib/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/crcmodel.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/crcmodel.h delete mode 100644 usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/crcutils.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/cvrt_spd_data.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/fru_access.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/fru_access.h delete mode 100644 usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/fru_access_impl.h delete mode 100644 usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/fru_container.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/spd_data.h delete mode 100644 usr/src/cmd/picl/plugins/sun4u/littleneck/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/littleneck/conf/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/littleneck/conf/platsvcd.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/littleneck/conf/psvcobj.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/littleneck/devtree/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/littleneck/devtree/picldevtree.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/littleneck/frudata/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/littleneck/frudata/libpiclfrudata.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/littleneck/frutree/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/littleneck/frutree/piclfrutree.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/littleneck/frutree/piclfrutree.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/littleneck/psvcplugin/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/littleneck/psvcplugin/psvcplugin.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/littleneck/psvcpolicy/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/littleneck/psvcpolicy/psvcpolicy.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/lw2plus/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/lw2plus/devtree/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/lw2plus/devtree/picldevtree.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/lw2plus/fcal_leds/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/lw2plus/fcal_leds/fc_led_parse.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/lw2plus/fcal_leds/fcal_leds.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/lw2plus/fcal_leds/fcal_leds.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/lw2plus/fcal_leds/fcal_leds.h delete mode 100644 usr/src/cmd/picl/plugins/sun4u/lw2plus/fcal_leds/fcal_leds_thread.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/lw2plus/frudata/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/lw2plus/frudata/libpiclfrudata.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/lw2plus/frutree/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/lw2plus/frutree/piclfrutree.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/lw2plus/frutree/system-board.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/lw8/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/lw8/fruaccess/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/lw8/fruaccess/libfruaccess.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/lw8/frutree/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/lw8/frutree/piclfrutree.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/mpxu/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/mpxu/devtree/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/mpxu/devtree/picl_asr.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/mpxu/devtree/picldevtree.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/mpxu/envmon/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/mpxu/envmon/piclenvmon.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/mpxu/frudata/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/mpxu/frudata/libpiclfrudata.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/SB-tables.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_HDD0.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_HDD0_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_HDD1.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_HDD1_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_HDD2.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_HDD2_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_HDD3.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_HDD3_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_PS0.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_PS0_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_PS1.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_PS1_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_SC.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_SC_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_usb-a-1.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_usb-a-1_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_usb-a-2.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_usb-a-2_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/piclfrudr.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/mpxu/frutree/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/mpxu/frutree/piclfrutree.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/mpxu/frutree/system-board.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/psvc/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/psvc/psvcobj/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/psvc/psvcobj/psvc_objects.h delete mode 100644 usr/src/cmd/picl/plugins/sun4u/psvc/psvcobj/psvc_objects_class.h delete mode 100644 usr/src/cmd/picl/plugins/sun4u/psvc/psvcobj/psvcobj.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/psvc/psvcplugin/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/psvc/psvcplugin/psvcplugin.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/psvc/psvcpolicy/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/psvc/psvcpolicy/psvcpolicy.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/schumacher/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/schumacher/frudata/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/schumacher/frudata/libpiclfrudata.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/schumacher/frutree/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/schumacher/frutree/piclfrutree.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/schumacher/frutree/system-board.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/devtree/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/devtree/picl_asr.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/devtree/picldevtree.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/envmon/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/envmon/piclenvmon.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/frudata/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/frudata/libpiclfrudata.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/frudr/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/frudr/SB-tables.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT0.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT0_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT1.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT1_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT2.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT2_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT3.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT3_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT4.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT4_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT5.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT5_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT6.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT6_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_HDD0.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_HDD0_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_HDD1.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_HDD1_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_HDD2.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_HDD2_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_HDD3.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_HDD3_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_PS0.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_PS0_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_PS1.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_PS1_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_SC.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_SC_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_usb-a-1.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_usb-a-1_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_usb-a-2.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_usb-a-2_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_usb-a-3.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_usb-a-3_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_usb-a-4.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_usb-a-4_data.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/frutree/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/frutree/piclfrutree.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/seattle/frutree/system-board.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/sebring/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/sebring/conf/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/sebring/conf/platsvcd.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/sebring/conf/psvcobj.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/sebring/devtree/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/sebring/devtree/picldevtree.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/sebring/frudata/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/sebring/frudata/libpiclfrudata.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/sebring/frutree/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/sebring/psvcplugin/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/sebring/psvcpolicy/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/silverstone/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/silverstone/conf/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/silverstone/conf/platsvcd.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/silverstone/conf/psvcobj.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/silverstone/devtree/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/silverstone/devtree/picldevtree.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/silverstone/frudata/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/silverstone/frudata/libpiclfrudata.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/silverstone/frutree/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/silverstone/psvcplugin/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/silverstone/psvcpolicy/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/snowbird/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/snowbird/conf/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/snowbird/conf/SUNW,Netra-CP2300.RTM.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/snowbird/conf/SUNW,Netra-CP2300.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/snowbird/conf/envmond.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/snowbird/envmond/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/snowbird/envmond/picldr.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/snowbird/envmond/picldr.h delete mode 100644 usr/src/cmd/picl/plugins/sun4u/snowbird/envmond/piclenvmond.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/snowbird/envmond/piclenvmond.h delete mode 100644 usr/src/cmd/picl/plugins/sun4u/snowbird/envmond/piclplatmod.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/snowbird/envmond/piclsensors.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/snowbird/envmond/piclsensors.h delete mode 100644 usr/src/cmd/picl/plugins/sun4u/snowbird/frutree/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/snowbird/frutree/piclfrutree.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/snowbird/frutree/piclfrutree.h delete mode 100644 usr/src/cmd/picl/plugins/sun4u/snowbird/frutree/piclkstat.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/snowbird/frutree/picllibdevinfo.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/snowbird/frutree/piclscsi.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/snowbird/lib/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/snowbird/lib/fruaccess/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/snowbird/lib/fruaccess/fru_access_impl.h delete mode 100644 usr/src/cmd/picl/plugins/sun4u/snowbird/lib/fruaccess/libfruaccess.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/snowbird/lib/fruaccess/piclfruaccess_platmod.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/snowbird/lib/fruaccess/piclsdr.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/snowbird/lib/fruaccess/piclsmc.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/snowbird/lib/libctsmc/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/snowbird/lib/libctsmc/libctsmc.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/snowbird/lib/libctsmc/smclib.h delete mode 100644 usr/src/cmd/picl/plugins/sun4u/snowbird/watchdog/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/snowbird/watchdog/piclwatchdog.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/snowbird/watchdog/piclwatchdog.h delete mode 100644 usr/src/cmd/picl/plugins/sun4u/snowbird/watchdog/piclwd_platmod.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/taco/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/taco/envd/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/taco/envd/envd.h delete mode 100644 usr/src/cmd/picl/plugins/sun4u/taco/envd/envmodel.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/taco/envd/piclenvd.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/taco/envd/piclenvsetup.c delete mode 100644 usr/src/cmd/picl/plugins/sun4u/taco/frudata/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/taco/frudata/libpiclfrudata.conf delete mode 100644 usr/src/cmd/picl/plugins/sun4u/taco/frutree/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4u/taco/frutree/piclfrutree.info delete mode 100644 usr/src/cmd/picl/plugins/sun4u/taco/frutree/system-board.info delete mode 100644 usr/src/cmd/picl/plugins/sun4v/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4v/include/libpiclsnmp.h delete mode 100644 usr/src/cmd/picl/plugins/sun4v/include/picloids.h delete mode 100644 usr/src/cmd/picl/plugins/sun4v/lib/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4v/lib/snmp/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4v/lib/snmp/asn1.c delete mode 100644 usr/src/cmd/picl/plugins/sun4v/lib/snmp/asn1.h delete mode 100644 usr/src/cmd/picl/plugins/sun4v/lib/snmp/debug.c delete mode 100644 usr/src/cmd/picl/plugins/sun4v/lib/snmp/debug.h delete mode 100644 usr/src/cmd/picl/plugins/sun4v/lib/snmp/pdu.c delete mode 100644 usr/src/cmd/picl/plugins/sun4v/lib/snmp/pdu.h delete mode 100644 usr/src/cmd/picl/plugins/sun4v/lib/snmp/snmplib.c delete mode 100644 usr/src/cmd/picl/plugins/sun4v/lib/snmp/snmplib.h delete mode 100644 usr/src/cmd/picl/plugins/sun4v/mdesc/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4v/mdesc/cpu_prop_update.c delete mode 100644 usr/src/cmd/picl/plugins/sun4v/mdesc/disk_discovery.c delete mode 100644 usr/src/cmd/picl/plugins/sun4v/mdesc/dr.c delete mode 100644 usr/src/cmd/picl/plugins/sun4v/mdesc/init.c delete mode 100644 usr/src/cmd/picl/plugins/sun4v/mdesc/mdescplugin.c delete mode 100644 usr/src/cmd/picl/plugins/sun4v/mdesc/mdescplugin.h delete mode 100644 usr/src/cmd/picl/plugins/sun4v/piclsbl/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4v/piclsbl/piclsbl.c delete mode 100644 usr/src/cmd/picl/plugins/sun4v/piclsbl/piclsbl.h delete mode 100644 usr/src/cmd/picl/plugins/sun4v/pri/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4v/pri/init.c delete mode 100644 usr/src/cmd/picl/plugins/sun4v/pri/io_dev_label.c delete mode 100644 usr/src/cmd/picl/plugins/sun4v/pri/mem_prop_update.c delete mode 100644 usr/src/cmd/picl/plugins/sun4v/pri/priplugin.c delete mode 100644 usr/src/cmd/picl/plugins/sun4v/pri/priplugin.h delete mode 100644 usr/src/cmd/picl/plugins/sun4v/snmp/Makefile delete mode 100644 usr/src/cmd/picl/plugins/sun4v/snmp/snmpplugin.c delete mode 100644 usr/src/cmd/picl/plugins/sun4v/snmp/snmpplugin.h diff --git a/usr/src/cmd/picl/plugins/Makefile b/usr/src/cmd/picl/plugins/Makefile index 443eba0265..fe1027675b 100644 --- a/usr/src/cmd/picl/plugins/Makefile +++ b/usr/src/cmd/picl/plugins/Makefile @@ -29,10 +29,6 @@ # COMMON_SUBDIRS= lib .WAIT common .WAIT -sparc_SUBDIRS= sun4u sun4v .WAIT - -sparc_MSGSUBDIRS= sun4u .WAIT - i86_SUBDIRS= i86_MSGSUBDIRS= diff --git a/usr/src/cmd/picl/plugins/sun4u/Makefile b/usr/src/cmd/picl/plugins/sun4u/Makefile deleted file mode 100644 index a0585e4fd1..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/Makefile +++ /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 2006 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# -# ident "%Z%%M% %I% %E% SMI" -# -# cmd/picl/plugins/sun4u/Makefile -# - -include $(SRC)/Makefile.master - -SUBDIRS= lib .WAIT envmon .WAIT \ - frudata grover excalibur psvc littleneck daktari \ - cherrystone lw2plus lw8 taco enchilada chicago blade mpxu ents \ - chalupa silverstone sebring snowbird schumacher seattle boston .WAIT - -MSGSUBDIRS= lib frudata grover excalibur psvc littleneck daktari \ - cherrystone lw2plus lw8 taco enchilada chicago blade envmon mpxu ents \ - silverstone sebring snowbird - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -.KEEP_STATE: - -all install clean clobber: $(SUBDIRS) - -_msg: $(MSGSUBDIRS) - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/blade/Makefile b/usr/src/cmd/picl/plugins/sun4u/blade/Makefile deleted file mode 100644 index 5355a48f59..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/blade/Makefile +++ /dev/null @@ -1,49 +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 -# -# -#ident "%Z%%M% %I% %E% SMI" -# -# Copyright 2002 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# cmd/picl/plugins/sun4u/blade/Makefile -# - -SUBDIRS= devtree frutree frudata bsc fruaccess .WAIT -MSGSUBDIRS= bsc fruaccess - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -.KEEP_STATE: - -all install clean clobber: $(SUBDIRS) - -_msg: $(MSGSUBDIRS) - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/blade/bsc/Makefile b/usr/src/cmd/picl/plugins/sun4u/blade/bsc/Makefile deleted file mode 100644 index 15acdb0c3d..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/blade/bsc/Makefile +++ /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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# cmd/picl/picl/plugins/sun4u/blade/bsc/Makefile -# -include $(SRC)/Makefile.psm - -LIBRARY= libpicllom.a -VERS= .1 - -OBJECTS= picllom.o - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Serverblade1 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -SRCS= $(OBJECTS:%.o=%.c) - -LIBS = $(DYNLIB) - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONF= picllom.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 -INFOS= picllom.info - - -CPPFLAGS += -I$(SRC)/uts/sun4u/ -I$(SRC)/uts/common/ -CPPFLAGS += -I$(SRC)/cmd/picl/plugins/lib/picld_pluginutil -DYNFLAGS += -R/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins -LDLIBS += -L$(SRC)/cmd/picl/plugins/lib/picld_pluginutil/$(MACH) -LDLIBS += -L$(SRC)/lib/libpicltree/$(MACH) -LDLIBS += -L$(SRC)/cmd/picl/plugins/common/piclevent -LDLIBS += -L$(SRC)/cmd/picl/plugins/common/memcfg -LDLIBS += -L$(SRC)/cmd/picl/plugins/common/devtree -LDLIBS += -L$(SRC)/cmd/picl/plugins/common/frutree -LDLIBS += -lpicldevtree -lpiclfrutree -lpicltree -lpicld_pluginutil -LDLIBS += -ldevinfo -lc - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -POFILE = picllom_blade.po -POFILES = $(SRCS:%.c=%.po) - -all: $(LIBS) $(LIBLINKS) $(CONF) - -install: $(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) $(ROOTCONF) - -$(POFILE): $(POFILES) - $(CAT) $(POFILES) > $(POFILE) - -_msg: $(MSGDOMAIN) $(POFILE) - $(RM) $(MSGDOMAIN)/$(POFILE) - $(CP) $(POFILE) $(MSGDOMAIN)/$(POFILE) - -$(MSGDOMAIN): - $(INS.dir) - -$(CONF): $(INFOS) - $(RM) $@ - $(CPP) $(INFOS) | \ - $(SED) -e '/^[ ]*$$/d' -e '/^#/d' > $@ - -$(LIBLINKS): FRC - $(RM) $@; $(SYMLINK) $(DYNLIB) $@ - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: - diff --git a/usr/src/cmd/picl/plugins/sun4u/blade/bsc/picllom.c b/usr/src/cmd/picl/plugins/sun4u/blade/bsc/picllom.c deleted file mode 100644 index 17c6b098af..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/blade/bsc/picllom.c +++ /dev/null @@ -1,1431 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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) 2002, 2010, Oracle and/or its affiliates. All rights reserved. - */ - -/* - * This plugin creates PICL nodes and properties for objects handled through - * the blade support chip (BSC). The BSC Solaris land device driver exposes - * information to the plugin and other clients through an existing LOM - * (Lights Out Management) ioctl interface. The plugin only exercises - * a subset of the interface which is known to be supported by the bsc. - * - * All the nodes which may be accessible through the BSC are included below - * the SUNW,bscv node (class system-controller) in the /platform tree. - * This plugin interrogates the BSC to determine which of - * those nodes are actually available. Properties are added to such nodes and - * in the case of volatile properties like temperature, a call-back function - * is established for on-demand access to the current value. - * - * NOTE: - * Depends on PICL devtree plugin. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "picllom.h" - -static void picllom_register(void); -static void picllom_init(void); -static void picllom_fini(void); -static node_el_t *create_node_el(picl_nodehdl_t nodeh); -static void delete_node_el(node_el_t *pel); -static node_list_t *create_node_list(); -static void delete_node_list_contents(node_list_t *pnl); -static void delete_node_list(node_list_t *pnl); -static void add_node_to_list(picl_nodehdl_t nodeh, - node_list_t *listp); -static void get_node_list_by_class(picl_nodehdl_t nodeh, - const char *classname, node_list_t *listp); -static int get_lom_node(picl_nodehdl_t *lominfh); -static int get_lom_device_path(picl_nodehdl_t *lominfh); -static int get_node_by_name_and_class(picl_nodehdl_t srchnodeh, - const char *nodename, const char *classname, picl_nodehdl_t *chdh); -static int add_regular_prop(picl_nodehdl_t nodeh, const char *name, - int type, int access, int size, const void *valbuf, picl_prophdl_t *prophp); -static int add_volatile_prop(picl_nodehdl_t nodeh, char *name, - int type, int access, int size, ptree_vol_rdfunc_t rdfunc, - ptree_vol_wrfunc_t wrfunc, picl_prophdl_t *prophp); -static int open_lom_rd(int *lom_fd); -static int get_lom_temp(int index, tempr_t *temp_p); -static int update_voltage_stats(); -static int get_lom_volts_status(int index, int *voltsStatus_p); -static int get_lom_volts_shutdown(int index, int *voltsShutdown_p); -static int update_fan_stats(); -static int get_lom_fan_speed(int index, int *fan_speed); -static int read_vol_temp(ptree_rarg_t *parg, void *buf); -static int read_vol_volts_status(ptree_rarg_t *parg, void *buf); -static int read_vol_volts_shutdown(ptree_rarg_t *parg, void *buf); -static int read_fan_speed(ptree_rarg_t *parg, void *buf); -static int read_fan_status(ptree_rarg_t *parg, void *buf); -static int lookup_led_status(int8_t state, const char **string); -static int read_led_status(ptree_rarg_t *parg, void *buf); -static void convert_node_name(char *ptr); -static int add_temp_sensors(int lom_fd, picl_nodehdl_t lominfh); -static int add_voltage_monitors(int lom_fd, - picl_nodehdl_t lominfh); -static int add_fan_nodes(int lom_fd, picl_nodehdl_t lominfh); -static int get_config_file(char *outfilename); - -#pragma init(picllom_register) - -static picld_plugin_reg_t my_reg_info = { - PICLD_PLUGIN_VERSION_1, - PICLD_PLUGIN_NON_CRITICAL, - "SUNW_picllom", - picllom_init, - picllom_fini -}; - -static const char str_OK[] = "OK"; -static const char str_FAIL[] = "FAIL"; -static const char str_On[] = "on"; -static const char str_Off[] = "off"; -static const char str_Enabled[] = "Enabled"; -static const char str_Disabled[] = "Disabled"; -static char lom_device_path[PATH_MAX]; -static tempr_t high_warnings[MAX_TEMPS]; -static tempr_t high_shutdowns[MAX_TEMPS]; -static picl_prophdl_t temp_handles[MAX_TEMPS]; -static lom_fandata_t fandata; -static picl_prophdl_t fan_speed_handles[MAX_FANS]; -static picl_prophdl_t fan_status_handles[MAX_FANS]; -static lom_volts_t voltsdata; -static picl_prophdl_t volts_status_handles[MAX_VOLTS]; -static picl_prophdl_t volts_shutdown_handles[MAX_VOLTS]; -static int n_leds = 0; -static int max_state_size = 0; -static picl_prophdl_t *led_handles = NULL; -static char **led_labels = NULL; -static lom2_info_t info2data; -static struct { - int size; - char *str_colour; -} colour_lkup[1 + LOM_LED_COLOUR_AMBER]; - -static struct { - int8_t state; - char *str_ledstate; -} ledstate_lkup[] = { - { LOM_LED_OFF }, - { LOM_LED_ON }, - { LOM_LED_BLINKING }, -}; - -static node_el_t * -create_node_el(picl_nodehdl_t nodeh) -{ - node_el_t *ptr = malloc(sizeof (node_el_t)); - - if (ptr != NULL) { - ptr->nodeh = nodeh; - ptr->next = NULL; - } - - return (ptr); -} - -static void -delete_node_el(node_el_t *pel) -{ - free(pel); -} - -static node_list_t * -create_node_list() -{ - node_list_t *ptr = malloc(sizeof (node_list_t)); - - if (ptr != NULL) { - ptr->head = NULL; - ptr->tail = NULL; - } - - return (ptr); -} - -static void -delete_node_list_contents(node_list_t *pnl) -{ - node_el_t *pel; - - if (pnl == NULL) - return; - - while ((pel = pnl->head) != NULL) { - pnl->head = pel->next; - delete_node_el(pel); - } - - pnl->tail = NULL; -} - -static void -delete_node_list(node_list_t *pnl) -{ - delete_node_list_contents(pnl); - free(pnl); -} - -/* - * Get a linking element and add handle to end of chain - */ -static void -add_node_to_list(picl_nodehdl_t nodeh, node_list_t *listp) -{ - node_el_t *pel = create_node_el(nodeh); - - if (pel != NULL) { - if (listp->tail == NULL) - listp->head = pel; - else - listp->tail->next = pel; - - listp->tail = pel; - } -} - -/* - * Get a list of nodes of the specified classname under nodeh. - * Once a node of the specified class is found, its children are not - * searched. - */ -static void -get_node_list_by_class(picl_nodehdl_t nodeh, const char *classname, - node_list_t *listp) -{ - int err; - char clname[PICL_CLASSNAMELEN_MAX+1]; - picl_nodehdl_t chdh; - - /* - * go through the children - */ - err = ptree_get_propval_by_name(nodeh, PICL_PROP_CHILD, &chdh, - sizeof (picl_nodehdl_t)); - - while (err == PICL_SUCCESS) { - err = ptree_get_propval_by_name(chdh, PICL_PROP_CLASSNAME, - clname, strlen(classname) + 1); - - if ((err == PICL_SUCCESS) && (strcmp(clname, classname) == 0)) - add_node_to_list(chdh, listp); - else - get_node_list_by_class(chdh, classname, listp); - - err = ptree_get_propval_by_name(chdh, PICL_PROP_PEER, &chdh, - sizeof (picl_nodehdl_t)); - } -} - -static int -get_lom_node(picl_nodehdl_t *lominfh) -{ - int err = PICL_SUCCESS; - node_list_t *listp; - - listp = create_node_list(); - - if ((err = ptree_get_node_by_path(PICL_NODE_ROOT PICL_NODE_PLATFORM, - lominfh)) != PICL_SUCCESS) { - syslog(LOG_ERR, EM_MISSING_NODE, - PICL_NODE_ROOT PICL_NODE_PLATFORM); - return (err); /* no /platform ! */ - } - - get_node_list_by_class(*lominfh, PICL_CLASS_SERVICE_PROCESSOR, listp); - - if (listp->head == NULL) { - *lominfh = 0; - syslog(LOG_ERR, EM_MISSING_NODE, PICL_CLASS_SERVICE_PROCESSOR); - err = PICL_NODENOTFOUND; - } else { - *lominfh = listp->head->nodeh; - - if (listp->head != listp->tail) - syslog(LOG_ERR, EM_LOM_DUPLICATE); - } - - delete_node_list(listp); - return (err); -} - -static int -get_lom_device_path(picl_nodehdl_t *lominfh) -{ - int err = PICL_SUCCESS; - char devfs_path[PATH_MAX]; - char devices_path[PATH_MAX]; - - err = ptree_get_propval_by_name(*lominfh, PICL_PROP_DEVFS_PATH, - devfs_path, sizeof (devfs_path)); - - /* Build up the full device path and set the global */ - strcpy(devices_path, "/devices"); - strcat(devices_path, devfs_path); - strcat(devices_path, LOM_DEV_MINOR_NAME); - strcpy(lom_device_path, devices_path); - - return (err); - -} - - - - -/* - * Look for a node of specified name and class - * Confine search to nodes one level below that of supplied handle - */ -static int -get_node_by_name_and_class(picl_nodehdl_t srchnodeh, const char *nodename, - const char *classname, picl_nodehdl_t *chdh) -{ - int err; - char namebuf[PATH_MAX]; - - err = ptree_get_propval_by_name(srchnodeh, PICL_PROP_CHILD, chdh, - sizeof (picl_nodehdl_t)); - - while (err == PICL_SUCCESS) { - err = ptree_get_propval_by_name(*chdh, PICL_PROP_NAME, namebuf, - sizeof (namebuf)); - if (err != PICL_SUCCESS) - break; - if (strcmp(namebuf, nodename) == 0) { - err = ptree_get_propval_by_name(*chdh, - PICL_PROP_CLASSNAME, namebuf, sizeof (namebuf)); - if ((err == PICL_SUCCESS) && - (strcmp(namebuf, classname) == 0)) - return (PICL_SUCCESS); - } - err = ptree_get_propval_by_name(*chdh, PICL_PROP_PEER, chdh, - sizeof (picl_nodehdl_t)); - } - - return (err); -} - -/* - * Create and add the specified regular property - */ - -static int -add_regular_prop(picl_nodehdl_t nodeh, const char *name, int type, int access, - int size, const void *valbuf, picl_prophdl_t *prophp) -{ - int err; - ptree_propinfo_t propinfo; - picl_prophdl_t proph; - - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - type, access, size, (char *)name, NULL, NULL); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_create_and_add_prop(nodeh, &propinfo, (void *)valbuf, - &proph); - if (err == PICL_SUCCESS && prophp) - *prophp = proph; - return (err); -} - - -/* - * Create and add the specified volatile property - */ -static int -add_volatile_prop(picl_nodehdl_t nodeh, char *name, int type, int access, - int size, ptree_vol_rdfunc_t rdfunc, ptree_vol_wrfunc_t wrfunc, - picl_prophdl_t *prophp) -{ - int err; - ptree_propinfo_t propinfo; - picl_prophdl_t proph; - - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - type, (access|PICL_VOLATILE), size, name, rdfunc, wrfunc); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_create_and_add_prop(nodeh, &propinfo, NULL, &proph); - if (err == PICL_SUCCESS && prophp) - *prophp = proph; - return (err); -} - -/* - * open LOM device to read - */ -static int -open_lom_rd(int *lom_fd) -{ - *lom_fd = open(lom_device_path, O_RDONLY); - - if (*lom_fd < 0) - return (PICL_FAILURE); - - return (PICL_SUCCESS); -} - -/* - * Function to open LOM and read temperature sensor values. - * The index to a specific sensor is supplied and that value returned. - */ -static int -get_lom_temp(int index, tempr_t *temp_p) -{ - lom_temp_t lom_temp; - int lom_fd; - int err; - int res; - - err = open_lom_rd(&lom_fd); - - if (err == PICL_SUCCESS) { - res = ioctl(lom_fd, LOMIOCTEMP, &lom_temp); - (void) close(lom_fd); - - if (res == 0) { - *temp_p = lom_temp.temp[index]; - } else { - err = PICL_FAILURE; - } - } - - return (err); -} - -/* - * Function to open LOM and read voltage monitor values. - * Called for each property, so only perform update if time has changed - */ -static int -update_voltage_stats() -{ - static time_t then = 0; - int lom_fd; - int err; - int res; - time_t now = time(NULL); - - if (now == then) - return (PICL_SUCCESS); - - then = now; - err = open_lom_rd(&lom_fd); - - if (err == PICL_SUCCESS) { - res = ioctl(lom_fd, LOMIOCVOLTS, &voltsdata); - (void) close(lom_fd); - if (res < 0) { - err = PICL_FAILURE; - } - } - - return (err); -} - -/* - * Function to open LOM and read voltage monitor values. - * The index to a specific voltage status is supplied and that value returned. - */ -static int -get_lom_volts_status(int index, int *voltsStatus_p) -{ - int res; - - if ((res = update_voltage_stats()) != PICL_SUCCESS) - return (res); - - *voltsStatus_p = voltsdata.status[index]; - return (PICL_SUCCESS); -} - -/* - * Function to open LOM and read voltage monitor values. - * The index to a specific shutdown flag is supplied and that value returned. - */ -static int -get_lom_volts_shutdown(int index, int *voltsShutdown_p) -{ - int res; - - if ((res = update_voltage_stats()) != PICL_SUCCESS) - return (res); - - *voltsShutdown_p = voltsdata.shutdown_enabled[index]; - return (PICL_SUCCESS); -} - - - -/* - * Function to open LOM and read fan values. - * Called for each property, so only perform update if time has changed - */ -static int -update_fan_stats() -{ - static time_t then = 0; - int lom_fd; - int err; - int res; - time_t now = time(NULL); - - if (now == then) - return (PICL_SUCCESS); - - then = now; - err = open_lom_rd(&lom_fd); - if (err == PICL_SUCCESS) { - res = ioctl(lom_fd, LOMIOCFANSTATE, &fandata); - (void) close(lom_fd); - if (res < 0) { - err = PICL_FAILURE; - } - } - - return (err); -} - - - -/* - * The index to a specific fan is supplied and its speed value returned. - */ -static int -get_lom_fan_speed(int index, int *fan_speed) -{ - int res; - - if ((res = update_fan_stats()) != PICL_SUCCESS) - return (res); - - *fan_speed = fandata.speed[index]; - return (PICL_SUCCESS); -} - - -/* - * Read function for volatile "Temperature" property via LOM - */ -static int -read_vol_temp(ptree_rarg_t *parg, void *buf) -{ - tempr_t temp; - picl_prophdl_t proph; - int index; - - /* - * get the sensor index from the displacement of the - * property handle and get its temperature. - */ - proph = parg->proph; - for (index = 0; index < MAX_TEMPS; index++) { - if (temp_handles[index] == proph) - break; - } - - if (index == MAX_TEMPS) { - /* - * Handle not found. As this is a plugin, stale handles - * cannot occur, so just fail. - */ - return (PICL_FAILURE); - } - - if (get_lom_temp(index, &temp) != PICL_SUCCESS) - return (PICL_FAILURE); - (void) memcpy(buf, (caddr_t)&temp, sizeof (tempr_t)); - return (PICL_SUCCESS); -} - -/* - * Read function for volatile "VoltageStatus" property via LOM - */ -static int -read_vol_volts_status(ptree_rarg_t *parg, void *buf) -{ - int voltsStatus; - picl_prophdl_t proph; - int index; - - /* - * get the voltage monitor index from the displacement of the - * status property handle and get its status. - */ - proph = parg->proph; - - for (index = 0; index < MAX_VOLTS; index++) { - if (volts_status_handles[index] == proph) - break; - } - - if (index == MAX_VOLTS) - return (PICL_FAILURE); - - if (get_lom_volts_status(index, &voltsStatus) != PICL_SUCCESS) - return (PICL_FAILURE); - - (void) strlcpy(buf, (voltsStatus == 0) ? str_OK : str_FAIL, - sizeof (str_FAIL)); - return (PICL_SUCCESS); -} - -/* - * Read function for volatile "VoltageShutdown" property via LOM - */ -static int -read_vol_volts_shutdown(ptree_rarg_t *parg, void *buf) -{ - int voltsShutdown; - picl_prophdl_t proph; - int index; - - /* - * get the voltage monitor index from the displacement of the - * shutdown property handle and get its value. - */ - proph = parg->proph; - - for (index = 0; index < MAX_VOLTS; index++) { - if (volts_shutdown_handles[index] == proph) - break; - } - - if (index == MAX_VOLTS) - return (PICL_FAILURE); - - if (get_lom_volts_shutdown(index, &voltsShutdown) != PICL_SUCCESS) - return (PICL_FAILURE); - - (void) strlcpy(buf, (voltsShutdown == 0) ? str_Disabled : str_Enabled, - sizeof (str_Disabled)); - return (PICL_SUCCESS); -} - - -/* - * Read function for volatile fan speed property via LOM - */ -static int -read_fan_speed(ptree_rarg_t *parg, void *buf) -{ - int fan_speed; - picl_prophdl_t proph; - int index; - - /* - * get the relevant fan from the displacement of its property handle - */ - proph = parg->proph; - - for (index = 0; index < MAX_FANS; index++) { - if (fan_speed_handles[index] == proph) - break; - } - - if (index == MAX_FANS) - return (PICL_FAILURE); - - if (get_lom_fan_speed(index, &fan_speed) != PICL_SUCCESS) - return (PICL_FAILURE); - - (void) memcpy(buf, (caddr_t)&fan_speed, sizeof (fan_speed)); - return (PICL_SUCCESS); -} - -/* - * look up function to convert led status into string - */ -static int -lookup_led_status(int8_t state, const char **string) -{ - int i; - int lim = sizeof (ledstate_lkup) / sizeof (ledstate_lkup[0]); - - for (i = 0; i < lim; i++) { - if (ledstate_lkup[i].state == state) { - *string = ledstate_lkup[i].str_ledstate; - return (PICL_SUCCESS); - } - } - - *string = ""; - switch (state) { - case LOM_LED_ACCESS_ERROR: - return (PICL_PROPVALUNAVAILABLE); - case LOM_LED_NOT_IMPLEMENTED: - /*FALLTHROUGH*/ - case LOM_LED_OUTOFRANGE: - /*FALLTHROUGH*/ - default: - return (PICL_FAILURE); - } -} - -/* - * Read function for volatile led status property. - */ -static int -read_led_status(ptree_rarg_t *parg, void *buf) -{ - lom_led_state_t led_data; - picl_prophdl_t proph; - int index; - int lom_fd; - int res; - const char *string; - - /* - * get the relevant led from the displacement of its property handle - */ - proph = parg->proph; - - for (index = 0; index < n_leds; index++) { - if (led_handles[index] == proph) - break; - } - - if (index == n_leds) - return (PICL_FAILURE); - - res = open_lom_rd(&lom_fd); - if (res != PICL_SUCCESS) - return (res); - /* - * The interface for reading LED status doesn't promise to maintain - * a constant mapping between LED index number and LED identity - * (as defined by its label). On the other hand, PICL does promise - * that whilst a handle remains valid the object it represents will - * remain constant. To reconcile these positions, we maintain - * tables of labels and handles linked by index value. We search - * for the handle with which we are presented and then locate its - * label. Then we request LED entries from the LOM and compare their - * labels with the one we seek. As an optimisation, we try the original - * index value first and then revert to a full search. - */ - (void) memset(&led_data, 0, sizeof (led_data)); - led_data.index = index; - res = ioctl(lom_fd, LOMIOCLEDSTATE, &led_data); - - if (res != 0 || led_data.state == LOM_LED_NOT_IMPLEMENTED || - strcmp(led_data.label, led_labels[index]) != 0) { - /* - * full scan required (bet it doesn't work!) - * first re-establish the range to scan - */ - int i; - int n; - - (void) memset(&led_data, 0, sizeof (led_data)); - led_data.index = -1; - res = ioctl(lom_fd, LOMIOCLEDSTATE, &led_data); - - if (res != 0) { - (void) close(lom_fd); - return (PICL_PROPVALUNAVAILABLE); - } - - if (led_data.state == LOM_LED_NOT_IMPLEMENTED || - strcmp(led_data.label, led_labels[index]) != 0) { - n = led_data.index; - for (i = 0; i < n; i++) { - (void) memset(&led_data, 0, sizeof (led_data)); - led_data.index = i; - res = ioctl(lom_fd, LOMIOCLEDSTATE, &led_data); - - if (res == 0 && - led_data.state != LOM_LED_NOT_IMPLEMENTED || - strcmp(led_data.label, led_labels[index]) == - 0) { - break; - } - } - - if (i == n) { - (void) close(lom_fd); - return (PICL_PROPVALUNAVAILABLE); - } - } - } - - /* - * if we get here, then we found the right LED. - */ - (void) close(lom_fd); - res = lookup_led_status(led_data.state, &string); - (void) strlcpy(buf, string, max_state_size); - return (res); -} - -/* - * Read function for volatile fan status property. - * This is a synthesized property using speed and min speed properties - */ -static int -read_fan_status(ptree_rarg_t *parg, void *buf) -{ - int fan_speed; - picl_prophdl_t proph; - int index; - - /* - * get the relevant fan from the displacement of its property handle - */ - proph = parg->proph; - - for (index = 0; index < MAX_FANS; index++) { - if (fan_status_handles[index] == proph) - break; - } - - if (index == MAX_FANS) - return (PICL_FAILURE); - - if (get_lom_fan_speed(index, &fan_speed) != PICL_SUCCESS) - return (PICL_FAILURE); - - (void) strlcpy(buf, - fan_speed < fandata.minspeed[index] ? str_FAIL : str_OK, - sizeof (str_FAIL)); - return (PICL_SUCCESS); -} - - - -/* - * change to lower case and convert any spaces into hyphens - */ -static void -convert_node_name(char *ptr) -{ - char ch; - - for (ch = *ptr; ch != '\0'; ch = *++ptr) { - if (isupper(ch)) { - *ptr = tolower(ch); - } else if (isspace(ch)) { - *ptr = '-'; - } - } -} - -static int -add_temp_sensors(int lom_fd, picl_nodehdl_t lominfh) -{ - lom_temp_t lom_temp; - int res; - int i; - int err = PICL_SUCCESS; - const char *cptr; - - res = ioctl(lom_fd, LOMIOCTEMP, &lom_temp); - - if ((res == 0) && (lom_temp.num > 0)) { - /* - * for each temperature location add a sensor node - */ - for (i = 0; i < lom_temp.num; i++) { - picl_nodehdl_t tempsensh; - picl_prophdl_t proph; - - high_warnings[i] = lom_temp.warning[i]; - high_shutdowns[i] = lom_temp.shutdown[i]; - - convert_node_name(lom_temp.name[i]); - - err = ptree_create_node(lom_temp.name[i], - PICL_CLASS_TEMPERATURE_SENSOR, &tempsensh); - if (err != PICL_SUCCESS) - break; - - err = add_volatile_prop(tempsensh, - PICL_PROP_TEMPERATURE, PICL_PTYPE_INT, PICL_READ, - sizeof (tempr_t), read_vol_temp, NULL, - &temp_handles[i]); - if (err != PICL_SUCCESS) - break; - - if (high_warnings[i] != 0) { - err = add_regular_prop( - tempsensh, PICL_PROP_HIGH_WARNING, - PICL_PTYPE_INT, PICL_READ, - sizeof (tempr_t), &high_warnings[i], - &proph); - if (err != PICL_SUCCESS) - break; - } - - if (high_shutdowns[i] != 0) { - err = add_regular_prop( - tempsensh, PICL_PROP_HIGH_SHUTDOWN, - PICL_PTYPE_INT, PICL_READ, - sizeof (tempr_t), &high_shutdowns[i], - &proph); - if (err != PICL_SUCCESS) - break; - } - - /* - * for the benefit of prtdiag, add a label of - * either enclosure or die where appropriate - */ - if ((strcasestr(lom_temp.name[i], CPU_ENCLOSURE) != - NULL) || - (strcasestr(lom_temp.name[i], CPU_AMBIENT) != - NULL)) { - cptr = CPU_AMBIENT; - } else if ((cptr = strcasestr(lom_temp.name[i], - CPU_DIE)) != NULL) { - cptr = CPU_DIE; - } - - if (cptr != NULL) { - err = add_regular_prop( - tempsensh, PICL_PROP_LABEL, - PICL_PTYPE_CHARSTRING, PICL_READ, - strlen(cptr) + 1, cptr, &proph); - - if (err != PICL_SUCCESS) { - break; - } - } - - err = ptree_add_node(lominfh, tempsensh); - - if (err != PICL_SUCCESS) - break; - } - - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, EM_LOMINFO_TREE_FAILED); - } - } - - return (err); -} - -static int -add_voltage_monitors(int lom_fd, picl_nodehdl_t lominfh) -{ - int res; - int i; - int err = PICL_SUCCESS; - picl_prophdl_t proph; - - res = ioctl(lom_fd, LOMIOCVOLTS, &voltsdata); - - if ((res == 0) && (voltsdata.num > 0)) { - /* - * for each voltage monitor add a monitor node - */ - for (i = 0; i < voltsdata.num; i++) { - picl_nodehdl_t voltsmonh; - - convert_node_name(voltsdata.name[i]); - - err = ptree_create_node(voltsdata.name[i], - PICL_CLASS_VOLTAGE_INDICATOR, &voltsmonh); - if (err != PICL_SUCCESS) - break; - - err = add_regular_prop(voltsmonh, PICL_PROP_LABEL, - PICL_PTYPE_CHARSTRING, PICL_READ, - strlen(voltsdata.name[i]) + 1, - voltsdata.name[i], &proph); - if (err != PICL_SUCCESS) - break; - - err = add_volatile_prop(voltsmonh, PICL_VOLTS_SHUTDOWN, - PICL_PTYPE_CHARSTRING, PICL_READ, - sizeof (str_Disabled), read_vol_volts_shutdown, - NULL, &volts_shutdown_handles[i]); - if (err != PICL_SUCCESS) - break; - - err = add_volatile_prop(voltsmonh, PICL_PROP_CONDITION, - PICL_PTYPE_CHARSTRING, PICL_READ, - sizeof (str_FAIL), read_vol_volts_status, NULL, - &volts_status_handles[i]); - if (err != PICL_SUCCESS) - break; - - err = ptree_add_node(lominfh, voltsmonh); - - if (err != PICL_SUCCESS) - break; - } - - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, EM_LOMINFO_TREE_FAILED); - } - } - - return (err); -} - -static void -add_led(const lom_led_state_t *led_state, picl_nodehdl_t lominfh) -{ - int err; - picl_nodehdl_t ledh; - picl_nodehdl_t proph; - - if (((unsigned char)led_state->state == LOM_LED_STATE_NOT_PRESENT) || - (led_state->label[0] == '\0')) { - return; - } - - err = ptree_create_node(led_state->label, PICL_CLASS_LED, &ledh); - /* - * the led may exist already, e.g. Fault - */ - if (err != PICL_SUCCESS) - return; - - /* - * Unlike LEDs derived from other interfaces, these are not - * writable. Establish a read-only volatile property. - */ - err = add_volatile_prop(ledh, PICL_PROP_STATE, PICL_PTYPE_CHARSTRING, - PICL_READ, max_state_size, read_led_status, NULL, - &led_handles[led_state->index]); - if (err != PICL_SUCCESS) - return; - - /* - * if colour was defined for this LED, add a colour property - */ - if ((led_state->colour != LOM_LED_COLOUR_NONE) && - (led_state->colour != LOM_LED_COLOUR_ANY)) { - err = add_regular_prop(ledh, PICL_PROP_COLOR, - PICL_PTYPE_CHARSTRING, PICL_READ, - colour_lkup[led_state->index].size, - colour_lkup[led_state->index].str_colour, &proph); - } - if (err != PICL_SUCCESS) - return; - - err = add_regular_prop(ledh, PICL_PROP_LABEL, - PICL_PTYPE_CHARSTRING, PICL_READ, strlen(led_state->label) + 1, - led_state->label, &proph); - if (err != PICL_SUCCESS) - return; - - err = ptree_add_node(lominfh, ledh); - - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, EM_LOMINFO_TREE_FAILED); - } -} - -static void -fixstate(uint8_t state, const char *string, int *max_len) -{ - int i; - int len; - - for (i = 0; i < (sizeof (ledstate_lkup) / sizeof (ledstate_lkup[0])); - i++) { - if (ledstate_lkup[i].state == state) { - free(ledstate_lkup[i].str_ledstate); - ledstate_lkup[i].str_ledstate = strdup(string); - len = strlen(string); - if (len >= *max_len) - *max_len = len + 1; - break; - } - } -} - -static void -add_led_nodes(int lom_fd, picl_nodehdl_t lominfh) -{ - lom_led_state_t led_data; - picl_nodehdl_t ledh; - int res; - int i; - - /* - * If the led state enquiry ioctl is supported, an enquiry on - * index -1 will return the state of the highest supported index - * value. - */ - (void) memset(&led_data, 0, sizeof (led_data)); - led_data.index = -1; - res = ioctl(lom_fd, LOMIOCLEDSTATE, &led_data); - - if (res != 0) - return; - - if (led_labels != NULL) { - for (i = 0; i < n_leds; i++) { - if (led_labels[i] != NULL) { - free(led_labels[i]); - } - } - - free(led_labels); - led_labels = NULL; - } - - if (led_handles != NULL) { - free(led_handles); - } - - n_leds = 0; - led_handles = calloc(led_data.index + 1, sizeof (picl_nodehdl_t)); - led_labels = calloc(led_data.index + 1, sizeof (char *)); - - if ((led_labels == NULL) || (led_handles == NULL)) { - free(led_labels); - free(led_handles); - led_labels = NULL; - led_handles = NULL; - syslog(LOG_ERR, EM_NO_LED_MEM); - return; - } - - n_leds = led_data.index + 1; - - /* - * For each LED with a valid state, add a node - * and because of the ludicrous API, stache a copy of its label too - */ - for (i = 0; i < n_leds; i++) { - (void) memset(&led_data, 0, sizeof (led_data)); - led_data.index = i; - res = ioctl(lom_fd, LOMIOCLEDSTATE, &led_data); - - if (res != 0) - continue; - - if (led_data.state == LOM_LED_OUTOFRANGE || - led_data.state == LOM_LED_NOT_IMPLEMENTED) - continue; - - - led_labels[i] = strdup(led_data.label); - convert_node_name(led_data.label); - - if (get_node_by_name_and_class(lominfh, led_data.label, - "led", &ledh) != PICL_SUCCESS) { - /* - * only add a new led node, - * if it's not already in place - */ - add_led(&led_data, lominfh); - } - } -} - -static int -add_fan_nodes(int lom_fd, picl_nodehdl_t lominfh) -{ - int res; - int i; - int err = PICL_SUCCESS; - - res = ioctl(lom_fd, LOMIOCFANSTATE, &fandata); - - if (res == 0) { - /* - * fan data available through lom, remove any placeholder - * fan-unit nodes, they will be superseded via lom.conf - */ - char path[80]; - int slot; - picl_nodehdl_t fan_unit_h; - - for (slot = 0; slot < MAX_FANS; slot++) { - (void) snprintf(path, sizeof (path), - "/frutree/chassis/fan-slot?Slot=%d/fan-unit", slot); - if (ptree_get_node_by_path(path, &fan_unit_h) != - PICL_SUCCESS) - continue; - if (ptree_delete_node(fan_unit_h) != PICL_SUCCESS) - continue; - (void) ptree_destroy_node(fan_unit_h); - } - /* - * see if fan names can be obtained - */ - (void) memset(&info2data, 0, sizeof (info2data)); - /* - * if LOMIOCINFO2 not supported, names area - * will remain empty - */ - (void) ioctl(lom_fd, LOMIOCINFO2, &info2data); - - /* - * for each fan which is present, add a fan node - */ - for (i = 0; i < MAX_FANS; i++) { - char fanname[80]; - picl_nodehdl_t fanh; - picl_nodehdl_t proph; - - if (fandata.fitted[i] == 0) - continue; - - if (info2data.fan_names[i][0] == '\0') { - (void) snprintf(fanname, sizeof (fanname), - "fan%d", i + 1); - } else { - (void) strlcpy(fanname, info2data.fan_names[i], - sizeof (fanname)); - } - convert_node_name(fanname); - err = ptree_create_node(fanname, PICL_CLASS_FAN, &fanh); - if (err != PICL_SUCCESS) - break; - - err = add_volatile_prop(fanh, PICL_PROP_FAN_SPEED, - PICL_PTYPE_INT, PICL_READ, sizeof (int), - read_fan_speed, NULL, &fan_speed_handles[i]); - if (err != PICL_SUCCESS) - break; - - err = add_regular_prop(fanh, PICL_PROP_LOW_WARNING, - PICL_PTYPE_INT, PICL_READ, sizeof (int), - &fandata.minspeed[i], &proph); - if (err != PICL_SUCCESS) - break; - - err = add_regular_prop(fanh, PICL_PROP_FAN_SPEED_UNIT, - PICL_PTYPE_CHARSTRING, PICL_READ, sizeof ("%"), - "%", &proph); - if (err != PICL_SUCCESS) - break; - - err = add_volatile_prop(fanh, PICL_PROP_CONDITION, - PICL_PTYPE_CHARSTRING, PICL_READ, - sizeof (str_FAIL), read_fan_status, NULL, - &fan_status_handles[i]); - if (err != PICL_SUCCESS) - break; - - /* - * add a label for prtdiag - */ - err = add_regular_prop(fanh, PICL_PROP_LABEL, - PICL_PTYPE_CHARSTRING, PICL_READ, - strlen(fanname) + 1, fanname, &proph); - if (err != PICL_SUCCESS) - break; - - err = ptree_add_node(lominfh, fanh); - if (err != PICL_SUCCESS) - break; - } - - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, EM_LOMINFO_TREE_FAILED); - } - } - - return (err); -} - -static void -setup_strings() -{ - /* - * initialise led colours lookup - */ - int i; - int lim = sizeof (colour_lkup) / sizeof (colour_lkup[0]); - - for (i = 0; i < lim; i++) { - free(colour_lkup[i].str_colour); - } - - colour_lkup[LOM_LED_COLOUR_ANY].str_colour = strdup(gettext("any")); - colour_lkup[LOM_LED_COLOUR_WHITE].str_colour = strdup(gettext("white")); - colour_lkup[LOM_LED_COLOUR_BLUE].str_colour = strdup(gettext("blue")); - colour_lkup[LOM_LED_COLOUR_GREEN].str_colour = strdup(gettext("green")); - colour_lkup[LOM_LED_COLOUR_AMBER].str_colour = strdup(gettext("amber")); - - for (i = 0; i < lim; i++) { - if (colour_lkup[i].str_colour != NULL) - colour_lkup[i].size = - 1 + strlen(colour_lkup[i].str_colour); - } - - /* - * initialise led state lookup strings - */ - fixstate(LOM_LED_OFF, gettext("off"), &max_state_size); - fixstate(LOM_LED_ON, gettext("on"), &max_state_size); - fixstate(LOM_LED_BLINKING, gettext("blinking"), &max_state_size); -} - -/* - * The size of outfilename must be PATH_MAX - */ -static int -get_config_file(char *outfilename) -{ - char nmbuf[SYS_NMLN]; - char pname[PATH_MAX]; - - if (sysinfo(SI_PLATFORM, nmbuf, sizeof (nmbuf)) != -1) { - (void) snprintf(pname, PATH_MAX, PICLD_PLAT_PLUGIN_DIRF, nmbuf); - (void) strlcat(pname, LOM_CONFFILE_NAME, PATH_MAX); - if (access(pname, R_OK) == 0) { - (void) strlcpy(outfilename, pname, PATH_MAX); - return (0); - } - } - - if (sysinfo(SI_MACHINE, nmbuf, sizeof (nmbuf)) != -1) { - (void) snprintf(pname, PATH_MAX, PICLD_PLAT_PLUGIN_DIRF, nmbuf); - (void) strlcat(pname, LOM_CONFFILE_NAME, PATH_MAX); - if (access(pname, R_OK) == 0) { - (void) strlcpy(outfilename, pname, PATH_MAX); - return (0); - } - } - - (void) snprintf(pname, PATH_MAX, "%s/%s", PICLD_COMMON_PLUGIN_DIR, - LOM_CONFFILE_NAME); - - if (access(pname, R_OK) == 0) { - (void) strlcpy(outfilename, pname, PATH_MAX); - return (0); - } - - return (-1); -} - - - -/* - * executed as part of .init when the plugin is dlopen()ed - */ -static void -picllom_register(void) -{ - (void) picld_plugin_register(&my_reg_info); -} - -/* - * Init entry point of the plugin - * Creates the PICL nodes and properties in the physical and logical aspects. - */ -static void -picllom_init(void) -{ - picl_nodehdl_t rooth; - picl_nodehdl_t plfh; - picl_nodehdl_t lominfh; - int lom_fd; - char fullfilename[PATH_MAX]; - - /* - * Get platform node - */ - if (ptree_get_node_by_path(PICL_NODE_ROOT PICL_NODE_PLATFORM, &plfh) - != PICL_SUCCESS) { - syslog(LOG_ERR, EM_MISSING_NODE, PICL_NODE_PLATFORM); - syslog(LOG_ERR, EM_INIT_FAILED); - return; - } - - /* - * Get lom node - */ - if (get_lom_node(&lominfh) != PICL_SUCCESS) { - syslog(LOG_ERR, EM_LOM_NODE_MISSING); - syslog(LOG_ERR, EM_INIT_FAILED); - return; - } - - /* - * Retrive the device path to open - */ - if (get_lom_device_path(&lominfh) < 0) { - syslog(LOG_ERR, EM_INIT_FAILED); - return; - } - - /* - * Open LOM device and interrogate for devices it monitors - */ - if ((lom_fd = open(lom_device_path, O_RDONLY)) < 0) { - syslog(LOG_ERR, EM_SYS_ERR, lom_device_path, strerror(errno)); - return; - } - - setup_strings(); - (void) add_temp_sensors(lom_fd, lominfh); - (void) add_voltage_monitors(lom_fd, lominfh); - (void) add_fan_nodes(lom_fd, lominfh); - add_led_nodes(lom_fd, lominfh); - - - if (get_config_file(fullfilename) < 0) { - (void) close(lom_fd); - syslog(LOG_ERR, EM_NO_CONFIG); - return; - } - - if (ptree_get_root(&rooth) != PICL_SUCCESS) { - (void) close(lom_fd); - return; - } - - if (picld_pluginutil_parse_config_file(rooth, fullfilename) != - PICL_SUCCESS) - syslog(LOG_ERR, EM_INIT_FAILED); - - (void) close(lom_fd); -} - -/* - * fini entry point of the plugin - */ -static void -picllom_fini(void) -{ -} diff --git a/usr/src/cmd/picl/plugins/sun4u/blade/bsc/picllom.h b/usr/src/cmd/picl/plugins/sun4u/blade/bsc/picllom.h deleted file mode 100644 index 193eef2c76..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/blade/bsc/picllom.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, 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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _PICLLOM_H -#define _PICLLOM_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Log message texts - */ -#define EM_INIT_FAILED gettext("SUNW_picllom: init failed!\n") -#define EM_MISSING_NODE gettext("SUNW_picllom: no %s node!\n") -#define EM_LOM_MISSING \ - gettext("SUNW_picllom: Lights Out Module missing!\n") -#define EM_LOM_NODE_MISSING \ - gettext("SUNW_picllom: failed to locate LOM device node\n") -#define EM_LOM_DUPLICATE \ - gettext("SUNW_picllom: more than one LOM device node found\n") -#define EM_CREATE_FAILED \ - gettext("SUNW_picllom: failed to create %s node\n") -#define EM_NO_LED_MEM \ - gettext("SUNW_picllom: couldn't get memory for LED nodes\n") -#define EM_LOMINFO_TREE_FAILED \ - gettext("SUNW_picllom: failed to initialize lom nodes\n") -#define EM_SYS_ERR gettext("SUNW_picllom: %s: %s\n") -#define EM_NO_CONFIG \ - gettext("SUNW_picllom: no config file picllom.conf") - -/* - * define for super-user uid - used in credential checking - */ -#define SUPER_USER ((uid_t)0) - -/* - * CPU temperature sensor labels - * prtdiag relies on the labels "ambient" and "die" when reporting CPU temp. - */ -#define CPU_ENCLOSURE "Enclosure" -#define CPU_AMBIENT "Ambient" -#define CPU_DIE "Die" - -/* - * Constants for some PICL properties - */ -#define PICL_VOLTS_SHUTDOWN "VoltageShutdown" - -/* - * Config file name - */ -#define LOM_CONFFILE_NAME "picllom.conf" - -/* - * lom device mnior name - */ -#define LOM_DEV_MINOR_NAME ":lom" - -typedef int16_t tempr_t; - -typedef int (*ptree_vol_rdfunc_t)(ptree_rarg_t *arg, void *buf); -typedef int (*ptree_vol_wrfunc_t)(ptree_warg_t *arg, const void *buf); - -typedef struct node_el { - picl_nodehdl_t nodeh; - struct node_el *next; -} node_el_t; - -typedef struct node_list { - node_el_t *head; - node_el_t *tail; -} node_list_t; - -#ifdef __cplusplus -} -#endif - -#endif /* _PICLLOM_H */ diff --git a/usr/src/cmd/picl/plugins/sun4u/blade/bsc/picllom.info b/usr/src/cmd/picl/plugins/sun4u/blade/bsc/picllom.info deleted file mode 100644 index 06f97f5076..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/blade/bsc/picllom.info +++ /dev/null @@ -1,179 +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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ -VERSION 1.1 -VERBOSE 1 - -/* Add a fan fru if the cpu fan node is present to the fan slot */ -name:/frutree/chassis/system-board/fan-slot?Slot=0 -REFNODE cpu-fan fru WITH name:/platform/pci/isa/bscbus/bscv/cpu_fan?_class=fan - -/* Add _fru_parent and Environment tables from cpu nodes */ -name:/platform/SUNW,UltraSPARC-IIe@0,0 -REFPROP _fru_parent name:/frutree/chassis/system-board/cpu-slot?Slot=0/cpu-module -TABLE Environment -ROW -PROP Class string r 0 "temperature-sensor" -REFPROP _temperature-sensor_ name:/platform/pci/isa/bscbus/bscv/cpu-die?_class=temperature-sensor -ENDROW -ROW -PROP Class string r 0 "temperature-sensor" -REFPROP _temperature-sensor_ name:/platform/pci/isa/bscbus/bscv/enclosure?_class=temperature-sensor -ENDROW -ROW -PROP Class string r 0 "fan" -REFPROP _fan_ name:/platform/pci/isa/bscbus/bscv/cpu_fan?_class=fan -ENDROW -ENDTABLE - - -/* Set the colour property of the leds */ -name:/platform/pci/isa/bscbus/bscv/active?_class=led -PROP Color string r 0 "green" -name:/platform/pci/isa/bscbus/bscv/svc_reqd?_class=led -PROP Color string r 0 "amber" -name:/platform/pci/isa/bscbus/bscv/rdy_to_rmv?_class=led -PROP Color string r 0 "blue" - -/* Add Devices tables from fru nodes to platform tree counterparts */ - -name:/frutree/chassis -TABLE Devices -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:/platform/pci/isa/bscbus/bscv/active?_class=led -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:/platform/pci/isa/bscbus/bscv/svc_reqd?_class=led -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:/platform/pci/isa/bscbus/bscv/rdy_to_rmv?_class=led -ENDROW -ENDTABLE - - -name:/frutree/chassis/system-board -TABLE Devices -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:/platform/pci/isa/bscbus/bscv/5v?_class=voltage-indicator -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:/platform/pci/isa/bscbus/bscv/3.3v?_class=voltage-indicator -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:/platform/pci/isa/bscbus/bscv/2.5v?_class=voltage-indicator -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:/platform/pci/isa/bscbus/bscv/vcore?_class=voltage-indicator -ENDROW -ENDTABLE - - -name:/frutree/chassis/system-board/fan-slot?Slot=0/cpu-fan -TABLE Devices -ROW -PROP Class string r 0 "fan" -REFPROP _fan_ name:/platform/pci/isa/bscbus/bscv/cpu_fan?_class=fan -ENDROW -ENDTABLE - - -name:/frutree/chassis/system-board/cpu-slot?Slot=0/cpu-module -Table Devices -ROW -PROP Class string r 0 "temperature-sensor" -REFPROP _temperature-sensor_ name:/platform/pci/isa/bscbus/bscv/cpu-die?_class=temperature-sensor -ENDROW -ROW -PROP Class string r 0 "temperature-sensor" -REFPROP _temperature-sensor_ name:/platform/pci/isa/bscbus/bscv/enclosure?_class=temperature-sensor -ENDROW -ENDTABLE - - -/* now link back with _fru_parents */ - -name:/platform/pci/isa/bscbus/bscv/cpu_fan?_class=fan -REFPROP _fru_parent name:/frutree/chassis/system-board/fan-slot?Slot=0/cpu-fan - -name:/platform/pci/isa/bscbus/bscv/cpu-die?_class=temperature-sensor -REFPROP _fru_parent name:/frutree/chassis/system-board/cpu-slot?Slot=0/cpu-module -name:/platform/pci/isa/bscbus/bscv/enclosure?_class=temperature-sensor -REFPROP _fru_parent name:/frutree/chassis/system-board/cpu-slot?Slot=0/cpu-module - -name:/platform/pci/isa/bscbus/bscv/5v?_class=voltage-indicator -REFPROP _fru_parent name:/frutree/chassis/system-board -name:/platform/pci/isa/bscbus/bscv/3.3v?_class=voltage-indicator -REFPROP _fru_parent name:/frutree/chassis/system-board -name:/platform/pci/isa/bscbus/bscv/2.5v?_class=voltage-indicator -REFPROP _fru_parent name:/frutree/chassis/system-board -name:/platform/pci/isa/bscbus/bscv/vcore?_class=voltage-indicator -REFPROP _fru_parent name:/frutree/chassis/system-board - -name:/platform/pci/isa/bscbus/bscv/active?_class=led -REFPROP _fru_parent name:/frutree/chassis -name:/platform/pci/isa/bscbus/bscv/svc_reqd?_class=led -REFPROP _fru_parent name:/frutree/chassis -name:/platform/pci/isa/bscbus/bscv/rdy_to_rmv?_class=led -REFPROP _fru_parent name:/frutree/chassis - diff --git a/usr/src/cmd/picl/plugins/sun4u/blade/devtree/Makefile b/usr/src/cmd/picl/plugins/sun4u/blade/devtree/Makefile deleted file mode 100644 index 5b54ddc077..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/blade/devtree/Makefile +++ /dev/null @@ -1,62 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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. -# -# cmd/picl/plugins/sun4u/blade/devtree/Makefile -# -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Serverblade1 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONF= picldevtree.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: - -install: $(ROOTLIBDIR) $(ROOTCONF) - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/blade/devtree/picldevtree.conf b/usr/src/cmd/picl/plugins/sun4u/blade/devtree/picldevtree.conf deleted file mode 100644 index f3e98dac57..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/blade/devtree/picldevtree.conf +++ /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 2002 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -#ident "%Z%%M% %I% %E% SMI" -# -# Platform specific .conf file for picldevtree plug-in -bscv service-processor diff --git a/usr/src/cmd/picl/plugins/sun4u/blade/fruaccess/Makefile b/usr/src/cmd/picl/plugins/sun4u/blade/fruaccess/Makefile deleted file mode 100644 index 9ce87087c7..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/blade/fruaccess/Makefile +++ /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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# cmd/picl/plugins/sun4u/blade/fruaccess/Makefile -# -LIBRARY= libfruaccess.a -VERS= .1 -OBJECTS= fru_access.o crcutils.o crcmodel.o - -# include library definitions -include $(SRC)/Makefile.psm -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Serverblade1 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -SRCS= fru_access.c ../../lib/fruaccess/crcutils.c \ - ../../lib/fruaccess/crcmodel.c - -SRCDIR= ../../lib/fruaccess/. - -LIBS= $(DYNLIB) - -ROOTLIBDIR = $(ROOT_PLATFORM)/lib - -CONF = fru_container.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 - -CLOBBERFILES += $(LIBLINKS) -CSTYLE = cstyle -p -P -HDRCHK = hdrchk - - -CPPFLAGS += -I$(SRC)/lib/libfru/include -CPPFLAGS += -I$(SRC)/lib/libfruutils/ -CPPFLAGS += -I$(SRC)/cmd/picl/plugins/sun4u/lib/fruaccess -CFLAGS += -DBIG_ENDIAN -LDLIBS += -L$(SRC)/lib/libfruutils/$(MACH) -LDLIBS += -lc -lpicltree -lfruutils -LDLIBS += -ldevinfo -LDLIBS += -Wl,-f/opt/SUNWSMS/lib/$(DYNLIBPSR) # SMS before platform -LDLIBS += -Wl,-f/usr/platform/\$$PLATFORM/lib/$(DYNLIBPSR) - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -LN = ln -s - -POFILE= $(LIBRARY:.a=.po) - -all: $(DYNLIB) $(LIBLINKS) $(CONF) - -install: $(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) $(ROOTCONF) - -_msg: $(MSGDOMAIN) $(POFILE) - $(RM) $(MSGDOMAIN)/$(POFILE) - $(CP) $(POFILE) $(MSGDOMAIN) - -$(POFILE): - $(RM) $@ messages.po - $(XGETTEXT) $(XGETFLAGS) *.[ch]* */*.[ch]* - $(SED) -e '/^# msg/d' -e '/^domain/d' messages.po > $@ - $(RM) messages.po - -$(MSGDOMAIN): - $(INS.dir) - -$(LIBLINKS): FRC - $(RM) $@; $(SYMLINK) $(DYNLIB) $@ - -check-style: - $(CSTYLE) *.cc *.c *.h - $(HDRCHK) *.h - -# include library targets -include $(SRC)/cmd/picl/plugins/Makefile.targ -include $(SRC)/lib/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/blade/fruaccess/fru_access.c b/usr/src/cmd/picl/plugins/sun4u/blade/fruaccess/fru_access.c deleted file mode 100644 index 5eb01b4ec6..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/blade/fruaccess/fru_access.c +++ /dev/null @@ -1,2746 +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 -#include -#include "fru_access_impl.h" - -#pragma init(initialize_fruaccess) /* .init section */ - -static hash_obj_t *hash_table[TABLE_SIZE]; - -/* - * seeprom is the driver_name for the SEEPROM device drivers in excalibur - * Define the devfsadm command to load the seeprom drivers if open fails. - */ - -static char devfsadm_cmd[] = "/usr/sbin/devfsadm -i seeprom"; - -/* this routine initialize the hash table. */ - -static void -initialize_fruaccess(void) -{ - int count; - for (count = 0; count < TABLE_SIZE; count++) { - hash_table[count] = NULL; - } -} - -/* - * called to lookup hash object for specified handle in the hash table. - * - */ - -static hash_obj_t * -lookup_handle_object(handle_t handle, int object_type) -{ - handle_t index_to_hash; - hash_obj_t *first_hash_obj; - hash_obj_t *next_hash_obj; - - index_to_hash = (handle % TABLE_SIZE); - - first_hash_obj = hash_table[index_to_hash]; - for (next_hash_obj = first_hash_obj; next_hash_obj != NULL; - next_hash_obj = next_hash_obj->next) { - if ((handle == next_hash_obj->obj_hdl) && - (object_type == next_hash_obj->object_type)) { - return (next_hash_obj); - } - } - return (NULL); -} - -/* called to allocate container hash object */ - -static hash_obj_t * -create_container_hash_object(void) -{ - hash_obj_t *hash_obj; - container_obj_t *cont_obj; - - cont_obj = malloc(sizeof (container_obj_t)); - if (cont_obj == NULL) { - return (NULL); - } - - hash_obj = malloc(sizeof (hash_obj_t)); - if (hash_obj == NULL) { - free(cont_obj); - return (NULL); - } - - cont_obj->sec_obj_list = NULL; - - hash_obj->object_type = CONTAINER_TYPE; - hash_obj->u.cont_obj = cont_obj; - hash_obj->next = NULL; - hash_obj->prev = NULL; - - return (hash_obj); -} - -/* called to allocate section hash object */ - -static hash_obj_t * -create_section_hash_object(void) -{ - hash_obj_t *hash_obj; - section_obj_t *sec_obj; - - sec_obj = malloc(sizeof (section_obj_t)); - if (sec_obj == NULL) { - return (NULL); - } - - hash_obj = malloc(sizeof (hash_obj_t)); - if (hash_obj == NULL) { - free(sec_obj); - return (NULL); - } - - sec_obj->next = NULL; - sec_obj->seg_obj_list = NULL; - - hash_obj->u.sec_obj = sec_obj; - hash_obj->object_type = SECTION_TYPE; - hash_obj->next = NULL; - hash_obj->prev = NULL; - - return (hash_obj); -} - -/* called to allocate segment hash object */ - -static hash_obj_t * -create_segment_hash_object(void) -{ - hash_obj_t *hash_obj; - segment_obj_t *seg_obj; - - seg_obj = malloc(sizeof (segment_obj_t)); - if (seg_obj == NULL) { - return (NULL); - } - - hash_obj = malloc(sizeof (hash_obj_t)); - if (hash_obj == NULL) { - free(seg_obj); - return (NULL); - } - - seg_obj->next = NULL; - seg_obj->pkt_obj_list = NULL; - - hash_obj->object_type = SEGMENT_TYPE; - hash_obj->u.seg_obj = seg_obj; - hash_obj->next = NULL; - hash_obj->prev = NULL; - - return (hash_obj); -} - -/* called to allocate packet hash object */ - -static hash_obj_t * -create_packet_hash_object(void) -{ - hash_obj_t *hash_obj; - packet_obj_t *pkt_obj; - - pkt_obj = malloc(sizeof (packet_obj_t)); - if (pkt_obj == NULL) { - return (NULL); - } - - hash_obj = malloc(sizeof (hash_obj_t)); - if (hash_obj == NULL) { - free(pkt_obj); - return (NULL); - } - - pkt_obj->next = NULL; - - hash_obj->object_type = PACKET_TYPE; - hash_obj->u.pkt_obj = pkt_obj; - hash_obj->next = NULL; - hash_obj->prev = NULL; - - return (hash_obj); -} - -/* called to add allocated hash object into the hash table */ - -static void -add_hashobject_to_hashtable(hash_obj_t *hash_obj) -{ - handle_t index_to_hash; - static uint64_t handle_count = 0; - - hash_obj->obj_hdl = ++handle_count; /* store the handle */ - - /* where to add ? */ - index_to_hash = ((hash_obj->obj_hdl) % TABLE_SIZE); - - hash_obj->next = hash_table[index_to_hash]; - hash_table[index_to_hash] = hash_obj; /* hash obj. added */ - - if (hash_obj->next != NULL) { - hash_obj->next->prev = hash_obj; - } -} - -/* called to add section object list into the section list */ - -static void -add_to_sec_object_list(hash_obj_t *parent_obj, hash_obj_t *child_obj) -{ - hash_obj_t *next_hash; - - child_obj->u.sec_obj->cont_hdl = parent_obj->obj_hdl; - if (parent_obj->u.cont_obj->sec_obj_list == NULL) { - parent_obj->u.cont_obj->sec_obj_list = child_obj; - return; - } - - for (next_hash = parent_obj->u.cont_obj->sec_obj_list; - next_hash->u.sec_obj->next != NULL; - next_hash = next_hash->u.sec_obj->next) { - ; - } - - next_hash->u.sec_obj->next = child_obj; -} - -/* called to add segment object list into segment list */ - -static void -add_to_seg_object_list(hash_obj_t *parent_obj, hash_obj_t *child_obj) -{ - hash_obj_t *next_hash; - - child_obj->u.seg_obj->section_hdl = parent_obj->obj_hdl; - if (parent_obj->u.sec_obj->seg_obj_list == NULL) { - parent_obj->u.sec_obj->seg_obj_list = child_obj; - return; - } - - for (next_hash = parent_obj->u.sec_obj->seg_obj_list; - next_hash->u.seg_obj->next != NULL; - next_hash = next_hash->u.seg_obj->next) { - ; - } - - next_hash->u.seg_obj->next = child_obj; -} - -/* called to add packet object list into packet list */ - -static void -add_to_pkt_object_list(hash_obj_t *parent_obj, hash_obj_t *child_obj) -{ - hash_obj_t *next_hash; - - /* add the packet object in the end of list */ - child_obj->u.pkt_obj->segment_hdl = parent_obj->obj_hdl; - - if (parent_obj->u.seg_obj->pkt_obj_list == NULL) { - parent_obj->u.seg_obj->pkt_obj_list = child_obj; - return; - } - - for (next_hash = parent_obj->u.seg_obj->pkt_obj_list; - next_hash->u.pkt_obj->next != NULL; - next_hash = next_hash->u.pkt_obj->next) { - ; - } - - next_hash->u.pkt_obj->next = child_obj; -} - -static void -copy_segment_layout(segment_t *seghdr, void *layout) -{ - segment_layout_t *seg_layout; - - seg_layout = (segment_layout_t *)layout; - (void) memcpy(seghdr->name, &seg_layout->name, SEG_NAME_LEN); - seghdr->descriptor = GET_SEGMENT_DESCRIPTOR; - seghdr->offset = seg_layout->offset; - seghdr->length = seg_layout->length; -} - -static hash_obj_t * -get_container_hash_object(int object_type, handle_t handle) -{ - hash_obj_t *hash_obj; - - switch (object_type) { - case CONTAINER_TYPE : - break; - case SECTION_TYPE : - hash_obj = lookup_handle_object(handle, CONTAINER_TYPE); - if (hash_obj == NULL) { - return (NULL); - } - break; - case SEGMENT_TYPE : - hash_obj = lookup_handle_object(handle, SECTION_TYPE); - if (hash_obj == NULL) { - return (NULL); - } - hash_obj = lookup_handle_object(hash_obj->u.sec_obj->cont_hdl, - CONTAINER_TYPE); - break; - case PACKET_TYPE : - break; - default : - return (NULL); - } - return (hash_obj); -} - - -static void -sort_offsettbl(int segcnt, seg_info_t *offset_tbl) -{ - int cntx; - int cnty; - seg_info_t tmp; - - for (cntx = 0; cntx < segcnt+2; cntx++) { - for (cnty = cntx+1; cnty < segcnt + 2; cnty++) { - if (offset_tbl[cntx].offset > - offset_tbl[cnty].offset) { - (void) memcpy(&tmp, &offset_tbl[cnty], - sizeof (seg_info_t)); - (void) memcpy(&offset_tbl[cnty], - &offset_tbl[cntx], sizeof (seg_info_t)); - - (void) memcpy(&offset_tbl[cntx], &tmp, - sizeof (seg_info_t)); - } - } - } -} - -/* - * Description : move_segment_data() reads the segment data and writes it - * back to the new segment offset. - */ - -static void -move_segment_data(void *seghdr, int newoffset, container_hdl_t contfd) -{ - int ret; - char *buffer; - segment_layout_t *segment; - - segment = (segment_layout_t *)seghdr; - - buffer = alloca(segment->length); - if (buffer == NULL) { - return; - } - - ret = pread(contfd, buffer, - segment->length, segment->offset); - if (ret != segment->length) { - return; - } - - segment->offset = newoffset; - - ret = pwrite(contfd, buffer, segment->length, segment->offset); - if (ret != segment->length) { - return; - } -} - -/* - * Description : pack_segment_data() moves the segment data if there is - * a hole between two segments. - */ - -static void -pack_segment_data(char *seghdr, int segcnt, container_hdl_t contfd, - seg_info_t *offset_tbl) -{ - int cnt; - int diff; - int newoffset; - - for (cnt = segcnt + 1; cnt > 0; cnt--) { - if (!offset_tbl[cnt - 1].fixed) { - if (offset_tbl[cnt].offset - - (offset_tbl[cnt -1 ].offset - + offset_tbl[cnt - 1].length) > 0) { - - diff = offset_tbl[cnt].offset - - (offset_tbl[cnt - 1].offset - + offset_tbl[cnt - 1].length); - newoffset = offset_tbl[cnt - 1].offset - + diff; - - move_segment_data(seghdr, newoffset, - contfd); - - offset_tbl[cnt - 1].offset = newoffset; - - sort_offsettbl(segcnt, offset_tbl); - } - } - } -} - -/* - * Description : build_offset_tbl() builds the offset table by reading all the - * segment header. it makes two more entry into the table one for - * section size and another with start of the section after the - * segment header. - */ - -static int -build_offset_tbl(void *seghdr, int segcnt, int secsize, - seg_info_t *offset_tbl) -{ - int cnt; - fru_segdesc_t segdesc; - segment_layout_t *segment; - - for (cnt = 0; cnt < segcnt; cnt++) { - segment = (segment_layout_t *)(seghdr) + cnt; - - (void) memcpy(&segdesc, &segment->descriptor, - sizeof (uint32_t)); - offset_tbl[cnt].segnum = cnt; - offset_tbl[cnt].offset = segment->offset; - offset_tbl[cnt].length = segment->length; - offset_tbl[cnt].fixed = segdesc.field.fixed; - } - - /* upper boundary of segment area (lower address bytes) */ - offset_tbl[cnt].segnum = -1; - offset_tbl[cnt].offset = sizeof (section_layout_t) + ((cnt + 1) - * sizeof (segment_layout_t)); - - offset_tbl[cnt].length = 0; - offset_tbl[cnt].fixed = 1; - /* lower boundary of segment area (higher address bytes) */ - - offset_tbl[cnt+1].segnum = -1; - offset_tbl[cnt+1].offset = secsize; - offset_tbl[cnt+1].length = 0; - offset_tbl[cnt+1].fixed = 1; - return (0); -} - -static int -hole_discovery(int bytes, int segcnt, int *totsize, seg_info_t *offset_tbl) -{ - int cnt = 0; - - *totsize = 0; - for (cnt = segcnt + 1; cnt > 0; cnt--) { - if (bytes <= offset_tbl[cnt].offset - - (offset_tbl[cnt - 1].offset + - offset_tbl[cnt - 1].length)) { - return (offset_tbl[cnt].offset - bytes); - } - - *totsize += offset_tbl[cnt].offset - - (offset_tbl[cnt - 1].offset + - offset_tbl[cnt - 1].length); - } - return (0); -} - - -/* - * Description : segment_hdr_present() verify space for new segment header to - * be added. - */ - -static int -segment_hdr_present(int segoffset, int size, seg_info_t *offset_tbl) -{ - if ((segoffset + size) <= offset_tbl[0].offset) - return (0); - else - return (-1); -} - -/* - * Description : find_offset() is called from fru_add_segment routine to find - * a valid offset. - */ - -static int -find_offset(char *seghdr, int segcnt, int secsize, int *sectionoffset, - int segsize, int fix, container_hdl_t contfd) -{ - int ret; - int newoffset; - int totsize = 0; - seg_info_t *offset_tbl; - - if (segcnt == 0) { - if (!fix) { /* if not fixed segment */ - *sectionoffset = secsize - segsize; - } - return (0); - } - - /* - * two extra segment info structure are allocated for start of segment - * and other end of segment. first segment offset is first available - * space and length is 0. second segment offset is is segment length and - * offset is 0. build_offset_tbl() explains how upper boundary and lower - * boudary segment area are initialized in seg_info_t table. - */ - - offset_tbl = malloc((segcnt + 2) * sizeof (seg_info_t)); - if (offset_tbl == NULL) { - return (-1); - } - - /* read all the segment header to make offset table */ - ret = build_offset_tbl(seghdr, segcnt, secsize, offset_tbl); - if (ret != 0) { - free(offset_tbl); - return (-1); - } - - /* sort the table */ - sort_offsettbl(segcnt, offset_tbl); - - /* new segment header offset */ - newoffset = sizeof (section_layout_t) + segcnt * - sizeof (segment_layout_t); - - /* do? new segment header overlap any existing data */ - ret = segment_hdr_present(newoffset, sizeof (segment_layout_t), - offset_tbl); - if (ret != 0) { /* make room for new segment if possible */ - - /* look for hole in order to move segment data */ - if (offset_tbl[0].fixed == SEGMENT_FIXED) { /* fixed segment */ - free(offset_tbl); - return (-1); - } - - newoffset = hole_discovery(offset_tbl[0].length, - segcnt, &totsize, offset_tbl); - if (newoffset != 0) { /* found new offset */ - /* now new offset */ - offset_tbl[0].offset = newoffset; - - /* move the segment data */ - move_segment_data(seghdr, newoffset, contfd); - /* again sort the offset table */ - sort_offsettbl(segcnt, offset_tbl); - } else { - /* pack the existing hole */ - if (totsize > offset_tbl[0].length) { - pack_segment_data(seghdr, segcnt, - contfd, offset_tbl); - } else { - free(offset_tbl); - return (-1); - } - } - } - - totsize = 0; - newoffset = hole_discovery(segsize, segcnt, &totsize, offset_tbl); - - if (newoffset == 0) { /* No hole found */ - if (totsize >= segsize) { - pack_segment_data(seghdr, segcnt, contfd, - offset_tbl); - newoffset = hole_discovery(segsize, segcnt, - &totsize, offset_tbl); - if (newoffset != 0) { - *sectionoffset = newoffset; - free(offset_tbl); - return (0); - } - } - } else { - *sectionoffset = newoffset; - free(offset_tbl); - return (0); - } - free(offset_tbl); - return (-1); -} - -static char * -tokenizer(char *buf, char *separator, char **nextBuf, char *matched) -{ - int i = 0; - int j = 0; - - for (i = 0; buf[i] != '\0'; i++) { - for (j = 0; j < strlen(separator); j++) { - if (buf[i] == separator[j]) { - buf[i] = '\0'; - *nextBuf = &(buf[i+1]); - *matched = separator[j]; - return (buf); - } - } - } - - *nextBuf = buf; - *matched = '\0'; - return (NULL); -} - -static int -get_container_info(const char *def_file, const char *cont_desc_str, - container_info_t *cont_info) -{ - char *item; - char *token; - char *field; - char matched; - char buf[1024]; - int foundIt = 0; - FILE *file = fopen(def_file, "r"); - - if (file == NULL) - return (-1); - - cont_info->num_sections = 0; - - while (fgets(buf, sizeof (buf), file) != NULL) { - /* ignore all comments */ - token = tokenizer(buf, "#", &field, &matched); - /* find the names */ - token = tokenizer(buf, ":", &field, &matched); - if (token != 0x00) { - token = tokenizer(token, "|", &item, &matched); - while (token != 0x00) { - if (strcmp(token, cont_desc_str) == 0) { - foundIt = 1; - goto found; - } - token = tokenizer(item, "|", &item, &matched); - } - /* check the last remaining item */ - if ((item != 0x00) && - (strcmp(item, cont_desc_str) == 0)) { - foundIt = 1; - goto found; - } - } - } - -found : - if (foundIt == 1) { - token = tokenizer(field, ":", &field, &matched); - if (token == 0x00) { - (void) fclose(file); - return (-1); - } - cont_info->header_ver = (headerrev_t)atoi(token); - - token = tokenizer(field, ":\n", &field, &matched); - while (token != 0x00) { - token = tokenizer(token, ",", &item, &matched); - if (token == 0x00) { - (void) fclose(file); - return (-1); - } - if (atoi(token) == 1) { - cont_info->section_info[cont_info-> - num_sections].description.field.read_only = 1; - } else if (atoi(token) == 0) { - cont_info->section_info[cont_info-> - num_sections].description.field.read_only = 0; - } else { - (void) fclose(file); - return (-1); - } - - token = tokenizer(item, ",", &item, &matched); - if (token == 0x00) { - (void) fclose(file); - return (-1); - } - - if (atoi(token) == 1) { - cont_info->section_info[cont_info-> - num_sections].description.field.chk_type = 1; - } else if (atoi(token) == 0) { - cont_info->section_info[cont_info-> - num_sections].description.field.chk_type = 0; - } else { - (void) fclose(file); - return (-1); - } - - - token = tokenizer(item, ",", &item, &matched); - if (token == 0x00) { - (void) fclose(file); - return (-1); - } - - cont_info->section_info[cont_info->num_sections]. - address = atoi(token); - - - if (item == '\0') { - (void) fclose(file); - return (-1); - } - cont_info->section_info[cont_info->num_sections].size = - atoi(item); - (cont_info->num_sections)++; - - token = tokenizer(field, ":\n ", &field, &matched); - } - } - (void) fclose(file); - return (0); -} - -/* - * Description :fru_open_container() opens the container associated with a fru. - * it's called by data plugin module before creating container - * property. it calls picltree library routine to get the - * device path and driver binding name for the fru to get the - * corresponding fru name that describe the fru layout. - * - * Arguments :picl_hdl_t fru - * A handle for PICL tree node of class "fru" representing the - * FRU with the container to open. - * - * Return : - * On Success, a Positive integer container handle. is returned - * for use in subsequent fru operations;on error, 0 is returned - * and "errno" is set appropriately. - */ - -container_hdl_t -fru_open_container(picl_nodehdl_t fruhdl) -{ - int retval; - int count; - char *bname; - char devpath[PATH_MAX]; - hash_obj_t *cont_hash_obj; - hash_obj_t *sec_hash_obj; - picl_nodehdl_t tmphdl; - picl_prophdl_t prophdl; - ptree_propinfo_t propinfo; - container_info_t cont_info; - - /* Get property handle of _seeprom_source under fru node */ - retval = ptree_get_propval_by_name(fruhdl, PICL_REFPROP_SEEPROM_SRC, - &tmphdl, sizeof (tmphdl)); - if (retval != PICL_SUCCESS) { - return (NULL); - } - - /* Get the device path of the fru */ - retval = ptree_get_propval_by_name(tmphdl, PICL_PROP_DEVICEPATH, - devpath, PATH_MAX); - if (retval != PICL_SUCCESS) { - return (NULL); - } - - retval = ptree_get_prop_by_name(tmphdl, PICL_PROP_BINDING_NAME, - &prophdl); - if (retval != PICL_SUCCESS) { - return (NULL); - } - - retval = ptree_get_propinfo(prophdl, &propinfo); - if (retval != PICL_SUCCESS) { - return (NULL); - } - - bname = alloca(propinfo.piclinfo.size); - if (bname == NULL) { - return (NULL); - } - - /* get the driver binding name */ - retval = ptree_get_propval(prophdl, bname, propinfo.piclinfo.size); - if (retval != PICL_SUCCESS) { - return (NULL); - } - - cont_hash_obj = create_container_hash_object(); - if (cont_hash_obj == NULL) { - return (NULL); - } - - add_hashobject_to_hashtable(cont_hash_obj); - - (void) strlcpy(cont_hash_obj->u.cont_obj->device_pathname, devpath, - sizeof (devpath)); - - /* takes driver binding name as to get container information */ - retval = get_container_info(CONTAINER_CONF_FILE, bname, &cont_info); - if (retval < 0) { - return (NULL); - } - - cont_hash_obj->u.cont_obj->num_of_section = cont_info.num_sections; - cont_hash_obj->u.cont_obj->sec_obj_list = NULL; - - for (count = 0; count < cont_info.num_sections; count++) { - sec_hash_obj = create_section_hash_object(); - if (sec_hash_obj == NULL) { - return (NULL); - } - - add_hashobject_to_hashtable(sec_hash_obj); - - sec_hash_obj->u.sec_obj->section.offset = - cont_info.section_info[count].address; - - sec_hash_obj->u.sec_obj->section.protection = - cont_info.section_info[count].description.field.read_only; - - sec_hash_obj->u.sec_obj->checksum_method = - cont_info.section_info[count].description.field.chk_type; - - sec_hash_obj->u.sec_obj->section.length = - cont_info.section_info[count].size; - - sec_hash_obj->u.sec_obj->section.version = cont_info.header_ver; - - add_to_sec_object_list(cont_hash_obj, sec_hash_obj); - } - return (cont_hash_obj->obj_hdl); -} - -static int -verify_header_crc8(headerrev_t head_ver, unsigned char *bytes, int length) -{ - int crc_offset = 0; - unsigned char orig_crc8 = 0; - unsigned char calc_crc8 = 0; - - switch (head_ver) { - case SECTION_HDR_VER: - crc_offset = 4; - break; - default: - errno = EINVAL; - return (0); - } - - orig_crc8 = bytes[crc_offset]; - bytes[crc_offset] = 0x00; /* clear for calc */ - calc_crc8 = compute_crc8(bytes, length); - bytes[crc_offset] = orig_crc8; /* restore */ - - return (orig_crc8 == calc_crc8); -} - -/* - * Description : - * fru_get_num_sections() returns number of sections in a - * container. it calls get_container_index() to get the container - * index number in the container list. - * - * Arguments : - * container_hdl_t : container handle. - * - * Return : - * int - * On success, returns number of sections in a container. - * - */ -/*ARGSUSED*/ -int -fru_get_num_sections(container_hdl_t container, door_cred_t *cred) -{ - hash_obj_t *hash_object; - - hash_object = lookup_handle_object(container, CONTAINER_TYPE); - if (hash_object == NULL) { - return (-1); - } - - return (hash_object->u.cont_obj->num_of_section); -} - -/* - * called from fru_get_sections() - */ - -static void -get_section(int fd, hash_obj_t *sec_hash, section_t *section) -{ - int retval; - int size; - int count; - uint16_t hdrver; - hash_obj_t *seg_hash; - unsigned char *buffer; - section_obj_t *sec_obj; - section_layout_t sec_hdr; - segment_layout_t *seg_hdr; - segment_layout_t *seg_buf; - - sec_obj = sec_hash->u.sec_obj; - if (sec_obj == NULL) { - return; - } - - /* populate section_t */ - section->handle = sec_hash->obj_hdl; - section->offset = sec_obj->section.offset; - section->length = sec_obj->section.length; - section->protection = sec_obj->section.protection; - section->version = sec_obj->section.version; - sec_obj->num_of_segment = 0; - - /* read section header layout */ - retval = pread(fd, &sec_hdr, sizeof (sec_hdr), - sec_obj->section.offset); - if (retval != sizeof (sec_hdr)) { - return; - } - - hdrver = GET_SECTION_HDR_VERSION; - - if ((sec_hdr.headertag != SECTION_HDR_TAG) && - (hdrver != section->version)) { - return; - } - - /* size = section layout + total sizeof segment header */ - size = sizeof (sec_hdr) + ((sec_hdr.segmentcount) - * sizeof (segment_layout_t)); - - buffer = alloca(size); - if (buffer == NULL) { - return; - } - - /* segment header buffer */ - seg_buf = alloca(size - sizeof (sec_hdr)); - if (seg_buf == NULL) { - return; - } - - /* read segment header */ - retval = pread(fd, seg_buf, size - sizeof (sec_hdr), - sec_obj->section.offset + sizeof (sec_hdr)); - if (retval != (size - sizeof (sec_hdr))) { - return; - } - - /* copy section header layout */ - (void) memcpy(buffer, &sec_hdr, sizeof (sec_hdr)); - - /* copy segment header layout */ - (void) memcpy(buffer + sizeof (sec_hdr), seg_buf, size - - sizeof (sec_hdr)); - - /* verify crc8 */ - retval = verify_header_crc8(hdrver, buffer, size); - if (retval != TRUE) { - return; - } - - - section->version = hdrver; - sec_obj->section.version = hdrver; - - seg_hdr = (segment_layout_t *)seg_buf; - - for (count = 0; count < sec_hdr.segmentcount; count++, seg_hdr++) { - seg_hash = create_segment_hash_object(); - if (seg_hash == NULL) { - return; - } - - add_hashobject_to_hashtable(seg_hash); - - copy_segment_layout(&seg_hash->u.seg_obj->segment, seg_hdr); - - add_to_seg_object_list(sec_hash, seg_hash); - - sec_obj->num_of_segment++; - } -} - - -static int -call_devfsadm(void) -{ - char *phys_path; - di_node_t root_node; - di_node_t prom_node; - di_node_t f_node; - - if ((root_node = di_init("/", DINFOCPYALL)) == DI_NODE_NIL) { - return (-1); - } - - f_node = di_drv_first_node(PICL_CLASS_SEEPROM, root_node); - if (f_node != DI_NODE_NIL) { - phys_path = di_devfs_path(f_node); - if ((prom_node = di_init(phys_path, DINFOMINOR)) - != DI_NODE_NIL) { - di_fini(prom_node); - di_fini(root_node); - (void) pclose(popen(devfsadm_cmd, "r")); - return (0); - } - } - di_fini(root_node); - return (-1); -} - -/* - * Description : - * fru_get_sections() fills an array of section structures passed - * as an argument. - * - * Arguments : - * container_hdl_t : container handle(device descriptor). - * section_t : array of section structure. - * int : maximum number of section in a container. - * - * Returns : - * int - * On success,the number of section structures written is returned; - * on error, -1 is returned and "errno" is set appropriately. - * - */ - -/* ARGSUSED */ -int -fru_get_sections(container_hdl_t container, section_t *section, int maxsec, - door_cred_t *cred) -{ - int device_fd; - int retrys = 1; - int count; - hash_obj_t *cont_object; - hash_obj_t *sec_hash; - - cont_object = lookup_handle_object(container, CONTAINER_TYPE); - if (cont_object == NULL) { - return (-1); - } - - if (cont_object->u.cont_obj->num_of_section > maxsec) { - return (-1); - } - - sec_hash = cont_object->u.cont_obj->sec_obj_list; - if (sec_hash == NULL) { - return (-1); - } - - do { - device_fd = open(cont_object->u.cont_obj->device_pathname, - O_RDWR); - if (device_fd >= 0) { - break; - } - } while ((retrys-- > 0) && (call_devfsadm() == 0)); - - if (device_fd < 0) { - return (-1); - } - - for (count = 0; count < cont_object->u.cont_obj->num_of_section; - count++, section++) { - section->version = -1; - /* populate section_t */ - get_section(device_fd, sec_hash, section); - sec_hash = sec_hash->u.sec_obj->next; - } - - (void) close(device_fd); - - return (count); -} - -/* - * Description : - * fru_get_num_segments() returns the current number of segments - * in a section. - * - * Arguments : - * section_hdl_t : section header holding section information. - * - * Return : - * int - * On success, the number of segments in the argument section is - * returned; on error -1 is returned. - */ -/*ARGSUSED*/ -int -fru_get_num_segments(section_hdl_t section, door_cred_t *cred) -{ - hash_obj_t *sec_object; - section_obj_t *sec_obj; - - sec_object = lookup_handle_object(section, SECTION_TYPE); - if (sec_object == NULL) { - return (-1); - } - - sec_obj = sec_object->u.sec_obj; - if (sec_obj == NULL) { - return (-1); - } - - return (sec_obj->num_of_segment); -} - -/* - * Description : - * fru_get_segments() fills an array of structures representing the - * segments in a section. - * - * Arguments : - * section_hdl_t : holds section number. - * segment_t : on success will hold segment information. - * int : maximum number of segment. - * - * Return : - * int - * On success, the number of segment structures written is - * returned; on errno -1 is returned. - */ - -/* ARGSUSED */ -int -fru_get_segments(section_hdl_t section, segment_t *segment, int maxseg, - door_cred_t *cred) -{ - int count; - hash_obj_t *sec_object; - hash_obj_t *seg_object; - section_obj_t *sec_obj; - - sec_object = lookup_handle_object(section, SECTION_TYPE); - if (sec_object == NULL) { - return (-1); - } - - sec_obj = sec_object->u.sec_obj; - if (sec_obj == NULL) { - return (-1); - } - - if (sec_obj->num_of_segment > maxseg) { - return (-1); - } - - seg_object = sec_object->u.sec_obj->seg_obj_list; - if (seg_object == NULL) { - return (-1); - } - - for (count = 0; count < sec_obj->num_of_segment; count++) { - - /* populate segment_t */ - segment->handle = seg_object->obj_hdl; - (void) memcpy(segment->name, - seg_object->u.seg_obj->segment.name, SEG_NAME_LEN); - segment->descriptor = seg_object->u.seg_obj->segment.descriptor; - - segment->offset = seg_object->u.seg_obj->segment.offset; - segment->length = seg_object->u.seg_obj->segment.length; - seg_object = seg_object->u.seg_obj->next; - segment++; - } - return (0); -} - -/* - * Description : - * fru_add_segment() adds a segment to a section. - * - * Arguments : - * section_hdl_t section - * A handle for the section in which to add the segment. - * - * segment_t *segment - * On entry, the "handle" component of "segment" is ignored and the - * remaining components specify the parameters of the segment to be - * added. On return, the "handle" component is set to the handle - * for the added segment. The segment offset is mandatory for FIXED - * segments; otherwise, the offset is advisory. - * - * Return : - * int - * On success, 0 is returned; on error -1 is returned. - * - */ - -int -fru_add_segment(section_hdl_t section, segment_t *segment, - section_hdl_t *newsection, door_cred_t *cred) -{ - int fd; - int retval; - int offset; - int sec_size; - int seg_cnt; - int bufsize; - int new_seg_offset; - int new_seg_length; - int fixed_segment; - char trailer[] = { 0x0c, 0x00, 0x00, 0x00, 0x00 }; - hash_obj_t *cont_hash; - hash_obj_t *sec_hash; - hash_obj_t *seg_hash; - fru_segdesc_t *new_seg_desc; - unsigned char *crcbuf; - section_layout_t sec_layout; - segment_layout_t *seg_layout; - segment_layout_t *segment_buf; - - /* check the effective uid of the client */ - if (cred->dc_euid != 0) { - errno = EPERM; - return (-1); /* not a root */ - } - - /* section hash */ - sec_hash = lookup_handle_object(section, SECTION_TYPE); - if (sec_hash == NULL) { - return (-1); - } - - /* check for read-only section */ - if (sec_hash->u.sec_obj->section.protection == READ_ONLY_SECTION) { - errno = EPERM; - return (-1); - } - - /* look for duplicate segment */ - seg_hash = sec_hash->u.sec_obj->seg_obj_list; - while (seg_hash != NULL) { - if (strncmp(segment->name, seg_hash->u.seg_obj->segment.name, - SEG_NAME_LEN) == 0) { - errno = EEXIST; - return (-1); /* can't add duplicate segment */ - } - seg_hash = seg_hash->u.seg_obj->next; - } - - /* get the container hash */ - cont_hash = lookup_handle_object(sec_hash->u.sec_obj->cont_hdl, - CONTAINER_TYPE); - if (cont_hash == NULL) { - return (-1); - } - - /* open the container */ - fd = open(cont_hash->u.cont_obj->device_pathname, O_RDWR); - if (fd < 0) { - return (-1); - } - - /* section start here */ - offset = sec_hash->u.sec_obj->section.offset; - - /* read section header layout */ - retval = pread(fd, &sec_layout, sizeof (sec_layout), offset); - if (retval != sizeof (sec_layout)) { - (void) close(fd); - return (-1); - } - - /* check for valid section header */ - if (sec_layout.headertag != SECTION_HDR_TAG) { - /* write a new one */ - sec_layout.headertag = SECTION_HDR_TAG; - sec_layout.headerversion[0] = SECTION_HDR_VER_BIT0; - sec_layout.headerversion[1] = SECTION_HDR_VER_BIT1; - sec_layout.headerlength = sizeof (sec_layout); - sec_layout.segmentcount = 0; - } - - /* section size */ - sec_size = sec_hash->u.sec_obj->section.length; - - /* number of segment in the section */ - seg_cnt = sec_layout.segmentcount; - - /* total sizeof segment + new segment */ - bufsize = sizeof (segment_layout_t) * (seg_cnt + 1); - segment_buf = alloca(bufsize); - if (segment_buf == NULL) { - return (-1); - } - - /* read entire segment header */ - retval = pread(fd, segment_buf, (bufsize - sizeof (segment_layout_t)), - offset + sizeof (section_layout_t)); - if (retval != (bufsize - sizeof (segment_layout_t))) { - (void) close(fd); - return (-1); - } - - new_seg_offset = segment->offset; /* new segment offset */ - new_seg_length = segment->length; /* new segment length */ - - new_seg_desc = (fru_segdesc_t *)&segment->descriptor; - - fixed_segment = new_seg_desc->field.fixed; - - /* get new offset for new segment to be addedd */ - retval = find_offset((char *)segment_buf, seg_cnt, sec_size, - &new_seg_offset, new_seg_length, fixed_segment, fd); - - if (retval != 0) { - (void) close(fd); - errno = EAGAIN; - return (-1); - } - - /* copy new segment data in segment layout */ - seg_layout = (segment_layout_t *)(segment_buf + seg_cnt); - (void) memcpy(&seg_layout->name, segment->name, SEG_NAME_LEN); - (void) memcpy(seg_layout->descriptor, &segment->descriptor, - sizeof (uint32_t)); - seg_layout->length = segment->length; - seg_layout->offset = new_seg_offset; /* new segment offset */ - - sec_layout.segmentcount += 1; - - crcbuf = alloca(sizeof (section_layout_t) + bufsize); - if (crcbuf == NULL) { - (void) close(fd); - return (-1); - } - - sec_layout.headercrc8 = 0; - sec_layout.headerlength += sizeof (segment_layout_t); - - (void) memcpy(crcbuf, (char *)&sec_layout, sizeof (section_layout_t)); - (void) memcpy(crcbuf + sizeof (section_layout_t), segment_buf, bufsize); - - sec_layout.headercrc8 = compute_crc8(crcbuf, bufsize + - sizeof (section_layout_t)); - - /* write section header */ - retval = pwrite(fd, &sec_layout, sizeof (section_layout_t), offset); - if (retval != sizeof (section_layout_t)) { - (void) close(fd); - return (-1); - } - - /* write segment header */ - retval = pwrite(fd, segment_buf, bufsize, offset + - sizeof (section_layout_t)); - if (retval != bufsize) { - (void) close(fd); - return (-1); - } - - /* write segment trailer */ - retval = pwrite(fd, &trailer, sizeof (trailer), new_seg_offset); - if (retval != sizeof (trailer)) { - (void) close(fd); - return (-1); - } - - (void) close(fd); - - /* create new segment hash object */ - seg_hash = create_segment_hash_object(); - if (seg_hash == NULL) { - return (-1); - } - - add_hashobject_to_hashtable(seg_hash); - - copy_segment_layout(&seg_hash->u.seg_obj->segment, seg_layout); - - add_to_seg_object_list(sec_hash, seg_hash); - - sec_hash->u.sec_obj->num_of_segment += 1; - seg_hash->u.seg_obj->trailer_offset = new_seg_offset; - *newsection = section; /* return the new section handle */ - return (0); -} - -static void -free_pkt_object_list(hash_obj_t *hash_obj) -{ - hash_obj_t *next_obj; - hash_obj_t *free_obj; - - next_obj = hash_obj->u.seg_obj->pkt_obj_list; - while (next_obj != NULL) { - free_obj = next_obj; - next_obj = next_obj->u.pkt_obj->next; - /* if prev is NULL it's the first object in the list */ - if (free_obj->prev == NULL) { - hash_table[(free_obj->obj_hdl % TABLE_SIZE)] = - free_obj->next; - if (free_obj->next != NULL) { - free_obj->next->prev = free_obj->prev; - } - } else { - free_obj->prev->next = free_obj->next; - if (free_obj->next != NULL) { - free_obj->next->prev = free_obj->prev; - } - } - free(free_obj->u.pkt_obj); - free(free_obj); - } - - hash_obj->u.seg_obj->pkt_obj_list = NULL; -} - -static void -free_segment_hash(handle_t handle, hash_obj_t *sec_hash) -{ - hash_obj_t *seg_hash; - hash_obj_t *next_hash; - - seg_hash = sec_hash->u.sec_obj->seg_obj_list; - if (seg_hash == NULL) { - return; - } - - if (seg_hash->obj_hdl == handle) { - sec_hash->u.sec_obj->seg_obj_list = seg_hash->u.seg_obj->next; - } else { - while (seg_hash->obj_hdl != handle) { - next_hash = seg_hash; - seg_hash = seg_hash->u.seg_obj->next; - if (seg_hash == NULL) { - return; - } - } - next_hash->u.seg_obj->next = seg_hash->u.seg_obj->next; - } - - if (seg_hash->prev == NULL) { - hash_table[(seg_hash->obj_hdl % TABLE_SIZE)] = seg_hash->next; - if (seg_hash->next != NULL) { - seg_hash->next->prev = NULL; - } - } else { - seg_hash->prev->next = seg_hash->next; - if (seg_hash->next != NULL) { - seg_hash->next->prev = seg_hash->prev; - } - } - - free_pkt_object_list(seg_hash); - free(seg_hash->u.seg_obj); - free(seg_hash); -} - -/* - * Description : - * fru_delete_segment() deletes a segment from a section; the - * associated container data is not altered. - * - * Arguments : segment_hdl_t segment handle. - * section_hdl_t new section handle. - * - * Return : - * int - * On success, 0 returned; On error -1 is returned. - */ - -int -fru_delete_segment(segment_hdl_t segment, section_hdl_t *newsection, - door_cred_t *cred) -{ - int num_of_seg; - int bufsize; - int count; - int retval; - int fd; - int segnum; - hash_obj_t *seg_hash; - hash_obj_t *sec_hash; - hash_obj_t *cont_hash; - hash_obj_t *tmp_hash; - unsigned char *buffer; - fru_segdesc_t *desc; - segment_layout_t *seg_buf; - section_layout_t *sec_layout; - segment_layout_t *seg_layout; - segment_layout_t *next_layout; - - /* check the effective uid of the client */ - if (cred->dc_euid != 0) { - errno = EPERM; - return (-1); /* not a root */ - } - - seg_hash = lookup_handle_object(segment, SEGMENT_TYPE); - if (seg_hash == NULL) { - return (-1); - } - - desc = (fru_segdesc_t *)&seg_hash->u.seg_obj->segment.descriptor; - if (!(desc->field.field_perm & SEGMENT_DELETE)) { - errno = EPERM; - return (-1); /* can't delete this segment */ - } - - sec_hash = lookup_handle_object(seg_hash->u.seg_obj->section_hdl, - SECTION_TYPE); - if (sec_hash == NULL) { - return (-1); - } - - if (sec_hash->u.sec_obj->section.protection == READ_ONLY_SECTION) { - errno = EPERM; - return (-1); - } - - num_of_seg = sec_hash->u.sec_obj->num_of_segment; - - bufsize = (sizeof (segment_layout_t) * num_of_seg); - - seg_buf = alloca(bufsize); - if (seg_buf == NULL) { - return (-1); - } - - segnum = 0; - for (tmp_hash = sec_hash->u.sec_obj->seg_obj_list; tmp_hash != NULL; - tmp_hash = tmp_hash->u.seg_obj->next) { - if (tmp_hash->obj_hdl == segment) { - break; - } - segnum++; - } - - cont_hash = lookup_handle_object(sec_hash->u.sec_obj->cont_hdl, - CONTAINER_TYPE); - if (cont_hash == NULL) { - return (-1); - } - - fd = open(cont_hash->u.cont_obj->device_pathname, O_RDWR); - if (fd < 0) { - return (-1); - } - - sec_layout = alloca(sizeof (section_layout_t)); - if (sec_layout == NULL) { - (void) close(fd); - return (-1); - } - - /* read section layout header */ - retval = pread(fd, sec_layout, sizeof (section_layout_t), - sec_hash->u.sec_obj->section.offset); - if (retval != sizeof (section_layout_t)) { - (void) close(fd); - return (-1); - } - - /* read segment header layout */ - retval = pread(fd, seg_buf, bufsize, - sec_hash->u.sec_obj->section.offset + - sizeof (section_layout_t)); - if (retval != bufsize) { - (void) close(fd); - return (-1); - } - - seg_layout = (segment_layout_t *)(seg_buf + segnum); - next_layout = seg_layout; - for (count = segnum; count < sec_hash->u.sec_obj->num_of_segment-1; - count++) { - next_layout++; - (void) memcpy(seg_layout, next_layout, - sizeof (segment_layout_t)); - seg_layout++; - } - - (void) memset(seg_layout, '\0', sizeof (segment_layout_t)); - - sec_layout->headercrc8 = 0; - - sec_layout->headerlength -= sizeof (segment_layout_t); - sec_layout->segmentcount -= 1; - - buffer = alloca(sec_layout->headerlength); - if (buffer == NULL) { - (void) close(fd); - return (-1); - } - - (void) memcpy(buffer, sec_layout, sizeof (section_layout_t)); - (void) memcpy(buffer + sizeof (section_layout_t), seg_buf, bufsize - - sizeof (segment_layout_t)); - sec_layout->headercrc8 = compute_crc8(buffer, - sec_layout->headerlength); - - /* write section header with update crc8 and header length */ - retval = pwrite(fd, sec_layout, sizeof (section_layout_t), - sec_hash->u.sec_obj->section.offset); - if (retval != sizeof (section_layout_t)) { - (void) close(fd); - return (-1); - } - - /* write the update segment header */ - retval = pwrite(fd, seg_buf, bufsize, - sec_hash->u.sec_obj->section.offset + - sizeof (section_layout_t)); - (void) close(fd); - if (retval != bufsize) { - return (-1); - } - - free_segment_hash(segment, sec_hash); - - *newsection = sec_hash->obj_hdl; - sec_hash->u.sec_obj->num_of_segment = sec_layout->segmentcount; - - return (0); -} - -/* - * Description : - * fru_read_segment() reads the raw contents of a segment. - * - * Arguments : segment_hdl_t : segment handle. - * void * : buffer containing segment data when function returns. - * size_t :number of bytes. - * - * Return : - * int - * On success, the number of bytes read is returned; - * - * Notes : - * Segments containing packets can be read in structured fashion - * using the fru_get_packets() and fru_get_payload() primitives;the - * entire byte range of a segment can be read using - * fru_read_segment(). - */ -/*ARGSUSED*/ -ssize_t -fru_read_segment(segment_hdl_t segment, void *buffer, size_t nbytes, - door_cred_t *cred) -{ - int fd; - int retval; - hash_obj_t *seg_hash; - hash_obj_t *sec_hash; - hash_obj_t *cont_hash; - - /* segment hash object */ - seg_hash = lookup_handle_object(segment, SEGMENT_TYPE); - if (seg_hash == NULL) { - return (-1); - } - - /* section hash object */ - sec_hash = lookup_handle_object(seg_hash->u.seg_obj->section_hdl, - SECTION_TYPE); - if (sec_hash == NULL) { - return (-1); - } - - /* container hash object */ - cont_hash = lookup_handle_object(sec_hash->u.sec_obj->cont_hdl, - CONTAINER_TYPE); - if (cont_hash == NULL) { - return (-1); - } - - if (seg_hash->u.seg_obj->segment.length < nbytes) { - return (-1); - } - - fd = open(cont_hash->u.cont_obj->device_pathname, O_RDWR); - if (fd < 0) { - return (-1); - } - - retval = pread(fd, buffer, nbytes, seg_hash->u.seg_obj->segment.offset); - (void) close(fd); - if (retval != nbytes) { - return (-1); - } - return (nbytes); -} - -/* - * Description : - * fru_write_segment() writes a raw segment. - * - * Arguments : segment_hdl_t :segment handle. - * const void * : data buffer. - * size_t : number of bytes. - * segment_hdl_t : new segment handle. - * - * Returns : - * int - * On success, the number of bytes written is returned - * - */ -/*ARGSUSED*/ -int -fru_write_segment(segment_hdl_t segment, const void *data, size_t nbytes, - segment_hdl_t *newsegment, door_cred_t *cred) -{ - return (ENOTSUP); -} - - -static int -get_packet(int device_fd, void *buffer, int size, int offset) -{ - int retval; - - retval = pread(device_fd, (char *)buffer, size, offset); - if (retval != -1) { - return (0); - } - return (-1); -} - -/* - * Description : - * get_payload() populates a buffer with the packets payload - * - * Arguments : hash_obj_t : packet. - * int : device file descriptor - * uint8_t* : pointer to a pre allocated buffer - * - * - * Return : - * int - * On success, 0 is returned; on failure - * -1 returned. - */ -int -get_payload(int device_fd, hash_obj_t *packet, uint8_t *payload) -{ - int retval; - packet_obj_t *packet_object; - - - packet_object = packet->u.pkt_obj; - if (packet_object == NULL) { - return (-1); - } - - /* Get the data */ - retval = pread(device_fd, payload, packet_object->paylen, - packet_object->payload_offset); - if (retval != packet_object->paylen) { - free(payload); - return (-1); - } - - return (0); - -} - - -static uint32_t -get_checksum_crc(int device_fd, hash_obj_t *seg_hash, int data_size) -{ - int checksum; - int offset = 0; - int retval; - uint8_t *payload; - uint32_t crc; - hash_obj_t *sec_hash; - hash_obj_t *pkt_hash; - unsigned char *buffer; - - sec_hash = lookup_handle_object(seg_hash->u.seg_obj->section_hdl, - SECTION_TYPE); - if (sec_hash == NULL) { - return ((uint32_t)-1); - } - - buffer = alloca(data_size); - if (buffer == NULL) { - return ((uint32_t)-1); - } - - /* traverse the packet object list for all the tags and payload */ - for (pkt_hash = seg_hash->u.seg_obj->pkt_obj_list; pkt_hash != NULL; - pkt_hash = pkt_hash->u.pkt_obj->next) { - (void) memcpy(buffer + offset, &pkt_hash->u.pkt_obj->tag, - pkt_hash->u.pkt_obj->tag_size); - offset += pkt_hash->u.pkt_obj->tag_size; - - /* read packet payload */ - payload = malloc(pkt_hash->u.pkt_obj->paylen); - if (payload == NULL) { - return ((uint32_t)-1); - } - retval = get_payload(device_fd, pkt_hash, payload); - if (retval == -1) { - free(payload); - return ((uint32_t)-1); - } - (void) memcpy(buffer + offset, payload, - pkt_hash->u.pkt_obj->paylen); - offset += pkt_hash->u.pkt_obj->paylen; - free(payload); - } - - checksum = sec_hash->u.sec_obj->checksum_method; - - if (checksum == CRC32_SECTION) { /* read-only section */ - crc = compute_crc32(buffer, data_size); - } else { /* read/write section */ - crc = compute_checksum32(buffer, data_size); - } - return (crc); /* computed crc */ -} - -static int -get_packets(hash_obj_t *seg_hash, int device_fd, int offset, int length) -{ - int tag_size; - int paylen; - int retval; - int seg_limit = 0; - int pktcnt = 0; - char *data; - uint32_t crc; - uint32_t origcrc; - fru_tag_t tag; - hash_obj_t *pkt_hash_obj; - fru_segdesc_t *segdesc; - fru_tagtype_t tagtype; - - retval = get_packet(device_fd, &tag, sizeof (fru_tag_t), offset); - if (retval == -1) { - return (-1); - } - - seg_hash->u.seg_obj->trailer_offset = offset; - - data = (char *)&tag; - while (data[0] != SEG_TRAILER_TAG) { - tagtype = get_tag_type(&tag); /* verify tag type */ - if (tagtype == -1) { - return (-1); - } - - tag_size = get_tag_size(tagtype); - if (tag_size == -1) { - return (-1); - } - - seg_limit += tag_size; - if (seg_limit > length) { - return (-1); - } - - paylen = get_payload_length((void *)&tag); - if (paylen == -1) { - return (-1); - } - - seg_limit += paylen; - if (seg_limit > length) { - return (-1); - } - - pkt_hash_obj = create_packet_hash_object(); - if (pkt_hash_obj == NULL) { - return (-1); - } - - offset += tag_size; - - /* don't change this */ - pkt_hash_obj->u.pkt_obj->tag.raw_data = 0; - (void) memcpy(&pkt_hash_obj->u.pkt_obj->tag, &tag, tag_size); - pkt_hash_obj->u.pkt_obj->paylen = paylen; - pkt_hash_obj->u.pkt_obj->tag_size = tag_size; - pkt_hash_obj->u.pkt_obj->payload_offset = offset; - - offset += paylen; - - add_hashobject_to_hashtable(pkt_hash_obj); - add_to_pkt_object_list(seg_hash, pkt_hash_obj); - - pktcnt++; - - retval = get_packet(device_fd, &tag, sizeof (fru_tag_t), - offset); - if (retval == -1) { - return (retval); - } - - data = (char *)&tag; - } - - segdesc = (fru_segdesc_t *)&seg_hash->u.seg_obj->segment.descriptor; - - seg_hash->u.seg_obj->trailer_offset = offset; - - if (!segdesc->field.ignore_checksum) { - crc = get_checksum_crc(device_fd, seg_hash, seg_limit); - offset = seg_hash->u.seg_obj->segment.offset; - - retval = pread(device_fd, &origcrc, sizeof (origcrc), - offset + seg_limit + 1); - if (retval != sizeof (origcrc)) { - return (-1); - } - - if (origcrc != crc) { - seg_hash->u.seg_obj->trailer_offset = offset; - return (-1); - } - } - - return (pktcnt); -} - -/* - * Description : - * fru_get_num_packets() returns the current number of packets - * in a segment. - * - * Arguments : segment_hdl_t : segment handle. - * - * Return : - * int - * On success, the number of packets is returned; - * -1 on failure. - */ -/*ARGSUSED*/ -int -fru_get_num_packets(segment_hdl_t segment, door_cred_t *cred) -{ - int device_fd; - int pktcnt; - int length; - uint16_t offset; - hash_obj_t *cont_hash_obj; - hash_obj_t *seg_hash; - fru_segdesc_t *segdesc; - segment_obj_t *segment_object; - - seg_hash = lookup_handle_object(segment, SEGMENT_TYPE); - if (seg_hash == NULL) { - return (-1); - } - - segment_object = seg_hash->u.seg_obj; - if (segment_object == NULL) { - return (-1); - } - - - segdesc = (fru_segdesc_t *)&segment_object->segment.descriptor; - if (segdesc->field.opaque) { - return (0); - } - - offset = segment_object->segment.offset; - length = segment_object->segment.length; - - cont_hash_obj = get_container_hash_object(SEGMENT_TYPE, - segment_object->section_hdl); - - if (cont_hash_obj == NULL) { - return (-1); - } - - if (seg_hash->u.seg_obj->pkt_obj_list != NULL) { - return (segment_object->num_of_packets); - } - - segment_object->num_of_packets = 0; - device_fd = open(cont_hash_obj->u.cont_obj->device_pathname, - O_RDWR); - if (device_fd < 0) { - return (-1); - } - - pktcnt = get_packets(seg_hash, device_fd, offset, - length); - if (pktcnt == -1) { - free_pkt_object_list(seg_hash); - seg_hash->u.seg_obj->pkt_obj_list = NULL; - } - - segment_object->num_of_packets = pktcnt; - (void) close(device_fd); - - return (segment_object->num_of_packets); -} - - -/* - * Description : - * fru_get_packets() fills an array of structures representing the - * packets in a segment. - * - * Arguments : segment_hdl_t : segment handle. - * packet_t : packet buffer. - * int : maximum number of packets. - * - * Return : - * int - * On success, the number of packet structures written is returned; - * On failure -1 is returned; - * - */ -/*ARGSUSED*/ -int -fru_get_packets(segment_hdl_t segment, packet_t *packet, int maxpackets, - door_cred_t *cred) -{ - int count; - hash_obj_t *seg_hash_obj; - hash_obj_t *pkt_hash_obj; - - /* segment hash object */ - seg_hash_obj = lookup_handle_object(segment, SEGMENT_TYPE); - if (seg_hash_obj == NULL) { - return (-1); - } - - if (seg_hash_obj->u.seg_obj->num_of_packets != maxpackets) { - return (-1); - } - - pkt_hash_obj = seg_hash_obj->u.seg_obj->pkt_obj_list; - if (pkt_hash_obj == NULL) { - return (-1); - } - - for (count = 0; count < maxpackets; count++, packet++) { - packet->handle = pkt_hash_obj->obj_hdl; - packet->tag = 0; - (void) memcpy(&packet->tag, &pkt_hash_obj->u.pkt_obj->tag, - pkt_hash_obj->u.pkt_obj->tag_size); - pkt_hash_obj = pkt_hash_obj->u.pkt_obj->next; - } - - return (0); -} - -/* - * Description : - * fru_get_payload() copies the contents of a packet's payload. - * - * Arguments : packet_hdl_t : packet handle. - * void * : payload buffer. - * size_t : sizeof the buffer. - * - * Return : - * int - * On success, the number of bytes copied is returned; On error - * -1 returned. - */ -/*ARGSUSED*/ -ssize_t -fru_get_payload(packet_hdl_t packet, void *buffer, size_t nbytes, - door_cred_t *cred) -{ - int retval; - int device_fd; - uint8_t *payload; - hash_obj_t *packet_hash_obj; - hash_obj_t *segment_hash_obj; - hash_obj_t *container_hash_obj; - - /* packet hash object */ - packet_hash_obj = lookup_handle_object(packet, PACKET_TYPE); - if (packet_hash_obj == NULL) { - return (-1); - } - - payload = malloc(packet_hash_obj->u.pkt_obj->paylen); - if (payload == NULL) { - return (-1); - } - - /* lookup the segment hash object */ - segment_hash_obj = - lookup_handle_object(packet_hash_obj->u.pkt_obj->segment_hdl, - SEGMENT_TYPE); - if (segment_hash_obj == NULL) { - free(payload); - return (-1); - } - - /* Get the container hash object to get the seeprom device path */ - container_hash_obj = get_container_hash_object(SEGMENT_TYPE, - segment_hash_obj->u.seg_obj->section_hdl); - if (container_hash_obj == NULL) { - free(payload); - return (-1); - } - - /* Open the seeprom device */ - device_fd = open(container_hash_obj->u.cont_obj->device_pathname, - O_RDWR); - if (device_fd < 0) { - free(payload); - return (-1); - } - - - /* Call to get the payload */ - retval = get_payload(device_fd, packet_hash_obj, payload); - if (retval == -1) { - free(payload); - (void) close(device_fd); - return (-1); - } - - - /* verify payload length */ - if (nbytes != packet_hash_obj->u.pkt_obj->paylen) { - free(payload); - (void) close(device_fd); - return (-1); - } - - (void) memcpy(buffer, payload, nbytes); - free(payload); - (void) close(device_fd); - return (nbytes); -} - -/* - * Description : - * fru_update_payload() writes the contents of a packet's payload. - * - * Arguments : packet_hdl_t : packet handle. - * const void * : data buffer. - * size_t : buffer size. - * packet_hdl_t : new packet handle. - * - * Return : - * int - * On success, 0 is returned; on failure - * -1 is returned. - */ - -int -fru_update_payload(packet_hdl_t packet, const void *data, size_t nbytes, - packet_hdl_t *newpacket, door_cred_t *cred) -{ - int fd; - int segment_offset; - int trailer_offset; - int retval; - uint32_t crc; - hash_obj_t *pkt_hash; - hash_obj_t *seg_hash; - hash_obj_t *sec_hash; - hash_obj_t *cont_hash; - fru_segdesc_t *desc; - - /* check the effective uid of the client */ - if (cred->dc_euid != 0) { - errno = EPERM; - return (-1); /* not a root */ - } - - /* packet hash object */ - pkt_hash = lookup_handle_object(packet, PACKET_TYPE); - if (pkt_hash == NULL) { - return (-1); - } - - /* segment hash object */ - seg_hash = lookup_handle_object(pkt_hash->u.pkt_obj->segment_hdl, - SEGMENT_TYPE); - if (seg_hash == NULL) { - return (-1); - } - - /* check for write perm. */ - desc = (fru_segdesc_t *)&seg_hash->u.seg_obj->segment.descriptor; - if (!(desc->field.field_perm & SEGMENT_WRITE)) { - errno = EPERM; - return (-1); /* write not allowed */ - } - - sec_hash = lookup_handle_object(seg_hash->u.seg_obj->section_hdl, - SECTION_TYPE); - if (sec_hash == NULL) { - return (-1); - } - - if (sec_hash->u.sec_obj->section.protection == READ_ONLY_SECTION) { - errno = EPERM; - return (-1); /* read-only section */ - } - - cont_hash = lookup_handle_object(sec_hash->u.sec_obj->cont_hdl, - CONTAINER_TYPE); - if (cont_hash == NULL) { - return (-1); - } - - if (pkt_hash->u.pkt_obj->paylen != nbytes) { - return (-1); - } - - fd = open(cont_hash->u.cont_obj->device_pathname, O_RDWR); - if (fd < 0) { - return (-1); - } - - trailer_offset = seg_hash->u.seg_obj->trailer_offset; - segment_offset = seg_hash->u.seg_obj->segment.offset; - - crc = get_checksum_crc(fd, seg_hash, (trailer_offset - segment_offset)); - retval = pwrite(fd, data, nbytes, pkt_hash->u.pkt_obj->payload_offset); - if (retval != nbytes) { - (void) close(fd); - return (-1); - } - - retval = pwrite(fd, &crc, sizeof (crc), trailer_offset + 1); - (void) close(fd); - if (retval != sizeof (crc)) { - return (-1); - } - *newpacket = packet; - return (0); -} - -/* - * Description : - * fru_append_packet() appends a packet to a segment. - * - * Arguments : - * segment_hdl_t segment - * A handle for the segment to which the packet will be appended. - * - * packet_t *packet - * On entry, the "tag" component of "packet" specifies the tag - * value for the added packet; the "handle" component is ignored. - * On return, the "handle" component is set to the handle of the - * appended packet. - * - * const void *payload - * A pointer to the caller's buffer containing the payload data for - * the appended packet. - * - * size_t nbytes - * The size of the caller buffer. - * - * Return : - * int - * On success, 0 is returned; on error -1 is returned; - */ - -int -fru_append_packet(segment_hdl_t segment, packet_t *packet, const void *payload, - size_t nbytes, segment_hdl_t *newsegment, door_cred_t *cred) -{ - int trailer_offset; - int tag_size; - int fd; - int retval; - char trailer[] = {0x0c, 0x00, 0x00, 0x00, 0x00}; - uint32_t crc; - hash_obj_t *seg_hash; - hash_obj_t *sec_hash; - hash_obj_t *pkt_hash; - hash_obj_t *cont_hash; - fru_tagtype_t tagtype; - fru_segdesc_t *desc; - - /* check the effective uid of the client */ - if (cred->dc_euid != 0) { - errno = EPERM; - return (-1); /* not a root */ - } - - seg_hash = lookup_handle_object(segment, SEGMENT_TYPE); - if (seg_hash == NULL) { - return (-1); - } - - /* check for write perm. */ - desc = (fru_segdesc_t *)&seg_hash->u.seg_obj->segment.descriptor; - if (!(desc->field.field_perm & SEGMENT_WRITE)) { - errno = EPERM; - return (-1); /* write not allowed */ - } - - sec_hash = lookup_handle_object(seg_hash->u.seg_obj->section_hdl, - SECTION_TYPE); - if (sec_hash == NULL) { - return (-1); - } - - if (sec_hash->u.sec_obj->section.protection == READ_ONLY_SECTION) { - errno = EPERM; - return (-1); /* read-only section */ - } - - trailer_offset = seg_hash->u.seg_obj->trailer_offset; - - /* - * if trailer offset is 0 than parse the segment data to get the trailer - * offset to compute the remaining space left in the segment area for - * new packet to be added. - */ - if (trailer_offset == 0) { - (void) fru_get_num_packets(segment, cred); - trailer_offset = seg_hash->u.seg_obj->trailer_offset; - } - - tagtype = get_tag_type((void *)&packet->tag); - if (tagtype == -1) { - return (-1); - } - - tag_size = get_tag_size(tagtype); - if (tag_size == -1) { - return (-1); - } - - if (seg_hash->u.seg_obj->segment.length > - ((trailer_offset - seg_hash->u.seg_obj->segment.offset) + - tag_size + nbytes + sizeof (char) - + sizeof (uint32_t))) { - /* create new packet hash */ - pkt_hash = create_packet_hash_object(); - if (pkt_hash == NULL) { - return (-1); - } - - /* tag initialization */ - (void) memcpy(&pkt_hash->u.pkt_obj->tag, &packet->tag, - tag_size); - pkt_hash->u.pkt_obj->tag_size = tag_size; - pkt_hash->u.pkt_obj->paylen = nbytes; - pkt_hash->u.pkt_obj->payload_offset = trailer_offset + tag_size; - - /* add to hash table */ - add_hashobject_to_hashtable(pkt_hash); - - add_to_pkt_object_list(seg_hash, pkt_hash); - - cont_hash = lookup_handle_object(sec_hash->u.sec_obj->cont_hdl, - CONTAINER_TYPE); - if (cont_hash == NULL) { - return (-1); - } - - fd = open(cont_hash->u.cont_obj->device_pathname, O_RDWR); - if (fd < 0) { - return (-1); - } - - /* update the trailer offset */ - trailer_offset += tag_size + nbytes; - - /* calculate new checksum */ - crc = get_checksum_crc(fd, seg_hash, (trailer_offset - - seg_hash->u.seg_obj->segment.offset)); - - retval = pwrite(fd, &packet->tag, tag_size, trailer_offset - - (tag_size + nbytes)); - if (retval != tag_size) { - (void) close(fd); - return (-1); - } - - retval = pwrite(fd, payload, nbytes, trailer_offset - nbytes); - if (retval != nbytes) { - (void) close(fd); - return (-1); - } - - retval = pwrite(fd, trailer, sizeof (trailer), trailer_offset); - if (retval != sizeof (trailer)) { - (void) close(fd); - return (-1); - } - - retval = pwrite(fd, &crc, sizeof (crc), trailer_offset + 1); - (void) close(fd); - if (retval != sizeof (crc)) { - return (-1); - } - - seg_hash->u.seg_obj->trailer_offset = trailer_offset; - seg_hash->u.seg_obj->num_of_packets += 1; - - *newsegment = segment; /* return new segment handle */ - return (0); - } else { - errno = EAGAIN; - } - - return (-1); -} - -static void -adjust_packets(int fd, hash_obj_t *free_obj, hash_obj_t *object_list) -{ - int retval; - uint8_t *payload; - uint32_t new_offset; - hash_obj_t *hash_ptr; - - - new_offset = free_obj->u.pkt_obj->payload_offset - - free_obj->u.pkt_obj->tag_size; - for (hash_ptr = object_list; hash_ptr != NULL; - hash_ptr = hash_ptr->u.pkt_obj->next) { - - payload = malloc(hash_ptr->u.pkt_obj->paylen); - if (payload == NULL) { - return; - } - retval = get_payload(fd, hash_ptr, payload); - if (retval == -1) { - free(payload); - return; - } - - retval = pwrite(fd, &hash_ptr->u.pkt_obj->tag, - hash_ptr->u.pkt_obj->tag_size, new_offset); - if (retval != hash_ptr->u.pkt_obj->tag_size) { - free(payload); - return; - } - new_offset += hash_ptr->u.pkt_obj->tag_size; - hash_ptr->u.pkt_obj->payload_offset = new_offset; - retval = pwrite(fd, payload, - hash_ptr->u.pkt_obj->paylen, new_offset); - if (retval != hash_ptr->u.pkt_obj->paylen) { - free(payload); - return; - } - new_offset += hash_ptr->u.pkt_obj->paylen; - free(payload); - } -} - -static void -free_packet_object(handle_t handle, hash_obj_t *seg_hash) -{ - hash_obj_t *pkt_hash; - hash_obj_t *next_hash; - - pkt_hash = seg_hash->u.seg_obj->pkt_obj_list; - if (pkt_hash == NULL) { - return; - } - - if (pkt_hash->obj_hdl == handle) { - seg_hash->u.seg_obj->pkt_obj_list = pkt_hash->u.pkt_obj->next; - } else { - while (pkt_hash->obj_hdl != handle) { - next_hash = pkt_hash; - pkt_hash = pkt_hash->u.pkt_obj->next; - if (pkt_hash == NULL) { - return; - } - } - next_hash->u.pkt_obj->next = pkt_hash->u.pkt_obj->next; - } - - if (pkt_hash->prev == NULL) { - hash_table[(pkt_hash->obj_hdl % TABLE_SIZE)] = pkt_hash->next; - if (pkt_hash->next != NULL) { - pkt_hash->next->prev = NULL; - } - } else { - pkt_hash->prev->next = pkt_hash->next; - if (pkt_hash->next != NULL) { - pkt_hash->next->prev = pkt_hash->prev; - } - } - - free(pkt_hash->u.pkt_obj); - free(pkt_hash); -} - -/* - * Description : - * fru_delete_packet() deletes a packet from a segment. - * - * Arguments : packet_hdl_t : packet number to be deleted. - * segment_hdl_t : new segment handler. - * - * Return : - * int - * On success, 0 is returned; on error, -1. - * - * NOTES - * Packets are adjacent; thus, deleting a packet requires moving - * succeeding packets to compact the resulting hole. - */ - -int -fru_delete_packet(packet_hdl_t packet, segment_hdl_t *newsegment, - door_cred_t *cred) -{ - int retval; - int fd; - char trailer[] = { 0x0c, 0x00, 0x00, 0x00, 0x00}; - uint32_t crc; - hash_obj_t *tmp_obj; - hash_obj_t *pkt_hash; - hash_obj_t *sec_hash; - hash_obj_t *cont_hash; - hash_obj_t *prev_obj; - hash_obj_t *seg_hash; - fru_segdesc_t *desc; - - /* check the effective uid of the client */ - if (cred->dc_euid != 0) { - errno = EPERM; - return (-1); /* not a root */ - } - - /* packet hash object */ - pkt_hash = lookup_handle_object(packet, PACKET_TYPE); - if (pkt_hash == NULL) { - return (-1); - } - - /* segment hash object */ - seg_hash = lookup_handle_object(pkt_hash->u.pkt_obj->segment_hdl, - SEGMENT_TYPE); - if (seg_hash == NULL) { - return (-1); - } - - /* check for write perm. */ - desc = (fru_segdesc_t *)&seg_hash->u.seg_obj->segment.descriptor; - if (!(desc->field.field_perm & SEGMENT_WRITE)) { - errno = EPERM; - return (-1); /* write not allowed */ - } - - /* section hash object */ - sec_hash = lookup_handle_object(seg_hash->u.seg_obj->section_hdl, - SECTION_TYPE); - if (sec_hash == NULL) { - return (-1); - } - - if (sec_hash->u.sec_obj->section.protection == READ_ONLY_SECTION) { - errno = EPERM; - return (-1); /* read-only section */ - } - - prev_obj = seg_hash->u.seg_obj->pkt_obj_list; - if (prev_obj == NULL) { - return (-1); - } - - /* container hash object */ - cont_hash = lookup_handle_object(sec_hash->u.sec_obj->cont_hdl, - CONTAINER_TYPE); - if (cont_hash == NULL) { - return (-1); - } - - fd = open(cont_hash->u.cont_obj->device_pathname, O_RDWR); - if (fd < 0) { - return (-1); - } - - if (prev_obj->obj_hdl == packet) { /* first object to be deleted */ - adjust_packets(fd, prev_obj, prev_obj->u.pkt_obj->next); - seg_hash->u.seg_obj->trailer_offset -= - (prev_obj->u.pkt_obj->tag_size - + prev_obj->u.pkt_obj->paylen); - free_packet_object(packet, seg_hash); - } else { - for (tmp_obj = prev_obj; - tmp_obj != NULL; tmp_obj = tmp_obj->u.pkt_obj->next) { - /* found the object */ - if (tmp_obj->obj_hdl == packet) { - adjust_packets(fd, tmp_obj, - tmp_obj->u.pkt_obj->next); - seg_hash->u.seg_obj->trailer_offset -= - (tmp_obj->u.pkt_obj->tag_size - + tmp_obj->u.pkt_obj->paylen); - free_packet_object(packet, seg_hash); - } - } - } - - seg_hash->u.seg_obj->num_of_packets -= 1; - - /* calculate checksum */ - crc = get_checksum_crc(fd, seg_hash, - (seg_hash->u.seg_obj->trailer_offset - - seg_hash->u.seg_obj->segment.offset)); - /* write trailer at new offset */ - retval = pwrite(fd, &trailer, sizeof (trailer), - seg_hash->u.seg_obj->trailer_offset); - if (retval != sizeof (trailer)) { - (void) close(fd); - return (-1); - } - - /* write the checksum value */ - retval = pwrite(fd, &crc, sizeof (crc), - seg_hash->u.seg_obj->trailer_offset + 1); - (void) close(fd); - if (retval != sizeof (crc)) { - return (-1); - } - - *newsegment = seg_hash->obj_hdl; /* return new segment handle */ - return (0); -} - -/* - * Description : - * fru_close_container() removes the association between a - * container and its handle. this routines free's up all the - * hash object contained under container. - * - * Arguments : - * container_hdl_t holds the file descriptor of the fru. - * - * Return : - * int - * return 0. - * - */ - -/* ARGSUSED */ -int -fru_close_container(container_hdl_t container) -{ - hash_obj_t *hash_obj; - hash_obj_t *prev_hash; - hash_obj_t *sec_hash_obj; - handle_t obj_hdl; - - /* lookup for container hash object */ - hash_obj = lookup_handle_object(container, CONTAINER_TYPE); - if (hash_obj == NULL) { - return (0); - } - - /* points to section object list */ - sec_hash_obj = hash_obj->u.cont_obj->sec_obj_list; - - /* traverse section object list */ - while (sec_hash_obj != NULL) { - - /* traverse segment hash object in the section */ - while (sec_hash_obj->u.sec_obj->seg_obj_list != NULL) { - /* object handle of the segment hash object */ - obj_hdl = - sec_hash_obj->u.sec_obj->seg_obj_list->obj_hdl; - free_segment_hash(obj_hdl, sec_hash_obj); - } - - /* going to free section hash object, relink the hash object */ - if (sec_hash_obj->prev == NULL) { - hash_table[(sec_hash_obj->obj_hdl % TABLE_SIZE)] - = sec_hash_obj->next; - if (sec_hash_obj->next != NULL) { - sec_hash_obj->next->prev = NULL; - } - } else { - sec_hash_obj->prev->next = sec_hash_obj->next; - if (sec_hash_obj->next != NULL) { - sec_hash_obj->next->prev = sec_hash_obj->prev; - } - } - - free(sec_hash_obj->u.sec_obj); /* free section hash object */ - - prev_hash = sec_hash_obj; - - sec_hash_obj = sec_hash_obj->u.sec_obj->next; - - free(prev_hash); /* free section hash */ - } - - /* free container hash object */ - if (hash_obj->prev == NULL) { - hash_table[(sec_hash_obj->obj_hdl % TABLE_SIZE)] = - hash_obj->next; - if (hash_obj->next != NULL) { - hash_obj->next->prev = NULL; - } - } else { - hash_obj->prev->next = hash_obj->next; - if (hash_obj->next != NULL) { - hash_obj->next->prev = hash_obj->prev; - } - } - - free(hash_obj->u.cont_obj); - free(hash_obj); - return (0); -} - -/* - * Description : - * fru_is_data_available() checks to see if the frudata - * is available on a fru. - * - * Arguments : - * picl_nodehdl_t holds the picl node handle of the fru. - * - * Return : - * int - * return 1: if FRUID information is available - * return 0: if FRUID information is not present - * - */ - -/* ARGSUSED */ -int -fru_is_data_available(picl_nodehdl_t fru) -{ - return (0); -} diff --git a/usr/src/cmd/picl/plugins/sun4u/blade/fruaccess/fru_access_impl.h b/usr/src/cmd/picl/plugins/sun4u/blade/fruaccess/fru_access_impl.h deleted file mode 100644 index 85d9d36e73..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/blade/fruaccess/fru_access_impl.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, 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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - */ - -#ifndef _FRU_ACCESS_IMPL_H -#define _FRU_ACCESS_IMPL_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "picldefs.h" -#include -#include -#include "libfru.h" -#include "fru_tag.h" -#include "fru_access.h" - -/* object types */ -typedef enum {CONTAINER_TYPE, SECTION_TYPE, SEGMENT_TYPE, PACKET_TYPE} object_t; - -#define TABLE_SIZE 64 /* hash table size */ - -/* container configuration file name */ -#define CONTAINER_CONF_FILE \ - "/usr/platform/SUNW,Serverblade1/lib/fru_container.conf" - -/* section header */ -#define SECTION_HDR_TAG 0x08 -#define SECTION_HDR_VER 0x0001 -#define SECTION_HDR_LENGTH 0x06 -#define SECTION_HDR_CRC8 0x00 -#define SECTION_HDR_VER_BIT0 0x00 -#define SECTION_HDR_VER_BIT1 0x01 - -#define READ_ONLY_SECTION 1 /* section is read-only */ - -#define CRC32_SECTION 0 -#define CHECKSUM32_SECTION 1 - -#define GET_SEGMENT_DESCRIPTOR \ - (seg_layout->descriptor[1]|seg_layout->descriptor[0] << 16) - -#define GET_SECTION_HDR_VERSION \ - (sec_hdr.headerversion[1]|sec_hdr.headerversion[0] << 8) - -/* Segment Trailer Tag */ -#define SEG_TRAILER_TAG 0x0C - -/* defines fixed segment */ -#define SEGMENT_FIXED 1 - -typedef union { - uint32_t all_bits; - struct { - unsigned read_only : 1; - unsigned chk_type : 1; - unsigned unused : 8; - unsigned : 8; - unsigned : 8; - unsigned : 6; - } field; -} sectdescbit_t; - -typedef struct { - sectdescbit_t description; - uint32_t address; /* for SEEPROMS this is the offset */ - uint32_t size; -} sectioninfo_t; - -typedef uint16_t headerrev_t; - -#define MAX_NUMOF_SECTION 2 - -typedef struct { - headerrev_t header_ver; - int num_sections; - sectioninfo_t section_info[MAX_NUMOF_SECTION]; -} container_info_t; - - -/* section header layout */ -typedef struct { - uint8_t headertag; /* section header tag */ - uint8_t headerversion[2]; /* header version (msb) */ - uint8_t headerlength; /* header length */ - uint8_t headercrc8; /* crc8 */ - uint8_t segmentcount; /* total number of segment */ -} section_layout_t; - -/* segment header layout */ -typedef struct { - uint16_t name; /* segment name */ - uint16_t descriptor[2]; /* descriptor (msb) */ - uint16_t offset; /* segment data offset */ - uint16_t length; /* segment length */ -} segment_layout_t; - -/* segment information used in finding new offset for a new segment */ -typedef struct { - int segnum; /* segment number */ - int offset; /* segment offset */ - int length; /* segment length */ - int fixed; /* fixed or non-fixed segment */ -} seg_info_t; - -typedef uint64_t handle_t; - -struct hash_obj; - -/* packet hash object */ -typedef struct { - handle_t segment_hdl; /* segment handle */ - fru_tag_t tag; - int tag_size; - uint32_t paylen; - uint32_t payload_offset; - struct hash_obj *next; -} packet_obj_t; - -/* segment hash object */ -typedef struct { - handle_t section_hdl; /* section handle */ - int num_of_packets; /* in a segment */ - int trailer_offset; - segment_t segment; - struct hash_obj *pkt_obj_list; /* packet object list */ - struct hash_obj *next; -} segment_obj_t; - -/* section hash object */ -typedef struct { - handle_t cont_hdl; /* container handle */ - section_t section; - int num_of_segment; /* in a section */ - int checksum_method; /* indicates the checksum method used */ - struct hash_obj *seg_obj_list; /* points to segment objects list */ - struct hash_obj *next; -} section_obj_t; - -/* container hash object */ -typedef struct { - char device_pathname[PATH_MAX]; /* device name */ - int num_of_section; /* num of section in container */ - struct hash_obj *sec_obj_list; /* points to section objects list */ -} container_obj_t; - -/* hash object */ -typedef struct hash_obj { - int object_type; - handle_t obj_hdl; - union { - container_obj_t *cont_obj; - section_obj_t *sec_obj; - segment_obj_t *seg_obj; - packet_obj_t *pkt_obj; - } u; - struct hash_obj *next; - struct hash_obj *prev; -} hash_obj_t; - -unsigned char compute_crc8(unsigned char *bytes, int length); -long compute_crc32(unsigned char *bytes, int length); -long compute_checksum32(unsigned char *bytes, int length); - -#ifdef __cplusplus -} -#endif - -#endif /* _FRU_ACCESS_IMPL_H */ diff --git a/usr/src/cmd/picl/plugins/sun4u/blade/fruaccess/fru_container.conf b/usr/src/cmd/picl/plugins/sun4u/blade/fruaccess/fru_container.conf deleted file mode 100644 index 282f6c3db1..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/blade/fruaccess/fru_container.conf +++ /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 2002 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -#ident "%Z%%M% %I% %E% SMI" -# - -# cut off read only section. -8k_6krw1792ro_SEEPROM:1:0,0,6144:1,6144,1792 - -# Note the extra flag per section to represent the checksum method -# 0 = CRC32 1 = CHECKSUM32 -# standard SEEPROM -i2c-at24c64|6krw2kro|8k_6krw2kro_SEEPROM:1:1,1,0,6144:1,0,6144,2048 - diff --git a/usr/src/cmd/picl/plugins/sun4u/blade/frudata/Makefile b/usr/src/cmd/picl/plugins/sun4u/blade/frudata/Makefile deleted file mode 100644 index dd4025c53f..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/blade/frudata/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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# cmd/picl/plugins/sun4u/blade/frudata/Makefile -# - -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Serverblade1 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONF= libpiclfrudata.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: $(CONF) - -install: $(ROOTLIBDIR) $(ROOTCONF) - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/blade/frudata/libpiclfrudata.conf b/usr/src/cmd/picl/plugins/sun4u/blade/frudata/libpiclfrudata.conf deleted file mode 100644 index 1cfadefdcd..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/blade/frudata/libpiclfrudata.conf +++ /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, 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 2002 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -#ident "%Z%%M% %I% %E% SMI" -# -# This file creates the FRU device paths for the FRUAccess library -# - -VERSION 1.0 - -name:/platform/pci/isa/bscbus/i2c/motherboard-fru -PROP FRUDevicePath string r 0 "/devices/pci@1f,0/isa@7/bscbus@0,1000/i2c@300,0/motherboard-fru@0,a0:motherboard-fru" diff --git a/usr/src/cmd/picl/plugins/sun4u/blade/frutree/Makefile b/usr/src/cmd/picl/plugins/sun4u/blade/frutree/Makefile deleted file mode 100644 index 3a26798141..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/blade/frutree/Makefile +++ /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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# cmd/picl/plugins/sun4u/blade/frutree/Makefile -# - -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Serverblade1 - - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONF= piclfrutree.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 -INFOS= piclfrutree.info system-board.info - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: $(CONF) - -install: $(ROOTLIBDIR) $(ROOTCONF) - -$(CONF): $(INFOS) - $(RM) $@ - $(CPP) piclfrutree.info | \ - $(SED) -e '/^[ ]*$$/d' -e '/^#/d' > $@ - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/blade/frutree/piclfrutree.info b/usr/src/cmd/picl/plugins/sun4u/blade/frutree/piclfrutree.info deleted file mode 100644 index 810c7b479c..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/blade/frutree/piclfrutree.info +++ /dev/null @@ -1,74 +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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -VERSION 1.0 -VERBOSE 1 -NODE frutree picl - NODE chassis fru - /* - * SunMC physical view view_points for this platform - * This will get moved to a separate SunMC physical view plugin later. - */ - PROP ViewPoints string r 0 "front rear side" - PROP SlotType string r 0 "chassis" - PROP Label string r 0 "Blade" - ENDNODE -ENDNODE - -name:/frutree/chassis -#include "system-board.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/blade/frutree/system-board.info b/usr/src/cmd/picl/plugins/sun4u/blade/frutree/system-board.info deleted file mode 100644 index 6bb20ad990..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/blade/frutree/system-board.info +++ /dev/null @@ -1,115 +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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This file creates the system board structure - */ - -NODE system-board fru - PROP SlotType string r 0 "system-board" - NODE cpu-slot location - PROP SlotType string r 0 "cpu" - PROP Label string r 0 "CPU0" - PROP Slot uint r 4 0 - ENDNODE - NODE fan-slot location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "cpu-fan" - PROP Slot uint r 4 0 - ENDNODE - NODE mem-slot location - PROP SlotType string r 0 "memory-module" - PROP Slot uint r 4 0 - PROP Label string r 0 "DIMM0" - ENDNODE - NODE mem-slot location - PROP SlotType string r 0 "memory-module" - PROP Slot uint r 4 1 - PROP Label string r 0 "DIMM1" - ENDNODE -ENDNODE - -/* - * create the fru modules for CPUs in the fru tree - */ -name:/frutree/chassis/system-board/cpu-slot?Slot=0 -REFNODE cpu-module fru WITH _class:/upa/cpu?ID=0 - - -/* - * seeprom source for motherboard - */ -name:/frutree/chassis/system-board -PROP FRUDataAvailable void r -REFPROP _seeprom_source name:/platform/pci/isa/bscbus/i2c/motherboard-fru - - -/* - * Set up memory module fru - */ -name:/frutree/chassis/system-board/mem-slot?Label=DIMM0 -REFNODE mem-module fru WITH name:/platform/pci/pmu/i2c/dimm-fru-prom?UnitAddress=0,a8 - -name:/frutree/chassis/system-board/mem-slot?Label=DIMM1 -REFNODE mem-module fru WITH name:/platform/pci/pmu/i2c/dimm-fru-prom?UnitAddress=0,aa - - -/* - * _fru_parent memory seeprom devices - */ -name:/platform/pci/pmu/i2c/dimm-fru-prom?UnitAddress=0,a8 -REFPROP _fru_parent name:/frutree/chassis/system-board/mem-slot?Label=DIMM0/mem-module - -name:/platform/pci/pmu/i2c/dimm-fru-prom?UnitAddress=0,aa -REFPROP _fru_parent name:/frutree/chassis/system-board/mem-slot?Label=DIMM1/mem-module - - -/* - * _fru_parent CPU, memory-controller devices - */ -_class:cpu?ID=0 -REFPROP _fru_parent /frutree/chassis/system-board/cpu-slot?Slot=0/cpu-module - -name:/platform/memory-controller?portid=0 -REFPROP _fru_parent /frutree/chassis/system-board/cpu-slot?Slot=0/cpu-module - - -/* - * _fru_parent motherboard & platform - */ -name:/platform/pci/isa/bscbus/i2c/motherboard-fru -REFPROP _fru_parent /frutree/chassis/system-board -name:/platform -REFPROP _fru_parent /frutree/chassis/system-board - -/* - * _fru_parent memory modules - */ -name:/platform/memory-controller/memory-module?ID=0 -REFPROP _fru_parent name:/frutree/chassis/system-board/mem-slot?Label=DIMM0/mem-module - -name:/platform/memory-controller/memory-module?ID=1 -REFPROP _fru_parent name:/frutree/chassis/system-board/mem-slot?Label=DIMM1/mem-module diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/Makefile b/usr/src/cmd/picl/plugins/sun4u/boston/Makefile deleted file mode 100644 index 6d5fac9bb9..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/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 2005 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# ident "%Z%%M% %I% %E% SMI" -# -# cmd/picl/plugins/sun4u/boston/Makefile -# - -SUBDIRS= devtree frutree frudata frudr envmon .WAIT - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -.KEEP_STATE: - -all install clean clobber: $(SUBDIRS) - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/devtree/Makefile b/usr/src/cmd/picl/plugins/sun4u/boston/devtree/Makefile deleted file mode 100644 index ecfa8d0273..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/devtree/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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. -# -# cmd/picl/plugins/sun4u/boston/devtree/Makefile -# -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-V445 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONF= picldevtree.conf picl_asr.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: - -install: $(ROOTLIBDIR) $(ROOTCONF) - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/devtree/picl_asr.conf b/usr/src/cmd/picl/plugins/sun4u/boston/devtree/picl_asr.conf deleted file mode 100644 index 7d22549c72..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/devtree/picl_asr.conf +++ /dev/null @@ -1,190 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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" -# -# cmd/picl/plugins/sun4u/boston/devtree/picl_asr.conf -# -# Platform specific .conf file for ASR -# -# -# key = net /pci@1e,600000/pci@0/pci@1/pci@0/@4 -# key = ide /pci@1f,700000/pci@0/pci@1/pci@0/@1f -# key = usb /pci@1f,700000/pci@0/pci@1/pci@0/@1c -# key = pci7 /pci@1f,700000/pci@0/@9 -# key = pci6 /pci@1e,600000/pci@0/@9 -# key = pci5 /pci@1f,700000/pci@0/pci@2/pci@0/@8 -# key = pci4 /pci@1f,700000/pci@0/pci@2/pci@0/@8 -# key = pci3 /pci@1e,600000/pci@0/pci@1/pci@0/@8 -# key = pci2 /pci@1e,600000/pci@0/pci@1/pci@0/@8 -# key = pci1 /pci@1f,700000/pci@0/@8 -# key = pci0 /pci@1e,600000/pci@0/@8 -# key = cpu3-bank3 -# key = cpu3-bank2 -# key = cpu3-bank1 -# key = cpu3-bank0 -# key = cpu2-bank3 -# key = cpu2-bank2 -# key = cpu2-bank1 -# key = cpu2-bank0 -# key = cpu1-bank3 -# key = cpu1-bank2 -# key = cpu1-bank1 -# key = cpu1-bank0 -# key = cpu0-bank3 -# key = cpu0-bank2 -# key = cpu0-bank1 -# key = cpu0-bank0 -# -# V445 may have two pairs of DIMM's on each CPU module. The DIMM's -# operate in pairs. If one DIMM is disabled then the other -# DIMM in the pair will be marked as "unused". -# -# key class status path -# DeviceID -# -cpu0-bank0 memory-module-group unused /memory-controller@0,0/memory-module-group I?ID=0 -cpu0-bank0 memory-module disabled /memory-controller@0,0/memory-module-group?ID=0/memory-module I?ID=0 -cpu0-bank0 memory-module unused /memory-controller@0,0/memory-module-group?ID=0/memory-module I?ID=1 -cpu0-bank1 memory-module-group unused /memory-controller@0,0/memory-module-group I?ID=0 -cpu0-bank1 memory-module unused /memory-controller@0,0/memory-module-group?ID=0/memory-module I?ID=0 -cpu0-bank1 memory-module disabled /memory-controller@0,0/memory-module-group?ID=0/memory-module I?ID=1 - -cpu0-bank2 memory-module-group unused /memory-controller@0,0/memory-module-group I?ID=1 -cpu0-bank2 memory-module disabled /memory-controller@0,0/memory-module-group?ID=1/memory-module I?ID=0 -cpu0-bank2 memory-module unused /memory-controller@0,0/memory-module-group?ID=1/memory-module I?ID=1 -cpu0-bank3 memory-module-group unused /memory-controller@0,0/memory-module-group I?ID=1 -cpu0-bank3 memory-module unused /memory-controller@0,0/memory-module-group?ID=1/memory-module I?ID=0 -cpu0-bank3 memory-module disabled /memory-controller@0,0/memory-module-group?ID=1/memory-module I?ID=1 - - -cpu1-bank0 memory-module-group unused /memory-controller@1,0/memory-module-group I?ID=0 -cpu1-bank0 memory-module disabled /memory-controller@1,0/memory-module-group?ID=0/memory-module I?ID=0 -cpu1-bank0 memory-module unused /memory-controller@1,0/memory-module-group?ID=0/memory-module I?ID=1 -cpu1-bank1 memory-module-group unused /memory-controller@1,0/memory-module-group I?ID=0 -cpu1-bank1 memory-module unused /memory-controller@1,0/memory-module-group?ID=0/memory-module I?ID=0 -cpu1-bank1 memory-module disabled /memory-controller@1,0/memory-module-group?ID=0/memory-module I?ID=1 - -cpu1-bank2 memory-module-group unused /memory-controller@1,0/memory-module-group I?ID=1 -cpu1-bank2 memory-module disabled /memory-controller@1,0/memory-module-group?ID=1/memory-module I?ID=0 -cpu1-bank2 memory-module unused /memory-controller@1,0/memory-module-group?ID=1/memory-module I?ID=1 -cpu1-bank3 memory-module-group unused /memory-controller@1,0/memory-module-group I?ID=1 -cpu1-bank3 memory-module unused /memory-controller@1,0/memory-module-group?ID=1/memory-module I?ID=0 -cpu1-bank3 memory-module disabled /memory-controller@1,0/memory-module-group?ID=1/memory-module I?ID=1 - - -cpu2-bank0 memory-module-group unused /memory-controller@2,0/memory-module-group I?ID=0 -cpu2-bank0 memory-module disabled /memory-controller@2,0/memory-module-group?ID=0/memory-module I?ID=0 -cpu2-bank0 memory-module unused /memory-controller@2,0/memory-module-group?ID=0/memory-module I?ID=1 -cpu2-bank1 memory-module-group unused /memory-controller@2,0/memory-module-group I?ID=0 -cpu2-bank1 memory-module unused /memory-controller@2,0/memory-module-group?ID=0/memory-module I?ID=0 -cpu2-bank1 memory-module disabled /memory-controller@2,0/memory-module-group?ID=0/memory-module I?ID=1 - -cpu2-bank2 memory-module-group unused /memory-controller@2,0/memory-module-group I?ID=1 -cpu2-bank2 memory-module disabled /memory-controller@2,0/memory-module-group?ID=1/memory-module I?ID=0 -cpu2-bank2 memory-module unused /memory-controller@2,0/memory-module-group?ID=1/memory-module I?ID=1 -cpu2-bank3 memory-module-group unused /memory-controller@2,0/memory-module-group I?ID=1 -cpu2-bank3 memory-module unused /memory-controller@2,0/memory-module-group?ID=1/memory-module I?ID=0 -cpu2-bank3 memory-module disabled /memory-controller@2,0/memory-module-group?ID=1/memory-module I?ID=1 - - -cpu3-bank0 memory-module-group unused /memory-controller@3,0/memory-module-group I?ID=0 -cpu3-bank0 memory-module disabled /memory-controller@3,0/memory-module-group?ID=0/memory-module I?ID=0 -cpu3-bank0 memory-module unused /memory-controller@3,0/memory-module-group?ID=0/memory-module I?ID=1 -cpu3-bank1 memory-module-group unused /memory-controller@3,0/memory-module-group I?ID=0 -cpu3-bank1 memory-module unused /memory-controller@3,0/memory-module-group?ID=0/memory-module I?ID=0 -cpu3-bank1 memory-module disabled /memory-controller@3,0/memory-module-group?ID=0/memory-module I?ID=1 - -cpu3-bank2 memory-module-group unused /memory-controller@3,0/memory-module-group I?ID=1 -cpu3-bank2 memory-module disabled /memory-controller@3,0/memory-module-group?ID=1/memory-module I?ID=0 -cpu3-bank2 memory-module unused /memory-controller@3,0/memory-module-group?ID=1/memory-module I?ID=1 -cpu3-bank3 memory-module-group unused /memory-controller@3,0/memory-module-group I?ID=1 -cpu3-bank3 memory-module unused /memory-controller@3,0/memory-module-group?ID=1/memory-module I?ID=0 -cpu3-bank3 memory-module disabled /memory-controller@3,0/memory-module-group?ID=1/memory-module I?ID=1 - - -# -# PCI0, PCI1, PCI6, and PCI7 are Express slots, each may be -# disabled individually. -# -# PCI2 and PCI3 are PCI/PCI-X slots downstream of the first Broadcom -# BCM5714 bridge (Fire leaf A). These cannot be disabled individually, -# they can be disabled only as a pair. Same for PCI4 and PCI5 off of -# Fire Leaf B: these are PCI-X/PCI slots downstream of the other BCM 5714. -# -# key class status path DeviceID -# -pci0 picl disabled /pci@1e,600000/pci@0/unknown@8 I?DeviceID=8 -pci1 picl disabled /pci@1f,700000/pci@0/unknown@8 I?DeviceID=8 -pci6 picl disabled /pci@1e,600000/pci@0/unknown@9 I?DeviceID=9 -pci7 picl disabled /pci@1f,700000/pci@0/unknown@9 I?DeviceID=9 - -# key class status path -# DeviceID -pci2 picl disabled /pci@1e,600000/pci@0/pci@1/pci@0/unknown@8 I?DeviceID=8 -pci2 picl unused /pci@1e,600000/pci@0/pci@1/pci@0/pci@8/unknown@1 I?DeviceID=1 -pci2 picl unused /pci@1e,600000/pci@0/pci@1/pci@0/pci@8/unknown@2 I?DeviceID=2 -pci3 picl disabled /pci@1e,600000/pci@0/pci@1/pci@0/unknown@8 I?DeviceID=8 -pci3 picl unused /pci@1e,600000/pci@0/pci@1/pci@0/pci@8/unknown@1 I?DeviceID=1 -pci3 picl unused /pci@1e,600000/pci@0/pci@1/pci@0/pci@8/unknown@2 I?DeviceID=2 - -pci4 picl disabled /pci@1f,700000/pci@0/pci@2/pci@0/unknown@8 I?DeviceID=8 -pci4 picl unused /pci@1f,700000/pci@0/pci@2/pci@0/pci@8/unknown@1 I?DeviceID=1 -pci4 picl unused /pci@1f,700000/pci@0/pci@2/pci@0/pci@8/unknown@2 I?DeviceID=2 -pci5 picl disabled /pci@1f,700000/pci@0/pci@2/pci@0/unknown@8 I?DeviceID=8 -pci5 picl unused /pci@1f,700000/pci@0/pci@2/pci@0/pci@8/unknown@1 I?DeviceID=1 -pci5 picl unused /pci@1f,700000/pci@0/pci@2/pci@0/pci@8/unknown@2 I?DeviceID=2 - - -# -# These are on-board devices. The IDE interface runs the CD/DVD drive. -# Disabling USB will disable all four ports. The network ports may be -# diabled only in pairs. -# -# key class status path -# DeviceID -# -ide ide disabled /pci@1f,700000/pci@0/pci@1/pci@0/pci@0/ide@1f I?DeviceID=1f - -usb usb disabled /pci@1f,700000/pci@0/pci@1/pci@0/usb@1c I?DeviceID=1c -usb usb unused /pci@1f,700000/pci@0/pci@1/pci@0/usb@1c,1 I?DeviceID=1c,1 -usb usb unused /pci@1f,700000/pci@0/pci@1/pci@0/usb@1c,2 I?DeviceID=1c,2 -usb usb unused /pci@1f,700000/pci@0/pci@1/pci@0/usb@1c,3 I?DeviceID=1c,3 - -net network disabled /pci@1e,600000/pci@0/pci@1/pci@0/network@4 I?DeviceID=4 -net network unused /pci@1e,600000/pci@0/pci@1/pci@0/network@4,1 I?DeviceID=4,1 -net0&1 network disabled /pci@1e,600000/pci@0/pci@1/pci@0/network@4 I?DeviceID=4 -net0&1 network unused /pci@1e,600000/pci@0/pci@1/pci@0/network@4,1 I?DeviceID=4,1 -net2&3 network disabled /pci@1f,700000/pci@0/pci@2/pci@0/network@4 I?DeviceID=4 -net2&3 network unused /pci@1f,700000/pci@0/pci@2/pci@0/network@4,1 I?DeviceID=4,1 - -# -# This is the built-in SAS interface; it does not control the -# SAS interface in slot PCI4. -# -# key class status path -# DeviceID -# -scsi scsi-2 disabled /pci@1e,600000/pci@0/pci@2/scsi@0 I?DeviceID=0 diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/devtree/picldevtree.conf b/usr/src/cmd/picl/plugins/sun4u/boston/devtree/picldevtree.conf deleted file mode 100644 index 4d33cfeb0d..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/devtree/picldevtree.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 2006 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# ident "%Z%%M% %I% %E% SMI" -# -# Platform specific .conf file for picldevtree plug-in -# -# This file provides mappings of device names (i.e. the OBP "compatbile" -# or "name" property) to appropriate PICL classes for devices -# that are unique to the given platform. This table is used by -# the devtree PICL plug-in only when it cannot find a PICL class for -# a given device. -# -# -power-supply-fru-prom seeprom -dimm-spd seeprom -motherboard-fru-prom seeprom -cpu-fru-prom seeprom -rmc-fru-prom seeprom -sas-backplane-fru-prom seeprom -front-io-fru-prom seeprom -pdb-fru-prom seeprom -hub usb diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/envmon/Makefile b/usr/src/cmd/picl/plugins/sun4u/boston/envmon/Makefile deleted file mode 100644 index 6b05e58122..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/envmon/Makefile +++ /dev/null @@ -1,76 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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. -# -# cmd/picl/plugins/sun4u/boston/frutree/Makefile -# - -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-V445 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONFS = piclenvmon.conf -ROOTCONF= $(CONFS:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 -MAININFO= $(CONFS:%.conf=%.info) - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: $(CONFS) - -install: $(ROOTLIBDIR) $(ROOTCONF) - -$(CONFS): $(MAININFO) - @$(RM) -f $@ - @echo "# Copyright 2005 Sun Microsystems, Inc. All rights reserved." \ - > $@ - @echo "# Use is subject to license terms." >> $@ - @echo "# This is a generated file. #ident lines identify sources" >> $@ - $(CPP) -P $(@:%.conf=%.info) | \ - $(SED) -e '/^[ ]*$$/d' >> $@ - @$(CHMOD) 444 $@ - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/envmon/piclenvmon.info b/usr/src/cmd/picl/plugins/sun4u/boston/envmon/piclenvmon.info deleted file mode 100644 index 40c39bbc4c..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/envmon/piclenvmon.info +++ /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 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon after - * it has established rmclomv nodes in /platform - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#define RMC_COMM /platform/ebus@1f,464000/rmc-comm@0,c28000 - -/* - * add a node for the rmclomv leaf driver - */ -name:RMC_COMM - NODE SUNW,rmclomv service-processor - ENDNODE - -name:RMC_COMM/SUNW,rmclomv - PROP devfs-path string r 0 "/pseudo/rmclomv@0" diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudata/Makefile b/usr/src/cmd/picl/plugins/sun4u/boston/frudata/Makefile deleted file mode 100644 index eae55cc43b..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudata/Makefile +++ /dev/null @@ -1,65 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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. -# -# cmd/picl/plugins/sun4u/boston/frudata/Makefile -# - -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-V445 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONF= libpiclfrudata.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: $(CONF) - -install: $(ROOTLIBDIR) $(ROOTCONF) - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudata/libpiclfrudata.conf b/usr/src/cmd/picl/plugins/sun4u/boston/frudata/libpiclfrudata.conf deleted file mode 100644 index 9d1302bd81..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudata/libpiclfrudata.conf +++ /dev/null @@ -1,137 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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" -# -# This file creates the FRU device paths for the FRUAccess library -# - -VERSION 1.0 - -# Motherboard FRU PROM -name:/platform/i2c@1f,520000/motherboard-fru-prom@0,aa -PROP FRUDevicePath string r 0 "/devices/i2c@1f,520000/motherboard-fru-prom@0,aa:motherboard-fru-prom" - -# CPU 0 -name:/platform/i2c@1f,520000/cpu-fru-prom?UnitAddress=0,b8 -PROP FRUDevicePath string r 0 "/devices/i2c@1f,520000/cpu-fru-prom@0,b8:cpu-fru-prom" - -name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,b0 -PROP FRUDevicePath string r 0 "/devices/i2c@1f,520000/dimm-spd@0,b0:dimm-spd" - -name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,b2 -PROP FRUDevicePath string r 0 "/devices/i2c@1f,520000/dimm-spd@0,b2:dimm-spd" - -name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,b4 -PROP FRUDevicePath string r 0 "/devices/i2c@1f,520000/dimm-spd@0,b4:dimm-spd" - -name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,b6 -PROP FRUDevicePath string r 0 "/devices/i2c@1f,520000/dimm-spd@0,b6:dimm-spd" - - -# CPU 1 -name:/platform/i2c@1f,520000/cpu-fru-prom?UnitAddress=0,c8 -PROP FRUDevicePath string r 0 "/devices/i2c@1f,520000/cpu-fru-prom@0,c8:cpu-fru-prom" - -name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,c0 -PROP FRUDevicePath string r 0 "/devices/i2c@1f,520000/dimm-spd@0,c0:dimm-spd" - -name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,c2 -PROP FRUDevicePath string r 0 "/devices/i2c@1f,520000/dimm-spd@0,c2:dimm-spd" - -name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,c4 -PROP FRUDevicePath string r 0 "/devices/i2c@1f,520000/dimm-spd@0,c4:dimm-spd" - -name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,c6 -PROP FRUDevicePath string r 0 "/devices/i2c@1f,520000/dimm-spd@0,c6:dimm-spd" - - -# CPU 2 -name:/platform/i2c@1f,520000/cpu-fru-prom?UnitAddress=0,e8 -PROP FRUDevicePath string r 0 "/devices/i2c@1f,520000/cpu-fru-prom@0,e8:cpu-fru-prom" - -name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,e0 -PROP FRUDevicePath string r 0 "/devices/i2c@1f,520000/dimm-spd@0,e0:dimm-spd" - -name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,e2 -PROP FRUDevicePath string r 0 "/devices/i2c@1f,520000/dimm-spd@0,e2:dimm-spd" - -name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,e4 -PROP FRUDevicePath string r 0 "/devices/i2c@1f,520000/dimm-spd@0,e4:dimm-spd" - -name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,e6 -PROP FRUDevicePath string r 0 "/devices/i2c@1f,520000/dimm-spd@0,e6:dimm-spd" - - - -# CPU 3 -name:/platform/i2c@1f,520000/cpu-fru-prom?UnitAddress=0,98 -PROP FRUDevicePath string r 0 "/devices/i2c@1f,520000/cpu-fru-prom@0,98:cpu-fru-prom" - -name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,90 -PROP FRUDevicePath string r 0 "/devices/i2c@1f,520000/dimm-spd@0,90:dimm-spd" - -name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,92 -PROP FRUDevicePath string r 0 "/devices/i2c@1f,520000/dimm-spd@0,92:dimm-spd" - -name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,94 -PROP FRUDevicePath string r 0 "/devices/i2c@1f,520000/dimm-spd@0,94:dimm-spd" - -name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,96 -PROP FRUDevicePath string r 0 "/devices/i2c@1f,520000/dimm-spd@0,96:dimm-spd" - - -# RMC FRU PROM -name:/platform/i2c@1f,520000/rmc-fru-prom@0,a8 -PROP FRUDevicePath string r 0 "/devices/i2c@1f,520000/rmc-fru-prom@0,a8:rmc-fru-prom" - -# SAS/SATA FRU PROM -name:/platform/i2c@1f,520000/sas-backplane-fru-prom@0,48 -PROP FRUDevicePath string r 0 "/devices/i2c@1f,520000/sas-backplane-fru-prom@0,48:sas-backplane-fru-prom" - -# SAS crontroller fru prom -name:/platform/i2c@1f,520000/sas-ctrl-fru-prom@0,46 -PROP FRUDevicePath string r 0 "/devices/i2c@1f,520000/sas-ctrl-fru-prom@0,46:sas-ctrl-fru-prom" - -# Front IO board FRU PROM -name:/platform/i2c@1f,520000/front-io-fru-prom@0,4e -PROP FRUDevicePath string r 0 "/devices/i2c@1f,520000/front-io-fru-prom@0,4e:front-io-fru-prom" - -# PDB FRU PROM -name:/platform/i2c@1f,520000/pdb-fru-prom@0,da -PROP FRUDevicePath string r 0 "/devices/i2c@1f,520000/pdb-fru-prom@0,da:pdb-fru-prom" - -# Up to four power supplies, at least two must be present/running -name:/platform/i2c@1f,520000/power-supply-fru-prom?UnitAddress=0,24 -PROP FRUDevicePath string r 0 "/devices/i2c@1f,520000/power-supply-fru-prom@0,24:power-supply-fru-prom" - -name:/platform/i2c@1f,520000/power-supply-fru-prom?UnitAddress=0,32 -PROP FRUDevicePath string r 0 "/devices/i2c@1f,520000/power-supply-fru-prom@0,32:power-supply-fru-prom" - -name:/platform/i2c@1f,520000/power-supply-fru-prom?UnitAddress=0,52 -PROP FRUDevicePath string r 0 "/devices/i2c@1f,520000/power-supply-fru-prom@0,52:power-supply-fru-prom" - -name:/platform/i2c@1f,520000/power-supply-fru-prom?UnitAddress=0,72 -PROP FRUDevicePath string r 0 "/devices/i2c@1f,520000/power-supply-fru-prom@0,72:power-supply-fru-prom" diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/Makefile b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/Makefile deleted file mode 100644 index 92262af349..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/Makefile +++ /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 (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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. -# -# cmd/picl/plugins/sun4u/boston/frudr/Makefile -# -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-V445 -FRUDR_LINKTO_PLATFORM = SUNW,Sun-Fire-V240 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONFS = fru_PS0.conf fru_PS1.conf fru_PS2.conf fru_PS3.conf -CONFS += fru_HDD0.conf fru_HDD1.conf fru_HDD2.conf -CONFS += fru_HDD3.conf fru_HDD4.conf fru_HDD5.conf -CONFS += fru_HDD6.conf fru_HDD7.conf -CONFS += fru_SC.conf -CONFS += fru_usb-a-1.conf fru_usb-a-2.conf -CONFS += fru_usb-a-3.conf fru_usb-a-4.conf -CONFS += fru_FT0.conf fru_FT1.conf fru_FT2.conf -CONFS += fru_FT3.conf fru_FT4.conf fru_FT5.conf -ROOTCONF= $(CONFS:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 -MAININFO= $(CONFS:%.conf=%.info) -OTHERINFOS = fru_PS0_data.info fru_PS1_data.info fru_PS2_data.info fru_PS3_data.info -OTHERINFOS += fru_HDD0_data.info fru_HDD1_data.info -OTHERINFOS += fru_HDD2_data.info fru_HDD3_data.info -OTHERINFOS += fru_HDD3_data.info fru_HDD4_data.info -OTHERINFOS += fru_HDD6_data.info fru_HDD7_data.info -OTHERINFOS += fru_SC_data.info SB-tables.info -OTHERINFOS += fru_usb-a-1_data.info fru_usb-a-2_data.info -OTHERINFOS += fru_usb-a-3_data.info fru_usb-a-4_data.info -OTHERINFOS += fru_FT0_data.info fru_FT1_data.info fru_FT2_data.info -OTHERINFOS += fru_FT3_data.info fru_FT4_data.info fru_FT5_data.info - - -.KEEP_STATE: - -SUBDIRS = - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: $(LIBS) $(LIBLINKS) $(CONFS) - -install: $(ROOTLIBDIR) $(ROOTCONF) $(FRUDR_LINK) - $(MAKE) $(FRUDR_LINK) - -$(CONFS): $(MAININFO) $(OTHERINFOS) - @$(RM) -f $@ - @echo "# Copyright 2006 Sun Microsystems, Inc. All rights reserved." \ - > $@ - @echo "# Use is subject to license terms." >> $@ - @echo "# This is a generated file. #ident lines identify sources" >> $@ - $(CPP) -P $(@:%.conf=%.info) | \ - $(SED) -e '/^[ ]*$$/d' >> $@ - @$(CHMOD) 644 $@ - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: - -FRUDR_LINK=`cd $(ROOT_PLATFORM)/lib/picl/plugins/; \ -rm -f libpiclfrudr.so.1; \ -rm -f libpiclfrudr.so; \ -ln -s ../../../../$(FRUDR_LINKTO_PLATFORM)/lib/picl/plugins/libpiclfrudr.so.1 libpiclfrudr.so.1; \ -ln -s ../../../../$(FRUDR_LINKTO_PLATFORM)/lib/picl/plugins/libpiclfrudr.so libpiclfrudr.so;` diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/SB-tables.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/SB-tables.info deleted file mode 100644 index 1865125ea4..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/SB-tables.info +++ /dev/null @@ -1,501 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This file creates device tables for all of the fru's in the system - * (except for hard disk drives and power supplies.) Each table contains - * one or more rows of devices, each with a reference to a particular - * device/sensor. - * - * This file will be #included by piclfrutree.info. It should be included - * after the frutree and system hierarchies are defined. - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -/* - * add a Devices table to DVD - */ -name:/frutree/chassis/MB/system-board/RMD0/removable-media - TABLE Devices - ROW - PROP Class string r 0 "cdrom" - REFPROP _cdrom_ name:/platform/pci@1f,700000/pci@0/pci@1/pci@0/ide@1f/sd@0,0 - ENDROW - ENDTABLE - -/* - * add Devices table for the chassis - */ -name:/frutree/chassis - TABLE Devices - ROW - REFPROP _chassis-serial-number_ name:RMCLOMV/chassis_serial_number - ENDROW - ENDTABLE - -/* - * add a Devices table to the system-board - */ -name:/frutree/chassis/MB/system-board - TABLE Devices - ROW - PROP Class string r 0 "voltage-sensor" - REFPROP _voltage-sensor_ name:RMCLOMV/mb_v_+1v0 - PROP Label string r 0 "V_+1V0" - ENDROW - ROW - PROP Class string r 0 "voltage-sensor" - REFPROP _voltage-sensor_ name:RMCLOMV/mb_v_+1v2 - PROP Label string r 0 "V_+1V2" - ENDROW - ROW - PROP Class string r 0 "voltage-sensor" - REFPROP _voltage-sensor_ name:RMCLOMV/mb_v_+1v5 - PROP Label string r 0 "V_+1V5" - ENDROW - ROW - PROP Class string r 0 "voltage-sensor" - REFPROP _voltage-sensor_ name:RMCLOMV/mb_v_+1v8 - PROP Label string r 0 "V_+1V8" - ENDROW - ROW - PROP Class string r 0 "voltage-sensor" - REFPROP _voltage-sensor_ name:RMCLOMV/mb_v_+2v5 - PROP Label string r 0 "V_+2V5" - ENDROW - ROW - PROP Class string r 0 "voltage-sensor" - REFPROP _voltage-sensor_ name:RMCLOMV/mb_v_+3v3 - PROP Label string r 0 "V_+3V3" - ENDROW - ROW - PROP Class string r 0 "voltage-sensor" - REFPROP _voltage-sensor_ name:RMCLOMV/mb_v_+3v3stby - PROP Label string r 0 "V_+3V3STBY" - ENDROW - ROW - PROP Class string r 0 "voltage-sensor" - REFPROP _voltage-sensor_ name:RMCLOMV/mb_v_+5v - PROP Label string r 0 "V_+5V" - ENDROW - ROW - PROP Class string r 0 "voltage-sensor" - REFPROP _voltage-sensor_ name:RMCLOMV/mb_v_+12v - PROP Label string r 0 "V_+12V" - ENDROW - ROW - PROP Class string r 0 "voltage-sensor" - REFPROP _voltage-sensor_ name:RMCLOMV/mb_v_-12v - PROP Label string r 0 "V_-12V" - ENDROW - ROW - PROP Class string r 0 "current-indicator" - REFPROP _current-indicator_ name:RMCLOMV/mb_i_usb0 - PROP Label string r 0 "I_USB0" - ENDROW - ROW - PROP Class string r 0 "current-indicator" - REFPROP _current-indicator_ name:RMCLOMV/mb_i_usb1 - PROP Label string r 0 "I_USB1" - ENDROW - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:RMCLOMV/fire_t_core - ENDROW - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:RMCLOMV/fiob_t_amb - ENDROW - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:RMCLOMV/mb_t_amb - ENDROW - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:RMCLOMV/mb_io_t_amb - ENDROW - ROW - PROP Class string r 0 "current-indicator" - REFPROP _current-indicator_ name:RMCLOMV/mb_ff_pok - ENDROW - ENDTABLE - -/* - * add a Devices table to the battery - */ -name:/frutree/chassis/MB/system-board/SC/service-processor/BATTERY/battery - TABLE Devices - ROW - PROP Class string r 0 "voltage-sensor" - REFPROP _voltage-sensor_ name:RMCLOMV/sc_bat_v_bat - PROP Label string r 0 "V_BAT" - ENDROW - ENDTABLE - -/* - * add a Devices table to the front IO board - */ -name:/frutree/chassis/MB/system-board/FIOB/front-IO-board - TABLE Devices - ROW - PROP Class string r 0 "current-indicator" - REFPROP _current-indicator_ name:RMCLOMV/fiob_i_usb2 - PROP Label string r 0 "I_USB2" - ENDROW - ROW - PROP Class string r 0 "current-indicator" - REFPROP _current-indicator_ name:RMCLOMV/fiob_i_usb3 - PROP Label string r 0 "I_USB3" - ENDROW - ENDTABLE - -/* - * add a Devices table to the service-processor - */ -name:/frutree/chassis/MB/system-board/SC/service-processor - TABLE Devices - ROW - PROP Class string r 0 "service-processor" - REFPROP _service-processor_ name:RMCLOMV - ENDROW - ROW - PROP Class string r 0 "keyswitch" - REFPROP _keyswitch_ name:RMCLOMV/keyswitch - ENDROW - ENDTABLE - -/* - * Add Devices for cpu-board related sensors - */ -name:/frutree/chassis/MB/system-board/C0/cpu-module - TABLE Devices - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:RMCLOMV/c0_t_amb - ENDROW - ROW - PROP Class string r 0 "current-indicator" - REFPROP _current-indicator_ name:RMCLOMV/c0_p0_ff_pok - ENDROW - ENDTABLE - -name:/frutree/chassis/MB/system-board/C1/cpu-module - TABLE Devices - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:RMCLOMV/c1_t_amb - ENDROW - ROW - PROP Class string r 0 "current-indicator" - REFPROP _current-indicator_ name:RMCLOMV/c1_p0_ff_pok - ENDROW - ENDTABLE - -name:/frutree/chassis/MB/system-board/C2/cpu-module - TABLE Devices - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:RMCLOMV/c2_t_amb - ENDROW - ROW - PROP Class string r 0 "current-indicator" - REFPROP _current-indicator_ name:RMCLOMV/c2_p0_ff_pok - ENDROW - ENDTABLE - -name:/frutree/chassis/MB/system-board/C3/cpu-module - TABLE Devices - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:RMCLOMV/c3_t_amb - ENDROW - ROW - PROP Class string r 0 "current-indicator" - REFPROP _current-indicator_ name:RMCLOMV/c3_p0_ff_pok - ENDROW - ENDTABLE - -/* - * add Devices tables for cpu-related sensors - */ -name:/frutree/chassis/MB/system-board/C0/cpu-module/P0/cpu - TABLE Devices - ROW - PROP Class string r 0 "cpu" - REFPROP _cpu_ name:/platform/SUNW,UltraSPARC-IIIi+@0,0 - REFPROP _cpu_ name:/platform/SUNW,UltraSPARC-IIIi@0,0 - ENDROW - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:RMCLOMV/c0_p0_t_core - ENDROW - ENDTABLE - -name:/frutree/chassis/MB/system-board/C1/cpu-module/P0/cpu - TABLE Devices - ROW - PROP Class string r 0 "cpu" - REFPROP _cpu_ name:/platform/SUNW,UltraSPARC-IIIi+@1,0 - REFPROP _cpu_ name:/platform/SUNW,UltraSPARC-IIIi@1,0 - ENDROW - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:RMCLOMV/c1_p0_t_core - ENDROW - ENDTABLE - -name:/frutree/chassis/MB/system-board/C2/cpu-module/P0/cpu - TABLE Devices - ROW - PROP Class string r 0 "cpu" - REFPROP _cpu_ name:/platform/SUNW,UltraSPARC-IIIi+@2,0 - REFPROP _cpu_ name:/platform/SUNW,UltraSPARC-IIIi@2,0 - ENDROW - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:RMCLOMV/c2_p0_t_core - ENDROW - ENDTABLE - -name:/frutree/chassis/MB/system-board/C3/cpu-module/P0/cpu - TABLE Devices - ROW - PROP Class string r 0 "cpu" - REFPROP _cpu_ name:/platform/SUNW,UltraSPARC-IIIi+@3,0 - REFPROP _cpu_ name:/platform/SUNW,UltraSPARC-IIIi@3,0 - ENDROW - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:RMCLOMV/c3_p0_t_core - ENDROW - ENDTABLE - -/* - * Add devices tables for all 16 of the memory modules - */ -name:/frutree/chassis/MB/system-board/C0/cpu-module/P0/cpu/B0/bank/D0/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@0,0/memory-module-group?ID=0/memory-module?ID=0 - ENDROW - ENDTABLE - -name:/frutree/chassis/MB/system-board/C0/cpu-module/P0/cpu/B0/bank/D1/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@0,0/memory-module-group?ID=0/memory-module?ID=1 - ENDROW - ENDTABLE - -name:/frutree/chassis/MB/system-board/C0/cpu-module/P0/cpu/B1/bank/D0/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@0,0/memory-module-group?ID=1/memory-module?ID=0 - ENDROW - ENDTABLE - -name:/frutree/chassis/MB/system-board/C0/cpu-module/P0/cpu/B1/bank/D1/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@0,0/memory-module-group?ID=1/memory-module?ID=1 - ENDROW - ENDTABLE - -name:/frutree/chassis/MB/system-board/C1/cpu-module/P0/cpu/B0/bank/D0/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@1,0/memory-module-group?ID=0/memory-module?ID=0 - ENDROW - ENDTABLE - -name:/frutree/chassis/MB/system-board/C1/cpu-module/P0/cpu/B0/bank/D1/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@1,0/memory-module-group?ID=0/memory-module?ID=1 - ENDROW - ENDTABLE - -name:/frutree/chassis/MB/system-board/C1/cpu-module/P0/cpu/B1/bank/D0/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@1,0/memory-module-group?ID=1/memory-module?ID=0 - ENDROW - ENDTABLE - -name:/frutree/chassis/MB/system-board/C1/cpu-module/P0/cpu/B1/bank/D1/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@1,0/memory-module-group?ID=1/memory-module?ID=1 - ENDROW - ENDTABLE - -name:/frutree/chassis/MB/system-board/C2/cpu-module/P0/cpu/B0/bank/D0/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@2,0/memory-module-group?ID=0/memory-module?ID=0 - ENDROW - ENDTABLE - -name:/frutree/chassis/MB/system-board/C2/cpu-module/P0/cpu/B0/bank/D1/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@2,0/memory-module-group?ID=0/memory-module?ID=1 - ENDROW - ENDTABLE - -name:/frutree/chassis/MB/system-board/C2/cpu-module/P0/cpu/B1/bank/D0/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@2,0/memory-module-group?ID=1/memory-module?ID=0 - ENDROW - ENDTABLE - -name:/frutree/chassis/MB/system-board/C2/cpu-module/P0/cpu/B1/bank/D1/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@2,0/memory-module-group?ID=1/memory-module?ID=1 - ENDROW - ENDTABLE - -name:/frutree/chassis/MB/system-board/C3/cpu-module/P0/cpu/B0/bank/D0/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@3,0/memory-module-group?ID=0/memory-module?ID=0 - ENDROW - ENDTABLE - -name:/frutree/chassis/MB/system-board/C3/cpu-module/P0/cpu/B0/bank/D1/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@3,0/memory-module-group?ID=0/memory-module?ID=1 - ENDROW - ENDTABLE - -name:/frutree/chassis/MB/system-board/C3/cpu-module/P0/cpu/B1/bank/D0/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@3,0/memory-module-group?ID=1/memory-module?ID=0 - ENDROW - ENDTABLE - -name:/frutree/chassis/MB/system-board/C3/cpu-module/P0/cpu/B1/bank/D1/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@3,0/memory-module-group?ID=1/memory-module?ID=1 - ENDROW - ENDTABLE - -/* - * System leds device table - */ -name:/frutree/chassis/MB/system-board/FIOB/front-IO-board/FLEDB/front-led-board -TABLE Devices - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/sys_act - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/sys_service - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/sys_locate - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/sys_fanfail - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/sys_psfail - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/sys_overtemp - ENDROW -ENDTABLE - -/* - * Add a device table for the PDB (fan fault leds are located here) - */ -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8 -TABLE Devices - ROW - PROP Class string r 0 "led" - PROP Label string r 0 "ft0_f0_fault" - REFPROP _led_ name:RMCLOMV/ft0_f0_fault - ENDROW - ROW - PROP Class string r 0 "led" - PROP Label string r 0 "ft1_f0_fault" - REFPROP _led_ name:RMCLOMV/ft1_f0_fault - ENDROW - ROW - PROP Class string r 0 "led" - PROP Label string r 0 "ft2_f0_fault" - REFPROP _led_ name:RMCLOMV/ft2_f0_fault - ENDROW - ROW - PROP Class string r 0 "led" - PROP Label string r 0 "ft3_f0_fault" - REFPROP _led_ name:RMCLOMV/ft3_f0_fault - ENDROW - ROW - PROP Class string r 0 "led" - PROP Label string r 0 "ft4_f0_fault" - REFPROP _led_ name:RMCLOMV/ft4_f0_fault - ENDROW - ROW - PROP Class string r 0 "led" - PROP Label string r 0 "ft5_f0_fault" - REFPROP _led_ name:RMCLOMV/ft5_f0_fault - ENDROW -ENDTABLE diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT0.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT0.info deleted file mode 100644 index 3d623be652..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT0.info +++ /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 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL frudr plugin in response - * to a PICL_FRU_ADDED event for FT0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -name:/frutree/chassis/MB/system-board/FT0/fan-tray - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - ENDNODE - -#include "fru_FT0_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT0_data.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT0_data.info deleted file mode 100644 index aa774ce30c..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT0_data.info +++ /dev/null @@ -1,89 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL envmon plugin in response - * to a PICL_FRU_ADDED event for FT0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -#ifndef RMCLOMV -#define RMCLOMV /platform/ebus@1f,464000/rmc-comm@0,c28000/SUNW,rmclomv -#endif - -/* - * Parent for the fan tachometer - */ -name:RMCLOMV/ft0_f0_tach - REFPROP _location_parent name:/frutree/chassis/MB/system-board/FT0/fan-tray/F0 - -/* - * Device table for the fan - */ -name:/frutree/chassis/MB/system-board/FT0/fan-tray/F0 - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/ft0_f0_tach - ENDROW - ENDTABLE diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT1.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT1.info deleted file mode 100644 index dc042e9290..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT1.info +++ /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 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL frudr plugin in response - * to a PICL_FRU_ADDED event for FT1 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -name:/frutree/chassis/MB/system-board/FT1/fan-tray - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - ENDNODE - -#include "fru_FT1_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT1_data.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT1_data.info deleted file mode 100644 index e9b87e5804..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT1_data.info +++ /dev/null @@ -1,89 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL envmon plugin in response - * to a PICL_FRU_ADDED event for FT1 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -#ifndef RMCLOMV -#define RMCLOMV /platform/ebus@1f,464000/rmc-comm@0,c28000/SUNW,rmclomv -#endif - -/* - * Parent for the fan tachometer - */ -name:RMCLOMV/ft1_f0_tach - REFPROP _location_parent name:/frutree/chassis/MB/system-board/FT1/fan-tray/F0 - -/* - * Device table for the fan - */ -name:/frutree/chassis/MB/system-board/FT1/fan-tray/F0 - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/ft1_f0_tach - ENDROW - ENDTABLE diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT2.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT2.info deleted file mode 100644 index 0dc224a54f..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT2.info +++ /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 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL frudr plugin in response - * to a PICL_FRU_ADDED event for FT2 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -name:/frutree/chassis/MB/system-board/FT2/fan-tray - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - ENDNODE - -#include "fru_FT2_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT2_data.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT2_data.info deleted file mode 100644 index 8feaacb17f..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT2_data.info +++ /dev/null @@ -1,89 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL envmon plugin in response - * to a PICL_FRU_ADDED event for FT2 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -#ifndef RMCLOMV -#define RMCLOMV /platform/ebus@1f,464000/rmc-comm@0,c28000/SUNW,rmclomv -#endif - -/* - * Parent for the fan tachometer - */ -name:RMCLOMV/ft2_f0_tach - REFPROP _location_parent name:/frutree/chassis/MB/system-board/FT2/fan-tray/F0 - -/* - * Device table for the fan - */ -name:/frutree/chassis/MB/system-board/FT2/fan-tray/F0 - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/ft2_f0_tach - ENDROW - ENDTABLE diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT3.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT3.info deleted file mode 100644 index cd7652e118..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT3.info +++ /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 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL frudr plugin in response - * to a PICL_FRU_ADDED event for FT3 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -name:/frutree/chassis/MB/system-board/FT3/fan-tray - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - ENDNODE - -#include "fru_FT3_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT3_data.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT3_data.info deleted file mode 100644 index 13d16aa8c1..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT3_data.info +++ /dev/null @@ -1,89 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL envmon plugin in response - * to a PICL_FRU_ADDED event for FT3 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -#ifndef RMCLOMV -#define RMCLOMV /platform/ebus@1f,464000/rmc-comm@0,c28000/SUNW,rmclomv -#endif - -/* - * Parent for the fan tachometer - */ -name:RMCLOMV/ft3_f0_tach - REFPROP _location_parent name:/frutree/chassis/MB/system-board/FT3/fan-tray/F0 - -/* - * Device table for the fan - */ -name:/frutree/chassis/MB/system-board/FT3/fan-tray/F0 - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/ft3_f0_tach - ENDROW - ENDTABLE diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT4.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT4.info deleted file mode 100644 index 950a42121a..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT4.info +++ /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 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL frudr plugin in response - * to a PICL_FRU_ADDED event for FT4 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -name:/frutree/chassis/MB/system-board/FT4/fan-tray - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - ENDNODE - -#include "fru_FT4_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT4_data.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT4_data.info deleted file mode 100644 index 7ce327d4fc..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT4_data.info +++ /dev/null @@ -1,89 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL envmon plugin in response - * to a PICL_FRU_ADDED event for FT4 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -#ifndef RMCLOMV -#define RMCLOMV /platform/ebus@1f,464000/rmc-comm@0,c28000/SUNW,rmclomv -#endif - -/* - * Parent for the fan tachometer - */ -name:RMCLOMV/ft4_f0_tach - REFPROP _location_parent name:/frutree/chassis/MB/system-board/FT4/fan-tray/F0 - -/* - * Device table for the fan - */ -name:/frutree/chassis/MB/system-board/FT4/fan-tray/F0 - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/ft4_f0_tach - ENDROW - ENDTABLE diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT5.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT5.info deleted file mode 100644 index c45e8c2419..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT5.info +++ /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 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL frudr plugin in response - * to a PICL_FRU_ADDED event for FT5 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -name:/frutree/chassis/MB/system-board/FT5/fan-tray - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - ENDNODE - -#include "fru_FT5_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT5_data.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT5_data.info deleted file mode 100644 index 40bc358f0a..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_FT5_data.info +++ /dev/null @@ -1,89 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL envmon plugin in response - * to a PICL_FRU_ADDED event for FT5 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -#ifndef RMCLOMV -#define RMCLOMV /platform/ebus@1f,464000/rmc-comm@0,c28000/SUNW,rmclomv -#endif - -/* - * Parent for the fan tachometer - */ -name:RMCLOMV/ft5_f0_tach - REFPROP _location_parent name:/frutree/chassis/MB/system-board/FT5/fan-tray/F0 - -/* - * Device table for the fan - */ -name:/frutree/chassis/MB/system-board/FT5/fan-tray/F0 - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/ft5_f0_tach - ENDROW - ENDTABLE diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD0.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD0.info deleted file mode 100644 index 188044054e..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD0.info +++ /dev/null @@ -1,73 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL frudr plugin in response - * to a PICL_FRU_ADDED event for HDD0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_HDD0_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD0_data.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD0_data.info deleted file mode 100644 index 5d5478c00a..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD0_data.info +++ /dev/null @@ -1,107 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for HDD0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD0/disk - TABLE Devices - ROW - PROP Class string r 0 "block" - REFPROP _block_ name:/platform/pci@1e,600000/pci@0/pci@2/scsi@0/sd@0,0 - ENDROW - ROW - PROP Class string r 0 "block" - REFPROP _block_ name:/platform/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@1/sd@0,0 - ENDROW - ENDTABLE - -name:/platform/pci@1e,600000/pci@0/pci@2/scsi@0/sd@0,0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD0/disk -name:/platform/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@1/sd@0,0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD0/disk - -name:RMCLOMV/hdd0_service - REFPROP _location_parent name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD0 -name:RMCLOMV/hdd0_ok2rm - REFPROP _location_parent name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD0 - -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD0/disk - PROP OperationalStatus string r 0 "present" - -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD0 - TABLE Devices - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd0_service - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd0_ok2rm - ENDROW - ENDTABLE - diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD1.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD1.info deleted file mode 100644 index dfc5211b6c..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD1.info +++ /dev/null @@ -1,74 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL frudr plugin in response - * to a PICL_FRU_ADDED event for HDD1 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_HDD1_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD1_data.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD1_data.info deleted file mode 100644 index b71b8dd380..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD1_data.info +++ /dev/null @@ -1,107 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for HDD1 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD1/disk -TABLE Devices -ROW -PROP Class string r 0 "block" -REFPROP _block_ name:/platform/pci@1e,600000/pci@0/pci@2/scsi@0/sd@1,0 -ENDROW -ROW -PROP Class string r 0 "block" -REFPROP _block_ name:/platform/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@1/sd@1,0 -ENDROW -ENDTABLE - -name:/platform/pci@1e,600000/pci@0/pci@2/scsi@0/sd@1,0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD1/disk -name:/platform/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@1/sd@1,0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD1/disk - -name:RMCLOMV/hdd1_service - REFPROP _location_parent name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD1 -name:RMCLOMV/hdd1_ok2rm - REFPROP _location_parent name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD1 - -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD1/disk - PROP OperationalStatus string r 0 "present" - -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD1 - TABLE Devices - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd1_service - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd1_ok2rm - ENDROW - ENDTABLE - diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD2.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD2.info deleted file mode 100644 index a584d22d76..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD2.info +++ /dev/null @@ -1,75 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL frudr plugin in response - * to a PICL_FRU_ADDED event for HDD2 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_HDD2_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD2_data.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD2_data.info deleted file mode 100644 index 4db89050c3..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD2_data.info +++ /dev/null @@ -1,107 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for HDD2 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD2/disk -TABLE Devices -ROW -PROP Class string r 0 "block" -REFPROP _block_ name:/platform/pci@1e,600000/pci@0/pci@2/scsi@0/sd@2,0 -ENDROW -ROW -PROP Class string r 0 "block" -REFPROP _block_ name:/platform/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@1/sd@2,0 -ENDROW -ENDTABLE - -name:/platform/pci@1e,600000/pci@0/pci@2/scsi@0/sd@2,0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD2/disk -name:/platform/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@1/sd@2,0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD2/disk - -name:RMCLOMV/hdd2_service - REFPROP _location_parent name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD2 -name:RMCLOMV/hdd2_ok2rm - REFPROP _location_parent name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD2 - -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD2/disk - PROP OperationalStatus string r 0 "present" - -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD2 - TABLE Devices - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd2_service - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd2_ok2rm - ENDROW - ENDTABLE - diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD3.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD3.info deleted file mode 100644 index 1dcc8235ee..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD3.info +++ /dev/null @@ -1,74 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL frudr plugin in response - * to a PICL_FRU_ADDED event for HDD3 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_HDD3_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD3_data.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD3_data.info deleted file mode 100644 index bd49a775d6..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD3_data.info +++ /dev/null @@ -1,107 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for HDD3 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD3/disk -TABLE Devices -ROW -PROP Class string r 0 "block" -REFPROP _block_ name:/platform/pci@1e,600000/pci@0/pci@2/scsi@0/sd@3,0 -ENDROW -ROW -PROP Class string r 0 "block" -REFPROP _block_ name:/platform/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@1/sd@3,0 -ENDROW -ENDTABLE - -name:/platform/pci@1e,600000/pci@0/pci@2/scsi@0/sd@3,0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD3/disk -name:/platform/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@1/sd@3,0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD3/disk - -name:RMCLOMV/hdd3_service - REFPROP _location_parent name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD3 -name:RMCLOMV/hdd3_ok2rm - REFPROP _location_parent name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD3 - -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD3/disk - PROP OperationalStatus string r 0 "present" - -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD3 - TABLE Devices - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd3_service - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd3_ok2rm - ENDROW - ENDTABLE - diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD4.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD4.info deleted file mode 100644 index 9d51e0a6cf..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD4.info +++ /dev/null @@ -1,74 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL frudr plugin in response - * to a PICL_FRU_ADDED event for HDD4 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_HDD4_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD4_data.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD4_data.info deleted file mode 100644 index 038232c0e1..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD4_data.info +++ /dev/null @@ -1,113 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for HDD4 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD4/disk - TABLE Devices - ROW - PROP Class string r 0 "block" - REFPROP _block_ name:/platform/pci@1e,600000/pci@0/pci@2/scsi@0/sd@4,0 - ENDROW - ROW - PROP Class string r 0 "block" - REFPROP _block_ name:/platform/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@1/sd@4,0 - ENDROW - ROW - PROP Class string r 0 "block" - REFPROP _block_ name:/platform/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@2/sd@4,0 - ENDROW -ENDTABLE - -name:/platform/pci@1e,600000/pci@0/pci@2/scsi@0/sd@4,0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD4/disk -name:/platform/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@1/sd@4,0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD4/disk -name:/platform/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@2/sd@4,0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD4/disk - -name:RMCLOMV/hdd4_service - REFPROP _location_parent name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD4 -name:RMCLOMV/hdd4_ok2rm - REFPROP _location_parent name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD4 - -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD4/disk - PROP OperationalStatus string r 0 "present" - -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD4 - TABLE Devices - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd4_service - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd4_ok2rm - ENDROW - ENDTABLE - diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD5.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD5.info deleted file mode 100644 index 36a8c5a0ec..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD5.info +++ /dev/null @@ -1,74 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL frudr plugin in response - * to a PICL_FRU_ADDED event for HDD5 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_HDD5_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD5_data.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD5_data.info deleted file mode 100644 index c681e2287c..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD5_data.info +++ /dev/null @@ -1,113 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for HDD5 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD5/disk -TABLE Devices -ROW -PROP Class string r 0 "block" -REFPROP _block_ name:/platform/pci@1e,600000/pci@0/pci@2/scsi@0/sd@5,0 -ENDROW -ROW -PROP Class string r 0 "block" -REFPROP _block_ name:/platform/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@1/sd@5,0 -ENDROW -ROW -PROP Class string r 0 "block" -REFPROP _block_ name:/platform/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@2/sd@5,0 -ENDROW -ENDTABLE - -name:/platform/pci@1e,600000/pci@0/pci@2/scsi@0/sd@5,0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD5/disk -name:/platform/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@1/sd@5,0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD5/disk -name:/platform/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@2/sd@5,0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD5/disk - -name:RMCLOMV/hdd5_service - REFPROP _location_parent name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD5 -name:RMCLOMV/hdd5_ok2rm - REFPROP _location_parent name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD5 - -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD5/disk - PROP OperationalStatus string r 0 "present" - -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD5 - TABLE Devices - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd5_service - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd5_ok2rm - ENDROW - ENDTABLE - diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD6.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD6.info deleted file mode 100644 index fb204a5227..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD6.info +++ /dev/null @@ -1,74 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL frudr plugin in response - * to a PICL_FRU_ADDED event for HDD6 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_HDD6_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD6_data.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD6_data.info deleted file mode 100644 index cd982ce04d..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD6_data.info +++ /dev/null @@ -1,113 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for HDD6 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD6/disk -TABLE Devices -ROW -PROP Class string r 0 "block" -REFPROP _block_ name:/platform/pci@1e,600000/pci@0/pci@2/scsi@0/sd@6,0 -ENDROW -ROW -PROP Class string r 0 "block" -REFPROP _block_ name:/platform/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@1/sd@6,0 -ENDROW -ROW -PROP Class string r 0 "block" -REFPROP _block_ name:/platform/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@2/sd@6,0 -ENDROW -ENDTABLE - -name:/platform/pci@1e,600000/pci@0/pci@2/scsi@0/sd@6,0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD6/disk -name:/platform/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@1/sd@6,0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD6/disk -name:/platform/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@2/sd@6,0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD6/disk - -name:RMCLOMV/hdd6_service - REFPROP _location_parent name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD6 -name:RMCLOMV/hdd6_ok2rm - REFPROP _location_parent name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD6 - -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD6/disk - PROP OperationalStatus string r 0 "present" - -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD6 - TABLE Devices - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd6_service - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd6_ok2rm - ENDROW - ENDTABLE - diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD7.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD7.info deleted file mode 100644 index fcebff7ce9..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD7.info +++ /dev/null @@ -1,74 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL frudr plugin in response - * to a PICL_FRU_ADDED event for HDD7 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_HDD7_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD7_data.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD7_data.info deleted file mode 100644 index fd4f253a9d..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_HDD7_data.info +++ /dev/null @@ -1,113 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for HDD7 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD7/disk -TABLE Devices -ROW -PROP Class string r 0 "block" -REFPROP _block_ name:/platform/pci@1e,600000/pci@0/pci@2/scsi@0/sd@7,0 -ENDROW -ROW -PROP Class string r 0 "block" -REFPROP _block_ name:/platform/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@1/sd@7,0 -ENDROW -ROW -PROP Class string r 0 "block" -REFPROP _block_ name:/platform/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@2/sd@7,0 -ENDROW -ENDTABLE - -name:/platform/pci@1e,600000/pci@0/pci@2/scsi@0/sd@7,0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD7/disk -name:/platform/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@1/sd@7,0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD7/disk -name:/platform/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@2/sd@7,0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD7/disk - -name:RMCLOMV/hdd7_service - REFPROP _location_parent name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD7 -name:RMCLOMV/hdd7_ok2rm - REFPROP _location_parent name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD7 - -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD7/disk - PROP OperationalStatus string r 0 "present" - -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD7 - TABLE Devices - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd7_service - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd7_ok2rm - ENDROW - ENDTABLE - diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_PS0.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_PS0.info deleted file mode 100644 index 95dd7621d0..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_PS0.info +++ /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 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -/* create a /platform node for the seeprom */ -name:/platform/i2c@1f,520000/power-supply-fru-prom@0,24 - PROP binding-name string r 0 "i2c-at34c02" - PROP driver-name string r 0 "seeprom" - PROP devfs-path string r 0 "/i2c@1f,520000/power-supply-fru-prom" - PROP compatible string r 0 "i2c-at34c02" - PROP device_type string r 0 "fru-prom" - PROP UnitAddress string r 0 "0,24" - -/* and then add /frutree node and cross-references */ -#include "fru_PS0_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_PS0_data.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_PS0_data.info deleted file mode 100644 index 4b2d44325a..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_PS0_data.info +++ /dev/null @@ -1,144 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL frudr plugin in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -#ifndef RMCLOMV -#define RMCLOMV /platform/ebus@1f,464000/rmc-comm@0,c28000/SUNW,rmclomv -#endif /* RMCLOMV */ - -name:/frutree/chassis/PS0/power-supply - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,520000/power-supply-fru-prom@0,24 -TABLE Devices -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps0_pok -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps0_stby -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps0_service -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps0_ff_pok -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps0_p_pwr -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps0_ff_uv -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps0_ff_ov -ENDROW -ROW -PROP Class string r 0 "current-indicator" -REFPROP _current-indicator_ name:RMCLOMV/ps0_ff_oc -ENDROW -ROW -PROP Class string r 0 "temperature-indicator" -REFPROP _temperature-indicator_ name:RMCLOMV/ps0_ff_ot -ENDROW -ROW -PROP Class string r 0 "fan" -REFPROP _fan_ name:RMCLOMV/ps0_ff_fan -ENDROW -ENDTABLE - -name:/platform/i2c@1f,520000/power-supply-fru-prom@0,24 - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply - PROP FRUDevicePath string r 0 "/devices/i2c@1f,520000/power-supply-fru-prom@0,24:power-supply-fru-prom" - -name:RMCLOMV/ps0_pok - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_stby - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_service - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_ff_pok - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_p_pwr - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_ff_uv - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_ff_ov - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_ff_oc - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_ff_ot - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_ff_fan - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_PS1.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_PS1.info deleted file mode 100644 index 8d15671ede..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_PS1.info +++ /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 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS1 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -/* create a /platform node for the seeprom */ -name:/platform/i2c@1f,520000/power-supply-fru-prom@0,32 - PROP binding-name string r 0 "i2c-at34c02" - PROP driver-name string r 0 "seeprom" - PROP devfs-path string r 0 "/i2c@1f,520000/power-supply-fru-prom" - PROP compatible string r 0 "i2c-at34c02" - PROP device_type string r 0 "fru-prom" - PROP UnitAddress string r 0 "0,32" - -/* and then add /frutree node and cross-references */ -#include "fru_PS1_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_PS1_data.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_PS1_data.info deleted file mode 100644 index dc5c1a9413..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_PS1_data.info +++ /dev/null @@ -1,144 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL frudr plugin in response - * to a PICL_FRU_ADDED event for PS1 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -#ifndef RMCLOMV -#define RMCLOMV /platform/ebus@1f,464000/rmc-comm@0,c28000/SUNW,rmclomv -#endif /* RMCLOMV */ - -name:/frutree/chassis/PS1/power-supply - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,520000/power-supply-fru-prom@0,32 -TABLE Devices -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps1_pok -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps1_stby -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps1_service -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps1_ff_pok -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps1_p_pwr -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps1_ff_uv -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps1_ff_ov -ENDROW -ROW -PROP Class string r 0 "current-indicator" -REFPROP _current-indicator_ name:RMCLOMV/ps1_ff_oc -ENDROW -ROW -PROP Class string r 0 "temperature-indicator" -REFPROP _temperature-indicator_ name:RMCLOMV/ps1_ff_ot -ENDROW -ROW -PROP Class string r 0 "fan" -REFPROP _fan_ name:RMCLOMV/ps1_ff_fan -ENDROW -ENDTABLE - -name:/platform/i2c@1f,520000/power-supply-fru-prom@0,32 - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply - PROP FRUDevicePath string r 0 "/devices/i2c@1f,520000/power-supply-fru-prom@0,32:power-supply-fru-prom" - -name:RMCLOMV/ps1_pok - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply -name:RMCLOMV/ps1_stby - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply -name:RMCLOMV/ps1_service - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply -name:RMCLOMV/ps1_ff_pok - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply -name:RMCLOMV/ps1_p_pwr - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply -name:RMCLOMV/ps1_ff_uv - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply -name:RMCLOMV/ps1_ff_ov - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply -name:RMCLOMV/ps1_ff_oc - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply -name:RMCLOMV/ps1_ff_ot - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply -name:RMCLOMV/ps1_ff_fan - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_PS2.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_PS2.info deleted file mode 100644 index e017520f17..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_PS2.info +++ /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 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS2 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -/* create a /platform node for the seeprom */ -name:/platform/i2c@1f,520000/power-supply-fru-prom@0,52 - PROP binding-name string r 0 "i2c-at34c02" - PROP driver-name string r 0 "seeprom" - PROP devfs-path string r 0 "/i2c@1f,520000/power-supply-fru-prom" - PROP compatible string r 0 "i2c-at34c02" - PROP device_type string r 0 "fru-prom" - PROP UnitAddress string r 0 "0,52" - -/* and then add /frutree node and cross-references */ -#include "fru_PS2_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_PS2_data.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_PS2_data.info deleted file mode 100644 index 022c2c48c6..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_PS2_data.info +++ /dev/null @@ -1,144 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL frudr plugin in response - * to a PICL_FRU_ADDED event for PS2 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -#ifndef RMCLOMV -#define RMCLOMV /platform/ebus@1f,464000/rmc-comm@0,c28000/SUNW,rmclomv -#endif /* RMCLOMV */ - -name:/frutree/chassis/PS2/power-supply - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,520000/power-supply-fru-prom@0,52 -TABLE Devices -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps2_pok -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps2_stby -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps2_service -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps2_ff_pok -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps2_p_pwr -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps2_ff_uv -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps2_ff_ov -ENDROW -ROW -PROP Class string r 0 "current-indicator" -REFPROP _current-indicator_ name:RMCLOMV/ps2_ff_oc -ENDROW -ROW -PROP Class string r 0 "temperature-indicator" -REFPROP _temperature-indicator_ name:RMCLOMV/ps2_ff_ot -ENDROW -ROW -PROP Class string r 0 "fan" -REFPROP _fan_ name:RMCLOMV/ps2_ff_fan -ENDROW -ENDTABLE - -name:/platform/i2c@1f,520000/power-supply-fru-prom@0,52 - REFPROP _fru_parent name:/frutree/chassis/PS2/power-supply - PROP FRUDevicePath string r 0 "/devices/i2c@1f,520000/power-supply-fru-prom@0,52:power-supply-fru-prom" - -name:RMCLOMV/ps2_pok - REFPROP _fru_parent name:/frutree/chassis/PS2/power-supply -name:RMCLOMV/ps2_stby - REFPROP _fru_parent name:/frutree/chassis/PS2/power-supply -name:RMCLOMV/ps2_service - REFPROP _fru_parent name:/frutree/chassis/PS2/power-supply -name:RMCLOMV/ps2_ff_pok - REFPROP _fru_parent name:/frutree/chassis/PS2/power-supply -name:RMCLOMV/ps2_p_pwr - REFPROP _fru_parent name:/frutree/chassis/PS2/power-supply -name:RMCLOMV/ps2_ff_uv - REFPROP _fru_parent name:/frutree/chassis/PS2/power-supply -name:RMCLOMV/ps2_ff_ov - REFPROP _fru_parent name:/frutree/chassis/PS2/power-supply -name:RMCLOMV/ps2_ff_oc - REFPROP _fru_parent name:/frutree/chassis/PS2/power-supply -name:RMCLOMV/ps2_ff_ot - REFPROP _fru_parent name:/frutree/chassis/PS2/power-supply -name:RMCLOMV/ps2_ff_fan - REFPROP _fru_parent name:/frutree/chassis/PS2/power-supply diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_PS3.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_PS3.info deleted file mode 100644 index bb503ea123..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_PS3.info +++ /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 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS3 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -/* create a /platform node for the seeprom */ -name:/platform/i2c@1f,520000/power-supply-fru-prom@0,72 - PROP binding-name string r 0 "i2c-at34c02" - PROP driver-name string r 0 "seeprom" - PROP devfs-path string r 0 "/i2c@1f,520000/power-supply-fru-prom" - PROP compatible string r 0 "i2c-at34c02" - PROP device_type string r 0 "fru-prom" - PROP UnitAddress string r 0 "0,72" - -/* and then add /frutree node and cross-references */ -#include "fru_PS3_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_PS3_data.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_PS3_data.info deleted file mode 100644 index 78ace3800d..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_PS3_data.info +++ /dev/null @@ -1,144 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL frudr plugin in response - * to a PICL_FRU_ADDED event for PS3 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -#ifndef RMCLOMV -#define RMCLOMV /platform/ebus@1f,464000/rmc-comm@0,c28000/SUNW,rmclomv -#endif /* RMCLOMV */ - -name:/frutree/chassis/PS3/power-supply - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,520000/power-supply-fru-prom@0,72 -TABLE Devices -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps3_pok -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps3_stby -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps3_service -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps3_ff_pok -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps3_p_pwr -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps3_ff_uv -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps3_ff_ov -ENDROW -ROW -PROP Class string r 0 "current-indicator" -REFPROP _current-indicator_ name:RMCLOMV/ps3_ff_oc -ENDROW -ROW -PROP Class string r 0 "temperature-indicator" -REFPROP _temperature-indicator_ name:RMCLOMV/ps3_ff_ot -ENDROW -ROW -PROP Class string r 0 "fan" -REFPROP _fan_ name:RMCLOMV/ps3_ff_fan -ENDROW -ENDTABLE - -name:/platform/i2c@1f,520000/power-supply-fru-prom@0,72 - REFPROP _fru_parent name:/frutree/chassis/PS3/power-supply - PROP FRUDevicePath string r 0 "/devices/i2c@1f,520000/power-supply-fru-prom@0,72:power-supply-fru-prom" - -name:RMCLOMV/ps3_pok - REFPROP _fru_parent name:/frutree/chassis/PS3/power-supply -name:RMCLOMV/ps3_stby - REFPROP _fru_parent name:/frutree/chassis/PS3/power-supply -name:RMCLOMV/ps3_service - REFPROP _fru_parent name:/frutree/chassis/PS3/power-supply -name:RMCLOMV/ps3_ff_pok - REFPROP _fru_parent name:/frutree/chassis/PS3/power-supply -name:RMCLOMV/ps3_p_pwr - REFPROP _fru_parent name:/frutree/chassis/PS3/power-supply -name:RMCLOMV/ps3_ff_uv - REFPROP _fru_parent name:/frutree/chassis/PS3/power-supply -name:RMCLOMV/ps3_ff_ov - REFPROP _fru_parent name:/frutree/chassis/PS3/power-supply -name:RMCLOMV/ps3_ff_oc - REFPROP _fru_parent name:/frutree/chassis/PS3/power-supply -name:RMCLOMV/ps3_ff_ot - REFPROP _fru_parent name:/frutree/chassis/PS3/power-supply -name:RMCLOMV/ps3_ff_fan - REFPROP _fru_parent name:/frutree/chassis/PS3/power-supply diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_SC.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_SC.info deleted file mode 100644 index 3d0347108b..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_SC.info +++ /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 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_SC_data.info" -#include "SB-tables.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_SC_data.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_SC_data.info deleted file mode 100644 index 254b3bb8dd..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_SC_data.info +++ /dev/null @@ -1,251 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - * This file captures all of the location and fru parents for the - * sensors and led's in the system, whose state is learned from - * ALOM via rmclomv. - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -/* - * There are a lot of nodes below the rmclomv node, define a shortname - */ - -#ifndef RMCLOMV -#define RMCLOMV /platform/ebus@1f,464000/rmc-comm@0,c28000/SUNW,rmclomv -#endif - -/* - * fru/location parents and device tables for the disks and their - * associated sensors - */ -#include "fru_HDD0_data.info" -#include "fru_HDD1_data.info" -#include "fru_HDD2_data.info" -#include "fru_HDD3_data.info" -#include "fru_HDD4_data.info" -#include "fru_HDD5_data.info" -#include "fru_HDD6_data.info" -#include "fru_HDD7_data.info" - -/* - * fru/location parents and device tables for the power supplies - */ -#include "fru_PS0_data.info" -#include "fru_PS1_data.info" -#include "fru_PS2_data.info" -#include "fru_PS3_data.info" - -/* - * usb ports - */ -#include "fru_usb-a-1_data.info" -#include "fru_usb-a-2_data.info" -#include "fru_usb-a-3_data.info" -#include "fru_usb-a-4_data.info" - -/* - * fans - */ -#include "fru_FT0_data.info" -#include "fru_FT1_data.info" -#include "fru_FT2_data.info" -#include "fru_FT3_data.info" -#include "fru_FT4_data.info" -#include "fru_FT5_data.info" - -/* - * parents for system leds - */ -name:RMCLOMV/sys_act - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/FIOB/front-IO-board/FLEDB/front-led-board -name:RMCLOMV/sys_service - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/FIOB/front-IO-board/FLEDB/front-led-board -name:RMCLOMV/sys_locate - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/FIOB/front-IO-board/FLEDB/front-led-board - PROP IsLocator string r 0 "true" - PROP LocatorName string r 0 "system" - PROP LocatorOn string r 0 "blinking" -name:RMCLOMV/sys_fanfail - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/FIOB/front-IO-board/FLEDB/front-led-board -name:RMCLOMV/sys_psfail - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/FIOB/front-IO-board/FLEDB/front-led-board -name:RMCLOMV/sys_overtemp - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/FIOB/front-IO-board/FLEDB/front-led-board - -/* - * parents for fan-fault led's - */ -name:RMCLOMV/ft0_f0_fault - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8 -name:RMCLOMV/ft1_f0_fault - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8 -name:RMCLOMV/ft2_f0_fault - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8 -name:RMCLOMV/ft3_f0_fault - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8 -name:RMCLOMV/ft4_f0_fault - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8 -name:RMCLOMV/ft5_f0_fault - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8 - -/* - * keyswitch parent - */ -name:RMCLOMV/keyswitch - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/SC/service-processor - PROP Label string r 0 "SYSCTRL" - -/* - * chassis serial number parent - */ - -name:RMCLOMV/chassis_serial_number - REFPROP _fru_parent name:/frutree/chassis - PROP Label string r 0 "CHASSISSERIAL" - -/* - * fru parents for motherboard sensors - */ -name:RMCLOMV/mb_v_+1v0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_v_+1v2 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_v_+1v5 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_v_+1v8 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_v_+2v5 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_v_+3v3 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_v_+3v3stby - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_v_+5v - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_v_+12v - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_v_-12v - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_i_usb0 - REFPROP _location_parent name:/frutree/chassis/MB/system-board/USB0 -name:RMCLOMV/mb_i_usb1 - REFPROP _location_parent name:/frutree/chassis/MB/system-board/USB1 -name:RMCLOMV/fire_t_core - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_t_amb - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_io_t_amb - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_ff_pok - REFPROP _fru_parent name:/frutree/chassis/MB/system-board - -/* - * fru parents for front IO board sensors - */ -name:RMCLOMV/fiob_i_usb2 - REFPROP _location_parent name:/frutree/chassis/MB/system-board/FIOB/front-IO-board/USB2 -name:RMCLOMV/fiob_i_usb3 - REFPROP _location_parent name:/frutree/chassis/MB/system-board/FIOB/front-IO-board/USB3 -name:RMCLOMV/fiob_t_amb - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/FIOB/front-IO-board - -/* - * fru parent for SC battery - */ -name:RMCLOMV/sc_bat_v_bat - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/SC/service-processor/BATTERY/battery - -/* - * parents for CPU board and CPU die sensors - */ -name:RMCLOMV/c0_t_amb - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/C0/cpu-module -name:RMCLOMV/c0_p0_ff_pok - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/C0/cpu-module -name:RMCLOMV/c0_p0_t_core - REFPROP _location_parent name:/frutree/chassis/MB/system-board/C0/cpu-module/P0/cpu - -name:RMCLOMV/c1_t_amb - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/C1/cpu-module -name:RMCLOMV/c1_p0_ff_pok - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/C1/cpu-module -name:RMCLOMV/c1_p0_t_core - REFPROP _location_parent name:/frutree/chassis/MB/system-board/C1/cpu-module/P0/cpu - -name:RMCLOMV/c2_t_amb - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/C2/cpu-module -name:RMCLOMV/c2_p0_ff_pok - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/C2/cpu-module -name:RMCLOMV/c2_p0_t_core - REFPROP _location_parent name:/frutree/chassis/MB/system-board/C2/cpu-module/P0/cpu - -name:RMCLOMV/c3_t_amb - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/C3/cpu-module -name:RMCLOMV/c3_p0_ff_pok - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/C3/cpu-module -name:RMCLOMV/c3_p0_t_core - REFPROP _location_parent name:/frutree/chassis/MB/system-board/C3/cpu-module/P0/cpu diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_usb-a-1.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_usb-a-1.info deleted file mode 100644 index 9bb9e7a3eb..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_usb-a-1.info +++ /dev/null @@ -1,76 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICLEVENT_SYSEVENT_DEVICE_ADDED event for USB0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_usb-a-1_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_usb-a-1_data.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_usb-a-1_data.info deleted file mode 100644 index f63837091e..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_usb-a-1_data.info +++ /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 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICLEVENT_SYSEVENT_DEVICE_ADDED event for USB0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -/* - * rear panel EHCI devices - */ -_class:/jbus/pciex@1f,700000/pciex@0/pciex@1/pci@0/usb@1c,3/picl?bus-addr=1 - REFPROP _location_parent name:/frutree/chassis/MB/system-board/USB0 - -/* - * Rear panel OHCI devices - */ -_class:/jbus/pciex@1f,700000/pciex@0/pciex@1/pci@0/usb@1c/picl?bus-addr=1 - REFPROP _location_parent name:/frutree/chassis/MB/system-board/USB0 diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_usb-a-2.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_usb-a-2.info deleted file mode 100644 index d60bd84a07..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_usb-a-2.info +++ /dev/null @@ -1,76 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICLEVENT_SYSEVENT_DEVICE_ADDED event for USB1 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_usb-a-2_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_usb-a-2_data.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_usb-a-2_data.info deleted file mode 100644 index de9c434f12..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_usb-a-2_data.info +++ /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 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICLEVENT_SYSEVENT_DEVICE_ADDED event for USB1 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -/* - * Rear panel EHCI devices - */ -_class:/jbus/pciex@1f,700000/pciex@0/pciex@1/pci@0/usb@1c,3/picl?bus-addr=3 - REFPROP _location_parent name:/frutree/chassis/MB/system-board/USB1 - -/* - * Rear panel OHCI devices - */ -_class:/jbus/pciex@1f,700000/pciex@0/pciex@1/pci@0/usb@1c,1/picl?bus-addr=1 - REFPROP _location_parent name:/frutree/chassis/MB/system-board/USB1 diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_usb-a-3.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_usb-a-3.info deleted file mode 100644 index c4841e3524..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_usb-a-3.info +++ /dev/null @@ -1,76 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICLEVENT_SYSEVENT_DEVICE_ADDED event for USB2 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_usb-a-3_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_usb-a-3_data.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_usb-a-3_data.info deleted file mode 100644 index 6e45159cbc..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_usb-a-3_data.info +++ /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 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICLEVENT_SYSEVENT_DEVICE_ADDED event for USB2 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -/* - * Front panel EHCI devices - */ -_class:/jbus/pciex@1f,700000/pciex@0/pciex@1/pci@0/usb@1c,3/usb@7/picl?bus-addr=3 - REFPROP _location_parent name:/frutree/chassis/MB/system-board/FIOB/front-IO-board/USB2 - -/* - * Front panel OHCI devices - */ -_class:/jbus/pciex@1f,700000/pciex@0/pciex@1/pci@0/usb@1c,2/usb@1/picl?bus-addr=3 - REFPROP _location_parent name:/frutree/chassis/MB/system-board/FIOB/front-IO-board/USB2 diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_usb-a-4.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_usb-a-4.info deleted file mode 100644 index 1884c6972d..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_usb-a-4.info +++ /dev/null @@ -1,76 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICLEVENT_SYSEVENT_DEVICE_ADDED event for USB3 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_usb-a-4_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_usb-a-4_data.info b/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_usb-a-4_data.info deleted file mode 100644 index 5297d8dc9e..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frudr/fru_usb-a-4_data.info +++ /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 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICLEVENT_SYSEVENT_DEVICE_ADDED event for USB3 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -/* - * Front panel EHCI devices - */ -_class:/jbus/pciex@1f,700000/pciex@0/pciex@1/pci@0/usb@1c,3/usb@7/picl?bus-addr=4 - REFPROP _location_parent name:/frutree/chassis/MB/system-board/FIOB/front-IO-board/USB3 - -/* - * Front panel OHCI devices - */ -_class:/jbus/pciex@1f,700000/pciex@0/pciex@1/pci@0/usb@1c,2/usb@1/picl?bus-addr=4 - REFPROP _location_parent name:/frutree/chassis/MB/system-board/FIOB/front-IO-board/USB3 diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frutree/Makefile b/usr/src/cmd/picl/plugins/sun4u/boston/frutree/Makefile deleted file mode 100644 index d5ca49144a..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frutree/Makefile +++ /dev/null @@ -1,105 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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. -# - -# -# cmd/picl/plugins/sun4u/boston/frutree/Makefile -# - -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-V445 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -INCDIR1 = . -INCDIR2 = ../frudr -INCS = -I$(INCDIR1) -I$(INCDIR2) -CONFS = piclfrutree.conf -ROOTCONF = $(CONFS:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 -MAININFO = $(CONFS:%.conf=%.info) -OTHERINFOS = $(INCDIR1)/system-board.info -OTHERINFOS += $(INCDIR2)/fru_HDD0_data.info -OTHERINFOS += $(INCDIR2)/fru_HDD1_data.info -OTHERINFOS += $(INCDIR2)/fru_HDD2_data.info -OTHERINFOS += $(INCDIR2)/fru_HDD3_data.info -OTHERINFOS += $(INCDIR2)/fru_HDD4_data.info -OTHERINFOS += $(INCDIR2)/fru_HDD5_data.info -OTHERINFOS += $(INCDIR2)/fru_HDD6_data.info -OTHERINFOS += $(INCDIR2)/fru_HDD7_data.info -OTHERINFOS += $(INCDIR2)/fru_PS0_data.info -OTHERINFOS += $(INCDIR2)/fru_PS1_data.info -OTHERINFOS += $(INCDIR2)/fru_PS2_data.info -OTHERINFOS += $(INCDIR2)/fru_PS3_data.info -OTHERINFOS += $(INCDIR2)/fru_SC_data.info -OTHERINFOS += $(INCDIR2)/fru_usb-a-1_data.info -OTHERINFOS += $(INCDIR2)/fru_usb-a-2_data.info -OTHERINFOS += $(INCDIR2)/fru_usb-a-3_data.info -OTHERINFOS += $(INCDIR2)/fru_usb-a-4_data.info -OTHERINFOS += $(INCDIR2)/fru_FT0_data.info -OTHERINFOS += $(INCDIR2)/fru_FT1_data.info -OTHERINFOS += $(INCDIR2)/fru_FT2_data.info -OTHERINFOS += $(INCDIR2)/fru_FT3_data.info -OTHERINFOS += $(INCDIR2)/fru_FT4_data.info -OTHERINFOS += $(INCDIR2)/fru_FT5_data.info - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: $(CONFS) - -install: $(ROOTLIBDIR) $(ROOTCONF) - -$(CONFS): $(MAININFO) $(OTHERINFOS) - @$(RM) -f $@ - @echo "# Copyright 2006 Sun Microsystems, Inc. All rights reserved." \ - > $@ - @echo "# Use is subject to license terms." >> $@ - @echo "# This is a generated file. #ident lines identify sources" >> $@ - $(CPP) -P $(INCS) $(@:%.conf=%.info) | \ - $(SED) -e '/^[ ]*$$/d' >> $@ - @$(CHMOD) 444 $@ - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frutree/piclfrutree.info b/usr/src/cmd/picl/plugins/sun4u/boston/frutree/piclfrutree.info deleted file mode 100644 index b6d5e135fb..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frutree/piclfrutree.info +++ /dev/null @@ -1,654 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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. - */ - -/* - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - * This file describes the locations of all the system fru's and their - * proms, if present. - */ - -/* - * There are a lot of nodes below the rmclomv node, define a shortname - */ -#define RMCLOMV /platform/ebus@1f,464000/rmc-comm@0,c28000/SUNW,rmclomv - -VERSION 1.1 -VERBOSE 1 -NODE frutree picl - NODE chassis fru - /* - * SunMC physical view view_points for this platform - * This will get moved to a separate SunMC physical view plugin later. - */ - PROP ViewPoints string r 0 "front rear side" - - NODE MB location - PROP SlotType string r 0 "system-board" - PROP Label string r 0 "MB" - NODE system-board fru - NODE FT0 location - PROP Label string r 0 "FT0" - PROP SlotType string r 0 "fan-tray" - ENDNODE - NODE FT1 location - PROP Label string r 0 "FT1" - PROP SlotType string r 0 "fan-tray" - ENDNODE - NODE FT2 location - PROP Label string r 0 "FT2" - PROP SlotType string r 0 "fan-tray" - ENDNODE - NODE FT3 location - PROP Label string r 0 "FT3" - PROP SlotType string r 0 "fan-tray" - ENDNODE - NODE FT4 location - PROP Label string r 0 "FT4" - PROP SlotType string r 0 "fan-tray" - ENDNODE - NODE FT5 location - PROP Label string r 0 "FT5" - PROP SlotType string r 0 "fan-tray" - ENDNODE - ENDNODE - ENDNODE - - NODE PDB location - PROP SlotType string r 0 "power-distribution-board" - PROP Label string r 0 "PDB" - ENDNODE - - /* on Boston we need only two of the four possible power supplies */ - - NODE PS0 location - PROP SlotType string r 0 "power-supply" - PROP Label string r 0 "PS0" - ENDNODE - NODE PS1 location - PROP SlotType string r 0 "power-supply" - PROP Label string r 0 "PS1" - ENDNODE - NODE PS2 location - PROP SlotType string r 0 "power-supply" - PROP Label string r 0 "PS2" - ENDNODE - NODE PS3 location - PROP SlotType string r 0 "power-supply" - PROP Label string r 0 "PS3" - ENDNODE - - ENDNODE -ENDNODE - -/* - * Motherboard properties - */ -name:/frutree/chassis/MB/system-board - Node C0 location - PROP SlotType string r 0 "cpu-module" - Prop Label string r 0 "C0" - ENDNODE - Node C1 location - PROP SlotType string r 0 "cpu-module" - Prop Label string r 0 "C1" - ENDNODE - Node C2 location - PROP SlotType string r 0 "cpu-module" - Prop Label string r 0 "C2" - ENDNODE - Node C3 location - PROP SlotType string r 0 "cpu-module" - Prop Label string r 0 "C3" - ENDNODE - - NODE PCI0 location - PROP SlotType string r 0 "pci-e" - PROP Label string r 0 "PCI0" - ENDNODE - NODE PCI1 location - PROP SlotType string r 0 "pci-e" - PROP Label string r 0 "PCI1" - ENDNODE - NODE PCI2 location - PROP SlotType string r 0 "pci-x" - PROP Label string r 0 "PCI2" - ENDNODE - NODE PCI3 location - PROP SlotType string r 0 "pci-x" - PROP Label string r 0 "PCI3" - ENDNODE - NODE PCI4 location - PROP SlotType string r 0 "pci-x" - PROP Label string r 0 "PCI4" - ENDNODE - NODE PCI5 location - PROP SlotType string r 0 "pci-x" - PROP Label string r 0 "PCI5" - ENDNODE - NODE PCI6 location - PROP SlotType string r 0 "pci-e" - PROP Label string r 0 "PCI6" - ENDNODE - NODE PCI7 location - PROP SlotType string r 0 "pci-e" - PROP Label string r 0 "PCI7" - ENDNODE - - NODE USB0 location - PROP SlotType string r 0 "usb" - PROP Label string r 0 "USB0" - ENDNODE - NODE USB1 location - PROP SlotType string r 0 "usb" - PROP Label string r 0 "USB1" - ENDNODE - - NODE FIOB location - PROP SlotType string r 0 "front-IO-board" - PROP Label string r 0 "FIOB" - ENDNODE - - NODE SC location - PROP SlotType string r 0 "service-processor-board" - PROP Label string r 0 "SC" - ENDNODE - - NODE HDDCNTRL location - PROP SlotType string r 0 "disk-controller" - PROP Label string r 0 "HDDCNTRL" - ENDNODE - - NODE RMD0 location - PROP SlotType string r 0 "dvd-slot" - PROP Label string r 0 "RMD0" - ENDNODE - -name:/frutree/chassis/MB/system-board/FIOB - NODE front-IO-board fru - NODE USB2 location - PROP SlotType string r 0 "usb" - PROP Label string r 0 "USB2" - ENDNODE - NODE USB3 location - PROP SlotType string r 0 "usb" - PROP Label string r 0 "USB3" - ENDNODE - NODE FLEDB location - PROP SlotType string r 0 "led-board" - PROP Label string r 0 "FLEDB" - NODE front-led-board fru - ENDNODE - ENDNODE - NODE HUB location - PROP SlotType string r 0 "usb-hub" - PROP Label string r 0 "HUB0" - ENDNODE - ENDNODE - -/* - * System controller contains the SCC and a battery - */ -name:/frutree/chassis/MB/system-board/SC - NODE service-processor fru - NODE SCC location - PROP Label string r 0 "SCC" - NODE system-config-chip fru - ENDNODE - ENDNODE - NODE BATTERY location - PROP Label string r 0 "BATTERY" - NODE battery fru - ENDNODE - ENDNODE - ENDNODE - -/* - * Common properties for the disk controller location node. - */ -name:/frutree/chassis/MB/system-board/HDDCNTRL - PROP SlotType string r 0 "disk-controller" - PROP Label string r 0 "HDDCNTRL" - -/* - * Create the disk-controller fru node here if the 1068e fruid prom is - * visible. - */ -name:/frutree/chassis/MB/system-board/HDDCNTRL - REFNODE disk-controller fru WITH name:/platform/i2c@1f,520000/sas-ctrl-fru-prom@0,46 - -/* - * If the disk-controller node now exists, create properties that will - * allow its fruid prom to be accessed. - */ -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,520000/sas-ctrl-fru-prom@0,46 - -/* - * Create the disk-controller fru node here if the disk controller is - * a LSI Logic 1064x/1068x in slot 4. Note that no fruid prom properties - * are created because in this case, there is no 1068e and its fruid - * prom is not present. This ensures that the fru access library won't - * expect to see a fruid prom where none is present. - */ -name:/frutree/chassis/MB/system-board/HDDCNTRL - REFNODE disk-controller fru WITH name:/platform/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@1 - -/* - * Create the disk backplane node under the disk-controller node - */ -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller - NODE HDDBP location - PROP Label string r 0 "HDDBP" - PROP SlotType string r 0 "disk-backplane-8" - NODE disk-backplane-8 fru - ENDNODE - ENDNODE - -/* - * up to 8 disks in Boston... - */ -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8 - NODE HDD0 location - PROP SlotType string r 0 "disk-slot" - PROP Label string r 0 "HDD0" - ENDNODE - NODE HDD1 location - PROP SlotType string r 0 "disk-slot" - PROP Label string r 0 "HDD1" - ENDNODE - NODE HDD2 location - PROP SlotType string r 0 "disk-slot" - PROP Label string r 0 "HDD2" - ENDNODE - NODE HDD3 location - PROP SlotType string r 0 "disk-slot" - PROP Label string r 0 "HDD3" - ENDNODE - NODE HDD4 location - PROP SlotType string r 0 "disk-slot" - PROP Label string r 0 "HDD4" - ENDNODE - NODE HDD5 location - PROP SlotType string r 0 "disk-slot" - PROP Label string r 0 "HDD5" - ENDNODE - NODE HDD6 location - PROP SlotType string r 0 "disk-slot" - PROP Label string r 0 "HDD6" - ENDNODE - NODE HDD7 location - PROP SlotType string r 0 "disk-slot" - PROP Label string r 0 "HDD7" - ENDNODE - -/* - * add power-supply nodes if their fru-proms are visible - */ -name:/frutree/chassis/PS0 - REFNODE power-supply fru WITH name:/platform/i2c@1f,520000/power-supply-fru-prom?UnitAddress=0,24 -name:/frutree/chassis/PS1 - REFNODE power-supply fru WITH name:/platform/i2c@1f,520000/power-supply-fru-prom?UnitAddress=0,32 -name:/frutree/chassis/PS2 - REFNODE power-supply fru WITH name:/platform/i2c@1f,520000/power-supply-fru-prom?UnitAddress=0,52 -name:/frutree/chassis/PS3 - REFNODE power-supply fru WITH name:/platform/i2c@1f,520000/power-supply-fru-prom?UnitAddress=0,72 - -/* - * PDB chassis ID prom - */ -name:/frutree/chassis/PDB - REFNODE power-distribution-board fru WITH name:/platform/i2c@1f,520000/pdb-fru-prom@0,da - -name:/frutree/chassis/MB/system-board/FT0 - REFNODE fan-tray fru WITH name:RMCLOMV/ft0_f0_tach -name:/frutree/chassis/MB/system-board/FT1 - REFNODE fan-tray fru WITH name:RMCLOMV/ft1_f0_tach -name:/frutree/chassis/MB/system-board/FT2 - REFNODE fan-tray fru WITH name:RMCLOMV/ft2_f0_tach -name:/frutree/chassis/MB/system-board/FT3 - REFNODE fan-tray fru WITH name:RMCLOMV/ft3_f0_tach -name:/frutree/chassis/MB/system-board/FT4 - REFNODE fan-tray fru WITH name:RMCLOMV/ft4_f0_tach -name:/frutree/chassis/MB/system-board/FT5 - REFNODE fan-tray fru WITH name:RMCLOMV/ft5_f0_tach - -/* - * system fans (on Boston, the trays are the fru's, not the fans) - */ -name:/frutree/chassis/MB/system-board/FT0/fan-tray - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - ENDNODE -name:/frutree/chassis/MB/system-board/FT1/fan-tray - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - ENDNODE -name:/frutree/chassis/MB/system-board/FT2/fan-tray - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - ENDNODE -name:/frutree/chassis/MB/system-board/FT3/fan-tray - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - ENDNODE -name:/frutree/chassis/MB/system-board/FT4/fan-tray - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - ENDNODE -name:/frutree/chassis/MB/system-board/FT5/fan-tray - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - ENDNODE - -/* - * cdrom fru node - */ -name:/frutree/chassis/MB/system-board/RMD0 - REFNODE removable-media fru WITH name:/platform/pci@1f,700000/pci@0/pci@1/pci@0/ide@1f/sd@0,0 -name:/platform/pci@1f,700000/pci@0/pci@1/pci@0/ide@1f/sd@0,0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/RMD0/removable-media - - -/* - * add disk fru nodes for disks which are present (built-in 1068E mappings) - */ - -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD0 - REFNODE disk fru WITH name:/platform/pci@1e,600000/pci@0/pci@2/scsi@0/sd@0,0 -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD1 - REFNODE disk fru WITH name:/platform/pci@1e,600000/pci@0/pci@2/scsi@0/sd@1,0 -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD2 - REFNODE disk fru WITH name:/platform/pci@1e,600000/pci@0/pci@2/scsi@0/sd@2,0 -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD3 - REFNODE disk fru WITH name:/platform/pci@1e,600000/pci@0/pci@2/scsi@0/sd@3,0 -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD4 - REFNODE disk fru WITH name:/platform/pci@1e,600000/pci@0/pci@2/scsi@0/sd@4,0 -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD5 - REFNODE disk fru WITH name:/platform/pci@1e,600000/pci@0/pci@2/scsi@0/sd@5,0 -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD6 - REFNODE disk fru WITH name:/platform/pci@1e,600000/pci@0/pci@2/scsi@0/sd@6,0 -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD7 - REFNODE disk fru WITH name:/platform/pci@1e,600000/pci@0/pci@2/scsi@0/sd@7,0 - -/* - * Add disk fru nodes for disks which are present (1068x mappings with the - * 1068x located in slot 4 (short PCI-X slot adjacent to the MBC) - */ - -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD0 - REFNODE disk fru WITH name:/platform/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@1/sd@0,0 -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD1 - REFNODE disk fru WITH name:/platform/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@1/sd@1,0 -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD2 - REFNODE disk fru WITH name:/platform/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@1/sd@2,0 -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD3 - REFNODE disk fru WITH name:/platform/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@1/sd@3,0 -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD4 - REFNODE disk fru WITH name:/platform/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@1/sd@4,0 -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD5 - REFNODE disk fru WITH name:/platform/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@1/sd@5,0 -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD6 - REFNODE disk fru WITH name:/platform/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@1/sd@6,0 -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD7 - REFNODE disk fru WITH name:/platform/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@1/sd@7,0 - -/* - * Add disk fru nodes for disks which are present (1064x mappings with the - * 1064x located in slot 5 (last short PCI-X slot). These are assumed to - * be the remaining four disks if the first controller is also a 1064x. - */ - -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD4 - REFNODE disk fru WITH name:/platform/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@2/sd@4,0 -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD5 - REFNODE disk fru WITH name:/platform/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@2/sd@5,0 -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD6 - REFNODE disk fru WITH name:/platform/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@2/sd@6,0 -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8/HDD7 - REFNODE disk fru WITH name:/platform/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@2/sd@7,0 - -/* - * the eight PCIe/PCI-x slots... - */ -name:/frutree/chassis/MB/system-board/PCI0 - REFNODE pci-card fru WITH _class:/jbus/pciex@1e,600000/pciex@0/pciex@8/picl?DeviceID=0 -name:/frutree/chassis/MB/system-board/PCI1 - REFNODE pci-card fru WITH _class:/jbus/pciex@1f,700000/pciex@0/pciex@8/picl?DeviceID=0 -name:/frutree/chassis/MB/system-board/PCI2 - REFNODE pci-card fru WITH _class:/jbus/pciex@1e,600000/pciex@0/pciex@1/pci@0/pci@8/picl?DeviceID=1 -name:/frutree/chassis/MB/system-board/PCI3 - REFNODE pci-card fru WITH _class:/jbus/pciex@1e,600000/pciex@0/pciex@1/pci@0/pci@8/picl?DeviceID=2 -name:/frutree/chassis/MB/system-board/PCI4 - REFNODE pci-card fru WITH _class:/jbus/pciex@1f,700000/pciex@0/pciex@2/pci@0/pci@8/picl?DeviceID=1 -name:/frutree/chassis/MB/system-board/PCI5 - REFNODE pci-card fru WITH _class:/jbus/pciex@1f,700000/pciex@0/pciex@2/pci@0/pci@8/picl?DeviceID=2 -name:/frutree/chassis/MB/system-board/PCI6 - REFNODE pci-card fru WITH _class:/jbus/pciex@1e,600000/pciex@0/pciex@9/picl?DeviceID=0 -name:/frutree/chassis/MB/system-board/PCI7 - REFNODE pci-card fru WITH _class:/jbus/pciex@1f,700000/pciex@0/pciex@9/picl?DeviceID=0 - -#include "system-board.info" -#include -#include - -/* - * built-in USB hub on the front IO board, one for EHCI, one for OHCI - */ -_class:/jbus/pciex@1f,700000/pciex@0/pciex@1/pci@0/usb@1c,3/usb@7 - REFPROP _location_parent name:/frutree/chassis/MB/system-board/FIOB/front-IO-board/HUB -_class:/jbus/pciex@1f,700000/pciex@0/pciex@1/pci@0/usb@1c,2/usb@1 - REFPROP _location_parent name:/frutree/chassis/MB/system-board/FIOB/front-IO-board/HUB - -/* - * devices in PCIe/PCI-x slots - */ -_class:/jbus/pciex@1e,600000/pciex@0/pciex@8/picl@0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI0/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@8/picl@0,0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI0/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@8/picl@0,1 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI0/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@8/picl@0,2 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI0/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@8/picl@0,3 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI0/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@8/picl@0,4 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI0/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@8/picl@0,5 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI0/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@8/picl@0,6 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI0/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@8/picl@0,7 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI0/pci-card - -_class:/jbus/pciex@1f,700000/pciex@0/pciex@8/picl@0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI1/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@8/picl@0,0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI1/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@8/picl@0,1 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI1/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@8/picl@0,2 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI1/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@8/picl@0,3 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI1/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@8/picl@0,4 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI1/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@8/picl@0,5 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI1/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@8/picl@0,6 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI1/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@8/picl@0,7 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI1/pci-card - -_class:/jbus/pciex@1e,600000/pciex@0/pciex@1/pci@0/pci@8/picl@1 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI2/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@1/pci@0/pci@8/picl@1,0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI2/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@1/pci@0/pci@8/picl@1,1 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI2/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@1/pci@0/pci@8/picl@1,2 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI2/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@1/pci@0/pci@8/picl@1,3 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI2/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@1/pci@0/pci@8/picl@1,4 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI2/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@1/pci@0/pci@8/picl@1,5 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI2/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@1/pci@0/pci@8/picl@1,6 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI2/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@1/pci@0/pci@8/picl@1,7 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI2/pci-card - -_class:/jbus/pciex@1e,600000/pciex@0/pciex@1/pci@0/pci@8/picl@2 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI3/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@1/pci@0/pci@8/picl@2,0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI3/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@1/pci@0/pci@8/picl@2,1 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI3/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@1/pci@0/pci@8/picl@2,2 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI3/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@1/pci@0/pci@8/picl@2,3 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI3/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@1/pci@0/pci@8/picl@2,4 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI3/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@1/pci@0/pci@8/picl@2,5 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI3/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@1/pci@0/pci@8/picl@2,6 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI3/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@1/pci@0/pci@8/picl@2,7 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI3/pci-card - -_class:/jbus/pciex@1f,700000/pciex@0/pciex@2/pci@0/pci@8/picl@1 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI4/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@2/pci@0/pci@8/picl@1,0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI4/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@2/pci@0/pci@8/picl@1,1 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI4/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@2/pci@0/pci@8/picl@1,2 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI4/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@2/pci@0/pci@8/picl@1,3 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI4/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@2/pci@0/pci@8/picl@1,4 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI4/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@2/pci@0/pci@8/picl@1,5 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI4/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@2/pci@0/pci@8/picl@1,6 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI4/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@2/pci@0/pci@8/picl@1,7 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI4/pci-card - -_class:/jbus/pciex@1f,700000/pciex@0/pciex@2/pci@0/pci@8/picl@2 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI5/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@2/pci@0/pci@8/picl@2,0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI5/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@2/pci@0/pci@8/picl@2,1 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI5/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@2/pci@0/pci@8/picl@2,2 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI5/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@2/pci@0/pci@8/picl@2,3 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI5/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@2/pci@0/pci@8/picl@2,4 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI5/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@2/pci@0/pci@8/picl@2,5 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI5/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@2/pci@0/pci@8/picl@2,6 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI5/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@2/pci@0/pci@8/picl@2,7 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI5/pci-card - -_class:/jbus/pciex@1e,600000/pciex@0/pciex@9/picl@0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI6/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@9/picl@0,0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI6/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@9/picl@0,1 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI6/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@9/picl@0,2 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI6/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@9/picl@0,3 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI6/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@9/picl@0,4 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI6/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@9/picl@0,5 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI6/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@9/picl@0,6 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI6/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@9/picl@0,7 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI6/pci-card - -_class:/jbus/pciex@1f,700000/pciex@0/pciex@9/picl@0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI7/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@9/picl@0,0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI7/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@9/picl@0,1 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI7/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@9/picl@0,2 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI7/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@9/picl@0,3 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI7/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@9/picl@0,4 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI7/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@9/picl@0,5 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI7/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@9/picl@0,6 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI7/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@9/picl@0,7 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/PCI7/pci-card diff --git a/usr/src/cmd/picl/plugins/sun4u/boston/frutree/system-board.info b/usr/src/cmd/picl/plugins/sun4u/boston/frutree/system-board.info deleted file mode 100644 index f2c1544f16..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/boston/frutree/system-board.info +++ /dev/null @@ -1,619 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This file creates the system board structure - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -/* - * motherboard seeprom source - */ -name:/frutree/chassis/MB/system-board - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,520000/motherboard-fru-prom@0,aa - -name:/platform/i2c@1f,520000/motherboard-fru-prom@0,aa - REFPROP _fru_parent name:/frutree/chassis/MB/system-board - - -/* - * RMC Board Seeprom Source - */ -name:/frutree/chassis/MB/system-board/SC/service-processor - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,520000/rmc-fru-prom@0,a8 - -name:/platform/i2c@1f,520000/rmc-fru-prom@0,a8 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/SC/service-processor - - -/* - * FIOB Board Seeprom Source - */ -name:/frutree/chassis/MB/system-board/FIOB/front-IO-board - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,520000/front-io-fru-prom@0,4e - -name:/platform/i2c@1f,520000/front-io-fru-prom@0,4e - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/FIOB/front-IO-board - - -/* - * PDB fru/serial number prom and parent - */ -name:/frutree/chassis/PDB/power-distribution-board - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,520000/pdb-fru-prom@0,da - -name:/platform/i2c@1f,520000/pdb-fru-prom@0,da - REFPROP _fru_parent name:/frutree/chassis/PDB/power-distribution-board - - -/* - * HDDBP Board Seeprom Source and fru parent - */ -name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8 - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,520000/sas-backplane-fru-prom@0,48 - -name:/platform/i2c@1f,520000/sas-backplane-fru-prom@0,48 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP/disk-backplane-8 - - -/* - * HDDCNTRL Board Seeprom Source - * - * Note: see piclfrutree.info for fruid prom info - */ -name:/platform/i2c@1f,520000/sas-ctrl-fru-prom@0,46 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller - - -/* - * Proccessor Board 0 - */ -name:/frutree/chassis/MB/system-board/C0 - REFNODE cpu-module fru WITH name:/platform/i2c@1f,520000/cpu-fru-prom?UnitAddress=0,b8 -name:/frutree/chassis/MB/system-board/C0/cpu-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,520000/cpu-fru-prom?UnitAddress=0,b8 - -name:/platform/i2c@1f,520000/cpu-fru-prom?UnitAddress=0,b8 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/C0/cpu-module - -/* - * Proccessor Board 1 - */ -name:/frutree/chassis/MB/system-board/C1 - REFNODE cpu-module fru WITH name:/platform/i2c@1f,520000/cpu-fru-prom?UnitAddress=0,c8 -name:/frutree/chassis/MB/system-board/C1/cpu-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,520000/cpu-fru-prom?UnitAddress=0,c8 - -name:/platform/i2c@1f,520000/cpu-fru-prom?UnitAddress=0,c8 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/C1/cpu-module - -/* - * Proccessor Board 2 - */ -name:/frutree/chassis/MB/system-board/C2 - REFNODE cpu-module fru WITH name:/platform/i2c@1f,520000/cpu-fru-prom?UnitAddress=0,e8 -name:/frutree/chassis/MB/system-board/C2/cpu-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,520000/cpu-fru-prom?UnitAddress=0,e8 - -name:/platform/i2c@1f,520000/cpu-fru-prom?UnitAddress=0,e8 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/C2/cpu-module - -/* - * Proccessor Board 3 - */ -name:/frutree/chassis/MB/system-board/C3 - REFNODE cpu-module fru WITH name:/platform/i2c@1f,520000/cpu-fru-prom?UnitAddress=0,98 -name:/frutree/chassis/MB/system-board/C3/cpu-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,520000/cpu-fru-prom?UnitAddress=0,98 - -name:/platform/i2c@1f,520000/cpu-fru-prom?UnitAddress=0,98 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/C3/cpu-module - -/* - * Processors - */ -name:/frutree/chassis/MB/system-board/C0/cpu-module - REFNODE P0 location WITH name:/frutree/chassis/MB/system-board/C0/cpu-module -name:/frutree/chassis/MB/system-board/C0/cpu-module/P0 - PROP SlotType string r 0 "cpu" - PROP Label string r 0 "P0" - REFNODE cpu location WITH name:/platform/SUNW,UltraSPARC-IIIi+@0,0 - REFNODE cpu location WITH name:/platform/SUNW,UltraSPARC-IIIi@0,0 - -name:/platform/SUNW,UltraSPARC-IIIi+@0,0 - REFPROP _location_parent name:/frutree/chassis/MB/system-board/C0/cpu-module/P0/cpu -name:/platform/SUNW,UltraSPARC-IIIi@0,0 - REFPROP _location_parent name:/frutree/chassis/MB/system-board/C0/cpu-module/P0/cpu - -name:/frutree/chassis/MB/system-board/C1/cpu-module - REFNODE P0 location WITH name:/frutree/chassis/MB/system-board/C1/cpu-module -name:/frutree/chassis/MB/system-board/C1/cpu-module/P0 - PROP SlotType string r 0 "cpu" - PROP Label string r 0 "P0" - REFNODE cpu location WITH name:/platform/SUNW,UltraSPARC-IIIi+@1,0 - REFNODE cpu location WITH name:/platform/SUNW,UltraSPARC-IIIi@1,0 - -name:/platform/SUNW,UltraSPARC-IIIi+@1,0 - REFPROP _location_parent name:/frutree/chassis/MB/system-board/C1/cpu-module/P0/cpu -name:/platform/SUNW,UltraSPARC-IIIi@1,0 - REFPROP _location_parent name:/frutree/chassis/MB/system-board/C1/cpu-module/P0/cpu - -name:/frutree/chassis/MB/system-board/C2/cpu-module - REFNODE P0 location WITH name:/frutree/chassis/MB/system-board/C2/cpu-module -name:/frutree/chassis/MB/system-board/C2/cpu-module/P0 - PROP SlotType string r 0 "cpu" - PROP Label string r 0 "P0" - REFNODE cpu location WITH name:/platform/SUNW,UltraSPARC-IIIi+@2,0 - REFNODE cpu location WITH name:/platform/SUNW,UltraSPARC-IIIi@2,0 - -name:/platform/SUNW,UltraSPARC-IIIi+@2,0 - REFPROP _location_parent name:/frutree/chassis/MB/system-board/C2/cpu-module/P0/cpu -name:/platform/SUNW,UltraSPARC-IIIi@2,0 - REFPROP _location_parent name:/frutree/chassis/MB/system-board/C2/cpu-module/P0/cpu - -name:/frutree/chassis/MB/system-board/C3/cpu-module - REFNODE P0 location WITH name:/frutree/chassis/MB/system-board/C3/cpu-module -name:/frutree/chassis/MB/system-board/C3/cpu-module/P0 - PROP SlotType string r 0 "cpu" - PROP Label string r 0 "P0" - REFNODE cpu location WITH name:/platform/SUNW,UltraSPARC-IIIi+@3,0 - REFNODE cpu location WITH name:/platform/SUNW,UltraSPARC-IIIi@3,0 - -name:/platform/SUNW,UltraSPARC-IIIi+@3,0 - REFPROP _location_parent name:/frutree/chassis/MB/system-board/C3/cpu-module/P0/cpu -name:/platform/SUNW,UltraSPARC-IIIi@3,0 - REFPROP _location_parent name:/frutree/chassis/MB/system-board/C3/cpu-module/P0/cpu - - -/************************************ - * CPU Board 0 Processor 0 - ************************************/ -name:/platform/i2c@1f,520000/temperature?UnitAddress=0,10 - REFPROP _location_parent /frutree/chassis/MB/system-board/C0/cpu-module/P0/cpu - -name:/frutree/chassis/MB/system-board/C0/cpu-module/P0/cpu - REFNODE B0 location WITH name:/frutree/chassis/MB/system-board/C0/cpu-module/P0/cpu -name:/frutree/chassis/MB/system-board/C0/cpu-module/P0/cpu/B0 - PROP Label string r 0 "B0" - REFNODE bank location WITH name:/frutree/chassis/MB/system-board/C0/cpu-module/P0/cpu -name:/frutree/chassis/MB/system-board/C0/cpu-module/P0/cpu/B0/bank - REFNODE D0 location WITH name:/frutree/chassis/MB/system-board/C0/cpu-module/P0/cpu - REFNODE D1 location WITH name:/frutree/chassis/MB/system-board/C0/cpu-module/P0/cpu -name:/frutree/chassis/MB/system-board/C0/cpu-module/P0/cpu - REFNODE B1 location WITH name:/frutree/chassis/MB/system-board/C0/cpu-module/P0/cpu -name:/frutree/chassis/MB/system-board/C0/cpu-module/P0/cpu/B1 - PROP Label string r 0 "B1" - REFNODE bank location WITH name:/frutree/chassis/MB/system-board/C0/cpu-module/P0/cpu -name:/frutree/chassis/MB/system-board/C0/cpu-module/P0/cpu/B1/bank - REFNODE D0 location WITH name:/frutree/chassis/MB/system-board/C0/cpu-module/P0/cpu - REFNODE D1 location WITH name:/frutree/chassis/MB/system-board/C0/cpu-module/P0/cpu - -/************************************ - * CPU Board 1 Processor 0 - ************************************/ -name:/platform/i2c@1f,520000/temperature?UnitAddress=0,30 - REFPROP _location_parent /frutree/chassis/MB/system-board/C1/cpu-module/P0/cpu - -name:/frutree/chassis/MB/system-board/C1/cpu-module/P0/cpu - REFNODE B0 location WITH name:/frutree/chassis/MB/system-board/C1/cpu-module/P0/cpu -name:/frutree/chassis/MB/system-board/C1/cpu-module/P0/cpu/B0 - PROP Label string r 0 "B0" - REFNODE bank location WITH name:/frutree/chassis/MB/system-board/C1/cpu-module/P0/cpu -name:/frutree/chassis/MB/system-board/C1/cpu-module/P0/cpu/B0/bank - REFNODE D0 location WITH name:/frutree/chassis/MB/system-board/C1/cpu-module/P0/cpu - REFNODE D1 location WITH name:/frutree/chassis/MB/system-board/C1/cpu-module/P0/cpu -name:/frutree/chassis/MB/system-board/C1/cpu-module/P0/cpu - REFNODE B1 location WITH name:/frutree/chassis/MB/system-board/C1/cpu-module/P0/cpu -name:/frutree/chassis/MB/system-board/C1/cpu-module/P0/cpu/B1 - PROP Label string r 0 "B1" - REFNODE bank location WITH name:/frutree/chassis/MB/system-board/C1/cpu-module/P0/cpu -name:/frutree/chassis/MB/system-board/C1/cpu-module/P0/cpu/B1/bank - REFNODE D0 location WITH name:/frutree/chassis/MB/system-board/C1/cpu-module/P0/cpu - REFNODE D1 location WITH name:/frutree/chassis/MB/system-board/C1/cpu-module/P0/cpu - -/************************************ - * CPU Board 2 Processor 0 - ************************************/ -name:/platform/i2c@1f,520000/temperature?UnitAddress=0,50 - REFPROP _location_parent /frutree/chassis/MB/system-board/C2/cpu-module/P0/cpu - -name:/frutree/chassis/MB/system-board/C2/cpu-module/P0/cpu - REFNODE B0 location WITH name:/frutree/chassis/MB/system-board/C2/cpu-module/P0/cpu -name:/frutree/chassis/MB/system-board/C2/cpu-module/P0/cpu/B0 - PROP Label string r 0 "B0" - REFNODE bank location WITH name:/frutree/chassis/MB/system-board/C2/cpu-module/P0/cpu -name:/frutree/chassis/MB/system-board/C2/cpu-module/P0/cpu/B0/bank - REFNODE D0 location WITH name:/frutree/chassis/MB/system-board/C2/cpu-module/P0/cpu - REFNODE D1 location WITH name:/frutree/chassis/MB/system-board/C2/cpu-module/P0/cpu -name:/frutree/chassis/MB/system-board/C2/cpu-module/P0/cpu - REFNODE B1 location WITH name:/frutree/chassis/MB/system-board/C2/cpu-module/P0/cpu -name:/frutree/chassis/MB/system-board/C2/cpu-module/P0/cpu/B1 - PROP Label string r 0 "B1" - REFNODE bank location WITH name:/frutree/chassis/MB/system-board/C2/cpu-module/P0/cpu -name:/frutree/chassis/MB/system-board/C2/cpu-module/P0/cpu/B1/bank - REFNODE D0 location WITH name:/frutree/chassis/MB/system-board/C2/cpu-module/P0/cpu - REFNODE D1 location WITH name:/frutree/chassis/MB/system-board/C2/cpu-module/P0/cpu - -/************************************ - * CPU Board 3 Processor 0 - ************************************/ -name:/platform/i2c@1f,520000/temperature?UnitAddress=0,70 - REFPROP _location_parent /frutree/chassis/MB/system-board/C3/cpu-module/P0/cpu - -name:/frutree/chassis/MB/system-board/C3/cpu-module/P0/cpu - REFNODE B0 location WITH name:/frutree/chassis/MB/system-board/C3/cpu-module/P0/cpu -name:/frutree/chassis/MB/system-board/C3/cpu-module/P0/cpu/B0 - PROP Label string r 0 "B0" - REFNODE bank location WITH name:/frutree/chassis/MB/system-board/C3/cpu-module/P0/cpu -name:/frutree/chassis/MB/system-board/C3/cpu-module/P0/cpu/B0/bank - REFNODE D0 location WITH name:/frutree/chassis/MB/system-board/C3/cpu-module/P0/cpu - REFNODE D1 location WITH name:/frutree/chassis/MB/system-board/C3/cpu-module/P0/cpu -name:/frutree/chassis/MB/system-board/C3/cpu-module/P0/cpu - REFNODE B1 location WITH name:/frutree/chassis/MB/system-board/C3/cpu-module/P0/cpu -name:/frutree/chassis/MB/system-board/C3/cpu-module/P0/cpu/B1 - PROP Label string r 0 "B1" - REFNODE bank location WITH name:/frutree/chassis/MB/system-board/C3/cpu-module/P0/cpu -name:/frutree/chassis/MB/system-board/C3/cpu-module/P0/cpu/B1/bank - REFNODE D0 location WITH name:/frutree/chassis/MB/system-board/C3/cpu-module/P0/cpu - REFNODE D1 location WITH name:/frutree/chassis/MB/system-board/C3/cpu-module/P0/cpu - -/************************************ - * CPU Board 0 Processor 0 memory - ************************************/ -name:/frutree/chassis/MB/system-board/C0/cpu-module/P0/cpu/B0/bank/D0 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D0" -name:/frutree/chassis/MB/system-board/C0/cpu-module/P0/cpu/B0/bank/D1 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D1" -name:/frutree/chassis/MB/system-board/C0/cpu-module/P0/cpu/B1/bank/D0 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D0" -name:/frutree/chassis/MB/system-board/C0/cpu-module/P0/cpu/B1/bank/D1 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D1" - -/************************************ - * CPU Board 1 Processor 0 memory - ************************************/ -name:/frutree/chassis/MB/system-board/C1/cpu-module/P0/cpu/B0/bank/D0 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D0" -name:/frutree/chassis/MB/system-board/C1/cpu-module/P0/cpu/B0/bank/D1 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D1" -name:/frutree/chassis/MB/system-board/C1/cpu-module/P0/cpu/B1/bank/D0 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D0" -name:/frutree/chassis/MB/system-board/C1/cpu-module/P0/cpu/B1/bank/D1 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D1" - -/************************************ - * CPU Board 2 Processor 0 memory - ************************************/ -name:/frutree/chassis/MB/system-board/C2/cpu-module/P0/cpu/B0/bank/D0 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D0" -name:/frutree/chassis/MB/system-board/C2/cpu-module/P0/cpu/B0/bank/D1 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D1" -name:/frutree/chassis/MB/system-board/C2/cpu-module/P0/cpu/B1/bank/D0 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D0" -name:/frutree/chassis/MB/system-board/C2/cpu-module/P0/cpu/B1/bank/D1 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D1" - -/************************************ - * CPU Board 3 Processor 0 memory - ************************************/ -name:/frutree/chassis/MB/system-board/C3/cpu-module/P0/cpu/B0/bank/D0 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D0" -name:/frutree/chassis/MB/system-board/C3/cpu-module/P0/cpu/B0/bank/D1 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D1" -name:/frutree/chassis/MB/system-board/C3/cpu-module/P0/cpu/B1/bank/D0 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D0" -name:/frutree/chassis/MB/system-board/C3/cpu-module/P0/cpu/B1/bank/D1 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D1" - -/************************************ - * Dimm nodes - ************************************/ -/* - * Board 0 CPU 0 - */ -name:/frutree/chassis/MB/system-board/C0/cpu-module/P0/cpu/B0/bank/D0 - REFNODE mem-module fru WITH name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,b0 -name:/frutree/chassis/MB/system-board/C0/cpu-module/P0/cpu/B0/bank/D1 - REFNODE mem-module fru WITH name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,b2 -name:/frutree/chassis/MB/system-board/C0/cpu-module/P0/cpu/B1/bank/D0 - REFNODE mem-module fru WITH name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,b4 -name:/frutree/chassis/MB/system-board/C0/cpu-module/P0/cpu/B1/bank/D1 - REFNODE mem-module fru WITH name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,b6 -/* - * Board 1 CPU 0 - */ -name:/frutree/chassis/MB/system-board/C1/cpu-module/P0/cpu/B0/bank/D0 - REFNODE mem-module fru WITH name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,c0 -name:/frutree/chassis/MB/system-board/C1/cpu-module/P0/cpu/B0/bank/D1 - REFNODE mem-module fru WITH name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,c2 -name:/frutree/chassis/MB/system-board/C1/cpu-module/P0/cpu/B1/bank/D0 - REFNODE mem-module fru WITH name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,c4 -name:/frutree/chassis/MB/system-board/C1/cpu-module/P0/cpu/B1/bank/D1 - REFNODE mem-module fru WITH name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,c6 -/* - * Board 2 CPU 0 - */ -name:/frutree/chassis/MB/system-board/C2/cpu-module/P0/cpu/B0/bank/D0 - REFNODE mem-module fru WITH name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,e0 -name:/frutree/chassis/MB/system-board/C2/cpu-module/P0/cpu/B0/bank/D1 - REFNODE mem-module fru WITH name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,e2 -name:/frutree/chassis/MB/system-board/C2/cpu-module/P0/cpu/B1/bank/D0 - REFNODE mem-module fru WITH name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,e4 -name:/frutree/chassis/MB/system-board/C2/cpu-module/P0/cpu/B1/bank/D1 - REFNODE mem-module fru WITH name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,e6 -/* - * Board 3 CPU 0 - */ -name:/frutree/chassis/MB/system-board/C3/cpu-module/P0/cpu/B0/bank/D0 - REFNODE mem-module fru WITH name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,90 -name:/frutree/chassis/MB/system-board/C3/cpu-module/P0/cpu/B0/bank/D1 - REFNODE mem-module fru WITH name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,92 -name:/frutree/chassis/MB/system-board/C3/cpu-module/P0/cpu/B1/bank/D0 - REFNODE mem-module fru WITH name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,94 -name:/frutree/chassis/MB/system-board/C3/cpu-module/P0/cpu/B1/bank/D1 - REFNODE mem-module fru WITH name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,96 - -/********************************************* - * DIMM seeprom sources and operational status - *********************************************/ - -/* Fill in a status of "ok" for all possible dimms in the platform - * tree. This status may be overridden by ASR with "disabled" or "unused". - * If a slot is actually not populated then no nodes/status properties - * actually get created. - */ -name:/platform/memory-controller@0,0/memory-module-group?ID=0/memory-module?ID=0 - PROP status string r 0 "okay" -name:/platform/memory-controller@0,0/memory-module-group?ID=0/memory-module?ID=1 - PROP status string r 0 "okay" -name:/platform/memory-controller@0,0/memory-module-group?ID=1/memory-module?ID=0 - PROP status string r 0 "okay" -name:/platform/memory-controller@0,0/memory-module-group?ID=1/memory-module?ID=1 - PROP status string r 0 "okay" -name:/platform/memory-controller@1,0/memory-module-group?ID=0/memory-module?ID=0 - PROP status string r 0 "okay" -name:/platform/memory-controller@1,0/memory-module-group?ID=0/memory-module?ID=1 - PROP status string r 0 "okay" -name:/platform/memory-controller@1,0/memory-module-group?ID=1/memory-module?ID=0 - PROP status string r 0 "okay" -name:/platform/memory-controller@1,0/memory-module-group?ID=1/memory-module?ID=1 - PROP status string r 0 "okay" -name:/platform/memory-controller@2,0/memory-module-group?ID=0/memory-module?ID=0 - PROP status string r 0 "okay" -name:/platform/memory-controller@2,0/memory-module-group?ID=0/memory-module?ID=1 - PROP status string r 0 "okay" -name:/platform/memory-controller@2,0/memory-module-group?ID=1/memory-module?ID=0 - PROP status string r 0 "okay" -name:/platform/memory-controller@2,0/memory-module-group?ID=1/memory-module?ID=1 - PROP status string r 0 "okay" -name:/platform/memory-controller@3,0/memory-module-group?ID=0/memory-module?ID=0 - PROP status string r 0 "okay" -name:/platform/memory-controller@3,0/memory-module-group?ID=0/memory-module?ID=1 - PROP status string r 0 "okay" -name:/platform/memory-controller@3,0/memory-module-group?ID=1/memory-module?ID=0 - PROP status string r 0 "okay" -name:/platform/memory-controller@3,0/memory-module-group?ID=1/memory-module?ID=1 - PROP status string r 0 "okay" - -/* - * Board 0 CPU 0 - */ -name:/frutree/chassis/MB/system-board/C0/cpu-module/P0/cpu/B0/bank/D0/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,b0 -name:/frutree/chassis/MB/system-board/C0/cpu-module/P0/cpu/B0/bank/D1/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,b2 -name:/frutree/chassis/MB/system-board/C0/cpu-module/P0/cpu/B1/bank/D0/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,b4 -name:/frutree/chassis/MB/system-board/C0/cpu-module/P0/cpu/B1/bank/D1/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,b6 -/* - * Board 1 CPU 0 - */ -name:/frutree/chassis/MB/system-board/C1/cpu-module/P0/cpu/B0/bank/D0/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,c0 -name:/frutree/chassis/MB/system-board/C1/cpu-module/P0/cpu/B0/bank/D1/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,c2 -name:/frutree/chassis/MB/system-board/C1/cpu-module/P0/cpu/B1/bank/D0/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,c4 -name:/frutree/chassis/MB/system-board/C1/cpu-module/P0/cpu/B1/bank/D1/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,c6 -/* - * Board 2 CPU 0 - */ -name:/frutree/chassis/MB/system-board/C2/cpu-module/P0/cpu/B0/bank/D0/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,e0 -name:/frutree/chassis/MB/system-board/C2/cpu-module/P0/cpu/B0/bank/D1/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,e2 -name:/frutree/chassis/MB/system-board/C2/cpu-module/P0/cpu/B1/bank/D0/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,e4 -name:/frutree/chassis/MB/system-board/C2/cpu-module/P0/cpu/B1/bank/D1/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,e6 -/* - * Board 3 CPU 0 - */ -name:/frutree/chassis/MB/system-board/C3/cpu-module/P0/cpu/B0/bank/D0/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,90 -name:/frutree/chassis/MB/system-board/C3/cpu-module/P0/cpu/B0/bank/D1/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,92 -name:/frutree/chassis/MB/system-board/C3/cpu-module/P0/cpu/B1/bank/D0/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,94 -name:/frutree/chassis/MB/system-board/C3/cpu-module/P0/cpu/B1/bank/D1/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,520000/dimm-spd?UnitAddress=0,96 - -/************************************ - * DIMM FRU parents - ***********************************/ -/* - * Board 0 CPU 0 - */ -name:/platform/i2c@1f,520000/dimm-spd@0,b0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/C0/cpu-module/P0/cpu/B0/bank/D0/mem-module -name:/platform/i2c@1f,520000/dimm-spd@0,b2 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/C0/cpu-module/P0/cpu/B0/bank/D1/mem-module -name:/platform/i2c@1f,520000/dimm-spd@0,b4 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/C0/cpu-module/P0/cpu/B1/bank/D0/mem-module -name:/platform/i2c@1f,520000/dimm-spd@0,b6 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/C0/cpu-module/P0/cpu/B1/bank/D1/mem-module -/* - * Board 1 CPU 0 - */ -name:/platform/i2c@1f,520000/dimm-spd@0,c0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/C1/cpu-module/P0/cpu/B0/bank/D0/mem-module -name:/platform/i2c@1f,520000/dimm-spd@0,c2 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/C1/cpu-module/P0/cpu/B0/bank/D1/mem-module -name:/platform/i2c@1f,520000/dimm-spd@0,c4 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/C1/cpu-module/P0/cpu/B1/bank/D0/mem-module -name:/platform/i2c@1f,520000/dimm-spd@0,c6 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/C1/cpu-module/P0/cpu/B1/bank/D1/mem-module -/* - * Board 2 CPU 0 - */ -name:/platform/i2c@1f,520000/dimm-spd@0,e0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/C2/cpu-module/P0/cpu/B0/bank/D0/mem-module -name:/platform/i2c@1f,520000/dimm-spd@0,e2 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/C2/cpu-module/P0/cpu/B0/bank/D1/mem-module -name:/platform/i2c@1f,520000/dimm-spd@0,e4 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/C2/cpu-module/P0/cpu/B1/bank/D0/mem-module -name:/platform/i2c@1f,520000/dimm-spd@0,e6 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/C2/cpu-module/P0/cpu/B1/bank/D1/mem-module -/* - * Board 3 CPU 0 - */ -name:/platform/i2c@1f,520000/dimm-spd@0,90 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/C3/cpu-module/P0/cpu/B0/bank/D0/mem-module -name:/platform/i2c@1f,520000/dimm-spd@0,92 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/C3/cpu-module/P0/cpu/B0/bank/D1/mem-module -name:/platform/i2c@1f,520000/dimm-spd@0,94 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/C3/cpu-module/P0/cpu/B1/bank/D0/mem-module -name:/platform/i2c@1f,520000/dimm-spd@0,96 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/C3/cpu-module/P0/cpu/B1/bank/D1/mem-module - -/************************************ - * DIMM parents - ***********************************/ -/* - * Board 0 CPU 0 - */ -name:/platform/memory-controller@0,0/memory-module-group?ID=0/memory-module?ID=0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/C0/cpu-module/P0/cpu/B0/bank/D0/mem-module -name:/platform/memory-controller@0,0/memory-module-group?ID=0/memory-module?ID=1 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/C0/cpu-module/P0/cpu/B0/bank/D1/mem-module -name:/platform/memory-controller@0,0/memory-module-group?ID=1/memory-module?ID=0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/C0/cpu-module/P0/cpu/B1/bank/D0/mem-module -name:/platform/memory-controller@0,0/memory-module-group?ID=1/memory-module?ID=1 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/C0/cpu-module/P0/cpu/B1/bank/D1/mem-module -/* - * Board 1 CPU 0 - */ -name:/platform/memory-controller@1,0/memory-module-group?ID=0/memory-module?ID=0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/C1/cpu-module/P0/cpu/B0/bank/D0/mem-module -name:/platform/memory-controller@1,0/memory-module-group?ID=0/memory-module?ID=1 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/C1/cpu-module/P0/cpu/B0/bank/D1/mem-module -name:/platform/memory-controller@1,0/memory-module-group?ID=1/memory-module?ID=0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/C1/cpu-module/P0/cpu/B1/bank/D0/mem-module -name:/platform/memory-controller@1,0/memory-module-group?ID=1/memory-module?ID=1 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/C1/cpu-module/P0/cpu/B1/bank/D1/mem-module -/* - * Board 2 CPU 0 - */ -name:/platform/memory-controller@2,0/memory-module-group?ID=0/memory-module?ID=0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/C2/cpu-module/P0/cpu/B0/bank/D0/mem-module -name:/platform/memory-controller@2,0/memory-module-group?ID=0/memory-module?ID=1 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/C2/cpu-module/P0/cpu/B0/bank/D1/mem-module -name:/platform/memory-controller@2,0/memory-module-group?ID=1/memory-module?ID=0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/C2/cpu-module/P0/cpu/B1/bank/D0/mem-module -name:/platform/memory-controller@2,0/memory-module-group?ID=1/memory-module?ID=1 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/C2/cpu-module/P0/cpu/B1/bank/D1/mem-module -/* - * Board 3 CPU 0 - */ -name:/platform/memory-controller@3,0/memory-module-group?ID=0/memory-module?ID=0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/C3/cpu-module/P0/cpu/B0/bank/D0/mem-module -name:/platform/memory-controller@3,0/memory-module-group?ID=0/memory-module?ID=1 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/C3/cpu-module/P0/cpu/B0/bank/D1/mem-module -name:/platform/memory-controller@3,0/memory-module-group?ID=1/memory-module?ID=0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/C3/cpu-module/P0/cpu/B1/bank/D0/mem-module -name:/platform/memory-controller@3,0/memory-module-group?ID=1/memory-module?ID=1 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/C3/cpu-module/P0/cpu/B1/bank/D1/mem-module - -/* - * create reference properties for motherboard pci devices - */ -_class:/jbus/pciex@1e,600000 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -_class:/jbus/pciex@1f,700000 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board diff --git a/usr/src/cmd/picl/plugins/sun4u/chalupa/Makefile b/usr/src/cmd/picl/plugins/sun4u/chalupa/Makefile deleted file mode 100644 index e25504568b..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chalupa/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, 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 -# -# -#ident "%Z%%M% %I% %E% SMI" -# -# Copyright 2002 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# cmd/picl/plugins/sun4u/chalupa/Makefile -# - -SUBDIRS= devtree frutree frudata frudr envmon .WAIT - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -.KEEP_STATE: - -all install clean clobber: $(SUBDIRS) - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/chalupa/devtree/Makefile b/usr/src/cmd/picl/plugins/sun4u/chalupa/devtree/Makefile deleted file mode 100644 index da82b54e86..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chalupa/devtree/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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# cmd/picl/plugins/sun4u/chalupa/devtree/Makefile -# -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-V440 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONF= picldevtree.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: - -install: $(ROOTLIBDIR) $(ROOTCONF) - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/chalupa/devtree/picldevtree.conf b/usr/src/cmd/picl/plugins/sun4u/chalupa/devtree/picldevtree.conf deleted file mode 100644 index 368ae8108b..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chalupa/devtree/picldevtree.conf +++ /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 2004 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -#ident "%Z%%M% %I% %E% SMI" -# -# Platform specific .conf file for picldevtree plug-in -power-supply-fru-prom seeprom -scc-reader seeprom -dimm-spd seeprom -motherboard-fru-prom seeprom -cpu-fru-prom seeprom -rmc-fru-prom seeprom -scsi-fru-prom seeprom -alarm-fru-prom seeprom -pdb-fru-prom seeprom diff --git a/usr/src/cmd/picl/plugins/sun4u/chalupa/envmon/Makefile b/usr/src/cmd/picl/plugins/sun4u/chalupa/envmon/Makefile deleted file mode 100644 index 7b93182d25..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chalupa/envmon/Makefile +++ /dev/null @@ -1,75 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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. -# -# cmd/picl/plugins/sun4u/chalupa/frutree/Makefile -# - -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-V440 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONFS = piclenvmon.conf -ROOTCONF= $(CONFS:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 -MAININFO= $(CONFS:%.conf=%.info) - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: $(CONFS) - -install: $(ROOTLIBDIR) $(ROOTCONF) - -$(CONFS): $(MAININFO) - @$(RM) -f $@ - @echo "# Copyright 2002 Sun Microsystems, Inc. All rights reserved." \ - > $@ - @echo "# Use is subject to license terms." >> $@ - @echo "# This is a generated file. #ident lines identify sources" >> $@ - $(CPP) -P $(@:%.conf=%.info) | \ - $(SED) -e '/^[ ]*$$/d' >> $@ - @$(CHMOD) 444 $@ - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/chalupa/envmon/piclenvmon.info b/usr/src/cmd/picl/plugins/sun4u/chalupa/envmon/piclenvmon.info deleted file mode 100644 index d4aefc29f7..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chalupa/envmon/piclenvmon.info +++ /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, 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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon after - * it has established rmclomv nodes in /platform - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#define RMC_COMM /platform/pci@1e,600000/isa@7/rmc-comm@0,3e8 - -/* - * add a node for the rmclomv leaf driver - */ -name:RMC_COMM - NODE SUNW,rmclomv service-processor - ENDNODE - -name:RMC_COMM/SUNW,rmclomv - PROP devfs-path string r 0 "/pseudo/rmclomv@0" diff --git a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudata/Makefile b/usr/src/cmd/picl/plugins/sun4u/chalupa/frudata/Makefile deleted file mode 100644 index ee0550ccf2..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudata/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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# cmd/picl/plugins/sun4u/chalupa/frudata/Makefile -# - -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-V440 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONF= libpiclfrudata.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: $(CONF) - -install: $(ROOTLIBDIR) $(ROOTCONF) - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudata/libpiclfrudata.conf b/usr/src/cmd/picl/plugins/sun4u/chalupa/frudata/libpiclfrudata.conf deleted file mode 100644 index 8d3a6b62b6..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudata/libpiclfrudata.conf +++ /dev/null @@ -1,115 +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" -# -# This file creates the FRU device paths for the FRUAccess library -# - -VERSION 1.0 - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/motherboard-fru-prom -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/motherboard-fru-prom@0,a2:motherboard-fru-prom" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/cpu-fru-prom?UnitAddress=0,be -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/cpu-fru-prom@0,be:cpu-fru-prom" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/temperature?UnitAddress=0,30 -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/temperature@0,30:die_temp" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd?UnitAddress=0,b6 -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,b6:dimm-spd" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd?UnitAddress=0,b8 -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,b8:dimm-spd" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd?UnitAddress=0,ba -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,ba:dimm-spd" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd?UnitAddress=0,bc -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,bc:dimm-spd" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/cpu-fru-prom?UnitAddress=0,ce -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/cpu-fru-prom@0,ce:cpu-fru-prom" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/temperature?UnitAddress=0,64 -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/temperature@0,64:die_temp" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd?UnitAddress=0,c6 -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,c6:dimm-spd" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd?UnitAddress=0,c8 -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,c8:dimm-spd" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd?UnitAddress=0,ca -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,ca:dimm-spd" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd?UnitAddress=0,cc -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,cc:dimm-spd" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/cpu-fru-prom?UnitAddress=0,de -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/cpu-fru-prom@0,de:cpu-fru-prom" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/temperature?UnitAddress=0,80 -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/temperature@0,80:die_temp" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd?UnitAddress=0,d6 -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,d6:dimm-spd" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd?UnitAddress=0,d8 -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,d8:dimm-spd" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd?UnitAddress=0,da -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,da:dimm-spd" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd?UnitAddress=0,dc -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,dc:dimm-spd" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/cpu-fru-prom?UnitAddress=0,ee -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/cpu-fru-prom@0,ee:cpu-fru-prom" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/temperature?UnitAddress=0,90 -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/temperature@0,90:die_temp" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd?UnitAddress=0,e6 -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,e6:dimm-spd" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd?UnitAddress=0,e8 -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,e8:dimm-spd" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd?UnitAddress=0,ea -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,ea:dimm-spd" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd?UnitAddress=0,ec -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,ec:dimm-spd" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/rmc-fru-prom -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/rmc-fru-prom@0,a6:rmc-fru-prom" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/alarm-fru-prom -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/alarm-fru-prom@0,ac:alarm-fru-prom" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/pdb-fru-prom -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/pdb-fru-prom@0,7c:pdb-fru-prom" diff --git a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/Makefile b/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/Makefile deleted file mode 100644 index 8f1e6c3a61..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/Makefile +++ /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) 2002, 2010, Oracle and/or its affiliates. All rights reserved. -# -# cmd/picl/plugins/sun4u/chalupa/frudr/Makefile -# -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-V440 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONFS = fru_PS0.conf fru_PS1.conf -CONFS += fru_PSU0.conf fru_PSU1.conf fru_PSU2.conf fru_PSU3.conf -CONFS += fru_HDD0.conf fru_HDD1.conf fru_HDD2.conf -CONFS += fru_HDD3.conf -CONFS += fru_FT0.conf fru_FT1.conf fru_FT2.conf fru_FT3.conf -CONFS += fru_SC.conf -ROOTCONF= $(CONFS:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 -MAININFO= $(CONFS:%.conf=%.info) -OTHERINFOS = fru_PS0_data.info fru_PS1_data.info -OTHERINFOS += fru_PSU0_data.info fru_PSU1_data.info fru_PSU2_data.info fru_PSU3_data.info -OTHERINFOS += fru_HDD0_data.info fru_HDD1_data.info -OTHERINFOS += fru_HDD2_data.info fru_HDD3_data.info -OTHERINFOS += fru_SC_data.info SB-tables.info - - -.KEEP_STATE: - -SUBDIRS = - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: $(LIBS) $(LIBLINKS) $(CONFS) - -install: $(ROOTLIBDIR) $(ROOTCONF) - -$(CONFS): $(MAININFO) $(OTHERINFOS) - @$(RM) -f $@ - @echo "# Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved." \ - > $@ - @echo "# This is a generated file. #ident lines identify sources" >> $@ - $(CPP) -P $(@:%.conf=%.info) | \ - $(SED) -e '/^[ ]*$$/d' >> $@ - @$(CHMOD) 644 $@ - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/SB-tables.info b/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/SB-tables.info deleted file mode 100644 index 110cf69b81..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/SB-tables.info +++ /dev/null @@ -1,560 +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" - * - * This file creates the system board structure - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -/* - * add a Devices table to DVD - */ -name:/frutree/chassis/DVD/cdrom - TABLE Devices - ROW - PROP Class string r 0 "cdrom" - REFPROP _cdrom_ name:/platform/pci@1e,600000/ide@d/sd@0,0 - ENDROW - ENDTABLE -/* - * add a Devices table to the system-board - */ -name:/frutree/chassis/MB/system-board - TABLE Devices - ROW - PROP Class string r 0 "voltage-sensor" - REFPROP _voltage-sensor_ name:RMCLOMV/mb_v_+1v5 - ENDROW - ROW - PROP Class string r 0 "voltage-sensor" - REFPROP _voltage-sensor_ name:RMCLOMV/mb_v_scsi_core - ENDROW - ROW - PROP Class string r 0 "voltage-sensor" - REFPROP _voltage-sensor_ name:RMCLOMV/mb_v_vcctm - ENDROW - ROW - PROP Class string r 0 "voltage-sensor" - REFPROP _voltage-sensor_ name:RMCLOMV/mb_v_net0_1v2d - ENDROW - ROW - PROP Class string r 0 "voltage-sensor" - REFPROP _voltage-sensor_ name:RMCLOMV/mb_v_net1_1v2d - ENDROW - ROW - PROP Class string r 0 "voltage-sensor" - REFPROP _voltage-sensor_ name:RMCLOMV/mb_v_net0_1v2a - ENDROW - ROW - PROP Class string r 0 "voltage-sensor" - REFPROP _voltage-sensor_ name:RMCLOMV/mb_v_net1_1v2a - ENDROW - ROW - PROP Class string r 0 "voltage-sensor" - REFPROP _voltage-sensor_ name:RMCLOMV/mb_v_+3v3 - ENDROW - ROW - PROP Class string r 0 "voltage-sensor" - REFPROP _voltage-sensor_ name:RMCLOMV/mb_v_+3v3stby - ENDROW - ROW - PROP Class string r 0 "voltage-sensor" - REFPROP _voltage-sensor_ name:RMCLOMV/mb_v_+5v - ENDROW - ROW - PROP Class string r 0 "voltage-sensor" - REFPROP _voltage-sensor_ name:RMCLOMV/mb_v_+12v - ENDROW - ROW - PROP Class string r 0 "voltage-sensor" - REFPROP _voltage-sensor_ name:RMCLOMV/mb_v_-12v - ENDROW - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:RMCLOMV/mb_t_amb - ENDROW - ROW - PROP Class string r 0 "current-indicator" - REFPROP _current-indicator_ name:RMCLOMV/mb_ff_scsib - ENDROW - ROW - PROP Class string r 0 "current-indicator" - REFPROP _current-indicator_ name:RMCLOMV/mb_ff_scsia - ENDROW - ROW - PROP Class string r 0 "current-indicator" - REFPROP _current-indicator_ name:RMCLOMV/mb_ff_pok - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/alarm_critical - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/alarm_major - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/alarm_minor - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/alarm_user - ENDROW - ENDTABLE - -/* - * add a Devices table to the battery - */ -name:/frutree/chassis/MB/system-board/BAT/battery - TABLE Devices - ROW - PROP Class string r 0 "voltage-sensor" - REFPROP _voltage-sensor_ name:RMCLOMV/mb_bat_v_bat - ENDROW - ENDTABLE - -/* - * add a Devices table to the service-processor - */ -name:/frutree/chassis/MB/system-board/SC/sc - TABLE Devices - ROW - PROP Class string r 0 "service-processor" - REFPROP _service-processor_ name:RMCLOMV - ENDROW - ENDTABLE - -/* - * fru parent for DVD - */ -name:/platform/pci@1e,600000/ide@d/sd@0,0 - REFPROP _fru_parent name:/frutree/chassis/DVD/cdrom - - -/* - * fru parents for mother-board sensors - */ -name:RMCLOMV/mb_v_+1v5 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_v_scsi_core - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_v_vcctm - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_v_net0_1v2d - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_v_net1_1v2d - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_v_net0_1v2a - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_v_net0_1v2a - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_v_+3v3 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_v_+3v3stby - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_v_+5v - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_v_+12v - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_v_-12v - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_v_vtt - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_t_amb - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_ff_scsib - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_ff_scsia - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_ff_pok - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_bat_v_bat - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/BAT/battery -name:RMCLOMV/alarm_critical - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/alarm_major - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/alarm_minor - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/alarm_user - REFPROP _fru_parent name:/frutree/chassis/MB/system-board - -/* - * Add Devices for cpu-board related sensors - */ -name:/frutree/chassis/C0/system-board - TABLE Devices - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:RMCLOMV/c0_t_amb - ENDROW - ENDTABLE - -name:RMCLOMV/c0_t_amb - REFPROP _fru_parent name:/frutree/chassis/C0/system-board - -name:/frutree/chassis/C1/system-board - TABLE Devices - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:RMCLOMV/c1_t_amb - ENDROW - ENDTABLE - -name:RMCLOMV/c1_t_amb - REFPROP _fru_parent name:/frutree/chassis/C1/system-board - -name:/frutree/chassis/C2/system-board - TABLE Devices - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:RMCLOMV/c2_t_amb - ENDROW - ENDTABLE - -name:RMCLOMV/c2_t_amb - REFPROP _fru_parent name:/frutree/chassis/C2/system-board - -name:/frutree/chassis/C3/system-board - TABLE Devices - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:RMCLOMV/c3_t_amb - ENDROW - ENDTABLE - -name:RMCLOMV/c3_t_amb - REFPROP _fru_parent name:/frutree/chassis/C3/system-board - -/* - * add Devices tables for cpu-related sensors - */ -name:/frutree/chassis/C0/system-board/P0/cpu - TABLE Devices - ROW - PROP Class string r 0 "cpu" - REFPROP _cpu_ name:/platform/SUNW,UltraSPARC-IIIi@0,0 - ENDROW - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:RMCLOMV/c0_p0_t_core - ENDROW - ROW - PROP Class string r 0 "current-indicator" - REFPROP _current-indicator_ name:RMCLOMV/c0_p0_ff_pok - ENDROW - ENDTABLE - -name:RMCLOMV/c0_p0_t_core - REFPROP _fru_parent name:/frutree/chassis/C0/system-board/P0/cpu -name:RMCLOMV/c0_p0_ff_pok - REFPROP _fru_parent name:/frutree/chassis/C0/system-board/P0/cpu - -name:/frutree/chassis/C1/system-board/P0/cpu - TABLE Devices - ROW - PROP Class string r 0 "cpu" - REFPROP _cpu_ name:/platform/SUNW,UltraSPARC-IIIi@1,0 - ENDROW - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:RMCLOMV/c1_p0_t_core - ENDROW - ROW - PROP Class string r 0 "current-indicator" - REFPROP _current-indicator_ name:RMCLOMV/c1_p0_ff_pok - ENDROW - ENDTABLE - -name:RMCLOMV/c1_p0_t_core - REFPROP _fru_parent name:/frutree/chassis/C1/system-board/P0/cpu -name:RMCLOMV/c1_p0_ff_pok - REFPROP _fru_parent name:/frutree/chassis/C1/system-board/P0/cpu - -name:/frutree/chassis/C2/system-board/P0/cpu - TABLE Devices - ROW - PROP Class string r 0 "cpu" - REFPROP _cpu_ name:/platform/SUNW,UltraSPARC-IIIi@2,0 - ENDROW - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:RMCLOMV/c2_p0_t_core - ENDROW - ROW - PROP Class string r 0 "current-indicator" - REFPROP _current-indicator_ name:RMCLOMV/c2_p0_ff_pok - ENDROW - ENDTABLE - -name:RMCLOMV/c2_p0_t_core - REFPROP _fru_parent name:/frutree/chassis/C2/system-board/P0/cpu -name:RMCLOMV/c2_p0_ff_pok - REFPROP _fru_parent name:/frutree/chassis/C2/system-board/P0/cpu - -name:/frutree/chassis/C3/system-board/P0/cpu - TABLE Devices - ROW - PROP Class string r 0 "cpu" - REFPROP _cpu_ name:/platform/SUNW,UltraSPARC-IIIi@3,0 - ENDROW - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:RMCLOMV/c3_p0_t_core - ENDROW - ROW - PROP Class string r 0 "current-indicator" - REFPROP _current-indicator_ name:RMCLOMV/c3_p0_ff_pok - ENDROW - ENDTABLE - -name:RMCLOMV/c3_p0_t_core - REFPROP _fru_parent name:/frutree/chassis/C3/system-board/P0/cpu -name:RMCLOMV/c3_p0_ff_pok - REFPROP _fru_parent name:/frutree/chassis/C3/system-board/P0/cpu - -name:/frutree/chassis/C0/system-board/P0/cpu/B0/bank/D0/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@0,0/memory-module-group?ID=0/memory-module?ID=0 - ENDROW - ENDTABLE -name:/frutree/chassis/C0/system-board/P0/cpu/B0/bank/D1/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@0,0/memory-module-group?ID=0/memory-module?ID=1 - ENDROW - ENDTABLE -name:/frutree/chassis/C0/system-board/P0/cpu/B1/bank/D0/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@0,0/memory-module-group?ID=1/memory-module?ID=0 - ENDROW - ENDTABLE -name:/frutree/chassis/C0/system-board/P0/cpu/B1/bank/D1/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@0,0/memory-module-group?ID=1/memory-module?ID=1 - ENDROW - ENDTABLE -name:/frutree/chassis/C1/system-board/P0/cpu/B0/bank/D0/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@1,0/memory-module-group?ID=0/memory-module?ID=0 - ENDROW - ENDTABLE -name:/frutree/chassis/C1/system-board/P0/cpu/B0/bank/D1/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@1,0/memory-module-group?ID=0/memory-module?ID=1 - ENDROW - ENDTABLE -name:/frutree/chassis/C1/system-board/P0/cpu/B1/bank/D0/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@1,0/memory-module-group?ID=1/memory-module?ID=0 - ENDROW - ENDTABLE -name:/frutree/chassis/C1/system-board/P0/cpu/B1/bank/D1/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@1,0/memory-module-group?ID=1/memory-module?ID=1 - ENDROW - ENDTABLE -name:/frutree/chassis/C2/system-board/P0/cpu/B0/bank/D0/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@2,0/memory-module-group?ID=0/memory-module?ID=0 - ENDROW - ENDTABLE -name:/frutree/chassis/C2/system-board/P0/cpu/B0/bank/D1/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@2,0/memory-module-group?ID=0/memory-module?ID=1 - ENDROW - ENDTABLE -name:/frutree/chassis/C2/system-board/P0/cpu/B1/bank/D0/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@2,0/memory-module-group?ID=1/memory-module?ID=0 - ENDROW - ENDTABLE -name:/frutree/chassis/C2/system-board/P0/cpu/B1/bank/D1/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@2,0/memory-module-group?ID=1/memory-module?ID=1 - ENDROW - ENDTABLE -name:/frutree/chassis/C3/system-board/P0/cpu/B0/bank/D0/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@3,0/memory-module-group?ID=0/memory-module?ID=0 - ENDROW - ENDTABLE -name:/frutree/chassis/C3/system-board/P0/cpu/B0/bank/D1/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@3,0/memory-module-group?ID=0/memory-module?ID=1 - ENDROW - ENDTABLE -name:/frutree/chassis/C3/system-board/P0/cpu/B1/bank/D0/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@3,0/memory-module-group?ID=1/memory-module?ID=0 - ENDROW - ENDTABLE -name:/frutree/chassis/C3/system-board/P0/cpu/B1/bank/D1/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@3,0/memory-module-group?ID=1/memory-module?ID=1 - ENDROW - ENDTABLE - -/* - * SCSI BP Info - */ -name:/frutree/chassis/SCSIBP/system-board - TABLE Devices - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ RMCLOMV/scsibp_t_amb - ENDROW - ENDTABLE - -/* - * System leds and keyswitch should be under "SYS" - */ -name:/frutree/chassis/SYS/led-location -TABLE Devices - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/sys_act - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/sys_service - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/sys_locate - ENDROW -ENDTABLE - -name:/frutree/chassis/SYS/key-location -TABLE Devices - ROW - PROP Class string r 0 "keyswitch" - REFPROP _keyswitch_ name:RMCLOMV/keyswitch - ENDROW -ENDTABLE - -/* - * add tables and fru parents for system fans - */ -name:/frutree/chassis/FT0/F0/fan - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/ft0_f0_tach - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/ft0_f0_act - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/ft0_f0_fault - ENDROW - ENDTABLE -name:/frutree/chassis/FT1/F0/fan - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/ft1_f0_tach - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/ft1_f0_act - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/ft1_f0_fault - ENDROW - ENDTABLE -name:/frutree/chassis/FT1/F1/fan - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/ft1_f1_tach - ENDROW - ENDTABLE -name:/frutree/chassis/FT2/F0/fan - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/ft2_f0_tach - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/ft2_f0_act - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/ft2_f0_fault - ENDROW - ENDTABLE -name:/frutree/chassis/FT3/F0/fan - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/ft3_f0 - ENDROW - ENDTABLE diff --git a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_FT0.info b/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_FT0.info deleted file mode 100644 index d38f0ab3d3..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_FT0.info +++ /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 (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for FT0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -VERSION 1.1 -VERBOSE 1 - -name:/frutree/chassis/FT0 - Node F0 location - PROP SlotType string r 0 "fan-unit" - Prop Label string r 0 "F0" - NODE fan fru - ENDNODE - ENDNODE -name:/platform/pci@1e,600000/isa@7/rmc-comm@0,3e8/SUNW,rmclomv/ft0_f0_tach - REFPROP _location_parent name:/frutree/chassis/FT0/F0 -name:/platform/pci@1e,600000/isa@7/rmc-comm@0,3e8/SUNW,rmclomv/ft0_f0_act - REFPROP _location_parent name:/frutree/chassis/FT0/F0 -name:/platform/pci@1e,600000/isa@7/rmc-comm@0,3e8/SUNW,rmclomv/ft0_f0_fault - REFPROP _location_parent name:/frutree/chassis/FT0/F0 -name:/frutree/chassis/FT0/F0/fan - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:/platform/pci@1e,600000/isa@7/rmc-comm@0,3e8/SUNW,rmclomv/ft0_f0_tach - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:/platform/pci@1e,600000/isa@7/rmc-comm@0,3e8/SUNW,rmclomv/ft0_f0_act - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:/platform/pci@1e,600000/isa@7/rmc-comm@0,3e8/SUNW,rmclomv/ft0_f0_fault - ENDROW - ENDTABLE diff --git a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_FT1.info b/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_FT1.info deleted file mode 100644 index 31bd94cfc9..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_FT1.info +++ /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) 2002, 2010, Oracle and/or its affiliates. All rights reserved. - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for FT1 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -VERSION 1.1 -VERBOSE 1 - -name:/frutree/chassis/FT1 - Node F0 location - PROP SlotType string r 0 "fan-unit" - Prop Label string r 0 "F0" - NODE fan fru - ENDNODE - ENDNODE - Node F1 location - PROP SlotType string r 0 "fan-unit" - Prop Label string r 0 "F1" - NODE fan fru - ENDNODE - ENDNODE -name:/platform/pci@1e,600000/isa@7/rmc-comm@0,3e8/SUNW,rmclomv/ft1_f0_tach - REFPROP _location_parent name:/frutree/chassis/FT1/F0 -name:/platform/pci@1e,600000/isa@7/rmc-comm@0,3e8/SUNW,rmclomv/ft1_f1_tach - REFPROP _location_parent name:/frutree/chassis/FT1/F1 -name:/platform/pci@1e,600000/isa@7/rmc-comm@0,3e8/SUNW,rmclomv/ft1_f0_act - REFPROP _location_parent name:/frutree/chassis/FT1/F0 -name:/platform/pci@1e,600000/isa@7/rmc-comm@0,3e8/SUNW,rmclomv/ft1_f0_fault - REFPROP _location_parent name:/frutree/chassis/FT1/F0 -name:/frutree/chassis/FT1/F0/fan - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:/platform/pci@1e,600000/isa@7/rmc-comm@0,3e8/SUNW,rmclomv/ft1_f0_tach - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:/platform/pci@1e,600000/isa@7/rmc-comm@0,3e8/SUNW,rmclomv/ft1_f0_act - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:/platform/pci@1e,600000/isa@7/rmc-comm@0,3e8/SUNW,rmclomv/ft1_f0_fault - ENDROW - ENDTABLE -name:/frutree/chassis/FT1/F1/fan - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:/platform/pci@1e,600000/isa@7/rmc-comm@0,3e8/SUNW,rmclomv/ft1_f1_tach - ENDROW - ENDTABLE diff --git a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_FT2.info b/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_FT2.info deleted file mode 100644 index fbb54145ca..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_FT2.info +++ /dev/null @@ -1,90 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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) 2002, 2010, Oracle and/or its affiliates. All rights reserved. - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for FT2 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -VERSION 1.1 -VERBOSE 1 - -name:/frutree/chassis/FT2 - PROP SlotType string r 0 "fan-tray" - PROP Label string r 0 "FT2" - Node F0 location - PROP SlotType string r 0 "fan-unit" - Prop Label string r 0 "F0" - NODE fan fru - ENDNODE - ENDNODE -name:/platform/pci@1e,600000/isa@7/rmc-comm@0,3e8/SUNW,rmclomv/ft2_f0_tach - REFPROP _location_parent name:/frutree/chassis/FT2/F0 -name:/platform/pci@1e,600000/isa@7/rmc-comm@0,3e8/SUNW,rmclomv/ft2_f0_act - REFPROP _location_parent name:/frutree/chassis/FT2/F0 -name:/platform/pci@1e,600000/isa@7/rmc-comm@0,3e8/SUNW,rmclomv/ft2_f0_fault - REFPROP _location_parent name:/frutree/chassis/FT2/F0 -name:/frutree/chassis/FT2/F0/fan - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:/platform/pci@1e,600000/isa@7/rmc-comm@0,3e8/SUNW,rmclomv/ft2_f0_tach - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:/platform/pci@1e,600000/isa@7/rmc-comm@0,3e8/SUNW,rmclomv/ft2_f0_act - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:/platform/pci@1e,600000/isa@7/rmc-comm@0,3e8/SUNW,rmclomv/ft2_f0_fault - ENDROW - ENDTABLE diff --git a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_FT3.info b/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_FT3.info deleted file mode 100644 index 32ce751bac..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_FT3.info +++ /dev/null @@ -1,78 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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) 2002, 2010, Oracle and/or its affiliates. All rights reserved. - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for FT2 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -VERSION 1.1 -VERBOSE 1 - -name:/frutree/chassis/FT3 - PROP SlotType string r 0 "fan-tray" - PROP Label string r 0 "FT3" - Node F0 location - PROP SlotType string r 0 "fan-unit" - Prop Label string r 0 "F0" - NODE fan fru - ENDNODE - ENDNODE -name:/platform/pci@1e,600000/isa@7/rmc-comm@0,3e8/SUNW,rmclomv/ft3_f0 - REFPROP _location_parent name:/frutree/chassis/FT3/F0 -name:/frutree/chassis/FT3/F0/fan - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:/platform/pci@1e,600000/isa@7/rmc-comm@0,3e8/SUNW,rmclomv/ft3_f0 - ENDROW - ENDTABLE diff --git a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_HDD0.info b/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_HDD0.info deleted file mode 100644 index ee6d7bec01..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_HDD0.info +++ /dev/null @@ -1,74 +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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_HDD0_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_HDD0_data.info b/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_HDD0_data.info deleted file mode 100644 index 1e6c4cc63f..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_HDD0_data.info +++ /dev/null @@ -1,82 +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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -name:/frutree/chassis/HDD0/disk -TABLE Devices -ROW -PROP Class string r 0 "block" -REFPROP _block_ name:/platform/pci@1f,700000/scsi@2/sd@0,0 -ENDROW -ENDTABLE - -name:/platform/pci@1f,700000/scsi@2/sd@0,0 - REFPROP _fru_parent name:/frutree/chassis/HDD0/disk -name:/frutree/chassis/HDD0/disk - PROP OperationalStatus string r 0 "present" diff --git a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_HDD1.info b/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_HDD1.info deleted file mode 100644 index b0c89a3705..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_HDD1.info +++ /dev/null @@ -1,74 +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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_HDD1_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_HDD1_data.info b/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_HDD1_data.info deleted file mode 100644 index 880fbb6d06..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_HDD1_data.info +++ /dev/null @@ -1,82 +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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -name:/frutree/chassis/HDD1/disk -TABLE Devices -ROW -PROP Class string r 0 "block" -REFPROP _block_ name:/platform/pci@1f,700000/scsi@2/sd@1,0 -ENDROW -ENDTABLE - -name:/platform/pci@1f,700000/scsi@2/sd@1,0 - REFPROP _fru_parent name:/frutree/chassis/HDD1/disk -name:/frutree/chassis/HDD1/disk - PROP OperationalStatus string r 0 "present" diff --git a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_HDD2.info b/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_HDD2.info deleted file mode 100644 index 1319d6513e..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_HDD2.info +++ /dev/null @@ -1,74 +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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_HDD2_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_HDD2_data.info b/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_HDD2_data.info deleted file mode 100644 index e4933191bd..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_HDD2_data.info +++ /dev/null @@ -1,82 +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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -name:/frutree/chassis/HDD2/disk -TABLE Devices -ROW -PROP Class string r 0 "block" -REFPROP _block_ name:/platform/pci@1f,700000/scsi@2/sd@2,0 -ENDROW -ENDTABLE - -name:/platform/pci@1f,700000/scsi@2/sd@2,0 - REFPROP _fru_parent name:/frutree/chassis/HDD2/disk -name:/frutree/chassis/HDD2/disk - PROP OperationalStatus string r 0 "present" diff --git a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_HDD3.info b/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_HDD3.info deleted file mode 100644 index 213d68e54f..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_HDD3.info +++ /dev/null @@ -1,74 +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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_HDD3_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_HDD3_data.info b/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_HDD3_data.info deleted file mode 100644 index c982752f0d..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_HDD3_data.info +++ /dev/null @@ -1,82 +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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -name:/frutree/chassis/HDD3/disk -TABLE Devices -ROW -PROP Class string r 0 "block" -REFPROP _block_ name:/platform/pci@1f,700000/scsi@2/sd@3,0 -ENDROW -ENDTABLE - -name:/platform/pci@1f,700000/scsi@2/sd@3,0 - REFPROP _fru_parent name:/frutree/chassis/HDD3/disk -name:/frutree/chassis/HDD3/disk - PROP OperationalStatus string r 0 "present" diff --git a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PS0.info b/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PS0.info deleted file mode 100644 index 6ef5a64d21..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PS0.info +++ /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, 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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -/* create a /platform node for the seeprom */ -name:/platform/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,b0 - PROP binding-name string r 0 "i2c-at24c64" - PROP driver-name string r 0 "seeprom" - PROP devfs-path string r 0 "/pci@1e,600000/isa@7/i2c/power-supply-fru-prom" - PROP compatible string r 0 "i2c-at24c64" - PROP device_type string r 0 "fru-prom" - PROP UnitAddress string r 0 "0,b0" - -/* and then add /frutree node and cross-references */ -#include "fru_PS0_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PS0_data.info b/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PS0_data.info deleted file mode 100644 index d424013324..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PS0_data.info +++ /dev/null @@ -1,127 +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 2002-2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -#ifndef RMCLOMV -#define RMCLOMV /platform/pci@1e,600000/isa@7/rmc-comm@0,3e8/SUNW,rmclomv -#endif /* RMCLOMV */ - -name:/frutree/chassis/PS0/power-supply - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,b0 -TABLE Devices -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps0_ff_pok -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps0_p_pwr -ENDROW -ROW -PROP Class string r 0 "fan" -REFPROP _fan_ name:RMCLOMV/ps0_ff_pdct_fan -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps0_pok -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps0_service -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps0_ok2rm -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps0_stby -ENDROW -ENDTABLE - - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,b0 - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply - PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,b0:power-supply-fru-prom" - -name:RMCLOMV/ps0_ff_pok - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_p_pwr - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_ff_pdct_fan - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_pok - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_service - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_ok2rm - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_stby - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply diff --git a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PS1.info b/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PS1.info deleted file mode 100644 index 83c3657dbc..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PS1.info +++ /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, 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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -/* create a /platform node for the seeprom */ -name:/platform/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,a4 - PROP binding-name string r 0 "i2c-at24c64" - PROP driver-name string r 0 "seeprom" - PROP devfs-path string r 0 "/pci@1e,600000/isa@7/i2c/power-supply-fru-prom" - PROP compatible string r 0 "i2c-at24c64" - PROP device_type string r 0 "fru-prom" - PROP UnitAddress string r 0 "0,a4" - -/* and then add /frutree node and cross-references */ -#include "fru_PS1_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PS1_data.info b/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PS1_data.info deleted file mode 100644 index 10853355d3..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PS1_data.info +++ /dev/null @@ -1,126 +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 2002-2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS1 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -#ifndef RMCLOMV -#define RMCLOMV /platform/pci@1e,600000/isa@7/rmc-comm@0,3e8/SUNW,rmclomv -#endif /* RMCLOMV */ - -name:/frutree/chassis/PS1/power-supply - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,a4 -TABLE Devices -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps1_ff_pok -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps1_p_pwr -ENDROW -ROW -PROP Class string r 0 "fan" -REFPROP _fan_ name:RMCLOMV/ps1_ff_pdct_fan -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps1_pok -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps1_service -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps1_ok2rm -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps1_stby -ENDROW -ENDTABLE - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,a4 - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply - PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,a4:power-supply-fru-prom" - -name:RMCLOMV/ps1_ff_pok - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply -name:RMCLOMV/ps1_p_pwr - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply -name:RMCLOMV/ps1_ff_pdct_fan - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply -name:RMCLOMV/ps1_pok - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply -name:RMCLOMV/ps1_service - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply -name:RMCLOMV/ps1_ok2rm - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply -name:RMCLOMV/ps1_stby - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply diff --git a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PSU0.info b/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PSU0.info deleted file mode 100644 index 774e83767e..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PSU0.info +++ /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, 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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PSU0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -/* create a /platform node for the seeprom */ -name:/platform/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,c0 - PROP binding-name string r 0 "i2c-at24c64" - PROP driver-name string r 0 "seeprom" - PROP devfs-path string r 0 "/pci@1e,600000/isa@7/i2c/power-supply-fru-prom" - PROP compatible string r 0 "i2c-at24c64" - PROP device_type string r 0 "fru-prom" - PROP UnitAddress string r 0 "0,c0" - -/* and then add /frutree node and cross-references */ -#include "fru_PSU0_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PSU0_data.info b/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PSU0_data.info deleted file mode 100644 index d6631b6eb8..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PSU0_data.info +++ /dev/null @@ -1,144 +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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PSU0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -#ifndef RMCLOMV -#define RMCLOMV /platform/pci@1e,600000/isa@7/rmc-comm@0,3e8/SUNW,rmclomv -#endif /* RMCLOMV */ - -name:/frutree/chassis/PSU0/power-supply - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,c0 -TABLE Devices -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps0_p_pwr -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps0_ff_pok -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps0_ff_uv -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps0_ff_ov -ENDROW -ROW -PROP Class string r 0 "current-indicator" -REFPROP _current-indicator_ name:RMCLOMV/ps0_ff_oc -ENDROW -ROW -PROP Class string r 0 "temperature-indicator" -REFPROP _temperature-indicator_ name:RMCLOMV/ps0_ff_ot -ENDROW -ROW -PROP Class string r 0 "fan" -REFPROP _fan_ name:RMCLOMV/ps0_ff_fan -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps0_pok -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps0_service -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps0_ok2rm -ENDROW -ENDTABLE - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,c0 - REFPROP _fru_parent name:/frutree/chassis/PSU0/power-supply - PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,c0:power-supply-fru-prom" - -name:RMCLOMV/ps0_p_pwr - REFPROP _fru_parent name:/frutree/chassis/PSU0/power-supply -name:RMCLOMV/ps0_ff_pok - REFPROP _fru_parent name:/frutree/chassis/PSU0/power-supply -name:RMCLOMV/ps0_ff_uv - REFPROP _fru_parent name:/frutree/chassis/PSU0/power-supply -name:RMCLOMV/ps0_ff_ov - REFPROP _fru_parent name:/frutree/chassis/PSU0/power-supply -name:RMCLOMV/ps0_ff_oc - REFPROP _fru_parent name:/frutree/chassis/PSU0/power-supply -name:RMCLOMV/ps0_ff_ot - REFPROP _fru_parent name:/frutree/chassis/PSU0/power-supply -name:RMCLOMV/ps0_ff_fan - REFPROP _fru_parent name:/frutree/chassis/PSU0/power-supply -name:RMCLOMV/ps0_pok - REFPROP _fru_parent name:/frutree/chassis/PSU0/power-supply -name:RMCLOMV/ps0_service - REFPROP _fru_parent name:/frutree/chassis/PSU0/power-supply -name:RMCLOMV/ps0_ok2rm - REFPROP _fru_parent name:/frutree/chassis/PSU0/power-supply diff --git a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PSU1.info b/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PSU1.info deleted file mode 100644 index 96f3e64dbe..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PSU1.info +++ /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, 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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PSU1 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -/* create a /platform node for the seeprom */ -name:/platform/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,c2 - PROP binding-name string r 0 "i2c-at24c64" - PROP driver-name string r 0 "seeprom" - PROP devfs-path string r 0 "/pci@1e,600000/isa@7/i2c/power-supply-fru-prom" - PROP compatible string r 0 "i2c-at24c64" - PROP device_type string r 0 "fru-prom" - PROP UnitAddress string r 0 "0,c2" - -/* and then add /frutree node and cross-references */ -#include "fru_PSU1_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PSU1_data.info b/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PSU1_data.info deleted file mode 100644 index d9a35b47fa..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PSU1_data.info +++ /dev/null @@ -1,144 +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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PSU1 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -#ifndef RMCLOMV -#define RMCLOMV /platform/pci@1e,600000/isa@7/rmc-comm@0,3e8/SUNW,rmclomv -#endif /* RMCLOMV */ - -name:/frutree/chassis/PSU1/power-supply - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,c2 -TABLE Devices -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps1_p_pwr -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps1_ff_pok -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps1_ff_uv -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps1_ff_ov -ENDROW -ROW -PROP Class string r 0 "current-indicator" -REFPROP _current-indicator_ name:RMCLOMV/ps1_ff_oc -ENDROW -ROW -PROP Class string r 0 "temperature-indicator" -REFPROP _temperature-indicator_ name:RMCLOMV/ps1_ff_ot -ENDROW -ROW -PROP Class string r 0 "fan" -REFPROP _fan_ name:RMCLOMV/ps1_ff_fan -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps1_pok -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps1_service -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps1_ok2rm -ENDROW -ENDTABLE - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,c2 - REFPROP _fru_parent name:/frutree/chassis/PSU1/power-supply - PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,c2:power-supply-fru-prom" - -name:RMCLOMV/ps1_p_pwr - REFPROP _fru_parent name:/frutree/chassis/PSU1/power-supply -name:RMCLOMV/ps1_ff_pok - REFPROP _fru_parent name:/frutree/chassis/PSU1/power-supply -name:RMCLOMV/ps1_ff_uv - REFPROP _fru_parent name:/frutree/chassis/PSU1/power-supply -name:RMCLOMV/ps1_ff_ov - REFPROP _fru_parent name:/frutree/chassis/PSU1/power-supply -name:RMCLOMV/ps1_ff_oc - REFPROP _fru_parent name:/frutree/chassis/PSU1/power-supply -name:RMCLOMV/ps1_ff_ot - REFPROP _fru_parent name:/frutree/chassis/PSU1/power-supply -name:RMCLOMV/ps1_ff_fan - REFPROP _fru_parent name:/frutree/chassis/PSU1/power-supply -name:RMCLOMV/ps1_pok - REFPROP _fru_parent name:/frutree/chassis/PSU1/power-supply -name:RMCLOMV/ps1_service - REFPROP _fru_parent name:/frutree/chassis/PSU1/power-supply -name:RMCLOMV/ps1_ok2rm - REFPROP _fru_parent name:/frutree/chassis/PSU1/power-supply diff --git a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PSU2.info b/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PSU2.info deleted file mode 100644 index 5dd912e949..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PSU2.info +++ /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, 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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PSU2 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -/* create a /platform node for the seeprom */ -name:/platform/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,70 - PROP binding-name string r 0 "i2c-at24c64" - PROP driver-name string r 0 "seeprom" - PROP devfs-path string r 0 "/pci@1e,600000/isa@7/i2c/power-supply-fru-prom" - PROP compatible string r 0 "i2c-at24c64" - PROP device_type string r 0 "fru-prom" - PROP UnitAddress string r 0 "0,70" - -/* and then add /frutree node and cross-references */ -#include "fru_PSU2_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PSU2_data.info b/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PSU2_data.info deleted file mode 100644 index aee8d5485e..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PSU2_data.info +++ /dev/null @@ -1,144 +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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PSU2 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -#ifndef RMCLOMV -#define RMCLOMV /platform/pci@1e,600000/isa@7/rmc-comm@0,3e8/SUNW,rmclomv -#endif /* RMCLOMV */ - -name:/frutree/chassis/PSU2/power-supply - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,70 -TABLE Devices -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps2_p_pwr -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps2_ff_pok -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps2_ff_uv -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps2_ff_ov -ENDROW -ROW -PROP Class string r 0 "current-indicator" -REFPROP _current-indicator_ name:RMCLOMV/ps2_ff_oc -ENDROW -ROW -PROP Class string r 0 "temperature-indicator" -REFPROP _temperature-indicator_ name:RMCLOMV/ps2_ff_ot -ENDROW -ROW -PROP Class string r 0 "fan" -REFPROP _fan_ name:RMCLOMV/ps2_ff_fan -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps2_pok -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps2_service -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps2_ok2rm -ENDROW -ENDTABLE - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,70 - REFPROP _fru_parent name:/frutree/chassis/PSU2/power-supply - PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,70:power-supply-fru-prom" - -name:RMCLOMV/ps2_p_pwr - REFPROP _fru_parent name:/frutree/chassis/PSU2/power-supply -name:RMCLOMV/ps2_ff_pok - REFPROP _fru_parent name:/frutree/chassis/PSU2/power-supply -name:RMCLOMV/ps2_ff_uv - REFPROP _fru_parent name:/frutree/chassis/PSU2/power-supply -name:RMCLOMV/ps2_ff_ov - REFPROP _fru_parent name:/frutree/chassis/PSU2/power-supply -name:RMCLOMV/ps2_ff_oc - REFPROP _fru_parent name:/frutree/chassis/PSU2/power-supply -name:RMCLOMV/ps2_ff_ot - REFPROP _fru_parent name:/frutree/chassis/PSU2/power-supply -name:RMCLOMV/ps2_ff_fan - REFPROP _fru_parent name:/frutree/chassis/PSU2/power-supply -name:RMCLOMV/ps2_pok - REFPROP _fru_parent name:/frutree/chassis/PSU2/power-supply -name:RMCLOMV/ps2_service - REFPROP _fru_parent name:/frutree/chassis/PSU2/power-supply -name:RMCLOMV/ps2_ok2rm - REFPROP _fru_parent name:/frutree/chassis/PSU2/power-supply diff --git a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PSU3.info b/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PSU3.info deleted file mode 100644 index 0837128d4a..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PSU3.info +++ /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, 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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PSU3 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -/* create a /platform node for the seeprom */ -name:/platform/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,72 - PROP binding-name string r 0 "i2c-at24c64" - PROP driver-name string r 0 "seeprom" - PROP devfs-path string r 0 "/pci@1e,600000/isa@7/i2c/power-supply-fru-prom" - PROP compatible string r 0 "i2c-at24c64" - PROP device_type string r 0 "fru-prom" - PROP UnitAddress string r 0 "0,72" - -/* and then add /frutree node and cross-references */ -#include "fru_PSU3_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PSU3_data.info b/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PSU3_data.info deleted file mode 100644 index d2912e25bc..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_PSU3_data.info +++ /dev/null @@ -1,144 +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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PSU3 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -#ifndef RMCLOMV -#define RMCLOMV /platform/pci@1e,600000/isa@7/rmc-comm@0,3e8/SUNW,rmclomv -#endif /* RMCLOMV */ - -name:/frutree/chassis/PSU3/power-supply - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,72 -TABLE Devices -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps3_p_pwr -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps3_ff_pok -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps3_ff_uv -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps3_ff_ov -ENDROW -ROW -PROP Class string r 0 "current-indicator" -REFPROP _current-indicator_ name:RMCLOMV/ps3_ff_oc -ENDROW -ROW -PROP Class string r 0 "temperature-indicator" -REFPROP _temperature-indicator_ name:RMCLOMV/ps3_ff_ot -ENDROW -ROW -PROP Class string r 0 "fan" -REFPROP _fan_ name:RMCLOMV/ps3_ff_fan -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps3_pok -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps3_service -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps3_ok2rm -ENDROW -ENDTABLE - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,72 - REFPROP _fru_parent name:/frutree/chassis/PSU3/power-supply - PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,72:power-supply-fru-prom" - -name:RMCLOMV/ps3_p_pwr - REFPROP _fru_parent name:/frutree/chassis/PSU3/power-supply -name:RMCLOMV/ps3_ff_pok - REFPROP _fru_parent name:/frutree/chassis/PSU3/power-supply -name:RMCLOMV/ps3_ff_uv - REFPROP _fru_parent name:/frutree/chassis/PSU3/power-supply -name:RMCLOMV/ps3_ff_ov - REFPROP _fru_parent name:/frutree/chassis/PSU3/power-supply -name:RMCLOMV/ps3_ff_oc - REFPROP _fru_parent name:/frutree/chassis/PSU3/power-supply -name:RMCLOMV/ps3_ff_ot - REFPROP _fru_parent name:/frutree/chassis/PSU3/power-supply -name:RMCLOMV/ps3_ff_fan - REFPROP _fru_parent name:/frutree/chassis/PSU3/power-supply -name:RMCLOMV/ps3_pok - REFPROP _fru_parent name:/frutree/chassis/PSU3/power-supply -name:RMCLOMV/ps3_service - REFPROP _fru_parent name:/frutree/chassis/PSU3/power-supply -name:RMCLOMV/ps3_ok2rm - REFPROP _fru_parent name:/frutree/chassis/PSU3/power-supply diff --git a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_SC.info b/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_SC.info deleted file mode 100644 index 4a3b122b91..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_SC.info +++ /dev/null @@ -1,75 +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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_SC_data.info" -#include "SB-tables.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_SC_data.info b/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_SC_data.info deleted file mode 100644 index b8d882d28b..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chalupa/frudr/fru_SC_data.info +++ /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, 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" - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -/* - * There are a lot of nodes below the rmclomv node, define a shortname - */ -#define RMCLOMV /platform/pci@1e,600000/isa@7/rmc-comm@0,3e8/SUNW,rmclomv - -/* - * add disk leds - */ -name:/frutree/chassis/HDD0 - TABLE Devices - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd0_act - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd0_service - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd0_ok2rm - ENDROW - ENDTABLE - -name:RMCLOMV/hdd0_act - REFPROP _location_parent name:/frutree/chassis/HDD0 -name:RMCLOMV/hdd0_service - REFPROP _location_parent name:/frutree/chassis/HDD0 -name:RMCLOMV/hdd0_ok2rm - REFPROP _location_parent name:/frutree/chassis/HDD0 - -name:/frutree/chassis/HDD1 - TABLE Devices - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd1_act - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd1_service - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd1_ok2rm - ENDROW - ENDTABLE - -name:RMCLOMV/hdd1_act - REFPROP _location_parent name:/frutree/chassis/HDD1 -name:RMCLOMV/hdd1_service - REFPROP _location_parent name:/frutree/chassis/HDD1 -name:RMCLOMV/hdd1_ok2rm - REFPROP _location_parent name:/frutree/chassis/HDD1 - -name:/frutree/chassis/HDD2 - TABLE Devices - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd2_act - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd2_service - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd2_ok2rm - ENDROW - ENDTABLE - -name:RMCLOMV/hdd2_act - REFPROP _location_parent name:/frutree/chassis/HDD2 -name:RMCLOMV/hdd2_service - REFPROP _location_parent name:/frutree/chassis/HDD2 -name:RMCLOMV/hdd2_ok2rm - REFPROP _location_parent name:/frutree/chassis/HDD2 - -name:/frutree/chassis/HDD3 - TABLE Devices - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd3_act - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd3_service - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd3_ok2rm - ENDROW - ENDTABLE - -name:RMCLOMV/hdd3_act - REFPROP _location_parent name:/frutree/chassis/HDD3 -name:RMCLOMV/hdd3_service - REFPROP _location_parent name:/frutree/chassis/HDD3 -name:RMCLOMV/hdd3_ok2rm - REFPROP _location_parent name:/frutree/chassis/HDD3 - -/* add disk Device tables and _fru_parent refprops */ -#include "fru_HDD0_data.info" -#include "fru_HDD1_data.info" -#include "fru_HDD2_data.info" -#include "fru_HDD3_data.info" - -/* - * power supplies - */ -#include "fru_PS0_data.info" -#include "fru_PS1_data.info" -#include "fru_PSU0_data.info" -#include "fru_PSU1_data.info" -#include "fru_PSU2_data.info" -#include "fru_PSU3_data.info" - -/* - * SCSIBP info - */ -name:RMCLOMV/scsibp_t_amb - REFPROP _fru_parent /frutree/chassis/SCSIBP/system-board -name:/platform/pci@1e,600000/isa@7/i2c@0,320/scsi-fru-prom@0,a8 - REFPROP _fru_parent /frutree/chassis/SCSIBP/system-board - -/* - * FAN info - */ -name:RMCLOMV/ft0_f0_tach - REFPROP _location_parent name:/frutree/chassis/FT0/F0 -name:RMCLOMV/ft1_f0_tach - REFPROP _location_parent name:/frutree/chassis/FT1/F0 -name:RMCLOMV/ft1_f1_tach - REFPROP _location_parent name:/frutree/chassis/FT1/F1 -name:RMCLOMV/ft2_f0_tach - REFPROP _location_parent name:/frutree/chassis/FT2/F0 -name:RMCLOMV/ft3_f0 - REFPROP _location_parent name:/frutree/chassis/FT3/F0 - -/* - * fan leds info - */ -name:RMCLOMV/ft0_f0_act - REFPROP _location_parent name:/frutree/chassis/FT0/F0 -name:RMCLOMV/ft0_f0_fault - REFPROP _location_parent name:/frutree/chassis/FT0/F0 -name:RMCLOMV/ft1_f0_act - REFPROP _location_parent name:/frutree/chassis/FT1/F0 -name:RMCLOMV/ft1_f0_fault - REFPROP _location_parent name:/frutree/chassis/FT1/F0 -name:RMCLOMV/ft2_f0_act - REFPROP _location_parent name:/frutree/chassis/FT2/F0 -name:RMCLOMV/ft2_f0_fault - REFPROP _location_parent name:/frutree/chassis/FT2/F0 - -/* - * SYS LEDs info - */ -name:RMCLOMV/sys_act - REFPROP _fru_parent name:/frutree/chassis/SYS/led-location -name:RMCLOMV/sys_service - REFPROP _fru_parent name:/frutree/chassis/SYS/led-location -name:RMCLOMV/sys_locate - REFPROP _fru_parent name:/frutree/chassis/SYS/led-location - PROP IsLocator string r 0 "true" - PROP LocatorName string r 0 "system" - -/* - * keyswitch info - */ -name:RMCLOMV/keyswitch - REFPROP _fru_parent name:/frutree/chassis/SYS/key-location - PROP Label string r 0 "SYSCTRL" diff --git a/usr/src/cmd/picl/plugins/sun4u/chalupa/frutree/Makefile b/usr/src/cmd/picl/plugins/sun4u/chalupa/frutree/Makefile deleted file mode 100644 index dd0f844a94..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chalupa/frutree/Makefile +++ /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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# cmd/picl/plugins/sun4u/chalupa/frutree/Makefile -# - -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-V440 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -INCDIR1 = . -INCDIR2 = ../frudr -INCS = -I$(INCDIR1) -I$(INCDIR2) -CONFS = piclfrutree.conf -ROOTCONF = $(CONFS:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 -MAININFO = $(CONFS:%.conf=%.info) -OTHERINFOS = $(INCDIR1)/system-board.info -OTHERINFOS += $(INCDIR2)/fru_HDD0_data.info -OTHERINFOS += $(INCDIR2)/fru_HDD1_data.info -OTHERINFOS += $(INCDIR2)/fru_HDD2_data.info -OTHERINFOS += $(INCDIR2)/fru_HDD2_data.info -OTHERINFOS += $(INCDIR2)/fru_PS0_data.info -OTHERINFOS += $(INCDIR2)/fru_PS1_data.info -OTHERINFOS += $(INCDIR2)/fru_SC_data.info - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: $(CONFS) - -install: $(ROOTLIBDIR) $(ROOTCONF) - -$(CONFS): $(MAININFO) $(OTHERINFOS) - @$(RM) -f $@ - @echo "# Copyright 2002 Sun Microsystems, Inc. All rights reserved." \ - > $@ - @echo "# Use is subject to license terms." >> $@ - @echo "# This is a generated file. #ident lines identify sources" >> $@ - $(CPP) -P $(INCS) $(@:%.conf=%.info) | \ - $(SED) -e '/^[ ]*$$/d' >> $@ - @$(CHMOD) 444 $@ - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/chalupa/frutree/piclfrutree.info b/usr/src/cmd/picl/plugins/sun4u/chalupa/frutree/piclfrutree.info deleted file mode 100644 index d554b293a5..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chalupa/frutree/piclfrutree.info +++ /dev/null @@ -1,447 +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" - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -/* - * There are a lot of nodes below the rmclomv node, define a shortname - */ -#define RMCLOMV /platform/pci@1e,600000/isa@7/rmc-comm@0,3e8/SUNW,rmclomv - -VERSION 1.1 -VERBOSE 1 -NODE frutree picl - NODE chassis fru - /* - * SunMC physical view view_points for this platform - * This will get moved to a separate SunMC physical view plugin later. - */ - PROP ViewPoints string r 0 "front rear side" - NODE SYS location - PROP SlotType string r 0 "chassis" - PROP Label string r 0 "SYS" - NODE led-location fru - ENDNODE - NODE key-location fru - ENDNODE - ENDNODE - NODE SC location - PROP SlotType string r 0 "system-controler-board" - PROP Label string r 0 "SC" - ENDNODE - NODE MB location - PROP SlotType string r 0 "system-board" - PROP Label string r 0 "MB" - ENDNODE - NODE FT0 location - PROP SlotType string r 0 "fan-tray" - PROP Label string r 0 "FT0" - ENDNODE - NODE FT1 location - PROP SlotType string r 0 "fan-tray" - PROP Label string r 0 "FT1" - ENDNODE - NODE HDD0 location - PROP SlotType string r 0 "disk-slot" - PROP Label string r 0 "HDD0" - ENDNODE - NODE HDD1 location - PROP SlotType string r 0 "disk-slot" - PROP Label string r 0 "HDD1" - ENDNODE - NODE HDD2 location - PROP SlotType string r 0 "disk-slot" - PROP Label string r 0 "HDD2" - ENDNODE - NODE HDD3 location - PROP SlotType string r 0 "disk-slot" - PROP Label string r 0 "HDD3" - ENDNODE - NODE DVD location - PROP SlotType string r 0 "cdrom-slot" - PROP Label string r 0 "DVD" - ENDNODE - NODE SCC location - PROP Label string r 0 "SCC" - NODE scc fru - ENDNODE - ENDNODE - NODE PCI0 location - PROP SlotType string r 0 "pci" - PROP Label string r 0 "PCI0" - ENDNODE - NODE PCI1 location - PROP SlotType string r 0 "pci" - PROP Label string r 0 "PCI1" - ENDNODE - NODE PCI2 location - PROP SlotType string r 0 "pci" - PROP Label string r 0 "PCI2" - ENDNODE - NODE PCI3 location - PROP SlotType string r 0 "pci" - PROP Label string r 0 "PCI3" - ENDNODE - NODE PCI4 location - PROP SlotType string r 0 "pci" - PROP Label string r 0 "PCI4" - ENDNODE - NODE PCI5 location - PROP SlotType string r 0 "pci" - PROP Label string r 0 "PCI5" - ENDNODE - Node SCSIBP location - Prop Label string r 0 "SCSIBP" - ENDNODE - -/* - * nodes for extra hardware present in 19" version on Chalupa - */ - REFNODE PDB location WITH /platform?PlatformName=SUNW,Netra-440 - REFNODE ALARM location WITH /platform?PlatformName=SUNW,Netra-440 - REFNODE PS0 location WITH /platform?PlatformName=SUNW,Sun-Fire-V440 - REFNODE PS1 location WITH /platform?PlatformName=SUNW,Sun-Fire-V440 - REFNODE PSU0 location WITH /platform?PlatformName=SUNW,Netra-440 - REFNODE PSU1 location WITH /platform?PlatformName=SUNW,Netra-440 - REFNODE PSU2 location WITH /platform?PlatformName=SUNW,Netra-440 - REFNODE PSU3 location WITH /platform?PlatformName=SUNW,Netra-440 - REFNODE FT2 location WITH /platform?PlatformName=SUNW,Netra-440 - REFNODE FT3 location WITH /platform?PlatformName=SUNW,Netra-440 - ENDNODE -ENDNODE - -/* - * add power-supply nodes if their fru-proms are visible - */ -name:/frutree/chassis/SC - REFNODE system-controller fru with name:/platform/pci@1e,600000/isa@7/i2c@0,320/rmc-fru-prom@0,a6 - -name:/frutree/chassis/PS0 - REFNODE power-supply fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,b0 -name:/frutree/chassis/PS1 - REFNODE power-supply fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,a4 -name:/frutree/chassis/PSU0 - REFNODE power-supply fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,c0 -name:/frutree/chassis/PSU1 - REFNODE power-supply fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,c2 -name:/frutree/chassis/PSU2 - REFNODE power-supply fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,70 -name:/frutree/chassis/PSU3 - REFNODE power-supply fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,72 - -/* - * RMC Board Seeprom Source - */ -name:/frutree/chassis/SC/system-controller - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/rmc-fru-prom@0,a6 - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/rmc-fru-prom@0,a6 - REFPROP _fru_parent /frutree/chassis/SC/system-controller - PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/rmc-fru-prom@0,a6:rmc-fru-prom" -/* - * SCSI Board Seeprom Source - */ -name:/frutree/chassis/SCSIBP -REFNODE system-board fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/scsi-fru-prom@0,a8 -name:/frutree/chassis/SCSIBP/system-board - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/scsi-fru-prom@0,a8 - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/scsi-fru-prom@0,a8 -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/scsi-fru-prom@0,a8:scsi-fru-prom" - -name:/frutree/chassis/ALARM - PROP Label string r 0 "ALARM" - REFNODE alarm fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/alarm-fru-prom@0,ac - -name:/frutree/chassis/ALARM/alarm - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/alarm-fru-prom@0,ac - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/alarm-fru-prom@0,ac - REFPROP _fru_parent /frutree/chassis/ALARM/alarm - -name:/frutree/chassis/PDB - REFNODE pdb fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/pdb-fru-prom@0,7c - -name:/frutree/chassis/PDB/pdb - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/pdb-fru-prom@0,7c - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/pdb-fru-prom@0,7c - REFPROP _fru_parent /frutree/chassis/PDB/pdb - -/* - * Fan FRUs - */ -name:/frutree/chassis/FT0 - Node F0 location - PROP SlotType string r 0 "fan-unit" - Prop Label string r 0 "F0" - NODE fan fru - ENDNODE - ENDNODE -name:/frutree/chassis/FT1 - Node F0 location - PROP SlotType string r 0 "fan-unit" - Prop Label string r 0 "F0" - NODE fan fru - ENDNODE - ENDNODE - Node F1 location - PROP SlotType string r 0 "fan-unit" - Prop Label string r 0 "F1" - NODE fan fru - ENDNODE - ENDNODE -name:/frutree/chassis/FT2 - PROP SlotType string r 0 "fan-tray" - PROP Label string r 0 "FT2" - Node F0 location - PROP SlotType string r 0 "fan-unit" - Prop Label string r 0 "F0" - NODE fan fru - ENDNODE - ENDNODE -name:/frutree/chassis/FT3 - PROP SlotType string r 0 "fan-tray" - PROP Label string r 0 "FT3" - Node F0 location - PROP SlotType string r 0 "fan-unit" - Prop Label string r 0 "F0" - NODE fan fru - ENDNODE - ENDNODE - -/* Power distribution board */ -name:/frutree/chassis/PDB - PROP SlotType string r 0 "pdb" - PROP Label string r 0 "PDB" - -/* extra power supply */ -name:/frutree/chassis/PS0 - PROP SlotType string r 0 "power-supply" - PROP Label string r 0 "PS0" -name:/frutree/chassis/PS1 - PROP SlotType string r 0 "power-supply" - PROP Label string r 0 "PS1" - -name:/frutree/chassis/PSU0 - PROP SlotType string r 0 "power-supply" - PROP Label string r 0 "PSU0" - -name:/frutree/chassis/PSU1 - PROP SlotType string r 0 "power-supply" - PROP Label string r 0 "PSU1" - -name:/frutree/chassis/PSU2 - PROP SlotType string r 0 "power-supply" - PROP Label string r 0 "PSU2" - -name:/frutree/chassis/PSU3 - PROP SlotType string r 0 "power-supply" - PROP Label string r 0 "PSU3" - -/* add cdrom fru nodes for disks which are present */ -name:/frutree/chassis/DVD - REFNODE cdrom fru WITH name:/platform/pci@1e,600000/ide@d/sd@0,0 - -/* add disk fru nodes for disks which are present */ -name:/frutree/chassis/HDD0 - REFNODE disk fru WITH name:/platform/pci@1f,700000/scsi@2/sd@0,0 -name:/frutree/chassis/HDD1 - REFNODE disk fru WITH name:/platform/pci@1f,700000/scsi@2/sd@1,0 -name:/frutree/chassis/HDD2 - REFNODE disk fru WITH name:/platform/pci@1f,700000/scsi@2/sd@2,0 -name:/frutree/chassis/HDD3 - REFNODE disk fru WITH name:/platform/pci@1f,700000/scsi@2/sd@3,0 - -name:/frutree/chassis/PCI0 - REFNODE pci-card fru WITH _class:/jbus/pci@1e,600000/picl?DeviceID=2 -name:/frutree/chassis/PCI1 - REFNODE pci-card fru WITH _class:/jbus/pci@1e,600000/picl?DeviceID=3 -name:/frutree/chassis/PCI2 - REFNODE pci-card fru WITH _class:/jbus/pci@1d,700000/picl?DeviceID=2 -name:/frutree/chassis/PCI3 - REFNODE pci-card fru WITH _class:/jbus/pci@1e,600000/picl?DeviceID=4 -name:/frutree/chassis/PCI4 - REFNODE pci-card fru WITH _class:/jbus/pci@1d,700000/picl?DeviceID=1 -name:/frutree/chassis/PCI5 - REFNODE pci-card fru WITH _class:/jbus/pci@1c,600000/picl?DeviceID=1 - - -#include -#include "system-board.info" -#include - -_class:/jbus/pci@1c,600000/picl@1 - REFPROP _fru_parent name:/frutree/chassis/PCI5/pci-card -_class:/jbus/pci@1c,600000/picl@1,0 - REFPROP _fru_parent name:/frutree/chassis/PCI5/pci-card -_class:/jbus/pci@1c,600000/picl@1,1 - REFPROP _fru_parent name:/frutree/chassis/PCI5/pci-card -_class:/jbus/pci@1c,600000/picl@1,2 - REFPROP _fru_parent name:/frutree/chassis/PCI5/pci-card -_class:/jbus/pci@1c,600000/picl@1,3 - REFPROP _fru_parent name:/frutree/chassis/PCI5/pci-card -_class:/jbus/pci@1c,600000/picl@1,4 - REFPROP _fru_parent name:/frutree/chassis/PCI5/pci-card -_class:/jbus/pci@1c,600000/picl@1,5 - REFPROP _fru_parent name:/frutree/chassis/PCI5/pci-card -_class:/jbus/pci@1c,600000/picl@1,6 - REFPROP _fru_parent name:/frutree/chassis/PCI5/pci-card -_class:/jbus/pci@1c,600000/picl@1,7 - REFPROP _fru_parent name:/frutree/chassis/PCI5/pci-card -_class:/jbus/pci@1d,700000/picl@2 - REFPROP _fru_parent name:/frutree/chassis/PCI2/pci-card -_class:/jbus/pci@1d,700000/picl@2,0 - REFPROP _fru_parent name:/frutree/chassis/PCI2/pci-card -_class:/jbus/pci@1d,700000/picl@2,1 - REFPROP _fru_parent name:/frutree/chassis/PCI2/pci-card -_class:/jbus/pci@1d,700000/picl@2,2 - REFPROP _fru_parent name:/frutree/chassis/PCI2/pci-card -_class:/jbus/pci@1d,700000/picl@2,3 - REFPROP _fru_parent name:/frutree/chassis/PCI2/pci-card -_class:/jbus/pci@1d,700000/picl@2,4 - REFPROP _fru_parent name:/frutree/chassis/PCI2/pci-card -_class:/jbus/pci@1d,700000/picl@2,5 - REFPROP _fru_parent name:/frutree/chassis/PCI2/pci-card -_class:/jbus/pci@1d,700000/picl@2,6 - REFPROP _fru_parent name:/frutree/chassis/PCI2/pci-card -_class:/jbus/pci@1d,700000/picl@2,7 - REFPROP _fru_parent name:/frutree/chassis/PCI2/pci-card -_class:/jbus/pci@1d,700000/picl@1 - REFPROP _fru_parent name:/frutree/chassis/PCI4/pci-card -_class:/jbus/pci@1d,700000/picl@1,0 - REFPROP _fru_parent name:/frutree/chassis/PCI4/pci-card -_class:/jbus/pci@1d,700000/picl@1,1 - REFPROP _fru_parent name:/frutree/chassis/PCI4/pci-card -_class:/jbus/pci@1d,700000/picl@1,2 - REFPROP _fru_parent name:/frutree/chassis/PCI4/pci-card -_class:/jbus/pci@1d,700000/picl@1,3 - REFPROP _fru_parent name:/frutree/chassis/PCI4/pci-card -_class:/jbus/pci@1d,700000/picl@1,4 - REFPROP _fru_parent name:/frutree/chassis/PCI4/pci-card -_class:/jbus/pci@1d,700000/picl@1,5 - REFPROP _fru_parent name:/frutree/chassis/PCI4/pci-card -_class:/jbus/pci@1d,700000/picl@1,6 - REFPROP _fru_parent name:/frutree/chassis/PCI4/pci-card -_class:/jbus/pci@1d,700000/picl@1,7 - REFPROP _fru_parent name:/frutree/chassis/PCI4/pci-card -_class:/jbus/pci@1e,600000/picl@2 - REFPROP _fru_parent name:/frutree/chassis/PCI0/pci-card -_class:/jbus/pci@1e,600000/picl@2,0 - REFPROP _fru_parent name:/frutree/chassis/PCI0/pci-card -_class:/jbus/pci@1e,600000/picl@2,1 - REFPROP _fru_parent name:/frutree/chassis/PCI0/pci-card -_class:/jbus/pci@1e,600000/picl@2,2 - REFPROP _fru_parent name:/frutree/chassis/PCI0/pci-card -_class:/jbus/pci@1e,600000/picl@2,3 - REFPROP _fru_parent name:/frutree/chassis/PCI0/pci-card -_class:/jbus/pci@1e,600000/picl@2,4 - REFPROP _fru_parent name:/frutree/chassis/PCI0/pci-card -_class:/jbus/pci@1e,600000/picl@2,5 - REFPROP _fru_parent name:/frutree/chassis/PCI0/pci-card -_class:/jbus/pci@1e,600000/picl@2,6 - REFPROP _fru_parent name:/frutree/chassis/PCI0/pci-card -_class:/jbus/pci@1e,600000/picl@2,7 - REFPROP _fru_parent name:/frutree/chassis/PCI0/pci-card -_class:/jbus/pci@1e,600000/picl@3 - REFPROP _fru_parent name:/frutree/chassis/PCI1/pci-card -_class:/jbus/pci@1e,600000/picl@3,0 - REFPROP _fru_parent name:/frutree/chassis/PCI1/pci-card -_class:/jbus/pci@1e,600000/picl@3,1 - REFPROP _fru_parent name:/frutree/chassis/PCI1/pci-card -_class:/jbus/pci@1e,600000/picl@3,2 - REFPROP _fru_parent name:/frutree/chassis/PCI1/pci-card -_class:/jbus/pci@1e,600000/picl@3,3 - REFPROP _fru_parent name:/frutree/chassis/PCI1/pci-card -_class:/jbus/pci@1e,600000/picl@3,4 - REFPROP _fru_parent name:/frutree/chassis/PCI1/pci-card -_class:/jbus/pci@1e,600000/picl@3,5 - REFPROP _fru_parent name:/frutree/chassis/PCI1/pci-card -_class:/jbus/pci@1e,600000/picl@3,6 - REFPROP _fru_parent name:/frutree/chassis/PCI1/pci-card -_class:/jbus/pci@1e,600000/picl@3,7 - REFPROP _fru_parent name:/frutree/chassis/PCI1/pci-card -_class:/jbus/pci@1e,600000/picl@4 - REFPROP _fru_parent name:/frutree/chassis/PCI3/pci-card -_class:/jbus/pci@1e,600000/picl@4,0 - REFPROP _fru_parent name:/frutree/chassis/PCI3/pci-card -_class:/jbus/pci@1e,600000/picl@4,1 - REFPROP _fru_parent name:/frutree/chassis/PCI3/pci-card -_class:/jbus/pci@1e,600000/picl@4,2 - REFPROP _fru_parent name:/frutree/chassis/PCI3/pci-card -_class:/jbus/pci@1e,600000/picl@4,3 - REFPROP _fru_parent name:/frutree/chassis/PCI3/pci-card -_class:/jbus/pci@1e,600000/picl@4,4 - REFPROP _fru_parent name:/frutree/chassis/PCI3/pci-card -_class:/jbus/pci@1e,600000/picl@4,5 - REFPROP _fru_parent name:/frutree/chassis/PCI3/pci-card -_class:/jbus/pci@1e,600000/picl@4,6 - REFPROP _fru_parent name:/frutree/chassis/PCI3/pci-card -_class:/jbus/pci@1e,600000/picl@4,7 - REFPROP _fru_parent name:/frutree/chassis/PCI3/pci-card diff --git a/usr/src/cmd/picl/plugins/sun4u/chalupa/frutree/system-board.info b/usr/src/cmd/picl/plugins/sun4u/chalupa/frutree/system-board.info deleted file mode 100644 index 79c8211383..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chalupa/frutree/system-board.info +++ /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, 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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This file creates the system board structure - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -/* - * Motherboard properties - */ -name:/frutree/chassis/MB - NODE system-board fru - NODE BAT location - PROP Label string r 0 "BAT" - NODE battery fru - ENDNODE - ENDNODE - ENDNODE - -/* - * motherboard seeprom source - */ -name:/frutree/chassis/MB/system-board - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/motherboard-fru-prom@0,a2 - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/motherboard-fru-prom@0,a2 - REFPROP _fru_parent /frutree/chassis/MB/system-board - -/* - * Processor Boards - */ -name:/frutree/chassis/ -Node C0 location - PROP SlotType string r 0 "system-board" - Prop Label string r 0 "C0" -ENDNODE -Node C1 location - PROP SlotType string r 0 "system-board" - Prop Label string r 0 "C1" -ENDNODE -Node C2 location - PROP SlotType string r 0 "system-board" - Prop Label string r 0 "C2" -ENDNODE -Node C3 location - PROP SlotType string r 0 "system-board" - Prop Label string r 0 "C3" -ENDNODE - -/* - * Proccessor Board 0 - */ -name:/frutree/chassis/C0 - REFNODE system-board fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/cpu-fru-prom?UnitAddress=0,be -name:/frutree/chassis/C0/system-board - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/cpu-fru-prom?UnitAddress=0,be - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/cpu-fru-prom?UnitAddress=0,be - REFPROP _fru_parent /frutree/chassis/C0/system-board - -/* - * Proccessor Board 1 - */ -name:/frutree/chassis/C1 - REFNODE system-board fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/cpu-fru-prom?UnitAddress=0,ce -name:/frutree/chassis/C1/system-board - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/cpu-fru-prom?UnitAddress=0,ce - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/cpu-fru-prom?UnitAddress=0,ce - REFPROP _fru_parent /frutree/chassis/C1/system-board - -/* - * Proccessor Board 2 - */ -name:/frutree/chassis/C2 - REFNODE system-board fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/cpu-fru-prom?UnitAddress=0,de -name:/frutree/chassis/C2/system-board - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/cpu-fru-prom?UnitAddress=0,de - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/cpu-fru-prom?UnitAddress=0,de - REFPROP _fru_parent /frutree/chassis/C2/system-board - -/* - * Proccessor Board 3 - */ -name:/frutree/chassis/C3 - REFNODE system-board fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/cpu-fru-prom?UnitAddress=0,ee -name:/frutree/chassis/C3/system-board - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/cpu-fru-prom?UnitAddress=0,ee - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/cpu-fru-prom?UnitAddress=0,ee - REFPROP _fru_parent /frutree/chassis/C3/system-board - -/* - * Processors - */ -name:/frutree/chassis/C0/system-board - REFNODE P0 location WITH name:/frutree/chassis/C0/system-board -name:/frutree/chassis/C0/system-board/P0 - PROP SlotType string r 0 "cpu" - PROP Label string r 0 "P0" -name:/frutree/chassis/C1/system-board - REFNODE P0 location WITH name:/frutree/chassis/C1/system-board -name:/frutree/chassis/C1/system-board/P0 - PROP SlotType string r 0 "cpu" - PROP Label string r 0 "P0" -name:/frutree/chassis/C2/system-board - REFNODE P0 location WITH name:/frutree/chassis/C2/system-board -name:/frutree/chassis/C2/system-board/P0 - PROP SlotType string r 0 "cpu" - PROP Label string r 0 "P0" -name:/frutree/chassis/C3/system-board - REFNODE P0 location WITH name:/frutree/chassis/C3/system-board -name:/frutree/chassis/C3/system-board/P0 - PROP SlotType string r 0 "cpu" - PROP Label string r 0 "P0" - - -/************************************ - * CPU Board 0 Processor 0 - ************************************/ -name:/frutree/chassis/C0/system-board/P0 - REFNODE cpu fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/temperature?UnitAddress=0,30 - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/temperature?UnitAddress=0,30 - REFPROP _fru_parent /frutree/chassis/C0/system-board/P0/cpu - -name:/frutree/chassis/C0/system-board/P0/cpu - REFNODE B0 location WITH name:/frutree/chassis/C0/system-board/P0/cpu -name:/frutree/chassis/C0/system-board/P0/cpu/B0 - PROP Label string r 0 "B0" - REFNODE bank fru WITH name:/frutree/chassis/C0/system-board/P0/cpu -name:/frutree/chassis/C0/system-board/P0/cpu/B0/bank - REFNODE D0 location WITH name:/frutree/chassis/C0/system-board/P0/cpu - REFNODE D1 location WITH name:/frutree/chassis/C0/system-board/P0/cpu -name:/frutree/chassis/C0/system-board/P0/cpu - REFNODE B1 location WITH name:/frutree/chassis/C0/system-board/P0/cpu -name:/frutree/chassis/C0/system-board/P0/cpu/B1 - PROP Label string r 0 "B1" - REFNODE bank fru WITH name:/frutree/chassis/C0/system-board/P0/cpu -name:/frutree/chassis/C0/system-board/P0/cpu/B1/bank - REFNODE D0 location WITH name:/frutree/chassis/C0/system-board/P0/cpu - REFNODE D1 location WITH name:/frutree/chassis/C0/system-board/P0/cpu - -/************************************ - * CPU Board 1 Processor 0 - ************************************/ -name:/frutree/chassis/C1/system-board/P0 - REFNODE cpu fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/temperature?UnitAddress=0,64 - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/temperature?UnitAddress=0,64 - REFPROP _fru_parent /frutree/chassis/C1/system-board/P0/cpu - -name:/frutree/chassis/C1/system-board/P0/cpu - REFNODE B0 location WITH name:/frutree/chassis/C1/system-board/P0/cpu -name:/frutree/chassis/C1/system-board/P0/cpu/B0 - PROP Label string r 0 "B0" - REFNODE bank fru WITH name:/frutree/chassis/C1/system-board/P0/cpu -name:/frutree/chassis/C1/system-board/P0/cpu/B0/bank - REFNODE D0 location WITH name:/frutree/chassis/C1/system-board/P0/cpu - REFNODE D1 location WITH name:/frutree/chassis/C1/system-board/P0/cpu -name:/frutree/chassis/C1/system-board/P0/cpu - REFNODE B1 location WITH name:/frutree/chassis/C1/system-board/P0/cpu -name:/frutree/chassis/C1/system-board/P0/cpu/B1 - PROP Label string r 0 "B1" - REFNODE bank fru WITH name:/frutree/chassis/C1/system-board/P0/cpu -name:/frutree/chassis/C1/system-board/P0/cpu/B1/bank - REFNODE D0 location WITH name:/frutree/chassis/C1/system-board/P0/cpu - REFNODE D1 location WITH name:/frutree/chassis/C1/system-board/P0/cpu - -/************************************ - * CPU Board 2 Processor 0 - ************************************/ -name:/frutree/chassis/C2/system-board/P0 - REFNODE cpu fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/temperature?UnitAddress=0,80 - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/temperature?UnitAddress=0,80 - REFPROP _fru_parent /frutree/chassis/C2/system-board/P0/cpu - -name:/frutree/chassis/C2/system-board/P0/cpu - REFNODE B0 location WITH name:/frutree/chassis/C2/system-board/P0/cpu -name:/frutree/chassis/C2/system-board/P0/cpu/B0 - PROP Label string r 0 "B0" - REFNODE bank fru WITH name:/frutree/chassis/C2/system-board/P0/cpu -name:/frutree/chassis/C2/system-board/P0/cpu/B0/bank - REFNODE D0 location WITH name:/frutree/chassis/C2/system-board/P0/cpu - REFNODE D1 location WITH name:/frutree/chassis/C2/system-board/P0/cpu -name:/frutree/chassis/C2/system-board/P0/cpu - REFNODE B1 location WITH name:/frutree/chassis/C2/system-board/P0/cpu -name:/frutree/chassis/C2/system-board/P0/cpu/B1 - PROP Label string r 0 "B1" - REFNODE bank fru WITH name:/frutree/chassis/C2/system-board/P0/cpu -name:/frutree/chassis/C2/system-board/P0/cpu/B1/bank - REFNODE D0 location WITH name:/frutree/chassis/C2/system-board/P0/cpu - REFNODE D1 location WITH name:/frutree/chassis/C2/system-board/P0/cpu - -/************************************ - * CPU Board 3 Processor 0 - ************************************/ -name:/frutree/chassis/C3/system-board/P0 - REFNODE cpu fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/temperature?UnitAddress=0,90 - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/temperature?UnitAddress=0,90 - REFPROP _fru_parent /frutree/chassis/C3/system-board/P0/cpu - -name:/frutree/chassis/C3/system-board/P0/cpu - REFNODE B0 location WITH name:/frutree/chassis/C3/system-board/P0/cpu -name:/frutree/chassis/C3/system-board/P0/cpu/B0 - PROP Label string r 0 "B0" - REFNODE bank fru WITH name:/frutree/chassis/C3/system-board/P0/cpu -name:/frutree/chassis/C3/system-board/P0/cpu/B0/bank - REFNODE D0 location WITH name:/frutree/chassis/C3/system-board/P0/cpu - REFNODE D1 location WITH name:/frutree/chassis/C3/system-board/P0/cpu -name:/frutree/chassis/C3/system-board/P0/cpu - REFNODE B1 location WITH name:/frutree/chassis/C3/system-board/P0/cpu -name:/frutree/chassis/C3/system-board/P0/cpu/B1 - PROP Label string r 0 "B1" - REFNODE bank fru WITH name:/frutree/chassis/C3/system-board/P0/cpu -name:/frutree/chassis/C3/system-board/P0/cpu/B1/bank - REFNODE D0 location WITH name:/frutree/chassis/C3/system-board/P0/cpu - REFNODE D1 location WITH name:/frutree/chassis/C3/system-board/P0/cpu - -/************************************ - * CPU Board 0 Processor 0 memory - ************************************/ -name:/frutree/chassis/C0/system-board/P0/cpu/B0/bank/D0 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D0" -name:/frutree/chassis/C0/system-board/P0/cpu/B0/bank/D1 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D1" -name:/frutree/chassis/C0/system-board/P0/cpu/B1/bank/D0 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D0" -name:/frutree/chassis/C0/system-board/P0/cpu/B1/bank/D1 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D1" - -/************************************ - * CPU Board 1 Processor 0 memory - ************************************/ -name:/frutree/chassis/C1/system-board/P0/cpu/B0/bank/D0 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D0" -name:/frutree/chassis/C1/system-board/P0/cpu/B0/bank/D1 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D1" -name:/frutree/chassis/C1/system-board/P0/cpu/B1/bank/D0 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D0" -name:/frutree/chassis/C1/system-board/P0/cpu/B1/bank/D1 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D1" - -/************************************ - * CPU Board 2 Processor 0 memory - ************************************/ -name:/frutree/chassis/C2/system-board/P0/cpu/B0/bank/D0 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D0" -name:/frutree/chassis/C2/system-board/P0/cpu/B0/bank/D1 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D1" -name:/frutree/chassis/C2/system-board/P0/cpu/B1/bank/D0 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D0" -name:/frutree/chassis/C2/system-board/P0/cpu/B1/bank/D1 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D1" - -/************************************ - * CPU Board 3 Processor 0 memory - ************************************/ -name:/frutree/chassis/C3/system-board/P0/cpu/B0/bank/D0 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D0" -name:/frutree/chassis/C3/system-board/P0/cpu/B0/bank/D1 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D1" -name:/frutree/chassis/C3/system-board/P0/cpu/B1/bank/D0 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D0" -name:/frutree/chassis/C3/system-board/P0/cpu/B1/bank/D1 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D1" - -/************************************ - * Dimm nodes - ************************************/ -/* - * Board 0 CPU 0 - */ -name:/frutree/chassis/C0/system-board/P0/cpu/B0/bank/D0 - REFNODE mem-module fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,b6 -name:/frutree/chassis/C0/system-board/P0/cpu/B0/bank/D1 - REFNODE mem-module fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,b8 -name:/frutree/chassis/C0/system-board/P0/cpu/B1/bank/D0 - REFNODE mem-module fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,ba -name:/frutree/chassis/C0/system-board/P0/cpu/B1/bank/D1 - REFNODE mem-module fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,bc -/* - * Board 1 CPU 0 - */ -name:/frutree/chassis/C1/system-board/P0/cpu/B0/bank/D0 - REFNODE mem-module fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,c6 -name:/frutree/chassis/C1/system-board/P0/cpu/B0/bank/D1 - REFNODE mem-module fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,c8 -name:/frutree/chassis/C1/system-board/P0/cpu/B1/bank/D0 - REFNODE mem-module fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,ca -name:/frutree/chassis/C1/system-board/P0/cpu/B1/bank/D1 - REFNODE mem-module fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,cc -/* - * Board 2 CPU 0 - */ -name:/frutree/chassis/C2/system-board/P0/cpu/B0/bank/D0 - REFNODE mem-module fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,d6 -name:/frutree/chassis/C2/system-board/P0/cpu/B0/bank/D1 - REFNODE mem-module fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,d8 -name:/frutree/chassis/C2/system-board/P0/cpu/B1/bank/D0 - REFNODE mem-module fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,da -name:/frutree/chassis/C2/system-board/P0/cpu/B1/bank/D1 - REFNODE mem-module fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,dc -/* - * Board 3 CPU 0 - */ -name:/frutree/chassis/C3/system-board/P0/cpu/B0/bank/D0 - REFNODE mem-module fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,e6 -name:/frutree/chassis/C3/system-board/P0/cpu/B0/bank/D1 - REFNODE mem-module fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,e8 -name:/frutree/chassis/C3/system-board/P0/cpu/B1/bank/D0 - REFNODE mem-module fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,ea -name:/frutree/chassis/C3/system-board/P0/cpu/B1/bank/D1 - REFNODE mem-module fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,ec - -/************************************ - * DIMM seeprom sources - ************************************/ -/* - * Board 0 CPU 0 - */ -name:/frutree/chassis/C0/system-board/P0/cpu/B0/bank/D0/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,b6 -name:/frutree/chassis/C0/system-board/P0/cpu/B0/bank/D1/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,b8 -name:/frutree/chassis/C0/system-board/P0/cpu/B1/bank/D0/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,ba -name:/frutree/chassis/C0/system-board/P0/cpu/B1/bank/D1/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,bc -/* - * Board 1 CPU 0 - */ -name:/frutree/chassis/C1/system-board/P0/cpu/B0/bank/D0/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,c6 -name:/frutree/chassis/C1/system-board/P0/cpu/B0/bank/D1/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,c8 -name:/frutree/chassis/C1/system-board/P0/cpu/B1/bank/D0/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,ca -name:/frutree/chassis/C1/system-board/P0/cpu/B1/bank/D1/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,cc -/* - * Board 2 CPU 0 - */ -name:/frutree/chassis/C2/system-board/P0/cpu/B0/bank/D0/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,d6 -name:/frutree/chassis/C2/system-board/P0/cpu/B0/bank/D1/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,d8 -name:/frutree/chassis/C2/system-board/P0/cpu/B1/bank/D0/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,da -name:/frutree/chassis/C2/system-board/P0/cpu/B1/bank/D1/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,dc -/* - * Board 3 CPU 0 - */ -name:/frutree/chassis/C3/system-board/P0/cpu/B0/bank/D0/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,e6 -name:/frutree/chassis/C3/system-board/P0/cpu/B0/bank/D1/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,e8 -name:/frutree/chassis/C3/system-board/P0/cpu/B1/bank/D0/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,ea -name:/frutree/chassis/C3/system-board/P0/cpu/B1/bank/D1/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,ec - -/************************************ - * DIMM FRU parents - ***********************************/ -/* - * Board 0 CPU 0 - */ -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,b6 - REFPROP _fru_parent name:/frutree/chassis/C0/system-board/P0/cpu/B0/bank/D0/mem-module -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,b8 - REFPROP _fru_parent name:/frutree/chassis/C0/system-board/P0/cpu/B0/bank/D1/mem-module -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,ba - REFPROP _fru_parent name:/frutree/chassis/C0/system-board/P0/cpu/B1/bank/D0/mem-module -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,bc - REFPROP _fru_parent name:/frutree/chassis/C0/system-board/P0/cpu/B1/bank/D1/mem-module -/* - * Board 1 CPU 0 - */ -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,c6 - REFPROP _fru_parent name:/frutree/chassis/C1/system-board/P0/cpu/B0/bank/D0/mem-module -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,c8 - REFPROP _fru_parent name:/frutree/chassis/C1/system-board/P0/cpu/B0/bank/D1/mem-module -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,ca - REFPROP _fru_parent name:/frutree/chassis/C1/system-board/P0/cpu/B1/bank/D0/mem-module -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,cc - REFPROP _fru_parent name:/frutree/chassis/C1/system-board/P0/cpu/B1/bank/D1/mem-module -/* - * Board 2 CPU 0 - */ -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,d6 - REFPROP _fru_parent name:/frutree/chassis/C2/system-board/P0/cpu/B0/bank/D0/mem-module -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,d8 - REFPROP _fru_parent name:/frutree/chassis/C2/system-board/P0/cpu/B0/bank/D1/mem-module -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,da - REFPROP _fru_parent name:/frutree/chassis/C2/system-board/P0/cpu/B1/bank/D0/mem-module -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,dc - REFPROP _fru_parent name:/frutree/chassis/C2/system-board/P0/cpu/B1/bank/D1/mem-module -/* - * Board 3 CPU 0 - */ -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,e6 - REFPROP _fru_parent name:/frutree/chassis/C3/system-board/P0/cpu/B0/bank/D0/mem-module -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,e8 - REFPROP _fru_parent name:/frutree/chassis/C3/system-board/P0/cpu/B0/bank/D1/mem-module -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,ea - REFPROP _fru_parent name:/frutree/chassis/C3/system-board/P0/cpu/B1/bank/D0/mem-module -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,ec - REFPROP _fru_parent name:/frutree/chassis/C3/system-board/P0/cpu/B1/bank/D1/mem-module - -/************************************ - * DIMM parents - ***********************************/ -/* - * Board 0 CPU 0 - */ -name:/platform/memory-controller@0,0/memory-module-group?ID=0/memory-module?ID=0 - REFPROP _fru_parent name:/frutree/chassis/C0/system-board/P0/cpu/B0/bank/D0/mem-module -name:/platform/memory-controller@0,0/memory-module-group?ID=0/memory-module?ID=1 - REFPROP _fru_parent name:/frutree/chassis/C0/system-board/P0/cpu/B0/bank/D1/mem-module -name:/platform/memory-controller@0,0/memory-module-group?ID=1/memory-module?ID=0 - REFPROP _fru_parent name:/frutree/chassis/C0/system-board/P0/cpu/B1/bank/D0/mem-module -name:/platform/memory-controller@0,0/memory-module-group?ID=1/memory-module?ID=1 - REFPROP _fru_parent name:/frutree/chassis/C0/system-board/P0/cpu/B1/bank/D1/mem-module -/* - * Board 1 CPU 0 - */ -name:/platform/memory-controller@1,0/memory-module-group?ID=0/memory-module?ID=0 - REFPROP _fru_parent name:/frutree/chassis/C1/system-board/P0/cpu/B0/bank/D0/mem-module -name:/platform/memory-controller@1,0/memory-module-group?ID=0/memory-module?ID=1 - REFPROP _fru_parent name:/frutree/chassis/C1/system-board/P0/cpu/B0/bank/D1/mem-module -name:/platform/memory-controller@1,0/memory-module-group?ID=1/memory-module?ID=0 - REFPROP _fru_parent name:/frutree/chassis/C1/system-board/P0/cpu/B1/bank/D0/mem-module -name:/platform/memory-controller@1,0/memory-module-group?ID=1/memory-module?ID=1 - REFPROP _fru_parent name:/frutree/chassis/C1/system-board/P0/cpu/B1/bank/D1/mem-module -/* - * Board 2 CPU 0 - */ -name:/platform/memory-controller@2,0/memory-module-group?ID=0/memory-module?ID=0 - REFPROP _fru_parent name:/frutree/chassis/C2/system-board/P0/cpu/B0/bank/D0/mem-module -name:/platform/memory-controller@2,0/memory-module-group?ID=0/memory-module?ID=1 - REFPROP _fru_parent name:/frutree/chassis/C2/system-board/P0/cpu/B0/bank/D1/mem-module -name:/platform/memory-controller@2,0/memory-module-group?ID=1/memory-module?ID=0 - REFPROP _fru_parent name:/frutree/chassis/C2/system-board/P0/cpu/B1/bank/D0/mem-module -name:/platform/memory-controller@2,0/memory-module-group?ID=1/memory-module?ID=1 - REFPROP _fru_parent name:/frutree/chassis/C2/system-board/P0/cpu/B1/bank/D1/mem-module -/* - * Board 3 CPU 0 - */ -name:/platform/memory-controller@3,0/memory-module-group?ID=0/memory-module?ID=0 - REFPROP _fru_parent name:/frutree/chassis/C3/system-board/P0/cpu/B0/bank/D0/mem-module -name:/platform/memory-controller@3,0/memory-module-group?ID=0/memory-module?ID=1 - REFPROP _fru_parent name:/frutree/chassis/C3/system-board/P0/cpu/B0/bank/D1/mem-module -name:/platform/memory-controller@3,0/memory-module-group?ID=1/memory-module?ID=0 - REFPROP _fru_parent name:/frutree/chassis/C3/system-board/P0/cpu/B1/bank/D0/mem-module -name:/platform/memory-controller@3,0/memory-module-group?ID=1/memory-module?ID=1 - REFPROP _fru_parent name:/frutree/chassis/C3/system-board/P0/cpu/B1/bank/D1/mem-module - -/* - * create reference properties for motherboard pci devices - */ -_class:/jbus/pci@1c,600000/picl@2 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -_class:/jbus/pci@1e,600000/picl@a - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -_class:/jbus/pci@1e,600000/picl@b - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -_class:/jbus/pci@1e,600000/picl@d - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -_class:/jbus/pci@1e,600000/picl@7/serial@0,3f8 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -_class:/jbus/pci@1e,600000/picl@7/serial@0,2e8 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -_class:/jbus/pci@1e,600000/picl@7/serial@0,3e8 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -_class:/jbus/pci@1f,700000/picl@1 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -_class:/jbus/pci@1f,700000/picl@2 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -_class:/jbus/pci@1f,700000/picl@2,1 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board diff --git a/usr/src/cmd/picl/plugins/sun4u/cherrystone/Makefile b/usr/src/cmd/picl/plugins/sun4u/cherrystone/Makefile deleted file mode 100644 index 4eb6819009..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/cherrystone/Makefile +++ /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, 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 -# -# -#ident "%Z%%M% %I% %E% SMI" -# -# Copyright (c) 2001 by Sun Microsystems, Inc. -# All rights reserved. -# -# cmd/picl/plugins/sun4u/cherrystone/Makefile -# - -SUBDIRS= psvcplugin psvcpolicy conf devtree frutree frudata .WAIT - -MSGSUBDIRS= psvcplugin psvcpolicy frutree - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -.KEEP_STATE: - -all install clean clobber: $(SUBDIRS) - -_msg: $(MSGSUBDIRS) - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/cherrystone/conf/Makefile b/usr/src/cmd/picl/plugins/sun4u/cherrystone/conf/Makefile deleted file mode 100644 index d6ad032cbb..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/cherrystone/conf/Makefile +++ /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, 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 -# -# -#ident "%Z%%M% %I% %E% SMI" -# -# Copyright (c) 2001 by Sun Microsystems, Inc. -# All rights reserved. -# -# cmd/picl/plugins/sun4u/cherrystone/conf/Makefile -# - -OBJECTS= - -# include library definitions -include $(SRC)/lib/Makefile.lib -include $(SRC)/Makefile.psm - -include $(SRC)/cmd/picl/plugins/Makefile.com - -UTSBASE= $(SRC)/uts - -PLATFORM=SUNW,Sun-Fire-480R -install := FILEMODE = 0444 - -CONF= platsvcd.conf psvcobj.conf -ROOTCONF= $(CONF:%=$(USR_PSM_LIB_DIR)/%) - -SRCS= - -LIBS = $(DYNLIB) - -ZDEFS = - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: - -install: $(ROOTCONF) - -$(USR_PSM_LIB_DIR): - @cd $(UTSBASE)/sun4u/cherrystone; pwd; $(MAKE) $(USR_PSM_LIB_DIR) - -# include library targets -include $(SRC)/cmd/picl/plugins/Makefile.targ -include $(SRC)/lib/Makefile.targ - -$(USR_PSM_LIB_DIR)/%: % $(USR_PSM_LIB_DIR) - $(INS.file) - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/cherrystone/conf/platsvcd.conf b/usr/src/cmd/picl/plugins/sun4u/cherrystone/conf/platsvcd.conf deleted file mode 100644 index 7f98c830ac..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/cherrystone/conf/platsvcd.conf +++ /dev/null @@ -1,157 +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 (c) 2001 by Sun Microsystems, Inc. - * All rights reserved. - * - * #pragma ident "%Z%%M% %I% %E% SMI" - */ - -/* - * Cherrystone platsvcd.conf - */ - -/* - * Format: - * - * TIMEOUT - * Specifies a maximum interval in seconds that an application - * is allowed to lock out the platform services daemon - * - * INTERVAL <#tasks at this interval> - * INTERVAL_END - * Indicates the poll interval at which a list of tasks will be run - * - * TASK - * - * Object string ID of first object - * Object string ID of second object - * Object string ID of nth object - * TASK_END - * Specifies the "task" or policy routine, the shared object file it - * resides in, and the object IDs of objects it must be called for - */ - -TIMEOUT 180 - -INTERVAL 0 6 -TASK /usr/platform/sun4u/lib/libpsvcpolicy.so.1 psvc_init_led_policy_0 -7 -CPU_FAN_FLT_LED -IO_FAN_FLT_LED -FSP_GEN_FAULT_LED -DISK0_FLT_LED -DISK1_FLT_LED -DISK0_REMOVE_LED -DISK1_REMOVE_LED -TASK_END -TASK /usr/platform/SUNW,Sun-Fire-480R/lib/libpsvcpolicy_psr.so.1 psvc_init_disk_bp_policy_0 -1 -DISK_PORT -TASK_END -TASK /usr/platform/sun4u/lib/libpsvcpolicy.so.1 psvc_init_state_policy_0 -18 -CPU0_DIE_TEMPERATURE_SENSOR -CPU1_DIE_TEMPERATURE_SENSOR -CPU2_DIE_TEMPERATURE_SENSOR -CPU3_DIE_TEMPERATURE_SENSOR -DBP0_AMB_TEMPERATURE_SENSOR -CPU0_FAN -CPU1_FAN -CPU2_FAN -IO0_FAN -IO1_FAN -FAN_TRAY_0 -FAN_TRAY_1 -DISK0 -DISK1 -PS0 -PS1 -PS0_LOGICAL_STATE -PS1_LOGICAL_STATE -TASK_END -TASK /usr/platform/sun4u/lib/libpsvcpolicy.so.1 psvc_update_thresholds_0 -4 -CPU0_DIE_TEMPERATURE_SENSOR -CPU1_DIE_TEMPERATURE_SENSOR -CPU2_DIE_TEMPERATURE_SENSOR -CPU3_DIE_TEMPERATURE_SENSOR -TASK_END -TASK /usr/platform/SUNW,Sun-Fire-480R/lib/libpsvcpolicy_psr.so.1 update_disk_bp_temp_thresholds -1 -DBP0_AMB_TEMPERATURE_SENSOR -TASK_END -TASK /usr/platform/SUNW,Sun-Fire-480R/lib/libpsvcpolicy_psr.so.1 psvc_init_ps_presence -2 -PS0 -PS1 -TASK_END -INTERVAL_END - -INTERVAL 5 1 -TASK /usr/platform/SUNW,Sun-Fire-480R/lib/libpsvcpolicy_psr.so.1 psvc_fsp_device_fault_check_policy_0 -1 -FSP_GEN_FAULT_LED -TASK_END -INTERVAL_END - -INTERVAL 10 2 -TASK /usr/platform/sun4u/lib/libpsvcpolicy.so.1 psvc_check_temperature_policy_0 -5 -CPU0_DIE_TEMPERATURE_SENSOR -CPU1_DIE_TEMPERATURE_SENSOR -CPU2_DIE_TEMPERATURE_SENSOR -CPU3_DIE_TEMPERATURE_SENSOR -DBP0_AMB_TEMPERATURE_SENSOR -TASK_END -TASK /usr/platform/SUNW,Sun-Fire-480R/lib/libpsvcpolicy_psr.so.1 psvc_shutdown_policy_0 -1 -SYSTEM -TASK_END -INTERVAL_END - -INTERVAL 30 1 -TASK /usr/platform/SUNW,Sun-Fire-480R/lib/libpsvcpolicy_psr.so.1 psvc_disk_monitor_policy_0 -1 -SYSTEM -TASK_END -INTERVAL_END - -INTERVAL 15 2 -TASK /usr/platform/SUNW,Sun-Fire-480R/lib/libpsvcpolicy_psr.so.1 psvc_fan_fault_check_policy_0 -2 -FAN_TRAY_0 -FAN_TRAY_1 -TASK_END -TASK /usr/platform/SUNW,Sun-Fire-480R/lib/libpsvcpolicy_psr.so.1 psvc_ps_monitor_policy_0 -2 -PS0 -PS1 -TASK_END -INTERVAL_END - -INTERVAL 10 1 -TASK /usr/platform/sun4u/lib/libpsvcpolicy.so.1 psvc_keyswitch_position_policy_0 -1 -KEYSWITCH -TASK_END -INTERVAL_END diff --git a/usr/src/cmd/picl/plugins/sun4u/cherrystone/conf/psvcobj.conf b/usr/src/cmd/picl/plugins/sun4u/cherrystone/conf/psvcobj.conf deleted file mode 100644 index 5e476edaca..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/cherrystone/conf/psvcobj.conf +++ /dev/null @@ -1,966 +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" - */ - -/* - * Cherrystone psvcobj.conf - */ - -/* - * Format : - * - * OBJECT_INFO - * ... - * ... - * ... - * OBJECT_INFO_END - * This section specifies the static property information for each - * defined object. Each property in the property list is preceded by - * an identifying property label, such as, "_class=". The "label" - * property is the first string on each line. The features and address - * specification properties are built from those fields within these - * properties that are present on each line. - * - * ASSOCIATIONS - * ASSOCIATION - * - * ... (more association pairs) - * ASSOCIATION_END - * ... (more ASSOCIATION sections) - * ASSOCIATIONS_END - * Lists association pairs for each association type to show relationships - * between objects - * - * DEVPATHS - * - * ... (more entries) - * DEVPATHS_END - * Lists the device paths and the matching (controller, bus, addr, port) - * - * TABLES - * TABLE - * - * ... - * TABLE_END - * TABLES_END - * Lists the tables used by the framework - * - * PROJECTED_PROPERTIES - * - * PROJECTED_PROPETIES_END - * Used to specify projected properties to be cerated in PICL nodes - * - */ - -OBJECT_INFO -/SYSTEM _class=3,Subclass=0,Instance=0,PERM=1,FRU=1 -/SYSTEM/MOTHERBOARD _class=3,Subclass=0,Instance=0,PERM=1,FRU=1 -/SYSTEM/IO_BOARD _class=3,Subclass=0,Instance=0,PERM=1,FRU=1 -/SYSTEM/CENTERPLANE _class=3,Subclass=0,Instance=0,PERM=1 -/SYSTEM/SMART_CARD _class=3,Subclass=0,Instance=0,PERM=1 -/SYSTEM/SMART_CARD/NOT_YET_IMPLEMENTED _class=3,Subclass=0,Instance=0,PERM=1 -/SYSTEM/FAN_TRAY_0 _class=3,Subclass=0,Instance=0,PERM=1 -/SYSTEM/FAN_TRAY_1 _class=3,Subclass=0,Instance=0,PERM=1 -/SYSTEM/FAN_TRAY_0/CPU1_FAN _class=1,Subclass=0,Instance=0,FAN_DRIVE_PR=1,TEMP_DRIVEN=1,SPEED_CTRL_PR=1,CLOSED_LOOP_CTRL=1,FAN_DRIVE_TABLE_PR=1,PERM=1,PRIMARY=1,FRU=1,Setpoint=75,Hysteresis=3,Loopgain=200,Loopbias=1023 -/SYSTEM/FAN_TRAY_0/CPU2_FAN _class=1,Subclass=0,Instance=1,FAN_DRIVE_PR=1,TEMP_DRIVEN=1,SPEED_CTRL_PR=1,CLOSED_LOOP_CTRL=1,FAN_DRIVE_TABLE_PR=1,PERM=1,PRIMARY=1,FRU=1,Setpoint=75,Hysteresis=3,Loopgain=200,Loopbias=1023 -/SYSTEM/FAN_TRAY_1/IO0_FAN _class=1,Subclass=0,Instance=0,FAN_DRIVE_PR=1,TEMP_DRIVEN=1,SPEED_CTRL_PR=1,FAN_ON_OFF=1,CLOSED_LOOP_CTRL=1,FAN_DRIVE_TABLE_PR=1,PERM=1,PRIMARY=1,FRU=1,Setpoint=30,Hysteresis=3,Loopgain=200,Loopbias=1023 -/SYSTEM/FAN_TRAY_1/IO1_FAN _class=1,Subclass=0,Instance=1,FAN_DRIVE_PR=1,TEMP_DRIVEN=1,SPEED_CTRL_PR=1,FAN_ON_OFF=1,CLOSED_LOOP_CTRL=1,FAN_DRIVE_TABLE_PR=1,PERM=1,PRIMARY=1,FRU=1,Setpoint=30,Hysteresis=3,Loopgain=200,Loopbias=1023 -/SYSTEM/FAN_TRAY_0/CPU0_FAN _class=1,Subclass=0,Instance=0,FAN_ON_OFF=1,PERM=1,PRIMARY=1,FRU=1,Setpoint=0,Hysteresis=0,Loopgain=0,Loopbias=0 -/SYSTEM/CPU_FAN_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=2,INVERT=0,PORT=1,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/IO_FAN_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=3,INVERT=0,PORT=1,BITSHIFT=3,BYTEMASK=0x8,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/IO_BOARD/IO_TEST_LED_AMBER _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=2,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/IO_BOARD/IO_TEST_LED_RED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=1,INVERT=0,PORT=2,BITSHIFT=1,BYTEMASK=0x2,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Led-color=RED -/SYSTEM/IO_BOARD/IO_TEST_LED_GREEN _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=2,INVERT=0,PORT=2,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Led-color=GREEN -/SYSTEM/CENTERPLANE/CPU0_FAN_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=4,INVERT=0,PORT=1,BITSHIFT=4,BYTEMASK=0x10,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/CENTERPLANE/CENTERPLANE_TEST_LED_AMBER _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=2,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/CENTERPLANE/CENTERPLANE_TEST_LED_RED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=1,INVERT=0,PORT=2,BITSHIFT=1,BYTEMASK=0x2,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1,Led-color=RED -/SYSTEM/CENTERPLANE/CENTERPLANE_TEST_LED_GREEN _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=2,INVERT=0,PORT=2,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1,Led-color=GREEN -/SYSTEM/MOTHERBOARD/CPU2_FAN_TACH _class=7,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=2,BITSHIFT=6,BYTEMASK=0x0,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1,Lo-warn=2800,Lo-shut=0,Hi-warn=0,Hi-shut=0 -/SYSTEM/MOTHERBOARD/CPU1_FAN_TACH _class=7,Subclass=0,Instance=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=3,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1,Lo-warn=2800,Lo-shut=0,Hi-warn=0,Hi-shut=0 -/SYSTEM/IO_BOARD/IO1_FAN_TACH _class=7,Subclass=0,Instance=2,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=5,BYTEMASK=0x0,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Lo-warn=2800,Lo-shut=0,Hi-warn=0,Hi-shut=0 -/SYSTEM/IO_BOARD/IO0_FAN_TACH _class=7,Subclass=0,Instance=3,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=2,BITSHIFT=6,BYTEMASK=0x0,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Lo-warn=2800,Lo-shut=0,Hi-warn=0,Hi-shut=0 -/SYSTEM/CENTERPLANE/CPU0_FAN_TACH _class=7,Subclass=0,Instance=4,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=3,BITSHIFT=7,BYTEMASK=0x0,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Lo-warn=2800,Lo-shut=0,Hi-warn=0,Hi-shut=0 -/SYSTEM/MOTHERBOARD/DISK_BP0_PR_SENSOR _class=6,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=2,INVERT=0,PORT=4,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/RSC_PR_SENSOR _class=6,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=5,INVERT=0,PORT=3,BITSHIFT=5,BYTEMASK=0x20,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT _class=3,Subclass=0,Instance=0,PERM=1 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT _class=3,Subclass=0,Instance=1,PERM=1 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD _class=3,Subclass=0,Instance=0,OPTION=1,FRU=1 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD _class=3,Subclass=0,Instance=1,OPTION=1,FRU=1 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/CPU0_DIE_TEMPERATURE_SENSOR _class=0,Subclass=1,Instance=0,DIE_TEMP=1,HOTPLUG=1,RDWR=1,LO_WARN_MASK=1,LO_SHUT_MASK=1,HI_WARN_MASK=1,HI_SHUT_MASK=1,OPT_TEMP_MASK=1,HW_LO_MASK=1,HW_HI_MASK=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=4,BUSADDR=0x30,BUSNUM=0,CNTLR=1,Lo-warn=5,Lo-shut=1,Hi-warn=90,Hi-shut=100,Opt-temp=70,Hw-hi-shut=105,Hw-lo-shut=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/CPU1_DIE_TEMPERATURE_SENSOR _class=0,Subclass=1,Instance=1,DIE_TEMP=1,HOTPLUG=1,RDWR=1,LO_WARN_MASK=1,LO_SHUT_MASK=1,HI_WARN_MASK=1,HI_SHUT_MASK=1,OPT_TEMP_MASK=1,HW_LO_MASK=1,HW_HI_MASK=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=4,BUSADDR=0x32,BUSNUM=0,CNTLR=1,Lo-warn=5,Lo-shut=1,Hi-warn=90,Hi-shut=100,Opt-temp=70,Hw-hi-shut=105,Hw-lo-shut=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/CPU2_DIE_TEMPERATURE_SENSOR _class=0,Subclass=1,Instance=2,DIE_TEMP=1,HOTPLUG=1,RDWR=1,LO_WARN_MASK=1,LO_SHUT_MASK=1,HI_WARN_MASK=1,HI_SHUT_MASK=1,OPT_TEMP_MASK=1,HW_LO_MASK=1,HW_HI_MASK=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=4,BUSADDR=0x34,BUSNUM=0,CNTLR=1,Lo-warn=5,Lo-shut=1,Hi-warn=90,Hi-shut=100,Opt-temp=70,Hw-hi-shut=105,Hw-lo-shut=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/CPU3_DIE_TEMPERATURE_SENSOR _class=0,Subclass=1,Instance=3,DIE_TEMP=1,HOTPLUG=1,RDWR=1,LO_WARN_MASK=1,LO_SHUT_MASK=1,HI_WARN_MASK=1,HI_SHUT_MASK=1,OPT_TEMP_MASK=1,HW_LO_MASK=1,HW_HI_MASK=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=4,BUSADDR=0x52,BUSNUM=0,CNTLR=1,Lo-warn=5,Lo-shut=1,Hi-warn=90,Hi-shut=100,Opt-temp=70,Hw-hi-shut=105,Hw-lo-shut=0 -/SYSTEM/DISK_BP0_BOARD_SLOT _class=3,Subclass=0,Instance=0,PERM=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD _class=3,Subclass=0,Instance=0,HOTPLUG=1,FRU=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/LOOP_B_0_BOARD_SLOT _class=3,Subclass=0,Instance=0,PERM=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/LOOP_B_0_BOARD_SLOT/LOOP_B_0_BOARD _class=3,Subclass=0,Instance=0,OPTION=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/LOOP_B_0_BOARD_PR_SENSOR _class=6,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=7,INVERT=0,PORT=0,BITSHIFT=7,BYTEMASK=0x80,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DBP0_AMB_TEMPERATURE_SENSOR _class=0,Subclass=1,Instance=5,OPTION=1,RDWR=1,LO_WARN_MASK=1,LO_SHUT_MASK=1,HI_WARN_MASK=1,HI_SHUT_MASK=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=2,BUSADDR=0x9c,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=-5,Hi-warn=45,Hi-shut=50,Opt-temp=25,Hw-hi-shut=50,Hw-lo-shut=-5 -/SYSTEM/RSC_SLOT _class=3,Subclass=0,Instance=1,PERM=1 -/SYSTEM/RSC_SLOT/RSC_CARD _class=3,Subclass=0,Instance=1,HOTPLUG=1,FRU=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK0_SLOT _class=3,Subclass=0,Instance=0,OPTION=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK1_SLOT _class=3,Subclass=0,Instance=1,OPTION=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK0_SLOT/DISK0 _class=3,Subclass=0,Instance=0,HOTPLUG=1,FRU=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK1_SLOT/DISK1 _class=3,Subclass=0,Instance=1,HOTPLUG=1,FRU=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK0_PR_SENSOR _class=6,Subclass=0,Instance=0,OPTION=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=7,BUSADDR=0x44,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK1_PR_SENSOR _class=6,Subclass=0,Instance=0,OPTION=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=1,INVERT=0,PORT=0,BITSHIFT=1,BYTEMASK=0x2,REG=0,TYPE=7,BUSADDR=0x44,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK0_FAULT_SENSOR _class=8,Subclass=0,Instance=0,OPTION=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=2,INVERT=0,PORT=0,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=7,BUSADDR=0x44,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK1_FAULT_SENSOR _class=8,Subclass=0,Instance=0,OPTION=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=3,INVERT=0,PORT=0,BITSHIFT=3,BYTEMASK=0x8,REG=0,TYPE=7,BUSADDR=0x44,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK0_REMOVE_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=4,INVERT=0,PORT=0,BITSHIFT=4,BYTEMASK=0x10,REG=0,TYPE=7,BUSADDR=0x44,BUSNUM=0,CNTLR=1,Led-color=BLUE -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK1_REMOVE_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=5,INVERT=0,PORT=0,BITSHIFT=5,BYTEMASK=0x20,REG=0,TYPE=7,BUSADDR=0x44,BUSNUM=0,CNTLR=1,Led-color=BLUE -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK0_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=6,INVERT=0,PORT=0,BITSHIFT=6,BYTEMASK=0x40,REG=0,TYPE=7,BUSADDR=0x44,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK1_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=7,INVERT=0,PORT=0,BITSHIFT=7,BYTEMASK=0x80,REG=0,TYPE=7,BUSADDR=0x44,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/IO_BOARD/5V_ENABLE_SWITCH _class=8,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=7,INVERT=0,PORT=0,BITSHIFT=6,BYTEMASK=0x40,REG=0,TYPE=5,BUSADDR=0x46,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/I2C_ENABLE_SWITCH _class=8,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=6,INVERT=0,PORT=0,BITSHIFT=6,BYTEMASK=0x40,REG=0,TYPE=5,BUSADDR=0x46,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_A0_0 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa0,BUSNUM=0,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_A2_0 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa2,BUSNUM=0,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_A4_0 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa4,BUSNUM=0,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_A6_0 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa6,BUSNUM=0,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_A8_0 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa8,BUSNUM=0,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_AA_0 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xaa,BUSNUM=0,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_AC_0 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xac,BUSNUM=0,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_AE_0 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xae,BUSNUM=0,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_A0_1 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa0,BUSNUM=1,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_A2_1 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa2,BUSNUM=1,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_A4_1 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa4,BUSNUM=1,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_A6_1 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa6,BUSNUM=1,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_A8_1 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa8,BUSNUM=1,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_AA_1 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xaa,BUSNUM=1,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_AC_1 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xac,BUSNUM=1,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_AE_1 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xae,BUSNUM=1,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_A0_2 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa0,BUSNUM=2,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_A2_2 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa2,BUSNUM=2,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_A4_2 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa4,BUSNUM=2,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_A6_2 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa6,BUSNUM=2,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_A8_2 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa8,BUSNUM=2,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_AA_2 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xaa,BUSNUM=2,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_AC_2 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xac,BUSNUM=2,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_AE_2 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xae,BUSNUM=2,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_A0_3 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa0,BUSNUM=3,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_A2_3 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa2,BUSNUM=3,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_A4_3 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa4,BUSNUM=3,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_A6_3 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa6,BUSNUM=3,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_A8_3 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa8,BUSNUM=3,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_AA_3 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xaa,BUSNUM=3,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_AC_3 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xac,BUSNUM=3,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_AE_3 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xae,BUSNUM=3,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C64_A0_4 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa0,BUSNUM=4,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C64_A2_4 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa2,BUSNUM=4,CNTLR=0 -/SYSTEM/MOTHERBOARD/24C64_A8_4 _class=11,Subclass=0,Instance=0,PERM=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa8,BUSNUM=4,CNTLR=0 -/SYSTEM/IO_BOARD/24C64_AA_4 _class=11,Subclass=0,Instance=0,PERM=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xaa,BUSNUM=4,CNTLR=0 -/SYSTEM/IO_BOARD/24C64_A4_4 _class=11,Subclass=0,Instance=0,PERM=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa4,BUSNUM=4,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/MAX1617_30_5 _class=11,Subclass=4,Instance=0,HOTPLUG=0,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x30,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/MAX1617_32_5 _class=11,Subclass=4,Instance=0,HOTPLUG=0,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x32,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/MAX1617_34_5 _class=11,Subclass=4,Instance=0,HOTPLUG=0,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x34,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/MAX1617_52_5 _class=11,Subclass=4,Instance=0,HOTPLUG=0,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x52,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/SSC050_80_5 _class=11,Subclass=7,Instance=0,PERM=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x80,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/SSC050_82_5 _class=11,Subclass=7,Instance=0,PERM=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK_PORT _class=10,Subclass=1,Instance=0,GPIO_REG=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=1,TYPE=1,BUSADDR=0x44,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/PCF8574_44_5 _class=11,Subclass=5,Instance=0,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x44,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/PCF8574_46_5 _class=11,Subclass=5,Instance=0,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x46,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/LM75_9C_5 _class=11,Subclass=2,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x9c,BUSNUM=0,CNTLR=1 -/SYSTEM/RSC_SLOT/RSC_CARD/24C64_A6_5 _class=11,Subclass=0,Instance=0,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa6,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/24C64_A8_5 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa8,BUSNUM=0,CNTLR=1 -/SYSTEM/FSP _class=3,Subclass=0,Instance=0,PERM=1,FRU=1 -/SYSTEM/FSP/FSP_GEN_FAULT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/FSP/FSP_LOCATOR_LED _class=2,Subclass=2,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=1,INVERT=0,PORT=1,BITSHIFT=1,BYTEMASK=0x2,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Led-color=WHITE,IsLocator=true,LocatorName=system -/SYSTEM/IO_BOARD/FSP_KS_NORMAL_POS_SENSOR _class=8,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=3,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/FSP_KS_DIAG_POS_SENSOR _class=8,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=1,INVERT=1,PORT=3,BITSHIFT=1,BYTEMASK=0x2,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/FSP_KS_LOCK_POS_SENSOR _class=8,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=2,INVERT=0,PORT=3,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/FSP_KS_OFF_POS_SENSOR _class=8,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=3,INVERT=0,PORT=3,BITSHIFT=3,BYTEMASK=0x8,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/FSP/KEYSWITCH _class=9,Subclass=0,Instance=0,BIT_POS=1,NORMAL_POS_AV=1,DIAG_POS_AV=1,LOCK_POS_AV=1,OFF_POS_AV,PERM=1 -/SYSTEM/CENTERPLANE/CPU_0_2_MODCARD_ON _class=8,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=3,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1 -/SYSTEM/CENTERPLANE/CPU_1_3_MODCARD_ON _class=8,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=1,INVERT=0,PORT=3,BITSHIFT=1,BYTEMASK=0x2,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1 -/SYSTEM/CENTERPLANE/CPU_0_2_MODCARD_ENGAGED _class=6,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=2,INVERT=0,PORT=3,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1 -/SYSTEM/CENTERPLANE/CPU_1_3_MODCARD_ENGAGED _class=6,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=3,INVERT=0,PORT=3,BITSHIFT=3,BYTEMASK=0x8,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1 -/SYSTEM/CENTERPLANE/CPU_0_2_MODCARD_POWER_FAULT _class=8,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=4,INVERT=0,PORT=3,BITSHIFT=4,BYTEMASK=0x10,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1 -/SYSTEM/CENTERPLANE/CPU_1_3_MODCARD_POWER_FAULT _class=8,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=5,INVERT=0,PORT=3,BITSHIFT=5,BYTEMASK=0x20,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1 -/SYSTEM/CENTERPLANE/CPU_0_2_MODCARD_POWER_OK _class=8,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=6,INVERT=0,PORT=3,BITSHIFT=6,BYTEMASK=0x40,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1 -/SYSTEM/CENTERPLANE/CPU_1_3_MODCARD_POWER_OK _class=8,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=7,INVERT=0,PORT=3,BITSHIFT=7,BYTEMASK=0x80,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK0_LOOPB_ENABLE_SWITCH _class=8,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=5,BUSADDR=0x46,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK1_LOOPB_ENABLE_SWITCH _class=8,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=1,INVERT=0,PORT=0,BITSHIFT=1,BYTEMASK=0x2,REG=0,TYPE=5,BUSADDR=0x46,BUSNUM=0,CNTLR=1 -/SYSTEM/SIB_BOARD _class=3,Subclass=0,Instance=0,PERM=1,FRU=1 -/SYSTEM/SIB_BOARD/24C64_A4_5 _class=11,Subclass=0,Instance=0,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa4,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB _class=3,Subclass=0,Instance=0,PERM=1,FRU=1 -/SYSTEM/PDB/PS0_SLOT _class=3,Subclass=0,Instance=0,PERM=1,FRU=1 -/SYSTEM/PDB/PS1_SLOT _class=3,Subclass=0,Instance=1,PERM=1,FRU=1 -/SYSTEM/PDB/PS0_SLOT/PS0 _class=3,Subclass=0,Instance=0,HOTPLUG=1,FRU=1 -/SYSTEM/PDB/PS1_SLOT/PS1 _class=3,Subclass=0,Instance=1,HOTPLUG=1,FRU=1 -/SYSTEM/PDB/PS0_SLOT/PS0/PS0_LOGICAL_STATE _class=3,Subclass=0,Instance=0,HOTPLUG=1,FRU=1 -/SYSTEM/PDB/PS1_SLOT/PS1/PS1_LOGICAL_STATE _class=3,Subclass=0,Instance=0,HOTPLUG=1,FRU=1 -/SYSTEM/PDB/PDB_PORT _class=10,Subclass=1,Instance=0,GPIO_REG=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=1,TYPE=1,BUSADDR=0x4C,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS0_OK_SENSOR _class=8,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=3,INVERT=0,PORT=0,BITSHIFT=3,BYTEMASK=0x8,REG=0,TYPE=7,BUSADDR=0x4c,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS1_OK_SENSOR _class=8,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=2,INVERT=0,PORT=0,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=7,BUSADDR=0x4c,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS0_PR_SENSOR _class=6,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=5,INVERT=0,PORT=0,BITSHIFT=5,BYTEMASK=0x10,REG=0,TYPE=7,BUSADDR=0x4c,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS1_PR_SENSOR _class=6,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=4,INVERT=0,PORT=0,BITSHIFT=4,BYTEMASK=0x20,REG=0,TYPE=7,BUSADDR=0x4c,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS0_ENABLED _class=8,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=6,INVERT=0,PORT=0,BITSHIFT=6,BYTEMASK=0x40,REG=0,TYPE=7,BUSADDR=0x4c,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS1_ENABLED _class=8,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=6,INVERT=0,PORT=0,BITSHIFT=6,BYTEMASK=0x40,REG=0,TYPE=7,BUSADDR=0x4c,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PCF8574_4C_5 _class=11,Subclass=5,Instance=0,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x4c,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/24C64_AE_5 _class=11,Subclass=0,Instance=0,PERM=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xae,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS1_SLOT/PS1/24C64_A0_5 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,HOTPLUG=1,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa0,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS0_SLOT/PS0/24C64_A2_5 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,HOTPLUG=1,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa2,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS0_SLOT/PS0/PS0_FAN_FAIL_SENSOR _class=8,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=2,INVERT=0,PORT=0,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=5,BUSADDR=0x72,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS0_SLOT/PS0/PS0_TEMP_FAIL_SENSOR _class=8,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=3,INVERT=0,PORT=0,BITSHIFT=3,BYTEMASK=0x8,REG=0,TYPE=5,BUSADDR=0x72,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS0_SLOT/PS0/PS0_AC_IN_SENSOR _class=8,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=5,BUSADDR=0x72,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS0_SLOT/PS0/PS0_FAULT_SENSOR _class=8,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=5,INVERT=0,PORT=0,BITSHIFT=5,BYTEMASK=0x10,REG=0,TYPE=5,BUSADDR=0x72,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS0_SLOT/PS0/PS0_RESET _class=10,Subclass=1,Instance=0,GPIO_REG=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=1,TYPE=1,BUSADDR=0x72,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS1_SLOT/PS1/PS1_FAN_FAIL_SENSOR _class=8,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=2,INVERT=0,PORT=0,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=5,BUSADDR=0x70,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS1_SLOT/PS1/PS1_TEMP_FAIL_SENSOR _class=8,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=3,INVERT=0,PORT=0,BITSHIFT=3,BYTEMASK=0x8,REG=0,TYPE=5,BUSADDR=0x70,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS1_SLOT/PS1/PS1_AC_IN_SENSOR _class=8,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=5,BUSADDR=0x70,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS1_SLOT/PS1/PS1_FAULT_SENSOR _class=8,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=5,INVERT=0,PORT=0,BITSHIFT=5,BYTEMASK=0x10,REG=0,TYPE=5,BUSADDR=0x70,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS1_SLOT/PS1/PS1_RESET _class=10,Subclass=1,Instance=0,GPIO_REG=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=1,TYPE=1,BUSADDR=0x70,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS1_SLOT/PS1/PCF8574A_70_5 _class=11,Subclass=5,Instance=0,VERSION=0,HOTPLUG=1,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x70,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS0_SLOT/PS0/PCF8574A_72_5 _class=11,Subclass=5,Instance=0,VERSION=0,HOTPLUG=1,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x72,BUSNUM=0,CNTLR=1 -OBJECT_INFO_END - -ASSOCIATIONS -ASSOCIATION PSVC_PRESENCE_SENSOR -DISK0 DISK0_PR_SENSOR -DISK1 DISK1_PR_SENSOR -CPU0_DIE_TEMPERATURE_SENSOR CPU_0_2_MODCARD_ENGAGED -CPU2_DIE_TEMPERATURE_SENSOR CPU_0_2_MODCARD_ENGAGED -CPU1_DIE_TEMPERATURE_SENSOR CPU_1_3_MODCARD_ENGAGED -CPU3_DIE_TEMPERATURE_SENSOR CPU_1_3_MODCARD_ENGAGED -PS0 PS0_PR_SENSOR -PS1 PS1_PR_SENSOR -ASSOCIATION_END -ASSOCIATION PSVC_FAN_SPEED_TACHOMETER -CPU1_FAN CPU1_FAN_TACH -CPU2_FAN CPU2_FAN_TACH -CPU0_FAN CPU0_FAN_TACH -IO0_FAN IO0_FAN_TACH -IO1_FAN IO1_FAN_TACH -ASSOCIATION_END -ASSOCIATION PSVC_DEV_TEMP_SENSOR -CPU1_FAN CPU0_DIE_TEMPERATURE_SENSOR -CPU1_FAN CPU1_DIE_TEMPERATURE_SENSOR -CPU1_FAN CPU2_DIE_TEMPERATURE_SENSOR -CPU1_FAN CPU3_DIE_TEMPERATURE_SENSOR -CPU_0_2_MOD_CARD CPU0_DIE_TEMPERATURE_SENSOR -CPU_0_2_MOD_CARD CPU2_DIE_TEMPERATURE_SENSOR -CPU_1_3_MOD_CARD CPU1_DIE_TEMPERATURE_SENSOR -CPU_1_3_MOD_CARD CPU3_DIE_TEMPERATURE_SENSOR -ASSOCIATION_END -ASSOCIATION PSVC_FAN_TRAY_FANS -FAN_TRAY_0 CPU0_FAN -FAN_TRAY_0 CPU1_FAN -FAN_TRAY_0 CPU2_FAN -FAN_TRAY_1 IO0_FAN -FAN_TRAY_1 IO1_FAN -ASSOCIATION_END -ASSOCIATION PSVC_SLOT_FAULT_LED -FAN_TRAY_0 CPU_FAN_FLT_LED -FAN_TRAY_1 IO_FAN_FLT_LED -DISK0_SLOT DISK0_FLT_LED -DISK1_SLOT DISK1_FLT_LED -ASSOCIATION_END -ASSOCIATION PSVC_SLOT_REMOVE_LED -DISK0_SLOT DISK0_REMOVE_LED -DISK1_SLOT DISK1_REMOVE_LED -ASSOCIATION_END -ASSOCIATION PSVC_TS_OVERTEMP_LED -ASSOCIATION_END -ASSOCIATION PSVC_DEV_FAULT_SENSOR -DISK0 DISK0_FAULT_SENSOR -DISK1 DISK1_FAULT_SENSOR -PS0 PS0_FAULT_SENSOR -PS0 PS0_FAN_FAIL_SENSOR -PS0 PS0_TEMP_FAIL_SENSOR -PS1 PS1_FAULT_SENSOR -PS1 PS1_FAN_FAIL_SENSOR -PS1 PS1_TEMP_FAIL_SENSOR -FSP_GEN_FAULT_LED DISK0 -FSP_GEN_FAULT_LED DISK1 -FSP_GEN_FAULT_LED CPU0_DIE_TEMPERATURE_SENSOR -FSP_GEN_FAULT_LED CPU1_DIE_TEMPERATURE_SENSOR -FSP_GEN_FAULT_LED CPU2_DIE_TEMPERATURE_SENSOR -FSP_GEN_FAULT_LED CPU3_DIE_TEMPERATURE_SENSOR -FSP_GEN_FAULT_LED DBP0_AMB_TEMPERATURE_SENSOR -FSP_GEN_FAULT_LED CPU1_FAN -FSP_GEN_FAULT_LED CPU2_FAN -FSP_GEN_FAULT_LED IO0_FAN -FSP_GEN_FAULT_LED IO1_FAN -FSP_GEN_FAULT_LED CPU0_FAN -FSP_GEN_FAULT_LED PS0 -FSP_GEN_FAULT_LED PS1 -FSP_GEN_FAULT_LED PS0_LOGICAL_STATE -FSP_GEN_FAULT_LED PS1_LOGICAL_STATE -ASSOCIATION_END -ASSOCIATION PSVC_DEV_FAULT_LED -CPU0_FAN CPU_FAN_FLT_LED -CPU1_FAN CPU_FAN_FLT_LED -CPU2_FAN CPU_FAN_FLT_LED -IO0_FAN IO_FAN_FLT_LED -IO1_FAN IO_FAN_FLT_LED -CPU0_FAN_TACH CPU_FAN_FLT_LED -CPU1_FAN_TACH CPU_FAN_FLT_LED -CPU2_FAN_TACH CPU_FAN_FLT_LED -IO0_FAN_TACH IO_FAN_FLT_LED -IO1_FAN_TACH IO_FAN_FLT_LED -FAN_TRAY_0 CPU_FAN_FLT_LED -FAN_TRAY_1 IO_FAN_FLT_LED -ASSOCIATION_END -ASSOCIATION PSVC_PARENT -CPU_0_2_MODCARD_ON CENTERPLANE -CPU_1_3_MODCARD_ON CENTERPLANE -CPU_1_3_MODCARD_ENGAGED CENTERPLANE -CPU_0_2_MODCARD_ENGAGED CENTERPLANE -CPU_1_3_MODCARD_ENGAGED CENTERPLANE -CPU_0_2_MODCARD_POWER_FAULT CENTERPLANE -CPU_1_3_MODCARD_POWER_FAULT CENTERPLANE -CPU_0_2_MODCARD_POWER_OK CENTERPLANE -CPU_1_3_MODCARD_POWER_OK CENTERPLANE -SIB_BOARD SYSTEM -24C64_A4_5 SIB_BOARD -SMART_CARD SYSTEM -NOT_YET_IMPLEMENTED SMART_CARD -FAN_TRAY_0 SYSTEM -FAN_TRAY_1 SYSTEM -CPU0_FAN FAN_TRAY_0 -CPU1_FAN FAN_TRAY_0 -CPU2_FAN FAN_TRAY_0 -IO0_FAN FAN_TRAY_1 -IO1_FAN FAN_TRAY_1 -IO_FAN_FLT_LED SYSTEM -IO_TEST_LED_AMBER IO_BOARD -IO_TEST_LED_RED IO_BOARD -IO_TEST_LED_GREEN IO_BOARD -CENTERPLANE SYSTEM -CPU0_FAN_FLT_LED CENTERPLANE -CENTERPLANE_TEST_LED_AMBER CENTERPLANE -CENTERPLANE_TEST_LED_RED CENTERPLANE -CENTERPLANE_TEST_LED_GREEN CENTERPLANE -CPU0_FAN_TACH CENTERPLANE -CPU_FAN_FLT_LED SYSTEM -CPU1_FAN_TACH MOTHERBOARD -CPU2_FAN_TACH MOTHERBOARD -IO0_FAN_TACH IO_BOARD -IO1_FAN_TACH IO_BOARD -CPU_0_2_MOD_CARD CPU_0_2_MOD_SLOT -CPU_1_3_MOD_CARD CPU_1_3_MOD_SLOT -CPU_0_2_MOD_SLOT MOTHERBOARD -CPU_1_3_MOD_SLOT MOTHERBOARD -CPU0_DIE_TEMPERATURE_SENSOR CPU_0_2_MOD_CARD -CPU1_DIE_TEMPERATURE_SENSOR CPU_1_3_MOD_CARD -CPU2_DIE_TEMPERATURE_SENSOR CPU_0_2_MOD_CARD -CPU3_DIE_TEMPERATURE_SENSOR CPU_1_3_MOD_CARD -DISK0_LOOPB_ENABLE_SWITCH DISK_BP0_BOARD -DISK1_LOOPB_ENABLE_SWITCH DISK_BP0_BOARD -DISK_BP0_BOARD DISK_BP0_BOARD_SLOT -LOOP_B_0_BOARD_SLOT DISK_BP0_BOARD -LOOP_B_0_BOARD LOOP_B_0_BOARD_SLOT -RSC_CARD RSC_SLOT -DISK_BP0_PR_SENSOR MOTHERBOARD -RSC_PR_SENSOR MOTHERBOARD -DBP0_AMB_TEMPERATURE_SENSOR DISK_BP0_BOARD -DISK0 DISK0_SLOT -DISK1 DISK1_SLOT -LOOP_B_0_BOARD_PR_SENSOR DISK_BP0_BOARD -DISK0_FAULT_SENSOR DISK_BP0_BOARD -DISK1_FAULT_SENSOR DISK_BP0_BOARD -DISK0_PR_SENSOR DISK_BP0_BOARD -DISK1_PR_SENSOR DISK_BP0_BOARD -DISK0_SLOT DISK_BP0_BOARD -DISK1_SLOT DISK_BP0_BOARD -DISK0_FLT_LED DISK_BP0_BOARD -DISK1_FLT_LED DISK_BP0_BOARD -DISK0_REMOVE_LED DISK_BP0_BOARD -DISK1_REMOVE_LED DISK_BP0_BOARD -FSP_LOCATOR_LED FSP -FSP_GEN_FAULT_LED FSP -KEYSWITCH FSP -FSP_KS_NORMAL_POS_SENSOR IO_BOARD -FSP_KS_DIAG_POS_SENSOR IO_BOARD -FSP_KS_LOCK_POS_SENSOR IO_BOARD -FSP_KS_OFF_POS_SENSOR IO_BOARD -DISK_BP0_BOARD_SLOT SYSTEM -RSC_SLOT SYSTEM -5V_ENABLE_SWITCH IO_BOARD -I2C_ENABLE_SWITCH IO_BOARD -MOTHERBOARD SYSTEM -IO_BOARD SYSTEM -FSP SYSTEM -24C02_A0_0 CPU_0_2_MOD_CARD -24C02_A2_0 CPU_0_2_MOD_CARD -24C02_A4_0 CPU_0_2_MOD_CARD -24C02_A6_0 CPU_0_2_MOD_CARD -24C02_A8_0 CPU_0_2_MOD_CARD -24C02_AA_0 CPU_0_2_MOD_CARD -24C02_AC_0 CPU_0_2_MOD_CARD -24C02_AE_0 CPU_0_2_MOD_CARD -24C02_A0_1 CPU_1_3_MOD_CARD -24C02_A2_1 CPU_1_3_MOD_CARD -24C02_A4_1 CPU_1_3_MOD_CARD -24C02_A6_1 CPU_1_3_MOD_CARD -24C02_A8_1 CPU_1_3_MOD_CARD -24C02_AA_1 CPU_1_3_MOD_CARD -24C02_AC_1 CPU_1_3_MOD_CARD -24C02_AE_1 CPU_1_3_MOD_CARD -24C02_A0_2 CPU_0_2_MOD_CARD -24C02_A2_2 CPU_0_2_MOD_CARD -24C02_A4_2 CPU_0_2_MOD_CARD -24C02_A6_2 CPU_0_2_MOD_CARD -24C02_A8_2 CPU_0_2_MOD_CARD -24C02_AA_2 CPU_0_2_MOD_CARD -24C02_AC_2 CPU_0_2_MOD_CARD -24C02_AE_2 CPU_0_2_MOD_CARD -24C02_A0_3 CPU_1_3_MOD_CARD -24C02_A2_3 CPU_1_3_MOD_CARD -24C02_A4_3 CPU_1_3_MOD_CARD -24C02_A6_3 CPU_1_3_MOD_CARD -24C02_A8_3 CPU_1_3_MOD_CARD -24C02_AA_3 CPU_1_3_MOD_CARD -24C02_AC_3 CPU_1_3_MOD_CARD -24C02_AE_3 CPU_1_3_MOD_CARD -24C64_A0_4 CPU_0_2_MOD_CARD -24C64_A2_4 CPU_1_3_MOD_CARD -24C64_A4_4 IO_BOARD -24C64_A8_4 MOTHERBOARD -24C64_AA_4 IO_BOARD -MAX1617_30_5 CPU_0_2_MOD_CARD -MAX1617_32_5 CPU_1_3_MOD_CARD -MAX1617_34_5 CPU_0_2_MOD_CARD -PCF8574_46_5 IO_BOARD -PCF8574_44_5 DISK_BP0_BOARD -DISK_PORT DISK_BP0_BOARD -PCF8574_4C_5 IO_BOARD -MAX1617_52_5 CPU_1_3_MOD_CARD -SSC050_80_5 MOTHERBOARD -SSC050_82_5 IO_BOARD -LM75_9C_5 DISK_BP0_BOARD -24C64_A6_5 RSC_CARD -24C64_A8_5 DISK_BP0_BOARD -PDB SYSTEM -PDB_PORT PDB -PS0_SLOT PDB -PS1_SLOT PDB -PS0 PS0_SLOT -PS1 PS1_SLOT -PS0_LOGICAL_STATE PS0 -PS0_FAN_FAIL_SENSOR PS0 -PS0_TEMP_FAIL_SENSOR PS0 -PS0_AC_IN_SENSOR PS0 -PS0_FAULT_SENSOR PS0 -PS0_RESET PS0 -PS0_OK_SENSOR PDB -PS0_PR_SENSOR PDB -PS0_ENABLED PDB -PS1_LOGICAL_STATE PS1 -PS1_FAN_FAIL_SENSOR PS1 -PS1_TEMP_FAIL_SENSOR PS1 -PS1_AC_IN_SENSOR PS1 -PS1_FAULT_SENSOR PS1 -PS1_RESET PS1 -PS1_OK_SENSOR PDB -PS1_PR_SENSOR PDB -PS1_ENABLED PDB -PCF8574A_72_5 PS0 -PCF8574A_70_5 PS1 -24C64_A2_5 PS0 -24C64_A0_5 PS1 -24C64_AE_5 PDB -PCF8574_4C_5 PDB -ASSOCIATION_END -ASSOCIATION PSVC_CPU -SYSTEM CPU_0_2_MOD_CARD -SYSTEM CPU_1_3_MOD_CARD -ASSOCIATION_END -ASSOCIATION PSVC_HOTPLUG_ENABLE_SWITCH -PS0 I2C_ENABLE_SWITCH -PS1 I2C_ENABLE_SWITCH -ASSOCIATION_END -ASSOCIATION PSVC_PS -SYSTEM PS0 -SYSTEM PS1 -ASSOCIATION_END -ASSOCIATION PSVC_KEYSWITCH -SYSTEM KEYSWITCH -FSP KEYSWITCH -ASSOCIATION_END -ASSOCIATION PSVC_KS_NORMAL_POS_SENSOR -KEYSWITCH FSP_KS_NORMAL_POS_SENSOR -ASSOCIATION_END -ASSOCIATION PSVC_KS_DIAG_POS_SENSOR -KEYSWITCH FSP_KS_DIAG_POS_SENSOR -ASSOCIATION_END -ASSOCIATION PSVC_KS_LOCK_POS_SENSOR -KEYSWITCH FSP_KS_LOCK_POS_SENSOR -ASSOCIATION_END -ASSOCIATION PSVC_KS_OFF_POS_SENSOR -KEYSWITCH FSP_KS_OFF_POS_SENSOR -ASSOCIATION_END -ASSOCIATION PSVC_FAN -SYSTEM CPU0_FAN -SYSTEM CPU1_FAN -SYSTEM CPU2_FAN -SYSTEM IO0_FAN -SYSTEM IO1_FAN -ASSOCIATION_END -ASSOCIATION PSVC_TS -SYSTEM CPU0_DIE_TEMPERATURE_SENSOR -SYSTEM CPU1_DIE_TEMPERATURE_SENSOR -SYSTEM CPU2_DIE_TEMPERATURE_SENSOR -SYSTEM CPU3_DIE_TEMPERATURE_SENSOR -SYSTEM DBP0_AMB_TEMPERATURE_SENSOR -ASSOCIATION_END -ASSOCIATION PSVC_DISK -SYSTEM DISK0 -SYSTEM DISK1 -ASSOCIATION_END -ASSOCIATION PSVC_LED -SYSTEM CPU_FAN_FLT_LED -SYSTEM IO_FAN_FLT_LED -SYSTEM CPU0_FAN_FLT_LED -SYSTEM FSP_GEN_FAULT_LED -DISK0 DISK0_REMOVE_LED -DISK0 DISK0_FLT_LED -DISK1 DISK1_REMOVE_LED -DISK1 DISK1_FLT_LED -ASSOCIATION_END -ASSOCIATION PSVC_FSP_LED -SYSTEM FSP_GEN_FAULT_LED -SYSTEM FSP_LOCATOR_LED -ASSOCIATION_END -ASSOCIATION PSVC_PHYSICAL_DEVICE -SYSTEM 24C02_A0_0 -SYSTEM 24C02_A2_0 -SYSTEM 24C02_A4_0 -SYSTEM 24C02_A6_0 -SYSTEM 24C02_A8_0 -SYSTEM 24C02_AA_0 -SYSTEM 24C02_AC_0 -SYSTEM 24C02_AE_0 -SYSTEM 24C02_A0_1 -SYSTEM 24C02_A2_1 -SYSTEM 24C02_A4_1 -SYSTEM 24C02_A6_1 -SYSTEM 24C02_A8_1 -SYSTEM 24C02_AA_1 -SYSTEM 24C02_AC_1 -SYSTEM 24C02_AE_1 -SYSTEM 24C02_A0_2 -SYSTEM 24C02_A2_2 -SYSTEM 24C02_A4_2 -SYSTEM 24C02_A6_2 -SYSTEM 24C02_A8_2 -SYSTEM 24C02_AA_2 -SYSTEM 24C02_AC_2 -SYSTEM 24C02_AE_2 -SYSTEM 24C02_A0_3 -SYSTEM 24C02_A2_3 -SYSTEM 24C02_A4_3 -SYSTEM 24C02_A6_3 -SYSTEM 24C02_A8_3 -SYSTEM 24C02_AA_3 -SYSTEM 24C02_AC_3 -SYSTEM 24C02_AE_3 -SYSTEM 24C64_A0_4 -SYSTEM 24C64_A2_4 -SYSTEM 24C64_A4_4 -SYSTEM 24C64_A8_4 -SYSTEM 24C64_AA_4 -SYSTEM MAX1617_30_5 -SYSTEM MAX1617_32_5 -SYSTEM MAX1617_34_5 -SYSTEM PCF8574_44_5 -SYSTEM PCF8574_46_5 -SYSTEM PCF8574_4C_5 -SYSTEM PCF8574A_70_5 -SYSTEM PCF8574A_72_5 -SYSTEM MAX1617_52_5 -SYSTEM SSC050_80_5 -SYSTEM SSC050_82_5 -SYSTEM LM75_9C_5 -SYSTEM 24C64_A4_5 -SYSTEM 24C64_A6_5 -SYSTEM 24C64_A8_5 -CPU_FAN_FLT_LED SSC050_82_5 -IO_FAN_FLT_LED SSC050_82_5 -CPU0_FAN_FLT_LED SSC050_82_5 -CPU1_FAN_TACH SSC050_80_5 -CPU2_FAN_TACH SSC050_80_5 -IO0_FAN_TACH SSC050_82_5 -IO1_FAN_TACH SSC050_82_5 -CPU0_FAN_TACH SSC050_82_5 -5V_ENABLE_SWITCH PCF8574_46_5 -I2C_ENABLE_SWITCH PCF8574_46_5 -DISK0_LOOPB_ENABLE_SWITCH PCF8574_46_5 -DISK1_LOOPB_ENABLE_SWITCH PCF8574_46_5 -CPU0_DIE_TEMPERATURE_SENSOR MAX1617_30_5 -CPU1_DIE_TEMPERATURE_SENSOR MAX1617_32_5 -CPU2_DIE_TEMPERATURE_SENSOR MAX1617_34_5 -CPU3_DIE_TEMPERATURE_SENSOR MAX1617_52_5 -DBP0_AMB_TEMPERATURE_SENSOR LM75_9C_5 -FSP_GEN_FAULT_LED SSC050_82_5 -FSP_LOCATOR_LED SSC050_82_5 -IO_TEST_LED_AMBER SSC050_82_5 -IO_TEST_LED_RED SSC050_82_5 -IO_TEST_LED_GREEN SSC050_82_5 -CENTERPLANE_TEST_LED_AMBER SSC050_82_5 -CENTERPLANE_TEST_LED_RED SSC050_82_5 -CENTERPLANE_TEST_LED_GREEN SSC050_82_5 -FSP_KS_NORMAL_POS_SENSOR SSC050_82_5 -FSP_KS_DIAG_POS_SENSOR SSC050_82_5 -FSP_KS_LOCK_POS_SENSOR SSC050_82_5 -FSP_KS_OFF_POS_SENSOR SSC050_82_5 -DISK_BP0_PR_SENSOR SSC050_80_5 -RSC_PR_SENSOR SSC050_82_5 -LOOP_B_0_BOARD_PR_SENSOR SSC050_82_5 -DISK_PORT PCF8574_44_5 -DISK0_FLT_LED PCF8574_44_5 -DISK1_FLT_LED PCF8574_44_5 -DISK0_REMOVE_LED PCF8574_44_5 -DISK1_REMOVE_LED PCF8574_44_5 -DISK0_FAULT_SENSOR PCF8574_44_5 -DISK1_FAULT_SENSOR PCF8574_44_5 -DISK0_PR_SENSOR PCF8574_44_5 -DISK1_PR_SENSOR PCF8574_44_5 -CPU_0_2_MODCARD_ON SSC050_80_5 -CPU_1_3_MODCARD_ON SSC050_80_5 -CPU_1_3_MODCARD_ENGAGED SSC050_80_5 -CPU_0_2_MODCARD_ENGAGED SSC050_80_5 -CPU_1_3_MODCARD_ENGAGED SSC050_80_5 -CPU_0_2_MODCARD_POWER_FAULT SSC050_80_5 -CPU_1_3_MODCARD_POWER_FAULT SSC050_80_5 -CPU_0_2_MODCARD_POWER_OK SSC050_80_5 -CPU_1_3_MODCARD_POWER_OK SSC050_80_5 -PDB_PORT PCF8574_4C_5 -PS0 PCF8574A_72_5 -PS0 24C64_A2_5 -PS0_FAN_FAIL_SENSOR PCF8574A_72_5 -PS0_TEMP_FAIL_SENSOR PCF8574A_72_5 -PS0_AC_IN_SENSOR PCF8574A_72_5 -PS0_FAULT_SENSOR PCF8574A_72_5 -PS0_RESET PCF8574A_72_5 -PS0_ENABLED PCF8574_4C_5 -PS0_OK_SENSOR PCF8574_4C_5 -PS0_PR_SENSOR PCF8574_4C_5 -PS1 PCF8574A_70_5 -PS1 24C64_A0_5 -PS1_FAN_FAIL_SENSOR PCF8574A_70_5 -PS1_TEMP_FAIL_SENSOR PCF8574A_70_5 -PS1_AC_IN_SENSOR PCF8574A_70_5 -PS1_FAULT_SENSOR PCF8574A_70_5 -PS1_RESET PCF8574A_70_5 -PS1_ENABLED PCF8574_4C_5 -PS1_OK_SENSOR PCF8574_4C_5 -PS1_PR_SENSOR PCF8574_4C_5 -SYSTEM 24C64_A0_5 -SYSTEM 24C64_A2_5 -SYSTEM 24C64_AE_5 -ASSOCIATION_END -ASSOCIATION PSVC_FRU -CPU0_DIE_TEMPERATURE_SENSOR 24C64_A0_4 -CPU1_DIE_TEMPERATURE_SENSOR 24C64_A2_4 -CPU2_DIE_TEMPERATURE_SENSOR 24C64_A0_4 -CPU3_DIE_TEMPERATURE_SENSOR 24C64_A2_4 -DBP0_AMB_TEMPERATURE_SENSOR 24C64_A8_5 -CPU1_FAN FAN_TRAY_0 -CPU2_FAN FAN_TRAY_0 -CPU0_FAN FAN_TRAY_0 -IO0_FAN FAN_TRAY_1 -IO1_FAN FAN_TRAY_1 -ASSOCIATION_END -ASSOCIATIONS_END - -DEVPATHS -0 0 0xA0 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a0:fru -0 0 0xA2 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a2:fru -0 0 0xA4 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a4:fru -0 0 0xA6 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a6:fru -0 0 0xA8 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a8:fru -0 0 0xAA 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,aa:fru -0 0 0xAC 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,ac:fru -0 0 0xAE 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,ae:fru -0 1 0xA0 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a0:fru -0 1 0xA2 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a2:fru -0 1 0xA4 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a4:fru -0 1 0xA6 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a6:fru -0 1 0xA8 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a8:fru -0 1 0xAA 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,aa:fru -0 1 0xAC 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,ac:fru -0 1 0xAE 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,ae:fru -0 2 0xA0 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a0:fru -0 2 0xA2 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a2:fru -0 2 0xA4 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a4:fru -0 2 0xA6 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a6:fru -0 2 0xA8 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a8:fru -0 2 0xAA 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,aa:fru -0 2 0xAC 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,ac:fru -0 2 0xAE 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,ae:fru -0 3 0xA0 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a0:fru -0 3 0xA2 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a2:fru -0 3 0xA4 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a4:fru -0 3 0xA6 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a6:fru -0 3 0xA8 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a8:fru -0 3 0xAA 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,aa:fru -0 3 0xAC 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,ac:fru -0 3 0xAE 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,ae:fru -0 4 0xA0 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@4,a0:fru -0 4 0xA2 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@4,a2:fru -0 4 0xA4 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/nvram@4,a4:nvram -0 4 0xA8 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@4,a8:fru -0 4 0xAA 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@4,aa:fru -1 0 0x30 0 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,30:amb_temp -1 0 0x30 1 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,30:die_temp -1 0 0x32 0 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,32:amb_temp -1 0 0x32 1 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,32:die_temp -1 0 0x34 0 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,34:amb_temp -1 0 0x34 1 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,34:die_temp -1 0 0x40 0 /devices/pci@9,700000/ebus@1/i2c@1,30/card-reader@0,40:card-reader0 -1 0 0x4c 0 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,4c:pcf8574 -1 0 0x44 0 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,44:pcf8574 -1 0 0x46 0 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,46:pcf8574 -1 0 0x52 0 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,52:amb_temp -1 0 0x52 1 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,52:die_temp -1 0 0x70 0 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,70:pcf8574 -1 0 0x72 0 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,72:pcf8574 -1 0 0x80 0 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,80:port_0 -1 0 0x80 1 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,80:port_1 -1 0 0x80 2 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,80:port_2 -1 0 0x80 3 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,80:port_3 -1 0 0x80 4 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,80:port_4 -1 0 0x82 0 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,82:port_0 -1 0 0x82 1 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,82:port_1 -1 0 0x82 2 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,82:port_2 -1 0 0x82 3 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,82:port_3 -1 0 0x82 4 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,82:port_4 -1 0 0x90 0 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,90:port_0 -1 0 0x90 1 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,90:port_1 -1 0 0x90 2 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,90:port_2 -1 0 0x90 3 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,90:port_3 -1 0 0x92 0 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,92:port_0 -1 0 0x92 1 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,92:port_1 -1 0 0x92 2 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,92:port_2 -1 0 0x92 3 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,92:port_3 -1 0 0x94 0 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,94:port_0 -1 0 0x94 1 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,94:port_1 -1 0 0x94 2 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,94:port_2 -1 0 0x94 3 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,94:port_3 -1 0 0x98 0 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,98:die_temp -1 0 0x9c 0 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature-sensor@0,9c:lm75 -1 0 0xA0 0 /devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,a0:fru -1 0 0xA2 0 /devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,a2:fru -1 0 0xA4 0 /devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,a4:fru -1 0 0xA6 0 /devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,a6:fru -1 0 0xA8 0 /devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,a8:fru -1 0 0xAE 0 /devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,ae:fru -DEVPATHS_END - -TABLES -TABLE -TEMP_SENSOR_CONVERSIONS 2 -160 160 160 160 160 160 160 160 -160 160 160 160 160 160 159 156 -153 150 147 145 143 140 138 136 -134 133 131 129 128 126 125 123 -122 120 119 118 117 115 114 113 -112 111 110 109 108 107 106 105 -104 103 103 102 101 100 99 98 -98 97 96 95 95 94 93 93 -92 91 91 90 89 89 88 87 -87 86 85 85 84 84 83 83 -82 81 81 80 80 79 79 78 -78 77 77 76 76 75 74 74 -74 73 73 72 72 71 71 70 -70 69 69 68 68 67 67 66 -66 65 65 65 64 64 63 63 -62 62 61 61 61 60 60 59 -59 58 58 58 57 57 56 56 -55 55 55 54 54 53 53 53 -52 52 51 51 50 50 50 49 -49 48 48 47 47 47 46 46 -45 45 44 44 44 43 43 42 -42 41 41 41 40 40 39 39 -38 38 37 37 37 36 36 35 -35 34 34 33 33 32 32 31 -31 30 30 29 29 28 28 27 -27 26 26 25 25 24 24 23 -22 22 21 21 20 20 19 18 -18 17 16 16 15 14 14 13 -12 11 11 10 9 8 7 6 - 5 4 3 2 1 0 -1 -2 --3 -5 -6 -7 -9 -11 -12 -14 --17 -19 -22 -25 -28 -33 -39 -50 -TABLE_END -TABLE -3_3V_I_CONVERSIONS 2 -0 0 0 0 1 1 1 1 -1 1 1 2 2 2 2 2 -2 2 3 3 3 3 3 3 -3 4 4 4 4 4 4 4 -5 5 5 5 5 5 5 6 -6 6 6 6 6 6 6 7 -7 7 7 7 7 7 8 8 -8 8 8 8 8 9 9 9 -9 9 9 9 10 10 10 10 -10 10 10 11 11 11 11 11 -11 11 12 12 12 12 12 12 -12 13 13 13 13 13 13 13 -14 14 14 14 14 14 14 15 -15 15 15 15 15 15 16 16 -16 16 16 16 16 17 17 17 -17 17 17 17 18 18 18 18 -18 18 18 18 19 19 19 19 -19 19 19 20 20 20 20 20 -20 20 21 21 21 21 21 21 -21 22 22 22 22 22 22 22 -23 23 23 23 23 23 23 24 -24 24 24 24 24 24 25 25 -25 25 25 25 25 26 26 26 -26 26 26 26 27 27 27 27 -27 27 27 28 28 28 28 28 -28 28 29 29 29 29 29 29 -29 30 30 30 30 30 30 30 -30 31 31 31 31 31 31 31 -32 32 32 32 32 32 32 33 -33 33 33 33 33 33 34 34 -34 34 34 34 34 35 35 35 -35 35 35 35 36 36 36 36 -36 -TABLE_END -TABLE -5V_I_CONVERSIONS 2 -0 0 0 0 0 1 1 1 -1 1 1 1 1 1 2 2 -2 2 2 2 2 2 2 3 -3 3 3 3 3 3 3 3 -4 4 4 4 4 4 4 4 -4 5 5 5 5 5 5 5 -5 5 5 6 6 6 6 6 -6 6 6 6 7 7 7 7 -7 7 7 7 7 8 8 8 -8 8 8 8 8 8 9 9 -9 9 9 9 9 9 9 10 -10 10 10 10 10 10 10 10 -11 11 11 11 11 11 11 11 -11 12 12 12 12 12 12 12 -12 12 13 13 13 13 13 13 -13 13 13 14 14 14 14 14 -14 14 14 14 14 15 15 15 -15 15 15 15 15 15 16 16 -16 16 16 16 16 16 16 17 -17 17 17 17 17 17 17 17 -18 18 18 18 18 18 18 18 -18 19 19 19 19 19 19 19 -19 19 20 20 20 20 20 20 -20 20 20 21 21 21 21 21 -21 21 21 21 22 22 22 22 -22 22 22 22 22 23 23 23 -23 23 23 23 23 23 23 24 -24 24 24 24 24 24 24 24 -25 25 25 25 25 25 25 25 -25 26 26 26 26 26 26 26 -26 26 27 27 27 27 27 27 -27 27 27 28 28 28 28 28 -28 -TABLE_END -TABLE -12V_I_CONVERSIONS 2 -0 0 0 0 0 0 0 1 -1 1 1 1 1 1 1 1 -1 1 1 2 2 2 2 2 -2 2 2 2 2 2 2 2 -3 3 3 3 3 3 3 3 -3 3 3 3 4 4 4 4 -4 4 4 4 4 4 4 4 -5 5 5 5 5 5 5 5 -5 5 5 5 5 6 6 6 -6 6 6 6 6 6 6 6 -6 7 7 7 7 7 7 7 -7 7 7 7 7 7 8 8 -8 8 8 8 8 8 8 8 -8 8 9 9 9 9 9 9 -9 9 9 9 9 9 9 10 -10 10 10 10 10 10 10 10 -10 10 10 11 11 11 11 11 -11 11 11 11 11 11 11 11 -12 12 12 12 12 12 12 12 -12 12 12 12 13 13 13 13 -13 13 13 13 13 13 13 13 -14 14 14 14 14 14 14 14 -14 14 14 14 14 15 15 15 -15 15 15 15 15 15 15 15 -15 16 16 16 16 16 16 16 -16 16 16 16 16 16 17 17 -17 17 17 17 17 17 17 17 -17 17 18 18 18 18 18 18 -18 18 18 18 18 18 18 19 -19 19 19 19 19 19 19 19 -19 19 19 20 20 20 20 20 -20 20 20 20 20 20 20 20 -20 -TABLE_END -TABLE -48V_I_CONVERSIONS 2 -0 0 0 0 0 0 0 0 -0 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 -1 1 2 2 2 2 2 2 -2 2 2 2 2 2 2 2 -2 2 2 3 3 3 3 3 -3 3 3 3 3 3 3 3 -3 3 3 3 4 4 4 4 -4 4 4 4 4 4 4 4 -4 4 4 4 4 5 5 5 -5 5 5 5 5 5 5 5 -5 5 5 5 5 5 6 6 -6 6 6 6 6 6 6 6 -6 6 6 6 6 6 6 7 -7 7 7 7 7 7 7 7 -7 7 7 7 7 7 7 7 -8 8 8 8 8 8 8 8 -8 8 8 8 8 8 8 8 -8 9 9 9 9 9 9 9 -9 9 9 9 9 9 9 9 -9 9 10 10 10 10 10 10 -10 10 10 10 10 10 10 10 -10 10 10 11 11 11 11 11 -11 11 11 11 11 11 11 11 -11 11 11 11 12 12 12 12 -12 12 12 12 12 12 12 12 -12 12 12 12 12 13 13 13 -13 13 13 13 13 13 13 13 -13 13 13 13 13 13 14 14 -14 14 14 14 14 14 14 14 -14 14 14 14 14 14 14 15 -15 15 15 15 15 15 15 15 -15 -TABLE_END -TABLES_END - -PROJECTED_PROPERTIES -CPU_0_2_MOD_CARD Temperature0 CPU0_DIE_TEMPERATURE_SENSOR Temperature -CPU_0_2_MOD_CARD Temperature1 CPU2_DIE_TEMPERATURE_SENSOR Temperature -CPU_1_3_MOD_CARD Temperature0 CPU1_DIE_TEMPERATURE_SENSOR Temperature -CPU_1_3_MOD_CARD Temperature1 CPU3_DIE_TEMPERATURE_SENSOR Temperature -CPU1_FAN Fan-speed CPU1_FAN_TACH AtoDSensorValue -CPU2_FAN Fan-speed CPU2_FAN_TACH AtoDSensorValue -IO0_FAN Fan-speed IO0_FAN_TACH AtoDSensorValue -IO1_FAN Fan-speed IO1_FAN_TACH AtoDSensorValue -CPU0_FAN Fan-speed CPU0_FAN_TACH AtoDSensorValue -PROJECTED_PROPERTIES_END diff --git a/usr/src/cmd/picl/plugins/sun4u/cherrystone/devtree/Makefile b/usr/src/cmd/picl/plugins/sun4u/cherrystone/devtree/Makefile deleted file mode 100644 index d35c004f92..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/cherrystone/devtree/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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# cmd/picl/plugins/sun4u/cherrystone/devtree/Makefile -# -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-480R - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -install := FILEMODE = 0444 - -CONF= picldevtree.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: - -install: $(ROOTLIBDIR) $(ROOTCONF) - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/cherrystone/devtree/picldevtree.conf b/usr/src/cmd/picl/plugins/sun4u/cherrystone/devtree/picldevtree.conf deleted file mode 100644 index 14132a7886..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/cherrystone/devtree/picldevtree.conf +++ /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 (c) 2001 by Sun Microsystems, Inc. -# All rights reserved. -# -#ident "%Z%%M% %I% %E% SMI" -# -# Platform specific .conf file for picldevtree plug-in -fru seeprom diff --git a/usr/src/cmd/picl/plugins/sun4u/cherrystone/frudata/Makefile b/usr/src/cmd/picl/plugins/sun4u/cherrystone/frudata/Makefile deleted file mode 100644 index 245742b198..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/cherrystone/frudata/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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# cmd/picl/plugins/sun4u/cherrystone/frudata/Makefile -# -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-480R - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONF= libpiclfrudata.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 - - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: $(CONF) - -install: $(ROOTLIBDIR) $(ROOTCONF) - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/cherrystone/frudata/libpiclfrudata.conf b/usr/src/cmd/picl/plugins/sun4u/cherrystone/frudata/libpiclfrudata.conf deleted file mode 100644 index ec18999f98..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/cherrystone/frudata/libpiclfrudata.conf +++ /dev/null @@ -1,173 +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 (c) 2000-2001 by Sun Microsystems, Inc. -# All rights reserved. -# -#ident "%Z%%M% %I% %E% SMI" -# -# This file creates the FRU device paths for the FRUAccess library -# - - - - - - - - - - -VERSION 1.0 - - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=0,a0 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a0:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=0,a2 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a2:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=0,a4 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a4:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=0,a6 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a6:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=0,a8 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a8:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=0,aa -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,aa:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=0,ac -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,ac:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=0,ae -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,ae:fru" - - - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=1,a0 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a0:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=1,a2 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a2:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=1,a4 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a4:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=1,a6 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a6:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=1,a8 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a8:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=1,aa -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,aa:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=1,ac -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,ac:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=1,ae -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,ae:fru" - - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=2,a0 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a0:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=2,a2 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a2:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=2,a4 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a4:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=2,a6 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a6:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=2,a8 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a8:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=2,aa -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,aa:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=2,ac -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,ac:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=2,ae -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,ae:fru" - - - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=3,a0 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a0:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=3,a2 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a2:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=3,a4 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a4:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=3,a6 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a6:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=3,a8 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a8:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=3,aa -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,aa:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=3,ac -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,ac:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=3,ae -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,ae:fru" - - - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=4,a0 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@4,a0:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=4,a2 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@4,a2:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=4,a8 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@4,a8:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=4,aa -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@4,aa:fru" - - - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,30/fru?UnitAddress=0,a0 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,a0:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,30/fru?UnitAddress=0,a2 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,a2:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,30/fru?UnitAddress=0,a6 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,a6:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,30/fru?UnitAddress=0,a8 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,a8:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,30/fru?UnitAddress=0,ae -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,ae:fru" diff --git a/usr/src/cmd/picl/plugins/sun4u/cherrystone/frutree/Makefile b/usr/src/cmd/picl/plugins/sun4u/cherrystone/frutree/Makefile deleted file mode 100644 index 3d7cfacd38..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/cherrystone/frutree/Makefile +++ /dev/null @@ -1,102 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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 $(SRC)/Makefile.psm - -LIBRARY= libpiclfrutree.a -VERS= .1 - -OBJECTS= piclfrutree.o - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-480R - -include $(SRC)/cmd/picl/plugins/Makefile.com - -CPPFLAGS += -I$(SRC)/uts/sun4u/ -I$(SRC)/uts/common/ -CPPFLAGS += -I$(SRC)/lib/libdevfsevent -I$(SRC)/uts/common - -SRCS= $(OBJECTS:%.o=%.c) - -LIBS = $(DYNLIB) - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONF= piclfrutree.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 -INFOS= $(CONF:%.conf=%.info) - - -CLOBBERFILES += $(LIBLINKS) - -DEVTREE_SRC_DIR = $(SRC)/cmd/picl/plugins/common/devtree -DYNFLAGS += -R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins -LDLIBS += -L$(DEVTREE_SRC_DIR) -LDLIBS += -L$(SRC)/lib/libptree/$(MACH) -LDLIBS += -L$(SRC)/cmd/picl/plugins/common/devtree -LDLIBS += -L$(ROOT)/usr/lib/picl/plugins -LDLIBS += -lc -lpicldevtree -lpicltree -lnvpair - -.KEEP_STATE: - -SUBDIRS= - -POFILE= piclfrutree.po - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -all: $(LIBS) $(LIBLINKS) $(CONF) - -install: $(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) $(ROOTCONF) - -_msg: $(MSGDOMAIN) $(POFILE) - $(RM) $(MSGDOMAIN)/$(POFILE) - $(CP) $(POFILE) $(MSGDOMAIN)/cstone_$(POFILE) - -$(MSGDOMAIN): - $(INS.dir) - -$(LIBLINKS): FRC - $(RM) $@; $(SYMLINK) $(DYNLIB) $@ - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -$(CONF): $(INFOS) - $(RM) $@ - $(CPP) piclfrutree.info >$@ - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/cherrystone/frutree/piclfrutree.c b/usr/src/cmd/picl/plugins/sun4u/cherrystone/frutree/piclfrutree.c deleted file mode 100644 index bc565320be..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/cherrystone/frutree/piclfrutree.c +++ /dev/null @@ -1,1147 +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 2001-2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * PICL plug-in that creates the FRU Hierarchy for the - * SUNW,Sun-Fire-480R (Cherrystone) platform - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -/* - * Plugin registration entry points - */ -static void picl_frutree_register(void); -static void picl_frutree_init(void); -static void picl_frutree_fini(void); -static void picl_frutree_evhandler(const char *ename, const void *earg, - size_t size, void *cookie); - -#pragma init(picl_frutree_register) - -/* - * Log message texts - */ -#define CREATE_FRUTREE_FAIL gettext("Failed to create frutree node\n") -#define CREATE_CHASSIS_FAIL gettext("Failed to create chassis node\n") -#define IOBRD_INIT_FAIL gettext("do_ioboard_init() failed\n") -#define RSCBRD_INIT_FAIL gettext("do_rscboard_init() failed\n") -#define FCAL_INIT_FAIL gettext("do_fcal_init() failed\n") -#define PS_INIT_FAIL gettext("do_power_supplies_init() failed\n") -#define SYSBOARD_INIT_FAIL gettext("do_centerplane_init() failed\n") - -/* - * Viewpoints property field used by SunMC - */ -#define CHASSIS_VIEWPOINTS gettext("front top rear") - -/* - * Ref prop values - */ -#define SEEPROM_SOURCE "_seeprom_source" -#define FRU_PARENT "_fru_parent" - -/* - * List of all the FRU locations in the platform_frupath[] array, and - * location_label[] array - */ -#define PS0 0 -#define PS1 1 -#define RSC 2 -#define DISKBACKPLANE 3 -#define PDB 4 -#define CENTERPLANE 5 -#define IOBRD 6 -#define CPUMOD0 7 -#define CPUMOD1 8 -#define CPU0_DIMM0 9 -#define DIMMS_PER_MOD 8 -#define DIMMS_PER_SLOT 16 - -/* - * Local variables - */ -static picld_plugin_reg_t my_reg_info = { - PICLD_PLUGIN_VERSION_1, - PICLD_PLUGIN_NON_CRITICAL, - "SUNW_Cherrystone_frutree", - picl_frutree_init, - picl_frutree_fini -}; - -/* - * List of all the FRUs in the /platform tree with SEEPROMs - */ -static char *platform_frupath[] = { - "/platform/pci@9,700000/ebus@1/i2c@1,30/fru@0,a2", /* PS 0 */ - "/platform/pci@9,700000/ebus@1/i2c@1,30/fru@0,a0", /* PS 1 */ - "/platform/pci@9,700000/ebus@1/i2c@1,30/fru@0,a6", /* RSC */ - "/platform/pci@9,700000/ebus@1/i2c@1,30/fru@0,a8", /* Disk Backplane */ - "/platform/pci@9,700000/ebus@1/i2c@1,30/fru@0,ae", /* PDB */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@4,a8", /* Centerplane */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@4,aa", /* IO */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@4,a0", /* CPU MOD 0 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@4,a2", /* CPU MOD 1 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a0", /* CPU0 DIMM0 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a2", /* CPU0 DIMM1 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a4", /* CPU0 DIMM2 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a6", /* CPU0 DIMM3 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a8", /* CPU0 DIMM4 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@0,aa", /* CPU0 DIMM5 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@0,ac", /* CPU0 DIMM6 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@0,ae", /* CPU0 DIMM7 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a0", /* CPU2 DIMM0 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a2", /* CPU2 DIMM1 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a4", /* CPU2 DIMM2 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a6", /* CPU2 DIMM3 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a8", /* CPU2 DIMM4 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@2,aa", /* CPU2 DIMM5 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@2,ac", /* CPU2 DIMM6 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@2,ae", /* CPU2 DIMM7 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a0", /* CPU1 DIMM0 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a2", /* CPU1 DIMM1 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a4", /* CPU1 DIMM2 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a6", /* CPU1 DIMM3 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a8", /* CPU1 DIMM4 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@1,aa", /* CPU1 DIMM5 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@1,ac", /* CPU1 DIMM6 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@1,ae", /* CPU1 DIMM7 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a0", /* CPU3 DIMM0 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a2", /* CPU3 DIMM1 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a4", /* CPU3 DIMM2 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a6", /* CPU3 DIMM3 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a8", /* CPU3 DIMM4 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@3,aa", /* CPU3 DIMM5 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@3,ac", /* CPU3 DIMM6 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@3,ae", /* CPU3 DIMM7 */ - NULL}; - -/* - * List of Labels for FRU locations (uses the #define's from above) - */ -static char *location_label[] = { - "0", /* PS0 */ - "1", /* PS1 */ - NULL, /* RSC */ - NULL, /* DISKBACKPLANE */ - NULL, /* PDB */ - NULL, /* CENTERPLANE */ - NULL, /* IOBRD */ - "A", /* CPUMOD0 */ - "B", /* CPUMOD1 */ - "J2900", /* CPU0 DIMM0 */ - "J3100", /* CPU0 DIMM1 */ - "J2901", /* CPU0 DIMM2 */ - "J3101", /* CPU0 DIMM3 */ - "J3000", /* CPU0 DIMM4 */ - "J3200", /* CPU0 DIMM5 */ - "J3001", /* CPU0 DIMM6 */ - "J3201", /* CPU0 DIMM7 */ - "J7900", /* CPU1 DIMM0 */ - "J8100", /* CPU1 DIMM1 */ - "J7901", /* CPU1 DIMM2 */ - "J8101", /* CPU1 DIMM3 */ - "J8000", /* CPU1 DIMM4 */ - "J8200", /* CPU1 DIMM5 */ - "J8001", /* CPU1 DIMM6 */ - "J8201", /* CPU1 DIMM7 */ - "0", /* CPU0 label */ - "1", /* CPU1 label */ - NULL}; - -/* - * List of all the FRU slots for power supplies (hotpluggable) - */ -static char *frutree_power_supply[] = { - "/frutree/chassis/power-dist-board/power-supply-slot?Slot=0", - "/frutree/chassis/power-dist-board/power-supply-slot?Slot=1", - NULL}; - -/* PICL handle for the root node of the "frutree" */ -static picl_nodehdl_t frutreeh; - -static int do_ioboard_init(picl_nodehdl_t); -static int do_rscboard_init(picl_nodehdl_t); -static int do_fcal_init(picl_nodehdl_t); -static int do_power_supplies_init(picl_nodehdl_t); -static int do_centerplane_init(picl_nodehdl_t); -static int do_cpu_module_init(picl_nodehdl_t, int); -static int do_dimms_init(picl_nodehdl_t, int, int); - -static int add_ref_prop(picl_nodehdl_t, picl_nodehdl_t, char *); -static int add_slot_prop(picl_nodehdl_t, int); -static int add_label_prop(picl_nodehdl_t, char *); -static int add_void_fda_prop(picl_nodehdl_t); -static int add_viewpoints_prop(picl_nodehdl_t, char *); -static int add_all_nodes(); -static int remove_all_nodes(picl_nodehdl_t); - -static int add_hotplug_fru_device(void); -static int rem_hotplug_fru_device(void); -static int is_added_device(char *, char *); -static int is_removed_device(char *, char *); -static int add_power_supply(int); -static int remove_power_supply(int); - -/* - * This function is executed as part of .init when the plugin is - * dlopen()ed - */ -static void -picl_frutree_register() -{ - (void) picld_plugin_register(&my_reg_info); -} - -/* - * This function is the init entry point of the plugin. - * It initializes the /frutree tree - */ -static void -picl_frutree_init() -{ - int err; - - err = add_all_nodes(); - if (err != PICL_SUCCESS) { - (void) remove_all_nodes(frutreeh); - return; - } - - /* Register the event handler routine */ - (void) ptree_register_handler(PICLEVENT_SYSEVENT_DEVICE_ADDED, - picl_frutree_evhandler, NULL); - (void) ptree_register_handler(PICLEVENT_SYSEVENT_DEVICE_REMOVED, - picl_frutree_evhandler, NULL); -} - -/* - * This function is the fini entry point of the plugin - */ -static void -picl_frutree_fini(void) -{ - /* Unregister the event handler routine */ - (void) ptree_unregister_handler(PICLEVENT_SYSEVENT_DEVICE_ADDED, - picl_frutree_evhandler, NULL); - (void) ptree_unregister_handler(PICLEVENT_SYSEVENT_DEVICE_REMOVED, - picl_frutree_evhandler, NULL); - - (void) remove_all_nodes(frutreeh); -} - -/* - * This function is the event handler of this plug-in. - * - * It processes the following events: - * - * PICLEVENT_SYSEVENT_DEVICE_ADDED - * PICLEVENT_SYSEVENT_DEVICE_REMOVED - */ -/* ARGSUSED */ -static void -picl_frutree_evhandler(const char *ename, const void *earg, size_t size, - void *cookie) -{ - if (strcmp(ename, PICLEVENT_SYSEVENT_DEVICE_ADDED) == 0) { - /* Check for and add any hotplugged device(s) */ - (void) add_hotplug_fru_device(); - - } else if (strcmp(ename, PICLEVENT_SYSEVENT_DEVICE_REMOVED) == 0) { - /* Check for and remove any hotplugged device(s) */ - (void) rem_hotplug_fru_device(); - } -} - -/* Initializes the FRU nodes for the IO board */ -static int -do_ioboard_init(picl_nodehdl_t rooth) -{ - picl_nodehdl_t iobrdh; - picl_nodehdl_t tmph; - int err; - - /* Create the node for the IO board (if it exists) */ - if (ptree_get_node_by_path(platform_frupath[IOBRD], &tmph) == - PICL_SUCCESS) { - err = ptree_create_node("io-board", "fru", &iobrdh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(iobrdh, tmph, SEEPROM_SOURCE); - if (err != PICL_SUCCESS) - return (err); - - err = add_void_fda_prop(iobrdh); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_add_node(rooth, iobrdh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(tmph, iobrdh, FRU_PARENT); - if (err != PICL_SUCCESS) - return (err); - } - return (PICL_SUCCESS); -} - -/* Initializes the FRU node for the RSC card */ -static int -do_rscboard_init(picl_nodehdl_t rooth) -{ - picl_nodehdl_t rscbrdh; - picl_nodehdl_t tmph; - int err; - - /* Create the node for the RSC board (if it exists) */ - if (ptree_get_node_by_path(platform_frupath[RSC], &tmph) == - PICL_SUCCESS) { - err = ptree_create_node("rsc-board", "fru", &rscbrdh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(rscbrdh, tmph, SEEPROM_SOURCE); - if (err != PICL_SUCCESS) - return (err); - - err = add_void_fda_prop(rscbrdh); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_add_node(rooth, rscbrdh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(tmph, rscbrdh, FRU_PARENT); - if (err != PICL_SUCCESS) - return (err); - } - return (PICL_SUCCESS); -} - -/* Initializes the FRU nodes for the FCAL backplaned */ -static int -do_fcal_init(picl_nodehdl_t rooth) -{ - picl_nodehdl_t fcalsloth; - picl_nodehdl_t fcalmodh; - picl_nodehdl_t tmph; - int err; - - /* Create the node for the FCAL backplane slot */ - err = ptree_create_node("fcal-backplane-slot", - "location", &fcalsloth); - if (err != PICL_SUCCESS) - return (err); - - err = add_slot_prop(fcalsloth, 0); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_add_node(rooth, fcalsloth); - if (err != PICL_SUCCESS) - return (err); - - /* If the FCAL backplane exists, create a node for it */ - if (ptree_get_node_by_path(platform_frupath[DISKBACKPLANE], &tmph) == - PICL_SUCCESS) { - err = ptree_create_node("fcal-backplane", "fru", - &fcalmodh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(fcalmodh, tmph, SEEPROM_SOURCE); - if (err != PICL_SUCCESS) - return (err); - - err = add_void_fda_prop(fcalmodh); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_add_node(fcalsloth, fcalmodh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(tmph, fcalmodh, FRU_PARENT); - if (err != PICL_SUCCESS) - return (err); - } - return (PICL_SUCCESS); -} - -/* Initializes the FRU nodes for the PDB and the power supplies */ -static int -do_power_supplies_init(picl_nodehdl_t rooth) -{ - picl_nodehdl_t powerbrdh; - picl_nodehdl_t powersloth; - picl_nodehdl_t powermodh; - picl_nodehdl_t tmph; - int i, err, slotnum; - - /* Create the node for the PDB (if it exists) */ - if (ptree_get_node_by_path(platform_frupath[PDB], &tmph) == - PICL_SUCCESS) { - err = ptree_create_node("power-dist-board", "fru", &powerbrdh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(powerbrdh, tmph, SEEPROM_SOURCE); - if (err != PICL_SUCCESS) - return (err); - - err = add_void_fda_prop(powerbrdh); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_add_node(rooth, powerbrdh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(tmph, powerbrdh, FRU_PARENT); - if (err != PICL_SUCCESS) - return (err); - - for (i = PS0; i <= PS1; i++) { - /* Create the node for the power supply slot */ - err = ptree_create_node("power-supply-slot", - "location", &powersloth); - if (err != PICL_SUCCESS) - return (err); - - slotnum = i - PS0; - err = add_slot_prop(powersloth, slotnum); - if (err != PICL_SUCCESS) - return (err); - - err = add_label_prop(powersloth, location_label[i]); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_add_node(powerbrdh, powersloth); - if (err != PICL_SUCCESS) - return (err); - - /* If the PS exists, create a node for it */ - if (ptree_get_node_by_path(platform_frupath[i], - &tmph) == PICL_SUCCESS) { - err = ptree_create_node("power-supply", - "fru", &powermodh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(powermodh, tmph, - SEEPROM_SOURCE); - if (err != PICL_SUCCESS) - return (err); - - err = add_void_fda_prop(powermodh); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_add_node(powersloth, powermodh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(tmph, powermodh, FRU_PARENT); - if (err != PICL_SUCCESS) - return (err); - } - } - } - return (PICL_SUCCESS); -} - -/* Initializes the FRU nodes for the centerplane and CPU Memory modules */ -static int -do_centerplane_init(picl_nodehdl_t rooth) -{ - picl_nodehdl_t sysboardh; - picl_nodehdl_t cpumemsloth; - picl_nodehdl_t cpumemmodh; - picl_nodehdl_t tmph; - int i, err, slotnum; - - /* Create the node for the system board (if it exists) */ - if (ptree_get_node_by_path(platform_frupath[CENTERPLANE], &tmph) == - PICL_SUCCESS) { - err = ptree_create_node("centerplane", "fru", - &sysboardh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(sysboardh, tmph, SEEPROM_SOURCE); - if (err != PICL_SUCCESS) - return (err); - - err = add_void_fda_prop(sysboardh); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_add_node(rooth, sysboardh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(tmph, sysboardh, FRU_PARENT); - if (err != PICL_SUCCESS) - return (err); - - for (i = CPUMOD0; i <= CPUMOD1; i++) { - /* Create the node for the CPU Memory slot */ - err = ptree_create_node("cpu-mem-slot", "location", - &cpumemsloth); - if (err != PICL_SUCCESS) - return (err); - - slotnum = i - CPUMOD0; - err = add_slot_prop(cpumemsloth, slotnum); - if (err != PICL_SUCCESS) - return (err); - - err = add_label_prop(cpumemsloth, location_label[i]); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_add_node(sysboardh, cpumemsloth); - if (err != PICL_SUCCESS) - return (err); - - /* If CPU Mem module exists, create a node for it */ - if (ptree_get_node_by_path(platform_frupath[i], - &tmph) == PICL_SUCCESS) { - err = ptree_create_node("cpu-mem-module", - "fru", &cpumemmodh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(cpumemmodh, tmph, - SEEPROM_SOURCE); - if (err != PICL_SUCCESS) - return (err); - - err = add_void_fda_prop(cpumemmodh); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_add_node(cpumemsloth, cpumemmodh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(tmph, cpumemmodh, - FRU_PARENT); - if (err != PICL_SUCCESS) - return (err); - - err = do_cpu_module_init(cpumemmodh, slotnum); - if (err != PICL_SUCCESS) - return (err); - } - } - } - return (PICL_SUCCESS); -} - -/* Creates the FRU nodes for the CPU Module and associated DIMMs */ -static int -do_cpu_module_init(picl_nodehdl_t rooth, int slot) -{ - picl_nodehdl_t cpumodh; - int i, c, err; - - for (i = 0; i <= 1; i++) { - err = ptree_create_node("cpu-module", "location", - &cpumodh); - if (err != PICL_SUCCESS) - return (err); - - err = add_slot_prop(cpumodh, i); - if (err != PICL_SUCCESS) - return (err); - - c = CPU0_DIMM0 + DIMMS_PER_SLOT + i; - - err = add_label_prop(cpumodh, location_label[c]); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_add_node(rooth, cpumodh); - if (err != PICL_SUCCESS) - return (err); - - /* Create the nodes for the memory (if they exist) */ - err = do_dimms_init(cpumodh, slot, i); - if (err != PICL_SUCCESS) - return (err); - } - return (PICL_SUCCESS); -} - -/* Creates the FRU nodes for the DIMMs on a particular CPU Module */ -static int -do_dimms_init(picl_nodehdl_t rooth, int slot, int module) -{ - picl_nodehdl_t dimmsloth; - picl_nodehdl_t dimmmodh; - picl_nodehdl_t tmph; - int i, c, l, err; - - for (i = 0; i < DIMMS_PER_MOD; i++) { - /* Create the node for the memory slot */ - err = ptree_create_node("dimm-slot", "location", - &dimmsloth); - if (err != PICL_SUCCESS) - return (err); - - err = add_slot_prop(dimmsloth, i); - if (err != PICL_SUCCESS) - return (err); - - c = ((slot * DIMMS_PER_SLOT) + - (module * DIMMS_PER_MOD) + i) + CPU0_DIMM0; - - l = c - (DIMMS_PER_SLOT * slot); - - err = add_label_prop(dimmsloth, location_label[l]); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_add_node(rooth, dimmsloth); - if (err != PICL_SUCCESS) - return (err); - - /* If the memory module exists, create a node for it */ - if (ptree_get_node_by_path(platform_frupath[c], &tmph) == - PICL_SUCCESS) { - err = ptree_create_node("dimm-module", "fru", - &dimmmodh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(dimmmodh, tmph, SEEPROM_SOURCE); - if (err != PICL_SUCCESS) - return (err); - - err = add_void_fda_prop(dimmmodh); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_add_node(dimmsloth, dimmmodh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(tmph, dimmmodh, FRU_PARENT); - if (err != PICL_SUCCESS) - return (err); - } - } - return (PICL_SUCCESS); -} - -/* Creates a "reference" property between two PICL nodes */ -static int -add_ref_prop(picl_nodehdl_t nodeh, picl_nodehdl_t tmph, char *str) -{ - picl_prophdl_t proph; - ptree_propinfo_t propinfo; - int err; - - if (str == NULL) - return (PICL_FAILURE); - - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_REFERENCE, PICL_READ, sizeof (picl_nodehdl_t), - str, NULL, NULL); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_create_and_add_prop(nodeh, &propinfo, &tmph, &proph); - if (err != PICL_SUCCESS) - return (err); - - return (PICL_SUCCESS); -} - -/* Creates a "slot" property for a given PICL node */ -static int -add_slot_prop(picl_nodehdl_t nodeh, int slotnum) -{ - picl_prophdl_t proph; - ptree_propinfo_t propinfo; - int err; - - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_INT, PICL_READ, 4, "Slot", NULL, NULL); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_create_and_add_prop(nodeh, &propinfo, &slotnum, &proph); - if (err != PICL_SUCCESS) - return (err); - - return (PICL_SUCCESS); -} - -/* Creates a "Label" property for a given PICL node */ -static int -add_label_prop(picl_nodehdl_t nodeh, char *label) -{ - picl_prophdl_t proph; - ptree_propinfo_t propinfo; - int err; - - if (label == NULL) - return (PICL_FAILURE); - - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_CHARSTRING, PICL_READ, strlen(label)+1, "Label", - NULL, NULL); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_create_and_add_prop(nodeh, &propinfo, label, &proph); - if (err != PICL_SUCCESS) - return (err); - - return (PICL_SUCCESS); -} - -/* Creates a "FRUDataAvailable" void property for the given PICL node */ -static int -add_void_fda_prop(picl_nodehdl_t nodeh) -{ - picl_prophdl_t proph; - ptree_propinfo_t propinfo; - int err; - - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_VOID, PICL_READ, 0, "FRUDataAvailable", NULL, NULL); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_create_and_add_prop(nodeh, &propinfo, NULL, &proph); - if (err != PICL_SUCCESS) - return (err); - - return (PICL_SUCCESS); -} - -/* Creates a "ViewPoints" property -- used for chassis */ -static int -add_viewpoints_prop(picl_nodehdl_t nodeh, char *string) -{ - picl_prophdl_t proph; - ptree_propinfo_t propinfo; - int err; - - if (string == NULL) - return (PICL_FAILURE); - - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_CHARSTRING, PICL_READ, strlen(string)+1, "ViewPoints", - NULL, NULL); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_create_and_add_prop(nodeh, &propinfo, string, &proph); - if (err != PICL_SUCCESS) - return (err); - - return (PICL_SUCCESS); -} - -/* Creates and adds all of the frutree nodes */ -static int -add_all_nodes() -{ - picl_nodehdl_t rooth; - picl_nodehdl_t chassish; - int err; - - /* Get the root node of the PICL tree */ - err = ptree_get_root(&rooth); - if (err != PICL_SUCCESS) { - return (err); - } - - /* Create and add the root node of the FRU subtree */ - err = ptree_create_and_add_node(rooth, "frutree", "picl", &frutreeh); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, CREATE_FRUTREE_FAIL); - return (err); - } - - /* Create and add the chassis node */ - err = ptree_create_and_add_node(frutreeh, "chassis", "fru", &chassish); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, CREATE_CHASSIS_FAIL); - return (err); - } - - /* Add ViewPoints prop to chassis node */ - err = add_viewpoints_prop(chassish, CHASSIS_VIEWPOINTS); - if (err != PICL_SUCCESS) - return (err); - - /* Initialize the FRU nodes for the IO board */ - err = do_ioboard_init(chassish); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, IOBRD_INIT_FAIL); - return (err); - } - - /* Initialize the FRU node for the RSC card */ - err = do_rscboard_init(chassish); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, RSCBRD_INIT_FAIL); - return (err); - } - - /* Initialize the FRU nodes for the DISK backplane */ - err = do_fcal_init(chassish); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, FCAL_INIT_FAIL); - return (err); - } - - /* Initialize the FRU nodes for the PDB and the power supplies */ - err = do_power_supplies_init(chassish); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, PS_INIT_FAIL); - return (err); - } - - /* Initialize the FRU nodes for the CPU Memory modules */ - err = do_centerplane_init(chassish); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, SYSBOARD_INIT_FAIL); - return (err); - } - - return (PICL_SUCCESS); -} - -/* Deletes and destroys all PICL nodes for which rooth is a ancestor */ -static int -remove_all_nodes(picl_nodehdl_t rooth) -{ - picl_nodehdl_t chdh; - int err, done = 0; - - while (!done) { - err = ptree_get_propval_by_name(rooth, PICL_PROP_CHILD, &chdh, - sizeof (picl_nodehdl_t)); - if (err != PICL_PROPNOTFOUND) { - (void) remove_all_nodes(chdh); - } else { - err = ptree_delete_node(rooth); - if (err != PICL_SUCCESS) { - return (err); - } else { - (void) ptree_destroy_node(rooth); - } - done = 1; - } - } - return (PICL_SUCCESS); -} - -/* Searches the list of hotpluggable FRUs, adds the appropriate node(s) */ -static int -add_hotplug_fru_device() -{ - int i, err, slotnum; - - /* Check for hotplugged power supplies */ - for (i = PS0; i <= PS1; i++) { - /* Compare the /platform tree to the frutree */ - slotnum = i - PS0; - err = is_added_device(platform_frupath[i], - frutree_power_supply[slotnum]); - if (err != PICL_SUCCESS) - continue; - - /* If they are different, then add a power supply */ - err = add_power_supply(slotnum); - if (err != PICL_SUCCESS) - continue; - } - return (PICL_SUCCESS); -} - -/* Searches the list of hotpluggable FRUs, removes the appropriate node(s) */ -static int -rem_hotplug_fru_device() -{ - int i, err, slotnum; - - /* Check for hotplugged power supplies */ - for (i = PS0; i <= PS1; i++) { - /* Compare the /platform tree to the frutree */ - slotnum = i - PS0; - err = is_removed_device(platform_frupath[i], - frutree_power_supply[slotnum]); - if (err != PICL_SUCCESS) - continue; - - /* If they are different, then remove a power supply */ - err = remove_power_supply(slotnum); - if (err != PICL_SUCCESS) - continue; - } - return (PICL_SUCCESS); -} - -/* - * Compare the /platform tree to the /frutree to determine if a - * new device has been added - */ -static int -is_added_device(char *plat, char *fru) -{ - int err; - picl_nodehdl_t plath, frusloth, frumodh; - - /* Check for node in the /platform tree */ - err = ptree_get_node_by_path(plat, &plath); - if (err != PICL_SUCCESS) - return (err); - - /* - * The node is in /platform, so find the corresponding slot in - * the frutree - */ - err = ptree_get_node_by_path(fru, &frusloth); - if (err != PICL_SUCCESS) - return (err); - - /* - * If the slot in the frutree has a child, then return - * PICL_FAILURE. This means that the /platform tree and - * the frutree are consistent and no action is necessary. - * Otherwise return PICL_SUCCESS to indicate that a node needs - * to be added to the frutree - */ - err = ptree_get_propval_by_name(frusloth, PICL_PROP_CHILD, - &frumodh, sizeof (picl_nodehdl_t)); - if (err == PICL_SUCCESS) - return (PICL_FAILURE); - - return (PICL_SUCCESS); -} - -/* - * Compare the /platform tree to the /frutree to determine if a - * device has been removed - */ -static int -is_removed_device(char *plat, char *fru) -{ - int err; - picl_nodehdl_t plath, frusloth, frumodh; - - - /* Check for node in /platform tree */ - err = ptree_get_node_by_path(plat, &plath); - if (err == PICL_SUCCESS) - return (PICL_FAILURE); - - /* - * The node is not in /platform, so find the corresponding slot in - * the frutree - */ - err = ptree_get_node_by_path(fru, &frusloth); - if (err != PICL_SUCCESS) - return (err); - - /* - * If the slot in the frutree does not have a child, then return - * PICL_FAILURE. This means that the /platform tree and - * the frutree are consistent and no action is necessary. - * Otherwise return PICL_SUCCESS to indicate that the needs - * to be removed from the frutree - */ - err = ptree_get_propval_by_name(frusloth, PICL_PROP_CHILD, - &frumodh, sizeof (picl_nodehdl_t)); - if (err != PICL_SUCCESS) - return (err); - - return (PICL_SUCCESS); -} - -static int -remove_picl_node(picl_nodehdl_t nodeh) -{ - int err; - err = ptree_delete_node(nodeh); - if (err != PICL_SUCCESS) - return (err); - (void) ptree_destroy_node(nodeh); - return (PICL_SUCCESS); -} - -/* event completion handler for PICL_FRU_ADDED/PICL_FRU_REMOVED events */ -static void -frudr_completion_handler(char *ename, void *earg, size_t size) -{ - picl_nodehdl_t fruh; - - if (strcmp(ename, PICL_FRU_REMOVED) == 0) { - /* - * now frudata has been notified that the node is to be - * removed, we can actually remove it - */ - fruh = NULL; - (void) nvlist_lookup_uint64(earg, - PICLEVENTARG_FRUHANDLE, &fruh); - if (fruh != NULL) { - (void) remove_picl_node(fruh); - } - } - nvlist_free(earg); - free(earg); - free(ename); -} - -/* - * Post the PICL_FRU_ADDED/PICL_FRU_REMOVED event - */ -static void -post_frudr_event(char *ename, picl_nodehdl_t parenth, picl_nodehdl_t fruh) -{ - nvlist_t *nvl; - char *ev_name; - - ev_name = strdup(ename); - if (ev_name == NULL) - return; - if (nvlist_alloc(&nvl, NV_UNIQUE_NAME_TYPE, NULL)) { - free(ev_name); - return; - } - if (parenth != 0L && - nvlist_add_uint64(nvl, PICLEVENTARG_PARENTHANDLE, parenth)) { - free(ev_name); - nvlist_free(nvl); - return; - } - if (fruh != 0L && - nvlist_add_uint64(nvl, PICLEVENTARG_FRUHANDLE, fruh)) { - free(ev_name); - nvlist_free(nvl); - return; - } - if (ptree_post_event(ev_name, nvl, sizeof (nvl), - frudr_completion_handler) != 0) { - free(ev_name); - nvlist_free(nvl); - } -} - -/* Hotplug routine used to add a new power supply */ -static int -add_power_supply(int slotnum) -{ - picl_nodehdl_t powersloth; - picl_nodehdl_t powermodh; - picl_nodehdl_t tmph; - int i, err; - - /* Find the node for the given power supply slot */ - if (ptree_get_node_by_path(frutree_power_supply[slotnum], - &powersloth) == PICL_SUCCESS) { - - i = slotnum + PS0; - - /* Make sure it's in /platform and create the frutree node */ - if (ptree_get_node_by_path(platform_frupath[i], &tmph) == - PICL_SUCCESS) { - err = ptree_create_node("power-supply", "fru", - &powermodh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(powermodh, tmph, SEEPROM_SOURCE); - if (err != PICL_SUCCESS) - return (err); - - err = add_void_fda_prop(powermodh); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_add_node(powersloth, powermodh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(tmph, powermodh, FRU_PARENT); - if (err != PICL_SUCCESS) - return (err); - - /* Post picl-fru-added event */ - post_frudr_event(PICL_FRU_ADDED, NULL, powermodh); - } - } - return (PICL_SUCCESS); -} - -/* Hotplug routine used to remove an existing power supply */ -static int -remove_power_supply(int slotnum) -{ - picl_nodehdl_t powersloth; - picl_nodehdl_t powermodh; - int err; - - /* Find the node for the given power supply slot */ - if (ptree_get_node_by_path(frutree_power_supply[slotnum], - &powersloth) == PICL_SUCCESS) { - /* Make sure it's got a child, then delete it */ - err = ptree_get_propval_by_name(powersloth, PICL_PROP_CHILD, - &powermodh, sizeof (picl_nodehdl_t)); - if (err != PICL_SUCCESS) { - return (err); - } - - err = ptree_delete_node(powermodh); - if (err != PICL_SUCCESS) { - return (err); - } - (void) ptree_destroy_node(powermodh); - /* Post picl-fru-removed event */ - post_frudr_event(PICL_FRU_REMOVED, NULL, powermodh); - } - return (PICL_SUCCESS); -} diff --git a/usr/src/cmd/picl/plugins/sun4u/cherrystone/frutree/piclfrutree.info b/usr/src/cmd/picl/plugins/sun4u/cherrystone/frutree/piclfrutree.info deleted file mode 100644 index ee19cfec5b..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/cherrystone/frutree/piclfrutree.info +++ /dev/null @@ -1,97 +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" - -/* - * This is a fragment of a config file, used by FMD as a temporary measure for - * serial number retrieval. PICL frutree generation for cherrystone is handled - * by the cherrystone-specific libpiclfrutree.so. - */ - -name:/frutree/chassis/system-board/cpu-mem-slot?Label=A/mem-slot?Label=J2900 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a0 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=A/mem-slot?Label=J3100 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a2 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=A/mem-slot?Label=J2901 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a4 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=A/mem-slot?Label=J3101 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a6 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=A/mem-slot?Label=J3000 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a8 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=A/mem-slot?Label=J3200 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@0,aa -name:/frutree/chassis/system-board/cpu-mem-slot?Label=A/mem-slot?Label=J3001 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@0,ac -name:/frutree/chassis/system-board/cpu-mem-slot?Label=A/mem-slot?Label=J3201 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@0,ae -name:/frutree/chassis/system-board/cpu-mem-slot?Label=A/mem-slot?Label=J7900 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a0 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=A/mem-slot?Label=J8100 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a2 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=A/mem-slot?Label=J7901 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a4 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=A/mem-slot?Label=J8101 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a6 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=A/mem-slot?Label=J8000 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a8 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=A/mem-slot?Label=J8200 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@2,aa -name:/frutree/chassis/system-board/cpu-mem-slot?Label=A/mem-slot?Label=J8001 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@2,ac -name:/frutree/chassis/system-board/cpu-mem-slot?Label=A/mem-slot?Label=J8201 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@2,ae -name:/frutree/chassis/system-board/cpu-mem-slot?Label=B/mem-slot?Label=J2900 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a0 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=B/mem-slot?Label=J3100 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a2 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=B/mem-slot?Label=J2901 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a4 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=B/mem-slot?Label=J3101 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a6 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=B/mem-slot?Label=J3000 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a8 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=B/mem-slot?Label=J3200 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@1,aa -name:/frutree/chassis/system-board/cpu-mem-slot?Label=B/mem-slot?Label=J3001 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@1,ac -name:/frutree/chassis/system-board/cpu-mem-slot?Label=B/mem-slot?Label=J3201 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@1,ae -name:/frutree/chassis/system-board/cpu-mem-slot?Label=B/mem-slot?Label=J7900 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a0 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=B/mem-slot?Label=J8100 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a2 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=B/mem-slot?Label=J7901 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a4 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=B/mem-slot?Label=J8101 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a6 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=B/mem-slot?Label=J8000 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a8 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=B/mem-slot?Label=J8200 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@3,aa -name:/frutree/chassis/system-board/cpu-mem-slot?Label=B/mem-slot?Label=J8001 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@3,ac -name:/frutree/chassis/system-board/cpu-mem-slot?Label=B/mem-slot?Label=J8201 diff --git a/usr/src/cmd/picl/plugins/sun4u/cherrystone/psvcplugin/Makefile b/usr/src/cmd/picl/plugins/sun4u/cherrystone/psvcplugin/Makefile deleted file mode 100644 index 4d4e2d9393..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/cherrystone/psvcplugin/Makefile +++ /dev/null @@ -1,89 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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. -# - -LIBRARY= libpsvcplugin_psr.a -VERS= .1 - -OBJECTS= psvcplugin.o - -# include library definitions -include $(SRC)/lib/Makefile.lib -include $(SRC)/Makefile.psm - -include $(SRC)/cmd/picl/plugins/Makefile.com - -SRCS= $(OBJECTS:%.o=%.c) - -LIBS = $(DYNLIB) - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-480R - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CPPFLAGS += -I$(SRC)/uts/sun4u -CPPFLAGS += -I$(SRC)/cmd/picl/plugins/sun4u/psvc/psvcobj - -LDLIBS += -L$(SRC)/lib/libpicl/$(MACH) -L$(SRC)/lib/libpicltree/$(MACH) -LDLIBS += -L$(SRC)/cmd/picl/plugins/sun4u/psvc/psvcobj -LDLIBS += -L$(SRC)/cmd/picl/plugins/sun4u/psvc/psvcplugin -DYNFLAGS += -R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins - -LDLIBS += -lc -lpicltree -lpicl -lpsvcobj -lpsvcplugin - -.KEEP_STATE: - -SUBDIRS= - -POFILE= psvcplugin.po -POFILE_RENAME= psvcplugin_cstone.po - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -all: $(LIBS) $(LIBLINKS) - -install: all $(ROOTLIBDIR) $(ROOTLIBS) $(ROOTLINKS) - -_msg: $(MSGDOMAIN) $(POFILE) - $(RM) $(MSGDOMAIN)/$(POFILE) - $(CP) $(POFILE) $(MSGDOMAIN)/$(POFILE_RENAME) - -$(MSGDOMAIN): - $(INS.dir) - -$(LIBLINKS): FRC - $(RM) $(LIBLINKS); $(SYMLINK) $(DYNLIB) $(LIBLINKS) - -# include library targets -include $(SRC)/cmd/picl/plugins/Makefile.targ -include $(SRC)/lib/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/cherrystone/psvcplugin/psvcplugin.c b/usr/src/cmd/picl/plugins/sun4u/cherrystone/psvcplugin/psvcplugin.c deleted file mode 100644 index 431ba0f75e..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/cherrystone/psvcplugin/psvcplugin.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, 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" - -/* - * PICL Cherrystone platform plug-in to remove environment tree nodes - * if corresponding physical device is not present. For creating - * the picltree nodes, see: - * usr/src/cmd/picl/plugins/sun4u/psvc/psvcplugin/psvcplugin.c - */ -#define _POSIX_PRIORITY_SCHEDULING 1 - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static psvc_opaque_t hdlp; - -#define PSVC_PLUGIN_VERSION PICLD_PLUGIN_VERSION_1 - -#pragma init(psvc_psr_plugin_register) /* place in .init section */ - -typedef struct { - char name[32]; - picl_nodehdl_t node; -} picl_psvc_t; - -extern struct handle { - uint32_t obj_count; - picl_psvc_t *objects; - FILE *fp; -} psvc_hdl; - -void psvc_psr_plugin_init(void); -void psvc_psr_plugin_fini(void); - -picld_plugin_reg_t psvc_psr_reg = { - PSVC_PLUGIN_VERSION, - PICLD_PLUGIN_CRITICAL, - "PSVC_PSR", - psvc_psr_plugin_init, - psvc_psr_plugin_fini -}; - -#define PSVC_INIT_ERR gettext("%s: Error in psvc_init(): %s\n") -#define PTREE_DELETE_NODE_ERR gettext("%s: ptree_delete_node() failed: %s\n") -#define PTREE_GET_NODE_ERR \ - gettext("%s: ptree_get_node_by_path() failed: %s\n") - -extern int ptree_get_node_by_path(const char *, picl_nodehdl_t *); - -/* ======================================== */ -struct node_file { - char path[256]; - char file[256]; -} dev_pr_info[] = { -/* Search for memory */ -{"/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_A0_0", - "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a0:fru"}, -{"/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_A2_0", - "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a2:fru"}, -{"/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_A4_0", - "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a4:fru"}, -{"/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_A6_0", - "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a6:fru"}, -{"/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_A8_0", - "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a8:fru"}, -{"/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_AA_0", - "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,aa:fru"}, -{"/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_AC_0", - "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,ac:fru"}, -{"/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_AE_0", - "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,ae:fru"}, -{"/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_A0_1", - "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a0:fru"}, -{"/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_A2_1", - "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a2:fru"}, -{"/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_A4_1", - "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a4:fru"}, -{"/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_A6_1", - "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a6:fru"}, -{"/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_A8_1", - "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a8:fru"}, -{"/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_AA_1", - "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,aa:fru"}, -{"/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_AC_1", - "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,ac:fru"}, -{"/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_AE_1", - "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,ae:fru"}, -{"/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_A0_2", - "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a0:fru"}, -{"/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_A2_2", - "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a2:fru"}, -{"/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_A4_2", - "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a4:fru"}, -{"/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_A6_2", - "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a6:fru"}, -{"/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_A8_2", - "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a8:fru"}, -{"/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_AA_2", - "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,aa:fru"}, -{"/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_AC_2", - "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,ac:fru"}, -{"/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_AE_2", - "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,ae:fru"}, -{"/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_A0_3", - "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a0:fru"}, -{"/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_A2_3", - "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a2:fru"}, -{"/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_A4_3", - "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a4:fru"}, -{"/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_A6_3", - "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a6:fru"}, -{"/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_A8_3", - "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a8:fru"}, -{"/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_AA_3", - "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,aa:fru"}, -{"/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_AC_3", - "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,ac:fru"}, -{"/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_AE_3", - "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,ae:fru"}, -/* Search for 64Kbit SPD */ -{"/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C64_A0_4", - "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@4,a0:fru"}, -{"/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C64_A2_4", - "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@4,a2:fru"}, - -/* - * Search for CPU Module cards. We check one cpu's die temperature - * sensor If not present, then we remove the entire node since module - * cards come with two cpus in them, each cpu having a die temperature - * sensor - */ - -{"/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD", - "/devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,30:die_temp"}, -{"/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD", - "/devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,52:die_temp"}, -{"/SYSTEM/SIB_BOARD", - "/devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,98:die_temp"}, -/* - * Check to see if RSC Card FRU is present. If it is not present, - * then RSC Card is not present, and so we remove those nodes from - * picl tree as well. - */ -{"/SYSTEM/RSC_SLOT/RSC_CARD/24C64_A6_5", - "/devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,a6:fru"}, -{"/SYSTEM/RSC_SLOT/RSC_CARD", - "/devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,a6:fru"} -}; - -#define DEV_PR_COUNT (sizeof (dev_pr_info) / sizeof (struct node_file)) - -static void init_err(char *fmt, char *arg1, char *arg2) -{ - char msg[256]; - - sprintf(msg, fmt, arg1, arg2); - syslog(LOG_ERR, msg); -} - -void -psvc_psr_plugin_init(void) -{ - char *funcname = "psvc_plugin_psr_init"; - int32_t i; - int err; - boolean_t present; - /* - * So the volatile read/write routines can retrieve data from - * psvc or picl - */ - err = psvc_init(&hdlp); - if (err != 0) { - init_err(PSVC_INIT_ERR, funcname, strerror(errno)); - - } - - /* - * Remove nodes whose devices aren't present from the picl tree. - */ - for (i = 0; i < psvc_hdl.obj_count; ++i) { - picl_psvc_t *objp; - uint64_t features; - objp = &psvc_hdl.objects[i]; - - err = psvc_get_attr(hdlp, objp->name, PSVC_PRESENCE_ATTR, - &present); - if (err != PSVC_SUCCESS) - continue; - err = psvc_get_attr(hdlp, objp->name, PSVC_FEATURES_ATTR, - &features); - if (err != PSVC_SUCCESS) - continue; - if ((features & (PSVC_DEV_HOTPLUG | PSVC_DEV_OPTION)) && - (present == PSVC_ABSENT)) { - err = ptree_delete_node(objp->node); - if (err != 0) { - init_err(PTREE_DELETE_NODE_ERR, funcname, - picl_strerror(err)); - return; - } - } - } - - /* - * Remove PICL device nodes if their /devices file isn't present or - * if the device file is present but the open returns ENXIO - * which indicates that the node file doesn't represent a device - * tree node and is probably a relic from some previous boot config - */ - for (i = 0; i < DEV_PR_COUNT; ++i) { - picl_nodehdl_t dev_pr_node; - int fd; - fd = open(dev_pr_info[i].file, O_RDONLY); - if (fd != -1) { - close(fd); - continue; - } - if ((errno != ENOENT) && (errno != ENXIO)) - continue; - - err = ptree_get_node_by_path(dev_pr_info[i].path, &dev_pr_node); - if (err != 0) { - syslog(LOG_ERR, "Bad path: %s", dev_pr_info[i].path); - init_err(PTREE_GET_NODE_ERR, funcname, - picl_strerror(err)); - return; - } - - err = ptree_delete_node(dev_pr_node); - if (err != 0) { - init_err(PTREE_DELETE_NODE_ERR, funcname, - picl_strerror(err)); - return; - } - } - free(psvc_hdl.objects); -} - -void -psvc_psr_plugin_fini(void) -{ - psvc_fini(hdlp); - hdlp = NULL; -} - -void -psvc_psr_plugin_register(void) -{ - picld_plugin_register(&psvc_psr_reg); -} diff --git a/usr/src/cmd/picl/plugins/sun4u/cherrystone/psvcpolicy/Makefile b/usr/src/cmd/picl/plugins/sun4u/cherrystone/psvcpolicy/Makefile deleted file mode 100644 index c1be510c40..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/cherrystone/psvcpolicy/Makefile +++ /dev/null @@ -1,105 +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" -# - -LIBRARY= libpsvcpolicy_psr.a -VERS= .1 - -OBJECTS= psvcpolicy.o - -# include library definitions -include $(SRC)/lib/Makefile.lib -include $(SRC)/Makefile.psm - -include $(SRC)/cmd/picl/plugins/Makefile.com - -SRCS= $(OBJECTS:%.o=%.c) - -LIBS = $(DYNLIB) - -PLATFORM=SUNW,Sun-Fire-480R - -CPPFLAGS += -I$(SRC)/uts/sun4u -CPPFLAGS += -I$(SRC)/cmd/picl/plugins/sun4u/psvc/psvcobj - -ZDEFS = -LDLIBS += -L$(SRC)/lib/libpicl/$(MACH) -L$(SRC)/lib/libpicltree/$(MACH) -LDLIBS += -L$(SRC)/cmd/picl/plugins/sun4u/psvc/psvcobj -LDLIBS += -L$(SRC)/cmd/picl/plugins/sun4u/psvc/psvcplugin -DYNFLAGS += -R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins - -LDLIBS += -lpicltree -lpsvcobj -lpsvcplugin -LDLIBS += -lc -ldevice -ldevinfo -lHBAAPI - -.KEEP_STATE: - -PLATLIBS= $(USR_PLAT_DIR)/$(PLATFORM)/lib/ - -UTSBASE= $(SRC)/uts - -SUBDIRS= - -POFILE= psvcpolicy.po -POFILE_RENAME= psvcpolicy_cstone.po - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -all: $(LIBS) $(LIBLINKS) - -install: all $(USR_PSM_LIBS) - -$(USR_PSM_LIB_DIR): - @cd $(UTSBASE)/sun4u/cherrystone; pwd; $(MAKE) $(USR_PSM_LIB_DIR) - -$(LIBLINKS): FRC - $(RM) $(LIBLINKS); $(SYMLINK) $(DYNLIB) $(LIBLINKS) - -_msg: $(MSGDOMAIN) $(POFILE) - $(RM) $(MSGDOMAIN)/$(POFILE) - $(CP) $(POFILE) $(MSGDOMAIN)/$(POFILE_RENAME) - -$(MSGDOMAIN): - $(INS.dir) - - -# include library targets -include $(SRC)/cmd/picl/plugins/Makefile.targ -include $(SRC)/lib/Makefile.targ - -$(USR_PSM_LIB_DIR)/%: % $(USR_PSM_LIB_DIR) - $(INS.file) ;\ - $(RM) -r $(USR_PSM_LIB_DIR)/libpsvcpolicy_psr.so; \ - $(SYMLINK) ./libpsvcpolicy_psr.so$(VERS) $(USR_PSM_LIB_DIR)/libpsvcpolicy_psr.so - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/cherrystone/psvcpolicy/psvcpolicy.c b/usr/src/cmd/picl/plugins/sun4u/cherrystone/psvcpolicy/psvcpolicy.c deleted file mode 100644 index 036878e5b1..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/cherrystone/psvcpolicy/psvcpolicy.c +++ /dev/null @@ -1,1845 +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 2007 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Cherrystone platform specific environment monitoring policies - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -/* Device paths for power supply hotplug handling */ -#define SEG5_ADDR 0x30 -#define EBUS_DEV_NAME "/devices/pci@9,700000/ebus@1/" -#define SEG5_DEV_NAME EBUS_DEV_NAME "i2c@1,30/" -#define SEG5_ADDR_DEV_FMT EBUS_DEV_NAME "i2c@1,%x:devctl" - -#define QLC_NODE "/pci@9,600000/SUNW,qlc@2" - -#define DISK_DRV "ssd" -#define MAX_DISKS 2 -#define WWN_SIZE 8 -#define ONBOARD_CONTR "../../devices/pci@9,600000/SUNW,qlc@2/fp@0,0:fc" - -/* Bit masks so we don't "wedge" the inputs */ -#define PCF8574_BIT_WRITE_VALUE(byte, bit, value)\ - ((value << bit) | (byte & (~(0x01 << bit)))) - -#define PDB_MUST_BE_1 0xBF -#define PSU_MUST_BE_1 0x7F -#define DISKBP_MUST_BE_1 0x0F - -/*LINTLIBRARY*/ - -#define PSVC_MAX_STR_LEN 32 - -#define PS_MAX_FAULT_SENSORS 3 - -/* - * Keep track of the power supply's fail status for reporting if/when - * they go good. - * ID's: - * O PSx_FAULT_SENSOR - * 1 Doesn't matter -- only need 0 to be PSx_FAULT_SENSOR - * 2 Doesn't matter - */ -static char *ps_prev_id[2][3] = - {{NULL, NULL, NULL}, {NULL, NULL, NULL}}; -static int ps_prev_failed[2][3] = {{0, 0, 0}, {0, 0, 0}}; - -/* - * Keep track of the power supply's previous presence - * because PSVC doesn't do that for us. - */ -static boolean_t ps_prev_present[2]; -static boolean_t ps_present[2]; - -/* Local Routines for the environmental policies */ -static int ac_unplugged(psvc_opaque_t, char *); -static int ac_power_check(psvc_opaque_t, char *, char *); - -/* - * The I2C bus is noisy, and the state may be incorrectly reported as - * having changed. When the state changes, we attempt to confirm by - * retrying. If any retries indicate that the state has not changed, we - * assume the state change(s) were incorrect and the state has not changed. - * The following variables are used to store the tuneable values read in - * from the optional i2cparam.conf file for this shared object library. - */ -static int n_retry_fan = PSVC_NUM_OF_RETRIES; -static int retry_sleep_fan = 1; -static int n_retry_ps_status = PSVC_NUM_OF_RETRIES; -static int retry_sleep_ps_status = 1; -static int n_retry_pshp = PSVC_NUM_OF_RETRIES; -static int retry_sleep_pshp = 1; -static int n_retry_diskhp = PSVC_NUM_OF_RETRIES; -static int retry_sleep_diskhp = 1; -static int n_retry_temp_shutdown = PSVC_NUM_OF_RETRIES; -static int retry_sleep_temp_shutdown = 1; -static int n_retry_fsp_fault = PSVC_NUM_OF_RETRIES; -static int retry_sleep_fsp_fault = 1; - -typedef struct { - int *pvar; - char *texttag; -} i2c_noise_param_t; - -static i2c_noise_param_t i2cparams[] = { - &n_retry_fan, "n_retry_fan", - &retry_sleep_fan, "retry_sleep_fan", - &n_retry_ps_status, "n_retry_ps_status", - &retry_sleep_ps_status, "retry_sleep_ps_status", - &n_retry_pshp, "n_retry_pshp", - &retry_sleep_pshp, "retry_sleep_pshp", - &n_retry_diskhp, "n_retry_diskhp", - &retry_sleep_diskhp, "retry_sleep_diskhp", - &n_retry_temp_shutdown, "n_retry_temp_shutdown", - &retry_sleep_temp_shutdown, "retry_sleep_temp_shutdown", - &n_retry_fsp_fault, "n_retry_fsp_fault", - &retry_sleep_fsp_fault, "retry_sleep_fsp_fault", - NULL, NULL -}; - -#pragma init(i2cparams_load) - -static void -i2cparams_debug(i2c_noise_param_t *pi2cparams, char *platform, - int usingDefaults) -{ - char s[128]; - i2c_noise_param_t *p; - - if (!usingDefaults) { - (void) snprintf(s, sizeof (s), - "# Values from /usr/platform/%s/lib/i2cparam.conf\n", - platform); - syslog(LOG_WARNING, "%s", s); - } else { - /* no file - we're using the defaults */ - (void) snprintf(s, sizeof (s), -"# No /usr/platform/%s/lib/i2cparam.conf file, using defaults\n", - platform); - } - (void) fputs(s, stdout); - p = pi2cparams; - while (p->pvar != NULL) { - (void) snprintf(s, sizeof (s), "%s %d\n", p->texttag, - *(p->pvar)); - if (!usingDefaults) - syslog(LOG_WARNING, "%s", s); - (void) fputs(s, stdout); - p++; - } -} - -static void -i2cparams_load(void) -{ - FILE *fp; - char filename[PATH_MAX]; - char platform[64]; - char s[128]; - char var[128]; - int val; - i2c_noise_param_t *p; - - if (sysinfo(SI_PLATFORM, platform, sizeof (platform)) == -1) { - syslog(LOG_ERR, "sysinfo error %s\n", strerror(errno)); - return; - } - (void) snprintf(filename, sizeof (filename), - "/usr/platform/%s/lib/i2cparam.conf", platform); - /* read thru the i2cparam.conf file and set variables */ - if ((fp = fopen(filename, "r")) != NULL) { - while (fgets(s, sizeof (s), fp) != NULL) { - if (s[0] == '#') /* skip comment lines */ - continue; - /* try to find a string match and get the value */ - if (sscanf(s, "%127s %d", var, &val) != 2) - continue; - if (val < 1) - val = 1; /* clamp min value */ - p = &(i2cparams[0]); - while (p->pvar != NULL) { - if (strncmp(p->texttag, var, sizeof (var)) == - 0) { - *(p->pvar) = val; - break; - } - p++; - } - } - (void) fclose(fp); - } - /* output the values of the parameters */ - i2cparams_debug(&(i2cparams[0]), platform, ((fp == NULL)? 1 : 0)); -} - -/* - * Create an I2C device node. - */ -static int -create_i2c_node(char *nd_name, char *nd_compat, int nd_nexi, int *nd_reg) -{ - devctl_ddef_t ddef_hdl = NULL; - devctl_hdl_t bus_hdl = NULL; - devctl_hdl_t dev_hdl = NULL; - char buf[MAXPATHLEN]; - char dev_path[MAXPATHLEN]; - int rv = PSVC_FAILURE; - - (void) snprintf(buf, sizeof (buf), SEG5_ADDR_DEV_FMT, nd_nexi); - bus_hdl = devctl_bus_acquire(buf, 0); - if (bus_hdl == NULL) - goto bad; - - /* device definition properties */ - ddef_hdl = devctl_ddef_alloc(nd_name, 0); - (void) devctl_ddef_string(ddef_hdl, "compatible", nd_compat); - (void) devctl_ddef_int_array(ddef_hdl, "reg", 2, nd_reg); - - /* create the device node */ - if (devctl_bus_dev_create(bus_hdl, ddef_hdl, 0, &dev_hdl)) - goto bad; - - if (devctl_get_pathname(dev_hdl, dev_path, MAXPATHLEN) == NULL) - goto bad; - -#ifdef DEBUG - syslog(LOG_ERR, "PSVC: create_i2c_node: Device node created: (%s)", - dev_path); -#endif - rv = PSVC_SUCCESS; -bad: - devctl_release(dev_hdl); - devctl_ddef_free(ddef_hdl); - devctl_release(bus_hdl); - return (rv); -} - -/* - * Delete an I2C device node given the device path. - */ -static void -delete_i2c_node(char *nd) -{ - int rv; - devctl_hdl_t dev_hdl; - - dev_hdl = devctl_device_acquire(nd, 0); - if (dev_hdl == NULL) { - return; - } - - rv = devctl_device_remove(dev_hdl); - if (rv != DDI_SUCCESS) - perror(nd); -#ifdef DEBUG - else - syslog(LOG_ERR, "Device node deleted: (%s)", nd); -#endif - devctl_release(dev_hdl); -} - - -/* PCF8574 Reset Function */ -static int -send_pcf8574_reset(psvc_opaque_t hdlp, char *reset_dev) -{ - int err; - uint8_t reset_bits[2] = {0x7F, 0xFF}; - int i; - for (i = 0; i < 2; i++) { - err = psvc_set_attr(hdlp, reset_dev, PSVC_GPIO_VALUE_ATTR, - &reset_bits[i]); - if (err != PSVC_SUCCESS) { -#ifdef DEBUG - syslog(LOG_ERR, - gettext("Reset to %s with 0x%x failed"), - reset_dev, reset_bits[i]); -#endif - return (err); - } - } - /* Need to give u-code a chance to update */ - sleep(3); - return (err); -} - -static int -pcf8574_write_bit(psvc_opaque_t hdlp, char *id, uint8_t bit_num, - uint8_t bit_val, uint8_t write_must_be_1) -{ - int rv = PSVC_FAILURE; - uint8_t byte; - - rv = psvc_get_attr(hdlp, id, PSVC_GPIO_VALUE_ATTR, &byte); - if (rv != PSVC_SUCCESS) - return (rv); - - byte = PCF8574_BIT_WRITE_VALUE(byte, bit_num, bit_val); - byte |= write_must_be_1; - rv = psvc_set_attr(hdlp, id, PSVC_GPIO_VALUE_ATTR, &byte); - return (rv); -} - -/* - * To enable the i2c bus, we must toggle bit 6 on the PDB's - * PCF8574 (0x4C) high->low->high - */ -static int -pdb_enable_i2c(psvc_opaque_t hdlp) -{ - int rv = PSVC_SUCCESS, i; - int bit_vals[3] = {1, 0, 1}; - int bit_num = 6; - - for (i = 0; i < 3; i++) { - rv = pcf8574_write_bit(hdlp, "PDB_PORT", bit_num, bit_vals[i], - PDB_MUST_BE_1); - if (rv != PSVC_SUCCESS) { - goto bad; - } - } - return (rv); -bad: -#ifdef DEBUG - syslog(LOG_ERR, gettext("PDB I2C Bus Enabling Failed")); -#endif - return (rv); -} - -int32_t -psvc_init_disk_bp_policy_0(psvc_opaque_t hdlp, char *id) -{ - uint8_t reset = 0xFF; - return (psvc_set_attr(hdlp, id, PSVC_GPIO_VALUE_ATTR, - &reset)); -} - -int32_t -pcf8574_init_policy_0(psvc_opaque_t hdlp, char *id) -{ - return (send_pcf8574_reset(hdlp, id)); -} - -static int32_t -check_fan(psvc_opaque_t hdlp, char *tray_id, char *fan_id, boolean_t *fault_on) -{ - int status; - int speed; - int low_thresh; - boolean_t have_fault = 0; - char *tach_id; - char state[PSVC_MAX_STR_LEN]; - char prev_state[PSVC_MAX_STR_LEN]; - char fault_state[PSVC_MAX_STR_LEN]; - int retry; - - /* Get this fan object's corresponding fan tach */ - status = psvc_get_attr(hdlp, fan_id, PSVC_ASSOC_ID_ATTR, - &tach_id, PSVC_FAN_SPEED_TACHOMETER, 0); - if (status != PSVC_SUCCESS) - return (status); - - /* Get the low fan speed threshold */ - status = psvc_get_attr(hdlp, tach_id, PSVC_LO_WARN_ATTR, &low_thresh); - if (status != PSVC_SUCCESS) - return (status); - - retry = 0; - do { - if (retry) - (void) sleep(retry_sleep_fan); - /* Get the fan speed */ - status = psvc_get_attr(hdlp, tach_id, PSVC_SENSOR_VALUE_ATTR, - &speed); - if (status != PSVC_SUCCESS) - return (status); - - if (speed <= low_thresh) { /* We see a fault */ - strlcpy(fault_state, "DEVICE_FAIL", - sizeof (fault_state)); - strlcpy(state, PSVC_ERROR, sizeof (state)); - have_fault = 1; - } else { /* Fault gone? */ - strlcpy(fault_state, PSVC_NO_FAULT, - sizeof (fault_state)); - strlcpy(state, PSVC_OK, sizeof (state)); - have_fault = 0; - } - retry++; - } while ((retry < n_retry_fan) && (speed <= low_thresh)); - - /* Assign new states to the fan object */ - status = psvc_set_attr(hdlp, fan_id, PSVC_FAULTID_ATTR, fault_state); - if (status != PSVC_SUCCESS) - return (status); - status = psvc_set_attr(hdlp, fan_id, PSVC_STATE_ATTR, state); - if (status != PSVC_SUCCESS) - return (status); - - /* Get state and previous state */ - status = psvc_get_attr(hdlp, fan_id, PSVC_STATE_ATTR, state); - if (status != PSVC_SUCCESS) - return (status); - status = psvc_get_attr(hdlp, fan_id, PSVC_PREV_STATE_ATTR, prev_state); - if (status != PSVC_SUCCESS) - return (status); - - /* Display notices */ - if (strcmp(state, PSVC_OK) != 0) { - syslog(LOG_ERR, gettext("WARNING: %s (%s) failure detected"), - tray_id, fan_id); - } else { - if (strcmp(state, prev_state) != 0) { - syslog(LOG_ERR, gettext("NOTICE: Device %s (%s) OK"), - tray_id, fan_id); - } - } - - *fault_on |= have_fault; - return (PSVC_SUCCESS); -} - -/* - * This policy acts on fan trays. It looks at each of its fans - * and checks the speeds. If the fan speed is less than the threshold, - * then indicate: console, log, LED. - */ -int32_t -psvc_fan_fault_check_policy_0(psvc_opaque_t hdlp, char *id) -{ - int fan_count; - int led_count; - int err, i; - char *led_id; - char *fan_id; - char led_state[PSVC_MAX_STR_LEN]; - char state[PSVC_MAX_STR_LEN]; - char prev_state[PSVC_MAX_STR_LEN]; - boolean_t fault_on = 0; - - /* Get the number of fans associated with this fan tray. */ - err = psvc_get_attr(hdlp, id, PSVC_ASSOC_MATCHES_ATTR, &fan_count, - PSVC_FAN_TRAY_FANS); - if (err != PSVC_SUCCESS) - return (err); - - for (i = 0; i < fan_count; i++) { - err = psvc_get_attr(hdlp, id, PSVC_ASSOC_ID_ATTR, - &fan_id, PSVC_FAN_TRAY_FANS, i); - if (err != PSVC_SUCCESS) - return (err); - - err = check_fan(hdlp, id, fan_id, &fault_on); - if (err != PSVC_SUCCESS) - return (err); - } - - if (fault_on) { - strlcpy(led_state, PSVC_LED_ON, sizeof (led_state)); - err = psvc_set_attr(hdlp, id, PSVC_STATE_ATTR, PSVC_ERROR); - if (err != PSVC_SUCCESS) - return (err); - - } else { - strlcpy(led_state, PSVC_LED_OFF, sizeof (led_state)); - err = psvc_set_attr(hdlp, id, PSVC_STATE_ATTR, PSVC_OK); - if (err != PSVC_SUCCESS) - return (err); - } - - err = psvc_get_attr(hdlp, id, PSVC_STATE_ATTR, state); - if (err != PSVC_SUCCESS) - return (err); - err = psvc_get_attr(hdlp, id, PSVC_PREV_STATE_ATTR, prev_state); - if (err != PSVC_SUCCESS) - return (err); - - /* - * Set leds according to the fan tray's states. - * (we only do this if there is a change of state in order - * to reduce i2c traffic) - */ - if (strcmp(state, prev_state) != 0) { - err = psvc_get_attr(hdlp, id, PSVC_ASSOC_MATCHES_ATTR, - &led_count, PSVC_DEV_FAULT_LED); - if (err != PSVC_SUCCESS) - return (err); - for (i = 0; i < led_count; i++) { - err = psvc_get_attr(hdlp, id, - PSVC_ASSOC_ID_ATTR, &led_id, - PSVC_DEV_FAULT_LED, i); - if (err != PSVC_SUCCESS) - return (err); - err = psvc_set_attr(hdlp, led_id, - PSVC_LED_STATE_ATTR, led_state); - if (err != PSVC_SUCCESS) - return (err); - err = psvc_get_attr(hdlp, led_id, - PSVC_LED_STATE_ATTR, led_state); - if (err != PSVC_SUCCESS) - return (err); - } - } - return (err); -} - -static int32_t -check_cpu_temp_fault(psvc_opaque_t hdlp, char *cpu, int32_t cpu_count) -{ - char *sensorid; - int32_t sensor_count; - int32_t status = PSVC_SUCCESS; - int32_t i; - char fault[PSVC_MAX_STR_LEN]; - int retry; - - psvc_get_attr(hdlp, cpu, PSVC_ASSOC_MATCHES_ATTR, &sensor_count, - PSVC_DEV_TEMP_SENSOR); - for (i = 0; i < sensor_count; ++i) { - status = psvc_get_attr(hdlp, cpu, PSVC_ASSOC_ID_ATTR, - &sensorid, PSVC_DEV_TEMP_SENSOR, i); - if (status == PSVC_FAILURE) - return (status); - - retry = 0; - do { - if (retry) - (void) sleep(retry_sleep_temp_shutdown); - status = psvc_get_attr(hdlp, sensorid, - PSVC_FAULTID_ATTR, fault); - if (status == PSVC_FAILURE) - return (status); - retry++; - } while (((strcmp(fault, PSVC_TEMP_LO_SHUT) == 0) || - (strcmp(fault, PSVC_TEMP_HI_SHUT) == 0)) && - (retry < n_retry_temp_shutdown)); - - if ((strcmp(fault, PSVC_TEMP_HI_SHUT) == 0) || - (strcmp(fault, PSVC_TEMP_LO_SHUT) == 0)) { - system("shutdown -y -g 60 -i 5 \"OVERTEMP condition\""); - } - } - - return (status); -} - -int32_t -psvc_shutdown_policy_0(psvc_opaque_t hdlp, char *id) -{ - int32_t cpu_count; - char *cpuid; - int32_t i; - boolean_t present; - int32_t status = PSVC_SUCCESS; - - psvc_get_attr(hdlp, id, PSVC_ASSOC_MATCHES_ATTR, &cpu_count, - PSVC_CPU); - for (i = 0; i < cpu_count; ++i) { - - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_ID_ATTR, &cpuid, - PSVC_CPU, i); - if (status == PSVC_FAILURE) - return (status); - - status = psvc_get_attr(hdlp, cpuid, - PSVC_PRESENCE_ATTR, &present); - if (status == PSVC_FAILURE && present == PSVC_PRESENT) - return (status); - if (present == PSVC_PRESENT) { - status = check_cpu_temp_fault(hdlp, cpuid, cpu_count); - if (status == PSVC_FAILURE && errno != ENODEV) - return (status); - } - } - - return (PSVC_SUCCESS); -} - -/* - * Checks device specified by the PSVC_DEV_FAULT_SENSOR association - * for errors, and if there is, then report and turn on the FSP Fault - * Led. - */ -int32_t -psvc_fsp_device_fault_check_policy_0(psvc_opaque_t hdlp, char *id) -{ - int32_t status; - int32_t i; - int32_t device_count = 0; - char device_state[PSVC_MAX_STR_LEN]; - char *device_id; - int32_t failed_count = 0; - static int32_t led_on = 0; - int retry; - - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_MATCHES_ATTR, - &device_count, PSVC_DEV_FAULT_SENSOR); - if (status != PSVC_SUCCESS) - return (status); - - for (i = 0; i < device_count; i++) { - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_ID_ATTR, - &device_id, PSVC_DEV_FAULT_SENSOR, i); - if (status != PSVC_SUCCESS) - return (status); - - retry = 0; - do { - if (retry) - (void) sleep(retry_sleep_fsp_fault); - status = psvc_get_attr(hdlp, device_id, PSVC_STATE_ATTR, - device_state); - if (status != PSVC_SUCCESS) - return (status); - - if (strcmp(device_state, PSVC_OK) != 0 && - strcmp(device_state, PSVC_HOTPLUGGED) != 0 && - strcmp(device_state, "NO AC POWER") != 0 && - strlen(device_state) != 0) { - failed_count++; - } - retry++; - } while ((retry < n_retry_fsp_fault) && (failed_count)); - } - if (failed_count == 0 && led_on) { - syslog(LOG_ERR, gettext("%s has turned OFF"), id); - status = psvc_set_attr(hdlp, id, PSVC_LED_STATE_ATTR, - PSVC_LED_OFF); - led_on = 0; - } - - if (failed_count > 0 && ! led_on) { - syslog(LOG_ERR, - gettext("%s has turned ON"), id); - status = psvc_set_attr(hdlp, id, PSVC_LED_STATE_ATTR, - PSVC_LED_ON); - led_on = 1; - } - - return (PSVC_SUCCESS); -} - -/* Power Supply Policy Helper and Worker Functions */ -static void -ps_reset_prev_failed(int index) -{ - int i; - /* Reset the power supply's failure information */ - for (i = 0; i < 3; i++) { - ps_prev_id[index][i] = NULL; - ps_prev_failed[index][i] = 0; - } - -} -static int -check_i2c_access(psvc_opaque_t hdlp, char *id) -{ - int rv; - char state[PSVC_MAX_STR_LEN]; - char ps_fault_sensor[PSVC_MAX_STR_LEN]; - - snprintf(ps_fault_sensor, sizeof (ps_fault_sensor), - "%s_FAULT_SENSOR", id); - - rv = psvc_get_attr(hdlp, ps_fault_sensor, PSVC_SWITCH_STATE_ATTR, - &state); - return (rv); -} - -/* - * This routine takes in the PSVC handle pointer, the PS name, and the - * instance number (0 or 1). It simply make a psvc_get call to get the - * presence of each of the children under the PS. This call will set the - * presence state of the child device if it was not there when the system - * was booted. - */ -static int -handle_ps_hotplug_children_presence(psvc_opaque_t hdlp, char *id) -{ - char *child_add_on[4] = {"_RESET", "_LOGICAL_STATE", "_AC_IN_SENSOR", - "_FAULT_SENSOR"}; - int add_ons = 4; - char addon_id[PICL_PROPNAMELEN_MAX]; - char *sensor_id; - int32_t status = PSVC_SUCCESS; - boolean_t presence; - int j; - - /* Go through the add on list and set presence */ - for (j = 0; j < add_ons; j++) { - snprintf(addon_id, sizeof (addon_id), "%s%s", id, - child_add_on[j]); - status = psvc_get_attr(hdlp, addon_id, PSVC_PRESENCE_ATTR, - &presence); - if (status != PSVC_SUCCESS) - return (status); - } - - /* Go through each PS's fault sensors */ - for (j = 0; j < PS_MAX_FAULT_SENSORS; j++) { - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_ID_ATTR, - &(sensor_id), PSVC_DEV_FAULT_SENSOR, j); - if (status != PSVC_SUCCESS) - return (status); - status = psvc_get_attr(hdlp, sensor_id, PSVC_PRESENCE_ATTR, - &presence); - if (status != PSVC_SUCCESS) - return (status); - } - - /* Go through each PS's onboard i2c hardware */ - for (j = 0; j < 2; j++) { - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_ID_ATTR, - &(sensor_id), PSVC_PHYSICAL_DEVICE, j); - if (status != PSVC_SUCCESS) - return (status); - status = psvc_get_attr(hdlp, sensor_id, PSVC_PRESENCE_ATTR, - &presence); - if (status != PSVC_SUCCESS) - return (status); - } - - return (status); -} - -static int -handle_ps_hotplug(psvc_opaque_t hdlp, char *id, boolean_t present) -{ - int32_t status = PSVC_SUCCESS; - int32_t instance; - picl_nodehdl_t parent_node; - picl_nodehdl_t child_node; - char info[PSVC_MAX_STR_LEN]; - char ps_logical_state[PICL_PROPNAMELEN_MAX]; - char parent_path[PICL_PROPNAMELEN_MAX]; - char ps_path[PICL_PROPNAMELEN_MAX]; - static int fruprom_addr[2][2] = { {0, 0xa2}, {0, 0xa0} }; - static int pcf8574_addr[2][2] = { {0, 0x72}, {0, 0x70} }; - char dev_path[MAXPATHLEN]; - - /* Convert name to node and parent path */ - psvcplugin_lookup(id, parent_path, &child_node); - - /* - * Get the power supply's instance. - * Used to index the xxx_addr arrays - */ - status = psvc_get_attr(hdlp, id, PSVC_INSTANCE_ATTR, &instance); - if (status != PSVC_SUCCESS) - return (status); - - if (present == PSVC_PRESENT && !ps_prev_present[instance]) { - /* Service Power Supply Insertion */ - syslog(LOG_ERR, gettext("Device %s inserted"), id); - - /* PICL Tree Maintenance */ - ptree_get_node_by_path(parent_path, &parent_node); - ptree_add_node(parent_node, child_node); - snprintf(ps_path, sizeof (ps_path), "%s/%s", parent_path, id); - psvcplugin_add_children(ps_path); - - /* - * This code to update the presences of power supply - * child devices in the event that picld was started - * without a power supply present. This call makes - * the devices available after that initial insertion. - */ - status = handle_ps_hotplug_children_presence(hdlp, id); - - /* - * Device Tree Maintenance - * Add the devinfo tree node entry for the pcf8574 and seeprom - * and attach their drivers. - */ - status |= create_i2c_node("ioexp", "i2c-pcf8574", SEG5_ADDR, - pcf8574_addr[instance]); - status |= create_i2c_node("fru", "i2c-at24c64", SEG5_ADDR, - fruprom_addr[instance]); - } else { - /* Service Power Supply Removal */ - syslog(LOG_ERR, gettext("Device %s removed"), id); - - /* Reset the power supply's failure information */ - ps_reset_prev_failed(instance); - - /* PICL Tree Maintenance */ - if (ptree_delete_node(child_node) != PICL_SUCCESS) - syslog(LOG_ERR, "ptree_delete_node failed!"); - - /* - * The hardcoded subscript in pcf8574_add[instance][1] - * refers to the address. We are appending the address to - * device path. Both elements are used when creating - * the i2c node (above). - */ - snprintf(dev_path, sizeof (dev_path), - SEG5_DEV_NAME"ioexp@0,%x:pcf8574", - pcf8574_addr[instance][1]); - delete_i2c_node(dev_path); - - snprintf(dev_path, sizeof (dev_path), - SEG5_DEV_NAME"fru@0,%x:fru", fruprom_addr[instance][1]); - delete_i2c_node(dev_path); - } - - snprintf(ps_logical_state, sizeof (ps_logical_state), - "%s_LOGICAL_STATE", id); - - strlcpy(info, PSVC_OK, sizeof (info)); - status |= psvc_set_attr(hdlp, id, PSVC_STATE_ATTR, info); - status |= psvc_set_attr(hdlp, ps_logical_state, PSVC_STATE_ATTR, info); - - strlcpy(info, PSVC_NO_FAULT, sizeof (info)); - status |= psvc_set_attr(hdlp, id, PSVC_FAULTID_ATTR, info); - - /* Enable the i2c connection to the power supply */ - status |= pdb_enable_i2c(hdlp); - return (status); -} - -/* - * check_ps_state() Checks for: - * - * - Failure bits: - * Power Supply Fan Failure - * Power Supply Temperature Failure - * Power Supply Generic Fault - * Power Supply AC Cord Plugged In - * - * - If we see a "bad" state we will report an error. - * - * - "Bad" states: - * Fault bit shows fault. - * Temperature fault shows fault. - * Fan fault shows fault. - * AC power NOT okay to supply. - * - * - If we see that the AC Cord is not plugged in, then the the other - * failure bits are invalid. - * - * - Send pcf8574_reset at the end of the policy if we see - * any "bad" states. - */ -static int32_t -check_ps_state(psvc_opaque_t hdlp, char *id) -{ - int32_t sensor_count; - int32_t status = PSVC_SUCCESS; - int32_t i; - int32_t fault_on = 0; - char *sensor_id; - char ps_ok_sensor[PICL_PROPNAMELEN_MAX]; - char ps_logical_state[PICL_PROPNAMELEN_MAX]; - char ps_reset[PICL_PROPNAMELEN_MAX]; - char previous_state[PSVC_MAX_STR_LEN]; - char state[PSVC_MAX_STR_LEN]; - char fault[PSVC_MAX_STR_LEN]; - int ps_okay = 1; /* Keep track of the PDB PS OK Bit */ - int instance; - int retry; - - /* Logical state id */ - snprintf(ps_logical_state, sizeof (ps_logical_state), - "%s_LOGICAL_STATE", id); - - /* - * ac_power_check updates the Power Supply state with "NO AC POWER" if - * the power cord is out OR PSVC_OK if the power cord is in. - */ - status = ac_power_check(hdlp, id, ps_logical_state); - if (status == PSVC_FAILURE) - return (status); - - /* - * After running ac_power_check we now need to get the current state - * of the PS. If the power supply state is "NO AC POWER" then we do - * not need to check for failures and we return. - */ - status = psvc_get_attr(hdlp, id, PSVC_STATE_ATTR, state); - if (status != PSVC_SUCCESS) - return (status); - - if (strcmp(state, "NO AC POWER") == 0) - return (status); - - status = psvc_get_attr(hdlp, id, PSVC_PREV_STATE_ATTR, previous_state); - if (status != PSVC_SUCCESS) - return (status); - - snprintf(ps_ok_sensor, sizeof (ps_ok_sensor), "%s_OK_SENSOR", id); - retry = 0; - do { - if (retry) - (void) sleep(retry_sleep_ps_status); - /* Handle the PDB P/S OK Bit */ - status = psvc_get_attr(hdlp, ps_ok_sensor, - PSVC_SWITCH_STATE_ATTR, state); - if (status != PSVC_SUCCESS) - return (status); - retry++; - } while ((retry < n_retry_ps_status) && - (strcmp(previous_state, state))); - - - /* - * If there is a change of state (current state differs from - * previous state, then assign the error values. - */ - if (strcmp(previous_state, state) != 0) { - if (strcmp(state, PSVC_SWITCH_OFF) == 0) { - strlcpy(state, PSVC_ERROR, sizeof (state)); - strlcpy(fault, "DEVICE_FAIL", sizeof (fault)); - fault_on = 1; - syslog(LOG_ERR, gettext( - "Device %s: Failure Detected -- %s " - "shutdown!"), id, id); - ps_okay = 0; - } else { - strlcpy(state, PSVC_OK, sizeof (state)); - strlcpy(fault, PSVC_NO_FAULT, sizeof (fault)); - } - - status = psvc_set_attr(hdlp, id, PSVC_STATE_ATTR, state); - if (status != PSVC_SUCCESS) - return (status); - - status = psvc_set_attr(hdlp, id, PSVC_FAULTID_ATTR, fault); - if (status != PSVC_SUCCESS) - return (status); - } - - status = psvc_get_attr(hdlp, id, PSVC_INSTANCE_ATTR, &instance); - if (status != PSVC_SUCCESS) - return (status); - - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_MATCHES_ATTR, &sensor_count, - PSVC_DEV_FAULT_SENSOR); - if (status != PSVC_SUCCESS) { - return (status); - } - - /* Handle the power supply fail bits. */ - for (i = 0; i < sensor_count; i++) { - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_ID_ATTR, - &sensor_id, PSVC_DEV_FAULT_SENSOR, i); - if (status != PSVC_SUCCESS) - return (status); - - retry = 0; - do { - if (retry) - (void) sleep(retry_sleep_ps_status); - status = psvc_get_attr(hdlp, sensor_id, - PSVC_SWITCH_STATE_ATTR, state); - if (status != PSVC_SUCCESS) - return (status); - retry++; - } while ((retry < n_retry_ps_status) && - (strcmp(state, PSVC_SWITCH_ON) == 0)); - - if (strcmp(state, PSVC_SWITCH_ON) == 0) { - if (ps_prev_id[instance][i] == NULL) - ps_prev_id[instance][i] = sensor_id; - - if (ps_prev_failed[instance][i] != 1) - ps_prev_failed[instance][i] = 1; - fault_on = 1; - /* - * The first sensor in the list is: - * PSx_DEV_FAULT_SENSOR. If this is on, we do not - * want to merely report that it's on, but rather - * report that there was a fault detected, thus - * improving diagnosability. - */ - if (i == 0) { - /* - * Don't notify if the PDB PS OKAY Bit is - * "0" - */ - if (ps_okay) - syslog(LOG_ERR, gettext( - "Device %s: Fault Detected"), - id); - } else { - syslog(LOG_ERR, gettext("Warning %s: %s is ON"), - id, sensor_id); - } - } - } - - status = psvc_get_attr(hdlp, ps_logical_state, - PSVC_STATE_ATTR, state); - if (status != PSVC_SUCCESS) - return (status); - - status = psvc_get_attr(hdlp, ps_logical_state, - PSVC_PREV_STATE_ATTR, previous_state); - if (status != PSVC_SUCCESS) - return (status); - - /* - * If we encountered a fault of any kind (something before - * has set 'fault_on' to '1') then we want to send the reset - * signal to the power supply's PCF8574 and also set - * 'ps_logical_state' to "ERROR" so that the FSP General Fault - * LED will light. - */ - if (fault_on) { - if (ps_okay) { - status = psvc_set_attr(hdlp, id, PSVC_FAULTID_ATTR, - PSVC_GEN_FAULT); - if (status != PSVC_SUCCESS) - return (status); - } - status = psvc_set_attr(hdlp, ps_logical_state, - PSVC_STATE_ATTR, PSVC_ERROR); - if (status != PSVC_SUCCESS) - return (status); - /* - * "id" is in the form of "PSx", We need to make it - * PSx_RESET. - */ - snprintf(ps_reset, sizeof (ps_reset), "%s_RESET", id); - status = send_pcf8574_reset(hdlp, ps_reset); - return (status); - } - - /* - * There was no fault encountered so we want to - * set 'ps_logical_state' to "OK" - */ - if (strcmp(state, PSVC_OK) != 0) { - for (i = 0; i < 3; i++) { - char *sensor = ps_prev_id[instance][i]; - int *prev_failed = &ps_prev_failed[instance][i]; - if (sensor == NULL) - continue; - if (*prev_failed == 0) - continue; - *prev_failed = 0; - if (i == 0) { - /* - * Don't notifiy if we have a power supply - * failure (PDB PS OKAY == 0 - */ - if (ps_okay) - syslog(LOG_ERR, gettext( - "Notice %s: Fault Cleared"), - id); - } else { - syslog(LOG_ERR, gettext("Notice %s: %s is OFF"), - id, sensor); - } - } - - status = psvc_set_attr(hdlp, ps_logical_state, - PSVC_STATE_ATTR, PSVC_OK); - if (status != PSVC_SUCCESS) - return (status); - syslog(LOG_ERR, gettext("Device %s Okay"), id); - } - - return (PSVC_SUCCESS); -} - -/* - * This routine takes in a handle pointer and a Power Supply id. It then gets - * the switch state for the PSx_AC_IN_SENSOR. If the switch is OFF the cord is - * unplugged and we return a true (1). If the switch is ON then the cord is - * plugged in and we return a false (0). If the get_attr call fails we return - * PSVC_FAILURE (-1). - */ -static int -ac_unplugged(psvc_opaque_t hdlp, char *id) -{ - int32_t status = PSVC_SUCCESS; - char ac_sensor_id[PICL_PROPNAMELEN_MAX]; - char ac_switch_state[PSVC_MAX_STR_LEN]; - - snprintf(ac_sensor_id, sizeof (ac_sensor_id), "%s_AC_IN_SENSOR", id); - - status = psvc_get_attr(hdlp, ac_sensor_id, PSVC_SWITCH_STATE_ATTR, - ac_switch_state); - if (status == PSVC_FAILURE) { - return (status); - } - - if (strcmp(ac_switch_state, PSVC_SWITCH_OFF) == 0) { - return (1); - } else { - return (0); - } -} - -/* - * This routine expects a handle pointer, a Power Supply ID, and a PS logical - * state switch ID. It check to see if the power cord has been removed from or - * inserted to the power supply. It then updates the PS state accordingly. - */ -static int -ac_power_check(psvc_opaque_t hdlp, char *id, char *ps_logical_state) -{ - int32_t status = PSVC_SUCCESS; - int32_t sensor_count; - char *sensor_id; - char state[PSVC_MAX_STR_LEN]; - int unplugged, i; - - status = psvc_get_attr(hdlp, id, PSVC_STATE_ATTR, state); - if (status != PSVC_SUCCESS) - return (status); - - /* - * Check for AC Power Cord. ac_unplugged will return true if the PS is - * unplugged, a false is the PS is plugged in, and PSVC_FAILURE if the - * call to get the state fails. - */ - unplugged = ac_unplugged(hdlp, id); - if (status == PSVC_FAILURE) { - return (status); - } - - /* - * If power cord is not in, then we set the fault and error - * states to "". - * If power cord is in, then we check the devices. - */ - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_MATCHES_ATTR, &sensor_count, - PSVC_DEV_FAULT_SENSOR); - if (status != PSVC_SUCCESS) { - return (status); - } - - if ((unplugged) && (strcmp(state, "NO AC POWER") != 0)) { - /* set id's state to "NO AC POWER" */ - status = psvc_set_attr(hdlp, id, PSVC_STATE_ATTR, - "NO AC POWER"); - if (status != PSVC_SUCCESS) - return (status); - /* - * Set this state so that the FSP Fault LED lights - * when there is no AC Power to the power supply. - */ - status = psvc_set_attr(hdlp, ps_logical_state, PSVC_STATE_ATTR, - PSVC_ERROR); - if (status != PSVC_SUCCESS) - return (status); - - status = psvc_set_attr(hdlp, id, PSVC_FAULTID_ATTR, - "NO AC POWER"); - if (status != PSVC_SUCCESS) - return (status); - - syslog(LOG_ERR, gettext("Device %s AC UNAVAILABLE"), id); - - /* Set fault sensor states to "" */ - for (i = 0; i < sensor_count; ++i) { - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_ID_ATTR, - &sensor_id, PSVC_DEV_FAULT_SENSOR, i); - if (status != PSVC_SUCCESS) - return (status); - - status = psvc_set_attr(hdlp, sensor_id, - PSVC_FAULTID_ATTR, ""); - if (status != PSVC_SUCCESS) - return (status); - } - } - - /* Power cord is plugged in */ - if ((!unplugged) && (strcmp(state, "NO AC POWER") == 0)) { - /* Default the state to "OK" */ - status = psvc_set_attr(hdlp, id, PSVC_STATE_ATTR, - PSVC_OK); - if (status != PSVC_SUCCESS) - return (status); - /* Default the PS_LOGICAL_STATE to "OK" */ - status = psvc_set_attr(hdlp, ps_logical_state, PSVC_STATE_ATTR, - PSVC_OK); - if (status != PSVC_SUCCESS) - return (status); - /* Display message */ - syslog(LOG_ERR, gettext("Device %s AC AVAILABLE"), id); - } - - return (status); -} - -int32_t -psvc_init_ps_presence(psvc_opaque_t hdlp, char *id) -{ - int err; - int instance; - boolean_t presence; - - err = psvc_get_attr(hdlp, id, PSVC_INSTANCE_ATTR, &instance); - err |= psvc_get_attr(hdlp, id, PSVC_PRESENCE_ATTR, &presence); - ps_prev_present[instance] = ps_present[instance] = presence; - return (err); -} - -int32_t -psvc_ps_monitor_policy_0(psvc_opaque_t hdlp, char *id) -{ - int err; - int instance; - static int failed_last_time[2] = {0, 0}; - int retry; - - err = psvc_get_attr(hdlp, id, PSVC_INSTANCE_ATTR, &instance); - if (err != PSVC_SUCCESS) - return (err); - - /* copy current presence to previous presence */ - ps_prev_present[instance] = ps_present[instance]; - - retry = 0; - do { - if (retry) - (void) sleep(retry_sleep_pshp); - /* Get new presence */ - err = psvc_get_attr(hdlp, id, PSVC_PRESENCE_ATTR, - &ps_present[instance]); - if (err != PSVC_SUCCESS) - goto out; - retry++; - } while ((retry < n_retry_pshp) && - (ps_present[instance] != ps_prev_present[instance])); - - /* Sustained Hotplug detected */ - if (ps_present[instance] != ps_prev_present[instance]) { - err = handle_ps_hotplug(hdlp, id, ps_present[instance]); - return (err); - } - - /* If our power supply is not present, we're done */ - if (!ps_present[instance]) - return (PSVC_SUCCESS); - - err = check_i2c_access(hdlp, id); - if (err != PSVC_SUCCESS) { - /* Quickie hotplug */ - if (ps_present[instance] == PSVC_PRESENT && - ps_prev_present[instance] == PSVC_PRESENT) { - syslog(LOG_ERR, "Device %s removed", id); - /* Reset prev_failed information */ - ps_reset_prev_failed(instance); - ps_prev_present[instance] = 0; - handle_ps_hotplug(hdlp, id, ps_present[instance]); - /* We ignore the error on a quickie hotplug */ - return (PSVC_SUCCESS); - } - /* There was an actual i2c access error */ - goto out; - } - - err = check_ps_state(hdlp, id); - if (err != PSVC_SUCCESS) - goto out; - - failed_last_time[instance] = 0; - return (err); - -out: - if (! failed_last_time[instance]) { - /* - * We ignore the error condition the first time thru - * because the PS could have been removed after (or - * during) our call to check_ps_hotplug(). - * - * If the problem is still there the next time, then - * we'll raise a flag. - * - * The instance determines which power supply the policy - * errored on. For instance PS0 might have failed and then - * PS1 might have failed, but we'll display a warning - * even though there might not be anything actually wrong. - * The instance keeps track of which failure occurred so - * we warn on the corresponding occurrence of errors. - */ - failed_last_time[instance] = 1; - return (PSVC_SUCCESS); - } - return (err); -} - -static int -light_disk_fault_leds(psvc_opaque_t hdlp, char *id, boolean_t disk_presence) -{ - int err; - int bit_nums[MAX_DISKS] = {6, 7}; - uint8_t led_masks[MAX_DISKS] = {0x40, 0x80}; - int instance; - int bit_value; - char state[PSVC_MAX_STR_LEN]; - uint8_t byte; - - if (disk_presence != PSVC_PRESENT) - return (PSVC_SUCCESS); - - err = psvc_get_attr(hdlp, id, PSVC_INSTANCE_ATTR, &instance); - if (err != PSVC_SUCCESS) - return (err); - - err = psvc_get_attr(hdlp, "DISK_PORT", PSVC_GPIO_VALUE_ATTR, - &byte); - if (err != PSVC_SUCCESS) - return (err); - - err = psvc_get_attr(hdlp, id, PSVC_STATE_ATTR, state); - if (err != PSVC_SUCCESS) - return (err); - if (strcmp(state, PSVC_OK) == 0 || strcmp(state, "") == 0) { /* OK */ - if (byte & led_masks[instance]) { /* Led is OFF */ - return (err); /* Done. */ - } else { /* Led is ON, Turn if OFF */ - bit_value = 1; /* Active Low */ - err = pcf8574_write_bit(hdlp, "DISK_PORT", - bit_nums[instance], bit_value, - DISKBP_MUST_BE_1); - if (err != PSVC_SUCCESS) - return (err); - } - } else { /* Disk is NOT OK */ - if (byte & led_masks[instance]) { /* Led is OFF, Turn it ON */ - bit_value = 0; /* Active Low */ - err = pcf8574_write_bit(hdlp, "DISK_PORT", - bit_nums[instance], bit_value, - DISKBP_MUST_BE_1); - if (err != PSVC_SUCCESS) - return (err); - } else { - return (err); /* Done. */ - } - } - return (err); -} - -int -verify_disk_wwn(char *wwn) -{ - HBA_PORTATTRIBUTES hbaPortAttrs, discPortAttrs; - HBA_HANDLE handle; - HBA_STATUS status; - HBA_ADAPTERATTRIBUTES hbaAttrs; - HBA_UINT32 numberOfAdapters, hbaCount, hbaPort, discPort; - char adaptername[256]; - char vwwn[WWN_SIZE * 2]; - char OSDeviceName[PATH_MAX + 1]; - int count, linksize; - - /* Load common lib */ - status = HBA_LoadLibrary(); - if (status != HBA_STATUS_OK) { - (void) HBA_FreeLibrary(); - return (HBA_STATUS_ERROR); - } - - /* - * Since devfs can store multiple instances - * of a target the validity of the WWN of a disk is - * verified with an actual probe of internal disks - */ - - /* Cycle through FC-AL Adapters and search for WWN */ - numberOfAdapters = HBA_GetNumberOfAdapters(); - for (hbaCount = 0; hbaCount < numberOfAdapters; hbaCount++) { - if ((status = HBA_GetAdapterName(hbaCount, adaptername)) != - HBA_STATUS_OK) - continue; - - handle = HBA_OpenAdapter(adaptername); - if (handle == 0) - continue; - - /* Get Adapter Attributes */ - if ((status = HBA_GetAdapterAttributes(handle, - &hbaAttrs)) != HBA_STATUS_OK) { - HBA_CloseAdapter(handle); - continue; - } - - /* Get Adapter's Port Attributes */ - for (hbaPort = 0; - hbaPort < hbaAttrs.NumberOfPorts; hbaPort++) { - if ((status = HBA_GetAdapterPortAttributes(handle, - hbaPort, &hbaPortAttrs)) != HBA_STATUS_OK) - continue; - - /* - * Verify whether this is onboard controller. - * HBAAPI provides path of symbol link to - * to the qlc node therefore readlink() is - * needed to obtain hard link - */ - linksize = readlink(hbaPortAttrs.OSDeviceName, - OSDeviceName, PATH_MAX); - - /* - * If readlink does not return size of onboard - * controller than don't bother checking device - */ - if ((linksize + 1) != sizeof (ONBOARD_CONTR)) - continue; - - OSDeviceName[linksize] = '\0'; - if (strcmp(OSDeviceName, ONBOARD_CONTR) != 0) - continue; - - /* Get Discovered Port Attributes */ - for (discPort = 0; - discPort < hbaPortAttrs.NumberofDiscoveredPorts; - discPort++) { - status = HBA_GetDiscoveredPortAttributes( - handle, hbaPort, discPort, - &discPortAttrs); - if (status != HBA_STATUS_OK) - continue; - - /* Get target info */ - for (count = 0; count < WWN_SIZE; count++) - (void) sprintf(&vwwn[count * 2], - "%2.2x", - discPortAttrs.NodeWWN.wwn[count]); - - if (strcmp(wwn, vwwn) == 0) { - HBA_CloseAdapter(handle); - (void) HBA_FreeLibrary(); - return (HBA_STATUS_OK); - } - - } - } - HBA_CloseAdapter(handle); - } - (void) HBA_FreeLibrary(); - return (HBA_STATUS_ERROR_ILLEGAL_WWN); -} - -static int -light_disk_ok2remove_leds(psvc_opaque_t hdlp, boolean_t *disk_present) -{ - di_node_t node; - di_node_t root_node; - di_minor_t min_node; - int *prop; - int n; - int target; - int rv; - int disk_online = 0; - static int prev_online[MAX_DISKS] = {-1, -1}; - int bit_nums[MAX_DISKS] = {4, 5}; - int bit_val; - int count; - char *dev_path; - char wwn[WWN_SIZE * 2]; - uchar_t *prop_wwn; - - root_node = di_init("/", DINFOCPYALL); - if (root_node == DI_NODE_NIL) - return (PSVC_FAILURE); - - for (node = di_drv_first_node(DISK_DRV, root_node); - node != DI_NODE_NIL; - node = di_drv_next_node(node)) { - n = di_prop_lookup_ints(DDI_DEV_T_ANY, node, "target", &prop); - if (n == -1) - continue; - target = *prop; - if (target < 0 || target > 1) - continue; - - if (! disk_present[target]) - continue; - - dev_path = di_devfs_path(node); - if (memcmp(dev_path, QLC_NODE, (sizeof (QLC_NODE) - 1)) != 0) { - /* - * This isn't our FC-AL controller, so this - * must be an external disk on Loop B. Skip it. - */ - di_devfs_path_free(dev_path); - continue; - } - di_devfs_path_free(dev_path); - - /* - * Verify if disk is valid by checking WWN - * because devfs retains stale data. - */ - n = di_prop_lookup_bytes(DDI_DEV_T_ANY, node, - "node-wwn", &prop_wwn); - if (n == -1) - continue; - - for (count = 0; count < WWN_SIZE; count++) - (void) sprintf(&wwn[count * 2], "%2.2x", - prop_wwn[count]); - - n = verify_disk_wwn(wwn); - if (n == HBA_STATUS_ERROR_ILLEGAL_WWN) - continue; - - min_node = di_minor_next(node, DI_MINOR_NIL); - disk_online = (min_node != DI_MINOR_NIL); - if ((disk_online == 0) && (prev_online[target] == 1)) { - /* Light Led */ - bit_val = 0; - rv = pcf8574_write_bit(hdlp, "DISK_PORT", - bit_nums[target], bit_val, DISKBP_MUST_BE_1); - if (rv != PSVC_SUCCESS) - goto done; - } else if ((prev_online[target] == 0) && (disk_online == 1)) { - /* Unlight Led */ - bit_val = 1; - rv = pcf8574_write_bit(hdlp, "DISK_PORT", - bit_nums[target], bit_val, DISKBP_MUST_BE_1); - if (rv != PSVC_SUCCESS) - goto done; - } - if (disk_online != prev_online[target]) - prev_online[target] = disk_online; - } -done: - di_fini(root_node); - return (rv); -} - -static int -check_disk_fault(psvc_opaque_t hdlp, char *id, boolean_t disk_presence) -{ - int32_t status = PSVC_SUCCESS; - int32_t fault_on = 0; - char *sensor_id; - char disk_state[PSVC_MAX_STR_LEN]; - char state[PSVC_MAX_STR_LEN]; - char fault[PSVC_MAX_STR_LEN]; - boolean_t change_of_state = 0; - - if (disk_presence != PSVC_PRESENT) - return (PSVC_SUCCESS); - - status = psvc_get_attr(hdlp, id, PSVC_STATE_ATTR, disk_state); - if (status != PSVC_SUCCESS) - return (status); - - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_ID_ATTR, - &sensor_id, PSVC_DEV_FAULT_SENSOR, 0); - if (status != PSVC_SUCCESS) - return (status); - - status = psvc_get_attr(hdlp, sensor_id, PSVC_SWITCH_STATE_ATTR, state); - if (status != PSVC_SUCCESS) - return (status); - - /* Fault detected */ - if (strcmp(state, PSVC_SWITCH_ON) == 0) { - strlcpy(state, PSVC_ERROR, sizeof (state)); - strlcpy(fault, PSVC_GEN_FAULT, sizeof (fault)); - fault_on = 1; - } else { /* No fault detected */ - if (strcmp(disk_state, PSVC_OK) != 0) - change_of_state = 1; - strlcpy(state, PSVC_OK, sizeof (state)); - strlcpy(fault, PSVC_NO_FAULT, sizeof (fault)); - } - - status = psvc_set_attr(hdlp, id, PSVC_STATE_ATTR, state); - if (status != PSVC_SUCCESS) - return (status); - - status = psvc_set_attr(hdlp, id, PSVC_FAULTID_ATTR, fault); - if (status != PSVC_SUCCESS) - return (status); - - if (fault_on) { - syslog(LOG_ERR, gettext("Fault detected: %s"), id); - - } else { - if (change_of_state) - syslog(LOG_ERR, gettext("Notice: %s okay"), id); - } - return (PSVC_SUCCESS); -} - -static int -check_disk_hotplug(psvc_opaque_t hdlp, char *id, boolean_t *disk_presence, - int disk_instance) -{ - boolean_t presence; - boolean_t previous_presence; - int32_t status = PSVC_SUCCESS; - char label[PSVC_MAX_STR_LEN]; - uint8_t disk_leds[MAX_DISKS][2] = {{4, 6}, {5, 7}}; - int retry; - - status = psvc_get_attr(hdlp, id, PSVC_PREV_PRESENCE_ATTR, - &previous_presence); - if (status != PSVC_SUCCESS) - return (status); - - retry = 0; - do { - if (retry) - (void) sleep(retry_sleep_diskhp); - status = psvc_get_attr(hdlp, id, PSVC_PRESENCE_ATTR, - &presence); - if (status != PSVC_SUCCESS) - return (status); - retry++; - } while ((retry < n_retry_diskhp) && - (presence != previous_presence)); - - *disk_presence = presence; - - if (presence != previous_presence) { - char parent_path[PICL_PROPNAMELEN_MAX]; - picl_nodehdl_t child_node; - - status = psvc_get_attr(hdlp, id, PSVC_LABEL_ATTR, label); - if (status != PSVC_SUCCESS) - return (status); - - /* return parent path and node for an object */ - psvcplugin_lookup(id, parent_path, &child_node); - - if (presence == PSVC_PRESENT) { - picl_nodehdl_t parent_node; - char state[PSVC_MAX_STR_LEN]; - char fault[PSVC_MAX_STR_LEN]; - - syslog(LOG_ERR, gettext("Device %s inserted"), label); - strlcpy(state, PSVC_OK, sizeof (state)); - status = psvc_set_attr(hdlp, id, PSVC_STATE_ATTR, - state); - if (status != PSVC_SUCCESS) - return (status); - - strlcpy(fault, PSVC_NO_FAULT, sizeof (fault)); - status = psvc_set_attr(hdlp, id, PSVC_FAULTID_ATTR, - fault); - if (status != PSVC_SUCCESS) { - return (status); - } - - status = ptree_get_node_by_path(parent_path, - &parent_node); - if (status != PICL_SUCCESS) - return (PSVC_FAILURE); - status = ptree_add_node(parent_node, child_node); - if (status != PICL_SUCCESS) - return (PSVC_FAILURE); - } else { - /* - * Disk Removed so we need to turn off these LEDs: - * DISKx_FLT_LED - * DISKx_REMOVE_LED - */ - int i; - int bit_val = 1; /* Active Low */ - for (i = 0; i < 2; i++) { - status = pcf8574_write_bit(hdlp, "DISK_PORT", - disk_leds[disk_instance][i], bit_val, - DISKBP_MUST_BE_1); - if (status != PSVC_SUCCESS) - syslog(LOG_ERR, "Failed in turning off" - " %d's LEDs", id); - } - syslog(LOG_ERR, gettext("Device %s removed"), label); - ptree_delete_node(child_node); - } - } - - status = psvc_set_attr(hdlp, id, PSVC_PREV_PRESENCE_ATTR, &presence); - if (status != PSVC_SUCCESS) - return (status); - - return (status); -} - -int32_t -psvc_disk_monitor_policy_0(psvc_opaque_t hdlp, char *id) -{ - int rv, err, i; - char *disks[MAX_DISKS] = {"DISK0", "DISK1"}; - int saved_errno = 0; - boolean_t disk_present[MAX_DISKS] = {0, 0}; - - for (i = 0; i < MAX_DISKS; i++) { - err = check_disk_hotplug(hdlp, disks[i], &disk_present[i], i); - if (err) saved_errno = errno; - rv = err; - - err = check_disk_fault(hdlp, disks[i], disk_present[i]); - if (err) saved_errno = errno; - rv |= err; - - err |= light_disk_fault_leds(hdlp, disks[i], disk_present[i]); - if (err) saved_errno = errno; - rv |= err; - } - - err = light_disk_ok2remove_leds(hdlp, disk_present); - if (err) saved_errno = errno; - rv |= err; - - errno = saved_errno; - return (rv); -} - -/* - * Read in temperature thresholds from FRU Prom and update the - * default values. - */ - -#define START_OFFSET 0x1800 /* Last 2K of SEEPROM */ -#define NUM_SEG_OFFSET 0x1805 /* Number of segments */ -#define SEG_TABLE_OFFSET 0x1806 /* Segment description tables */ - -static int32_t -read_sc_segment(psvc_opaque_t hdlp, char *id, char *fru_id, int offset) -{ - static int thresh_names[] = { - PSVC_HW_LO_SHUT_ATTR, - PSVC_LO_SHUT_ATTR, - PSVC_LO_WARN_ATTR, - PSVC_NOT_USED, /* LOW MODE */ - PSVC_OPTIMAL_TEMP_ATTR, - PSVC_HI_WARN_ATTR, - PSVC_HI_SHUT_ATTR, - PSVC_HW_HI_SHUT_ATTR - }; - int8_t amb_temp_array[8]; - int i; - fru_info_t fru_info; - int err; - - fru_info.buf_start = offset + 8; - fru_info.buf = amb_temp_array; - fru_info.read_size = 8; - - err = psvc_get_attr(hdlp, fru_id, PSVC_FRU_INFO_ATTR, &fru_info); - if (err != PSVC_SUCCESS) - return (err); - - for (i = 0; i < 8; i++) { - int32_t temp = amb_temp_array[i]; - if (thresh_names[i] == PSVC_NOT_USED) - continue; - err = psvc_set_attr(hdlp, id, thresh_names[i], &temp); - if (err != PSVC_SUCCESS) - return (err); - } - return (PSVC_SUCCESS); -} - -int32_t -update_disk_bp_temp_thresholds(psvc_opaque_t hdlp, char *id) -{ - - char *fru; - fru_info_t fru_info; - int16_t seg_offset; - int8_t byte; - int8_t seg_count; - char seg_name[2]; - int current_offset, i, err; - - err = psvc_get_attr(hdlp, id, PSVC_ASSOC_ID_ATTR, &fru, PSVC_FRU, 0); - if (err != PSVC_SUCCESS) - return (err); - - /* Sanity Check */ - fru_info.buf_start = START_OFFSET; - fru_info.buf = &byte; - fru_info.read_size = 1; - - err = psvc_get_attr(hdlp, fru, PSVC_FRU_INFO_ATTR, &fru_info); - if (err != PSVC_SUCCESS) - return (err); - if (*fru_info.buf != 8) { - syslog(LOG_ERR, "Notice: FRU Prom %s not programmed", fru); - } - /* Should do CRC Check on fru */ - - /* Get Segment Count */ - fru_info.buf_start = NUM_SEG_OFFSET; - fru_info.buf = &seg_count; - fru_info.read_size = 1; - - err = psvc_get_attr(hdlp, fru, PSVC_FRU_INFO_ATTR, &fru_info); - if (err != PSVC_SUCCESS) - return (err); - - current_offset = SEG_TABLE_OFFSET; - for (i = 0; i < seg_count; i++) { - fru_info.buf_start = current_offset; - fru_info.buf = seg_name; - fru_info.read_size = 2; - err = psvc_get_attr(hdlp, fru, PSVC_FRU_INFO_ATTR, &fru_info); - if (err != PSVC_SUCCESS) - return (err); - - if (memcmp(seg_name, "SC", 2) == 0) { - current_offset += 6; /* Skip over description */ - fru_info.buf_start = current_offset; - fru_info.buf = (char *)&seg_offset; - fru_info.read_size = 2; - psvc_get_attr(hdlp, fru, PSVC_FRU_INFO_ATTR, - &fru_info); - return (read_sc_segment(hdlp, id, fru, seg_offset)); - } - current_offset += 10; - } - - return (PSVC_SUCCESS); -} diff --git a/usr/src/cmd/picl/plugins/sun4u/chicago/Makefile b/usr/src/cmd/picl/plugins/sun4u/chicago/Makefile deleted file mode 100644 index 00a51d3095..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chicago/Makefile +++ /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, 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" -# -# cmd/picl/plugins/sun4u/chicago/Makefile -# - -SUBDIRS= frudata frutree envd - -MSGSUBDIRS= envd - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -.KEEP_STATE: - -all install clean clobber: $(SUBDIRS) - -_msg: $(MSGSUBDIRS) - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/chicago/envd/Makefile b/usr/src/cmd/picl/plugins/sun4u/chicago/envd/Makefile deleted file mode 100644 index c1e0eafd13..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chicago/envd/Makefile +++ /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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# cmd/picl/plugins/sun4u/chicago/envd/Makefile -# -include $(SRC)/Makefile.psm - -LIBRARY= libpiclenvd.a -VERS= .1 - -OBJECTS= piclenvd.o piclenvsetup.o - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,A70 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -CPPFLAGS += -D_POSIX_PTHREAD_SEMANTICS -CPPFLAGS += -I$(SRC)/uts/sun4u/ -I$(SRC)/uts/common/ -CPPFLAGS += -I$(SRC)/uts/sun4u/chicago -CPPFLAGS += -I$(SRC)/cmd/picl/plugins/lib/picld_pluginutil - -SRCS= $(OBJECTS:%.o=%.c) - -LIBS = $(DYNLIB) - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONF= envmodel.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 -INFOS= envmodel.info - - -DYNFLAGS += -R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins -LDLIBS += -L$(SRC)/lib/libpicltree/$(MACH) -LDLIBS += -L$(SRC)/cmd/picl/plugins/common/devtree -LDLIBS += -L$(SRC)/cmd/picl/plugins/lib/picld_pluginutil/$(MACH) -LDLIBS += -L$(ROOT)/usr/lib/picl/plugins -lpicldevtree -lpicltree -LDLIBS += -lpicld_pluginutil -LDLIBS += -ldevinfo -lc - -.KEEP_STATE: - -SUBDIRS= - -POFILE = piclenvd_chicago.po -POFILES = $(SRCS:%.c=%.po) - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -all: $(LIBS) $(CONF) $(LIBLINKS) - -install: $(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) $(ROOTCONF) - -$(CONF): $(INFOS) - $(RM) $@ - $(CPP) envmodel.info > $@ - - -$(POFILE): $(POFILES) - $(CAT) $(POFILES) > $(POFILE) - -_msg: $(MSGDOMAIN) $(POFILE) - $(RM) $(MSGDOMAIN)/$(POFILE) - $(CP) $(POFILE) $(MSGDOMAIN)/$(POFILE) - -$(MSGDOMAIN): - $(INS.dir) - - -$(LIBLINKS): FRC - $(RM) $@; $(SYMLINK) $(DYNLIB) $@ - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/chicago/envd/envd.h b/usr/src/cmd/picl/plugins/sun4u/chicago/envd/envd.h deleted file mode 100644 index d194ccd3c9..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chicago/envd/envd.h +++ /dev/null @@ -1,614 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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 _ENVD_H -#define _ENVD_H - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Chicago Platform Details - */ -#define MAX_SENSORS 9 -#define MAX_FANS 6 - -/* - * Fan names and ids - */ -#define ENV_SYSTEM_FAN0 "system-fan0" -#define ENV_SYSTEM_FAN1 "system-fan1" -#define ENV_SYSTEM_FAN2 "system-fan2" -#define ENV_SYSTEM_FAN3 "system-fan3" -#define ENV_SYSTEM_FAN4 "system-fan4" - -#define SYSTEM_FAN0_ID 0 -#define SYSTEM_FAN1_ID 1 -#define SYSTEM_FAN2_ID 2 -#define SYSTEM_FAN3_ID 3 -#define SYSTEM_FAN4_ID 4 - -#define CPU0_FAN_ID SYSTEM_FAN0_ID -#define CPU1_FAN_ID SYSTEM_FAN1_ID - -/* - * Sensor names and ids - */ -#define SENSOR_CPU0 "cpu0" -#define SENSOR_CPU1 "cpu1" -#define SENSOR_MB "MotherBoard" -#define SENSOR_ADT7462 "ADT7462" -#define SENSOR_LM95221 "LM95221" -#define SENSOR_FIRE "FireASIC" -#define SENSOR_LSI1064 "LSI1064" -#define SENSOR_FRONT_PANEL "Front_panel" -#define SENSOR_PSU "PSU" - -#define CPU0_SENSOR_ID 0 -#define CPU1_SENSOR_ID 1 -#define ADT7462_SENSOR_ID 2 -#define MB_SENSOR_ID 3 -#define LM95221_SENSOR_ID 4 -#define FIRE_SENSOR_ID 5 -#define LSI1064_SENSOR_ID 6 -#define FRONT_PANEL_SENSOR_ID 7 -#define PSU_SENSOR_ID 8 - -/* - * Hard disk sensor names and ids - */ -#define ENV_DISK0 "hard-disk0" -#define ENV_DISK1 "hard-disk1" -#define ENV_DISK2 "hard-disk2" -#define ENV_DISK3 "hard-disk3" - -#define DISK0_ID 0 -#define DISK1_ID 1 -#define DISK2_ID 2 -#define DISK3_ID 3 - -/* - * Thresholds and other constants - */ -#define DISK_SCAN_INTERVAL 10 -#define DISK_HIGH_WARN_TEMPERATURE 55 -#define DISK_LOW_WARN_TEMPERATURE 5 -#define DISK_HIGH_SHUTDOWN_TEMPERATURE 60 -#define DISK_LOW_SHUTDOWN_TEMPERATURE 0 -#define DISK_INVALID_TEMP 0xFFFF -#define LSI1064_VENDOR_ID 0x1000 -#define LSI1064_DEVICE_ID 0x50 -#define FAN_SCAN_INTERVAL 10 -#define SENSOR_SCAN_INTERVAL 2 -#define SENSOR_WARNING_DURATION 4 -#define SENSOR_WARNING_INTERVAL 30 -#define DISK_WARNING_INTERVAL 30 -#define DISK_WARNING_DURATION 20 -#define SENSOR_SHUTDOWN_INTERVAL 60 -#define DISK_SHUTDOWN_INTERVAL 30 -#define ENV_CONF_FILE "envmodel.conf" -#define TUNABLE_CONF_FILE "piclenvd.conf" -#define PM_DEVICE "/dev/pm" -#define SHUTDOWN_CMD "/usr/sbin/shutdown -y -g 60 -i 5" -#define PICL_PLUGINS_NODE "plugins" -#define PICL_ENVIRONMENTAL_NODE "environmental" - -#define MAX_RETRIES_FOR_FAN_FAULT 10 -#define MAX_FAN_RETRIES 14 -#define MAX_SENSOR_RETRIES 14 - -#define TACH_TO_RPM(tach) (((tach) == 0) ? 0 : (90000 * 60)/(tach)) - -/* - * constants used for retrieving SMART data - */ -#define DEFAULT_SCSI_TIMEOUT 60 -#define IEC_PAGE 0x1C -#define HDA_TEMP 0xc2 -#define DRIVE_TEMP 0xe7 -#define GET_SMART_INFO 0x31 -#define SMART_FIELDS 30 -#define REPORT_ON_REQUEST 0x6 -#define PAGE_FMT 4 -#define IEC_PAGE_SIZE 12 -#define SMART_FLAG_SIZE 2 -#define ATTRIBUTE_DATA_SIZE 8 -#define VENDOR_ATTR_SIZE 131 -#define SMART_RESERVED_SIZE 10 -#define COLLECTION_DATA_SIZE 6 - -#define DISK0_PHYSPATH \ - "/pci@1e,600000/pci@0/pci@9/pci@0/scsi@1/sd@0,0" - -#define DISK1_PHYSPATH \ - "/pci@1e,600000/pci@0/pci@9/pci@0/scsi@1/sd@1,0" - -#define DISK2_PHYSPATH \ - "/pci@1e,600000/pci@0/pci@9/pci@0/scsi@1/sd@2,0" - -#define DISK3_PHYSPATH \ - "/pci@1e,600000/pci@0/pci@9/pci@0/scsi@1/sd@3,0" - -#define ENV_DISK0_DEVFS \ -"/devices/pci@1e,600000/pci@0/pci@9/pci@0/scsi@1/sd@0,0:a,raw" - -#define ENV_DISK1_DEVFS \ -"/devices/pci@1e,600000/pci@0/pci@9/pci@0/scsi@1/sd@1,0:a,raw" - -#define ENV_DISK2_DEVFS \ -"/devices/pci@1e,600000/pci@0/pci@9/pci@0/scsi@1/sd@2,0:a,raw" - -#define ENV_DISK3_DEVFS \ -"/devices/pci@1e,600000/pci@0/pci@9/pci@0/scsi@1/sd@3,0:a,raw" - -#define DISK0_NODE_PATH \ -"name:/platform/pci@1e,600000/pci@0/pci@9/pci@0/scsi@1/sd@0,0" - -#define DISK1_NODE_PATH \ -"name:/platform/pci@1e,600000/pci@0/pci@9/pci@0/scsi@1/sd@1,0" - -#define DISK2_NODE_PATH \ -"name:/platform/pci@1e,600000/pci@0/pci@9/pci@0/scsi@1/sd@2,0" - -#define DISK3_NODE_PATH \ -"name:/platform/pci@1e,600000/pci@0/pci@9/pci@0/scsi@1/sd@3,0" - -#define SCSI_CONTROLLER_NODE_PATH \ - "name:/platform/pci@1e,600000/pci@0/pci@9/pci@0/scsi@1" - -/* CPU Path Names */ -#define CPU0_PATH "_class:/jbus/cpu?ID=0" -#define CPU1_PATH "_class:/jbus/cpu?ID=1" - -#define ENV_MONITOR_DEVFS "/devices/ebus@1f,464000/env-monitor@3,0" - - -/* - * devfs-path for various fans and their min/max speeds - */ -#define ENV_SYSTEM_FAN0_DEVFS \ - "/devices/ebus@1f,464000/env-monitor@3,0:fan_0" -#define ENV_SYSTEM_FAN1_DEVFS \ - "/devices/ebus@1f,464000/env-monitor@3,0:fan_1" -#define ENV_SYSTEM_FAN2_DEVFS \ - "/devices/ebus@1f,464000/env-monitor@3,0:fan_2" -#define ENV_SYSTEM_FAN3_DEVFS \ - "/devices/ebus@1f,464000/env-monitor@3,0:fan_3" -#define ENV_SYSTEM_FAN4_DEVFS \ - "/devices/ebus@1f,464000/env-monitor@3,0:fan_4" - -/* MIN and MAX SPEED are in RPM units */ - -#define CPU_FAN_SPEED_MIN 250 -#define CPU_FAN_SPEED_MAX 5000 - -#define SYSTEM_FAN_SPEED_MIN 250 -#define SYSTEM_FAN_SPEED_MAX 5000 - -/* - * devfs-path for various temperature sensors and CPU platform path - */ -#define SENSOR_CPU0_DEVFS \ - "/devices/ebus@1f,464000/env-monitor@3,0:cpu_0" -#define SENSOR_CPU1_DEVFS \ - "/devices/ebus@1f,464000/env-monitor@3,0:cpu_1" -#define SENSOR_MB_DEVFS \ - "/devices/ebus@1f,464000/env-monitor@3,0:mb" -#define SENSOR_ADT7462_DEVFS \ - "/devices/ebus@1f,464000/env-monitor@3,0:adt7462" -#define SENSOR_LM95221_DEVFS \ - "/devices/ebus@1f,464000/env-monitor@3,0:lm95221" -#define SENSOR_FIRE_DEVFS \ - "/devices/ebus@1f,464000/env-monitor@3,0:fire" -#define SENSOR_LSI1064_DEVFS \ - "/devices/ebus@1f,464000/env-monitor@3,0:lsi1064" -#define SENSOR_FRONT_PANEL_DEVFS \ - "/devices/ebus@1f,464000/env-monitor@3,0:front_panel" -#define SENSOR_PSU_DEVFS \ - "/devices/ebus@1f,464000/env-monitor@3,0:psu" - -/* - * Temperature type - */ -typedef int16_t tempr_t; - -/* - * SEEPROM LAYOUT - * - * The layout of environmental segment in the SEEPROM in Chicago is as - * shown below. Note that this is a stripped-down version of the Envseg - * Definition v2.0 (but compatible). In particular, piclenvd in Chicago - * does not use the #FanEntries and the list of FANn_ID/FANn_DOFF - * pairs, and it doesn't use the SensorPolicy and the list of - * Measured/Corrected pairs for the temperature sensor values either. - * - * - * 0 1 2 3 4 5 - * +---------+------------------+----------+---------+---------+ - * 0x1800: | HDR_TAG | HDR_VER | HDR_LEN | HDR_CRC | N_SEGS | - * +---------+---------+--------+----------+---------+---------+ - * 0x1806: | SEG1_NAME | SEG1_DESC | - * +-------------------+-------------------+-------------------+ - * 0x180C: | SEG1_OFF | SEG1_LEN | SEG2_NAME | - * +-------------------+-------------------+-------------------+ - * ~ ~ - * . . - * ~ ~ - * +-------------------+-------------------+-------------------+ - * 0xXXXX: | SEGn_OFF | SEGn_LEN | - * +-------------------+-------------------+ - * - * - * +---------+---------+---------------------------------------+ - * ENVSEG_OFF: | ESEG_VER| N_SNSRS | SENSOR1_ID | - * +---------+---------+---------------------------------------+ - * | SNSR1_DOFF | SENSOR2_ID | - * +-------------------+---------------------------------------+ - * ~ ~ - * ~ ~ - * +-------------------+---------------------------------------+ - * | SNSRm_DOFF | - * +-------------------+ - * - * - * +---------+---------+--------+----------+---------+---------+ - * SNSRk_DOFF: | HI_POFF | HI_SHUT | HI_WARN| LO_WARN | LO_SHUT | LO_POFF | - * +-------------------+--------+----------+---------+---------+ - */ - -#define I2C_DEVFS "/devices/ebus@1f,464000/i2c@3,80" -#define IOFRU_DEV "front-io-fru-prom@0,a4:front-io-fru-prom" -#define FRU_SEEPROM_NAME "front-io-fru-prom" - -/* - * SEEPROM section header - */ -#define SSCN_TAG 0x08 -#define SSCN_VER 0x0001 -#define SSCN_OFFSET 0x1800 -typedef struct { - uint8_t sscn_tag; /* section header tag */ - uint8_t sscn_ver[2]; /* section header version */ - uint8_t sscn_len; /* section header length */ - uint8_t sscn_crc; /* unused */ - uint8_t sscn_nsegs; /* total number of segments */ -} seeprom_scn_t; - -/* - * SEEPROM segment header - */ -typedef struct { - uint16_t sseg_name; /* segment name */ - uint16_t sseg_desc[2]; /* segment descriptor */ - uint16_t sseg_off; /* segment data offset */ - uint16_t sseg_len; /* segment length */ -} seeprom_seg_t; -#define ENVSEG_NAME 0x4553 /* "ES" */ - -/* - * Envseg layout V2 (stripped-down version) - */ -typedef struct { - uint8_t esb_high_power_off; - uint8_t esb_high_shutdown; - uint8_t esb_high_warning; - uint8_t esb_low_warning; - uint8_t esb_low_shutdown; - uint8_t esb_low_power_off; -} es_sensor_blk_t; - -typedef struct { - uint16_t ess_id[2]; /* unique sensor id (on this FRU) */ - uint16_t ess_off; /* sensor data blk offset */ -} es_sensor_t; - -#define ENVSEG_VERSION 2 -typedef struct { - uint8_t esd_ver; /* envseg version */ - uint8_t esd_nsensors; /* envseg total number of sensor blks */ - es_sensor_t esd_sensors[1]; /* sensor table (variable length) */ -} es_data_t; - -/* - * Macros to fetch 16 and 32 bit msb-to-lsb data from unaligned addresses - */ -#define GET_UNALIGN16(addr) \ - (((*(uint8_t *)addr) << 8) | *((uint8_t *)addr + 1)) -#define GET_UNALIGN32(addr) \ - (GET_UNALIGN16(addr) << 16) | GET_UNALIGN16((uint8_t *)addr + 2) - -/* - * Macros to check sensor/disk temperatures - */ -#define SENSOR_TEMP_IN_WARNING_RANGE(val, sensorp) \ - ((val) > (sensorp)->es->esb_high_warning || \ - (val) < (char)((sensorp)->es->esb_low_warning)) - -#define SENSOR_TEMP_IN_SHUTDOWN_RANGE(val, sensorp) \ - ((val) > (sensorp)->es->esb_high_shutdown || \ - (val) < (char)((sensorp)->es->esb_low_shutdown)) - -#define DISK_TEMP_IN_WARNING_RANGE(val, diskp) \ - ((val) > (diskp)->high_warning || \ - (val) < (char)((diskp)->low_warning)) - -#define DISK_TEMP_IN_SHUTDOWN_RANGE(val, diskp) \ - ((val) > (diskp)->high_shutdown || \ - (val) < (char)((diskp)->low_shutdown)) - -#define SENSOR_WARN 1 -#define SENSOR_OK 0 - -#define FAN_FAILED 1 -#define FAN_OK 0 - -/* - * Default limits for sensors in case environmental segment is absent - */ -#define CPU0_HIGH_POWER_OFF 105 -#define CPU0_HIGH_SHUTDOWN 100 -#define CPU0_HIGH_WARNING 95 -#define CPU0_LOW_WARNING 5 -#define CPU0_LOW_SHUTDOWN 0 -#define CPU0_LOW_POWER_OFF 0 - -#define CPU1_HIGH_POWER_OFF 105 -#define CPU1_HIGH_SHUTDOWN 100 -#define CPU1_HIGH_WARNING 95 -#define CPU1_LOW_WARNING 5 -#define CPU1_LOW_SHUTDOWN 0 -#define CPU1_LOW_POWER_OFF 0 - -#define ADT7462_HIGH_POWER_OFF 80 -#define ADT7462_HIGH_SHUTDOWN 75 -#define ADT7462_HIGH_WARNING 70 -#define ADT7462_LOW_WARNING 5 -#define ADT7462_LOW_SHUTDOWN 0 -#define ADT7462_LOW_POWER_OFF 0 - -#define MB_HIGH_POWER_OFF 80 -#define MB_HIGH_SHUTDOWN 75 -#define MB_HIGH_WARNING 70 -#define MB_LOW_WARNING 5 -#define MB_LOW_SHUTDOWN 0 -#define MB_LOW_POWER_OFF 0 - -#define LM95221_HIGH_POWER_OFF 80 -#define LM95221_HIGH_SHUTDOWN 75 -#define LM95221_HIGH_WARNING 70 -#define LM95221_LOW_WARNING 5 -#define LM95221_LOW_SHUTDOWN 0 -#define LM95221_LOW_POWER_OFF 0 - -#define FIRE_HIGH_POWER_OFF 105 -#define FIRE_HIGH_SHUTDOWN 100 -#define FIRE_HIGH_WARNING 95 -#define FIRE_LOW_WARNING 5 -#define FIRE_LOW_SHUTDOWN 0 -#define FIRE_LOW_POWER_OFF 0 - -#define LSI1064_HIGH_POWER_OFF 105 -#define LSI1064_HIGH_SHUTDOWN 100 -#define LSI1064_HIGH_WARNING 95 -#define LSI1064_LOW_WARNING 5 -#define LSI1064_LOW_SHUTDOWN 0 -#define LSI1064_LOW_POWER_OFF 0 - -#define FRONT_PANEL_HIGH_POWER_OFF 75 -#define FRONT_PANEL_HIGH_SHUTDOWN 70 -#define FRONT_PANEL_HIGH_WARNING 60 -#define FRONT_PANEL_LOW_WARNING 5 -#define FRONT_PANEL_LOW_SHUTDOWN 0 -#define FRONT_PANEL_LOW_POWER_OFF 0 - -#define PSU_HIGH_POWER_OFF 95 -#define PSU_HIGH_SHUTDOWN 85 -#define PSU_HIGH_WARNING 75 -#define PSU_LOW_WARNING 5 -#define PSU_LOW_SHUTDOWN 0 -#define PSU_LOW_POWER_OFF 0 - -/* - * Temperature sensor related data structure - */ -typedef struct env_sensor { - char *name; /* sensor name */ - char *devfs_path; /* sensor device devfs path */ - int id; - int fd; /* device file descriptor */ - es_sensor_blk_t *es; - int error; /* error flag */ - boolean_t present; /* sensor present */ - tempr_t cur_temp; /* current temperature */ - time_t warning_start; /* warning start time (secs) */ - time_t warning_tstamp; /* last warning time (secs) */ - time_t shutdown_tstamp; /* shutdown temp time (secs) */ - boolean_t shutdown_initiated; /* shutdown initated */ -} env_sensor_t; - -extern env_sensor_t *sensor_lookup(char *sensor_name); -extern int get_temperature(env_sensor_t *, tempr_t *); - -typedef struct env_disk { - char *name; /* disk name */ - char *devfs_path; /* disk device devfs path */ - char *physpath; /* used to be probe for IDLW TIME */ - char *nodepath; /* used to detect presence of disk */ - uchar_t id; - int fd; /* device file descriptor */ - boolean_t present; /* disk present */ - boolean_t tpage_supported; /* Temperature page */ - boolean_t smart_supported; - int current_temp; - int ref_temp; - int reliability_temp; - uchar_t high_shutdown; - uchar_t high_warning; - uchar_t low_warning; - uchar_t low_shutdown; - time_t warning_start; /* warning start time (secs) */ - time_t warning_tstamp; /* last warning time (secs) */ - time_t shutdown_tstamp; /* shutdown temp time (secs) */ - boolean_t shutdown_initiated; /* shutdown initated */ -} env_disk_t; - -extern env_disk_t *disk_lookup(char *disk_name); -extern int disk_temperature(env_disk_t *, tempr_t *); - -/* - * Fan information data structure - */ -typedef int fanspeed_t; - -typedef struct env_fan { - char *name; /* fan name */ - char *devfs_path; /* fan device devfs path */ - uchar_t id; - fanspeed_t speed_min; /* minimum speed */ - fanspeed_t speed_max; /* maximum speed */ - int forced_speed; /* forced (fixed) speed */ - int fd; /* device file descriptor */ - boolean_t present; /* fan present */ - int last_status; /* Fan status */ - uint8_t cspeed; /* Current speed (tach) */ - uint8_t lspeed; /* Last speed (tach) */ -} env_fan_t; - -/* - * Tuneables - */ -typedef struct env_tuneable { - char *name; - char type; - void *value; - int (*rfunc)(ptree_rarg_t *, void *); - int (*wfunc)(ptree_warg_t *, const void *); - int nbytes; - picl_prophdl_t proph; -} env_tuneable_t; - -/* - * Smart structures - */ - -typedef struct smart_field { - uint8_t id; - uint8_t flags[SMART_FLAG_SIZE]; - uint8_t raw_data[ATTRIBUTE_DATA_SIZE]; - uint8_t reserved; -} smart_attribute; - -typedef struct smart_struct { - uint16_t revision; /* SMART version # */ - struct smart_field attribute[SMART_FIELDS]; - /* offline collection information */ - uint8_t collection_status[COLLECTION_DATA_SIZE]; - uint16_t capability; /* SMART capability */ - uint8_t reserved[SMART_RESERVED_SIZE]; - uint8_t vendor_specific[VENDOR_ATTR_SIZE]; - uint8_t checksum; /* page checksum */ -} smart_structure; - -extern env_fan_t *fan_lookup(char *fan_name); -extern int get_fan_speed(env_fan_t *, fanspeed_t *); -extern int set_fan_speed(env_fan_t *, fanspeed_t); - -extern int env_debug; -extern void envd_log(int pri, const char *fmt, ...); - -/* - * Various messages - */ -#define ENVD_PLUGIN_INIT_FAILED \ - gettext("SUNW_piclenvd: initialization failed!\n") - -#define ENVD_PICL_SETUP_FAILED \ - gettext("SUNW_piclenvd: PICL setup failed!\n") - -#define PM_THREAD_CREATE_FAILED \ - gettext("SUNW_piclenvd: pmthr thread creation failed!\n") - -#define PM_THREAD_EXITING \ - gettext("SUNW_piclenvd: pmthr exiting! errno:%d %s\n") - -#define DISK_TEMP_THREAD_EXITING \ - gettext("SUNW_piclenvd: Disk temp thread exiting." \ - " Disk temperature will not be monitored. errno:%d %s\n") - -#define ENVTHR_THREAD_CREATE_FAILED \ - gettext("SUNW_piclenvd: envthr thread creation failed!\n") - -#define ENV_SHUTDOWN_MSG \ - gettext("SUNW_piclenvd: '%s' sensor temperature %d outside safe " \ - "limits (%d...%d). Shutting down the system.\n") - -#define ENV_WARNING_MSG \ - gettext("SUNW_piclenvd: '%s' sensor temperature %d outside safe " \ - "operating limits (%d...%d).\n") - -#define ENV_FAN_OPEN_FAIL \ - gettext("SUNW_piclenvd: can't open '%s' fan path:%s errno:%d %s\n") - -#define ENV_SENSOR_OPEN_FAIL \ - gettext("SUNW_piclenvd: can't open '%s' sensor path:%s errno:%d %s\n") - -#define ENV_SENSOR_ACCESS_FAIL \ - gettext("SUNW_piclenvd: can't access '%s' sensor errno:%d %s\n") - -#define ENV_SENSOR_ACCESS_OK \ - gettext("SUNW_piclenvd: '%s' sensor is accessible now.\n") - -#define ENV_FAN_FAILURE_WARNING_MSG \ - gettext("SUNW_piclenvd: %s has Failed.\n" \ - "(rpm = %s status = %s)\n") - -#define ENV_FAN_OK_MSG \ - gettext("SUNW_piclenvd: %s is OKAY.\n") - -#define ENV_FRU_OPEN_FAIL \ - gettext("SUNW_piclenvd: can't open FRU SEEPROM path:%s errno:%d\n") - -#define ENV_FRU_BAD_ENVSEG \ - gettext("SUNW_piclenvd: version mismatch or environmental segment " \ - "header too short in FRU SEEPROM %s\n") - -#define ENV_FRU_BAD_SCNHDR \ - gettext("SUNW_piclenvd: invalid section header tag:%x version:%x\n") - -#define ENV_FRU_NOMEM_FOR_SEG \ - gettext("SUNW_piclenvd: cannot allocate %d bytes for env seg memory\n") - -#define ENV_DEFAULT_LIMITS \ - gettext("SUNW_piclenvd: error reading ES segment, using defaults\n") - -#ifdef __cplusplus -} -#endif - -#endif /* _ENVD_H */ diff --git a/usr/src/cmd/picl/plugins/sun4u/chicago/envd/envmodel.info b/usr/src/cmd/picl/plugins/sun4u/chicago/envd/envmodel.info deleted file mode 100644 index 752e3a3fa8..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chicago/envd/envmodel.info +++ /dev/null @@ -1,201 +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" - -/* - * This is the environmental plug-in configuration file for - * Chicago platform. - */ - -VERSION 1.1 - -VERBOSE 1 - -/* - * Fan names and ids - */ -#define ENV_SYSTEM_FAN0 system-fan0 -#define ENV_SYSTEM_FAN1 system-fan1 -#define ENV_SYSTEM_FAN2 system-fan2 -#define ENV_SYSTEM_FAN3 system-fan3 -#define ENV_SYSTEM_FAN4 system-fan4 - -#define SYSTEM_FAN0_ID 0 -#define SYSTEM_FAN1_ID 1 -#define SYSTEM_FAN2_ID 2 -#define SYSTEM_FAN3_ID 3 -#define SYSTEM_FAN4_ID 4 - -/* - * Sensor names and ids - */ -#define SENSOR_CPU0 cpu0 -#define SENSOR_CPU1 cpu1 -#define SENSOR_MB MotherBoard -#define SENSOR_ADT7462 ADT7462 -#define SENSOR_LM95221 LM95221 -#define SENSOR_FIRE FireASIC -#define SENSOR_LSI1064 LSI1064 -#define SENSOR_FRONT_PANEL Front_panel -#define SENSOR_PSU PSU - -#define CPU0_SENSOR_ID 0 -#define CPU1_SENSOR_ID 1 -#define ADT7462_SENSOR_ID 2 -#define MB_SENSOR_ID 3 -#define LM95221_SENSOR_ID 4 -#define FIRE_SENSOR_ID 5 -#define LSI1064_SENSOR_ID 6 -#define FRONT_PANEL_SENSOR_ID 7 -#define PSU_SENSOR_ID 8 - -/* - * Hard disk sensor names and ids - */ -#define ENV_DISK0 hard-disk0 -#define ENV_DISK1 hard-disk1 -#define ENV_DISK2 hard-disk2 -#define ENV_DISK3 hard-disk3 - -#define DISK0_ID 0 -#define DISK1_ID 1 -#define DISK2_ID 2 -#define DISK3_ID 3 - -/* - * Publish the labels for sensors and fans - */ - -name:/platform/ebus@1f,464000/env-monitor@3,0/SENSOR_CPU0 - PROP Label string r 0 "cpu0-sensor" - PROP ID int r 4 CPU0_SENSOR_ID - -name:/platform/ebus@1f,464000/env-monitor@3,0/SENSOR_CPU1 - PROP Label string r 0 "cpu1-sensor" - PROP ID int r 4 CPU1_SENSOR_ID - -name:/platform/ebus@1f,464000/env-monitor@3,0/SENSOR_MB - PROP Label string r 0 "mb-sensor" - PROP ID int r 4 MB_SENSOR_ID - -name:/platform/ebus@1f,464000/env-monitor@3,0/SENSOR_ADT7462 - PROP Label string r 0 "adt7462-sensor" - PROP ID int r 4 ADT7462_SENSOR_ID - -name:/platform/ebus@1f,464000/env-monitor@3,0/SENSOR_LM95221 - PROP Label string r 0 "lm95221-sensor" - PROP ID int r 4 LM95221_SENSOR_ID - -name:/platform/ebus@1f,464000/env-monitor@3,0/SENSOR_FIRE - PROP Label string r 0 "fire-sensor" - PROP ID int r 4 FIRE_SENSOR_ID - -name:/platform/ebus@1f,464000/env-monitor@3,0/SENSOR_LSI1064 - PROP Label string r 0 "lsi1064-sensor" - PROP ID int r 4 LSI1064_SENSOR_ID - -name:/platform/ebus@1f,464000/env-monitor@3,0/SENSOR_FRONT_PANEL - PROP Label string r 0 "front_panel-sensor" - PROP ID int r 4 FRONT_PANEL_SENSOR_ID - -name:/platform/ebus@1f,464000/env-monitor@3,0/SENSOR_PSU - PROP Label string r 0 "psu-sensor" - PROP ID int r 4 PSU_SENSOR_ID - - -name:/platform/ebus@1f,464000/env-monitor@3,0/ENV_SYSTEM_FAN0 - PROP Label string r 0 "cpu0-fan" - PROP ID int r 4 SYSTEM_FAN0_ID - -name:/platform/ebus@1f,464000/env-monitor@3,0/ENV_SYSTEM_FAN1 - PROP Label string r 0 "cpu1-fan" - PROP ID int r 4 SYSTEM_FAN1_ID - -name:/platform/ebus@1f,464000/env-monitor@3,0/ENV_SYSTEM_FAN2 - PROP Label string r 0 "pci-fan" - PROP ID int r 4 SYSTEM_FAN2_ID - -name:/platform/ebus@1f,464000/env-monitor@3,0/ENV_SYSTEM_FAN3 - PROP Label string r 0 "system-fan3" - PROP ID int r 4 SYSTEM_FAN3_ID - -name:/platform/ebus@1f,464000/env-monitor@3,0/ENV_SYSTEM_FAN4 - PROP Label string r 0 "system-fan4" - PROP ID int r 4 SYSTEM_FAN4_ID - -/* - * Internal hard disks - */ -name:/platform/pci@1e,600000/pci@0/pci@9/pci@0/scsi@1/sd@0,0/ENV_DISK0 - PROP Label string r 0 "hard-disk0" - PROP ID int r 4 DISK0_ID - -name:/platform/pci@1e,600000/pci@0/pci@9/pci@0/scsi@1/sd@1,0/ENV_DISK1 - PROP Label string r 0 "hard-disk1" - PROP ID int r 4 DISK1_ID - -name:/platform/pci@1e,600000/pci@0/pci@9/pci@0/scsi@1/sd@2,0/ENV_DISK2 - PROP Label string r 0 "hard-disk2" - PROP ID int r 4 DISK2_ID - -name:/platform/pci@1e,600000/pci@0/pci@9/pci@0/scsi@1/sd@3,0/ENV_DISK3 - PROP Label string r 0 "hard-disk3" - PROP ID int r 4 DISK3_ID - -/* - * Associate the environmental information with devices. - */ - -/* - * CPU 0 environmental information - */ -_class:/jbus/cpu?ID=0 -TABLE Environment - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ /platform/ebus@1f,464000/env-monitor@3,0/SENSOR_CPU0 - ENDROW - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ /platform/ebus@1f,464000/env-monitor@3,0/ENV_SYSTEM_FAN0 - ENDROW -ENDTABLE - -/* - * CPU 1 environmental information - */ -_class:/jbus/cpu?ID=1 -TABLE Environment - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ /platform/ebus@1f,464000/env-monitor@3,0/SENSOR_CPU1 - ENDROW - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ /platform/ebus@1f,464000/env-monitor@3,0/ENV_SYSTEM_FAN1 - ENDROW -ENDTABLE diff --git a/usr/src/cmd/picl/plugins/sun4u/chicago/envd/piclenvd.c b/usr/src/cmd/picl/plugins/sun4u/chicago/envd/piclenvd.c deleted file mode 100644 index a84ee65353..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chicago/envd/piclenvd.c +++ /dev/null @@ -1,2217 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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. - */ - -/* - * This file contains the environmental PICL plug-in module. - */ - -/* - * This plugin sets up the PICLTREE for Chicago WS. - * It provides functionality to get/set temperatures and - * fan speeds. - * - * The environmental policy defaults to the auto mode - * as programmed by OBP at boot time. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "envd.h" -#include -#include - -int debug_fd; -/* - * PICL plugin entry points - */ -static void piclenvd_register(void); -static void piclenvd_init(void); -static void piclenvd_fini(void); - -/* - * Env setup routines - */ -extern void env_picl_setup(void); -extern void env_picl_destroy(void); -extern int env_picl_setup_tuneables(void); - -static boolean_t has_fan_failed(env_fan_t *fanp); - -/* - * PSU fan fault handling - */ -static boolean_t has_psufan_failed(void); -static int psufan_last_status = FAN_OK; - -#pragma init(piclenvd_register) - -/* - * Plugin registration information - */ -static picld_plugin_reg_t my_reg_info = { - PICLD_PLUGIN_VERSION, - PICLD_PLUGIN_CRITICAL, - "SUNW_piclenvd", - piclenvd_init, - piclenvd_fini, -}; - -#define REGISTER_INFORMATION_STRING_LENGTH 16 -static char fan_rpm_string[REGISTER_INFORMATION_STRING_LENGTH] = {0}; -static char fan_status_string[REGISTER_INFORMATION_STRING_LENGTH] = {0}; - -static int scsi_log_sense(env_disk_t *diskp, uchar_t page_code, - void *pagebuf, uint16_t pagelen, int page_control); -static int scsi_mode_select(env_disk_t *diskp, uchar_t page_code, - uchar_t *pagebuf, uint16_t pagelen); - -static int get_disk_temp(env_disk_t *); - -/* - * ES Segment stuff - */ -static es_sensor_blk_t sensor_ctl[MAX_SENSORS]; - -/* - * Default limits for sensors, in case ES segment is not present, or has - * inconsistent information - */ -static es_sensor_blk_t sensor_default_ctl[MAX_SENSORS] = { - { - CPU0_HIGH_POWER_OFF, CPU0_HIGH_SHUTDOWN, CPU0_HIGH_WARNING, - CPU0_LOW_WARNING, CPU0_LOW_SHUTDOWN, CPU0_LOW_POWER_OFF - }, - { - CPU1_HIGH_POWER_OFF, CPU1_HIGH_SHUTDOWN, CPU1_HIGH_WARNING, - CPU1_LOW_WARNING, CPU1_LOW_SHUTDOWN, CPU1_LOW_POWER_OFF - }, - { - ADT7462_HIGH_POWER_OFF, ADT7462_HIGH_SHUTDOWN, ADT7462_HIGH_WARNING, - ADT7462_LOW_WARNING, ADT7462_LOW_SHUTDOWN, ADT7462_LOW_POWER_OFF - }, - { - MB_HIGH_POWER_OFF, MB_HIGH_SHUTDOWN, MB_HIGH_WARNING, - MB_LOW_WARNING, MB_LOW_SHUTDOWN, MB_LOW_POWER_OFF - }, - { - LM95221_HIGH_POWER_OFF, LM95221_HIGH_SHUTDOWN, LM95221_HIGH_WARNING, - LM95221_LOW_WARNING, LM95221_LOW_SHUTDOWN, LM95221_LOW_POWER_OFF - }, - { - FIRE_HIGH_POWER_OFF, FIRE_HIGH_SHUTDOWN, FIRE_HIGH_WARNING, - FIRE_LOW_WARNING, FIRE_LOW_SHUTDOWN, FIRE_LOW_POWER_OFF - }, - { - LSI1064_HIGH_POWER_OFF, LSI1064_HIGH_SHUTDOWN, LSI1064_HIGH_WARNING, - LSI1064_LOW_WARNING, LSI1064_LOW_SHUTDOWN, LSI1064_LOW_POWER_OFF - }, - { - FRONT_PANEL_HIGH_POWER_OFF, FRONT_PANEL_HIGH_SHUTDOWN, - FRONT_PANEL_HIGH_WARNING, FRONT_PANEL_LOW_WARNING, - FRONT_PANEL_LOW_SHUTDOWN, FRONT_PANEL_LOW_POWER_OFF - }, - { - PSU_HIGH_POWER_OFF, PSU_HIGH_SHUTDOWN, PSU_HIGH_WARNING, - PSU_LOW_WARNING, PSU_LOW_SHUTDOWN, PSU_LOW_POWER_OFF - } -}; - -/* - * Env thread variables - */ -static boolean_t system_shutdown_started = B_FALSE; -static boolean_t system_temp_thr_created = B_FALSE; -static pthread_t system_temp_thr_id; -static pthread_attr_t thr_attr; -static boolean_t disk_temp_thr_created = B_FALSE; -static pthread_t disk_temp_thr_id; -static boolean_t fan_thr_created = B_FALSE; -static pthread_t fan_thr_id; - -/* - * PM thread related variables - */ -static pthread_t pmthr_tid; /* pmthr thread ID */ -static int pm_fd = -1; /* PM device file descriptor */ -static boolean_t pmthr_created = B_FALSE; -static int cur_lpstate; /* cur low power state */ - -/* - * Envd plug-in verbose flag set by SUNW_PICLENVD_DEBUG environment var - * Setting the verbose tuneable also enables debugging for better - * control - */ -int env_debug = 0; - -/* - * These are debug variables for keeping track of the total number - * of Fan and Temp sensor retries over the lifetime of the plugin. - */ -static int total_fan_retries = 0; -static int total_temp_retries = 0; - -/* - * Fan devices - */ -static env_fan_t envd_system_fan0 = { - ENV_SYSTEM_FAN0, ENV_SYSTEM_FAN0_DEVFS, SYSTEM_FAN0_ID, - SYSTEM_FAN_SPEED_MIN, SYSTEM_FAN_SPEED_MAX, -1, -1, -}; -static env_fan_t envd_system_fan1 = { - ENV_SYSTEM_FAN1, ENV_SYSTEM_FAN1_DEVFS, SYSTEM_FAN1_ID, - SYSTEM_FAN_SPEED_MIN, SYSTEM_FAN_SPEED_MAX, -1, -1, -}; -static env_fan_t envd_system_fan2 = { - ENV_SYSTEM_FAN2, ENV_SYSTEM_FAN2_DEVFS, SYSTEM_FAN2_ID, - SYSTEM_FAN_SPEED_MIN, SYSTEM_FAN_SPEED_MAX, -1, -1, -}; -static env_fan_t envd_system_fan3 = { - ENV_SYSTEM_FAN3, ENV_SYSTEM_FAN3_DEVFS, SYSTEM_FAN3_ID, - SYSTEM_FAN_SPEED_MIN, SYSTEM_FAN_SPEED_MAX, -1, -1, -}; -static env_fan_t envd_system_fan4 = { - ENV_SYSTEM_FAN4, ENV_SYSTEM_FAN4_DEVFS, SYSTEM_FAN4_ID, - SYSTEM_FAN_SPEED_MIN, SYSTEM_FAN_SPEED_MAX, -1, -1, -}; - -/* - * Disk devices - */ -static env_disk_t envd_disk0 = { - ENV_DISK0, ENV_DISK0_DEVFS, DISK0_PHYSPATH, DISK0_NODE_PATH, - DISK0_ID, -1, -}; -static env_disk_t envd_disk1 = { - ENV_DISK1, ENV_DISK1_DEVFS, DISK1_PHYSPATH, DISK1_NODE_PATH, - DISK1_ID, -1, -}; -static env_disk_t envd_disk2 = { - ENV_DISK2, ENV_DISK2_DEVFS, DISK2_PHYSPATH, DISK2_NODE_PATH, - DISK2_ID, -1, -}; -static env_disk_t envd_disk3 = { - ENV_DISK3, ENV_DISK3_DEVFS, DISK3_PHYSPATH, DISK3_NODE_PATH, - DISK3_ID, -1, -}; - -/* - * Sensors - */ -static env_sensor_t envd_sensor_cpu0 = { - SENSOR_CPU0, SENSOR_CPU0_DEVFS, CPU0_SENSOR_ID, -1, NULL, -}; -static env_sensor_t envd_sensor_cpu1 = { - SENSOR_CPU1, SENSOR_CPU1_DEVFS, CPU1_SENSOR_ID, -1, NULL, -}; -static env_sensor_t envd_sensor_adt7462 = { - SENSOR_ADT7462, SENSOR_ADT7462_DEVFS, ADT7462_SENSOR_ID, -1, NULL, -}; -static env_sensor_t envd_sensor_mb = { - SENSOR_MB, SENSOR_MB_DEVFS, MB_SENSOR_ID, -1, NULL, -}; -static env_sensor_t envd_sensor_lm95221 = { - SENSOR_LM95221, SENSOR_LM95221_DEVFS, LM95221_SENSOR_ID, -1, NULL, -}; -static env_sensor_t envd_sensor_fire = { - SENSOR_FIRE, SENSOR_FIRE_DEVFS, FIRE_SENSOR_ID, -1, NULL, -}; -static env_sensor_t envd_sensor_lsi1064 = { - SENSOR_LSI1064, SENSOR_LSI1064_DEVFS, LSI1064_SENSOR_ID, -1, NULL, -}; -static env_sensor_t envd_sensor_front_panel = { - SENSOR_FRONT_PANEL, SENSOR_FRONT_PANEL_DEVFS, FRONT_PANEL_SENSOR_ID, - -1, NULL, -}; -static env_sensor_t envd_sensor_psu = { - SENSOR_PSU, SENSOR_PSU_DEVFS, PSU_SENSOR_ID, -1, NULL, -}; - -/* - * The vendor-id and device-id are the properties associated with - * the SCSI controller. This is used to identify a particular controller - * like LSI1064. - */ -#define VENDOR_ID "vendor-id" -#define DEVICE_ID "device-id" - -/* - * The implementation for SCSI disk drives to supply info. about - * temperature is not mandatory. Hence we first determine if the - * temperature page is supported. To do this we need to scan the list - * of pages supported. - */ -#define SUPPORTED_LPAGES 0 -#define TEMPERATURE_PAGE 0x0D -#define LOGPAGEHDRSIZE 4 - -/* - * NULL terminated array of fans - */ -static env_fan_t *envd_fans[] = { - &envd_system_fan0, - &envd_system_fan1, - &envd_system_fan2, - &envd_system_fan3, - &envd_system_fan4, - NULL -}; - -/* - * NULL terminated array of disks - */ -static env_disk_t *envd_disks[] = { - &envd_disk0, - &envd_disk1, - &envd_disk2, - &envd_disk3, - NULL -}; - -/* - * NULL terminated array of temperature sensors - */ -#define N_ENVD_SENSORS 9 -static env_sensor_t *envd_sensors[] = { - &envd_sensor_cpu0, - &envd_sensor_cpu1, - &envd_sensor_adt7462, - &envd_sensor_mb, - &envd_sensor_lm95221, - &envd_sensor_fire, - &envd_sensor_lsi1064, - &envd_sensor_front_panel, - &envd_sensor_psu, - NULL -}; - -#define NOT_AVAILABLE "NA" - -/* - * Tuneables - */ -#define ENABLE 1 -#define DISABLE 0 - -static int disk_high_warn_temperature = DISK_HIGH_WARN_TEMPERATURE; -static int disk_low_warn_temperature = DISK_LOW_WARN_TEMPERATURE; -static int disk_high_shutdown_temperature = - DISK_HIGH_SHUTDOWN_TEMPERATURE; -static int disk_low_shutdown_temperature = DISK_LOW_SHUTDOWN_TEMPERATURE; - -static int disk_scan_interval = DISK_SCAN_INTERVAL; -static int sensor_scan_interval = SENSOR_SCAN_INTERVAL; -static int fan_scan_interval = FAN_SCAN_INTERVAL; - -static int get_int_val(ptree_rarg_t *parg, void *buf); -static int set_int_val(ptree_warg_t *parg, const void *buf); -static int get_string_val(ptree_rarg_t *parg, void *buf); -static int set_string_val(ptree_warg_t *parg, const void *buf); - -static int shutdown_override = 0; -static int sensor_warning_interval = SENSOR_WARNING_INTERVAL; -static int sensor_warning_duration = SENSOR_WARNING_DURATION; -static int sensor_shutdown_interval = SENSOR_SHUTDOWN_INTERVAL; -static int disk_warning_interval = DISK_WARNING_INTERVAL; -static int disk_warning_duration = DISK_WARNING_DURATION; -static int disk_shutdown_interval = DISK_SHUTDOWN_INTERVAL; - -static int system_temp_monitor = 1; /* enabled */ -static int fan_monitor = 1; /* enabled */ -static int pm_monitor = 1; /* enabled */ - -/* Disable disk temperature monitoring until we have LSI fw support */ -int disk_temp_monitor = 0; - -static char shutdown_cmd[] = SHUTDOWN_CMD; -const char *iofru_devname = I2C_DEVFS "/" IOFRU_DEV; - -env_tuneable_t tuneables[] = { - {"system_temp-monitor", PICL_PTYPE_INT, &system_temp_monitor, - &get_int_val, &set_int_val, sizeof (int)}, - - {"fan-monitor", PICL_PTYPE_INT, &fan_monitor, - &get_int_val, &set_int_val, sizeof (int)}, - - {"pm-monitor", PICL_PTYPE_INT, &pm_monitor, - &get_int_val, &set_int_val, sizeof (int)}, - - {"shutdown-override", PICL_PTYPE_INT, &shutdown_override, - &get_int_val, &set_int_val, sizeof (int)}, - - {"sensor-warning-duration", PICL_PTYPE_INT, - &sensor_warning_duration, - &get_int_val, &set_int_val, - sizeof (int)}, - - {"disk-scan-interval", PICL_PTYPE_INT, - &disk_scan_interval, - &get_int_val, &set_int_val, - sizeof (int)}, - - {"fan-scan-interval", PICL_PTYPE_INT, - &fan_scan_interval, - &get_int_val, &set_int_val, - sizeof (int)}, - - {"sensor-scan-interval", PICL_PTYPE_INT, - &sensor_scan_interval, - &get_int_val, &set_int_val, - sizeof (int)}, - - {"sensor_warning-interval", PICL_PTYPE_INT, &sensor_warning_interval, - &get_int_val, &set_int_val, - sizeof (int)}, - - {"sensor_shutdown-interval", PICL_PTYPE_INT, &sensor_shutdown_interval, - &get_int_val, &set_int_val, - sizeof (int)}, - - {"disk_warning-interval", PICL_PTYPE_INT, &disk_warning_interval, - &get_int_val, &set_int_val, - sizeof (int)}, - - {"disk_warning-duration", PICL_PTYPE_INT, &disk_warning_duration, - &get_int_val, &set_int_val, - sizeof (int)}, - - {"disk_shutdown-interval", PICL_PTYPE_INT, &disk_shutdown_interval, - &get_int_val, &set_int_val, - sizeof (int)}, - - {"shutdown-command", PICL_PTYPE_CHARSTRING, shutdown_cmd, - &get_string_val, &set_string_val, - sizeof (shutdown_cmd)}, - - {"monitor-disk-temp", PICL_PTYPE_INT, &disk_temp_monitor, - &get_int_val, &set_int_val, sizeof (int)}, - - {"disk-high-warn-temperature", PICL_PTYPE_INT, - &disk_high_warn_temperature, &get_int_val, - &set_int_val, sizeof (int)}, - - {"disk-low-warn-temperature", PICL_PTYPE_INT, - &disk_low_warn_temperature, &get_int_val, - &set_int_val, sizeof (int)}, - - {"disk-high-shutdown-temperature", PICL_PTYPE_INT, - &disk_high_shutdown_temperature, &get_int_val, - &set_int_val, sizeof (int)}, - - {"disk-low-shutdown-temperature", PICL_PTYPE_INT, - &disk_low_shutdown_temperature, &get_int_val, - &set_int_val, sizeof (int)}, - - {"verbose", PICL_PTYPE_INT, &env_debug, - &get_int_val, &set_int_val, sizeof (int)} -}; - -/* - * We use this to figure out how many tuneables there are - * This is variable because the publishing routine needs this info - * in piclenvsetup.c - */ -int ntuneables = (sizeof (tuneables)/sizeof (tuneables[0])); - -/* - * Lookup fan and return a pointer to env_fan_t data structure. - */ -env_fan_t * -fan_lookup(char *name) -{ - int i; - env_fan_t *fanp; - - for (i = 0; (fanp = envd_fans[i]) != NULL; i++) { - if (strcmp(fanp->name, name) == 0) - return (fanp); - } - return (NULL); -} - -/* - * Lookup sensor and return a pointer to env_sensor_t data structure. - */ -env_sensor_t * -sensor_lookup(char *name) -{ - env_sensor_t *sensorp; - int i; - - for (i = 0; i < N_ENVD_SENSORS; ++i) { - sensorp = envd_sensors[i]; - if (strcmp(sensorp->name, name) == 0) - return (sensorp); - } - return (NULL); -} - -/* - * Lookup disk and return a pointer to env_disk_t data structure. - */ -env_disk_t * -disk_lookup(char *name) -{ - int i; - env_disk_t *diskp; - - for (i = 0; (diskp = envd_disks[i]) != NULL; i++) { - if (strncmp(diskp->name, name, strlen(name)) == 0) - return (diskp); - } - return (NULL); -} - -/* - * Get current temperature - * Returns -1 on error, 0 if successful - */ -int -get_temperature(env_sensor_t *sensorp, tempr_t *temp) -{ - int fd = sensorp->fd; - int retval = 0; - - if (fd == -1) - retval = -1; - else if (ioctl(fd, PIC_GET_TEMPERATURE, temp) != 0) { - - retval = -1; - - sensorp->error++; - - if (sensorp->error == MAX_SENSOR_RETRIES) { - envd_log(LOG_WARNING, ENV_SENSOR_ACCESS_FAIL, - sensorp->name, errno, strerror(errno)); - } - - total_temp_retries++; - (void) sleep(1); - - } else if (sensorp->error != 0) { - if (sensorp->error >= MAX_SENSOR_RETRIES) { - envd_log(LOG_WARNING, ENV_SENSOR_ACCESS_OK, - sensorp->name); - } - - sensorp->error = 0; - - if (total_temp_retries && env_debug) { - envd_log(LOG_WARNING, - "Total retries for sensors = %d", - total_temp_retries); - } - } - - return (retval); -} - -/* - * Get current disk temperature - * Returns -1 on error, 0 if successful - */ -int -disk_temperature(env_disk_t *diskp, tempr_t *temp) -{ - int retval = 0; - - if (diskp == NULL) - retval = -1; - else - *temp = diskp->current_temp; - - return (retval); -} - -/* - * Get current fan speed - * This function returns a RPM value for fanspeed - * in fanspeedp. - * Returns -1 on error, 0 if successful - */ -int -get_fan_speed(env_fan_t *fanp, fanspeed_t *fanspeedp) -{ - uint8_t tach; - int real_tach; - int retries; - - if (fanp->fd == -1) - return (-1); - - if (has_fan_failed(fanp)) { - *fanspeedp = 0; - return (0); - } - - /* try to read the fan information */ - for (retries = 0; retries < MAX_FAN_RETRIES; retries++) { - if (ioctl(fanp->fd, PIC_GET_FAN_SPEED, &tach) == 0) - break; - (void) sleep(1); - } - - total_fan_retries += retries; - if (retries >= MAX_FAN_RETRIES) - return (-1); - - if (total_fan_retries && env_debug) { - envd_log(LOG_WARNING, "total retries for fan = %d", - total_fan_retries); - } - - real_tach = tach << 8; - *fanspeedp = TACH_TO_RPM(real_tach); - return (0); -} - -/* - * Set fan speed - * This function accepts a percentage of fan speed - * from 0-100 and programs the HW monitor fans to the corresponding - * fanspeed value. - * Returns -1 on error, -2 on invalid args passed, 0 if successful - */ -int -set_fan_speed(env_fan_t *fanp, fanspeed_t fanspeed) -{ - uint8_t speed; - - if (fanp->fd == -1) - return (-1); - - if (fanspeed < 0 || fanspeed > 100) - return (-2); - - speed = fanspeed; - if (ioctl(fanp->fd, PIC_SET_FAN_SPEED, &speed) != 0) - return (-1); - - return (0); -} - -/* - * close all fan devices - */ -static void -envd_close_fans(void) -{ - int i; - env_fan_t *fanp; - - for (i = 0; (fanp = envd_fans[i]) != NULL; i++) { - if (fanp->fd != -1) { - (void) close(fanp->fd); - fanp->fd = -1; - } - } -} - -/* - * Close sensor devices and freeup resources - */ -static void -envd_close_sensors(void) -{ - env_sensor_t *sensorp; - int i; - - for (i = 0; i < N_ENVD_SENSORS; ++i) { - sensorp = envd_sensors[i]; - if (sensorp->fd != -1) { - (void) close(sensorp->fd); - sensorp->fd = -1; - } - } -} - -/* - * Open fan devices and initialize per fan data structure. - */ -static int -envd_setup_fans(void) -{ - int i, fd; - env_fan_t *fanp; - int fancnt = 0; - picl_nodehdl_t tnodeh; - - for (i = 0; (fanp = envd_fans[i]) != NULL; i++) { - fanp->last_status = FAN_OK; - - /* Make sure cpu0/1 present for validating cpu fans */ - if (fanp->id == CPU0_FAN_ID) { - if (ptree_get_node_by_path(CPU0_PATH, &tnodeh) != - PICL_SUCCESS) { - if (env_debug) { - envd_log(LOG_ERR, - "get node by path failed for %s\n", - CPU0_PATH); - } - fanp->present = B_FALSE; - continue; - } - } - if (fanp->id == CPU1_FAN_ID) { - if (ptree_get_node_by_path(CPU1_PATH, &tnodeh) != - PICL_SUCCESS) { - if (env_debug) { - envd_log(LOG_ERR, - "get node by path failed for %s\n", CPU0_PATH); - } - fanp->present = B_FALSE; - continue; - } - } - if ((fd = open(fanp->devfs_path, O_RDWR)) == -1) { - envd_log(LOG_CRIT, - ENV_FAN_OPEN_FAIL, fanp->name, - fanp->devfs_path, errno, strerror(errno)); - fanp->present = B_FALSE; - continue; - } - fanp->fd = fd; - fanp->present = B_TRUE; - fancnt++; - } - - if (fancnt == 0) - return (-1); - - return (0); -} - -static int -envd_setup_disks(void) -{ - int ret, i, page_index, page_len; - picl_nodehdl_t tnodeh; - env_disk_t *diskp; - uint_t vendor_id; - uint_t device_id; - uchar_t log_page[256]; - - if (ptree_get_node_by_path(SCSI_CONTROLLER_NODE_PATH, - &tnodeh) != PICL_SUCCESS) { - if (env_debug) { - envd_log(LOG_ERR, "On-Board SCSI controller %s " - "not found in the system.\n", - SCSI_CONTROLLER_NODE_PATH); - } - return (-1); - } - - if ((ret = ptree_get_propval_by_name(tnodeh, VENDOR_ID, - &vendor_id, sizeof (vendor_id))) != 0) { - if (env_debug) { - envd_log(LOG_ERR, "Error in getting vendor-id " - "for SCSI controller. ret = %d errno = 0x%d\n", - ret, errno); - } - return (-1); - } - if ((ret = ptree_get_propval_by_name(tnodeh, DEVICE_ID, - &device_id, sizeof (device_id))) != 0) { - if (env_debug) { - envd_log(LOG_ERR, "Error in getting device-id " - "for SCSI controller. ret = %d errno = 0x%d\n", - ret, errno); - } - return (-1); - } - - /* - * We have found LSI1064 SCSi controller onboard. - */ - for (i = 0; (diskp = envd_disks[i]) != NULL; i++) { - if (ptree_get_node_by_path(diskp->nodepath, - &tnodeh) != PICL_SUCCESS) { - diskp->present = B_FALSE; - if (env_debug) { - envd_log(LOG_ERR, - "DISK %d: %s not found in the system.\n", - diskp->id, diskp->nodepath); - } - continue; - } - if ((diskp->fd = open(diskp->devfs_path, O_RDONLY)) == -1) { - diskp->present = B_FALSE; - if (env_debug) { - envd_log(LOG_ERR, - "Error in opening %s errno = 0x%x\n", - diskp->devfs_path, errno); - } - continue; - } - diskp->present = B_TRUE; - diskp->tpage_supported = B_FALSE; - diskp->smart_supported = B_FALSE; - diskp->warning_tstamp = 0; - diskp->shutdown_tstamp = 0; - diskp->high_warning = disk_high_warn_temperature; - diskp->low_warning = disk_low_warn_temperature; - diskp->high_shutdown = disk_high_shutdown_temperature; - diskp->low_shutdown = disk_low_shutdown_temperature; - /* - * Find out if the Temperature page is supported by the disk. - */ - if (scsi_log_sense(diskp, SUPPORTED_LPAGES, log_page, - sizeof (log_page), 1) == 0) { - - page_len = ((log_page[2] << 8) & 0xFF00) | log_page[3]; - - for (page_index = LOGPAGEHDRSIZE; - page_index < page_len + LOGPAGEHDRSIZE; - page_index++) { - if (log_page[page_index] != TEMPERATURE_PAGE) - continue; - - diskp->tpage_supported = B_TRUE; - if (env_debug) { - envd_log(LOG_ERR, - "tpage supported for %s\n", - diskp->nodepath); - } - } - } - /* - * If the temp log page failed, we can check if this is - * a SATA drive and attempt to read the temperature - * using the SMART interface. - */ - if (diskp->tpage_supported != B_TRUE) { - uchar_t iec_page[IEC_PAGE_SIZE]; - - if (env_debug) - envd_log(LOG_ERR, "Turning on SMART\n"); - - (void) memset(iec_page, 0, sizeof (iec_page)); - iec_page[0] = IEC_PAGE; /* SMART PAGE */ - iec_page[1] = 0xa; /* length */ - /* Notification, only when requested */ - iec_page[3] = REPORT_ON_REQUEST; - - ret = scsi_mode_select(diskp, IEC_PAGE, - iec_page, sizeof (iec_page)); - - /* - * Since we know this is a SMART capable - * drive, we will try to set the page and - * determine if the drive is not capable - * of reading the TEMP page when we - * try to read the temperature and disable - * it then. We do not fail when reading - * or writing this page because we will - * determine the SMART capabilities - * when reading the temperature. - */ - if ((ret != 0) && (env_debug)) { - envd_log(LOG_ERR, - "Failed to set mode page"); - } - - diskp->smart_supported = B_TRUE; - diskp->tpage_supported = B_TRUE; - } - - if (get_disk_temp(diskp) < 0) { - envd_log(LOG_ERR, " error reading temperature of:%s\n", - diskp->name); - } else if (env_debug) { - envd_log(LOG_ERR, "%s: temperature = %d\n", - diskp->name, diskp->current_temp); - } - - } - - return (0); -} - -static int -envd_es_setup(void) -{ - seeprom_scn_t scn_hdr; - seeprom_seg_t seg_hdr; - es_data_t *envseg; - es_sensor_t *sensorp; - int i, fd, id; - int envseg_len, esd_len; - char *envsegp; - - /* - * Open the front io fru - */ - if ((fd = open(iofru_devname, O_RDONLY)) == -1) { - envd_log(LOG_ERR, ENV_FRU_OPEN_FAIL, iofru_devname, errno); - return (-1); - } - - /* - * Read section header from the fru SEEPROM - */ - if (lseek(fd, SSCN_OFFSET, SEEK_SET) == (off_t)-1 || - read(fd, &scn_hdr, sizeof (scn_hdr)) != sizeof (scn_hdr)) { - envd_log(LOG_ERR, ENV_FRU_BAD_ENVSEG, iofru_devname); - (void) close(fd); - return (-1); - } - if ((scn_hdr.sscn_tag != SSCN_TAG) || - (GET_UNALIGN16(&scn_hdr.sscn_ver) != SSCN_VER)) { - envd_log(LOG_ERR, ENV_FRU_BAD_SCNHDR, scn_hdr.sscn_tag, - GET_UNALIGN16(&scn_hdr.sscn_ver)); - (void) close(fd); - return (-1); - } - - /* - * Locate environmental segment - */ - for (i = 0; i < scn_hdr.sscn_nsegs; i++) { - if (read(fd, &seg_hdr, sizeof (seg_hdr)) != sizeof (seg_hdr)) { - envd_log(LOG_ERR, ENV_FRU_BAD_ENVSEG, iofru_devname); - (void) close(fd); - return (-1); - } - - if (env_debug) { - envd_log(LOG_INFO, - "Seg name: %x off:%x len:%x\n", - GET_UNALIGN16(&seg_hdr.sseg_name), - GET_UNALIGN16(&seg_hdr.sseg_off), - GET_UNALIGN16(&seg_hdr.sseg_len)); - } - - if (GET_UNALIGN16(&seg_hdr.sseg_name) == ENVSEG_NAME) - break; - } - if (i == scn_hdr.sscn_nsegs) { - envd_log(LOG_ERR, ENV_FRU_BAD_ENVSEG, iofru_devname); - (void) close(fd); - return (-1); - } - - /* - * Read environmental segment - */ - envseg_len = GET_UNALIGN16(&seg_hdr.sseg_len); - if ((envseg = malloc(envseg_len)) == NULL) { - envd_log(LOG_ERR, ENV_FRU_NOMEM_FOR_SEG, envseg_len); - (void) close(fd); - return (-1); - } - - if (lseek(fd, (off_t)GET_UNALIGN16(&seg_hdr.sseg_off), - SEEK_SET) == (off_t)-1 || - read(fd, envseg, envseg_len) != envseg_len) { - envd_log(LOG_ERR, ENV_FRU_BAD_ENVSEG, iofru_devname); - free(envseg); - (void) close(fd); - return (-1); - } - - /* - * Check environmental segment data for consistency - */ - esd_len = sizeof (*envseg) + - (envseg->esd_nsensors - 1) * sizeof (envseg->esd_sensors[0]); - if (envseg->esd_ver != ENVSEG_VERSION || envseg_len < esd_len) { - envd_log(LOG_ERR, ENV_FRU_BAD_ENVSEG, iofru_devname); - free(envseg); - (void) close(fd); - return (-1); - } - - /* - * Process environmental segment data - */ - if (envseg->esd_nsensors > MAX_SENSORS) { - envd_log(LOG_ERR, ENV_FRU_BAD_ENVSEG, iofru_devname); - free(envseg); - (void) close(fd); - return (-1); - } - - sensorp = &(envseg->esd_sensors[0]); - envsegp = (char *)envseg; - for (i = 0; i < envseg->esd_nsensors; i++) { - uint32_t ess_id; - - (void) memcpy(&ess_id, - sensorp->ess_id, sizeof (sensorp->ess_id)); - - if (env_debug) { - envd_log(LOG_INFO, "\n Sensor Id %x offset %x", - ess_id, sensorp->ess_off); - } - if (ess_id >= MAX_SENSORS) { - envd_log(LOG_ERR, ENV_FRU_BAD_ENVSEG, iofru_devname); - free(envseg); - (void) close(fd); - return (-1); - } - (void) memcpy(&sensor_ctl[ess_id], &envsegp[sensorp->ess_off], - sizeof (es_sensor_blk_t)); - - sensorp++; - } - - /* - * Match sensor/ES id and point to correct data based on IDs - */ - for (i = 0; i < N_ENVD_SENSORS; i++) { - id = envd_sensors[i]->id; - envd_sensors[i]->es = &sensor_ctl[id]; - } - - /* - * Cleanup and return - */ - free(envseg); - (void) close(fd); - - return (0); -} - -static void -envd_es_default_setup(void) -{ - int i, id; - - for (i = 0; i < N_ENVD_SENSORS; i++) { - id = envd_sensors[i]->id; - envd_sensors[i]->es = &sensor_default_ctl[id]; - } -} - -/* - * Open temperature sensor devices and initialize per sensor data structure. - */ -static int -envd_setup_sensors(void) -{ - env_sensor_t *sensorp; - int sensorcnt = 0; - int i; - picl_nodehdl_t tnodeh; - - for (i = 0; i < N_ENVD_SENSORS; i++) { - if (env_debug) - envd_log(LOG_ERR, "scanning sensor %d\n", i); - - sensorp = envd_sensors[i]; - - /* Initialize sensor's initial state */ - sensorp->shutdown_initiated = B_FALSE; - sensorp->warning_tstamp = 0; - sensorp->shutdown_tstamp = 0; - sensorp->error = 0; - - /* Make sure cpu0/1 sensors are present */ - if (sensorp->id == CPU0_SENSOR_ID) { - if (ptree_get_node_by_path(CPU0_PATH, &tnodeh) != - PICL_SUCCESS) { - if (env_debug) { - envd_log(LOG_ERR, - "get node by path failed for %s\n", - CPU0_PATH); - } - sensorp->present = B_FALSE; - continue; - } - } - if (sensorp->id == CPU1_SENSOR_ID) { - if (ptree_get_node_by_path(CPU1_PATH, &tnodeh) != - PICL_SUCCESS) { - if (env_debug) { - envd_log(LOG_ERR, - "get node by path failed for %s\n", - CPU1_PATH); - } - sensorp->present = B_FALSE; - continue; - } - } - - sensorp->fd = open(sensorp->devfs_path, O_RDWR); - if (sensorp->fd == -1) { - if (env_debug) { - envd_log(LOG_ERR, ENV_SENSOR_OPEN_FAIL, - sensorp->name, sensorp->devfs_path, - errno, strerror(errno)); - } - sensorp->present = B_FALSE; - continue; - } - - /* - * Determine if the front panel is attached, we want the - * information if it exists, but should not shut down - * the system if it is removed. - */ - if (sensorp->id == FRONT_PANEL_SENSOR_ID) { - tempr_t temp; - int tries; - - for (tries = 0; tries < MAX_SENSOR_RETRIES; tries++) { - if (ioctl(sensorp->fd, PIC_GET_TEMPERATURE, - &temp) == 0) { - break; - } - (void) sleep(1); - } - if (tries == MAX_SENSOR_RETRIES) - sensorp->present = B_FALSE; - } - - sensorp->present = B_TRUE; - sensorcnt++; - } - - if (sensorcnt == 0) - return (-1); - - return (0); -} - -/* ARGSUSED */ -static void * -pmthr(void *args) -{ - pm_state_change_t pmstate; - char physpath[PATH_MAX]; - int pre_lpstate; - uint8_t estar_state; - int env_monitor_fd; - - pmstate.physpath = physpath; - pmstate.size = sizeof (physpath); - cur_lpstate = 0; - pre_lpstate = 1; - - pm_fd = open(PM_DEVICE, O_RDWR); - if (pm_fd == -1) { - envd_log(LOG_ERR, PM_THREAD_EXITING, errno, strerror(errno)); - return (NULL); - } - for (;;) { - /* - * Get PM state change events to check if the system - * is in lowest power state and inform PIC which controls - * fan speeds. - * - * To minimize polling, we use the blocking interface - * to get the power state change event here. - */ - if (ioctl(pm_fd, PM_GET_STATE_CHANGE_WAIT, &pmstate) != 0) { - if (errno != EINTR) - break; - continue; - } - - do { - if (env_debug) { - envd_log(LOG_INFO, - "pmstate event:0x%x flags:%x" - "comp:%d oldval:%d newval:%d path:%s\n", - pmstate.event, pmstate.flags, - pmstate.component, - pmstate.old_level, - pmstate.new_level, - pmstate.physpath); - } - cur_lpstate = - (pmstate.flags & PSC_ALL_LOWEST) ? 1 : 0; - } while (ioctl(pm_fd, PM_GET_STATE_CHANGE, &pmstate) == 0); - - if (pre_lpstate != cur_lpstate) { - pre_lpstate = cur_lpstate; - estar_state = (cur_lpstate & 0x1); - if (env_debug) - envd_log(LOG_ERR, - "setting PIC ESTAR SATE to %x\n", - estar_state); - - env_monitor_fd = open(ENV_MONITOR_DEVFS, O_RDWR); - if (env_monitor_fd != -1) { - if (ioctl(env_monitor_fd, PIC_SET_ESTAR_MODE, - &estar_state) < 0) { - if (env_debug) - envd_log(LOG_ERR, - "unable to set ESTAR_MODE in PIC\n"); - } - (void) close(env_monitor_fd); - } else { - if (env_debug) - envd_log(LOG_ERR, - "Failed to open %s\n", - ENV_MONITOR_DEVFS); - } - } - } - - /*NOTREACHED*/ - return (NULL); -} - -/* - * This is env thread which monitors the current temperature when - * warning threshold is exceeded. The job is to make sure it does - * not execced/decrease shutdown threshold. If it does it will start - * forced shutdown to avoid reaching hardware poweroff via THERM interrupt. - */ -/*ARGSUSED*/ -static void * -system_temp_thr(void *args) -{ - char syscmd[BUFSIZ]; - char msgbuf[BUFSIZ]; - timespec_t to; - int ret, i; - env_sensor_t *sensorp; - pthread_mutex_t env_monitor_mutex = PTHREAD_MUTEX_INITIALIZER; - pthread_cond_t env_monitor_cv = PTHREAD_COND_INITIALIZER; - time_t ct; - tempr_t temp; - - for (;;) { - /* - * Sleep for specified seconds before issuing IOCTL - * again. - */ - (void) pthread_mutex_lock(&env_monitor_mutex); - ret = pthread_cond_reltimedwait_np(&env_monitor_cv, - &env_monitor_mutex, &to); - to.tv_sec = sensor_scan_interval; - to.tv_nsec = 0; - if (ret != ETIMEDOUT) { - (void) pthread_mutex_unlock(&env_monitor_mutex); - continue; - } - - (void) pthread_mutex_unlock(&env_monitor_mutex); - for (i = 0; i < N_ENVD_SENSORS; i++) { - sensorp = envd_sensors[i]; - if (sensorp->present == B_FALSE) - continue; - if (get_temperature(sensorp, &temp) == -1) - continue; - - sensorp->cur_temp = temp; - if (env_debug) { - envd_log(LOG_ERR, - "%s temp = %d", - sensorp->name, sensorp->cur_temp); - } - - /* - * If this sensor already triggered system shutdown, - * don't log any more shutdown/warning messages for it. - */ - if (sensorp->shutdown_initiated) - continue; - - /* - * Check for the temperature in warning and shutdown - * range and take appropriate action. - */ - if (SENSOR_TEMP_IN_WARNING_RANGE(sensorp->cur_temp, - sensorp)) { - /* - * Check if the temperature has been in - * warning range during last - * sensor_warning_duration interval. If so, - * the temperature is truly in warning range - * and we need to log a warning message, but - * no more than once every - * sensor_warning_interval seconds. - */ - time_t wtstamp = sensorp->warning_tstamp; - - ct = (time_t)(gethrtime() / NANOSEC); - if (sensorp->warning_start == 0) - sensorp->warning_start = ct; - if (((ct - sensorp->warning_start) >= - sensor_warning_duration) && - (wtstamp == 0 || (ct - wtstamp) >= - sensor_warning_interval)) { - envd_log(LOG_CRIT, ENV_WARNING_MSG, - sensorp->name, sensorp->cur_temp, - (int8_t) - sensorp->es->esb_low_warning, - (int8_t) - sensorp->es->esb_high_warning); - - sensorp->warning_tstamp = ct; - } - } else if (sensorp->warning_start != 0) - sensorp->warning_start = 0; - - if (!shutdown_override && - SENSOR_TEMP_IN_SHUTDOWN_RANGE(sensorp->cur_temp, - sensorp)) { - ct = (time_t)(gethrtime() / NANOSEC); - if (sensorp->shutdown_tstamp == 0) - sensorp->shutdown_tstamp = ct; - - /* - * Shutdown the system if the temperature - * remains in the shutdown range for over - * sensor_shutdown_interval seconds. - */ - if ((ct - sensorp->shutdown_tstamp) >= - sensor_shutdown_interval) { - /* - * Log error - */ - sensorp->shutdown_initiated = B_TRUE; - - (void) snprintf(msgbuf, sizeof (msgbuf), - ENV_SHUTDOWN_MSG, sensorp->name, - sensorp->cur_temp, - (int8_t) - sensorp->es->esb_low_shutdown, - (int8_t) - sensorp->es->esb_high_shutdown); - - envd_log(LOG_ALERT, msgbuf); - - /* - * Shutdown the system (only once) - */ - if (system_shutdown_started == - B_FALSE) { - (void) snprintf(syscmd, - sizeof (syscmd), - "%s \"%s\"", shutdown_cmd, - msgbuf); - - envd_log(LOG_ALERT, syscmd); - system_shutdown_started = - B_TRUE; - - (void) system(syscmd); - } - } - } else if (sensorp->shutdown_tstamp != 0) - sensorp->shutdown_tstamp = 0; - } - } /* end of forever loop */ - - /*NOTREACHED*/ - return (NULL); -} - -static int -scsi_log_sense(env_disk_t *diskp, uchar_t page_code, void *pagebuf, - uint16_t pagelen, int page_control) -{ - struct uscsi_cmd ucmd_buf; - uchar_t cdb_buf[CDB_GROUP1]; - struct scsi_extended_sense sense_buf; - int ret_val; - - bzero(&cdb_buf, sizeof (cdb_buf)); - bzero(&ucmd_buf, sizeof (ucmd_buf)); - bzero(&sense_buf, sizeof (sense_buf)); - - cdb_buf[0] = SCMD_LOG_SENSE_G1; - - /* - * For SATA we need to have the current threshold value set. - * For SAS drives we can use the current cumulative value. - * This is set for non-SMART drives, by passing a non-zero - * page_control. - */ - if (page_control) - cdb_buf[2] = (0x01 << 6) | page_code; - else - cdb_buf[2] = page_code; - - cdb_buf[7] = (uchar_t)((pagelen & 0xFF00) >> 8); - cdb_buf[8] = (uchar_t)(pagelen & 0x00FF); - - ucmd_buf.uscsi_cdb = (char *)cdb_buf; - ucmd_buf.uscsi_cdblen = sizeof (cdb_buf); - ucmd_buf.uscsi_bufaddr = (caddr_t)pagebuf; - ucmd_buf.uscsi_buflen = pagelen; - ucmd_buf.uscsi_rqbuf = (caddr_t)&sense_buf; - ucmd_buf.uscsi_rqlen = sizeof (struct scsi_extended_sense); - ucmd_buf.uscsi_flags = USCSI_RQENABLE | USCSI_READ | USCSI_SILENT; - ucmd_buf.uscsi_timeout = DEFAULT_SCSI_TIMEOUT; - - ret_val = ioctl(diskp->fd, USCSICMD, ucmd_buf); - if ((ret_val == 0) && (ucmd_buf.uscsi_status == 0)) { - if (env_debug) - envd_log(LOG_ERR, - "log sense command for page_code 0x%x succeeded\n", page_code); - return (ret_val); - } - if (env_debug) - envd_log(LOG_ERR, "log sense command for %s failed. " - "page_code 0x%x ret_val = 0x%x " - "status = 0x%x errno = 0x%x\n", diskp->name, page_code, - ret_val, ucmd_buf.uscsi_status, errno); - - return (1); -} - - -static int -get_disk_temp(env_disk_t *diskp) -{ - int ret; - uchar_t tpage[256]; - - if (diskp->smart_supported == B_TRUE) { - smart_structure smartpage; - smart_attribute *temp_attrib = NULL; - uint8_t checksum; - uint8_t *index; - int i; - - bzero(&smartpage, sizeof (smartpage)); - - ret = scsi_log_sense(diskp, GET_SMART_INFO, - &smartpage, sizeof (smartpage), 0); - - if (ret != 0) { - diskp->current_temp = DISK_INVALID_TEMP; - diskp->ref_temp = DISK_INVALID_TEMP; - return (-1); - } - - /* - * verify the checksum of the data. A 2's compliment - * of the result addition of the is stored in the - * last byte. The sum of all the checksum should be - * 0. If the checksum is bad, return an error for - * this iteration. - */ - index = (uint8_t *)&smartpage; - - for (i = checksum = 0; i < 512; i++) - checksum += index[i]; - - if ((checksum != 0) && env_debug) { - envd_log(LOG_ERR, - "SMART checksum error! 0x%x\n", checksum); - - /* - * We got bad data back from the drive, fail this - * time around and picl will retry again. If this - * continues to fail picl will give this drive a - * failed status. - */ - diskp->current_temp = DISK_INVALID_TEMP; - diskp->ref_temp = DISK_INVALID_TEMP; - - return (-1); - } - - /* - * Scan through the various SMART data and look for - * the complete drive temp. - */ - - for (i = 0; (i < SMART_FIELDS) && - (smartpage.attribute[i].id != 0) && - (temp_attrib == NULL); i++) { - - if (smartpage.attribute[i].id == HDA_TEMP) { - temp_attrib = &smartpage.attribute[i]; - } - } - - /* - * If we dont find any temp SMART attributes, this drive - * does not support this page, disable temp checking - * for this drive. - */ - if (temp_attrib == NULL) { - - /* - * If the checksum is valid, the temp. attributes are - * not supported, disable this drive from temp. - * checking. - */ - if (env_debug) - envd_log(LOG_ERR, - "Temp ATTRIBUTE not supported\n"); - diskp->smart_supported = B_FALSE; - diskp->tpage_supported = B_FALSE; - diskp->current_temp = DISK_INVALID_TEMP; - diskp->ref_temp = DISK_INVALID_TEMP; - - return (-1); - } - - if (env_debug) { - envd_log(LOG_ERR, "flags = 0x%x%x,curr = 0x%x," - "data = 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x\n", - temp_attrib->flags[0], temp_attrib->flags[1], - temp_attrib->raw_data[0], temp_attrib->raw_data[1], - temp_attrib->raw_data[2], temp_attrib->raw_data[3], - temp_attrib->raw_data[4], temp_attrib->raw_data[5], - temp_attrib->raw_data[6], temp_attrib->raw_data[7]); - } - if (temp_attrib->raw_data[1] != 0xFF) { - diskp->current_temp = temp_attrib->raw_data[2]; - diskp->ref_temp = temp_attrib->raw_data[2]; - } else { - diskp->ref_temp = DISK_INVALID_TEMP; - diskp->current_temp = DISK_INVALID_TEMP; - - return (-1); - } - - } else { - ret = scsi_log_sense(diskp, TEMPERATURE_PAGE, tpage, - sizeof (tpage), 1); - - if (ret != 0) { - diskp->current_temp = DISK_INVALID_TEMP; - diskp->ref_temp = DISK_INVALID_TEMP; - return (-1); - } - /* - * For the current temperature verify that the parameter - * length is 0x02 and the parameter code is 0x00 - * Temperature value of 255(0xFF) is considered INVALID. - */ - if ((tpage[7] == 0x02) && (tpage[4] == 0x00) && - (tpage[5] == 0x00)) { - if (tpage[9] == 0xFF) { - diskp->current_temp = DISK_INVALID_TEMP; - return (-1); - } else { - diskp->current_temp = tpage[9]; - } - } - - /* - * For the reference temperature verify that the parameter - * length is 0x02 and the parameter code is 0x01 - * Temperature value of 255(0xFF) is considered INVALID. - */ - if ((tpage[13] == 0x02) && (tpage[10] == 0x00) && - (tpage[11] == 0x01)) { - if (tpage[15] == 0xFF) { - diskp->ref_temp = DISK_INVALID_TEMP; - } else { - diskp->ref_temp = tpage[15]; - } - } - } - return (0); -} - -/* ARGSUSED */ -static void * -disk_temp_thr(void *args) -{ - char syscmd[BUFSIZ]; - char msgbuf[BUFSIZ]; - timespec_t to; - int ret, i; - env_disk_t *diskp; - pthread_mutex_t env_monitor_mutex = PTHREAD_MUTEX_INITIALIZER; - pthread_cond_t env_monitor_cv = PTHREAD_COND_INITIALIZER; - pm_state_change_t pmstate; - int idle_time; - int disk_pm_fd; - time_t ct; - - if ((disk_pm_fd = open(PM_DEVICE, O_RDWR)) == -1) { - envd_log(LOG_ERR, DISK_TEMP_THREAD_EXITING, - errno, strerror(errno)); - return (NULL); - } - - for (;;) { - /* - * Sleep for specified seconds before issuing IOCTL - * again. - */ - (void) pthread_mutex_lock(&env_monitor_mutex); - ret = pthread_cond_reltimedwait_np(&env_monitor_cv, - &env_monitor_mutex, &to); - - to.tv_sec = disk_scan_interval; - to.tv_nsec = 0; - - if (ret != ETIMEDOUT) { - (void) pthread_mutex_unlock( - &env_monitor_mutex); - continue; - } - (void) pthread_mutex_unlock(&env_monitor_mutex); - - for (i = 0; (diskp = envd_disks[i]) != NULL; i++) { - if (diskp->present == B_FALSE) - continue; - if (diskp->tpage_supported == B_FALSE) - continue; - /* - * If the disk temperature is above the warning threshold - * continue monitoring until the temperature drops below - * warning threshold. - * if the temperature is in the NORMAL range monitor only - * when the disk is BUSY. - * We do not want to read the disk temperature if the disk is - * is idling. The reason for this is disk will never get into - * lowest power mode if we scan the disk temperature - * peridoically. To avoid this situation we first determine - * the idle_time of the disk. If the disk has been IDLE since - * we scanned the temperature last time we will not read the - * temperature. - */ - if (!DISK_TEMP_IN_WARNING_RANGE(diskp->current_temp, diskp)) { - pmstate.physpath = diskp->physpath; - pmstate.size = strlen(diskp->physpath); - pmstate.component = 0; - if ((idle_time = - ioctl(disk_pm_fd, PM_GET_TIME_IDLE, - &pmstate)) == -1) { - - if (errno != EINTR) { - if (env_debug) - envd_log(LOG_ERR, - "ioctl PM_GET_TIME_IDLE failed for DISK0. errno=0x%x\n", - errno); - continue; - } - continue; - } - if (idle_time >= (disk_scan_interval/2)) { - if (env_debug) { - envd_log(LOG_ERR, "%s idle time = %d\n", - diskp->name, idle_time); - } - continue; - } - } - ret = get_disk_temp(diskp); - if (ret != 0) - continue; - if (env_debug) { - envd_log(LOG_ERR, "%s temp = %d ref. temp = %d\n", - diskp->name, diskp->current_temp, diskp->ref_temp); - } - /* - * If this disk already triggered system shutdown, don't - * log any more shutdown/warning messages for it. - */ - if (diskp->shutdown_initiated) - continue; - - /* - * Check for the temperature in warning and shutdown range - * and take appropriate action. - */ - if (DISK_TEMP_IN_WARNING_RANGE(diskp->current_temp, diskp)) { - /* - * Check if the temperature has been in warning - * range during last disk_warning_duration interval. - * If so, the temperature is truly in warning - * range and we need to log a warning message, - * but no more than once every disk_warning_interval - * seconds. - */ - time_t wtstamp = diskp->warning_tstamp; - - ct = (time_t)(gethrtime() / NANOSEC); - if (diskp->warning_start == 0) - diskp->warning_start = ct; - if (((ct - diskp->warning_start) >= - disk_warning_duration) && (wtstamp == 0 || - (ct - wtstamp) >= disk_warning_interval)) { - envd_log(LOG_CRIT, ENV_WARNING_MSG, - diskp->name, diskp->current_temp, - diskp->low_warning, - diskp->high_warning); - diskp->warning_tstamp = ct; - } - } else if (diskp->warning_start != 0) - diskp->warning_start = 0; - - if (!shutdown_override && - DISK_TEMP_IN_SHUTDOWN_RANGE(diskp->current_temp, diskp)) { - ct = (time_t)(gethrtime() / NANOSEC); - if (diskp->shutdown_tstamp == 0) - diskp->shutdown_tstamp = ct; - - /* - * Shutdown the system if the temperature remains - * in the shutdown range for over disk_shutdown_interval - * seconds. - */ - if ((ct - diskp->shutdown_tstamp) >= - disk_shutdown_interval) { - /* log error */ - diskp->shutdown_initiated = B_TRUE; - (void) snprintf(msgbuf, sizeof (msgbuf), - ENV_SHUTDOWN_MSG, diskp->name, - diskp->current_temp, diskp->low_shutdown, - diskp->high_shutdown); - envd_log(LOG_ALERT, msgbuf); - - /* shutdown the system (only once) */ - if (system_shutdown_started == B_FALSE) { - (void) snprintf(syscmd, sizeof (syscmd), - "%s \"%s\"", shutdown_cmd, msgbuf); - envd_log(LOG_ALERT, syscmd); - system_shutdown_started = B_TRUE; - (void) system(syscmd); - } - } - } else if (diskp->shutdown_tstamp != 0) - diskp->shutdown_tstamp = 0; - } - } /* end of forever loop */ -} - -static void * -fan_thr(void *args) -{ - char msgbuf[BUFSIZ]; - timespec_t to; - int ret, i; - pthread_mutex_t env_monitor_mutex = PTHREAD_MUTEX_INITIALIZER; - pthread_cond_t env_monitor_cv = PTHREAD_COND_INITIALIZER; - env_fan_t *fanp; - - - for (;;) { - /* - * Sleep for specified seconds before issuing IOCTL - * again. - */ - (void) pthread_mutex_lock(&env_monitor_mutex); - ret = pthread_cond_reltimedwait_np(&env_monitor_cv, - &env_monitor_mutex, &to); - to.tv_sec = fan_scan_interval; - to.tv_nsec = 0; - if (ret != ETIMEDOUT) { - (void) pthread_mutex_unlock(&env_monitor_mutex); - continue; - } - (void) pthread_mutex_unlock(&env_monitor_mutex); - - for (i = 0; (fanp = envd_fans[i]) != NULL; i++) { - if (fanp->present == B_FALSE) - continue; - - if (has_fan_failed(fanp) == B_TRUE) { - if (fanp->last_status == FAN_FAILED) - continue; - fanp->last_status = FAN_FAILED; - (void) snprintf(msgbuf, sizeof (msgbuf), - ENV_FAN_FAILURE_WARNING_MSG, fanp->name, - fan_rpm_string, fan_status_string); - envd_log(LOG_ALERT, msgbuf); - } else { - if (fanp->last_status == FAN_OK) - continue; - fanp->last_status = FAN_OK; - (void) snprintf(msgbuf, sizeof (msgbuf), - ENV_FAN_OK_MSG, fanp->name); - envd_log(LOG_ALERT, msgbuf); - } - } - - if (has_psufan_failed() == B_TRUE) { - if (psufan_last_status == FAN_FAILED) - continue; - psufan_last_status = FAN_FAILED; - (void) snprintf(msgbuf, sizeof (msgbuf), - ENV_FAN_FAILURE_WARNING_MSG, SENSOR_PSU, - fan_rpm_string, fan_status_string); - envd_log(LOG_ALERT, msgbuf); - } else { - if (psufan_last_status == FAN_OK) - continue; - psufan_last_status = FAN_OK; - (void) snprintf(msgbuf, sizeof (msgbuf), - ENV_FAN_OK_MSG, SENSOR_PSU); - envd_log(LOG_ALERT, msgbuf); - } - } - - /*NOTREACHED*/ - return (NULL); -} - -/* - * Setup envrionmental monitor state and start threads to monitor - * temperature, fan, disk and power management state. - * Returns -1 on error, 0 if successful. - */ -static int -envd_setup(void) -{ - - if (getenv("SUNW_piclenvd_debug") != NULL) - env_debug = 1; - - if (pthread_attr_init(&thr_attr) != 0 || - pthread_attr_setscope(&thr_attr, PTHREAD_SCOPE_SYSTEM) != 0) { - return (-1); - } - - /* - * If ES segment is not present or has inconsistent information, we - * use default values for sensor limits. For the sake of simplicity, - * we still store these limits internally in the 'es' member in the - * structure. - */ - if (envd_es_setup() < 0) { - envd_log(LOG_WARNING, ENV_DEFAULT_LIMITS); - envd_es_default_setup(); - } - - if (envd_setup_sensors() < 0) { - if (env_debug) - envd_log(LOG_ERR, "Failed to setup sensors\n"); - system_temp_monitor = 0; - } - - if (envd_setup_fans() < 0) { - if (env_debug) - envd_log(LOG_ERR, "Failed to setup fans\n"); - fan_monitor = 0; - pm_monitor = 0; - } - - /* - * Disable disk temperature monitoring until we have - * LSI fw support to read SATA disk temperature - */ - if (disk_temp_monitor) { - if (envd_setup_disks() < 0) { - if (env_debug) - envd_log(LOG_ERR, "Failed to setup disks\n"); - disk_temp_monitor = 0; - } - } - - /* - * Create a thread to monitor system temperatures - */ - if ((system_temp_monitor) && (system_temp_thr_created == B_FALSE)) { - if (pthread_create(&system_temp_thr_id, &thr_attr, - system_temp_thr, NULL) != 0) { - envd_log(LOG_ERR, ENVTHR_THREAD_CREATE_FAILED); - } else { - system_temp_thr_created = B_TRUE; - if (env_debug) - envd_log(LOG_ERR, - "Created thread to monitor system temperatures\n"); - } - } - - /* - * Create a thread to monitor fans - */ - if ((fan_monitor) && (fan_thr_created == B_FALSE)) { - if (pthread_create(&fan_thr_id, &thr_attr, fan_thr, NULL) != 0) - envd_log(LOG_ERR, ENVTHR_THREAD_CREATE_FAILED); - else { - fan_thr_created = B_TRUE; - if (env_debug) { - envd_log(LOG_ERR, - "Created thread to monitor system fans\n"); - } - } - } - - /* - * Create a thread to monitor PM state - */ - if ((pm_monitor) && (pmthr_created == B_FALSE)) { - if (pthread_create(&pmthr_tid, &thr_attr, pmthr, NULL) != 0) - envd_log(LOG_CRIT, PM_THREAD_CREATE_FAILED); - else { - pmthr_created = B_TRUE; - if (env_debug) - envd_log(LOG_ERR, - "Created thread to monitor system power state\n"); - } - } - - /* - * Create a thread to monitor disk temperature - */ - if ((disk_temp_monitor) && (disk_temp_thr_created == B_FALSE)) { - if (pthread_create(&disk_temp_thr_id, &thr_attr, - disk_temp_thr, NULL) != 0) { - envd_log(LOG_ERR, ENVTHR_THREAD_CREATE_FAILED); - } else { - disk_temp_thr_created = B_TRUE; - if (env_debug) - envd_log(LOG_ERR, - "Created thread for disk temperatures\n"); - } - } - - return (0); -} - -static void -piclenvd_register(void) -{ - picld_plugin_register(&my_reg_info); -} - -static void -piclenvd_init(void) -{ - - (void) env_picl_setup_tuneables(); - - /* - * Do not allow disk temperature monitoring to be enabled - * via tuneables. Disk temperature monitoring is disabled - * until we have LSI fw support to read the temperature of - * SATA disks - */ - disk_temp_monitor = 0; - - /* - * Setup the environmental data structures - */ - if (envd_setup() != 0) { - envd_log(LOG_CRIT, ENVD_PLUGIN_INIT_FAILED); - return; - } - - /* - * Now setup/populate PICL tree - */ - env_picl_setup(); -} - -static void -piclenvd_fini(void) -{ - - /* - * Invoke env_picl_destroy() to remove any PICL nodes/properties - * (including volatile properties) we created. Once this call - * returns, there can't be any more calls from the PICL framework - * to get current temperature or fan speed. - */ - env_picl_destroy(); - envd_close_sensors(); - envd_close_fans(); -} - -/*VARARGS2*/ -void -envd_log(int pri, const char *fmt, ...) -{ - va_list ap; - - va_start(ap, fmt); - vsyslog(pri, fmt, ap); - va_end(ap); -} - -/* - * Tunables support functions - */ -static env_tuneable_t * -tuneable_lookup(picl_prophdl_t proph) -{ - int i; - env_tuneable_t *tuneablep = NULL; - - for (i = 0; i < ntuneables; i++) { - tuneablep = &tuneables[i]; - if (tuneablep->proph == proph) - return (tuneablep); - } - - return (NULL); -} - -static int -get_string_val(ptree_rarg_t *parg, void *buf) -{ - picl_prophdl_t proph; - env_tuneable_t *tuneablep; - - proph = parg->proph; - - tuneablep = tuneable_lookup(proph); - - if (tuneablep == NULL) - return (PICL_FAILURE); - - (void) memcpy(buf, tuneablep->value, tuneablep->nbytes); - - return (PICL_SUCCESS); -} - -static int -set_string_val(ptree_warg_t *parg, const void *buf) -{ - picl_prophdl_t proph; - env_tuneable_t *tuneablep; - - if (parg->cred.dc_euid != 0) - return (PICL_PERMDENIED); - - proph = parg->proph; - - tuneablep = tuneable_lookup(proph); - - if (tuneablep == NULL) - return (PICL_FAILURE); - - (void) memcpy(tuneables->value, buf, tuneables->nbytes); - - - return (PICL_SUCCESS); -} - -static int -get_int_val(ptree_rarg_t *parg, void *buf) -{ - picl_prophdl_t proph; - env_tuneable_t *tuneablep; - - proph = parg->proph; - - tuneablep = tuneable_lookup(proph); - - if (tuneablep == NULL) - return (PICL_FAILURE); - - (void) memcpy(buf, tuneablep->value, tuneablep->nbytes); - - return (PICL_SUCCESS); -} - -static int -set_int_val(ptree_warg_t *parg, const void *buf) -{ - picl_prophdl_t proph; - env_tuneable_t *tuneablep; - - if (parg->cred.dc_euid != 0) - return (PICL_PERMDENIED); - - proph = parg->proph; - - tuneablep = tuneable_lookup(proph); - - if (tuneablep == NULL) - return (PICL_FAILURE); - - (void) memcpy(tuneablep->value, buf, tuneablep->nbytes); - - return (PICL_SUCCESS); -} - -boolean_t -has_fan_failed(env_fan_t *fanp) -{ - fanspeed_t fan_speed; - uchar_t status; - uint8_t tach; - int real_tach; - int ret, ntries; - - if (fanp->fd == -1) - return (B_TRUE); - - /* - * Read RF_FAN_STATUS bit of the fan fault register, retry if - * the PIC is busy, with a 1 second delay to allow it to update. - */ - for (ntries = 0; ntries < MAX_RETRIES_FOR_FAN_FAULT; ntries++) { - ret = ioctl(fanp->fd, PIC_GET_FAN_STATUS, &status); - if ((ret == 0) && ((status & 0x1) == 0)) - break; - (void) sleep(1); - } - - if (ntries > 0) { - if (env_debug) { - envd_log(LOG_ERR, - "%d retries attempted in reading fan status.\n", - ntries); - } - } - - if (ntries == MAX_RETRIES_FOR_FAN_FAULT) { - (void) strncpy(fan_status_string, NOT_AVAILABLE, - sizeof (fan_status_string)); - (void) strncpy(fan_rpm_string, NOT_AVAILABLE, - sizeof (fan_rpm_string)); - return (B_TRUE); - } - - if (env_debug) - envd_log(LOG_ERR, "fan status = 0x%x\n", status); - - /* - * ST_FFAULT bit isn't implemented yet and we're reading only - * individual fan status - */ - if (status & 0x1) { - (void) snprintf(fan_status_string, sizeof (fan_status_string), - "0x%x", status); - if (ioctl(fanp->fd, PIC_GET_FAN_SPEED, &tach) != 0) { - (void) strncpy(fan_rpm_string, NOT_AVAILABLE, - sizeof (fan_rpm_string)); - } else { - real_tach = tach << 8; - fan_speed = TACH_TO_RPM(real_tach); - (void) snprintf(fan_rpm_string, sizeof (fan_rpm_string), - "%d", fan_speed); - } - return (B_TRUE); - } - - return (B_FALSE); -} - -boolean_t -has_psufan_failed(void) -{ - uchar_t status; - int ret, ntries; - - if (envd_sensor_psu.fd == -1) - return (B_FALSE); - - /* - * For psu, only fan fault is visible, no fan speed - */ - (void) strncpy(fan_rpm_string, NOT_AVAILABLE, sizeof (fan_rpm_string)); - - /* - * Read RF_FAN_STATUS bit of the fan fault register, retry if - * the PIC is busy, with a 1 second delay to allow it to update. - */ - for (ntries = 0; ntries < MAX_RETRIES_FOR_FAN_FAULT; ntries++) { - ret = ioctl(envd_sensor_psu.fd, PIC_GET_FAN_STATUS, &status); - if ((ret == 0) && ((status & 0x1) == 0)) - break; - (void) sleep(1); - } - - if (ntries > 0) { - if (env_debug) { - envd_log(LOG_ERR, - "%d retries attempted in reading fan status.\n", - ntries); - } - } - - if (ntries == MAX_RETRIES_FOR_FAN_FAULT) { - (void) strncpy(fan_status_string, NOT_AVAILABLE, - sizeof (fan_status_string)); - return (B_TRUE); - } - - if (env_debug) - envd_log(LOG_ERR, "fan status = 0x%x\n", status); - - if (status & 0x1) { - (void) snprintf(fan_status_string, sizeof (fan_status_string), - "0x%x", status); - return (B_TRUE); - } - - return (B_FALSE); -} - -static int -scsi_mode_select(env_disk_t *diskp, uchar_t page_code, uchar_t *pagebuf, - uint16_t pagelen) -{ - struct uscsi_cmd ucmd_buf; - uchar_t cdb_buf[CDB_GROUP1]; - struct scsi_extended_sense sense_buf; - int ret_val; - - bzero(&cdb_buf, sizeof (cdb_buf)); - bzero(&ucmd_buf, sizeof (ucmd_buf)); - bzero(&sense_buf, sizeof (sense_buf)); - - cdb_buf[0] = SCMD_MODE_SELECT_G1; - cdb_buf[1] = 1<> 8); - cdb_buf[8] = (uchar_t)(pagelen & 0x00FF); - - ucmd_buf.uscsi_cdb = (char *)cdb_buf; - ucmd_buf.uscsi_cdblen = sizeof (cdb_buf); - ucmd_buf.uscsi_bufaddr = (caddr_t)pagebuf; - ucmd_buf.uscsi_buflen = pagelen; - ucmd_buf.uscsi_rqbuf = (caddr_t)&sense_buf; - ucmd_buf.uscsi_rqlen = sizeof (struct scsi_extended_sense); - ucmd_buf.uscsi_flags = USCSI_RQENABLE | USCSI_WRITE | USCSI_SILENT; - ucmd_buf.uscsi_timeout = DEFAULT_SCSI_TIMEOUT; - - ret_val = ioctl(diskp->fd, USCSICMD, ucmd_buf); - - if (ret_val == 0 && ucmd_buf.uscsi_status == 0) { - return (ret_val); - } - if (env_debug) - envd_log(LOG_ERR, "mode select command for %s failed. " - "page_code 0x%x ret_val = 0x%x " - "status = 0x%x errno = 0x%x\n", diskp->name, page_code, - ret_val, ucmd_buf.uscsi_status, errno); - - return (1); - -} diff --git a/usr/src/cmd/picl/plugins/sun4u/chicago/envd/piclenvsetup.c b/usr/src/cmd/picl/plugins/sun4u/chicago/envd/piclenvsetup.c deleted file mode 100644 index 0d4578e9eb..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chicago/envd/piclenvsetup.c +++ /dev/null @@ -1,1018 +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" - -/* - * This file contains code for setting up environmental related nodes - * and properties in the PICL tree. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "picldefs.h" -#include "envd.h" - -/* - * Volatile property read/write function typedef - */ -typedef int ptree_vol_rdfunc_t(ptree_rarg_t *parg, void *buf); -typedef int ptree_vol_wrfunc_t(ptree_warg_t *parg, const void *buf); - -extern int disk_temp_monitor; -extern env_tuneable_t tuneables[]; -extern int errno; -extern int ntuneables; -#define PROP_FAN_SPEED_UNIT_VALUE "rpm" - -/* - * Sensor node data structure - */ -typedef struct { - char *parent_path; /* parent path */ - char *sensor_name; /* sensor name */ - env_sensor_t *sensorp; /* sensor info */ - picl_nodehdl_t nodeh; /* sensor node handle */ - picl_prophdl_t proph; /* "Temperature" property handle */ - picl_prophdl_t target_proph; /* "TargetTemp" property handle */ -} sensor_node_t; - -/* - * Sensor nodes array - */ -static sensor_node_t sensor_nodes[] = { - {"/platform/ebus@1f,464000/env-monitor@3,0", SENSOR_CPU0, - NULL, NULL, NULL, NULL}, - {"/platform/ebus@1f,464000/env-monitor@3,0", SENSOR_CPU1, - NULL, NULL, NULL, NULL}, - {"/platform/ebus@1f,464000/env-monitor@3,0", SENSOR_MB, - NULL, NULL, NULL, NULL}, - {"/platform/ebus@1f,464000/env-monitor@3,0", SENSOR_ADT7462, - NULL, NULL, NULL, NULL}, - {"/platform/ebus@1f,464000/env-monitor@3,0", SENSOR_LM95221, - NULL, NULL, NULL, NULL}, - {"/platform/ebus@1f,464000/env-monitor@3,0", SENSOR_FIRE, - NULL, NULL, NULL, NULL}, - {"/platform/ebus@1f,464000/env-monitor@3,0", SENSOR_LSI1064, - NULL, NULL, NULL, NULL}, - {"/platform/ebus@1f,464000/env-monitor@3,0", SENSOR_FRONT_PANEL, - NULL, NULL, NULL, NULL}, - {"/platform/ebus@1f,464000/env-monitor@3,0", SENSOR_PSU, - NULL, NULL, NULL, NULL} -}; -#define N_SENSOR_NODES (sizeof (sensor_nodes)/sizeof (sensor_nodes[0])) - -/* - * Fan node data structure - */ -typedef struct { - char *parent_path; /* parent node path */ - char *fan_name; /* fan name */ - env_fan_t *fanp; /* fan information */ - char *speed_unit; /* speed unit string */ - picl_nodehdl_t nodeh; /* "fan" node handle */ - picl_prophdl_t proph; /* "Speed" property handle */ -} fan_node_t; - -/* - * Fan node array - */ -static fan_node_t fan_nodes[] = { - {"/platform/ebus@1f,464000/env-monitor@3,0", ENV_SYSTEM_FAN0, - NULL, PROP_FAN_SPEED_UNIT_VALUE, NULL, NULL}, - {"/platform/ebus@1f,464000/env-monitor@3,0", ENV_SYSTEM_FAN1, - NULL, PROP_FAN_SPEED_UNIT_VALUE, NULL, NULL}, - {"/platform/ebus@1f,464000/env-monitor@3,0", ENV_SYSTEM_FAN2, - NULL, PROP_FAN_SPEED_UNIT_VALUE, NULL, NULL}, - {"/platform/ebus@1f,464000/env-monitor@3,0", ENV_SYSTEM_FAN3, - NULL, PROP_FAN_SPEED_UNIT_VALUE, NULL, NULL}, - {"/platform/ebus@1f,464000/env-monitor@3,0", ENV_SYSTEM_FAN4, - NULL, PROP_FAN_SPEED_UNIT_VALUE, NULL, NULL} -}; -#define N_FAN_NODES (sizeof (fan_nodes)/sizeof (fan_nodes[0])) - -/* - * Disk node data structure - */ -typedef struct { - char *parent_path; /* parent node path */ - char *disk_name; /* disk name */ - env_disk_t *diskp; /* disk information */ - picl_nodehdl_t nodeh; /* "disk" node handle */ - picl_prophdl_t proph; /* "Temperature" property handle */ -} disk_node_t; - -/* - * Disk node array - */ -static disk_node_t disk_nodes[] = { - {DISK0_NODE_PATH, ENV_DISK0, NULL, NULL, NULL}, - {DISK1_NODE_PATH, ENV_DISK1, NULL, NULL, NULL}, - {DISK2_NODE_PATH, ENV_DISK2, NULL, NULL, NULL}, - {DISK3_NODE_PATH, ENV_DISK3, NULL, NULL, NULL} -}; -#define N_DISK_NODES (sizeof (disk_nodes)/sizeof (disk_nodes[0])) - -/* - * Miscellaneous declarations - */ -static void delete_sensor_nodes_and_props(void); -static void delete_disk_nodes_and_props(void); -static void delete_fan_nodes_and_props(void); - - -/* - * Read function for volatile "Temperature" property - */ -static int -get_current_temp(ptree_rarg_t *parg, void *buf) -{ - tempr_t temp; - picl_prophdl_t proph; - sensor_node_t *snodep; - int i; - - /* - * Locate the sensor in our sensor_nodes table by matching the - * property handle and get its temperature. - */ - proph = parg->proph; - for (i = 0; i < N_SENSOR_NODES; i++) { - snodep = &sensor_nodes[i]; - if (snodep->proph != proph) - continue; - - if (get_temperature(snodep->sensorp, &temp) < 0) - break; - (void) memcpy(buf, (caddr_t)&temp, sizeof (tempr_t)); - return (PICL_SUCCESS); - } - return (PICL_FAILURE); -} - -/* - * Read function for volatile "Temperature" property - */ -static int -get_disk_temp(ptree_rarg_t *parg, void *buf) -{ - tempr_t temp; - picl_prophdl_t proph; - disk_node_t *dnodep; - int i; - - /* - * Locate the sensor in our sensor_nodes table by matching the - * property handle and get its temperature. - */ - proph = parg->proph; - for (i = 0; i < N_DISK_NODES; i++) { - dnodep = &disk_nodes[i]; - if (dnodep->proph != proph) - continue; - - if (disk_temperature(dnodep->diskp, &temp) < 0) - break; - (void) memcpy(buf, (caddr_t)&temp, sizeof (tempr_t)); - return (PICL_SUCCESS); - } - return (PICL_FAILURE); -} - -/* - * Read function for volatile "Speed" property on "fan" class node - */ -static int -set_current_speed(ptree_warg_t *parg, const void *buf) -{ - fanspeed_t speed; - picl_prophdl_t proph; - fan_node_t *fnodep; - int i, ret; - - /* - * Locate the fan in our fan_nodes table by matching the - * property handle and get fan speed. - */ - proph = parg->proph; - for (i = 0; i < N_FAN_NODES; i++) { - fnodep = &fan_nodes[i]; - if (fnodep->proph != proph) - continue; - if (fnodep->fanp->fd == -1) - continue; - - (void) memcpy((caddr_t)&speed, buf, sizeof (speed)); - - ret = set_fan_speed(fnodep->fanp, speed); - - if (ret < 0) { - if (ret == -1 && errno == EBUSY) - return (PICL_NOTWRITABLE); - if (ret == -2) - return (PICL_INVALIDARG); - break; - } - - - return (PICL_SUCCESS); - } - return (PICL_FAILURE); -} - - -/* - * Read function for volatile "Speed" property on "fan" class node - */ -static int -get_current_speed(ptree_rarg_t *parg, void *buf) -{ - fanspeed_t speed; - picl_prophdl_t proph; - fan_node_t *fnodep; - int i; - - /* - * Locate the fan in our fan_nodes table by matching the - * property handle and get fan speed. - */ - proph = parg->proph; - for (i = 0; i < N_FAN_NODES; i++) { - fnodep = &fan_nodes[i]; - if (fnodep->proph != proph) - continue; - if (fnodep->fanp->fd == -1) - continue; - if (get_fan_speed(fnodep->fanp, &speed) < 0) - break; - - (void) memcpy(buf, (caddr_t)&speed, sizeof (speed)); - return (PICL_SUCCESS); - } - return (PICL_FAILURE); -} - -/* - * Create and add the specified regular property - */ - -static int -add_regular_prop(picl_nodehdl_t nodeh, char *name, int type, int access, - int size, void *valbuf, picl_prophdl_t *prophp) -{ - int err; - ptree_propinfo_t propinfo; - picl_prophdl_t proph; - - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - type, access, size, name, NULL, NULL); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_create_and_add_prop(nodeh, &propinfo, valbuf, &proph); - if (err == PICL_SUCCESS && prophp) - *prophp = proph; - return (err); -} - - -/* - * Create and add the specified volatile property - */ -static int -add_volatile_prop(picl_nodehdl_t nodeh, char *name, int type, int access, - int size, ptree_vol_rdfunc_t *rdfunc, ptree_vol_wrfunc_t *wrfunc, - picl_prophdl_t *prophp) -{ - int err; - ptree_propinfo_t propinfo; - picl_prophdl_t proph; - - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - type, (access|PICL_VOLATILE), size, name, rdfunc, wrfunc); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_create_and_add_prop(nodeh, &propinfo, NULL, &proph); - if (err == PICL_SUCCESS && prophp) - *prophp = proph; - return (err); -} - -/* - * Add temperature threshold properties - */ -static void -add_sensor_thresh_props(picl_nodehdl_t nodeh, es_sensor_blk_t *sensor_blkp) -{ - picl_prophdl_t proph; - - (void) add_regular_prop(nodeh, PICL_PROP_LOW_POWER_OFF, - PICL_PTYPE_INT, PICL_READ, - sizeof (sensor_blkp->esb_low_power_off), - &sensor_blkp->esb_low_power_off, &proph); - - (void) add_regular_prop(nodeh, PICL_PROP_LOW_SHUTDOWN, - PICL_PTYPE_INT, PICL_READ, - sizeof (sensor_blkp->esb_low_shutdown), - &sensor_blkp->esb_low_shutdown, &proph); - - (void) add_regular_prop(nodeh, PICL_PROP_LOW_WARNING, - PICL_PTYPE_INT, PICL_READ, - sizeof (sensor_blkp->esb_low_warning), - &sensor_blkp->esb_low_warning, &proph); - - (void) add_regular_prop(nodeh, PICL_PROP_HIGH_WARNING, - PICL_PTYPE_INT, PICL_READ, - sizeof (sensor_blkp->esb_high_warning), - &sensor_blkp->esb_high_warning, &proph); - - (void) add_regular_prop(nodeh, PICL_PROP_HIGH_SHUTDOWN, - PICL_PTYPE_INT, PICL_READ, - sizeof (sensor_blkp->esb_high_shutdown), - &sensor_blkp->esb_high_shutdown, &proph); - - (void) add_regular_prop(nodeh, PICL_PROP_HIGH_POWER_OFF, - PICL_PTYPE_INT, PICL_READ, - sizeof (sensor_blkp->esb_high_power_off), - &sensor_blkp->esb_high_power_off, &proph); -} - - -/* - * Go through the sensor_nodes array and create those nodes - * and the Temperature property to report the temperature. - */ -static int -add_sensor_nodes_and_props() -{ - int err; - char *pname, *nodename, *devfs_path; - sensor_node_t *snodep; - picl_nodehdl_t nodeh, cnodeh; - picl_prophdl_t proph; - env_sensor_t *sensorp; - es_sensor_blk_t *sensor_blkp; - int i; - - for (i = 0; i < N_SENSOR_NODES; i++) { - snodep = &sensor_nodes[i]; - /* - * Get the parent nodeh - */ - err = ptree_get_node_by_path(snodep->parent_path, &nodeh); - if (err != PICL_SUCCESS) { - if (env_debug) - envd_log(LOG_ERR, "failed to get_node_by_path %s\n", - snodep->parent_path); - continue; - } - sensorp = snodep->sensorp; - if (sensorp == NULL) - continue; - if (sensorp->present == B_FALSE) - continue; - /* - * Create temperature-sensor node - */ - nodename = snodep->sensor_name; - err = ptree_create_and_add_node(nodeh, nodename, - PICL_CLASS_TEMPERATURE_SENSOR, &cnodeh); - if (env_debug) - envd_log(LOG_ERR, - "Creating PICL sensor node '%s' err:%d\n", - nodename, err); - if (err != PICL_SUCCESS) - break; - - /* save node handle */ - snodep->nodeh = cnodeh; - - /* - * Add "devfs_path" property in child node - */ - devfs_path = sensorp->devfs_path; - pname = PICL_PROP_DEVFS_PATH; - err = add_regular_prop(cnodeh, pname, - PICL_PTYPE_CHARSTRING, PICL_READ, - strlen(devfs_path)+1, (void *)devfs_path, &proph); - if (err != PICL_SUCCESS) - break; - - /* - * Now add volatile "temperature" volatile property - * in this "temperature-sensor" class node. - */ - pname = PICL_PROP_TEMPERATURE; - err = add_volatile_prop(cnodeh, pname, - PICL_PTYPE_INT, PICL_READ, sizeof (tempr_t), - get_current_temp, NULL, &proph); - if (err != PICL_SUCCESS) - break; - - /* Save prop handle */ - snodep->proph = proph; - - /* - * Add threshold related properties - */ - sensor_blkp = sensorp->es; - if (sensor_blkp != NULL) - add_sensor_thresh_props(cnodeh, sensor_blkp); - } - - if (err != PICL_SUCCESS) { - delete_sensor_nodes_and_props(); - if (env_debug) - envd_log(LOG_INFO, - "Can't create prop/node for sensor '%s'\n", - nodename); - return (err); - } - return (PICL_SUCCESS); -} - -/* - * Delete all sensor nodes and related properties created by the - * add_sensor_prop() for each sensor node in the PICL tree. - */ -static void -delete_sensor_nodes_and_props(void) -{ - sensor_node_t *snodep; - int i; - - /* - * Delete/destroy any property created in the sensed device - * as well as the sensor node and all properties under it. - * Note that deleiing/destroying a node deletes/destroys - * all properties within that node. - */ - - for (i = 0; i < N_SENSOR_NODES; i++) { - snodep = &sensor_nodes[i]; - if (snodep->nodeh != NULL) { - /* delete node and all properties under it */ - (void) ptree_delete_node(snodep->nodeh); - (void) ptree_destroy_node(snodep->nodeh); - snodep->nodeh = NULL; - snodep->proph = NULL; - } - } -} - -/* - * Go through the disk_nodes array and create those nodes - * and the Temperature property to report the temperature. - */ -static int -add_disk_nodes_and_props() -{ - int err; - char *pname, *nodename, *devfs_path; - disk_node_t *dnodep; - picl_nodehdl_t nodeh, cnodeh; - picl_prophdl_t proph; - env_disk_t *diskp; - int i; - - for (i = 0; i < N_DISK_NODES; i++) { - if (env_debug) - envd_log(LOG_ERR, "adding disk nodes...\n"); - dnodep = &disk_nodes[i]; - /* - * Get the parent nodeh - */ - err = ptree_get_node_by_path(dnodep->parent_path, &nodeh); - if (err != PICL_SUCCESS) { - if (env_debug) - envd_log(LOG_ERR, - "failed to get node for path %s\n", - dnodep->parent_path); - - err = PICL_SUCCESS; - continue; - } - diskp = dnodep->diskp; - if (diskp == NULL) - continue; - if (diskp->present == B_FALSE) - continue; - /* - * Create temperature-sensor node - */ - nodename = dnodep->disk_name; - err = ptree_create_and_add_node(nodeh, nodename, - PICL_CLASS_TEMPERATURE_SENSOR, &cnodeh); - if (env_debug) - envd_log(LOG_ERR, - "Creating PICL disk node '%s' err:%d\n", - nodename, err); - if (err != PICL_SUCCESS) - break; - - /* save node handle */ - dnodep->nodeh = cnodeh; - - /* - * Add "devfs_path" property in child node - */ - devfs_path = diskp->devfs_path; - pname = PICL_PROP_DEVFS_PATH; - err = add_regular_prop(cnodeh, pname, - PICL_PTYPE_CHARSTRING, PICL_READ, - strlen(devfs_path)+1, (void *)devfs_path, &proph); - if (err != PICL_SUCCESS) - break; - - /* - * Now add volatile "temperature" volatile property - * in this "temperature-sensor" class node. - */ - pname = PICL_PROP_TEMPERATURE; - err = add_volatile_prop(cnodeh, pname, - PICL_PTYPE_INT, PICL_READ, sizeof (tempr_t), - get_disk_temp, NULL, &proph); - if (err != PICL_SUCCESS) - break; - - /* Save prop handle */ - dnodep->proph = proph; - - /* - * Add threshold related properties - */ - - (void) add_regular_prop(cnodeh, PICL_PROP_LOW_SHUTDOWN, - PICL_PTYPE_INT, PICL_READ, - sizeof (diskp->low_shutdown), - (void *)&(diskp->low_shutdown), &proph); - - (void) add_regular_prop(cnodeh, PICL_PROP_LOW_WARNING, - PICL_PTYPE_INT, PICL_READ, - sizeof (diskp->low_warning), - (void *)&(diskp->low_warning), &proph); - - (void) add_regular_prop(cnodeh, PICL_PROP_HIGH_WARNING, - PICL_PTYPE_INT, PICL_READ, - sizeof (diskp->high_warning), - (void *)&(diskp->high_warning), &proph); - - (void) add_regular_prop(cnodeh, PICL_PROP_HIGH_SHUTDOWN, - PICL_PTYPE_INT, PICL_READ, - sizeof (diskp->high_shutdown), - (void *)&(diskp->high_shutdown), &proph); - - } - if (err != PICL_SUCCESS) { - delete_disk_nodes_and_props(); - if (env_debug) - envd_log(LOG_INFO, - "Can't create prop/node for disk '%s'\n", - nodename); - return (err); - } - return (PICL_SUCCESS); -} - -/* - * Delete all disk nodes and related properties created by the - * add_disk_props() for each disk node in the PICL tree. - */ -static void -delete_disk_nodes_and_props(void) -{ - disk_node_t *dnodep; - int i; - - /* - * Delete/destroy disk node and all properties under it. - * Note that deleting/destroying a node deletes/destroys - * all properties within that node. - */ - - for (i = 0; i < N_DISK_NODES; i++) { - dnodep = &disk_nodes[i]; - if (dnodep->nodeh != NULL) { - (void) ptree_delete_node(dnodep->nodeh); - (void) ptree_destroy_node(dnodep->nodeh); - dnodep->nodeh = NULL; - dnodep->proph = NULL; - } - } -} - -/* - * For each entry in fan_nodes[] array, do the following: - * - Create specified "fan" class node. - * - Create "Speed" volatile propery under "fan" class node. - * - Create "SpeedUnit" property under "fan" class node. - */ -static int -add_fan_nodes_and_props() -{ - int err = PICL_FAILURE; - char *pname, *nodename, *devfs_path; - env_fan_t *fanp; - fan_node_t *fnodep; - picl_nodehdl_t nodeh, cnodeh; - picl_prophdl_t proph; - int i; - - for (i = 0; i < N_FAN_NODES; i++) { - /* - * Add various fan nodes and properties - */ - fnodep = &fan_nodes[i]; - if (fnodep == NULL) - continue; - if (fnodep->fanp == NULL) - continue; - if (fnodep->fanp->present == B_FALSE) - continue; - /* - * get parent nodeh - */ - err = ptree_get_node_by_path(fnodep->parent_path, &nodeh); - if (err != PICL_SUCCESS) { - if (env_debug) - envd_log(LOG_ERR, - "node for %s NOT FOUND.\n", fnodep->parent_path); - err = PICL_SUCCESS; - continue; - } - /* - * Create "fan" class node and save node handle - */ - nodename = fnodep->fan_name; - err = ptree_create_and_add_node(nodeh, nodename, - PICL_CLASS_FAN, &cnodeh); - if (env_debug) - envd_log(LOG_ERR, - "Creating PICL fan node '%s' err:%d\n", - nodename, err); - - if (err != PICL_SUCCESS) - break; - fnodep->nodeh = cnodeh; - - /* - * Add "devfs_path" property in child node - */ - fanp = fnodep->fanp; - devfs_path = fanp->devfs_path; - pname = PICL_PROP_DEVFS_PATH; - err = add_regular_prop(cnodeh, pname, - PICL_PTYPE_CHARSTRING, PICL_READ, - strlen(devfs_path)+1, (void *)devfs_path, &proph); - - if (err != PICL_SUCCESS) - - break; - - /* - * Add "Speed" volatile property in this "fan" - * class node and save prop handle. - */ - pname = PICL_PROP_FAN_SPEED; - - err = add_volatile_prop(cnodeh, pname, PICL_PTYPE_INT, - PICL_READ|PICL_WRITE, sizeof (fanspeed_t), - get_current_speed, set_current_speed, &proph); - - if (err != PICL_SUCCESS) - break; - fnodep->proph = proph; - - /* - * Add other "fan" class properties - */ - pname = PICL_PROP_FAN_SPEED_UNIT; - err = add_regular_prop(cnodeh, pname, - PICL_PTYPE_CHARSTRING, PICL_READ, - strlen(fnodep->speed_unit)+1, - (void *)fnodep->speed_unit, &proph); - - if (err != PICL_SUCCESS) - break; - - pname = PICL_PROP_LOW_WARNING; - err = add_regular_prop(cnodeh, pname, - PICL_PTYPE_INT, PICL_READ, - sizeof (fanspeed_t), - &(fnodep->fanp->speed_min), &proph); - - if (err != PICL_SUCCESS) - break; - } - if (err != PICL_SUCCESS) { - delete_fan_nodes_and_props(); - return (err); - } - return (PICL_SUCCESS); -} - - -/* - * Delete all fan nodes and related properties created by the - * add_fan_props() for each fan node in the PICL tree. - */ -static void -delete_fan_nodes_and_props(void) -{ - fan_node_t *fnodep; - int i; - - /* - * Delete/destroy fan node and all properties under it. - * Note that deleting/destroying a node deletes/destroys - * all properties within that node. - */ - - for (i = 0; i < N_FAN_NODES; i++) { - fnodep = &fan_nodes[i]; - if (fnodep->nodeh != NULL) { - (void) ptree_delete_node(fnodep->nodeh); - (void) ptree_destroy_node(fnodep->nodeh); - fnodep->nodeh = NULL; - } - } -} -/* - * Tuneables publishing functions - */ -static int -copy_persistent_tuneable(env_tuneable_t *tune, char *buf) -{ - - switch (tune->type) { - case PICL_PTYPE_INT : { - (void) memcpy((int *)tune->value, - buf, tune->nbytes); - break; - } - case PICL_PTYPE_CHARSTRING : { - (void) memcpy((caddr_t)tune->value, - buf, tune->nbytes); - break; - } - default : { - return (PICL_FAILURE); - } - } - return (PICL_SUCCESS); -} - -static void -env_parse_tunables(picl_nodehdl_t rooth) -{ - char nmbuf[SYS_NMLN]; - char pname[PATH_MAX]; - - if (sysinfo(SI_PLATFORM, nmbuf, sizeof (nmbuf)) != -1) { - (void) snprintf(pname, PATH_MAX, PICLD_PLAT_PLUGIN_DIRF, nmbuf); - (void) strlcat(pname, TUNABLE_CONF_FILE, PATH_MAX); - if (access(pname, R_OK) == 0) { - (void) picld_pluginutil_parse_config_file(rooth, pname); - return; - } - } -} - -int -env_picl_setup_tuneables(void) -{ - int err; - int i; - picl_nodehdl_t nodeh; - picl_nodehdl_t rooth; - picl_prophdl_t proph; - env_tuneable_t *tuneablep; - char read_buf[BUFSIZ]; - - if (ptree_get_root(&rooth) != PICL_SUCCESS) { - return (PICL_FAILURE); - } - err = ptree_create_and_add_node(rooth, PICL_PLUGINS_NODE, - PICL_CLASS_PICL, &nodeh); - if (err != PICL_SUCCESS) - return (PICL_FAILURE); - err = ptree_create_and_add_node(nodeh, PICL_ENVIRONMENTAL_NODE, - PICL_CLASS_PICL, &nodeh); - if (err != PICL_SUCCESS) { - return (PICL_FAILURE); - } - - /* - * Parse the conf file - */ - if (env_debug) - envd_log(LOG_ERR, "parsing tuneables...\n"); - env_parse_tunables(rooth); - for (i = 0; i < ntuneables; i++) { - if (env_debug) - envd_log(LOG_ERR, "tuneable %d being added\n", i); - tuneablep = &tuneables[i]; - err = ptree_get_propval_by_name(nodeh, tuneablep->name, - read_buf, tuneablep->nbytes); - - if (err != PICL_SUCCESS) { - /* - * Add volitle functions to environmental node - */ - err = add_volatile_prop(nodeh, tuneablep->name, - tuneablep->type, - PICL_READ|PICL_WRITE, tuneablep->nbytes, - tuneablep->rfunc, - tuneablep->wfunc, &proph); - - tuneablep->proph = proph; - } else { - /* - * property is persistent - */ - (void) copy_persistent_tuneable(tuneablep, - read_buf); - } - } - - return (PICL_SUCCESS); -} - -/* - * Find the ENVMODEL_CONF_FILE file. - */ -static int -get_envmodel_conf_file(char *outfilename) -{ - char nmbuf[SYS_NMLN]; - char pname[PATH_MAX]; - - if (sysinfo(SI_PLATFORM, nmbuf, sizeof (nmbuf)) != -1) { - (void) snprintf(pname, PATH_MAX, PICLD_PLAT_PLUGIN_DIRF, nmbuf); - (void) strlcat(pname, ENV_CONF_FILE, PATH_MAX); - if (access(pname, R_OK) == 0) { - (void) strlcpy(outfilename, pname, PATH_MAX); - return (0); - } - } - - if (sysinfo(SI_MACHINE, nmbuf, sizeof (nmbuf)) != -1) { - (void) snprintf(pname, PATH_MAX, PICLD_PLAT_PLUGIN_DIRF, nmbuf); - (void) strlcat(pname, ENV_CONF_FILE, PATH_MAX); - if (access(pname, R_OK) == 0) { - (void) strlcpy(outfilename, pname, PATH_MAX); - return (0); - } - } - - (void) snprintf(pname, PATH_MAX, "%s/%s", PICLD_COMMON_PLUGIN_DIR, - ENV_CONF_FILE); - - if (access(pname, R_OK) == 0) { - (void) strlcpy(outfilename, pname, PATH_MAX); - return (0); - } - - return (-1); -} - -/* Delete all sensor/fan nodes and any properties created by this plugin */ -void -env_picl_destroy(void) -{ - delete_fan_nodes_and_props(); - delete_sensor_nodes_and_props(); - delete_disk_nodes_and_props(); -} - -void -env_picl_setup(void) -{ - int err, sensor_err, fan_err, disk_err; - sensor_node_t *snodep; - fan_node_t *fnodep; - disk_node_t *dnodep; - picl_nodehdl_t plath; - char fullfilename[PATH_MAX]; - picl_nodehdl_t rooth; - int i; - - - /* - * Initialize sensorp and other fields in the sensor_nodes[] array - */ - - for (i = 0; i < N_SENSOR_NODES; i++) { - snodep = &sensor_nodes[i]; - snodep->sensorp = sensor_lookup(snodep->sensor_name); - snodep->nodeh = NULL; - snodep->proph = NULL; - snodep->target_proph = NULL; - } - - /* - * Initialize fanp and other fields in the fan_nodes[] array - */ - for (i = 0; i < N_FAN_NODES; i++) { - fnodep = &fan_nodes[i]; - fnodep->fanp = fan_lookup(fnodep->fan_name); - fnodep->nodeh = NULL; - fnodep->proph = NULL; - } - - /* - * Initialize diskp and other fields in the disk_nodes[] array - */ - for (i = 0; i < N_DISK_NODES; i++) { - dnodep = &disk_nodes[i]; - dnodep->diskp = disk_lookup(dnodep->disk_name); - dnodep->nodeh = NULL; - dnodep->proph = NULL; - } - - /* - * Get platform handle and populate PICL tree with environmental - * nodes and properties - */ - err = ptree_get_node_by_path("/platform", &plath); - - if (err == PICL_SUCCESS) { - sensor_err = add_sensor_nodes_and_props(); - fan_err = add_fan_nodes_and_props(); - if (disk_temp_monitor) - disk_err = add_disk_nodes_and_props(); - } - - /* - * We can safely call delete_xxx_nodes_and_props even - * if nodes were not added. - */ - - if (err != PICL_SUCCESS) { - if (fan_err != PICL_SUCCESS) - delete_fan_nodes_and_props(); - if (disk_err != PICL_SUCCESS) - delete_disk_nodes_and_props(); - if (sensor_err != PICL_SUCCESS) - delete_sensor_nodes_and_props(); - - envd_log(LOG_CRIT, ENVD_PICL_SETUP_FAILED); - return; - } - if (env_debug) - envd_log(LOG_ERR, "parsing the envmodel.conf file...\n"); - - /* - * Parse the envmodel.conf file and populate the PICL tree - */ - if (get_envmodel_conf_file(fullfilename) < 0) - envd_log(LOG_CRIT, ENVD_PICL_SETUP_FAILED); - if (ptree_get_root(&rooth) != PICL_SUCCESS) - envd_log(LOG_CRIT, ENVD_PICL_SETUP_FAILED); - err = picld_pluginutil_parse_config_file(rooth, fullfilename); - - if (err != PICL_SUCCESS) - envd_log(LOG_CRIT, ENVD_PICL_SETUP_FAILED); -} diff --git a/usr/src/cmd/picl/plugins/sun4u/chicago/frudata/Makefile b/usr/src/cmd/picl/plugins/sun4u/chicago/frudata/Makefile deleted file mode 100644 index 6de3848218..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chicago/frudata/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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# lib/picl/plugins/sun4u/chicago/frudata/Makefile -# -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,A70 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONF= libpiclfrudata.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: $(CONF) - -install: $(ROOTLIBDIR) $(ROOTCONF) - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/chicago/frudata/libpiclfrudata.conf b/usr/src/cmd/picl/plugins/sun4u/chicago/frudata/libpiclfrudata.conf deleted file mode 100644 index 118020077c..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chicago/frudata/libpiclfrudata.conf +++ /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. -# -#ident "%Z%%M% %I% %E% SMI" -# -# This file creates the FRU device paths for the FRUAccess library -# - -VERSION 1.0 - -name:/platform/i2c@1f,530000/motherboard-fru-prom@0,a2 -PROP FRUDevicePath string r 0 "/devices/i2c@1f,530000/motherboard-fru-prom@0,a2:motherboard-fru-prom" - -name:/platform/i2c@1f,520000/dimm-spd@0,a0 -PROP FRUDevicePath string r 0 "/devices/i2c@1f,520000/dimm-spd@0,a0:dimm-spd" - -name:/platform/i2c@1f,520000/dimm-spd@0,a2 -PROP FRUDevicePath string r 0 "/devices/i2c@1f,520000/dimm-spd@0,a2:dimm-spd" - -name:/platform/i2c@1f,520000/dimm-spd@0,a4 -PROP FRUDevicePath string r 0 "/devices/i2c@1f,520000/dimm-spd@0,a4:dimm-spd" - -name:/platform/i2c@1f,520000/dimm-spd@0,a6 -PROP FRUDevicePath string r 0 "/devices/i2c@1f,520000/dimm-spd@0,a6:dimm-spd" - -name:/platform/i2c@1f,520000/dimm-spd@0,a8 -PROP FRUDevicePath string r 0 "/devices/i2c@1f,520000/dimm-spd@0,a8:dimm-spd" - -name:/platform/i2c@1f,520000/dimm-spd@0,aa -PROP FRUDevicePath string r 0 "/devices/i2c@1f,520000/dimm-spd@0,aa:dimm-spd" - -name:/platform/i2c@1f,520000/dimm-spd@0,ac -PROP FRUDevicePath string r 0 "/devices/i2c@1f,520000/dimm-spd@0,ac:dimm-spd" - -name:/platform/i2c@1f,520000/dimm-spd@0,ae -PROP FRUDevicePath string r 0 "/devices/i2c@1f,520000/dimm-spd@0,ae:dimm-spd" - -name:/platform/ebus@1f,464000/i2c@3,80/sas-backplane-fru-prom -PROP FRUDevicePath string r 0 "/devices/ebus@1f,464000/i2c@3,80/sas-backplane-fru-prom@0,a6:sas-backplane-fru-prom" - -name:/platform/ebus@1f,464000/i2c@3,80/front-io-fru-prom -PROP FRUDevicePath string r 0 "/devices/ebus@1f,464000/i2c@3,80/front-io-fru-prom@0,a4:front-io-fru-prom" - -name:/platform/ebus@1f,464000/i2c@3,80/psu-fru-prom -PROP FRUDevicePath string r 0 "/devices/ebus@1f,464000/i2c@3,80/psu-fru-prom@0,ae:psu-fru-prom" diff --git a/usr/src/cmd/picl/plugins/sun4u/chicago/frutree/Makefile b/usr/src/cmd/picl/plugins/sun4u/chicago/frutree/Makefile deleted file mode 100644 index 19ca4f1c13..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chicago/frutree/Makefile +++ /dev/null @@ -1,68 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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. -# -# lib/picl/plugins/sun4u/chicago/frutree/Makefile -# -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,A70 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONF= piclfrutree.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 -INFOS= piclfrutree.info system-board.info - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: $(CONF) - -install: $(ROOTLIBDIR) $(ROOTCONF) - -$(CONF): $(INFOS) - $(RM) $@ - $(CPP) piclfrutree.info > $@ - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/chicago/frutree/piclfrutree.info b/usr/src/cmd/picl/plugins/sun4u/chicago/frutree/piclfrutree.info deleted file mode 100644 index 1221902f95..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chicago/frutree/piclfrutree.info +++ /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, 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" - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ -#define PLATFORM_CLASS jbus - -VERSION 1.1 -NODE frutree picl - NODE chassis fru - /* - * SunMC physical view view_points for this platform - * This will get moved to a separate SunMC physical view plugin later. - */ - PROP ViewPoints string r 0 "front rear side" - - /* - * Motherboard - */ - NODE MB location - PROP SlotType string r 0 "system-board" - PROP Label string r 0 "MB" - ENDNODE - - /* - * Front panel interface board - */ - NODE FIOB location - PROP SlotType string r 0 "system-board" - PROP Label string r 0 "FIOB" - NODE system-board fru - PROP FRUDataAvailable void r - REFPROP _seeprom_source /platform/ebus@1f,464000/i2c@3,80/front-io-fru-prom@0,a4 - NODE RM0 location - PROP SlotType string r 0 "cdrom-slot" - PROP Label string r 0 "RM0" - ENDNODE - ENDNODE - ENDNODE - - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - REFNODE system-fan0 fru WITH _class:/PLATFORM_CLASS/cpu?ID=0 - ENDNODE - NODE F1 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F1" - REFNODE system-fan1 fru WITH _class:/PLATFORM_CLASS/cpu?ID=1 - ENDNODE - NODE F2 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F2" - NODE system-fan2 fru - ENDNODE - ENDNODE - NODE F3 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F3" - NODE system-fan3 fru - ENDNODE - ENDNODE - NODE F4 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F4" - NODE system-fan4 fru - ENDNODE - ENDNODE - - /* - * Power Supply - */ - NODE PS0 location - PROP SlotType string r 0 "power-supply" - PROP Label string r 0 "PS0" - NODE power-supply fru - PROP FRUDataAvailable void r - REFPROP _seeprom_source /platform/ebus@1f,464000/i2c@3,80/psu-fru-prom@0,ae - ENDNODE - ENDNODE - - /* - * SAS/SATA Backplane - */ - NODE SAS-BP fru - PROP FRUDataAvailable void r - REFPROP _seeprom_source /platform/ebus@1f,464000/i2c@3,80/sas-backplane-fru-prom@0,a6 - NODE HDD0 location - PROP SlotType string r 0 "disk-slot" - PROP Label string r 0 "HDD0" - ENDNODE - NODE HDD1 location - PROP SlotType string r 0 "disk-slot" - PROP Label string r 0 "HDD1" - ENDNODE - NODE HDD2 location - PROP SlotType string r 0 "disk-slot" - PROP Label string r 0 "HDD2" - ENDNODE - NODE HDD3 location - PROP SlotType string r 0 "disk-slot" - PROP Label string r 0 "HDD3" - ENDNODE - ENDNODE - ENDNODE -ENDNODE - -/* - * Add disk fru nodes for disks which are present. - */ -name:/frutree/chassis/SAS-BP/HDD0 -REFNODE disk fru WITH name:/platform/pci@1e,600000/pci@0/pci@9/pci@0/scsi@1/sd@0,0 - -name:/frutree/chassis/SAS-BP/HDD1 -REFNODE disk fru WITH name:/platform/pci@1e,600000/pci@0/pci@9/pci@0/scsi@1/sd@1,0 - -name:/frutree/chassis/SAS-BP/HDD2 -REFNODE disk fru WITH name:/platform/pci@1e,600000/pci@0/pci@9/pci@0/scsi@1/sd@2,0 - -name:/frutree/chassis/SAS-BP/HDD3 -REFNODE disk fru WITH name:/platform/pci@1e,600000/pci@0/pci@9/pci@0/scsi@1/sd@3,0 - -/* - * Removable Media on front-io board - */ -name:/frutree/chassis/FIOB/system-board/RM0 -REFNODE cdrom fru WITH name:/platform/pci@1e,600000/pci@0/pci@1/pci@0/ide@1f/sd@0,0 - -#include "system-board.info" - diff --git a/usr/src/cmd/picl/plugins/sun4u/chicago/frutree/system-board.info b/usr/src/cmd/picl/plugins/sun4u/chicago/frutree/system-board.info deleted file mode 100644 index a8684ac2ce..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/chicago/frutree/system-board.info +++ /dev/null @@ -1,528 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This file creates the system board structure - */ - -name:/frutree/chassis/MB -NODE system-board fru - NODE pci-slot location - PROP Label string r 0 "PCIE2" - PROP SlotType string r 0 "pci-e" - ENDNODE - NODE pci-slot location - PROP Label string r 0 "PCIE1" - PROP SlotType string r 0 "pci-e" - ENDNODE - NODE pci-slot location - PROP Label string r 0 "PCIE0" - PROP SlotType string r 0 "pci-e" - ENDNODE - NODE pci-slot location - PROP Label string r 0 "PCIX1" - PROP SlotType string r 0 "pci-x" - ENDNODE - NODE pci-slot location - PROP Label string r 0 "PCIX0" - PROP SlotType string r 0 "pci-x" - ENDNODE - NODE cpu-slot location - PROP Label string r 0 "0" - PROP Slot uint r 4 0 - PROP SlotType string r 0 "cpu" - ENDNODE - NODE cpu-slot location - PROP Label string r 0 "1" - PROP Slot uint r 4 1 - PROP SlotType string r 0 "cpu" - ENDNODE - NODE mem-slot location - PROP Slot uint r 4 1 - PROP Label string r 0 "DIMM0" - PROP SlotType string r 0 "memory-module" - ENDNODE - NODE mem-slot location - PROP Slot uint r 4 2 - PROP Label string r 0 "DIMM1" - PROP SlotType string r 0 "memory-module" - ENDNODE - NODE mem-slot location - PROP Slot uint r 4 3 - PROP Label string r 0 "DIMM2" - PROP SlotType string r 0 "memory-module" - ENDNODE - NODE mem-slot location - PROP Slot uint r 4 4 - PROP Label string r 0 "DIMM3" - PROP SlotType string r 0 "memory-module" - ENDNODE - NODE mem-slot location - PROP Slot uint r 4 5 - PROP Label string r 0 "DIMM4" - PROP SlotType string r 0 "memory-module" - ENDNODE - NODE mem-slot location - PROP Slot uint r 4 6 - PROP Label string r 0 "DIMM5" - PROP SlotType string r 0 "memory-module" - ENDNODE - NODE mem-slot location - PROP Slot uint r 4 7 - PROP Label string r 0 "DIMM6" - PROP SlotType string r 0 "memory-module" - ENDNODE - NODE mem-slot location - PROP Slot uint r 4 8 - PROP Label string r 0 "DIMM7" - PROP SlotType string r 0 "memory-module" - ENDNODE -ENDNODE - -/* - * Create CPU fru modules - */ -name:/frutree/chassis/MB/system-board/cpu-slot?Slot=0 -REFNODE cpu-module fru WITH _class:/PLATFORM_CLASS/cpu?ID=0 - -name:/frutree/chassis/MB/system-board/cpu-slot?Slot=1 -REFNODE cpu-module fru WITH _class:/PLATFORM_CLASS/cpu?ID=1 - -/* - * Create DIMM fru modules - */ -name:/frutree/chassis/MB/system-board/mem-slot?Label=DIMM0 -REFNODE mem-module fru WITH /platform/i2c@1f,520000/dimm-spd@0,a6 - -name:/frutree/chassis/MB/system-board/mem-slot?Label=DIMM1 -REFNODE mem-module fru WITH /platform/i2c@1f,520000/dimm-spd@0,a2 - -name:/frutree/chassis/MB/system-board/mem-slot?Label=DIMM2 -REFNODE mem-module fru WITH /platform/i2c@1f,520000/dimm-spd@0,a4 - -name:/frutree/chassis/MB/system-board/mem-slot?Label=DIMM3 -REFNODE mem-module fru WITH /platform/i2c@1f,520000/dimm-spd@0,a0 - -name:/frutree/chassis/MB/system-board/mem-slot?Label=DIMM4 -REFNODE mem-module fru WITH /platform/i2c@1f,520000/dimm-spd@0,a8 - -name:/frutree/chassis/MB/system-board/mem-slot?Label=DIMM5 -REFNODE mem-module fru WITH /platform/i2c@1f,520000/dimm-spd@0,ac - -name:/frutree/chassis/MB/system-board/mem-slot?Label=DIMM6 -REFNODE mem-module fru WITH /platform/i2c@1f,520000/dimm-spd@0,aa - -name:/frutree/chassis/MB/system-board/mem-slot?Label=DIMM7 -REFNODE mem-module fru WITH /platform/i2c@1f,520000/dimm-spd@0,ae - -/* - * Populate PCI slots - */ -name:/frutree/chassis/MB/system-board/pci-slot?Label=PCIE2 -REFNODE pci-card fru WITH _class:/PLATFORM_CLASS/pciex@1f,700000/picl?DeviceID=0 - -name:/frutree/chassis/MB/system-board/pci-slot?Label=PCIE1 -REFNODE pci-card fru WITH _class:/PLATFORM_CLASS/pciex@1e,600000/pciex@0/pciex@8/picl?DeviceID=0 - -name:/frutree/chassis/MB/system-board/pci-slot?Label=PCIE0 -REFNODE pci-card fru WITH _class:/PLATFORM_CLASS/pciex@1e,600000/pciex@0/pciex@3/picl?DeviceID=0 - -name:/frutree/chassis/MB/system-board/pci-slot?Label=PCIX1 -REFNODE pci-card fru WITH _class:/PLATFORM_CLASS/pciex@1e,600000/pciex@0/pciex@9/pci@0,2/picl?DeviceID=1 - -name:/frutree/chassis/MB/system-board/pci-slot?Label=PCIX0 -REFNODE pci-card fru WITH _class:/PLATFORM_CLASS/pciex@1e,600000/pciex@0/pciex@9/pci@0,2/picl?DeviceID=2 - -/* - * SEEPROM source for the motherboard - */ -name:/frutree/chassis/MB/system-board -PROP FRUDataAvailable void r -REFPROP _seeprom_source /platform/i2c@1f,530000/motherboard-fru-prom@0,a2 - -/* - * SEEPROM source for the DIMMs - */ -name:/frutree/chassis/MB/system-board/mem-slot?Label=DIMM0/mem-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source /platform/i2c@1f,520000/dimm-spd@0,a6 - -name:/frutree/chassis/MB/system-board/mem-slot?Label=DIMM1/mem-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source /platform/i2c@1f,520000/dimm-spd@0,a2 - -name:/frutree/chassis/MB/system-board/mem-slot?Label=DIMM2/mem-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source /platform/i2c@1f,520000/dimm-spd@0,a4 - -name:/frutree/chassis/MB/system-board/mem-slot?Label=DIMM3/mem-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source /platform/i2c@1f,520000/dimm-spd@0,a0 - -name:/frutree/chassis/MB/system-board/mem-slot?Label=DIMM4/mem-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source /platform/i2c@1f,520000/dimm-spd@0,a8 - -name:/frutree/chassis/MB/system-board/mem-slot?Label=DIMM5/mem-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source /platform/i2c@1f,520000/dimm-spd@0,ac - -name:/frutree/chassis/MB/system-board/mem-slot?Label=DIMM6/mem-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source /platform/i2c@1f,520000/dimm-spd@0,aa - -name:/frutree/chassis/MB/system-board/mem-slot?Label=DIMM7/mem-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source /platform/i2c@1f,520000/dimm-spd@0,ae - -/* - * _fru_parent memory modules - */ -name:/platform/memory-controller?portid=0/memory-module-group?ID=1/memory-module?ID=1 -REFPROP _fru_parent /frutree/chassis/MB/system-board/mem-slot?Label=DIMM0/mem-module - -name:/platform/memory-controller?portid=0/memory-module-group?ID=0/memory-module?ID=1 -REFPROP _fru_parent /frutree/chassis/MB/system-board/mem-slot?Label=DIMM1/mem-module - -name:/platform/memory-controller?portid=0/memory-module-group?ID=1/memory-module?ID=0 -REFPROP _fru_parent /frutree/chassis/MB/system-board/mem-slot?Label=DIMM2/mem-module - -name:/platform/memory-controller?portid=0/memory-module-group?ID=0/memory-module?ID=0 -REFPROP _fru_parent /frutree/chassis/MB/system-board/mem-slot?Label=DIMM3/mem-module - -name:/platform/memory-controller?portid=1/memory-module-group?ID=0/memory-module?ID=0 -REFPROP _fru_parent /frutree/chassis/MB/system-board/mem-slot?Label=DIMM4/mem-module - -name:/platform/memory-controller?portid=1/memory-module-group?ID=1/memory-module?ID=0 -REFPROP _fru_parent /frutree/chassis/MB/system-board/mem-slot?Label=DIMM5/mem-module - -name:/platform/memory-controller?portid=1/memory-module-group?ID=0/memory-module?ID=1 -REFPROP _fru_parent /frutree/chassis/MB/system-board/mem-slot?Label=DIMM6/mem-module - -name:/platform/memory-controller?portid=1/memory-module-group?ID=1/memory-module?ID=1 -REFPROP _fru_parent /frutree/chassis/MB/system-board/mem-slot?Label=DIMM7/mem-module - - -/* - * _fru_parent CPU, memory-controller devices - */ -_class:/PLATFORM_CLASS/cpu?ID=0 -REFPROP _fru_parent /frutree/chassis/MB/system-board/cpu-slot?Slot=0/cpu-module - -name:/platform/memory-controller?portid=0 -REFPROP _fru_parent /frutree/chassis/MB/system-board/cpu-slot?Slot=0/cpu-module - -_class:/PLATFORM_CLASS/cpu?ID=1 -REFPROP _fru_parent /frutree/chassis/MB/system-board/cpu-slot?Slot=1/cpu-module - -name:/platform/memory-controller?portid=1 -REFPROP _fru_parent /frutree/chassis/MB/system-board/cpu-slot?Slot=1/cpu-module - -/* - * _fru_parent motherboard - */ -_class:/PLATFORM_CLASS -REFPROP _fru_parent /frutree/chassis/MB/system-board - -/* - * _fru_parent PCI devices - */ -_class:/PLATFORM_CLASS/pciex@1f,700000/picl@0 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCIE2/pci-card -_class:/PLATFORM_CLASS/pciex@1f,700000/picl@0,0 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCIE2/pci-card -_class:/PLATFORM_CLASS/pciex@1f,700000/picl@0,1 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCIE2/pci-card -_class:/PLATFORM_CLASS/pciex@1f,700000/picl@0,2 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCIE2/pci-card -_class:/PLATFORM_CLASS/pciex@1f,700000/picl@0,3 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCIE2/pci-card -_class:/PLATFORM_CLASS/pciex@1f,700000/picl@0,4 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCIE2/pci-card -_class:/PLATFORM_CLASS/pciex@1f,700000/picl@0,5 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCIE2/pci-card -_class:/PLATFORM_CLASS/pciex@1f,700000/picl@0,6 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCIE2/pci-card -_class:/PLATFORM_CLASS/pciex@1f,700000/picl@0,7 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCIE2/pci-card - -_class:/PLATFORM_CLASS/pciex@1e,600000/pciex@0/pciex@8/picl@0 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCIE1/pci-card -_class:/PLATFORM_CLASS/pciex@1e,600000/pciex@0/pciex@8/picl@0,0 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCIE1/pci-card -_class:/PLATFORM_CLASS/pciex@1e,600000/pciex@0/pciex@8/picl@0,1 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCIE1/pci-card -_class:/PLATFORM_CLASS/pciex@1e,600000/pciex@0/pciex@8/picl@0,2 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCIE1/pci-card -_class:/PLATFORM_CLASS/pciex@1e,600000/pciex@0/pciex@8/picl@0,3 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCIE1/pci-card -_class:/PLATFORM_CLASS/pciex@1e,600000/pciex@0/pciex@8/picl@0,4 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCIE1/pci-card -_class:/PLATFORM_CLASS/pciex@1e,600000/pciex@0/pciex@8/picl@0,5 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCIE1/pci-card -_class:/PLATFORM_CLASS/pciex@1e,600000/pciex@0/pciex@8/picl@0,6 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCIE1/pci-card -_class:/PLATFORM_CLASS/pciex@1e,600000/pciex@0/pciex@8/picl@0,7 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCIE1/pci-card - -_class:/PLATFORM_CLASS/pciex@1e,600000/pciex@0/pciex@3/picl@0 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCIE0/pci-card -_class:/PLATFORM_CLASS/pciex@1e,600000/pciex@0/pciex@3/picl@0,0 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCIE0/pci-card -_class:/PLATFORM_CLASS/pciex@1e,600000/pciex@0/pciex@3/picl@0,1 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCIE0/pci-card -_class:/PLATFORM_CLASS/pciex@1e,600000/pciex@0/pciex@3/picl@0,2 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCIE0/pci-card -_class:/PLATFORM_CLASS/pciex@1e,600000/pciex@0/pciex@3/picl@0,3 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCIE0/pci-card -_class:/PLATFORM_CLASS/pciex@1e,600000/pciex@0/pciex@3/picl@0,4 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCIE0/pci-card -_class:/PLATFORM_CLASS/pciex@1e,600000/pciex@0/pciex@3/picl@0,5 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCIE0/pci-card -_class:/PLATFORM_CLASS/pciex@1e,600000/pciex@0/pciex@3/picl@0,6 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCIE0/pci-card -_class:/PLATFORM_CLASS/pciex@1e,600000/pciex@0/pciex@3/picl@0,7 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCIE0/pci-card - -_class:/PLATFORM_CLASS/pciex@1e,600000/pciex@0/pciex@9/pci@0,2/picl@1 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCIX1/pci-card -_class:/PLATFORM_CLASS/pciex@1e,600000/pciex@0/pciex@9/pci@0,2/picl@1,0 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCIX1/pci-card -_class:/PLATFORM_CLASS/pciex@1e,600000/pciex@0/pciex@9/pci@0,2/picl@1,1 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCIX1/pci-card -_class:/PLATFORM_CLASS/pciex@1e,600000/pciex@0/pciex@9/pci@0,2/picl@1,2 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCIX1/pci-card -_class:/PLATFORM_CLASS/pciex@1e,600000/pciex@0/pciex@9/pci@0,2/picl@1,3 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCIX1/pci-card -_class:/PLATFORM_CLASS/pciex@1e,600000/pciex@0/pciex@9/pci@0,2/picl@1,4 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCIX1/pci-card -_class:/PLATFORM_CLASS/pciex@1e,600000/pciex@0/pciex@9/pci@0,2/picl@1,5 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCIX1/pci-card -_class:/PLATFORM_CLASS/pciex@1e,600000/pciex@0/pciex@9/pci@0,2/picl@1,6 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCIX1/pci-card -_class:/PLATFORM_CLASS/pciex@1e,600000/pciex@0/pciex@9/pci@0,2/picl@1,7 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCIX1/pci-card - -_class:/PLATFORM_CLASS/pciex@1e,600000/pciex@0/pciex@9/pci@0,2/picl@2 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCIX0/pci-card -_class:/PLATFORM_CLASS/pciex@1e,600000/pciex@0/pciex@9/pci@0,2/picl@2,0 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCIX0/pci-card -_class:/PLATFORM_CLASS/pciex@1e,600000/pciex@0/pciex@9/pci@0,2/picl@2,1 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCIX0/pci-card -_class:/PLATFORM_CLASS/pciex@1e,600000/pciex@0/pciex@9/pci@0,2/picl@2,2 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCIX0/pci-card -_class:/PLATFORM_CLASS/pciex@1e,600000/pciex@0/pciex@9/pci@0,2/picl@2,3 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCIX0/pci-card -_class:/PLATFORM_CLASS/pciex@1e,600000/pciex@0/pciex@9/pci@0,2/picl@2,4 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCIX0/pci-card -_class:/PLATFORM_CLASS/pciex@1e,600000/pciex@0/pciex@9/pci@0,2/picl@2,5 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCIX0/pci-card -_class:/PLATFORM_CLASS/pciex@1e,600000/pciex@0/pciex@9/pci@0,2/picl@2,6 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCIX0/pci-card -_class:/PLATFORM_CLASS/pciex@1e,600000/pciex@0/pciex@9/pci@0,2/picl@2,7 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCIX0/pci-card - -/* - * _fru_parent for fans - */ -name:/platform/ebus@1f,464000/env-monitor@3,0/system-fan0 -REFPROP _fru_parent /frutree/chassis/F0/system-fan0 - -name:/platform/ebus@1f,464000/env-monitor@3,0/system-fan1 -REFPROP _fru_parent /frutree/chassis/F1/system-fan1 - -name:/platform/ebus@1f,464000/env-monitor@3,0/system-fan2 -REFPROP _fru_parent /frutree/chassis/F2/system-fan2 - -name:/platform/ebus@1f,464000/env-monitor@3,0/system-fan3 -REFPROP _fru_parent /frutree/chassis/F3/system-fan3 - -name:/platform/ebus@1f,464000/env-monitor@3,0/system-fan4 -REFPROP _fru_parent /frutree/chassis/F4/system-fan4 - -/* - * _fru_parent for sensors - */ -name:/platform/ebus@1f,464000/env-monitor@3,0/cpu0 -REFPROP _fru_parent /frutree/chassis/MB/system-board/cpu-slot?Slot=0/cpu-module - -name:/platform/ebus@1f,464000/env-monitor@3,0/cpu1 -REFPROP _fru_parent /frutree/chassis/MB/system-board/cpu-slot?Slot=1/cpu-module - -name:/platform/ebus@1f,464000/env-monitor@3,0/MotherBoard -REFPROP _fru_parent /frutree/chassis/MB/system-board - -name:/platform/ebus@1f,464000/env-monitor@3,0/ADT7462 -REFPROP _fru_parent /frutree/chassis/MB/system-board - -name:/platform/ebus@1f,464000/env-monitor@3,0/LM95221 -REFPROP _fru_parent /frutree/chassis/MB/system-board - -name:/platform/ebus@1f,464000/env-monitor@3,0/FireASIC -REFPROP _fru_parent /frutree/chassis/MB/system-board - -name:/platform/ebus@1f,464000/env-monitor@3,0/LSI1064 -REFPROP _fru_parent /frutree/chassis/MB/system-board - -name:/platform/ebus@1f,464000/env-monitor@3,0/Front_panel -REFPROP _fru_parent /frutree/chassis/FIOB/system-board - -name:/platform/ebus@1f,464000/env-monitor@3,0/PSU -REFPROP _fru_parent /frutree/chassis/MB/system-board - -/* - * Environmental device associated with motherboard - */ -name:/frutree/chassis/MB/system-board -TABLE Devices -ROW -PROP Class string r 0 "temperature-sensor" -REFPROP _temperature-sensor_ name:/platform/ebus@1f,464000/env-monitor@3,0/MotherBoard -ENDROW -ROW -PROP Class string r 0 "temperature-sensor" -REFPROP _temperature-sensor_ name:/platform/ebus@1f,464000/env-monitor@3,0/ADT7462 -ENDROW -ROW -PROP Class string r 0 "temperature-sensor" -REFPROP _temperature-sensor_ name:/platform/ebus@1f,464000/env-monitor@3,0/LM95221 -ENDROW -ROW -PROP Class string r 0 "temperature-sensor" -REFPROP _temperature-sensor_ name:/platform/ebus@1f,464000/env-monitor@3,0/FireASIC -ENDROW -ROW -PROP Class string r 0 "temperature-sensor" -REFPROP _temperature-sensor_ name:/platform/ebus@1f,464000/env-monitor@3,0/LSI1064 -ENDROW -ROW -PROP Class string r 0 "temperature-sensor" -REFPROP _temperature-sensor_ name:/platform/ebus@1f,464000/env-monitor@3,0/PSU -ENDROW -ENDTABLE - -/* - * Environmental device associated with front panel io board - */ -name:/frutree/chassis/FIOB/system-board -TABLE Devices -ROW -PROP Class string r 0 "temperature-sensor" -REFPROP _temperature-sensor_ name:/platform/ebus@1f,464000/env-monitor@3,0/Front_panel -ENDROW -ENDTABLE - -/* - * Environmental devices associated with cpus - */ - -name:/frutree/chassis/MB/system-board/cpu-slot?Slot=0/cpu-module -TABLE Devices -ROW -PROP Class string r 0 "temperature-sensor" -REFPROP _temperature-sensor_ name:/platform/ebus@1f,464000/env-monitor@3,0/cpu0 -ENDROW -ROW -PROP Class string r 0 "cpu" -REFPROP _cpu_ _class:/PLATFORM_CLASS/cpu?ID=0 -ENDROW -ENDTABLE - -name:/frutree/chassis/MB/system-board/cpu-slot?Slot=1/cpu-module -TABLE Devices -ROW -PROP Class string r 0 "temperature-sensor" -REFPROP _temperature-sensor_ name:/platform/ebus@1f,464000/env-monitor@3,0/cpu1 -ENDROW -ROW -PROP Class string r 0 "cpu" -REFPROP _cpu_ _class:/PLATFORM_CLASS/cpu?ID=1 -ENDROW -ENDTABLE - -/* - * Hard disk link between fru and device tree - */ -name:/frutree/chassis/SAS-BP/HDD0/disk - TABLE Devices - ROW - PROP Class string r 0 "block" - REFPROP _block_ name:/platform/pci@1e,600000/pci@0/pci@9/pci@0/scsi@1/sd@0,0 - ENDROW - ENDTABLE -name:/platform/pci@1e,600000/pci@0/pci@9/pci@0/scsi@1/sd@0,0 - REFPROP _fru_parent name:/frutree/chassis/SAS-BP/HDD0/disk - -name:/platform/pci@1e,600000/pci@0/pci@9/pci@0/scsi@1/sd@0,0/hard-disk0 - REFPROP _fru_parent name:/frutree/chassis/SAS-BP/HDD0/disk - -name:/frutree/chassis/SAS-BP/HDD1/disk - TABLE Devices - ROW - PROP Class string r 0 "block" - REFPROP _block_ name:/platform/pci@1e,600000/pci@0/pci@9/pci@0/scsi@1/sd@1,0 - ENDROW - ENDTABLE -name:/platform/pci@1e,600000/pci@0/pci@9/pci@0/scsi@1/sd@1,0 - REFPROP _fru_parent name:/frutree/chassis/SAS-BP/HDD1/disk - -name:/platform/pci@1e,600000/pci@0/pci@9/pci@0/scsi@1/sd@1,0/hard-disk1 - REFPROP _fru_parent name:/frutree/chassis/SAS-BP/HDD1/disk - -name:/frutree/chassis/SAS-BP/HDD2/disk - TABLE Devices - ROW - PROP Class string r 0 "block" - REFPROP _block_ name:/platform/pci@1e,600000/pci@0/pci@9/pci@0/scsi@1/sd@2,0 - ENDROW - ENDTABLE -name:/platform/pci@1e,600000/pci@0/pci@9/pci@0/scsi@1/sd@2,0 - REFPROP _fru_parent name:/frutree/chassis/SAS-BP/HDD2/disk - -name:/platform/pci@1e,600000/pci@0/pci@9/pci@0/scsi@1/sd@2,0/hard-disk2 - REFPROP _fru_parent name:/frutree/chassis/SAS-BP/HDD2/disk - -name:/frutree/chassis/SAS-BP/HDD3/disk - TABLE Devices - ROW - PROP Class string r 0 "block" - REFPROP _block_ name:/platform/pci@1e,600000/pci@0/pci@9/pci@0/scsi@1/sd@3,0 - ENDROW - ENDTABLE -name:/platform/pci@1e,600000/pci@0/pci@9/pci@0/scsi@1/sd@3,0 - REFPROP _fru_parent name:/frutree/chassis/SAS-BP/HDD3/disk - -name:/platform/pci@1e,600000/pci@0/pci@9/pci@0/scsi@1/sd@3,0/hard-disk3 - REFPROP _fru_parent name:/frutree/chassis/SAS-BP/HDD3/disk - -name:/frutree/chassis/FIOB/system-board/RM0/cdrom - TABLE Device - ROW - PROP Class string r 0 "cdrom" - REFPROP _cdrom_ name:/platform/pci@1e,600000/pci@0/pci@1/pci@0/ide@1f/sd@0,0 - ENDROW - ENDTABLE -name:/platform/pci@1e,600000/pci@0/pci@1/pci@0/ide@1f/sd@0,0 - REFPROP _fru_parent name:/frutree/chassis/FIOB/system-board/RM0/cdrom diff --git a/usr/src/cmd/picl/plugins/sun4u/daktari/Makefile b/usr/src/cmd/picl/plugins/sun4u/daktari/Makefile deleted file mode 100644 index fc8ef83129..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/daktari/Makefile +++ /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, 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 -# -# -#ident "%Z%%M% %I% %E% SMI" -# -# Copyright (c) 2000-2001 by Sun Microsystems, Inc. -# All rights reserved. -# -# cmd/picl/plugins/sun4u/daktari/Makefile -# - -SUBDIRS= psvcplugin psvcpolicy conf devtree frutree frudata .WAIT - -MSGSUBDIRS= psvcplugin psvcpolicy frutree - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -.KEEP_STATE: - -all install clean clobber: $(SUBDIRS) - -_msg: $(MSGSUBDIRS) - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/daktari/conf/Makefile b/usr/src/cmd/picl/plugins/sun4u/daktari/conf/Makefile deleted file mode 100644 index b165f959ba..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/daktari/conf/Makefile +++ /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, 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 -# -# -#ident "%Z%%M% %I% %E% SMI" -# -# Copyright (c) 2000 by Sun Microsystems, Inc. -# All rights reserved. -# -# cmd/picl/plugins/sun4u/daktari/conf/Makefile -# - -OBJECTS= - -# include library definitions -include $(SRC)/lib/Makefile.lib -include $(SRC)/Makefile.psm - -include $(SRC)/cmd/picl/plugins/Makefile.com - -UTSBASE= $(SRC)/uts - -PLATFORM=SUNW,Sun-Fire-880 -install := FILEMODE = 0444 - -CONF= platsvcd.conf psvcobj.conf -ROOTCONF= $(CONF:%=$(USR_PSM_LIB_DIR)/%) - -SRCS= - -LIBS = $(DYNLIB) - -ZDEFS = - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: - -install: $(ROOTCONF) - -$(USR_PSM_LIB_DIR): - @cd $(UTSBASE)/sun4u/daktari; pwd; $(MAKE) $(USR_PSM_LIB_DIR) - -# include library targets -include $(SRC)/cmd/picl/plugins/Makefile.targ -include $(SRC)/lib/Makefile.targ - -$(USR_PSM_LIB_DIR)/%: % $(USR_PSM_LIB_DIR) - $(INS.file) - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/daktari/conf/platsvcd.conf b/usr/src/cmd/picl/plugins/sun4u/daktari/conf/platsvcd.conf deleted file mode 100644 index 67417a260f..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/daktari/conf/platsvcd.conf +++ /dev/null @@ -1,365 +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" - - -/* - * Daktari platsvcd.conf - */ - -/* - * Format: - * - * TIMEOUT - * Specifies a maximum interval in seconds that an application - * is allowed to lock out the platform services daemon - * - * INTERVAL <#tasks at this interval> - * INTERVAL_END - * Indicates the poll interval at which a list of tasks will be run - * - * TASK - * - * Object string ID of first object - * Object string ID of second object - * Object string ID of nth object - * TASK_END - * Specifies the "task" or policy routine, the shared object file it - * resides in, and the object IDs of objects it must be called for - */ - -TIMEOUT 300 - -INTERVAL 0 13 -TASK /usr/platform/sun4u/lib/libpsvcpolicy.so.1 psvc_fan_present_policy_0 -5 -CPU0_PRIM_FAN -CPU1_PRIM_FAN -IO0_PRIM_FAN -IO1_PRIM_FAN -IO_BRIDGE_PRIM_FAN -TASK_END -TASK /usr/platform/sun4u/lib/libpsvcpolicy.so.1 psvc_update_thresholds_0 -12 -CPU0_DIE_TEMPERATURE_SENSOR -CPU1_DIE_TEMPERATURE_SENSOR -ZULU1_DIE_TEMPERATURE_SENSOR -CPU2_DIE_TEMPERATURE_SENSOR -CPU3_DIE_TEMPERATURE_SENSOR -ZULU3_DIE_TEMPERATURE_SENSOR -CPU4_DIE_TEMPERATURE_SENSOR -ZULU4_DIE_TEMPERATURE_SENSOR -CPU5_DIE_TEMPERATURE_SENSOR -CPU6_DIE_TEMPERATURE_SENSOR -ZULU6_DIE_TEMPERATURE_SENSOR -CPU7_DIE_TEMPERATURE_SENSOR -TASK_END -TASK /usr/platform/SUNW,Sun-Fire-880/lib/libpsvcpolicy_psr.so.1 psvc_MB_update_thresholds_0 -1 -MB_AMB_TEMPERATURE_SENSOR -TASK_END -TASK /usr/platform/SUNW,Sun-Fire-880/lib/libpsvcpolicy_psr.so.1 psvc_IO_update_thresholds_0 -1 -IOB_AMB_TEMPERATURE_SENSOR -TASK_END -TASK /usr/platform/SUNW,Sun-Fire-880/lib/libpsvcpolicy_psr.so.1 psvc_DBP_update_thresholds_0 -2 -DBP0_AMB_TEMPERATURE_SENSOR -DBP1_AMB_TEMPERATURE_SENSOR -TASK_END -TASK /usr/platform/SUNW,Sun-Fire-880/lib/libpsvcpolicy_psr.so.1 psvc_update_setpoint_0 -2 -CPU0_PRIM_FAN -CPU1_PRIM_FAN -TASK_END -TASK /usr/platform/sun4u/lib/libpsvcpolicy.so.1 psvc_init_led_policy_0 -20 -CPU_PFAN_FLT_LED -CPU_SFAN_FLT_LED -IO_PFAN_FLT_LED -IO_SFAN_FLT_LED -IO_BRIDGE_PFAN_FLT_LED -IO_BRIDGE_SFAN_FLT_LED -CPU_PFAN_REMOVE_LED -CPU_SFAN_REMOVE_LED -IO_PFAN_REMOVE_LED -IO_SFAN_REMOVE_LED -IO_BRIDGE_PFAN_REMOVE_LED -IO_BRIDGE_SFAN_REMOVE_LED -FSP_GEN_FAULT_LED -FSP_REMOVE_LED -FSP_DISK_FAULT_LED -FSP_POWER_FAULT_LED -FSP_LEFT_THERMAL_FAULT_LED -FSP_RIGHT_THERMAL_FAULT_LED -FSP_LEFT_DOOR_LED -FSP_RIGHT_DOOR_LED -TASK_END -TASK /usr/platform/sun4u/lib/libpsvcpolicy.so.1 psvc_fan_enable_disable_policy_0 -10 -CPU0_PRIM_FAN -CPU1_PRIM_FAN -CPU0_SEC_FAN -CPU1_SEC_FAN -IO0_PRIM_FAN -IO1_PRIM_FAN -IO0_SEC_FAN -IO1_SEC_FAN -IO_BRIDGE_PRIM_FAN -IO_BRIDGE_SEC_FAN -TASK_END -TASK /usr/platform/sun4u/lib/libpsvcpolicy.so.1 psvc_init_state_policy_0 -41 -CPU0_DIE_TEMPERATURE_SENSOR -CPU1_DIE_TEMPERATURE_SENSOR -ZULU1_DIE_TEMPERATURE_SENSOR -CPU2_DIE_TEMPERATURE_SENSOR -CPU3_DIE_TEMPERATURE_SENSOR -ZULU3_DIE_TEMPERATURE_SENSOR -CPU4_DIE_TEMPERATURE_SENSOR -ZULU4_DIE_TEMPERATURE_SENSOR -CPU5_DIE_TEMPERATURE_SENSOR -CPU6_DIE_TEMPERATURE_SENSOR -ZULU6_DIE_TEMPERATURE_SENSOR -CPU7_DIE_TEMPERATURE_SENSOR -MB_AMB_TEMPERATURE_SENSOR -IOB_AMB_TEMPERATURE_SENSOR -DBP0_AMB_TEMPERATURE_SENSOR -DBP1_AMB_TEMPERATURE_SENSOR -PS0 -PS1 -PS2 -CPU0_PRIM_FAN -CPU1_PRIM_FAN -CPU0_SEC_FAN -CPU1_SEC_FAN -IO0_PRIM_FAN -IO1_PRIM_FAN -IO0_SEC_FAN -IO1_SEC_FAN -IO_BRIDGE_PRIM_FAN -IO_BRIDGE_SEC_FAN -DISK0 -DISK1 -DISK2 -DISK3 -DISK4 -DISK5 -DISK6 -DISK7 -DISK8 -DISK9 -DISK10 -DISK11 -TASK_END -TASK /usr/platform/SUNW,Sun-Fire-880/lib/libpsvcpolicy_psr.so.1 psvc_update_cpu_module_card_node_0 -2 -ZULU_1_3_MOD_CARD -ZULU_4_6_MOD_CARD -TASK_END -TASK /usr/platform/SUNW,Sun-Fire-880/lib/libpsvcpolicy_psr.so.1 psvc_fan_blast_shutoff_policy_0 -1 -FAN_BLAST_OFF_SWITCH -TASK_END -TASK /usr/platform/SUNW,Sun-Fire-880/lib/libpsvcpolicy_psr.so.1 psvc_fan_init_speed_0 -2 -CPU0_PRIM_FAN -IO0_PRIM_FAN -TASK_END -TASK /usr/platform/SUNW,Sun-Fire-880/lib/libpsvcpolicy_psr.so.1 psvc_remove_missing_nodes_0 -1 -SYSTEM -TASK_END -INTERVAL_END - -INTERVAL 5 1 -TASK /usr/platform/sun4u/lib/libpsvcpolicy.so.1 psvc_fan_hotplug_policy_0 -10 -CPU0_PRIM_FAN -CPU1_PRIM_FAN -CPU0_SEC_FAN -CPU1_SEC_FAN -IO0_PRIM_FAN -IO1_PRIM_FAN -IO0_SEC_FAN -IO1_SEC_FAN -IO_BRIDGE_PRIM_FAN -IO_BRIDGE_SEC_FAN -TASK_END -INTERVAL_END - -INTERVAL 30 4 -TASK /usr/platform/SUNW,Sun-Fire-880/lib/libpsvcpolicy_psr.so.1 psvc_fan_fault_check_policy_0 -1 -SYSTEM -TASK_END -TASK /usr/platform/sun4u/lib/libpsvcpolicy.so.1 psvc_fan_enable_disable_policy_0 -10 -CPU0_PRIM_FAN -CPU1_PRIM_FAN -CPU0_SEC_FAN -CPU1_SEC_FAN -IO0_PRIM_FAN -IO1_PRIM_FAN -IO0_SEC_FAN -IO1_SEC_FAN -IO_BRIDGE_PRIM_FAN -IO_BRIDGE_SEC_FAN -TASK_END -TASK /usr/platform/sun4u/lib/libpsvcpolicy.so.1 psvc_switch_fan_onoff_policy_0 -8 -CPU0_SEC_FAN -CPU1_SEC_FAN -IO0_PRIM_FAN -IO1_PRIM_FAN -IO0_SEC_FAN -IO1_SEC_FAN -IO_BRIDGE_PRIM_FAN -IO_BRIDGE_SEC_FAN -TASK_END -TASK /usr/platform/sun4u/lib/libpsvcpolicy.so.1 psvc_fan_control_policy_0 -1 -CPU0_PRIM_FAN -TASK_END -INTERVAL_END - -INTERVAL 30 4 -TASK /usr/platform/SUNW,Sun-Fire-880/lib/libpsvcpolicy_psr.so.1 psvc_ps_check_and_disable_dr_policy_0 -1 -SYSTEM -TASK_END -TASK /usr/platform/SUNW,Sun-Fire-880/lib/libpsvcpolicy_psr.so.1 psvc_check_disk_fault_policy_0 -1 -SYSTEM -TASK_END -TASK /usr/platform/sun4u/lib/libpsvcpolicy.so.1 psvc_check_temperature_policy_0 -16 -CPU0_DIE_TEMPERATURE_SENSOR -CPU1_DIE_TEMPERATURE_SENSOR -ZULU1_DIE_TEMPERATURE_SENSOR -CPU2_DIE_TEMPERATURE_SENSOR -CPU3_DIE_TEMPERATURE_SENSOR -ZULU3_DIE_TEMPERATURE_SENSOR -CPU4_DIE_TEMPERATURE_SENSOR -ZULU4_DIE_TEMPERATURE_SENSOR -CPU5_DIE_TEMPERATURE_SENSOR -CPU6_DIE_TEMPERATURE_SENSOR -ZULU6_DIE_TEMPERATURE_SENSOR -CPU7_DIE_TEMPERATURE_SENSOR -MB_AMB_TEMPERATURE_SENSOR -IOB_AMB_TEMPERATURE_SENSOR -DBP0_AMB_TEMPERATURE_SENSOR -DBP1_AMB_TEMPERATURE_SENSOR -TASK_END -TASK /usr/platform/SUNW,Sun-Fire-880/lib/libpsvcpolicy_psr.so.1 psvc_shutdown_policy -16 -CPU0_DIE_TEMPERATURE_SENSOR -CPU1_DIE_TEMPERATURE_SENSOR -ZULU1_DIE_TEMPERATURE_SENSOR -CPU2_DIE_TEMPERATURE_SENSOR -CPU3_DIE_TEMPERATURE_SENSOR -ZULU3_DIE_TEMPERATURE_SENSOR -CPU4_DIE_TEMPERATURE_SENSOR -ZULU4_DIE_TEMPERATURE_SENSOR -CPU5_DIE_TEMPERATURE_SENSOR -CPU6_DIE_TEMPERATURE_SENSOR -ZULU6_DIE_TEMPERATURE_SENSOR -CPU7_DIE_TEMPERATURE_SENSOR -MB_AMB_TEMPERATURE_SENSOR -IOB_AMB_TEMPERATURE_SENSOR -DBP0_AMB_TEMPERATURE_SENSOR -DBP1_AMB_TEMPERATURE_SENSOR -TASK_END -INTERVAL_END - -INTERVAL 30 1 -TASK /usr/platform/SUNW,Sun-Fire-880/lib/libpsvcpolicy_psr.so.1 psvc_update_FSP_fault_led_policy_0 -3 -FSP_LEFT_THERMAL_FAULT_LED -FSP_RIGHT_THERMAL_FAULT_LED -FSP_DISK_FAULT_LED -TASK_END -INTERVAL_END - -INTERVAL 15 1 -TASK /usr/platform/sun4u/lib/libpsvcpolicy.so.1 psvc_hotplug_notifier_policy_0 -21 -PCI0_CARD -PCI1_CARD -PCI2_CARD -PCI3_CARD -PCI4_CARD -PCI5_CARD -PCI6_CARD -PCI7_CARD -PCI8_CARD -DISK0 -DISK1 -DISK2 -DISK3 -DISK4 -DISK5 -DISK6 -DISK7 -DISK8 -DISK9 -DISK10 -DISK11 -TASK_END -INTERVAL_END - -INTERVAL 5 4 -TASK /usr/platform/SUNW,Sun-Fire-880/lib/libpsvcpolicy_psr.so.1 psvc_ps_hotplug_policy_0 -3 -PS0 -PS1 -PS2 -TASK_END -TASK /usr/platform/SUNW,Sun-Fire-880/lib/libpsvcpolicy_psr.so.1 psvc_check_ps_hotplug_status_0 -3 -PS0 -PS1 -PS2 -TASK_END -TASK /usr/platform/SUNW,Sun-Fire-880/lib/libpsvcpolicy_psr.so.1 psvc_ps_device_fail_notifier_policy_0 -1 -SYSTEM -TASK_END -TASK /usr/platform/SUNW,Sun-Fire-880/lib/libpsvcpolicy_psr.so.1 psvc_ps_overcurrent_check_policy_0 -1 -SYSTEM -TASK_END -INTERVAL_END - -INTERVAL 30 1 -TASK /usr/platform/sun4u/lib/libpsvcpolicy.so.1 psvc_keyswitch_position_policy_0 -1 -KEYSWITCH -TASK_END -INTERVAL_END - - diff --git a/usr/src/cmd/picl/plugins/sun4u/daktari/conf/psvcobj.conf b/usr/src/cmd/picl/plugins/sun4u/daktari/conf/psvcobj.conf deleted file mode 100644 index 2bc91523a1..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/daktari/conf/psvcobj.conf +++ /dev/null @@ -1,2113 +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" - - -/* - * Daktari psvcobj.conf - */ - -/* - * Format : - * - * OBJECT_INFO - * ... - * ... - * ... - * OBJECT_INFO_END - * This section specifies the static property information for each - * defined object. Each property in the property list is preceded by - * an identifying property label, such as, "_class=". The "label" - * property is the first string on each line. The features and address - * specification properties are built from those fields within these - * properties that are present on each line. - * - * ASSOCIATIONS - * ASSOCIATION - * - * ... (more association pairs) - * ASSOCIATION_END - * ... (more ASSOCIATION sections) - * ASSOCIATIONS_END - * Lists association pairs for each association type to show relationships - * between objects - * - * DEVPATHS - * - * ... (more entries) - * DEVPATHS_END - * Lists the device paths and the matching (controller, bus, addr, port) - * - * TABLES - * TABLE - * - * ... - * TABLE_END - * TABLES_END - * Lists the tables used by the framework - * - * PROJECTED_PROPERTIES - * - * PROJECTED_PROPETIES_END - * Used to specify projected properties to be cerated in PICL nodes - * - */ - -OBJECT_INFO -/SYSTEM _class=3,Subclass=0,Instance=0,PERM=1,FRU=1 -/SYSTEM/MOTHERBOARD _class=3,Subclass=0,Instance=0,PERM=1,FRU=1 -/SYSTEM/IO_BOARD _class=3,Subclass=0,Instance=0,PERM=1,FRU=1 -/SYSTEM/PDB _class=3,Subclass=0,Instance=0,PERM=1,FRU=1 -/SYSTEM/FSP _class=3,Subclass=0,Instance=0,PERM=1,FRU=1 -/SYSTEM/CPU_PFAN_SLOT _class=3,Subclass=0,Instance=0,PERM=1 -/SYSTEM/CPU_SFAN_SLOT _class=3,Subclass=0,Instance=0,PERM=1 -/SYSTEM/IO_PFAN_SLOT _class=3,Subclass=0,Instance=0,PERM=1 -/SYSTEM/IO_SFAN_SLOT _class=3,Subclass=0,Instance=0,PERM=1 -/SYSTEM/IO_BRIDGE_PFAN_SLOT _class=3,Subclass=0,Instance=0,PERM=1 -/SYSTEM/IO_BRIDGE_SFAN_SLOT _class=3,Subclass=0,Instance=0,PERM=1 -/SYSTEM/IO_BOARD/FAN_BLAST_OFF_SWITCH _class=8,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=1,INVERT=0,PORT=2,BITSHIFT=1,BYTEMASK=0x2,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/CPU_PFAN_SLOT/CPU0_PRIM_FAN _class=1,Subclass=0,Instance=0,FAN_DRIVE_PR=1,TEMP_DRIVEN=1,SPEED_CTRL_PR=1,CLOSED_LOOP_CTRL=1,FAN_DRIVE_TABLE_PR=1,HOTPLUG=1,PRIMARY=1,FRU=1,Setpoint=75,Hysteresis=3,Loopgain=200,Loopbias=1023 -/SYSTEM/CPU_PFAN_SLOT/CPU1_PRIM_FAN _class=1,Subclass=0,Instance=1,FAN_DRIVE_PR=1,TEMP_DRIVEN=1,SPEED_CTRL_PR=1,CLOSED_LOOP_CTRL=1,FAN_DRIVE_TABLE_PR=1,HOTPLUG=1,PRIMARY=1,FRU=1,Setpoint=75,Hysteresis=3,Loopgain=200,Loopbias=1023 -/SYSTEM/CPU_SFAN_SLOT/CPU0_SEC_FAN _class=1,Subclass=0,Instance=0,FAN_ON_OFF=1,HOTPLUG=1,SECONDARY=1,FRU=1,Setpoint=0,Hysteresis=0,Loopgain=0,Loopbias=0 -/SYSTEM/CPU_SFAN_SLOT/CPU1_SEC_FAN _class=1,Subclass=0,Instance=1,FAN_ON_OFF=1,HOTPLUG=1,SECONDARY=1,FRU=1,Setpoint=0,Hysteresis=0,Loopgain=0,Loopbias=0 -/SYSTEM/IO_PFAN_SLOT/IO0_PRIM_FAN _class=1,Subclass=0,Instance=0,FAN_DRIVE_PR=1,TEMP_DRIVEN=1,SPEED_CTRL_PR=1,FAN_ON_OFF=1,CLOSED_LOOP_CTRL=1,FAN_DRIVE_TABLE_PR=1,HOTPLUG=1,PRIMARY=1,FRU=1,Setpoint=30,Hysteresis=3,Loopgain=200,Loopbias=1023 -/SYSTEM/IO_PFAN_SLOT/IO1_PRIM_FAN _class=1,Subclass=0,Instance=1,FAN_DRIVE_PR=1,TEMP_DRIVEN=1,SPEED_CTRL_PR=1,FAN_ON_OFF=1,CLOSED_LOOP_CTRL=1,FAN_DRIVE_TABLE_PR=1,HOTPLUG=1,PRIMARY=1,FRU=1,Setpoint=30,Hysteresis=3,Loopgain=200,Loopbias=1023 -/SYSTEM/IO_SFAN_SLOT/IO0_SEC_FAN _class=1,Subclass=0,Instance=0,FAN_ON_OFF=1,HOTPLUG=1,SECONDARY=1,FRU=1,Setpoint=0,Hysteresis=0,Loopgain=0,Loopbias=0 -/SYSTEM/IO_SFAN_SLOT/IO1_SEC_FAN _class=1,Subclass=0,Instance=1,FAN_ON_OFF=1,HOTPLUG=1,SECONDARY=1,FRU=1,Setpoint=0,Hysteresis=0,Loopgain=0,Loopbias=0 -/SYSTEM/IO_BRIDGE_PFAN_SLOT/IO_BRIDGE_PRIM_FAN _class=1,Subclass=0,Instance=0,FAN_ON_OFF=1,HOTPLUG=1,PRIMARY=1,FRU=1,Setpoint=0,Hysteresis=0,Loopgain=0,Loopbias=0 -/SYSTEM/IO_BRIDGE_SFAN_SLOT/IO_BRIDGE_SEC_FAN _class=1,Subclass=0,Instance=0,FAN_ON_OFF=1,HOTPLUG=1,SECONDARY=1,FRU=1,Setpoint=0,Hysteresis=0,Loopgain=0,Loopbias=0 -/SYSTEM/CPU_PFAN_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=6,INVERT=0,PORT=0,BITSHIFT=6,BYTEMASK=0x40,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/CPU_SFAN_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=7,INVERT=0,PORT=0,BITSHIFT=7,BYTEMASK=0x80,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/IO_PFAN_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/IO_SFAN_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=1,INVERT=1,PORT=1,BITSHIFT=1,BYTEMASK=0x2,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/IO_BRIDGE_PFAN_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=2,INVERT=0,PORT=1,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/IO_BRIDGE_SFAN_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=3,INVERT=0,PORT=1,BITSHIFT=3,BYTEMASK=0x8,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/CPU_PFAN_REMOVE_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=5,BUSADDR=0x46,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/CPU_SFAN_REMOVE_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=1,INVERT=1,PORT=0,BITSHIFT=1,BYTEMASK=0x2,REG=0,TYPE=5,BUSADDR=0x46,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/IO_PFAN_REMOVE_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=2,INVERT=0,PORT=0,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=5,BUSADDR=0x46,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/IO_SFAN_REMOVE_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=3,INVERT=0,PORT=0,BITSHIFT=3,BYTEMASK=0x8,REG=0,TYPE=5,BUSADDR=0x46,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/IO_BRIDGE_PFAN_REMOVE_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=4,INVERT=0,PORT=0,BITSHIFT=4,BYTEMASK=0x10,REG=0,TYPE=5,BUSADDR=0x46,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/IO_BRIDGE_SFAN_REMOVE_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=5,INVERT=0,PORT=0,BITSHIFT=5,BYTEMASK=0x20,REG=0,TYPE=5,BUSADDR=0x46,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/IO_BOARD/CPU_PFAN_PR_SENSOR _class=6,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/CPU_SFAN_PR_SENSOR _class=6,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=1,INVERT=1,PORT=0,BITSHIFT=1,BYTEMASK=0x2,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/IO_PFAN_PR_SENSOR _class=6,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=2,INVERT=0,PORT=0,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/IO_SFAN_PR_SENSOR _class=6,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=3,INVERT=0,PORT=0,BITSHIFT=3,BYTEMASK=0x8,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/IO_BRIDGE_PFAN_PR_SENSOR _class=6,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=4,INVERT=0,PORT=0,BITSHIFT=4,BYTEMASK=0x10,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/IO_BRIDGE_SFAN_PR_SENSOR _class=6,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=5,INVERT=0,PORT=0,BITSHIFT=5,BYTEMASK=0x20,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU0_PFAN_TACH _class=7,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=2,BITSHIFT=2,BYTEMASK=0x0,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=0,Hi-warn=0,Hi-shut=0 -/SYSTEM/MOTHERBOARD/CPU1_PFAN_TACH _class=7,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=3,BITSHIFT=2,BYTEMASK=0x0,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=0,Hi-warn=0,Hi-shut=0 -/SYSTEM/MOTHERBOARD/CPU0_SFAN_TACH _class=7,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=2,BITSHIFT=1,BYTEMASK=0x0,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=0,Hi-warn=0,Hi-shut=0 -/SYSTEM/MOTHERBOARD/CPU1_SFAN_TACH _class=7,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=3,BITSHIFT=1,BYTEMASK=0x0,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=0,Hi-warn=0,Hi-shut=0 -/SYSTEM/IO_BOARD/IO0_PFAN_TACH _class=7,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=2,BYTEMASK=0x0,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=0,Hi-warn=0,Hi-shut=0 -/SYSTEM/IO_BOARD/IO1_PFAN_TACH _class=7,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=2,BYTEMASK=0x0,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=0,Hi-warn=0,Hi-shut=0 -/SYSTEM/IO_BOARD/IO0_SFAN_TACH _class=7,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=1,BYTEMASK=0x0,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=0,Hi-warn=0,Hi-shut=0 -/SYSTEM/IO_BOARD/IO1_SFAN_TACH _class=7,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=1,BYTEMASK=0x0,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=0,Hi-warn=0,Hi-shut=0 -/SYSTEM/MOTHERBOARD/IO_BRIDGE_PFAN_TACH _class=7,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=2,BYTEMASK=0x0,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=0,Hi-warn=0,Hi-shut=0 -/SYSTEM/MOTHERBOARD/IO_BRIDGE_SFAN_TACH _class=7,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=1,BYTEMASK=0x0,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=0,Hi-warn=0,Hi-shut=0 -/SYSTEM/IO_BOARD/CPU_PFAN_SPEED_CONTROL _class=5,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=3,BUSADDR=0x5e,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/IO_PFAN_SPEED_CONTROL _class=5,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=3,BUSADDR=0x5a,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/CPU_SFAN_ONOFF_SWITCH _class=8,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=2,INVERT=0,PORT=2,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/IO_PFAN_ONOFF_SWITCH _class=8,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=4,INVERT=0,PORT=4,BITSHIFT=4,BYTEMASK=0x10,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/IO_SFAN_ONOFF_SWITCH _class=8,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=5,INVERT=0,PORT=4,BITSHIFT=5,BYTEMASK=0x20,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/IO_BRIDGE_PFAN_ONOFF_SWITCH _class=8,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=4,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/IO_BRIDGE_SFAN_ONOFF_SWITCH _class=8,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=1,INVERT=1,PORT=4,BITSHIFT=1,BYTEMASK=0x2,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/DISK_BP0_PR_SENSOR _class=6,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=2,INVERT=0,PORT=4,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/DISK_BP1_PR_SENSOR _class=6,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=3,INVERT=0,PORT=4,BITSHIFT=3,BYTEMASK=0x8,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/RSC_PR_SENSOR _class=6,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=5,INVERT=0,PORT=3,BITSHIFT=5,BYTEMASK=0x01,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/CPU_FAN_P_S_MON_SWITCH _class=8,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=3,INVERT=0,PORT=2,BITSHIFT=3,BYTEMASK=0x8,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/IO_FAN_P_S_MON_SWITCH _class=8,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=7,INVERT=0,PORT=3,BITSHIFT=7,BYTEMASK=0x80,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS0_SLOT _class=3,Subclass=0,Instance=0,PERM=1 -/SYSTEM/PDB/PS1_SLOT _class=3,Subclass=0,Instance=1,PERM=1 -/SYSTEM/PDB/PS2_SLOT _class=3,Subclass=0,Instance=2,PERM=1 -/SYSTEM/PDB/PS0_SLOT/PS0 _class=3,Subclass=0,Instance=0,HOTPLUG=1,FRU=1 -/SYSTEM/PDB/PS1_SLOT/PS1 _class=3,Subclass=0,Instance=1,HOTPLUG=1,FRU=1 -/SYSTEM/PDB/PS2_SLOT/PS2 _class=3,Subclass=0,Instance=2,HOTPLUG=1,FRU=1 -/SYSTEM/PDB/PS0_SLOT/PS0/PS0_3_3V_I_SENSOR _class=4,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,HI_WARN_MASK=1,CONV_TABLE=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=6,BUSADDR=0x90,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=0,Hi-warn=34,Hi-shut=0 -/SYSTEM/PDB/PS0_SLOT/PS0/PS0_5V_I_SENSOR _class=4,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,HI_WARN_MASK=1,CONV_TABLE=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=6,BUSADDR=0x90,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=0,Hi-warn=26,Hi-shut=0 -/SYSTEM/PDB/PS0_SLOT/PS0/PS0_12V_I_SENSOR _class=4,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,HI_WARN_MASK=1,CONV_TABLE=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=2,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=6,BUSADDR=0x90,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=0,Hi-warn=19,Hi-shut=0 -/SYSTEM/PDB/PS0_SLOT/PS0/PS0_48V_I_SENSOR _class=4,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,HI_WARN_MASK=1,CONV_TABLE=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=3,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=6,BUSADDR=0x90,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=0,Hi-warn=14,Hi-shut=0 -/SYSTEM/PDB/PS0_SLOT/PS0/PS0_SENSOR_VALID_SWITCH _class=8,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=5,BUSADDR=0x70,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS0_SLOT/PS0/PS0_FAN_FAIL_SENSOR _class=8,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=2,INVERT=0,PORT=0,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=5,BUSADDR=0x70,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS0_SLOT/PS0/PS0_TEMP_FAIL_SENSOR _class=8,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=3,INVERT=0,PORT=0,BITSHIFT=3,BYTEMASK=0x8,REG=0,TYPE=5,BUSADDR=0x70,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS0_SLOT/PS0/PS0_I_SHARE_FAIL_SENSOR _class=8,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=4,INVERT=0,PORT=0,BITSHIFT=4,BYTEMASK=0x10,REG=0,TYPE=5,BUSADDR=0x70,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/PS0_PR_SENSOR _class=6,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=6,INVERT=0,PORT=2,BITSHIFT=6,BYTEMASK=0x40,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS1_SLOT/PS1/PS1_3_3V_I_SENSOR _class=4,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,HI_WARN_MASK=1,CONV_TABLE=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=6,BUSADDR=0x92,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=0,Hi-warn=34,Hi-shut=0 -/SYSTEM/PDB/PS1_SLOT/PS1/PS1_5V_I_SENSOR _class=4,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,HI_WARN_MASK=1,CONV_TABLE=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=6,BUSADDR=0x92,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=0,Hi-warn=26,Hi-shut=0 -/SYSTEM/PDB/PS1_SLOT/PS1/PS1_12V_I_SENSOR _class=4,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,HI_WARN_MASK=1,CONV_TABLE=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=2,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=6,BUSADDR=0x92,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=0,Hi-warn=19,Hi-shut=0 -/SYSTEM/PDB/PS1_SLOT/PS1/PS1_48V_I_SENSOR _class=4,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,HI_WARN_MASK=1,CONV_TABLE=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=3,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=6,BUSADDR=0x92,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=0,Hi-warn=14,Hi-shut=0 -/SYSTEM/PDB/PS1_SLOT/PS1/PS1_SENSOR_VALID_SWITCH _class=8,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=5,BUSADDR=0x72,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS1_SLOT/PS1/PS1_FAN_FAIL_SENSOR _class=8,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=2,INVERT=0,PORT=0,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=5,BUSADDR=0x72,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS1_SLOT/PS1/PS1_TEMP_FAIL_SENSOR _class=8,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=3,INVERT=0,PORT=0,BITSHIFT=3,BYTEMASK=0x8,REG=0,TYPE=5,BUSADDR=0x72,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS1_SLOT/PS1/PS1_I_SHARE_FAIL_SENSOR _class=8,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=4,INVERT=0,PORT=0,BITSHIFT=4,BYTEMASK=0x10,REG=0,TYPE=5,BUSADDR=0x72,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/PS1_PR_SENSOR _class=6,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=4,INVERT=0,PORT=1,BITSHIFT=4,BYTEMASK=0x10,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS2_SLOT/PS2/PS2_3_3V_I_SENSOR _class=4,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,HI_WARN_MASK=1,CONV_TABLE=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=6,BUSADDR=0x94,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=0,Hi-warn=34,Hi-shut=0 -/SYSTEM/PDB/PS2_SLOT/PS2/PS2_5V_I_SENSOR _class=4,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,HI_WARN_MASK=1,CONV_TABLE=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=6,BUSADDR=0x94,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=0,Hi-warn=26,Hi-shut=0 -/SYSTEM/PDB/PS2_SLOT/PS2/PS2_12V_I_SENSOR _class=4,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,HI_WARN_MASK=1,CONV_TABLE=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=2,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=6,BUSADDR=0x94,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=0,Hi-warn=19,Hi-shut=0 -/SYSTEM/PDB/PS2_SLOT/PS2/PS2_48V_I_SENSOR _class=4,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,HI_WARN_MASK=1,CONV_TABLE=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=3,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=6,BUSADDR=0x94,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=0,Hi-warn=14,Hi-shut=0 -/SYSTEM/PDB/PS2_SLOT/PS2/PS2_SENSOR_VALID_SWITCH _class=8,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=5,BUSADDR=0x74,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS2_SLOT/PS2/PS2_FAN_FAIL_SENSOR _class=8,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=2,INVERT=0,PORT=0,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=5,BUSADDR=0x74,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS2_SLOT/PS2/PS2_TEMP_FAIL_SENSOR _class=8,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=3,INVERT=0,PORT=0,BITSHIFT=3,BYTEMASK=0x8,REG=0,TYPE=5,BUSADDR=0x74,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS2_SLOT/PS2/PS2_I_SHARE_FAIL_SENSOR _class=8,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=4,INVERT=0,PORT=0,BITSHIFT=4,BYTEMASK=0x10,REG=0,TYPE=5,BUSADDR=0x74,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/PS2_PR_SENSOR _class=6,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=6,INVERT=0,PORT=1,BITSHIFT=6,BYTEMASK=0x40,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT _class=3,Subclass=0,Instance=0,PERM=1 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT _class=3,Subclass=0,Instance=1,PERM=1 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT _class=3,Subclass=0,Instance=2,PERM=1 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT _class=3,Subclass=0,Instance=3,PERM=1 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD _class=3,Subclass=0,Instance=0,HOTPLUG=1,FRU=1 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD _class=3,Subclass=0,Instance=1,HOTPLUG=1,FRU=1 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/ZULU_1_3_MOD_CARD _class=3,Subclass=0,Instance=1,HOTPLUG=1,FRU=1 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/CPU_4_6_MOD_CARD _class=3,Subclass=0,Instance=2,HOTPLUG=1,FRU=1 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/ZULU_4_6_MOD_CARD _class=3,Subclass=0,Instance=2,HOTPLUG=1,FRU=1 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT/CPU_5_7_MOD_CARD _class=3,Subclass=0,Instance=3,HOTPLUG=1,FRU=1 -/SYSTEM/CPU_0_2_MOD_REMOVE_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x3,REG=3,TYPE=1,BUSADDR=0xec,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/CPU_1_3_MOD_REMOVE_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x3,REG=11,TYPE=1,BUSADDR=0xec,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/CPU_4_6_MOD_REMOVE_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=2,BITSHIFT=0,BYTEMASK=0x3,REG=19,TYPE=1,BUSADDR=0xec,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/CPU_5_7_MOD_REMOVE_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=3,BITSHIFT=0,BYTEMASK=0x3,REG=27,TYPE=1,BUSADDR=0xec,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/CPU_0_2_MOD_FLT_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=2,BYTEMASK=0xc,REG=3,TYPE=1,BUSADDR=0xec,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/CPU_1_3_MOD_FLT_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=2,BYTEMASK=0xc,REG=11,TYPE=1,BUSADDR=0xec,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/CPU_4_6_MOD_FLT_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=2,BITSHIFT=2,BYTEMASK=0xc,REG=19,TYPE=1,BUSADDR=0xec,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/CPU_5_7_MOD_FLT_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=3,BITSHIFT=2,BYTEMASK=0xc,REG=27,TYPE=1,BUSADDR=0xec,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_PR_SENSOR _class=10,Subclass=0,Instance=0,GPIO_REG=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=2,INVERT=0,PORT=0,BITSHIFT=2,BYTEMASK=0x4,REG=1,TYPE=1,BUSADDR=0xec,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_PR_SENSOR _class=10,Subclass=0,Instance=0,GPIO_REG=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=2,INVERT=0,PORT=1,BITSHIFT=2,BYTEMASK=0x4,REG=9,TYPE=1,BUSADDR=0xec,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_PR_SENSOR _class=10,Subclass=0,Instance=0,GPIO_REG=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=2,INVERT=0,PORT=2,BITSHIFT=2,BYTEMASK=0x4,REG=17,TYPE=1,BUSADDR=0xec,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_PR_SENSOR _class=10,Subclass=0,Instance=0,GPIO_REG=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=2,INVERT=0,PORT=3,BITSHIFT=2,BYTEMASK=0x4,REG=25,TYPE=1,BUSADDR=0xec,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/CPU0_DIE_TEMPERATURE_SENSOR _class=0,Subclass=1,Instance=0,DIE_TEMP=1,HOTPLUG=1,RDWR=1,LO_WARN_MASK=1,LO_SHUT_MASK=1,HI_WARN_MASK=1,HI_SHUT_MASK=1,OPT_TEMP_MASK=1,HW_LO_MASK=1,HW_HI_MASK=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=4,BUSADDR=0x30,BUSNUM=0,CNTLR=1,Lo-warn=-10,Lo-shut=-15,Hi-warn=85,Hi-shut=90,Opt-temp=70,Hw-hi-shut=95,Hw-lo-shut=-25 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/CPU1_DIE_TEMPERATURE_SENSOR _class=0,Subclass=1,Instance=1,DIE_TEMP=1,HOTPLUG=1,RDWR=1,LO_WARN_MASK=1,LO_SHUT_MASK=1,HI_WARN_MASK=1,HI_SHUT_MASK=1,OPT_TEMP_MASK=1,HW_LO_MASK=1,HW_HI_MASK=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=4,BUSADDR=0x32,BUSNUM=0,CNTLR=1,Lo-warn=-10,Lo-shut=-15,Hi-warn=85,Hi-shut=90,Opt-temp=70,Hw-hi-shut=95,Hw-lo-shut=-25 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/ZULU_1_3_MOD_CARD/ZULU1_DIE_TEMPERATURE_SENSOR _class=0,Subclass=1,Instance=1,DIE_TEMP=1,HOTPLUG=1,RDWR=1,LO_WARN_MASK=1,LO_SHUT_MASK=1,HI_WARN_MASK=1,HI_SHUT_MASK=1,OPT_TEMP_MASK=1,HW_LO_MASK=1,HW_HI_MASK=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=4,BUSADDR=0x32,BUSNUM=0,CNTLR=1,Lo-warn=-10,Lo-shut=-15,Hi-warn=85,Hi-shut=90,Opt-temp=70,Hw-hi-shut=95,Hw-lo-shut=-25 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/CPU2_DIE_TEMPERATURE_SENSOR _class=0,Subclass=1,Instance=2,DIE_TEMP=1,HOTPLUG=1,RDWR=1,LO_WARN_MASK=1,LO_SHUT_MASK=1,HI_WARN_MASK=1,HI_SHUT_MASK=1,OPT_TEMP_MASK=1,HW_LO_MASK=1,HW_HI_MASK=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=4,BUSADDR=0x34,BUSNUM=0,CNTLR=1,Lo-warn=-10,Lo-shut=-15,Hi-warn=85,Hi-shut=90,Opt-temp=70,Hw-hi-shut=95,Hw-lo-shut=-25 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/CPU3_DIE_TEMPERATURE_SENSOR _class=0,Subclass=1,Instance=3,DIE_TEMP=1,HOTPLUG=1,RDWR=1,LO_WARN_MASK=1,LO_SHUT_MASK=1,HI_WARN_MASK=1,HI_SHUT_MASK=1,OPT_TEMP_MASK=1,HW_LO_MASK=1,HW_HI_MASK=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=4,BUSADDR=0x52,BUSNUM=0,CNTLR=1,Lo-warn=-10,Lo-shut=-15,Hi-warn=85,Hi-shut=90,Opt-temp=70,Hw-hi-shut=95,Hw-lo-shut=-25 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/ZULU_1_3_MOD_CARD/ZULU3_DIE_TEMPERATURE_SENSOR _class=0,Subclass=1,Instance=3,DIE_TEMP=1,HOTPLUG=1,RDWR=1,LO_WARN_MASK=1,LO_SHUT_MASK=1,HI_WARN_MASK=1,HI_SHUT_MASK=1,OPT_TEMP_MASK=1,HW_LO_MASK=1,HW_HI_MASK=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=4,BUSADDR=0x52,BUSNUM=0,CNTLR=1,Lo-warn=-10,Lo-shut=-15,Hi-warn=85,Hi-shut=90,Opt-temp=70,Hw-hi-shut=95,Hw-lo-shut=-25 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/CPU_4_6_MOD_CARD/CPU4_DIE_TEMPERATURE_SENSOR _class=0,Subclass=1,Instance=4,DIE_TEMP=1,HOTPLUG=1,RDWR=1,LO_WARN_MASK=1,LO_SHUT_MASK=1,HI_WARN_MASK=1,HI_SHUT_MASK=1,OPT_TEMP_MASK=1,HW_LO_MASK=1,HW_HI_MASK=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=4,BUSADDR=0x54,BUSNUM=0,CNTLR=1,Lo-warn=-10,Lo-shut=-15,Hi-warn=85,Hi-shut=90,Opt-temp=70,Hw-hi-shut=95,Hw-lo-shut=-25 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/ZULU_4_6_MOD_CARD/ZULU4_DIE_TEMPERATURE_SENSOR _class=0,Subclass=1,Instance=4,DIE_TEMP=1,HOTPLUG=1,RDWR=1,LO_WARN_MASK=1,LO_SHUT_MASK=1,HI_WARN_MASK=1,HI_SHUT_MASK=1,OPT_TEMP_MASK=1,HW_LO_MASK=1,HW_HI_MASK=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=4,BUSADDR=0x54,BUSNUM=0,CNTLR=1,Lo-warn=-10,Lo-shut=-15,Hi-warn=85,Hi-shut=90,Opt-temp=70,Hw-hi-shut=95,Hw-lo-shut=-25 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT/CPU_5_7_MOD_CARD/CPU5_DIE_TEMPERATURE_SENSOR _class=0,Subclass=1,Instance=5,DIE_TEMP=1,HOTPLUG=1,RDWR=1,LO_WARN_MASK=1,LO_SHUT_MASK=1,HI_WARN_MASK=1,HI_SHUT_MASK=1,OPT_TEMP_MASK=1,HW_LO_MASK=1,HW_HI_MASK=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=4,BUSADDR=0x56,BUSNUM=0,CNTLR=1,Lo-warn=-10,Lo-shut=-15,Hi-warn=85,Hi-shut=90,Opt-temp=70,Hw-hi-shut=95,Hw-lo-shut=-25 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/CPU_4_6_MOD_CARD/CPU6_DIE_TEMPERATURE_SENSOR _class=0,Subclass=1,Instance=6,DIE_TEMP=1,HOTPLUG=1,RDWR=1,LO_WARN_MASK=1,LO_SHUT_MASK=1,HI_WARN_MASK=1,HI_SHUT_MASK=1,OPT_TEMP_MASK=1,HW_LO_MASK=1,HW_HI_MASK=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=4,BUSADDR=0x98,BUSNUM=0,CNTLR=1,Lo-warn=-10,Lo-shut=-15,Hi-warn=85,Hi-shut=90,Opt-temp=70,Hw-hi-shut=95,Hw-lo-shut=-25 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/ZULU_4_6_MOD_CARD/ZULU6_DIE_TEMPERATURE_SENSOR _class=0,Subclass=1,Instance=6,DIE_TEMP=1,HOTPLUG=1,RDWR=1,LO_WARN_MASK=1,LO_SHUT_MASK=1,HI_WARN_MASK=1,HI_SHUT_MASK=1,OPT_TEMP_MASK=1,HW_LO_MASK=1,HW_HI_MASK=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=4,BUSADDR=0x98,BUSNUM=0,CNTLR=1,Lo-warn=-10,Lo-shut=-15,Hi-warn=85,Hi-shut=90,Opt-temp=70,Hw-hi-shut=95,Hw-lo-shut=-25 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT/CPU_5_7_MOD_CARD/CPU7_DIE_TEMPERATURE_SENSOR _class=0,Subclass=1,Instance=7,DIE_TEMP=1,HOTPLUG=1,RDWR=1,LO_WARN_MASK=1,LO_SHUT_MASK=1,HI_WARN_MASK=1,HI_SHUT_MASK=1,OPT_TEMP_MASK=1,HW_LO_MASK=1,HW_HI_MASK=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=4,BUSADDR=0x9a,BUSNUM=0,CNTLR=1,Lo-warn=-10,Lo-shut=-15,Hi-warn=85,Hi-shut=90,Opt-temp=70,Hw-hi-shut=95,Hw-lo-shut=-25 -/SYSTEM/IO_BOARD/MB_AMB_TEMPERATURE_SENSOR _class=0,Subclass=1,Instance=8,DIGI_SENSOR=1,PERM=1,RDONLY=1,LO_WARN_MASK=1,LO_SHUT_MASK=1,HI_WARN_MASK=1,HI_SHUT_MASK=1,CONV_TABLE=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=6,BUSADDR=0x96,BUSNUM=0,CNTLR=1,Lo-warn=-10,Lo-shut=-15,Hi-warn=70,Hi-shut=75,Opt-temp=0,Hw-hi-shut=0,Hw-lo-shut=0 -/SYSTEM/IO_BOARD/IOB_AMB_TEMPERATURE_SENSOR _class=0,Subclass=1,Instance=9,DIGI_SENSOR=1,PERM=1,RDONLY=1,LO_WARN_MASK=1,LO_SHUT_MASK=1,HI_WARN_MASK=1,HI_SHUT_MASK=1,CONV_TABLE=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=6,BUSADDR=0x96,BUSNUM=0,CNTLR=1,Lo-warn=-10,Lo-shut=-15,Hi-warn=48,Hi-shut=53,Opt-temp=0,Hw-hi-shut=0,Hw-lo-shut=0 -/SYSTEM/DISK_BP0_BOARD_SLOT _class=3,Subclass=0,Instance=0,PERM=1 -/SYSTEM/DISK_BP1_BOARD_SLOT _class=3,Subclass=0,Instance=1,PERM=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD _class=3,Subclass=0,Instance=0,HOTPLUG=1,FRU=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD _class=3,Subclass=0,Instance=1,HOTPLUG=1,FRU=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/LOOP_B_0_BOARD_SLOT _class=3,Subclass=0,Instance=0,OPTION=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/LOOP_B_1_BOARD_SLOT _class=3,Subclass=0,Instance=0,OPTION=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/LOOP_B_0_BOARD_SLOT/LOOP_B_0_BOARD _class=3,Subclass=0,Instance=0,OPTION=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/LOOP_B_1_BOARD_SLOT/LOOP_B_1_BOARD _class=3,Subclass=0,Instance=0,OPTION=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/LOOP_B_0_BOARD_PR_SENSOR _class=6,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=7,INVERT=0,PORT=0,BITSHIFT=7,BYTEMASK=0x80,REG=0,TYPE=7,BUSADDR=0x88,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/LOOP_B_1_BOARD_PR_SENSOR _class=6,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=7,INVERT=0,PORT=0,BITSHIFT=7,BYTEMASK=0x80,REG=0,TYPE=7,BUSADDR=0x8c,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DBP0_AMB_TEMPERATURE_SENSOR _class=0,Subclass=1,Instance=10,OPTION=1,RDWR=1,LO_WARN_MASK=1,LO_SHUT_MASK=1,HI_WARN_MASK=1,HI_SHUT_MASK=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=2,BUSADDR=0x9c,BUSNUM=0,CNTLR=1,Lo-warn=-10,Lo-shut=-15,Hi-warn=51,Hi-shut=55,Opt-temp=0,Hw-hi-shut=0,Hw-lo-shut=0 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DBP1_AMB_TEMPERATURE_SENSOR _class=0,Subclass=1,Instance=11,OPTION=1,RDWR=1,LO_WARN_MASK=1,LO_SHUT_MASK=1,HI_WARN_MASK=1,HI_SHUT_MASK=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=2,BUSADDR=0x9e,BUSNUM=0,CNTLR=1,Lo-warn=-10,Lo-shut=-15,Hi-warn=51,Hi-shut=55,Opt-temp=0,Hw-hi-shut=0,Hw-lo-shut=0 -/SYSTEM/RSC_SLOT _class=3,Subclass=0,Instance=1,PERM=1 -/SYSTEM/RSC_SLOT/RSC_CARD _class=3,Subclass=0,Instance=1,HOTPLUG=1,FRU=1 -/SYSTEM/IO_BOARD/PCI0_SLOT _class=3,Subclass=0,Instance=0,PERM=1 -/SYSTEM/IO_BOARD/PCI1_SLOT _class=3,Subclass=0,Instance=1,PERM=1 -/SYSTEM/IO_BOARD/PCI2_SLOT _class=3,Subclass=0,Instance=2,PERM=1 -/SYSTEM/IO_BOARD/PCI3_SLOT _class=3,Subclass=0,Instance=3,PERM=1 -/SYSTEM/IO_BOARD/PCI4_SLOT _class=3,Subclass=0,Instance=4,PERM=1 -/SYSTEM/IO_BOARD/PCI5_SLOT _class=3,Subclass=0,Instance=5,PERM=1 -/SYSTEM/IO_BOARD/PCI6_SLOT _class=3,Subclass=0,Instance=6,PERM=1 -/SYSTEM/IO_BOARD/PCI7_SLOT _class=3,Subclass=0,Instance=7,PERM=1 -/SYSTEM/IO_BOARD/PCI8_SLOT _class=3,Subclass=0,Instance=8,PERM=1 -/SYSTEM/IO_BOARD/PCI0_SLOT/PCI0_CARD _class=3,Subclass=0,Instance=0,HOTPLUG=1,FRU=1 -/SYSTEM/IO_BOARD/PCI1_SLOT/PCI1_CARD _class=3,Subclass=0,Instance=1,HOTPLUG=1,FRU=1 -/SYSTEM/IO_BOARD/PCI2_SLOT/PCI2_CARD _class=3,Subclass=0,Instance=2,HOTPLUG=1,FRU=1 -/SYSTEM/IO_BOARD/PCI3_SLOT/PCI3_CARD _class=3,Subclass=0,Instance=3,HOTPLUG=1,FRU=1 -/SYSTEM/IO_BOARD/PCI4_SLOT/PCI4_CARD _class=3,Subclass=0,Instance=4,HOTPLUG=1,FRU=1 -/SYSTEM/IO_BOARD/PCI5_SLOT/PCI5_CARD _class=3,Subclass=0,Instance=5,HOTPLUG=1,FRU=1 -/SYSTEM/IO_BOARD/PCI6_SLOT/PCI6_CARD _class=3,Subclass=0,Instance=6,HOTPLUG=1,FRU=1 -/SYSTEM/IO_BOARD/PCI7_SLOT/PCI7_CARD _class=3,Subclass=0,Instance=7,HOTPLUG=1,FRU=1 -/SYSTEM/IO_BOARD/PCI8_SLOT/PCI8_CARD _class=3,Subclass=0,Instance=8,HOTPLUG=1,FRU=1 -/SYSTEM/PCI0_FLT_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=3,BITSHIFT=2,BYTEMASK=0xc,REG=27,TYPE=1,BUSADDR=0xe6,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/PCI1_FLT_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=2,BITSHIFT=2,BYTEMASK=0xc,REG=19,TYPE=1,BUSADDR=0xe6,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/PCI2_FLT_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=2,BYTEMASK=0xc,REG=11,TYPE=1,BUSADDR=0xe6,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/PCI3_FLT_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=2,BYTEMASK=0xc,REG=3,TYPE=1,BUSADDR=0xe6,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/PCI4_FLT_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=2,BITSHIFT=2,BYTEMASK=0xc,REG=19,TYPE=1,BUSADDR=0xe8,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/PCI5_FLT_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=2,BYTEMASK=0xc,REG=11,TYPE=1,BUSADDR=0xe8,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/PCI6_FLT_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=2,BYTEMASK=0xc,REG=3,TYPE=1,BUSADDR=0xe8,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/PCI7_FLT_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=2,BYTEMASK=0xc,REG=3,TYPE=1,BUSADDR=0xe2,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/PCI8_FLT_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=2,BYTEMASK=0xc,REG=11,TYPE=1,BUSADDR=0xe2,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/PCI0_REMOVE_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=3,BITSHIFT=0,BYTEMASK=0x3,REG=27,TYPE=1,BUSADDR=0xe6,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/PCI1_REMOVE_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=2,BITSHIFT=0,BYTEMASK=0x3,REG=19,TYPE=1,BUSADDR=0xe6,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/PCI2_REMOVE_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x3,REG=11,TYPE=1,BUSADDR=0xe6,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/PCI3_REMOVE_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x3,REG=3,TYPE=1,BUSADDR=0xe6,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/PCI4_REMOVE_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=2,BITSHIFT=0,BYTEMASK=0x3,REG=19,TYPE=1,BUSADDR=0xe8,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/PCI5_REMOVE_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x3,REG=11,TYPE=1,BUSADDR=0xe8,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/PCI6_REMOVE_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x3,REG=3,TYPE=1,BUSADDR=0xe8,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/PCI7_REMOVE_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x3,REG=3,TYPE=1,BUSADDR=0xe2,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/PCI8_REMOVE_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x3,REG=11,TYPE=1,BUSADDR=0xe2,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/IO_BOARD/PCI0_PR_SENSOR _class=10,Subclass=0,Instance=0,GPIO_REG=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=1,INVERT=1,PORT=3,BITSHIFT=0,BYTEMASK=0x3,REG=25,TYPE=1,BUSADDR=0xe6,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/PCI1_PR_SENSOR _class=10,Subclass=0,Instance=0,GPIO_REG=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=1,INVERT=1,PORT=2,BITSHIFT=0,BYTEMASK=0x3,REG=17,TYPE=1,BUSADDR=0xe6,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/PCI2_PR_SENSOR _class=10,Subclass=0,Instance=0,GPIO_REG=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=1,INVERT=1,PORT=1,BITSHIFT=0,BYTEMASK=0x3,REG=9,TYPE=1,BUSADDR=0xe6,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/PCI3_PR_SENSOR _class=10,Subclass=0,Instance=0,GPIO_REG=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=1,INVERT=1,PORT=0,BITSHIFT=0,BYTEMASK=0x3,REG=1,TYPE=1,BUSADDR=0xe6,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/PCI4_PR_SENSOR _class=10,Subclass=0,Instance=0,GPIO_REG=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=1,INVERT=1,PORT=2,BITSHIFT=0,BYTEMASK=0x3,REG=17,TYPE=1,BUSADDR=0xe8,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/PCI5_PR_SENSOR _class=10,Subclass=0,Instance=0,GPIO_REG=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=1,INVERT=1,PORT=1,BITSHIFT=0,BYTEMASK=0x3,REG=9,TYPE=1,BUSADDR=0xe8,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/PCI6_PR_SENSOR _class=10,Subclass=0,Instance=0,GPIO_REG=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=1,INVERT=1,PORT=0,BITSHIFT=0,BYTEMASK=0x3,REG=1,TYPE=1,BUSADDR=0xe8,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/PCI7_PR_SENSOR _class=10,Subclass=0,Instance=0,GPIO_REG=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=1,INVERT=1,PORT=1,BITSHIFT=0,BYTEMASK=0x3,REG=9,TYPE=1,BUSADDR=0xe2,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/PCI8_PR_SENSOR _class=10,Subclass=0,Instance=0,GPIO_REG=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=1,INVERT=1,PORT=0,BITSHIFT=0,BYTEMASK=0x3,REG=1,TYPE=1,BUSADDR=0xe2,BUSNUM=0,CNTLR=1 -/SYSTEM/FSP/FSP_GEN_FAULT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=4,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/FSP/FSP_REMOVE_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=1,INVERT=1,PORT=4,BITSHIFT=1,BYTEMASK=0x2,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/FSP/FSP_DISK_FAULT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=2,INVERT=0,PORT=4,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/FSP/FSP_POWER_FAULT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=3,INVERT=0,PORT=4,BITSHIFT=3,BYTEMASK=0x8,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/FSP/FSP_LEFT_THERMAL_FAULT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=7,INVERT=0,PORT=4,BITSHIFT=7,BYTEMASK=0x80,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/FSP/FSP_RIGHT_THERMAL_FAULT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=4,INVERT=0,PORT=4,BITSHIFT=4,BYTEMASK=0x10,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/FSP/FSP_LEFT_DOOR_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=5,INVERT=0,PORT=4,BITSHIFT=6,BYTEMASK=0x40,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/FSP/FSP_RIGHT_DOOR_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=6,INVERT=0,PORT=4,BITSHIFT=5,BYTEMASK=0x20,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/FSP/KEYSWITCH _class=9,Subclass=0,Instance=0,BIT_POS=1,NORMAL_POS_AV=1,DIAG_POS_AV=1,LOCK_POS_AV=1,OFF_POS_AV,PERM=1 -/SYSTEM/IO_BOARD/FSP_KS_NORMAL_POS_SENSOR _class=8,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=3,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/FSP_KS_DIAG_POS_SENSOR _class=8,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=1,INVERT=1,PORT=3,BITSHIFT=1,BYTEMASK=0x2,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/FSP_KS_LOCK_POS_SENSOR _class=8,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=2,INVERT=0,PORT=3,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/FSP_KS_OFF_POS_SENSOR _class=8,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=3,INVERT=0,PORT=3,BITSHIFT=3,BYTEMASK=0x8,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK0_SLOT _class=3,Subclass=0,Instance=0,OPTION=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK1_SLOT _class=3,Subclass=0,Instance=1,OPTION=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK2_SLOT _class=3,Subclass=0,Instance=2,OPTION=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK3_SLOT _class=3,Subclass=0,Instance=3,OPTION=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK4_SLOT _class=3,Subclass=0,Instance=4,OPTION=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK5_SLOT _class=3,Subclass=0,Instance=5,OPTION=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK6_SLOT _class=3,Subclass=0,Instance=6,OPTION=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK7_SLOT _class=3,Subclass=0,Instance=7,OPTION=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK8_SLOT _class=3,Subclass=0,Instance=8,OPTION=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK9_SLOT _class=3,Subclass=0,Instance=9,OPTION=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK10_SLOT _class=3,Subclass=0,Instance=10,OPTION=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK11_SLOT _class=3,Subclass=0,Instance=11,OPTION=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK0_SLOT/DISK0 _class=3,Subclass=0,Instance=0,HOTPLUG=1,FRU=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK1_SLOT/DISK1 _class=3,Subclass=0,Instance=1,HOTPLUG=1,FRU=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK2_SLOT/DISK2 _class=3,Subclass=0,Instance=2,HOTPLUG=1,FRU=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK3_SLOT/DISK3 _class=3,Subclass=0,Instance=3,HOTPLUG=1,FRU=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK4_SLOT/DISK4 _class=3,Subclass=0,Instance=4,HOTPLUG=1,FRU=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK5_SLOT/DISK5 _class=3,Subclass=0,Instance=5,HOTPLUG=1,FRU=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK6_SLOT/DISK6 _class=3,Subclass=0,Instance=6,HOTPLUG=1,FRU=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK7_SLOT/DISK7 _class=3,Subclass=0,Instance=7,HOTPLUG=1,FRU=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK8_SLOT/DISK8 _class=3,Subclass=0,Instance=8,HOTPLUG=1,FRU=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK9_SLOT/DISK9 _class=3,Subclass=0,Instance=9,HOTPLUG=1,FRU=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK10_SLOT/DISK10 _class=3,Subclass=0,Instance=10,HOTPLUG=1,FRU=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK11_SLOT/DISK11 _class=3,Subclass=0,Instance=11,HOTPLUG=1,FRU=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK0_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=7,BUSADDR=0x8a,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK1_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=1,INVERT=1,PORT=0,BITSHIFT=1,BYTEMASK=0x2,REG=0,TYPE=7,BUSADDR=0x8a,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK2_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=2,INVERT=0,PORT=0,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=7,BUSADDR=0x8a,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK3_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=3,INVERT=0,PORT=0,BITSHIFT=3,BYTEMASK=0x8,REG=0,TYPE=7,BUSADDR=0x8a,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK4_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=4,INVERT=0,PORT=0,BITSHIFT=4,BYTEMASK=0x10,REG=0,TYPE=7,BUSADDR=0x8a,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK5_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=5,INVERT=0,PORT=0,BITSHIFT=5,BYTEMASK=0x20,REG=0,TYPE=7,BUSADDR=0x8a,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK6_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=7,BUSADDR=0x8e,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK7_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=1,INVERT=1,PORT=0,BITSHIFT=1,BYTEMASK=0x2,REG=0,TYPE=7,BUSADDR=0x8e,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK8_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=2,INVERT=0,PORT=0,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=7,BUSADDR=0x8e,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK9_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=3,INVERT=0,PORT=0,BITSHIFT=3,BYTEMASK=0x8,REG=0,TYPE=7,BUSADDR=0x8e,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK10_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=4,INVERT=0,PORT=0,BITSHIFT=4,BYTEMASK=0x10,REG=0,TYPE=7,BUSADDR=0x8e,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK11_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=5,INVERT=0,PORT=0,BITSHIFT=5,BYTEMASK=0x20,REG=0,TYPE=7,BUSADDR=0x8e,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK0_REMOVE_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=6,INVERT=0,PORT=0,BITSHIFT=6,BYTEMASK=0x40,REG=0,TYPE=7,BUSADDR=0x8a,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK1_REMOVE_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=7,INVERT=0,PORT=0,BITSHIFT=7,BYTEMASK=0x80,REG=0,TYPE=7,BUSADDR=0x8a,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK2_REMOVE_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=4,INVERT=0,PORT=2,BITSHIFT=4,BYTEMASK=0x10,REG=0,TYPE=7,BUSADDR=0x8a,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK3_REMOVE_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=5,INVERT=0,PORT=2,BITSHIFT=5,BYTEMASK=0x20,REG=0,TYPE=7,BUSADDR=0x8a,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK4_REMOVE_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=6,INVERT=0,PORT=2,BITSHIFT=6,BYTEMASK=0x40,REG=0,TYPE=7,BUSADDR=0x8a,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK5_REMOVE_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=7,INVERT=0,PORT=2,BITSHIFT=7,BYTEMASK=0x80,REG=0,TYPE=7,BUSADDR=0x8a,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK6_REMOVE_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=6,INVERT=0,PORT=0,BITSHIFT=6,BYTEMASK=0x40,REG=0,TYPE=7,BUSADDR=0x8e,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK7_REMOVE_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=7,INVERT=0,PORT=0,BITSHIFT=7,BYTEMASK=0x80,REG=0,TYPE=7,BUSADDR=0x8e,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK8_REMOVE_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=4,INVERT=0,PORT=2,BITSHIFT=4,BYTEMASK=0x10,REG=0,TYPE=7,BUSADDR=0x8e,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK9_REMOVE_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=5,INVERT=0,PORT=2,BITSHIFT=5,BYTEMASK=0x20,REG=0,TYPE=7,BUSADDR=0x8e,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK10_REMOVE_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=6,INVERT=0,PORT=2,BITSHIFT=6,BYTEMASK=0x40,REG=0,TYPE=7,BUSADDR=0x8e,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK11_REMOVE_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=7,INVERT=0,PORT=2,BITSHIFT=7,BYTEMASK=0x80,REG=0,TYPE=7,BUSADDR=0x8e,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK0_PR_SENSOR _class=6,Subclass=0,Instance=0,OPTION=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=7,BUSADDR=0x88,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK1_PR_SENSOR _class=6,Subclass=0,Instance=0,OPTION=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=1,INVERT=1,PORT=0,BITSHIFT=1,BYTEMASK=0x2,REG=0,TYPE=7,BUSADDR=0x88,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK2_PR_SENSOR _class=6,Subclass=0,Instance=0,OPTION=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=2,INVERT=0,PORT=0,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=7,BUSADDR=0x88,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK3_PR_SENSOR _class=6,Subclass=0,Instance=0,OPTION=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=3,INVERT=0,PORT=0,BITSHIFT=3,BYTEMASK=0x8,REG=0,TYPE=7,BUSADDR=0x88,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK4_PR_SENSOR _class=6,Subclass=0,Instance=0,OPTION=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=4,INVERT=0,PORT=0,BITSHIFT=4,BYTEMASK=0x10,REG=0,TYPE=7,BUSADDR=0x88,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK5_PR_SENSOR _class=6,Subclass=0,Instance=0,OPTION=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=5,INVERT=0,PORT=0,BITSHIFT=5,BYTEMASK=0x20,REG=0,TYPE=7,BUSADDR=0x88,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK6_PR_SENSOR _class=6,Subclass=0,Instance=0,OPTION=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=7,BUSADDR=0x8c,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK7_PR_SENSOR _class=6,Subclass=0,Instance=0,OPTION=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=1,INVERT=1,PORT=0,BITSHIFT=1,BYTEMASK=0x2,REG=0,TYPE=7,BUSADDR=0x8c,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK8_PR_SENSOR _class=6,Subclass=0,Instance=0,OPTION=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=2,INVERT=0,PORT=0,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=7,BUSADDR=0x8c,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK9_PR_SENSOR _class=6,Subclass=0,Instance=0,OPTION=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=3,INVERT=0,PORT=0,BITSHIFT=3,BYTEMASK=0x8,REG=0,TYPE=7,BUSADDR=0x8c,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK10_PR_SENSOR _class=6,Subclass=0,Instance=0,OPTION=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=4,INVERT=0,PORT=0,BITSHIFT=4,BYTEMASK=0x10,REG=0,TYPE=7,BUSADDR=0x8c,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK11_PR_SENSOR _class=6,Subclass=0,Instance=0,OPTION=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=5,INVERT=0,PORT=0,BITSHIFT=5,BYTEMASK=0x20,REG=0,TYPE=7,BUSADDR=0x8c,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/5V_ENABLE_SWITCH _class=8,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=7,INVERT=0,PORT=0,BITSHIFT=6,BYTEMASK=0x40,REG=0,TYPE=5,BUSADDR=0x46,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/I2C_ENABLE_SWITCH _class=8,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=6,INVERT=0,PORT=0,BITSHIFT=6,BYTEMASK=0x40,REG=0,TYPE=5,BUSADDR=0x46,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C64_A0_0 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa0,BUSNUM=0,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C64_A2_0 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa2,BUSNUM=0,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C64_A4_0 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa4,BUSNUM=0,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C64_A6_0 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa6,BUSNUM=0,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C64_A8_0 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa8,BUSNUM=0,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C64_AA_0 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xaa,BUSNUM=0,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C64_AC_0 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xac,BUSNUM=0,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C64_AE_0 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xae,BUSNUM=0,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C64_A0_1 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa0,BUSNUM=1,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C64_A2_1 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa2,BUSNUM=1,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C64_A4_1 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa4,BUSNUM=1,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C64_A6_1 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa6,BUSNUM=1,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C64_A8_1 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa8,BUSNUM=1,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C64_AA_1 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xaa,BUSNUM=1,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C64_AC_1 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xac,BUSNUM=1,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C64_AE_1 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xae,BUSNUM=1,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C64_A0_2 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa0,BUSNUM=2,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C64_A2_2 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa2,BUSNUM=2,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C64_A4_2 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa4,BUSNUM=2,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C64_A6_2 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa6,BUSNUM=2,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C64_A8_2 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa8,BUSNUM=2,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C64_AA_2 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xaa,BUSNUM=2,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C64_AC_2 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xac,BUSNUM=2,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C64_AE_2 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xae,BUSNUM=2,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C64_A0_3 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa0,BUSNUM=3,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C64_A2_3 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa2,BUSNUM=3,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C64_A4_3 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa4,BUSNUM=3,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C64_A6_3 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa6,BUSNUM=3,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C64_A8_3 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa8,BUSNUM=3,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C64_AA_3 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xaa,BUSNUM=3,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C64_AC_3 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xac,BUSNUM=3,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C64_AE_3 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xae,BUSNUM=3,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C64_A0_4 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa0,BUSNUM=4,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C64_A2_4 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa2,BUSNUM=4,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/ZULU_1_3_MOD_CARD/24C64_A2_4 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa2,BUSNUM=4,CNTLR=0 -/SYSTEM/MOTHERBOARD/24C64_A8_4 _class=11,Subclass=0,Instance=0,PERM=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa8,BUSNUM=4,CNTLR=0 -/SYSTEM/IO_BOARD/24C64_AA_4 _class=11,Subclass=0,Instance=0,PERM=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xaa,BUSNUM=4,CNTLR=0 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/SSC100_16_5 _class=11,Subclass=9,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x16,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/LOOP_B_0_BOARD_SLOT/LOOP_B_0_BOARD/SSC100_1A_5 _class=11,Subclass=9,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x1a,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/SSC100_1C_5 _class=11,Subclass=9,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x1c,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/LOOP_B_1_BOARD_SLOT/LOOP_B_1_BOARD/SSC100_1E_5 _class=11,Subclass=9,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x1e,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/MAX1617_30_5 _class=11,Subclass=4,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x30,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/MAX1617_32_5 _class=11,Subclass=4,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x32,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/ZULU_1_3_MOD_CARD/MAX1617_32_5 _class=11,Subclass=4,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x32,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/MAX1617_34_5 _class=11,Subclass=4,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x34,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS0_SLOT/PS0/PCF8574_70_5 _class=11,Subclass=5,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x70,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS1_SLOT/PS1/PCF8574_72_5 _class=11,Subclass=5,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x72,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS2_SLOT/PS2/PCF8574_74_5 _class=11,Subclass=5,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x74,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/PCF8574_46_5 _class=11,Subclass=5,Instance=0,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x46,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/MAX1617_52_5 _class=11,Subclass=4,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x52,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/ZULU_1_3_MOD_CARD/MAX1617_52_5 _class=11,Subclass=4,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x52,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/CPU_4_6_MOD_CARD/MAX1617_54_5 _class=11,Subclass=4,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x54,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/ZULU_4_6_MOD_CARD/MAX1617_54_5 _class=11,Subclass=4,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x54,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT/CPU_5_7_MOD_CARD/MAX1617_56_5 _class=11,Subclass=4,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x56,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/LTC1427_5A_5 _class=11,Subclass=3,Instance=0,PERM=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x5a,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/LTC1427_5E_5 _class=11,Subclass=3,Instance=0,PERM=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x5e,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/SSC050_80_5 _class=11,Subclass=7,Instance=0,PERM=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x80,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/SSC050_82_5 _class=11,Subclass=7,Instance=0,PERM=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/SSC050_88_5 _class=11,Subclass=7,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x88,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/SSC050_8A_5 _class=11,Subclass=7,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x8a,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/SSC050_8C_5 _class=11,Subclass=7,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x8c,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/SSC050_8E_5 _class=11,Subclass=7,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x8e,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS0_SLOT/PS0/PCF8591_90_5 _class=11,Subclass=6,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x90,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS1_SLOT/PS1/PCF8591_92_5 _class=11,Subclass=6,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x92,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS2_SLOT/PS2/PCF8591_94_5 _class=11,Subclass=6,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x94,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/PCF8591_96_5 _class=11,Subclass=6,Instance=0,PERM=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x96,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/CPU_4_6_MOD_CARD/MAX1617_98_5 _class=11,Subclass=4,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x98,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/ZULU_4_6_MOD_CARD/MAX1617_98_5 _class=11,Subclass=4,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x98,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT/CPU_5_7_MOD_CARD/MAX1617_9A_5 _class=11,Subclass=4,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x9a,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/LM75_9C_5 _class=11,Subclass=2,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x9c,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/LM75_9E_5 _class=11,Subclass=2,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x9e,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS0_SLOT/PS0/24C64_A0_5 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa0,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS1_SLOT/PS1/24C64_A2_5 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa2,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS2_SLOT/PS2/24C64_A4_5 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa4,BUSNUM=0,CNTLR=1 -/SYSTEM/RSC_SLOT/RSC_CARD/24C64_A6_5 _class=11,Subclass=0,Instance=0,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa6,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/24C64_A8_5 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa8,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/24C64_AC_5 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xac,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/24C64_AE_5 _class=11,Subclass=0,Instance=0,PERM=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xae,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/HPC3130_E2_5 _class=11,Subclass=1,Instance=0,PERM=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xe2,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/HPC3130_E6_5 _class=11,Subclass=1,Instance=0,PERM=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xe6,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/HPC3130_E8_5 _class=11,Subclass=1,Instance=0,PERM=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xe8,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/HPC3130_EC_5 _class=11,Subclass=1,Instance=0,PERM=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xec,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/CPU_4_6_MOD_CARD/24C64_A0_6 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa0,BUSNUM=0,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/CPU_4_6_MOD_CARD/24C64_A2_6 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa2,BUSNUM=0,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/CPU_4_6_MOD_CARD/24C64_A4_6 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa4,BUSNUM=0,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/CPU_4_6_MOD_CARD/24C64_A6_6 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa6,BUSNUM=0,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/CPU_4_6_MOD_CARD/24C64_A8_6 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa8,BUSNUM=0,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/CPU_4_6_MOD_CARD/24C64_AA_6 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xaa,BUSNUM=0,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/CPU_4_6_MOD_CARD/24C64_AC_6 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xac,BUSNUM=0,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/CPU_4_6_MOD_CARD/24C64_AE_6 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xae,BUSNUM=0,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT/CPU_5_7_MOD_CARD/24C64_A0_7 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa0,BUSNUM=1,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT/CPU_5_7_MOD_CARD/24C64_A2_7 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa2,BUSNUM=1,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT/CPU_5_7_MOD_CARD/24C64_A4_7 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa4,BUSNUM=1,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT/CPU_5_7_MOD_CARD/24C64_A6_7 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa6,BUSNUM=1,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT/CPU_5_7_MOD_CARD/24C64_A8_7 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa8,BUSNUM=1,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT/CPU_5_7_MOD_CARD/24C64_AA_7 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xaa,BUSNUM=1,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT/CPU_5_7_MOD_CARD/24C64_AC_7 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xac,BUSNUM=1,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT/CPU_5_7_MOD_CARD/24C64_AE_7 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xae,BUSNUM=1,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/CPU_4_6_MOD_CARD/24C64_A0_8 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa0,BUSNUM=2,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/CPU_4_6_MOD_CARD/24C64_A2_8 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa2,BUSNUM=2,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/CPU_4_6_MOD_CARD/24C64_A4_8 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa4,BUSNUM=2,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/CPU_4_6_MOD_CARD/24C64_A6_8 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa6,BUSNUM=2,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/CPU_4_6_MOD_CARD/24C64_A8_8 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa8,BUSNUM=2,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/CPU_4_6_MOD_CARD/24C64_AA_8 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xaa,BUSNUM=2,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/CPU_4_6_MOD_CARD/24C64_AC_8 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xac,BUSNUM=2,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/CPU_4_6_MOD_CARD/24C64_AE_8 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xae,BUSNUM=2,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT/CPU_5_7_MOD_CARD/24C64_A0_9 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa0,BUSNUM=3,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT/CPU_5_7_MOD_CARD/24C64_A2_9 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa2,BUSNUM=3,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT/CPU_5_7_MOD_CARD/24C64_A4_9 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa4,BUSNUM=3,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT/CPU_5_7_MOD_CARD/24C64_A6_9 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa6,BUSNUM=3,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT/CPU_5_7_MOD_CARD/24C64_A8_9 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa8,BUSNUM=3,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT/CPU_5_7_MOD_CARD/24C64_AA_9 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xaa,BUSNUM=3,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT/CPU_5_7_MOD_CARD/24C64_AC_9 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xac,BUSNUM=3,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT/CPU_5_7_MOD_CARD/24C64_AE_9 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xae,BUSNUM=3,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/CPU_4_6_MOD_CARD/24C64_A4_10 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa4,BUSNUM=4,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/ZULU_4_6_MOD_CARD/24C64_A4_10 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa4,BUSNUM=4,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT/CPU_5_7_MOD_CARD/24C64_A6_10 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa6,BUSNUM=4,CNTLR=2 -/SYSTEM/MOTHERBOARD/24C64_A0_11 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa0,BUSNUM=0,CNTLR=3 -/SYSTEM/MOTHERBOARD/24C64_A2_11 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa2,BUSNUM=0,CNTLR=3 -OBJECT_INFO_END - -ASSOCIATIONS -ASSOCIATION PSVC_PRESENCE_SENSOR -CPU0_PRIM_FAN CPU_PFAN_PR_SENSOR -CPU1_PRIM_FAN CPU_PFAN_PR_SENSOR -CPU0_SEC_FAN CPU_SFAN_PR_SENSOR -CPU1_SEC_FAN CPU_SFAN_PR_SENSOR -IO0_PRIM_FAN IO_PFAN_PR_SENSOR -IO1_PRIM_FAN IO_PFAN_PR_SENSOR -IO0_SEC_FAN IO_SFAN_PR_SENSOR -IO1_SEC_FAN IO_SFAN_PR_SENSOR -IO_BRIDGE_PRIM_FAN IO_BRIDGE_PFAN_PR_SENSOR -IO_BRIDGE_SEC_FAN IO_BRIDGE_SFAN_PR_SENSOR -CPU_PFAN_SLOT CPU_PFAN_PR_SENSOR -CPU_SFAN_SLOT CPU_SFAN_PR_SENSOR -IO_PFAN_SLOT IO_PFAN_PR_SENSOR -IO_SFAN_SLOT IO_SFAN_PR_SENSOR -IO_BRIDGE_PFAN_SLOT IO_BRIDGE_PFAN_PR_SENSOR -IO_BRIDGE_SFAN_SLOT IO_BRIDGE_SFAN_PR_SENSOR -PS0 PS0_PR_SENSOR -PS1 PS1_PR_SENSOR -PS2 PS2_PR_SENSOR -PS0_SLOT PS0_PR_SENSOR -PS1_SLOT PS1_PR_SENSOR -PS2_SLOT PS2_PR_SENSOR -CPU_0_2_MOD_CARD CPU_0_2_MOD_PR_SENSOR -CPU_1_3_MOD_CARD CPU_1_3_MOD_PR_SENSOR -ZULU_1_3_MOD_CARD CPU_1_3_MOD_PR_SENSOR -CPU_4_6_MOD_CARD CPU_4_6_MOD_PR_SENSOR -ZULU_4_6_MOD_CARD CPU_4_6_MOD_PR_SENSOR -CPU_5_7_MOD_CARD CPU_5_7_MOD_PR_SENSOR -CPU_0_2_MOD_SLOT CPU_0_2_MOD_PR_SENSOR -CPU_1_3_MOD_SLOT CPU_1_3_MOD_PR_SENSOR -CPU_4_6_MOD_SLOT CPU_4_6_MOD_PR_SENSOR -CPU_5_7_MOD_SLOT CPU_5_7_MOD_PR_SENSOR -PCI0_CARD PCI0_PR_SENSOR -PCI1_CARD PCI1_PR_SENSOR -PCI2_CARD PCI2_PR_SENSOR -PCI3_CARD PCI3_PR_SENSOR -PCI4_CARD PCI4_PR_SENSOR -PCI5_CARD PCI5_PR_SENSOR -PCI6_CARD PCI6_PR_SENSOR -PCI7_CARD PCI7_PR_SENSOR -PCI8_CARD PCI8_PR_SENSOR -PCI0_SLOT PCI0_PR_SENSOR -PCI1_SLOT PCI1_PR_SENSOR -PCI2_SLOT PCI2_PR_SENSOR -PCI3_SLOT PCI3_PR_SENSOR -PCI4_SLOT PCI4_PR_SENSOR -PCI5_SLOT PCI5_PR_SENSOR -PCI6_SLOT PCI6_PR_SENSOR -PCI7_SLOT PCI7_PR_SENSOR -PCI8_SLOT PCI8_PR_SENSOR -DISK_BP0_BOARD DISK_BP0_PR_SENSOR -DISK_BP1_BOARD DISK_BP1_PR_SENSOR -DISK_BP0_BOARD_SLOT DISK_BP0_PR_SENSOR -DISK_BP1_BOARD_SLOT DISK_BP1_PR_SENSOR -DISK0 DISK0_PR_SENSOR -DISK1 DISK1_PR_SENSOR -DISK2 DISK2_PR_SENSOR -DISK3 DISK3_PR_SENSOR -DISK4 DISK4_PR_SENSOR -DISK5 DISK5_PR_SENSOR -DISK6 DISK6_PR_SENSOR -DISK7 DISK7_PR_SENSOR -DISK8 DISK8_PR_SENSOR -DISK9 DISK9_PR_SENSOR -DISK10 DISK10_PR_SENSOR -DISK11 DISK11_PR_SENSOR -RSC_CARD RSC_PR_SENSOR -RSC_SLOT RSC_PR_SENSOR -LOOP_B_0_BOARD LOOP_B_0_BOARD_PR_SENSOR -LOOP_B_1_BOARD LOOP_B_1_BOARD_PR_SENSOR -LOOP_B_0_BOARD_SLOT LOOP_B_0_BOARD_PR_SENSOR -LOOP_B_1_BOARD_SLOT LOOP_B_1_BOARD_PR_SENSOR -ASSOCIATION_END -ASSOCIATION PSVC_FAN_ONOFF_SENSOR -CPU0_SEC_FAN CPU_SFAN_ONOFF_SWITCH -CPU1_SEC_FAN CPU_SFAN_ONOFF_SWITCH -IO0_PRIM_FAN IO_PFAN_ONOFF_SWITCH -IO1_PRIM_FAN IO_PFAN_ONOFF_SWITCH -IO0_SEC_FAN IO_SFAN_ONOFF_SWITCH -IO1_SEC_FAN IO_SFAN_ONOFF_SWITCH -IO_BRIDGE_PRIM_FAN IO_BRIDGE_PFAN_ONOFF_SWITCH -IO_BRIDGE_SEC_FAN IO_BRIDGE_SFAN_ONOFF_SWITCH -ASSOCIATION_END -ASSOCIATION PSVC_FAN_SPEED_TACHOMETER -CPU0_PRIM_FAN CPU0_PFAN_TACH -CPU1_PRIM_FAN CPU1_PFAN_TACH -CPU0_SEC_FAN CPU0_SFAN_TACH -CPU1_SEC_FAN CPU1_SFAN_TACH -IO0_PRIM_FAN IO0_PFAN_TACH -IO1_PRIM_FAN IO1_PFAN_TACH -IO0_SEC_FAN IO0_SFAN_TACH -IO1_SEC_FAN IO1_SFAN_TACH -IO_BRIDGE_PRIM_FAN IO_BRIDGE_PFAN_TACH -IO_BRIDGE_SEC_FAN IO_BRIDGE_SFAN_TACH -ASSOCIATION_END -ASSOCIATION PSVC_FAN_PRIM_SEC_SELECTOR -CPU0_PRIM_FAN CPU_FAN_P_S_MON_SWITCH -CPU1_PRIM_FAN CPU_FAN_P_S_MON_SWITCH -CPU0_SEC_FAN CPU_FAN_P_S_MON_SWITCH -CPU1_SEC_FAN CPU_FAN_P_S_MON_SWITCH -IO0_PRIM_FAN IO_FAN_P_S_MON_SWITCH -IO1_PRIM_FAN IO_FAN_P_S_MON_SWITCH -IO0_SEC_FAN IO_FAN_P_S_MON_SWITCH -IO1_SEC_FAN IO_FAN_P_S_MON_SWITCH -ASSOCIATION_END -ASSOCIATION PSVC_DEV_TEMP_SENSOR -CPU0_PRIM_FAN CPU0_DIE_TEMPERATURE_SENSOR -CPU0_PRIM_FAN CPU1_DIE_TEMPERATURE_SENSOR -CPU0_PRIM_FAN ZULU1_DIE_TEMPERATURE_SENSOR -CPU0_PRIM_FAN CPU2_DIE_TEMPERATURE_SENSOR -CPU0_PRIM_FAN CPU3_DIE_TEMPERATURE_SENSOR -CPU0_PRIM_FAN ZULU3_DIE_TEMPERATURE_SENSOR -CPU0_PRIM_FAN CPU4_DIE_TEMPERATURE_SENSOR -CPU0_PRIM_FAN ZULU4_DIE_TEMPERATURE_SENSOR -CPU0_PRIM_FAN CPU5_DIE_TEMPERATURE_SENSOR -CPU0_PRIM_FAN CPU6_DIE_TEMPERATURE_SENSOR -CPU0_PRIM_FAN ZULU6_DIE_TEMPERATURE_SENSOR -CPU0_PRIM_FAN CPU7_DIE_TEMPERATURE_SENSOR -CPU1_PRIM_FAN CPU0_DIE_TEMPERATURE_SENSOR -CPU1_PRIM_FAN CPU1_DIE_TEMPERATURE_SENSOR -CPU1_PRIM_FAN ZULU1_DIE_TEMPERATURE_SENSOR -CPU1_PRIM_FAN CPU2_DIE_TEMPERATURE_SENSOR -CPU1_PRIM_FAN CPU3_DIE_TEMPERATURE_SENSOR -CPU1_PRIM_FAN ZULU3_DIE_TEMPERATURE_SENSOR -CPU1_PRIM_FAN CPU4_DIE_TEMPERATURE_SENSOR -CPU1_PRIM_FAN ZULU4_DIE_TEMPERATURE_SENSOR -CPU1_PRIM_FAN CPU5_DIE_TEMPERATURE_SENSOR -CPU1_PRIM_FAN CPU6_DIE_TEMPERATURE_SENSOR -CPU1_PRIM_FAN ZULU6_DIE_TEMPERATURE_SENSOR -CPU1_PRIM_FAN CPU7_DIE_TEMPERATURE_SENSOR -IO0_PRIM_FAN IOB_AMB_TEMPERATURE_SENSOR -IO1_PRIM_FAN IOB_AMB_TEMPERATURE_SENSOR -CPU_0_2_MOD_CARD CPU0_DIE_TEMPERATURE_SENSOR -CPU_0_2_MOD_CARD CPU2_DIE_TEMPERATURE_SENSOR -CPU_1_3_MOD_CARD CPU1_DIE_TEMPERATURE_SENSOR -ZULU_1_3_MOD_CARD ZULU1_DIE_TEMPERATURE_SENSOR -CPU_1_3_MOD_CARD CPU3_DIE_TEMPERATURE_SENSOR -ZULU_1_3_MOD_CARD ZULU3_DIE_TEMPERATURE_SENSOR -CPU_4_6_MOD_CARD CPU4_DIE_TEMPERATURE_SENSOR -ZULU_4_6_MOD_CARD ZULU4_DIE_TEMPERATURE_SENSOR -CPU_4_6_MOD_CARD CPU6_DIE_TEMPERATURE_SENSOR -ZULU_4_6_MOD_CARD ZULU6_DIE_TEMPERATURE_SENSOR -CPU_5_7_MOD_CARD CPU5_DIE_TEMPERATURE_SENSOR -CPU_5_7_MOD_CARD CPU7_DIE_TEMPERATURE_SENSOR -ASSOCIATION_END -ASSOCIATION PSVC_FAN_TRAY_FANS -CPU0_PRIM_FAN CPU1_PRIM_FAN -CPU1_PRIM_FAN CPU0_PRIM_FAN -CPU0_SEC_FAN CPU1_SEC_FAN -CPU1_SEC_FAN CPU0_SEC_FAN -IO0_PRIM_FAN IO1_PRIM_FAN -IO1_PRIM_FAN IO0_PRIM_FAN -IO0_SEC_FAN IO1_SEC_FAN -IO1_SEC_FAN IO0_SEC_FAN -ASSOCIATION_END -ASSOCIATION PSVC_FAN_DRIVE_CONTROL -CPU0_PRIM_FAN CPU_PFAN_SPEED_CONTROL -CPU1_PRIM_FAN CPU_PFAN_SPEED_CONTROL -IO0_PRIM_FAN IO_PFAN_SPEED_CONTROL -IO1_PRIM_FAN IO_PFAN_SPEED_CONTROL -ASSOCIATION_END -ASSOCIATION PSVC_KS_NORMAL_POS_SENSOR -KEYSWITCH FSP_KS_NORMAL_POS_SENSOR -ASSOCIATION_END -ASSOCIATION PSVC_KS_DIAG_POS_SENSOR -KEYSWITCH FSP_KS_DIAG_POS_SENSOR -ASSOCIATION_END -ASSOCIATION PSVC_KS_LOCK_POS_SENSOR -KEYSWITCH FSP_KS_LOCK_POS_SENSOR -ASSOCIATION_END -ASSOCIATION PSVC_KS_OFF_POS_SENSOR -KEYSWITCH FSP_KS_OFF_POS_SENSOR -ASSOCIATION_END -ASSOCIATION PSVC_SLOT_FAULT_LED -CPU_PFAN_SLOT CPU_PFAN_FLT_LED -CPU_SFAN_SLOT CPU_SFAN_FLT_LED -IO_PFAN_SLOT IO_PFAN_FLT_LED -IO_SFAN_SLOT IO_SFAN_FLT_LED -IO_BRIDGE_PFAN_SLOT IO_BRIDGE_PFAN_FLT_LED -IO_BRIDGE_SFAN_SLOT IO_BRIDGE_SFAN_FLT_LED -CPU_0_2_MOD_SLOT CPU_0_2_MOD_FLT_LED -CPU_1_3_MOD_SLOT CPU_1_3_MOD_FLT_LED -CPU_4_6_MOD_SLOT CPU_4_6_MOD_FLT_LED -CPU_5_7_MOD_SLOT CPU_5_7_MOD_FLT_LED -PCI0_SLOT PCI0_FLT_LED -PCI1_SLOT PCI1_FLT_LED -PCI2_SLOT PCI2_FLT_LED -PCI3_SLOT PCI3_FLT_LED -PCI4_SLOT PCI4_FLT_LED -PCI5_SLOT PCI5_FLT_LED -PCI6_SLOT PCI6_FLT_LED -PCI7_SLOT PCI7_FLT_LED -PCI8_SLOT PCI8_FLT_LED -DISK0_SLOT DISK0_FLT_LED -DISK1_SLOT DISK1_FLT_LED -DISK2_SLOT DISK2_FLT_LED -DISK3_SLOT DISK3_FLT_LED -DISK4_SLOT DISK4_FLT_LED -DISK5_SLOT DISK5_FLT_LED -DISK6_SLOT DISK6_FLT_LED -DISK7_SLOT DISK7_FLT_LED -DISK8_SLOT DISK8_FLT_LED -DISK9_SLOT DISK9_FLT_LED -DISK10_SLOT DISK10_FLT_LED -DISK11_SLOT DISK11_FLT_LED -ASSOCIATION_END -ASSOCIATION PSVC_SLOT_REMOVE_LED -CPU_PFAN_SLOT CPU_PFAN_REMOVE_LED -CPU_SFAN_SLOT CPU_SFAN_REMOVE_LED -IO_PFAN_SLOT IO_PFAN_REMOVE_LED -IO_SFAN_SLOT IO_SFAN_REMOVE_LED -IO_BRIDGE_PFAN_SLOT IO_BRIDGE_PFAN_REMOVE_LED -IO_BRIDGE_SFAN_SLOT IO_BRIDGE_SFAN_REMOVE_LED -CPU_0_2_MOD_SLOT CPU_0_2_MOD_REMOVE_LED -CPU_1_3_MOD_SLOT CPU_1_3_MOD_REMOVE_LED -CPU_4_6_MOD_SLOT CPU_4_6_MOD_REMOVE_LED -CPU_5_7_MOD_SLOT CPU_5_7_MOD_REMOVE_LED -PCI0_SLOT PCI0_REMOVE_LED -PCI1_SLOT PCI1_REMOVE_LED -PCI2_SLOT PCI2_REMOVE_LED -PCI3_SLOT PCI3_REMOVE_LED -PCI4_SLOT PCI4_REMOVE_LED -PCI5_SLOT PCI5_REMOVE_LED -PCI6_SLOT PCI6_REMOVE_LED -PCI7_SLOT PCI7_REMOVE_LED -PCI8_SLOT PCI8_REMOVE_LED -DISK0_SLOT DISK0_REMOVE_LED -DISK1_SLOT DISK1_REMOVE_LED -DISK2_SLOT DISK2_REMOVE_LED -DISK3_SLOT DISK3_REMOVE_LED -DISK4_SLOT DISK4_REMOVE_LED -DISK5_SLOT DISK5_REMOVE_LED -DISK6_SLOT DISK6_REMOVE_LED -DISK7_SLOT DISK7_REMOVE_LED -DISK8_SLOT DISK8_REMOVE_LED -DISK9_SLOT DISK9_REMOVE_LED -DISK10_SLOT DISK10_REMOVE_LED -DISK11_SLOT DISK11_REMOVE_LED -ASSOCIATION_END -ASSOCIATION PSVC_TS_OVERTEMP_LED -CPU0_DIE_TEMPERATURE_SENSOR FSP_RIGHT_THERMAL_FAULT_LED -CPU0_DIE_TEMPERATURE_SENSOR CPU_0_2_MOD_FLT_LED -CPU1_DIE_TEMPERATURE_SENSOR FSP_RIGHT_THERMAL_FAULT_LED -ZULU1_DIE_TEMPERATURE_SENSOR FSP_RIGHT_THERMAL_FAULT_LED -CPU1_DIE_TEMPERATURE_SENSOR CPU_1_3_MOD_FLT_LED -ZULU1_DIE_TEMPERATURE_SENSOR CPU_1_3_MOD_FLT_LED -CPU2_DIE_TEMPERATURE_SENSOR FSP_RIGHT_THERMAL_FAULT_LED -CPU2_DIE_TEMPERATURE_SENSOR CPU_0_2_MOD_FLT_LED -CPU3_DIE_TEMPERATURE_SENSOR FSP_RIGHT_THERMAL_FAULT_LED -ZULU3_DIE_TEMPERATURE_SENSOR FSP_RIGHT_THERMAL_FAULT_LED -CPU3_DIE_TEMPERATURE_SENSOR CPU_1_3_MOD_FLT_LED -ZULU3_DIE_TEMPERATURE_SENSOR CPU_1_3_MOD_FLT_LED -CPU4_DIE_TEMPERATURE_SENSOR FSP_RIGHT_THERMAL_FAULT_LED -ZULU4_DIE_TEMPERATURE_SENSOR FSP_RIGHT_THERMAL_FAULT_LED -CPU4_DIE_TEMPERATURE_SENSOR CPU_4_6_MOD_FLT_LED -ZULU4_DIE_TEMPERATURE_SENSOR CPU_4_6_MOD_FLT_LED -CPU5_DIE_TEMPERATURE_SENSOR FSP_RIGHT_THERMAL_FAULT_LED -CPU5_DIE_TEMPERATURE_SENSOR CPU_5_7_MOD_FLT_LED -CPU6_DIE_TEMPERATURE_SENSOR FSP_RIGHT_THERMAL_FAULT_LED -ZULU6_DIE_TEMPERATURE_SENSOR FSP_RIGHT_THERMAL_FAULT_LED -CPU6_DIE_TEMPERATURE_SENSOR CPU_4_6_MOD_FLT_LED -ZULU6_DIE_TEMPERATURE_SENSOR CPU_4_6_MOD_FLT_LED -CPU7_DIE_TEMPERATURE_SENSOR FSP_RIGHT_THERMAL_FAULT_LED -CPU7_DIE_TEMPERATURE_SENSOR CPU_5_7_MOD_FLT_LED -MB_AMB_TEMPERATURE_SENSOR FSP_RIGHT_THERMAL_FAULT_LED -IOB_AMB_TEMPERATURE_SENSOR FSP_LEFT_THERMAL_FAULT_LED -DBP0_AMB_TEMPERATURE_SENSOR FSP_LEFT_THERMAL_FAULT_LED -DBP1_AMB_TEMPERATURE_SENSOR FSP_LEFT_THERMAL_FAULT_LED -ASSOCIATION_END -ASSOCIATION PSVC_TABLE -MB_AMB_TEMPERATURE_SENSOR TEMP_SENSOR_CONVERSIONS -IOB_AMB_TEMPERATURE_SENSOR TEMP_SENSOR_CONVERSIONS -PS0_3_3V_I_SENSOR 3_3V_I_CONVERSIONS -PS1_3_3V_I_SENSOR 3_3V_I_CONVERSIONS -PS2_3_3V_I_SENSOR 3_3V_I_CONVERSIONS -PS0_5V_I_SENSOR 5V_I_CONVERSIONS -PS1_5V_I_SENSOR 5V_I_CONVERSIONS -PS2_5V_I_SENSOR 5V_I_CONVERSIONS -PS0_12V_I_SENSOR 12V_I_CONVERSIONS -PS1_12V_I_SENSOR 12V_I_CONVERSIONS -PS2_12V_I_SENSOR 12V_I_CONVERSIONS -PS0_48V_I_SENSOR 48V_I_CONVERSIONS -PS1_48V_I_SENSOR 48V_I_CONVERSIONS -PS2_48V_I_SENSOR 48V_I_CONVERSIONS -ASSOCIATION_END -ASSOCIATION PSVC_PS_I_SENSOR -PS0 PS0_3_3V_I_SENSOR -PS0 PS0_5V_I_SENSOR -PS0 PS0_12V_I_SENSOR -PS0 PS0_48V_I_SENSOR -PS1 PS1_3_3V_I_SENSOR -PS1 PS1_5V_I_SENSOR -PS1 PS1_12V_I_SENSOR -PS1 PS1_48V_I_SENSOR -PS2 PS2_3_3V_I_SENSOR -PS2 PS2_5V_I_SENSOR -PS2 PS2_12V_I_SENSOR -PS2 PS2_48V_I_SENSOR -ASSOCIATION_END -ASSOCIATION PSVC_DEV_FAULT_SENSOR -FSP_GEN_FAULT_LED FSP_DISK_FAULT_LED -FSP_GEN_FAULT_LED FSP_POWER_FAULT_LED -FSP_GEN_FAULT_LED FSP_LEFT_THERMAL_FAULT_LED -FSP_GEN_FAULT_LED FSP_RIGHT_THERMAL_FAULT_LED -FSP_LEFT_THERMAL_FAULT_LED IOB_AMB_TEMPERATURE_SENSOR -FSP_LEFT_THERMAL_FAULT_LED DBP0_AMB_TEMPERATURE_SENSOR -FSP_LEFT_THERMAL_FAULT_LED DBP1_AMB_TEMPERATURE_SENSOR -FSP_LEFT_THERMAL_FAULT_LED IO0_PRIM_FAN -FSP_LEFT_THERMAL_FAULT_LED IO1_PRIM_FAN -FSP_LEFT_THERMAL_FAULT_LED IO0_SEC_FAN -FSP_LEFT_THERMAL_FAULT_LED IO1_SEC_FAN -FSP_RIGHT_THERMAL_FAULT_LED CPU0_DIE_TEMPERATURE_SENSOR -FSP_RIGHT_THERMAL_FAULT_LED CPU1_DIE_TEMPERATURE_SENSOR -FSP_RIGHT_THERMAL_FAULT_LED ZULU1_DIE_TEMPERATURE_SENSOR -FSP_RIGHT_THERMAL_FAULT_LED CPU2_DIE_TEMPERATURE_SENSOR -FSP_RIGHT_THERMAL_FAULT_LED CPU3_DIE_TEMPERATURE_SENSOR -FSP_RIGHT_THERMAL_FAULT_LED ZULU3_DIE_TEMPERATURE_SENSOR -FSP_RIGHT_THERMAL_FAULT_LED CPU4_DIE_TEMPERATURE_SENSOR -FSP_RIGHT_THERMAL_FAULT_LED ZULU4_DIE_TEMPERATURE_SENSOR -FSP_RIGHT_THERMAL_FAULT_LED CPU5_DIE_TEMPERATURE_SENSOR -FSP_RIGHT_THERMAL_FAULT_LED CPU6_DIE_TEMPERATURE_SENSOR -FSP_RIGHT_THERMAL_FAULT_LED ZULU6_DIE_TEMPERATURE_SENSOR -FSP_RIGHT_THERMAL_FAULT_LED CPU7_DIE_TEMPERATURE_SENSOR -FSP_RIGHT_THERMAL_FAULT_LED MB_AMB_TEMPERATURE_SENSOR -FSP_RIGHT_THERMAL_FAULT_LED CPU0_PRIM_FAN -FSP_RIGHT_THERMAL_FAULT_LED CPU1_PRIM_FAN -FSP_RIGHT_THERMAL_FAULT_LED CPU0_SEC_FAN -FSP_RIGHT_THERMAL_FAULT_LED CPU1_SEC_FAN -FSP_RIGHT_THERMAL_FAULT_LED IO_BRIDGE_PRIM_FAN -FSP_RIGHT_THERMAL_FAULT_LED IO_BRIDGE_SEC_FAN -FSP_DISK_FAULT_LED DISK0 -FSP_DISK_FAULT_LED DISK1 -FSP_DISK_FAULT_LED DISK2 -FSP_DISK_FAULT_LED DISK3 -FSP_DISK_FAULT_LED DISK4 -FSP_DISK_FAULT_LED DISK5 -FSP_DISK_FAULT_LED DISK6 -FSP_DISK_FAULT_LED DISK7 -FSP_DISK_FAULT_LED DISK8 -FSP_DISK_FAULT_LED DISK9 -FSP_DISK_FAULT_LED DISK10 -FSP_DISK_FAULT_LED DISK11 -PS0 PS0_FAN_FAIL_SENSOR -PS1 PS1_FAN_FAIL_SENSOR -PS2 PS2_FAN_FAIL_SENSOR -PS0 PS0_TEMP_FAIL_SENSOR -PS1 PS1_TEMP_FAIL_SENSOR -PS2 PS2_TEMP_FAIL_SENSOR -PS0 PS0_I_SHARE_FAIL_SENSOR -PS1 PS1_I_SHARE_FAIL_SENSOR -PS2 PS2_I_SHARE_FAIL_SENSOR -ASSOCIATION_END -ASSOCIATION PSVC_DEV_FAULT_LED -PS0 FSP_POWER_FAULT_LED -PS1 FSP_POWER_FAULT_LED -PS2 FSP_POWER_FAULT_LED -CPU0_PRIM_FAN CPU_PFAN_FLT_LED -CPU1_PRIM_FAN CPU_PFAN_FLT_LED -CPU0_SEC_FAN CPU_SFAN_FLT_LED -CPU1_SEC_FAN CPU_SFAN_FLT_LED -IO0_PRIM_FAN IO_PFAN_FLT_LED -IO1_PRIM_FAN IO_PFAN_FLT_LED -IO0_SEC_FAN IO_SFAN_FLT_LED -IO1_SEC_FAN IO_SFAN_FLT_LED -IO_BRIDGE_PRIM_FAN IO_BRIDGE_PFAN_FLT_LED -IO_BRIDGE_SEC_FAN IO_BRIDGE_SFAN_FLT_LED -DISK0 FSP_DISK_FAULT_LED -DISK1 FSP_DISK_FAULT_LED -DISK2 FSP_DISK_FAULT_LED -DISK3 FSP_DISK_FAULT_LED -DISK4 FSP_DISK_FAULT_LED -DISK5 FSP_DISK_FAULT_LED -DISK6 FSP_DISK_FAULT_LED -DISK7 FSP_DISK_FAULT_LED -DISK8 FSP_DISK_FAULT_LED -DISK9 FSP_DISK_FAULT_LED -DISK10 FSP_DISK_FAULT_LED -DISK11 FSP_DISK_FAULT_LED -ASSOCIATION_END -ASSOCIATION PSVC_PARENT -CPU0_PRIM_FAN CPU_PFAN_SLOT -CPU1_PRIM_FAN CPU_PFAN_SLOT -CPU0_SEC_FAN CPU_SFAN_SLOT -CPU1_SEC_FAN CPU_SFAN_SLOT -IO0_PRIM_FAN IO_PFAN_SLOT -IO1_PRIM_FAN IO_PFAN_SLOT -IO0_SEC_FAN IO_SFAN_SLOT -IO1_SEC_FAN IO_SFAN_SLOT -IO_BRIDGE_PRIM_FAN IO_BRIDGE_PFAN_SLOT -IO_BRIDGE_SEC_FAN IO_BRIDGE_SFAN_SLOT -CPU_PFAN_SLOT SYSTEM -CPU_SFAN_SLOT SYSTEM -IO_PFAN_SLOT SYSTEM -IO_SFAN_SLOT SYSTEM -IO_BRIDGE_PFAN_SLOT SYSTEM -IO_BRIDGE_SFAN_SLOT SYSTEM -CPU_PFAN_FLT_LED SYSTEM -CPU_SFAN_FLT_LED SYSTEM -IO_PFAN_FLT_LED SYSTEM -IO_SFAN_FLT_LED SYSTEM -IO_BRIDGE_PFAN_FLT_LED SYSTEM -IO_BRIDGE_SFAN_FLT_LED SYSTEM -CPU_PFAN_REMOVE_LED SYSTEM -CPU_SFAN_REMOVE_LED SYSTEM -IO_PFAN_REMOVE_LED SYSTEM -IO_SFAN_REMOVE_LED SYSTEM -IO_BRIDGE_PFAN_REMOVE_LED SYSTEM -IO_BRIDGE_SFAN_REMOVE_LED SYSTEM -CPU_PFAN_PR_SENSOR IO_BOARD -CPU_SFAN_PR_SENSOR IO_BOARD -IO_PFAN_PR_SENSOR IO_BOARD -IO_SFAN_PR_SENSOR IO_BOARD -IO_BRIDGE_PFAN_PR_SENSOR IO_BOARD -IO_BRIDGE_SFAN_PR_SENSOR IO_BOARD -CPU0_PFAN_TACH MOTHERBOARD -CPU1_PFAN_TACH MOTHERBOARD -CPU0_SFAN_TACH MOTHERBOARD -CPU1_SFAN_TACH MOTHERBOARD -IO0_PFAN_TACH IO_BOARD -IO1_PFAN_TACH IO_BOARD -IO0_SFAN_TACH IO_BOARD -IO1_SFAN_TACH IO_BOARD -IO_BRIDGE_PFAN_TACH MOTHERBOARD -IO_BRIDGE_SFAN_TACH MOTHERBOARD -CPU_PFAN_SPEED_CONTROL IO_BOARD -IO_PFAN_SPEED_CONTROL IO_BOARD -CPU_SFAN_ONOFF_SWITCH IO_BOARD -IO_PFAN_ONOFF_SWITCH MOTHERBOARD -IO_SFAN_ONOFF_SWITCH MOTHERBOARD -IO_BRIDGE_PFAN_ONOFF_SWITCH MOTHERBOARD -IO_BRIDGE_SFAN_ONOFF_SWITCH MOTHERBOARD -CPU_FAN_P_S_MON_SWITCH IO_BOARD -IO_FAN_P_S_MON_SWITCH IO_BOARD -PS0_SLOT PDB -PS1_SLOT PDB -PS2_SLOT PDB -PS0 PS0_SLOT -PS1 PS1_SLOT -PS2 PS2_SLOT -PS0_SENSOR_VALID_SWITCH PS0 -PS0_3_3V_I_SENSOR PS0 -PS0_5V_I_SENSOR PS0 -PS0_12V_I_SENSOR PS0 -PS0_48V_I_SENSOR PS0 -PS0_FAN_FAIL_SENSOR PS0 -PS0_TEMP_FAIL_SENSOR PS0 -PS0_I_SHARE_FAIL_SENSOR PS0 -PS0_PR_SENSOR IO_BOARD -PS1_SENSOR_VALID_SWITCH PS1 -PS1_3_3V_I_SENSOR PS1 -PS1_5V_I_SENSOR PS1 -PS1_12V_I_SENSOR PS1 -PS1_48V_I_SENSOR PS1 -PS1_FAN_FAIL_SENSOR PS1 -PS1_TEMP_FAIL_SENSOR PS1 -PS1_I_SHARE_FAIL_SENSOR PS1 -PS1_PR_SENSOR IO_BOARD -PS2_SENSOR_VALID_SWITCH PS2 -PS2_3_3V_I_SENSOR PS2 -PS2_5V_I_SENSOR PS2 -PS2_12V_I_SENSOR PS2 -PS2_48V_I_SENSOR PS2 -PS2_FAN_FAIL_SENSOR PS2 -PS2_TEMP_FAIL_SENSOR PS2 -PS2_I_SHARE_FAIL_SENSOR PS2 -PS2_PR_SENSOR IO_BOARD -CPU_0_2_MOD_CARD CPU_0_2_MOD_SLOT -CPU_1_3_MOD_CARD CPU_1_3_MOD_SLOT -ZULU_1_3_MOD_CARD CPU_1_3_MOD_SLOT -CPU_4_6_MOD_CARD CPU_4_6_MOD_SLOT -ZULU_4_6_MOD_CARD CPU_4_6_MOD_SLOT -CPU_5_7_MOD_CARD CPU_5_7_MOD_SLOT -CPU_0_2_MOD_SLOT MOTHERBOARD -CPU_1_3_MOD_SLOT MOTHERBOARD -CPU_4_6_MOD_SLOT MOTHERBOARD -CPU_5_7_MOD_SLOT MOTHERBOARD -CPU_0_2_MOD_FLT_LED SYSTEM -CPU_1_3_MOD_FLT_LED SYSTEM -CPU_4_6_MOD_FLT_LED SYSTEM -CPU_5_7_MOD_FLT_LED SYSTEM -CPU_0_2_MOD_REMOVE_LED SYSTEM -CPU_1_3_MOD_REMOVE_LED SYSTEM -CPU_4_6_MOD_REMOVE_LED SYSTEM -CPU_5_7_MOD_REMOVE_LED SYSTEM -CPU_0_2_MOD_PR_SENSOR MOTHERBOARD -CPU_1_3_MOD_PR_SENSOR MOTHERBOARD -CPU_4_6_MOD_PR_SENSOR MOTHERBOARD -CPU_5_7_MOD_PR_SENSOR MOTHERBOARD -CPU0_DIE_TEMPERATURE_SENSOR CPU_0_2_MOD_CARD -CPU1_DIE_TEMPERATURE_SENSOR CPU_1_3_MOD_CARD -ZULU1_DIE_TEMPERATURE_SENSOR ZULU_1_3_MOD_CARD -CPU2_DIE_TEMPERATURE_SENSOR CPU_0_2_MOD_CARD -CPU3_DIE_TEMPERATURE_SENSOR CPU_1_3_MOD_CARD -ZULU3_DIE_TEMPERATURE_SENSOR ZULU_1_3_MOD_CARD -CPU4_DIE_TEMPERATURE_SENSOR CPU_4_6_MOD_CARD -ZULU4_DIE_TEMPERATURE_SENSOR ZULU_4_6_MOD_CARD -CPU5_DIE_TEMPERATURE_SENSOR CPU_5_7_MOD_CARD -CPU6_DIE_TEMPERATURE_SENSOR CPU_4_6_MOD_CARD -ZULU6_DIE_TEMPERATURE_SENSOR ZULU_4_6_MOD_CARD -CPU7_DIE_TEMPERATURE_SENSOR CPU_5_7_MOD_CARD -MB_AMB_TEMPERATURE_SENSOR IO_BOARD -IOB_AMB_TEMPERATURE_SENSOR IO_BOARD -DISK_BP0_BOARD DISK_BP0_BOARD_SLOT -DISK_BP1_BOARD DISK_BP1_BOARD_SLOT -LOOP_B_0_BOARD_SLOT DISK_BP0_BOARD -LOOP_B_1_BOARD_SLOT DISK_BP1_BOARD -LOOP_B_0_BOARD LOOP_B_0_BOARD_SLOT -LOOP_B_1_BOARD LOOP_B_1_BOARD_SLOT -RSC_CARD RSC_SLOT -DISK_BP0_PR_SENSOR MOTHERBOARD -DISK_BP1_PR_SENSOR MOTHERBOARD -RSC_PR_SENSOR MOTHERBOARD -DBP0_AMB_TEMPERATURE_SENSOR DISK_BP0_BOARD -DBP1_AMB_TEMPERATURE_SENSOR DISK_BP1_BOARD -DISK0 DISK0_SLOT -DISK1 DISK1_SLOT -DISK2 DISK2_SLOT -DISK3 DISK3_SLOT -DISK4 DISK4_SLOT -DISK5 DISK5_SLOT -DISK6 DISK6_SLOT -DISK7 DISK7_SLOT -DISK8 DISK8_SLOT -DISK9 DISK9_SLOT -DISK10 DISK10_SLOT -DISK11 DISK11_SLOT -LOOP_B_0_BOARD_PR_SENSOR DISK_BP0_BOARD -LOOP_B_1_BOARD_PR_SENSOR DISK_BP1_BOARD -DISK0_PR_SENSOR DISK_BP0_BOARD -DISK1_PR_SENSOR DISK_BP0_BOARD -DISK2_PR_SENSOR DISK_BP0_BOARD -DISK3_PR_SENSOR DISK_BP0_BOARD -DISK4_PR_SENSOR DISK_BP0_BOARD -DISK5_PR_SENSOR DISK_BP0_BOARD -DISK6_PR_SENSOR DISK_BP1_BOARD -DISK7_PR_SENSOR DISK_BP1_BOARD -DISK8_PR_SENSOR DISK_BP1_BOARD -DISK9_PR_SENSOR DISK_BP1_BOARD -DISK10_PR_SENSOR DISK_BP1_BOARD -DISK11_PR_SENSOR DISK_BP1_BOARD -DISK0_SLOT DISK_BP0_BOARD -DISK1_SLOT DISK_BP0_BOARD -DISK2_SLOT DISK_BP0_BOARD -DISK3_SLOT DISK_BP0_BOARD -DISK4_SLOT DISK_BP0_BOARD -DISK5_SLOT DISK_BP0_BOARD -DISK6_SLOT DISK_BP1_BOARD -DISK7_SLOT DISK_BP1_BOARD -DISK8_SLOT DISK_BP1_BOARD -DISK9_SLOT DISK_BP1_BOARD -DISK10_SLOT DISK_BP1_BOARD -DISK11_SLOT DISK_BP1_BOARD -DISK0_FLT_LED DISK_BP0_BOARD -DISK1_FLT_LED DISK_BP0_BOARD -DISK2_FLT_LED DISK_BP0_BOARD -DISK3_FLT_LED DISK_BP0_BOARD -DISK4_FLT_LED DISK_BP0_BOARD -DISK5_FLT_LED DISK_BP0_BOARD -DISK6_FLT_LED DISK_BP1_BOARD -DISK7_FLT_LED DISK_BP1_BOARD -DISK8_FLT_LED DISK_BP1_BOARD -DISK9_FLT_LED DISK_BP1_BOARD -DISK10_FLT_LED DISK_BP1_BOARD -DISK11_FLT_LED DISK_BP1_BOARD -DISK0_REMOVE_LED DISK_BP0_BOARD -DISK1_REMOVE_LED DISK_BP0_BOARD -DISK2_REMOVE_LED DISK_BP0_BOARD -DISK3_REMOVE_LED DISK_BP0_BOARD -DISK4_REMOVE_LED DISK_BP0_BOARD -DISK5_REMOVE_LED DISK_BP0_BOARD -DISK6_REMOVE_LED DISK_BP1_BOARD -DISK7_REMOVE_LED DISK_BP1_BOARD -DISK8_REMOVE_LED DISK_BP1_BOARD -DISK9_REMOVE_LED DISK_BP1_BOARD -DISK10_REMOVE_LED DISK_BP1_BOARD -DISK11_REMOVE_LED DISK_BP1_BOARD -PCI0_CARD PCI0_SLOT -PCI1_CARD PCI1_SLOT -PCI2_CARD PCI2_SLOT -PCI3_CARD PCI3_SLOT -PCI4_CARD PCI4_SLOT -PCI5_CARD PCI5_SLOT -PCI6_CARD PCI6_SLOT -PCI7_CARD PCI7_SLOT -PCI8_CARD PCI8_SLOT -PCI0_SLOT IO_BOARD -PCI1_SLOT IO_BOARD -PCI2_SLOT IO_BOARD -PCI3_SLOT IO_BOARD -PCI4_SLOT IO_BOARD -PCI5_SLOT IO_BOARD -PCI6_SLOT IO_BOARD -PCI7_SLOT IO_BOARD -PCI8_SLOT IO_BOARD -PCI0_FLT_LED SYSTEM -PCI1_FLT_LED SYSTEM -PCI2_FLT_LED SYSTEM -PCI3_FLT_LED SYSTEM -PCI4_FLT_LED SYSTEM -PCI5_FLT_LED SYSTEM -PCI6_FLT_LED SYSTEM -PCI7_FLT_LED SYSTEM -PCI8_FLT_LED SYSTEM -PCI0_REMOVE_LED SYSTEM -PCI1_REMOVE_LED SYSTEM -PCI2_REMOVE_LED SYSTEM -PCI3_REMOVE_LED SYSTEM -PCI4_REMOVE_LED SYSTEM -PCI5_REMOVE_LED SYSTEM -PCI6_REMOVE_LED SYSTEM -PCI7_REMOVE_LED SYSTEM -PCI8_REMOVE_LED SYSTEM -PCI0_PR_SENSOR IO_BOARD -PCI1_PR_SENSOR IO_BOARD -PCI2_PR_SENSOR IO_BOARD -PCI3_PR_SENSOR IO_BOARD -PCI4_PR_SENSOR IO_BOARD -PCI5_PR_SENSOR IO_BOARD -PCI6_PR_SENSOR IO_BOARD -PCI7_PR_SENSOR IO_BOARD -PCI8_PR_SENSOR IO_BOARD -FSP_GEN_FAULT_LED FSP -FSP_REMOVE_LED FSP -FSP_DISK_FAULT_LED FSP -FSP_POWER_FAULT_LED FSP -FSP_LEFT_THERMAL_FAULT_LED FSP -FSP_RIGHT_THERMAL_FAULT_LED FSP -FSP_LEFT_DOOR_LED FSP -FSP_RIGHT_DOOR_LED FSP -KEYSWITCH FSP -FSP_KS_NORMAL_POS_SENSOR IO_BOARD -FSP_KS_DIAG_POS_SENSOR IO_BOARD -FSP_KS_LOCK_POS_SENSOR IO_BOARD -FSP_KS_OFF_POS_SENSOR IO_BOARD -FAN_BLAST_OFF_SWITCH IO_BOARD -DISK_BP0_BOARD_SLOT SYSTEM -DISK_BP1_BOARD_SLOT SYSTEM -RSC_SLOT SYSTEM -5V_ENABLE_SWITCH IO_BOARD -I2C_ENABLE_SWITCH IO_BOARD -FAN_BLAST_OFF_SWITCH IO_BOARD -MOTHERBOARD SYSTEM -IO_BOARD SYSTEM -PDB SYSTEM -FSP SYSTEM -24C64_A0_0 CPU_0_2_MOD_CARD -24C64_A2_0 CPU_0_2_MOD_CARD -24C64_A4_0 CPU_0_2_MOD_CARD -24C64_A6_0 CPU_0_2_MOD_CARD -24C64_A8_0 CPU_0_2_MOD_CARD -24C64_AA_0 CPU_0_2_MOD_CARD -24C64_AC_0 CPU_0_2_MOD_CARD -24C64_AE_0 CPU_0_2_MOD_CARD -24C64_A0_1 CPU_1_3_MOD_CARD -24C64_A2_1 CPU_1_3_MOD_CARD -24C64_A4_1 CPU_1_3_MOD_CARD -24C64_A6_1 CPU_1_3_MOD_CARD -24C64_A8_1 CPU_1_3_MOD_CARD -24C64_AA_1 CPU_1_3_MOD_CARD -24C64_AC_1 CPU_1_3_MOD_CARD -24C64_AE_1 CPU_1_3_MOD_CARD -24C64_A0_2 CPU_0_2_MOD_CARD -24C64_A2_2 CPU_0_2_MOD_CARD -24C64_A4_2 CPU_0_2_MOD_CARD -24C64_A6_2 CPU_0_2_MOD_CARD -24C64_A8_2 CPU_0_2_MOD_CARD -24C64_AA_2 CPU_0_2_MOD_CARD -24C64_AC_2 CPU_0_2_MOD_CARD -24C64_AE_2 CPU_0_2_MOD_CARD -24C64_A0_3 CPU_1_3_MOD_CARD -24C64_A2_3 CPU_1_3_MOD_CARD -24C64_A4_3 CPU_1_3_MOD_CARD -24C64_A6_3 CPU_1_3_MOD_CARD -24C64_A8_3 CPU_1_3_MOD_CARD -24C64_AA_3 CPU_1_3_MOD_CARD -24C64_AC_3 CPU_1_3_MOD_CARD -24C64_AE_3 CPU_1_3_MOD_CARD -24C64_A0_4 CPU_0_2_MOD_CARD -24C64_A2_4 CPU_1_3_MOD_CARD -24C64_A2_4 ZULU_1_3_MOD_CARD -24C64_A8_4 MOTHERBOARD -24C64_AA_4 IO_BOARD -SSC100_16_5 DISK_BP0_BOARD -SSC100_1A_5 LOOP_B_0_BOARD -SSC100_1C_5 DISK_BP1_BOARD -SSC100_1E_5 LOOP_B_1_BOARD -MAX1617_30_5 CPU_0_2_MOD_CARD -MAX1617_32_5 CPU_1_3_MOD_CARD -MAX1617_32_5 ZULU_1_3_MOD_CARD -MAX1617_34_5 CPU_0_2_MOD_CARD -PCF8574_70_5 PS0 -PCF8574_72_5 PS1 -PCF8574_74_5 PS2 -PCF8574_46_5 IO_BOARD -MAX1617_52_5 CPU_1_3_MOD_CARD -MAX1617_52_5 ZULU_1_3_MOD_CARD -MAX1617_54_5 CPU_4_6_MOD_CARD -MAX1617_54_5 ZULU_4_6_MOD_CARD -MAX1617_56_5 CPU_5_7_MOD_CARD -LTC1427_5A_5 IO_BOARD -LTC1427_5E_5 IO_BOARD -SSC050_80_5 MOTHERBOARD -SSC050_82_5 IO_BOARD -SSC050_88_5 DISK_BP0_BOARD -SSC050_8A_5 DISK_BP0_BOARD -SSC050_8C_5 DISK_BP1_BOARD -SSC050_8E_5 DISK_BP1_BOARD -PCF8591_90_5 PS0 -PCF8591_92_5 PS1 -PCF8591_94_5 PS2 -PCF8591_96_5 IO_BOARD -MAX1617_98_5 CPU_4_6_MOD_CARD -MAX1617_98_5 ZULU_4_6_MOD_CARD -MAX1617_9A_5 CPU_5_7_MOD_CARD -LM75_9C_5 DISK_BP0_BOARD -LM75_9E_5 DISK_BP1_BOARD -24C64_A0_5 PS0 -24C64_A2_5 PS1 -24C64_A4_5 PS2 -24C64_A6_5 RSC_CARD -24C64_A8_5 DISK_BP0_BOARD -24C64_AC_5 DISK_BP1_BOARD -24C64_AE_5 PDB -HPC3130_E2_5 IO_BOARD -HPC3130_E6_5 IO_BOARD -HPC3130_E8_5 IO_BOARD -HPC3130_EC_5 MOTHERBOARD -24C64_A0_6 CPU_4_6_MOD_CARD -24C64_A2_6 CPU_4_6_MOD_CARD -24C64_A4_6 CPU_4_6_MOD_CARD -24C64_A6_6 CPU_4_6_MOD_CARD -24C64_A8_6 CPU_4_6_MOD_CARD -24C64_AA_6 CPU_4_6_MOD_CARD -24C64_AC_6 CPU_4_6_MOD_CARD -24C64_AE_6 CPU_4_6_MOD_CARD -24C64_A0_7 CPU_5_7_MOD_CARD -24C64_A2_7 CPU_5_7_MOD_CARD -24C64_A4_7 CPU_5_7_MOD_CARD -24C64_A6_7 CPU_5_7_MOD_CARD -24C64_A8_7 CPU_5_7_MOD_CARD -24C64_AA_7 CPU_5_7_MOD_CARD -24C64_AC_7 CPU_5_7_MOD_CARD -24C64_AE_7 CPU_5_7_MOD_CARD -24C64_A0_8 CPU_4_6_MOD_CARD -24C64_A2_8 CPU_4_6_MOD_CARD -24C64_A4_8 CPU_4_6_MOD_CARD -24C64_A6_8 CPU_4_6_MOD_CARD -24C64_A8_8 CPU_4_6_MOD_CARD -24C64_AA_8 CPU_4_6_MOD_CARD -24C64_AC_8 CPU_4_6_MOD_CARD -24C64_AE_8 CPU_4_6_MOD_CARD -24C64_A0_9 CPU_5_7_MOD_CARD -24C64_A2_9 CPU_5_7_MOD_CARD -24C64_A4_9 CPU_5_7_MOD_CARD -24C64_A6_9 CPU_5_7_MOD_CARD -24C64_A8_9 CPU_5_7_MOD_CARD -24C64_AA_9 CPU_5_7_MOD_CARD -24C64_AC_9 CPU_5_7_MOD_CARD -24C64_AE_9 CPU_5_7_MOD_CARD -24C64_A4_10 CPU_4_6_MOD_CARD -24C64_A4_10 ZULU_4_6_MOD_CARD -24C64_A6_10 CPU_5_7_MOD_CARD -24C64_A0_11 MOTHERBOARD -24C64_A2_11 MOTHERBOARD -ASSOCIATION_END -ASSOCIATION PSVC_CPU -SYSTEM CPU_0_2_MOD_CARD -SYSTEM CPU_1_3_MOD_CARD -SYSTEM ZULU_1_3_MOD_CARD -SYSTEM CPU_4_6_MOD_CARD -SYSTEM ZULU_4_6_MOD_CARD -SYSTEM CPU_5_7_MOD_CARD -ASSOCIATION_END -ASSOCIATION PSVC_ALTERNATE -CPU0_PRIM_FAN CPU0_SEC_FAN -CPU1_PRIM_FAN CPU1_SEC_FAN -IO0_PRIM_FAN IO0_SEC_FAN -IO1_PRIM_FAN IO1_SEC_FAN -IO_BRIDGE_PRIM_FAN IO_BRIDGE_SEC_FAN -ASSOCIATION_END -ASSOCIATION PSVC_HOTPLUG_ENABLE_SWITCH -PS0 I2C_ENABLE_SWITCH -PS1 I2C_ENABLE_SWITCH -PS2 I2C_ENABLE_SWITCH -ASSOCIATION_END -ASSOCIATION PSVC_PS -SYSTEM PS0 -SYSTEM PS1 -SYSTEM PS2 -ASSOCIATION_END -ASSOCIATION PSVC_FAN -SYSTEM CPU0_PRIM_FAN -SYSTEM CPU1_PRIM_FAN -SYSTEM CPU0_SEC_FAN -SYSTEM CPU1_SEC_FAN -SYSTEM IO0_PRIM_FAN -SYSTEM IO1_PRIM_FAN -SYSTEM IO0_SEC_FAN -SYSTEM IO1_SEC_FAN -SYSTEM IO_BRIDGE_PRIM_FAN -SYSTEM IO_BRIDGE_SEC_FAN -ASSOCIATION_END -ASSOCIATION PSVC_TS -SYSTEM CPU0_DIE_TEMPERATURE_SENSOR -SYSTEM CPU1_DIE_TEMPERATURE_SENSOR -SYSTEM ZULU1_DIE_TEMPERATURE_SENSOR -SYSTEM CPU2_DIE_TEMPERATURE_SENSOR -SYSTEM CPU3_DIE_TEMPERATURE_SENSOR -SYSTEM ZULU3_DIE_TEMPERATURE_SENSOR -SYSTEM CPU4_DIE_TEMPERATURE_SENSOR -SYSTEM ZULU4_DIE_TEMPERATURE_SENSOR -SYSTEM CPU5_DIE_TEMPERATURE_SENSOR -SYSTEM CPU6_DIE_TEMPERATURE_SENSOR -SYSTEM ZULU6_DIE_TEMPERATURE_SENSOR -SYSTEM CPU7_DIE_TEMPERATURE_SENSOR -SYSTEM MB_AMB_TEMPERATURE_SENSOR -SYSTEM IOB_AMB_TEMPERATURE_SENSOR -SYSTEM DBP0_AMB_TEMPERATURE_SENSOR -SYSTEM DBP1_AMB_TEMPERATURE_SENSOR -ASSOCIATION_END -ASSOCIATION PSVC_DISK -SYSTEM DISK0 -SYSTEM DISK1 -SYSTEM DISK2 -SYSTEM DISK3 -SYSTEM DISK4 -SYSTEM DISK5 -SYSTEM DISK6 -SYSTEM DISK7 -SYSTEM DISK8 -SYSTEM DISK9 -SYSTEM DISK10 -SYSTEM DISK11 -ASSOCIATION_END -ASSOCIATION PSVC_LED -SYSTEM CPU_PFAN_FLT_LED -SYSTEM CPU_SFAN_FLT_LED -SYSTEM IO_PFAN_FLT_LED -SYSTEM IO_SFAN_FLT_LED -SYSTEM IO_BRIDGE_PFAN_FLT_LED -SYSTEM IO_BRIDGE_SFAN_FLT_LED -SYSTEM CPU_PFAN_REMOVE_LED -SYSTEM CPU_SFAN_REMOVE_LED -SYSTEM IO_PFAN_REMOVE_LED -SYSTEM IO_SFAN_REMOVE_LED -SYSTEM IO_BRIDGE_PFAN_REMOVE_LED -SYSTEM IO_BRIDGE_SFAN_REMOVE_LED -SYSTEM CPU_0_2_MOD_FLT_LED -SYSTEM CPU_1_3_MOD_FLT_LED -SYSTEM CPU_4_6_MOD_FLT_LED -SYSTEM CPU_5_7_MOD_FLT_LED -SYSTEM CPU_0_2_MOD_REMOVE_LED -SYSTEM CPU_1_3_MOD_REMOVE_LED -SYSTEM CPU_4_6_MOD_REMOVE_LED -SYSTEM CPU_5_7_MOD_REMOVE_LED -SYSTEM PCI0_FLT_LED -SYSTEM PCI1_FLT_LED -SYSTEM PCI2_FLT_LED -SYSTEM PCI3_FLT_LED -SYSTEM PCI4_FLT_LED -SYSTEM PCI5_FLT_LED -SYSTEM PCI6_FLT_LED -SYSTEM PCI7_FLT_LED -SYSTEM PCI8_FLT_LED -SYSTEM PCI0_REMOVE_LED -SYSTEM PCI1_REMOVE_LED -SYSTEM PCI2_REMOVE_LED -SYSTEM PCI3_REMOVE_LED -SYSTEM PCI4_REMOVE_LED -SYSTEM PCI5_REMOVE_LED -SYSTEM PCI6_REMOVE_LED -SYSTEM PCI7_REMOVE_LED -SYSTEM PCI8_REMOVE_LED -SYSTEM FSP_GEN_FAULT_LED -SYSTEM FSP_REMOVE_LED -SYSTEM FSP_DISK_FAULT_LED -SYSTEM FSP_POWER_FAULT_LED -SYSTEM FSP_LEFT_THERMAL_FAULT_LED -SYSTEM FSP_RIGHT_THERMAL_FAULT_LED -SYSTEM FSP_LEFT_DOOR_LED -SYSTEM FSP_RIGHT_DOOR_LED -SYSTEM DISK0_FLT_LED -SYSTEM DISK1_FLT_LED -SYSTEM DISK2_FLT_LED -SYSTEM DISK3_FLT_LED -SYSTEM DISK4_FLT_LED -SYSTEM DISK5_FLT_LED -SYSTEM DISK6_FLT_LED -SYSTEM DISK7_FLT_LED -SYSTEM DISK8_FLT_LED -SYSTEM DISK9_FLT_LED -SYSTEM DISK10_FLT_LED -SYSTEM DISK11_FLT_LED -SYSTEM DISK0_REMOVE_LED -SYSTEM DISK1_REMOVE_LED -SYSTEM DISK2_REMOVE_LED -SYSTEM DISK3_REMOVE_LED -SYSTEM DISK4_REMOVE_LED -SYSTEM DISK5_REMOVE_LED -SYSTEM DISK6_REMOVE_LED -SYSTEM DISK7_REMOVE_LED -SYSTEM DISK8_REMOVE_LED -SYSTEM DISK9_REMOVE_LED -SYSTEM DISK10_REMOVE_LED -SYSTEM DISK11_REMOVE_LED -ASSOCIATION_END -ASSOCIATION PSVC_FSP_LED -SYSTEM FSP_GEN_FAULT_LED -SYSTEM FSP_REMOVE_LED -SYSTEM FSP_DISK_FAULT_LED -SYSTEM FSP_POWER_FAULT_LED -SYSTEM FSP_LEFT_THERMAL_FAULT_LED -SYSTEM FSP_RIGHT_THERMAL_FAULT_LED -SYSTEM FSP_LEFT_DOOR_LED -SYSTEM FSP_RIGHT_DOOR_LED -ASSOCIATION_END -ASSOCIATION PSVC_KEYSWITCH -SYSTEM KEYSWITCH -FSP KEYSWITCH -ASSOCIATION_END -ASSOCIATION PSVC_PCI_CARD -SYSTEM PCI0_CARD -SYSTEM PCI1_CARD -SYSTEM PCI2_CARD -SYSTEM PCI3_CARD -SYSTEM PCI4_CARD -SYSTEM PCI5_CARD -SYSTEM PCI6_CARD -SYSTEM PCI7_CARD -SYSTEM PCI8_CARD -ASSOCIATION_END -ASSOCIATION PSVC_PHYSICAL_DEVICE -SYSTEM 24C64_A0_0 -SYSTEM 24C64_A2_0 -SYSTEM 24C64_A4_0 -SYSTEM 24C64_A6_0 -SYSTEM 24C64_A8_0 -SYSTEM 24C64_AA_0 -SYSTEM 24C64_AC_0 -SYSTEM 24C64_AE_0 -SYSTEM 24C64_A0_1 -SYSTEM 24C64_A2_1 -SYSTEM 24C64_A4_1 -SYSTEM 24C64_A6_1 -SYSTEM 24C64_A8_1 -SYSTEM 24C64_AA_1 -SYSTEM 24C64_AC_1 -SYSTEM 24C64_AE_1 -SYSTEM 24C64_A0_2 -SYSTEM 24C64_A2_2 -SYSTEM 24C64_A4_2 -SYSTEM 24C64_A6_2 -SYSTEM 24C64_A8_2 -SYSTEM 24C64_AA_2 -SYSTEM 24C64_AC_2 -SYSTEM 24C64_AE_2 -SYSTEM 24C64_A0_3 -SYSTEM 24C64_A2_3 -SYSTEM 24C64_A4_3 -SYSTEM 24C64_A6_3 -SYSTEM 24C64_A8_3 -SYSTEM 24C64_AA_3 -SYSTEM 24C64_AC_3 -SYSTEM 24C64_AE_3 -SYSTEM 24C64_A0_4 -SYSTEM 24C64_A2_4 -SYSTEM 24C64_A8_4 -SYSTEM 24C64_AA_4 -SYSTEM SSC100_16_5 -SYSTEM SSC100_1A_5 -SYSTEM SSC100_1C_5 -SYSTEM SSC100_1E_5 -SYSTEM MAX1617_30_5 -SYSTEM MAX1617_32_5 -SYSTEM MAX1617_34_5 -SYSTEM PCF8574_70_5 -SYSTEM PCF8574_72_5 -SYSTEM PCF8574_74_5 -SYSTEM PCF8574_46_5 -SYSTEM MAX1617_52_5 -SYSTEM MAX1617_54_5 -SYSTEM MAX1617_56_5 -SYSTEM LTC1427_5A_5 -SYSTEM LTC1427_5E_5 -SYSTEM SSC050_80_5 -SYSTEM SSC050_82_5 -SYSTEM SSC050_88_5 -SYSTEM SSC050_8A_5 -SYSTEM SSC050_8C_5 -SYSTEM SSC050_8E_5 -SYSTEM PCF8591_90_5 -SYSTEM PCF8591_92_5 -SYSTEM PCF8591_94_5 -SYSTEM PCF8591_96_5 -SYSTEM MAX1617_98_5 -SYSTEM MAX1617_9A_5 -SYSTEM LM75_9C_5 -SYSTEM LM75_9E_5 -SYSTEM 24C64_A0_5 -SYSTEM 24C64_A2_5 -SYSTEM 24C64_A4_5 -SYSTEM 24C64_A6_5 -SYSTEM 24C64_A8_5 -SYSTEM 24C64_AC_5 -SYSTEM 24C64_AE_5 -SYSTEM HPC3130_E2_5 -SYSTEM HPC3130_E6_5 -SYSTEM HPC3130_E8_5 -SYSTEM HPC3130_EC_5 -SYSTEM 24C64_A0_6 -SYSTEM 24C64_A2_6 -SYSTEM 24C64_A4_6 -SYSTEM 24C64_A6_6 -SYSTEM 24C64_A8_6 -SYSTEM 24C64_AA_6 -SYSTEM 24C64_AC_6 -SYSTEM 24C64_AE_6 -SYSTEM 24C64_A0_7 -SYSTEM 24C64_A2_7 -SYSTEM 24C64_A4_7 -SYSTEM 24C64_A6_7 -SYSTEM 24C64_A8_7 -SYSTEM 24C64_AA_7 -SYSTEM 24C64_AC_7 -SYSTEM 24C64_AE_7 -SYSTEM 24C64_A0_8 -SYSTEM 24C64_A2_8 -SYSTEM 24C64_A4_8 -SYSTEM 24C64_A6_8 -SYSTEM 24C64_A8_8 -SYSTEM 24C64_AA_8 -SYSTEM 24C64_AC_8 -SYSTEM 24C64_AE_8 -SYSTEM 24C64_A0_9 -SYSTEM 24C64_A2_9 -SYSTEM 24C64_A4_9 -SYSTEM 24C64_A6_9 -SYSTEM 24C64_A8_9 -SYSTEM 24C64_AA_9 -SYSTEM 24C64_AC_9 -SYSTEM 24C64_AE_9 -SYSTEM 24C64_A4_10 -SYSTEM 24C64_A6_10 -SYSTEM 24C64_A0_11 -SYSTEM 24C64_A2_11 -CPU_PFAN_FLT_LED SSC050_82_5 -CPU_SFAN_FLT_LED SSC050_82_5 -IO_PFAN_FLT_LED SSC050_82_5 -IO_SFAN_FLT_LED SSC050_82_5 -IO_BRIDGE_PFAN_FLT_LED SSC050_82_5 -IO_BRIDGE_SFAN_FLT_LED SSC050_82_5 -CPU_PFAN_REMOVE_LED PCF8574_46_5 -CPU_SFAN_REMOVE_LED PCF8574_46_5 -IO_PFAN_REMOVE_LED SSC050_80_5 -IO_SFAN_REMOVE_LED SSC050_80_5 -IO_BRIDGE_PFAN_REMOVE_LED PCF8574_46_5 -IO_BRIDGE_SFAN_REMOVE_LED PCF8574_46_5 -CPU_PFAN_PR_SENSOR SSC050_82_5 -CPU_SFAN_PR_SENSOR SSC050_82_5 -IO_PFAN_PR_SENSOR SSC050_82_5 -IO_SFAN_PR_SENSOR SSC050_82_5 -IO_BRIDGE_PFAN_PR_SENSOR SSC050_82_5 -IO_BRIDGE_SFAN_PR_SENSOR SSC050_82_5 -CPU0_PFAN_TACH SSC050_80_5 -CPU1_PFAN_TACH SSC050_80_5 -CPU0_SFAN_TACH SSC050_80_5 -CPU1_SFAN_TACH SSC050_80_5 -IO0_PFAN_TACH SSC050_82_5 -IO1_PFAN_TACH SSC050_82_5 -IO0_SFAN_TACH SSC050_82_5 -IO1_SFAN_TACH SSC050_82_5 -IO_BRIDGE_PFAN_TACH SSC050_80_5 -IO_BRIDGE_SFAN_TACH SSC050_80_5 -CPU_PFAN_SPEED_CONTROL LTC1427_5E_5 -IO_PFAN_SPEED_CONTROL LTC1427_5A_5 -CPU_SFAN_ONOFF_SWITCH SSC050_82_5 -IO_PFAN_ONOFF_SWITCH SSC050_82_5 -IO_SFAN_ONOFF_SWITCH SSC050_80_5 -IO_BRIDGE_PFAN_ONOFF_SWITCH SSC050_80_5 -IO_BRIDGE_SFAN_ONOFF_SWITCH SSC050_80_5 -CPU_FAN_P_S_MON_SWITCH SSC050_82_5 -IO_FAN_P_S_MON_SWITCH SSC050_82_5 -5V_ENABLE_SWITCH PCF8574_46_5 -I2C_ENABLE_SWITCH PCF8574_46_5 -PS0 PCF8591_90_5 -PS0 PCF8574_70_5 -PS0 24C64_A0_5 -PS0_3_3V_I_SENSOR PCF8591_90_5 -PS0_5V_I_SENSOR PCF8591_90_5 -PS0_12V_I_SENSOR PCF8591_90_5 -PS0_48V_I_SENSOR PCF8591_90_5 -PS0_SENSOR_VALID_SWITCH PCF8574_70_5 -PS0_FAN_FAIL_SENSOR PCF8574_70_5 -PS0_TEMP_FAIL_SENSOR PCF8574_70_5 -PS0_I_SHARE_FAIL_SENSOR PCF8574_70_5 -PS0_PR_SENSOR SSC050_82_5 -PS1 PCF8591_92_5 -PS1 PCF8574_72_5 -PS1 24C64_A2_5 -PS1_3_3V_I_SENSOR PCF8591_92_5 -PS1_5V_I_SENSOR PCF8591_92_5 -PS1_12V_I_SENSOR PCF8591_92_5 -PS1_48V_I_SENSOR PCF8591_92_5 -PS1_SENSOR_VALID_SWITCH PCF8574_72_5 -PS1_FAN_FAIL_SENSOR PCF8574_72_5 -PS1_TEMP_FAIL_SENSOR PCF8574_72_5 -PS1_I_SHARE_FAIL_SENSOR PCF8574_72_5 -PS1_PR_SENSOR SSC050_82_5 -PS2 PCF8591_94_5 -PS2 PCF8574_74_5 -PS2 24C64_A4_5 -PS2_3_3V_I_SENSOR PCF8591_94_5 -PS2_5V_I_SENSOR PCF8591_94_5 -PS2_12V_I_SENSOR PCF8591_94_5 -PS2_48V_I_SENSOR PCF8591_94_5 -PS2_SENSOR_VALID_SWITCH PCF8574_74_5 -PS2_FAN_FAIL_SENSOR PCF8574_74_5 -PS2_TEMP_FAIL_SENSOR PCF8574_74_5 -PS2_I_SHARE_FAIL_SENSOR PCF8574_74_5 -PS2_PR_SENSOR SSC050_82_5 -CPU_0_2_MOD_FLT_LED HPC3130_EC_5 -CPU_1_3_MOD_FLT_LED HPC3130_EC_5 -CPU_4_6_MOD_FLT_LED HPC3130_EC_5 -CPU_5_7_MOD_FLT_LED HPC3130_EC_5 -CPU_0_2_MOD_REMOVE_LED HPC3130_EC_5 -CPU_1_3_MOD_REMOVE_LED HPC3130_EC_5 -CPU_4_6_MOD_REMOVE_LED HPC3130_EC_5 -CPU_5_7_MOD_REMOVE_LED HPC3130_EC_5 -CPU_0_2_MOD_PR_SENSOR HPC3130_EC_5 -CPU_1_3_MOD_PR_SENSOR HPC3130_EC_5 -CPU_4_6_MOD_PR_SENSOR HPC3130_EC_5 -CPU_5_7_MOD_PR_SENSOR HPC3130_EC_5 -CPU0_DIE_TEMPERATURE_SENSOR MAX1617_30_5 -CPU1_DIE_TEMPERATURE_SENSOR MAX1617_32_5 -ZULU1_DIE_TEMPERATURE_SENSOR MAX1617_32_5 -CPU2_DIE_TEMPERATURE_SENSOR MAX1617_34_5 -CPU3_DIE_TEMPERATURE_SENSOR MAX1617_52_5 -ZULU3_DIE_TEMPERATURE_SENSOR MAX1617_52_5 -CPU4_DIE_TEMPERATURE_SENSOR MAX1617_54_5 -ZULU4_DIE_TEMPERATURE_SENSOR MAX1617_54_5 -CPU5_DIE_TEMPERATURE_SENSOR MAX1617_56_5 -CPU6_DIE_TEMPERATURE_SENSOR MAX1617_98_5 -ZULU6_DIE_TEMPERATURE_SENSOR MAX1617_98_5 -CPU7_DIE_TEMPERATURE_SENSOR MAX1617_9A_5 -MB_AMB_TEMPERATURE_SENSOR PCF8591_96_5 -IOB_AMB_TEMPERATURE_SENSOR PCF8591_96_5 -DBP0_AMB_TEMPERATURE_SENSOR LM75_9C_5 -DBP1_AMB_TEMPERATURE_SENSOR LM75_9E_5 -PCI0_FLT_LED HPC3130_E6_5 -PCI1_FLT_LED HPC3130_E6_5 -PCI2_FLT_LED HPC3130_E6_5 -PCI3_FLT_LED HPC3130_E6_5 -PCI4_FLT_LED HPC3130_E8_5 -PCI5_FLT_LED HPC3130_E8_5 -PCI6_FLT_LED HPC3130_E8_5 -PCI7_FLT_LED HPC3130_E2_5 -PCI8_FLT_LED HPC3130_E2_5 -PCI0_REMOVE_LED HPC3130_E6_5 -PCI1_REMOVE_LED HPC3130_E6_5 -PCI2_REMOVE_LED HPC3130_E6_5 -PCI3_REMOVE_LED HPC3130_E6_5 -PCI4_REMOVE_LED HPC3130_E8_5 -PCI5_REMOVE_LED HPC3130_E8_5 -PCI6_REMOVE_LED HPC3130_E8_5 -PCI7_REMOVE_LED HPC3130_E2_5 -PCI8_REMOVE_LED HPC3130_E2_5 -PCI0_PR_SENSOR HPC3130_E6_5 -PCI1_PR_SENSOR HPC3130_E6_5 -PCI2_PR_SENSOR HPC3130_E6_5 -PCI3_PR_SENSOR HPC3130_E6_5 -PCI4_PR_SENSOR HPC3130_E8_5 -PCI5_PR_SENSOR HPC3130_E8_5 -PCI6_PR_SENSOR HPC3130_E8_5 -PCI7_PR_SENSOR HPC3130_E2_5 -PCI8_PR_SENSOR HPC3130_E2_5 -FSP_GEN_FAULT_LED SSC050_82_5 -FSP_REMOVE_LED SSC050_82_5 -FSP_DISK_FAULT_LED SSC050_82_5 -FSP_POWER_FAULT_LED SSC050_82_5 -FSP_LEFT_THERMAL_FAULT_LED SSC050_82_5 -FSP_RIGHT_THERMAL_FAULT_LED SSC050_82_5 -FSP_LEFT_DOOR_LED SSC050_82_5 -FSP_RIGHT_DOOR_LED SSC050_82_5 -FSP_KS_NORMAL_POS_SENSOR SSC050_82_5 -FSP_KS_DIAG_POS_SENSOR SSC050_82_5 -FSP_KS_LOCK_POS_SENSOR SSC050_82_5 -FSP_KS_OFF_POS_SENSOR SSC050_82_5 -FAN_BLAST_OFF_SWITCH SSC050_82_5 -DISK_BP0_PR_SENSOR SSC050_80_5 -DISK_BP1_PR_SENSOR SSC050_80_5 -RSC_PR_SENSOR SSC050_82_5 -LOOP_B_0_BOARD_PR_SENSOR SSC050_88_5 -LOOP_B_1_BOARD_PR_SENSOR SSC050_8C_5 -DISK0_FLT_LED SSC050_8A_5 -DISK1_FLT_LED SSC050_8A_5 -DISK2_FLT_LED SSC050_8A_5 -DISK3_FLT_LED SSC050_8A_5 -DISK4_FLT_LED SSC050_8A_5 -DISK5_FLT_LED SSC050_8A_5 -DISK6_FLT_LED SSC050_8E_5 -DISK7_FLT_LED SSC050_8E_5 -DISK8_FLT_LED SSC050_8E_5 -DISK9_FLT_LED SSC050_8E_5 -DISK10_FLT_LED SSC050_8E_5 -DISK11_FLT_LED SSC050_8E_5 -DISK0_REMOVE_LED SSC050_8A_5 -DISK1_REMOVE_LED SSC050_8A_5 -DISK2_REMOVE_LED SSC050_8A_5 -DISK3_REMOVE_LED SSC050_8A_5 -DISK4_REMOVE_LED SSC050_8A_5 -DISK5_REMOVE_LED SSC050_8A_5 -DISK6_REMOVE_LED SSC050_8E_5 -DISK7_REMOVE_LED SSC050_8E_5 -DISK8_REMOVE_LED SSC050_8E_5 -DISK9_REMOVE_LED SSC050_8E_5 -DISK10_REMOVE_LED SSC050_8E_5 -DISK11_REMOVE_LED SSC050_8E_5 -DISK0_PR_SENSOR SSC050_88_5 -DISK1_PR_SENSOR SSC050_88_5 -DISK2_PR_SENSOR SSC050_88_5 -DISK3_PR_SENSOR SSC050_88_5 -DISK4_PR_SENSOR SSC050_88_5 -DISK5_PR_SENSOR SSC050_88_5 -DISK6_PR_SENSOR SSC050_8C_5 -DISK7_PR_SENSOR SSC050_8C_5 -DISK8_PR_SENSOR SSC050_8C_5 -DISK9_PR_SENSOR SSC050_8C_5 -DISK10_PR_SENSOR SSC050_8C_5 -DISK11_PR_SENSOR SSC050_8C_5 -ASSOCIATION_END -ASSOCIATION PSVC_FRU -CPU0_DIE_TEMPERATURE_SENSOR 24C64_A0_4 -CPU1_DIE_TEMPERATURE_SENSOR 24C64_A2_4 -ZULU1_DIE_TEMPERATURE_SENSOR 24C64_A2_4 -CPU2_DIE_TEMPERATURE_SENSOR 24C64_A0_4 -CPU3_DIE_TEMPERATURE_SENSOR 24C64_A2_4 -ZULU3_DIE_TEMPERATURE_SENSOR 24C64_A2_4 -CPU4_DIE_TEMPERATURE_SENSOR 24C64_A4_10 -ZULU4_DIE_TEMPERATURE_SENSOR 24C64_A4_10 -CPU5_DIE_TEMPERATURE_SENSOR 24C64_A6_10 -CPU6_DIE_TEMPERATURE_SENSOR 24C64_A4_10 -ZULU6_DIE_TEMPERATURE_SENSOR 24C64_A4_10 -CPU7_DIE_TEMPERATURE_SENSOR 24C64_A6_10 -IOB_AMB_TEMPERATURE_SENSOR 24C64_AA_4 -DBP0_AMB_TEMPERATURE_SENSOR 24C64_A8_5 -DBP1_AMB_TEMPERATURE_SENSOR 24C64_AC_5 -MB_AMB_TEMPERATURE_SENSOR 24C64_A8_4 -CPU_1_3_MOD_CARD 24C64_A2_4 -ZULU_1_3_MOD_CARD 24C64_A2_4 -CPU_4_6_MOD_CARD 24C64_A4_10 -ZULU_4_6_MOD_CARD 24C64_A4_10 -ASSOCIATION_END -ASSOCIATIONS_END - -DEVPATHS -0 0 0xA0 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a0:fru -0 0 0xA2 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a2:fru -0 0 0xA4 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a4:fru -0 0 0xA6 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a6:fru -0 0 0xA8 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a8:fru -0 0 0xAA 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,aa:fru -0 0 0xAC 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,ac:fru -0 0 0xAE 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,ae:fru -0 1 0xA0 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a0:fru -0 1 0xA2 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a2:fru -0 1 0xA4 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a4:fru -0 1 0xA6 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a6:fru -0 1 0xA8 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a8:fru -0 1 0xAA 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,aa:fru -0 1 0xAC 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,ac:fru -0 1 0xAE 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,ae:fru -0 2 0xA0 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a0:fru -0 2 0xA2 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a2:fru -0 2 0xA4 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a4:fru -0 2 0xA6 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a6:fru -0 2 0xA8 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a8:fru -0 2 0xAA 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,aa:fru -0 2 0xAC 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,ac:fru -0 2 0xAE 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,ae:fru -0 3 0xA0 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a0:fru -0 3 0xA2 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a2:fru -0 3 0xA4 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a4:fru -0 3 0xA6 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a6:fru -0 3 0xA8 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a8:fru -0 3 0xAA 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,aa:fru -0 3 0xAC 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,ac:fru -0 3 0xAE 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,ae:fru -0 4 0xA0 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@4,a0:fru -0 4 0xA2 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@4,a2:fru -0 4 0xA8 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@4,a8:fru -0 4 0xAA 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@4,aa:fru -1 0 0x16 0 /devices/pci@9,700000/ebus@1/i2c@1,30/controller@0,16:ssc100 -1 0 0x1A 0 /devices/pci@9,700000/ebus@1/i2c@1,30/controller@0,1a:ssc100 -1 0 0x1C 0 /devices/pci@9,700000/ebus@1/i2c@1,30/controller@0,1c:ssc100 -1 0 0x1E 0 /devices/pci@9,700000/ebus@1/i2c@1,30/controller@0,1e:ssc100 -1 0 0x30 0 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,30:amb_temp -1 0 0x30 1 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,30:die_temp -1 0 0x32 0 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,32:amb_temp -1 0 0x32 1 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,32:die_temp -1 0 0x34 0 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,34:amb_temp -1 0 0x34 1 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,34:die_temp -1 0 0x52 0 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,52:amb_temp -1 0 0x52 1 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,52:die_temp -1 0 0x54 0 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,54:amb_temp -1 0 0x54 1 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,54:die_temp -1 0 0x56 0 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,56:amb_temp -1 0 0x56 1 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,56:die_temp -1 0 0x98 0 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,98:amb_temp -1 0 0x98 1 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,98:die_temp -1 0 0x9a 0 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,9a:amb_temp -1 0 0x9a 1 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,9a:die_temp -1 0 0x70 0 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,70:pcf8574 -1 0 0x72 0 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,72:pcf8574 -1 0 0x74 0 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,74:pcf8574 -1 0 0x46 0 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,46:pcf8574 -1 0 0x5a 0 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,5a:ltc1427 -1 0 0x5e 0 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,5e:ltc1427 -1 0 0x80 0 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,80:port_0 -1 0 0x80 1 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,80:port_1 -1 0 0x80 2 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,80:port_2 -1 0 0x80 3 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,80:port_3 -1 0 0x80 4 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,80:port_4 -1 0 0x82 0 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,82:port_0 -1 0 0x82 1 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,82:port_1 -1 0 0x82 2 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,82:port_2 -1 0 0x82 3 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,82:port_3 -1 0 0x82 4 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,82:port_4 -1 0 0x88 0 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,88:port_0 -1 0 0x88 1 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,88:port_1 -1 0 0x88 2 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,88:port_2 -1 0 0x88 3 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,88:port_3 -1 0 0x88 4 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,88:port_4 -1 0 0x8a 0 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,8a:port_0 -1 0 0x8a 1 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,8a:port_1 -1 0 0x8a 2 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,8a:port_2 -1 0 0x8a 3 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,8a:port_3 -1 0 0x8a 4 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,8a:port_4 -1 0 0x8c 0 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,8c:port_0 -1 0 0x8c 1 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,8c:port_1 -1 0 0x8c 2 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,8c:port_2 -1 0 0x8c 3 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,8c:port_3 -1 0 0x8c 4 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,8c:port_4 -1 0 0x8e 0 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,8e:port_0 -1 0 0x8e 1 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,8e:port_1 -1 0 0x8e 2 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,8e:port_2 -1 0 0x8e 3 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,8e:port_3 -1 0 0x8e 4 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,8e:port_4 -1 0 0x90 0 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,90:port_0 -1 0 0x90 1 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,90:port_1 -1 0 0x90 2 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,90:port_2 -1 0 0x90 3 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,90:port_3 -1 0 0x92 0 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,92:port_0 -1 0 0x92 1 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,92:port_1 -1 0 0x92 2 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,92:port_2 -1 0 0x92 3 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,92:port_3 -1 0 0x94 0 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,94:port_0 -1 0 0x94 1 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,94:port_1 -1 0 0x94 2 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,94:port_2 -1 0 0x94 3 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,94:port_3 -1 0 0x96 0 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,96:port_0 -1 0 0x96 1 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,96:port_1 -1 0 0x96 2 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,96:port_2 -1 0 0x96 3 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,96:port_3 -1 0 0x9c 0 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature-sensor@0,9c:lm75 -1 0 0x9e 0 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature-sensor@0,9e:lm75 -1 0 0xA0 0 /devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,a0:fru -1 0 0xA2 0 /devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,a2:fru -1 0 0xA4 0 /devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,a4:fru -1 0 0xA6 0 /devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,a6:fru -1 0 0xA8 0 /devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,a8:fru -1 0 0xAA 0 /devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,aa:fru -1 0 0xAC 0 /devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,ac:fru -1 0 0xAE 0 /devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,ae:fru -1 0 0xe2 0 /devices/pci@9,700000/ebus@1/i2c@1,30/hotplug-controller@0,e2:port_0 -1 0 0xe2 1 /devices/pci@9,700000/ebus@1/i2c@1,30/hotplug-controller@0,e2:port_1 -1 0 0xe2 2 /devices/pci@9,700000/ebus@1/i2c@1,30/hotplug-controller@0,e2:port_2 -1 0 0xe2 3 /devices/pci@9,700000/ebus@1/i2c@1,30/hotplug-controller@0,e2:port_3 -1 0 0xe6 0 /devices/pci@9,700000/ebus@1/i2c@1,30/hotplug-controller@0,e6:port_0 -1 0 0xe6 1 /devices/pci@9,700000/ebus@1/i2c@1,30/hotplug-controller@0,e6:port_1 -1 0 0xe6 2 /devices/pci@9,700000/ebus@1/i2c@1,30/hotplug-controller@0,e6:port_2 -1 0 0xe6 3 /devices/pci@9,700000/ebus@1/i2c@1,30/hotplug-controller@0,e6:port_3 -1 0 0xe8 0 /devices/pci@9,700000/ebus@1/i2c@1,30/hotplug-controller@0,e8:port_0 -1 0 0xe8 1 /devices/pci@9,700000/ebus@1/i2c@1,30/hotplug-controller@0,e8:port_1 -1 0 0xe8 2 /devices/pci@9,700000/ebus@1/i2c@1,30/hotplug-controller@0,e8:port_2 -1 0 0xe8 3 /devices/pci@9,700000/ebus@1/i2c@1,30/hotplug-controller@0,e8:port_3 -1 0 0xec 0 /devices/pci@9,700000/ebus@1/i2c@1,30/hotplug-controller@0,ec:port_0 -1 0 0xec 1 /devices/pci@9,700000/ebus@1/i2c@1,30/hotplug-controller@0,ec:port_1 -1 0 0xec 2 /devices/pci@9,700000/ebus@1/i2c@1,30/hotplug-controller@0,ec:port_2 -1 0 0xec 3 /devices/pci@9,700000/ebus@1/i2c@1,30/hotplug-controller@0,ec:port_3 -2 0 0xA0 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,a0:fru -2 0 0xA2 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,a2:fru -2 0 0xA4 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,a4:fru -2 0 0xA6 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,a6:fru -2 0 0xA8 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,a8:fru -2 0 0xAA 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,aa:fru -2 0 0xAC 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,ac:fru -2 0 0xAE 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,ae:fru -2 1 0xA0 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,a0:fru -2 1 0xA2 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,a2:fru -2 1 0xA4 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,a4:fru -2 1 0xA6 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,a6:fru -2 1 0xA8 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,a8:fru -2 1 0xAA 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,aa:fru -2 1 0xAC 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,ac:fru -2 1 0xAE 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,ae:fru -2 2 0xA0 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,a0:fru -2 2 0xA2 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,a2:fru -2 2 0xA4 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,a4:fru -2 2 0xA6 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,a6:fru -2 2 0xA8 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,a8:fru -2 2 0xAA 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,aa:fru -2 2 0xAC 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,ac:fru -2 2 0xAE 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,ae:fru -2 3 0xA0 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,a0:fru -2 3 0xA2 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,a2:fru -2 3 0xA4 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,a4:fru -2 3 0xA6 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,a6:fru -2 3 0xA8 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,a8:fru -2 3 0xAA 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,aa:fru -2 3 0xAC 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,ac:fru -2 3 0xAE 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,ae:fru -2 4 0xA4 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@4,a4:fru -2 4 0xA6 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@4,a6:fru -3 0 0xA0 0 /devices/pci@9,700000/ebus@1/i2c@1,500030/nvram@0,a0:nvram -3 0 0xA2 0 /devices/pci@9,700000/ebus@1/i2c@1,500030/nvram@0,a2:nvram -DEVPATHS_END - -TABLES -TABLE -TEMP_SENSOR_CONVERSIONS 2 -160 160 160 160 160 160 160 160 -160 160 160 160 160 160 159 156 -153 150 147 145 143 140 138 136 -134 133 131 129 128 126 125 123 -122 120 119 118 117 115 114 113 -112 111 110 109 108 107 106 105 -104 103 103 102 101 100 99 98 -98 97 96 95 95 94 93 93 -92 91 91 90 89 89 88 87 -87 86 85 85 84 84 83 83 -82 81 81 80 80 79 79 78 -78 77 77 76 76 75 74 74 -74 73 73 72 72 71 71 70 -70 69 69 68 68 67 67 66 -66 65 65 65 64 64 63 63 -62 62 61 61 61 60 60 59 -59 58 58 58 57 57 56 56 -55 55 55 54 54 53 53 53 -52 52 51 51 50 50 50 49 -49 48 48 47 47 47 46 46 -45 45 44 44 44 43 43 42 -42 41 41 41 40 40 39 39 -38 38 37 37 37 36 36 35 -35 34 34 33 33 32 32 31 -31 30 30 29 29 28 28 27 -27 26 26 25 25 24 24 23 -22 22 21 21 20 20 19 18 -18 17 16 16 15 14 14 13 -12 11 11 10 9 8 7 6 - 5 4 3 2 1 0 -1 -2 --3 -5 -6 -7 -9 -11 -12 -14 --17 -19 -22 -25 -28 -33 -39 -50 -TABLE_END -TABLE -3_3V_I_CONVERSIONS 2 -0 0 0 0 1 1 1 1 -1 1 1 2 2 2 2 2 -2 2 3 3 3 3 3 3 -3 4 4 4 4 4 4 4 -5 5 5 5 5 5 5 6 -6 6 6 6 6 6 6 7 -7 7 7 7 7 7 8 8 -8 8 8 8 8 9 9 9 -9 9 9 9 10 10 10 10 -10 10 10 11 11 11 11 11 -11 11 12 12 12 12 12 12 -12 13 13 13 13 13 13 13 -14 14 14 14 14 14 14 15 -15 15 15 15 15 15 16 16 -16 16 16 16 16 17 17 17 -17 17 17 17 18 18 18 18 -18 18 18 18 19 19 19 19 -19 19 19 20 20 20 20 20 -20 20 21 21 21 21 21 21 -21 22 22 22 22 22 22 22 -23 23 23 23 23 23 23 24 -24 24 24 24 24 24 25 25 -25 25 25 25 25 26 26 26 -26 26 26 26 27 27 27 27 -27 27 27 28 28 28 28 28 -28 28 29 29 29 29 29 29 -29 30 30 30 30 30 30 30 -30 31 31 31 31 31 31 31 -32 32 32 32 32 32 32 33 -33 33 33 33 33 33 34 34 -34 34 34 34 34 35 35 35 -35 35 35 35 36 36 36 36 -36 -TABLE_END -TABLE -5V_I_CONVERSIONS 2 -0 0 0 0 0 1 1 1 -1 1 1 1 1 1 2 2 -2 2 2 2 2 2 2 3 -3 3 3 3 3 3 3 3 -4 4 4 4 4 4 4 4 -4 5 5 5 5 5 5 5 -5 5 5 6 6 6 6 6 -6 6 6 6 7 7 7 7 -7 7 7 7 7 8 8 8 -8 8 8 8 8 8 9 9 -9 9 9 9 9 9 9 10 -10 10 10 10 10 10 10 10 -11 11 11 11 11 11 11 11 -11 12 12 12 12 12 12 12 -12 12 13 13 13 13 13 13 -13 13 13 14 14 14 14 14 -14 14 14 14 14 15 15 15 -15 15 15 15 15 15 16 16 -16 16 16 16 16 16 16 17 -17 17 17 17 17 17 17 17 -18 18 18 18 18 18 18 18 -18 19 19 19 19 19 19 19 -19 19 20 20 20 20 20 20 -20 20 20 21 21 21 21 21 -21 21 21 21 22 22 22 22 -22 22 22 22 22 23 23 23 -23 23 23 23 23 23 23 24 -24 24 24 24 24 24 24 24 -25 25 25 25 25 25 25 25 -25 26 26 26 26 26 26 26 -26 26 27 27 27 27 27 27 -27 27 27 28 28 28 28 28 -28 -TABLE_END -TABLE -12V_I_CONVERSIONS 2 -0 0 0 0 0 0 0 1 -1 1 1 1 1 1 1 1 -1 1 1 2 2 2 2 2 -2 2 2 2 2 2 2 2 -3 3 3 3 3 3 3 3 -3 3 3 3 4 4 4 4 -4 4 4 4 4 4 4 4 -5 5 5 5 5 5 5 5 -5 5 5 5 5 6 6 6 -6 6 6 6 6 6 6 6 -6 7 7 7 7 7 7 7 -7 7 7 7 7 7 8 8 -8 8 8 8 8 8 8 8 -8 8 9 9 9 9 9 9 -9 9 9 9 9 9 9 10 -10 10 10 10 10 10 10 10 -10 10 10 11 11 11 11 11 -11 11 11 11 11 11 11 11 -12 12 12 12 12 12 12 12 -12 12 12 12 13 13 13 13 -13 13 13 13 13 13 13 13 -14 14 14 14 14 14 14 14 -14 14 14 14 14 15 15 15 -15 15 15 15 15 15 15 15 -15 16 16 16 16 16 16 16 -16 16 16 16 16 16 17 17 -17 17 17 17 17 17 17 17 -17 17 18 18 18 18 18 18 -18 18 18 18 18 18 18 19 -19 19 19 19 19 19 19 19 -19 19 19 20 20 20 20 20 -20 20 20 20 20 20 20 20 -20 -TABLE_END -TABLE -48V_I_CONVERSIONS 2 -0 0 0 0 0 0 0 0 -0 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 -1 1 2 2 2 2 2 2 -2 2 2 2 2 2 2 2 -2 2 2 3 3 3 3 3 -3 3 3 3 3 3 3 3 -3 3 3 3 4 4 4 4 -4 4 4 4 4 4 4 4 -4 4 4 4 4 5 5 5 -5 5 5 5 5 5 5 5 -5 5 5 5 5 5 6 6 -6 6 6 6 6 6 6 6 -6 6 6 6 6 6 6 7 -7 7 7 7 7 7 7 7 -7 7 7 7 7 7 7 7 -8 8 8 8 8 8 8 8 -8 8 8 8 8 8 8 8 -8 9 9 9 9 9 9 9 -9 9 9 9 9 9 9 9 -9 9 10 10 10 10 10 10 -10 10 10 10 10 10 10 10 -10 10 10 11 11 11 11 11 -11 11 11 11 11 11 11 11 -11 11 11 11 12 12 12 12 -12 12 12 12 12 12 12 12 -12 12 12 12 12 13 13 13 -13 13 13 13 13 13 13 13 -13 13 13 13 13 13 14 14 -14 14 14 14 14 14 14 14 -14 14 14 14 14 14 14 15 -15 15 15 15 15 15 15 15 -15 -TABLE_END -TABLES_END - -PROJECTED_PROPERTIES -CPU_0_2_MOD_CARD Temperature0 CPU0_DIE_TEMPERATURE_SENSOR Temperature -CPU_0_2_MOD_CARD Temperature1 CPU2_DIE_TEMPERATURE_SENSOR Temperature -CPU_1_3_MOD_CARD Temperature0 CPU1_DIE_TEMPERATURE_SENSOR Temperature -ZULU_1_3_MOD_CARD Temperature0 ZULU1_DIE_TEMPERATURE_SENSOR Temperature -CPU_1_3_MOD_CARD Temperature1 CPU3_DIE_TEMPERATURE_SENSOR Temperature -ZULU_1_3_MOD_CARD Temperature1 ZULU3_DIE_TEMPERATURE_SENSOR Temperature -CPU_4_6_MOD_CARD Temperature0 CPU4_DIE_TEMPERATURE_SENSOR Temperature -ZULU_4_6_MOD_CARD Temperature0 ZULU4_DIE_TEMPERATURE_SENSOR Temperature -CPU_4_6_MOD_CARD Temperature1 CPU6_DIE_TEMPERATURE_SENSOR Temperature -ZULU_4_6_MOD_CARD Temperature1 ZULU6_DIE_TEMPERATURE_SENSOR Temperature -CPU_5_7_MOD_CARD Temperature0 CPU5_DIE_TEMPERATURE_SENSOR Temperature -CPU_5_7_MOD_CARD Temperature1 CPU7_DIE_TEMPERATURE_SENSOR Temperature -CPU0_PRIM_FAN Fan-speed CPU0_PFAN_TACH AtoDSensorValue -CPU1_PRIM_FAN Fan-speed CPU1_PFAN_TACH AtoDSensorValue -CPU0_SEC_FAN Fan-speed CPU0_SFAN_TACH AtoDSensorValue -CPU1_SEC_FAN Fan-speed CPU1_SFAN_TACH AtoDSensorValue -IO0_PRIM_FAN Fan-speed IO0_PFAN_TACH AtoDSensorValue -IO1_PRIM_FAN Fan-speed IO1_PFAN_TACH AtoDSensorValue -IO0_SEC_FAN Fan-speed IO0_SFAN_TACH AtoDSensorValue -IO1_SEC_FAN Fan-speed IO1_SFAN_TACH AtoDSensorValue -IO_BRIDGE_PRIM_FAN Fan-speed IO_BRIDGE_PFAN_TACH AtoDSensorValue -IO_BRIDGE_SEC_FAN Fan-speed IO_BRIDGE_SFAN_TACH AtoDSensorValue -CPU0_SEC_FAN Fan-switch CPU_SFAN_ONOFF_SWITCH State -CPU1_SEC_FAN Fan-switch CPU_SFAN_ONOFF_SWITCH State -IO0_PRIM_FAN Fan-switch IO_PFAN_ONOFF_SWITCH State -IO1_PRIM_FAN Fan-switch IO_PFAN_ONOFF_SWITCH State -IO0_SEC_FAN Fan-switch IO_SFAN_ONOFF_SWITCH State -IO1_SEC_FAN Fan-switch IO_SFAN_ONOFF_SWITCH State -IO_BRIDGE_PRIM_FAN Fan-switch IO_BRIDGE_PFAN_ONOFF_SWITCH State -IO_BRIDGE_SEC_FAN Fan-switch IO_BRIDGE_SFAN_ONOFF_SWITCH State -CPU0_PRIM_FAN Fan-control-value CPU_PFAN_SPEED_CONTROL DtoAControlValue -CPU1_PRIM_FAN Fan-control-value CPU_PFAN_SPEED_CONTROL DtoAControlValue -IO0_PRIM_FAN Fan-control-value IO_PFAN_SPEED_CONTROL DtoAControlValue -IO1_PRIM_FAN Fan-control-value IO_PFAN_SPEED_CONTROL DtoAControlValue -PROJECTED_PROPERTIES_END diff --git a/usr/src/cmd/picl/plugins/sun4u/daktari/devtree/Makefile b/usr/src/cmd/picl/plugins/sun4u/daktari/devtree/Makefile deleted file mode 100644 index 3366386188..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/daktari/devtree/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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. -# -# lib/picl/plugins/daktari/devtree/Makefile -# -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-880 - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -install := FILEMODE = 0444 - -CONF= picldevtree.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: - -install: $(ROOTLIBDIR) $(ROOTCONF) - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/daktari/devtree/picldevtree.conf b/usr/src/cmd/picl/plugins/sun4u/daktari/devtree/picldevtree.conf deleted file mode 100644 index 1f34399797..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/daktari/devtree/picldevtree.conf +++ /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 (c) 2000 by Sun Microsystems, Inc. -# All rights reserved. -# -#ident "%Z%%M% %I% %E% SMI" -# -# Platform specific .conf file for picldevtree plug-in -fru seeprom diff --git a/usr/src/cmd/picl/plugins/sun4u/daktari/frudata/Makefile b/usr/src/cmd/picl/plugins/sun4u/daktari/frudata/Makefile deleted file mode 100644 index 70bf60f893..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/daktari/frudata/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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# cmd/picl/plugins/sun4u/daktari/frudata/Makefile -# -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-880 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONF= libpiclfrudata.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 - - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: $(CONF) - -install: $(ROOTLIBDIR) $(ROOTCONF) - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/daktari/frudata/libpiclfrudata.conf b/usr/src/cmd/picl/plugins/sun4u/daktari/frudata/libpiclfrudata.conf deleted file mode 100644 index 8d65ce2fc8..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/daktari/frudata/libpiclfrudata.conf +++ /dev/null @@ -1,292 +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 (c) 2000-2001 by Sun Microsystems, Inc. -# All rights reserved. -# -# #ident "%Z%%M% %I% %E% SMI" -# -# This file creates the FRU device paths for the FRUAccess library -# - - - - - - - - - - -VERSION 1.0 - - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=0,a0 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a0:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=0,a2 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a2:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=0,a4 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a4:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=0,a6 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a6:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=0,a8 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a8:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=0,aa -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,aa:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=0,ac -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,ac:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=0,ae -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,ae:fru" - - - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=1,a0 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a0:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=1,a2 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a2:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=1,a4 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a4:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=1,a6 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a6:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=1,a8 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a8:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=1,aa -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,aa:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=1,ac -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,ac:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=1,ae -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,ae:fru" - - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=2,a0 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a0:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=2,a2 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a2:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=2,a4 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a4:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=2,a6 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a6:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=2,a8 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a8:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=2,aa -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,aa:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=2,ac -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,ac:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=2,ae -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,ae:fru" - - - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=3,a0 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a0:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=3,a2 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a2:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=3,a4 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a4:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=3,a6 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a6:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=3,a8 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a8:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=3,aa -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,aa:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=3,ac -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,ac:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=3,ae -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,ae:fru" - - - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=4,a0 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@4,a0:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=4,a2 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@4,a2:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=4,a8 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@4,a8:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=4,aa -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@4,aa:fru" - - - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,30/fru?UnitAddress=0,a0 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,a0:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,30/fru?UnitAddress=0,a2 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,a2:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,30/fru?UnitAddress=0,a4 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,a4:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,30/fru?UnitAddress=0,a6 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,a6:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,30/fru?UnitAddress=0,a8 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,a8:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,30/fru?UnitAddress=0,aa -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,aa:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,30/fru?UnitAddress=0,ac -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,ac:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,30/fru?UnitAddress=0,ae -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,ae:fru" - - - - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=0,a0 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,a0:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=0,a2 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,a2:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=0,a4 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,a4:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=0,a6 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,a6:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=0,a8 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,a8:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=0,aa -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,aa:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=0,ac -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,ac:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=0,ae -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,ae:fru" - - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=1,a0 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,a0:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=1,a2 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,a2:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=1,a4 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,a4:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=1,a6 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,a6:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=1,a8 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,a8:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=1,aa -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,aa:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=1,ac -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,ac:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=1,ae -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,ae:fru" - - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=2,a0 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,a0:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=2,a2 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,a2:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=2,a4 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,a4:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=2,a6 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,a6:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=2,a8 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,a8:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=2,aa -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,aa:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=2,ac -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,ac:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=2,ae -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,ae:fru" - - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=3,a0 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,a0:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=3,a2 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,a2:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=3,a4 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,a4:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=3,a6 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,a6:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=3,a8 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,a8:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=3,aa -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,aa:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=3,ac -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,ac:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=3,ae -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,ae:fru" - - - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=4,a4 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@4,a4:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=4,a6 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@4,a6:fru" diff --git a/usr/src/cmd/picl/plugins/sun4u/daktari/frutree/Makefile b/usr/src/cmd/picl/plugins/sun4u/daktari/frutree/Makefile deleted file mode 100644 index b9db776128..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/daktari/frutree/Makefile +++ /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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# - -include $(SRC)/Makefile.psm - -LIBRARY= libpiclfrutree.a -VERS= .1 - -OBJECTS= piclfrutree.o - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-880 - -include $(SRC)/cmd/picl/plugins/Makefile.com - - -CPPFLAGS += -I$(SRC)/uts/sun4u/ -I$(SRC)/uts/common/ -CPPFLAGS += -I$(SRC)/lib/libdevfsevent -I$(SRC)/uts/common - -SRCS= $(OBJECTS:%.o=%.c) - -LIBS = $(DYNLIB) - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONF= piclfrutree.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 -INFOS= $(CONF:%.conf=%.info) - - -CLOBBERFILES += $(LIBLINKS) - -DEVTREE_SRC_DIR = $(SRC)/cmd/picl/plugins/common/devtree -DYNFLAGS += -R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins -LDLIBS += -L$(DEVTREE_SRC_DIR) -LDLIBS += -L$(SRC)/lib/libptree/$(MACH) -LDLIBS += -L$(SRC)/cmd/picl/plugins/common/devtree -LDLIBS += -L$(ROOT)/usr/lib/picl/plugins -LDLIBS += -lc -lpicldevtree -lpicltree -lnvpair - -.KEEP_STATE: - -SUBDIRS= - -POFILE= piclfrutree.po - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -all: $(LIBS) $(LIBLINKS) $(CONF) - -install: $(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) $(ROOTCONF) - -_msg: $(MSGDOMAIN) $(POFILE) - $(RM) $(MSGDOMAIN)/$(POFILE) - $(CP) $(POFILE) $(MSGDOMAIN)/dak_$(POFILE) - -$(MSGDOMAIN): - $(INS.dir) - -$(LIBLINKS): FRC - $(RM) $@; $(SYMLINK) $(DYNLIB) $@ - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -$(CONF): $(INFOS) - $(RM) $@ - $(CPP) piclfrutree.info >$@ - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/daktari/frutree/piclfrutree.c b/usr/src/cmd/picl/plugins/sun4u/daktari/frutree/piclfrutree.c deleted file mode 100644 index d9a2264f39..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/daktari/frutree/piclfrutree.c +++ /dev/null @@ -1,1348 +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" - -/* - * PICL plug-in that creates the FRU Hierarchy for the - * SUNW,Sun-Fire-880 (Daktari) platform - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -/* - * Plugin registration entry points - */ -static void picl_frutree_register(void); -static void picl_frutree_init(void); -static void picl_frutree_fini(void); -static void picl_frutree_evhandler(const char *ename, const void *earg, - size_t size, void *cookie); - -#pragma init(picl_frutree_register) - -/* - * Log message texts - */ -#define CREATE_FRUTREE_FAIL gettext("Failed to create frutree node\n") -#define CREATE_CHASSIS_FAIL gettext("Failed to create chassis node\n") -#define IOBRD_INIT_FAIL gettext("do_ioboard_init() failed\n") -#define RSCBRD_INIT_FAIL gettext("do_rscboard_init() failed\n") -#define FCAL_INIT_FAIL gettext("do_fcal_init() failed\n") -#define PS_INIT_FAIL gettext("do_power_supplies_init() failed\n") -#define SYSBOARD_INIT_FAIL gettext("do_motherboard_init() failed\n") - -/* - * Viewpoints property field used by SunMC - */ -#define CHASSIS_VIEWPOINTS gettext("front left right rear") - -/* - * Ref prop values - */ -#define SEEPROM_SOURCE "_seeprom_source" -#define FRU_PARENT "_fru_parent" - -/* - * List of all the FRU locations in the platform_frupath[] array, and - * location_label[] array - */ -#define IOBRD 0 -#define RSC 1 -#define FCAL0 2 -#define FCAL1 3 -#define FCALGBIC 4 -#define PDB 5 -#define PS0 6 -#define PS1 7 -#define PS2 8 -#define SYSBRD 9 -#define CPUMOD0 10 -#define CPUMOD1 11 -#define CPUMOD2 12 -#define CPUMOD3 13 -#define CPU0_DIMM0 14 -#define DIMMS_PER_MOD 8 -#define DIMMS_PER_SLOT 16 - - -/* - * Local variables - */ -static picld_plugin_reg_t my_reg_info = { - PICLD_PLUGIN_VERSION_1, - PICLD_PLUGIN_NON_CRITICAL, - "SUNW_Sun-Fire-880_frutree", - picl_frutree_init, - picl_frutree_fini -}; - -/* - * List of all the FRUs in the /platform tree with SEEPROMs - */ -static char *platform_frupath[] = { - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@4,aa", /* IO */ - "/platform/pci@9,700000/ebus@1/i2c@1,30/fru@0,a6", /* RSC */ - "/platform/pci@9,700000/ebus@1/i2c@1,30/fru@0,a8", /* FCAL 0 */ - "/platform/pci@9,700000/ebus@1/i2c@1,30/fru@0,ac", /* FCAL 1 */ - "/platform/pci@9,700000/ebus@1/i2c@1,30/fru@0,aa", /* FCAL-GBIC */ - "/platform/pci@9,700000/ebus@1/i2c@1,30/fru@0,ae", /* PDB */ - "/platform/pci@9,700000/ebus@1/i2c@1,30/fru@0,a0", /* PS 0 */ - "/platform/pci@9,700000/ebus@1/i2c@1,30/fru@0,a2", /* PS 1 */ - "/platform/pci@9,700000/ebus@1/i2c@1,30/fru@0,a4", /* PS 2 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@4,a8", /* SYS BRD */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@4,a0", /* CPU MOD 0 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@4,a2", /* CPU MOD 1 */ - "/platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@4,a4", /* CPU MOD 2 */ - "/platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@4,a6", /* CPU MOD 3 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a0", /* CPU0 DIMM0 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a2", /* CPU0 DIMM1 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a4", /* CPU0 DIMM2 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a6", /* CPU0 DIMM3 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a8", /* CPU0 DIMM4 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@0,aa", /* CPU0 DIMM5 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@0,ac", /* CPU0 DIMM6 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@0,ae", /* CPU0 DIMM7 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a0", /* CPU2 DIMM0 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a2", /* CPU2 DIMM1 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a4", /* CPU2 DIMM2 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a6", /* CPU2 DIMM3 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a8", /* CPU2 DIMM4 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@2,aa", /* CPU2 DIMM5 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@2,ac", /* CPU2 DIMM6 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@2,ae", /* CPU2 DIMM7 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a0", /* CPU1 DIMM0 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a2", /* CPU1 DIMM1 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a4", /* CPU1 DIMM2 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a6", /* CPU1 DIMM3 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a8", /* CPU1 DIMM4 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@1,aa", /* CPU1 DIMM5 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@1,ac", /* CPU1 DIMM6 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@1,ae", /* CPU1 DIMM7 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a0", /* CPU3 DIMM0 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a2", /* CPU3 DIMM1 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a4", /* CPU3 DIMM2 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a6", /* CPU3 DIMM3 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a8", /* CPU3 DIMM4 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@3,aa", /* CPU3 DIMM5 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@3,ac", /* CPU3 DIMM6 */ - "/platform/pci@9,700000/ebus@1/i2c@1,2e/fru@3,ae", /* CPU3 DIMM7 */ - "/platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,a0", /* CPU4 DIMM0 */ - "/platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,a2", /* CPU4 DIMM1 */ - "/platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,a4", /* CPU4 DIMM2 */ - "/platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,a6", /* CPU4 DIMM3 */ - "/platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,a8", /* CPU4 DIMM4 */ - "/platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,aa", /* CPU4 DIMM5 */ - "/platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,ac", /* CPU4 DIMM6 */ - "/platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,ae", /* CPU4 DIMM7 */ - "/platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,a0", /* CPU6 DIMM0 */ - "/platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,a2", /* CPU6 DIMM1 */ - "/platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,a4", /* CPU6 DIMM2 */ - "/platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,a6", /* CPU6 DIMM3 */ - "/platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,a8", /* CPU6 DIMM4 */ - "/platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,aa", /* CPU6 DIMM5 */ - "/platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,ac", /* CPU6 DIMM6 */ - "/platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,ae", /* CPU6 DIMM7 */ - "/platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,a0", /* CPU5 DIMM0 */ - "/platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,a2", /* CPU5 DIMM1 */ - "/platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,a4", /* CPU5 DIMM2 */ - "/platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,a6", /* CPU5 DIMM3 */ - "/platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,a8", /* CPU5 DIMM4 */ - "/platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,aa", /* CPU5 DIMM5 */ - "/platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,ac", /* CPU5 DIMM6 */ - "/platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,ae", /* CPU5 DIMM7 */ - "/platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,a0", /* CPU7 DIMM0 */ - "/platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,a2", /* CPU7 DIMM1 */ - "/platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,a4", /* CPU7 DIMM2 */ - "/platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,a6", /* CPU7 DIMM3 */ - "/platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,a8", /* CPU7 DIMM4 */ - "/platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,aa", /* CPU7 DIMM5 */ - "/platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,ac", /* CPU7 DIMM6 */ - "/platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,ae", /* CPU7 DIMM7 */ - NULL}; - -/* - * List of Labels for FRU locations (uses the #define's from above) - */ -static char *location_label[] = { - NULL, /* IOBRD */ - NULL, /* RSC */ - "0", /* FCAL0 */ - "1", /* FCAL1 */ - NULL, /* FCALGBIC */ - NULL, /* PDB */ - "0", /* PS0 */ - "1", /* PS1 */ - "2", /* PS2 */ - NULL, /* SYSBRD */ - "A", /* CPUMOD0 */ - "B", /* CPUMOD1 */ - "C", /* CPUMOD2 */ - "D", /* CPUMOD3 */ - "J2900", /* CPU0 DIMM0 */ - "J3100", /* CPU0 DIMM1 */ - "J2901", /* CPU0 DIMM2 */ - "J3101", /* CPU0 DIMM3 */ - "J3000", /* CPU0 DIMM4 */ - "J3200", /* CPU0 DIMM5 */ - "J3001", /* CPU0 DIMM6 */ - "J3201", /* CPU0 DIMM7 */ - "J7900", /* CPU1 DIMM0 */ - "J8100", /* CPU1 DIMM1 */ - "J7901", /* CPU1 DIMM2 */ - "J8101", /* CPU1 DIMM3 */ - "J8000", /* CPU1 DIMM4 */ - "J8200", /* CPU1 DIMM5 */ - "J8001", /* CPU1 DIMM6 */ - "J8201", /* CPU1 DIMM7 */ - "0", /* CPU0 label */ - "1", /* CPU1 label */ - NULL}; - -/* - * List of all the FRU slots for power supplies (hotpluggable) - */ -static char *frutree_power_supply[] = { - "/frutree/chassis/power-dist-board/power-supply-slot?Slot=0", - "/frutree/chassis/power-dist-board/power-supply-slot?Slot=1", - "/frutree/chassis/power-dist-board/power-supply-slot?Slot=2", - NULL}; - -/* - * List of all the FRU slots for CPU Memory modules (hotpluggable) - */ -static char *frutree_cpu_module[] = { - "/frutree/chassis/system-board/cpu-mem-slot?Slot=0", - "/frutree/chassis/system-board/cpu-mem-slot?Slot=1", - "/frutree/chassis/system-board/cpu-mem-slot?Slot=2", - "/frutree/chassis/system-board/cpu-mem-slot?Slot=3", - NULL}; - -/* PICL handle for the root node of the "frutree" */ -static picl_nodehdl_t frutreeh; - -static int do_ioboard_init(picl_nodehdl_t); -static int do_rscboard_init(picl_nodehdl_t); -static int do_fcal_init(picl_nodehdl_t); -static int do_power_supplies_init(picl_nodehdl_t); -static int do_motherboard_init(picl_nodehdl_t); -static int do_cpu_module_init(picl_nodehdl_t, int); -static int do_dimms_init(picl_nodehdl_t, int, int); - -static int add_ref_prop(picl_nodehdl_t, picl_nodehdl_t, char *); -static int add_slot_prop(picl_nodehdl_t, int); -static int add_label_prop(picl_nodehdl_t, char *); -static int add_void_fda_prop(picl_nodehdl_t); -static int add_viewpoints_prop(picl_nodehdl_t, char *); -static int add_all_nodes(); -static int remove_all_nodes(picl_nodehdl_t); - -static int add_hotplug_fru_device(void); -static int rem_hotplug_fru_device(void); -static int is_added_device(char *, char *); -static int is_removed_device(char *, char *); -static int add_power_supply(int); -static int remove_power_supply(int); -static int add_cpu_module(int); -static int remove_cpu_module(int); - -/* - * This function is executed as part of .init when the plugin is - * dlopen()ed - */ -static void -picl_frutree_register() -{ - (void) picld_plugin_register(&my_reg_info); -} - -/* - * This function is the init entry point of the plugin. - * It initializes the /frutree tree - */ -static void -picl_frutree_init() -{ - int err; - - err = add_all_nodes(); - if (err != PICL_SUCCESS) { - (void) remove_all_nodes(frutreeh); - return; - } - - /* Register the event handler routine */ - (void) ptree_register_handler(PICLEVENT_SYSEVENT_DEVICE_ADDED, - picl_frutree_evhandler, NULL); - (void) ptree_register_handler(PICLEVENT_SYSEVENT_DEVICE_REMOVED, - picl_frutree_evhandler, NULL); -} - -/* - * This function is the fini entry point of the plugin - */ -static void -picl_frutree_fini(void) -{ - /* Unregister the event handler routine */ - (void) ptree_unregister_handler(PICLEVENT_SYSEVENT_DEVICE_ADDED, - picl_frutree_evhandler, NULL); - (void) ptree_unregister_handler(PICLEVENT_SYSEVENT_DEVICE_REMOVED, - picl_frutree_evhandler, NULL); - - (void) remove_all_nodes(frutreeh); -} - -/* - * This function is the event handler of this plug-in. - * - * It processes the following events: - * - * PICLEVENT_SYSEVENT_DEVICE_ADDED - * PICLEVENT_SYSEVENT_DEVICE_REMOVED - */ -/* ARGSUSED */ -static void -picl_frutree_evhandler(const char *ename, const void *earg, size_t size, - void *cookie) -{ - if (strcmp(ename, PICLEVENT_SYSEVENT_DEVICE_ADDED) == 0) { - /* Check for and add any hotplugged device(s) */ - (void) add_hotplug_fru_device(); - - } else if (strcmp(ename, PICLEVENT_SYSEVENT_DEVICE_REMOVED) == 0) { - /* Check for and remove any hotplugged device(s) */ - (void) rem_hotplug_fru_device(); - } -} - -/* Initializes the FRU nodes for the IO board */ -static int -do_ioboard_init(picl_nodehdl_t rooth) -{ - picl_nodehdl_t iobrdh; - picl_nodehdl_t tmph; - int err; - - /* Create the node for the IO board (if it exists) */ - if (ptree_get_node_by_path(platform_frupath[IOBRD], &tmph) == - PICL_SUCCESS) { - err = ptree_create_node("io-board", "fru", &iobrdh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(iobrdh, tmph, SEEPROM_SOURCE); - if (err != PICL_SUCCESS) - return (err); - - err = add_void_fda_prop(iobrdh); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_add_node(rooth, iobrdh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(tmph, iobrdh, FRU_PARENT); - if (err != PICL_SUCCESS) - return (err); - } - return (PICL_SUCCESS); -} - -/* Initializes the FRU node for the RSC card */ -static int -do_rscboard_init(picl_nodehdl_t rooth) -{ - picl_nodehdl_t rscbrdh; - picl_nodehdl_t tmph; - int err; - - /* Create the node for the RSC board (if it exists) */ - if (ptree_get_node_by_path(platform_frupath[RSC], &tmph) == - PICL_SUCCESS) { - err = ptree_create_node("rsc-board", "fru", &rscbrdh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(rscbrdh, tmph, SEEPROM_SOURCE); - if (err != PICL_SUCCESS) - return (err); - - err = add_void_fda_prop(rscbrdh); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_add_node(rooth, rscbrdh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(tmph, rscbrdh, FRU_PARENT); - if (err != PICL_SUCCESS) - return (err); - } - return (PICL_SUCCESS); -} - -/* Initializes the FRU nodes for the FCAL backplanes and GBIC card */ -static int -do_fcal_init(picl_nodehdl_t rooth) -{ - picl_nodehdl_t fcalsloth; - picl_nodehdl_t fcalmodh; - picl_nodehdl_t fcalgbich; - picl_nodehdl_t tmph; - int i, err, slotnum; - - for (i = FCAL0; i <= FCAL1; i++) { - /* Create the node for the FCAL backplane slot */ - err = ptree_create_node("fcal-backplane-slot", - "location", &fcalsloth); - if (err != PICL_SUCCESS) - return (err); - - slotnum = i - FCAL0; - err = add_slot_prop(fcalsloth, slotnum); - if (err != PICL_SUCCESS) - return (err); - - err = add_label_prop(fcalsloth, location_label[i]); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_add_node(rooth, fcalsloth); - if (err != PICL_SUCCESS) - return (err); - - /* If the FCAL backplane exists, create a node for it */ - if (ptree_get_node_by_path(platform_frupath[i], &tmph) == - PICL_SUCCESS) { - err = ptree_create_node("fcal-backplane", "fru", - &fcalmodh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(fcalmodh, tmph, SEEPROM_SOURCE); - if (err != PICL_SUCCESS) - return (err); - - err = add_void_fda_prop(fcalmodh); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_add_node(fcalsloth, fcalmodh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(tmph, fcalmodh, FRU_PARENT); - if (err != PICL_SUCCESS) - return (err); - } - } - - /* If the FCAL GBIC board exists, create a node for it */ - if (ptree_get_node_by_path(platform_frupath[FCALGBIC], &tmph) == - PICL_SUCCESS) { - err = ptree_create_node("fcal-gbic-board", "fru", - &fcalgbich); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(fcalgbich, tmph, SEEPROM_SOURCE); - if (err != PICL_SUCCESS) - return (err); - - err = add_void_fda_prop(fcalgbich); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_add_node(rooth, fcalgbich); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(tmph, fcalgbich, FRU_PARENT); - if (err != PICL_SUCCESS) - return (err); - } - return (PICL_SUCCESS); -} - -/* Initializes the FRU nodes for the PDB and the power supplies */ -static int -do_power_supplies_init(picl_nodehdl_t rooth) -{ - picl_nodehdl_t powerbrdh; - picl_nodehdl_t powersloth; - picl_nodehdl_t powermodh; - picl_nodehdl_t tmph; - int i, err, slotnum; - - /* Create the node for the PDB (if it exists) */ - if (ptree_get_node_by_path(platform_frupath[PDB], &tmph) == - PICL_SUCCESS) { - err = ptree_create_node("power-dist-board", "fru", &powerbrdh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(powerbrdh, tmph, SEEPROM_SOURCE); - if (err != PICL_SUCCESS) - return (err); - - err = add_void_fda_prop(powerbrdh); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_add_node(rooth, powerbrdh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(tmph, powerbrdh, FRU_PARENT); - if (err != PICL_SUCCESS) - return (err); - - for (i = PS0; i <= PS2; i++) { - /* Create the node for the power supply slot */ - err = ptree_create_node("power-supply-slot", - "location", &powersloth); - if (err != PICL_SUCCESS) - return (err); - - slotnum = i - PS0; - err = add_slot_prop(powersloth, slotnum); - if (err != PICL_SUCCESS) - return (err); - - err = add_label_prop(powersloth, location_label[i]); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_add_node(powerbrdh, powersloth); - if (err != PICL_SUCCESS) - return (err); - - /* If the PS exists, create a node for it */ - if (ptree_get_node_by_path(platform_frupath[i], - &tmph) == PICL_SUCCESS) { - err = ptree_create_node("power-supply", - "fru", &powermodh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(powermodh, tmph, - SEEPROM_SOURCE); - if (err != PICL_SUCCESS) - return (err); - - err = add_void_fda_prop(powermodh); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_add_node(powersloth, powermodh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(tmph, powermodh, FRU_PARENT); - if (err != PICL_SUCCESS) - return (err); - } - } - } - return (PICL_SUCCESS); -} - -/* Initializes the FRU nodes for the motherboard and CPU Memory modules */ -static int -do_motherboard_init(picl_nodehdl_t rooth) -{ - picl_nodehdl_t sysboardh; - picl_nodehdl_t cpumemsloth; - picl_nodehdl_t cpumemmodh; - picl_nodehdl_t tmph; - int i, err, slotnum; - - /* Create the node for the system board (if it exists) */ - if (ptree_get_node_by_path(platform_frupath[SYSBRD], &tmph) == - PICL_SUCCESS) { - err = ptree_create_node("system-board", "fru", - &sysboardh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(sysboardh, tmph, SEEPROM_SOURCE); - if (err != PICL_SUCCESS) - return (err); - - err = add_void_fda_prop(sysboardh); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_add_node(rooth, sysboardh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(tmph, sysboardh, FRU_PARENT); - if (err != PICL_SUCCESS) - return (err); - - for (i = CPUMOD0; i <= CPUMOD3; i++) { - /* Create the node for the CPU Memory slot */ - err = ptree_create_node("cpu-mem-slot", "location", - &cpumemsloth); - if (err != PICL_SUCCESS) - return (err); - - slotnum = i - CPUMOD0; - err = add_slot_prop(cpumemsloth, slotnum); - if (err != PICL_SUCCESS) - return (err); - - err = add_label_prop(cpumemsloth, location_label[i]); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_add_node(sysboardh, cpumemsloth); - if (err != PICL_SUCCESS) - return (err); - - /* If CPU Mem module exists, create a node for it */ - if (ptree_get_node_by_path(platform_frupath[i], - &tmph) == PICL_SUCCESS) { - err = ptree_create_node("cpu-mem-module", - "fru", &cpumemmodh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(cpumemmodh, tmph, - SEEPROM_SOURCE); - if (err != PICL_SUCCESS) - return (err); - - err = add_void_fda_prop(cpumemmodh); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_add_node(cpumemsloth, cpumemmodh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(tmph, cpumemmodh, - FRU_PARENT); - if (err != PICL_SUCCESS) - return (err); - - err = do_cpu_module_init(cpumemmodh, slotnum); - if (err != PICL_SUCCESS) - return (err); - } - } - } - return (PICL_SUCCESS); -} - -/* Creates the FRU nodes for the CPU Module and associated DIMMs */ -static int -do_cpu_module_init(picl_nodehdl_t rooth, int slot) -{ - picl_nodehdl_t cpumodh; - int i, c, err; - - for (i = 0; i <= 1; i++) { - err = ptree_create_node("cpu-module", "location", - &cpumodh); - if (err != PICL_SUCCESS) - return (err); - - err = add_slot_prop(cpumodh, i); - if (err != PICL_SUCCESS) - return (err); - - c = CPU0_DIMM0 + DIMMS_PER_SLOT + i; - - err = add_label_prop(cpumodh, location_label[c]); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_add_node(rooth, cpumodh); - if (err != PICL_SUCCESS) - return (err); - - /* Create the nodes for the memory (if they exist) */ - err = do_dimms_init(cpumodh, slot, i); - if (err != PICL_SUCCESS) - return (err); - } - return (PICL_SUCCESS); -} - -/* Creates the FRU nodes for the DIMMs on a particular CPU Module */ -static int -do_dimms_init(picl_nodehdl_t rooth, int slot, int module) -{ - picl_nodehdl_t dimmsloth; - picl_nodehdl_t dimmmodh; - picl_nodehdl_t tmph; - int i, c, l, err; - - for (i = 0; i < DIMMS_PER_MOD; i++) { - /* Create the node for the memory slot */ - err = ptree_create_node("dimm-slot", "location", - &dimmsloth); - if (err != PICL_SUCCESS) - return (err); - - err = add_slot_prop(dimmsloth, i); - if (err != PICL_SUCCESS) - return (err); - - c = ((slot * DIMMS_PER_SLOT) + - (module * DIMMS_PER_MOD) + i) + CPU0_DIMM0; - - l = c - (DIMMS_PER_SLOT * slot); - - err = add_label_prop(dimmsloth, location_label[l]); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_add_node(rooth, dimmsloth); - if (err != PICL_SUCCESS) - return (err); - - /* If the memory module exists, create a node for it */ - if (ptree_get_node_by_path(platform_frupath[c], &tmph) == - PICL_SUCCESS) { - err = ptree_create_node("dimm-module", "fru", - &dimmmodh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(dimmmodh, tmph, SEEPROM_SOURCE); - if (err != PICL_SUCCESS) - return (err); - - err = add_void_fda_prop(dimmmodh); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_add_node(dimmsloth, dimmmodh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(tmph, dimmmodh, FRU_PARENT); - if (err != PICL_SUCCESS) - return (err); - } - } - return (PICL_SUCCESS); -} - -/* Creates a "reference" property between two PICL nodes */ -static int -add_ref_prop(picl_nodehdl_t nodeh, picl_nodehdl_t tmph, char *str) -{ - picl_prophdl_t proph; - ptree_propinfo_t propinfo; - int err; - - if (str == NULL) - return (PICL_FAILURE); - - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_REFERENCE, PICL_READ, sizeof (picl_nodehdl_t), - str, NULL, NULL); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_create_and_add_prop(nodeh, &propinfo, &tmph, &proph); - if (err != PICL_SUCCESS) - return (err); - - return (PICL_SUCCESS); -} - -/* Creates a "slot" property for a given PICL node */ -static int -add_slot_prop(picl_nodehdl_t nodeh, int slotnum) -{ - picl_prophdl_t proph; - ptree_propinfo_t propinfo; - int err; - - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_INT, PICL_READ, 4, "Slot", NULL, NULL); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_create_and_add_prop(nodeh, &propinfo, &slotnum, &proph); - if (err != PICL_SUCCESS) - return (err); - - return (PICL_SUCCESS); -} - -/* Creates a "Label" property for a given PICL node */ -static int -add_label_prop(picl_nodehdl_t nodeh, char *label) -{ - picl_prophdl_t proph; - ptree_propinfo_t propinfo; - int err; - - if (label == NULL) - return (PICL_FAILURE); - - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_CHARSTRING, PICL_READ, strlen(label)+1, "Label", - NULL, NULL); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_create_and_add_prop(nodeh, &propinfo, label, &proph); - if (err != PICL_SUCCESS) - return (err); - - return (PICL_SUCCESS); -} - -/* Creates a "FRUDataAvailable" void property for the given PICL node */ -static int -add_void_fda_prop(picl_nodehdl_t nodeh) -{ - picl_prophdl_t proph; - ptree_propinfo_t propinfo; - int err; - - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_VOID, PICL_READ, 0, "FRUDataAvailable", NULL, NULL); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_create_and_add_prop(nodeh, &propinfo, NULL, &proph); - if (err != PICL_SUCCESS) - return (err); - - return (PICL_SUCCESS); -} - -/* Creates a "ViewPoints" property -- used for chassis */ -static int -add_viewpoints_prop(picl_nodehdl_t nodeh, char *string) -{ - picl_prophdl_t proph; - ptree_propinfo_t propinfo; - int err; - - if (string == NULL) - return (PICL_FAILURE); - - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_CHARSTRING, PICL_READ, strlen(string)+1, "ViewPoints", - NULL, NULL); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_create_and_add_prop(nodeh, &propinfo, string, &proph); - if (err != PICL_SUCCESS) - return (err); - - return (PICL_SUCCESS); -} - -/* Creates and adds all of the frutree nodes */ -static int -add_all_nodes() -{ - picl_nodehdl_t rooth; - picl_nodehdl_t chassish; - int err; - - /* Get the root node of the PICL tree */ - err = ptree_get_root(&rooth); - if (err != PICL_SUCCESS) { - return (err); - } - - /* Create and add the root node of the FRU subtree */ - err = ptree_create_and_add_node(rooth, "frutree", "picl", &frutreeh); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, CREATE_FRUTREE_FAIL); - return (err); - } - - /* Create and add the chassis node */ - err = ptree_create_and_add_node(frutreeh, "chassis", "fru", &chassish); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, CREATE_CHASSIS_FAIL); - return (err); - } - - /* Add ViewPoints prop to chassis node */ - err = add_viewpoints_prop(chassish, CHASSIS_VIEWPOINTS); - if (err != PICL_SUCCESS) - return (err); - - /* Initialize the FRU nodes for the IO board */ - err = do_ioboard_init(chassish); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, IOBRD_INIT_FAIL); - return (err); - } - - /* Initialize the FRU node for the RSC card */ - err = do_rscboard_init(chassish); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, RSCBRD_INIT_FAIL); - return (err); - } - - /* Initialize the FRU nodes for the FCAL backplanes and GBIC board */ - err = do_fcal_init(chassish); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, FCAL_INIT_FAIL); - return (err); - } - - /* Initialize the FRU nodes for the PDB and the power supplies */ - err = do_power_supplies_init(chassish); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, PS_INIT_FAIL); - return (err); - } - - /* Initialize the FRU nodes for the CPU Memory modules */ - err = do_motherboard_init(chassish); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, SYSBOARD_INIT_FAIL); - return (err); - } - - return (PICL_SUCCESS); -} - -/* Deletes and destroys all PICL nodes for which rooth is a ancestor */ -static int -remove_all_nodes(picl_nodehdl_t rooth) -{ - picl_nodehdl_t chdh; - int err, done = 0; - - while (!done) { - err = ptree_get_propval_by_name(rooth, PICL_PROP_CHILD, &chdh, - sizeof (picl_nodehdl_t)); - if (err != PICL_PROPNOTFOUND) { - (void) remove_all_nodes(chdh); - } else { - err = ptree_delete_node(rooth); - if (err != PICL_SUCCESS) { - return (err); - } else { - (void) ptree_destroy_node(rooth); - } - done = 1; - } - } - return (PICL_SUCCESS); -} - -/* Searches the list of hotpluggable FRUs, adds the appropriate node(s) */ -static int -add_hotplug_fru_device() -{ - int i, err, slotnum; - - /* Check for hotplugged power supplies */ - for (i = PS0; i <= PS2; i++) { - /* Compare the /platform tree to the frutree */ - slotnum = i - PS0; - err = is_added_device(platform_frupath[i], - frutree_power_supply[slotnum]); - if (err != PICL_SUCCESS) - continue; - - /* If they are different, then add a power supply */ - err = add_power_supply(slotnum); - if (err != PICL_SUCCESS) - continue; - } - - /* Check for hotplugged CPU Memory modules */ - for (i = CPUMOD0; i <= CPUMOD3; i++) { - /* Compare the /platform tree to the frutree */ - slotnum = i - CPUMOD0; - err = is_added_device(platform_frupath[i], - frutree_cpu_module[slotnum]); - if (err != PICL_SUCCESS) - continue; - - /* If they are different, then add a CPU Mem module */ - err = add_cpu_module(slotnum); - if (err != PICL_SUCCESS) - continue; - } - return (PICL_SUCCESS); -} - -/* Searches the list of hotpluggable FRUs, removes the appropriate node(s) */ -static int -rem_hotplug_fru_device() -{ - int i, err, slotnum; - - /* Check for hotplugged power supplies */ - for (i = PS0; i <= PS2; i++) { - /* Compare the /platform tree to the frutree */ - slotnum = i - PS0; - err = is_removed_device(platform_frupath[i], - frutree_power_supply[slotnum]); - if (err != PICL_SUCCESS) - continue; - - /* If they are different, then remove a power supply */ - err = remove_power_supply(slotnum); - if (err != PICL_SUCCESS) - continue; - } - - /* Check for hotplugged CPU Memory modules */ - for (i = CPUMOD0; i <= CPUMOD3; i++) { - /* Compare the /platform tree to the frutree */ - slotnum = i - CPUMOD0; - err = is_removed_device(platform_frupath[i], - frutree_cpu_module[slotnum]); - if (err != PICL_SUCCESS) - continue; - - /* If they are different, then remove a CPU Mem module */ - err = remove_cpu_module(slotnum); - if (err != PICL_SUCCESS) - continue; - } - return (PICL_SUCCESS); -} - -/* - * Compare the /platform tree to the /frutree to determine if a - * new device has been added - */ -static int -is_added_device(char *plat, char *fru) -{ - int err; - picl_nodehdl_t plath, frusloth, frumodh; - - /* Check for node in the /platform tree */ - err = ptree_get_node_by_path(plat, &plath); - if (err != PICL_SUCCESS) - return (err); - - /* - * The node is in /platform, so find the corresponding slot in - * the frutree - */ - err = ptree_get_node_by_path(fru, &frusloth); - if (err != PICL_SUCCESS) - return (err); - - /* - * If the slot in the frutree has a child, then return - * PICL_FAILURE. This means that the /platform tree and - * the frutree are consistent and no action is necessary. - * Otherwise return PICL_SUCCESS to indicate that a node needs - * to be added to the frutree - */ - err = ptree_get_propval_by_name(frusloth, PICL_PROP_CHILD, - &frumodh, sizeof (picl_nodehdl_t)); - if (err == PICL_SUCCESS) - return (PICL_FAILURE); - - return (PICL_SUCCESS); -} - -/* - * Compare the /platform tree to the /frutree to determine if a - * device has been removed - */ -static int -is_removed_device(char *plat, char *fru) -{ - int err; - picl_nodehdl_t plath, frusloth, frumodh; - - - /* Check for node in /platform tree */ - err = ptree_get_node_by_path(plat, &plath); - if (err == PICL_SUCCESS) - return (PICL_FAILURE); - - /* - * The node is not in /platform, so find the corresponding slot in - * the frutree - */ - err = ptree_get_node_by_path(fru, &frusloth); - if (err != PICL_SUCCESS) - return (err); - - /* - * If the slot in the frutree does not have a child, then return - * PICL_FAILURE. This means that the /platform tree and - * the frutree are consistent and no action is necessary. - * Otherwise return PICL_SUCCESS to indicate that the needs - * to be removed from the frutree - */ - err = ptree_get_propval_by_name(frusloth, PICL_PROP_CHILD, - &frumodh, sizeof (picl_nodehdl_t)); - if (err != PICL_SUCCESS) - return (err); - - return (PICL_SUCCESS); -} - -static int -remove_picl_node(picl_nodehdl_t nodeh) -{ - int err; - err = ptree_delete_node(nodeh); - if (err != PICL_SUCCESS) - return (err); - (void) ptree_destroy_node(nodeh); - return (PICL_SUCCESS); -} - -/* event completion handler for PICL_FRU_ADDED/PICL_FRU_REMOVED events */ -/*ARGSUSED2*/ -static void -frudr_completion_handler(char *ename, void *earg, size_t size) -{ - picl_nodehdl_t fruh; - - if (strcmp(ename, PICL_FRU_REMOVED) == 0) { - /* - * now frudata has been notified that the node is to be - * removed, we can actually remove it - */ - fruh = NULL; - (void) nvlist_lookup_uint64(earg, - PICLEVENTARG_FRUHANDLE, &fruh); - if (fruh != NULL) { - (void) remove_picl_node(fruh); - } - } - nvlist_free(earg); - free(earg); - free(ename); -} - -/* - * Post the PICL_FRU_ADDED/PICL_FRU_REMOVED event - */ -static void -post_frudr_event(char *ename, picl_nodehdl_t parenth, picl_nodehdl_t fruh) -{ - nvlist_t *nvl; - char *ev_name; - - ev_name = strdup(ename); - if (ev_name == NULL) - return; - if (nvlist_alloc(&nvl, NV_UNIQUE_NAME_TYPE, NULL)) { - free(ev_name); - return; - } - if (parenth != 0L && - nvlist_add_uint64(nvl, PICLEVENTARG_PARENTHANDLE, parenth)) { - free(ev_name); - nvlist_free(nvl); - return; - } - if (fruh != 0L && - nvlist_add_uint64(nvl, PICLEVENTARG_FRUHANDLE, fruh)) { - free(ev_name); - nvlist_free(nvl); - return; - } - if (ptree_post_event(ev_name, nvl, sizeof (nvl), - frudr_completion_handler) != 0) { - free(ev_name); - nvlist_free(nvl); - } -} - -/* Hotplug routine used to add a new power supply */ -static int -add_power_supply(int slotnum) -{ - picl_nodehdl_t powersloth; - picl_nodehdl_t powermodh; - picl_nodehdl_t tmph; - int i, err; - - /* Find the node for the given power supply slot */ - if (ptree_get_node_by_path(frutree_power_supply[slotnum], - &powersloth) == PICL_SUCCESS) { - - i = slotnum + PS0; - - /* Make sure it's in /platform and create the frutree node */ - if (ptree_get_node_by_path(platform_frupath[i], &tmph) == - PICL_SUCCESS) { - err = ptree_create_node("power-supply", "fru", - &powermodh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(powermodh, tmph, SEEPROM_SOURCE); - if (err != PICL_SUCCESS) - return (err); - - err = add_void_fda_prop(powermodh); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_add_node(powersloth, powermodh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(tmph, powermodh, FRU_PARENT); - if (err != PICL_SUCCESS) - return (err); - - /* Post picl-fru-added event */ - post_frudr_event(PICL_FRU_ADDED, NULL, powermodh); - } - } - return (PICL_SUCCESS); -} - -/* Hotplug routine used to remove an existing power supply */ -static int -remove_power_supply(int slotnum) -{ - picl_nodehdl_t powersloth; - picl_nodehdl_t powermodh; - int err; - - /* Find the node for the given power supply slot */ - if (ptree_get_node_by_path(frutree_power_supply[slotnum], - &powersloth) == PICL_SUCCESS) { - /* Make sure it's got a child, then delete it */ - err = ptree_get_propval_by_name(powersloth, PICL_PROP_CHILD, - &powermodh, sizeof (picl_nodehdl_t)); - if (err != PICL_SUCCESS) { - return (err); - } - - err = ptree_delete_node(powermodh); - if (err != PICL_SUCCESS) { - return (err); - } else { - (void) ptree_destroy_node(powermodh); - } - - /* Post picl-fru-removed event */ - post_frudr_event(PICL_FRU_REMOVED, NULL, powermodh); - - } - return (PICL_SUCCESS); -} - -/* Hotplug routine used to add a new CPU Mem Module (with associated DIMMs) */ -static int -add_cpu_module(int slotnum) -{ - picl_nodehdl_t cpumemsloth; - picl_nodehdl_t cpumemmodh; - picl_nodehdl_t tmph; - int i, err; - - /* Find the node for the given CPU Memory module slot */ - if (ptree_get_node_by_path(frutree_cpu_module[slotnum], - &cpumemsloth) == PICL_SUCCESS) { - - i = slotnum + CPUMOD0; - - /* Make sure it's in /platform and create the frutree nodes */ - if (ptree_get_node_by_path(platform_frupath[i], &tmph) == - PICL_SUCCESS) { - err = ptree_create_node("cpu-mem-module", "fru", - &cpumemmodh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(cpumemmodh, tmph, SEEPROM_SOURCE); - if (err != PICL_SUCCESS) - return (err); - - err = add_void_fda_prop(cpumemmodh); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_add_node(cpumemsloth, cpumemmodh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(tmph, cpumemmodh, FRU_PARENT); - if (err != PICL_SUCCESS) - return (err); - } - - err = do_cpu_module_init(cpumemmodh, slotnum); - if (err != PICL_SUCCESS) - return (err); - } - return (PICL_SUCCESS); -} - -/* Hotplug routine used to remove an existing CPU Mem Module */ -static int -remove_cpu_module(int slotnum) -{ - picl_nodehdl_t cpumemsloth; - picl_nodehdl_t cpumemmodh; - int err; - - /* Find the node for the given CPU Memory module slot */ - if (ptree_get_node_by_path(frutree_cpu_module[slotnum], - &cpumemsloth) == PICL_SUCCESS) { - /* Make sure it's got a child, then delete it */ - err = ptree_get_propval_by_name(cpumemsloth, PICL_PROP_CHILD, - &cpumemmodh, sizeof (picl_nodehdl_t)); - if (err != PICL_SUCCESS) { - return (err); - } - - err = remove_all_nodes(cpumemmodh); - if (err != PICL_SUCCESS) { - return (err); - } - } - return (PICL_SUCCESS); -} diff --git a/usr/src/cmd/picl/plugins/sun4u/daktari/frutree/piclfrutree.info b/usr/src/cmd/picl/plugins/sun4u/daktari/frutree/piclfrutree.info deleted file mode 100644 index 8d608b8a73..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/daktari/frutree/piclfrutree.info +++ /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, 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" - -/* - * This is a fragment of a config file, used by FMD as a temporary measure for - * serial number retrieval. PICL frutree generation for daktari is handled - * by the daktari-specific libpiclfrutree.so. - */ - -name:/frutree/chassis/system-board/cpu-mem-slot?Label=A/mem-slot?Label=J2900 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a0 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=A/mem-slot?Label=J3100 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a2 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=A/mem-slot?Label=J2901 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a4 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=A/mem-slot?Label=J3101 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a6 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=A/mem-slot?Label=J3000 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a8 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=A/mem-slot?Label=J3200 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@0,aa -name:/frutree/chassis/system-board/cpu-mem-slot?Label=A/mem-slot?Label=J3001 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@0,ac -name:/frutree/chassis/system-board/cpu-mem-slot?Label=A/mem-slot?Label=J3201 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@0,ae -name:/frutree/chassis/system-board/cpu-mem-slot?Label=A/mem-slot?Label=J7900 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a0 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=A/mem-slot?Label=J8100 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a2 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=A/mem-slot?Label=J7901 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a4 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=A/mem-slot?Label=J8101 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a6 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=A/mem-slot?Label=J8000 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a8 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=A/mem-slot?Label=J8200 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@2,aa -name:/frutree/chassis/system-board/cpu-mem-slot?Label=A/mem-slot?Label=J8001 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@2,ac -name:/frutree/chassis/system-board/cpu-mem-slot?Label=A/mem-slot?Label=J8201 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@2,ae -name:/frutree/chassis/system-board/cpu-mem-slot?Label=B/mem-slot?Label=J2900 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a0 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=B/mem-slot?Label=J3100 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a2 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=B/mem-slot?Label=J2901 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a4 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=B/mem-slot?Label=J3101 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a6 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=B/mem-slot?Label=J3000 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a8 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=B/mem-slot?Label=J3200 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@1,aa -name:/frutree/chassis/system-board/cpu-mem-slot?Label=B/mem-slot?Label=J3001 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@1,ac -name:/frutree/chassis/system-board/cpu-mem-slot?Label=B/mem-slot?Label=J3201 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@1,ae -name:/frutree/chassis/system-board/cpu-mem-slot?Label=B/mem-slot?Label=J7900 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a0 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=B/mem-slot?Label=J8100 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a2 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=B/mem-slot?Label=J7901 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a4 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=B/mem-slot?Label=J8101 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a6 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=B/mem-slot?Label=J8000 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a8 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=B/mem-slot?Label=J8200 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@3,aa -name:/frutree/chassis/system-board/cpu-mem-slot?Label=B/mem-slot?Label=J8001 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@3,ac -name:/frutree/chassis/system-board/cpu-mem-slot?Label=B/mem-slot?Label=J8201 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,2e/fru@3,ae -name:/frutree/chassis/system-board/cpu-mem-slot?Label=C/mem-slot?Label=J2900 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,a0 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=C/mem-slot?Label=J3100 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,a2 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=C/mem-slot?Label=J2901 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,a4 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=C/mem-slot?Label=J3101 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,a6 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=C/mem-slot?Label=J3000 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,a8 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=C/mem-slot?Label=J3200 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,aa -name:/frutree/chassis/system-board/cpu-mem-slot?Label=C/mem-slot?Label=J3001 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,ac -name:/frutree/chassis/system-board/cpu-mem-slot?Label=C/mem-slot?Label=J3201 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,ae -name:/frutree/chassis/system-board/cpu-mem-slot?Label=C/mem-slot?Label=J7900 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,a0 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=C/mem-slot?Label=J8100 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,a2 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=C/mem-slot?Label=J7901 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,a4 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=C/mem-slot?Label=J8101 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,a6 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=C/mem-slot?Label=J8000 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,a8 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=C/mem-slot?Label=J8200 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,aa -name:/frutree/chassis/system-board/cpu-mem-slot?Label=C/mem-slot?Label=J8001 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,ac -name:/frutree/chassis/system-board/cpu-mem-slot?Label=C/mem-slot?Label=J8201 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,ae -name:/frutree/chassis/system-board/cpu-mem-slot?Label=D/mem-slot?Label=J2900 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,a0 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=D/mem-slot?Label=J3100 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,a2 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=D/mem-slot?Label=J2901 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,a4 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=D/mem-slot?Label=J3101 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,a6 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=D/mem-slot?Label=J3000 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,a8 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=D/mem-slot?Label=J3200 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,aa -name:/frutree/chassis/system-board/cpu-mem-slot?Label=D/mem-slot?Label=J3001 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,ac -name:/frutree/chassis/system-board/cpu-mem-slot?Label=D/mem-slot?Label=J3201 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,ae -name:/frutree/chassis/system-board/cpu-mem-slot?Label=D/mem-slot?Label=J7900 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,a0 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=D/mem-slot?Label=J8100 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,a2 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=D/mem-slot?Label=J7901 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,a4 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=D/mem-slot?Label=J8101 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,a6 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=D/mem-slot?Label=J8000 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,a8 -name:/frutree/chassis/system-board/cpu-mem-slot?Label=D/mem-slot?Label=J8200 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,aa -name:/frutree/chassis/system-board/cpu-mem-slot?Label=D/mem-slot?Label=J8001 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,ac -name:/frutree/chassis/system-board/cpu-mem-slot?Label=D/mem-slot?Label=J8201 - REFNODE mem-module fru WITH /platform/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,ae diff --git a/usr/src/cmd/picl/plugins/sun4u/daktari/psvcplugin/Makefile b/usr/src/cmd/picl/plugins/sun4u/daktari/psvcplugin/Makefile deleted file mode 100644 index d11703da64..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/daktari/psvcplugin/Makefile +++ /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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# - -LIBRARY= libpsvcplugin_psr.a -VERS= .1 - -OBJECTS= psvcplugin.o - -# include library definitions -include $(SRC)/lib/Makefile.lib -include $(SRC)/Makefile.psm - -include $(SRC)/cmd/picl/plugins/Makefile.com - -SRCS= $(OBJECTS:%.o=%.c) - -LIBS = $(DYNLIB) - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-880 -DYNFLAGS_PLAT = /usr/platform/\$$PLATFORM/lib/picl/plugins -DYNFLAGS_SUN4U = /usr/platform/sun4u/lib/picl/plugins:/usr/platform/sun4u/lib -DYNFLAGS_COM = /usr/lib/picl/plugins - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CPPFLAGS += -I$(SRC)/uts/sun4u -CPPFLAGS += -I$(SRC)/cmd/picl/plugins/sun4u/psvc/psvcobj - -LDLIBS += -L$(SRC)/lib/libpicl/$(MACH) -L$(SRC)/lib/libpicltree/$(MACH) -LDLIBS += -L$(SRC)/cmd/picl/plugins/sun4u/psvc/psvcobj -LDLIBS += -L$(SRC)/cmd/picl/plugins/sun4u/psvc/psvcplugin -DYNFLAGS += -R$(DYNFLAGS_PLAT):$(DYNFLAGS_SUN4U):$(DYNFLAGS_COM) - -LDLIBS += -lc -lpicltree -lpicl -lpsvcobj -lpsvcplugin - -.KEEP_STATE: - -SUBDIRS= - -POFILE= psvcplugin.po -POFILE_RENAME= psvcplugin_dak.po - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -all: $(LIBS) $(LIBLINKS) - -install: all $(ROOTLIBDIR) $(ROOTLIBS) $(ROOTLINKS) - -_msg: $(MSGDOMAIN) $(POFILE) - $(RM) $(MSGDOMAIN)/$(POFILE) - $(CP) $(POFILE) $(MSGDOMAIN)/$(POFILE_RENAME) - -$(MSGDOMAIN): - $(INS.dir) - -$(LIBLINKS): FRC - $(RM) $(LIBLINKS); $(SYMLINK) $(DYNLIB) $(LIBLINKS) - -# include library targets -include $(SRC)/cmd/picl/plugins/Makefile.targ -include $(SRC)/lib/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/daktari/psvcplugin/psvcplugin.c b/usr/src/cmd/picl/plugins/sun4u/daktari/psvcplugin/psvcplugin.c deleted file mode 100644 index f26c71bcec..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/daktari/psvcplugin/psvcplugin.c +++ /dev/null @@ -1,508 +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 2000, 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * PICL Daktari platform plug-in to create environment tree nodes. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/*LINTLIBRARY*/ - -#define BUFSZ 512 - -static psvc_opaque_t hdlp; - -#define PSVC_PLUGIN_VERSION PICLD_PLUGIN_VERSION_1 - -#pragma init(psvc_psr_plugin_register) /* place in .init section */ - - -struct proj_prop { /* projected property */ - picl_prophdl_t handle; - picl_nodehdl_t dst_node; - char name[32]; -}; - -typedef struct { - char name[32]; - picl_nodehdl_t node; -} picl_psvc_t; - -extern struct handle { - uint32_t obj_count; - picl_psvc_t *objects; - FILE *fp; -} psvc_hdl; - -extern struct proj_prop *prop_list; -extern uint32_t proj_prop_count; - -void psvc_psr_plugin_init(void); -void psvc_psr_plugin_fini(void); - -picld_plugin_reg_t psvc_psr_reg = { - PSVC_PLUGIN_VERSION, - PICLD_PLUGIN_CRITICAL, - "PSVC_PSR", - psvc_psr_plugin_init, - psvc_psr_plugin_fini -}; - - -#define PSVC_INIT_MSG gettext("%s: Error in psvc_init(): %s\n") -#define PTREE_DELETE_NODE_MSG gettext("%s: ptree_delete_node() failed: %s\n") -#define PTREE_GET_NODE_MSG \ - gettext("%s: ptree_get_node_by_path() failed for %s: %s\n") -#define INVALID_FILE_FORMAT_MSG gettext("%s: Invalid file format\n") -#define ID_NOT_FOUND_MSG gettext("%s: Can't determine id of %s\n") -#define NODE_NOT_FOUND_MSG gettext("%s: Can't determine node of %s\n") -#define SIZE_NOT_FOUND_MSG gettext("%s: Couldn't determine size of %s\n") -#define PTREE_CREATE_PROP_FAILED_MSG \ - gettext("%s: ptree_create_prop failed, %s\n") -#define PTREE_ADD_PROP_FAILED_MSG gettext("%s: ptree_add_prop: %s\n") -#define FANSPEED_PROP_NOT_FOUND_MSG \ - gettext("%s: Can't find property fan-speed\n") -#define FANSPEED_PROP_DELETE_FAILED_MSG \ - gettext("%s: Can't delete property fan-speed\n") - -static int32_t count_records(FILE *fp, char *end, uint32_t *countp) -{ - long first_record; - char *ret; - char buf[BUFSZ]; - uint32_t count = 0; - - first_record = ftell(fp); - - while ((ret = fgets(buf, BUFSZ, fp)) != NULL) { - if (strncmp(end, buf, strlen(end)) == 0) - break; - ++count; - } - - if (ret == NULL) { - errno = EINVAL; - return (-1); - } - - fseek(fp, first_record, SEEK_SET); - *countp = count; - return (0); -} - -/* - * Find start of a section within the config file, - * Returns number of records in the section. - * FILE *fd is set to first data record within section. - */ -static int32_t -find_file_section(FILE *fd, char *start) -{ - char *ret; - char buf[BUFSZ]; - char name[32]; - int found; - - fseek(fd, 0, SEEK_SET); - while ((ret = fgets(buf, BUFSZ, fd)) != NULL) { - if (strncmp(start, buf, strlen(start)) == 0) - break; - } - - if (ret == NULL) { - errno = EINVAL; - return (-1); - } - - found = sscanf(buf, "%s", name); - if (found != 1) { - errno = EINVAL; - return (-1); - } else { - return (0); - } - -} - -static int32_t name_compare_bsearch(char *s1, picl_psvc_t *s2) -{ - return (strcmp(s1, s2->name)); -} - -static void init_err(char *fmt, char *arg1, char *arg2) -{ - char msg[256]; - - sprintf(msg, fmt, arg1, arg2); - syslog(LOG_ERR, msg); -} - -static int -projected_lookup(picl_prophdl_t proph, struct proj_prop **dstp) -{ - int i; - - for (i = 0; i < proj_prop_count; ++i) { - if (prop_list[i].handle == proph) { - *dstp = &prop_list[i]; - return (PICL_SUCCESS); - } - } - - return (PICL_INVALIDHANDLE); -} - -int -fan_speed_read(ptree_rarg_t *rarg, void *buf) -{ - struct proj_prop *dstinfo; - int err; - ptree_propinfo_t propinfo; - picl_prophdl_t assoctbl; - - err = projected_lookup(rarg->proph, &dstinfo); - if (err != PSVC_SUCCESS) { - return (PICL_FAILURE); - } - - - /* see if there's a tach switch */ - err = ptree_get_propval_by_name(rarg->nodeh, - "PSVC_FAN_PRIM_SEC_SELECTOR", &assoctbl, sizeof (assoctbl)); - - if (err != PICL_SUCCESS) { - return (err); - } else { - char switch_state[32], temp_state[32]; - uint64_t features; - picl_prophdl_t entry; - picl_nodehdl_t tach_switch; - char id[PICL_PROPNAMELEN_MAX]; - char name[PICL_PROPNAMELEN_MAX]; - - err = ptree_get_next_by_row(assoctbl, &entry); - if (err != PICL_SUCCESS) { - return (err); - } - err = ptree_get_propval(entry, &tach_switch, - sizeof (tach_switch)); - if (err != PICL_SUCCESS) { - return (err); - } - - err = ptree_get_propval_by_name(rarg->nodeh, PICL_PROP_NAME, - &id, PICL_PROPNAMELEN_MAX); - - err = psvc_get_attr(hdlp, id, PSVC_FEATURES_ATTR, &features); - - if (err != PSVC_SUCCESS) { - return (err); - } - if (features & PSVC_DEV_PRIMARY) { - strlcpy(switch_state, PSVC_SWITCH_ON, - sizeof (switch_state)); - } else { - strlcpy(switch_state, PSVC_SWITCH_OFF, - sizeof (switch_state)); - } - - pthread_mutex_lock(&fan_mutex); - - err = ptree_get_propval_by_name(tach_switch, PICL_PROP_NAME, - &name, PICL_PROPNAMELEN_MAX); - - err = ptree_get_propval_by_name(tach_switch, "State", - &temp_state, sizeof (temp_state)); - - err = psvc_set_attr(hdlp, name, PSVC_SWITCH_STATE_ATTR, - &switch_state); - - if (err != PSVC_SUCCESS) { - pthread_mutex_unlock(&fan_mutex); - return (err); - } - (void) poll(NULL, 0, 250); - } - - - err = ptree_get_propinfo(rarg->proph, &propinfo); - - if (err != PICL_SUCCESS) { - pthread_mutex_unlock(&fan_mutex); - return (err); - } - - err = ptree_get_propval_by_name(dstinfo->dst_node, - dstinfo->name, buf, propinfo.piclinfo.size); - if (err != PICL_SUCCESS) { - pthread_mutex_unlock(&fan_mutex); - return (err); - } - - pthread_mutex_unlock(&fan_mutex); - - return (PICL_SUCCESS); -} - - -/* Load projected properties */ -/* - * This Routine Searches through the projected properties section of the conf - * file and replaces the currently set up values in the CPU and IO Fan Objects - * Fan-Speed property to Daktari specific values - */ -static void -load_projected_properties(FILE *fp) -{ - int32_t found; - ptree_propinfo_t propinfo; - ptree_propinfo_t dstinfo; - picl_prophdl_t src_prophdl, dst_prophdl; - picl_nodehdl_t src_node, dst_node; - int err, i; - picl_psvc_t *srcobjp, *dstobjp; - char src[32], dst[256]; - char src_prop[32], dst_prop[32]; - char buf[BUFSZ]; - char *funcname = "load_projected_properties"; - - if (find_file_section(fp, "PROJECTED_PROPERTIES") != 0) - return; - - if (count_records(fp, "PROJECTED_PROPERTIES_END", - &proj_prop_count) != 0) { - init_err(INVALID_FILE_FORMAT_MSG, funcname, 0); - return; - } - - - for (i = 0; i < proj_prop_count; ++i) { - fgets(buf, BUFSZ, fp); - found = sscanf(buf, "%s %s %s %s", src, src_prop, dst, - dst_prop); - if (found != 4) { - init_err(INVALID_FILE_FORMAT_MSG, funcname, 0); - return; - } - if (strcmp(src_prop, "Fan-speed") != 0) - continue; - - if ((strcmp(src, "IO_BRIDGE_PRIM_FAN") == 0) || - (strcmp(src, "IO_BRIDGE_SEC_FAN") == 0)) - continue; - - /* find src node */ - if (src[0] == '/') { - /* picl node name, outside psvc subtree */ - err = ptree_get_node_by_path(src, &src_node); - if (err != 0) { - init_err(NODE_NOT_FOUND_MSG, funcname, src); - return; - } - } else { - srcobjp = (picl_psvc_t *)bsearch(src, psvc_hdl.objects, - psvc_hdl.obj_count, sizeof (picl_psvc_t), - (int (*)(const void *, const void *)) - name_compare_bsearch); - if (srcobjp == NULL) { - init_err(ID_NOT_FOUND_MSG, funcname, src); - return; - } - src_node = srcobjp->node; - } - - /* - * Get the property Handle for the property names "Fan-Speed" - * from the source node - */ - err = ptree_get_prop_by_name(src_node, "Fan-speed", - &src_prophdl); - if (err != 0) { - init_err(FANSPEED_PROP_NOT_FOUND_MSG, funcname, 0); - return; - } - - /* - * Delete the current property Handle as we are going to replace - * it's values - */ - err = ptree_delete_prop(src_prophdl); - if (err != 0) { - init_err(FANSPEED_PROP_DELETE_FAILED_MSG, funcname, 0); - return; - } - - /* destroy property created by generic plugin */ - ptree_delete_prop(prop_list[i].handle); - ptree_destroy_prop(prop_list[i].handle); - - /* find dest node */ - if (dst[0] == '/') { - /* picl node name, outside psvc subtree */ - err = ptree_get_node_by_path(dst, &dst_node); - if (err != 0) { - init_err(NODE_NOT_FOUND_MSG, funcname, dst); - return; - } - prop_list[i].dst_node = dst_node; - } else { - dstobjp = (picl_psvc_t *)bsearch(dst, psvc_hdl.objects, - psvc_hdl.obj_count, sizeof (picl_psvc_t), - (int (*)(const void *, const void *)) - name_compare_bsearch); - if (dstobjp == NULL) { - init_err(ID_NOT_FOUND_MSG, funcname, dst); - return; - } - prop_list[i].dst_node = dstobjp->node; - dst_node = dstobjp->node; - } - - /* determine destination property size */ - err = ptree_get_first_prop(dst_node, &dst_prophdl); - while (err == 0) { - err = ptree_get_propinfo(dst_prophdl, &dstinfo); - if (err != 0) - break; - if (strcmp(dst_prop, dstinfo.piclinfo.name) == 0) - break; - err = ptree_get_next_prop(dst_prophdl, &dst_prophdl); - } - if (err != 0) { - init_err(SIZE_NOT_FOUND_MSG, funcname, dst_prop); - return; - } - - propinfo.version = PSVC_PLUGIN_VERSION; - propinfo.read = fan_speed_read; - propinfo.write = 0; - propinfo.piclinfo.type = dstinfo.piclinfo.type; - propinfo.piclinfo.accessmode = PICL_READ | PICL_VOLATILE; - propinfo.piclinfo.size = dstinfo.piclinfo.size; - strcpy(propinfo.piclinfo.name, src_prop); - - err = ptree_create_prop(&propinfo, 0, &src_prophdl); - if (err != 0) { - init_err(PTREE_CREATE_PROP_FAILED_MSG, funcname, - picl_strerror(err)); - return; - } - - err = ptree_add_prop(src_node, src_prophdl); - if (err != 0) { - init_err(PTREE_ADD_PROP_FAILED_MSG, funcname, - picl_strerror(err)); - return; - } - - prop_list[i].handle = src_prophdl; - strcpy(prop_list[i].name, dst_prop); - } -} - - -void -psvc_psr_plugin_init(void) -{ - char *funcname = "psvc_psr_plugin_init"; - int32_t i; - int err; - boolean_t present; - - /* - * So the volatile read/write routines can retrieve data from - * psvc or picl - */ - err = psvc_init(&hdlp); - if (err != 0) { - init_err(PSVC_INIT_MSG, funcname, strerror(errno)); - } - - load_projected_properties(psvc_hdl.fp); - - /* - * Remove nodes whose devices aren't present from the picl tree. - */ - for (i = 0; i < psvc_hdl.obj_count; ++i) { - picl_psvc_t *objp; - uint64_t features; - - objp = &psvc_hdl.objects[i]; - - err = psvc_get_attr(hdlp, objp->name, PSVC_PRESENCE_ATTR, - &present); - if (err != PSVC_SUCCESS) - continue; - err = psvc_get_attr(hdlp, objp->name, PSVC_FEATURES_ATTR, - &features); - if (err != PSVC_SUCCESS) - continue; - if ((features & (PSVC_DEV_HOTPLUG | PSVC_DEV_OPTION)) && - (present == PSVC_ABSENT)) { - err = ptree_delete_node(objp->node); - if (err != 0) { - init_err(PTREE_DELETE_NODE_MSG, funcname, - picl_strerror(err)); - return; - } - } - } - - free(psvc_hdl.objects); - -} - -void -psvc_psr_plugin_fini(void) -{ - psvc_fini(hdlp); -} - -void -psvc_psr_plugin_register(void) -{ - picld_plugin_register(&psvc_psr_reg); -} diff --git a/usr/src/cmd/picl/plugins/sun4u/daktari/psvcpolicy/Makefile b/usr/src/cmd/picl/plugins/sun4u/daktari/psvcpolicy/Makefile deleted file mode 100644 index f5322dda7c..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/daktari/psvcpolicy/Makefile +++ /dev/null @@ -1,110 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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" -# -# cmd/picl/plugins/sun4u/daktari/psvcpolicy/Makefile -# -LIBRARY= libpsvcpolicy_psr.a -VERS= .1 - -OBJECTS= psvcpolicy.o - -# include library definitions -include $(SRC)/lib/Makefile.lib -include $(SRC)/Makefile.psm - -include $(SRC)/cmd/picl/plugins/Makefile.com - -SRCS= $(OBJECTS:%.o=%.c) - -LIBS = $(DYNLIB) - -PLATFORM = SUNW,Sun-Fire-880 -DYNFLAGS_PLAT = /usr/platform/\$$PLATFORM/lib/picl/plugins -DYNFLAGS_SUN4U = /usr/platform/sun4u/lib/picl/plugins -DYNFLAGS_COM = /usr/lib/picl/plugins - -CPPFLAGS += -I$(SRC)/uts/sun4u -CPPFLAGS += -I$(ROOT)/usr/platform/sun4u/include -CPPFLAGS += -I$(SRC)/cmd/picl/plugins/sun4u/psvc/psvcobj - -ZDEFS = -LDLIBS += -L$(ROOT)/usr/lib -LDLIBS += -L$(SRC)/lib/libpicl/$(MACH) -L$(SRC)/lib/libpicltree/$(MACH) -LDLIBS += -L$(SRC)/cmd/picl/plugins/sun4u/psvc/psvcobj -LDLIBS += -L$(SRC)/cmd/picl/plugins/sun4u/psvc/psvcplugin -DYNFLAGS += -R$(DYNFLAGS_PLAT):$(DYNFLAGS_SUN4U):$(DYNFLAGS_COM) - -LDLIBS += -lpicltree -lpsvcobj -lpsvcplugin -LDLIBS += -lc -ldevice -lcfgadm - -.KEEP_STATE: - -PLATLIBS= $(USR_PLAT_DIR)/$(PLATFORM)/lib/ - -UTSBASE= $(SRC)/uts - -SUBDIRS= - -POFILE= psvcpolicy.po -POFILE_RENAME= psvcpolicy_dak.po - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -all: $(LIBS) $(LIBLINKS) - -install: all $(USR_PSM_LIBS) - -$(USR_PSM_LIB_DIR): - @cd $(UTSBASE)/sun4u/daktari; pwd; $(MAKE) $(USR_PSM_LIB_DIR) - -$(LIBLINKS): FRC - $(RM) $(LIBLINKS); $(SYMLINK) $(DYNLIB) $(LIBLINKS) - -_msg: $(MSGDOMAIN) $(POFILE) - $(RM) $(MSGDOMAIN)/$(POFILE) - $(CP) $(POFILE) $(MSGDOMAIN)/$(POFILE_RENAME) - -$(MSGDOMAIN): - $(INS.dir) - - -# include library targets -include $(SRC)/cmd/picl/plugins/Makefile.targ -include $(SRC)/lib/Makefile.targ - -$(USR_PSM_LIB_DIR)/%: % $(USR_PSM_LIB_DIR) - $(INS.file) ;\ - $(RM) -r $(USR_PSM_LIB_DIR)/libpsvcpolicy_psr.so; \ - $(SYMLINK) ./libpsvcpolicy_psr.so$(VERS) $(USR_PSM_LIB_DIR)/libpsvcpolicy_psr.so - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/daktari/psvcpolicy/psvcpolicy.c b/usr/src/cmd/picl/plugins/sun4u/daktari/psvcpolicy/psvcpolicy.c deleted file mode 100644 index 3dcd6972d3..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/daktari/psvcpolicy/psvcpolicy.c +++ /dev/null @@ -1,2317 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - -/* - * Daktari platform platform specific environment monitoring policies - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/*LINTLIBRARY*/ - -/* resides in libcfgadm */ -extern cfga_err_t config_change_state(cfga_cmd_t, int, char *const *, - const char *, struct cfga_confirm *, struct cfga_msg *, char **, - cfga_flags_t); -/* Local Routine */ -static int32_t update_gen_fault_led(psvc_opaque_t, char *); -static void shutdown_routine(void); -static int32_t update_thresholds(psvc_opaque_t hdlp, char *id, int offset); - - -#ifdef DEBUG - -static int dak_policy_debug = 0; - -#define D1SYS_ERR(ARGS) if (dak_policy_debug & 0x1) syslog ARGS; -#define D2SYS_ERR(ARGS) if (dak_policy_debug & 0x2) syslog ARGS; - -#else - -#define D1SYS_ERR(ARGS) -#define D2SYS_ERR(ARGS) - -#endif - -#define I2C_PATH "/devices/pci@9,700000/ebus@1/i2c@1,30" -#define I2C_NODE I2C_PATH ":devctl" -#define PCF8574 I2C_PATH "/ioexp@0,%x:pcf8574" -#define PCF8591 I2C_PATH "/adio@0,%x:port_0" -#define FRU I2C_PATH "/fru@0,%x:fru" -#define HPC3130_DEV I2C_PATH "/hotplug-controller@0,%2x:port_%1x" -#define GEN_FAULT_LED "FSP_GEN_FAULT_LED" -#define EMPTY_STRING "EMPTY" -#define DEVICE_FAILURE_MSG gettext("WARNING: Device %s failure detected") -#define DEVICE_INSERTED_MSG gettext("Device %s inserted") -#define DEVICE_REMOVED_MSG gettext("Device %s removed") -#define PS_UNPLUGGED_MSG gettext("Device %s unplugged") -#define PS_PLUGGED_MSG gettext("Device %s Plugged in") -#define DEVICE_OK_MSG gettext("Device %s OK") -#define SET_LED_FAILED_MSG \ - gettext("Failed to set LED state, id = %s, errno = %d\n") -#define GET_PRESENCE_FAILED_MSG \ - gettext("Failed to get presence attribute, id = %s, errno = %d\n") -#define GET_SENSOR_FAILED_MSG \ - gettext("Failed to get sensor value, id = %s, errno = %d\n") -#define ADD_PS_MSG \ -gettext("WARNING: Only 1 Power Supply in system. ADD a 2nd Power Supply.\n") -#define REMOVE_LOAD_MSG \ - gettext("WARNING: Power Supply at 95%% current. Remove some load.\n") -#define PS_OVER_CURRENT_MSG \ - gettext("WARNING: Power Supply overcurrent detected\n") -#define PS_UNDER_CURRENT_MSG \ - gettext("WARNING: PS%d Undercurrent on one or more DC lines\n") -#define DEVICE_UNKNOWN_MSG gettext("Unknown device %s instance %d\n") -#define DEVICE_HANDLE_FAIL_MSG \ - gettext("Failed to get device handle for %s, errno = %d\n") -#define DEVTREE_NODE_CREATE_FAILED \ - gettext("psvc PICL plugin: Failed to create node for %s, errno = %d") -#define DEVTREE_NODE_DELETE_FAILED \ - gettext("psvc PICL plugin: Failed to delete node for %s, errno = %d") -#define DISK_FAULT_MSG gettext("%s: Error Reported\n") -#define DISK_OK_MSG gettext("%s: Error Cleared\n") -#define SET_FANSPEED_FAILED_MSG \ - gettext("Failed to set fan speed, id = %s, errno = %d\n") -#define GET_ATTR_FRU_FAILED_MSG gettext("Failed psvc_get_attr for FRU info\n") -#define NO_FRU_INFO_MSG \ - gettext("No FRU Information for %s using default module card\n") - -#define DAKTARI_MAX_PS 3 -#define DAK_MAX_PS_I_SENSORS 4 -#define DAK_MAX_DISKS 12 -#define DAK_MAX_CPU_MOD 4 -#define DAK_MAX_FAULT_SENSORS 3 -#define DAK_MAX_FANS 10 - -static int co_ps = 0; -static char *shutdown_string = "shutdown -y -g 60 -i 5 \"OVERTEMP condition\""; - -typedef struct i2c_hp { - int32_t addr[2]; - char name[256]; - char compatible[256]; -} i2c_hp_t; - -typedef struct seg_desc { - int32_t segdesc; - int16_t segoffset; - int16_t seglength; -} seg_desc_t; - -static int32_t threshold_names[] = { - PSVC_HW_LO_SHUT_ATTR, - PSVC_LO_SHUT_ATTR, - PSVC_LO_WARN_ATTR, - PSVC_NOT_USED, /* LOW MODE which is not used */ - PSVC_OPTIMAL_TEMP_ATTR, - PSVC_HI_WARN_ATTR, - PSVC_HI_SHUT_ATTR, - PSVC_HW_HI_SHUT_ATTR -}; - -/* - * The I2C bus is noisy, and the state may be incorrectly reported as - * having changed. When the state changes, we attempt to confirm by - * retrying. If any retries indicate that the state has not changed, we - * assume the state change(s) were incorrect and the state has not changed. - * The following variables are used to store the tuneable values read in - * from the optional i2cparam.conf file for this shared object library. - */ -static int n_retry_pshp_status = PSVC_NUM_OF_RETRIES; -static int retry_sleep_pshp_status = 1; -static int n_read_overcurrent = PSVC_THRESHOLD_COUNTER; -static int n_read_undercurrent = PSVC_THRESHOLD_COUNTER; -static int n_retry_devicefail = PSVC_NUM_OF_RETRIES; -static int retry_sleep_devicefail = 1; -static int n_read_fanfault = PSVC_THRESHOLD_COUNTER; -static int n_retry_pshp = PSVC_NUM_OF_RETRIES; -static int retry_sleep_pshp = 1; -static int n_retry_diskfault = PSVC_NUM_OF_RETRIES; -static int retry_sleep_diskfault = 1; -static int n_retry_temp_shutdown = PSVC_NUM_OF_RETRIES; -static int retry_sleep_temp_shutdown = 1; - -typedef struct { - int *pvar; - char *texttag; -} i2c_noise_param_t; - -static i2c_noise_param_t i2cparams[] = { - &n_retry_pshp_status, "n_retry_pshp_status", - &retry_sleep_pshp_status, "retry_sleep_pshp_status", - &n_read_overcurrent, "n_read_overcurrent", - &n_read_undercurrent, "n_read_undercurrent", - &n_retry_devicefail, "n_retry_devicefail", - &retry_sleep_devicefail, "retry_sleep_devicefail", - &n_read_fanfault, "n_read_fanfault", - &n_retry_pshp, "n_retry_pshp", - &retry_sleep_pshp, "retry_sleep_pshp", - &n_retry_diskfault, "n_retry_diskfault", - &retry_sleep_diskfault, "retry_sleep_diskfault", - &n_retry_temp_shutdown, "n_retry_temp_shutdown", - &retry_sleep_temp_shutdown, "retry_sleep_temp_shutdown", - NULL, NULL -}; - -#pragma init(i2cparams_load) - -static void -i2cparams_debug(i2c_noise_param_t *pi2cparams, char *platform, - int usingDefaults) -{ - char s[128]; - i2c_noise_param_t *p; - - if (!usingDefaults) { - (void) snprintf(s, sizeof (s), - "# Values from /usr/platform/%s/lib/i2cparam.conf\n", - platform); - syslog(LOG_WARNING, "%s", s); - } else { - /* no file - we're using the defaults */ - (void) snprintf(s, sizeof (s), -"# No /usr/platform/%s/lib/i2cparam.conf file, using defaults\n", - platform); - } - (void) fputs(s, stdout); - p = pi2cparams; - while (p->pvar != NULL) { - (void) snprintf(s, sizeof (s), "%s %d\n", p->texttag, - *(p->pvar)); - if (!usingDefaults) - syslog(LOG_WARNING, "%s", s); - (void) fputs(s, stdout); - p++; - } -} - -static void -i2cparams_load(void) -{ - FILE *fp; - char filename[PATH_MAX]; - char platform[64]; - char s[128]; - char var[128]; - int val; - i2c_noise_param_t *p; - - if (sysinfo(SI_PLATFORM, platform, sizeof (platform)) == -1) { - syslog(LOG_ERR, "sysinfo error %s\n", strerror(errno)); - return; - } - (void) snprintf(filename, sizeof (filename), - "/usr/platform/%s/lib/i2cparam.conf", platform); - /* read thru the i2cparam.conf file and set variables */ - if ((fp = fopen(filename, "r")) != NULL) { - while (fgets(s, sizeof (s), fp) != NULL) { - if (s[0] == '#') /* skip comment lines */ - continue; - /* try to find a string match and get the value */ - if (sscanf(s, "%127s %d", var, &val) != 2) - continue; - if (val < 1) - val = 1; /* clamp min value */ - p = &(i2cparams[0]); - while (p->pvar != NULL) { - if (strncmp(p->texttag, var, sizeof (var)) == - 0) { - *(p->pvar) = val; - break; - } - p++; - } - } - (void) fclose(fp); - } - /* output the values of the parameters */ - i2cparams_debug(&(i2cparams[0]), platform, ((fp == NULL)? 1 : 0)); -} - -int32_t -psvc_MB_update_thresholds_0(psvc_opaque_t hdlp, char *id, int offset) -{ - int IO_offset = 0xd; - int32_t err; - - err = update_thresholds(hdlp, id, IO_offset); - - return (err); -} - -int32_t -psvc_IO_update_thresholds_0(psvc_opaque_t hdlp, char *id, int offset) -{ - int IO_offset = 0x8; - int32_t err; - - err = update_thresholds(hdlp, id, IO_offset); - - return (err); -} - -int32_t -psvc_DBP_update_thresholds_0(psvc_opaque_t hdlp, char *id, int offset) -{ - int IO_offset = 0x7; - int32_t err; - - err = update_thresholds(hdlp, id, IO_offset); - - return (err); -} - -/* - * used to determine if a change of state occured. valid when states - * are strings. - */ -static int8_t -change_of_state_str(char *state1, char *check1, char *state2, char *check2) -{ - int change = 0; - - if ((strcmp(state1, check1) == 0) && (strcmp(state2, check2) != 0)) - change = 1; - if ((strcmp(state1, check1) != 0) && (strcmp(state2, check2) == 0)) - change = 1; - - return (change); -} - -/* - * Update thresholds tries to read the temperature thresholds from the FRU - * SEEproms and then updates the thresholds in the object by overriding the - * hardcoded thresholds. For Daktari it is an Error if the FRU does not - * contain the segment that had the temperature thresholds. - */ -static int32_t -update_thresholds(psvc_opaque_t hdlp, char *id, int offset) -{ - int32_t status = PSVC_SUCCESS; - fru_info_t fru_data; - char *fru, seg_name[2]; - int8_t seg_count, temp_array[8]; - int32_t match_count, i, j, seg_desc_start = 0x1806, temp_address; - int32_t seg_found, temp; - boolean_t present; - seg_desc_t segment; - - status = psvc_get_attr(hdlp, id, PSVC_PRESENCE_ATTR, &present); - if ((status != PSVC_SUCCESS) || (present != PSVC_PRESENT)) - return (status); - - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_MATCHES_ATTR, &match_count, - PSVC_FRU); - if (status == PSVC_FAILURE) - return (status); - - for (i = 0; i < match_count; i++) { - seg_found = 0; - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_ID_ATTR, - &fru, PSVC_FRU, i); - if (status != PSVC_SUCCESS) - return (status); - - fru_data.buf_start = 0x1805; - fru_data.buf = (char *)&seg_count; - fru_data.read_size = 1; - - status = psvc_get_attr(hdlp, fru, PSVC_FRU_INFO_ATTR, - &fru_data); - if (status != PSVC_SUCCESS) { - return (status); - } - for (j = 0; (j < seg_count) && (!seg_found); j++) { - fru_data.buf_start = seg_desc_start; - fru_data.buf = seg_name; - fru_data.read_size = 2; - - status = psvc_get_attr(hdlp, fru, PSVC_FRU_INFO_ATTR, - &fru_data); - - seg_desc_start = seg_desc_start + 2; - fru_data.buf_start = seg_desc_start; - fru_data.buf = (char *)&segment; - fru_data.read_size = sizeof (seg_desc_t); - - status = psvc_get_attr(hdlp, fru, PSVC_FRU_INFO_ATTR, - &fru_data); - if (status != PSVC_SUCCESS) { - syslog(LOG_ERR, - "Failed psvc_get_attr for FRU info\n"); - return (status); - } - seg_desc_start = seg_desc_start + sizeof (seg_desc_t); - if (memcmp(seg_name, "SC", 2) == 0) - seg_found = 1; - } - if (seg_found) { - temp_address = segment.segoffset + offset; - fru_data.buf_start = temp_address; - fru_data.buf = (char *)&temp_array; - fru_data.read_size = sizeof (temp_array); - status = psvc_get_attr(hdlp, fru, PSVC_FRU_INFO_ATTR, - &fru_data); - if (status != PSVC_SUCCESS) { - syslog(LOG_ERR, - "Failed psvc_get_attr for FRU info\n"); - return (status); - } else { - for (j = 0; j < sizeof (temp_array); j++) { - if (threshold_names[j] == - PSVC_NOT_USED) - continue; - temp = temp_array[j]; - status = psvc_set_attr(hdlp, id, - threshold_names[j], &temp); - if (status != PSVC_SUCCESS) { - return (status); - } - } - } - } else { - syslog(LOG_ERR, "No FRU Information for %s" - " using default temperatures\n", id); - } - } - return (status); -} - -int32_t -psvc_fan_init_speed_0(psvc_opaque_t hdlp, char *id) -{ - int32_t status = PSVC_SUCCESS; - boolean_t present; - char *control_id; - int32_t init_speed = 0; - - status = psvc_get_attr(hdlp, id, PSVC_PRESENCE_ATTR, &present); - if ((status != PSVC_SUCCESS) || (present != PSVC_PRESENT)) - return (status); - - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_ID_ATTR, &control_id, - PSVC_FAN_DRIVE_CONTROL, 0); - if (status != PSVC_SUCCESS) - return (status); - - status = psvc_set_attr(hdlp, control_id, PSVC_CONTROL_VALUE_ATTR, - &init_speed); - if (status == PSVC_FAILURE) { - syslog(LOG_ERR, SET_FANSPEED_FAILED_MSG, control_id, errno); - return (status); - } - - return (status); -} - -int32_t -psvc_update_setpoint_0(psvc_opaque_t hdlp, char *id) -{ - int32_t status = PSVC_SUCCESS; - char *temp_sensor; - int32_t match_count, i, temp; - int16_t lowest_temp = 500; - boolean_t present; - - status = psvc_get_attr(hdlp, id, PSVC_PRESENCE_ATTR, &present); - if ((status != PSVC_SUCCESS) || (present != PSVC_PRESENT)) - return (status); - - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_MATCHES_ATTR, &match_count, - PSVC_DEV_TEMP_SENSOR); - if (status == PSVC_FAILURE) - return (status); - - for (i = 0; i < match_count; i++) { - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_ID_ATTR, - &temp_sensor, PSVC_DEV_TEMP_SENSOR, i); - if (status != PSVC_SUCCESS) - return (status); - status = psvc_get_attr(hdlp, temp_sensor, - PSVC_OPTIMAL_TEMP_ATTR, &temp); - if (status != PSVC_SUCCESS) { - syslog(LOG_ERR, "Failed to get Optimal temp for %s\n", - temp_sensor); - return (status); - } - if (temp < lowest_temp) - lowest_temp = temp; - } - status = psvc_set_attr(hdlp, id, PSVC_SETPOINT_ATTR, &lowest_temp); - if (status == PSVC_FAILURE) { - syslog(LOG_ERR, "Failed to change setpoint for %s\n", id); - return (status); - } - return (status); -} - -int32_t -psvc_remove_missing_nodes_0(psvc_opaque_t hdlp, char *id) -{ - int32_t status = PSVC_SUCCESS; - char state[32]; - char *physical_dev; - int32_t i, device_count; - char parent_path[256]; - picl_nodehdl_t child_node; - boolean_t present; - - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_MATCHES_ATTR, - &device_count, PSVC_PHYSICAL_DEVICE); - if (status == PSVC_FAILURE) - return (status); - - for (i = 0; i < device_count; i++) { - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_ID_ATTR, - &physical_dev, PSVC_PHYSICAL_DEVICE, i); - if (status != PSVC_SUCCESS) - return (status); - if (strncmp(physical_dev, "LTC1427", 7) == 0) - continue; - status = psvc_get_attr(hdlp, physical_dev, - PSVC_PROBE_RESULT_ATTR, state); - if (status != PSVC_SUCCESS) - continue; - status = psvc_get_attr(hdlp, physical_dev, PSVC_PRESENCE_ATTR, - &present); - if (status == PSVC_FAILURE) { - syslog(LOG_ERR, GET_PRESENCE_FAILED_MSG, physical_dev, - errno); - return (status); - } - - if ((strcmp(state, PSVC_ERROR) == 0) && - (present == PSVC_PRESENT)) { - /* convert name to node, and parent path */ - psvcplugin_lookup(physical_dev, parent_path, - &child_node); - /* Device removed */ - ptree_delete_node(child_node); - } - } - return (status); -} - -int32_t -psvc_check_ps_hotplug_status_0(psvc_opaque_t hdlp, char *id) -{ - char fail_valid_switch_id[PICL_PROPNAMELEN_MAX]; - int32_t status = PSVC_SUCCESS; - char valid_switch_state[32]; - char state[32], fault[32]; - int32_t led_count, j; - char *led_id; - char led_state[32]; - boolean_t present; - static int8_t hotplug_failed_count = 0; - static int unplugged_ps = 0; - int retry; - char *unplugged_id; - - status = psvc_get_attr(hdlp, id, PSVC_PRESENCE_ATTR, &present); - if (status == PSVC_FAILURE) { - syslog(LOG_ERR, GET_PRESENCE_FAILED_MSG, id, errno); - return (status); - } - - if (present == PSVC_ABSENT) { - errno = ENODEV; - return (PSVC_FAILURE); - } - - snprintf(fail_valid_switch_id, sizeof (fail_valid_switch_id), "%s%s", - id, "_SENSOR_VALID_SWITCH"); - - retry = 0; - do { - if (retry) - (void) sleep(retry_sleep_pshp_status); - status = psvc_get_attr(hdlp, fail_valid_switch_id, - PSVC_STATE_ATTR, valid_switch_state); - if (status == PSVC_FAILURE) { - if (hotplug_failed_count == 0) { - /* - * First time the get_attr call failed - * set count so that if we fail again - * we will know - */ - hotplug_failed_count = 1; - /* - * We probably failed because the power - * supply was just insterted or removed - * before the get_attr call. We then - * return from this policy successfully - * knowing it will be run again shortly - * with the right PS state. - */ - return (PSVC_SUCCESS); - } else { - /* - * We have failed before and so this - * we will consider a hardware problem - * and it should be reported - */ - syslog(LOG_ERR, - "Failed getting %s State: ", - "ps_hotplug_status_0\n", - fail_valid_switch_id); - return (status); - } - } - /* - * Because we have successfully gotten a value from - * the i2c device on the PS we will set the - * failed_count to 0 - */ - hotplug_failed_count = 0; - - status = psvc_get_attr(hdlp, id, PSVC_STATE_ATTR, state); - if (status == PSVC_FAILURE) - return (status); - retry++; - /* - * check to see if we need to retry. the conditions are: - * - * valid_switch_state state retry - * -------------------------------------------------- - * PSVC_OFF !PSVC_HOTPLUGGED yes - * PSVC_ON PSVC_HOTPLUGGED yes - * PSVC_OFF PSVC_HOTPLUGGED no - * PSVC_ON !PSVC_HOTPLUGGED no - */ - } while ((retry < n_retry_pshp_status) && - change_of_state_str(valid_switch_state, PSVC_OFF, - state, PSVC_HOTPLUGGED)); - - if ((strcmp(valid_switch_state, PSVC_OFF) == 0) && - (strcmp(state, PSVC_HOTPLUGGED) != 0)) { - strcpy(state, PSVC_HOTPLUGGED); - strcpy(fault, PSVC_NO_FAULT); - strcpy(led_state, PSVC_LED_OFF); - status = psvc_set_attr(hdlp, id, PSVC_STATE_ATTR, - state); - if (status == PSVC_FAILURE) - return (status); - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_MATCHES_ATTR, - &led_count, PSVC_DEV_FAULT_LED); - if (status == PSVC_FAILURE) - return (status); - - for (j = 0; j < led_count; j++) { - - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_ID_ATTR, - &led_id, PSVC_DEV_FAULT_LED, j); - if (status != PSVC_SUCCESS) - return (status); - - status = psvc_set_attr(hdlp, led_id, - PSVC_LED_STATE_ATTR, led_state); - if (status != PSVC_SUCCESS) { - syslog(LOG_ERR, SET_LED_FAILED_MSG, led_id, - errno); - return (status); - } - - } - strcpy(led_state, PSVC_LED_ON); - status = psvc_set_attr(hdlp, "FSP_POWER_FAULT_LED", - PSVC_LED_STATE_ATTR, led_state); - if (status != PSVC_SUCCESS) { - syslog(LOG_ERR, SET_LED_FAILED_MSG, led_id, errno); - return (status); - } - unplugged_id = id + 2; - unplugged_ps = unplugged_ps | (1 << (int)strtol(unplugged_id, - (char **)NULL, 10)); - status = update_gen_fault_led(hdlp, GEN_FAULT_LED); - syslog(LOG_ERR, PS_UNPLUGGED_MSG, id); - return (status); - } - - if ((strcmp(valid_switch_state, PSVC_ON) == 0) && - (strcmp(state, PSVC_HOTPLUGGED) == 0)) { - strcpy(state, PSVC_OK); - strcpy(fault, PSVC_NO_FAULT); - status = psvc_set_attr(hdlp, id, PSVC_STATE_ATTR, state); - if (status == PSVC_FAILURE) - return (status); - unplugged_id = id + 2; - unplugged_ps = unplugged_ps ^ (1 << (int)strtol(unplugged_id, - (char **)NULL, 10)); - if (unplugged_ps == 0) { - strcpy(led_state, PSVC_LED_OFF); - status = psvc_set_attr(hdlp, "FSP_POWER_FAULT_LED", - PSVC_LED_STATE_ATTR, led_state); - if (status != PSVC_SUCCESS) { - syslog(LOG_ERR, SET_LED_FAILED_MSG, led_id, - errno); - return (status); - } - status = update_gen_fault_led(hdlp, GEN_FAULT_LED); - } - syslog(LOG_ERR, PS_PLUGGED_MSG, id); - } - - return (status); -} - -int32_t -psvc_ps_overcurrent_check_policy_0(psvc_opaque_t hdlp, char *system) -{ - int32_t status = PSVC_SUCCESS; - boolean_t present; - static char *sensor_id[DAKTARI_MAX_PS][DAK_MAX_PS_I_SENSORS]; - static char *power_supply_id[DAKTARI_MAX_PS] = {NULL}; - int32_t i, j; - int32_t amps, oc_flag = 0, ps_present = 0; - static int32_t hi_warn[DAKTARI_MAX_PS][DAK_MAX_PS_I_SENSORS]; - char state[32]; - static int8_t overcurrent_failed_check = 0; - static int threshold_counter = 0; - - if (power_supply_id[0] == NULL) { - for (i = 0; i < DAKTARI_MAX_PS; i++) { - status = psvc_get_attr(hdlp, system, - PSVC_ASSOC_ID_ATTR, &(power_supply_id[i]), - PSVC_PS, i); - if (status != PSVC_SUCCESS) - return (status); - for (j = 0; j < DAK_MAX_PS_I_SENSORS; ++j) { - status = psvc_get_attr(hdlp, - power_supply_id[i], PSVC_ASSOC_ID_ATTR, - &(sensor_id[i][j]), PSVC_PS_I_SENSOR, j); - if (status != PSVC_SUCCESS) - return (status); - status = psvc_get_attr(hdlp, sensor_id[i][j], - PSVC_HI_WARN_ATTR, &(hi_warn[i][j])); - if (status != PSVC_SUCCESS) - return (status); - } - } - } - - for (i = 0; i < DAKTARI_MAX_PS; i++) { - status = psvc_get_attr(hdlp, power_supply_id[i], - PSVC_PRESENCE_ATTR, &present); - if (status == PSVC_FAILURE) { - syslog(LOG_ERR, GET_PRESENCE_FAILED_MSG, - power_supply_id[i], errno); - return (status); - } - - if (present == PSVC_ABSENT) { - continue; - } - - status = psvc_check_ps_hotplug_status_0(hdlp, - power_supply_id[i]); - if (status == PSVC_FAILURE) - return (status); - - status = psvc_get_attr(hdlp, power_supply_id[i], - PSVC_STATE_ATTR, state); - if (status == PSVC_FAILURE) - return (status); - - if (strcmp(state, PSVC_HOTPLUGGED) == 0) { - continue; - } else { - ps_present++; - } - - for (j = 0; j < DAK_MAX_PS_I_SENSORS; ++j) { - status = psvc_get_attr(hdlp, sensor_id[i][j], - PSVC_SENSOR_VALUE_ATTR, &s); - if (status != PSVC_SUCCESS) { - if (overcurrent_failed_check == 0) { - /* - * First time the get_attr call - * failed set count so that if we - * fail again we will know - */ - overcurrent_failed_check = 1; - /* - * We probably failed because the power - * supply was just insterted or removed - * before the get_attr call. We then - * return from this policy successfully - * knowing it will be run again shortly - * with the right PS state. - */ - return (PSVC_SUCCESS); - } else { - /* - * We have failed before and so this we - * will consider a hardware problem and - * it should be reported. - */ - syslog(LOG_ERR, - "Failed getting %s sensor value", - sensor_id[i][j]); - return (status); - } - } - /* - * Because we have successfully gotten a value from the - * i2c device on the PS we will set the failed_count - * to 0. - */ - overcurrent_failed_check = 0; - - if (amps >= hi_warn[i][j]) { - oc_flag = 1; - } - } - } - - if (oc_flag) { - /* - * Because we observed an overcurrent - * condition, we increment threshold_counter. - * Once threshold_counter reaches the value - * of n_read_overcurrent we log the event. - */ - threshold_counter++; - if (threshold_counter == n_read_overcurrent) { - threshold_counter = 0; - if (ps_present == 1) { - syslog(LOG_ERR, PS_OVER_CURRENT_MSG); - syslog(LOG_ERR, ADD_PS_MSG); - } else { - syslog(LOG_ERR, PS_OVER_CURRENT_MSG); - syslog(LOG_ERR, REMOVE_LOAD_MSG); - } - } - } else { - threshold_counter = 0; - } - - return (PSVC_SUCCESS); -} - -int32_t -psvc_ps_undercurrent_check(psvc_opaque_t hdlp, char *id, int32_t *uc_flag) -{ - int32_t status = PSVC_SUCCESS; - boolean_t present; - static char *sensor_id[DAK_MAX_PS_I_SENSORS]; - int32_t j; - int32_t amps; - static int32_t lo_warn[DAK_MAX_PS_I_SENSORS]; - static int8_t undercurrent_failed_check = 0; - - status = psvc_get_attr(hdlp, id, PSVC_PRESENCE_ATTR, &present); - if (status == PSVC_FAILURE) { - syslog(LOG_ERR, GET_PRESENCE_FAILED_MSG, id, errno); - return (status); - } - - if (present == PSVC_ABSENT) { - errno = ENODEV; - return (PSVC_FAILURE); - } - - for (j = 0; j < DAK_MAX_PS_I_SENSORS; ++j) { - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_ID_ATTR, - &(sensor_id[j]), PSVC_PS_I_SENSOR, j); - if (status != PSVC_SUCCESS) - return (status); - status = psvc_get_attr(hdlp, sensor_id[j], - PSVC_LO_WARN_ATTR, &(lo_warn[j])); - if (status != PSVC_SUCCESS) - return (status); - } - - *uc_flag = 0; - for (j = 0; j < DAK_MAX_PS_I_SENSORS; ++j) { - status = psvc_get_attr(hdlp, sensor_id[j], - PSVC_SENSOR_VALUE_ATTR, &s); - if (status != PSVC_SUCCESS) { - if (undercurrent_failed_check == 0) { - /* - * First time the get_attr call - * failed set count so that if we - * fail again we will know. - */ - undercurrent_failed_check = 1; - /* - * We probably failed because the power - * supply was just inserted or removed - * before the get_attr call. We then - * return from this policy successfully - * knowing it will be run again shortly - * with the right PS state. - */ - return (PSVC_SUCCESS); - } else { - /* - * Repeated failures are logged. - */ - syslog(LOG_ERR, - "Failed getting %s sensor value", - sensor_id[j]); - return (status); - } - } - /* - * Because we have successfully gotten a value from the - * i2c device on the PS we will set the failed_count - * to 0. - */ - undercurrent_failed_check = 0; - - if (amps <= lo_warn[j]) { - *uc_flag = 1; - return (PSVC_SUCCESS); - } - } - - return (PSVC_SUCCESS); -} - -int32_t -psvc_ps_device_fail_notifier_policy_0(psvc_opaque_t hdlp, char *system) -{ - static char *ps_id[DAKTARI_MAX_PS] = {NULL}; - static char *sensor_id[DAKTARI_MAX_PS][DAK_MAX_FAULT_SENSORS]; - char *led_id = "FSP_POWER_FAULT_LED"; - int i, j, uc_flag; - char state[32], fault[32], previous_state[32], past_state[32]; - char led_state[32]; - char bad_sensors[DAK_MAX_FAULT_SENSORS][256]; - static int threshold_counter[DAKTARI_MAX_PS]; - int32_t status = PSVC_SUCCESS; - boolean_t present; - int fail_state; - static int8_t device_fail_failed_check = 0; - int retry, should_retry; - - if (ps_id[0] == NULL) { - for (i = 0; i < DAKTARI_MAX_PS; i++) { - status = psvc_get_attr(hdlp, system, - PSVC_ASSOC_ID_ATTR, &(ps_id[i]), PSVC_PS, i); - if (status != PSVC_SUCCESS) - return (status); - for (j = 0; j < DAK_MAX_FAULT_SENSORS; j++) { - status = psvc_get_attr(hdlp, ps_id[i], - PSVC_ASSOC_ID_ATTR, &(sensor_id[i][j]), - PSVC_DEV_FAULT_SENSOR, j); - if (status != PSVC_SUCCESS) - return (status); - } - } - } - - for (i = 0; i < DAKTARI_MAX_PS; i++) { - fail_state = 0; - status = psvc_get_attr(hdlp, ps_id[i], PSVC_PRESENCE_ATTR, - &present); - if (status == PSVC_FAILURE) - return (status); - - if (present == PSVC_ABSENT) { - errno = ENODEV; - return (PSVC_FAILURE); - } - - status = psvc_check_ps_hotplug_status_0(hdlp, ps_id[i]); - if (status == PSVC_FAILURE) - return (status); - - status = psvc_get_attr(hdlp, ps_id[i], PSVC_STATE_ATTR, - past_state); - if (status == PSVC_FAILURE) - return (status); - - if (strcmp(past_state, PSVC_HOTPLUGGED) == 0) { - return (PICL_SUCCESS); - } - - retry = 0; - do { - if (retry) - (void) sleep(retry_sleep_devicefail); - fail_state = 0; - should_retry = 0; - for (j = 0; j < DAK_MAX_FAULT_SENSORS; ++j) { - status = psvc_get_attr(hdlp, sensor_id[i][j], - PSVC_SWITCH_STATE_ATTR, state); - if (status != PSVC_SUCCESS) { - if (device_fail_failed_check == 0) { - /* - * First time the get_attr call - * failed set count so that - * if we fail again we will know - */ - device_fail_failed_check = 1; - /* - * We probably failed because - * the power supply was just - * insterted or removed before - * the get_attr call. We then - * return from this policy - * successfully knowing it will - * be run again shortly - * with the right PS state. - */ - return (PSVC_SUCCESS); - } else { - /* - * We have failed before and - * so this we will consider a - * hardware problem and - * it should be reported. - */ - syslog(LOG_ERR, "Failed in " - "getting sensor state for " - "%s\n", sensor_id[i][j]); - - return (status); - } - } - - /* - * Because we have successfully gotten - * a value from the i2c device on the - * PS we will set the failed_count to 0. - */ - device_fail_failed_check = 0; - - /* - * If we find that the sensor is on we - * fill in the name of the sensor in - * the bad_sensor array. If the sensor - * is off we use EMPTY_STRING as a check - * later on as to when NOT to print out - * what is in bad_sensor[]. - */ - if (strcmp(state, PSVC_SWITCH_ON) == 0) { - fail_state++; - strlcpy(bad_sensors[j], sensor_id[i][j], - sizeof (bad_sensors[j])); - } else { - strcpy(bad_sensors[j], EMPTY_STRING); - } - } - retry++; - /* - * check to see if we need to retry. the conditions are: - * - * fail_state past_state retry - * -------------------------------------------------- - * + PSVC_OK yes - * 0 PSVC_ERROR yes - * + PSVC_ERROR no - * 0 PSVC_OK no - */ - if ((fail_state > 0) && - (strcmp(past_state, PSVC_OK) == 0)) { - should_retry = 1; - } else if ((fail_state == 0) && - (strcmp(past_state, PSVC_ERROR) == 0)) { - should_retry = 1; - } - } while ((retry < n_retry_devicefail) && should_retry); - - /* Under current check */ - status = psvc_ps_undercurrent_check(hdlp, ps_id[i], &uc_flag); - - if (status != PSVC_FAILURE) { - if (uc_flag) { - /* - * Because we observed an undercurrent - * condition, we increment threshold counter. - * Once threshold counter reaches the value - * of n_read_undercurrent we log the event. - */ - threshold_counter[i]++; - if (threshold_counter[i] >= - n_read_undercurrent) { - fail_state++; - syslog(LOG_ERR, PS_UNDER_CURRENT_MSG, - i); - } - } else { - threshold_counter[i] = 0; - } - } - - if (fail_state != 0) { - strcpy(state, PSVC_ERROR); - strcpy(fault, PSVC_GEN_FAULT); - } else { - strcpy(state, PSVC_OK); - strcpy(fault, PSVC_NO_FAULT); - } - - status = psvc_set_attr(hdlp, ps_id[i], PSVC_STATE_ATTR, state); - if (status != PSVC_SUCCESS) - return (status); - - status = psvc_set_attr(hdlp, ps_id[i], PSVC_FAULTID_ATTR, - fault); - if (status != PSVC_SUCCESS) - return (status); - - status = psvc_get_attr(hdlp, ps_id[i], PSVC_PREV_STATE_ATTR, - previous_state); - if (status != PSVC_SUCCESS) - return (status); - - if (strcmp(state, previous_state) != 0) { - char dev_label[32]; - - psvc_get_attr(hdlp, ps_id[i], PSVC_LABEL_ATTR, - dev_label); - - if (strcmp(state, PSVC_ERROR) == 0) { - syslog(LOG_ERR, DEVICE_FAILURE_MSG, dev_label); - for (j = 0; j < DAK_MAX_FAULT_SENSORS; ++j) { - if (strcmp(bad_sensors[j], - EMPTY_STRING) != 0) - syslog(LOG_ERR, "%s\n", - bad_sensors[j]); - } - strcpy(led_state, PSVC_LED_ON); - } else { - syslog(LOG_ERR, DEVICE_OK_MSG, dev_label); - strcpy(led_state, PSVC_LED_OFF); - } - - status = psvc_set_attr(hdlp, led_id, - PSVC_LED_STATE_ATTR, led_state); - if (status != PSVC_SUCCESS) { - syslog(LOG_ERR, SET_LED_FAILED_MSG, led_id, - errno); - return (status); - } - } - } - - return (PSVC_SUCCESS); -} - -int32_t -psvc_ps_check_and_disable_dr_policy_0(psvc_opaque_t hdlp, char *id) -{ - char state[32]; - static char *name[DAKTARI_MAX_PS] = {NULL}; - int ps_cnt = 0; - int i, j; - int dr_conf; - int fd, rv; - boolean_t present; - char dev_path[sizeof (HPC3130_DEV)+8]; - unsigned char controller_names[HPC3130_CONTROLLERS] = - { 0xe2, 0xe6, 0xe8, 0xec }; - - if (name[0] == NULL) { - for (i = 0; i < DAKTARI_MAX_PS; i++) { - rv = psvc_get_attr(hdlp, id, PSVC_ASSOC_ID_ATTR, - &(name[i]), PSVC_PS, i); - if (rv != PSVC_SUCCESS) - return (rv); - } - } - - /* - * Go through the power supplies to make sure they're present - * and OK. - */ - ps_cnt = DAKTARI_MAX_PS; - for (i = 0; i < DAKTARI_MAX_PS; i++) { - rv = psvc_get_attr(hdlp, name[i], PSVC_PRESENCE_ATTR, - &present); - if (rv != PSVC_SUCCESS) - return (rv); - - if (present != PSVC_PRESENT) { - ps_cnt--; - continue; - } else { - rv = psvc_get_attr(hdlp, name[i], PSVC_STATE_ATTR, - state); - if (rv != PSVC_SUCCESS) - return (rv); - - if (strcmp(state, PSVC_OK)) - ps_cnt--; - } - } - - /* - * No change in DR configuration is needed if the new power supply - * count equals the current count. - */ - if (ps_cnt == co_ps) - return (PSVC_SUCCESS); - - /* - * Disable DR when hotplugged down to 1 power supply; enable DR when - * hotplugged up from 1 supply. - */ - assert(ps_cnt); - if ((co_ps == 0 || co_ps > 1) && ps_cnt != 1) { - co_ps = ps_cnt; - return (PSVC_SUCCESS); - } - dr_conf = (ps_cnt == 1 ? HPC3130_DR_DISABLE : HPC3130_DR_ENABLE); - co_ps = ps_cnt; - - for (i = 0; i < HPC3130_CONTROLLERS; i++) { - for (j = 0; j < HPC3130_SLOTS; j++) { - (void) snprintf(dev_path, sizeof (dev_path), - HPC3130_DEV, controller_names[i], j); - fd = open(dev_path, O_RDWR); - if (fd == -1) - return (PSVC_FAILURE); - - rv = ioctl(fd, HPC3130_CONF_DR, &dr_conf); - close(fd); - if (rv == -1) - return (PSVC_FAILURE); - } - } - - return (PSVC_SUCCESS); -} - -int32_t -psvc_fan_blast_shutoff_policy_0(psvc_opaque_t hdlp, char *id) -{ - char switch_status[32]; - int32_t status = PSVC_SUCCESS; - - status = psvc_get_attr(hdlp, id, PSVC_SWITCH_STATE_ATTR, switch_status); - if (status != PSVC_SUCCESS) - return (status); - status = psvc_set_attr(hdlp, id, PSVC_SWITCH_STATE_ATTR, - PSVC_SWITCH_OFF); - if (status != PSVC_SUCCESS) - return (status); - status = psvc_set_attr(hdlp, id, PSVC_SWITCH_STATE_ATTR, - PSVC_SWITCH_ON); - if (status != PSVC_SUCCESS) - return (status); - status = psvc_set_attr(hdlp, id, PSVC_SWITCH_STATE_ATTR, - PSVC_SWITCH_OFF); - - return (status); -} - -int32_t -psvc_fan_fault_check_policy_0(psvc_opaque_t hdlp, char *system) -{ - static char *fan_id[DAK_MAX_FANS] = {NULL}; - boolean_t enabled; - int32_t speed; - int32_t status = PSVC_SUCCESS; - int r; - static int threshold_counter = 0; - - if (fan_id[0] == NULL) { - for (r = 0; r < DAK_MAX_FANS; r++) { - status = psvc_get_attr(hdlp, system, - PSVC_ASSOC_ID_ATTR, &(fan_id[r]), PSVC_FAN, r); - if (status != PSVC_SUCCESS) - return (status); - } - } - - for (r = 0; r < DAK_MAX_FANS; r++) { - status = psvc_get_attr(hdlp, fan_id[r], PSVC_ENABLE_ATTR, - &enabled); - if (status != PSVC_SUCCESS) - return (status); - - if (enabled == PSVC_ENABLED) { - uint64_t features; - char *switch_id; - char switch_state[32], fan_state[32]; - int fan_count, fans; - char *other_fan_id; - char fstate[32], ffault[32]; - - /* - * If any other fan on the fan tray has an ERROR state, - * mark this fan bad and return - */ - psvc_get_attr(hdlp, fan_id[r], PSVC_ASSOC_MATCHES_ATTR, - &fan_count, PSVC_FAN_TRAY_FANS); - for (fans = 0; fans < fan_count; ++fans) { - status = psvc_get_attr(hdlp, fan_id[r], - PSVC_ASSOC_ID_ATTR, &other_fan_id, - PSVC_FAN_TRAY_FANS, fans); - if (status == PSVC_FAILURE) - return (status); - status = psvc_get_attr(hdlp, other_fan_id, - PSVC_STATE_ATTR, fan_state); - if (status != PSVC_SUCCESS) - return (status); - - if (strcmp(fan_state, PSVC_ERROR) == 0) { - strlcpy(ffault, PSVC_GEN_FAULT, - sizeof (ffault)); - status = psvc_set_attr(hdlp, fan_id[r], - PSVC_FAULTID_ATTR, ffault); - if (status != PSVC_SUCCESS) - return (status); - - strlcpy(fstate, PSVC_ERROR, - sizeof (fstate)); - status = psvc_set_attr(hdlp, fan_id[r], - PSVC_STATE_ATTR, fstate); - - return (status); - } - } - - /* - * Select tachometer for IO or CPU primary/secondary - * fans. - */ - pthread_mutex_lock(&fan_mutex); - - status = psvc_get_attr(hdlp, fan_id[r], - PSVC_ASSOC_ID_ATTR, &switch_id, - PSVC_FAN_PRIM_SEC_SELECTOR, 0); - - if (status != PSVC_FAILURE) { - status = psvc_get_attr(hdlp, fan_id[r], - PSVC_FEATURES_ATTR, &features); - if (status == PSVC_FAILURE) { - pthread_mutex_unlock(&fan_mutex); - return (status); - } - - if (features & PSVC_DEV_PRIMARY) - strlcpy(switch_state, PSVC_SWITCH_ON, - sizeof (switch_state)); - else - strlcpy(switch_state, PSVC_SWITCH_OFF, - sizeof (switch_state)); - status = psvc_set_attr(hdlp, switch_id, - PSVC_SWITCH_STATE_ATTR, switch_state); - if (status == PSVC_FAILURE) { - pthread_mutex_unlock(&fan_mutex); - return (status); - } - - /* allow time for speed to be determined */ - (void) poll(NULL, 0, 250); - } - - status = psvc_get_attr(hdlp, fan_id[r], - PSVC_SENSOR_VALUE_ATTR, &speed); - if (status != PSVC_SUCCESS) { - pthread_mutex_unlock(&fan_mutex); - return (status); - } - - pthread_mutex_unlock(&fan_mutex); - - if (speed == 0) { - threshold_counter++; - if (threshold_counter == - n_read_fanfault) { - int32_t i; - int32_t led_count; - char led_state[32]; - char *led_id; - char *slot_id; - char label[32]; - char state[32], fault[32]; - - threshold_counter = 0; - strlcpy(fault, PSVC_GEN_FAULT, - sizeof (fault)); - status = psvc_set_attr(hdlp, fan_id[r], - PSVC_FAULTID_ATTR, fault); - if (status != PSVC_SUCCESS) - return (status); - - strlcpy(state, PSVC_ERROR, - sizeof (state)); - status = psvc_set_attr(hdlp, fan_id[r], - PSVC_STATE_ATTR, state); - if (status != PSVC_SUCCESS) - return (status); - - status = psvc_get_attr(hdlp, fan_id[r], - PSVC_LABEL_ATTR, label); - if (status != PSVC_SUCCESS) - return (status); - - syslog(LOG_ERR, DEVICE_FAILURE_MSG, - label); - - /* turn on fault LEDs */ - psvc_get_attr(hdlp, fan_id[r], - PSVC_ASSOC_MATCHES_ATTR, &led_count, - PSVC_DEV_FAULT_LED); - strlcpy(led_state, PSVC_LED_ON, - sizeof (led_state)); - for (i = 0; i < led_count; ++i) { - status = psvc_get_attr(hdlp, - fan_id[r], - PSVC_ASSOC_ID_ATTR, &led_id, - PSVC_DEV_FAULT_LED, i); - if (status == PSVC_FAILURE) - return (status); - - status = psvc_set_attr(hdlp, - led_id, PSVC_LED_STATE_ATTR, - led_state); - if (status == PSVC_FAILURE) - return (status); - } - - /* turn on OK to remove LEDs */ - - status = psvc_get_attr(hdlp, fan_id[r], - PSVC_ASSOC_ID_ATTR, &slot_id, - PSVC_PARENT, 0); - if (status != PSVC_SUCCESS) - return (status); - - psvc_get_attr(hdlp, slot_id, - PSVC_ASSOC_MATCHES_ATTR, &led_count, - PSVC_SLOT_REMOVE_LED); - strlcpy(led_state, PSVC_LED_ON, - sizeof (led_state)); - for (i = 0; i < led_count; ++i) { - status = psvc_get_attr(hdlp, - slot_id, - PSVC_ASSOC_ID_ATTR, &led_id, - PSVC_SLOT_REMOVE_LED, i); - if (status == PSVC_FAILURE) - return (status); - - status = psvc_set_attr(hdlp, - led_id, PSVC_LED_STATE_ATTR, - led_state); - if (status == PSVC_FAILURE) - return (status); - } - } - } - } - } - - return (PSVC_SUCCESS); -} - -/* - * This routine takes in the PSVC handle pointer, the PS name, and the - * instance number (0, 1, or 2). It simply make a psvc_get call to get the - * presence of each of the children under the PS. This call will set the - * presence state of the child device if it was not there when the system - * was booted. - */ -static int -handle_ps_hotplug_children_presence(psvc_opaque_t hdlp, char *id) -{ - char *sensor_id; - char fail_valid_switch_id[PICL_PROPNAMELEN_MAX]; - int32_t status = PSVC_SUCCESS; - boolean_t presence; - int j; - - /* Get the Sensor Valid Switch presence */ - snprintf(fail_valid_switch_id, sizeof (fail_valid_switch_id), "%s%s", - id, "_SENSOR_VALID_SWITCH"); - - status = psvc_get_attr(hdlp, fail_valid_switch_id, PSVC_PRESENCE_ATTR, - &presence); - if (status != PSVC_SUCCESS) - return (status); - - /* Go through each PS's fault sensors */ - for (j = 0; j < DAK_MAX_FAULT_SENSORS; j++) { - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_ID_ATTR, - &(sensor_id), PSVC_DEV_FAULT_SENSOR, j); - if (status != PSVC_SUCCESS) - return (status); - status = psvc_get_attr(hdlp, sensor_id, PSVC_PRESENCE_ATTR, - &presence); - if (status != PSVC_SUCCESS) - return (status); - } - - /* Go through each PS's current sensors */ - for (j = 0; j < DAK_MAX_PS_I_SENSORS; ++j) { - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_ID_ATTR, - &(sensor_id), PSVC_PS_I_SENSOR, j); - if (status != PSVC_SUCCESS) - return (status); - status = psvc_get_attr(hdlp, sensor_id, PSVC_PRESENCE_ATTR, - &presence); - if (status != PSVC_SUCCESS) - return (status); - - } - - /* Go through each PS's onboard i2c hardware */ - for (j = 0; j < 3; j++) { - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_ID_ATTR, - &(sensor_id), PSVC_PHYSICAL_DEVICE, j); - if (status != PSVC_SUCCESS) - return (status); - status = psvc_get_attr(hdlp, sensor_id, PSVC_PRESENCE_ATTR, - &presence); - if (status != PSVC_SUCCESS) - return (status); - } - - return (status); -} - -static i2c_hp_t devices[3][3] = { -{{{0, 0x90}, "adio", "i2c-pcf8591"}, {{0, 0x70}, "ioexp", "i2c-pcf8574"}, - {{0, 0xa0}, "fru", "i2c-at24c64"}}, -{{{0, 0x92}, "adio", "i2c-pcf8591"}, {{0, 0x72}, "ioexp", "i2c-pcf8574"}, - {{0, 0xa2}, "fru", "i2c-at24c64"}}, -{{{0, 0x94}, "adio", "i2c-pcf8591"}, {{0, 0x74}, "ioexp", "i2c-pcf8574"}, - {{0, 0xa4}, "fru", "i2c-at24c64"}}, -}; - -int32_t -psvc_ps_hotplug_policy_0(psvc_opaque_t hdlp, char *id) -{ - boolean_t presence, previous_presence; - int32_t status = PSVC_SUCCESS; - char label[32], state[32], fault[32]; - int32_t ps_instance, led_count; - char *switch_id, *led_id; - int i; - picl_nodehdl_t parent_node; - char parent_path[256], ps_path[256]; - picl_nodehdl_t child_node; - devctl_hdl_t bus_handle, dev_handle; - devctl_ddef_t ddef_hdl; - char pcf8574_devpath[256], pcf8591_devpath[256], fru_devpath[256]; - int retry; - - status = psvc_get_attr(hdlp, id, PSVC_PREV_PRESENCE_ATTR, - &previous_presence); - if (status != PSVC_SUCCESS) - return (status); - - retry = 0; - do { - if (retry) - (void) sleep(retry_sleep_pshp); - - status = psvc_get_attr(hdlp, id, PSVC_PRESENCE_ATTR, &presence); - if (status != PSVC_SUCCESS) - return (status); - retry++; - } while ((retry < n_retry_pshp) && - (presence != previous_presence)); - - if (presence == previous_presence) { - /* No change */ - return (status); - } - - status = psvc_get_attr(hdlp, id, PSVC_LABEL_ATTR, label); - if (status != PSVC_SUCCESS) - return (status); - - /* convert name to node, and parent path */ - psvcplugin_lookup(id, parent_path, &child_node); - - if (presence == PSVC_PRESENT) { - /* - * Run this code if Power Supply was just added into the - * System. This code toggles hotplug switch and adds the - * PS and it's children to the picl tree. We then goto adding - * device drivers at bottom of the routine. - */ - int32_t switch_count; - char state[32], fault[32]; - char switch_state[32]; - - /* may detect presence before all connections are made */ - (void) poll(NULL, 0, 500); - - /* Device added */ - syslog(LOG_ERR, DEVICE_INSERTED_MSG, label); - - strcpy(state, PSVC_OK); - status = psvc_set_attr(hdlp, id, PSVC_STATE_ATTR, state); - if (status != PSVC_SUCCESS) - return (status); - - strcpy(fault, PSVC_NO_FAULT); - status = psvc_set_attr(hdlp, id, PSVC_FAULTID_ATTR, fault); - if (status != PSVC_SUCCESS) - return (status); - - /* Enable i2c bus */ - psvc_get_attr(hdlp, id, PSVC_ASSOC_MATCHES_ATTR, - &switch_count, PSVC_HOTPLUG_ENABLE_SWITCH); - for (i = 0; i < switch_count; ++i) { - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_ID_ATTR, - &switch_id, PSVC_HOTPLUG_ENABLE_SWITCH, i); - if (status == PSVC_FAILURE) - return (status); - - strcpy(switch_state, PSVC_SWITCH_OFF); - status = psvc_set_attr(hdlp, switch_id, - PSVC_SWITCH_STATE_ATTR, switch_state); - if (status == PSVC_FAILURE) - return (status); - - strcpy(switch_state, PSVC_SWITCH_ON); - status = psvc_set_attr(hdlp, switch_id, - PSVC_SWITCH_STATE_ATTR, switch_state); - if (status == PSVC_FAILURE) - return (status); - } - ptree_get_node_by_path(parent_path, &parent_node); - ptree_add_node(parent_node, child_node); - snprintf(ps_path, sizeof (ps_path), "%s/%s", parent_path, id); - psvcplugin_add_children(ps_path); - } else { - /* - * Run this code if PS was just removed from the system. We - * delete the device from the picl tree and then shut off - * all fault lights associated with the PS. We also set the - * device state to PSVC_REMOVED so that if we hit overcurrent - * or fault checking code we can do a psvc call to see that - * the device has not offically been added into the system. - * We then will drop to code lower in the routine to remove - * the device drivers for this PS. - */ - - /* Device removed */ - syslog(LOG_ERR, DEVICE_REMOVED_MSG, label); - ptree_delete_node(child_node); - psvc_get_attr(hdlp, id, PSVC_ASSOC_MATCHES_ATTR, &led_count, - PSVC_DEV_FAULT_LED); - - for (i = 0; i < led_count; i++) { - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_ID_ATTR, - &led_id, PSVC_DEV_FAULT_LED, i); - if (status != PSVC_SUCCESS) { - return (status); - } - - status = psvc_set_attr(hdlp, led_id, - PSVC_LED_STATE_ATTR, PSVC_OFF); - if (status != PSVC_SUCCESS) { - syslog(LOG_ERR, SET_LED_FAILED_MSG, led_id, - errno); - return (status); - } - - } - - strcpy(state, PSVC_OK); - strcpy(fault, PSVC_NO_FAULT); - - status = psvc_set_attr(hdlp, id, PSVC_STATE_ATTR, state); - if (status != PSVC_SUCCESS) - return (status); - status = psvc_set_attr(hdlp, id, PSVC_FAULTID_ATTR, fault); - if (status != PSVC_SUCCESS) - return (status); - } - - status = psvc_set_attr(hdlp, id, PSVC_PREV_PRESENCE_ATTR, &presence); - if (status != PSVC_SUCCESS) - return (status); - - status = psvc_get_attr(hdlp, id, PSVC_INSTANCE_ATTR, &ps_instance); - if (status != PSVC_SUCCESS) - return (status); - - if (presence != PSVC_PRESENT) { - /* - * This is the additional code needed to remove the PS from - * the system. It removes the device drivers from the - * device tree. - */ - snprintf(pcf8574_devpath, sizeof (pcf8574_devpath), PCF8574, - devices[ps_instance][1].addr[1]); - snprintf(pcf8591_devpath, sizeof (pcf8591_devpath), PCF8591, - devices[ps_instance][0].addr[1]); - snprintf(fru_devpath, sizeof (fru_devpath), FRU, - devices[ps_instance][2].addr[1]); - - dev_handle = devctl_device_acquire(pcf8591_devpath, 0); - if (dev_handle == NULL) { - syslog(LOG_ERR, DEVICE_HANDLE_FAIL_MSG, - pcf8591_devpath, errno); - devctl_release(dev_handle); - return (PSVC_FAILURE); - } else if ((devctl_device_remove(dev_handle)) && - (errno != ENXIO)) { - syslog(LOG_ERR, DEVTREE_NODE_DELETE_FAILED, - pcf8591_devpath, errno); - devctl_release(dev_handle); - return (PSVC_FAILURE); - } else { - devctl_release(dev_handle); - status = PSVC_SUCCESS; - } - - dev_handle = devctl_device_acquire(pcf8574_devpath, 0); - if (dev_handle == NULL) { - syslog(LOG_ERR, DEVICE_HANDLE_FAIL_MSG, - pcf8574_devpath, errno); - devctl_release(dev_handle); - return (PSVC_FAILURE); - } else if ((devctl_device_remove(dev_handle)) && - (errno != ENXIO)) { - syslog(LOG_ERR, DEVTREE_NODE_DELETE_FAILED, - pcf8574_devpath, errno); - devctl_release(dev_handle); - return (PSVC_FAILURE); - } else { - devctl_release(dev_handle); - status = PSVC_SUCCESS; - } - - dev_handle = devctl_device_acquire(fru_devpath, 0); - if (dev_handle == NULL) { - syslog(LOG_ERR, DEVICE_HANDLE_FAIL_MSG, - fru_devpath, errno); - devctl_release(dev_handle); - return (PSVC_FAILURE); - } else if ((devctl_device_remove(dev_handle)) && - (errno != ENXIO)) { - syslog(LOG_ERR, DEVTREE_NODE_DELETE_FAILED, - fru_devpath, errno); - devctl_release(dev_handle); - return (PSVC_FAILURE); - } else { - devctl_release(dev_handle); - status = PSVC_SUCCESS; - } - - return (status); - } - - /* - * This code is to update the presences of power supply child - * devices in the event that picld was started without a power - * supply present. This call makes the devices available - * after that initial insertion. - */ - status = handle_ps_hotplug_children_presence(hdlp, id); - if (status == PSVC_FAILURE) { - return (status); - } - - /* - * We fall through to here if the device has been inserted. - * Add the devinfo tree node entry for the seeprom and attach - * the i2c seeprom driver - */ - - bus_handle = devctl_bus_acquire(I2C_NODE, 0); - if (bus_handle == NULL) { - syslog(LOG_ERR, DEVICE_HANDLE_FAIL_MSG, I2C_NODE, errno); - return (PSVC_FAILURE); - } - /* Create the deivce nodes for all 3 i2c parts on the PS */ - for (i = 0; i < 3; i++) { - ddef_hdl = devctl_ddef_alloc(devices[ps_instance][i].name, 0); - if (ddef_hdl == NULL) { - syslog(LOG_ERR, DEVICE_HANDLE_FAIL_MSG, - devices[ps_instance][i].name, errno); - return (PSVC_FAILURE); - } - status = devctl_ddef_string(ddef_hdl, "compatible", - devices[ps_instance][i].compatible); - if (status == -1) { - syslog(LOG_ERR, DEVICE_HANDLE_FAIL_MSG, - devices[ps_instance][i].name, errno); - return (PSVC_FAILURE); - } - status = devctl_ddef_int_array(ddef_hdl, "reg", 2, - devices[ps_instance][i].addr); - if (status == -1) { - syslog(LOG_ERR, DEVICE_HANDLE_FAIL_MSG, - devices[ps_instance][i].name, errno); - return (PSVC_FAILURE); - } - if (devctl_bus_dev_create(bus_handle, ddef_hdl, 0, - &dev_handle)) { - syslog(LOG_ERR, DEVTREE_NODE_CREATE_FAILED, - devices[ps_instance][i].name, errno); - return (PSVC_FAILURE); - } else - devctl_release(dev_handle); - devctl_ddef_free(ddef_hdl); - } - devctl_release(bus_handle); - - return (status); -} - -static void -shutdown_routine() -{ - static boolean_t shutdown_flag = 0; - - if (!(shutdown_flag)) { - system(shutdown_string); - shutdown_flag = 1; - } -} - -/* - * This policy checks temperature sensors to see if the fault attribute - * is set to either High or Low Shutdown. If so then it shuts the system - * down with a 1 minute warning period - */ -int32_t -psvc_shutdown_policy(psvc_opaque_t hdlp, char *id) -{ - int32_t status; - char fault[32] = {0}; - boolean_t pr; - int retry; - - status = psvc_get_attr(hdlp, id, PSVC_PRESENCE_ATTR, &pr); - if ((status != PSVC_SUCCESS) || (pr != PSVC_PRESENT)) { - return (status); - } - - retry = 0; - do { - if (retry) - (void) sleep(retry_sleep_temp_shutdown); - status = psvc_get_attr(hdlp, id, PSVC_FAULTID_ATTR, fault); - if (status != PSVC_SUCCESS) - return (status); - retry++; - } while (((strcmp(fault, PSVC_TEMP_LO_SHUT) == 0) || - (strcmp(fault, PSVC_TEMP_HI_SHUT) == 0)) && - (retry < n_retry_temp_shutdown)); - if ((strcmp(fault, PSVC_TEMP_LO_SHUT) == 0) || - (strcmp(fault, PSVC_TEMP_HI_SHUT) == 0)) { - shutdown_routine(); - } - - return (PSVC_SUCCESS); -} - -int32_t -psvc_check_disk_fault_policy_0(psvc_opaque_t hdlp, char *id) -{ - int32_t status = PSVC_SUCCESS; - int32_t i; - char curr_state[32], prev_state[32], led_state[32]; - char disk_fault[32], disk_state[32]; - static char *disk_id[DAK_MAX_DISKS] = {NULL}; - static char *led_id[DAK_MAX_DISKS] = {NULL}; - static char *parent_id[DAK_MAX_DISKS] = {NULL}; - boolean_t present; - int retry; - - /* - * Check which disk faulted, now get the disks. - * We are now going to get disk, disk parent, - * parent's leds, and check to see if parent's leds are on - */ - - if (disk_id[0] == NULL) { - for (i = 0; i < DAK_MAX_DISKS; i++) { - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_ID_ATTR, - &(disk_id[i]), PSVC_DISK, i); - if (status != PSVC_SUCCESS) - return (status); - status = psvc_get_attr(hdlp, disk_id[i], - PSVC_ASSOC_ID_ATTR, &(parent_id[i]), - PSVC_PARENT, 0); - if (status != PSVC_SUCCESS) - return (status); - status = psvc_get_attr(hdlp, parent_id[i], - PSVC_ASSOC_ID_ATTR, &(led_id[i]), - PSVC_SLOT_FAULT_LED, 0); - if (status != PSVC_SUCCESS) - return (status); - - } - } - - for (i = 0; i < DAK_MAX_DISKS; i++) { - curr_state[0] = 0; - prev_state[0] = 0; - - status = psvc_get_attr(hdlp, disk_id[i], PSVC_PRESENCE_ATTR, - &present); - if (status != PSVC_SUCCESS) - return (status); - - if (present == PSVC_ABSENT) - continue; - - /* - * Check if whether or not the led is on. - * If so, then this disk has a problem and - * set its fault and error states to bad. - * If not, then set fault and error states to good. - * If the disk underwent a change in state, then - * print out what state it's now in. - */ - - status = psvc_get_attr(hdlp, disk_id[i], PSVC_STATE_ATTR, - prev_state); - if (status != PSVC_SUCCESS) - return (status); - - retry = 0; - do { - if (retry) - (void) sleep(retry_sleep_diskfault); - status = psvc_get_attr(hdlp, led_id[i], PSVC_STATE_ATTR, - led_state); - if (status != PSVC_SUCCESS) - return (status); - retry++; - /* - * check to see if we need to retry. the conditions are: - * - * prev_state led_state retry - * -------------------------------------------------- - * PSVC_ERROR PSVC_LED_ON yes - * PSVC_OK PSVC_LED_OFF yes - * PSVC_ERROR PSVC_LED_OFF no - * PSVC_OK PSVC_LED_ON no - */ - } while ((retry < n_retry_diskfault) && - change_of_state_str(prev_state, PSVC_OK, - led_state, PSVC_LED_ON)); - - /* - * Set the disk's state and fault id according to - * what we found the disk fault sensor (disk_slot_fault_led) - * to be. - */ - if (strcmp(led_state, PSVC_LED_ON) == 0) { - strcpy(disk_fault, PSVC_GEN_FAULT); - strcpy(disk_state, PSVC_ERROR); - } else { - strcpy(disk_fault, PSVC_NO_FAULT); - strcpy(disk_state, PSVC_OK); - } - status = psvc_set_attr(hdlp, disk_id[i], PSVC_STATE_ATTR, - disk_state); - if (status != PSVC_SUCCESS) - return (status); - status = psvc_set_attr(hdlp, disk_id[i], PSVC_FAULTID_ATTR, - disk_fault); - if (status != PSVC_SUCCESS) - return (status); - /* - * Check disk states. If they differ, then print out - * the current state of the disk - */ - status = psvc_get_attr(hdlp, disk_id[i], PSVC_PREV_STATE_ATTR, - prev_state); - if (status != PSVC_SUCCESS) - return (status); - - if (strcmp(disk_state, prev_state) != 0) { - if (strcmp(disk_state, PSVC_ERROR) == 0) { - syslog(LOG_ERR, DISK_FAULT_MSG, disk_id[i]); - } else { - syslog(LOG_ERR, DISK_OK_MSG, disk_id[i]); - } - } - } - return (PSVC_SUCCESS); -} - -int32_t -psvc_update_FSP_fault_led_policy_0(psvc_opaque_t hdlp, char *id) -{ - int32_t status = PSVC_SUCCESS; - int32_t i; - int32_t dev_count, fault_state = 0; - char *dev_id; - char dev_state[32], led_state[32]; - boolean_t present; - - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_MATCHES_ATTR, &dev_count, - PSVC_DEV_FAULT_SENSOR); - if (status != PSVC_SUCCESS) - return (status); - - fault_state = 0; - - for (i = 0; i < dev_count; i++) { - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_ID_ATTR, - &dev_id, PSVC_DEV_FAULT_SENSOR, i); - if (status != PSVC_SUCCESS) - return (status); - status = psvc_get_attr(hdlp, dev_id, PSVC_PRESENCE_ATTR, - &present); - if (status != PSVC_SUCCESS) - return (status); - - if (present == PSVC_ABSENT) - continue; - - status = psvc_get_attr(hdlp, dev_id, PSVC_STATE_ATTR, - dev_state); - if (status != PSVC_SUCCESS) - return (status); - - if (strcmp(dev_state, PSVC_ERROR) == 0) { - fault_state = 1; - } - } - if (fault_state == 1) { - status = psvc_get_attr(hdlp, id, PSVC_STATE_ATTR, led_state); - if (status != PSVC_SUCCESS) - return (status); - if (strcmp(led_state, PSVC_OFF) == 0) { - status = psvc_set_attr(hdlp, id, PSVC_STATE_ATTR, - PSVC_ON); - if (status != PSVC_SUCCESS) - return (status); - } - } else { - status = psvc_get_attr(hdlp, id, PSVC_STATE_ATTR, led_state); - if (status != PSVC_SUCCESS) - return (status); - if (strcmp(led_state, PSVC_ON) == 0) { - status = psvc_set_attr(hdlp, id, PSVC_STATE_ATTR, - PSVC_OFF); - if (status != PSVC_SUCCESS) - return (status); - } - } - status = update_gen_fault_led(hdlp, GEN_FAULT_LED); - - return (status); -} - -int32_t -update_gen_fault_led(psvc_opaque_t hdlp, char *id) -{ - int32_t status = PSVC_SUCCESS; - int32_t i; - int32_t led_count, fault_state; - char *led_id; - char led_state[32]; - - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_MATCHES_ATTR, &led_count, - PSVC_DEV_FAULT_SENSOR); - if (status != PSVC_SUCCESS) - return (status); - - fault_state = 0; - - for (i = 0; i < led_count; i++) { - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_ID_ATTR, - &led_id, PSVC_DEV_FAULT_SENSOR, i); - if (status != PSVC_SUCCESS) - return (status); - status = psvc_get_attr(hdlp, led_id, PSVC_STATE_ATTR, - led_state); - if (status != PSVC_SUCCESS) - return (status); - - if (strcmp(led_state, PSVC_ON) == 0) { - fault_state = 1; - } - } - - if (fault_state == 1) { - status = psvc_get_attr(hdlp, id, PSVC_STATE_ATTR, led_state); - if (status != PSVC_SUCCESS) - return (status); - if (strcmp(led_state, PSVC_OFF) == 0) { - status = psvc_set_attr(hdlp, id, PSVC_STATE_ATTR, - PSVC_ON); - if (status != PSVC_SUCCESS) - return (status); - } - } else { - status = psvc_get_attr(hdlp, id, PSVC_STATE_ATTR, led_state); - if (status != PSVC_SUCCESS) - return (status); - if (strcmp(led_state, PSVC_ON) == 0) { - status = psvc_set_attr(hdlp, id, PSVC_STATE_ATTR, - PSVC_OFF); - if (status != PSVC_SUCCESS) - return (status); - } - } - - return (status); -} - - -/* - * This function detects whether the module present in the dakatari's - * CPU slot is a CPU module or a Zulu (XVR-4000). - * Based on this detection it also sets the appropriate temperature sensors - * to HOTPLUGGED, so that it works properly with check_temp() function - */ -#define MAX_MODULE_SIZE 20 -#define MAX_TEMP_SENSOR_SIZE 30 - -int32_t -psvc_update_cpu_module_card_node_0(psvc_opaque_t hdlp, char *id) -{ - int32_t set_temp_sensor_properties(psvc_opaque_t, char *); - int32_t remove_module_node(psvc_opaque_t, char *); - int32_t status = PSVC_SUCCESS; - fru_info_t fru_data; - char *fru, seg_name[2]; - int8_t seg_count, module_card; - int32_t match_count, i, j, seg_desc_start = 0x1806, module_address; - int32_t seg_found; - boolean_t present; - seg_desc_t segment; - char other_module_id[MAX_MODULE_SIZE]; - char cpu_temp_sensor1[MAX_TEMP_SENSOR_SIZE]; - char cpu_temp_sensor2[MAX_TEMP_SENSOR_SIZE]; - char zulu_temp_sensor1[MAX_TEMP_SENSOR_SIZE]; - char zulu_temp_sensor2[MAX_TEMP_SENSOR_SIZE]; - int offset = 0x7; - - status = psvc_get_attr(hdlp, id, PSVC_PRESENCE_ATTR, &present); - if ((status != PSVC_SUCCESS) || (present != PSVC_PRESENT)) { - return (status); - } - - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_MATCHES_ATTR, &match_count, - PSVC_FRU); - if (status == PSVC_FAILURE) { - return (status); - } - - for (i = 0; i < match_count; i++) { - seg_found = 0; - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_ID_ATTR, &fru, - PSVC_FRU, i); - if (status != PSVC_SUCCESS) - return (status); - - fru_data.buf_start = 0x1805; - fru_data.buf = (char *)&seg_count; - fru_data.read_size = 1; - - status = psvc_get_attr(hdlp, fru, PSVC_FRU_INFO_ATTR, - &fru_data); - if (status != PSVC_SUCCESS) { - return (status); - } - - for (j = 0; (j < seg_count) && (!seg_found); j++) { - fru_data.buf_start = seg_desc_start; - fru_data.buf = seg_name; - fru_data.read_size = 2; - - status = psvc_get_attr(hdlp, fru, PSVC_FRU_INFO_ATTR, - &fru_data); - if (status != PSVC_SUCCESS) { - syslog(LOG_ERR, GET_ATTR_FRU_FAILED_MSG); - return (status); - } - - seg_desc_start = seg_desc_start + 2; - fru_data.buf_start = seg_desc_start; - fru_data.buf = (char *)&segment; - fru_data.read_size = sizeof (seg_desc_t); - - status = psvc_get_attr(hdlp, fru, PSVC_FRU_INFO_ATTR, - &fru_data); - if (status != PSVC_SUCCESS) { - syslog(LOG_ERR, GET_ATTR_FRU_FAILED_MSG); - return (status); - } - seg_desc_start = seg_desc_start + sizeof (seg_desc_t); - if (memcmp(seg_name, "SC", 2) == 0) - seg_found = 1; - } - - if (seg_found) { - module_address = segment.segoffset + offset; - fru_data.buf_start = module_address; - fru_data.buf = (char *)&module_card; - fru_data.read_size = 1; - status = psvc_get_attr(hdlp, fru, PSVC_FRU_INFO_ATTR, - &fru_data); - if (status != PSVC_SUCCESS) { - syslog(LOG_ERR, GET_ATTR_FRU_FAILED_MSG); - return (status); - } - } else { - syslog(LOG_ERR, NO_FRU_INFO_MSG, id); - } - } - - if (strcmp(id, "ZULU_1_3_MOD_CARD") == 0) { - strlcpy(other_module_id, "CPU_1_3_MOD_CARD", MAX_MODULE_SIZE); - - strlcpy(cpu_temp_sensor1, "CPU1_DIE_TEMPERATURE_SENSOR", - MAX_TEMP_SENSOR_SIZE); - strlcpy(cpu_temp_sensor2, "CPU3_DIE_TEMPERATURE_SENSOR", - MAX_TEMP_SENSOR_SIZE); - - strlcpy(zulu_temp_sensor1, "ZULU1_DIE_TEMPERATURE_SENSOR", - MAX_TEMP_SENSOR_SIZE); - strlcpy(zulu_temp_sensor2, "ZULU3_DIE_TEMPERATURE_SENSOR", - MAX_TEMP_SENSOR_SIZE); - } - - if (strcmp(id, "ZULU_4_6_MOD_CARD") == 0) { - strlcpy(other_module_id, "CPU_4_6_MOD_CARD", MAX_MODULE_SIZE); - - strlcpy(cpu_temp_sensor1, "CPU4_DIE_TEMPERATURE_SENSOR", - MAX_TEMP_SENSOR_SIZE); - strlcpy(cpu_temp_sensor2, "CPU6_DIE_TEMPERATURE_SENSOR", - MAX_TEMP_SENSOR_SIZE); - - strlcpy(zulu_temp_sensor1, "ZULU4_DIE_TEMPERATURE_SENSOR", - MAX_TEMP_SENSOR_SIZE); - strlcpy(zulu_temp_sensor2, "ZULU6_DIE_TEMPERATURE_SENSOR", - MAX_TEMP_SENSOR_SIZE); - } - - - /* - * If the module in the CPU slot is a Zulu (XVR-4000), then - * location 0x1EB0 in its FRUid prom has a value 0xFB. - * If Zulu (XVR-4000) is detected, delete the CPU node, otherwise - * delete the Zulu node. Also set the temperature sensor value to - * HOTPLUGGED for absent temperature sensors. - */ - if ((module_card & 0xff) == 0xfb) { - status = set_temp_sensor_properties(hdlp, cpu_temp_sensor1); - if (status == PSVC_FAILURE) { - return (status); - } - - status = set_temp_sensor_properties(hdlp, cpu_temp_sensor2); - if (status == PSVC_FAILURE) { - return (status); - } - - /* - * Remove CPU node - */ - status = remove_module_node(hdlp, other_module_id); - if (status == PSVC_FAILURE) { - return (status); - } - } else { - status = set_temp_sensor_properties(hdlp, zulu_temp_sensor1); - if (status == PSVC_FAILURE) { - return (status); - } - status = set_temp_sensor_properties(hdlp, zulu_temp_sensor2); - if (status == PSVC_FAILURE) { - return (status); - } - - /* - * Remove Zulu (XVR-4000) node - */ - status = remove_module_node(hdlp, id); - if (status == PSVC_FAILURE) { - return (status); - } - } - - return (PSVC_SUCCESS); -} - - -/* - * Remove the CPU slot's module node - */ -int32_t -remove_module_node(psvc_opaque_t hdlp, char *id) -{ - char parent_path[256]; - picl_nodehdl_t child_node; - - /* convert name to node, and parent path */ - psvcplugin_lookup(id, parent_path, &child_node); - /* Device removed */ - ptree_delete_node(child_node); - - return (PSVC_SUCCESS); -} - - -/* - * Set absent temperature sensor values to HOTPLUGGED - */ -int32_t -set_temp_sensor_properties(psvc_opaque_t hdlp, char *id) -{ - char state[32]; - int32_t status = PSVC_SUCCESS; - - status = psvc_get_attr(hdlp, id, PSVC_STATE_ATTR, state); - if (status == PSVC_FAILURE) { - return (status); - } - - if (strcmp(state, PSVC_HOTPLUGGED) != 0) { - strcpy(state, PSVC_HOTPLUGGED); - - status = psvc_set_attr(hdlp, id, PSVC_STATE_ATTR, state); - if (status == PSVC_FAILURE) { - return (status); - } - } - - return (PSVC_SUCCESS); -} diff --git a/usr/src/cmd/picl/plugins/sun4u/enchilada/Makefile b/usr/src/cmd/picl/plugins/sun4u/enchilada/Makefile deleted file mode 100644 index 2ed56718e2..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/enchilada/Makefile +++ /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, 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 2002 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# ident "%Z%%M% %I% %E% SMI" -# -# cmd/picl/plugins/sun4u/enchilada/Makefile -# - -SUBDIRS= frudata frutree envd - -MSGSUBDIRS= envd - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -.KEEP_STATE: - -all install clean clobber: $(SUBDIRS) - -_msg: $(MSGSUBDIRS) - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/enchilada/envd/Makefile b/usr/src/cmd/picl/plugins/sun4u/enchilada/envd/Makefile deleted file mode 100644 index 257317513b..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/enchilada/envd/Makefile +++ /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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# cmd/picl/plugins/sun4u/enchilada/envd/Makefile -# -include $(SRC)/Makefile.psm - -LIBRARY= libpiclenvd.a -VERS= .1 - -OBJECTS= piclenvd.o piclenvsetup.o - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Blade-2500 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -CPPFLAGS += -D_POSIX_PTHREAD_SEMANTICS -CPPFLAGS += -I$(SRC)/uts/sun4u/ -I$(SRC)/uts/common/ -CPPFLAGS += -I$(SRC)/uts/sun4u/enchilada -CPPFLAGS += -I$(SRC)/cmd/picl/plugins/lib/picld_pluginutil - -SRCS= $(OBJECTS:%.o=%.c) - -LIBS = $(DYNLIB) - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONF= envmodel.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 -INFOS= envmodel.info - - -DYNFLAGS += -R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins -LDLIBS += -L$(SRC)/lib/libpicltree/$(MACH) -LDLIBS += -L$(SRC)/cmd/picl/plugins/common/devtree -LDLIBS += -L$(SRC)/cmd/picl/plugins/lib/picld_pluginutil/$(MACH) -LDLIBS += -L$(ROOT)/usr/lib/picl/plugins -lpicldevtree -lpicltree -LDLIBS += -lpicld_pluginutil -LDLIBS += -ldevinfo -lc - -.KEEP_STATE: - -SUBDIRS= - -POFILE = piclenvd_enchilada.po -POFILES = $(SRCS:%.c=%.po) - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -all: $(LIBS) $(CONF) $(LIBLINKS) - -install: $(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) $(ROOTCONF) - -$(CONF): $(INFOS) - $(RM) $@ - $(CPP) envmodel.info > $@ - - -$(POFILE): $(POFILES) - $(CAT) $(POFILES) > $(POFILE) - -_msg: $(MSGDOMAIN) $(POFILE) - $(RM) $(MSGDOMAIN)/$(POFILE) - $(CP) $(POFILE) $(MSGDOMAIN)/$(POFILE) - -$(MSGDOMAIN): - $(INS.dir) - - -$(LIBLINKS): FRC - $(RM) $@; $(SYMLINK) $(DYNLIB) $@ - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/enchilada/envd/envd.h b/usr/src/cmd/picl/plugins/sun4u/enchilada/envd/envd.h deleted file mode 100644 index 27051316c0..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/enchilada/envd/envd.h +++ /dev/null @@ -1,546 +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 _ENVD_H -#define _ENVD_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#define DISK_SCAN_INTERVAL 10 -#define DISK_HIGH_WARN_TEMPERATURE 55 -#define DISK_LOW_WARN_TEMPERATURE 5 -#define DISK_HIGH_SHUTDOWN_TEMPERATURE 60 -#define DISK_LOW_SHUTDOWN_TEMPERATURE 0 -#define DISK_INVALID_TEMP 0xFFFF -#define LSI1030_VENDOR_ID 0x1000 -#define LSI1030_DEVICE_ID 0x30 -#define SENSORPOLL_INTERVAL 4 -#define INTERRUPTPOLL_INTERVAL 2 -#define WARNING_INTERVAL 30 -#define DISK_WARNING_INTERVAL 30 -#define DISK_WARNING_DURATION 20 -#define SHUTDOWN_INTERVAL 60 -#define DISK_SHUTDOWN_INTERVAL 30 -#define ENV_CONF_FILE "envmodel.conf" -#define TUNABLE_CONF_FILE "piclenvd.conf" -#define PM_DEVICE "/dev/pm" -#define SHUTDOWN_CMD "/usr/sbin/shutdown -y -g 60 -i 5" -#define PICL_PLUGINS_NODE "plugins" -#define PICL_ENVIRONMENTAL_NODE "environmental" - -/* - * ADC Sample of ADM in Khz, currently 11.2 KHz - */ -#define ADCSAMPLE 11250 - -/* - * Enchilada Platform Details - */ -#define MAX_SENSORS 6 -#define MAX_FANS 4 -#define MAX_HWMS 2 - -/* - * ADM1031 Hardware Monitor IDs - * Used as index into arrays - */ -#define CPU_HWM_ID 0 -#define SYS_HWM_ID 1 - -#define CPU_HWM_DEVFS \ - "/devices/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,58:control" -#define SYS_HWM_DEVFS \ - "/devices/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c:control" - -#define DISK0_PHYSPATH \ - "/pci@1d,700000/scsi@4/sd@0,0" - -#define DISK1_PHYSPATH \ - "/pci@1d,700000/scsi@4/sd@1,0" - -#define ENV_DISK0_DEVFS \ - "/devices/pci@1d,700000/scsi@4/sd@0,0:a,raw" - -#define ENV_DISK1_DEVFS \ - "/devices/pci@1d,700000/scsi@4/sd@1,0:a,raw" - -#define DISK0_NODE_PATH \ - "name:/platform/pci@1d,700000/scsi@4/sd@0,0" - -#define DISK1_NODE_PATH \ - "name:/platform/pci@1d,700000/scsi@4/sd@1,0" - - -#define SCSI_CONTROLLER_NODE_PATH \ - "name:/platform/pci@1d,700000/scsi@4" - -#define HWM_FAN1 0 -#define HWM_FAN2 1 - -/* - * Enchilada sensor IDs as used in FRUID segment - */ -#define CPU0_SENSOR_ID 0 -#define CPU1_SENSOR_ID 1 -#define INT_AMB0_SENSOR_ID 5 -#define SYS_OUT_SENSOR_ID 3 -#define INT_AMB1_SENSOR_ID 4 -#define SYS_IN_SENSOR_ID 2 -#define MAX_SENSOR_ID 5 - -/* - * Enchilada fan IDs used in FRUID segment - */ -#define CPU0_FAN_ID 0 -#define CPU1_FAN_ID 1 -#define SYSTEM_OUT_FAN_ID 2 -#define SYSTEM_INTAKE_FAN_ID 3 -#define DIMM_FAN_ID 4 - -#define DISK0_ID 0 -#define DISK1_ID 1 - - -/* CPU Path Names */ -#define CPU0_PATH "_class:/jbus/cpu?ID=0" -#define CPU1_PATH "_class:/jbus/cpu?ID=1" - -/* DIMM Fan controller path Name */ -#define DIMM_FAN_CONTROLLER_PATH \ - "name:/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,52" -/* - * devfs-path for various fans and their min/max speeds - */ -#define ENV_CPU0_FAN_DEVFS \ - "/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,58:fan_1" -#define ENV_CPU1_FAN_DEVFS \ - "/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,58:fan_2" -#define ENV_SYSTEM_INTAKE_FAN_DEVFS \ - "/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c:fan_1" -#define ENV_SYSTEM_OUT_FAN_DEVFS \ - "/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c:fan_2" -#define ENV_DIMM_FAN_DEVFS \ - "/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,52:fan_1" - -#define FAN_RANGE_DEFAULT 4 -#define CPU_FAN_SPEED_MIN 14 -#define CPU_FAN_SPEED_MAX 100 - -#define SYSTEM_OUT_FAN_SPEED_MIN 14 -#define SYSTEM_OUT_FAN_SPEED_MAX 100 - -#define SYSTEM_INTAKE_FAN_SPEED_MIN 14 -#define SYSTEM_INTAKE_FAN_SPEED_MAX 100 - - -/* - * devfs-path for various temperature sensors and CPU platform path - */ -#define SENSOR_CPU0_DIE_DEVFS \ - "/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,58:remote_1" -#define SENSOR_CPU1_DIE_DEVFS \ - "/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,58:remote_2" -#define SENSOR_INT_AMB_0_DEVFS \ - "/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,58:local" - -#define SENSOR_SYS_IN_DEVFS \ - "/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c:remote_1" -#define SENSOR_SYS_OUT_DEVFS \ - "/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c:remote_2" -#define SENSOR_INT_AMB_1_DEVFS \ - "/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c:local" - -/* - * Temperature type - */ -typedef int16_t tempr_t; - - -/* - * Fan names - */ -#define ENV_SYSTEM_OUT_FAN "outtake-fan" -#define ENV_CPU0_FAN "cpu0-fan" -#define ENV_SYSTEM_INTAKE_FAN "intake-fan" -#define ENV_CPU1_FAN "cpu1-fan" -#define ENV_DIMM_FAN "dimm-fan" - -#define ENV_DISK0 "hard-disk0" -#define ENV_DISK1 "hard-disk1" -/* - * Sensor names - */ -#define SENSOR_CPU0_DIE "cpu0" -#define SENSOR_CPU1_DIE "cpu1" -#define SENSOR_INT_AMB_0 "int-amb0" -#define SENSOR_SYS_IN "sys-in" -#define SENSOR_SYS_OUT "sys-out" -#define SENSOR_INT_AMB_1 "int-amb1" - -/* Bit Map of ADM 1031 Status 1/2 Registers */ -enum adm1031 { - FANFAULT = 0x2, - REMOTEHIGH = 0x4, - REMOTELOW = 0x8, - REMOTETHERN = 0x10, - LHIGH = 0x40, - LLOW = 0x80 -} adm1031_t; - -/* ADM Stat 1/2 Mask */ -enum adm1031Mask { - STAT1MASK = 0xdc, - STAT2MASK = 0x1c -} adm1031Mask_t; - -/* - * ES segment related structures - */ -typedef struct id_off { - uint_t id; - ushort_t offset; -} id_off_t; - -typedef struct fan_ctl_pair { - uchar_t tMin; - uchar_t tRange; -} fan_ctl_pair_t; - -typedef struct Correction_Pair { - uchar_t measured; - uchar_t corrected; -} Correction_Pair_t; - -#define ES_SENSOR_POLICY_LEN 8 -#define ES_CORRECTION_PAIRS 12 - -typedef struct sensor_ctrl_blk { - uchar_t high_power_off; - uchar_t high_shutdown; - uchar_t high_warning; - uchar_t low_warning; - uchar_t low_shutdown; - uchar_t low_power_off; - uchar_t sensorPolicy[ES_SENSOR_POLICY_LEN]; - ushort_t correctionEntries; - Correction_Pair_t correctionPair[ES_CORRECTION_PAIRS]; -} sensor_ctrl_blk_t; - - -#define ES_FAN_CTL_PAIRS 4 - -typedef struct fan_ctrl_blk { - uchar_t tSpinUp; - uchar_t minFanSpeed; - ushort_t setPoint; - ushort_t loopGain; - ushort_t loopBias; - ushort_t hysteresis; - ushort_t fanViabTestInt; - ushort_t fanViabTestThresh; - ushort_t grossFanThresh; - uchar_t no_ctl_pairs; - fan_ctl_pair_t fan_ctl_pairs[ES_FAN_CTL_PAIRS]; -} fan_ctrl_blk_t; - -#define TEMP_IN_WARNING_RANGE(val, sensorp) \ - ((val) > (sensorp)->es_ptr->high_warning || \ - (val) < (char)((sensorp)->es_ptr->low_warning)) - -#define TEMP_IN_SHUTDOWN_RANGE(val, sensorp) \ - ((val) > (sensorp)->es_ptr->high_shutdown || \ - (val) < (char)((sensorp)->es_ptr->low_shutdown)) - -#define DISK_TEMP_IN_WARNING_RANGE(val, diskp) \ - ((val) > (diskp)->high_warning || \ - (val) < (char)((diskp)->low_warning)) - -#define DISK_TEMP_IN_SHUTDOWN_RANGE(val, diskp) \ - ((val) > (diskp)->high_shutdown || \ - (val) < (char)((diskp)->low_shutdown)) - -/* - * Macros to fetch 16 and 32 bit data from unaligned address - */ -#define GET_UNALIGN16(addr) \ - (((*(uint8_t *)addr) << 8) | *((uint8_t *)addr + 1)) - -#define GET_UNALIGN32(addr) \ - (((*(uint8_t *)addr) << 24) | (*((uint8_t *)addr + 1) << 16) | \ - ((*((uint8_t *)addr + 2)) << 8) | (*((uint8_t *)addr + 3))) - - -/* - * SEEPROM section header layout and location - */ -typedef struct { - uint8_t header_tag; /* section header tag */ - uint8_t header_version[2]; /* header version (msb) */ - uint8_t header_length; /* header length */ - uint8_t header_crc8; /* crc8 */ - uint8_t segment_count; /* total number of segments */ -} section_layout_t; - -#define SECTION_HDR_OFFSET 0x1800 -#define SECTION_HDR_TAG 0x08 -#define SECTION_HDR_VER 0x0001 -#define SECTION_HDR_LENGTH 0x06 - -/* - * SEEPROM segment header layout - */ -typedef struct { - uint16_t name; /* segment name */ - uint16_t descriptor[2]; /* descriptor (msb) */ - uint16_t offset; /* segment data offset */ - uint16_t length; /* segment length */ -} segment_layout_t; - -#define ENVSEG_NAME 0x4553 /* environmental segment name */ -#define ENVSEG_VERSION 2 /* environmental segment version */ - -#define SENSOR_WARN 1 -#define SENSOR_OK 0 - -/* - * SEEPROM environmental segment header layout - */ -typedef struct { - uint16_t sensor_id[2]; /* unique sensor ID (on this FRU) */ - uint16_t offset; /* sensor data record offset */ -} envseg_sensor_t; - -typedef struct { - uint8_t version; /* envseg version */ - uint8_t sensor_count; /* total number of sensor records */ - envseg_sensor_t sensors[1]; /* sensor table (variable length) */ -} envseg_layout_t; - -/* - * FRU envseg list - */ -typedef struct fruenvseg { - struct fruenvseg *next; /* next entry */ - char *fru; /* FRU SEEPROM path */ - void *envsegbufp; /* envseg data buffer */ - int envseglen; /* envseg length */ -} fruenvseg_t; - -#define I2C_DEVFS "/devices/pci@1e,600000/isa@7/i2c@0,320" -#define MBFRU_DEV "/motherboard-fru-prom@0,a2:motherboard-fru-prom" -#define FRU_SEEPROM_NAME "motherboard-fru-prom" - -/* - * Table data structures - */ - -typedef struct { - int32_t x; - int32_t y; -} point_t; - -typedef struct { - int nentries; - point_t *xymap; -} table_t; - -/* - * Temperature sensor related data structure - */ -typedef struct env_sensor { - char *name; /* sensor name */ - char *devfs_path; /* sensor device devfs path */ - sensor_ctrl_blk_t *es_ptr; - int id; - int hwm_id; - void *fanp; - int fd; /* device file descriptor */ - int error; /* error flag */ - boolean_t present; /* sensor present */ - tempr_t cur_temp; /* current temperature */ - time_t warning_tstamp; /* last warning time (secs) */ - time_t shutdown_tstamp; /* shutdown temp time (secs) */ - boolean_t shutdown_initiated; /* shutdown initated */ - table_t *crtbl; /* Correction Table */ - tempr_t tmin; -} env_sensor_t; - -extern env_sensor_t *sensor_lookup(char *sensor_name); -extern int get_temperature(env_sensor_t *, tempr_t *); - -typedef struct env_disk { - char *name; /* disk name */ - char *devfs_path; /* disk device devfs path */ - char *physpath; /* used to be probe for IDLW TIME */ - char *nodepath; /* used to detect presence of disk */ - uchar_t id; - int fd; /* device file descriptor */ - boolean_t present; /* disk present */ - boolean_t tpage_supported; /* Temperature page */ - int current_temp; - int ref_temp; - int reliability_temp; - uchar_t high_shutdown; - uchar_t high_warning; - uchar_t low_warning; - uchar_t low_shutdown; - time_t warning_start; /* warning start time (secs) */ - time_t warning_tstamp; /* last warning time (secs) */ - time_t shutdown_tstamp; /* shutdown temp time (secs) */ - boolean_t shutdown_initiated; /* shutdown initated */ -} env_disk_t; - -extern env_disk_t *disk_lookup(char *disk_name); -extern int disk_temperature(env_disk_t *, tempr_t *); - -/* - * Fan information data structure - */ -typedef int fanspeed_t; - -typedef struct env_fan { - char *name; /* fan name */ - char *devfs_path; /* fan device devfs path */ - fan_ctrl_blk_t *es_ptr; - uchar_t id; - fanspeed_t speed_min; /* minimum speed */ - fanspeed_t speed_max; /* maximum speed */ - int forced_speed; /* forced (fixed) speed */ - int fd; /* device file descriptor */ - boolean_t present; /* fan present */ - int speedrange; /* speed range N */ - int fanstat; /* Fan status */ - uint8_t cspeed; /* Current speed (tach) */ - uint8_t lspeed; /* Last speed (tach) */ - int conccnt; /* Concurrent tach count */ -} env_fan_t; - -/* - * Tuneables - */ -typedef struct env_tuneable { - char *name; - char type; - void *value; - int (*rfunc)(ptree_rarg_t *, void *); - int (*wfunc)(ptree_warg_t *, const void *); - int nbytes; - picl_prophdl_t proph; -} env_tuneable_t; - -extern env_fan_t *fan_lookup(char *fan_name); -extern int get_fan_speed(env_fan_t *, fanspeed_t *); -extern int set_fan_speed(env_fan_t *, fanspeed_t); - -extern int env_debug; -extern void envd_log(int pri, const char *fmt, ...); - -/* - * Various messages - */ -#define ENVD_PLUGIN_INIT_FAILED \ - gettext("SUNW_piclenvd: initialization failed!\n") - -#define ENVD_PICL_SETUP_FAILED \ - gettext("SUNW_piclenvd: PICL setup failed!\n") - -#define PM_THREAD_CREATE_FAILED \ - gettext("SUNW_piclenvd: pmthr thread creation failed!\n") - -#define PM_THREAD_EXITING \ - gettext("SUNW_piclenvd: pmthr exiting! errno:%d %s\n") - -#define DISK_TEMP_THREAD_EXITING \ - gettext("SUNW_piclenvd: Disk temp thread exiting." \ - " Disk temperature will not be monitored. errno:%d %s\n") - -#define ENVTHR_THREAD_CREATE_FAILED \ - gettext("SUNW_piclenvd: envthr thread creation failed!\n") - -#define ENV_SHUTDOWN_MSG \ - gettext("SUNW_piclenvd: '%s' sensor temperature %d outside safe " \ - "limits (%d...%d). Shutting down the system.\n") - -#define ENV_DIMM_FAN_FAILURE_SHUTDOWN_MSG \ - gettext("SUNW_piclenvd: %s has Failed.\n" \ - "(rpm = %s status = %s command = %s debug = %s).\n" \ - "Shutting down the system to protect the memory modules.\n") - -#define ENV_WARNING_MSG \ - gettext("SUNW_piclenvd: '%s' sensor temperature %d outside safe " \ - "operating limits (%d...%d).\n") - -#define ENV_FAN_OPEN_FAIL \ - gettext("SUNW_piclenvd: can't open '%s' fan path:%s errno:%d %s\n") - -#define ENV_SENSOR_OPEN_FAIL \ - gettext("SUNW_piclenvd: can't open '%s' sensor path:%s errno:%d %s\n") - -#define ENV_SENSOR_ACCESS_FAIL \ - gettext("SUNW_piclenvd: can't access '%s' sensor errno:%d %s\n") - -#define ENV_SENSOR_ACCESS_OK \ - gettext("SUNW_piclenvd: '%s' sensor is accessible now.\n") - -#define ENV_FRU_OPEN_FAIL \ - gettext("SUNW_piclenvd: can't open FRU SEEPROM path:%s errno:%d %s\n") - -#define ENV_FRU_BAD_ENVSEG \ - gettext("SUNW_piclenvd: version mismatch or environmental segment " \ - "header too short in FRU SEEPROM %s\n") - -#define ENV_FRU_BAD_SENSOR_ENTRY \ - gettext("SUNW_piclenvd: discarding bad sensor entry (sensor_id " \ - "%x sensor '%s') in FRU SEEPROM %s\n") - -#define ENV_FRU_SENSOR_MAP_NOMEM \ - gettext("SUNW_piclenvd: out of memory, discarding sensor map for " \ - "sensor_id %x (sensor '%s') in FRU SEEPROM %s\n") - -#define ENV_ADM_OPEN_FAIL \ - gettext("SUNW_piclenvd: can't open hwm path:%s errno:%d %s\n") - -#define ENV_ADM_MANUAL_MODE \ - gettext("SUNW_piclenvd: Cannot change the ADM Chip to Manual mode") - -#define ENV_ADM_AUTO_MODE \ - gettext("SUNW_piclenvd: Cannot change the ADM Chip to Auto mode") - -#define ENV_FAN_FAULT \ - gettext("SUNW_piclenvd: ADM %s, Fan %s Fault") - -#ifdef __cplusplus -} -#endif - -#endif /* _ENVD_H */ diff --git a/usr/src/cmd/picl/plugins/sun4u/enchilada/envd/envmodel.info b/usr/src/cmd/picl/plugins/sun4u/enchilada/envd/envmodel.info deleted file mode 100644 index 2282ab246b..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/enchilada/envd/envmodel.info +++ /dev/null @@ -1,194 +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" - -/* - * This is the environmental plug-in configuration file for - * Taco platform. - */ - -VERSION 1.1 - -VERBOSE 1 - -/* - * Fan names - */ -#define ENV_SYSTEM_OUT_FAN outtake-fan -#define ENV_CPU0_FAN cpu0-fan -#define ENV_SYSTEM_INTAKE_FAN intake-fan -#define ENV_CPU1_FAN cpu1-fan -#define ENV_DIMM_FAN dimm-fan - -/* - * Sensor ids - */ -#define SENSOR_CPU0_DIE cpu0 -#define SENSOR_CPU1_DIE cpu1 -#define SENSOR_INT_AMB_0 int-amb0 -#define SENSOR_SYS_IN sys-in -#define SENSOR_SYS_OUT sys-out -#define SENSOR_INT_AMB_1 int-amb1 - -/* - * Hard disk sensor ids - */ -#define ENV_DISK0 hard-disk0 -#define ENV_DISK1 hard-disk1 - -/* - * Enchilada sensor IDs as used in FRUID segment - */ -#define CPU0_SENSOR_ID 0 -#define CPU1_SENSOR_ID 1 -#define INT_AMB0_SENSOR_ID 5 -#define SYS_OUT_SENSOR_ID 3 -#define INT_AMB1_SENSOR_ID 4 -#define SYS_IN_SENSOR_ID 2 - -/* - * Enchilada fan IDs used in FRUID segment - */ -#define CPU0_FAN_ID 0 -#define CPU1_FAN_ID 1 -#define SYSTEM_OUT_FAN_ID 2 -#define SYSTEM_INTAKE_FAN_ID 3 - -#define DIMM_FAN_ID 4 - -#define DISK0_ID 0 -#define DISK1_ID 1 -/* - * Publish the labels for sensors and fans - */ - -/* - * Hardware monitor 0 - at 0,58 - */ -name:/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,58/SENSOR_CPU0_DIE - PROP Label string r 0 "Die" - PROP ID int r 4 CPU0_SENSOR_ID - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,58/SENSOR_CPU1_DIE - PROP Label string r 0 "Die" - PROP ID int r 4 CPU1_SENSOR_ID - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,58/SENSOR_INT_AMB_0 - PROP Label string r 0 "Ambient" - PROP ID int r 4 INT_AMB0_SENSOR_ID - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,58/ENV_CPU0_FAN - PROP Label string r 0 "CPU0" - PROP ID int r 4 CPU0_FAN_ID - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,58/ENV_CPU1_FAN - PROP Label string r 0 "CPU1" - PROP ID int r 4 CPU1_FAN_ID - -/* - * Hardware monitor 1 - at 0,5c - */ -name:/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c/SENSOR_SYS_IN - PROP Label string r 0 "Ambient" - PROP ID int r 4 SYS_IN_SENSOR_ID - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c/SENSOR_INT_AMB_1 - PROP Label string r 0 "Ambient" - PROP ID int r 4 INT_AMB1_SENSOR_ID - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c/SENSOR_SYS_OUT - PROP Label string r 0 "Ambient" - PROP ID int r 4 SYS_OUT_SENSOR_ID - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c/ENV_SYSTEM_INTAKE_FAN - PROP Label string r 0 "Intake" - PROP ID int r 4 SYSTEM_INTAKE_FAN_ID - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c/ENV_SYSTEM_OUT_FAN - PROP Label string r 0 "Outtake" - PROP ID int r 4 SYSTEM_OUT_FAN_ID - -/* - * PIC Microcontroller at 0,52 - */ -name:/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,52/ENV_DIMM_FAN - PROP Label string r 0 "dimm-fan" - PROP ID int r 4 DIMM_FAN_ID - -/* - * Internal hard disks - */ -name:/platform/pci@1d,700000/scsi@4/sd@0,0/ENV_DISK0 - PROP Label string r 0 "hard-disk0" - PROP ID int r 4 DISK0_ID - -name:/platform/pci@1d,700000/scsi@4/sd@1,0/ENV_DISK1 - PROP Label string r 0 "hard-disk1" - PROP ID int r 4 DISK1_ID - -/* - * Associate the environmental information with devices. - */ - -/* - * CPU 0 environmental information - */ -_class:/jbus/cpu?ID=0 -TABLE Environment - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ /platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,58/SENSOR_CPU0_DIE - ENDROW - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ /platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c/SENSOR_SYS_IN - ENDROW - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ /platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,58/ENV_CPU0_FAN - ENDROW -ENDTABLE - -/* - * CPU 1 environmental information - */ -_class:/jbus/cpu?ID=1 -TABLE Environment - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ /platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,58/SENSOR_CPU1_DIE - ENDROW - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ /platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c/SENSOR_SYS_IN - ENDROW - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ /platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,58/ENV_CPU1_FAN - ENDROW -ENDTABLE - diff --git a/usr/src/cmd/picl/plugins/sun4u/enchilada/envd/piclenvd.c b/usr/src/cmd/picl/plugins/sun4u/enchilada/envd/piclenvd.c deleted file mode 100644 index a780451ec1..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/enchilada/envd/piclenvd.c +++ /dev/null @@ -1,2879 +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" - -/* - * This file contains the environmental PICL plug-in module. - */ - -/* - * This plugin sets up the PICLTREE for Enchilada WS. - * It provides functionality to get/set temperatures and - * fan speeds. - * - * The environmental policy defaults to the auto mode - * as programmed by OBP at boot time. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "envd.h" -#include -#include - - -/* - * PICL plugin entry points - */ -static void piclenvd_register(void); -static void piclenvd_init(void); -static void piclenvd_fini(void); - -/* - * Env setup routines - */ -extern void env_picl_setup(void); -extern void env_picl_destroy(void); -extern int env_picl_setup_tuneables(void); - -/* - * Sleep routine used for polling - */ -static int get_dimm_fan_speed(int, fanspeed_t *); -static int is_dimm_fan_failed(void); - -#pragma init(piclenvd_register) - -/* - * Plugin registration information - */ -static picld_plugin_reg_t my_reg_info = { - PICLD_PLUGIN_VERSION, - PICLD_PLUGIN_CRITICAL, - "SUNW_piclenvd", - piclenvd_init, - piclenvd_fini, -}; - -#define REGISTER_INFORMATION_STRING_LENGTH 16 -static char dimm_fan_rpm_string[REGISTER_INFORMATION_STRING_LENGTH] = {0}; -static char dimm_fan_status_string[REGISTER_INFORMATION_STRING_LENGTH] = {0}; -static char dimm_fan_command_string[REGISTER_INFORMATION_STRING_LENGTH] = {0}; -static char dimm_fan_debug_string[REGISTER_INFORMATION_STRING_LENGTH] = {0}; - -static int scsi_log_sense(int fd, uchar_t page_code, uchar_t *pagebuf, - uint16_t pagelen); -static int get_disk_temp(env_disk_t *); -/* - * ES Segment data structures - */ -static sensor_ctrl_blk_t sensor_ctrl[MAX_SENSORS]; -static fan_ctrl_blk_t fan_ctrl[MAX_FANS]; -static fruenvseg_t *envfru = NULL; - -/* - * Env thread variables - */ -static boolean_t system_shutdown_started = B_FALSE; -static boolean_t ovtemp_thr1_created = B_FALSE; -static pthread_t ovtemp_thr1_id; -static pthread_attr_t thr_attr; -static boolean_t ovtemp_thr2_created = B_FALSE; -static pthread_t ovtemp_thr2_id; -static boolean_t dimm_fan_thr_created = B_FALSE; -static pthread_t dimm_fan_thr_id; -static boolean_t disk_temp_thr_created = B_FALSE; -static pthread_t disk_temp_thr_id; - -/* - * PM thread related variables - */ -static pthread_t pmthr_tid; /* pmthr thread ID */ -static int pm_fd = -1; /* PM device file descriptor */ -static boolean_t pmthr_created = B_FALSE; -static int cur_lpstate; /* cur low power state */ - -/* - * Envd plug-in verbose flag set by SUNW_PICLENVD_DEBUG environment var - * Setting the verbose tuneable also enables debugging for better - * control - */ -int env_debug = 0; - -/* - * Fan devices - */ -static env_fan_t envd_sys_out_fan = { - ENV_SYSTEM_OUT_FAN, ENV_SYSTEM_OUT_FAN_DEVFS, NULL, - SYSTEM_OUT_FAN_ID, SYSTEM_OUT_FAN_SPEED_MIN, SYSTEM_OUT_FAN_SPEED_MAX, - -1, -1, -}; - -static env_fan_t envd_sys_in_fan = { - ENV_SYSTEM_INTAKE_FAN, ENV_SYSTEM_INTAKE_FAN_DEVFS, NULL, - SYSTEM_INTAKE_FAN_ID, SYSTEM_INTAKE_FAN_SPEED_MIN, - SYSTEM_INTAKE_FAN_SPEED_MAX, -1, -1, -}; - -static env_fan_t envd_cpu0_fan = { - ENV_CPU0_FAN, ENV_CPU0_FAN_DEVFS, NULL, - CPU0_FAN_ID, CPU_FAN_SPEED_MIN, CPU_FAN_SPEED_MAX, -1, -1, -}; - -static env_fan_t envd_cpu1_fan = { - ENV_CPU1_FAN, ENV_CPU1_FAN_DEVFS, NULL, - CPU1_FAN_ID, CPU_FAN_SPEED_MIN, CPU_FAN_SPEED_MAX, -1, -1, -}; - -static env_fan_t envd_dimm_fan = { - ENV_DIMM_FAN, ENV_DIMM_FAN_DEVFS, NULL, - DIMM_FAN_ID, 100, 100, -1, -1, -}; - -static env_disk_t envd_disk0 = { - ENV_DISK0, ENV_DISK0_DEVFS, DISK0_PHYSPATH, DISK0_NODE_PATH, - DISK0_ID, -1, -1, -}; - -static env_disk_t envd_disk1 = { - ENV_DISK1, ENV_DISK1_DEVFS, DISK1_PHYSPATH, DISK1_NODE_PATH, - DISK1_ID, -1, -1, -}; - -/* - * The vendor-id and device-id are the properties associated with - * the SCSI controller. This is used to identify a particular controller - * like LSI1030. - */ -#define VENDOR_ID "vendor-id" -#define DEVICE_ID "device-id" - -/* - * The implementation for SCSI disk drives to supply info. about - * temperature is not mandatory. Hence we first determine if the - * temperature page is supported. To do this we need to scan the list - * of pages supported. - */ -#define SUPPORTED_LPAGES 0 -#define TEMPERATURE_PAGE 0x0D -#define LOGPAGEHDRSIZE 4 - -/* - * NULL terminated array of fans - */ -static env_fan_t *envd_fans[] = { - &envd_cpu0_fan, - &envd_cpu1_fan, - &envd_sys_out_fan, - &envd_sys_in_fan, - &envd_dimm_fan, - NULL -}; - -static env_disk_t *envd_disks[] = { - &envd_disk0, - &envd_disk1, - NULL -}; - -/* - * ADM1031 speedrange map is indexed by a 2-bit value - */ -static int adm_speedrange_map[] = {1, 2, 4, 8}; - -/* - * ADM1031 devices - */ -static char *hwm_devs[] = { - CPU_HWM_DEVFS, /* CPU_HWM_ID */ - SYS_HWM_DEVFS /* SYS_HWM_ID */ -}; - -/* - * Fan names associated with each ADM1031 hwms - used to - * print fault messages. - */ -static char *hwm_fans[MAX_HWMS][2] = { - {ENV_CPU0_FAN, ENV_CPU1_FAN}, - {ENV_SYSTEM_INTAKE_FAN, ENV_SYSTEM_OUT_FAN} -}; - -/* - * Temperature sensors - */ -static env_sensor_t envd_sensors[] = { - { SENSOR_CPU0_DIE, SENSOR_CPU0_DIE_DEVFS, NULL, - CPU0_SENSOR_ID, CPU_HWM_ID, (void *)&envd_cpu0_fan, -1}, - { SENSOR_CPU1_DIE, SENSOR_CPU1_DIE_DEVFS, NULL, - CPU1_SENSOR_ID, CPU_HWM_ID, (void *)&envd_cpu1_fan, -1}, - { SENSOR_INT_AMB_0, SENSOR_INT_AMB_0_DEVFS, NULL, - INT_AMB0_SENSOR_ID, CPU_HWM_ID, NULL, -1}, - { SENSOR_SYS_OUT, SENSOR_SYS_OUT_DEVFS, NULL, - SYS_OUT_SENSOR_ID, SYS_HWM_ID, (void *)&envd_sys_out_fan, -1}, - { SENSOR_INT_AMB_1, SENSOR_INT_AMB_1_DEVFS, NULL, - INT_AMB1_SENSOR_ID, SYS_HWM_ID, NULL, -1}, - { SENSOR_SYS_IN, SENSOR_SYS_IN_DEVFS, NULL, - SYS_IN_SENSOR_ID, SYS_HWM_ID, (void *)&envd_sys_in_fan, -1}, -}; -#define N_ENVD_SENSORS (sizeof (envd_sensors)/sizeof (envd_sensors[0])) - -#define NOT_AVAILABLE "NA" - -/* - * ADM1031 macros - */ -#define TACH_UNKNOWN 255 -#define FAN_OUT_OF_RANGE (TACH_UNKNOWN) -#define ADM_HYSTERISIS 5 -#define N_SEQ_TACH 15 - -#define TMIN_MASK (0xF8) -#define TMIN_SHIFT (3) -#define TMIN_UNITS (4) /* increments of 4 degrees celsius */ -#define TRANGE_MASK (0x7) - -#define TMIN(regval) (((regval & TMIN_MASK) >> TMIN_SHIFT) * TMIN_UNITS) -#define TRANGE(regval) (regval & TRANGE_MASK) - -#define GET_TMIN_RANGE(tmin, trange) \ - ((((tmin / TMIN_UNITS) & TMIN_MASK) << TMIN_SHIFT) | \ - (trange & TRANGE_MASK)) - -#define TACH_ENABLE_MASK (0x0C) -#define ADM_SETFANSPEED_CONV(speed) (15 * speed / 100) - -/* - * Tuneables - */ -#define ENABLE 1 -#define DISABLE 0 - -int monitor_disk_temp = 1; /* enabled */ -static int disk_high_warn_temperature = DISK_HIGH_WARN_TEMPERATURE; -static int disk_low_warn_temperature = DISK_LOW_WARN_TEMPERATURE; -static int disk_high_shutdown_temperature = - DISK_HIGH_SHUTDOWN_TEMPERATURE; -static int disk_low_shutdown_temperature = DISK_LOW_SHUTDOWN_TEMPERATURE; -static int disk_scan_interval = DISK_SCAN_INTERVAL; - -static int get_monitor_cpu_mode(ptree_rarg_t *parg, void *buf); -static int set_monitor_cpu_mode(ptree_warg_t *parg, const void *buf); -static int get_monitor_sys_mode(ptree_rarg_t *parg, void *buf); -static int set_monitor_sys_mode(ptree_warg_t *parg, const void *buf); -static int get_int_val(ptree_rarg_t *parg, void *buf); -static int set_int_val(ptree_warg_t *parg, const void *buf); -static int get_string_val(ptree_rarg_t *parg, void *buf); -static int set_string_val(ptree_warg_t *parg, const void *buf); -static int get_cpu_tach(ptree_rarg_t *parg, void *buf); -static int set_cpu_tach(ptree_warg_t *parg, const void *buf); -static int get_sys_tach(ptree_rarg_t *parg, void *buf); -static int set_sys_tach(ptree_warg_t *parg, const void *buf); - -static int shutdown_override = 0; -static int sensor_poll_interval = SENSORPOLL_INTERVAL; -static int warning_interval = WARNING_INTERVAL; -static int disk_warning_interval = DISK_WARNING_INTERVAL; -static int disk_warning_duration = DISK_WARNING_DURATION; -static int shutdown_interval = SHUTDOWN_INTERVAL; -static int disk_shutdown_interval = DISK_SHUTDOWN_INTERVAL; -static int ovtemp_monitor = 1; /* enabled */ -static int pm_monitor = 1; /* enabled */ -static int mon_fanstat = 1; /* enabled */ - -static int cpu_mode; -static int sys_mode; -static int cpu_tach; -static int sys_tach; -static char shutdown_cmd[] = SHUTDOWN_CMD; - -env_tuneable_t tuneables[] = { - {"ovtemp-monitor", PICL_PTYPE_INT, &ovtemp_monitor, - &get_int_val, &set_int_val, sizeof (int)}, - - {"pm-monitor", PICL_PTYPE_INT, &pm_monitor, - &get_int_val, &set_int_val, sizeof (int)}, - - {"shutdown-override", PICL_PTYPE_INT, &shutdown_override, - &get_int_val, &set_int_val, sizeof (int)}, - - {"cpu-hm-automode-enable", PICL_PTYPE_INT, &cpu_mode, - &get_monitor_cpu_mode, &set_monitor_cpu_mode, - sizeof (int)}, - - {"sys-hm-automode-enable", PICL_PTYPE_INT, &sys_mode, - &get_monitor_sys_mode, &set_monitor_sys_mode, - sizeof (int)}, - - {"sensor-poll-interval", PICL_PTYPE_INT, - &sensor_poll_interval, - &get_int_val, &set_int_val, - sizeof (int)}, - - {"disk-scan-interval", PICL_PTYPE_INT, - &disk_scan_interval, - &get_int_val, &set_int_val, - sizeof (int)}, - - {"warning-interval", PICL_PTYPE_INT, &warning_interval, - &get_int_val, &set_int_val, - sizeof (int)}, - - {"shutdown-interval", PICL_PTYPE_INT, &shutdown_interval, - &get_int_val, &set_int_val, - sizeof (int)}, - - {"disk_warning-interval", PICL_PTYPE_INT, &disk_warning_interval, - &get_int_val, &set_int_val, - sizeof (int)}, - - {"disk_warning-duration", PICL_PTYPE_INT, &disk_warning_duration, - &get_int_val, &set_int_val, - sizeof (int)}, - - {"disk_shutdown-interval", PICL_PTYPE_INT, &disk_shutdown_interval, - &get_int_val, &set_int_val, - sizeof (int)}, - - {"shutdown-command", PICL_PTYPE_CHARSTRING, shutdown_cmd, - &get_string_val, &set_string_val, - sizeof (shutdown_cmd)}, - - {"cpu-tach-enable", PICL_PTYPE_INT, &cpu_tach, - &get_cpu_tach, &set_cpu_tach, - sizeof (int)}, - - {"sys-tach-enable", PICL_PTYPE_INT, &sys_tach, - &get_sys_tach, &set_sys_tach, - sizeof (int)}, - - {"monitor-fanstat", PICL_PTYPE_INT, &mon_fanstat, - &get_int_val, &set_int_val, sizeof (int)}, - - {"monitor-disk-temp", PICL_PTYPE_INT, &monitor_disk_temp, - &get_int_val, &set_int_val, sizeof (int)}, - - {"disk-high-warn-temperature", PICL_PTYPE_INT, - &disk_high_warn_temperature, &get_int_val, - &set_int_val, sizeof (int)}, - - {"disk-low-warn-temperature", PICL_PTYPE_INT, - &disk_low_warn_temperature, &get_int_val, - &set_int_val, sizeof (int)}, - - {"disk-high-shutdown-temperature", PICL_PTYPE_INT, - &disk_high_shutdown_temperature, &get_int_val, - &set_int_val, sizeof (int)}, - - {"disk-low-shutdown-temperature", PICL_PTYPE_INT, - &disk_low_shutdown_temperature, &get_int_val, - &set_int_val, sizeof (int)}, - - {"verbose", PICL_PTYPE_INT, &env_debug, - &get_int_val, &set_int_val, sizeof (int)}, - - -}; - -/* - * We use this to figure out how many tuneables there are - * This is variable because the publishing routine needs this info - * in piclenvsetup.c - */ -int ntuneables = (sizeof (tuneables)/sizeof (tuneables[0])); - -/* - * Table Handling Code - */ -static void -fini_table(table_t *tblp) -{ - if (tblp == NULL) - return; - free(tblp->xymap); - free(tblp); -} - -static table_t * -init_table(int npoints) -{ - table_t *tblp; - point_t *xy; - - if (npoints == 0) - return (NULL); - - if ((tblp = malloc(sizeof (*tblp))) == NULL) - return (NULL); - - if ((xy = malloc(sizeof (*xy) * npoints)) == NULL) { - free(tblp); - return (NULL); - } - - tblp->nentries = npoints; - tblp->xymap = xy; - - return (tblp); -} - -/* - * function: calculates y for a given x based on a table of points - * for monotonically increasing x values. - * 'tbl' specifies the table to use, 'val' specifies the 'x', returns 'y' - */ -static int -y_of_x(table_t *tbl, int xval) -{ - int i; - int entries; - point_t *xymap; - float newval; - float dy, dx, slope; - - entries = tbl->nentries; - xymap = tbl->xymap; - /* - * If the temperature is outside the correction table - * then simply return the original value. - */ - if ((xval < xymap[0].x) || (xval > xymap[entries - 1].x)) - return (xval); - if (xval == xymap[0].x) - return (xymap[0].y); - if (xval == xymap[entries - 1].x) - return (xymap[entries - 1].y); - - for (i = 1; i < entries - 1; i++) { - if (xval == xymap[i].x) - return (xymap[i].y); - if (xval < xymap[i].x) - break; - } - - /* - * Use linear interpolation - */ - dy = (float)(xymap[i].y - xymap[i-1].y); - dx = (float)(xymap[i].x - xymap[i-1].x); - slope = dy/dx; - newval = xymap[i - 1].y + slope * (xval - xymap[i - 1].x); - return ((int)(newval + (newval >= 0 ? 0.5 : -0.5))); -} - -/* - * Get environmental segment from the specified FRU SEEPROM - */ -static int -get_envseg(int fd, void **envsegp, int *envseglenp) -{ - int i, segcnt, envseglen; - section_layout_t section; - segment_layout_t segment; - uint8_t *envseg; - - if (lseek(fd, (long)SECTION_HDR_OFFSET, 0) == -1L || - read(fd, §ion, sizeof (section)) != sizeof (section)) { - return (EINVAL); - } - - /* - * Verify we have the correct section and contents are valid - * For now, we don't verify the CRC. - */ - if (section.header_tag != SECTION_HDR_TAG || - GET_UNALIGN16(§ion.header_version[0]) != SECTION_HDR_VER) { - if (env_debug) - envd_log(LOG_INFO, - "Invalid section header tag:%x version:%x\n", - section.header_tag, - GET_UNALIGN16(§ion.header_version)); - return (EINVAL); - } - - /* - * Locate our environmental segment - */ - segcnt = section.segment_count; - for (i = 0; i < segcnt; i++) { - if (read(fd, &segment, sizeof (segment)) != sizeof (segment)) { - return (EINVAL); - } - if (env_debug) - envd_log(LOG_INFO, - "Seg name: %x desc:%x off:%x len:%x\n", - GET_UNALIGN16(&segment.name), - GET_UNALIGN32(&segment.descriptor[0]), - GET_UNALIGN16(&segment.offset), - GET_UNALIGN16(&segment.length)); - if (GET_UNALIGN16(&segment.name) == ENVSEG_NAME) - break; - } - - if (i >= segcnt) { - return (ENOENT); - } - - /* - * Allocate memory to hold the environmental segment data. - */ - envseglen = GET_UNALIGN16(&segment.length); - if ((envseg = malloc(envseglen)) == NULL) { - return (ENOMEM); - } - - if (lseek(fd, (long)GET_UNALIGN16(&segment.offset), 0) == -1L || - read(fd, envseg, envseglen) != envseglen) { - (void) free(envseg); - return (EIO); - } - *envsegp = envseg; - *envseglenp = envseglen; - return (0); -} - -/* - * Get all environmental segments - * Return NULL on error - */ -static fruenvseg_t * -get_fru_envsegs(void) -{ - fruenvseg_t *fruenvsegs; - envseg_layout_t *envsegp; - void *envsegbufp; - int fd, envseglen, hdrlen; - char path[PATH_MAX]; - - fruenvsegs = NULL; - fruenvsegs = malloc(sizeof (*fruenvsegs)); - if (fruenvsegs == NULL) { - return (NULL); - } - - /* - * Now get the environmental segment from this FRU - */ - (void) snprintf(path, sizeof (path), "%s%s", I2C_DEVFS, MBFRU_DEV); - fd = open(path, O_RDONLY); - if (fd == -1) { - envd_log(LOG_ERR, ENV_FRU_OPEN_FAIL, errno, path); - free(fruenvsegs); - return (NULL); - } - - /* - * Read environmental segment from this FRU SEEPROM - */ - if (get_envseg(fd, &envsegbufp, &envseglen) != 0) { - envd_log(LOG_ERR, ENV_FRU_BAD_ENVSEG, path); - free(fruenvsegs); - (void) close(fd); - return (NULL); - } - - /* - * Validate envseg version number and header length - */ - envsegp = (envseg_layout_t *)envsegbufp; - hdrlen = sizeof (envseg_layout_t) - - sizeof (envseg_sensor_t) + - (envsegp->sensor_count) * sizeof (envseg_sensor_t); - - if (envsegp->version != ENVSEG_VERSION || - envseglen < hdrlen) { - /* - * version mismatch or header not big enough - */ - envd_log(LOG_CRIT, ENV_FRU_BAD_ENVSEG, FRU_SEEPROM_NAME); - if (envsegbufp != NULL) - (void) free(envsegbufp); - free(fruenvsegs); - (void) close(fd); - return (NULL); - } - - fruenvsegs->envseglen = envseglen; - fruenvsegs->envsegbufp = envsegbufp; - (void) close(fd); - return (fruenvsegs); -} - -static int -process_fru_seeprom(unsigned char *buff) -{ - id_off_t id; - int i; - int id_offset = 0; - int nsensors; - int nfans; - env_fan_t *fnodep; - env_sensor_t *snodep; - -#define NSENSOR_OFFSET 1 -#define ID_OFF_SIZE 6 -#define NFANS_OFFSET(x) ((x * ID_OFF_SIZE) + 2) - - nsensors = (int)buff[NSENSOR_OFFSET]; - if (nsensors != MAX_SENSORS) { - envd_log(LOG_CRIT, ENV_FRU_BAD_ENVSEG, FRU_SEEPROM_NAME); - return (-1); - } - - nfans = (int)buff[NFANS_OFFSET(nsensors)]; - if (nfans != MAX_FANS) { - envd_log(LOG_CRIT, ENV_FRU_BAD_ENVSEG, FRU_SEEPROM_NAME); - return (-1); - } - - while (nsensors > 0) { - (void) memcpy((char *)&id, - (char *)&buff[id_offset + 2], - ID_OFF_SIZE); - - if (env_debug) - envd_log(LOG_ERR, "\n Sensor Id %x offset %x", - id.id, id.offset); - - if (id.id > MAX_SENSOR_ID) { - envd_log(LOG_CRIT, ENV_FRU_BAD_ENVSEG, - FRU_SEEPROM_NAME); - return (-1); - } - - /* - * Copy into the sensor control block array according to the - * sensor ID - */ - (void) memcpy((char *)&sensor_ctrl[id.id], - (char *)&buff[id.offset], - sizeof (sensor_ctrl_blk_t)); - nsensors--; - id_offset += ID_OFF_SIZE; - } - - /* - * Skip past no of Fan entry(single byte) - */ - id_offset++; - while (nfans > 0) { - (void) memcpy((char *)&id, (char *)&buff[id_offset + 2], - ID_OFF_SIZE); - - if (env_debug) - envd_log(LOG_ERR, "\n Fan Id %x offset %x", id.id, - id.offset); - - if (id.id > 3) { - envd_log(LOG_CRIT, ENV_FRU_BAD_ENVSEG, - FRU_SEEPROM_NAME); - return (-1); - } - - (void) memcpy((char *)&fan_ctrl[id.id], - (char *)&buff[id.offset], sizeof (fan_ctrl_blk_t)); - - nfans--; - id_offset += ID_OFF_SIZE; - } - - /* - * Match Sensor/ES ID and point correct data - * based on IDs - */ - for (i = 0; i < N_ENVD_SENSORS; i++) { - snodep = &envd_sensors[i]; - snodep->es_ptr = &sensor_ctrl[snodep->id]; - } - - /* - * Match Fan/ES ID and point to correct ES Data - * based on IDs - */ - for (i = 0; (fnodep = envd_fans[i]) != NULL; i++) - fnodep->es_ptr = &fan_ctrl[fnodep->id]; - - return (0); -} - -static int -envd_es_setup(void) -{ - envfru = get_fru_envsegs(); - if (envfru == NULL) { - envd_log(LOG_CRIT, ENV_FRU_BAD_ENVSEG, FRU_SEEPROM_NAME); - return (-1); - } - return (process_fru_seeprom((uchar_t *)envfru->envsegbufp)); -} - -static void -envd_es_destroy(void) -{ - if (envfru != NULL) - free(envfru->envsegbufp); -} - -/* - * Lookup fan and return a pointer to env_fan_t data structure. - */ -env_fan_t * -fan_lookup(char *name) -{ - int i; - env_fan_t *fanp; - - for (i = 0; (fanp = envd_fans[i]) != NULL; i++) { - if (strcmp(fanp->name, name) == 0) - return (fanp); - } - return (NULL); -} - -/* - * Lookup sensor and return a pointer to env_sensor_t data structure. - */ -env_sensor_t * -sensor_lookup(char *name) -{ - env_sensor_t *sensorp; - int i; - - for (i = 0; i < N_ENVD_SENSORS; ++i) { - sensorp = &envd_sensors[i]; - if (strcmp(sensorp->name, name) == 0) - return (sensorp); - } - return (NULL); -} - -/* - * Lookup disk and return a pointer to env_disk_t data structure. - */ -env_disk_t * -disk_lookup(char *name) -{ - int i; - env_disk_t *diskp; - - for (i = 0; (diskp = envd_disks[i]) != NULL; i++) { - if (strncmp(diskp->name, name, strlen(name)) == 0) - return (diskp); - } - return (NULL); -} - -/* - * Get current temperature - * Returns -1 on error, 0 if successful - */ -int -get_temperature(env_sensor_t *sensorp, tempr_t *temp) -{ - int fd = sensorp->fd; - int retval = 0; - - if (fd == -1) - retval = -1; - else if (ioctl(fd, I2C_GET_TEMPERATURE, temp) == -1) { - - retval = -1; - - if (sensorp->error == 0) { - sensorp->error = 1; - envd_log(LOG_WARNING, ENV_SENSOR_ACCESS_FAIL, - sensorp->name, errno, strerror(errno)); - } - } else if (sensorp->error != 0) { - sensorp->error = 0; - envd_log(LOG_WARNING, ENV_SENSOR_ACCESS_OK, sensorp->name); - } - if (sensorp->crtbl != NULL) { - *temp = (tempr_t)y_of_x(sensorp->crtbl, *temp); - } - - return (retval); -} - -/* - * Get current disk temperature - * Returns -1 on error, 0 if successful - */ -int -disk_temperature(env_disk_t *diskp, tempr_t *temp) -{ - int retval = 0; - - if (diskp == NULL) - retval = -1; - else { - *temp = diskp->current_temp; - } - return (retval); -} - -/* - * Get uncorrected current temperature - * Returns -1 on error, 0 if successful - */ -static int -get_raw_temperature(env_sensor_t *sensorp, tempr_t *temp) -{ - int fd = sensorp->fd; - int retval = 0; - - if (fd == -1) - retval = -1; - else if (ioctl(fd, I2C_GET_TEMPERATURE, temp) == -1) { - retval = -1; - } - - return (retval); -} - -/* - * Return Fan RPM given N & tach - * count and N are retrived from the - * ADM1031 chip. - */ -static int -tach_to_rpm(int n, uint8_t tach) -{ - if (n * tach == 0) - return (0); - return ((ADCSAMPLE * 60) / (n * tach)); -} - -static int -get_raw_fan_speed(env_fan_t *fanp, uint8_t *fanspeedp) -{ - int fan_fd; - int retval = 0; - - fan_fd = fanp->fd; - - if (fan_fd == -1) - retval = -1; - else if (ioctl(fan_fd, I2C_GET_FAN_SPEED, fanspeedp) == -1) { - retval = -1; - } - - - return (retval); -} - -/* - * Get current fan speed - * This function returns a RPM value for fanspeed - * in fanspeedp. - * Returns -1 on error, 0 if successful - */ -int -get_fan_speed(env_fan_t *fanp, fanspeed_t *fanspeedp) -{ - int fan_fd; - uint8_t tach; - - fan_fd = fanp->fd; - - if (fan_fd == -1) - return (-1); - if (fanp->id == DIMM_FAN_ID) { - return (get_dimm_fan_speed(fan_fd, fanspeedp)); - } - if (ioctl(fan_fd, I2C_GET_FAN_SPEED, &tach) == -1) { - return (-1); - } - - /* - * Fanspeeds are reported as 0 - * if the tach is out of range or fan status is off - * and if monitoring fan status is enabled. - */ - if (mon_fanstat && (!fanp->fanstat || tach == FAN_OUT_OF_RANGE)) { - *fanspeedp = 0; - } else { - *fanspeedp = - tach_to_rpm(fanp->speedrange, tach); - } - - return (0); -} - -/* - * Set fan speed - * This function accepts a percentage of fan speed - * from 0-100 and programs the HW monitor fans to the corresponding - * fanspeed value. - * Returns -1 on error, -2 on invalid args passed, 0 if successful - */ -int -set_fan_speed(env_fan_t *fanp, fanspeed_t fanspeed) -{ - int fan_fd; - int retval = 0; - uint8_t speed; - - fan_fd = fanp->fd; - if (fan_fd == -1) - return (-1); - - if (fanspeed < 0 || fanspeed > 100) - return (-2); - - speed = (uint8_t)ADM_SETFANSPEED_CONV(fanspeed); - - if (ioctl(fan_fd, I2C_SET_FAN_SPEED, &speed) == -1) { - retval = -1; - } - return (retval); -} - -/* - * close all fan devices - */ -static void -envd_close_fans(void) -{ - int i; - env_fan_t *fanp; - - for (i = 0; (fanp = envd_fans[i]) != NULL; i++) { - if (fanp->fd != -1) { - (void) close(fanp->fd); - fanp->fd = -1; - } - } -} - -/* - * Close sensor devices and freeup resources - */ -static void -envd_close_sensors(void) -{ - env_sensor_t *sensorp; - int i; - - for (i = 0; i < N_ENVD_SENSORS; ++i) { - sensorp = &envd_sensors[i]; - if (sensorp->fd != -1) { - (void) close(sensorp->fd); - sensorp->fd = -1; - } - if (sensorp->crtbl != NULL) - fini_table(sensorp->crtbl); - } -} - -/* - * Open fan devices and initialize per fan data structure. - * Returns #fans found. - */ -static int -envd_setup_fans(void) -{ - int i, fd; - env_fan_t *fanp; - char path[PATH_MAX]; - int fancnt = 0; - uint8_t n = 0; - picl_nodehdl_t tnodeh; - i2c_reg_t i2c_reg; - - for (i = 0; (fanp = envd_fans[i]) != NULL; i++) { - /* make sure cpu0/1 present for validating cpu fans */ - if (fanp->id == CPU0_FAN_ID) { - if (ptree_get_node_by_path(CPU0_PATH, &tnodeh) != - PICL_SUCCESS) { - fanp->present = B_FALSE; - continue; - } - } - if (fanp->id == CPU1_FAN_ID) { - if (ptree_get_node_by_path(CPU1_PATH, &tnodeh) != - PICL_SUCCESS) { - fanp->present = B_FALSE; - continue; - } - } - if (fanp->id == DIMM_FAN_ID) { - if (ptree_get_node_by_path(DIMM_FAN_CONTROLLER_PATH, - &tnodeh) != PICL_SUCCESS) { - if (env_debug) - envd_log(LOG_ERR, - "dimm Fan not found in the system.\n"); - fanp->present = B_FALSE; - continue; - } - } - (void) strcpy(path, "/devices"); - (void) strlcat(path, fanp->devfs_path, sizeof (path)); - fd = open(path, O_RDWR); - if (fd == -1) { - envd_log(LOG_CRIT, - ENV_FAN_OPEN_FAIL, fanp->name, - fanp->devfs_path, errno, strerror(errno)); - fanp->present = B_FALSE; - continue; - } - fanp->fd = fd; - if (fanp->id == DIMM_FAN_ID) { - /* - * set the SW aware bit in command register. - * Clear the Fan fault latch bit. - */ - i2c_reg.reg_num = PIC16F819_COMMAND_REGISTER; - i2c_reg.reg_value = (PIC16F819_SW_AWARE_MODE | - PIC16F819_FAN_FAULT_CLEAR); - if (ioctl(fd, I2C_SET_REG, &i2c_reg) == -1) { - if (env_debug) - envd_log(LOG_ERR, - "Error in writing to COMMAND reg. of DIMM FAN controller\n"); - } - } else { - /* Get speed range value */ - if (ioctl(fd, ADM1031_GET_FAN_FEATURE, &n) != -1) { - fanp->speedrange = - adm_speedrange_map[(n >> 6) & 0x03]; - } else { - fanp->speedrange = FAN_RANGE_DEFAULT; - } - } - fanp->present = B_TRUE; - fanp->fanstat = 0; - fanp->cspeed = TACH_UNKNOWN; - fanp->lspeed = TACH_UNKNOWN; - fanp->conccnt = 0; - fancnt++; - } - return (fancnt); -} - -static int -envd_setup_disks(void) -{ - int ret, i, page_index, page_len; - picl_nodehdl_t tnodeh; - env_disk_t *diskp; - uint_t vendor_id; - uint_t device_id; - uchar_t log_page[256]; - - /* - * Check if the SCSi controller on the system is 1010 or 1030 - */ - - if (ptree_get_node_by_path(SCSI_CONTROLLER_NODE_PATH, - &tnodeh) != PICL_SUCCESS) { - if (env_debug) - envd_log(LOG_ERR, - "On-Board SCSI controller not found in the system.\n"); - monitor_disk_temp = 0; - return (-1); - } - - if ((ret = ptree_get_propval_by_name(tnodeh, VENDOR_ID, - &vendor_id, - sizeof (vendor_id))) != 0) { - if (env_debug) - envd_log(LOG_ERR, -"Error in getting vendor-id for SCSI controller. ret = %d errno = 0x%d\n", - ret, errno); - monitor_disk_temp = 0; - return (-1); - } - if ((ret = ptree_get_propval_by_name(tnodeh, DEVICE_ID, - &device_id, - sizeof (device_id))) != 0) { - if (env_debug) - envd_log(LOG_ERR, -"Error in getting device-id for SCSI controller. ret = %d errno = 0x%d\n", - ret, errno); - monitor_disk_temp = 0; - return (-1); - } - if (env_debug) - envd_log(LOG_ERR, "vendor-id=0x%x device-id=0x%x\n", - vendor_id, device_id); - if ((vendor_id != LSI1030_VENDOR_ID) || - (device_id != LSI1030_DEVICE_ID)) { - monitor_disk_temp = 0; - return (-1); - } - /* - * We have found LSI1030 SCSi controller onboard. - */ - - for (i = 0; (diskp = envd_disks[i]) != NULL; i++) { - - if (ptree_get_node_by_path(diskp->nodepath, - &tnodeh) != PICL_SUCCESS) { - diskp->present = B_FALSE; - if (env_debug) - envd_log(LOG_ERR, - "DISK %d not found in the system.\n", - diskp->id); - continue; - } - diskp->fd = open(diskp->devfs_path, O_RDONLY); - if (diskp->fd == -1) { - diskp->present = B_FALSE; - envd_log(LOG_ERR, - "Error in opening %s errno = 0x%x\n", - diskp->devfs_path, errno); - continue; - } - diskp->present = B_TRUE; - diskp->tpage_supported = B_FALSE; - /* - * Find out if the Temperature page is supported by the disk. - */ - ret = scsi_log_sense(diskp->fd, SUPPORTED_LPAGES, - log_page, sizeof (log_page)); - if (ret != 0) { - continue; - } - page_len = ((log_page[2] << 8) & 0xFF00) | log_page[3]; - - for (page_index = LOGPAGEHDRSIZE; - page_index < page_len + LOGPAGEHDRSIZE; page_index++) { - switch (log_page[page_index]) { - case TEMPERATURE_PAGE: - diskp->tpage_supported = B_TRUE; - if (env_debug) - envd_log(LOG_ERR, - "tpage supported for %s\n", - diskp->nodepath); - default: - break; - } - } - diskp->warning_tstamp = 0; - diskp->shutdown_tstamp = 0; - diskp->high_warning = disk_high_warn_temperature; - diskp->low_warning = disk_low_warn_temperature; - diskp->high_shutdown = disk_high_shutdown_temperature; - diskp->low_shutdown = disk_low_shutdown_temperature; - ret = get_disk_temp(diskp); - } - return (0); -} - -/* - * Open temperature sensor devices and initialize per sensor data structure. - * Returns #sensors found. - */ -static int -envd_setup_sensors(void) -{ - env_sensor_t *sensorp; - sensor_ctrl_blk_t *es_ptr; - table_t *tblp; - char path[PATH_MAX]; - int sensorcnt = 0; - int i, j, nentries; - int16_t tmin = 0; - picl_nodehdl_t tnodeh; - - for (i = 0; i < N_ENVD_SENSORS; ++i) { - sensorp = &envd_sensors[i]; - /* Initialize sensor's initial state */ - sensorp->shutdown_initiated = B_FALSE; - sensorp->warning_tstamp = 0; - sensorp->shutdown_tstamp = 0; - sensorp->error = 0; - sensorp->crtbl = NULL; - /* make sure cpu0/1 sensors are present */ - if (sensorp->id == CPU0_SENSOR_ID) { - if (ptree_get_node_by_path(CPU0_PATH, &tnodeh) != - PICL_SUCCESS) { - sensorp->present = B_FALSE; - continue; - } - } - if (sensorp->id == CPU1_SENSOR_ID) { - if (ptree_get_node_by_path(CPU1_PATH, &tnodeh) != - PICL_SUCCESS) { - sensorp->present = B_FALSE; - continue; - } - } - (void) strcpy(path, "/devices"); - (void) strlcat(path, sensorp->devfs_path, - sizeof (path)); - sensorp->fd = open(path, O_RDWR); - if (sensorp->fd == -1) { - envd_log(LOG_ERR, ENV_SENSOR_OPEN_FAIL, - sensorp->name, sensorp->devfs_path, - errno, strerror(errno)); - sensorp->present = B_FALSE; - continue; - } - sensorp->present = B_TRUE; - sensorcnt++; - - /* - * Get Tmin - */ - - if (ioctl(sensorp->fd, ADM1031_GET_TEMP_MIN_RANGE, - &tmin) != -1) { - sensorp->tmin = TMIN(tmin); - } else { - sensorp->tmin = -1; - } - if (env_debug) - envd_log(LOG_ERR, "Sensor %s tmin %d", - sensorp->name, sensorp->tmin); - - /* - * Create a correction table - * if correction pairs are present in es - * segment. - */ - es_ptr = sensorp->es_ptr; - - if (es_ptr == NULL) { - continue; - } - nentries = es_ptr->correctionEntries; - - if (nentries <= 2) { - if (env_debug) - envd_log(LOG_CRIT, "sensor correction <2"); - continue; - } - - sensorp->crtbl = init_table(nentries); - if (sensorp->crtbl == NULL) - continue; - tblp = sensorp->crtbl; - tblp->xymap[0].x = - (char)es_ptr->correctionPair[0].measured; - tblp->xymap[0].y = - (char)es_ptr->correctionPair[0].corrected; - - for (j = 1; j < nentries; ++j) { - tblp->xymap[j].x = - (char)es_ptr->correctionPair[j].measured; - tblp->xymap[j].y = - (char)es_ptr->correctionPair[j].corrected; - - if (tblp->xymap[j].x <= tblp->xymap[j - 1].x) { - fini_table(tblp); - sensorp->crtbl = NULL; - envd_log(LOG_CRIT, ENV_FRU_BAD_ENVSEG, - FRU_SEEPROM_NAME); - break; - } - } - - if (env_debug) { - envd_log(LOG_CRIT, "Sensor correction %s", - sensorp->name); - for (j = 0; j < nentries; j++) - envd_log(LOG_CRIT, " %d %d", - tblp->xymap[j].x, tblp->xymap[j].y); - } - } - return (sensorcnt); -} - -/* - * Modify ADM Tmin/ranges depending what power level - * we are from. - */ -static void -updateadm_ranges(char *name, uchar_t cur_lpstate) -{ - env_sensor_t *sensorp; - fan_ctrl_blk_t *fanctl; - uchar_t tmin; - uchar_t trange; - uint16_t tdata; - int sysfd; - uchar_t sys_id = SYS_HWM_ID; - uint8_t mode; - static uint16_t tsave[2] = {0, 0}; - /* Index of saved Tmin/Trange for two sensors */ - uint16_t tindex = 0; - - sensorp = sensor_lookup(name); - if (sensorp == NULL) - return; - - /* - * If there is only one Control pairs then return - */ - fanctl = ((env_fan_t *)sensorp->fanp)->es_ptr; - - if (fanctl != NULL && fanctl->no_ctl_pairs <= 1) - return; - - /* - * if fan control specifies that ranges are same then - * we skip re-programming adm chip. - */ - - tmin = fanctl->fan_ctl_pairs[0].tMin; - trange = fanctl->fan_ctl_pairs[0].tRange; - if ((tmin == fanctl->fan_ctl_pairs[1].tMin) && - (trange == fanctl->fan_ctl_pairs[1].tRange)) - return; - - sysfd = open(hwm_devs[sys_id], O_RDWR); - if (sysfd == -1) { - if (env_debug) - envd_log(LOG_ERR, ENV_ADM_OPEN_FAIL, hwm_devs[sys_id], - errno, strerror(errno)); - return; - } - tindex = ((strcmp(name, SENSOR_SYS_IN) == 0) ? 0 : 1); - - /* Read ADM default value only for the first time */ - if (tsave[tindex] == 0) { - if (ioctl(sensorp->fd, ADM1031_GET_TEMP_MIN_RANGE, - &tsave[tindex]) == -1) { - if (env_debug) - envd_log(LOG_ERR, - "read tminrange ioctl failed"); - (void) close(sysfd); - return; - } - } - /* - * Need to reinit ADM to manual mode for Tmin range to be - * effective. - */ - mode = ADM1031_MANUAL_MODE; - if (ioctl(sysfd, ADM1031_SET_MONITOR_MODE, &mode) == -1) { - if (env_debug) - envd_log(LOG_ERR, ENV_ADM_MANUAL_MODE); - (void) close(sysfd); - return; - } - - if (cur_lpstate == 1) { - /* - * ADM 1031 Tmin/Trange register need to be reprogrammed. - */ - tdata = ((fanctl->fan_ctl_pairs[cur_lpstate].tMin / TMIN_UNITS) - << TMIN_SHIFT); - /* Need to pack tRange in ADM bits 2:0 */ - switch (fanctl->fan_ctl_pairs[cur_lpstate].tRange) { - case 5: - break; - - case 10: - tdata |= 1; - break; - - case 20: - tdata |= 2; - break; - - case 40: - tdata |= 3; - break; - - case 80: - tdata |= 4; - break; - } - } else - tdata = tsave[tindex]; - - if (ioctl(sensorp->fd, ADM1031_SET_TEMP_MIN_RANGE, - &tdata) != -1) - sensorp->tmin = TMIN(tdata); - - mode = ADM1031_AUTO_MODE; - if (ioctl(sysfd, ADM1031_SET_MONITOR_MODE, &mode) == -1) { - if (env_debug) - envd_log(LOG_ERR, ENV_ADM_AUTO_MODE); - } - (void) close(sysfd); -} - -/* ARGSUSED */ -static void * -pmthr(void *args) -{ - pm_state_change_t pmstate; - char physpath[PATH_MAX]; - int pre_lpstate; - - pmstate.physpath = physpath; - pmstate.size = sizeof (physpath); - cur_lpstate = 0; - pre_lpstate = 1; - - pm_fd = open(PM_DEVICE, O_RDWR); - if (pm_fd == -1) { - envd_log(LOG_ERR, PM_THREAD_EXITING, errno, strerror(errno)); - return (NULL); - } - for (;;) { - /* - * Get PM state change events to check if the system - * is in lowest power state and adjust ADM hardware - * monitor's fan speed settings. - * - * To minimize polling, we use the blocking interface - * to get the power state change event here. - */ - if (ioctl(pm_fd, PM_GET_STATE_CHANGE_WAIT, &pmstate) != 0) { - if (errno != EINTR) - break; - continue; - } - do { - if (env_debug) { - envd_log(LOG_INFO, - "pmstate event:0x%x flags:%x" - "comp:%d oldval:%d newval:%d path:%s\n", - pmstate.event, pmstate.flags, - pmstate.component, - pmstate.old_level, - pmstate.new_level, - pmstate.physpath); - } - cur_lpstate = - (pmstate.flags & PSC_ALL_LOWEST) ? 1 : 0; - } while (ioctl(pm_fd, PM_GET_STATE_CHANGE, &pmstate) == 0); - /* - * Change ADM ranges as per E* Requirements. Update - * happens only for valid state changes. - */ - if (pre_lpstate != cur_lpstate) { - pre_lpstate = cur_lpstate; - updateadm_ranges(SENSOR_SYS_OUT, cur_lpstate); - updateadm_ranges(SENSOR_SYS_IN, cur_lpstate); - } - } - /* Not reached */ - return (NULL); -} - -/* - * This function is used to reasonably predict the - * state of the fan (ON/OFF) using tmin and current temperature. - * - * We know the fan is on if temp >= tmin and fan is off if - * temp < (Tmin - Hysterisis). - * - * When the temperature is in between we don't know if the fan is on/off - * because the temperature could be decreasing and not have crossed - * Tmin - hysterisis and vice a versa. - * - * FAN ON - * Tmin - * ------------------------------------------- - * - * FAN ON/OFF - * - * -------------------------------------------- - * Tmin - Hysterisis - * FAN OFF - * - * To solve the problem of finding out if the fan is on/off in our gray region - * we keep track of the last read tach and the current read tach. From - * experimentation and from discussions with analog devices it is unlikely that - * if the fans are on we will get a constant tach reading more than 5 times in - * a row. This is not but the most fool proof approach but the best we can do. - * - * This routine implements the above logic for a sensor with an - * associated fan. The caller garauntees sensorp and fanp are not null. - */ - -static void -check_fanstat(env_sensor_t *sensorp) -{ - env_fan_t *fanp = sensorp->fanp; - tempr_t temp; - uint8_t fanspeed; - - if (get_raw_temperature(sensorp, &temp) == -1) - return; - - if (temp < (sensorp->tmin - ADM_HYSTERISIS)) { - - fanp->fanstat = 0; /* Fan off */ - fanp->lspeed = TACH_UNKNOWN; /* Reset Last read tach */ - fanp->conccnt = 0; - - } else if (temp >= sensorp->tmin) { - - fanp->fanstat = 1; /* Fan on */ - fanp->lspeed = TACH_UNKNOWN; - fanp->conccnt = 0; - - } else { - if (get_raw_fan_speed(fanp, &fanspeed) == -1) - return; - - fanp->cspeed = fanspeed; - /* - * First time in the gray area - * set last read speed to current speed - */ - if (fanp->lspeed == TACH_UNKNOWN) { - fanp->lspeed = fanspeed; - } else { - if (fanp->lspeed != fanp->cspeed) { - fanp->conccnt = 0; - fanp->fanstat = 1; - } else { - fanp->conccnt++; - - if (fanp->conccnt >= N_SEQ_TACH) - fanp->fanstat = 0; - } - fanp->lspeed = fanp->cspeed; - } - } -} -/* - * There is an issue with the ADM1031 chip that causes the chip - * to not update the tach register in case the fan stops. The - * fans stop when the temperature measured (temp) drops below - * Tmin - Hysterisis and turn on when the temp >= Tmin. - * - * Since the tach registers don't update and remain stuck at the - * last read tach value our get_fan_speed function always returns - * a non-zero RPM reading. - * - * To fix this we need to figure out when the fans will be on/off - * depending on the current temperature. Currently we poll for - * interrupts, we can use that loop to determine what the current - * temperature is and if the fans should be on/off. - * - * We get current temperature and check the fans. - */ -static void -monitor_fanstat(void) -{ - env_sensor_t *sensorp; - env_fan_t *fanp; - int i; - - for (i = 0; i < N_ENVD_SENSORS; i++) { - sensorp = &envd_sensors[i]; - - if (!sensorp) - continue; - - fanp = sensorp->fanp; - - if (!(fanp && fanp->present)) - continue; - - if (sensorp->tmin != -1) { - check_fanstat(sensorp); - } else { - fanp->fanstat = 1; - } - - } -} - -static int -handle_overtemp_interrupt(int hwm_id) -{ - env_sensor_t *sensorp; - tempr_t temp; - uchar_t smap[MAX_SENSORS]; - time_t ct; - uchar_t i; - char msgbuf[BUFSIZ]; - char syscmd[BUFSIZ]; - boolean_t return_flag; - int ret; - timespec_t to; - pthread_mutex_t env_monitor_mutex = PTHREAD_MUTEX_INITIALIZER; - pthread_cond_t env_monitor_cv = PTHREAD_COND_INITIALIZER; - - /* Clear Map of Sensor Entries */ - (void) memset(smap, SENSOR_OK, sizeof (smap)); - - for (;;) { - for (i = 0; i < N_ENVD_SENSORS; i++) { - sensorp = &envd_sensors[i]; - - /* - * Check whether the sensor belongs to the - * interrupting ADM hardware monitor - */ - if (sensorp->hwm_id != hwm_id) - continue; - - if (sensorp->present == B_FALSE) - continue; - /* - * if shutdown is initiated then we simply loop - * through the sensors until shutdown - */ - if (sensorp->shutdown_initiated == B_TRUE) - continue; - - /* get current temp for this sensor */ - if (get_temperature(sensorp, &temp) == -1) - continue; - - sensorp->cur_temp = temp; - - if (env_debug) - envd_log(LOG_ERR, - "sensor name %s, cur temp %d, " - "HW %d LW %d SD %d LS %d\n", - sensorp->name, temp, - sensorp->es_ptr->high_warning, - (int)sensorp->es_ptr->low_warning, - sensorp->es_ptr->high_shutdown, - (int)sensorp->es_ptr->low_shutdown); - - if (TEMP_IN_WARNING_RANGE(sensorp->cur_temp, sensorp)) { - /* - * Log on warning atmost one second - */ - ct = (time_t)(gethrtime() / NANOSEC); - if ((ct - sensorp->warning_tstamp) >= - warning_interval) { - envd_log(LOG_CRIT, - ENV_WARNING_MSG, sensorp->name, - temp, - sensorp->es_ptr->low_warning, - sensorp->es_ptr->high_warning); - sensorp->warning_tstamp = ct; - } - smap[i] = SENSOR_WARN; - } else { - /* - * We will fall in this caterory only if - * Temperature drops/increases from warning - * threshold. If so we set sensor map to - * OK so that we can exit the loop if - * shutdown not initiated. - */ - smap[i] = SENSOR_OK; - } - - if (TEMP_IN_SHUTDOWN_RANGE(temp, sensorp) && - !shutdown_override) { - ct = (time_t)(gethrtime() / NANOSEC); - if (sensorp->shutdown_tstamp == 0) - sensorp->shutdown_tstamp = ct; - if ((ct - sensorp->shutdown_tstamp) >= - shutdown_interval) { - sensorp->shutdown_initiated = B_TRUE; - (void) snprintf(msgbuf, sizeof (msgbuf), - ENV_SHUTDOWN_MSG, sensorp->name, - temp, - sensorp->es_ptr->low_shutdown, - sensorp->es_ptr->high_shutdown); - envd_log(LOG_ALERT, msgbuf); - } - if (system_shutdown_started == B_FALSE) { - (void) snprintf(syscmd, sizeof (syscmd), - "%s \"%s\"", SHUTDOWN_CMD, msgbuf); - envd_log(LOG_ALERT, syscmd); - system_shutdown_started = B_TRUE; - (void) system(syscmd); - } - } else if (sensorp->shutdown_tstamp != 0) - sensorp->shutdown_tstamp = 0; - } - - /* - * Sweep thorugh Sensor Map and if warnings OR shutdown - * are not logged then return to caller. - */ - return_flag = B_TRUE; - for (i = 0; i < N_ENVD_SENSORS; i++) - if (smap[i] == SENSOR_WARN) - return_flag = B_FALSE; - - if ((return_flag == B_TRUE) && - (system_shutdown_started == B_FALSE)) { - return (1); - } - -wait_till_timeout: - /* - * We use pthread_cond_reltimedwait_np to sleep for - * fixed interval of time. - * earlier implementation used alarm() call which - * fails in Multi threaded environment. If multiple - * threads call alarm() only one of the threads is - * sent the SIGALRM signal. - */ - (void) pthread_mutex_lock(&env_monitor_mutex); - ret = pthread_cond_reltimedwait_np(&env_monitor_cv, - &env_monitor_mutex, &to); - to.tv_sec = SENSORPOLL_INTERVAL; - to.tv_nsec = 0; - if (ret != ETIMEDOUT) { - (void) pthread_mutex_unlock(&env_monitor_mutex); - goto wait_till_timeout; - } - (void) pthread_mutex_unlock(&env_monitor_mutex); - } -} - -/* - * This is env thread which monitors the current temperature when - * warning threshold is exceeded. The job is to make sure it does - * not execced/decrease shutdown threshold. If it does it will start - * forced shutdown to avoid reaching hardware poweroff via THERM interrupt. - * For Enchilada there will be two threads, one for each ADM chip. - */ -static void * -ovtemp_thr(void *args) -{ - int fd; - uint8_t stat[2]; - int hwm_id = (int)args; - int err; - env_fan_t *fanp; - timespec_t to; - int ret; - pthread_mutex_t env_monitor_mutex = PTHREAD_MUTEX_INITIALIZER; - pthread_cond_t env_monitor_cv = PTHREAD_COND_INITIALIZER; - - fd = open(hwm_devs[hwm_id], O_RDWR); - if (fd == -1) { - envd_log(LOG_ERR, ENV_ADM_OPEN_FAIL, hwm_devs[hwm_id], - errno, strerror(errno)); - return (NULL); - } - if (env_debug) - envd_log(LOG_ERR, "ovtemp thread for %s running...\n", - hwm_devs[hwm_id]); - - for (;;) { - /* - * Sleep for specified seconds before issuing IOCTL - * again. - */ - - /* - * We use pthread_cond_reltimedwait_np to sleep for - * fixed interval of time. - * earlier implementation used alarm() call which - * fails in Multi threaded environment. If multiple - * threads call alarm() only one of the threads is - * sent the SIGALRM signal. - */ - (void) pthread_mutex_lock(&env_monitor_mutex); - ret = pthread_cond_reltimedwait_np(&env_monitor_cv, - &env_monitor_mutex, &to); - to.tv_sec = INTERRUPTPOLL_INTERVAL; - to.tv_nsec = 0; - if (ret != ETIMEDOUT) { - (void) pthread_mutex_unlock(&env_monitor_mutex); - continue; - } - (void) pthread_mutex_unlock(&env_monitor_mutex); - /* - * Monitor the sensors to update fan status - */ - if (mon_fanstat) - monitor_fanstat(); - - /* - * Read ADM1031 two Status Registers to determine source - * of Interrupts. - */ - - if ((err = ioctl(fd, ADM1031_GET_STATUS_1, &stat[0])) != -1) - err = ioctl(fd, ADM1031_GET_STATUS_2, &stat[1]); - - if (err == -1) { - if (env_debug) - envd_log(LOG_ERR, - "OverTemp: Status Error"); - continue; - } - - if (env_debug) - envd_log(LOG_ERR, "INTR %s, Stat1 %x, Stat2 %x", - hwm_devs[hwm_id], stat[0], stat[1]); - - if (stat[0] & FANFAULT) { - fanp = fan_lookup(hwm_fans[hwm_id][HWM_FAN1]); - if (fanp && fanp->present) - envd_log(LOG_ERR, ENV_FAN_FAULT, - hwm_devs[hwm_id], - hwm_fans[hwm_id][HWM_FAN1]); - } - if (stat[1] & FANFAULT) { - fanp = fan_lookup(hwm_fans[hwm_id][HWM_FAN2]); - if (fanp && fanp->present) - envd_log(LOG_ERR, ENV_FAN_FAULT, - hwm_devs[hwm_id], - hwm_fans[hwm_id][HWM_FAN2]); - } - /* - * Check respective Remote/Local High, Low before start - * manual monitoring - */ - if ((stat[0] & STAT1MASK) || (stat[1] & STAT2MASK)) - (void) handle_overtemp_interrupt(hwm_id); - - } /* end of for ever loop */ - /*NOTREACHED*/ - return (NULL); -} - -static void * -dimm_fan_thr(void *args) -{ - char syscmd[BUFSIZ]; - char msgbuf[BUFSIZ]; - i2c_reg_t i2c_reg; - timespec_t to; - int ret; - pthread_mutex_t env_monitor_mutex = PTHREAD_MUTEX_INITIALIZER; - pthread_cond_t env_monitor_cv = PTHREAD_COND_INITIALIZER; - - - for (;;) { - /* - * Sleep for specified seconds before issuing IOCTL - * again. - */ - (void) pthread_mutex_lock(&env_monitor_mutex); - ret = pthread_cond_reltimedwait_np(&env_monitor_cv, - &env_monitor_mutex, &to); - to.tv_sec = INTERRUPTPOLL_INTERVAL; - to.tv_nsec = 0; - if (ret != ETIMEDOUT) { - (void) pthread_mutex_unlock(&env_monitor_mutex); - continue; - } - (void) pthread_mutex_unlock(&env_monitor_mutex); - /* - * We write to the comand register periodically - * to inform the PIC firmware that Solaris is - * Monitoring the dimm fan periodically. - */ - i2c_reg.reg_num = PIC16F819_COMMAND_REGISTER; - i2c_reg.reg_value = PIC16F819_SW_AWARE_MODE; - if (ioctl(envd_dimm_fan.fd, - I2C_SET_REG, &i2c_reg) == -1) { - if (env_debug) - envd_log(LOG_ERR, - "Error in writing to COMMAND reg. of DIMM FAN controller\n"); - } - /* - * We initiate shutdown if fan status indicates - * failure. - */ - if (is_dimm_fan_failed() != 0) { - /* - * Mark Dimm fan present as False so that we - * do not WARN the user of the Fan failure - * repeatedly. - */ - envd_dimm_fan.present = B_FALSE; - (void) snprintf(msgbuf, sizeof (msgbuf), - ENV_DIMM_FAN_FAILURE_SHUTDOWN_MSG, - ENV_DIMM_FAN, - dimm_fan_rpm_string, dimm_fan_status_string, - dimm_fan_command_string, - dimm_fan_debug_string); - envd_log(LOG_ALERT, msgbuf); - - if (system_shutdown_started == B_FALSE) { - system_shutdown_started = B_TRUE; - (void) snprintf(syscmd, sizeof (syscmd), - "%s \"%s\"", - SHUTDOWN_CMD, - msgbuf); - envd_log(LOG_ALERT, syscmd); - (void) system(syscmd); - } - } - } - /*NOTREACHED*/ - return (NULL); -} -static int -scsi_log_sense(int fd, uchar_t page_code, uchar_t *pagebuf, uint16_t pagelen) -{ - struct uscsi_cmd ucmd_buf; - uchar_t cdb_buf[CDB_GROUP1]; - struct scsi_extended_sense sense_buf; - int ret_val; - - bzero((void *)&cdb_buf, sizeof (cdb_buf)); - bzero((void *)&ucmd_buf, sizeof (ucmd_buf)); - bzero((void *)&sense_buf, sizeof (sense_buf)); - - cdb_buf[0] = SCMD_LOG_SENSE_G1; - cdb_buf[2] = (0x01 << 6) | page_code; - cdb_buf[7] = (uchar_t)((pagelen & 0xFF00) >> 8); - cdb_buf[8] = (uchar_t)(pagelen & 0x00FF); - - ucmd_buf.uscsi_cdb = (char *)cdb_buf; - ucmd_buf.uscsi_cdblen = sizeof (cdb_buf); - ucmd_buf.uscsi_bufaddr = (caddr_t)pagebuf; - ucmd_buf.uscsi_buflen = pagelen; - ucmd_buf.uscsi_rqbuf = (caddr_t)&sense_buf; - ucmd_buf.uscsi_rqlen = sizeof (struct scsi_extended_sense); - ucmd_buf.uscsi_flags = USCSI_RQENABLE | USCSI_READ | USCSI_SILENT; - ucmd_buf.uscsi_timeout = 60; - - ret_val = ioctl(fd, USCSICMD, ucmd_buf); - if (ret_val == 0 && ucmd_buf.uscsi_status == 0) { - if (env_debug) - envd_log(LOG_ERR, - "log sense command for page_code 0x%x succeeded\n", page_code); - return (ret_val); - } - if (env_debug) - envd_log(LOG_ERR, - "log sense command failed.ret_val = 0x%x status = 0x%x errno = 0x%x\n", - ret_val, ucmd_buf.uscsi_status, errno); - return (1); -} - -static int -get_disk_temp(env_disk_t *diskp) -{ - int ret; - uchar_t tpage[256]; - - ret = scsi_log_sense(diskp->fd, - TEMPERATURE_PAGE, - tpage, sizeof (tpage)); - if (ret != 0) { - diskp->current_temp = DISK_INVALID_TEMP; - diskp->ref_temp = DISK_INVALID_TEMP; - return (-1); - } - /* - * For the current temperature verify that the parameter - * length is 0x02 and the parameter code is 0x00 - * Temperature value of 255(0xFF) is considered INVALID. - */ - if ((tpage[7] == 0x02) && (tpage[4] == 0x00) && - (tpage[5] == 0x00)) { - if (tpage[9] == 0xFF) { - diskp->current_temp = DISK_INVALID_TEMP; - return (-1); - } else { - diskp->current_temp = tpage[9]; - } - } - - /* - * For the reference temperature verify that the parameter - * length is 0x02 and the parameter code is 0x01 - * Temperature value of 255(0xFF) is considered INVALID. - */ - if ((tpage[13] == 0x02) && (tpage[10] == 0x00) && - (tpage[11] == 0x01)) { - if (tpage[15] == 0xFF) { - diskp->ref_temp = DISK_INVALID_TEMP; - } else { - diskp->ref_temp = tpage[15]; - } - } - return (0); -} - -/* ARGSUSED */ -static void * -disk_temp_thr(void *args) -{ - char syscmd[BUFSIZ]; - char msgbuf[BUFSIZ]; - timespec_t to; - int ret, i; - env_disk_t *diskp; - pthread_mutex_t env_monitor_mutex = PTHREAD_MUTEX_INITIALIZER; - pthread_cond_t env_monitor_cv = PTHREAD_COND_INITIALIZER; - pm_state_change_t pmstate; - int idle_time; - int disk_pm_fd; - time_t ct; - - disk_pm_fd = open(PM_DEVICE, O_RDWR); - if (disk_pm_fd == -1) { - envd_log(LOG_ERR, - DISK_TEMP_THREAD_EXITING, - errno, strerror(errno)); - return (NULL); - } - for (;;) { - /* - * Sleep for specified seconds before issuing IOCTL - * again. - */ - (void) pthread_mutex_lock(&env_monitor_mutex); - ret = pthread_cond_reltimedwait_np(&env_monitor_cv, - &env_monitor_mutex, &to); - to.tv_sec = disk_scan_interval; - to.tv_nsec = 0; - if (ret != ETIMEDOUT) { - (void) pthread_mutex_unlock(&env_monitor_mutex); - continue; - } - (void) pthread_mutex_unlock(&env_monitor_mutex); - for (i = 0; (diskp = envd_disks[i]) != NULL; i++) { - if (diskp->present == B_FALSE) - continue; - if (diskp->tpage_supported == B_FALSE) - continue; - /* - * If the disk temperature is above the warning threshold - * continue monitoring until the temperature drops below - * warning threshold. - * if the temperature is in the NORMAL range monitor only - * when the disk is BUSY. - * We do not want to read the disk temperature if the disk is - * is idling. The reason for this is disk will never get into - * lowest power mode if we scan the disk temperature - * peridoically. To avoid this situation we first determine - * the idle_time of the disk. If the disk has been IDLE since - * we scanned the temperature last time we will not read the - * temperature. - */ - if (!DISK_TEMP_IN_WARNING_RANGE(diskp->current_temp, diskp)) { - pmstate.physpath = diskp->physpath; - pmstate.size = strlen(diskp->physpath); - pmstate.component = 0; - if ((idle_time = - ioctl(disk_pm_fd, - PM_GET_TIME_IDLE, &pmstate)) == -1) { - if (errno != EINTR) { - if (env_debug) - envd_log(LOG_ERR, - "ioctl PM_GET_TIME_IDLE failed for DISK0. errno=0x%x\n", - errno); - continue; - } - continue; - } - if (idle_time >= (disk_scan_interval/2)) { - if (env_debug) { - envd_log(LOG_ERR, - "%s idle time = %d\n", - diskp->name, idle_time); - } - continue; - } - } - ret = get_disk_temp(diskp); - if (ret != 0) - continue; - if (env_debug) { - envd_log(LOG_ERR, - "%s temp = %d ref. temp = %d\n", - diskp->name, diskp->current_temp, diskp->ref_temp); - } - /* - * If this disk already triggered system shutdown, don't - * log any more shutdown/warning messages for it. - */ - if (diskp->shutdown_initiated) - continue; - - /* - * Check for the temperature in warning and shutdown range - * and take appropriate action. - */ - if (DISK_TEMP_IN_WARNING_RANGE(diskp->current_temp, diskp)) { - /* - * Check if the temperature has been in warning - * range during last disk_warning_duration interval. - * If so, the temperature is truly in warning - * range and we need to log a warning message, - * but no more than once every disk_warning_interval - * seconds. - */ - time_t wtstamp = diskp->warning_tstamp; - - ct = (time_t)(gethrtime() / NANOSEC); - if (diskp->warning_start == 0) - diskp->warning_start = ct; - if (((ct - diskp->warning_start) >= - disk_warning_duration) && (wtstamp == 0 || - (ct - wtstamp) >= disk_warning_interval)) { - envd_log(LOG_CRIT, ENV_WARNING_MSG, - diskp->name, diskp->current_temp, - diskp->low_warning, - diskp->high_warning); - diskp->warning_tstamp = ct; - } - } else if (diskp->warning_start != 0) - diskp->warning_start = 0; - - if (!shutdown_override && - DISK_TEMP_IN_SHUTDOWN_RANGE(diskp->current_temp, diskp)) { - ct = (time_t)(gethrtime() / NANOSEC); - if (diskp->shutdown_tstamp == 0) - diskp->shutdown_tstamp = ct; - - /* - * Shutdown the system if the temperature remains - * in the shutdown range for over disk_shutdown_interval - * seconds. - */ - if ((ct - diskp->shutdown_tstamp) >= - disk_shutdown_interval) { - /* log error */ - diskp->shutdown_initiated = B_TRUE; - (void) snprintf(msgbuf, sizeof (msgbuf), - ENV_SHUTDOWN_MSG, diskp->name, - diskp->current_temp, diskp->low_shutdown, - diskp->high_shutdown); - envd_log(LOG_ALERT, msgbuf); - - /* shutdown the system (only once) */ - if (system_shutdown_started == B_FALSE) { - (void) snprintf(syscmd, sizeof (syscmd), - "%s \"%s\"", shutdown_cmd, msgbuf); - envd_log(LOG_ALERT, syscmd); - system_shutdown_started = B_TRUE; - (void) system(syscmd); - } - } - } else if (diskp->shutdown_tstamp != 0) - diskp->shutdown_tstamp = 0; - - } - } /* end of forever loop */ -} - -/* - * Setup envrionmental monitor state and start threads to monitor - * temperature and power management state. - * Returns -1 on error, 0 if successful. - */ -static int -envd_setup(void) -{ - int ret; - - if (getenv("SUNW_piclenvd_debug") != NULL) - env_debug = 1; - - if (pthread_attr_init(&thr_attr) != 0 || - pthread_attr_setscope(&thr_attr, PTHREAD_SCOPE_SYSTEM) != 0) { - return (-1); - } - - ret = envd_es_setup(); - if (ret < 0) { - ovtemp_monitor = 0; - pm_monitor = 0; - } - - /* - * Setup temperature sensors and fail if we can't open - * at least one sensor. - */ - if (envd_setup_sensors() <= 0) { - return (NULL); - } - - /* - * Setup fan device (don't fail even if we can't access - * the fan as we can still monitor temeperature. - */ - (void) envd_setup_fans(); - - (void) envd_setup_disks(); - - /* If ES Segment setup failed,don't create thread */ - - if (ovtemp_monitor && ovtemp_thr1_created == B_FALSE) { - if (pthread_create(&ovtemp_thr1_id, &thr_attr, ovtemp_thr, - (void *)CPU_HWM_ID) != 0) - envd_log(LOG_ERR, ENVTHR_THREAD_CREATE_FAILED); - else - ovtemp_thr1_created = B_TRUE; - } - - if (ovtemp_monitor && ovtemp_thr2_created == B_FALSE) { - if (pthread_create(&ovtemp_thr2_id, &thr_attr, ovtemp_thr, - (void *)SYS_HWM_ID) != 0) - envd_log(LOG_ERR, ENVTHR_THREAD_CREATE_FAILED); - else - ovtemp_thr2_created = B_TRUE; - } - - if (envd_dimm_fan.present) { - if (dimm_fan_thr_created == B_FALSE) { - if (pthread_create(&dimm_fan_thr_id, &thr_attr, dimm_fan_thr, - NULL) != 0) - envd_log(LOG_ERR, ENVTHR_THREAD_CREATE_FAILED); - else - dimm_fan_thr_created = B_TRUE; - } - } - - /* - * Create a thread to monitor PM state - */ - if (pm_monitor && pmthr_created == B_FALSE) { - if (pthread_create(&pmthr_tid, &thr_attr, pmthr, - NULL) != 0) - envd_log(LOG_CRIT, PM_THREAD_CREATE_FAILED); - else - pmthr_created = B_TRUE; - } - if (monitor_disk_temp) { - if (disk_temp_thr_created == B_FALSE) { - if (pthread_create(&disk_temp_thr_id, &thr_attr, disk_temp_thr, - NULL) != 0) - envd_log(LOG_ERR, ENVTHR_THREAD_CREATE_FAILED); - else - disk_temp_thr_created = B_TRUE; - } - } - return (0); -} - -static void -piclenvd_register(void) -{ - picld_plugin_register(&my_reg_info); -} - -static void -piclenvd_init(void) -{ - - (void) env_picl_setup_tuneables(); - - /* - * Setup the environmental data structures - */ - if (envd_setup() != 0) { - envd_log(LOG_CRIT, ENVD_PLUGIN_INIT_FAILED); - return; - } - - /* - * Now setup/populate PICL tree - */ - env_picl_setup(); -} - -static void -piclenvd_fini(void) -{ - - /* - * Invoke env_picl_destroy() to remove any PICL nodes/properties - * (including volatile properties) we created. Once this call - * returns, there can't be any more calls from the PICL framework - * to get current temperature or fan speed. - */ - env_picl_destroy(); - envd_close_sensors(); - envd_close_fans(); - envd_es_destroy(); -} - -/*VARARGS2*/ -void -envd_log(int pri, const char *fmt, ...) -{ - va_list ap; - - va_start(ap, fmt); - vsyslog(pri, fmt, ap); - va_end(ap); -} - -/* - * Tunables support functions - */ -static env_tuneable_t * -tuneable_lookup(picl_prophdl_t proph) -{ - int i; - env_tuneable_t *tuneablep = NULL; - - for (i = 0; i < ntuneables; i++) { - tuneablep = &tuneables[i]; - if (tuneablep->proph == proph) - return (tuneablep); - } - - return (NULL); -} - -static int -get_cpu_tach(ptree_rarg_t *parg, void *buf) -{ - picl_prophdl_t proph; - env_tuneable_t *tuneablep; - int fd; - int8_t cfg; - - proph = parg->proph; - - tuneablep = tuneable_lookup(proph); - - if (tuneablep == NULL) - return (PICL_FAILURE); - - fd = open(CPU_HWM_DEVFS, O_RDWR); - - if (fd == -1) { - return (PICL_FAILURE); - } - - if (ioctl(fd, ADM1031_GET_CONFIG_2, &cfg) == -1) { - return (PICL_FAILURE); - } - - if ((cfg & TACH_ENABLE_MASK) == TACH_ENABLE_MASK) { - *((int *)tuneablep->value) = ENABLE; - } else { - *((int *)tuneablep->value) = DISABLE; - } - - (void) memcpy(buf, tuneablep->value, - tuneablep->nbytes); - - (void) close(fd); - return (PICL_SUCCESS); -} - -static int -set_cpu_tach(ptree_warg_t *parg, const void *buf) -{ - picl_prophdl_t proph; - env_tuneable_t *tuneablep; - int fd, val; - int8_t cfg; - - if (parg->cred.dc_euid != 0) - return (PICL_PERMDENIED); - - proph = parg->proph; - - tuneablep = tuneable_lookup(proph); - - if (tuneablep == NULL) - return (PICL_FAILURE); - - - fd = open(CPU_HWM_DEVFS, O_RDWR); - - if (fd == -1) { - return (PICL_FAILURE); - } - - if (ioctl(fd, ADM1031_GET_CONFIG_2, &cfg) == -1) { - return (PICL_FAILURE); - } - - (void) memcpy(&val, (caddr_t)buf, sizeof (val)); - - if (val == ENABLE) { - cfg |= TACH_ENABLE_MASK; - } else if (val == DISABLE) { - cfg &= ~TACH_ENABLE_MASK; - } - - - if (ioctl(fd, ADM1031_SET_CONFIG_2, &cfg) == -1) { - return (PICL_FAILURE); - } - - (void) close(fd); - return (PICL_SUCCESS); -} - -static int -get_sys_tach(ptree_rarg_t *parg, void *buf) -{ - picl_prophdl_t proph; - env_tuneable_t *tuneablep; - int fd; - int8_t cfg; - - proph = parg->proph; - - tuneablep = tuneable_lookup(proph); - - if (tuneablep == NULL) - return (PICL_FAILURE); - - fd = open(SYS_HWM_DEVFS, O_RDWR); - - if (fd == -1) { - return (PICL_FAILURE); - } - - if (ioctl(fd, ADM1031_GET_CONFIG_2, &cfg) == -1) { - return (PICL_FAILURE); - } - - if ((cfg & TACH_ENABLE_MASK) == TACH_ENABLE_MASK) { - *((int *)tuneablep->value) = ENABLE; - } else { - *((int *)tuneablep->value) = DISABLE; - } - - (void) memcpy(buf, tuneablep->value, - tuneablep->nbytes); - - (void) close(fd); - return (PICL_SUCCESS); -} - -static int -set_sys_tach(ptree_warg_t *parg, const void *buf) -{ - picl_prophdl_t proph; - env_tuneable_t *tuneablep; - int fd, val; - int8_t cfg; - - if (parg->cred.dc_euid != 0) - return (PICL_PERMDENIED); - - proph = parg->proph; - - tuneablep = tuneable_lookup(proph); - - if (tuneablep == NULL) - return (PICL_FAILURE); - - - fd = open(SYS_HWM_DEVFS, O_RDWR); - - if (fd == -1) { - return (PICL_FAILURE); - } - - if (ioctl(fd, ADM1031_GET_CONFIG_2, &cfg) == -1) { - return (PICL_FAILURE); - } - - (void) memcpy(&val, buf, sizeof (val)); - - if (val == ENABLE) { - cfg |= TACH_ENABLE_MASK; - } else if (val == DISABLE) { - cfg &= ~TACH_ENABLE_MASK; - } - - - if (ioctl(fd, ADM1031_SET_CONFIG_2, &cfg) == -1) { - return (PICL_FAILURE); - } - - (void) close(fd); - return (PICL_SUCCESS); -} - -static int -get_monitor_cpu_mode(ptree_rarg_t *parg, void *buf) -{ - picl_prophdl_t proph; - env_tuneable_t *tuneablep; - int fd; - int8_t mmode; - - proph = parg->proph; - - tuneablep = tuneable_lookup(proph); - - if (tuneablep == NULL) - return (PICL_FAILURE); - - fd = open(CPU_HWM_DEVFS, O_RDWR); - - if (fd == -1) { - return (PICL_FAILURE); - } - - if (ioctl(fd, ADM1031_GET_MONITOR_MODE, &mmode) == -1) { - return (PICL_FAILURE); - } - - if (mmode == ADM1031_AUTO_MODE) { - *((int *)tuneablep->value) = ENABLE; - } else { - *((int *)tuneablep->value) = DISABLE; - } - - (void) memcpy(buf, tuneablep->value, - tuneablep->nbytes); - - (void) close(fd); - return (PICL_SUCCESS); -} - -static int -set_monitor_cpu_mode(ptree_warg_t *parg, const void *buf) -{ - picl_prophdl_t proph; - env_tuneable_t *tuneablep; - int fd, val; - int8_t mmode; - - if (parg->cred.dc_euid != 0) - return (PICL_PERMDENIED); - - proph = parg->proph; - - tuneablep = tuneable_lookup(proph); - - if (tuneablep == NULL) - return (PICL_FAILURE); - - fd = open(CPU_HWM_DEVFS, O_RDWR); - - if (fd == -1) { - return (PICL_FAILURE); - } - - (void) memcpy(&val, buf, sizeof (val)); - - if (val == ENABLE) { - mmode = ADM1031_AUTO_MODE; - } else if (val == DISABLE) { - mmode = ADM1031_MANUAL_MODE; - } - - if (ioctl(fd, ADM1031_SET_MONITOR_MODE, &mmode) == -1) { - return (PICL_FAILURE); - } - - (void) close(fd); - return (PICL_SUCCESS); -} - -static int -get_monitor_sys_mode(ptree_rarg_t *parg, void *buf) -{ - picl_prophdl_t proph; - env_tuneable_t *tuneablep; - int fd; - int8_t mmode; - - proph = parg->proph; - - tuneablep = tuneable_lookup(proph); - - if (tuneablep == NULL) - return (PICL_FAILURE); - - fd = open(SYS_HWM_DEVFS, O_RDWR); - - if (fd == -1) { - return (PICL_FAILURE); - } - - if (ioctl(fd, ADM1031_GET_MONITOR_MODE, &mmode) == -1) { - return (PICL_FAILURE); - } - - if (mmode == ADM1031_AUTO_MODE) { - *((int *)tuneablep->value) = ENABLE; - } else { - *((int *)tuneablep->value) = DISABLE; - } - - (void) memcpy(buf, tuneablep->value, - tuneablep->nbytes); - - (void) close(fd); - return (PICL_SUCCESS); -} - -static int -set_monitor_sys_mode(ptree_warg_t *parg, const void *buf) -{ - picl_prophdl_t proph; - env_tuneable_t *tuneablep; - int fd, val; - int8_t mmode; - - if (parg->cred.dc_euid != 0) - return (PICL_PERMDENIED); - - proph = parg->proph; - - tuneablep = tuneable_lookup(proph); - - if (tuneablep == NULL) - return (PICL_FAILURE); - - fd = open(SYS_HWM_DEVFS, O_RDWR); - - if (fd == -1) { - return (PICL_FAILURE); - } - - (void) memcpy(&val, buf, sizeof (val)); - - if (val == ENABLE) { - mmode = ADM1031_AUTO_MODE; - } else if (val == DISABLE) { - mmode = ADM1031_MANUAL_MODE; - } - - if (ioctl(fd, ADM1031_SET_MONITOR_MODE, &mmode) == -1) { - return (PICL_FAILURE); - } - - (void) close(fd); - return (PICL_SUCCESS); -} - -static int -get_string_val(ptree_rarg_t *parg, void *buf) -{ - picl_prophdl_t proph; - env_tuneable_t *tuneablep; - - proph = parg->proph; - - tuneablep = tuneable_lookup(proph); - - if (tuneablep == NULL) - return (PICL_FAILURE); - - (void) memcpy(buf, (caddr_t)tuneablep->value, - tuneablep->nbytes); - - return (PICL_SUCCESS); -} - -static int -set_string_val(ptree_warg_t *parg, const void *buf) -{ - picl_prophdl_t proph; - env_tuneable_t *tuneablep; - - if (parg->cred.dc_euid != 0) - return (PICL_PERMDENIED); - - proph = parg->proph; - - tuneablep = tuneable_lookup(proph); - - if (tuneablep == NULL) - return (PICL_FAILURE); - - (void) memcpy((caddr_t)tuneables->value, (caddr_t)buf, - tuneables->nbytes); - - - return (PICL_SUCCESS); -} - -static int -get_int_val(ptree_rarg_t *parg, void *buf) -{ - picl_prophdl_t proph; - env_tuneable_t *tuneablep; - - proph = parg->proph; - - tuneablep = tuneable_lookup(proph); - - if (tuneablep == NULL) - return (PICL_FAILURE); - - (void) memcpy((int *)buf, (int *)tuneablep->value, - tuneablep->nbytes); - - return (PICL_SUCCESS); -} - -static int -set_int_val(ptree_warg_t *parg, const void *buf) -{ - picl_prophdl_t proph; - env_tuneable_t *tuneablep; - - if (parg->cred.dc_euid != 0) - return (PICL_PERMDENIED); - - proph = parg->proph; - - tuneablep = tuneable_lookup(proph); - - if (tuneablep == NULL) - return (PICL_FAILURE); - - (void) memcpy((int *)tuneablep->value, (int *)buf, - tuneablep->nbytes); - - return (PICL_SUCCESS); -} - -int -get_dimm_fan_speed(int fan_fd, fanspeed_t *fanspeedp) -{ - int16_t dimm_fan_period; - i2c_reg_t i2c_reg; - - /* - * The dimm fan period is 16 bit value and we need to read - * registers 2 and 3 to get the LSB and MSB values. - */ - i2c_reg.reg_num = PIC16F819_FAN_PERIOD_MSB_REGISTER; - if (ioctl(fan_fd, I2C_GET_REG, &i2c_reg) == -1) { - if (env_debug) - envd_log(LOG_ERR, - "Error in reading FAN_PERIOD MSB REGISTER\n"); - return (-1); - } - dimm_fan_period = (i2c_reg.reg_value << 8); - i2c_reg.reg_num = PIC16F819_FAN_PERIOD_LSB_REGISTER; - if (ioctl(fan_fd, I2C_GET_REG, &i2c_reg) == -1) { - if (env_debug) - envd_log(LOG_ERR, - "Error in reading FAN_PERIOD LSB REGISTER\n"); - return (-1); - } - dimm_fan_period |= i2c_reg.reg_value; - if (env_debug) - envd_log(LOG_ERR, - " dimm fan tach period is 0x%x\n", dimm_fan_period); - if (dimm_fan_period == 0) { - if (env_debug) - envd_log(LOG_ERR, - "dimm fan tach period read as zero. Illegal value.\n"); - return (-1); - } - *fanspeedp = PIC16F819_FAN_TACH_TO_RPM(dimm_fan_period); - return (0); -} - -int -is_dimm_fan_failed(void) -{ - i2c_reg_t i2c_reg; - fanspeed_t fan_speed; - int retry_count; - - if (envd_dimm_fan.fd == -1) - return (-1); - /* - * read register 1 to look at Fan fault bit. - */ - i2c_reg.reg_num = PIC16F819_STATUS_REGISTER; - retry_count = MAX_RETRIES_FOR_PIC16F819_REG_READ; - while (retry_count > 0) { - if (ioctl(envd_dimm_fan.fd, I2C_GET_REG, &i2c_reg) == -1) { - retry_count--; - continue; - } else break; - } - if (retry_count != MAX_RETRIES_FOR_PIC16F819_REG_READ) { - if (env_debug) - envd_log(LOG_ERR, - "%d retries attempted in reading STATUS register.\n", - (MAX_RETRIES_FOR_PIC16F819_REG_READ - retry_count)); - } - if (retry_count == 0) { - (void) strncpy(dimm_fan_status_string, NOT_AVAILABLE, - sizeof (dimm_fan_status_string)); - (void) strncpy(dimm_fan_command_string, NOT_AVAILABLE, - sizeof (dimm_fan_command_string)); - (void) strncpy(dimm_fan_debug_string, NOT_AVAILABLE, - sizeof (dimm_fan_debug_string)); - (void) strncpy(dimm_fan_rpm_string, NOT_AVAILABLE, - sizeof (dimm_fan_rpm_string)); - return (-1); - } - if (env_debug) - envd_log(LOG_ERR, - "DIMM FAN STATUS reg = 0x%x\n", i2c_reg.reg_value); - if (i2c_reg.reg_value & PIC16F819_FAN_FAILED) { - (void) snprintf(dimm_fan_status_string, - sizeof (dimm_fan_status_string), "0x%x", - i2c_reg.reg_value); - i2c_reg.reg_num = PIC16F819_DEBUG_REGISTER; - if (ioctl(envd_dimm_fan.fd, I2C_GET_REG, &i2c_reg) == -1) { - (void) strncpy(dimm_fan_debug_string, NOT_AVAILABLE, - sizeof (dimm_fan_debug_string)); - } else { - (void) snprintf(dimm_fan_debug_string, - sizeof (dimm_fan_debug_string), - "0x%x", i2c_reg.reg_value); - } - i2c_reg.reg_num = PIC16F819_COMMAND_REGISTER; - if (ioctl(envd_dimm_fan.fd, I2C_GET_REG, &i2c_reg) == -1) { - (void) strncpy(dimm_fan_command_string, NOT_AVAILABLE, - sizeof (dimm_fan_command_string)); - } else { - (void) snprintf(dimm_fan_command_string, - sizeof (dimm_fan_command_string), - "0x%x", i2c_reg.reg_value); - } - if (get_dimm_fan_speed(envd_dimm_fan.fd, &fan_speed) == -1) { - (void) strncpy(dimm_fan_rpm_string, NOT_AVAILABLE, - sizeof (dimm_fan_rpm_string)); - } else { - (void) snprintf(dimm_fan_rpm_string, - sizeof (dimm_fan_rpm_string), - "%d", fan_speed); - } - return (1); - } else return (0); -} diff --git a/usr/src/cmd/picl/plugins/sun4u/enchilada/envd/piclenvsetup.c b/usr/src/cmd/picl/plugins/sun4u/enchilada/envd/piclenvsetup.c deleted file mode 100644 index 56dcf64224..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/enchilada/envd/piclenvsetup.c +++ /dev/null @@ -1,1008 +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" - -/* - * This file contains code for setting up environmental related nodes - * and properties in the PICL tree. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "picldefs.h" -#include "envd.h" - -/* - * Volatile property read/write function typedef - */ -typedef int ptree_vol_rdfunc_t(ptree_rarg_t *parg, void *buf); -typedef int ptree_vol_wrfunc_t(ptree_warg_t *parg, const void *buf); - -extern int monitor_disk_temp; -extern sensor_ctrl_blk_t sensor_ctrl[]; -extern fan_ctrl_blk_t fan_ctrl[]; -extern env_tuneable_t tuneables[]; -extern int errno; -extern int ntuneables; -#define PROP_FAN_SPEED_UNIT_VALUE "rpm" - - - -/* - * Sensor node data structure - */ -typedef struct { - char *parent_path; /* parent path */ - char *sensor_name; /* sensor name */ - env_sensor_t *sensorp; /* sensor info */ - picl_nodehdl_t nodeh; /* sensor node handle */ - picl_prophdl_t proph; /* "Temperature" property handle */ - picl_prophdl_t target_proph; /* "TargetTemp" property handle */ -} sensor_node_t; - - -/* - * Sensor nodes array - */ -static sensor_node_t sensor_nodes[] = { - {"/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,58", - SENSOR_CPU0_DIE, NULL, NULL, NULL, NULL}, - - {"/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,58", - SENSOR_CPU1_DIE, NULL, NULL, NULL, NULL}, - - {"/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,58", - SENSOR_INT_AMB_0, NULL, NULL, NULL, NULL}, - - {"/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c", - SENSOR_SYS_OUT, NULL, NULL, NULL, NULL}, - - {"/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c", - SENSOR_SYS_IN, NULL, NULL, NULL, NULL}, - - {"/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c", - SENSOR_INT_AMB_1, NULL, NULL, NULL, NULL}, - -}; -#define N_SENSOR_NODES (sizeof (sensor_nodes)/sizeof (sensor_nodes[0])) - - -/* - * Fan node data structure - */ -typedef struct { - char *parent_path; /* parent node path */ - char *fan_name; /* fan name */ - env_fan_t *fanp; /* fan information */ - char *speed_unit; /* speed unit string */ - picl_nodehdl_t nodeh; /* "fan" node handle */ - picl_prophdl_t proph; /* "Speed" property handle */ -} fan_node_t; - - -/* - * Fan node array - */ -static fan_node_t fan_nodes[] = { - {"/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,58", - ENV_CPU0_FAN, NULL, PROP_FAN_SPEED_UNIT_VALUE, NULL, NULL}, - - {"/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,58", - ENV_CPU1_FAN, NULL, PROP_FAN_SPEED_UNIT_VALUE, NULL, NULL}, - - {"/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c", - ENV_SYSTEM_OUT_FAN, NULL, PROP_FAN_SPEED_UNIT_VALUE, NULL, NULL}, - - {"/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c", - ENV_SYSTEM_INTAKE_FAN, NULL, PROP_FAN_SPEED_UNIT_VALUE, NULL, NULL}, - - {"/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,52", - ENV_DIMM_FAN, NULL, PROP_FAN_SPEED_UNIT_VALUE, NULL, NULL}, - -}; -#define N_FAN_NODES (sizeof (fan_nodes)/sizeof (fan_nodes[0])) - -/* - * Disk node data structure - */ -typedef struct { - char *parent_path; /* parent node path */ - char *disk_name; /* disk name */ - env_disk_t *diskp; /* disk information */ - picl_nodehdl_t nodeh; /* "disk" node handle */ - picl_prophdl_t proph; /* "Temperature" property handle */ -} disk_node_t; - -/* - * Disk node array - */ -static disk_node_t disk_nodes[] = { - {DISK0_NODE_PATH, ENV_DISK0, NULL, NULL, NULL}, - {DISK1_NODE_PATH, ENV_DISK1, NULL, NULL, NULL}, -}; -#define N_DISK_NODES (sizeof (disk_nodes)/sizeof (disk_nodes[0])) - -/* - * Miscellaneous declarations - */ -static void delete_sensor_nodes_and_props(void); -static void delete_disk_nodes_and_props(void); -static void delete_fan_nodes_and_props(void); - - -/* - * Read function for volatile "Temperature" property - */ -static int -get_current_temp(ptree_rarg_t *parg, void *buf) -{ - tempr_t temp; - picl_prophdl_t proph; - sensor_node_t *snodep; - int i; - - /* - * Locate the sensor in our sensor_nodes table by matching the - * property handle and get its temperature. - */ - proph = parg->proph; - for (i = 0; i < N_SENSOR_NODES; ++i) { - snodep = &sensor_nodes[i]; - if (snodep->proph != proph) - continue; - - if (get_temperature(snodep->sensorp, &temp) < 0) - break; - (void) memcpy(buf, (caddr_t)&temp, sizeof (tempr_t)); - return (PICL_SUCCESS); - } - return (PICL_FAILURE); -} - -/* - * Read function for volatile "Temperature" property - */ -static int -get_disk_temp(ptree_rarg_t *parg, void *buf) -{ - tempr_t temp; - picl_prophdl_t proph; - disk_node_t *dnodep; - int i; - - /* - * Locate the sensor in our sensor_nodes table by matching the - * property handle and get its temperature. - */ - proph = parg->proph; - for (i = 0; i < N_DISK_NODES; ++i) { - dnodep = &disk_nodes[i]; - if (dnodep->proph != proph) - continue; - - if (disk_temperature(dnodep->diskp, &temp) < 0) - break; - (void) memcpy(buf, (caddr_t)&temp, sizeof (tempr_t)); - return (PICL_SUCCESS); - } - return (PICL_FAILURE); -} - -/* - * Read function for volatile "Speed" property on "fan" class node - */ -static int -set_current_speed(ptree_warg_t *parg, const void *buf) -{ - fanspeed_t speed; - picl_prophdl_t proph; - fan_node_t *fnodep; - int i, ret; - - /* - * Locate the fan in our fan_nodes table by matching the - * property handle and get fan speed. - */ - proph = parg->proph; - for (i = 0; i < N_FAN_NODES; ++i) { - fnodep = &fan_nodes[i]; - if (fnodep->proph != proph) - continue; - if (fnodep->fanp->fd == -1) - continue; - - (void) memcpy((caddr_t)&speed, buf, sizeof (speed)); - - ret = set_fan_speed(fnodep->fanp, speed); - - if (ret < 0) { - if (ret == -1 && errno == EBUSY) - return (PICL_NOTWRITABLE); - if (ret == -2) - return (PICL_INVALIDARG); - break; - } - - - return (PICL_SUCCESS); - } - return (PICL_FAILURE); -} - - -/* - * Read function for volatile "Speed" property on "fan" class node - */ -static int -get_current_speed(ptree_rarg_t *parg, void *buf) -{ - fanspeed_t speed; - picl_prophdl_t proph; - fan_node_t *fnodep; - int i; - - /* - * Locate the fan in our fan_nodes table by matching the - * property handle and get fan speed. - */ - proph = parg->proph; - for (i = 0; i < N_FAN_NODES; ++i) { - fnodep = &fan_nodes[i]; - if (fnodep->proph != proph) - continue; - if (fnodep->fanp->fd == -1) - continue; - if (get_fan_speed(fnodep->fanp, &speed) < 0) - break; - - (void) memcpy(buf, (caddr_t)&speed, sizeof (speed)); - return (PICL_SUCCESS); - } - return (PICL_FAILURE); -} - -/* - * Create and add the specified regular property - */ - -static int -add_regular_prop(picl_nodehdl_t nodeh, char *name, int type, int access, - int size, void *valbuf, picl_prophdl_t *prophp) -{ - int err; - ptree_propinfo_t propinfo; - picl_prophdl_t proph; - - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - type, access, size, name, NULL, NULL); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_create_and_add_prop(nodeh, &propinfo, valbuf, &proph); - if (err == PICL_SUCCESS && prophp) - *prophp = proph; - return (err); -} - - -/* - * Create and add the specified volatile property - */ -static int -add_volatile_prop(picl_nodehdl_t nodeh, char *name, int type, int access, - int size, ptree_vol_rdfunc_t *rdfunc, ptree_vol_wrfunc_t *wrfunc, - picl_prophdl_t *prophp) -{ - int err; - ptree_propinfo_t propinfo; - picl_prophdl_t proph; - - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - type, (access|PICL_VOLATILE), size, name, rdfunc, wrfunc); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_create_and_add_prop(nodeh, &propinfo, NULL, &proph); - if (err == PICL_SUCCESS && prophp) - *prophp = proph; - return (err); -} - -/* - * Add temperature threshold properties - */ -static void -add_sensor_thresh_props(picl_nodehdl_t nodeh, sensor_ctrl_blk_t *threshp) -{ - picl_prophdl_t proph; - - (void) add_regular_prop(nodeh, PICL_PROP_LOW_POWER_OFF, - PICL_PTYPE_INT, PICL_READ, - sizeof (threshp->low_power_off), - (void *)&(threshp->low_power_off), &proph); - - (void) add_regular_prop(nodeh, PICL_PROP_LOW_SHUTDOWN, - PICL_PTYPE_INT, PICL_READ, - sizeof (threshp->low_shutdown), - (void *)&(threshp->low_shutdown), &proph); - - (void) add_regular_prop(nodeh, PICL_PROP_LOW_WARNING, - PICL_PTYPE_INT, PICL_READ, - sizeof (threshp->low_warning), - (void *)&(threshp->low_warning), &proph); - - (void) add_regular_prop(nodeh, PICL_PROP_HIGH_WARNING, - PICL_PTYPE_INT, PICL_READ, - sizeof (threshp->high_warning), - (void *)&(threshp->high_warning), &proph); - - (void) add_regular_prop(nodeh, PICL_PROP_HIGH_SHUTDOWN, - PICL_PTYPE_INT, PICL_READ, - sizeof (threshp->high_shutdown), - (void *)&(threshp->high_shutdown), &proph); - - (void) add_regular_prop(nodeh, PICL_PROP_HIGH_POWER_OFF, - PICL_PTYPE_INT, PICL_READ, - sizeof (threshp->high_power_off), - (void *)&(threshp->high_power_off), &proph); -} - - -/* - * Go through the sensor_nodes array and create those nodes - * and the Temperature property to report the temperature. - */ -static int -add_sensor_nodes_and_props() -{ - int err; - char *pname, *nodename, *devfs_path; - sensor_node_t *snodep; - sensor_ctrl_blk_t *threshp; - picl_nodehdl_t nodeh, cnodeh; - picl_prophdl_t proph; - env_sensor_t *sensorp; - int i; - - for (i = 0; i < N_SENSOR_NODES; ++i) { - snodep = &sensor_nodes[i]; - /* - * Get the parent nodeh - */ - err = ptree_get_node_by_path(snodep->parent_path, &nodeh); - if (err != PICL_SUCCESS) - continue; - sensorp = snodep->sensorp; - if (sensorp->present == B_FALSE) - continue; - /* - * Create temperature-sensor node - */ - nodename = snodep->sensor_name; - err = ptree_create_and_add_node(nodeh, nodename, - PICL_CLASS_TEMPERATURE_SENSOR, &cnodeh); - if (env_debug) - envd_log(LOG_INFO, - "Creating PICL sensor node '%s' err:%d\n", - nodename, err); - if (err != PICL_SUCCESS) - break; - - /* save node handle */ - snodep->nodeh = cnodeh; - - /* - * Add "devfs_path" property in child node - */ - devfs_path = sensorp->devfs_path; - pname = PICL_PROP_DEVFS_PATH; - err = add_regular_prop(cnodeh, pname, - PICL_PTYPE_CHARSTRING, PICL_READ, - strlen(devfs_path)+1, (void *)devfs_path, &proph); - if (err != PICL_SUCCESS) - break; - - /* - * Now add volatile "temperature" volatile property - * in this "temperature-sensor" class node. - */ - pname = PICL_PROP_TEMPERATURE; - err = add_volatile_prop(cnodeh, pname, - PICL_PTYPE_INT, PICL_READ, sizeof (tempr_t), - get_current_temp, NULL, &proph); - if (err != PICL_SUCCESS) - break; - - /* Save prop handle */ - snodep->proph = proph; - - /* - * Add threshold related properties - */ - threshp = sensorp->es_ptr; - - if (threshp != NULL) - add_sensor_thresh_props(cnodeh, threshp); - - } - if (err != PICL_SUCCESS) { - delete_sensor_nodes_and_props(); - if (env_debug) - envd_log(LOG_INFO, - "Can't create prop/node for sensor '%s'\n", - nodename); - return (err); - } - return (PICL_SUCCESS); -} - -/* - * Delete all sensor nodes and related properties created by the - * add_sensor_prop() for each sensor node in the PICL tree. - */ -static void -delete_sensor_nodes_and_props(void) -{ - sensor_node_t *snodep; - int i; - - /* - * Delete/destroy any property created in the sensed device - * as well as the sensor node and all properties under it. - * Note that deleiing/destroying a node deletes/destroys - * all properties within that node. - */ - - for (i = 0; i < N_SENSOR_NODES; ++i) { - snodep = &sensor_nodes[i]; - if (snodep->nodeh != NULL) { - /* delete node and all properties under it */ - (void) ptree_delete_node(snodep->nodeh); - (void) ptree_destroy_node(snodep->nodeh); - snodep->nodeh = NULL; - snodep->proph = NULL; - } - } -} - -/* - * Go through the disk_nodes array and create those nodes - * and the Temperature property to report the temperature. - */ -static int -add_disk_nodes_and_props() -{ - int err; - char *pname, *nodename, *devfs_path; - disk_node_t *dnodep; - picl_nodehdl_t nodeh, cnodeh; - picl_prophdl_t proph; - env_disk_t *diskp; - int i; - - for (i = 0; i < N_DISK_NODES; ++i) { - dnodep = &disk_nodes[i]; - /* - * Get the parent nodeh - */ - err = ptree_get_node_by_path(dnodep->parent_path, &nodeh); - if (err != PICL_SUCCESS) { - if (env_debug) - envd_log(LOG_ERR, "failed to get node for path %s\n", - dnodep->parent_path); - err = PICL_SUCCESS; - continue; - } - diskp = dnodep->diskp; - if (diskp->present == B_FALSE) - continue; - /* - * Create temperature-sensor node - */ - nodename = dnodep->disk_name; - err = ptree_create_and_add_node(nodeh, nodename, - PICL_CLASS_TEMPERATURE_SENSOR, &cnodeh); - if (env_debug) - envd_log(LOG_ERR, - "Creating PICL disk node '%s' err:%d\n", - nodename, err); - if (err != PICL_SUCCESS) - break; - - /* save node handle */ - dnodep->nodeh = cnodeh; - - /* - * Add "devfs_path" property in child node - */ - devfs_path = diskp->devfs_path; - pname = PICL_PROP_DEVFS_PATH; - err = add_regular_prop(cnodeh, pname, - PICL_PTYPE_CHARSTRING, PICL_READ, - strlen(devfs_path)+1, (void *)devfs_path, &proph); - if (err != PICL_SUCCESS) - break; - - /* - * Now add volatile "temperature" volatile property - * in this "temperature-sensor" class node. - */ - pname = PICL_PROP_TEMPERATURE; - err = add_volatile_prop(cnodeh, pname, - PICL_PTYPE_INT, PICL_READ, sizeof (tempr_t), - get_disk_temp, NULL, &proph); - if (err != PICL_SUCCESS) - break; - - /* Save prop handle */ - dnodep->proph = proph; - - /* - * Add threshold related properties - */ - - (void) add_regular_prop(cnodeh, PICL_PROP_LOW_SHUTDOWN, - PICL_PTYPE_INT, PICL_READ, - sizeof (diskp->low_shutdown), - (void *)&(diskp->low_shutdown), &proph); - - (void) add_regular_prop(cnodeh, PICL_PROP_LOW_WARNING, - PICL_PTYPE_INT, PICL_READ, - sizeof (diskp->low_warning), - (void *)&(diskp->low_warning), &proph); - - (void) add_regular_prop(cnodeh, PICL_PROP_HIGH_WARNING, - PICL_PTYPE_INT, PICL_READ, - sizeof (diskp->high_warning), - (void *)&(diskp->high_warning), &proph); - - (void) add_regular_prop(cnodeh, PICL_PROP_HIGH_SHUTDOWN, - PICL_PTYPE_INT, PICL_READ, - sizeof (diskp->high_shutdown), - (void *)&(diskp->high_shutdown), &proph); - - } - if (err != PICL_SUCCESS) { - delete_disk_nodes_and_props(); - if (env_debug) - envd_log(LOG_INFO, - "Can't create prop/node for disk '%s'\n", - nodename); - return (err); - } - return (PICL_SUCCESS); -} - -/* - * Delete all disk nodes and related properties created by the - * add_disk_props() for each disk node in the PICL tree. - */ -static void -delete_disk_nodes_and_props(void) -{ - disk_node_t *dnodep; - int i; - - /* - * Delete/destroy disk node and all properties under it. - * Note that deleting/destroying a node deletes/destroys - * all properties within that node. - */ - - for (i = 0; i < N_DISK_NODES; ++i) { - dnodep = &disk_nodes[i]; - if (dnodep->nodeh != NULL) { - (void) ptree_delete_node(dnodep->nodeh); - (void) ptree_destroy_node(dnodep->nodeh); - dnodep->nodeh = NULL; - dnodep->proph = NULL; - } - } -} - -/* - * For each entry in fan_nodes[] array, do the following: - * - Create specified "fan" class node. - * - Create "Speed" volatile propery under "fan" class node. - * - Create "SpeedUnit" property under "fan" class node. - */ -static int -add_fan_nodes_and_props() -{ - int err; - char *pname, *nodename, *devfs_path; - env_fan_t *fanp; - fan_node_t *fnodep; - picl_nodehdl_t nodeh, cnodeh; - picl_prophdl_t proph; - int i; - - for (i = 0; i < N_FAN_NODES; ++i) { - /* - * Add various fan nodes and properties - */ - fnodep = &fan_nodes[i]; - if (fnodep->fanp->present == B_FALSE) - continue; - /* - * get parent nodeh - */ - err = ptree_get_node_by_path(fnodep->parent_path, &nodeh); - if (err != PICL_SUCCESS) { - if (env_debug) - envd_log(LOG_ERR, - "node for %s NOT FOUND.\n", fnodep->parent_path); - err = PICL_SUCCESS; - continue; - } - /* - * Create "fan" class node and save node handle - */ - nodename = fnodep->fan_name; - err = ptree_create_and_add_node(nodeh, nodename, - PICL_CLASS_FAN, &cnodeh); - if (env_debug) - envd_log(LOG_ERR, - "Creating PICL fan node '%s' err:%d\n", - nodename, err); - - if (err != PICL_SUCCESS) - break; - fnodep->nodeh = cnodeh; - - /* - * Add "devfs_path" property in child node - */ - fanp = fnodep->fanp; - devfs_path = fanp->devfs_path; - pname = PICL_PROP_DEVFS_PATH; - err = add_regular_prop(cnodeh, pname, - PICL_PTYPE_CHARSTRING, PICL_READ, - strlen(devfs_path)+1, (void *)devfs_path, &proph); - - if (err != PICL_SUCCESS) - - break; - - /* - * Add "Speed" volatile property in this "fan" - * class node and save prop handle. - */ - pname = PICL_PROP_FAN_SPEED; - if (fanp->id == DIMM_FAN_ID) { - /* - * We do not permit setting of DIMM FAN speeds. - */ - err = add_volatile_prop(cnodeh, pname, PICL_PTYPE_INT, - PICL_READ, sizeof (fanspeed_t), - get_current_speed, - NULL, &proph); - } else { - err = add_volatile_prop(cnodeh, pname, PICL_PTYPE_INT, - PICL_READ|PICL_WRITE, sizeof (fanspeed_t), - get_current_speed, - set_current_speed, &proph); - } - - if (err != PICL_SUCCESS) - break; - fnodep->proph = proph; - - /* - * Add other "fan" class properties - */ - pname = PICL_PROP_FAN_SPEED_UNIT; - err = add_regular_prop(cnodeh, pname, - PICL_PTYPE_CHARSTRING, PICL_READ, - strlen(fnodep->speed_unit)+1, - (void *)fnodep->speed_unit, &proph); - - if (err != PICL_SUCCESS) - break; - } - if (err != PICL_SUCCESS) { - delete_fan_nodes_and_props(); - if (env_debug) - envd_log(LOG_WARNING, - "Can't create prop/node for fan '%s'\n", - nodename); - return (err); - } - return (PICL_SUCCESS); -} - - -/* - * Delete all fan nodes and related properties created by the - * add_fan_props() for each fan node in the PICL tree. - */ -static void -delete_fan_nodes_and_props(void) -{ - fan_node_t *fnodep; - int i; - - /* - * Delete/destroy fan node and all properties under it. - * Note that deleting/destroying a node deletes/destroys - * all properties within that node. - */ - - for (i = 0; i < N_FAN_NODES; ++i) { - fnodep = &fan_nodes[i]; - if (fnodep->nodeh != NULL) { - (void) ptree_delete_node(fnodep->nodeh); - (void) ptree_destroy_node(fnodep->nodeh); - fnodep->nodeh = NULL; - } - } -} -/* - * Tuneables publishing functions - */ -static int -copy_persistent_tuneable(env_tuneable_t *tune, char *buf) -{ - - switch (tune->type) { - case PICL_PTYPE_INT : { - (void) memcpy((int *)tune->value, - buf, tune->nbytes); - break; - } - case PICL_PTYPE_CHARSTRING : { - (void) memcpy((caddr_t)tune->value, - buf, tune->nbytes); - break; - } - default : { - return (PICL_FAILURE); - } - } - return (PICL_SUCCESS); -} - -static void -env_parse_tunables(picl_nodehdl_t rooth) -{ - char nmbuf[SYS_NMLN]; - char pname[PATH_MAX]; - - if (sysinfo(SI_PLATFORM, nmbuf, sizeof (nmbuf)) != -1) { - (void) snprintf(pname, PATH_MAX, PICLD_PLAT_PLUGIN_DIRF, nmbuf); - (void) strlcat(pname, TUNABLE_CONF_FILE, PATH_MAX); - if (access(pname, R_OK) == 0) { - (void) picld_pluginutil_parse_config_file(rooth, pname); - return; - } - } -} - -int -env_picl_setup_tuneables(void) -{ - int err; - int i; - picl_nodehdl_t nodeh; - picl_nodehdl_t rooth; - picl_prophdl_t proph; - env_tuneable_t *tuneablep; - char read_buf[BUFSIZ]; - - if (ptree_get_root(&rooth) != PICL_SUCCESS) { - return (PICL_FAILURE); - } - err = ptree_create_and_add_node(rooth, PICL_PLUGINS_NODE, - PICL_CLASS_PICL, &nodeh); - if (err != PICL_SUCCESS) - return (PICL_FAILURE); - err = ptree_create_and_add_node(nodeh, PICL_ENVIRONMENTAL_NODE, - PICL_CLASS_PICL, &nodeh); - if (err != PICL_SUCCESS) { - return (PICL_FAILURE); - } - - /* - * Parse the conf file - */ - env_parse_tunables(rooth); - for (i = 0; i < ntuneables; i++) { - tuneablep = &tuneables[i]; - err = ptree_get_propval_by_name(nodeh, tuneablep->name, - read_buf, tuneablep->nbytes); - - if (err != PICL_SUCCESS) { - /* - * Add volitle functions to environmental node - */ - err = add_volatile_prop(nodeh, tuneablep->name, - tuneablep->type, - PICL_READ|PICL_WRITE, tuneablep->nbytes, - tuneablep->rfunc, - tuneablep->wfunc, &proph); - - tuneablep->proph = proph; - } else { - /* - * property is persistent - */ - (void) copy_persistent_tuneable(tuneablep, - read_buf); - } - } - - return (PICL_SUCCESS); -} - -/* - * Find the ENVMODEL_CONF_FILE file. - */ -static int -get_envmodel_conf_file(char *outfilename) -{ - char nmbuf[SYS_NMLN]; - char pname[PATH_MAX]; - - if (sysinfo(SI_PLATFORM, nmbuf, sizeof (nmbuf)) != -1) { - (void) snprintf(pname, PATH_MAX, PICLD_PLAT_PLUGIN_DIRF, nmbuf); - (void) strlcat(pname, ENV_CONF_FILE, PATH_MAX); - if (access(pname, R_OK) == 0) { - (void) strlcpy(outfilename, pname, PATH_MAX); - return (0); - } - } - - if (sysinfo(SI_MACHINE, nmbuf, sizeof (nmbuf)) != -1) { - (void) snprintf(pname, PATH_MAX, PICLD_PLAT_PLUGIN_DIRF, nmbuf); - (void) strlcat(pname, ENV_CONF_FILE, PATH_MAX); - if (access(pname, R_OK) == 0) { - (void) strlcpy(outfilename, pname, PATH_MAX); - return (0); - } - } - - (void) snprintf(pname, PATH_MAX, "%s/%s", PICLD_COMMON_PLUGIN_DIR, - ENV_CONF_FILE); - - if (access(pname, R_OK) == 0) { - (void) strlcpy(outfilename, pname, PATH_MAX); - return (0); - } - - return (-1); -} - -/* Delete all sensor/fan nodes and any properties created by this plugin */ -void -env_picl_destroy(void) -{ - delete_fan_nodes_and_props(); - delete_sensor_nodes_and_props(); - delete_disk_nodes_and_props(); -} - -void -env_picl_setup(void) -{ - int err; - sensor_node_t *snodep; - fan_node_t *fnodep; - disk_node_t *dnodep; - picl_nodehdl_t plath; - char fullfilename[PATH_MAX]; - picl_nodehdl_t rooth; - int i; - - - /* - * Initialize sensorp and other fields in the sensor_nodes[] array - */ - - for (i = 0; i < N_SENSOR_NODES; ++i) { - snodep = &sensor_nodes[i]; - snodep->sensorp = sensor_lookup(snodep->sensor_name); - snodep->nodeh = NULL; - snodep->proph = NULL; - snodep->target_proph = NULL; - } - - /* - * Initialize fanp and other fields in the fan_nodes[] array - */ - for (i = 0; i < N_FAN_NODES; ++i) { - fnodep = &fan_nodes[i]; - fnodep->fanp = fan_lookup(fnodep->fan_name); - fnodep->nodeh = NULL; - fnodep->proph = NULL; - } - - /* - * Initialize diskp and other fields in the disk_nodes[] array - */ - for (i = 0; i < N_DISK_NODES; ++i) { - dnodep = &disk_nodes[i]; - dnodep->diskp = disk_lookup(dnodep->disk_name); - dnodep->nodeh = NULL; - dnodep->proph = NULL; - } - - /* - * Get platform handle and populate PICL tree with environmental - * nodes and properties - */ - err = ptree_get_node_by_path("/platform", &plath); - - if (err == PICL_SUCCESS) - err = add_sensor_nodes_and_props(); - if (err == PICL_SUCCESS) - err = add_fan_nodes_and_props(); - if ((err == PICL_SUCCESS) && (monitor_disk_temp)) - err = add_disk_nodes_and_props(); - - /* - * We can safely call delete_xxx_nodes_and_props even - * if nodes were not added. - */ - - if (err != PICL_SUCCESS) { - delete_fan_nodes_and_props(); - delete_disk_nodes_and_props(); - delete_sensor_nodes_and_props(); - envd_log(LOG_CRIT, ENVD_PICL_SETUP_FAILED); - return; - } - - /* - * Parse the envmodel.conf file and populate the PICL tree - */ - if (get_envmodel_conf_file(fullfilename) < 0) - envd_log(LOG_CRIT, ENVD_PICL_SETUP_FAILED); - if (ptree_get_root(&rooth) != PICL_SUCCESS) - envd_log(LOG_CRIT, ENVD_PICL_SETUP_FAILED); - err = picld_pluginutil_parse_config_file(rooth, fullfilename); - - if (err != PICL_SUCCESS) - envd_log(LOG_CRIT, ENVD_PICL_SETUP_FAILED); -} diff --git a/usr/src/cmd/picl/plugins/sun4u/enchilada/frudata/Makefile b/usr/src/cmd/picl/plugins/sun4u/enchilada/frudata/Makefile deleted file mode 100644 index 4fc0cdba8e..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/enchilada/frudata/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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# lib/picl/plugins/sun4u/enchilada/frudata/Makefile -# -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Blade-2500 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONF= libpiclfrudata.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: $(CONF) - -install: $(ROOTLIBDIR) $(ROOTCONF) - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/enchilada/frudata/libpiclfrudata.conf b/usr/src/cmd/picl/plugins/sun4u/enchilada/frudata/libpiclfrudata.conf deleted file mode 100644 index ce641779d2..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/enchilada/frudata/libpiclfrudata.conf +++ /dev/null @@ -1,64 +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 2002-2003 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -#ident "%Z%%M% %I% %E% SMI" -# -# This file creates the FRU device paths for the FRUAccess library -# - -VERSION 1.0 - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/motherboard-fru-prom@0,a2 -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/motherboard-fru-prom@0,a2:motherboard-fru-prom" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,b6 -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,b6:dimm-spd" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,b8 -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,b8:dimm-spd" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,ba -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,ba:dimm-spd" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,bc -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,bc:dimm-spd" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,c6 -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,c6:dimm-spd" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,c8 -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,c8:dimm-spd" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,ca -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,ca:dimm-spd" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,cc -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,cc:dimm-spd" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/audio-card-fru-prom -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/audio-card-fru-prom@0,a0:audio-card-fru-prom" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/scsi-backplane-fru-prom -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/scsi-backplane-fru-prom@0,a8:scsi-backplane-fru-prom" - diff --git a/usr/src/cmd/picl/plugins/sun4u/enchilada/frutree/Makefile b/usr/src/cmd/picl/plugins/sun4u/enchilada/frutree/Makefile deleted file mode 100644 index 8021a12d3e..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/enchilada/frutree/Makefile +++ /dev/null @@ -1,68 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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. -# -# lib/picl/plugins/sun4u/enchilada/frutree/Makefile -# -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Blade-2500 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONF= piclfrutree.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 -INFOS= piclfrutree.info system-board.info - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: $(CONF) - -install: $(ROOTLIBDIR) $(ROOTCONF) - -$(CONF): $(INFOS) - $(RM) $@ - $(CPP) piclfrutree.info > $@ - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/enchilada/frutree/piclfrutree.info b/usr/src/cmd/picl/plugins/sun4u/enchilada/frutree/piclfrutree.info deleted file mode 100644 index c870a2dbc0..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/enchilada/frutree/piclfrutree.info +++ /dev/null @@ -1,134 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -#define PLATFORM_CLASS jbus - -VERSION 1.1 -NODE frutree picl - NODE chassis fru - /* - * SunMC physical view view_points for this platform - * This will get moved to a separate SunMC physical view plugin later. - */ - PROP ViewPoints string r 0 "front rear side" - NODE MB location - PROP SlotType string r 0 "system-board" - PROP Label string r 0 "MB" - ENDNODE - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - NODE intake-fan fru - ENDNODE - ENDNODE - NODE F1 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F1" - ENDNODE - NODE F2 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F2" - ENDNODE - NODE F3 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F3" - NODE outtake-fan fru - ENDNODE - ENDNODE - NODE PS0 location - PROP SlotType string r 0 "power-supply" - PROP Label string r 0 "PS0" - NODE power-supply fru - ENDNODE - ENDNODE - NODE SCSI-BP fru - PROP FRUDataAvailable void r - REFPROP _seeprom_source /platform/pci@1e,600000/isa@7/i2c@0,320/scsi-backplane-fru-prom - NODE HDD0 location - PROP SlotType string r 0 "disk-slot" - PROP Label string r 0 "HDD0" - ENDNODE - NODE HDD1 location - PROP SlotType string r 0 "disk-slot" - PROP Label string r 0 "HDD1" - ENDNODE - ENDNODE - NODE RM0 location - PROP SlotType string r 0 "cdrom-slot" - PROP Label string r 0 "RM0" - ENDNODE - ENDNODE -ENDNODE - -/* add cpu fan fru nodes for cpus which are present */ -name:/frutree/chassis/F1 -REFNODE cpu0-fan fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,58/cpu0-fan - -name:/frutree/chassis/F2 -REFNODE cpu1-fan fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,58/cpu1-fan - -/* add disk fru nodes for disks which are present */ -name:/frutree/chassis/SCSI-BP/HDD0 - REFNODE disk fru WITH name:/platform/pci@1d,700000/scsi@4/sd@0,0 -name:/frutree/chassis/SCSI-BP/HDD1 - REFNODE disk fru WITH name:/platform/pci@1d,700000/scsi@4/sd@1,0 -name:/frutree/chassis/RM0 - REFNODE cdrom fru WITH name:/platform/pci@1e,600000/ide@d/sd@2,0 - -name:/frutree/chassis/MB -#include "system-board.info" - diff --git a/usr/src/cmd/picl/plugins/sun4u/enchilada/frutree/system-board.info b/usr/src/cmd/picl/plugins/sun4u/enchilada/frutree/system-board.info deleted file mode 100644 index 865c56c0da..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/enchilada/frutree/system-board.info +++ /dev/null @@ -1,412 +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" - * - * This file creates the system board structure - */ - -NODE system-board fru - NODE pci-slot location - PROP Label string r 0 "PCI5" - PROP SlotType string r 0 "pci" - ENDNODE - NODE pci-slot location - PROP Label string r 0 "PCI4" - PROP SlotType string r 0 "pci" - ENDNODE - NODE pci-slot location - PROP Label string r 0 "PCI3" - PROP SlotType string r 0 "pci" - ENDNODE - NODE pci-slot location - PROP Label string r 0 "PCI2" - PROP SlotType string r 0 "pci" - ENDNODE - NODE pci-slot location - PROP Label string r 0 "PCI1" - PROP SlotType string r 0 "pci" - ENDNODE - NODE pci-slot location - PROP Label string r 0 "PCI0" - PROP SlotType string r 0 "pci" - ENDNODE - NODE audio-slot location - PROP Label string r 0 "ARC" - PROP SlotType string r 0 "audio" - ENDNODE - NODE cpu-slot location - PROP Label string r 0 "0" - PROP Slot uint r 4 0 - PROP SlotType string r 0 "cpu" - ENDNODE - NODE cpu-slot location - PROP Label string r 0 "1" - PROP Slot uint r 4 1 - PROP SlotType string r 0 "cpu" - ENDNODE - NODE mem-slot location - PROP Slot uint r 4 1 - PROP Label string r 0 "DIMM0" - PROP SlotType string r 0 "memory-module" - ENDNODE - NODE mem-slot location - PROP Slot uint r 4 2 - PROP Label string r 0 "DIMM1" - PROP SlotType string r 0 "memory-module" - ENDNODE - NODE mem-slot location - PROP Slot uint r 4 3 - PROP Label string r 0 "DIMM2" - PROP SlotType string r 0 "memory-module" - ENDNODE - NODE mem-slot location - PROP Slot uint r 4 4 - PROP Label string r 0 "DIMM3" - PROP SlotType string r 0 "memory-module" - ENDNODE - NODE mem-slot location - PROP Slot uint r 4 5 - PROP Label string r 0 "DIMM4" - PROP SlotType string r 0 "memory-module" - ENDNODE - NODE mem-slot location - PROP Slot uint r 4 6 - PROP Label string r 0 "DIMM5" - PROP SlotType string r 0 "memory-module" - ENDNODE - NODE mem-slot location - PROP Slot uint r 4 7 - PROP Label string r 0 "DIMM6" - PROP SlotType string r 0 "memory-module" - ENDNODE - NODE mem-slot location - PROP Slot uint r 4 8 - PROP Label string r 0 "DIMM7" - PROP SlotType string r 0 "memory-module" - ENDNODE -ENDNODE - -/* - * create the fru modules for CPU - */ -name:/frutree/chassis/MB/system-board/cpu-slot?Slot=0 -REFNODE cpu-module fru WITH _class:/PLATFORM_CLASS/cpu?ID=0 - -name:/frutree/chassis/MB/system-board/cpu-slot?Slot=1 -REFNODE cpu-module fru WITH _class:/PLATFORM_CLASS/cpu?ID=1 - -/* - * seeprom source for motherboard - */ -name:/frutree/chassis/MB/system-board -PROP FRUDataAvailable void r -REFPROP _seeprom_source /platform/pci@1e,600000/isa@7/i2c@0,320/motherboard-fru-prom@0,a2 - -/* - * Set up memory module fru - */ -name:/frutree/chassis/MB/system-board/mem-slot?Label=DIMM0 -REFNODE mem-module fru WITH /platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,b6 - -name:/frutree/chassis/MB/system-board/mem-slot?Label=DIMM1 -REFNODE mem-module fru WITH /platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,b8 - -name:/frutree/chassis/MB/system-board/mem-slot?Label=DIMM2 -REFNODE mem-module fru WITH /platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,ba - -name:/frutree/chassis/MB/system-board/mem-slot?Label=DIMM3 -REFNODE mem-module fru WITH /platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,bc - -name:/frutree/chassis/MB/system-board/mem-slot?Label=DIMM4 -REFNODE mem-module fru WITH /platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,c6 - -name:/frutree/chassis/MB/system-board/mem-slot?Label=DIMM5 -REFNODE mem-module fru WITH /platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,c8 - -name:/frutree/chassis/MB/system-board/mem-slot?Label=DIMM6 -REFNODE mem-module fru WITH /platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,ca - -name:/frutree/chassis/MB/system-board/mem-slot?Label=DIMM7 -REFNODE mem-module fru WITH /platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,cc - -/* - * Seeprom source for dimms - */ -name:/frutree/chassis/MB/system-board/mem-slot?Label=DIMM0/mem-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source /platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,b6 - -name:/frutree/chassis/MB/system-board/mem-slot?Label=DIMM1/mem-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source /platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,b8 - -name:/frutree/chassis/MB/system-board/mem-slot?Label=DIMM2/mem-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source /platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,ba - -name:/frutree/chassis/MB/system-board/mem-slot?Label=DIMM3/mem-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source /platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,bc - -name:/frutree/chassis/MB/system-board/mem-slot?Label=DIMM4/mem-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source /platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,c6 - -name:/frutree/chassis/MB/system-board/mem-slot?Label=DIMM5/mem-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source /platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,c8 - -name:/frutree/chassis/MB/system-board/mem-slot?Label=DIMM6/mem-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source /platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,ca - -name:/frutree/chassis/MB/system-board/mem-slot?Label=DIMM7/mem-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source /platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,cc - -/* - * _fru_parent memory modules - */ -name:/platform/memory-controller?portid=0/memory-module-group?ID=0/memory-module?ID=0 -REFPROP _fru_parent /frutree/chassis/MB/system-board/mem-slot?Label=DIMM0/mem-module - -name:/platform/memory-controller?portid=0/memory-module-group?ID=0/memory-module?ID=1 -REFPROP _fru_parent /frutree/chassis/MB/system-board/mem-slot?Label=DIMM1/mem-module - -name:/platform/memory-controller?portid=0/memory-module-group?ID=1/memory-module?ID=0 -REFPROP _fru_parent /frutree/chassis/MB/system-board/mem-slot?Label=DIMM2/mem-module - -name:/platform/memory-controller?portid=0/memory-module-group?ID=1/memory-module?ID=1 -REFPROP _fru_parent /frutree/chassis/MB/system-board/mem-slot?Label=DIMM3/mem-module - -name:/platform/memory-controller?portid=1/memory-module-group?ID=0/memory-module?ID=0 -REFPROP _fru_parent /frutree/chassis/MB/system-board/mem-slot?Label=DIMM4/mem-module - -name:/platform/memory-controller?portid=1/memory-module-group?ID=0/memory-module?ID=1 -REFPROP _fru_parent /frutree/chassis/MB/system-board/mem-slot?Label=DIMM5/mem-module - -name:/platform/memory-controller?portid=1/memory-module-group?ID=1/memory-module?ID=0 -REFPROP _fru_parent /frutree/chassis/MB/system-board/mem-slot?Label=DIMM6/mem-module - -name:/platform/memory-controller?portid=1/memory-module-group?ID=1/memory-module?ID=1 -REFPROP _fru_parent /frutree/chassis/MB/system-board/mem-slot?Label=DIMM7/mem-module - - -/* - * _fru_parent CPU, memory-controller devices - */ -_class:/PLATFORM_CLASS/cpu?ID=0 -REFPROP _fru_parent /frutree/chassis/MB/system-board/cpu-slot?Slot=0/cpu-module - -name:/platform/memory-controller?portid=0 -REFPROP _fru_parent /frutree/chassis/MB/system-board/cpu-slot?Slot=0/cpu-module - -_class:/PLATFORM_CLASS/cpu?ID=1 -REFPROP _fru_parent /frutree/chassis/MB/system-board/cpu-slot?Slot=1/cpu-module - -name:/platform/memory-controller?portid=1 -REFPROP _fru_parent /frutree/chassis/MB/system-board/cpu-slot?Slot=1/cpu-module - -/* - * _fru_parent motherboard - */ -_class:/PLATFORM_CLASS -REFPROP _fru_parent /frutree/chassis/MB/system-board - -/* - * Populate audio slot - */ -name:/frutree/chassis/MB/system-board/audio-slot -REFNODE audio-card fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/audio-card-fru-prom - -name:/frutree/chassis/MB/system-board/audio-slot/audio-card -PROP FRUDataAvailable void r -REFPROP _seeprom_source /platform/pci@1e,600000/isa@7/i2c@0,320/audio-card-fru-prom - -/* - * Populate PCI slots - */ -name:/frutree/chassis/MB/system-board/pci-slot?Label=PCI5 -REFNODE pci-card fru WITH _class:/PLATFORM_CLASS/pci@1f,700000/picl?DeviceID=2 - -name:/frutree/chassis/MB/system-board/pci-slot?Label=PCI4 -REFNODE pci-card fru WITH _class:/PLATFORM_CLASS/pci@1e,600000/picl?DeviceID=2 - -name:/frutree/chassis/MB/system-board/pci-slot?Label=PCI3 -REFNODE pci-card fru WITH _class:/PLATFORM_CLASS/pci@1c,600000/picl?DeviceID=2 - -name:/frutree/chassis/MB/system-board/pci-slot?Label=PCI2 -REFNODE pci-card fru WITH _class:/PLATFORM_CLASS/pci@1d,700000/picl?DeviceID=2 - -name:/frutree/chassis/MB/system-board/pci-slot?Label=PCI1 -REFNODE pci-card fru WITH _class:/PLATFORM_CLASS/pci@1e,600000/picl?DeviceID=3 - -name:/frutree/chassis/MB/system-board/pci-slot?Label=PCI0 -REFNODE pci-card fru WITH _class:/PLATFORM_CLASS/pci@1e,600000/picl?DeviceID=4 - -/* - * _fru_parent PCI devices - */ -_class:/PLATFORM_CLASS/pci?UnitAddress=1f,700000/picl?DeviceID=2 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCI5/pci-card - -_class:/PLATFORM_CLASS/pci?UnitAddress=1e,600000/picl?DeviceID=2 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCI4/pci-card - -_class:/PLATFORM_CLASS/pci?UnitAddress=1c,600000/picl?DeviceID=2 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCI3/pci-card - -_class:/PLATFORM_CLASS/pci?UnitAddress=1d,700000/picl?DeviceID=2 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCI2/pci-card - -_class:/PLATFORM_CLASS/pci?UnitAddress=1e,600000/picl?DeviceID=3 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCI1/pci-card - -_class:/PLATFORM_CLASS/pci?UnitAddress=1e,600000/picl?DeviceID=4 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCI0/pci-card - -/* - * _fru_parent for sensors and fans - */ -name:/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,58/cpu0-fan -REFPROP _fru_parent /frutree/chassis/F1/cpu0-fan - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,58/cpu1-fan -REFPROP _fru_parent /frutree/chassis/F2/cpu1-fan - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c/outtake-fan -REFPROP _fru_parent /frutree/chassis/F3/outtake-fan - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c/intake-fan -REFPROP _fru_parent /frutree/chassis/F0/intake-fan - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,58/cpu0 -REFPROP _fru_parent /frutree/chassis/MB/system-board/cpu-slot?Slot=0/cpu-module - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,58/cpu1 -REFPROP _fru_parent /frutree/chassis/MB/system-board/cpu-slot?Slot=1/cpu-module - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,58/int-amb0 -REFPROP _fru_parent /frutree/chassis/MB/system-board - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c/sys-out -REFPROP _fru_parent /frutree/chassis/MB/system-board - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c/sys-in -REFPROP _fru_parent /frutree/chassis/MB/system-board - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c/int-amb1 -REFPROP _fru_parent /frutree/chassis/MB/system-board - -/* - * Environmental devices associated with motherboard - */ -name:/frutree/chassis/MB/system-board - TABLE Devices - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,58/int-amb0 - ENDROW - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c/int-amb1 - ENDROW - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c/sys-in - ENDROW - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c/sys-out - ENDROW - ENDTABLE - -/* - * Environmental devices of CPU - */ -name:/frutree/chassis/MB/system-board/cpu-slot?Slot=0/cpu-module - TABLE Devices - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,58/cpu0 - ENDROW - ROW - PROP Class string r 0 "cpu" - REFPROP _cpu_ _class:/PLATFORM_CLASS/cpu?ID=0 - ENDROW - ENDTABLE - - -name:/frutree/chassis/MB/system-board/cpu-slot?Slot=1/cpu-module - TABLE Devices - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,58/cpu1 - ENDROW - ROW - PROP Class string r 0 "cpu" - REFPROP _cpu_ _class:/PLATFORM_CLASS/cpu?ID=1 - ENDROW - ENDTABLE - -/* - * Hard disk link between fru and device tree - */ -name:/frutree/chassis/SCSI-BP/HDD0/disk - TABLE Device - ROW - PROP Class string r 0 "block" - REFPROP _block_ name:/platform/pci@1d,700000/scsi@4/sd@0,0 - ENDROW - ENDTABLE -name:/platform/pci@1d,700000/scsi@4/sd@0,0 - REFPROP _fru_parent name:/frutree/chassis/SCSI-BP/HDD0/disk - -name:/platform/pci@1d,700000/scsi@4/sd@0,0/hard-disk0 - REFPROP _fru_parent name:/frutree/chassis/SCSI-BP/HDD0/disk - -name:/frutree/chassis/SCSI-BP/HDD1/disk - TABLE Device - ROW - PROP Class string r 0 "block" - REFPROP _block_ name:/platform/pci@1d,700000/scsi@4/sd@1,0 - ENDROW - ENDTABLE -name:/platform/pci@1d,700000/scsi@4/sd@1,0 - REFPROP _fru_parent name:/frutree/chassis/SCSI-BP/HDD1/disk - -name:/platform/pci@1d,700000/scsi@4/sd@1,0/hard-disk1 - REFPROP _fru_parent name:/frutree/chassis/SCSI-BP/HDD1/disk - -name:/frutree/chassis/RM0/cdrom - TABLE Device - ROW - PROP Class string r 0 "cdrom" - REFPROP _cdrom_ name:/platform/pci@1e,600000/ide@d/sd@2,0 - ENDROW - ENDTABLE -name:/platform/pci@1e,600000/ide@d/sd@2,0 - REFPROP _fru_parent name:/frutree/chassis/RM0/cdrom diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/Makefile b/usr/src/cmd/picl/plugins/sun4u/ents/Makefile deleted file mode 100644 index b988c0592a..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/ents/Makefile +++ /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, 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 -# -# -#ident "%Z%%M% %I% %E% SMI" -# -# Copyright 2002 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# cmd/picl/plugins/sun4u/ents/Makefile -# - -SUBDIRS= devtree frutree frudata frudr envmon .WAIT - -MSGSUBDIRS= frudr - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -.KEEP_STATE: - -all install clean clobber: $(SUBDIRS) - -_msg: $(MSGSUBDIRS) - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/devtree/Makefile b/usr/src/cmd/picl/plugins/sun4u/ents/devtree/Makefile deleted file mode 100644 index fb9be41cdb..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/ents/devtree/Makefile +++ /dev/null @@ -1,62 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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. -# -# cmd/picl/plugins/sun4u/ents/devtree/Makefile -# -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-V250 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONF= picldevtree.conf picl_asr.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: - -install: $(ROOTLIBDIR) $(ROOTCONF) - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/devtree/picl_asr.conf b/usr/src/cmd/picl/plugins/sun4u/ents/devtree/picl_asr.conf deleted file mode 100644 index 1b38c15a1e..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/ents/devtree/picl_asr.conf +++ /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, 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 -# -# -#ident "%Z%%M% %I% %E% SMI" -# -# Copyright 2003 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# cmd/picl/plugins/sun4u/ents/devtree/picl_asr.conf -# -# Platform specific .conf file for picldevtree plug-in -# -dimm0 memory-module-group unused /memory-controller@0,0/memory-module-group I?ID=0 -dimm0 memory-module disabled /memory-controller@0,0/memory-module-group?ID=0/memory-module I?ID=0 -dimm0 memory-module unused /memory-controller@0,0/memory-module-group?ID=0/memory-module I?ID=1 -dimm1 memory-module-group unused /memory-controller@0,0/memory-module-group I?ID=0 -dimm1 memory-module unused /memory-controller@0,0/memory-module-group?ID=0/memory-module I?ID=0 -dimm1 memory-module disabled /memory-controller@0,0/memory-module-group?ID=0/memory-module I?ID=1 -dimm2 memory-module-group unused /memory-controller@0,0/memory-module-group I?ID=1 -dimm2 memory-module disabled /memory-controller@0,0/memory-module-group?ID=1/memory-module I?ID=0 -dimm2 memory-module unused /memory-controller@0,0/memory-module-group?ID=1/memory-module I?ID=1 -dimm3 memory-module-group unused /memory-controller@0,0/memory-module-group I?ID=1 -dimm3 memory-module unused /memory-controller@0,0/memory-module-group?ID=1/memory-module I?ID=0 -dimm3 memory-module disabled /memory-controller@0,0/memory-module-group?ID=1/memory-module I?ID=1 -dimm4 memory-module-group unused /memory-controller@1,0/memory-module-group I?ID=0 -dimm4 memory-module disabled /memory-controller@1,0/memory-module-group?ID=0/memory-module I?ID=0 -dimm4 memory-module unused /memory-controller@1,0/memory-module-group?ID=0/memory-module I?ID=1 -dimm5 memory-module-group unused /memory-controller@1,0/memory-module-group I?ID=0 -dimm5 memory-module unused /memory-controller@1,0/memory-module-group?ID=0/memory-module I?ID=0 -dimm5 memory-module disabled /memory-controller@1,0/memory-module-group?ID=0/memory-module I?ID=1 -dimm6 memory-module-group unused /memory-controller@1,0/memory-module-group I?ID=1 -dimm6 memory-module disabled /memory-controller@1,0/memory-module-group?ID=1/memory-module I?ID=0 -dimm6 memory-module unused /memory-controller@1,0/memory-module-group?ID=1/memory-module I?ID=1 -dimm7 memory-module-group unused /memory-controller@1,0/memory-module-group I?ID=1 -dimm7 memory-module unused /memory-controller@1,0/memory-module-group?ID=1/memory-module I?ID=0 -dimm7 memory-module disabled /memory-controller@1,0/memory-module-group?ID=1/memory-module I?ID=1 -pci0 picl disabled /pci@1e,600000/unknown@4 I?DeviceID=4 -pci1 picl disabled /pci@1e,600000/unknown@3 I?DeviceID=3 -pci2 picl disabled /pci@1d,700000/unknown@2 I?DeviceID=2 -pci3 picl disabled /pci@1c,600000/unknown@2 I?DeviceID=2 -pci4 picl disabled /pci@1e,600000/unknown@2 I?DeviceID=2 -pci5 picl disabled /pci@1f,700000/unknown@2 I?DeviceID=2 -ide ide disabled /pci@1e,600000/ide@d I?DeviceID=d -usb0 usb disabled /pci@1e,600000/usb@a I?DeviceID=a -usb1 usb disabled /pci@1e,600000/usb@b I?DeviceID=b -net network disabled /pci@1c,600000/network@3 I?DeviceID=3 -scsi scsi-2 disabled /pci@1d,700000/scsi@4 I?DeviceID=4 -scsi scsi-2 disabled /pci@1d,700000/scsi@4,1 I?DeviceID=4 -cpu0 cpu disabled /SUNW,UltraSPARC-IIIi@0,0 I?ID=0:I?clock-frequency=0 -cpu1 cpu disabled /SUNW,UltraSPARC-IIIi@1,0 I?ID=1:I?clock-frequency=0 diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/devtree/picldevtree.conf b/usr/src/cmd/picl/plugins/sun4u/ents/devtree/picldevtree.conf deleted file mode 100644 index 4b46e89781..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/ents/devtree/picldevtree.conf +++ /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 -# -# -#ident "%Z%%M% %I% %E% SMI" -# -# Copyright 2002 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# cmd/picl/plugins/sun4u/ents/devtree/picldevtree.conf -# -# Platform specific .conf file for picldevtree plug-in -# -power-supply-fru-prom seeprom -dimm-spd seeprom -motherboard-fru-prom seeprom -scsi-backplane-fru-prom seeprom -alom-fru-prom seeprom diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/envmon/Makefile b/usr/src/cmd/picl/plugins/sun4u/ents/envmon/Makefile deleted file mode 100644 index 7bc7ecad67..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/ents/envmon/Makefile +++ /dev/null @@ -1,75 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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. -# -# cmd/picl/plugins/sun4u/ents/frutree/Makefile -# - -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-V250 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONFS = piclenvmon.conf -ROOTCONF= $(CONFS:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 -MAININFO= $(CONFS:%.conf=%.info) - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: $(CONFS) - -install: $(ROOTLIBDIR) $(ROOTCONF) - -$(CONFS): $(MAININFO) - @$(RM) -f $@ - @echo "# Copyright 2002 Sun Microsystems, Inc. All rights reserved." \ - > $@ - @echo "# Use is subject to license terms." >> $@ - @echo "# This is a generated file. #ident lines identify sources" >> $@ - $(CPP) -P $(@:%.conf=%.info) | \ - $(SED) -e '/^[ ]*$$/d' >> $@ - @$(CHMOD) 444 $@ - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/envmon/piclenvmon.info b/usr/src/cmd/picl/plugins/sun4u/ents/envmon/piclenvmon.info deleted file mode 100644 index 943f7d2f4a..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/ents/envmon/piclenvmon.info +++ /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, 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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon after - * it has established rmclomv nodes in /platform - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#define RMC_COMM /platform/pci@1e,600000/isa@7/rmc-comm@0,3e8 - -/* - * add a node for the rmclomv leaf driver - */ -name:RMC_COMM - NODE SUNW,rmclomv service-processor - ENDNODE - -name:RMC_COMM/SUNW,rmclomv - PROP devfs-path string r 0 "/pseudo/rmclomv@0" diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/frudata/Makefile b/usr/src/cmd/picl/plugins/sun4u/ents/frudata/Makefile deleted file mode 100644 index 6e39e84397..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/ents/frudata/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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# cmd/picl/plugins/sun4u/ents/frudata/Makefile -# - -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-V250 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONF= libpiclfrudata.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: $(CONF) - -install: $(ROOTLIBDIR) $(ROOTCONF) - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/frudata/libpiclfrudata.conf b/usr/src/cmd/picl/plugins/sun4u/ents/frudata/libpiclfrudata.conf deleted file mode 100644 index 09cde5756b..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/ents/frudata/libpiclfrudata.conf +++ /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, 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 2002 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -#ident "%Z%%M% %I% %E% SMI" -# -# This file creates the FRU device paths for the FRUAccess library -# - -VERSION 1.0 - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,a4:power-supply-fru-prom" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,b0:power-supply-fru-prom" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/scsi-backplane-fru-prom -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/scsi-backplane-fru-prom@0,a8:scsi-backplane-fru-prom" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/alom-fru-prom -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/alom-fru-prom@0,a6:alom-fru-prom" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/motherboard-fru-prom -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/motherboard-fru-prom@0,a2:motherboard-fru-prom" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd?UnitAddress=0,b6 -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,b6:dimm-spd" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd?UnitAddress=0,b8 -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,b8:dimm-spd" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd?UnitAddress=0,ba -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,ba:dimm-spd" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd?UnitAddress=0,bc -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,bc:dimm-spd" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd?UnitAddress=0,c6 -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,c6:dimm-spd" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd?UnitAddress=0,c8 -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,c8:dimm-spd" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd?UnitAddress=0,ca -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,ca:dimm-spd" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd?UnitAddress=0,cc -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,cc:dimm-spd" diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/Makefile b/usr/src/cmd/picl/plugins/sun4u/ents/frudr/Makefile deleted file mode 100644 index 7527d09327..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/Makefile +++ /dev/null @@ -1,94 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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. -# -# cmd/picl/plugins/sun4u/ents/frudr/Makefile -# - -include $(SRC)/Makefile.psm - -VERS = .1 - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-V250 -FRUDR_LINKTO_PLATFORM = SUNW,Sun-Fire-V240 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONFS = fru_PS0.conf fru_PS1.conf -CONFS += fru_HDD0.conf fru_HDD1.conf fru_HDD2.conf -CONFS += fru_HDD3.conf fru_HDD4.conf fru_HDD5.conf -CONFS += fru_HDD6.conf fru_HDD7.conf -CONFS += fru_SC.conf -CONFS += fru_usb-a-1.conf fru_usb-a-2.conf -CONFS += fru_usb-b-1.conf fru_usb-b-2.conf -ROOTCONF= $(CONFS:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 -MAININFO= $(CONFS:%.conf=%.info) -OTHERINFOS = fru_PS0_data.info fru_PS1_data.info -OTHERINFOS += fru_HDD0_data.info fru_HDD1_data.info -OTHERINFOS += fru_HDD2_data.info fru_HDD3_data.info -OTHERINFOS += fru_HDD4_data.info fru_HDD5_data.info -OTHERINFOS += fru_HDD6_data.info fru_HDD7_data.info -OTHERINFOS += fru_SC_data.info SB-tables.info -OTHERINFOS += fru_usb-a-1_data.info fru_usb-a-2_data.info -OTHERINFOS += fru_usb-b-1_data.info fru_usb-b-2_data.info - -.KEEP_STATE: - -all: $(CONFS) - -install: all $(ROOTCONF); $(MAKE) $(FRUDR_LINK) - -$(CONFS): $(MAININFO) $(OTHERINFOS) - @$(RM) -f $@ - @echo "# Copyright 2003 Sun Microsystems, Inc. " \ - "All rights reserved." > $@ - @echo "# Use is subject to license terms." >> $@ - @echo "# This is a generated file. #ident lines identify sources" >> $@ - $(CPP) -P $(@:%.conf=%.info) | \ - $(SED) -e '/^[ ]*$$/d' >> $@ - @$(CHMOD) 644 $@ - -_msg: $(MSGDOMAIN) - -$(MSGDOMAIN): - $(INS.dir) - -$(LIBLINKS): FRC - $(RM) $@; $(SYMLINK) $(DYNLIB) $@ - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -FRC: - -FRUDR_LINK=`cd $(ROOT_PLATFORM)/lib/picl/plugins/; \ -rm -f libpiclfrudr.so.1; \ -rm -f libpiclfrudr.so; \ -ln -s ../../../../$(FRUDR_LINKTO_PLATFORM)/lib/picl/plugins/libpiclfrudr.so.1 libpiclfrudr.so.1; \ -ln -s ../../../../$(FRUDR_LINKTO_PLATFORM)/lib/picl/plugins/libpiclfrudr.so libpiclfrudr.so;` diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/SB-tables.info b/usr/src/cmd/picl/plugins/sun4u/ents/frudr/SB-tables.info deleted file mode 100644 index 4f90ab1962..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/SB-tables.info +++ /dev/null @@ -1,299 +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 2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This file creates the system board structure - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -/* - * add a Devices table to RMD0 - */ -name:/frutree/chassis/RMD0/cdrom - TABLE Devices - ROW - PROP Class string r 0 "cdrom" - REFPROP _cdrom_ name:/platform/pci@1e,600000/ide@d/sd@0,0 - ENDROW - ENDTABLE - -name:/frutree/chassis/RMD0/tape - TABLE Devices - ROW - PROP Class string r 0 "tape" - REFPROP _tape_ name:/platform/pci@1d,700000/scsi@4/st@4,0 - ENDROW - ENDTABLE - -/* - * add a Devices table to RMD1 - */ -name:/frutree/chassis/RMD1/cdrom - TABLE Devices - ROW - PROP Class string r 0 "cdrom" - REFPROP _cdrom_ name:/platform/pci@1e,600000/ide@d/sd@2,0 - ENDROW - ENDTABLE - -name:/platform/pci@1e,600000/ide@d/sd@0,0 - REFPROP _fru_parent name:/frutree/chassis/RMD0/cdrom -name:/platform/pci@1d,700000/scsi@4/st@4,0 - REFPROP _fru_parent name:/frutree/chassis/RMD0/tape -name:/platform/pci@1e,600000/ide@d/sd@2,0 - REFPROP _fru_parent name:/frutree/chassis/RMD1/cdrom - -/* - * add a Devices table to the SCCR - */ -name:/frutree/chassis/SCCR/sccr - TABLE Devices - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:RMCLOMV/sccr_t_amb - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/sccr_act - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/sccr_service - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/sccr_locate - ENDROW - ROW - PROP Class string r 0 "keyswitch" - REFPROP _keyswitch_ name:RMCLOMV/keyswitch - ENDROW - ENDTABLE - -/* - * add a Devices table to the SCSI backplane - */ -name:/frutree/chassis/SCSIBP/scsibp - TABLE Devices - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:RMCLOMV/scsibp_t_enc0 - ENDROW - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:RMCLOMV/scsibp_t_enc1 - ENDROW - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:RMCLOMV/scsibp_t_enc2 - ENDROW - ENDTABLE - -/* - * add a Devices table to the system-board - */ -name:/frutree/chassis/MB/system-board - TABLE Devices - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:RMCLOMV/mb_t_enc0 - ENDROW - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:RMCLOMV/mb_t_enc1 - ENDROW - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:RMCLOMV/mb_t_enc2 - ENDROW - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:RMCLOMV/mb_t_enc3 - ENDROW - ENDTABLE - -/* - * add a Devices table to the service-processor - */ -name:/frutree/chassis/MB/system-board/SC/sc - TABLE Devices - ROW - PROP Class string r 0 "service-processor" - REFPROP _service-processor_ name:RMCLOMV - ENDROW - ENDTABLE - -/* - * fru parents for mother-board sensors - */ -name:RMCLOMV/sccr_t_amb - REFPROP _fru_parent name:/frutree/chassis/SCCR/sccr -name:RMCLOMV/mb_t_enc0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_t_enc1 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_t_enc2 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_t_enc3 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/scsibp_t_enc0 - REFPROP _fru_parent name:/frutree/chassis/SCSIBP/scsibp -name:RMCLOMV/scsibp_t_enc1 - REFPROP _fru_parent name:/frutree/chassis/SCSIBP/scsibp -name:RMCLOMV/scsibp_t_enc2 - REFPROP _fru_parent name:/frutree/chassis/SCSIBP/scsibp -name:RMCLOMV/sccr_act - REFPROP _fru_parent name:/frutree/chassis/SCCR/sccr -name:RMCLOMV/sccr_service - REFPROP _fru_parent name:/frutree/chassis/SCCR/sccr -name:RMCLOMV/sccr_locate - REFPROP _fru_parent name:/frutree/chassis/SCCR/sccr - PROP IsLocator string r 0 "true" - PROP LocatorName string r 0 "system" -name:RMCLOMV/keyswitch - REFPROP _fru_parent name:/frutree/chassis/SCCR/sccr - PROP Label string r 0 "SYSCTRL" - -/* - * add Devices tables for cpu-related sensors - */ -name:/frutree/chassis/MB/system-board/CPU0/cpu - TABLE Devices - ROW - PROP Class string r 0 "cpu" - REFPROP _cpu_ name:/platform/SUNW,UltraSPARC-IIIi@0,0 - ENDROW - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:RMCLOMV/mb_cpu0_t_core - ENDROW - ENDTABLE - -name:RMCLOMV/mb_cpu0_t_core - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/CPU0/cpu - -name:/frutree/chassis/MB/system-board/CPU1/cpu - TABLE Devices - ROW - PROP Class string r 0 "cpu" - REFPROP _cpu_ name:/platform/SUNW,UltraSPARC-IIIi@1,0 - ENDROW - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:RMCLOMV/mb_cpu1_t_core - ENDROW - ENDTABLE - -name:RMCLOMV/mb_cpu1_t_core - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/CPU1/cpu - -name:/frutree/chassis/MB/system-board/DIMM0/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@0,0/memory-module-group?ID=0/memory-module?ID=0 - ENDROW - ENDTABLE -name:/frutree/chassis/MB/system-board/DIMM1/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@0,0/memory-module-group?ID=0/memory-module?ID=1 - ENDROW - ENDTABLE -name:/frutree/chassis/MB/system-board/DIMM2/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@0,0/memory-module-group?ID=1/memory-module?ID=0 - ENDROW - ENDTABLE -name:/frutree/chassis/MB/system-board/DIMM3/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@0,0/memory-module-group?ID=1/memory-module?ID=1 - ENDROW - ENDTABLE -name:/frutree/chassis/MB/system-board/DIMM4/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@1,0/memory-module-group?ID=0/memory-module?ID=0 - ENDROW - ENDTABLE -name:/frutree/chassis/MB/system-board/DIMM5/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@1,0/memory-module-group?ID=0/memory-module?ID=1 - ENDROW - ENDTABLE -name:/frutree/chassis/MB/system-board/DIMM6/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@1,0/memory-module-group?ID=1/memory-module?ID=0 - ENDROW - ENDTABLE -name:/frutree/chassis/MB/system-board/DIMM7/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@1,0/memory-module-group?ID=1/memory-module?ID=1 - ENDROW - ENDTABLE - -/* - * add tables and fru parents for cpu fans - */ -name:/frutree/chassis/MB/system-board/CPU0/cpu/F0/fan-unit - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/mb_cpu0_f0_rs - ENDROW - ENDTABLE -name:/frutree/chassis/MB/system-board/CPU1/cpu/F0/fan-unit - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/mb_cpu1_f0_rs - ENDROW - ENDTABLE - -name:RMCLOMV/mb_cpu0_f0_rs - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/CPU0/cpu/F0/fan-unit -name:RMCLOMV/mb_cpu1_f0_rs - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/CPU1/cpu/F0/fan-unit diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD0.info b/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD0.info deleted file mode 100644 index ec15316eed..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD0.info +++ /dev/null @@ -1,74 +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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_HDD0_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD0_data.info b/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD0_data.info deleted file mode 100644 index f7727d766c..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD0_data.info +++ /dev/null @@ -1,82 +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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -name:/frutree/chassis/HDD0/disk -TABLE Devices -ROW -PROP Class string r 0 "block" -REFPROP _block_ name:/platform/pci@1d,700000/scsi@4/sd@0,0 -ENDROW -ENDTABLE - -name:/platform/pci@1d,700000/scsi@4/sd@0,0 - REFPROP _fru_parent name:/frutree/chassis/HDD0/disk -name:/frutree/chassis/HDD0/disk - PROP OperationalStatus string r 0 "present" diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD1.info b/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD1.info deleted file mode 100644 index 16914ded49..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD1.info +++ /dev/null @@ -1,74 +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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_HDD1_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD1_data.info b/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD1_data.info deleted file mode 100644 index 69babcd681..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD1_data.info +++ /dev/null @@ -1,82 +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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -name:/frutree/chassis/HDD1/disk -TABLE Devices -ROW -PROP Class string r 0 "block" -REFPROP _block_ name:/platform/pci@1d,700000/scsi@4/sd@1,0 -ENDROW -ENDTABLE - -name:/platform/pci@1d,700000/scsi@4/sd@1,0 - REFPROP _fru_parent name:/frutree/chassis/HDD1/disk -name:/frutree/chassis/HDD1/disk - PROP OperationalStatus string r 0 "present" diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD2.info b/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD2.info deleted file mode 100644 index a5dd92dd93..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD2.info +++ /dev/null @@ -1,74 +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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_HDD2_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD2_data.info b/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD2_data.info deleted file mode 100644 index 31e45bd761..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD2_data.info +++ /dev/null @@ -1,82 +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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -name:/frutree/chassis/HDD2/disk -TABLE Devices -ROW -PROP Class string r 0 "block" -REFPROP _block_ name:/platform/pci@1d,700000/scsi@4/sd@2,0 -ENDROW -ENDTABLE - -name:/platform/pci@1d,700000/scsi@4/sd@2,0 - REFPROP _fru_parent name:/frutree/chassis/HDD2/disk -name:/frutree/chassis/HDD2/disk - PROP OperationalStatus string r 0 "present" diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD3.info b/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD3.info deleted file mode 100644 index df9e9e0c81..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD3.info +++ /dev/null @@ -1,74 +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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_HDD3_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD3_data.info b/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD3_data.info deleted file mode 100644 index a28eee21c3..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD3_data.info +++ /dev/null @@ -1,82 +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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -name:/frutree/chassis/HDD3/disk -TABLE Devices -ROW -PROP Class string r 0 "block" -REFPROP _block_ name:/platform/pci@1d,700000/scsi@4/sd@3,0 -ENDROW -ENDTABLE - -name:/platform/pci@1d,700000/scsi@4/sd@3,0 - REFPROP _fru_parent name:/frutree/chassis/HDD3/disk -name:/frutree/chassis/HDD3/disk - PROP OperationalStatus string r 0 "present" diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD4.info b/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD4.info deleted file mode 100644 index a3198447d9..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD4.info +++ /dev/null @@ -1,74 +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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_HDD4_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD4_data.info b/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD4_data.info deleted file mode 100644 index 9651ff2f68..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD4_data.info +++ /dev/null @@ -1,82 +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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -name:/frutree/chassis/HDD4/disk -TABLE Devices -ROW -PROP Class string r 0 "block" -REFPROP _block_ name:/platform/pci@1d,700000/scsi@4/sd@8,0 -ENDROW -ENDTABLE - -name:/platform/pci@1d,700000/scsi@4/sd@8,0 - REFPROP _fru_parent name:/frutree/chassis/HDD4/disk -name:/frutree/chassis/HDD4/disk - PROP OperationalStatus string r 0 "present" diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD5.info b/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD5.info deleted file mode 100644 index dad98968c3..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD5.info +++ /dev/null @@ -1,74 +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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_HDD5_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD5_data.info b/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD5_data.info deleted file mode 100644 index 6969784f90..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD5_data.info +++ /dev/null @@ -1,82 +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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -name:/frutree/chassis/HDD5/disk -TABLE Devices -ROW -PROP Class string r 0 "block" -REFPROP _block_ name:/platform/pci@1d,700000/scsi@4/sd@9,0 -ENDROW -ENDTABLE - -name:/platform/pci@1d,700000/scsi@4/sd@9,0 - REFPROP _fru_parent name:/frutree/chassis/HDD5/disk -name:/frutree/chassis/HDD5/disk - PROP OperationalStatus string r 0 "present" diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD6.info b/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD6.info deleted file mode 100644 index 5b5e96bd71..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD6.info +++ /dev/null @@ -1,74 +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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_HDD6_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD6_data.info b/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD6_data.info deleted file mode 100644 index c060d80724..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD6_data.info +++ /dev/null @@ -1,82 +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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -name:/frutree/chassis/HDD6/disk -TABLE Devices -ROW -PROP Class string r 0 "block" -REFPROP _block_ name:/platform/pci@1d,700000/scsi@4/sd@a,0 -ENDROW -ENDTABLE - -name:/platform/pci@1d,700000/scsi@4/sd@a,0 - REFPROP _fru_parent name:/frutree/chassis/HDD6/disk -name:/frutree/chassis/HDD6/disk - PROP OperationalStatus string r 0 "present" diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD7.info b/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD7.info deleted file mode 100644 index e74d9807be..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD7.info +++ /dev/null @@ -1,74 +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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_HDD7_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD7_data.info b/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD7_data.info deleted file mode 100644 index cd1a839604..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_HDD7_data.info +++ /dev/null @@ -1,82 +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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -name:/frutree/chassis/HDD7/disk -TABLE Devices -ROW -PROP Class string r 0 "block" -REFPROP _block_ name:/platform/pci@1d,700000/scsi@4/sd@b,0 -ENDROW -ENDTABLE - -name:/platform/pci@1d,700000/scsi@4/sd@b,0 - REFPROP _fru_parent name:/frutree/chassis/HDD7/disk -name:/frutree/chassis/HDD7/disk - PROP OperationalStatus string r 0 "present" diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_PS0.info b/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_PS0.info deleted file mode 100644 index 75d4c663ac..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_PS0.info +++ /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, 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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -/* create a /platform node for the seeprom */ -name:/platform/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,b0 - PROP binding-name string r 0 "i2c-at24c64" - PROP driver-name string r 0 "seeprom" - PROP devfs-path string r 0 "/pci@1e,600000/isa@7/i2c/power-supply-fru-prom" - PROP compatible string r 0 "i2c-at24c64" - PROP device_type string r 0 "fru-prom" - PROP UnitAddress string r 0 "0,b0" - -/* and then add /frutree node and cross-references */ -#include "fru_PS0_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_PS0_data.info b/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_PS0_data.info deleted file mode 100644 index cb51083d9a..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_PS0_data.info +++ /dev/null @@ -1,156 +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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -#ifndef RMCLOMV -#define RMCLOMV /platform/pci@1e,600000/isa@7/rmc-comm@0,3e8/SUNW,rmclomv -#endif /* RMCLOMV */ - -name:/frutree/chassis/PS0/power-supply - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,b0 -TABLE Devices -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps0_ff_uv -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps0_ff_ov -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps0_p_pwr -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps0_ff_pok -ENDROW -ROW -PROP Class string r 0 "current-indicator" -REFPROP _current-indicator_ name:RMCLOMV/ps0_ff_oc -ENDROW -ROW -PROP Class string r 0 "temperature-indicator" -REFPROP _temperature-indicator_ name:RMCLOMV/ps0_ff_ot -ENDROW -ROW -PROP Class string r 0 "current-indicator" -REFPROP _current-indicator_ name:RMCLOMV/ps0_ff_op -ENDROW -ROW -PROP Class string r 0 "fan" -REFPROP _fan_ name:RMCLOMV/ps0_ff_fan -ENDROW -ROW -PROP Class string r 0 "current-indicator" -REFPROP _current-indicator_ name:RMCLOMV/ps0_ff_nr -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps0_act -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps0_service -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps0_ok2rm -ENDROW -ENDTABLE - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,b0 - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply - PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,b0:power-supply-fru-prom" - -name:RMCLOMV/ps0_ff_uv - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_ff_ov - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_p_pwr - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_ff_pok - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_ff_oc - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_ff_ot - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_ff_op - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_ff_fan - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_ff_nr - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_act - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_service - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_ok2rm - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_PS1.info b/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_PS1.info deleted file mode 100644 index 26f22a2c74..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_PS1.info +++ /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, 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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -/* create a /platform node for the seeprom */ -name:/platform/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,a4 - PROP binding-name string r 0 "i2c-at24c64" - PROP driver-name string r 0 "seeprom" - PROP devfs-path string r 0 "/pci@1e,600000/isa@7/i2c/power-supply-fru-prom" - PROP compatible string r 0 "i2c-at24c64" - PROP device_type string r 0 "fru-prom" - PROP UnitAddress string r 0 "0,a4" - -/* and then add /frutree node and cross-references */ -#include "fru_PS1_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_PS1_data.info b/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_PS1_data.info deleted file mode 100644 index 6f5fa2de46..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_PS1_data.info +++ /dev/null @@ -1,156 +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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS1 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -#ifndef RMCLOMV -#define RMCLOMV /platform/pci@1e,600000/isa@7/rmc-comm@0,3e8/SUNW,rmclomv -#endif /* RMCLOMV */ - -name:/frutree/chassis/PS1/power-supply - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,a4 -TABLE Devices -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps1_ff_uv -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps1_ff_ov -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps1_p_pwr -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps1_ff_pok -ENDROW -ROW -PROP Class string r 0 "current-indicator" -REFPROP _current-indicator_ name:RMCLOMV/ps1_ff_oc -ENDROW -ROW -PROP Class string r 0 "temperature-indicator" -REFPROP _temperature-indicator_ name:RMCLOMV/ps1_ff_ot -ENDROW -ROW -PROP Class string r 0 "current-indicator" -REFPROP _current-indicator_ name:RMCLOMV/ps1_ff_op -ENDROW -ROW -PROP Class string r 0 "fan" -REFPROP _fan_ name:RMCLOMV/ps1_ff_fan -ENDROW -ROW -PROP Class string r 0 "current-indicator" -REFPROP _current-indicator_ name:RMCLOMV/ps1_ff_nr -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps1_act -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps1_service -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps1_ok2rm -ENDROW -ENDTABLE - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,a4 - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply - PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,a4:power-supply-fru-prom" - -name:RMCLOMV/ps1_ff_uv - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply -name:RMCLOMV/ps1_ff_ov - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply -name:RMCLOMV/ps1_p_pwr - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply -name:RMCLOMV/ps1_ff_pok - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply -name:RMCLOMV/ps1_ff_oc - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply -name:RMCLOMV/ps1_ff_ot - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply -name:RMCLOMV/ps1_ff_op - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply -name:RMCLOMV/ps1_ff_nr - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply -name:RMCLOMV/ps1_ff_fan - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply -name:RMCLOMV/ps1_act - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply -name:RMCLOMV/ps1_service - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply -name:RMCLOMV/ps1_ok2rm - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_SC.info b/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_SC.info deleted file mode 100644 index 0e61c30bf6..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_SC.info +++ /dev/null @@ -1,75 +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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_SC_data.info" -#include "SB-tables.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_SC_data.info b/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_SC_data.info deleted file mode 100644 index 16276254d1..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_SC_data.info +++ /dev/null @@ -1,323 +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 2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -/* - * There are a lot of nodes below the rmclomv node, define a shortname - */ -#define RMCLOMV /platform/pci@1e,600000/isa@7/rmc-comm@0,3e8/SUNW,rmclomv - -/* - * add disk leds - */ -name:/frutree/chassis/HDD0 - TABLE Devices - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd0_act - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd0_service - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd0_ok2rm - ENDROW - ENDTABLE - -name:RMCLOMV/hdd0_act - REFPROP _location_parent name:/frutree/chassis/HDD0 -name:RMCLOMV/hdd0_service - REFPROP _location_parent name:/frutree/chassis/HDD0 -name:RMCLOMV/hdd0_ok2rm - REFPROP _location_parent name:/frutree/chassis/HDD0 - -name:/frutree/chassis/HDD1 - TABLE Devices - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd1_act - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd1_service - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd1_ok2rm - ENDROW - ENDTABLE - -name:RMCLOMV/hdd1_act - REFPROP _location_parent name:/frutree/chassis/HDD1 -name:RMCLOMV/hdd1_service - REFPROP _location_parent name:/frutree/chassis/HDD1 -name:RMCLOMV/hdd1_ok2rm - REFPROP _location_parent name:/frutree/chassis/HDD1 - -name:/frutree/chassis/HDD2 - TABLE Devices - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd2_act - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd2_service - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd2_ok2rm - ENDROW - ENDTABLE - -name:RMCLOMV/hdd2_act - REFPROP _location_parent name:/frutree/chassis/HDD2 -name:RMCLOMV/hdd2_service - REFPROP _location_parent name:/frutree/chassis/HDD2 -name:RMCLOMV/hdd2_ok2rm - REFPROP _location_parent name:/frutree/chassis/HDD2 - -name:/frutree/chassis/HDD3 - TABLE Devices - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd3_act - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd3_service - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd3_ok2rm - ENDROW - ENDTABLE - -name:RMCLOMV/hdd3_act - REFPROP _location_parent name:/frutree/chassis/HDD3 -name:RMCLOMV/hdd3_service - REFPROP _location_parent name:/frutree/chassis/HDD3 -name:RMCLOMV/hdd3_ok2rm - REFPROP _location_parent name:/frutree/chassis/HDD3 - -name:/frutree/chassis/HDD4 - TABLE Devices - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd4_act - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd4_service - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd4_ok2rm - ENDROW - ENDTABLE - -name:RMCLOMV/hdd4_act - REFPROP _location_parent name:/frutree/chassis/HDD4 -name:RMCLOMV/hdd4_service - REFPROP _location_parent name:/frutree/chassis/HDD4 -name:RMCLOMV/hdd4_ok2rm - REFPROP _location_parent name:/frutree/chassis/HDD4 - -name:/frutree/chassis/HDD5 - TABLE Devices - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd5_act - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd5_service - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd5_ok2rm - ENDROW - ENDTABLE - -name:RMCLOMV/hdd5_act - REFPROP _location_parent name:/frutree/chassis/HDD5 -name:RMCLOMV/hdd5_service - REFPROP _location_parent name:/frutree/chassis/HDD5 -name:RMCLOMV/hdd5_ok2rm - REFPROP _location_parent name:/frutree/chassis/HDD5 - -name:/frutree/chassis/HDD6 - TABLE Devices - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd6_act - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd6_service - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd6_ok2rm - ENDROW - ENDTABLE - -name:RMCLOMV/hdd6_act - REFPROP _location_parent name:/frutree/chassis/HDD6 -name:RMCLOMV/hdd6_service - REFPROP _location_parent name:/frutree/chassis/HDD6 -name:RMCLOMV/hdd6_ok2rm - REFPROP _location_parent name:/frutree/chassis/HDD6 - -name:/frutree/chassis/HDD7 - TABLE Devices - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd7_act - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd7_service - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd7_ok2rm - ENDROW - ENDTABLE - -name:RMCLOMV/hdd7_act - REFPROP _location_parent name:/frutree/chassis/HDD7 -name:RMCLOMV/hdd7_service - REFPROP _location_parent name:/frutree/chassis/HDD7 -name:RMCLOMV/hdd7_ok2rm - REFPROP _location_parent name:/frutree/chassis/HDD7 - -/* add disk Device tables and _fru_parent refprops */ -#include "fru_HDD0_data.info" -#include "fru_HDD1_data.info" -#include "fru_HDD2_data.info" -#include "fru_HDD3_data.info" -#include "fru_HDD4_data.info" -#include "fru_HDD5_data.info" -#include "fru_HDD6_data.info" -#include "fru_HDD7_data.info" - -/* - * power supplies - */ -#include "fru_PS0_data.info" -#include "fru_PS1_data.info" - -/* - * USB ports - */ -#include "fru_usb-a-1_data.info" -#include "fru_usb-a-2_data.info" -#include "fru_usb-b-1_data.info" -#include "fru_usb-b-2_data.info" - -/* - * add tables and fru parents for system fans - */ -name:/frutree/chassis/FT0/fan-tray/F0/fan-unit - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/ft0_f0_rs - ENDROW - ENDTABLE -name:/frutree/chassis/FT0/fan-tray/F1/fan-unit - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/ft0_f1_rs - ENDROW - ENDTABLE -name:/frutree/chassis/FT1/fan-tray/F0/fan-unit - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/ft1_f0_rs - ENDROW - ENDTABLE -name:/frutree/chassis/FT2/fan-tray/F0/fan-unit - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/ft2_f0_rs - ENDROW - ENDTABLE - -name:RMCLOMV/ft0_f0_rs - REFPROP _fru_parent name:/frutree/chassis/FT0/fan-tray/F0/fan-unit -name:RMCLOMV/ft0_f1_rs - REFPROP _fru_parent name:/frutree/chassis/FT0/fan-tray/F1/fan-unit -name:RMCLOMV/ft1_f0_rs - REFPROP _fru_parent name:/frutree/chassis/FT1/fan-tray/F0/fan-unit -name:RMCLOMV/ft2_f0_rs - REFPROP _fru_parent name:/frutree/chassis/FT2/fan-tray/F0/fan-unit diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_usb-a-1.info b/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_usb-a-1.info deleted file mode 100644 index 327f830ae4..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_usb-a-1.info +++ /dev/null @@ -1,74 +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 2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICLEVENT_SYSEVENT_DEVICE_ADDED event for USB1 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_usb-a-1_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_usb-a-1_data.info b/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_usb-a-1_data.info deleted file mode 100644 index 1a95b4a800..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_usb-a-1_data.info +++ /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, 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 2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICLEVENT_SYSEVENT_DEVICE_ADDED event for USB1 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -_class:/jbus/pci@1e,600000/usb@a/picl?bus-addr=1 - REFPROP _location_parent name:/frutree/chassis/USB1 diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_usb-a-2.info b/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_usb-a-2.info deleted file mode 100644 index 37794534fc..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_usb-a-2.info +++ /dev/null @@ -1,74 +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 2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICLEVENT_SYSEVENT_DEVICE_ADDED event for USB0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_usb-a-2_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_usb-a-2_data.info b/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_usb-a-2_data.info deleted file mode 100644 index 1a4a9b2cc1..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_usb-a-2_data.info +++ /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, 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 2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICLEVENT_SYSEVENT_DEVICE_ADDED event for USB0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -_class:/jbus/pci@1e,600000/usb@a/picl?bus-addr=2 - REFPROP _location_parent name:/frutree/chassis/USB0 diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_usb-b-1.info b/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_usb-b-1.info deleted file mode 100644 index 407b63a41f..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_usb-b-1.info +++ /dev/null @@ -1,74 +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 2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICLEVENT_SYSEVENT_DEVICE_ADDED event for USB3 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_usb-b-1_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_usb-b-1_data.info b/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_usb-b-1_data.info deleted file mode 100644 index 70411bb2fd..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_usb-b-1_data.info +++ /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, 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 2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICLEVENT_SYSEVENT_DEVICE_ADDED event for USB3 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -_class:/jbus/pci@1e,600000/usb@b/picl?bus-addr=1 - REFPROP _location_parent name:/frutree/chassis/USB3 diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_usb-b-2.info b/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_usb-b-2.info deleted file mode 100644 index 5495e803c6..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_usb-b-2.info +++ /dev/null @@ -1,74 +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 2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICLEVENT_SYSEVENT_DEVICE_ADDED event for USB2 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_usb-b-2_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_usb-b-2_data.info b/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_usb-b-2_data.info deleted file mode 100644 index e2fe1cb5b1..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/ents/frudr/fru_usb-b-2_data.info +++ /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, 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 2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICLEVENT_SYSEVENT_DEVICE_ADDED event for USB2 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -_class:/jbus/pci@1e,600000/usb@b/picl?bus-addr=2 - REFPROP _location_parent name:/frutree/chassis/USB2 diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/frutree/Makefile b/usr/src/cmd/picl/plugins/sun4u/ents/frutree/Makefile deleted file mode 100644 index 1a123a1786..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/ents/frutree/Makefile +++ /dev/null @@ -1,94 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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. -# -# cmd/picl/plugins/sun4u/ents/frutree/Makefile -# - -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-V250 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -INCDIR1 = . -INCDIR2 = ../frudr -INCS = -I$(INCDIR1) -I$(INCDIR2) -CONFS = piclfrutree.conf -ROOTCONF = $(CONFS:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 -MAININFO = $(CONFS:%.conf=%.info) -OTHERINFOS = $(INCDIR1)/system-board.info -OTHERINFOS += $(INCDIR2)/fru_HDD0_data.info -OTHERINFOS += $(INCDIR2)/fru_HDD1_data.info -OTHERINFOS += $(INCDIR2)/fru_HDD2_data.info -OTHERINFOS += $(INCDIR2)/fru_HDD3_data.info -OTHERINFOS += $(INCDIR2)/fru_HDD4_data.info -OTHERINFOS += $(INCDIR2)/fru_HDD5_data.info -OTHERINFOS += $(INCDIR2)/fru_HDD6_data.info -OTHERINFOS += $(INCDIR2)/fru_HDD7_data.info -OTHERINFOS += $(INCDIR2)/fru_PS0_data.info -OTHERINFOS += $(INCDIR2)/fru_PS1_data.info -OTHERINFOS += $(INCDIR2)/fru_SC_data.info -OTHERINFOS += $(INCDIR2)/fru_usb-a-1_data.info -OTHERINFOS += $(INCDIR2)/fru_usb-a-2_data.info -OTHERINFOS += $(INCDIR2)/fru_usb-b-1_data.info -OTHERINFOS += $(INCDIR2)/fru_usb-b-2_data.info - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: $(CONFS) - -install: $(ROOTLIBDIR) $(ROOTCONF) - -$(CONFS): $(MAININFO) $(OTHERINFOS) - @$(RM) -f $@ - @echo "# Copyright 2003 Sun Microsystems, Inc. " \ - "All rights reserved." > $@ - @echo "# Use is subject to license terms." >> $@ - @echo "# This is a generated file. #ident lines identify sources" >> $@ - $(CPP) -P $(INCS) $(@:%.conf=%.info) | \ - $(SED) -e '/^[ ]*$$/d' >> $@ - @$(CHMOD) 444 $@ - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/frutree/piclfrutree.info b/usr/src/cmd/picl/plugins/sun4u/ents/frutree/piclfrutree.info deleted file mode 100644 index e605af6f2e..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/ents/frutree/piclfrutree.info +++ /dev/null @@ -1,397 +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 2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -/* - * There are a lot of nodes below the rmclomv node, define a shortname - */ -#define RMCLOMV /platform/pci@1e,600000/isa@7/rmc-comm@0,3e8/SUNW,rmclomv - -VERSION 1.1 -VERBOSE 1 -NODE frutree picl - NODE chassis fru - NODE MB location - PROP SlotType string r 0 "system-board" - PROP Label string r 0 "MB" - ENDNODE - NODE FT0 location - PROP SlotType string r 0 "fan-tray" - PROP Label string r 0 "FT0" - NODE fan-tray fru - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - ENDNODE - NODE F1 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F1" - ENDNODE - ENDNODE - ENDNODE - NODE FT1 location - PROP SlotType string r 0 "fan-tray" - PROP Label string r 0 "FT1" - NODE fan-tray fru - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - ENDNODE - ENDNODE - ENDNODE - NODE FT2 location - PROP SlotType string r 0 "fan-tray" - PROP Label string r 0 "FT2" - NODE fan-tray fru - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - ENDNODE - ENDNODE - ENDNODE - NODE PS0 location - PROP SlotType string r 0 "power-supply" - PROP Label string r 0 "PS0" - ENDNODE - NODE PS1 location - PROP SlotType string r 0 "power-supply" - PROP Label string r 0 "PS1" - ENDNODE - NODE HDD0 location - PROP SlotType string r 0 "disk-slot" - PROP Label string r 0 "HDD0" - ENDNODE - NODE HDD1 location - PROP SlotType string r 0 "disk-slot" - PROP Label string r 0 "HDD1" - ENDNODE - NODE HDD2 location - PROP SlotType string r 0 "disk-slot" - PROP Label string r 0 "HDD2" - ENDNODE - NODE HDD3 location - PROP SlotType string r 0 "disk-slot" - PROP Label string r 0 "HDD3" - ENDNODE - NODE HDD4 location - PROP SlotType string r 0 "disk-slot" - PROP Label string r 0 "HDD4" - ENDNODE - NODE HDD5 location - PROP SlotType string r 0 "disk-slot" - PROP Label string r 0 "HDD5" - ENDNODE - NODE HDD6 location - PROP SlotType string r 0 "disk-slot" - PROP Label string r 0 "HDD6" - ENDNODE - NODE HDD7 location - PROP SlotType string r 0 "disk-slot" - PROP Label string r 0 "HDD7" - ENDNODE - NODE RMD0 location - PROP Label string r 0 "RMD0" - ENDNODE - NODE RMD1 location - PROP SlotType string r 0 "cdrom-slot" - PROP Label string r 0 "RMD1" - ENDNODE - NODE PCI0 location - PROP SlotType string r 0 "pci" - PROP Label string r 0 "PCI0" - ENDNODE - NODE PCI1 location - PROP SlotType string r 0 "pci" - PROP Label string r 0 "PCI1" - ENDNODE - NODE PCI2 location - PROP SlotType string r 0 "pci" - PROP Label string r 0 "PCI2" - ENDNODE - NODE PCI3 location - PROP SlotType string r 0 "pci" - PROP Label string r 0 "PCI3" - ENDNODE - NODE PCI4 location - PROP SlotType string r 0 "pci" - PROP Label string r 0 "PCI4" - ENDNODE - NODE PCI5 location - PROP SlotType string r 0 "pci" - PROP Label string r 0 "PCI5" - ENDNODE - NODE SCCR location - PROP Label string r 0 "SCCR" - NODE sccr fru - ENDNODE - ENDNODE - NODE SCC location - PROP Label string r 0 "SCC" - NODE scc fru - ENDNODE - ENDNODE - NODE SCSIBP location - PROP Label string r 0 "SCSIBP" - NODE scsibp fru - ENDNODE - ENDNODE - NODE USB0 location - PROP Label string r 0 "USB0" - ENDNODE - NODE USB1 location - PROP Label string r 0 "USB1" - ENDNODE - NODE USB2 location - PROP Label string r 0 "USB2" - ENDNODE - NODE USB3 location - PROP Label string r 0 "USB3" - ENDNODE - ENDNODE -ENDNODE - -/* - * add power-supply nodes if their fru-proms are visible - */ -name:/frutree/chassis/PS0 - REFNODE power-supply fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,b0 -name:/frutree/chassis/PS1 - REFNODE power-supply fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,a4 - -/* add disk fru nodes for disks which are present */ -name:/frutree/chassis/HDD0 - REFNODE disk fru WITH name:/platform/pci@1d,700000/scsi@4/sd@0,0 -name:/frutree/chassis/HDD1 - REFNODE disk fru WITH name:/platform/pci@1d,700000/scsi@4/sd@1,0 -name:/frutree/chassis/HDD2 - REFNODE disk fru WITH name:/platform/pci@1d,700000/scsi@4/sd@2,0 -name:/frutree/chassis/HDD3 - REFNODE disk fru WITH name:/platform/pci@1d,700000/scsi@4/sd@3,0 -name:/frutree/chassis/HDD4 - REFNODE disk fru WITH name:/platform/pci@1d,700000/scsi@4/sd@8,0 -name:/frutree/chassis/HDD5 - REFNODE disk fru WITH name:/platform/pci@1d,700000/scsi@4/sd@9,0 -name:/frutree/chassis/HDD6 - REFNODE disk fru WITH name:/platform/pci@1d,700000/scsi@4/sd@a,0 -name:/frutree/chassis/HDD7 - REFNODE disk fru WITH name:/platform/pci@1d,700000/scsi@4/sd@b,0 - -/* add dvd/cdrom fru nodes for disks which are present */ -name:/frutree/chassis/RMD0 - REFNODE cdrom fru WITH name:/platform/pci@1e,600000/ide@d/sd@0,0 -name:/frutree/chassis/RMD0 - REFNODE tape fru WITH name:/platform/pci@1d,700000/scsi@4/st@4,0 -name:/frutree/chassis/RMD1 - REFNODE cdrom fru WITH name:/platform/pci@1e,600000/ide@d/sd@2,0 - -/* populate fan locations with fans which are present */ -name:/frutree/chassis/FT0/fan-tray/F0 - REFNODE fan-unit fru WITH name:RMCLOMV/ft0_f0_rs -name:/frutree/chassis/FT0/fan-tray/F1 - REFNODE fan-unit fru WITH name:RMCLOMV/ft0_f1_rs -name:/frutree/chassis/FT1/fan-tray/F0 - REFNODE fan-unit fru WITH name:RMCLOMV/ft1_f0_rs -name:/frutree/chassis/FT2/fan-tray/F0 - REFNODE fan-unit fru WITH name:RMCLOMV/ft2_f0_rs - -/* Power distribution board */ -name:/frutree/chassis/PDB - PROP Label string r 0 "PDB" - NODE pdb fru - ENDNODE - -/* SCSI backplane */ -name:/frutree/chassis/SCSIBP/scsibp - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/scsi-backplane-fru-prom@0,a8 -name:/platform/pci@1e,600000/isa@7/i2c@0,320/scsi-backplane-fru-prom@0,a8 - REFPROP _fru_parent /frutree/chassis/SCSIBP/scsibp - -name:/frutree/chassis/PCI0 - REFNODE pci-card fru WITH _class:/jbus/pci@1e,600000/picl?DeviceID=4 -name:/frutree/chassis/PCI1 - REFNODE pci-card fru WITH _class:/jbus/pci@1e,600000/picl?DeviceID=3 -name:/frutree/chassis/PCI2 - REFNODE pci-card fru WITH _class:/jbus/pci@1d,700000/picl?DeviceID=2 -name:/frutree/chassis/PCI3 - REFNODE pci-card fru WITH _class:/jbus/pci@1c,600000/picl?DeviceID=2 -name:/frutree/chassis/PCI4 - REFNODE pci-card fru WITH _class:/jbus/pci@1e,600000/picl?DeviceID=2 -name:/frutree/chassis/PCI5 - REFNODE pci-card fru WITH _class:/jbus/pci@1f,700000/picl?DeviceID=2 - -#include -#include "system-board.info" -#include - -_class:/jbus/pci@1e,600000/picl@4 - REFPROP _fru_parent name:/frutree/chassis/PCI0/pci-card -_class:/jbus/pci@1e,600000/picl@4,0 - REFPROP _fru_parent name:/frutree/chassis/PCI0/pci-card -_class:/jbus/pci@1e,600000/picl@4,1 - REFPROP _fru_parent name:/frutree/chassis/PCI0/pci-card -_class:/jbus/pci@1e,600000/picl@4,2 - REFPROP _fru_parent name:/frutree/chassis/PCI0/pci-card -_class:/jbus/pci@1e,600000/picl@4,3 - REFPROP _fru_parent name:/frutree/chassis/PCI0/pci-card -_class:/jbus/pci@1e,600000/picl@4,4 - REFPROP _fru_parent name:/frutree/chassis/PCI0/pci-card -_class:/jbus/pci@1e,600000/picl@4,5 - REFPROP _fru_parent name:/frutree/chassis/PCI0/pci-card -_class:/jbus/pci@1e,600000/picl@4,6 - REFPROP _fru_parent name:/frutree/chassis/PCI0/pci-card -_class:/jbus/pci@1e,600000/picl@4,7 - REFPROP _fru_parent name:/frutree/chassis/PCI0/pci-card -_class:/jbus/pci@1e,600000/picl@3 - REFPROP _fru_parent name:/frutree/chassis/PCI1/pci-card -_class:/jbus/pci@1e,600000/picl@3,0 - REFPROP _fru_parent name:/frutree/chassis/PCI1/pci-card -_class:/jbus/pci@1e,600000/picl@3,1 - REFPROP _fru_parent name:/frutree/chassis/PCI1/pci-card -_class:/jbus/pci@1e,600000/picl@3,2 - REFPROP _fru_parent name:/frutree/chassis/PCI1/pci-card -_class:/jbus/pci@1e,600000/picl@3,3 - REFPROP _fru_parent name:/frutree/chassis/PCI1/pci-card -_class:/jbus/pci@1e,600000/picl@3,4 - REFPROP _fru_parent name:/frutree/chassis/PCI1/pci-card -_class:/jbus/pci@1e,600000/picl@3,5 - REFPROP _fru_parent name:/frutree/chassis/PCI1/pci-card -_class:/jbus/pci@1e,600000/picl@3,6 - REFPROP _fru_parent name:/frutree/chassis/PCI1/pci-card -_class:/jbus/pci@1e,600000/picl@3,7 - REFPROP _fru_parent name:/frutree/chassis/PCI1/pci-card -_class:/jbus/pci@1d,700000/picl@2 - REFPROP _fru_parent name:/frutree/chassis/PCI2/pci-card -_class:/jbus/pci@1d,700000/picl@2,0 - REFPROP _fru_parent name:/frutree/chassis/PCI2/pci-card -_class:/jbus/pci@1d,700000/picl@2,1 - REFPROP _fru_parent name:/frutree/chassis/PCI2/pci-card -_class:/jbus/pci@1d,700000/picl@2,2 - REFPROP _fru_parent name:/frutree/chassis/PCI2/pci-card -_class:/jbus/pci@1d,700000/picl@2,3 - REFPROP _fru_parent name:/frutree/chassis/PCI2/pci-card -_class:/jbus/pci@1d,700000/picl@2,4 - REFPROP _fru_parent name:/frutree/chassis/PCI2/pci-card -_class:/jbus/pci@1d,700000/picl@2,5 - REFPROP _fru_parent name:/frutree/chassis/PCI2/pci-card -_class:/jbus/pci@1d,700000/picl@2,6 - REFPROP _fru_parent name:/frutree/chassis/PCI2/pci-card -_class:/jbus/pci@1d,700000/picl@2,7 - REFPROP _fru_parent name:/frutree/chassis/PCI2/pci-card -_class:/jbus/pci@1c,600000/picl@2 - REFPROP _fru_parent name:/frutree/chassis/PCI3/pci-card -_class:/jbus/pci@1c,600000/picl@2,0 - REFPROP _fru_parent name:/frutree/chassis/PCI3/pci-card -_class:/jbus/pci@1c,600000/picl@2,1 - REFPROP _fru_parent name:/frutree/chassis/PCI3/pci-card -_class:/jbus/pci@1c,600000/picl@2,2 - REFPROP _fru_parent name:/frutree/chassis/PCI3/pci-card -_class:/jbus/pci@1c,600000/picl@2,3 - REFPROP _fru_parent name:/frutree/chassis/PCI3/pci-card -_class:/jbus/pci@1c,600000/picl@2,4 - REFPROP _fru_parent name:/frutree/chassis/PCI3/pci-card -_class:/jbus/pci@1c,600000/picl@2,5 - REFPROP _fru_parent name:/frutree/chassis/PCI3/pci-card -_class:/jbus/pci@1c,600000/picl@2,6 - REFPROP _fru_parent name:/frutree/chassis/PCI3/pci-card -_class:/jbus/pci@1c,600000/picl@2,7 - REFPROP _fru_parent name:/frutree/chassis/PCI3/pci-card -_class:/jbus/pci@1e,600000/picl@2 - REFPROP _fru_parent name:/frutree/chassis/PCI4/pci-card -_class:/jbus/pci@1e,600000/picl@2,0 - REFPROP _fru_parent name:/frutree/chassis/PCI4/pci-card -_class:/jbus/pci@1e,600000/picl@2,1 - REFPROP _fru_parent name:/frutree/chassis/PCI4/pci-card -_class:/jbus/pci@1e,600000/picl@2,2 - REFPROP _fru_parent name:/frutree/chassis/PCI4/pci-card -_class:/jbus/pci@1e,600000/picl@2,3 - REFPROP _fru_parent name:/frutree/chassis/PCI4/pci-card -_class:/jbus/pci@1e,600000/picl@2,4 - REFPROP _fru_parent name:/frutree/chassis/PCI4/pci-card -_class:/jbus/pci@1e,600000/picl@2,5 - REFPROP _fru_parent name:/frutree/chassis/PCI4/pci-card -_class:/jbus/pci@1e,600000/picl@2,6 - REFPROP _fru_parent name:/frutree/chassis/PCI4/pci-card -_class:/jbus/pci@1e,600000/picl@2,7 - REFPROP _fru_parent name:/frutree/chassis/PCI4/pci-card -_class:/jbus/pci@1f,700000/picl@2 - REFPROP _fru_parent name:/frutree/chassis/PCI5/pci-card -_class:/jbus/pci@1f,700000/picl@2,0 - REFPROP _fru_parent name:/frutree/chassis/PCI5/pci-card -_class:/jbus/pci@1f,700000/picl@2,1 - REFPROP _fru_parent name:/frutree/chassis/PCI5/pci-card -_class:/jbus/pci@1f,700000/picl@2,2 - REFPROP _fru_parent name:/frutree/chassis/PCI5/pci-card -_class:/jbus/pci@1f,700000/picl@2,3 - REFPROP _fru_parent name:/frutree/chassis/PCI5/pci-card -_class:/jbus/pci@1f,700000/picl@2,4 - REFPROP _fru_parent name:/frutree/chassis/PCI5/pci-card -_class:/jbus/pci@1f,700000/picl@2,5 - REFPROP _fru_parent name:/frutree/chassis/PCI5/pci-card -_class:/jbus/pci@1f,700000/picl@2,6 - REFPROP _fru_parent name:/frutree/chassis/PCI5/pci-card -_class:/jbus/pci@1f,700000/picl@2,7 - REFPROP _fru_parent name:/frutree/chassis/PCI5/pci-card diff --git a/usr/src/cmd/picl/plugins/sun4u/ents/frutree/system-board.info b/usr/src/cmd/picl/plugins/sun4u/ents/frutree/system-board.info deleted file mode 100644 index 124e3c6549..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/ents/frutree/system-board.info +++ /dev/null @@ -1,253 +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 2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This file creates the system board structure - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -/* - * Motherboard properties - */ -name:/frutree/chassis/MB - NODE system-board fru - NODE SC location - PROP Label string r 0 "SC" - ENDNODE - ENDNODE - -/* - * motherboard seeprom source - */ -name:/frutree/chassis/MB/system-board - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/motherboard-fru-prom@0,a2 - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/motherboard-fru-prom@0,a2 - REFPROP _fru_parent /frutree/chassis/MB/system-board - -/* - * ALOM (sc) node and fru-prom - */ -name:/frutree/chassis/MB/system-board/SC - REFNODE sc fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/alom-fru-prom@0,a6 -name:/frutree/chassis/MB/system-board/SC/sc - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/alom-fru-prom@0,a6 -name:/platform/pci@1e,600000/isa@7/i2c@0,320/alom-fru-prom@0,a6 - REFPROP _fru_parent /frutree/chassis/MB/system-board/SC/sc - -/* - * Processors - */ -name:/frutree/chassis/MB/system-board -NODE CPU0 location - PROP SlotType string r 0 "cpu" - PROP Label string r 0 "CPU0" -ENDNODE -NODE CPU1 location - PROP SlotType string r 0 "cpu" - PROP Label string r 0 "CPU1" -ENDNODE - -/* - * Processor 0 - */ -name:/frutree/chassis/MB/system-board/CPU0 - REFNODE cpu fru WITH name:/platform/SUNW,UltraSPARC-IIIi@0,0 -name:/frutree/chassis/MB/system-board/CPU0/cpu - REFNODE F0 location WITH name:/frutree/chassis/MB/system-board/CPU0/cpu -name:/frutree/chassis/MB/system-board/CPU0/cpu/F0 - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - REFNODE fan-unit fru WITH name:RMCLOMV/mb_cpu0_f0_rs -name:/frutree/chassis/MB/system-board - REFNODE DIMM0 location WITH name:/frutree/chassis/MB/system-board/ - REFNODE DIMM1 location WITH name:/frutree/chassis/MB/system-board/ - REFNODE DIMM2 location WITH name:/frutree/chassis/MB/system-board/ - REFNODE DIMM3 location WITH name:/frutree/chassis/MB/system-board/ - -/* - * Processor 1 - */ -name:/frutree/chassis/MB/system-board/CPU1 - REFNODE cpu fru WITH name:/platform/SUNW,UltraSPARC-IIIi@1,0 -name:/frutree/chassis/MB/system-board/CPU1/cpu - REFNODE F0 location WITH name:/frutree/chassis/MB/system-board/CPU1/cpu -name:/frutree/chassis/MB/system-board/CPU1/cpu/F0 - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - REFNODE fan-unit fru WITH name:RMCLOMV/mb_cpu1_f0_rs -name:/frutree/chassis/MB/system-board - REFNODE DIMM4 location WITH name:/frutree/chassis/MB/system-board - REFNODE DIMM5 location WITH name:/frutree/chassis/MB/system-board - REFNODE DIMM6 location WITH name:/frutree/chassis/MB/system-board - REFNODE DIMM7 location WITH name:/frutree/chassis/MB/system-board - -/* - * Processor 0 memory - */ -name:/frutree/chassis/MB/system-board/DIMM0 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "DIMM0" -name:/frutree/chassis/MB/system-board/DIMM1 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "DIMM1" -name:/frutree/chassis/MB/system-board/DIMM2 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "DIMM2" -name:/frutree/chassis/MB/system-board/DIMM3 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "DIMM3" - -/* - * Processor 1 memory - */ -name:/frutree/chassis/MB/system-board/DIMM4 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "DIMM4" -name:/frutree/chassis/MB/system-board/DIMM5 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "DIMM5" -name:/frutree/chassis/MB/system-board/DIMM6 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "DIMM6" -name:/frutree/chassis/MB/system-board/DIMM7 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "DIMM7" - -/* - * Dimm nodes - */ -name:/frutree/chassis/MB/system-board/DIMM0 - REFNODE mem-module fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,b6 -name:/frutree/chassis/MB/system-board/DIMM1 - REFNODE mem-module fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,b8 -name:/frutree/chassis/MB/system-board/DIMM2 - REFNODE mem-module fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,ba -name:/frutree/chassis/MB/system-board/DIMM3 - REFNODE mem-module fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,bc -name:/frutree/chassis/MB/system-board/DIMM4 - REFNODE mem-module fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,c6 -name:/frutree/chassis/MB/system-board/DIMM5 - REFNODE mem-module fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,c8 -name:/frutree/chassis/MB/system-board/DIMM6 - REFNODE mem-module fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,ca -name:/frutree/chassis/MB/system-board/DIMM7 - REFNODE mem-module fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,cc - -/* - * DIMM seeprom sources - */ -name:/frutree/chassis/MB/system-board/DIMM0/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,b6 -name:/frutree/chassis/MB/system-board/DIMM1/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,b8 -name:/frutree/chassis/MB/system-board/DIMM2/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,ba -name:/frutree/chassis/MB/system-board/DIMM3/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,bc -name:/frutree/chassis/MB/system-board/DIMM4/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,c6 -name:/frutree/chassis/MB/system-board/DIMM5/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,c8 -name:/frutree/chassis/MB/system-board/DIMM6/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,ca -name:/frutree/chassis/MB/system-board/DIMM7/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,cc - -/* - * DIMM FRU parents - */ -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,b6 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/DIMM0/mem-module -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,b8 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/DIMM1/mem-module -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,ba - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/DIMM2/mem-module -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,bc - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/DIMM3/mem-module -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,c6 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/DIMM4/mem-module -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,c8 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/DIMM5/mem-module -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,ca - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/DIMM6/mem-module -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,cc - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/DIMM7/mem-module - -name:/platform/SUNW,UltraSPARC-IIIi@0,0 - REFPROP _fru_parent /frutree/chassis/MB/system-board/CPU0/cpu - -name:/platform/SUNW,UltraSPARC-IIIi@1,0 - REFPROP _fru_parent /frutree/chassis/MB/system-board/CPU1/cpu - -/* - * DIMM parents - */ -name:/platform/memory-controller@0,0/memory-module-group?ID=0/memory-module?ID=0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/DIMM0/mem-module -name:/platform/memory-controller@0,0/memory-module-group?ID=0/memory-module?ID=1 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/DIMM1/mem-module -name:/platform/memory-controller@0,0/memory-module-group?ID=1/memory-module?ID=0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/DIMM2/mem-module -name:/platform/memory-controller@0,0/memory-module-group?ID=1/memory-module?ID=1 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/DIMM3/mem-module -name:/platform/memory-controller@1,0/memory-module-group?ID=0/memory-module?ID=0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/DIMM4/mem-module -name:/platform/memory-controller@1,0/memory-module-group?ID=0/memory-module?ID=1 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/DIMM5/mem-module -name:/platform/memory-controller@1,0/memory-module-group?ID=1/memory-module?ID=0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/DIMM6/mem-module -name:/platform/memory-controller@1,0/memory-module-group?ID=1/memory-module?ID=1 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/DIMM7/mem-module -/* - * create reference properties for motherboard pci devices - */ -_class:/jbus/pci@1c,600000 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -_class:/jbus/pci@1d,700000 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -_class:/jbus/pci@1e,600000 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -_class:/jbus/pci@1f,700000 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board diff --git a/usr/src/cmd/picl/plugins/sun4u/envmon/Makefile b/usr/src/cmd/picl/plugins/sun4u/envmon/Makefile deleted file mode 100644 index b2ea2a8acf..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/envmon/Makefile +++ /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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# cmd/picl/plugins/sun4u/envmon/Makefile -# -include $(SRC)/Makefile.psm - -LIBRARY= libpiclenvmon.a -VERS= .1 - -OBJECTS= piclenvmon.o - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/sun4u - -include $(SRC)/cmd/picl/plugins/Makefile.com - -SRCS= $(OBJECTS:%.o=%.c) - -LIBS = $(DYNLIB) - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - - -CPPFLAGS += -I$(SRC)/uts/sun4u/ -I$(SRC)/uts/common/ -CPPFLAGS += -I$(SRC)/cmd/picl/plugins/lib/picld_pluginutil -DYNFLAGS += -R/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins -LDLIBS += -L$(SRC)/cmd/picl/plugins/lib/picld_pluginutil/$(MACH) -LDLIBS += -L$(SRC)/lib/libpicltree/$(MACH) -LDLIBS += -L$(SRC)/cmd/picl/plugins/common/piclevent -LDLIBS += -L$(SRC)/cmd/picl/plugins/common/memcfg -LDLIBS += -L$(SRC)/cmd/picl/plugins/common/devtree -LDLIBS += -lnvpair -ldevinfo -lc -LDLIBS += -lpicltree -lpicld_pluginutil -lpiclevent -lpicldevtree - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -POFILE = piclenvmon_sun4u.po -POFILES = $(SRCS:%.c=%.po) - -all: $(LIBS) $(LIBLINKS) - -install: $(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) - -$(POFILE): $(POFILES) - $(CAT) $(POFILES) > $(POFILE) - -_msg: $(MSGDOMAIN) $(POFILE) - $(RM) $(MSGDOMAIN)/$(POFILE) - $(CP) $(POFILE) $(MSGDOMAIN)/$(POFILE) - -$(MSGDOMAIN): - $(INS.dir) - - -$(LIBLINKS): FRC - $(RM) $@; $(SYMLINK) $(DYNLIB) $@ - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: - diff --git a/usr/src/cmd/picl/plugins/sun4u/envmon/piclenvmon.c b/usr/src/cmd/picl/plugins/sun4u/envmon/piclenvmon.c deleted file mode 100644 index be2009bbcd..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/envmon/piclenvmon.c +++ /dev/null @@ -1,1810 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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. - */ - -/* - * This plugin creates PICL nodes and properties for objects handled through - * the enhanced LOMV system-processor interface. - * - * All the nodes which may be accessible through the system-processor are - * included below the service-processor node in the /platform tree. - * This plugin interrogates the system-processor to determine which of - * those nodes are actually available. Properties are added to such nodes and - * in the case of volatile properties like temperature, a call-back function - * is established for on-demand access to the current value. - * LEDs for which the system-processor provides write access are associated - * with read/write volatile properties. - * - * NOTE: - * Depends on PICL devtree plugin. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "piclenvmon.h" - -static void piclenvmon_register(void); -static void piclenvmon_init(void); -static void piclenvmon_fini(void); -static node_el_t *create_node_el(picl_nodehdl_t nodeh); -static void delete_node_el(node_el_t *pel); -static node_list_t *create_node_list(); -static void delete_node_list(node_list_t *pnl); -static void add_node_to_list(picl_nodehdl_t nodeh, node_list_t *listp); -static void get_node_list_by_class(picl_nodehdl_t nodeh, - const char *classname, node_list_t *listp); -static int get_envmon_limits(int envmon_fd, envmon_sysinfo_t *limits_p); -static void create_arrays(); -static int get_envmon_node(picl_nodehdl_t *envmoninfh); -static char *create_envmon_pathname(picl_nodehdl_t envmoninfh); -static int get_child_by_name(picl_nodehdl_t nodeh, const char *name, - picl_nodehdl_t *childh); -static int add_regular_prop(picl_nodehdl_t nodeh, const char *name, - int type, int access, int size, const void *valbuf, picl_prophdl_t *prophp); -static int add_volatile_prop(picl_nodehdl_t nodeh, const char *name, - int type, int access, int size, ptree_vol_rdfunc_t rdfunc, - ptree_vol_wrfunc_t wrfunc, picl_prophdl_t *prophp); -static int get_sensor_data(int envmon_fd, envmon_handle_t *id, int cmd, - envmon_thresholds_t *lows, envmon_thresholds_t *highs, int16_t *value); -static int get_indicator_data(int envmon_fd, envmon_handle_t *id, int cmd, - int16_t *condition); -static int get_fan_data(int envmon_fd, envmon_handle_t *id, int cmd, - envmon_thresholds_t *lows, uint16_t *speed, char *units); -static int get_led_data(int envmon_fd, envmon_handle_t *id, int cmd, - int8_t *state, int8_t *colour); -static int get_keyswitch_data(int envmon_fd, envmon_handle_t *id, int cmd, - envmon_keysw_pos_t *key_state); -static void convert_node_name(char *ptr); -static void convert_label_name(char *ptr); -static int add_value_prop(picl_nodehdl_t node_hdl, const char *prop_name, - int fru_type, int16_t value); -static int find_picl_handle(picl_prophdl_t proph); -static int lookup_led_status(int8_t state, const char **string); -static int lookup_key_posn(envmon_keysw_pos_t pos, const char **string); -static int get_config_file(char *filename); -static int read_vol_data(ptree_rarg_t *r_arg, void *buf); -static int write_led_data(ptree_warg_t *w_arg, const void *buf); -static int add_env_nodes(int envmon_fd, uint8_t fru_type, - picl_nodehdl_t envmonh); -static void fixstate(uint8_t state, const char *string, int *max_len); -static void fixkeyposn(envmon_keysw_pos_t keyposn, const char *string, - int *max_len); -static void setup_strings(); -static void free_vol_prop(picl_prophdl_t proph); -static void envmon_evhandler(const char *ename, const void *earg, - size_t size, void *cookie); -static int get_serial_num(int envmon_fd, envmon_handle_t *id, int cmd, - envmon_chassis_t *chassis); - -#pragma init(piclenvmon_register) - -static picld_plugin_reg_t my_reg_info = { - PICLD_PLUGIN_VERSION_1, - PICLD_PLUGIN_NON_CRITICAL, - "SUNW_piclenvmon", - piclenvmon_init, - piclenvmon_fini -}; - -static const char str_On[] = "on"; -static const char str_Off[] = "off"; -static const char str_Blinking[] = "blinking"; -static const char str_Flashing[] = "flashing"; -static const char str_SC[] = "SC"; -static char *envmon_device_name = NULL; -static envmon_sysinfo_t env_limits; -static handle_array_t handle_arr; -static struct { - int size; - char *str_colour; -} colour_lkup[1 + ENVMON_LED_CLR_RED]; - -static struct { - int8_t state; - char *str_ledstate; -} ledstate_lkup[] = { - { ENVMON_LED_OFF }, - { ENVMON_LED_ON }, - { ENVMON_LED_BLINKING }, - { ENVMON_LED_FLASHING } -}; - -static struct { - envmon_keysw_pos_t pos; - char *str_keyposn; -} keyposn_lkup[] = { - { ENVMON_KEYSW_POS_UNKNOWN }, - { ENVMON_KEYSW_POS_NORMAL }, - { ENVMON_KEYSW_POS_DIAG }, - { ENVMON_KEYSW_POS_LOCKED }, - { ENVMON_KEYSW_POS_OFF } -}; - -/* - * fru-type to ioctl cmd lookup - */ -int fru_to_cmd[] = { - ENVMONIOCVOLTSENSOR, - ENVMONIOCVOLTIND, - ENVMONIOCAMPSENSOR, - ENVMONIOCAMPIND, - ENVMONIOCTEMPSENSOR, - ENVMONIOCTEMPIND, - ENVMONIOCFAN, - ENVMONIOCFANIND, - ENVMONIOCGETLED, - ENVMONIOCGETKEYSW, - ENVMONIOCCHASSISSERIALNUM -}; - -/* - * fru-type to PICL CLASS - */ -const char *fru_to_class[] = { - PICL_CLASS_VOLTAGE_SENSOR, - PICL_CLASS_VOLTAGE_INDICATOR, - PICL_CLASS_CURRENT_SENSOR, - PICL_CLASS_CURRENT_INDICATOR, - PICL_CLASS_TEMPERATURE_SENSOR, - PICL_CLASS_TEMPERATURE_INDICATOR, - PICL_CLASS_FAN, - PICL_CLASS_FAN, - PICL_CLASS_LED, - PICL_CLASS_KEYSWITCH, - PICL_CLASS_CHASSIS_SERIAL_NUM -}; - -/* - * fru-type to PICL PROPERTY for volatile data - */ -const char *fru_to_prop[] = { - PICL_PROP_VOLTAGE, - PICL_PROP_CONDITION, - PICL_PROP_CURRENT, - PICL_PROP_CONDITION, - PICL_PROP_TEMPERATURE, - PICL_PROP_CONDITION, - PICL_PROP_FAN_SPEED, - PICL_PROP_FAN_SPEED_UNIT, - PICL_PROP_STATE, - PICL_PROP_STATE, - PICL_PROP_SERIAL_NUMBER -}; - -/* - * fru-type to PICL PTYPE - */ -int fru_to_ptype[] = { - PICL_PTYPE_FLOAT, - PICL_PTYPE_CHARSTRING, - PICL_PTYPE_FLOAT, - PICL_PTYPE_CHARSTRING, - PICL_PTYPE_INT, - PICL_PTYPE_CHARSTRING, - PICL_PTYPE_UNSIGNED_INT, - PICL_PTYPE_CHARSTRING, - PICL_PTYPE_CHARSTRING, - PICL_PTYPE_CHARSTRING, - PICL_PTYPE_CHARSTRING -}; - -/* - * condition strings - */ -static char *cond_okay; -static char *cond_failed; - -/* - * fru-type to size of volatile property - * the -1's are replaced by the max size of a condition string - */ -int fru_to_size[] = { - 4, -1, 4, -1, 2, -1, 2, -1, -1, -1, -1 -}; - -static node_el_t * -create_node_el(picl_nodehdl_t nodeh) -{ - node_el_t *ptr = malloc(sizeof (node_el_t)); - - if (ptr != NULL) { - ptr->nodeh = nodeh; - ptr->next = NULL; - } - - return (ptr); -} - -static void -delete_node_el(node_el_t *pel) -{ - free(pel); -} - -static node_list_t * -create_node_list() -{ - node_list_t *ptr = malloc(sizeof (node_list_t)); - - if (ptr != NULL) { - ptr->head = NULL; - ptr->tail = NULL; - } - - return (ptr); -} - -static void -delete_node_list(node_list_t *pnl) -{ - node_el_t *pel; - - if (pnl == NULL) - return; - - while ((pel = pnl->head) != NULL) { - pnl->head = pel->next; - delete_node_el(pel); - } - - /* - * normally pnl->tail would be to NULL next, - * but as it is about to be freed, this step can be skipped. - */ - free(pnl); -} - -/* - * Get a linking element and add handle to end of chain - */ -static void -add_node_to_list(picl_nodehdl_t nodeh, node_list_t *listp) -{ - node_el_t *pel = create_node_el(nodeh); - - if (pel != NULL) { - if (listp->tail == NULL) - listp->head = pel; - else - listp->tail->next = pel; - - listp->tail = pel; - } -} - -/* - * Get a list of nodes of the specified classname under nodeh. - * Once a node of the specified class is found, its children are not - * searched. - */ -static void -get_node_list_by_class(picl_nodehdl_t nodeh, const char *classname, - node_list_t *listp) -{ - int err; - char clname[PICL_CLASSNAMELEN_MAX+1]; - picl_nodehdl_t chdh; - - /* - * go through the children - */ - err = ptree_get_propval_by_name(nodeh, PICL_PROP_CHILD, &chdh, - sizeof (picl_nodehdl_t)); - - while (err == PICL_SUCCESS) { - err = ptree_get_propval_by_name(chdh, PICL_PROP_CLASSNAME, - clname, strlen(classname) + 1); - - if ((err == PICL_SUCCESS) && (strcmp(clname, classname) == 0)) - add_node_to_list(chdh, listp); - else - get_node_list_by_class(chdh, classname, listp); - - err = ptree_get_propval_by_name(chdh, PICL_PROP_PEER, &chdh, - sizeof (picl_nodehdl_t)); - } -} - -static int -get_envmon_limits(int envmon_fd, envmon_sysinfo_t *limits_p) -{ - return (ioctl(envmon_fd, ENVMONIOCSYSINFO, limits_p)); -} - -static int -re_create_arrays(int envmon_fd) -{ - envmon_sysinfo_t new_limits; - int res; - int maxnum; - uchar_t *fru_types; - envmon_handle_t *envhandles; - picl_prophdl_t *piclprhdls; - - res = get_envmon_limits(envmon_fd, &new_limits); - if (res != 0) - return (res); - - maxnum = new_limits.maxVoltSens + new_limits.maxVoltInd + - new_limits.maxAmpSens + new_limits.maxAmpInd + - new_limits.maxTempSens + new_limits.maxTempInd + - new_limits.maxFanSens + new_limits.maxFanInd + - new_limits.maxLED + N_KEY_SWITCHES; - - if (maxnum != handle_arr.maxnum) { - /* - * space requirements have changed - */ - fru_types = calloc(maxnum, sizeof (uchar_t)); - envhandles = calloc(maxnum, sizeof (envmon_handle_t)); - piclprhdls = calloc(maxnum, sizeof (picl_prophdl_t)); - if ((fru_types == NULL) || (envhandles == NULL) || - (piclprhdls == NULL)) { - free(fru_types); - free(envhandles); - free(piclprhdls); - return (-1); - } - free(handle_arr.fru_types); - handle_arr.fru_types = fru_types; - free(handle_arr.envhandles); - handle_arr.envhandles = envhandles; - free(handle_arr.piclprhdls); - handle_arr.piclprhdls = piclprhdls; - } else { - (void) memset(handle_arr.fru_types, 0, - maxnum * sizeof (uchar_t)); - (void) memset(handle_arr.envhandles, 0, - maxnum * sizeof (envmon_handle_t)); - (void) memset(handle_arr.piclprhdls, 0, - maxnum * sizeof (picl_prophdl_t)); - } - - handle_arr.num = 0; - handle_arr.maxnum = maxnum; - env_limits = new_limits; - return (0); -} - -static void -create_arrays() -{ - int maxnum = env_limits.maxVoltSens + env_limits.maxVoltInd + - env_limits.maxAmpSens + env_limits.maxAmpInd + - env_limits.maxTempSens + env_limits.maxTempInd + - env_limits.maxFanSens + env_limits.maxFanInd + - env_limits.maxLED + N_KEY_SWITCHES; - handle_arr.maxnum = maxnum; - handle_arr.num = 0; - handle_arr.fru_types = calloc(maxnum, sizeof (uchar_t)); - handle_arr.envhandles = calloc(maxnum, sizeof (envmon_handle_t)); - handle_arr.piclprhdls = calloc(maxnum, sizeof (picl_prophdl_t)); -} - -static int -get_envmon_node(picl_nodehdl_t *envmoninfh) -{ - int err = PICL_SUCCESS; - node_list_t *listp; - - listp = create_node_list(); - - if ((err = ptree_get_node_by_path(PICL_NODE_ROOT PICL_NODE_PLATFORM, - envmoninfh)) != PICL_SUCCESS) { - syslog(LOG_ERR, EM_MISSING_NODE, - PICL_NODE_ROOT PICL_NODE_PLATFORM); - return (err); /* no /platform ! */ - } - - get_node_list_by_class(*envmoninfh, PICL_CLASS_SERVICE_PROCESSOR, - listp); - - if (listp->head == NULL) { - *envmoninfh = 0; - syslog(LOG_ERR, EM_MISSING_NODE, PICL_CLASS_SERVICE_PROCESSOR); - err = PICL_NODENOTFOUND; - } else { - *envmoninfh = listp->head->nodeh; - } - - delete_node_list(listp); - return (err); -} - -static char * -create_envmon_pathname(picl_nodehdl_t envmoninfh) -{ - char *ptr; - char namebuf[PATH_MAX]; - size_t len; - DIR *dirp; - struct dirent *dp; - struct stat statbuf; - - /* prefix devfs-path name with /devices */ - (void) strlcpy(namebuf, "/devices", PATH_MAX); - - /* - * append devfs-path property - */ - len = strlen(namebuf); - if (ptree_get_propval_by_name(envmoninfh, PICL_PROP_DEVFS_PATH, - namebuf + len, sizeof (namebuf) - len) != PICL_SUCCESS) { - syslog(LOG_ERR, EM_SC_NODE_INCOMPLETE); - return (NULL); - } - - /* locate final component of name */ - ptr = strrchr(namebuf, '/'); - if (ptr == NULL) - return (NULL); - *ptr = '\0'; /* terminate at end of directory path */ - len = strlen(ptr + 1); /* length of terminal name */ - dirp = opendir(namebuf); - if (dirp == NULL) { - syslog(LOG_ERR, EM_SC_NODE_MISSING); - return (NULL); - } - *ptr++ = '/'; /* restore '/' and advance to final name */ - - while ((dp = readdir(dirp)) != NULL) { - /* - * look for a name which starts with the string at *ptr - */ - if (strlen(dp->d_name) < len) - continue; /* skip short names */ - if (strncmp(dp->d_name, ptr, len) == 0) { - /* - * Got a match, restore full pathname and stat the - * entry. Reject if not a char device - */ - (void) strlcpy(ptr, dp->d_name, - sizeof (namebuf) - (ptr - namebuf)); - if (stat(namebuf, &statbuf) < 0) - continue; /* reject if can't stat it */ - if (!S_ISCHR(statbuf.st_mode)) - continue; /* not a character device */ - /* - * go with this entry - */ - (void) closedir(dirp); - return (strdup(namebuf)); - } - } - syslog(LOG_ERR, EM_SC_NODE_MISSING); - (void) closedir(dirp); - return (NULL); -} - -/* - * look for named node as child of supplied handle - */ -static int -get_child_by_name(picl_nodehdl_t nodeh, const char *name, - picl_nodehdl_t *childh) -{ - int err; - char node_name[ENVMON_MAXNAMELEN]; - - if (strlen(name) >= ENVMON_MAXNAMELEN) - return (PICL_NODENOTFOUND); - err = ptree_get_propval_by_name(nodeh, PICL_PROP_CHILD, childh, - sizeof (*childh)); - while (err == PICL_SUCCESS) { - err = ptree_get_propval_by_name(*childh, PICL_PROP_NAME, - node_name, sizeof (node_name)); - if ((err == PICL_SUCCESS) && - (strncmp(name, node_name, ENVMON_MAXNAMELEN) == 0)) - return (PICL_SUCCESS); - err = ptree_get_propval_by_name(*childh, PICL_PROP_PEER, - childh, sizeof (*childh)); - } - return (err); -} - -/* - * Create and add the specified regular property - */ -static int -add_regular_prop(picl_nodehdl_t nodeh, const char *name, int type, int access, - int size, const void *valbuf, picl_prophdl_t *prophp) -{ - int err; - ptree_propinfo_t propinfo; - picl_prophdl_t proph; - - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - type, access, size, (char *)name, NULL, NULL); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_create_and_add_prop(nodeh, &propinfo, (void *)valbuf, - &proph); - if (err == PICL_SUCCESS && prophp) - *prophp = proph; - return (err); -} - - -/* - * Create and add the specified volatile property - */ -static int -add_volatile_prop(picl_nodehdl_t nodeh, const char *name, int type, int access, - int size, ptree_vol_rdfunc_t rdfunc, ptree_vol_wrfunc_t wrfunc, - picl_prophdl_t *prophp) -{ - int err; - ptree_propinfo_t propinfo; - picl_prophdl_t proph; - - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - type, (access|PICL_VOLATILE), size, (char *)name, rdfunc, wrfunc); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_create_and_add_prop(nodeh, &propinfo, NULL, &proph); - if (err == PICL_SUCCESS && prophp) - *prophp = proph; - return (err); -} - -/* - * There are 5 different structures used for reading environmental data - * from the service-processor. A different function is used for each one. - * Some functions cover several ioctls, so the desired ioctl is part of - * the interface. In each case the id parameter is read/write, the - * returned value being the next id for this fru type. - */ - -/* - * Function to read sensor data. - */ -static int -get_sensor_data(int envmon_fd, envmon_handle_t *id, int cmd, - envmon_thresholds_t *lows, envmon_thresholds_t *highs, int16_t *value) -{ - int res; - envmon_sensor_t data; - - (void) memset(&data, 0, sizeof (data)); - data.id = *id; - res = ioctl(envmon_fd, cmd, &data); - if (res < 0) { - return (PICL_NOTREADABLE); - } - - *id = data.next_id; - - if ((data.sensor_status & ENVMON_NOT_PRESENT) != 0) - return (PICL_INVALIDHANDLE); - - /* - * it is assumed that threshold data will be available, - * even though the current sensor value may be inaccessible - */ - if (lows != NULL) - *lows = data.lowthresholds; - if (highs != NULL) - *highs = data.highthresholds; - - if ((data.sensor_status & ENVMON_INACCESSIBLE) != 0) { - if (value != NULL) - *value = ENVMON_VAL_UNAVAILABLE; - return (PICL_PROPVALUNAVAILABLE); - } - if (value != NULL) - *value = data.value; - return (PICL_SUCCESS); -} - -/* - * Function to read indicator data. - */ -static int -get_indicator_data(int envmon_fd, envmon_handle_t *id, int cmd, - int16_t *condition) -{ - int res; - envmon_indicator_t data; - - data.id = *id; - res = ioctl(envmon_fd, cmd, &data); - if (res < 0) - return (PICL_NOTREADABLE); - *id = data.next_id; - if ((data.sensor_status & ENVMON_NOT_PRESENT) != 0) - return (PICL_INVALIDHANDLE); - if (condition != NULL) - *condition = data.condition; - if ((data.sensor_status & ENVMON_INACCESSIBLE) != 0) { - return (PICL_PROPVALUNAVAILABLE); - } - return (PICL_SUCCESS); -} - -/* - * Function to read fan data. - */ -static int -get_fan_data(int envmon_fd, envmon_handle_t *id, int cmd, - envmon_thresholds_t *lows, uint16_t *speed, char *units) -{ - int res; - envmon_fan_t data; - - data.id = *id; - res = ioctl(envmon_fd, cmd, &data); - if (res < 0) - return (PICL_NOTREADABLE); - *id = data.next_id; - if ((data.sensor_status & ENVMON_NOT_PRESENT) != 0) - return (PICL_INVALIDHANDLE); - if (lows != NULL) - *lows = data.lowthresholds; - if (units != NULL) - (void) strlcpy(units, data.units, sizeof (data.units)); - - if ((data.sensor_status & ENVMON_INACCESSIBLE) != 0) { - if (speed != NULL) - *speed = ENVMON_VAL_UNAVAILABLE; - return (PICL_PROPVALUNAVAILABLE); - } - if (speed != NULL) - *speed = data.speed; - return (PICL_SUCCESS); -} - -/* - * Function to read LED data. - */ -static int -get_led_data(int envmon_fd, envmon_handle_t *id, int cmd, - int8_t *state, int8_t *colour) -{ - int res; - envmon_led_info_t data; - - data.id = *id; - res = ioctl(envmon_fd, cmd, &data); - if (res < 0) - return (PICL_NOTREADABLE); - *id = data.next_id; - if ((data.sensor_status & ENVMON_NOT_PRESENT) != 0) - return (PICL_INVALIDHANDLE); - if (colour != NULL) - *colour = data.led_color; - if ((data.sensor_status & ENVMON_INACCESSIBLE) != 0) { - return (PICL_PROPVALUNAVAILABLE); - } - if (state != NULL) - *state = data.led_state; - return (PICL_SUCCESS); -} - -/* - * Function to read key-switch position - * Returns PICL_INVALIDHANDLE if ioctl not supported (or fails) - */ -static int -get_keyswitch_data(int envmon_fd, envmon_handle_t *id, int cmd, - envmon_keysw_pos_t *key_state) -{ - int res; - - if (id->name[0] == '\0') { - (void) strlcpy(id->name, KEYSWITCH_NAME, sizeof (id->name)); - return (PICL_INVALIDHANDLE); - } else if (strncmp(id->name, KEYSWITCH_NAME, sizeof (id->name)) != 0) { - id->name[0] = '\0'; - return (PICL_INVALIDHANDLE); - } else { - res = ioctl(envmon_fd, cmd, key_state); - id->name[0] = '\0'; - - if (res < 0) - return (PICL_INVALIDHANDLE); - return (PICL_SUCCESS); - } -} - -/* - * Function to read the chassis serial number - * Returns PICL_INVALIDHANDLE if ioctl not supported (or fails) - */ -static int -get_serial_num(int envmon_fd, envmon_handle_t *id, int cmd, - envmon_chassis_t *chassis) -{ - int res; - - if (id->name[0] == '\0') { - (void) strlcpy(id->name, CHASSIS_SERIAL_NUMBER, - sizeof (id->name)); - return (PICL_INVALIDHANDLE); - } else if (strncmp(id->name, CHASSIS_SERIAL_NUMBER, sizeof (id->name)) - != 0) { - id->name[0] = '\0'; - return (PICL_INVALIDHANDLE); - } else { - res = ioctl(envmon_fd, cmd, chassis); - id->name[0] = '\0'; - - if (res < 0) - return (PICL_INVALIDHANDLE); - return (PICL_SUCCESS); - } -} - -/* - * change to lower case and convert any spaces into hyphens, - * and any dots or colons symbols into underscores - */ -static void -convert_node_name(char *ptr) -{ - char ch; - - for (ch = *ptr; ch != '\0'; ch = *++ptr) { - if (isupper(ch)) { - *ptr = tolower(ch); - } else if (isspace(ch)) { - *ptr = '-'; - } else if ((ch == '.') || (ch == ':')) { - *ptr = '_'; - } - } -} - -/* - * strip to the last '.' separator and keep the rest - * change ':' to '/' within the last component - */ -static void -convert_label_name(char *name) -{ - const char *cptr; - char ch; - - cptr = strrchr(name, '.'); - - if (cptr == NULL) - cptr = name; - else - cptr++; /* skip the '.' */ - - do { - ch = *cptr++; - - if (ch == ':') - ch = '/'; - - *name++ = ch; - } while (ch != '\0'); -} - -/* - * add a value property - */ -static int -add_value_prop(picl_nodehdl_t node_hdl, const char *prop_name, int fru_type, - int16_t value) -{ - int err; - union { - float u_f; - int16_t u_i16; - } val_buf; - - if (fru_to_ptype[fru_type] == PICL_PTYPE_FLOAT) - val_buf.u_f = (float)((float)value / (float)1000.0); - else - val_buf.u_i16 = value; - - err = add_regular_prop(node_hdl, prop_name, fru_to_ptype[fru_type], - PICL_READ, fru_to_size[fru_type], &val_buf, NULL); - return (err); -} - -static int -find_picl_handle(picl_prophdl_t proph) -{ - int index; - - for (index = 0; index < handle_arr.num; index++) { - if (handle_arr.piclprhdls[index] == proph) - return (index); - } - - return (-1); -} - -/* - * look up function to convert led status into string - */ -static int -lookup_led_status(int8_t state, const char **string) -{ - int i; - int lim = sizeof (ledstate_lkup) / sizeof (ledstate_lkup[0]); - - for (i = 0; i < lim; i++) { - if (ledstate_lkup[i].state == state) { - *string = ledstate_lkup[i].str_ledstate; - return (PICL_SUCCESS); - } - } - - *string = ""; - return (PICL_PROPVALUNAVAILABLE); -} - -static int -lookup_key_posn(envmon_keysw_pos_t pos, const char **string) -{ - int i; - int lim = sizeof (keyposn_lkup) / sizeof (keyposn_lkup[0]); - - for (i = 0; i < lim; i++) { - if (keyposn_lkup[i].pos == pos) { - *string = keyposn_lkup[i].str_keyposn; - return (PICL_SUCCESS); - } - } - - *string = ""; - return (PICL_PROPVALUNAVAILABLE); -} - -/* - * function to read volatile data associated with a PICL property handle - */ -static int -read_vol_data(ptree_rarg_t *r_arg, void *buf) -{ - picl_prophdl_t proph; - int index; - uint8_t fru_type; - envmon_handle_t id; - int16_t sensor_data; - int8_t led_state; - envmon_keysw_pos_t key_posn; - envmon_chassis_t chassis; - float float_data; - int cmd; - int err; - int envmon_fd; - const char *cptr; - - proph = r_arg->proph; - index = find_picl_handle(proph); - if (index < 0) - return (PICL_INVALIDHANDLE); - fru_type = handle_arr.fru_types[index]; - id = handle_arr.envhandles[index]; - cmd = fru_to_cmd[fru_type]; - envmon_fd = open(envmon_device_name, O_RDONLY); - if (envmon_fd < 0) - return (PICL_NOTREADABLE); - - /* - * read environmental data according to type - */ - switch (fru_type) { - case ENVMON_VOLT_SENS: - /*FALLTHROUGH*/ - case ENVMON_AMP_SENS: - /*FALLTHROUGH*/ - case ENVMON_TEMP_SENS: - err = get_sensor_data(envmon_fd, &id, cmd, NULL, NULL, - &sensor_data); - break; - case ENVMON_VOLT_IND: - /*FALLTHROUGH*/ - case ENVMON_AMP_IND: - /*FALLTHROUGH*/ - case ENVMON_TEMP_IND: - /*FALLTHROUGH*/ - case ENVMON_FAN_IND: - err = get_indicator_data(envmon_fd, &id, cmd, &sensor_data); - break; - case ENVMON_FAN_SENS: - err = get_fan_data(envmon_fd, &id, cmd, NULL, - (uint16_t *)&sensor_data, NULL); - break; - case ENVMON_LED_IND: - err = get_led_data(envmon_fd, &id, cmd, &led_state, NULL); - break; - case ENVMON_KEY_SWITCH: - err = get_keyswitch_data(envmon_fd, &id, cmd, &key_posn); - break; - case ENVMON_CHASSIS: - err = get_serial_num(envmon_fd, &id, cmd, &chassis); - break; - default: - err = PICL_FAILURE; - break; - } - - (void) close(envmon_fd); - if (err != PICL_SUCCESS) { - /* - * PICL_INVALIDHANDLE is used internally, but it upsets - * prtpicl; change it to PICL_PROPVALUNAVAILABLE - */ - if (err == PICL_INVALIDHANDLE) - err = PICL_PROPVALUNAVAILABLE; - return (err); - } - - /* - * convert data and copy out - */ - switch (fru_type) { - case ENVMON_VOLT_SENS: - /*FALLTHROUGH*/ - case ENVMON_AMP_SENS: - float_data = (float)((float)sensor_data / (float)1000.0); - (void) memcpy(buf, &float_data, sizeof (float_data)); - break; - - case ENVMON_TEMP_SENS: - /*FALLTHROUGH*/ - case ENVMON_FAN_SENS: - (void) memcpy(buf, &sensor_data, sizeof (sensor_data)); - break; - - case ENVMON_VOLT_IND: - /*FALLTHROUGH*/ - case ENVMON_AMP_IND: - /*FALLTHROUGH*/ - case ENVMON_TEMP_IND: - /*FALLTHROUGH*/ - case ENVMON_FAN_IND: - (void) strlcpy(buf, sensor_data == 0 ? cond_okay : cond_failed, - fru_to_size[fru_type]); - break; - - case ENVMON_LED_IND: - err = lookup_led_status(led_state, &cptr); - if (err != PICL_SUCCESS) - return (err); - (void) strlcpy(buf, cptr, fru_to_size[fru_type]); - break; - - case ENVMON_KEY_SWITCH: - err = lookup_key_posn(key_posn, &cptr); - if (err != PICL_SUCCESS) - return (err); - (void) strlcpy(buf, cptr, fru_to_size[fru_type]); - break; - case ENVMON_CHASSIS: - (void) memcpy(buf, chassis.serial_number, - sizeof (chassis.serial_number)); - break; - - default: - return (PICL_FAILURE); - } - - return (PICL_SUCCESS); -} - -static int -write_led_data(ptree_warg_t *w_arg, const void *buf) -{ - picl_prophdl_t proph; - int index; - uint8_t fru_type; - int err; - int envmon_fd; - envmon_led_ctl_t led_ctl; - - proph = w_arg->proph; - index = find_picl_handle(proph); - if (index < 0) - return (PICL_INVALIDHANDLE); - fru_type = handle_arr.fru_types[index]; - if (fru_type != ENVMON_LED_IND) - return (PICL_INVALIDARG); - if (w_arg->cred.dc_euid != SUPER_USER) - return (PICL_PERMDENIED); - - /* see if the requested state is recognized */ - if (strcasecmp(str_Off, buf) == 0) - led_ctl.led_state = ENVMON_LED_OFF; - else if (strcasecmp(str_On, buf) == 0) - led_ctl.led_state = ENVMON_LED_ON; - else if (strcasecmp(str_Blinking, buf) == 0) - led_ctl.led_state = ENVMON_LED_BLINKING; - else if (strcasecmp(str_Flashing, buf) == 0) - led_ctl.led_state = ENVMON_LED_FLASHING; - else - return (PICL_INVALIDARG); - - envmon_fd = open(envmon_device_name, O_RDWR); - if (envmon_fd < 0) - return (PICL_FAILURE); - led_ctl.id = handle_arr.envhandles[index]; - err = ioctl(envmon_fd, ENVMONIOCSETLED, &led_ctl); - (void) close(envmon_fd); - if (err < 0) - return (PICL_FAILURE); - return (PICL_SUCCESS); -} - -/* - * if colour information is not supplied by the service processor, - * try to determine led colour from the handle name. - */ -static void -fix_led_colour(int8_t *colour_p, const char *id) -{ - const char *cptr = strrchr(id, '.'); - - if ((*colour_p < ENVMON_LED_CLR_NONE) || - (*colour_p > ENVMON_LED_CLR_RED)) - syslog(LOG_ERR, EM_INVALID_COLOR, *colour_p, id); - if (cptr == NULL) { - *colour_p = ENVMON_LED_CLR_NONE; - return; - } - - cptr++; /* step over '.' */ - - if (strcmp(cptr, LED_ACT) == 0) - *colour_p = ENVMON_LED_CLR_GREEN; - else if (strcmp(cptr, LED_SERVICE) == 0) - *colour_p = ENVMON_LED_CLR_AMBER; - else if (strcmp(cptr, LED_LOCATE) == 0) - *colour_p = ENVMON_LED_CLR_WHITE; - else if (strcmp(cptr, LED_OK2RM) == 0) - *colour_p = ENVMON_LED_CLR_BLUE; - else - *colour_p = ENVMON_LED_CLR_NONE; -} - -/* - * Add nodes for environmental devices of type fru_type - * below the supplied node. - */ -static int -add_env_nodes(int envmon_fd, uint8_t fru_type, picl_nodehdl_t envmonh) -{ - envmon_handle_t id; - envmon_thresholds_t lows; - envmon_thresholds_t highs; - char units[ENVMON_MAXNAMELEN]; - char platform_tree_name[ENVMON_MAXNAMELEN]; - char label_name[ENVMON_MAXNAMELEN]; - int16_t sensor_data; - int8_t led_state; - int8_t colour; - envmon_keysw_pos_t key_state; - envmon_chassis_t chassis_num; - int cmd; - int err; - int index = handle_arr.num; - picl_nodehdl_t node_hdl; - - /* - * catch table is full at start - */ - if (index >= handle_arr.maxnum) - return (PICL_FAILURE); - - cmd = fru_to_cmd[fru_type]; - id.name[0] = '\0'; - - do { - lows.warning = lows.shutdown = lows.poweroff = - ENVMON_VAL_UNAVAILABLE; - highs.warning = highs.shutdown = highs.poweroff = - ENVMON_VAL_UNAVAILABLE; - handle_arr.fru_types[index] = fru_type; - /* must store id before reading data as it is then updated */ - handle_arr.envhandles[index] = id; - /* - * read environmental data according to type - */ - switch (fru_type) { - case ENVMON_VOLT_SENS: - /*FALLTHROUGH*/ - case ENVMON_AMP_SENS: - /*FALLTHROUGH*/ - case ENVMON_TEMP_SENS: - err = get_sensor_data(envmon_fd, &id, cmd, &lows, - &highs, &sensor_data); - break; - case ENVMON_VOLT_IND: - /*FALLTHROUGH*/ - case ENVMON_AMP_IND: - /*FALLTHROUGH*/ - case ENVMON_TEMP_IND: - /*FALLTHROUGH*/ - case ENVMON_FAN_IND: - err = get_indicator_data(envmon_fd, &id, cmd, - &sensor_data); - break; - case ENVMON_FAN_SENS: - err = get_fan_data(envmon_fd, &id, cmd, &lows, - (uint16_t *)&sensor_data, units); - break; - case ENVMON_LED_IND: - err = get_led_data(envmon_fd, &id, cmd, &led_state, - &colour); - break; - case ENVMON_KEY_SWITCH: - err = get_keyswitch_data(envmon_fd, &id, cmd, - &key_state); - break; - case ENVMON_CHASSIS: - err = get_serial_num(envmon_fd, &id, cmd, - &chassis_num); - break; - default: - return (PICL_FAILURE); - } - - if (err == PICL_INVALIDHANDLE) - continue; - if ((err != PICL_SUCCESS) && (err != PICL_PROPVALUNAVAILABLE)) { - syslog(LOG_ERR, EM_NODE_ACCESS, id, fru_type, err); - continue; - } - - /* - * successfully read environmental data, add to PICL - */ - (void) strlcpy(platform_tree_name, - handle_arr.envhandles[index].name, - sizeof (platform_tree_name)); - - (void) strlcpy(label_name, platform_tree_name, - ENVMON_MAXNAMELEN); - convert_label_name(label_name); - convert_node_name(platform_tree_name); - /* - * does this node already exist? - */ - err = get_child_by_name(envmonh, platform_tree_name, &node_hdl); - if (err == PICL_SUCCESS) { - /* - * skip over existing node - */ - continue; - } - err = ptree_create_node(platform_tree_name, - fru_to_class[fru_type], &node_hdl); - if (err != PICL_SUCCESS) { - break; - } - err = add_volatile_prop(node_hdl, fru_to_prop[fru_type], - fru_to_ptype[fru_type], - PICL_READ | (fru_type == ENVMON_LED_IND ? PICL_WRITE : 0), - fru_to_size[fru_type], read_vol_data, - fru_type == ENVMON_LED_IND ? write_led_data : NULL, - &handle_arr.piclprhdls[index]); - if (err != PICL_SUCCESS) { - break; - } - - /* - * if any thresholds are defined add a property - */ - if (lows.warning != ENVMON_VAL_UNAVAILABLE) { - err = add_value_prop(node_hdl, PICL_PROP_LOW_WARNING, - fru_type, lows.warning); - if (err != PICL_SUCCESS) { - break; - } - } - if (lows.shutdown != ENVMON_VAL_UNAVAILABLE) { - err = add_value_prop(node_hdl, PICL_PROP_LOW_SHUTDOWN, - fru_type, lows.shutdown); - if (err != PICL_SUCCESS) { - break; - } - } - if (lows.poweroff != ENVMON_VAL_UNAVAILABLE) { - err = add_value_prop(node_hdl, PICL_PROP_LOW_POWER_OFF, - fru_type, lows.poweroff); - if (err != PICL_SUCCESS) { - break; - } - } - if (highs.warning != ENVMON_VAL_UNAVAILABLE) { - err = add_value_prop(node_hdl, PICL_PROP_HIGH_WARNING, - fru_type, highs.warning); - if (err != PICL_SUCCESS) { - break; - } - } - if (highs.shutdown != ENVMON_VAL_UNAVAILABLE) { - err = add_value_prop(node_hdl, PICL_PROP_HIGH_SHUTDOWN, - fru_type, highs.shutdown); - if (err != PICL_SUCCESS) { - break; - } - } - if (highs.poweroff != ENVMON_VAL_UNAVAILABLE) { - err = add_value_prop(node_hdl, PICL_PROP_HIGH_POWER_OFF, - fru_type, highs.poweroff); - if (err != PICL_SUCCESS) { - break; - } - } - - /* - * if device is a fan sensor, add a speedunit property - */ - if (fru_type == ENVMON_FAN_SENS) { - err = add_regular_prop(node_hdl, - PICL_PROP_FAN_SPEED_UNIT, PICL_PTYPE_CHARSTRING, - PICL_READ, 1 + strlen(units), units, NULL); - if (err != PICL_SUCCESS) { - break; - } - } - /* - * If device is a LED indicator and returns a colour, - * add a colour property. - */ - if (fru_type == ENVMON_LED_IND) { - if (colour < 0 || colour == ENVMON_LED_CLR_ANY || - colour > ENVMON_LED_CLR_RED) - fix_led_colour(&colour, - handle_arr.envhandles[index].name); - if (colour != ENVMON_LED_CLR_NONE) { - err = add_regular_prop(node_hdl, - PICL_PROP_COLOR, PICL_PTYPE_CHARSTRING, - PICL_READ, colour_lkup[colour].size, - colour_lkup[colour].str_colour, NULL); - if (err != PICL_SUCCESS) { - break; - } - } - } - /* - * add a label property unless it's a keyswitch or the - * chassis serial number. keyswitch and chassis serial - * number are labelled from a config file because the - * ALOM interface doesn't supply a name for it) - */ - if ((fru_type != ENVMON_KEY_SWITCH) && - (fru_type != ENVMON_CHASSIS)) { - err = add_regular_prop(node_hdl, PICL_PROP_LABEL, - PICL_PTYPE_CHARSTRING, PICL_READ, - 1 + strlen(label_name), label_name, NULL); - - if (err != PICL_SUCCESS) { - break; - } - } - /* - * all properties added to this node, add the node below - * the supplied anchor point - */ - err = ptree_add_node(envmonh, node_hdl); - - if (err != PICL_SUCCESS) { - break; - } - - /* - * that node went in OK, advance index - */ - index++; - - } while ((id.name[0] != '\0') && (index < handle_arr.maxnum)); - - handle_arr.num = index; - return (err); -} - -static void -fixstate(uint8_t state, const char *string, int *max_len) -{ - int i; - int len; - - for (i = 0; i < (sizeof (ledstate_lkup) / sizeof (ledstate_lkup[0])); - i++) { - if (ledstate_lkup[i].state == state) { - free(ledstate_lkup[i].str_ledstate); - ledstate_lkup[i].str_ledstate = strdup(string); - len = strlen(string); - if (len >= *max_len) - *max_len = len + 1; - break; - } - } -} - -static void -fixkeyposn(envmon_keysw_pos_t keyposn, const char *string, int *max_len) -{ - int i; - int len; - - for (i = 0; i < (sizeof (keyposn_lkup) / sizeof (keyposn_lkup[0])); - i++) { - if (keyposn_lkup[i].pos == keyposn) { - free(keyposn_lkup[i].str_keyposn); - keyposn_lkup[i].str_keyposn = strdup(string); - len = strlen(string); - if (len >= *max_len) - *max_len = len + 1; - break; - } - } -} - -static void -setup_strings() -{ - int string_size; - int i; - int lim = sizeof (colour_lkup) / sizeof (colour_lkup[0]); - - /* - * initialise led colours lookup - */ - for (i = 0; i < lim; i++) { - free(colour_lkup[i].str_colour); - } - - colour_lkup[ENVMON_LED_CLR_ANY].str_colour = strdup(gettext("any")); - colour_lkup[ENVMON_LED_CLR_WHITE].str_colour = - strdup(gettext("white")); - colour_lkup[ENVMON_LED_CLR_BLUE].str_colour = strdup(gettext("blue")); - colour_lkup[ENVMON_LED_CLR_GREEN].str_colour = - strdup(gettext("green")); - colour_lkup[ENVMON_LED_CLR_AMBER].str_colour = - strdup(gettext("amber")); - colour_lkup[ENVMON_LED_CLR_RED].str_colour = - strdup(gettext("red")); - - for (i = 0; i < lim; i++) { - if (colour_lkup[i].str_colour != NULL) - colour_lkup[i].size = - 1 + strlen(colour_lkup[i].str_colour); - } - - /* - * initialise condition strings and note longest - */ - string_size = 0; - cond_okay = strdup(gettext("okay")); - if (strlen(cond_okay) >= string_size) - string_size = 1 + strlen(cond_okay); - cond_failed = strdup(gettext("failed")); - if (strlen(cond_failed) >= string_size) - string_size = 1 + strlen(cond_failed); - - for (i = 0; i < sizeof (fru_to_size) / sizeof (fru_to_size[0]); i++) - if (fru_to_size[i] == -1) - fru_to_size[i] = string_size; - - /* - * initialise led state lookup strings - */ - string_size = 0; - fixstate(ENVMON_LED_OFF, gettext("off"), &string_size); - fixstate(ENVMON_LED_ON, gettext("on"), &string_size); - fixstate(ENVMON_LED_BLINKING, gettext("blinking"), &string_size); - fixstate(ENVMON_LED_FLASHING, gettext("flashing"), &string_size); - fru_to_size[ENVMON_LED_IND] = string_size; - - /* - * initialise key position lookup strings - */ - string_size = 0; - fixkeyposn(ENVMON_KEYSW_POS_UNKNOWN, gettext("UNKNOWN"), &string_size); - fixkeyposn(ENVMON_KEYSW_POS_NORMAL, gettext("NORMAL"), &string_size); - fixkeyposn(ENVMON_KEYSW_POS_DIAG, gettext("DIAG"), &string_size); - fixkeyposn(ENVMON_KEYSW_POS_LOCKED, gettext("LOCKED"), &string_size); - fixkeyposn(ENVMON_KEYSW_POS_OFF, gettext("STBY"), &string_size); - fru_to_size[ENVMON_KEY_SWITCH] = string_size; - - /* - * initialise chassis serial number string - */ - fru_to_size[ENVMON_CHASSIS] = ENVMON_MAXNAMELEN; -} - -/* - * The size of outfilename must be PATH_MAX - */ -static int -get_config_file(char *filename) -{ - char nmbuf[SYS_NMLN]; - char pname[PATH_MAX]; - - if (sysinfo(SI_PLATFORM, nmbuf, sizeof (nmbuf)) != -1) { - (void) snprintf(pname, PATH_MAX, PICLD_PLAT_PLUGIN_DIRF, nmbuf); - (void) strlcat(pname, ENVMON_CONFFILE_NAME, PATH_MAX); - if (access(pname, R_OK) == 0) { - (void) strlcpy(filename, pname, PATH_MAX); - return (0); - } - } - - if (sysinfo(SI_MACHINE, nmbuf, sizeof (nmbuf)) != -1) { - (void) snprintf(pname, PATH_MAX, PICLD_PLAT_PLUGIN_DIRF, nmbuf); - (void) strlcat(pname, ENVMON_CONFFILE_NAME, PATH_MAX); - if (access(pname, R_OK) == 0) { - (void) strlcpy(filename, pname, PATH_MAX); - return (0); - } - } - - (void) snprintf(pname, PATH_MAX, "%s/%s", - PICLD_COMMON_PLUGIN_DIR, ENVMON_CONFFILE_NAME); - - if (access(pname, R_OK) == 0) { - (void) strlcpy(filename, pname, PATH_MAX); - return (0); - } - - return (-1); -} - -static void -free_vol_prop(picl_prophdl_t proph) -{ - int index; - - index = find_picl_handle(proph); - if (index >= 0) { - handle_arr.num--; - if (index != handle_arr.num) { - /* relocate last entry into hole just created */ - handle_arr.fru_types[index] = - handle_arr.fru_types[handle_arr.num]; - handle_arr.envhandles[index] = - handle_arr.envhandles[handle_arr.num]; - handle_arr.piclprhdls[index] = - handle_arr.piclprhdls[handle_arr.num]; - } - } -} - -/* - * handle PICL FRU ADDED and FRU REMOVED events - */ -/*ARGSUSED*/ -static void -envmon_evhandler(const char *ename, const void *earg, size_t size, - void *cookie) -{ - char path[MAXPATHLEN]; - picl_nodehdl_t locnodeh; - int retval; - picl_nodehdl_t childh; - picl_nodehdl_t nodeh; - picl_prophdl_t tableh; - picl_prophdl_t tblh; - picl_prophdl_t proph; - ptree_propinfo_t pi; - - if (strcmp(ename, PICL_FRU_ADDED) == 0) { - retval = nvlist_lookup_uint64((nvlist_t *)earg, - PICLEVENTARG_PARENTHANDLE, &locnodeh); - - if (retval != 0) { - syslog(LOG_ERR, EM_EV_MISSING_ARG, - PICLEVENTARG_PARENTHANDLE); - return; - } - retval = ptree_get_propval_by_name(locnodeh, PICL_PROP_NAME, - path, sizeof (path)); - if (retval == PICL_SUCCESS) { - /* - * Open envmon device and interrogate - */ - int envmon_fd; - int fru_type; - picl_nodehdl_t envmoninfh; - - if (get_envmon_node(&envmoninfh) != PICL_SUCCESS) { - syslog(LOG_ERR, EM_SC_NODE_MISSING); - return; - } - - if ((envmon_fd = open(envmon_device_name, O_RDONLY)) < - 0) { - syslog(LOG_ERR, EM_SYS_ERR, envmon_device_name, - strerror(errno)); - return; - } - - if (strcmp(str_SC, path) == 0) { - /* - * SC state change - re-assess platform tree - */ - if (re_create_arrays(envmon_fd) != 0) { - /* - * out of memory - make no changes - */ - return; - } - /* - * dropped memory of volatile prop handles - * so drop the nodes also, then rebuild for - * the newly loaded SC - */ - retval = ptree_get_propval_by_name(envmoninfh, - PICL_PROP_PARENT, &nodeh, sizeof (nodeh)); - if (retval != PICL_SUCCESS) { - (void) close(envmon_fd); - return; - } - retval = ptree_get_propval_by_name(envmoninfh, - PICL_PROP_NAME, path, sizeof (path)); - if (retval != PICL_SUCCESS) { - (void) close(envmon_fd); - return; - } - - retval = ptree_delete_node(envmoninfh); - if (retval == PICL_SUCCESS) - (void) ptree_destroy_node(envmoninfh); - retval = ptree_create_node(path, - PICL_CLASS_SERVICE_PROCESSOR, &envmoninfh); - if (retval != PICL_SUCCESS) { - (void) close(envmon_fd); - return; - } - retval = ptree_add_node(nodeh, envmoninfh); - if (retval != PICL_SUCCESS) { - (void) close(envmon_fd); - return; - } - } - - for (fru_type = 0; fru_type < ENVMONTYPES; - fru_type++) { - (void) add_env_nodes(envmon_fd, fru_type, - envmoninfh); - } - - (void) close(envmon_fd); - } - } else if (strcmp(ename, PICL_FRU_REMOVED) == 0) { - retval = nvlist_lookup_uint64((nvlist_t *)earg, - PICLEVENTARG_FRUHANDLE, &childh); - - if (retval != 0) { - syslog(LOG_ERR, EM_EV_MISSING_ARG, - PICLEVENTARG_FRUHANDLE); - return; - } - retval = ptree_get_propval_by_name(childh, PICL_PROP_NAME, - path, sizeof (path)); - if (retval == PICL_SUCCESS) { - retval = ptree_get_prop_by_name(childh, - PICL_PROP_DEVICES, &tableh); - - if (retval != PICL_SUCCESS) { - /* no Devices table, nothing to do */ - return; - } - - /* - * follow all reference properties in the second - * column of the table and delete the referenced node - */ - retval = ptree_get_propval(tableh, &tblh, - sizeof (tblh)); - if (retval != PICL_SUCCESS) { - /* - * can't get value of table property - */ - return; - } - /* get first col, first row */ - retval = ptree_get_next_by_col(tblh, &tblh); - if (retval != PICL_SUCCESS) { - /* - * no rows? - */ - return; - } - /* - * starting at next col, get every entry in the column - */ - for (retval = ptree_get_next_by_row(tblh, &tblh); - retval == PICL_SUCCESS; - retval = ptree_get_next_by_col(tblh, &tblh)) { - /* - * should be a ref prop in our hands, - * get the target node handle - */ - retval = ptree_get_propval(tblh, &nodeh, - sizeof (nodeh)); - if (retval != PICL_SUCCESS) { - continue; - } - /* - * got the referenced node, has it got a - * volatile property to clean up? - */ - retval = ptree_get_first_prop(nodeh, &proph); - while (retval == PICL_SUCCESS) { - retval = ptree_get_propinfo(proph, &pi); - if ((retval == PICL_SUCCESS) && - (pi.piclinfo.accessmode & - PICL_VOLATILE)) - free_vol_prop(proph); - retval = ptree_get_next_prop(proph, - &proph); - } - /* - * all volatile properties gone, remove node - */ - retval = ptree_delete_node(nodeh); - if (retval == PICL_SUCCESS) - (void) ptree_destroy_node(nodeh); - } - } - } -} - -/* - * executed as part of .init when the plugin is dlopen()ed - */ -static void -piclenvmon_register(void) -{ - (void) picld_plugin_register(&my_reg_info); -} - -/* - * Init entry point of the plugin - * Creates the PICL nodes and properties in the physical and logical aspects. - */ -static void -piclenvmon_init(void) -{ - picl_nodehdl_t rooth; - picl_nodehdl_t plfh; - picl_nodehdl_t envmoninfh; - int res; - int envmon_fd; - int fru_type; - char pathname[PATH_MAX]; - - /* - * locate and parse config file - */ - if (get_config_file(pathname) < 0) - return; - - if ((ptree_get_root(&rooth) != PICL_SUCCESS) || - (picld_pluginutil_parse_config_file(rooth, pathname) != - PICL_SUCCESS)) { - syslog(LOG_ERR, EM_INIT_FAILED); - } - - /* - * Get platform node - */ - if (ptree_get_node_by_path(PICL_NODE_ROOT PICL_NODE_PLATFORM, &plfh) - != PICL_SUCCESS) { - syslog(LOG_ERR, EM_MISSING_NODE, PICL_NODE_PLATFORM); - syslog(LOG_ERR, EM_INIT_FAILED); - return; - } - - /* - * Get service-processor node - */ - if (get_envmon_node(&envmoninfh) != PICL_SUCCESS) - return; - - /* - * We may have been restarted, make sure we don't leak - */ - if (envmon_device_name != NULL) { - free(envmon_device_name); - } - - if ((envmon_device_name = create_envmon_pathname(envmoninfh)) == NULL) - return; - - /* - * Open envmon device and interrogate for devices it monitors - */ - if ((envmon_fd = open(envmon_device_name, O_RDONLY)) < 0) { - syslog(LOG_ERR, EM_SYS_ERR, envmon_device_name, - strerror(errno)); - return; - } - - if (get_envmon_limits(envmon_fd, &env_limits) < 0) - return; - - /* - * A set of arrays are used whose bounds are determined by the - * response to get_envmon_limits. Establish these arrays now. - */ - create_arrays(); - setup_strings(); - - for (fru_type = 0; fru_type < ENVMONTYPES; fru_type++) { - (void) add_env_nodes(envmon_fd, fru_type, envmoninfh); - } - - (void) close(envmon_fd); - - res = ptree_register_handler(PICL_FRU_ADDED, envmon_evhandler, NULL); - if (res != PICL_SUCCESS) { - syslog(LOG_ERR, EM_EVREG_FAILED, res); - } - res = ptree_register_handler(PICL_FRU_REMOVED, envmon_evhandler, NULL); - if (res != PICL_SUCCESS) { - syslog(LOG_ERR, EM_EVREG_FAILED, res); - } -} - -/* - * fini entry point of the plugin - */ -static void -piclenvmon_fini(void) -{ - if (envmon_device_name != NULL) { - free(envmon_device_name); - envmon_device_name = NULL; - } - (void) ptree_unregister_handler(PICL_FRU_ADDED, - envmon_evhandler, NULL); - (void) ptree_unregister_handler(PICL_FRU_REMOVED, - envmon_evhandler, NULL); -} diff --git a/usr/src/cmd/picl/plugins/sun4u/envmon/piclenvmon.h b/usr/src/cmd/picl/plugins/sun4u/envmon/piclenvmon.h deleted file mode 100644 index 86c07f486e..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/envmon/piclenvmon.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 (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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 _PICLENVMON_H -#define _PICLENVMON_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Log message texts - */ -#define EM_INIT_FAILED gettext("SUNW_piclenvmon: init failed!") -#define EM_MISSING_NODE gettext("SUNW_piclenvmon: no %s node!") -#define EM_SC_NODE_INCOMPLETE \ - gettext("SUNW_piclenvmon: SC node devfs-path property missing") -#define EM_SC_NODE_MISSING \ - gettext("SUNW_piclenvmon: failed to locate SC device node") -#define EM_EVREG_FAILED \ - gettext("SUNW_piclenvmon: failed to register for events %x") -#define EM_NODE_ACCESS \ - gettext("SUNW_piclenvmon: couldn't access \"%s\", " \ - "type %d, PICL err %d") -#define EM_SYS_ERR gettext("SUNW_piclenvmon: %s: %s") -#define EM_EV_MISSING_ARG \ - gettext("SUNW_piclenvmon: missing %s in ADD_FRU/REMOVE_FRU event") -#define EM_INVALID_COLOR \ - gettext("SUNW_piclenvmon: invalid LED color 0x%x returned for %s") - -/* - * define for super-user uid - used in credential checking - */ -#define SUPER_USER ((uid_t)0) - -/* - * Constants for distinquishing environmental monitor types - */ -#define ENVMON_VOLT_SENS 0 -#define ENVMON_VOLT_IND 1 -#define ENVMON_AMP_SENS 2 -#define ENVMON_AMP_IND 3 -#define ENVMON_TEMP_SENS 4 -#define ENVMON_TEMP_IND 5 -#define ENVMON_FAN_SENS 6 -#define ENVMON_FAN_IND 7 -#define ENVMON_LED_IND 8 -#define ENVMON_KEY_SWITCH 9 -#define ENVMON_CHASSIS 10 - -/* - * ENVMONTYPES is the total of all the environmental monitor types. Needs - * to be incrementee everytime a new type is added. - */ -#define ENVMONTYPES 11 - -/* - * number of key-switches supported - */ -#define N_KEY_SWITCHES 1 - -/* - * nomenclature names used to identify LED significance - */ -#define LED_ACT "ACT" -#define LED_SERVICE "SERVICE" -#define LED_OK2RM "OK2RM" -#define LED_LOCATE "LOCATE" - -#define KEYSWITCH_NAME "keyswitch" -#define CHASSIS_SERIAL_NUMBER "chassis_serial_number" - -/* - * Config file name - */ -#define ENVMON_CONFFILE_NAME "piclenvmon.conf" - -typedef int (*ptree_vol_rdfunc_t)(ptree_rarg_t *arg, void *buf); -typedef int (*ptree_vol_wrfunc_t)(ptree_warg_t *arg, const void *buf); - -typedef struct node_el { - picl_nodehdl_t nodeh; - struct node_el *next; -} node_el_t; - -typedef struct node_list { - node_el_t *head; - node_el_t *tail; -} node_list_t; - -/* - * index entry for looking up sensor handle - */ -typedef struct { - int maxnum; /* number of entries in handles array */ - int num; /* number of entries in being used */ - uchar_t *fru_types; - envmon_handle_t *envhandles; - picl_prophdl_t *piclprhdls; -} handle_array_t; - -#ifdef __cplusplus -} -#endif - -#endif /* _PICLENVMON_H */ diff --git a/usr/src/cmd/picl/plugins/sun4u/excalibur/Makefile b/usr/src/cmd/picl/plugins/sun4u/excalibur/Makefile deleted file mode 100644 index 94c563547e..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/excalibur/Makefile +++ /dev/null @@ -1,51 +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 -# -# -#ident "%Z%%M% %I% %E% SMI" -# -# Copyright (c) 1999-2000 by Sun Microsystems, Inc. -# All rights reserved. -# -# cmd/picl/plugins/sun4u/excalibur/Makefile -# - -SUBDIRS= frudata envd frutree - - -MSGSUBDIRS= envd - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -.KEEP_STATE: - -all install clean clobber: $(SUBDIRS) - -_msg: $(MSGSUBDIRS) - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/excalibur/envd/Makefile b/usr/src/cmd/picl/plugins/sun4u/excalibur/envd/Makefile deleted file mode 100644 index 40b8a88f59..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/excalibur/envd/Makefile +++ /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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# - -include $(SRC)/Makefile.psm - -LIBRARY= libpiclenvd.a -VERS= .1 - -OBJECTS= piclenvd.o piclenvsetup.o - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Blade-1000 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -CPPFLAGS += -D_POSIX_PTHREAD_SEMANTICS -CPPFLAGS += -I$(SRC)/uts/sun4u/ -I$(SRC)/uts/common/ -CPPFLAGS += -I$(SRC)/uts/sun4u/excalibur -CPPFLAGS += -I$(SRC)/cmd/picl/plugins/lib/picld_pluginutil - -SRCS= $(OBJECTS:%.o=%.c) - -LIBS = $(DYNLIB) - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONF= envmodel.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 -INFOS= envmodel.info - - -DYNFLAGS += -R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins -LDLIBS += -L$(SRC)/lib/libpicltree/$(MACH) -LDLIBS += -L$(SRC)/cmd/picl/plugins/common/devtree -LDLIBS += -L$(SRC)/cmd/picl/plugins/lib/picld_pluginutil/$(MACH) -LDLIBS += -L$(ROOT)/usr/lib/picl/plugins -lpicldevtree -lpicltree -LDLIBS += -lpicld_pluginutil -LDLIBS += -ldevinfo -lc - -.KEEP_STATE: - -SUBDIRS= - -POFILE = piclenvd_excalibur.po -POFILES = $(SRCS:%.c=%.po) - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -all: $(LIBS) $(LIBLINKS) - -install: $(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) $(ROOTCONF) - -$(CONF): $(INFOS) - $(RM) $@ - $(CPP) envmodel.info > $@ - - -$(POFILE): $(POFILES) - $(CAT) $(POFILES) > $(POFILE) - -_msg: $(MSGDOMAIN) $(POFILE) - $(RM) $(MSGDOMAIN)/$(POFILE) - $(CP) $(POFILE) $(MSGDOMAIN)/$(POFILE) - -$(MSGDOMAIN): - $(INS.dir) - - -$(LIBLINKS): FRC - $(RM) $@; $(SYMLINK) $(DYNLIB) $@ - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/excalibur/envd/envd.h b/usr/src/cmd/picl/plugins/sun4u/excalibur/envd/envd.h deleted file mode 100644 index 3efb4fd8ed..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/excalibur/envd/envd.h +++ /dev/null @@ -1,446 +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 2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _ENVD_H -#define _ENVD_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#define SENSOR_POLL_INTERVAL 4 /* in seconds */ -#define WARNING_INTERVAL 30 /* in seconds */ -#define WARNING_DURATION 28 /* in seconds */ -#define SHUTDOWN_INTERVAL 60 /* in seconds */ -#define ENV_CONF_FILE "piclenvd.conf" -#define PM_DEVICE "/dev/pm" -#define SHUTDOWN_CMD "/usr/sbin/shutdown -y -g 60 -i 5" -#define ENVMODEL_CONF_FILE "envmodel.conf" - -/* - * Macros to fetch 16 and 32 bit data from unaligned address - */ -#define GET_UNALIGN16(addr) \ - (((*(uint8_t *)addr) << 8) | *((uint8_t *)addr+1)) - -#define GET_UNALIGN32(addr) \ - (((*(uint8_t *)addr) << 24) | (*((uint8_t *)addr+1) << 16) | \ - ((*((uint8_t *)addr+2)) << 8) | (*((uint8_t *)addr+3))) - - -/* - * SEEPROM section header layout and location - */ -typedef struct { - uint8_t header_tag; /* section header tag */ - uint8_t header_version[2]; /* header version (msb) */ - uint8_t header_length; /* header length */ - uint8_t header_crc8; /* crc8 */ - uint8_t segment_count; /* total number of segments */ -} section_layout_t; - -#define SECTION_HDR_OFFSET 0x1800 -#define SECTION_HDR_TAG 0x08 -#define SECTION_HDR_VER 0x0001 -#define SECTION_HDR_LENGTH 0x06 - - -/* - * SEEPROM segment header layout - */ -typedef struct { - uint16_t name; /* segment name */ - uint16_t descriptor[2]; /* descriptor (msb) */ - uint16_t offset; /* segment data offset */ - uint16_t length; /* segment length */ -} segment_layout_t; - -#define ENVSEG_NAME 0x4553 /* environmental segment name */ -#define ENVSEG_VERSION 1 /* environmental segment version */ - - -/* - * SEEPROM environmental segment header layout - */ -typedef struct { - uint16_t sensor_id[2]; /* unique sensor ID (on this FRU) */ - uint16_t offset; /* sensor data record offset */ -} envseg_sensor_t; - -typedef struct { - uint8_t version; /* envseg version */ - uint8_t sensor_count; /* total number of sensor records */ - envseg_sensor_t sensors[1]; /* sensor table (variable length) */ -} envseg_layout_t; - - -/* - * SEEPROM environmental segment sensor data layout - */ -#define MAX_POLICY_ENTRIES 6 /* max # policy data entries */ - -typedef struct { - int8_t observed; /* observed (measured) temperature */ - int8_t expected; /* expected (correct) temperature */ -} envseg_map_t; - -typedef struct { - int8_t high_power_off; /* high power off threshold */ - int8_t high_shutdown; /* high shutdown threshold */ - int8_t high_warning; /* high warning threshold */ - int8_t low_warning; /* low warning threshold */ - int8_t low_shutdown; /* low shutdown threshold */ - int8_t low_power_off; /* low power off threshold */ - int8_t policy_type; /* policy type */ - int8_t policy_entries; /* #valid entries in policy_data[] */ - int8_t policy_data[MAX_POLICY_ENTRIES]; - uint16_t obs2exp_cnt; /* map entries count */ - envseg_map_t obs2exp_map[1]; /* variable length map table */ -} envseg_sensor_data_t; - -/* policy_type */ -#define POLICY_TARGET_TEMP 1 -#define POLICY_LINEAR 2 - -/* linear policy data indices */ -#define LOW_NOMINAL_LOC 0 /* linear policy: lower temp index */ -#define HIGH_NOMINAL_LOC 1 /* linear policy: higher temp index */ - - -/* - * FRU envseg list - */ -typedef struct fruenvseg { - struct fruenvseg *next; /* next entry */ - char *fru; /* FRU SEEPROM path */ - void *envsegbufp; /* envseg data buffer */ - int envseglen; /* envseg length */ -} fruenvseg_t; - - -/* - * devfs-path and sensor IDs for CPU FRUs - */ -#define CPU0_FRU_DEVFS "/pci@8,700000/ebus@5/i2c@1,30/cpu-fru@0,a0:cpu-fru" -#define CPU1_FRU_DEVFS "/pci@8,700000/ebus@5/i2c@1,30/cpu-fru@0,a2:cpu-fru" - -#define CPU_FRU_AMB_SENSOR 1 -#define CPU_FRU_DIE_SENSOR 2 - -/* - * devfs-path for various fans and their min/max speeds - */ -#define ENV_CPU_FAN_DEVFS \ - "/pci@8,700000/ebus@5/i2c@1,30/fan-control@0,48:2" -#define ENV_SYSTEM_FAN_DEVFS \ - "/pci@8,700000/ebus@5/i2c@1,30/fan-control@0,48:0" -#define ENV_PSUPPLY_FAN_DEVFS \ - "/pci@8,700000/ebus@5/i2c@1,30/fan-control@0,48:4" - -/* - * devfs-path for xcalwd watchdog - */ -#define XCALWD_DEVFS "/devices/pseudo/xcalwd@0:xcalwd" - -#define CPU_FAN_SPEED_MIN 12 -#define CPU_FAN_SPEED_MAX 63 - -#define SYSTEM_FAN_SPEED_MIN 12 -#define SYSTEM_FAN_SPEED_MAX 63 - -#define PSUPPLY_FAN_SPEED_MIN 0 -#define PSUPPLY_FAN_SPEED_MAX 31 - - -/* - * devfs-path for various temperature sensors and CPU platform path - */ -#define CPU0_DIE_SENSOR_DEVFS \ - "/pci@8,700000/ebus@5/i2c@1,30/temperature@0,30:die_temp" -#define CPU0_AMB_SENSOR_DEVFS \ - "/pci@8,700000/ebus@5/i2c@1,30/temperature@0,30:amb_temp" - -#define CPU1_DIE_SENSOR_DEVFS \ - "/pci@8,700000/ebus@5/i2c@1,30/temperature@0,98:die_temp" -#define CPU1_AMB_SENSOR_DEVFS \ - "/pci@8,700000/ebus@5/i2c@1,30/temperature@0,98:amb_temp" - -/* - * Temperature thresholds structure - */ -typedef int16_t tempr_t; - -typedef struct { - tempr_t low_power_off; /* low power-off temperature */ - tempr_t high_power_off; /* high power-off temperature */ - tempr_t low_shutdown; /* low shutdown temperature */ - tempr_t high_shutdown; /* high shutdown temperature */ - tempr_t low_warning; /* low warning temperature */ - tempr_t high_warning; /* high warning temperature */ - tempr_t min_limit; /* sensor minimum temperature limit */ - tempr_t max_limit; /* sensor maximum temperature limit */ - short policy_type; /* temperature policy */ - short policy_entries; /* # entries in policy_data */ - tempr_t policy_data[MAX_POLICY_ENTRIES]; -} sensor_thresh_t; - - - -#define TEMP_IN_SHUTDOWN_RANGE(val, threshp) \ - ((val) > (threshp)->high_shutdown || (val) < (threshp)->low_shutdown) - -#define TEMP_IN_WARNING_RANGE(val, threshp) \ - ((val) > (threshp)->high_warning || (val) < (threshp)->low_warning) - - -/* - * MAX1617 sensor min/max temperature limits - */ -#define MAX1617_MIN_TEMP -65 -#define MAX1617_MAX_TEMP 127 - -/* - * CPU "die" temperature thresholds - */ -#define CPU_DIE_HIGH_POWER_OFF 110 -#define CPU_DIE_HIGH_SHUTDOWN 90 -#define CPU_DIE_HIGH_WARNING 88 -#define CPU_DIE_NORMAL_TARGET 80 -#define CPU_DIE_OTHER_TARGET 65 -#define CPU_DIE_LOW_WARNING 0 -#define CPU_DIE_LOW_SHUTDOWN -10 -#define CPU_DIE_LOW_POWER_OFF -20 - -/* - * CPU ambient temperature thresholds - */ -#define CPU_AMB_HIGH_POWER_OFF 70 -#define CPU_AMB_HIGH_SHUTDOWN 60 -#define CPU_AMB_HIGH_WARNING 40 -#define CPU_AMB_HIGH_NOMINAL 40 -#define CPU_AMB_LOW_NOMINAL 25 -#define CPU_AMB_LOW_WARNING 0 -#define CPU_AMB_LOW_SHUTDOWN -10 -#define CPU_AMB_LOW_POWER_OFF -20 - - -/* - * Fan names - */ -#define ENV_SYSTEM_FAN "system" -#define ENV_CPU_FAN "cpu" -#define ENV_PSUPPLY_FAN "power-supply" - -/* - * Sensor ids & names - */ -#define SENSOR_CPU0_ID 0 -#define SENSOR_CPU0_DIE "cpu0" -#define SENSOR_CPU0_AMB "cpu0-ambient" -#define SENSOR_CPU1_ID 1 -#define SENSOR_CPU1_DIE "cpu1" -#define SENSOR_CPU1_AMB "cpu1-ambient" - -/* - * Temperature correction/map strucutre - */ -typedef struct { - tempr_t observed; /* observed temperature */ - tempr_t expected; /* expected temperature */ -} tempr_map_t; - -/* - * Temperature sensor related data structure - */ -typedef struct sensor_pmdev sensor_pmdev_t; - -typedef struct env_sensor { - char *name; /* sensor name */ - char *devfs_path; /* sensor device devfs path */ - sensor_thresh_t *temp_thresh; /* sensor temp threshold */ - char *fru; /* FRU seeprom pathname */ - int fru_sensor; /* FRU sensor ID */ - int flags; /* flags (see below) */ - int fd; /* device file descriptor */ - int error; /* error flag */ - boolean_t present; /* sensor present */ - tempr_t cur_temp; /* current temperature */ - tempr_t target_temp; /* target temperature */ - float avg_temp; /* average temperature */ - float prev_avg_temp; /* prev average temperature */ - time_t warning_tstamp; /* last warning time (secs) */ - time_t shutdown_tstamp; /* shutdown temp time (secs) */ - boolean_t shutdown_initiated; /* shutdown initated */ - sensor_pmdev_t *pmdevp; /* power managed device info */ - float fan_adjustment_rate; /* fan adjustment rate */ - uint_t obs2exp_cnt; /* # mapping entries */ - tempr_map_t *obs2exp_map; /* temperature map entries */ - time_t warning_start; /* warning start time (secs) */ -} env_sensor_t; - -/* - * Sensor flags - */ -#define SFLAG_TARGET_TEMP 0x01 /* track target temperature */ -#define SFLAG_CPU_AMB_SENSOR 0x10 /* CPU ambient sensor */ -#define SFLAG_CPU_DIE_SENSOR 0x20 /* CPU die snesor */ - -extern env_sensor_t *sensor_lookup(char *sensor_name); -extern int get_temperature(env_sensor_t *, tempr_t *); - -/* - * Fan information data structure - */ -#define SENSORS_PER_FAN 8 /* max sensors per fan */ -typedef uint8_t fanspeed_t; - -typedef struct env_fan { - char *name; /* fan name */ - char *devfs_path; /* fan device devfs path */ - fanspeed_t speed_min; /* minimum speed */ - fanspeed_t speed_max; /* maximum speed */ - int forced_speed; /* forced (fixed) speed */ - int fd; /* device file descriptor */ - boolean_t present; /* fan present */ - float cur_speed; /* current fan speed */ - float prev_speed; /* previous fan speed */ - int sensor_cnt; /* #sensors in sensors[] */ - env_sensor_t *sensors[SENSORS_PER_FAN]; /* array of sensors */ -} env_fan_t; - -/* - * LPM/Table data structures - */ -#define LPM_RANGES_PROPERTY "sunw,lpm-ranges" - -typedef struct { - int32_t x; - int32_t y; -} point_t; - -typedef struct { - int nentries; - point_t *xymap; -} table_t; - -struct lpm_dev { - picl_nodehdl_t nodeh; - table_t *temp_lpm_tbl; - struct lpm_dev *next; -}; -typedef struct lpm_dev lpm_dev_t; - -extern env_fan_t *fan_lookup(char *fan_name); -extern int get_fan_speed(env_fan_t *, fanspeed_t *); - -extern int env_debug; -extern void envd_log(int pri, const char *fmt, ...); - -/* - * Various messages - */ -#define ENVD_PLUGIN_INIT_FAILED \ - gettext("SUNW_piclenvd: initialization failed!\n") - -#define ENVD_PICL_SETUP_FAILED \ - gettext("SUNW_piclenvd: PICL setup failed!\n") - -#define PM_THREAD_CREATE_FAILED \ - gettext("SUNW_piclenvd: pmthr thread creation failed!\n") - -#define PM_THREAD_EXITING \ - gettext("SUNW_piclenvd: pmthr exiting! errno:%d %s\n") - -#define ENV_THREAD_CREATE_FAILED \ - gettext("SUNW_piclenvd: envthr thread creation failed!\n") - -#define ENV_SHUTDOWN_MSG \ - gettext("SUNW_piclenvd: '%s' sensor temperature %d outside safe " \ - "limits (%d...%d). Shutting down the system.\n") - -#define ENV_WARNING_MSG \ - gettext("SUNW_piclenvd: '%s' sensor temperature %d outside safe " \ - "operating limits (%d...%d).\n") - -#define ENV_WATCHDOG_INIT_FAIL \ - gettext("SUNW_piclenvd: failed to initialize the watchdog timer " \ - "errno:%d %s\n") - -#define ENV_FAN_OPEN_FAIL \ - gettext("SUNW_piclenvd: can't open '%s' fan path:%s errno:%d %s\n") - -#define ENV_SENSOR_OPEN_FAIL \ - gettext("SUNW_piclenvd: can't open '%s' sensor path:%s errno:%d %s\n") - -#define ENV_SENSOR_ACCESS_FAIL \ - gettext("SUNW_piclenvd: can't access '%s' sensor errno:%d %s\n") - -#define ENV_SENSOR_ACCESS_OK \ - gettext("SUNW_piclenvd: '%s' sensor is accessible now.\n") - -#define ENV_CONF_INT_EXPECTED \ - gettext("SUNW_piclenvd: file:%s line:%d Invalid syntax or integer " \ - "value outside range for keyword '%s'.\n") - -#define ENV_CONF_STRING_EXPECTED \ - gettext("SUNW_piclenvd: file:%s line:%d Invalid syntax for keyword " \ - "'%s'. Expecting string in double quotes (length < %d).\n") - -#define ENV_CONF_UNSUPPORTED_TYPE \ - gettext("SUNW_piclenvd: file:%s line:%d Unsupported type:%d for " \ - "keyword '%s'.\n") - -#define ENV_CONF_UNSUPPORTED_KEYWORD \ - gettext("SUNW_piclenvd: file:%s line:%d Unsupported keyword '%s'.\n") - -#define ENV_FRU_OPEN_FAIL \ - gettext("SUNW_piclenvd: can't open FRU SEEPROM path:%s errno:%d %s\n") - -#define ENV_FRU_BAD_ENVSEG \ - gettext("SUNW_piclenvd: version mismatch or environmental segment " \ - "header too short in FRU SEEPROM %s\n") - -#define ENV_FRU_BAD_SENSOR_ENTRY \ - gettext("SUNW_piclenvd: discarding bad sensor entry (sensor_id " \ - "%x sensor '%s') in FRU SEEPROM %s\n") - -#define ENV_FRU_SENSOR_MAP_NOMEM \ - gettext("SUNW_piclenvd: out of memory, discarding sensor map for " \ - "sensor_id %x (sensor '%s') in FRU SEEPROM %s\n") - -#define ENV_INVALID_PROPERTY_FORMAT \ - gettext("SUNW_piclenvd: ignoring %s property (invalid format)") - -#ifdef __cplusplus -} -#endif - -#endif /* _ENVD_H */ diff --git a/usr/src/cmd/picl/plugins/sun4u/excalibur/envd/envmodel.info b/usr/src/cmd/picl/plugins/sun4u/excalibur/envd/envmodel.info deleted file mode 100644 index 8add7899fc..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/excalibur/envd/envmodel.info +++ /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, 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 (c) 1999-2001 by Sun Microsystems, Inc. - * All rights reserved. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -VERSION 1.1 - -_class:/gptwo/cpu?ID=0 - -TABLE Environment -ROW -PROP Class string r 0 "temperature-sensor" -REFPROP _temperature-sensor_ /platform/pci/ebus/i2c?UnitAddress=1,30/temperature?UnitAddress=0,30/cpu0 -ENDROW - -ROW -PROP Class string r 0 "temperature-sensor" -REFPROP _temperature-sensor_ /platform/pci/ebus/i2c?UnitAddress=1,30/temperature?UnitAddress=0,30/cpu0-ambient -ENDROW - -ROW -PROP Class string r 0 "fan" -REFPROP _fan_ /platform/pci/ebus/i2c?UnitAddress=1,30/fan-control/cpu -ENDROW -ENDTABLE - -_class:/gptwo/cpu?ID=1 - -TABLE Environment -ROW -PROP Class string r 0 "temperature-sensor" -REFPROP _temperature-sensor_ /platform/pci/ebus/i2c?UnitAddress=1,30/temperature?UnitAddress=0,98/cpu1 -ENDROW - -ROW -PROP Class string r 0 "temperature-sensor" -REFPROP _temperature-sensor_ /platform/pci/ebus/i2c?UnitAddress=1,30/temperature?UnitAddress=0,98/cpu1-ambient -ENDROW - -ROW -PROP Class string r 0 "fan" -REFPROP _fan_ /platform/pci/ebus/i2c?UnitAddress=1,30/fan-control/cpu -ENDROW -ENDTABLE - -name:/platform/pci/ebus/i2c?UnitAddress=1,30/temperature?UnitAddress=0,30/cpu0 - -PROP Label string r 0 "Die" - -name:/platform/pci/ebus/i2c?UnitAddress=1,30/temperature?UnitAddress=0,30/cpu0-ambient - -PROP Label string r 0 "Ambient" - -name:/platform/pci/ebus/i2c?UnitAddress=1,30/temperature?UnitAddress=0,98/cpu1 - -PROP Label string r 0 "Die" - -name:/platform/pci/ebus/i2c?UnitAddress=1,30/temperature?UnitAddress=0,98/cpu1-ambient - -PROP Label string r 0 "Ambient" - - - - - diff --git a/usr/src/cmd/picl/plugins/sun4u/excalibur/envd/piclenvd.c b/usr/src/cmd/picl/plugins/sun4u/excalibur/envd/piclenvd.c deleted file mode 100644 index 233f15595b..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/excalibur/envd/piclenvd.c +++ /dev/null @@ -1,2843 +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" - -/* - * This file contains the environmental PICL plug-in module. - */ - - -/* - * Excalibur system contains up to two CPU and two PCI MAX1617 temperature - * devices, each consisting of two sensors: die and ambient. Each sensor is - * represented as a different minor device and the current temperature is read - * via an I2C_GET_TEMPERATURE ioctl call to the max1617 driver. Additionally, - * the MAX1617 device supports both a low and high temperature limit, which - * can trigger an alert condition, causing power supply to turn off. - * - * The environmental monitor defines the following thresholds per sensor: - * - * high_power_off high hard shutdown - * high_shutdown high soft shutdown limit - * high_warning high warning limit - * low_warning low warning limit - * low_shutdown low soft shutdown limit - * low_power_off low hard shutdown limit - * - * Above mentioned threshold values can be changed via "piclenvd.conf" - * configuration file. - * - * Environmental monitoring is done by the "envthr" thread. It periodically - * monitors both CPU die and CPU ambient temperatures and takes appropriate - * action depending upon the current temperature and threshold values for - * that sensor. If the temperature reaches the high_shutdown limit or the - * low_shutdown limit, and remains there for over shutdown_interval seconds, - * it forces a graceful system shutdown via tuneable shutdown_cmd string - * variable. Otherwise, if the temperature reaches the high_warning limit - * or the low_warning limit, it logs and prints a message on the console. - * This message will be printed at most at "warning_interval" seconds - * interval, which is also a tuneable variable. - * - * Excalibur system contains three fans: cpu, system and power supply. The - * cpu and system fans are under software control and their speed can be - * set to a value in the range 0 through 63. However, the software has no - * control over the power supply fan's speed (it's automatically controlled - * by the hardware), but it can turn it ON or OFF. When in EStar mode (i.e. - * the lowest power state), the environmental monitor turns off the power - * supply fan. - * - * Each fan is represented as a different minor device and the fan speed - * can be controlled by writing to the TDA8444 device driver. Note that - * these devices are read only and the driver caches the last speed set - * for each fan, thus allowing an interface to read the current fan speed - * also. - * - * The policy to control fan speed depends upon the sensor. For CPU die - * sensor, different policy is used depending upon whether the temperature - * is rising, falling or steady state. In case of CPU ambient sensor, only - * one policy (speed proportional to the current temperature) is used. - * - * The power state monitoring is done by the "pmthr" thread. It uses the - * PM_GET_STATE_CHANGE and PM_GET_STATE_CHANGE_WAIT ioctl commands to pick - * up any power state change events. It processes all queued power state - * change events and determines the curret lowest power state and saves it - * in cur_lpstate variable. - * - * Once the "envthr" and "pmthr" threads have been started, they are never - * killed. This is desirable so that we can do environmental monitoring - * during reinit process. The "envd_rwlock" reader/writer lock is used - * to protect initialization of global state during reinit process against - * the "envthr" and "pmthr" trying to reference that state. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "envd.h" - -static pthread_rwlock_t envd_rwlock = PTHREAD_RWLOCK_INITIALIZER; - -/* - * PICL plguin - */ -static void piclenvd_register(void); -static void piclenvd_init(void); -static void piclenvd_fini(void); -extern void env_picl_setup(void); -extern void env_picl_destroy(void); - -#pragma init(piclenvd_register) - -static picld_plugin_reg_t my_reg_info = { - PICLD_PLUGIN_VERSION_1, - PICLD_PLUGIN_CRITICAL, - "SUNW_piclenvd", - piclenvd_init, - piclenvd_fini, -}; - - -/* - * Default threshold values for CPU junction/die and ambient sensors - */ -static sensor_thresh_t cpu_die_thresh_default = { - CPU_DIE_LOW_POWER_OFF, CPU_DIE_HIGH_POWER_OFF, - CPU_DIE_LOW_SHUTDOWN, CPU_DIE_HIGH_SHUTDOWN, - CPU_DIE_LOW_WARNING, CPU_DIE_HIGH_WARNING, - MAX1617_MIN_TEMP, MAX1617_MAX_TEMP, - POLICY_TARGET_TEMP, 2, - CPU_DIE_NORMAL_TARGET, CPU_DIE_OTHER_TARGET, - 0, 0, 0, 0 -}; - -static sensor_thresh_t cpu_amb_thresh_default = { - CPU_AMB_LOW_POWER_OFF, CPU_AMB_HIGH_POWER_OFF, - CPU_AMB_LOW_SHUTDOWN, CPU_AMB_HIGH_SHUTDOWN, - CPU_AMB_LOW_WARNING, CPU_AMB_HIGH_WARNING, - MAX1617_MIN_TEMP, MAX1617_MAX_TEMP, - POLICY_LINEAR, 2, - CPU_AMB_LOW_NOMINAL, CPU_AMB_HIGH_NOMINAL, - 0, 0, 0, 0 -}; - - -/* - * Dummy sensor threshold data structure for processing threshold tuneables - */ -static sensor_thresh_t dummy_thresh; - -/* - * Temperature related constants for fan speed adjustment - */ -#define AVG_TEMP_HYSTERESIS 0.25 -#define RISING_TEMP_MARGIN 6 -#define FALLING_TEMP_MARGIN 3 - -/* - * tuneable variables - */ -#define FAN_SLOW_ADJUSTMENT 20 /* in percentage */ -#define FAN_INCREMENT_LIMIT 6 /* absolute value */ -#define FAN_DECREMENT_LIMIT 1 /* absolute value */ -#define DEVFSADM_CMD "/usr/sbin/devfsadm -i max1617" -#define FRU_DEVFSADM_CMD "/usr/sbin/devfsadm -i seeprom" - -int env_debug; -static int sensor_poll_interval; -static int warning_interval; -static int warning_duration; -static int shutdown_interval; -static int fan_slow_adjustment; -static int fan_incr_limit; -static int fan_decr_limit; -static int disable_piclenvd; -static int disable_warning; -static int disable_power_off; -static int disable_shutdown; - -static char shutdown_cmd[128]; -static char devfsadm_cmd[128]; -static char fru_devfsadm_cmd[128]; -static sensor_thresh_t cpu0_die_thresh, cpu0_amb_thresh; -static sensor_thresh_t cpu1_die_thresh, cpu1_amb_thresh; - -/* - * Temperature sensors - */ - -static env_sensor_t envd_sensors[] = { - { SENSOR_CPU0_DIE, CPU0_DIE_SENSOR_DEVFS, &cpu0_die_thresh, - CPU0_FRU_DEVFS, CPU_FRU_DIE_SENSOR, - SFLAG_TARGET_TEMP | SFLAG_CPU_DIE_SENSOR, -1}, - { SENSOR_CPU0_AMB, CPU0_AMB_SENSOR_DEVFS, &cpu0_amb_thresh, - CPU0_FRU_DEVFS, CPU_FRU_AMB_SENSOR, SFLAG_CPU_AMB_SENSOR, -1}, - { SENSOR_CPU1_DIE, CPU1_DIE_SENSOR_DEVFS, &cpu1_die_thresh, - CPU1_FRU_DEVFS, CPU_FRU_DIE_SENSOR, - SFLAG_TARGET_TEMP | SFLAG_CPU_DIE_SENSOR, -1}, - { SENSOR_CPU1_AMB, CPU1_AMB_SENSOR_DEVFS, &cpu1_amb_thresh, - CPU1_FRU_DEVFS, CPU_FRU_AMB_SENSOR, SFLAG_CPU_AMB_SENSOR, -1}, - { NULL, NULL, NULL, NULL, 0, 0, -1} -}; - - -/* - * Fan devices - */ -static env_fan_t envd_system_fan = { - ENV_SYSTEM_FAN, ENV_SYSTEM_FAN_DEVFS, - SYSTEM_FAN_SPEED_MIN, SYSTEM_FAN_SPEED_MAX, -1, -1, -}; - -static env_fan_t envd_cpu_fan = { - ENV_CPU_FAN, ENV_CPU_FAN_DEVFS, - CPU_FAN_SPEED_MIN, CPU_FAN_SPEED_MAX, -1, -1, -}; - -static env_fan_t envd_psupply_fan = { - ENV_PSUPPLY_FAN, ENV_PSUPPLY_FAN_DEVFS, - PSUPPLY_FAN_SPEED_MIN, PSUPPLY_FAN_SPEED_MAX, -1, -1, -}; - -static env_fan_t *envd_fans[] = { - &envd_system_fan, - &envd_cpu_fan, - &envd_psupply_fan, - NULL -}; - -/* - * Linked list of devices advertising lpm-ranges - */ -static lpm_dev_t *lpm_devices = NULL; - -/* - * Excalibur lpm to system-fan speed - * lpm values must be monotonically increasing (avoid divide-by-zero) - */ -static point_t excal_lpm_system_fan_tbl[] = { - /* {lpm, fspeed} */ - {18, 12}, - {25, 20}, - {33, 26}, - {44, 32}, - {51, 39}, - {63, 52}, - {64, 63} -}; - -static table_t lpm_fspeed = { - sizeof (excal_lpm_system_fan_tbl)/ sizeof (point_t), - excal_lpm_system_fan_tbl -}; - -/* - * Sensor to fan map - */ -typedef struct { - char *sensor_name; - char *fan_name; -} sensor_fan_map_t; - -static sensor_fan_map_t sensor_fan_map[] = { - {SENSOR_CPU0_DIE, ENV_CPU_FAN}, - {SENSOR_CPU1_DIE, ENV_CPU_FAN}, - {SENSOR_CPU0_AMB, ENV_SYSTEM_FAN}, - {SENSOR_CPU1_AMB, ENV_SYSTEM_FAN}, - {NULL, NULL} -}; - -/* - * Sensor to PM device map - */ -struct sensor_pmdev { - int sensor_id; - char *sensor_name; - char *pmdev_name; - char *speed_comp_name; - int speed_comp; - int full_power; - int cur_power; - env_sensor_t *sensorp; - sensor_pmdev_t *next; -}; - -#define SPEED_COMPONENT_NAME "CPU Speed" - -static sensor_pmdev_t sensor_pmdevs[] = { - {SENSOR_CPU0_ID, SENSOR_CPU0_DIE, NULL, SPEED_COMPONENT_NAME}, - {SENSOR_CPU1_ID, SENSOR_CPU1_DIE, NULL, SPEED_COMPONENT_NAME}, - {-1, NULL, NULL, NULL} -}; - -/* - * Environmental thread variables - */ -static boolean_t system_shutdown_started = B_FALSE; -static boolean_t envthr_created = B_FALSE; /* envthr created */ -static pthread_t envthr_tid; /* envthr thread ID */ -static pthread_attr_t thr_attr; - -/* - * Power management thread (pmthr) variables - */ -static boolean_t pmdev_names_init = B_FALSE; -static pthread_t pmthr_tid; /* pmthr thread ID */ -static int pmthr_exists = B_FALSE; /* pmthr exists */ -static int pm_fd = -1; /* PM device file descriptor */ -static int cur_lpstate; /* cur low power state */ - -/* - * Miscellaneous variables and declarations - */ -static int fru_devfsadm_invoked = 0; -static int devfsadm_invoked = 0; -static char tokdel[] = " \t\n\r"; -static uint_t envd_sleep(uint_t); - -/* - * Tuneable data structure/array and processing functions - */ - -typedef struct { - char *name; /* keyword */ - int (*func)(char *, char *, void *, int, char *, int); - /* tuneable processing function */ - void *arg1; /* tuneable arg1 (memory address) */ - int arg2; /* tuneable arg2 (size or flags) */ -} env_tuneable_t; - -static int process_int_tuneable(char *keyword, char *buf, void *addr, - int size, char *fname, int line); -static int process_string_tuneable(char *keyword, char *buf, void *addr, - int size, char *fname, int line); -static int process_threshold_tuneable(char *keyword, char *buf, void *addr, - int flags, char *fname, int line); -static void process_env_conf_file(void); - -static env_tuneable_t env_tuneables[] = { - {"low_power_off", process_threshold_tuneable, - &dummy_thresh.low_power_off, 0}, - {"low_shutdown", process_threshold_tuneable, - &dummy_thresh.low_shutdown, 0}, - {"low_warning", process_threshold_tuneable, - &dummy_thresh.low_warning, 0}, - {"high_power_off", process_threshold_tuneable, - &dummy_thresh.high_power_off, 0}, - {"high_shutdown", process_threshold_tuneable, - &dummy_thresh.high_shutdown, 0}, - {"high_warning", process_threshold_tuneable, - &dummy_thresh.high_warning, 0}, - {"force_cpu_fan", process_int_tuneable, &envd_cpu_fan.forced_speed, - sizeof (envd_cpu_fan.forced_speed)}, - {"force_system_fan", process_int_tuneable, - &envd_system_fan.forced_speed, - sizeof (envd_system_fan.forced_speed)}, - - {"cpu_amb_low_power_off", process_threshold_tuneable, - &dummy_thresh.low_power_off, SFLAG_CPU_AMB_SENSOR}, - {"cpu_amb_low_shutdown", process_threshold_tuneable, - &dummy_thresh.low_shutdown, SFLAG_CPU_AMB_SENSOR}, - {"cpu_amb_low_warning", process_threshold_tuneable, - &dummy_thresh.low_warning, SFLAG_CPU_AMB_SENSOR}, - {"cpu_amb_low_nominal", process_threshold_tuneable, - &dummy_thresh.policy_data[LOW_NOMINAL_LOC], SFLAG_CPU_AMB_SENSOR}, - {"cpu_amb_high_power_off", process_threshold_tuneable, - &dummy_thresh.high_power_off, SFLAG_CPU_AMB_SENSOR}, - {"cpu_amb_high_shutdown", process_threshold_tuneable, - &dummy_thresh.high_shutdown, SFLAG_CPU_AMB_SENSOR}, - {"cpu_amb_high_warning", process_threshold_tuneable, - &dummy_thresh.high_warning, SFLAG_CPU_AMB_SENSOR}, - {"cpu_amb_high_nominal", process_threshold_tuneable, - &dummy_thresh.policy_data[HIGH_NOMINAL_LOC], SFLAG_CPU_AMB_SENSOR}, - - {"cpu_die_low_power_off", process_threshold_tuneable, - &dummy_thresh.low_power_off, SFLAG_CPU_DIE_SENSOR}, - {"cpu_die_low_shutdown", process_threshold_tuneable, - &dummy_thresh.low_shutdown, SFLAG_CPU_DIE_SENSOR}, - {"cpu_die_low_warning", process_threshold_tuneable, - &dummy_thresh.low_warning, SFLAG_CPU_DIE_SENSOR}, - {"cpu_die_normal_target", process_threshold_tuneable, - &dummy_thresh.policy_data[0], SFLAG_CPU_DIE_SENSOR}, - {"cpu_die_high_power_off", process_threshold_tuneable, - &dummy_thresh.high_power_off, SFLAG_CPU_DIE_SENSOR}, - {"cpu_die_high_shutdown", process_threshold_tuneable, - &dummy_thresh.high_shutdown, SFLAG_CPU_DIE_SENSOR}, - {"cpu_die_high_warning", process_threshold_tuneable, - &dummy_thresh.high_warning, SFLAG_CPU_DIE_SENSOR}, - {"cpu_die_other_target", process_threshold_tuneable, - &dummy_thresh.policy_data[1], SFLAG_CPU_DIE_SENSOR}, - - {"sensor_poll_interval", process_int_tuneable, &sensor_poll_interval, - sizeof (sensor_poll_interval)}, - {"warning_interval", process_int_tuneable, &warning_interval, - sizeof (warning_interval)}, - {"warning_duration", process_int_tuneable, &warning_duration, - sizeof (warning_duration)}, - {"disable_piclenvd", process_int_tuneable, &disable_piclenvd, - sizeof (disable_piclenvd)}, - {"disable_power_off", process_int_tuneable, &disable_power_off, - sizeof (disable_power_off)}, - {"disable_warning", process_int_tuneable, &disable_warning, - sizeof (disable_warning)}, - {"disable_shutdown", process_int_tuneable, &disable_shutdown, - sizeof (disable_shutdown)}, - {"shutdown_interval", process_int_tuneable, &shutdown_interval, - sizeof (shutdown_interval)}, - {"shutdown_cmd", process_string_tuneable, &shutdown_cmd[0], - sizeof (shutdown_cmd)}, - {"devfsadm_cmd", process_string_tuneable, &devfsadm_cmd[0], - sizeof (devfsadm_cmd)}, - {"fru_devfsadm_cmd", process_string_tuneable, &fru_devfsadm_cmd[0], - sizeof (fru_devfsadm_cmd)}, - {"fan_slow_adjustment", process_int_tuneable, &fan_slow_adjustment, - sizeof (fan_slow_adjustment)}, - {"fan_incr_limit", process_int_tuneable, &fan_incr_limit, - sizeof (fan_incr_limit)}, - {"fan_decr_limit", process_int_tuneable, &fan_decr_limit, - sizeof (fan_decr_limit)}, - {"env_debug", process_int_tuneable, &env_debug, sizeof (env_debug)}, - { NULL, NULL, NULL, 0} -}; - -static void -fini_table(table_t *tblp) -{ - if (tblp == NULL) - return; - free(tblp->xymap); - free(tblp); -} - -static table_t * -init_table(int npoints) -{ - table_t *tblp; - point_t *xy; - - if (npoints == 0) - return (NULL); - - if ((tblp = malloc(sizeof (*tblp))) == NULL) - return (NULL); - - if ((xy = malloc(sizeof (*xy) * npoints)) == NULL) { - free(tblp); - return (NULL); - } - - tblp->nentries = npoints; - tblp->xymap = xy; - - return (tblp); -} - -/* - * Temp-LPM Table format: - * temp, lpm, temp, lpm, ... - */ -static table_t * -parse_lpm_ranges(uint32_t *bufp, size_t nbytes) -{ - int nentries; - table_t *tblp = NULL; - int i; - - if (bufp == NULL) - return (NULL); - - /* - * Table should have at least 2 points - * and all points should have x and y values - */ - if ((nbytes < (2 * sizeof (point_t))) || - (nbytes & (sizeof (point_t) - 1))) { - if (env_debug) - envd_log(LOG_ERR, ENV_INVALID_PROPERTY_FORMAT, - LPM_RANGES_PROPERTY); - return (NULL); - } - - /* number of entries in the temp-lpm table */ - nentries = nbytes/sizeof (point_t); - - tblp = init_table(nentries); - if (tblp == NULL) - return (tblp); - - /* copy the tuples */ - tblp->xymap[0].x = (int)*bufp++; - tblp->xymap[0].y = (int)*bufp++; - for (i = 1; i < nentries; ++i) { - tblp->xymap[i].x = (int)*bufp++; - tblp->xymap[i].y = (int)*bufp++; - if (tblp->xymap[i].x <= tblp->xymap[i - 1].x) { - fini_table(tblp); - if (env_debug) - envd_log(LOG_ERR, ENV_INVALID_PROPERTY_FORMAT, - LPM_RANGES_PROPERTY); - return (NULL); - } - } - - return (tblp); -} - -/* - * function: calculates y for a given x based on a table of points - * for monotonically increasing x values. - * 'tbl' specifies the table to use, 'val' specifies the 'x', returns 'y' - */ -static int -y_of_x(table_t *tbl, int xval) -{ - int i; - int entries; - point_t *xymap; - float newval; - float dy, dx, slope; - - entries = tbl->nentries; - xymap = tbl->xymap; - if (xval <= xymap[0].x) - return (xymap[0].y); - else if (xval >= xymap[entries - 1].x) - return (xymap[entries - 1].y); - - for (i = 1; i < entries - 1; i++) { - if (xval == xymap[i].x) - return (xymap[i].y); - if (xval < xymap[i].x) - break; - } - - /* - * Use linear interpolation - */ - dy = (float)(xymap[i].y - xymap[i-1].y); - dx = (float)(xymap[i].x - xymap[i-1].x); - slope = dy/dx; - newval = xymap[i - 1].y + slope * (xval - xymap[i - 1].x); - return ((int)(newval + (newval >= 0 ? 0.5 : -0.5))); -} - -static int -get_lpm_speed(lpm_dev_t *lpmdevs, int temp) -{ - lpm_dev_t *devp; - int lpm; - int speed; - int maxspeed; - - if (lpmdevs == NULL) - return (0); - maxspeed = 0; - for (devp = lpmdevs; devp != NULL; devp = devp->next) { - if (devp->temp_lpm_tbl == NULL) - continue; - lpm = y_of_x(devp->temp_lpm_tbl, temp); - if (env_debug) - envd_log(LOG_INFO, "ambient %d lpm %d\n", temp, lpm); - speed = y_of_x(&lpm_fspeed, lpm); - maxspeed = maxspeed > speed ? maxspeed : speed; - if (env_debug) - envd_log(LOG_INFO, "lpm %d fanspeed %d\n", lpm, speed); - } - return (maxspeed); -} - -/* - * Callback function used by ptree_walk_tree_by_class - */ -static int -cb_lpm(picl_nodehdl_t nodeh, void *args) -{ - lpm_dev_t **retp = (lpm_dev_t **)args; - int err; - ptree_propinfo_t pinfo; - picl_prophdl_t proph; - size_t psize; - void *bufp; - table_t *temp_lpm_tbl; - lpm_dev_t *newdev; - - err = ptree_get_prop_by_name(nodeh, LPM_RANGES_PROPERTY, &proph); - if (err != PICL_SUCCESS) - return (PICL_WALK_CONTINUE); - - err = ptree_get_propinfo(proph, &pinfo); - if ((err != PICL_SUCCESS) || - (pinfo.piclinfo.type != PICL_PTYPE_BYTEARRAY)) - return (PICL_WALK_CONTINUE); - psize = pinfo.piclinfo.size; - bufp = alloca(psize); - - err = ptree_get_propval(proph, bufp, psize); - if (err != PICL_SUCCESS) - return (PICL_WALK_CONTINUE); - - temp_lpm_tbl = parse_lpm_ranges(bufp, psize); - if (temp_lpm_tbl == NULL) { - return (PICL_WALK_CONTINUE); - } - - newdev = malloc(sizeof (*newdev)); - if (newdev == NULL) { - fini_table(temp_lpm_tbl); - return (PICL_WALK_TERMINATE); - } - - memset(newdev, 0, sizeof (*newdev)); - - newdev->nodeh = nodeh; - newdev->temp_lpm_tbl = temp_lpm_tbl; - - /* add newdev to the list */ - newdev->next = *retp; - *retp = newdev; - - return (PICL_WALK_CONTINUE); -} - -/* - * Find all devices advertising "lpm-ranges" property, parse and store - * the lpm tables for each device - */ -static int -setup_lpm_devices(lpm_dev_t **devpp) -{ - picl_nodehdl_t plath; - int err; - lpm_dev_t *lpmp; - - err = ptree_get_node_by_path("/platform", &plath); - if (err != PICL_SUCCESS) - return (err); - - lpmp = NULL; - err = ptree_walk_tree_by_class(plath, NULL, (void *)&lpmp, cb_lpm); - if (err == PICL_SUCCESS) - *devpp = lpmp; - return (err); -} - -/* - * Remove all lpm_devices and their tables. - */ -static void -delete_lpm_devices(void) -{ - lpm_dev_t *devp, *next; - - (void) pthread_rwlock_wrlock(&envd_rwlock); - - if (lpm_devices == NULL) { - (void) pthread_rwlock_unlock(&envd_rwlock); - return; - } - - devp = lpm_devices; - - while (devp != NULL) { - fini_table(devp->temp_lpm_tbl); - next = devp->next; - free(devp); - devp = next; - } - - lpm_devices = NULL; - - (void) pthread_rwlock_unlock(&envd_rwlock); -} - -/* - * Translate observed (measured) temperature into expected (correct) - * temperature - */ -static int -xlate_obs2exp(env_sensor_t *sensorp, tempr_t temp) -{ - int i, entries, new_temp, denominator; - tempr_map_t *map; - float ftemp; - - entries = sensorp->obs2exp_cnt; - map = sensorp->obs2exp_map; - if (entries < 2 || map == NULL) { - /* no map or can't map it */ - new_temp = temp; - } else { - /* - * Any point beyond the range specified by the map is - * extrapolated using either the first two or the last - * two entries in the map. - */ - for (i = 1; i < entries-1; i++) - if (temp < map[i].observed) - break; - /* - * Interpolate/extrapolate the temperature using linear - * equation with map[i-1] and map[i] being the two ends - * of the line segment. - */ - denominator = map[i].observed - map[i-1].observed; - if (denominator == 0) { - /* - * Infinite slope. Since the temperature reading - * resolution is 1C, force denominator to 1 to - * avoid divide by zero. - */ - denominator = 1; - } - ftemp = map[i-1].expected + (temp - map[i-1].observed) * - (float)(map[i].expected - map[i-1].expected)/denominator; - new_temp = (int)(ftemp + (ftemp >= 0 ? 0.5 : -0.5)); - } - - return (new_temp); -} - - -/* - * Translate expected (correct) temperature into observed (measured) - * temperature - */ -static int -xlate_exp2obs(env_sensor_t *sensorp, tempr_t temp) -{ - int i, entries, new_temp, denominator; - tempr_map_t *map; - float ftemp; - sensor_thresh_t *threshp = sensorp->temp_thresh; - - entries = sensorp->obs2exp_cnt; - map = sensorp->obs2exp_map; - if (entries < 2 || map == NULL) - /* no map or can't map it */ - new_temp = temp; - else { - /* - * Any point beyond the range specified by the map is - * extrapolated using either the first two or the last - * two entries in the map. - */ - for (i = 1; i < entries-1; i++) - if (temp < map[i].expected) - break; - - /* - * Interpolate/extrapolate the temperature using linear - * equation with map[i-1] and map[i] being the two ends - * of the line segment. - */ - denominator = map[i].expected - map[i-1].expected; - if (denominator == 0) { - /* - * Infinite slope. Since the temperature reading - * resolution is 1C, force denominator to 1 to - * avoid divide by zero. - */ - denominator = 1; - } - ftemp = map[i-1].observed + (temp - map[i-1].expected) * - (float)(map[i].observed - map[i-1].observed)/denominator; - new_temp = (int)(ftemp + (ftemp >= 0 ? 0.5 : -0.5)); - } - - if (threshp) { - if (new_temp > threshp->max_limit) - new_temp = threshp->max_limit; - else if (new_temp < threshp->min_limit) - new_temp = threshp->min_limit; - } - - return (new_temp); -} - - -/* - * Check if the specified FRU is present. - * Returns 1 if present; 0 otherwise. - */ -static int -fru_present(char *path) -{ - char *p, physpath[PATH_MAX]; - di_node_t root_node; - int fru_present = 0; - - /* - * Construct FRU device path by stripping minor - * node name from the path and use di_init() to - * see if the node exists. - */ - (void) strlcpy(physpath, path, sizeof (physpath)); - p = strrchr(physpath, ':'); - if (p != NULL) - *p = '\0'; - if ((root_node = di_init(physpath, DINFOMINOR)) != DI_NODE_NIL) { - di_fini(root_node); - fru_present = 1; - } - return (fru_present); -} - - -/* - * Get environmental segment from the specified FRU SEEPROM - */ -static int -get_envseg(int fd, void **envsegp, int *envseglenp) -{ - int i, segcnt, envseglen; - section_layout_t section; - segment_layout_t segment; - uint8_t *envseg; - - if (lseek(fd, (long)SECTION_HDR_OFFSET, 0) == -1L || - read(fd, §ion, sizeof (section)) != sizeof (section)) { - return (EINVAL); - } - - /* - * Verify we have the correct section and contents are valid - * For now, we don't verify the CRC. - */ - if (section.header_tag != SECTION_HDR_TAG || - GET_UNALIGN16(§ion.header_version[0]) != SECTION_HDR_VER) { - if (env_debug) - envd_log(LOG_INFO, - "Invalid section header tag:%x version:%x\n", - section.header_tag, - GET_UNALIGN16(§ion.header_version)); - return (EINVAL); - } - - /* - * Locate our environmental segment - */ - segcnt = section.segment_count; - for (i = 0; i < segcnt; i++) { - if (read(fd, &segment, sizeof (segment)) != sizeof (segment)) { - return (errno); - } - if (env_debug > 1) - envd_log(LOG_INFO, - "Seg name: %x desc:%x off:%x len:%x\n", - GET_UNALIGN16(&segment.name), - GET_UNALIGN32(&segment.descriptor[0]), - GET_UNALIGN16(&segment.offset), - GET_UNALIGN16(&segment.length)); - - if (GET_UNALIGN16(&segment.name) == ENVSEG_NAME) - break; - } - - if (i >= segcnt) { - return (ENOENT); - } - - /* - * Allocate memory to hold the environmental segment data. - */ - envseglen = GET_UNALIGN16(&segment.length); - if ((envseg = malloc(envseglen)) == NULL) { - return (ENOMEM); - } - - if (lseek(fd, (long)GET_UNALIGN16(&segment.offset), 0) == -1L || - read(fd, envseg, envseglen) != envseglen) { - (void) free(envseg); - return (EIO); - } - - *envsegp = envseg; - *envseglenp = envseglen; - - if (env_debug > 1) { - char msgbuf[256]; - for (i = 0; i < envseglen; i++) { - (void) sprintf(&msgbuf[3*(i&0xf)], "%2x ", envseg[i]); - if ((i & 0xf) == 0xf || i == (envseglen-1)) - envd_log(LOG_INFO, "envseg[%2x]: %s\n", - (i & ~0xf), msgbuf); - } - } - - return (0); -} - - -/* - * Get all environmental segments - */ -static fruenvseg_t * -get_fru_envsegs(void) -{ - env_sensor_t *sensorp; - fruenvseg_t *frup, *fruenvsegs; - envseg_layout_t *envsegp; - void *envsegbufp; - int fd, envseglen, hdrlen; - char path[PATH_MAX]; - - fruenvsegs = NULL; - for (sensorp = &envd_sensors[0]; sensorp->name != NULL; sensorp++) { - if (sensorp->fru == NULL) - continue; - - for (frup = fruenvsegs; frup != NULL; frup = frup->next) - if (strcmp(frup->fru, sensorp->fru) == 0) - break; - - if (frup != NULL) - continue; - - frup = (fruenvseg_t *)malloc(sizeof (fruenvseg_t)); - if (frup == NULL) - continue; - - /* add this FRU to our list */ - frup->fru = sensorp->fru; - frup->envsegbufp = NULL; - frup->envseglen = 0; - frup->next = fruenvsegs; - fruenvsegs = frup; - - /* - * Now get the environmental segment from this FRU - */ - (void) strcpy(path, "/devices"); - (void) strlcat(path, sensorp->fru, sizeof (path)); - retry: - errno = 0; - fd = open(path, O_RDONLY); - if (env_debug > 1) - envd_log(LOG_INFO, - "fru SEEPROM: %s fd: %d errno:%d\n", - path, fd, errno); - if (fd == -1 && errno == ENOENT && fru_present(frup->fru)) { - if (fru_devfsadm_invoked || - fru_devfsadm_cmd[0] == '\0') { - envd_log(LOG_CRIT, ENV_FRU_OPEN_FAIL, - sensorp->fru, errno, strerror(errno)); - continue; - - } - /* - * FRU is present but no path exists as - * someone rebooted the system without - * "-r" option. Let's invoke "devfsadm" - * once to create seeprom nodes and try - * again so that we can monitor all - * accessible sensors properly and prevent - * any CPU overheating. - */ - if (env_debug) - envd_log(LOG_INFO, - "Invoking '%s' to create FRU nodes\n", - fru_devfsadm_cmd); - fru_devfsadm_invoked = 1; - (void) system(fru_devfsadm_cmd); - goto retry; - } - - /* - * Read environmental segment from this FRU SEEPROM - */ - if (get_envseg(fd, &envsegbufp, &envseglen) == 0) { - /* - * Validate envseg version number and header length - */ - envsegp = (envseg_layout_t *)envsegbufp; - hdrlen = sizeof (envseg_layout_t) - - sizeof (envseg_sensor_t) + - (envsegp->sensor_count) * sizeof (envseg_sensor_t); - - if (envsegp->version != ENVSEG_VERSION || - envseglen < hdrlen) { - /* - * version mismatch or header not big enough - */ - envd_log(LOG_CRIT, ENV_FRU_BAD_ENVSEG, - sensorp->fru, errno, strerror(errno)); - if (envsegbufp != NULL) - (void) free(envsegbufp); - } else { - frup->envseglen = envseglen; - frup->envsegbufp = envsegbufp; - } - } - (void) close(fd); - } - return (fruenvsegs); -} - -/* - * Process environmental segment for all FRUs. - */ -static void -process_fru_envseg() -{ - env_sensor_t *sensorp; - sensor_thresh_t *threshp; - envseg_layout_t *envsegp; - envseg_sensor_data_t *datap; - fruenvseg_t *frup, *fruenvsegs; - int i, envseglen, sensorcnt; - uint_t offset, length, mapentries; - - /* - * Lookup/read environmental segments from FRU SEEPROMs and - * process it. Note that we read each SEEPROM once as it's - * a slow device. - */ - fruenvsegs = get_fru_envsegs(); - - for (sensorp = &envd_sensors[0]; sensorp->name != NULL; sensorp++) { - if (sensorp->fru == NULL) - continue; - - /* - * Locate our FRU environmental segment - */ - for (frup = fruenvsegs; frup != NULL; frup = frup->next) - if (strcmp(frup->fru, sensorp->fru) == 0) - break; - if (frup == NULL || frup->envsegbufp == NULL) - continue; - - envsegp = (envseg_layout_t *)frup->envsegbufp; - envseglen = frup->envseglen; - sensorcnt = envsegp->sensor_count; - - /* - * Locate our sensor data record entry - */ - for (i = 0; i < sensorcnt; i++) { - uint32_t id; - - id = GET_UNALIGN32(&envsegp->sensors[i].sensor_id[0]); - if (env_debug > 1) - envd_log(LOG_INFO, " sensor[%d]: id:%x\n", - i, id); - if (id == sensorp->fru_sensor) - break; - } - - if (i >= sensorcnt) - continue; - - /* - * Validate offset/length of our sensor data record - */ - offset = (uint_t)GET_UNALIGN16(&envsegp->sensors[i].offset); - datap = (envseg_sensor_data_t *)((intptr_t)frup->envsegbufp + - offset); - mapentries = GET_UNALIGN16(&datap->obs2exp_cnt); - length = sizeof (envseg_sensor_data_t) - sizeof (envseg_map_t) + - mapentries * sizeof (envseg_map_t); - - if (env_debug > 1) - envd_log(LOG_INFO, "Found sensor_id:%x idx:%x " - "off:%x #maps:%x expected length:%x\n", - sensorp->fru_sensor, i, offset, - mapentries, length); - - if (offset >= envseglen || (offset+length) > envseglen) { - /* corrupted sensor record */ - envd_log(LOG_CRIT, ENV_FRU_BAD_SENSOR_ENTRY, - sensorp->fru_sensor, sensorp->name, sensorp->fru); - continue; - } - - if (env_debug > 1) { - /* print threshold values */ - envd_log(LOG_INFO, - "Thresholds: HPwrOff %d HShutDn %d HWarn %d\n", - datap->high_power_off, datap->high_shutdown, - datap->high_warning); - envd_log(LOG_INFO, - "Thresholds: LWarn %d LShutDn %d LPwrOff %d\n", - datap->low_warning, datap->low_shutdown, - datap->low_power_off); - - /* print policy data */ - envd_log(LOG_INFO, - " Policy type: %d #%d data: %x %x %x %x %x %x\n", - datap->policy_type, datap->policy_entries, - datap->policy_data[0], datap->policy_data[1], - datap->policy_data[2], datap->policy_data[3], - datap->policy_data[4], datap->policy_data[5]); - - /* print map table */ - for (i = 0; i < mapentries; i++) { - envd_log(LOG_INFO, " Map pair# %d: %d %d\n", - i, datap->obs2exp_map[i].observed, - datap->obs2exp_map[i].expected); - } - } - - - /* - * Copy threshold values - */ - threshp = sensorp->temp_thresh; - threshp->high_power_off = datap->high_power_off; - threshp->high_shutdown = datap->high_shutdown; - threshp->high_warning = datap->high_warning; - threshp->low_warning = datap->low_warning; - threshp->low_shutdown = datap->low_shutdown; - threshp->low_power_off = datap->low_power_off; - - /* - * Copy policy data - */ - threshp->policy_type = datap->policy_type; - threshp->policy_entries = datap->policy_entries; - for (i = 0; i < MAX_POLICY_ENTRIES; i++) - threshp->policy_data[i] = - (tempr_t)datap->policy_data[i]; - - /* - * Copy temperature mapping info (discard duplicate entries) - */ - if (sensorp->obs2exp_map) { - (void) free(sensorp->obs2exp_map); - sensorp->obs2exp_map = NULL; - sensorp->obs2exp_cnt = 0; - } - if (mapentries > 0) { - tempr_map_t *map; - int cnt; - tempr_t observed, expected; - - map = (tempr_map_t *)malloc(mapentries * - sizeof (tempr_map_t)); - - if (map == NULL) { - envd_log(LOG_CRIT, ENV_FRU_SENSOR_MAP_NOMEM, - sensorp->fru_sensor, sensorp->name, - sensorp->fru); - continue; - } - - for (i = 0, cnt = 0; i < mapentries; i++) { - - observed = (tempr_t) - datap->obs2exp_map[i].observed; - expected = (tempr_t) - datap->obs2exp_map[i].expected; - - /* ignore if duplicate entry */ - if (cnt > 0 && - observed == map[cnt-1].observed && - expected == map[cnt-1].expected) { - continue; - } - map[cnt].observed = observed; - map[cnt].expected = expected; - cnt++; - } - sensorp->obs2exp_cnt = cnt; - sensorp->obs2exp_map = map; - } - - if (env_debug > 2 && sensorp->obs2exp_cnt > 1) { - char msgbuf[256]; - - envd_log(LOG_INFO, - "Measured --> Correct temperature table " - "for sensor: %s\n", sensorp->name); - for (i = -128; i < 128; i++) { - (void) sprintf(&msgbuf[6*(i&0x7)], "%6d", - xlate_obs2exp(sensorp, i)); - if ((i &0x7) == 0x7) - envd_log(LOG_INFO, - "%8d: %s\n", (i & ~0x7), msgbuf); - } - if ((i & 0x7) != 0) - (void) printf("%8d: %s\n", (i & ~0x7), msgbuf); - - envd_log(LOG_INFO, - "Correct --> Measured temperature table " - "for sensor: %s\n", sensorp->name); - for (i = -128; i < 128; i++) { - (void) sprintf(&msgbuf[6*(i&0x7)], "%6d", - xlate_exp2obs(sensorp, i)); - if ((i &0x7) == 0x7) - envd_log(LOG_INFO, - "%8d: %s\n", (i & ~0x7), msgbuf); - } - if ((i & 0x7) != 0) - envd_log(LOG_INFO, - "%8d: %s\n", (i & ~0x7), msgbuf); - } - } - - /* - * Deallocate environmental segment list - */ - while (fruenvsegs) { - frup = fruenvsegs; - fruenvsegs = frup->next; - if (frup->envsegbufp != NULL) - (void) free(frup->envsegbufp); - (void) free(frup); - } -} - -/* - * Lookup fan and return a pointer to env_fan_t data structure. - */ -env_fan_t * -fan_lookup(char *name) -{ - int i; - env_fan_t *fanp; - - for (i = 0; (fanp = envd_fans[i]) != NULL; i++) { - if (strcmp(fanp->name, name) == 0) - return (fanp); - } - return (NULL); -} - -/* - * Lookup sensor and return a pointer to env_sensor_t data structure. - */ -env_sensor_t * -sensor_lookup(char *name) -{ - env_sensor_t *sensorp; - - for (sensorp = &envd_sensors[0]; sensorp->name != NULL; sensorp++) { - if (strcmp(sensorp->name, name) == 0) - return (sensorp); - } - return (NULL); -} - -/* - * Get current temperature - * Returns -1 on error, 0 if successful - */ -int -get_temperature(env_sensor_t *sensorp, tempr_t *temp) -{ - int fd = sensorp->fd; - int retval = 0; - int expected_temp; - - if (fd == -1) - retval = -1; - else if (ioctl(fd, I2C_GET_TEMPERATURE, temp) == -1) { - retval = -1; - if (sensorp->error == 0) { - sensorp->error = 1; - envd_log(LOG_WARNING, ENV_SENSOR_ACCESS_FAIL, - sensorp->name, errno, strerror(errno)); - } - } else if (sensorp->error != 0) { - sensorp->error = 0; - envd_log(LOG_WARNING, ENV_SENSOR_ACCESS_OK, sensorp->name); - } else if (sensorp->obs2exp_map != NULL) { - expected_temp = xlate_obs2exp(sensorp, (tempr_t)*temp); - if (env_debug > 1) - envd_log(LOG_INFO, - "sensor: %-13s temp:%d CORRECED to %d\n", - sensorp->name, *temp, (tempr_t)expected_temp); - *temp = (tempr_t)expected_temp; - } - - return (retval); -} - -/* - * Get current fan speed - * Returns -1 on error, 0 if successful - */ -int -get_fan_speed(env_fan_t *fanp, fanspeed_t *fanspeedp) -{ - int fan_fd; - int retval = 0; - - fan_fd = fanp->fd; - if (fan_fd == -1 || read(fan_fd, fanspeedp, sizeof (fanspeed_t)) != - sizeof (fanspeed_t)) - retval = -1; - return (retval); -} - -/* - * Set fan speed - * Returns -1 on error, 0 if successful - */ -static int -set_fan_speed(env_fan_t *fanp, fanspeed_t fanspeed) -{ - int fan_fd; - int retval = 0; - - fan_fd = fanp->fd; - if (fan_fd == -1 || write(fan_fd, &fanspeed, sizeof (fanspeed)) != - sizeof (fanspeed_t)) - retval = -1; - return (retval); -} - - -/* - * close all fan devices - */ -static void -envd_close_fans(void) -{ - int i; - env_fan_t *fanp; - - for (i = 0; (fanp = envd_fans[i]) != NULL; i++) { - if (fanp->fd != -1) { - (void) close(fanp->fd); - fanp->fd = -1; - } - } -} - -/* - * Close sensor devices - */ -static void -envd_close_sensors(void) -{ - env_sensor_t *sensorp; - - for (sensorp = &envd_sensors[0]; sensorp->name != NULL; sensorp++) { - if (sensorp->fd != -1) { - (void) close(sensorp->fd); - sensorp->fd = -1; - } - } -} - -/* - * Open PM device - */ -static void -envd_open_pm(void) -{ - pm_fd = open(PM_DEVICE, O_RDONLY); - if (pm_fd != -1) - (void) fcntl(pm_fd, F_SETFD, FD_CLOEXEC); -} - -/* - * Close PM device - */ -static void -envd_close_pm(void) -{ - if (pm_fd != -1) { - (void) close(pm_fd); - pm_fd = -1; - } -} - -/* - * Open fan devices and initialize per fan data structure. - * Returns #fans found. - */ -static int -envd_setup_fans(void) -{ - int i, fd; - fanspeed_t speed; - env_fan_t *fanp; - char path[PATH_MAX]; - int fancnt = 0; - char *fan_name; - sensor_fan_map_t *sfmap; - env_sensor_t *sensorp; - int sensor_cnt; - - for (i = 0; (fanp = envd_fans[i]) != NULL; i++) { - if (fanp->fd == -1) { - fanp->sensor_cnt = 0; - fanp->cur_speed = 0; - fanp->prev_speed = 0; - - (void) strcpy(path, "/devices"); - (void) strlcat(path, fanp->devfs_path, sizeof (path)); - fd = open(path, O_RDWR); - if (fd == -1) { - envd_log(LOG_CRIT, - ENV_FAN_OPEN_FAIL, fanp->name, - fanp->devfs_path, errno, strerror(errno)); - fanp->present = B_FALSE; - continue; - } - (void) fcntl(fd, F_SETFD, FD_CLOEXEC); - fanp->fd = fd; - fanp->present = B_TRUE; - } - fancnt++; - - /* - * Set initial speed and update cur_speed/prev_speed - */ - if (fanp->forced_speed >= 0) { - speed = (fanspeed_t)fanp->forced_speed; - if (speed > fanp->speed_max) - speed = fanp->speed_max; - if (!disable_piclenvd) - (void) set_fan_speed(fanp, speed); - } else if (get_fan_speed(fanp, &speed) == -1) { - /* - * The Fan driver does not know the current fan speed. - * Initialize all ON/OFF fans to ON state and all - * variable speed fans under software control to 50% - * of the max speed and reread the fan to get the - * current speed. - */ - speed = (fanp == &envd_psupply_fan) ? - fanp->speed_max : fanp->speed_max/2; - if (!disable_piclenvd) { - (void) set_fan_speed(fanp, speed); - if (get_fan_speed(fanp, &speed) == -1) - continue; - } - } - fanp->cur_speed = speed; - fanp->prev_speed = speed; - - /* - * Process sensor_fan_map[] table and initialize sensors[] - * array for this fan. - */ - fan_name = fanp->name; - for (sensor_cnt = 0, sfmap = &sensor_fan_map[0]; - sfmap->sensor_name != NULL; sfmap++) { - if (strcmp(sfmap->fan_name, fan_name) != 0) - continue; - sensorp = sensor_lookup(sfmap->sensor_name); - if (sensorp != NULL && sensor_cnt < SENSORS_PER_FAN) { - fanp->sensors[sensor_cnt] = sensorp; - sensor_cnt++; - } - } - fanp->sensor_cnt = sensor_cnt; - } - - return (fancnt); -} - - -/* - * Adjust specified sensor target temperature and fan adjustment rate - */ - -static void -adjust_sensor_target(env_sensor_t *sensorp) -{ - int target, index; - sensor_pmdev_t *pmdevp; - sensor_thresh_t *threshp; - float rate; - - /* - * Look at current power state of all power managed devices - * associated with this sensor and look up the desired target - * temperature and pick the lowest one of those values. Also, - * calculate the rate of change based upon whether one or more - * of the associated power managed devices are not running at - * full power mode. - */ - - if (sensorp == NULL || (threshp = sensorp->temp_thresh) == NULL || - threshp->policy_type != POLICY_TARGET_TEMP) - return; - - target = threshp->policy_data[0]; - rate = 1.0; - for (pmdevp = sensorp->pmdevp; pmdevp != NULL; pmdevp = pmdevp->next) { - index = pmdevp->full_power - pmdevp->cur_power; - if (index <= 0) - continue; - - /* not running at full power */ - if (index >= threshp->policy_entries) - index = threshp->policy_entries - 1; - if (target > threshp->policy_data[index]) - target = threshp->policy_data[index]; - if (rate > (float)fan_slow_adjustment/100) - rate = (float)fan_slow_adjustment/100; - if (env_debug > 1) - envd_log(LOG_INFO, - "pmdev: %-13s new_target:%d cur:%d power:%d/%d\n", - pmdevp->pmdev_name, target, sensorp->target_temp, - pmdevp->cur_power, pmdevp->full_power); - } - - if (env_debug) - envd_log(LOG_INFO, - "sensor: %-13s new_target:%d cur:%d power:%d/%d\n", - sensorp->name, target, sensorp->target_temp, - ((sensorp->pmdevp) ? sensorp->pmdevp->cur_power : -1), - ((sensorp->pmdevp) ? sensorp->pmdevp->full_power : -1)); - - sensorp->fan_adjustment_rate = rate; - sensorp->target_temp = target; -} - -/* - * Update current power level of all PM devices we are tracking and adjust - * the target temperature associated with the corresponding sensor. - * - * Returns 1 if one or more pmdev power level was adjusted; 0 otherwise. - */ -static int -update_pmdev_power() -{ - sensor_pmdev_t *pmdevp; - pm_req_t pmreq; - int cur_power; - int updated = 0; - - for (pmdevp = sensor_pmdevs; pmdevp->pmdev_name != NULL; pmdevp++) { - pmreq.physpath = pmdevp->pmdev_name; - pmreq.data = NULL; - pmreq.datasize = 0; - pmreq.component = pmdevp->speed_comp; - cur_power = ioctl(pm_fd, PM_GET_CURRENT_POWER, &pmreq); - if (pmdevp->cur_power != cur_power) { - pmdevp->cur_power = cur_power; - if (pmdevp->sensorp) { - adjust_sensor_target(pmdevp->sensorp); - updated = 1; - } - } - } - return (updated); -} - -/* - * Check if the specified sensor is present. - * Returns 1 if present; 0 otherwise. - * - * Note that we don't use ptree_get_node_by_path() here to detect - * if a temperature device is present as we don't want to make - * "devtree" a critical plugin. - */ -static int -envd_sensor_present(env_sensor_t *sensorp) -{ - char *p, physpath[PATH_MAX]; - di_node_t root_node; - int sensor_present = 0; - - /* - * Construct temperature device path by stripping minor - * node name from the devfs_path and use di_init() to - * see if the node exists. - */ - (void) strcpy(physpath, sensorp->devfs_path); - p = strrchr(physpath, ':'); - if (p != NULL) - *p = '\0'; - if ((root_node = di_init(physpath, DINFOMINOR)) != DI_NODE_NIL) { - di_fini(root_node); - sensor_present = 1; - } - return (sensor_present); -} - -/* - * Open temperature sensor devices and initialize per sensor data structure. - * Returns #sensors found. - */ -static int -envd_setup_sensors(void) -{ - tempr_t temp; - env_sensor_t *sensorp; - char path[PATH_MAX]; - int sensorcnt = 0; - int sensor_present; - sensor_thresh_t *threshp; - sensor_pmdev_t *pmdevp; - - for (sensorp = &envd_sensors[0]; sensorp->name != NULL; sensorp++) { - if (sensorp->fd != -1) { - /* Don't reinitialize opened sensor */ - threshp = sensorp->temp_thresh; - sensorp->pmdevp = NULL; - } else { - /* Initialize sensor's initial state */ - sensorp->shutdown_initiated = B_FALSE; - sensorp->warning_tstamp = 0; - sensorp->warning_start = 0; - sensorp->shutdown_tstamp = 0; - sensorp->pmdevp = NULL; - sensorp->fan_adjustment_rate = 1.0; - - threshp = sensorp->temp_thresh; - temp = (threshp && threshp->policy_entries > 0) ? - threshp->policy_data[0] : 0; - sensorp->target_temp = temp; - sensorp->cur_temp = temp; - sensorp->avg_temp = temp; - sensorp->prev_avg_temp = temp; - sensorp->error = 0; - - (void) strcpy(path, "/devices"); - (void) strlcat(path, sensorp->devfs_path, - sizeof (path)); - retry: - sensorp->fd = open(path, O_RDWR); - if (sensorp->fd == -1) { - sensor_present = envd_sensor_present(sensorp); - if (sensor_present && !devfsadm_invoked && - devfsadm_cmd[0] != '\0') { - /* - * Sensor is present but no path - * exists as someone rebooted the - * system without "-r" option. Let's - * invoke "devfsadm" once to create - * max1617 sensors paths in /devices - * subtree and try again so that we - * can monitor all accessible sensors - * and prevent any CPU overheating. - * - * Note that this routine is always - * called in main thread context and - * serialized with respect to other - * plugins' initialization. Hence, it's - * safe to use system(3C) call here. - */ - devfsadm_invoked = 1; - (void) system(devfsadm_cmd); - goto retry; - } - if (sensor_present) - envd_log(LOG_CRIT, - ENV_SENSOR_OPEN_FAIL, - sensorp->name, - sensorp->devfs_path, errno, - strerror(errno)); - sensorp->present = B_FALSE; - continue; - } - (void) fcntl(sensorp->fd, F_SETFD, FD_CLOEXEC); - sensorp->present = B_TRUE; - - /* - * Set cur_temp field to the current temperature value - */ - if (get_temperature(sensorp, &temp) == 0) { - sensorp->cur_temp = temp; - sensorp->avg_temp = temp; - } - } - sensorcnt++; - - /* - * Set low_power_off and high_power_off limits - */ - if (threshp && !disable_power_off) { - temp = xlate_exp2obs(sensorp, threshp->low_power_off); - if (env_debug > 1) - envd_log(LOG_INFO, "sensor: %-13s low_power_" - "off set to %d (real %d)\n", sensorp->name, - (int)temp, threshp->low_power_off); - (void) ioctl(sensorp->fd, MAX1617_SET_LOW_LIMIT, &temp); - - temp = xlate_exp2obs(sensorp, threshp->high_power_off); - if (env_debug > 1) - envd_log(LOG_INFO, "sensor: %-13s high_power_" - "off set to %d (real %d)\n", sensorp->name, - (int)temp, threshp->high_power_off); - (void) ioctl(sensorp->fd, MAX1617_SET_HIGH_LIMIT, - &temp); - } - } - - /* - * Locate "CPU Speed" component for any PM devices associated with - * the sensors. - */ - for (pmdevp = sensor_pmdevs; pmdevp->sensor_name; pmdevp++) { - int i, ncomp; - char physpath[PATH_MAX]; - pm_req_t pmreq; - - pmdevp->speed_comp = -1; - pmdevp->full_power = -1; - pmdevp->cur_power = -1; - pmdevp->next = NULL; - pmdevp->sensorp = sensorp = sensor_lookup(pmdevp->sensor_name); - - /* - * Lookup speed component and get full and current power - * level for that component. - */ - pmreq.physpath = pmdevp->pmdev_name; - pmreq.data = physpath; - pmreq.datasize = sizeof (physpath); - - ncomp = ioctl(pm_fd, PM_GET_NUM_COMPONENTS, &pmreq); - for (i = 0; i < ncomp; i++) { - pmreq.component = i; - physpath[0] = '\0'; - if (ioctl(pm_fd, PM_GET_COMPONENT_NAME, &pmreq) <= 0) - continue; - if (strcasecmp(pmreq.data, pmdevp->speed_comp_name)) - continue; - pmdevp->speed_comp = i; - - - /* - * Get full power and current power level - */ - pmdevp->full_power = ioctl(pm_fd, PM_GET_FULL_POWER, - &pmreq); - - pmdevp->cur_power = ioctl(pm_fd, PM_GET_CURRENT_POWER, - &pmreq); - - if (sensorp) { - pmdevp->next = sensorp->pmdevp; - sensorp->pmdevp = pmdevp; - adjust_sensor_target(sensorp); - } - break; - } - if (env_debug > 1) - envd_log(LOG_INFO, - "sensor:%s %p pmdev:%s comp:%s %d power:%d/%d\n", - pmdevp->sensor_name, pmdevp->sensorp, - pmdevp->pmdev_name, pmdevp->speed_comp_name, - pmdevp->speed_comp, pmdevp->cur_power, - pmdevp->full_power); - } - return (sensorcnt); -} - -/* - * Read all temperature sensors and take appropriate action based - * upon temperature threshols associated with each sensor. Possible - * actions are: - * - * temperature > high_shutdown - * temperature < low_shutdown - * Gracefully shutdown the system and log/print a message - * on the system console provided the temperature has been - * in shutdown range for "shutdown_interval" seconds. - * - * high_warning < temperature <= high_shutdown - * low_warning > temperature >= low_shutdown - * Log/print a warning message on the system console at most - * once every "warning_interval" seconds. - * - * Note that the current temperature is recorded in the "cur_temp" field - * within each env_sensor_t structure. - */ -static void -monitor_sensors(void) -{ - tempr_t temp; - env_sensor_t *sensorp; - sensor_thresh_t *threshp; - time_t ct; - char msgbuf[BUFSIZ]; - char syscmd[BUFSIZ]; - - for (sensorp = &envd_sensors[0]; sensorp->name != NULL; sensorp++) { - if (get_temperature(sensorp, &temp) < 0) - continue; - - sensorp->prev_avg_temp = sensorp->avg_temp; - sensorp->cur_temp = temp; - sensorp->avg_temp = (sensorp->avg_temp + temp)/2; - threshp = sensorp->temp_thresh; - - if (env_debug) - envd_log(LOG_INFO, - "sensor: %-13s temp prev_avg:%6.2f " - "cur:%d avg_temp:%6.2f power:%d/%d target:%d\n", - sensorp->name, sensorp->prev_avg_temp, - temp, sensorp->avg_temp, ((sensorp->pmdevp) ? - sensorp->pmdevp->cur_power : -1), - ((sensorp->pmdevp) ? sensorp->pmdevp->full_power : - -1), sensorp->target_temp); - - - /* - * If this sensor already triggered system shutdown, don't - * log any more shutdown/warning messages for it. - */ - if (sensorp->shutdown_initiated || threshp == NULL) - continue; - - /* - * Check for the temperature in warning and shutdown range - * and take appropriate action. - */ - if (TEMP_IN_WARNING_RANGE(temp, threshp) && !disable_warning) { - /* - * Check if the temperature has been in warning - * range during last warning_duration interval. - * If so, the temperature is truly in warning - * range and we need to log a warning message, - * but no more than once every warning_interval - * seconds. - */ - time_t wtstamp = sensorp->warning_tstamp; - - ct = (time_t)(gethrtime() / NANOSEC); - if (sensorp->warning_start == 0) - sensorp->warning_start = ct; - if (((ct - sensorp->warning_start) >= - warning_duration) && (wtstamp == 0 || - (ct - wtstamp) >= warning_interval)) { - envd_log(LOG_CRIT, ENV_WARNING_MSG, - sensorp->name, temp, - threshp->low_warning, - threshp->high_warning); - sensorp->warning_tstamp = ct; - } - } else if (sensorp->warning_start != 0) - sensorp->warning_start = 0; - - if (TEMP_IN_SHUTDOWN_RANGE(temp, threshp) && - !disable_shutdown) { - ct = (time_t)(gethrtime() / NANOSEC); - if (sensorp->shutdown_tstamp == 0) - sensorp->shutdown_tstamp = ct; - - /* - * Shutdown the system if the temperature remains - * in the shutdown range for over shutdown_interval - * seconds. - */ - if ((ct - sensorp->shutdown_tstamp) >= - shutdown_interval) { - /* log error */ - sensorp->shutdown_initiated = B_TRUE; - (void) snprintf(msgbuf, sizeof (msgbuf), - ENV_SHUTDOWN_MSG, sensorp->name, - temp, threshp->low_shutdown, - threshp->high_shutdown); - envd_log(LOG_ALERT, msgbuf); - - /* shutdown the system (only once) */ - if (system_shutdown_started == B_FALSE) { - (void) snprintf(syscmd, sizeof (syscmd), - "%s \"%s\"", shutdown_cmd, msgbuf); - envd_log(LOG_ALERT, syscmd); - system_shutdown_started = B_TRUE; - (void) system(syscmd); - } - } - } else if (sensorp->shutdown_tstamp != 0) - sensorp->shutdown_tstamp = 0; - } -} - - -/* - * Adjust fan speed based upon the current temperature value of various - * sensors affected by the specified fan. - */ -static int -adjust_fan_speed(env_fan_t *fanp, lpm_dev_t *devp) -{ - int i; - fanspeed_t fanspeed; - float speed, cur_speed, new_speed, max_speed, min_speed; - env_sensor_t *sensorp; - sensor_thresh_t *threshp; - tempr_t temp; - float avg_temp, tempdiff, targetdiff; - int av_ambient; - int amb_cnt; - - - /* - * Get current fan speed - */ - if (get_fan_speed(fanp, &fanspeed) < 0) - return (-1); - cur_speed = fanp->cur_speed; - if (fanspeed != (int)cur_speed) - cur_speed = (float)fanspeed; - - /* - * Calculate new fan speed for each sensor and pick the largest one. - */ - min_speed = fanp->speed_min; - max_speed = fanp->speed_max; - speed = 0; - av_ambient = 0; - amb_cnt = 0; - - for (i = 0; i < fanp->sensor_cnt; i++) { - sensorp = fanp->sensors[i]; - if (sensorp == NULL || sensorp->fd == -1 || - sensorp->temp_thresh == NULL) - continue; - - temp = sensorp->cur_temp; - avg_temp = sensorp->avg_temp; - threshp = sensorp->temp_thresh; - - /* - * Note ambient temperatures to determine lpm for system fan - */ - if ((devp != NULL) && - (sensorp->flags & SFLAG_CPU_AMB_SENSOR)) { - av_ambient += temp; - amb_cnt++; - } - - /* - * If the current temperature is above the warning - * threshold, use max fan speed. - */ - if (temp >= threshp->high_warning) { - speed = max_speed; - break; - } else if (temp <= threshp->low_warning) { - speed = min_speed; - break; - } - - if (threshp->policy_type == POLICY_TARGET_TEMP) { - /* - * Try to achieve the desired target temperature. - * Calculate new fan speed based upon whether the - * temperature is rising, falling or steady state. - * Also take into consideration the current fan - * speed as well as the desired target temperature. - */ - float delta, speed_change; - float multiplier; - - targetdiff = avg_temp - sensorp->target_temp; - tempdiff = avg_temp - sensorp->prev_avg_temp; - - if (tempdiff > AVG_TEMP_HYSTERESIS) { - /* - * Temperature is rising. Increase fan - * speed 0.5% for every 1C above the - * (target - RISING_TEMP_MARGIN) limit. - * Also take into consideration temperature - * rising rate and the current fan speed. - */ - delta = max_speed * .005 * - (RISING_TEMP_MARGIN + targetdiff); - if (delta <= 0) - multiplier = 0; - else - multiplier = tempdiff/4 + - ((cur_speed < max_speed/2) ? - 2 : 1); - } else if (tempdiff < -AVG_TEMP_HYSTERESIS) { - /* - * Temperature is falling. Decrease fan - * speed 0.5% for every 1C below the - * (target + FALLING_TEMP_MARGIN) limit. - * Also take into consideration temperature - * falling rate and the current fan speed. - */ - delta = -max_speed * .005 * - (FALLING_TEMP_MARGIN - targetdiff); - if (delta >= 0) - multiplier = 0; - else - multiplier = -tempdiff/4 + - ((cur_speed > max_speed/2) ? - 2 : 1); - } else { - /* - * Temperature is changing very slowly. - * Adjust fan speed by 0.4% for every 1C - * below/above the target temperature. - */ - delta = max_speed * .004 * targetdiff; - multiplier = 1.0; - } - - - /* - * Enforece some bounds on multiplier and the - * speed change. - */ - multiplier = MIN(multiplier, 3.0); - speed_change = delta * multiplier * - sensorp->fan_adjustment_rate; - speed_change = MIN(speed_change, fan_incr_limit); - speed_change = MAX(speed_change, -fan_decr_limit); - new_speed = cur_speed + speed_change; - - if (env_debug > 1) - envd_log(LOG_INFO, - "sensor: %-8s temp/diff:%d/%3.1f " - "target/diff:%d/%3.1f change:%4.2f x " - "%4.2f x %4.2f speed %5.2f -> %5.2f\n", - sensorp->name, temp, tempdiff, - sensorp->target_temp, targetdiff, delta, - multiplier, sensorp->fan_adjustment_rate, - cur_speed, new_speed); - } else if (threshp->policy_type == POLICY_LINEAR) { - /* - * Set fan speed linearly within the operating - * range specified by the policy_data[LOW_NOMINAL_LOC] - * and policy_data[HIGH_NOMINAL_LOC] threshold values. - * Fan speed is set to minimum value at LOW_NOMINAL - * and to maximum value at HIGH_NOMINAL value. - */ - new_speed = min_speed + (max_speed - min_speed) * - (avg_temp - threshp->policy_data[LOW_NOMINAL_LOC])/ - (threshp->policy_data[HIGH_NOMINAL_LOC] - - threshp->policy_data[LOW_NOMINAL_LOC]); - if (env_debug > 1) - envd_log(LOG_INFO, - "sensor: %-8s policy: linear, cur_speed %5.2f"\ - " new_speed: %5.2f\n", sensorp->name, cur_speed, - new_speed); - } else { - new_speed = cur_speed; - } - speed = MAX(speed, new_speed); - } - - /* - * Adjust speed using lpm tables - */ - if (amb_cnt > 0) { - av_ambient = (av_ambient >= 0 ? - (int)(0.5 + (float)av_ambient/(float)amb_cnt): - (int)(-0.5 + (float)av_ambient/(float)amb_cnt)); - speed = MAX(speed, (fanspeed_t)get_lpm_speed(devp, av_ambient)); - } - - speed = MIN(speed, max_speed); - speed = MAX(speed, min_speed); - - /* - * Record and update fan speed, if different. - */ - fanp->prev_speed = fanp->cur_speed; - fanp->cur_speed = speed; - if ((fanspeed_t)speed != fanspeed) { - fanspeed = (fanspeed_t)speed; - (void) set_fan_speed(fanp, fanspeed); - } - if (env_debug) - envd_log(LOG_INFO, - "fan: %-16s speed cur:%6.2f new:%6.2f\n", - fanp->name, fanp->prev_speed, fanp->cur_speed); - - return (0); -} -/* - * This is the environment thread, which monitors the current temperature - * and power managed state and controls system fan speed. Temperature is - * polled every sensor-poll_interval seconds duration. - */ -/*ARGSUSED*/ -static void * -envthr(void *args) -{ - env_sensor_t *sensorp; - fanspeed_t fan_speed; - env_fan_t *pmfanp = &envd_psupply_fan; - int to; - int xwd = -1; - - for (sensorp = &envd_sensors[0]; sensorp->name != NULL; - sensorp++) { - if (sensorp->obs2exp_map) - (void) free(sensorp->obs2exp_map); - sensorp->obs2exp_map = NULL; - sensorp->obs2exp_cnt = 0; - } - - /* - * Process environmental segment data, if present, - * in the FRU SEEPROM. - */ - process_fru_envseg(); - - /* - * Process tuneable parameters - */ - process_env_conf_file(); - - /* - * Setup temperature sensors and fail if we can't open - * at least one sensor. - */ - if (envd_setup_sensors() <= 0) { - envd_close_pm(); - return (NULL); - } - - to = 3 * sensor_poll_interval + 1; - xwd = open(XCALWD_DEVFS, O_RDONLY); - if (xwd < 0) { - envd_log(LOG_CRIT, ENV_WATCHDOG_INIT_FAIL, errno, - strerror(errno)); - } else if (ioctl(xwd, XCALWD_STOPWATCHDOG) < 0 || - ioctl(xwd, XCALWD_STARTWATCHDOG, &to) < 0) { - envd_log(LOG_CRIT, ENV_WATCHDOG_INIT_FAIL, errno, - strerror(errno)); - (void) close(xwd); - xwd = -1; - } - - /* - * Setup fan device (don't fail even if we can't access - * the fan as we can still monitor temeperature. - */ - (void) envd_setup_fans(); - - for (;;) { - (void) pthread_rwlock_rdlock(&envd_rwlock); - - /* - * If no "pmthr" thread, then we need to update the - * current power level for all power managed deviecs - * so that we can determine correct target temperature. - */ - if (pmthr_exists == B_FALSE) - (void) update_pmdev_power(); - - if (xwd >= 0) - (void) ioctl(xwd, XCALWD_KEEPALIVE); - - if (!disable_piclenvd) { - /* - * Monitor current temperature for all sensors - * (current temperature is recorded in the "cur_temp" - * field within each sensor data structure) - */ - monitor_sensors(); - - /* - * Adjust CPU and system fan speed - */ - if (envd_cpu_fan.forced_speed < 0) - (void) adjust_fan_speed(&envd_cpu_fan, NULL); - if (envd_system_fan.forced_speed < 0) - (void) adjust_fan_speed(&envd_system_fan, - lpm_devices); - - /* - * Turn off power supply fan if in lowest power state. - */ - fan_speed = (cur_lpstate) ? pmfanp->speed_min : - pmfanp->speed_max; - - if (env_debug) - envd_log(LOG_INFO, - "fan: %-16s speed cur:%6.2f new:%6.2f " - "low-power:%d\n", pmfanp->name, - (float)pmfanp->cur_speed, - (float)fan_speed, cur_lpstate); - - if (fan_speed != (fanspeed_t)pmfanp->cur_speed && - set_fan_speed(pmfanp, fan_speed) == 0) - pmfanp->cur_speed = fan_speed; - } - (void) pthread_rwlock_unlock(&envd_rwlock); - - /* - * Wait for sensor_poll_interval seconds before polling - * again. Note that we use our own envd_sleep() routine - * as sleep() in POSIX thread library gets affected by - * the wall clock time being set back. - */ - (void) envd_sleep(sensor_poll_interval); - } - /*NOTREACHED*/ - return (NULL); -} - -/* - * This is the power management thread, which monitors all power state - * change events and wakes up the "envthr" thread when the system enters - * or exits the lowest power state. - */ -/*ARGSUSED*/ -static void * -pmthr(void *args) -{ - pm_state_change_t pmstate; - char physpath[PATH_MAX]; - - pmstate.physpath = physpath; - pmstate.size = sizeof (physpath); - cur_lpstate = 0; - - for (;;) { - /* - * Get PM state change events to check if the system - * is in lowest power state and wake up the "envthr" - * thread when the power state changes. - * - * To minimize polling, we use the blocking interface - * to get the power state change event here. - */ - if (ioctl(pm_fd, PM_GET_STATE_CHANGE_WAIT, &pmstate) != 0) { - if (errno != EINTR) - break; - continue; - } - - /* - * Extract the lowest power state from the last queued - * state change events. We pick up queued state change - * events using the non-blocking interface and wake up - * the "envthr" thread only after consuming all the - * state change events queued at that time. - */ - do { - if (env_debug > 1) { - envd_log(LOG_INFO, - "pmstate event:0x%x flags:%x comp:%d " - "oldval:%d newval:%d path:%s\n", - pmstate.event, pmstate.flags, - pmstate.component, pmstate.old_level, - pmstate.new_level, pmstate.physpath); - } - cur_lpstate = - (pmstate.flags & PSC_ALL_LOWEST) ? 1 : 0; - } while (ioctl(pm_fd, PM_GET_STATE_CHANGE, &pmstate) == 0); - - /* - * Update current PM state for the components we are - * tracking. In case of CPU devices, PM state change - * event can be generated even before the state change - * takes effect, hence we need to get the current state - * for all CPU devices every time and recalculate the - * target temperature. We do this once after consuming - * all the queued events. - */ - - (void) pthread_rwlock_rdlock(&envd_rwlock); - (void) update_pmdev_power(); - (void) pthread_rwlock_unlock(&envd_rwlock); - } - - /* - * We won't be able to monitor lowest power state any longer, - * hence reset it. - */ - cur_lpstate = 0; - envd_log(LOG_ERR, PM_THREAD_EXITING, errno, strerror(errno)); - pmthr_exists = B_FALSE; - return (NULL); -} - - -/* - * Process sensor threshold related tuneables - */ -static int -process_threshold_tuneable(char *keyword, char *buf, void *dummy_thresh_addr, - int flags, char *fname, int line) -{ - int retval = 0; - long val; - void *addr; - char *endp, *sname; - env_sensor_t *sensorp; - - /* - * Tuneable entry can be in one of the following formats: - * - * threshold-keyword - * threshold-keyword ... - * - * Convert threshold value into integer value and check for - * optional sensor name. If no sensor name is specified, then - * the tuneable applies to all sensors specified by the "flags". - * Otherwise, it is applicable to the specified sensors. - * - * Note that the dummy_thresh_addr is the address of the threshold - * to be changed and is converted into offset by subtracting the - * base dummy_thresh address. This offset is added to the base - * address of the threshold structure to be update to determine - * the final memory address to be modified. - */ - - errno = 0; - val = strtol(buf, &endp, 0); - sname = strtok(endp, tokdel); - - if (errno != 0 || val != (tempr_t)val) { - retval = -1; - envd_log(LOG_INFO, ENV_CONF_INT_EXPECTED, fname, line, keyword); - } else if (flags == 0 && sname == NULL) { - envd_log(LOG_INFO, "SUNW_piclenvd: file:%s line:%d SKIPPED" - " as no sensor specified.\n", fname, line, keyword); - retval = -1; - } else if (sname == NULL) { - int cnt = 0; - - for (sensorp = &envd_sensors[0]; sensorp->name; sensorp++) { - if (sensorp->temp_thresh == NULL || - (sensorp->flags & flags) == 0) - continue; - - /* - * Convert dummy_thresh_addr into memory address - * for this sensor threshold values. - */ - addr = (char *)sensorp->temp_thresh + - (int)((char *)dummy_thresh_addr - - (char *)&dummy_thresh); - - *(tempr_t *)addr = (tempr_t)val; - cnt++; - if (env_debug) - envd_log(LOG_INFO, "SUNW_piclenvd: file:%s " - "line:%d %s = %d for sensor: '%s'\n", - fname, line, keyword, val, sensorp->name); - } - if (cnt == 0) - envd_log(LOG_INFO, "SUNW_piclenvd: file:%s line:%d " - "%s SKIPPED as no matching sensor found.\n", - fname, line, keyword); - } else { - /* apply threshold value to the specified sensors */ - do { - sensorp = sensor_lookup(sname); - if (sensorp == NULL || sensorp->temp_thresh == NULL || - (flags && (sensorp->flags & flags) == 0)) { - envd_log(LOG_INFO, - "SUNW_piclenvd: file:%s line:%d %s SKIPPED" - " for '%s' as not a valid sensor.\n", - fname, line, keyword, sname); - continue; - } - /* - * Convert dummy_thresh_addr into memory address - * for this sensor threshold values. - */ - addr = (char *)sensorp->temp_thresh + - (int)((char *)dummy_thresh_addr - - (char *)&dummy_thresh); - - *(tempr_t *)addr = (tempr_t)val; - if (env_debug) - envd_log(LOG_INFO, "SUNW_piclenvd: file:%s " - "line:%d %s = %d for sensor: '%s'\n", - fname, line, keyword, val, sensorp->name); - } while ((sname = strtok(NULL, tokdel)) != NULL); - } - return (retval); -} - - -/* - * Process integer tuneables - */ -static int -process_int_tuneable(char *keyword, char *buf, void *addr, int size, - char *fname, int line) -{ - int retval = 0; - char *endp; - long val; - - /* - * Convert input into integer value and ensure that there is - * no other token in the buffer. - */ - errno = 0; - val = strtol(buf, &endp, 0); - if (errno != 0 || strtok(endp, tokdel) != NULL) - retval = -1; - else { - switch (size) { - case 1: - if (val != (int8_t)val) - retval = -1; - else - *(int8_t *)addr = (int8_t)val; - break; - case 2: - if (val != (short)val) - retval = -1; - else - *(short *)addr = (short)val; - break; - case 4: - *(int *)addr = (int)val; - break; - default: - retval = -1; - } - } - - if (retval == -1) - envd_log(LOG_INFO, ENV_CONF_INT_EXPECTED, - fname, line, keyword); - else if (env_debug) - envd_log(LOG_INFO, "SUNW_piclenvd: file:%s line:%d %s = %d\n", - fname, line, keyword, val); - - return (retval); -} - - -/* - * Process string tuneables - * - * String value must be within double quotes. Skip over initial white - * spaces before looking for string value. - */ -static int -process_string_tuneable(char *keyword, char *buf, void *addr, int size, - char *fname, int line) -{ - int retval = 0; - char c, *p, *strend; - - /* Skip over white spaces */ - buf += strspn(buf, tokdel); - - /* - * Parse srting and locate string end (handling escaped double quotes - * and other characters) - */ - if (buf[0] != '"') - strend = NULL; - else { - for (p = buf+1; (c = *p) != '\0'; p++) - if (c == '"' || (c == '\\' && *++p == '\0')) - break; - strend = (*p == '"') ? p : NULL; - } - - if (strend == NULL || (strend-buf) > size || - strtok(strend+1, tokdel) != NULL) { - envd_log(LOG_WARNING, ENV_CONF_STRING_EXPECTED, - fname, line, keyword, size); - retval = -1; - } else { - *strend = '\0'; - (void) strcpy(addr, (caddr_t)buf+1); - if (env_debug) - envd_log(LOG_INFO, "SUNW_piclenvd: file:%s line:%d " - "%s = \"%s\"\n", fname, line, keyword, buf+1); - } - - return (retval); -} - - -/* - * Process configuration file - */ -static void -process_env_conf_file(void) -{ - int line, len, toklen; - char buf[BUFSIZ]; - FILE *fp; - env_tuneable_t *tunep; - char nmbuf[SYS_NMLN]; - char fname[PATH_MAX]; - char *tok, *valuep; - int skip_line = 0; - - if (sysinfo(SI_PLATFORM, nmbuf, sizeof (nmbuf)) == -1) - return; - - (void) snprintf(fname, sizeof (fname), PICLD_PLAT_PLUGIN_DIRF, nmbuf); - (void) strlcat(fname, ENV_CONF_FILE, sizeof (fname)); - fp = fopen(fname, "r"); - if (fp == NULL) - return; - - /* - * Blank lines or lines starting with "#" or "*" in the first - * column are ignored. All other lines are assumed to contain - * input in the following format: - * - * keyword value - * - * where the "value" can be a signed integer or string (in - * double quotes) depending upon the keyword. - */ - - for (line = 1; fgets(buf, sizeof (buf), fp) != NULL; line++) { - len = strlen(buf); - if (len <= 0) - continue; - - /* skip long lines */ - if (buf[len-1] != '\n') { - skip_line = 1; - continue; - } else if (skip_line) { - skip_line = 0; - continue; - } else - buf[len-1] = '\0'; - - /* skip comments */ - if (buf[0] == '*' || buf[0] == '#') - continue; - - /* - * Skip over white space to get the keyword - */ - tok = buf + strspn(buf, tokdel); - if (*tok == '\0') - continue; /* blank line */ - - toklen = strcspn(tok, tokdel); - tok[toklen] = '\0'; - - /* Get possible location for value (within current line) */ - valuep = tok + toklen + 1; - if (valuep > buf+len) - valuep = buf + len; - - /* - * Lookup the keyword and process value accordingly - */ - for (tunep = &env_tuneables[0]; tunep->name != NULL; tunep++) { - if (strcasecmp(tunep->name, tok) == 0) { - (void) (*tunep->func)(tok, valuep, - tunep->arg1, tunep->arg2, fname, line); - break; - } - } - - if (tunep->name == NULL) - envd_log(LOG_INFO, ENV_CONF_UNSUPPORTED_KEYWORD, - fname, line, tok); - } - (void) fclose(fp); -} - -/* - * Setup envrionmental monitor state and start threads to monitor - * temperature and power management state. - * Returns -1 on error, 0 if successful. - */ - -static int -envd_setup(void) -{ - char *valp, *endp; - int val; - int err; - - if (pthread_attr_init(&thr_attr) != 0 || - pthread_attr_setscope(&thr_attr, PTHREAD_SCOPE_SYSTEM) != 0) - return (-1); - - if (pm_fd == -1) - envd_open_pm(); - - /* - * Setup lpm devices - */ - lpm_devices = NULL; - if ((err = setup_lpm_devices(&lpm_devices)) != PICL_SUCCESS) { - if (env_debug) - envd_log(LOG_ERR, "setup_lpm_devices failed err = %d\n", - err); - } - - /* - * Initialize global state to initial startup values - */ - sensor_poll_interval = SENSOR_POLL_INTERVAL; - fan_slow_adjustment = FAN_SLOW_ADJUSTMENT; - fan_incr_limit = FAN_INCREMENT_LIMIT; - fan_decr_limit = FAN_DECREMENT_LIMIT; - warning_interval = WARNING_INTERVAL; - warning_duration = WARNING_DURATION; - shutdown_interval = SHUTDOWN_INTERVAL; - disable_piclenvd = 0; - disable_power_off = 0; - disable_shutdown = 0; - disable_warning = 0; - - (void) strlcpy(shutdown_cmd, SHUTDOWN_CMD, sizeof (shutdown_cmd)); - (void) strlcpy(devfsadm_cmd, DEVFSADM_CMD, sizeof (devfsadm_cmd)); - (void) strlcpy(fru_devfsadm_cmd, FRU_DEVFSADM_CMD, - sizeof (fru_devfsadm_cmd)); - envd_cpu_fan.forced_speed = -1; - envd_system_fan.forced_speed = -1; - - (void) memcpy(&cpu0_die_thresh, &cpu_die_thresh_default, - sizeof (cpu_die_thresh_default)); - (void) memcpy(&cpu0_amb_thresh, &cpu_amb_thresh_default, - sizeof (cpu_amb_thresh_default)); - (void) memcpy(&cpu1_die_thresh, &cpu_die_thresh_default, - sizeof (cpu_die_thresh_default)); - (void) memcpy(&cpu1_amb_thresh, &cpu_amb_thresh_default, - sizeof (cpu_amb_thresh_default)); - - if ((valp = getenv("SUNW_piclenvd_debug")) != NULL) { - val = strtol(valp, &endp, 0); - if (strtok(endp, tokdel) == NULL) - env_debug = val; - } - - /* - * Create a thread to monitor temperature and control fan - * speed. - */ - if (envthr_created == B_FALSE && pthread_create(&envthr_tid, - &thr_attr, envthr, NULL) != 0) { - envd_close_fans(); - envd_close_sensors(); - envd_close_pm(); - envd_log(LOG_CRIT, ENV_THREAD_CREATE_FAILED); - return (-1); - } - envthr_created = B_TRUE; - - /* - * Create a thread to monitor PM state - */ - if (pmthr_exists == B_FALSE) { - if (pm_fd == -1 || pthread_create(&pmthr_tid, &thr_attr, - pmthr, NULL) != 0) { - envd_log(LOG_CRIT, PM_THREAD_CREATE_FAILED); - } else - pmthr_exists = B_TRUE; - } - return (0); -} - -/* - * Callback function used by ptree_walk_tree_by_class for the cpu class - */ -static int -cb_cpu(picl_nodehdl_t nodeh, void *args) -{ - sensor_pmdev_t *pmdevp; - int err; - ptree_propinfo_t pinfo; - picl_prophdl_t proph; - size_t psize; - int id; - - /* Get CPU's ID, it is an int */ - err = ptree_get_propval_by_name(nodeh, PICL_PROP_ID, &id, sizeof (int)); - if (err != PICL_SUCCESS) - return (PICL_WALK_CONTINUE); - - /* Get the pmdevp for the CPU */ - pmdevp = sensor_pmdevs; - while (pmdevp->sensor_id != -1) { - if (id == pmdevp->sensor_id) - break; - pmdevp++; - } - - /* Return if didn't find the pmdevp for the cpu id */ - if (pmdevp->sensor_id == -1) - return (PICL_WALK_CONTINUE); - - /* Get the devfs-path property */ - err = ptree_get_prop_by_name(nodeh, PICL_PROP_DEVFS_PATH, &proph); - if (err != PICL_SUCCESS) - return (PICL_WALK_CONTINUE); - - err = ptree_get_propinfo(proph, &pinfo); - if ((err != PICL_SUCCESS) || - (pinfo.piclinfo.type != PICL_PTYPE_CHARSTRING)) - return (PICL_WALK_CONTINUE); - - psize = pinfo.piclinfo.size; - pmdevp->pmdev_name = malloc(psize); - if (pmdevp->pmdev_name == NULL) - return (PICL_WALK_CONTINUE); - - err = ptree_get_propval(proph, pmdevp->pmdev_name, psize); - if (err != PICL_SUCCESS) - return (PICL_WALK_CONTINUE); - - return (PICL_WALK_CONTINUE); -} - -/* - * Find the CPU's in the picl tree, set the devfs-path for pmdev_name - */ -static void -setup_pmdev_names() -{ - picl_nodehdl_t plath; - int err; - - err = ptree_get_node_by_path(PLATFORM_PATH, &plath); - if (err != PICL_SUCCESS) - return; - - err = ptree_walk_tree_by_class(plath, PICL_CLASS_CPU, NULL, cb_cpu); -} - - -static void -piclenvd_register(void) -{ - picld_plugin_register(&my_reg_info); -} - -static void -piclenvd_init(void) -{ - /* - * Setup the names for the pm sensors, we do it just the first time - */ - if (pmdev_names_init == B_FALSE) { - (void) setup_pmdev_names(); - pmdev_names_init = B_TRUE; - } - - /* - * Start environmental monitor/threads - */ - (void) pthread_rwlock_wrlock(&envd_rwlock); - if (envd_setup() != 0) { - (void) pthread_rwlock_unlock(&envd_rwlock); - envd_log(LOG_CRIT, ENVD_PLUGIN_INIT_FAILED); - return; - } - (void) pthread_rwlock_unlock(&envd_rwlock); - - /* - * Now setup/populate PICL tree - */ - env_picl_setup(); -} - -static void -piclenvd_fini(void) -{ - /* - * Delete the lpm device list. After this the lpm information - * will not be used in determining the fan speed, till the lpm - * device information is initialized by setup_lpm_devices called - * by envd_setup. - */ - delete_lpm_devices(); - - /* - * Invoke env_picl_destroy() to remove any PICL nodes/properties - * (including volatile properties) we created. Once this call - * returns, there can't be any more calls from the PICL framework - * to get current temperature or fan speed. - */ - env_picl_destroy(); - - /* - * Since this is a critical plug-in, we know that it won't be - * unloaded and will be reinited again unless picld process is - * going away. Therefore, it's okay to let "envthr" and "pmthr" - * continue so that we can monitor the environment during SIGHUP - * handling also. - */ -} - -/*VARARGS2*/ -void -envd_log(int pri, const char *fmt, ...) -{ - va_list ap; - - va_start(ap, fmt); - vsyslog(pri, fmt, ap); - va_end(ap); -} - - -/* - * sleep() in libpthread gets affected by time being set back, hence - * can cause the "envthr" not to wakeup for extended duration. For - * now, we implement our own sleep() routine below using alarm(). - * This will work only if SIGALRM is masked off in all other threads. - * Note that SIGALRM signal is masked off in the main thread, hence - * in all threads, including the envthr, the one calling this routine. - * - * Note that SIGALRM and alarm() can't be used by any other thread - * in this manner. - */ - -static unsigned int -envd_sleep(unsigned int sleep_tm) -{ - int sig; - unsigned int unslept; - sigset_t alrm_mask; - - if (sleep_tm == 0) - return (0); - - (void) sigemptyset(&alrm_mask); - (void) sigaddset(&alrm_mask, SIGALRM); - - (void) alarm(sleep_tm); - (void) sigwait(&alrm_mask, &sig); - - unslept = alarm(0); - return (unslept); -} diff --git a/usr/src/cmd/picl/plugins/sun4u/excalibur/envd/piclenvsetup.c b/usr/src/cmd/picl/plugins/sun4u/excalibur/envd/piclenvsetup.c deleted file mode 100644 index c33b7ab029..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/excalibur/envd/piclenvsetup.c +++ /dev/null @@ -1,893 +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 (c) 1999-2001 by Sun Microsystems, Inc. - * All rights reserved. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * This file contains code for setting up environmental related nodes - * and properties in the PICL tree. - * - * For each temperature-device class node, it does the following: - * - Create cpu and cpu-ambient temperautre-sensor class nodes. - * - Create "devfs-path" property under each temperature-sensor class node - * - Create "Temperature" volatile property under these nodes. - * - Create various temperature threshold properties under each node. - * - Create "Temperature" and "AmbientTemperature" volatile properties - * under corresponding "cpu" class node. - * - * For the "fan-control" node, it does the following: - * - Create system-fan node - * - Create "devfs-path" property under "fan" class node - * - Create "Speed" volatile propery under each node. - * - Create "SpeedUnit" property under each node. - * - * Access to sensor/fan properties is protected by the envpicl_rwlock - * readers/writer lock. This lock is held as a reader while trying to - * access any volatile sensor/fan property, and held as a writer lock - * while trying to create or destroy sensor/fan nodes and properties. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "picldefs.h" -#include "envd.h" - - -/* - * Volatile property read/write function typedef - */ -typedef int ptree_vol_rdfunc_t(ptree_rarg_t *parg, void *buf); -typedef int ptree_vol_wrfunc_t(ptree_warg_t *parg, const void *buf); - -#define PROP_FAN_SPEED_UNIT_VALUE "%" - -/* - * PICL class path for CPU nodes - */ -#define CPU0_PLAT_PATH "_class:/gptwo/cpu?ID=0" -#define CPU1_PLAT_PATH "_class:/gptwo/cpu?ID=1" - -/* - * "UnitAddress" propval for various temperature devices (platform dependent) - */ -#define CPU0_TEMPDEV_UNITADDR "0,30" -#define CPU1_TEMPDEV_UNITADDR "0,98" - -/* - * Sensor node data structure - */ -typedef struct { - char *sensor_name; /* sensor name */ - env_sensor_t *sensorp; /* sensor info */ - char *unitaddr; /* parent's UnitAddress propval */ - char *sdev_node; /* sensed device node name */ - char *sdev_pname; /* sensed device "temp" prop name */ - picl_nodehdl_t nodeh; /* sensor node handle */ - picl_prophdl_t proph; /* "Temperature" property handle */ - picl_prophdl_t target_proph; /* "TargetTemp" property handle */ - picl_prophdl_t sdev_proph; /* property handle for sensed dev */ -} sensor_node_t; - - -/* - * Sensor nodes array - */ -static sensor_node_t sensor_nodes[] = { - {SENSOR_CPU0_DIE, NULL, CPU0_TEMPDEV_UNITADDR, - CPU0_PLAT_PATH, PICL_PROP_CPU_DIE_TEMP}, - - {SENSOR_CPU0_AMB, NULL, CPU0_TEMPDEV_UNITADDR, - CPU0_PLAT_PATH, PICL_PROP_CPU_AMB_TEMP}, - - {SENSOR_CPU1_DIE, NULL, CPU1_TEMPDEV_UNITADDR, - CPU1_PLAT_PATH, PICL_PROP_CPU_DIE_TEMP}, - - {SENSOR_CPU1_AMB, NULL, CPU1_TEMPDEV_UNITADDR, - CPU1_PLAT_PATH, PICL_PROP_CPU_AMB_TEMP}, - - {NULL, NULL, NULL, NULL, NULL} -}; - - -/* - * Fan node data structure - */ -typedef struct { - char *fan_name; /* fan name */ - env_fan_t *fanp; /* fan information */ - char *speed_unit; /* speed unit string */ - picl_nodehdl_t nodeh; /* "fan" node handle */ - picl_prophdl_t proph; /* "Speed" property handle */ -} fan_node_t; - - -/* - * Fan node array - */ -static fan_node_t fan_nodes[] = { - {ENV_SYSTEM_FAN, NULL, PROP_FAN_SPEED_UNIT_VALUE}, - {ENV_CPU_FAN, NULL, PROP_FAN_SPEED_UNIT_VALUE}, - {ENV_PSUPPLY_FAN, NULL, PROP_FAN_SPEED_UNIT_VALUE}, - {NULL, NULL, NULL} -}; - - -/* - * Miscellaneous declarations - */ -typedef struct node_list { - picl_nodehdl_t nodeh; - struct node_list *next; -} node_list_t; - -static void delete_sensor_nodes_and_props(void); -static void delete_fan_nodes_and_props(void); -static pthread_rwlock_t envpicl_rwlock = PTHREAD_RWLOCK_INITIALIZER; - - -/* - * Read function for volatile "Temperature" property - */ -static int -get_current_target_temp(ptree_rarg_t *parg, void *buf) -{ - picl_prophdl_t proph; - sensor_node_t *snodep; - env_sensor_t *sensorp; - - /* - * Locate the sensor in our sensor_nodes table by matching the - * property handle and get its temperature. - */ - proph = parg->proph; - (void) pthread_rwlock_rdlock(&envpicl_rwlock); - for (snodep = &sensor_nodes[0]; snodep->sensor_name != NULL; - snodep++) { - if (snodep->target_proph != proph) - continue; - - if ((sensorp = snodep->sensorp) == NULL) - break; - (void) memcpy(buf, (caddr_t)&sensorp->target_temp, - sizeof (sensorp->target_temp)); - (void) pthread_rwlock_unlock(&envpicl_rwlock); - return (PICL_SUCCESS); - } - (void) pthread_rwlock_unlock(&envpicl_rwlock); - return (PICL_FAILURE); -} - - -/* - * Read function for volatile "Temperature" property - */ -static int -get_current_temp(ptree_rarg_t *parg, void *buf) -{ - tempr_t temp; - picl_prophdl_t proph; - sensor_node_t *snodep; - - /* - * Locate the sensor in our sensor_nodes table by matching the - * property handle and get its temperature. - */ - proph = parg->proph; - (void) pthread_rwlock_rdlock(&envpicl_rwlock); - for (snodep = &sensor_nodes[0]; snodep->sensor_name != NULL; - snodep++) { - if (snodep->proph != proph && - snodep->sdev_proph != proph) - continue; - - if (get_temperature(snodep->sensorp, &temp) < 0) - break; - (void) memcpy(buf, (caddr_t)&temp, sizeof (tempr_t)); - (void) pthread_rwlock_unlock(&envpicl_rwlock); - return (PICL_SUCCESS); - } - (void) pthread_rwlock_unlock(&envpicl_rwlock); - return (PICL_FAILURE); -} - - -/* - * Read function for volatile "Speed" property on "fan" class node - */ -static int -get_current_speed(ptree_rarg_t *parg, void *buf) -{ - fanspeed_t speed; - picl_prophdl_t proph; - fan_node_t *fnodep; - - /* - * Locate the fan in our fan_nodes table by matching the - * property handle and get fan speed. - */ - proph = parg->proph; - (void) pthread_rwlock_rdlock(&envpicl_rwlock); - for (fnodep = &fan_nodes[0]; fnodep->fan_name != NULL; fnodep++) { - if (fnodep->proph != proph) - continue; - if (get_fan_speed(fnodep->fanp, &speed) < 0) - break; - speed = (fanspeed_t)(speed * 100/fnodep->fanp->speed_max); - - (void) memcpy(buf, (caddr_t)&speed, sizeof (speed)); - (void) pthread_rwlock_unlock(&envpicl_rwlock); - return (PICL_SUCCESS); - } - (void) pthread_rwlock_unlock(&envpicl_rwlock); - return (PICL_FAILURE); -} - - -static node_list_t * -add_node_to_list(picl_nodehdl_t nodeh, node_list_t *listp) -{ - node_list_t *el; - node_list_t *tmp; - - el = malloc(sizeof (node_list_t)); - if (el == NULL) - return (listp); - el->nodeh = nodeh; - el->next = NULL; - if (listp == NULL) { - listp = el; - return (listp); - } - - /* - * append to the end to preserve the order found - */ - tmp = listp; - while (tmp->next != NULL) - tmp = tmp->next; - - tmp->next = el; - return (listp); -} - - - -/* - * Get a list of nodes of the specified classname under nodeh - * Once a node of the specified class is found, it's children are not - * searched. - */ -static node_list_t * -get_node_list_by_class(picl_nodehdl_t nodeh, const char *classname, - node_list_t *listp) -{ - int err; - char clname[PICL_CLASSNAMELEN_MAX+1]; - picl_nodehdl_t chdh; - - /* - * go through the children - */ - err = ptree_get_propval_by_name(nodeh, PICL_PROP_CHILD, &chdh, - sizeof (picl_nodehdl_t)); - - while (err == PICL_SUCCESS) { - err = ptree_get_propval_by_name(chdh, PICL_PROP_CLASSNAME, - clname, strlen(classname) + 1); - - if ((err == PICL_SUCCESS) && (strcmp(clname, classname) == 0)) - listp = add_node_to_list(chdh, listp); - else - listp = get_node_list_by_class(chdh, classname, listp); - - err = ptree_get_propval_by_name(chdh, PICL_PROP_PEER, &chdh, - sizeof (picl_nodehdl_t)); - } - return (listp); -} - - -/* - * Free memory allocated to build the specified node list. - */ -static void -free_node_list(node_list_t *listp) -{ - node_list_t *next; - - for (; listp != NULL; listp = next) { - next = listp->next; - free(listp); - } -} - -/* - * Get PICL_PTYPE_CHARSTRING "UnitAddress" property - */ -static int -get_unit_address_prop(picl_nodehdl_t nodeh, void *buf, size_t len) -{ - int err; - picl_prophdl_t proph; - ptree_propinfo_t pinfo; - - err = ptree_get_prop_by_name(nodeh, PICL_PROP_UNIT_ADDRESS, &proph); - if (err == PICL_SUCCESS) - err = ptree_get_propinfo(proph, &pinfo); - - if (err != PICL_SUCCESS) - return (err); - - if (pinfo.piclinfo.type != PICL_PTYPE_CHARSTRING || - pinfo.piclinfo.size > len) - return (PICL_FAILURE); - - err = ptree_get_propval(proph, buf, pinfo.piclinfo.size); - return (err); -} - - -/* - * Create and add the specified regular property - */ - -static int -add_regular_prop(picl_nodehdl_t nodeh, char *name, int type, int access, - int size, void *valbuf, picl_prophdl_t *prophp) -{ - int err; - ptree_propinfo_t propinfo; - picl_prophdl_t proph; - - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - type, access, size, name, NULL, NULL); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_create_and_add_prop(nodeh, &propinfo, valbuf, &proph); - if (err == PICL_SUCCESS && prophp) - *prophp = proph; - return (err); -} - - -/* - * Create and add the specified volatile property - */ -static int -add_volatile_prop(picl_nodehdl_t nodeh, char *name, int type, int access, - int size, ptree_vol_rdfunc_t *rdfunc, ptree_vol_wrfunc_t *wrfunc, - picl_prophdl_t *prophp) -{ - int err; - ptree_propinfo_t propinfo; - picl_prophdl_t proph; - - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - type, (access|PICL_VOLATILE), size, name, rdfunc, wrfunc); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_create_and_add_prop(nodeh, &propinfo, NULL, &proph); - if (err == PICL_SUCCESS && prophp) - *prophp = proph; - return (err); -} - -/* - * Add temperature threshold properties - */ -static void -add_sensor_thresh_props(picl_nodehdl_t nodeh, sensor_thresh_t *threshp) -{ - picl_prophdl_t proph; - - (void) add_regular_prop(nodeh, PICL_PROP_LOW_POWER_OFF, - PICL_PTYPE_INT, PICL_READ, - sizeof (threshp->low_power_off), - (void *)&(threshp->low_power_off), &proph); - - (void) add_regular_prop(nodeh, PICL_PROP_LOW_SHUTDOWN, - PICL_PTYPE_INT, PICL_READ, - sizeof (threshp->low_shutdown), - (void *)&(threshp->low_shutdown), &proph); - - (void) add_regular_prop(nodeh, PICL_PROP_LOW_WARNING, - PICL_PTYPE_INT, PICL_READ, - sizeof (threshp->low_warning), - (void *)&(threshp->low_warning), &proph); - - (void) add_regular_prop(nodeh, PICL_PROP_HIGH_WARNING, - PICL_PTYPE_INT, PICL_READ, - sizeof (threshp->high_warning), - (void *)&(threshp->high_warning), &proph); - - (void) add_regular_prop(nodeh, PICL_PROP_HIGH_SHUTDOWN, - PICL_PTYPE_INT, PICL_READ, - sizeof (threshp->high_shutdown), - (void *)&(threshp->high_shutdown), &proph); - - (void) add_regular_prop(nodeh, PICL_PROP_HIGH_POWER_OFF, - PICL_PTYPE_INT, PICL_READ, - sizeof (threshp->high_power_off), - (void *)&(threshp->high_power_off), &proph); -} - - -/* - * Lookup "temperature-device" class nodes and create "temperature-sensor" - * class nodes and relevant properties under those nodes. - * - * For each entry in sensor_nodes[] array, do the following: - * - Create specified (cpu-die or cpu-ambient) "temperautre-sensor" class - * node. - * - Create "devfs-path" property under this node. - * - Create "Temperature" volatile property under this node. - * - Create various temperature threshold properties under this node. - * - Create specified ("Temperature" or "AmbientTemperature") volatile - * temperature property under specified sdev_node node. - */ - -static int -add_sensor_nodes_and_props(picl_nodehdl_t plath) -{ - int err; - char *pname, *nodename, *refnode, *devfs_path; - node_list_t *node_list, *listp; - sensor_node_t *snodep; - sensor_thresh_t *threshp; - picl_nodehdl_t nodeh, refnodeh, cnodeh; - picl_prophdl_t proph; - char unitaddr[PICL_UNITADDR_LEN_MAX]; - env_sensor_t *sensorp; - - node_list = - get_node_list_by_class(plath, PICL_CLASS_TEMPERATURE_DEVICE, NULL); - - if (node_list == NULL) - return (PICL_FAILURE); - - for (listp = node_list; listp != NULL; listp = listp->next) { - /* - * Get "reg" property. Skip if no "reg" property found. - */ - nodeh = listp->nodeh; - err = get_unit_address_prop(nodeh, (void *)unitaddr, - sizeof (unitaddr)); - if (err != PICL_SUCCESS) - continue; - - for (snodep = sensor_nodes; snodep->sensor_name != NULL; - snodep++) { - - /* Match "UnitAddress" property */ - if (strcasecmp(unitaddr, snodep->unitaddr) != 0) - continue; - - /* - * Skip if already initialized or no sensor info - */ - sensorp = snodep->sensorp; - if (snodep->nodeh != NULL || sensorp == NULL) - continue; - - /* - * Create temperature-sensor node - */ - nodename = snodep->sensor_name; - err = ptree_create_and_add_node(nodeh, nodename, - PICL_CLASS_TEMPERATURE_SENSOR, &cnodeh); - if (env_debug) - envd_log(LOG_INFO, - "Creating PICL sensor node '%s' err:%d\n", - nodename, err); - if (err != PICL_SUCCESS) - break; - - /* save node handle */ - snodep->nodeh = cnodeh; - - /* - * Add "devfs_path" property in child node - */ - devfs_path = sensorp->devfs_path; - pname = PICL_PROP_DEVFS_PATH; - err = add_regular_prop(cnodeh, pname, - PICL_PTYPE_CHARSTRING, PICL_READ, - strlen(devfs_path)+1, (void *)devfs_path, &proph); - if (err != PICL_SUCCESS) - break; - - /* - * Now add volatile "temperature" volatile property - * in this "temperature-sensor" class node. - */ - pname = PICL_PROP_TEMPERATURE; - err = add_volatile_prop(cnodeh, pname, - PICL_PTYPE_INT, PICL_READ, sizeof (tempr_t), - get_current_temp, NULL, &proph); - if (err != PICL_SUCCESS) - break; - - /* Save prop handle */ - snodep->proph = proph; - - /* - * Add threshold related properties - */ - threshp = sensorp->temp_thresh; - if (threshp && threshp->policy_type == - POLICY_TARGET_TEMP) { - /* - * Add volatile "TargetTemperature" property - */ - pname = PICL_PROP_TARGET_TEMPERATURE; - err = add_volatile_prop(cnodeh, pname, - PICL_PTYPE_INT, PICL_READ, - sizeof (sensorp->target_temp), - get_current_target_temp, NULL, &proph); - if (err != PICL_SUCCESS) - break; - snodep->target_proph = proph; - } - - if (threshp != NULL) - add_sensor_thresh_props(cnodeh, threshp); - - /* - * Finally create property in the sensed device - * (if one specified) - */ - refnode = snodep->sdev_node; - pname = snodep->sdev_pname; - if (refnode == NULL || pname == NULL) - continue; - - err = ptree_get_node_by_path(refnode, &refnodeh); - if (err == PICL_SUCCESS) { - err = add_volatile_prop(refnodeh, pname, - PICL_PTYPE_INT, PICL_READ, - sizeof (tempr_t), get_current_temp, - NULL, &proph); - } - - if (err != PICL_SUCCESS) - break; - - /* Save prop handle */ - snodep->sdev_proph = proph; - } - if (err != PICL_SUCCESS) { - delete_sensor_nodes_and_props(); - free_node_list(node_list); - if (env_debug) - envd_log(LOG_INFO, - "Can't create prop/node for sensor '%s'\n", - nodename); - return (err); - } - } - - free_node_list(node_list); - return (PICL_SUCCESS); -} - -/* - * Delete all sensor nodes and related properties created by the - * add_sensor_prop() for each sensor node in the PICL tree. - */ -static void -delete_sensor_nodes_and_props(void) -{ - sensor_node_t *snodep; - - /* - * Delete/destroy any property created in the sensed device - * as well as the sensor node and all properties under it. - * Note that deleiing/destroying a node deletes/destroys - * all properties within that node. - */ - - for (snodep = sensor_nodes; snodep->sensor_name != NULL; snodep++) { - if (snodep->sdev_proph != NULL) { - (void) ptree_delete_prop(snodep->sdev_proph); - (void) ptree_destroy_prop(snodep->sdev_proph); - snodep->sdev_proph = NULL; - } - - if (snodep->nodeh != NULL) { - /* delete node and all properties under it */ - (void) ptree_delete_node(snodep->nodeh); - (void) ptree_destroy_node(snodep->nodeh); - snodep->nodeh = NULL; - snodep->proph = NULL; - } - } -} - - -/* - * Lookup "fan-control" class node and create "fan" class nodes and - * relevant properties under those nodes. - * - * For each entry in fan_nodes[] array, do the following: - * - Create specified "fan" class node. - * - Create "devfs-path" property under "fan" class node - * - Create "Speed" volatile propery under "fan" class node. - * - Create "SpeedUnit" property under "fan" class node. - */ - -static int -add_fan_nodes_and_props(picl_nodehdl_t plath) -{ - int err; - char *pname, *nodename, *devfs_path; - env_fan_t *fanp; - fan_node_t *fnodep; - picl_nodehdl_t nodeh, cnodeh; - picl_prophdl_t proph; - node_list_t *node_list, *listp; - - node_list = - get_node_list_by_class(plath, PICL_CLASS_FAN_CONTROL, NULL); - - if (node_list == NULL) - return (PICL_FAILURE); - - for (listp = node_list; listp != NULL; listp = listp->next) { - /* - * Add various fan nodes and properties - */ - nodeh = listp->nodeh; - err = PICL_SUCCESS; - for (fnodep = fan_nodes; fnodep->fan_name != NULL; fnodep++) { - - /* Skip if already initialized or no fan info */ - if (fnodep->nodeh != NULL || fnodep->fanp == NULL) - continue; - - /* - * Create "fan" class node and save node handle - */ - nodename = fnodep->fan_name; - err = ptree_create_and_add_node(nodeh, nodename, - PICL_CLASS_FAN, &cnodeh); - if (env_debug) - envd_log(LOG_INFO, - "Creating PICL fan node '%s' err:%d\n", - nodename, err); - - if (err != PICL_SUCCESS) - break; - fnodep->nodeh = cnodeh; - - /* - * Add "devfs_path" property in child node - */ - fanp = fnodep->fanp; - devfs_path = fanp->devfs_path; - pname = PICL_PROP_DEVFS_PATH; - err = add_regular_prop(cnodeh, pname, - PICL_PTYPE_CHARSTRING, PICL_READ, - strlen(devfs_path)+1, (void *)devfs_path, &proph); - - if (err != PICL_SUCCESS) - break; - - /* - * Add "Speed" volatile property in this "fan" - * class node and save prop handle. - */ - pname = PICL_PROP_FAN_SPEED; - err = add_volatile_prop(cnodeh, pname, PICL_PTYPE_INT, - PICL_READ, sizeof (fanspeed_t), get_current_speed, - NULL, &proph); - - if (err != PICL_SUCCESS) - break; - fnodep->proph = proph; - - /* - * Add other "fan" class properties - */ - pname = PICL_PROP_FAN_SPEED_UNIT; - err = add_regular_prop(cnodeh, pname, - PICL_PTYPE_CHARSTRING, PICL_READ, - strlen(fnodep->speed_unit)+1, - (void *)fnodep->speed_unit, &proph); - - if (err != PICL_SUCCESS) - break; - } - if (err != PICL_SUCCESS) { - delete_fan_nodes_and_props(); - free_node_list(node_list); - if (env_debug) - envd_log(LOG_WARNING, - "Can't create prop/node for fan '%s'\n", - nodename); - return (err); - } - } - - free_node_list(node_list); - return (PICL_SUCCESS); -} - - -/* - * Delete all fan nodes and related properties created by the - * add_fan_props() for each fan node in the PICL tree. - */ -static void -delete_fan_nodes_and_props(void) -{ - fan_node_t *fnodep; - - /* - * Delete/destroy fan node and all properties under it. - * Note that deleiing/destroying a node deletes/destroys - * all properties within that node. - */ - - for (fnodep = fan_nodes; fnodep->fan_name != NULL; fnodep++) { - if (fnodep->nodeh != NULL) { - (void) ptree_delete_node(fnodep->nodeh); - (void) ptree_destroy_node(fnodep->nodeh); - fnodep->nodeh = NULL; - } - } -} - -/* - * Find the ENVMODEL_CONF_FILE file. - */ -static int -get_envmodel_conf_file(char *outfilename) -{ - char nmbuf[SYS_NMLN]; - char pname[PATH_MAX]; - - if (sysinfo(SI_PLATFORM, nmbuf, sizeof (nmbuf)) != -1) { - (void) snprintf(pname, PATH_MAX, PICLD_PLAT_PLUGIN_DIRF, nmbuf); - (void) strlcat(pname, ENVMODEL_CONF_FILE, PATH_MAX); - if (access(pname, R_OK) == 0) { - (void) strlcpy(outfilename, pname, PATH_MAX); - return (0); - } - } - - if (sysinfo(SI_MACHINE, nmbuf, sizeof (nmbuf)) != -1) { - (void) snprintf(pname, PATH_MAX, PICLD_PLAT_PLUGIN_DIRF, nmbuf); - (void) strlcat(pname, ENVMODEL_CONF_FILE, PATH_MAX); - if (access(pname, R_OK) == 0) { - (void) strlcpy(outfilename, pname, PATH_MAX); - return (0); - } - } - - (void) snprintf(pname, PATH_MAX, "%s/%s", PICLD_COMMON_PLUGIN_DIR, - ENVMODEL_CONF_FILE); - - if (access(pname, R_OK) == 0) { - (void) strlcpy(outfilename, pname, PATH_MAX); - return (0); - } - - return (-1); -} - -/* Delete all sensor/fan nodes and any properties created by this plugin */ -void -env_picl_destroy(void) -{ - (void) pthread_rwlock_wrlock(&envpicl_rwlock); - delete_fan_nodes_and_props(); - delete_sensor_nodes_and_props(); - (void) pthread_rwlock_unlock(&envpicl_rwlock); -} - -void -env_picl_setup(void) -{ - int err; - sensor_node_t *snodep; - fan_node_t *fnodep; - picl_nodehdl_t plath; - char fullfilename[PATH_MAX]; - picl_nodehdl_t rooth; - - - /* - * Initialize sensorp and other fields in the sensor_nodes[] array - */ - for (snodep = sensor_nodes; snodep->sensor_name != NULL; snodep++) { - snodep->sensorp = sensor_lookup(snodep->sensor_name); - snodep->nodeh = NULL; - snodep->proph = NULL; - snodep->target_proph = NULL; - snodep->sdev_proph = NULL; - } - - /* - * Initialize fanp and other fields in the fan_nodes[] array - */ - for (fnodep = fan_nodes; fnodep->fan_name != NULL; fnodep++) { - fnodep->fanp = fan_lookup(fnodep->fan_name); - fnodep->nodeh = NULL; - fnodep->proph = NULL; - } - - /* - * Get platform handle and populate PICL tree with environmental - * nodes and properties - */ - err = ptree_get_node_by_path("/platform", &plath); - - if (err == PICL_SUCCESS) { - (void) pthread_rwlock_wrlock(&envpicl_rwlock); - err = add_sensor_nodes_and_props(plath); - if (err == PICL_SUCCESS) - err = add_fan_nodes_and_props(plath); - - if (err != PICL_SUCCESS) - delete_sensor_nodes_and_props(); - (void) pthread_rwlock_unlock(&envpicl_rwlock); - } - - if (err != PICL_SUCCESS) { - envd_log(LOG_CRIT, ENVD_PICL_SETUP_FAILED); - return; - } - - /* - * Parse the envmodel.conf file and populate the PICL tree - */ - if (get_envmodel_conf_file(fullfilename) < 0) - envd_log(LOG_CRIT, ENVD_PICL_SETUP_FAILED); - if (ptree_get_root(&rooth) != PICL_SUCCESS) - envd_log(LOG_CRIT, ENVD_PICL_SETUP_FAILED); - err = picld_pluginutil_parse_config_file(rooth, fullfilename); - - if (err != PICL_SUCCESS) - envd_log(LOG_CRIT, ENVD_PICL_SETUP_FAILED); -} diff --git a/usr/src/cmd/picl/plugins/sun4u/excalibur/frudata/Makefile b/usr/src/cmd/picl/plugins/sun4u/excalibur/frudata/Makefile deleted file mode 100644 index d9313682e3..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/excalibur/frudata/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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# lib/picl/plugins/sun4u/excalibur/frudata/Makefile -# -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Blade-1000 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONF= libpiclfrudata.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 -#INFOS= piclfrutree.info system-board.info - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: $(CONF) - -install: $(ROOTLIBDIR) $(ROOTCONF) - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/excalibur/frudata/libpiclfrudata.conf b/usr/src/cmd/picl/plugins/sun4u/excalibur/frudata/libpiclfrudata.conf deleted file mode 100644 index 888d0b3ad3..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/excalibur/frudata/libpiclfrudata.conf +++ /dev/null @@ -1,93 +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 (c) 2000 by Sun Microsystems, Inc. -# All rights reserved. -# -# #ident "%Z%%M% %I% %E% SMI" -# -# This file creates the FRU device paths for the FRUAccess library -# - -# 1 "libpiclfrudata.info" - - - - - - - - -VERSION 1.0 - - - - - -name:/frutree/chassis/system-board/cpu-slot?Slot=0 -REFNODE cpu-module fru WITH _class:/PLATFORM_CLASS/cpu?ID=0 - -name:/frutree/chassis/system-board/cpu-slot?Slot=1 -REFNODE cpu-module fru WITH _class:/PLATFORM_CLASS/cpu?ID=1 - - - - -name:/platform/pci/ebus/i2c?UnitAddress=1,30/motherboard-fru -PROP FRUDevicePath string r 0 "/devices/pci@8,700000/ebus@5/i2c@1,30/motherboard-fru@0,a8:motherboard-fru" - - - - -name:/platform/pci/ebus/i2c?UnitAddress=1,30/cpu-fru?UnitAddress=0,a0 -PROP FRUDevicePath string r 0 "/devices/pci@8,700000/ebus@5/i2c@1,30/cpu-fru@0,a0:cpu-fru" - -name:/platform/pci/ebus/i2c?UnitAddress=1,30/cpu-fru?UnitAddress=0,a2 -PROP FRUDevicePath string r 0 "/devices/pci@8,700000/ebus@5/i2c@1,30/cpu-fru@0,a2:cpu-fru" - - - - -name:/platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,a0 -PROP FRUDevicePath string r 0 "/devices/pci@8,700000/ebus@5/i2c@1,2e/dimm-fru@1,a0:dimm-fru" - -name:/platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,a2 -PROP FRUDevicePath string r 0 "/devices/pci@8,700000/ebus@5/i2c@1,2e/dimm-fru@1,a2:dimm-fru" - -name:/platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,a4 -PROP FRUDevicePath string r 0 "/devices/pci@8,700000/ebus@5/i2c@1,2e/dimm-fru@1,a4:dimm-fru" - -name:/platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,a6 -PROP FRUDevicePath string r 0 "/devices/pci@8,700000/ebus@5/i2c@1,2e/dimm-fru@1,a6:dimm-fru" - -name:/platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,a8 -PROP FRUDevicePath string r 0 "/devices/pci@8,700000/ebus@5/i2c@1,2e/dimm-fru@1,a8:dimm-fru" - -name:/platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,aa -PROP FRUDevicePath string r 0 "/devices/pci@8,700000/ebus@5/i2c@1,2e/dimm-fru@1,aa:dimm-fru" - -name:/platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,ac -PROP FRUDevicePath string r 0 "/devices/pci@8,700000/ebus@5/i2c@1,2e/dimm-fru@1,ac:dimm-fru" - -name:/platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,ae -PROP FRUDevicePath string r 0 "/devices/pci@8,700000/ebus@5/i2c@1,2e/dimm-fru@1,ae:dimm-fru" - diff --git a/usr/src/cmd/picl/plugins/sun4u/excalibur/frutree/Makefile b/usr/src/cmd/picl/plugins/sun4u/excalibur/frutree/Makefile deleted file mode 100644 index 2107db523b..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/excalibur/frutree/Makefile +++ /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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# lib/picl/plugins/sun4u/excalibur/frutree/Makefile -# -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Blade-1000 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONF= piclfrutree.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 -INFOS= piclfrutree.info system-board.info - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: $(CONF) - -install: $(ROOTLIBDIR) $(ROOTCONF) - -$(CONF): $(INFOS) - $(RM) $@ - $(CPP) piclfrutree.info > $@ - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/excalibur/frutree/envmodel.info b/usr/src/cmd/picl/plugins/sun4u/excalibur/frutree/envmodel.info deleted file mode 100644 index 9705b5fc73..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/excalibur/frutree/envmodel.info +++ /dev/null @@ -1,119 +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 (c) 2000-2001 by Sun Microsystems, Inc. - * All rights reserved. - * - * #ident "%Z%%M% %I% %E% SMI" - */ - -/* - * fan nodes under the chasis - */ -name:/frutree/chassis/cpu-fan-slot -NODE cpu-fan fru -ENDNODE - -name:/frutree/chassis/system-fan-slot -NODE system-fan fru -ENDNODE - -/* - * temperature_sensors on cpu-module - */ -name:/frutree/chassis/system-board/cpu-slot?Slot=0/cpu-module - -TABLE Devices - -ROW -PROP Class string r 0 "temperature-sensor" -REFPROP _temperature-sensor_ /platform/pci/ebus/i2c?UnitAddress=1,30/temperature?UnitAddress=0,30/cpu0 -ENDROW - -ROW -PROP Class string r 0 "temperature-sensor" -REFPROP _temperature-sensor_ /platform/pci/ebus/i2c?UnitAddress=1,30/temperature?UnitAddress=0,30/cpu0-ambient -ENDROW - -ENDTABLE - -name:/frutree/chassis/system-board/cpu-slot?Slot=0x1/cpu-module - -TABLE Devices - -ROW -PROP Class string r 0 "temperature-sensor" -REFPROP _temperature-sensor_ /platform/pci/ebus/i2c?UnitAddress=1,30/temperature?UnitAddress=0,98/cpu1 -ENDROW - -ROW -PROP Class string r 0 "temperature-sensor" -REFPROP _temperature-sensor_ /platform/pci/ebus/i2c?UnitAddress=1,30/temperature?UnitAddress=0,98/cpu1-ambient -ENDROW - -ENDTABLE - -/* - * i2c devices for fans - */ -name:/frutree/chassis/cpu-fan-slot/cpu-fan - -TABLE Devices -ROW -PROP Class string r 0 "fan" -REFPROP _fan_ /platform/pci/ebus/i2c?UnitAddress=1,30/fan-control/cpu -ENDROW -ENDTABLE - -name:/frutree/chassis/system-fan-slot/system-fan - -TABLE Devices -ROW -PROP Class string r 0 "fan" -REFPROP _fan_ /platform/pci/ebus/i2c?UnitAddress=1,30/fan-control/system -ENDROW -ENDTABLE - -name:/frutree/chassis/power-supply-slot/power-supply - -TABLE Devices -ROW -PROP Class string r 0 "fan" -REFPROP _fan_ /platform/pci/ebus/i2c?UnitAddress=1,30/fan-control/power-supply -ENDROW -ENDTABLE - -/* - * _fru_parent for the i2c fan devices - */ -name:/platform/pci/ebus/i2c?UnitAddress=1,30/fan-control/system -REFPROP _fru_parent /frutree/chassis/system-fan-slot/system-fan -PROP Label string r 0 "system-fan" - -name:/platform/pci/ebus/i2c?UnitAddress=1,30/fan-control/cpu -REFPROP _fru_parent /frutree/chassis/cpu-fan-slot/cpu-fan -PROP Label string r 0 "cpu-fan" - -name:/platform/pci/ebus/i2c?UnitAddress=1,30/fan-control/power-supply -REFPROP _fru_parent /frutree/chassis/power-supply-slot/power-supply -PROP Label string r 0 "power-supply" - diff --git a/usr/src/cmd/picl/plugins/sun4u/excalibur/frutree/piclfrutree.info b/usr/src/cmd/picl/plugins/sun4u/excalibur/frutree/piclfrutree.info deleted file mode 100644 index e7239ffddd..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/excalibur/frutree/piclfrutree.info +++ /dev/null @@ -1,142 +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 (c) 2001 by Sun Microsystems, Inc. - * All rights reserved. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * TABLE - * creates a table property of name - * ENDTABLE - * - * ROW -- marks the beginning of a row of properties - * ENDROW - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -#define PLATFORM_CLASS gptwo - -VERSION 1.1 -VERBOSE 1 -NODE frutree picl - NODE chassis fru - /* - * SunMC physical view view_points for this platform - * This will get moved to a separate SunMC physical view plugin later. - */ - PROP ViewPoints string r 0 "front rear side" - NODE power-supply-slot location - PROP Label string r 0 "power-supply-slot" - PROP SlotType string r 0 "power-supply" - ENDNODE - NODE disk-slot location - PROP Label string r 0 "0" - PROP Slot uint r 4 0 - ENDNODE - NODE disk-slot location - PROP Label string r 0 "1" - PROP Slot uint r 4 1 - ENDNODE - NODE cpu-fan-slot location - PROP Label string r 0 "cpu-fan-slot" - PROP SlotType string r 0 "fan-unit" - ENDNODE - NODE system-fan-slot location - PROP Label string r 0 "system-fan-slot" - PROP SlotType string r 0 "fan-unit" - ENDNODE - ENDNODE -ENDNODE - -/* - * set the label for chassis, so that the children have a location - */ -name:/frutree/chassis -PROP Label string r 0 "chassis" - -/* - * add the power-supply fru to the power-supply-slot - */ -name:/frutree/chassis/power-supply-slot -NODE power-supply fru -ENDNODE - -/* - * set the SlotType for the disk slots - */ -name:/frutree/chassis/disk-slot?Slot=0 -PROP SlotType string r 0 "disk-slot" - -name:/frutree/chassis/disk-slot?Slot=1 -PROP SlotType string r 0 "disk-slot" - -/* - * create the fru modules for disks in the fru tree - */ -name:/frutree/chassis/disk-slot?Slot=0 -REFNODE disk fru WITH _class:/PLATFORM_CLASS/pci?instance=1/scsi-fcp/devctl/block?target=1 - -name:/frutree/chassis/disk-slot?Slot=1 -REFNODE disk fru WITH _class:/PLATFORM_CLASS/pci?instance=1/scsi-fcp/devctl/block?target=3 - -/* - * _fru_parent for the hard disks - */ -_class:/PLATFORM_CLASS/pci?instance=1/scsi-fcp/devctl/block?target=1 -REFPROP _fru_parent /frutree/chassis/disk-slot?Slot=0/disk - -_class:/PLATFORM_CLASS/pci?instance=1/scsi-fcp/devctl/block?target=3 -REFPROP _fru_parent /frutree/chassis/disk-slot?Slot=1/disk - -name:/frutree/chassis -#include "system-board.info" -#include "envmodel.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/excalibur/frutree/system-board.info b/usr/src/cmd/picl/plugins/sun4u/excalibur/frutree/system-board.info deleted file mode 100644 index ff38743890..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/excalibur/frutree/system-board.info +++ /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, 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 (c) 2001 by Sun Microsystems, Inc. - * All rights reserved. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This file creates the system board structure - */ - -NODE system-board fru - PROP Label string r 0 "system-board" - NODE upa-slot location - PROP Slot uint r 4 0 - PROP Label string r 0 "J4501" - ENDNODE - NODE upa-slot location - PROP Slot uint r 4 1 - PROP Label string r 0 "J3501" - ENDNODE - NODE pci-slot location - PROP Label string r 0 "J2601" - ENDNODE - NODE pci-slot location - PROP Label string r 0 "J2501" - ENDNODE - NODE pci-slot location - PROP Label string r 0 "J2401" - ENDNODE - NODE pci-slot location - PROP Label string r 0 "J2301" - ENDNODE - NODE cpu-slot location - PROP Label string r 0 "cpu0" - PROP Slot uint r 4 0 - ENDNODE - NODE cpu-slot location - PROP Label string r 0 "cpu1" - PROP Slot uint r 4 1 - ENDNODE - NODE mem-slot location - PROP Slot uint r 4 0 - PROP Label string r 0 "J0100" - ENDNODE - NODE mem-slot location - PROP Slot uint r 4 1 - PROP Label string r 0 "J0101" - ENDNODE - NODE mem-slot location - PROP Slot uint r 4 2 - PROP Label string r 0 "J0202" - ENDNODE - NODE mem-slot location - PROP Slot uint r 4 3 - PROP Label string r 0 "J0203" - ENDNODE - NODE mem-slot location - PROP Slot uint r 4 4 - PROP Label string r 0 "J0304" - ENDNODE - NODE mem-slot location - PROP Slot uint r 4 5 - PROP Label string r 0 "J0305" - ENDNODE - NODE mem-slot location - PROP Slot uint r 4 6 - PROP Label string r 0 "J0406" - ENDNODE - NODE mem-slot location - PROP Slot uint r 4 7 - PROP Label string r 0 "J0407" - ENDNODE -ENDNODE - -/* - * create the fru modules for CPU and upa in the fru tree - */ -name:/frutree/chassis/system-board/cpu-slot?Slot=0 -REFNODE cpu-module fru WITH _class:/PLATFORM_CLASS/cpu?ID=0 - -name:/frutree/chassis/system-board/cpu-slot?Slot=1 -REFNODE cpu-module fru WITH _class:/PLATFORM_CLASS/cpu?ID=1 - -/* - * set the SlotType for the cpu slots - */ -name:/frutree/chassis/system-board/cpu-slot?Slot=0 -PROP SlotType string r 0 "cpu" - -name:/frutree/chassis/system-board/cpu-slot?Slot=0x1 -PROP SlotType string r 0 "cpu" - -/* - * seeprom source for motherboard - */ -name:/frutree/chassis/system-board -PROP FRUDataAvailable void r -REFPROP _seeprom_source /platform/pci/ebus/i2c?UnitAddress=1,30/motherboard-fru - -/* - * seeprom source for cpus - */ -name:/frutree/chassis/system-board/cpu-slot?Slot=0/cpu-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source /platform/pci/ebus/i2c?UnitAddress=1,30/cpu-fru?UnitAddress=0,a0 - -name:/frutree/chassis/system-board/cpu-slot?Slot=1/cpu-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source /platform/pci/ebus/i2c?UnitAddress=1,30/cpu-fru?UnitAddress=0,a2 - -/* - * Set up upa card - */ -name:/frutree/chassis/system-board/upa-slot?Label=J4501 -REFNODE upa-card fru WITH _class:/PLATFORM_CLASS/upa/display?upa-portid=0 - -name:/frutree/chassis/system-board/upa-slot?Label=J3501 -REFNODE upa-card fru WITH _class:/PLATFORM_CLASS/upa/display?upa-portid=1 - -/* - * Set up memory module fru - */ -name:/frutree/chassis/system-board/mem-slot?Label=J0100 -REFNODE mem-module fru WITH /platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,a0 - -name:/frutree/chassis/system-board/mem-slot?Label=J0101 -REFNODE mem-module fru WITH /platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,a2 - -name:/frutree/chassis/system-board/mem-slot?Label=J0202 -REFNODE mem-module fru WITH /platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,a4 - -name:/frutree/chassis/system-board/mem-slot?Label=J0203 -REFNODE mem-module fru WITH /platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,a6 - -name:/frutree/chassis/system-board/mem-slot?Label=J0304 -REFNODE mem-module fru WITH /platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,a8 - -name:/frutree/chassis/system-board/mem-slot?Label=J0305 -REFNODE mem-module fru WITH /platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,aa - -name:/frutree/chassis/system-board/mem-slot?Label=J0406 -REFNODE mem-module fru WITH /platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,ac - -name:/frutree/chassis/system-board/mem-slot?Label=J0407 -REFNODE mem-module fru WITH /platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,ae - -/* - * seeprom source for memory fru - */ -name:/frutree/chassis/system-board/mem-slot?Label=J0100/mem-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source /platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,a0 - -name:/frutree/chassis/system-board/mem-slot?Label=J0101/mem-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source /platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,a2 - -name:/frutree/chassis/system-board/mem-slot?Label=J0202/mem-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source /platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,a4 - -name:/frutree/chassis/system-board/mem-slot?Label=J0203/mem-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source /platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,a6 - -name:/frutree/chassis/system-board/mem-slot?Label=J0304/mem-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source /platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,a8 - -name:/frutree/chassis/system-board/mem-slot?Label=J0305/mem-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source /platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,aa - -name:/frutree/chassis/system-board/mem-slot?Label=J0406/mem-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source /platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,ac - -name:/frutree/chassis/system-board/mem-slot?Label=J0407/mem-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source /platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,ae - -/* - * _fru_parent memory seeprom devices - */ -name:/platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,a0 -REFPROP _fru_parent /frutree/chassis/system-board/mem-slot?Label=J0100/mem-module - -name:/platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,a2 -REFPROP _fru_parent /frutree/chassis/system-board/mem-slot?Label=J0101/mem-module - -name:/platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,a4 -REFPROP _fru_parent /frutree/chassis/system-board/mem-slot?Label=J0202/mem-module - -name:/platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,a6 -REFPROP _fru_parent /frutree/chassis/system-board/mem-slot?Label=J0203/mem-module - -name:/platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,a8 -REFPROP _fru_parent /frutree/chassis/system-board/mem-slot?Label=J0304/mem-module - -name:/platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,aa -REFPROP _fru_parent /frutree/chassis/system-board/mem-slot?Label=J0305/mem-module - -name:/platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,ac -REFPROP _fru_parent /frutree/chassis/system-board/mem-slot?Label=J0406/mem-module - -name:/platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,ae -REFPROP _fru_parent /frutree/chassis/system-board/mem-slot?Label=J0407/mem-module - -/* - * _fru_parent CPU, memory-controller devices - */ -_class:/PLATFORM_CLASS/cpu?ID=0 -REFPROP _fru_parent /frutree/chassis/system-board/cpu-slot?Slot=0/cpu-module - -name:/platform/memory-controller?portid=0 -REFPROP _fru_parent /frutree/chassis/system-board/cpu-slot?Slot=0/cpu-module - -_class:/PLATFORM_CLASS/cpu?ID=1 -REFPROP _fru_parent /frutree/chassis/system-board/cpu-slot?Slot=1/cpu-module - -name:/platform/memory-controller?portid=0x1 -REFPROP _fru_parent /frutree/chassis/system-board/cpu-slot?Slot=0x1/cpu-module - -/* - * _fru_parent UPA devices - */ -_class:/PLATFORM_CLASS/upa/display?upa-portid=0 -REFPROP _fru_parent /frutree/chassis/system-board/upa-slot?Slot=0/upa-card - -_class:/PLATFORM_CLASS/upa/display?upa-portid=1 -REFPROP _fru_parent /frutree/chassis/system-board/upa-slot?Slot=1/upa-card - -/* - * _fru_parent motherboard - */ -_class:/PLATFORM_CLASS -REFPROP _fru_parent /frutree/chassis/system-board - -/* - * _fru_parent temperature device - */ -_class:/PLATFORM_CLASS/pci/ebus/i2c?UnitAddress=1,30/temperature-device?UnitAddress=0,30 -REFPROP _fru_parent /frutree/chassis/system-board/cpu-slot?Slot=0/cpu-module - -_class:/PLATFORM_CLASS/pci/ebus/i2c?UnitAddress=1,30/temperature-device?UnitAddress=0,98 -REFPROP _fru_parent /frutree/chassis/system-board/cpu-slot?Slot=1/cpu-module - -/* - * _fru_parent memory modules - */ -name:/platform/memory-controller?portid=0/memory-module-group?ID=0/memory-module?ID=0 -REFPROP _fru_parent /frutree/chassis/system-board/mem-slot?Label=J0100/mem-module - -name:/platform/memory-controller?portid=0/memory-module-group?ID=0/memory-module?ID=1 -REFPROP _fru_parent /frutree/chassis/system-board/mem-slot?Label=J0202/mem-module - -name:/platform/memory-controller?portid=0/memory-module-group?ID=0/memory-module?ID=2 -REFPROP _fru_parent /frutree/chassis/system-board/mem-slot?Label=J0304/mem-module - -name:/platform/memory-controller?portid=0/memory-module-group?ID=0/memory-module?ID=3 -REFPROP _fru_parent /frutree/chassis/system-board/mem-slot?Label=J0406/mem-module - -name:/platform/memory-controller?portid=0/memory-module-group?ID=1/memory-module?ID=0 -REFPROP _fru_parent /frutree/chassis/system-board/mem-slot?Label=J0101/mem-module - -name:/platform/memory-controller?portid=0/memory-module-group?ID=1/memory-module?ID=1 -REFPROP _fru_parent /frutree/chassis/system-board/mem-slot?Label=J0203/mem-module - -name:/platform/memory-controller?portid=0/memory-module-group?ID=1/memory-module?ID=2 -REFPROP _fru_parent /frutree/chassis/system-board/mem-slot?Label=J0305/mem-module - -name:/platform/memory-controller?portid=0/memory-module-group?ID=1/memory-module?ID=3 -REFPROP _fru_parent /frutree/chassis/system-board/mem-slot?Label=J0407/mem-module - -/* - * Populate PCI slots - */ -name:/frutree/chassis/system-board/pci-slot?Label=J2601 -REFNODE pci-card fru WITH _class:/PLATFORM_CLASS/pci?UnitAddress=8,700000/picl?DeviceID=1 - -name:/frutree/chassis/system-board/pci-slot?Label=J2501 -REFNODE pci-card fru WITH _class:/PLATFORM_CLASS/pci?UnitAddress=8,700000/picl?DeviceID=2 - -name:/frutree/chassis/system-board/pci-slot?Label=J2401 -REFNODE pci-card fru WITH _class:/PLATFORM_CLASS/pci?UnitAddress=8,700000/picl?DeviceID=3 - -name:/frutree/chassis/system-board/pci-slot?Label=J2301 -REFNODE pci-card fru WITH _class:/PLATFORM_CLASS/pci?UnitAddress=8,600000/picl?DeviceID=1 - -/* - * _fru_parent PCI devices - */ -_class:/PLATFORM_CLASS/pci?UnitAddress=8,700000/picl?DeviceID=1 -REFPROP _fru_parent frutree/chassis/system-board/pci-slot?Label=J2601/pci-card - -_class:/PLATFORM_CLASS/pci?UnitAddress=8,700000/picl?DeviceID=2 -REFPROP _fru_parent frutree/chassis/system-board/pci-slot?Label=J2501/pci-card - -_class:/PLATFORM_CLASS/pci?UnitAddress=8,700000/picl?DeviceID=3 -REFPROP _fru_parent frutree/chassis/system-board/pci-slot?Label=J2401/pci-card - -_class:/PLATFORM_CLASS/pci?UnitAddress=8,600000/picl?DeviceID=1 -REFPROP _fru_parent frutree/chassis/system-board/pci-slot?Label=J2301/pci-card - diff --git a/usr/src/cmd/picl/plugins/sun4u/frudata/Makefile b/usr/src/cmd/picl/plugins/sun4u/frudata/Makefile deleted file mode 100644 index 771bb64bd4..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/frudata/Makefile +++ /dev/null @@ -1,110 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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. -# - -LIBRARY= libpiclfrudata.a -VERS= .1 -OBJECTS= fru_data.o - -# include library definitions -include $(SRC)/Makefile.psm -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/sun4u - -include $(SRC)/cmd/picl/plugins/Makefile.com - -LIBLINKS= libpiclfrudata.so - -SRCS= $(OBJECTS:%.o=%.c) - -LIBS = $(DYNLIB) - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CLOBBERFILES += $(LIBLINKS) -CSTYLE = cstyle -p -P -HDRCHK = hdrchk - - -CPPFLAGS += -I$(SRC)/lib/libfru/include -I../lib/fruaccess -CPPFLAGS += -I$(SRC)/cmd/picl/plugins/lib/picld_pluginutil -CPPFLAGS += -I$(SRC)/lib/libfruutils/ -LDLIBS += -L$(SRC)/cmd/picl/plugins/sun4u/lib/fruaccess -LDLIBS += -L$(SRC)/lib/libfruutils/$(MACH) -LDLIBS += -L$(SRC)/cmd/picl/plugins/common/frutree -LDLIBS += -L$(ROOT)/usr/lib/picl/plugins -LDLIBS += -lc -lnvpair -lfruutils -LDLIBS += -lpicltree -lpiclfrutree -lfruaccess -lpicld_pluginutil -LDLIBS += -R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/\$$PLATFORM/lib:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins:/usr/platform/sun4u/lib -.KEEP_STATE: - - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -POFILE= $(LIBRARY:.a=.po) -POFILES= frudata.po - -all: $(LIBS) $(LIBLINKS) $(CONF) - -install: $(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) - -check-style : - $(CSTYLE) *.c *.h - $(HDRCHK) *.h - -_msg: $(MSGDOMAIN) $(POFILE) - $(RM) $(MSGDOMAIN)/$(POFILE) - $(CP) $(POFILE) $(MSGDOMAIN) - -$(MSGDOMAIN): - $(INS.dir) - -$(POFILE): .WAIT $(POFILES) - $(RM) $@ - $(CAT) $(POFILES) > $@ - -$(POFILES): - $(RM) messages.po - $(XGETTEXT) $(XGETFLAGS) *.[ch]* */*.[ch]* - $(SED) -e '/^# msg/d' -e '/^domain/d' messages.po > $@ - $(RM) messages.po - -$(LIBLINKS): FRC - $(RM) $@; $(SYMLINK) $(DYNLIB) $@ - -# include library targets -include $(SRC)/cmd/picl/plugins/Makefile.targ -include $(SRC)/lib/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/frudata/fru_data.c b/usr/src/cmd/picl/plugins/sun4u/frudata/fru_data.c deleted file mode 100644 index e0849ebc47..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/frudata/fru_data.c +++ /dev/null @@ -1,2490 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "fru_tag.h" -#include "fru_data_impl.h" -#include "fru_data.h" -#include "picld_pluginutil.h" - -#pragma init(frudata_plugin_register) /* .init section */ - -static void frudata_plugin_init(void); -static void frudata_plugin_fini(void); -static container_tbl_t *container_table[TABLE_SIZE]; - -/* - * Locking Stragtegy : - * calling thread should hold the cont_tbl_lock during the course - * of container table lookup. release the cont_tbl_lock on lookup - * failure or on the condition wait. - * - * thread holding the container object rwlock should release lock - * and signal to unblock threads blocked on the condition variable - * upon i/o completion. - * - */ - -static pthread_mutex_t cont_tbl_lock = PTHREAD_MUTEX_INITIALIZER; - -static int add_row_to_table(hash_obj_t *, picl_nodehdl_t, - packet_t *, container_tbl_t *); - -static picld_plugin_reg_t frudata_reg_info = { - PICLD_PLUGIN_VERSION_1, - PICLD_PLUGIN_NON_CRITICAL, - "SUNW_piclfrudata", - frudata_plugin_init, /* init entry point */ - frudata_plugin_fini /* cleanup entry point */ -}; - -/* initialization function */ -static void -frudata_plugin_register(void) -{ - /* register plugin with daemon */ - if (picld_plugin_register(&frudata_reg_info) != PICL_SUCCESS) { - syslog(LOG_ERR, "SUNW_piclfrudata plugin registration failed"); - } -} - -static int -map_access_err(int err) -{ - switch (err) { - case ENFILE : - return (PICL_PROPEXISTS); - case EAGAIN : - return (PICL_NOSPACE); - case EPERM : - return (PICL_PERMDENIED); - case EEXIST : - return (PICL_PROPEXISTS); - default : - return (PICL_FAILURE); - } -} - -/* - * unlock_container_lock() should be always called by the thread holding the - * container object lock. it will signal block thread waiting on the condition - * variable. - */ - -static void -unlock_container_lock(container_tbl_t *cont_hash) -{ - (void) pthread_rwlock_unlock(&cont_hash->rwlock); - (void) pthread_mutex_lock(&cont_tbl_lock); - (void) pthread_cond_signal(&cont_hash->cond_var); - (void) pthread_mutex_unlock(&cont_tbl_lock); -} - - -/* volatile callback read routine */ -/* ARGSUSED */ -static int -frudata_read_callback(ptree_rarg_t *rarg, void *buf) -{ - return (PICL_SUCCESS); -} - -/* - * called to get hash object for specified node and object type from - * hash table. - */ -static container_tbl_t * -lookup_container_table(picl_nodehdl_t nodehdl, int object_type) -{ - int index_to_hash; - int retval = PICL_SUCCESS; - container_tbl_t *first_hash; - container_tbl_t *next_hash; - picl_nodehdl_t parenthdl = 0; - - switch (object_type) { - case SECTION_NODE: - retval = ptree_get_propval_by_name(nodehdl, PICL_PROP_PARENT, - &parenthdl, sizeof (picl_nodehdl_t)); - break; - case SEGMENT_NODE: - retval = ptree_get_propval_by_name(nodehdl, PICL_PROP_PARENT, - &parenthdl, sizeof (picl_nodehdl_t)); - retval = ptree_get_propval_by_name(parenthdl, PICL_PROP_PARENT, - &parenthdl, sizeof (picl_nodehdl_t)); - break; - case CONTAINER_NODE : - parenthdl = nodehdl; - break; - default : - return (NULL); - } - - if (retval != PICL_SUCCESS) { - return (NULL); - } - - index_to_hash = (parenthdl % TABLE_SIZE); - - first_hash = container_table[index_to_hash]; - - for (next_hash = first_hash; next_hash != NULL; - next_hash = next_hash->next) { - if (parenthdl == next_hash->picl_hdl) { - return (next_hash); - } - } - return (NULL); -} - -static int -lock_readwrite_lock(container_tbl_t *cont_obj, int operation) -{ - /* if write operation */ - if (operation == PICL_WRITE) { - return (pthread_rwlock_trywrlock(&cont_obj->rwlock)); - } - /* read operation */ - return (pthread_rwlock_tryrdlock(&cont_obj->rwlock)); -} - -/* - * lock the container table, do lookup for the container object - * in the container table. if container object found try to lock - * the container object, if lock on container object is busy wait - * on condition variable till the thread holding the container - * object lock signal it. - */ - -static container_tbl_t * -lock_container_lock(picl_nodehdl_t nodehdl, int object_type, int operation) -{ - container_tbl_t *cont_obj = NULL; - - (void) pthread_mutex_lock(&cont_tbl_lock); - - while (((cont_obj = lookup_container_table(nodehdl, object_type)) != - NULL) && (lock_readwrite_lock(cont_obj, operation) == EBUSY)) { - pthread_cond_wait(&cont_obj->cond_var, &cont_tbl_lock); - } - - (void) pthread_mutex_unlock(&cont_tbl_lock); - - return (cont_obj); -} - -static hash_obj_t * -lookup_node_object(picl_nodehdl_t nodehdl, int object_type, - container_tbl_t *cont_tbl) -{ - int index_to_hash; - hash_obj_t *first_hash; - hash_obj_t *next_hash; - - - index_to_hash = (nodehdl % TABLE_SIZE); - - first_hash = &cont_tbl->hash_obj[index_to_hash]; - - for (next_hash = first_hash->next; next_hash != NULL; - next_hash = next_hash->next) { - if ((nodehdl == next_hash->picl_hdl) && - (object_type == next_hash->object_type)) { - return (next_hash); - } - } - return (NULL); -} - -/* - * called to add newly created container hash table into container hash table. - * - */ -static void -add_tblobject_to_container_tbl(container_tbl_t *cont_tbl) -{ - int cnt; - int index_to_hash; - hash_obj_t *hash_ptr; - - index_to_hash = ((cont_tbl->picl_hdl) % TABLE_SIZE); - - cont_tbl->next = container_table[index_to_hash]; - container_table[index_to_hash] = cont_tbl; - hash_ptr = cont_tbl->hash_obj; - - /* initialize the bucket of this container hash table. */ - - for (cnt = 0; cnt < TABLE_SIZE; cnt++) { - hash_ptr->next = NULL; - hash_ptr->prev = NULL; - hash_ptr++; - } - if (cont_tbl->next != NULL) { - cont_tbl->next->prev = cont_tbl; - } -} - -static void -add_nodeobject_to_hashtable(hash_obj_t *hash_obj, container_tbl_t *cont_tbl) -{ - int index_to_hash; - hash_obj_t *hash_table; - - index_to_hash = ((hash_obj->picl_hdl) % TABLE_SIZE); - hash_table = &cont_tbl->hash_obj[index_to_hash]; - - hash_obj->next = hash_table->next; - hash_table->next = hash_obj; - - if (hash_obj->next != NULL) { - hash_obj->next->prev = hash_obj; - } -} - -static container_tbl_t * -alloc_container_table(picl_nodehdl_t nodehdl) -{ - container_tbl_t *cont_tbl; - - cont_tbl = malloc(sizeof (container_tbl_t)); - if (cont_tbl == NULL) { - return (NULL); - } - - cont_tbl->picl_hdl = nodehdl; - - cont_tbl->hash_obj = malloc(sizeof (hash_obj_t[TABLE_SIZE])); - cont_tbl->next = NULL; - cont_tbl->prev = NULL; - - if (cont_tbl->hash_obj == NULL) { - (void) free(cont_tbl); - return (NULL); - } - - (void) pthread_rwlock_init(&cont_tbl->rwlock, NULL); - (void) pthread_cond_init(&cont_tbl->cond_var, NULL); - - return (cont_tbl); -} - -/* - * called to allocate container node object for container property and a - * container table. - */ - -static hash_obj_t * -alloc_container_node_object(picl_nodehdl_t nodehdl) -{ - hash_obj_t *hash_obj; - fru_access_hdl_t acc_hdl; - container_node_t *cont_node; - - /* open the container (call fruaccess) */ - acc_hdl = fru_open_container(nodehdl); - if (acc_hdl == (container_hdl_t)0) { - return (NULL); - } - - /* allocate container node object */ - cont_node = malloc(sizeof (container_node_t)); - if (cont_node == NULL) { - return (NULL); - } - - /* allocate container hash object */ - hash_obj = malloc(sizeof (hash_obj_t)); - if (hash_obj == NULL) { - (void) free(cont_node); - return (NULL); - } - - cont_node->cont_hdl = acc_hdl; /* fruaccess handle */ - cont_node->section_list = NULL; - hash_obj->picl_hdl = nodehdl; /* picl node handle */ - hash_obj->object_type = CONTAINER_NODE; - hash_obj->u.cont_node = cont_node; - hash_obj->next = NULL; - hash_obj->prev = NULL; - - return (hash_obj); -} - -/* - * called to allocate node object for section node. - */ - -static hash_obj_t * -alloc_section_node_object(picl_nodehdl_t nodehdl, section_t *section) -{ - hash_obj_t *hash_obj; - section_node_t *sec_node; - - /* allocate section node object */ - sec_node = malloc(sizeof (section_node_t)); - if (sec_node == NULL) { - return (NULL); - } - - /* allocate section hash object */ - hash_obj = malloc(sizeof (hash_obj_t)); - if (hash_obj == NULL) { - (void) free(sec_node); - return (NULL); - } - - sec_node->section_hdl = section->handle; /* fruaccess hdl. */ - sec_node->segment_list = NULL; - sec_node->next = NULL; - sec_node->num_of_segment = -1; - - hash_obj->picl_hdl = nodehdl; /* picl node handle */ - hash_obj->object_type = SECTION_NODE; - hash_obj->u.sec_node = sec_node; - hash_obj->next = NULL; - hash_obj->prev = NULL; - - return (hash_obj); -} - -/* - * called to allocate segment node object. - */ - -static hash_obj_t * -alloc_segment_node_object(picl_nodehdl_t nodehdl, segment_t *segment) -{ - hash_obj_t *hash_obj; - segment_node_t *seg_node; - - /* allocate segment node object */ - seg_node = malloc(sizeof (segment_node_t)); - if (seg_node == NULL) { - return (NULL); - } - - /* allocate segment hash object */ - hash_obj = malloc(sizeof (hash_obj_t)); - if (hash_obj == NULL) { - free(seg_node); - return (NULL); - } - - /* fruaccess handle */ - seg_node->segment_hdl = segment->handle; - seg_node->packet_list = NULL; - seg_node->next = NULL; - seg_node->num_of_pkt = -1; - - /* picl node handle */ - hash_obj->picl_hdl = nodehdl; - hash_obj->object_type = SEGMENT_NODE; - hash_obj->u.seg_node = seg_node; - hash_obj->next = NULL; - hash_obj->prev = NULL; - - return (hash_obj); -} - -/* - * called to allocate node object for packet. - */ - -static hash_obj_t * -alloc_packet_node_object(picl_nodehdl_t nodehdl, packet_t *packet) -{ - hash_obj_t *hash_obj; - packet_node_t *pkt_node; - - /* allocate packet node object */ - pkt_node = malloc(sizeof (packet_node_t)); - if (pkt_node == NULL) { - return (NULL); - } - - /* allocate packet hash object */ - hash_obj = malloc(sizeof (hash_obj_t)); - if (hash_obj == NULL) { - free(pkt_node); - return (NULL); - } - - /* fruaccess handle */ - pkt_node->pkt_handle = packet->handle; - pkt_node->next = NULL; - - hash_obj->picl_hdl = nodehdl; /* picl node handle */ - hash_obj->object_type = PACKET_NODE; - hash_obj->u.pkt_node = pkt_node; - hash_obj->next = NULL; - hash_obj->prev = NULL; - - return (hash_obj); -} - -/* add new section hash object to the section list */ -static void -add_to_section_list(hash_obj_t *container_hash, hash_obj_t *sect_hash) -{ - hash_obj_t *next_hash; - - sect_hash->u.sec_node->container_hdl = container_hash->picl_hdl; - if (container_hash->u.cont_node->section_list == NULL) { - container_hash->u.cont_node->section_list = sect_hash; - return; - } - - for (next_hash = container_hash->u.cont_node->section_list; - next_hash->u.sec_node->next != NULL; - next_hash = next_hash->u.sec_node->next) { - ; - } - - next_hash->u.sec_node->next = sect_hash; -} - -/* add new segment hash object to the existing list */ - -static void -add_to_segment_list(hash_obj_t *parent_obj, hash_obj_t *child_obj) -{ - hash_obj_t *next_hash; - - child_obj->u.seg_node->sec_nodehdl = parent_obj->picl_hdl; - if (parent_obj->u.sec_node->segment_list == NULL) { - parent_obj->u.sec_node->segment_list = child_obj; - return; - } - - for (next_hash = parent_obj->u.sec_node->segment_list; - next_hash->u.seg_node->next != NULL; - next_hash = next_hash->u.seg_node->next) { - ; - } - next_hash->u.seg_node->next = child_obj; -} - -/* - * called to add packet node object to the existing packet list. - */ -static void -add_to_packet_list(hash_obj_t *parent_obj, hash_obj_t *child_obj) -{ - hash_obj_t *next_hash; - - if (parent_obj->u.seg_node->packet_list == NULL) { - parent_obj->u.seg_node->packet_list = child_obj; - return; - } - - for (next_hash = parent_obj->u.seg_node->packet_list; - next_hash->u.pkt_node->next != NULL; - next_hash = next_hash->u.pkt_node->next) { - ; - } - next_hash->u.pkt_node->next = child_obj; -} - -/* - * free the packet hash list. - */ - -static void -free_packet_list(hash_obj_t *hash_obj, container_tbl_t *cont_tbl) -{ - hash_obj_t *next_obj; - hash_obj_t *free_obj; - - /* packet hash object list */ - next_obj = hash_obj->u.seg_node->packet_list; - while (next_obj != NULL) { - free_obj = next_obj; - next_obj = next_obj->u.pkt_node->next; - if (free_obj->prev == NULL) { /* first node object */ - cont_tbl->hash_obj[(free_obj->picl_hdl % - TABLE_SIZE)].next = free_obj->next; - if (free_obj->next != NULL) { - free_obj->next->prev = NULL; - } - } else { - free_obj->prev->next = free_obj->next; - if (free_obj->next != NULL) { - free_obj->next->prev = free_obj->prev; - } - } - - free(free_obj->u.pkt_node); - free(free_obj); - } - hash_obj->u.seg_node->packet_list = NULL; -} - -/* - * free the segment hash node object. - */ - -static void -free_segment_node(hash_obj_t *hash_obj, picl_nodehdl_t nodehdl, - container_tbl_t *cont_tbl) -{ - hash_obj_t *prev_hash_obj; - hash_obj_t *next_obj; - - /* segment hash object list */ - next_obj = hash_obj->u.sec_node->segment_list; - if (next_obj == NULL) { - return; - } - - /* find the segment hash from the segment list to be deleted. */ - if (next_obj->picl_hdl == nodehdl) { - hash_obj->u.sec_node->segment_list = - next_obj->u.seg_node->next; - } else { - while (next_obj != NULL) { - if (next_obj->picl_hdl != nodehdl) { - prev_hash_obj = next_obj; - next_obj = next_obj->u.seg_node->next; - } else { - prev_hash_obj->u.seg_node->next = - next_obj->u.seg_node->next; - break; - } - } - - if (next_obj == NULL) { - return; - } - - } - - if (next_obj->prev == NULL) { - cont_tbl->hash_obj[(next_obj->picl_hdl % TABLE_SIZE)].next = - next_obj->next; - if (next_obj->next != NULL) - next_obj->next->prev = NULL; - } else { - next_obj->prev->next = next_obj->next; - if (next_obj->next != NULL) { - next_obj->next->prev = next_obj->prev; - } - } - - free_packet_list(next_obj, cont_tbl); - free(next_obj->u.seg_node); - free(next_obj); -} - - -/* - * Description : frudata_delete_segment is called when volatile property - * delete_segment under class segment is accessed. - * - * Arguments : ptree_warg_t is holds node handle of segment node and property - * handle of delete_segment property. - */ - -/* ARGSUSED */ -static int -frudata_delete_segment(ptree_warg_t *warg, const void *buf) -{ - int retval; - int num_of_segment; - int num_of_pkt; - int pkt_cnt; - int count; - packet_t *pkt_buf; - segment_t *seg_buffer; - hash_obj_t *seg_hash; - hash_obj_t *pkt_hash; - hash_obj_t *hash_obj; - fru_segdesc_t *desc; - picl_nodehdl_t sec_nodehdl; - container_tbl_t *cont_tbl; - fru_access_hdl_t seg_acc_hdl; - fru_access_hdl_t new_sec_acc_hdl; - - cont_tbl = lock_container_lock(warg->nodeh, SEGMENT_NODE, PICL_WRITE); - if (!cont_tbl) { - return (PICL_FAILURE); - } - - /* segment hash */ - hash_obj = lookup_node_object(warg->nodeh, SEGMENT_NODE, cont_tbl); - if (hash_obj == NULL) { - unlock_container_lock(cont_tbl); - return (PICL_FAILURE); - } - - /* fruaccess segment handle */ - seg_acc_hdl = hash_obj->u.seg_node->segment_hdl; - - /* call fruaccess to get new section handle */ - if (fru_delete_segment(seg_acc_hdl, &new_sec_acc_hdl, &warg->cred) - == -1) { - unlock_container_lock(cont_tbl); - return (map_access_err(errno)); - } - - if (ptree_delete_node(warg->nodeh) != PICL_SUCCESS) { - unlock_container_lock(cont_tbl); - return (PICL_FAILURE); - } - - if (ptree_destroy_node(warg->nodeh) != PICL_SUCCESS) { - unlock_container_lock(cont_tbl); - return (PICL_FAILURE); - } - - - /* get section node handle */ - sec_nodehdl = hash_obj->u.seg_node->sec_nodehdl; - /* get section hash */ - hash_obj = lookup_node_object(sec_nodehdl, SECTION_NODE, cont_tbl); - if (hash_obj == NULL) { - unlock_container_lock(cont_tbl); - return (PICL_FAILURE); - } - - free_segment_node(hash_obj, warg->nodeh, cont_tbl); - - hash_obj->u.sec_node->num_of_segment = 0; - - /* call fruaccess with new section handle */ - num_of_segment = fru_get_num_segments(new_sec_acc_hdl, &warg->cred); - if (num_of_segment <= 0) { - unlock_container_lock(cont_tbl); - return (PICL_SUCCESS); - } - - seg_buffer = alloca(sizeof (segment_t) * num_of_segment); - if (seg_buffer == NULL) { - unlock_container_lock(cont_tbl); - return (PICL_FAILURE); - } - - /* get all the segments */ - retval = fru_get_segments(new_sec_acc_hdl, seg_buffer, - num_of_segment, &warg->cred); - if (retval == -1) { - unlock_container_lock(cont_tbl); - return (PICL_FAILURE); - } - - seg_hash = hash_obj->u.sec_node->segment_list; - if (seg_hash == NULL) { - unlock_container_lock(cont_tbl); - return (PICL_SUCCESS); - } - - /* rebuild the segment list */ - for (count = 0; count < num_of_segment; count++) { - desc = (fru_segdesc_t *)&seg_buffer[count].descriptor; - if (!(desc->field.field_perm & SEGMENT_READ)) { - seg_hash = seg_hash->u.seg_node->next; - continue; - } - - if (desc->field.opaque) { - seg_hash = seg_hash->u.seg_node->next; - continue; - } - - hash_obj->u.sec_node->num_of_segment++; - - seg_hash->u.seg_node->segment_hdl = seg_buffer[count].handle; - - num_of_pkt = fru_get_num_packets(seg_buffer[count].handle, - &warg->cred); - if (num_of_pkt <= 0) { - seg_hash = seg_hash->u.seg_node->next; - continue; - } - - pkt_buf = alloca(sizeof (packet_t) * num_of_pkt); - if (pkt_buf == NULL) { - unlock_container_lock(cont_tbl); - return (PICL_FAILURE); - } - - retval = fru_get_packets(seg_buffer[count].handle, pkt_buf, - num_of_pkt, &warg->cred); - if (retval == -1) { - seg_hash = seg_hash->u.seg_node->next; - continue; - } - - pkt_hash = seg_hash->u.seg_node->packet_list; - if (pkt_hash == NULL) { - seg_hash = seg_hash->u.seg_node->next; - continue; - } - - /* rebuild the packet list */ - for (pkt_cnt = 0; pkt_cnt < num_of_pkt; pkt_cnt++) { - pkt_hash->u.pkt_node->pkt_handle = - pkt_buf[pkt_cnt].handle; - pkt_hash = pkt_hash->u.pkt_node->next; - } - - seg_hash = seg_hash->u.seg_node->next; - if (seg_hash == NULL) { - break; - } - } - - /* updated with new section handle */ - hash_obj->u.sec_node->section_hdl = new_sec_acc_hdl; - - unlock_container_lock(cont_tbl); - - return (PICL_SUCCESS); -} - -/* - * Description : frudata_read_payload is called when volatile property - * payload is read. - * - * Arguments : ptree_rarg_t holds node handle of the table property. - * and property handle of the payload cell. - * p_buf contains payload data when function returns. - * - * Returns : PICL_SUCCESS on success. - * PICL_FAILURE on failure. - */ - -static int -frudata_read_payload(ptree_rarg_t *rarg, void *buf) -{ - int num_bytes; - hash_obj_t *hash_obj; - fru_access_hdl_t pkt_acc_hdl; - container_tbl_t *cont_tbl; - - - cont_tbl = lock_container_lock(rarg->nodeh, SEGMENT_NODE, PICL_READ); - if (!cont_tbl) { - return (PICL_FAILURE); - } - - hash_obj = lookup_node_object(rarg->proph, PACKET_NODE, cont_tbl); - if (hash_obj == NULL) { - unlock_container_lock(cont_tbl); - return (PICL_FAILURE); - } - - pkt_acc_hdl = hash_obj->u.pkt_node->pkt_handle; - - num_bytes = fru_get_payload(pkt_acc_hdl, buf, - hash_obj->u.pkt_node->paylen, &rarg->cred); - if (num_bytes != hash_obj->u.pkt_node->paylen) { - unlock_container_lock(cont_tbl); - return (PICL_FAILURE); - } - - unlock_container_lock(cont_tbl); - - return (PICL_SUCCESS); -} - -/* - * Description : frudata_write_payload is called when payload property cell - * is accessed. - * - * Arguments : ptree_warg_t holds node handle of the packet-table. - * and property handle of the payload cell. - * p_buf contains payload data. - * - * Returns : PICL_SUCCESS on success. - * - */ - -static int -frudata_write_payload(ptree_warg_t *warg, const void *buf) -{ - int retval; - hash_obj_t *hash_obj; - fru_access_hdl_t pkt_acc_hdl; - container_tbl_t *cont_tbl; - - cont_tbl = lock_container_lock(warg->nodeh, SEGMENT_NODE, PICL_WRITE); - if (!cont_tbl) { - return (PICL_FAILURE); - } - - hash_obj = lookup_node_object(warg->proph, PACKET_NODE, cont_tbl); - if (hash_obj == NULL) { - unlock_container_lock(cont_tbl); - return (PICL_FAILURE); - } - - pkt_acc_hdl = hash_obj->u.pkt_node->pkt_handle; - - retval = fru_update_payload(pkt_acc_hdl, buf, - hash_obj->u.pkt_node->paylen, - &pkt_acc_hdl, &warg->cred); - if (retval == -1) { - unlock_container_lock(cont_tbl); - return (map_access_err(errno)); - } - - hash_obj->u.pkt_node->pkt_handle = pkt_acc_hdl; - - unlock_container_lock(cont_tbl); - - return (PICL_SUCCESS); -} - -/* - * callback volatile function is called when tag volatile property - * is accessed. this routine holds a read lock over the hash table - * and do a lookup over the property handle i.e property handle of - * the tag property passed in rarg parameter. - * tag value is copied into the buffer (void *buf). - */ - -static int -frudata_read_tag(ptree_rarg_t *rarg, void *buf) -{ - int retval; - hash_obj_t *hash_obj; - picl_prophdl_t rowproph; - container_tbl_t *cont_tbl; - - cont_tbl = lock_container_lock(rarg->nodeh, SEGMENT_NODE, PICL_READ); - if (!cont_tbl) { - return (PICL_FAILURE); - } - - retval = ptree_get_next_by_row(rarg->proph, &rowproph); - if (retval != PICL_SUCCESS) { - unlock_container_lock(cont_tbl); - return (retval); - } - - hash_obj = lookup_node_object(rowproph, PACKET_NODE, cont_tbl); - if (hash_obj == NULL) { - unlock_container_lock(cont_tbl); - return (PICL_FAILURE); - } - - (void) memcpy(buf, &hash_obj->u.pkt_node->tag, sizeof (tag_t)); - - unlock_container_lock(cont_tbl); - return (PICL_SUCCESS); -} - - -/* - * Description : create_packet_table() is called by fru_delete_packet_row(), - * to create a packet-table volatile property. it's called after - * deleting the packet-table. fru_delete_packet_row() calls - * frudata_read_packet_table() to add rows into the table. - */ - -static int -create_packet_table(picl_nodehdl_t seghdl, picl_prophdl_t *thdl) -{ - int retval; - picl_prophdl_t tblhdl; - picl_nodehdl_t prophdl; - ptree_propinfo_t prop; - - retval = ptree_create_table(&tblhdl); - if (retval != PICL_SUCCESS) { - return (retval); - } - - prop.version = PTREE_PROPINFO_VERSION; - prop.piclinfo.type = PICL_PTYPE_TABLE; - prop.piclinfo.accessmode = PICL_READ|PICL_WRITE; - prop.piclinfo.size = sizeof (picl_prophdl_t); - prop.read = NULL; - prop.write = NULL; - (void) strcpy(prop.piclinfo.name, PICL_PROP_PACKET_TABLE); - - retval = ptree_create_and_add_prop(seghdl, &prop, &tblhdl, - &prophdl); - if (retval != PICL_SUCCESS) { - return (retval); - } - - /* hold the table handle */ - *thdl = tblhdl; - - return (PICL_SUCCESS); -} - -/* - * Description : frudata_delete_packet is called when write operation is - * performed on tag volatile property. - * - * - * Arguments : ptree_warg_t holds node handle to the segment node. - * and property handle of the tag cell in the packet table to be - * deleted. - * buf contains the tag data + plus DELETE_KEY_TAG - * - * Returns : PICL_SUCCESS on success - * - */ - -static int -frudata_delete_packet(ptree_warg_t *warg, const void *buf) -{ - int count = 0; - int retval; - int num_of_pkt; - uint64_t tag; - packet_t *packet; - hash_obj_t *seg_hash_obj; - hash_obj_t *pkt_hash_obj; - container_tbl_t *cont_tbl; - picl_prophdl_t tblhdl; - picl_prophdl_t rowproph; - fru_access_hdl_t new_seg_acc_hdl; - - cont_tbl = lock_container_lock(warg->nodeh, SEGMENT_NODE, PICL_WRITE); - if (!cont_tbl) { - return (PICL_FAILURE); - } - - /* get the payload property handle */ - retval = ptree_get_next_by_row(warg->proph, &rowproph); - if (retval != PICL_SUCCESS) { - unlock_container_lock(cont_tbl); - return (retval); - } - - /* do lookup on payload property handle */ - pkt_hash_obj = lookup_node_object(rowproph, PACKET_NODE, cont_tbl); - if (pkt_hash_obj == NULL) { - unlock_container_lock(cont_tbl); - return (PICL_FAILURE); - } - - /* verify the tag */ - tag = pkt_hash_obj->u.pkt_node->tag.raw_data; - tag &= FRUDATA_DELETE_TAG_MASK; - tag |= FRUDATA_DELETE_TAG_KEY; - if (*(uint64_t *)buf != tag) { - unlock_container_lock(cont_tbl); - return (PICL_FAILURE); - } - - /* call fruaccess module */ - retval = fru_delete_packet(pkt_hash_obj->u.pkt_node->pkt_handle, - &new_seg_acc_hdl, &warg->cred); - if (retval == -1) { - unlock_container_lock(cont_tbl); - return (map_access_err(errno)); - } - - /* delete the packet table */ - retval = ptree_get_prop_by_name(warg->nodeh, PICL_PROP_PACKET_TABLE, - &tblhdl); - if (retval != PICL_SUCCESS) { - unlock_container_lock(cont_tbl); - return (retval); - } - - retval = ptree_delete_prop(tblhdl); - if (retval != PICL_SUCCESS) { - unlock_container_lock(cont_tbl); - return (retval); - } - - retval = ptree_destroy_prop(tblhdl); - if (retval != PICL_SUCCESS) { - unlock_container_lock(cont_tbl); - return (retval); - } - - - seg_hash_obj = lookup_node_object(warg->nodeh, SEGMENT_NODE, - cont_tbl); - if (seg_hash_obj == NULL) { - unlock_container_lock(cont_tbl); - return (PICL_FAILURE); - } - - /* free all packet hash object */ - free_packet_list(seg_hash_obj, cont_tbl); - - /* recreate the packet table */ - retval = create_packet_table(warg->nodeh, &tblhdl); - if (retval != PICL_SUCCESS) { - unlock_container_lock(cont_tbl); - return (retval); - } - - seg_hash_obj->u.seg_node->segment_hdl = new_seg_acc_hdl; - - seg_hash_obj->u.seg_node->num_of_pkt = 0; - - num_of_pkt = fru_get_num_packets(new_seg_acc_hdl, &warg->cred); - if (num_of_pkt == -1) { - unlock_container_lock(cont_tbl); - return (PICL_FAILURE); - } - - if (num_of_pkt == 0) { - unlock_container_lock(cont_tbl); - return (PICL_SUCCESS); - } - - packet = alloca(sizeof (packet_t) * num_of_pkt); - if (packet == NULL) { - unlock_container_lock(cont_tbl); - return (PICL_FAILURE); - } - - retval = fru_get_packets(new_seg_acc_hdl, packet, - num_of_pkt, &warg->cred); - if (retval == -1) { - unlock_container_lock(cont_tbl); - return (PICL_FAILURE); - } - - /* rebuild the packet hash object */ - for (count = 0; count < num_of_pkt; count++) { - (void) add_row_to_table(seg_hash_obj, tblhdl, packet+count, - cont_tbl); - } - - seg_hash_obj->u.seg_node->num_of_pkt = num_of_pkt; - - (void) ptree_update_propval_by_name(warg->nodeh, PICL_PROP_NUM_TAGS, - &num_of_pkt, sizeof (uint32_t)); - - unlock_container_lock(cont_tbl); - - return (PICL_SUCCESS); -} - -/* - * called from frudata_delete_packet(), frudata_add_packet(), - * frudata_read_packet() callback routine to add packet into - * the packet table. it also create hash node object for each - * individual packet and add the object to the packet list. - */ - -static int -add_row_to_table(hash_obj_t *seg_obj, picl_nodehdl_t tblhdl, packet_t *pkt, - container_tbl_t *cont_tbl) -{ - int retval; - int paylen; - size_t tag_size; - hash_obj_t *hash_obj; - fru_tagtype_t tagtype; - picl_prophdl_t prophdl[NUM_OF_COL_IN_PKT_TABLE]; - ptree_propinfo_t prop; - - prop.version = PTREE_PROPINFO_VERSION; - - prop.piclinfo.type = PICL_PTYPE_BYTEARRAY; - prop.piclinfo.accessmode = PICL_READ|PICL_WRITE|PICL_VOLATILE; - prop.piclinfo.size = sizeof (fru_tag_t); - prop.read = frudata_read_tag; - prop.write = frudata_delete_packet; - - /* tag property node */ - (void) strcpy(prop.piclinfo.name, PICL_PROP_TAG); - - paylen = get_payload_length((void *)&pkt->tag); - if (paylen < 0) { - return (PICL_FAILURE); - } - - retval = ptree_create_prop(&prop, NULL, &prophdl[0]); - if (retval != PICL_SUCCESS) { - return (retval); - } - - - /* payload property node */ - prop.piclinfo.type = PICL_PTYPE_BYTEARRAY; - prop.piclinfo.size = paylen; - (void) strcpy(prop.piclinfo.name, PICL_PROP_PAYLOAD); - prop.piclinfo.accessmode = PICL_READ|PICL_WRITE|PICL_VOLATILE; - prop.read = frudata_read_payload; - prop.write = frudata_write_payload; - - retval = ptree_create_prop(&prop, NULL, &prophdl[1]); - if (retval != PICL_SUCCESS) { - return (retval); - } - - hash_obj = alloc_packet_node_object(prophdl[1], pkt); - if (hash_obj == NULL) { - return (PICL_FAILURE); - } - - retval = ptree_add_row_to_table(tblhdl, NUM_OF_COL_IN_PKT_TABLE, - prophdl); - if (retval != PICL_SUCCESS) { - free(hash_obj); - return (retval); - } - - tagtype = get_tag_type((fru_tag_t *)&pkt->tag); - if (tagtype == -1) { - return (PICL_FAILURE); - } - - tag_size = get_tag_size(tagtype); - if (tag_size == (size_t)-1) { - return (PICL_FAILURE); - } - - hash_obj->u.pkt_node->paylen = paylen; - hash_obj->u.pkt_node->tag.raw_data = 0; - (void) memcpy(&hash_obj->u.pkt_node->tag, &pkt->tag, tag_size); - - add_nodeobject_to_hashtable(hash_obj, cont_tbl); - - add_to_packet_list(seg_obj, hash_obj); - - return (PICL_SUCCESS); -} - -/* - * called from frudata_read_segment() callback routine. it's called after - * creating the packet table under class segment. this routine reads the - * segment data to get total number of packets in the segments and add - * the tag and payload data into the table. it calls add_row_to_table - * routine to add individual row into the packet table. - */ - -static int -frudata_read_packet(picl_nodehdl_t nodeh, picl_prophdl_t *tblhdl, - container_tbl_t *cont_tbl, door_cred_t *cred) -{ - int cnt; - int retval; - int num_of_pkt; - packet_t *packet; - hash_obj_t *hash_obj; - fru_access_hdl_t seg_acc_hdl; - - hash_obj = lookup_node_object(nodeh, SEGMENT_NODE, cont_tbl); - if (hash_obj == NULL) { - return (PICL_FAILURE); - } - - if (hash_obj->u.seg_node->num_of_pkt == -1) { - /* get the access handle */ - seg_acc_hdl = hash_obj->u.seg_node->segment_hdl; - /* get total number of packets */ - num_of_pkt = fru_get_num_packets(seg_acc_hdl, cred); - if (num_of_pkt < 0) { - hash_obj->u.seg_node->num_of_pkt = 0; - return (map_access_err(errno)); - } - - if (num_of_pkt == 0) { - hash_obj->u.seg_node->num_of_pkt = 0; - return (0); - } - - /* allocate buffer */ - packet = alloca(sizeof (packet_t) * num_of_pkt); - if (packet == NULL) { - hash_obj->u.seg_node->num_of_pkt = 0; - return (0); - } - - /* get all the packet into the packet buffer */ - retval = fru_get_packets(seg_acc_hdl, packet, num_of_pkt, cred); - if (retval == -1) { - return (0); - } - - /* add payload and tag into the table. */ - for (cnt = 0; cnt < num_of_pkt; cnt++) { - (void) add_row_to_table(hash_obj, *tblhdl, packet+cnt, - cont_tbl); - } - - hash_obj->u.seg_node->num_of_pkt = num_of_pkt; - } - return (0); -} - - -/* - * Description : frudata_add_packet is called when add-packet volatile - * property is accessed. - * - * Arguments : ptree_warg_t holds node handle of the segment node and - * property handle of add-packet property. - * p_buf- contains packet data to be added. - * - * Return : PICL_SUCCESS on success. - * - */ - -/* ARGSUSED */ -static int -frudata_add_packet(ptree_warg_t *warg, const void *buf) -{ - size_t tag_size; - int paylen; - int retval; - int num_of_pkt; - int cnt; - packet_t packet; - packet_t *pkt_buf; - hash_obj_t *hash_obj; - hash_obj_t *pkt_hash; - container_tbl_t *cont_tbl; - fru_tagtype_t tagtype; - picl_prophdl_t tblhdl; - fru_access_hdl_t seg_acc_hdl; - fru_access_hdl_t new_seg_acc_hdl; - - cont_tbl = lock_container_lock(warg->nodeh, SEGMENT_NODE, PICL_WRITE); - if (!cont_tbl) { - return (PICL_FAILURE); - } - - hash_obj = lookup_node_object(warg->nodeh, SEGMENT_NODE, cont_tbl); - if (hash_obj == NULL) { - unlock_container_lock(cont_tbl); - return (PICL_FAILURE); - } - - seg_acc_hdl = hash_obj->u.seg_node->segment_hdl; - - tagtype = get_tag_type((void *)buf); - if (tagtype == -1) { - unlock_container_lock(cont_tbl); - return (PICL_FAILURE); - } - - tag_size = get_tag_size(tagtype); - if (tag_size == (size_t)-1) { - unlock_container_lock(cont_tbl); - return (PICL_FAILURE); - } - - paylen = get_payload_length((void *)buf); - if (paylen == -1) { - unlock_container_lock(cont_tbl); - return (PICL_FAILURE); - } - - packet.tag = 0; - (void) memcpy(&packet.tag, buf, tag_size); - - retval = fru_append_packet(seg_acc_hdl, &packet, (char *)buf + tag_size, - paylen, &new_seg_acc_hdl, &warg->cred); - if (retval == -1) { - unlock_container_lock(cont_tbl); - return (map_access_err(errno)); - } - - retval = ptree_get_propval_by_name(warg->nodeh, - PICL_PROP_PACKET_TABLE, &tblhdl, sizeof (picl_prophdl_t)); - if (retval != PICL_SUCCESS) { - unlock_container_lock(cont_tbl); - return (retval); - } - retval = add_row_to_table(hash_obj, tblhdl, &packet, cont_tbl); - if (retval != PICL_SUCCESS) { - unlock_container_lock(cont_tbl); - return (retval); - } - - num_of_pkt = fru_get_num_packets(new_seg_acc_hdl, &warg->cred); - if (num_of_pkt == -1) { - unlock_container_lock(cont_tbl); - return (PICL_FAILURE); - } - - pkt_buf = alloca(sizeof (packet_t) * num_of_pkt); - if (pkt_buf == NULL) { - unlock_container_lock(cont_tbl); - return (PICL_FAILURE); - } - - retval = fru_get_packets(new_seg_acc_hdl, pkt_buf, - num_of_pkt, &warg->cred); - if (retval == -1) { - unlock_container_lock(cont_tbl); - return (PICL_FAILURE); - } - - pkt_hash = hash_obj->u.seg_node->packet_list; - if (pkt_hash == NULL) { - unlock_container_lock(cont_tbl); - return (PICL_FAILURE); - } - - for (cnt = 0; cnt < num_of_pkt; cnt++) { - pkt_hash->u.pkt_node->pkt_handle = pkt_buf[cnt].handle; - pkt_hash = pkt_hash->u.pkt_node->next; - } - - hash_obj->u.seg_node->num_of_pkt = num_of_pkt; - - (void) ptree_update_propval_by_name(warg->nodeh, PICL_PROP_NUM_TAGS, - &num_of_pkt, sizeof (uint32_t)); - - unlock_container_lock(cont_tbl); - - return (PICL_SUCCESS); -} - -static void -freeup(picl_nodehdl_t nodeh) -{ - (void) ptree_delete_node(nodeh); - (void) ptree_destroy_node(nodeh); -} - -/* - * called by frudata_read_segment() and fru_data_add_segment() callback routine. - * it's called to create a segment node and all it's property beneith the - * segment node in the picl tree. - */ - -static int -create_segment_node(hash_obj_t *sec_obj, picl_nodehdl_t sec_node, - segment_t *segment, container_tbl_t *cont_tbl, door_cred_t *cred) -{ - - int retval; - char segname[SEG_NAME_LEN + 1]; - uint32_t numoftags = 0; - uint32_t protection; - hash_obj_t *hash_obj; - picl_nodehdl_t nodehdl; - picl_prophdl_t prophdl; - picl_nodehdl_t tblhdl; - ptree_propinfo_t prop; - - (void) strlcpy(segname, segment->name, SEG_NAME_LEN + 1); - segname[SEG_NAME_LEN] = '\0'; - - if (!(isprint(segname[0]) || isprint(segname[1]))) { - return (PICL_FAILURE); - } - - if (ptree_create_node(segname, PICL_CLASS_SEGMENT, &nodehdl) - != PICL_SUCCESS) { - return (PICL_FAILURE); - } - - - /* create property node */ - prop.version = PTREE_PROPINFO_VERSION; - prop.piclinfo.accessmode = PICL_READ; - prop.read = NULL; - prop.write = NULL; - - prop.piclinfo.type = PICL_PTYPE_UNSIGNED_INT; - prop.piclinfo.size = sizeof (uint32_t); - - /* descriptor property */ - (void) strcpy(prop.piclinfo.name, PICL_PROP_DESCRIPTOR); - if (ptree_create_and_add_prop(nodehdl, &prop, &segment->descriptor, - &prophdl) != PICL_SUCCESS) { - freeup(nodehdl); - return (PICL_FAILURE); - } - - - /* offset property */ - (void) strcpy(prop.piclinfo.name, PICL_PROP_OFFSET); - if (ptree_create_and_add_prop(nodehdl, &prop, &segment->offset, - &prophdl) != PICL_SUCCESS) { - freeup(nodehdl); - return (PICL_FAILURE); - } - - - /* length property */ - (void) strcpy(prop.piclinfo.name, PICL_PROP_LENGTH); - if (ptree_create_and_add_prop(nodehdl, &prop, &segment->length, - &prophdl) != PICL_SUCCESS) { - freeup(nodehdl); - return (PICL_FAILURE); - } - - /* Number of Tags */ - (void) strcpy(prop.piclinfo.name, PICL_PROP_NUM_TAGS); - if (ptree_create_and_add_prop(nodehdl, &prop, &numoftags, &prophdl) - != PICL_SUCCESS) { - freeup(nodehdl); - return (PICL_FAILURE); - } - - if (create_packet_table(nodehdl, &tblhdl) != PICL_SUCCESS) { - freeup(nodehdl); - return (PICL_FAILURE); - } - - retval = ptree_get_propval_by_name(sec_node, - PICL_PROP_PROTECTED, &protection, sizeof (uint32_t)); - if (retval != PICL_SUCCESS) { - freeup(nodehdl); - return (PICL_FAILURE); - } - - if (protection == 0) { /* to be added only read/write section */ - /* delete segment volatile property */ - prop.piclinfo.type = PICL_PTYPE_UNSIGNED_INT; - prop.piclinfo.size = sizeof (uint32_t); - prop.piclinfo.accessmode = PICL_WRITE|PICL_VOLATILE; - prop.write = frudata_delete_segment; - prop.read = frudata_read_callback; - - (void) strcpy(prop.piclinfo.name, PICL_PROP_DELETE_SEGMENT); - if (ptree_create_and_add_prop(nodehdl, &prop, NULL, &prophdl) - != PICL_SUCCESS) { - freeup(nodehdl); - return (PICL_FAILURE); - } - - - /* add packet volatile property */ - prop.piclinfo.type = PICL_PTYPE_BYTEARRAY; - prop.piclinfo.size = segment->length; /* segment length */ - prop.piclinfo.accessmode = PICL_READ|PICL_WRITE|PICL_VOLATILE; - prop.read = frudata_read_callback; - prop.write = frudata_add_packet; - - (void) strcpy(prop.piclinfo.name, PICL_PROP_ADD_PACKET); - if (ptree_create_and_add_prop(nodehdl, &prop, NULL, &prophdl) - != PICL_SUCCESS) { - freeup(nodehdl); - return (PICL_FAILURE); - } - } - - if (ptree_add_node(sec_node, nodehdl) != PICL_SUCCESS) { - freeup(nodehdl); - return (PICL_FAILURE); - } - - hash_obj = alloc_segment_node_object(nodehdl, segment); - if (hash_obj == NULL) { - freeup(nodehdl); - return (PICL_FAILURE); - } - - add_nodeobject_to_hashtable(hash_obj, cont_tbl); - - add_to_segment_list(sec_obj, hash_obj); - - retval = frudata_read_packet(nodehdl, &tblhdl, cont_tbl, cred); - if (retval != 0) { - return (PICL_SUCCESS); - } - - (void) ptree_update_propval_by_name(nodehdl, PICL_PROP_NUM_TAGS, - &hash_obj->u.seg_node->num_of_pkt, sizeof (uint32_t)); - - return (PICL_SUCCESS); -} - -/* - * Description :frudata_read_segment is called when num_segment volatile - * property is accessed. - * - * Arguments : ptree_rarg_t contains node handle of the section node. - * and property node of num_segments. - * void * will hold number of segment. - * - * Returns : PICL_SUCCESS on success. - * PICL_FAILURE on failure. - */ - -static int -frudata_read_segment(ptree_rarg_t *rarg, void *buf) -{ - int num_of_segment; - int cnt; - int retval; - segment_t *segment; - hash_obj_t *hash_obj; - fru_segdesc_t *desc; - fru_access_hdl_t sec_acc_hdl; - container_tbl_t *cont_tbl; - - cont_tbl = lock_container_lock(rarg->nodeh, SECTION_NODE, PICL_READ); - if (!cont_tbl) { - return (PICL_FAILURE); - } - - hash_obj = lookup_node_object(rarg->nodeh, SECTION_NODE, cont_tbl); - if (hash_obj == NULL) { - unlock_container_lock(cont_tbl); - return (PICL_FAILURE); - } - - if (hash_obj->u.sec_node->num_of_segment == -1) { - sec_acc_hdl = hash_obj->u.sec_node->section_hdl; - - hash_obj->u.sec_node->num_of_segment = 0; - - num_of_segment = fru_get_num_segments(sec_acc_hdl, - &rarg->cred); - if (num_of_segment < 0) { - *(int *)buf = 0; - unlock_container_lock(cont_tbl); - return (PICL_FAILURE); - } - - if (num_of_segment == 0) { - *(int *)buf = 0; - unlock_container_lock(cont_tbl); - return (PICL_SUCCESS); - } - - segment = alloca(sizeof (segment_t) * num_of_segment); - if (segment == NULL) { - *(int *)buf = 0; - unlock_container_lock(cont_tbl); - return (PICL_SUCCESS); - } - - retval = fru_get_segments(sec_acc_hdl, segment, - num_of_segment, &rarg->cred); - if (retval == -1) { - *(int *)buf = 0; - unlock_container_lock(cont_tbl); - return (PICL_SUCCESS); - } - - for (cnt = 0; cnt < num_of_segment; cnt++) { - - desc = (fru_segdesc_t *)&segment[cnt].descriptor; - if (!(desc->field.field_perm & SEGMENT_READ)) { - continue; - } - - /* if opaque segment don't create segment node */ - if (desc->field.opaque) { - continue; - } - (void) create_segment_node(hash_obj, rarg->nodeh, - &segment[cnt], cont_tbl, &rarg->cred); - hash_obj->u.sec_node->num_of_segment++; - } - } - - /* return number of segment in the section */ - *(int *)buf = hash_obj->u.sec_node->num_of_segment; - - unlock_container_lock(cont_tbl); - - return (PICL_SUCCESS); -} - - -/* - * Description : frudata_add_segment is called when volatile property - * add_segment under class node section is accessed. - * - * Arguments : ptree_warg_t holds node handle for the section node. - * property handle for the add_segment property. - * - * Returns : PICL_SUCCESS on success. - * PICL_FAILURE on failure. - */ - -static int -frudata_add_segment(ptree_warg_t *warg, const void *buf) -{ - int retval; - int cnt; - int num_of_segment; - segment_t *seg_buf; - segment_t segment; - hash_obj_t *seg_hash; - hash_obj_t *hash_obj; - container_tbl_t *cont_tbl; - fru_segdef_t *seg_def; - fru_segdesc_t *desc; - fru_access_hdl_t new_sec_acc_hdl; - - seg_def = (fru_segdef_t *)buf; - - /* initialize segment_t */ - segment.handle = 0; - (void) memcpy(segment.name, seg_def->name, SEG_NAME_LEN); - segment.descriptor = seg_def->desc.raw_data; - segment.length = seg_def->size; /* segment length */ - segment.offset = seg_def->address; /* segment offset */ - - desc = (fru_segdesc_t *)&segment.descriptor; - if (!(desc->field.field_perm & SEGMENT_READ)) { - return (PICL_PERMDENIED); - } - - cont_tbl = lock_container_lock(warg->nodeh, SECTION_NODE, PICL_WRITE); - if (!cont_tbl) { - return (PICL_FAILURE); - } - - hash_obj = lookup_node_object(warg->nodeh, SECTION_NODE, cont_tbl); - if (hash_obj == NULL) { - unlock_container_lock(cont_tbl); - return (PICL_FAILURE); - } - - /* call fruaccess module, get the new section handle. */ - retval = fru_add_segment(hash_obj->u.sec_node->section_hdl, - &segment, &new_sec_acc_hdl, &warg->cred); - if (retval == -1) { - unlock_container_lock(cont_tbl); - return (map_access_err(errno)); - } - - /* call access module with new section handle */ - num_of_segment = fru_get_num_segments(new_sec_acc_hdl, &warg->cred); - - seg_buf = alloca(sizeof (segment_t) * num_of_segment); - if (seg_buf == NULL) { - unlock_container_lock(cont_tbl); - return (PICL_FAILURE); - } - - retval = fru_get_segments(new_sec_acc_hdl, seg_buf, - num_of_segment, &warg->cred); - if (retval == -1) { - unlock_container_lock(cont_tbl); - return (PICL_FAILURE); - } - - segment.offset = seg_buf[(num_of_segment -1)].offset; - segment.handle = seg_buf[(num_of_segment-1)].handle; - - (void) create_segment_node(hash_obj, warg->nodeh, &segment, - cont_tbl, &warg->cred); - - /* rebuild segment list */ - seg_hash = hash_obj->u.sec_node->segment_list; - if (seg_hash == NULL) { - unlock_container_lock(cont_tbl); - return (PICL_FAILURE); - } - - hash_obj->u.sec_node->num_of_segment = 0; - - for (cnt = 0; cnt < num_of_segment; cnt++) { - desc = (fru_segdesc_t *)&seg_buf[cnt].descriptor; - if (!(desc->field.field_perm & SEGMENT_READ)) { - continue; - } - - /* if opaque segment don't create segment node */ - if (desc->field.opaque) { - continue; - } - - seg_hash->u.seg_node->segment_hdl = - seg_buf[cnt].handle; - seg_hash = seg_hash->u.seg_node->next; - hash_obj->u.sec_node->num_of_segment++; - } - - /* update with new section handle */ - hash_obj->u.sec_node->section_hdl = new_sec_acc_hdl; - - unlock_container_lock(cont_tbl); - - return (PICL_SUCCESS); -} - -/* - * called from frudata_write_section() callback routine to create - * section node and all the property under class section. it also - * allocate hash node object for each section in the container and - * add the section node object in the section list. - */ - -static int -create_section_node(picl_nodehdl_t nodehdl, int section_count, - section_t *section, container_tbl_t *cont_tbl) -{ - char sec_name[SECNAMESIZE]; - hash_obj_t *hash_obj; - hash_obj_t *cont_hash; - picl_nodehdl_t chld_node; - picl_prophdl_t prophdl; - ptree_propinfo_t prop; - - (void) snprintf(sec_name, SECNAMESIZE, "section%d", section_count); - - if (ptree_create_node(sec_name, PICL_CLASS_SECTION, &chld_node) - != PICL_SUCCESS) { - return (PICL_FAILURE); - } - prop.version = PTREE_PROPINFO_VERSION; - prop.piclinfo.type = PICL_PTYPE_UNSIGNED_INT; - prop.piclinfo.accessmode = PICL_READ; - prop.piclinfo.size = sizeof (uint32_t); - prop.read = NULL; - prop.write = NULL; - - /* offset */ - (void) strcpy(prop.piclinfo.name, PICL_PROP_OFFSET); - if (ptree_create_and_add_prop(chld_node, &prop, §ion->offset, - &prophdl) != PICL_SUCCESS) { - freeup(chld_node); - return (PICL_FAILURE); - } - - /* length */ - (void) strcpy(prop.piclinfo.name, PICL_PROP_LENGTH); - if (ptree_create_and_add_prop(chld_node, &prop, §ion->length, - &prophdl) != PICL_SUCCESS) { - freeup(chld_node); - return (PICL_FAILURE); - } - - - /* protected */ - (void) strcpy(prop.piclinfo.name, PICL_PROP_PROTECTED); - if (ptree_create_and_add_prop(chld_node, &prop, §ion->protection, - &prophdl) != PICL_SUCCESS) { - freeup(chld_node); - return (PICL_FAILURE); - } - - prop.piclinfo.accessmode = PICL_READ|PICL_VOLATILE; - prop.read = frudata_read_segment; - - (void) strcpy(prop.piclinfo.name, PICL_PROP_NUM_SEGMENTS); - - if (ptree_create_and_add_prop(chld_node, &prop, NULL, &prophdl) - != PICL_SUCCESS) { - freeup(chld_node); - return (PICL_FAILURE); - } - - - prop.piclinfo.type = PICL_PTYPE_BYTEARRAY; - prop.piclinfo.size = sizeof (fru_segdef_t); - - prop.piclinfo.accessmode = PICL_WRITE|PICL_READ|PICL_VOLATILE; - prop.write = frudata_add_segment; /* callback routine */ - prop.read = frudata_read_callback; - - (void) strcpy(prop.piclinfo.name, PICL_PROP_ADD_SEGMENT); - /* add-segment prop if read/write section */ - if (section->protection == 0) { - if (ptree_create_and_add_prop(chld_node, &prop, NULL, &prophdl) - != PICL_SUCCESS) { - freeup(chld_node); - return (PICL_FAILURE); - } - } - - if (ptree_add_node(nodehdl, chld_node) != PICL_SUCCESS) { - freeup(chld_node); - return (PICL_FAILURE); - } - - /* lookup for container handle */ - cont_hash = lookup_node_object(nodehdl, CONTAINER_NODE, cont_tbl); - if (cont_hash == NULL) { - freeup(chld_node); - return (PICL_FAILURE); - } - - hash_obj = alloc_section_node_object(chld_node, section); - if (hash_obj == NULL) { - freeup(chld_node); - return (PICL_FAILURE); - } - - add_nodeobject_to_hashtable(hash_obj, cont_tbl); - - add_to_section_list(cont_hash, hash_obj); - return (PICL_SUCCESS); -} - - -/* - * Description :frudata_write_section is called when volatile container - * property is accessed. it reads the section table associated - * with the specified node handle(container) in ptree_rarg_t. - * it calls search_root_node to search the node handle to open the - * device associated with the node handle. it creates section - * node and it's associated property. it also creates - * volatile property num_segments. - * - * Argument : ptree_rarg_t : contains node handle of fru container the - * container. - * property handle of the container. - * - * Return : PICL_SUCCESS on success. - * - */ - -/* ARGSUSED */ - -static int -frudata_write_section(ptree_warg_t *warg, const void *buf) -{ - int retval; - int num_of_section; - int count; - section_t *section; - hash_obj_t *hash_obj; - container_tbl_t *cont_tbl = NULL; - fru_access_hdl_t cont_acc_hdl; - - (void) pthread_mutex_lock(&cont_tbl_lock); - - /* - * if lookup succeed return from this function with PICL_SUCCESS - * because first write operation has already occurred on this container, - * it also means that the container has been already initialzed. - */ - - cont_tbl = lookup_container_table(warg->nodeh, CONTAINER_NODE); - if (cont_tbl != NULL) { /* found the hash obj in the hash table */ - (void) pthread_mutex_unlock(&cont_tbl_lock); - return (PICL_SUCCESS); - } - - /* - * lookup failed that means this is first write on the - * container property. allocate a new container hash table for this - * new container and add to the cont_tbl hash table. - */ - - cont_tbl = alloc_container_table(warg->nodeh); - if (cont_tbl == NULL) { - (void) pthread_mutex_unlock(&cont_tbl_lock); - return (map_access_err(errno)); - } - - hash_obj = alloc_container_node_object(warg->nodeh); - if (hash_obj == NULL) { - (void) pthread_mutex_unlock(&cont_tbl_lock); - free(cont_tbl->hash_obj); - free(cont_tbl); - return (map_access_err(errno)); - } - - /* add container table object to container table */ - add_tblobject_to_container_tbl(cont_tbl); - - /* add the hash object to container hash table. */ - add_nodeobject_to_hashtable(hash_obj, cont_tbl); - - while (pthread_rwlock_trywrlock(&cont_tbl->rwlock) == EBUSY) { - pthread_cond_wait(&cont_tbl->cond_var, &cont_tbl_lock); - } - - (void) pthread_mutex_unlock(&cont_tbl_lock); - - /* fruaccess handle */ - cont_acc_hdl = hash_obj->u.cont_node->cont_hdl; - - num_of_section = fru_get_num_sections(cont_acc_hdl, &warg->cred); - - if (num_of_section == -1) { - free(hash_obj); - unlock_container_lock(cont_tbl); - return (PICL_FAILURE); - } - - section = alloca(num_of_section * sizeof (section_t)); - - retval = fru_get_sections(cont_acc_hdl, section, - num_of_section, &warg->cred); - if (retval == -1) { - free(hash_obj); - unlock_container_lock(cont_tbl); - return (PICL_FAILURE); - } - - hash_obj->u.cont_node->num_of_section = num_of_section; - - for (count = 0; count < num_of_section; count++) { - (void) create_section_node(warg->nodeh, count, - section + count, cont_tbl); - } - - unlock_container_lock(cont_tbl); - - return (PICL_SUCCESS); -} - -/* create container and add-segment property */ - -static int -create_container_prop(picl_nodehdl_t fruhdl) -{ - int retval; - picl_prophdl_t prophdl; - ptree_propinfo_t prop; - - prop.version = PTREE_PROPINFO_VERSION; - prop.piclinfo.type = PICL_PTYPE_UNSIGNED_INT; - prop.piclinfo.size = sizeof (uint32_t); - prop.piclinfo.accessmode = PICL_WRITE|PICL_VOLATILE; - (void) strcpy(prop.piclinfo.name, PICL_PROP_CONTAINER); - prop.read = frudata_read_callback; - prop.write = frudata_write_section; /* callback routine */ - - /* create a property */ - retval = ptree_create_and_add_prop(fruhdl, &prop, NULL, &prophdl); - - return (retval); -} - -/* search for FRUDataAvailable and create container and add segment property */ - -static void -create_frudata_props(picl_prophdl_t fruhdl) -{ - int retval; - picl_nodehdl_t chldhdl; - picl_nodehdl_t tmphdl; - - for (retval = ptree_get_propval_by_name(fruhdl, PICL_PROP_CHILD, - &chldhdl, sizeof (picl_nodehdl_t)); retval != PICL_PROPNOTFOUND; - retval = ptree_get_propval_by_name(chldhdl, PICL_PROP_PEER, - &chldhdl, sizeof (picl_nodehdl_t))) { - if (retval != PICL_SUCCESS) - return; - - /* Does it have a FRUDataAvailable property */ - retval = ptree_get_prop_by_name(chldhdl, - PICL_PROP_FRUDATA_AVAIL, &tmphdl); - if (retval == PICL_SUCCESS) { - (void) create_container_prop(chldhdl); - } - - /* Traverse tree recursively */ - (void) create_frudata_props(chldhdl); - } -} - -/* - * Search for the frutree config file from the platform specific - * directory to the common directory. - * - * The size of outfilename must be PATH_MAX - */ -static int -get_config_file(char *outfilename) -{ - char nmbuf[SYS_NMLN]; - char pname[PATH_MAX]; - - if (sysinfo(SI_PLATFORM, nmbuf, sizeof (nmbuf)) != -1) { - (void) snprintf(pname, PATH_MAX, FRUDATA_CONFFILE_NAME, nmbuf); - if (access(pname, R_OK) == 0) { - (void) strlcpy(outfilename, pname, PATH_MAX); - return (0); - } - } - - if (sysinfo(SI_MACHINE, nmbuf, sizeof (nmbuf)) != -1) { - (void) snprintf(pname, PATH_MAX, FRUDATA_CONFFILE_NAME, nmbuf); - if (access(pname, R_OK) == 0) { - (void) strlcpy(outfilename, pname, PATH_MAX); - return (0); - } - } - - (void) snprintf(pname, PATH_MAX, "%s/%s", PICLD_COMMON_PLUGIN_DIR, - FRUDATA_CONFFILE_NAME); - if (access(pname, R_OK) == 0) { - (void) strlcpy(outfilename, pname, PATH_MAX); - return (0); - } - return (-1); -} - -/* - * called from delete_frudata_props(), this routine delete the section node - * and free's the section hash object. it calls free_segment_node() to - * delete segment node beneath it. - */ - -static void -free_section_node(hash_obj_t *sec_hash, container_tbl_t *cont_tbl) -{ - hash_obj_t *seg_hash; - - for (seg_hash = sec_hash->u.sec_node->segment_list; seg_hash != NULL; - seg_hash = seg_hash->u.seg_node->next) { - free_segment_node(seg_hash, seg_hash->picl_hdl, cont_tbl); - } - - if (sec_hash->prev == NULL) { - cont_tbl->hash_obj[(sec_hash->picl_hdl % TABLE_SIZE)].next = - sec_hash->next; - if (sec_hash->next != NULL) { - sec_hash->next->prev = NULL; - } - } else { - sec_hash->prev->next = sec_hash->next; - if (sec_hash->next != NULL) { - sec_hash->next->prev = sec_hash->prev; - } - } - - /* delete & destroy section node */ - (void) ptree_delete_node(sec_hash->picl_hdl); - (void) ptree_destroy_node(sec_hash->picl_hdl); - - free(sec_hash->u.sec_node); - free(sec_hash); -} - -/* - * called from delete_frudata_props(), this routine free's the container - * hash object. - */ - -static void -unlink_container_node(container_tbl_t *cont_hash) -{ - if (cont_hash->prev == NULL) { - container_table[(cont_hash->picl_hdl % TABLE_SIZE)] = - cont_hash->next; - if (cont_hash->next != NULL) { - cont_hash->next->prev = NULL; - } - } else { - cont_hash->prev->next = cont_hash->next; - if (cont_hash->next != NULL) { - cont_hash->next->prev = cont_hash->prev; - } - } -} - -/* - * called from frudata_event_handler() to free the corresponding hash object - * of the removed fru. - */ - -static void -delete_frudata_props(picl_nodehdl_t fru_hdl) -{ - hash_obj_t *cont_hash; - hash_obj_t *free_obj; - hash_obj_t *sec_hash; - container_tbl_t *cont_tbl; - - (void) pthread_mutex_lock(&cont_tbl_lock); - - cont_tbl = lookup_container_table(fru_hdl, CONTAINER_NODE); - if (cont_tbl == NULL) { - (void) pthread_mutex_unlock(&cont_tbl_lock); - return; - } - - /* remove the container object from the container table */ - unlink_container_node(cont_tbl); - - (void) pthread_cond_broadcast(&cont_tbl->cond_var); - - (void) pthread_mutex_unlock(&cont_tbl_lock); - - /* - * waiting/blocking calling thread for all I/O in - * progress to complete. don't free the container - * hash before all I/O is complete. - */ - (void) pthread_rwlock_wrlock(&cont_tbl->rwlock); - - (void) pthread_rwlock_unlock(&cont_tbl->rwlock); - - - cont_hash = lookup_node_object(fru_hdl, CONTAINER_NODE, cont_tbl); - if (cont_hash == NULL) { - return; - } - - free_obj = cont_hash->u.cont_node->section_list; - /* walk through the section list */ - for (sec_hash = free_obj; sec_hash != NULL; free_obj = sec_hash) { - sec_hash = sec_hash->u.sec_node->next; - free_section_node(free_obj, cont_tbl); - } - (void) fru_close_container(cont_hash->u.cont_node->cont_hdl); - - free(cont_hash->u.cont_node); - free(cont_hash); - - free(cont_tbl->hash_obj); - free(cont_tbl); -} - -/* - * called when there is any state-change in location, fru, port nodes. - * this event handler handles only location state-changes. - */ -/* ARGSUSED */ -static void -frudata_state_change_evhandler(const char *event_name, const void *event_arg, - size_t size, void *cookie) -{ - int rc; - nvlist_t *nvlp; - ptree_propinfo_t prop; - picl_nodehdl_t loch, fruh; - picl_prophdl_t proph, prophdl; - char *present_state, *last_state; - char name[PICL_PROPNAMELEN_MAX]; - - if (strcmp(event_name, PICLEVENT_STATE_CHANGE) != 0) - return; - - if (nvlist_unpack((char *)event_arg, size, &nvlp, NULL)) { - return; - } - - if (nvlist_lookup_uint64(nvlp, PICLEVENTARG_NODEHANDLE, - &loch) == -1) { - nvlist_free(nvlp); - return; - } - - if (ptree_get_propval_by_name(loch, PICL_PROP_CLASSNAME, name, - sizeof (name)) != PICL_SUCCESS) { - nvlist_free(nvlp); - return; - } - - /* handle only location events */ - if (strcmp(name, PICL_CLASS_LOCATION) != 0) { - nvlist_free(nvlp); - return; - } - - if (nvlist_lookup_string(nvlp, PICLEVENTARG_STATE, - &present_state)) { - nvlist_free(nvlp); - return; - } - - rc = ptree_get_propval_by_name(loch, PICL_PROP_CHILD, - &fruh, sizeof (picl_nodehdl_t)); - if (rc != PICL_SUCCESS) { - nvlist_free(nvlp); - return; - } - - /* fru removed */ - if (strcmp(present_state, PICLEVENTARGVAL_EMPTY) == 0) { - delete_frudata_props(fruh); - nvlist_free(nvlp); - return; - } - - if (nvlist_lookup_string(nvlp, PICLEVENTARG_LAST_STATE, - &last_state)) { - nvlist_free(nvlp); - return; - } - - /* fru added */ - if ((strcmp(last_state, PICLEVENTARGVAL_EMPTY) == 0) || - (strcmp(last_state, PICLEVENTARGVAL_UNKNOWN) == 0)) { - rc = ptree_get_prop_by_name(fruh, PICL_PROP_FRUDATA_AVAIL, - &proph); - if (rc != PICL_SUCCESS) { - if (fru_is_data_available(fruh) == 0) { - nvlist_free(nvlp); - return; - } - /* create the property */ - prop.version = PTREE_PROPINFO_VERSION; - prop.piclinfo.type = PICL_PTYPE_VOID; - prop.piclinfo.accessmode = PICL_READ; - prop.piclinfo.size = 0; - (void) strncpy(prop.piclinfo.name, - PICL_PROP_FRUDATA_AVAIL, - sizeof (prop.piclinfo.name)); - - rc = ptree_create_prop(&prop, NULL, &prophdl); - if (rc != PICL_SUCCESS) { - nvlist_free(nvlp); - return; - } - rc = ptree_add_prop(fruh, prophdl); - if (rc != PICL_SUCCESS) { - nvlist_free(nvlp); - return; - } - } - (void) create_container_prop(fruh); - } - nvlist_free(nvlp); -} - -/* - * called when event is posted when is fru is either added or removed from - * the picltree. - */ - -/* ARGSUSED */ -static void -frudata_event_handler(const char *event_name, const void *event_arg, - size_t size, void *cookie) -{ - int retval; - char fullfilename[PATH_MAX]; - picl_nodehdl_t fru_picl_hdl; - picl_nodehdl_t roothdl; - - if (strcmp(event_name, PICL_FRU_REMOVED) == 0) { - - retval = nvlist_lookup_uint64((nvlist_t *)event_arg, - PICLEVENTARG_FRUHANDLE, &fru_picl_hdl); - if (retval != PICL_SUCCESS) { - return; - } - - /* free the hash object */ - delete_frudata_props(fru_picl_hdl); - - } else if (strcmp(event_name, PICL_FRU_ADDED) == 0) { - /* - * reparse the configuration file to create - * FRUDevicePath Prop. - */ - (void) get_config_file(fullfilename); - retval = ptree_get_root(&roothdl); - if (retval != PICL_SUCCESS) { - return; - } - - (void) picld_pluginutil_parse_config_file(roothdl, - fullfilename); - - retval = nvlist_lookup_uint64((nvlist_t *)event_arg, - PICLEVENTARG_PARENTHANDLE, &fru_picl_hdl); - if (retval != PICL_SUCCESS) { - return; - } - - /* create container property */ - create_frudata_props(fru_picl_hdl); - } -} - -/* - * Function : plugin_init() is called by daemon. this routine is specified - * while registering with daemon. it performs the initialization - * of plugin module. - */ - -static void -frudata_plugin_init(void) -{ - int retval; - int count; - char fullfilename[PATH_MAX]; - picl_nodehdl_t fru_nodehdl; - picl_nodehdl_t roothdl; - - retval = ptree_get_root(&roothdl); - if (retval != PICL_SUCCESS) { - return; - } - - (void) ptree_register_handler(PICL_FRU_ADDED, - frudata_event_handler, NULL); - - (void) ptree_register_handler(PICL_FRU_REMOVED, - frudata_event_handler, NULL); - - (void) ptree_register_handler(PICLEVENT_STATE_CHANGE, - frudata_state_change_evhandler, NULL); - - (void) pthread_mutex_lock(&cont_tbl_lock); - for (count = 0; count < TABLE_SIZE; count++) { - container_table[count] = NULL; - } - (void) pthread_mutex_unlock(&cont_tbl_lock); - - (void) get_config_file(fullfilename); - - (void) picld_pluginutil_parse_config_file(roothdl, fullfilename); - - retval = ptree_get_node_by_path(FRUTREE_PATH, &fru_nodehdl); - - if (retval != PICL_SUCCESS) { - return; - } - - create_frudata_props(fru_nodehdl); - -} - -static void -free_packet_hash_object(hash_obj_t *pkt_obj) -{ - hash_obj_t *tmp_obj; - - while (pkt_obj != NULL) { - tmp_obj = pkt_obj->u.pkt_node->next; - free(pkt_obj->u.pkt_node); - free(pkt_obj); - pkt_obj = tmp_obj; - } -} - -static void -free_segment_hash_object(hash_obj_t *seg_obj) -{ - hash_obj_t *tmp_obj; - - while (seg_obj != NULL) { - free_packet_hash_object(seg_obj->u.seg_node->packet_list); - tmp_obj = seg_obj->u.seg_node->next; - free(seg_obj->u.seg_node); - free(seg_obj); - seg_obj = tmp_obj; - } -} - -static void -free_hash_objects(hash_obj_t *sec_obj) -{ - hash_obj_t *tmp_obj; - - while (sec_obj != NULL) { - free_segment_hash_object(sec_obj->u.sec_node->segment_list); - tmp_obj = sec_obj->u.sec_node->next; - free(sec_obj->u.sec_node); - free(sec_obj); - sec_obj = tmp_obj; - } -} - -/* - * called from frudata_plugin_fini() this routine walks through - * the hash table to free each and very hash object in the hash table. - */ - -static void -free_hash_table(void) -{ - int cnt; - picl_nodehdl_t nodehdl; - hash_obj_t *next_obj; - hash_obj_t *sec_obj; - container_tbl_t *cont_tbl; - - for (cnt = 0; cnt < TABLE_SIZE; cnt++) { - - while (container_table[cnt]) { - - (void) pthread_mutex_lock(&cont_tbl_lock); - - cont_tbl = container_table[cnt]; - nodehdl = cont_tbl->picl_hdl; - - cont_tbl = lookup_container_table(nodehdl, - CONTAINER_NODE); - if (cont_tbl == NULL) { - (void) pthread_mutex_unlock(&cont_tbl_lock); - break; - } - - unlink_container_node(cont_tbl); - - pthread_cond_broadcast(&cont_tbl->cond_var); - - (void) pthread_mutex_unlock(&cont_tbl_lock); - - /* - * waiting/blocking calling thread for all I/O in - * progress to complete. don't free the container - * hash until all I/O is complete. - */ - (void) pthread_rwlock_wrlock(&cont_tbl->rwlock); - - (void) pthread_rwlock_unlock(&cont_tbl->rwlock); - - next_obj = cont_tbl->hash_obj->next; - if (next_obj == NULL) { - break; - } - - if (next_obj->object_type == CONTAINER_NODE) { - sec_obj = next_obj->u.cont_node->section_list; - free_hash_objects(sec_obj); - } - - free(next_obj->u.cont_node); - free(next_obj); - container_table[cnt] = cont_tbl->next; - - free(cont_tbl); - } - } -} - -/* - * called by the daemon and perform frudata cleanup. hold the write lock - * over the entire hash table to free each and every hash object. - */ - -static void -frudata_plugin_fini(void) -{ - - free_hash_table(); - - (void) ptree_unregister_handler(PICL_FRU_ADDED, - frudata_event_handler, NULL); - - (void) ptree_unregister_handler(PICL_FRU_REMOVED, - frudata_event_handler, NULL); - - (void) ptree_unregister_handler(PICLEVENT_STATE_CHANGE, - frudata_state_change_evhandler, NULL); -} diff --git a/usr/src/cmd/picl/plugins/sun4u/frudata/fru_data.h b/usr/src/cmd/picl/plugins/sun4u/frudata/fru_data.h deleted file mode 100644 index 22d0bedcdc..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/frudata/fru_data.h +++ /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, 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 _FRU_DATA_H -#define _FRU_DATA_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifdef __cplusplus -extern "C" { -#endif - -#define FRUDATA_DELETE_TAG_KEY (0xDEAD) -#define FRUDATA_DELETE_TAG_MASK (0xFFFFFFFFFFFF0000ULL) - -#ifdef __cplusplus -} -#endif - -#endif /* _FRU_DATA_H */ diff --git a/usr/src/cmd/picl/plugins/sun4u/frudata/fru_data_impl.h b/usr/src/cmd/picl/plugins/sun4u/frudata/fru_data_impl.h deleted file mode 100644 index 4e7f69faf0..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/frudata/fru_data_impl.h +++ /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, 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 (c) 2000-2001 by Sun Microsystems, Inc. - * All rights reserved. - */ - - -#ifndef _FRU_DATA_IMPL_H -#define _FRU_DATA_IMPL_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include -#include -#include -#include -#include "libfru.h" -#include "picldefs.h" -#include "fru_access.h" - -#define TABLE_SIZE 64 /* hash table size */ - -#define NUM_OF_COL_IN_PKT_TABLE 2 - -#define FRUTREE_PATH "/frutree" /* picltree path of frutree node */ - -#define FRUDATA_CONFFILE_NAME \ - "/usr/platform/%s/lib/picl/plugins/libpiclfrudata.conf" - -#define SECNAMESIZE 10 /* section name length */ - -typedef enum {CONTAINER_NODE, SECTION_NODE, SEGMENT_NODE, PACKET_NODE} node_t; - -typedef uint64_t fru_access_hdl_t; - -struct hash_obj; - -typedef struct { - fru_access_hdl_t pkt_handle; /* fru access handle */ - size_t paylen; /* payload length */ - fru_tag_t tag; - struct hash_obj *next; -} packet_node_t; - -typedef struct { - fru_access_hdl_t segment_hdl; /* fru_access handle */ - picl_nodehdl_t sec_nodehdl; /* section node handle */ - int num_of_pkt; /* number of packet */ - struct hash_obj *packet_list; - struct hash_obj *next; -} segment_node_t; - -typedef struct { - fru_access_hdl_t section_hdl; /* fru_access handle */ - picl_nodehdl_t container_hdl; /* container node hdl. */ - int num_of_segment; /* number of segment */ - struct hash_obj *segment_list; - struct hash_obj *next; -} section_node_t; - -typedef struct { - fru_access_hdl_t cont_hdl; /* fru_access handle */ - int num_of_section; /* number of section */ - struct hash_obj *section_list; -} container_node_t; - -typedef struct hash_obj { - uint64_t picl_hdl; /* picl node/property handle */ - node_t object_type; - union { - container_node_t *cont_node; /* container */ - section_node_t *sec_node; /* section */ - segment_node_t *seg_node; /* segment */ - packet_node_t *pkt_node; /* packet */ - } u; - struct hash_obj *next; - struct hash_obj *prev; -} hash_obj_t; - -typedef struct container_tbl { - uint64_t picl_hdl; - pthread_rwlock_t rwlock; - pthread_cond_t cond_var; - hash_obj_t *hash_obj; - struct container_tbl *next; - struct container_tbl *prev; -} container_tbl_t; - -#ifdef __cplusplus -} -#endif - -#endif /* _FRU_DATA_IMPL_H */ diff --git a/usr/src/cmd/picl/plugins/sun4u/grover/Makefile b/usr/src/cmd/picl/plugins/sun4u/grover/Makefile deleted file mode 100644 index d9829f83b5..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/grover/Makefile +++ /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, 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 -# -# -#ident "%Z%%M% %I% %E% SMI" -# -# Copyright (c) 1999-2000 by Sun Microsystems, Inc. -# All rights reserved. -# -# cmd/picl/plugins/sun4u/grover/Makefile -# - -SUBDIRS= memcfg envd frutree - -MSGSUBDIRS= memcfg envd - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -.KEEP_STATE: - -all install clean clobber: $(SUBDIRS) - -_msg: $(MSGSUBDIRS) - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/grover/envd/Makefile b/usr/src/cmd/picl/plugins/sun4u/grover/envd/Makefile deleted file mode 100644 index 17b664b8da..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/grover/envd/Makefile +++ /dev/null @@ -1,102 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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 $(SRC)/Makefile.psm - -LIBRARY= libpiclenvd.a -VERS= .1 - -OBJECTS= piclenvd.o piclenvsetup.o - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Blade-100 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -CPPFLAGS += -I$(SRC)/uts/sun4u/ -I$(SRC)/uts/common/ - -SRCS= $(OBJECTS:%.o=%.c) - -LIBS = $(DYNLIB) - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONF= envmodel.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 -INFOS= envmodel.info - -CPPFLAGS += -I$(SRC)/cmd/picl/plugins/lib/picld_pluginutil -DYNFLAGS += -R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins -LDLIBS += -L$(SRC)/lib/libpicltree/$(MACH) -LDLIBS += -L$(SRC)/cmd/picl/plugins/common/devtree -LDLIBS += -L$(SRC)/cmd/picl/plugins/lib/picld_pluginutil/$(MACH) -LDLIBS += -L$(ROOT)/usr/lib/picl/plugins -lpicldevtree -lpicltree -LDLIBS += -lpicld_pluginutil -lc - -.KEEP_STATE: - -SUBDIRS= - -POFILE = piclenvd_grover.po -POFILES = $(SRCS:%.c=%.po) - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -all: $(LIBS) $(LIBLINKS) - -install: $(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) $(ROOTCONF) - -$(CONF): $(INFOS) - $(RM) $@ - $(CPP) envmodel.info > $@ - -$(POFILE): $(POFILES) - $(CAT) $(POFILES) > $(POFILE) - -_msg: $(MSGDOMAIN) $(POFILE) - $(RM) $(MSGDOMAIN)/$(POFILE) - $(CP) $(POFILE) $(MSGDOMAIN)/$(POFILE) - -$(MSGDOMAIN): - $(INS.dir) - -$(LIBLINKS): FRC - $(RM) $@; $(SYMLINK) $(DYNLIB) $@ - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/grover/envd/envd.h b/usr/src/cmd/picl/plugins/sun4u/grover/envd/envd.h deleted file mode 100644 index 9e0e44628b..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/grover/envd/envd.h +++ /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 2000-2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _ENVD_H -#define _ENVD_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#define SENSOR_POLL_INTERVAL 4 /* in seconds */ -#define WARNING_INTERVAL 30 /* in seconds */ -#define SHUTDOWN_INTERVAL 20 /* in seconds */ -#define ENV_CONF_FILE "piclenvd.conf" -#define ENVMODEL_CONF_FILE "envmodel.conf" -#define PM_DEVICE "/dev/pm" -#define SHUTDOWN_CMD "/usr/sbin/shutdown -y -g 60 -i 5" - -/* - * devfs-path for various fans and their min/max speeds - */ -#define ENV_CPU_FAN_DEVFS \ - "/pci@1f,0/pmu@3/fan-control@0,c8:cpu_fan" -#define ENV_SYSTEM_FAN_DEVFS \ - "/pci@1f,0/pmu@3/fan-control@0,c8:sys_fan" - -#define SYSTEM_FAN_SPEED_MIN 0 -#define SYSTEM_FAN_SPEED_MAX 100 - - -/* - * devfs-path for various temperature sensors and CPU platform path - */ -#define CPU_DIE_SENSOR_DEVFS \ - "/pci@1f,0/pmu@3/i2c@0,0/temperature@30:die_temp" -#define CPU_AMB_SENSOR_DEVFS \ - "/pci@1f,0/pmu@3/i2c@0,0/temperature@30:amb_temp" - -/* - * Temperature thresholds structure - */ -typedef int16_t tempr_t; - -typedef struct { - tempr_t low_power_off; /* low power-off temperature */ - tempr_t high_power_off; /* high power-off temperature */ - tempr_t low_shutdown; /* low shutdown temperature */ - tempr_t high_shutdown; /* high shutdown temperature */ - tempr_t low_warning; /* low warning temperature */ - tempr_t high_warning; /* high warning temperature */ - tempr_t target_temp; /* target temperature */ -} sensor_thresh_t; - -#define TEMP_IN_SHUTDOWN_RANGE(val, threshp) \ - ((val) > (threshp)->high_shutdown || (val) < (threshp)->low_shutdown) - -#define TEMP_IN_WARNING_RANGE(val, threshp) \ - ((val) > (threshp)->high_warning || (val) < (threshp)->low_warning) - - -/* - * CPU "die" temperature thresholds - */ -#define CPU_DIE_HIGH_POWER_OFF 125 -#define CPU_DIE_HIGH_SHUTDOWN 90 -#define CPU_DIE_HIGH_WARNING 85 -#define CPU_DIE_TARGET_TEMP 80 -#define CPU_DIE_LOW_WARNING 0 -#define CPU_DIE_LOW_SHUTDOWN -10 -#define CPU_DIE_LOW_POWER_OFF -20 - -/* - * CPU ambient temperature thresholds - */ -#define CPU_AMB_HIGH_POWER_OFF 70 -#define CPU_AMB_HIGH_SHUTDOWN 60 -#define CPU_AMB_HIGH_WARNING 40 -#define CPU_AMB_TARGET_TEMP 32 -#define CPU_AMB_LOW_WARNING 0 -#define CPU_AMB_LOW_SHUTDOWN -10 -#define CPU_AMB_LOW_POWER_OFF -20 - - -/* - * Fan names - */ -#define ENV_SYSTEM_FAN "system" - -/* - * Sensor names - */ -#define SENSOR_CPU_DIE "cpu" -#define SENSOR_CPU_AMB "cpu-ambient" - -/* - * Temperature sensor related data structure - */ -typedef struct env_sensor { - char *name; /* sensor name */ - char *devfs_path; /* sensor device devfs path */ - sensor_thresh_t *temp_thresh; /* sensor temp threshold */ - int fd; /* device file descriptor */ - int error; /* error flag */ - boolean_t present; /* sensor present */ - tempr_t cur_temp; /* current temperature */ - time_t warning_tstamp; /* last warning time in secs */ - time_t shutdown_tstamp; /* shutdown temp time (secs) */ - boolean_t shutdown_initiated; /* shutdown initated */ -} env_sensor_t; - -extern env_sensor_t *sensor_lookup(char *sensor_name); -extern int get_temperature(env_sensor_t *, tempr_t *); - -/* - * Fan information data structure - */ -typedef uint8_t fanspeed_t; - -typedef struct env_fan { - char *name; /* fan name */ - char *devfs_path; /* fan device devfs path */ - fanspeed_t speed_min; /* minimum speed */ - fanspeed_t speed_max; /* maximum speed */ - int fd; /* device file descriptor */ - boolean_t present; /* fan present */ - fanspeed_t cur_speed; /* current fan speed */ - fanspeed_t prev_speed; /* previous fan speed */ -} env_fan_t; - - -extern env_fan_t *fan_lookup(char *fan_name); -extern int get_fan_speed(env_fan_t *, fanspeed_t *); - -extern int env_debug; -extern void envd_log(int pri, const char *fmt, ...); - -/* - * Various messages - */ -#define ENVD_PLUGIN_INIT_FAILED \ - gettext("SUNW_piclenvd: initialization failed!\n") - -#define ENVD_PICL_SETUP_FAILED \ - gettext("SUNW_piclenvd: PICL setup failed!\n") - -#define PM_THREAD_CREATE_FAILED \ - gettext("SUNW_piclenvd: pmthr thread creation failed!\n") - -#define PM_THREAD_EXITING \ - gettext("SUNW_piclenvd: pmthr exiting! errno:%d %s\n") - -#define ENV_THREAD_CREATE_FAILED \ - gettext("SUNW_piclenvd: envthr thread creation failed!\n") - -#define ENV_SHUTDOWN_MSG \ - gettext("SUNW_piclenvd: '%s' sensor temperature %d outside safe " \ - "limits (%d...%d). Shutting down the system.\n") - -#define ENV_WARNING_MSG \ - gettext("SUNW_piclenvd: '%s' sensor temperature %d outside safe " \ - "operating limits (%d...%d).\n") - -#define ENV_FAN_OPEN_FAIL \ - gettext("SUNW_piclenvd: can't open '%s' fan path:%s errno:%d %s\n") - -#define ENV_SENSOR_OPEN_FAIL \ - gettext("SUNW_piclenvd: can't open '%s' sensor path:%s errno:%d %s\n") - -#define ENV_SENSOR_ACCESS_FAIL \ - gettext("SUNW_piclenvd: can't access '%s' sensor errno:%d %s\n") - -#define ENV_SENSOR_ACCESS_OK \ - gettext("SUNW_piclenvd: '%s' sensor is accessible now.\n") - -#define ENV_CONF_INT_EXPECTED \ - gettext("SUNW_piclenvd: file:%s line:%d Invalid syntax or integer " \ - "value outside range for keyword '%s'.\n") - -#define ENV_CONF_STRING_EXPECTED \ - gettext("SUNW_piclenvd: file:%s line:%d Invalid syntax for keyword " \ - "'%s'. Expecting string in double quotes (length < %d).\n") - -#define ENV_CONF_UNSUPPORTED_TYPE \ - gettext("SUNW_piclenvd: file:%s line:%d Unsupported type:%d for " \ - "keyword '%s'.\n") - -#define ENV_CONF_UNSUPPORTED_KEYWORD \ - gettext("SUNW_piclenvd: file:%s line:%d Unsupported keyword '%s'.\n") - -#ifdef __cplusplus -} -#endif - -#endif /* _ENVD_H */ diff --git a/usr/src/cmd/picl/plugins/sun4u/grover/envd/envmodel.info b/usr/src/cmd/picl/plugins/sun4u/grover/envd/envmodel.info deleted file mode 100644 index 63cec8751d..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/grover/envd/envmodel.info +++ /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, 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 (c) 2000-2001 by Sun Microsystems, Inc. - * All rights reserved. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -VERSION 1.1 - -_class:/upa/cpu?ID=0 - -TABLE Environment -ROW -PROP Class string r 0 "temperature-sensor" -REFPROP _temperature-sensor_ /platform/pci/pmu/i2c/temperature/cpu -ENDROW - -ROW -PROP Class string r 0 "temperature-sensor" -REFPROP _temperature-sensor_ /platform/pci/pmu/i2c/temperature/cpu-ambient -ENDROW - -ROW -PROP Class string r 0 "fan" -REFPROP _fan_ /platform/pci/pmu/fan-control/system -ENDROW - -ENDTABLE - - -name:/platform/pci/pmu/i2c/temperature/cpu -PROP Label string r 0 "Die" - -name:/platform/pci/pmu/i2c/temperature/cpu-ambient -PROP Label string r 0 "Ambient" diff --git a/usr/src/cmd/picl/plugins/sun4u/grover/envd/piclenvd.c b/usr/src/cmd/picl/plugins/sun4u/grover/envd/piclenvd.c deleted file mode 100644 index 2dc18ba8f6..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/grover/envd/piclenvd.c +++ /dev/null @@ -1,1072 +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 (c) 2000 by Sun Microsystems, Inc. - * All rights reserved. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * This file contains the environmental daemon module. - */ - - -/* - * Grover system contains one temperature device, MAX1617, which consists - * of two sensors: CPU die and CPU ambient. Each sensor is represented - * as a different minor device and the current temperature is read via an - * I2C_GET_TEMPERATURE ioctl call to the max1617 driver. Additionally, the - * MAX1617 device supports both a low and high temperature limit, which - * can trigger an alert condition, causing power supply to turn off. - * - * The environmental daemon defines the following thresholds per sensor: - * - * high_power_off high hard shutdown - * high_shutdown high soft shutdown limit - * high_warning high warning limit - * low_warning low warning limit - * low_shutdown low soft shutdown limit - * low_power_off low hard shutdown limit - * - * Except for the low_power_off and high_power_off limits, all other threshold - * values can be changed via "piclenvd.conf" configuration file. - * - * Environmental monitoring is done by the "envthr" thread. It periodically - * monitors both CPU die and CPU ambient temperatures and takes appropriate - * action depending upon the current temperature and threshold values for - * that sensor. If the temperature reaches the high_shutdown limit or the - * low_shutdown limit, and remains there for over shutdown_interval seconds, - * it forces a graceful system shutdown via tuneable shutdown_cmd string - * variable. Otherwise, if the temperature reaches the high_warning limit - * or the low_warning limit, it logs and prints a message on the console. - * This message will be printed at most at "warning_interval" seconds - * interval, which is also a tuneable variable. - * - * Grover system also contains a fan, known as system fan, which can be turned - * ON or OFF under software control. However, its speed is automatically - * controlled by the hardware based upon the ambient temperature. When in EStar - * mode (i.e. lowest power state), the environmental daemon will turn off this - * fan provided the CPU die and ambient temperature is below the high warning - * limits. - * - * The power state monitoring is done by the "pmthr" thread. It uses the - * PM_GET_STATE_CHANGE and PM_GET_STATE_CHANGE_WAIT ioctl commands to pick - * up any power state change events. It processes all queued power state - * change events and determines the curret lowest power state and saves it - * in cur_lpstate variable. Whenever this state changes from the previous - * lowest power state (saved in prev_lpstate), it wakes up the "envtrh" - * thread. - * - * The "lpstate_lock" mutex and "lpstate_cond" condition variables are used - * to communicate power state change events from the "pmthr" to the "envthr" - * thread. The "envthr" thread uses the pthread_cond_timedwait() interface - * to wait for any power state change notifications. The "pmthr" uses the - * pthread_signal() interface to wake up the "envthr" thread. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "envd.h" - - -/* - * PICL plguin - */ -static void piclenvd_register(void); -static void piclenvd_init(void); -static void piclenvd_fini(void); -extern void env_picl_setup(); - -#pragma init(piclenvd_register) - -static picld_plugin_reg_t my_reg_info = { - PICLD_PLUGIN_VERSION_1, - PICLD_PLUGIN_CRITICAL, - "SUNW_piclenvd", - piclenvd_init, - piclenvd_fini, -}; - -/* - * tuneable variables - */ -int env_debug; -static int sensor_poll_interval = SENSOR_POLL_INTERVAL; -static int warning_interval = WARNING_INTERVAL; -static int shutdown_interval = SHUTDOWN_INTERVAL; -static char shutdown_cmd[128] = SHUTDOWN_CMD; -static int monitor_temperature = 0; - -static sensor_thresh_t cpu_die_thresh = { - CPU_DIE_LOW_POWER_OFF, CPU_DIE_HIGH_POWER_OFF, - CPU_DIE_LOW_SHUTDOWN, CPU_DIE_HIGH_SHUTDOWN, - CPU_DIE_LOW_WARNING, CPU_DIE_HIGH_WARNING, - CPU_DIE_TARGET_TEMP -}; - -static sensor_thresh_t cpu_amb_thresh = { - CPU_AMB_LOW_POWER_OFF, CPU_AMB_HIGH_POWER_OFF, - CPU_AMB_LOW_SHUTDOWN, CPU_AMB_HIGH_SHUTDOWN, - CPU_AMB_LOW_WARNING, CPU_AMB_HIGH_WARNING, - CPU_AMB_TARGET_TEMP -}; - -/* - * Temperature sensors - */ - -static env_sensor_t cpu_die_sensor = - { SENSOR_CPU_DIE, CPU_DIE_SENSOR_DEVFS, &cpu_die_thresh}; - -static env_sensor_t cpu_amb_sensor = - { SENSOR_CPU_AMB, CPU_AMB_SENSOR_DEVFS, &cpu_amb_thresh}; - - -static env_sensor_t *envd_sensors[] = { - &cpu_die_sensor, - &cpu_amb_sensor, - NULL -}; - -/* - * Fan devices - */ -static env_fan_t envd_system_fan = { - ENV_SYSTEM_FAN, ENV_SYSTEM_FAN_DEVFS, - SYSTEM_FAN_SPEED_MIN, SYSTEM_FAN_SPEED_MAX, -}; - -static env_fan_t *envd_fans[] = { - &envd_system_fan, - NULL -}; - - -/* - * Environmental thread variables - */ -static boolean_t envd_inited = B_FALSE; -static boolean_t system_shutdown_started; -static boolean_t envthr_created; /* envthr created */ -static pthread_t envthr_tid; /* envthr thread ID */ -static pthread_attr_t thr_attr; - -/* - * Power management thread (pmthr) variables - */ -static pthread_t pmthr_tid; /* pmthr thread ID */ -static int pmthr_created; /* pmthr created */ -static int pm_fd; /* PM device file descriptor */ -static int cur_lpstate; /* cur low power state */ - -static pthread_mutex_t lpstate_lock; /* low power state lock */ -static pthread_cond_t lpstate_cond; /* low power state condvar */ - - -/* - * Tuneable variables data structure/array - */ - -typedef struct { - char *name; /* keyword */ - void *addr; /* memory (variable) address */ - int type; /* keyword type */ - int size; /* variable size */ -} env_tuneable_t; - -/* keyword types */ -#define KTYPE_INT 1 /* signed int */ -#define KTYPE_STRING 2 /* string in double quotes */ - -static env_tuneable_t env_tuneables[] = { - {"cpu_amb_low_shutdown", &cpu_amb_thresh.low_shutdown, KTYPE_INT, - sizeof (tempr_t)}, - {"cpu_amb_low_warning", &cpu_amb_thresh.low_warning, KTYPE_INT, - sizeof (tempr_t)}, - {"cpu_amb_target_temp", &cpu_amb_thresh.target_temp, KTYPE_INT, - sizeof (tempr_t)}, - {"cpu_amb_high_shutdown", &cpu_amb_thresh.high_shutdown, KTYPE_INT, - sizeof (tempr_t)}, - {"cpu_amb_high_warning", &cpu_amb_thresh.high_warning, KTYPE_INT, - sizeof (tempr_t)}, - {"cpu_die_low_shutdown", &cpu_die_thresh.low_shutdown, KTYPE_INT, - sizeof (tempr_t)}, - {"cpu_die_low_warning", &cpu_die_thresh.low_warning, KTYPE_INT, - sizeof (tempr_t)}, - {"cpu_die_target_temp", &cpu_die_thresh.target_temp, KTYPE_INT, - sizeof (tempr_t)}, - {"cpu_die_high_shutdown", &cpu_die_thresh.high_shutdown, KTYPE_INT, - sizeof (tempr_t)}, - {"cpu_die_high_warning", &cpu_die_thresh.high_warning, KTYPE_INT, - sizeof (tempr_t)}, - {"sensor_poll_interval", &sensor_poll_interval, KTYPE_INT, - sizeof (sensor_poll_interval)}, - {"monitor_temperature", &monitor_temperature, KTYPE_INT, - sizeof (monitor_temperature)}, - {"warning_interval", &warning_interval, KTYPE_INT, - sizeof (warning_interval)}, - {"shutdown_interval", &shutdown_interval, KTYPE_INT, - sizeof (shutdown_interval)}, - {"shutdown_cmd", &shutdown_cmd[0], KTYPE_STRING, sizeof (shutdown_cmd)}, - {"env_debug", &env_debug, KTYPE_INT, sizeof (env_debug)}, - { NULL, NULL, 0, 0} -}; - -/* - * Lookup fan and return a pointer to env_fan_t data structure. - */ -env_fan_t * -fan_lookup(char *name) -{ - int i; - env_fan_t *fanp; - - for (i = 0; (fanp = envd_fans[i]) != NULL; i++) { - if (strcmp(fanp->name, name) == 0) - return (fanp); - } - return (NULL); -} - -/* - * Lookup sensor and return a pointer to env_sensor_t data structure. - */ -env_sensor_t * -sensor_lookup(char *name) -{ - int i; - env_sensor_t *sensorp; - - for (i = 0; (sensorp = envd_sensors[i]) != NULL; i++) { - if (strcmp(sensorp->name, name) == 0) - return (sensorp); - } - return (NULL); -} - -/* - * Get current temperature - * Returns -1 on error, 0 if successful - */ -int -get_temperature(env_sensor_t *sensorp, tempr_t *temp) -{ - int fd = sensorp->fd; - int retval = 0; - - if (fd == -1) - retval = -1; - else if (ioctl(fd, I2C_GET_TEMPERATURE, temp) == -1) { - retval = -1; - if (sensorp->error == 0) { - sensorp->error = 1; - envd_log(LOG_WARNING, ENV_SENSOR_ACCESS_FAIL, - sensorp->name, errno, strerror(errno)); - } - } else if (sensorp->error != 0) { - sensorp->error = 0; - envd_log(LOG_WARNING, ENV_SENSOR_ACCESS_OK, sensorp->name); - } - - return (retval); -} - -/* - * Get current fan speed - * Returns -1 on error, 0 if successful - */ -int -get_fan_speed(env_fan_t *fanp, fanspeed_t *fanspeedp) -{ - int fan_fd; - int retval = 0; - - fan_fd = fanp->fd; - if (fan_fd == -1 || read(fan_fd, fanspeedp, sizeof (fanspeed_t)) != - sizeof (fanspeed_t)) - retval = -1; - return (retval); -} - -/* - * Set fan speed - * Returns -1 on error, 0 if successful - */ -static int -set_fan_speed(env_fan_t *fanp, fanspeed_t fanspeed) -{ - int fan_fd; - int retval = 0; - - fan_fd = fanp->fd; - if (fan_fd == -1 || write(fan_fd, &fanspeed, sizeof (fanspeed)) != - sizeof (fanspeed_t)) - retval = -1; - return (retval); -} - - -/* - * close all fan devices - */ -static void -envd_close_fans(void) -{ - int i; - env_fan_t *fanp; - - for (i = 0; (fanp = envd_fans[i]) != NULL; i++) { - if (fanp->fd != -1) { - (void) close(fanp->fd); - fanp->fd = -1; - } - } -} - -/* - * Close sensor devices - */ -static void -envd_close_sensors(void) -{ - int i; - env_sensor_t *sensorp; - - for (i = 0; (sensorp = envd_sensors[i]) != NULL; i++) { - if (sensorp->fd != -1) { - (void) close(sensorp->fd); - sensorp->fd = -1; - } - } -} - -/* - * Close PM device - */ -static void -envd_close_pm(void) -{ - if (pm_fd != -1) { - (void) close(pm_fd); - pm_fd = -1; - } -} - -/* - * Open fan devices and initialize per fan data structure. - * Returns #fans found. - */ -static int -envd_setup_fans(void) -{ - int i, fd; - fanspeed_t speed; - env_fan_t *fanp; - char path[FILENAME_MAX]; - int fancnt = 0; - - for (i = 0; (fanp = envd_fans[i]) != NULL; i++) { - fanp->fd = -1; - fanp->cur_speed = 0; - fanp->prev_speed = 0; - - (void) strcpy(path, "/devices"); - (void) strlcat(path, fanp->devfs_path, sizeof (path)); - fd = open(path, O_RDWR); - if (fd == -1) { - envd_log(LOG_WARNING, ENV_FAN_OPEN_FAIL, fanp->name, - fanp->devfs_path, errno, strerror(errno)); - fanp->present = B_FALSE; - continue; - } - fanp->fd = fd; - fanp->present = B_TRUE; - fancnt++; - - /* - * Set cur_speed/prev_speed to current fan speed - */ - if (get_fan_speed(fanp, &speed) == -1) { - /* - * The Fan driver does not know the current fan speed. - * Initialize it to 50% of the max speed and reread - * to get the current speed. - */ - speed = fanp->speed_max/2; - (void) set_fan_speed(fanp, speed); - if (get_fan_speed(fanp, &speed) == -1) - continue; - } - fanp->cur_speed = speed; - fanp->prev_speed = speed; - } - return (fancnt); -} - -/* - * Open temperature sensor devices and initialize per sensor data structure. - * Returns #sensors found. - */ -static int -envd_setup_sensors(void) -{ - int i; - tempr_t temp; - env_sensor_t *sensorp; - char path[FILENAME_MAX]; - int sensorcnt = 0; - sensor_thresh_t *threshp; - - for (i = 0; (sensorp = envd_sensors[i]) != NULL; i++) { - sensorp->fd = -1; - sensorp->shutdown_initiated = B_FALSE; - sensorp->warning_tstamp = 0; - sensorp->shutdown_tstamp = 0; - threshp = sensorp->temp_thresh; - sensorp->cur_temp = threshp->target_temp; - sensorp->error = 0; - - (void) strcpy(path, "/devices"); - (void) strlcat(path, sensorp->devfs_path, sizeof (path)); - sensorp->fd = open(path, O_RDWR); - if (sensorp->fd == -1) { - envd_log(LOG_WARNING, ENV_SENSOR_OPEN_FAIL, - sensorp->name, sensorp->devfs_path, errno, - strerror(errno)); - sensorp->present = B_FALSE; - continue; - } - sensorp->present = B_TRUE; - sensorcnt++; - - if (monitor_temperature) { - /* - * Set low_power_off and high_power_off limits - */ - (void) ioctl(sensorp->fd, MAX1617_SET_LOW_LIMIT, - &threshp->low_power_off); - (void) ioctl(sensorp->fd, MAX1617_SET_HIGH_LIMIT, - &threshp->high_power_off); - } - - /* - * Set cur_temp field to the current temperature value - */ - if (get_temperature(sensorp, &temp) == 0) { - sensorp->cur_temp = temp; - } - } - return (sensorcnt); -} - -/* - * Read all temperature sensors and take appropriate action based - * upon temperature threshols associated with each sensor. Possible - * actions are: - * - * temperature > high_shutdown - * temperature < low_shutdown - * Gracefully shutdown the system and log/print a message - * on the system console provided the temperature has been - * in shutdown range for "shutdown_interval" seconds. - * - * high_warning < temperature <= high_shutdown - * low_warning > temperature >= low_shutdown - * Log/print a warning message on the system console at most - * once every "warning_interval" seconds. - * - * Note that the current temperature is recorded in the "cur_temp" field - * within each env_sensor_t structure. - */ -static void -monitor_sensors(void) -{ - tempr_t temp; - int i; - env_sensor_t *sensorp; - sensor_thresh_t *threshp; - struct timeval ct; - char msgbuf[BUFSIZ]; - char syscmd[BUFSIZ]; - - for (i = 0; (sensorp = envd_sensors[i]) != NULL; i++) { - if (get_temperature(sensorp, &temp) < 0) - continue; - - sensorp->cur_temp = temp; - - if (env_debug) - envd_log(LOG_INFO, - "sensor: %-13s temp cur:%3d target:%3d\n", - sensorp->name, temp, - sensorp->temp_thresh->target_temp); - - if (!monitor_temperature) - continue; - - /* - * If this sensor already triggered system shutdown, don't - * log any more shutdown/warning messages for it. - */ - if (sensorp->shutdown_initiated) - continue; - - /* - * Check for the temperature in warning and shutdown range - * and take appropriate action. - */ - threshp = sensorp->temp_thresh; - if (TEMP_IN_WARNING_RANGE(temp, threshp)) { - /* - * Log warning message at most once every - * warning_interval seconds. - */ - (void) gettimeofday(&ct, NULL); - if ((ct.tv_sec - sensorp->warning_tstamp) >= - warning_interval) { - envd_log(LOG_WARNING, ENV_WARNING_MSG, - sensorp->name, temp, - threshp->low_warning, - threshp->high_warning); - sensorp->warning_tstamp = ct.tv_sec; - } - } - - if (TEMP_IN_SHUTDOWN_RANGE(temp, threshp)) { - (void) gettimeofday(&ct, NULL); - if (sensorp->shutdown_tstamp == 0) - sensorp->shutdown_tstamp = ct.tv_sec; - - /* - * Shutdown the system if the temperature remains - * in the shutdown range for over shutdown_interval - * seconds. - */ - if ((ct.tv_sec - sensorp->shutdown_tstamp) >= - shutdown_interval) { - /* log error */ - sensorp->shutdown_initiated = B_TRUE; - (void) snprintf(msgbuf, sizeof (msgbuf), - ENV_SHUTDOWN_MSG, sensorp->name, - temp, threshp->low_shutdown, - threshp->high_shutdown); - envd_log(LOG_CRIT, msgbuf); - - /* shutdown the system (only once) */ - if (system_shutdown_started == B_FALSE) { - (void) snprintf(syscmd, sizeof (syscmd), - "%s \"%s\"", shutdown_cmd, msgbuf); - envd_log(LOG_CRIT, syscmd); - system_shutdown_started = B_TRUE; - (void) system(syscmd); - } - } - } else if (sensorp->shutdown_tstamp != 0) - sensorp->shutdown_tstamp = 0; - } -} - - -/* - * This is the environment thread, which monitors the current temperature - * and power managed state and controls system fan speed. Temperature is - * polled every sensor-poll_interval seconds duration. - */ -static void * -envthr(void *args) -{ - int err; - fanspeed_t fan_speed; - struct timeval ct; - struct timespec to; - env_fan_t *pmfanp = &envd_system_fan; - tempr_t cpu_amb_temp, cpu_die_temp; - tempr_t cpu_amb_warning, cpu_die_warning; - - (void) pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); - (void) pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); - - cpu_amb_warning = cpu_amb_sensor.temp_thresh->high_warning; - cpu_die_warning = cpu_die_sensor.temp_thresh->high_warning; - - for (;;) { - (void) gettimeofday(&ct, NULL); - - /* - * Monitor current temperature for all sensors - * (current temperature is recorded in the "cur_temp" - * field within each sensor data structure) - */ - monitor_sensors(); - - cpu_amb_temp = cpu_amb_sensor.cur_temp; - cpu_die_temp = cpu_die_sensor.cur_temp; - - /* - * Process any PM state change events while waiting until - * time to poll sensors again (i.e. sensor_poll_interval - * seconds from the last time). - */ - to.tv_sec = ct.tv_sec + sensor_poll_interval; - to.tv_nsec = 0; - for (;;) { - /* - * Turn off system fan if in lowest power state - * and both CPU die and ambient temperatures are - * below corresponding high warning temperatures. - */ - fan_speed = pmfanp->speed_max; - if (cur_lpstate && cpu_amb_temp < cpu_amb_warning && - cpu_die_temp < cpu_die_warning) - fan_speed = pmfanp->speed_min; - - if (env_debug) - envd_log(LOG_INFO, - "fan: %-16s speed cur:%3d new:%3d " - "low-power:%d\n", pmfanp->name, - (uint_t)pmfanp->cur_speed, - (uint_t)fan_speed, cur_lpstate); - - if (fan_speed != pmfanp->cur_speed && - set_fan_speed(pmfanp, fan_speed) == 0) - pmfanp->cur_speed = fan_speed; - - /* wait for power state change or time to poll */ - pthread_mutex_lock(&lpstate_lock); - err = pthread_cond_timedwait(&lpstate_cond, - &lpstate_lock, &to); - pthread_mutex_unlock(&lpstate_lock); - if (err == ETIMEDOUT) - break; - } - } - /*NOTREACHED*/ - return (NULL); -} - -/* - * This is the power management thread, which monitors all power state - * change events and wakes up the "envthr" thread when the system enters - * or exits the lowest power state. - */ -static void * -pmthr(void *args) -{ - pm_state_change_t pmstate; - char physpath[PATH_MAX]; - int prev_lpstate; - - (void) pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); - (void) pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); - - pmstate.physpath = physpath; - pmstate.size = sizeof (physpath); - cur_lpstate = 0; - prev_lpstate = 0; - - for (;;) { - /* - * Get PM state change events to check if the system - * is in lowest power state and wake up the "envthr" - * thread when the power state changes. - * - * To minimize polling, we use the blocking interface - * to get the power state change event here. - */ - if (ioctl(pm_fd, PM_GET_STATE_CHANGE_WAIT, &pmstate) != 0) { - if (errno != EINTR) - break; - continue; - } - - /* - * Extract the lowest power state from the last queued - * state change events. We pick up queued state change - * events using the non-blocking interface and wake up - * the "envthr" thread only after consuming all the - * state change events queued at that time. - */ - do { - if (env_debug > 1) { - envd_log(LOG_INFO, - "pmstate event:0x%x flags:%x comp:%d " - "oldval:%d newval:%d path:%s\n", - pmstate.event, pmstate.flags, - pmstate.component, pmstate.old_level, - pmstate.new_level, pmstate.physpath); - } - cur_lpstate = - (pmstate.flags & PSC_ALL_LOWEST) ? 1 : 0; - } while (ioctl(pm_fd, PM_GET_STATE_CHANGE, &pmstate) == 0); - - if (cur_lpstate != prev_lpstate) { - prev_lpstate = cur_lpstate; - pthread_mutex_lock(&lpstate_lock); - pthread_cond_signal(&lpstate_cond); - pthread_mutex_unlock(&lpstate_lock); - } - } - - /* - * We won't be able to monitor lowest power state any longer, - * hence reset it and wakeup the "envthr". - */ - if (cur_lpstate != 0) { - prev_lpstate = cur_lpstate; - cur_lpstate = 0; - pthread_mutex_lock(&lpstate_lock); - pthread_cond_signal(&lpstate_cond); - pthread_mutex_unlock(&lpstate_lock); - } - envd_log(LOG_ERR, PM_THREAD_EXITING, errno, strerror(errno)); - return (NULL); -} - - -/* - * Parse string value (handling escaped double quotes and other characters) - * and return string end pointer. - */ - -static char * -parse_string_val(char *buf) -{ - char *p, c; - - if (buf[0] != '"') - return (NULL); - - for (p = buf+1; (c = *p) != '\0'; p++) - if (c == '"' || (c == '\\' && *++p == '\0')) - break; - - return ((*p == '"') ? p : NULL); -} - - -/* - * Process configuration file - */ -static void -process_env_conf_file(void) -{ - int line, len, val, toklen; - char buf[BUFSIZ]; - FILE *fp; - env_tuneable_t *tunep; - char nmbuf[SYS_NMLN]; - char fname[PATH_MAX]; - char *tok, *valuep, *strend; - char tokdel[] = " \t\n\r"; - int skip_line = 0; - - if (sysinfo(SI_PLATFORM, nmbuf, sizeof (nmbuf)) == -1) - return; - - (void) snprintf(fname, sizeof (fname), PICLD_PLAT_PLUGIN_DIRF, nmbuf); - (void) strlcat(fname, ENV_CONF_FILE, sizeof (fname)); - fp = fopen(fname, "r"); - if (fp == NULL) - return; - - /* - * Blank lines or lines starting with "#" or "*" in the first - * column are ignored. All other lines are assumed to contain - * input in the following format: - * - * keyword value - * - * where the "value" can be a signed integer or string (in - * double quotes) depending upon the keyword. - */ - - for (line = 1; fgets(buf, sizeof (buf), fp) != NULL; line++) { - len = strlen(buf); - if (len <= 0) - continue; - - /* skip long lines */ - if (buf[len-1] != '\n') { - skip_line = 1; - continue; - } else if (skip_line) { - skip_line = 0; - continue; - } else - buf[len-1] = '\0'; - - /* skip comments */ - if (buf[0] == '*' || buf[0] == '#') - continue; - - /* - * Skip over white space to get the keyword - */ - tok = buf + strspn(buf, tokdel); - if (*tok == '\0') - continue; /* blank line */ - - toklen = strcspn(tok, tokdel); - tok[toklen] = '\0'; - - /* Get possible location for value (within current line) */ - valuep = tok + toklen + 1; - if (valuep > buf+len) - valuep = buf + len; - - /* - * Lookup the keyword and process value accordingly - */ - for (tunep = &env_tuneables[0]; tunep->name != NULL; tunep++) { - if (strcmp(tunep->name, tok) != 0) - continue; - - switch (tunep->type) { - case KTYPE_INT: - errno = 0; - val = strtol(valuep, &valuep, 0); - - /* Check for invalid value or extra tokens */ - if (errno != 0 || strtok(valuep, tokdel)) { - envd_log(LOG_INFO, - ENV_CONF_INT_EXPECTED, - fname, line, tok); - break; - } - - /* Update only if value within range */ - if (tunep->size == sizeof (int8_t) && - val == (int8_t)val) - *(int8_t *)tunep->addr = (int8_t)val; - else if (tunep->size == sizeof (short) && - val == (short)val) - *(short *)tunep->addr = (short)val; - else if (tunep->size == sizeof (int)) - *(int *)tunep->addr = (int)val; - else { - envd_log(LOG_INFO, - ENV_CONF_INT_EXPECTED, - fname, line, tok); - break; - } - if (env_debug) - envd_log(LOG_INFO, "SUNW_piclenvd: " - "file:%s line:%d %s = %d\n", - fname, line, tok, val); - break; - - case KTYPE_STRING: - /* - * String value must be within double quotes. - * Skip over initial white spaces before - * looking for value. - */ - valuep += strspn(valuep, tokdel); - strend = parse_string_val(valuep); - - if (strend == NULL || *valuep != '"' || - strtok(strend+1, tokdel) != NULL || - (strend-valuep) > tunep->size) { - envd_log(LOG_INFO, - ENV_CONF_STRING_EXPECTED, - fname, line, tok, - tunep->size); - break; - } - *strend = '\0'; - if (env_debug) - envd_log(LOG_INFO, "piclenvd: file:%s" - " line:%d %s = \"%s\"\n", - fname, line, tok, valuep+1); - (void) strcpy(tunep->addr, (caddr_t)valuep+1); - break; - - default: - envd_log(LOG_INFO, - ENV_CONF_UNSUPPORTED_TYPE, - fname, line, - tunep->type, tunep->name); - } - break; - } - - if (tunep->name == NULL) - envd_log(LOG_INFO, ENV_CONF_UNSUPPORTED_KEYWORD, - fname, line, tok); - } - (void) fclose(fp); -} - -/* - * Setup envrionmental daemon state and start threads to monitor - * temperature and power management state. - * Returns -1 on error, 0 if successful. - */ - -static int -envd_setup(void) -{ - if (envd_inited == B_FALSE) { - /* - * Initialize global state - */ - system_shutdown_started = B_FALSE; - envthr_created = B_FALSE; - pmthr_created = B_FALSE; - - if (pthread_attr_init(&thr_attr) != 0 || - pthread_attr_setscope(&thr_attr, PTHREAD_SCOPE_SYSTEM) != 0) - return (-1); - - if (pthread_mutex_init(&lpstate_lock, NULL) != 0 || - pthread_cond_init(&lpstate_cond, NULL) != 0) - return (-1); - - /* - * Process tuneable parameters - */ - process_env_conf_file(); - - /* - * Setup temperature sensors and fail if we can't open - * at least one sensor. - */ - if (envd_setup_sensors() <= 0) - return (-1); - - /* - * Setup fan device (don't fail even if we can't access - * the fan as we can still monitor temeperature. - */ - (void) envd_setup_fans(); - - /* - * Create a thread to monitor temperature and control fan - * speed. - */ - if (envthr_created == B_FALSE && pthread_create(&envthr_tid, - &thr_attr, envthr, NULL) != 0) { - envd_close_fans(); - envd_close_sensors(); - envd_log(LOG_CRIT, ENV_THREAD_CREATE_FAILED); - return (-1); - } - envthr_created = B_TRUE; - } - envd_inited = B_TRUE; - - /* - * Create a thread to monitor PM state - */ - if (pmthr_created == B_FALSE) { - pm_fd = open(PM_DEVICE, O_RDONLY); - if (pm_fd == -1 || pthread_create(&pmthr_tid, &thr_attr, - pmthr, NULL) != 0) { - envd_close_pm(); - envd_log(LOG_CRIT, PM_THREAD_CREATE_FAILED); - } else - pmthr_created = B_TRUE; - } - return (0); -} - - -static void -piclenvd_register(void) -{ - picld_plugin_register(&my_reg_info); -} - -static void -piclenvd_init(void) -{ - /* - * Start environmental daemon/threads - */ - if (envd_setup() != 0) { - envd_log(LOG_CRIT, ENVD_PLUGIN_INIT_FAILED); - return; - } - - /* - * Now setup/populate PICL tree - */ - env_picl_setup(); -} - -static void -piclenvd_fini(void) -{ - void *exitval; - - /* - * Kill both "envthr" and "pmthr" threads. - */ - if (envthr_created) { - (void) pthread_cancel(envthr_tid); - (void) pthread_join(envthr_tid, &exitval); - envthr_created = B_FALSE; - } - - if (pmthr_created) { - (void) pthread_cancel(pmthr_tid); - (void) pthread_join(pmthr_tid, &exitval); - pmthr_created = B_FALSE; - } - - /* - * close all sensors, fans and the power management device - */ - envd_close_pm(); - envd_close_fans(); - envd_close_sensors(); - envd_inited = B_FALSE; -} - -/*VARARGS2*/ -void -envd_log(int pri, const char *fmt, ...) -{ - va_list ap; - - va_start(ap, fmt); - vsyslog(pri, fmt, ap); - va_end(ap); -} diff --git a/usr/src/cmd/picl/plugins/sun4u/grover/envd/piclenvsetup.c b/usr/src/cmd/picl/plugins/sun4u/grover/envd/piclenvsetup.c deleted file mode 100644 index 6431df8bde..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/grover/envd/piclenvsetup.c +++ /dev/null @@ -1,838 +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 (c) 1999-2001 by Sun Microsystems, Inc. - * All rights reserved. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * This file contains code for setting up environmental related nodes - * and properties in the PICL tree. - * - * For each temperature-device class node, it does the following: - * - Create cpu and cpu-ambient temperautre-sensor class nodes. - * - Create "devfs-path" property under each temperature-sensor class node - * - Create "Temperature" volatile property under these nodes. - * - Create various temperature threshold properties under each node. - * - Create "Temperature" and "AmbientTemperature" volatile properties - * under corresponding "cpu" class node. - * - * For the "fan-control" node, it does the following: - * - Create system-fan node - * - Create "devfs-path" property under "fan" class node - * - Create "Speed" volatile propery under each node. - * - Create "SpeedUnit" property under each node. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "envd.h" - - -/* - * Volatile property read/write function typedef - */ -typedef int ptree_vol_rdfunc_t(ptree_rarg_t *parg, void *buf); -typedef int ptree_vol_wrfunc_t(ptree_warg_t *parg, const void *buf); - -/* - * PICL Classes and standard property names - */ -#define PICL_CLASS_CPU "cpu" -#define PICL_CLASS_FAN "fan" -#define PICL_CLASS_FAN_CONTROL "fan-control" -#define PICL_CLASS_TEMP_DEVICE "temperature-device" -#define PICL_CLASS_TEMP_SENSOR "temperature-sensor" - -#define PICL_PROP_REG "reg" -#define PICL_PROP_DEVFS_PATH "devfs-path" -#define PICL_PROP_UNIT_ADDRESS "UnitAddress" -#define UNITADDR_LEN_MAX 256 /* max length for UnitAddress */ - -/* - * temperature properties - */ -#define PROP_TEMPERATURE "Temperature" -#define PROP_CPU_AMB_TEMP "AmbientTemperature" -#define PROP_CPU_DIE_TEMP "Temperature" - -/* - * Various temperature threshold property names - */ -#define PROP_LOW_POWER_OFF "LowPowerOffThreshold" -#define PROP_LOW_SHUTDOWN "LowShutdownThreshold" -#define PROP_LOW_WARNING "LowWarningThreshold" -#define PROP_HIGH_POWER_OFF "HighPowerOffThreshold" -#define PROP_HIGH_SHUTDOWN "HighShutdownThreshold" -#define PROP_HIGH_WARNING "HighWarningThreshold" - -/* - * fan properties - */ -#define PROP_FAN_SPEED "Speed" -#define PROP_FAN_SPEED_UNIT "SpeedUnit" -#define PROP_FAN_SPEED_UNIT_VALUE "%" - -/* - * PICL class path for CPU nodes - */ -#define CPU_PLAT_PATH "_class:/upa/cpu?ID=0" - -/* - * "UnitAddress" propval for various temperature devices (platform dependent) - */ -#define CPU_TEMPDEV_UNITADDR "0,30" - -/* - * Sensor node data structure - */ -typedef struct { - char *sensor_name; /* sensor name */ - env_sensor_t *sensorp; /* sensor info */ - char *unitaddr; /* parent's UnitAddress propval */ - char *sdev_node; /* sensed device node name */ - char *sdev_pname; /* sensed device "temp" prop name */ - picl_nodehdl_t nodeh; /* sensor node handle */ - picl_prophdl_t proph; /* "Temperature" property handle */ - picl_prophdl_t sdev_proph; /* property handle for sensed dev */ -} sensor_node_t; - - -/* - * Sensor nodes array - */ -static sensor_node_t sensor_nodes[] = { - {SENSOR_CPU_DIE, NULL, CPU_TEMPDEV_UNITADDR, - CPU_PLAT_PATH, PROP_CPU_DIE_TEMP}, - - {SENSOR_CPU_AMB, NULL, CPU_TEMPDEV_UNITADDR, - CPU_PLAT_PATH, PROP_CPU_AMB_TEMP}, - - {NULL, NULL, NULL, NULL, NULL} -}; - - -/* - * Fan node data structure - */ -typedef struct { - char *fan_name; /* fan name */ - env_fan_t *fanp; /* fan information */ - char *speed_unit; /* speed unit string */ - picl_nodehdl_t nodeh; /* "fan" node handle */ - picl_prophdl_t proph; /* "Speed" property handle */ -} fan_node_t; - - -/* - * Fan node array - */ -static fan_node_t fan_nodes[] = { - {ENV_SYSTEM_FAN, NULL, PROP_FAN_SPEED_UNIT_VALUE}, - {NULL, NULL, NULL} -}; - -/* - * Miscellaneous declarations - */ -typedef struct node_list { - picl_nodehdl_t nodeh; - struct node_list *next; -} node_list_t; - -static void delete_sensor_nodes_and_props(void); -static void delete_fan_nodes_and_props(void); - - - -/* - * Read function for volatile "Temperature" property - */ -static int -get_current_temp(ptree_rarg_t *parg, void *buf) -{ - tempr_t temp; - picl_prophdl_t proph; - sensor_node_t *snodep; - - /* - * Locate the sensor in our sensor_nodes table by matching the - * property handle and get its temperature. - */ - proph = parg->proph; - for (snodep = &sensor_nodes[0]; snodep->sensor_name != NULL; snodep++) { - if (snodep->proph != proph && - snodep->sdev_proph != proph) - continue; - - if (get_temperature(snodep->sensorp, &temp) < 0) - return (PICL_FAILURE); - (void) memcpy(buf, (caddr_t)&temp, sizeof (tempr_t)); - return (PICL_SUCCESS); - } - return (PICL_FAILURE); -} - - -/* - * Read function for volatile "Speed" property on "fan" class node - */ -static int -get_current_speed(ptree_rarg_t *parg, void *buf) -{ - fanspeed_t speed; - picl_prophdl_t proph; - fan_node_t *fnodep; - - /* - * Locate the fan in our fan_nodes table by matching the - * property handle and get fan speed. - */ - proph = parg->proph; - for (fnodep = &fan_nodes[0]; fnodep->fan_name != NULL; fnodep++) { - if (fnodep->proph != proph) - continue; - if (get_fan_speed(fnodep->fanp, &speed) < 0) - return (PICL_FAILURE); - - (void) memcpy(buf, (caddr_t)&speed, sizeof (speed)); - return (PICL_SUCCESS); - } - return (PICL_FAILURE); -} - - -static node_list_t * -add_node_to_list(picl_nodehdl_t nodeh, node_list_t *listp) -{ - node_list_t *el; - node_list_t *tmp; - - el = malloc(sizeof (node_list_t)); - if (el == NULL) - return (listp); - el->nodeh = nodeh; - el->next = NULL; - if (listp == NULL) { - listp = el; - return (listp); - } - - /* - * append to the end to preserve the order found - */ - tmp = listp; - while (tmp->next != NULL) - tmp = tmp->next; - - tmp->next = el; - return (listp); -} - - - -/* - * Get a list of nodes of the specified classname under nodeh - * Once a node of the specified class is found, it's children are not - * searched. - */ -static node_list_t * -get_node_list_by_class(picl_nodehdl_t nodeh, const char *classname, - node_list_t *listp) -{ - int err; - char clname[PICL_CLASSNAMELEN_MAX+1]; - picl_nodehdl_t chdh; - - /* - * go through the children - */ - err = ptree_get_propval_by_name(nodeh, PICL_PROP_CHILD, &chdh, - sizeof (picl_nodehdl_t)); - - while (err == PICL_SUCCESS) { - err = ptree_get_propval_by_name(chdh, PICL_PROP_CLASSNAME, - clname, strlen(classname) + 1); - - if ((err == PICL_SUCCESS) && (strcmp(clname, classname) == 0)) - listp = add_node_to_list(chdh, listp); - else - listp = get_node_list_by_class(chdh, classname, listp); - - err = ptree_get_propval_by_name(chdh, PICL_PROP_PEER, &chdh, - sizeof (picl_nodehdl_t)); - } - return (listp); -} - - -/* - * Free memory allocated to build the specified node list. - */ -static void -free_node_list(node_list_t *listp) -{ - node_list_t *next; - - for (; listp != NULL; listp = next) { - next = listp->next; - free(listp); - } -} - -/* - * Get PICL_PTYPE_CHARSTRING "UnitAddress" property - */ -static int -get_unit_address_prop(picl_nodehdl_t nodeh, void *buf, size_t len) -{ - int err; - picl_prophdl_t proph; - ptree_propinfo_t pinfo; - - err = ptree_get_prop_by_name(nodeh, PICL_PROP_UNIT_ADDRESS, &proph); - if (err == PICL_SUCCESS) - err = ptree_get_propinfo(proph, &pinfo); - - if (err != PICL_SUCCESS) - return (err); - - if (pinfo.piclinfo.type != PICL_PTYPE_CHARSTRING || - pinfo.piclinfo.size > len) - return (PICL_FAILURE); - - err = ptree_get_propval(proph, buf, pinfo.piclinfo.size); - return (err); -} - - -/* - * Create and add the specified regular property - */ - -static int -add_regular_prop(picl_nodehdl_t nodeh, char *name, int type, int access, - int size, void *valbuf, picl_prophdl_t *prophp) -{ - int err; - ptree_propinfo_t propinfo; - picl_prophdl_t proph; - - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - type, access, size, name, NULL, NULL); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_create_and_add_prop(nodeh, &propinfo, valbuf, &proph); - if (err == PICL_SUCCESS && prophp) - *prophp = proph; - return (err); -} - - -/* - * Create and add the specified volatile property - */ -static int -add_volatile_prop(picl_nodehdl_t nodeh, char *name, int type, int access, - int size, ptree_vol_rdfunc_t *rdfunc, ptree_vol_wrfunc_t *wrfunc, - picl_prophdl_t *prophp) -{ - int err; - ptree_propinfo_t propinfo; - picl_prophdl_t proph; - - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - type, (access|PICL_VOLATILE), size, name, rdfunc, wrfunc); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_create_and_add_prop(nodeh, &propinfo, NULL, &proph); - if (err == PICL_SUCCESS && prophp) - *prophp = proph; - return (err); -} - -/* - * Add temperature threshold properties - */ -static void -add_sensor_thresh_props(picl_nodehdl_t nodeh, sensor_thresh_t *threshp) -{ - picl_prophdl_t proph; - - (void) add_regular_prop(nodeh, PROP_LOW_POWER_OFF, - PICL_PTYPE_INT, PICL_READ, - sizeof (threshp->low_power_off), - (void *)&(threshp->low_power_off), &proph); - - (void) add_regular_prop(nodeh, PROP_LOW_SHUTDOWN, - PICL_PTYPE_INT, PICL_READ, - sizeof (threshp->low_shutdown), - (void *)&(threshp->low_shutdown), &proph); - - (void) add_regular_prop(nodeh, PROP_LOW_WARNING, - PICL_PTYPE_INT, PICL_READ, - sizeof (threshp->low_warning), - (void *)&(threshp->low_warning), &proph); - - (void) add_regular_prop(nodeh, PROP_HIGH_WARNING, - PICL_PTYPE_INT, PICL_READ, - sizeof (threshp->high_warning), - (void *)&(threshp->high_warning), &proph); - - (void) add_regular_prop(nodeh, PROP_HIGH_SHUTDOWN, - PICL_PTYPE_INT, PICL_READ, - sizeof (threshp->high_shutdown), - (void *)&(threshp->high_shutdown), &proph); - - (void) add_regular_prop(nodeh, PROP_HIGH_POWER_OFF, - PICL_PTYPE_INT, PICL_READ, - sizeof (threshp->high_power_off), - (void *)&(threshp->high_power_off), &proph); -} - - -/* - * Lookup "temperature-device" class nodes and create "temperature-sensor" - * class nodes and relevant properties under those nodes. - * - * For each entry in sensor_nodes[] array, do the following: - * - Create specified (cpu-die or cpu-ambient) "temperautre-sensor" class - * node. - * - Create "devfs-path" property under this node. - * - Create "Temperature" volatile property under this node. - * - Create various temperature threshold properties under this node. - * - Create specified ("Temperature" or "AmbientTemperature") volatile - * temperature property under specified sdev_node node. - */ - -static int -add_sensor_nodes_and_props(picl_nodehdl_t plath) -{ - int err; - char *pname, *nodename, *refnode, *devfs_path; - node_list_t *node_list, *listp; - sensor_node_t *snodep; - sensor_thresh_t *threshp; - picl_nodehdl_t nodeh, refnodeh, cnodeh; - picl_prophdl_t proph; - char unitaddr[UNITADDR_LEN_MAX]; - env_sensor_t *sensorp; - - node_list = - get_node_list_by_class(plath, PICL_CLASS_TEMP_DEVICE, NULL); - - if (node_list == NULL) - return (PICL_FAILURE); - - for (listp = node_list; listp != NULL; listp = listp->next) { - /* - * Get "reg" property. Skip if no "reg" property found. - */ - nodeh = listp->nodeh; - err = get_unit_address_prop(nodeh, (void *)unitaddr, - sizeof (unitaddr)); - if (err != PICL_SUCCESS) - continue; - - for (snodep = sensor_nodes; snodep->sensor_name != NULL; - snodep++) { - - /* Match "UnitAddress" property */ - if (strcasecmp(unitaddr, snodep->unitaddr) != 0) - continue; - - /* - * Skip if already initialized or no sensor info - */ - sensorp = snodep->sensorp; - if (snodep->nodeh != NULL || sensorp == NULL) - continue; - - /* - * Create temperature-sensor node - */ - nodename = snodep->sensor_name; - err = ptree_create_and_add_node(nodeh, nodename, - PICL_CLASS_TEMP_SENSOR, &cnodeh); - if (env_debug) - envd_log(LOG_INFO, - "Creating PICL sensor node '%s' err:%d\n", - nodename, err); - if (err != PICL_SUCCESS) - break; - - /* save node handle */ - snodep->nodeh = cnodeh; - - /* - * Add "devfs_path" property in child node - */ - devfs_path = sensorp->devfs_path; - pname = PICL_PROP_DEVFS_PATH; - err = add_regular_prop(cnodeh, pname, - PICL_PTYPE_CHARSTRING, PICL_READ, - strlen(devfs_path)+1, (void *)devfs_path, &proph); - if (err != PICL_SUCCESS) - break; - - /* - * Now add volatile "temperature" volatile property - * in this "temperature-sensor" class node. - */ - pname = PROP_TEMPERATURE; - err = add_volatile_prop(cnodeh, pname, - PICL_PTYPE_INT, PICL_READ, sizeof (tempr_t), - get_current_temp, NULL, &proph); - if (err != PICL_SUCCESS) - break; - - /* Save prop handle */ - snodep->proph = proph; - - /* - * Add threshold related properties - */ - threshp = sensorp->temp_thresh; - if (threshp != NULL) - add_sensor_thresh_props(cnodeh, threshp); - - /* - * Finally create property in the sensed device - * (if one specified) - */ - refnode = snodep->sdev_node; - pname = snodep->sdev_pname; - if (refnode == NULL || pname == NULL) - continue; - - err = ptree_get_node_by_path(refnode, &refnodeh); - if (err == PICL_SUCCESS) { - err = add_volatile_prop(refnodeh, pname, - PICL_PTYPE_INT, PICL_READ, - sizeof (tempr_t), get_current_temp, - NULL, &proph); - } - - if (err != PICL_SUCCESS) - break; - - /* Save prop handle */ - snodep->sdev_proph = proph; - } - if (err != PICL_SUCCESS) { - delete_sensor_nodes_and_props(); - free_node_list(node_list); - if (env_debug) - envd_log(LOG_INFO, - "Can't create prop/node for sensor '%s'\n", - nodename); - return (err); - } - } - - free_node_list(node_list); - return (PICL_SUCCESS); -} - -/* - * Delete all sensor nodes and related properties created by the - * add_sensor_prop() for each sensor node in the PICL tree. - */ -static void -delete_sensor_nodes_and_props(void) -{ - sensor_node_t *snodep; - - /* - * Delete/destroy any property created in the sensed device - * as well as the sensor node and all properties under it. - * Note that deleiing/destroying a node deletes/destroys - * all properties within that node. - */ - - for (snodep = sensor_nodes; snodep->sensor_name != NULL; snodep++) { - if (snodep->sdev_proph != NULL) { - (void) ptree_delete_prop(snodep->sdev_proph); - (void) ptree_destroy_prop(snodep->sdev_proph); - snodep->sdev_proph = NULL; - } - - if (snodep->nodeh != NULL) { - /* delete node and all properties under it */ - (void) ptree_delete_node(snodep->nodeh); - (void) ptree_destroy_node(snodep->nodeh); - snodep->nodeh = NULL; - snodep->proph = NULL; - } - } -} - - -/* - * Lookup "fan-control" class node and create "fan" class nodes and - * relevant properties under those nodes. - * - * For each entry in fan_nodes[] array, do the following: - * - Create specified "fan" class node. - * - Create "devfs-path" property under "fan" class node - * - Create "Speed" volatile propery under "fan" class node. - * - Create "SpeedUnit" property under "fan" class node. - */ - -static int -add_fan_nodes_and_props(picl_nodehdl_t plath) -{ - int err; - char *pname, *nodename, *devfs_path; - env_fan_t *fanp; - fan_node_t *fnodep; - picl_nodehdl_t nodeh, cnodeh; - picl_prophdl_t proph; - node_list_t *node_list, *listp; - - node_list = - get_node_list_by_class(plath, PICL_CLASS_FAN_CONTROL, NULL); - - if (node_list == NULL) - return (PICL_FAILURE); - - for (listp = node_list; listp != NULL; listp = listp->next) { - /* - * Add various fan nodes and properties - */ - nodeh = listp->nodeh; - err = PICL_SUCCESS; - for (fnodep = fan_nodes; fnodep->fan_name != NULL; fnodep++) { - - /* Skip if already initialized or no fan info */ - if (fnodep->nodeh != NULL || fnodep->fanp == NULL) - continue; - - /* - * Create "fan" class node and save node handle - */ - nodename = fnodep->fan_name; - err = ptree_create_and_add_node(nodeh, nodename, - PICL_CLASS_FAN, &cnodeh); - if (env_debug) - envd_log(LOG_INFO, - "Creating PICL fan node '%s' err:%d\n", - nodename, err); - - if (err != PICL_SUCCESS) - break; - fnodep->nodeh = cnodeh; - - /* - * Add "devfs_path" property in child node - */ - fanp = fnodep->fanp; - devfs_path = fanp->devfs_path; - pname = PICL_PROP_DEVFS_PATH; - err = add_regular_prop(cnodeh, pname, - PICL_PTYPE_CHARSTRING, PICL_READ, - strlen(devfs_path)+1, (void *)devfs_path, &proph); - - if (err != PICL_SUCCESS) - break; - - /* - * Add "Speed" volatile property in this "fan" - * class node and save prop handle. - */ - pname = PROP_FAN_SPEED; - err = add_volatile_prop(cnodeh, pname, PICL_PTYPE_INT, - PICL_READ, sizeof (fanspeed_t), get_current_speed, - NULL, &proph); - - if (err != PICL_SUCCESS) - break; - fnodep->proph = proph; - - /* - * Add other "fan" class properties - */ - pname = PROP_FAN_SPEED_UNIT, - err = add_regular_prop(cnodeh, pname, - PICL_PTYPE_CHARSTRING, PICL_READ, - strlen(fnodep->speed_unit)+1, - (void *)fnodep->speed_unit, &proph); - - if (err != PICL_SUCCESS) - break; - } - if (err != PICL_SUCCESS) { - delete_fan_nodes_and_props(); - free_node_list(node_list); - if (env_debug) - envd_log(LOG_WARNING, - "Can't create prop/node for fan '%s'\n", - nodename); - return (err); - } - } - - free_node_list(node_list); - return (PICL_SUCCESS); -} - - -/* - * Delete all fan nodes and related properties created by the - * add_fan_props() for each fan node in the PICL tree. - */ -static void -delete_fan_nodes_and_props(void) -{ - fan_node_t *fnodep; - - /* - * Delete/destroy fan node and all properties under it. - * Note that deleiing/destroying a node deletes/destroys - * all properties within that node. - */ - - for (fnodep = fan_nodes; fnodep->fan_name != NULL; fnodep++) { - if (fnodep->nodeh != NULL) { - (void) ptree_delete_node(fnodep->nodeh); - (void) ptree_destroy_node(fnodep->nodeh); - fnodep->nodeh = NULL; - } - } -} - -/* - * Find the ENVMODEL_CONF_FILE file. - */ -static int -get_envmodel_conf_file(char *outfilename) -{ - char nmbuf[SYS_NMLN]; - char pname[PATH_MAX]; - - if (sysinfo(SI_PLATFORM, nmbuf, sizeof (nmbuf)) != -1) { - (void) snprintf(pname, PATH_MAX, PICLD_PLAT_PLUGIN_DIRF, nmbuf); - (void) strlcat(pname, ENVMODEL_CONF_FILE, PATH_MAX); - if (access(pname, R_OK) == 0) { - (void) strlcpy(outfilename, pname, PATH_MAX); - return (0); - } - } - - if (sysinfo(SI_MACHINE, nmbuf, sizeof (nmbuf)) != -1) { - (void) snprintf(pname, PATH_MAX, PICLD_PLAT_PLUGIN_DIRF, nmbuf); - (void) strlcat(pname, ENVMODEL_CONF_FILE, PATH_MAX); - if (access(pname, R_OK) == 0) { - (void) strlcpy(outfilename, pname, PATH_MAX); - return (0); - } - } - - (void) snprintf(pname, PATH_MAX, "%s/%s", PICLD_COMMON_PLUGIN_DIR, - ENVMODEL_CONF_FILE); - - if (access(pname, R_OK) == 0) { - (void) strlcpy(outfilename, pname, PATH_MAX); - return (0); - } - - return (-1); -} - -void -env_picl_setup(void) -{ - int err; - sensor_node_t *snodep; - fan_node_t *fnodep; - picl_nodehdl_t plath; - char fullfilename[PATH_MAX]; - picl_nodehdl_t rooth; - - /* - * Initialize sensorp and other fields in the sensor_nodes[] array - */ - for (snodep = sensor_nodes; snodep->sensor_name != NULL; snodep++) { - snodep->sensorp = sensor_lookup(snodep->sensor_name); - snodep->nodeh = NULL; - snodep->proph = NULL; - snodep->sdev_proph = NULL; - } - - /* - * Initialize fanp and other fields in the fan_nodes[] array - */ - for (fnodep = fan_nodes; fnodep->fan_name != NULL; fnodep++) { - fnodep->fanp = fan_lookup(fnodep->fan_name); - fnodep->nodeh = NULL; - fnodep->proph = NULL; - } - - /* - * Get platform handle and populate PICL tree with environmental - * nodes and properties - */ - err = ptree_get_node_by_path("/platform", &plath); - - if (err == PICL_SUCCESS) { - err = add_sensor_nodes_and_props(plath); - if (err == PICL_SUCCESS) - err = add_fan_nodes_and_props(plath); - } - - if (err != PICL_SUCCESS) { - envd_log(LOG_CRIT, ENVD_PICL_SETUP_FAILED); - return; - } - - /* - * Parse the envmodel.conf file and populate the PICL tree - */ - if (get_envmodel_conf_file(fullfilename) < 0) - envd_log(LOG_CRIT, ENVD_PICL_SETUP_FAILED); - if (ptree_get_root(&rooth) != PICL_SUCCESS) - envd_log(LOG_CRIT, ENVD_PICL_SETUP_FAILED); - err = picld_pluginutil_parse_config_file(rooth, fullfilename); - - if (err != PICL_SUCCESS) - envd_log(LOG_CRIT, ENVD_PICL_SETUP_FAILED); -} diff --git a/usr/src/cmd/picl/plugins/sun4u/grover/frutree/Makefile b/usr/src/cmd/picl/plugins/sun4u/grover/frutree/Makefile deleted file mode 100644 index 5f5c0959bb..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/grover/frutree/Makefile +++ /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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# lib/picl/plugins/sun4u/grover/frutree/Makefile -# -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Blade-100 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONF= piclfrutree.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 -INFOS= piclfrutree.info system-board.info - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: $(CONF) - -install: $(ROOTLIBDIR) $(ROOTCONF) - -$(CONF): $(INFOS) - $(RM) $@ - $(CPP) piclfrutree.info > $@ - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/grover/frutree/envmodel.info b/usr/src/cmd/picl/plugins/sun4u/grover/frutree/envmodel.info deleted file mode 100644 index a2d5c6a3f4..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/grover/frutree/envmodel.info +++ /dev/null @@ -1,74 +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 (c) 2000-2001 by Sun Microsystems, Inc. - * All rights reserved. - * - * #ident "%Z%%M% %I% %E% SMI" - */ - -/* - * fan - */ -name:/frutree/chassis/system-fan-slot -NODE system-fan fru -ENDNODE - -/* - * temperature_sensors on cpu-module - */ -name:/frutree/chassis/system-board/cpu-slot?Slot=0/cpu-module - -TABLE Devices -ROW -PROP Class string r 0 "temperature-sensor" -REFPROP _temperature-sensor_ /platform/pci/pmu/i2c/temperature/cpu -ENDROW - -ROW -PROP Class string r 0 "temperature-sensor" -REFPROP _temperature-sensor_ /platform/pci/pmu/i2c/temperature/cpu-ambient -ENDROW - -ENDTABLE - -/* - * fan device under /platform - */ -name:/frutree/chassis/system-fan-slot/system-fan - -TABLE Devices - -ROW -PROP Class string r 0 "fan" -REFPROP _fan_ /platform/pci/pmu/fan-control/system -ENDROW - -ENDTABLE - -/* - * _fru_parent for the fan device - */ -name:/platform/pci/pmu/fan-control/system -REFPROP _fru_parent /frutree/chassis/system-fan-slot/system-fan -PROP Label string r 0 "system-fan" - diff --git a/usr/src/cmd/picl/plugins/sun4u/grover/frutree/piclfrutree.info b/usr/src/cmd/picl/plugins/sun4u/grover/frutree/piclfrutree.info deleted file mode 100644 index 9aaa685c39..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/grover/frutree/piclfrutree.info +++ /dev/null @@ -1,118 +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 (c) 2001 by Sun Microsystems, Inc. - * All rights reserved. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -#define PLATFORM_CLASS upa - -VERSION 1.1 -NODE frutree picl - NODE chassis fru - /* - * SunMC physical view view_points for this platform - * This will get moved to a separate SunMC physical view plugin later. - */ - PROP ViewPoints string r 0 "front rear top" - NODE power-supply-slot location - PROP Label string r 0 "power-supply-slot" - PROP SlotType string r 0 "power-supply" - ENDNODE - NODE disk-slot location - PROP Label string r 0 "0" - PROP Slot uint r 4 0 - ENDNODE - NODE system-fan-slot location - PROP Label string r 0 "system-fan-slot" - PROP SlotType string r 0 "fan-unit" - ENDNODE - ENDNODE -ENDNODE - -/* - * set the label for chassis, so that the children have a location - */ -name:/frutree/chassis -PROP Label string r 0 "chassis" - -/* - * add the power-supply fru to the power-supply-slot - */ -name:/frutree/chassis/power-supply-slot -NODE power-supply fru -ENDNODE - -/* - * set the SlotType for the disk slots - */ -name:/frutree/chassis/disk-slot?Slot=0 -PROP SlotType string r 0 "disk-slot" - -/* - * create the fru modules for disks in the fru tree - */ -name:/frutree/chassis/disk-slot?Slot=0 -REFNODE disk fru WITH _class:/PLATFORM_CLASS/pci/ide/block?target=0 - -/* - * _fru_parent for the hard disks - */ -_class:/PLATFORM_CLASS/pci/ide/block?target=0 -REFPROP _fru_parent /frutree/chassis/disk-slot?Slot=0/disk - -name:/frutree/chassis -#include "system-board.info" -#include "envmodel.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/grover/frutree/system-board.info b/usr/src/cmd/picl/plugins/sun4u/grover/frutree/system-board.info deleted file mode 100644 index 89142a456e..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/grover/frutree/system-board.info +++ /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, 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" - * - * create the system board structure - */ - -NODE system-board fru - PROP Label string r 0 "system-board" - NODE pci-slot location - PROP Label string r 0 "PCI1" - ENDNODE - NODE pci-slot location - PROP Label string r 0 "PCI2" - ENDNODE - NODE pci-slot location - PROP Label string r 0 "PCI3" - ENDNODE - NODE cpu-slot location - PROP Slot uint r 4 0 - PROP Label string r 0 "cpu0" - ENDNODE - NODE mem-slot location - PROP Slot uint r 4 0 - PROP Label string r 0 "DIMM0" - ENDNODE - NODE mem-slot location - PROP Slot uint r 4 1 - PROP Label string r 0 "DIMM1" - ENDNODE - NODE mem-slot location - PROP Slot uint r 4 2 - PROP Label string r 0 "DIMM2" - ENDNODE - NODE mem-slot location - PROP Slot uint r 4 3 - PROP Label string r 0 "DIMM3" - ENDNODE -ENDNODE - -/* - * Create transfer size property - */ -name:/platform/memory -PROP TransferSize uint r 4 64 - -/* - * set the SlotType for the cpu slots - */ -name:/frutree/chassis/system-board/cpu-slot -PROP SlotType string r 0 "cpu" - -/* - * Create fru node for memory module - * Use both OBP 4.10.6 (dimm-spd) and older (dimm) device names. - * Config file parser will ignore REFNODE with invalid device name. - */ -name:/frutree/chassis/system-board/mem-slot?Label=DIMM0 -REFNODE mem-module fru WITH /platform/pci/pmu/i2c/dimm?UnitAddress=0,a0 -REFNODE mem-module fru WITH /platform/pci/pmu/i2c/dimm-spd?UnitAddress=0,a0 - -name:/frutree/chassis/system-board/mem-slot?Label=DIMM1 -REFNODE mem-module fru WITH /platform/pci/pmu/i2c/dimm?UnitAddress=0,a2 -REFNODE mem-module fru WITH /platform/pci/pmu/i2c/dimm-spd?UnitAddress=0,a2 - -name:/frutree/chassis/system-board/mem-slot?Label=DIMM2 -REFNODE mem-module fru WITH /platform/pci/pmu/i2c/dimm?UnitAddress=0,a4 -REFNODE mem-module fru WITH /platform/pci/pmu/i2c/dimm-spd?UnitAddress=0,a4 - -name:/frutree/chassis/system-board/mem-slot?Label=DIMM3 -REFNODE mem-module fru WITH /platform/pci/pmu/i2c/dimm?UnitAddress=0,a6 -REFNODE mem-module fru WITH /platform/pci/pmu/i2c/dimm-spd?UnitAddress=0,a6 - -/* - * For memory module FRUs that are present, create _seeprom_source - * Use both OBP 4.10.6 (dimm-spd) and older (dimm) device names. - * Config file parser will ignore REFPROP with invalid device name. - */ -name:/frutree/chassis/system-board/mem-slot?Label=DIMM0/mem-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source /platform/pci/pmu/i2c/dimm?UnitAddress=0,a0 -REFPROP _seeprom_source /platform/pci/pmu/i2c/dimm-spd?UnitAddress=0,a0 - -name:/frutree/chassis/system-board/mem-slot?Label=DIMM1/mem-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source /platform/pci/pmu/i2c/dimm?UnitAddress=0,a2 -REFPROP _seeprom_source /platform/pci/pmu/i2c/dimm-spd?UnitAddress=0,a2 - -name:/frutree/chassis/system-board/mem-slot?Label=DIMM2/mem-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source /platform/pci/pmu/i2c/dimm?UnitAddress=0,a4 -REFPROP _seeprom_source /platform/pci/pmu/i2c/dimm-spd?UnitAddress=0,a4 - -name:/frutree/chassis/system-board/mem-slot?Label=DIMM3/mem-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source /platform/pci/pmu/i2c/dimm?UnitAddress=0,a6 -REFPROP _seeprom_source /platform/pci/pmu/i2c/dimm-spd?UnitAddress=0,a6 - -/* - * Set _fru_parent for memory seeprom devices - * Use both OBP 4.10.6 (dimm-spd) and older (dimm) device names. - * Config file parser will skip to next name entry if the device name is - * invalid. - */ -name:/platform/pci/pmu/i2c/dimm?UnitAddress=0,a0 -REFPROP _fru_parent /frutree/chassis/system-board/mem-slot?Label=DIMM0/mem-module - -name:/platform/pci/pmu/i2c/dimm-spd?UnitAddress=0,a0 -REFPROP _fru_parent /frutree/chassis/system-board/mem-slot?Label=DIMM0/mem-module - -name:/platform/pci/pmu/i2c/dimm?UnitAddress=0,a2 -REFPROP _fru_parent /frutree/chassis/system-board/mem-slot?Label=DIMM1/mem-module - -name:/platform/pci/pmu/i2c/dimm-spd?UnitAddress=0,a2 -REFPROP _fru_parent /frutree/chassis/system-board/mem-slot?Label=DIMM1/mem-module - -name:/platform/pci/pmu/i2c/dimm?UnitAddress=0,a4 -REFPROP _fru_parent /frutree/chassis/system-board/mem-slot?Label=DIMM2/mem-module - -name:/platform/pci/pmu/i2c/dimm-spd?UnitAddress=0,a4 -REFPROP _fru_parent /frutree/chassis/system-board/mem-slot?Label=DIMM2/mem-module - -name:/platform/pci/pmu/i2c/dimm?UnitAddress=0,a6 -REFPROP _fru_parent /frutree/chassis/system-board/mem-slot?Label=DIMM3/mem-module - -name:/platform/pci/pmu/i2c/dimm-spd?UnitAddress=0,a6 -REFPROP _fru_parent /frutree/chassis/system-board/mem-slot?Label=DIMM3/mem-module - -/* - * Populate PCI slots - */ -name:/frutree/chassis/system-board/pci-slot?Label=PCI1 -REFNODE pci-card fru WITH _class:/upa/pci/pci/picl?DeviceID=2 - -name:/frutree/chassis/system-board/pci-slot?Label=PCI2 -REFNODE pci-card fru WITH _class:/upa/pci/pci/picl?DeviceID=1 - -name:/frutree/chassis/system-board/pci-slot?Label=PCI3 -REFNODE pci-card fru WITH _class:/upa/pci/pci/picl?DeviceID=0 - -/* - * Create cpu-module fru - */ -name:/frutree/chassis/system-board/cpu-slot?Slot=0 -REFNODE cpu-module fru WITH _class:/PLATFORM_CLASS/cpu?ID=0 - -/* - * Set _fru_parent of /platform to system-board - */ -name:/platform -REFPROP _fru_parent /frutree/chassis/system-board - -/* - * Set _fru_parent of cpu to the cpu-module fru - */ -_class:/PLATFORM_CLASS/cpu?ID=0 -REFPROP _fru_parent /frutree/chassis/system-board/cpu-slot?Slot=0/cpu-module - -/* - * Set _fru_parent for temperature-device - */ -_class:/upa/pci/pmu/i2c/temperature-device -REFPROP _fru_parent /frutree/chassis/system-board/cpu-slot?Slot=0/cpu-module - -/* - * _fru_parent memory modules - */ -name:/platform/memory-controller/memory-module?ID=0 -REFPROP _fru_parent /frutree/chassis/system-board/mem-slot?Label=DIMM0/mem-module - -name:/platform/memory-controller/memory-module?ID=1 -REFPROP _fru_parent /frutree/chassis/system-board/mem-slot?Label=DIMM1/mem-module - -name:/platform/memory-controller/memory-module?ID=2 -REFPROP _fru_parent /frutree/chassis/system-board/mem-slot?Label=DIMM2/mem-module - -name:/platform/memory-controller/memory-module?ID=3 -REFPROP _fru_parent /frutree/chassis/system-board/mem-slot?Label=DIMM3/mem-module - -/* - * Set _fru_parent of pci to the pci-card fru - */ -_class:/PLATFORM_CLASS/pci/pci/picl?DeviceID=2 -REFPROP _fru_parent /frutree/chassis/system-board/pci-slot?Label=PCI1/pci-card - -_class:/PLATFORM_CLASS/pci/pci/picl?DeviceID=1 -REFPROP _fru_parent /frutree/chassis/system-board/pci-slot?Label=PCI2/pci-card - -_class:/PLATFORM_CLASS/pci/pci/picl?DeviceID=0 -REFPROP _fru_parent /frutree/chassis/system-board/pci-slot?Label=PCI3/pci-card - diff --git a/usr/src/cmd/picl/plugins/sun4u/grover/memcfg/Makefile b/usr/src/cmd/picl/plugins/sun4u/grover/memcfg/Makefile deleted file mode 100644 index 9fb0fe8af9..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/grover/memcfg/Makefile +++ /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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# - -include $(SRC)/Makefile.psm - -LIBRARY= libpiclmemcfg.a -VERS= .1 - -OBJECTS= piclmemcfg.o - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Blade-100 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -SRCS= $(OBJECTS:%.o=%.c) - -LIBS = $(DYNLIB) - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - - -CPPFLAGS += -I$(SRC)/cmd/picl/plugins/common/memcfg -LDLIBS += -L$(SRC)/lib/libpicltree/$(MACH) -LDLIBS += -L$(SRC)/cmd/picl/plugins/common/devtree -LDLIBS += -L$(ROOT)/usr/lib/picl/plugins -LDLIBS += -lc -lpicltree -lpicldevtree -LDLIBS += -R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins - - -LINKED_PLATFORMS = SUNW,Serverblade1 - -LINKED_DIRS = $(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%) -LINKED_LIB_DIRS = $(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%/lib) -LINKED_PICL_DIRS = $(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%/lib/picl) -LINKED_PLUGIN_DIRS = $(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%/lib/picl/plugins) - -LINKED_PLUGINS_DYNLIBS = $(LINKED_PLUGIN_DIRS:%=%/$(DYNLIB)) -LINKED_PLUGINS_LIBLINKS = $(LINKED_PLUGIN_DIRS:%=%/$(LIBLINKS)) - -GROVER_DYNLIB_DIR = ../../../../SUNW,Sun-Blade-100/lib/picl/plugins - -PLATFORM= SUNW,Sun-Blade-100 - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -POFILE= piclmemcfg.po - -all: $(LIBS) $(LIBLINKS) - -install: $(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) \ - $(LINKED_PLUGIN_DIRS) $(LINKED_PLUGINS_DYNLIBS) \ - $(LINKED_PLUGINS_LIBLINKS) - -_msg: $(MSGDOMAIN) $(POFILE) - $(RM) $(MSGDOMAIN)/$(POFILE) - $(CP) $(POFILE) $(MSGDOMAIN) - -$(MSGDOMAIN): - $(INS.dir) - -$(LIBLINKS): FRC - $(RM) $@; $(SYMLINK) $(DYNLIB) $@ - -# Linked platforms directory hierarchy -$(LINKED_DIRS): - $(INS.dir) -$(LINKED_LIB_DIRS): $(LINKED_DIRS) - $(INS.dir) -$(LINKED_PICL_DIRS): $(LINKED_LIB_DIRS) - $(INS.dir) -$(LINKED_PLUGIN_DIRS): $(LINKED_PICL_DIRS) - $(INS.dir) - -# Linked platforms links -$(LINKED_PLUGINS_DYNLIBS): $(LINKED_PLUGIN_DIRS) - $(RM) -r $@ ;\ - $(SYMLINK) $(GROVER_DYNLIB_DIR)/$(DYNLIB) $@ - -$(LINKED_PLUGINS_LIBLINKS): $(LINKED_PLUGIN_DIRS) - $(RM) -r $@ ;\ - $(SYMLINK) $(GROVER_DYNLIB_DIR)/$(DYNLIB) $@ - -# include library targets -include $(SRC)/cmd/picl/plugins/Makefile.targ -include $(SRC)/lib/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/grover/memcfg/memcfg_impl.h b/usr/src/cmd/picl/plugins/sun4u/grover/memcfg/memcfg_impl.h deleted file mode 100644 index f12d79a4ad..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/grover/memcfg/memcfg_impl.h +++ /dev/null @@ -1,78 +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 (c) 2000-2001 by Sun Microsystems, Inc. - * All rights reserved. - */ - -#ifndef _MEMCFG_IMPL_H -#define _MEMCFG_IMPL_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Log message texts - */ -#define EM_INIT_FAILED gettext("SUNW_piclmemcfg init failed!\n") -#define EM_PHYSIC_MEM_TREE_FAILED \ - gettext("SUNW_piclmemcfg physic memory tree failed!\n") -#define EM_LOGIC_MEM_TREE_FAILED \ - gettext("SUNW_piclmemcfg logic memory tree failed!\n") - -/* - * Constants for some PICL properties - */ -#define INTERLEAVEFACTOR 1 /* Only one interleave way */ - -/* - * OBP property names - */ -#define OBP_PROP_SIZE_CELLS "#size-cells" - -#define SUPPORTED_NUM_CELL_SIZE 2 /* #size-cells */ - -#define TOTAL_MEM_SLOTS 4 /* Total memory module slots */ - -typedef struct memmod_info { - picl_nodehdl_t memmodh; /* memory-module node handle */ - uint64_t base; /* base address at the slot */ - uint64_t size; /* in bytes */ -} mmodinfo_t; - -/* - * The expected values of the IEEE 1275 reg property of a memory node - * in PLATFORM - */ -typedef struct regspec { - uint64_t physaddr; - uint64_t size; -} regspec_t; - -#ifdef __cplusplus -} -#endif - -#endif /* _MEMCFG_IMPL_H */ diff --git a/usr/src/cmd/picl/plugins/sun4u/grover/memcfg/piclmemcfg.c b/usr/src/cmd/picl/plugins/sun4u/grover/memcfg/piclmemcfg.c deleted file mode 100644 index 30505cc151..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/grover/memcfg/piclmemcfg.c +++ /dev/null @@ -1,425 +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 (c) 2000-2001 by Sun Microsystems, Inc. - * All rights reserved. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * This plugin creates memory configuration nodes and properties in the - * PICL tree for Grover/Grover+ platform. - * - * Subtree of memory-controller in the physical aspect. - * memory-controller --- memory-module - * However, there is no memory controller node on Grover. Thus we need to - * create it under platform. - * - * Subtree of memory in the logical aspect. - * memory --- memory-segment - * Add property _memory-module_ at memory-segment referring to the - * memory-module since memory-segment equals to memory-module on Grover. - * - * Undo strategy: - * Create all nodes and properties, or none if it fails in physical and - * logical memory tree respectively. It keeps on creating logical - * memory tree although it falis on physical logical tree, but no link to - * memory module. - * - * NOTE: - * It depends on PICL devtree plugin. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "piclmemcfg.h" -#include "memcfg_impl.h" - -static void piclmemcfg_register(void); -static void piclmemcfg_init(void); -static void piclmemcfg_fini(void); - -#pragma init(piclmemcfg_register) - -static picld_plugin_reg_t my_reg_info = { - PICLD_PLUGIN_VERSION_1, - PICLD_PLUGIN_NON_CRITICAL, - "SUNW_piclmemcfg", - piclmemcfg_init, - piclmemcfg_fini -}; - -/* - * Create logical memory tree - * memory --- memory-segment - */ -static int -create_logical_tree(picl_nodehdl_t memh, mmodinfo_t *mmodinfo) -{ - picl_nodehdl_t msegh; - picl_nodehdl_t *memsegh; - ptree_propinfo_t propinfo; - uint32_t ifactor = INTERLEAVEFACTOR; - int i; - int err = PICL_SUCCESS; - - if ((memsegh = alloca(sizeof (picl_nodehdl_t) * TOTAL_MEM_SLOTS)) == - NULL) - return (PICL_FAILURE); - - for (i = 0; i < TOTAL_MEM_SLOTS; i++) { - /* - * It means no segment for the slot if size is zero - */ - if (mmodinfo[i].size == 0) { - memsegh[i] = NULL; - continue; - } - - /* - * Create memory-segment node under memory - */ - err = ptree_create_and_add_node(memh, PICL_NAME_MEMORY_SEGMENT, - PICL_CLASS_MEMORY_SEGMENT, &msegh); - if (err != PICL_SUCCESS) - break; - - /* - * For undo easily later - */ - memsegh[i] = msegh; - - /* - * Add property, Size to memory-segment node - */ - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_UNSIGNED_INT, PICL_READ, - sizeof (mmodinfo[i].size), PICL_PROP_SIZE, NULL, NULL); - if (err != PICL_SUCCESS) - break; - - err = ptree_create_and_add_prop(msegh, &propinfo, - &mmodinfo[i].size, NULL); - if (err != PICL_SUCCESS) - break; - - /* - * Add property, BaseAddress to memory-segment node - */ - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_UNSIGNED_INT, PICL_READ, - sizeof (mmodinfo[i].base), PICL_PROP_BASEADDRESS, NULL, - NULL); - if (err != PICL_SUCCESS) - break; - - err = ptree_create_and_add_prop(msegh, &propinfo, - &mmodinfo[i].base, NULL); - if (err != PICL_SUCCESS) - break; - - /* - * Add property, InterleaveFactor to memory-segment node - */ - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_UNSIGNED_INT, PICL_READ, sizeof (ifactor), - PICL_PROP_INTERLEAVE_FACTOR, NULL, NULL); - if (err != PICL_SUCCESS) - break; - - err = ptree_create_and_add_prop(msegh, &propinfo, &ifactor, - NULL); - if (err != PICL_SUCCESS) - break; - - /* - * Add reference property to the memory module if memory - * module node handle is not NULL. - */ - if (mmodinfo[i].memmodh == NULL) - continue; - - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_REFERENCE, PICL_READ, sizeof (picl_nodehdl_t), - PICL_REFPROP_MEMORY_MODULE, NULL, NULL); - if (err != PICL_SUCCESS) - break; - - err = ptree_create_and_add_prop(msegh, &propinfo, - &mmodinfo[i].memmodh, NULL); - if (err != PICL_SUCCESS) - break; - } - - if (err != PICL_SUCCESS) { - /* - * Undo in the logical memory tree - */ - for (i = 0; i < TOTAL_MEM_SLOTS; i++) { - if (memsegh[i] == NULL) - continue; - - (void) ptree_delete_node(memsegh[i]); - (void) ptree_destroy_node(memsegh[i]); - } - } - - return (err); -} - -/* - * Create physical memory tree - * memory-controller --- memory-module - */ -static int -create_physical_tree(picl_nodehdl_t plfh, mmodinfo_t *mmodinfo) -{ - picl_nodehdl_t mch, memmodh; - ptree_propinfo_t propinfo; - int i; - int err = PICL_SUCCESS; - uint32_t id; - - /* - * Create memory-controller node under platform - */ - err = ptree_create_and_add_node(plfh, PICL_NAME_MEMORY_CONTROLLER, - PICL_CLASS_MEMORY_CONTROLLER, &mch); - if (err != PICL_SUCCESS) - return (err); - - /* - * Create memory-module nodes and properties - * Get all memory modules with dimm - */ - for (i = 0; i < TOTAL_MEM_SLOTS; i++) { - /* - * It means no dimm on the slot if size is zero - */ - if (mmodinfo[i].size == 0) - continue; - - /* Create memory-module node under memory-controller */ - err = ptree_create_and_add_node(mch, PICL_NAME_MEMORY_MODULE, - PICL_CLASS_MEMORY_MODULE, &memmodh); - if (err != PICL_SUCCESS) - break; - - /* - * Update memory module node handle at mmodinfo - */ - mmodinfo[i].memmodh = memmodh; - - /* - * Add property, Size to memory-module node - */ - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_UNSIGNED_INT, PICL_READ, - sizeof (mmodinfo[i].size), PICL_PROP_SIZE, NULL, NULL); - if (err != PICL_SUCCESS) - break; - - err = ptree_create_and_add_prop(memmodh, &propinfo, - &mmodinfo[i].size, NULL); - if (err != PICL_SUCCESS) - break; - - /* - * Add property, ID to memory-module node - */ - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_INT, PICL_READ, sizeof (id), PICL_PROP_ID, - NULL, NULL); - if (err != PICL_SUCCESS) - break; - - id = i; - err = ptree_create_and_add_prop(memmodh, &propinfo, &id, NULL); - if (err != PICL_SUCCESS) - break; - } - - if (err != PICL_SUCCESS) { - /* - * Clear out the saved memory module node handle so that - * logical memory tree won't link to memory module. - */ - for (i = 0; i < TOTAL_MEM_SLOTS; i++) - mmodinfo[i].memmodh = NULL; - - /* - * Undo in the physical memory tree - */ - (void) ptree_delete_node(mch); - (void) ptree_destroy_node(mch); - } - - return (err); -} - -/* - * Get the memory module and memory segment information from - * property reg of memory node. - * - * mmodinfo will be updated. Also, the pointers to mseginfo and - * the number of segments will be passed to the caller. - */ -static int -get_reg_info(picl_nodehdl_t plfh, picl_nodehdl_t memh, - mmodinfo_t *mmodinfo) -{ - picl_prophdl_t proph; - ptree_propinfo_t pinfo; - regspec_t *memspec; - int i, err; - int pval; - int nregspec; - - - /* - * Check if the #size-cells of the platform node is 2 - */ - err = ptree_get_propval_by_name(plfh, OBP_PROP_SIZE_CELLS, &pval, - sizeof (pval)); - - if (err == PICL_PROPNOTFOUND) - pval = SUPPORTED_NUM_CELL_SIZE; - else if (err != PICL_SUCCESS) - return (err); - - /* - * don't know to handle other vals - */ - if (pval != SUPPORTED_NUM_CELL_SIZE) - return (PICL_FAILURE); - - /* - * Get property reg of memory node - */ - err = ptree_get_prop_by_name(memh, OBP_REG, &proph); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_get_propinfo(proph, &pinfo); - if (err != PICL_SUCCESS) - return (err); - - if ((memspec = alloca(pinfo.piclinfo.size)) == NULL) - return (PICL_FAILURE); - - nregspec = pinfo.piclinfo.size / sizeof (*memspec); - - if ((nregspec == 0) || (nregspec > TOTAL_MEM_SLOTS)) - return (PICL_FAILURE); - - err = ptree_get_propval(proph, memspec, pinfo.piclinfo.size); - if (err != PICL_SUCCESS) - return (err); - - - for (i = 0; i < nregspec; i++) { - - mmodinfo[i].base = memspec[i].physaddr; - mmodinfo[i].size = memspec[i].size; - - } - - return (PICL_SUCCESS); -} - -/* - * executed as part of .init when the plugin is dlopen()ed - */ -static void -piclmemcfg_register(void) -{ - (void) picld_plugin_register(&my_reg_info); -} - -/* - * Init entry point of the plugin - * Creates the PICL nodes and properties in the physical and logical aspects. - */ -static void -piclmemcfg_init(void) -{ - picl_nodehdl_t plfh, memh; - mmodinfo_t mmodinfo[TOTAL_MEM_SLOTS]; - - /* - * Get platform node - */ - if ((ptree_get_node_by_path(PLATFORM_PATH, &plfh)) != PICL_SUCCESS) { - syslog(LOG_ERR, EM_INIT_FAILED); - return; - } - - /* - * Find the memory node - */ - if ((ptree_get_node_by_path(MEMORY_PATH, &memh)) != PICL_SUCCESS) { - syslog(LOG_ERR, EM_INIT_FAILED); - return; - } - - /* - * Initialize the mmodinfo and get segment information from reg - */ - (void) memset(mmodinfo, 0, sizeof (mmodinfo)); - - if ((get_reg_info(plfh, memh, mmodinfo)) != PICL_SUCCESS) { - syslog(LOG_ERR, EM_INIT_FAILED); - return; - } - - /* - * Create subtree of memory-controller in the physical aspect. - * memory-controller --- memory-module - */ - if ((create_physical_tree(plfh, mmodinfo)) != PICL_SUCCESS) - syslog(LOG_ERR, EM_PHYSIC_MEM_TREE_FAILED); - - /* - * Create subtree of memory in the logical aspect. - * memory --- memory-segment - */ - if ((create_logical_tree(memh, mmodinfo)) != PICL_SUCCESS) - syslog(LOG_ERR, EM_LOGIC_MEM_TREE_FAILED); -} - -/* - * fini entry point of the plugin - */ -static void -piclmemcfg_fini(void) -{ -} diff --git a/usr/src/cmd/picl/plugins/sun4u/lib/Makefile b/usr/src/cmd/picl/plugins/sun4u/lib/Makefile deleted file mode 100644 index c5aabd43d6..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/lib/Makefile +++ /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, 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 -# -# -#ident "%Z%%M% %I% %E% SMI" -# -# Copyright (c) 2000 by Sun Microsystems, Inc. -# All rights reserved. -# -# cmd/picl/plugins/sun4u/lib/Makefile -# - -SUBDIRS= fruaccess .WAIT - -MSGSUBDIRS= fruaccess .WAIT - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -.KEEP_STATE: - -all install clean clobber: $(SUBDIRS) - -_msg: $(MSGSUBDIRS) - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/Makefile b/usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/Makefile deleted file mode 100644 index a092b72841..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/Makefile +++ /dev/null @@ -1,110 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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. -# -# cmd/picl/plugins/sun4u/lib/fruaccess/Makefile -# -LIBRARY= libfruaccess.a -VERS= .1 -OBJECTS= fru_access.o cvrt_spd_data.o crcutils.o crcmodel.o - -# include library definitions -include $(SRC)/Makefile.psm -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/sun4u - -include $(SRC)/cmd/picl/plugins/Makefile.com - -SRCS= $(OBJECTS:%.o=%.c) - -LIBS= $(DYNLIB) - -ROOTLIBDIR = $(ROOT_PLATFORM)/lib - -CONF = fru_container.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 - - -CLOBBERFILES += $(LIBLINKS) -CSTYLE = cstyle -p -P -HDRCHK = hdrchk - - -CPPFLAGS += -I$(SRC)/lib/libfru/include -CPPFLAGS += -I$(SRC)/lib/libfruutils/ -CFLAGS += -DBIG_ENDIAN -LDLIBS += -L$(SRC)/lib/libfruutils/$(MACH) -LDLIBS += -lc -lpicltree -lfruutils -LDLIBS += -ldevinfo -LDLIBS += -Wl,-f/opt/SUNWSMS/lib/$(DYNLIBPSR) # SMS before platform -LDLIBS += -Wl,-f/usr/platform/\$$PLATFORM/lib/$(DYNLIBPSR) - -.KEEP_STATE: - - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -LN = ln -s - -POFILE= $(LIBRARY:.a=.po) - -all: $(DYNLIB) $(LIBLINKS) $(CONF) - -install: $(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) $(ROOTCONF) - -_msg: $(MSGDOMAIN) $(POFILE) - $(RM) $(MSGDOMAIN)/$(POFILE) - $(CP) $(POFILE) $(MSGDOMAIN) - -$(POFILE): - $(RM) $@ messages.po - $(XGETTEXT) $(XGETFLAGS) *.[ch]* */*.[ch]* - $(SED) -e '/^# msg/d' -e '/^domain/d' messages.po > $@ - $(RM) messages.po - -$(MSGDOMAIN): - $(INS.dir) - -$(LIBLINKS): FRC - $(RM) $@; $(SYMLINK) $(DYNLIB) $@ - -check-style: - $(CSTYLE) *.cc *.c *.h - $(HDRCHK) *.h - -# include library targets -include $(SRC)/cmd/picl/plugins/Makefile.targ -include $(SRC)/lib/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/crcmodel.c b/usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/crcmodel.c deleted file mode 100644 index a1fd9e5915..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/crcmodel.c +++ /dev/null @@ -1,171 +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 2000 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * - * Start of crcmodel.c - * - * - * Author : Ross Williams (ross@guest.adelaide.edu.au.). - * Date : 3 June 1993. - * Status : Public domain. - * - * Description : This is the implementation (.c) file for the reference - * implementation of the Rocksoft^tm Model CRC Algorithm. For more - * information on the Rocksoft^tm Model CRC Algorithm, see the document - * titled "A Painless Guide to CRC Error Detection Algorithms" by Ross - * Williams (ross@guest.adelaide.edu.au.). This document is likely to be in - * "ftp.adelaide.edu.au/pub/rocksoft". - * - * Note: Rocksoft is a trademark of Rocksoft Pty Ltd, Adelaide, Australia. - * - * - * - * Implementation Notes - * -------------------- - * To avoid inconsistencies, the specification of each function is not echoed - * here. See the header file for a description of these functions. - * This package is light on checking because I want to keep it short and - * simple and portable (i.e. it would be too messy to distribute my entire - * C culture (e.g. assertions package) with this package. - * - * - */ - -#include "crcmodel.h" - -/* The following definitions make the code more readable. */ - -#define BITMASK(X) (1L << (X)) -#define MASK32 0xFFFFFFFFL -#define LOCAL static - -LOCAL uint32_t reflect P_((uint32_t v, int b)); -LOCAL uint32_t -reflect(v, b) -/* Returns the value v with the bottom b [0,32] bits reflected. */ -/* Example: reflect(0x3e23L,3) == 0x3e26 */ -uint32_t v; -int b; -{ - int i; - uint32_t t = v; - for (i = 0; i < b; i++) { - if (t & 1L) - v |= BITMASK((b-1)-i); - else - v &= ~BITMASK((b-1)-i); - t >>= 1; - } - return (v); -} - -LOCAL uint32_t widmask P_((p_cm_t)); -LOCAL uint32_t -widmask(p_cm) -/* Returns a longword whose value is (2^p_cm->cm_width)-1. */ -/* The trick is to do this portably (e.g. without doing <<32). */ -p_cm_t p_cm; -{ - return ((((1L<<(p_cm->cm_width-1))-1L)<<1)|1L); -} - -void -cm_ini(p_cm) -p_cm_t p_cm; -{ - p_cm->cm_reg = p_cm->cm_init; -} - -void -cm_nxt(p_cm, ch) -p_cm_t p_cm; -int ch; -{ - int i; - uint32_t uch = (uint32_t)ch; - uint32_t topbit = BITMASK(p_cm->cm_width-1); - - if (p_cm->cm_refin) - uch = reflect(uch, 8); - - p_cm->cm_reg ^= (uch << (p_cm->cm_width-8)); - for (i = 0; i < 8; i++) { - if (p_cm->cm_reg & topbit) - p_cm->cm_reg = (p_cm->cm_reg << 1) ^ p_cm->cm_poly; - else - p_cm->cm_reg <<= 1; - - p_cm->cm_reg &= widmask(p_cm); - } -} - -void -cm_blk(p_cm, blk_adr, blk_len) -p_cm_t p_cm; -p_ubyte_ blk_adr; -uint32_t blk_len; -{ - while (blk_len--) - cm_nxt(p_cm, *blk_adr++); -} - -uint32_t -cm_crc(p_cm) -p_cm_t p_cm; -{ - if (p_cm->cm_refot) - return (p_cm->cm_xorot ^ reflect(p_cm->cm_reg, p_cm->cm_width)); - else - return (p_cm->cm_xorot ^ p_cm->cm_reg); -} - -uint32_t -cm_tab(p_cm, index) -p_cm_t p_cm; -int index; -{ - int i; - uint32_t r; - uint32_t topbit = BITMASK(p_cm->cm_width-1); - uint32_t inbyte = (uint32_t)index; - - if (p_cm->cm_refin) - inbyte = reflect(inbyte, 8); - - r = inbyte << (p_cm->cm_width-8); - for (i = 0; i < 8; i++) - if (r & topbit) - r = (r << 1) ^ p_cm->cm_poly; - else - r <<= 1; - - if (p_cm->cm_refin) - r = reflect(r, p_cm->cm_width); - - return (r & widmask(p_cm)); -} diff --git a/usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/crcmodel.h b/usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/crcmodel.h deleted file mode 100644 index c866b9f166..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/crcmodel.h +++ /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, 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 2000 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _CRCMODEL_H -#define _CRCMODEL_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifdef SOLARIS_UNIX -#include -#else -typedef long uint32_t; -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * - * Start of crcmodel.h - * - * - * Author : Ross Williams (ross@guest.adelaide.edu.au.). - * Date : 3 June 1993. - * Status : Public domain. - * - * Description : This is the header (.h) file for the reference - * implementation of the Rocksoft^tm Model CRC Algorithm. For more - * information on the Rocksoft^tm Model CRC Algorithm, see the document - * titled "A Painless Guide to CRC Error Detection Algorithms" by Ross - * Williams (ross@guest.adelaide.edu.au.). This document is likely to be in - * "ftp.adelaide.edu.au/pub/rocksoft". - * - * Note: Rocksoft is a trademark of Rocksoft Pty Ltd, Adelaide, Australia. - * - * - * - * How to Use This Package - * ----------------------- - * Step 1: Declare a variable of type cm_t. Declare another variable - * (p_cm say) of type p_cm_t and initialize it to point to the first - * variable (e.g. p_cm_t p_cm = &cm_t). - * - * Step 2: Assign values to the parameter fields of the structure. - * If you don't know what to assign, see the document cited earlier. - * For example: - * p_cm->cm_width = 16; - * p_cm->cm_poly = 0x8005L; - * p_cm->cm_init = 0L; - * p_cm->cm_refin = TRUE; - * p_cm->cm_refot = TRUE; - * p_cm->cm_xorot = 0L; - * Note: Poly is specified without its top bit (18005 becomes 8005). - * Note: Width is one bit less than the raw poly width. - * - * Step 3: Initialize the instance with a call cm_ini(p_cm); - * - * Step 4: Process zero or more message bytes by placing zero or more - * successive calls to cm_nxt. Example: cm_nxt(p_cm,ch); - * - * Step 5: Extract the CRC value at any time by calling crc = cm_crc(p_cm); - * If the CRC is a 16-bit value, it will be in the bottom 16 bits. - * - * - * - * Design Notes - * ------------ - * PORTABILITY: This package has been coded very conservatively so that - * it will run on as many machines as possible. For example, all external - * identifiers have been restricted to 6 characters and all internal ones to - * 8 characters. The prefix cm (for Crc Model) is used as an attempt to avoid - * namespace collisions. This package is endian independent. - * - * EFFICIENCY: This package (and its interface) is not designed for - * speed. The purpose of this package is to act as a well-defined reference - * model for the specification of CRC algorithms. If you want speed, cook up - * a specific table-driven implementation as described in the document cited - * above. This package is designed for validation only; if you have found or - * implemented a CRC algorithm and wish to describe it as a set of parameters - * to the Rocksoft^tm Model CRC Algorithm, your CRC algorithm implementation - * should behave identically to this package under those parameters. - * - */ - - -/* The following definitions are extracted from my style header file which */ -/* would be cumbersome to distribute with this package. The DONE_STYLE is the */ -/* idempotence symbol used in my style header file. */ - -#ifndef DONE_STYLE - -typedef unsigned bool; -typedef unsigned char *p_ubyte_; - -#ifndef TRUE -#define FALSE 0 -#define TRUE 1 -#endif - -/* Change to the second definition if you don't have prototypes. */ -#define P_(A) A -/* #define P_(A) () */ - -/* Uncomment this definition if you don't have void. */ -/* typedef int void; */ - -#endif - -/* CRC Model Abstract Type */ -/* ----------------------- */ -/* The following type stores the context of an executing instance of the */ -/* model algorithm. Most of the fields are model parameters which must be */ -/* set before the first initializing call to cm_ini. */ -typedef struct -{ - int cm_width; /* Parameter: Width in bits [8,32]. */ - uint32_t cm_poly; /* Parameter: The algorithm's polynomial. */ - uint32_t cm_init; /* Parameter: Initial register value. */ - bool cm_refin; /* Parameter: Reflect input bytes? */ - bool cm_refot; /* Parameter: Reflect output CRC? */ - uint32_t cm_xorot; /* Parameter: XOR this to output CRC. */ - - uint32_t cm_reg; /* Context: Context during execution. */ -} cm_t; -typedef cm_t *p_cm_t; - -/* Functions That Implement The Model */ -/* ---------------------------------- */ -/* The following functions animate the cm_t abstraction. */ - -void cm_ini P_((p_cm_t p_cm)); -/* Initializes the argument CRC model instance. */ -/* All parameter fields must be set before calling this. */ - -void cm_nxt P_((p_cm_t p_cm, int ch)); -/* Processes a single message byte [0,255]. */ - -void cm_blk P_((p_cm_t p_cm, p_ubyte_ blk_adr, uint32_t blk_len)); -/* Processes a block of message bytes. */ - -uint32_t cm_crc P_((p_cm_t p_cm)); -/* Returns the CRC value for the message bytes processed so far. */ - -/* Functions For Table Calculation */ -/* ------------------------------- */ -/* The following function can be used to calculate a CRC lookup table. */ -/* It can also be used at run-time to create or check static tables. */ - -uint32_t cm_tab P_((p_cm_t p_cm, int index)); -/* Returns the i'th entry for the lookup table for the specified algorithm. */ -/* The function examines the fields cm_width, cm_poly, cm_refin, and the */ -/* argument table index in the range [0,255] and returns the table entry in */ -/* the bottom cm_width bytes of the return value. */ - -#ifdef __cplusplus -} -#endif - -#endif /* _CRCMODEL_H */ diff --git a/usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/crcutils.c b/usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/crcutils.c deleted file mode 100644 index ab0dc5c914..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/crcutils.c +++ /dev/null @@ -1,159 +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 (c) 2000 by Sun Microsystems, Inc. - * All rights reserved. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include -#include - -#include "crcmodel.h" - -#if defined(LITTLE_ENDIAN) - -/* Little-endian architectures need byte-swapping. */ - -#define sws(x) (((x >> 8) & 0x00ff) | ((x << 8) & 0xff00)) -#define swl(x) (sws(x >> 16) | (sws(x) << 16)) - -#define swap_short(x) (x = sws(x)) -#define swap_long(x) (x = swl(x)) - -#else /* if !LITTLE_ENDIAN */ - -/* Big-endian anchictectures don't need byte-swapping. */ - -#define sws(x) (x) -#define swl(x) (x) - -#define swap_short(x) (x = sws(x)) -#define swap_long(x) (x = swl(x)) - -#endif /* LITTLE_ENDIAN */ - -unsigned char -compute_crc8(unsigned char *bytes, int length) -{ - cm_t crc_mdl; - p_cm_t p_crc; - int i; - unsigned char aCRC; - - p_crc = &crc_mdl; - - p_crc->cm_width = 8; - p_crc->cm_poly = 0x107; /* = X^8 + x^2 + x + 1 */ - p_crc->cm_init = 0; - p_crc->cm_refin = TRUE; - p_crc->cm_refot = TRUE; - p_crc->cm_xorot = 0; - - cm_ini(p_crc); - - for (i = 0; i < length; i++) { - cm_nxt(p_crc, bytes[i]); - } - - aCRC = (unsigned char)cm_crc(p_crc); - - return (aCRC); -} - -uint32_t -compute_crc32(unsigned char *bytes, int length) -{ - cm_t crc_mdl; - p_cm_t p_crc; - int i; - uint32_t aCRC; - - p_crc = &crc_mdl; - - p_crc->cm_width = 32; - p_crc->cm_poly = 0x04c11db7; - p_crc->cm_init = 0xffffffff; - p_crc->cm_refin = TRUE; - p_crc->cm_refot = TRUE; - p_crc->cm_xorot = 0xffffffff; - - cm_ini(p_crc); - - for (i = 0; i < length; i++) { - cm_nxt(p_crc, bytes[i]); - } - - aCRC = (uint32_t)cm_crc(p_crc); - - return (aCRC); -} - -/* - * This is the max value an uint32_t value can hold... - * Define this for Windows compilers which don't have "limits.h" or equivalant - */ -#define UINT32_T_MAX 0xFFFFFFFF - -uint32_t -compute_checksum32(unsigned char *bytes, int length) -{ - uint32_t regval = 0; - int i, j, k; - uint32_t next4bytes; - unsigned char tailbytes[4] = { 0x00, 0x00, 0x00, 0x00 }; - - /* Grab bytes in 4-byte chunks */ - for (i = 0; i < length-4; i += 4) { - /* Grab chunk as an int */ - (void) memcpy(&next4bytes, &(bytes[i]), 4); - swap_long(next4bytes); - - if (next4bytes > UINT32_T_MAX - regval) { - next4bytes -= UINT32_T_MAX - regval; - regval = 0; - } - - /* Add intval to regval */ - regval += next4bytes; - } - - /* Grab any remaining bytes at the end */ - for (j = length-1, k = 3; j >= i; j--, k--) { - tailbytes[k] = bytes[j]; - } - -/* - * Treat any remaining bytes put into tailbytes as if they were - * a left-zero-padded unsigned int (uint32_t == 4 bytes!) - */ - (void) memcpy(&next4bytes, tailbytes, 4); - swap_long(next4bytes); - if (next4bytes > UINT32_T_MAX - regval) { - next4bytes -= UINT32_T_MAX - regval; - regval = 0; - } - regval += next4bytes; - - return ((uint32_t)regval); -} diff --git a/usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/cvrt_spd_data.c b/usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/cvrt_spd_data.c deleted file mode 100644 index 504ce3bd95..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/cvrt_spd_data.c +++ /dev/null @@ -1,238 +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 2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "fru_access_impl.h" - -static uchar_t sp_sec_hdr[] = SP_SEC_HDR; -static uchar_t sp_seg_hdr[] = SP_SEG_HDR; -static uchar_t sp_seg_body[] = SP_DATA; - -/* - * function to return section header for simulated SPD fruid - * - * parameters: - * sec_hdr buffer to receive section header - * sec_hdr_len size of buffer sec_hdr - * return value: - * size of returned data (0 if sec_hdr_len too small) - */ -size_t -get_sp_sec_hdr(void *sec_hdr, size_t sec_hdr_len) -{ - if (sec_hdr_len < sizeof (sp_sec_hdr)) - return (0); - (void) memcpy(sec_hdr, sp_sec_hdr, sizeof (sp_sec_hdr)); - return (sizeof (sp_sec_hdr)); -} - -/* - * function to return segment header for simulated SPD fruid - * - * parameters: - * seg_hdr buffer to receive segment header - * seg_hdr_len size of buffer seg_hdr - * return value: - * size of returned data (0 if seg_hdr_len too small) - */ -size_t -get_sp_seg_hdr(void *seg_hdr, size_t seg_hdr_len) -{ - if (seg_hdr_len < sizeof (sp_seg_hdr)) - return (0); - (void) memcpy(seg_hdr, sp_seg_hdr, sizeof (sp_seg_hdr)); - return (sizeof (sp_seg_hdr)); -} - -/* - * Function to convert SPD data into SPD fruid segment. - * The segment comprises two tagged records: DIMM_Capacity and SPD_R. - * - * DIMM_Capacity is a text string showing the total usable size of the - * DIMM (i.e. not including error correction bits). This record is derived - * from module row density and number of rows. - * - * SPD_R contains the entire SPD data area from the DIMM. It is slightly - * massaged to make it easier to display: - * bytes 0 - 63 are presented as is - * bytes 64 - 71 (JEDEC code) are compressed into 2 bytes, matching the - * format used in ManR - * bytes 72 - 92 are copied as is (to bytes 66 - 86) - * byte 93 year of manufacture is expanded to a 2 byte (big endian) - * field which includes the century (to bytes 87 - 88) - * bytes 94 - 127 are copied as is (to bytes 89 - 122) - * - * parameters: - * spd_data pointer to SPD data - * spd_data_len length of supplied SPD data - * sp_seg_ptr pointer to receive address of converted data - * sp_seg_len pointer for size of converted data - * return value: - * 0 - success - * NZ - error code - */ -int -cvrt_dim_data(const char *spd_data, size_t spd_data_len, uchar_t **sp_seg_ptr, - size_t *sp_seg_len) -{ - int c; - ushort_t year; - int capacity; - spd_data_t *spd; - uint32_t sum; - - if (spd_data_len < sizeof (spd_data_t)) - return (EINVAL); - - spd = (spd_data_t *)spd_data; - *sp_seg_ptr = malloc(sizeof (sp_seg_body)); - - if (*sp_seg_ptr == NULL) - return (ENOMEM); - - /* set up template for SP seg */ - (void) memcpy(*sp_seg_ptr, sp_seg_body, sizeof (sp_seg_body)); - - year = spd->manu_year; - - if (year < 80) - year += 2000; - else - year += 1900; - - /* - * move first 64 bytes of SPD data into SPD-R record - */ - (void) memcpy(*sp_seg_ptr + SPD_R_OFF, spd_data, 64); - - /* - * re-write full data width as big endian - */ - (*sp_seg_ptr + SPD_R_OFF + DATA_WIDTH)[0] = spd->ms_data_width; - (*sp_seg_ptr + SPD_R_OFF + DATA_WIDTH)[1] = spd->ls_data_width; - - /* - * construct Sun compressed encoding for JEDEC code - */ - for (c = 0; c < sizeof (spd->jedec) - 1; c++) { - if (spd->jedec[c] != 0x7F) - break; - } - - (*sp_seg_ptr)[SPD_R_OFF + MANUF_ID] = (uchar_t)c; - (*sp_seg_ptr)[SPD_R_OFF + MANUF_ID + 1] = (uchar_t)spd->jedec[c]; - - /* - * move other fields in place - */ - (void) memcpy(*sp_seg_ptr + SPD_R_OFF + MANUF_LOC, - &spd->manu_loc, MANUF_YEAR - MANUF_LOC); - - (*sp_seg_ptr + SPD_R_OFF + MANUF_YEAR)[0] = (uchar_t)(year >> 8); - (*sp_seg_ptr + SPD_R_OFF + MANUF_YEAR)[1] = (uchar_t)year; - - (void) memcpy(*sp_seg_ptr + SPD_R_OFF + MANUF_WEEK, - &spd->manu_week, SPD_R_LEN - MANUF_WEEK); - - /* - * calculate the capacity and insert into capacity record - */ - if ((spd->spd_rev >> 4) > 1) { - (void) snprintf((char *)(*sp_seg_ptr + DIMM_CAP_OFF), 8, - "ver %x.%x", spd->spd_rev >> 4, spd->spd_rev & 0x0f); - } else if ((spd->memory_type != SPDMEM_SDRAM) && - (spd->memory_type != SPDMEM_SDRAM_DDR) && - (spd->memory_type != SPDMEM_DDR2_SDRAM)) { - /* - * can't handle this memory type - */ - ((char *)(*sp_seg_ptr))[DIMM_CAP_OFF] = '\0'; - } else if ((((spd->ms_data_width << 8) | spd->ls_data_width) == 72) && - ((spd->n_rows & 0xf0) == 0) && ((spd->n_cols & 0xf0) == 0)) { - /* - * OK it's 72-bits wide with equal width banks - */ - char m_or_g = 'G'; - capacity = spd->mod_row_density; - if (((spd->memory_type == SPDMEM_DDR2_SDRAM) && - (capacity > 16)) || - (capacity > 4)) { - capacity *= 4; - m_or_g = 'M'; - } - c = spd->n_mod_rows; - if (spd->memory_type == SPDMEM_DDR2_SDRAM) { - c &= 7; - c++; - } - capacity *= c; - if ((m_or_g == 'M') && (capacity >= 1024)) { - capacity /= 1024; - m_or_g = 'G'; - } - (void) snprintf((char *)(*sp_seg_ptr + DIMM_CAP_OFF), 8, - "%d %cB", capacity, m_or_g); - } else { - ((char *)(*sp_seg_ptr))[DIMM_CAP_OFF] = '\0'; - } - - /* - * finally, set the checksum - */ - sum = compute_crc32(*sp_seg_ptr, sizeof (sp_seg_body) - 5); - for (c = 0; c < 4; c++) { - (*sp_seg_ptr + sizeof (sp_seg_body) - 4)[c] = - ((char *)(&sum))[c]; - } - *sp_seg_len = sizeof (sp_seg_body); - return (0); -} - -/* - * get_spd_data - reads raw data from container - * parameters: - * fd file descriptor for SPD device - * ctr_offset container offset - * ctr_len container size - * spd_data buffer to receive SPD data (length ctr_len) - * return value: - * 0 - success - * NZ - error code - */ -int -get_spd_data(int fd, char *spd_data, size_t ctr_len, off_t ctr_offset) -{ - if (ctr_len < sizeof (spd_data_t)) - return (EINVAL); - - (void) memset(spd_data, 0, ctr_len); - - if (pread(fd, spd_data, sizeof (spd_data_t), ctr_offset) != - sizeof (spd_data_t)) - return (EIO); - return (0); -} diff --git a/usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/fru_access.c b/usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/fru_access.c deleted file mode 100644 index aaa9e843f7..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/fru_access.c +++ /dev/null @@ -1,2839 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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 -#include -#include "fru_access_impl.h" - -#pragma init(initialize_fruaccess) /* .init section */ - -static hash_obj_t *hash_table[TABLE_SIZE]; - -/* - * seeprom is the driver_name for the SEEPROM device drivers in excalibur - * Define the devfsadm command to load the seeprom drivers if open fails. - */ - -static char devfsadm_cmd[] = "/usr/sbin/devfsadm -i seeprom"; - -/* this routine initialize the hash table. */ - -static void -initialize_fruaccess(void) -{ - int count; - for (count = 0; count < TABLE_SIZE; count++) { - hash_table[count] = NULL; - } -} - -/* - * called to lookup hash object for specified handle in the hash table. - * - */ - -static hash_obj_t * -lookup_handle_object(handle_t handle, int object_type) -{ - handle_t index_to_hash; - hash_obj_t *first_hash_obj; - hash_obj_t *next_hash_obj; - - index_to_hash = (handle % TABLE_SIZE); - - first_hash_obj = hash_table[index_to_hash]; - for (next_hash_obj = first_hash_obj; next_hash_obj != NULL; - next_hash_obj = next_hash_obj->next) { - if ((handle == next_hash_obj->obj_hdl) && - (object_type == next_hash_obj->object_type)) { - return (next_hash_obj); - } - } - return (NULL); -} - -/* called to allocate container hash object */ - -static hash_obj_t * -create_container_hash_object(void) -{ - hash_obj_t *hash_obj; - container_obj_t *cont_obj; - - cont_obj = malloc(sizeof (container_obj_t)); - if (cont_obj == NULL) { - return (NULL); - } - - hash_obj = malloc(sizeof (hash_obj_t)); - if (hash_obj == NULL) { - free(cont_obj); - return (NULL); - } - - cont_obj->sec_obj_list = NULL; - - hash_obj->object_type = CONTAINER_TYPE; - hash_obj->u.cont_obj = cont_obj; - hash_obj->next = NULL; - hash_obj->prev = NULL; - - return (hash_obj); -} - -/* called to allocate section hash object */ - -static hash_obj_t * -create_section_hash_object(void) -{ - hash_obj_t *hash_obj; - section_obj_t *sec_obj; - - sec_obj = malloc(sizeof (section_obj_t)); - if (sec_obj == NULL) { - return (NULL); - } - - hash_obj = malloc(sizeof (hash_obj_t)); - if (hash_obj == NULL) { - free(sec_obj); - return (NULL); - } - - sec_obj->next = NULL; - sec_obj->seg_obj_list = NULL; - - hash_obj->u.sec_obj = sec_obj; - hash_obj->object_type = SECTION_TYPE; - hash_obj->next = NULL; - hash_obj->prev = NULL; - - return (hash_obj); -} - -/* called to allocate segment hash object */ - -static hash_obj_t * -create_segment_hash_object(void) -{ - hash_obj_t *hash_obj; - segment_obj_t *seg_obj; - - seg_obj = malloc(sizeof (segment_obj_t)); - if (seg_obj == NULL) { - return (NULL); - } - - hash_obj = malloc(sizeof (hash_obj_t)); - if (hash_obj == NULL) { - free(seg_obj); - return (NULL); - } - - seg_obj->next = NULL; - seg_obj->pkt_obj_list = NULL; - - hash_obj->object_type = SEGMENT_TYPE; - hash_obj->u.seg_obj = seg_obj; - hash_obj->next = NULL; - hash_obj->prev = NULL; - - return (hash_obj); -} - -/* called to allocate packet hash object */ - -static hash_obj_t * -create_packet_hash_object(void) -{ - hash_obj_t *hash_obj; - packet_obj_t *pkt_obj; - - pkt_obj = malloc(sizeof (packet_obj_t)); - if (pkt_obj == NULL) { - return (NULL); - } - - hash_obj = malloc(sizeof (hash_obj_t)); - if (hash_obj == NULL) { - free(pkt_obj); - return (NULL); - } - - pkt_obj->next = NULL; - - hash_obj->object_type = PACKET_TYPE; - hash_obj->u.pkt_obj = pkt_obj; - hash_obj->next = NULL; - hash_obj->prev = NULL; - - return (hash_obj); -} - -/* called to add allocated hash object into the hash table */ - -static void -add_hashobject_to_hashtable(hash_obj_t *hash_obj) -{ - handle_t index_to_hash; - static uint64_t handle_count = 0; - - hash_obj->obj_hdl = ++handle_count; /* store the handle */ - - /* where to add ? */ - index_to_hash = ((hash_obj->obj_hdl) % TABLE_SIZE); - - hash_obj->next = hash_table[index_to_hash]; - hash_table[index_to_hash] = hash_obj; /* hash obj. added */ - - if (hash_obj->next != NULL) { - hash_obj->next->prev = hash_obj; - } -} - -/* called to add section object list into the section list */ - -static void -add_to_sec_object_list(hash_obj_t *parent_obj, hash_obj_t *child_obj) -{ - hash_obj_t *next_hash; - - child_obj->u.sec_obj->cont_hdl = parent_obj->obj_hdl; - if (parent_obj->u.cont_obj->sec_obj_list == NULL) { - parent_obj->u.cont_obj->sec_obj_list = child_obj; - return; - } - - for (next_hash = parent_obj->u.cont_obj->sec_obj_list; - next_hash->u.sec_obj->next != NULL; - next_hash = next_hash->u.sec_obj->next) { - ; - } - - next_hash->u.sec_obj->next = child_obj; -} - -/* called to add segment object list into segment list */ - -static void -add_to_seg_object_list(hash_obj_t *parent_obj, hash_obj_t *child_obj) -{ - hash_obj_t *next_hash; - - child_obj->u.seg_obj->section_hdl = parent_obj->obj_hdl; - if (parent_obj->u.sec_obj->seg_obj_list == NULL) { - parent_obj->u.sec_obj->seg_obj_list = child_obj; - return; - } - - for (next_hash = parent_obj->u.sec_obj->seg_obj_list; - next_hash->u.seg_obj->next != NULL; - next_hash = next_hash->u.seg_obj->next) { - ; - } - - next_hash->u.seg_obj->next = child_obj; -} - -/* called to add packet object list into packet list */ - -static void -add_to_pkt_object_list(hash_obj_t *parent_obj, hash_obj_t *child_obj) -{ - hash_obj_t *next_hash; - - /* add the packet object in the end of list */ - child_obj->u.pkt_obj->segment_hdl = parent_obj->obj_hdl; - - if (parent_obj->u.seg_obj->pkt_obj_list == NULL) { - parent_obj->u.seg_obj->pkt_obj_list = child_obj; - return; - } - - for (next_hash = parent_obj->u.seg_obj->pkt_obj_list; - next_hash->u.pkt_obj->next != NULL; - next_hash = next_hash->u.pkt_obj->next) { - ; - } - - next_hash->u.pkt_obj->next = child_obj; -} - -static void -copy_segment_layout(segment_t *seghdr, void *layout) -{ - segment_layout_t *seg_layout; - - seg_layout = (segment_layout_t *)layout; - (void) memcpy(seghdr->name, &seg_layout->name, SEG_NAME_LEN); - seghdr->descriptor = GET_SEGMENT_DESCRIPTOR; - seghdr->offset = seg_layout->offset; - seghdr->length = seg_layout->length; -} - -static hash_obj_t * -get_container_hash_object(int object_type, handle_t handle) -{ - hash_obj_t *hash_obj; - - switch (object_type) { - case CONTAINER_TYPE : - break; - case SECTION_TYPE : - hash_obj = lookup_handle_object(handle, CONTAINER_TYPE); - if (hash_obj == NULL) { - return (NULL); - } - break; - case SEGMENT_TYPE : - hash_obj = lookup_handle_object(handle, SECTION_TYPE); - if (hash_obj == NULL) { - return (NULL); - } - hash_obj = lookup_handle_object(hash_obj->u.sec_obj->cont_hdl, - CONTAINER_TYPE); - break; - case PACKET_TYPE : - break; - default : - return (NULL); - } - return (hash_obj); -} - - -static void -sort_offsettbl(int segcnt, seg_info_t *offset_tbl) -{ - int cntx; - int cnty; - seg_info_t tmp; - - for (cntx = 0; cntx < segcnt+2; cntx++) { - for (cnty = cntx+1; cnty < segcnt + 2; cnty++) { - if (offset_tbl[cntx].offset > - offset_tbl[cnty].offset) { - (void) memcpy(&tmp, &offset_tbl[cnty], - sizeof (seg_info_t)); - (void) memcpy(&offset_tbl[cnty], - &offset_tbl[cntx], sizeof (seg_info_t)); - - (void) memcpy(&offset_tbl[cntx], &tmp, - sizeof (seg_info_t)); - } - } - } -} - -/* - * Description : move_segment_data() reads the segment data and writes it - * back to the new segment offset. - */ - -static void -move_segment_data(void *seghdr, int newoffset, container_hdl_t contfd) -{ - int ret; - char *buffer; - segment_layout_t *segment; - - segment = (segment_layout_t *)seghdr; - - buffer = alloca(segment->length); - if (buffer == NULL) { - return; - } - - ret = pread(contfd, buffer, segment->length, segment->offset); - if (ret != segment->length) { - return; - } - - segment->offset = newoffset; - - ret = pwrite(contfd, buffer, segment->length, segment->offset); - if (ret != segment->length) { - return; - } -} - -/* - * Description : pack_segment_data() moves the segment data if there is - * a hole between two segments. - */ - -static void -pack_segment_data(char *seghdr, int segcnt, container_hdl_t contfd, - seg_info_t *offset_tbl) -{ - int cnt; - int diff; - int newoffset; - - for (cnt = segcnt + 1; cnt > 0; cnt--) { - if (!offset_tbl[cnt - 1].fixed) { - if (offset_tbl[cnt].offset - - (offset_tbl[cnt -1 ].offset + - offset_tbl[cnt - 1].length) > 0) { - - diff = offset_tbl[cnt].offset - - (offset_tbl[cnt - 1].offset + - offset_tbl[cnt - 1].length); - newoffset = offset_tbl[cnt - 1].offset + diff; - - move_segment_data(seghdr, newoffset, contfd); - - offset_tbl[cnt - 1].offset = newoffset; - - sort_offsettbl(segcnt, offset_tbl); - } - } - } -} - -/* - * Description : build_offset_tbl() builds the offset table by reading all the - * segment header. it makes two more entry into the table one for - * section size and another with start of the section after the - * segment header. - */ - -static int -build_offset_tbl(void *seghdr, int segcnt, int secsize, - seg_info_t *offset_tbl) -{ - int cnt; - fru_segdesc_t segdesc; - segment_layout_t *segment; - - for (cnt = 0; cnt < segcnt; cnt++) { - segment = (segment_layout_t *)(seghdr) + cnt; - - (void) memcpy(&segdesc, &segment->descriptor, - sizeof (uint32_t)); - offset_tbl[cnt].segnum = cnt; - offset_tbl[cnt].offset = segment->offset; - offset_tbl[cnt].length = segment->length; - offset_tbl[cnt].fixed = segdesc.field.fixed; - } - - /* upper boundary of segment area (lower address bytes) */ - offset_tbl[cnt].segnum = -1; - offset_tbl[cnt].offset = sizeof (section_layout_t) + - ((cnt + 1) * sizeof (segment_layout_t)); - - offset_tbl[cnt].length = 0; - offset_tbl[cnt].fixed = 1; - /* lower boundary of segment area (higher address bytes) */ - - offset_tbl[cnt+1].segnum = -1; - offset_tbl[cnt+1].offset = secsize; - offset_tbl[cnt+1].length = 0; - offset_tbl[cnt+1].fixed = 1; - return (0); -} - -static int -hole_discovery(int bytes, int segcnt, int *totsize, seg_info_t *offset_tbl) -{ - int cnt = 0; - - *totsize = 0; - for (cnt = segcnt + 1; cnt > 0; cnt--) { - if (bytes <= offset_tbl[cnt].offset - - (offset_tbl[cnt - 1].offset + - offset_tbl[cnt - 1].length)) { - return (offset_tbl[cnt].offset - bytes); - } - - *totsize += offset_tbl[cnt].offset - - (offset_tbl[cnt - 1].offset + offset_tbl[cnt - 1].length); - } - return (0); -} - - -/* - * Description : segment_hdr_present() verify space for new segment header to - * be added. - */ - -static int -segment_hdr_present(int segoffset, int size, seg_info_t *offset_tbl) -{ - if ((segoffset + size) <= offset_tbl[0].offset) - return (0); - else - return (-1); -} - -/* - * Description : find_offset() is called from fru_add_segment routine to find - * a valid offset. - */ - -static int -find_offset(char *seghdr, int segcnt, int secsize, int *sectionoffset, - int segsize, int fix, container_hdl_t contfd) -{ - int ret; - int newoffset; - int totsize = 0; - seg_info_t *offset_tbl; - - if (segcnt == 0) { - if (!fix) { /* if not fixed segment */ - *sectionoffset = secsize - segsize; - } - return (0); - } - - /* - * two extra segment info structure are allocated for start of segment - * and other end of segment. first segment offset is first available - * space and length is 0. second segment offset is is segment length and - * offset is 0. build_offset_tbl() explains how upper boundary and lower - * boudary segment area are initialized in seg_info_t table. - */ - - offset_tbl = malloc((segcnt + 2) * sizeof (seg_info_t)); - if (offset_tbl == NULL) { - return (-1); - } - - /* read all the segment header to make offset table */ - ret = build_offset_tbl(seghdr, segcnt, secsize, offset_tbl); - if (ret != 0) { - free(offset_tbl); - return (-1); - } - - /* sort the table */ - sort_offsettbl(segcnt, offset_tbl); - - /* new segment header offset */ - newoffset = sizeof (section_layout_t) + segcnt * - sizeof (segment_layout_t); - - /* do? new segment header overlap any existing data */ - ret = segment_hdr_present(newoffset, sizeof (segment_layout_t), - offset_tbl); - if (ret != 0) { /* make room for new segment if possible */ - - /* look for hole in order to move segment data */ - if (offset_tbl[0].fixed == SEGMENT_FIXED) { /* fixed segment */ - free(offset_tbl); - return (-1); - } - - newoffset = hole_discovery(offset_tbl[0].length, segcnt, - &totsize, offset_tbl); - if (newoffset != 0) { /* found new offset */ - /* now new offset */ - offset_tbl[0].offset = newoffset; - - /* move the segment data */ - move_segment_data(seghdr, newoffset, contfd); - /* again sort the offset table */ - sort_offsettbl(segcnt, offset_tbl); - } else { - /* pack the existing hole */ - if (totsize > offset_tbl[0].length) { - pack_segment_data(seghdr, segcnt, contfd, - offset_tbl); - } else { - free(offset_tbl); - return (-1); - } - } - } - - totsize = 0; - newoffset = hole_discovery(segsize, segcnt, &totsize, offset_tbl); - - if (newoffset == 0) { /* No hole found */ - if (totsize >= segsize) { - pack_segment_data(seghdr, segcnt, contfd, offset_tbl); - newoffset = hole_discovery(segsize, segcnt, &totsize, - offset_tbl); - if (newoffset != 0) { - *sectionoffset = newoffset; - free(offset_tbl); - return (0); - } - } - } else { - *sectionoffset = newoffset; - free(offset_tbl); - return (0); - } - free(offset_tbl); - return (-1); -} - -static char * -tokenizer(char *buf, char *separator, char **nextBuf, char *matched) -{ - int i = 0; - int j = 0; - - for (i = 0; buf[i] != '\0'; i++) { - for (j = 0; j < strlen(separator); j++) { - if (buf[i] == separator[j]) { - buf[i] = '\0'; - *nextBuf = &(buf[i+1]); - *matched = separator[j]; - return (buf); - } - } - } - - *nextBuf = buf; - *matched = '\0'; - return (NULL); -} - -static int -get_container_info(const char *def_file, const char *cont_desc_str, - container_info_t *cont_info) -{ - char *item; - char *token; - char *field; - char matched; - char buf[1024]; - int foundIt = 0; - int ro_tok; - int index; - FILE *file = fopen(def_file, "r"); - - if (file == NULL) - return (-1); - - cont_info->num_sections = 0; - - while (fgets(buf, sizeof (buf), file) != NULL) { - /* ignore all comments */ - token = tokenizer(buf, "#", &field, &matched); - /* find the names */ - token = tokenizer(buf, ":", &field, &matched); - if (token != 0x00) { - token = tokenizer(token, "|", &item, &matched); - while (token != 0x00) { - if (strcmp(token, cont_desc_str) == 0) { - foundIt = 1; - goto found; - } - token = tokenizer(item, "|", &item, &matched); - } - /* check the last remaining item */ - if ((item != 0x00) && - (strcmp(item, cont_desc_str) == 0)) { - foundIt = 1; - goto found; - } - } - } - -found : - if (foundIt == 1) { - token = tokenizer(field, ":", &field, &matched); - if (token == 0x00) { - (void) fclose(file); - return (-1); - } - cont_info->header_ver = (headerrev_t)atoi(token); - - token = tokenizer(field, ":\n", &field, &matched); - while (token != 0x00) { - token = tokenizer(token, ",", &item, &matched); - if (token == 0x00) { - (void) fclose(file); - return (-1); - } - ro_tok = atoi(token); - index = cont_info->num_sections; - cont_info->section_info[index].encoding = ENC_STANDARD; - if (ro_tok == 1) { - cont_info->section_info[index].description. - field.read_only = 1; - } else if (ro_tok == 0) { - cont_info->section_info[index].description. - field.read_only = 0; - } else if (ro_tok == 2) { - /* - * a value of 2 in the read-only token means - * that the data in this section needs - * re-interpreting - */ - cont_info->section_info[index].description. - field.read_only = 1; - } else { - (void) fclose(file); - return (-1); - } - - token = tokenizer(item, ",", &item, &matched); - if (token == 0x00) { - (void) fclose(file); - return (-1); - } - - cont_info->section_info[index].address = atoi(token); - if (ro_tok == 2) { - /* - * expect an extra parameter to define the - * data interpreter - */ - token = tokenizer(item, ",", &item, &matched); - if (token == 0x00) { - (void) fclose(file); - return (-1); - } - } - if (item == '\0') { - (void) fclose(file); - return (-1); - } - cont_info->section_info[index].size = - ro_tok == 2 ? atoi(token) : atoi(item); - if (ro_tok == 2) { - if (strcmp(item, "SPD") == 0) - cont_info->section_info[index]. - encoding = ENC_SPD; - else { - (void) fclose(file); - return (-1); - } - } - (cont_info->num_sections)++; - - token = tokenizer(field, ":\n ", &field, &matched); - } - } - (void) fclose(file); - return (0); -} - -/* - * Description :fru_open_container() opens the container associated with a fru. - * it's called by data plugin module before creating container - * property. it calls picltree library routine to get the - * device path and driver binding name for the fru to get the - * corresponding fru name that describe the fru layout. - * - * Arguments :picl_hdl_t fru - * A handle for PICL tree node of class "fru" representing the - * FRU with the container to open. - * - * Return : - * On Success, a Positive integer container handle. is returned - * for use in subsequent fru operations;on error, 0 is returned - * and "errno" is set appropriately. - */ - -container_hdl_t -fru_open_container(picl_nodehdl_t fruhdl) -{ - int retval; - int count; - int device_fd; - uchar_t first_byte; - char *bname; - char devpath[PATH_MAX]; - char nmbuf[SYS_NMLN]; - hash_obj_t *cont_hash_obj; - hash_obj_t *sec_hash_obj; - picl_nodehdl_t tmphdl; - picl_prophdl_t prophdl; - ptree_propinfo_t propinfo; - container_info_t cont_info; - - /* Get property handle of _seeprom_source under fru node */ - retval = ptree_get_propval_by_name(fruhdl, PICL_REFPROP_SEEPROM_SRC, - &tmphdl, sizeof (tmphdl)); - if (retval != PICL_SUCCESS) { - return (NULL); - } - - /* Get the device path of the fru */ - retval = ptree_get_propval_by_name(tmphdl, PICL_PROP_DEVICEPATH, - devpath, PATH_MAX); - if (retval != PICL_SUCCESS) { - return (NULL); - } - - retval = ptree_get_prop_by_name(tmphdl, PICL_PROP_BINDING_NAME, - &prophdl); - if (retval != PICL_SUCCESS) { - return (NULL); - } - - retval = ptree_get_propinfo(prophdl, &propinfo); - if (retval != PICL_SUCCESS) { - return (NULL); - } - - bname = alloca(propinfo.piclinfo.size); - if (bname == NULL) { - return (NULL); - } - - /* get the driver binding name */ - retval = ptree_get_propval(prophdl, bname, propinfo.piclinfo.size); - if (retval != PICL_SUCCESS) { - return (NULL); - } - - cont_hash_obj = create_container_hash_object(); - if (cont_hash_obj == NULL) { - return (NULL); - } - - add_hashobject_to_hashtable(cont_hash_obj); - - (void) strlcpy(cont_hash_obj->u.cont_obj->device_pathname, devpath, - sizeof (devpath)); - - /* check for sun or non-sun type fru */ - if (strcmp(bname, "i2c-at34c02") == 0) { - device_fd = open(devpath, O_RDONLY); - if (device_fd < 0) { - return (NULL); - } - first_byte = 0x00; - - retval = pread(device_fd, &first_byte, sizeof (first_byte), 0); - (void) close(device_fd); - switch (first_byte) { - case 0x08: - (void) strcpy(bname, "i2c-at34cps"); - break; - case 0x80: - (void) strcpy(bname, "i2c-at34c02"); - break; - default: - (void) strcpy(bname, "i2c-at34cuk"); - break; - } - } - - /* if there's a platform-specific conf file, use that */ - retval = -1; - if (sysinfo(SI_PLATFORM, nmbuf, sizeof (nmbuf)) != -1) { - (void) snprintf(devpath, PATH_MAX, PICLD_PLAT_PLUGIN_DIRF, - nmbuf); - (void) strlcat(devpath, FRU_CONTAINER_CONF, PATH_MAX); - retval = access(devpath, R_OK); - } - if (retval != 0) { - /* nothing for the platform, try the base name */ - (void) snprintf(devpath, PATH_MAX, "%s/%s", - CONTAINER_DIR, FRU_CONTAINER_CONF); - retval = access(devpath, R_OK); - } - /* matches driver binding name to get container information */ - if (retval == 0) { - retval = get_container_info(devpath, bname, &cont_info); - } - if (retval < 0) { - return (NULL); - } - - cont_hash_obj->u.cont_obj->num_of_section = cont_info.num_sections; - cont_hash_obj->u.cont_obj->sec_obj_list = NULL; - - for (count = 0; count < cont_info.num_sections; count++) { - sec_hash_obj = create_section_hash_object(); - if (sec_hash_obj == NULL) { - return (NULL); - } - - add_hashobject_to_hashtable(sec_hash_obj); - - sec_hash_obj->u.sec_obj->section.offset = - cont_info.section_info[count].address; - - sec_hash_obj->u.sec_obj->section.protection = - cont_info.section_info[count].description.field.read_only; - - sec_hash_obj->u.sec_obj->section.length = - cont_info.section_info[count].size; - - sec_hash_obj->u.sec_obj->section.version = cont_info.header_ver; - sec_hash_obj->u.sec_obj->encoding = - cont_info.section_info[count].encoding; - - add_to_sec_object_list(cont_hash_obj, sec_hash_obj); - } - return (cont_hash_obj->obj_hdl); -} - -static int -verify_header_crc8(headerrev_t head_ver, unsigned char *bytes, int length) -{ - int crc_offset = 0; - unsigned char orig_crc8 = 0; - unsigned char calc_crc8 = 0; - - switch (head_ver) { - case SECTION_HDR_VER: - crc_offset = 4; - break; - default: - errno = EINVAL; - return (0); - } - - orig_crc8 = bytes[crc_offset]; - bytes[crc_offset] = 0x00; /* clear for calc */ - calc_crc8 = compute_crc8(bytes, length); - bytes[crc_offset] = orig_crc8; /* restore */ - return (orig_crc8 == calc_crc8); -} - -/* - * Description : - * fru_get_num_sections() returns number of sections in a - * container. it calls get_container_index() to get the container - * index number in the container list. - * - * Arguments : - * container_hdl_t : container handle. - * - * Return : - * int - * On success, returns number of sections in a container. - * - */ - -/* ARGSUSED */ -int -fru_get_num_sections(container_hdl_t container, door_cred_t *cred) -{ - hash_obj_t *hash_object; - - hash_object = lookup_handle_object(container, CONTAINER_TYPE); - if (hash_object == NULL) { - return (-1); - } - - return (hash_object->u.cont_obj->num_of_section); -} - -/* - * called from fru_get_sections() - */ - -static void -get_section(int fd, hash_obj_t *sec_hash, section_t *section) -{ - int retval; - int size; - int count; - uint16_t hdrver; - hash_obj_t *seg_hash; - unsigned char *buffer; - section_obj_t *sec_obj; - section_layout_t sec_hdr; - segment_layout_t *seg_hdr; - segment_layout_t *seg_buf; - - sec_obj = sec_hash->u.sec_obj; - if (sec_obj == NULL) { - return; - } - - /* populate section_t */ - section->handle = sec_hash->obj_hdl; - section->offset = sec_obj->section.offset; - section->length = sec_obj->section.length; - section->protection = sec_obj->section.protection; - section->version = sec_obj->section.version; - sec_obj->num_of_segment = 0; - - switch (sec_obj->encoding) { - case ENC_STANDARD: - /* read section header layout */ - retval = pread(fd, &sec_hdr, sizeof (sec_hdr), - sec_obj->section.offset); - break; - - case ENC_SPD: - retval = get_sp_sec_hdr(&sec_hdr, sizeof (sec_hdr)); - break; - - default: - return; - } - - if (retval != sizeof (sec_hdr)) { - return; - } - - hdrver = GET_SECTION_HDR_VERSION; - - if ((sec_hdr.headertag != SECTION_HDR_TAG) && - (hdrver != section->version)) { - return; - } - - /* size = section layout + total sizeof segment header */ - size = sizeof (sec_hdr) + ((sec_hdr.segmentcount) * - sizeof (segment_layout_t)); - - buffer = alloca(size); - if (buffer == NULL) { - return; - } - - /* segment header buffer */ - seg_buf = alloca(size - sizeof (sec_hdr)); - if (seg_buf == NULL) { - return; - } - - switch (sec_obj->encoding) { - case ENC_STANDARD: - /* read segment header */ - retval = pread(fd, seg_buf, size - sizeof (sec_hdr), - sec_obj->section.offset + sizeof (sec_hdr)); - break; - - case ENC_SPD: - retval = - get_sp_seg_hdr(seg_buf, size - sizeof (sec_hdr)); - break; - - default: - return; - } - - if (retval != (size - sizeof (sec_hdr))) { - return; - } - - /* copy section header layout */ - (void) memcpy(buffer, &sec_hdr, sizeof (sec_hdr)); - - /* copy segment header layout */ - (void) memcpy(buffer + sizeof (sec_hdr), seg_buf, size - - sizeof (sec_hdr)); - - /* verify crc8 */ - retval = verify_header_crc8(hdrver, buffer, size); - if (retval != TRUE) { - return; - } - - section->version = hdrver; - sec_obj->section.version = hdrver; - - seg_hdr = (segment_layout_t *)seg_buf; - - for (count = 0; count < sec_hdr.segmentcount; count++, seg_hdr++) { - seg_hash = create_segment_hash_object(); - if (seg_hash == NULL) { - return; - } - - add_hashobject_to_hashtable(seg_hash); - - copy_segment_layout(&seg_hash->u.seg_obj->segment, seg_hdr); - - add_to_seg_object_list(sec_hash, seg_hash); - - sec_obj->num_of_segment++; - } -} - - -static int -call_devfsadm(void) -{ - char *phys_path; - di_node_t root_node; - di_node_t prom_node; - di_node_t f_node; - - if ((root_node = di_init("/", DINFOCPYALL)) == DI_NODE_NIL) { - return (-1); - } - - f_node = di_drv_first_node(PICL_CLASS_SEEPROM, root_node); - if (f_node != DI_NODE_NIL) { - phys_path = di_devfs_path(f_node); - if ((prom_node = di_init(phys_path, DINFOMINOR)) != - DI_NODE_NIL) { - di_fini(prom_node); - di_fini(root_node); - (void) pclose(popen(devfsadm_cmd, "r")); - return (0); - } - } - di_fini(root_node); - return (-1); -} - -/* - * Description : - * fru_get_sections() fills an array of section structures passed - * as an argument. - * - * Arguments : - * container_hdl_t : container handle(device descriptor). - * section_t : array of section structure. - * int : maximum number of section in a container. - * - * Returns : - * int - * On success,the number of section structures written is returned; - * on error, -1 is returned and "errno" is set appropriately. - * - */ - -/* ARGSUSED */ -int -fru_get_sections(container_hdl_t container, section_t *section, int maxsec, - door_cred_t *cred) -{ - int device_fd; - int retrys = 1; - int count; - hash_obj_t *cont_object; - hash_obj_t *sec_hash; - - cont_object = lookup_handle_object(container, CONTAINER_TYPE); - - if (cont_object == NULL) { - return (-1); - } - - if (cont_object->u.cont_obj->num_of_section > maxsec) { - return (-1); - } - - sec_hash = cont_object->u.cont_obj->sec_obj_list; - if (sec_hash == NULL) { - return (-1); - } - - do { - device_fd = - open(cont_object->u.cont_obj->device_pathname, O_RDONLY); - if (device_fd >= 0) { - break; - } - } while ((retrys-- > 0) && (call_devfsadm() == 0)); - - if (device_fd < 0) { - return (-1); - } - - for (count = 0; count < cont_object->u.cont_obj->num_of_section; - count++, section++) { - section->version = -1; - /* populate section_t */ - get_section(device_fd, sec_hash, section); - sec_hash = sec_hash->u.sec_obj->next; - } - - (void) close(device_fd); - return (count); -} - -/* - * Description : - * fru_get_num_segments() returns the current number of segments - * in a section. - * - * Arguments : - * section_hdl_t : section header holding section information. - * - * Return : - * int - * On success, the number of segments in the argument section is - * returned; on error -1 is returned. - */ - -/* ARGSUSED */ -int -fru_get_num_segments(section_hdl_t section, door_cred_t *cred) -{ - hash_obj_t *sec_object; - section_obj_t *sec_obj; - - sec_object = lookup_handle_object(section, SECTION_TYPE); - if (sec_object == NULL) { - return (-1); - } - - sec_obj = sec_object->u.sec_obj; - if (sec_obj == NULL) { - return (-1); - } - - return (sec_obj->num_of_segment); -} - -/* - * Description : - * fru_get_segments() fills an array of structures representing the - * segments in a section. - * - * Arguments : - * section_hdl_t : holds section number. - * segment_t : on success will hold segment information. - * int : maximum number of segment. - * - * Return : - * int - * On success, the number of segment structures written is - * returned; on errno -1 is returned. - */ - -/* ARGSUSED */ -int -fru_get_segments(section_hdl_t section, segment_t *segment, int maxseg, - door_cred_t *cred) -{ - int count; - hash_obj_t *sec_object; - hash_obj_t *seg_object; - section_obj_t *sec_obj; - - sec_object = lookup_handle_object(section, SECTION_TYPE); - if (sec_object == NULL) { - return (-1); - } - - sec_obj = sec_object->u.sec_obj; - if (sec_obj == NULL) { - return (-1); - } - - if (sec_obj->num_of_segment > maxseg) { - return (-1); - } - - seg_object = sec_object->u.sec_obj->seg_obj_list; - if (seg_object == NULL) { - return (-1); - } - - for (count = 0; count < sec_obj->num_of_segment; count++) { - - /* populate segment_t */ - segment->handle = seg_object->obj_hdl; - (void) memcpy(segment->name, - seg_object->u.seg_obj->segment.name, SEG_NAME_LEN); - segment->descriptor = seg_object->u.seg_obj->segment.descriptor; - - segment->offset = seg_object->u.seg_obj->segment.offset; - segment->length = seg_object->u.seg_obj->segment.length; - seg_object = seg_object->u.seg_obj->next; - segment++; - } - return (0); -} - -/* - * Description : - * fru_add_segment() adds a segment to a section. - * - * Arguments : - * section_hdl_t section - * A handle for the section in which to add the segment. - * - * segment_t *segment - * On entry, the "handle" component of "segment" is ignored and the - * remaining components specify the parameters of the segment to be - * added. On return, the "handle" component is set to the handle - * for the added segment. The segment offset is mandatory for FIXED - * segments; otherwise, the offset is advisory. - * - * Return : - * int - * On success, 0 is returned; on error -1 is returned. - * - */ - -int -fru_add_segment(section_hdl_t section, segment_t *segment, - section_hdl_t *newsection, door_cred_t *cred) -{ - int fd; - int retval; - int offset; - int sec_size; - int seg_cnt; - int bufsize; - int new_seg_offset; - int new_seg_length; - int fixed_segment; - char trailer[] = { 0x0c, 0x00, 0x00, 0x00, 0x00 }; - hash_obj_t *cont_hash; - hash_obj_t *sec_hash; - hash_obj_t *seg_hash; - fru_segdesc_t *new_seg_desc; - unsigned char *crcbuf; - section_layout_t sec_layout; - segment_layout_t *seg_layout; - segment_layout_t *segment_buf; - - /* check the effective uid of the client */ - if (cred->dc_euid != 0) { - errno = EPERM; - return (-1); /* not a root */ - } - - /* section hash */ - sec_hash = lookup_handle_object(section, SECTION_TYPE); - if (sec_hash == NULL) { - return (-1); - } - - /* check for read-only section */ - if (sec_hash->u.sec_obj->section.protection == READ_ONLY_SECTION) { - errno = EPERM; - return (-1); - } - - /* look for duplicate segment */ - seg_hash = sec_hash->u.sec_obj->seg_obj_list; - while (seg_hash != NULL) { - if (strncmp(segment->name, seg_hash->u.seg_obj->segment.name, - SEG_NAME_LEN) == 0) { - errno = EEXIST; - return (-1); /* can't add duplicate segment */ - } - seg_hash = seg_hash->u.seg_obj->next; - } - - /* get the container hash */ - cont_hash = lookup_handle_object(sec_hash->u.sec_obj->cont_hdl, - CONTAINER_TYPE); - if (cont_hash == NULL) { - return (-1); - } - - /* open the container */ - fd = open(cont_hash->u.cont_obj->device_pathname, O_RDWR); - if (fd < 0) { - return (-1); - } - - /* section start here */ - offset = sec_hash->u.sec_obj->section.offset; - - /* read section header layout */ - retval = pread(fd, &sec_layout, sizeof (sec_layout), offset); - if (retval != sizeof (sec_layout)) { - (void) close(fd); - return (-1); - } - - /* check for valid section header */ - if (sec_layout.headertag != SECTION_HDR_TAG) { - /* write a new one */ - sec_layout.headertag = SECTION_HDR_TAG; - sec_layout.headerversion[0] = SECTION_HDR_VER_BIT0; - sec_layout.headerversion[1] = SECTION_HDR_VER_BIT1; - sec_layout.headerlength = sizeof (sec_layout); - sec_layout.segmentcount = 0; - } - - /* section size */ - sec_size = sec_hash->u.sec_obj->section.length; - - /* number of segment in the section */ - seg_cnt = sec_layout.segmentcount; - - /* total sizeof segment + new segment */ - bufsize = sizeof (segment_layout_t) * (seg_cnt + 1); - segment_buf = alloca(bufsize); - if (segment_buf == NULL) { - return (-1); - } - - /* read entire segment header */ - retval = pread(fd, segment_buf, (bufsize - sizeof (segment_layout_t)), - offset + sizeof (section_layout_t)); - if (retval != (bufsize - sizeof (segment_layout_t))) { - (void) close(fd); - return (-1); - } - - new_seg_offset = segment->offset; /* new segment offset */ - new_seg_length = segment->length; /* new segment length */ - - new_seg_desc = (fru_segdesc_t *)&segment->descriptor; - - fixed_segment = new_seg_desc->field.fixed; - - /* get new offset for new segment to be addedd */ - retval = find_offset((char *)segment_buf, seg_cnt, sec_size, - &new_seg_offset, new_seg_length, fixed_segment, fd); - - if (retval != 0) { - (void) close(fd); - errno = EAGAIN; - return (-1); - } - - /* copy new segment data in segment layout */ - seg_layout = (segment_layout_t *)(segment_buf + seg_cnt); - (void) memcpy(&seg_layout->name, segment->name, SEG_NAME_LEN); - (void) memcpy(seg_layout->descriptor, &segment->descriptor, - sizeof (uint32_t)); - seg_layout->length = segment->length; - seg_layout->offset = new_seg_offset; /* new segment offset */ - - sec_layout.segmentcount += 1; - - crcbuf = alloca(sizeof (section_layout_t) + bufsize); - if (crcbuf == NULL) { - (void) close(fd); - return (-1); - } - - sec_layout.headercrc8 = 0; - sec_layout.headerlength += sizeof (segment_layout_t); - - (void) memcpy(crcbuf, (char *)&sec_layout, sizeof (section_layout_t)); - (void) memcpy(crcbuf + sizeof (section_layout_t), segment_buf, bufsize); - - sec_layout.headercrc8 = compute_crc8(crcbuf, bufsize + - sizeof (section_layout_t)); - - /* write section header */ - retval = pwrite(fd, &sec_layout, sizeof (section_layout_t), offset); - if (retval != sizeof (section_layout_t)) { - (void) close(fd); - return (-1); - } - - /* write segment header */ - retval = pwrite(fd, segment_buf, bufsize, offset + - sizeof (section_layout_t)); - if (retval != bufsize) { - (void) close(fd); - return (-1); - } - - /* write segment trailer */ - retval = pwrite(fd, &trailer, sizeof (trailer), new_seg_offset); - if (retval != sizeof (trailer)) { - (void) close(fd); - return (-1); - } - - (void) close(fd); - - /* create new segment hash object */ - seg_hash = create_segment_hash_object(); - if (seg_hash == NULL) { - return (-1); - } - - add_hashobject_to_hashtable(seg_hash); - - copy_segment_layout(&seg_hash->u.seg_obj->segment, seg_layout); - - add_to_seg_object_list(sec_hash, seg_hash); - - sec_hash->u.sec_obj->num_of_segment += 1; - seg_hash->u.seg_obj->trailer_offset = new_seg_offset; - *newsection = section; /* return the new section handle */ - return (0); -} - -static void -free_pkt_object_list(hash_obj_t *hash_obj) -{ - hash_obj_t *next_obj; - hash_obj_t *free_obj; - - next_obj = hash_obj->u.seg_obj->pkt_obj_list; - while (next_obj != NULL) { - free_obj = next_obj; - next_obj = next_obj->u.pkt_obj->next; - /* if prev is NULL it's the first object in the list */ - if (free_obj->prev == NULL) { - hash_table[(free_obj->obj_hdl % TABLE_SIZE)] = - free_obj->next; - if (free_obj->next != NULL) { - free_obj->next->prev = free_obj->prev; - } - } else { - free_obj->prev->next = free_obj->next; - if (free_obj->next != NULL) { - free_obj->next->prev = free_obj->prev; - } - } - - free(free_obj->u.pkt_obj->payload); - free(free_obj->u.pkt_obj); - free(free_obj); - } - - hash_obj->u.seg_obj->pkt_obj_list = NULL; -} - -static void -free_segment_hash(handle_t handle, hash_obj_t *sec_hash) -{ - hash_obj_t *seg_hash; - hash_obj_t *next_hash; - - seg_hash = sec_hash->u.sec_obj->seg_obj_list; - if (seg_hash == NULL) { - return; - } - - if (seg_hash->obj_hdl == handle) { - sec_hash->u.sec_obj->seg_obj_list = seg_hash->u.seg_obj->next; - } else { - while (seg_hash->obj_hdl != handle) { - next_hash = seg_hash; - seg_hash = seg_hash->u.seg_obj->next; - if (seg_hash == NULL) { - return; - } - } - next_hash->u.seg_obj->next = seg_hash->u.seg_obj->next; - } - - if (seg_hash->prev == NULL) { - hash_table[(seg_hash->obj_hdl % TABLE_SIZE)] = seg_hash->next; - if (seg_hash->next != NULL) { - seg_hash->next->prev = NULL; - } - } else { - seg_hash->prev->next = seg_hash->next; - if (seg_hash->next != NULL) { - seg_hash->next->prev = seg_hash->prev; - } - } - - free_pkt_object_list(seg_hash); - free(seg_hash->u.seg_obj); - free(seg_hash); -} - -/* - * Description : - * fru_delete_segment() deletes a segment from a section; the - * associated container data is not altered. - * - * Arguments : segment_hdl_t segment handle. - * section_hdl_t new section handle. - * - * Return : - * int - * On success, 0 returned; On error -1 is returned. - */ - -int -fru_delete_segment(segment_hdl_t segment, section_hdl_t *newsection, - door_cred_t *cred) -{ - int num_of_seg; - int bufsize; - int count; - int retval; - int fd; - int segnum; - hash_obj_t *seg_hash; - hash_obj_t *sec_hash; - hash_obj_t *cont_hash; - hash_obj_t *tmp_hash; - unsigned char *buffer; - fru_segdesc_t *desc; - segment_layout_t *seg_buf; - section_layout_t *sec_layout; - segment_layout_t *seg_layout; - segment_layout_t *next_layout; - - /* check the effective uid of the client */ - if (cred->dc_euid != 0) { - errno = EPERM; - return (-1); /* not a root */ - } - - seg_hash = lookup_handle_object(segment, SEGMENT_TYPE); - if (seg_hash == NULL) { - return (-1); - } - - desc = (fru_segdesc_t *)&seg_hash->u.seg_obj->segment.descriptor; - if (!(desc->field.field_perm & SEGMENT_DELETE)) { - errno = EPERM; - return (-1); /* can't delete this segment */ - } - - sec_hash = lookup_handle_object(seg_hash->u.seg_obj->section_hdl, - SECTION_TYPE); - if (sec_hash == NULL) { - return (-1); - } - - if (sec_hash->u.sec_obj->section.protection == READ_ONLY_SECTION) { - errno = EPERM; - return (-1); - } - - num_of_seg = sec_hash->u.sec_obj->num_of_segment; - - bufsize = (sizeof (segment_layout_t) * num_of_seg); - - seg_buf = alloca(bufsize); - if (seg_buf == NULL) { - return (-1); - } - - segnum = 0; - for (tmp_hash = sec_hash->u.sec_obj->seg_obj_list; tmp_hash != NULL; - tmp_hash = tmp_hash->u.seg_obj->next) { - if (tmp_hash->obj_hdl == segment) { - break; - } - segnum++; - } - - cont_hash = lookup_handle_object(sec_hash->u.sec_obj->cont_hdl, - CONTAINER_TYPE); - if (cont_hash == NULL) { - return (-1); - } - - fd = open(cont_hash->u.cont_obj->device_pathname, O_RDWR); - if (fd < 0) { - return (-1); - } - - sec_layout = alloca(sizeof (section_layout_t)); - if (sec_layout == NULL) { - (void) close(fd); - return (-1); - } - - /* read section layout header */ - retval = pread(fd, sec_layout, sizeof (section_layout_t), - sec_hash->u.sec_obj->section.offset); - if (retval != sizeof (section_layout_t)) { - (void) close(fd); - return (-1); - } - - /* read segment header layout */ - retval = pread(fd, seg_buf, bufsize, - sec_hash->u.sec_obj->section.offset + sizeof (section_layout_t)); - if (retval != bufsize) { - (void) close(fd); - return (-1); - } - - seg_layout = (segment_layout_t *)(seg_buf + segnum); - next_layout = seg_layout; - for (count = segnum; - count < sec_hash->u.sec_obj->num_of_segment - 1; count++) { - next_layout++; - (void) memcpy(seg_layout, next_layout, - sizeof (segment_layout_t)); - seg_layout++; - } - - (void) memset(seg_layout, '\0', sizeof (segment_layout_t)); - - sec_layout->headercrc8 = 0; - - sec_layout->headerlength -= sizeof (segment_layout_t); - sec_layout->segmentcount -= 1; - - buffer = alloca(sec_layout->headerlength); - if (buffer == NULL) { - (void) close(fd); - return (-1); - } - - (void) memcpy(buffer, sec_layout, sizeof (section_layout_t)); - (void) memcpy(buffer + sizeof (section_layout_t), seg_buf, bufsize - - sizeof (segment_layout_t)); - sec_layout->headercrc8 = compute_crc8(buffer, sec_layout->headerlength); - - /* write section header with update crc8 and header length */ - retval = pwrite(fd, sec_layout, sizeof (section_layout_t), - sec_hash->u.sec_obj->section.offset); - if (retval != sizeof (section_layout_t)) { - (void) close(fd); - return (-1); - } - - /* write the update segment header */ - retval = pwrite(fd, seg_buf, bufsize, - sec_hash->u.sec_obj->section.offset + sizeof (section_layout_t)); - (void) close(fd); - if (retval != bufsize) { - return (-1); - } - - free_segment_hash(segment, sec_hash); - - *newsection = sec_hash->obj_hdl; - sec_hash->u.sec_obj->num_of_segment = sec_layout->segmentcount; - - return (0); -} - -/* - * Description : - * fru_read_segment() reads the raw contents of a segment. - * - * Arguments : segment_hdl_t : segment handle. - * void * : buffer containing segment data when function returns. - * size_t :number of bytes. - * - * Return : - * int - * On success, the number of bytes read is returned; - * - * Notes : - * Segments containing packets can be read in structured fashion - * using the fru_get_packets() and fru_get_payload() primitives;the - * entire byte range of a segment can be read using - * fru_read_segment(). - */ - -/* ARGSUSED */ -ssize_t -fru_read_segment(segment_hdl_t segment, void *buffer, size_t nbytes, - door_cred_t *cred) -{ - int fd; - int retval; - hash_obj_t *seg_hash; - hash_obj_t *sec_hash; - hash_obj_t *cont_hash; - - /* segment hash object */ - seg_hash = lookup_handle_object(segment, SEGMENT_TYPE); - if (seg_hash == NULL) { - return (-1); - } - - /* section hash object */ - sec_hash = lookup_handle_object(seg_hash->u.seg_obj->section_hdl, - SECTION_TYPE); - if (sec_hash == NULL) { - return (-1); - } - - /* container hash object */ - cont_hash = lookup_handle_object(sec_hash->u.sec_obj->cont_hdl, - CONTAINER_TYPE); - if (cont_hash == NULL) { - return (-1); - } - - if (seg_hash->u.seg_obj->segment.length < nbytes) { - return (-1); - } - - fd = open(cont_hash->u.cont_obj->device_pathname, O_RDONLY); - if (fd < 0) { - return (-1); - } - - switch (sec_hash->u.sec_obj->encoding) { - case ENC_STANDARD: - retval = pread(fd, buffer, nbytes, - seg_hash->u.seg_obj->segment.offset); - (void) close(fd); - if (retval != nbytes) { - return (-1); - } - break; - - case ENC_SPD: { - char *spd_buf; - uchar_t *ptr; - size_t len; - - spd_buf = alloca(sec_hash->u.sec_obj->section.length); - if (spd_buf == NULL) - retval = -1; - else { - retval = get_spd_data(fd, spd_buf, - sec_hash->u.sec_obj->section.length, - seg_hash->u.seg_obj->segment.offset); - } - (void) close(fd); - if (retval != 0) { - return (-1); - } - retval = cvrt_dim_data(spd_buf, - sec_hash->u.sec_obj->section.length, &ptr, &len); - if (retval != 0) { - return (-1); - } - if (nbytes > len) - nbytes = len; - (void) memcpy(buffer, ptr, nbytes); - free(ptr); - break; - } - - default: - return (-1); - } - - return (nbytes); -} - -/* - * Description : - * fru_write_segment() writes a raw segment. - * - * Arguments : segment_hdl_t :segment handle. - * const void * : data buffer. - * size_t : number of bytes. - * segment_hdl_t : new segment handle. - * - * Returns : - * int - * On success, the number of bytes written is returned - * - */ -/*ARGSUSED*/ -int -fru_write_segment(segment_hdl_t segment, const void *data, size_t nbytes, - segment_hdl_t *newsegment, door_cred_t *cred) -{ - return (ENOTSUP); -} - - -static int -get_packet(int device_fd, void *buffer, int size, int offset) -{ - int retval; - - retval = pread(device_fd, (char *)buffer, size, offset); - if (retval != -1) { - return (0); - } - return (-1); -} - -static uint32_t -get_checksum_crc(hash_obj_t *seg_hash, int data_size) -{ - int protection; - int offset = 0; - uint32_t crc; - hash_obj_t *sec_hash; - hash_obj_t *pkt_hash; - unsigned char *buffer; - - sec_hash = lookup_handle_object(seg_hash->u.seg_obj->section_hdl, - SECTION_TYPE); - if (sec_hash == NULL) { - return ((uint32_t)-1); - } - - buffer = alloca(data_size); - if (buffer == NULL) { - return ((uint32_t)-1); - } - - /* traverse the packet object list for all the tags and payload */ - for (pkt_hash = seg_hash->u.seg_obj->pkt_obj_list; - pkt_hash != NULL; pkt_hash = pkt_hash->u.pkt_obj->next) { - (void) memcpy(buffer + offset, &pkt_hash->u.pkt_obj->tag, - pkt_hash->u.pkt_obj->tag_size); - offset += pkt_hash->u.pkt_obj->tag_size; - (void) memcpy(buffer + offset, pkt_hash->u.pkt_obj->payload, - pkt_hash->u.pkt_obj->paylen); - offset += pkt_hash->u.pkt_obj->paylen; - } - - protection = sec_hash->u.sec_obj->section.protection; - - if (protection == READ_ONLY_SECTION) { /* read-only section */ - crc = compute_crc32(buffer, data_size); - } else { /* read/write section */ - crc = compute_checksum32(buffer, data_size); - } - return (crc); /* computed crc */ -} - -static int -get_dev_or_buffered_packets(hash_obj_t *seg_hash, int device_fd, int offset, - int length, const char *buf) -{ - int tag_size; - int paylen; - int retval; - int seg_limit = 0; - int pktcnt = 0; - char *data; - uint32_t crc; - uint32_t origcrc; - fru_tag_t tag; - hash_obj_t *pkt_hash_obj; - fru_segdesc_t *segdesc; - fru_tagtype_t tagtype; - - if (buf == NULL) { - retval = get_packet(device_fd, &tag, sizeof (fru_tag_t), - offset); - if (retval == -1) { - return (-1); - } - } else if (length - offset < sizeof (fru_tag_t)) { - return (-1); - } else { - (void) memcpy(&tag, buf + offset, sizeof (fru_tag_t)); - } - - seg_hash->u.seg_obj->trailer_offset = offset; - - data = (char *)&tag; - while (data[0] != SEG_TRAILER_TAG) { - tagtype = get_tag_type(&tag); /* verify tag type */ - if (tagtype == -1) { - return (-1); - } - - tag_size = get_tag_size(tagtype); - if (tag_size == -1) { - return (-1); - } - - seg_limit += tag_size; - if (seg_limit > length) { - return (-1); - } - - paylen = get_payload_length((void *)&tag); - if (paylen == -1) { - return (-1); - } - - seg_limit += paylen; - if (seg_limit > length) { - return (-1); - } - - pkt_hash_obj = create_packet_hash_object(); - if (pkt_hash_obj == NULL) { - return (-1); - } - - pkt_hash_obj->u.pkt_obj->payload = malloc(paylen); - if (pkt_hash_obj->u.pkt_obj->payload == NULL) { - free(pkt_hash_obj); - return (-1); - } - - offset += tag_size; - if (buf == NULL) { - retval = pread(device_fd, - pkt_hash_obj->u.pkt_obj->payload, paylen, offset); - } else if (paylen + offset > length) { - retval = 0; - } else { - (void) memcpy(pkt_hash_obj->u.pkt_obj->payload, - buf + offset, paylen); - retval = paylen; - } - if (retval != paylen) { - free(pkt_hash_obj->u.pkt_obj->payload); - free(pkt_hash_obj); - return (-1); - } - - /* don't change this */ - pkt_hash_obj->u.pkt_obj->tag.raw_data = 0; - (void) memcpy(&pkt_hash_obj->u.pkt_obj->tag, &tag, tag_size); - pkt_hash_obj->u.pkt_obj->paylen = paylen; - pkt_hash_obj->u.pkt_obj->tag_size = tag_size; - pkt_hash_obj->u.pkt_obj->payload_offset = offset; - - offset += paylen; - - add_hashobject_to_hashtable(pkt_hash_obj); - add_to_pkt_object_list(seg_hash, pkt_hash_obj); - - pktcnt++; - - if (buf == NULL) { - retval = get_packet(device_fd, &tag, sizeof (fru_tag_t), - offset); - if (retval == -1) { - return (-1); - } - } else if (length - offset < sizeof (fru_tag_t)) { - if (length - offset > 0) { - /* - * not enough data for a full fru_tag_t - * just return what there is - */ - (void) memset(&tag, 0, sizeof (fru_tag_t)); - (void) memcpy(&tag, buf + offset, - length - offset); - } - } else { - (void) memcpy(&tag, buf + offset, sizeof (fru_tag_t)); - } - - data = (char *)&tag; - } - - segdesc = (fru_segdesc_t *)&seg_hash->u.seg_obj->segment.descriptor; - - seg_hash->u.seg_obj->trailer_offset = offset; - - if (!segdesc->field.ignore_checksum) { - crc = get_checksum_crc(seg_hash, seg_limit); - offset = seg_hash->u.seg_obj->segment.offset; - - if (buf == NULL) { - retval = pread(device_fd, &origcrc, sizeof (origcrc), - offset + seg_limit + 1); - if (retval != sizeof (origcrc)) { - return (-1); - } - } else if (length - offset < sizeof (origcrc)) { - return (-1); - } else { - (void) memcpy(&origcrc, buf + seg_limit + 1, - sizeof (origcrc)); - } - - if (origcrc != crc) { - seg_hash->u.seg_obj->trailer_offset = offset; - } - } - - return (pktcnt); -} - -static int -get_packets(hash_obj_t *seg_hash, int device_fd, int offset, int length) -{ - return (get_dev_or_buffered_packets(seg_hash, device_fd, offset, - length, NULL)); -} - -static int -get_buffered_packets(hash_obj_t *seg_hash, const char *seg_buf, size_t seg_len) -{ - return (get_dev_or_buffered_packets(seg_hash, -1, 0, seg_len, seg_buf)); -} - -/* - * Description : - * fru_get_num_packets() returns the current number of packets - * in a segment. - * - * Arguments : segment_hdl_t : segment handle. - * - * Return : - * int - * On success, the number of packets is returned; - * -1 on failure. - */ -int -fru_get_num_packets(segment_hdl_t segment, door_cred_t *cred) -{ - int device_fd; - int pktcnt; - int length; - uint16_t offset; - hash_obj_t *cont_hash_obj; - hash_obj_t *sec_hash; - hash_obj_t *seg_hash; - fru_segdesc_t *segdesc; - segment_obj_t *segment_object; - - seg_hash = lookup_handle_object(segment, SEGMENT_TYPE); - if (seg_hash == NULL) { - return (-1); - } - - segment_object = seg_hash->u.seg_obj; - if (segment_object == NULL) { - return (-1); - } - - segdesc = (fru_segdesc_t *)&segment_object->segment.descriptor; - if (segdesc->field.opaque) { - return (0); - } - - if (seg_hash->u.seg_obj->pkt_obj_list != NULL) { - return (segment_object->num_of_packets); - } - - offset = segment_object->segment.offset; - length = segment_object->segment.length; - - /* section hash object */ - sec_hash = lookup_handle_object(seg_hash->u.seg_obj->section_hdl, - SECTION_TYPE); - if (sec_hash == NULL) { - return (-1); - } - - segment_object->num_of_packets = 0; - - switch (sec_hash->u.sec_obj->encoding) { - case ENC_STANDARD: - cont_hash_obj = get_container_hash_object(SEGMENT_TYPE, - segment_object->section_hdl); - if (cont_hash_obj == NULL) { - return (-1); - } - device_fd = open(cont_hash_obj->u.cont_obj->device_pathname, - O_RDWR); - if (device_fd < 0) { - return (-1); - } - - pktcnt = get_packets(seg_hash, device_fd, offset, length); - (void) close(device_fd); - break; - - case ENC_SPD: { - ssize_t spd_seg_len; - size_t nbytes; - char *seg_buf; - - nbytes = segment_object->segment.length; - seg_buf = alloca(nbytes); - if (seg_buf == NULL) - return (-1); - spd_seg_len = - fru_read_segment(segment, seg_buf, nbytes, cred); - if (spd_seg_len < 0) - return (-1); - pktcnt = get_buffered_packets(seg_hash, seg_buf, - spd_seg_len); - break; - } - - default: - return (-1); - } - - if (pktcnt == -1) { - free_pkt_object_list(seg_hash); - seg_hash->u.seg_obj->pkt_obj_list = NULL; - } - - segment_object->num_of_packets = pktcnt; - - return (segment_object->num_of_packets); -} - - -/* - * Description : - * fru_get_packets() fills an array of structures representing the - * packets in a segment. - * - * Arguments : segment_hdl_t : segment handle. - * packet_t : packet buffer. - * int : maximum number of packets. - * - * Return : - * int - * On success, the number of packet structures written is returned; - * On failure -1 is returned; - * - */ - -/* ARGSUSED */ -int -fru_get_packets(segment_hdl_t segment, packet_t *packet, int maxpackets, - door_cred_t *cred) -{ - int count; - hash_obj_t *seg_hash_obj; - hash_obj_t *pkt_hash_obj; - - /* segment hash object */ - seg_hash_obj = lookup_handle_object(segment, SEGMENT_TYPE); - if (seg_hash_obj == NULL) { - return (-1); - } - - if (seg_hash_obj->u.seg_obj->num_of_packets != maxpackets) { - return (-1); - } - - pkt_hash_obj = seg_hash_obj->u.seg_obj->pkt_obj_list; - if (pkt_hash_obj == NULL) { - return (-1); - } - - for (count = 0; count < maxpackets; count++, packet++) { - packet->handle = pkt_hash_obj->obj_hdl; - packet->tag = 0; - (void) memcpy(&packet->tag, &pkt_hash_obj->u.pkt_obj->tag, - pkt_hash_obj->u.pkt_obj->tag_size); - pkt_hash_obj = pkt_hash_obj->u.pkt_obj->next; - } - - return (0); -} - -/* - * Description : - * fru_get_payload() copies the contents of a packet's payload. - * - * Arguments : packet_hdl_t : packet handle. - * void * : payload buffer. - * size_t : sizeof the buffer. - * - * Return : - * int - * On success, the number of bytes copied is returned; On error - * -1 returned. - */ - -/* ARGSUSED */ -ssize_t -fru_get_payload(packet_hdl_t packet, void *buffer, size_t nbytes, - door_cred_t *cred) -{ - hash_obj_t *packet_hash_obj; - - /* packet hash object */ - packet_hash_obj = lookup_handle_object(packet, PACKET_TYPE); - if (packet_hash_obj == NULL) { - return (-1); - } - - /* verify payload length */ - if (nbytes != packet_hash_obj->u.pkt_obj->paylen) { - return (-1); - } - - (void) memcpy(buffer, packet_hash_obj->u.pkt_obj->payload, nbytes); - return (nbytes); -} - -/* - * Description : - * fru_update_payload() writes the contents of a packet's payload. - * - * Arguments : packet_hdl_t : packet handle. - * const void * : data buffer. - * size_t : buffer size. - * packet_hdl_t : new packet handle. - * - * Return : - * int - * On success, 0 is returned; on failure - * -1 is returned. - */ - -int -fru_update_payload(packet_hdl_t packet, const void *data, size_t nbytes, - packet_hdl_t *newpacket, door_cred_t *cred) -{ - int fd; - int segment_offset; - int trailer_offset; - int retval; - uint32_t crc; - hash_obj_t *pkt_hash; - hash_obj_t *seg_hash; - hash_obj_t *sec_hash; - hash_obj_t *cont_hash; - fru_segdesc_t *desc; - - /* check the effective uid of the client */ - if (cred->dc_euid != 0) { - errno = EPERM; - return (-1); /* not a root */ - } - - /* packet hash object */ - pkt_hash = lookup_handle_object(packet, PACKET_TYPE); - if (pkt_hash == NULL) { - return (-1); - } - - /* segment hash object */ - seg_hash = lookup_handle_object(pkt_hash->u.pkt_obj->segment_hdl, - SEGMENT_TYPE); - if (seg_hash == NULL) { - return (-1); - } - - /* check for write perm. */ - desc = (fru_segdesc_t *)&seg_hash->u.seg_obj->segment.descriptor; - if (!(desc->field.field_perm & SEGMENT_WRITE)) { - errno = EPERM; - return (-1); /* write not allowed */ - } - - sec_hash = lookup_handle_object(seg_hash->u.seg_obj->section_hdl, - SECTION_TYPE); - if (sec_hash == NULL) { - return (-1); - } - - if (sec_hash->u.sec_obj->section.protection == READ_ONLY_SECTION) { - errno = EPERM; - return (-1); /* read-only section */ - } - - cont_hash = lookup_handle_object(sec_hash->u.sec_obj->cont_hdl, - CONTAINER_TYPE); - if (cont_hash == NULL) { - return (-1); - } - - if (pkt_hash->u.pkt_obj->paylen != nbytes) { - return (-1); - } - - (void) memcpy(pkt_hash->u.pkt_obj->payload, (char *)data, nbytes); - fd = open(cont_hash->u.cont_obj->device_pathname, O_RDWR); - if (fd < 0) { - return (-1); - } - - trailer_offset = seg_hash->u.seg_obj->trailer_offset; - segment_offset = seg_hash->u.seg_obj->segment.offset; - - crc = get_checksum_crc(seg_hash, (trailer_offset - segment_offset)); - retval = pwrite(fd, data, nbytes, pkt_hash->u.pkt_obj->payload_offset); - if (retval != nbytes) { - (void) close(fd); - return (-1); - } - - retval = pwrite(fd, &crc, sizeof (crc), trailer_offset + 1); - (void) close(fd); - if (retval != sizeof (crc)) { - return (-1); - } - *newpacket = packet; - return (0); -} - -/* - * Description : - * fru_append_packet() appends a packet to a segment. - * - * Arguments : - * segment_hdl_t segment - * A handle for the segment to which the packet will be appended. - * - * packet_t *packet - * On entry, the "tag" component of "packet" specifies the tag - * value for the added packet; the "handle" component is ignored. - * On return, the "handle" component is set to the handle of the - * appended packet. - * - * const void *payload - * A pointer to the caller's buffer containing the payload data for - * the appended packet. - * - * size_t nbytes - * The size of the caller buffer. - * - * Return : - * int - * On success, 0 is returned; on error -1 is returned; - */ - -int -fru_append_packet(segment_hdl_t segment, packet_t *packet, const void *payload, - size_t nbytes, segment_hdl_t *newsegment, door_cred_t *cred) -{ - int trailer_offset; - int tag_size; - int fd; - int retval; - char trailer[] = {0x0c, 0x00, 0x00, 0x00, 0x00}; - uint32_t crc; - hash_obj_t *seg_hash; - hash_obj_t *sec_hash; - hash_obj_t *pkt_hash; - hash_obj_t *cont_hash; - fru_tagtype_t tagtype; - fru_segdesc_t *desc; - - /* check the effective uid of the client */ - if (cred->dc_euid != 0) { - errno = EPERM; - return (-1); /* not a root */ - } - - seg_hash = lookup_handle_object(segment, SEGMENT_TYPE); - if (seg_hash == NULL) { - return (-1); - } - - /* check for write perm. */ - desc = (fru_segdesc_t *)&seg_hash->u.seg_obj->segment.descriptor; - if (!(desc->field.field_perm & SEGMENT_WRITE)) { - errno = EPERM; - return (-1); /* write not allowed */ - } - - sec_hash = lookup_handle_object(seg_hash->u.seg_obj->section_hdl, - SECTION_TYPE); - if (sec_hash == NULL) { - return (-1); - } - - if (sec_hash->u.sec_obj->section.protection == READ_ONLY_SECTION) { - errno = EPERM; - return (-1); /* read-only section */ - } - - trailer_offset = seg_hash->u.seg_obj->trailer_offset; - - /* - * if trailer offset is 0 than parse the segment data to get the trailer - * offset to compute the remaining space left in the segment area for - * new packet to be added. - */ - if (trailer_offset == 0) { - (void) fru_get_num_packets(segment, cred); - trailer_offset = seg_hash->u.seg_obj->trailer_offset; - } - - tagtype = get_tag_type((void *)&packet->tag); - if (tagtype == -1) { - return (-1); - } - - tag_size = get_tag_size(tagtype); - if (tag_size == -1) { - return (-1); - } - - if (seg_hash->u.seg_obj->segment.length > - ((trailer_offset - seg_hash->u.seg_obj->segment.offset) + - tag_size + nbytes + sizeof (char) + sizeof (uint32_t))) { - /* create new packet hash */ - pkt_hash = create_packet_hash_object(); - if (pkt_hash == NULL) { - return (-1); - } - - /* tag initialization */ - (void) memcpy(&pkt_hash->u.pkt_obj->tag, &packet->tag, - tag_size); - pkt_hash->u.pkt_obj->tag_size = tag_size; - - /* payload inititalization */ - pkt_hash->u.pkt_obj->payload = malloc(nbytes); - if (pkt_hash->u.pkt_obj->payload == NULL) { - free(pkt_hash); - return (-1); - } - - (void) memcpy(pkt_hash->u.pkt_obj->payload, payload, nbytes); - pkt_hash->u.pkt_obj->paylen = nbytes; - pkt_hash->u.pkt_obj->payload_offset = trailer_offset + tag_size; - - /* add to hash table */ - add_hashobject_to_hashtable(pkt_hash); - - add_to_pkt_object_list(seg_hash, pkt_hash); - - cont_hash = lookup_handle_object(sec_hash->u.sec_obj->cont_hdl, - CONTAINER_TYPE); - if (cont_hash == NULL) { - return (-1); - } - - fd = open(cont_hash->u.cont_obj->device_pathname, O_RDWR); - if (fd < 0) { - return (-1); - } - - /* update the trailer offset */ - trailer_offset += tag_size + nbytes; - - /* calculate new checksum */ - crc = get_checksum_crc(seg_hash, (trailer_offset - - seg_hash->u.seg_obj->segment.offset)); - - retval = pwrite(fd, &packet->tag, tag_size, - trailer_offset - (tag_size + nbytes)); - if (retval != tag_size) { - (void) close(fd); - return (-1); - } - - retval = pwrite(fd, payload, nbytes, trailer_offset - nbytes); - if (retval != nbytes) { - (void) close(fd); - return (-1); - } - - retval = pwrite(fd, trailer, sizeof (trailer), trailer_offset); - if (retval != sizeof (trailer)) { - (void) close(fd); - return (-1); - } - - retval = pwrite(fd, &crc, sizeof (crc), trailer_offset + 1); - (void) close(fd); - if (retval != sizeof (crc)) { - return (-1); - } - - seg_hash->u.seg_obj->trailer_offset = trailer_offset; - seg_hash->u.seg_obj->num_of_packets += 1; - - *newsegment = segment; /* return new segment handle */ - return (0); - } else { - errno = EAGAIN; - } - - return (-1); -} - -static void -adjust_packets(int fd, hash_obj_t *free_obj, hash_obj_t *object_list) -{ - int retval; - uint32_t new_offset; - hash_obj_t *hash_ptr; - - new_offset = free_obj->u.pkt_obj->payload_offset - - free_obj->u.pkt_obj->tag_size; - for (hash_ptr = object_list; - hash_ptr != NULL; hash_ptr = hash_ptr->u.pkt_obj->next) { - retval = pwrite(fd, &hash_ptr->u.pkt_obj->tag, - hash_ptr->u.pkt_obj->tag_size, new_offset); - if (retval != hash_ptr->u.pkt_obj->tag_size) { - return; - } - new_offset += hash_ptr->u.pkt_obj->tag_size; - hash_ptr->u.pkt_obj->payload_offset = new_offset; - retval = pwrite(fd, hash_ptr->u.pkt_obj->payload, - hash_ptr->u.pkt_obj->paylen, new_offset); - if (retval != hash_ptr->u.pkt_obj->paylen) { - return; - } - new_offset += hash_ptr->u.pkt_obj->paylen; - } -} - -static void -free_packet_object(handle_t handle, hash_obj_t *seg_hash) -{ - hash_obj_t *pkt_hash; - hash_obj_t *next_hash; - - pkt_hash = seg_hash->u.seg_obj->pkt_obj_list; - if (pkt_hash == NULL) { - return; - } - - if (pkt_hash->obj_hdl == handle) { - seg_hash->u.seg_obj->pkt_obj_list = pkt_hash->u.pkt_obj->next; - } else { - while (pkt_hash->obj_hdl != handle) { - next_hash = pkt_hash; - pkt_hash = pkt_hash->u.pkt_obj->next; - if (pkt_hash == NULL) { - return; - } - } - next_hash->u.pkt_obj->next = pkt_hash->u.pkt_obj->next; - } - - if (pkt_hash->prev == NULL) { - hash_table[(pkt_hash->obj_hdl % TABLE_SIZE)] = pkt_hash->next; - if (pkt_hash->next != NULL) { - pkt_hash->next->prev = NULL; - } - } else { - pkt_hash->prev->next = pkt_hash->next; - if (pkt_hash->next != NULL) { - pkt_hash->next->prev = pkt_hash->prev; - } - } - - free(pkt_hash->u.pkt_obj->payload); - free(pkt_hash->u.pkt_obj); - free(pkt_hash); -} - -/* - * Description : - * fru_delete_packet() deletes a packet from a segment. - * - * Arguments : packet_hdl_t : packet number to be deleted. - * segment_hdl_t : new segment handler. - * - * Return : - * int - * On success, 0 is returned; on error, -1. - * - * NOTES - * Packets are adjacent; thus, deleting a packet requires moving - * succeeding packets to compact the resulting hole. - */ - -int -fru_delete_packet(packet_hdl_t packet, segment_hdl_t *newsegment, - door_cred_t *cred) -{ - int retval; - int fd; - char trailer[] = { 0x0c, 0x00, 0x00, 0x00, 0x00}; - uint32_t crc; - hash_obj_t *tmp_obj; - hash_obj_t *pkt_hash; - hash_obj_t *sec_hash; - hash_obj_t *cont_hash; - hash_obj_t *prev_obj; - hash_obj_t *seg_hash; - fru_segdesc_t *desc; - - /* check the effective uid of the client */ - if (cred->dc_euid != 0) { - errno = EPERM; - return (-1); /* not a root */ - } - - /* packet hash object */ - pkt_hash = lookup_handle_object(packet, PACKET_TYPE); - if (pkt_hash == NULL) { - return (-1); - } - - /* segment hash object */ - seg_hash = lookup_handle_object(pkt_hash->u.pkt_obj->segment_hdl, - SEGMENT_TYPE); - if (seg_hash == NULL) { - return (-1); - } - - /* check for write perm. */ - desc = (fru_segdesc_t *)&seg_hash->u.seg_obj->segment.descriptor; - if (!(desc->field.field_perm & SEGMENT_WRITE)) { - errno = EPERM; - return (-1); /* write not allowed */ - } - - /* section hash object */ - sec_hash = lookup_handle_object(seg_hash->u.seg_obj->section_hdl, - SECTION_TYPE); - if (sec_hash == NULL) { - return (-1); - } - - if (sec_hash->u.sec_obj->section.protection == READ_ONLY_SECTION) { - errno = EPERM; - return (-1); /* read-only section */ - } - - prev_obj = seg_hash->u.seg_obj->pkt_obj_list; - if (prev_obj == NULL) { - return (-1); - } - - /* container hash object */ - cont_hash = lookup_handle_object(sec_hash->u.sec_obj->cont_hdl, - CONTAINER_TYPE); - if (cont_hash == NULL) { - return (-1); - } - - fd = open(cont_hash->u.cont_obj->device_pathname, O_RDWR); - if (fd < 0) { - return (-1); - } - - if (prev_obj->obj_hdl == packet) { /* first object to be deleted */ - adjust_packets(fd, prev_obj, prev_obj->u.pkt_obj->next); - seg_hash->u.seg_obj->trailer_offset -= - (prev_obj->u.pkt_obj->tag_size + - prev_obj->u.pkt_obj->paylen); - free_packet_object(packet, seg_hash); - } else { - for (tmp_obj = prev_obj; - tmp_obj != NULL; tmp_obj = tmp_obj->u.pkt_obj->next) { - /* found the object */ - if (tmp_obj->obj_hdl == packet) { - adjust_packets(fd, tmp_obj, - tmp_obj->u.pkt_obj->next); - seg_hash->u.seg_obj->trailer_offset -= - (tmp_obj->u.pkt_obj->tag_size + - tmp_obj->u.pkt_obj->paylen); - free_packet_object(packet, seg_hash); - } - } - } - - seg_hash->u.seg_obj->num_of_packets -= 1; - - /* calculate checksum */ - crc = get_checksum_crc(seg_hash, (seg_hash->u.seg_obj->trailer_offset - - seg_hash->u.seg_obj->segment.offset)); - /* write trailer at new offset */ - retval = pwrite(fd, &trailer, sizeof (trailer), - seg_hash->u.seg_obj->trailer_offset); - if (retval != sizeof (trailer)) { - (void) close(fd); - return (-1); - } - - /* write the checksum value */ - retval = pwrite(fd, &crc, sizeof (crc), - seg_hash->u.seg_obj->trailer_offset + 1); - (void) close(fd); - if (retval != sizeof (crc)) { - return (-1); - } - - *newsegment = seg_hash->obj_hdl; /* return new segment handle */ - return (0); -} - -/* - * Description : - * fru_close_container() removes the association between a - * container and its handle. this routines free's up all the - * hash object contained under container. - * - * Arguments : - * container_hdl_t holds the file descriptor of the fru. - * - * Return : - * int - * return 0. - * - */ - -/* ARGSUSED */ -int -fru_close_container(container_hdl_t container) -{ - hash_obj_t *hash_obj; - hash_obj_t *prev_hash; - hash_obj_t *sec_hash_obj; - handle_t obj_hdl; - - /* lookup for container hash object */ - hash_obj = lookup_handle_object(container, CONTAINER_TYPE); - if (hash_obj == NULL) { - return (0); - } - - /* points to section object list */ - sec_hash_obj = hash_obj->u.cont_obj->sec_obj_list; - - /* traverse section object list */ - while (sec_hash_obj != NULL) { - - /* traverse segment hash object in the section */ - while (sec_hash_obj->u.sec_obj->seg_obj_list != NULL) { - /* object handle of the segment hash object */ - obj_hdl = - sec_hash_obj->u.sec_obj->seg_obj_list->obj_hdl; - free_segment_hash(obj_hdl, sec_hash_obj); - } - - /* going to free section hash object, relink the hash object */ - if (sec_hash_obj->prev == NULL) { - hash_table[(sec_hash_obj->obj_hdl % TABLE_SIZE)] = - sec_hash_obj->next; - if (sec_hash_obj->next != NULL) { - sec_hash_obj->next->prev = NULL; - } - } else { - sec_hash_obj->prev->next = sec_hash_obj->next; - if (sec_hash_obj->next != NULL) { - sec_hash_obj->next->prev = sec_hash_obj->prev; - } - } - - prev_hash = sec_hash_obj; - - sec_hash_obj = sec_hash_obj->u.sec_obj->next; - - free(prev_hash->u.sec_obj); /* free section hash object */ - free(prev_hash); /* free section hash */ - } - - /* free container hash object */ - if (hash_obj->prev == NULL) { - hash_table[(hash_obj->obj_hdl % TABLE_SIZE)] = hash_obj->next; - if (hash_obj->next != NULL) { - hash_obj->next->prev = NULL; - } - } else { - hash_obj->prev->next = hash_obj->next; - if (hash_obj->next != NULL) { - hash_obj->next->prev = hash_obj->prev; - } - } - - free(hash_obj->u.cont_obj); - free(hash_obj); - return (0); -} - -/* - * Description : - * fru_is_data_available() checks to see if the frudata - * is available on a fru. - * - * Arguments : - * picl_nodehdl_t holds the picl node handle of the fru. - * - * Return : - * int - * return 1: if FRUID information is available - * return 0: if FRUID information is not present - * - */ - -/* ARGSUSED */ -int -fru_is_data_available(picl_nodehdl_t fru) -{ - return (0); -} diff --git a/usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/fru_access.h b/usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/fru_access.h deleted file mode 100644 index df60d761a6..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/fru_access.h +++ /dev/null @@ -1,116 +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 _FRU_ACCESS_H -#define _FRU_ACCESS_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - - -#define SEG_NAME_LEN 2 - - -typedef uint64_t fru_hdl_t; - -typedef fru_hdl_t container_hdl_t; -typedef fru_hdl_t section_hdl_t; -typedef fru_hdl_t segment_hdl_t; -typedef fru_hdl_t packet_hdl_t; - -typedef struct -{ - section_hdl_t handle; /* for use in operations on section */ - uint32_t offset; /* bytes from container beginning */ - uint32_t length; /* length of section in bytes */ - uint32_t protection; /* non-zero if section is write-protected */ - int32_t version; /* version of section header, or -1 */ -} -section_t; - -typedef struct -{ - segment_hdl_t handle; /* for operations on segment */ - char name[SEG_NAME_LEN]; /* from container section header */ - uint32_t descriptor; /* ditto */ - uint32_t offset; /* ditto */ - uint32_t length; /* ditto */ -} -segment_t; - -typedef uint64_t tag_t; - -typedef struct -{ - packet_hdl_t handle; /* for use in operations on packet */ - tag_t tag; -} -packet_t; - - -container_hdl_t fru_open_container(picl_nodehdl_t fru); - -int fru_close_container(container_hdl_t container); -int fru_get_num_sections(container_hdl_t container, door_cred_t *cred); -int fru_get_sections(container_hdl_t container, section_t *section, - int max_sections, door_cred_t *cred); -int fru_get_num_segments(section_hdl_t section, door_cred_t *rarg); -int fru_get_segments(section_hdl_t section, segment_t *segment, - int max_segments, door_cred_t *rarg); -int fru_add_segment(section_hdl_t section, segment_t *segment, - section_hdl_t *newsection, door_cred_t *cred); -int fru_delete_segment(segment_hdl_t segment, section_hdl_t *newsection, - door_cred_t *cred); -ssize_t fru_read_segment(segment_hdl_t segment, void *buffer, size_t nbytes, - door_cred_t *cred); -int fru_write_segment(segment_hdl_t segment, const void *data, size_t nbytes, - segment_hdl_t *newsegment, door_cred_t *cred); -int fru_get_num_packets(segment_hdl_t segment, door_cred_t *cred); -int fru_get_packets(segment_hdl_t segment, packet_t *packet, - int max_packets, door_cred_t *cred); -ssize_t fru_get_payload(packet_hdl_t packet, void *buffer, - size_t nbytes, door_cred_t *cred); -int fru_update_payload(packet_hdl_t packet, const void *data, size_t nbytes, - packet_hdl_t *newpacket, door_cred_t *cred); -int fru_append_packet(segment_hdl_t segment, packet_t *packet, - const void *payload, size_t nbytes, segment_hdl_t *newsegment, - door_cred_t *cred); -int fru_delete_packet(packet_hdl_t packet, segment_hdl_t *newsegment, - door_cred_t *cred); -int fru_is_data_available(picl_nodehdl_t fru); - -#ifdef __cplusplus -} -#endif - -#endif /* _FRU_ACCESS_H */ diff --git a/usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/fru_access_impl.h b/usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/fru_access_impl.h deleted file mode 100644 index 50b8b937a3..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/fru_access_impl.h +++ /dev/null @@ -1,210 +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 2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _FRU_ACCESS_IMPL_H -#define _FRU_ACCESS_IMPL_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "fru_access.h" -#include "spd_data.h" - -/* object types */ -typedef enum {CONTAINER_TYPE, SECTION_TYPE, SEGMENT_TYPE, PACKET_TYPE} object_t; - -#define TABLE_SIZE 64 /* hash table size */ - -/* container configuration file name */ -#define FRU_CONTAINER_CONF "fru_container.conf" -#define CONTAINER_DIR "/usr/platform/sun4u/lib" - -/* section header */ -#define SECTION_HDR_TAG 0x08 -#define SECTION_HDR_VER 0x0001 -#define SECTION_HDR_LENGTH 0x06 -#define SECTION_HDR_CRC8 0x00 -#define SECTION_HDR_VER_BIT0 0x00 -#define SECTION_HDR_VER_BIT1 0x01 - -#define READ_ONLY_SECTION 1 /* section is read-only */ - -#define GET_SEGMENT_DESCRIPTOR \ - (seg_layout->descriptor[1]|seg_layout->descriptor[0] << 16) - -#define GET_SECTION_HDR_VERSION \ - (sec_hdr.headerversion[1]|sec_hdr.headerversion[0] << 8) - -/* Segment Trailer Tag */ -#define SEG_TRAILER_TAG 0x0C - -/* defines fixed segment */ -#define SEGMENT_FIXED 1 - -typedef union { - uint32_t all_bits; - struct { - unsigned read_only : 1; - unsigned unused : 8; - unsigned : 8; - unsigned : 8; - unsigned : 7; - } field; -} sectdescbit_t; - -typedef enum { - ENC_STANDARD = 0, /* proper fruid data */ - ENC_SPD /* serial presence detect data */ -} sectencoding_t; - -typedef struct { - sectdescbit_t description; - uint32_t address; /* for SEEPROMS this is the offset */ - uint32_t size; - sectencoding_t encoding; -} sectioninfo_t; - -typedef uint16_t headerrev_t; - -#define MAX_NUMOF_SECTION 2 - -typedef struct { - headerrev_t header_ver; - int num_sections; - sectioninfo_t section_info[MAX_NUMOF_SECTION]; -} container_info_t; - - -/* section header layout */ -typedef struct { - uint8_t headertag; /* section header tag */ - uint8_t headerversion[2]; /* header version (msb) */ - uint8_t headerlength; /* header length */ - uint8_t headercrc8; /* crc8 */ - uint8_t segmentcount; /* total number of segment */ -} section_layout_t; - -/* segment header layout */ -typedef struct { - uint16_t name; /* segment name */ - uint16_t descriptor[2]; /* descriptor (msb) */ - uint16_t offset; /* segment data offset */ - uint16_t length; /* segment length */ -} segment_layout_t; - -/* segment information used in finding new offset for a new segment */ -typedef struct { - int segnum; /* segment number */ - int offset; /* segment offset */ - int length; /* segment length */ - int fixed; /* fixed or non-fixed segment */ -} seg_info_t; - -typedef uint64_t handle_t; - -struct hash_obj; - -/* packet hash object */ -typedef struct { - handle_t segment_hdl; /* segment handle */ - fru_tag_t tag; - int tag_size; - uint8_t *payload; - uint32_t paylen; - uint32_t payload_offset; - struct hash_obj *next; -} packet_obj_t; - -/* segment hash object */ -typedef struct { - handle_t section_hdl; /* section handle */ - int num_of_packets; /* in a segment */ - int trailer_offset; - segment_t segment; - struct hash_obj *pkt_obj_list; /* packet object list */ - struct hash_obj *next; -} segment_obj_t; - -/* section hash object */ -typedef struct { - handle_t cont_hdl; /* container handle */ - section_t section; - sectencoding_t encoding; /* standard or needing interpretation */ - int num_of_segment; /* in a section */ - struct hash_obj *seg_obj_list; /* points to segment objects list */ - struct hash_obj *next; -} section_obj_t; - -/* container hash object */ -typedef struct { - char device_pathname[PATH_MAX]; /* device name */ - int num_of_section; /* num of section in container */ - struct hash_obj *sec_obj_list; /* points to section objects list */ -} container_obj_t; - -/* hash object */ -typedef struct hash_obj { - int object_type; - handle_t obj_hdl; - union { - container_obj_t *cont_obj; - section_obj_t *sec_obj; - segment_obj_t *seg_obj; - packet_obj_t *pkt_obj; - } u; - struct hash_obj *next; - struct hash_obj *prev; -} hash_obj_t; - -unsigned char compute_crc8(unsigned char *bytes, int length); -long compute_crc32(unsigned char *bytes, int length); -long compute_checksum32(unsigned char *bytes, int length); - -#ifdef __cplusplus -} -#endif - -#endif /* _FRU_ACCESS_IMPL_H */ diff --git a/usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/fru_container.conf b/usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/fru_container.conf deleted file mode 100644 index dc3e9124b3..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/fru_container.conf +++ /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 (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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" -# - -# Cut-off read-only section -6krw1792ro|8k_6krw1792ro_SEEPROM:1:0,0,6144:1,6144,1792 - -# Standard SEEPROM -i2c-at24c64|6krw2kro|8k_6krw2kro_SEEPROM:1:0,0,6144:1,6144,2048 - -# 2KB read-only device (e.g., subset of PCI VPD) -2kro:1:1,0,2048 - -# 256 bytes read/write section. -i2c-at34cps|256rw:1:0,0,256 - -# Available section of device used in commodity FRUs -i2c-at34c02|128rwDDR1:1:2,0,146,SPD:0,128,128 - -i2c-at34c02|128rw128ro:1:0,0,128:1,128,128 - -# 2155x bridge based product using 93LC66 serial prom VPD. -93LC66|392rw:1:0,0,392 - -# Implement Sun SPD JEDEC DIMM Spec. -# DDR2 DIMM -128rwDDR2:1:2,0,128,SPD:3,128,128 - -#ipmi image -ipmi:0:0,0,512 - diff --git a/usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/spd_data.h b/usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/spd_data.h deleted file mode 100644 index 5d6041cac3..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/lib/fruaccess/spd_data.h +++ /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 2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _SPD_DATA_H -#define _SPD_DATA_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include - -size_t get_sp_sec_hdr(void *sec_hdr, size_t sec_hdr_len); -size_t get_sp_seg_hdr(void *seg_hdr, size_t seg_hdr_len); -int get_spd_data(int fd, char *spd_data, size_t ctr_len, off_t ctr_offset); -int cvrt_dim_data(const char *spd_data, size_t spd_data_len, - uchar_t **sp_seg_ptr, size_t *sp_seg_len); - -enum spd_memtype { - SPDMEM_RESERVED = 0, - SPDMEM_FPM_DRAM, - SPDMEM_EDO, - SPDMEM_PIPE, - SPDMEM_SDRAM, - SPDMEM_ROM, - SPDMEM_SGRAM_DDR, - SPDMEM_SDRAM_DDR, - SPDMEM_DDR2_SDRAM -}; - -typedef struct { - uchar_t spd_len; /* bytes written by manufacturer */ - uchar_t spd_max_len; /* total available prom space */ - uchar_t memory_type; /* e.g. SDRAM DDR = 0x07 */ - uchar_t n_rows; /* row address bits */ - uchar_t n_cols; /* column address bits */ - uchar_t n_mod_rows; /* number of module rows */ - uchar_t ls_data_width; /* e.g. 72 bits */ - uchar_t ms_data_width; - uchar_t vddq_if; /* e.g. SSTL 2.5V = 0x04 */ - uchar_t cycle_time25; /* cycle time at CAS latency 2.5 */ - uchar_t access_time25; - uchar_t config; /* e.g. ECC = 0x02 */ - uchar_t refresh; /* e.g. 7.8uS & self refresh = 0x82 */ - uchar_t primary_width; - uchar_t err_chk_width; - uchar_t tCCD; - uchar_t burst_lengths; /* e.g. 2,4,8 = 0x0e */ - uchar_t n_banks; - uchar_t cas_lat; - uchar_t cs_lat; - uchar_t we_lat; - uchar_t mod_attrs; - uchar_t dev_attrs; - uchar_t cycle_time20; /* cycle time at CAS latency 2.0 */ - uchar_t access_time20; - uchar_t cycle_time15; - uchar_t access_time15; - uchar_t tRP; - uchar_t tRRD; - uchar_t tRCD; - uchar_t tRAS; - uchar_t mod_row_density; - uchar_t addr_ip_setup; - uchar_t addr_ip_hold; - uchar_t data_ip_setup; - uchar_t data_ip_hold; - uchar_t superset[62 - 36]; - uchar_t spd_rev; - uchar_t chksum_0_62; - uchar_t jedec[8]; - uchar_t manu_loc; - uchar_t manu_part_no[91 - 73]; - uchar_t manu_rev_pcb; - uchar_t manu_rev_comp; - uchar_t manu_year; - uchar_t manu_week; - uchar_t asmb_serial_no[4]; - uchar_t manu_specific[128 - 99]; -} spd_data_t; - -/* - * sample section and SP segment headers - */ -#define SP_SEC_HDR \ - { 0x08, 0x00, 0x01, 0x00, 0x33, 0x01 } - -#define SP_SEG_HDR \ - { 'S', 'P', 0x00, 0x00, 0x41, 0xb6, 0x00, 0x00, 0x00, 0x8d } - -/* - * sample SP segment - */ -#define SP_DATA { \ - 0xc1, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0xf0, 0x00, 0xfb, 0x00, 0x00, 0x00, \ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x0c, 0x00, 0x00, 0x00, 0x00 } - -/* - * offsets of records in SP_DATA - */ -#define DIMM_CAP_OFF 2 -#define SPD_R_OFF 13 - -/* - * offsets of certain fields within SPD-R record - */ -#define DATA_WIDTH 6 -#define MANUF_ID 64 -#define MANUF_LOC 66 -#define MANUF_YEAR 87 -#define MANUF_WEEK 89 -/* length of complete SPD-R record */ -#define SPD_R_LEN 123 - -#ifdef __cplusplus -} -#endif - -#endif /* _SPD_DATA_H */ diff --git a/usr/src/cmd/picl/plugins/sun4u/littleneck/Makefile b/usr/src/cmd/picl/plugins/sun4u/littleneck/Makefile deleted file mode 100644 index 2d25ba31f2..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/littleneck/Makefile +++ /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, 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 -# -# -#ident "%Z%%M% %I% %E% SMI" -# -# Copyright (c) 1999-2001 by Sun Microsystems, Inc. -# All rights reserved. -# -# cmd/picl/plugins/sun4u/littleneck/Makefile -# - -SUBDIRS= devtree frudata frutree psvcplugin psvcpolicy conf .WAIT - -MSGSUBDIRS= frutree psvcplugin psvcpolicy - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -.KEEP_STATE: - -all install clean clobber: $(SUBDIRS) - -_msg: $(MSGSUBDIRS) - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/littleneck/conf/Makefile b/usr/src/cmd/picl/plugins/sun4u/littleneck/conf/Makefile deleted file mode 100644 index d790389a35..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/littleneck/conf/Makefile +++ /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, 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 -# -# -#ident "%Z%%M% %I% %E% SMI" -# -# Copyright (c) 1999-2000 by Sun Microsystems, Inc. -# All rights reserved. -# -# cmd/picl/plugins/sun4u/littleneck/conf/Makefile -# - -OBJECTS= - -# include library definitions -include $(SRC)/lib/Makefile.lib -include $(SRC)/Makefile.psm - -include $(SRC)/cmd/picl/plugins/Makefile.com - -UTSBASE= $(SRC)/uts - -PLATFORM=SUNW,Sun-Fire-280R -install := FILEMODE = 0444 - -CONF= platsvcd.conf psvcobj.conf -ROOTCONF= $(CONF:%=$(USR_PSM_LIB_DIR)/%) - -SRCS= - -LIBS = $(DYNLIB) - -ZDEFS = - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: - -install: $(ROOTCONF) - -$(USR_PSM_LIB_DIR): - @cd $(UTSBASE)/sun4u/littleneck; pwd; $(MAKE) $(USR_PSM_LIB_DIR) - -# include library targets -include $(SRC)/cmd/picl/plugins/Makefile.targ -include $(SRC)/lib/Makefile.targ - -$(USR_PSM_LIB_DIR)/%: % $(USR_PSM_LIB_DIR) - $(INS.file) - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/littleneck/conf/platsvcd.conf b/usr/src/cmd/picl/plugins/sun4u/littleneck/conf/platsvcd.conf deleted file mode 100644 index 0fde5ae028..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/littleneck/conf/platsvcd.conf +++ /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, 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 (c) 2000-2001 by Sun Microsystems, Inc. - * All rights reserved. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - - -/* - * Littleneck platsvcd.conf - */ - -/* - * Format: - * - * TIMEOUT - * Specifies a maximum interval in seconds that an application - * is allowed to lock out the platform services daemon - * - * INTERVAL <#tasks at this interval> - * INTERVAL_END - * Indicates the poll interval at which a list of tasks will be run - * - * TASK - * - * Object string ID of first object - * Object string ID of second object - * Object string ID of nth object - * TASK_END - * Specifies the "task" or policy routine, the shared object file it - * resides in, and the object IDs of objects it must be called for - */ - -TIMEOUT 180 - -INTERVAL 0 3 -TASK /usr/platform/SUNW,Sun-Fire-280R/lib/libpsvcpolicy_psr.so.1 psvc_init_led_policy_0 -1 -SYSTEM_FAULT_LED_WR -TASK_END -TASK /usr/platform/sun4u/lib/libpsvcpolicy.so.1 psvc_init_state_policy_0 -5 -PS0 -PS1 -FAN -DISK0 -DISK1 -TASK_END -TASK /usr/platform/SUNW,Sun-Fire-280R/lib/libpsvcpolicy_psr.so.1 psvc_update_thresholds_0 -2 -CPU0_DIE_TEMPERATURE_SENSOR -CPU1_DIE_TEMPERATURE_SENSOR -TASK_END -INTERVAL_END - -INTERVAL 30 1 -TASK /usr/platform/SUNW,Sun-Fire-280R/lib/libpsvcpolicy_psr.so.1 psvc_device_fail_notifier_policy_0 -5 -PS0 -PS1 -FAN -DISK0 -DISK1 -TASK_END -INTERVAL_END - -INTERVAL 10 2 -TASK /usr/platform/SUNW,Sun-Fire-280R/lib/libpsvcpolicy_psr.so.1 psvc_check_temperature_policy_0 -2 -CPU0_DIE_TEMPERATURE_SENSOR -CPU1_DIE_TEMPERATURE_SENSOR -TASK_END -TASK /usr/platform/SUNW,Sun-Fire-280R/lib/libpsvcpolicy_psr.so.1 psvc_shutdown_policy_0 -1 -SYSTEM -TASK_END -INTERVAL_END - -INTERVAL 15 2 -TASK /usr/platform/sun4u/lib/libpsvcpolicy.so.1 psvc_hotplug_notifier_policy_0 -2 -DISK0 -DISK1 -TASK_END -TASK /usr/platform/SUNW,Sun-Fire-280R/lib/libpsvcpolicy_psr.so.1 psvc_ps_hotplug_policy_0 -2 -PS0 -PS1 -TASK_END -INTERVAL_END - -INTERVAL 15 1 -TASK /usr/platform/sun4u/lib/libpsvcpolicy.so.1 psvc_keyswitch_position_policy_0 -1 -KEYSWITCH -TASK_END -INTERVAL_END - - diff --git a/usr/src/cmd/picl/plugins/sun4u/littleneck/conf/psvcobj.conf b/usr/src/cmd/picl/plugins/sun4u/littleneck/conf/psvcobj.conf deleted file mode 100644 index 042f201954..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/littleneck/conf/psvcobj.conf +++ /dev/null @@ -1,331 +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 (c) 1999-2002 by Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - - -/* - * Littleneck psvcobj.conf - */ - -/* - * Format : - * - * OBJECT_INFO - * ... - * ... - * ... - * OBJECT_INFO_END - * This section specifies the static property information for each - * defined object. Each property in the property list is preceded by - * an identifying property label, such as, "_class=". The "label" - * property is the first string on each line. The features and address - * specification properties are built from those fields within these - * properties that are present on each line. - * - * ASSOCIATIONS - * ASSOCIATION - * - * ... (more association pairs) - * ASSOCIATION_END - * ... (more ASSOCIATION sections) - * ASSOCIATIONS_END - * Lists association pairs for each association type to show relationships - * between objects - * - * DEVPATHS - * - * ... (more entries) - * DEVPATHS_END - * Lists the device paths and the matching (controller, bus, addr, port) - * - * TABLES - * TABLE - * - * ... - * TABLE_END - * TABLES_END - * Lists the tables used by the framework - * - * PROJECTED_PROPERTIES - * - * PROJECTED_PROPETIES_END - * Used to specify projected properties to be cerated in PICL nodes - * - */ - -OBJECT_INFO -/SYSTEM _class=3,Subclass=0,Instance=0,PERM=1,FRU=1 -/SYSTEM/CPU0_MOD_CARD _class=3,Subclass=0,Instance=0,OPTION=1,FRU=1 -/SYSTEM/CPU1_MOD_CARD _class=3,Subclass=0,Instance=1,OPTION=1,FRU=1 -/SYSTEM/PS0 _class=3,Subclass=0,Instance=0,HOTPLUG=1,FRU=1 -/SYSTEM/PS1 _class=3,Subclass=0,Instance=1,HOTPLUG=1,FRU=1 -/SYSTEM/PS0_PR_SENSOR _class=6,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=5,BUSADDR=0x72,BUSNUM=0,CNTLR=1 -/SYSTEM/PS1_PR_SENSOR _class=6,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=1,INVERT=1,PORT=0,BITSHIFT=1,BYTEMASK=0x2,REG=0,TYPE=5,BUSADDR=0x72,BUSNUM=0,CNTLR=1 -/SYSTEM/PS0_FAULT_SENSOR _class=8,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=2,INVERT=0,PORT=0,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=5,BUSADDR=0x72,BUSNUM=0,CNTLR=1 -/SYSTEM/PS1_FAULT_SENSOR _class=8,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=3,INVERT=0,PORT=0,BITSHIFT=3,BYTEMASK=0x8,REG=0,TYPE=5,BUSADDR=0x72,BUSNUM=0,CNTLR=1 -/SYSTEM/PS0_TYPE_SENSOR _class=6,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=5,INVERT=0,PORT=0,BITSHIFT=5,BYTEMASK=0x20,REG=0,TYPE=5,BUSADDR=0x72,BUSNUM=0,CNTLR=1 -/SYSTEM/PS1_TYPE_SENSOR _class=6,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=6,INVERT=0,PORT=0,BITSHIFT=6,BYTEMASK=0x40,REG=0,TYPE=5,BUSADDR=0x72,BUSNUM=0,CNTLR=1 -/SYSTEM/FAN _class=3,Subclass=0,Instance=0,PERM=1,FRU=1 -/SYSTEM/FAN_FAULT_SENSOR _class=8,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=7,INVERT=0,PORT=0,BITSHIFT=7,BYTEMASK=0x80,REG=0,TYPE=5,BUSADDR=0x72,BUSNUM=0,CNTLR=1 -/SYSTEM/SYSTEM_FAULT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=4,INVERT=0,PORT=0,BITSHIFT=4,BYTEMASK=0x10,REG=0,TYPE=5,BUSADDR=0x7c,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/SYSTEM_FAULT_LED_WR _class=10,Subclass=1,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=4,INVERT=0,PORT=0,BITSHIFT=4,BYTEMASK=0x10,REG=0,TYPE=5,BUSADDR=0x7c,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK0 _class=3,Subclass=0,Instance=0,HOTPLUG=1,FRU=1 -/SYSTEM/DISK1 _class=3,Subclass=0,Instance=1,HOTPLUG=1,FRU=1 -/SYSTEM/DISK0_PR_SENSOR _class=6,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=5,BUSADDR=0x7a,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK1_PR_SENSOR _class=6,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=1,INVERT=1,PORT=0,BITSHIFT=1,BYTEMASK=0x2,REG=0,TYPE=5,BUSADDR=0x7a,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK0_FAULT_SENSOR _class=8,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=4,INVERT=0,PORT=0,BITSHIFT=4,BYTEMASK=0x10,REG=0,TYPE=5,BUSADDR=0x7a,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK1_FAULT_SENSOR _class=8,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=5,INVERT=0,PORT=0,BITSHIFT=5,BYTEMASK=0x20,REG=0,TYPE=5,BUSADDR=0x7a,BUSNUM=0,CNTLR=1 -/SYSTEM/KEYSWITCH _class=9,Subclass=0,Instance=0,BIT_POS=1,NORMAL_POS_AV=1,DIAG_POS_AV=1,LOCK_POS_AV=1,OFF_POS_AV,PERM=1 -/SYSTEM/FSP_KS_NORMAL_POS_SENSOR _class=8,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=6,INVERT=0,PORT=0,BITSHIFT=6,BYTEMASK=0x40,REG=0,TYPE=5,BUSADDR=0x7c,BUSNUM=0,CNTLR=1 -/SYSTEM/FSP_KS_DIAG_POS_SENSOR _class=8,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=2,INVERT=0,PORT=0,BITSHIFT=2,BYTEMASK=0x04,REG=0,TYPE=5,BUSADDR=0x7c,BUSNUM=0,CNTLR=1 -/SYSTEM/FSP_KS_LOCK_POS_SENSOR _class=8,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=5,INVERT=0,PORT=0,BITSHIFT=5,BYTEMASK=0x20,REG=0,TYPE=5,BUSADDR=0x7c,BUSNUM=0,CNTLR=1 -/SYSTEM/FSP_KS_OFF_POS_SENSOR _class=8,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=7,INVERT=0,PORT=0,BITSHIFT=7,BYTEMASK=0x80,REG=0,TYPE=5,BUSADDR=0x7c,BUSNUM=0,CNTLR=1 -/SYSTEM/AT24C64_A0_0 _class=11,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa0,BUSNUM=0,CNTLR=0 -/SYSTEM/AT24C64_A0_1 _class=11,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa0,BUSNUM=1,CNTLR=0 -/SYSTEM/AT24C64_A2_1 _class=11,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa2,BUSNUM=1,CNTLR=0 -/SYSTEM/AT24C64_A4_1 _class=11,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa4,BUSNUM=1,CNTLR=0 -/SYSTEM/AT24C64_A6_1 _class=11,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa6,BUSNUM=1,CNTLR=0 -/SYSTEM/AT24C64_A8_1 _class=11,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa8,BUSNUM=1,CNTLR=0 -/SYSTEM/AT24C64_AA_1 _class=11,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xaa,BUSNUM=1,CNTLR=0 -/SYSTEM/AT24C64_AC_1 _class=11,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xac,BUSNUM=1,CNTLR=0 -/SYSTEM/AT24C64_AE_1 _class=11,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xae,BUSNUM=1,CNTLR=0 -/SYSTEM/AT24C64_A4_5 _class=11,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa4,BUSNUM=0,CNTLR=1 -/SYSTEM/AT24C64_A6_5 _class=11,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa6,BUSNUM=0,CNTLR=1 -/SYSTEM/AT24C64_A8_5 _class=11,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa8,BUSNUM=0,CNTLR=1 -/SYSTEM/AT24C64_AA_5 _class=11,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xaa,BUSNUM=0,CNTLR=1 -/SYSTEM/PCF8574A_72_5 _class=11,Subclass=5,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=5,BUSADDR=0x72,BUSNUM=0,CNTLR=1 -/SYSTEM/PCF8574A_7C_5 _class=11,Subclass=5,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=5,BUSADDR=0x7c,BUSNUM=0,CNTLR=1 -/SYSTEM/PCF8574A_7A_5 _class=11,Subclass=5,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=5,BUSADDR=0x7a,BUSNUM=0,CNTLR=1 -/SYSTEM/CPU0_MOD_CARD/CPU0_DIE_TEMPERATURE_SENSOR _class=0,Subclass=1,Instance=0,DIE_TEMP=1,RDWR=1,FRU=1,LO_WARN_MASK=1,LO_SHUT_MASK=1,HI_WARN_MASK=1,HI_SHUT_MASK=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=4,BUSADDR=0x30,BUSNUM=0,CNTLR=1,Lo-warn=-10,Lo-shut=-15,Hi-warn=88,Hi-shut=90,Opt-temp=70,Hw-hi-shut=110,Hw-lo-shut=-25 -/SYSTEM/CPU1_MOD_CARD/CPU1_DIE_TEMPERATURE_SENSOR _class=0,Subclass=1,Instance=0,DIE_TEMP=1,RDWR=1,FRU=1,LO_WARN_MASK=1,LO_SHUT_MASK=1,HI_WARN_MASK=1,HI_SHUT_MASK=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=4,BUSADDR=0x98,BUSNUM=0,CNTLR=1,Lo-warn=-10,Lo-shut=-15,Hi-warn=88,Hi-shut=90,Opt-temp=70,Hw-hi-shut=110,Hw-lo-shut=-25 -/SYSTEM/CPU0_MOD_CARD/AT24C64_A0_5 _class=11,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa0,BUSNUM=0,CNTLR=1 -/SYSTEM/CPU1_MOD_CARD/AT24C64_A2_5 _class=11,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa2,BUSNUM=0,CNTLR=1 -/SYSTEM/PS0/AT24C64_AC_5 _class=11,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xac,BUSNUM=0,CNTLR=1 -/SYSTEM/PS1/AT24C64_AE_5 _class=11,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xae,BUSNUM=0,CNTLR=1 -/SYSTEM/CPU0_MOD_CARD/MAX1617_30_5 _class=11,Subclass=4,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=4,BUSADDR=0x30,BUSNUM=0,CNTLR=1 -/SYSTEM/CPU1_MOD_CARD/MAX1617_98_5 _class=11,Subclass=4,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=4,BUSADDR=0x98,BUSNUM=0,CNTLR=1 -OBJECT_INFO_END - -ASSOCIATIONS -ASSOCIATION PSVC_PRESENCE_SENSOR -PS0 PS0_PR_SENSOR -PS1 PS1_PR_SENSOR -DISK0 DISK0_PR_SENSOR -DISK1 DISK1_PR_SENSOR -ASSOCIATION_END -ASSOCIATION PSVC_TS_OVERTEMP_LED -CPU0_DIE_TEMPERATURE_SENSOR SYSTEM_FAULT_LED -CPU1_DIE_TEMPERATURE_SENSOR SYSTEM_FAULT_LED -ASSOCIATION_END -ASSOCIATION PSVC_DEV_FAULT_LED -PS0_TYPE_SENSOR SYSTEM_FAULT_LED -PS1_TYPE_SENSOR SYSTEM_FAULT_LED -ASSOCIATION_END -ASSOCIATION PSVC_DEV_FAULT_SENSOR -PS0 PS0_FAULT_SENSOR -PS1 PS1_FAULT_SENSOR -DISK0 DISK0_FAULT_SENSOR -DISK1 DISK1_FAULT_SENSOR -FAN FAN_FAULT_SENSOR -ASSOCIATION_END -ASSOCIATION PSVC_DEV_TYPE_SENSOR -PS0 PS0_TYPE_SENSOR -PS1 PS1_TYPE_SENSOR -ASSOCIATION_END -ASSOCIATION PSVC_KS_NORMAL_POS_SENSOR -KEYSWITCH FSP_KS_NORMAL_POS_SENSOR -ASSOCIATION_END -ASSOCIATION PSVC_KS_DIAG_POS_SENSOR -KEYSWITCH FSP_KS_DIAG_POS_SENSOR -ASSOCIATION_END -ASSOCIATION PSVC_KS_LOCK_POS_SENSOR -KEYSWITCH FSP_KS_LOCK_POS_SENSOR -ASSOCIATION_END -ASSOCIATION PSVC_KS_OFF_POS_SENSOR -KEYSWITCH FSP_KS_OFF_POS_SENSOR -ASSOCIATION_END -ASSOCIATION PSVC_PARENT -CPU0_MOD_CARD SYSTEM -CPU1_MOD_CARD SYSTEM -CPU0_DIE_TEMPERATURE_SENSOR CPU0_MOD_CARD -CPU1_DIE_TEMPERATURE_SENSOR CPU1_MOD_CARD -PS0 SYSTEM -PS1 SYSTEM -PS0_PR_SENSOR SYSTEM -PS1_PR_SENSOR SYSTEM -PS0_FAULT_SENSOR SYSTEM -PS1_FAULT_SENSOR SYSTEM -PS0_TYPE_SENSOR SYSTEM -PS1_TYPE_SENSOR SYSTEM -FAN SYSTEM -FAN_FAULT_SENSOR SYSTEM -SYSTEM_FAULT_LED SYSTEM -SYSTEM_FAULT_LED_WR SYSTEM -DISK0 SYSTEM -DISK1 SYSTEM -DISK0_PR_SENSOR SYSTEM -DISK1_PR_SENSOR SYSTEM -DISK0_FAULT_SENSOR SYSTEM -DISK1_FAULT_SENSOR SYSTEM -KEYSWITCH SYSTEM -FSP_KS_NORMAL_POS_SENSOR SYSTEM -FSP_KS_DIAG_POS_SENSOR SYSTEM -FSP_KS_LOCK_POS_SENSOR SYSTEM -FSP_KS_OFF_POS_SENSOR SYSTEM -AT24C64_A0_0 SYSTEM -AT24C64_A0_1 SYSTEM -AT24C64_A2_1 SYSTEM -AT24C64_A4_1 SYSTEM -AT24C64_A6_1 SYSTEM -AT24C64_A8_1 SYSTEM -AT24C64_AA_1 SYSTEM -AT24C64_AC_1 SYSTEM -AT24C64_AE_1 SYSTEM -AT24C64_A0_5 CPU0_MOD_CARD -AT24C64_A2_5 CPU1_MOD_CARD -AT24C64_A4_5 SYSTEM -AT24C64_A6_5 SYSTEM -AT24C64_A8_5 SYSTEM -AT24C64_AA_5 SYSTEM -AT24C64_AC_5 PS0 -AT24C64_AE_5 PS1 -MAX1617_30_5 CPU0_MOD_CARD -MAX1617_98_5 CPU1_MOD_CARD -PCF8574A_72_5 SYSTEM -PCF8574A_7C_5 SYSTEM -PCF8574A_7A_5 SYSTEM -ASSOCIATION_END -ASSOCIATION PSVC_PHYSICAL_DEVICE -CPU0_DIE_TEMPERATURE_SENSOR MAX1617_30_5 -CPU1_DIE_TEMPERATURE_SENSOR MAX1617_98_5 -PS0_PR_SENSOR PCF8574A_72_5 -PS1_PR_SENSOR PCF8574A_72_5 -SYSTEM_FAULT_LED PCF8574A_72_5 -SYSTEM_FAULT_LED_WR PCF8574A_72_5 -PS0_FAULT_SENSOR PCF8574A_72_5 -PS1_FAULT_SENSOR PCF8574A_72_5 -PS0_TYPE_SENSOR PCF8574A_72_5 -PS1_TYPE_SENSOR PCF8574A_72_5 -FAN_FAULT_SENSOR PCF8574A_7C_5 -DISK0_PR_SENSOR PCF8574A_7A_5 -DISK1_PR_SENSOR PCF8574A_7A_5 -DISK0_FAULT_SENSOR PCF8574A_7A_5 -DISK1_FAULT_SENSOR PCF8574A_7A_5 -FSP_KS_NORMAL_POS_SENSOR PCF8574A_7C_5 -FSP_KS_DIAG_POS_SENSOR PCF8574A_7C_5 -FSP_KS_LOCK_POS_SENSOR PCF8574A_7C_5 -FSP_KS_OFF_POS_SENSOR PCF8574A_7C_5 -SYSTEM AT24C64_A0_0 -SYSTEM AT24C64_A0_1 -SYSTEM AT24C64_A2_1 -SYSTEM AT24C64_A4_1 -SYSTEM AT24C64_A6_1 -SYSTEM AT24C64_A8_1 -SYSTEM AT24C64_AA_1 -SYSTEM AT24C64_AC_1 -SYSTEM AT24C64_AE_1 -SYSTEM AT24C64_A0_5 -SYSTEM AT24C64_A2_5 -SYSTEM AT24C64_A4_5 -SYSTEM AT24C64_A6_5 -SYSTEM AT24C64_A8_5 -SYSTEM AT24C64_AA_5 -SYSTEM AT24C64_AC_5 -SYSTEM AT24C64_AE_5 -SYSTEM MAX1617_30_5 -SYSTEM MAX1617_98_5 -SYSTEM PCF8574A_72_5 -SYSTEM PCF8574A_7C_5 -SYSTEM PCF8574A_7A_5 -ASSOCIATION_END -ASSOCIATION PSVC_CPU -SYSTEM CPU0_MOD_CARD -SYSTEM CPU1_MOD_CARD -ASSOCIATION_END -ASSOCIATION PSVC_PS -SYSTEM PS0 -SYSTEM PS1 -ASSOCIATION_END -ASSOCIATION PSVC_FAN -SYSTEM FAN -ASSOCIATION_END -ASSOCIATION PSVC_TS -SYSTEM CPU0_DIE_TEMPERATURE_SENSOR -SYSTEM CPU1_DIE_TEMPERATURE_SENSOR -ASSOCIATION_END -ASSOCIATION PSVC_DISK -SYSTEM DISK0 -SYSTEM DISK1 -ASSOCIATION_END -ASSOCIATION PSVC_LED -SYSTEM SYSTEM_FAULT_LED -ASSOCIATION_END -ASSOCIATION PSVC_KEYSWITCH -SYSTEM KEYSWITCH -ASSOCIATION_END -ASSOCIATION PSVC_FSP_LED -SYSTEM SYSTEM_FAULT_LED -ASSOCIATION_END -ASSOCIATION PSVC_DEV_TEMP_SENSOR -CPU0_MOD_CARD CPU0_DIE_TEMPERATURE_SENSOR -CPU1_MOD_CARD CPU1_DIE_TEMPERATURE_SENSOR -ASSOCIATION_END -ASSOCIATION PSVC_FRU -CPU0_DIE_TEMPERATURE_SENSOR AT24C64_A0_5 -CPU1_DIE_TEMPERATURE_SENSOR AT24C64_A2_5 -ASSOCIATION_END -ASSOCIATIONS_END - -DEVPATHS -0 0 0xA0 0 /devices/pci@8,700000/ebus@5/i2c@1,2e/nvram@0,a0:nvram -0 1 0xA0 0 /devices/pci@8,700000/ebus@5/i2c@1,2e/dimm-fru@1,a0:dimm-fru -0 1 0xA2 0 /devices/pci@8,700000/ebus@5/i2c@1,2e/dimm-fru@1,a2:dimm-fru -0 1 0xA4 0 /devices/pci@8,700000/ebus@5/i2c@1,2e/dimm-fru@1,a4:dimm-fru -0 1 0xA6 0 /devices/pci@8,700000/ebus@5/i2c@1,2e/dimm-fru@1,a6:dimm-fru -0 1 0xA8 0 /devices/pci@8,700000/ebus@5/i2c@1,2e/dimm-fru@1,a8:dimm-fru -0 1 0xAA 0 /devices/pci@8,700000/ebus@5/i2c@1,2e/dimm-fru@1,aa:dimm-fru -0 1 0xAC 0 /devices/pci@8,700000/ebus@5/i2c@1,2e/dimm-fru@1,ac:dimm-fru -0 1 0xAE 0 /devices/pci@8,700000/ebus@5/i2c@1,2e/dimm-fru@1,ae:dimm-fru -1 0 0xA0 0 /devices/pci@8,700000/ebus@5/i2c@1,30/cpu-fru@0,a0:cpu-fru -1 0 0xA2 0 /devices/pci@8,700000/ebus@5/i2c@1,30/cpu-fru@0,a2:cpu-fru -1 0 0xA4 0 /devices/pci@8,700000/ebus@5/i2c@1,30/fcal-backplane@0,a4:fcal-backplane -1 0 0xA6 0 /devices/pci@8,700000/ebus@5/i2c@1,30/remote-system-console@0,a6:remote-system-console -1 0 0xA8 0 /devices/pci@8,700000/ebus@5/i2c@1,30/motherboard-fru@0,a8:motherboard-fru -1 0 0xAA 0 /devices/pci@8,700000/ebus@5/i2c@1,30/power-distribution-board@0,aa:power-distribution-board -1 0 0xAC 0 /devices/pci@8,700000/ebus@5/i2c@1,30/power-supply@0,ac:power-supply -1 0 0xAE 0 /devices/pci@8,700000/ebus@5/i2c@1,30/power-supply@0,ae:power-supply -1 0 0x30 1 /devices/pci@8,700000/ebus@5/i2c@1,30/temperature@0,30:die_temp -1 0 0x72 0 /devices/pci@8,700000/ebus@5/i2c@1,30/ioexp@0,72:pcf8574 -1 0 0x7A 0 /devices/pci@8,700000/ebus@5/i2c@1,30/ioexp@0,7a:pcf8574 -1 0 0x7C 0 /devices/pci@8,700000/ebus@5/i2c@1,30/ioexp@0,7c:pcf8574 -1 0 0x98 1 /devices/pci@8,700000/ebus@5/i2c@1,30/temperature@0,98:die_temp -DEVPATHS_END - -PROJECTED_PROPERTIES -CPU0_MOD_CARD Temperature CPU0_DIE_TEMPERATURE_SENSOR Temperature -CPU1_MOD_CARD Temperature CPU1_DIE_TEMPERATURE_SENSOR Temperature -PROJECTED_PROPERTIES_END diff --git a/usr/src/cmd/picl/plugins/sun4u/littleneck/devtree/Makefile b/usr/src/cmd/picl/plugins/sun4u/littleneck/devtree/Makefile deleted file mode 100644 index 261414a520..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/littleneck/devtree/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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. -# -# lib/picl/plugins/littleneck/devtree/Makefile -# -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-280R - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -install := FILEMODE = 0444 - -CONF= picldevtree.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: - -install: $(ROOTLIBDIR) $(ROOTCONF) - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/littleneck/devtree/picldevtree.conf b/usr/src/cmd/picl/plugins/sun4u/littleneck/devtree/picldevtree.conf deleted file mode 100644 index 07546e763a..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/littleneck/devtree/picldevtree.conf +++ /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 (c) 1999-2000 by Sun Microsystems, Inc. -# All rights reserved. -# -#ident "%Z%%M% %I% %E% SMI" -# -# Platform specific .conf file for picldevtree plug-in -power-distribution-board seeprom -power-supply seeprom -fcal-backplane seeprom -remote-system-console seeprom diff --git a/usr/src/cmd/picl/plugins/sun4u/littleneck/frudata/Makefile b/usr/src/cmd/picl/plugins/sun4u/littleneck/frudata/Makefile deleted file mode 100644 index d2a799c435..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/littleneck/frudata/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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# cmd/picl/plugins/sun4u/littleneck/frudata/Makefile -# -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-280R - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONF= libpiclfrudata.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 - - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: $(CONF) - -install: $(ROOTLIBDIR) $(ROOTCONF) - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/littleneck/frudata/libpiclfrudata.conf b/usr/src/cmd/picl/plugins/sun4u/littleneck/frudata/libpiclfrudata.conf deleted file mode 100644 index 7ab9810579..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/littleneck/frudata/libpiclfrudata.conf +++ /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, 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 (c) 2000-2001 by Sun Microsystems, Inc. -# All rights reserved. -# -# #ident "%Z%%M% %I% %E% SMI" -# -# This file creates the FRU device paths for the FRUAccess library -# - - - - - - - - - - -VERSION 1.0 - - - - - -name:/frutree/chassis/system-board/cpu-slot?Slot=0 -REFNODE cpu-module fru WITH _class:/PLATFORM_CLASS/cpu?ID=0 - -name:/frutree/chassis/system-board/cpu-slot?Slot=1 -REFNODE cpu-module fru WITH _class:/PLATFORM_CLASS/cpu?ID=1 - - - - -name:/platform/pci/ebus/i2c?UnitAddress=1,30/motherboard-fru -PROP FRUDevicePath string r 0 "/devices/pci@8,700000/ebus@5/i2c@1,30/motherboard-fru@0,a8:motherboard-fru" - -name:/platform/pci/ebus/i2c?UnitAddress=1,30/cpu-fru?UnitAddress=0,a0 -PROP FRUDevicePath string r 0 "/devices/pci@8,700000/ebus@5/i2c@1,30/cpu-fru@0,a0:cpu-fru" - -name:/platform/pci/ebus/i2c?UnitAddress=1,30/cpu-fru?UnitAddress=0,a2 -PROP FRUDevicePath string r 0 "/devices/pci@8,700000/ebus@5/i2c@1,30/cpu-fru@0,a2:cpu-fru" - -name:/platform/pci/ebus/i2c?UnitAddress=1,30/fcal-backplane?UnitAddress=0,a4 -PROP FRUDevicePath string r 0 "/devices/pci@8,700000/ebus@5/i2c@1,30/fcal-backplane@0,a4:fcal-backplane" - -name:/platform/pci/ebus/i2c?UnitAddress=1,30/remote-system-console?UnitAddress=0,a6 -PROP FRUDevicePath string r 0 "/devices/pci@8,700000/ebus@5/i2c@1,30/remote-system-console@0,a6:remote-system-console" - -name:/platform/pci/ebus/i2c?UnitAddress=1,30/power-distribution-board?UnitAddress=0,aa -PROP FRUDevicePath string r 0 "/devices/pci@8,700000/ebus@5/i2c@1,30/power-distribution-board@0,aa:power-distribution-board" - -name:/platform/pci/ebus/i2c?UnitAddress=1,30/power-supply?UnitAddress=0,ac -PROP FRUDevicePath string r 0 "/devices/pci@8,700000/ebus@5/i2c@1,30/power-supply@0,ac:power-supply" - -name:/platform/pci/ebus/i2c?UnitAddress=1,30/power-supply?UnitAddress=0,ae -PROP FRUDevicePath string r 0 "/devices/pci@8,700000/ebus@5/i2c@1,30/power-supply@0,ae:power-supply" - - - - -name:/platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,a0 -PROP FRUDevicePath string r 0 "/devices/pci@8,700000/ebus@5/i2c@1,2e/dimm-fru@1,a0:dimm-fru" - -name:/platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,a2 -PROP FRUDevicePath string r 0 "/devices/pci@8,700000/ebus@5/i2c@1,2e/dimm-fru@1,a2:dimm-fru" - -name:/platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,a4 -PROP FRUDevicePath string r 0 "/devices/pci@8,700000/ebus@5/i2c@1,2e/dimm-fru@1,a4:dimm-fru" - -name:/platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,a6 -PROP FRUDevicePath string r 0 "/devices/pci@8,700000/ebus@5/i2c@1,2e/dimm-fru@1,a6:dimm-fru" - -name:/platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,a8 -PROP FRUDevicePath string r 0 "/devices/pci@8,700000/ebus@5/i2c@1,2e/dimm-fru@1,a8:dimm-fru" - -name:/platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,aa -PROP FRUDevicePath string r 0 "/devices/pci@8,700000/ebus@5/i2c@1,2e/dimm-fru@1,aa:dimm-fru" - -name:/platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,ac -PROP FRUDevicePath string r 0 "/devices/pci@8,700000/ebus@5/i2c@1,2e/dimm-fru@1,ac:dimm-fru" - -name:/platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,ae -PROP FRUDevicePath string r 0 "/devices/pci@8,700000/ebus@5/i2c@1,2e/dimm-fru@1,ae:dimm-fru" diff --git a/usr/src/cmd/picl/plugins/sun4u/littleneck/frutree/Makefile b/usr/src/cmd/picl/plugins/sun4u/littleneck/frutree/Makefile deleted file mode 100644 index 2b1d6c6e71..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/littleneck/frutree/Makefile +++ /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, 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" -# - -LIBRARY= libpiclfrutree.a -VERS= .1 - -OBJECTS= piclfrutree.o - -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -include $(SRC)/cmd/picl/plugins/Makefile.com - -SRCS= $(OBJECTS:%.o=%.c) - -LIBS = $(DYNLIB) - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-280R - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONF= piclfrutree.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 -INFOS= $(CONF:%.conf=%.info) - -CLOBBERFILES += $(LIBLINKS) - -CPPFLAGS += -I$(SRC)/lib/libdevfsevent -I$(SRC)/uts/common - -DEVTREE_SRC_DIR = $(SRC)/cmd/picl/plugins/common/devtree -LDLIBS += -L$(DEVTREE_SRC_DIR) -LDLIBS += -L$(ROOT)/usr/lib/picl/plugins -LDLIBS += -L$(SRC)/lib/libptree/$(MACH) -LDLIBS += -lc -lpicltree -lpicldevtree -DYNFLAGS += -R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins - -.KEEP_STATE: - -SUBDIRS= - -POFILE= piclfrutree.po -POFILE_RENAME= piclfrutree_lneck.po - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -all: $(LIBS) $(LIBLINKS) $(CONF) - -install: all $(ROOTLIBDIR) $(ROOTLIBS) $(ROOTLINKS) $(ROOTCONF) - -_msg: $(MSGDOMAIN) $(POFILE) - $(RM) $(MSGDOMAIN)/$(POFILE) - $(CP) $(POFILE) $(MSGDOMAIN)/$(POFILE_RENAME) - -$(MSGDOMAIN): - $(INS.dir) - -$(LIBLINKS): FRC - $(RM) $@; $(SYMLINK) $(DYNLIB) $@ - -# include library targets -include $(SRC)/cmd/picl/plugins/Makefile.targ -include $(SRC)/lib/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -$(CONF): $(INFOS) - $(RM) $@ - $(CPP) piclfrutree.info >$@ - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/littleneck/frutree/piclfrutree.c b/usr/src/cmd/picl/plugins/sun4u/littleneck/frutree/piclfrutree.c deleted file mode 100644 index 0475b1aa75..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/littleneck/frutree/piclfrutree.c +++ /dev/null @@ -1,960 +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 (c) 1999-2000 by Sun Microsystems, Inc. - * All rights reserved. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * PICL plug-in that creates the FRU Hierarchy for the - * SUNW,Sun-Fire-280R (Littleneck) platform - */ - -#include -#include -#include -#include -#include -#include -#include - -/* - * Plugin registration entry points - */ -static void picl_frutree_register(void); -static void picl_frutree_init(void); -static void picl_frutree_fini(void); -static void picl_frutree_evhandler(const char *ename, const void *earg, - size_t size, void *cookie); - -#pragma init(picl_frutree_register) - -/* - * Log message texts - */ -#define CREATE_FRUTREE_FAIL gettext("Failed to create frutree node\n") -#define CREATE_CHASSIS_FAIL gettext("Failed to create chassis node\n") -#define SYSBRD_INIT_FAIL gettext("do_sysboard_init() failed\n") -#define CPUS_INIT_FAIL gettext("do_cpus_init() failed\n") -#define DIMMS_INIT_FAIL gettext("do_mem_init() failed\n") -#define PS_INIT_FAIL gettext("do_power_supplies_init() failed\n") -#define FCAL_INIT_FAIL gettext("do_fcal_init() failed\n") -#define RSC_INIT_FAIL gettext("do_rscboard_init() failed\n") - -/* - * ViewPoints property field used by SunMC - */ -#define CHASSIS_VIEWPOINTS gettext("front top rear") - -/* - * Ref prop values - */ -#define SEEPROM_SOURCE "_seeprom_source" -#define FRU_PARENT "_fru_parent" - -/* - * List of all the FRU locations in the platform_frupath[] array, and - * location_label[] array - */ -#define CPU0 0 -#define CPU1 1 -#define DIMM0 2 -#define DIMM1 3 -#define DIMM2 4 -#define DIMM3 5 -#define DIMM4 6 -#define DIMM5 7 -#define DIMM6 8 -#define DIMM7 9 -#define PDB 10 -#define PS0 11 -#define PS1 12 -#define FCAL 13 -#define RSC 14 -#define SYSBRD 15 - -/* - * Local variables - */ -static picld_plugin_reg_t my_reg_info = { - PICLD_PLUGIN_VERSION_1, - PICLD_PLUGIN_NON_CRITICAL, - "SUNW_Sun-Fire-280R_frutree", - picl_frutree_init, - picl_frutree_fini, -}; - -/* - * List of all the FRUs in the /platform tree with SEEPROMs - */ -static char *platform_frupath[] = { - "/platform/pci@8,700000/ebus@5/i2c@1,30/cpu-fru@0,a0", - "/platform/pci@8,700000/ebus@5/i2c@1,30/cpu-fru@0,a2", - "/platform/pci@8,700000/ebus@5/i2c@1,2e/dimm-fru@1,a0", - "/platform/pci@8,700000/ebus@5/i2c@1,2e/dimm-fru@1,a2", - "/platform/pci@8,700000/ebus@5/i2c@1,2e/dimm-fru@1,a4", - "/platform/pci@8,700000/ebus@5/i2c@1,2e/dimm-fru@1,a6", - "/platform/pci@8,700000/ebus@5/i2c@1,2e/dimm-fru@1,a8", - "/platform/pci@8,700000/ebus@5/i2c@1,2e/dimm-fru@1,aa", - "/platform/pci@8,700000/ebus@5/i2c@1,2e/dimm-fru@1,ac", - "/platform/pci@8,700000/ebus@5/i2c@1,2e/dimm-fru@1,ae", - "/platform/pci@8,700000/ebus@5/i2c@1,30/power-distribution-board@0,aa", - "/platform/pci@8,700000/ebus@5/i2c@1,30/power-supply@0,ac", - "/platform/pci@8,700000/ebus@5/i2c@1,30/power-supply@0,ae", - "/platform/pci@8,700000/ebus@5/i2c@1,30/fcal-backplane@0,a4", - "/platform/pci@8,700000/ebus@5/i2c@1,30/remote-system-console@0,a6", - "/platform/pci@8,700000/ebus@5/i2c@1,30/motherboard-fru@0,a8", - NULL}; - -/* - * List of all the FRU slots in the frutree that can be hotplugged - */ -static char *frutree_power_supply[] = { - "/frutree/chassis/power-dist-board/power-supply-slot?Slot=0", - "/frutree/chassis/power-dist-board/power-supply-slot?Slot=1", - NULL}; - -/* - * List of Labels for FRU locations (uses the #define's from above) - */ -static char *location_label[] = { - "0", - "1", - "J0100", - "J0101", - "J0202", - "J0203", - "J0304", - "J0305", - "J0406", - "J0407", - NULL, /* power distribution board placeholder */ - "0", - "1", - NULL}; - -/* PICL handle for the root node of the "frutree" */ -static picl_nodehdl_t frutreeh; - -static int do_sysboard_init(picl_nodehdl_t, picl_nodehdl_t *); -static int do_cpus_init(picl_nodehdl_t); -static int do_mem_init(picl_nodehdl_t); -static int do_power_supplies_init(picl_nodehdl_t); -static int do_fcal_init(picl_nodehdl_t); -static int do_rscboard_init(picl_nodehdl_t); - -static int add_ref_prop(picl_nodehdl_t, picl_nodehdl_t, char *); -static int add_slot_prop(picl_nodehdl_t, int); -static int add_label_prop(picl_nodehdl_t, char *); -static int add_void_fda_prop(picl_nodehdl_t); -static int add_viewpoints_prop(picl_nodehdl_t, char *); -static int add_all_nodes(); -static int remove_all_nodes(picl_nodehdl_t); - -static int add_hotplug_fru_device(void); -static int rem_hotplug_fru_device(void); -static int is_added_device(char *, char *); -static int is_removed_device(char *, char *); -static int add_power_supply(int); -static int remove_power_supply(int); - -/* - * This function is executed as part of .init when the plugin is - * dlopen()ed - */ -void -picl_frutree_register() -{ - (void) picld_plugin_register(&my_reg_info); -} - -/* - * This function is the init entry point of the plugin. - * It initializes the /frutree tree - */ -void -picl_frutree_init() -{ - int err; - - err = add_all_nodes(); - if (err != PICL_SUCCESS) { - (void) remove_all_nodes(frutreeh); - return; - } - - /* Register the event handler routine */ - (void) ptree_register_handler(PICLEVENT_SYSEVENT_DEVICE_ADDED, - picl_frutree_evhandler, NULL); - (void) ptree_register_handler(PICLEVENT_SYSEVENT_DEVICE_REMOVED, - picl_frutree_evhandler, NULL); -} - -/* - * This function is the fini entry point of the plugin - */ -void -picl_frutree_fini(void) -{ - /* Unregister the event handler routine */ - (void) ptree_unregister_handler(PICLEVENT_SYSEVENT_DEVICE_ADDED, - picl_frutree_evhandler, NULL); - (void) ptree_unregister_handler(PICLEVENT_SYSEVENT_DEVICE_REMOVED, - picl_frutree_evhandler, NULL); - - (void) remove_all_nodes(frutreeh); -} - -/* - * This function is the event handler of this plug-in. - * - * It processes the following events: - * - * PICLEVENT_SYSEVENT_DEVICE_ADDED - * PICLEVENT_SYSEVENT_DEVICE_REMOVED - */ -/* ARGSUSED */ -static void -picl_frutree_evhandler(const char *ename, const void *earg, size_t size, - void *cookie) -{ - if (strcmp(ename, PICLEVENT_SYSEVENT_DEVICE_ADDED) == 0) { - /* Check for and add any hotplugged device(s) */ - (void) add_hotplug_fru_device(); - - } else if (strcmp(ename, PICLEVENT_SYSEVENT_DEVICE_REMOVED) == 0) { - /* Check for and remove any hotplugged device(s) */ - (void) rem_hotplug_fru_device(); - } -} - -/* Initialize the FRU node for the system board */ -static int -do_sysboard_init(picl_nodehdl_t rooth, picl_nodehdl_t *childh) -{ - picl_nodehdl_t tmph; - int err; - - /* Create the node for the system board */ - if (ptree_get_node_by_path(platform_frupath[SYSBRD], &tmph) == - PICL_SUCCESS) { - err = ptree_create_node("system-board", "fru", childh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(*childh, tmph, SEEPROM_SOURCE); - if (err != PICL_SUCCESS) - return (err); - - err = add_void_fda_prop(*childh); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_add_node(rooth, *childh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(tmph, *childh, FRU_PARENT); - if (err != PICL_SUCCESS) - return (err); - - } - return (PICL_SUCCESS); -} - -/* Initializes the FRU nodes for the CPU modules */ -static int -do_cpus_init(picl_nodehdl_t rooth) -{ - picl_nodehdl_t cpusloth; - picl_nodehdl_t cpumodh; - picl_nodehdl_t tmph; - int i, err; - - for (i = CPU0; i <= CPU1; i++) { - /* Create the node for the CPU slot */ - err = ptree_create_node("cpu-slot", "location", &cpusloth); - if (err != PICL_SUCCESS) - return (err); - - err = add_slot_prop(cpusloth, i); - if (err != PICL_SUCCESS) - return (err); - - err = add_label_prop(cpusloth, location_label[i]); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_add_node(rooth, cpusloth); - if (err != PICL_SUCCESS) - return (err); - - /* If the CPU module exists, create a node for it */ - if (ptree_get_node_by_path(platform_frupath[i], &tmph) == - PICL_SUCCESS) { - err = ptree_create_node("cpu-module", "fru", &cpumodh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(cpumodh, tmph, SEEPROM_SOURCE); - if (err != PICL_SUCCESS) - return (err); - - err = add_void_fda_prop(cpumodh); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_add_node(cpusloth, cpumodh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(tmph, cpumodh, FRU_PARENT); - if (err != PICL_SUCCESS) - return (err); - } - } - return (PICL_SUCCESS); -} - -/* Initializes the FRU nodes for the memory modules */ -static int -do_mem_init(picl_nodehdl_t rooth) -{ - picl_nodehdl_t memsloth; - picl_nodehdl_t memmodh; - picl_nodehdl_t tmph; - int i, err, slotnum; - - for (i = DIMM0; i <= DIMM7; i++) { - /* Create the node for the memory slot */ - err = ptree_create_node("mem-slot", "location", &memsloth); - if (err != PICL_SUCCESS) - return (err); - - slotnum = i - DIMM0; - err = add_slot_prop(memsloth, slotnum); - if (err != PICL_SUCCESS) - return (err); - - err = add_label_prop(memsloth, location_label[i]); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_add_node(rooth, memsloth); - if (err != PICL_SUCCESS) - return (err); - - /* If the memory exists, create a node for it */ - if (ptree_get_node_by_path(platform_frupath[i], &tmph) == - PICL_SUCCESS) { - err = ptree_create_node("mem-module", "fru", &memmodh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(memmodh, tmph, SEEPROM_SOURCE); - if (err != PICL_SUCCESS) - return (err); - - err = add_void_fda_prop(memmodh); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_add_node(memsloth, memmodh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(tmph, memmodh, FRU_PARENT); - if (err != PICL_SUCCESS) - return (err); - } - } - return (PICL_SUCCESS); -} - -/* Initializes the FRU nodes for the PDB and the power supplies */ -static int -do_power_supplies_init(picl_nodehdl_t rooth) -{ - picl_nodehdl_t powerbrdh; - picl_nodehdl_t powersloth; - picl_nodehdl_t powermodh; - picl_nodehdl_t tmph; - int i, err, slotnum; - - /* Create the node for the PDB (if it exists) */ - if (ptree_get_node_by_path(platform_frupath[PDB], &tmph) == - PICL_SUCCESS) { - err = ptree_create_node("power-dist-board", "fru", &powerbrdh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(powerbrdh, tmph, SEEPROM_SOURCE); - if (err != PICL_SUCCESS) - return (err); - - err = add_void_fda_prop(powerbrdh); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_add_node(rooth, powerbrdh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(tmph, powerbrdh, FRU_PARENT); - if (err != PICL_SUCCESS) - return (err); - - for (i = PS0; i <= PS1; i++) { - /* Create the node for the power supply slot */ - err = ptree_create_node("power-supply-slot", - "location", &powersloth); - if (err != PICL_SUCCESS) - return (err); - - slotnum = i - PS0; - err = add_slot_prop(powersloth, slotnum); - if (err != PICL_SUCCESS) - return (err); - - err = add_label_prop(powersloth, location_label[i]); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_add_node(powerbrdh, powersloth); - if (err != PICL_SUCCESS) - return (err); - - /* If the PS exists, create a node for it */ - if (ptree_get_node_by_path(platform_frupath[i], - &tmph) == PICL_SUCCESS) { - err = ptree_create_node("power-supply", - "fru", &powermodh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(powermodh, tmph, - SEEPROM_SOURCE); - if (err != PICL_SUCCESS) - return (err); - - err = add_void_fda_prop(powermodh); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_add_node(powersloth, powermodh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(tmph, powermodh, FRU_PARENT); - if (err != PICL_SUCCESS) - return (err); - } - } - } - return (PICL_SUCCESS); -} - -/* Initializes the FRU nodes for the FCAL backplane */ -static int -do_fcal_init(picl_nodehdl_t rooth) -{ - picl_nodehdl_t fcalbrdh; - picl_nodehdl_t tmph; - int err; - - /* Create the node for the FCAL backplane (if it exists) */ - if (ptree_get_node_by_path(platform_frupath[FCAL], &tmph) == - PICL_SUCCESS) { - err = ptree_create_node("fcal-backplane", "fru", &fcalbrdh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(fcalbrdh, tmph, SEEPROM_SOURCE); - if (err != PICL_SUCCESS) - return (err); - - err = add_void_fda_prop(fcalbrdh); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_add_node(rooth, fcalbrdh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(tmph, fcalbrdh, FRU_PARENT); - if (err != PICL_SUCCESS) - return (err); - } - return (PICL_SUCCESS); -} - -/* Initializes the FRU node for the RSC card */ -static int -do_rscboard_init(picl_nodehdl_t rooth) -{ - picl_nodehdl_t rscbrdh; - picl_nodehdl_t tmph; - int err; - - /* Create the node for the RSC board (if it exists) */ - if (ptree_get_node_by_path(platform_frupath[RSC], &tmph) == - PICL_SUCCESS) { - err = ptree_create_node("rsc-board", "fru", &rscbrdh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(rscbrdh, tmph, SEEPROM_SOURCE); - if (err != PICL_SUCCESS) - return (err); - - err = add_void_fda_prop(rscbrdh); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_add_node(rooth, rscbrdh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(tmph, rscbrdh, FRU_PARENT); - if (err != PICL_SUCCESS) - return (err); - } - return (PICL_SUCCESS); -} - -/* Creates a "reference" property between two PICL nodes */ -static int -add_ref_prop(picl_nodehdl_t nodeh, picl_nodehdl_t tmph, char *str) -{ - picl_prophdl_t proph; - ptree_propinfo_t propinfo; - int err; - - if (str == NULL) - return (PICL_FAILURE); - - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_REFERENCE, PICL_READ, sizeof (picl_nodehdl_t), - str, NULL, NULL); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_create_and_add_prop(nodeh, &propinfo, &tmph, &proph); - if (err != PICL_SUCCESS) - return (err); - - return (PICL_SUCCESS); -} - -/* Creates a "Slot" property for a given PICL node */ -static int -add_slot_prop(picl_nodehdl_t nodeh, int slotnum) -{ - picl_prophdl_t proph; - ptree_propinfo_t propinfo; - int err; - - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_INT, PICL_READ, 4, "Slot", NULL, NULL); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_create_and_add_prop(nodeh, &propinfo, &slotnum, &proph); - if (err != PICL_SUCCESS) - return (err); - - return (PICL_SUCCESS); -} - -/* Creates a "Label" property for a given PICL node */ -static int -add_label_prop(picl_nodehdl_t nodeh, char *label) -{ - picl_prophdl_t proph; - ptree_propinfo_t propinfo; - int err; - - if (label == NULL) - return (PICL_FAILURE); - - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_CHARSTRING, PICL_READ, strlen(label)+1, "Label", - NULL, NULL); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_create_and_add_prop(nodeh, &propinfo, label, &proph); - if (err != PICL_SUCCESS) - return (err); - - return (PICL_SUCCESS); -} - -/* Creates a "FRUDataAvailable" void property for the given PICL node */ -static int -add_void_fda_prop(picl_nodehdl_t nodeh) -{ - picl_prophdl_t proph; - ptree_propinfo_t propinfo; - int err; - - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_VOID, PICL_READ, 0, "FRUDataAvailable", NULL, NULL); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_create_and_add_prop(nodeh, &propinfo, NULL, &proph); - if (err != PICL_SUCCESS) - return (err); - - return (PICL_SUCCESS); -} - -/* Creates a "ViewPoints" property -- used for chassis */ -static int -add_viewpoints_prop(picl_nodehdl_t nodeh, char *string) -{ - picl_prophdl_t proph; - ptree_propinfo_t propinfo; - int err; - - if (string == NULL) - return (PICL_FAILURE); - - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_CHARSTRING, PICL_READ, strlen(string)+1, "ViewPoints", - NULL, NULL); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_create_and_add_prop(nodeh, &propinfo, string, &proph); - if (err != PICL_SUCCESS) - return (err); - - return (PICL_SUCCESS); -} - -/* Creates and adds all of the frutree nodes */ -static int -add_all_nodes() -{ - picl_nodehdl_t rooth; - picl_nodehdl_t chassish; - picl_nodehdl_t sysboardh; - int err; - - /* Get the root node of the PICL tree */ - err = ptree_get_root(&rooth); - if (err != PICL_SUCCESS) { - return (err); - } - - /* Create and add the root node of the FRU subtree */ - err = ptree_create_and_add_node(rooth, "frutree", "picl", &frutreeh); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, CREATE_FRUTREE_FAIL); - return (err); - } - - /* Create and add the chassis node */ - err = ptree_create_and_add_node(frutreeh, "chassis", "fru", &chassish); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, CREATE_CHASSIS_FAIL); - return (err); - } - - /* Add ViewPoints prop to chassis node */ - err = add_viewpoints_prop(chassish, CHASSIS_VIEWPOINTS); - if (err != PICL_SUCCESS) - return (err); - - /* Initialize the FRU node for the system board */ - err = do_sysboard_init(chassish, &sysboardh); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, SYSBRD_INIT_FAIL); - return (err); - } - - /* Initialize the FRU nodes for the CPU modules */ - err = do_cpus_init(sysboardh); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, CPUS_INIT_FAIL); - return (err); - } - - /* Initialize the FRU nodes for the memory modules */ - err = do_mem_init(sysboardh); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, DIMMS_INIT_FAIL); - return (err); - } - - /* Initialize the FRU nodes for the PDB and the power supplies */ - err = do_power_supplies_init(chassish); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, PS_INIT_FAIL); - return (err); - } - - /* Initialize the FRU nodes for the FCAL backplane */ - err = do_fcal_init(chassish); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, FCAL_INIT_FAIL); - return (err); - } - - /* Initialize the FRU node for the RSC card */ - err = do_rscboard_init(chassish); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, RSC_INIT_FAIL); - return (err); - } - - return (PICL_SUCCESS); -} - -/* Deletes and destroys all PICL nodes for which rooth is a ancestor */ -static int -remove_all_nodes(picl_nodehdl_t rooth) -{ - picl_nodehdl_t chdh; - int err, done = 0; - - while (!done) { - err = ptree_get_propval_by_name(rooth, PICL_PROP_CHILD, &chdh, - sizeof (picl_nodehdl_t)); - if (err != PICL_PROPNOTFOUND) { - (void) remove_all_nodes(chdh); - } else { - err = ptree_delete_node(rooth); - if (err != PICL_SUCCESS) { - return (err); - } else { - (void) ptree_destroy_node(rooth); - } - done = 1; - } - } - return (PICL_SUCCESS); -} - -/* - * Searches the list of hotpluggable FRUs for this platform and adds the - * appropriate node(s) to the frutree - */ -static int -add_hotplug_fru_device() -{ - int i, err, slotnum; - - /* Check for hotplugged power supplies */ - for (i = PS0; i <= PS1; i++) { - /* Compare the /platform tree to the frutree */ - slotnum = i - PS0; - err = is_added_device(platform_frupath[i], - frutree_power_supply[slotnum]); - if (err != PICL_SUCCESS) - continue; - - /* If they are different, then add a power supply */ - err = add_power_supply(slotnum); - if (err != PICL_SUCCESS) - continue; - } - return (PICL_SUCCESS); -} - -/* - * Searches the list of hotpluggable FRUs for this platform and removes the - * appropriate node(s) from the frutree - */ -static int -rem_hotplug_fru_device() -{ - int i, err, slotnum; - - /* Check for hotplugged power supplies */ - for (i = PS0; i <= PS1; i++) { - /* Compare the /platform tree to the frutree */ - slotnum = i - PS0; - err = is_removed_device(platform_frupath[i], - frutree_power_supply[slotnum]); - if (err != PICL_SUCCESS) - continue; - - /* If they are different, then remove a power supply */ - err = remove_power_supply(slotnum); - if (err != PICL_SUCCESS) - continue; - } - return (PICL_SUCCESS); -} - -/* - * Compare the /platform tree to the /frutree to determine if a - * new device has been added - */ -static int -is_added_device(char *plat, char *fru) -{ - int err; - picl_nodehdl_t plath, frusloth, frumodh; - - /* Check for node in the /platform tree */ - err = ptree_get_node_by_path(plat, &plath); - if (err != PICL_SUCCESS) - return (err); - - /* - * The node is in /platform, so find the corresponding slot in - * the frutree - */ - err = ptree_get_node_by_path(fru, &frusloth); - if (err != PICL_SUCCESS) - return (err); - - /* - * If the slot in the frutree has a child, then return - * PICL_FAILURE. This means that the /platform tree and - * the frutree are consistent and no action is necessary. - * Otherwise return PICL_SUCCESS to indicate that a node needs - * to be added to the frutree - */ - err = ptree_get_propval_by_name(frusloth, PICL_PROP_CHILD, - &frumodh, sizeof (picl_nodehdl_t)); - if (err == PICL_SUCCESS) - return (PICL_FAILURE); - - return (PICL_SUCCESS); -} - -/* - * Compare the /platform tree to the /frutree to determine if a - * device has been removed - */ -static int -is_removed_device(char *plat, char *fru) -{ - int err; - picl_nodehdl_t plath, frusloth, frumodh; - - - /* Check for node in /platform tree */ - err = ptree_get_node_by_path(plat, &plath); - if (err == PICL_SUCCESS) - return (PICL_FAILURE); - - /* - * The node is not in /platform, so find the corresponding slot in - * the frutree - */ - err = ptree_get_node_by_path(fru, &frusloth); - if (err != PICL_SUCCESS) - return (err); - - /* - * If the slot in the frutree does not have a child, then return - * PICL_FAILURE. This means that the /platform tree and - * the frutree are consistent and no action is necessary. - * Otherwise return PICL_SUCCESS to indicate that the needs - * to be removed from the frutree - */ - err = ptree_get_propval_by_name(frusloth, PICL_PROP_CHILD, - &frumodh, sizeof (picl_nodehdl_t)); - if (err != PICL_SUCCESS) - return (PICL_FAILURE); - - return (PICL_SUCCESS); -} - -/* Hotplug routine used to add a new power supply */ -static int -add_power_supply(int slotnum) -{ - picl_nodehdl_t powersloth; - picl_nodehdl_t powermodh; - picl_nodehdl_t tmph; - int i, err; - - /* Find the node for the given power supply slot */ - if (ptree_get_node_by_path(frutree_power_supply[slotnum], - &powersloth) == PICL_SUCCESS) { - - i = slotnum + PS0; - - /* Make sure it's in /platform and create the frutree node */ - if (ptree_get_node_by_path(platform_frupath[i], &tmph) == - PICL_SUCCESS) { - err = ptree_create_node("power-supply", "fru", - &powermodh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(powermodh, tmph, SEEPROM_SOURCE); - if (err != PICL_SUCCESS) - return (err); - - err = add_void_fda_prop(powermodh); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_add_node(powersloth, powermodh); - if (err != PICL_SUCCESS) - return (err); - - err = add_ref_prop(tmph, powermodh, FRU_PARENT); - if (err != PICL_SUCCESS) - return (err); - } - } - return (PICL_SUCCESS); -} - -/* Hotplug routine used to remove an existing power supply */ -static int -remove_power_supply(int slotnum) -{ - picl_nodehdl_t powersloth; - picl_nodehdl_t powermodh; - int err; - - /* Find the node for the given power supply slot */ - if (ptree_get_node_by_path(frutree_power_supply[slotnum], - &powersloth) == PICL_SUCCESS) { - /* Make sure it's got a child, then delete it */ - err = ptree_get_propval_by_name(powersloth, PICL_PROP_CHILD, - &powermodh, sizeof (picl_nodehdl_t)); - if (err != PICL_SUCCESS) { - return (err); - } - - err = ptree_delete_node(powermodh); - if (err != PICL_SUCCESS) { - return (err); - } else { - (void) ptree_destroy_node(powermodh); - } - } - return (PICL_SUCCESS); -} diff --git a/usr/src/cmd/picl/plugins/sun4u/littleneck/frutree/piclfrutree.info b/usr/src/cmd/picl/plugins/sun4u/littleneck/frutree/piclfrutree.info deleted file mode 100644 index 7e22564eac..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/littleneck/frutree/piclfrutree.info +++ /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 2004 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * This is a fragment of a config file, used by FMD as a temporary measure for - * serial number retrieval. PICL frutree generation for littleneck is handled - * by the littleneck-specific libpiclfrutree.so. - */ - -name:/frutree/chassis/system-board/mem-slot?Label=J0100 -REFNODE mem-module fru WITH /platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,a0 - -name:/frutree/chassis/system-board/mem-slot?Label=J0101 -REFNODE mem-module fru WITH /platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,a2 - -name:/frutree/chassis/system-board/mem-slot?Label=J0202 -REFNODE mem-module fru WITH /platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,a4 - -name:/frutree/chassis/system-board/mem-slot?Label=J0203 -REFNODE mem-module fru WITH /platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,a6 - -name:/frutree/chassis/system-board/mem-slot?Label=J0304 -REFNODE mem-module fru WITH /platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,a8 - -name:/frutree/chassis/system-board/mem-slot?Label=J0305 -REFNODE mem-module fru WITH /platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,aa - -name:/frutree/chassis/system-board/mem-slot?Label=J0406 -REFNODE mem-module fru WITH /platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,ac - -name:/frutree/chassis/system-board/mem-slot?Label=J0407 -REFNODE mem-module fru WITH /platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,ae diff --git a/usr/src/cmd/picl/plugins/sun4u/littleneck/psvcplugin/Makefile b/usr/src/cmd/picl/plugins/sun4u/littleneck/psvcplugin/Makefile deleted file mode 100644 index 519eb7cf09..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/littleneck/psvcplugin/Makefile +++ /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, 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" -# - -LIBRARY= libpsvcplugin_psr.a -VERS= .1 - -OBJECTS= psvcplugin.o - -# include library definitions -include $(SRC)/lib/Makefile.lib -include $(SRC)/Makefile.psm - -include $(SRC)/cmd/picl/plugins/Makefile.com - -SRCS= $(OBJECTS:%.o=%.c) - -LIBS = $(DYNLIB) - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-280R - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CPPFLAGS += -I$(SRC)/uts/sun4u -CPPFLAGS += -I$(SRC)/cmd/picl/plugins/sun4u/psvc/psvcobj - -LDLIBS += -L$(SRC)/lib/libpicl/$(MACH) -L$(SRC)/lib/libpicltree/$(MACH) -LDLIBS += -L$(SRC)/cmd/picl/plugins/sun4u/psvc/psvcobj -LDLIBS += -L$(SRC)/cmd/picl/plugins/sun4u/psvc/psvcplugin -DYNFLAGS += -R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins:/usr/platform/sun4u/lib - -LDLIBS += -lc -lpicltree -lpicl -lpsvcobj -lpsvcplugin - -.KEEP_STATE: - -SUBDIRS= - -POFILE= psvcplugin.po -POFILE_RENAME= psvcplugin_lneck.po - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -all: $(LIBS) $(LIBLINKS) - -install: all $(ROOTLIBDIR) $(ROOTLIBS) $(ROOTLINKS) - -_msg: $(MSGDOMAIN) $(POFILE) - $(RM) $(MSGDOMAIN)/$(POFILE) - $(CP) $(POFILE) $(MSGDOMAIN)/$(POFILE_RENAME) - -$(MSGDOMAIN): - $(INS.dir) - -$(LIBLINKS): FRC - $(RM) $(LIBLINKS); $(SYMLINK) $(DYNLIB) $(LIBLINKS) - -# include library targets -include $(SRC)/cmd/picl/plugins/Makefile.targ -include $(SRC)/lib/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/littleneck/psvcplugin/psvcplugin.c b/usr/src/cmd/picl/plugins/sun4u/littleneck/psvcplugin/psvcplugin.c deleted file mode 100644 index 2c1379c997..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/littleneck/psvcplugin/psvcplugin.c +++ /dev/null @@ -1,211 +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" - -/* - * PICL Littleneck platform plug-in to create environment tree nodes. - */ -#define _POSIX_PRIORITY_SCHEDULING 1 - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static psvc_opaque_t hdlp; - -#define PSVC_PLUGIN_VERSION PICLD_PLUGIN_VERSION_1 - -#pragma init(psvc_psr_plugin_register) /* place in .init section */ - -typedef struct { - char name[32]; - picl_nodehdl_t node; -} picl_psvc_t; - -extern struct handle { - uint32_t obj_count; - picl_psvc_t *objects; - FILE *fp; -} psvc_hdl; - -void psvc_psr_plugin_init(void); -void psvc_psr_plugin_fini(void); - -picld_plugin_reg_t psvc_psr_reg = { - PSVC_PLUGIN_VERSION, - PICLD_PLUGIN_CRITICAL, - "PSVC_PSR", - psvc_psr_plugin_init, - psvc_psr_plugin_fini -}; - -#define PSVC_INIT_ERR gettext("%s: Error in psvc_init(): %s\n") -#define PTREE_DELETE_NODE_ERR gettext("%s: ptree_delete_node() failed: %s\n") -#define PTREE_GET_NODE_ERR \ - gettext("%s: ptree_get_node_by_path() failed: %s\n") - -extern int ptree_get_node_by_path(const char *, picl_nodehdl_t *); - -struct node_file { - char path[256]; - char file[256]; -} dev_pr_info[] = { -{"/SYSTEM/CPU0_MOD_CARD", - "/devices/pci@8,700000/ebus@5/i2c@1,30/temperature@0,30:die_temp"}, -{"/SYSTEM/CPU1_MOD_CARD", - "/devices/pci@8,700000/ebus@5/i2c@1,30/temperature@0,98:die_temp"}, -{"/SYSTEM/AT24C64_A0_1", - "/devices/pci@8,700000/ebus@5/i2c@1,2e/dimm@1,a0:dimm"}, -{"/SYSTEM/AT24C64_A2_1", - "/devices/pci@8,700000/ebus@5/i2c@1,2e/dimm@1,a2:dimm"}, -{"/SYSTEM/AT24C64_A4_1", - "/devices/pci@8,700000/ebus@5/i2c@1,2e/dimm@1,a4:dimm"}, -{"/SYSTEM/AT24C64_A6_1", - "/devices/pci@8,700000/ebus@5/i2c@1,2e/dimm@1,a6:dimm"}, -{"/SYSTEM/AT24C64_A8_1", - "/devices/pci@8,700000/ebus@5/i2c@1,2e/dimm@1,a8:dimm"}, -{"/SYSTEM/AT24C64_AA_1", - "/devices/pci@8,700000/ebus@5/i2c@1,2e/dimm@1,aa:dimm"}, -{"/SYSTEM/AT24C64_AC_1", - "/devices/pci@8,700000/ebus@5/i2c@1,2e/dimm@1,ac:dimm"}, -{"/SYSTEM/AT24C64_AE_1", - "/devices/pci@8,700000/ebus@5/i2c@1,2e/dimm@1,ae:dimm"} -}; -#define DEV_PR_COUNT (sizeof (dev_pr_info) / sizeof (struct node_file)) - -static void init_err(char *fmt, char *arg1, char *arg2) -{ - char msg[256]; - - sprintf(msg, fmt, arg1, arg2); - syslog(LOG_ERR, msg); -} - -void -psvc_psr_plugin_init(void) -{ - char *funcname = "psvc_plugin_init"; - int32_t i; - int err; - boolean_t present; - /* - * So the volatile read/write routines can retrieve data from - * psvc or picl - */ - err = psvc_init(&hdlp); - if (err != 0) { - init_err(PSVC_INIT_ERR, funcname, strerror(errno)); - - } - - /* - * Remove nodes whose devices aren't present from the picl tree. - */ - for (i = 0; i < psvc_hdl.obj_count; ++i) { - picl_psvc_t *objp; - uint64_t features; - objp = &psvc_hdl.objects[i]; - - err = psvc_get_attr(hdlp, objp->name, PSVC_PRESENCE_ATTR, - &present); - if (err != PSVC_SUCCESS) - continue; - err = psvc_get_attr(hdlp, objp->name, PSVC_FEATURES_ATTR, - &features); - if (err != PSVC_SUCCESS) - continue; - if ((features & (PSVC_DEV_HOTPLUG | PSVC_DEV_OPTION)) && - (present == PSVC_ABSENT)) { - err = ptree_delete_node(objp->node); - if (err != 0) { - init_err(PTREE_DELETE_NODE_ERR, funcname, - picl_strerror(err)); - return; - } - } - } - - /* - * Remove PICL device nodes if their /devices file isn't present or - * if the device file is present but the open returns ENXIO - * which indicates that the node file doesn't represent a device - * tree node and is probably a relic from some previous boot config - */ - for (i = 0; i < DEV_PR_COUNT; ++i) { - picl_nodehdl_t dev_pr_node; - int fd; - fd = open(dev_pr_info[i].file, O_RDONLY); - if (fd != -1) { - close(fd); - continue; - } - if ((errno != ENOENT) && (errno != ENXIO)) - continue; - - err = ptree_get_node_by_path(dev_pr_info[i].path, &dev_pr_node); - if (err != 0) { - init_err(PTREE_GET_NODE_ERR, funcname, - picl_strerror(err)); - return; - } - - err = ptree_delete_node(dev_pr_node); - if (err != 0) { - init_err(PTREE_DELETE_NODE_ERR, funcname, - picl_strerror(err)); - return; - } - } - free(psvc_hdl.objects); -} - -void -psvc_psr_plugin_fini(void) -{ - psvc_fini(hdlp); -} - -void -psvc_psr_plugin_register(void) -{ - picld_plugin_register(&psvc_psr_reg); -} diff --git a/usr/src/cmd/picl/plugins/sun4u/littleneck/psvcpolicy/Makefile b/usr/src/cmd/picl/plugins/sun4u/littleneck/psvcpolicy/Makefile deleted file mode 100644 index 50dbc66171..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/littleneck/psvcpolicy/Makefile +++ /dev/null @@ -1,105 +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" -# - -LIBRARY= libpsvcpolicy_psr.a -VERS= .1 - -OBJECTS= psvcpolicy.o - -# include library definitions -include $(SRC)/lib/Makefile.lib -include $(SRC)/Makefile.psm - -include $(SRC)/cmd/picl/plugins/Makefile.com - -SRCS= $(OBJECTS:%.o=%.c) - -LIBS = $(DYNLIB) - -PLATFORM=SUNW,Sun-Fire-280R - -CPPFLAGS += -I$(SRC)/uts/sun4u -CPPFLAGS += -I$(SRC)/cmd/picl/plugins/sun4u/psvc/psvcobj - -ZDEFS = -LDLIBS += -L$(SRC)/lib/libpicl/$(MACH) -L$(SRC)/lib/libpicltree/$(MACH) -LDLIBS += -L$(SRC)/cmd/picl/plugins/sun4u/psvc/psvcobj -LDLIBS += -L$(SRC)/cmd/picl/plugins/sun4u/psvc/psvcplugin -DYNFLAGS += -R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins:/usr/platform/sun4u/lib - -LDLIBS += -lpicltree -lpsvcobj -lpsvcplugin -LDLIBS += -lc -ldevice - -.KEEP_STATE: - -PLATLIBS= $(USR_PLAT_DIR)/$(PLATFORM)/lib/ - -UTSBASE= $(SRC)/uts - -SUBDIRS= - -POFILE= psvcpolicy.po -POFILE_RENAME= psvcpolicy_lneck.po - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -all: $(LIBS) $(LIBLINKS) - -install: all $(USR_PSM_LIBS) - -$(USR_PSM_LIB_DIR): - @cd $(UTSBASE)/sun4u/littleneck; pwd; $(MAKE) $(USR_PSM_LIB_DIR) - -$(LIBLINKS): FRC - $(RM) $(LIBLINKS); $(SYMLINK) $(DYNLIB) $(LIBLINKS) - -_msg: $(MSGDOMAIN) $(POFILE) - $(RM) $(MSGDOMAIN)/$(POFILE) - $(CP) $(POFILE) $(MSGDOMAIN)/$(POFILE_RENAME) - -$(MSGDOMAIN): - $(INS.dir) - - -# include library targets -include $(SRC)/cmd/picl/plugins/Makefile.targ -include $(SRC)/lib/Makefile.targ - -$(USR_PSM_LIB_DIR)/%: % $(USR_PSM_LIB_DIR) - $(INS.file) ;\ - $(RM) -r $(USR_PSM_LIB_DIR)/libpsvcpolicy_psr.so; \ - $(SYMLINK) ./libpsvcpolicy_psr.so$(VERS) $(USR_PSM_LIB_DIR)/libpsvcpolicy_psr.so - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/littleneck/psvcpolicy/psvcpolicy.c b/usr/src/cmd/picl/plugins/sun4u/littleneck/psvcpolicy/psvcpolicy.c deleted file mode 100644 index d3a3249d83..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/littleneck/psvcpolicy/psvcpolicy.c +++ /dev/null @@ -1,882 +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" - -/* - * Littleneck platform specific environment monitoring policies - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/*LINTLIBRARY*/ - -#define LOWTEMP_CRITICAL_MSG \ - gettext("CRITICAL : LOW TEMPERATURE DETECTED %d, %s") -#define LOWTEMP_WARNING_MSG \ - gettext("WARNING : LOW TEMPERATURE DETECTED %d, %s") -#define HIGHTEMP_CRITICAL_MSG \ - gettext("CRITICAL : HIGH TEMPERATURE DETECTED %d, %s") -#define HIGHTEMP_WARNING_MSG \ - gettext("WARNING : HIGH TEMPERATURE DETECTED %d, %s") -#define DEVICE_INSERTED_MSG gettext("Device %s inserted") -#define DEVICE_REMOVED_MSG gettext("Device %s removed") -#define PS_TYPE_MSG \ - gettext("WARNING: Incorrect type power supply inserted, device %s") -#define DEVICE_FAILURE_MSG \ - gettext("WARNING: Device %s failure detected by sensor %s\n") -#define DEVICE_OK_MSG gettext("Device %s OK") -#define DEVTREE_NODE_CREATE_FAILED \ - gettext("psvc PICL plugin: Failed to create node for %s, errno = %d") -#define DEVTREE_NODE_DELETE_FAILED \ - gettext("psvc PICL plugin: Failed to delete node for %s, errno = %d") -#define NO_FRU_INFO \ - gettext("No FRU Information for %s using default temperatures\n") - -static char *shutdown_string = "shutdown -y -g 60 -i 5 \"OVERTEMP condition\""; - -typedef struct seg_desc { - int32_t segdesc; - int16_t segoffset; - int16_t seglength; -} seg_desc_t; - -static int32_t find_segment(psvc_opaque_t hdlp, char *fru, seg_desc_t *segment, - char *seg_to_find); - -static int temp_attr[] = { - PSVC_HW_HI_SHUT_ATTR, PSVC_HI_SHUT_ATTR, PSVC_HI_WARN_ATTR, - PSVC_LO_WARN_ATTR, PSVC_LO_SHUT_ATTR, PSVC_HW_LO_SHUT_ATTR -}; - -#define MAX_TEMP_ATTR (sizeof (temp_attr)/sizeof (temp_attr[0])) -#define TEMP_OFFSET 12 -#define PART_NO_OFFSET 152 -#define NUM_OF_SEG_ADDR 0x1805 -#define SEG_DESC_START 0x1806 -#define PSVC_NO_DEVICE -2 - -/* - * The I2C bus is noisy, and the state may be incorrectly reported as - * having changed. When the state changes, we attempt to confirm by - * retrying. If any retries indicate that the state has not changed, we - * assume the state change(s) were incorrect and the state has not changed. - * The following variables are used to store the tuneable values read in - * from the optional i2cparam.conf file for this shared object library. - */ -static int n_retry_temp = PSVC_THRESHOLD_COUNTER; -static int retry_sleep_temp = 1; -static int n_retry_hotplug = PSVC_NUM_OF_RETRIES; -static int retry_sleep_hotplug = 1; -static int n_retry_temp_shutdown = PSVC_NUM_OF_RETRIES; -static int retry_sleep_temp_shutdown = 1; - -typedef struct { - int *pvar; - char *texttag; -} i2c_noise_param_t; - -static i2c_noise_param_t i2cparams[] = { - &n_retry_temp, "n_retry_temp", - &retry_sleep_temp, "retry_sleep_temp", - &n_retry_hotplug, "n_retry_hotplug", - &retry_sleep_hotplug, "retry_sleep_hotplug", - NULL, NULL -}; - -#pragma init(i2cparams_load) - -static void -i2cparams_debug(i2c_noise_param_t *pi2cparams, char *platform, - int usingDefaults) -{ - char s[128]; - i2c_noise_param_t *p; - - if (!usingDefaults) { - (void) snprintf(s, sizeof (s), - "# Values from /usr/platform/%s/lib/i2cparam.conf\n", - platform); - syslog(LOG_WARNING, "%s", s); - } else { - /* no file - we're using the defaults */ - (void) snprintf(s, sizeof (s), -"# No /usr/platform/%s/lib/i2cparam.conf file, using defaults\n", - platform); - } - (void) fputs(s, stdout); - p = pi2cparams; - while (p->pvar != NULL) { - (void) snprintf(s, sizeof (s), "%s %d\n", p->texttag, - *(p->pvar)); - if (!usingDefaults) - syslog(LOG_WARNING, "%s", s); - (void) fputs(s, stdout); - p++; - } -} - -static void -i2cparams_load(void) -{ - FILE *fp; - char filename[PATH_MAX]; - char platform[64]; - char s[128]; - char var[128]; - int val; - i2c_noise_param_t *p; - - if (sysinfo(SI_PLATFORM, platform, sizeof (platform)) == -1) { - syslog(LOG_ERR, "sysinfo error %s\n", strerror(errno)); - return; - } - (void) snprintf(filename, sizeof (filename), - "/usr/platform/%s/lib/i2cparam.conf", platform); - /* read thru the i2cparam.conf file and set variables */ - if ((fp = fopen(filename, "r")) != NULL) { - while (fgets(s, sizeof (s), fp) != NULL) { - if (s[0] == '#') /* skip comment lines */ - continue; - /* try to find a string match and get the value */ - if (sscanf(s, "%127s %d", var, &val) != 2) - continue; - if (val < 1) - val = 1; /* clamp min value */ - p = &(i2cparams[0]); - while (p->pvar != NULL) { - if (strncmp(p->texttag, var, sizeof (var)) == - 0) { - *(p->pvar) = val; - break; - } - p++; - } - } - (void) fclose(fp); - } - /* output the values of the parameters */ - i2cparams_debug(&(i2cparams[0]), platform, ((fp == NULL)? 1 : 0)); -} - - -int32_t -find_segment(psvc_opaque_t hdlp, char *fru, seg_desc_t *segment, - char seg_to_find[2]) -{ - int32_t seg_found = 0, status; - int32_t seg_desc_start = SEG_DESC_START, j; - int8_t seg_count; - char seg_name[2]; - fru_info_t fru_data; - - /* - * Read the number of segments in the Read Only section - */ - fru_data.buf_start = NUM_OF_SEG_ADDR; - fru_data.buf = (char *)&seg_count; - fru_data.read_size = 1; - - status = psvc_get_attr(hdlp, fru, PSVC_FRU_INFO_ATTR, - &fru_data); - /* - * We test for ENOENT and ENXIO because Littleneck does not - * have actual presence sensors and so the only way to see - * if a part is there or not is to actually make a call to - * that part. - */ - if (status != PSVC_SUCCESS) { - if ((errno == ENOENT) || (errno == ENXIO)) - return (PSVC_NO_DEVICE); - else - return (PSVC_FAILURE); - } - /* - * Read in each segment to find the segment we are looking for - */ - for (j = 0; (j < seg_count) && (!(seg_found)); j++) { - fru_data.buf_start = seg_desc_start; - fru_data.buf = seg_name; - fru_data.read_size = 2; - - status = psvc_get_attr(hdlp, fru, PSVC_FRU_INFO_ATTR, - &fru_data); - - seg_desc_start = seg_desc_start + 2; - fru_data.buf_start = seg_desc_start; - fru_data.buf = (char *)segment; - fru_data.read_size = sizeof (seg_desc_t); - - status = psvc_get_attr(hdlp, fru, PSVC_FRU_INFO_ATTR, - &fru_data); - if (status != PSVC_SUCCESS) { - syslog(LOG_ERR, - "Failed psvc_get_attr for FRU info\n"); - return (PSVC_FAILURE); - } - seg_desc_start = seg_desc_start + sizeof (seg_desc_t); - if (memcmp(seg_name, seg_to_find, 2) == 0) { - seg_found = 1; - } - } - return (seg_found); -} - -int32_t -psvc_update_thresholds_0(psvc_opaque_t hdlp, char *id) -{ - int32_t status = PSVC_SUCCESS; - fru_info_t fru_data; - char *fru, part_no[7]; - int16_t data_offset; - int32_t fru_count, i, j, temp_address; - int32_t seg_found, temp; - seg_desc_t segment; - int8_t temps[MAX_TEMP_ATTR]; - int32_t num_of_parts = 2; - char fruless_parts[2][7] = {"5015988", "5015675"}; - int fd; - FILE *fp; - - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_MATCHES_ATTR, &fru_count, - PSVC_FRU); - if (status == PSVC_FAILURE) - return (status); - - for (i = 0; i < fru_count; i++) { - seg_found = 0; - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_ID_ATTR, - &fru, PSVC_FRU, i); - if (status != PSVC_SUCCESS) - return (status); - seg_found = find_segment(hdlp, fru, &segment, "ES"); - if (seg_found == PSVC_FAILURE) - return (PSVC_FAILURE); - else if (seg_found == PSVC_NO_DEVICE) - return (PSVC_SUCCESS); - if (seg_found) { - /* - * For Littleneck we need to read the offset of the - * die-sensor data record - */ - temp_address = segment.segoffset + TEMP_OFFSET; - fru_data.buf_start = temp_address; - fru_data.buf = (char *)&data_offset; - fru_data.read_size = sizeof (data_offset); - status = psvc_get_attr(hdlp, fru, PSVC_FRU_INFO_ATTR, - &fru_data); - if (status != PSVC_SUCCESS) { - syslog(LOG_ERR, - "Failed psvc_get_attr for FRU info\n"); - return (status); - } - - /* - * Now go and get the new temperature settings - */ - temp_address = segment.segoffset + data_offset; - fru_data.buf_start = temp_address; - fru_data.buf = (char *)&temps; - fru_data.read_size = sizeof (temps); - status = psvc_get_attr(hdlp, fru, PSVC_FRU_INFO_ATTR, - &fru_data); - if (status != PSVC_SUCCESS) { - syslog(LOG_ERR, - "Failed psvc_get_attr for FRU info\n"); - return (status); - } else { - /* - * Now set the updated Thresholds - */ - for (j = 0; j < MAX_TEMP_ATTR; j++) { - temp = temps[j]; - status = psvc_set_attr(hdlp, id, - temp_attr[j], &temp); - } - } - } else { - /* - * For Littleneck only we need to check for the part - * number of the CPU as there are parts that do not - * have the ES segment programmed. - */ - seg_found = find_segment(hdlp, fru, &segment, "SD"); - if (seg_found == PSVC_FAILURE) - return (PSVC_FAILURE); - if (seg_found) { - /* - * We now goto the SD segment to get the part - * number. - */ - fru_data.buf_start = - segment.segoffset + PART_NO_OFFSET; - fru_data.buf = part_no; - fru_data.read_size = sizeof (part_no); - status = psvc_get_attr(hdlp, fru, - PSVC_FRU_INFO_ATTR, &fru_data); - if (status != PSVC_SUCCESS) { - syslog(LOG_ERR, "Failed psvc_get_attr" - "for FRU info\n"); - return (status); - } - /* - * We are go through the parts list to see - * if the part number from the FRU is in - * this list. If it is we simply return - * as the FRU is not programmed. - */ - for (j = 0; j < num_of_parts; j++) { - if (memcmp(fruless_parts[j], part_no, - 7) == 0) { - return (status); - } - } - } - - /* - * If the Part is not in the Part list and we - * get to here this means that the FRU is - * considered broken (no ES segment found) - * and we need to report this. - */ - /* - * We make this open, write, close, call - * because picld starts in rcS.d while print - * services does not start until later - * (either rc2.d or rc3.d). - */ - fd = open("/dev/console", O_WRONLY | O_NOCTTY); - if (fd != -1) { - fp = fdopen(fd, "w+"); - if (fp != NULL) { - fprintf(fp, NO_FRU_INFO, id); - fclose(fp); - } - close(fd); - } - syslog(LOG_NOTICE, NO_FRU_INFO, id); - } - } - return (status); -} - -int32_t -psvc_check_temperature_policy_0(psvc_opaque_t hdlp, char *id) -{ - int32_t lo_warn, hi_warn, lo_shut, hi_shut; - uint64_t features; - int32_t temp; - char previous_state[32]; - char state[32]; - char fault[32]; - char label[32]; - boolean_t pr; - int32_t status = PSVC_SUCCESS; - int retry; - int8_t temp_oor; - - status = psvc_get_attr(hdlp, id, PSVC_PRESENCE_ATTR, &pr); - if ((status != PSVC_SUCCESS) || (pr != PSVC_PRESENT)) { - return (status); - } - - status = psvc_get_attr(hdlp, id, PSVC_FEATURES_ATTR, &features); - if (status != PSVC_SUCCESS) - return (status); - - status = psvc_get_attr(hdlp, id, PSVC_LO_WARN_ATTR, &lo_warn); - if (status != PSVC_SUCCESS) - return (status); - - status = psvc_get_attr(hdlp, id, PSVC_LO_SHUT_ATTR, &lo_shut); - if (status != PSVC_SUCCESS) - return (status); - - status = psvc_get_attr(hdlp, id, PSVC_HI_WARN_ATTR, &hi_warn); - if (status != PSVC_SUCCESS) - return (status); - - status = psvc_get_attr(hdlp, id, PSVC_HI_SHUT_ATTR, &hi_shut); - if (status != PSVC_SUCCESS) - return (status); - - status = psvc_get_attr(hdlp, id, PSVC_LABEL_ATTR, label); - if (status != PSVC_SUCCESS) - return (status); - - retry = 0; - do { - if (retry) - (void) sleep(retry_sleep_temp); - status = psvc_get_attr(hdlp, id, PSVC_SENSOR_VALUE_ATTR, &temp); - if (status != PSVC_SUCCESS) { - if ((errno == ENOENT) || (errno == ENXIO)) - return (PSVC_SUCCESS); - else - return (PSVC_FAILURE); - } - temp_oor = 0; - if (((features & PSVC_LOW_SHUT) && temp <= lo_shut) || - ((features & PSVC_LOW_WARN) && temp <= lo_warn) || - ((features & PSVC_HIGH_SHUT) && temp >= hi_shut) || - ((features & PSVC_HIGH_WARN) && temp >= hi_warn)) - temp_oor = 1; - retry++; - } while ((retry < n_retry_temp) && temp_oor); - - if ((features & PSVC_LOW_SHUT) && temp <= lo_shut) { - strcpy(state, PSVC_ERROR); - strcpy(fault, PSVC_TEMP_LO_SHUT); - syslog(LOG_ERR, LOWTEMP_CRITICAL_MSG, temp, label); - } else if ((features & PSVC_LOW_WARN) && temp <= lo_warn) { - strcpy(state, PSVC_ERROR); - strcpy(fault, PSVC_TEMP_LO_WARN); - syslog(LOG_ERR, LOWTEMP_WARNING_MSG, temp, label); - } else if ((features & PSVC_HIGH_SHUT) && temp >= hi_shut) { - strcpy(state, PSVC_ERROR); - strcpy(fault, PSVC_TEMP_HI_SHUT); - syslog(LOG_ERR, HIGHTEMP_CRITICAL_MSG, temp, label); - } else if ((features & PSVC_HIGH_WARN) && temp >= hi_warn) { - strcpy(state, PSVC_ERROR); - strcpy(fault, PSVC_TEMP_HI_WARN); - syslog(LOG_ERR, HIGHTEMP_WARNING_MSG, temp, label); - } else { - /* within limits */ - strcpy(state, PSVC_OK); - strcpy(fault, PSVC_NO_FAULT); - } - - status = psvc_set_attr(hdlp, id, PSVC_STATE_ATTR, state); - if (status != PSVC_SUCCESS) - return (status); - status = psvc_set_attr(hdlp, id, PSVC_FAULTID_ATTR, fault); - if (status != PSVC_SUCCESS) - return (status); - status = psvc_get_attr(hdlp, id, PSVC_PREV_STATE_ATTR, - previous_state); - if (status != PSVC_SUCCESS) - return (status); - - if (strcmp(previous_state, state) != 0) { - char *led_id; - uint8_t _8bit_val; - - led_id = "SYSTEM_FAULT_LED_WR"; - - status = psvc_get_attr(hdlp, led_id, - PSVC_GPIO_VALUE_ATTR, &_8bit_val); - if (status != PSVC_SUCCESS) - return (status); - if (strcmp(state, PSVC_ERROR) == 0) - _8bit_val &= 0xef; /* clear bit 4 */ - else - _8bit_val |= 0x10; /* set bit 4 */ - _8bit_val |= 0xe4; /* set bits 3, 5, 6, 7 */ - - status = psvc_set_attr(hdlp, led_id, - PSVC_GPIO_VALUE_ATTR, &_8bit_val); - if (status != PSVC_SUCCESS) - return (status); - - } - - return (PSVC_SUCCESS); -} - -static int32_t ps0_addr[] = {0, 0xac}; -static int32_t ps1_addr[] = {0, 0xae}; - -int32_t -psvc_ps_hotplug_policy_0(psvc_opaque_t hdlp, char *id) -{ - boolean_t presence, previous_presence; - int32_t status = PSVC_SUCCESS; - char label[32]; - int i; - int32_t led_count; - char state[32], fault[32]; - boolean_t ps_type; - char *sensor_id, *led_id; - char led_state[32]; - picl_nodehdl_t parent_node; - char parent_path[256]; - picl_nodehdl_t child_node; - int ps_instance; - devctl_hdl_t bus_handle, dev_handle; - devctl_ddef_t ddef_hdl; - char devpath[256]; - int retry; - - status = psvc_get_attr(hdlp, id, PSVC_PREV_PRESENCE_ATTR, - &previous_presence); - if (status != PSVC_SUCCESS) - return (status); - retry = 0; - do { - if (retry) - (void) sleep(retry_sleep_hotplug); - status = psvc_get_attr(hdlp, id, PSVC_PRESENCE_ATTR, &presence); - if (status != PSVC_SUCCESS) - return (status); - retry++; - } while ((retry < n_retry_hotplug) && (presence != previous_presence)); - - if (presence == previous_presence) { - /* No change */ - return (status); - } - - status = psvc_get_attr(hdlp, id, PSVC_LABEL_ATTR, label); - if (status != PSVC_SUCCESS) - return (status); - - /* Convert name to node and parent path */ - psvcplugin_lookup(id, parent_path, &child_node); - - if (presence == PSVC_PRESENT) { - - /* may detect presence before all connections are made */ - sleep(1); - - /* Device added */ - syslog(LOG_ERR, DEVICE_INSERTED_MSG, label); - - - /* Verify P/S is correct type */ - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_ID_ATTR, - &sensor_id, PSVC_DEV_TYPE_SENSOR, 0); - if (status != PSVC_SUCCESS) - return (status); - status = psvc_get_attr(hdlp, sensor_id, - PSVC_GPIO_VALUE_ATTR, &ps_type); - if (status != PSVC_SUCCESS) - return (status); - - if (ps_type == 1) { /* correct p/s */ - strcpy(state, PSVC_OK); - strcpy(fault, PSVC_NO_FAULT); - strcpy(led_state, PSVC_LED_OFF); - } else { /* wrong type */ - strcpy(state, PSVC_ERROR); - strcpy(fault, PSVC_PS_TYPE_FLT); - strcpy(led_state, PSVC_LED_ON); - syslog(LOG_ERR, PS_TYPE_MSG, label); - - } - status = psvc_set_attr(hdlp, id, PSVC_STATE_ATTR, state); - if (status != PSVC_SUCCESS) - return (status); - status = psvc_set_attr(hdlp, id, PSVC_FAULTID_ATTR, fault); - if (status != PSVC_SUCCESS) - return (status); - - /* Set state of fault LEDs */ - status = psvc_get_attr(hdlp, sensor_id, PSVC_ASSOC_MATCHES_ATTR, - &led_count, PSVC_DEV_FAULT_LED); - if (status != PSVC_SUCCESS) { - syslog(LOG_ERR, - gettext("Failed for PSVC_DEV_FAULT_LED\n")); - return (status); - } - for (i = 0; i < led_count; ++i) { - status = psvc_get_attr(hdlp, sensor_id, - PSVC_ASSOC_ID_ATTR, &led_id, - PSVC_DEV_FAULT_LED, i); - if (status != PSVC_SUCCESS) - return (status); - status = psvc_set_attr(hdlp, led_id, - PSVC_LED_STATE_ATTR, led_state); - if (status != PSVC_SUCCESS) - return (status); - } - ptree_get_node_by_path(parent_path, &parent_node); - ptree_add_node(parent_node, child_node); - } else { - /* Device removed */ - syslog(LOG_ERR, DEVICE_REMOVED_MSG, label); - ptree_delete_node(child_node); - } - - status = psvc_set_attr(hdlp, id, PSVC_PREV_PRESENCE_ATTR, &presence); - if (status != PSVC_SUCCESS) - return (status); - - status = psvc_get_attr(hdlp, id, PSVC_INSTANCE_ATTR, &ps_instance); - if (status != PSVC_SUCCESS) - return (status); - - if (presence != PSVC_PRESENT) { - if (ps_instance == 0) - strcpy(devpath, - "/devices/pci@8,700000/ebus@5/i2c@1,30/power-supply@0,ac:power-supply"); - else - strcpy(devpath, - "/devices/pci@8,700000/ebus@5/i2c@1,30/power-supply@0,ae:power-supply"); - - dev_handle = devctl_device_acquire(devpath, 0); - - if (devctl_device_remove(dev_handle)) { - syslog(LOG_ERR, DEVTREE_NODE_DELETE_FAILED, label, - errno); - status = PSVC_FAILURE; - } else { - devctl_release(dev_handle); - status = PSVC_SUCCESS; - } - return (status); - } - - /* - * We fall through to here if the device has been inserted. - * Add the devinfo tree node entry for the seeprom and attach - * the i2c seeprom driver - */ - ddef_hdl = devctl_ddef_alloc("power-supply", 0); - (void) devctl_ddef_string(ddef_hdl, "compatible", "i2c-at24c64"); - if (ps_instance == 0) { - (void) devctl_ddef_int_array(ddef_hdl, "reg", 2, ps0_addr); - } else { - (void) devctl_ddef_int_array(ddef_hdl, "reg", 2, ps1_addr); - } - - bus_handle = devctl_bus_acquire( - "/devices/pci@8,700000/ebus@5/i2c@1,30:i2c", 0); - if (devctl_bus_dev_create(bus_handle, ddef_hdl, 0, &dev_handle)) { - syslog(LOG_ERR, DEVTREE_NODE_CREATE_FAILED, label, errno); - status = PSVC_FAILURE; - } else - devctl_release(dev_handle); - - devctl_release(bus_handle); - devctl_ddef_free(ddef_hdl); - - return (status); -} - -int32_t -psvc_device_fail_notifier_policy_0(psvc_opaque_t hdlp, char *id) -{ - int32_t sensor_count; - char *led_id, *sensor_id; - int i; - char state[32], fault[32], previous_state[32]; - int32_t status = PSVC_SUCCESS; - boolean_t present; - - status = psvc_get_attr(hdlp, id, PSVC_PRESENCE_ATTR, &present); - if (status == PSVC_FAILURE) - return (status); - - if (present == PSVC_ABSENT) { - errno = ENODEV; - return (PSVC_FAILURE); - } - - psvc_get_attr(hdlp, id, PSVC_ASSOC_MATCHES_ATTR, &sensor_count, - PSVC_DEV_FAULT_SENSOR); - for (i = 0; i < sensor_count; ++i) { - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_ID_ATTR, - &sensor_id, PSVC_DEV_FAULT_SENSOR, i); - if (status != PSVC_SUCCESS) - return (status); - - status = psvc_get_attr(hdlp, sensor_id, - PSVC_SWITCH_STATE_ATTR, state); - if (status != PSVC_SUCCESS) - return (status); - - if (strcmp(state, PSVC_SWITCH_ON) == 0) { - strcpy(state, PSVC_ERROR); - strcpy(fault, PSVC_GEN_FAULT); - } else { - strcpy(state, PSVC_OK); - strcpy(fault, PSVC_NO_FAULT); - } - - status = psvc_set_attr(hdlp, id, PSVC_STATE_ATTR, state); - if (status != PSVC_SUCCESS) - return (status); - status = psvc_set_attr(hdlp, id, PSVC_FAULTID_ATTR, fault); - if (status != PSVC_SUCCESS) - return (status); - status = psvc_get_attr(hdlp, id, PSVC_PREV_STATE_ATTR, - previous_state); - if (status != PSVC_SUCCESS) - return (status); - - if (strcmp(state, previous_state) != 0) { - char sensor_label[32]; - char dev_label[32]; - uint8_t _8bit_val; - - psvc_get_attr(hdlp, id, PSVC_LABEL_ATTR, dev_label); - psvc_get_attr(hdlp, sensor_id, PSVC_LABEL_ATTR, - sensor_label); - if (strcmp(state, PSVC_ERROR) == 0) - syslog(LOG_ERR, DEVICE_FAILURE_MSG, dev_label, - sensor_label); - else - syslog(LOG_ERR, DEVICE_OK_MSG, dev_label); - - led_id = "SYSTEM_FAULT_LED_WR"; - - status = psvc_get_attr(hdlp, led_id, - PSVC_GPIO_VALUE_ATTR, &_8bit_val); - if (status != PSVC_SUCCESS) - return (status); - - if (strcmp(state, PSVC_ERROR) == 0) - _8bit_val &= 0xef; /* clear bit 4 */ - else - _8bit_val |= 0x10; /* set bit 4 */ - _8bit_val |= 0xe4; /* set bits 3, 5, 6, 7 */ - - status = psvc_set_attr(hdlp, led_id, - PSVC_GPIO_VALUE_ATTR, &_8bit_val); - if (status != PSVC_SUCCESS) - return (status); - - } - } - - return (PSVC_SUCCESS); -} - -int32_t -psvc_init_led_policy_0(psvc_opaque_t hdlp, char *id) -{ - int32_t status = PSVC_SUCCESS; - uint8_t _8bit_val; - - status = psvc_get_attr(hdlp, id, - PSVC_GPIO_VALUE_ATTR, &_8bit_val); - if (status != PSVC_SUCCESS) - return (status); - - _8bit_val &= 0xef; /* clear bit 4 */ - _8bit_val |= 0xf4; /* set bits 3, 5, 6, 7 */ - - status = psvc_set_attr(hdlp, id, - PSVC_GPIO_VALUE_ATTR, &_8bit_val); - if (status != PSVC_SUCCESS) - return (status); - - return (status); -} - -static int32_t -check_cpu_temp_fault(psvc_opaque_t hdlp, char *cpu, int32_t cpu_count) -{ - char *sensorid; - int32_t sensor_count; - int32_t status = PSVC_SUCCESS; - int32_t i; - char fault[32]; - int retry; - int8_t temp_oor; - - psvc_get_attr(hdlp, cpu, PSVC_ASSOC_MATCHES_ATTR, &sensor_count, - PSVC_DEV_TEMP_SENSOR); - for (i = 0; i < sensor_count; ++i) { - status = psvc_get_attr(hdlp, cpu, PSVC_ASSOC_ID_ATTR, - &sensorid, PSVC_DEV_TEMP_SENSOR, i); - if (status == PSVC_FAILURE) - return (status); - - retry = 0; - do { - if (retry) - (void) sleep(retry_sleep_temp_shutdown); - status = psvc_get_attr(hdlp, sensorid, - PSVC_FAULTID_ATTR, fault); - if (status == PSVC_FAILURE) - return (status); - temp_oor = 0; - if ((strcmp(fault, PSVC_TEMP_HI_SHUT) == 0) || - (strcmp(fault, PSVC_TEMP_LO_SHUT) == 0)) { - temp_oor = 1; - } - retry++; - } while ((retry < n_retry_temp_shutdown) && temp_oor); - - if (temp_oor) { - system(shutdown_string); - } - } - - return (status); -} - -int32_t -psvc_shutdown_policy_0(psvc_opaque_t hdlp, char *id) -{ - int32_t cpu_count; - char *cpuid; - int32_t i; - boolean_t present; - int32_t status = PSVC_SUCCESS; - - psvc_get_attr(hdlp, id, PSVC_ASSOC_MATCHES_ATTR, &cpu_count, - PSVC_CPU); - for (i = 0; i < cpu_count; ++i) { - - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_ID_ATTR, &cpuid, - PSVC_CPU, i); - if (status == PSVC_FAILURE) - return (status); - - status = psvc_get_attr(hdlp, cpuid, - PSVC_PRESENCE_ATTR, &present); - if (status == PSVC_FAILURE && present == PSVC_PRESENT) - return (status); - if (present == PSVC_PRESENT) { - status = check_cpu_temp_fault(hdlp, cpuid, cpu_count); - if (status == PSVC_FAILURE && errno != ENODEV) - return (status); - } - } - - return (PSVC_SUCCESS); -} diff --git a/usr/src/cmd/picl/plugins/sun4u/lw2plus/Makefile b/usr/src/cmd/picl/plugins/sun4u/lw2plus/Makefile deleted file mode 100644 index d86341550d..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/lw2plus/Makefile +++ /dev/null @@ -1,49 +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 -# -# -#ident "%Z%%M% %I% %E% SMI" -# Copyright (c) 2001 by Sun Microsystems, Inc. -# All rights reserved. -# -# cmd/picl/plugins/sun4u/lw2plus/Makefile -# - -SUBDIRS= devtree fcal_leds frudata frutree - -MSGSUBDIRS= fcal_leds - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -.KEEP_STATE: - -all install clean clobber: $(SUBDIRS) - -_msg: $(MSGSUBDIRS) - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/lw2plus/devtree/Makefile b/usr/src/cmd/picl/plugins/sun4u/lw2plus/devtree/Makefile deleted file mode 100644 index 92083d4db3..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/lw2plus/devtree/Makefile +++ /dev/null @@ -1,62 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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. -# -# cmd/picl/plugins/sun4u/lw2plus/devtree/Makefile -# -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Netra-T4 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONF= picldevtree.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: - -install: $(ROOTLIBDIR) $(ROOTCONF) - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/lw2plus/devtree/picldevtree.conf b/usr/src/cmd/picl/plugins/sun4u/lw2plus/devtree/picldevtree.conf deleted file mode 100644 index 87042d3886..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/lw2plus/devtree/picldevtree.conf +++ /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 (c) 2001 by Sun Microsystems, Inc. -# All rights reserved. -# -#ident "%Z%%M% %I% %E% SMI" -# -# Platform specific .conf file for picldevtree plug-in -power-supply seeprom -fcal-backplane seeprom -scc-reader seeprom -lomlite2 seeprom diff --git a/usr/src/cmd/picl/plugins/sun4u/lw2plus/fcal_leds/Makefile b/usr/src/cmd/picl/plugins/sun4u/lw2plus/fcal_leds/Makefile deleted file mode 100644 index 76e9f21844..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/lw2plus/fcal_leds/Makefile +++ /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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# - -include $(SRC)/Makefile.psm - -LIBRARY= libfcal_leds.a -VERS= .1 - -OBJECTS= fcal_leds.o fc_led_parse.o fcal_leds_thread.o - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Netra-T4 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -SRCS= $(OBJECTS:%.o=%.c) - -LIBS = $(DYNLIB) - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONF= fcal_leds.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 - - -CPPFLAGS += -I$(SRC)/uts/sun4u/ -I$(SRC)/uts/common/ -CPPFLAGS += -D_POSIX_PTHREAD_SEMANTICS - -# Components of load time linker path. -# These paths start at / on the target machine, so don't use $(ROOT). -# However, to silence makestyle use empty string $(RUNTIMEROOT) -RUNTIMEROOT = -PICLPLATDYN = $(RUNTIMEROOT)/usr/platform/\$$PLATFORM/lib/picl/plugins -PICLARCHDYN = $(RUNTIMEROOT)/usr/platform/sun4u/lib/picl/plugins -PICLGENDYN = $(RUNTIMEROOT)/usr/lib/picl/plugins - -DYNFLAGS += -R$(PICLPLATDYN):$(PICLARCHDYN):$(PICLGENDYN) -LDLIBS += -L$(SRC)/lib/libpicltree/$(MACH) -LDLIBS += -L$(SRC)/cmd/picl/plugins/common/devtree -LDLIBS += -L$(SRC)/cmd/picl/plugins/common/piclevent -LDLIBS += -L$(SRC)/cmd/picl/plugins/common/frutree -LDLIBS += -L$(SRC)/cmd/picl/plugins/common/memcfg -LDLIBS += -lpicltree -lpicldevtree -lpiclfrutree -lnvpair -LDLIBS += -ldevinfo -lc - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -POFILE = piclfcal_leds_lw2plus.po -POFILES = $(SRCS:%.c=%.po) - -all: $(LIBS) $(LIBLINKS) - -install: $(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) $(ROOTCONF) - -$(POFILE): $(POFILES) - $(CAT) $(POFILES) > $(POFILE) - -_msg: $(MSGDOMAIN) $(POFILE) - $(RM) $(MSGDOMAIN)/$(POFILE) - $(CP) $(POFILE) $(MSGDOMAIN)/$(POFILE) - -$(MSGDOMAIN): - $(INS.dir) - - -$(LIBLINKS): FRC - $(RM) $@; $(SYMLINK) $(DYNLIB) $@ - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/lw2plus/fcal_leds/fc_led_parse.c b/usr/src/cmd/picl/plugins/sun4u/lw2plus/fcal_leds/fc_led_parse.c deleted file mode 100644 index d173d9e3cd..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/lw2plus/fcal_leds/fc_led_parse.c +++ /dev/null @@ -1,634 +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 (c) 2001 by Sun Microsystems, Inc. - * All rights reserved. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include "fcal_leds.h" - -/* - * function templates for static functions - */ -static token_t get_token(char **pptr, int lineNo, actfun_t *fun); -static int get_cstr(str *p_str, cstr *p_cstr_res); -static int get_assert(str *p_str, int *assert); -static int get_pnz(str *p_str, int *pnz); -static int get_mask(str *p_str, int n_disks, int *p_intarray); - -/* - * Templates for functions which may be returned by get_token(). - * These functions are all called with a pointer to the position just - * beyond the token being actioned. - */ -static int act_version(str *p_str, led_dtls_t *dtls); -static int act_leds_board(str *p_str, led_dtls_t *dtls); -static int act_status_board(str *p_str, led_dtls_t *dtls); -static int act_disk_driver(str *p_str, led_dtls_t *dtls); -static int act_n_disks(str *p_str, led_dtls_t *dtls); -static int act_asrt_pres(str *p_str, led_dtls_t *dtls); -static int act_asrt_fault(str *p_str, led_dtls_t *dtls); -static int act_led_on(str *p_str, led_dtls_t *dtls); -static int act_disk_present(str *p_str, led_dtls_t *dtls); -static int act_disk_fault(str *p_str, led_dtls_t *dtls); -static int act_led_id(str *p_str, led_dtls_t *dtls); -static int act_slow_poll(str *p_str, led_dtls_t *dtls); -static int act_fast_poll(str *p_str, led_dtls_t *dtls); -static int act_relax_interval(str *p_str, led_dtls_t *dtls); -static int act_test_interval(str *p_str, led_dtls_t *dtls); -static int act_disk_parent(str *p_str, led_dtls_t *dtls); -static int act_unit_parent(str *p_str, led_dtls_t *dtls); -static int act_led_nodes(str *p_str, led_dtls_t *dtls); - -/* - * The table below is used to lookup .conf file keywords to yield either - * a corresponding enum or a function to process the keyword. - */ -static lookup_t table[] = { - { FCAL_VERSION, "VERSION", act_version }, - { FCAL_REMOK_LED, "REMOK", NULL }, - { FCAL_FAULT_LED, "FAULT", NULL }, - { FCAL_READY_LED, "READY", NULL }, - { FCAL_LEDS_BOARD, "FCAL-LEDS", act_leds_board }, - { FCAL_STATUS_BOARD, "FCAL-STATUS", act_status_board }, - { FCAL_DISK_DRIVER, "FCAL-DISK-DRIVER", act_disk_driver }, - { FCAL_N_DISKS, "N-DISKS", act_n_disks }, - { FCAL_ASSERT_PRESENT, "ASSERT-PRESENT", act_asrt_pres }, - { FCAL_ASSERT_FAULT, "ASSERT-FAULT", act_asrt_fault }, - { FCAL_LED_ON, "LED-ON", act_led_on }, - { FCAL_DISK_PRESENT, "DISK-PRESENT", act_disk_present }, - { FCAL_DISK_FAULT, "DISK-FAULT", act_disk_fault }, - { FCAL_LED_ID, "LED", act_led_id }, - { FCAL_SLOW_POLL, "SLOW-POLL", act_slow_poll }, - { FCAL_FAST_POLL, "FAST-POLL", act_fast_poll }, - { FCAL_RELAX_INTERVAL, "RELAX-INTERVAL", act_relax_interval }, - { FCAL_TEST_INTERVAL, "LED-TEST-INTERVAL", act_test_interval }, - { FCAL_DISK_PARENT, "FCAL-DISK-PARENT", act_disk_parent }, - { FCAL_UNIT_PARENT, "DISK-UNIT-PARENT", act_unit_parent }, - { FCAL_LED_NODES, "DISK-LED-NODES", act_led_nodes } -}; - -/* - * length of longest string in table (with space for null terminator) - */ -#define MAX_FCAL_TOKEN_LEN 18 - -static const int tab_len = (sizeof (table))/sizeof (table[0]); - -/* - * get_token - * Parses the current line of data and returns the next token. - * If there are no significant characters in the line, NO_TOKEN is returned. - * If a syntax error is encountered, TOKEN_ERROR is returned. - * Pointer to position in current line is updated to point to the terminator - * of the token, unless TOKEN_ERROR is returned. - */ -static token_t -get_token( - char **pptr, /* pointer to pointer to position in current line */ - /* *ptr is updated by the function */ - int lineNo, /* current line number, used for syslog. If set to */ - /* zero, syslogging is supressed */ - actfun_t *fun) /* pointer to function variable to receive action */ - /* pointer for the token found. NULL may be returned */ -{ - char *ptr; - char *token_start; - int toklen; - int i; - int ch; - - *fun = NULL; - ptr = *pptr; - - /* strip leading white space */ - do { - ch = (unsigned)(*ptr++); - - } while (isspace(ch)); - - if ((ch == '\0') || (ch == '#')) { - *pptr = ptr; - return (NO_TOKEN); /* empty line or comment */ - } - - if (!isalpha(ch)) { - if (lineNo != 0) - SYSLOG(LOG_ERR, EM_NONALF_TOK, lineNo); - return (TOKEN_ERROR); - } - token_start = ptr - 1; - toklen = strcspn(token_start, ",: \t"); - *pptr = token_start + toklen; - /* - * got token, now look it up - */ - for (i = 0; i < tab_len; i++) { - if ((strncasecmp(token_start, table[i].tok_str, - toklen) == 0) && (table[i].tok_str[toklen] == '\0')) { - *fun = table[i].action; - return (table[i].tok); - } - } - if (lineNo != 0) - SYSLOG(LOG_ERR, EM_UNKN_TOK, lineNo); - return (TOKEN_ERROR); -} - -static int -act_version(str *p_str, led_dtls_t *dtls) -{ - dtls->ver_maj = strtoul(*p_str, p_str, 0); - if (*(*p_str)++ != '.') { - SYSLOG(LOG_ERR, EM_VER_FRMT); - return (-1); - } - dtls->ver_min = strtoul(*p_str, p_str, 0); - if ((**p_str != '\0') && !isspace(**p_str)) { - SYSLOG(LOG_ERR, EM_VER_FRMT); - return (-1); - } - if ((dtls->ver_maj != 1) || (dtls->ver_min != 0)) { - SYSLOG(LOG_ERR, EM_WRNGVER, dtls->ver_maj, dtls->ver_min); - return (-1); - } - return (0); -} - -/* - * get space to hold white-space terminated string at *p_str - * advance *p_str to point to terminator - * return copy of string, null terminated - */ -static int -get_cstr(str *p_str, cstr *p_cstr_res) -{ - int ch; - int len; - char *ptr; - - while (isspace(**p_str)) - (*p_str)++; - ptr = *p_str; - - do { - ch = *++ptr; - } while ((ch != '\0') && (!isspace(ch))); - - len = ptr - *p_str; - if (*p_cstr_res != NULL) - free((void *)(*p_cstr_res)); - ptr = malloc(len + 1); - *p_cstr_res = ptr; - if (ptr == NULL) { - return (ENOMEM); - } - (void) memcpy(ptr, *p_str, len); - ptr[len] = '\0'; - (*p_str) += len; - return (0); -} - -static int -act_leds_board(str *p_str, led_dtls_t *dtls) -{ - int res = get_cstr(p_str, &dtls->fcal_leds); - if (res == 0) { - if (dtls->fcal_leds[0] != '/') { - free((void *)dtls->fcal_leds); - dtls->fcal_leds = NULL; - SYSLOG(LOG_ERR, EM_REL_PATH); - return (-1); - } - } - return (res); -} - -static int -act_status_board(str *p_str, led_dtls_t *dtls) -{ - int res = get_cstr(p_str, &dtls->fcal_status); - if (res == 0) { - if (dtls->fcal_status[0] != '/') { - free((void *)dtls->fcal_status); - dtls->fcal_status = NULL; - SYSLOG(LOG_ERR, EM_REL_PATH); - return (-1); - } - } - return (res); -} - -static int -act_disk_driver(str *p_str, led_dtls_t *dtls) -{ - return (get_cstr(p_str, &dtls->fcal_driver)); -} - -static int -act_disk_parent(str *p_str, led_dtls_t *dtls) -{ - return (get_cstr(p_str, &dtls->fcal_disk_parent)); -} - -static int -act_unit_parent(str *p_str, led_dtls_t *dtls) -{ - return (get_cstr(p_str, &dtls->disk_unit_parent)); -} - -static int -act_led_nodes(str *p_str, led_dtls_t *dtls) -{ - return (get_cstr(p_str, &dtls->disk_led_nodes)); -} - -/* - * A number of fields in the led_dtls_t structure have per-disk copies. - * This action routine creates the space for all such fields. - * Following any failure, an error is returned and the calling routine - * must handle the fact that only a subset of these fields are populated. - * In practice, this function is only called by get_token() on behalf of - * fc_led_parse(). fc_led_parse calls free_led_dtls() after any error. - */ -static int -act_n_disks(str *p_str, led_dtls_t *dtls) -{ - int i; - - if (dtls->n_disks != 0) { - SYSLOG(LOG_ERR, EM_NDISKS_DBL); - return (-1); - } - dtls->n_disks = strtoul(*p_str, p_str, 0); - if ((**p_str != '\0') && !isspace(**p_str)) { - SYSLOG(LOG_ERR, EM_NUM_TERM); - return (-1); - } - if (dtls->n_disks < 1) { - SYSLOG(LOG_ERR, EM_NO_DISKS); - return (-1); - } - dtls->presence = calloc(dtls->n_disks, sizeof (int)); - if (dtls->presence == NULL) - return (ENOMEM); - dtls->faults = calloc(dtls->n_disks, sizeof (int)); - if (dtls->faults == NULL) - return (ENOMEM); - dtls->disk_detected = calloc(dtls->n_disks, sizeof (int)); - if (dtls->disk_detected == NULL) - return (ENOMEM); - dtls->disk_ready = calloc(dtls->n_disks, sizeof (int)); - if (dtls->disk_ready == NULL) - return (ENOMEM); - dtls->disk_prev = calloc(dtls->n_disks, sizeof (int)); - if (dtls->disk_prev == NULL) - return (ENOMEM); - dtls->led_test_end = calloc(dtls->n_disks, sizeof (int)); - if (dtls->led_test_end == NULL) - return (ENOMEM); - dtls->picl_retry = calloc(dtls->n_disks, sizeof (boolean_t)); - if (dtls->picl_retry == NULL) - return (ENOMEM); - dtls->disk_port = calloc(dtls->n_disks, sizeof (char *)); - if (dtls->disk_port == NULL) { - return (ENOMEM); - } - for (i = 0; i < FCAL_LED_CNT; i++) { - dtls->led_addr[i] = calloc(dtls->n_disks, sizeof (int)); - if (dtls->led_addr[i] == NULL) - return (ENOMEM); - dtls->led_state[i] = calloc(dtls->n_disks, - sizeof (led_state_t)); - if (dtls->led_state[i] == NULL) - return (ENOMEM); - } - return (0); -} - -static int -get_assert(str *p_str, int *assert) -{ - int i = strtoul(*p_str, p_str, 0); - if ((**p_str != '\0') && !isspace(**p_str)) { - SYSLOG(LOG_ERR, EM_NUM_TERM); - return (-1); - } - if ((i != 0) && (i != 1)) { - SYSLOG(LOG_ERR, EM_LOGIC_LVL); - return (-1); - } - *assert = i; - return (0); -} - -static int -get_pnz(str *p_str, int *pnz) -{ - int i = strtoul(*p_str, p_str, 0); - if ((**p_str != '\0') && !isspace(**p_str)) { - SYSLOG(LOG_ERR, EM_NUM_TERM); - return (-1); - } - if (i < 1) { - SYSLOG(LOG_ERR, EM_NOTPOS); - return (-1); - } - *pnz = i; - return (0); -} - -static int -act_asrt_pres(str *p_str, led_dtls_t *dtls) -{ - return (get_assert(p_str, &dtls->assert_presence)); -} - -static int -act_asrt_fault(str *p_str, led_dtls_t *dtls) -{ - return (get_assert(p_str, &dtls->assert_fault)); -} - -static int -act_led_on(str *p_str, led_dtls_t *dtls) -{ - return (get_assert(p_str, &dtls->assert_led_on)); -} - -static int -get_mask(str *p_str, int n_disks, int *p_intarray) -{ - int i; - int j = strtoul(*p_str, p_str, 0); - if (*(*p_str)++ != ',') { - SYSLOG(LOG_ERR, EM_NUM_TERM); - return (-1); - } - if ((j < 0) || (j > n_disks)) { - SYSLOG(LOG_ERR, EM_DISK_RANGE); - return (-1); - } - i = strtoul(*p_str, p_str, 0); - if ((**p_str != '\0') && !isspace(**p_str)) { - SYSLOG(LOG_ERR, EM_NUM_TERM); - return (-1); - } - p_intarray[j] = i; - return (0); -} - -static int -act_disk_present(str *p_str, led_dtls_t *dtls) -{ - return (get_mask(p_str, dtls->n_disks, dtls->presence)); -} - -static int -act_disk_fault(str *p_str, led_dtls_t *dtls) -{ - return (get_mask(p_str, dtls->n_disks, dtls->faults)); -} - -static int -act_led_id(str *p_str, led_dtls_t *dtls) -{ - token_t tok; - actfun_t action; - int i; - int j = strtoul(*p_str, p_str, 0); - - if (*(*p_str)++ != ',') { - SYSLOG(LOG_ERR, EM_NUM_TERM); - return (-1); - } - if ((j < 0) || (j >= dtls->n_disks)) { - SYSLOG(LOG_ERR, EM_DISK_RANGE); - return (-1); - } - tok = get_token(p_str, 0, &action); - if ((tok <= LED_PROPS_START) || (tok >= LED_PROPS_END)) { - SYSLOG(LOG_ERR, EM_NO_LED_PROP); - return (-1); - } - if (*(*p_str)++ != ',') { - SYSLOG(LOG_ERR, EM_PROP_TERM); - return (-1); - } - i = strtoul(*p_str, p_str, 0); - if ((**p_str != '\0') && !isspace(**p_str)) { - SYSLOG(LOG_ERR, EM_NUM_TERM); - return (-1); - } - dtls->led_addr[tok - FCAL_REMOK_LED][j] = i; - return (0); -} - -static int -act_slow_poll(str *p_str, led_dtls_t *dtls) -{ - return (get_pnz(p_str, &dtls->slow_poll_ticks)); -} - -static int -act_fast_poll(str *p_str, led_dtls_t *dtls) -{ - return (get_pnz(p_str, &dtls->fast_poll)); -} - -static int -act_relax_interval(str *p_str, led_dtls_t *dtls) -{ - return (get_pnz(p_str, &dtls->relax_time_ticks)); -} - -static int -act_test_interval(str *p_str, led_dtls_t *dtls) -{ - return (get_pnz(p_str, &dtls->led_test_time)); -} - -/* - * Create a led_dtls_t structure - * Parse configuration file and populate the led_dtls_t - * In the event of an error, free the structure and return an error - */ -int -fc_led_parse(FILE *fp, led_dtls_t **p_dtls) -{ - int lineNo = 0; - int err = 0; - char linebuf[160]; - char *ptr; - led_dtls_t *dtls = calloc(1, sizeof (led_dtls_t)); - actfun_t action; - token_t tok; - - *p_dtls = dtls; - if (dtls == NULL) { - return (ENOMEM); - } - dtls->ver_min = -1; /* mark as version unknown */ - - while ((ptr = fgets(linebuf, sizeof (linebuf), fp)) != NULL) { - lineNo++; - tok = get_token(&ptr, lineNo, &action); - if (tok == NO_TOKEN) - continue; - if (tok == TOKEN_ERROR) { - err = -1; - break; - } - if (tok == FCAL_VERSION) { - if ((err = (*action)(&ptr, dtls)) != 0) - break; - else - continue; - } - if (dtls->ver_min < 0) { - SYSLOG(LOG_ERR, EM_NOVERS); - err = -1; - break; - } - if (tok <= LINE_DEFS) { - SYSLOG(LOG_ERR, EM_INVAL_TOK, lineNo); - err = -1; - break; - } - if (*ptr++ != ':') { - SYSLOG(LOG_ERR, EM_NOCOLON, lineNo); - err = -1; - break; - } - if ((err = (*action)(&ptr, dtls)) != 0) { - SYSLOG(LOG_ERR, EM_ERRLINE, lineNo); - break; - } - else - continue; - } - - if (err == 0) { - err = -1; /* just in case */ - if (dtls->ver_min < 0) { - SYSLOG(LOG_ERR, EM_NOVERS); - } else if (dtls->n_disks == 0) { - SYSLOG(LOG_ERR, EM_NO_DISKS); - } else if (dtls->fcal_leds == NULL) { - SYSLOG(LOG_ERR, EM_STR_NOT_SET, "fcal-leds"); - } else if (dtls->fcal_status == NULL) { - SYSLOG(LOG_ERR, EM_STR_NOT_SET, "fcal-status"); - } else if (dtls->fcal_driver == NULL) { - SYSLOG(LOG_ERR, EM_STR_NOT_SET, "fcal-driver"); - } else - err = 0; - } - - if (err != 0) { - /* - * clean up after error detected - */ - free_led_dtls(dtls); - *p_dtls = NULL; - return (err); - } - - /* - * set any unset timers to default time - */ - if (dtls->slow_poll_ticks == 0) - dtls->slow_poll_ticks = DFLT_SLOW_POLL; - if (dtls->fast_poll == 0) - dtls->fast_poll = DFLT_FAST_POLL; - if (dtls->relax_time_ticks == 0) - dtls->relax_time_ticks = DFLT_RELAX_TIME; - if (dtls->led_test_time == 0) - dtls->led_test_time = DFLT_TEST_TIME; - - /* - * set polling flag to avoid a start-up glitch - * it will be cleared again if the poll thread fails - */ - dtls->polling = B_TRUE; - - /* - * convert derived timers to multiples of fast poll time - */ - dtls->slow_poll_ticks += dtls->fast_poll - 1; /* for round up */ - dtls->slow_poll_ticks /= dtls->fast_poll; - dtls->relax_time_ticks += dtls->fast_poll - 1; - dtls->relax_time_ticks /= dtls->fast_poll; - dtls->led_test_time += dtls->fast_poll - 1; - dtls->led_test_time /= dtls->fast_poll; - return (0); -} - -void -free_led_dtls(led_dtls_t *dtls) -{ - int i; - - if (dtls == NULL) - return; - if (dtls->fcal_leds != NULL) - free((void *)dtls->fcal_leds); - if (dtls->fcal_status != NULL) - free((void *)dtls->fcal_status); - if (dtls->fcal_driver != NULL) - free((void *)dtls->fcal_driver); - if (dtls->presence != NULL) - free((void *)dtls->presence); - if (dtls->faults != NULL) - free((void *)dtls->faults); - if (dtls->disk_detected != NULL) - free((void *)dtls->disk_detected); - if (dtls->disk_ready != NULL) - free((void *)dtls->disk_ready); - if (dtls->disk_prev != NULL) - free((void *)dtls->disk_prev); - if (dtls->led_test_end != NULL) - free((void *)dtls->led_test_end); - if (dtls->picl_retry != NULL) - free((void *)dtls->picl_retry); - if (dtls->disk_port != NULL) { - for (i = 0; i < dtls->n_disks; i++) { - free(dtls->disk_port[i]); - } - free(dtls->disk_port); - } - for (i = 0; i < FCAL_LED_CNT; i++) { - if (dtls->led_addr[i] != NULL) - free((void *)dtls->led_addr[i]); - if (dtls->led_state[i] != NULL) - free((void *)dtls->led_state[i]); - } - - free(dtls); -} diff --git a/usr/src/cmd/picl/plugins/sun4u/lw2plus/fcal_leds/fcal_leds.c b/usr/src/cmd/picl/plugins/sun4u/lw2plus/fcal_leds/fcal_leds.c deleted file mode 100644 index 5fa2640007..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/lw2plus/fcal_leds/fcal_leds.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, 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 (c) 2001 by Sun Microsystems, Inc. - * All rights reserved. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * This plugin checks the status of FC-AL disks periodically and - * in response to PICL events. It adjusts the state of the FC-AL LEDs - * to match the disk status. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "fcal_leds.h" - -static void fcal_leds_register(void); -static void fcal_leds_init(void); -static void fcal_leds_fini(void); -static void *fcal_poll_thread(void *args); -static FILE *open_config(void); -static int read_led_state(ptree_rarg_t *parg, void *buf); -static void add_led_refs(led_dtls_t *dtls); -static void delete_led_refs(led_dtls_t *dtls); -static void piclfcal_evhandler(const char *ename, const void *earg, - size_t size, void *cookie); - -/* - * Global thread data - */ -led_dtls_t *g_led_dtls = NULL; -pthread_cond_t g_cv; -pthread_cond_t g_cv_ack; -pthread_mutex_t g_mutex; -volatile int g_event_flag; -volatile boolean_t g_finish_now = B_FALSE; -volatile boolean_t g_leds_thread_ack = B_FALSE; - -static picld_plugin_reg_t my_reg_info = { - PICLD_PLUGIN_VERSION_1, - PICLD_PLUGIN_NON_CRITICAL, - "SUNW_fcal_leds", - fcal_leds_init, - fcal_leds_fini -}; - -static boolean_t cvAndMutexInit = B_FALSE; -static pthread_t ledsthr_tid; -static pthread_attr_t ledsthr_attr; -static boolean_t ledsthr_created = B_FALSE; -static pthread_t pollthr_tid; -static pthread_attr_t pollthr_attr; -static boolean_t pollthr_created = B_FALSE; -static volatile boolean_t poll_thread_ack = B_FALSE; - -/* - * look up table for LED state - */ -static struct { - const led_state_t led_state; - const char *state_str; -} state_lookup[] = { - { LED_STATE_OFF, FCAL_PICL_LED_OFF }, - { LED_STATE_ON, FCAL_PICL_LED_ON }, - { LED_STATE_TEST, FCAL_PICL_LED_TEST } -}; - -#define state_lkup_len (sizeof (state_lookup) / sizeof (state_lookup[0])) - -/* - * executed as part of .init when the plugin is dlopen()ed - */ -#pragma init(fcal_leds_register) - -static void -fcal_leds_register(void) -{ - (void) picld_plugin_register(&my_reg_info); -} - -/* ARGSUSED */ -static void -piclfcal_evhandler(const char *ename, const void *earg, size_t size, - void *cookie) -{ - int r; - - if (earg == NULL) - return; - - r = pthread_mutex_lock(&g_mutex); - - if (r != 0) { - SYSLOG(LOG_ERR, EM_MUTEX_FAIL, mystrerror(r)); - return; - } - g_event_flag |= FCAL_EV_CONFIG; - (void) pthread_cond_signal(&g_cv); - - (void) pthread_mutex_unlock(&g_mutex); -} - -/* - * Locate and open relevant config file - */ -static FILE * -open_config(void) -{ - FILE *fp = NULL; - char nmbuf[SYS_NMLN]; - char fname[PATH_MAX]; - - if (sysinfo(SI_PLATFORM, nmbuf, sizeof (nmbuf)) == -1) - return (NULL); - (void) snprintf(fname, sizeof (fname), PICLD_PLAT_PLUGIN_DIRF, nmbuf); - (void) strlcat(fname, FCAL_LEDS_CONF_FILE, sizeof (fname)); - fp = fopen(fname, "r"); - if (fp == NULL) { - SYSLOG(LOG_ERR, EM_CANT_OPEN, fname); - } - return (fp); -} - -/* - * read volatile property function for led State - */ -static int -read_led_state(ptree_rarg_t *parg, void *buf) -{ - led_dtls_t *dtls = g_led_dtls; - picl_nodehdl_t nodeh = parg->nodeh; - /* - * valbuf has space for a unit address at the end - */ - char valbuf[MAX_LEN_UNIT_ADDRESS]; - char *ptr; - uint_t addr; - int disk, led; - led_state_t stat; - /* - * each led-unit node has a UnitAddress property set to the bit - * value associated with the led. Read that property - */ - int r = ptree_get_propval_by_name(nodeh, PICL_PROP_UNIT_ADDRESS, - valbuf, sizeof (valbuf)); - if (r != PICL_SUCCESS) - return (r); - valbuf[sizeof (valbuf) - 1] = '\0'; /* ensure null terminated */ - /* UnitAddress is a string of hex digits, convert to an int */ - addr = strtoul(valbuf, &ptr, 16); - if (dtls == NULL) - return (PICL_PROPVALUNAVAILABLE); - /* - * search the leds of each disk for a match with this UnitAddress - */ - for (disk = 0; disk < dtls->n_disks; disk++) { - for (led = 0; led < FCAL_LED_CNT; led++) { - if (addr == dtls->led_addr[led][disk]) - break; - } - if (led < FCAL_LED_CNT) - break; - } - if (disk == dtls->n_disks) - return (PICL_PROPVALUNAVAILABLE); - stat = dtls->led_state[led][disk]; - /* - * state_lookup is a table relating led-state enums to equivalent - * text strings. Locate the string for the current state. - */ - for (r = 0; r < state_lkup_len; r++) { - if (state_lookup[r].led_state == stat) { - (void) strlcpy(buf, state_lookup[r].state_str, - MAX_LEN_LED_STATE); - return (PICL_SUCCESS); - } - } - return (PICL_PROPVALUNAVAILABLE); -} - -int -find_disk_slot(led_dtls_t *dtls, int disk, picl_nodehdl_t *nodeh) -{ - int r; - int unitlen; - char unitstr[MAXPATHLEN]; - - if (dtls->disk_unit_parent == NULL) { - return (PICL_NODENOTFOUND); - } - unitlen = strlen(dtls->disk_unit_parent); - /* - * get search string buffer, allow space for address - */ - (void) strlcpy(unitstr, dtls->disk_unit_parent, MAXPATHLEN); - (void) snprintf(unitstr + unitlen, MAXPATHLEN - unitlen, "%x", disk); - r = ptree_get_node_by_path(unitstr, nodeh); - return (r); -} - -int -create_Device_table(picl_prophdl_t *tbl_h, picl_prophdl_t *tableh) -{ - int r; - ptree_propinfo_t propinfo; - - r = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_TABLE, PICL_READ, sizeof (picl_prophdl_t), - PICL_PROP_DEVICES, NULL, NULL); - if (r != PICL_SUCCESS) { - return (r); - } - r = ptree_create_table(tbl_h); - if (r != PICL_SUCCESS) { - return (r); - } - r = ptree_create_prop(&propinfo, tbl_h, tableh); - return (r); -} - -/* - * Locate disk-slot nodes and add DeviceTable of LED references - * Also add a volatile State property to each LED node - */ -static void -add_led_refs(led_dtls_t *dtls) -{ - int d, i, r; - int ledlen; - char ledstr[MAXPATHLEN]; - picl_nodehdl_t slot_node; - - if (dtls->disk_led_nodes == NULL) { - return; - } - ledlen = strlen(dtls->disk_led_nodes); - /* set up search string in buffer with space to append address */ - (void) strlcpy(ledstr, dtls->disk_led_nodes, MAXPATHLEN); - for (d = 0; d < dtls->n_disks; d++) { - picl_prophdl_t tbl_hdl; - picl_prophdl_t tbl_prop_hdl; - picl_nodehdl_t led_node_hdl; - picl_prophdl_t tbl_prop[FCAL_DEVTABLE_NCOLS]; - ptree_propinfo_t propinfo; - - r = create_Device_table(&tbl_hdl, &tbl_prop_hdl); - if (r != PICL_SUCCESS) - break; - - /* - * locate disk-slot node in frutree - */ - if (find_disk_slot(dtls, d, &slot_node) != PICL_SUCCESS) - break; - - for (i = 0; i < FCAL_LED_CNT; i++) { - /* - * For each disk-slot in frutree, add a device - * table of references to relevant LEDs. - * En passant, add a volatile State property to - * each LED node found. - */ - /* - * append led address to search string - */ - (void) snprintf(ledstr + ledlen, MAXPATHLEN - ledlen, - "%x", dtls->led_addr[i][d]); - r = ptree_get_node_by_path(ledstr, &led_node_hdl); - if (r != PICL_SUCCESS) { - break; - } - r = ptree_init_propinfo(&propinfo, - PTREE_PROPINFO_VERSION, PICL_PTYPE_CHARSTRING, - PICL_READ | PICL_VOLATILE, MAX_LEN_LED_STATE, - PICL_PROP_STATE, read_led_state, NULL); - if (r != PICL_SUCCESS) { - break; - } - r = ptree_create_and_add_prop(led_node_hdl, - &propinfo, NULL, NULL); - if (r != PICL_SUCCESS) { - break; - } - r = ptree_init_propinfo(&propinfo, - PTREE_PROPINFO_VERSION, PICL_PTYPE_CHARSTRING, - PICL_READ, sizeof (PICL_CLASS_LED), - PICL_PROP_CLASS, NULL, NULL); - if (r != PICL_SUCCESS) { - break; - } - r = ptree_create_prop(&propinfo, PICL_CLASS_LED, - &tbl_prop[0]); - if (r != PICL_SUCCESS) { - break; - } - r = ptree_init_propinfo(&propinfo, - PTREE_PROPINFO_VERSION, PICL_PTYPE_REFERENCE, - PICL_READ, sizeof (picl_prophdl_t), - FCAL_PICL_LED_REF, NULL, NULL); - if (r != PICL_SUCCESS) { - break; - } - r = ptree_create_prop(&propinfo, &led_node_hdl, - &tbl_prop[1]); - if (r != PICL_SUCCESS) { - break; - } - r = ptree_add_row_to_table(tbl_hdl, - FCAL_DEVTABLE_NCOLS, tbl_prop); - if (r != PICL_SUCCESS) { - break; - } - } - if (r != PICL_SUCCESS) - break; - (void) ptree_add_prop(slot_node, tbl_prop_hdl); - } -} - -/* - * This is an undo function to match add_led_refs() - * Locate disk-slot nodes and remove Devices table of LED references - * Also remove volatile State property to each LED node - */ -static void -delete_led_refs(led_dtls_t *dtls) -{ - int d; - int i; - int r; - int ledlen; - picl_nodehdl_t node_hdl; - picl_prophdl_t prop_hdl; - char ledstr[MAXPATHLEN]; - - if (dtls->disk_led_nodes == NULL) - return; - - for (d = 0; d < dtls->n_disks; d++) { - if (find_disk_slot(dtls, d, &node_hdl) != PICL_SUCCESS) - continue; - if (ptree_get_prop_by_name(node_hdl, PICL_PROP_DEVICES, - &prop_hdl) != PICL_SUCCESS) - continue; - if (ptree_delete_prop(prop_hdl) != PICL_SUCCESS) - continue; - (void) ptree_destroy_prop(prop_hdl); - } - - ledlen = strlen(dtls->disk_led_nodes); - (void) strlcpy(ledstr, dtls->disk_led_nodes, MAXPATHLEN); - - for (d = 0; d < dtls->n_disks; d++) { - for (i = 0; i < FCAL_LED_CNT; i++) { - /* - * find each led node - */ - (void) snprintf(ledstr + ledlen, MAXPATHLEN - ledlen, - "%x", dtls->led_addr[i][d]); - r = ptree_get_node_by_path(ledstr, &node_hdl); - if (r != PICL_SUCCESS) - continue; - /* - * locate and delete the volatile State property - */ - if (ptree_get_prop_by_name(node_hdl, - PICL_PROP_STATE, &prop_hdl) != PICL_SUCCESS) - continue; - if (ptree_delete_prop(prop_hdl) != PICL_SUCCESS) - continue; - (void) ptree_destroy_prop(prop_hdl); - } - } -} - -/* - * Poll thread. - * This thread sits on a poll() call for the fast poll interval. - * At each wake up it determines if a time event should be passed on. - * Poll seems to be reliable when the realtime clock is wound backwards, - * whereas pthread_cond_timedwait() is not. - */ -/*ARGSUSED*/ -static void * -fcal_poll_thread(void *args) -{ - led_dtls_t *dtls = NULL; - int c; - int slow_poll_count; - boolean_t do_event; - - for (;;) { - if (g_finish_now) { - c = pthread_mutex_lock(&g_mutex); - - if (c != 0) { - SYSLOG(LOG_ERR, EM_MUTEX_FAIL, mystrerror(c)); - break; - } - poll_thread_ack = B_TRUE; - (void) pthread_cond_signal(&g_cv_ack); - (void) pthread_cond_wait(&g_cv, &g_mutex); - - (void) pthread_mutex_unlock(&g_mutex); - continue; - } - - /* - * If picld has been recycled, or if this is the initial - * entry, dtls will not match g_led_dtls. - * In this case, do some resetting. - */ - if (dtls != g_led_dtls) { - dtls = g_led_dtls; - slow_poll_count = dtls->slow_poll_ticks; - dtls->polling = B_TRUE; - } - - c = poll(NULL, 0, dtls->fast_poll * 1000); - if (c == -1) { - SYSLOG(LOG_ERR, EM_POLL_FAIL, mystrerror(errno)); - break; - } - /* - * dtls->fast_poll_end is the number of fast poll times left - * before we revert to slow polling. If it is non-zero, the - * fcal_leds thread is do fast polling and we pass on every - * poll wakeup. - */ - do_event = (dtls->fast_poll_end != 0); - /* - * If a LED test is underway, fast polling would normally be - * set also. Just in case the timers are configured unusually, - * pass on all poll wakeups while a LED test is current. - */ - if ((!do_event) && is_led_test(dtls)) - do_event = B_TRUE; - if (!do_event) { - /* - * If we get here, the fcal_leds thread is only doing - * slow polls. Count down the slow_poll_count and set - * an event if it expires. - */ - if (--slow_poll_count == 0) { - slow_poll_count = dtls->slow_poll_ticks; - do_event = B_TRUE; - } - } - if (do_event) { - c = pthread_mutex_lock(&g_mutex); - - if (c != 0) { - SYSLOG(LOG_ERR, EM_MUTEX_FAIL, mystrerror(c)); - break; - } - /* - * indicate in the event flag that this is a time event - */ - g_event_flag |= FCAL_EV_POLL; - (void) pthread_cond_signal(&g_cv); - - (void) pthread_mutex_unlock(&g_mutex); - } - } - - dtls->polling = B_FALSE; - - /* - * if picld restarted, allow this thread to be recreated - */ - pollthr_created = B_FALSE; - - return ((void *)errno); -} - -/* - * Init entry point of the plugin - * Opens and parses config file. - * Establishes an interrupt routine to catch DEVICE ADDED/REMOVED events - * and starts a new thread for polling FC-AL disk status information. - */ -static void -fcal_leds_init(void) -{ - FILE *fp; - int err = 0; - - if ((fp = open_config()) == NULL) - return; - if (fc_led_parse(fp, &g_led_dtls) != 0) { - (void) fclose(fp); - return; - } - (void) fclose(fp); - g_finish_now = B_FALSE; - g_event_flag = 0; - - if (!cvAndMutexInit) { - if ((pthread_cond_init(&g_cv, NULL) == 0) && - (pthread_cond_init(&g_cv_ack, NULL) == 0) && - (pthread_mutex_init(&g_mutex, NULL) == 0)) { - cvAndMutexInit = B_TRUE; - } else { - return; - } - } - - add_led_refs(g_led_dtls); - - (void) ptree_register_handler(PICLEVENT_SYSEVENT_DEVICE_ADDED, - piclfcal_evhandler, NULL); - (void) ptree_register_handler(PICLEVENT_SYSEVENT_DEVICE_REMOVED, - piclfcal_evhandler, NULL); - - if (ledsthr_created || pollthr_created) { - /* - * so this is a restart, wake up sleeping threads - */ - err = pthread_mutex_lock(&g_mutex); - - if (err != 0) { - SYSLOG(LOG_ERR, EM_MUTEX_FAIL, mystrerror(err)); - return; - } - g_leds_thread_ack = B_FALSE; - poll_thread_ack = B_FALSE; - (void) pthread_cond_broadcast(&g_cv); - - (void) pthread_mutex_unlock(&g_mutex); - } - if (!ledsthr_created) { - if ((pthread_attr_init(&ledsthr_attr) != 0) || - (pthread_attr_setscope(&ledsthr_attr, - PTHREAD_SCOPE_SYSTEM) != 0)) - return; - - if ((err = pthread_create(&ledsthr_tid, &ledsthr_attr, - fcal_leds_thread, g_led_dtls)) != 0) { - SYSLOG(LOG_ERR, EM_THREAD_CREATE_FAILED, - mystrerror(err)); - return; - } - - ledsthr_created = B_TRUE; - } - - if (pollthr_created == B_FALSE) { - if ((pthread_attr_init(&pollthr_attr) != 0) || - (pthread_attr_setscope(&pollthr_attr, - PTHREAD_SCOPE_SYSTEM) != 0)) - return; - - if ((err = pthread_create(&pollthr_tid, &pollthr_attr, - fcal_poll_thread, g_led_dtls)) != 0) { - g_led_dtls->polling = B_FALSE; - SYSLOG(LOG_ERR, EM_THREAD_CREATE_FAILED, - mystrerror(err)); - return; - } - - pollthr_created = B_TRUE; - } -} - -/* - * fini entry point of the plugin - */ -static void -fcal_leds_fini(void) -{ - int c; - - /* unregister event handlers */ - (void) ptree_unregister_handler(PICLEVENT_SYSEVENT_DEVICE_ADDED, - piclfcal_evhandler, NULL); - (void) ptree_unregister_handler(PICLEVENT_SYSEVENT_DEVICE_REMOVED, - piclfcal_evhandler, NULL); - /* - * it's very confusing to leave uncontrolled leds on, so clear them. - */ - if (g_led_dtls != NULL) { - int ledNo; - int diskNo; - for (ledNo = 0; ledNo < FCAL_LED_CNT; ledNo++) { - if ((g_led_dtls->led_addr[ledNo] == NULL) || - (g_led_dtls->led_state[ledNo] == NULL)) { - break; /* incomplete setup */ - } - for (diskNo = 0; diskNo < g_led_dtls->n_disks; - diskNo++) { - clr_led(diskNo, LED_PROPS_START + 1 + ledNo, - g_led_dtls); - } - } - } - /* - * tell other threads to stop - */ - if (cvAndMutexInit && (ledsthr_created || pollthr_created)) { - g_finish_now = B_TRUE; - c = pthread_mutex_lock(&g_mutex); - if (c != 0) { - SYSLOG(LOG_ERR, EM_MUTEX_FAIL, mystrerror(c)); - } else { - (void) pthread_cond_broadcast(&g_cv); - (void) pthread_mutex_unlock(&g_mutex); - - /* - * and wait for them to acknowledge - */ - while ((ledsthr_created && !g_leds_thread_ack) || - (pollthr_created && !poll_thread_ack)) { - c = pthread_mutex_lock(&g_mutex); - if (c != 0) { - SYSLOG(LOG_ERR, EM_MUTEX_FAIL, - mystrerror(c)); - break; - } - (void) pthread_cond_wait(&g_cv_ack, &g_mutex); - (void) pthread_mutex_unlock(&g_mutex); - } - } - } - /* - * remove picl nodes created by this plugin - */ - if (g_led_dtls != NULL) { - for (c = 0; c < g_led_dtls->n_disks; c++) { - /* - * remove all disk unit nodes from frutree - */ - delete_disk_unit(g_led_dtls, c); - } - /* - * remove Devices tables of references to leds - * and led State properties - */ - delete_led_refs(g_led_dtls); - /* - * finally free the led details - */ - free_led_dtls(g_led_dtls); - g_led_dtls = NULL; - } -} diff --git a/usr/src/cmd/picl/plugins/sun4u/lw2plus/fcal_leds/fcal_leds.conf b/usr/src/cmd/picl/plugins/sun4u/lw2plus/fcal_leds/fcal_leds.conf deleted file mode 100644 index bd86c5de56..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/lw2plus/fcal_leds/fcal_leds.conf +++ /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, 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 (c) 2001 by Sun Microsystems, Inc. -# All rights reserved. -# -#pragma ident "%Z%%M% %I% %E% SMI" -# -# .conf file for fcal_leds PICL plugin. -VERSION 1.0 -fcal-leds: /devices/pci@8,700000/ebus@5/i2c@1,30/ioexp@0,74:pcf8574 -fcal-status: /devices/pci@8,700000/ebus@5/i2c@1,30/ioexp@0,7a:pcf8574 -fcal-disk-driver: ssd - -# number of disks - this must be specified before per disk definitions -n-disks: 2 - -# logic levels - values are 0 or 1 -assert-present: 0 -assert-fault: 0 -led-on: 0 - -# per disk definitions - -# mask for presence signal: disk, mask -disk-present: 0, 1 -disk-present: 1, 2 - -# mask for fault signal: disk, mask -disk-fault: 0, 0x10 -disk-fault: 1, 0x20 - -# address values for specific LEDs: disk, LED-purpose, bit-sig value -led: 0, remok, 0x20 -led: 0, fault, 0x40 -led: 0, ready, 0x80 -led: 1, remok, 4 -led: 1, fault, 8 -led: 1, ready, 0x10 - -# timers in units of seconds -slow-poll: 59 -fast-poll: 2 -# time before reverting to slow poll -relax-interval: 300 - -# time for led-test -led-test-interval: 10 - -# search string for parent node to ssd devices in PICL platform tree -# Note: this name is matched against a full path name from libdevinfo -# so each component must include unit-address information -fcal-disk-parent: name:/platform/pci@8,600000/SUNW,qlc@4/fp@0,0 - -# search string template for parent node to disk-units in PICL frutree -disk-unit-parent: name:/frutree/chassis/fcal-backplane/disk-slot?Slot= - -# search string template for disk-led nodes in PICL platform tree -disk-led-nodes: name:/platform/pci@8,700000/ebus/i2c@1,30/ioexp@0,74/disk-led@ diff --git a/usr/src/cmd/picl/plugins/sun4u/lw2plus/fcal_leds/fcal_leds.h b/usr/src/cmd/picl/plugins/sun4u/lw2plus/fcal_leds/fcal_leds.h deleted file mode 100644 index db35d2ecd5..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/lw2plus/fcal_leds/fcal_leds.h +++ /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, 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 (c) 2001 by Sun Microsystems, Inc. - * All rights reserved. - */ - -#ifndef _FCAL_LEDS_H -#define _FCAL_LEDS_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Header file for the FC-AL LEDs PICL plugin. - * Contains message texts, constant definitions, typedefs for enums and - * structs, global data and function templates. - */ - -#define SYSLOG syslog - -/* - * log message tests - */ -#define EM_CANT_OPEN \ - gettext("SUNW_fcal_leds: open fail: %s\n") -#define EM_NONALF_TOK \ - gettext("SUNW_fcal_leds: line %d token begins non-alpha\n") -#define EM_LONG_TOK \ - gettext("SUNW_fcal_leds: line %d token too long\n") -#define EM_UNKN_TOK \ - gettext("SUNW_fcal_leds: line %d unknown token\n") -#define EM_INVAL_TOK \ - gettext("SUNW_fcal_leds: line %d invalid token at start of line\n") -#define EM_NOCOLON \ - gettext("SUNW_fcal_leds: line %d leading token not followed by ':'\n") -#define EM_NOVERS \ - gettext("SUNW_fcal_leds: first token not VERSION\n") -#define EM_NUM_TERM \ - gettext("SUNW_fcal_leds: invalid number terminator\n") -#define EM_LOGIC_LVL \ - gettext("SUNW_fcal_leds: logic level specified as neither 0 nor 1\n") -#define EM_NOTPOS \ - gettext("SUNW_fcal_leds: numeric field greater than 0 expected\n") -#define EM_DISK_RANGE \ - gettext("SUNW_fcal_leds: disk number out of range\n") -#define EM_NDISKS_DBL \ - gettext("SUNW_fcal_leds: number of disks defined twice\n") -#define EM_NO_DISKS \ - gettext("SUNW_fcal_leds: no disks defined\n") -#define EM_VER_FRMT \ - gettext("SUNW_fcal_leds: format error in VERSION string\n") -#define EM_WRNGVER \ - gettext("SUNW_fcal_leds: config version %d.%d not supported\n") -#define EM_REL_PATH \ - gettext("SUNW_fcal_leds: path names must be absolute\n") -#define EM_ERRLINE \ - gettext("SUNW_fcal_leds: error on line %d\n") -#define EM_NO_LED_PROP \ - gettext("SUNW_fcal_leds: LED property name missing\n") -#define EM_PROP_TERM \ - gettext("SUNW_fcal_leds: expected comma (',') after property name\n") -#define EM_STR_NOT_SET \ - gettext("SUNW_fcal_leds: %s not defined") -#define EM_I2C_GET_PORT \ - gettext("SUNW_fcal_leds: I2C_GET_PORT: %s\n") -#define EM_DI_INIT_FAIL \ - gettext("SUNW_fcal_leds: di_init failed: %s\n") -#define EM_THREAD_CREATE_FAILED \ - gettext("SUNW_fcal_leds: pthread_create() call failed: %s\n") -#define EM_MUTEX_FAIL \ - gettext("SUNW_fcal_leds: pthread_mutex_lock returned: %s\n") -#define EM_CONDWAITFAIL \ - gettext("SUNW_fcal_leds: pthread_cond_wait returned: %s\n") -#define EM_SPURIOUS_FP \ - gettext("SUNW_fcal_leds: deleting spurious PICL fp node\n") -#define EM_NO_FP_NODE \ - gettext( \ - "SUNW_fcal_leds: cannot get PICL disk node for hot plug disk %d\n") -#define EM_POLL_FAIL \ - gettext("SUNW_fcal_leds: poll() returned: %s, no more timed events\n") - -/* - * config file terminal name - */ -#define FCAL_LEDS_CONF_FILE "fcal_leds.conf" - -/* - * devinfo hardware properties - */ -#define HW_PROP_TARGET "target" -#define HW_PROP_PORT "port-wwn" - -/* - * PICL node names - */ -#define FCAL_PICL_DISK_UNIT "disk-unit" - -/* - * PICL property names - */ -#define FCAL_PICL_REF "_" -#define FCAL_PICL_PROP_BUS_ADDR "bus-addr" -#define FCAL_PICL_PROP_TARGET "target" -#define FCAL_PICL_LED_REF FCAL_PICL_REF PICL_CLASS_LED FCAL_PICL_REF -#define FCAL_PICL_BLOCK_REF FCAL_PICL_REF PICL_CLASS_BLOCK FCAL_PICL_REF - -/* - * String values for led State property - */ -#define FCAL_PICL_LED_ON "on" -#define FCAL_PICL_LED_OFF "off" -#define FCAL_PICL_LED_TEST "led test" -/* - * MAX_LEN_LED_STATE is (strlen(FCAL_PICL_LED_TEST) + 1) - */ -#define MAX_LEN_LED_STATE 9 - -/* - * Space for 0123456789ABCDEF,0123456789ABCDEF - */ -#define MAX_LEN_UNIT_ADDRESS 34 - -/* - * properties per row in Device table - */ -#define FCAL_DEVTABLE_NCOLS 2 - -/* - * number of LEDs per disk - */ -#define FCAL_LED_CNT 3 - -/* - * special values for status when ioctl fails - */ -#define I2C_IOCTL_FAIL (-1) -#define I2C_IOCTL_INIT (-2) -#define MINORS_UNKNOWN (-1) - -/* - * other status values - */ -#define NO_MINORS 0 -#define HAS_MINORS 1 - -/* - * event flags - */ -#define FCAL_EV_POLL 1 -#define FCAL_EV_CONFIG 2 - -/* - * default timer values - overridden by .conf file - */ -#define DFLT_SLOW_POLL 59 -#define DFLT_FAST_POLL 2 -#define DFLT_RELAX_TIME 300 -#define DFLT_TEST_TIME 10 - -typedef enum token { - NO_TOKEN, - TOKEN_ERROR, - FCAL_VERSION, - LED_PROPS_START, /* next enums are for led properties */ - FCAL_REMOK_LED, - FCAL_FAULT_LED, - FCAL_READY_LED, - LED_PROPS_END, /* no more led properties */ - LINE_DEFS, /* next enums define configuration lines */ - FCAL_LEDS_BOARD, - FCAL_STATUS_BOARD, - FCAL_DISK_DRIVER, - FCAL_N_DISKS, - FCAL_ASSERT_PRESENT, - FCAL_ASSERT_FAULT, - FCAL_LED_ON, - FCAL_DISK_PRESENT, - FCAL_DISK_FAULT, - FCAL_LED_ID, - FCAL_SLOW_POLL, - FCAL_FAST_POLL, - FCAL_RELAX_INTERVAL, - FCAL_TEST_INTERVAL, - FCAL_DISK_PARENT, - FCAL_UNIT_PARENT, - FCAL_LED_NODES -} token_t; - -typedef enum led_state_enum { - LED_STATE_OFF, - LED_STATE_ON, - LED_STATE_TEST -} led_state_t; - -typedef char *str; -typedef const char *cstr; - -/* - * Note on disk_prev and disk_ready flags. - * The following entries are dynamically created arrays: - * presence, faults, disk_detected, disk_ready, disk_prev, led_test_end, - * disk_port, led_addr. - * The disk_prev and disk_ready flags (one per disk) are used as follows: - * disk removed (disk_detected = 0), disk_ready[d] = 0, disk_prev[d] = 0 - * disk present (disk_detected = 1) use this table: - * disk_ready[d] | disk_prev[d] | meaning - * 0 | 0 | driver not (yet) attached (show green led) - * 0 | 1 | driver has been detached (show blue led) - * 1 | 0 | driver attached, PICL update needed (green) - * 1 | 1 | driver attached, normal running (green) - * OK to remove (blue) is only lit for the attached -> detached transition - * state 1 0 (PICL update needed) is really transient and is cleared after - * calling update_picl. - */ -typedef struct led_dtls { - int ver_maj; - int ver_min; - cstr fcal_leds; /* path name of leds board */ - cstr fcal_status; /* path of back-plane status board */ - cstr fcal_driver; /* name of fcal disk driver */ - int n_disks; /* number of fcal disks */ - int *presence; /* presence detection masks */ - int *faults; /* fault status masks */ - int *disk_detected; /* working store for detected disks */ - int *disk_ready; /* working store for disk ready */ - int *disk_prev; /* previous ready state */ - volatile int *led_test_end; /* (per disk) ticks to end led test */ - boolean_t *picl_retry; /* (per disk) retry picl update flag */ - uchar_t **disk_port; /* for FC-AL this is WWN */ - int assert_presence; /* status value for presence */ - int assert_fault; /* status value for fault */ - int assert_led_on; /* level required to light led */ - uint_t *led_addr[FCAL_LED_CNT]; /* 2D array to leds */ - led_state_t *led_state[FCAL_LED_CNT]; /* current states */ - boolean_t led_retry; /* flag set after led ioctl failure */ - volatile boolean_t polling; /* set to B_FALSE after poll failure */ - volatile int fast_poll_end; /* fast_poll ticks left */ - int fast_poll; /* fast_poll interval in seconds */ - int slow_poll_ticks; /* fast polls per slow poll */ - int relax_time_ticks; /* time interval to do fast polling */ - int led_test_time; /* fast polls in led test interval */ - cstr fcal_disk_parent; /* search string for /platform */ - cstr disk_unit_parent; /* search template for disk-slots */ - cstr disk_led_nodes; /* search template for disk-leds */ -} led_dtls_t; - -typedef int (*actfun_t)(str *p_str, led_dtls_t *dtls); - -typedef struct lookup { - token_t tok; - cstr tok_str; - actfun_t action; -} lookup_t; - -/* - * global data - */ -extern led_dtls_t *g_led_dtls; -extern pthread_cond_t g_cv; -extern pthread_cond_t g_cv_ack; -extern pthread_mutex_t g_mutex; -extern volatile int g_event_flag; -extern volatile boolean_t g_finish_now; -extern volatile boolean_t g_leds_thread_ack; -extern volatile boolean_t g_poll_thread_ack; - -/* - * function templates - */ -char *mystrerror(int err); -void *fcal_leds_thread(void *args); -int fc_led_parse(FILE *fp, led_dtls_t **p_dtls); -void free_led_dtls(led_dtls_t *dtls); -int find_disk_slot(led_dtls_t *dtls, int disk, picl_nodehdl_t *nodeh); -void delete_disk_unit(led_dtls_t *dtls, int disk); -boolean_t is_led_test(led_dtls_t *dtls); -int create_Device_table(picl_prophdl_t *tbl_h, picl_prophdl_t *tableh); -void clr_led(int diskNo, token_t led_tok, led_dtls_t *dtls); - -#ifdef __cplusplus -} -#endif - -#endif /* _FCAL_LEDS_H */ diff --git a/usr/src/cmd/picl/plugins/sun4u/lw2plus/fcal_leds/fcal_leds_thread.c b/usr/src/cmd/picl/plugins/sun4u/lw2plus/fcal_leds/fcal_leds_thread.c deleted file mode 100644 index f5010a8f7e..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/lw2plus/fcal_leds/fcal_leds_thread.c +++ /dev/null @@ -1,861 +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 (c) 2001 by Sun Microsystems, Inc. - * All rights reserved. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "fcal_leds.h" - -static char fcal_disk_unit[] = FCAL_PICL_DISK_UNIT; - -static int update_picl(led_dtls_t *dtls, int disk); -static int get_drv_info(di_node_t node, led_dtls_t *dtls); -static int walk_disks(di_node_t node, led_dtls_t *dtls); -static int chk_minors(led_dtls_t *dtls); -static void set_led(int diskNo, token_t led_tok, led_dtls_t *dtls); -static int set_clr_led(int diskNo, token_t led_tok, led_dtls_t *dtls, int set); -void set_led(int diskNo, token_t led_tok, led_dtls_t *dtls); -void clr_led(int diskNo, token_t led_tok, led_dtls_t *dtls); -static void retry_led(led_dtls_t *dtls); -static void start_led_test(led_dtls_t *dtls, int disk); -static void end_led_test(led_dtls_t *dtls, int disk); -static int wait_a_while(void); - -/* - * variant of strerror() which guards against negative errno and null strings - */ -char * -mystrerror(int err) -{ - static char *unknown_errno = "unknown errno"; - char *ptr; - - if ((err < 0) || ((ptr = strerror(err)) == NULL)) { - ptr = unknown_errno; - } - return (ptr); -} - -void -delete_disk_unit(led_dtls_t *dtls, int disk) -{ - int r; - picl_nodehdl_t slotndh; - picl_nodehdl_t diskndh; - - r = find_disk_slot(dtls, disk, &slotndh); - if (r != PICL_SUCCESS) - return; - - /* - * is there a disk-unit node here? - */ - r = ptree_find_node(slotndh, PICL_PROP_NAME, - PICL_PTYPE_CHARSTRING, fcal_disk_unit, - sizeof (fcal_disk_unit), &diskndh); - if (r != PICL_SUCCESS) - return; - - /* - * remove disk-unit node and its properties - */ - r = ptree_delete_node(diskndh); - if (r != PICL_SUCCESS) - return; - (void) ptree_destroy_node(diskndh); -} - -/* - * update_picl - * Called when disk goes off-line or goes to ready status. - * In the case of disk ready, locate platform tree node for the disk - * and add a target property (if missing). - * (The target address is fixed for a given disk slot and is used to - * tie the frutree disk-unit to the correct ssd node). - * Returns EAGAIN for a retriable failure, otherwise 0. - */ -static int -update_picl(led_dtls_t *dtls, int disk) -{ - static char trailer[] = ",0"; - picl_nodehdl_t slotndh; - picl_nodehdl_t diskndh; - ptree_propinfo_t propinfo; - int r; - - if (dtls->disk_detected[disk] != 0) { - picl_nodehdl_t fpndh; - picl_nodehdl_t ssdndh; - picl_prophdl_t tbl_h; - picl_prophdl_t tbl_prop_h; - picl_prophdl_t row_props_h[FCAL_DEVTABLE_NCOLS]; - char valbuf[80]; - char addr[MAXPATHLEN]; - char *ptrd; - const uchar_t *ptrs; - int len; - int addr_len; - - for (;;) { - r = ptree_get_node_by_path(dtls->fcal_disk_parent, - &fpndh); - if (r != PICL_SUCCESS) { - return (0); - } - r = ptree_get_propval_by_name(fpndh, - PICL_PROP_CLASSNAME, (void *)valbuf, - sizeof (valbuf)); - if (r != PICL_SUCCESS) { - return (0); - } else if (strcmp(valbuf, "fp") == 0) { - /* - * The node with class fp (if present) is a - * holding node representing no actual hardware. - * Its presence results in two nodes with the - * same effective address. (The fp class node is - * UnitAddress 0,0 and the other fp node [class - * devctl] has bus-addr 0,0). Locating the - * required fp node for dynamic reconfiguration - * then goes wrong. So, just remove it. - */ - SYSLOG(LOG_WARNING, EM_SPURIOUS_FP); - r = ptree_delete_node(fpndh); - if (r == PICL_SUCCESS) { - (void) ptree_destroy_node(fpndh); - continue; - } - return (0); - } else { - break; - } - } - /* - * Got a good parent node. Look at its children for a node - * with this new port name. - * - * generate expected bus-addr property from the port-wwn - * Note: dtls->disk_port[disk] points to an array of uchar_t, - * the first character contains the length of the residue. - * The bus-addr property is formatted as follows: - * wabcdef0123456789,0 - * where the 16 hex-digits represent 8 bytes from disk_port[]; - */ - ptrs = dtls->disk_port[disk]; - if (ptrs == NULL) - return (0); - len = *ptrs++; - ptrd = addr; - *ptrd++ = 'w'; - for (r = 0; r < len; r++, ptrd += 2) { - (void) snprintf(ptrd, MAXPATHLEN - (ptrd - addr), - "%.2x", *ptrs++); - } - addr_len = 1 + strlcat(addr, trailer, MAXPATHLEN); - if (addr_len > MAXPATHLEN) - return (0); - r = ptree_find_node(fpndh, FCAL_PICL_PROP_BUS_ADDR, - PICL_PTYPE_CHARSTRING, addr, addr_len, &ssdndh); - /* - * If the disk node corresponding to the newly inserted disk - * cannot be found in the platform tree, we have probably - * got in too early - probably before it's up to speed. In - * this case, the WWN gleaned from devinfo may also be wrong. - * This case is worth retrying in later polls when it may - * succeed, so return EAGAIN. All other failures are probably - * terminal, so log a failure and quit. - */ - if (r == PICL_NODENOTFOUND) - return (EAGAIN); - if (r != PICL_SUCCESS) { - SYSLOG(LOG_ERR, EM_NO_FP_NODE, disk); - return (0); - } - - /* - * Found platform entry for disk, add target prop - */ - r = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_INT, PICL_READ, sizeof (int), - FCAL_PICL_PROP_TARGET, NULL, NULL); - if (r != PICL_SUCCESS) - return (0); - (void) ptree_create_and_add_prop(ssdndh, &propinfo, &disk, - NULL); - - /* - * Remove pre-existing disk-unit node and its - * properties - maybe its reference property is - * out-of-date. - */ - delete_disk_unit(dtls, disk); - - /* - * Add a disk-unit node in frutree - */ - r = find_disk_slot(dtls, disk, &slotndh); - if (r != PICL_SUCCESS) - return (0); - r = ptree_create_and_add_node(slotndh, fcal_disk_unit, - PICL_CLASS_FRU, &diskndh); - if (r != PICL_SUCCESS) - return (0); - r = create_Device_table(&tbl_h, &tbl_prop_h); - if (r != PICL_SUCCESS) - return (0); - r = ptree_init_propinfo(&propinfo, - PTREE_PROPINFO_VERSION, PICL_PTYPE_CHARSTRING, - PICL_READ, sizeof (PICL_CLASS_BLOCK), PICL_PROP_CLASS, - NULL, NULL); - if (r != PICL_SUCCESS) - return (0); - r = ptree_create_prop(&propinfo, PICL_CLASS_BLOCK, - &row_props_h[0]); - if (r != PICL_SUCCESS) - return (0); - r = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_REFERENCE, PICL_READ, sizeof (picl_prophdl_t), - FCAL_PICL_BLOCK_REF, NULL, NULL); - if (r != PICL_SUCCESS) - return (0); - r = ptree_create_prop(&propinfo, &ssdndh, &row_props_h[1]); - if (r != PICL_SUCCESS) - return (0); - r = ptree_add_row_to_table(tbl_h, FCAL_DEVTABLE_NCOLS, - row_props_h); - if (r != PICL_SUCCESS) - return (0); - (void) ptree_add_prop(diskndh, tbl_prop_h); - } else { - /* - * disk gone, remove disk_unit fru from frutree - */ - delete_disk_unit(dtls, disk); - } - return (0); -} - -static int -get_drv_info(di_node_t node, led_dtls_t *dtls) -{ - int *target_data; - uchar_t *port_data = NULL; - di_minor_t min_node; - int i, r; - int t = -1; - int *newStatus = malloc(dtls->n_disks * sizeof (int)); - if (newStatus == NULL) - return (0); - - for (i = 0; i < dtls->n_disks; i++) { - newStatus[i] = MINORS_UNKNOWN; - } - r = di_prop_lookup_ints(DDI_DEV_T_ANY, node, HW_PROP_TARGET, - &target_data); - for (i = 0; i < r; i++) { - t = target_data[i]; - if ((t >= 0) && (t < dtls->n_disks)) { - /* set no minors until we know */ - newStatus[t] = NO_MINORS; - break; /* go with this node */ - } - } - if ((t >= 0) && (t < dtls->n_disks)) { - r = di_prop_lookup_bytes( - DDI_DEV_T_ANY, node, HW_PROP_PORT, &port_data); - /* - * The first byte of the array dtls->disk_port[t] contains - * the length of the residue. So 255 is the maximum length - * which can be handled. Limit the property data to this. - */ - if (r > 255) { - r = 0; - } - if ((r > 0) && (port_data != NULL)) { - if ((dtls->disk_port[t] != NULL) && - (*(dtls->disk_port[t]) != r)) { - /* - * existing data is of different length, - * free it and malloc a fresh array. - */ - free(dtls->disk_port[t]); - dtls->disk_port[t] = NULL; - } - if (dtls->disk_port[t] == NULL) { - dtls->disk_port[t] = malloc(r + 1); - } - if (dtls->disk_port[t] != NULL) { - *(dtls->disk_port[t]) = (uchar_t)r; - (void) memcpy(dtls->disk_port[t] + 1, - port_data, r); - } - } - min_node = di_minor_next(node, DI_MINOR_NIL); - if (min_node != DI_MINOR_NIL) { - /* - * device has minor device node(s) - */ - newStatus[t] = HAS_MINORS; /* got minor(s) */ - } - } - /* - * propagate attachment status and note changes - * don't propagate to absent disks, otherwise we may not detect a - * status change when they're replugged. - */ - r = 0; - for (i = 0; i < dtls->n_disks; i++) { - if ((newStatus[i] != MINORS_UNKNOWN) && - dtls->disk_detected[i] && - (dtls->disk_ready[i] != newStatus[i])) { - dtls->disk_ready[i] = newStatus[i]; - r = 1; - } - } - free(newStatus); - return (r); -} - -/* - * Nodes belonging to the configured driver (dtls->fcal_driver) are - * located in the device tree. A check is applied that any node found has - * a physical address beginning with the configured search string - * (dtls->fcal_disk_parent). For each suitable node found, get_drv_info() - * is called to determine if a change of status has occurred. - * Returns 1 if any status has changed - else 0. - */ -static int -walk_disks(di_node_t node, led_dtls_t *dtls) -{ - static char *sl_platform_sl = "/platform/"; - int r = 0; - int len; - /* find "/platform/" */ - char *ptr = strstr(dtls->fcal_disk_parent, sl_platform_sl); - - if (ptr == NULL) - return (0); - /* skip over "/platform" */ - ptr += strlen(sl_platform_sl) - 1; - len = strlen(ptr); - - for (node = di_drv_first_node(dtls->fcal_driver, node); - node != DI_NODE_NIL; - node = di_drv_next_node(node)) { - char *dev_path = di_devfs_path(node); - - if (dev_path == NULL) { - /* no memory, just hope things get better */ - continue; - } - if (memcmp(dev_path, ptr, len) != 0) { - /* - * path name doesn't start right, skip this one - */ - free(dev_path); - continue; - } - free(dev_path); - if (get_drv_info(node, dtls) != 0) { - r = 1; /* change observed */ - } - } - - return (r); -} - -static int -chk_minors(led_dtls_t *dtls) -{ - /* - * sets disk_ready flags for disks with minor devices (attached) - * returns 1 if any flags have changed else 0 - */ - int err = 0; - int r = 0; - di_node_t tree = di_init("/", DINFOCPYALL); - if (tree == DI_NODE_NIL) { - err = errno; - SYSLOG(LOG_ERR, EM_DI_INIT_FAIL, mystrerror(err)); - } - if (err == 0) - r = walk_disks(tree, dtls); - if (tree != DI_NODE_NIL) - di_fini(tree); - return (r); -} - -boolean_t -is_led_test(led_dtls_t *dtls) -{ - int disk; - for (disk = 0; disk < dtls->n_disks; disk++) { - if (dtls->led_test_end[disk] != 0) - return (B_TRUE); - } - return (B_FALSE); -} - -static int -set_clr_led(int diskNo, token_t led_tok, led_dtls_t *dtls, int set) -{ - int err, led, disk, led_bit; - i2c_port_t port; - int mask = 0; - int fd = open(dtls->fcal_leds, O_RDWR); - if (fd < 0) - return (0); - /* - * generate a mask for all controlled LEDs - */ - for (led = 0; led < FCAL_LED_CNT; led++) { - for (disk = 0; disk < dtls->n_disks; disk++) { - mask |= dtls->led_addr[led][disk]; - } - } - port.value = 0; - port.direction = DIR_INPUT; - port.dir_mask = (uint8_t)mask; - /* read current light settings */ - err = ioctl(fd, I2C_GET_PORT, &port); - if (err < 0) { - (void) close(fd); - return (EAGAIN); - } - mask = port.value; - /* - * get bit setting for led to be changed - */ - led = led_tok - LED_PROPS_START - 1; - led_bit = dtls->led_addr[led][diskNo]; - if (dtls->assert_led_on == 0) { - if (set == 0) - mask |= led_bit; - else - mask &= ~led_bit; - } else { - if (set == 0) - mask &= ~led_bit; - else - mask |= led_bit; - } - - /* - * re-write the leds - */ - port.value = (uint8_t)mask; - err = ioctl(fd, I2C_SET_PORT, &port); - (void) close(fd); - if (err == 0) - return (0); - return (EAGAIN); -} - -static void -set_led(int diskNo, token_t led_tok, led_dtls_t *dtls) -{ - if (set_clr_led(diskNo, led_tok, dtls, 1) != 0) - dtls->led_retry = B_TRUE; - dtls->led_state[led_tok - LED_PROPS_START - 1][diskNo] = - ((dtls->led_test_end[diskNo] != 0) ? - LED_STATE_TEST : LED_STATE_ON); -} - -void -clr_led(int diskNo, token_t led_tok, led_dtls_t *dtls) -{ - if (set_clr_led(diskNo, led_tok, dtls, 0) != 0) - dtls->led_retry = B_TRUE; - dtls->led_state[led_tok - LED_PROPS_START - 1][diskNo] = - LED_STATE_OFF; -} - -/* - * have another go at getting the leds in step with required values - */ -static void -retry_led(led_dtls_t *dtls) -{ - int r = 0; - int onFlag; - int diskNo; - int ledNo; - led_state_t state; - - for (diskNo = 0; diskNo < dtls->n_disks; diskNo++) { - for (ledNo = 0; ledNo < FCAL_LED_CNT; ledNo++) { - state = dtls->led_state[ledNo][diskNo]; - if ((state == LED_STATE_ON) || - (state == LED_STATE_TEST)) - onFlag = 1; - else - onFlag = 0; - r |= set_clr_led(diskNo, LED_PROPS_START + 1 + ledNo, - dtls, onFlag); - } - } - - dtls->led_retry = (r != 0); -} - -static void -start_led_test(led_dtls_t *dtls, int disk) -{ - int led_no; - - /* - * if the poll thread has failed, can't do led test - */ - if (!dtls->polling) - return; - - /* - * set test interval - doubles as flag for LED-test in progress - */ - dtls->led_test_end[disk] = dtls->led_test_time; - for (led_no = 1; led_no <= FCAL_LED_CNT; led_no++) { - set_led(disk, LED_PROPS_START + led_no, dtls); - } -} - -static void -end_led_test(led_dtls_t *dtls, int disk) -{ - /* - * There is a problem with a disk coming on-line. - * All its leds are lit for 10 seconds to meet the led-test - * requirement. The true state for the fault led can be determined - * immediately, but determination of whether to light blue or green - * requires a response from libdevinfo. Device reconfiguration logic - * (likely to be active at this time) holds a long term - * lock preventing devinfo calls from completing. Rather than - * leave a contradictory led indication showing during this - * period, it is better to anticipate the green led result - * and correct it when the facts are known. - */ - clr_led(disk, FCAL_REMOK_LED, dtls); - clr_led(disk, FCAL_FAULT_LED, dtls); - dtls->led_state[FCAL_READY_LED - LED_PROPS_START - 1][disk] = - LED_STATE_ON; -} - -/* - * Evaluate required wait time and wait until that time or an event. - * Returns 0 for a time-out, otherwise the pending event(s). - * If the finish_now flag is becomes set, this routine acknowledges - * the request and waits for it to go away, - * i.e. no return while finish_now is set. - */ -static int -wait_a_while(void) -{ - int r; - int events; - boolean_t acksent = B_FALSE; - - do { - r = pthread_mutex_lock(&g_mutex); - if (r != 0) { - SYSLOG(LOG_ERR, EM_MUTEX_FAIL, mystrerror(r)); - return (0); - } - if (g_finish_now && !acksent) { - g_leds_thread_ack = B_TRUE; - (void) pthread_cond_signal(&g_cv_ack); - acksent = B_TRUE; - } - r = pthread_cond_wait(&g_cv, &g_mutex); - if (r != 0) { - SYSLOG(LOG_ERR, EM_CONDWAITFAIL, mystrerror(r)); - (void) pthread_mutex_unlock(&g_mutex); - return (0); - } - /* - * whilst under the mutex, take a local copy of the events - * and clear those that we handle - */ - events = g_event_flag & (FCAL_EV_POLL | FCAL_EV_CONFIG); - g_event_flag ^= events; - (void) pthread_mutex_unlock(&g_mutex); - } while (g_finish_now); - - return (events); -} - -/*ARGSUSED*/ -void * -fcal_leds_thread(void *args) -{ - led_dtls_t *dtls = g_led_dtls; - int c, v; - int err = 0; - int events = 0; - int fd_bkplane; - i2c_port_t port; - int lastVal = I2C_IOCTL_INIT; - int ws; - int mask; - - /* - * generate a mask for presence and fault status bits - */ - mask = 0; - for (c = 0; c < dtls->n_disks; c++) { - mask |= dtls->presence[c]; - mask |= dtls->faults[c]; - } - - /* - * enter poll loop - */ - for (;;) { - /* - * see if a LED-test timer has expired - */ - for (c = 0; c < dtls->n_disks; c++) { - if (dtls->led_test_end[c] > 0) { - if (!dtls->polling) { - /* poll thread failure, end led-test */ - dtls->led_test_end[c] = 0; - } else if ((events & FCAL_EV_POLL) != 0) { - dtls->led_test_end[c]--; - } - if (dtls->led_test_end[c] == 0) { - /* - * clear blue and amber leds - */ - end_led_test(dtls, c); - /* treat any status as a change */ - lastVal = I2C_IOCTL_INIT; - } - } - } - fd_bkplane = open(dtls->fcal_status, O_RDONLY); - if (fd_bkplane < 0) { - SYSLOG(LOG_ERR, EM_CANT_OPEN, dtls->fcal_status); - err = errno; - break; - } - port.value = 0; - /* - * the direction and dir_mask fields are ignored, - * so one can only guess at their possible use - */ - port.direction = DIR_INPUT; - port.dir_mask = (uint8_t)mask; - c = ioctl(fd_bkplane, I2C_GET_PORT, &port); - if (c < 0) { - err = errno; - (void) close(fd_bkplane); - - if (lastVal != I2C_IOCTL_FAIL) { - SYSLOG(LOG_ERR, EM_I2C_GET_PORT, - mystrerror(err)); - lastVal = I2C_IOCTL_FAIL; - events |= FCAL_EV_CONFIG; - } - } else { - (void) close(fd_bkplane); - ws = port.value & mask; - } - - if ((c == 0) && (ws != lastVal)) { - events |= FCAL_EV_CONFIG; - lastVal = ws; - for (c = 0; c < dtls->n_disks; c++) { - /* - * first get the value of the relevant - * presence bit (as 0 or 1) - */ - v = ((lastVal & dtls->presence[c]) != 0); - - /* hold previous presence value */ - ws = dtls->disk_detected[c]; - - /* - * the disk is present if the backplane - * status bit for this disk is equal to the - * configured assert_presence value - */ - dtls->disk_detected[c] = - (v == dtls->assert_presence); - /* - * Don't add disk-unit node here for - * newly arrived disks. While the led - * test is running (and beyond) - * libdevinfo is locked out and we - * can't get port or target info. - */ - if ((!ws) && dtls->disk_detected[c]) { - /* - * disk has just come on-line - */ - start_led_test(dtls, c); - } - /* - * clear leds and ready status - * for disks which have been removed - */ - if (ws && (!dtls->disk_detected[c])) { - clr_led(c, FCAL_REMOK_LED, dtls); - clr_led(c, FCAL_FAULT_LED, dtls); - clr_led(c, FCAL_READY_LED, dtls); - dtls->disk_ready[c] = NO_MINORS; - dtls->disk_prev[c] = NO_MINORS; - v = update_picl(dtls, c); - /* - * set or clear retry flag - */ - dtls->picl_retry[c] = (v == EAGAIN); - } - /* - * for present disks which are not doing a - * led test, adjust fault LED - */ - if ((dtls->led_test_end[c] != 0) || - (!dtls->disk_detected[c])) - continue; - v = ((lastVal & dtls->faults[c]) != 0); - if (v == dtls->assert_fault) - set_led(c, FCAL_FAULT_LED, dtls); - else - clr_led(c, FCAL_FAULT_LED, dtls); - } - } - - /* - * For detected disks whose status has changed, choose between - * ready and ok to remove. - * libdevinfo can be locked out for the entire duration of a - * disk spin-up. So it is best not to seek this info while - * a led-test is in progress. Otherwise the leds can be stuck - * on for about 40 seconds. - * Note that chk_minors() returns 0 unless a status change - * has occurred. - */ - if (!is_led_test(dtls) && chk_minors(dtls) != 0) { - events = FCAL_EV_CONFIG; - for (c = 0; c < dtls->n_disks; c++) { - if (!dtls->disk_detected[c]) - continue; - /* - * When disk_ready changes, disk_prev is set - * to its previous value. This allows the - * direction of the last transistion to be - * determined. - */ - if ((dtls->disk_prev[c] == HAS_MINORS) && - (dtls->disk_ready[c] == NO_MINORS)) { - clr_led(c, FCAL_READY_LED, dtls); - set_led(c, FCAL_REMOK_LED, dtls); - } else { - set_led(c, FCAL_READY_LED, dtls); - clr_led(c, FCAL_REMOK_LED, dtls); - } - } - } - /* - * Update PICL (disk-unit) for newly attached disks - * ** see note in header file for significance - * of disk_prev and disk_ready flags. - */ - for (c = 0; c < dtls->n_disks; c++) { - if ((dtls->disk_prev[c] == NO_MINORS) && - (dtls->disk_ready[c] == HAS_MINORS)) { - dtls->disk_prev[c] = HAS_MINORS; - v = update_picl(dtls, c); - /* - * set or clear retry flag - */ - dtls->picl_retry[c] = (v == EAGAIN); - } - } - if ((events & FCAL_EV_CONFIG) != 0) { - /* - * set fast polling - */ - dtls->fast_poll_end = dtls->relax_time_ticks; - } - /* - * if updating a led failed (e.g. I2C busy), try again - */ - if (dtls->led_retry) - retry_led(dtls); - - events = wait_a_while(); - - /* - * when picl is recycled, wait_a_while sleeps until the - * init routine has been called again. - * This is the moment when dtls may have become stale. - */ - if (dtls != g_led_dtls) { - dtls = g_led_dtls; - lastVal = I2C_IOCTL_INIT; - - /* - * re-generate the presence and fault status mask - * in case the .conf file has changed - */ - mask = 0; - for (c = 0; c < dtls->n_disks; c++) { - mask |= dtls->presence[c]; - mask |= dtls->faults[c]; - } - } - - /* - * count down relaxation time counter if a poll event - */ - if ((events & FCAL_EV_POLL) != 0) { - if (dtls->fast_poll_end > 0) - dtls->fast_poll_end--; - } - - /* - * if updating PICL needs retrying, try it now - */ - for (c = 0; c < dtls->n_disks; c++) { - if (dtls->picl_retry[c]) { - v = update_picl(dtls, c); - dtls->picl_retry[c] = (v == EAGAIN); - } - } - } - - return ((void *)err); -} diff --git a/usr/src/cmd/picl/plugins/sun4u/lw2plus/frudata/Makefile b/usr/src/cmd/picl/plugins/sun4u/lw2plus/frudata/Makefile deleted file mode 100644 index 2c357d7124..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/lw2plus/frudata/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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# cmd/picl/plugins/sun4u/lw2p/frudata/Makefile -# - -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Netra-T4 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONF= libpiclfrudata.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: $(CONF) - -install: $(ROOTLIBDIR) $(ROOTCONF) - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/lw2plus/frudata/libpiclfrudata.conf b/usr/src/cmd/picl/plugins/sun4u/lw2plus/frudata/libpiclfrudata.conf deleted file mode 100644 index 0f9f57ca26..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/lw2plus/frudata/libpiclfrudata.conf +++ /dev/null @@ -1,76 +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 (c) 2000-2001 by Sun Microsystems, Inc. -# All rights reserved. -# -# #ident "%Z%%M% %I% %E% SMI" -# -# This file creates the FRU device paths for the FRUAccess library -# - -VERSION 1.0 - -name:/platform/pci/ebus/i2c?UnitAddress=1,30/motherboard-fru -PROP FRUDevicePath string r 0 "/devices/pci@8,700000/ebus@5/i2c@1,30/motherboard-fru@0,a8:motherboard-fru" - -name:/platform/pci/ebus/i2c?UnitAddress=1,30/cpu-fru?UnitAddress=0,a0 -PROP FRUDevicePath string r 0 "/devices/pci@8,700000/ebus@5/i2c@1,30/cpu-fru@0,a0:cpu-fru" - -name:/platform/pci/ebus/i2c?UnitAddress=1,30/cpu-fru?UnitAddress=0,a2 -PROP FRUDevicePath string r 0 "/devices/pci@8,700000/ebus@5/i2c@1,30/cpu-fru@0,a2:cpu-fru" - -name:/platform/pci/ebus/i2c?UnitAddress=1,30/fcal-backplane?UnitAddress=0,a4 -PROP FRUDevicePath string r 0 "/devices/pci@8,700000/ebus@5/i2c@1,30/fcal-backplane@0,a4:fcal-backplane" - -name:/platform/pci/ebus/i2c?UnitAddress=1,30/lomlite2?UnitAddress=0,ae -PROP FRUDevicePath string r 0 "/devices/pci@8,700000/ebus@5/i2c@1,30/lomlite2@0,ae:lomlite2" - -name:/platform/pci/ebus/i2c?UnitAddress=1,30/power-supply?UnitAddress=0,ac -PROP FRUDevicePath string r 0 "/devices/pci@8,700000/ebus@5/i2c@1,30/power-supply@0,ac:power-supply" - -name:/platform/pci/ebus/i2c?UnitAddress=1,30/scc-reader?UnitAddress=0,a6 -PROP FRUDevicePath string r 0 "/devices/pci@8,700000/ebus@5/i2c@1,30/scc-reader@0,a6:scc-reader" - -name:/platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,a0 -PROP FRUDevicePath string r 0 "/devices/pci@8,700000/ebus@5/i2c@1,2e/dimm-fru@1,a0:dimm-fru" - -name:/platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,a2 -PROP FRUDevicePath string r 0 "/devices/pci@8,700000/ebus@5/i2c@1,2e/dimm-fru@1,a2:dimm-fru" - -name:/platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,a4 -PROP FRUDevicePath string r 0 "/devices/pci@8,700000/ebus@5/i2c@1,2e/dimm-fru@1,a4:dimm-fru" - -name:/platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,a6 -PROP FRUDevicePath string r 0 "/devices/pci@8,700000/ebus@5/i2c@1,2e/dimm-fru@1,a6:dimm-fru" - -name:/platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,a8 -PROP FRUDevicePath string r 0 "/devices/pci@8,700000/ebus@5/i2c@1,2e/dimm-fru@1,a8:dimm-fru" - -name:/platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,aa -PROP FRUDevicePath string r 0 "/devices/pci@8,700000/ebus@5/i2c@1,2e/dimm-fru@1,aa:dimm-fru" - -name:/platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,ac -PROP FRUDevicePath string r 0 "/devices/pci@8,700000/ebus@5/i2c@1,2e/dimm-fru@1,ac:dimm-fru" - -name:/platform/pci/ebus/i2c?UnitAddress=1,2e/dimm-fru?UnitAddress=1,ae -PROP FRUDevicePath string r 0 "/devices/pci@8,700000/ebus@5/i2c@1,2e/dimm-fru@1,ae:dimm-fru" diff --git a/usr/src/cmd/picl/plugins/sun4u/lw2plus/frutree/Makefile b/usr/src/cmd/picl/plugins/sun4u/lw2plus/frutree/Makefile deleted file mode 100644 index 15e8bb85d5..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/lw2plus/frutree/Makefile +++ /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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# cmd/picl/plugins/sun4u/lw2plus/frutree/Makefile -# - -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Netra-T4 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONF= piclfrutree.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 -INFOS= piclfrutree.info system-board.info - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: $(CONF) - -install: $(ROOTLIBDIR) $(ROOTCONF) - -$(CONF): $(INFOS) - $(RM) $@ - $(CPP) piclfrutree.info | \ - $(SED) -e '/^[ ]*$$/d' -e '/^#/d' > $@ - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/lw2plus/frutree/piclfrutree.info b/usr/src/cmd/picl/plugins/sun4u/lw2plus/frutree/piclfrutree.info deleted file mode 100644 index 5e013ae860..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/lw2plus/frutree/piclfrutree.info +++ /dev/null @@ -1,112 +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 (c) 2001 by Sun Microsystems, Inc. - * All rights reserved. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -VERSION 1.0 -VERBOSE 1 -NODE frutree picl - NODE chassis fru - /* - * SunMC physical view view_points for this platform - * This will get moved to a separate SunMC physical view plugin later. - */ - PROP ViewPoints string r 0 "front rear side" - PROP SlotType string r 0 "chassis" - NODE fan-slot location - PROP SlotType string r 0 "fan-unit" - PROP Slot uint r 4 0 - NODE fan-unit fru - ENDNODE - ENDNODE - NODE fan-slot location - PROP SlotType string r 0 "fan-unit" - PROP Slot uint r 4 1 - NODE fan-unit fru - ENDNODE - ENDNODE - NODE fan-slot location - PROP SlotType string r 0 "fan-unit" - PROP Slot uint r 4 2 - NODE fan-unit fru - ENDNODE - ENDNODE - NODE psu-slot location - PROP SlotType string r 0 "power-supply" - PROP Slot uint r 4 0 - PROP Label string r 0 "PSU" - NODE power-supply fru - ENDNODE - ENDNODE - NODE fcal-backplane fru - NODE disk-slot location - PROP SlotType string r 0 "disk-slot" - PROP Slot uint r 4 0 - PROP Label string r 0 "HDD 0" - ENDNODE - NODE disk-slot location - PROP SlotType string r 0 "disk-slot" - PROP Slot uint r 4 1 - PROP Label string r 0 "HDD 1" - ENDNODE - ENDNODE - NODE scc-reader fru - ENDNODE - ENDNODE -ENDNODE - -name:/frutree/chassis -#include "system-board.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/lw2plus/frutree/system-board.info b/usr/src/cmd/picl/plugins/sun4u/lw2plus/frutree/system-board.info deleted file mode 100644 index e78a69304b..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/lw2plus/frutree/system-board.info +++ /dev/null @@ -1,403 +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 (c) 2001 by Sun Microsystems, Inc. - * All rights reserved. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This file creates the system board structure - */ - -NODE system-board fru - NODE pci-slot location - PROP SlotType string r 0 "pci" - PROP Label string r 0 "J2301" - PROP Slot uint r 4 0 - ENDNODE - NODE pci-slot location - PROP SlotType string r 0 "pci" - PROP Label string r 0 "J2401" - PROP Slot uint r 4 1 - ENDNODE - NODE pci-slot location - PROP SlotType string r 0 "pci" - PROP Label string r 0 "J2501" - PROP Slot uint r 4 2 - ENDNODE - NODE pci-slot location - PROP SlotType string r 0 "pci" - PROP Label string r 0 "J2601" - PROP Slot uint r 4 3 - ENDNODE - NODE cpu-slot location - PROP SlotType string r 0 "cpu" - PROP Label string r 0 "0" - PROP Slot uint r 4 0 - ENDNODE - NODE cpu-slot location - PROP SlotType string r 0 "cpu" - PROP Label string r 0 "1" - PROP Slot uint r 4 1 - ENDNODE - NODE lom-slot location - PROP SlotType string r 0 "lom" - PROP Label string r 0 "J3501" - ENDNODE - NODE mem-slot location - PROP SlotType string r 0 "memory-module" - PROP Slot uint r 4 0 - PROP Label string r 0 "J0100" - ENDNODE - NODE mem-slot location - PROP SlotType string r 0 "memory-module" - PROP Slot uint r 4 1 - PROP Label string r 0 "J0101" - ENDNODE - NODE mem-slot location - PROP SlotType string r 0 "memory-module" - PROP Slot uint r 4 2 - PROP Label string r 0 "J0202" - ENDNODE - NODE mem-slot location - PROP SlotType string r 0 "memory-module" - PROP Slot uint r 4 3 - PROP Label string r 0 "J0203" - ENDNODE - NODE mem-slot location - PROP SlotType string r 0 "memory-module" - PROP Slot uint r 4 4 - PROP Label string r 0 "J0304" - ENDNODE - NODE mem-slot location - PROP SlotType string r 0 "memory-module" - PROP Slot uint r 4 5 - PROP Label string r 0 "J0305" - ENDNODE - NODE mem-slot location - PROP SlotType string r 0 "memory-module" - PROP Slot uint r 4 6 - PROP Label string r 0 "J0406" - ENDNODE - NODE mem-slot location - PROP SlotType string r 0 "memory-module" - PROP Slot uint r 4 7 - PROP Label string r 0 "J0407" - ENDNODE -ENDNODE - -/* - * create the fru modules for CPUs in the fru tree - */ -name:/frutree/chassis/system-board/cpu-slot?Slot=0 -REFNODE cpu-module fru WITH name:/platform/pci@8,700000/ebus/i2c@1,30/cpu-fru@0,a0 - -name:/frutree/chassis/system-board/cpu-slot?Slot=1 -REFNODE cpu-module fru WITH name:/platform/pci@8,700000/ebus/i2c@1,30/cpu-fru@0,a2 - -/* - * create fru module for LOMLite2 in the fru tree - */ -name:/frutree/chassis/system-board/lom-slot -REFNODE lom-module fru WITH name:/platform/pci@8,700000/ebus/SUNW,lombus - -/* - * seeprom source for motherboard - */ -name:/frutree/chassis/system-board -PROP FRUDataAvailable void r -REFPROP _seeprom_source name:/platform/pci@8,700000/ebus/i2c@1,30/motherboard-fru - -/* - * seeprom source for scc-reader - */ -name:/frutree/chassis/scc-reader -PROP FRUDataAvailable void r -REFPROP _seeprom_source name:/platform/pci@8,700000/ebus/i2c@1,30/scc-reader - -/* - * seeprom source for power-supply - */ -name:/frutree/chassis/psu-slot/power-supply -PROP FRUDataAvailable void r -REFPROP _seeprom_source name:/platform/pci@8,700000/ebus/i2c@1,30/power-supply - -/* - * seeprom source for fcal-backplane - */ -name:/frutree/chassis/fcal-backplane -PROP FRUDataAvailable void r -REFPROP _seeprom_source name:/platform/pci@8,700000/ebus/i2c@1,30/fcal-backplane - -/* - * seeprom source for cpus - */ -name:/frutree/chassis/system-board/cpu-slot?Slot=0/cpu-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source name:/platform/pci@8,700000/ebus/i2c@1,30/cpu-fru@0,a0 - -name:/frutree/chassis/system-board/cpu-slot?Slot=1/cpu-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source name:/platform/pci@8,700000/ebus/i2c@1,30/cpu-fru@0,a2 - -/* - * seeprom source for LOMLite2 - */ -name:/frutree/chassis/system-board/lom-slot/lom-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source name:/platform/pci@8,700000/ebus/i2c@1,30/lomlite2 - -/* - * Set up memory module fru - */ -name:/frutree/chassis/system-board/mem-slot?Label=J0407 -REFNODE mem-module fru WITH name:/platform/pci@8,700000/ebus/i2c@1,2e/dimm-fru@1,ae - -name:/frutree/chassis/system-board/mem-slot?Label=J0406 -REFNODE mem-module fru WITH name:/platform/pci@8,700000/ebus/i2c@1,2e/dimm-fru@1,ac - -name:/frutree/chassis/system-board/mem-slot?Label=J0305 -REFNODE mem-module fru WITH name:/platform/pci@8,700000/ebus/i2c@1,2e/dimm-fru@1,aa - -name:/frutree/chassis/system-board/mem-slot?Label=J0304 -REFNODE mem-module fru WITH name:/platform/pci@8,700000/ebus/i2c@1,2e/dimm-fru@1,a8 - -name:/frutree/chassis/system-board/mem-slot?Label=J0203 -REFNODE mem-module fru WITH name:/platform/pci@8,700000/ebus/i2c@1,2e/dimm-fru@1,a6 - -name:/frutree/chassis/system-board/mem-slot?Label=J0202 -REFNODE mem-module fru WITH name:/platform/pci@8,700000/ebus/i2c@1,2e/dimm-fru@1,a4 - -name:/frutree/chassis/system-board/mem-slot?Label=J0101 -REFNODE mem-module fru WITH name:/platform/pci@8,700000/ebus/i2c@1,2e/dimm-fru@1,a2 - -name:/frutree/chassis/system-board/mem-slot?Label=J0100 -REFNODE mem-module fru WITH name:/platform/pci@8,700000/ebus/i2c@1,2e/dimm-fru@1,a0 - -/* - * seeprom source for memory fru - */ -name:/frutree/chassis/system-board/mem-slot?Label=J0407/mem-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source name:/platform/pci@8,700000/ebus/i2c@1,2e/dimm-fru@1,ae - -name:/frutree/chassis/system-board/mem-slot?Label=J0406/mem-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source name:/platform/pci@8,700000/ebus/i2c@1,2e/dimm-fru@1,ac - -name:/frutree/chassis/system-board/mem-slot?Label=J0305/mem-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source name:/platform/pci@8,700000/ebus/i2c@1,2e/dimm-fru@1,aa - -name:/frutree/chassis/system-board/mem-slot?Label=J0304/mem-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source name:/platform/pci@8,700000/ebus/i2c@1,2e/dimm-fru@1,a8 - -name:/frutree/chassis/system-board/mem-slot?Label=J0203/mem-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source name:/platform/pci@8,700000/ebus/i2c@1,2e/dimm-fru@1,a6 - -name:/frutree/chassis/system-board/mem-slot?Label=J0202/mem-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source name:/platform/pci@8,700000/ebus/i2c@1,2e/dimm-fru@1,a4 - -name:/frutree/chassis/system-board/mem-slot?Label=J0101/mem-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source name:/platform/pci@8,700000/ebus/i2c@1,2e/dimm-fru@1,a2 - -name:/frutree/chassis/system-board/mem-slot?Label=J0100/mem-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source name:/platform/pci@8,700000/ebus/i2c@1,2e/dimm-fru@1,a0 - -/* - * _fru_parent memory seeprom devices - */ -name:/platform/pci/ebus/i2c@1,2e/dimm-fru@1,ae -REFPROP _fru_parent name:/frutree/chassis/system-board/mem-slot?Label=J0407/mem-module - -name:/platform/pci@8,700000/ebus/i2c@1,2e/dimm-fru@1,ac -REFPROP _fru_parent name:/frutree/chassis/system-board/mem-slot?Label=J0406/mem-module - -name:/platform/pci@8,700000/ebus/i2c@1,2e/dimm-fru@1,aa -REFPROP _fru_parent name:/frutree/chassis/system-board/mem-slot?Label=J0305/mem-module - -name:/platform/pci@8,700000/ebus/i2c@1,2e/dimm-fru@1,a8 -REFPROP _fru_parent name:/frutree/chassis/system-board/mem-slot?Label=J0304/mem-module - -name:/platform/pci@8,700000/ebus/i2c@1,2e/dimm-fru@1,a6 -REFPROP _fru_parent name:/frutree/chassis/system-board/mem-slot?Label=J0203/mem-module - -name:/platform/pci@8,700000/ebus/i2c@1,2e/dimm-fru@1,a4 -REFPROP _fru_parent name:/frutree/chassis/system-board/mem-slot?Label=J0202/mem-module - -name:/platform/pci@8,700000/ebus/i2c@1,2e/dimm-fru@1,a2 -REFPROP _fru_parent name:/frutree/chassis/system-board/mem-slot?Label=J0101/mem-module - -name:/platform/pci@8,700000/ebus/i2c@1,2e/dimm-fru@1,a0 -REFPROP _fru_parent name:/frutree/chassis/system-board/mem-slot?Label=J0100/mem-module - -/* - * _fru_parent CPU, memory-controller devices - */ -_class:cpu?ID=0 -REFPROP _fru_parent /frutree/chassis/system-board/cpu-slot?Slot=0/cpu-module - -name:/platform/memory-controller?portid=0 -REFPROP _fru_parent /frutree/chassis/system-board/cpu-slot?Slot=0/cpu-module - -_class:cpu?ID=1 -REFPROP _fru_parent /frutree/chassis/system-board/cpu-slot?Slot=1/cpu-module - -name:/platform/memory-controller?portid=0 -REFPROP _fru_parent /frutree/chassis/system-board/cpu-slot?Slot=1/cpu-module - -/* - * _fru_parent motherboard - */ -name:/platform/pci@8,700000/ebus/i2c@1,30/motherboard-fru -REFPROP _fru_parent /frutree/chassis/system-board - -/* - * _fru_parent scc-reader - */ -name:/platform/pci@8,700000/ebus/i2c@1,30/scc-reader -REFPROP _fru_parent /frutree/chassis/scc-reader - -/* - * _fru_parent fcal-backplane - */ -name:/platform/pci@8,700000/ebus/i2c@1,30/fcal-backplane -REFPROP _fru_parent /frutree/chassis/fcal-backplane - -/* - * _fru_parent power-supply - */ -name:/platform/pci@8,700000/ebus/i2c@1,30/power-supply -REFPROP _fru_parent /frutree/chassis/psu-slot/power-supply - -/* - * _fru_parent LOMLite2 - */ -name:/platform/pci@8,700000/ebus/i2c@1,30/lomlite2 -REFPROP _fru_parent /frutree/chassis/system-board/lom-slot/lom-module - -/* - * _fru_parent temperature device - */ -name:/platform/pci@8,700000/ebus/i2c@1,30/temperature-device@0,30 -REFPROP _fru_parent /frutree/chassis/system-board/cpu-slot?Slot=0/cpu-module - -name:/platform/pci@8,700000/ebus/i2c@1,30/temperature-device@0,98 -REFPROP _fru_parent /frutree/chassis/system-board/cpu-slot?Slot=1/cpu-module - -/* - * add led device nodes to relevant pcf8574 card - */ -name:/platform/pci@8,700000/ebus/i2c@1,30/ioexp@0,74 -NODE disk-led led - PROP UnitAddress string r 0 "80" - PROP Label string r 0 "HDD 0 Power" - PROP Color string r 0 "green" -ENDNODE -NODE disk-led led - PROP UnitAddress string r 0 "40" - PROP Label string r 0 "HDD 0 Fault" - PROP Color string r 0 "amber" -ENDNODE -NODE disk-led led - PROP UnitAddress string r 0 "20" - PROP Label string r 0 "HDD 0 OK to remove" - PROP Color string r 0 "blue" -ENDNODE -NODE disk-led led - PROP UnitAddress string r 0 "10" - PROP Label string r 0 "HDD 1 Power" - PROP Color string r 0 "green" -ENDNODE -NODE disk-led led - PROP UnitAddress string r 0 "8" - PROP Label string r 0 "HDD 1 Fault" - PROP Color string r 0 "amber" -ENDNODE -NODE disk-led led - PROP UnitAddress string r 0 "4" - PROP Label string r 0 "HDD 1 OK to remove" - PROP Color string r 0 "blue" -ENDNODE - -/* - * _fru_parent memory modules - */ -name:/platform/memory-controller?portid=0/memory-module-group?ID=0/memory-module?ID=0 -REFPROP _fru_parent name:/frutree/chassis/system-board/mem-slot?Label=J0100/mem-module - -name:/platform/memory-controller?portid=0/memory-module-group?ID=0/memory-module?ID=1 -REFPROP _fru_parent name:/frutree/chassis/system-board/mem-slot?Label=J0202/mem-module - -name:/platform/memory-controller?portid=0/memory-module-group?ID=0/memory-module?ID=2 -REFPROP _fru_parent name:/frutree/chassis/system-board/mem-slot?Label=J0304/mem-module - -name:/platform/memory-controller?portid=0/memory-module-group?ID=0/memory-module?ID=3 -REFPROP _fru_parent name:/frutree/chassis/system-board/mem-slot?Label=J0406/mem-module - -name:/platform/memory-controller?portid=0/memory-module-group?ID=1/memory-module?ID=0 -REFPROP _fru_parent name:/frutree/chassis/system-board/mem-slot?Label=J0101/mem-module - -name:/platform/memory-controller?portid=0/memory-module-group?ID=1/memory-module?ID=1 -REFPROP _fru_parent name:/frutree/chassis/system-board/mem-slot?Label=J0203/mem-module - -name:/platform/memory-controller?portid=0/memory-module-group?ID=1/memory-module?ID=2 -REFPROP _fru_parent name:/frutree/chassis/system-board/mem-slot?Label=J0305/mem-module - -name:/platform/memory-controller?portid=0/memory-module-group?ID=1/memory-module?ID=3 -REFPROP _fru_parent name:/frutree/chassis/system-board/mem-slot?Label=J0407/mem-module - -/* - * Populate PCI slots - */ -name:/frutree/chassis/system-board/pci-slot?Label=J2601 -REFNODE pci-card fru WITH name:/platform/pci@8,700000/picl?DeviceID=1 - -name:/frutree/chassis/system-board/pci-slot?Label=J2501 -REFNODE pci-card fru WITH name:/platform/pci@8,700000/picl?DeviceID=2 - -name:/frutree/chassis/system-board/pci-slot?Label=J2401 -REFNODE pci-card fru WITH name:/platform/pci@8,700000/picl?DeviceID=3 - -name:/frutree/chassis/system-board/pci-slot?Label=J2301 -REFNODE pci-card fru WITH name:/platform/pci@8,600000/picl?DeviceID=1 - -/* - * _fru_parent PCI devices - */ -name:/platform/pci@8,700000/picl?DeviceID=1 -REFPROP _fru_parent name:/frutree/chassis/system-board/pci-slot?Label=J2601/pci-card - -name:/platform/pci@8,700000/picl?DeviceID=2 -REFPROP _fru_parent name:/frutree/chassis/system-board/pci-slot?Label=J2501/pci-card - -name:/platform/pci@8,700000/picl?DeviceID=3 -REFPROP _fru_parent name:/frutree/chassis/system-board/pci-slot?Label=J2401/pci-card - -name:/platform/pci@8,600000/picl?DeviceID=1 -REFPROP _fru_parent name:/frutree/chassis/system-board/pci-slot?Label=J2301/pci-card - diff --git a/usr/src/cmd/picl/plugins/sun4u/lw8/Makefile b/usr/src/cmd/picl/plugins/sun4u/lw8/Makefile deleted file mode 100644 index 8343aadfff..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/lw8/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 2001 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -#ident "%Z%%M% %I% %E% SMI" -# - -SUBDIRS= fruaccess frutree .WAIT - -MSGSUBDIRS= fruaccess frutree - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -.KEEP_STATE: - -all install clean clobber: $(SUBDIRS) - -_msg: $(MSGSUBDIRS) - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/lw8/fruaccess/Makefile b/usr/src/cmd/picl/plugins/sun4u/lw8/fruaccess/Makefile deleted file mode 100644 index bce4b34b6a..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/lw8/fruaccess/Makefile +++ /dev/null @@ -1,89 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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 $(SRC)/Makefile.psm - -LIBRARY= libfruaccess.a -VERS= .1 - -OBJECTS= libfruaccess.o - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Netra-T12 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -CPPFLAGS += -I$(SRC)/uts/sun4u/ -I$(SRC)/uts/common/ - -SRCS= $(OBJECTS:%.o=%.c) - -LIBS = $(DYNLIB) - -ROOTLIBDIR = $(ROOT_PLAT_LIBDIR) - -CPPFLAGS += -I$(SRC)/uts/sun4u/lw8 -CPPFLAGS += -I$(SRC)/cmd/picl/plugins/sun4u/lib/fruaccess -DYNFLAGS += -R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins -LDLIBS += -L$(SRC)/lib/libptree/$(MACH) -LDLIBS += -L$(ROOT)/usr/lib/picl/plugins -LDLIBS += -lc -lpicltree - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -POFILE= libfruaccess.po - -all: $(LIBS) $(LIBLINKS) - -install: $(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) - -_msg: $(MSGDOMAIN) $(POFILE) - $(RM) $(MSGDOMAIN)/$(POFILE) - $(CP) $(POFILE) $(MSGDOMAIN)/lw8_$(POFILE) - -$(MSGDOMAIN): - $(INS.dir) - -$(LIBLINKS): FRC - rm -f $(LIBLINKS); ln -s $(DYNLIB) $(LIBLINKS) - -# include library targets -include $(SRC)/cmd/picl/plugins/Makefile.targ -include $(SRC)/lib/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/lw8/fruaccess/libfruaccess.c b/usr/src/cmd/picl/plugins/sun4u/lw8/fruaccess/libfruaccess.c deleted file mode 100644 index a4fea2bd61..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/lw8/fruaccess/libfruaccess.c +++ /dev/null @@ -1,485 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* - * these functions will overlay the symbol table of libfruaccess - * at runtime - */ -container_hdl_t fru_open_container(picl_nodehdl_t fru); -int fru_close_container(container_hdl_t fru); -int fru_get_num_sections(container_hdl_t container, - door_cred_t *cred); -int fru_get_sections(container_hdl_t container, section_t *section, - int max_sections, door_cred_t *cred); -int fru_get_num_segments(section_hdl_t section, door_cred_t *cred); -int fru_get_segments(section_hdl_t section, segment_t *segment, - int max_segments, door_cred_t *cred); -int fru_add_segment(section_hdl_t section, segment_t *segment, - section_hdl_t *newsection, door_cred_t *cred); -int fru_delete_segment(segment_hdl_t segment, - section_hdl_t *newsection, door_cred_t *cred); -ssize_t fru_read_segment(segment_hdl_t segment, void *buffer, - size_t nbytes, door_cred_t *cred); -ssize_t fru_write_segment(segment_hdl_t segment, const void *data, - size_t nbytes, segment_hdl_t *newsegment, - door_cred_t *cred); -int fru_get_num_packets(segment_hdl_t segment, door_cred_t *cred); -int fru_get_packets(segment_hdl_t segment, packet_t *packet, - int max_packets, door_cred_t *cred); -int fru_update_payload(packet_hdl_t packet, const void *data, - size_t nbytes, packet_hdl_t *newpacket, door_cred_t *cred); -int fru_append_packet(segment_hdl_t segment, packet_t *packet, - const void *payload, size_t nbytes, - segment_hdl_t *newsegment, door_cred_t *cred); -int fru_delete_packet(packet_hdl_t packet, - segment_hdl_t *newsegment, door_cred_t *cred); -int fru_is_data_available(picl_nodehdl_t fru); - -#define PICL_PROP_SC_HANDLE "SC_handle" -#define PICL_PROP_DATA_AVAIL "FRUDataAvailable" -#define MAX_LINE_SIZE 1024 - -#define OPENDEVFRU gettext("fru_open_dev: open of %s failed %s") -#define GETPV gettext("fru_open_container: ptree_get_propval_by_name failed %s") - -static int -fru_open_dev(void) -{ - static int opendevfru = 0; - static int frufd = 0; - - if ((opendevfru == 0) && (frufd == 0)) { - if ((frufd = open(FRU_PSEUDO_DEV, O_RDWR, access)) == -1) { - syslog(LOG_ERR, OPENDEVFRU, FRU_PSEUDO_DEV, - strerror(errno)); - return (-1); - } - opendevfru = 1; - } - return (frufd); -} - -/* - * Look up the container_hdl in the PICL tree. - */ -container_hdl_t -fru_open_container(picl_nodehdl_t fruh) -{ - int err; - container_hdl_t container_hdl; - - if (fru_open_dev() == -1) { - return (NULL); - } - - err = ptree_get_propval_by_name(fruh, PICL_PROP_DATA_AVAIL, NULL, NULL); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, GETPV, PICL_PROP_DATA_AVAIL, err); - return (NULL); - } - err = ptree_get_propval_by_name(fruh, PICL_PROP_SC_HANDLE, - &container_hdl, sizeof (container_hdl_t)); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, GETPV, PICL_PROP_SC_HANDLE, err); - return (NULL); - } - return (container_hdl); -} - -/* - * Note : fru_open_container and fru_close_container do not map onto the opens - * and closes of the sgfru device on lw8. There is one sgfru device which - * handles all containers. - */ -/*ARGSUSED*/ -int -fru_close_container(container_hdl_t fru) -{ - if (fru_open_dev() == -1) { - return (-1); - } - return (0); -} - -/*ARGSUSED*/ -int -fru_get_num_sections(container_hdl_t container, door_cred_t *cred) -{ - section_info_t numsections; - int fd; - - if ((fd = fru_open_dev()) == -1) { - return (-1); - } - numsections.hdl = container; - numsections.cnt = 0; - if (ioctl(fd, SGFRU_GETNUMSECTIONS, &numsections) != 0) { - return (-1); - } - return (numsections.cnt); -} - -/*ARGSUSED*/ -int -fru_get_sections(container_hdl_t container, section_t *section, - int max_sections, door_cred_t *cred) -{ - sections_t sections; - int fd; - - if ((fd = fru_open_dev()) == -1) { - return (-1); - } - sections.fru_hdl = container; - sections.fru_cnt = max_sections; - sections.frus = section; - if (ioctl(fd, SGFRU_GETSECTIONS, §ions) != 0) { - return (-1); - } - return (sections.fru_cnt); -} - -/*ARGSUSED*/ -int -fru_get_num_segments(section_hdl_t section, door_cred_t *cred) -{ - segment_info_t numsegments; - int fd; - - if ((fd = fru_open_dev()) == -1) { - return (-1); - } - numsegments.hdl = section; - numsegments.cnt = 0; - if (ioctl(fd, SGFRU_GETNUMSEGMENTS, &numsegments) != 0) { - return (-1); - } - return (numsegments.cnt); -} - -/*ARGSUSED*/ -int -fru_get_segments(section_hdl_t section, segment_t *segment, int max_segments, - door_cred_t *cred) -{ - segments_t segments; - int fd; - - if ((fd = fru_open_dev()) == -1) { - return (-1); - } - segments.fru_hdl = section; - segments.fru_cnt = max_segments; - segments.frus = segment; - if (ioctl(fd, SGFRU_GETSEGMENTS, &segments) != 0) { - return (-1); - } - return (segments.fru_cnt); -} - -/*ARGSUSED*/ -int -fru_add_segment(section_hdl_t section, segment_t *segment, - section_hdl_t *newsection, door_cred_t *cred) -{ - segments_t newsegment; - int fd; - - /* check the effective uid of the client */ - if (cred->dc_euid != 0) { - errno = EPERM; - return (-1); /* not a root */ - } - - if ((fd = fru_open_dev()) == -1) { - return (-1); - } - newsegment.fru_hdl = section; - newsegment.fru_cnt = 1; - newsegment.frus = segment; - if (ioctl(fd, SGFRU_ADDSEGMENT, &newsegment) != 0) { - return (-1); - } - /* - * The new segment handle is returned in segment, - * return the updated section handle in newsection. - */ - *newsection = newsegment.fru_hdl; - return (0); -} - -int -fru_delete_segment(segment_hdl_t segment, section_hdl_t *newsection, - door_cred_t *cred) -{ - segment_info_t delsegment; - int fd; - - /* check the effective uid of the client */ - if (cred->dc_euid != 0) { - errno = EPERM; - return (-1); /* not a root */ - } - - if ((fd = fru_open_dev()) == -1) { - return (-1); - } - delsegment.hdl = segment; - if (ioctl(fd, SGFRU_DELETESEGMENT, &delsegment) != 0) { - return (-1); - } - /* Return the updated section handle in newsection. */ - *newsection = delsegment.hdl; - return (0); -} - -/*ARGSUSED*/ -ssize_t -fru_read_segment(segment_hdl_t segment, void *buffer, size_t nbytes, - door_cred_t *cred) -{ - segments_t readsegment; - int fd; - - if ((fd = fru_open_dev()) == -1) { - return (-1); - } - readsegment.fru_hdl = segment; - readsegment.fru_cnt = nbytes; - readsegment.frus = buffer; - if (ioctl(fd, SGFRU_READRAWSEGMENT, &readsegment) != 0) { - return (-1); - } - return ((ssize_t)readsegment.fru_cnt); -} - -/*ARGSUSED*/ -ssize_t -fru_write_segment(segment_hdl_t segment, const void *buffer, size_t nbytes, - segment_hdl_t *newsegment, door_cred_t *cred) -{ - segments_t writesegment; - int fd; - - if ((fd = fru_open_dev()) == -1) { - return (-1); - } - writesegment.fru_hdl = segment; - writesegment.fru_cnt = nbytes; - writesegment.frus = (void *)buffer; - if (ioctl(fd, SGFRU_WRITERAWSEGMENT, &writesegment) != 0) { - return (-1); - } - /* Return the updated segment handle in newsegment. */ - *newsegment = writesegment.fru_hdl; - return ((ssize_t)writesegment.fru_cnt); -} - -/*ARGSUSED*/ -int -fru_get_num_packets(segment_hdl_t segment, door_cred_t *cred) -{ - packet_info_t numpackets; - int fd; - - if ((fd = fru_open_dev()) == -1) { - return (-1); - } - numpackets.hdl = segment; - numpackets.cnt = 0; - if (ioctl(fd, SGFRU_GETNUMPACKETS, &numpackets) != 0) { - return (-1); - } - return (numpackets.cnt); -} - -/*ARGSUSED*/ -int -fru_get_packets(segment_hdl_t segment, packet_t *packet, int max_packets, - door_cred_t *cred) -{ - packets_t packets; - int fd; - - if ((fd = fru_open_dev()) == -1) { - return (-1); - } - packets.fru_hdl = segment; - packets.fru_cnt = max_packets; - packets.frus = packet; - if (ioctl(fd, SGFRU_GETPACKETS, &packets) != 0) { - return (-1); - } - return (packets.fru_cnt); -} - -/*ARGSUSED*/ -ssize_t -fru_get_payload(packet_hdl_t packet, void *buffer, size_t nbytes, - door_cred_t *cred) -{ - payload_t payload; - int fd; - - if ((fd = fru_open_dev()) == -1) { - return (-1); - } - payload.fru_hdl = packet; - payload.fru_cnt = nbytes; - payload.frus = buffer; - if (ioctl(fd, SGFRU_GETPAYLOAD, &payload) != 0) { - return (-1); - } - return ((ssize_t)payload.fru_cnt); -} - -int -fru_update_payload(packet_hdl_t packet, const void *data, size_t nbytes, - packet_hdl_t *newpacket, door_cred_t *cred) -{ - payload_t payload; - int fd; - - /* check the effective uid of the client */ - if (cred->dc_euid != 0) { - errno = EPERM; - return (-1); /* not a root */ - } - - if ((fd = fru_open_dev()) == -1) { - return (-1); - } - payload.fru_hdl = packet; - payload.fru_cnt = nbytes; - payload.frus = (void *)data; - if (ioctl(fd, SGFRU_UPDATEPAYLOAD, &payload) != 0) { - return (-1); - } - /* Return the updated packet handle in newpacket. */ - *newpacket = payload.fru_hdl; - return (0); -} - -int -fru_append_packet(segment_hdl_t segment, packet_t *packet, const void *payload, - size_t nbytes, segment_hdl_t *newsegment, door_cred_t *cred) -{ - append_info_t appendpkt; - int fd; - - /* check the effective uid of the client */ - if (cred->dc_euid != 0) { - errno = EPERM; - return (-1); /* not a root */ - } - - if ((fd = fru_open_dev()) == -1) { - return (-1); - } - appendpkt.packet = *packet; - appendpkt.payload_hdl = segment; - appendpkt.payload_cnt = nbytes; - appendpkt.payload_data = (void *)payload; - if (ioctl(fd, SGFRU_APPENDPACKET, &appendpkt) != 0) { - return (-1); - } - /* - * The new packet handle is returned in packet, - * return the updated segment handle in newsegment. - */ - packet->handle = appendpkt.packet.handle; - *newsegment = appendpkt.payload_hdl; - return (0); -} - -int -fru_delete_packet(packet_hdl_t packet, segment_hdl_t *newsegment, - door_cred_t *cred) -{ - packet_info_t delpacket; - int fd; - - /* check the effective uid of the client */ - if (cred->dc_euid != 0) { - errno = EPERM; - return (-1); /* not a root */ - } - - if ((fd = fru_open_dev()) == -1) { - return (-1); - } - delpacket.hdl = packet; - if (ioctl(fd, SGFRU_DELETEPACKET, &delpacket) != 0) { - return (-1); - } - /* Return the updated segment handle in newsegment. */ - *newsegment = delpacket.hdl; - return (0); -} - -/* - * Description : - * fru_is_data_available() checks to see if the frudata - * is available on a fru. - * - * Arguments : - * picl_nodehdl_t holds the picl node handle of the fru. - * - * Return : - * int - * return 1: if FRUID information is available - * return 0: if FRUID information is not present - * - */ - -/* ARGSUSED */ -int -fru_is_data_available(picl_nodehdl_t fru) -{ - return (0); -} diff --git a/usr/src/cmd/picl/plugins/sun4u/lw8/frutree/Makefile b/usr/src/cmd/picl/plugins/sun4u/lw8/frutree/Makefile deleted file mode 100644 index 3f669f64bd..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/lw8/frutree/Makefile +++ /dev/null @@ -1,96 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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 $(SRC)/Makefile.psm - -LIBRARY = libpiclfrutree.a -VERS = .1 - -OBJECTS = piclfrutree.o - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Netra-T12 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -CPPFLAGS += -I$(SRC)/uts/sun4u/serengeti -CPPFLAGS += -I$(SRC)/uts/sun4u/serengeti -CPPFLAGS += -I$(SRC)/uts/sun4u/lw8 -CPPFLAGS += -I$(SRC)/uts/sun4u -CPPFLAGS += -I$(SRC)/uts/common - -SRCS = $(OBJECTS:%.o=%.c) - -LIBS = $(DYNLIB) - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - - -CPPFLAGS += -D_SGFRU -DYNFLAGS += -R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins -LDLIBS += -L$(DEVTREE_SRC_DIR) -LDLIBS += -L$(SRC)/lib/libpicltree/$(MACH) -LDLIBS += -L$(SRC)/cmd/picl/plugins/common/devtree -LDLIBS += -L$(ROOT)/usr/lib/picl/plugins -LDLIBS += -lc -lpicldevtree -lpiclmemcfg -LDLIBS += -lpicltree -lnvpair -lkstat -ldevice - -.KEEP_STATE: - -SUBDIRS = - -POFILE = piclfrutree.po - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -all: $(LIBS) $(LIBLINKS) - -install: $(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) - -_msg: $(MSGDOMAIN) $(POFILE) - $(RM) $(MSGDOMAIN)/$(POFILE) - $(CP) $(POFILE) $(MSGDOMAIN)/lw8_$(POFILE) - -$(MSGDOMAIN): - $(INS.dir) - -$(LIBLINKS): FRC - $(RM) $@; $(SYMLINK) $(DYNLIB) $@ - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/lw8/frutree/piclfrutree.c b/usr/src/cmd/picl/plugins/sun4u/lw8/frutree/piclfrutree.c deleted file mode 100644 index f4e14aa564..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/lw8/frutree/piclfrutree.c +++ /dev/null @@ -1,4064 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - -/* - * This plugin-in creates the FRU Hierarchy for the - * SUNW,Netra-T12 platform and manages the environmental sensors - * on the platform. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "libdevice.h" -#include "picldefs.h" -#define NDEBUG -#include - -/* - * Plugin registration entry points - */ -static void piclfrutree_register(void); -static void piclfrutree_init(void); -static void piclfrutree_fini(void); -#pragma init(piclfrutree_register) - -static picld_plugin_reg_t my_reg_info = { - PICLD_PLUGIN_VERSION_1, - PICLD_PLUGIN_CRITICAL, - "SUNW_Netra-T12_frutree", - piclfrutree_init, - piclfrutree_fini, -}; - -/* - * Log message texts - */ -#define DEV_OPEN_FAIL gettext("piclfrutree_init: open of %s failed: %s") -#define ADD_NODES_FAIL gettext("piclfrutree_init: add_all_nodes failed: %d") -#define GET_ROOT_FAIL gettext("piclfrutree_init: ptree_get_root failed") -#define ADD_FRUTREE_FAIL gettext("piclfrutree_init: add frutree failed") -#define INVALID_PICL_CLASS gettext("add_subtree: invalid picl class 0x%x") -#define ADD_NODE_FAIL gettext("ptree_create_and_add_node %s failed: %d") -#define GET_NEXT_BY_ROW_FAIL gettext("ptree_get_next_by_row %s failed: %d") -#define PROPINFO_FAIL gettext("ptree_init_propinfo %s failed: %d") -#define GET_PROPVAL_FAIL gettext("ptree_get_propval failed: %d") -#define DELETE_PROP_FAIL gettext("ptree_delete_prop failed: %d") -#define DELETE_NODE_FAIL gettext("ptree_delete_node failed: %d") -#define ADD_PROP_FAIL gettext("ptree_create_and_add_prop %s failed: %d") -#define SGFRU_IOCTL_FAIL gettext("sgfru ioctl 0x%x handle 0x%llx failed: %s") -#define LED_IOCTL_FAIL gettext("led ioctl failed: %s") -#define MALLOC_FAIL gettext("piclfrutree: malloc failed") -#define NO_SC_FAIL gettext("piclfrutree: cannot find sc node") -#define NO_NODE_FAIL gettext("piclfrutree: cannot find node %s: %d") -#define KSTAT_FAIL gettext("piclfrutree: failure accessing kstats") -#define ADD_TBL_ENTRY_FAIL gettext("piclfrutree: cannot add entry to table") -#define PROP_LOOKUP_FAIL gettext("piclfrutree: cannot find %s property: %d") -#define EM_DI_INIT_FAIL gettext("frutree: di_init failed: %s") -#define EM_THREAD_CREATE_FAILED gettext("frutree: pthread_create failed: %s") -#define EM_MUTEX_FAIL gettext("frutree: pthread_mutex_lock returned: %s") -#define EM_POLL_FAIL gettext("frutree: poll() failed: %s") -#define DEVCTL_DEVICE_ACQUIRE_FAILED \ - gettext("frutree: devctl_device_acquire() failed: %s") - -/* - * PICL property values - */ -#define PICL_PROPVAL_TRUE "true" -#define PICL_PROPVAL_SYSTEM "system" -#define PICL_PROPVAL_ON "ON" -#define PICL_PROPVAL_OFF "OFF" -#define PICL_PROPVAL_BLINKING "BLINKING" -#define PICL_PROPVAL_FLASHING "FLASHING" -#define PICL_PROPVAL_CHASSIS "chassis" -#define PICL_PROPVAL_AMBIENT "Ambient" -#define PICL_PROPVAL_DIE "Die" -#define PICL_PROPVAL_GREEN "green" -#define PICL_PROPVAL_AMBER "amber" -#define PICL_PROPVAL_OKAY "okay" -#define PICL_PROPVAL_FAILED "failed" -#define PICL_PROPVAL_WARNING "warning" -#define PICL_PROPVAL_DISABLED "disabled" -#define PICL_PROPVAL_UNKNOWN "unknown" -#define PICL_PROPVAL_SELF_REGULATING "self-regulating" -#define PICL_PROPVAL_PER_CENT "%" -#define PICL_PROP_BANK_STATUS "bank-status" - -/* - * PICL property names - */ -#define PICL_PROP_LOW_WARNING_THRESHOLD "LowWarningThreshold" - -/* - * Local defines - */ -#define MAX_LINE_SIZE 1024 -#define MAX_TRIES 4 -#define MAX_SPEED_UNIT_LEN 20 -#define MAX_OPERATIONAL_STATUS_LEN 10 -#define MAX_CONDITION_LEN 10 -#define MAX_LABEL_LEN 256 -#define MAX_STATE_LEN 10 -#define MAX_STATE_SIZE 32 -#define LED_PSEUDO_DEV "/devices/pseudo/lw8@0:lw8" -#define SC_DEV "/platform/ssm@0,0/pci@18,700000/bootbus-controller@4" -#define SC_DEV_PCIX "/platform/ssm@0,0/pci@18,700000/pci@4/bootbus-controller@3" -#define CPU_DEV "/platform/ssm@0,0/SUNW,UltraSPARC-III@%x,0" -#define CPU_DEV2 "/platform/ssm@0,0/SUNW,UltraSPARC-III+@%x,0" -#define CPU_DEV3C0 "/platform/ssm@0,0/cmp@%x,0/cpu@0" -#define CPU_DEV3C1 "/platform/ssm@0,0/cmp@%x,0/cpu@1" -#define MEMORY_DEV "/platform/ssm@0,0/memory-controller@%x,400000" -#define IO_DEV "/platform/ssm@0,0/pci@%s" -#define DISK0_BASE_PATH "/ssm@0,0/pci@18,600000/scsi@2/sd@0,0" -#define DISK0_DEV "/platform" DISK0_BASE_PATH -#define DISK1_BASE_PATH "/ssm@0,0/pci@18,600000/scsi@2/sd@1,0" -#define DISK1_DEV "/platform" DISK1_BASE_PATH -#define DISK0_BASE_PATH_PCIX "/ssm@0,0/pci@18,700000/scsi@2/sd@0,0" -#define DISK0_DEV_PCIX "/platform" DISK0_BASE_PATH_PCIX -#define DISK1_BASE_PATH_PCIX "/ssm@0,0/pci@18,700000/scsi@2/sd@1,0" -#define DISK1_DEV_PCIX "/platform" DISK1_BASE_PATH_PCIX -#define TAPE_DEV "/platform/ssm@0,0/pci@18,600000/scsi@2/st@5,0" -#define TAPE_DEV_PCIX "/platform/ssm@0,0/pci@18,700000/scsi@2/st@5,0" -#define DVD_DEV "/platform/ssm@0,0/pci@18,700000/ide@3/sd@0,0" -#define DVD_DEV_PCIX "/platform/ssm@0,0/pci@18,700000/pci@4/ide@2/sd@0,0" -#define CHASSIS_PATH "/frutree/chassis" -#define CHASSIS_LOC_PATH "/frutree/chassis/%s" -#define PROC_LOC_PATH "/frutree/chassis/SB%d/SB%d/P%d" -#define PROC_FRU_PATH "/frutree/chassis/SB%d/SB%d/P%d/P%d" -/* - * Calculate safari address to put in CPU_DEV/MEMORY_DEV string based on - * SBx/Py fru path name - */ -#define SB_P_TO_SAFARI_ADDR(sbname, pname) \ - ((pname[1] - '0') + (4 * (sbname[2] - '0'))) -#define SAFARI_ADDR_TO_SB(value) (value >> 2) -#define SAFARI_ADDR_TO_P(value) (value & 3) -#define AP_ID_PREAMBLE "ssm0:N0." -#define AP_ID_PREAMBLE_LEN 8 -#define LABEL_PREAMBLE "N0/" -#define LABEL_PREAMBLE_LEN 3 -/* - * work out type of fru based on name - */ -#define IS_ECACHE_NODE(name) (name[0] == 'E') -#define IS_DIMM_NODE(name) (name[0] == 'D' && name[1] != 'V') -#define IS_PROC_NODE(name) (name[0] == 'P' && name[1] != 'S') -#define IS_PSU_NODE(name) (name[0] == 'P' && name[1] == 'S') -#define IS_SB_NODE(name) (name[0] == 'S' && name[1] == 'B') -#define IS_IB_NODE(name) (name[0] == 'I') -#define IS_FT_NODE(name) (name[0] == 'F' && name[1] == 'T') -#define IS_FAN_NODE(name) (name[0] == 'F' && name[1] != 'T') -#define IS_RP_NODE(name) (name[0] == 'R') -/* - * rename sgfru driver's node_t to sgfrunode_t to avoid confusion - */ -#define sgfrunode_t node_t - -/* - * disk_led data - */ -#define REMOK_LED "ok_to_remove" -#define FAULT_LED "fault" -#define POWER_LED "power" - -/* - * 'struct lw8_disk' contains the per-disk metadata needed to - * manage the current state of one of the internal disks. - * - * 'lw8_disks[]' is an array that contains the metadata - * for N_DISKS disks. - * - * The d_fruname field of 'struct lw8_disk' is static. - * d_plat_path and d_devices_path are aliases for device-paths - * to the disk. They are logically static, as they are computed - * when the disk_leds_thread() thread does its initialization. - * - * d_state is the most interesting field, as it changes - * dynamically, based on whether the associated disk - * is currently Configured or Unconfigured (by DR). d_state - * is an optimization that minimizes per-disk actions such - * as setting of LEDs and updating the FRU Tree. - * - * A disk starts in a d_state of DISK_STATE_NOT_INIT - * and moves to DISK_STATE_READY when the disk is - * Configured (by DR) and it moves to DISK_STATE_NOT_READY - * when it is Unconfigured (by DR). - */ -typedef enum { - DISK_STATE_NOT_INIT, - DISK_STATE_READY, - DISK_STATE_NOT_READY -} disk_state_t; - -struct lw8_disk { - char *d_fruname; /* FRU name */ - char *d_plat_path; /* /platform */ - char *d_devices_path; /* /devices */ - disk_state_t d_state; -}; - -#define N_DISKS 2 -static struct lw8_disk lw8_disks[N_DISKS] = { - {"DISK0", NULL, NULL, DISK_STATE_NOT_INIT}, - {"DISK1", NULL, NULL, DISK_STATE_NOT_INIT} }; - -/* Duration of inactivity within disk_leds_thread() */ -#define THR_POLL_PERIOD 5000 /* milliseconds */ - -static volatile boolean_t disk_leds_thread_ack = B_FALSE; -static pthread_t ledsthr_tid; -static pthread_attr_t ledsthr_attr; -static boolean_t ledsthr_created = B_FALSE; -static uint_t ledsthr_poll_period = - THR_POLL_PERIOD; -static boolean_t g_mutex_init = B_FALSE; -static pthread_cond_t g_cv; -static pthread_cond_t g_cv_ack; -static pthread_mutex_t g_mutex; -static volatile boolean_t g_wait_now = B_FALSE; - -static void disk_leds_init(void); -static void disk_leds_fini(void); -static void *disk_leds_thread(void *args); - -/* - * Tables to convert sgenv information - */ -static char *hpu_type_table[] = { "", "SSC", "SB", "RP", "FT", - "IB", "PS", "ID"}; -static char *hpu_fru_type_table[] = { "", "SSC", "CPU", "RP", "FT", - "PCIB", "PS", "ID"}; -static char *hpu_part_table[] = { "", "sbbc", "sdc", - "ar", "cbh", "dx", "cheetah", "1.5vdc", "3.3vdc", - "5vdc", "12vdc", "output", "current", "board", "sc-app", - "schizo", "fan", "input"}; -static char *hpu_sensor_table[] = { "", "", "current", - "temp", "cooling", "1.5vdc", "1.8vdc", "3.3vdc", "5vdc", - "12vdc", "48vdc", NULL, "2.4vdc"}; -static char *hpu_sensor_class_table[] = { "", "", PICL_CLASS_CURRENT_SENSOR, - PICL_CLASS_TEMPERATURE_SENSOR, PICL_CLASS_FAN, - PICL_CLASS_VOLTAGE_SENSOR, PICL_CLASS_VOLTAGE_SENSOR, - PICL_CLASS_VOLTAGE_SENSOR, PICL_CLASS_VOLTAGE_SENSOR, - PICL_CLASS_VOLTAGE_SENSOR, PICL_CLASS_VOLTAGE_INDICATOR, - NULL, PICL_CLASS_VOLTAGE_SENSOR}; -static char *hpu_sensor_prop_table[] = { "", "", PICL_PROP_CURRENT, - PICL_PROP_TEMPERATURE, PICL_PROP_FAN_SPEED, PICL_PROP_VOLTAGE, - PICL_PROP_VOLTAGE, PICL_PROP_VOLTAGE, PICL_PROP_VOLTAGE, - PICL_PROP_VOLTAGE, PICL_PROP_CONDITION, NULL, PICL_PROP_VOLTAGE}; -static char *hpu_condition_table[] = {"unknown", "okay", "failing", - "failed", "unusable"}; - -/* - * variables set up in init - */ -static picl_nodehdl_t frutreeh; -static picl_nodehdl_t sch = NULL; -static int init_complete; -static int pcix_io = 0; - -/* - * forward reference - */ -static int add_all_nodes(void); -static int remove_subtree(picl_nodehdl_t parh); -static int add_subtree(picl_nodehdl_t parh, fru_hdl_t fruparent); -static int add_picl_node(picl_nodehdl_t parh, sgfrunode_t *sgfrunode, - picl_nodehdl_t *childp); -static int add_chassis_node(picl_nodehdl_t parh, sgfrunode_t *sgfrunode, - picl_nodehdl_t *childp); -static int add_fru_node(picl_nodehdl_t parh, sgfrunode_t *sgfrunode, - picl_nodehdl_t *childp); -static int add_location_node(picl_nodehdl_t parh, sgfrunode_t *sgfrunode, - picl_nodehdl_t *childp); -static int add_led_nodes(picl_nodehdl_t nodeh, char *name, int position, - picl_prophdl_t tblhdl); -static int add_env_nodes(picl_nodehdl_t nodeh, char *nodename, - picl_prophdl_t tblhdl); -static int add_intermediate_nodes(picl_nodehdl_t *nodep, char *labelp, - picl_prophdl_t *tblhdlp, char *slot_name, char *fru_name); -static int add_intermediate_location(picl_nodehdl_t *nodep, char *labelp, - char *slot_name); -static int add_pci_location(picl_nodehdl_t childh, char *parent_addr, - char bus_addr, char *slot_name); -static picl_nodehdl_t find_child_by_name(picl_nodehdl_t parh, char *name); -static int create_dimm_references(picl_nodehdl_t parh, int dimm_id, - picl_nodehdl_t nodeh, picl_prophdl_t tblhdl); -static int create_cpu_references(char *pname, picl_nodehdl_t nodeh, - picl_prophdl_t tblhdl); -static void post_frudr_event(char *ename, picl_nodehdl_t parenth, - picl_nodehdl_t fruh); -static int remove_references(picl_prophdl_t refprop, char *class); -static int remove_picl_node(picl_nodehdl_t nodeh); -static sgfrunode_t *get_node_children(fru_hdl_t fruparent, int *num_childrenp); -static int add_prop_ull(picl_nodehdl_t nodeh, uint64_t handle, char *name); -static int add_prop_void(picl_nodehdl_t nodeh, char *name); -static int add_prop_ref(picl_nodehdl_t nodeh, picl_nodehdl_t value, char *name); -static int add_prop_int(picl_nodehdl_t nodeh, int value, char *name); -static int add_prop_float(picl_nodehdl_t nodeh, float value, char *name); -static int add_prop_charstring(picl_nodehdl_t nodeh, char *value, char *name); -static void frudr_evhandler(const char *ename, const void *earg, - size_t size, void *cookie); -static void frumemcfg_evhandler(const char *ename, const void *earg, - size_t size, void *cookie); -static int add_sensor_prop(picl_nodehdl_t nodeh, char *class); -static int add_sensor_node(picl_nodehdl_t fruhdl, picl_nodehdl_t lochdl, - char *nodename, char *class, char *prop_class, - picl_prophdl_t tblhdl, picl_nodehdl_t *sensorhdlp); -static int create_table(picl_nodehdl_t fruhdl, picl_prophdl_t *tblhdlp, - char *tbl_name); -static int create_table_entry(picl_prophdl_t tblhdl, - picl_nodehdl_t refhdl, char *class); -static int get_sensor_data(ptree_rarg_t *arg, void *result); -static int get_led(char *name, char *ptr, char *result); -static int get_led_data(ptree_rarg_t *arg, void *result); -static int set_led_data(ptree_warg_t *arg, const void *value); -static int get_cpu_status(ptree_rarg_t *arg, void *result); -static int add_board_status(picl_nodehdl_t nodeh, char *nodename); -static int get_board_status(ptree_rarg_t *arg, void *result); -static int get_op_status(ptree_rarg_t *arg, void *result); - -#define sprintf_buf2(buf, a1, a2) (void) snprintf(buf, sizeof (buf), a1, a2) -#define sprintf_buf3(buf, a1, a2, a3) \ - (void) snprintf(buf, sizeof (buf), a1, a2, a3) -#define sprintf_buf4(buf, a1, a2, a3, a4) \ - (void) snprintf(buf, sizeof (buf), a1, a2, a3, a4) -#define sprintf_buf5(buf, a1, a2, a3, a4, a5) \ - (void) snprintf(buf, sizeof (buf), a1, a2, a3, a4, a5) -/* - * This function is executed as part of .init when the plugin is - * dlopen()ed - */ -static void -piclfrutree_register(void) -{ - (void) picld_plugin_register(&my_reg_info); -} - -/* - * This function is the init entry point of the plugin. - * It initializes the /frutree tree - */ -static void -piclfrutree_init(void) -{ - int err; - - (void) ptree_register_handler(PICLEVENT_DR_AP_STATE_CHANGE, - frudr_evhandler, NULL); - (void) ptree_register_handler(PICLEVENT_MC_ADDED, - frumemcfg_evhandler, NULL); - (void) ptree_register_handler(PICLEVENT_MC_REMOVED, - frumemcfg_evhandler, NULL); - init_complete = 0; - - err = add_all_nodes(); - disk_leds_init(); - init_complete = 1; - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, ADD_NODES_FAIL, err); - piclfrutree_fini(); - } -} - -/* - * This function is the fini entry point of the plugin. - */ -static void -piclfrutree_fini(void) -{ - (void) ptree_unregister_handler(PICLEVENT_DR_AP_STATE_CHANGE, - frudr_evhandler, NULL); - (void) ptree_unregister_handler(PICLEVENT_MC_ADDED, - frumemcfg_evhandler, NULL); - (void) ptree_unregister_handler(PICLEVENT_MC_REMOVED, - frumemcfg_evhandler, NULL); - (void) remove_subtree(frutreeh); - disk_leds_fini(); -} - -/* - * called from piclfrutree_init() to initialise picl frutree - */ -static int -add_all_nodes(void) -{ - int err; - picl_nodehdl_t rooth; - - /* Get the root node of the PICL tree */ - err = ptree_get_root(&rooth); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, GET_ROOT_FAIL); - return (err); - } - - /* find sc node so we can create sensor nodes under it */ - - err = ptree_get_node_by_path(SC_DEV, &sch); - if (err != PICL_SUCCESS) { - - /* - * There is a XMITS/PCI-X IO Board assembly implements - * a different path for the the bootbus controller. - */ - err = ptree_get_node_by_path(SC_DEV_PCIX, &sch); - if (err == PICL_SUCCESS) - pcix_io = 1; - } - - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, NO_SC_FAIL); - return (err); - } - - /* Create and add the root node of the FRU subtree */ - err = ptree_create_and_add_node(rooth, PICL_NODE_FRUTREE, - PICL_CLASS_PICL, &frutreeh); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, ADD_FRUTREE_FAIL); - return (err); - } - - /* Recursively query the SC and add frutree nodes */ - return (add_subtree(frutreeh, ROOTPARENT)); -} - -/* - * Recursive routine to add picl nodes to the frutree. Called from - * add_all_nodes() for the whole frutree at initialisation, and from - * frudr_evhandler() for portions of the frutree on DR insert events - */ -static int -add_subtree(picl_nodehdl_t parh, fru_hdl_t handle) -{ - int err, i; - int num_children; - sgfrunode_t *cp, *fruchildren = NULL; - picl_nodehdl_t childh; - - /* find children of the parent node */ - fruchildren = get_node_children(handle, &num_children); - if (fruchildren == NULL) - return (PICL_FAILURE); - - /* for each child, add a new picl node */ - for (i = 0, cp = fruchildren; i < num_children; i++, cp++) { - /* - * Add the appropriate PICL class - */ - childh = 0; - err = add_picl_node(parh, cp, &childh); - if (err == PICL_NOTNODE) - continue; - if (err != PICL_SUCCESS) { - free(fruchildren); - return (err); - } - - /* - * Recursively call this function based on has_children hint - */ - if (childh && cp->has_children) { - err = add_subtree(childh, cp->handle); - if (err != PICL_SUCCESS) { - free(fruchildren); - return (err); - } - } - } - free(fruchildren); - return (PICL_SUCCESS); -} - -/* - * Recursive routine to remove picl nodes to the frutree. Called from - * piclfrutree_fini() for the whole frutree at termination, and from - * frudr_completion_handler() for portions of the frutree on DR remove events - */ -static int -remove_subtree(picl_nodehdl_t parh) -{ - picl_nodehdl_t chdh; - - for (;;) { - if (ptree_get_propval_by_name(parh, PICL_PROP_CHILD, &chdh, - sizeof (picl_nodehdl_t)) == PICL_SUCCESS) { - if (remove_subtree(chdh) != PICL_SUCCESS) - return (PICL_FAILURE); - } else { - return (remove_picl_node(parh)); - } - } - /* NOTREACHED */ -} - -/* - * Add fru and location nodes with SC_handle property - * (aka, container handle, for frus). - * Return picl_nodehdl of created node in *childp. - */ -static int -add_picl_node(picl_nodehdl_t parh, sgfrunode_t *sgfrunode, - picl_nodehdl_t *childp) -{ - switch (sgfrunode->class) { - case PSEUDO_FRU_CLASS: - return (add_chassis_node(parh, sgfrunode, childp)); - - case FRU_CLASS: - return (add_fru_node(parh, sgfrunode, childp)); - - case LOCATION_CLASS: - return (add_location_node(parh, sgfrunode, childp)); - - default: - syslog(LOG_ERR, INVALID_PICL_CLASS, sgfrunode->class); - return (PICL_NOTNODE); - } -} - -/* - * create chassis node - */ -static int -add_chassis_node(picl_nodehdl_t parh, sgfrunode_t *sgfrunode, - picl_nodehdl_t *childp) -{ - int err; - uint64_t handle = (uint64_t)sgfrunode->handle; - picl_prophdl_t tblhdl; - picl_nodehdl_t nodeh; - picl_nodehdl_t devhdl; - picl_nodehdl_t childh; - - err = ptree_create_and_add_node(parh, PICL_PROPVAL_CHASSIS, - PICL_CLASS_FRU, &childh); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, ADD_NODE_FAIL, PICL_PROPVAL_CHASSIS, err); - return (err); - } - err = add_prop_ull(childh, handle, PICL_PROP_SC_HANDLE); - if (err != PICL_SUCCESS) - return (err); - - /* - * add devices table to chassis node (may need references - * to led devices) - */ - err = create_table(childh, &tblhdl, PICL_PROP_DEVICES); - if (err != PICL_SUCCESS) - return (err); - - err = add_led_nodes(childh, "chassis", LOM_LED_POSITION_FRU, tblhdl); - if (err != PICL_SUCCESS) - return (err); - - if (pcix_io) - err = ptree_get_node_by_path(DISK0_DEV_PCIX, &devhdl); - else - err = ptree_get_node_by_path(DISK0_DEV, &devhdl); - - nodeh = childh; - if (err != PICL_SUCCESS) { - err = add_intermediate_location(&nodeh, "DISK0", "disk-slot"); - } else { - err = add_intermediate_nodes(&nodeh, "DISK0", &tblhdl, - "disk-slot", NULL); - if (err != PICL_SUCCESS) - return (err); - err = add_prop_ref(devhdl, nodeh, PICL_REFPROP_FRU_PARENT); - if (err != PICL_SUCCESS) - return (err); - err = create_table_entry(tblhdl, devhdl, PICL_CLASS_BLOCK); - } - if (err != PICL_SUCCESS) - return (err); - - if (pcix_io) - err = ptree_get_node_by_path(DISK1_DEV_PCIX, &devhdl); - else - err = ptree_get_node_by_path(DISK1_DEV, &devhdl); - - nodeh = childh; - if (err != PICL_SUCCESS) { - err = add_intermediate_location(&nodeh, "DISK1", "disk-slot"); - } else { - err = add_intermediate_nodes(&nodeh, "DISK1", &tblhdl, - "disk-slot", NULL); - if (err != PICL_SUCCESS) - return (err); - err = add_prop_ref(devhdl, nodeh, PICL_REFPROP_FRU_PARENT); - if (err != PICL_SUCCESS) - return (err); - err = create_table_entry(tblhdl, devhdl, PICL_CLASS_BLOCK); - } - if (err != PICL_SUCCESS) - return (err); - - if (pcix_io) - err = ptree_get_node_by_path(TAPE_DEV_PCIX, &devhdl); - else - err = ptree_get_node_by_path(TAPE_DEV, &devhdl); - - nodeh = childh; - if (err != PICL_SUCCESS) { - err = add_intermediate_location(&nodeh, "TAPE", "tape-slot"); - } else { - err = add_intermediate_nodes(&nodeh, "TAPE", &tblhdl, - "tape-slot", NULL); - if (err != PICL_SUCCESS) - return (err); - err = add_prop_ref(devhdl, nodeh, PICL_REFPROP_FRU_PARENT); - if (err != PICL_SUCCESS) - return (err); - err = create_table_entry(tblhdl, devhdl, PICL_CLASS_TAPE); - } - if (err != PICL_SUCCESS) - return (err); - - if (pcix_io) - err = ptree_get_node_by_path(DVD_DEV_PCIX, &devhdl); - else - err = ptree_get_node_by_path(DVD_DEV, &devhdl); - - nodeh = childh; - if (err != PICL_SUCCESS) { - err = add_intermediate_location(&nodeh, "DVD", "dvd-slot"); - } else { - err = add_intermediate_nodes(&nodeh, "DVD", &tblhdl, - "dvd-slot", NULL); - if (err != PICL_SUCCESS) - return (err); - err = add_prop_ref(devhdl, nodeh, PICL_REFPROP_FRU_PARENT); - if (err != PICL_SUCCESS) - return (err); - err = create_table_entry(tblhdl, devhdl, PICL_CLASS_CDROM); - } - if (err != PICL_SUCCESS) - return (err); - - if (pcix_io) { - /* - * The XMITS/PCI-X IO Assembly is layed out a bit differently. - */ - err = add_pci_location(childh, "19,600000", '1', "PCI0"); - if (err != PICL_SUCCESS) - return (err); - err = add_pci_location(childh, "19,600000", '2', "PCI1"); - if (err != PICL_SUCCESS) - return (err); - err = add_pci_location(childh, "19,700000", '1', "PCI2"); - if (err != PICL_SUCCESS) - return (err); - err = add_pci_location(childh, "19,700000", '2', "PCI3"); - if (err != PICL_SUCCESS) - return (err); - err = add_pci_location(childh, "18,600000", '1', "PCI4"); - if (err != PICL_SUCCESS) - return (err); - err = add_pci_location(childh, "18,600000", '2', "PCI5"); - if (err != PICL_SUCCESS) - return (err); - } else { - err = add_pci_location(childh, "18,700000", '1', "PCI0"); - if (err != PICL_SUCCESS) - return (err); - err = add_pci_location(childh, "18,700000", '2', "PCI1"); - if (err != PICL_SUCCESS) - return (err); - err = add_pci_location(childh, "19,700000", '1', "PCI2"); - if (err != PICL_SUCCESS) - return (err); - err = add_pci_location(childh, "19,700000", '2', "PCI3"); - if (err != PICL_SUCCESS) - return (err); - err = add_pci_location(childh, "19,700000", '3', "PCI4"); - if (err != PICL_SUCCESS) - return (err); - err = add_pci_location(childh, "18,600000", '1', "PCI5"); - if (err != PICL_SUCCESS) - return (err); - } - *childp = childh; - return (PICL_SUCCESS); -} - -/* - * create fru node, based on sgfru node "sgfrunode" under parent parh. Return - * picl_nodehdl of created node in *childp. - */ -static int -add_fru_node(picl_nodehdl_t parh, sgfrunode_t *sgfrunode, - picl_nodehdl_t *childp) -{ - int err; - picl_prophdl_t tblhdl; - picl_nodehdl_t childh; - uint64_t handle = (uint64_t)sgfrunode->handle; - char *nodename = sgfrunode->nodename; - - /* - * if sgfrunode already there, then just carry on own the tree - */ - childh = find_child_by_name(parh, nodename); - if (childh != NULL) { - /* - * for frus other than dimms and ecaches, update environmental - * sensors and board status if necessary - */ - if (IS_ECACHE_NODE(nodename)) { - *childp = childh; - return (PICL_SUCCESS); - } - if (IS_DIMM_NODE(nodename)) { - /* - * for dimms we just want status - */ - err = add_board_status(childh, nodename); - if (err != PICL_SUCCESS) - return (err); - *childp = childh; - return (PICL_SUCCESS); - } - err = add_board_status(childh, nodename); - if (err != PICL_SUCCESS) - return (err); - err = ptree_get_propval_by_name(childh, PICL_PROP_DEVICES, - &tblhdl, sizeof (tblhdl)); - if (err != PICL_SUCCESS) - return (err); - err = add_env_nodes(childh, nodename, tblhdl); - if (err != PICL_SUCCESS) - return (err); - *childp = childh; - return (PICL_SUCCESS); - } - - /* - * create requested fru node - */ - err = ptree_create_and_add_node(parh, nodename, PICL_CLASS_FRU, - &childh); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, ADD_NODE_FAIL, nodename, err); - return (err); - } - - /* - * if sgfru has sent us a valid handle, then there is fruid information. - * create the SC_handle, and FRUDateAvailable properties for FRUID. - */ - if (handle != -1ULL) { - err = add_prop_ull(childh, handle, PICL_PROP_SC_HANDLE); - if (err != PICL_SUCCESS) - return (err); - err = add_prop_void(childh, PICL_PROP_FRUDATA_AVAIL); - if (err != PICL_SUCCESS) - return (err); - } - - /* - * post fru added event to fru data plugin if this was due to - * a dr event - ie post-initialisation - */ - if (init_complete) - post_frudr_event(PICL_FRU_ADDED, parh, NULL); - - /* - * Create empty Devices table - we'll add lines to it as we go along - */ - err = create_table(childh, &tblhdl, PICL_PROP_DEVICES); - if (err != PICL_SUCCESS) - return (err); - - /* - * Ecache nodes don't have sensors - just set up FRUType - */ - if (IS_ECACHE_NODE(nodename)) { - err = add_prop_charstring(childh, "EEPROM", PICL_PROP_FRU_TYPE); - if (err != PICL_SUCCESS) - return (err); - *childp = childh; - return (PICL_SUCCESS); - } - - /* - * Dimm nodes don't have sensors - just set up FRUType and - * also reference properties to memory module nodes and OpStatus - */ - if (IS_DIMM_NODE(nodename)) { - err = add_prop_charstring(childh, "DIMM", PICL_PROP_FRU_TYPE); - if (err != PICL_SUCCESS) - return (err); - err = create_dimm_references(parh, nodename[1] - '0', - childh, tblhdl); - if (err != PICL_SUCCESS) - return (err); - err = add_board_status(childh, nodename); - if (err != PICL_SUCCESS) - return (err); - *childp = childh; - return (PICL_SUCCESS); - } - - /* - * not a Dimm or Ecache node - set up environmental info, - * board status and led info - */ - err = add_env_nodes(childh, nodename, tblhdl); - if (err != PICL_SUCCESS) - return (err); - - err = add_board_status(childh, nodename); - if (err != PICL_SUCCESS) - return (err); - - err = add_led_nodes(childh, nodename, LOM_LED_POSITION_FRU, tblhdl); - if (err != PICL_SUCCESS) - return (err); - - *childp = childh; - return (PICL_SUCCESS); -} - -/* - * create location node, based on sgfru node "sgfrunode" under parent parh. - * Return picl_nodehdl of created node in *childp. - */ -static int -add_location_node(picl_nodehdl_t parh, sgfrunode_t *sgfrunode, - picl_nodehdl_t *childp) -{ - int err; - uint64_t handle = (uint64_t)sgfrunode->handle; - char *labelp; - char label[MAX_LABEL_LEN]; - char *ptr; - picl_prophdl_t tblhdl; - picl_nodehdl_t childh; - - /* - * strip "N0/" off the label if present (hang-over from wildcat) - */ - if (strncmp(sgfrunode->location_label, LABEL_PREAMBLE, - LABEL_PREAMBLE_LEN) == 0) - (void) strlcpy(label, &sgfrunode->location_label[ - LABEL_PREAMBLE_LEN], sizeof (label)); - else - (void) strlcpy(label, &sgfrunode->location_label[0], - sizeof (label)); - - /* - * some of the locations returned by sgfru are actually of the form - * XX/YY/ZZ - we need to create multiple levels in the picl tree for - * these. - */ - labelp = label; - while ((ptr = strchr(labelp, '/')) != NULL) { - /* - * null end of this section of label - */ - *ptr = '\0'; - - /* - * add intermediate nodes - parh will point to the created node - */ - if (IS_PROC_NODE(labelp)) { - err = add_intermediate_nodes(&parh, labelp, &tblhdl, - "cpu", "PROC"); - } else { - err = add_intermediate_nodes(&parh, labelp, &tblhdl, - NULL, NULL); - } - if (err != PICL_SUCCESS) - return (err); - /* - * if processor node, then create links to associated cpu node - * and OpStatus property - */ - if (IS_PROC_NODE(labelp)) { - err = create_cpu_references(labelp, parh, tblhdl); - if (err != PICL_SUCCESS) - return (err); - err = add_board_status(parh, labelp); - if (err != PICL_SUCCESS) - return (err); - } - labelp = ptr + 1; - - /* - * set back to "/" - */ - *ptr = '/'; - } - - /* - * if node already there, then just carry on down the tree - */ - childh = find_child_by_name(parh, labelp); - if (childh != NULL) { - *childp = childh; - return (PICL_SUCCESS); - } - - /* - * now just have the final level of the node left. First create it. - */ - err = ptree_create_and_add_node(parh, labelp, PICL_CLASS_LOCATION, - &childh); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, ADD_NODE_FAIL, labelp, err); - return (err); - } - - /* - * if sgfru has sent us a valid handle, then there is fruid information. - * create the SC_handle property for FRUID. - */ - if (handle != -1ULL) { - err = add_prop_ull(childh, handle, PICL_PROP_SC_HANDLE); - if (err != PICL_SUCCESS) - return (err); - } - - /* create label property for location class */ - err = add_prop_charstring(childh, labelp, PICL_PROP_LABEL); - if (err != PICL_SUCCESS) - return (err); - - /* create SlotType property where appropriate */ - if (IS_ECACHE_NODE(sgfrunode->nodename)) { - err = add_prop_charstring(childh, - "ecache", PICL_PROP_SLOT_TYPE); - /* - * For Ecache, don't need to add environmental info - * so return here - */ - *childp = childh; - return (err); - } else if (IS_DIMM_NODE(sgfrunode->nodename)) { - err = add_prop_charstring(childh, "memory-module", - PICL_PROP_SLOT_TYPE); - /* - * For Dimm, don't need to add environmental info - * so return here - */ - *childp = childh; - return (err); - } else if (IS_SB_NODE(sgfrunode->nodename)) { - err = add_prop_charstring(childh, "system-board", - PICL_PROP_SLOT_TYPE); - } else if (IS_PSU_NODE(sgfrunode->nodename)) { - err = add_prop_charstring(childh, "power-supply", - PICL_PROP_SLOT_TYPE); - } else if (IS_FT_NODE(sgfrunode->nodename)) { - err = add_prop_charstring(childh, "fan-tray", - PICL_PROP_SLOT_TYPE); - } - if (err != PICL_SUCCESS) - return (err); - - /* - * add devices table to location node (may need - * references to led devices) - */ - err = create_table(childh, &tblhdl, PICL_PROP_DEVICES); - if (err != PICL_SUCCESS) - return (err); - - err = add_led_nodes(childh, labelp, LOM_LED_POSITION_LOCATION, tblhdl); - if (err != PICL_SUCCESS) - return (err); - *childp = childh; - return (PICL_SUCCESS); -} - -/* - * remove an individual picl node - called from remove_subtree() - * also removes any sensor nodes pointed at by Devices table - */ -static int -remove_picl_node(picl_nodehdl_t nodeh) -{ - int err; - picl_prophdl_t tblhdl; - picl_prophdl_t nextprop; - picl_prophdl_t refprop; - char class[PICL_CLASSNAMELEN_MAX]; - - /* - * first scan Devices table so we can find any sensor nodes - * we need to delete as well - */ - err = ptree_get_propval_by_name(nodeh, PICL_PROP_DEVICES, - &tblhdl, sizeof (tblhdl)); - - /* - * If Devices table present, then read first column. - * Devices table may be empty so don't treat this as an error - */ - if (err == PICL_SUCCESS && - ptree_get_next_by_row(tblhdl, &nextprop) == PICL_SUCCESS) { - /* find second column */ - err = ptree_get_next_by_row(nextprop, &nextprop); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, GET_NEXT_BY_ROW_FAIL, - PICL_PROP_DEVICES, err); - return (err); - } - - /* - * walk down second column (ref ptr) - * deleting the referenced nodes - */ - while (err == PICL_SUCCESS) { - err = ptree_get_propval(nextprop, &refprop, - sizeof (refprop)); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, GET_PROPVAL_FAIL, err); - return (err); - } - - /* - * don't delete memory-module nodes - * or cpu nodes (they weren't created - * by this plugin) - */ - err = ptree_get_propval_by_name(refprop, - PICL_PROP_CLASSNAME, class, sizeof (class)); - if (err == PICL_STALEHANDLE) { - /* - * if another plugin has already deleted the - * node for us then that is ok - */ - err = ptree_get_next_by_col(nextprop, - &nextprop); - continue; - } - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, PROP_LOOKUP_FAIL, - PICL_PROP_CLASSNAME, err); - return (err); - } - if (strcmp(class, PICL_CLASS_MEMORY_MODULE) == 0 || - strcmp(class, PICL_CLASS_CPU) == 0) { - /* - * but - do need to remove _fru_parent - * property and Environment table (for cpu) - */ - err = remove_references(refprop, class); - if (err != PICL_SUCCESS) - return (err); - } else { - /* - * sensor node - need to delete it - */ - err = ptree_delete_node(refprop); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, DELETE_PROP_FAIL, err); - return (err); - } - (void) ptree_destroy_node(refprop); - } - err = ptree_get_next_by_col(nextprop, &nextprop); - } - } - - /* - * now we can remove the frutree node - */ - err = ptree_delete_node(nodeh); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, DELETE_PROP_FAIL, err); - return (err); - } - (void) ptree_destroy_node(nodeh); - return (PICL_SUCCESS); -} - -static int -add_child_pci_references(picl_nodehdl_t nodeh, picl_prophdl_t tblhdl, - picl_nodehdl_t devnodeh) -{ - int err = PICL_SUCCESS; - picl_nodehdl_t childnodeh; - char class[PICL_CLASSNAMELEN_MAX]; - - if (ptree_get_propval_by_name(devnodeh, PICL_PROP_CHILD, &childnodeh, - sizeof (childnodeh)) != PICL_SUCCESS) { - return (PICL_SUCCESS); - } - for (;;) { - err = ptree_get_propval_by_name(childnodeh, - PICL_PROP_CLASSNAME, class, sizeof (class)); - if (err != PICL_SUCCESS) - break; - err = add_prop_ref(childnodeh, nodeh, PICL_REFPROP_FRU_PARENT); - if (err != PICL_SUCCESS) - break; - err = create_table_entry(tblhdl, childnodeh, class); - if (err != PICL_SUCCESS) - break; - err = add_child_pci_references(nodeh, tblhdl, childnodeh); - if (err != PICL_SUCCESS) - break; - err = ptree_get_propval_by_name(childnodeh, - PICL_PROP_PEER, &childnodeh, sizeof (picl_nodehdl_t)); - if (err != PICL_SUCCESS) { - err = PICL_SUCCESS; - break; - } - } - return (err); -} - -static int -add_pci_location(picl_nodehdl_t childh, char *parent_addr, char bus_addr, - char *slot_name) -{ - int err; - int got_one = 0; - picl_nodehdl_t nodeh; - picl_nodehdl_t devnodeh; - picl_nodehdl_t devhdl; - char addr[MAXPATHLEN]; - char parent_path[MAXPATHLEN]; - picl_prophdl_t tblhdl; - char class[PICL_CLASSNAMELEN_MAX]; - - /* - * search for any device nodes whose BUS_ADDR or UNIT_ADDRESS - * are appropriate for this pci slot - */ - sprintf_buf2(parent_path, IO_DEV, parent_addr); - if (ptree_get_node_by_path(parent_path, &devhdl) == PICL_SUCCESS && - ptree_get_propval_by_name(devhdl, PICL_PROP_CHILD, &devnodeh, - sizeof (devnodeh)) == PICL_SUCCESS) { - while (!got_one) { - err = ptree_get_propval_by_name(devnodeh, - PICL_PROP_BUS_ADDR, addr, sizeof (addr)); - if (err == PICL_SUCCESS && addr[0] == bus_addr && - (addr[1] == ',' || addr[1] == '\0')) { - got_one = 1; - break; - } - err = ptree_get_propval_by_name(devnodeh, - PICL_PROP_UNIT_ADDRESS, addr, sizeof (addr)); - if (err == PICL_SUCCESS && addr[0] == bus_addr && - (addr[1] == ',' || addr[1] == '\0')) { - got_one = 1; - break; - } - err = ptree_get_propval_by_name(devnodeh, - PICL_PROP_PEER, &devnodeh, sizeof (picl_nodehdl_t)); - if (err != PICL_SUCCESS) - break; - } - } - nodeh = childh; - if (got_one == 0) { - /* - * no devnodes for this slot. Create location node but - * no fru node (empty slot) - */ - return (add_intermediate_location(&nodeh, slot_name, "pci")); - } - - /* - * we've got the first devnode for this slot. Create the fru node - * then walk along other nodes looking for further devnodes - */ - err = add_intermediate_nodes(&nodeh, slot_name, &tblhdl, "pci", NULL); - if (err != PICL_SUCCESS) - return (err); - - for (;;) { - if (((err = ptree_get_propval_by_name(devnodeh, - PICL_PROP_BUS_ADDR, addr, sizeof (addr))) == - PICL_SUCCESS && addr[0] == bus_addr && - (addr[1] == ',' || addr[1] == '\0')) || - ((err = ptree_get_propval_by_name(devnodeh, - PICL_PROP_UNIT_ADDRESS, addr, sizeof (addr))) == - PICL_SUCCESS && addr[0] == bus_addr && - (addr[1] == ',' || addr[1] == '\0'))) { - err = ptree_get_propval_by_name(devnodeh, - PICL_PROP_CLASSNAME, class, sizeof (class)); - if (err != PICL_SUCCESS) - break; - err = add_prop_ref(devnodeh, nodeh, - PICL_REFPROP_FRU_PARENT); - if (err != PICL_SUCCESS) - break; - err = create_table_entry(tblhdl, devnodeh, class); - if (err != PICL_SUCCESS) - break; - err = add_child_pci_references(nodeh, tblhdl, devnodeh); - if (err != PICL_SUCCESS) - break; - } - err = ptree_get_propval_by_name(devnodeh, - PICL_PROP_PEER, &devnodeh, sizeof (picl_nodehdl_t)); - if (err != PICL_SUCCESS) { - err = PICL_SUCCESS; - break; - } - } - return (err); -} - -/* - * add intermediate location into frutree (ie a location that we know - * exists but sgfru doesn't) - */ -static int -add_intermediate_location(picl_nodehdl_t *nodep, char *labelp, char *slot_name) -{ - int err; - picl_nodehdl_t intermediate; - picl_prophdl_t tblhdl; - char parent_name[PICL_PROPNAMELEN_MAX]; - - err = ptree_create_and_add_node(*nodep, labelp, PICL_CLASS_LOCATION, - &intermediate); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, ADD_NODE_FAIL, labelp, err); - return (err); - } - - /* - * create label property for location class - */ - err = add_prop_charstring(intermediate, labelp, PICL_PROP_LABEL); - if (err != PICL_SUCCESS) - return (err); - - /* - * add devices table to location node (may need references to led - * devices) - */ - err = create_table(intermediate, &tblhdl, PICL_PROP_DEVICES); - if (err != PICL_SUCCESS) - return (err); - - /* - * scapp knows FANs 0 and 1 on IB as FAN8 and FAN9 - */ - err = ptree_get_propval_by_name(*nodep, PICL_PROP_NAME, parent_name, - sizeof (parent_name)); - if (err != PICL_SUCCESS) - return (err); - if (strcmp(labelp, "FAN0") == 0 && strcmp(parent_name, "IB6") == 0) - err = add_led_nodes(intermediate, "FAN8", - LOM_LED_POSITION_LOCATION, tblhdl); - else if (strcmp(labelp, "FAN1") == 0 && strcmp(parent_name, "IB6") == 0) - err = add_led_nodes(intermediate, "FAN9", - LOM_LED_POSITION_LOCATION, tblhdl); - else - err = add_led_nodes(intermediate, labelp, - LOM_LED_POSITION_LOCATION, tblhdl); - if (err != PICL_SUCCESS) - return (err); - - if (slot_name) { - err = add_prop_charstring(intermediate, slot_name, - PICL_PROP_SLOT_TYPE); - if (err != PICL_SUCCESS) - return (err); - } - *nodep = intermediate; - return (PICL_SUCCESS); -} - -/* - * adds an intermediate location/fru pair into frutree - */ -static int -add_intermediate_nodes(picl_nodehdl_t *nodep, char *labelp, - picl_prophdl_t *tblhdlp, char *slot_name, char *fru_name) -{ - int err; - picl_nodehdl_t intermediate; - picl_nodehdl_t intermediate2; - - /* - * create intermediate location node (unless it has already been - * created) - */ - intermediate = find_child_by_name(*nodep, labelp); - if (intermediate == NULL) { - intermediate = *nodep; - err = add_intermediate_location(&intermediate, labelp, - slot_name); - if (err != PICL_SUCCESS) { - return (err); - } - } - - /* - * create intermediate fru node (unless it has already been - * created) - */ - intermediate2 = find_child_by_name(intermediate, labelp); - if (intermediate2 == NULL) { - /* - * need to create intermediate fru node node - */ - err = ptree_create_and_add_node(intermediate, labelp, - PICL_CLASS_FRU, &intermediate2); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, ADD_NODE_FAIL, labelp, err); - return (err); - } - - /* - * Create empty Devices table - */ - err = create_table(intermediate2, tblhdlp, PICL_PROP_DEVICES); - if (err != PICL_SUCCESS) - return (err); - - if (fru_name) { - err = add_prop_charstring(intermediate2, fru_name, - PICL_PROP_FRU_TYPE); - if (err != PICL_SUCCESS) - return (err); - } - } else { - err = ptree_get_propval_by_name(intermediate2, - PICL_PROP_DEVICES, tblhdlp, sizeof (*tblhdlp)); - if (err != PICL_SUCCESS) - return (err); - } - *nodep = intermediate2; - return (PICL_SUCCESS); -} - -/* - * need to remove _fru_parent property and Environment table (for cpu) - */ -static int -remove_references(picl_prophdl_t refprop, char *class) -{ - picl_prophdl_t platprop; - int err; - - err = ptree_get_prop_by_name(refprop, PICL_REFPROP_FRU_PARENT, - &platprop); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, PROP_LOOKUP_FAIL, PICL_PROP_PARENT, err); - return (err); - } - err = ptree_delete_prop(platprop); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, DELETE_PROP_FAIL, err); - return (err); - } - (void) ptree_destroy_prop(platprop); - if (strcmp(class, PICL_CLASS_CPU) == 0) { - err = ptree_get_prop_by_name(refprop, PICL_PROP_ENV, &platprop); - if (err != PICL_SUCCESS) { - /* - * multi-core cpu is setup with only one cpu having - * env table so ignore PICL_PROPNOTFOUND error. - */ - if (err == PICL_PROPNOTFOUND) { - return (PICL_SUCCESS); - } - syslog(LOG_ERR, PROP_LOOKUP_FAIL, PICL_PROP_ENV, err); - return (err); - } - err = ptree_delete_prop(platprop); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, DELETE_PROP_FAIL, err); - return (err); - } - (void) ptree_destroy_prop(platprop); - } - return (PICL_SUCCESS); -} - -/* - * subroutine for various functions. Finds immediate child of parh with - * requested name if present. Otherwise returns NULL. - */ -static picl_nodehdl_t -find_child_by_name(picl_nodehdl_t parh, char *name) -{ - picl_nodehdl_t nodeh; - int err; - char nodename[PICL_PROPNAMELEN_MAX]; - - err = ptree_get_propval_by_name(parh, PICL_PROP_CHILD, - &nodeh, sizeof (picl_nodehdl_t)); - if (err != PICL_SUCCESS) - return (NULL); - for (;;) { - err = ptree_get_propval_by_name(nodeh, PICL_PROP_NAME, nodename, - sizeof (nodename)); - if (err != PICL_SUCCESS) - return (NULL); - if (strcmp(name, nodename) == 0) { - return (nodeh); - } - err = ptree_get_propval_by_name(nodeh, PICL_PROP_PEER, - &nodeh, sizeof (picl_nodehdl_t)); - if (err != PICL_SUCCESS) - return (NULL); - } -} - -static int -create_dimm_references(picl_nodehdl_t parh, int dimm_id, - picl_nodehdl_t nodeh, picl_prophdl_t tblhdl) -{ - int err; - picl_nodehdl_t memctlhdl = NULL; - picl_nodehdl_t memgrphdl; - picl_nodehdl_t memhdl; - char name[MAXPATHLEN]; - char sbname[PICL_PROPNAMELEN_MAX]; - char pname[PICL_PROPNAMELEN_MAX]; - char bname[PICL_PROPNAMELEN_MAX]; - picl_nodehdl_t parentfruh; - picl_nodehdl_t parentloch; - int id; - - /* - * create reference properties for memory nodes - * - first find names of ancestor frus - ie "SBx/Py/Bz" - */ - err = ptree_get_propval_by_name(parh, PICL_PROP_PARENT, &parentfruh, - sizeof (picl_nodehdl_t)); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, PROP_LOOKUP_FAIL, PICL_PROP_PARENT, err); - return (err); - } - err = ptree_get_propval_by_name(parentfruh, PICL_PROP_NAME, - bname, sizeof (bname)); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, PROP_LOOKUP_FAIL, PICL_PROP_NAME, err); - return (err); - } - err = ptree_get_propval_by_name(parentfruh, PICL_PROP_PARENT, - &parentloch, sizeof (picl_nodehdl_t)); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, PROP_LOOKUP_FAIL, PICL_PROP_PARENT, err); - return (err); - } - err = ptree_get_propval_by_name(parentloch, PICL_PROP_PARENT, - &parentfruh, sizeof (picl_nodehdl_t)); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, PROP_LOOKUP_FAIL, PICL_PROP_PARENT, err); - return (err); - } - err = ptree_get_propval_by_name(parentfruh, PICL_PROP_NAME, - pname, sizeof (pname)); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, PROP_LOOKUP_FAIL, PICL_PROP_NAME, err); - return (err); - } - - err = ptree_get_propval_by_name(parentfruh, PICL_PROP_PARENT, - &parentloch, sizeof (picl_nodehdl_t)); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, PROP_LOOKUP_FAIL, PICL_PROP_PARENT, err); - return (err); - } - err = ptree_get_propval_by_name(parentloch, PICL_PROP_PARENT, - &parentfruh, sizeof (picl_nodehdl_t)); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, PROP_LOOKUP_FAIL, PICL_PROP_PARENT, err); - return (err); - } - err = ptree_get_propval_by_name(parentfruh, PICL_PROP_NAME, sbname, - sizeof (sbname)); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, PROP_LOOKUP_FAIL, PICL_PROP_NAME, err); - return (err); - } - - /* - * ok - we've now got name of system board node in sbname and - * name of processor node in pname. - * Now find corresponding memory-controller node if present - */ - sprintf_buf2(name, MEMORY_DEV, SB_P_TO_SAFARI_ADDR(sbname, pname)); - err = ptree_get_node_by_path(name, &memctlhdl); - if (err != PICL_SUCCESS) - return (PICL_SUCCESS); - - /* - * now find corresponding memory-module-group node if present - */ - err = ptree_get_propval_by_name(memctlhdl, PICL_PROP_CHILD, &memgrphdl, - sizeof (picl_nodehdl_t)); - if (err != PICL_SUCCESS) - return (PICL_SUCCESS); - - /* - * check if this is the right bank - if not move on to sibling - */ - err = ptree_get_propval_by_name(memgrphdl, PICL_PROP_ID, - &id, sizeof (int)); - if (err != PICL_SUCCESS) - return (PICL_SUCCESS); - if (bname[1] != id + '0') { - err = ptree_get_propval_by_name(memgrphdl, PICL_PROP_PEER, - &memgrphdl, sizeof (picl_nodehdl_t)); - if (err != PICL_SUCCESS) - return (PICL_SUCCESS); - err = ptree_get_propval_by_name(memgrphdl, PICL_PROP_ID, - &id, sizeof (int)); - if (err != PICL_SUCCESS) - return (PICL_SUCCESS); - if (bname[1] != id + '0') - return (PICL_SUCCESS); - } - - /* - * now find corresponding memory-module node if present - */ - err = ptree_get_propval_by_name(memgrphdl, PICL_PROP_CHILD, &memhdl, - sizeof (picl_nodehdl_t)); - if (err != PICL_SUCCESS) - return (PICL_SUCCESS); - - /* - * for each DIMM set up links with matching memory-module node - */ - for (;;) { - err = ptree_get_propval_by_name(memhdl, PICL_PROP_ID, - &id, sizeof (int)); - if (err == PICL_SUCCESS && dimm_id == id) { - err = add_prop_ref(memhdl, nodeh, - PICL_REFPROP_FRU_PARENT); - if (err != PICL_SUCCESS) - return (err); - err = create_table_entry(tblhdl, memhdl, - PICL_CLASS_MEMORY_MODULE); - if (err != PICL_SUCCESS) - return (err); - } - err = ptree_get_propval_by_name(memhdl, PICL_PROP_PEER, - &memhdl, sizeof (picl_nodehdl_t)); - if (err != PICL_SUCCESS) - break; - } - return (PICL_SUCCESS); -} - -static int -create_cpu_references(char *pname, picl_nodehdl_t nodeh, picl_prophdl_t tblhdl) -{ - int err; - picl_nodehdl_t sensorhdl; - picl_nodehdl_t parentloch; - picl_nodehdl_t parentfruh; - picl_nodehdl_t cpuhdl; - picl_nodehdl_t cpuhdl1; - picl_prophdl_t envtblhdl; - picl_prophdl_t prophdl; - char name[MAXPATHLEN]; - char sbname[PICL_PROPNAMELEN_MAX]; - - err = ptree_get_propval_by_name(nodeh, PICL_PROP_PARENT, - &parentloch, sizeof (picl_nodehdl_t)); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, PROP_LOOKUP_FAIL, PICL_PROP_PARENT, err); - return (err); - } - err = ptree_get_propval_by_name(parentloch, PICL_PROP_PARENT, - &parentfruh, sizeof (picl_nodehdl_t)); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, PROP_LOOKUP_FAIL, PICL_PROP_PARENT, err); - return (err); - } - err = ptree_get_propval_by_name(parentfruh, PICL_PROP_NAME, sbname, - sizeof (sbname)); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, PROP_LOOKUP_FAIL, PICL_PROP_NAME, err); - return (err); - } - - /* - * Find corresponding cpu node if present. Note, this code will - * attempt to find a corresponding cpu node, by searching for devices - * of the types /platform/ssm@0,0/SUNW,UltraSPARC-III+@%x,0, - * /platform/ssm@0,0/SUNW,UltraSPARC-III@%x,0 or - * /platform/ssm@0,0/cmp@%x,0/cpu@0 or 1. If we can not find - * any such device, we return PICL_SUCCESS such that we - * continue the construction of the remaining part of the - * tree. We first check for UltraSPARC-III. If we do not - * find such a device we check for UltraSPARC-III+. If - * we are unsuccesful again we try one of the jaguar cores - * /platform/ssm@0,0/cmp@%x,0/cpu@. If we do not find the - * first one, there's no point in continuing and we just - * return PICL_SUCCESS. Similarly if we find one core - * but not the other, something must be wrong, so we - * again just return PICL_SUCCESS without creating any - * references. - */ - sprintf_buf2(name, CPU_DEV, SB_P_TO_SAFARI_ADDR(sbname, pname)); - - err = ptree_get_node_by_path(name, &cpuhdl); - - if (err != PICL_SUCCESS) { - sprintf_buf2(name, CPU_DEV2, - SB_P_TO_SAFARI_ADDR(sbname, pname)); - err = ptree_get_node_by_path(name, &cpuhdl); - if (err != PICL_SUCCESS) { - /* check for jaguar cores */ - sprintf_buf2(name, CPU_DEV3C1, - SB_P_TO_SAFARI_ADDR(sbname, pname)); - err = ptree_get_node_by_path(name, &cpuhdl1); - if (err != PICL_SUCCESS) - return (PICL_SUCCESS); - /* add fru parent reference for the second core */ - err = ptree_get_prop_by_name(cpuhdl1, - PICL_REFPROP_FRU_PARENT, &prophdl); - if (err != PICL_SUCCESS) { - err = add_prop_ref(cpuhdl1, nodeh, - PICL_REFPROP_FRU_PARENT); - if (err != PICL_SUCCESS) - return (err); - err = create_table_entry(tblhdl, cpuhdl1, - PICL_CLASS_CPU); - if (err != PICL_SUCCESS) - return (err); - } - sprintf_buf2(name, CPU_DEV3C0, - SB_P_TO_SAFARI_ADDR(sbname, pname)); - err = ptree_get_node_by_path(name, &cpuhdl); - if (err != PICL_SUCCESS) - return (PICL_SUCCESS); - - } - } - - /* - * now create reference properties - */ - err = ptree_get_prop_by_name(cpuhdl, PICL_REFPROP_FRU_PARENT, &prophdl); - if (err != PICL_SUCCESS) { - err = add_prop_ref(cpuhdl, nodeh, PICL_REFPROP_FRU_PARENT); - if (err != PICL_SUCCESS) - return (err); - err = create_table_entry(tblhdl, cpuhdl, PICL_CLASS_CPU); - if (err != PICL_SUCCESS) - return (err); - } - - /* - * create Environment table on cpu node - with Die and Ambient - * temperature sensors if present. If already there, delete and start - * again - */ - err = ptree_get_prop_by_name(cpuhdl, PICL_PROP_ENV, &prophdl); - if (err == PICL_SUCCESS) { - err = ptree_delete_prop(prophdl); - if (err != PICL_SUCCESS) - return (err); - (void) ptree_destroy_prop(prophdl); - } - err = create_table(cpuhdl, &envtblhdl, PICL_PROP_ENV); - if (err != PICL_SUCCESS) - return (err); - - if (pcix_io) - sprintf_buf4(name, "%s/%s_t_cheetah%d@0", SC_DEV_PCIX, sbname, - (pname[1] - '0')); - else - sprintf_buf4(name, "%s/%s_t_cheetah%d@0", SC_DEV, sbname, - (pname[1] - '0')); - - err = ptree_get_node_by_path(name, &sensorhdl); - if (err == PICL_SUCCESS) { - err = create_table_entry(envtblhdl, sensorhdl, - PICL_CLASS_TEMPERATURE_SENSOR); - if (err != PICL_SUCCESS) - return (err); - } - - if (pcix_io) - sprintf_buf4(name, "%s/%s_t_ambient%d@0", SC_DEV_PCIX, sbname, - (pname[1] - '0')); - else - sprintf_buf4(name, "%s/%s_t_ambient%d@0", SC_DEV, sbname, - (pname[1] - '0')); - - err = ptree_get_node_by_path(name, &sensorhdl); - if (err == PICL_SUCCESS) { - return (create_table_entry(envtblhdl, sensorhdl, - PICL_CLASS_TEMPERATURE_SENSOR)); - } - return (PICL_SUCCESS); -} - -/* - * subroutine of add_subtree - get a list of children of a parent node - */ -static sgfrunode_t * -get_node_children(fru_hdl_t fruparent, int *num_childrenp) -{ - int max_children, i; - sgfrunode_t *fruchildren = NULL; - child_info_t child_info; - int frufd; - - /* - * Open the sgfru pseudo dev - */ - if ((frufd = open(FRU_PSEUDO_DEV, O_RDWR, 0)) == -1) { - syslog(LOG_ERR, DEV_OPEN_FAIL, FRU_PSEUDO_DEV, strerror(errno)); - return (NULL); - } - for (i = 1; i <= MAX_TRIES; i++) { - max_children = i * MAX_NODE_CHILDREN; - if ((fruchildren = calloc(max_children, - sizeof (sgfrunode_t))) == NULL) { - (void) close(frufd); - syslog(LOG_ERR, MALLOC_FAIL); - return (NULL); - } - child_info.fru_hdl = fruparent; - child_info.fru_cnt = max_children; - child_info.frus = (void *)fruchildren; - if (ioctl(frufd, SGFRU_GETCHILDLIST, &child_info) == 0) { - /* - * got them - return success - */ - (void) close(frufd); - *num_childrenp = child_info.fru_cnt; - return (fruchildren); - } - free(fruchildren); - - /* - * if ENOMEM, need to calloc more space - so go round loop again - * otherwise fail - */ - if (errno != ENOMEM) { - (void) close(frufd); - syslog(LOG_ERR, SGFRU_IOCTL_FAIL, SGFRU_GETCHILDLIST, - fruparent, strerror(errno)); - return (NULL); - } - } - (void) close(frufd); - syslog(LOG_ERR, MALLOC_FAIL); - return (NULL); -} - -/* Creates an unsigned longlong property for a given PICL node */ -static int -add_prop_ull(picl_nodehdl_t nodeh, uint64_t handle, char *name) -{ - picl_prophdl_t proph; - ptree_propinfo_t propinfo; - int err; - - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_UNSIGNED_INT, PICL_READ, sizeof (unsigned long long), - PICL_PROP_SC_HANDLE, NULL, NULL); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, PROPINFO_FAIL, name, err); - return (err); - } - err = ptree_create_and_add_prop(nodeh, &propinfo, &handle, &proph); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, ADD_PROP_FAIL, name, err); - return (err); - } - return (PICL_SUCCESS); -} - -/* Creates a void property for a given PICL node */ -static int -add_prop_void(picl_nodehdl_t nodeh, char *name) -{ - picl_prophdl_t proph; - ptree_propinfo_t propinfo; - int err; - - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_VOID, PICL_READ, 0, PICL_PROP_FRUDATA_AVAIL, NULL, NULL); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, PROPINFO_FAIL, name, err); - return (err); - } - err = ptree_create_and_add_prop(nodeh, &propinfo, NULL, &proph); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, ADD_PROP_FAIL, name, err); - return (err); - } - return (PICL_SUCCESS); -} - -/* Creates a reference property for a given PICL node */ -static int -add_prop_ref(picl_nodehdl_t nodeh, picl_nodehdl_t value, char *name) -{ - picl_prophdl_t proph; - ptree_propinfo_t propinfo; - int err; - - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_REFERENCE, PICL_READ, sizeof (picl_nodehdl_t), name, - NULL, NULL); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, PROPINFO_FAIL, name, err); - return (err); - } - err = ptree_create_and_add_prop(nodeh, &propinfo, &value, &proph); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, ADD_PROP_FAIL, name, err); - return (err); - } - return (PICL_SUCCESS); -} - -/* Creates an integer property for a given PICL node */ -static int -add_prop_int(picl_nodehdl_t nodeh, int value, char *name) -{ - picl_prophdl_t proph; - ptree_propinfo_t propinfo; - int err; - - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_INT, PICL_READ, sizeof (int), name, NULL, NULL); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, PROPINFO_FAIL, name, err); - return (err); - } - err = ptree_create_and_add_prop(nodeh, &propinfo, &value, &proph); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, ADD_PROP_FAIL, name, err); - return (err); - } - return (PICL_SUCCESS); -} - -/* Creates an integer property for a given PICL node */ -static int -add_prop_float(picl_nodehdl_t nodeh, float value, char *name) -{ - picl_prophdl_t proph; - ptree_propinfo_t propinfo; - int err; - - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_FLOAT, PICL_READ, sizeof (float), name, NULL, NULL); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, PROPINFO_FAIL, name, err); - return (err); - } - err = ptree_create_and_add_prop(nodeh, &propinfo, &value, &proph); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, ADD_PROP_FAIL, name, err); - return (err); - } - return (PICL_SUCCESS); -} - -/* Creates a charstring property for a given PICL node */ -static int -add_prop_charstring(picl_nodehdl_t nodeh, char *value, char *name) -{ - picl_prophdl_t proph; - ptree_propinfo_t propinfo; - int err; - - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_CHARSTRING, PICL_READ, strlen(value) + 1, - name, NULL, NULL); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, PROPINFO_FAIL, name, err); - return (err); - } - err = ptree_create_and_add_prop(nodeh, &propinfo, value, &proph); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, ADD_PROP_FAIL, name, err); - return (err); - } - return (PICL_SUCCESS); -} - -/* create an entry in the specified table */ -static int -create_table_entry(picl_prophdl_t tblhdl, picl_nodehdl_t refhdl, char *class) -{ - int err; - ptree_propinfo_t prop; - picl_prophdl_t prophdl[2]; - - /* first column is class */ - prop.version = PTREE_PROPINFO_VERSION; - prop.piclinfo.type = PICL_PTYPE_CHARSTRING; - prop.piclinfo.accessmode = PICL_READ; - prop.piclinfo.size = PICL_CLASSNAMELEN_MAX; - prop.read = NULL; - prop.write = NULL; - (void) strlcpy(prop.piclinfo.name, PICL_PROP_CLASS, - sizeof (prop.piclinfo.name)); - err = ptree_create_prop(&prop, class, &prophdl[0]); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, ADD_TBL_ENTRY_FAIL, err); - return (err); - } - - /* second column is refernce property */ - prop.version = PTREE_PROPINFO_VERSION; - prop.piclinfo.type = PICL_PTYPE_REFERENCE; - prop.piclinfo.accessmode = PICL_READ; - prop.piclinfo.size = sizeof (picl_nodehdl_t); - prop.read = NULL; - prop.write = NULL; - sprintf_buf2(prop.piclinfo.name, "_%s_", class); - err = ptree_create_prop(&prop, &refhdl, &prophdl[1]); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, ADD_TBL_ENTRY_FAIL, err); - return (err); - } - - /* add row to table */ - err = ptree_add_row_to_table(tblhdl, 2, prophdl); - if (err != PICL_SUCCESS) - syslog(LOG_ERR, ADD_TBL_ENTRY_FAIL, err); - return (err); -} - -/* create an empty table property */ -static int -create_table(picl_nodehdl_t fruhdl, picl_prophdl_t *tblhdlp, char *tbl_name) -{ - int err; - ptree_propinfo_t prop; - picl_prophdl_t tblprophdl; - - err = ptree_create_table(tblhdlp); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, ADD_PROP_FAIL, tbl_name, err); - return (err); - } - prop.version = PTREE_PROPINFO_VERSION; - prop.piclinfo.type = PICL_PTYPE_TABLE; - prop.piclinfo.accessmode = PICL_READ; - prop.piclinfo.size = sizeof (picl_prophdl_t); - prop.read = NULL; - prop.write = NULL; - (void) strlcpy(prop.piclinfo.name, tbl_name, - sizeof (prop.piclinfo.name)); - err = ptree_create_and_add_prop(fruhdl, &prop, tblhdlp, &tblprophdl); - if (err != PICL_SUCCESS) - syslog(LOG_ERR, ADD_PROP_FAIL, tbl_name, err); - return (err); -} - -static void -frudr_add_subtree(picl_nodehdl_t parh) -{ - fru_hdl_t sgfruhdl; - if (ptree_get_propval_by_name(parh, PICL_PROP_SC_HANDLE, - &sgfruhdl, sizeof (sgfruhdl)) != PICL_SUCCESS) { - return; - } - (void) add_subtree(parh, sgfruhdl); -} - -/* event completion handler for PICL_FRU_ADDED/PICL_FRU_REMOVED events */ -/*ARGSUSED*/ -static void -frudr_completion_handler(char *ename, void *earg, size_t size) -{ - picl_nodehdl_t fruh; - picl_nodehdl_t parh; - - if (strcmp(ename, PICL_FRU_REMOVED) == 0) { - /* - * now frudata has been notified that the node is to be - * removed, we can actually remove it - */ - fruh = NULL; - (void) nvlist_lookup_uint64(earg, - PICLEVENTARG_FRUHANDLE, &fruh); - if (fruh != NULL) { - (void) remove_subtree(fruh); - - /* - * Now repopulate the frutree with current data. - */ - parh = NULL; - (void) nvlist_lookup_uint64(earg, - PICLEVENTARG_PARENTHANDLE, &parh); - if (parh != NULL) { - frudr_add_subtree(parh); - } - } - } - nvlist_free(earg); - free(earg); - free(ename); -} - -/* - * Post the PICL_FRU_ADDED/PICL_FRU_REMOVED event - */ -static void -post_frudr_event(char *ename, picl_nodehdl_t parenth, picl_nodehdl_t fruh) -{ - nvlist_t *nvl; - char *ev_name; - - ev_name = strdup(ename); - if (ev_name == NULL) - return; - if (nvlist_alloc(&nvl, NV_UNIQUE_NAME_TYPE, NULL)) { - free(ev_name); - return; - } - if (parenth != 0L && - nvlist_add_uint64(nvl, PICLEVENTARG_PARENTHANDLE, parenth)) { - free(ev_name); - nvlist_free(nvl); - return; - } - if (fruh != 0L && - nvlist_add_uint64(nvl, PICLEVENTARG_FRUHANDLE, fruh)) { - free(ev_name); - nvlist_free(nvl); - return; - } - if (ptree_post_event(ev_name, nvl, sizeof (nvl), - frudr_completion_handler) != 0) { - free(ev_name); - nvlist_free(nvl); - } -} - -/* - * updates the picl node 'loc' with the new fru handle (PICL_PROP_SC_HANDLE) - * (helper function for frudr_evhandler, when a stale fru handle is - * detected) - */ -static void -update_fru_hdl(picl_nodehdl_t loc, fru_hdl_t newsgfruhdl) -{ - picl_prophdl_t schproph; - int err; - - err = ptree_get_prop_by_name(loc, PICL_PROP_SC_HANDLE, &schproph); - if (err == PICL_SUCCESS) { - if (ptree_delete_prop(schproph) == PICL_SUCCESS) { - (void) ptree_destroy_prop(schproph); - } - } - (void) add_prop_ull(loc, (uint64_t)newsgfruhdl, PICL_PROP_SC_HANDLE); -} - -/* - * Get the fru handle of loc by iterating through the parent's children. - * Sets fruhdl and returns PICL_SUCCESS unless an error is encountered. - */ -static int -get_fruhdl_from_parent(picl_nodehdl_t loc, fru_hdl_t *fruhdl) -{ - picl_nodehdl_t parlocnodeh; - fru_hdl_t parsgfruhdl; - sgfrunode_t *cp; - sgfrunode_t *fruchildren; - char nodename[PICL_PROPNAMELEN_MAX]; - int err; - int num_children; - int i; - - err = ptree_get_propval_by_name(loc, PICL_PROP_NAME, (void *)nodename, - PICL_PROPNAMELEN_MAX); - if (err != PICL_SUCCESS) - return (err); - err = ptree_get_propval_by_name(loc, PICL_PROP_PARENT, &parlocnodeh, - sizeof (picl_nodehdl_t)); - if (err != PICL_SUCCESS) - return (err); - if ((err = ptree_get_propval_by_name(parlocnodeh, PICL_PROP_SC_HANDLE, - &parsgfruhdl, sizeof (parsgfruhdl))) != PICL_SUCCESS) - return (err); - /* find children of the parent node */ - fruchildren = get_node_children(parsgfruhdl, &num_children); - if (fruchildren == NULL) - return (PICL_FAILURE); - for (i = 0, cp = fruchildren; i < num_children; i++, cp++) { - /* find the child we're interested in */ - if (strcmp(cp->nodename, nodename) == 0) { - *fruhdl = cp->handle; - free(fruchildren); - return (PICL_SUCCESS); - } - } - free(fruchildren); - return (PICL_FAILURE); -} - -/* - * handle EC_DR picl events - */ -/*ARGSUSED*/ -static void -frudr_evhandler(const char *ename, const void *earg, size_t size, void *cookie) -{ - nvlist_t *nvlp; - char *dtype; - char *ap_id; - char *hint; - char path[MAXPATHLEN]; - picl_nodehdl_t fruh; - picl_nodehdl_t locnodeh; - fru_hdl_t sgfruhdl; - fru_hdl_t sgfruhdl_from_parent; - - if (strcmp(ename, PICLEVENT_DR_AP_STATE_CHANGE) != 0) - return; - - if (nvlist_unpack((char *)earg, size, &nvlp, NULL)) - return; - - if (nvlist_lookup_string(nvlp, PICLEVENTARG_DATA_TYPE, &dtype)) { - nvlist_free(nvlp); - return; - } - - if (strcmp(dtype, PICLEVENTARG_PICLEVENT_DATA) != 0) { - nvlist_free(nvlp); - return; - } - - if (nvlist_lookup_string(nvlp, PICLEVENTARG_AP_ID, &ap_id)) { - nvlist_free(nvlp); - return; - } - - if (nvlist_lookup_string(nvlp, PICLEVENTARG_HINT, &hint)) { - nvlist_free(nvlp); - return; - } - - if (strncmp(ap_id, AP_ID_PREAMBLE, AP_ID_PREAMBLE_LEN) != 0) { - nvlist_free(nvlp); - return; - } - - /* - * OK - so this is an EC_DR event - let's handle it. - */ - sprintf_buf2(path, CHASSIS_LOC_PATH, &ap_id[AP_ID_PREAMBLE_LEN]); - - /* - * special case - SSC arrival means that SSC has been reset - we - * need to flush the cached sgfru handles - */ - if (strcmp(&ap_id[AP_ID_PREAMBLE_LEN], "SSC1") == 0) { - picl_nodehdl_t chdh; - picl_nodehdl_t peerh; - picl_nodehdl_t parh; - int got_peer; - char label[MAX_LABEL_LEN]; - int err; - sgfrunode_t *sgfruchassisp = NULL; - int num_children; - picl_prophdl_t schproph; - - /* find existing chassis node */ - if (ptree_get_node_by_path(CHASSIS_PATH, &parh) != - PICL_SUCCESS) { - nvlist_free(nvlp); - return; - } - - /* find new chassis sgfru node */ - sgfruchassisp = get_node_children(ROOTPARENT, &num_children); - if (sgfruchassisp == NULL || num_children != 1) { - nvlist_free(nvlp); - return; - } - - /* update chassis SC_HANDLE property */ - err = ptree_get_prop_by_name(parh, PICL_PROP_SC_HANDLE, - &schproph); - if (err != PICL_SUCCESS) { - nvlist_free(nvlp); - return; - } - err = ptree_delete_prop(schproph); - if (err != PICL_SUCCESS) { - nvlist_free(nvlp); - return; - } - (void) ptree_destroy_prop(schproph); - err = add_prop_ull(parh, sgfruchassisp->handle, - PICL_PROP_SC_HANDLE); - if (err != PICL_SUCCESS) { - nvlist_free(nvlp); - return; - } - - /* - * remove all subtrees except DISK, TAPE, DVD and PCI subtrees - */ - if (ptree_get_propval_by_name(parh, PICL_PROP_CHILD, &chdh, - sizeof (picl_nodehdl_t)) == PICL_SUCCESS) { - for (;;) { - if (ptree_get_propval_by_name(chdh, - PICL_PROP_PEER, &peerh, - sizeof (picl_nodehdl_t)) != PICL_SUCCESS) - got_peer = 0; - else - got_peer = 1; - err = ptree_get_propval_by_name(chdh, - PICL_PROP_LABEL, label, sizeof (label)); - if (err == PICL_SUCCESS) { - if (strncmp(label, "DISK", - strlen("DISK")) != 0 && - strncmp(label, "TAPE", - strlen("TAPE")) != 0 && - strncmp(label, "PCI", - strlen("PCI")) != 0 && - strncmp(label, "DVD", - strlen("DVD")) != 0) { - (void) remove_subtree(chdh); - } - } - if (got_peer == 0) - break; - chdh = peerh; - } - } - - /* add new subtrees */ - (void) add_subtree(parh, sgfruchassisp->handle); - free(sgfruchassisp); - - nvlist_free(nvlp); - return; - } - - if (ptree_get_node_by_path(path, &locnodeh) != PICL_SUCCESS) { - nvlist_free(nvlp); - return; - } - if (ptree_get_propval_by_name(locnodeh, PICL_PROP_SC_HANDLE, - &sgfruhdl, sizeof (sgfruhdl)) != PICL_SUCCESS) { - nvlist_free(nvlp); - return; - } - - /* - * now either add or delete the fru node as appropriate. If no - * hint, treat as insert - add_subtree will update the tree if - * necessary. - */ - if (strcmp(hint, DR_HINT_REMOVE) == 0) { - if (ptree_get_propval_by_name(locnodeh, PICL_PROP_CHILD, - &fruh, sizeof (picl_nodehdl_t)) != PICL_PROPNOTFOUND) { - /* - * fru was there - but has gone away - */ - post_frudr_event(PICL_FRU_REMOVED, locnodeh, fruh); - } - } else { - /* - * fru has been inserted (or may need to update) - * - * sgfruhdl may be stale due to hotplugging. We check this - * by getting the fru_hdl_t from the parent's children - * and compare it to the cached value in sgfruhdl. If we - * have a stale handle, we update the cached value and - * use it in the call to add_subtree. - */ - if (get_fruhdl_from_parent(locnodeh, &sgfruhdl_from_parent) == - PICL_SUCCESS) { - if (sgfruhdl != sgfruhdl_from_parent) { - update_fru_hdl(locnodeh, sgfruhdl_from_parent); - sgfruhdl = sgfruhdl_from_parent; - } - } - - (void) add_subtree(locnodeh, sgfruhdl); - } - nvlist_free(nvlp); -} - -/* - * handle memcfg picl events - need to update reference properties - */ -/*ARGSUSED*/ -static void -frumemcfg_evhandler(const char *ename, const void *earg, size_t size, - void *cookie) -{ - picl_nodehdl_t nodeh; - picl_nodehdl_t lochdl; - picl_nodehdl_t fruhdl; - picl_nodehdl_t memgrphdl; - picl_nodehdl_t memhdl; - picl_prophdl_t tblhdl; - picl_prophdl_t tblproph; - nvlist_t *nvlp; - char addr[MAXPATHLEN]; - char bname[PICL_PROPNAMELEN_MAX]; - picl_nodehdl_t banklochdl; - picl_nodehdl_t bankfruhdl; - char label[MAX_LABEL_LEN]; - int err; - int id; - char *ptr; - int value; - char buf[MAX_LINE_SIZE]; - - if (strcmp(ename, PICLEVENT_MC_ADDED) != 0 && - strcmp(ename, PICLEVENT_MC_REMOVED) != 0) - return; - - /* - * find corresponding frutree dimm nodes - */ - if (nvlist_unpack((char *)earg, size, &nvlp, NULL)) - return; - if (nvlist_lookup_uint64(nvlp, PICLEVENTARG_NODEHANDLE, &nodeh)) { - nvlist_free(nvlp); - return; - } - nvlist_free(nvlp); - err = ptree_get_propval_by_name(nodeh, PICL_PROP_UNIT_ADDRESS, addr, - sizeof (addr)); - if (err != PICL_SUCCESS) - return; - ptr = strchr(addr, ','); - if (ptr == NULL) - return; - *ptr = '\0'; - value = strtol(addr, NULL, 16); - sprintf_buf5(buf, PROC_FRU_PATH, SAFARI_ADDR_TO_SB(value), - SAFARI_ADDR_TO_SB(value), SAFARI_ADDR_TO_P(value), - SAFARI_ADDR_TO_P(value)); - err = ptree_get_node_by_path(buf, &fruhdl); - if (err != PICL_SUCCESS) - return; - err = ptree_get_propval_by_name(fruhdl, PICL_PROP_CHILD, - &banklochdl, sizeof (banklochdl)); - if (err != PICL_SUCCESS) - return; - - /* - * walk through the DIMM locations - */ - for (;;) { - err = ptree_get_propval_by_name(banklochdl, PICL_PROP_CHILD, - &bankfruhdl, sizeof (bankfruhdl)); - if (err != PICL_SUCCESS) - goto next_bank; - err = ptree_get_propval_by_name(bankfruhdl, PICL_PROP_CHILD, - &lochdl, sizeof (lochdl)); - if (err != PICL_SUCCESS) - goto next_bank; - for (;;) { - err = ptree_get_propval_by_name(lochdl, PICL_PROP_CHILD, - &fruhdl, sizeof (fruhdl)); - if (err != PICL_SUCCESS) - goto next_dimm; - - /* - * this is a frutree dimm node corresponding to the - * memory controller that has been added/deleted - * - so create/delete reference properties - */ - if (strcmp(ename, PICLEVENT_MC_ADDED) == 0) { - /* - * find bank name - */ - err = ptree_get_propval_by_name(fruhdl, - PICL_PROP_DEVICES, &tblhdl, - sizeof (tblhdl)); - if (err != PICL_SUCCESS) - goto next_dimm; - err = ptree_get_propval_by_name(lochdl, - PICL_PROP_LABEL, label, sizeof (label)); - if (err != PICL_SUCCESS) - goto next_dimm; - - err = ptree_get_propval_by_name(bankfruhdl, - PICL_PROP_NAME, bname, sizeof (bname)); - if (err != PICL_SUCCESS) - goto next_dimm; - - /* - * find memory group node - */ - err = ptree_get_propval_by_name(nodeh, - PICL_PROP_CHILD, &memgrphdl, - sizeof (memgrphdl)); - if (err != PICL_SUCCESS) - goto next_dimm; - - /* - * check if this is the right bank - if not - * move on to sibling - */ - err = ptree_get_propval_by_name(memgrphdl, - PICL_PROP_ID, &id, sizeof (id)); - if (err != PICL_SUCCESS) - goto next_dimm; - if (bname[1] != id + '0') { - err = - ptree_get_propval_by_name(memgrphdl, - PICL_PROP_PEER, &memgrphdl, - sizeof (memgrphdl)); - if (err != PICL_SUCCESS) - goto next_dimm; - err = - ptree_get_propval_by_name(memgrphdl, - PICL_PROP_ID, &id, sizeof (id)); - if (err != PICL_SUCCESS) - goto next_dimm; - if (bname[1] != id + '0') - goto next_dimm; - } - - /* - * got the right bank - now create appropriate - * link - */ - err = ptree_get_propval_by_name(memgrphdl, - PICL_PROP_CHILD, &memhdl, - sizeof (memhdl)); - if (err != PICL_SUCCESS) - goto next_dimm; - for (;;) { - err = ptree_get_propval_by_name(memhdl, - PICL_PROP_ID, &id, sizeof (id)); - if (err != PICL_SUCCESS) - goto next_dimm; - if (label[1] == ('0' + id)) { - err = add_prop_ref(memhdl, - fruhdl, - PICL_REFPROP_FRU_PARENT); - if (err != PICL_SUCCESS) - return; - err = create_table_entry(tblhdl, - memhdl, - PICL_CLASS_MEMORY_MODULE); - if (err != PICL_SUCCESS) - return; - } - err = ptree_get_propval_by_name(memhdl, - PICL_PROP_PEER, - &memhdl, sizeof (memhdl)); - if (err == PICL_PROPNOTFOUND) - break; - if (err != PICL_SUCCESS) - return; - } - } else if (strcmp(ename, PICLEVENT_MC_REMOVED) == 0) { - /* - * XXX - no mechanism for deleting row - so - * delete whole tabel and start again - */ - err = ptree_get_prop_by_name(fruhdl, - PICL_PROP_DEVICES, &tblproph); - if (err == PICL_SUCCESS) { - err = ptree_delete_prop(tblproph); - if (err != PICL_SUCCESS) - return; - (void) ptree_destroy_prop(tblproph); - } - err = create_table(fruhdl, &tblhdl, - PICL_PROP_DEVICES); - if (err != PICL_SUCCESS) - return; - } -next_dimm: - err = ptree_get_propval_by_name(lochdl, - PICL_PROP_PEER, &lochdl, sizeof (lochdl)); - if (err == PICL_PROPNOTFOUND) - break; - if (err != PICL_SUCCESS) - return; - } -next_bank: - err = ptree_get_propval_by_name(banklochdl, - PICL_PROP_PEER, &banklochdl, sizeof (banklochdl)); - if (err == PICL_PROPNOTFOUND) - break; - if (err != PICL_SUCCESS) - return; - } - /* - * We don't get an event to say that cpu nodes have been added/ - * deleted (in fact as things stand they are never deleted). However - * we know that all cpus must be configured before the MC_ADDED event - * we are handling here. So if the cpu links haven't been set up yet - * then we do it now. - */ - if (strcmp(ename, PICLEVENT_MC_ADDED) == 0) { - sprintf_buf4(buf, PROC_LOC_PATH, SAFARI_ADDR_TO_SB(value), - SAFARI_ADDR_TO_SB(value), SAFARI_ADDR_TO_P(value)); - err = ptree_get_node_by_path(buf, &lochdl); - if (err != PICL_SUCCESS) - return; - sprintf_buf5(buf, PROC_FRU_PATH, SAFARI_ADDR_TO_SB(value), - SAFARI_ADDR_TO_SB(value), SAFARI_ADDR_TO_P(value), - SAFARI_ADDR_TO_P(value)); - err = ptree_get_node_by_path(buf, &fruhdl); - if (err != PICL_SUCCESS) - return; - sprintf_buf2(buf, "P%d", SAFARI_ADDR_TO_P(value)); - err = ptree_get_propval_by_name(fruhdl, - PICL_PROP_DEVICES, &tblhdl, sizeof (tblhdl)); - if (err != PICL_SUCCESS) - return; - (void) create_cpu_references(buf, fruhdl, tblhdl); - } -} - -/* - * subroutine for add_env_nodes(), and add_led_node(). Adds a sensor - * node under the sc node in the platform tree, of name "nodename" and - * class "class". Also add UnitAddress property (always 0 as the nodenames - * are unique anyway). Add reference property back to parent fru/location node - * in frutree and a Devices table entry pointing to this node from the - * parent fru/location node in frutree. - */ -static int -add_sensor_node(picl_nodehdl_t fruhdl, picl_nodehdl_t lochdl, char *nodename, - char *class, char *prop_class, picl_prophdl_t tblhdl, - picl_nodehdl_t *sensorhdlp) -{ - int err; - - err = ptree_create_and_add_node(sch, nodename, class, sensorhdlp); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, ADD_NODE_FAIL, nodename, err); - return (err); - } - - err = create_table_entry(tblhdl, *sensorhdlp, class); - if (err != PICL_SUCCESS) - return (err); - - err = add_sensor_prop(*sensorhdlp, prop_class); - if (err != PICL_SUCCESS) - return (err); - - err = add_prop_charstring(*sensorhdlp, "0", PICL_PROP_UNIT_ADDRESS); - if (err != PICL_SUCCESS) - return (err); - - if (fruhdl != NULL) { - err = add_prop_ref(*sensorhdlp, fruhdl, - PICL_REFPROP_FRU_PARENT); - } else { - err = add_prop_ref(*sensorhdlp, lochdl, - PICL_REFPROP_LOC_PARENT); - } - return (err); -} - -/* - * subroutine for add_sensor_node()/add_env_nodes(). Used for adding dynamic - * properties - */ -static int -add_sensor_prop(picl_nodehdl_t nodeh, char *class) -{ - ptree_propinfo_t propinfo; - int err; - - if (strcmp(class, PICL_PROP_TEMPERATURE) == 0) { - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_INT, PICL_READ + PICL_VOLATILE, - sizeof (int), class, get_sensor_data, NULL); - } else if (strcmp(class, PICL_PROP_FAN_SPEED) == 0) { - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_INT, PICL_READ + PICL_VOLATILE, - sizeof (int), class, get_sensor_data, NULL); - } else if (strcmp(class, PICL_PROP_FAN_SPEED_UNIT) == 0) { - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_CHARSTRING, PICL_READ + PICL_VOLATILE, - MAX_SPEED_UNIT_LEN, class, get_sensor_data, NULL); - } else if (strcmp(class, PICL_PROP_CONDITION) == 0) { - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_CHARSTRING, PICL_READ + PICL_VOLATILE, - MAX_CONDITION_LEN, class, get_sensor_data, NULL); - } else if (strcmp(class, PICL_PROP_STATE) == 0) { - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_CHARSTRING, PICL_READ + PICL_WRITE + - PICL_VOLATILE, MAX_STATE_LEN, class, get_led_data, - set_led_data); - } else { - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_FLOAT, PICL_READ + PICL_VOLATILE, - sizeof (float), class, get_sensor_data, NULL); - } - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, PROPINFO_FAIL, class, err); - return (err); - } - - err = ptree_create_and_add_prop(nodeh, &propinfo, NULL, NULL); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, ADD_PROP_FAIL, class, err); - return (err); - } - return (PICL_SUCCESS); -} - -/* - * Get requested kstat - */ -static int -open_kstat(char *name, void **ptr, kstat_ctl_t **kcp) -{ - kstat_t *info_ksp; - - *kcp = kstat_open(); - if (*kcp == NULL) { - syslog(LOG_ERR, KSTAT_FAIL); - return (PICL_FAILURE); - } - info_ksp = kstat_lookup(*kcp, NULL, -1, name); - if (info_ksp == NULL) { - kstat_close(*kcp); - syslog(LOG_ERR, KSTAT_FAIL); - return (PICL_FAILURE); - } - if (kstat_read(*kcp, info_ksp, NULL) == -1) { - kstat_close(*kcp); - syslog(LOG_ERR, KSTAT_FAIL); - return (PICL_FAILURE); - } - *ptr = info_ksp; - return (PICL_SUCCESS); -} - -/* - * dimm status - uses bank-status property on memory-controller node - */ - -static int -get_dimm_status(ptree_rarg_t *arg, void *result) -{ - int err; - int i; - picl_prophdl_t tblhdl; - picl_prophdl_t nextprop; - picl_prophdl_t refprop; - picl_prophdl_t mmgprop; - picl_prophdl_t mcprop; - picl_prophdl_t bankprop; - char nodename[PICL_PROPNAMELEN_MAX]; - char class[PICL_CLASSNAMELEN_MAX]; - char bankname[PICL_PROPNAMELEN_MAX]; - char state[MAX_STATE_SIZE]; - - /* - * find the name of this node - */ - err = ptree_get_propval_by_name(arg->nodeh, PICL_PROP_NAME, nodename, - sizeof (nodename)); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, PROP_LOOKUP_FAIL, PICL_PROP_NAME, err); - return (err); - } - - /* - * find the name of grandparent (dimm bank) node - */ - err = ptree_get_propval_by_name(arg->nodeh, PICL_PROP_PARENT, &bankprop, - sizeof (picl_nodehdl_t)); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, PROP_LOOKUP_FAIL, PICL_PROP_PARENT, err); - return (err); - } - err = ptree_get_propval_by_name(bankprop, PICL_PROP_PARENT, &bankprop, - sizeof (picl_nodehdl_t)); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, PROP_LOOKUP_FAIL, PICL_PROP_PARENT, err); - return (err); - } - err = ptree_get_propval_by_name(bankprop, PICL_PROP_NAME, bankname, - sizeof (bankname)); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, PROP_LOOKUP_FAIL, PICL_PROP_NAME, err); - return (err); - } - - /* - * lookup memory-module node in Devices table - */ - err = ptree_get_propval_by_name(arg->nodeh, PICL_PROP_DEVICES, &tblhdl, - sizeof (tblhdl)); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, PROP_LOOKUP_FAIL, PICL_PROP_DEVICES, err); - return (err); - } - err = ptree_get_next_by_row(tblhdl, &nextprop); - if (err != PICL_SUCCESS) { - /* - * if Devices table empty then dimm is unconfigured - */ - (void) strlcpy(result, PICL_PROPVAL_DISABLED, - MAX_OPERATIONAL_STATUS_LEN); - return (PICL_SUCCESS); - } - err = ptree_get_next_by_row(nextprop, &nextprop); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, GET_NEXT_BY_ROW_FAIL, PICL_PROP_DEVICES, err); - return (err); - } - - /* - * walk down second column (ref ptr) - */ - while (err == PICL_SUCCESS) { - err = ptree_get_propval(nextprop, &refprop, sizeof (refprop)); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, GET_PROPVAL_FAIL, err); - return (PICL_PROPVALUNAVAILABLE); - } - err = ptree_get_propval_by_name(refprop, PICL_PROP_CLASSNAME, - class, sizeof (class)); - if (err == PICL_SUCCESS && strcmp(class, - PICL_CLASS_MEMORY_MODULE) == 0) - break; - if (err != PICL_SUCCESS && err != PICL_STALEHANDLE) { - syslog(LOG_ERR, PROP_LOOKUP_FAIL, PICL_PROP_CLASSNAME, - err); - return (err); - } - err = ptree_get_next_by_col(nextprop, &nextprop); - if (err != PICL_SUCCESS) { - /* - * if no memory-module in Devices table - * then dimm is unconfigured - */ - (void) strlcpy(result, PICL_PROPVAL_DISABLED, - MAX_OPERATIONAL_STATUS_LEN); - return (PICL_SUCCESS); - } - } - - /* - * we've finally found the associated memory-module - * node. Now need to find the bank-status property on - * its parent memory-controller. - */ - err = ptree_get_propval_by_name(refprop, PICL_PROP_PARENT, - &mmgprop, sizeof (picl_nodehdl_t)); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, PROP_LOOKUP_FAIL, PICL_PROP_PARENT, err); - return (err); - } - err = ptree_get_propval_by_name(mmgprop, PICL_PROP_PARENT, &mcprop, - sizeof (picl_nodehdl_t)); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, PROP_LOOKUP_FAIL, PICL_PROP_PARENT, err); - return (err); - } - err = ptree_get_propval_by_name(mcprop, PICL_PROP_BANK_STATUS, &tblhdl, - sizeof (tblhdl)); - if (err != PICL_SUCCESS) { - (void) strlcpy(result, PICL_PROPVAL_UNKNOWN, - MAX_OPERATIONAL_STATUS_LEN); - return (PICL_SUCCESS); - } - - /* - * bank-status is a table. Need to find the entry corresponding - * to this node - */ - err = ptree_get_next_by_row(tblhdl, &nextprop); - if (err != PICL_SUCCESS) { - (void) strlcpy(result, PICL_PROPVAL_UNKNOWN, - MAX_OPERATIONAL_STATUS_LEN); - return (PICL_SUCCESS); - } - for (i = 0; i < 4; i++) { - err = ptree_get_propval(nextprop, &state, sizeof (state)); - if (err != PICL_SUCCESS) { - (void) strlcpy(result, PICL_PROPVAL_UNKNOWN, - MAX_OPERATIONAL_STATUS_LEN); - return (err); - } - if ((i & 1) == (bankname[1] - '0')) { - if (strcmp(state, "pass") == 0) { - (void) strlcpy(result, PICL_PROPVAL_OKAY, - MAX_OPERATIONAL_STATUS_LEN); - } else if (strcmp(state, "fail") == 0) { - (void) strlcpy(result, PICL_PROPVAL_FAILED, - MAX_OPERATIONAL_STATUS_LEN); - } else { - (void) strlcpy(result, state, - MAX_OPERATIONAL_STATUS_LEN); - } - break; - } - err = ptree_get_next_by_col(nextprop, &nextprop); - if (err != PICL_SUCCESS) { - (void) strlcpy(result, PICL_PROPVAL_OKAY, - MAX_OPERATIONAL_STATUS_LEN); - break; - } - } - return (PICL_SUCCESS); -} - -/* - * cpu status - uses State property on cpu node - */ - -static int -get_cpu_status(ptree_rarg_t *arg, void *result) -{ - int err; - picl_prophdl_t tblhdl; - picl_prophdl_t nextprop; - picl_prophdl_t refprop; - char class[PICL_CLASSNAMELEN_MAX]; - char state[MAX_STATE_SIZE]; - - /* - * lookup cpu node in Devices table - */ - err = ptree_get_propval_by_name(arg->nodeh, PICL_PROP_DEVICES, &tblhdl, - sizeof (tblhdl)); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, PROP_LOOKUP_FAIL, PICL_PROP_DEVICES, err); - return (err); - } - err = ptree_get_next_by_row(tblhdl, &nextprop); - if (err != PICL_SUCCESS) { - /* - * if Devices table empty then cpu is unconfigured - */ - (void) strlcpy(result, PICL_PROPVAL_DISABLED, - MAX_OPERATIONAL_STATUS_LEN); - return (PICL_SUCCESS); - } - err = ptree_get_next_by_row(nextprop, &nextprop); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, GET_NEXT_BY_ROW_FAIL, PICL_PROP_DEVICES, err); - return (err); - } - - /* - * walk down second column (ref ptr) - */ - while (err == PICL_SUCCESS) { - err = ptree_get_propval(nextprop, &refprop, sizeof (refprop)); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, GET_PROPVAL_FAIL, err); - return (err); - } - err = ptree_get_propval_by_name(refprop, PICL_PROP_CLASSNAME, - class, sizeof (class)); - if (err == PICL_SUCCESS && strcmp(class, PICL_CLASS_CPU) == 0) - break; - if (err != PICL_SUCCESS && err != PICL_STALEHANDLE) { - syslog(LOG_ERR, PROP_LOOKUP_FAIL, PICL_PROP_CLASSNAME, - err); - return (err); - } - err = ptree_get_next_by_col(nextprop, &nextprop); - if (err != PICL_SUCCESS) { - /* - * if no cpu in Devices table - * then cpu is unconfigured - */ - (void) strlcpy(result, PICL_PROPVAL_DISABLED, - MAX_OPERATIONAL_STATUS_LEN); - return (PICL_SUCCESS); - } - } - - /* - * we've finally found the associated cpu node. Now need to find its - * status property if present (if not assume OK) - */ - err = ptree_get_propval_by_name(refprop, OBP_STATUS, - state, sizeof (state)); - if (err == PICL_SUCCESS) { - if (strcmp(state, "fail") == 0) - (void) strlcpy(result, PICL_PROPVAL_FAILED, - MAX_OPERATIONAL_STATUS_LEN); - else - (void) strlcpy(result, state, - MAX_OPERATIONAL_STATUS_LEN); - return (PICL_SUCCESS); - } - - (void) strlcpy(result, PICL_PROPVAL_OKAY, MAX_OPERATIONAL_STATUS_LEN); - return (PICL_SUCCESS); -} - -/* - * system/io board condition - uses sgenv driver kstats - */ - -static int -get_board_status(ptree_rarg_t *arg, void *result) -{ - int err = PICL_SUCCESS; - int i; - sg_board_info_t *brd; - char name[PICL_PROPNAMELEN_MAX]; - char buf[PICL_PROPNAMELEN_MAX]; - kstat_ctl_t *kc; - kstat_t *board_info_ksp; - - err = ptree_get_propval_by_name(arg->nodeh, PICL_PROP_NAME, name, - sizeof (name)); - if (err != PICL_SUCCESS) { - return (err); - } - - err = open_kstat(SG_BOARD_STATUS_KSTAT_NAME, (void **)&board_info_ksp, - &kc); - if (err != PICL_SUCCESS) { - return (err); - } - - brd = board_info_ksp->ks_data; - for (i = 0; i < SGENV_NUM_BOARD_READINGS(board_info_ksp); i++, brd++) { - /* - * check this kstat matches the name of the node - */ - if (SG_BOARD_IS_CPU_TYPE(brd->board_num)) { - sprintf_buf3(buf, "%s%d", - SG_HPU_TYPE_CPU_BOARD_ID, brd->board_num); - } else { - sprintf_buf3(buf, "%s%d", - SG_HPU_TYPE_PCI_IO_BOARD_ID, brd->board_num); - } - if (strncmp(buf, name, strlen(buf)) != 0) - continue; - - /* - * ok - got the right kstat - get it's value - * note that values 0-4 are defined in sbdp_mbox.h - */ - if (brd->condition >= 0 && brd->condition < 5) - (void) strlcpy(result, - hpu_condition_table[brd->condition], - MAX_OPERATIONAL_STATUS_LEN); - kstat_close(kc); - return (PICL_SUCCESS); - } - kstat_close(kc); - return (PICL_PROPVALUNAVAILABLE); -} - -static int -get_op_status(ptree_rarg_t *arg, void *result) -{ - int err = PICL_SUCCESS; - char name[PICL_PROPNAMELEN_MAX]; - char value[MAX_STATE_LEN]; - char parent_name[PICL_PROPNAMELEN_MAX]; - picl_nodehdl_t loch; - picl_nodehdl_t parentfruh; - - err = ptree_get_propval_by_name(arg->nodeh, PICL_PROP_NAME, name, - sizeof (name)); - if (err != PICL_SUCCESS) { - return (err); - } - - /* - * handle dimms, cpus and system boards specially - */ - if (IS_PROC_NODE(name)) { - return (get_cpu_status(arg, result)); - } else if (IS_DIMM_NODE(name)) { - return (get_dimm_status(arg, result)); - } else if (IS_SB_NODE(name) || IS_IB_NODE(name)) { - return (get_board_status(arg, result)); - } - - /* - * otherwise OperationalStatus is derived from the fault led state - */ - - /* - * scapp knows FANs 0 and 1 on IB as FAN8 and FAN9 - */ - err = ptree_get_propval_by_name(arg->nodeh, PICL_PROP_PARENT, &loch, - sizeof (loch)); - if (err != PICL_SUCCESS) - return (PICL_PROPVALUNAVAILABLE); - err = ptree_get_propval_by_name(loch, PICL_PROP_PARENT, &parentfruh, - sizeof (parentfruh)); - if (err != PICL_SUCCESS) - return (PICL_PROPVALUNAVAILABLE); - err = ptree_get_propval_by_name(parentfruh, PICL_PROP_NAME, parent_name, - sizeof (parent_name)); - if (err != PICL_SUCCESS) - return (PICL_PROPVALUNAVAILABLE); - if (strcmp(name, "FAN0") == 0 && strcmp(parent_name, "IB6") == 0) { - if (get_led("FAN8", FAULT_LED, value) != PICL_SUCCESS) { - return (PICL_PROPVALUNAVAILABLE); - } - } else if (strcmp(name, "FAN1") == 0 && strcmp(parent_name, - "IB6") == 0) { - if (get_led("FAN9", FAULT_LED, value) != PICL_SUCCESS) { - return (PICL_PROPVALUNAVAILABLE); - } - } else { - if (get_led(name, FAULT_LED, value) != PICL_SUCCESS) { - return (PICL_PROPVALUNAVAILABLE); - } - } - if (strcmp(value, PICL_PROPVAL_ON) == 0) - (void) strlcpy(result, PICL_PROPVAL_FAILED, - MAX_OPERATIONAL_STATUS_LEN); - else - (void) strlcpy(result, PICL_PROPVAL_OKAY, - MAX_OPERATIONAL_STATUS_LEN); - return (PICL_SUCCESS); -} - -static int -add_board_status(picl_nodehdl_t nodeh, char *nodename) -{ - ptree_propinfo_t propinfo; - int err; - picl_prophdl_t prophdl; - - /* - * check if OperationalStatus property already created for this fru - */ - err = ptree_get_prop_by_name(nodeh, PICL_PROP_OPERATIONAL_STATUS, - &prophdl); - if (err == PICL_SUCCESS) - return (PICL_SUCCESS); - - /* - * put operational status on dimms, cpus, SBs, IBs, PSUs, FTs, Fans, RPs - */ - if (IS_DIMM_NODE(nodename) || IS_PROC_NODE(nodename) || - IS_SB_NODE(nodename) || IS_IB_NODE(nodename) || - IS_PSU_NODE(nodename) || IS_FT_NODE(nodename) || - IS_FAN_NODE(nodename) || IS_RP_NODE(nodename)) { - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_CHARSTRING, PICL_READ + PICL_VOLATILE, - MAX_OPERATIONAL_STATUS_LEN, PICL_PROP_OPERATIONAL_STATUS, - get_op_status, NULL); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, PROPINFO_FAIL, - PICL_PROP_OPERATIONAL_STATUS, err); - return (err); - } - err = ptree_create_and_add_prop(nodeh, &propinfo, NULL, NULL); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, ADD_PROP_FAIL, - PICL_PROP_OPERATIONAL_STATUS, err); - return (err); - } - } - return (PICL_SUCCESS); -} - -/* - * environmental information handling - uses sgenv driver kstats - */ - -static int -add_env_nodes(picl_nodehdl_t nodeh, char *nodename, picl_prophdl_t tblhdl) -{ - int err = PICL_SUCCESS; - env_sensor_t *env; - int i; - picl_prophdl_t tblhdl2; - picl_prophdl_t frutype; - char fruname[PICL_PROPNAMELEN_MAX]; - char buf[PICL_PROPNAMELEN_MAX]; - char id[PICL_PROPNAMELEN_MAX]; - float scale; - picl_nodehdl_t childh; - picl_nodehdl_t sensorhdl; - kstat_ctl_t *kc; - kstat_t *env_info_ksp; - - err = open_kstat(SG_ENV_INFO_KSTAT_NAME, (void **)&env_info_ksp, &kc); - if (err != PICL_SUCCESS) { - return (err); - } - - env = env_info_ksp->ks_data; - for (i = 0; i < SGENV_NUM_ENV_READINGS(env_info_ksp); i++, env++) { - /* - * check values from kstat entry are within valid range - */ - if (env->sd_id.id.sensor_type < SG_SENSOR_TYPE_CURRENT) - continue; - if (env->sd_id.id.sensor_type == SG_SENSOR_TYPE_ENVDB) - continue; - if (env->sd_id.id.sensor_type > SG_SENSOR_TYPE_2_5_VDC) - continue; - if ((env->sd_id.id.hpu_type >> 8) >= - (SG_HPU_TYPE_SUN_FIRE_3800_CENTERPLANE >> 8)) - continue; - if (env->sd_id.id.sensor_part > SG_SENSOR_PART_INPUT) - continue; - - /* - * does this kstat entry belong to this fru? - * Note sc reports RPS as 10 and 12 via env messages - * but by 0 and 2 via fru messages, so correct here - */ - if ((env->sd_id.id.hpu_type >> 8) == - (SG_HPU_TYPE_REPEATER_BOARD >> 8)) { - sprintf_buf3(fruname, "%s%d", - hpu_type_table[env->sd_id.id.hpu_type >> 8], - env->sd_id.id.hpu_slot - 10); - } else { - sprintf_buf3(fruname, "%s%d", - hpu_type_table[env->sd_id.id.hpu_type >> 8], - env->sd_id.id.hpu_slot); - } - if (strcmp(nodename, fruname) != 0) - continue; - - /* - * set up FRUType. Note we only want to do this once per fru - */ - err = ptree_get_prop_by_name(nodeh, PICL_PROP_FRU_TYPE, - &frutype); - if (err != PICL_SUCCESS) { - err = add_prop_charstring(nodeh, - hpu_fru_type_table[env->sd_id.id.hpu_type >> 8], - PICL_PROP_FRU_TYPE); - if (err != PICL_SUCCESS) - goto done; - } - - /* - * create the sensor node with a sensible name - */ - switch (env->sd_id.id.sensor_type) { - case SG_SENSOR_TYPE_TEMPERATURE: - if (env->sd_id.id.sensor_part == SG_SENSOR_PART_BOARD) { - sprintf_buf2(id, "t_ambient%d", - env->sd_id.id.sensor_typenum); - } else { - sprintf_buf3(id, "t_%s%d", - hpu_part_table[env->sd_id.id.sensor_part], - env->sd_id.id.sensor_partnum); - } - break; - case SG_SENSOR_TYPE_CURRENT: - sprintf_buf3(id, "i_%s%d", - hpu_part_table[env->sd_id.id.sensor_part], - env->sd_id.id.sensor_partnum); - break; - case SG_SENSOR_TYPE_COOLING: - sprintf_buf3(id, "ft_%s%d", - hpu_part_table[env->sd_id.id.sensor_part], - env->sd_id.id.sensor_partnum); - break; - default: /* voltage */ - if (env->sd_id.id.sensor_part == SG_SENSOR_PART_BOARD) { - sprintf_buf3(id, "v_%s%d", - hpu_sensor_table[env->sd_id.id.sensor_type], - env->sd_id.id.sensor_typenum); - } else { - sprintf_buf3(id, "v_%s%d", - hpu_part_table[env->sd_id.id.sensor_part], - env->sd_id.id.sensor_partnum); - } - break; - } - - /* - * check if sensor node has already been created - */ - sprintf_buf3(buf, "%s_%s", nodename, id); - if (find_child_by_name(sch, buf) != NULL) - continue; - - if (env->sd_id.id.sensor_type == SG_SENSOR_TYPE_COOLING) { - /* - * create individual fan_unit nodes - */ - childh = nodeh; - sprintf_buf2(fruname, "FAN%d", - env->sd_id.id.sensor_partnum); - err = add_intermediate_nodes(&childh, fruname, - &tblhdl2, "fan-unit", "FAN"); - if (err != PICL_SUCCESS) - goto done; - err = add_board_status(childh, fruname); - if (err != PICL_SUCCESS) - goto done; - } else if (env->sd_id.id.sensor_part == - SG_SENSOR_PART_CHEETAH || - ((env->sd_id.id.hpu_type >> 8) == - (SG_HPU_TYPE_CPU_BOARD >> 8) && - (env->sd_id.id.sensor_type == SG_SENSOR_TYPE_TEMPERATURE) && - (env->sd_id.id.sensor_part == SG_SENSOR_PART_BOARD))) { - /* - * put sensors under individual processor nodes - */ - childh = nodeh; - if (env->sd_id.id.sensor_part == SG_SENSOR_PART_BOARD) - sprintf_buf2(fruname, "P%d", - env->sd_id.id.sensor_typenum); - else - sprintf_buf2(fruname, "P%d", - env->sd_id.id.sensor_partnum); - err = add_intermediate_nodes(&childh, fruname, - &tblhdl2, "cpu", "PROC"); - if (err != PICL_SUCCESS) - goto done; - } else { - childh = nodeh; - tblhdl2 = tblhdl; - } - err = add_sensor_node(childh, NULL, buf, - hpu_sensor_class_table[env->sd_id.id.sensor_type], - hpu_sensor_prop_table[env->sd_id.id.sensor_type], - tblhdl2, &sensorhdl); - if (err != PICL_SUCCESS) - goto done; - - /* - * add additional properties - */ - switch (env->sd_id.id.sensor_type) { - case SG_SENSOR_TYPE_COOLING: - err = add_prop_charstring(sensorhdl, id, - PICL_PROP_LABEL); - if (err != PICL_SUCCESS) - goto done; - /* - * add threshold at 75% of full speed - */ - err = add_prop_int(sensorhdl, 75, - PICL_PROP_LOW_WARNING_THRESHOLD); - if (err != PICL_SUCCESS) - goto done; - err = add_sensor_prop(sensorhdl, - PICL_PROP_FAN_SPEED_UNIT); - if (err != PICL_SUCCESS) - goto done; - continue; - case SG_SENSOR_TYPE_TEMPERATURE: - if ((env->sd_id.id.hpu_type >> 8 == - (SG_HPU_TYPE_CPU_BOARD >> 8)) && - (env->sd_id.id.sensor_part == - SG_SENSOR_PART_BOARD)) { - err = add_prop_charstring(sensorhdl, - PICL_PROPVAL_AMBIENT, PICL_PROP_LABEL); - if (err != PICL_SUCCESS) - goto done; - } else if (env->sd_id.id.sensor_part == - SG_SENSOR_PART_CHEETAH) { - err = add_prop_charstring(sensorhdl, - PICL_PROPVAL_DIE, PICL_PROP_LABEL); - if (err != PICL_SUCCESS) - goto done; - } else { - err = add_prop_charstring(sensorhdl, id, - PICL_PROP_LABEL); - if (err != PICL_SUCCESS) - goto done; - } - err = add_prop_int(sensorhdl, env->sd_lo_warn / - SG_TEMPERATURE_SCALE, PICL_PROP_LOW_WARNING); - if (err != PICL_SUCCESS) - goto done; - err = add_prop_int(sensorhdl, env->sd_lo / - SG_TEMPERATURE_SCALE, PICL_PROP_LOW_SHUTDOWN); - if (err != PICL_SUCCESS) - goto done; - err = add_prop_int(sensorhdl, env->sd_hi_warn / - SG_TEMPERATURE_SCALE, PICL_PROP_HIGH_WARNING); - if (err != PICL_SUCCESS) - goto done; - err = add_prop_int(sensorhdl, env->sd_hi / - SG_TEMPERATURE_SCALE, PICL_PROP_HIGH_SHUTDOWN); - if (err != PICL_SUCCESS) - goto done; - continue; - case SG_SENSOR_TYPE_1_5_VDC: - scale = SG_1_5_VDC_SCALE; - break; - case SG_SENSOR_TYPE_1_8_VDC: - scale = SG_1_8_VDC_SCALE; - break; - case SG_SENSOR_TYPE_2_5_VDC: - scale = SG_2_5_VDC_SCALE; - break; - case SG_SENSOR_TYPE_3_3_VDC: - scale = SG_3_3_VDC_SCALE; - break; - case SG_SENSOR_TYPE_5_VDC: - scale = SG_5_VDC_SCALE; - break; - case SG_SENSOR_TYPE_12_VDC: - scale = SG_12_VDC_SCALE; - break; - case SG_SENSOR_TYPE_48_VDC: - /* - * The 48VDC sensor is just an indicator - doesn't - * give reading or thresholds - */ - err = add_prop_charstring(sensorhdl, id, - PICL_PROP_LABEL); - if (err != PICL_SUCCESS) - goto done; - continue; - case SG_SENSOR_TYPE_CURRENT: - scale = SG_CURRENT_SCALE; - break; - } - err = add_prop_charstring(sensorhdl, id, PICL_PROP_LABEL); - if (err != PICL_SUCCESS) - goto done; - err = add_prop_float(sensorhdl, (float)env->sd_lo_warn / scale, - PICL_PROP_LOW_WARNING); - if (err != PICL_SUCCESS) - goto done; - err = add_prop_float(sensorhdl, (float)env->sd_lo / scale, - PICL_PROP_LOW_SHUTDOWN); - if (err != PICL_SUCCESS) - goto done; - err = add_prop_float(sensorhdl, (float)env->sd_hi_warn / scale, - PICL_PROP_HIGH_WARNING); - if (err != PICL_SUCCESS) - goto done; - err = add_prop_float(sensorhdl, (float)env->sd_hi / scale, - PICL_PROP_HIGH_SHUTDOWN); - if (err != PICL_SUCCESS) - goto done; - } -done: - kstat_close(kc); - return (err); -} - -static int -get_sensor_data(ptree_rarg_t *arg, void *result) -{ - int err; /* return code */ - kstat_ctl_t *kc; - char name[PICL_PROPNAMELEN_MAX]; - ptree_propinfo_t propinfo; - int i; - env_sensor_t *env; - char buf[PICL_PROPNAMELEN_MAX]; - char buf1[PICL_PROPNAMELEN_MAX]; - kstat_t *env_info_ksp; - - err = ptree_get_propval_by_name(arg->nodeh, PICL_PROP_NAME, name, - sizeof (name)); - if (err != PICL_SUCCESS) - return (err); - err = ptree_get_propinfo(arg->proph, &propinfo); - if (err != PICL_SUCCESS) - return (err); - - err = open_kstat(SG_ENV_INFO_KSTAT_NAME, (void **)&env_info_ksp, &kc); - if (err != PICL_SUCCESS) { - return (err); - } - - env = env_info_ksp->ks_data; - for (i = 0; i < SGENV_NUM_ENV_READINGS(env_info_ksp); i++, env++) { - /* - * check kstat values are within range - */ - if (SG_INFO_VALUESTATUS(env->sd_infostamp) != SG_INFO_VALUE_OK) - continue; - if (env->sd_id.id.sensor_type < SG_SENSOR_TYPE_CURRENT) - continue; - if (env->sd_id.id.sensor_type == SG_SENSOR_TYPE_ENVDB) - continue; - if (env->sd_id.id.sensor_type > SG_SENSOR_TYPE_2_5_VDC) - continue; - if ((env->sd_id.id.hpu_type >> 8) >= - (SG_HPU_TYPE_SUN_FIRE_3800_CENTERPLANE >> 8)) - continue; - if (env->sd_id.id.sensor_part > SG_SENSOR_PART_INPUT) - continue; - - /* - * check this kstat matches the name of the node - * note sc reports RPS as 10 and 12 via env messages - * but by 0 and 2 via fru messages, so correct here - */ - if ((env->sd_id.id.hpu_type >> 8) == - (SG_HPU_TYPE_REPEATER_BOARD >> 8)) - sprintf_buf3(buf, "%s%d", - hpu_type_table[env->sd_id.id.hpu_type >> 8], - env->sd_id.id.hpu_slot - 10); - else - sprintf_buf3(buf, "%s%d", - hpu_type_table[env->sd_id.id.hpu_type >> 8], - env->sd_id.id.hpu_slot); - switch (env->sd_id.id.sensor_type) { - case SG_SENSOR_TYPE_TEMPERATURE: - if (env->sd_id.id.sensor_part == SG_SENSOR_PART_BOARD) { - sprintf_buf3(buf1, "%s_t_ambient%d", - buf, env->sd_id.id.sensor_typenum); - } else { - sprintf_buf4(buf1, "%s_t_%s%d", buf, - hpu_part_table[env->sd_id.id.sensor_part], - env->sd_id.id.sensor_partnum); - } - break; - case SG_SENSOR_TYPE_CURRENT: - sprintf_buf4(buf1, "%s_i_%s%d", buf, - hpu_part_table[env->sd_id.id.sensor_part], - env->sd_id.id.sensor_partnum); - break; - case SG_SENSOR_TYPE_COOLING: - sprintf_buf4(buf1, "%s_ft_%s%d", buf, - hpu_part_table[env->sd_id.id.sensor_part], - env->sd_id.id.sensor_partnum); - break; - default: /* voltage */ - if (env->sd_id.id.sensor_part == SG_SENSOR_PART_BOARD) { - sprintf_buf4(buf1, "%s_v_%s%d", buf, - hpu_sensor_table[env->sd_id.id.sensor_type], - env->sd_id.id.sensor_typenum); - } else { - sprintf_buf4(buf1, "%s_v_%s%d", buf, - hpu_part_table[env->sd_id.id.sensor_part], - env->sd_id.id.sensor_partnum); - } - break; - } - if (strcmp(buf1, name) != 0) - continue; - - /* - * ok - this is the kstat we want - update - * Condition, or sensor reading as requested - */ - if (strcmp(propinfo.piclinfo.name, PICL_PROP_CONDITION) == 0) { - switch (SG_GET_SENSOR_STATUS(env->sd_status)) { - case SG_SENSOR_STATUS_OK: - (void) strlcpy(result, PICL_PROPVAL_OKAY, - MAX_CONDITION_LEN); - break; - case SG_SENSOR_STATUS_LO_WARN: - case SG_SENSOR_STATUS_HI_WARN: - (void) strlcpy(result, PICL_PROPVAL_WARNING, - MAX_CONDITION_LEN); - break; - case SG_SENSOR_STATUS_LO_DANGER: - case SG_SENSOR_STATUS_HI_DANGER: - (void) strlcpy(result, PICL_PROPVAL_FAILED, - MAX_CONDITION_LEN); - break; - default: - kstat_close(kc); - return (PICL_PROPVALUNAVAILABLE); - } - kstat_close(kc); - return (PICL_SUCCESS); - } - switch (env->sd_id.id.sensor_type) { - case SG_SENSOR_TYPE_TEMPERATURE: - *(int *)result = env->sd_value / SG_TEMPERATURE_SCALE; - break; - case SG_SENSOR_TYPE_1_5_VDC: - *(float *)result = - (float)env->sd_value / (float)SG_1_5_VDC_SCALE; - break; - case SG_SENSOR_TYPE_1_8_VDC: - *(float *)result = - (float)env->sd_value / (float)SG_1_8_VDC_SCALE; - break; - case SG_SENSOR_TYPE_2_5_VDC: - *(float *)result = - (float)env->sd_value / (float)SG_2_5_VDC_SCALE; - break; - case SG_SENSOR_TYPE_3_3_VDC: - *(float *)result = - (float)env->sd_value / (float)SG_3_3_VDC_SCALE; - break; - case SG_SENSOR_TYPE_5_VDC: - *(float *)result = - (float)env->sd_value / (float)SG_5_VDC_SCALE; - break; - case SG_SENSOR_TYPE_12_VDC: - *(float *)result = - (float)env->sd_value / (float)SG_12_VDC_SCALE; - break; - case SG_SENSOR_TYPE_CURRENT: - *(float *)result = - (float)env->sd_value / (float)SG_CURRENT_SCALE; - break; - case SG_SENSOR_TYPE_COOLING: - if (strcmp(propinfo.piclinfo.name, - PICL_PROP_FAN_SPEED_UNIT) == 0) { - if (SG_GET_SENSOR_STATUS(env->sd_status) == - SG_SENSOR_STATUS_FAN_LOW) { - (void) strlcpy(result, - PICL_PROPVAL_SELF_REGULATING, - MAX_SPEED_UNIT_LEN); - } else { - (void) strlcpy(result, - PICL_PROPVAL_PER_CENT, - MAX_SPEED_UNIT_LEN); - } - } else { - switch (SG_GET_SENSOR_STATUS(env->sd_status)) { - case SG_SENSOR_STATUS_FAN_HIGH: - *(int *)result = 100; - break; - case SG_SENSOR_STATUS_FAN_FAIL: - case SG_SENSOR_STATUS_FAN_OFF: - *(int *)result = 0; - break; - default: - case SG_SENSOR_STATUS_FAN_LOW: - kstat_close(kc); - return (PICL_PROPVALUNAVAILABLE); - } - } - break; - default: - kstat_close(kc); - return (PICL_PROPVALUNAVAILABLE); - } - kstat_close(kc); - return (PICL_SUCCESS); - } - kstat_close(kc); - return (PICL_PROPVALUNAVAILABLE); -} - -/* - * led information handling - uses lw8 driver - */ - -static int -add_led_nodes(picl_nodehdl_t nodeh, char *name, int position, - picl_prophdl_t tblhdl) -{ - int err; - int ledfd; - lom_get_led_t lom_get_led; - picl_nodehdl_t sensorhdl; - char buf[PICL_PROPNAMELEN_MAX]; - - /* - * Open the lw8 pseudo dev to get the led information - */ - if ((ledfd = open(LED_PSEUDO_DEV, O_RDWR, 0)) == -1) { - syslog(LOG_ERR, DEV_OPEN_FAIL, LED_PSEUDO_DEV, strerror(errno)); - return (PICL_SUCCESS); - } - bzero(&lom_get_led, sizeof (lom_get_led)); - (void) strlcpy(lom_get_led.location, name, - sizeof (lom_get_led.location)); - if (ioctl(ledfd, LOMIOCGETLED, &lom_get_led) == -1) { - (void) close(ledfd); - syslog(LOG_ERR, LED_IOCTL_FAIL, strerror(errno)); - return (PICL_FAILURE); - } - while (lom_get_led.next_id[0] != '\0') { - (void) strlcpy(lom_get_led.id, lom_get_led.next_id, - sizeof (lom_get_led.id)); - lom_get_led.next_id[0] = '\0'; - lom_get_led.position = LOM_LED_POSITION_FRU; - if (ioctl(ledfd, LOMIOCGETLED, &lom_get_led) == -1) { - (void) close(ledfd); - syslog(LOG_ERR, LED_IOCTL_FAIL, strerror(errno)); - return (PICL_FAILURE); - } - sprintf_buf3(buf, "%s_%s", name, lom_get_led.id); - if (position != lom_get_led.position) - continue; - if (position == LOM_LED_POSITION_LOCATION) { - err = add_sensor_node(NULL, nodeh, buf, PICL_CLASS_LED, - PICL_PROP_STATE, tblhdl, &sensorhdl); - } else { - err = add_sensor_node(nodeh, NULL, buf, PICL_CLASS_LED, - PICL_PROP_STATE, tblhdl, &sensorhdl); - } - if (err != PICL_SUCCESS) { - (void) close(ledfd); - return (err); - } - if (strcmp(name, "chassis") == 0 && strcmp(lom_get_led.id, - "locator") == 0) { - err = add_prop_charstring(sensorhdl, PICL_PROPVAL_TRUE, - PICL_PROP_IS_LOCATOR); - if (err != PICL_SUCCESS) { - (void) close(ledfd); - return (err); - } - err = add_prop_charstring(sensorhdl, - PICL_PROPVAL_SYSTEM, PICL_PROP_LOCATOR_NAME); - if (err != PICL_SUCCESS) { - (void) close(ledfd); - return (err); - } - } - err = add_prop_charstring(sensorhdl, lom_get_led.id, - PICL_PROP_LABEL); - if (err != PICL_SUCCESS) { - (void) close(ledfd); - return (err); - } - err = add_prop_charstring(sensorhdl, lom_get_led.color, - PICL_PROP_COLOR); - if (err != PICL_SUCCESS) { - (void) close(ledfd); - return (err); - } - } - (void) close(ledfd); - return (PICL_SUCCESS); -} - -static int -get_led(char *name, char *ptr, char *result) -{ - int ledfd; - lom_get_led_t lom_get_led; - - /* - * Open the lw8 pseudo dev to get the led information - */ - if ((ledfd = open(LED_PSEUDO_DEV, O_RDWR, 0)) == -1) { - syslog(LOG_ERR, DEV_OPEN_FAIL, LED_PSEUDO_DEV, strerror(errno)); - return (PICL_FAILURE); - } - bzero(&lom_get_led, sizeof (lom_get_led)); - (void) strlcpy(lom_get_led.location, name, - sizeof (lom_get_led.location)); - (void) strlcpy(lom_get_led.id, ptr, sizeof (lom_get_led.id)); - if (ioctl(ledfd, LOMIOCGETLED, &lom_get_led) == -1) { - (void) close(ledfd); - syslog(LOG_ERR, LED_IOCTL_FAIL, strerror(errno)); - return (PICL_PROPVALUNAVAILABLE); - } - if (lom_get_led.status == LOM_LED_STATUS_ON) - (void) strlcpy(result, PICL_PROPVAL_ON, MAX_STATE_LEN); - else if (lom_get_led.status == LOM_LED_STATUS_FLASHING) - (void) strlcpy(result, PICL_PROPVAL_FLASHING, MAX_STATE_LEN); - else if (lom_get_led.status == LOM_LED_STATUS_BLINKING) - (void) strlcpy(result, PICL_PROPVAL_BLINKING, MAX_STATE_LEN); - else - (void) strlcpy(result, PICL_PROPVAL_OFF, MAX_STATE_LEN); - (void) close(ledfd); - return (PICL_SUCCESS); -} - -static int -get_led_data(ptree_rarg_t *arg, void *result) -{ - int rc; /* return code */ - char name[PICL_PROPNAMELEN_MAX]; - char *ptr; - - rc = ptree_get_propval_by_name(arg->nodeh, PICL_PROP_NAME, name, - sizeof (name)); - if (rc != PICL_SUCCESS) - return (rc); - - ptr = strchr(name, '_'); - *ptr++ = '\0'; /* now name is fru name, ptr is led name */ - return (get_led(name, ptr, (char *)result)); -} - -static int -set_led(char *name, char *ptr, char *value) -{ - int ledfd; - lom_set_led_t lom_set_led; - - /* - * Open the lw8 pseudo dev to set the led information - */ - if ((ledfd = open(LED_PSEUDO_DEV, O_RDWR, 0)) == -1) { - syslog(LOG_ERR, DEV_OPEN_FAIL, LED_PSEUDO_DEV, strerror(errno)); - return (PICL_FAILURE); - } - bzero(&lom_set_led, sizeof (lom_set_led)); - (void) strlcpy(lom_set_led.location, name, - sizeof (lom_set_led.location)); - (void) strlcpy(lom_set_led.id, ptr, sizeof (lom_set_led.id)); - if (strcmp(value, PICL_PROPVAL_ON) == 0) { - lom_set_led.status = LOM_LED_STATUS_ON; - } else if (strcmp(value, PICL_PROPVAL_FLASHING) == 0) { - lom_set_led.status = LOM_LED_STATUS_FLASHING; - } else if (strcmp(value, PICL_PROPVAL_BLINKING) == 0) { - lom_set_led.status = LOM_LED_STATUS_BLINKING; - } else { - lom_set_led.status = LOM_LED_STATUS_OFF; - } - if (ioctl(ledfd, LOMIOCSETLED, &lom_set_led) == -1) { - (void) close(ledfd); - syslog(LOG_ERR, LED_IOCTL_FAIL, strerror(errno)); - return (PICL_PROPVALUNAVAILABLE); - } - (void) close(ledfd); - return (PICL_SUCCESS); -} - -static int -set_led_data(ptree_warg_t *arg, const void *value) -{ - int rc; /* return code */ - char name[PICL_PROPNAMELEN_MAX]; - char *ptr; - - rc = ptree_get_propval_by_name(arg->nodeh, PICL_PROP_NAME, name, - sizeof (name)); - if (rc != PICL_SUCCESS) - return (rc); - - ptr = strchr(name, '_'); - *ptr++ = '\0'; /* now name is fru name, ptr is led name */ - return (set_led(name, ptr, (char *)value)); -} - -static void -disk_leds_init(void) -{ - int err = 0, i; - - if (!g_mutex_init) { - if ((pthread_cond_init(&g_cv, NULL) == 0) && - (pthread_cond_init(&g_cv_ack, NULL) == 0) && - (pthread_mutex_init(&g_mutex, NULL) == 0)) { - g_mutex_init = B_TRUE; - } else { - return; - } - } - - if (ledsthr_created) { - /* - * this is a restart, wake up sleeping threads - */ - err = pthread_mutex_lock(&g_mutex); - if (err != 0) { - syslog(LOG_ERR, EM_MUTEX_FAIL, strerror(err)); - return; - } - g_wait_now = B_FALSE; - (void) pthread_cond_broadcast(&g_cv); - (void) pthread_mutex_unlock(&g_mutex); - } else { - if ((pthread_attr_init(&ledsthr_attr) != 0) || - (pthread_attr_setscope(&ledsthr_attr, - PTHREAD_SCOPE_SYSTEM) != 0)) - return; - if ((err = pthread_create(&ledsthr_tid, &ledsthr_attr, - disk_leds_thread, NULL)) != 0) { - syslog(LOG_ERR, EM_THREAD_CREATE_FAILED, strerror(err)); - return; - } - ledsthr_created = B_TRUE; - } - for (i = 0; i < N_DISKS; i++) { - (void) set_led(lw8_disks[i].d_fruname, FAULT_LED, - PICL_PROPVAL_OFF); - } -} - -static void -disk_leds_fini(void) -{ - int err; - - /* - * tell led thread to pause - */ - if (!ledsthr_created) - return; - err = pthread_mutex_lock(&g_mutex); - if (err != 0) { - syslog(LOG_ERR, EM_MUTEX_FAIL, strerror(err)); - return; - } - g_wait_now = B_TRUE; - disk_leds_thread_ack = B_FALSE; - (void) pthread_cond_broadcast(&g_cv); - - /* - * and wait for the led thread to acknowledge - */ - while (!disk_leds_thread_ack) { - (void) pthread_cond_wait(&g_cv_ack, &g_mutex); - } - (void) pthread_mutex_unlock(&g_mutex); -} - -static void -update_disk_node(struct lw8_disk *diskp) -{ - picl_nodehdl_t slotndh; - picl_nodehdl_t diskndh; - picl_nodehdl_t devhdl; - picl_prophdl_t tblhdl; - int err; - char path[MAXPATHLEN]; - char *fruname = diskp->d_fruname; - - sprintf_buf2(path, CHASSIS_LOC_PATH, fruname); - if (ptree_get_node_by_path(path, &slotndh) != PICL_SUCCESS) { - return; - } - diskndh = find_child_by_name(slotndh, fruname); - err = ptree_get_node_by_path(diskp->d_plat_path, &devhdl); - if (err == PICL_SUCCESS) { - if (diskndh != NULL) - return; - err = ptree_create_and_add_node(slotndh, fruname, - PICL_CLASS_FRU, &diskndh); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, ADD_NODE_FAIL, fruname, err); - return; - } - err = create_table(diskndh, &tblhdl, PICL_PROP_DEVICES); - if (err != PICL_SUCCESS) - return; - err = create_table_entry(tblhdl, devhdl, PICL_CLASS_BLOCK); - if (err != PICL_SUCCESS) - return; - err = add_prop_ref(devhdl, diskndh, PICL_REFPROP_FRU_PARENT); - if (err != PICL_SUCCESS) - return; - } else { - if (diskndh == NULL) - return; - err = ptree_delete_node(diskndh); - if (err != PICL_SUCCESS) - return; - (void) ptree_destroy_node(diskndh); - } -} - -/* - * Implement a state machine in order to: - * - * o enable/disable disk LEDs - * o add/delete the disk's node in the FRU tree - * - * The machine changes state based on the current, in-memory - * state of the disk (eg, the d_state field of 'struct lw8_disk') - * and libdevice's current view of whether the disk is - * Configured or Unconfigured. - * - * If the new state is the same as the previous state, then - * no side effects occur. Otherwise, the LEDs for the - * disk are set and the disk's associated node in the - * FRU Tree is added or deleted. - */ -static void -set_disk_leds(struct lw8_disk *disk) -{ - devctl_hdl_t dhdl; - uint_t cur_state = 0; - - dhdl = devctl_device_acquire(disk->d_devices_path, 0); - if (dhdl == NULL) { - int err = errno; - syslog(LOG_ERR, DEVCTL_DEVICE_ACQUIRE_FAILED, - strerror(err)); - return; - } - devctl_device_getstate(dhdl, &cur_state); - devctl_release(dhdl); - - if ((cur_state & DEVICE_OFFLINE) != 0) { - switch (disk->d_state) { - default: - /* - * State machine should never get here. - * When NDEBUG is defined, control will - * fall through and force d_state to - * match the semantics of "DEVICE_OFFLINE". - * During development, NDEBUG can be undefined, - * and this will fire an assertion. - */ - assert(0); - /*FALLTHROUGH*/ - - case DISK_STATE_NOT_INIT: - case DISK_STATE_READY: - disk->d_state = DISK_STATE_NOT_READY; - - (void) set_led(disk->d_fruname, POWER_LED, - PICL_PROPVAL_OFF); - (void) set_led(disk->d_fruname, REMOK_LED, - PICL_PROPVAL_ON); - - update_disk_node(disk); - break; - - case DISK_STATE_NOT_READY: - break; - } - } else if ((cur_state & DEVICE_ONLINE) != 0) { - switch (disk->d_state) { - default: - /* - * State machine should never get here. - * When NDEBUG is defined, control will - * fall through and force d_state to - * match the semantics of "DEVICE_ONLINE". - * During development, NDEBUG can be undefined, - * and this will fire an assertion. - */ - assert(0); - /*FALLTHROUGH*/ - - case DISK_STATE_NOT_INIT: - case DISK_STATE_NOT_READY: - disk->d_state = DISK_STATE_READY; - - (void) set_led(disk->d_fruname, REMOK_LED, - PICL_PROPVAL_OFF); - (void) set_led(disk->d_fruname, POWER_LED, - PICL_PROPVAL_ON); - - update_disk_node(disk); - break; - - case DISK_STATE_READY: - break; - } - } -} - -/* - * NOTE: this implementation of disk_leds_thread is based on the version in - * plugins/sun4u/mpxu/frudr/piclfrudr.c (with V440 raid support removed). Some - * day the source code layout and build environment should support common code - * used by platform specific plugins, in which case LW8 support could be added - * to the mpxu version (which would be moved to a common directory). - */ -/*ARGSUSED*/ -static void * -disk_leds_thread(void *args) -{ - int i; - int err = 0; - int n_disks = N_DISKS; - - static char *lw8_pci_devs[] = { - DISK0_BASE_PATH, - DISK1_BASE_PATH - }; - - static char *lw8_pcix_devs[] = { - DISK0_BASE_PATH_PCIX, - DISK1_BASE_PATH_PCIX - }; - - static char **lw8_devs; - - if (pcix_io) { - lw8_devs = lw8_pcix_devs; - } else { - lw8_devs = lw8_pci_devs; - } - - /* - * create aliases for disk names - */ - for (i = 0; i < n_disks; i++) { - char buffer[MAXPATHLEN]; - - (void) snprintf(buffer, sizeof (buffer), "/devices%s", - lw8_devs[i]); - lw8_disks[i].d_devices_path = strdup(buffer); - - (void) snprintf(buffer, sizeof (buffer), "/platform%s", - lw8_devs[i]); - lw8_disks[i].d_plat_path = strdup(buffer); - } - - for (;;) { - for (i = 0; i < n_disks; i++) { - set_disk_leds(&lw8_disks[i]); - } - - /* - * wait a bit until we check again - */ - err = poll(NULL, 0, ledsthr_poll_period); - if (err == -1) { - err = errno; - syslog(LOG_ERR, EM_POLL_FAIL, strerror(err)); - break; - } - err = pthread_mutex_lock(&g_mutex); - if (err != 0) { - syslog(LOG_ERR, EM_MUTEX_FAIL, strerror(err)); - break; - } - if (g_wait_now != B_FALSE) { - /* notify _fini routine that we've paused */ - disk_leds_thread_ack = B_TRUE; - (void) pthread_cond_signal(&g_cv_ack); - /* and go to sleep in case we get restarted */ - while (g_wait_now != B_FALSE) - (void) pthread_cond_wait(&g_cv, &g_mutex); - } - (void) pthread_mutex_unlock(&g_mutex); - } - return ((void *)err); -} diff --git a/usr/src/cmd/picl/plugins/sun4u/mpxu/Makefile b/usr/src/cmd/picl/plugins/sun4u/mpxu/Makefile deleted file mode 100644 index ada6251f9c..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/mpxu/Makefile +++ /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, 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 -# -# -#ident "%Z%%M% %I% %E% SMI" -# -# Copyright 2002 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# cmd/picl/plugins/sun4u/mpxu/Makefile -# - -SUBDIRS= devtree frutree frudata frudr envmon .WAIT - -MSGSUBDIRS= frudr - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -.KEEP_STATE: - -all install clean clobber: $(SUBDIRS) - -_msg: $(MSGSUBDIRS) - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/mpxu/devtree/Makefile b/usr/src/cmd/picl/plugins/sun4u/mpxu/devtree/Makefile deleted file mode 100644 index 45ce596611..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/mpxu/devtree/Makefile +++ /dev/null @@ -1,62 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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. -# -# cmd/picl/plugins/sun4u/mpxu/devtree/Makefile -# -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-V240 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONF= picldevtree.conf picl_asr.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: - -install: $(ROOTLIBDIR) $(ROOTCONF) - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/mpxu/devtree/picl_asr.conf b/usr/src/cmd/picl/plugins/sun4u/mpxu/devtree/picl_asr.conf deleted file mode 100644 index 8d7fb7974a..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/mpxu/devtree/picl_asr.conf +++ /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, 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 -# -# -#ident "%Z%%M% %I% %E% SMI" -# -# Copyright 2003 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# cmd/picl/plugins/sun4u/ents/devtree/picl_asr.conf -# -# Platform specific .conf file for picldevtree plug-in -# -dimm0 memory-module-group unused /memory-controller@0,0/memory-module-group I?ID=0 -dimm0 memory-module disabled /memory-controller@0,0/memory-module-group?ID=0/memory-module I?ID=0 -dimm0 memory-module unused /memory-controller@0,0/memory-module-group?ID=0/memory-module I?ID=1 -dimm1 memory-module-group unused /memory-controller@0,0/memory-module-group I?ID=0 -dimm1 memory-module unused /memory-controller@0,0/memory-module-group?ID=0/memory-module I?ID=0 -dimm1 memory-module disabled /memory-controller@0,0/memory-module-group?ID=0/memory-module I?ID=1 -dimm2 memory-module-group unused /memory-controller@0,0/memory-module-group I?ID=1 -dimm2 memory-module disabled /memory-controller@0,0/memory-module-group?ID=1/memory-module I?ID=0 -dimm2 memory-module unused /memory-controller@0,0/memory-module-group?ID=1/memory-module I?ID=1 -dimm3 memory-module-group unused /memory-controller@0,0/memory-module-group I?ID=1 -dimm3 memory-module unused /memory-controller@0,0/memory-module-group?ID=1/memory-module I?ID=0 -dimm3 memory-module disabled /memory-controller@0,0/memory-module-group?ID=1/memory-module I?ID=1 -dimm4 memory-module-group unused /memory-controller@1,0/memory-module-group I?ID=0 -dimm4 memory-module disabled /memory-controller@1,0/memory-module-group?ID=0/memory-module I?ID=0 -dimm4 memory-module unused /memory-controller@1,0/memory-module-group?ID=0/memory-module I?ID=1 -dimm5 memory-module-group unused /memory-controller@1,0/memory-module-group I?ID=0 -dimm5 memory-module unused /memory-controller@1,0/memory-module-group?ID=0/memory-module I?ID=0 -dimm5 memory-module disabled /memory-controller@1,0/memory-module-group?ID=0/memory-module I?ID=1 -dimm6 memory-module-group unused /memory-controller@1,0/memory-module-group I?ID=1 -dimm6 memory-module disabled /memory-controller@1,0/memory-module-group?ID=1/memory-module I?ID=0 -dimm6 memory-module unused /memory-controller@1,0/memory-module-group?ID=1/memory-module I?ID=1 -dimm7 memory-module-group unused /memory-controller@1,0/memory-module-group I?ID=1 -dimm7 memory-module unused /memory-controller@1,0/memory-module-group?ID=1/memory-module I?ID=0 -dimm7 memory-module disabled /memory-controller@1,0/memory-module-group?ID=1/memory-module I?ID=1 -pci0 picl disabled /pci@1d,700000/unknown@1 I?DeviceID=1 -pci1 picl disabled /pci@1e,600000/unknown@3 I?DeviceID=3 -pci2 picl disabled /pci@1e,600000/unknown@2 I?DeviceID=2 -ide ide disabled /pci@1e,600000/ide@d I?DeviceID=d -usb usb disabled /pci@1e,600000/usb@a I?DeviceID=a -hcm hcm disabled /pci@1c,600000/cpu@1 I?DeviceID=1 -net0&1 network disabled /pci@1f,700000/network@2 I?DeviceID=2 -net0&1 network disabled /pci@1f,700000/network@2,1 I?DeviceID=2 -net2&3 network disabled /pci@1d,700000/network@2 I?DeviceID=2 -net2&3 network disabled /pci@1d,700000/network@2,1 I?DeviceID=2 -scsi scsi-2 disabled /pci@1c,600000/scsi@2 I?DeviceID=2 -scsi scsi-2 disabled /pci@1c,600000/scsi@2,1 I?DeviceID=2 -cpu0 cpu disabled /SUNW,UltraSPARC-IIIi@0,0 I?ID=0:I?clock-frequency=0 -cpu1 cpu disabled /SUNW,UltraSPARC-IIIi@1,0 I?ID=1:I?clock-frequency=0 diff --git a/usr/src/cmd/picl/plugins/sun4u/mpxu/devtree/picldevtree.conf b/usr/src/cmd/picl/plugins/sun4u/mpxu/devtree/picldevtree.conf deleted file mode 100644 index ea011b1937..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/mpxu/devtree/picldevtree.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, 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 -# -# -#ident "%Z%%M% %I% %E% SMI" -# -# Copyright 2004 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# cmd/picl/plugins/sun4u/mpxu/devtree/picldevtree.conf -# -# Platform specific .conf file for picldevtree plug-in -# -power-supply-fru-prom seeprom -scc-reader seeprom -dimm-spd seeprom -motherboard-fru-prom seeprom -chassis-fru-prom seeprom -hcm-card-fru-prom seeprom -alarm-fru-prom seeprom -dvd-if-fru-prom seeprom -sas-if-fru-prom seeprom -sas-pci-fru-prom seeprom -cpu hcm diff --git a/usr/src/cmd/picl/plugins/sun4u/mpxu/envmon/Makefile b/usr/src/cmd/picl/plugins/sun4u/mpxu/envmon/Makefile deleted file mode 100644 index 618733534c..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/mpxu/envmon/Makefile +++ /dev/null @@ -1,74 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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. -# -# cmd/picl/plugins/sun4u/mpxu/frutree/Makefile -# - -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-V240 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONFS = piclenvmon.conf -ROOTCONF= $(CONFS:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 -MAININFO= $(CONFS:%.conf=%.info) - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: $(CONFS) - -install: $(ROOTLIBDIR) $(ROOTCONF) - -$(CONFS): $(MAININFO) - @$(RM) -f $@ - @echo "# Copyright 2002 Sun Microsystems, Inc. All rights reserved." \ - > $@ - @echo "# Use is subject to license terms." >> $@ - @echo "# This is a generated file. #ident lines identify sources" >> $@ - $(CPP) -P $(@:%.conf=%.info) | \ - $(SED) -e '/^[ ]*$$/d' >> $@ - @$(CHMOD) 444 $@ - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/mpxu/envmon/piclenvmon.info b/usr/src/cmd/picl/plugins/sun4u/mpxu/envmon/piclenvmon.info deleted file mode 100644 index d4aefc29f7..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/mpxu/envmon/piclenvmon.info +++ /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, 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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon after - * it has established rmclomv nodes in /platform - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#define RMC_COMM /platform/pci@1e,600000/isa@7/rmc-comm@0,3e8 - -/* - * add a node for the rmclomv leaf driver - */ -name:RMC_COMM - NODE SUNW,rmclomv service-processor - ENDNODE - -name:RMC_COMM/SUNW,rmclomv - PROP devfs-path string r 0 "/pseudo/rmclomv@0" diff --git a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudata/Makefile b/usr/src/cmd/picl/plugins/sun4u/mpxu/frudata/Makefile deleted file mode 100644 index 934c3a733e..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudata/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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# cmd/picl/plugins/sun4u/mpxu/frudata/Makefile -# - -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-V240 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONF= libpiclfrudata.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: $(CONF) - -install: $(ROOTLIBDIR) $(ROOTCONF) - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudata/libpiclfrudata.conf b/usr/src/cmd/picl/plugins/sun4u/mpxu/frudata/libpiclfrudata.conf deleted file mode 100644 index 00db647b5e..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudata/libpiclfrudata.conf +++ /dev/null @@ -1,76 +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" -# -# This file creates the FRU device paths for the FRUAccess library -# - -VERSION 1.0 - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/chassis-fru-prom -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/chassis-fru-prom@0,a8:chassis-fru-prom" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/motherboard-fru-prom -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/motherboard-fru-prom@0,a2:motherboard-fru-prom" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd?UnitAddress=0,b6 -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,b6:dimm-spd" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd?UnitAddress=0,b8 -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,b8:dimm-spd" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd?UnitAddress=0,ba -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,ba:dimm-spd" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd?UnitAddress=0,bc -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,bc:dimm-spd" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd?UnitAddress=0,c6 -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,c6:dimm-spd" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd?UnitAddress=0,c8 -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,c8:dimm-spd" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd?UnitAddress=0,ca -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,ca:dimm-spd" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd?UnitAddress=0,cc -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,cc:dimm-spd" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/hcm-card-fru-prom -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/hcm-card-fru-prom@0,d6:hcm-card-fru-prom" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/alarm-fru-prom -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/alarm-fru-prom@0,ac:alarm-fru-prom" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/sas-pci-fru-prom -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/sas-pci-fru-prom@0,d8:sas-pci-fru-prom" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/sas-if-fru-prom -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/sas-if-fru-prom@0,a8:sas-if-fru-prom" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dvd-if-fru-prom -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/dvd-if-fru-prom@0,aa:dvd-if-fru-prom" diff --git a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/Makefile b/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/Makefile deleted file mode 100644 index efcabe5a9f..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/Makefile +++ /dev/null @@ -1,161 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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 $(SRC)/Makefile.psm - -LIBRARY = libpiclfrudr.a -VERS = .1 - -OBJECTS = piclfrudr.o - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-V240 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -SRCS = $(OBJECTS:%.o=%.c) - -LIBS = $(DYNLIB) - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -PLAT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-V440 - -PLAT_LIB_DIR = $(PLAT_PLATFORM:%=%/lib) - -PLAT_PICL_DIR = $(PLAT_LIB_DIR:%=%/picl) - -PLAT_PLUGINS_DIRS = $(PLAT_PICL_DIR:%=%/plugins) - -USR_PLAT_PLUGINS_DYNLIBS = $(PLAT_PLUGINS_DIRS:%=%/$(DYNLIB)) -USR_PLAT_PLUGINS_LIBLINKS = $(PLAT_PLUGINS_DIRS:%=%/$(LIBLINKS)) -MPXU_DYNLIB_DIR = ../../../../SUNW,Sun-Fire-V240/lib/picl/plugins - -CONFS = fru_PS0.conf fru_PS1.conf -CONFS += fru_HDD0.conf fru_HDD1.conf fru_HDD2.conf -CONFS += fru_HDD3.conf -CONFS += fru_SC.conf -CONFS += fru_usb-a-1.conf fru_usb-a-2.conf -ROOTCONF= $(CONFS:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 -MAININFO= $(CONFS:%.conf=%.info) -OTHERINFOS = fru_PS0_data.info fru_PS1_data.info -OTHERINFOS += fru_HDD0_data.info fru_HDD1_data.info -OTHERINFOS += fru_HDD2_data.info fru_HDD3_data.info -OTHERINFOS += fru_SC_data.info SB-tables.info -OTHERINFOS += fru_usb-a-1_data.info fru_usb-a-2_data.info - - -CPPFLAGS += -I$(SRC)/cmd/picl/plugins/lib/picld_pluginutil -CPPFLAGS += -I$(SRC)/uts/sun4u/mpxu -CPPFLAGS += -I$(SRC)/uts/sun4u/ -I$(SRC)/uts/common/ -CPPFLAGS += -I$(SRC)/uts/sun4u/sys/i2c/clients - - -DYNFLAGS += -R/usr/platform/\$$PLATFORM/lib/picl/plugins -DYNFLAGS += -R/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins -LDLIBS += -L$(SRC)/cmd/picl/plugins/lib/picld_pluginutil/$(MACH) -LDLIBS += -L$(DEVTREE_SRC_DIR) -LDLIBS += -L$(SRC)/lib/libpicltree/$(MACH) -LDLIBS += -L$(SRC)/cmd/picl/plugins/common/memcfg -LDLIBS += -L$(SRC)/cmd/picl/plugins/common/devtree -LDLIBS += -L$(SRC)/cmd/picl/plugins/common/piclevent -LDLIBS += -L$(SRC)/cmd/picl/plugins/sun4u/envmon -LDLIBS += -L$(SRC)/cmd/picl/plugins/common/frutree -LDLIBS += -L$(ROOT)/usr/lib/picl/plugins -LDLIBS += -lc -ldevinfo -ldevice -LDLIBS += -lpicltree -lpicld_pluginutil -lnvpair -lkstat -LDLIBS += -lpiclevent -lpiclenvmon -lpiclfrutree - -.KEEP_STATE: - -SUBDIRS = - -POFILE = piclfrudr.po - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -all: $(LIBS) $(LIBLINKS) $(CONFS) - -install: $(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) $(ROOTCONF) \ - $(PLAT_PLATFORM) $(PLAT_LIB_DIR) $(PLAT_PICL_DIR) \ - $(USR_PLAT_PLUGINS_DYNLIBS) $(USR_PLAT_PLUGINS_LIBLINKS) - -$(CONFS): $(MAININFO) $(OTHERINFOS) - @$(RM) -f $@ - @echo "# Copyright 2003 Sun Microsystems, Inc. " \ - "All rights reserved." > $@ - @echo "# This is a generated file. #ident lines identify sources" >> $@ - $(CPP) -P $(@:%.conf=%.info) | \ - $(SED) -e '/^[ ]*$$/d' >> $@ - @$(CHMOD) 644 $@ - -_msg: $(MSGDOMAIN) $(POFILE) - $(RM) $(MSGDOMAIN)/$(POFILE) - $(CP) $(POFILE) $(MSGDOMAIN)/mpxu_$(POFILE) - -$(MSGDOMAIN): - $(INS.dir) - -$(LIBLINKS): FRC - $(RM) $@; $(SYMLINK) $(DYNLIB) $@ - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(ROOT_PLAT_PLUGINDIR)/%: % $(ROOT_PLAT_PLUGINDIR) - $(INS.file) ;\ - $(RM) -r $(ROOT_PLAT_PLUGINDIR)/$(LIBLINKS) ;\ - $(SYMLINK) ./$(DYNLIB) $(ROOT_PLAT_PLUGINDIR)/$(LIBLINKS) - -$(PLAT_PLATFORM): - $(INS.dir) -$(PLAT_LIB_DIR): - $(INS.dir) -$(PLAT_PICL_DIR): - $(INS.dir) - -$(PLAT_PLUGINS_DIRS): - $(INS.dir) - -$(USR_PLAT_PLUGINS_DYNLIBS): $(PLAT_PLUGINS_DIRS) - $(RM) -r $@ ;\ - $(SYMLINK) $(MPXU_DYNLIB_DIR)/$(DYNLIB) $@ - -$(USR_PLAT_PLUGINS_LIBLINKS): $(PLAT_PLUGINS_DIRS) - $(RM) -r $@ ;\ - $(SYMLINK) $(MPXU_DYNLIB_DIR)/$(DYNLIB) $@ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/SB-tables.info b/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/SB-tables.info deleted file mode 100644 index 105a4d74ed..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/SB-tables.info +++ /dev/null @@ -1,379 +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" - * - * This file creates the system board structure - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -/* - * add a Devices table to RMD0 - */ -name:/frutree/chassis/RMD0/cdrom - TABLE Devices - ROW - PROP Class string r 0 "cdrom" - REFPROP _cdrom_ name:/platform/pci@1e,600000/ide@d/sd@0,0 - ENDROW - ENDTABLE - -/* - * add Devices table for the keyswitch - */ -name:/frutree/chassis/SYSCTRL - TABLE Devices - ROW - PROP Class string r 0 "keyswitch" - REFPROP _keyswitch_ name:RMCLOMV/keyswitch - ENDROW - ENDTABLE - -/* - * add a Devices table to the system-board - */ -name:/frutree/chassis/MB/system-board - TABLE Devices - ROW - PROP Class string r 0 "voltage-sensor" - REFPROP _voltage-sensor_ name:RMCLOMV/mb_v_+3v3 - ENDROW - ROW - PROP Class string r 0 "voltage-sensor" - REFPROP _voltage-sensor_ name:RMCLOMV/mb_v_+5v - ENDROW - ROW - PROP Class string r 0 "voltage-sensor" - REFPROP _voltage-sensor_ name:RMCLOMV/mb_v_+12v - ENDROW - ROW - PROP Class string r 0 "voltage-sensor" - REFPROP _voltage-sensor_ name:RMCLOMV/mb_v_-12v - ENDROW - ROW - PROP Class string r 0 "voltage-sensor" - REFPROP _voltage-sensor_ name:RMCLOMV/mb_v_vtt - ENDROW - ROW - PROP Class string r 0 "voltage-sensor" - REFPROP _voltage-sensor_ name:RMCLOMV/mb_v_gbe_+2v5 - ENDROW - ROW - PROP Class string r 0 "voltage-sensor" - REFPROP _voltage-sensor_ name:RMCLOMV/mb_v_gbe_core - ENDROW - ROW - PROP Class string r 0 "voltage-sensor" - REFPROP _voltage-sensor_ name:RMCLOMV/mb_v_vcctm - ENDROW - ROW - PROP Class string r 0 "voltage-sensor" - REFPROP _voltage-sensor_ name:RMCLOMV/mb_v_+2v5 - ENDROW - ROW - PROP Class string r 0 "voltage-sensor" - REFPROP _voltage-sensor_ name:RMCLOMV/mb_v_+1v5 - ENDROW - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:RMCLOMV/mb_t_enc - ENDROW - ROW - PROP Class string r 0 "current-indicator" - REFPROP _current-indicator_ name:RMCLOMV/mb_ff_scsi - ENDROW - ROW - PROP Class string r 0 "current-indicator" - REFPROP _current-indicator_ name:RMCLOMV/mb_ff_usb0 - ENDROW - ROW - PROP Class string r 0 "current-indicator" - REFPROP _current-indicator_ name:RMCLOMV/mb_ff_usb1 - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/mb_act - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/mb_service - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/mb_locate - ENDROW - ROW - PROP Class string r 0 "keyswitch" - REFPROP _keyswitch_ name:RMCLOMV/keyswitch - ENDROW - ROW - PROP Class string r 0 "alarm_critical" - REFPROP _led_ name:RMCLOMV/alarm_critical - ENDROW - ROW - PROP Class string r 0 "alarm_major" - REFPROP _led_ name:RMCLOMV/alarm_major - ENDROW - ROW - PROP Class string r 0 "alarm_minor" - REFPROP _led_ name:RMCLOMV/alarm_minor - ENDROW - ROW - PROP Class string r 0 "alarm_user" - REFPROP _led_ name:RMCLOMV/alarm_user - ENDROW - ENDTABLE - -/* - * add a Devices table to the battery - */ -name:/frutree/chassis/MB/system-board/BAT/battery - TABLE Devices - ROW - PROP Class string r 0 "voltage-sensor" - REFPROP _voltage-sensor_ name:RMCLOMV/mb_bat_v_bat - ENDROW - ENDTABLE - -/* - * add a Devices table to the service-processor - */ -name:/frutree/chassis/MB/system-board/SC/sc - TABLE Devices - ROW - PROP Class string r 0 "service-processor" - REFPROP _service-processor_ name:RMCLOMV - ENDROW - ENDTABLE - -/* - * fru parent for RMD0 - */ -name:/platform/pci@1e,600000/ide@d/sd@0,0 - REFPROP _fru_parent name:/frutree/chassis/RMD0/cdrom - -/* - * fru parents for mother-board sensors - */ -name:RMCLOMV/mb_v_+3v3 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_v_+5v - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_v_+12v - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_v_-12v - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_v_vtt - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_v_gbe_+2v5 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_v_gbe_core - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_v_vcctm - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_v_+2v5 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_v_+1v5 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_t_enc - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_ff_scsi - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_ff_usb0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_ff_usb1 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_act - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_service - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_locate - REFPROP _fru_parent name:/frutree/chassis/MB/system-board - PROP IsLocator string r 0 "true" - PROP LocatorName string r 0 "system" -name:RMCLOMV/keyswitch - REFPROP _fru_parent name:/frutree/chassis/MB/system-board - PROP Label string r 0 "SYSCTRL" -name:RMCLOMV/mb_bat_v_bat - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/BAT/battery -name:RMCLOMV/alarm_critical - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/alarm_major - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/alarm_minor - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/alarm_user - REFPROP _fru_parent name:/frutree/chassis/MB/system-board - -/* - * add Devices tables for cpu-related sensors - */ -name:/frutree/chassis/MB/system-board/P0/cpu - TABLE Devices - ROW - PROP Class string r 0 "cpu" - REFPROP _cpu_ name:/platform/SUNW,UltraSPARC-IIIi@0,0 - ENDROW - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:RMCLOMV/mb_p0_t_core - ENDROW - ROW - PROP Class string r 0 "voltage-sensor" - REFPROP _voltage-sensor_ name:RMCLOMV/mb_p0_v_core - ENDROW - ENDTABLE - -name:RMCLOMV/mb_p0_t_core - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/P0/cpu -name:RMCLOMV/mb_p0_v_core - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/P0/cpu - -name:/frutree/chassis/MB/system-board/P1/cpu - TABLE Devices - ROW - PROP Class string r 0 "cpu" - REFPROP _cpu_ name:/platform/SUNW,UltraSPARC-IIIi@1,0 - ENDROW - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:RMCLOMV/mb_p1_t_core - ENDROW - ROW - PROP Class string r 0 "voltage-sensor" - REFPROP _voltage-sensor_ name:RMCLOMV/mb_p1_v_core - ENDROW - ENDTABLE - -name:RMCLOMV/mb_p1_t_core - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/P1/cpu -name:RMCLOMV/mb_p1_v_core - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/P1/cpu - -name:/frutree/chassis/MB/system-board/P0/cpu/B0/bank/D0/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@0,0/memory-module-group?ID=0/memory-module?ID=0 - ENDROW - ENDTABLE -name:/frutree/chassis/MB/system-board/P0/cpu/B0/bank/D1/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@0,0/memory-module-group?ID=0/memory-module?ID=1 - ENDROW - ENDTABLE -name:/frutree/chassis/MB/system-board/P0/cpu/B1/bank/D0/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@0,0/memory-module-group?ID=1/memory-module?ID=0 - ENDROW - ENDTABLE -name:/frutree/chassis/MB/system-board/P0/cpu/B1/bank/D1/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@0,0/memory-module-group?ID=1/memory-module?ID=1 - ENDROW - ENDTABLE -name:/frutree/chassis/MB/system-board/P1/cpu/B0/bank/D0/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@1,0/memory-module-group?ID=0/memory-module?ID=0 - ENDROW - ENDTABLE -name:/frutree/chassis/MB/system-board/P1/cpu/B0/bank/D1/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@1,0/memory-module-group?ID=0/memory-module?ID=1 - ENDROW - ENDTABLE -name:/frutree/chassis/MB/system-board/P1/cpu/B1/bank/D0/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@1,0/memory-module-group?ID=1/memory-module?ID=0 - ENDROW - ENDTABLE -name:/frutree/chassis/MB/system-board/P1/cpu/B1/bank/D1/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@1,0/memory-module-group?ID=1/memory-module?ID=1 - ENDROW - ENDTABLE - -/* - * add tables and fru parents for cpu fans - */ -name:/frutree/chassis/MB/system-board/P0/cpu/F0/fan-unit - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/mb_p0_f0_rs - ENDROW - ENDTABLE -name:/frutree/chassis/MB/system-board/P0/cpu/F1/fan-unit - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/mb_p0_f1_rs - ENDROW - ENDTABLE -name:/frutree/chassis/MB/system-board/P1/cpu/F0/fan-unit - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/mb_p1_f0_rs - ENDROW - ENDTABLE -name:/frutree/chassis/MB/system-board/P1/cpu/F1/fan-unit - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/mb_p1_f1_rs - ENDROW - ENDTABLE - -name:RMCLOMV/mb_p0_f0_rs - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/P0/cpu/F0/fan-unit -name:RMCLOMV/mb_p0_f1_rs - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/P0/cpu/F1/fan-unit -name:RMCLOMV/mb_p1_f0_rs - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/P1/cpu/F0/fan-unit -name:RMCLOMV/mb_p1_f1_rs - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/P1/cpu/F1/fan-unit diff --git a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_HDD0.info b/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_HDD0.info deleted file mode 100644 index ee6d7bec01..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_HDD0.info +++ /dev/null @@ -1,74 +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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_HDD0_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_HDD0_data.info b/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_HDD0_data.info deleted file mode 100644 index 24f5da14e6..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_HDD0_data.info +++ /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, 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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -name:/frutree/chassis/HDD0/disk -TABLE Devices -ROW -PROP Class string r 0 "block" -REFPROP _block_ name:/platform/pci@1c,600000/scsi@2/sd@0,0 -ENDROW -ROW -PROP Class string r 0 "block" -REFPROP _block_ name:/platform/pci@1c,600000/LSILogic,sas@1/sd@0,0 -ENDROW -ENDTABLE - -name:/platform/pci@1c,600000/scsi@2/sd@0,0 - REFPROP _fru_parent name:/frutree/chassis/HDD0/disk -name:/platform/pci@1c,600000/LSILogic,sas@1/sd@0,0 - REFPROP _fru_parent name:/frutree/chassis/HDD0/disk -name:/frutree/chassis/HDD0/disk - PROP OperationalStatus string r 0 "present" diff --git a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_HDD1.info b/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_HDD1.info deleted file mode 100644 index b0c89a3705..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_HDD1.info +++ /dev/null @@ -1,74 +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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_HDD1_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_HDD1_data.info b/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_HDD1_data.info deleted file mode 100644 index 1a78407ddc..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_HDD1_data.info +++ /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, 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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -name:/frutree/chassis/HDD1/disk -TABLE Devices -ROW -PROP Class string r 0 "block" -REFPROP _block_ name:/platform/pci@1c,600000/scsi@2/sd@1,0 -ENDROW -ROW -PROP Class string r 0 "block" -REFPROP _block_ name:/platform/pci@1c,600000/LSILogic,sas@1/sd@1,0 -ENDROW -ENDTABLE - -name:/platform/pci@1c,600000/scsi@2/sd@1,0 - REFPROP _fru_parent name:/frutree/chassis/HDD1/disk -name:/platform/pci@1c,600000/LSILogic,sas@1/sd@1,0 - REFPROP _fru_parent name:/frutree/chassis/HDD1/disk -name:/frutree/chassis/HDD1/disk - PROP OperationalStatus string r 0 "present" diff --git a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_HDD2.info b/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_HDD2.info deleted file mode 100644 index 1319d6513e..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_HDD2.info +++ /dev/null @@ -1,74 +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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_HDD2_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_HDD2_data.info b/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_HDD2_data.info deleted file mode 100644 index b0d7d25d82..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_HDD2_data.info +++ /dev/null @@ -1,82 +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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -name:/frutree/chassis/HDD2/disk -TABLE Devices -ROW -PROP Class string r 0 "block" -REFPROP _block_ name:/platform/pci@1c,600000/scsi@2/sd@2,0 -ENDROW -ENDTABLE - -name:/platform/pci@1c,600000/scsi@2/sd@2,0 - REFPROP _fru_parent name:/frutree/chassis/HDD2/disk -name:/frutree/chassis/HDD2/disk - PROP OperationalStatus string r 0 "present" diff --git a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_HDD3.info b/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_HDD3.info deleted file mode 100644 index 213d68e54f..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_HDD3.info +++ /dev/null @@ -1,74 +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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_HDD3_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_HDD3_data.info b/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_HDD3_data.info deleted file mode 100644 index 9c50b55950..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_HDD3_data.info +++ /dev/null @@ -1,82 +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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -name:/frutree/chassis/HDD3/disk -TABLE Devices -ROW -PROP Class string r 0 "block" -REFPROP _block_ name:/platform/pci@1c,600000/scsi@2/sd@3,0 -ENDROW -ENDTABLE - -name:/platform/pci@1c,600000/scsi@2/sd@3,0 - REFPROP _fru_parent name:/frutree/chassis/HDD3/disk -name:/frutree/chassis/HDD3/disk - PROP OperationalStatus string r 0 "present" diff --git a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_PS0.info b/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_PS0.info deleted file mode 100644 index 6ef5a64d21..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_PS0.info +++ /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, 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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -/* create a /platform node for the seeprom */ -name:/platform/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,b0 - PROP binding-name string r 0 "i2c-at24c64" - PROP driver-name string r 0 "seeprom" - PROP devfs-path string r 0 "/pci@1e,600000/isa@7/i2c/power-supply-fru-prom" - PROP compatible string r 0 "i2c-at24c64" - PROP device_type string r 0 "fru-prom" - PROP UnitAddress string r 0 "0,b0" - -/* and then add /frutree node and cross-references */ -#include "fru_PS0_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_PS0_data.info b/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_PS0_data.info deleted file mode 100644 index 3783c522ec..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_PS0_data.info +++ /dev/null @@ -1,148 +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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -#ifndef RMCLOMV -#define RMCLOMV /platform/pci@1e,600000/isa@7/rmc-comm@0,3e8/SUNW,rmclomv -#endif /* RMCLOMV */ - -name:/frutree/chassis/PS0/power-supply - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,b0 -TABLE Devices -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps0_ff_uv -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps0_ff_ov -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps0_p_pwr -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps0_ff_pok -ENDROW -ROW -PROP Class string r 0 "current-indicator" -REFPROP _current-indicator_ name:RMCLOMV/ps0_ff_oc -ENDROW -ROW -PROP Class string r 0 "temperature-indicator" -REFPROP _temperature-indicator_ name:RMCLOMV/ps0_ff_ot -ENDROW -ROW -PROP Class string r 0 "fan" -REFPROP _fan_ name:RMCLOMV/ps0_ff_fan -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps0_act -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps0_service -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps0_ok2rm -ENDROW -ENDTABLE - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,b0 - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply - PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,b0:power-supply-fru-prom" - -name:RMCLOMV/ps0_ff_uv - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_ff_ov - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_p_pwr - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_ff_pok - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_ff_oc - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_ff_ot - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_ff_fan - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_act - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_service - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_ok2rm - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_f4 - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_f5 - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply diff --git a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_PS1.info b/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_PS1.info deleted file mode 100644 index 83c3657dbc..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_PS1.info +++ /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, 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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -/* create a /platform node for the seeprom */ -name:/platform/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,a4 - PROP binding-name string r 0 "i2c-at24c64" - PROP driver-name string r 0 "seeprom" - PROP devfs-path string r 0 "/pci@1e,600000/isa@7/i2c/power-supply-fru-prom" - PROP compatible string r 0 "i2c-at24c64" - PROP device_type string r 0 "fru-prom" - PROP UnitAddress string r 0 "0,a4" - -/* and then add /frutree node and cross-references */ -#include "fru_PS1_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_PS1_data.info b/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_PS1_data.info deleted file mode 100644 index ca0cc9f130..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_PS1_data.info +++ /dev/null @@ -1,144 +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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS1 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -#ifndef RMCLOMV -#define RMCLOMV /platform/pci@1e,600000/isa@7/rmc-comm@0,3e8/SUNW,rmclomv -#endif /* RMCLOMV */ - -name:/frutree/chassis/PS1/power-supply - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,a4 -TABLE Devices -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps1_ff_uv -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps1_ff_ov -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps1_p_pwr -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps1_ff_pok -ENDROW -ROW -PROP Class string r 0 "current-indicator" -REFPROP _current-indicator_ name:RMCLOMV/ps1_ff_oc -ENDROW -ROW -PROP Class string r 0 "temperature-indicator" -REFPROP _temperature-indicator_ name:RMCLOMV/ps1_ff_ot -ENDROW -ROW -PROP Class string r 0 "fan" -REFPROP _fan_ name:RMCLOMV/ps1_ff_fan -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps1_act -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps1_service -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps1_ok2rm -ENDROW -ENDTABLE - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,a4 - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply - PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,a4:power-supply-fru-prom" - -name:RMCLOMV/ps1_ff_uv - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply -name:RMCLOMV/ps1_ff_ov - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply -name:RMCLOMV/ps1_p_pwr - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply -name:RMCLOMV/ps1_ff_pok - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply -name:RMCLOMV/ps1_ff_oc - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply -name:RMCLOMV/ps1_ff_ot - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply -name:RMCLOMV/ps1_ff_fan - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply -name:RMCLOMV/ps1_act - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply -name:RMCLOMV/ps1_service - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply -name:RMCLOMV/ps1_ok2rm - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply diff --git a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_SC.info b/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_SC.info deleted file mode 100644 index 4a3b122b91..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_SC.info +++ /dev/null @@ -1,75 +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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_SC_data.info" -#include "SB-tables.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_SC_data.info b/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_SC_data.info deleted file mode 100644 index f3d7ee9edf..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_SC_data.info +++ /dev/null @@ -1,247 +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" - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -/* - * There are a lot of nodes below the rmclomv node, define a shortname - */ -#define RMCLOMV /platform/pci@1e,600000/isa@7/rmc-comm@0,3e8/SUNW,rmclomv - -/* - * add disk leds - */ -name:/frutree/chassis/HDD0 - TABLE Devices - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd0_act - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd0_service - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd0_ok2rm - ENDROW - ENDTABLE - -name:RMCLOMV/hdd0_act - REFPROP _location_parent name:/frutree/chassis/HDD0 -name:RMCLOMV/hdd0_service - REFPROP _location_parent name:/frutree/chassis/HDD0 -name:RMCLOMV/hdd0_ok2rm - REFPROP _location_parent name:/frutree/chassis/HDD0 - -name:/frutree/chassis/HDD1 - TABLE Devices - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd1_act - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd1_service - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd1_ok2rm - ENDROW - ENDTABLE - -name:RMCLOMV/hdd1_act - REFPROP _location_parent name:/frutree/chassis/HDD1 -name:RMCLOMV/hdd1_service - REFPROP _location_parent name:/frutree/chassis/HDD1 -name:RMCLOMV/hdd1_ok2rm - REFPROP _location_parent name:/frutree/chassis/HDD1 - -name:/frutree/chassis/HDD2 - TABLE Devices - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd2_act - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd2_service - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd2_ok2rm - ENDROW - ENDTABLE - -name:RMCLOMV/hdd2_act - REFPROP _location_parent name:/frutree/chassis/HDD2 -name:RMCLOMV/hdd2_service - REFPROP _location_parent name:/frutree/chassis/HDD2 -name:RMCLOMV/hdd2_ok2rm - REFPROP _location_parent name:/frutree/chassis/HDD2 - -name:/frutree/chassis/HDD3 - TABLE Devices - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd3_act - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd3_service - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd3_ok2rm - ENDROW - ENDTABLE - -name:RMCLOMV/hdd3_act - REFPROP _location_parent name:/frutree/chassis/HDD3 -name:RMCLOMV/hdd3_service - REFPROP _location_parent name:/frutree/chassis/HDD3 -name:RMCLOMV/hdd3_ok2rm - REFPROP _location_parent name:/frutree/chassis/HDD3 - -/* add disk Device tables and _fru_parent refprops */ -#include "fru_HDD0_data.info" -#include "fru_HDD1_data.info" -#include "fru_HDD2_data.info" -#include "fru_HDD3_data.info" - -name:/frutree/chassis/HCM/hcm - TABLE Devices - ROW - PROP Class string r 0 "hcm" - REFPROP _hcm_ name:/platform/pci@1c,600000/cpu?DeviceID=1 - ENDROW - ENDTABLE - -/* - * power supplies - */ -#include "fru_PS0_data.info" -#include "fru_PS1_data.info" - -/* - * USB ports - */ -#include "fru_usb-a-1_data.info" -#include "fru_usb-a-2_data.info" - -/* - * add tables and fru parents for system fans - */ -name:/frutree/chassis/F0/fan-unit - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/f0_rs - ENDROW - ENDTABLE -name:/frutree/chassis/F1/fan-unit - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/f1_rs - ENDROW - ENDTABLE -name:/frutree/chassis/F2/fan-unit - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/f2_rs - ENDROW - ENDTABLE -name:/frutree/chassis/F3/fan-unit - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/f3_rs - ENDROW - ENDTABLE - -name:RMCLOMV/f0_rs - REFPROP _fru_parent name:/frutree/chassis/F0/fan-unit -name:RMCLOMV/f1_rs - REFPROP _fru_parent name:/frutree/chassis/F1/fan-unit -name:RMCLOMV/f2_rs - REFPROP _fru_parent name:/frutree/chassis/F2/fan-unit -name:RMCLOMV/f3_rs - REFPROP _fru_parent name:/frutree/chassis/F3/fan-unit - -/* - * Sas_controller - */ -name:/frutree/chassis/SASPCI/saspci - TABLE Devices - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:/platform/pci@1e,600000/isa@7/rmc-comm@0,3e8/SUNW,rmclomv/sas_controller - ENDROW - ENDTABLE -name:/platform/pci@1e,600000/isa@7/rmc-comm@0,3e8/SUNW,rmclomv/sas_controller - REFPROP _fru_parent name:/frutree/chassis/SASPCI/saspci - diff --git a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_usb-a-1.info b/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_usb-a-1.info deleted file mode 100644 index f6fd322c00..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_usb-a-1.info +++ /dev/null @@ -1,74 +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 2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICLEVENT_SYSEVENT_DEVICE_ADDED event for USB0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_usb-a-1_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_usb-a-1_data.info b/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_usb-a-1_data.info deleted file mode 100644 index 22cfb603cc..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_usb-a-1_data.info +++ /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, 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 2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICLEVENT_SYSEVENT_DEVICE_ADDED event for USB0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -_class:/jbus/pci@1e,600000/usb@a/picl?bus-addr=1 - REFPROP _location_parent name:/frutree/chassis/USB0 diff --git a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_usb-a-2.info b/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_usb-a-2.info deleted file mode 100644 index 26e236f432..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_usb-a-2.info +++ /dev/null @@ -1,74 +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 2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICLEVENT_SYSEVENT_DEVICE_ADDED event for USB1 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_usb-a-2_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_usb-a-2_data.info b/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_usb-a-2_data.info deleted file mode 100644 index e7e6562ea6..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/fru_usb-a-2_data.info +++ /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, 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 2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICLEVENT_SYSEVENT_DEVICE_ADDED event for USB1 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -_class:/jbus/pci@1e,600000/usb@a/picl?bus-addr=2 - REFPROP _location_parent name:/frutree/chassis/USB1 diff --git a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/piclfrudr.c b/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/piclfrudr.c deleted file mode 100644 index 28adb31207..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/mpxu/frudr/piclfrudr.c +++ /dev/null @@ -1,2987 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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) 2002, 2010, Oracle and/or its affiliates. All rights reserved. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "libdevice.h" -#include "picldefs.h" -#include -#include -#include - -/* - * Plugin registration entry points - */ -static void piclfrudr_register(void); -static void piclfrudr_init(void); -static void piclfrudr_fini(void); -static void rmc_state_event(void); -static void seattle_setleds(void); -static void boston_set_frontleds(const char *, int); -static void boston_set_rearleds(const char *, int); - -#pragma init(piclfrudr_register) - -static picld_plugin_reg_t my_reg_info = { - PICLD_PLUGIN_VERSION_1, - PICLD_PLUGIN_CRITICAL, - "SUNW_MPXU_frudr", - piclfrudr_init, - piclfrudr_fini, -}; - -/* - * Log message texts - */ -#define EM_THREAD_CREATE_FAILED gettext("piclfrudr: pthread_create failed: %s") -#define DELETE_PROP_FAIL gettext("ptree_delete_prop failed: %d") -#define EM_DI_INIT_FAIL gettext("piclfrudr: di_init failed: %s") -#define PROPINFO_FAIL gettext("ptree_init_propinfo %s failed: %d") -#define ADD_NODE_FAIL gettext("ptree_create_and_add_node %s failed: %d") -#define ADD_TBL_ENTRY_FAIL gettext("piclfrudr: cannot add entry to table") -#define EM_POLL_FAIL gettext("piclfrudr: poll() failed: %s") -#define ADD_PROP_FAIL gettext("ptree_create_and_add_prop %s failed: %d") -#define EM_MUTEX_FAIL gettext("piclfrudr: pthread_mutex_lock returned: %s") -#define EM_UNK_FRU gettext("piclfrudr: Fru removed event for unknown node") -#define PARSE_CONF_FAIL gettext("parse config file %s failed") -#define EM_NO_SC_DEV gettext("piclfrudr: failed to locate SC device node") -#define EM_NO_SYSINFO gettext("piclfrudr: failed to get SC sysinfo: %s") - -/* - * PICL property values - */ -#define PICL_PROPVAL_ON "ON" -#define PICL_PROPVAL_OFF "OFF" - -/* - * Local defines - */ -#define SEEPROM_DRIVER_NAME "seeprom" -#define FRUTREE_PATH "/frutree" -#define CHASSIS_LOC_PATH "/frutree/chassis/%s" -#define SYS_BOARD_PATH "/frutree/chassis/MB/system-board/%s" -#define SEATTLE1U_HDDBP_PATH \ - "/frutree/chassis/MB/system-board/HDDBP/disk-backplane-1/%s" -#define SEATTLE2U_HDDBP_PATH \ - "/frutree/chassis/MB/system-board/HDDBP/disk-backplane-3/%s" -#define BOSTON_HDDBP_PATH \ - "/frutree/chassis/MB/system-board/HDDCNTRL/disk-controller/HDDBP" \ - "/disk-backplane-8/%s" - -#define CONFFILE_PREFIX "fru_" -#define CONFFILE_SUFFIX ".conf" -#define CONFFILE_FRUTREE "piclfrutree.conf" -#define PS_NAME "PS" -#define PS_NAME_LEN 2 -#define PS_FRU_NAME "power-supply" -#define PS_PLATFORM_NAME "power-supply-fru-prom" -#define DISK_NAME "HDD" -#define DISK_NAME_LEN 3 -#define DISK_FRU_NAME "disk" -#define SCC_NAME "SCC" -#define SCC_NAME_LEN 3 -#define SCC_FRU_NAME "scc" -#define RMC_NAME "SC" -#define RMC_NAME_LEN 2 -#define RMC_FRU_NAME "sc" -#define FT_NAME "FT" -#define FT_NAME_LEN 2 -#define F0_NAME "F0" -#define F0_NAME_LEN 2 -#define F1_NAME "F1" -#define F1_NAME_LEN 2 -#define FT_FRU_NAME "fan-tray" -#define FT_FRU_NAME_LEN 8 -#define FT_ID_BUFSZ (FT_NAME_LEN + 2) -#define DEV_PREFIX "/devices" -#define ENXS_FRONT_SRVC_LED 0x20 -#define ENXS_FRONT_ACT_LED 0x10 -#define ENXS_REAR_SRVC_LED 0x20 -#define ENXS_REAR_ACT_LED 0x10 -#define ENTS_SRVC_LED 0x20 -#define ENTS_ACT_LED 0x10 -#define V440_SRVC_LED 0x2 -#define V440_ACT_LED 0x1 -#define BOSTON_FRONT_SRVC_LED 0x2 -#define BOSTON_FRONT_ACT_LED 0x4 -#define BOSTON_FRONT_CLEAR_DIR 0x0 -#define BOSTON_FRONT_CLEAR_POL 0x0 -#define BOSTON_FRONT_LED_MASK 0xffffffff -#define BOSTON_REAR_SRVC_LED 0x8000 -#define BOSTON_REAR_ACT_LED 0x2000 -#define BOSTON_REAR_CLEAR_POL 0x0000 -#define BOSTON_REAR_LED_MASK 0xe000 - -/* - * PSU defines - */ -#define PSU_I2C_BUS_DEV "/devices/pci@1e,600000/isa@7/i2c@0,320:devctl" -#define PSU_DEV \ - "/devices/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,%x" -#define PSU_PLATFORM "/platform/pci@1e,600000/isa@7/i2c@0,320" -#define PS0_ADDR ((sys_platform == PLAT_CHALUPA19) ? 0xc0 : 0xb0) -#define PS1_ADDR ((sys_platform == PLAT_CHALUPA19) ? 0xc2 : 0xa4) -#define PS2_ADDR 0x70 -#define PS3_ADDR 0x72 -#define PS0_UNITADDR ((sys_platform == PLAT_CHALUPA19) ? "0,c0" : "0,b0") -#define PS1_UNITADDR ((sys_platform == PLAT_CHALUPA19) ? "0,c2" : "0,a4") -#define PS2_UNITADDR "0,70" -#define PS3_UNITADDR "0,72" -#define PS0_NAME "PS0" -#define PS1_NAME "PS1" -#define PS2_NAME "PS2" -#define PS3_NAME "PS3" -#define PSU0_NAME "PSU0" -#define PSU1_NAME "PSU1" -#define PSU2_NAME "PSU2" -#define PSU3_NAME "PSU3" -#define PS_DEVICE_NAME "power-supply-fru-prom" -#define PSU_COMPATIBLE "i2c-at24c64" - -/* - * Seattle/Boston PSU defines - */ -#define SEATTLE_PSU_I2C_BUS_DEV "/devices/i2c@1f,530000:devctl" -#define SEATTLE_PSU_DEV \ - "/devices/i2c@1f,530000/power-supply-fru-prom@0,%x" -#define SEATTLE_PSU_PLATFORM "/platform/i2c@1f,530000" -#define SEATTLE_PS0_ADDR 0x6c -#define SEATTLE_PS1_ADDR 0x6e -#define SEATTLE_PS0_UNITADDR "0,6c" -#define SEATTLE_PS1_UNITADDR "0,6e" -#define SEATTLE_PSU_COMPATIBLE "i2c-at34c02" -#define BOSTON_PSU_I2C_BUS_DEV "/devices/i2c@1f,520000:devctl" -#define BOSTON_PSU_DEV \ - "/devices/i2c@1f,520000/power-supply-fru-prom@0,%x" -#define BOSTON_PSU_PLATFORM "/platform/i2c@1f,520000" -#define BOSTON_PS0_ADDR 0x24 -#define BOSTON_PS1_ADDR 0x32 -#define BOSTON_PS2_ADDR 0x52 -#define BOSTON_PS3_ADDR 0x72 -#define BOSTON_PS0_UNITADDR "0,24" -#define BOSTON_PS1_UNITADDR "0,32" -#define BOSTON_PS2_UNITADDR "0,52" -#define BOSTON_PS3_UNITADDR "0,72" -#define BOSTON_PSU_COMPATIBLE "i2c-at34c02" - -/* - * Seattle fan-tray paths - */ -#define SEATTLE_FCB0_1U \ - "/frutree/chassis/MB/system-board/FIOB/front-io-board-1" \ - "/FCB0/fan-connector-board/%s" -#define SEATTLE_FCB1_1U \ - "/frutree/chassis/MB/system-board/FIOB/front-io-board-1" \ - "/FCB1/fan-connector-board/%s" -#define SEATTLE_PDB_1U \ - "/frutree/chassis/PDB/power-distribution-board/%s" -#define SEATTLE_FCB0_2U \ - "/frutree/chassis/MB/system-board/FIOB/front-io-board-2" \ - "/FCB0/fan-connector-board/%s" -#define SEATTLE_FCB1_2U \ - "/frutree/chassis/MB/system-board/FIOB/front-io-board-2" \ - "/FCB1/fan-connector-board/%s" -#define SEATTLE_PDB_2U \ - "/frutree/chassis/PDB/power-distribution-board" \ - "/HDDFB/fan-connector-board/%s" - -/* - * disk defines - */ -#define REMOK_LED "OK2RM" -#define FAULT_LED "SERVICE" -#define PLATFORMLEN 9 -#define N_DISKS 8 -#define N_CHALUPA_DISKS 4 -#define N_ENTS_DISKS 8 -#define N_MPXU_DISKS 4 -#define N_EN19_DISKS 2 -#define DISK_POLL_TIME 5000 -/* For V440 RAID policy */ -#define V440_DISK_DEVCTL "/devices/pci@1f,700000/scsi@2:devctl" - -/* - * Seattle/Boston disk defines - */ -#define N_SEATTLE1U_DISKS 2 -#define N_SEATTLE2U_DISKS 4 -#define N_BOSTON_DISKS 8 -#define SEATTLE_DISK_DEVCTL \ - "/devices/pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1:devctl" -#define BOSTON_DISK_DEVCTL_1068X \ - "/devices/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@1:devctl" -#define BOSTON_DISK_DEVCTL_1068E \ - "/devices/pci@1e,600000/pci@0/pci@2/scsi@0:devctl" - -/* - * led defines - */ -#define ENXS_LED_DIR "/devices/pci@1e,600000/isa@7/i2c@0,320/" -#define ENXS_FRONT_LEDS "gpio@0,70:" -#define ENXS_REAR_LEDS ENXS_LED_DIR "gpio@0,44:port_1" - -#define ENTS_LED_DIR "/devices/pci@1e,600000/isa@7/i2c@0,320/" -#define ENTS_LEDS "gpio@0,70:" - -#define V440_LED_DIR "/devices/pci@1e,600000/isa@7/i2c@0,320/" -#define V440_LED_PATH V440_LED_DIR "gpio@0,48:port_0" - -/* - * Seattle/Boston led defines - */ -#define SEATTLE_LED_DEV "/devices/ebus@1f,464000/env-monitor@3,0:env-monitor0" -#define BOSTON_LED_DIR "/devices/i2c@1f,520000/" -#define BOSTON_FRONT_LED_PATH BOSTON_LED_DIR "gpio@0,3a:port_0" -#define BOSTON_REAR_LED_PATH BOSTON_LED_DIR "hardware-monitor@0,5c:adm1026" - -/* - * Seattle/Boston USB defines - */ -#define MAX_USB_PORTS 4 -#define USB_CONF_FILE_NAME "usb-a-" - -typedef struct id_props { - envmon_handle_t envhandle; - picl_prophdl_t volprop; -} id_props_t; - -typedef struct idp_lkup { - int maxnum; /* entries in array */ - int num; /* entries in use */ - id_props_t idp[1]; -} idp_lkup_t; - -/* - * table for mapping RMC handles to volatile property handles - */ -static idp_lkup_t *idprop = NULL; - -/* - * path names to system-controller device and fault led gpio - */ -static char *sc_device_name = NULL; -static char *bezel_leds = NULL; - -/* - * disk data - */ -static int disk_ready[N_DISKS]; -static char *disk_name[N_DISKS] = { "HDD0", "HDD1", "HDD2", "HDD3", - "HDD4", "HDD5", "HDD6", "HDD7" }; -static volatile boolean_t disk_leds_thread_ack = B_FALSE; -static volatile boolean_t disk_leds_thread_running = B_FALSE; -static pthread_t ledsthr_tid; -static pthread_attr_t ledsthr_attr; -static boolean_t ledsthr_created = B_FALSE; -static boolean_t g_mutex_init = B_FALSE; -static pthread_cond_t g_cv; -static pthread_cond_t g_cv_ack; -static pthread_mutex_t g_mutex; -static volatile boolean_t g_finish_now = B_FALSE; - -/* - * Boston platform-specific flag which tells us if we are using - * a LSI 1068X disk controller (0) or a LSI 1068E (1). - */ -static int boston_1068e_flag = 0; - -/* - * static strings - */ -static const char str_devfs_path[] = "devfs-path"; - -/* - * OperationalStatus property values - */ -static const char str_opst_present[] = "present"; -static const char str_opst_ok[] = "okay"; -static const char str_opst_faulty[] = "faulty"; -static const char str_opst_download[] = "download"; -static const char str_opst_unknown[] = "unknown"; -static size_t max_opst_len = sizeof (str_opst_download); - -/* - * forward reference - */ -static void opst_init(void); -static void add_op_status_by_name(const char *name, const char *child_name, - picl_prophdl_t *prophdl_p); -static void add_op_status_to_node(picl_nodehdl_t nodeh, - picl_prophdl_t *prophdl_p); -static int read_vol_data(ptree_rarg_t *r_arg, void *buf); -static int find_picl_handle(picl_prophdl_t proph); -static void disk_leds_init(void); -static void disk_leds_fini(void); -static void *disk_leds_thread(void *args); -static picl_nodehdl_t find_child_by_name(picl_nodehdl_t parh, char *name); -static void post_frudr_event(char *ename, picl_nodehdl_t parenth, - picl_nodehdl_t fruh); -static int add_prop_ref(picl_nodehdl_t nodeh, picl_nodehdl_t value, char *name); -static void remove_fru_parents(picl_nodehdl_t fruh); -static int get_node_by_class(picl_nodehdl_t nodeh, const char *classname, - picl_nodehdl_t *foundnodeh); -static int get_sys_controller_node(picl_nodehdl_t *nodeh); -static char *create_sys_controller_pathname(picl_nodehdl_t sysconh); -static char *create_bezel_leds_pathname(const char *dirpath, - const char *devname); -static void frudr_evhandler(const char *ename, const void *earg, - size_t size, void *cookie); -static void fru_add_handler(const char *ename, const void *earg, - size_t size, void *cookie); -static void frutree_evhandler(const char *ename, const void *earg, - size_t size, void *cookie); -static int create_table(picl_nodehdl_t fruhdl, picl_prophdl_t *tblhdlp, - char *tbl_name); -static int create_table_entry(picl_prophdl_t tblhdl, - picl_nodehdl_t refhdl, char *class); -static int create_i2c_node(char *ap_id); -static void delete_i2c_node(char *ap_id); -static int set_led(char *name, char *ptr, char *value); -static int ps_name_to_addr(char *name); -static char *ps_name_to_unitaddr(char *name); -static char *ps_apid_to_nodename(char *apid); -static void add_op_status(envmon_hpu_t *hpu, int *index); -static void get_fantray_path(char *ap_id, char *path, int bufsz); - -#define sprintf_buf2(buf, a1, a2) (void) snprintf(buf, sizeof (buf), a1, a2) - -/* - * Because this plugin is shared across different platforms, we need to - * distinguish for certain functionality - */ -#define PLAT_UNKNOWN (-1) -#define PLAT_ENXS 0 -#define PLAT_ENTS 1 -#define PLAT_CHALUPA 2 -#define PLAT_EN19 3 -#define PLAT_CHALUPA19 4 -#define PLAT_SALSA19 5 -#define PLAT_SEATTLE1U 6 -#define PLAT_SEATTLE2U 7 -#define PLAT_BOSTON 8 - -static int sys_platform; - -static void -get_platform() -{ - char platform[64]; - (void) sysinfo(SI_PLATFORM, platform, sizeof (platform)); - if (strcmp(platform, "SUNW,Sun-Fire-V250") == 0) - sys_platform = PLAT_ENTS; - else if (strcmp(platform, "SUNW,Sun-Fire-V440") == 0) - sys_platform = PLAT_CHALUPA; - else if (strcmp(platform, "SUNW,Sun-Fire-V210") == 0) - sys_platform = PLAT_ENXS; - else if (strcmp(platform, "SUNW,Sun-Fire-V240") == 0) - sys_platform = PLAT_ENXS; - else if (strcmp(platform, "SUNW,Netra-240") == 0) - sys_platform = PLAT_EN19; - else if (strcmp(platform, "SUNW,Netra-210") == 0) - sys_platform = PLAT_SALSA19; - else if (strcmp(platform, "SUNW,Netra-440") == 0) - sys_platform = PLAT_CHALUPA19; - else if (strcmp(platform, "SUNW,Sun-Fire-V215") == 0) - sys_platform = PLAT_SEATTLE1U; - else if (strcmp(platform, "SUNW,Sun-Fire-V245") == 0) - sys_platform = PLAT_SEATTLE2U; - else if (strcmp(platform, "SUNW,Sun-Fire-V445") == 0) - sys_platform = PLAT_BOSTON; - else - sys_platform = PLAT_UNKNOWN; -} - -/* - * This function is executed as part of .init when the plugin is - * dlopen()ed - */ -static void -piclfrudr_register(void) -{ - (void) picld_plugin_register(&my_reg_info); -} - -/* - * This function is the init entry point of the plugin. - * It initializes the /frutree tree - */ -static void -piclfrudr_init(void) -{ - picl_nodehdl_t sc_nodeh; - picl_nodehdl_t locationh; - picl_nodehdl_t childh; - char namebuf[PATH_MAX]; - - get_platform(); - - if (sc_device_name != NULL) { - free(sc_device_name); /* must have reen restarted */ - sc_device_name = NULL; - } - - if ((get_sys_controller_node(&sc_nodeh) != PICL_SUCCESS) || - ((sc_device_name = create_sys_controller_pathname(sc_nodeh)) == - NULL)) - syslog(LOG_ERR, EM_NO_SC_DEV); - - opst_init(); - disk_leds_init(); - - (void) ptree_register_handler(PICLEVENT_DR_AP_STATE_CHANGE, - frudr_evhandler, NULL); - (void) ptree_register_handler(PICL_FRU_ADDED, fru_add_handler, NULL); - (void) ptree_register_handler(PICLEVENT_SYSEVENT_DEVICE_ADDED, - frutree_evhandler, NULL); - - /* - * There is a window of opportunity for the RMC to deliver an event - * indicating a newly operable state just before we are listening for - * it. In this case, envmon will have missed setting up /platform - * and won't get a signal from frudr. So send it a PICL_FRU_ADDED just - * in case. - */ - - if ((sys_platform == PLAT_CHALUPA) || - (sys_platform == PLAT_CHALUPA19)) { - sprintf_buf2(namebuf, CHASSIS_LOC_PATH, RMC_NAME); - } else { - sprintf_buf2(namebuf, SYS_BOARD_PATH, RMC_NAME); - } - - if (ptree_get_node_by_path(namebuf, &locationh) != PICL_SUCCESS) - return; - if (ptree_get_propval_by_name(locationh, PICL_PROP_CHILD, - &childh, sizeof (picl_nodehdl_t)) != PICL_SUCCESS) - return; - post_frudr_event(PICL_FRU_ADDED, locationh, childh); -} - -static void -add_op_status_by_name(const char *name, const char *child_name, - picl_prophdl_t *prophdl_p) -{ - picl_nodehdl_t nodeh; - - if (ptree_get_node_by_path(name, &nodeh) != PICL_SUCCESS) { - return; - } - - if (ptree_get_propval_by_name(nodeh, PICL_PROP_CHILD, - &nodeh, sizeof (picl_nodehdl_t)) != PICL_SUCCESS) { - - if (child_name == NULL) - return; - /* - * create fru node of supplied name - */ - if (ptree_create_and_add_node(nodeh, child_name, - PICL_CLASS_FRU, &nodeh) != PICL_SUCCESS) - return; - } - - add_op_status_to_node(nodeh, prophdl_p); -} - -/* - * function to add a volatile property to a specified node - */ -static void -add_op_status_to_node(picl_nodehdl_t nodeh, picl_prophdl_t *prophdl_p) -{ - int err; - ptree_propinfo_t info; - picl_prophdl_t proph; - - err = ptree_init_propinfo(&info, PTREE_PROPINFO_VERSION, - PICL_PTYPE_CHARSTRING, PICL_VOLATILE | PICL_READ, max_opst_len, - PICL_PROP_OPERATIONAL_STATUS, read_vol_data, NULL); - - if (err == PICL_SUCCESS) { - if (ptree_get_prop_by_name(nodeh, PICL_PROP_OPERATIONAL_STATUS, - &proph) == PICL_SUCCESS) { - if (ptree_delete_prop(proph) == PICL_SUCCESS) - err = ptree_destroy_prop(proph); - } - } - - if ((err != PICL_SUCCESS) || ((err = ptree_create_and_add_prop(nodeh, - &info, NULL, prophdl_p)) != PICL_SUCCESS)) { - syslog(LOG_ERR, ADD_PROP_FAIL, PICL_PROP_OPERATIONAL_STATUS, - err); - return; - } -} - -/* - * Deliver volatile property value. - * prtpicl gets very upset if we fail this command, so if the property - * cannot be retrieved, return a status of unknown. - */ -static int -read_vol_data(ptree_rarg_t *r_arg, void *buf) -{ - picl_prophdl_t proph; - int index; - int envmon_fd; - int err; - envmon_hpu_t data; - - proph = r_arg->proph; - index = find_picl_handle(proph); - - if (index < 0) { - /* - * We drop memory of PSU op status handles in opst_init() - * when we get an RMC faulty event. We cannot access the - * status info in this circumstance, so returning "unknown" - * is appropriate. - */ - (void) strlcpy(buf, str_opst_unknown, max_opst_len); - return (PICL_SUCCESS); - } - - envmon_fd = open(sc_device_name, O_RDONLY); - - if (envmon_fd < 0) { - /* - * To get this far we must have succeeded with an earlier - * open, so this is an unlikely failure. It would be more - * helpful to indicate the nature of the failure, but we - * don't have the space to say much. Just return "unknown". - */ - (void) strlcpy(buf, str_opst_unknown, max_opst_len); - return (PICL_SUCCESS); - } - - data.id = idprop->idp[index].envhandle; - err = ioctl(envmon_fd, ENVMONIOCHPU, &data); - - if (err < 0) { - /* - * If we can't read the stats, "unknown" is a reasonable - * status to return. This one really shouldn't happen. - */ - (void) strlcpy(buf, str_opst_unknown, max_opst_len); - (void) close(envmon_fd); - return (PICL_SUCCESS); - } - - (void) close(envmon_fd); - - if (strncmp(data.id.name, DISK_NAME, DISK_NAME_LEN) == 0 && - data.fru_status == ENVMON_FRU_PRESENT) { - (void) strlcpy(buf, str_opst_present, max_opst_len); - return (PICL_SUCCESS); - } - - if (data.sensor_status != ENVMON_SENSOR_OK) { - (void) strlcpy(buf, str_opst_unknown, max_opst_len); - return (PICL_SUCCESS); - } - - (void) strlcpy(buf, - data.fru_status == ENVMON_FRU_PRESENT ? str_opst_ok : - data.fru_status == ENVMON_FRU_DOWNLOAD ? str_opst_download : - data.fru_status == ENVMON_FRU_FAULT ? str_opst_faulty : - str_opst_unknown, max_opst_len); - - return (PICL_SUCCESS); -} - -/* - * Function for explicitly turning on system leds - * for a failed/degraded RMC (SC). - */ -static void -solaris_setleds(const char *led_path, int leds) -{ - i2c_gpio_t gpio; - int fd = open(led_path, O_RDWR); - - if (fd < 0) - return; - - gpio.reg_val = (leds ^ 0xff); - gpio.reg_mask = 0xffffffff; - if (ioctl(fd, GPIO_SET_CONFIG, &gpio) == 0) { - gpio.reg_val = (leds ^ 0xff); - gpio.reg_mask = 0xffffffff; - (void) ioctl(fd, GPIO_SET_OUTPUT, &gpio); - } - (void) close(fd); -} - -/* - * Function for explicitly turning on system leds - * for a failed/degraded RMC (SC) on Seattle - */ -static void -seattle_setleds(void) -{ - int fd; - - fd = open(SEATTLE_LED_DEV, O_RDWR); - - if (fd < 0) - return; - - ioctl(fd, EPIC_SET_POWER_LED, (char *)0); - ioctl(fd, EPIC_SET_ALERT_LED, (char *)0); - (void) close(fd); -} - -/* - * Function for explicitly turning on the front system leds - * for a failed/degraded RMC (SC) on Boston - */ -static void -boston_set_frontleds(const char *led_path, int leds) -{ - i2c_gpio_t gpio; - int fd = open(led_path, O_RDWR); - - if (fd < 0) { - return; - } - - /* first clear the polarity */ - gpio.reg_val = BOSTON_FRONT_CLEAR_POL; - gpio.reg_mask = BOSTON_FRONT_LED_MASK; - if (ioctl(fd, GPIO_SET_POLARITY, &gpio) < 0) { - (void) close(fd); - return; - } - - /* now clear the direction */ - gpio.reg_val = BOSTON_FRONT_CLEAR_DIR; - gpio.reg_mask = BOSTON_FRONT_LED_MASK; - if (ioctl(fd, GPIO_SET_CONFIG, &gpio) < 0) { - (void) close(fd); - return; - } - - /* and light the leds */ - gpio.reg_val = leds; - gpio.reg_mask = BOSTON_FRONT_LED_MASK; - ioctl(fd, GPIO_SET_OUTPUT, &gpio); - (void) close(fd); -} - -/* - * Function for explicitly turning on the rear system leds - * for a failed/degraded RMC (SC) on Boston - */ -static void -boston_set_rearleds(const char *led_path, int leds) -{ - i2c_gpio_t gpio; - int fd = open(led_path, O_RDWR); - - if (fd < 0) { - return; - } - - /* first clear the polarity */ - gpio.reg_val = BOSTON_REAR_CLEAR_POL; - gpio.reg_mask = BOSTON_REAR_LED_MASK; - if (ioctl(fd, GPIO_SET_POLARITY, &gpio) < 0) { - (void) close(fd); - return; - } - - /* now set the direction */ - gpio.reg_val = BOSTON_REAR_LED_MASK; - gpio.reg_mask = BOSTON_REAR_LED_MASK; - if (ioctl(fd, GPIO_SET_CONFIG, &gpio) < 0) { - (void) close(fd); - return; - } - - /* and light the leds */ - gpio.reg_val = leds; - gpio.reg_mask = BOSTON_REAR_LED_MASK; - ioctl(fd, GPIO_SET_OUTPUT, &gpio); - (void) close(fd); -} - -static void -rmc_state_event(void) -{ - envmon_hpu_t hpu; - int res; - int fd = open(sc_device_name, O_RDONLY); - - if (fd < 0) - return; - - (void) strlcpy(hpu.id.name, RMC_NAME, sizeof (hpu.id.name)); - res = ioctl(fd, ENVMONIOCHPU, &hpu); - (void) close(fd); - - if ((res == 0) && (hpu.sensor_status == ENVMON_SENSOR_OK) && - ((hpu.fru_status & ENVMON_FRU_FAULT) != 0)) { - /* - * SC failed event - light the service led - * note that as Solaris is still running, - * the Solaris active led should be lit too. - */ - switch (sys_platform) { - case PLAT_ENXS: - case PLAT_SALSA19: - case PLAT_EN19: - solaris_setleds(ENXS_REAR_LEDS, - ENXS_REAR_SRVC_LED | ENXS_REAR_ACT_LED); - /* - * the device name for the bezel leds GPIO device - * tends to vary from Unix to Unix. Search for it. - */ - if (bezel_leds == NULL) { - bezel_leds = - create_bezel_leds_pathname(ENXS_LED_DIR, - ENXS_FRONT_LEDS); - } - if (bezel_leds == NULL) - return; - solaris_setleds(bezel_leds, - ENXS_FRONT_SRVC_LED | ENXS_FRONT_ACT_LED); - break; - case PLAT_ENTS: - /* - * the device name for the system leds gpio can vary - * as there are several similar gpio devices. Search - * for one with the desired address. - */ - if (bezel_leds == NULL) { - bezel_leds = - create_bezel_leds_pathname(ENTS_LED_DIR, - ENTS_LEDS); - } - if (bezel_leds == NULL) - return; - solaris_setleds(bezel_leds, - ENTS_SRVC_LED | ENTS_ACT_LED); - break; - case PLAT_CHALUPA: - case PLAT_CHALUPA19: - solaris_setleds(V440_LED_PATH, - V440_SRVC_LED | V440_ACT_LED); - break; - case PLAT_BOSTON: - /* set front leds */ - boston_set_frontleds(BOSTON_FRONT_LED_PATH, - BOSTON_FRONT_SRVC_LED | BOSTON_FRONT_ACT_LED); - /* and then the rear leds */ - boston_set_rearleds(BOSTON_REAR_LED_PATH, - BOSTON_REAR_SRVC_LED | BOSTON_REAR_ACT_LED); - break; - case PLAT_SEATTLE1U: - case PLAT_SEATTLE2U: - seattle_setleds(); - break; - default: - break; - } - } -} - -static int -find_picl_handle(picl_prophdl_t proph) -{ - int index; - - if (idprop == NULL) - return (-1); - - for (index = 0; index < idprop->num; index++) { - if (idprop->idp[index].volprop == proph) - return (index); - } - - return (-1); -} - -static int -find_vol_prop_by_name(const char *name) -{ - int index; - - if (idprop == NULL) - return (-1); - - for (index = 0; index < idprop->num; index++) { - if (strcmp(idprop->idp[index].envhandle.name, name) == 0) - return (index); - } - - return (-1); -} - -/* - * This function is the fini entry point of the plugin. - */ -static void -piclfrudr_fini(void) -{ - (void) ptree_unregister_handler(PICLEVENT_DR_AP_STATE_CHANGE, - frudr_evhandler, NULL); - (void) ptree_unregister_handler(PICL_FRU_ADDED, fru_add_handler, - NULL); - disk_leds_fini(); - if (idprop != NULL) { - free(idprop); - idprop = NULL; - } - if (sc_device_name != NULL) { - free(sc_device_name); - sc_device_name = NULL; - } -} - -/* - * subroutine for various functions. Finds immediate child of parh with - * requested name if present. Otherwise returns NULL. - */ -static picl_nodehdl_t -find_child_by_name(picl_nodehdl_t parh, char *name) -{ - picl_nodehdl_t nodeh; - int err; - char nodename[PICL_PROPNAMELEN_MAX]; - - err = ptree_get_propval_by_name(parh, PICL_PROP_CHILD, - &nodeh, sizeof (picl_nodehdl_t)); - if (err != PICL_SUCCESS) - return (NULL); - for (;;) { - err = ptree_get_propval_by_name(nodeh, PICL_PROP_NAME, nodename, - sizeof (nodename)); - if (err != PICL_SUCCESS) - return (NULL); - if (strcmp(name, nodename) == 0) { - return (nodeh); - } - err = ptree_get_propval_by_name(nodeh, PICL_PROP_PEER, - &nodeh, sizeof (picl_nodehdl_t)); - if (err != PICL_SUCCESS) - return (NULL); - } -} - -/* Creates a reference property for a given PICL node */ -static int -add_prop_ref(picl_nodehdl_t nodeh, picl_nodehdl_t value, char *name) -{ - picl_prophdl_t proph; - ptree_propinfo_t propinfo; - int err; - - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_REFERENCE, PICL_READ, sizeof (picl_nodehdl_t), name, - NULL, NULL); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, PROPINFO_FAIL, name, err); - return (err); - } - err = ptree_create_and_add_prop(nodeh, &propinfo, &value, &proph); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, ADD_PROP_FAIL, name, err); - return (err); - } - return (PICL_SUCCESS); -} - -/* create an entry in the specified table */ -static int -create_table_entry(picl_prophdl_t tblhdl, picl_nodehdl_t refhdl, char *class) -{ - int err; - ptree_propinfo_t prop; - picl_prophdl_t prophdl[2]; - - /* first column is class */ - prop.version = PTREE_PROPINFO_VERSION; - prop.piclinfo.type = PICL_PTYPE_CHARSTRING; - prop.piclinfo.accessmode = PICL_READ; - prop.piclinfo.size = PICL_CLASSNAMELEN_MAX; - prop.read = NULL; - prop.write = NULL; - (void) strlcpy(prop.piclinfo.name, PICL_PROP_CLASS, - sizeof (prop.piclinfo.name)); - err = ptree_create_prop(&prop, class, &prophdl[0]); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, ADD_TBL_ENTRY_FAIL, err); - return (err); - } - - /* second column is reference property */ - prop.version = PTREE_PROPINFO_VERSION; - prop.piclinfo.type = PICL_PTYPE_REFERENCE; - prop.piclinfo.accessmode = PICL_READ; - prop.piclinfo.size = sizeof (picl_nodehdl_t); - prop.read = NULL; - prop.write = NULL; - sprintf_buf2(prop.piclinfo.name, "_%s_", class); - err = ptree_create_prop(&prop, &refhdl, &prophdl[1]); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, ADD_TBL_ENTRY_FAIL, err); - return (err); - } - - /* add row to table */ - err = ptree_add_row_to_table(tblhdl, 2, prophdl); - if (err != PICL_SUCCESS) - syslog(LOG_ERR, ADD_TBL_ENTRY_FAIL, err); - return (err); -} - -/* create an empty table property */ -static int -create_table(picl_nodehdl_t fruhdl, picl_prophdl_t *tblhdlp, char *tbl_name) -{ - int err; - ptree_propinfo_t prop; - picl_prophdl_t tblprophdl; - - err = ptree_create_table(tblhdlp); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, ADD_PROP_FAIL, tbl_name, err); - return (err); - } - prop.version = PTREE_PROPINFO_VERSION; - prop.piclinfo.type = PICL_PTYPE_TABLE; - prop.piclinfo.accessmode = PICL_READ; - prop.piclinfo.size = sizeof (picl_prophdl_t); - prop.read = NULL; - prop.write = NULL; - (void) strlcpy(prop.piclinfo.name, tbl_name, - sizeof (prop.piclinfo.name)); - err = ptree_create_and_add_prop(fruhdl, &prop, tblhdlp, &tblprophdl); - if (err != PICL_SUCCESS) - syslog(LOG_ERR, ADD_PROP_FAIL, tbl_name, err); - return (err); -} - -/* - * The size of outfilename must be PATH_MAX - */ -static int -get_config_file(char *outfilename, char *fru) -{ - char nmbuf[SYS_NMLN]; - char pname[PATH_MAX]; - int dir; - - for (dir = 0; dir < 2; dir++) { - if (sysinfo(dir == 0 ? SI_PLATFORM : SI_MACHINE, - nmbuf, sizeof (nmbuf)) == -1) { - continue; - } - - (void) snprintf(pname, PATH_MAX, PICLD_PLAT_PLUGIN_DIRF, nmbuf); - (void) strlcat(pname, CONFFILE_PREFIX, PATH_MAX); - (void) strlcat(pname, fru, PATH_MAX); - (void) strlcat(pname, CONFFILE_SUFFIX, PATH_MAX); - - if (access(pname, R_OK) == 0) { - (void) strlcpy(outfilename, pname, PATH_MAX); - return (0); - } - } - - (void) snprintf(pname, PATH_MAX, "%s/%s%s%s", - PICLD_COMMON_PLUGIN_DIR, CONFFILE_PREFIX, fru, - CONFFILE_SUFFIX); - - if (access(pname, R_OK) == 0) { - (void) strlcpy(outfilename, pname, PATH_MAX); - return (0); - } - - return (-1); -} - -/* - * This helper function for Netra-440 fan tray removal removes - * the rmclomv-rooted nodes and their properties. - */ -static void -delete_node_and_props(picl_nodehdl_t hdl) -{ - picl_prophdl_t prop; - int err; - - do { - err = ptree_get_first_prop(hdl, &prop); - if (err == PICL_SUCCESS) { - if (ptree_delete_prop(prop) == PICL_SUCCESS) - (void) ptree_destroy_prop(prop); - } - } while (err == PICL_SUCCESS); - if (ptree_delete_node(hdl) == PICL_SUCCESS) - (void) ptree_destroy_node(hdl); -} - -static void -remove_fru_parents(picl_nodehdl_t fruh) -{ - char name[MAXPATHLEN]; - int retval; - picl_nodehdl_t nodeh; - picl_prophdl_t tableh; - picl_prophdl_t tblh; - picl_prophdl_t fruph; - picl_nodehdl_t childh; - int fanfru = 0; - - retval = ptree_get_propval_by_name(fruh, PICL_PROP_NAME, name, - sizeof (name)); - if (retval != PICL_SUCCESS) { - syslog(LOG_ERR, EM_UNK_FRU); - return; - } - - retval = ptree_get_prop_by_name(fruh, PICL_PROP_DEVICES, &tableh); - if (retval != PICL_SUCCESS) { - /* - * No Devices table. However on Seattle, Boston and - * Netra-440 (Chalupa19) (which support fan fru hotplug), - * the Devices table will be found under the child node (Fn) - * of the fru (fan-tray). - * Therefore, check the first child of the fru for the - * Devices table on these platforms before returning. - */ - switch (sys_platform) { - case PLAT_SEATTLE1U: - case PLAT_SEATTLE2U: - case PLAT_BOSTON: - if (strcmp(name, FT_FRU_NAME) != 0) - return; - fanfru = 1; - break; - case PLAT_CHALUPA19: - if (strncmp(name, F0_NAME, F0_NAME_LEN) && - strncmp(name, F1_NAME, F1_NAME_LEN)) - return; - fanfru = 1; - break; - default: - /* nothing to do */ - return; - } - retval = ptree_get_propval_by_name(fruh, - PICL_PROP_CHILD, &childh, sizeof (picl_nodehdl_t)); - if (retval != PICL_SUCCESS) - return; - retval = ptree_get_prop_by_name(childh, - PICL_PROP_DEVICES, &tableh); - if (retval != PICL_SUCCESS) - return; - } - - /* - * follow all reference properties in the second - * column of the table and delete any _fru_parent node - * at the referenced node. - */ - retval = ptree_get_propval(tableh, &tblh, sizeof (tblh)); - if (retval != PICL_SUCCESS) { - /* can't get value of table property */ - goto afterloop; - } - - /* get first col, first row */ - retval = ptree_get_next_by_col(tblh, &tblh); - if (retval != PICL_SUCCESS) { - /* no rows? */ - goto afterloop; - } - - /* - * starting at next col, get every entry in the column - */ - for (retval = ptree_get_next_by_row(tblh, &tblh); - retval == PICL_SUCCESS; - retval = ptree_get_next_by_col(tblh, &tblh)) { - /* - * should be a ref prop in our hands, - * get the target node handle - */ - retval = ptree_get_propval(tblh, &nodeh, - sizeof (nodeh)); - if (retval != PICL_SUCCESS) { - continue; - } - /* - * got the referenced node, has it got a - * _fru_parent property? - */ - retval = ptree_get_prop_by_name(nodeh, - PICL_REFPROP_FRU_PARENT, &fruph); - if (retval != PICL_SUCCESS) { - /* - * on Boston, Seattle and Netra-440 we should - * actually be looking for the _location_parent - * property for fan frus - */ - if (fanfru) { - retval = ptree_get_prop_by_name(nodeh, - PICL_REFPROP_LOC_PARENT, &fruph); - } - if (retval != PICL_SUCCESS) - continue; - } - /* - * got a _fru_parent node reference delete it - */ - if (ptree_delete_prop(fruph) == PICL_SUCCESS) - (void) ptree_destroy_prop(fruph); - - /* On Netra-440, extra clean-up is required for fan trays */ - if ((sys_platform == PLAT_CHALUPA19) && (fanfru)) { - /* remove the rmclomv node and its properties */ - delete_node_and_props(nodeh); - } - } -afterloop: - /* More Netra-440 fan tray clean-up */ - if ((sys_platform == PLAT_CHALUPA19) && (fanfru)) { - /* remove the fru's child's table */ - if (ptree_delete_prop(tableh) == PICL_SUCCESS) - (void) ptree_destroy_prop(tableh); - /* remove the child */ - if (ptree_delete_node(childh) == PICL_SUCCESS) - (void) ptree_destroy_node(childh); - } -} - -static void -remove_tables(picl_nodehdl_t rootnd) -{ - picl_nodehdl_t tableh; - int retval; - - retval = ptree_get_prop_by_name(rootnd, PICL_PROP_DEVICES, &tableh); - - if (retval == PICL_SUCCESS) { - /* - * found a Devices property, delete it - */ - if ((retval = ptree_delete_prop(tableh)) == PICL_SUCCESS) { - (void) ptree_destroy_prop(tableh); - } - } - - /* - * is there a child node? - */ - retval = ptree_get_propval_by_name(rootnd, PICL_PROP_CHILD, &rootnd, - sizeof (rootnd)); - - while (retval == PICL_SUCCESS) { - - remove_tables(rootnd); - - /* - * any siblings? - */ - retval = ptree_get_propval_by_name(rootnd, PICL_PROP_PEER, - &rootnd, sizeof (rootnd)); - } -} - -/* - * Event completion handler for PICL_FRU_ADDED/PICL_FRU_REMOVED events - */ -/* ARGSUSED */ -static void -frudr_completion_handler(char *ename, void *earg, size_t size) -{ - picl_nodehdl_t fruh; - picl_nodehdl_t parh; - picl_nodehdl_t peerh = NULL; - char nodename[PICL_PROPNAMELEN_MAX] = { '\0' }; - int err; - - if (strcmp(ename, PICL_FRU_REMOVED) == 0) { - /* - * now frudata has been notified that the node is to be - * removed, we can actually remove it - */ - fruh = NULL; - (void) nvlist_lookup_uint64(earg, - PICLEVENTARG_FRUHANDLE, &fruh); - if (fruh != NULL) { - (void) ptree_get_propval_by_name(fruh, PICL_PROP_PEER, - &peerh, sizeof (peerh)); - - /* - * first find name of the fru - */ - err = ptree_get_propval_by_name(fruh, PICL_PROP_PARENT, - &parh, sizeof (parh)); - if (err == PICL_SUCCESS) { - err = ptree_get_propval_by_name(parh, - PICL_PROP_NAME, nodename, - sizeof (nodename)); - } - if (err == PICL_SUCCESS) { - /* - * if it was a power supply, delete i2c node - */ - if (strncmp(nodename, PS_NAME, - PS_NAME_LEN) == 0) { - (void) delete_i2c_node(nodename); - } - - /* - * is disk node, make thread re-evaluate led - * state - */ - if (strncmp(nodename, DISK_NAME, - DISK_NAME_LEN) == 0) { - disk_ready[nodename[DISK_NAME_LEN] - - '0'] = -1; - } - } - - remove_fru_parents(fruh); - - /* - * now we can delete the node - */ - err = ptree_delete_node(fruh); - if (err == PICL_SUCCESS) { - (void) ptree_destroy_node(fruh); - } else { - syslog(LOG_ERR, DELETE_PROP_FAIL, err); - } - - if ((sys_platform == PLAT_CHALUPA19) && - (strncmp(nodename, FT_NAME, FT_NAME_LEN) == 0) && - (peerh != NULL)) { - /* - * On Netra-440 platforms, a fan tray - * may contain 2 fans (F0 and F1) but - * we only receive a single notification - * for removal of F0. If F1 is present, - * peerh will be valid and we need to - * process it as well. - */ - remove_fru_parents(peerh); - err = ptree_delete_node(peerh); - if (err == PICL_SUCCESS) { - (void) ptree_destroy_node(peerh); - } else { - syslog(LOG_ERR, DELETE_PROP_FAIL, err); - } - } - } - } - - free(ename); - nvlist_free(earg); -} - -/* - * Post the PICL_FRU_ADDED/PICL_FRU_REMOVED event - */ -static void -post_frudr_event(char *ename, picl_nodehdl_t parenth, picl_nodehdl_t fruh) -{ - nvlist_t *nvl; - char *ev_name; - - ev_name = strdup(ename); - if (ev_name == NULL) - return; - if (nvlist_alloc(&nvl, NV_UNIQUE_NAME_TYPE, NULL)) { - free(ev_name); - return; - } - if (parenth != 0L && - nvlist_add_uint64(nvl, PICLEVENTARG_PARENTHANDLE, parenth)) { - free(ev_name); - nvlist_free(nvl); - return; - } - if (fruh != 0L && - nvlist_add_uint64(nvl, PICLEVENTARG_FRUHANDLE, fruh)) { - free(ev_name); - nvlist_free(nvl); - return; - } - if (ptree_post_event(ev_name, nvl, sizeof (nvl), - frudr_completion_handler) != 0) { - free(ev_name); - nvlist_free(nvl); - } -} - -static void -add_ps_to_platform(char *unit) -{ - picl_nodehdl_t parent_hdl; - picl_nodehdl_t child_hdl; - ptree_propinfo_t info; - int unit_size = 1 + strlen(unit); - int res; - char unit_addr[PICL_UNITADDR_LEN_MAX]; - - switch (sys_platform) { - case PLAT_SEATTLE1U: - case PLAT_SEATTLE2U: - res = ptree_get_node_by_path(SEATTLE_PSU_PLATFORM, &parent_hdl); - break; - case PLAT_BOSTON: - res = ptree_get_node_by_path(BOSTON_PSU_PLATFORM, &parent_hdl); - break; - default: - res = ptree_get_node_by_path(PSU_PLATFORM, &parent_hdl); - break; - } - - if (res != PICL_SUCCESS) - return; - /* - * seeprom nodes sit below this node, - * is there one with the supplied unit address? - */ - res = ptree_get_propval_by_name(parent_hdl, PICL_PROP_CHILD, - &child_hdl, sizeof (picl_nodehdl_t)); - - while (res == PICL_SUCCESS) { - res = ptree_get_propval_by_name(child_hdl, PICL_PROP_PEER, - &child_hdl, sizeof (picl_nodehdl_t)); - if ((res == PICL_SUCCESS) && - ptree_get_propval_by_name(child_hdl, - PICL_PROP_UNIT_ADDRESS, unit_addr, - sizeof (unit_addr)) == PICL_SUCCESS) { - unit_addr[sizeof (unit_addr) - 1] = '\0'; - if (strcmp(unit_addr, unit) == 0) - return; /* unit address exists already */ - } - } - - /* - * found platform location for PS seeprom node, create it - */ - if (ptree_create_and_add_node(parent_hdl, PS_PLATFORM_NAME, - PICL_CLASS_SEEPROM, &child_hdl) != PICL_SUCCESS) - return; - if (ptree_init_propinfo(&info, PTREE_PROPINFO_VERSION, - PICL_PTYPE_CHARSTRING, PICL_READ, unit_size, - PICL_PROP_UNIT_ADDRESS, NULL, NULL) != PICL_SUCCESS) - return; - (void) ptree_create_and_add_prop(child_hdl, &info, unit, NULL); -} - -static void -get_fantray_path(char *ap_id, char *path, int bufsz) -{ - char ft_id[FT_ID_BUFSZ]; - - (void) strlcpy(ft_id, ap_id, FT_ID_BUFSZ); - - switch (sys_platform) { - case PLAT_SEATTLE1U: - if ((strncmp(ap_id, "FT0", 3) == 0) || - (strncmp(ap_id, "FT1", 3) == 0) || - (strncmp(ap_id, "FT2", 3) == 0)) { - (void) snprintf(path, bufsz, SEATTLE_FCB0_1U, ft_id); - } else if ((strncmp(ap_id, "FT3", 3) == 0) || - (strncmp(ap_id, "FT4", 3) == 0) || - (strncmp(ap_id, "FT5", 3) == 0)) { - (void) snprintf(path, bufsz, SEATTLE_FCB1_1U, ft_id); - } else { - (void) snprintf(path, bufsz, SEATTLE_PDB_1U, ft_id); - } - break; - - case PLAT_SEATTLE2U: - if ((strncmp(ap_id, "FT0", 3) == 0) || - (strncmp(ap_id, "FT1", 3) == 0) || - (strncmp(ap_id, "FT2", 3) == 0)) { - (void) snprintf(path, bufsz, SEATTLE_FCB0_2U, ft_id); - } else if ((strncmp(ap_id, "FT3", 3) == 0) || - (strncmp(ap_id, "FT4", 3) == 0) || - (strncmp(ap_id, "FT5", 3) == 0)) { - (void) snprintf(path, bufsz, SEATTLE_FCB1_2U, ft_id); - } else { - (void) snprintf(path, bufsz, SEATTLE_PDB_2U, ft_id); - } - break; - - case PLAT_BOSTON: - (void) snprintf(path, bufsz, SYS_BOARD_PATH, ft_id); - break; - - default: - (void) snprintf(path, bufsz, CHASSIS_LOC_PATH, ft_id); - break; - } -} - -/* - * handle EC_DR picl events - */ -/*ARGSUSED*/ -static void -frudr_evhandler(const char *ename, const void *earg, size_t size, void *cookie) -{ - nvlist_t *nvlp; - char *dtype; - char *ap_id; - char *hint; - char path[MAXPATHLEN]; - picl_nodehdl_t fruh; - picl_nodehdl_t locnodeh; - int err; - int index; - picl_nodehdl_t childh; - char *fru_name; - boolean_t rmc_flag = B_FALSE; - - if (strcmp(ename, PICLEVENT_DR_AP_STATE_CHANGE) != 0) { - return; - } - - if (nvlist_unpack((char *)earg, size, &nvlp, NULL)) { - return; - } - - if (nvlist_lookup_string(nvlp, PICLEVENTARG_DATA_TYPE, &dtype)) { - nvlist_free(nvlp); - return; - } - - if (strcmp(dtype, PICLEVENTARG_PICLEVENT_DATA) != 0) { - nvlist_free(nvlp); - return; - } - - if (nvlist_lookup_string(nvlp, PICLEVENTARG_AP_ID, &ap_id)) { - nvlist_free(nvlp); - return; - } - - /* - * check ap_id really is a hot-plug device - */ - if (strncmp(ap_id, PS_NAME, PS_NAME_LEN) == 0) { - fru_name = PS_FRU_NAME; - } else if (strncmp(ap_id, DISK_NAME, DISK_NAME_LEN) == 0) { - fru_name = DISK_FRU_NAME; - } else if (strncmp(ap_id, SCC_NAME, SCC_NAME_LEN) == 0) { - fru_name = SCC_FRU_NAME; - } else if (strncmp(ap_id, RMC_NAME, RMC_NAME_LEN) == 0) { - fru_name = RMC_FRU_NAME; - rmc_flag = B_TRUE; - } else if (strncmp(ap_id, FT_NAME, FT_NAME_LEN) == 0) { - fru_name = FT_FRU_NAME; - } else { - nvlist_free(nvlp); - return; - } - - if (nvlist_lookup_string(nvlp, PICLEVENTARG_HINT, &hint)) { - nvlist_free(nvlp); - return; - } - - /* - * OK - so this is an EC_DR event - let's handle it. - */ - if (rmc_flag && (sys_platform != PLAT_CHALUPA) && - (sys_platform != PLAT_CHALUPA19)) - sprintf_buf2(path, SYS_BOARD_PATH, ap_id); - else { - if ((sys_platform == PLAT_CHALUPA19) && - (strncmp(ap_id, PS_NAME, PS_NAME_LEN) == 0)) { - sprintf_buf2(path, CHASSIS_LOC_PATH, - ps_apid_to_nodename(ap_id)); - } else if (strncmp(ap_id, DISK_NAME, DISK_NAME_LEN) == 0) { - switch (sys_platform) { - case PLAT_SEATTLE1U: - sprintf_buf2(path, SEATTLE1U_HDDBP_PATH, ap_id); - break; - case PLAT_SEATTLE2U: - sprintf_buf2(path, SEATTLE2U_HDDBP_PATH, ap_id); - break; - case PLAT_BOSTON: - sprintf_buf2(path, BOSTON_HDDBP_PATH, ap_id); - break; - default: - sprintf_buf2(path, CHASSIS_LOC_PATH, ap_id); - break; - } - } else if (strncmp(ap_id, FT_NAME, FT_NAME_LEN) == 0) { - get_fantray_path(ap_id, path, MAXPATHLEN); - } else { - sprintf_buf2(path, CHASSIS_LOC_PATH, ap_id); - } - } - - if (ptree_get_node_by_path(path, &locnodeh) != PICL_SUCCESS) { - nvlist_free(nvlp); - return; - } - - /* - * now either add or delete the fru node as appropriate. If no - * hint, treat as insert and update the tree if necessary. - */ - if (strcmp(hint, DR_HINT_REMOVE) == 0) { - if (ptree_get_propval_by_name(locnodeh, PICL_PROP_CHILD, - &fruh, sizeof (picl_nodehdl_t)) == PICL_SUCCESS) { - /* - * fru was there - but has gone away - */ - post_frudr_event(PICL_FRU_REMOVED, NULL, fruh); - } - } else if (rmc_flag) { - /* - * An event on the RMC location, just pass it on - * it's not really a PICL_FRU_ADDED event, so offer - * the child handle as well (if it exists). - */ - if (ptree_get_propval_by_name(locnodeh, PICL_PROP_CHILD, - &fruh, sizeof (picl_nodehdl_t)) != PICL_SUCCESS) { - fruh = NULL; - } - post_frudr_event(PICL_FRU_ADDED, locnodeh, fruh); - } else { - /* - * fru has been inserted (or may need to update) - * if node already there, then just return - */ - childh = find_child_by_name(locnodeh, fru_name); - if (childh != NULL) { - nvlist_free(nvlp); - return; - } - - /* - * On Netra-440, the fan-tray location nodes are - * not deleted when fan-trays are physically - * removed, so we do not need to create another - * fru node. - */ - if ((sys_platform != PLAT_CHALUPA19) || - (strncmp(fru_name, FT_FRU_NAME, FT_FRU_NAME_LEN) != 0)) { - /* - * create requested fru node - */ - err = ptree_create_and_add_node(locnodeh, fru_name, - PICL_CLASS_FRU, &childh); - if (err != PICL_SUCCESS) { - syslog(LOG_ERR, ADD_NODE_FAIL, ap_id, err); - nvlist_free(nvlp); - return; - } - } - - /* - * power supplies have operational status and fruid - - * add OperationalStatus property and create i2c device node - * before posting fru_added event - */ - if (strncmp(ap_id, PS_NAME, PS_NAME_LEN) == 0) { - index = find_vol_prop_by_name( - ps_apid_to_nodename(ap_id)); - if (index >= 0) - add_op_status_to_node(childh, - &idprop->idp[index].volprop); - (void) create_i2c_node(ap_id); - add_ps_to_platform(ps_name_to_unitaddr(ap_id)); - } - - /* - * now post event - */ - post_frudr_event(PICL_FRU_ADDED, locnodeh, NULL); - } - nvlist_free(nvlp); -} - -/* - * Handle PICL_FRU_ADDED events. - * These events are posted by the frudr_evhandler of this plugin in response to - * PICLEVENT_DR_AP_STATE_CHANGE events. The sequence is as follows: - * 1) frudr_evhandler catches PICLEVENT_DR_AP_STATE_CHANGE and creates a - * child node below the relevant location. - * 2) frudr_evhandler posts a PICL_FRU_ADDED event. - * 3) envmon catches PICL_FRU_ADDED event, gropes the RMC configuration - * and creates platform tree nodes (primarily for PSUs). (If the event - * is for the RMC itself, envmon deletes existing platform nodes and - * rebuilds from scratch.) - * 4) this plugin catches PICL_FRU_ADDED event, looks for a related - * configuration file and parses it. This adds Fru data properties (etc.). - * 5) frudata catches the event and updates its FRUID data cache. - */ -/*ARGSUSED*/ -static void -fru_add_handler(const char *ename, const void *earg, size_t size, void *cookie) -{ - int retval; - picl_nodehdl_t locnodeh; - picl_nodehdl_t rooth; - char path[MAXPATHLEN]; - char *fru_name; - - if (strcmp(ename, PICL_FRU_ADDED) != 0) - return; - - retval = nvlist_lookup_uint64((nvlist_t *)earg, - PICLEVENTARG_PARENTHANDLE, &locnodeh); - if (retval != PICL_SUCCESS) - return; - - retval = ptree_get_propval_by_name(locnodeh, PICL_PROP_NAME, - path, sizeof (path)); - if (retval != PICL_SUCCESS) - return; - - fru_name = strdup(path); - if (fru_name == NULL) - return; - - /* - * We're about to parse a fru-specific .conf file to populate - * picl nodes relating to the dynamically added component. In the - * case of the RMC, there is a problem: all of its /platform tree - * nodes have just been replaced by envmon. It is now necessary to - * repopulate Devices tables in /frutree. - * picld_pluginutil_parse_config_file doesn't handle repopulating - * existing tables, so as a work round, delete all tables found - * under /frutree. This works on Enchilada Server as the tables - * are all created from parsing a .conf file, and we're about to - * redo that action. - */ - if (strcmp(fru_name, RMC_NAME) == 0) { - rmc_state_event(); - retval = ptree_get_node_by_path(FRUTREE_PATH, &rooth); - if (retval == PICL_SUCCESS) { - remove_tables(rooth); - } - } - - /* - * Re-establish the HPU(FRU) volatile properties. - * This needs to be done before the .conf file is parsed because - * it has a side effect of re-creating any missing power-supply - * fru node. The .conf file can then hang properties beneath. - */ - opst_init(); - - /* - * see if there's a .conf file for this fru - */ - if (get_config_file(path, fru_name) == 0) { - if ((ptree_get_root(&rooth) != PICL_SUCCESS) || - (picld_pluginutil_parse_config_file(rooth, path) != - PICL_SUCCESS)) { - syslog(LOG_ERR, PARSE_CONF_FAIL, path); - } - } - - free(fru_name); -} - -/* - * Handle PICLEVENT_SYSEVENT_DEVICE_ADDED events. - */ -/*ARGSUSED*/ -static void -frutree_evhandler(const char *ename, const void *earg, size_t size, - void *cookie) -{ - nvlist_t *nvlp; - picl_nodehdl_t rooth; - char path[MAXPATHLEN]; - char *fru_name; - char *dtype; - char *dpath; - char *ptr; - char *ptr2; - int done = B_FALSE; - int i; - - if (strcmp(ename, PICLEVENT_SYSEVENT_DEVICE_ADDED) != 0) - return; - - if (nvlist_unpack((char *)earg, size, &nvlp, NULL)) - return; - - if (nvlist_lookup_string(nvlp, PICLEVENTARG_DATA_TYPE, &dtype)) { - nvlist_free(nvlp); - return; - } - - if (strcmp(dtype, PICLEVENTARG_PICLEVENT_DATA) != 0) { - nvlist_free(nvlp); - return; - } - - if (nvlist_lookup_string(nvlp, PICLEVENTARG_DEVFS_PATH, &dpath)) { - nvlist_free(nvlp); - return; - } - - fru_name = strdup(dpath); - if (fru_name == NULL) { - nvlist_free(nvlp); - return; - } - - nvlist_free(nvlp); - - /* - * fru_name is of the form - * "/pci@1e,600000/usb@a/mouse@2" - * or - * "/pci@1e,600000/usb@a/device@2/mouse@0" - * reduce it to "usb-a-2" - */ - if ((sys_platform == PLAT_SEATTLE1U) || - (sys_platform == PLAT_SEATTLE2U) || - (sys_platform == PLAT_BOSTON)) { - for (i = 0; i < MAX_USB_PORTS; i++) { - sprintf(fru_name, "%s%d", USB_CONF_FILE_NAME, i+1); - if (get_config_file(path, fru_name) == 0) { - if ((ptree_get_root(&rooth) != PICL_SUCCESS) || - (picld_pluginutil_parse_config_file(rooth, - path) != PICL_SUCCESS)) { - syslog(LOG_ERR, PARSE_CONF_FAIL, path); - } - } - } - } else { - ptr = fru_name; - if (*ptr == '/') { - ptr++; - ptr = strchr(ptr, '/'); - if (ptr != NULL) { - ptr++; - (void) memmove(fru_name, ptr, strlen(ptr) + 1); - ptr = strchr(fru_name, '@'); - if (ptr != NULL) { - *ptr = '-'; - ptr++; - ptr = strchr(ptr, '/'); - if (ptr != NULL) { - *ptr = '-'; - ptr++; - ptr2 = ptr; - ptr = strchr(ptr, '@'); - if (ptr != NULL) { - ptr++; - (void) memmove(ptr2, - ptr, strlen(ptr)+1); - ptr2 = strchr(ptr2, - '/'); - if (ptr2 != NULL) { - *ptr2 = '\0'; - } - done = B_TRUE; - } - } - } - } - } - if (done == B_FALSE) { - free(fru_name); - return; - } - - /* - * see if there's a .conf file for this fru - */ - - if (get_config_file(path, fru_name) == 0) { - if ((ptree_get_root(&rooth) != PICL_SUCCESS) || - (picld_pluginutil_parse_config_file(rooth, path) != - PICL_SUCCESS)) { - syslog(LOG_ERR, PARSE_CONF_FAIL, path); - } - } - } - - free(fru_name); -} - -static int -set_led(char *name, char *ptr, char *value) -{ - char path[MAXPATHLEN]; - picl_prophdl_t proph; - ptree_propinfo_t propinfo; - picl_prophdl_t tableh; - picl_nodehdl_t locnodeh; - picl_nodehdl_t nodeh; - picl_prophdl_t tblh; - int retval; - char *value_ptr; - char label[PICL_PROPNAMELEN_MAX]; - char class[PICL_PROPNAMELEN_MAX]; - - /* find the location node */ - switch (sys_platform) { - case PLAT_CHALUPA: - case PLAT_CHALUPA19: - sprintf_buf2(path, CHASSIS_LOC_PATH, name); - break; - case PLAT_SEATTLE1U: - sprintf_buf2(path, SEATTLE1U_HDDBP_PATH, name); - break; - case PLAT_SEATTLE2U: - sprintf_buf2(path, SEATTLE2U_HDDBP_PATH, name); - break; - case PLAT_BOSTON: - sprintf_buf2(path, BOSTON_HDDBP_PATH, name); - break; - default: - sprintf_buf2(path, CHASSIS_LOC_PATH, name); - break; - } - - if (ptree_get_node_by_path(path, &locnodeh) != PICL_SUCCESS) { - return (PICL_FAILURE); - } - - /* - * if no fru node, then turn led off - */ - if (find_child_by_name(locnodeh, DISK_FRU_NAME) != NULL) - value_ptr = value; - else - value_ptr = PICL_PROPVAL_OFF; - - /* get its Devices table */ - if (ptree_get_prop_by_name(locnodeh, PICL_PROP_DEVICES, &tableh) != - PICL_SUCCESS) - return (PICL_FAILURE); - if (ptree_get_propval(tableh, &tblh, sizeof (tblh)) != PICL_SUCCESS) - return (PICL_FAILURE); - - /* get first col, first row */ - if (ptree_get_next_by_col(tblh, &tblh) != PICL_SUCCESS) - return (PICL_FAILURE); - - /* - * starting at next col, get every entry in the column - */ - for (retval = ptree_get_next_by_row(tblh, &tblh); - retval == PICL_SUCCESS; - retval = ptree_get_next_by_col(tblh, &tblh)) { - /* - * get the target node handle - */ - if (ptree_get_propval(tblh, &nodeh, sizeof (nodeh)) - != PICL_SUCCESS) - continue; - - /* - * check it's a led - */ - if (ptree_get_propval_by_name(nodeh, PICL_PROP_CLASSNAME, - class, sizeof (class)) != PICL_SUCCESS) - continue; - if (strcmp(class, "led") != 0) - continue; - - /* - * check its the right led - */ - if (ptree_get_propval_by_name(nodeh, PICL_PROP_LABEL, - label, sizeof (label)) != PICL_SUCCESS) - continue; - if (strcmp(label, ptr) == 0) { - /* - * set it - */ - if (ptree_get_prop_by_name(nodeh, PICL_PROP_STATE, - &proph) != PICL_SUCCESS) - continue; - if (ptree_get_propinfo(proph, &propinfo) != - PICL_SUCCESS) - continue; - retval = ptree_update_propval_by_name(nodeh, - PICL_PROP_STATE, value_ptr, propinfo.piclinfo.size); - return (retval); - } - } - return (PICL_FAILURE); -} - -/* - * function to find first node of specified class beneath supplied node - */ -static int -get_node_by_class(picl_nodehdl_t nodeh, const char *classname, - picl_nodehdl_t *foundnodeh) -{ - int err; - char clname[PICL_CLASSNAMELEN_MAX+1]; - picl_nodehdl_t childh; - - /* - * go through the children - */ - err = ptree_get_propval_by_name(nodeh, PICL_PROP_CHILD, &childh, - sizeof (picl_nodehdl_t)); - - while (err == PICL_SUCCESS) { - err = ptree_get_propval_by_name(childh, PICL_PROP_CLASSNAME, - clname, sizeof (clname)); - - if ((err == PICL_SUCCESS) && (strcmp(clname, classname) == 0)) { - *foundnodeh = childh; - return (PICL_SUCCESS); - } - - err = get_node_by_class(childh, classname, foundnodeh); - if (err == PICL_SUCCESS) - return (PICL_SUCCESS); - - err = ptree_get_propval_by_name(childh, PICL_PROP_PEER, - &childh, sizeof (picl_nodehdl_t)); - } - - return (PICL_NODENOTFOUND); -} - -/* - * get system-controller node - */ -static int -get_sys_controller_node(picl_nodehdl_t *nodeh) -{ - int err; - - /* get platform node */ - err = ptree_get_node_by_path(PICL_NODE_ROOT PICL_NODE_PLATFORM, nodeh); - if (err != PICL_SUCCESS) - return (err); - err = get_node_by_class(*nodeh, PICL_CLASS_SERVICE_PROCESSOR, nodeh); - return (err); -} - -/* - * create pathname string for system-controller device - */ -static char * -create_sys_controller_pathname(picl_nodehdl_t sysconh) -{ - char *ptr; - char namebuf[PATH_MAX]; - size_t len; - DIR *dirp; - struct dirent *dp; - struct stat statbuf; - - /* - * prefix devfs-path name with /devices - */ - (void) strlcpy(namebuf, DEV_PREFIX, PATH_MAX); - - /* - * append devfs-path property - */ - len = strlen(namebuf); - if (ptree_get_propval_by_name(sysconh, str_devfs_path, namebuf + len, - sizeof (namebuf) - len) != PICL_SUCCESS) { - return (NULL); - } - - /* - * locate final component of name - */ - ptr = strrchr(namebuf, '/'); - if (ptr == NULL) - return (NULL); - *ptr = '\0'; /* terminate at end of directory path */ - len = strlen(ptr + 1); /* length of terminal name */ - dirp = opendir(namebuf); - if (dirp == NULL) { - return (NULL); - } - *ptr++ = '/'; /* restore '/' and advance to final name */ - - while ((dp = readdir(dirp)) != NULL) { - /* - * look for a name which starts with the string at *ptr - */ - if (strlen(dp->d_name) < len) - continue; /* skip short names */ - if (strncmp(dp->d_name, ptr, len) == 0) { - /* - * Got a match, restore full pathname and stat the - * entry. Reject if not a char device - */ - (void) strlcpy(ptr, dp->d_name, - sizeof (namebuf) - (ptr - namebuf)); - if (stat(namebuf, &statbuf) < 0) - continue; /* reject if can't stat it */ - if (!S_ISCHR(statbuf.st_mode)) - continue; /* not a character device */ - /* - * go with this entry - */ - (void) closedir(dirp); - return (strdup(namebuf)); - } - } - (void) closedir(dirp); - return (NULL); -} - -/* - * create pathname string for bezel leds device - */ -static char * -create_bezel_leds_pathname(const char *dirpath, const char *devname) -{ - char namebuf[PATH_MAX]; - size_t lendirpath; - size_t len; - DIR *dirp; - struct dirent *dp; - struct stat statbuf; - - /* - * start with directory name - */ - (void) strlcpy(namebuf, dirpath, PATH_MAX); - - /* - * append devfs-path property - */ - lendirpath = strlen(namebuf); - dirp = opendir(namebuf); - if (dirp == NULL) { - return (NULL); - } - - len = strlen(devname); - - while ((dp = readdir(dirp)) != NULL) { - /* - * look for a name which starts with the gpio string - */ - if (strlen(dp->d_name) < len) - continue; /* skip short names */ - if (strncmp(dp->d_name, devname, len) == 0) { - /* - * Got a match, restore full pathname and stat the - * entry. Reject if not a char device - */ - (void) strlcpy(namebuf + lendirpath, dp->d_name, - sizeof (namebuf) - lendirpath); - if (stat(namebuf, &statbuf) < 0) - continue; /* reject if can't stat it */ - if (!S_ISCHR(statbuf.st_mode)) - continue; /* not a character device */ - /* - * go with this entry - */ - (void) closedir(dirp); - return (strdup(namebuf)); - } - } - (void) closedir(dirp); - return (NULL); -} - -/* - * initialise structure associated with nodes requiring OperationalStatus - */ -static void -opst_init(void) -{ - int res; - int index = 0; - int fd; - int entries = 0; - int err = 0; - boolean_t rmc_flag; - boolean_t ps_flag; - boolean_t disk_flag; - size_t len; - envmon_sysinfo_t sysinfo; - envmon_hpu_t hpu; - - if (idprop != NULL) { - /* - * This must be a restart, clean up earlier allocation - */ - free(idprop); - idprop = NULL; - } - - if (sc_device_name == NULL) - err = 1; - else { - fd = open(sc_device_name, O_RDONLY); - - if (fd < 0) { - syslog(LOG_ERR, EM_NO_SC_DEV); - err = 1; - } - } - - if (err == 0) { - res = ioctl(fd, ENVMONIOCSYSINFO, &sysinfo); - - if (res < 0) { - syslog(LOG_ERR, EM_NO_SYSINFO, strerror(errno)); - (void) close(fd); - err = 1; - } - } - - if (err == 0) { - entries = sysinfo.maxHPU; - len = offsetof(idp_lkup_t, idp) + entries * sizeof (id_props_t); - idprop = calloc(len, 1); - if (idprop == NULL) { - (void) close(fd); - err = 1; - } - } - - if (err == 0) { - idprop->maxnum = entries; - hpu.id.name[0] = '\0'; /* request for first name */ - res = ioctl(fd, ENVMONIOCHPU, &hpu); - - /* - * The HPU node for the RMC is a special case. Its handle is - * generated by the rmclomv driver. Rather than building - * knowledge of its frutree hierarchic name into the driver, we - * put that knowledge here. - */ - while ((res == 0) && (index < entries) && - (hpu.next_id.name[0] != '\0')) { - hpu.id = hpu.next_id; - res = ioctl(fd, ENVMONIOCHPU, &hpu); - if ((res == 0) && - ((hpu.sensor_status & ENVMON_NOT_PRESENT) == 0)) { - add_op_status(&hpu, &index); - } - } - - idprop->num = index; - (void) close(fd); - } -} - -static void -disk_leds_init(void) -{ - int err = 0, i; - - if (!g_mutex_init) { - if ((pthread_cond_init(&g_cv, NULL) == 0) && - (pthread_cond_init(&g_cv_ack, NULL) == 0) && - (pthread_mutex_init(&g_mutex, NULL) == 0)) { - g_mutex_init = B_TRUE; - } else { - return; - } - } - - /* - * Initialise to -1 so the led thread will set correctly. - * Do this before creating the disk_leds thread, - * so there's no race. - */ - for (i = 0; i < N_DISKS; i++) - disk_ready[i] = -1; - - if (ledsthr_created) { - /* - * this is a restart, wake up sleeping threads - */ - err = pthread_mutex_lock(&g_mutex); - if (err != 0) { - syslog(LOG_ERR, EM_MUTEX_FAIL, strerror(errno)); - return; - } - g_finish_now = B_FALSE; - (void) pthread_cond_broadcast(&g_cv); - (void) pthread_mutex_unlock(&g_mutex); - } else { - if ((pthread_attr_init(&ledsthr_attr) != 0) || - (pthread_attr_setscope(&ledsthr_attr, - PTHREAD_SCOPE_SYSTEM) != 0)) - return; - if ((err = pthread_create(&ledsthr_tid, &ledsthr_attr, - disk_leds_thread, NULL)) != 0) { - syslog(LOG_ERR, EM_THREAD_CREATE_FAILED, - strerror(errno)); - return; - } - ledsthr_created = B_TRUE; - } -} - -static void -disk_leds_fini(void) -{ - int err, i; - - /* - * turn the leds off as we'll no longer be monitoring them - */ - for (i = 0; i < N_DISKS; i++) - (void) set_led(disk_name[i], REMOK_LED, PICL_PROPVAL_OFF); - - /* - * disk_leds_thread() never started or an error occured so - * that it's not running - */ - if (!disk_leds_thread_running) - return; - - /* - * tell led thread to pause - */ - if (!ledsthr_created) - return; - err = pthread_mutex_lock(&g_mutex); - if (err != 0) { - syslog(LOG_ERR, EM_MUTEX_FAIL, strerror(errno)); - return; - } - g_finish_now = B_TRUE; - disk_leds_thread_ack = B_FALSE; - (void) pthread_cond_broadcast(&g_cv); - - /* - * and wait for them to acknowledge - */ - while (!disk_leds_thread_ack) { - (void) pthread_cond_wait(&g_cv_ack, &g_mutex); - } - (void) pthread_mutex_unlock(&g_mutex); -} - -static void -update_disk_node(char *fruname, char *devpath) -{ - picl_nodehdl_t slotndh; - picl_nodehdl_t diskndh; - picl_nodehdl_t devhdl; - picl_prophdl_t tblhdl; - picl_prophdl_t tblhdl2; - picl_prophdl_t tblproph; - int err; - char path[MAXPATHLEN]; - - switch (sys_platform) { - case PLAT_CHALUPA: - case PLAT_CHALUPA19: - sprintf_buf2(path, CHASSIS_LOC_PATH, fruname); - break; - case PLAT_SEATTLE1U: - sprintf_buf2(path, SEATTLE1U_HDDBP_PATH, fruname); - break; - case PLAT_SEATTLE2U: - sprintf_buf2(path, SEATTLE2U_HDDBP_PATH, fruname); - break; - case PLAT_BOSTON: - sprintf_buf2(path, BOSTON_HDDBP_PATH, fruname); - break; - default: - sprintf_buf2(path, CHASSIS_LOC_PATH, fruname); - break; - } - - if (ptree_get_node_by_path(path, &slotndh) != PICL_SUCCESS) { - return; - } - diskndh = find_child_by_name(slotndh, DISK_FRU_NAME); - if (diskndh == NULL) { - return; - } - err = ptree_get_node_by_path(devpath, &devhdl); - if (err == PICL_SUCCESS) { - err = ptree_get_propval_by_name(diskndh, - PICL_PROP_DEVICES, &tblhdl, sizeof (tblhdl)); - if (err != PICL_SUCCESS) - return; - err = ptree_get_next_by_col(tblhdl, &tblhdl2); - if (err != PICL_SUCCESS) { - err = create_table_entry(tblhdl, devhdl, - PICL_CLASS_BLOCK); - if (err != PICL_SUCCESS) - return; - err = add_prop_ref(devhdl, diskndh, - PICL_REFPROP_FRU_PARENT); - if (err != PICL_SUCCESS) - return; - } - } else { - /* - * no mechanism for deleting row - so delete - * whole table and start again - */ - err = ptree_get_prop_by_name(diskndh, PICL_PROP_DEVICES, - &tblproph); - if (err != PICL_SUCCESS) - return; - err = ptree_delete_prop(tblproph); - if (err != PICL_SUCCESS) - return; - (void) ptree_destroy_prop(tblproph); - err = create_table(diskndh, &tblhdl, PICL_PROP_DEVICES); - if (err != PICL_SUCCESS) - return; - } -} - -/* - * We will light the OK2REMOVE LED for disks configured - * into a raid if (and only if) the driver reports - * that the disk has failed. - */ -static int -raid_ok2rem_policy(raid_config_t config, int target) -{ - int i; - - for (i = 0; i < config.ndisks; i++) { - int d = config.disk[i]; - int dstatus = config.diskstatus[i]; - - if (d == target) { - switch (dstatus) { - case RAID_DISKSTATUS_MISSING: - /* If LED is on, turn it off */ - if (disk_ready[d] == B_FALSE) { - if (set_led(disk_name[d], REMOK_LED, - PICL_PROPVAL_OFF) == PICL_SUCCESS) { - disk_ready[d] = B_TRUE; - } - } - break; - case RAID_DISKSTATUS_GOOD: - if (disk_ready[d] != B_TRUE) { - if (set_led(disk_name[d], REMOK_LED, - PICL_PROPVAL_OFF) == PICL_SUCCESS) { - disk_ready[d] = B_TRUE; - } - } - break; - case RAID_DISKSTATUS_FAILED: - if (disk_ready[d] != B_FALSE) { - if (set_led(disk_name[d], REMOK_LED, - PICL_PROPVAL_ON) == PICL_SUCCESS) { - disk_ready[d] = B_FALSE; - } - } - break; - default: - break; - } - return (1); - } - } - return (0); -} - -static int -check_raid(int target) -{ - raid_config_t config; - int fd; - int numvols; - int i, j; - - switch (sys_platform) { - case PLAT_CHALUPA: - case PLAT_CHALUPA19: - fd = open(V440_DISK_DEVCTL, O_RDONLY); - break; - case PLAT_SEATTLE1U: - case PLAT_SEATTLE2U: - fd = open(SEATTLE_DISK_DEVCTL, O_RDONLY); - break; - case PLAT_BOSTON: - if (boston_1068e_flag) { - fd = open(BOSTON_DISK_DEVCTL_1068E, O_RDONLY); - } else { - fd = open(BOSTON_DISK_DEVCTL_1068X, O_RDONLY); - } - break; - default: - fd = -1; - break; - } - - if (fd == -1) { - return (0); - } - - if (ioctl(fd, RAID_NUMVOLUMES, &numvols)) { - (void) close(fd); - return (0); - } - - for (i = 0; i < numvols; i++) { - config.unitid = i; - if (ioctl(fd, RAID_GETCONFIG, &config)) { - (void) close(fd); - return (0); - } - if (raid_ok2rem_policy(config, target)) { - (void) close(fd); - return (1); - } - } - - (void) close(fd); - return (0); -} - -/*ARGSUSED*/ -static void * -disk_leds_thread(void *args) -{ - int c; - int i; - char **disk_dev; - int fd; - - devctl_hdl_t dhdl; - - int n_disks = 0, - do_raid = 0, - err = 0; - uint_t statep = 0; - - static char *mpxu_devs[] = { - "/pci@1c,600000/scsi@2/sd@0,0", - "/pci@1c,600000/scsi@2/sd@1,0", - "/pci@1c,600000/scsi@2/sd@2,0", - "/pci@1c,600000/scsi@2/sd@3,0" - }; - - static char *ents_devs[] = { - "/pci@1d,700000/scsi@4/sd@0,0", - "/pci@1d,700000/scsi@4/sd@1,0", - "/pci@1d,700000/scsi@4/sd@2,0", - "/pci@1d,700000/scsi@4/sd@3,0", - "/pci@1d,700000/scsi@4/sd@8,0", - "/pci@1d,700000/scsi@4/sd@9,0", - "/pci@1d,700000/scsi@4/sd@a,0", - "/pci@1d,700000/scsi@4/sd@b,0" - }; - - static char *v440_devs[] = { - "/pci@1f,700000/scsi@2/sd@0,0", - "/pci@1f,700000/scsi@2/sd@1,0", - "/pci@1f,700000/scsi@2/sd@2,0", - "/pci@1f,700000/scsi@2/sd@3,0" - }; - - static char *n210_devs[] = { - "/pci@1c,600000/LSILogic,sas@1/sd@0,0", - "/pci@1c,600000/LSILogic,sas@1/sd@1,0" - }; - - static char *seattle_devs[] = { - "/pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1/sd@0,0", - "/pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1/sd@1,0", - "/pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1/sd@2,0", - "/pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1/sd@3,0" - }; - - static char *boston_devs_1068e[] = { - "/pci@1e,600000/pci@0/pci@2/scsi@0/sd@0,0", - "/pci@1e,600000/pci@0/pci@2/scsi@0/sd@1,0", - "/pci@1e,600000/pci@0/pci@2/scsi@0/sd@2,0", - "/pci@1e,600000/pci@0/pci@2/scsi@0/sd@3,0", - "/pci@1e,600000/pci@0/pci@2/scsi@0/sd@4,0", - "/pci@1e,600000/pci@0/pci@2/scsi@0/sd@5,0", - "/pci@1e,600000/pci@0/pci@2/scsi@0/sd@6,0", - "/pci@1e,600000/pci@0/pci@2/scsi@0/sd@7,0" - }; - static char *boston_devs_1068x[] = { - "/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@1/sd@0,0", - "/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@1/sd@1,0", - "/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@1/sd@2,0", - "/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@1/sd@3,0", - "/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@1/sd@4,0", - "/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@1/sd@5,0", - "/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@1/sd@6,0", - "/pci@1f,700000/pci@0/pci@2/pci@0/pci@8/LSILogic,sas@1/sd@7,0" - }; - - char *ddev[N_DISKS]; /* "/devices" */ - char *pdev[N_DISKS]; /* "/platform" */ - - switch (sys_platform) { - - case PLAT_ENTS: - disk_dev = ents_devs; - n_disks = N_ENTS_DISKS; - break; - - case PLAT_CHALUPA: - case PLAT_CHALUPA19: - do_raid = 1; - disk_dev = v440_devs; - n_disks = N_CHALUPA_DISKS; - break; - - case PLAT_SALSA19: - disk_dev = n210_devs; - n_disks = N_EN19_DISKS; - break; - - case PLAT_SEATTLE1U: - case PLAT_SEATTLE2U: - do_raid = 1; - disk_dev = seattle_devs; - n_disks = (sys_platform == PLAT_SEATTLE1U) ? - N_SEATTLE1U_DISKS : N_SEATTLE2U_DISKS; - break; - - case PLAT_BOSTON: - /* - * If we can open the devctl path for the built-in 1068E - * controller then assume we're a 1068E-equipped Boston - * and make all the paths appropriate for that hardware. - * Otherwise assume we are a 1068X-equipped Boston and - * make all of the paths appropriate for a 1068X PCI-X - * controller in PCI slot 4. - * - * The flag is also used in the check_raid() function. - */ - if ((fd = open(BOSTON_DISK_DEVCTL_1068E, O_RDONLY)) != -1) { - boston_1068e_flag = 1; - disk_dev = boston_devs_1068e; - } else { - boston_1068e_flag = 0; - disk_dev = boston_devs_1068x; - } - (void) close(fd); - do_raid = 1; - n_disks = N_BOSTON_DISKS; - break; - - default: /* PLAT_ENXS/PLAT_EN19 */ - disk_dev = mpxu_devs; - n_disks = (sys_platform == PLAT_EN19) ? - N_EN19_DISKS : N_MPXU_DISKS; - } - - /* - * make up disk names - */ - - for (i = 0; i < n_disks; i++) { - char buffer[MAXPATHLEN]; - sprintf(buffer, "/devices%s", disk_dev[i]); - ddev[i] = strdup(buffer); - sprintf(buffer, "/platform%s", disk_dev[i]); - pdev[i] = strdup(buffer); - } - - disk_leds_thread_running = B_TRUE; - - for (;;) { - for (i = 0; i < n_disks; i++) { - /* - * If it's one of the RAID disks, we have already - * applied the ok2remove policy. - */ - if (do_raid && check_raid(i)) { - continue; - } - - dhdl = devctl_device_acquire(ddev[i], 0); - devctl_device_getstate(dhdl, &statep); - devctl_release(dhdl); - - if (statep & DEVICE_OFFLINE) { - if (disk_ready[i] != B_FALSE) { - update_disk_node(disk_name[i], pdev[i]); - if (set_led(disk_name[i], REMOK_LED, - PICL_PROPVAL_ON) == PICL_SUCCESS) - disk_ready[i] = B_FALSE; - } - } else if (statep & DEVICE_ONLINE) { - if (disk_ready[i] != B_TRUE) { - update_disk_node(disk_name[i], pdev[i]); - if (set_led(disk_name[i], REMOK_LED, - PICL_PROPVAL_OFF) == PICL_SUCCESS) - disk_ready[i] = B_TRUE; - } - } - } - - /* - * wait a bit until we check again - */ - - (void) poll(NULL, 0, DISK_POLL_TIME); - - /* - * are we to stop? - */ - - (void) pthread_mutex_lock(&g_mutex); - - while (g_finish_now) { - /* - * notify _fini routine that we've paused - */ - disk_leds_thread_ack = B_TRUE; - (void) pthread_cond_signal(&g_cv_ack); - - /* - * and go to sleep in case we get restarted - */ - (void) pthread_cond_wait(&g_cv, &g_mutex); - } - (void) pthread_mutex_unlock(&g_mutex); - } - - return ((void *)err); -} - -/* - * Given the powersupply name, convert to addr - */ -static int -ps_name_to_addr(char *name) -{ - int ps_addr = 0; - if ((strcmp(name, PS0_NAME) == 0) || - (strcmp(name, PSU0_NAME) == 0)) { - switch (sys_platform) { - case PLAT_SEATTLE1U: - case PLAT_SEATTLE2U: - ps_addr = SEATTLE_PS0_ADDR; - break; - case PLAT_BOSTON: - ps_addr = BOSTON_PS0_ADDR; - break; - default: - ps_addr = PS0_ADDR; - break; - } - } else if ((strcmp(name, PS1_NAME) == 0) || - (strcmp(name, PSU1_NAME) == 0)) { - switch (sys_platform) { - case PLAT_SEATTLE1U: - case PLAT_SEATTLE2U: - ps_addr = SEATTLE_PS1_ADDR; - break; - case PLAT_BOSTON: - ps_addr = BOSTON_PS1_ADDR; - break; - default: - ps_addr = PS1_ADDR; - break; - } - } else if ((strcmp(name, PS2_NAME) == 0) || - (strcmp(name, PSU2_NAME) == 0)) { - switch (sys_platform) { - case PLAT_BOSTON: - ps_addr = BOSTON_PS2_ADDR; - break; - default: - ps_addr = PS2_ADDR; - break; - } - } else if ((strcmp(name, PS3_NAME) == 0) || - (strcmp(name, PSU3_NAME) == 0)) { - switch (sys_platform) { - case PLAT_BOSTON: - ps_addr = BOSTON_PS3_ADDR; - break; - default: - ps_addr = PS3_ADDR; - break; - } - } - - return (ps_addr); -} - -/* - * Given powersupply name, convert to unit addr - */ -static char * -ps_name_to_unitaddr(char *name) -{ - char *unitaddr; - - if (strcmp(name, PS0_NAME) == 0) { - switch (sys_platform) { - case PLAT_SEATTLE1U: - case PLAT_SEATTLE2U: - unitaddr = SEATTLE_PS0_UNITADDR; - break; - case PLAT_BOSTON: - unitaddr = BOSTON_PS0_UNITADDR; - break; - default: - unitaddr = PS0_UNITADDR; - break; - } - } else if (strcmp(name, PS1_NAME) == 0) { - switch (sys_platform) { - case PLAT_SEATTLE1U: - case PLAT_SEATTLE2U: - unitaddr = SEATTLE_PS1_UNITADDR; - break; - case PLAT_BOSTON: - unitaddr = BOSTON_PS1_UNITADDR; - break; - default: - unitaddr = PS1_UNITADDR; - break; - } - } else if (strcmp(name, PS2_NAME) == 0) { - switch (sys_platform) { - case PLAT_BOSTON: - unitaddr = BOSTON_PS2_UNITADDR; - break; - default: - unitaddr = PS2_UNITADDR; - break; - } - } else if (strcmp(name, PS3_NAME) == 0) { - switch (sys_platform) { - case PLAT_BOSTON: - unitaddr = BOSTON_PS3_UNITADDR; - break; - default: - unitaddr = PS3_UNITADDR; - break; - } - } - else - unitaddr = NULL; - - return (unitaddr); -} - -/* - * converts apid to real FRU name in PICL tree. The - * name of powersupply devices on chalupa19 are - * PSU instead of PS - */ -static char * -ps_apid_to_nodename(char *apid) -{ - char *nodename; - - if (sys_platform != PLAT_CHALUPA19) - return (apid); - - if (strcmp(apid, PS0_NAME) == 0) - nodename = PSU0_NAME; - else if (strcmp(apid, PS1_NAME) == 0) - nodename = PSU1_NAME; - else if (strcmp(apid, PS2_NAME) == 0) - nodename = PSU2_NAME; - else if (strcmp(apid, PS3_NAME) == 0) - nodename = PSU3_NAME; - else - nodename = apid; - - return (nodename); -} - -/* - * Create SEEPROM node at insertion time. - */ -static int -create_i2c_node(char *ap_id) -{ - int nd_reg[2]; - devctl_ddef_t ddef_hdl; - devctl_hdl_t bus_hdl; - devctl_hdl_t dev_hdl; - char dev_path[MAXPATHLEN]; - char *compatible; - - /* create seeprom node */ - nd_reg[0] = 0; - nd_reg[1] = ps_name_to_addr(ap_id); - - switch (sys_platform) { - case PLAT_SEATTLE1U: - case PLAT_SEATTLE2U: - bus_hdl = devctl_bus_acquire(SEATTLE_PSU_I2C_BUS_DEV, 0); - compatible = SEATTLE_PSU_COMPATIBLE; - break; - case PLAT_BOSTON: - bus_hdl = devctl_bus_acquire(BOSTON_PSU_I2C_BUS_DEV, 0); - compatible = BOSTON_PSU_COMPATIBLE; - break; - default: - bus_hdl = devctl_bus_acquire(PSU_I2C_BUS_DEV, 0); - compatible = PSU_COMPATIBLE; - break; - } - - if (bus_hdl == NULL) - return (DDI_FAILURE); - - /* device definition properties */ - ddef_hdl = devctl_ddef_alloc(PS_DEVICE_NAME, 0); - (void) devctl_ddef_string(ddef_hdl, "compatible", compatible); - (void) devctl_ddef_string(ddef_hdl, "device_type", "seeprom"); - (void) devctl_ddef_int_array(ddef_hdl, "reg", 2, nd_reg); - - /* create the device node */ - if (devctl_bus_dev_create(bus_hdl, ddef_hdl, 0, &dev_hdl)) - return (DDI_FAILURE); - - if (devctl_get_pathname(dev_hdl, dev_path, MAXPATHLEN) == NULL) - return (DDI_FAILURE); - - devctl_release(dev_hdl); - devctl_ddef_free(ddef_hdl); - devctl_release(bus_hdl); - return (DDI_SUCCESS); -} - -/* - * Delete SEEPROM node at insertion time. - */ -static void -delete_i2c_node(char *ap_id) -{ - devctl_hdl_t dev_hdl; - char buf[MAXPATHLEN]; - - switch (sys_platform) { - case PLAT_SEATTLE1U: - case PLAT_SEATTLE2U: - sprintf_buf2(buf, SEATTLE_PSU_DEV, ps_name_to_addr(ap_id)); - break; - case PLAT_BOSTON: - sprintf_buf2(buf, BOSTON_PSU_DEV, ps_name_to_addr(ap_id)); - break; - default: - sprintf_buf2(buf, PSU_DEV, ps_name_to_addr(ap_id)); - break; - } - - dev_hdl = devctl_device_acquire(buf, 0); - if (dev_hdl == NULL) { - return; - } - - /* - * If the seeprom driver is not loaded, calls to - * devctl_device_remove fails for seeprom devices - */ - if (devctl_device_remove(dev_hdl)) { - di_init_driver(SEEPROM_DRIVER_NAME, 0); - devctl_device_remove(dev_hdl); - } - devctl_release(dev_hdl); -} - -static void -add_op_status(envmon_hpu_t *hpu, int *index) -{ - boolean_t rmc_flag; - boolean_t ps_flag; - boolean_t disk_flag; - char node_name[MAXPATHLEN]; - boolean_t flag; - - rmc_flag = (strcmp(hpu->id.name, RMC_NAME) == 0); - ps_flag = (strncmp(hpu->id.name, PS_NAME, - PS_NAME_LEN) == 0); - disk_flag = (strncmp(hpu->id.name, DISK_NAME, - DISK_NAME_LEN) == 0); - if (rmc_flag || ps_flag) { - idprop->idp[*index].envhandle = hpu->id; - flag = rmc_flag && ((sys_platform != PLAT_CHALUPA) && - (sys_platform != PLAT_CHALUPA19)); - sprintf_buf2(node_name, - flag ? SYS_BOARD_PATH : CHASSIS_LOC_PATH, ps_flag ? - ps_apid_to_nodename(hpu->id.name) : hpu->id.name); - - add_op_status_by_name(node_name, ps_flag ? PS_FRU_NAME : NULL, - &idprop->idp[(*index)++].volprop); - } else if (disk_flag) { - idprop->idp[*index].envhandle = hpu->id; - switch (sys_platform) { - case PLAT_CHALUPA: - case PLAT_CHALUPA19: - sprintf_buf2(node_name, CHASSIS_LOC_PATH, hpu->id.name); - break; - case PLAT_SEATTLE1U: - sprintf_buf2(node_name, SEATTLE1U_HDDBP_PATH, \ - hpu->id.name); - break; - case PLAT_SEATTLE2U: - sprintf_buf2(node_name, SEATTLE2U_HDDBP_PATH, \ - hpu->id.name); - break; - case PLAT_BOSTON: - sprintf_buf2(node_name, BOSTON_HDDBP_PATH, \ - hpu->id.name); - break; - default: - sprintf_buf2(node_name, SYS_BOARD_PATH, hpu->id.name); - break; - } - add_op_status_by_name(node_name, DISK_FRU_NAME, - &idprop->idp[(*index)++].volprop); - } -} diff --git a/usr/src/cmd/picl/plugins/sun4u/mpxu/frutree/Makefile b/usr/src/cmd/picl/plugins/sun4u/mpxu/frutree/Makefile deleted file mode 100644 index 76ed151f38..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/mpxu/frutree/Makefile +++ /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. -# -# cmd/picl/plugins/sun4u/mpxu/frutree/Makefile -# - -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-V240 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -INCDIR1 = . -INCDIR2 = ../frudr -INCS = -I$(INCDIR1) -I$(INCDIR2) -CONFS = piclfrutree.conf -ROOTCONF = $(CONFS:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 -MAININFO = $(CONFS:%.conf=%.info) -OTHERINFOS = $(INCDIR1)/system-board.info -OTHERINFOS += $(INCDIR2)/fru_HDD0_data.info -OTHERINFOS += $(INCDIR2)/fru_HDD1_data.info -OTHERINFOS += $(INCDIR2)/fru_HDD2_data.info -OTHERINFOS += $(INCDIR2)/fru_HDD2_data.info -OTHERINFOS += $(INCDIR2)/fru_PS0_data.info -OTHERINFOS += $(INCDIR2)/fru_PS1_data.info -OTHERINFOS += $(INCDIR2)/fru_SC_data.info -OTHERINFOS += $(INCDIR2)/fru_usb-a-1_data.info -OTHERINFOS += $(INCDIR2)/fru_usb-a-2_data.info - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: $(CONFS) - -install: $(ROOTLIBDIR) $(ROOTCONF) - -$(CONFS): $(MAININFO) $(OTHERINFOS) - @$(RM) -f $@ - @echo "# Copyright 2003 Sun Microsystems, Inc. " \ - "All rights reserved." > $@ - @echo "# Use is subject to license terms." >> $@ - @echo "# This is a generated file. #ident lines identify sources" >> $@ - $(CPP) -P $(INCS) $(@:%.conf=%.info) | \ - $(SED) -e '/^[ ]*$$/d' >> $@ - @$(CHMOD) 444 $@ - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/mpxu/frutree/piclfrutree.info b/usr/src/cmd/picl/plugins/sun4u/mpxu/frutree/piclfrutree.info deleted file mode 100644 index dba5558248..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/mpxu/frutree/piclfrutree.info +++ /dev/null @@ -1,414 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -/* - * There are a lot of nodes below the rmclomv node, define a shortname - */ -#define RMCLOMV /platform/pci@1e,600000/isa@7/rmc-comm@0,3e8/SUNW,rmclomv - -VERSION 1.1 -VERBOSE 1 -NODE frutree picl - NODE chassis fru - /* - * SunMC physical view view_points for this platform - * This will get moved to a separate SunMC physical view plugin later. - */ - PROP ViewPoints string r 0 "front rear side" - NODE MB location - PROP SlotType string r 0 "system-board" - PROP Label string r 0 "MB" - ENDNODE - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - ENDNODE - NODE F1 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F1" - ENDNODE - NODE F2 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F2" - ENDNODE - NODE PS0 location - PROP SlotType string r 0 "power-supply" - PROP Label string r 0 "PS0" - ENDNODE - NODE HDD0 location - PROP SlotType string r 0 "disk-slot" - PROP Label string r 0 "HDD0" - ENDNODE - NODE HDD1 location - PROP SlotType string r 0 "disk-slot" - PROP Label string r 0 "HDD1" - ENDNODE - NODE RMD0 location - PROP SlotType string r 0 "cdrom-slot" - PROP Label string r 0 "RMD0" - ENDNODE - NODE IFB location - PROP Label string r 0 "IFB" - NODE ifb fru - ENDNODE - ENDNODE - NODE BB location - PROP Label string r 0 "BB" - NODE bb fru - ENDNODE - ENDNODE - NODE HCM location - PROP Label string r 0 "HCM" - ENDNODE - NODE SCC location - PROP Label string r 0 "SCC" - NODE scc fru - ENDNODE - ENDNODE - NODE PCI0 location - PROP SlotType string r 0 "pci" - PROP Label string r 0 "PCI0" - ENDNODE - NODE USB0 location - PROP Label string r 0 "USB0" - ENDNODE - NODE USB1 location - PROP Label string r 0 "USB1" - ENDNODE - - /* - * nodes for extra hardware present in 1u version on ENxS - */ - REFNODE F3 location WITH /platform?PlatformName=SUNW,Sun-Fire-V210 - REFNODE F3 location WITH /platform?PlatformName=SUNW,Netra-240 - REFNODE F3 location WITH /platform?PlatformName=SUNW,Netra-210 - REFNODE F3 location WITH /platform?PlatformName=SUNW,Sun-Fire-V125 - REFNODE F4 location WITH /platform?PlatformName=SUNW,Netra-210 - REFNODE F5 location WITH /platform?PlatformName=SUNW,Netra-210 - REFNODE ALARM location WITH /platform?PlatformName=SUNW,Netra-210 - REFNODE DVDIF location WITH /platform?PlatformName=SUNW,Netra-210 - REFNODE SASPCI location WITH /platform?PlatformName=SUNW,Netra-210 - REFNODE SYSCTRL location WITH /platform?PlatformName=SUNW,Netra-210 - - /* - * nodes for extra hardware present in 2u version on ENxS - */ - REFNODE HDD2 location WITH /platform?PlatformName=SUNW,Sun-Fire-V240 - REFNODE HDD3 location WITH /platform?PlatformName=SUNW,Sun-Fire-V240 - REFNODE PS1 location WITH /platform?PlatformName=SUNW,Sun-Fire-V240 - REFNODE PS1 location WITH /platform?PlatformName=SUNW,Netra-240 - REFNODE PRB location WITH /platform?PlatformName=SUNW,Sun-Fire-V240 - REFNODE PRB location WITH /platform?PlatformName=SUNW,Netra-240 - REFNODE PDB location WITH /platform?PlatformName=SUNW,Sun-Fire-V240 - REFNODE PDB location WITH /platform?PlatformName=SUNW,Netra-240 - REFNODE PCI1 location WITH /platform?PlatformName=SUNW,Sun-Fire-V240 - REFNODE PCI1 location WITH /platform?PlatformName=SUNW,Netra-240 - REFNODE PCI2 location WITH /platform?PlatformName=SUNW,Sun-Fire-V240 - REFNODE PCI2 location WITH /platform?PlatformName=SUNW,Netra-240 - REFNODE SYSCTRL location WITH /platform?PlatformName=SUNW,Sun-Fire-V240 - REFNODE SYSCTRL location WITH /platform?PlatformName=SUNW,Netra-240 - REFNODE ALARM location WITH /platform?PlatformName=SUNW,Netra-240 - ENDNODE -ENDNODE - -/* - * add power-supply nodes if their fru-proms are visible - */ -name:/frutree/chassis/PS0 - REFNODE power-supply fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,b0 -name:/frutree/chassis/PS1 - REFNODE power-supply fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/power-supply-fru-prom@0,a4 - -/* - * add properties to 2u locations - */ - -/* extra disks */ -name:/frutree/chassis/HDD2 - PROP SlotType string r 0 "disk-slot" - PROP Label string r 0 "HDD2" -name:/frutree/chassis/HDD3 - PROP SlotType string r 0 "disk-slot" - PROP Label string r 0 "HDD3" - -/* add disk fru nodes for disks which are present */ -name:/frutree/chassis/HDD0 - REFNODE disk fru WITH name:/platform/pci@1c,600000/scsi@2/sd@0,0 -name:/frutree/chassis/HDD1 - REFNODE disk fru WITH name:/platform/pci@1c,600000/scsi@2/sd@1,0 -name:/frutree/chassis/HDD2 - REFNODE disk fru WITH name:/platform/pci@1c,600000/scsi@2/sd@2,0 -name:/frutree/chassis/HDD3 - REFNODE disk fru WITH name:/platform/pci@1c,600000/scsi@2/sd@3,0 - -/* add disk fru nodes for SAS disks which are present */ -name:/frutree/chassis/HDD0 - REFNODE disk fru WITH name:/platform/pci@1c,600000/LSILogic,sas@1/sd@0,0 -name:/frutree/chassis/HDD1 - REFNODE disk fru WITH name:/platform/pci@1c,600000/LSILogic,sas@1/sd@1,0 - -/* add cdrom fru nodes for disks which are present */ -name:/frutree/chassis/RMD0 - REFNODE cdrom fru WITH name:/platform/pci@1e,600000/ide@d/sd@0,0 - -/* populate fan locations with fans which are present */ -name:/frutree/chassis/F0 - REFNODE fan-unit fru WITH name:RMCLOMV/f0_rs -name:/frutree/chassis/F1 - REFNODE fan-unit fru WITH name:RMCLOMV/f1_rs -name:/frutree/chassis/F2 - REFNODE fan-unit fru WITH name:RMCLOMV/f2_rs - -/* extra chassis fan */ -name:/frutree/chassis/F3 - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F3" - REFNODE fan-unit fru WITH name:RMCLOMV/f3_rs - -name:/frutree/chassis/F4 - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F4" - REFNODE fan-unit fru WITH name:RMCLOMV/f4_rs - -name:/frutree/chassis/F5 - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F5" - REFNODE fan-unit fru WITH name:RMCLOMV/f5_rs - -/* extra power supply */ -name:/frutree/chassis/PS1 - PROP SlotType string r 0 "power-supply" - PROP Label string r 0 "PS1" - -/* PCI riser board */ -name:/frutree/chassis/PRB - PROP Label string r 0 "PRB" - NODE prb fru - ENDNODE - -/* Power distribution board */ -name:/frutree/chassis/PDB - PROP Label string r 0 "PDB" - NODE pdb fru - ENDNODE - -/* Extra PCI slots */ -name:/frutree/chassis/PCI1 - PROP SlotType string r 0 "pci" - PROP Label string r 0 "PCI1" - -name:/frutree/chassis/PCI2 - PROP SlotType string r 0 "pci" - PROP Label string r 0 "PCI2" - -/* keyswitch */ -name:/frutree/chassis/SYSCTRL - PROP Label string r 0 "SYSCTRL" - -/* an anomoly, the chassis fruid prom */ -name:/frutree/chassis/IFB/ifb - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/chassis-fru-prom@0,a8 - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/chassis-fru-prom@0,a8 - REFPROP _fru_parent /frutree/chassis/IFB/ifb - -/* - * high speed cryptographic module - */ -name:/frutree/chassis/HCM - REFNODE hcm fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/hcm-card-fru-prom@0,d6 - -name:/frutree/chassis/HCM/hcm - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/hcm-card-fru-prom@0,d6 - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/hcm-card-fru-prom@0,d6 - REFPROP _fru_parent /frutree/chassis/HCM/hcm - -name:/platform/pci@1c,600000/cpu?DeviceID=1 - REFPROP _fru_parent /frutree/chassis/HCM/hcm - -name:/frutree/chassis/ALARM - PROP Label string r 0 "ALARM" - REFNODE alarm fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/alarm-fru-prom@0,ac - -name:/frutree/chassis/ALARM/alarm - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/alarm-fru-prom@0,ac - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/alarm-fru-prom@0,ac - REFPROP _fru_parent /frutree/chassis/ALARM/alarm - -/* - * dvd if - */ -name:/frutree/chassis/DVDIF - PROP Label string r 0 "DVDIF" - REFNODE dvdif fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/dvd-if-fru-prom@0,aa - -name:/frutree/chassis/DVDIF/dvdif - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/dvd-if-fru-prom@0,aa - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dvd-if-fru-prom@0,aa - REFPROP _fru_parent /frutree/chassis/DVDIF/dvdif - -/* - * sas if - */ -name:/frutree/chassis/SASIF - PROP Label string r 0 "SASIF" - REFNODE sasif fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/sas-if-fru-prom@0,a8 - -name:/frutree/chassis/SASIF/sasif - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/sas-if-fru-prom@0,a8 - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/sas-if-fru-prom@0,a8 - REFPROP _fru_parent /frutree/chassis/SASIF/sasif - -/* - * sas pci - */ -name:/frutree/chassis/SASPCI - PROP Label string r 0 "SASPCI" - REFNODE saspci fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/sas-pci-fru-prom@0,d8 - -name:/frutree/chassis/SASPCI/saspci - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/sas-pci-fru-prom@0,d8 - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/sas-pci-fru-prom@0,d8 - REFPROP _fru_parent /frutree/chassis/SASPCI/saspci - - -name:/frutree/chassis/PCI0 - REFNODE pci-card fru WITH _class:/jbus/pci@1d,700000/picl?DeviceID=1 -name:/frutree/chassis/PCI1 - REFNODE pci-card fru WITH _class:/jbus/pci@1e,600000/picl?DeviceID=3 -name:/frutree/chassis/PCI2 - REFNODE pci-card fru WITH _class:/jbus/pci@1e,600000/picl?DeviceID=2 - -#include -#include "system-board.info" -#include - -_class:/jbus/pci@1d,700000/picl@1 - REFPROP _fru_parent name:/frutree/chassis/PCI0/pci-card -_class:/jbus/pci@1d,700000/picl@1,0 - REFPROP _fru_parent name:/frutree/chassis/PCI0/pci-card -_class:/jbus/pci@1d,700000/picl@1,1 - REFPROP _fru_parent name:/frutree/chassis/PCI0/pci-card -_class:/jbus/pci@1d,700000/picl@1,2 - REFPROP _fru_parent name:/frutree/chassis/PCI0/pci-card -_class:/jbus/pci@1d,700000/picl@1,3 - REFPROP _fru_parent name:/frutree/chassis/PCI0/pci-card -_class:/jbus/pci@1d,700000/picl@1,4 - REFPROP _fru_parent name:/frutree/chassis/PCI0/pci-card -_class:/jbus/pci@1d,700000/picl@1,5 - REFPROP _fru_parent name:/frutree/chassis/PCI0/pci-card -_class:/jbus/pci@1d,700000/picl@1,6 - REFPROP _fru_parent name:/frutree/chassis/PCI0/pci-card -_class:/jbus/pci@1d,700000/picl@1,7 - REFPROP _fru_parent name:/frutree/chassis/PCI0/pci-card -_class:/jbus/pci@1e,600000/picl@3 - REFPROP _fru_parent name:/frutree/chassis/PCI1/pci-card -_class:/jbus/pci@1e,600000/picl@3,0 - REFPROP _fru_parent name:/frutree/chassis/PCI1/pci-card -_class:/jbus/pci@1e,600000/picl@3,1 - REFPROP _fru_parent name:/frutree/chassis/PCI1/pci-card -_class:/jbus/pci@1e,600000/picl@3,2 - REFPROP _fru_parent name:/frutree/chassis/PCI1/pci-card -_class:/jbus/pci@1e,600000/picl@3,3 - REFPROP _fru_parent name:/frutree/chassis/PCI1/pci-card -_class:/jbus/pci@1e,600000/picl@3,4 - REFPROP _fru_parent name:/frutree/chassis/PCI1/pci-card -_class:/jbus/pci@1e,600000/picl@3,5 - REFPROP _fru_parent name:/frutree/chassis/PCI1/pci-card -_class:/jbus/pci@1e,600000/picl@3,6 - REFPROP _fru_parent name:/frutree/chassis/PCI1/pci-card -_class:/jbus/pci@1e,600000/picl@3,7 - REFPROP _fru_parent name:/frutree/chassis/PCI1/pci-card -_class:/jbus/pci@1e,600000/picl@2 - REFPROP _fru_parent name:/frutree/chassis/PCI2/pci-card -_class:/jbus/pci@1e,600000/picl@2,0 - REFPROP _fru_parent name:/frutree/chassis/PCI2/pci-card -_class:/jbus/pci@1e,600000/picl@2,1 - REFPROP _fru_parent name:/frutree/chassis/PCI2/pci-card -_class:/jbus/pci@1e,600000/picl@2,2 - REFPROP _fru_parent name:/frutree/chassis/PCI2/pci-card -_class:/jbus/pci@1e,600000/picl@2,3 - REFPROP _fru_parent name:/frutree/chassis/PCI2/pci-card -_class:/jbus/pci@1e,600000/picl@2,4 - REFPROP _fru_parent name:/frutree/chassis/PCI2/pci-card -_class:/jbus/pci@1e,600000/picl@2,5 - REFPROP _fru_parent name:/frutree/chassis/PCI2/pci-card -_class:/jbus/pci@1e,600000/picl@2,6 - REFPROP _fru_parent name:/frutree/chassis/PCI2/pci-card -_class:/jbus/pci@1e,600000/picl@2,7 - REFPROP _fru_parent name:/frutree/chassis/PCI2/pci-card diff --git a/usr/src/cmd/picl/plugins/sun4u/mpxu/frutree/system-board.info b/usr/src/cmd/picl/plugins/sun4u/mpxu/frutree/system-board.info deleted file mode 100644 index 95d66d558a..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/mpxu/frutree/system-board.info +++ /dev/null @@ -1,283 +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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #ident "%Z%%M% %I% %E% SMI" - * - * This file creates the system board structure - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -/* - * Motherboard properties - */ -name:/frutree/chassis/MB - NODE system-board fru - NODE SC location - PROP Label string r 0 "SC" - NODE sc fru - ENDNODE - ENDNODE - NODE BAT location - PROP Label string r 0 "BAT" - NODE battery fru - ENDNODE - ENDNODE - ENDNODE - -/* - * motherboard seeprom source - */ -name:/frutree/chassis/MB/system-board - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/motherboard-fru-prom@0,a2 - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/motherboard-fru-prom@0,a2 - REFPROP _fru_parent /frutree/chassis/MB/system-board - -/* - * Processors - */ -name:/frutree/chassis/MB/system-board -NODE P0 location - PROP SlotType string r 0 "cpu" - PROP Label string r 0 "P0" -ENDNODE -NODE P1 location - PROP SlotType string r 0 "cpu" - PROP Label string r 0 "P1" -ENDNODE - -/* - * Processor 0 - */ -name:/frutree/chassis/MB/system-board/P0 - REFNODE cpu fru WITH name:/platform/SUNW,UltraSPARC-IIIi@0,0 -name:/frutree/chassis/MB/system-board/P0/cpu - REFNODE F0 location WITH name:/frutree/chassis/MB/system-board/P0/cpu -name:/frutree/chassis/MB/system-board/P0/cpu/F0 - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - REFNODE fan-unit fru WITH name:RMCLOMV/mb_p0_f0_rs -name:/frutree/chassis/MB/system-board/P0/cpu - REFNODE F1 location WITH name:/frutree/chassis/MB/system-board/P0/cpu -name:/frutree/chassis/MB/system-board/P0/cpu/F1 - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F1" - REFNODE fan-unit fru WITH name:RMCLOMV/mb_p0_f1_rs -name:/frutree/chassis/MB/system-board/P0/cpu - REFNODE B0 location WITH name:/frutree/chassis/MB/system-board/P0/cpu -name:/frutree/chassis/MB/system-board/P0/cpu/B0 - PROP Label string r 0 "B0" - REFNODE bank fru WITH name:/frutree/chassis/MB/system-board/P0/cpu -name:/frutree/chassis/MB/system-board/P0/cpu/B0/bank - REFNODE D0 location WITH name:/frutree/chassis/MB/system-board/P0/cpu - REFNODE D1 location WITH name:/frutree/chassis/MB/system-board/P0/cpu -name:/frutree/chassis/MB/system-board/P0/cpu - REFNODE B1 location WITH name:/frutree/chassis/MB/system-board/P0/cpu -name:/frutree/chassis/MB/system-board/P0/cpu/B1 - PROP Label string r 0 "B1" - REFNODE bank fru WITH name:/frutree/chassis/MB/system-board/P0/cpu -name:/frutree/chassis/MB/system-board/P0/cpu/B1/bank - REFNODE D0 location WITH name:/frutree/chassis/MB/system-board/P0/cpu - REFNODE D1 location WITH name:/frutree/chassis/MB/system-board/P0/cpu - -/* - * Processor 1 - */ -name:/frutree/chassis/MB/system-board/P1 - REFNODE cpu fru WITH name:/platform/SUNW,UltraSPARC-IIIi@1,0 -name:/frutree/chassis/MB/system-board/P1/cpu - REFNODE F0 location WITH name:/frutree/chassis/MB/system-board/P1/cpu -name:/frutree/chassis/MB/system-board/P1/cpu/F0 - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - REFNODE fan-unit fru WITH name:RMCLOMV/mb_p1_f0_rs -name:/frutree/chassis/MB/system-board/P1/cpu - REFNODE F1 location WITH name:/frutree/chassis/MB/system-board/P1/cpu -name:/frutree/chassis/MB/system-board/P1/cpu/F1 - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F1" - REFNODE fan-unit fru WITH name:RMCLOMV/mb_p1_f1_rs -name:/frutree/chassis/MB/system-board/P1/cpu - REFNODE B0 location WITH name:/frutree/chassis/MB/system-board/P1/cpu -name:/frutree/chassis/MB/system-board/P1/cpu/B0 - PROP Label string r 0 "B0" - REFNODE bank fru WITH name:/frutree/chassis/MB/system-board/P1/cpu -name:/frutree/chassis/MB/system-board/P1/cpu/B0/bank - REFNODE D0 location WITH name:/frutree/chassis/MB/system-board/P1/cpu - REFNODE D1 location WITH name:/frutree/chassis/MB/system-board/P1/cpu -name:/frutree/chassis/MB/system-board/P1/cpu - REFNODE B1 location WITH name:/frutree/chassis/MB/system-board/P1/cpu -name:/frutree/chassis/MB/system-board/P1/cpu/B1 - PROP Label string r 0 "B1" - REFNODE bank fru WITH name:/frutree/chassis/MB/system-board/P1/cpu -name:/frutree/chassis/MB/system-board/P1/cpu/B1/bank - REFNODE D0 location WITH name:/frutree/chassis/MB/system-board/P1/cpu - REFNODE D1 location WITH name:/frutree/chassis/MB/system-board/P1/cpu - -/* - * Processor 0 memory - */ -name:/frutree/chassis/MB/system-board/P0/cpu/B0/bank/D0 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D0" -name:/frutree/chassis/MB/system-board/P0/cpu/B0/bank/D1 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D1" -name:/frutree/chassis/MB/system-board/P0/cpu/B1/bank/D0 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D0" -name:/frutree/chassis/MB/system-board/P0/cpu/B1/bank/D1 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D1" - -/* - * Processor 1 memory - */ -name:/frutree/chassis/MB/system-board/P1/cpu/B0/bank/D0 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D0" -name:/frutree/chassis/MB/system-board/P1/cpu/B0/bank/D1 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D1" -name:/frutree/chassis/MB/system-board/P1/cpu/B1/bank/D0 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D0" -name:/frutree/chassis/MB/system-board/P1/cpu/B1/bank/D1 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D1" - -/* - * Dimm nodes - */ -name:/frutree/chassis/MB/system-board/P0/cpu/B0/bank/D0 - REFNODE mem-module fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,b6 -name:/frutree/chassis/MB/system-board/P0/cpu/B0/bank/D1 - REFNODE mem-module fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,b8 -name:/frutree/chassis/MB/system-board/P0/cpu/B1/bank/D0 - REFNODE mem-module fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,ba -name:/frutree/chassis/MB/system-board/P0/cpu/B1/bank/D1 - REFNODE mem-module fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,bc -name:/frutree/chassis/MB/system-board/P1/cpu/B0/bank/D0 - REFNODE mem-module fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,c6 -name:/frutree/chassis/MB/system-board/P1/cpu/B0/bank/D1 - REFNODE mem-module fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,c8 -name:/frutree/chassis/MB/system-board/P1/cpu/B1/bank/D0 - REFNODE mem-module fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,ca -name:/frutree/chassis/MB/system-board/P1/cpu/B1/bank/D1 - REFNODE mem-module fru WITH name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,cc - -/* - * DIMM seeprom sources - */ -name:/frutree/chassis/MB/system-board/P0/cpu/B0/bank/D0/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,b6 -name:/frutree/chassis/MB/system-board/P0/cpu/B0/bank/D1/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,b8 -name:/frutree/chassis/MB/system-board/P0/cpu/B1/bank/D0/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,ba -name:/frutree/chassis/MB/system-board/P0/cpu/B1/bank/D1/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,bc -name:/frutree/chassis/MB/system-board/P1/cpu/B0/bank/D0/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,c6 -name:/frutree/chassis/MB/system-board/P1/cpu/B0/bank/D1/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,c8 -name:/frutree/chassis/MB/system-board/P1/cpu/B1/bank/D0/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,ca -name:/frutree/chassis/MB/system-board/P1/cpu/B1/bank/D1/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,cc - -/* - * DIMM FRU parents - */ -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,b6 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/P0/cpu/B0/bank/D0/mem-module -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,b8 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/P0/cpu/B0/bank/D1/mem-module -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,ba - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/P0/cpu/B1/bank/D0/mem-module -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,bc - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/P0/cpu/B1/bank/D1/mem-module -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,c6 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/P1/cpu/B0/bank/D0/mem-module -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,c8 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/P1/cpu/B0/bank/D1/mem-module -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,ca - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/P1/cpu/B1/bank/D0/mem-module -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,cc - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/P1/cpu/B1/bank/D1/mem-module - -name:/platform/SUNW,UltraSPARC-IIIi@0,0 - REFPROP _fru_parent /frutree/chassis/MB/system-board/P0/cpu - -name:/platform/SUNW,UltraSPARC-IIIi@1,0 - REFPROP _fru_parent /frutree/chassis/MB/system-board/P1/cpu - -/* - * DIMM parents - */ -name:/platform/memory-controller@0,0/memory-module-group?ID=0/memory-module?ID=0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/P0/cpu/B0/bank/D0/mem-module -name:/platform/memory-controller@0,0/memory-module-group?ID=0/memory-module?ID=1 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/P0/cpu/B0/bank/D1/mem-module -name:/platform/memory-controller@0,0/memory-module-group?ID=1/memory-module?ID=0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/P0/cpu/B1/bank/D0/mem-module -name:/platform/memory-controller@0,0/memory-module-group?ID=1/memory-module?ID=1 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/P0/cpu/B1/bank/D1/mem-module -name:/platform/memory-controller@1,0/memory-module-group?ID=0/memory-module?ID=0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/P1/cpu/B0/bank/D0/mem-module -name:/platform/memory-controller@1,0/memory-module-group?ID=0/memory-module?ID=1 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/P1/cpu/B0/bank/D1/mem-module -name:/platform/memory-controller@1,0/memory-module-group?ID=1/memory-module?ID=0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/P1/cpu/B1/bank/D0/mem-module -name:/platform/memory-controller@1,0/memory-module-group?ID=1/memory-module?ID=1 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/P1/cpu/B1/bank/D1/mem-module -/* - * create reference properties for motherboard pci devices - */ -_class:/jbus/pci@1c,600000 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -_class:/jbus/pci@1d,700000 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -_class:/jbus/pci@1e,600000 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -_class:/jbus/pci@1f,700000 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board diff --git a/usr/src/cmd/picl/plugins/sun4u/psvc/Makefile b/usr/src/cmd/picl/plugins/sun4u/psvc/Makefile deleted file mode 100644 index 5f6b53ea20..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/psvc/Makefile +++ /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, 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 -# -# -#ident "%Z%%M% %I% %E% SMI" -# -# Copyright (c) 1999-2000 by Sun Microsystems, Inc. -# All rights reserved. -# -# cmd/picl/plugins/sun4u/psvc/Makefile -# - -SUBDIRS= psvcobj psvcplugin psvcpolicy .WAIT - -MSGSUBDIRS= psvcobj psvcplugin psvcpolicy .WAIT - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -.KEEP_STATE: - -all install clean clobber: $(SUBDIRS) - -_msg: $(MSGSUBDIRS) - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/psvc/psvcobj/Makefile b/usr/src/cmd/picl/plugins/sun4u/psvc/psvcobj/Makefile deleted file mode 100644 index 14779d8c0b..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/psvc/psvcobj/Makefile +++ /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, 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" -# - -LIBRARY= libpsvcobj.a -VERS= .1 - -OBJECTS= psvcobj.o - -# include library definitions -include $(SRC)/lib/Makefile.lib -include $(SRC)/Makefile.psm - -include $(SRC)/cmd/picl/plugins/Makefile.com - -SRCS= $(OBJECTS:%.o=%.c) - -LIBS = $(DYNLIB) - -PLATFORM = sun4u - -USR_PLAT_PSVCOBJ = $(LIBS:%=$(USR_PSM_LIB_DIR)/%) - -CPPFLAGS += -I$(SRC)/uts/sun4u -I. - -LDLIBS += -L$(SRC)/lib/libdevfsevent -LDLIBS += -lc - -# definitions for install_h target -HDRS= psvc_objects.h -PLATHDRS= $(HDRS:%=$(USR_PSM_INCL_DIR)/%) -CHECKHDRS= $(HDRS:%.h=%.check) - -.KEEP_STATE: - -SUBDIRS= - -POFILE= psvcobj.po - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -all: $(LIBS) $(LIBLINKS) - -install: all $(USR_PSM_LIB_DIR) $(USR_PLAT_PSVCOBJ) - -install_h: $(USR_PSM_INCL_DIR) $(PLATHDRS) - -$(LIBLINKS): FRC - $(RM) $(LIBLINKS); $(SYMLINK) $(DYNLIB) $(LIBLINKS) - -_msg: $(POFILE) - -# include library targets -include $(SRC)/cmd/picl/plugins/Makefile.targ -include $(SRC)/lib/Makefile.targ - -$(USR_PSM_LIB_DIR): FRC - $(INS.dir) - -$(USR_PSM_INCL_DIR)/%: % - $(INS.file) - -$(USR_PSM_LIB_DIR)/%: % $(USR_PSM_LIB_DIR) - $(INS.file) ;\ - $(RM) -r $(USR_PSM_LIB_DIR)/libpsvcobj.so; \ - $(SYMLINK) ./libpsvcobj.so$(VERS) $(USR_PSM_LIB_DIR)/libpsvcobj.so - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/psvc/psvcobj/psvc_objects.h b/usr/src/cmd/picl/plugins/sun4u/psvc/psvcobj/psvc_objects.h deleted file mode 100644 index 44c6f44496..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/psvc/psvcobj/psvc_objects.h +++ /dev/null @@ -1,333 +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 _PSVC_OBJECTS_H -#define _PSVC_OBJECTS_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Platform Services Framework definitions - */ - -#include -#include - -typedef struct psvc_opaque *psvc_opaque_t; - -/* Return values */ -#define PSVC_SUCCESS 0 -#define PSVC_FAILURE -1 -#define PSVC_NOT_USED -1 - -/* Class definitions */ -#define PSVC_TEMPERATURE_SENSOR_CLASS 0 -#define PSVC_FAN_CLASS 1 -#define PSVC_LED_CLASS 2 -#define PSVC_SYSTEM_CLASS 3 -#define PSVC_DIGITAL_SENSOR_CLASS 4 -#define PSVC_DIGITAL_CONTROL_CLASS 5 -#define PSVC_BOOLEAN_GPIO_CLASS 6 -#define PSVC_FAN_TACHOMETER_CLASS 7 -#define PSVC_ON_OFF_SWITCH_CLASS 8 -#define PSVC_KEYSWITCH_CLASS 9 -#define PSVC_8BIT_GPIO_CLASS 10 -#define PSVC_PHYSICAL_DEVICE_CLASS 11 - -#define PSVC_CHASSIS "SYSTEM" - -/* Associations */ -#define PSVC_PRESENCE_SENSOR 0 -#define PSVC_FAN_ONOFF_SENSOR 1 -#define PSVC_FAN_SPEED_TACHOMETER 2 -#define PSVC_FAN_PRIM_SEC_SELECTOR 3 -#define PSVC_DEV_TEMP_SENSOR 4 -#define PSVC_FAN_DRIVE_CONTROL 5 -#define PSVC_KS_NORMAL_POS_SENSOR 6 -#define PSVC_KS_DIAG_POS_SENSOR 7 -#define PSVC_KS_LOCK_POS_SENSOR 8 -#define PSVC_KS_OFF_POS_SENSOR 9 -#define PSVC_SLOT_FAULT_LED 10 -#define PSVC_SLOT_REMOVE_LED 11 -#define PSVC_TS_OVERTEMP_LED 12 -#define PSVC_PS_I_SENSOR 13 -#define PSVC_DEV_FAULT_SENSOR 14 -#define PSVC_DEV_FAULT_LED 15 -#define PSVC_TABLE 16 -#define PSVC_PARENT 17 -#define PSVC_CPU 18 -#define PSVC_ALTERNATE 19 -#define PSVC_HOTPLUG_ENABLE_SWITCH 20 -#define PSVC_PS 21 -#define PSVC_FAN 22 -#define PSVC_TS 23 -#define PSVC_DISK 24 -#define PSVC_LED 25 -#define PSVC_FSP_LED 26 -#define PSVC_KEYSWITCH 27 -#define PSVC_PCI_CARD 28 -#define PSVC_PHYSICAL_DEVICE 29 -#define PSVC_DEV_TYPE_SENSOR 30 -#define PSVC_FAN_TRAY_FANS 31 -#define PSVC_FRU 32 - - -/* Device "feature" definitions */ -#define PSVC_DEV_PERM 0x0000000000000001ULL /* Permanently in sys */ -#define PSVC_DEV_HOTPLUG 0x0000000000000002ULL /* Hot-pluggable device */ -#define PSVC_DEV_OPTION 0x0000000000000004ULL /* Option (not hot-pluggable) */ -#define PSVC_DEV_PRIMARY 0x0000000000000010ULL /* Primary device */ -#define PSVC_DEV_SECONDARY 0x0000000000000020ULL /* Secondary device */ -#define PSVC_DEV_RDONLY 0x0000000000000100ULL /* Read only device */ -#define PSVC_DEV_RDWR 0x0000000000000400ULL /* read/write device */ -#define PSVC_DEV_FRU 0x0000000000000800ULL /* device is a FRU */ -#define PSVC_LOW_WARN 0x0000000000001000ULL -#define PSVC_LOW_SHUT 0x0000000000002000ULL -#define PSVC_HIGH_WARN 0x0000000000004000ULL -#define PSVC_HIGH_SHUT 0x0000000000008000ULL -#define PSVC_CONVERSION_TABLE 0x0000000000010000ULL /* Conversion table */ -#define PSVC_OPT_TEMP 0x0000000000020000ULL /* Optimal Temperature */ -#define PSVC_HW_LOW_SHUT 0x0000000000040000ULL -#define PSVC_HW_HIGH_SHUT 0x0000000000080000ULL -#define PSVC_FAN_DRIVE_PR 0x0001000000000000ULL -#define PSVC_TEMP_DRIVEN 0x0002000000000000ULL /* Temperature driven */ -#define PSVC_SPEED_CTRL_PR 0x0004000000000000ULL /* Variable speed ctrl */ -#define PSVC_FAN_ON_OFF 0x0008000000000000ULL /* On/off fans */ -#define PSVC_CLOSED_LOOP_CTRL 0x0010000000000000ULL /* Closed loop control */ -#define PSVC_FAN_DRIVE_TABLE_PR 0x0010000000000000ULL /* oC to fan input tbl */ -#define PSVC_DIE_TEMP 0x0001000000000000ULL -#define PSVC_AMB_TEMP 0x0002000000000000ULL -#define PSVC_DIGI_SENSOR 0x0100000000000000ULL /* A to D converter */ -#define PSVC_BI_STATE 0x0001000000000000ULL -#define PSVC_TRI_STATE 0x0002000000000000ULL -#define PSVC_GREEN 0x0010000000000000ULL -#define PSVC_AMBER 0x0020000000000000ULL -#define PSVC_OUTPUT 0x0100000000000000ULL -#define PSVC_INPUT 0x0200000000000000ULL -#define PSVC_BIDIR 0x0400000000000000ULL -#define PSVC_BIT_POS 0x0001000000000000ULL /* One bit per key positon */ -#define PSVC_VAL_POS 0x0002000000000000ULL /* One value per key position */ -#define PSVC_NORMAL_POS_AV 0x0010000000000000ULL -#define PSVC_DIAG_POS_AV 0x0020000000000000ULL -#define PSVC_LOCK_POS_AV 0x0040000000000000ULL -#define PSVC_OFF_POS_AV 0x0080000000000000ULL -#define PSVC_GPIO_PORT 0x0001000000000000ULL -#define PSVC_GPIO_REG 0x0002000000000000ULL - - -/* LED colors */ -#define PSVC_LED_GREEN "GREEN" -#define PSVC_LED_AMBER "AMBER" -#define PSVC_LED_WHITE "WHITE" -#define PSVC_LED_RED "RED" - -/* States */ -#define PSVC_OK "OK" -#define PSVC_ERROR "ERROR" -#define PSVC_DEGRADED "DEGRADED" -#define PSVC_STOPPED "STOPPED" -#define PSVC_OVERHEATING "OVERHEATING" -#define PSVC_OFF "OFF" -#define PSVC_ON "ON" -#define PSVC_HOTPLUGGED "HOTPLUGGED" /* hotplugged, but not yet enabled */ - -/* - * The Following States are for the Locking Object created by PSARC 2002/003 - */ -#define PSVC_LOCK_RUNNING "running" -#define PSVC_LOCK_ENABLED "enabled" -#define PSVC_LOCK_DISABLED "disabled" - -/* LED states */ -#define PSVC_LED_OFF PSVC_OFF -#define PSVC_LED_ON PSVC_ON -#define PSVC_LED_SLOW_BLINK "SLOW_BLINK" -#define PSVC_LED_FAST_BLINK "FAST_BLINK" - -/* On/Off switch states */ -#define PSVC_SWITCH_OFF PSVC_OFF -#define PSVC_SWITCH_ON PSVC_ON - -/* Keyswitch positions */ -#define PSVC_OFF_POS PSVC_OFF -#define PSVC_NORMAL_POS "NORMAL" -#define PSVC_LOCKED_POS "LOCKED" -#define PSVC_DIAG_POS "DIAG" - -/* Fault strings */ -#define PSVC_NO_FAULT "NO_FAULT" -#define PSVC_GEN_FAULT "DEVICE_FAULT" -#define PSVC_PS_LLO_FLT "PS_LLO_FAULT" -#define PSVC_PS_FAN_FLT "PS_FAN_FAULT" -#define PSVC_PS_TEMP_FLT "PS_TEMP_FAULT" -#define PSVC_PS_ISHARE_FLT "PS_ISHARE_FAULT" -#define PSVC_PS_TYPE_FLT "PS_TYPE_FLT" -#define PSVC_TEMP_LO_WARN "TEMP_LOW_WARNING" -#define PSVC_TEMP_LO_SHUT "TEMP_LOW_SHUTDOWN" -#define PSVC_TEMP_HI_WARN "TEMP_HIGH_WARNING" -#define PSVC_TEMP_HI_SHUT "TEMP_HIGH_SHUTDOWN" - -/* - * When Adding Attributes be sure to add the string value of the - * Attribute to attr_str_tab in psvc_objects_class.h - */ - -/* Attribute names */ -#define PSVC_CLASS_ATTR 0 /* "_class" */ -#define PSVC_SUBCLASS_ATTR 1 /* "Subclass" */ -#define PSVC_PRESENCE_ATTR 2 /* "Presence" */ -#define PSVC_PREV_PRESENCE_ATTR 3 /* Previous-presence */ -#define PSVC_STATE_ATTR 4 /* "State" */ -#define PSVC_PREV_STATE_ATTR 5 /* "Previous-state" */ -#define PSVC_ENABLE_ATTR 6 /* "Enabled" */ -#define PSVC_FAULTID_ATTR 7 /* "FaultInformation" */ -#define PSVC_FEATURES_ATTR 8 /* "Features" */ -#define PSVC_LABEL_ATTR 9 /* "Label" */ -#define PSVC_FRUID_ATTR 10 /* "Fruid" */ -#define PSVC_INSTANCE_ATTR 11 /* "Instance" */ -#define PSVC_LED_COLOR_ATTR 12 /* "Led-color" */ -#define PSVC_LO_WARN_ATTR 13 /* "Lo-warn" */ -#define PSVC_LO_SHUT_ATTR 14 /* "Lo-shut" */ -#define PSVC_HI_WARN_ATTR 15 /* "Hi-warn" */ -#define PSVC_HI_SHUT_ATTR 16 /* "Hi-shut" */ -#define PSVC_OPTIMAL_TEMP_ATTR 17 /* "Opt-temp" */ -#define PSVC_HW_HI_SHUT_ATTR 18 /* "Hw-hi-shut" */ -#define PSVC_HW_LO_SHUT_ATTR 19 /* "Hw-lo-shut" */ -#define PSVC_SETPOINT_ATTR 20 /* "Setpoint" */ -#define PSVC_HYSTERESIS_ATTR 21 /* "Hysteresis" */ -#define PSVC_LOOPGAIN_ATTR 22 /* "Loopgain" */ -#define PSVC_LOOPBIAS_ATTR 23 /* "Loopbias" */ -#define PSVC_TEMP_DIFFERENTIAL_ATTR 24 /* "Temp_differential" */ -#define PSVC_TEMP_DIFFERENTIAL_INDEX_ATTR 25 /* Temp_differential_index */ -#define PSVC_SENSOR_VALUE_ATTR 26 /* "Sensor-value" */ -#define PSVC_GPIO_VALUE_ATTR 27 /* "Gpio-value" */ -#define PSVC_GPIO_BITS 28 /* "#Bits" */ -#define PSVC_CONTROL_VALUE_ATTR 29 /* "Control-value" */ -#define PSVC_LED_STATE_ATTR 30 /* "Led-state" */ -#define PSVC_SWITCH_STATE_ATTR 31 /* "Switch-state" */ -#define PSVC_PROBE_RESULT_ATTR 32 /* "Probe-result" */ -#define PSVC_TABLE_VALUE_ATTR 33 /* "Table_value" */ -#define PSVC_ASSOC_ID_ATTR 34 /* "Assoc_id" */ -#define PSVC_ASSOC_MATCHES_ATTR 35 /* "Assoc_matches" */ -#define PSVC_ADDR_SPEC_ATTR 36 /* "Addr-spec" */ -#define PSVC_OBJECT_ID_ATTR 37 /* "Object-id" */ -#define PSVC_LIT_COUNT_ATTR 38 /* "Led-lit-count" */ -#define PSVC_FRU_INFO_ATTR 39 /* "FRU-info" */ - -#define PSVC_LED_IS_LOCATOR_ATTR 40 /* "IsLocator" */ -#define PSVC_LED_LOCATOR_NAME_ATTR 41 /* "LocatorName" */ -#define PSVC_LOCATOR_TRUE "true" - -/* PSVC_PRESENCE_ATTR values */ -#define PSVC_ABSENT 0 -#define PSVC_PRESENT 1 - -/* PSVC_ENABLE_ATTR values */ -#define PSVC_DISABLED 0 -#define PSVC_ENABLED 1 - -/* PSVC_PROBE_RESULT_ATTR values */ -#define PSVC_DEV_PROBE_SUCCESS PSVC_SUCCESS -#define PSVC_DEV_PROBE_FAILED PSVC_FAILURE - -/* Size of fan temperature differential array */ -#define PSVC_MAXERRORS 2 - -/* Address specification macros */ -#define PSVC_VERSION 0 /* Current version */ - -#define PSVC_VERSION_SHIFT 0 -#define PSVC_ACTIVE_LOW_SHIFT 7 -#define PSVC_BIT_NUM_SHIFT 4 -#define PSVC_INVERT_SHIFT 4 -#define PSVC_PORT_SHIFT 8 -#define PSVC_BITSHIFT_SHIFT 12 -#define PSVC_BYTEMASK_SHIFT 16 -#define PSVC_REG_SHIFT 24 -#define PSVC_TYPE_SHIFT 32 -#define PSVC_BUSADDR_SHIFT 40 -#define PSVC_BUSNUM_SHIFT 48 -#define PSVC_CNTLR_SHIFT 56 - -#define PSVC_GET_VERSION(X) ((X >> PSVC_VERSION_SHIFT) & 0xF) -#define PSVC_IS_ACTIVE_LOW(X) ((X >> PSVC_ACTIVE_LOW_SHIFT) & 0x1) -#define PSVC_GET_BIT_NUM(X) ((X >> PSVC_BIT_NUM_SHIFT) & 0x7) -#define PSVC_HP_INVERT(X) (((X >> PSVC_INVERT_SHIFT) & 0x7) == 1) -#define PSVC_GET_ASPEC_PORT(X) ((X >> PSVC_PORT_SHIFT) & 0xF) -#define PSVC_GET_ASPEC_BITSHIFT(X) ((X >> PSVC_BITSHIFT_SHIFT) & 0xF) -#define PSVC_GET_ASPEC_BYTEMASK(X) ((X >> PSVC_BYTEMASK_SHIFT) & 0xFF) -#define PSVC_GET_ASPEC_REG(X) ((X >> PSVC_REG_SHIFT) & 0xFF) -#define PSVC_GET_ASPEC_TYPE(X) ((X >> PSVC_TYPE_SHIFT) & 0xFF) -#define PSVC_GET_ASPEC_BUSADDR(X) ((X >> PSVC_BUSADDR_SHIFT) & 0xFF) -#define PSVC_GET_ASPEC_BUSNUM(X) ((X >> PSVC_BUSNUM_SHIFT) & 0xFF) -#define PSVC_GET_ASPEC_CNTLR(X) ((X >> PSVC_CNTLR_SHIFT) & 0xFF) - - -/* Address spec device_types */ -#define PSVC_I2C_AT24 0 -#define PSVC_I2C_HPC3130 1 -#define PSVC_I2C_LM75 2 -#define PSVC_I2C_LTC1427 3 -#define PSVC_I2C_MAX1617 4 -#define PSVC_I2C_PCF8574 5 -#define PSVC_I2C_PCF8591 6 -#define PSVC_I2C_SSC050 7 -#define PSVC_I2C_TDA8444 8 -#define PSVC_I2C_SSC100 9 - -/* numbers of attempts for retrying requests over the I2C bus */ -#define PSVC_NUM_OF_RETRIES 5 -#define PSVC_THRESHOLD_COUNTER 5 - -/* Prototypes */ -#ifndef LIBRARY_BUILD -int32_t psvc_init(psvc_opaque_t *); -int32_t psvc_fini(psvc_opaque_t); -int32_t psvc_get_attr(psvc_opaque_t, char *, int32_t, void *, ...); -int32_t psvc_set_attr(psvc_opaque_t, char *, int32_t, void *); -void psvcplugin_add_children(char *parent_path); -void psvcplugin_lookup(char *name, char *parent, picl_nodehdl_t *node); -#endif - -/* FRU reading structure */ -typedef struct { - int32_t buf_start; - char *buf; - int32_t read_size; -}fru_info_t; - -/* Mutex used for Daktari Fan speed reading */ -extern pthread_mutex_t fan_mutex; - -#ifdef __cplusplus -} -#endif - -#endif /* _PSVC_OBJECTS_H */ diff --git a/usr/src/cmd/picl/plugins/sun4u/psvc/psvcobj/psvc_objects_class.h b/usr/src/cmd/picl/plugins/sun4u/psvc/psvcobj/psvc_objects_class.h deleted file mode 100644 index 5969859dc8..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/psvc/psvcobj/psvc_objects_class.h +++ /dev/null @@ -1,264 +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 1999-2001, 2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _PSVC_OBJECTS_CLASS_H -#define _PSVC_OBJECTS_CLASS_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Platform Services Framework private definitions - */ -#include - -#define NAMELEN 32 -#define PATHLEN 256 - -/* Logical device class */ -typedef struct { - int32_t class; - int32_t subclass; - int32_t instance; - uint64_t features; - uint64_t addr_spec; - char state[32]; - char previous_state[32]; - char fault_id[32]; - boolean_t present; - boolean_t previous_presence; - boolean_t enabled; - char label[32]; - int32_t (*constructor)(); - int32_t (*destructor)(); - int32_t (*get_attr)(); - int32_t (*set_attr)(); -} EObj_t; - -typedef struct { - EObj_t ld; /* logical device */ - int32_t hw_lo_shut; - int32_t lo_warn; /* low warning threshold */ - int32_t lo_shut; /* low shutdown threshold */ - int32_t opt_temp; - int32_t hi_warn; /* high warning threshold */ - int32_t hi_shut; /* high shutdown threshold */ - int32_t hw_hi_shut; -} ETempSensor_t; - -typedef struct { - EObj_t ld; /* logical device */ - int16_t setpoint; - int16_t hysteresis; - int16_t loopgain; - int16_t loopbias; - float temp_differential[PSVC_MAXERRORS]; - int16_t temp_differential_index; -} EFan_t; - -typedef struct { - EObj_t ld; /* logical device */ -} ESystem_t; - -typedef struct { - EObj_t ld; /* logical device */ - int32_t lo_warn; /* low warning threshold */ - int32_t lo_shut; /* low shutdown threshold */ - int32_t hi_warn; /* high warning threshold */ - int32_t hi_shut; /* high shutdown threshold */ -} EDigiSensor_t; - -typedef struct { - EObj_t ld; /* logical device */ -} EDigiControl_t; - -typedef struct { - EObj_t ld; /* logical device */ -} EBoolSensor_t; - -typedef struct { - EObj_t ld; -} EGPIO8_t; - -typedef struct { - EObj_t ld; /* logical device */ - int16_t lit_count; - char color[32]; - char is_locator[8]; - char locator_name[32]; -} ELed_t; - -typedef struct { - EObj_t ld; /* logical device */ - int32_t lo_warn; /* low warning threshold */ - int32_t lo_shut; /* low shutdown threshold */ - int32_t hi_warn; /* high warning threshold */ - int32_t hi_shut; /* high shutdown threshold */ -} EFanTach_t; - -typedef struct { - EObj_t ld; /* logical device */ - char switch_state[32]; -} ESwitch_t; - -typedef struct { - EObj_t ld; /* logical device */ -} EKeySwitch_t; - -typedef struct { - EObj_t ld; /* logical device */ - int32_t (*get_temperature)(); - int32_t (*get_fanspeed)(); - int32_t (*get_bit)(); - int32_t (*set_bit)(); - int32_t (*get_port)(); - int32_t (*set_port)(); - int32_t (*get_reg)(); - int32_t (*set_reg)(); - int32_t (*get_output)(); - int32_t (*set_output)(); - int32_t (*get_input)(); -} EPhysDev_t; - -typedef struct { - uint8_t cell_type; - uint32_t size; - int64_t *table; -} ETable_t; - -typedef struct { - char antecedent_id[NAMELEN]; - int32_t ant_key; - char dependent_id[NAMELEN]; -} EAssoc_t; - -typedef struct { - char name[NAMELEN]; - uint32_t count; - EAssoc_t *table; -} EAssocList_t; - -/* structure for translating string to id */ -typedef struct { - int32_t id; - char name[NAMELEN]; -} EStringId_t; - -typedef struct { - uint32_t controller; - uint32_t bus; - uint32_t addr; - uint32_t port; - char path[PATHLEN]; -} EDevice_t; - -/* translate name to object (or table) pointer */ -typedef struct { - char name[NAMELEN]; - int32_t key; - EObj_t *objp; - int32_t type; /* object or table */ -} ENamePtr_t; - -typedef struct { - ENamePtr_t *obj_tbl; /* object name to pointer translation */ - uint32_t obj_count; /* number of objects */ - uint32_t nextid; /* next open object slot */ -} ETable_Array; - -#define PSVC_OBJ 0 -#define PSVC_TBL 1 -#define PSVC_MAX_TABLE_ARRAYS 10 - -typedef struct { - ETable_Array tbl_arry[PSVC_MAX_TABLE_ARRAYS]; - uint32_t total_obj_count; /* Total number of objects */ - EStringId_t *othr_tbl; /* assoc string to id translations */ - uint32_t othr_count; /* number of assoc strings */ - EAssocList_t *assoc_tbl; /* associations between objects */ - uint32_t assoc_count; /* number of associations */ - EDevice_t *dev_tbl; /* device paths */ - uint32_t dev_count; /* number of device paths */ - FILE *fp; /* config file */ - pthread_mutex_t mutex; /* multi threaded protection */ -} EHdl_t; - -/* String lookup table for attributes */ -static char *attr_str_tab[] = { - "_class", /* 0 */ - "Subclass", /* 1 */ - "Presence", /* 2 */ - "Previous-presence", /* 3 */ - "State", /* 4 */ - "Previous-state", /* 5 */ - "Enabled", /* 6 */ - "FaultInformation", /* 7 */ - "Features", /* 8 */ - "Label", /* 9 */ - "Fruid", /* 10 */ - "Instance", /* 11 */ - "Led-color", /* 12 */ - "Lo-warn", /* 13 */ - "Lo-shut", /* 14 */ - "Hi-warn", /* 15 */ - "Hi-shut", /* 16 */ - "Opt-temp", /* 17 */ - "Hw-hi-shut", /* 18 */ - "Hw-lo-shut", /* 19 */ - "Setpoint", /* 20 */ - "Hysteresis", /* 21 */ - "Loopgain", /* 22 */ - "Loopbias", /* 23 */ - "Temp_differential", /* 24 */ - "Temp_differential_index", /* 25 */ - "Sensor-value", /* 26 */ - "Gpio-value", /* 27 */ - "#Bits", /* 28 */ - "Control-value", /* 29 */ - "Led-state", /* 30 */ - "Switch-state", /* 31 */ - "Probe-result", /* 32 */ - "Table_value", /* 33 */ - "Assoc_id", /* 34 */ - "Assoc_matches", /* 35 */ - "Addr-spec", /* 36 */ - "Object-id", /* 37 */ - "Led-lit-count", /* 38 */ - "FRU-info", /* 39 */ - "IsLocator", /* 40 */ - "LocatorName" /* 41 */ -}; - -int ATTR_STR_TAB_SIZE = sizeof (attr_str_tab) / sizeof (char *); - -#ifdef __cplusplus -} -#endif - -#endif /* _PSVC_OBJECTS_CLASS_H */ diff --git a/usr/src/cmd/picl/plugins/sun4u/psvc/psvcobj/psvcobj.c b/usr/src/cmd/picl/plugins/sun4u/psvc/psvcobj/psvcobj.c deleted file mode 100644 index ffe7703695..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/psvc/psvcobj/psvcobj.c +++ /dev/null @@ -1,5231 +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. - */ - -/* - * This file consists of routines to manage objects in the - * "Platform Environment Services Framework". The classes - * and subclasses are defined by attributes and methods. - * The objects, and their initial, static, attribute values are - * specified in a configuration file, "psvcobj.conf". - * psvc_init() reads the configuration file and creates a repository - * of environmental objects in memory. A client application may manipulate - * these objects by invoking the psvc_get_attr(), and psvc_set_attr() - * routines with the object's string ID specified as an argument. - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define LIBRARY_BUILD 1 -#include -#include -#include - -/* Mutex used for Daktari Fan speed reading */ -pthread_mutex_t fan_mutex = PTHREAD_MUTEX_INITIALIZER; - -/*LINTLIBRARY*/ - -#define ENV_DEBUG(str, id) printf("%s id %s\n", (str), (id)) - -#define BUFSZ 512 - -#define CLASS_MAX 12 -#define SUBCLASS_MAX 10 - -static int32_t i_psvc_constructor_0_0(EHdl_t *, char *, EObj_t **); -static int32_t i_psvc_constructor_0_1(EHdl_t *, char *, EObj_t **); -static int32_t i_psvc_constructor_1_0(EHdl_t *, char *, EObj_t **); -static int32_t i_psvc_constructor_2_0(EHdl_t *, char *, EObj_t **); -static int32_t i_psvc_constructor_2_1(EHdl_t *, char *, EObj_t **); -static int32_t i_psvc_constructor_2_2(EHdl_t *, char *, EObj_t **); -static int32_t i_psvc_constructor_3_0(EHdl_t *, char *, EObj_t **); -static int32_t i_psvc_constructor_4_0(EHdl_t *, char *, EObj_t **); -static int32_t i_psvc_constructor_5_0(EHdl_t *, char *, EObj_t **); -static int32_t i_psvc_constructor_6_0(EHdl_t *, char *, EObj_t **); -static int32_t i_psvc_constructor_7_0(EHdl_t *, char *, EObj_t **); -static int32_t i_psvc_constructor_8_0(EHdl_t *, char *, EObj_t **); -static int32_t i_psvc_constructor_9_0(EHdl_t *, char *, EObj_t **); -static int32_t i_psvc_constructor_10_0(EHdl_t *, char *, EObj_t **); -static int32_t i_psvc_constructor_10_1(EHdl_t *, char *, EObj_t **); -static int32_t i_psvc_constructor_11_0(EHdl_t *, char *, EObj_t **); -static int32_t i_psvc_constructor_11_1(EHdl_t *, char *, EObj_t **); -static int32_t i_psvc_constructor_11_2(EHdl_t *, char *, EObj_t **); -static int32_t i_psvc_constructor_11_3(EHdl_t *, char *, EObj_t **); -static int32_t i_psvc_constructor_11_4(EHdl_t *, char *, EObj_t **); -static int32_t i_psvc_constructor_11_5(EHdl_t *, char *, EObj_t **); -static int32_t i_psvc_constructor_11_6(EHdl_t *, char *, EObj_t **); -static int32_t i_psvc_constructor_11_7(EHdl_t *, char *, EObj_t **); -static int32_t i_psvc_constructor_11_8(EHdl_t *, char *, EObj_t **); -static int32_t i_psvc_constructor_11_9(EHdl_t *, char *, EObj_t **); - -static int32_t i_psvc_get_obj(EHdl_t *, char *, EObj_t **); -static int32_t i_psvc_destructor(EHdl_t *, char *, void *); -static int32_t i_psvc_get_devpath(EHdl_t *, uint64_t, char *); -static int32_t i_psvc_get_attr_generic(EHdl_t *, EObj_t *, int32_t, void *); -static int32_t i_psvc_get_attr_6_0(EHdl_t *, EObj_t *, int32_t, void *); -static int32_t i_psvc_get_reg_11_0(EHdl_t *hdlp, EObj_t *objp, int32_t attr_id, - void *attrp); -static int32_t i_psvc_get_attr_10_1(EHdl_t *, EObj_t *, int32_t, void *); -static int32_t psvc_get_str_key(char *object); - -int32_t ioctl_retry(int fp, int request, void * arg_pointer); - -/* - * Method lookup tables - * Update when adding classes or subclasses. - */ - - -/* Lookup method by class, subclass, used when calling method */ -static int32_t (*i_psvc_constructor[CLASS_MAX][SUBCLASS_MAX])(EHdl_t *, - char *, EObj_t **) = { -{i_psvc_constructor_0_0, i_psvc_constructor_0_1, 0, 0, 0, 0, 0, 0, 0, 0}, - {i_psvc_constructor_1_0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{i_psvc_constructor_2_0, i_psvc_constructor_2_1, i_psvc_constructor_2_2, - 0, 0, 0, 0, 0, 0, 0}, - {i_psvc_constructor_3_0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {i_psvc_constructor_4_0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {i_psvc_constructor_5_0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {i_psvc_constructor_6_0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {i_psvc_constructor_7_0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {i_psvc_constructor_8_0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {i_psvc_constructor_9_0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{i_psvc_constructor_10_0, i_psvc_constructor_10_1, 0, 0, 0, 0, 0, 0, 0, 0}, -{i_psvc_constructor_11_0, i_psvc_constructor_11_1, i_psvc_constructor_11_2, - i_psvc_constructor_11_3, i_psvc_constructor_11_4, - i_psvc_constructor_11_5, i_psvc_constructor_11_6, - i_psvc_constructor_11_7, i_psvc_constructor_11_8, - i_psvc_constructor_11_9}, -}; - -static int32_t i_psvc_cell_size[8] = {1, 1, 2, 2, 4, 4, 8, 8}; - -static struct bits { - uint64_t bit; - char *label; -} feature_bits[] = { -{PSVC_DEV_PERM, "PERM="}, -{PSVC_DEV_HOTPLUG, "HOTPLUG="}, -{PSVC_DEV_OPTION, "OPTION="}, -{PSVC_DEV_PRIMARY, "PRIMARY="}, -{PSVC_DEV_SECONDARY, "SECONDARY="}, -{PSVC_DEV_RDONLY, "RDONLY="}, -{PSVC_DEV_RDWR, "RDWR="}, -{PSVC_DEV_FRU, "FRU="}, -{PSVC_LOW_WARN, "LO_WARN_MASK="}, -{PSVC_LOW_SHUT, "LO_SHUT_MASK="}, -{PSVC_HIGH_WARN, "HI_WARN_MASK="}, -{PSVC_HIGH_SHUT, "HI_SHUT_MASK="}, -{PSVC_CONVERSION_TABLE, "CONV_TABLE="}, -{PSVC_OPT_TEMP, "OPT_TEMP_MASK="}, -{PSVC_HW_LOW_SHUT, "HW_LO_MASK="}, -{PSVC_HW_HIGH_SHUT, "HW_HI_MASK="}, -{PSVC_FAN_DRIVE_PR, "FAN_DRIVE_PR="}, -{PSVC_TEMP_DRIVEN, "TEMP_DRIVEN="}, -{PSVC_SPEED_CTRL_PR, "SPEED_CTRL_PR="}, -{PSVC_FAN_ON_OFF, "FAN_ON_OFF="}, -{PSVC_CLOSED_LOOP_CTRL, "CLOSED_LOOP_CTRL="}, -{PSVC_FAN_DRIVE_TABLE_PR, "FAN_DRIVE_TABLE_PR="}, -{PSVC_DIE_TEMP, "DIE_TEMP="}, -{PSVC_AMB_TEMP, "AMB_TEMP="}, -{PSVC_DIGI_SENSOR, "DIGI_SENSOR="}, -{PSVC_BI_STATE, "BI_STATE="}, -{PSVC_TRI_STATE, "TRI_STATE="}, -{PSVC_GREEN, "GREEN="}, -{PSVC_AMBER, "AMBER="}, -{PSVC_OUTPUT, "OUTPUT="}, -{PSVC_INPUT, "INPUT="}, -{PSVC_BIDIR, "BIDIR="}, -{PSVC_BIT_POS, "BIT_POS="}, -{PSVC_VAL_POS, "VAL_POS="}, -{PSVC_NORMAL_POS_AV, "NORMAL_POS_AV="}, -{PSVC_DIAG_POS_AV, "DIAG_POS_AV="}, -{PSVC_LOCK_POS_AV, "LOCK_POS_AV="}, -{PSVC_OFF_POS_AV, "OFF_POS_AV="}, -{PSVC_GPIO_PORT, "GPIO_PORT="}, -{PSVC_GPIO_REG, "GPIO_REG="} -}; - -#define ASSOC_STR_TAB_SIZE 33 -static char *assoc_str_tab[] = { - "PSVC_PRESENCE_SENSOR", /* 0 */ - "PSVC_FAN_ONOFF_SENSOR", /* 1 */ - "PSVC_FAN_SPEED_TACHOMETER", /* 2 */ - "PSVC_FAN_PRIM_SEC_SELECTOR", /* 3 */ - "PSVC_DEV_TEMP_SENSOR", /* 4 */ - "PSVC_FAN_DRIVE_CONTROL", /* 5 */ - "PSVC_KS_NORMAL_POS_SENSOR", /* 6 */ - "PSVC_KS_DIAG_POS_SENSOR", /* 7 */ - "PSVC_KS_LOCK_POS_SENSOR", /* 8 */ - "PSVC_KS_OFF_POS_SENSOR", /* 9 */ - "PSVC_SLOT_FAULT_LED", /* 10 */ - "PSVC_SLOT_REMOVE_LED", /* 11 */ - "PSVC_TS_OVERTEMP_LED", /* 12 */ - "PSVC_PS_I_SENSOR", /* 13 */ - "PSVC_DEV_FAULT_SENSOR", /* 14 */ - "PSVC_DEV_FAULT_LED", /* 15 */ - "PSVC_TABLE", /* 16 */ - "PSVC_PARENT", /* 17 */ - "PSVC_CPU", /* 18 */ - "PSVC_ALTERNATE", /* 19 */ - "PSVC_HOTPLUG_ENABLE_SWITCH", /* 20 */ - "PSVC_PS", /* 21 */ - "PSVC_FAN", /* 22 */ - "PSVC_TS", /* 23 */ - "PSVC_DISK", /* 24 */ - "PSVC_LED", /* 25 */ - "PSVC_FSP_LED", /* 26 */ - "PSVC_KEYSWITCH", /* 27 */ - "PSVC_PCI_CARD", /* 28 */ - "PSVC_PHYSICAL_DEVICE", /* 29 */ - "PSVC_DEV_TYPE_SENSOR", /* 30 */ - "PSVC_FAN_TRAY_FANS", /* 31 */ - "PSVC_FRU" /* 32 */ -}; - -#define FEATURE_BITS (sizeof (feature_bits) / sizeof (struct bits)) - -static struct bitfield { - int8_t shift; - char *label; - char *format; -} addr_fields[] = -{ -{PSVC_VERSION_SHIFT, "VERSION=", "%d"}, -{PSVC_ACTIVE_LOW_SHIFT, "ACTIVE_LOW=", "%d"}, -{PSVC_BIT_NUM_SHIFT, "BIT_NUM=", "%d"}, -{PSVC_INVERT_SHIFT, "INVERT=", "%d"}, -{PSVC_PORT_SHIFT, "PORT=", "%d"}, -{PSVC_BITSHIFT_SHIFT, "BITSHIFT=", "%d"}, -{PSVC_BYTEMASK_SHIFT, "BYTEMASK=", "%x"}, -{PSVC_REG_SHIFT, "REG=", "%d"}, -{PSVC_TYPE_SHIFT, "TYPE=", "%d"}, -{PSVC_BUSADDR_SHIFT, "BUSADDR=", "%x"}, -{PSVC_BUSNUM_SHIFT, "BUSNUM=", "%d"}, -{PSVC_CNTLR_SHIFT, "CNTLR=", "%d"}, -}; -#define ADDR_BITFIELDS (sizeof (addr_fields) / sizeof (struct bitfield)) - -/* - * record format is: - * pathname label1=val1,label2=val2,label3=val3 - * Must be a space after the pathname and a comma between variables. - */ - -static char * -find_label(char *str, char *label) -{ - char *start; - - start = strchr(str, ' '); - if (start == NULL) - return (start); - - do { - ++start; - if (strncmp(start, label, strlen(label)) == 0) - return (start); - - start = strchr(start, ','); - } while (start != NULL); - - return (NULL); -} - -static int32_t -i_psvc_value(char *buf, int32_t attr_id, void *attrp) -{ - char *val; - uint32_t temp32; - uint64_t temp64; - uint64_t result; - int32_t i; - int32_t found; - char label[64]; - int val_size; - int label_size; - - - switch (attr_id) { - case PSVC_CLASS_ATTR: - case PSVC_SUBCLASS_ATTR: - case PSVC_INSTANCE_ATTR: - case PSVC_LO_WARN_ATTR: - case PSVC_LO_SHUT_ATTR: - case PSVC_HI_WARN_ATTR: - case PSVC_HI_SHUT_ATTR: - case PSVC_HW_HI_SHUT_ATTR: - case PSVC_HW_LO_SHUT_ATTR: - case PSVC_OPTIMAL_TEMP_ATTR: - snprintf(label, sizeof (label), "%s=", attr_str_tab[attr_id]); - val = find_label(buf, label); - if (val == NULL) { - errno = EINVAL; - return (PSVC_FAILURE); - } - found = sscanf(val + strlen(label), - "%d", (int32_t *)attrp); - if (found == 0) - *(int32_t *)attrp = 0; - break; - case PSVC_SETPOINT_ATTR: - case PSVC_HYSTERESIS_ATTR: - case PSVC_LOOPGAIN_ATTR: - case PSVC_LOOPBIAS_ATTR: - snprintf(label, sizeof (label), "%s=", attr_str_tab[attr_id]); - val = find_label(buf, label); - if (val == NULL) { - errno = EINVAL; - return (PSVC_FAILURE); - } - - found = sscanf(val + strlen(label), "%hd", (int16_t *)attrp); - if (found == 0) - *(int16_t *)attrp = 0; - break; - case PSVC_LED_COLOR_ATTR: - case PSVC_LED_IS_LOCATOR_ATTR: - case PSVC_LED_LOCATOR_NAME_ATTR: - snprintf(label, sizeof (label), "%s=", attr_str_tab[attr_id]); - val = find_label(buf, label); - if (val == NULL) { - errno = EINVAL; - return (PSVC_FAILURE); - } - val_size = strlen(val); - label_size = strlen(label); - - for (i = 0; i < val_size && val[i] != ','; i++); - if (i < strlen(val) - 1) { - strncpy((char *)attrp, val+label_size, - i - label_size); - } else - found = sscanf(val + label_size, "%s", (char *)attrp); - if (found == 0) - strcpy((char *)attrp, ""); - break; - case PSVC_FEATURES_ATTR: - result = 0; - for (i = 0; i < FEATURE_BITS; ++i) { - val = find_label(buf, feature_bits[i].label); - if (val == NULL) - continue; - found = sscanf(val + strlen(feature_bits[i].label), - "%d", &temp32); - if (found != 0) { - if (temp32 == 1) - result |= feature_bits[i].bit; - } - } - *(uint64_t *)attrp = result; - break; - case PSVC_ADDR_SPEC_ATTR: - result = 0; - for (i = 0; i < ADDR_BITFIELDS; ++i) { - val = find_label(buf, addr_fields[i].label); - if (val == NULL) - continue; - found = sscanf(val + strlen(addr_fields[i].label), - addr_fields[i].format, &temp32); - if (found != 0) { - temp64 = temp32; - temp64 <<= addr_fields[i].shift; - result |= temp64; - } - } - *(uint64_t *)attrp = result; - break; - default: - errno = EINVAL; - return (PSVC_FAILURE); - } - return (PSVC_SUCCESS); -} - -/* determine number of records in file section */ -static int32_t -i_psvc_count_records(FILE *fp, char *end, uint32_t *countp) -{ - long first_record; - char *ret; - char buf[BUFSZ]; - uint32_t count = 0; - - first_record = ftell(fp); - - while ((ret = fgets(buf, BUFSZ, fp)) != NULL) { - if (strncmp(end, buf, strlen(end)) == 0) - break; - ++count; - } - - if (ret == NULL) { - errno = EINVAL; - return (PSVC_FAILURE); - } - - fseek(fp, first_record, SEEK_SET); - *countp = count; - return (PSVC_SUCCESS); -} - -/* determine number of records in file section */ -static int32_t -i_psvc_count_tables_associations(FILE *fp, uint32_t *countp, char *end) -{ - long first_record; - char *ret; - char buf[BUFSZ]; - uint32_t count = 0; - - first_record = ftell(fp); - - while ((ret = fgets(buf, BUFSZ, fp)) != NULL) { - if (strncmp(end, buf, strlen(end)) == 0) - ++count; - } - - fseek(fp, first_record, SEEK_SET); - *countp = count; - return (PSVC_SUCCESS); -} - -/* determine number of records in a table */ -static int32_t -i_psvc_count_table_records(FILE *fp, char *end, uint32_t *countp) -{ - long first_record; - int ret; - char string[BUFSZ]; - uint32_t count = 0; - - first_record = ftell(fp); - - while ((ret = fscanf(fp, "%s", string)) == 1) { - if (strncmp(end, string, strlen(end)) == 0) - break; - ++count; - } - - if (ret != 1) { - errno = EINVAL; - return (PSVC_FAILURE); - } - - fseek(fp, first_record, SEEK_SET); - *countp = count; - return (PSVC_SUCCESS); -} - -/* - * Find number of matches to an antecedent_id of a certain - * association type. - */ -static int32_t -i_psvc_get_assoc_matches(EHdl_t *hdlp, char *antecedent, int32_t assoc_id, - int32_t *matches) -{ - int i; - int32_t key; - EAssocList_t *ap = hdlp->assoc_tbl + assoc_id; - - *matches = 0; - - if (ap->table == 0) { - errno = EINVAL; - return (PSVC_FAILURE); - } - - key = psvc_get_str_key(antecedent); - - for (i = 0; i < ap->count; ++i) { - if (ap->table[i].ant_key == key) { - if (strcmp(ap->table[i].antecedent_id, antecedent) - == 0) - ++*matches; - } - } - return (PSVC_SUCCESS); -} - -/* - * Find 1st m matches to an antecedent_id of a certain - * association type. - * Returns zero for success, -1 for failure. - */ -static int32_t -i_psvc_get_assoc_id(EHdl_t *hdlp, char *antecedent, int32_t assoc_id, - int32_t match, char **id_list) -{ - int i; - int found = 0; - int32_t key; - EAssocList_t *ap = &hdlp->assoc_tbl[assoc_id]; - - if (ap->table == 0) { - errno = EINVAL; - return (-1); - } - - key = psvc_get_str_key(antecedent); - - for (i = 0; i < ap->count; ++i) { - if (ap->table[i].ant_key == key) { - if (strcmp(ap->table[i].antecedent_id, antecedent) - == 0) { - if (found == match) { - *id_list = ap->table[i].dependent_id; - return (0); - } - ++found; - } - } - } - - errno = EINVAL; - return (-1); -} - -static int32_t -i_psvc_get_table_value(EHdl_t *hdlp, char *table_id, uint32_t index, - void *value) -{ - int32_t i; - ETable_t *tblp; - ETable_Array *tbl_arr; - int32_t key, array; - - key = psvc_get_str_key(table_id); - array = key % PSVC_MAX_TABLE_ARRAYS; - tbl_arr = &(hdlp->tbl_arry[array]); - - for (i = 0; i < tbl_arr->obj_count; ++i) { - if (key == tbl_arr->obj_tbl[i].key) { - if (strcmp(tbl_arr->obj_tbl[i].name, - table_id) == 0) - break; - } - } - - if (tbl_arr->obj_tbl[i].type != PSVC_TBL) - return (PSVC_FAILURE); - - tblp = (ETable_t *)tbl_arr->obj_tbl[i].objp; - - if (tblp->table == NULL) - return (PSVC_FAILURE); - - if (index >= tblp->size) - return (PSVC_FAILURE); - - switch (tblp->cell_type) { - case 0: - *(int8_t *)value = *((int8_t *)tblp->table + index); - break; - case 1: - *(uint8_t *)value = *((uint8_t *)tblp->table + index); - break; - case 2: - *(int16_t *)value = *((int16_t *)tblp->table + index); - break; - case 3: - *(uint16_t *)value = *((uint16_t *)tblp->table + index); - break; - case 4: - *(int32_t *)value = *((int32_t *)tblp->table + index); - break; - case 5: - *(uint32_t *)value = *((uint32_t *)tblp->table + index); - break; - case 6: - *(int64_t *)value = *((int64_t *)tblp->table + index); - break; - case 7: - *(uint64_t *)value = *((uint64_t *)tblp->table + index); - break; - default: - return (PSVC_FAILURE); - } - - return (PSVC_SUCCESS); -} - -int32_t -psvc_get_attr(EHdl_t *hdlp, char *name, int32_t attr_id, void *attr_valuep, ...) -{ - EObj_t *objp; - int32_t status = PSVC_SUCCESS; - int32_t arg1, arg2; - va_list ap; - - pthread_mutex_lock(&hdlp->mutex); - - if (attr_valuep == NULL) { - errno = EFAULT; - pthread_mutex_unlock(&hdlp->mutex); - return (PSVC_FAILURE); - } - - switch (attr_id) { - case PSVC_TABLE_VALUE_ATTR: - va_start(ap, attr_valuep); - status = i_psvc_get_table_value(hdlp, name, - va_arg(ap, uint32_t), attr_valuep); - va_end(ap); - break; - case PSVC_ASSOC_MATCHES_ATTR: - va_start(ap, attr_valuep); - status = i_psvc_get_assoc_matches(hdlp, name, - va_arg(ap, int32_t), attr_valuep); - va_end(ap); - break; - case PSVC_ASSOC_ID_ATTR: - va_start(ap, attr_valuep); - arg1 = va_arg(ap, int32_t); - arg2 = va_arg(ap, int32_t); - status = i_psvc_get_assoc_id(hdlp, name, - arg1, arg2, attr_valuep); - va_end(ap); - break; - default: - status = i_psvc_get_obj(hdlp, name, &objp); - if (status != PSVC_SUCCESS) { - pthread_mutex_unlock(&hdlp->mutex); - return (status); - } - status = (*objp->get_attr)(hdlp, objp, attr_id, - attr_valuep); - } - - if (status != PSVC_SUCCESS) { - pthread_mutex_unlock(&hdlp->mutex); - return (status); - } - - pthread_mutex_unlock(&hdlp->mutex); - return (status); -} - -int32_t -psvc_set_attr(EHdl_t *hdlp, char *name, int32_t attr_id, void *attr_valuep) -{ - EObj_t *objp; - int32_t status = PSVC_SUCCESS; - - pthread_mutex_lock(&hdlp->mutex); - status = i_psvc_get_obj(hdlp, name, &objp); - if (status != PSVC_SUCCESS) { - pthread_mutex_unlock(&hdlp->mutex); - return (status); - } - - if (attr_valuep == NULL) { - errno = EFAULT; - pthread_mutex_unlock(&hdlp->mutex); - return (PSVC_FAILURE); - } - - status = (*objp->set_attr)(hdlp, objp, attr_id, attr_valuep); - if (status != PSVC_SUCCESS) { - pthread_mutex_unlock(&hdlp->mutex); - return (status); - } - - pthread_mutex_unlock(&hdlp->mutex); - return (status); -} - - -static int32_t -i_psvc_get_presence(EHdl_t *hdlp, EObj_t *objp, boolean_t *pr) -{ - EObj_t *pobjp, *mobjp; - int32_t matches; - char *mid; - char *parent_id; - int32_t status = PSVC_SUCCESS; - uint8_t value_8bit, value_8bit_inv; - boolean_t active_low, value; - - if (strcmp(objp->label, PSVC_CHASSIS) == 0) { - *pr = PSVC_PRESENT; - objp->present = PSVC_PRESENT; - return (PSVC_SUCCESS); - } - - status = i_psvc_get_assoc_id(hdlp, objp->label, PSVC_PARENT, 0, - &parent_id); - if (status != PSVC_SUCCESS) - return (status); - - if (strcmp(parent_id, PSVC_CHASSIS)) { - status = i_psvc_get_obj(hdlp, parent_id, &pobjp); - if (status != PSVC_SUCCESS) - return (status); - if (!pobjp->present) { - pobjp->get_attr(hdlp, pobjp, PSVC_PRESENCE_ATTR, pr); - *pr = pobjp->present; - objp->present = pobjp->present; - return (status); - } - } - - (void) i_psvc_get_assoc_matches(hdlp, objp->label, - PSVC_PRESENCE_SENSOR, &matches); - - if (matches != 0) { - status = i_psvc_get_assoc_id(hdlp, objp->label, - PSVC_PRESENCE_SENSOR, 0, &mid); - if (status != PSVC_SUCCESS) - return (status); - status = i_psvc_get_obj(hdlp, mid, &mobjp); - if (status != PSVC_SUCCESS) - return (status); - - active_low = PSVC_IS_ACTIVE_LOW(mobjp->addr_spec); - - if (mobjp->class == PSVC_BOOLEAN_GPIO_CLASS) { - status = mobjp->get_attr(hdlp, mobjp, - PSVC_GPIO_VALUE_ATTR, &value); - if (status != PSVC_SUCCESS) - return (status); - if (active_low) - if (value == 0) - *pr = PSVC_PRESENT; - else - *pr = PSVC_ABSENT; - else - if (value == 0) - *pr = PSVC_ABSENT; - else - *pr = PSVC_PRESENT; - } else if (mobjp->class == PSVC_8BIT_GPIO_CLASS) { - uint8_t bitshift, bytemask; - - status = mobjp->get_attr(hdlp, mobjp, - PSVC_GPIO_VALUE_ATTR, &value_8bit); - if (status != PSVC_SUCCESS) - return (status); - if (PSVC_HP_INVERT(mobjp->addr_spec)) - value_8bit_inv = ~value_8bit; - else - value_8bit_inv = value_8bit; - bitshift = PSVC_GET_ASPEC_BITSHIFT(mobjp->addr_spec); - bytemask = PSVC_GET_ASPEC_BYTEMASK(mobjp->addr_spec); - value_8bit_inv = - value_8bit_inv & (bytemask >> bitshift); - if (active_low) - if (value_8bit_inv == 0) - *pr = PSVC_PRESENT; - else - *pr = PSVC_ABSENT; - else - if (value_8bit_inv == 0) - *pr = PSVC_ABSENT; - else - *pr = PSVC_PRESENT; - } else { - errno = EINVAL; - return (PSVC_FAILURE); - } - } else { - *pr = PSVC_PRESENT; - } - - objp->present = *pr; - - return (status); -} - -static int32_t -i_psvc_get_device_value_0_0(EHdl_t *hdlp, EObj_t *objp, int32_t *temp) -{ - int32_t status = PSVC_SUCCESS, m; - char *tid; - int16_t temp16; - char *physid; - EObj_t *physobjp; - - if (objp->present != PSVC_PRESENT) { - errno = ENODEV; - return (PSVC_FAILURE); - } - - status = i_psvc_get_assoc_id( - hdlp, objp->label, PSVC_PHYSICAL_DEVICE, 0, &physid); - if (status != PSVC_SUCCESS) { - return (status); - } - status = i_psvc_get_obj(hdlp, physid, &physobjp); - if (status != PSVC_SUCCESS) { - return (status); - } - - status = ((EPhysDev_t *)physobjp)->get_temperature(hdlp, - objp->addr_spec, temp); - if (status != PSVC_SUCCESS) { - return (status); - } - - if (objp->features & PSVC_CONVERSION_TABLE) { - status = i_psvc_get_assoc_matches(hdlp, objp->label, - PSVC_TABLE, &m); - if ((status != PSVC_SUCCESS) || (m != 1)) { - return (status); - } - - (void) i_psvc_get_assoc_id(hdlp, objp->label, PSVC_TABLE, 0, - &tid); - - status = i_psvc_get_table_value(hdlp, tid, *temp, &temp16); - *temp = temp16; - } - return (status); -} - -static int32_t -i_psvc_get_device_value_0_1(EHdl_t *hdlp, EObj_t *objp, int32_t *temp) -{ - int32_t status = PSVC_SUCCESS, m; - char *tid; - int16_t temp16; - char *physid; - EObj_t *physobjp; - - if (objp->present != PSVC_PRESENT) { - errno = ENODEV; - return (PSVC_FAILURE); - } - - status = i_psvc_get_assoc_id( - hdlp, objp->label, PSVC_PHYSICAL_DEVICE, 0, &physid); - if (status != PSVC_SUCCESS) { - return (status); - } - status = i_psvc_get_obj(hdlp, physid, &physobjp); - if (status != PSVC_SUCCESS) { - return (status); - } - - status = ((EPhysDev_t *)physobjp)->get_temperature(hdlp, - objp->addr_spec, temp); - if (status != PSVC_SUCCESS) { - return (status); - } - - if (objp->features & PSVC_CONVERSION_TABLE) { - status = i_psvc_get_assoc_matches(hdlp, objp->label, - PSVC_TABLE, &m); - if ((status != PSVC_SUCCESS) || (m != 1)) { - return (status); - } - - (void) i_psvc_get_assoc_id(hdlp, objp->label, PSVC_TABLE, 0, - &tid); - - status = i_psvc_get_table_value(hdlp, tid, *temp, &temp16); - *temp = temp16; - } - return (status); -} - -static int32_t -i_psvc_get_device_value_4_0(EHdl_t *hdlp, EObj_t *objp, int32_t *value) -{ - int32_t status = PSVC_SUCCESS; - char *physid; - EObj_t *physobjp; - - if (objp->present != PSVC_PRESENT) { - errno = ENODEV; - return (PSVC_FAILURE); - } - - status = i_psvc_get_assoc_id(hdlp, objp->label, PSVC_PHYSICAL_DEVICE, - 0, &physid); - if (status != PSVC_SUCCESS) - return (status); - status = i_psvc_get_obj(hdlp, physid, &physobjp); - if (status != PSVC_SUCCESS) - return (status); - - status = ((EPhysDev_t *)physobjp)->get_input(hdlp, objp->addr_spec, - value); - if (status != PSVC_SUCCESS) - return (status); - - if (objp->features & PSVC_CONVERSION_TABLE) { - int32_t m; - char *tid; - int16_t temp16; - - status = i_psvc_get_assoc_matches(hdlp, objp->label, - PSVC_TABLE, &m); - if ((status != PSVC_SUCCESS) || (m != 1)) { - return (status); - } - - (void) i_psvc_get_assoc_id(hdlp, objp->label, PSVC_TABLE, 0, - &tid); - - status = i_psvc_get_table_value(hdlp, tid, *value, &temp16); - *value = temp16; - } - - return (status); -} - -static int32_t -i_psvc_set_device_value_5_0(EHdl_t *hdlp, EObj_t *objp, int32_t *value) -{ - int32_t status = PSVC_SUCCESS; - char *physid; - EObj_t *physobjp; - - if (objp->present != PSVC_PRESENT) { - errno = ENODEV; - return (PSVC_FAILURE); - } - - status = i_psvc_get_assoc_id(hdlp, objp->label, PSVC_PHYSICAL_DEVICE, - 0, &physid); - if (status != PSVC_SUCCESS) - return (status); - status = i_psvc_get_obj(hdlp, physid, &physobjp); - if (status != PSVC_SUCCESS) - return (status); - status = ((EPhysDev_t *)physobjp)->set_output(hdlp, objp->addr_spec, - *value); - if (status != PSVC_SUCCESS) - return (status); - - return (status); -} - -static int32_t -i_psvc_get_device_value_5_0(EHdl_t *hdlp, EObj_t *objp, int32_t *value) -{ - int32_t status = PSVC_SUCCESS; - char *physid; - EObj_t *physobjp; - - if (objp->present != PSVC_PRESENT) { - errno = ENODEV; - return (PSVC_FAILURE); - } - - status = i_psvc_get_assoc_id(hdlp, objp->label, PSVC_PHYSICAL_DEVICE, - 0, &physid); - if (status != PSVC_SUCCESS) - return (status); - status = i_psvc_get_obj(hdlp, physid, &physobjp); - if (status != PSVC_SUCCESS) - return (status); - - status = ((EPhysDev_t *)physobjp)->get_output(hdlp, objp->addr_spec, - value); - if (status != PSVC_SUCCESS) - return (status); - - if (objp->features & PSVC_CONVERSION_TABLE) { - int32_t m; - char *tid; - int16_t temp16; - - status = i_psvc_get_assoc_matches(hdlp, objp->label, - PSVC_TABLE, &m); - if ((status != PSVC_SUCCESS) || (m != 1)) { - return (status); - } - - (void) i_psvc_get_assoc_id(hdlp, objp->label, PSVC_TABLE, 0, - &tid); - - status = i_psvc_get_table_value(hdlp, tid, *value, &temp16); - *value = temp16; - } - return (status); -} - -static int32_t -i_psvc_get_device_value_6_0(EHdl_t *hdlp, EObj_t *objp, boolean_t *value) -{ - int32_t status = PSVC_SUCCESS; - int32_t bit_value; - char *physid; - EObj_t *physobjp; - - if (objp->present != PSVC_PRESENT) { - errno = ENODEV; - return (PSVC_FAILURE); - } - - status = i_psvc_get_assoc_id(hdlp, objp->label, PSVC_PHYSICAL_DEVICE, - 0, &physid); - if (status != PSVC_SUCCESS) - return (status); - status = i_psvc_get_obj(hdlp, physid, &physobjp); - if (status != PSVC_SUCCESS) - return (status); - - status = ((EPhysDev_t *)physobjp)->get_bit(hdlp, objp->addr_spec, - &bit_value); - if (status != PSVC_SUCCESS) - return (status); - - *value = bit_value; - - return (status); -} - -static int32_t -i_psvc_set_device_value_6_0(EHdl_t *hdlp, EObj_t *objp, boolean_t *value) -{ - int32_t status = PSVC_SUCCESS; - int32_t bit_value; - char *physid; - EObj_t *physobjp; - - if (objp->present != PSVC_PRESENT) { - errno = ENODEV; - return (PSVC_FAILURE); - } - - bit_value = *value; - status = i_psvc_get_assoc_id(hdlp, objp->label, PSVC_PHYSICAL_DEVICE, - 0, &physid); - if (status != PSVC_SUCCESS) - return (status); - status = i_psvc_get_obj(hdlp, physid, &physobjp); - if (status != PSVC_SUCCESS) - return (status); - - status = ((EPhysDev_t *)physobjp)->set_bit(hdlp, objp->addr_spec, - bit_value); - if (status != PSVC_SUCCESS) - return (status); - - return (status); -} - -static int32_t -i_psvc_get_device_value_1_0(EHdl_t *hdlp, EObj_t *objp, int32_t *fan_speed) -{ - int32_t status = PSVC_SUCCESS; - EObj_t *ftobjp; - char *fan_tach; - - if (objp->present != PSVC_PRESENT) { - errno = ENODEV; - return (PSVC_FAILURE); - } - - status = i_psvc_get_assoc_id(hdlp, objp->label, - PSVC_FAN_SPEED_TACHOMETER, 0, &fan_tach); - if (status != PSVC_SUCCESS) - return (status); - - status = i_psvc_get_obj(hdlp, fan_tach, &ftobjp); - if (status != PSVC_SUCCESS) - return (status); - - status = ftobjp->get_attr(hdlp, ftobjp, PSVC_SENSOR_VALUE_ATTR, - fan_speed); - if (status != PSVC_SUCCESS) - return (status); - - return (status); -} - -static int32_t -i_psvc_get_device_value_7_0(EHdl_t *hdlp, EObj_t *objp, int32_t *fan_speed) -{ - char *physid; - EObj_t *physobjp; - int32_t status = PSVC_SUCCESS; - - if (objp->present != PSVC_PRESENT) { - errno = ENODEV; - return (PSVC_FAILURE); - } - - status = i_psvc_get_assoc_id(hdlp, objp->label, PSVC_PHYSICAL_DEVICE, - 0, &physid); - if (status != PSVC_SUCCESS) - return (status); - status = i_psvc_get_obj(hdlp, physid, &physobjp); - if (status != PSVC_SUCCESS) - return (status); - - status = ((EPhysDev_t *)physobjp)->get_fanspeed(hdlp, objp->addr_spec, - fan_speed); - if (status != PSVC_SUCCESS) - return (status); - - if (objp->features & PSVC_CONVERSION_TABLE) { - int32_t m; - char *tid; - int16_t temp16; - - status = i_psvc_get_assoc_matches(hdlp, objp->label, - PSVC_TABLE, &m); - if ((status != PSVC_SUCCESS) || (m != 1)) { - return (status); - } - - (void) i_psvc_get_assoc_id(hdlp, objp->label, PSVC_TABLE, 0, - &tid); - - status = i_psvc_get_table_value(hdlp, tid, *fan_speed, &temp16); - *fan_speed = temp16; - } - return (status); -} - -static int32_t -i_psvc_get_device_state_2_0(EHdl_t *hdlp, EObj_t *objp, char *led_state) -{ - int32_t status = PSVC_SUCCESS; - int32_t bit_value; - boolean_t active_low; - char *physid; - EObj_t *physobjp; - - if (objp->present != PSVC_PRESENT) { - errno = ENODEV; - return (PSVC_FAILURE); - } - - status = i_psvc_get_assoc_id(hdlp, objp->label, PSVC_PHYSICAL_DEVICE, - 0, &physid); - if (status != PSVC_SUCCESS) - return (status); - status = i_psvc_get_obj(hdlp, physid, &physobjp); - if (status != PSVC_SUCCESS) - return (status); - - status = ((EPhysDev_t *)physobjp)->get_bit(hdlp, objp->addr_spec, - &bit_value); - if (status != PSVC_SUCCESS) - return (status); - - active_low = PSVC_IS_ACTIVE_LOW(objp->addr_spec); - if (active_low) - if (bit_value == 0) - strcpy(led_state, PSVC_LED_ON); - else - strcpy(led_state, PSVC_LED_OFF); - else - if (bit_value == 0) - strcpy(led_state, PSVC_LED_OFF); - else - strcpy(led_state, PSVC_LED_ON); - - return (status); -} - -static int32_t -i_psvc_set_device_state_2_0(EHdl_t *hdlp, EObj_t *objp, char *led_state) -{ - int32_t status = PSVC_SUCCESS; - boolean_t active_low; - int32_t bit_value; - char *physid; - EObj_t *physobjp; - - if (objp->present != PSVC_PRESENT) { - errno = ENODEV; - return (PSVC_FAILURE); - } - - if (strcmp(((ELed_t *)objp)->is_locator, PSVC_LOCATOR_TRUE) != 0) { - /* - * For Locator LEDs we ignore lit_count. RSC may have - * altered the LED state underneath us, So we should - * always just do what the user asked instead of trying - * to be smart. - */ - - if (strcmp(led_state, PSVC_LED_ON) == 0) - ((ELed_t *)objp)->lit_count++; - else if (strcmp(led_state, PSVC_LED_OFF) == 0) { - if (--((ELed_t *)objp)->lit_count > 0) { - return (PSVC_SUCCESS); - } else if (((ELed_t *)objp)->lit_count < 0) - ((ELed_t *)objp)->lit_count = 0; - /* Fall through case is when lit_count is 0 */ - } - } - - strcpy(objp->previous_state, objp->state); - strcpy(objp->state, led_state); - - bit_value = (strcmp(led_state, PSVC_LED_ON) == 0); - - /* - * Flip the bit if necessary (for active_low devices, - * O ==> ON; 1 ==> OFF. - */ - active_low = PSVC_IS_ACTIVE_LOW(objp->addr_spec); - bit_value ^= active_low; - - status = i_psvc_get_assoc_id(hdlp, objp->label, PSVC_PHYSICAL_DEVICE, - 0, &physid); - if (status != PSVC_SUCCESS) - return (status); - status = i_psvc_get_obj(hdlp, physid, &physobjp); - if (status != PSVC_SUCCESS) - return (status); - - status = ((EPhysDev_t *)physobjp)->set_bit(hdlp, objp->addr_spec, - bit_value); - return (status); -} - -static int32_t -i_psvc_get_device_state_2_1(EHdl_t *hdlp, EObj_t *objp, char *led_state) -{ - int32_t status = PSVC_SUCCESS; - uint8_t value; - char *physid; - EObj_t *physobjp; - - if (objp->present != PSVC_PRESENT) { - errno = ENODEV; - return (PSVC_FAILURE); - } - - status = i_psvc_get_assoc_id(hdlp, objp->label, PSVC_PHYSICAL_DEVICE, - 0, &physid); - if (status != PSVC_SUCCESS) - return (status); - status = i_psvc_get_obj(hdlp, physid, &physobjp); - if (status != PSVC_SUCCESS) - return (status); - - status = ((EPhysDev_t *)physobjp)->get_reg(hdlp, objp->addr_spec, - &value); - if (status != PSVC_SUCCESS) - return (status); - - switch (value) { - case 0: - strcpy(led_state, PSVC_LED_OFF); - break; - case 1: - strcpy(led_state, PSVC_LED_SLOW_BLINK); - break; - case 2: - strcpy(led_state, PSVC_LED_FAST_BLINK); - break; - case 3: - strcpy(led_state, PSVC_LED_ON); - break; - } - - return (status); -} - -static int32_t -i_psvc_set_device_state_2_1(EHdl_t *hdlp, EObj_t *objp, char *led_state) -{ - int32_t status = PSVC_SUCCESS; - uint8_t value; - char *physid; - EObj_t *physobjp; - - if (objp->present != PSVC_PRESENT) { - errno = ENODEV; - return (PSVC_FAILURE); - } - - if (strcmp(led_state, PSVC_LED_ON) == 0) - ((ELed_t *)objp)->lit_count++; - else if (strcmp(led_state, PSVC_LED_OFF) == 0) { - if (--((ELed_t *)objp)->lit_count > 0) { - return (PSVC_SUCCESS); - } else if (((ELed_t *)objp)->lit_count < 0) - ((ELed_t *)objp)->lit_count = 0; - - /* Fall through case is when lit_count is 0 */ - } - - strcpy(objp->previous_state, objp->state); - strcpy(objp->state, led_state); - - if (strcmp(led_state, PSVC_LED_OFF) == 0) - value = 0; - else if (strcmp(led_state, PSVC_LED_SLOW_BLINK) == 0) - value = 1; - else if (strcmp(led_state, PSVC_LED_FAST_BLINK) == 0) - value = 2; - else if (strcmp(led_state, PSVC_LED_ON) == 0) - value = 3; - - status = i_psvc_get_assoc_id(hdlp, objp->label, PSVC_PHYSICAL_DEVICE, - 0, &physid); - if (status != PSVC_SUCCESS) - return (status); - status = i_psvc_get_obj(hdlp, physid, &physobjp); - if (status != PSVC_SUCCESS) - return (status); - - status = ((EPhysDev_t *)physobjp)->set_reg(hdlp, objp->addr_spec, - value); - - return (status); -} - -static int32_t -i_psvc_get_device_state_9_0(EHdl_t *hdlp, EObj_t *objp, char *pos) -{ - int32_t status = PSVC_SUCCESS, matches; - char *sensorid; - EObj_t *sensorp; - char state[32]; - - if (objp->present != PSVC_PRESENT) { - errno = ENODEV; - return (PSVC_FAILURE); - } - - if (objp->features & PSVC_NORMAL_POS_AV) { - (void) i_psvc_get_assoc_matches(hdlp, objp->label, - PSVC_KS_NORMAL_POS_SENSOR, &matches); - if (matches == 1) { - status = i_psvc_get_assoc_id(hdlp, objp->label, - PSVC_KS_NORMAL_POS_SENSOR, 0, &sensorid); - if (status != PSVC_SUCCESS) - return (status); - - status = i_psvc_get_obj(hdlp, sensorid, &sensorp); - if (status != PSVC_SUCCESS) - return (status); - - status = sensorp->get_attr(hdlp, sensorp, - PSVC_SWITCH_STATE_ATTR, state); - if (status != PSVC_SUCCESS) - return (status); - - if (strcmp(state, PSVC_SWITCH_ON) == 0) { - strcpy(pos, PSVC_NORMAL_POS); - return (PSVC_SUCCESS); - } - } - } - - if (objp->features & PSVC_DIAG_POS_AV) { - (void) i_psvc_get_assoc_matches(hdlp, objp->label, - PSVC_KS_DIAG_POS_SENSOR, &matches); - if (matches == 1) { - status = i_psvc_get_assoc_id(hdlp, objp->label, - PSVC_KS_DIAG_POS_SENSOR, 0, &sensorid); - if (status != PSVC_SUCCESS) - return (status); - - status = i_psvc_get_obj(hdlp, sensorid, &sensorp); - if (status != PSVC_SUCCESS) - return (status); - - status = sensorp->get_attr(hdlp, sensorp, - PSVC_SWITCH_STATE_ATTR, state); - if (status != PSVC_SUCCESS) - return (status); - - if (strcmp(state, PSVC_SWITCH_ON) == 0) { - strcpy(pos, PSVC_DIAG_POS); - return (PSVC_SUCCESS); - } - } - } - - if (objp->features & PSVC_LOCK_POS_AV) { - (void) i_psvc_get_assoc_matches(hdlp, objp->label, - PSVC_KS_LOCK_POS_SENSOR, &matches); - if (matches == 1) { - status = i_psvc_get_assoc_id(hdlp, objp->label, - PSVC_KS_LOCK_POS_SENSOR, 0, &sensorid); - if (status != PSVC_SUCCESS) - return (status); - - status = i_psvc_get_obj(hdlp, sensorid, &sensorp); - if (status != PSVC_SUCCESS) - return (status); - - status = sensorp->get_attr(hdlp, sensorp, - PSVC_SWITCH_STATE_ATTR, state); - if (status != PSVC_SUCCESS) - return (status); - - if (strcmp(state, PSVC_SWITCH_ON) == 0) { - strcpy(pos, PSVC_LOCKED_POS); - return (PSVC_SUCCESS); - } - } - } - - if (objp->features & PSVC_OFF_POS_AV) { - (void) i_psvc_get_assoc_matches(hdlp, objp->label, - PSVC_KS_OFF_POS_SENSOR, &matches); - if (matches == 1) { - status = i_psvc_get_assoc_id(hdlp, objp->label, - PSVC_KS_OFF_POS_SENSOR, 0, &sensorid); - if (status != PSVC_SUCCESS) - return (status); - - status = i_psvc_get_obj(hdlp, sensorid, &sensorp); - if (status != PSVC_SUCCESS) - return (status); - - status = sensorp->get_attr(hdlp, sensorp, - PSVC_SWITCH_STATE_ATTR, state); - if (status != PSVC_SUCCESS) - return (status); - - if (strcmp(state, PSVC_SWITCH_ON) == 0) { - strcpy(pos, PSVC_OFF_POS); - return (PSVC_SUCCESS); - } - } - } - /* If we have fallen through till here, something's wrong */ - errno = EINVAL; - return (PSVC_FAILURE); -} - - -static int32_t -i_psvc_get_device_value_10_0(EHdl_t *hdlp, EObj_t *objp, uint8_t *value) -{ - int32_t status = PSVC_SUCCESS; - char *physid; - EObj_t *physobjp; - - if (objp->present != PSVC_PRESENT) { - errno = ENODEV; - return (PSVC_FAILURE); - } - - status = i_psvc_get_assoc_id(hdlp, objp->label, PSVC_PHYSICAL_DEVICE, - 0, &physid); - if (status != PSVC_SUCCESS) - return (status); - status = i_psvc_get_obj(hdlp, physid, &physobjp); - if (status != PSVC_SUCCESS) - return (status); - - status = ((EPhysDev_t *)physobjp)->get_reg(hdlp, objp->addr_spec, - value); - if (status != PSVC_SUCCESS) - return (status); - - if (objp->features & PSVC_CONVERSION_TABLE) { - int32_t m; - char *tid; - uint8_t temp8; - - status = i_psvc_get_assoc_matches(hdlp, objp->label, - PSVC_TABLE, &m); - if ((status != PSVC_SUCCESS) || (m != 1)) { - return (status); - } - - (void) i_psvc_get_assoc_id(hdlp, objp->label, - PSVC_TABLE, 0, &tid); - - status = i_psvc_get_table_value(hdlp, tid, *value, &temp8); - *value = temp8; - } - return (status); -} - -static int32_t -i_psvc_get_device_value_10_1(EHdl_t *hdlp, EObj_t *objp, uint8_t *value) -{ - int32_t status = PSVC_SUCCESS; - char *physid; - EObj_t *physobjp; - - if (objp->present != PSVC_PRESENT) { - errno = ENODEV; - return (PSVC_FAILURE); - } - - status = i_psvc_get_assoc_id(hdlp, objp->label, PSVC_PHYSICAL_DEVICE, - 0, &physid); - if (status != PSVC_SUCCESS) - return (status); - status = i_psvc_get_obj(hdlp, physid, &physobjp); - if (status != PSVC_SUCCESS) - return (status); - - status = ((EPhysDev_t *)physobjp)->get_port(hdlp, objp->addr_spec, - value); - if (status != PSVC_SUCCESS) - return (status); - - return (status); -} - -static int32_t -i_psvc_set_device_value_10_0(EHdl_t *hdlp, EObj_t *objp, uint8_t *value) -{ - int32_t status = PSVC_SUCCESS; - char *physid; - EObj_t *physobjp; - - if (objp->present != PSVC_PRESENT) { - errno = ENODEV; - return (PSVC_FAILURE); - } - - status = i_psvc_get_assoc_id(hdlp, objp->label, PSVC_PHYSICAL_DEVICE, - 0, &physid); - if (status != PSVC_SUCCESS) - return (status); - status = i_psvc_get_obj(hdlp, physid, &physobjp); - if (status != PSVC_SUCCESS) - return (status); - - status = ((EPhysDev_t *)physobjp)->set_reg(hdlp, objp->addr_spec, - *value); - return (status); -} - -static int32_t -i_psvc_set_device_value_10_1(EHdl_t *hdlp, EObj_t *objp, uint8_t *value) -{ - int32_t status = PSVC_SUCCESS; - char *physid; - EObj_t *physobjp; - - if (objp->present != PSVC_PRESENT) { - errno = ENODEV; - return (PSVC_FAILURE); - } - - status = i_psvc_get_assoc_id(hdlp, objp->label, PSVC_PHYSICAL_DEVICE, - 0, &physid); - if (status != PSVC_SUCCESS) - return (status); - status = i_psvc_get_obj(hdlp, physid, &physobjp); - if (status != PSVC_SUCCESS) - return (status); - - status = ((EPhysDev_t *)physobjp)->set_port(hdlp, objp->addr_spec, - *value); - return (status); -} - -static int32_t -i_psvc_get_device_state_8_0(EHdl_t *hdlp, EObj_t *objp, char *sw_state) -{ - int32_t status = PSVC_SUCCESS; - boolean_t active_low; - int32_t bit_value; - char *physid; - EObj_t *physobjp; - - if (objp->present != PSVC_PRESENT) { - errno = ENODEV; - return (PSVC_FAILURE); - } - - status = i_psvc_get_assoc_id(hdlp, objp->label, PSVC_PHYSICAL_DEVICE, - 0, &physid); - if (status != PSVC_SUCCESS) - return (status); - status = i_psvc_get_obj(hdlp, physid, &physobjp); - if (status != PSVC_SUCCESS) - return (status); - - status = ((EPhysDev_t *)physobjp)->get_bit(hdlp, objp->addr_spec, - &bit_value); - if (status != PSVC_SUCCESS) - return (status); - - active_low = PSVC_IS_ACTIVE_LOW(objp->addr_spec); - if (active_low) - if (bit_value == 0) - strcpy(sw_state, PSVC_SWITCH_ON); - else - strcpy(sw_state, PSVC_SWITCH_OFF); - else - if (bit_value == 0) - strcpy(sw_state, PSVC_SWITCH_OFF); - else - strcpy(sw_state, PSVC_SWITCH_ON); - - return (status); -} - -static int32_t -i_psvc_set_device_state_8_0(EHdl_t *hdlp, EObj_t *objp, char *sw_state) -{ - int32_t status = PSVC_SUCCESS; - boolean_t active_low; - int32_t bit_value; - char *physid; - EObj_t *physobjp; - - if (objp->present != PSVC_PRESENT) { - errno = ENODEV; - return (PSVC_FAILURE); - } - - strcpy(objp->previous_state, objp->state); - strcpy(objp->state, sw_state); - - active_low = PSVC_IS_ACTIVE_LOW(objp->addr_spec); - - if (active_low) - if (strcmp(sw_state, PSVC_SWITCH_ON) == 0) - bit_value = 0; - else - bit_value = 1; - else - if (strcmp(sw_state, PSVC_SWITCH_ON) == 0) - bit_value = 1; - else - bit_value = 0; - - status = i_psvc_get_assoc_id(hdlp, objp->label, PSVC_PHYSICAL_DEVICE, - 0, &physid); - if (status != PSVC_SUCCESS) - return (status); - status = i_psvc_get_obj(hdlp, physid, &physobjp); - if (status != PSVC_SUCCESS) - return (status); - - status = ((EPhysDev_t *)physobjp)->set_bit(hdlp, objp->addr_spec, - bit_value); - return (status); -} - -/* LM75 */ -static int32_t -i_psvc_get_temperature_11_2(EHdl_t *hdlp, uint64_t aspec, int32_t *temp) -{ - int32_t status = PSVC_SUCCESS; - char path[1024]; - int32_t fp; - int16_t temp16; - - status = i_psvc_get_devpath(hdlp, aspec, path); - if (status != PSVC_SUCCESS) - return (status); - - fp = open(path, O_RDWR); - if (fp == -1) - return (PSVC_FAILURE); - - status = ioctl_retry(fp, I2C_GET_TEMPERATURE, (void *)&temp16); - if (status == -1) { - close(fp); - errno = EIO; - return (PSVC_FAILURE); - } - *temp = temp16; - - close(fp); - - return (status); -} - -/* MAX1617 */ -static int32_t -i_psvc_get_temperature_11_4(EHdl_t *hdlp, uint64_t aspec, int32_t *temp) -{ - int32_t status = PSVC_SUCCESS; - char path[1024]; - int32_t fp; - int16_t temp16; - - status = i_psvc_get_devpath(hdlp, aspec, path); - if (status != PSVC_SUCCESS) - return (status); - - fp = open(path, O_RDWR); - if (fp == -1) - return (PSVC_FAILURE); - - status = ioctl_retry(fp, I2C_GET_TEMPERATURE, (void *)&temp16); - if (status == -1) { - close(fp); - errno = EIO; - return (PSVC_FAILURE); - } - *temp = temp16; - - close(fp); - - return (status); -} - -/* PCF8591 */ -static int32_t -i_psvc_get_temperature_11_6(EHdl_t *hdlp, uint64_t aspec, int32_t *temp) -{ - int32_t status = PSVC_SUCCESS; - char path[1024]; - int32_t fp; - - status = i_psvc_get_devpath(hdlp, aspec, path); - if (status != PSVC_SUCCESS) - return (status); - - fp = open(path, O_RDWR); - if (fp == -1) - return (PSVC_FAILURE); - - status = ioctl_retry(fp, I2C_GET_INPUT, (void *)temp); - if (status == -1) { - close(fp); - errno = EIO; - return (-1); - } - - close(fp); - - return (status); -} - -/* SSC050 */ -static int32_t -i_psvc_get_fanspeed_11_7(EHdl_t *hdlp, uint64_t aspec, int32_t *fan_speed) -{ - int32_t ret, status = PSVC_SUCCESS; - char path[1024]; - int32_t fp; - - status = i_psvc_get_devpath(hdlp, aspec, path); - if (status != PSVC_SUCCESS) - return (status); - - fp = open(path, O_RDWR); - if (fp == -1) - return (PSVC_FAILURE); - - ret = ioctl_retry(fp, I2C_GET_FAN_SPEED, (void *)fan_speed); - if (ret == -1) { - close(fp); - errno = EIO; - return (-1); - } - - close(fp); - - return (status); -} - -/* PCF8591 */ -static int32_t -i_psvc_get_input_11_6(EHdl_t *hdlp, uint64_t aspec, int32_t *value) -{ - int32_t ret, status = PSVC_SUCCESS; - char path[1024]; - int32_t fp; - - status = i_psvc_get_devpath(hdlp, aspec, path); - if (status != PSVC_SUCCESS) - return (status); - - fp = open(path, O_RDWR); - if (fp == -1) - return (PSVC_FAILURE); - - ret = ioctl_retry(fp, I2C_GET_INPUT, (void *)value); - if (ret == -1) { - close(fp); - errno = EIO; - return (-1); - } - - close(fp); - - return (status); -} - -/* LTC1427 */ -static int32_t -i_psvc_get_output_11_3(EHdl_t *hdlp, uint64_t aspec, int32_t *value) -{ - int32_t ret, status = PSVC_SUCCESS; - char path[1024]; - int32_t fp; - - status = i_psvc_get_devpath(hdlp, aspec, path); - if (status != PSVC_SUCCESS) - return (status); - - fp = open(path, O_RDWR); - if (fp == -1) - return (PSVC_FAILURE); - - ret = ioctl_retry(fp, I2C_GET_OUTPUT, (void *)value); - if (ret == -1) { - close(fp); - errno = EIO; - return (PSVC_FAILURE); - } - - close(fp); - - return (status); -} - -/* PCF8591 */ -static int32_t -i_psvc_get_output_11_6(EHdl_t *hdlp, uint64_t aspec, int32_t *value) -{ - int32_t ret, status = PSVC_SUCCESS; - char path[1024]; - int32_t fp; - - status = i_psvc_get_devpath(hdlp, aspec, path); - if (status != PSVC_SUCCESS) - return (status); - - fp = open(path, O_RDWR); - if (fp == -1) - return (PSVC_FAILURE); - - ret = ioctl_retry(fp, I2C_GET_OUTPUT, (void *)value); - if (ret == -1) { - close(fp); - errno = EIO; - return (PSVC_FAILURE); - } - - close(fp); - - return (status); -} - -/* TDA8444 */ -static int32_t -i_psvc_get_output_11_8(EHdl_t *hdlp, uint64_t aspec, int32_t *value) -{ - int32_t ret, status = PSVC_SUCCESS; - char path[1024]; - int32_t fp; - int8_t buf; - - status = i_psvc_get_devpath(hdlp, aspec, path); - if (status != PSVC_SUCCESS) - return (status); - - fp = open(path, O_RDWR); - if (fp == -1) - return (PSVC_FAILURE); - - ret = read(fp, &buf, 1); - if (ret == -1) { - close(fp); - errno = EIO; - return (PSVC_FAILURE); - } - *value = buf; - - close(fp); - - return (status); -} - -/* LTC1427 */ -static int32_t -i_psvc_set_output_11_3(EHdl_t *hdlp, uint64_t aspec, int32_t value) -{ - int32_t ret, status = PSVC_SUCCESS; - char path[1024]; - int32_t fp; - - status = i_psvc_get_devpath(hdlp, aspec, path); - if (status != PSVC_SUCCESS) - return (status); - - fp = open(path, O_RDWR); - if (fp == -1) - return (PSVC_FAILURE); - - ret = ioctl_retry(fp, I2C_SET_OUTPUT, (void *)&value); - if (ret == -1) { - close(fp); - errno = EIO; - return (PSVC_FAILURE); - } - - close(fp); - - return (status); -} - -/* PCF8591 */ -static int32_t -i_psvc_set_output_11_6(EHdl_t *hdlp, uint64_t aspec, int32_t value) -{ - int32_t ret, status = PSVC_SUCCESS; - char path[1024]; - int32_t fp; - - status = i_psvc_get_devpath(hdlp, aspec, path); - if (status != PSVC_SUCCESS) - return (status); - - fp = open(path, O_RDWR); - if (fp == -1) - return (PSVC_FAILURE); - - ret = ioctl_retry(fp, I2C_SET_OUTPUT, (void *)&value); - if (ret == -1) { - close(fp); - errno = EIO; - return (PSVC_FAILURE); - } - - close(fp); - - return (status); -} - -/* TDA8444 */ -static int32_t -i_psvc_set_output_11_8(EHdl_t *hdlp, uint64_t aspec, int32_t value) -{ - int32_t ret, status = PSVC_SUCCESS; - char path[1024]; - int32_t fp; - int8_t buf; - - status = i_psvc_get_devpath(hdlp, aspec, path); - if (status != PSVC_SUCCESS) - return (status); - - fp = open(path, O_RDWR); - if (fp == -1) - return (PSVC_FAILURE); - - buf = value; - ret = write(fp, &buf, 1); - if (ret == -1) { - close(fp); - errno = EIO; - return (PSVC_FAILURE); - } - - close(fp); - - return (status); -} - -/* HPC3130 */ -static int32_t -i_psvc_get_reg_11_1(EHdl_t *hdlp, uint64_t aspec, uint8_t *value) -{ - int32_t ret, status = PSVC_SUCCESS; - uint8_t bitshift, bytemask; - char path[1024]; - i2c_reg_t i2cregarg; - int32_t fp; - - status = i_psvc_get_devpath(hdlp, aspec, path); - if (status != PSVC_SUCCESS) - return (status); - fp = open(path, O_RDWR); - if (fp == -1) - return (PSVC_FAILURE); - - i2cregarg.reg_num = PSVC_GET_ASPEC_REG(aspec); - ret = ioctl_retry(fp, I2C_GET_REG, (void *)&i2cregarg); - if (ret == -1) { - close(fp); - errno = EIO; - return (-1); - } - - bitshift = PSVC_GET_ASPEC_BITSHIFT(aspec); - bytemask = PSVC_GET_ASPEC_BYTEMASK(aspec); - if (value != NULL) - *value = (i2cregarg.reg_value & bytemask) >> bitshift; - close(fp); - - return (status); -} - -/* SSC050 */ -static int32_t -i_psvc_get_reg_11_7(EHdl_t *hdlp, uint64_t aspec, uint8_t *value) -{ - int32_t ret, status = PSVC_SUCCESS; - uint8_t bitshift, bytemask; - char path[1024]; - i2c_reg_t i2cregarg; - int32_t fp; - - status = i_psvc_get_devpath(hdlp, aspec, path); - if (status != PSVC_SUCCESS) - return (status); - - fp = open(path, O_RDWR); - if (fp == -1) - return (PSVC_FAILURE); - - i2cregarg.reg_num = PSVC_GET_ASPEC_REG(aspec); - ret = ioctl_retry(fp, I2C_GET_REG, (void *)&i2cregarg); - if (ret == -1) { - close(fp); - errno = EIO; - return (-1); - } - - bitshift = PSVC_GET_ASPEC_BITSHIFT(aspec); - bytemask = PSVC_GET_ASPEC_BYTEMASK(aspec); - if (value != NULL) - *value = (i2cregarg.reg_value & bytemask) >> bitshift; - - close(fp); - - return (status); -} - -/* HPC3130 */ -static int32_t -i_psvc_set_reg_11_1(EHdl_t *hdlp, uint64_t aspec, int32_t value) -{ - int32_t ret, status = PSVC_SUCCESS; - char path[1024]; - i2c_reg_t i2cregarg; - int8_t tval; - uint8_t bitshift, bytemask; - int32_t fp; - - status = i_psvc_get_devpath(hdlp, aspec, path); - if (status != PSVC_SUCCESS) - return (status); - - bitshift = PSVC_GET_ASPEC_BITSHIFT(aspec); - bytemask = PSVC_GET_ASPEC_BYTEMASK(aspec); - value = value << bitshift; - - fp = open(path, O_RDWR); - if (fp == -1) - return (PSVC_FAILURE); - - i2cregarg.reg_num = PSVC_GET_ASPEC_REG(aspec); - if (bytemask != 0xFF) { - ret = ioctl_retry(fp, I2C_GET_REG, (void *)&i2cregarg); - if (ret == -1) { - close(fp); - errno = EIO; - return (-1); - } - tval = i2cregarg.reg_value; - tval = tval & ~bytemask; - } else - tval = 0; - - value = tval | value; - i2cregarg.reg_value = value; - ret = ioctl_retry(fp, I2C_SET_REG, (void *)&i2cregarg); - if (ret == -1) { - close(fp); - errno = EIO; - return (-1); - } - - close(fp); - - return (status); -} - -/* SSC050 */ -static int32_t -i_psvc_set_reg_11_7(EHdl_t *hdlp, uint64_t aspec, int32_t value) -{ - int32_t ret, status = PSVC_SUCCESS; - char path[1024]; - i2c_reg_t i2cregarg; - int8_t tval; - uint8_t bitshift, bytemask; - int32_t fp; - - status = i_psvc_get_devpath(hdlp, aspec, path); - if (status != PSVC_SUCCESS) - return (status); - - bitshift = PSVC_GET_ASPEC_BITSHIFT(aspec); - bytemask = PSVC_GET_ASPEC_BYTEMASK(aspec); - value = value << bitshift; - - fp = open(path, O_RDWR); - if (fp == -1) - return (PSVC_FAILURE); - - i2cregarg.reg_num = PSVC_GET_ASPEC_REG(aspec); - if (bytemask != 0xFF) { - ret = ioctl_retry(fp, I2C_GET_REG, (void *)&i2cregarg); - if (ret == -1) { - close(fp); - errno = EIO; - return (-1); - } - tval = i2cregarg.reg_value; - tval = tval & ~bytemask; - } else - tval = 0; - - value = tval | value; - i2cregarg.reg_value = value; - ret = ioctl_retry(fp, I2C_SET_REG, (void *)&i2cregarg); - if (ret == -1) { - close(fp); - errno = EIO; - return (-1); - } - - close(fp); - - return (status); -} - -/* PCF8574 */ -static int32_t -i_psvc_get_bit_11_5(EHdl_t *hdlp, uint64_t aspec, int32_t *value) -{ - int32_t ret, status = PSVC_SUCCESS; - char path[1024]; - i2c_bit_t bitarg; - int32_t fp; - - status = i_psvc_get_devpath(hdlp, aspec, path); - if (status != PSVC_SUCCESS) - return (status); - - bitarg.bit_num = PSVC_GET_BIT_NUM(aspec); - bitarg.direction = DIR_NO_CHANGE; - - fp = open(path, O_RDWR); - if (fp == -1) - return (PSVC_FAILURE); - - ret = ioctl_retry(fp, I2C_GET_BIT, (void *)&bitarg); - if (ret == -1) { - close(fp); - errno = EIO; - return (-1); - } - - *value = bitarg.bit_value; - - close(fp); - - return (status); -} - -/* PCF8574 */ -static int32_t -i_psvc_get_port_11_5(EHdl_t *hdlp, uint64_t aspec, uint8_t *value) -{ - int32_t ret, status = PSVC_SUCCESS; - char path[1024]; - i2c_port_t port; - int32_t fp; - - status = i_psvc_get_devpath(hdlp, aspec, path); - if (status != PSVC_SUCCESS) - return (status); - - port.direction = DIR_NO_CHANGE; - - fp = open(path, O_RDWR); - if (fp == -1) - return (PSVC_FAILURE); - - ret = ioctl_retry(fp, I2C_GET_PORT, (void *)&port); - if (ret == -1) { - close(fp); - errno = EIO; - return (-1); - } - - *value = port.value; - - close(fp); - - return (status); -} - -/* SSC050 */ -static int32_t -i_psvc_get_bit_11_7(EHdl_t *hdlp, uint64_t aspec, int32_t *value) -{ - int32_t ret, status = PSVC_SUCCESS; - char path[1024]; - i2c_bit_t bitarg; - int32_t fp; - - status = i_psvc_get_devpath(hdlp, aspec, path); - if (status != PSVC_SUCCESS) - return (status); - - bitarg.bit_num = PSVC_GET_BIT_NUM(aspec); - bitarg.direction = DIR_NO_CHANGE; - - fp = open(path, O_RDWR); - if (fp == -1) - return (PSVC_FAILURE); - - ret = ioctl_retry(fp, I2C_GET_BIT, (void *)&bitarg); - if (ret == -1) { - close(fp); - errno = EIO; - return (-1); - } - - *value = bitarg.bit_value; - - close(fp); - - return (status); -} - -/* PCF8574 */ -static int32_t -i_psvc_set_bit_11_5(EHdl_t *hdlp, uint64_t aspec, int32_t value) -{ - int32_t ret, status = PSVC_SUCCESS; - char path[1024]; - i2c_bit_t bitarg; - int32_t fp; - - status = i_psvc_get_devpath(hdlp, aspec, path); - if (status != PSVC_SUCCESS) - return (status); - - bitarg.bit_value = value; - bitarg.bit_num = PSVC_GET_BIT_NUM(aspec); - bitarg.direction = DIR_OUTPUT; - fp = open(path, O_RDWR); - if (fp == -1) - return (PSVC_FAILURE); - - ret = ioctl_retry(fp, I2C_SET_BIT, (void *)&bitarg); - if (ret == -1) { - close(fp); - errno = EIO; - return (-1); - } - - close(fp); - - return (status); -} - -/* PCF8574 */ -static int32_t -i_psvc_set_port_11_5(EHdl_t *hdlp, uint64_t aspec, int32_t value) -{ - int32_t ret, status = PSVC_SUCCESS; - char path[1024]; - i2c_port_t port; - int32_t fp; - - status = i_psvc_get_devpath(hdlp, aspec, path); - if (status != PSVC_SUCCESS) - return (status); - - port.value = (uint8_t)value; - port.direction = DIR_NO_CHANGE; - fp = open(path, O_RDWR); - if (fp == -1) - return (PSVC_FAILURE); - - ret = ioctl_retry(fp, I2C_SET_PORT, (void *)&port); - if (ret == -1) { - close(fp); - errno = EIO; - return (-1); - } - - close(fp); - - return (status); -} - -/* SSC050 */ -static int32_t -i_psvc_set_bit_11_7(EHdl_t *hdlp, uint64_t aspec, int32_t value) -{ - int32_t ret, status = PSVC_SUCCESS; - char path[1024]; - i2c_bit_t bitarg; - int32_t fp; - - status = i_psvc_get_devpath(hdlp, aspec, path); - if (status != PSVC_SUCCESS) - return (status); - - bitarg.bit_value = value; - bitarg.bit_num = PSVC_GET_BIT_NUM(aspec); - bitarg.direction = DIR_OUTPUT; - - fp = open(path, O_RDWR); - if (fp == -1) - return (PSVC_FAILURE); - - ret = ioctl_retry(fp, I2C_SET_BIT, (void *)&bitarg); - if (ret == -1) { - close(fp); - errno = EIO; - return (-1); - } - - close(fp); - - return (status); -} - -/* AT24 */ -static int32_t -i_psvc_probe_11_0(EHdl_t *hdlp, EObj_t *objp) -{ - int32_t ret, status = PSVC_SUCCESS; - uint8_t value; - char path[1024]; - int32_t fp; - - if (objp->present != PSVC_PRESENT) { - errno = ENODEV; - return (PSVC_FAILURE); - } - - status = i_psvc_get_devpath(hdlp, objp->addr_spec, path); - if (status != PSVC_SUCCESS) { - return (status); - } - - fp = open(path, O_RDWR); - if (fp == -1) { - return (PSVC_FAILURE); - } - - ret = read(fp, &value, 1); - if (ret == -1) { - close(fp); - errno = EIO; - return (-1); - } - - close(fp); - - return (status); -} - -/* HPC3130 */ -static int32_t -i_psvc_probe_11_1(EHdl_t *hdlp, EObj_t *objp) -{ - int32_t ret, status = PSVC_SUCCESS; - char path[1024]; - i2c_reg_t reg; - int32_t fp; - - if (objp->present != PSVC_PRESENT) { - errno = ENODEV; - return (PSVC_FAILURE); - } - - status = i_psvc_get_devpath(hdlp, objp->addr_spec, path); - if (status != PSVC_SUCCESS) - return (status); - - fp = open(path, O_RDWR); - if (fp == -1) - return (PSVC_FAILURE); - - reg.reg_num = 0; - ret = ioctl_retry(fp, I2C_GET_REG, (void *)®); - if (ret == -1) { - close(fp); - errno = EIO; - return (-1); - } - - close(fp); - - return (status); -} - -/* LM75 */ -static int32_t -i_psvc_probe_11_2(EHdl_t *hdlp, EObj_t *objp) -{ - int32_t ret, status = PSVC_SUCCESS; - char path[1024]; - int32_t fp; - int16_t temp16; - - if (objp->present != PSVC_PRESENT) { - errno = ENODEV; - return (PSVC_FAILURE); - } - - status = i_psvc_get_devpath(hdlp, objp->addr_spec, path); - if (status != PSVC_SUCCESS) { - return (status); - } - - fp = open(path, O_RDWR); - if (fp == -1) { - return (PSVC_FAILURE); - } - - ret = ioctl_retry(fp, I2C_GET_TEMPERATURE, (void *)&temp16); - if (ret == -1) { - close(fp); - errno = EIO; - return (-1); - } - - close(fp); - - return (status); -} - -/* LTC1427 */ -static int32_t -i_psvc_probe_11_3(EHdl_t *hdlp, EObj_t *objp) -{ - int32_t ret, status = PSVC_SUCCESS; - int32_t value; - char path[1024]; - int32_t fp; - - if (objp->present != PSVC_PRESENT) { - errno = ENODEV; - return (PSVC_FAILURE); - } - - status = i_psvc_get_devpath(hdlp, objp->addr_spec, path); - if (status != PSVC_SUCCESS) { - return (status); - } - - fp = open(path, O_RDWR); - if (fp == -1) { - return (PSVC_FAILURE); - } - - ret = ioctl_retry(fp, I2C_GET_OUTPUT, (void *)&value); - if (ret == -1) { - close(fp); - errno = EINVAL; - return (-1); - } - - ret = ioctl_retry(fp, I2C_SET_OUTPUT, (void *)&value); - if (ret == -1) { - close(fp); - errno = EIO; - return (-1); - } - - close(fp); - return (status); -} - -/* MAX1617 */ -static int32_t -i_psvc_probe_11_4(EHdl_t *hdlp, EObj_t *objp) -{ - int32_t ret, status = PSVC_SUCCESS; - char path[1024]; - int32_t fp; - int16_t temp16; - - if (objp->present != PSVC_PRESENT) { - errno = ENODEV; - return (PSVC_FAILURE); - } - - status = i_psvc_get_devpath(hdlp, objp->addr_spec, path); - if (status != PSVC_SUCCESS) { - return (status); - } - - fp = open(path, O_RDWR); - if (fp == -1) { - return (PSVC_FAILURE); - } - - ret = ioctl_retry(fp, I2C_GET_TEMPERATURE, (void *)&temp16); - if (ret == -1) { - close(fp); - errno = EIO; - return (-1); - } - - close(fp); - - return (status); -} - -/* PCF8574 */ -static int32_t -i_psvc_probe_11_5(EHdl_t *hdlp, EObj_t *objp) -{ - int32_t ret, status = PSVC_SUCCESS; - char path[1024]; - i2c_port_t port; - int32_t fp; - - if (objp->present != PSVC_PRESENT) { - errno = ENODEV; - return (PSVC_FAILURE); - } - - status = i_psvc_get_devpath(hdlp, objp->addr_spec, path); - if (status != PSVC_SUCCESS) { - return (status); - } - - port.direction = DIR_NO_CHANGE; - - fp = open(path, O_RDWR); - if (fp == -1) { - return (PSVC_FAILURE); - } - - ret = ioctl_retry(fp, I2C_GET_PORT, (void *)&port); - if (ret == -1) { - close(fp); - errno = EIO; - return (-1); - } - - close(fp); - - return (status); -} - -/* PCF8591 */ -static int32_t -i_psvc_probe_11_6(EHdl_t *hdlp, EObj_t *objp) -{ - int32_t ret, status = PSVC_SUCCESS; - char path[1024]; - int32_t arg; - int32_t fp; - - if (objp->present != PSVC_PRESENT) { - errno = ENODEV; - return (PSVC_FAILURE); - } - - status = i_psvc_get_devpath(hdlp, objp->addr_spec, path); - if (status != PSVC_SUCCESS) - return (status); - - fp = open(path, O_RDWR); - if (fp == -1) - return (PSVC_FAILURE); - - ret = ioctl_retry(fp, I2C_GET_INPUT, (void *)&arg); - if (ret == -1) { - close(fp); - errno = EIO; - return (-1); - } - - close(fp); - - return (status); -} - -/* SSC050 */ -static int32_t -i_psvc_probe_11_7(EHdl_t *hdlp, EObj_t *objp) -{ - int32_t ret, status = PSVC_SUCCESS; - char path[1024]; - i2c_port_t port; - int32_t fp; - - if (objp->present != PSVC_PRESENT) { - errno = ENODEV; - return (PSVC_FAILURE); - } - - status = i_psvc_get_devpath(hdlp, objp->addr_spec, path); - if (status != PSVC_SUCCESS) - return (status); - - port.direction = DIR_NO_CHANGE; - - fp = open(path, O_RDWR); - if (fp == -1) - return (PSVC_FAILURE); - - ret = ioctl_retry(fp, I2C_GET_PORT, (void *)&port); - if (ret == -1) { - close(fp); - errno = EIO; - return (-1); - } - - close(fp); - - return (status); -} - -/* TDA8444 */ -static int32_t -i_psvc_probe_11_8(EHdl_t *hdlp, EObj_t *objp) -{ - int32_t ret, status = PSVC_SUCCESS; - uint8_t value; - char path[1024]; - int32_t fp; - - if (objp->present != PSVC_PRESENT) { - errno = ENODEV; - return (PSVC_FAILURE); - } - - status = i_psvc_get_devpath(hdlp, objp->addr_spec, path); - if (status != PSVC_SUCCESS) - return (status); - - fp = open(path, O_RDWR); - if (fp == -1) - return (PSVC_FAILURE); - - ret = read(fp, &value, 1); - if (ret == -1) { - close(fp); - errno = EIO; - return (-1); - } - - close(fp); - - return (status); -} - - -/* SSC100 */ -static int32_t -i_psvc_probe_11_9(EHdl_t *hdlp, EObj_t *objp) -{ - int32_t ret, status = PSVC_SUCCESS; - char path[1024]; - i2c_reg_t reg; - int32_t fp; - - if (objp->present != PSVC_PRESENT) { - errno = ENODEV; - return (PSVC_FAILURE); - } - - status = i_psvc_get_devpath(hdlp, objp->addr_spec, path); - if (status != PSVC_SUCCESS) { - return (status); - } - - fp = open(path, O_RDWR); - if (fp == -1) { - return (PSVC_FAILURE); - } - - /* - * There are only a few register numbers that are valid numbers to - * read from. 0x10 is one of these registers. Any non-valid registers - * cause unknown behavior to the ssc100 device. - */ - reg.reg_num = 0x10; - ret = ioctl_retry(fp, I2C_GET_REG, (void *)®); - if (ret == -1) { - close(fp); - errno = EIO; - return (-1); - } - - close(fp); - - return (status); -} - - -/* - * Find start of a section within the config file, - * Returns number of records in the section. - * FILE *fd is set to first data record within section. - */ -static int32_t -i_psvc_find_file_section(FILE *fd, char *start) -{ - char *ret; - char buf[BUFSZ]; - char name[32]; - int found; - - fseek(fd, 0, SEEK_SET); - while ((ret = fgets(buf, BUFSZ, fd)) != NULL) { - if (strncmp(start, buf, strlen(start)) == 0) - break; - } - - if (ret == NULL) { - errno = EINVAL; - return (-1); - } - - found = sscanf(buf, "%s", name); - if (found != 1) { - errno = EINVAL; - return (-1); - } else { - return (0); - } - -} - -/* compare routine for qsort of str_tbl */ -static int32_t -i_psvc_name_compare_qsort(EStringId_t *s1, EStringId_t *s2) -{ - return (strcmp(s1->name, s2->name)); -} - -/* compare routine for bsearch of str_tbl */ -static int32_t -i_psvc_name_compare_bsearch(char *s1, EStringId_t *s2) -{ - return (strcmp(s1, s2->name)); -} - -/* - * Determine the initial state of a device. - */ -static int32_t -i_psvc_init_state(EHdl_t *hp, EObj_t *objp) -{ - int32_t status = PSVC_SUCCESS; - - if (objp->class == PSVC_ON_OFF_SWITCH_CLASS) { - char state[32]; - - status = objp->get_attr(hp, objp, PSVC_SWITCH_STATE_ATTR, - state); - if (status != PSVC_SUCCESS) - return (status); - - if (strcmp(state, PSVC_SWITCH_ON) == 0) - strcpy(objp->state, PSVC_ON); - else - strcpy(objp->state, PSVC_OFF); - } - - if (objp->class == PSVC_KEYSWITCH_CLASS) { - char state[32]; - - status = objp->get_attr(hp, objp, PSVC_SWITCH_STATE_ATTR, - state); - if (status != PSVC_SUCCESS) - return (status); - strcpy(objp->state, state); - } - - return (status); -} - -/* - * Return the object pointer for the object name passed in. - * Creates the object if this is the first access, - * Returns 0 if successful, -1 if not. - */ -static int32_t -i_psvc_get_obj(EHdl_t *hp, char *dev_name, EObj_t **objp) -{ - int32_t i, ret; - int32_t found, key, array; - int32_t class, subclass; - boolean_t presence; - char name[NAMELEN]; - char buf[BUFSZ]; - char *start; - ETable_Array *tbl_arr; - - key = psvc_get_str_key(dev_name); - array = key % PSVC_MAX_TABLE_ARRAYS; - tbl_arr = &(hp->tbl_arry[array]); - - for (i = 0; i < tbl_arr->obj_count; ++i) { - if (key == tbl_arr->obj_tbl[i].key) { - if (strcmp(dev_name, tbl_arr->obj_tbl[i].name) == 0) { - if (tbl_arr->obj_tbl[i].type != PSVC_OBJ) - return (-1); - *objp = tbl_arr->obj_tbl[i].objp; - return (0); - } - } - } - - if (i_psvc_find_file_section(hp->fp, "OBJECT_INFO") == -1) { - ENV_DEBUG("Couldn't find OBJECT_INFO section", dev_name); - return (-1); - } - - fgets(buf, BUFSZ, hp->fp); - while (strcmp(buf, "OBJECT_INFO_END")) { - start = strrchr(buf, '/'); - if (start == NULL) { - errno = EINVAL; - return (PSVC_FAILURE); - } - found = sscanf(start + 1, "%s", name); - if (found != 1) { - errno = EINVAL; - return (PSVC_FAILURE); - } - - if (strcmp(name, dev_name) == 0) { - - if (i_psvc_value(buf, PSVC_CLASS_ATTR, &class) - != PSVC_SUCCESS) - return (PSVC_FAILURE); - if (i_psvc_value(buf, PSVC_SUBCLASS_ATTR, &subclass) - != PSVC_SUCCESS) - return (PSVC_FAILURE); - ret = (*i_psvc_constructor[class][subclass])(hp, - dev_name, objp); - if (ret != PSVC_SUCCESS) { - return (-1); - } - ret = (*objp)->get_attr(hp, *objp, PSVC_PRESENCE_ATTR, - &presence); - (*objp)->previous_presence = presence; - if (ret != PSVC_SUCCESS || presence != PSVC_PRESENT) - return (ret); - - return (i_psvc_init_state(hp, *objp)); - } - fgets(buf, BUFSZ, hp->fp); - } - - errno = EINVAL; - return (-1); -} - -/* - * Gets the device path associated with an object id. - * Returns 0 if successful, -1 if not. - */ -static int32_t -i_psvc_get_devpath(EHdl_t *hp, uint64_t addr_spec, char *path) -{ - int i; - EDevice_t *dp; - uint32_t controller, bus, addr, port; - - controller = PSVC_GET_ASPEC_CNTLR(addr_spec); - bus = PSVC_GET_ASPEC_BUSNUM(addr_spec); - addr = PSVC_GET_ASPEC_BUSADDR(addr_spec); - port = PSVC_GET_ASPEC_PORT(addr_spec); - - for (i = 0; i < hp->dev_count; ++i) { - dp = &hp->dev_tbl[i]; - if (dp->controller == controller && - dp->bus == bus && - dp->addr == addr && - dp->port == port) { - strcpy(path, dp->path); - return (PSVC_SUCCESS); - } - } - - errno = EINVAL; - return (PSVC_FAILURE); -} - - -/* Load the association table */ -static int32_t -i_psvc_load_associations(EHdl_t *hp, FILE *fp) -{ - uint32_t count; - int found; - int i, j; - char name1[32], name2[32]; - char buf[BUFSZ]; - EStringId_t *namep; - EAssoc_t *ap; - int32_t id; - int32_t status; - - /* - * ignore count in the file, correct count is highest - * association id + 1, now figured when loading ASSOC_STR - * section. - */ - if (i_psvc_find_file_section(fp, "ASSOCIATIONS") != PSVC_SUCCESS) - return (-1); - if ((hp->assoc_tbl = malloc(sizeof (EAssocList_t) * hp->assoc_count)) - == NULL) { - return (-1); - } - memset(hp->assoc_tbl, 0, sizeof (EAssocList_t) * hp->assoc_count); - - for (i = 0; i < hp->assoc_count; ++i) { - fgets(buf, BUFSZ, fp); - found = sscanf(buf, "%s %s", name1, name2); - if (strcmp("ASSOCIATIONS_END", name1) == 0) - break; - if (found != 2) { - errno = EINVAL; - return (-1); - } - namep = (EStringId_t *)bsearch(name2, hp->othr_tbl, - hp->othr_count, sizeof (EStringId_t), - (int (*)(const void *, const void *)) - i_psvc_name_compare_bsearch); - if (namep == NULL) { - errno = EINVAL; - return (-1); - } - id = namep->id; - - status = i_psvc_count_records(fp, "ASSOCIATION_END", &count); - if (status != PSVC_SUCCESS) - return (status); - hp->assoc_tbl[id].count = count; - hp->assoc_tbl[id].table = - (EAssoc_t *)malloc(sizeof (EAssoc_t) * count); - if (hp->assoc_tbl[id].table == NULL) - return (-1); - - for (j = 0; j < count; ++j) { - ap = &hp->assoc_tbl[id].table[j]; - fgets(buf, BUFSZ, fp); - found = sscanf(buf, "%s %s", ap->antecedent_id, - ap->dependent_id); - ap->ant_key = psvc_get_str_key(ap->antecedent_id); - if (found != 2) { - errno = EINVAL; - return (-1); - } - } - - - fgets(buf, BUFSZ, fp); - if (strncmp(buf, "ASSOCIATION_END", 15) != 0) { - errno = EINVAL; - return (-1); - } - } - - return (0); -} - -/* Load the table of tables */ -static int32_t -i_psvc_load_tables(EHdl_t *hp, FILE *fp) -{ - int i, j; - int found; - int ret; - int32_t cell_type; - int64_t *table; - char buf[BUFSZ]; - int32_t status; - uint32_t table_count; - int32_t num, key, array; - char name[NAMELEN]; - ETable_Array *tbl_arr; - - if (i_psvc_find_file_section(fp, "TABLES") != PSVC_SUCCESS) - return (PSVC_SUCCESS); /* no tables */ - status = i_psvc_count_tables_associations(fp, &table_count, - "TABLE_END"); - if (status != PSVC_SUCCESS || table_count == 0) - return (status); - - for (i = 0; i < table_count; ++i) { - int slot; - ETable_t *tblp; - - fgets(buf, BUFSZ, fp); - if (strncmp(buf, "TABLE", 5) != 0) { - errno = EINVAL; - return (-1); - } - - fgets(buf, BUFSZ, fp); - found = sscanf(buf, "%s %d", name, &cell_type); - key = psvc_get_str_key(name); - array = key % PSVC_MAX_TABLE_ARRAYS; - tbl_arr = &(hp->tbl_arry[array]); - - if (tbl_arr->nextid == hp->total_obj_count) { - errno = EINVAL; - return (PSVC_FAILURE); - } else { - slot = tbl_arr->nextid++; - tbl_arr->obj_count++; - } - - strcpy(tbl_arr->obj_tbl[slot].name, name); - - tblp = (ETable_t *)malloc(sizeof (ETable_t)); - if (tblp == NULL) - return (PSVC_FAILURE); - tbl_arr->obj_tbl[slot].key = key; - tbl_arr->obj_tbl[slot].objp = (EObj_t *)(void *)tblp; - tbl_arr->obj_tbl[slot].type = PSVC_TBL; - - status = i_psvc_count_table_records(fp, "TABLE_END", - &tblp->size); - if (status != PSVC_SUCCESS) - return (status); - tblp->cell_type = (uint8_t)cell_type; - if (found != 2) { - errno = EINVAL; - return (-1); - } - - /* allocate and load table */ - tblp->table = (int64_t *)malloc(tblp->size * - i_psvc_cell_size[tblp->cell_type]); - if (tblp->table == NULL) { - return (-1); - } - - table = tblp->table; - for (j = 0; j < tblp->size; ++j) { - switch (cell_type) { - case 0: - ret = fscanf(fp, "%d", &num); - *((int8_t *)table + j) = num; - break; - case 1: - ret = fscanf(fp, "%d", &num); - *((uint8_t *)table + j) = (uint8_t)num; - break; - case 2: - ret = fscanf(fp, "%hd", - ((int16_t *)table + j)); - break; - case 3: - ret = fscanf(fp, "%hd", - ((uint16_t *)table + j)); - break; - case 4: - ret = fscanf(fp, "%d", - ((int32_t *)table + j)); - break; - case 5: - ret = fscanf(fp, "%d", - ((uint32_t *)table + j)); - break; - case 6: - ret = fscanf(fp, "%lld", - ((int64_t *)table + j)); - break; - case 7: - ret = fscanf(fp, "%lld", - ((uint64_t *)table + j)); - break; - default: - errno = EINVAL; - return (-1); - } - if (ret != 1) { - errno = EINVAL; - return (-1); - } - } - fgets(buf, BUFSZ, fp); /* reads newline on data line */ - fgets(buf, BUFSZ, fp); - if (strncmp(buf, "TABLE_END", 9) != 0) { - errno = EINVAL; - return (-1); - } - - } - - return (0); -} - -static int32_t -i_psvc_destructor(EHdl_t *hdlp, char *name, void *objp) -{ - int32_t i, key, array; - - key = psvc_get_str_key(name); - array = key % PSVC_MAX_TABLE_ARRAYS; - - for (i = 0; i < hdlp->tbl_arry[array].obj_count; ++i) { - if (key == hdlp->tbl_arry[array].obj_tbl[i].key) { - if (strcmp(hdlp->tbl_arry[array].obj_tbl[i].name, - name) == 0) { - hdlp->tbl_arry[array].obj_tbl[i].name[0] = '\0'; - free(objp); - return (PSVC_SUCCESS); - } - } - } - - return (PSVC_SUCCESS); -} - -static int32_t -i_psvc_get_attr_generic(EHdl_t *hdlp, EObj_t *objp, int32_t attr_id, - void * attrp) -{ - int32_t status = PSVC_SUCCESS; - char *parent_id; - - switch (attr_id) { - case PSVC_ADDR_SPEC_ATTR: - *(uint64_t *)attrp = objp->addr_spec; - break; - case PSVC_CLASS_ATTR: - *(int32_t *)attrp = objp->class; - break; - case PSVC_SUBCLASS_ATTR: - *(int32_t *)attrp = objp->subclass; - break; - case PSVC_PRESENCE_ATTR: - status = i_psvc_get_presence(hdlp, objp, (boolean_t *)attrp); - break; - case PSVC_PREV_PRESENCE_ATTR: - *(boolean_t *)attrp = objp->previous_presence; - break; - case PSVC_STATE_ATTR: - strcpy((char *)attrp, objp->state); - break; - case PSVC_PREV_STATE_ATTR: - strcpy((char *)attrp, objp->previous_state); - break; - case PSVC_ENABLE_ATTR: - *(boolean_t *)attrp = objp->enabled; - break; - case PSVC_FAULTID_ATTR: - strcpy((char *)attrp, objp->fault_id); - break; - case PSVC_FEATURES_ATTR: - *(uint64_t *)attrp = objp->features; - break; - case PSVC_LABEL_ATTR: - strcpy((char *)attrp, objp->label); - break; - case PSVC_FRUID_ATTR: - while ((objp->features & PSVC_DEV_FRU) == 0) { - status = i_psvc_get_assoc_id(hdlp, objp->label, - PSVC_PARENT, 0, &parent_id); - if (status != PSVC_SUCCESS) - return (status); - - status = i_psvc_get_obj(hdlp, parent_id, &objp); - if (status != PSVC_SUCCESS) - return (status); - } - - strcpy((char *)attrp, objp->label); - break; - case PSVC_INSTANCE_ATTR: - *(int32_t *)attrp = objp->instance; - break; - default: - errno = EINVAL; - return (PSVC_FAILURE); - } - - return (status); -} - -static int32_t -i_psvc_set_attr_generic(EHdl_t *hdlp, EObj_t *objp, int32_t attr_id, - void * attrp) -{ - int32_t status = PSVC_SUCCESS; - - switch (attr_id) { - case PSVC_PREV_PRESENCE_ATTR: - objp->previous_presence = *(boolean_t *)attrp; - break; - case PSVC_STATE_ATTR: - strcpy(objp->previous_state, objp->state); - strcpy(objp->state, (char *)attrp); - break; - case PSVC_ENABLE_ATTR: - objp->enabled = *(boolean_t *)attrp; - break; - case PSVC_FAULTID_ATTR: - strcpy(objp->fault_id, (char *)attrp); - break; - default: - errno = EINVAL; - return (PSVC_FAILURE); - } - return (status); -} - -static int32_t -i_psvc_get_attr_0_0(EHdl_t *hdlp, EObj_t *objp, int32_t attr_id, void *attrp) -{ - int32_t status = PSVC_SUCCESS; - - switch (attr_id) { - case PSVC_SENSOR_VALUE_ATTR: - return (i_psvc_get_device_value_0_0(hdlp, objp, attrp)); - case PSVC_LO_WARN_ATTR: - *(int32_t *)attrp = ((ETempSensor_t *)objp)->lo_warn; - return (status); - case PSVC_LO_SHUT_ATTR: - *(int32_t *)attrp = ((ETempSensor_t *)objp)->lo_shut; - return (status); - case PSVC_HI_WARN_ATTR: - *(int32_t *)attrp = ((ETempSensor_t *)objp)->hi_warn; - return (status); - case PSVC_HI_SHUT_ATTR: - *(int32_t *)attrp = ((ETempSensor_t *)objp)->hi_shut; - return (status); - } - - status = i_psvc_get_attr_generic(hdlp, objp, attr_id, attrp); - - return (status); -} - -static int32_t -i_psvc_get_attr_0_1(EHdl_t *hdlp, EObj_t *objp, int32_t attr_id, void *attrp) -{ - int32_t status = PSVC_SUCCESS; - - switch (attr_id) { - case PSVC_SENSOR_VALUE_ATTR: - return (i_psvc_get_device_value_0_1(hdlp, objp, attrp)); - case PSVC_LO_WARN_ATTR: - *(int32_t *)attrp = ((ETempSensor_t *)objp)->lo_warn; - return (status); - case PSVC_LO_SHUT_ATTR: - *(int32_t *)attrp = ((ETempSensor_t *)objp)->lo_shut; - return (status); - case PSVC_HI_WARN_ATTR: - *(int32_t *)attrp = ((ETempSensor_t *)objp)->hi_warn; - return (status); - case PSVC_HI_SHUT_ATTR: - *(int32_t *)attrp = ((ETempSensor_t *)objp)->hi_shut; - return (status); - case PSVC_OPTIMAL_TEMP_ATTR: - *(int32_t *)attrp = ((ETempSensor_t *)objp)->opt_temp; - return (status); - case PSVC_HW_HI_SHUT_ATTR: - *(int32_t *)attrp = ((ETempSensor_t *)objp)->hw_hi_shut; - return (status); - case PSVC_HW_LO_SHUT_ATTR: - *(int32_t *)attrp = ((ETempSensor_t *)objp)->hw_lo_shut; - return (status); - } - - status = i_psvc_get_attr_generic(hdlp, objp, attr_id, attrp); - - return (status); -} - -static int32_t -i_psvc_set_attr_0_1(EHdl_t *hdlp, EObj_t *objp, int32_t attr_id, void *attrp) -{ - int32_t status = PSVC_SUCCESS; - - switch (attr_id) { - case PSVC_LO_WARN_ATTR: - ((ETempSensor_t *)objp)->lo_warn = *(int32_t *)attrp; - return (status); - case PSVC_LO_SHUT_ATTR: - ((ETempSensor_t *)objp)->lo_shut = *(int32_t *)attrp; - return (status); - case PSVC_HI_WARN_ATTR: - ((ETempSensor_t *)objp)->hi_warn = *(int32_t *)attrp; - return (status); - case PSVC_HI_SHUT_ATTR: - ((ETempSensor_t *)objp)->hi_shut = *(int32_t *)attrp; - return (status); - case PSVC_OPTIMAL_TEMP_ATTR: - ((ETempSensor_t *)objp)->opt_temp = *(int32_t *)attrp; - return (status); - case PSVC_HW_HI_SHUT_ATTR: - ((ETempSensor_t *)objp)->hw_hi_shut = *(int32_t *)attrp; - return (status); - case PSVC_HW_LO_SHUT_ATTR: - ((ETempSensor_t *)objp)->hw_lo_shut = *(int32_t *)attrp; - return (status); - } - - status = i_psvc_set_attr_generic(hdlp, objp, attr_id, attrp); - - return (status); -} - -static int32_t -i_psvc_get_attr_1_0(EHdl_t *hdlp, EObj_t *objp, int32_t attr_id, void *attrp) -{ - int32_t status = PSVC_SUCCESS; - - switch (attr_id) { - case PSVC_SENSOR_VALUE_ATTR: - return (i_psvc_get_device_value_1_0(hdlp, objp, attrp)); - case PSVC_SETPOINT_ATTR: - *(int16_t *)attrp = ((EFan_t *)objp)->setpoint; - return (status); - case PSVC_HYSTERESIS_ATTR: - *(int16_t *)attrp = ((EFan_t *)objp)->hysteresis; - return (status); - case PSVC_LOOPGAIN_ATTR: - *(int16_t *)attrp = ((EFan_t *)objp)->loopgain; - return (status); - case PSVC_LOOPBIAS_ATTR: - *(int16_t *)attrp = ((EFan_t *)objp)->loopbias; - return (status); - case PSVC_TEMP_DIFFERENTIAL_ATTR: - memcpy(attrp, ((EFan_t *)objp)->temp_differential, - sizeof (((EFan_t *)objp)->temp_differential)); - return (status); - case PSVC_TEMP_DIFFERENTIAL_INDEX_ATTR: - *(int16_t *)attrp = ((EFan_t *)objp)->temp_differential_index; - return (status); - } - - status = i_psvc_get_attr_generic(hdlp, objp, attr_id, attrp); - - return (status); -} - -static int32_t -i_psvc_set_attr_1_0(EHdl_t *hdlp, EObj_t *objp, int32_t attr_id, void *attrp) -{ - int32_t status = PSVC_SUCCESS; - - switch (attr_id) { - case PSVC_TEMP_DIFFERENTIAL_ATTR: - memcpy(((EFan_t *)objp)->temp_differential, attrp, - sizeof (((EFan_t *)objp)->temp_differential)); - return (status); - case PSVC_TEMP_DIFFERENTIAL_INDEX_ATTR: - ((EFan_t *)objp)->temp_differential_index = *(int16_t *)attrp; - return (status); - case PSVC_SETPOINT_ATTR: - ((EFan_t *)objp)->setpoint = *(int16_t *)attrp; - return (status); - } - - status = i_psvc_set_attr_generic(hdlp, objp, attr_id, attrp); - - return (PSVC_SUCCESS); -} - -static int32_t -i_psvc_get_attr_2_0(EHdl_t *hdlp, EObj_t *objp, int32_t attr_id, void *attrp) -{ - int32_t status = PSVC_SUCCESS; - - switch (attr_id) { - case PSVC_LED_STATE_ATTR: - case PSVC_STATE_ATTR: - return (i_psvc_get_device_state_2_0(hdlp, objp, attrp)); - case PSVC_LED_COLOR_ATTR: - strcpy((char *)attrp, ((ELed_t *)objp)->color); - return (status); - case PSVC_LIT_COUNT_ATTR: - *(int16_t *)attrp = ((ELed_t *)objp)->lit_count; - return (status); - } - - status = i_psvc_get_attr_generic(hdlp, objp, attr_id, attrp); - - return (status); -} - -static int32_t -i_psvc_set_attr_2_0(EHdl_t *hdlp, EObj_t *objp, int32_t attr_id, void *attrp) -{ - int32_t status = PSVC_SUCCESS; - - switch (attr_id) { - case PSVC_LED_STATE_ATTR: - case PSVC_STATE_ATTR: - return (i_psvc_set_device_state_2_0(hdlp, objp, attrp)); - } - - status = i_psvc_set_attr_generic(hdlp, objp, attr_id, attrp); - - return (status); -} - -static int32_t -i_psvc_get_attr_2_1(EHdl_t *hdlp, EObj_t *objp, int32_t attr_id, void *attrp) -{ - int32_t status = PSVC_SUCCESS; - - switch (attr_id) { - case PSVC_LED_STATE_ATTR: - case PSVC_STATE_ATTR: - return (i_psvc_get_device_state_2_1(hdlp, objp, attrp)); - case PSVC_LED_COLOR_ATTR: - strcpy((char *)attrp, ((ELed_t *)objp)->color); - return (status); - case PSVC_LIT_COUNT_ATTR: - *(int16_t *)attrp = ((ELed_t *)objp)->lit_count; - return (status); - } - - status = i_psvc_get_attr_generic(hdlp, objp, attr_id, attrp); - - return (status); -} - -static int32_t -i_psvc_set_attr_2_1(EHdl_t *hdlp, EObj_t *objp, int32_t attr_id, void *attrp) -{ - int32_t status = PSVC_SUCCESS; - - switch (attr_id) { - case PSVC_LED_STATE_ATTR: - case PSVC_STATE_ATTR: - return (i_psvc_set_device_state_2_1(hdlp, objp, attrp)); - } - - status = i_psvc_set_attr_generic(hdlp, objp, attr_id, attrp); - - return (status); -} - -static int32_t -i_psvc_get_attr_2_2(EHdl_t *hdlp, EObj_t *objp, int32_t attr_id, void *attrp) -{ - int32_t status = PSVC_SUCCESS; - - switch (attr_id) { - case PSVC_LED_STATE_ATTR: - case PSVC_STATE_ATTR: - return (i_psvc_get_device_state_2_0(hdlp, objp, attrp)); - case PSVC_LED_COLOR_ATTR: - strcpy((char *)attrp, ((ELed_t *)objp)->color); - return (status); - case PSVC_LIT_COUNT_ATTR: - *(int16_t *)attrp = ((ELed_t *)objp)->lit_count; - return (status); - case PSVC_LED_IS_LOCATOR_ATTR: - strcpy((char *)attrp, ((ELed_t *)objp)->is_locator); - return (status); - case PSVC_LED_LOCATOR_NAME_ATTR: - strcpy((char *)attrp, ((ELed_t *)objp)->locator_name); - return (status); - } - - status = i_psvc_get_attr_generic(hdlp, objp, attr_id, attrp); - - return (status); -} - -static int32_t -i_psvc_get_attr_4_0(EHdl_t *hdlp, EObj_t *objp, int32_t attr_id, void *attrp) -{ - int32_t status = PSVC_SUCCESS; - - switch (attr_id) { - case PSVC_SENSOR_VALUE_ATTR: - return (i_psvc_get_device_value_4_0(hdlp, objp, attrp)); - case PSVC_LO_WARN_ATTR: - *(int32_t *)attrp = ((EDigiSensor_t *)objp)->lo_warn; - return (status); - case PSVC_LO_SHUT_ATTR: - *(int32_t *)attrp = ((EDigiSensor_t *)objp)->lo_shut; - return (status); - case PSVC_HI_WARN_ATTR: - *(int32_t *)attrp = ((EDigiSensor_t *)objp)->hi_warn; - return (status); - case PSVC_HI_SHUT_ATTR: - *(int32_t *)attrp = ((EDigiSensor_t *)objp)->hi_shut; - return (status); - } - - status = i_psvc_get_attr_generic(hdlp, objp, attr_id, attrp); - - return (PSVC_SUCCESS); -} - -static int32_t -i_psvc_get_attr_5_0(EHdl_t *hdlp, EObj_t *objp, int32_t attr_id, void *attrp) -{ - int32_t status = PSVC_SUCCESS; - - if (attr_id == PSVC_CONTROL_VALUE_ATTR) { - return (i_psvc_get_device_value_5_0(hdlp, objp, attrp)); - } - - status = i_psvc_get_attr_generic(hdlp, objp, attr_id, attrp); - - return (status); -} - -static int32_t -i_psvc_set_attr_5_0(EHdl_t *hdlp, EObj_t *objp, int32_t attr_id, void *attrp) -{ - int32_t status = PSVC_SUCCESS; - - if (attr_id == PSVC_CONTROL_VALUE_ATTR) { - return (i_psvc_set_device_value_5_0(hdlp, objp, attrp)); - } - - status = i_psvc_set_attr_generic(hdlp, objp, attr_id, attrp); - - return (status); -} - -static int32_t -i_psvc_get_attr_6_0(EHdl_t *hdlp, EObj_t *objp, int32_t attr_id, void *attrp) -{ - int32_t status = PSVC_SUCCESS; - - switch (attr_id) { - case PSVC_GPIO_VALUE_ATTR: - return (i_psvc_get_device_value_6_0(hdlp, objp, attrp)); - case PSVC_GPIO_BITS: - *(int32_t *)attrp = 1; - return (status); - } - - status = i_psvc_get_attr_generic(hdlp, objp, attr_id, attrp); - - return (status); -} - -static int32_t -i_psvc_set_attr_6_0(EHdl_t *hdlp, EObj_t *objp, int32_t attr_id, void *attrp) -{ - int32_t status = PSVC_SUCCESS; - - if (attr_id == PSVC_GPIO_VALUE_ATTR) { - return (i_psvc_set_device_value_6_0(hdlp, objp, attrp)); - } - - status = i_psvc_set_attr_generic(hdlp, objp, attr_id, attrp); - - return (status); -} - -static int32_t -i_psvc_get_attr_7_0(EHdl_t *hdlp, EObj_t *objp, int32_t attr_id, void *attrp) -{ - int32_t status = PSVC_SUCCESS; - - switch (attr_id) { - case PSVC_SENSOR_VALUE_ATTR: - return (i_psvc_get_device_value_7_0(hdlp, objp, attrp)); - case PSVC_LO_WARN_ATTR: - *(int32_t *)attrp = ((EFanTach_t *)objp)->lo_warn; - return (status); - case PSVC_LO_SHUT_ATTR: - *(int32_t *)attrp = ((EFanTach_t *)objp)->lo_shut; - return (status); - case PSVC_HI_WARN_ATTR: - *(int32_t *)attrp = ((EFanTach_t *)objp)->hi_warn; - return (status); - case PSVC_HI_SHUT_ATTR: - *(int32_t *)attrp = ((EFanTach_t *)objp)->hi_shut; - return (status); - } - - status = i_psvc_get_attr_generic(hdlp, objp, attr_id, attrp); - - return (PSVC_SUCCESS); -} - -static int32_t -i_psvc_get_attr_8_0(EHdl_t *hdlp, EObj_t *objp, int32_t attr_id, void *attrp) -{ - int32_t status = PSVC_SUCCESS; - - switch (attr_id) { - case PSVC_SWITCH_STATE_ATTR: - case PSVC_STATE_ATTR: - return (i_psvc_get_device_state_8_0(hdlp, objp, attrp)); - } - - status = i_psvc_get_attr_generic(hdlp, objp, attr_id, attrp); - - return (status); -} - -static int32_t -i_psvc_set_attr_8_0(EHdl_t *hdlp, EObj_t *objp, int32_t attr_id, void *attrp) -{ - int32_t status = PSVC_SUCCESS; - - switch (attr_id) { - case PSVC_SWITCH_STATE_ATTR: - case PSVC_STATE_ATTR: - return (i_psvc_set_device_state_8_0(hdlp, objp, attrp)); - } - - status = i_psvc_set_attr_generic(hdlp, objp, attr_id, attrp); - - return (status); -} - -static int32_t -i_psvc_get_attr_9_0(EHdl_t *hdlp, EObj_t *objp, int32_t attr_id, void *attrp) -{ - int32_t status = PSVC_SUCCESS; - - switch (attr_id) { - case PSVC_SWITCH_STATE_ATTR: - case PSVC_STATE_ATTR: - status = i_psvc_get_device_state_9_0(hdlp, objp, attrp); - if ((status == PSVC_FAILURE) && (errno == EINVAL)) { - strcpy((char *)attrp, PSVC_ERROR); - return (PSVC_SUCCESS); - } else { - return (status); - } - } - - status = i_psvc_get_attr_generic(hdlp, objp, attr_id, attrp); - - return (status); -} - -static int32_t -i_psvc_get_attr_10_0(EHdl_t *hdlp, EObj_t *objp, int32_t attr_id, void *attrp) -{ - int32_t status = PSVC_SUCCESS; - - switch (attr_id) { - case PSVC_GPIO_VALUE_ATTR: - return (i_psvc_get_device_value_10_0(hdlp, objp, attrp)); - case PSVC_GPIO_BITS: - *(int32_t *)attrp = 8; - return (status); - } - - status = i_psvc_get_attr_generic(hdlp, objp, attr_id, attrp); - - return (status); -} - -static int32_t -i_psvc_set_attr_10_0(EHdl_t *hdlp, EObj_t *objp, int32_t attr_id, void *attrp) -{ - int32_t status = PSVC_SUCCESS; - - if (attr_id == PSVC_GPIO_VALUE_ATTR) { - return (i_psvc_set_device_value_10_0(hdlp, objp, attrp)); - } - - status = i_psvc_set_attr_generic(hdlp, objp, attr_id, attrp); - - return (status); -} - -static int32_t -i_psvc_get_attr_10_1(EHdl_t *hdlp, EObj_t *objp, int32_t attr_id, void *attrp) -{ - int32_t status = PSVC_SUCCESS; - - switch (attr_id) { - case PSVC_GPIO_VALUE_ATTR: - return (i_psvc_get_device_value_10_1(hdlp, objp, attrp)); - case PSVC_GPIO_BITS: - *(int32_t *)attrp = 8; - return (status); - } - - status = i_psvc_get_attr_generic(hdlp, objp, attr_id, attrp); - - return (status); -} - -static int32_t -i_psvc_set_attr_10_1(EHdl_t *hdlp, EObj_t *objp, int32_t attr_id, void *attrp) -{ - int32_t status = PSVC_SUCCESS; - - if (attr_id == PSVC_GPIO_VALUE_ATTR) { - return (i_psvc_set_device_value_10_1(hdlp, objp, attrp)); - } - - status = i_psvc_set_attr_generic(hdlp, objp, attr_id, attrp); - - return (status); -} - -/* AT24 */ -static int32_t -i_psvc_get_attr_11_0(EHdl_t *hdlp, EObj_t *objp, int32_t attr_id, void *attrp) -{ - int32_t status = PSVC_SUCCESS; - int32_t probe_status; - - switch (attr_id) { - case PSVC_PROBE_RESULT_ATTR: - probe_status = i_psvc_probe_11_0(hdlp, objp); - if (probe_status == PSVC_SUCCESS) - strcpy((char *)attrp, PSVC_OK); - else - strcpy((char *)attrp, PSVC_ERROR); - return (status); - case PSVC_FRU_INFO_ATTR: - status = i_psvc_get_reg_11_0(hdlp, objp, attr_id, attrp); - return (status); - } - - status = i_psvc_get_attr_generic(hdlp, objp, attr_id, attrp); - - return (status); -} - -static int32_t -i_psvc_get_reg_11_0(EHdl_t *hdlp, EObj_t *objp, int32_t attr_id, void *attrp) -{ - int32_t status = PSVC_SUCCESS, ret; - char path[1024], *data; - int32_t fp, temp_errno; - fru_info_t *fru_data; - - fru_data = (fru_info_t *)attrp; - - if (objp->present != PSVC_PRESENT) { - errno = ENODEV; - return (PSVC_FAILURE); - } - - status = i_psvc_get_devpath(hdlp, objp->addr_spec, path); - if (status != PSVC_SUCCESS) - return (status); - - fp = open(path, O_RDWR); - if (fp == -1) { - return (PSVC_FAILURE); - } - - ret = lseek(fp, fru_data->buf_start, SEEK_SET); - if (ret != fru_data->buf_start) { - temp_errno = errno; - close(fp); - errno = temp_errno; - return (PSVC_FAILURE); - } - - data = (char *)malloc(fru_data->read_size); - ret = read(fp, data, fru_data->read_size); - if (ret == -1) { - free(data); - close(fp); - errno = EIO; - return (-1); - } - - memcpy(fru_data->buf, data, fru_data->read_size); - free(data); - close(fp); - - return (status); -} - -static int32_t -i_psvc_get_attr_11_1(EHdl_t *hdlp, EObj_t *objp, int32_t attr_id, void *attrp) -{ - int32_t status = PSVC_SUCCESS; - int32_t probe_status; - - if (attr_id == PSVC_PROBE_RESULT_ATTR) { - probe_status = i_psvc_probe_11_1(hdlp, objp); - if (probe_status == PSVC_SUCCESS) - strcpy((char *)attrp, PSVC_OK); - else - strcpy((char *)attrp, PSVC_ERROR); - return (status); - } - - status = i_psvc_get_attr_generic(hdlp, objp, attr_id, attrp); - - return (status); -} - -static int32_t -i_psvc_get_attr_11_2(EHdl_t *hdlp, EObj_t *objp, int32_t attr_id, void *attrp) -{ - int32_t status = PSVC_SUCCESS; - int32_t probe_status; - - if (attr_id == PSVC_PROBE_RESULT_ATTR) { - probe_status = i_psvc_probe_11_2(hdlp, objp); - if (probe_status == PSVC_SUCCESS) - strcpy((char *)attrp, PSVC_OK); - else - strcpy((char *)attrp, PSVC_ERROR); - return (status); - } - - status = i_psvc_get_attr_generic(hdlp, objp, attr_id, attrp); - - return (status); -} - -static int32_t -i_psvc_get_attr_11_3(EHdl_t *hdlp, EObj_t *objp, int32_t attr_id, void *attrp) -{ - int32_t status = PSVC_SUCCESS; - int32_t probe_status; - - if (attr_id == PSVC_PROBE_RESULT_ATTR) { - probe_status = i_psvc_probe_11_3(hdlp, objp); - if (probe_status == PSVC_SUCCESS) - strcpy((char *)attrp, PSVC_OK); - else - strcpy((char *)attrp, PSVC_ERROR); - return (status); - } - - status = i_psvc_get_attr_generic(hdlp, objp, attr_id, attrp); - - return (status); -} - -static int32_t -i_psvc_get_attr_11_4(EHdl_t *hdlp, EObj_t *objp, int32_t attr_id, void *attrp) -{ - int32_t status = PSVC_SUCCESS; - int32_t probe_status; - - if (attr_id == PSVC_PROBE_RESULT_ATTR) { - probe_status = i_psvc_probe_11_4(hdlp, objp); - if (probe_status == PSVC_SUCCESS) - strcpy((char *)attrp, PSVC_OK); - else - strcpy((char *)attrp, PSVC_ERROR); - return (status); - } - - status = i_psvc_get_attr_generic(hdlp, objp, attr_id, attrp); - - return (status); -} - -static int32_t -i_psvc_get_attr_11_5(EHdl_t *hdlp, EObj_t *objp, int32_t attr_id, void *attrp) -{ - int32_t status = PSVC_SUCCESS; - int32_t probe_status; - - if (attr_id == PSVC_PROBE_RESULT_ATTR) { - probe_status = i_psvc_probe_11_5(hdlp, objp); - if (probe_status == PSVC_SUCCESS) - strcpy((char *)attrp, PSVC_OK); - else - strcpy((char *)attrp, PSVC_ERROR); - return (status); - } - - status = i_psvc_get_attr_generic(hdlp, objp, attr_id, attrp); - - return (status); -} - -static int32_t -i_psvc_get_attr_11_6(EHdl_t *hdlp, EObj_t *objp, int32_t attr_id, void *attrp) -{ - int32_t status = PSVC_SUCCESS; - int32_t probe_status; - - if (attr_id == PSVC_PROBE_RESULT_ATTR) { - probe_status = i_psvc_probe_11_6(hdlp, objp); - if (probe_status == PSVC_SUCCESS) - strcpy((char *)attrp, PSVC_OK); - else - strcpy((char *)attrp, PSVC_ERROR); - return (status); - } - - status = i_psvc_get_attr_generic(hdlp, objp, attr_id, attrp); - - return (status); -} - -static int32_t -i_psvc_get_attr_11_7(EHdl_t *hdlp, EObj_t *objp, int32_t attr_id, void *attrp) -{ - int32_t status = PSVC_SUCCESS; - int32_t probe_status; - - if (attr_id == PSVC_PROBE_RESULT_ATTR) { - probe_status = i_psvc_probe_11_7(hdlp, objp); - if (probe_status == PSVC_SUCCESS) - strcpy((char *)attrp, PSVC_OK); - else - strcpy((char *)attrp, PSVC_ERROR); - return (status); - } - - status = i_psvc_get_attr_generic(hdlp, objp, attr_id, attrp); - - return (status); -} - -static int32_t -i_psvc_get_attr_11_8(EHdl_t *hdlp, EObj_t *objp, int32_t attr_id, void *attrp) -{ - int32_t status = PSVC_SUCCESS; - int32_t probe_status; - - if (attr_id == PSVC_PROBE_RESULT_ATTR) { - probe_status = i_psvc_probe_11_8(hdlp, objp); - if (probe_status == PSVC_SUCCESS) - strcpy((char *)attrp, PSVC_OK); - else - strcpy((char *)attrp, PSVC_ERROR); - return (status); - } - - status = i_psvc_get_attr_generic(hdlp, objp, attr_id, attrp); - - return (status); -} - -static int32_t -i_psvc_get_attr_11_9(EHdl_t *hdlp, EObj_t *objp, int32_t attr_id, void *attrp) -{ - int32_t status = PSVC_SUCCESS; - int32_t probe_status; - - if (attr_id == PSVC_PROBE_RESULT_ATTR) { - probe_status = i_psvc_probe_11_9(hdlp, objp); - if (probe_status == PSVC_SUCCESS) - strcpy((char *)attrp, PSVC_OK); - else - strcpy((char *)attrp, PSVC_ERROR); - return (status); - } - - status = i_psvc_get_attr_generic(hdlp, objp, attr_id, attrp); - - return (status); -} - -static int32_t -i_psvc_load_generic( - EHdl_t *hdlp, - char *name, - EObj_t **objpp, - char *buf, - int32_t obj_size) -{ - int32_t found, key, array; - EObj_t *objp; - char *start; - char cur_device[NAMELEN]; - int slot; - ETable_Array *tbl_arr; - - key = psvc_get_str_key(name); - array = key % PSVC_MAX_TABLE_ARRAYS; - tbl_arr = &(hdlp->tbl_arry[array]); - - if (tbl_arr->nextid == hdlp->total_obj_count) { - errno = EINVAL; - return (PSVC_FAILURE); - } else { - slot = tbl_arr->nextid++; - tbl_arr->obj_count++; - } - - if (i_psvc_find_file_section(hdlp->fp, "OBJECT_INFO") != PSVC_SUCCESS) - return (PSVC_FAILURE); - - fgets(buf, BUFSZ, hdlp->fp); - while (strcmp(buf, "OBJECT_INFO_END")) { - start = strrchr(buf, '/'); - if (start == NULL) { - errno = EINVAL; - return (PSVC_FAILURE); - } - found = sscanf(start + 1, "%s", cur_device); - if (found != 1) { - errno = EINVAL; - return (PSVC_FAILURE); - } - if (strcmp(name, cur_device) == 0) /* found it */ - break; - fgets(buf, BUFSZ, hdlp->fp); - } - - tbl_arr->obj_tbl[slot].objp = (EObj_t *)malloc(obj_size); - if (tbl_arr->obj_tbl[slot].objp == 0) - return (PSVC_FAILURE); - objp = (EObj_t *)tbl_arr->obj_tbl[slot].objp; - tbl_arr->obj_tbl[slot].type = PSVC_OBJ; - - memset(objp, 0, obj_size); - strcpy(objp->label, name); - strcpy(tbl_arr->obj_tbl[slot].name, name); - - tbl_arr->obj_tbl[slot].key = key; - - if (i_psvc_value(buf, PSVC_CLASS_ATTR, &objp->class) != PSVC_SUCCESS) { - i_psvc_destructor(hdlp, name, objp); - return (PSVC_FAILURE); - } - if (i_psvc_value(buf, PSVC_SUBCLASS_ATTR, &objp->subclass) != - PSVC_SUCCESS) { - i_psvc_destructor(hdlp, name, objp); - return (PSVC_FAILURE); - } - if (i_psvc_value(buf, PSVC_INSTANCE_ATTR, &objp->instance) != - PSVC_SUCCESS) { - i_psvc_destructor(hdlp, name, objp); - return (PSVC_FAILURE); - } - if (i_psvc_value(buf, PSVC_FEATURES_ATTR, &objp->features) != - PSVC_SUCCESS) { - i_psvc_destructor(hdlp, name, objp); - return (PSVC_FAILURE); - } - if (i_psvc_value(buf, PSVC_ADDR_SPEC_ATTR, &objp->addr_spec) != - PSVC_SUCCESS) { - i_psvc_destructor(hdlp, name, objp); - return (PSVC_FAILURE); - } - - if (objp->features & PSVC_DEV_SECONDARY) - objp->enabled = PSVC_DISABLED; - else - objp->enabled = PSVC_ENABLED; - - if (PSVC_GET_VERSION(objp->addr_spec) > PSVC_VERSION) { - errno = EINVAL; - i_psvc_destructor(hdlp, name, objp); - return (PSVC_FAILURE); - } - - *objpp = objp; - return (PSVC_SUCCESS); - -} - - -static int32_t -i_psvc_not_supported() -{ - errno = ENOTSUP; - return (PSVC_FAILURE); -} - -/* Temperature sensor */ -/* Class 0 Subclass 0 are temperature sensors that cannot be updated */ -static int32_t -i_psvc_constructor_0_0( - EHdl_t *hdlp, - char *id, - EObj_t **objpp) -{ - int32_t status; - char buf[BUFSZ]; - ETempSensor_t *dp; - - status = i_psvc_load_generic(hdlp, id, objpp, buf, - sizeof (ETempSensor_t)); - if (status != PSVC_SUCCESS) - return (status); - - /* Load class specific info */ - dp = (ETempSensor_t *)*objpp; - if (i_psvc_value(buf, PSVC_LO_WARN_ATTR, &dp->lo_warn) - != PSVC_SUCCESS) { - i_psvc_destructor(hdlp, id, dp); - return (PSVC_FAILURE); - } - if (i_psvc_value(buf, PSVC_LO_SHUT_ATTR, &dp->lo_shut) - != PSVC_SUCCESS) { - i_psvc_destructor(hdlp, id, dp); - return (PSVC_FAILURE); - } - if (i_psvc_value(buf, PSVC_HI_WARN_ATTR, &dp->hi_warn) - != PSVC_SUCCESS) { - i_psvc_destructor(hdlp, id, dp); - return (PSVC_FAILURE); - } - if (i_psvc_value(buf, PSVC_HI_SHUT_ATTR, &dp->hi_shut) - != PSVC_SUCCESS) { - i_psvc_destructor(hdlp, id, dp); - return (PSVC_FAILURE); - } - - dp->ld.constructor = i_psvc_constructor_0_0; - dp->ld.destructor = i_psvc_destructor; - dp->ld.get_attr = i_psvc_get_attr_0_0; - dp->ld.set_attr = i_psvc_set_attr_generic; - - return (0); -} - -/* Class 0 Subclass 1 are temperature sensors that can be updated */ -static int32_t -i_psvc_constructor_0_1( - EHdl_t *hdlp, - char *id, - EObj_t **objpp) -{ - int32_t status; - char buf[BUFSZ]; - ETempSensor_t *dp; - - status = i_psvc_load_generic(hdlp, id, objpp, buf, - sizeof (ETempSensor_t)); - if (status != PSVC_SUCCESS) - return (status); - - /* Load class specific info */ - dp = (ETempSensor_t *)*objpp; - if (i_psvc_value(buf, PSVC_LO_WARN_ATTR, &dp->lo_warn) - != PSVC_SUCCESS) { - i_psvc_destructor(hdlp, id, dp); - return (PSVC_FAILURE); - } - if (i_psvc_value(buf, PSVC_LO_SHUT_ATTR, &dp->lo_shut) - != PSVC_SUCCESS) { - i_psvc_destructor(hdlp, id, dp); - return (PSVC_FAILURE); - } - if (i_psvc_value(buf, PSVC_HI_WARN_ATTR, &dp->hi_warn) - != PSVC_SUCCESS) { - i_psvc_destructor(hdlp, id, dp); - return (PSVC_FAILURE); - } - if (i_psvc_value(buf, PSVC_HI_SHUT_ATTR, &dp->hi_shut) - != PSVC_SUCCESS) { - i_psvc_destructor(hdlp, id, dp); - return (PSVC_FAILURE); - } - - if ((*objpp)->features & PSVC_OPT_TEMP) { - if (i_psvc_value(buf, PSVC_OPTIMAL_TEMP_ATTR, &dp->opt_temp) - != PSVC_SUCCESS) { - i_psvc_destructor(hdlp, id, dp); - return (PSVC_FAILURE); - } - } - if ((*objpp)->features & PSVC_HW_LOW_SHUT) { - if (i_psvc_value(buf, PSVC_HW_LO_SHUT_ATTR, &dp->hw_lo_shut) - != PSVC_SUCCESS) { - i_psvc_destructor(hdlp, id, dp); - return (PSVC_FAILURE); - } - } - if ((*objpp)->features & PSVC_HW_HIGH_SHUT) { - if (i_psvc_value(buf, PSVC_HW_HI_SHUT_ATTR, &dp->hw_hi_shut) - != PSVC_SUCCESS) { - i_psvc_destructor(hdlp, id, dp); - return (PSVC_FAILURE); - } - } - - dp->ld.constructor = i_psvc_constructor_0_1; - dp->ld.destructor = i_psvc_destructor; - dp->ld.get_attr = i_psvc_get_attr_0_1; - dp->ld.set_attr = i_psvc_set_attr_0_1; - - return (0); -} - -/* Fan */ -static int32_t -i_psvc_constructor_1_0( - EHdl_t *hdlp, - char *id, - EObj_t **objpp) -{ - int32_t status; - char buf[BUFSZ]; - EFan_t *dp; - - status = i_psvc_load_generic(hdlp, id, objpp, buf, - sizeof (EFan_t)); - if (status != PSVC_SUCCESS) - return (status); - - /* Load class specific info */ - dp = (EFan_t *)*objpp; - if (i_psvc_value(buf, PSVC_SETPOINT_ATTR, &dp->setpoint) - != PSVC_SUCCESS) { - i_psvc_destructor(hdlp, id, dp); - return (PSVC_FAILURE); - } - if (i_psvc_value(buf, PSVC_HYSTERESIS_ATTR, &dp->hysteresis) - != PSVC_SUCCESS) { - i_psvc_destructor(hdlp, id, dp); - return (PSVC_FAILURE); - } - if (i_psvc_value(buf, PSVC_LOOPGAIN_ATTR, &dp->loopgain) - != PSVC_SUCCESS) { - i_psvc_destructor(hdlp, id, dp); - return (PSVC_FAILURE); - } - if (i_psvc_value(buf, PSVC_LOOPBIAS_ATTR, &dp->loopbias) - != PSVC_SUCCESS) { - i_psvc_destructor(hdlp, id, dp); - return (PSVC_FAILURE); - } - - dp->ld.constructor = i_psvc_constructor_1_0; - dp->ld.destructor = i_psvc_destructor; - dp->ld.get_attr = i_psvc_get_attr_1_0; - dp->ld.set_attr = i_psvc_set_attr_1_0; - - return (PSVC_SUCCESS); -} - - -/* LED */ -static int32_t -i_psvc_constructor_2_0( - EHdl_t *hdlp, - char *id, - EObj_t **objpp) -{ - int32_t status; - char buf[BUFSZ]; - ELed_t *dp; - - status = i_psvc_load_generic(hdlp, id, objpp, buf, - sizeof (ELed_t)); - if (status != PSVC_SUCCESS) - return (status); - - /* Load class specific info */ - dp = (ELed_t *)*objpp; - - if (i_psvc_value(buf, PSVC_LED_COLOR_ATTR, dp->color) - != PSVC_SUCCESS) { - i_psvc_destructor(hdlp, id, dp); - return (PSVC_FAILURE); - } - - dp->ld.constructor = i_psvc_constructor_2_0; - dp->ld.destructor = i_psvc_destructor; - dp->ld.get_attr = i_psvc_get_attr_2_0; - dp->ld.set_attr = i_psvc_set_attr_2_0; - - return (PSVC_SUCCESS); -} - -static int32_t -i_psvc_constructor_2_1( - EHdl_t *hdlp, - char *id, - EObj_t **objpp) -{ - int32_t status; - char buf[BUFSZ]; - ELed_t *dp; - - status = i_psvc_load_generic(hdlp, id, objpp, buf, - sizeof (ELed_t)); - if (status != PSVC_SUCCESS) - return (status); - - /* Load class specific info */ - dp = (ELed_t *)*objpp; - - if (i_psvc_value(buf, PSVC_LED_COLOR_ATTR, dp->color) - != PSVC_SUCCESS) { - i_psvc_destructor(hdlp, id, dp); - return (PSVC_FAILURE); - } - - dp->ld.constructor = i_psvc_constructor_2_1; - dp->ld.destructor = i_psvc_destructor; - dp->ld.get_attr = i_psvc_get_attr_2_1; - dp->ld.set_attr = i_psvc_set_attr_2_1; - - return (PSVC_SUCCESS); -} - -static int32_t -i_psvc_constructor_2_2( - EHdl_t *hdlp, - char *id, - EObj_t **objpp) -{ - int32_t status; - char buf[BUFSZ]; - ELed_t *dp; - - status = i_psvc_load_generic(hdlp, id, objpp, buf, - sizeof (ELed_t)); - if (status != PSVC_SUCCESS) - return (status); - - /* Load class specific info */ - dp = (ELed_t *)*objpp; - - if (i_psvc_value(buf, PSVC_LED_COLOR_ATTR, dp->color) - != PSVC_SUCCESS) { - i_psvc_destructor(hdlp, id, dp); - return (PSVC_FAILURE); - } - if (i_psvc_value(buf, PSVC_LED_IS_LOCATOR_ATTR, dp->is_locator) - != PSVC_SUCCESS) { - i_psvc_destructor(hdlp, id, dp); - return (PSVC_FAILURE); - } - if (strcmp(dp->is_locator, PSVC_LOCATOR_TRUE) == 0) { - if (i_psvc_value(buf, PSVC_LED_LOCATOR_NAME_ATTR, - dp->locator_name) != PSVC_SUCCESS) { - i_psvc_destructor(hdlp, id, dp); - return (PSVC_FAILURE); - } - } else { - strcpy(dp->locator_name, "N/A"); - } - - dp->ld.constructor = i_psvc_constructor_2_2; - dp->ld.destructor = i_psvc_destructor; - dp->ld.get_attr = i_psvc_get_attr_2_2; - dp->ld.set_attr = i_psvc_set_attr_2_0; - - return (PSVC_SUCCESS); -} - -/* System Device */ -static int32_t -i_psvc_constructor_3_0( - EHdl_t *hdlp, - char *id, - EObj_t **objpp) -{ - int32_t status; - char buf[BUFSZ]; - ESystem_t *dp; - - status = i_psvc_load_generic(hdlp, id, objpp, buf, sizeof (ESystem_t)); - if (status != PSVC_SUCCESS) - return (status); - - /* Load class specific info */ - dp = (ESystem_t *)*objpp; - - dp->ld.constructor = i_psvc_constructor_3_0; - dp->ld.destructor = i_psvc_destructor; - dp->ld.get_attr = i_psvc_get_attr_generic; - dp->ld.set_attr = i_psvc_set_attr_generic; - - return (PSVC_SUCCESS); -} - -/* Digital Sensor */ -static int32_t -i_psvc_constructor_4_0( - EHdl_t *hdlp, - char *id, - EObj_t **objpp) -{ - int32_t status; - char buf[BUFSZ]; - EDigiSensor_t *dp; - - status = i_psvc_load_generic(hdlp, id, objpp, buf, - sizeof (EDigiSensor_t)); - if (status != PSVC_SUCCESS) { - return (status); - } - - /* Load class specific info */ - dp = (EDigiSensor_t *)*objpp; - if (i_psvc_value(buf, PSVC_LO_WARN_ATTR, &dp->lo_warn) - != PSVC_SUCCESS) { - i_psvc_destructor(hdlp, id, dp); - return (PSVC_FAILURE); - } - if (i_psvc_value(buf, PSVC_LO_SHUT_ATTR, &dp->lo_shut) - != PSVC_SUCCESS) { - i_psvc_destructor(hdlp, id, dp); - return (PSVC_FAILURE); - } - if (i_psvc_value(buf, PSVC_HI_WARN_ATTR, &dp->hi_warn) - != PSVC_SUCCESS) { - i_psvc_destructor(hdlp, id, dp); - return (PSVC_FAILURE); - } - if (i_psvc_value(buf, PSVC_HI_SHUT_ATTR, &dp->hi_shut) - != PSVC_SUCCESS) { - i_psvc_destructor(hdlp, id, dp); - return (PSVC_FAILURE); - } - - dp->ld.constructor = i_psvc_constructor_4_0; - dp->ld.destructor = i_psvc_destructor; - dp->ld.get_attr = i_psvc_get_attr_4_0; - dp->ld.set_attr = i_psvc_set_attr_generic; - - return (PSVC_SUCCESS); -} - -/* Digital Control */ -static int32_t -i_psvc_constructor_5_0( - EHdl_t *hdlp, - char *id, - EObj_t **objpp) -{ - int32_t status; - char buf[BUFSZ]; - EDigiControl_t *dp; - - status = i_psvc_load_generic(hdlp, id, objpp, buf, - sizeof (EDigiControl_t)); - if (status != PSVC_SUCCESS) - return (status); - - /* Load class specific info */ - dp = (EDigiControl_t *)*objpp; - - dp->ld.constructor = i_psvc_constructor_5_0; - dp->ld.destructor = i_psvc_destructor; - dp->ld.get_attr = i_psvc_get_attr_5_0; - dp->ld.set_attr = i_psvc_set_attr_5_0; - return (PSVC_SUCCESS); -} - -/* Boolean GPIO */ -static int32_t -i_psvc_constructor_6_0( - EHdl_t *hdlp, - char *id, - EObj_t **objpp) -{ - int32_t status; - char buf[BUFSZ]; - EBoolSensor_t *dp; - - status = i_psvc_load_generic(hdlp, id, objpp, buf, - sizeof (EBoolSensor_t)); - if (status != PSVC_SUCCESS) - return (status); - - /* Load class specific info */ - dp = (EBoolSensor_t *)*objpp; - - dp->ld.constructor = i_psvc_constructor_6_0; - dp->ld.destructor = i_psvc_destructor; - dp->ld.get_attr = i_psvc_get_attr_6_0; - dp->ld.set_attr = i_psvc_set_attr_6_0; - - return (PSVC_SUCCESS); -} - -/* Fan Tachometer */ -static int32_t -i_psvc_constructor_7_0( - EHdl_t *hdlp, - char *id, - EObj_t **objpp) -{ - int32_t status; - char buf[BUFSZ]; - EFanTach_t *dp; - - status = i_psvc_load_generic(hdlp, id, objpp, buf, - sizeof (EFanTach_t)); - if (status != PSVC_SUCCESS) - return (status); - - /* Load class specific info */ - dp = (EFanTach_t *)*objpp; - if (i_psvc_value(buf, PSVC_LO_WARN_ATTR, &dp->lo_warn) - != PSVC_SUCCESS) { - i_psvc_destructor(hdlp, id, dp); - return (PSVC_FAILURE); - } - if (i_psvc_value(buf, PSVC_LO_SHUT_ATTR, &dp->lo_shut) - != PSVC_SUCCESS) { - i_psvc_destructor(hdlp, id, dp); - return (PSVC_FAILURE); - } - if (i_psvc_value(buf, PSVC_HI_WARN_ATTR, &dp->hi_warn) - != PSVC_SUCCESS) { - i_psvc_destructor(hdlp, id, dp); - return (PSVC_FAILURE); - } - if (i_psvc_value(buf, PSVC_HI_SHUT_ATTR, &dp->hi_shut) - != PSVC_SUCCESS) { - i_psvc_destructor(hdlp, id, dp); - return (PSVC_FAILURE); - } - - dp->ld.constructor = i_psvc_constructor_7_0; - dp->ld.destructor = i_psvc_destructor; - dp->ld.get_attr = i_psvc_get_attr_7_0; - dp->ld.set_attr = i_psvc_set_attr_generic; - - return (PSVC_SUCCESS); -} - -/* On Off Switch */ -static int32_t -i_psvc_constructor_8_0( - EHdl_t *hdlp, - char *id, - EObj_t **objpp) -{ - int32_t status; - char buf[BUFSZ]; - ESwitch_t *dp; - - status = i_psvc_load_generic(hdlp, id, objpp, buf, - sizeof (ESwitch_t)); - if (status != PSVC_SUCCESS) - return (status); - - /* Load class specific info */ - dp = (ESwitch_t *)*objpp; - - dp->ld.constructor = i_psvc_constructor_8_0; - dp->ld.destructor = i_psvc_destructor; - dp->ld.get_attr = i_psvc_get_attr_8_0; - dp->ld.set_attr = i_psvc_set_attr_8_0; - - return (PSVC_SUCCESS); -} - -/* Key Switch */ -static int32_t -i_psvc_constructor_9_0( - EHdl_t *hdlp, - char *id, - EObj_t **objpp) -{ - int32_t status; - char buf[BUFSZ]; - EKeySwitch_t *dp; - - status = i_psvc_load_generic(hdlp, id, objpp, buf, - sizeof (EKeySwitch_t)); - if (status != PSVC_SUCCESS) - return (status); - - /* Load class specific info */ - dp = (EKeySwitch_t *)*objpp; - - dp->ld.constructor = i_psvc_constructor_9_0; - dp->ld.destructor = i_psvc_destructor; - dp->ld.get_attr = i_psvc_get_attr_9_0; - dp->ld.set_attr = i_psvc_set_attr_generic; - - return (PSVC_SUCCESS); -} - -/* 8 Bit GPIO , devices with registers, calls get_reg()/set_reg() */ -static int32_t -i_psvc_constructor_10_0( - EHdl_t *hdlp, - char *id, - EObj_t **objpp) -{ - int32_t status; - char buf[BUFSZ]; - EGPIO8_t *dp; - - status = i_psvc_load_generic(hdlp, id, objpp, buf, sizeof (EGPIO8_t)); - if (status != PSVC_SUCCESS) - return (status); - - /* Load class specific info */ - dp = (EGPIO8_t *)*objpp; - - dp->ld.constructor = i_psvc_constructor_10_0; - dp->ld.destructor = i_psvc_destructor; - dp->ld.get_attr = i_psvc_get_attr_10_0; - dp->ld.set_attr = i_psvc_set_attr_10_0; - - return (PSVC_SUCCESS); -} - -/* 8 Bit GPIO , devices with ports, calls get_port()/set_port() */ -static int32_t -i_psvc_constructor_10_1( - EHdl_t *hdlp, - char *id, - EObj_t **objpp) -{ - int32_t status; - char buf[BUFSZ]; - EGPIO8_t *dp; - - status = i_psvc_load_generic(hdlp, id, objpp, buf, sizeof (EGPIO8_t)); - if (status != PSVC_SUCCESS) - return (status); - - /* Load class specific info */ - dp = (EGPIO8_t *)*objpp; - - dp->ld.constructor = i_psvc_constructor_10_1; - dp->ld.destructor = i_psvc_destructor; - dp->ld.get_attr = i_psvc_get_attr_10_1; - dp->ld.set_attr = i_psvc_set_attr_10_1; - - return (PSVC_SUCCESS); -} - -/* AT24 */ -static int32_t -i_psvc_constructor_11_0( - EHdl_t *hdlp, - char *id, - EObj_t **objpp) -{ - int32_t status; - char buf[BUFSZ]; - EPhysDev_t *dp; - - status = i_psvc_load_generic(hdlp, id, objpp, buf, - sizeof (EPhysDev_t)); - if (status != PSVC_SUCCESS) - return (status); - - /* Load class specific info */ - dp = (EPhysDev_t *)*objpp; - - dp->ld.constructor = i_psvc_constructor_11_0; - dp->ld.destructor = i_psvc_destructor; - dp->ld.get_attr = i_psvc_get_attr_11_0; - dp->ld.set_attr = i_psvc_set_attr_generic; - dp->get_temperature = i_psvc_not_supported; - dp->get_fanspeed = i_psvc_not_supported; - dp->get_input = i_psvc_not_supported; - dp->get_bit = i_psvc_not_supported; - dp->set_bit = i_psvc_not_supported; - dp->get_port = i_psvc_not_supported; - dp->set_port = i_psvc_not_supported; - dp->get_output = i_psvc_not_supported; - dp->set_output = i_psvc_not_supported; - dp->get_reg = i_psvc_get_reg_11_0; - dp->set_reg = i_psvc_not_supported; - - return (PSVC_SUCCESS); -} - -/* HPC3130 */ -static int32_t -i_psvc_constructor_11_1( - EHdl_t *hdlp, - char *id, - EObj_t **objpp) -{ - int32_t status; - char buf[BUFSZ]; - EPhysDev_t *dp; - - status = i_psvc_load_generic(hdlp, id, objpp, buf, sizeof (EPhysDev_t)); - if (status != PSVC_SUCCESS) - return (status); - - /* Load class specific info */ - dp = (EPhysDev_t *)*objpp; - - dp->ld.constructor = i_psvc_constructor_11_1; - dp->ld.destructor = i_psvc_destructor; - dp->ld.get_attr = i_psvc_get_attr_11_1; - dp->ld.set_attr = i_psvc_set_attr_generic; - dp->get_temperature = i_psvc_not_supported; - dp->get_fanspeed = i_psvc_not_supported; - dp->get_input = i_psvc_not_supported; - dp->get_bit = i_psvc_not_supported; - dp->set_bit = i_psvc_not_supported; - dp->get_port = i_psvc_not_supported; - dp->set_port = i_psvc_not_supported; - dp->get_output = i_psvc_not_supported; - dp->set_output = i_psvc_not_supported; - dp->get_reg = i_psvc_get_reg_11_1; - dp->set_reg = i_psvc_set_reg_11_1; - - return (PSVC_SUCCESS); -} - -/* LM75 */ -static int32_t -i_psvc_constructor_11_2( - EHdl_t *hdlp, - char *id, - EObj_t **objpp) -{ - int32_t status; - char buf[BUFSZ]; - EPhysDev_t *dp; - - status = i_psvc_load_generic(hdlp, id, objpp, buf, sizeof (EPhysDev_t)); - if (status != PSVC_SUCCESS) - return (status); - - /* Load class specific info */ - dp = (EPhysDev_t *)*objpp; - - dp->ld.constructor = i_psvc_constructor_11_2; - dp->ld.destructor = i_psvc_destructor; - dp->ld.get_attr = i_psvc_get_attr_11_2; - dp->ld.set_attr = i_psvc_set_attr_generic; - dp->get_temperature = i_psvc_get_temperature_11_2; - dp->get_fanspeed = i_psvc_not_supported; - dp->get_input = i_psvc_not_supported; - dp->get_bit = i_psvc_not_supported; - dp->set_bit = i_psvc_not_supported; - dp->get_port = i_psvc_not_supported; - dp->set_port = i_psvc_not_supported; - dp->get_output = i_psvc_not_supported; - dp->set_output = i_psvc_not_supported; - dp->get_reg = i_psvc_not_supported; - dp->set_reg = i_psvc_not_supported; - - return (PSVC_SUCCESS); -} - -/* LTC1427 */ -static int32_t -i_psvc_constructor_11_3( - EHdl_t *hdlp, - char *id, - EObj_t **objpp) -{ - int32_t status; - char buf[BUFSZ]; - EPhysDev_t *dp; - char path[1024]; - - status = i_psvc_load_generic(hdlp, id, objpp, buf, sizeof (EPhysDev_t)); - if (status != PSVC_SUCCESS) - return (status); - - /* - * The following code upto and including the open() call is so the - * device driver for the ltc1427 does not get unloaded by the OS at - * any time. This is important as the device driver is a write only - * physical device but DOES keep readable states in the device unitp - * structure (I2C_GET_OUTPUT) as a result this device should not - * be unload while PSVC is up and running - */ - status = i_psvc_get_devpath(hdlp, (*objpp)->addr_spec, path); - if (status != PSVC_SUCCESS) { - return (status); - } - - /* - * We deliberately do not close our file handle, to prevent - * any device instances from being detached. If an instance - * is detached, the "readable states in the device unitp" - * will be unloaded, causing loss of control of the device - * and incorrect error(s) to be displayed. - */ - if (open(path, O_RDWR) == -1) { - return (PSVC_FAILURE); - } - /* Load class specific info */ - dp = (EPhysDev_t *)*objpp; - - dp->ld.constructor = i_psvc_constructor_11_3; - dp->ld.destructor = i_psvc_destructor; - dp->ld.get_attr = i_psvc_get_attr_11_3; - dp->ld.set_attr = i_psvc_set_attr_generic; - dp->get_temperature = i_psvc_not_supported; - dp->get_fanspeed = i_psvc_not_supported; - dp->get_input = i_psvc_not_supported; - dp->get_bit = i_psvc_not_supported; - dp->set_bit = i_psvc_not_supported; - dp->get_port = i_psvc_not_supported; - dp->set_port = i_psvc_not_supported; - dp->get_output = i_psvc_get_output_11_3; - dp->set_output = i_psvc_set_output_11_3; - dp->get_reg = i_psvc_not_supported; - dp->set_reg = i_psvc_not_supported; - - return (PSVC_SUCCESS); -} - -/* MAX1617 */ -static int32_t -i_psvc_constructor_11_4( - EHdl_t *hdlp, - char *id, - EObj_t **objpp) -{ - int32_t status; - char buf[BUFSZ]; - EPhysDev_t *dp; - - status = i_psvc_load_generic(hdlp, id, objpp, buf, sizeof (EPhysDev_t)); - if (status != PSVC_SUCCESS) - return (status); - - /* Load class specific info */ - dp = (EPhysDev_t *)*objpp; - - dp->ld.constructor = i_psvc_constructor_11_4; - dp->ld.destructor = i_psvc_destructor; - dp->ld.get_attr = i_psvc_get_attr_11_4; - dp->ld.set_attr = i_psvc_set_attr_generic; - dp->get_temperature = i_psvc_get_temperature_11_4; - dp->get_fanspeed = i_psvc_not_supported; - dp->get_input = i_psvc_not_supported; - dp->get_bit = i_psvc_not_supported; - dp->set_bit = i_psvc_not_supported; - dp->get_port = i_psvc_not_supported; - dp->set_port = i_psvc_not_supported; - dp->get_output = i_psvc_not_supported; - dp->set_output = i_psvc_not_supported; - dp->get_reg = i_psvc_not_supported; - dp->set_reg = i_psvc_not_supported; - - return (PSVC_SUCCESS); -} - -/* PCF8574 */ -static int32_t -i_psvc_constructor_11_5( - EHdl_t *hdlp, - char *id, - EObj_t **objpp) -{ - int32_t status; - char buf[BUFSZ]; - EPhysDev_t *dp; - - status = i_psvc_load_generic(hdlp, id, objpp, buf, sizeof (EPhysDev_t)); - if (status != PSVC_SUCCESS) - return (status); - - /* Load class specific info */ - dp = (EPhysDev_t *)*objpp; - - dp->ld.constructor = i_psvc_constructor_11_5; - dp->ld.destructor = i_psvc_destructor; - dp->ld.get_attr = i_psvc_get_attr_11_5; - dp->ld.set_attr = i_psvc_set_attr_generic; - dp->get_temperature = i_psvc_not_supported; - dp->get_fanspeed = i_psvc_not_supported; - dp->get_input = i_psvc_not_supported; - dp->get_bit = i_psvc_get_bit_11_5; - dp->set_bit = i_psvc_set_bit_11_5; - dp->get_port = i_psvc_get_port_11_5; - dp->set_port = i_psvc_set_port_11_5; - dp->get_output = i_psvc_not_supported; - dp->set_output = i_psvc_not_supported; - dp->get_reg = i_psvc_not_supported; - dp->set_reg = i_psvc_not_supported; - - return (PSVC_SUCCESS); -} - -/* PCF8591 */ -static int32_t -i_psvc_constructor_11_6( - EHdl_t *hdlp, - char *id, - EObj_t **objpp) -{ - int32_t status; - char buf[BUFSZ]; - EPhysDev_t *dp; - - status = i_psvc_load_generic(hdlp, id, objpp, buf, sizeof (EPhysDev_t)); - if (status != PSVC_SUCCESS) - return (status); - - /* Load class specific info */ - dp = (EPhysDev_t *)*objpp; - - dp->ld.constructor = i_psvc_constructor_11_6; - dp->ld.destructor = i_psvc_destructor; - dp->ld.get_attr = i_psvc_get_attr_11_6; - dp->ld.set_attr = i_psvc_set_attr_generic; - dp->get_temperature = i_psvc_get_temperature_11_6; - dp->get_fanspeed = i_psvc_not_supported; - dp->get_input = i_psvc_get_input_11_6; - dp->get_bit = i_psvc_not_supported; - dp->set_bit = i_psvc_not_supported; - dp->get_port = i_psvc_not_supported; - dp->set_port = i_psvc_not_supported; - dp->get_output = i_psvc_get_output_11_6; - dp->set_output = i_psvc_set_output_11_6; - dp->get_reg = i_psvc_not_supported; - dp->set_reg = i_psvc_not_supported; - - return (PSVC_SUCCESS); -} - -/* SSC050 */ -static int32_t -i_psvc_constructor_11_7( - EHdl_t *hdlp, - char *id, - EObj_t **objpp) -{ - int32_t status; - char buf[BUFSZ]; - EPhysDev_t *dp; - - status = i_psvc_load_generic(hdlp, id, objpp, buf, sizeof (EPhysDev_t)); - if (status != PSVC_SUCCESS) - return (status); - - /* Load class specific info */ - dp = (EPhysDev_t *)*objpp; - - dp->ld.constructor = i_psvc_constructor_11_7; - dp->ld.destructor = i_psvc_destructor; - dp->ld.get_attr = i_psvc_get_attr_11_7; - dp->ld.set_attr = i_psvc_set_attr_generic; - dp->get_temperature = i_psvc_not_supported; - dp->get_fanspeed = i_psvc_get_fanspeed_11_7; - dp->get_input = i_psvc_not_supported; - dp->get_bit = i_psvc_get_bit_11_7; - dp->set_bit = i_psvc_set_bit_11_7; - dp->get_port = i_psvc_get_port_11_5; /* same as for class = 11, 5 */ - dp->set_port = i_psvc_set_port_11_5; - dp->get_output = i_psvc_not_supported; - dp->set_output = i_psvc_not_supported; - dp->get_reg = i_psvc_get_reg_11_7; - dp->set_reg = i_psvc_set_reg_11_7; - - return (PSVC_SUCCESS); -} - -/* TDA8444 */ -static int32_t -i_psvc_constructor_11_8( - EHdl_t *hdlp, - char *id, - EObj_t **objpp) -{ - int32_t status; - char buf[BUFSZ]; - EPhysDev_t *dp; - - status = i_psvc_load_generic(hdlp, id, objpp, buf, sizeof (EPhysDev_t)); - if (status != PSVC_SUCCESS) - return (status); - - /* Load class specific info */ - dp = (EPhysDev_t *)*objpp; - - dp->ld.constructor = i_psvc_constructor_11_8; - dp->ld.destructor = i_psvc_destructor; - dp->ld.get_attr = i_psvc_get_attr_11_8; - dp->ld.set_attr = i_psvc_set_attr_generic; - dp->get_temperature = i_psvc_not_supported; - dp->get_fanspeed = i_psvc_not_supported; - dp->get_input = i_psvc_not_supported; - dp->get_bit = i_psvc_not_supported; - dp->set_bit = i_psvc_not_supported; - dp->get_port = i_psvc_not_supported; - dp->set_port = i_psvc_not_supported; - dp->get_output = i_psvc_get_output_11_8; - dp->set_output = i_psvc_set_output_11_8; - dp->get_reg = i_psvc_not_supported; - dp->set_reg = i_psvc_not_supported; - - return (PSVC_SUCCESS); -} - -/* SSC100 */ -static int32_t -i_psvc_constructor_11_9( - EHdl_t *hdlp, - char *id, - EObj_t **objpp) -{ - int32_t status; - char buf[BUFSZ]; - EPhysDev_t *dp; - - status = i_psvc_load_generic(hdlp, id, objpp, buf, sizeof (EPhysDev_t)); - if (status != PSVC_SUCCESS) - return (status); - - /* Load class specific info */ - dp = (EPhysDev_t *)*objpp; - - dp->ld.constructor = i_psvc_constructor_11_9; - dp->ld.destructor = i_psvc_destructor; - dp->ld.get_attr = i_psvc_get_attr_11_9; - dp->ld.set_attr = i_psvc_set_attr_generic; - dp->get_temperature = i_psvc_not_supported; - dp->get_fanspeed = i_psvc_not_supported; - dp->get_input = i_psvc_not_supported; - dp->get_bit = i_psvc_not_supported; - dp->set_bit = i_psvc_not_supported; - dp->get_port = i_psvc_get_port_11_5; /* Same as for class = 11, 5 */ - dp->set_port = i_psvc_set_port_11_5; - dp->get_output = i_psvc_not_supported; - dp->set_output = i_psvc_not_supported; - dp->get_reg = i_psvc_not_supported; - dp->set_reg = i_psvc_not_supported; - - return (PSVC_SUCCESS); -} - -int32_t -psvc_init(EHdl_t **hdlpp) -{ - EHdl_t *hdlp; - int i; - char buf[BUFSZ]; - char platform[32]; - char filename[256]; - int found; - int32_t status; - pthread_mutexattr_t mutex_attr; - uint32_t table_count; - int forward_slash = 47; - int new_line = 10; - char *nl_char; - - hdlp = (EHdl_t *)malloc(sizeof (EHdl_t)); - if (hdlp == NULL) - return (-1); - memset(hdlp, 0, sizeof (EHdl_t)); - - /* Initialize the lock */ - status = pthread_mutexattr_init(&mutex_attr); - if (status != 0) { - errno = status; - return (-1); - } - status = pthread_mutex_init(&hdlp->mutex, &mutex_attr); - if (status != 0) { - errno = status; - return (-1); - } - pthread_mutexattr_destroy(&mutex_attr); - - if (sysinfo(SI_PLATFORM, platform, sizeof (platform)) == -1) { - return (-1); - } - - snprintf(filename, sizeof (filename), - "/usr/platform/%s/lib/psvcobj.conf", platform); - if ((hdlp->fp = fopen(filename, "r")) == NULL) { - return (-1); - } - - - /* Build the association ID lookup table */ - - hdlp->othr_count = hdlp->assoc_count = ASSOC_STR_TAB_SIZE; - if ((hdlp->othr_tbl = (EStringId_t *)malloc(sizeof (EStringId_t) * - hdlp->othr_count)) == NULL) { - return (-1); - } - - for (i = 0; i < hdlp->othr_count; ++i) { - hdlp->othr_tbl[i].id = i; - strcpy(hdlp->othr_tbl[i].name, assoc_str_tab[i]); - } - qsort(hdlp->othr_tbl, hdlp->othr_count, sizeof (EStringId_t), - (int (*)(const void *, const void *))i_psvc_name_compare_qsort); - - /* determine total number of objects + tables */ - if (i_psvc_find_file_section(hdlp->fp, "OBJECT_INFO") == -1) { - return (-1); - } - if (i_psvc_count_records(hdlp->fp, "OBJECT_INFO_END", - &hdlp->total_obj_count) == -1) { - return (-1); - } - if (i_psvc_find_file_section(hdlp->fp, "TABLES") == PSVC_SUCCESS) { - status = i_psvc_count_tables_associations(hdlp->fp, - &table_count, "TABLE_END"); - if (status == PSVC_FAILURE) { - return (status); - } - hdlp->total_obj_count += table_count; - } - - /* Allocate object name to object pointer translation table */ - for (i = 0; i < PSVC_MAX_TABLE_ARRAYS; i++) { - if ((hdlp->tbl_arry[i].obj_tbl = - (ENamePtr_t *)malloc( - sizeof (ENamePtr_t) *hdlp->total_obj_count)) == NULL) { - return (-1); - } - memset(hdlp->tbl_arry[i].obj_tbl, 0, - sizeof (ENamePtr_t) * hdlp->total_obj_count); - hdlp->tbl_arry[i].obj_count = 0; - } - - /* Build the association table */ - if (i_psvc_load_associations(hdlp, hdlp->fp) == -1) - return (-1); - - /* Build the table of device paths */ - if (i_psvc_find_file_section(hdlp->fp, "DEVPATHS") == -1) - return (-1); - if (i_psvc_count_records(hdlp->fp, "DEVPATHS_END", - &hdlp->dev_count) == -1) - return (-1); - if ((hdlp->dev_tbl = (EDevice_t *)malloc(sizeof (EDevice_t) * - hdlp->dev_count)) == NULL) { - return (-1); - } - for (i = 0; i < hdlp->dev_count; ++i) { - fgets(buf, BUFSZ, hdlp->fp); - found = sscanf(buf, "%d %d %x %d", - &hdlp->dev_tbl[i].controller, - &hdlp->dev_tbl[i].bus, &hdlp->dev_tbl[i].addr, - &hdlp->dev_tbl[i].port); - if (found != 4) { - errno = EINVAL; - return (-1); - } - strcpy(hdlp->dev_tbl[i].path, strchr(buf, forward_slash)); - /* - * Replace new line character with NUL character - */ - nl_char = strchr(hdlp->dev_tbl[i].path, new_line); - *nl_char = 0; - } - - /* Build the table of tables */ - if (i_psvc_load_tables(hdlp, hdlp->fp) == -1) - return (-1); - *hdlpp = hdlp; - return (0); -} - -int32_t -psvc_fini(EHdl_t *hdlp) -{ - int32_t i, j; - ETable_Array *array; - - if (hdlp == 0) - return (PSVC_SUCCESS); - - for (j = 0; j < PSVC_MAX_TABLE_ARRAYS; j++) { - if (hdlp->tbl_arry[j].obj_tbl != 0) { - array = &(hdlp->tbl_arry[j]); - for (i = 0; i < array->obj_count; ++i) { - if (array->obj_tbl[i].type == PSVC_OBJ) { - if (!array->obj_tbl[i].objp) { - /* Skip non-existent object */ - continue; - } - array->obj_tbl[i].objp->destructor(hdlp, - array->obj_tbl[i].objp->label, - array->obj_tbl[i].objp); - } - - if (array->obj_tbl[i].type == PSVC_TBL) { - ETable_t *tblp = - (ETable_t *)array->obj_tbl[i].objp; - if (tblp->table != 0) - free(tblp->table); - } - } - - free(array->obj_tbl); - } - } - - if (hdlp->othr_tbl != 0) - free(hdlp->othr_tbl); - - if (hdlp->assoc_tbl != 0) { - for (i = 0; i < hdlp->assoc_count; ++i) { - if (hdlp->assoc_tbl[i].table != 0) - free(hdlp->assoc_tbl[i].table); - } - free(hdlp->assoc_tbl); - } - - if (hdlp->dev_tbl != 0) - free(hdlp->dev_tbl); - if (hdlp->fp != 0) - fclose(hdlp->fp); - pthread_mutex_destroy(&hdlp->mutex); - free(hdlp); - return (PSVC_SUCCESS); -} - -int32_t -ioctl_retry(int fp, int request, void * arg_pointer) -{ - int32_t ret = PSVC_SUCCESS; - int32_t tries = 0; - - /* - * Becuase the i2c bus is a multimaster bus we need to protect - * ourselves from bus masters that are not being good bus citizens. - * A retry number of 10 should be sufficient to handle any bad bus - * citizens. After that we will simply say that there is something - * wrong with the ioctl transaction and let it bubble back up. - */ - do { - ret = ioctl(fp, request, arg_pointer); - tries ++; - } while ((ret == -1) && (tries < 10)); - - return (ret); -} - -static int32_t -psvc_get_str_key(char *object) -{ - int32_t key = 0; - int i, length; - - length = strlen(object); - for (i = 0; i < length; i++) { - if ((object[i] > 47) && (object[i] < 58)) { - key = key + ((object[i] - 50) + 2); - } else { - key = key + object[i]; - } - } - - - return (key); -} diff --git a/usr/src/cmd/picl/plugins/sun4u/psvc/psvcplugin/Makefile b/usr/src/cmd/picl/plugins/sun4u/psvc/psvcplugin/Makefile deleted file mode 100644 index 8e09f1fa62..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/psvc/psvcplugin/Makefile +++ /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 (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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. -# -# cmd/picl/plugins/sun4u/psvc/psvcplugin/Makefile -# -LIBRARY= libpsvcplugin.a -VERS= .1 - -OBJECTS= psvcplugin.o - -# include library definitions -include $(SRC)/lib/Makefile.lib -include $(SRC)/Makefile.psm - -include $(SRC)/cmd/picl/plugins/Makefile.com - -SRCS= $(OBJECTS:%.o=%.c) - -LIBS = $(DYNLIB) - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-280R - -USR_PLAT_PLUGINS_LNECK = $(LIBS:%=$(ROOT_PLAT_PLUGINDIR)/%) - -PLAT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-880 -PLAT_PLATFORM += $(USR_PLAT_DIR)/SUNW,Sun-Fire-480R -PLAT_PLATFORM += $(USR_PLAT_DIR)/SUNW,Sun-Fire-V490 -PLAT_PLATFORM += $(USR_PLAT_DIR)/SUNW,Sun-Fire-V890 - -PLAT_LIB_DIR = $(PLAT_PLATFORM:%=%/lib) - -PLAT_PICL_DIR = $(PLAT_LIB_DIR:%=%/picl) - -PLAT_PLUGINS_DIRS = $(PLAT_PICL_DIR:%=%/plugins) - -USR_PLAT_PLUGINS_DYNLIBS = $(PLAT_PLUGINS_DIRS:%=%/$(DYNLIB)) -USR_PLAT_PLUGINS_LIBLINKS = $(PLAT_PLUGINS_DIRS:%=%/$(LIBLINKS)) -LNECK_DYNLIB_DIR = ../../../../SUNW,Sun-Fire-280R/lib/picl/plugins - -CPPFLAGS += -I$(SRC)/uts/sun4u -CPPFLAGS += -I$(SRC)/cmd/picl/plugins/sun4u/psvc/psvcobj - -LDLIBS += -L$(SRC)/lib/libpicl/$(MACH) -L$(SRC)/lib/libpicltree/$(MACH) -LDLIBS += -L $(ROOT)/usr/platform/$(PLATFORM)/lib -LDLIBS += -L$(SRC)/cmd/picl/plugins/sun4u/psvc/psvcobj -LDLIBS += -R/usr/platform/sun4u/lib -LDLIBS += -lc -lpicltree -lpicl -lpsvcobj - -DYNFLAGS += -Wl,-f/usr/platform/\$$PLATFORM/lib/$(DYNLIBPSR) - -.KEEP_STATE: - -SUBDIRS= - -POFILE= psvcplugin.po - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -all: $(LIBS) $(LIBLINKS) - -install: all $(USR_PLAT_PLUGINS_LNECK) \ - $(PLAT_PLATFORM) $(PLAT_LIB_DIR) $(PLAT_PICL_DIR) \ - $(USR_PLAT_PLUGINS_DYNLIBS) $(USR_PLAT_PLUGINS_LIBLINKS) - -$(LIBLINKS): FRC - $(RM) $(LIBLINKS); $(SYMLINK) $(DYNLIB) $(LIBLINKS) - -_msg: $(MSGDOMAIN) $(POFILE) - $(RM) $(MSGDOMAIN)/$(POFILE) - $(CP) $(POFILE) $(MSGDOMAIN)/$(POFILE) - -$(MSGDOMAIN): - $(INS.dir) - - -# include library targets -include $(SRC)/cmd/picl/plugins/Makefile.targ -include $(SRC)/lib/Makefile.targ - -$(ROOT_PLAT_PLUGINDIR)/%: % $(ROOT_PLAT_PLUGINDIR) - $(INS.file) ;\ - $(RM) -r $(ROOT_PLAT_PLUGINDIR)/$(LIBLINKS) ;\ - $(SYMLINK) ./$(DYNLIB) $(ROOT_PLAT_PLUGINDIR)/$(LIBLINKS) - -$(PLAT_PLATFORM): - $(INS.dir) -$(PLAT_LIB_DIR): - $(INS.dir) -$(PLAT_PICL_DIR): - $(INS.dir) - -$(PLAT_PLUGINS_DIRS): - $(INS.dir) - -$(USR_PLAT_PLUGINS_DYNLIBS): $(PLAT_PLUGINS_DIRS) - $(RM) -r $@ ;\ - $(SYMLINK) $(LNECK_DYNLIB_DIR)/$(DYNLIB) $@ - -$(USR_PLAT_PLUGINS_LIBLINKS): $(PLAT_PLUGINS_DIRS) - $(RM) -r $@ ;\ - $(SYMLINK) $(LNECK_DYNLIB_DIR)/$(DYNLIB) $@ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/psvc/psvcplugin/psvcplugin.c b/usr/src/cmd/picl/plugins/sun4u/psvc/psvcplugin/psvcplugin.c deleted file mode 100644 index 861ff61e0a..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/psvc/psvcplugin/psvcplugin.c +++ /dev/null @@ -1,1808 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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. - */ - -/* - * PICL plug-in to create environment tree nodes. - * This plugin should only be installed in the platform directories - * of supported systems, such as /usr/platform/picl/plugins/SUNW,<>. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define BUFSZ 512 - -typedef struct { - char name[32]; -} EName_t; - -typedef struct { - void *hdl; - int32_t (*funcp)(void *, char *); - int32_t num_objects; - EName_t *obj_list; - char routine[64]; -} ETask_t; - -typedef struct interval_info { - volatile int32_t interval; - int32_t num_tasks; - ETask_t *task_list; - pthread_t thread; - int32_t has_thread; - struct interval_info *next; -} EInterval_t; - -static EInterval_t *first_interval; - -static psvc_opaque_t hdlp; - -sem_t timer_sem; -pthread_mutex_t timer_mutex; -pthread_cond_t timer_cond; -pthread_t timer_thread_id; - -extern int ptree_get_node_by_path(const char *, picl_nodehdl_t *); - -/* Timer states */ -#define NOT_READY 0 -#define READY 1 -#define HAVE_REQUEST 2 -#define ACTIVE 3 -#define TIMER_SHUTDOWN 4 - -int timer_state = NOT_READY; - -int app_timeout; - -/* Lock State Loop State Definitions */ -#define STATE_CHANGED 1 -#define STATE_NOT_CHANGED 0 - -#ifdef DEBUG -static int32_t debug_flag = 1; -#else -static int32_t debug_flag = 0; -#endif - -static char library[PATH_MAX]; - -#define PSVC_PLUGIN_VERSION PICLD_PLUGIN_VERSION_1 - -#pragma init(psvc_plugin_register) /* place in .init section */ - -typedef struct { - char parent_path[256]; - char child_name[32]; - picl_nodehdl_t child_node; -} psvc_name_t; -psvc_name_t *psvc_paths; - -#define MUTEX_LOCK_FAILED_MSG gettext("platsvcd: pthread_mutex_lock %s\n") -#define CV_WAIT_FAILED_MSG gettext("platsvcd: pthread_cond_wait %s\n") -#define CV_TWAIT_FAILED_MSG gettext("platsvcd: pthread_cond_timed_wait %s\n") -#define SEM_WAIT_FAILED_MSG gettext("platsvcd: sem_wait failed %s\n") -#define PSVC_APP_DEATH_MSG gettext("PSVC application death detected\n") -#define POLICY_FAILED_MSG gettext("ERROR running %s on %s (%d)") -#define ID_NOT_FOUND_MSG gettext("%s: Can't determine id of %s\n") -#define CLASS_NOT_FOUND_MSG gettext("%s: Can't determine class of %s\n") -#define SUBCLASS_NOT_FOUND_MSG gettext("%s: Can't determine subclass of %s\n") -#define NODE_NOT_FOUND_MSG gettext("%s: Can't determine node of %s\n") -#define SIZE_NOT_FOUND_MSG gettext("%s: Couldn't determine size of %s\n") -#define PTREE_CREATE_TABLE_FAILED_MSG \ - gettext("%s: ptree_create_table failed, %s\n") -#define PTREE_CREATE_PROP_FAILED_MSG \ - gettext("%s: ptree_create_prop failed, %s\n") -#define PTREE_CREATE_NODE_FAILED_MSG \ - gettext("%s: ptree_create_node failed, %s\n") -#define PTREE_ADD_ROW_FAILED_MSG gettext("%s: ptree_add_row_to_table: %s\n") -#define PTREE_ADD_NODE_FAILED_MSG gettext("%s: ptree_add_node: %s\n") -#define PTREE_ADD_PROP_FAILED_MSG gettext("%s: ptree_add_prop: %s\n") -#define PTREE_GET_ROOT_FAILED_MSG gettext("%s: ptree_get_root: %s\n") -#define CREATE_PROP_FAILED_MSG gettext("%s: Error creating property %s\n") -#define INVALID_FILE_FORMAT_MSG gettext("%s: Invalid file format\n") -#define INVALID_FILE_FORMAT1_MSG gettext("%s: Invalid file format %s\n") -#define PSVC_INIT_ERR_MSG gettext("%s: Error in psvc_init(): %s\n") -#define SYSINFO_FAILED_MSG gettext("%s: Can't determine platform type\n") -#define FILE_OPEN_FAILED_MSG gettext("%s: Can't open file %s\n") -#define MALLOC_FAILED_MSG gettext("%s: malloc failed, %s\n") -#define UNKNOWN_CLASS_MSG gettext("%s: Unknown class\n") -#define NODE_PROP_FAILED_MSG gettext("%s: node_property: %s\n") - -#define LOCK_STRING_MAX 32 - -picl_nodehdl_t system_node; -static picl_nodehdl_t lock_node; -static char env_lock_state[LOCK_STRING_MAX] = PSVC_LOCK_ENABLED; -static pthread_mutex_t env_lock_mutex; - -static char *class_name[] = { -"temperature-sensor", -"fan", -"led", -"picl", -"digital-sensor", -"digital-control", -"gpio", -"fan-tachometer", -"switch", -"keyswitch", -"gpio", -"i2c" -}; -#define NUM_CLASSES (sizeof (class_name) / sizeof (char *)) - -struct proj_prop { /* projected property */ - picl_prophdl_t handle; - picl_nodehdl_t dst_node; - char name[32]; -}; - -struct propinfo { - char *name; - uint32_t type; - uint32_t size; - uint32_t access; -}; - -struct propinfo common[] = { - {"State", PICL_PTYPE_CHARSTRING, 32, - PICL_READ | PICL_WRITE | PICL_VOLATILE}, - {"FaultInformation", PICL_PTYPE_CHARSTRING, 32, - PICL_READ | PICL_VOLATILE} -}; -#define COMMON_COUNT (sizeof (common) / sizeof (struct propinfo)) - -struct propinfo led_properties[] = { - {"Color", PICL_PTYPE_CHARSTRING, 32, PICL_READ | PICL_VOLATILE}, - {"IsLocator", PICL_PTYPE_CHARSTRING, 32, PICL_READ | PICL_VOLATILE}, - {"LocatorName", PICL_PTYPE_CHARSTRING, 32, PICL_READ | PICL_VOLATILE} -}; -/* - * We define the amount of LED properties to 1 because not all LED's have - * the two remainding properties. This number is augmented in psvc_plugin_init - * when it sees an LED of subclass 2. - */ -#define LED_COUNT 1 - -struct propinfo temperature_sensor_properties[] = { - {"Temperature", PICL_PTYPE_INT, 4, PICL_READ | PICL_VOLATILE}, - {"LowWarningThreshold", PICL_PTYPE_INT, 4, PICL_READ | PICL_VOLATILE}, - {"LowShutdownThreshold", PICL_PTYPE_INT, 4, PICL_READ | PICL_VOLATILE}, - {"HighWarningThreshold", PICL_PTYPE_INT, 4, PICL_READ | PICL_VOLATILE}, - {"HighShutdownThreshold", PICL_PTYPE_INT, 4, PICL_READ | PICL_VOLATILE} -}; -#define TEMP_SENSOR_COUNT \ - (sizeof (temperature_sensor_properties) / sizeof (struct propinfo)) - -struct propinfo digi_sensor_properties[] = { - {"AtoDSensorValue", PICL_PTYPE_INT, 4, PICL_READ | PICL_VOLATILE}, - {"LowWarningThreshold", PICL_PTYPE_INT, 4, PICL_READ | PICL_VOLATILE}, - {"LowShutdownThreshold", PICL_PTYPE_INT, 4, PICL_READ | PICL_VOLATILE}, - {"HighWarningThreshold", PICL_PTYPE_INT, 4, PICL_READ | PICL_VOLATILE}, - {"HighShutdownThreshold", PICL_PTYPE_INT, 4, PICL_READ | PICL_VOLATILE} -}; -#define DIGI_SENSOR_COUNT \ - (sizeof (digi_sensor_properties) / sizeof (struct propinfo)) - -struct propinfo boolgpio_properties[] = { - {"Gpio-value", PICL_PTYPE_UNSIGNED_INT, sizeof (boolean_t), - PICL_READ | PICL_WRITE | PICL_VOLATILE}, - {"#Bits", PICL_PTYPE_UNSIGNED_INT, 4, PICL_READ |PICL_VOLATILE} -}; -#define BOOLGPIO_COUNT (sizeof (boolgpio_properties) / sizeof (struct propinfo)) - -struct propinfo gpio8_properties[] = { - {"Gpio-value", PICL_PTYPE_UNSIGNED_INT, 1, - PICL_READ | PICL_WRITE | PICL_VOLATILE}, - {"#Bits", PICL_PTYPE_UNSIGNED_INT, 4, PICL_READ |PICL_VOLATILE} -}; -#define GPIO8_COUNT (sizeof (gpio8_properties) / sizeof (struct propinfo)) - -struct propinfo digictrl_properties[] = { - {"DtoAControlValue", PICL_PTYPE_INT, 4, - PICL_READ | PICL_WRITE | PICL_VOLATILE}, -}; -#define DIGICTRL_COUNT (sizeof (digictrl_properties) / sizeof (struct propinfo)) - -struct classinfo { - struct propinfo *props; - int32_t count; -} class_properties[] = -{ - {temperature_sensor_properties, TEMP_SENSOR_COUNT}, /* temp sensor */ - {0, 0}, /* fan, only has projected properties */ - {led_properties, LED_COUNT}, - {0, 0}, /* system class */ - {digi_sensor_properties, DIGI_SENSOR_COUNT}, /* digital sensor */ - {digictrl_properties, DIGICTRL_COUNT}, - {boolgpio_properties, BOOLGPIO_COUNT}, - {digi_sensor_properties, DIGI_SENSOR_COUNT}, /* fan tach */ - {0, 0}, - {0, 0}, - {gpio8_properties, GPIO8_COUNT}, - {0, 0}, -}; - -struct prop_trans { - char *picl_class; - char *picl_prop; - int32_t psvc_prop; -} picl_prop_trans[] = -{ - {"digital-sensor", "AtoDSensorValue", PSVC_SENSOR_VALUE_ATTR}, - {"digital-sensor", "LowWarningThreshold", PSVC_LO_WARN_ATTR}, - {"digital-sensor", "LowShutdownThreshold", PSVC_LO_SHUT_ATTR}, - {"digital-sensor", "HighWarningThreshold", PSVC_HI_WARN_ATTR}, - {"digital-sensor", "HighShutdownThreshold", PSVC_HI_SHUT_ATTR}, - {"digital-control", "DtoAControlValue", PSVC_CONTROL_VALUE_ATTR}, - {"fan-tachometer", "AtoDSensorValue", PSVC_SENSOR_VALUE_ATTR}, - {"fan-tachometer", "LowWarningThreshold", PSVC_LO_WARN_ATTR}, - {"fan-tachometer", "LowShutdownThreshold", PSVC_LO_SHUT_ATTR}, - {"fan-tachometer", "HighWarningThreshold", PSVC_HI_WARN_ATTR}, - {"fan-tachometer", "HighShutdownThreshold", PSVC_HI_SHUT_ATTR}, - {"temperature-sensor", "Temperature", PSVC_SENSOR_VALUE_ATTR}, - {"temperature-sensor", "LowWarningThreshold", PSVC_LO_WARN_ATTR}, - {"temperature-sensor", "LowShutdownThreshold", PSVC_LO_SHUT_ATTR}, - {"temperature-sensor", "HighWarningThreshold", PSVC_HI_WARN_ATTR}, - {"temperature-sensor", "HighShutdownThreshold", PSVC_HI_SHUT_ATTR}, - {"led", "State", PSVC_LED_STATE_ATTR}, - {"led", "Color", PSVC_LED_COLOR_ATTR}, - {"switch", "State", PSVC_SWITCH_STATE_ATTR}, - {"keyswitch", "State", PSVC_SWITCH_STATE_ATTR}, - {"i2c", "State", PSVC_PROBE_RESULT_ATTR} -}; - -#define PICL_PROP_TRANS_COUNT \ - (sizeof (picl_prop_trans) / sizeof (struct prop_trans)) - - -typedef struct { - char name[32]; - picl_nodehdl_t node; -} picl_psvc_t; - -struct assoc_pair { - char antecedent[32]; - char dependent[32]; -}; - -struct handle { - uint32_t obj_count; - picl_psvc_t *objects; - FILE *fp; -} psvc_hdl; - -struct proj_prop *prop_list; -uint32_t proj_prop_count; - -int psvc_picl_nodes; - -void psvc_plugin_init(void); -void psvc_plugin_fini(void); - -picld_plugin_reg_t psvc_reg = { - PSVC_PLUGIN_VERSION, - PICLD_PLUGIN_CRITICAL, - "PSVC", - psvc_plugin_init, - psvc_plugin_fini -}; - -/* - * psvcplugin_add_children was written so that devices which are hotplugable - * will be able to add in all thier children and children's children. The - * routine takes in the path of a parent and then searches the psvc_paths - * array to find all of it's children. It in turns adds the child and then - * recursively check to see if it had children and add them too. - */ -void -psvcplugin_add_children(char *parent_path) -{ - int i; - picl_nodehdl_t parent_node; - char next_path[256]; - - for (i = 0; i < psvc_picl_nodes; ++i) { - if (strcmp(parent_path, psvc_paths[i].parent_path) == 0) { - ptree_get_node_by_path(parent_path, &parent_node); - ptree_add_node(parent_node, psvc_paths[i].child_node); - (void) snprintf(next_path, sizeof (next_path), "%s/%s", - parent_path, psvc_paths[i].child_name); - psvcplugin_add_children(next_path); - } - } -} - -void -psvcplugin_lookup(char *name, char *parent, picl_nodehdl_t *node) -{ - int i; - - for (i = 0; i < psvc_picl_nodes; ++i) { - if (strcmp(name, psvc_paths[i].child_name) == 0) { - (void) strcpy(parent, psvc_paths[i].parent_path); - *node = psvc_paths[i].child_node; - } - } -} - -void -timer_thread(void) -{ - struct timespec timeout; - int status; - - - status = pthread_mutex_lock(&timer_mutex); - if (status != 0) { - syslog(LOG_ERR, MUTEX_LOCK_FAILED_MSG, strerror(status)); - } - - for (;;) { - /* wait for thread to tell us to start timer */ - timer_state = READY; - do { - status = pthread_cond_wait(&timer_cond, &timer_mutex); - } while (timer_state == READY && status == 0); - - if (timer_state == TIMER_SHUTDOWN) { - pthread_exit(NULL); - /* not reached */ - } - - if (status != 0) { - syslog(LOG_ERR, CV_WAIT_FAILED_MSG, strerror(status)); - } - - /* - * Will get signalled after semaphore acquired, - * or when timeout occurs. - */ - (void) clock_gettime(CLOCK_REALTIME, &timeout); - timeout.tv_sec += app_timeout; - - if (timer_state == HAVE_REQUEST) { - timer_state = ACTIVE; - do { - status = pthread_cond_timedwait(&timer_cond, - &timer_mutex, &timeout); - } while (timer_state == ACTIVE && status == 0); - } - - if (status != 0) { - if (status == ETIMEDOUT) { - syslog(LOG_ERR, PSVC_APP_DEATH_MSG); - (void) pthread_mutex_lock(&env_lock_mutex); - (void) strlcpy(env_lock_state, - PSVC_LOCK_ENABLED, LOCK_STRING_MAX); - (void) pthread_mutex_unlock(&env_lock_mutex); - } else { - syslog(LOG_ERR, CV_TWAIT_FAILED_MSG, - strerror(status)); - } - } - } -} - -static int -lock_state_loop(char *set_lock_state) -{ - (void) pthread_mutex_lock(&env_lock_mutex); - if (strcmp(env_lock_state, PSVC_LOCK_ENABLED) == 0) { - (void) strlcpy(env_lock_state, set_lock_state, LOCK_STRING_MAX); - (void) pthread_mutex_unlock(&env_lock_mutex); - return (STATE_NOT_CHANGED); - } - (void) pthread_mutex_unlock(&env_lock_mutex); - return (STATE_CHANGED); -} - -static int timed_lock_wait(char *set_lock_state) -{ - int32_t status; - - /* Only want one timer active at a time */ - do { - status = sem_wait(&timer_sem); - } while (status == -1 && errno == EINTR); - if (status == -1) - return (status); - - while (timer_state != READY) - (void) sched_yield(); - (void) pthread_mutex_lock(&timer_mutex); - timer_state = HAVE_REQUEST; - (void) pthread_cond_signal(&timer_cond); /* start timer */ - (void) pthread_mutex_unlock(&timer_mutex); - - /* - * We now spin checking the state env_lock_state for it to change to - * enabled. - */ - while (lock_state_loop(set_lock_state)) - (void) sleep(1); - - (void) pthread_mutex_lock(&timer_mutex); - if (timer_state == ACTIVE) { - timer_state = NOT_READY; - (void) pthread_cond_signal(&timer_cond); /* stop timer */ - } - if (timer_state == HAVE_REQUEST) { /* cancel request */ - timer_state = NOT_READY; - } - (void) pthread_mutex_unlock(&timer_mutex); - (void) sem_post(&timer_sem); - return (0); -} - -static void lock_and_run(ETask_t *tp, int32_t obj_num) -{ - int32_t status; - - /* Grab mutex to stop the env_lock from being changed. */ - (void) pthread_mutex_lock(&env_lock_mutex); - /* - * Check to see if the lock is anything but Enabled. If so, we then - * goto our timer routine to wait for it to become enabled. - * If not then set it to RUNNING and run policy. - */ - if (strcmp(env_lock_state, PSVC_LOCK_ENABLED) != 0) { - /* drop mutex and goto timer */ - (void) pthread_mutex_unlock(&env_lock_mutex); - status = timed_lock_wait(PSVC_LOCK_RUNNING); - if (status == -1) { - syslog(LOG_ERR, SEM_WAIT_FAILED_MSG); - } - } else { - (void) strlcpy(env_lock_state, PSVC_LOCK_RUNNING, - LOCK_STRING_MAX); - (void) pthread_mutex_unlock(&env_lock_mutex); - } - status = (*tp->funcp)(hdlp, (tp->obj_list + obj_num)->name); - if (status == PSVC_FAILURE && errno != ENODEV) { - char dev_name[32]; - - psvc_get_attr(hdlp, (tp->obj_list + obj_num)->name, - PSVC_LABEL_ATTR, dev_name); - syslog(LOG_ERR, POLICY_FAILED_MSG, tp->routine, dev_name, - (tp->obj_list + obj_num)->name); - syslog(LOG_ERR, "%s", strerror(errno)); - } - - /* The policy is done so set the lock back to ENABLED. */ - (void) pthread_mutex_lock(&env_lock_mutex); - (void) strlcpy(env_lock_state, PSVC_LOCK_ENABLED, LOCK_STRING_MAX); - (void) pthread_mutex_unlock(&env_lock_mutex); -} - -static void run_policies(EInterval_t *ip) -{ - ETask_t *tp; - int32_t i, j; - - do { - if (ip->interval) { - int remaining = ip->interval; - do { - /* check to see if we've been told to exit */ - if (ip->has_thread && (ip->interval == 0)) - break; - remaining = sleep(remaining); - } while (remaining > 0); - } - for (i = 0; i < ip->num_tasks; ++i) { - tp = &ip->task_list[i]; - for (j = 0; j < tp->num_objects; ++j) { - /* check to see if we've been told to exit */ - if (ip->has_thread && (ip->interval == 0)) - break; - lock_and_run(tp, j); - } - if (ip->has_thread && (ip->interval == 0)) - break; - } - } while (ip->interval); -} - -static void thread_setup(EInterval_t *ip) -{ - int32_t status; - - status = pthread_create(&ip->thread, NULL, (void *(*)())run_policies, - ip); - if (status != 0) { - if (debug_flag) - syslog(LOG_ERR, "%s", strerror(errno)); - exit(-1); - } - ip->has_thread = 1; -} - -static int32_t load_policy(const char *library, ETask_t *tp) -{ - tp->hdl = dlopen(library, RTLD_NOW | RTLD_GLOBAL); - if (tp->hdl == NULL) { - if (debug_flag) { - char *errstr = dlerror(); - syslog(LOG_ERR, "%s", errstr); - } - exit(1); - } - tp->funcp = (int32_t (*)(void *, char *))dlsym(tp->hdl, tp->routine); - if (tp->funcp == NULL) { - if (debug_flag) { - char *errstr = dlerror(); - syslog(LOG_ERR, "%s", errstr); - } - exit(1); - } - return (0); -} - -static int32_t get_timeout(FILE *fp, int *timeout) -{ - char buf[BUFSZ]; - char name[32]; - char *cp; - - /* skip blank lines */ - do { - cp = fgets(buf, BUFSZ, fp); - if (cp == NULL) - return (1); - while (isspace(*cp)) - ++cp; - (void) sscanf(buf, "%31s %d", name, timeout); - } while (*cp == 0 || *cp == '\n' || strcmp(name, "TIMEOUT") != 0); - - if (strcmp(name, "TIMEOUT") != 0) { - errno = EINVAL; - return (-1); - } - return (0); - -} - -static int32_t load_interval(FILE *fp, EInterval_t **ipp) -{ - char buf[BUFSZ]; - int32_t found; - EInterval_t *ip; - ETask_t *tp; - int32_t tasks; - int32_t status, i, j; - int32_t interval; - char name[32]; - char *cp; - - /* skip blank lines */ - do { - cp = fgets(buf, BUFSZ, fp); - if (cp == NULL) - return (1); - while (isspace(*cp)) - ++cp; - } while (*cp == 0 || *cp == '\n'); - found = sscanf(buf, "%31s %d %d", name, &interval, &tasks); - if (found != 3) { - errno = EINVAL; - return (-1); - } - - if (strcmp(name, "INTERVAL") != 0) { - errno = EINVAL; - return (-1); - } - - ip = (EInterval_t *)malloc(sizeof (EInterval_t)); - if (ip == NULL) - return (-1); - ip->num_tasks = tasks; - ip->interval = interval; - ip->next = NULL; - ip->has_thread = 0; - - /* allocate and load table */ - ip->task_list = (ETask_t *)malloc(ip->num_tasks * sizeof (ETask_t)); - if (ip->task_list == NULL) - return (-1); - for (i = 0; i < ip->num_tasks; ++i) { - tp = &ip->task_list[i]; - - (void) fgets(buf, BUFSZ, fp); - found = sscanf(buf, "%31s %1023s %63s", - name, library, tp->routine); - if (found != 3) { - errno = EINVAL; - return (-1); - } - - status = load_policy(library, tp); - if (status == -1) - return (-1); - found = fscanf(fp, "%d", &tp->num_objects); - if (found != 1) { - if (debug_flag) - syslog(LOG_ERR, "No list of objects for task"); - errno = EINVAL; - return (-1); - } - tp->obj_list = - (EName_t *)malloc(tp->num_objects * sizeof (EName_t)); - if (tp->obj_list == NULL) - return (-1); - - for (j = 0; j < tp->num_objects; ++j) { - found = fscanf(fp, "%31s", (char *)(tp->obj_list + j)); - if (found != 1) { - if (debug_flag) - syslog(LOG_ERR, - "Wrong number of objects for task"); - errno = EINVAL; - return (-1); - } - } - (void) fgets(buf, BUFSZ, fp); /* reads newline on data line */ - (void) fgets(buf, BUFSZ, fp); - if (strncmp(buf, "TASK_END", 8) != 0) { - if (debug_flag) - syslog(LOG_ERR, "Expected TASK_END, task %s", - tp->routine); - errno = EINVAL; - return (-1); - } - } - - (void) fgets(buf, BUFSZ, fp); - if (strncmp(buf, "INTERVAL_END", 12) != 0) { - if (debug_flag) - syslog(LOG_ERR, "Expected INTERVAL_END"); - errno = EINVAL; - return (-1); - } - - *ipp = ip; - return (0); -} - -void -fini_daemon(void) -{ - EInterval_t *ip; - - /* shut down the threads running the policies */ - for (ip = first_interval; ip != NULL; ip = ip->next) { - if (ip->has_thread) { - /* - * there is a thread for this interval; tell it to stop - * by clearing the interval - */ - ip->interval = 0; - } - } - for (ip = first_interval; ip != NULL; ip = ip->next) { - if (ip->has_thread) { - (void) pthread_join(ip->thread, NULL); - } - } - /* shut down the timer thread */ - while (timer_state != READY) - (void) sched_yield(); - (void) pthread_mutex_lock(&timer_mutex); - timer_state = TIMER_SHUTDOWN; - (void) pthread_cond_signal(&timer_cond); - (void) pthread_mutex_unlock(&timer_mutex); - (void) pthread_join(timer_thread_id, NULL); - (void) pthread_mutex_destroy(&env_lock_mutex); - (void) pthread_mutex_destroy(&timer_mutex); - (void) pthread_cond_destroy(&timer_cond); - (void) sem_destroy(&timer_sem); -} - -void -init_daemon(void) -{ - int32_t intervals = 0; - int32_t threads = 0; - int32_t status; - FILE *fp; - char filename[PATH_MAX]; - char platform[64]; - EInterval_t *ip, *prev; - - if (sysinfo(SI_PLATFORM, platform, sizeof (platform)) == -1) { - if (debug_flag) - syslog(LOG_ERR, "%s", strerror(errno)); - return; - } - - (void) snprintf(filename, sizeof (filename), - "/usr/platform/%s/lib/platsvcd.conf", platform); - if ((fp = fopen(filename, "r")) == NULL) { - if (debug_flag) - syslog(LOG_ERR, "%s", strerror(errno)); - return; - } - - status = get_timeout(fp, &app_timeout); - if (status != 0) { - if (debug_flag) - syslog(LOG_ERR, "%s", strerror(errno)); - return; - } - - status = sem_init(&timer_sem, 0, 1); - if (status == -1) { - if (debug_flag) - syslog(LOG_ERR, "%s", strerror(errno)); - return; - } - - (void) strlcpy(env_lock_state, PSVC_LOCK_ENABLED, LOCK_STRING_MAX); - (void) pthread_mutex_init(&env_lock_mutex, NULL); - (void) pthread_mutex_init(&timer_mutex, NULL); - (void) pthread_cond_init(&timer_cond, NULL); - - timer_state = NOT_READY; - status = pthread_create(&timer_thread_id, NULL, - (void *(*)())timer_thread, 0); - if (status != 0) { - if (debug_flag) - syslog(LOG_ERR, "%s", strerror(errno)); - return; - } - - /* get timer thread running */ - while (timer_state != READY) - (void) sched_yield(); - - for (;;) { - status = load_interval(fp, &ip); - if (status != 0) - break; - - if (first_interval == 0) - first_interval = ip; - else - prev->next = ip; - prev = ip; - - ++intervals; - if (ip->interval == 0) { - run_policies(ip); - } else { - thread_setup(ip); - ++threads; - } - } - if (intervals == 0) { - if (debug_flag) - syslog(LOG_ERR, "ERROR: No policies started"); - return; - } - - if (status == -1) { - if (debug_flag) - syslog(LOG_ERR, "%s", strerror(errno)); - return; - } -} - - -static int32_t count_records(FILE *fp, char *end, uint32_t *countp) -{ - long first_record; - char *ret; - char buf[BUFSZ]; - uint32_t count = 0; - - first_record = ftell(fp); - - while ((ret = fgets(buf, BUFSZ, fp)) != NULL) { - if (strncmp(end, buf, strlen(end)) == 0) - break; - ++count; - } - - if (ret == NULL) { - errno = EINVAL; - return (-1); - } - - (void) fseek(fp, first_record, SEEK_SET); - *countp = count; - return (0); -} - -/* - * Find start of a section within the config file, - * Returns number of records in the section. - * FILE *fd is set to first data record within section. - */ -static int32_t -find_file_section(FILE *fd, char *start) -{ - char *ret; - char buf[BUFSZ]; - char name[32]; - int found; - - (void) fseek(fd, 0, SEEK_SET); - while ((ret = fgets(buf, BUFSZ, fd)) != NULL) { - if (strncmp(start, buf, strlen(start)) == 0) - break; - } - - if (ret == NULL) { - errno = EINVAL; - return (-1); - } - - found = sscanf(buf, "%31s", name); - if (found != 1) { - errno = EINVAL; - return (-1); - } else { - return (0); - } - -} - -static int32_t name_compare_qsort(picl_psvc_t *s1, picl_psvc_t *s2) -{ - return (strcmp(s1->name, s2->name)); -} - -static int32_t name_compare_bsearch(char *s1, picl_psvc_t *s2) -{ - return (strcmp(s1, s2->name)); -} - -/* - * Create a property and add it to the specified node. - * PICL will take a segmentation violation if a volatile property - * has a non-zero size. - */ -static int32_t node_property(picl_nodehdl_t node, - int (*read)(ptree_rarg_t *, void *), - int (*write)(ptree_warg_t *, const void *), picl_prop_type_t type, - unsigned int size, unsigned int accessmode, char *name, void *value) -{ - ptree_propinfo_t propinfo; - picl_prophdl_t prophdl; - int err; - - propinfo.version = PSVC_PLUGIN_VERSION; - if (accessmode & PICL_VOLATILE) { - propinfo.read = read; - propinfo.write = write; - } else { - propinfo.read = NULL; - propinfo.write = NULL; - } - propinfo.piclinfo.type = type; - propinfo.piclinfo.accessmode = accessmode; - propinfo.piclinfo.size = size; - (void) strcpy(propinfo.piclinfo.name, name); - - err = ptree_create_prop(&propinfo, value, &prophdl); - if (err != 0) { - return (err); - } - - err = ptree_add_prop(node, prophdl); - if (err != 0) - return (err); - - return (0); -} - -static void init_err(const char *fmt, char *arg1, char *arg2) -{ - char msg[256]; - - (void) snprintf(msg, sizeof (msg), fmt, arg1, arg2); - syslog(LOG_ERR, "%s", msg); -} - -static int -projected_lookup(picl_prophdl_t proph, struct proj_prop **dstp) -{ - int i; - - for (i = 0; i < proj_prop_count; ++i) { - if (prop_list[i].handle == proph) { - *dstp = &prop_list[i]; - return (PICL_SUCCESS); - } - } - - return (PICL_INVALIDHANDLE); -} - -int -projected_read(ptree_rarg_t *rarg, void *buf) -{ - ptree_propinfo_t propinfo; - struct proj_prop *dstinfo; - int err; - - err = projected_lookup(rarg->proph, &dstinfo); - if (err != 0) { - return (PICL_FAILURE); - } - - - err = ptree_get_propinfo(rarg->proph, &propinfo); - if (err != 0) - return (err); - err = ptree_get_propval_by_name(dstinfo->dst_node, - dstinfo->name, buf, propinfo.piclinfo.size); - if (err != 0) - return (err); - return (PICL_SUCCESS); -} - -int -projected_write(ptree_warg_t *warg, const void *buf) -{ - ptree_propinfo_t propinfo; - struct proj_prop *dstinfo; - int err; - - err = projected_lookup(warg->proph, &dstinfo); - if (err != 0) { - return (PICL_FAILURE); - } - - err = ptree_get_propinfo(warg->proph, &propinfo); - if (err != 0) - return (err); - err = ptree_update_propval_by_name(dstinfo->dst_node, - dstinfo->name, buf, propinfo.piclinfo.size); - if (err != 0) - return (err); - return (PICL_SUCCESS); -} - -int -psvc_read_volatile(ptree_rarg_t *rarg, void *buf) -{ - ptree_propinfo_t propinfo; - char name[32], class[32]; - int err, i; - int32_t attr_num = -1; - int32_t use_attr_num = 0; - - err = ptree_get_propval_by_name(rarg->nodeh, "name", name, - sizeof (name)); - if (err != 0) { - return (err); - } - - err = ptree_get_propval_by_name(rarg->nodeh, "_class", class, - sizeof (class)); - if (err != 0) { - return (err); - } - - err = ptree_get_propinfo(rarg->proph, &propinfo); - if (err != 0) { - return (err); - } - - for (i = 0; i < PICL_PROP_TRANS_COUNT; i++) { - if ((strcmp(class, picl_prop_trans[i].picl_class) == 0) && - (strcmp(propinfo.piclinfo.name, - picl_prop_trans[i].picl_prop) == 0)) { - attr_num = i; - break; - } - } - - if (attr_num == -1) - for (i = 0; i < ATTR_STR_TAB_SIZE; i++) { - if (strcmp(propinfo.piclinfo.name, - attr_str_tab[i]) == 0) { - attr_num = i; - use_attr_num = 1; - break; - } - } - - if (use_attr_num) - err = psvc_get_attr(hdlp, name, attr_num, buf); - else - err = psvc_get_attr(hdlp, name, - picl_prop_trans[attr_num].psvc_prop, - buf); - - if (err != 0) { - return (PICL_FAILURE); - } - return (PICL_SUCCESS); -} - -int -psvc_write_volatile(ptree_warg_t *warg, const void *buf) -{ - ptree_propinfo_t propinfo; - char name[32], class[32]; - int err, i; - int32_t attr_num = -1; - int32_t use_attr_num = 0; - - if (warg->cred.dc_euid != 0) - return (PICL_PERMDENIED); - - err = ptree_get_propval_by_name(warg->nodeh, "name", name, - sizeof (name)); - if (err != 0) { - return (err); - } - - err = ptree_get_propval_by_name(warg->nodeh, "_class", class, - sizeof (class)); - if (err != 0) { - return (err); - } - - err = ptree_get_propinfo(warg->proph, &propinfo); - if (err != 0) { - return (err); - } - - for (i = 0; i < PICL_PROP_TRANS_COUNT; i++) { - if ((strcmp(class, picl_prop_trans[i].picl_class) == 0) && - (strcmp(propinfo.piclinfo.name, - picl_prop_trans[i].picl_prop) == 0)) { - attr_num = i; - break; - } - } - - if (attr_num == -1) - for (i = 0; i < ATTR_STR_TAB_SIZE; i++) { - if (strcmp(propinfo.piclinfo.name, - attr_str_tab[i]) == 0) { - attr_num = i; - use_attr_num = 1; - break; - } - } - - if (use_attr_num) - err = psvc_set_attr(hdlp, name, attr_num, (void *)buf); - else - err = psvc_set_attr(hdlp, name, - picl_prop_trans[attr_num].psvc_prop, - (void *)buf); - - if (err != 0) { - return (PICL_FAILURE); - } - - return (PICL_SUCCESS); -} - -void create_reference_properties(struct assoc_pair *assoc_tbl, int32_t count, - char *assoc_name) -{ - picl_psvc_t *aobjp, *dobjp; - picl_prophdl_t tbl_hdl; - picl_nodehdl_t *dep_list; - ptree_propinfo_t propinfo; - char *funcname = "create_reference_properties"; - char name[PICL_PROPNAMELEN_MAX]; - int32_t i, j, offset; - int32_t dependents; - int32_t err; - char class[PICL_CLASSNAMELEN_MAX]; - - for (i = 0; i < count; ++i) { - /* antecedent */ - aobjp = (picl_psvc_t *)bsearch(assoc_tbl[i].antecedent, - psvc_hdl.objects, psvc_hdl.obj_count, - sizeof (picl_psvc_t), - (int (*)(const void *, const void *)) - name_compare_bsearch); - if (aobjp == NULL) { - init_err(ID_NOT_FOUND_MSG, - funcname, assoc_tbl[i].antecedent); - return; - } - - /* skip if table already created */ - if (ptree_get_propval_by_name(aobjp->node, assoc_name, - &tbl_hdl, sizeof (tbl_hdl)) == 0) { - continue; - } - - /* create a new table */ - err = ptree_create_table(&tbl_hdl); - if (err != 0) { - init_err(PTREE_CREATE_TABLE_FAILED_MSG, - funcname, picl_strerror(err)); - return; - } - - err = node_property(aobjp->node, NULL, NULL, - PICL_PTYPE_TABLE, sizeof (tbl_hdl), PICL_READ, - assoc_name, &tbl_hdl); - if (err != 0) { - init_err(CREATE_PROP_FAILED_MSG, funcname, - picl_strerror(err)); - return; - } - - /* determine number of elements in the table */ - dependents = 0; - for (j = i; j < count; ++j) { - if (strcmp(aobjp->name, assoc_tbl[j].antecedent) == 0) - ++dependents; - } - - dep_list = (picl_nodehdl_t *)malloc(sizeof (picl_nodehdl_t) * - dependents); - if (dep_list == NULL) { - init_err(MALLOC_FAILED_MSG, funcname, strerror(errno)); - return; - } - /* build row of reference properties */ - offset = 0; - for (j = i; j < count; ++j) { - if (strcmp(aobjp->name, assoc_tbl[j].antecedent) != 0) - continue; - - dobjp = (picl_psvc_t *)bsearch(assoc_tbl[j].dependent, - psvc_hdl.objects, - psvc_hdl.obj_count, sizeof (picl_psvc_t), - (int (*)(const void *, const void *)) - name_compare_bsearch); - if (dobjp == NULL) { - init_err(ID_NOT_FOUND_MSG, - funcname, assoc_tbl[j].dependent); - return; - } - - /* - * Reference property name must be - * _classname_propertyname - */ - err = ptree_get_propval_by_name(dobjp->node, - "_class", class, sizeof (class)); - if (err != 0) { - init_err(CLASS_NOT_FOUND_MSG, funcname, - assoc_tbl[j].dependent); - return; - } - (void) snprintf(name, sizeof (name), "_%s_subclass", - class); - - propinfo.version = PSVC_PLUGIN_VERSION; - propinfo.read = NULL; - propinfo.write = NULL; - propinfo.piclinfo.type = PICL_PTYPE_REFERENCE; - propinfo.piclinfo.accessmode = PICL_READ; - propinfo.piclinfo.size = sizeof (picl_nodehdl_t); - (void) strcpy(propinfo.piclinfo.name, name); - - err = ptree_create_prop(&propinfo, &dobjp->node, - dep_list + offset); - if (err != 0) { - init_err(PTREE_CREATE_PROP_FAILED_MSG, - name, picl_strerror(err)); - return; - } - - ++offset; - } - - /* add row to table */ - err = ptree_add_row_to_table(tbl_hdl, dependents, dep_list); - if (err != 0) { - init_err(PTREE_ADD_ROW_FAILED_MSG, funcname, - picl_strerror(err)); - return; - } - - } - - -} - -/* Load projected properties */ -static void -load_projected_properties(FILE *fp) -{ - int32_t found; - ptree_propinfo_t propinfo; - ptree_propinfo_t dstinfo; - picl_prophdl_t src_prophdl, dst_prophdl; - picl_nodehdl_t src_node, dst_node; - int err, i; - picl_psvc_t *srcobjp, *dstobjp; - char src[32], dst[256]; - char src_prop[32], dst_prop[32]; - char buf[BUFSZ]; - char *funcname = "load_projected_properties"; - - if (find_file_section(fp, "PROJECTED_PROPERTIES") != 0) - return; - - if (count_records(fp, "PROJECTED_PROPERTIES_END", &proj_prop_count) != - 0) { - init_err(INVALID_FILE_FORMAT_MSG, funcname, 0); - return; - } - - prop_list = (struct proj_prop *)malloc(sizeof (struct proj_prop) - * proj_prop_count); - if (prop_list == NULL) { - init_err(MALLOC_FAILED_MSG, funcname, strerror(errno)); - return; - } - - for (i = 0; i < proj_prop_count; ++i) { - buf[0] = '\0'; - (void) fgets(buf, BUFSZ, fp); - found = sscanf(buf, "%31s %31s %255s %31s", src, src_prop, dst, - dst_prop); - if (found != 4) { - init_err(INVALID_FILE_FORMAT_MSG, funcname, 0); - return; - } - - /* find src node */ - if (src[0] == '/') { - /* picl node name, outside psvc subtree */ - err = ptree_get_node_by_path(src, &src_node); - if (err != 0) { - init_err(NODE_NOT_FOUND_MSG, funcname, src); - return; - } - } else { - srcobjp = (picl_psvc_t *)bsearch(src, psvc_hdl.objects, - psvc_hdl.obj_count, sizeof (picl_psvc_t), - (int (*)(const void *, const void *)) - name_compare_bsearch); - if (srcobjp == NULL) { - init_err(ID_NOT_FOUND_MSG, funcname, src); - return; - } - src_node = srcobjp->node; - } - - /* find dest node */ - if (dst[0] == '/') { - /* picl node name, outside psvc subtree */ - err = ptree_get_node_by_path(dst, &dst_node); - if (err != 0) { - init_err(NODE_NOT_FOUND_MSG, funcname, dst); - return; - } - prop_list[i].dst_node = dst_node; - } else { - dstobjp = (picl_psvc_t *)bsearch(dst, psvc_hdl.objects, - psvc_hdl.obj_count, sizeof (picl_psvc_t), - (int (*)(const void *, const void *)) - name_compare_bsearch); - if (dstobjp == NULL) { - init_err(ID_NOT_FOUND_MSG, funcname, dst); - return; - } - dst_node = dstobjp->node; - prop_list[i].dst_node = dst_node; - } - - /* determine destination property size */ - err = ptree_get_first_prop(dst_node, &dst_prophdl); - while (err == 0) { - err = ptree_get_propinfo(dst_prophdl, &dstinfo); - if (err != 0) - break; - if (strcmp(dst_prop, dstinfo.piclinfo.name) == 0) - break; - err = ptree_get_next_prop(dst_prophdl, &dst_prophdl); - } - if (err != 0) { - init_err(SIZE_NOT_FOUND_MSG, funcname, dst_prop); - return; - } - - propinfo.version = PSVC_PLUGIN_VERSION; - propinfo.read = projected_read; - propinfo.write = projected_write; - propinfo.piclinfo.type = dstinfo.piclinfo.type; - propinfo.piclinfo.accessmode = - PICL_READ | PICL_WRITE | PICL_VOLATILE; - propinfo.piclinfo.size = dstinfo.piclinfo.size; - (void) strcpy(propinfo.piclinfo.name, src_prop); - - err = ptree_create_prop(&propinfo, 0, &src_prophdl); - if (err != 0) { - init_err(PTREE_CREATE_PROP_FAILED_MSG, funcname, - picl_strerror(err)); - return; - } - - err = ptree_add_prop(src_node, src_prophdl); - if (err != 0) { - init_err(PTREE_ADD_PROP_FAILED_MSG, funcname, - picl_strerror(err)); - return; - } - - prop_list[i].handle = src_prophdl; - (void) strcpy(prop_list[i].name, dst_prop); - - } -} - -/* Load the association table */ -static void load_associations(FILE *fp) -{ - char *funcname = "load_associations"; - uint32_t count; - int found; - int j; - char assoc_name[32]; - struct assoc_pair *assoc_tbl; - char name1[32]; - char buf[BUFSZ]; - - /* - * ignore count in the file, correct count is highest - * association id + 1, now figured when loading ASSOC_STR - * section. - */ - if (find_file_section(fp, "ASSOCIATIONS") != 0) - return; - - buf[0] = '\0'; - (void) fgets(buf, BUFSZ, fp); - while (strncmp("ASSOCIATIONS_END", buf, 16) != 0) { - found = sscanf(buf, "%31s %31s", name1, assoc_name); - if (found != 2) { - init_err(INVALID_FILE_FORMAT_MSG, funcname, 0); - return; - } - - if (count_records(fp, "ASSOCIATION_END", &count) != 0) { - init_err(INVALID_FILE_FORMAT_MSG, funcname, 0); - return; - } - - assoc_tbl = (struct assoc_pair *)malloc( - sizeof (struct assoc_pair) * count); - if (assoc_tbl == NULL) { - init_err(MALLOC_FAILED_MSG, funcname, strerror(errno)); - return; - } - - for (j = 0; j < count; ++j) { - buf[0] = '\0'; - (void) fgets(buf, BUFSZ, fp); - found = sscanf(buf, "%31s %31s", - assoc_tbl[j].antecedent, assoc_tbl[j].dependent); - if (found != 2) { - init_err(INVALID_FILE_FORMAT_MSG, funcname, - 0); - return; - } - - } - buf[0] = '\0'; - (void) fgets(buf, BUFSZ, fp); - if (strncmp(buf, "ASSOCIATION_END", 15) != 0) { - init_err(INVALID_FILE_FORMAT_MSG, funcname, 0); - return; - } - - /* Create separate list of dependents for each antecedent */ - if (strcmp(assoc_name, "PSVC_TABLE") != 0) { - create_reference_properties(assoc_tbl, count, - assoc_name); - } - - free(assoc_tbl); - buf[0] = '\0'; - (void) fgets(buf, BUFSZ, fp); - } - -} - -/* Enviornmental Lock Object's Read and Write routine */ -/* ARGSUSED */ -static int -env_lock_read(ptree_rarg_t *rarg, void *buf) -{ - (void) strlcpy((char *)buf, env_lock_state, LOCK_STRING_MAX); - return (PSVC_SUCCESS); -} - -/* ARGSUSED */ -static int -env_lock_write(ptree_warg_t *warg, const void *buf) -{ - int32_t status = PSVC_SUCCESS; - char *var = (char *)buf; - - /* - * Check to make sure that the value is either Disabled or Enabled - * as these are the only 2 states that this object can be set to. - */ - if ((strcmp(var, PSVC_LOCK_DISABLED) != 0) && - (strcmp(var, PSVC_LOCK_ENABLED) != 0)) { - errno = EINVAL; - return (PSVC_FAILURE); - } - - (void) pthread_mutex_lock(&env_lock_mutex); - - /* - * If the state is already Enabled we can set the state to Disabled - * to stop the policies. - */ - if (strcmp(env_lock_state, PSVC_LOCK_ENABLED) == 0) { - (void) pthread_mutex_unlock(&env_lock_mutex); - status = timed_lock_wait(PSVC_LOCK_DISABLED); - if (status == -1) { - syslog(LOG_ERR, SEM_WAIT_FAILED_MSG); - } - return (status); - } - - /* - * If the state is Running we must go into timed_lock_wait to aquire - * the env_lock. - */ - if (strcmp(env_lock_state, PSVC_LOCK_RUNNING) == 0) { - (void) pthread_mutex_unlock(&env_lock_mutex); - status = timed_lock_wait(PSVC_LOCK_DISABLED); - if (status == -1) { - syslog(LOG_ERR, SEM_WAIT_FAILED_MSG); - } - return (status); - } - - /* - * If the state is already Disabled we need to first check to see if - * we are resetting it to Disabled or changing it to Enabled. If we - * are resetting it to Disabled then we need to stop the timer and - * restart it. If we are changing it to Enabled we just set it to - * enabled. - */ - if (strcmp(env_lock_state, PSVC_LOCK_DISABLED) == 0) { - if (strcmp(var, PSVC_LOCK_DISABLED) == 0) { - (void) pthread_mutex_lock(&timer_mutex); - if (timer_state == ACTIVE) { - timer_state = NOT_READY; - /* stop timer */ - (void) pthread_cond_signal(&timer_cond); - (void) pthread_mutex_unlock(&timer_mutex); - /* wait for timer to reset */ - while (timer_state != READY) - (void) sched_yield(); - (void) pthread_mutex_lock(&timer_mutex); - timer_state = HAVE_REQUEST; - /* restart timer */ - (void) pthread_cond_signal(&timer_cond); - } - (void) pthread_mutex_unlock(&timer_mutex); - } else { - (void) strlcpy(env_lock_state, var, LOCK_STRING_MAX); - } - } - (void) pthread_mutex_unlock(&env_lock_mutex); - return (PSVC_SUCCESS); -} - -static int -init_env_lock_node(picl_nodehdl_t root_node) -{ - int err; - ptree_propinfo_t propinfo; - char *funcname = "init_env_lock_node"; - - /* Here we are creating a Enviornmental Lock Node */ - err = ptree_create_node("/plugins/environmental", "picl", &lock_node); - if (err != PICL_SUCCESS) { - init_err(PTREE_CREATE_NODE_FAILED_MSG, funcname, - picl_strerror(err)); - return (err); - } - - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION_1, - PICL_PTYPE_CHARSTRING, PICL_READ | PICL_WRITE | PICL_VOLATILE, - 32, "State", env_lock_read, env_lock_write); - if (err != PICL_SUCCESS) { - init_err(NODE_PROP_FAILED_MSG, funcname, picl_strerror(err)); - return (err); - } - - err = ptree_create_and_add_prop(lock_node, &propinfo, - NULL, NULL); - if (err != PICL_SUCCESS) { - init_err(PTREE_ADD_PROP_FAILED_MSG, funcname, - picl_strerror(err)); - return (err); - } - - err = ptree_add_node(root_node, lock_node); - if (err != PICL_SUCCESS) { - init_err(PTREE_ADD_NODE_FAILED_MSG, funcname, - picl_strerror(err)); - return (err); - } - - return (PSVC_SUCCESS); -} - -void -psvc_plugin_init(void) -{ - struct classinfo *cp; - picl_nodehdl_t root_node; - picl_nodehdl_t parent_node; - char *funcname = "psvc_plugin_init"; - char platform[32]; - char filename[256]; - char buf[BUFSZ]; - int32_t i, j; - int err, found; - - psvc_paths = NULL; - psvc_hdl.obj_count = 0; - psvc_hdl.objects = NULL; - psvc_hdl.fp = NULL; - first_interval = NULL; - - /* - * So the volatile read/write routines can retrieve data from - * psvc or picl - */ - err = psvc_init(&hdlp); - if (err != 0) { - init_err(PSVC_INIT_ERR_MSG, funcname, strerror(errno)); - } - - if (sysinfo(SI_PLATFORM, platform, sizeof (platform)) == -1) { - init_err(SYSINFO_FAILED_MSG, funcname, 0); - return; - } - - (void) snprintf(filename, sizeof (filename), - "/usr/platform/%s/lib/psvcobj.conf", platform); - if ((psvc_hdl.fp = fopen(filename, "r")) == NULL) { - init_err(FILE_OPEN_FAILED_MSG, funcname, filename); - return; - } - - /* Create all PICL nodes */ - if (find_file_section(psvc_hdl.fp, "OBJECT_INFO") == -1) { - init_err(INVALID_FILE_FORMAT1_MSG, funcname, filename); - return; - } - if (count_records(psvc_hdl.fp, "OBJECT_INFO_END", &psvc_hdl.obj_count) - == -1) { - init_err(INVALID_FILE_FORMAT1_MSG, funcname, filename); - return; - } - if ((psvc_hdl.objects = (picl_psvc_t *)malloc(sizeof (picl_psvc_t) * - psvc_hdl.obj_count)) == NULL) { - init_err(MALLOC_FAILED_MSG, funcname, strerror(errno)); - return; - } - (void) memset(psvc_hdl.objects, 0, - sizeof (picl_psvc_t) * psvc_hdl.obj_count); - - err = ptree_get_root(&root_node); - if (err != 0) { - init_err(PTREE_GET_ROOT_FAILED_MSG, funcname, - picl_strerror(err)); - return; - } - - /* Following array is accessed directly by the psvc policies. */ - psvc_paths = (psvc_name_t *)malloc(sizeof (psvc_name_t) * - psvc_hdl.obj_count); - psvc_picl_nodes = psvc_hdl.obj_count; - if (psvc_paths == NULL) { - init_err(MALLOC_FAILED_MSG, funcname, strerror(errno)); - return; - } - for (i = 0; i < psvc_hdl.obj_count; ++i) { - char *start; - int32_t class; - int32_t subclass; - int32_t cp_count; - picl_psvc_t *objp = &psvc_hdl.objects[i]; - buf[0] = '\0'; - (void) fgets(buf, BUFSZ, psvc_hdl.fp); - if (strncmp(buf, "OBJECT_INFO_END", 15) == 0) - break; - - start = strrchr(buf, '/'); - if (start == NULL) { - init_err(INVALID_FILE_FORMAT1_MSG, funcname, - filename); - return; - } - found = sscanf(start + 1, "%31s", objp->name); - if (found != 1) { - init_err(INVALID_FILE_FORMAT1_MSG, funcname, - filename); - return; - } - - /* get class */ - err = psvc_get_attr(hdlp, objp->name, PSVC_CLASS_ATTR, &class); - if (err != PSVC_SUCCESS) { - init_err(CLASS_NOT_FOUND_MSG, funcname, objp->name); - return; - } - if (class > NUM_CLASSES) { - init_err(UNKNOWN_CLASS_MSG, funcname, 0); - return; - } - - err = psvc_get_attr(hdlp, objp->name, PSVC_SUBCLASS_ATTR, - &subclass); - if (err != PSVC_SUCCESS) { - init_err(SUBCLASS_NOT_FOUND_MSG, funcname, objp->name); - return; - } - - err = ptree_create_node(objp->name, class_name[class], - &objp->node); - if (err != 0) { - init_err(PTREE_CREATE_NODE_FAILED_MSG, funcname, - picl_strerror(err)); - return; - } - if (strcmp(objp->name, PSVC_CHASSIS) == 0) - system_node = objp->node; - - for (j = 0; j < COMMON_COUNT; ++j) { - - err = node_property(objp->node, - common[j].access & PICL_READ ? - psvc_read_volatile : 0, - common[j].access & PICL_WRITE ? - psvc_write_volatile : 0, - common[j].type, common[j].size, - common[j].access, common[j].name, 0); - if (err != PSVC_SUCCESS) { - init_err(NODE_PROP_FAILED_MSG, funcname, - picl_strerror(err)); - return; - } - } - cp = &class_properties[class]; - /* Locator LED Support */ - if (class == 2 && subclass == 2) { - cp_count = 3; - } else { - cp_count = cp->count; - } - - for (j = 0; j < cp_count; ++j) { - err = node_property(objp->node, psvc_read_volatile, - psvc_write_volatile, cp->props[j].type, - cp->props[j].size, - cp->props[j].access, cp->props[j].name, 0); - if (err != PSVC_SUCCESS) { - init_err(NODE_PROP_FAILED_MSG, funcname, - picl_strerror(err)); - return; - } - } - - /* Link the nodes into the PICL tree */ - *start = 0; - if (start == buf) { /* no parent */ - parent_node = root_node; - } else { - err = ptree_get_node_by_path(buf, &parent_node); - if (err != PICL_SUCCESS) { - init_err(NODE_NOT_FOUND_MSG, funcname, buf); - return; - } - } - - err = ptree_add_node(parent_node, objp->node); - if (err != PICL_SUCCESS) { - init_err(PTREE_ADD_NODE_FAILED_MSG, funcname, - picl_strerror(err)); - return; - } - (void) strcpy(psvc_paths[i].parent_path, buf); - (void) strcpy(psvc_paths[i].child_name, objp->name); - psvc_paths[i].child_node = objp->node; - } - - qsort(psvc_hdl.objects, psvc_hdl.obj_count, sizeof (picl_psvc_t), - (int (*)(const void *, const void *))name_compare_qsort); - - load_associations(psvc_hdl.fp); - load_projected_properties(psvc_hdl.fp); - - if (init_env_lock_node(root_node) != PSVC_SUCCESS) - return; - - init_daemon(); -} - -void -psvc_plugin_fini(void) -{ - int32_t i; - EInterval_t *ip, *next; - - fini_daemon(); - for (ip = first_interval; ip != 0; ip = next) { - for (i = 0; i < ip->num_tasks; ++i) { - (void) dlclose(ip->task_list[i].hdl); - free(ip->task_list[i].obj_list); - } - free(ip->task_list); - next = ip->next; - free(ip); - } - free(prop_list); - free(psvc_paths); - free(psvc_hdl.objects); - if (psvc_hdl.fp != NULL) - (void) fclose(psvc_hdl.fp); - psvc_fini(hdlp); -} - -void -psvc_plugin_register(void) -{ - picld_plugin_register(&psvc_reg); -} diff --git a/usr/src/cmd/picl/plugins/sun4u/psvc/psvcpolicy/Makefile b/usr/src/cmd/picl/plugins/sun4u/psvc/psvcpolicy/Makefile deleted file mode 100644 index f0422e82b0..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/psvc/psvcpolicy/Makefile +++ /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. -# -# ident "%Z%%M% %I% %E% SMI" -# -# cmd/picl/plugins/sun4u/psvc/psvcpolicy/Makefile -# -LIBRARY= libpsvcpolicy.a -VERS= .1 - -OBJECTS= psvcpolicy.o - -# include library definitions -include $(SRC)/lib/Makefile.lib -include $(SRC)/Makefile.psm - -include $(SRC)/cmd/picl/plugins/Makefile.com - -SRCS= $(OBJECTS:%.o=%.c) - -LIBS = $(DYNLIB) - -PLATFORM = sun4u - -USR_PLAT_PSVCPOL = $(LIBS:%=$(USR_PSM_LIB_DIR)/%) - -CPPFLAGS += -I$(SRC)/uts/sun4u -CPPFLAGS += -I$(SRC)/cmd/picl/plugins/sun4u/psvc/psvcobj - -ZDEFS = -LDLIBS += $(ZNODEFS) -LDLIBS += -L$(SRC)/lib/libpicl/$(MACH) -L$(SRC)/lib/libpicltree/$(MACH) -LDLIBS += -L$(SRC)/cmd/picl/plugins/sun4u/psvc/psvcobj -LDLIBS += -L$(SRC)/cmd/picl/plugins/sun4u/psvc/psvcplugin -LDLIBS += -lc -lpsvcobj -lpsvcplugin -lpicltree - -DYNFLAGS += -Wl,-f/usr/platform/\$$PLATFORM/lib/$(DYNLIBPSR) -DYNFLAGS += -R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins:/usr/platform/sun4u/lib - -.KEEP_STATE: - -SUBDIRS= - -POFILE= psvcpolicy.po - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -all: $(LIBS) $(LIBLINKS) - -install: all $(USR_PLAT_PSVCPOL) - -$(LIBLINKS): FRC - $(RM) $(LIBLINKS); $(SYMLINK) $(DYNLIB) $(LIBLINKS) - - -# include library targets -include $(SRC)/cmd/picl/plugins/Makefile.targ -include $(SRC)/lib/Makefile.targ - -_msg: $(MSGDOMAIN) $(POFILE) - $(RM) $(MSGDOMAIN)/$(POFILE) - $(CP) $(POFILE) $(MSGDOMAIN)/$(POFILE) - -$(MSGDOMAIN): - $(INS.dir) - -$(USR_PSM_LIB_DIR)/%: % $(USR_PSM_LIB_DIR) - $(INS.file) ;\ - $(RM) -r $(USR_PSM_LIB_DIR)/libpsvcpolicy.so; \ - $(SYMLINK) ./libpsvcpolicy.so$(VERS) $(USR_PSM_LIB_DIR)/libpsvcpolicy.so - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/psvc/psvcpolicy/psvcpolicy.c b/usr/src/cmd/picl/plugins/sun4u/psvc/psvcpolicy/psvcpolicy.c deleted file mode 100644 index 2dd40aea7f..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/psvc/psvcpolicy/psvcpolicy.c +++ /dev/null @@ -1,1398 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - -/* - * This file contains routines to support the Platform Services Plugin - * These routines implement the platform independent environment monitoring - * and control policies that may be invoked by a daemon thread within - * the plugin - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define LOWTEMP_CRITICAL_MSG \ - gettext("CRITICAL : LOW TEMPERATURE DETECTED %d, %s") -#define LOWTEMP_WARNING_MSG \ - gettext("WARNING : LOW TEMPERATURE DETECTED %d, %s") -#define HIGHTEMP_CRITICAL_MSG \ - gettext("CRITICAL : HIGH TEMPERATURE DETECTED %d, %s") -#define HIGHTEMP_WARNING_MSG \ - gettext("WARNING : HIGH TEMPERATURE DETECTED %d, %s") -#define DEVICE_INSERTED_MSG gettext("Device %s inserted") -#define DEVICE_REMOVED_MSG gettext("Device %s removed") -#define DEVICE_FAILURE_MSG \ - gettext("CRITICAL: Device %s failure detected by sensor %s\n") -#define DEVICE_OK_MSG gettext("Device %s OK") -#define SECONDARY_FAN_FAIL_MSG gettext("Secondary fan failure, device %s") -#define KEYSWITCH_POS_READ_FAILED_MSG \ - gettext("Keyswitch position could not be determined") -#define KEYSWITCH_POS_CHANGED_MSG gettext("Keyswitch position changed to %s") -#define GET_PRESENCE_FAILED_MSG \ - gettext("Failed to get presence attribute, id = %s, errno = %d\n") -#define GET_SENSOR_FAILED_MSG \ - gettext("Failed to get sensor value, id = %s, errno = %d\n") -#define PS_OVER_CURRENT_MSG \ - gettext("WARNING: Power Supply overcurrent detected for %s\n") -#define SET_LED_FAILED_MSG \ - gettext("Failed to set LED state, id = %s, errno = %d\n") -#define SET_FANSPEED_FAILED_MSG \ - gettext("Failed to set fan speed, id = %s, errno = %d\n") -#define FAN_MISSING_MSG \ - gettext("WARNING: Fan missing, id = %s\n") -#define TEMP_SENSOR_FAULT \ - gettext("WARNING: Temperature Sensor %s returning faulty temp\n") -#define TEMP_OFFSET 17 - -static char *shutdown_string = "shutdown -y -g 60 -i 5 \"OVERTEMP condition\""; - -static int cpus_online = 0; - -typedef struct seg_desc { - int32_t segdesc; - int16_t segoffset; - int16_t seglength; -} seg_desc_t; - -static int32_t threshold_names[] = { - PSVC_HW_LO_SHUT_ATTR, - PSVC_LO_SHUT_ATTR, - PSVC_LO_WARN_ATTR, - PSVC_NOT_USED, /* LOW MODE which is not used */ - PSVC_OPTIMAL_TEMP_ATTR, - PSVC_HI_WARN_ATTR, - PSVC_HI_SHUT_ATTR, - PSVC_HW_HI_SHUT_ATTR -}; - -/* - * The I2C bus is noisy, and the state may be incorrectly reported as - * having changed. When the state changes, we attempt to confirm by - * retrying. If any retries indicate that the state has not changed, we - * assume the state change(s) were incorrect and the state has not changed. - * The following variables are used to store the tuneable values read in - * from the optional i2cparam.conf file for this shared object library. - */ -static int n_read_temp = PSVC_THRESHOLD_COUNTER; -static int n_retry_keyswitch = PSVC_NUM_OF_RETRIES; -static int retry_sleep_keyswitch = 1; -static int n_retry_hotplug = PSVC_NUM_OF_RETRIES; -static int retry_sleep_hotplug = 1; -static int n_retry_fan_hotplug = PSVC_NUM_OF_RETRIES; -static int retry_sleep_fan_hotplug = 1; -static int n_retry_fan_present = PSVC_NUM_OF_RETRIES; -static int retry_sleep_fan_present = 1; - -typedef struct { - int *pvar; - char *texttag; -} i2c_noise_param_t; - -static i2c_noise_param_t i2cparams_sun4u[] = { - &n_read_temp, "n_read_temp", - &n_retry_keyswitch, "n_retry_keyswitch", - &retry_sleep_keyswitch, "retry_sleep_keyswitch", - &n_retry_hotplug, "n_retry_hotplug", - &retry_sleep_hotplug, "retry_sleep_hotplug", - &n_retry_fan_hotplug, "n_retry_fan_hotplug", - &retry_sleep_fan_hotplug, "retry_sleep_fan_hotplug", - &n_retry_fan_present, "n_retry_fan_present", - &retry_sleep_fan_present, "retry_sleep_fan_present", - NULL, NULL -}; - -#pragma init(i2cparams_sun4u_load) - -static void -i2cparams_sun4u_debug(i2c_noise_param_t *pi2cparams, int usingDefaults) -{ - char s[128]; - i2c_noise_param_t *p; - - if (!usingDefaults) { - (void) strncpy(s, - "# Values from /usr/platform/sun4u/lib/i2cparam.conf\n", - sizeof (s) - 1); - syslog(LOG_WARNING, "%s", s); - } else { - /* no file - we're using the defaults */ - (void) strncpy(s, -"# No /usr/platform/sun4u/lib/i2cparam.conf file, using defaults\n", - sizeof (s) - 1); - } - (void) fputs(s, stdout); - p = pi2cparams; - while (p->pvar != NULL) { - (void) snprintf(s, sizeof (s), "%s %d\n", p->texttag, - *(p->pvar)); - if (!usingDefaults) - syslog(LOG_WARNING, "%s", s); - (void) fputs(s, stdout); - p++; - } -} - -static void -i2cparams_sun4u_load(void) -{ - FILE *fp; - char *filename = "/usr/platform/sun4u/lib/i2cparam.conf"; - char s[128]; - char var[128]; - int val; - i2c_noise_param_t *p; - - /* read thru the i2cparam.conf file and set variables */ - if ((fp = fopen(filename, "r")) != NULL) { - while (fgets(s, sizeof (s), fp) != NULL) { - if (s[0] == '#') /* skip comment lines */ - continue; - /* try to find a string match and get the value */ - if (sscanf(s, "%127s %d", var, &val) != 2) - continue; - if (val < 1) - val = 1; /* clamp min value */ - p = &(i2cparams_sun4u[0]); - while (p->pvar != NULL) { - if (strncmp(p->texttag, var, sizeof (var)) == - 0) { - *(p->pvar) = val; - break; - } - p++; - } - } - (void) fclose(fp); - } - /* output the values of the parameters */ - i2cparams_sun4u_debug(&(i2cparams_sun4u[0]), ((fp == NULL)? 1 : 0)); -} - - -int32_t -psvc_update_thresholds_0(psvc_opaque_t hdlp, char *id) -{ - int32_t status = PSVC_SUCCESS; - fru_info_t fru_data; - char *fru, seg_name[2]; - int8_t seg_count, temp_array[8]; - int32_t match_count, i, j, seg_desc_start = 0x1806, temp_address; - int32_t seg_found, temp; - boolean_t present; - seg_desc_t segment; - - status = psvc_get_attr(hdlp, id, PSVC_PRESENCE_ATTR, &present); - if ((status != PSVC_SUCCESS) || (present != PSVC_PRESENT)) - return (status); - - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_MATCHES_ATTR, &match_count, - PSVC_FRU); - if (status == PSVC_FAILURE) - return (status); - - for (i = 0; i < match_count; i++) { - seg_found = 0; - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_ID_ATTR, - &fru, PSVC_FRU, i); - if (status != PSVC_SUCCESS) - return (status); - - fru_data.buf_start = 0x1805; - fru_data.buf = (char *)&seg_count; - fru_data.read_size = 1; - - status = psvc_get_attr(hdlp, fru, PSVC_FRU_INFO_ATTR, - &fru_data); - if (status != PSVC_SUCCESS) { - return (status); - } - for (j = 0; (j < seg_count) && (!seg_found); j++) { - fru_data.buf_start = seg_desc_start; - fru_data.buf = seg_name; - fru_data.read_size = 2; - - status = psvc_get_attr(hdlp, fru, PSVC_FRU_INFO_ATTR, - &fru_data); - - seg_desc_start = seg_desc_start + 2; - fru_data.buf_start = seg_desc_start; - fru_data.buf = (char *)&segment; - fru_data.read_size = sizeof (seg_desc_t); - - status = psvc_get_attr(hdlp, fru, PSVC_FRU_INFO_ATTR, - &fru_data); - if (status != PSVC_SUCCESS) { - syslog(LOG_ERR, - "Failed psvc_get_attr for FRU info\n"); - return (status); - } - seg_desc_start = seg_desc_start + sizeof (seg_desc_t); - if (memcmp(seg_name, "SC", 2) == 0) - seg_found = 1; - } - if (seg_found) { - temp_address = segment.segoffset + TEMP_OFFSET; - fru_data.buf_start = temp_address; - fru_data.buf = (char *)&temp_array; - fru_data.read_size = sizeof (temp_array); - status = psvc_get_attr(hdlp, fru, PSVC_FRU_INFO_ATTR, - &fru_data); - if (status != PSVC_SUCCESS) { - syslog(LOG_ERR, - "Failed psvc_get_attr for FRU info\n"); - return (status); - } else { - for (j = 0; j < sizeof (temp_array); j++) { - if (threshold_names[j] == PSVC_NOT_USED) - continue; - temp = temp_array[j]; - status = psvc_set_attr(hdlp, id, - threshold_names[j], &temp); - if (status != PSVC_SUCCESS) { - return (status); - } - } - } - } else { - syslog(LOG_ERR, "No FRU Information for %s" - " using default temperatures\n", id); - } - } - return (status); -} - -#define MAX_TEMP_SENSORS 256 - -static int32_t -check_temp(psvc_opaque_t hdlp, char *id, int32_t silent) -{ - int32_t lo_warn, hi_warn, lo_shut, hi_shut; - uint64_t features; - int32_t temp; - char previous_state[32]; - char led_state[32]; - char state[32]; - char fault[32]; - char label[32]; - boolean_t pr; - int32_t status = PSVC_SUCCESS; - int8_t fail = 0; - static int threshold_low_shut[MAX_TEMP_SENSORS] = {0}; - static int threshold_high_shut[MAX_TEMP_SENSORS] = {0}; - static int threshold_low_warn[MAX_TEMP_SENSORS] = {0}; - static int threshold_high_warn[MAX_TEMP_SENSORS] = {0}; - int32_t instance; - - status = psvc_get_attr(hdlp, id, PSVC_INSTANCE_ATTR, &instance); - if (status != PSVC_SUCCESS) - return (status); - - status = psvc_get_attr(hdlp, id, PSVC_PRESENCE_ATTR, &pr); - if ((status != PSVC_SUCCESS) || (pr != PSVC_PRESENT)) { - return (status); - } - - status = psvc_get_attr(hdlp, id, PSVC_STATE_ATTR, state); - if (status == PSVC_FAILURE) - return (status); - - if ((strcmp(state, PSVC_HOTPLUGGED) == 0)) { - return (PSVC_SUCCESS); - } - - status = psvc_get_attr(hdlp, id, PSVC_FEATURES_ATTR, &features); - if (status != PSVC_SUCCESS) - return (status); - - status = psvc_get_attr(hdlp, id, PSVC_LO_WARN_ATTR, &lo_warn); - if (status != PSVC_SUCCESS) - return (status); - - status = psvc_get_attr(hdlp, id, PSVC_LO_SHUT_ATTR, &lo_shut); - if (status != PSVC_SUCCESS) - return (status); - - status = psvc_get_attr(hdlp, id, PSVC_HI_WARN_ATTR, &hi_warn); - if (status != PSVC_SUCCESS) - return (status); - - status = psvc_get_attr(hdlp, id, PSVC_HI_SHUT_ATTR, &hi_shut); - if (status != PSVC_SUCCESS) - return (status); - - status = psvc_get_attr(hdlp, id, PSVC_SENSOR_VALUE_ATTR, &temp); - if (status != PSVC_SUCCESS) { - return (status); - } - - /* - * The following code is to check to see if the temp sensor is - * returning a faulty reading due to it either being bad or the - * CPU being powered off for some reason. Is so we will alert the user - * and just label the sensor bad but not the WHOLE CPU module. - */ - if ((temp == 127) && (strcmp(state, PSVC_ERROR) != 0)) { - status = psvc_set_attr(hdlp, id, PSVC_STATE_ATTR, PSVC_ERROR); - if (status != PSVC_SUCCESS) - return (status); - status = psvc_set_attr(hdlp, id, PSVC_FAULTID_ATTR, - PSVC_GEN_FAULT); - if (status != PSVC_SUCCESS) - return (status); - syslog(LOG_ERR, TEMP_SENSOR_FAULT, id); - return (status); - } - - status = psvc_get_attr(hdlp, id, PSVC_LABEL_ATTR, label); - if (status != PSVC_SUCCESS) - return (status); - - /* - * if any of the four temperature states (lo_shut, lo_warn, - * hi_shut, hi_warn) is detected we will not take an action - * until the number of similar back-to-back readings equals - * 'n_read_temp' (default is PSVC_THRESHOLD_COUNTER). - */ - if ((features & PSVC_LOW_SHUT) && temp < lo_shut) { - /* - * once we are in one state, clear all the - * counters for the other three states since - * back-to-back readings of these other three - * states could not happen anymore. - */ - threshold_low_warn[instance] = 0; - threshold_high_shut[instance] = 0; - threshold_high_warn[instance] = 0; - threshold_low_shut[instance]++; - if (threshold_low_shut[instance] == n_read_temp) { - threshold_low_shut[instance] = 0; - fail = 1; - strcpy(state, PSVC_ERROR); - strcpy(fault, PSVC_TEMP_LO_SHUT); - strcpy(led_state, PSVC_LED_ON); - if (silent == 0) - syslog(LOG_ERR, LOWTEMP_CRITICAL_MSG, - temp, label); - } else { /* Threshold for showing error not reached */ - return (PSVC_SUCCESS); - } - } else if ((features & PSVC_LOW_WARN) && temp < lo_warn) { - threshold_low_shut[instance] = 0; - threshold_high_shut[instance] = 0; - threshold_high_warn[instance] = 0; - threshold_low_warn[instance]++; - if (threshold_low_warn[instance] == n_read_temp) { - threshold_low_warn[instance] = 0; - fail = 1; - strcpy(state, PSVC_ERROR); - strcpy(fault, PSVC_TEMP_LO_WARN); - strcpy(led_state, PSVC_LED_ON); - if (silent == 0) - syslog(LOG_ERR, LOWTEMP_WARNING_MSG, - temp, label); - } else { /* Threshold for showing error not reached */ - return (PSVC_SUCCESS); - } - } else if ((features & PSVC_HIGH_SHUT) && temp > hi_shut) { - threshold_low_warn[instance] = 0; - threshold_low_shut[instance] = 0; - threshold_high_warn[instance] = 0; - threshold_high_shut[instance]++; - if (threshold_high_shut[instance] == n_read_temp) { - threshold_high_shut[instance] = 0; - fail = 1; - strcpy(state, PSVC_ERROR); - strcpy(fault, PSVC_TEMP_HI_SHUT); - strcpy(led_state, PSVC_LED_ON); - if (silent == 0) - syslog(LOG_ERR, HIGHTEMP_CRITICAL_MSG, - temp, label); - } else { /* Threshold for showing error not reached */ - return (PSVC_SUCCESS); - } - } else if ((features & PSVC_HIGH_WARN) && temp > hi_warn) { - threshold_low_warn[instance] = 0; - threshold_low_shut[instance] = 0; - threshold_high_shut[instance] = 0; - threshold_high_warn[instance]++; - if (threshold_high_warn[instance] == n_read_temp) { - threshold_high_warn[instance] = 0; - fail = 1; - strcpy(state, PSVC_ERROR); - strcpy(fault, PSVC_TEMP_HI_WARN); - strcpy(led_state, PSVC_LED_ON); - if (silent == 0) - syslog(LOG_ERR, HIGHTEMP_WARNING_MSG, - temp, label); - } else { /* Threshold for showing error not reached */ - return (PSVC_SUCCESS); - } - } - - /* - * If we reached this point then that means that we are either - * okay, or we have showed error n_read_temp times. - */ - if (fail != 1) { - /* within limits */ - strcpy(state, PSVC_OK); - strcpy(fault, PSVC_NO_FAULT); - strcpy(led_state, PSVC_LED_OFF); - } - - status = psvc_set_attr(hdlp, id, PSVC_STATE_ATTR, state); - if (status != PSVC_SUCCESS) - return (status); - status = psvc_set_attr(hdlp, id, PSVC_FAULTID_ATTR, fault); - if (status != PSVC_SUCCESS) - return (status); - status = psvc_get_attr(hdlp, id, PSVC_PREV_STATE_ATTR, - previous_state); - if (status != PSVC_SUCCESS) - return (status); - - if (strcmp(previous_state, state) != 0) { - char *led_id; - int32_t led_count; - int32_t i; - - /* change state of fault LEDs */ - psvc_get_attr(hdlp, id, PSVC_ASSOC_MATCHES_ATTR, &led_count, - PSVC_TS_OVERTEMP_LED); - for (i = 0; i < led_count; ++i) { - status = psvc_get_attr(hdlp, id, - PSVC_ASSOC_ID_ATTR, &led_id, - PSVC_TS_OVERTEMP_LED, i); - if (status == PSVC_FAILURE) - return (status); - status = psvc_set_attr(hdlp, led_id, - PSVC_LED_STATE_ATTR, led_state); - if (status == PSVC_FAILURE) - return (status); - } - } - - return (PSVC_SUCCESS); -} - -int32_t -psvc_check_temperature_policy_0(psvc_opaque_t hdlp, char *id) -{ - return (check_temp(hdlp, id, 0)); -} - -int32_t -psvc_check_temperature_silent_policy_0(psvc_opaque_t hdlp, char *id) -{ - return (check_temp(hdlp, id, 1)); -} - -int32_t -psvc_fan_enable_disable_policy_0(psvc_opaque_t hdlp, char *id) -{ - char state[32], previous_state[32]; - char *backup_fan; - int32_t status = PSVC_SUCCESS; - uint64_t features; - char label[32]; - boolean_t presence; - boolean_t enable; - int retry; - - status = psvc_get_attr(hdlp, id, PSVC_FEATURES_ATTR, &features); - if (status != PSVC_SUCCESS) - return (status); - - retry = 0; - do { - if (retry) - (void) sleep(retry_sleep_fan_present); - - status = psvc_get_attr(hdlp, id, PSVC_PRESENCE_ATTR, &presence); - if (status != PSVC_SUCCESS) - return (status); - retry++; - } while ((retry < n_retry_fan_present) && (presence == PSVC_ABSENT)); - - if (presence == PSVC_ABSENT) { - status = psvc_get_attr(hdlp, id, PSVC_LABEL_ATTR, label); - if (status != PSVC_SUCCESS) - return (status); - - status = psvc_get_attr(hdlp, id, PSVC_ENABLE_ATTR, &enable); - if (status != PSVC_SUCCESS) - return (status); - - if (features & PSVC_DEV_PRIMARY) { - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_ID_ATTR, - &backup_fan, PSVC_ALTERNATE, 0); - if (status != PSVC_SUCCESS) - return (status); - - enable = PSVC_DISABLED; - status = psvc_set_attr(hdlp, id, PSVC_ENABLE_ATTR, - &enable); - if (status != PSVC_SUCCESS) - return (status); - - enable = PSVC_ENABLED; - status = psvc_set_attr(hdlp, backup_fan, - PSVC_ENABLE_ATTR, &enable); - if (status != PSVC_SUCCESS) - return (status); - } else { - enable = PSVC_DISABLED; - status = psvc_set_attr(hdlp, id, PSVC_ENABLE_ATTR, - &enable); - if (status != PSVC_SUCCESS) - return (status); - } - return (PSVC_SUCCESS); - } - - /* device was present */ - status = psvc_get_attr(hdlp, id, PSVC_STATE_ATTR, state); - if (status != PSVC_SUCCESS) - return (status); - - status = psvc_get_attr(hdlp, id, PSVC_PREV_STATE_ATTR, previous_state); - if (status != PSVC_SUCCESS) - return (status); - - if (features & PSVC_DEV_PRIMARY) { - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_ID_ATTR, - &backup_fan, PSVC_ALTERNATE, 0); - if (status != PSVC_SUCCESS) - return (status); - - if (strcmp(state, PSVC_OK) == 0) { - enable = PSVC_ENABLED; - status = psvc_set_attr(hdlp, id, PSVC_ENABLE_ATTR, - &enable); - if (status != PSVC_SUCCESS) - return (status); - - enable = PSVC_DISABLED; - status = psvc_set_attr(hdlp, backup_fan, - PSVC_ENABLE_ATTR, &enable); - if (status != PSVC_SUCCESS) - return (status); - } - if ((strcmp(state, PSVC_ERROR) == 0) && - (strcmp(previous_state, PSVC_ERROR) != 0)) { - enable = PSVC_DISABLED; - status = psvc_set_attr(hdlp, id, PSVC_ENABLE_ATTR, - &enable); - if (status != PSVC_SUCCESS) - return (status); - - enable = PSVC_ENABLED; - status = psvc_set_attr(hdlp, backup_fan, - PSVC_ENABLE_ATTR, &enable); - if (status != PSVC_SUCCESS) - return (status); - } - } else { - if ((strcmp(state, PSVC_ERROR) == 0) && - (strcmp(previous_state, PSVC_ERROR) != 0)) { - status = psvc_get_attr(hdlp, id, PSVC_LABEL_ATTR, - label); - if (status != PSVC_SUCCESS) - return (status); - syslog(LOG_ERR, SECONDARY_FAN_FAIL_MSG, label); - } - } - return (status); -} - -/* - * psvc_switch_fan_onoff_policy_0 - * Turn a fan on if it is enabled, turn it off if it is disabled. - */ -int32_t -psvc_switch_fan_onoff_policy_0(psvc_opaque_t hdlp, char *id) -{ - boolean_t enable; - char *switchid; - char state[32]; - int32_t status = PSVC_SUCCESS; - - status = psvc_get_attr(hdlp, id, PSVC_ENABLE_ATTR, &enable); - if (status != PSVC_SUCCESS) - return (status); - - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_ID_ATTR, &switchid, - PSVC_FAN_ONOFF_SENSOR, 0); - if (status != PSVC_SUCCESS) - return (status); - - if (enable == PSVC_DISABLED) { - strcpy(state, PSVC_SWITCH_OFF); - } else { - strcpy(state, PSVC_SWITCH_ON); - } - - status = psvc_set_attr(hdlp, switchid, PSVC_SWITCH_STATE_ATTR, state); - return (status); -} - -static int32_t -check_cpu_temp_fault(psvc_opaque_t hdlp, char *cpu, int32_t cpu_count) -{ - char *sensorid; - int32_t sensor_count; - int32_t status = PSVC_SUCCESS; - int32_t i; - uint64_t features; - char fault[32]; - - status = psvc_get_attr(hdlp, cpu, PSVC_FEATURES_ATTR, &features); - if (status == PSVC_FAILURE) - return (status); - - psvc_get_attr(hdlp, cpu, PSVC_ASSOC_MATCHES_ATTR, &sensor_count, - PSVC_DEV_TEMP_SENSOR); - for (i = 0; i < sensor_count; ++i) { - status = psvc_get_attr(hdlp, cpu, PSVC_ASSOC_ID_ATTR, - &sensorid, PSVC_DEV_TEMP_SENSOR, i); - if (status == PSVC_FAILURE) - return (status); - - status = psvc_get_attr(hdlp, sensorid, PSVC_FAULTID_ATTR, - fault); - if (status == PSVC_FAILURE) - return (status); - - if ((strcmp(fault, PSVC_TEMP_HI_SHUT) == 0) || - (strcmp(fault, PSVC_TEMP_LO_SHUT) == 0)) { - if (cpu_count == 1 || cpus_online == 1 || - !(features & PSVC_DEV_HOTPLUG)) { - system(shutdown_string); - } else { - /* FIX offline cpu */ - --cpus_online; - } - } - } - - return (status); -} - -int32_t -psvc_shutdown_policy_0(psvc_opaque_t hdlp, char *id) -{ - int32_t cpu_count; - char *cpuid; - int32_t i; - boolean_t present; - int32_t status = PSVC_SUCCESS; - - if (cpus_online == 0) { - /* obviously, zero isn't correct, count present cpu's */ - psvc_get_attr(hdlp, id, PSVC_ASSOC_MATCHES_ATTR, &cpu_count, - PSVC_CPU); - for (i = 0; i < cpu_count; ++i) { - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_ID_ATTR, - &cpuid, PSVC_CPU, i); - if (status == PSVC_FAILURE) - return (status); - - status = psvc_get_attr(hdlp, cpuid, - PSVC_PRESENCE_ATTR, &present); - if (status == PSVC_FAILURE && present == PSVC_PRESENT) - return (status); - if (present == PSVC_PRESENT) - ++cpus_online; - } - } - psvc_get_attr(hdlp, id, PSVC_ASSOC_MATCHES_ATTR, &cpu_count, - PSVC_CPU); - for (i = 0; i < cpu_count; ++i) { - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_ID_ATTR, &cpuid, - PSVC_CPU, i); - if (status == PSVC_FAILURE) - return (status); - status = check_cpu_temp_fault(hdlp, cpuid, cpu_count); - if (status == PSVC_FAILURE && errno != ENODEV) - return (status); - } - - return (PSVC_SUCCESS); -} - -/* - * psvc_keyswitch_position_policy_0 - * Checks the state of the keyswitch sensors. - * If a keyswitch position sensor's state is on, the position - * of the key is written to syslog. If none of the sensors - * are on (keyswitch is not at one of the detents), a message is sent - * to syslog stating that the position is unknown. - */ -int32_t -psvc_keyswitch_position_policy_0(psvc_opaque_t hdlp, char *id) -{ - char position[32]; - int32_t status = PSVC_SUCCESS; - static int error_reported = 0; - static char local_previous_position[32]; - static int32_t first_time = 1; - int retry; - - if (first_time) { - first_time = 0; - status = psvc_get_attr(hdlp, id, PSVC_STATE_ATTR, - local_previous_position); - if (status != PSVC_SUCCESS) - return (status); - } - - retry = 0; - do { - if (retry) - (void) sleep(retry_sleep_keyswitch); - - status = psvc_get_attr(hdlp, id, PSVC_SWITCH_STATE_ATTR, - position); - if (status != PSVC_SUCCESS) - return (status); - - if (strcmp(position, PSVC_ERROR) == 0) { - if ((errno == EINVAL) && (!(error_reported))) { - syslog(LOG_ERR, - KEYSWITCH_POS_READ_FAILED_MSG); - error_reported = 1; - return (PSVC_SUCCESS); - } - } - retry++; - } while ((retry < n_retry_keyswitch) && - (strcmp(position, local_previous_position) != 0)); - - status = psvc_set_attr(hdlp, id, PSVC_STATE_ATTR, position); - if (status != PSVC_SUCCESS) - return (status); - - if (strcmp(position, local_previous_position) != 0) { - error_reported = 0; - strcpy(local_previous_position, position); - syslog(LOG_ERR, KEYSWITCH_POS_CHANGED_MSG, position); - } - - return (status); -} - -int32_t -psvc_hotplug_notifier_policy_0(psvc_opaque_t hdlp, char *id) -{ - boolean_t presence, previous_presence; - int32_t status = PSVC_SUCCESS; - char label[32]; - int retry; - - status = psvc_get_attr(hdlp, id, PSVC_PREV_PRESENCE_ATTR, - &previous_presence); - if (status != PSVC_SUCCESS) - return (status); - - retry = 0; - do { - if (retry) - (void) sleep(retry_sleep_hotplug); - status = psvc_get_attr(hdlp, id, PSVC_PRESENCE_ATTR, &presence); - if (status != PSVC_SUCCESS) - return (status); - retry++; - } while ((retry < n_retry_hotplug) && - (presence != previous_presence)); - - - if (presence != previous_presence) { - char parent_path[256]; - picl_nodehdl_t child_node; - - status = psvc_get_attr(hdlp, id, PSVC_LABEL_ATTR, label); - if (status != PSVC_SUCCESS) - return (status); - - /* return parent path and node for an object */ - psvcplugin_lookup(id, parent_path, &child_node); - - if (presence == PSVC_PRESENT) { - char state[32], fault[32]; - picl_nodehdl_t parent_node; - - syslog(LOG_ERR, DEVICE_INSERTED_MSG, label); - strcpy(state, PSVC_OK); - status = psvc_set_attr(hdlp, id, PSVC_STATE_ATTR, - state); - if (status != PSVC_SUCCESS) - return (status); - strcpy(fault, PSVC_NO_FAULT); - status = psvc_set_attr(hdlp, id, PSVC_FAULTID_ATTR, - fault); - if (status != PSVC_SUCCESS) { - return (status); - } - - status = ptree_get_node_by_path(parent_path, - &parent_node); - if (status != 0) - return (PSVC_FAILURE); - status = ptree_add_node(parent_node, child_node); - if (status != 0) - return (PSVC_FAILURE); - } else { - syslog(LOG_ERR, DEVICE_REMOVED_MSG, label); - - ptree_delete_node(child_node); - - } - } - - status = psvc_set_attr(hdlp, id, PSVC_PREV_PRESENCE_ATTR, &presence); - if (status != PSVC_SUCCESS) - return (status); - - return (status); -} - -int32_t -psvc_fan_hotplug_policy_0(psvc_opaque_t hdlp, char *id) -{ - boolean_t presence, previous_presence; - int32_t status = PSVC_SUCCESS; - char label[32]; - int retry; - - status = psvc_get_attr(hdlp, id, PSVC_PREV_PRESENCE_ATTR, - &previous_presence); - if (status != PSVC_SUCCESS) - return (status); - - retry = 0; - do { - if (retry) - (void) sleep(retry_sleep_fan_hotplug); - - status = psvc_get_attr(hdlp, id, PSVC_PRESENCE_ATTR, &presence); - if (status != PSVC_SUCCESS) - return (status); - retry++; - } while ((retry < n_retry_fan_hotplug) && - (presence != previous_presence)); - - - if (presence != previous_presence) { - char parent_path[256]; - picl_nodehdl_t child_node; - - status = psvc_get_attr(hdlp, id, PSVC_LABEL_ATTR, label); - if (status != PSVC_SUCCESS) - return (status); - - /* return parent path and node for an object */ - psvcplugin_lookup(id, parent_path, &child_node); - - if (presence == PSVC_PRESENT) { - char state[32], fault[32]; - char *slot_id; - char *led_id; - int32_t i, led_count; - char led_state[32]; - picl_nodehdl_t parent_node; - - syslog(LOG_ERR, DEVICE_INSERTED_MSG, label); - - strcpy(state, PSVC_OK); - status = psvc_set_attr(hdlp, id, PSVC_STATE_ATTR, - state); - if (status != PSVC_SUCCESS) - return (status); - strcpy(fault, PSVC_NO_FAULT); - status = psvc_set_attr(hdlp, id, PSVC_FAULTID_ATTR, - fault); - if (status != PSVC_SUCCESS) - return (status); - - /* turn off fault LEDs */ - psvc_get_attr(hdlp, id, PSVC_ASSOC_MATCHES_ATTR, - &led_count, PSVC_DEV_FAULT_LED); - strcpy(led_state, PSVC_LED_OFF); - for (i = 0; i < led_count; ++i) { - status = psvc_get_attr(hdlp, id, - PSVC_ASSOC_ID_ATTR, &led_id, - PSVC_DEV_FAULT_LED, i); - if (status == PSVC_FAILURE) - return (status); - status = psvc_set_attr(hdlp, led_id, - PSVC_LED_STATE_ATTR, led_state); - if (status == PSVC_FAILURE) - return (status); - } - - /* turn off OK to remove LEDs */ - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_ID_ATTR, - &slot_id, PSVC_PARENT, 0); - if (status != PSVC_SUCCESS) - return (status); - - psvc_get_attr(hdlp, slot_id, PSVC_ASSOC_MATCHES_ATTR, - &led_count, PSVC_SLOT_REMOVE_LED); - strcpy(led_state, PSVC_LED_OFF); - for (i = 0; i < led_count; ++i) { - status = psvc_get_attr(hdlp, slot_id, - PSVC_ASSOC_ID_ATTR, &led_id, - PSVC_SLOT_REMOVE_LED, i); - if (status == PSVC_FAILURE) - return (status); - - status = psvc_set_attr(hdlp, led_id, - PSVC_LED_STATE_ATTR, led_state); - if (status == PSVC_FAILURE) - return (status); - } - - ptree_get_node_by_path(parent_path, &parent_node); - ptree_add_node(parent_node, child_node); - } else { - syslog(LOG_ERR, DEVICE_REMOVED_MSG, label); - ptree_delete_node(child_node); - } - } - - status = psvc_set_attr(hdlp, id, PSVC_PREV_PRESENCE_ATTR, &presence); - if (status != PSVC_SUCCESS) - return (status); - - return (status); -} - -int32_t -psvc_init_led_policy_0(psvc_opaque_t hdlp, char *id) -{ - int32_t status; - - status = psvc_set_attr(hdlp, id, PSVC_LED_STATE_ATTR, PSVC_LED_OFF); - return (status); -} - -int32_t -psvc_init_state_policy_0(psvc_opaque_t hdlp, char *id) -{ - int32_t status; - - status = psvc_set_attr(hdlp, id, PSVC_STATE_ATTR, PSVC_OK); - status = psvc_set_attr(hdlp, id, PSVC_FAULTID_ATTR, PSVC_NO_FAULT); - return (status); -} - -int32_t -psvc_ps_overcurrent_check_policy_0(psvc_opaque_t hdlp, char *power_supply_id) -{ - int32_t status = PSVC_SUCCESS; - boolean_t present; - char *sensor_id; - int32_t sensor_count; - int32_t i; - int32_t amps, hi_warn; - - status = psvc_get_attr(hdlp, power_supply_id, PSVC_PRESENCE_ATTR, - &present); - if (status == PSVC_FAILURE) { - syslog(LOG_ERR, GET_PRESENCE_FAILED_MSG, power_supply_id, - errno); - return (status); - } - - if (present == PSVC_ABSENT) { - errno = ENODEV; - return (PSVC_FAILURE); - } - - psvc_get_attr(hdlp, power_supply_id, PSVC_ASSOC_MATCHES_ATTR, - &sensor_count, PSVC_PS_I_SENSOR); - for (i = 0; i < sensor_count; ++i) { - status = psvc_get_attr(hdlp, power_supply_id, - PSVC_ASSOC_ID_ATTR, &sensor_id, PSVC_PS_I_SENSOR, i); - if (status != PSVC_SUCCESS) - return (status); - - status = psvc_get_attr(hdlp, sensor_id, PSVC_HI_WARN_ATTR, - &hi_warn); - if (status != PSVC_SUCCESS) - return (status); - - status = psvc_get_attr(hdlp, sensor_id, - PSVC_SENSOR_VALUE_ATTR, &s); - if (status != PSVC_SUCCESS) { - syslog(LOG_ERR, GET_SENSOR_FAILED_MSG, sensor_id, - errno); - return (status); - } - - if (amps >= hi_warn) { - char label[32]; - - status = psvc_get_attr(hdlp, power_supply_id, - PSVC_LABEL_ATTR, &label); - if (status != PSVC_SUCCESS) - return (status); - - syslog(LOG_ERR, PS_OVER_CURRENT_MSG, label); - } - } - - return (PSVC_SUCCESS); - -} - -int32_t -psvc_device_fail_notifier_policy_0(psvc_opaque_t hdlp, char *id) -{ - int32_t led_count, sensor_count; - char *led_id, *sensor_id; - int i; - char state[32], fault[32], previous_state[32]; - char led_state[32]; - int32_t status = PSVC_SUCCESS; - boolean_t present; - - status = psvc_get_attr(hdlp, id, PSVC_PRESENCE_ATTR, &present); - if (status == PSVC_FAILURE) - return (status); - - if (present == PSVC_ABSENT) { - errno = ENODEV; - return (PSVC_FAILURE); - } - - psvc_get_attr(hdlp, id, PSVC_ASSOC_MATCHES_ATTR, &sensor_count, - PSVC_DEV_FAULT_SENSOR); - for (i = 0; i < sensor_count; ++i) { - status = psvc_get_attr(hdlp, id, PSVC_ASSOC_ID_ATTR, - &sensor_id, PSVC_DEV_FAULT_SENSOR, i); - if (status != PSVC_SUCCESS) - return (status); - - status = psvc_get_attr(hdlp, sensor_id, - PSVC_SWITCH_STATE_ATTR, state); - if (status != PSVC_SUCCESS) - return (status); - - if (strcmp(state, PSVC_SWITCH_ON) == 0) { - strcpy(state, PSVC_ERROR); - strcpy(fault, PSVC_GEN_FAULT); - } else { - strcpy(state, PSVC_OK); - strcpy(fault, PSVC_NO_FAULT); - } - - status = psvc_set_attr(hdlp, id, PSVC_STATE_ATTR, state); - if (status != PSVC_SUCCESS) - return (status); - status = psvc_set_attr(hdlp, id, PSVC_FAULTID_ATTR, fault); - if (status != PSVC_SUCCESS) - return (status); - status = psvc_get_attr(hdlp, id, PSVC_PREV_STATE_ATTR, - previous_state); - if (status != PSVC_SUCCESS) - return (status); - - if (strcmp(state, previous_state) != 0) { - char sensor_label[32]; - char dev_label[32]; - int32_t j; - - psvc_get_attr(hdlp, id, PSVC_LABEL_ATTR, dev_label); - psvc_get_attr(hdlp, sensor_id, PSVC_LABEL_ATTR, - sensor_label); - - if (strcmp(state, PSVC_ERROR) == 0) { - syslog(LOG_ERR, DEVICE_FAILURE_MSG, dev_label, - sensor_label); - strcpy(led_state, PSVC_LED_ON); - } else { - syslog(LOG_ERR, DEVICE_OK_MSG, dev_label); - strcpy(led_state, PSVC_LED_OFF); - } - - psvc_get_attr(hdlp, id, PSVC_ASSOC_MATCHES_ATTR, - &led_count, PSVC_DEV_FAULT_LED); - for (j = 0; j < led_count; j++) { - status = psvc_get_attr(hdlp, id, - PSVC_ASSOC_ID_ATTR, &led_id, - PSVC_DEV_FAULT_LED, j); - if (status != PSVC_SUCCESS) - return (status); - status = psvc_set_attr(hdlp, led_id, - PSVC_LED_STATE_ATTR, led_state); - if (status != PSVC_SUCCESS) { - syslog(LOG_ERR, SET_LED_FAILED_MSG, - led_id, errno); - return (status); - } - } - } - } - - return (PSVC_SUCCESS); -} - -static float -get_filtered_error(float *last_errors, int current_error) -{ - float error; - float adder; - int i = 0; - - adder = last_errors[0]; - for (i = 1; i < PSVC_MAXERRORS; i++) { - adder = adder + last_errors[i]; - } - adder = adder + current_error; - error = adder/(PSVC_MAXERRORS+1); - - return (error); -} - -static int32_t -change_cpu_fans(psvc_opaque_t hdlp, char *fan_id, int32_t fan_speed) -{ - int err = PSVC_SUCCESS; - int i; - int32_t control_count; - char *control_id; - int32_t old_fan_speed; - - psvc_get_attr(hdlp, fan_id, PSVC_ASSOC_MATCHES_ATTR, &control_count, - PSVC_FAN_DRIVE_CONTROL); - if (control_count == 0) - return (PSVC_SUCCESS); - - err = psvc_get_attr(hdlp, fan_id, PSVC_ASSOC_ID_ATTR, &control_id, - PSVC_FAN_DRIVE_CONTROL, 0); - if (err != PSVC_SUCCESS) - return (err); - - /* - * this call will return PSVC_FAILURE on the first pass, - * because no value has been set. - */ - err = psvc_get_attr(hdlp, control_id, PSVC_CONTROL_VALUE_ATTR, - &old_fan_speed); - if (err == PSVC_SUCCESS && old_fan_speed == fan_speed) - return (PSVC_SUCCESS); - - for (i = 0; i < control_count; i++) { - err = psvc_get_attr(hdlp, fan_id, PSVC_ASSOC_ID_ATTR, - &control_id, PSVC_FAN_DRIVE_CONTROL, i); - if (err != PSVC_SUCCESS) - return (err); - - err = psvc_set_attr(hdlp, control_id, PSVC_CONTROL_VALUE_ATTR, - &fan_speed); - if (err == PSVC_FAILURE) { - syslog(LOG_ERR, SET_FANSPEED_FAILED_MSG, control_id, - errno); - return (err); - } - } - return (err); -} - -static int32_t -device_temp_check(psvc_opaque_t hdlp, char *fan_id, int32_t *hot_device) -{ - int i; - int32_t err = PSVC_SUCCESS; - char *sensor_id; - int32_t sensor_count; - int32_t temp; - - *hot_device = 0; - - psvc_get_attr(hdlp, fan_id, PSVC_ASSOC_MATCHES_ATTR, &sensor_count, - PSVC_DEV_TEMP_SENSOR); - for (i = 0; i < sensor_count; i++) { - err = psvc_get_attr(hdlp, fan_id, PSVC_ASSOC_ID_ATTR, - &sensor_id, PSVC_DEV_TEMP_SENSOR, i); - if (err == PSVC_FAILURE) - return (err); - err = psvc_get_attr(hdlp, sensor_id, PSVC_SENSOR_VALUE_ATTR, - &temp); - if (err == PSVC_FAILURE) { - if (errno == ENODEV) { - temp = 0; - } else { - syslog(LOG_ERR, GET_SENSOR_FAILED_MSG, - sensor_id, errno); - return (err); - } - } - - if (*hot_device < temp) - *hot_device = temp; - } - return (PSVC_SUCCESS); -} - -int32_t -psvc_fan_control_policy_0(psvc_opaque_t hdlp, char *fan_id) -{ - boolean_t is_enabled; - int32_t err = PSVC_SUCCESS; - int16_t setpoint, hysteresis, loopgain, loopbias; - int current_error; /* Holds current error */ - /* Signal before signaling */ - float filtered_error; /* Holds the filtered error signal */ - int ampout; /* output of loop amplifier */ - int hot_device; - - int16_t error_number; - float last_errors[PSVC_MAXERRORS]; /* Holds the filtered error */ - /* from the last n iterations */ - - psvc_get_attr(hdlp, fan_id, PSVC_ENABLE_ATTR, &is_enabled); - if (is_enabled == PSVC_DISABLED) - return (PSVC_SUCCESS); - - err = psvc_get_attr(hdlp, fan_id, PSVC_SETPOINT_ATTR, &setpoint); - if (err != PSVC_SUCCESS) - return (err); - - err = psvc_get_attr(hdlp, fan_id, PSVC_HYSTERESIS_ATTR, - &hysteresis); - if (err != PSVC_SUCCESS) - return (err); - - err = psvc_get_attr(hdlp, fan_id, PSVC_LOOPGAIN_ATTR, &loopgain); - if (err != PSVC_SUCCESS) - return (err); - - err = psvc_get_attr(hdlp, fan_id, PSVC_LOOPBIAS_ATTR, &loopbias); - if (err != PSVC_SUCCESS) - return (err); - - err = psvc_get_attr(hdlp, fan_id, PSVC_TEMP_DIFFERENTIAL_ATTR, - last_errors); - if (err != PSVC_SUCCESS) - return (err); - - err = psvc_get_attr(hdlp, fan_id, PSVC_TEMP_DIFFERENTIAL_INDEX_ATTR, - &error_number); - if (err != PSVC_SUCCESS) - return (err); - - err = device_temp_check(hdlp, fan_id, &hot_device); - if (err != PSVC_SUCCESS) { - printf("psvc_fan_control failure in device_temp_check\n"); - return (err); - } - current_error = setpoint - hot_device; - filtered_error = get_filtered_error(last_errors, current_error); - if (filtered_error <= 0 || filtered_error > hysteresis) { - ampout = (int)((filtered_error * loopgain) + loopbias); - if (ampout < 0) - ampout = 0; - if (ampout > 1023) - ampout = 1023; - err = change_cpu_fans(hdlp, fan_id, ampout); - if (err != PSVC_SUCCESS) - return (err); - } - last_errors[error_number++] = current_error; - if (error_number == PSVC_MAXERRORS) - error_number = 0; - - err = psvc_set_attr(hdlp, fan_id, PSVC_TEMP_DIFFERENTIAL_ATTR, - last_errors); - if (err != PSVC_SUCCESS) - return (err); - - err = psvc_set_attr(hdlp, fan_id, PSVC_TEMP_DIFFERENTIAL_INDEX_ATTR, - &error_number); - if (err != PSVC_SUCCESS) - return (err); - - return (PSVC_SUCCESS); -} - -int32_t -psvc_fan_present_policy_0(psvc_opaque_t hdlp, char *id) -{ - int32_t status = PSVC_SUCCESS; - boolean_t presence; - int fd; - FILE *fp; - int retry; - - retry = 0; - do { - if (retry) - (void) sleep(retry_sleep_fan_present); - - status = psvc_get_attr(hdlp, id, PSVC_PRESENCE_ATTR, &presence); - if (status != PSVC_SUCCESS) - return (status); - retry++; - } while ((retry < n_retry_fan_present) && (presence == PSVC_ABSENT)); - - if (presence == PSVC_ABSENT) { - /* - * We make this open, write, close, call because picld - * starts in rcS.d while print services does not start - * until later (either rc2.d or rc3.d) - */ - fd = open("/dev/console", O_WRONLY | O_NOCTTY); - if (fd != -1) { - fp = fdopen(fd, "w+"); - if (fp != NULL) { - fprintf(fp, FAN_MISSING_MSG, id); - fclose(fp); - } - close(fd); - } - syslog(LOG_ERR, FAN_MISSING_MSG, id); - } - return (status); -} diff --git a/usr/src/cmd/picl/plugins/sun4u/schumacher/Makefile b/usr/src/cmd/picl/plugins/sun4u/schumacher/Makefile deleted file mode 100644 index b44c365cab..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/schumacher/Makefile +++ /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, 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" -# -# cmd/picl/plugins/sun4u/schumacher/Makefile -# - -SUBDIRS= frudata frutree - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -.KEEP_STATE: - -all install clean clobber: $(SUBDIRS) - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/schumacher/frudata/Makefile b/usr/src/cmd/picl/plugins/sun4u/schumacher/frudata/Makefile deleted file mode 100644 index e4d8ea51fc..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/schumacher/frudata/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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# lib/picl/plugins/sun4u/schumacher/frudata/Makefile -# -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Netra-CP3010 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONF= libpiclfrudata.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: $(CONF) - -install: $(ROOTLIBDIR) $(ROOTCONF) - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/schumacher/frudata/libpiclfrudata.conf b/usr/src/cmd/picl/plugins/sun4u/schumacher/frudata/libpiclfrudata.conf deleted file mode 100644 index 742eb56360..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/schumacher/frudata/libpiclfrudata.conf +++ /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, 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" -# -# This file creates the FRU device paths for the FRUAccess library -# - -VERSION 1.0 - -name:/platform/pci@1e,600000/isa@7/ipmc@0,2e8/i2c@81/motherboard-fru-prom@81,a8 -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/ipmc@0,2e8/i2c@81/motherboard-fru-prom@81,a8:motherboard-fru-prom" - -name:/platform/pci@1e,600000/isa@7/ipmc@0,2e8/i2c@81/dimm-spd@81,a0 -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/ipmc@0,2e8/i2c@81/dimm-spd@81,a0:dimm-spd" - -name:/platform/pci@1e,600000/isa@7/ipmc@0,2e8/i2c@81/dimm-spd@81,a2 -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/ipmc@0,2e8/i2c@81/dimm-spd@81,a2:dimm-spd" - -name:/platform/pci@1e,600000/isa@7/ipmc@0,2e8/i2c@81/dimm-spd@81,a4 -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/ipmc@0,2e8/i2c@81/dimm-spd@81,a4:dimm-spd" - -name:/platform/pci@1e,600000/isa@7/ipmc@0,2e8/i2c@81/dimm-spd@81,a6 -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/ipmc@0,2e8/i2c@81/dimm-spd@81,a6:dimm-spd" diff --git a/usr/src/cmd/picl/plugins/sun4u/schumacher/frutree/Makefile b/usr/src/cmd/picl/plugins/sun4u/schumacher/frutree/Makefile deleted file mode 100644 index d886057f70..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/schumacher/frutree/Makefile +++ /dev/null @@ -1,68 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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. -# -# lib/picl/plugins/sun4u/schumacher/frutree/Makefile -# -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Netra-CP3010 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONF= piclfrutree.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 -INFOS= piclfrutree.info system-board.info - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: $(CONF) - -install: $(ROOTLIBDIR) $(ROOTCONF) - -$(CONF): $(INFOS) - $(RM) $@ - $(CPP) piclfrutree.info > $@ - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/schumacher/frutree/piclfrutree.info b/usr/src/cmd/picl/plugins/sun4u/schumacher/frutree/piclfrutree.info deleted file mode 100644 index 4093e15d47..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/schumacher/frutree/piclfrutree.info +++ /dev/null @@ -1,74 +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" - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -#define PLATFORM_CLASS jbus - -VERSION 1.0 -NODE frutree picl - NODE chassis fru - PROP ChassisType string r 0 "SUNW,Netra-CP3010" - NODE MB location - PROP SlotType string r 0 "atca" - PROP Label string r 0 "MOTHERBOARD" - ENDNODE - ENDNODE -ENDNODE - -name:/frutree/chassis/MB -#include "system-board.info" - diff --git a/usr/src/cmd/picl/plugins/sun4u/schumacher/frutree/system-board.info b/usr/src/cmd/picl/plugins/sun4u/schumacher/frutree/system-board.info deleted file mode 100644 index 4dc6a590a3..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/schumacher/frutree/system-board.info +++ /dev/null @@ -1,134 +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" - * - * This file creates the system board structure - */ - -NODE SUNW,Netra-CP3010 fru - -NODE CPU location - PROP Label string r 0 "CPU 0" - PROP GeoAddr uint r 1 1 - PROP SlotType string r 0 "cpu" -ENDNODE - -NODE CPU location - PROP Label string r 0 "CPU 1" - PROP GeoAddr uint r 1 2 - PROP SlotType string r 0 "cpu" -ENDNODE - -NODE mem-slot location - PROP GeoAddr uint r 1 1 - PROP Label string r 0 "DIMM0" - PROP SlotType string r 0 "memory-module" -ENDNODE - -NODE mem-slot location - PROP GeoAddr uint r 1 2 - PROP Label string r 0 "DIMM1" - PROP SlotType string r 0 "memory-module" -ENDNODE - -NODE mem-slot location - PROP GeoAddr uint r 1 3 - PROP Label string r 0 "DIMM2" - PROP SlotType string r 0 "memory-module" -ENDNODE - -NODE mem-slot location - PROP GeoAddr uint r 1 4 - PROP Label string r 0 "DIMM3" - PROP SlotType string r 0 "memory-module" -ENDNODE - -ENDNODE - -/* - * create the fru modules for CPU - */ -name:/frutree/chassis/MB/SUNW,Netra-CP3010/CPU?GeoAddr=1 -REFNODE cpu-module fru WITH _class:/PLATFORM_CLASS/cpu?ID=0 - -name:/frutree/chassis/MB/SUNW,Netra-CP3010/CPU?GeoAddr=2 -REFNODE cpu-module fru WITH _class:/PLATFORM_CLASS/cpu?ID=1 - -/* - * _fru_parent CPU devices - */ -_class:/PLATFORM_CLASS/cpu?ID=0 -REFPROP _fru_parent /frutree/chassis/MB/SUNW,Netra-CP3010/CPU?GeoAddr=1/cpu-module - -_class:/PLATFORM_CLASS/cpu?ID=1 -REFPROP _fru_parent /frutree/chassis/MB/SUNW,Netra-CP3010/CPU?GeoAddr=2/cpu-module - -/* - * _fru_parent motherboard - */ -_class:/PLATFORM_CLASS -REFPROP _fru_parent /frutree/chassis/MB/SUNW,Netra-CP3010 - -/* - * Set up memory module fru - */ -name:/frutree/chassis/MB/SUNW,Netra-CP3010/mem-slot?Label=DIMM0 -REFNODE mem-module fru WITH /platform/pci@1e,600000/isa@7/ipmc@0,2e8/i2c@81/dimm-spd@81,a0 - -name:/frutree/chassis/MB/SUNW,Netra-CP3010/mem-slot?Label=DIMM1 -REFNODE mem-module fru WITH /platform/pci@1e,600000/isa@7/ipmc@0,2e8/i2c@81/dimm-spd@81,a2 - -name:/frutree/chassis/MB/SUNW,Netra-CP3010/mem-slot?Label=DIMM2 -REFNODE mem-module fru WITH /platform/pci@1e,600000/isa@7/ipmc@0,2e8/i2c@81/dimm-spd@81,a4 - -name:/frutree/chassis/MB/SUNW,Netra-CP3010/mem-slot?Label=DIMM3 -REFNODE mem-module fru WITH /platform/pci@1e,600000/isa@7/ipmc@0,2e8/i2c@81/dimm-spd@81,a6 - -/* - * seeprom source for motherboard - */ -name:/frutree/chassis/MB/SUNW,Netra-CP3010 -PROP FRUDataAvailable void r -REFPROP _seeprom_source /platform/pci@1e,600000/isa@7/ipmc@0,2e8/i2c@81/motherboard-fru-prom@81,a8 - -/* - * seeprom source for dimms - */ -name:/frutree/chassis/MB/SUNW,Netra-CP3010/mem-slot?Label=DIMM0/mem-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source /platform/pci@1e,600000/isa@7/ipmc@0,2e8/i2c@81/dimm-spd@81,a0 - -name:/frutree/chassis/MB/SUNW,Netra-CP3010/mem-slot?Label=DIMM1/mem-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source /platform/pci@1e,600000/isa@7/ipmc@0,2e8/i2c@81/dimm-spd@81,a2 - -name:/frutree/chassis/MB/SUNW,Netra-CP3010/mem-slot?Label=DIMM2/mem-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source /platform/pci@1e,600000/isa@7/ipmc@0,2e8/i2c@81/dimm-spd@81,a4 - -name:/frutree/chassis/MB/SUNW,Netra-CP3010/mem-slot?Label=DIMM3/mem-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source /platform/pci@1e,600000/isa@7/ipmc@0,2e8/i2c@81/dimm-spd@81,a6 diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/Makefile b/usr/src/cmd/picl/plugins/sun4u/seattle/Makefile deleted file mode 100644 index fb646a382b..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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" -# -# cmd/picl/plugins/sun4u/seattle/Makefile -# - -SUBDIRS= devtree frutree frudata frudr envmon .WAIT - -MSGSUBDIRS= frudr - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -.KEEP_STATE: - -all install clean clobber: $(SUBDIRS) - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/devtree/Makefile b/usr/src/cmd/picl/plugins/sun4u/seattle/devtree/Makefile deleted file mode 100644 index 0d58e6e04a..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/devtree/Makefile +++ /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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# - -# -# cmd/picl/plugins/sun4u/seattle/devtree/Makefile -# - -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-V215 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONF= picldevtree.conf picl_asr.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: - -install: $(ROOTLIBDIR) $(ROOTCONF) - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/devtree/picl_asr.conf b/usr/src/cmd/picl/plugins/sun4u/seattle/devtree/picl_asr.conf deleted file mode 100644 index 6a97c34123..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/devtree/picl_asr.conf +++ /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 2006 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# - -# -# ident "%Z%%M% %I% %E% SMI" -# -# cmd/picl/plugins/sun4u/seattle/devtree/picl_asr.conf -# -# Platform specific .conf file for picldevtree plug-in -# - -dimm0 memory-module-group unused /memory-controller@0,0/memory-module-group I?ID=0 -dimm0 memory-module disabled /memory-controller@0,0/memory-module-group?ID=0/memory-module I?ID=0 -dimm0 memory-module unused /memory-controller@0,0/memory-module-group?ID=0/memory-module I?ID=1 -dimm1 memory-module-group unused /memory-controller@0,0/memory-module-group I?ID=0 -dimm1 memory-module unused /memory-controller@0,0/memory-module-group?ID=0/memory-module I?ID=0 -dimm1 memory-module disabled /memory-controller@0,0/memory-module-group?ID=0/memory-module I?ID=1 -dimm2 memory-module-group unused /memory-controller@0,0/memory-module-group I?ID=1 -dimm2 memory-module disabled /memory-controller@0,0/memory-module-group?ID=1/memory-module I?ID=0 -dimm2 memory-module unused /memory-controller@0,0/memory-module-group?ID=1/memory-module I?ID=1 -dimm3 memory-module-group unused /memory-controller@0,0/memory-module-group I?ID=1 -dimm3 memory-module unused /memory-controller@0,0/memory-module-group?ID=1/memory-module I?ID=0 -dimm3 memory-module disabled /memory-controller@0,0/memory-module-group?ID=1/memory-module I?ID=1 -dimm4 memory-module-group unused /memory-controller@1,0/memory-module-group I?ID=0 -dimm4 memory-module disabled /memory-controller@1,0/memory-module-group?ID=0/memory-module I?ID=0 -dimm4 memory-module unused /memory-controller@1,0/memory-module-group?ID=0/memory-module I?ID=1 -dimm5 memory-module-group unused /memory-controller@1,0/memory-module-group I?ID=0 -dimm5 memory-module unused /memory-controller@1,0/memory-module-group?ID=0/memory-module I?ID=0 -dimm5 memory-module disabled /memory-controller@1,0/memory-module-group?ID=0/memory-module I?ID=1 -dimm6 memory-module-group unused /memory-controller@1,0/memory-module-group I?ID=1 -dimm6 memory-module disabled /memory-controller@1,0/memory-module-group?ID=1/memory-module I?ID=0 -dimm6 memory-module unused /memory-controller@1,0/memory-module-group?ID=1/memory-module I?ID=1 -dimm7 memory-module-group unused /memory-controller@1,0/memory-module-group I?ID=1 -dimm7 memory-module unused /memory-controller@1,0/memory-module-group?ID=1/memory-module I?ID=0 -dimm7 memory-module disabled /memory-controller@1,0/memory-module-group?ID=1/memory-module I?ID=1 - -# PCI0: 1UEER/2UEER -pci0 picl disabled /pci@1e,600000/pci@0/pci@8/unknown@0 I?DeviceID=0 - -# PCI1: 1UXXL, 1UEEL, 2UEXL-I, 2UEEL -pci1 picl disabled /pci@1e,600000/pci@0/pci@9/pci@0/pci@8/unknown@1 I?DeviceID=1 -pci1 picl disabled /pci@1f,700000/unknown@0 I?DeviceID=0 -pci1 picl disabled /pci@1f,700000/pci@0,2/unknown@1 I?DeviceID=1 -pci1 picl disabled /pci@1f,700000/pci@0/pci@9/unknown@0 I?DeviceID=0 - -# PCI2: 2UEER -pci2 picl disabled /pci@1e,600000/pci@0/pci@2/unknown@0 I?DeviceID=0 - -# PCI3: 2UEXL-I, 2UEEL -pci3 picl disabled /pci@1f,700000/pci@0/unknown@2 I?DeviceID=2 -pci3 picl disabled /pci@1f,700000/pci@0/pci@8/unknown@0 I?DeviceID=0 - -riser-left picl disabled /pci@1f,700000/unknown@0 I?DeviceID=0 -ide ide disabled /pci@1e,600000/pci@0/pci@1/pci@0/ide@1f I?DeviceID=1f -usb usb disabled /pci@1e,600000/pci@0/pci@1/pci@0/usb@1c I?DeviceID=1c -usb usb disabled /pci@1e,600000/pci@0/pci@1/pci@0/usb@1c,1 I?DeviceID=1c,1 -usb usb disabled /pci@1e,600000/pci@0/pci@1/pci@0/usb@1c,1/hub@3 I?DeviceID=3 -net0&1 network disabled /pci@1e,600000/pci@0/pci@9/pci@0/network@4 I?DeviceID=2 -net0&1 network disabled /pci@1e,600000/pci@0/pci@9/pci@0/network@4,1 I?DeviceID=2 -net2&3 network disabled /pci@1e,600000/pci@0/pci@a/pci@0/network@4 I?DeviceID=2 -net2&3 network disabled /pci@1e,600000/pci@0/pci@a/pci@0/network@4,1 I?DeviceID=2 -scsi scsi-2 disabled /pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1 I?DeviceID=2 diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/devtree/picldevtree.conf b/usr/src/cmd/picl/plugins/sun4u/seattle/devtree/picldevtree.conf deleted file mode 100644 index 12b7611b34..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/devtree/picldevtree.conf +++ /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 2006 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# - -# -# ident "%Z%%M% %I% %E% SMI" -# -# cmd/picl/plugins/sun4u/seattle/devtree/picldevtree.conf -# -# Platform specific .conf file for picldevtree plug-in -# -power-supply-fru-prom seeprom -dimm-spd seeprom -motherboard-fru-prom seeprom -pdb-fru-prom seeprom -fiob-fru-prom seeprom -riser-fru-prom seeprom -sasbp-fru-prom seeprom -hub usb diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/envmon/Makefile b/usr/src/cmd/picl/plugins/sun4u/seattle/envmon/Makefile deleted file mode 100644 index 05c62c44f2..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/envmon/Makefile +++ /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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# -# cmd/picl/plugins/sun4u/seattle/envmon/Makefile -# - -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-V215 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONFS = piclenvmon.conf -ROOTCONF= $(CONFS:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 -MAININFO= $(CONFS:%.conf=%.info) - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: $(CONFS) - -install: $(ROOTLIBDIR) $(ROOTCONF) - -$(CONFS): $(MAININFO) - @$(RM) -f $@ - @echo "# Copyright 2005 Sun Microsystems, Inc. All rights reserved." \ - > $@ - @echo "# Use is subject to license terms." >> $@ - @echo "# This is a generated file. #ident lines identify sources" >> $@ - $(CPP) -P $(@:%.conf=%.info) | \ - $(SED) -e '/^[ ]*$$/d' >> $@ - @$(CHMOD) 444 $@ - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/envmon/piclenvmon.info b/usr/src/cmd/picl/plugins/sun4u/seattle/envmon/piclenvmon.info deleted file mode 100644 index de969893ca..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/envmon/piclenvmon.info +++ /dev/null @@ -1,86 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL plugin envmon after - * it has established rmclomv nodes in /platform - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#define RMC_COMM /platform/ebus@1f,464000/rmc-comm@2,0 - -/* - * add a node for the rmclomv leaf driver - */ -name:RMC_COMM - NODE SUNW,rmclomv service-processor - ENDNODE - -name:RMC_COMM/SUNW,rmclomv - PROP devfs-path string r 0 "/pseudo/rmclomv@0" diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frudata/Makefile b/usr/src/cmd/picl/plugins/sun4u/seattle/frudata/Makefile deleted file mode 100644 index 20126caea8..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frudata/Makefile +++ /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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# - -# -# cmd/picl/plugins/sun4u/seattle/frudata/Makefile -# - -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-V215 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONF= libpiclfrudata.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: $(CONF) - -install: $(ROOTLIBDIR) $(ROOTCONF) - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frudata/libpiclfrudata.conf b/usr/src/cmd/picl/plugins/sun4u/seattle/frudata/libpiclfrudata.conf deleted file mode 100644 index 9c2ddbe2d3..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frudata/libpiclfrudata.conf +++ /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 2006 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# - -# -# ident "%Z%%M% %I% %E% SMI" -# -# This file creates the FRU device paths for the FRUAccess library -# - -VERSION 1.0 - -name:/platform/i2c@1f,530000/pdb-fru-prom@0,32 -PROP FRUDevicePath string r 0 "/devices/i2c@1f,530000/pdb-fru-prom@0,32:pdb-fru-prom" - -name:/platform/i2c@1f,530000/motherboard-fru-prom@0,a2 -PROP FRUDevicePath string r 0 "/devices/i2c@1f,530000/motherboard-fru-prom@0,a2:motherboard-fru-prom" - -name:/platform/i2c@1f,530000/dimm-spd?UnitAddress=0,e0 -PROP FRUDevicePath string r 0 "/devices/i2c@1f,530000/dimm-spd@0,e0:dimm-spd" - -name:/platform/i2c@1f,530000/dimm-spd?UnitAddress=0,e2 -PROP FRUDevicePath string r 0 "/devices/i2c@1f,530000/dimm-spd@0,e2:dimm-spd" - -name:/platform/i2c@1f,530000/dimm-spd?UnitAddress=0,e4 -PROP FRUDevicePath string r 0 "/devices/i2c@1f,530000/dimm-spd@0,e4:dimm-spd" - -name:/platform/i2c@1f,530000/dimm-spd?UnitAddress=0,e6 -PROP FRUDevicePath string r 0 "/devices/i2c@1f,530000/dimm-spd@0,e6:dimm-spd" - -name:/platform/i2c@1f,530000/dimm-spd?UnitAddress=0,e8 -PROP FRUDevicePath string r 0 "/devices/i2c@1f,530000/dimm-spd@0,e8:dimm-spd" - -name:/platform/i2c@1f,530000/dimm-spd?UnitAddress=0,ea -PROP FRUDevicePath string r 0 "/devices/i2c@1f,530000/dimm-spd@0,ea:dimm-spd" - -name:/platform/i2c@1f,530000/dimm-spd?UnitAddress=0,ec -PROP FRUDevicePath string r 0 "/devices/i2c@1f,530000/dimm-spd@0,ec:dimm-spd" - -name:/platform/i2c@1f,530000/dimm-spd?UnitAddress=0,ee -PROP FRUDevicePath string r 0 "/devices/i2c@1f,530000/dimm-spd@0,ee:dimm-spd" - -name:/platform/i2c@1f,530000/power-supply-fru-prom?UnitAddress=0,6c -PROP FRUDevicePath string r 0 "/devices/i2c@1f,530000/power-supply-fru-prom@0,6c:power-supply-fru-prom" - -name:/platform/i2c@1f,530000/power-supply-fru-prom?UnitAddress=0,6e -PROP FRUDevicePath string r 0 "/devices/i2c@1f,530000/power-supply-fru-prom@0,6e:power-supply-fru-prom" - -name:/platform/i2c@1f,530000/fiob-fru-prom@0,60 -PROP FRUDevicePath string r 0 "/devices/i2c@1f,530000/fiob-fru-prom@0,60:fiob-fru-prom" - -name:/platform/i2c@1f,530000/riser-fru-prom?UnitAddress=0,a8 -PROP FRUDevicePath string r 0 "/devices/i2c@1f,530000/riser-fru-prom@0,a8:riser-fru-prom" - -name:/platform/i2c@1f,530000/riser-fru-prom?UnitAddress=0,aa -PROP FRUDevicePath string r 0 "/devices/i2c@1f,530000/riser-fru-prom@0,aa:riser-fru-prom" - -name:/platform/i2c@1f,530000/sasbp-fru-prom@0,64 -PROP FRUDevicePath string r 0 "/devices/i2c@1f,530000/sasbp-fru-prom@0,64:sasbp-fru-prom" diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/Makefile b/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/Makefile deleted file mode 100644 index f4b40fa759..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/Makefile +++ /dev/null @@ -1,96 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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. -# - -# -# cmd/picl/plugins/sun4u/seattle/frudr/Makefile -# - -include $(SRC)/Makefile.psm - -VERS = .1 - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-V215 -FRUDR_LINKTO_PLATFORM = SUNW,Sun-Fire-V240 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONFS = fru_PS0.conf fru_PS1.conf -CONFS += fru_HDD0.conf fru_HDD1.conf -CONFS += fru_HDD2.conf fru_HDD3.conf -CONFS += fru_SC.conf -CONFS += fru_usb-a-1.conf fru_usb-a-2.conf -CONFS += fru_usb-a-3.conf fru_usb-a-4.conf -CONFS += fru_FT0.conf fru_FT1.conf fru_FT2.conf -CONFS += fru_FT3.conf fru_FT4.conf fru_FT5.conf -CONFS += fru_FT6.conf -ROOTCONF= $(CONFS:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 -MAININFO= $(CONFS:%.conf=%.info) -OTHERINFOS = fru_PS0_data.info fru_PS1_data.info -OTHERINFOS += fru_HDD0_data.info fru_HDD1_data.info -OTHERINFOS += fru_HDD2_data.info fru_HDD3_data.info -OTHERINFOS += fru_SC_data.info SB-tables.info -OTHERINFOS += fru_usb-a-1_data.info fru_usb-a-2_data.info -OTHERINFOS += fru_usb-a-3_data.info fru_usb-a-4_data.info -OTHERINFOS += fru_FT0_data.info fru_FT1_data.info fru_FT2_data.info -OTHERINFOS += fru_FT3_data.info fru_FT4_data.info fru_FT5_data.info -OTHERINFOS += fru_FT6_data.info - -.KEEP_STATE: - -all: $(CONFS) - -install: all $(ROOTCONF); $(MAKE) $(FRUDR_LINK) - -$(CONFS): $(MAININFO) $(OTHERINFOS) - @$(RM) -f $@ - @echo "# Copyright 2006 Sun Microsystems, Inc. " \ - "All rights reserved." > $@ - @echo "# Use is subject to license terms." >> $@ - @echo "# This is a generated file. #ident lines identify sources" >> $@ - $(CPP) -P $(@:%.conf=%.info) | \ - $(SED) -e '/^[ ]*$$/d' >> $@ - @$(CHMOD) 644 $@ - -$(LIBLINKS): FRC - $(RM) $@; $(SYMLINK) $(DYNLIB) $@ - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -FRC: - -FRUDR_LINK=`cd $(ROOT_PLATFORM)/lib/picl/plugins/; \ -rm -f libpiclfrudr.so.1; \ -rm -f libpiclfrudr.so; \ -ln -s ../../../../$(FRUDR_LINKTO_PLATFORM)/lib/picl/plugins/libpiclfrudr.so.1 libpiclfrudr.so.1; \ -ln -s ../../../../$(FRUDR_LINKTO_PLATFORM)/lib/picl/plugins/libpiclfrudr.so libpiclfrudr.so;` diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/SB-tables.info b/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/SB-tables.info deleted file mode 100644 index 3cae98fe80..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/SB-tables.info +++ /dev/null @@ -1,389 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This file creates device tables for all of the fru's in the system - * (except for hard disk drives and power supplies.) Each table contains - * one or more rows of devices, each with a reference to a particular - * device/sensor. - * - * This file will be #included by piclfrutree.info. It should be included - * after the frutree and system hierarchies are defined. - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -/* - * add a Devices table to DVD - */ -name:/frutree/chassis/MB/system-board/RMD0/removable-media - TABLE Devices - ROW - PROP Class string r 0 "cdrom" - REFPROP _cdrom_ name:/platform/pci@1e,600000/pci@0/pci@1/pci@0/ide@1f/sd@0,0 - ENDROW - ENDTABLE - -/* - * add Devices table for the keyswitch - */ -name:/frutree/chassis/SYSCTRL - TABLE Devices - ROW - PROP Class string r 0 "keyswitch" - REFPROP _keyswitch_ name:RMCLOMV/keyswitch - ENDROW - ENDTABLE - -/* - * add Devices table for the chassis - */ -name:/frutree/chassis - TABLE Devices - ROW - PROP Class string r 0 "chassis_serial_number" - REFPROP _chassis-serial-number_ name:RMCLOMV/chassis_serial_number - ENDROW - ENDTABLE - -/* - * add a Devices table to the system-board - */ -name:/frutree/chassis/MB/system-board - TABLE Devices - ROW - PROP Class string r 0 "voltage-sensor" - REFPROP _voltage-sensor_ name:RMCLOMV/mb_v_+3v3 - ENDROW - ROW - PROP Class string r 0 "voltage-sensor" - REFPROP _voltage-sensor_ name:RMCLOMV/mb_v_+12v - ENDROW - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:RMCLOMV/mb_t_remote - ENDROW - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:RMCLOMV/mb_t_1064 - ENDROW - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:RMCLOMV/mb_t_fire - ENDROW - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:RMCLOMV/mb_t_amb - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/sys_act - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/sys_service - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/sys_locate - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/sys_overtemp - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/sys_psfail - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/sys_fanfail - ENDROW - ROW - PROP Class string r 0 "keyswitch" - REFPROP _keyswitch_ name:RMCLOMV/keyswitch - ENDROW - ENDTABLE - -/* - * add a Devices table to the battery - */ -name:/frutree/chassis/MB/system-board/BATTERY/battery - TABLE Devices - ROW - PROP Class string r 0 "voltage-sensor" - REFPROP _voltage-sensor_ name:RMCLOMV/mb_bat_v_bat - ENDROW - ENDTABLE - -/* - * add a Devices table to the service-processor - */ -name:/frutree/chassis/MB/system-board/SC/sc - TABLE Devices - ROW - PROP Class string r 0 "service-processor" - REFPROP _service-processor_ name:RMCLOMV - ENDROW - ENDTABLE - -/* - * add a Devices table to the front io board - */ -name:/frutree/chassis/MB/system-board/FIOB/front-io-board-1 - TABLE Devices - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:RMCLOMV/fiob_t_amb - ENDROW - ENDTABLE - -name:/frutree/chassis/MB/system-board/FIOB/front-io-board-2 - TABLE Devices - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:RMCLOMV/fiob_t_amb - ENDROW - ENDTABLE - -/* - * add a Devices table to the disk back plane - */ -name:/frutree/chassis/MB/system-board/HDDBP/disk-backplane-1 - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/sasbp_f0 - ENDROW - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/sasbp_f1 - ENDROW - ENDTABLE - -name:/frutree/chassis/MB/system-board/HDDBP/disk-backplane-3 - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/sasbp_f0 - ENDROW - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/sasbp_f1 - ENDROW - ENDTABLE - -/* - * add a Devices table to the power distribution board - */ -name:/frutree/chassis/PDB - TABLE Devices - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:RMCLOMV/pdb_t_disk - ENDROW - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:RMCLOMV/pdb_t_ps0 - ENDROW - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:RMCLOMV/pdb_t_ps1 - ENDROW - ENDTABLE - -/* - * fru parent for DVD - */ -name:/platform/pci@1e,600000/pci@0/pci@1/pci@0/ide@1f/sd@0,0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/RMD0/removable-media - -/* - * fru parents for mother-board and other sensors - */ -name:RMCLOMV/mb_v_+3v3 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_v_+12v - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_t_remote - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_t_1064 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_t_fire - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/mb_t_amb - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/sys_act - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/sys_service - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/sys_locate - REFPROP _fru_parent name:/frutree/chassis/MB/system-board - PROP IsLocator string r 0 "true" - PROP LocatorName string r 0 "system" - PROP LocatorOn string r 0 "blinking" -name:RMCLOMV/sys_overtemp - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/sys_psfail - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/sys_fanfail - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -name:RMCLOMV/keyswitch - REFPROP _fru_parent name:/frutree/chassis/MB/system-board - PROP Label string r 0 "SYSCTRL" -name:RMCLOMV/chassis_serial_number - REFPROP _fru_parent name:/frutree/chassis - PROP Label string r 0 "CHASSISSERIAL" -name:RMCLOMV/pdb_t_disk - REFPROP _fru_parent name:/frutree/chassis/PDB/power-distribution-board -name:RMCLOMV/pdb_t_ps0 - REFPROP _fru_parent name:/frutree/chassis/PDB/power-distribution-board -name:RMCLOMV/pdb_t_ps1 - REFPROP _fru_parent name:/frutree/chassis/PDB/power-distribution-board -name:RMCLOMV/fiob_t_amb - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/FIOB/front-io-board-1 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/FIOB/front-io-board-2 -name:RMCLOMV/mb_bat_v_bat - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/BATTERY/battery -name:RMCLOMV/sasbp_f0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/HDDBP/disk-backplane-1 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/HDDBP/disk-backplane-3 - -name:RMCLOMV/sasbp_f1 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/HDDBP/disk-backplane-1 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/HDDBP/disk-backplane-3 - -/* - * add Devices tables for cpu-related sensors - */ -name:/frutree/chassis/MB/system-board/P0/cpu - TABLE Devices - ROW - PROP Class string r 0 "cpu" - REFPROP _cpu_ name:/platform/SUNW,UltraSPARC-IIIi+@0,0 - REFPROP _cpu_ name:/platform/SUNW,UltraSPARC-IIIi@0,0 - ENDROW - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:RMCLOMV/mb_p0_t_core - ENDROW - ROW - PROP Class string r 0 "voltage-sensor" - REFPROP _voltage-sensor_ name:RMCLOMV/mb_p0_v_core - ENDROW - ENDTABLE - -name:RMCLOMV/mb_p0_t_core - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/P0/cpu -name:RMCLOMV/mb_p0_v_core - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/P0/cpu - -name:/frutree/chassis/MB/system-board/P1/cpu - TABLE Devices - ROW - PROP Class string r 0 "cpu" - REFPROP _cpu_ name:/platform/SUNW,UltraSPARC-IIIi+@1,0 - REFPROP _cpu_ name:/platform/SUNW,UltraSPARC-IIIi@1,0 - ENDROW - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:RMCLOMV/mb_p1_t_core - ENDROW - ROW - PROP Class string r 0 "voltage-sensor" - REFPROP _voltage-sensor_ name:RMCLOMV/mb_p1_v_core - ENDROW - ENDTABLE -name:RMCLOMV/mb_p1_t_core - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/P1/cpu -name:RMCLOMV/mb_p1_v_core - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/P1/cpu - -name:/frutree/chassis/MB/system-board/P0/cpu/B0/bank/D0/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@0,0/memory-module-group?ID=0/memory-module?ID=0 - ENDROW - ENDTABLE -name:/frutree/chassis/MB/system-board/P0/cpu/B0/bank/D1/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@0,0/memory-module-group?ID=0/memory-module?ID=1 - ENDROW - ENDTABLE -name:/frutree/chassis/MB/system-board/P0/cpu/B1/bank/D0/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@0,0/memory-module-group?ID=1/memory-module?ID=0 - ENDROW - ENDTABLE -name:/frutree/chassis/MB/system-board/P0/cpu/B1/bank/D1/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@0,0/memory-module-group?ID=1/memory-module?ID=1 - ENDROW - ENDTABLE -name:/frutree/chassis/MB/system-board/P1/cpu/B0/bank/D0/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@1,0/memory-module-group?ID=0/memory-module?ID=0 - ENDROW - ENDTABLE -name:/frutree/chassis/MB/system-board/P1/cpu/B0/bank/D1/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@1,0/memory-module-group?ID=0/memory-module?ID=1 - ENDROW - ENDTABLE -name:/frutree/chassis/MB/system-board/P1/cpu/B1/bank/D0/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@1,0/memory-module-group?ID=1/memory-module?ID=0 - ENDROW - ENDTABLE -name:/frutree/chassis/MB/system-board/P1/cpu/B1/bank/D1/mem-module - TABLE Devices - ROW - PROP Class string r 0 "memory-module" - REFPROP _memory-module_ name:/platform/memory-controller@1,0/memory-module-group?ID=1/memory-module?ID=1 - ENDROW - ENDTABLE diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT0.info b/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT0.info deleted file mode 100644 index a6097ebeac..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT0.info +++ /dev/null @@ -1,105 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL plugin frudr in response - * to a PICL_FRU_ADDED event for FT0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#ifndef FCB0_1U -#define FCB0_1U /frutree/chassis/MB/system-board/FIOB/front-io-board-1/FCB0/fan-connector-board -#endif -#ifndef FCB0_2U -#define FCB0_2U /frutree/chassis/MB/system-board/FIOB/front-io-board-2/FCB0/fan-connector-board -#endif - -/* - * Create fan nodes for Seattle 1U - */ -name:FCB0_1U/FT0/fan-tray - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - ENDNODE - NODE F1 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F1" - ENDNODE - -/* - * Create fan nodes for Seattle 2U - */ -name:FCB0_2U/FT0/fan-tray - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - ENDNODE - -#include "fru_FT0_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT0_data.info b/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT0_data.info deleted file mode 100644 index 24dcee0fa9..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT0_data.info +++ /dev/null @@ -1,116 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for FT0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -#ifndef RMCLOMV -#define RMCLOMV /platform/ebus@1f,464000/rmc-comm@2,0/SUNW,rmclomv -#endif -#ifndef FCB0_1U -#define FCB0_1U /frutree/chassis/MB/system-board/FIOB/front-io-board-1/FCB0/fan-connector-board -#endif -#ifndef FCB0_2U -#define FCB0_2U /frutree/chassis/MB/system-board/FIOB/front-io-board-2/FCB0/fan-connector-board -#endif - -/* - * Create device table and location parents for Seattle 1U fans - */ -name:FCB0_1U/FT0/fan-tray/F0 - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/ft0_f0 - ENDROW - ENDTABLE -name:FCB0_1U/FT0/fan-tray/F1 - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/ft0_f1 - ENDROW - ENDTABLE -name:RMCLOMV/ft0_f0 - REFPROP _location_parent name:FCB0_1U/FT0/fan-tray/F0 -name:RMCLOMV/ft0_f1 - REFPROP _location_parent name:FCB0_1U/FT0/fan-tray/F1 - -/* - * Create device table and location parents for Seattle 2U fans - */ -name:FCB0_2U/FT0/fan-tray/F0 - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/ft0_f0 - ENDROW - ENDTABLE -name:RMCLOMV/ft0_f0 - REFPROP _location_parent name:FCB0_2U/FT0/fan-tray/F0 diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT1.info b/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT1.info deleted file mode 100644 index a546ffbba2..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT1.info +++ /dev/null @@ -1,105 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL plugin frudr in response - * to a PICL_FRU_ADDED event for FT1 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#ifndef FCB0_1U -#define FCB0_1U /frutree/chassis/MB/system-board/FIOB/front-io-board-1/FCB0/fan-connector-board -#endif -#ifndef FCB0_2U -#define FCB0_2U /frutree/chassis/MB/system-board/FIOB/front-io-board-2/FCB0/fan-connector-board -#endif - -/* - * Create fan nodes for Seattle 1U - */ -name:FCB0_1U/FT1/fan-tray - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - ENDNODE - NODE F1 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F1" - ENDNODE - -/* - * Create fan nodes for Seattle 2U - */ -name:FCB0_2U/FT1/fan-tray - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - ENDNODE - -#include "fru_FT1_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT1_data.info b/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT1_data.info deleted file mode 100644 index 9e92c899fd..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT1_data.info +++ /dev/null @@ -1,116 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for FT1 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -#ifndef RMCLOMV -#define RMCLOMV /platform/ebus@1f,464000/rmc-comm@2,0/SUNW,rmclomv -#endif -#ifndef FCB0_1U -#define FCB0_1U /frutree/chassis/MB/system-board/FIOB/front-io-board-1/FCB0/fan-connector-board -#endif -#ifndef FCB0_2U -#define FCB0_2U /frutree/chassis/MB/system-board/FIOB/front-io-board-2/FCB0/fan-connector-board -#endif - -/* - * Create device table and location parents for Seattle 1U fans - */ -name:FCB0_1U/FT1/fan-tray/F0 - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/ft1_f0 - ENDROW - ENDTABLE -name:FCB0_1U/FT1/fan-tray/F1 - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/ft1_f1 - ENDROW - ENDTABLE -name:RMCLOMV/ft1_f0 - REFPROP _location_parent name:FCB0_1U/FT1/fan-tray/F0 -name:RMCLOMV/ft1_f1 - REFPROP _location_parent name:FCB0_1U/FT1/fan-tray/F1 - -/* - * Create device table and location parents for Seattle 2U fans - */ -name:FCB0_2U/FT1/fan-tray/F0 - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/ft1_f0 - ENDROW - ENDTABLE -name:RMCLOMV/ft1_f0 - REFPROP _location_parent name:FCB0_2U/FT1/fan-tray/F0 diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT2.info b/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT2.info deleted file mode 100644 index 7ba73105e8..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT2.info +++ /dev/null @@ -1,105 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL plugin frudr in response - * to a PICL_FRU_ADDED event for FT2 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#ifndef FCB0_1U -#define FCB0_1U /frutree/chassis/MB/system-board/FIOB/front-io-board-1/FCB0/fan-connector-board -#endif -#ifndef FCB0_2U -#define FCB0_2U /frutree/chassis/MB/system-board/FIOB/front-io-board-2/FCB0/fan-connector-board -#endif - -/* - * Create fan nodes for Seattle 1U - */ -name:FCB0_1U/FT2/fan-tray - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - ENDNODE - NODE F1 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F1" - ENDNODE - -/* - * Create fan nodes for Seattle 2U - */ -name:FCB0_2U/FT2/fan-tray - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - ENDNODE - -#include "fru_FT2_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT2_data.info b/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT2_data.info deleted file mode 100644 index 6392708749..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT2_data.info +++ /dev/null @@ -1,117 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for FT2 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -#ifndef RMCLOMV -#define RMCLOMV /platform/ebus@1f,464000/rmc-comm@2,0/SUNW,rmclomv -#endif -#ifndef FCB0_1U -#define FCB0_1U /frutree/chassis/MB/system-board/FIOB/front-io-board-1/FCB0/fan-connector-board -#endif -#ifndef FCB0_2U -#define FCB0_2U /frutree/chassis/MB/system-board/FIOB/front-io-board-2/FCB0/fan-connector-board -#endif - -/* - * Create device table and location parents for the Seattle 1U fans - */ -name:FCB0_1U/FT2/fan-tray/F0 - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/ft2_f0 - ENDROW - ENDTABLE -name:FCB0_1U/FT2/fan-tray/F1 - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/ft2_f1 - ENDROW - ENDTABLE -name:RMCLOMV/ft2_f0 - REFPROP _location_parent name:FCB0_1U/FT2/fan-tray/F0 -name:RMCLOMV/ft2_f1 - REFPROP _location_parent name:FCB0_1U/FT2/fan-tray/F1 - - -/* - * Create device table and location parents for Seattle 2U fans - */ -name:FCB0_2U/FT2/fan-tray/F0 - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/ft2_f0 - ENDROW - ENDTABLE -name:RMCLOMV/ft2_f0 - REFPROP _location_parent name:FCB0_2U/FT2/fan-tray/F0 diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT3.info b/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT3.info deleted file mode 100644 index 8ddc041ac7..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT3.info +++ /dev/null @@ -1,105 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL plugin frudr in response - * to a PICL_FRU_ADDED event for FT3 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#ifndef FCB1_1U -#define FCB1_1U /frutree/chassis/MB/system-board/FIOB/front-io-board-1/FCB1/fan-connector-board -#endif -#ifndef FCB1_2U -#define FCB1_2U /frutree/chassis/MB/system-board/FIOB/front-io-board-2/FCB1/fan-connector-board -#endif - -/* - * Create fan nodes for Seattle 1U - */ -name:FCB1_1U/FT3/fan-tray - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - ENDNODE - NODE F1 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F1" - ENDNODE - -/* - * Create fan nodes for Seattle 2U - */ -name:FCB1_2U/FT3/fan-tray - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - ENDNODE - -#include "fru_FT3_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT3_data.info b/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT3_data.info deleted file mode 100644 index beddfa0541..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT3_data.info +++ /dev/null @@ -1,117 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for FT3 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -#ifndef RMCLOMV -#define RMCLOMV /platform/ebus@1f,464000/rmc-comm@2,0/SUNW,rmclomv -#endif -#ifndef FCB1_1U -#define FCB1_1U /frutree/chassis/MB/system-board/FIOB/front-io-board-1/FCB1/fan-connector-board -#endif -#ifndef FCB1_2U -#define FCB1_2U /frutree/chassis/MB/system-board/FIOB/front-io-board-2/FCB1/fan-connector-board -#endif - -/* - * Create device table and location parents for Seattle 1U fans - */ -name:FCB1_1U/FT3/fan-tray/F0 - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/ft3_f0 - ENDROW - ENDTABLE -name:FCB1_1U/FT3/fan-tray/F1 - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/ft3_f1 - ENDROW - ENDTABLE -name:RMCLOMV/ft3_f0 - REFPROP _location_parent name:FCB1_1U/FT3/fan-tray/F0 -name:RMCLOMV/ft3_f1 - REFPROP _location_parent name:FCB1_1U/FT3/fan-tray/F1 - - -/* - * Create device table and location parents for Seattle 2U fans - */ -name:FCB1_2U/FT3/fan-tray/F0 - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/ft3_f0 - ENDROW - ENDTABLE -name:RMCLOMV/ft3_f0 - REFPROP _location_parent name:FCB1_2U/FT3/fan-tray/F0 diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT4.info b/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT4.info deleted file mode 100644 index 1faf4adbbe..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT4.info +++ /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 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin frudr in response - * to a PICL_FRU_ADDED event for FT4 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#ifndef FCB1_1U -#define FCB1_1U /frutree/chassis/MB/system-board/FIOB/front-io-board-1/FCB1/fan-connector-board -#endif -#ifndef FCB1_2U -#define FCB1_2U /frutree/chassis/MB/system-board/FIOB/front-io-board-2/FCB1/fan-connector-board -#endif - -/* - * Create fan nodes for Seattle 1U - */ -name:FCB1_1U/FT4/fan-tray - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - ENDNODE - NODE F1 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F1" - ENDNODE - - -/* - * Create fan nodes for Seattle 2U - */ -name:FCB1_2U/FT4/fan-tray - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - ENDNODE - -#include "fru_FT4_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT4_data.info b/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT4_data.info deleted file mode 100644 index 8bba305929..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT4_data.info +++ /dev/null @@ -1,117 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for FT4 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -#ifndef RMCLOMV -#define RMCLOMV /platform/ebus@1f,464000/rmc-comm@2,0/SUNW,rmclomv -#endif -#ifndef FCB1_1U -#define FCB1_1U /frutree/chassis/MB/system-board/FIOB/front-io-board-1/FCB1/fan-connector-board -#endif -#ifndef FCB1_2U -#define FCB1_2U /frutree/chassis/MB/system-board/FIOB/front-io-board-2/FCB1/fan-connector-board -#endif - -/* - * Create device table and location parents for Seattle 1U fans - */ -name:FCB1_1U/FT4/fan-tray/F0 - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/ft4_f0 - ENDROW - ENDTABLE -name:FCB1_1U/FT4/fan-tray/F1 - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/ft4_f1 - ENDROW - ENDTABLE -name:RMCLOMV/ft4_f0 - REFPROP _location_parent name:FCB1_1U/FT4/fan-tray/F0 -name:RMCLOMV/ft4_f1 - REFPROP _location_parent name:FCB1_1U/FT4/fan-tray/F1 - - -/* - * Create device table and location parents for Seattle 2U fans - */ -name:FCB1_2U/FT4/fan-tray/F0 - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/ft4_f0 - ENDROW - ENDTABLE -name:RMCLOMV/ft4_f0 - REFPROP _location_parent name:FCB1_2U/FT4/fan-tray/F0 diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT5.info b/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT5.info deleted file mode 100644 index c6e768f687..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT5.info +++ /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 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin frudr in response - * to a PICL_FRU_ADDED event for FT5 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#ifndef FCB1_1U -#define FCB1_1U /frutree/chassis/MB/system-board/FIOB/front-io-board-1/FCB1/fan-connector-board -#endif -#ifndef FCB1_2U -#define FCB1_2U /frutree/chassis/MB/system-board/FIOB/front-io-board-2/FCB1/fan-connector-board -#endif - -/* - * Create fan nodes for Seattle 1U - */ -name:FCB1_1U/FT5/fan-tray - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - ENDNODE - NODE F1 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F1" - ENDNODE - - -/* - * Create fan nodes for Seattle 2U - */ -name:FCB1_2U/FT5/fan-tray - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - ENDNODE - -#include "fru_FT5_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT5_data.info b/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT5_data.info deleted file mode 100644 index d47d64e89d..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT5_data.info +++ /dev/null @@ -1,117 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for FT5 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -#ifndef RMCLOMV -#define RMCLOMV /platform/ebus@1f,464000/rmc-comm@2,0/SUNW,rmclomv -#endif -#ifndef FCB1_1U -#define FCB1_1U /frutree/chassis/MB/system-board/FIOB/front-io-board-1/FCB1/fan-connector-board -#endif -#ifndef FCB1_2U -#define FCB1_2U /frutree/chassis/MB/system-board/FIOB/front-io-board-2/FCB1/fan-connector-board -#endif - -/* - * Create device table and location parents for Seattle 1U fans - */ -name:FCB1_1U/FT5/fan-tray/F0 - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/ft5_f0 - ENDROW - ENDTABLE -name:FCB1_1U/FT5/fan-tray/F1 - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/ft5_f1 - ENDROW - ENDTABLE -name:RMCLOMV/ft5_f0 - REFPROP _location_parent name:FCB1_1U/FT5/fan-tray/F0 -name:RMCLOMV/ft5_f1 - REFPROP _location_parent name:FCB1_1U/FT5/fan-tray/F1 - - -/* - * Create device table and location parents for Seattle 2U fans - */ -name:FCB1_2U/FT5/fan-tray/F0 - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/ft5_f0 - ENDROW - ENDTABLE -name:RMCLOMV/ft5_f0 - REFPROP _location_parent name:FCB1_2U/FT5/fan-tray/F0 diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT6.info b/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT6.info deleted file mode 100644 index 91b9f7aae7..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT6.info +++ /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. - */ - -/* - * ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin frudr in response - * to a PICL_FRU_ADDED event for FT6 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#ifndef PDB_1U -#define PDB_1U /frutree/chassis/PDB/power-distribution-board -#endif -#ifndef PDB_2U -#define PDB_2U /frutree/chassis/PDB/power-distribution-board/HDDFB/fan-connector-board -#endif - - -/* - * Create fan nodes for Seattle 1U - */ -name:PDB_1U/FT6/fan-tray - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - ENDNODE - NODE F1 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F1" - ENDNODE - - -/* - * Create fan nodes for Seattle 2U - */ -name:PDB_2U/FT6/fan-tray - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - ENDNODE - NODE F1 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F1" - ENDNODE - -#include "fru_FT6_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT6_data.info b/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT6_data.info deleted file mode 100644 index 039f47637b..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_FT6_data.info +++ /dev/null @@ -1,127 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for FT6 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -#ifndef RMCLOMV -#define RMCLOMV /platform/ebus@1f,464000/rmc-comm@2,0/SUNW,rmclomv -#endif -#ifndef PDB_1U -#define PDB_1U /frutree/chassis/PDB/power-distribution-board -#endif -#ifndef PDB_2U -#define PDB_2U /frutree/chassis/PDB/power-distribution-board/HDDFB/fan-connector-board -#endif - - -/* - * Create device table and location parents for Seattle 1U fans - */ -name:PDB_1U/FT6/fan-tray/F0 - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/pdb_ft6_f0 - ENDROW - ENDTABLE -name:PDB_1U/FT6/fan-tray/F1 - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/pdb_ft6_f1 - ENDROW - ENDTABLE -name:RMCLOMV/pdb_ft6_f0 - REFPROP _location_parent name:PDB_1U/FT6/fan-tray/F0 -name:RMCLOMV/pdb_ft6_f1 - REFPROP _location_parent name:PDB_1U/FT6/fan-tray/F1 - - -/* - * Create device table and location parents for Seattle 2U fans - */ -name:PDB_2U/FT6/fan-tray/F0 - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/pdb_hddfb_ft6_f0 - ENDROW - ENDTABLE -name:PDB_2U/FT6/fan-tray/F1 - TABLE Devices - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ name:RMCLOMV/pdb_hddfb_ft6_f1 - ENDROW - ENDTABLE -name:RMCLOMV/pdb_hddfb_ft6_f0 - REFPROP _location_parent name:PDB_2U/FT6/fan-tray/F0 -name:RMCLOMV/pdb_hddfb_ft6_f1 - REFPROP _location_parent name:PDB_2U/FT6/fan-tray/F1 diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_HDD0.info b/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_HDD0.info deleted file mode 100644 index 0620fceabb..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_HDD0.info +++ /dev/null @@ -1,76 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for HDD0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_HDD0_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_HDD0_data.info b/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_HDD0_data.info deleted file mode 100644 index ff3e14fd13..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_HDD0_data.info +++ /dev/null @@ -1,105 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for HDD0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -#ifndef DISKBP1 -#define DISKBP1 /frutree/chassis/MB/system-board/HDDBP/disk-backplane-1 -#endif - -#ifndef DISKBP3 -#define DISKBP3 /frutree/chassis/MB/system-board/HDDBP/disk-backplane-3 -#endif - -name:DISKBP1/HDD0/disk -TABLE Devices -ROW -PROP Class string r 0 "block" -REFPROP _block_ name:/platform/pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1/sd@0,0 -ENDROW -ENDTABLE - -name:/platform/pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1/sd@0,0 - REFPROP _fru_parent name:DISKBP1/HDD0/disk -name:DISKBP1/HDD0/disk - PROP OperationalStatus string r 0 "present" - -name:DISKBP3/HDD0/disk -TABLE Devices -ROW -PROP Class string r 0 "block" -REFPROP _block_ name:/platform/pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1/sd@0,0 -ENDROW -ENDTABLE - -name:/platform/pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1/sd@0,0 - REFPROP _fru_parent name:DISKBP3/HDD0/disk -name:DISKBP3/HDD0/disk - PROP OperationalStatus string r 0 "present" diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_HDD1.info b/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_HDD1.info deleted file mode 100644 index 8530007abc..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_HDD1.info +++ /dev/null @@ -1,76 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for HDD1 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_HDD1_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_HDD1_data.info b/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_HDD1_data.info deleted file mode 100644 index f3153d062b..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_HDD1_data.info +++ /dev/null @@ -1,105 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for HDD1 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -#ifndef DISKBP1 -#define DISKBP1 /frutree/chassis/MB/system-board/HDDBP/disk-backplane-1 -#endif - -#ifndef DISKBP3 -#define DISKBP3 /frutree/chassis/MB/system-board/HDDBP/disk-backplane-3 -#endif - -name:DISKBP1/HDD1/disk -TABLE Devices -ROW -PROP Class string r 0 "block" -REFPROP _block_ name:/platform/pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1/sd@1,0 -ENDROW -ENDTABLE - -name:/platform/pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1/sd@1,0 - REFPROP _fru_parent name:DISKBP1/HDD1/disk -name:DISKBP1/HDD1/disk - PROP OperationalStatus string r 0 "present" - -name:DISKBP3/HDD1/disk -TABLE Devices -ROW -PROP Class string r 0 "block" -REFPROP _block_ name:/platform/pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1/sd@1,0 -ENDROW -ENDTABLE - -name:/platform/pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1/sd@1,0 - REFPROP _fru_parent name:DISKBP3/HDD1/disk -name:DISKBP3/HDD1/disk - PROP OperationalStatus string r 0 "present" diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_HDD2.info b/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_HDD2.info deleted file mode 100644 index 5dd7d8e231..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_HDD2.info +++ /dev/null @@ -1,76 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for HDD2 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_HDD2_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_HDD2_data.info b/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_HDD2_data.info deleted file mode 100644 index 612e32344e..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_HDD2_data.info +++ /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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for HDD2 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -#ifndef DISKBP3 -#define DISKBP3 /frutree/chassis/MB/system-board/HDDBP/disk-backplane-3 -#endif - -name:DISKBP3/HDD2/disk -TABLE Devices -ROW -PROP Class string r 0 "block" -REFPROP _block_ name:/platform/pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1/sd@2,0 -ENDROW -ENDTABLE - -name:/platform/pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1/sd@2,0 - REFPROP _fru_parent name:DISKBP3/HDD2/disk -name:DISKBP3/HDD2/disk - PROP OperationalStatus string r 0 "present" diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_HDD3.info b/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_HDD3.info deleted file mode 100644 index 9f918c0a9b..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_HDD3.info +++ /dev/null @@ -1,76 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for HDD3 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_HDD3_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_HDD3_data.info b/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_HDD3_data.info deleted file mode 100644 index f646cf4701..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_HDD3_data.info +++ /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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for HDD3 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -#ifndef DISKBP3 -#define DISKBP3 /frutree/chassis/MB/system-board/HDDBP/disk-backplane-3 -#endif - -name:DISKBP3/HDD3/disk -TABLE Devices -ROW -PROP Class string r 0 "block" -REFPROP _block_ name:/platform/pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1/sd@3,0 -ENDROW -ENDTABLE - -name:/platform/pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1/sd@3,0 - REFPROP _fru_parent name:DISKBP3/HDD3/disk -name:DISKBP3/HDD3/disk - PROP OperationalStatus string r 0 "present" diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_PS0.info b/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_PS0.info deleted file mode 100644 index eb71c413f2..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_PS0.info +++ /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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -/* - * create /platform seeprom node properties - */ -name:/platform/i2c@1f,530000/power-supply-fru-prom@0,6c - PROP binding-name string r 0 "i2c-at34c02" - PROP driver-name string r 0 "seeprom" - PROP devfs-path string r 0 "/i2c@1f,530000/power-supply-fru-prom" - PROP compatible string r 0 "i2c-at34c02" - PROP device_type string r 0 "fru-prom" - PROP UnitAddress string r 0 "0,6c" - -/* and then add /frutree node and cross-references */ -#include "fru_PS0_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_PS0_data.info b/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_PS0_data.info deleted file mode 100644 index 29592db3dc..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_PS0_data.info +++ /dev/null @@ -1,152 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -#ifndef RMCLOMV -#define RMCLOMV /platform/ebus@1f,464000/rmc-comm@2,0/SUNW,rmclomv -#endif /* RMCLOMV */ - -name:/frutree/chassis/PS0/power-supply - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,530000/power-supply-fru-prom@0,6c -TABLE Devices -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps0_p_pwr -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps0_p_pwr2 -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps0_ff_pok -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps0_ff_uv -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps0_ff_ov -ENDROW -ROW -PROP Class string r 0 "current-indicator" -REFPROP _current-indicator_ name:RMCLOMV/ps0_ff_oc -ENDROW -ROW -PROP Class string r 0 "temperature-indicator" -REFPROP _temperature-indicator_ name:RMCLOMV/ps0_ff_ot -ENDROW -ROW -PROP Class string r 0 "fan" -REFPROP _fan_ name:RMCLOMV/ps0_ff_fan -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps0_dc_ok -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps0_ac_ok -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps0_service -ENDROW -ENDTABLE - -name:/platform/i2c@1f,530000/power-supply-fru-prom@0,6c - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply - PROP FRUDevicePath string r 0 "/devices/i2c@1f,530000/power-supply-fru-prom@0,6c:power-supply-fru-prom" - -name:RMCLOMV/ps0_p_pwr - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_p_pwr2 - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_ff_pok - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_ff_uv - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_ff_ov - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_ff_oc - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_ff_ot - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_ff_fan - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_dc_ok - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_ac_ok - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply -name:RMCLOMV/ps0_service - REFPROP _fru_parent name:/frutree/chassis/PS0/power-supply diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_PS1.info b/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_PS1.info deleted file mode 100644 index 308cc774bc..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_PS1.info +++ /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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS1 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -/* - * create /platform seeprom node properties - */ -name:/platform/i2c@1f,530000/power-supply-fru-prom@0,6e - PROP binding-name string r 0 "i2c-at34c02" - PROP driver-name string r 0 "seeprom" - PROP devfs-path string r 0 "/i2c@1f,530000/power-supply-fru-prom" - PROP compatible string r 0 "i2c-at34c02" - PROP device_type string r 0 "fru-prom" - PROP UnitAddress string r 0 "0,6e" - -/* and then add /frutree node and cross-references */ -#include "fru_PS1_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_PS1_data.info b/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_PS1_data.info deleted file mode 100644 index 038cb219f6..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_PS1_data.info +++ /dev/null @@ -1,152 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICL_FRU_ADDED event for PS1 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -#ifndef RMCLOMV -#define RMCLOMV /platform/ebus@1f,464000/rmc-comm@2,0/SUNW,rmclomv -#endif /* RMCLOMV */ - -name:/frutree/chassis/PS1/power-supply - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,530000/power-supply-fru-prom@0,6e -TABLE Devices -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps1_p_pwr -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps1_p_pwr2 -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps1_ff_pok -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps1_ff_uv -ENDROW -ROW -PROP Class string r 0 "voltage-indicator" -REFPROP _voltage-indicator_ name:RMCLOMV/ps1_ff_ov -ENDROW -ROW -PROP Class string r 0 "current-indicator" -REFPROP _current-indicator_ name:RMCLOMV/ps1_ff_oc -ENDROW -ROW -PROP Class string r 0 "temperature-indicator" -REFPROP _temperature-indicator_ name:RMCLOMV/ps1_ff_ot -ENDROW -ROW -PROP Class string r 0 "fan" -REFPROP _fan_ name:RMCLOMV/ps1_ff_fan -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps1_dc_ok -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps1_ac_ok -ENDROW -ROW -PROP Class string r 0 "led" -REFPROP _led_ name:RMCLOMV/ps1_service -ENDROW -ENDTABLE - -name:/platform/i2c@1f,530000/power-supply-fru-prom@0,6e - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply - PROP FRUDevicePath string r 0 "/devices/i2c@1f,530000/power-supply-fru-prom@0,6e:power-supply-fru-prom" - -name:RMCLOMV/ps1_p_pwr - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply -name:RMCLOMV/ps1_p_pwr2 - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply -name:RMCLOMV/ps1_ff_pok - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply -name:RMCLOMV/ps1_ff_uv - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply -name:RMCLOMV/ps1_ff_ov - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply -name:RMCLOMV/ps1_ff_oc - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply -name:RMCLOMV/ps1_ff_ot - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply -name:RMCLOMV/ps1_ff_fan - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply -name:RMCLOMV/ps1_dc_ok - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply -name:RMCLOMV/ps1_ac_ok - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply -name:RMCLOMV/ps1_service - REFPROP _fru_parent name:/frutree/chassis/PS1/power-supply diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_SC.info b/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_SC.info deleted file mode 100644 index 46f9b043e4..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_SC.info +++ /dev/null @@ -1,75 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to various PICL_FRU_ADDED events. - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_SC_data.info" -#include "SB-tables.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_SC_data.info b/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_SC_data.info deleted file mode 100644 index d2f988353e..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_SC_data.info +++ /dev/null @@ -1,254 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -/* - * There are a lot of nodes below the rmclomv node, define a shortname - * Likewise for disks - */ -#ifndef RMCLOMV -#define RMCLOMV /platform/ebus@1f,464000/rmc-comm@2,0/SUNW,rmclomv -#endif - -#ifndef DISKBP1 -#define DISKBP1 /frutree/chassis/MB/system-board/HDDBP/disk-backplane-1 -#endif - -#ifndef DISKBP3 -#define DISKBP3 /frutree/chassis/MB/system-board/HDDBP/disk-backplane-3 -#endif - -/* - * add disk leds - */ -name:DISKBP1/HDD0 - TABLE Devices - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd0_act - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd0_service - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd0_ok2rm - ENDROW - ENDTABLE - -name:RMCLOMV/hdd0_act - REFPROP _location_parent name:DISKBP1/HDD0 -name:RMCLOMV/hdd0_service - REFPROP _location_parent name:DISKBP1/HDD0 -name:RMCLOMV/hdd0_ok2rm - REFPROP _location_parent name:DISKBP1/HDD0 - -name:DISKBP1/HDD1 - TABLE Devices - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd1_act - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd1_service - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd1_ok2rm - ENDROW - ENDTABLE - -name:RMCLOMV/hdd1_act - REFPROP _location_parent name:DISKBP1/HDD1 -name:RMCLOMV/hdd1_service - REFPROP _location_parent name:DISKBP1/HDD1 -name:RMCLOMV/hdd1_ok2rm - REFPROP _location_parent name:DISKBP1/HDD1 - -name:DISKBP3/HDD0 - TABLE Devices - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd0_act - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd0_service - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd0_ok2rm - ENDROW - ENDTABLE - -name:RMCLOMV/hdd0_act - REFPROP _location_parent name:DISKBP3/HDD0 -name:RMCLOMV/hdd0_service - REFPROP _location_parent name:DISKBP3/HDD0 -name:RMCLOMV/hdd0_ok2rm - REFPROP _location_parent name:DISKBP3/HDD0 - -name:DISKBP3/HDD1 - TABLE Devices - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd1_act - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd1_service - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd1_ok2rm - ENDROW - ENDTABLE - -name:RMCLOMV/hdd1_act - REFPROP _location_parent name:DISKBP3/HDD1 -name:RMCLOMV/hdd1_service - REFPROP _location_parent name:DISKBP3/HDD1 -name:RMCLOMV/hdd1_ok2rm - REFPROP _location_parent name:DISKBP3/HDD1 - -name:DISKBP3/HDD2 - TABLE Devices - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd2_act - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd2_service - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd2_ok2rm - ENDROW - ENDTABLE - -name:RMCLOMV/hdd2_act - REFPROP _location_parent name:DISKBP3/HDD2 -name:RMCLOMV/hdd2_service - REFPROP _location_parent name:DISKBP3/HDD2 -name:RMCLOMV/hdd2_ok2rm - REFPROP _location_parent name:DISKBP3/HDD2 - -name:DISKBP3/HDD3 - TABLE Devices - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd3_act - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd3_service - ENDROW - ROW - PROP Class string r 0 "led" - REFPROP _led_ name:RMCLOMV/hdd3_ok2rm - ENDROW - ENDTABLE - -name:RMCLOMV/hdd3_act - REFPROP _location_parent name:DISKBP3/HDD3 -name:RMCLOMV/hdd3_service - REFPROP _location_parent name:DISKBP3/HDD3 -name:RMCLOMV/hdd3_ok2rm - REFPROP _location_parent name:DISKBP3/HDD3 - -/* add disk Device tables and _fru_parent refprops */ -#include "fru_HDD0_data.info" -#include "fru_HDD1_data.info" -#include "fru_HDD2_data.info" -#include "fru_HDD3_data.info" - -/* - * power supplies - */ -#include "fru_PS0_data.info" -#include "fru_PS1_data.info" - -/* - * USB ports - */ -#include "fru_usb-a-1_data.info" -#include "fru_usb-a-2_data.info" -#include "fru_usb-a-3_data.info" -#include "fru_usb-a-4_data.info" - -/* - * fans - */ -#include "fru_FT0_data.info" -#include "fru_FT1_data.info" -#include "fru_FT2_data.info" -#include "fru_FT3_data.info" -#include "fru_FT4_data.info" -#include "fru_FT5_data.info" -#include "fru_FT6_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_usb-a-1.info b/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_usb-a-1.info deleted file mode 100644 index 6335fe700d..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_usb-a-1.info +++ /dev/null @@ -1,74 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICLEVENT_SYSEVENT_DEVICE_ADDED event for USB0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_usb-a-1_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_usb-a-1_data.info b/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_usb-a-1_data.info deleted file mode 100644 index bc0e2c3d4d..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_usb-a-1_data.info +++ /dev/null @@ -1,74 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICLEVENT_SYSEVENT_DEVICE_ADDED event for USB0 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -_class:/jbus/pciex@1e,600000/pciex@0/pciex@1/pci@0/usb@1c/picl?bus-addr=1 - REFPROP _location_parent name:/frutree/chassis/MB/system-board/USB0 -_class:/jbus/pciex@1e,600000/pciex@0/pciex@1/pci@0/usb@1c,3/picl?bus-addr=1 - REFPROP _location_parent name:/frutree/chassis/MB/system-board/USB0 diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_usb-a-2.info b/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_usb-a-2.info deleted file mode 100644 index f05be32922..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_usb-a-2.info +++ /dev/null @@ -1,74 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICLEVENT_SYSEVENT_DEVICE_ADDED event for USB1 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_usb-a-2_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_usb-a-2_data.info b/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_usb-a-2_data.info deleted file mode 100644 index 6ceea74cc0..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_usb-a-2_data.info +++ /dev/null @@ -1,74 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICLEVENT_SYSEVENT_DEVICE_ADDED event for USB1 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -_class:/jbus/pciex@1e,600000/pciex@0/pciex@1/pci@0/usb@1c/picl?bus-addr=2 - REFPROP _location_parent name:/frutree/chassis/MB/system-board/USB1 -_class:/jbus/pciex@1e,600000/pciex@0/pciex@1/pci@0/usb@1c,3/picl?bus-addr=2 - REFPROP _location_parent name:/frutree/chassis/MB/system-board/USB1 diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_usb-a-3.info b/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_usb-a-3.info deleted file mode 100644 index 831c8a2685..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_usb-a-3.info +++ /dev/null @@ -1,74 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICLEVENT_SYSEVENT_DEVICE_ADDED event for USB2 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_usb-a-3_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_usb-a-3_data.info b/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_usb-a-3_data.info deleted file mode 100644 index a41a468ffc..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_usb-a-3_data.info +++ /dev/null @@ -1,78 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICLEVENT_SYSEVENT_DEVICE_ADDED event for USB2 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -_class:/jbus/pciex@1e,600000/pciex@0/pciex@1/pci@0/usb@1c/picl?bus-addr=3 - REFPROP _location_parent name:/frutree/chassis/MB/system-board/FIOB/front-io-board-1/USB2 -_class:/jbus/pciex@1e,600000/pciex@0/pciex@1/pci@0/usb@1c,1/picl?bus-addr=1 - REFPROP _location_parent name:/frutree/chassis/MB/system-board/FIOB/front-io-board-1/USB2 -_class:/jbus/pciex@1e,600000/pciex@0/pciex@1/pci@0/usb@1c,3/picl?bus-addr=3 - REFPROP _location_parent name:/frutree/chassis/MB/system-board/FIOB/front-io-board-1/USB2 -_class:/jbus/pciex@1e,600000/pciex@0/pciex@1/pci@0/usb@1c,1/usb@1/picl?bus-addr=1 - REFPROP _location_parent name:/frutree/chassis/MB/system-board/FIOB/front-io-board-2/USB2 diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_usb-a-4.info b/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_usb-a-4.info deleted file mode 100644 index 61844a3ebb..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_usb-a-4.info +++ /dev/null @@ -1,74 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICLEVENT_SYSEVENT_DEVICE_ADDED event for USB3 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -VERSION 1.1 -VERBOSE 1 - -#include "fru_usb-a-4_data.info" diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_usb-a-4_data.info b/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_usb-a-4_data.info deleted file mode 100644 index a916bdc018..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frudr/fru_usb-a-4_data.info +++ /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 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * ident "%Z%%M% %I% %E% SMI" - * - * This configuration file is parsed by PICL plugin envmon in response - * to a PICLEVENT_SYSEVENT_DEVICE_ADDED event for USB3 - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -_class:/jbus/pciex@1e,600000/pciex@0/pciex@1/pci@0/usb@1c,1/usb@1/picl?bus-addr=2 - REFPROP _location_parent name:/frutree/chassis/MB/system-board/FIOB/front-io-board-2/USB3 diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frutree/Makefile b/usr/src/cmd/picl/plugins/sun4u/seattle/frutree/Makefile deleted file mode 100644 index 8b6e8b313f..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frutree/Makefile +++ /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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# cmd/picl/plugins/sun4u/seattle/frutree/Makefile -# - -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-V215 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -INCDIR1 = . -INCDIR2 = ../frudr -INCS = -I$(INCDIR1) -I$(INCDIR2) -CONFS = piclfrutree.conf -ROOTCONF = $(CONFS:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 -MAININFO = $(CONFS:%.conf=%.info) -OTHERINFOS = $(INCDIR1)/system-board.info -OTHERINFOS += $(INCDIR2)/fru_HDD0_data.info -OTHERINFOS += $(INCDIR2)/fru_HDD1_data.info -OTHERINFOS += $(INCDIR2)/fru_HDD2_data.info -OTHERINFOS += $(INCDIR2)/fru_HDD3_data.info -OTHERINFOS += $(INCDIR2)/fru_PS0_data.info -OTHERINFOS += $(INCDIR2)/fru_PS1_data.info -OTHERINFOS += $(INCDIR2)/fru_SC_data.info -OTHERINFOS += $(INCDIR2)/fru_usb-a-1_data.info -OTHERINFOS += $(INCDIR2)/fru_usb-a-2_data.info -OTHERINFOS += $(INCDIR2)/fru_usb-a-3_data.info -OTHERINFOS += $(INCDIR2)/fru_usb-a-4_data.info -OTHERINFOS += $(INCDIR2)/fru_FT0_data.info -OTHERINFOS += $(INCDIR2)/fru_FT1_data.info -OTHERINFOS += $(INCDIR2)/fru_FT2_data.info -OTHERINFOS += $(INCDIR2)/fru_FT3_data.info -OTHERINFOS += $(INCDIR2)/fru_FT4_data.info -OTHERINFOS += $(INCDIR2)/fru_FT5_data.info -OTHERINFOS += $(INCDIR2)/fru_FT6_data.info - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: $(CONFS) - -install: $(ROOTLIBDIR) $(ROOTCONF) - -$(CONFS): $(MAININFO) $(OTHERINFOS) - @$(RM) -f $@ - @echo "# Copyright 2005 Sun Microsystems, Inc. " \ - "All rights reserved." > $@ - @echo "# Use is subject to license terms." >> $@ - @echo "# This is a generated file. #ident lines identify sources" >> $@ - $(CPP) -P $(INCS) $(@:%.conf=%.info) | \ - $(SED) -e '/^[ ]*$$/d' >> $@ - @$(CHMOD) 444 $@ - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frutree/piclfrutree.info b/usr/src/cmd/picl/plugins/sun4u/seattle/frutree/piclfrutree.info deleted file mode 100644 index 78d3413c15..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frutree/piclfrutree.info +++ /dev/null @@ -1,126 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.0 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -/* - * There are a lot of nodes below the rmclomv node, define a shortname - */ -#define RMCLOMV /platform/ebus@1f,464000/rmc-comm@2,0/SUNW,rmclomv - - -VERSION 1.1 -VERBOSE 1 -NODE frutree picl - NODE chassis fru - /* - * SunMC physical view view_points for this platform - * This will get moved to a separate SunMC physical view plugin later. - */ - PROP ViewPoints string r 0 "front rear side" - NODE MB location - PROP SlotType string r 0 "system-board" - PROP Label string r 0 "MB" - ENDNODE - NODE PS0 location - PROP SlotType string r 0 "power-supply" - PROP Label string r 0 "PS0" - ENDNODE - NODE PS1 location - PROP SlotType string r 0 "power-supply" - PROP Label string r 0 "PS1" - ENDNODE - NODE PDB location - PROP SlotType string r 0 "PDB" - PROP Label string r 0 "PDB" - ENDNODE - NODE SYSCTRL location - PROP Label string r 0 "SYSCTRL" - ENDNODE - ENDNODE -ENDNODE - -/* - * add power-supply nodes if their fru-proms are visible - */ -name:/frutree/chassis/PS0 - REFNODE power-supply fru WITH name:/platform/i2c@1f,530000/power-supply-fru-prom@0,6c -name:/frutree/chassis/PS1 - REFNODE power-supply fru WITH name:/platform/i2c@1f,530000/power-supply-fru-prom@0,6e - -/* chassis fruid prom */ -name:/frutree/chassis/PDB - REFNODE power-distribution-board fru WITH name:/platform/i2c@1f,530000/pdb-fru-prom@0,32 - -name:/frutree/chassis/PDB/power-distribution-board - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,530000/pdb-fru-prom@0,32 - -name:/platform/i2c@1f,530000/pdb-fru-prom@0,32 - REFPROP _fru_parent /frutree/chassis/PDB/power-distribution-board - -#include "system-board.info" -#include -#include diff --git a/usr/src/cmd/picl/plugins/sun4u/seattle/frutree/system-board.info b/usr/src/cmd/picl/plugins/sun4u/seattle/frutree/system-board.info deleted file mode 100644 index aefe347bf3..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/seattle/frutree/system-board.info +++ /dev/null @@ -1,938 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - * - * This file creates the system board structure - */ - -/* - * define a macro to force a #ident line into the output stream - * otherwise cpp removes it. Use #ifndef because of #included definitions. - */ -#ifndef id -#define id(s) #ident s -#endif -id("%Z%%M% %I% %E% SMI") - -/* - * Motherboard properties - */ -name:/frutree/chassis/MB - NODE system-board fru - NODE SC location - PROP Label string r 0 "SC" - NODE sc fru - ENDNODE - ENDNODE - NODE P0 location - PROP SlotType string r 0 "cpu" - PROP Label string r 0 "P0" - ENDNODE - NODE P1 location - PROP SlotType string r 0 "cpu" - PROP Label string r 0 "P1" - ENDNODE - NODE HDDBP location - PROP Label string r 0 "HDDBP" - REFNODE disk-backplane-1 fru WITH /platform?PlatformName=SUNW,Sun-Fire-V215 - REFNODE disk-backplane-3 fru WITH /platform?PlatformName=SUNW,Sun-Fire-V245 - ENDNODE - NODE RMD0 location - PROP SlotType string r 0 "dvd-slot" - PROP Label string r 0 "RMD0" - ENDNODE - NODE SCC location - PROP Label string r 0 "SCC" - NODE system-config-chip fru - ENDNODE - ENDNODE - NODE RISER-RIGHT location - PROP Label string r 0 "RISER-RIGHT" - ENDNODE - NODE RISER-LEFT location - PROP Label string r 0 "RISER-LEFT" - ENDNODE - NODE USB0 location - PROP Label string r 0 "USB0" - ENDNODE - NODE USB1 location - PROP Label string r 0 "USB1" - ENDNODE - NODE FIOB location - PROP Label string r 0 "FIOB" - REFNODE front-io-board-1 fru WITH /platform?PlatformName=SUNW,Sun-Fire-V215 - REFNODE front-io-board-2 fru WITH /platform?PlatformName=SUNW,Sun-Fire-V245 - ENDNODE - NODE BATTERY location - PROP Label string r 0 "BATTERY" - NODE battery fru - ENDNODE - ENDNODE - ENDNODE - -/* - * motherboard seeprom source - */ -name:/frutree/chassis/MB/system-board - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,530000/motherboard-fru-prom@0,a2 - -name:/platform/i2c@1f,530000/motherboard-fru-prom@0,a2 - REFPROP _fru_parent /frutree/chassis/MB/system-board - -/* - * Processor 0 - */ -name:/frutree/chassis/MB/system-board/P0 - REFNODE cpu fru WITH name:/platform/SUNW,UltraSPARC-IIIi+@0,0 - REFNODE cpu fru WITH name:/platform/SUNW,UltraSPARC-IIIi@0,0 -name:/frutree/chassis/MB/system-board/P0/cpu - NODE B0 location - PROP Label string r 0 "B0" - NODE bank fru - NODE D0 location - ENDNODE - NODE D1 location - ENDNODE - ENDNODE - ENDNODE - NODE B1 location - PROP Label string r 0 "B1" - NODE bank fru - NODE D0 location - ENDNODE - NODE D1 location - ENDNODE - ENDNODE - ENDNODE - -/* - * Processor 1 - */ -name:/frutree/chassis/MB/system-board/P1 - REFNODE cpu fru WITH name:/platform/SUNW,UltraSPARC-IIIi+@1,0 - REFNODE cpu fru WITH name:/platform/SUNW,UltraSPARC-IIIi@1,0 -name:/frutree/chassis/MB/system-board/P1/cpu - NODE B0 location - PROP Label string r 0 "B0" - NODE bank fru - NODE D0 location - ENDNODE - NODE D1 location - ENDNODE - ENDNODE - ENDNODE - NODE B1 location - PROP Label string r 0 "B1" - NODE bank fru - NODE D0 location - ENDNODE - NODE D1 location - ENDNODE - ENDNODE - ENDNODE -/* - * Processor 0 memory - */ -name:/frutree/chassis/MB/system-board/P0/cpu/B0/bank/D0 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D0" -name:/frutree/chassis/MB/system-board/P0/cpu/B0/bank/D1 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D1" -name:/frutree/chassis/MB/system-board/P0/cpu/B1/bank/D0 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D0" -name:/frutree/chassis/MB/system-board/P0/cpu/B1/bank/D1 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D1" - -/* - * Processor 1 memory - */ -name:/frutree/chassis/MB/system-board/P1/cpu/B0/bank/D0 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D0" -name:/frutree/chassis/MB/system-board/P1/cpu/B0/bank/D1 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D1" -name:/frutree/chassis/MB/system-board/P1/cpu/B1/bank/D0 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D0" -name:/frutree/chassis/MB/system-board/P1/cpu/B1/bank/D1 - PROP SlotType string r 0 "memory-module" - PROP Label string r 0 "D1" - -/* - * Dimm nodes - */ -name:/frutree/chassis/MB/system-board/P0/cpu/B0/bank/D0 - REFNODE mem-module fru WITH name:/platform/i2c@1f,530000/dimm-spd@0,e0 -name:/frutree/chassis/MB/system-board/P0/cpu/B0/bank/D1 - REFNODE mem-module fru WITH name:/platform/i2c@1f,530000/dimm-spd@0,e2 -name:/frutree/chassis/MB/system-board/P0/cpu/B1/bank/D0 - REFNODE mem-module fru WITH name:/platform/i2c@1f,530000/dimm-spd@0,e4 -name:/frutree/chassis/MB/system-board/P0/cpu/B1/bank/D1 - REFNODE mem-module fru WITH name:/platform/i2c@1f,530000/dimm-spd@0,e6 -name:/frutree/chassis/MB/system-board/P1/cpu/B0/bank/D0 - REFNODE mem-module fru WITH name:/platform/i2c@1f,530000/dimm-spd@0,e8 -name:/frutree/chassis/MB/system-board/P1/cpu/B0/bank/D1 - REFNODE mem-module fru WITH name:/platform/i2c@1f,530000/dimm-spd@0,ea -name:/frutree/chassis/MB/system-board/P1/cpu/B1/bank/D0 - REFNODE mem-module fru WITH name:/platform/i2c@1f,530000/dimm-spd@0,ec -name:/frutree/chassis/MB/system-board/P1/cpu/B1/bank/D1 - REFNODE mem-module fru WITH name:/platform/i2c@1f,530000/dimm-spd@0,ee - -/* Populate all possible nodes in the devtree with a status of "okay". - * This will get overridden by ASR. If the dimm slots are not fully - * populated then no extra nodes or properties are created. - */ -name:/platform/memory-controller@0,0/memory-module-group?ID=0/memory-module?ID=0 - PROP status string r 0 "okay" -name:/platform/memory-controller@0,0/memory-module-group?ID=0/memory-module?ID=1 - PROP status string r 0 "okay" -name:/platform/memory-controller@0,0/memory-module-group?ID=1/memory-module?ID=0 - PROP status string r 0 "okay" -name:/platform/memory-controller@0,0/memory-module-group?ID=1/memory-module?ID=1 - PROP status string r 0 "okay" -name:/platform/memory-controller@1,0/memory-module-group?ID=0/memory-module?ID=0 - PROP status string r 0 "okay" -name:/platform/memory-controller@1,0/memory-module-group?ID=0/memory-module?ID=1 - PROP status string r 0 "okay" -name:/platform/memory-controller@1,0/memory-module-group?ID=1/memory-module?ID=0 - PROP status string r 0 "okay" -name:/platform/memory-controller@1,0/memory-module-group?ID=1/memory-module?ID=1 - PROP status string r 0 "okay" - -/* - * DIMM seeprom sources - */ -name:/frutree/chassis/MB/system-board/P0/cpu/B0/bank/D0/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,530000/dimm-spd@0,e0 -name:/frutree/chassis/MB/system-board/P0/cpu/B0/bank/D1/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,530000/dimm-spd@0,e2 -name:/frutree/chassis/MB/system-board/P0/cpu/B1/bank/D0/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,530000/dimm-spd@0,e4 -name:/frutree/chassis/MB/system-board/P0/cpu/B1/bank/D1/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,530000/dimm-spd@0,e6 -name:/frutree/chassis/MB/system-board/P1/cpu/B0/bank/D0/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,530000/dimm-spd@0,e8 -name:/frutree/chassis/MB/system-board/P1/cpu/B0/bank/D1/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,530000/dimm-spd@0,ea -name:/frutree/chassis/MB/system-board/P1/cpu/B1/bank/D0/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,530000/dimm-spd@0,ec -name:/frutree/chassis/MB/system-board/P1/cpu/B1/bank/D1/mem-module - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,530000/dimm-spd@0,ee - -/* - * DIMM FRU parents - */ -name:/platform/i2c@1f,530000/dimm-spd@0,e0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/P0/cpu/B0/bank/D0/mem-module -name:/platform/i2c@1f,530000/dimm-spd@0,e2 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/P0/cpu/B0/bank/D1/mem-module -name:/platform/i2c@1f,530000/dimm-spd@0,e4 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/P0/cpu/B1/bank/D0/mem-module -name:/platform/i2c@1f,530000/dimm-spd@0,e6 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/P0/cpu/B1/bank/D1/mem-module -name:/platform/i2c@1f,530000/dimm-spd@0,e8 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/P1/cpu/B0/bank/D0/mem-module -name:/platform/i2c@1f,530000/dimm-spd@0,ea - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/P1/cpu/B0/bank/D1/mem-module -name:/platform/i2c@1f,530000/dimm-spd@0,ec - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/P1/cpu/B1/bank/D0/mem-module -name:/platform/i2c@1f,530000/dimm-spd@0,ee - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/P1/cpu/B1/bank/D1/mem-module - -name:/platform/SUNW,UltraSPARC-IIIi+@0,0 - REFPROP _fru_parent /frutree/chassis/MB/system-board/P0/cpu - -name:/platform/SUNW,UltraSPARC-IIIi+@1,0 - REFPROP _fru_parent /frutree/chassis/MB/system-board/P1/cpu - -name:/platform/SUNW,UltraSPARC-IIIi@0,0 - REFPROP _fru_parent /frutree/chassis/MB/system-board/P0/cpu - -name:/platform/SUNW,UltraSPARC-IIIi@1,0 - REFPROP _fru_parent /frutree/chassis/MB/system-board/P1/cpu -/* - * DIMM parents - */ -name:/platform/memory-controller@0,0/memory-module-group?ID=0/memory-module?ID=0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/P0/cpu/B0/bank/D0/mem-module -name:/platform/memory-controller@0,0/memory-module-group?ID=0/memory-module?ID=1 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/P0/cpu/B0/bank/D1/mem-module -name:/platform/memory-controller@0,0/memory-module-group?ID=1/memory-module?ID=0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/P0/cpu/B1/bank/D0/mem-module -name:/platform/memory-controller@0,0/memory-module-group?ID=1/memory-module?ID=1 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/P0/cpu/B1/bank/D1/mem-module -name:/platform/memory-controller@1,0/memory-module-group?ID=0/memory-module?ID=0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/P1/cpu/B0/bank/D0/mem-module -name:/platform/memory-controller@1,0/memory-module-group?ID=0/memory-module?ID=1 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/P1/cpu/B0/bank/D1/mem-module -name:/platform/memory-controller@1,0/memory-module-group?ID=1/memory-module?ID=0 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/P1/cpu/B1/bank/D0/mem-module -name:/platform/memory-controller@1,0/memory-module-group?ID=1/memory-module?ID=1 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board/P1/cpu/B1/bank/D1/mem-module -/* - * create reference properties for motherboard pci devices - */ -_class:/jbus/pciex@1e,600000 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board -_class:/jbus/pciex@1f,700000 - REFPROP _fru_parent name:/frutree/chassis/MB/system-board - -/* - * Front IO Board 1U - */ -name:/frutree/chassis/MB/system-board/FIOB/front-io-board-1 - NODE USB2 location - PROP Label string r 0 "USB2" - ENDNODE - NODE FLEDB location - PROP Label string r 0 "FLEDB" - NODE front-led-board fru - ENDNODE - ENDNODE - NODE FCB0 location - PROP Label string r 0 "FCB0" - NODE fan-connector-board fru - ENDNODE - ENDNODE - NODE FCB1 location - PROP Label string r 0 "FCB1" - NODE fan-connector-board fru - ENDNODE - ENDNODE - -/* - * Front IO Board 2U - */ - -name:/frutree/chassis/MB/system-board/FIOB/front-io-board-2 - NODE USB2 location - PROP Label string r 0 "USB2" - ENDNODE - NODE USB3 location - PROP Label string r 0 "USB3" - ENDNODE - NODE FLEDB location - PROP Label string r 0 "FLEDB" - NODE front-led-board fru - ENDNODE - ENDNODE - NODE FCB0 location - PROP Label string r 0 "FCB0" - NODE fan-connector-board fru - ENDNODE - ENDNODE - NODE FCB1 location - PROP Label string r 0 "FCB1" - NODE fan-connector-board fru - ENDNODE - ENDNODE - -/* - * PDB nodes for 1U and 2U. Note that we should have only one of these - * two nodes for each platform (1U/2U). - */ -name:/frutree/chassis/PDB/power-distribution-board - REFNODE FT6 location WITH /platform?PlatformName=SUNW,Sun-Fire-V215 - REFNODE HDDFB location WITH /platform?PlatformName=SUNW,Sun-Fire-V245 - -name:/frutree/chassis/PDB/power-distribution-board/HDDFB - PROP Label string r 0 "HDDFB" - NODE fan-connector-board fru - ENDNODE - -/* - * Add dvdrom fru nodes for disks which are present - */ -name:/frutree/chassis/MB/system-board/RMD0 - REFNODE removable-media fru WITH name:/platform/pci@1e,600000/pci@0/pci@1/pci@0/ide@1f/sd@0,0 - -/* - * HDDBP - */ -name:/frutree/chassis/MB/system-board/HDDBP/disk-backplane-1 - NODE HDD0 location - PROP SlotType string r 0 "disk-slot" - PROP Label string r 0 "HDD0" - ENDNODE - NODE HDD1 location - PROP SlotType string r 0 "disk-slot" - PROP Label string r 0 "HDD1" - ENDNODE - -name:/frutree/chassis/MB/system-board/HDDBP/disk-backplane-1 - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,530000/sasbp-fru-prom@0,64 - -name:/platform/i2c@1f,530000/sasbp-fru-prom@0,64 - REFPROP _fru_parent /frutree/chassis/MB/system-board/HDDBP/disk-backplane-1 - -name:/frutree/chassis/MB/system-board/HDDBP/disk-backplane-3 - NODE HDD0 location - PROP SlotType string r 0 "disk-slot" - PROP Label string r 0 "HDD0" - ENDNODE - NODE HDD1 location - PROP SlotType string r 0 "disk-slot" - PROP Label string r 0 "HDD1" - ENDNODE - NODE HDD2 location - PROP SlotType string r 0 "disk-slot" - PROP Label string r 0 "HDD2" - ENDNODE - NODE HDD3 location - PROP SlotType string r 0 "disk-slot" - PROP Label string r 0 "HDD3" - ENDNODE - -name:/frutree/chassis/MB/system-board/HDDBP/disk-backplane-3 - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,530000/sasbp-fru-prom@0,64 - -name:/platform/i2c@1f,530000/sasbp-fru-prom@0,64 - REFPROP _fru_parent /frutree/chassis/MB/system-board/HDDBP/disk-backplane-3 - -/* add disk fru nodes for disks which are present */ -name:/frutree/chassis/MB/system-board/HDDBP/disk-backplane-1/HDD0 - REFNODE disk fru WITH name:/platform/pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1/sd@0,0 -name:/frutree/chassis/MB/system-board/HDDBP/disk-backplane-1/HDD1 - REFNODE disk fru WITH name:/platform/pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1/sd@1,0 -name:/frutree/chassis/MB/system-board/HDDBP/disk-backplane-3/HDD0 - REFNODE disk fru WITH name:/platform/pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1/sd@0,0 -name:/frutree/chassis/MB/system-board/HDDBP/disk-backplane-3/HDD1 - REFNODE disk fru WITH name:/platform/pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1/sd@1,0 -name:/frutree/chassis/MB/system-board/HDDBP/disk-backplane-3/HDD2 - REFNODE disk fru WITH name:/platform/pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1/sd@2,0 -name:/frutree/chassis/MB/system-board/HDDBP/disk-backplane-3/HDD3 - REFNODE disk fru WITH name:/platform/pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1/sd@3,0 - - -/* - * System Fans for Seattle 1U - */ -#ifndef FCB0_1U -#define FCB0_1U /frutree/chassis/MB/system-board/FIOB/front-io-board-1/FCB0/fan-connector-board -#endif - -#ifndef FCB1_1U -#define FCB1_1U /frutree/chassis/MB/system-board/FIOB/front-io-board-1/FCB1/fan-connector-board -#endif - -#ifndef PDB_1U -#define PDB_1U /frutree/chassis/PDB/power-distribution-board -#endif - -/* - * As per FSD rev 0.19, in Seattle 1U, two fans are integrated into - * a single assembly and share a connector. We assume therefore that - * every fan tray in Seattle 1U contains both fans, so the presence - * of either fan node (under RMCLOMV) is indicative of the presence - * of the containing fan tray. In other words, either we have the - * fan tray with both fans present, or we have no fan tray at all. - */ -name:FCB0_1U - NODE FT0 location - PROP Label string r 0 "FT0" - PROP SlotType string r 0 "fan-tray" - REFNODE fan-tray fru WITH name:RMCLOMV/ft0_f0 - ENDNODE - NODE FT1 location - PROP Label string r 0 "FT1" - PROP SlotType string r 0 "fan-tray" - REFNODE fan-tray fru WITH name:RMCLOMV/ft1_f0 - ENDNODE - NODE FT2 location - PROP Label string r 0 "FT2" - PROP SlotType string r 0 "fan-tray" - REFNODE fan-tray fru WITH name:RMCLOMV/ft2_f0 - ENDNODE - -name:FCB1_1U - NODE FT3 location - PROP Label string r 0 "FT3" - PROP SlotType string r 0 "fan-tray" - REFNODE fan-tray fru WITH name:RMCLOMV/ft3_f0 - ENDNODE - NODE FT4 location - PROP Label string r 0 "FT4" - PROP SlotType string r 0 "fan-tray" - REFNODE fan-tray fru WITH name:RMCLOMV/ft4_f0 - ENDNODE - NODE FT5 location - PROP Label string r 0 "FT5" - PROP SlotType string r 0 "fan-tray" - REFNODE fan-tray fru WITH name:RMCLOMV/ft5_f0 - ENDNODE - -name:PDB_1U/FT6 - PROP Label string r 0 "FT6" - PROP SlotType string r 0 "fan-tray" - REFNODE fan-tray fru WITH name:RMCLOMV/pdb_ft6_f0 - -/* - * Create fan nodes for Seattle 1U - * - * Note that although we could create the F0 and F1 nodes on each - * tray conditionally, based on the ftN_f0 and ftN_f1 rmclomv nodes, - * it won't add any value; we've already based the creation of the - * fan-tray node to the existence of ftN_f0. - */ -name:FCB0_1U/FT0/fan-tray - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - ENDNODE - NODE F1 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F1" - ENDNODE - -name:FCB0_1U/FT1/fan-tray - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - ENDNODE - NODE F1 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F1" - ENDNODE - -name:FCB0_1U/FT2/fan-tray - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - ENDNODE - NODE F1 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F1" - ENDNODE - -name:FCB1_1U/FT3/fan-tray - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - ENDNODE - NODE F1 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F1" - ENDNODE - -name:FCB1_1U/FT4/fan-tray - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - ENDNODE - NODE F1 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F1" - ENDNODE - -name:FCB1_1U/FT5/fan-tray - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - ENDNODE - NODE F1 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F1" - ENDNODE - -name:PDB_1U/FT6/fan-tray - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - ENDNODE - NODE F1 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F1" - ENDNODE - -/* - * System Fans for Seattle 2U - */ -#ifndef FCB0_2U -#define FCB0_2U /frutree/chassis/MB/system-board/FIOB/front-io-board-2/FCB0/fan-connector-board -#endif - -#ifndef FCB1_2U -#define FCB1_2U /frutree/chassis/MB/system-board/FIOB/front-io-board-2/FCB1/fan-connector-board -#endif - -#ifndef PDB_2U -#define PDB_2U /frutree/chassis/PDB/power-distribution-board/HDDFB/fan-connector-board -#endif - -/* - * In Seattle 2U, each fan assembly has only one fan (except for the pdb), - * so the presence of f0 is indicative of the presence of the fan tray. - */ -name:FCB0_2U - NODE FT0 location - PROP Label string r 0 "FT0" - PROP SlotType string r 0 "fan-tray" - REFNODE fan-tray fru WITH name:RMCLOMV/ft0_f0 - ENDNODE - NODE FT1 location - PROP Label string r 0 "FT1" - PROP SlotType string r 0 "fan-tray" - REFNODE fan-tray fru WITH name:RMCLOMV/ft1_f0 - ENDNODE - NODE FT2 location - PROP Label string r 0 "FT2" - PROP SlotType string r 0 "fan-tray" - REFNODE fan-tray fru WITH name:RMCLOMV/ft2_f0 - ENDNODE - -name:FCB1_2U - NODE FT3 location - PROP Label string r 0 "FT3" - PROP SlotType string r 0 "fan-tray" - REFNODE fan-tray fru WITH name:RMCLOMV/ft3_f0 - ENDNODE - NODE FT4 location - PROP Label string r 0 "FT4" - PROP SlotType string r 0 "fan-tray" - REFNODE fan-tray fru WITH name:RMCLOMV/ft4_f0 - ENDNODE - NODE FT5 location - PROP Label string r 0 "FT5" - PROP SlotType string r 0 "fan-tray" - REFNODE fan-tray fru WITH name:RMCLOMV/ft5_f0 - ENDNODE - -name:PDB_2U - NODE FT6 location - PROP Label string r 0 "FT6" - PROP SlotType string r 0 "fan-tray" - REFNODE fan-tray fru WITH name:RMCLOMV/pdb_hddfb_ft6_f0 - ENDNODE - -/* - * Create fan nodes for Seattle 2U - */ -name:FCB0_2U/FT0/fan-tray - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - ENDNODE - -name:FCB0_2U/FT1/fan-tray - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - ENDNODE - -name:FCB0_2U/FT2/fan-tray - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - ENDNODE - -name:FCB1_2U/FT3/fan-tray - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - ENDNODE - -name:FCB1_2U/FT4/fan-tray - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - ENDNODE - -name:FCB1_2U/FT5/fan-tray - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - ENDNODE - -name:PDB_2U/FT6/fan-tray - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - ENDNODE - NODE F1 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F1" - ENDNODE - -/* - * PCI Riser Card Right - */ - -#ifndef PCI_R -#define PCI_R /frutree/chassis/MB/system-board/RISER-RIGHT -#endif - -name:PCI_R - REFNODE pci-riser-board fru WITH name:/platform/i2c@1f,530000/riser-fru-prom@0,aa - -name:PCI_R/pci-riser-board - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,530000/riser-fru-prom@0,aa - NODE PCI0 location - PROP Label string r 0 "PCI0" - PROP SlotType string r 0 "pci-e" - ENDNODE - REFNODE PCI2 location WITH /platform?PlatformName=SUNW,Sun-Fire-V245 - -name:/platform/i2c@1f,530000/riser-fru-prom@0,aa - REFPROP _fru_parent PCI_R/pci-riser-board - -name:PCI_R/pci-riser-board/PCI2 - PROP Label string r 0 "PCI2" - PROP SlotType string r 0 "pci-e" - -/* - * PCI Riser Card Left - */ - -#ifndef PCI_L -#define PCI_L /frutree/chassis/MB/system-board/RISER-LEFT -#endif - -name:PCI_L - REFNODE pci-riser-board fru WITH name:/platform/i2c@1f,530000/riser-fru-prom@0,a8 - -name:PCI_L/pci-riser-board - PROP FRUDataAvailable void r - REFPROP _seeprom_source name:/platform/i2c@1f,530000/riser-fru-prom@0,a8 - -name:/platform/i2c@1f,530000/riser-fru-prom@0,a8 - REFPROP _fru_parent PCI_L/pci-riser-board - -name:PCI_L/pci-riser-board - REFNODE PCI1 location WITH /platform?PlatformName=SUNW,Sun-Fire-V215 - -name:PCI_L/pci-riser-board/PCI1 - PROP Label string r 0 "PCI1" - PROP SlotType string r 0 "pci-x-e" - REFNODE pci-card fru WITH _class:/jbus/pciex@1f,700000/picl?DeviceID=0 - REFNODE pci-card fru WITH _class:/jbus/pciex@1e,600000/pciex@0/pciex@9/pci@0/pci@8/picl?DeviceID=1 - -name:PCI_L/pci-riser-board - REFNODE PCI1 location WITH /platform?PlatformName=SUNW,Sun-Fire-V245 - REFNODE PCI3 location WITH /platform?PlatformName=SUNW,Sun-Fire-V245 - -name:PCI_L/pci-riser-board/PCI3 - PROP Label string r 0 "PCI3" - PROP SlotType string r 0 "pci-x-e" - REFNODE pci-card fru WITH _class:/jbus/pciex@1f,700000/pciex@0/pciex@8/picl?DeviceID=0 - REFNODE pci-card fru WITH _class:/jbus/pciex@1f,700000/pci@0/picl?DeviceID=2 - -name:PCI_L/pci-riser-board/PCI1 - PROP Label string r 0 "PCI1" - PROP SlotType string r 0 "pci-x-e" - REFNODE pci-card fru WITH _class:/jbus/pciex@1f,700000/pciex@0/pciex@9/picl?DeviceID=0 - REFNODE pci-card fru WITH _class:/jbus/pciex@1f,700000/pci@0,2/picl?DeviceID=1 - -/* - * Populate PCI_R slots - */ -name:PCI_R/pci-riser-board/PCI0 - REFNODE pci-card fru WITH _class:/jbus/pciex@1e,600000/pciex@0/pciex@8/picl?DeviceID=0 -name:PCI_R/pci-riser-board/PCI2 - REFNODE pci-card fru WITH _class:/jbus/pciex@1e,600000/pciex@0/pciex@2/picl?DeviceID=0 - -/* - * _fru_parent PCIEX devices - */ - -/* 1UEER, 2UEER: PCI0 */ -_class:/jbus/pciex@1e,600000/pciex@0/pciex@8/picl@0 -REFPROP _fru_parent PCI_R/pci-riser-board/PCI0/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@8/picl@0,0 -REFPROP _fru_parent PCI_R/pci-riser-board/PCI0/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@8/picl@0,1 -REFPROP _fru_parent PCI_R/pci-riser-board/PCI0/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@8/picl@0,2 -REFPROP _fru_parent PCI_R/pci-riser-board/PCI0/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@8/picl@0,3 -REFPROP _fru_parent PCI_R/pci-riser-board/PCI0/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@8/picl@0,4 -REFPROP _fru_parent PCI_R/pci-riser-board/PCI0/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@8/picl@0,5 -REFPROP _fru_parent PCI_R/pci-riser-board/PCI0/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@8/picl@0,6 -REFPROP _fru_parent PCI_R/pci-riser-board/PCI0/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@8/picl@0,7 -REFPROP _fru_parent PCI_R/pci-riser-board/PCI0/pci-card - -/* 2UEER: PCI2 */ -_class:/jbus/pciex@1e,600000/pciex@0/pciex@2/picl@0 -REFPROP _fru_parent PCI_R/pci-riser-board/PCI2/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@2/picl@0,0 -REFPROP _fru_parent PCI_R/pci-riser-board/PCI2/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@2/picl@0,1 -REFPROP _fru_parent PCI_R/pci-riser-board/PCI2/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@2/picl@0,2 -REFPROP _fru_parent PCI_R/pci-riser-board/PCI2/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@2/picl@0,3 -REFPROP _fru_parent PCI_R/pci-riser-board/PCI2/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@2/picl@0,4 -REFPROP _fru_parent PCI_R/pci-riser-board/PCI2/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@2/picl@0,5 -REFPROP _fru_parent PCI_R/pci-riser-board/PCI2/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@2/picl@0,6 -REFPROP _fru_parent PCI_R/pci-riser-board/PCI2/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@2/picl@0,7 -REFPROP _fru_parent PCI_R/pci-riser-board/PCI2/pci-card - -/* 1UEEL: PCI1 */ -_class:/jbus/pciex@1f,700000/picl@0 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI1/pci-card -_class:/jbus/pciex@1f,700000/picl@0,0 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI1/pci-card -_class:/jbus/pciex@1f,700000/picl@0,1 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI1/pci-card -_class:/jbus/pciex@1f,700000/picl@0,2 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI1/pci-card -_class:/jbus/pciex@1f,700000/picl@0,3 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI1/pci-card -_class:/jbus/pciex@1f,700000/picl@0,4 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI1/pci-card -_class:/jbus/pciex@1f,700000/picl@0,5 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI1/pci-card -_class:/jbus/pciex@1f,700000/picl@0,6 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI1/pci-card -_class:/jbus/pciex@1f,700000/picl@0,7 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI1/pci-card - -/* 2UEEL: PCI1 */ -_class:/jbus/pciex@1f,700000/pciex@0/pciex@9/picl@0 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI1/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@9/picl@0,0 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI1/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@9/picl@0,1 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI1/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@9/picl@0,2 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI1/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@9/picl@0,3 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI1/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@9/picl@0,4 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI1/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@9/picl@0,5 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI1/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@9/picl@0,6 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI1/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@9/picl@0,7 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI1/pci-card - -/* 2UEEL: PCI3 */ -_class:/jbus/pciex@1f,700000/pciex@0/pciex@8/picl@0 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI3/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@8/picl@0,0 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI3/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@8/picl@0,1 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI3/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@8/picl@0,2 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI3/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@8/picl@0,3 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI3/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@8/picl@0,4 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI3/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@8/picl@0,5 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI3/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@8/picl@0,6 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI3/pci-card -_class:/jbus/pciex@1f,700000/pciex@0/pciex@8/picl@0,7 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI3/pci-card - -/* - * _fru_parent PCI-X devices - */ - -/* 1UXXL: PCI1 */ -_class:/jbus/pciex@1e,600000/pciex@0/pciex@9/pci@0/pci@8/picl@1 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI1/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@9/pci@0/pci@8/picl@1,0 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI1/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@9/pci@0/pci@8/picl@1,1 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI1/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@9/pci@0/pci@8/picl@1,2 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI1/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@9/pci@0/pci@8/picl@1,3 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI1/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@9/pci@0/pci@8/picl@1,4 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI1/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@9/pci@0/pci@8/picl@1,5 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI1/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@9/pci@0/pci@8/picl@1,6 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI1/pci-card -_class:/jbus/pciex@1e,600000/pciex@0/pciex@9/pci@0/pci@8/picl@1,7 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI1/pci-card - -/* 2UEXL-I: PCI1 */ -_class:/jbus/pciex@1f,700000/pci@0,2/picl@1 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI1/pci-card -_class:/jbus/pciex@1f,700000/pci@0,2/picl@1,0 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI1/pci-card -_class:/jbus/pciex@1f,700000/pci@0,2/picl@1,1 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI1/pci-card -_class:/jbus/pciex@1f,700000/pci@0,2/picl@1,2 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI1/pci-card -_class:/jbus/pciex@1f,700000/pci@0,2/picl@1,3 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI1/pci-card -_class:/jbus/pciex@1f,700000/pci@0,2/picl@1,4 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI1/pci-card -_class:/jbus/pciex@1f,700000/pci@0,2/picl@1,5 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI1/pci-card -_class:/jbus/pciex@1f,700000/pci@0,2/picl@1,6 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI1/pci-card -_class:/jbus/pciex@1f,700000/pci@0,2/picl@1,7 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI1/pci-card - -/* 2UEXL-I: PCI3 */ -_class:/jbus/pciex@1f,700000/pci@0/picl@2 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI3/pci-card -_class:/jbus/pciex@1f,700000/pci@0/picl@2,0 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI3/pci-card -_class:/jbus/pciex@1f,700000/pci@0/picl@2,1 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI3/pci-card -_class:/jbus/pciex@1f,700000/pci@0/picl@2,2 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI3/pci-card -_class:/jbus/pciex@1f,700000/pci@0/picl@2,3 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI3/pci-card -_class:/jbus/pciex@1f,700000/pci@0/picl@2,4 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI3/pci-card -_class:/jbus/pciex@1f,700000/pci@0/picl@2,5 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI3/pci-card -_class:/jbus/pciex@1f,700000/pci@0/picl@2,6 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI3/pci-card -_class:/jbus/pciex@1f,700000/pci@0/picl@2,7 -REFPROP _fru_parent PCI_L/pci-riser-board/PCI3/pci-card diff --git a/usr/src/cmd/picl/plugins/sun4u/sebring/Makefile b/usr/src/cmd/picl/plugins/sun4u/sebring/Makefile deleted file mode 100644 index 32c9ddf4bb..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/sebring/Makefile +++ /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, 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" -# -# cmd/picl/plugins/sun4u/sebring/Makefile -# - -SUBDIRS= psvcplugin psvcpolicy conf devtree frutree frudata .WAIT - -MSGSUBDIRS= psvcplugin psvcpolicy frutree - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -.KEEP_STATE: - -all install clean clobber: $(SUBDIRS) - -_msg: $(MSGSUBDIRS) - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/sebring/conf/Makefile b/usr/src/cmd/picl/plugins/sun4u/sebring/conf/Makefile deleted file mode 100644 index 05fd91c1cf..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/sebring/conf/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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# cmd/picl/plugins/sun4u/sebring/conf/Makefile -# -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-V490 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLATFORM)/lib - -CONF= platsvcd.conf psvcobj.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0444 - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: $(CONF) - -install: $(ROOTLIBDIR) $(ROOTCONF) - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/sebring/conf/platsvcd.conf b/usr/src/cmd/picl/plugins/sun4u/sebring/conf/platsvcd.conf deleted file mode 100644 index 060d70e08a..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/sebring/conf/platsvcd.conf +++ /dev/null @@ -1,157 +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 2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * #pragma ident "%Z%%M% %I% %E% SMI" - */ - -/* - * Cherrystone platsvcd.conf - */ - -/* - * Format: - * - * TIMEOUT - * Specifies a maximum interval in seconds that an application - * is allowed to lock out the platform services daemon - * - * INTERVAL <#tasks at this interval> - * INTERVAL_END - * Indicates the poll interval at which a list of tasks will be run - * - * TASK - * - * Object string ID of first object - * Object string ID of second object - * Object string ID of nth object - * TASK_END - * Specifies the "task" or policy routine, the shared object file it - * resides in, and the object IDs of objects it must be called for - */ - -TIMEOUT 180 - -INTERVAL 0 6 -TASK /usr/platform/sun4u/lib/libpsvcpolicy.so.1 psvc_init_led_policy_0 -7 -CPU_FAN_FLT_LED -IO_FAN_FLT_LED -FSP_GEN_FAULT_LED -DISK0_FLT_LED -DISK1_FLT_LED -DISK0_REMOVE_LED -DISK1_REMOVE_LED -TASK_END -TASK /usr/platform/SUNW,Sun-Fire-480R/lib/libpsvcpolicy_psr.so.1 psvc_init_disk_bp_policy_0 -1 -DISK_PORT -TASK_END -TASK /usr/platform/sun4u/lib/libpsvcpolicy.so.1 psvc_init_state_policy_0 -18 -CPU0_DIE_TEMPERATURE_SENSOR -CPU1_DIE_TEMPERATURE_SENSOR -CPU2_DIE_TEMPERATURE_SENSOR -CPU3_DIE_TEMPERATURE_SENSOR -DBP0_AMB_TEMPERATURE_SENSOR -CPU0_FAN -CPU1_FAN -CPU2_FAN -IO0_FAN -IO1_FAN -FAN_TRAY_0 -FAN_TRAY_1 -DISK0 -DISK1 -PS0 -PS1 -PS0_LOGICAL_STATE -PS1_LOGICAL_STATE -TASK_END -TASK /usr/platform/sun4u/lib/libpsvcpolicy.so.1 psvc_update_thresholds_0 -4 -CPU0_DIE_TEMPERATURE_SENSOR -CPU1_DIE_TEMPERATURE_SENSOR -CPU2_DIE_TEMPERATURE_SENSOR -CPU3_DIE_TEMPERATURE_SENSOR -TASK_END -TASK /usr/platform/SUNW,Sun-Fire-480R/lib/libpsvcpolicy_psr.so.1 update_disk_bp_temp_thresholds -1 -DBP0_AMB_TEMPERATURE_SENSOR -TASK_END -TASK /usr/platform/SUNW,Sun-Fire-480R/lib/libpsvcpolicy_psr.so.1 psvc_init_ps_presence -2 -PS0 -PS1 -TASK_END -INTERVAL_END - -INTERVAL 5 1 -TASK /usr/platform/SUNW,Sun-Fire-480R/lib/libpsvcpolicy_psr.so.1 psvc_fsp_device_fault_check_policy_0 -1 -FSP_GEN_FAULT_LED -TASK_END -INTERVAL_END - -INTERVAL 10 2 -TASK /usr/platform/sun4u/lib/libpsvcpolicy.so.1 psvc_check_temperature_policy_0 -5 -CPU0_DIE_TEMPERATURE_SENSOR -CPU1_DIE_TEMPERATURE_SENSOR -CPU2_DIE_TEMPERATURE_SENSOR -CPU3_DIE_TEMPERATURE_SENSOR -DBP0_AMB_TEMPERATURE_SENSOR -TASK_END -TASK /usr/platform/SUNW,Sun-Fire-480R/lib/libpsvcpolicy_psr.so.1 psvc_shutdown_policy_0 -1 -SYSTEM -TASK_END -INTERVAL_END - -INTERVAL 30 1 -TASK /usr/platform/SUNW,Sun-Fire-480R/lib/libpsvcpolicy_psr.so.1 psvc_disk_monitor_policy_0 -1 -SYSTEM -TASK_END -INTERVAL_END - -INTERVAL 15 2 -TASK /usr/platform/SUNW,Sun-Fire-480R/lib/libpsvcpolicy_psr.so.1 psvc_fan_fault_check_policy_0 -2 -FAN_TRAY_0 -FAN_TRAY_1 -TASK_END -TASK /usr/platform/SUNW,Sun-Fire-480R/lib/libpsvcpolicy_psr.so.1 psvc_ps_monitor_policy_0 -2 -PS0 -PS1 -TASK_END -INTERVAL_END - -INTERVAL 10 1 -TASK /usr/platform/sun4u/lib/libpsvcpolicy.so.1 psvc_keyswitch_position_policy_0 -1 -KEYSWITCH -TASK_END -INTERVAL_END diff --git a/usr/src/cmd/picl/plugins/sun4u/sebring/conf/psvcobj.conf b/usr/src/cmd/picl/plugins/sun4u/sebring/conf/psvcobj.conf deleted file mode 100644 index fdc5e50139..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/sebring/conf/psvcobj.conf +++ /dev/null @@ -1,966 +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" - */ - -/* - * Sebring psvcobj.conf - */ - -/* - * Format : - * - * OBJECT_INFO - * ... - * ... - * ... - * OBJECT_INFO_END - * This section specifies the static property information for each - * defined object. Each property in the property list is preceded by - * an identifying property label, such as, "_class=". The "label" - * property is the first string on each line. The features and address - * specification properties are built from those fields within these - * properties that are present on each line. - * - * ASSOCIATIONS - * ASSOCIATION - * - * ... (more association pairs) - * ASSOCIATION_END - * ... (more ASSOCIATION sections) - * ASSOCIATIONS_END - * Lists association pairs for each association type to show relationships - * between objects - * - * DEVPATHS - * - * ... (more entries) - * DEVPATHS_END - * Lists the device paths and the matching (controller, bus, addr, port) - * - * TABLES - * TABLE - * - * ... - * TABLE_END - * TABLES_END - * Lists the tables used by the framework - * - * PROJECTED_PROPERTIES - * - * PROJECTED_PROPETIES_END - * Used to specify projected properties to be cerated in PICL nodes - * - */ - -OBJECT_INFO -/SYSTEM _class=3,Subclass=0,Instance=0,PERM=1,FRU=1 -/SYSTEM/MOTHERBOARD _class=3,Subclass=0,Instance=0,PERM=1,FRU=1 -/SYSTEM/IO_BOARD _class=3,Subclass=0,Instance=0,PERM=1,FRU=1 -/SYSTEM/CENTERPLANE _class=3,Subclass=0,Instance=0,PERM=1 -/SYSTEM/SMART_CARD _class=3,Subclass=0,Instance=0,PERM=1 -/SYSTEM/SMART_CARD/NOT_YET_IMPLEMENTED _class=3,Subclass=0,Instance=0,PERM=1 -/SYSTEM/FAN_TRAY_0 _class=3,Subclass=0,Instance=0,PERM=1 -/SYSTEM/FAN_TRAY_1 _class=3,Subclass=0,Instance=0,PERM=1 -/SYSTEM/FAN_TRAY_0/CPU1_FAN _class=1,Subclass=0,Instance=0,FAN_DRIVE_PR=1,TEMP_DRIVEN=1,SPEED_CTRL_PR=1,CLOSED_LOOP_CTRL=1,FAN_DRIVE_TABLE_PR=1,PERM=1,PRIMARY=1,FRU=1,Setpoint=75,Hysteresis=3,Loopgain=200,Loopbias=1023 -/SYSTEM/FAN_TRAY_0/CPU2_FAN _class=1,Subclass=0,Instance=1,FAN_DRIVE_PR=1,TEMP_DRIVEN=1,SPEED_CTRL_PR=1,CLOSED_LOOP_CTRL=1,FAN_DRIVE_TABLE_PR=1,PERM=1,PRIMARY=1,FRU=1,Setpoint=75,Hysteresis=3,Loopgain=200,Loopbias=1023 -/SYSTEM/FAN_TRAY_1/IO0_FAN _class=1,Subclass=0,Instance=0,FAN_DRIVE_PR=1,TEMP_DRIVEN=1,SPEED_CTRL_PR=1,FAN_ON_OFF=1,CLOSED_LOOP_CTRL=1,FAN_DRIVE_TABLE_PR=1,PERM=1,PRIMARY=1,FRU=1,Setpoint=30,Hysteresis=3,Loopgain=200,Loopbias=1023 -/SYSTEM/FAN_TRAY_1/IO1_FAN _class=1,Subclass=0,Instance=1,FAN_DRIVE_PR=1,TEMP_DRIVEN=1,SPEED_CTRL_PR=1,FAN_ON_OFF=1,CLOSED_LOOP_CTRL=1,FAN_DRIVE_TABLE_PR=1,PERM=1,PRIMARY=1,FRU=1,Setpoint=30,Hysteresis=3,Loopgain=200,Loopbias=1023 -/SYSTEM/FAN_TRAY_0/CPU0_FAN _class=1,Subclass=0,Instance=0,FAN_ON_OFF=1,PERM=1,PRIMARY=1,FRU=1,Setpoint=0,Hysteresis=0,Loopgain=0,Loopbias=0 -/SYSTEM/CPU_FAN_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=2,INVERT=0,PORT=1,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/IO_FAN_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=3,INVERT=0,PORT=1,BITSHIFT=3,BYTEMASK=0x8,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/IO_BOARD/IO_TEST_LED_AMBER _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=2,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/IO_BOARD/IO_TEST_LED_RED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=1,INVERT=0,PORT=2,BITSHIFT=1,BYTEMASK=0x2,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Led-color=RED -/SYSTEM/IO_BOARD/IO_TEST_LED_GREEN _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=2,INVERT=0,PORT=2,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Led-color=GREEN -/SYSTEM/CENTERPLANE/CPU0_FAN_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=4,INVERT=0,PORT=1,BITSHIFT=4,BYTEMASK=0x10,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/CENTERPLANE/CENTERPLANE_TEST_LED_AMBER _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=2,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/CENTERPLANE/CENTERPLANE_TEST_LED_RED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=1,INVERT=0,PORT=2,BITSHIFT=1,BYTEMASK=0x2,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1,Led-color=RED -/SYSTEM/CENTERPLANE/CENTERPLANE_TEST_LED_GREEN _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=2,INVERT=0,PORT=2,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1,Led-color=GREEN -/SYSTEM/MOTHERBOARD/CPU2_FAN_TACH _class=7,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=2,BITSHIFT=6,BYTEMASK=0x0,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1,Lo-warn=2800,Lo-shut=0,Hi-warn=0,Hi-shut=0 -/SYSTEM/MOTHERBOARD/CPU1_FAN_TACH _class=7,Subclass=0,Instance=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=3,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1,Lo-warn=2800,Lo-shut=0,Hi-warn=0,Hi-shut=0 -/SYSTEM/IO_BOARD/IO1_FAN_TACH _class=7,Subclass=0,Instance=2,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=5,BYTEMASK=0x0,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Lo-warn=2800,Lo-shut=0,Hi-warn=0,Hi-shut=0 -/SYSTEM/IO_BOARD/IO0_FAN_TACH _class=7,Subclass=0,Instance=3,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=2,BITSHIFT=6,BYTEMASK=0x0,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Lo-warn=2800,Lo-shut=0,Hi-warn=0,Hi-shut=0 -/SYSTEM/CENTERPLANE/CPU0_FAN_TACH _class=7,Subclass=0,Instance=4,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=3,BITSHIFT=7,BYTEMASK=0x0,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Lo-warn=2800,Lo-shut=0,Hi-warn=0,Hi-shut=0 -/SYSTEM/MOTHERBOARD/DISK_BP0_PR_SENSOR _class=6,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=2,INVERT=0,PORT=4,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/RSC_PR_SENSOR _class=6,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=5,INVERT=0,PORT=3,BITSHIFT=5,BYTEMASK=0x20,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT _class=3,Subclass=0,Instance=0,PERM=1 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT _class=3,Subclass=0,Instance=1,PERM=1 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD _class=3,Subclass=0,Instance=0,OPTION=1,FRU=1 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD _class=3,Subclass=0,Instance=1,OPTION=1,FRU=1 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/CPU0_DIE_TEMPERATURE_SENSOR _class=0,Subclass=1,Instance=0,DIE_TEMP=1,HOTPLUG=1,RDWR=1,LO_WARN_MASK=1,LO_SHUT_MASK=1,HI_WARN_MASK=1,HI_SHUT_MASK=1,OPT_TEMP_MASK=1,HW_LO_MASK=1,HW_HI_MASK=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=4,BUSADDR=0x30,BUSNUM=0,CNTLR=1,Lo-warn=5,Lo-shut=1,Hi-warn=100,Hi-shut=105,Opt-temp=75,Hw-hi-shut=120,Hw-lo-shut=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/CPU1_DIE_TEMPERATURE_SENSOR _class=0,Subclass=1,Instance=1,DIE_TEMP=1,HOTPLUG=1,RDWR=1,LO_WARN_MASK=1,LO_SHUT_MASK=1,HI_WARN_MASK=1,HI_SHUT_MASK=1,OPT_TEMP_MASK=1,HW_LO_MASK=1,HW_HI_MASK=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=4,BUSADDR=0x32,BUSNUM=0,CNTLR=1,Lo-warn=5,Lo-shut=1,Hi-warn=100,Hi-shut=105,Opt-temp=75,Hw-hi-shut=120,Hw-lo-shut=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/CPU2_DIE_TEMPERATURE_SENSOR _class=0,Subclass=1,Instance=2,DIE_TEMP=1,HOTPLUG=1,RDWR=1,LO_WARN_MASK=1,LO_SHUT_MASK=1,HI_WARN_MASK=1,HI_SHUT_MASK=1,OPT_TEMP_MASK=1,HW_LO_MASK=1,HW_HI_MASK=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=4,BUSADDR=0x34,BUSNUM=0,CNTLR=1,Lo-warn=5,Lo-shut=1,Hi-warn=100,Hi-shut=105,Opt-temp=75,Hw-hi-shut=120,Hw-lo-shut=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/CPU3_DIE_TEMPERATURE_SENSOR _class=0,Subclass=1,Instance=3,DIE_TEMP=1,HOTPLUG=1,RDWR=1,LO_WARN_MASK=1,LO_SHUT_MASK=1,HI_WARN_MASK=1,HI_SHUT_MASK=1,OPT_TEMP_MASK=1,HW_LO_MASK=1,HW_HI_MASK=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=4,BUSADDR=0x52,BUSNUM=0,CNTLR=1,Lo-warn=5,Lo-shut=1,Hi-warn=100,Hi-shut=105,Opt-temp=75,Hw-hi-shut=120,Hw-lo-shut=0 -/SYSTEM/DISK_BP0_BOARD_SLOT _class=3,Subclass=0,Instance=0,PERM=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD _class=3,Subclass=0,Instance=0,HOTPLUG=1,FRU=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/LOOP_B_0_BOARD_SLOT _class=3,Subclass=0,Instance=0,PERM=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/LOOP_B_0_BOARD_SLOT/LOOP_B_0_BOARD _class=3,Subclass=0,Instance=0,OPTION=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/LOOP_B_0_BOARD_PR_SENSOR _class=6,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=7,INVERT=0,PORT=0,BITSHIFT=7,BYTEMASK=0x80,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DBP0_AMB_TEMPERATURE_SENSOR _class=0,Subclass=1,Instance=5,OPTION=1,RDWR=1,LO_WARN_MASK=1,LO_SHUT_MASK=1,HI_WARN_MASK=1,HI_SHUT_MASK=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=2,BUSADDR=0x9c,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=-5,Hi-warn=45,Hi-shut=50,Opt-temp=25,Hw-hi-shut=50,Hw-lo-shut=-5 -/SYSTEM/RSC_SLOT _class=3,Subclass=0,Instance=1,PERM=1 -/SYSTEM/RSC_SLOT/RSC_CARD _class=3,Subclass=0,Instance=1,HOTPLUG=1,FRU=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK0_SLOT _class=3,Subclass=0,Instance=0,OPTION=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK1_SLOT _class=3,Subclass=0,Instance=1,OPTION=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK0_SLOT/DISK0 _class=3,Subclass=0,Instance=0,HOTPLUG=1,FRU=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK1_SLOT/DISK1 _class=3,Subclass=0,Instance=1,HOTPLUG=1,FRU=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK0_PR_SENSOR _class=6,Subclass=0,Instance=0,OPTION=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=7,BUSADDR=0x44,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK1_PR_SENSOR _class=6,Subclass=0,Instance=0,OPTION=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=1,INVERT=0,PORT=0,BITSHIFT=1,BYTEMASK=0x2,REG=0,TYPE=7,BUSADDR=0x44,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK0_FAULT_SENSOR _class=8,Subclass=0,Instance=0,OPTION=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=2,INVERT=0,PORT=0,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=7,BUSADDR=0x44,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK1_FAULT_SENSOR _class=8,Subclass=0,Instance=0,OPTION=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=3,INVERT=0,PORT=0,BITSHIFT=3,BYTEMASK=0x8,REG=0,TYPE=7,BUSADDR=0x44,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK0_REMOVE_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=4,INVERT=0,PORT=0,BITSHIFT=4,BYTEMASK=0x10,REG=0,TYPE=7,BUSADDR=0x44,BUSNUM=0,CNTLR=1,Led-color=BLUE -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK1_REMOVE_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=5,INVERT=0,PORT=0,BITSHIFT=5,BYTEMASK=0x20,REG=0,TYPE=7,BUSADDR=0x44,BUSNUM=0,CNTLR=1,Led-color=BLUE -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK0_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=6,INVERT=0,PORT=0,BITSHIFT=6,BYTEMASK=0x40,REG=0,TYPE=7,BUSADDR=0x44,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK1_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=7,INVERT=0,PORT=0,BITSHIFT=7,BYTEMASK=0x80,REG=0,TYPE=7,BUSADDR=0x44,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/IO_BOARD/5V_ENABLE_SWITCH _class=8,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=7,INVERT=0,PORT=0,BITSHIFT=6,BYTEMASK=0x40,REG=0,TYPE=5,BUSADDR=0x46,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/I2C_ENABLE_SWITCH _class=8,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=6,INVERT=0,PORT=0,BITSHIFT=6,BYTEMASK=0x40,REG=0,TYPE=5,BUSADDR=0x46,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_A0_0 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa0,BUSNUM=0,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_A2_0 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa2,BUSNUM=0,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_A4_0 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa4,BUSNUM=0,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_A6_0 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa6,BUSNUM=0,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_A8_0 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa8,BUSNUM=0,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_AA_0 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xaa,BUSNUM=0,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_AC_0 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xac,BUSNUM=0,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_AE_0 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xae,BUSNUM=0,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_A0_1 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa0,BUSNUM=1,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_A2_1 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa2,BUSNUM=1,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_A4_1 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa4,BUSNUM=1,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_A6_1 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa6,BUSNUM=1,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_A8_1 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa8,BUSNUM=1,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_AA_1 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xaa,BUSNUM=1,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_AC_1 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xac,BUSNUM=1,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_AE_1 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xae,BUSNUM=1,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_A0_2 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa0,BUSNUM=2,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_A2_2 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa2,BUSNUM=2,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_A4_2 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa4,BUSNUM=2,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_A6_2 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa6,BUSNUM=2,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_A8_2 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa8,BUSNUM=2,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_AA_2 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xaa,BUSNUM=2,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_AC_2 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xac,BUSNUM=2,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C02_AE_2 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xae,BUSNUM=2,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_A0_3 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa0,BUSNUM=3,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_A2_3 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa2,BUSNUM=3,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_A4_3 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa4,BUSNUM=3,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_A6_3 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa6,BUSNUM=3,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_A8_3 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa8,BUSNUM=3,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_AA_3 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xaa,BUSNUM=3,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_AC_3 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xac,BUSNUM=3,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C02_AE_3 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xae,BUSNUM=3,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C64_A0_4 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa0,BUSNUM=4,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C64_A2_4 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa2,BUSNUM=4,CNTLR=0 -/SYSTEM/MOTHERBOARD/24C64_A8_4 _class=11,Subclass=0,Instance=0,PERM=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa8,BUSNUM=4,CNTLR=0 -/SYSTEM/IO_BOARD/24C64_AA_4 _class=11,Subclass=0,Instance=0,PERM=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xaa,BUSNUM=4,CNTLR=0 -/SYSTEM/IO_BOARD/24C64_A4_4 _class=11,Subclass=0,Instance=0,PERM=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa4,BUSNUM=4,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/MAX1617_30_5 _class=11,Subclass=4,Instance=0,HOTPLUG=0,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x30,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/MAX1617_32_5 _class=11,Subclass=4,Instance=0,HOTPLUG=0,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x32,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/MAX1617_34_5 _class=11,Subclass=4,Instance=0,HOTPLUG=0,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x34,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/MAX1617_52_5 _class=11,Subclass=4,Instance=0,HOTPLUG=0,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x52,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/SSC050_80_5 _class=11,Subclass=7,Instance=0,PERM=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x80,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/SSC050_82_5 _class=11,Subclass=7,Instance=0,PERM=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK_PORT _class=10,Subclass=1,Instance=0,GPIO_REG=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=1,TYPE=1,BUSADDR=0x44,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/PCF8574_44_5 _class=11,Subclass=5,Instance=0,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x44,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/PCF8574_46_5 _class=11,Subclass=5,Instance=0,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x46,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/LM75_9C_5 _class=11,Subclass=2,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x9c,BUSNUM=0,CNTLR=1 -/SYSTEM/RSC_SLOT/RSC_CARD/24C64_A6_5 _class=11,Subclass=0,Instance=0,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa6,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/24C64_A8_5 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa8,BUSNUM=0,CNTLR=1 -/SYSTEM/FSP _class=3,Subclass=0,Instance=0,PERM=1,FRU=1 -/SYSTEM/FSP/FSP_GEN_FAULT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/FSP/FSP_LOCATOR_LED _class=2,Subclass=2,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=1,INVERT=0,PORT=1,BITSHIFT=1,BYTEMASK=0x2,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Led-color=WHITE,IsLocator=true,LocatorName=system -/SYSTEM/IO_BOARD/FSP_KS_NORMAL_POS_SENSOR _class=8,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=3,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/FSP_KS_DIAG_POS_SENSOR _class=8,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=1,INVERT=1,PORT=3,BITSHIFT=1,BYTEMASK=0x2,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/FSP_KS_LOCK_POS_SENSOR _class=8,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=2,INVERT=0,PORT=3,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/FSP_KS_OFF_POS_SENSOR _class=8,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=3,INVERT=0,PORT=3,BITSHIFT=3,BYTEMASK=0x8,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/FSP/KEYSWITCH _class=9,Subclass=0,Instance=0,BIT_POS=1,NORMAL_POS_AV=1,DIAG_POS_AV=1,LOCK_POS_AV=1,OFF_POS_AV,PERM=1 -/SYSTEM/CENTERPLANE/CPU_0_2_MODCARD_ON _class=8,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=3,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1 -/SYSTEM/CENTERPLANE/CPU_1_3_MODCARD_ON _class=8,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=1,INVERT=0,PORT=3,BITSHIFT=1,BYTEMASK=0x2,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1 -/SYSTEM/CENTERPLANE/CPU_0_2_MODCARD_ENGAGED _class=6,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=2,INVERT=0,PORT=3,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1 -/SYSTEM/CENTERPLANE/CPU_1_3_MODCARD_ENGAGED _class=6,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=3,INVERT=0,PORT=3,BITSHIFT=3,BYTEMASK=0x8,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1 -/SYSTEM/CENTERPLANE/CPU_0_2_MODCARD_POWER_FAULT _class=8,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=4,INVERT=0,PORT=3,BITSHIFT=4,BYTEMASK=0x10,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1 -/SYSTEM/CENTERPLANE/CPU_1_3_MODCARD_POWER_FAULT _class=8,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=5,INVERT=0,PORT=3,BITSHIFT=5,BYTEMASK=0x20,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1 -/SYSTEM/CENTERPLANE/CPU_0_2_MODCARD_POWER_OK _class=8,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=6,INVERT=0,PORT=3,BITSHIFT=6,BYTEMASK=0x40,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1 -/SYSTEM/CENTERPLANE/CPU_1_3_MODCARD_POWER_OK _class=8,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=7,INVERT=0,PORT=3,BITSHIFT=7,BYTEMASK=0x80,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK0_LOOPB_ENABLE_SWITCH _class=8,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=5,BUSADDR=0x46,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK1_LOOPB_ENABLE_SWITCH _class=8,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=1,INVERT=0,PORT=0,BITSHIFT=1,BYTEMASK=0x2,REG=0,TYPE=5,BUSADDR=0x46,BUSNUM=0,CNTLR=1 -/SYSTEM/SIB_BOARD _class=3,Subclass=0,Instance=0,PERM=1,FRU=1 -/SYSTEM/SIB_BOARD/24C64_A4_5 _class=11,Subclass=0,Instance=0,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa4,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB _class=3,Subclass=0,Instance=0,PERM=1,FRU=1 -/SYSTEM/PDB/PS0_SLOT _class=3,Subclass=0,Instance=0,PERM=1,FRU=1 -/SYSTEM/PDB/PS1_SLOT _class=3,Subclass=0,Instance=1,PERM=1,FRU=1 -/SYSTEM/PDB/PS0_SLOT/PS0 _class=3,Subclass=0,Instance=0,HOTPLUG=1,FRU=1 -/SYSTEM/PDB/PS1_SLOT/PS1 _class=3,Subclass=0,Instance=1,HOTPLUG=1,FRU=1 -/SYSTEM/PDB/PS0_SLOT/PS0/PS0_LOGICAL_STATE _class=3,Subclass=0,Instance=0,HOTPLUG=1,FRU=1 -/SYSTEM/PDB/PS1_SLOT/PS1/PS1_LOGICAL_STATE _class=3,Subclass=0,Instance=0,HOTPLUG=1,FRU=1 -/SYSTEM/PDB/PDB_PORT _class=10,Subclass=1,Instance=0,GPIO_REG=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=1,TYPE=1,BUSADDR=0x4C,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS0_OK_SENSOR _class=8,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=3,INVERT=0,PORT=0,BITSHIFT=3,BYTEMASK=0x8,REG=0,TYPE=7,BUSADDR=0x4c,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS1_OK_SENSOR _class=8,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=2,INVERT=0,PORT=0,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=7,BUSADDR=0x4c,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS0_PR_SENSOR _class=6,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=5,INVERT=0,PORT=0,BITSHIFT=5,BYTEMASK=0x10,REG=0,TYPE=7,BUSADDR=0x4c,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS1_PR_SENSOR _class=6,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=4,INVERT=0,PORT=0,BITSHIFT=4,BYTEMASK=0x20,REG=0,TYPE=7,BUSADDR=0x4c,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS0_ENABLED _class=8,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=6,INVERT=0,PORT=0,BITSHIFT=6,BYTEMASK=0x40,REG=0,TYPE=7,BUSADDR=0x4c,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS1_ENABLED _class=8,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=6,INVERT=0,PORT=0,BITSHIFT=6,BYTEMASK=0x40,REG=0,TYPE=7,BUSADDR=0x4c,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PCF8574_4C_5 _class=11,Subclass=5,Instance=0,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x4c,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/24C64_AE_5 _class=11,Subclass=0,Instance=0,PERM=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xae,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS1_SLOT/PS1/24C64_A0_5 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,HOTPLUG=1,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa0,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS0_SLOT/PS0/24C64_A2_5 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,HOTPLUG=1,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa2,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS0_SLOT/PS0/PS0_FAN_FAIL_SENSOR _class=8,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=2,INVERT=0,PORT=0,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=5,BUSADDR=0x72,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS0_SLOT/PS0/PS0_TEMP_FAIL_SENSOR _class=8,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=3,INVERT=0,PORT=0,BITSHIFT=3,BYTEMASK=0x8,REG=0,TYPE=5,BUSADDR=0x72,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS0_SLOT/PS0/PS0_AC_IN_SENSOR _class=8,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=5,BUSADDR=0x72,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS0_SLOT/PS0/PS0_FAULT_SENSOR _class=8,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=5,INVERT=0,PORT=0,BITSHIFT=5,BYTEMASK=0x10,REG=0,TYPE=5,BUSADDR=0x72,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS0_SLOT/PS0/PS0_RESET _class=10,Subclass=1,Instance=0,GPIO_REG=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=1,TYPE=1,BUSADDR=0x72,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS1_SLOT/PS1/PS1_FAN_FAIL_SENSOR _class=8,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=2,INVERT=0,PORT=0,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=5,BUSADDR=0x70,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS1_SLOT/PS1/PS1_TEMP_FAIL_SENSOR _class=8,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=3,INVERT=0,PORT=0,BITSHIFT=3,BYTEMASK=0x8,REG=0,TYPE=5,BUSADDR=0x70,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS1_SLOT/PS1/PS1_AC_IN_SENSOR _class=8,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=5,BUSADDR=0x70,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS1_SLOT/PS1/PS1_FAULT_SENSOR _class=8,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=5,INVERT=0,PORT=0,BITSHIFT=5,BYTEMASK=0x10,REG=0,TYPE=5,BUSADDR=0x70,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS1_SLOT/PS1/PS1_RESET _class=10,Subclass=1,Instance=0,GPIO_REG=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=1,TYPE=1,BUSADDR=0x70,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS1_SLOT/PS1/PCF8574A_70_5 _class=11,Subclass=5,Instance=0,VERSION=0,HOTPLUG=1,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x70,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS0_SLOT/PS0/PCF8574A_72_5 _class=11,Subclass=5,Instance=0,VERSION=0,HOTPLUG=1,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x72,BUSNUM=0,CNTLR=1 -OBJECT_INFO_END - -ASSOCIATIONS -ASSOCIATION PSVC_PRESENCE_SENSOR -DISK0 DISK0_PR_SENSOR -DISK1 DISK1_PR_SENSOR -CPU0_DIE_TEMPERATURE_SENSOR CPU_0_2_MODCARD_ENGAGED -CPU2_DIE_TEMPERATURE_SENSOR CPU_0_2_MODCARD_ENGAGED -CPU1_DIE_TEMPERATURE_SENSOR CPU_1_3_MODCARD_ENGAGED -CPU3_DIE_TEMPERATURE_SENSOR CPU_1_3_MODCARD_ENGAGED -PS0 PS0_PR_SENSOR -PS1 PS1_PR_SENSOR -ASSOCIATION_END -ASSOCIATION PSVC_FAN_SPEED_TACHOMETER -CPU1_FAN CPU1_FAN_TACH -CPU2_FAN CPU2_FAN_TACH -CPU0_FAN CPU0_FAN_TACH -IO0_FAN IO0_FAN_TACH -IO1_FAN IO1_FAN_TACH -ASSOCIATION_END -ASSOCIATION PSVC_DEV_TEMP_SENSOR -CPU1_FAN CPU0_DIE_TEMPERATURE_SENSOR -CPU1_FAN CPU1_DIE_TEMPERATURE_SENSOR -CPU1_FAN CPU2_DIE_TEMPERATURE_SENSOR -CPU1_FAN CPU3_DIE_TEMPERATURE_SENSOR -CPU_0_2_MOD_CARD CPU0_DIE_TEMPERATURE_SENSOR -CPU_0_2_MOD_CARD CPU2_DIE_TEMPERATURE_SENSOR -CPU_1_3_MOD_CARD CPU1_DIE_TEMPERATURE_SENSOR -CPU_1_3_MOD_CARD CPU3_DIE_TEMPERATURE_SENSOR -ASSOCIATION_END -ASSOCIATION PSVC_FAN_TRAY_FANS -FAN_TRAY_0 CPU0_FAN -FAN_TRAY_0 CPU1_FAN -FAN_TRAY_0 CPU2_FAN -FAN_TRAY_1 IO0_FAN -FAN_TRAY_1 IO1_FAN -ASSOCIATION_END -ASSOCIATION PSVC_SLOT_FAULT_LED -FAN_TRAY_0 CPU_FAN_FLT_LED -FAN_TRAY_1 IO_FAN_FLT_LED -DISK0_SLOT DISK0_FLT_LED -DISK1_SLOT DISK1_FLT_LED -ASSOCIATION_END -ASSOCIATION PSVC_SLOT_REMOVE_LED -DISK0_SLOT DISK0_REMOVE_LED -DISK1_SLOT DISK1_REMOVE_LED -ASSOCIATION_END -ASSOCIATION PSVC_TS_OVERTEMP_LED -ASSOCIATION_END -ASSOCIATION PSVC_DEV_FAULT_SENSOR -DISK0 DISK0_FAULT_SENSOR -DISK1 DISK1_FAULT_SENSOR -PS0 PS0_FAULT_SENSOR -PS0 PS0_FAN_FAIL_SENSOR -PS0 PS0_TEMP_FAIL_SENSOR -PS1 PS1_FAULT_SENSOR -PS1 PS1_FAN_FAIL_SENSOR -PS1 PS1_TEMP_FAIL_SENSOR -FSP_GEN_FAULT_LED DISK0 -FSP_GEN_FAULT_LED DISK1 -FSP_GEN_FAULT_LED CPU0_DIE_TEMPERATURE_SENSOR -FSP_GEN_FAULT_LED CPU1_DIE_TEMPERATURE_SENSOR -FSP_GEN_FAULT_LED CPU2_DIE_TEMPERATURE_SENSOR -FSP_GEN_FAULT_LED CPU3_DIE_TEMPERATURE_SENSOR -FSP_GEN_FAULT_LED DBP0_AMB_TEMPERATURE_SENSOR -FSP_GEN_FAULT_LED CPU1_FAN -FSP_GEN_FAULT_LED CPU2_FAN -FSP_GEN_FAULT_LED IO0_FAN -FSP_GEN_FAULT_LED IO1_FAN -FSP_GEN_FAULT_LED CPU0_FAN -FSP_GEN_FAULT_LED PS0 -FSP_GEN_FAULT_LED PS1 -FSP_GEN_FAULT_LED PS0_LOGICAL_STATE -FSP_GEN_FAULT_LED PS1_LOGICAL_STATE -ASSOCIATION_END -ASSOCIATION PSVC_DEV_FAULT_LED -CPU0_FAN CPU_FAN_FLT_LED -CPU1_FAN CPU_FAN_FLT_LED -CPU2_FAN CPU_FAN_FLT_LED -IO0_FAN IO_FAN_FLT_LED -IO1_FAN IO_FAN_FLT_LED -CPU0_FAN_TACH CPU_FAN_FLT_LED -CPU1_FAN_TACH CPU_FAN_FLT_LED -CPU2_FAN_TACH CPU_FAN_FLT_LED -IO0_FAN_TACH IO_FAN_FLT_LED -IO1_FAN_TACH IO_FAN_FLT_LED -FAN_TRAY_0 CPU_FAN_FLT_LED -FAN_TRAY_1 IO_FAN_FLT_LED -ASSOCIATION_END -ASSOCIATION PSVC_PARENT -CPU_0_2_MODCARD_ON CENTERPLANE -CPU_1_3_MODCARD_ON CENTERPLANE -CPU_1_3_MODCARD_ENGAGED CENTERPLANE -CPU_0_2_MODCARD_ENGAGED CENTERPLANE -CPU_1_3_MODCARD_ENGAGED CENTERPLANE -CPU_0_2_MODCARD_POWER_FAULT CENTERPLANE -CPU_1_3_MODCARD_POWER_FAULT CENTERPLANE -CPU_0_2_MODCARD_POWER_OK CENTERPLANE -CPU_1_3_MODCARD_POWER_OK CENTERPLANE -SIB_BOARD SYSTEM -24C64_A4_5 SIB_BOARD -SMART_CARD SYSTEM -NOT_YET_IMPLEMENTED SMART_CARD -FAN_TRAY_0 SYSTEM -FAN_TRAY_1 SYSTEM -CPU0_FAN FAN_TRAY_0 -CPU1_FAN FAN_TRAY_0 -CPU2_FAN FAN_TRAY_0 -IO0_FAN FAN_TRAY_1 -IO1_FAN FAN_TRAY_1 -IO_FAN_FLT_LED SYSTEM -IO_TEST_LED_AMBER IO_BOARD -IO_TEST_LED_RED IO_BOARD -IO_TEST_LED_GREEN IO_BOARD -CENTERPLANE SYSTEM -CPU0_FAN_FLT_LED CENTERPLANE -CENTERPLANE_TEST_LED_AMBER CENTERPLANE -CENTERPLANE_TEST_LED_RED CENTERPLANE -CENTERPLANE_TEST_LED_GREEN CENTERPLANE -CPU0_FAN_TACH CENTERPLANE -CPU_FAN_FLT_LED SYSTEM -CPU1_FAN_TACH MOTHERBOARD -CPU2_FAN_TACH MOTHERBOARD -IO0_FAN_TACH IO_BOARD -IO1_FAN_TACH IO_BOARD -CPU_0_2_MOD_CARD CPU_0_2_MOD_SLOT -CPU_1_3_MOD_CARD CPU_1_3_MOD_SLOT -CPU_0_2_MOD_SLOT MOTHERBOARD -CPU_1_3_MOD_SLOT MOTHERBOARD -CPU0_DIE_TEMPERATURE_SENSOR CPU_0_2_MOD_CARD -CPU1_DIE_TEMPERATURE_SENSOR CPU_1_3_MOD_CARD -CPU2_DIE_TEMPERATURE_SENSOR CPU_0_2_MOD_CARD -CPU3_DIE_TEMPERATURE_SENSOR CPU_1_3_MOD_CARD -DISK0_LOOPB_ENABLE_SWITCH DISK_BP0_BOARD -DISK1_LOOPB_ENABLE_SWITCH DISK_BP0_BOARD -DISK_BP0_BOARD DISK_BP0_BOARD_SLOT -LOOP_B_0_BOARD_SLOT DISK_BP0_BOARD -LOOP_B_0_BOARD LOOP_B_0_BOARD_SLOT -RSC_CARD RSC_SLOT -DISK_BP0_PR_SENSOR MOTHERBOARD -RSC_PR_SENSOR MOTHERBOARD -DBP0_AMB_TEMPERATURE_SENSOR DISK_BP0_BOARD -DISK0 DISK0_SLOT -DISK1 DISK1_SLOT -LOOP_B_0_BOARD_PR_SENSOR DISK_BP0_BOARD -DISK0_FAULT_SENSOR DISK_BP0_BOARD -DISK1_FAULT_SENSOR DISK_BP0_BOARD -DISK0_PR_SENSOR DISK_BP0_BOARD -DISK1_PR_SENSOR DISK_BP0_BOARD -DISK0_SLOT DISK_BP0_BOARD -DISK1_SLOT DISK_BP0_BOARD -DISK0_FLT_LED DISK_BP0_BOARD -DISK1_FLT_LED DISK_BP0_BOARD -DISK0_REMOVE_LED DISK_BP0_BOARD -DISK1_REMOVE_LED DISK_BP0_BOARD -FSP_LOCATOR_LED FSP -FSP_GEN_FAULT_LED FSP -KEYSWITCH FSP -FSP_KS_NORMAL_POS_SENSOR IO_BOARD -FSP_KS_DIAG_POS_SENSOR IO_BOARD -FSP_KS_LOCK_POS_SENSOR IO_BOARD -FSP_KS_OFF_POS_SENSOR IO_BOARD -DISK_BP0_BOARD_SLOT SYSTEM -RSC_SLOT SYSTEM -5V_ENABLE_SWITCH IO_BOARD -I2C_ENABLE_SWITCH IO_BOARD -MOTHERBOARD SYSTEM -IO_BOARD SYSTEM -FSP SYSTEM -24C02_A0_0 CPU_0_2_MOD_CARD -24C02_A2_0 CPU_0_2_MOD_CARD -24C02_A4_0 CPU_0_2_MOD_CARD -24C02_A6_0 CPU_0_2_MOD_CARD -24C02_A8_0 CPU_0_2_MOD_CARD -24C02_AA_0 CPU_0_2_MOD_CARD -24C02_AC_0 CPU_0_2_MOD_CARD -24C02_AE_0 CPU_0_2_MOD_CARD -24C02_A0_1 CPU_1_3_MOD_CARD -24C02_A2_1 CPU_1_3_MOD_CARD -24C02_A4_1 CPU_1_3_MOD_CARD -24C02_A6_1 CPU_1_3_MOD_CARD -24C02_A8_1 CPU_1_3_MOD_CARD -24C02_AA_1 CPU_1_3_MOD_CARD -24C02_AC_1 CPU_1_3_MOD_CARD -24C02_AE_1 CPU_1_3_MOD_CARD -24C02_A0_2 CPU_0_2_MOD_CARD -24C02_A2_2 CPU_0_2_MOD_CARD -24C02_A4_2 CPU_0_2_MOD_CARD -24C02_A6_2 CPU_0_2_MOD_CARD -24C02_A8_2 CPU_0_2_MOD_CARD -24C02_AA_2 CPU_0_2_MOD_CARD -24C02_AC_2 CPU_0_2_MOD_CARD -24C02_AE_2 CPU_0_2_MOD_CARD -24C02_A0_3 CPU_1_3_MOD_CARD -24C02_A2_3 CPU_1_3_MOD_CARD -24C02_A4_3 CPU_1_3_MOD_CARD -24C02_A6_3 CPU_1_3_MOD_CARD -24C02_A8_3 CPU_1_3_MOD_CARD -24C02_AA_3 CPU_1_3_MOD_CARD -24C02_AC_3 CPU_1_3_MOD_CARD -24C02_AE_3 CPU_1_3_MOD_CARD -24C64_A0_4 CPU_0_2_MOD_CARD -24C64_A2_4 CPU_1_3_MOD_CARD -24C64_A4_4 IO_BOARD -24C64_A8_4 MOTHERBOARD -24C64_AA_4 IO_BOARD -MAX1617_30_5 CPU_0_2_MOD_CARD -MAX1617_32_5 CPU_1_3_MOD_CARD -MAX1617_34_5 CPU_0_2_MOD_CARD -PCF8574_46_5 IO_BOARD -PCF8574_44_5 DISK_BP0_BOARD -DISK_PORT DISK_BP0_BOARD -PCF8574_4C_5 IO_BOARD -MAX1617_52_5 CPU_1_3_MOD_CARD -SSC050_80_5 MOTHERBOARD -SSC050_82_5 IO_BOARD -LM75_9C_5 DISK_BP0_BOARD -24C64_A6_5 RSC_CARD -24C64_A8_5 DISK_BP0_BOARD -PDB SYSTEM -PDB_PORT PDB -PS0_SLOT PDB -PS1_SLOT PDB -PS0 PS0_SLOT -PS1 PS1_SLOT -PS0_LOGICAL_STATE PS0 -PS0_FAN_FAIL_SENSOR PS0 -PS0_TEMP_FAIL_SENSOR PS0 -PS0_AC_IN_SENSOR PS0 -PS0_FAULT_SENSOR PS0 -PS0_RESET PS0 -PS0_OK_SENSOR PDB -PS0_PR_SENSOR PDB -PS0_ENABLED PDB -PS1_LOGICAL_STATE PS1 -PS1_FAN_FAIL_SENSOR PS1 -PS1_TEMP_FAIL_SENSOR PS1 -PS1_AC_IN_SENSOR PS1 -PS1_FAULT_SENSOR PS1 -PS1_RESET PS1 -PS1_OK_SENSOR PDB -PS1_PR_SENSOR PDB -PS1_ENABLED PDB -PCF8574A_72_5 PS0 -PCF8574A_70_5 PS1 -24C64_A2_5 PS0 -24C64_A0_5 PS1 -24C64_AE_5 PDB -PCF8574_4C_5 PDB -ASSOCIATION_END -ASSOCIATION PSVC_CPU -SYSTEM CPU_0_2_MOD_CARD -SYSTEM CPU_1_3_MOD_CARD -ASSOCIATION_END -ASSOCIATION PSVC_HOTPLUG_ENABLE_SWITCH -PS0 I2C_ENABLE_SWITCH -PS1 I2C_ENABLE_SWITCH -ASSOCIATION_END -ASSOCIATION PSVC_PS -SYSTEM PS0 -SYSTEM PS1 -ASSOCIATION_END -ASSOCIATION PSVC_KEYSWITCH -SYSTEM KEYSWITCH -FSP KEYSWITCH -ASSOCIATION_END -ASSOCIATION PSVC_KS_NORMAL_POS_SENSOR -KEYSWITCH FSP_KS_NORMAL_POS_SENSOR -ASSOCIATION_END -ASSOCIATION PSVC_KS_DIAG_POS_SENSOR -KEYSWITCH FSP_KS_DIAG_POS_SENSOR -ASSOCIATION_END -ASSOCIATION PSVC_KS_LOCK_POS_SENSOR -KEYSWITCH FSP_KS_LOCK_POS_SENSOR -ASSOCIATION_END -ASSOCIATION PSVC_KS_OFF_POS_SENSOR -KEYSWITCH FSP_KS_OFF_POS_SENSOR -ASSOCIATION_END -ASSOCIATION PSVC_FAN -SYSTEM CPU0_FAN -SYSTEM CPU1_FAN -SYSTEM CPU2_FAN -SYSTEM IO0_FAN -SYSTEM IO1_FAN -ASSOCIATION_END -ASSOCIATION PSVC_TS -SYSTEM CPU0_DIE_TEMPERATURE_SENSOR -SYSTEM CPU1_DIE_TEMPERATURE_SENSOR -SYSTEM CPU2_DIE_TEMPERATURE_SENSOR -SYSTEM CPU3_DIE_TEMPERATURE_SENSOR -SYSTEM DBP0_AMB_TEMPERATURE_SENSOR -ASSOCIATION_END -ASSOCIATION PSVC_DISK -SYSTEM DISK0 -SYSTEM DISK1 -ASSOCIATION_END -ASSOCIATION PSVC_LED -SYSTEM CPU_FAN_FLT_LED -SYSTEM IO_FAN_FLT_LED -SYSTEM CPU0_FAN_FLT_LED -SYSTEM FSP_GEN_FAULT_LED -DISK0 DISK0_REMOVE_LED -DISK0 DISK0_FLT_LED -DISK1 DISK1_REMOVE_LED -DISK1 DISK1_FLT_LED -ASSOCIATION_END -ASSOCIATION PSVC_FSP_LED -SYSTEM FSP_GEN_FAULT_LED -SYSTEM FSP_LOCATOR_LED -ASSOCIATION_END -ASSOCIATION PSVC_PHYSICAL_DEVICE -SYSTEM 24C02_A0_0 -SYSTEM 24C02_A2_0 -SYSTEM 24C02_A4_0 -SYSTEM 24C02_A6_0 -SYSTEM 24C02_A8_0 -SYSTEM 24C02_AA_0 -SYSTEM 24C02_AC_0 -SYSTEM 24C02_AE_0 -SYSTEM 24C02_A0_1 -SYSTEM 24C02_A2_1 -SYSTEM 24C02_A4_1 -SYSTEM 24C02_A6_1 -SYSTEM 24C02_A8_1 -SYSTEM 24C02_AA_1 -SYSTEM 24C02_AC_1 -SYSTEM 24C02_AE_1 -SYSTEM 24C02_A0_2 -SYSTEM 24C02_A2_2 -SYSTEM 24C02_A4_2 -SYSTEM 24C02_A6_2 -SYSTEM 24C02_A8_2 -SYSTEM 24C02_AA_2 -SYSTEM 24C02_AC_2 -SYSTEM 24C02_AE_2 -SYSTEM 24C02_A0_3 -SYSTEM 24C02_A2_3 -SYSTEM 24C02_A4_3 -SYSTEM 24C02_A6_3 -SYSTEM 24C02_A8_3 -SYSTEM 24C02_AA_3 -SYSTEM 24C02_AC_3 -SYSTEM 24C02_AE_3 -SYSTEM 24C64_A0_4 -SYSTEM 24C64_A2_4 -SYSTEM 24C64_A4_4 -SYSTEM 24C64_A8_4 -SYSTEM 24C64_AA_4 -SYSTEM MAX1617_30_5 -SYSTEM MAX1617_32_5 -SYSTEM MAX1617_34_5 -SYSTEM PCF8574_44_5 -SYSTEM PCF8574_46_5 -SYSTEM PCF8574_4C_5 -SYSTEM PCF8574A_70_5 -SYSTEM PCF8574A_72_5 -SYSTEM MAX1617_52_5 -SYSTEM SSC050_80_5 -SYSTEM SSC050_82_5 -SYSTEM LM75_9C_5 -SYSTEM 24C64_A4_5 -SYSTEM 24C64_A6_5 -SYSTEM 24C64_A8_5 -CPU_FAN_FLT_LED SSC050_82_5 -IO_FAN_FLT_LED SSC050_82_5 -CPU0_FAN_FLT_LED SSC050_82_5 -CPU1_FAN_TACH SSC050_80_5 -CPU2_FAN_TACH SSC050_80_5 -IO0_FAN_TACH SSC050_82_5 -IO1_FAN_TACH SSC050_82_5 -CPU0_FAN_TACH SSC050_82_5 -5V_ENABLE_SWITCH PCF8574_46_5 -I2C_ENABLE_SWITCH PCF8574_46_5 -DISK0_LOOPB_ENABLE_SWITCH PCF8574_46_5 -DISK1_LOOPB_ENABLE_SWITCH PCF8574_46_5 -CPU0_DIE_TEMPERATURE_SENSOR MAX1617_30_5 -CPU1_DIE_TEMPERATURE_SENSOR MAX1617_32_5 -CPU2_DIE_TEMPERATURE_SENSOR MAX1617_34_5 -CPU3_DIE_TEMPERATURE_SENSOR MAX1617_52_5 -DBP0_AMB_TEMPERATURE_SENSOR LM75_9C_5 -FSP_GEN_FAULT_LED SSC050_82_5 -FSP_LOCATOR_LED SSC050_82_5 -IO_TEST_LED_AMBER SSC050_82_5 -IO_TEST_LED_RED SSC050_82_5 -IO_TEST_LED_GREEN SSC050_82_5 -CENTERPLANE_TEST_LED_AMBER SSC050_82_5 -CENTERPLANE_TEST_LED_RED SSC050_82_5 -CENTERPLANE_TEST_LED_GREEN SSC050_82_5 -FSP_KS_NORMAL_POS_SENSOR SSC050_82_5 -FSP_KS_DIAG_POS_SENSOR SSC050_82_5 -FSP_KS_LOCK_POS_SENSOR SSC050_82_5 -FSP_KS_OFF_POS_SENSOR SSC050_82_5 -DISK_BP0_PR_SENSOR SSC050_80_5 -RSC_PR_SENSOR SSC050_82_5 -LOOP_B_0_BOARD_PR_SENSOR SSC050_82_5 -DISK_PORT PCF8574_44_5 -DISK0_FLT_LED PCF8574_44_5 -DISK1_FLT_LED PCF8574_44_5 -DISK0_REMOVE_LED PCF8574_44_5 -DISK1_REMOVE_LED PCF8574_44_5 -DISK0_FAULT_SENSOR PCF8574_44_5 -DISK1_FAULT_SENSOR PCF8574_44_5 -DISK0_PR_SENSOR PCF8574_44_5 -DISK1_PR_SENSOR PCF8574_44_5 -CPU_0_2_MODCARD_ON SSC050_80_5 -CPU_1_3_MODCARD_ON SSC050_80_5 -CPU_1_3_MODCARD_ENGAGED SSC050_80_5 -CPU_0_2_MODCARD_ENGAGED SSC050_80_5 -CPU_1_3_MODCARD_ENGAGED SSC050_80_5 -CPU_0_2_MODCARD_POWER_FAULT SSC050_80_5 -CPU_1_3_MODCARD_POWER_FAULT SSC050_80_5 -CPU_0_2_MODCARD_POWER_OK SSC050_80_5 -CPU_1_3_MODCARD_POWER_OK SSC050_80_5 -PDB_PORT PCF8574_4C_5 -PS0 PCF8574A_72_5 -PS0 24C64_A2_5 -PS0_FAN_FAIL_SENSOR PCF8574A_72_5 -PS0_TEMP_FAIL_SENSOR PCF8574A_72_5 -PS0_AC_IN_SENSOR PCF8574A_72_5 -PS0_FAULT_SENSOR PCF8574A_72_5 -PS0_RESET PCF8574A_72_5 -PS0_ENABLED PCF8574_4C_5 -PS0_OK_SENSOR PCF8574_4C_5 -PS0_PR_SENSOR PCF8574_4C_5 -PS1 PCF8574A_70_5 -PS1 24C64_A0_5 -PS1_FAN_FAIL_SENSOR PCF8574A_70_5 -PS1_TEMP_FAIL_SENSOR PCF8574A_70_5 -PS1_AC_IN_SENSOR PCF8574A_70_5 -PS1_FAULT_SENSOR PCF8574A_70_5 -PS1_RESET PCF8574A_70_5 -PS1_ENABLED PCF8574_4C_5 -PS1_OK_SENSOR PCF8574_4C_5 -PS1_PR_SENSOR PCF8574_4C_5 -SYSTEM 24C64_A0_5 -SYSTEM 24C64_A2_5 -SYSTEM 24C64_AE_5 -ASSOCIATION_END -ASSOCIATION PSVC_FRU -CPU0_DIE_TEMPERATURE_SENSOR 24C64_A0_4 -CPU1_DIE_TEMPERATURE_SENSOR 24C64_A2_4 -CPU2_DIE_TEMPERATURE_SENSOR 24C64_A0_4 -CPU3_DIE_TEMPERATURE_SENSOR 24C64_A2_4 -DBP0_AMB_TEMPERATURE_SENSOR 24C64_A8_5 -CPU1_FAN FAN_TRAY_0 -CPU2_FAN FAN_TRAY_0 -CPU0_FAN FAN_TRAY_0 -IO0_FAN FAN_TRAY_1 -IO1_FAN FAN_TRAY_1 -ASSOCIATION_END -ASSOCIATIONS_END - -DEVPATHS -0 0 0xA0 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a0:fru -0 0 0xA2 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a2:fru -0 0 0xA4 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a4:fru -0 0 0xA6 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a6:fru -0 0 0xA8 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a8:fru -0 0 0xAA 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,aa:fru -0 0 0xAC 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,ac:fru -0 0 0xAE 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,ae:fru -0 1 0xA0 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a0:fru -0 1 0xA2 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a2:fru -0 1 0xA4 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a4:fru -0 1 0xA6 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a6:fru -0 1 0xA8 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a8:fru -0 1 0xAA 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,aa:fru -0 1 0xAC 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,ac:fru -0 1 0xAE 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,ae:fru -0 2 0xA0 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a0:fru -0 2 0xA2 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a2:fru -0 2 0xA4 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a4:fru -0 2 0xA6 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a6:fru -0 2 0xA8 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a8:fru -0 2 0xAA 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,aa:fru -0 2 0xAC 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,ac:fru -0 2 0xAE 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,ae:fru -0 3 0xA0 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a0:fru -0 3 0xA2 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a2:fru -0 3 0xA4 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a4:fru -0 3 0xA6 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a6:fru -0 3 0xA8 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a8:fru -0 3 0xAA 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,aa:fru -0 3 0xAC 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,ac:fru -0 3 0xAE 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,ae:fru -0 4 0xA0 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@4,a0:fru -0 4 0xA2 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@4,a2:fru -0 4 0xA4 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/nvram@4,a4:nvram -0 4 0xA8 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@4,a8:fru -0 4 0xAA 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@4,aa:fru -1 0 0x30 0 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,30:amb_temp -1 0 0x30 1 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,30:die_temp -1 0 0x32 0 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,32:amb_temp -1 0 0x32 1 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,32:die_temp -1 0 0x34 0 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,34:amb_temp -1 0 0x34 1 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,34:die_temp -1 0 0x40 0 /devices/pci@9,700000/ebus@1/i2c@1,30/card-reader@0,40:card-reader0 -1 0 0x4c 0 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,4c:pcf8574 -1 0 0x44 0 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,44:pcf8574 -1 0 0x46 0 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,46:pcf8574 -1 0 0x52 0 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,52:amb_temp -1 0 0x52 1 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,52:die_temp -1 0 0x70 0 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,70:pcf8574 -1 0 0x72 0 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,72:pcf8574 -1 0 0x80 0 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,80:port_0 -1 0 0x80 1 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,80:port_1 -1 0 0x80 2 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,80:port_2 -1 0 0x80 3 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,80:port_3 -1 0 0x80 4 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,80:port_4 -1 0 0x82 0 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,82:port_0 -1 0 0x82 1 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,82:port_1 -1 0 0x82 2 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,82:port_2 -1 0 0x82 3 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,82:port_3 -1 0 0x82 4 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,82:port_4 -1 0 0x90 0 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,90:port_0 -1 0 0x90 1 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,90:port_1 -1 0 0x90 2 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,90:port_2 -1 0 0x90 3 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,90:port_3 -1 0 0x92 0 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,92:port_0 -1 0 0x92 1 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,92:port_1 -1 0 0x92 2 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,92:port_2 -1 0 0x92 3 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,92:port_3 -1 0 0x94 0 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,94:port_0 -1 0 0x94 1 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,94:port_1 -1 0 0x94 2 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,94:port_2 -1 0 0x94 3 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,94:port_3 -1 0 0x98 0 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,98:die_temp -1 0 0x9c 0 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature-sensor@0,9c:lm75 -1 0 0xA0 0 /devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,a0:fru -1 0 0xA2 0 /devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,a2:fru -1 0 0xA4 0 /devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,a4:fru -1 0 0xA6 0 /devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,a6:fru -1 0 0xA8 0 /devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,a8:fru -1 0 0xAE 0 /devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,ae:fru -DEVPATHS_END - -TABLES -TABLE -TEMP_SENSOR_CONVERSIONS 2 -160 160 160 160 160 160 160 160 -160 160 160 160 160 160 159 156 -153 150 147 145 143 140 138 136 -134 133 131 129 128 126 125 123 -122 120 119 118 117 115 114 113 -112 111 110 109 108 107 106 105 -104 103 103 102 101 100 99 98 -98 97 96 95 95 94 93 93 -92 91 91 90 89 89 88 87 -87 86 85 85 84 84 83 83 -82 81 81 80 80 79 79 78 -78 77 77 76 76 75 74 74 -74 73 73 72 72 71 71 70 -70 69 69 68 68 67 67 66 -66 65 65 65 64 64 63 63 -62 62 61 61 61 60 60 59 -59 58 58 58 57 57 56 56 -55 55 55 54 54 53 53 53 -52 52 51 51 50 50 50 49 -49 48 48 47 47 47 46 46 -45 45 44 44 44 43 43 42 -42 41 41 41 40 40 39 39 -38 38 37 37 37 36 36 35 -35 34 34 33 33 32 32 31 -31 30 30 29 29 28 28 27 -27 26 26 25 25 24 24 23 -22 22 21 21 20 20 19 18 -18 17 16 16 15 14 14 13 -12 11 11 10 9 8 7 6 - 5 4 3 2 1 0 -1 -2 --3 -5 -6 -7 -9 -11 -12 -14 --17 -19 -22 -25 -28 -33 -39 -50 -TABLE_END -TABLE -3_3V_I_CONVERSIONS 2 -0 0 0 0 1 1 1 1 -1 1 1 2 2 2 2 2 -2 2 3 3 3 3 3 3 -3 4 4 4 4 4 4 4 -5 5 5 5 5 5 5 6 -6 6 6 6 6 6 6 7 -7 7 7 7 7 7 8 8 -8 8 8 8 8 9 9 9 -9 9 9 9 10 10 10 10 -10 10 10 11 11 11 11 11 -11 11 12 12 12 12 12 12 -12 13 13 13 13 13 13 13 -14 14 14 14 14 14 14 15 -15 15 15 15 15 15 16 16 -16 16 16 16 16 17 17 17 -17 17 17 17 18 18 18 18 -18 18 18 18 19 19 19 19 -19 19 19 20 20 20 20 20 -20 20 21 21 21 21 21 21 -21 22 22 22 22 22 22 22 -23 23 23 23 23 23 23 24 -24 24 24 24 24 24 25 25 -25 25 25 25 25 26 26 26 -26 26 26 26 27 27 27 27 -27 27 27 28 28 28 28 28 -28 28 29 29 29 29 29 29 -29 30 30 30 30 30 30 30 -30 31 31 31 31 31 31 31 -32 32 32 32 32 32 32 33 -33 33 33 33 33 33 34 34 -34 34 34 34 34 35 35 35 -35 35 35 35 36 36 36 36 -36 -TABLE_END -TABLE -5V_I_CONVERSIONS 2 -0 0 0 0 0 1 1 1 -1 1 1 1 1 1 2 2 -2 2 2 2 2 2 2 3 -3 3 3 3 3 3 3 3 -4 4 4 4 4 4 4 4 -4 5 5 5 5 5 5 5 -5 5 5 6 6 6 6 6 -6 6 6 6 7 7 7 7 -7 7 7 7 7 8 8 8 -8 8 8 8 8 8 9 9 -9 9 9 9 9 9 9 10 -10 10 10 10 10 10 10 10 -11 11 11 11 11 11 11 11 -11 12 12 12 12 12 12 12 -12 12 13 13 13 13 13 13 -13 13 13 14 14 14 14 14 -14 14 14 14 14 15 15 15 -15 15 15 15 15 15 16 16 -16 16 16 16 16 16 16 17 -17 17 17 17 17 17 17 17 -18 18 18 18 18 18 18 18 -18 19 19 19 19 19 19 19 -19 19 20 20 20 20 20 20 -20 20 20 21 21 21 21 21 -21 21 21 21 22 22 22 22 -22 22 22 22 22 23 23 23 -23 23 23 23 23 23 23 24 -24 24 24 24 24 24 24 24 -25 25 25 25 25 25 25 25 -25 26 26 26 26 26 26 26 -26 26 27 27 27 27 27 27 -27 27 27 28 28 28 28 28 -28 -TABLE_END -TABLE -12V_I_CONVERSIONS 2 -0 0 0 0 0 0 0 1 -1 1 1 1 1 1 1 1 -1 1 1 2 2 2 2 2 -2 2 2 2 2 2 2 2 -3 3 3 3 3 3 3 3 -3 3 3 3 4 4 4 4 -4 4 4 4 4 4 4 4 -5 5 5 5 5 5 5 5 -5 5 5 5 5 6 6 6 -6 6 6 6 6 6 6 6 -6 7 7 7 7 7 7 7 -7 7 7 7 7 7 8 8 -8 8 8 8 8 8 8 8 -8 8 9 9 9 9 9 9 -9 9 9 9 9 9 9 10 -10 10 10 10 10 10 10 10 -10 10 10 11 11 11 11 11 -11 11 11 11 11 11 11 11 -12 12 12 12 12 12 12 12 -12 12 12 12 13 13 13 13 -13 13 13 13 13 13 13 13 -14 14 14 14 14 14 14 14 -14 14 14 14 14 15 15 15 -15 15 15 15 15 15 15 15 -15 16 16 16 16 16 16 16 -16 16 16 16 16 16 17 17 -17 17 17 17 17 17 17 17 -17 17 18 18 18 18 18 18 -18 18 18 18 18 18 18 19 -19 19 19 19 19 19 19 19 -19 19 19 20 20 20 20 20 -20 20 20 20 20 20 20 20 -20 -TABLE_END -TABLE -48V_I_CONVERSIONS 2 -0 0 0 0 0 0 0 0 -0 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 -1 1 2 2 2 2 2 2 -2 2 2 2 2 2 2 2 -2 2 2 3 3 3 3 3 -3 3 3 3 3 3 3 3 -3 3 3 3 4 4 4 4 -4 4 4 4 4 4 4 4 -4 4 4 4 4 5 5 5 -5 5 5 5 5 5 5 5 -5 5 5 5 5 5 6 6 -6 6 6 6 6 6 6 6 -6 6 6 6 6 6 6 7 -7 7 7 7 7 7 7 7 -7 7 7 7 7 7 7 7 -8 8 8 8 8 8 8 8 -8 8 8 8 8 8 8 8 -8 9 9 9 9 9 9 9 -9 9 9 9 9 9 9 9 -9 9 10 10 10 10 10 10 -10 10 10 10 10 10 10 10 -10 10 10 11 11 11 11 11 -11 11 11 11 11 11 11 11 -11 11 11 11 12 12 12 12 -12 12 12 12 12 12 12 12 -12 12 12 12 12 13 13 13 -13 13 13 13 13 13 13 13 -13 13 13 13 13 13 14 14 -14 14 14 14 14 14 14 14 -14 14 14 14 14 14 14 15 -15 15 15 15 15 15 15 15 -15 -TABLE_END -TABLES_END - -PROJECTED_PROPERTIES -CPU_0_2_MOD_CARD Temperature0 CPU0_DIE_TEMPERATURE_SENSOR Temperature -CPU_0_2_MOD_CARD Temperature1 CPU2_DIE_TEMPERATURE_SENSOR Temperature -CPU_1_3_MOD_CARD Temperature0 CPU1_DIE_TEMPERATURE_SENSOR Temperature -CPU_1_3_MOD_CARD Temperature1 CPU3_DIE_TEMPERATURE_SENSOR Temperature -CPU1_FAN Fan-speed CPU1_FAN_TACH AtoDSensorValue -CPU2_FAN Fan-speed CPU2_FAN_TACH AtoDSensorValue -IO0_FAN Fan-speed IO0_FAN_TACH AtoDSensorValue -IO1_FAN Fan-speed IO1_FAN_TACH AtoDSensorValue -CPU0_FAN Fan-speed CPU0_FAN_TACH AtoDSensorValue -PROJECTED_PROPERTIES_END diff --git a/usr/src/cmd/picl/plugins/sun4u/sebring/devtree/Makefile b/usr/src/cmd/picl/plugins/sun4u/sebring/devtree/Makefile deleted file mode 100644 index bc6c5497e6..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/sebring/devtree/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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# cmd/picl/plugins/sun4u/sebring/devtree/Makefile -# -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-V490 - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -install := FILEMODE = 0444 - -CONF= picldevtree.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: - -install: $(ROOTLIBDIR) $(ROOTCONF) - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/sebring/devtree/picldevtree.conf b/usr/src/cmd/picl/plugins/sun4u/sebring/devtree/picldevtree.conf deleted file mode 100644 index 140b017fb1..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/sebring/devtree/picldevtree.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 2003 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -#ident "%Z%%M% %I% %E% SMI" -# -# Platform specific .conf file for picldevtree plug-in -fru seeprom diff --git a/usr/src/cmd/picl/plugins/sun4u/sebring/frudata/Makefile b/usr/src/cmd/picl/plugins/sun4u/sebring/frudata/Makefile deleted file mode 100644 index 0d79a5b4dc..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/sebring/frudata/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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. -# -# cmd/picl/plugins/sun4u/sebring/frudata/Makefile -# -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-V490 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONF= libpiclfrudata.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 - - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: $(CONF) - -install: $(ROOTLIBDIR) $(ROOTCONF) - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/sebring/frudata/libpiclfrudata.conf b/usr/src/cmd/picl/plugins/sun4u/sebring/frudata/libpiclfrudata.conf deleted file mode 100644 index 80ef795dc6..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/sebring/frudata/libpiclfrudata.conf +++ /dev/null @@ -1,173 +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 2003 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -#ident "%Z%%M% %I% %E% SMI" -# -# This file creates the FRU device paths for the FRUAccess library -# - - - - - - - - - - -VERSION 1.0 - - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=0,a0 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a0:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=0,a2 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a2:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=0,a4 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a4:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=0,a6 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a6:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=0,a8 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a8:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=0,aa -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,aa:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=0,ac -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,ac:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=0,ae -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,ae:fru" - - - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=1,a0 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a0:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=1,a2 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a2:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=1,a4 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a4:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=1,a6 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a6:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=1,a8 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a8:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=1,aa -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,aa:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=1,ac -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,ac:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=1,ae -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,ae:fru" - - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=2,a0 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a0:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=2,a2 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a2:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=2,a4 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a4:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=2,a6 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a6:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=2,a8 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a8:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=2,aa -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,aa:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=2,ac -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,ac:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=2,ae -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,ae:fru" - - - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=3,a0 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a0:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=3,a2 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a2:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=3,a4 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a4:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=3,a6 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a6:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=3,a8 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a8:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=3,aa -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,aa:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=3,ac -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,ac:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=3,ae -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,ae:fru" - - - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=4,a0 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@4,a0:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=4,a2 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@4,a2:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=4,a8 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@4,a8:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=4,aa -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@4,aa:fru" - - - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,30/fru?UnitAddress=0,a0 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,a0:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,30/fru?UnitAddress=0,a2 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,a2:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,30/fru?UnitAddress=0,a6 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,a6:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,30/fru?UnitAddress=0,a8 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,a8:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,30/fru?UnitAddress=0,ae -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,ae:fru" diff --git a/usr/src/cmd/picl/plugins/sun4u/sebring/frutree/Makefile b/usr/src/cmd/picl/plugins/sun4u/sebring/frutree/Makefile deleted file mode 100644 index 1d1a624043..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/sebring/frutree/Makefile +++ /dev/null @@ -1,76 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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 $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-V490 -CHERRY_LINKTO_PLATFORM = SUNW,Sun-Fire-480R - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -all: - -install: $(ROOTLIBDIR) all; $(MAKE) $(JAG_LINK) - -_msg: $(MSGDOMAIN) - -$(MSGDOMAIN): - $(INS.dir) - -$(LIBLINKS): FRC - $(RM) $@; $(SYMLINK) $(DYNLIB) $@ - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: - -JAG_LINK=`cd $(ROOT_PLATFORM)/lib/picl/plugins/; \ -echo $(ROOT_PLATFORM); \ -rm -f libpiclfrutree.so.1; \ -rm -f libpiclfrutree.so; \ -rm -f piclfrutree.conf; \ -ln -s ../../../../$(CHERRY_LINKTO_PLATFORM)/lib/picl/plugins/libpiclfrutree.so.1 libpiclfrutree.so.1; \ -ln -s ../../../../$(CHERRY_LINKTO_PLATFORM)/lib/picl/plugins/libpiclfrutree.so libpiclfrutree.so; \ -ln -s ../../../../$(CHERRY_LINKTO_PLATFORM)/lib/picl/plugins/piclfrutree.conf piclfrutree.conf` diff --git a/usr/src/cmd/picl/plugins/sun4u/sebring/psvcplugin/Makefile b/usr/src/cmd/picl/plugins/sun4u/sebring/psvcplugin/Makefile deleted file mode 100644 index 691a6d02ac..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/sebring/psvcplugin/Makefile +++ /dev/null @@ -1,74 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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 $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-V490 -CHERRY_LINKTO_PLATFORM = SUNW,Sun-Fire-480R - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -all: - -install: $(ROOTLIBDIR) all; $(MAKE) $(JAG_LINK) - -_msg: $(MSGDOMAIN) - -$(MSGDOMAIN): - $(INS.dir) - -$(LIBLINKS): FRC - $(RM) $@; $(SYMLINK) $(DYNLIB) $@ - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: - -JAG_LINK=`cd $(ROOT_PLATFORM)/lib/picl/plugins/; \ -echo $(ROOT_PLATFORM); \ -rm -f libpsvcplugin_psr.so.1; \ -rm -f libpsvcplugin_psr.so; \ -ln -s ../../../../$(CHERRY_LINKTO_PLATFORM)/lib/picl/plugins/libpsvcplugin_psr.so.1 libpsvcplugin_psr.so.1; \ -ln -s ../../../../$(CHERRY_LINKTO_PLATFORM)/lib/picl/plugins/libpsvcplugin_psr.so libpsvcplugin_psr.so;` diff --git a/usr/src/cmd/picl/plugins/sun4u/sebring/psvcpolicy/Makefile b/usr/src/cmd/picl/plugins/sun4u/sebring/psvcpolicy/Makefile deleted file mode 100644 index 22bc75546c..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/sebring/psvcpolicy/Makefile +++ /dev/null @@ -1,74 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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 $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-V490 -CHERRY_LINKTO_PLATFORM = SUNW,Sun-Fire-480R - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -all: - -install: $(ROOTLIBDIR) all; $(MAKE) $(JAG_LINK) - -_msg: $(MSGDOMAIN) - -$(MSGDOMAIN): - $(INS.dir) - -$(LIBLINKS): FRC - $(RM) $@; $(SYMLINK) $(DYNLIB) $@ - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: - -JAG_LINK=`cd $(ROOT_PLATFORM)/lib; \ -echo $(ROOT_PLATFORM); \ -rm -f libpsvcpolicy_psr.so.1; \ -rm -f libpsvcpolicy_psr.so; \ -ln -s ../../$(CHERRY_LINKTO_PLATFORM)/lib/libpsvcpolicy_psr.so.1 libpsvcpolicy_psr.so.1; \ -ln -s ../../$(CHERRY_LINKTO_PLATFORM)/lib/libpsvcpolicy_psr.so libpsvcpolicy_psr.so;` diff --git a/usr/src/cmd/picl/plugins/sun4u/silverstone/Makefile b/usr/src/cmd/picl/plugins/sun4u/silverstone/Makefile deleted file mode 100644 index 1dbb2dca8a..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/silverstone/Makefile +++ /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, 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" -# -# cmd/picl/plugins/sun4u/silverstone/Makefile -# - -SUBDIRS= psvcplugin psvcpolicy conf devtree frutree frudata .WAIT - -MSGSUBDIRS= psvcplugin psvcpolicy frutree - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -.KEEP_STATE: - -all install clean clobber: $(SUBDIRS) - -_msg: $(MSGSUBDIRS) - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/silverstone/conf/Makefile b/usr/src/cmd/picl/plugins/sun4u/silverstone/conf/Makefile deleted file mode 100644 index 2c74fd5fe3..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/silverstone/conf/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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# cmd/picl/plugins/sun4u/silverstone/conf/Makefile -# -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-V890 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLATFORM)/lib - -CONF= platsvcd.conf psvcobj.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0444 - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: $(CONF) - -install: $(ROOTLIBDIR) $(ROOTCONF) - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/silverstone/conf/platsvcd.conf b/usr/src/cmd/picl/plugins/sun4u/silverstone/conf/platsvcd.conf deleted file mode 100644 index 2f517842f9..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/silverstone/conf/platsvcd.conf +++ /dev/null @@ -1,365 +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" - - -/* - * Silverstone platsvcd.conf - */ - -/* - * Format: - * - * TIMEOUT - * Specifies a maximum interval in seconds that an application - * is allowed to lock out the platform services daemon - * - * INTERVAL <#tasks at this interval> - * INTERVAL_END - * Indicates the poll interval at which a list of tasks will be run - * - * TASK - * - * Object string ID of first object - * Object string ID of second object - * Object string ID of nth object - * TASK_END - * Specifies the "task" or policy routine, the shared object file it - * resides in, and the object IDs of objects it must be called for - */ - -TIMEOUT 300 - -INTERVAL 0 13 -TASK /usr/platform/sun4u/lib/libpsvcpolicy.so.1 psvc_fan_present_policy_0 -5 -CPU0_PRIM_FAN -CPU1_PRIM_FAN -IO0_PRIM_FAN -IO1_PRIM_FAN -IO_BRIDGE_PRIM_FAN -TASK_END -TASK /usr/platform/sun4u/lib/libpsvcpolicy.so.1 psvc_update_thresholds_0 -12 -CPU0_DIE_TEMPERATURE_SENSOR -CPU1_DIE_TEMPERATURE_SENSOR -ZULU1_DIE_TEMPERATURE_SENSOR -CPU2_DIE_TEMPERATURE_SENSOR -CPU3_DIE_TEMPERATURE_SENSOR -ZULU3_DIE_TEMPERATURE_SENSOR -CPU4_DIE_TEMPERATURE_SENSOR -ZULU4_DIE_TEMPERATURE_SENSOR -CPU5_DIE_TEMPERATURE_SENSOR -CPU6_DIE_TEMPERATURE_SENSOR -ZULU6_DIE_TEMPERATURE_SENSOR -CPU7_DIE_TEMPERATURE_SENSOR -TASK_END -TASK /usr/platform/SUNW,Sun-Fire-880/lib/libpsvcpolicy_psr.so.1 psvc_MB_update_thresholds_0 -1 -MB_AMB_TEMPERATURE_SENSOR -TASK_END -TASK /usr/platform/SUNW,Sun-Fire-880/lib/libpsvcpolicy_psr.so.1 psvc_IO_update_thresholds_0 -1 -IOB_AMB_TEMPERATURE_SENSOR -TASK_END -TASK /usr/platform/SUNW,Sun-Fire-880/lib/libpsvcpolicy_psr.so.1 psvc_DBP_update_thresholds_0 -2 -DBP0_AMB_TEMPERATURE_SENSOR -DBP1_AMB_TEMPERATURE_SENSOR -TASK_END -TASK /usr/platform/SUNW,Sun-Fire-880/lib/libpsvcpolicy_psr.so.1 psvc_update_setpoint_0 -2 -CPU0_PRIM_FAN -CPU1_PRIM_FAN -TASK_END -TASK /usr/platform/sun4u/lib/libpsvcpolicy.so.1 psvc_init_led_policy_0 -20 -CPU_PFAN_FLT_LED -CPU_SFAN_FLT_LED -IO_PFAN_FLT_LED -IO_SFAN_FLT_LED -IO_BRIDGE_PFAN_FLT_LED -IO_BRIDGE_SFAN_FLT_LED -CPU_PFAN_REMOVE_LED -CPU_SFAN_REMOVE_LED -IO_PFAN_REMOVE_LED -IO_SFAN_REMOVE_LED -IO_BRIDGE_PFAN_REMOVE_LED -IO_BRIDGE_SFAN_REMOVE_LED -FSP_GEN_FAULT_LED -FSP_REMOVE_LED -FSP_DISK_FAULT_LED -FSP_POWER_FAULT_LED -FSP_LEFT_THERMAL_FAULT_LED -FSP_RIGHT_THERMAL_FAULT_LED -FSP_LEFT_DOOR_LED -FSP_RIGHT_DOOR_LED -TASK_END -TASK /usr/platform/sun4u/lib/libpsvcpolicy.so.1 psvc_fan_enable_disable_policy_0 -10 -CPU0_PRIM_FAN -CPU1_PRIM_FAN -CPU0_SEC_FAN -CPU1_SEC_FAN -IO0_PRIM_FAN -IO1_PRIM_FAN -IO0_SEC_FAN -IO1_SEC_FAN -IO_BRIDGE_PRIM_FAN -IO_BRIDGE_SEC_FAN -TASK_END -TASK /usr/platform/sun4u/lib/libpsvcpolicy.so.1 psvc_init_state_policy_0 -41 -CPU0_DIE_TEMPERATURE_SENSOR -CPU1_DIE_TEMPERATURE_SENSOR -ZULU1_DIE_TEMPERATURE_SENSOR -CPU2_DIE_TEMPERATURE_SENSOR -CPU3_DIE_TEMPERATURE_SENSOR -ZULU3_DIE_TEMPERATURE_SENSOR -CPU4_DIE_TEMPERATURE_SENSOR -ZULU4_DIE_TEMPERATURE_SENSOR -CPU5_DIE_TEMPERATURE_SENSOR -CPU6_DIE_TEMPERATURE_SENSOR -ZULU6_DIE_TEMPERATURE_SENSOR -CPU7_DIE_TEMPERATURE_SENSOR -MB_AMB_TEMPERATURE_SENSOR -IOB_AMB_TEMPERATURE_SENSOR -DBP0_AMB_TEMPERATURE_SENSOR -DBP1_AMB_TEMPERATURE_SENSOR -PS0 -PS1 -PS2 -CPU0_PRIM_FAN -CPU1_PRIM_FAN -CPU0_SEC_FAN -CPU1_SEC_FAN -IO0_PRIM_FAN -IO1_PRIM_FAN -IO0_SEC_FAN -IO1_SEC_FAN -IO_BRIDGE_PRIM_FAN -IO_BRIDGE_SEC_FAN -DISK0 -DISK1 -DISK2 -DISK3 -DISK4 -DISK5 -DISK6 -DISK7 -DISK8 -DISK9 -DISK10 -DISK11 -TASK_END -TASK /usr/platform/SUNW,Sun-Fire-880/lib/libpsvcpolicy_psr.so.1 psvc_update_cpu_module_card_node_0 -2 -ZULU_1_3_MOD_CARD -ZULU_4_6_MOD_CARD -TASK_END -TASK /usr/platform/SUNW,Sun-Fire-880/lib/libpsvcpolicy_psr.so.1 psvc_fan_blast_shutoff_policy_0 -1 -FAN_BLAST_OFF_SWITCH -TASK_END -TASK /usr/platform/SUNW,Sun-Fire-880/lib/libpsvcpolicy_psr.so.1 psvc_fan_init_speed_0 -2 -CPU0_PRIM_FAN -IO0_PRIM_FAN -TASK_END -TASK /usr/platform/SUNW,Sun-Fire-880/lib/libpsvcpolicy_psr.so.1 psvc_remove_missing_nodes_0 -1 -SYSTEM -TASK_END -INTERVAL_END - -INTERVAL 5 1 -TASK /usr/platform/sun4u/lib/libpsvcpolicy.so.1 psvc_fan_hotplug_policy_0 -10 -CPU0_PRIM_FAN -CPU1_PRIM_FAN -CPU0_SEC_FAN -CPU1_SEC_FAN -IO0_PRIM_FAN -IO1_PRIM_FAN -IO0_SEC_FAN -IO1_SEC_FAN -IO_BRIDGE_PRIM_FAN -IO_BRIDGE_SEC_FAN -TASK_END -INTERVAL_END - -INTERVAL 30 4 -TASK /usr/platform/SUNW,Sun-Fire-880/lib/libpsvcpolicy_psr.so.1 psvc_fan_fault_check_policy_0 -1 -SYSTEM -TASK_END -TASK /usr/platform/sun4u/lib/libpsvcpolicy.so.1 psvc_fan_enable_disable_policy_0 -10 -CPU0_PRIM_FAN -CPU1_PRIM_FAN -CPU0_SEC_FAN -CPU1_SEC_FAN -IO0_PRIM_FAN -IO1_PRIM_FAN -IO0_SEC_FAN -IO1_SEC_FAN -IO_BRIDGE_PRIM_FAN -IO_BRIDGE_SEC_FAN -TASK_END -TASK /usr/platform/sun4u/lib/libpsvcpolicy.so.1 psvc_switch_fan_onoff_policy_0 -8 -CPU0_SEC_FAN -CPU1_SEC_FAN -IO0_PRIM_FAN -IO1_PRIM_FAN -IO0_SEC_FAN -IO1_SEC_FAN -IO_BRIDGE_PRIM_FAN -IO_BRIDGE_SEC_FAN -TASK_END -TASK /usr/platform/sun4u/lib/libpsvcpolicy.so.1 psvc_fan_control_policy_0 -1 -CPU0_PRIM_FAN -TASK_END -INTERVAL_END - -INTERVAL 30 4 -TASK /usr/platform/SUNW,Sun-Fire-880/lib/libpsvcpolicy_psr.so.1 psvc_ps_check_and_disable_dr_policy_0 -1 -SYSTEM -TASK_END -TASK /usr/platform/SUNW,Sun-Fire-880/lib/libpsvcpolicy_psr.so.1 psvc_check_disk_fault_policy_0 -1 -SYSTEM -TASK_END -TASK /usr/platform/sun4u/lib/libpsvcpolicy.so.1 psvc_check_temperature_policy_0 -16 -CPU0_DIE_TEMPERATURE_SENSOR -CPU1_DIE_TEMPERATURE_SENSOR -ZULU1_DIE_TEMPERATURE_SENSOR -CPU2_DIE_TEMPERATURE_SENSOR -CPU3_DIE_TEMPERATURE_SENSOR -ZULU3_DIE_TEMPERATURE_SENSOR -CPU4_DIE_TEMPERATURE_SENSOR -ZULU4_DIE_TEMPERATURE_SENSOR -CPU5_DIE_TEMPERATURE_SENSOR -CPU6_DIE_TEMPERATURE_SENSOR -ZULU6_DIE_TEMPERATURE_SENSOR -CPU7_DIE_TEMPERATURE_SENSOR -MB_AMB_TEMPERATURE_SENSOR -IOB_AMB_TEMPERATURE_SENSOR -DBP0_AMB_TEMPERATURE_SENSOR -DBP1_AMB_TEMPERATURE_SENSOR -TASK_END -TASK /usr/platform/SUNW,Sun-Fire-880/lib/libpsvcpolicy_psr.so.1 psvc_shutdown_policy -16 -CPU0_DIE_TEMPERATURE_SENSOR -CPU1_DIE_TEMPERATURE_SENSOR -ZULU1_DIE_TEMPERATURE_SENSOR -CPU2_DIE_TEMPERATURE_SENSOR -CPU3_DIE_TEMPERATURE_SENSOR -ZULU3_DIE_TEMPERATURE_SENSOR -CPU4_DIE_TEMPERATURE_SENSOR -ZULU4_DIE_TEMPERATURE_SENSOR -CPU5_DIE_TEMPERATURE_SENSOR -CPU6_DIE_TEMPERATURE_SENSOR -ZULU6_DIE_TEMPERATURE_SENSOR -CPU7_DIE_TEMPERATURE_SENSOR -MB_AMB_TEMPERATURE_SENSOR -IOB_AMB_TEMPERATURE_SENSOR -DBP0_AMB_TEMPERATURE_SENSOR -DBP1_AMB_TEMPERATURE_SENSOR -TASK_END -INTERVAL_END - -INTERVAL 30 1 -TASK /usr/platform/SUNW,Sun-Fire-880/lib/libpsvcpolicy_psr.so.1 psvc_update_FSP_fault_led_policy_0 -3 -FSP_LEFT_THERMAL_FAULT_LED -FSP_RIGHT_THERMAL_FAULT_LED -FSP_DISK_FAULT_LED -TASK_END -INTERVAL_END - -INTERVAL 15 1 -TASK /usr/platform/sun4u/lib/libpsvcpolicy.so.1 psvc_hotplug_notifier_policy_0 -21 -PCI0_CARD -PCI1_CARD -PCI2_CARD -PCI3_CARD -PCI4_CARD -PCI5_CARD -PCI6_CARD -PCI7_CARD -PCI8_CARD -DISK0 -DISK1 -DISK2 -DISK3 -DISK4 -DISK5 -DISK6 -DISK7 -DISK8 -DISK9 -DISK10 -DISK11 -TASK_END -INTERVAL_END - -INTERVAL 5 4 -TASK /usr/platform/SUNW,Sun-Fire-880/lib/libpsvcpolicy_psr.so.1 psvc_ps_hotplug_policy_0 -3 -PS0 -PS1 -PS2 -TASK_END -TASK /usr/platform/SUNW,Sun-Fire-880/lib/libpsvcpolicy_psr.so.1 psvc_check_ps_hotplug_status_0 -3 -PS0 -PS1 -PS2 -TASK_END -TASK /usr/platform/SUNW,Sun-Fire-880/lib/libpsvcpolicy_psr.so.1 psvc_ps_device_fail_notifier_policy_0 -1 -SYSTEM -TASK_END -TASK /usr/platform/SUNW,Sun-Fire-880/lib/libpsvcpolicy_psr.so.1 psvc_ps_overcurrent_check_policy_0 -1 -SYSTEM -TASK_END -INTERVAL_END - -INTERVAL 30 1 -TASK /usr/platform/sun4u/lib/libpsvcpolicy.so.1 psvc_keyswitch_position_policy_0 -1 -KEYSWITCH -TASK_END -INTERVAL_END - - diff --git a/usr/src/cmd/picl/plugins/sun4u/silverstone/conf/psvcobj.conf b/usr/src/cmd/picl/plugins/sun4u/silverstone/conf/psvcobj.conf deleted file mode 100644 index 0673389b04..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/silverstone/conf/psvcobj.conf +++ /dev/null @@ -1,2113 +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" - - -/* - * Silverstone psvcobj.conf - */ - -/* - * Format : - * - * OBJECT_INFO - * ... - * ... - * ... - * OBJECT_INFO_END - * This section specifies the static property information for each - * defined object. Each property in the property list is preceded by - * an identifying property label, such as, "_class=". The "label" - * property is the first string on each line. The features and address - * specification properties are built from those fields within these - * properties that are present on each line. - * - * ASSOCIATIONS - * ASSOCIATION - * - * ... (more association pairs) - * ASSOCIATION_END - * ... (more ASSOCIATION sections) - * ASSOCIATIONS_END - * Lists association pairs for each association type to show relationships - * between objects - * - * DEVPATHS - * - * ... (more entries) - * DEVPATHS_END - * Lists the device paths and the matching (controller, bus, addr, port) - * - * TABLES - * TABLE - * - * ... - * TABLE_END - * TABLES_END - * Lists the tables used by the framework - * - * PROJECTED_PROPERTIES - * - * PROJECTED_PROPETIES_END - * Used to specify projected properties to be cerated in PICL nodes - * - */ - -OBJECT_INFO -/SYSTEM _class=3,Subclass=0,Instance=0,PERM=1,FRU=1 -/SYSTEM/MOTHERBOARD _class=3,Subclass=0,Instance=0,PERM=1,FRU=1 -/SYSTEM/IO_BOARD _class=3,Subclass=0,Instance=0,PERM=1,FRU=1 -/SYSTEM/PDB _class=3,Subclass=0,Instance=0,PERM=1,FRU=1 -/SYSTEM/FSP _class=3,Subclass=0,Instance=0,PERM=1,FRU=1 -/SYSTEM/CPU_PFAN_SLOT _class=3,Subclass=0,Instance=0,PERM=1 -/SYSTEM/CPU_SFAN_SLOT _class=3,Subclass=0,Instance=0,PERM=1 -/SYSTEM/IO_PFAN_SLOT _class=3,Subclass=0,Instance=0,PERM=1 -/SYSTEM/IO_SFAN_SLOT _class=3,Subclass=0,Instance=0,PERM=1 -/SYSTEM/IO_BRIDGE_PFAN_SLOT _class=3,Subclass=0,Instance=0,PERM=1 -/SYSTEM/IO_BRIDGE_SFAN_SLOT _class=3,Subclass=0,Instance=0,PERM=1 -/SYSTEM/IO_BOARD/FAN_BLAST_OFF_SWITCH _class=8,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=1,INVERT=0,PORT=2,BITSHIFT=1,BYTEMASK=0x2,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/CPU_PFAN_SLOT/CPU0_PRIM_FAN _class=1,Subclass=0,Instance=0,FAN_DRIVE_PR=1,TEMP_DRIVEN=1,SPEED_CTRL_PR=1,CLOSED_LOOP_CTRL=1,FAN_DRIVE_TABLE_PR=1,HOTPLUG=1,PRIMARY=1,FRU=1,Setpoint=75,Hysteresis=3,Loopgain=200,Loopbias=1023 -/SYSTEM/CPU_PFAN_SLOT/CPU1_PRIM_FAN _class=1,Subclass=0,Instance=1,FAN_DRIVE_PR=1,TEMP_DRIVEN=1,SPEED_CTRL_PR=1,CLOSED_LOOP_CTRL=1,FAN_DRIVE_TABLE_PR=1,HOTPLUG=1,PRIMARY=1,FRU=1,Setpoint=75,Hysteresis=3,Loopgain=200,Loopbias=1023 -/SYSTEM/CPU_SFAN_SLOT/CPU0_SEC_FAN _class=1,Subclass=0,Instance=0,FAN_ON_OFF=1,HOTPLUG=1,SECONDARY=1,FRU=1,Setpoint=0,Hysteresis=0,Loopgain=0,Loopbias=0 -/SYSTEM/CPU_SFAN_SLOT/CPU1_SEC_FAN _class=1,Subclass=0,Instance=1,FAN_ON_OFF=1,HOTPLUG=1,SECONDARY=1,FRU=1,Setpoint=0,Hysteresis=0,Loopgain=0,Loopbias=0 -/SYSTEM/IO_PFAN_SLOT/IO0_PRIM_FAN _class=1,Subclass=0,Instance=0,FAN_DRIVE_PR=1,TEMP_DRIVEN=1,SPEED_CTRL_PR=1,FAN_ON_OFF=1,CLOSED_LOOP_CTRL=1,FAN_DRIVE_TABLE_PR=1,HOTPLUG=1,PRIMARY=1,FRU=1,Setpoint=30,Hysteresis=3,Loopgain=200,Loopbias=1023 -/SYSTEM/IO_PFAN_SLOT/IO1_PRIM_FAN _class=1,Subclass=0,Instance=1,FAN_DRIVE_PR=1,TEMP_DRIVEN=1,SPEED_CTRL_PR=1,FAN_ON_OFF=1,CLOSED_LOOP_CTRL=1,FAN_DRIVE_TABLE_PR=1,HOTPLUG=1,PRIMARY=1,FRU=1,Setpoint=30,Hysteresis=3,Loopgain=200,Loopbias=1023 -/SYSTEM/IO_SFAN_SLOT/IO0_SEC_FAN _class=1,Subclass=0,Instance=0,FAN_ON_OFF=1,HOTPLUG=1,SECONDARY=1,FRU=1,Setpoint=0,Hysteresis=0,Loopgain=0,Loopbias=0 -/SYSTEM/IO_SFAN_SLOT/IO1_SEC_FAN _class=1,Subclass=0,Instance=1,FAN_ON_OFF=1,HOTPLUG=1,SECONDARY=1,FRU=1,Setpoint=0,Hysteresis=0,Loopgain=0,Loopbias=0 -/SYSTEM/IO_BRIDGE_PFAN_SLOT/IO_BRIDGE_PRIM_FAN _class=1,Subclass=0,Instance=0,FAN_ON_OFF=1,HOTPLUG=1,PRIMARY=1,FRU=1,Setpoint=0,Hysteresis=0,Loopgain=0,Loopbias=0 -/SYSTEM/IO_BRIDGE_SFAN_SLOT/IO_BRIDGE_SEC_FAN _class=1,Subclass=0,Instance=0,FAN_ON_OFF=1,HOTPLUG=1,SECONDARY=1,FRU=1,Setpoint=0,Hysteresis=0,Loopgain=0,Loopbias=0 -/SYSTEM/CPU_PFAN_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=6,INVERT=0,PORT=0,BITSHIFT=6,BYTEMASK=0x40,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/CPU_SFAN_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=7,INVERT=0,PORT=0,BITSHIFT=7,BYTEMASK=0x80,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/IO_PFAN_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/IO_SFAN_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=1,INVERT=1,PORT=1,BITSHIFT=1,BYTEMASK=0x2,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/IO_BRIDGE_PFAN_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=2,INVERT=0,PORT=1,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/IO_BRIDGE_SFAN_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=3,INVERT=0,PORT=1,BITSHIFT=3,BYTEMASK=0x8,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/CPU_PFAN_REMOVE_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=5,BUSADDR=0x46,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/CPU_SFAN_REMOVE_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=1,INVERT=1,PORT=0,BITSHIFT=1,BYTEMASK=0x2,REG=0,TYPE=5,BUSADDR=0x46,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/IO_PFAN_REMOVE_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=2,INVERT=0,PORT=0,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=5,BUSADDR=0x46,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/IO_SFAN_REMOVE_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=3,INVERT=0,PORT=0,BITSHIFT=3,BYTEMASK=0x8,REG=0,TYPE=5,BUSADDR=0x46,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/IO_BRIDGE_PFAN_REMOVE_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=4,INVERT=0,PORT=0,BITSHIFT=4,BYTEMASK=0x10,REG=0,TYPE=5,BUSADDR=0x46,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/IO_BRIDGE_SFAN_REMOVE_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=5,INVERT=0,PORT=0,BITSHIFT=5,BYTEMASK=0x20,REG=0,TYPE=5,BUSADDR=0x46,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/IO_BOARD/CPU_PFAN_PR_SENSOR _class=6,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/CPU_SFAN_PR_SENSOR _class=6,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=1,INVERT=1,PORT=0,BITSHIFT=1,BYTEMASK=0x2,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/IO_PFAN_PR_SENSOR _class=6,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=2,INVERT=0,PORT=0,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/IO_SFAN_PR_SENSOR _class=6,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=3,INVERT=0,PORT=0,BITSHIFT=3,BYTEMASK=0x8,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/IO_BRIDGE_PFAN_PR_SENSOR _class=6,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=4,INVERT=0,PORT=0,BITSHIFT=4,BYTEMASK=0x10,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/IO_BRIDGE_SFAN_PR_SENSOR _class=6,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=5,INVERT=0,PORT=0,BITSHIFT=5,BYTEMASK=0x20,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU0_PFAN_TACH _class=7,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=2,BITSHIFT=2,BYTEMASK=0x0,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=0,Hi-warn=0,Hi-shut=0 -/SYSTEM/MOTHERBOARD/CPU1_PFAN_TACH _class=7,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=3,BITSHIFT=2,BYTEMASK=0x0,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=0,Hi-warn=0,Hi-shut=0 -/SYSTEM/MOTHERBOARD/CPU0_SFAN_TACH _class=7,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=2,BITSHIFT=1,BYTEMASK=0x0,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=0,Hi-warn=0,Hi-shut=0 -/SYSTEM/MOTHERBOARD/CPU1_SFAN_TACH _class=7,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=3,BITSHIFT=1,BYTEMASK=0x0,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=0,Hi-warn=0,Hi-shut=0 -/SYSTEM/IO_BOARD/IO0_PFAN_TACH _class=7,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=2,BYTEMASK=0x0,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=0,Hi-warn=0,Hi-shut=0 -/SYSTEM/IO_BOARD/IO1_PFAN_TACH _class=7,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=2,BYTEMASK=0x0,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=0,Hi-warn=0,Hi-shut=0 -/SYSTEM/IO_BOARD/IO0_SFAN_TACH _class=7,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=1,BYTEMASK=0x0,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=0,Hi-warn=0,Hi-shut=0 -/SYSTEM/IO_BOARD/IO1_SFAN_TACH _class=7,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=1,BYTEMASK=0x0,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=0,Hi-warn=0,Hi-shut=0 -/SYSTEM/MOTHERBOARD/IO_BRIDGE_PFAN_TACH _class=7,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=2,BYTEMASK=0x0,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=0,Hi-warn=0,Hi-shut=0 -/SYSTEM/MOTHERBOARD/IO_BRIDGE_SFAN_TACH _class=7,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=1,BYTEMASK=0x0,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=0,Hi-warn=0,Hi-shut=0 -/SYSTEM/IO_BOARD/CPU_PFAN_SPEED_CONTROL _class=5,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=3,BUSADDR=0x5e,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/IO_PFAN_SPEED_CONTROL _class=5,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=3,BUSADDR=0x5a,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/CPU_SFAN_ONOFF_SWITCH _class=8,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=2,INVERT=0,PORT=2,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/IO_PFAN_ONOFF_SWITCH _class=8,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=4,INVERT=0,PORT=4,BITSHIFT=4,BYTEMASK=0x10,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/IO_SFAN_ONOFF_SWITCH _class=8,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=5,INVERT=0,PORT=4,BITSHIFT=5,BYTEMASK=0x20,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/IO_BRIDGE_PFAN_ONOFF_SWITCH _class=8,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=0,INVERT=0,PORT=4,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/IO_BRIDGE_SFAN_ONOFF_SWITCH _class=8,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=1,INVERT=1,PORT=4,BITSHIFT=1,BYTEMASK=0x2,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/DISK_BP0_PR_SENSOR _class=6,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=2,INVERT=0,PORT=4,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/DISK_BP1_PR_SENSOR _class=6,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=3,INVERT=0,PORT=4,BITSHIFT=3,BYTEMASK=0x8,REG=0,TYPE=7,BUSADDR=0x80,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/RSC_PR_SENSOR _class=6,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=5,INVERT=0,PORT=3,BITSHIFT=5,BYTEMASK=0x01,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/CPU_FAN_P_S_MON_SWITCH _class=8,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=3,INVERT=0,PORT=2,BITSHIFT=3,BYTEMASK=0x8,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/IO_FAN_P_S_MON_SWITCH _class=8,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=7,INVERT=0,PORT=3,BITSHIFT=7,BYTEMASK=0x80,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS0_SLOT _class=3,Subclass=0,Instance=0,PERM=1 -/SYSTEM/PDB/PS1_SLOT _class=3,Subclass=0,Instance=1,PERM=1 -/SYSTEM/PDB/PS2_SLOT _class=3,Subclass=0,Instance=2,PERM=1 -/SYSTEM/PDB/PS0_SLOT/PS0 _class=3,Subclass=0,Instance=0,HOTPLUG=1,FRU=1 -/SYSTEM/PDB/PS1_SLOT/PS1 _class=3,Subclass=0,Instance=1,HOTPLUG=1,FRU=1 -/SYSTEM/PDB/PS2_SLOT/PS2 _class=3,Subclass=0,Instance=2,HOTPLUG=1,FRU=1 -/SYSTEM/PDB/PS0_SLOT/PS0/PS0_3_3V_I_SENSOR _class=4,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,HI_WARN_MASK=1,CONV_TABLE=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=6,BUSADDR=0x90,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=0,Hi-warn=34,Hi-shut=0 -/SYSTEM/PDB/PS0_SLOT/PS0/PS0_5V_I_SENSOR _class=4,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,HI_WARN_MASK=1,CONV_TABLE=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=6,BUSADDR=0x90,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=0,Hi-warn=26,Hi-shut=0 -/SYSTEM/PDB/PS0_SLOT/PS0/PS0_12V_I_SENSOR _class=4,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,HI_WARN_MASK=1,CONV_TABLE=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=2,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=6,BUSADDR=0x90,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=0,Hi-warn=19,Hi-shut=0 -/SYSTEM/PDB/PS0_SLOT/PS0/PS0_48V_I_SENSOR _class=4,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,HI_WARN_MASK=1,CONV_TABLE=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=3,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=6,BUSADDR=0x90,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=0,Hi-warn=24,Hi-shut=0 -/SYSTEM/PDB/PS0_SLOT/PS0/PS0_SENSOR_VALID_SWITCH _class=8,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=5,BUSADDR=0x70,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS0_SLOT/PS0/PS0_FAN_FAIL_SENSOR _class=8,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=2,INVERT=0,PORT=0,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=5,BUSADDR=0x70,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS0_SLOT/PS0/PS0_TEMP_FAIL_SENSOR _class=8,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=3,INVERT=0,PORT=0,BITSHIFT=3,BYTEMASK=0x8,REG=0,TYPE=5,BUSADDR=0x70,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS0_SLOT/PS0/PS0_I_SHARE_FAIL_SENSOR _class=8,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=4,INVERT=0,PORT=0,BITSHIFT=4,BYTEMASK=0x10,REG=0,TYPE=5,BUSADDR=0x70,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/PS0_PR_SENSOR _class=6,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=6,INVERT=0,PORT=2,BITSHIFT=6,BYTEMASK=0x40,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS1_SLOT/PS1/PS1_3_3V_I_SENSOR _class=4,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,HI_WARN_MASK=1,CONV_TABLE=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=6,BUSADDR=0x92,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=0,Hi-warn=34,Hi-shut=0 -/SYSTEM/PDB/PS1_SLOT/PS1/PS1_5V_I_SENSOR _class=4,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,HI_WARN_MASK=1,CONV_TABLE=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=6,BUSADDR=0x92,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=0,Hi-warn=26,Hi-shut=0 -/SYSTEM/PDB/PS1_SLOT/PS1/PS1_12V_I_SENSOR _class=4,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,HI_WARN_MASK=1,CONV_TABLE=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=2,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=6,BUSADDR=0x92,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=0,Hi-warn=19,Hi-shut=0 -/SYSTEM/PDB/PS1_SLOT/PS1/PS1_48V_I_SENSOR _class=4,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,HI_WARN_MASK=1,CONV_TABLE=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=3,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=6,BUSADDR=0x92,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=0,Hi-warn=24,Hi-shut=0 -/SYSTEM/PDB/PS1_SLOT/PS1/PS1_SENSOR_VALID_SWITCH _class=8,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=5,BUSADDR=0x72,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS1_SLOT/PS1/PS1_FAN_FAIL_SENSOR _class=8,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=2,INVERT=0,PORT=0,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=5,BUSADDR=0x72,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS1_SLOT/PS1/PS1_TEMP_FAIL_SENSOR _class=8,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=3,INVERT=0,PORT=0,BITSHIFT=3,BYTEMASK=0x8,REG=0,TYPE=5,BUSADDR=0x72,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS1_SLOT/PS1/PS1_I_SHARE_FAIL_SENSOR _class=8,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=4,INVERT=0,PORT=0,BITSHIFT=4,BYTEMASK=0x10,REG=0,TYPE=5,BUSADDR=0x72,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/PS1_PR_SENSOR _class=6,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=4,INVERT=0,PORT=1,BITSHIFT=4,BYTEMASK=0x10,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS2_SLOT/PS2/PS2_3_3V_I_SENSOR _class=4,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,HI_WARN_MASK=1,CONV_TABLE=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=6,BUSADDR=0x94,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=0,Hi-warn=34,Hi-shut=0 -/SYSTEM/PDB/PS2_SLOT/PS2/PS2_5V_I_SENSOR _class=4,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,HI_WARN_MASK=1,CONV_TABLE=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=6,BUSADDR=0x94,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=0,Hi-warn=26,Hi-shut=0 -/SYSTEM/PDB/PS2_SLOT/PS2/PS2_12V_I_SENSOR _class=4,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,HI_WARN_MASK=1,CONV_TABLE=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=2,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=6,BUSADDR=0x94,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=0,Hi-warn=19,Hi-shut=0 -/SYSTEM/PDB/PS2_SLOT/PS2/PS2_48V_I_SENSOR _class=4,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,HI_WARN_MASK=1,CONV_TABLE=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=3,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=6,BUSADDR=0x94,BUSNUM=0,CNTLR=1,Lo-warn=0,Lo-shut=0,Hi-warn=24,Hi-shut=0 -/SYSTEM/PDB/PS2_SLOT/PS2/PS2_SENSOR_VALID_SWITCH _class=8,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=5,BUSADDR=0x74,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS2_SLOT/PS2/PS2_FAN_FAIL_SENSOR _class=8,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=2,INVERT=0,PORT=0,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=5,BUSADDR=0x74,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS2_SLOT/PS2/PS2_TEMP_FAIL_SENSOR _class=8,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=3,INVERT=0,PORT=0,BITSHIFT=3,BYTEMASK=0x8,REG=0,TYPE=5,BUSADDR=0x74,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS2_SLOT/PS2/PS2_I_SHARE_FAIL_SENSOR _class=8,Subclass=0,Instance=0,HOTPLUG=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=4,INVERT=0,PORT=0,BITSHIFT=4,BYTEMASK=0x10,REG=0,TYPE=5,BUSADDR=0x74,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/PS2_PR_SENSOR _class=6,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=6,INVERT=0,PORT=1,BITSHIFT=6,BYTEMASK=0x40,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT _class=3,Subclass=0,Instance=0,PERM=1 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT _class=3,Subclass=0,Instance=1,PERM=1 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT _class=3,Subclass=0,Instance=2,PERM=1 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT _class=3,Subclass=0,Instance=3,PERM=1 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD _class=3,Subclass=0,Instance=0,HOTPLUG=1,FRU=1 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD _class=3,Subclass=0,Instance=1,HOTPLUG=1,FRU=1 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/ZULU_1_3_MOD_CARD _class=3,Subclass=0,Instance=1,HOTPLUG=1,FRU=1 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/CPU_4_6_MOD_CARD _class=3,Subclass=0,Instance=2,HOTPLUG=1,FRU=1 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/ZULU_4_6_MOD_CARD _class=3,Subclass=0,Instance=2,HOTPLUG=1,FRU=1 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT/CPU_5_7_MOD_CARD _class=3,Subclass=0,Instance=3,HOTPLUG=1,FRU=1 -/SYSTEM/CPU_0_2_MOD_REMOVE_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x3,REG=3,TYPE=1,BUSADDR=0xec,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/CPU_1_3_MOD_REMOVE_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x3,REG=11,TYPE=1,BUSADDR=0xec,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/CPU_4_6_MOD_REMOVE_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=2,BITSHIFT=0,BYTEMASK=0x3,REG=19,TYPE=1,BUSADDR=0xec,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/CPU_5_7_MOD_REMOVE_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=3,BITSHIFT=0,BYTEMASK=0x3,REG=27,TYPE=1,BUSADDR=0xec,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/CPU_0_2_MOD_FLT_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=2,BYTEMASK=0xc,REG=3,TYPE=1,BUSADDR=0xec,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/CPU_1_3_MOD_FLT_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=2,BYTEMASK=0xc,REG=11,TYPE=1,BUSADDR=0xec,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/CPU_4_6_MOD_FLT_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=2,BITSHIFT=2,BYTEMASK=0xc,REG=19,TYPE=1,BUSADDR=0xec,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/CPU_5_7_MOD_FLT_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=3,BITSHIFT=2,BYTEMASK=0xc,REG=27,TYPE=1,BUSADDR=0xec,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_PR_SENSOR _class=10,Subclass=0,Instance=0,GPIO_REG=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=2,INVERT=0,PORT=0,BITSHIFT=2,BYTEMASK=0x4,REG=1,TYPE=1,BUSADDR=0xec,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_PR_SENSOR _class=10,Subclass=0,Instance=0,GPIO_REG=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=2,INVERT=0,PORT=1,BITSHIFT=2,BYTEMASK=0x4,REG=9,TYPE=1,BUSADDR=0xec,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_PR_SENSOR _class=10,Subclass=0,Instance=0,GPIO_REG=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=2,INVERT=0,PORT=2,BITSHIFT=2,BYTEMASK=0x4,REG=17,TYPE=1,BUSADDR=0xec,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_PR_SENSOR _class=10,Subclass=0,Instance=0,GPIO_REG=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=2,INVERT=0,PORT=3,BITSHIFT=2,BYTEMASK=0x4,REG=25,TYPE=1,BUSADDR=0xec,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/CPU0_DIE_TEMPERATURE_SENSOR _class=0,Subclass=1,Instance=0,DIE_TEMP=1,HOTPLUG=1,RDWR=1,LO_WARN_MASK=1,LO_SHUT_MASK=1,HI_WARN_MASK=1,HI_SHUT_MASK=1,OPT_TEMP_MASK=1,HW_LO_MASK=1,HW_HI_MASK=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=4,BUSADDR=0x30,BUSNUM=0,CNTLR=1,Lo-warn=-10,Lo-shut=-15,Hi-warn=100,Hi-shut=105,Opt-temp=75,Hw-hi-shut=120,Hw-lo-shut=-25 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/CPU1_DIE_TEMPERATURE_SENSOR _class=0,Subclass=1,Instance=1,DIE_TEMP=1,HOTPLUG=1,RDWR=1,LO_WARN_MASK=1,LO_SHUT_MASK=1,HI_WARN_MASK=1,HI_SHUT_MASK=1,OPT_TEMP_MASK=1,HW_LO_MASK=1,HW_HI_MASK=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=4,BUSADDR=0x32,BUSNUM=0,CNTLR=1,Lo-warn=-10,Lo-shut=-15,Hi-warn=100,Hi-shut=105,Opt-temp=75,Hw-hi-shut=120,Hw-lo-shut=-25 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/ZULU_1_3_MOD_CARD/ZULU1_DIE_TEMPERATURE_SENSOR _class=0,Subclass=1,Instance=1,DIE_TEMP=1,HOTPLUG=1,RDWR=1,LO_WARN_MASK=1,LO_SHUT_MASK=1,HI_WARN_MASK=1,HI_SHUT_MASK=1,OPT_TEMP_MASK=1,HW_LO_MASK=1,HW_HI_MASK=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=4,BUSADDR=0x32,BUSNUM=0,CNTLR=1,Lo-warn=-10,Lo-shut=-15,Hi-warn=100,Hi-shut=105,Opt-temp=75,Hw-hi-shut=120,Hw-lo-shut=-25 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/CPU2_DIE_TEMPERATURE_SENSOR _class=0,Subclass=1,Instance=2,DIE_TEMP=1,HOTPLUG=1,RDWR=1,LO_WARN_MASK=1,LO_SHUT_MASK=1,HI_WARN_MASK=1,HI_SHUT_MASK=1,OPT_TEMP_MASK=1,HW_LO_MASK=1,HW_HI_MASK=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=4,BUSADDR=0x34,BUSNUM=0,CNTLR=1,Lo-warn=-10,Lo-shut=-15,Hi-warn=100,Hi-shut=105,Opt-temp=75,Hw-hi-shut=120,Hw-lo-shut=-25 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/CPU3_DIE_TEMPERATURE_SENSOR _class=0,Subclass=1,Instance=3,DIE_TEMP=1,HOTPLUG=1,RDWR=1,LO_WARN_MASK=1,LO_SHUT_MASK=1,HI_WARN_MASK=1,HI_SHUT_MASK=1,OPT_TEMP_MASK=1,HW_LO_MASK=1,HW_HI_MASK=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=4,BUSADDR=0x52,BUSNUM=0,CNTLR=1,Lo-warn=-10,Lo-shut=-15,Hi-warn=100,Hi-shut=105,Opt-temp=75,Hw-hi-shut=120,Hw-lo-shut=-25 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/ZULU_1_3_MOD_CARD/ZULU3_DIE_TEMPERATURE_SENSOR _class=0,Subclass=1,Instance=3,DIE_TEMP=1,HOTPLUG=1,RDWR=1,LO_WARN_MASK=1,LO_SHUT_MASK=1,HI_WARN_MASK=1,HI_SHUT_MASK=1,OPT_TEMP_MASK=1,HW_LO_MASK=1,HW_HI_MASK=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=4,BUSADDR=0x52,BUSNUM=0,CNTLR=1,Lo-warn=-10,Lo-shut=-15,Hi-warn=100,Hi-shut=105,Opt-temp=75,Hw-hi-shut=120,Hw-lo-shut=-25 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/CPU_4_6_MOD_CARD/CPU4_DIE_TEMPERATURE_SENSOR _class=0,Subclass=1,Instance=4,DIE_TEMP=1,HOTPLUG=1,RDWR=1,LO_WARN_MASK=1,LO_SHUT_MASK=1,HI_WARN_MASK=1,HI_SHUT_MASK=1,OPT_TEMP_MASK=1,HW_LO_MASK=1,HW_HI_MASK=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=4,BUSADDR=0x54,BUSNUM=0,CNTLR=1,Lo-warn=-10,Lo-shut=-15,Hi-warn=100,Hi-shut=105,Opt-temp=75,Hw-hi-shut=120,Hw-lo-shut=-25 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/ZULU_4_6_MOD_CARD/ZULU4_DIE_TEMPERATURE_SENSOR _class=0,Subclass=1,Instance=4,DIE_TEMP=1,HOTPLUG=1,RDWR=1,LO_WARN_MASK=1,LO_SHUT_MASK=1,HI_WARN_MASK=1,HI_SHUT_MASK=1,OPT_TEMP_MASK=1,HW_LO_MASK=1,HW_HI_MASK=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=4,BUSADDR=0x54,BUSNUM=0,CNTLR=1,Lo-warn=-10,Lo-shut=-15,Hi-warn=100,Hi-shut=105,Opt-temp=75,Hw-hi-shut=120,Hw-lo-shut=-25 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT/CPU_5_7_MOD_CARD/CPU5_DIE_TEMPERATURE_SENSOR _class=0,Subclass=1,Instance=5,DIE_TEMP=1,HOTPLUG=1,RDWR=1,LO_WARN_MASK=1,LO_SHUT_MASK=1,HI_WARN_MASK=1,HI_SHUT_MASK=1,OPT_TEMP_MASK=1,HW_LO_MASK=1,HW_HI_MASK=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=4,BUSADDR=0x56,BUSNUM=0,CNTLR=1,Lo-warn=-10,Lo-shut=-15,Hi-warn=100,Hi-shut=105,Opt-temp=75,Hw-hi-shut=120,Hw-lo-shut=-25 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/CPU_4_6_MOD_CARD/CPU6_DIE_TEMPERATURE_SENSOR _class=0,Subclass=1,Instance=6,DIE_TEMP=1,HOTPLUG=1,RDWR=1,LO_WARN_MASK=1,LO_SHUT_MASK=1,HI_WARN_MASK=1,HI_SHUT_MASK=1,OPT_TEMP_MASK=1,HW_LO_MASK=1,HW_HI_MASK=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=4,BUSADDR=0x98,BUSNUM=0,CNTLR=1,Lo-warn=-10,Lo-shut=-15,Hi-warn=100,Hi-shut=105,Opt-temp=75,Hw-hi-shut=120,Hw-lo-shut=-25 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/ZULU_4_6_MOD_CARD/ZULU6_DIE_TEMPERATURE_SENSOR _class=0,Subclass=1,Instance=6,DIE_TEMP=1,HOTPLUG=1,RDWR=1,LO_WARN_MASK=1,LO_SHUT_MASK=1,HI_WARN_MASK=1,HI_SHUT_MASK=1,OPT_TEMP_MASK=1,HW_LO_MASK=1,HW_HI_MASK=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=4,BUSADDR=0x98,BUSNUM=0,CNTLR=1,Lo-warn=-10,Lo-shut=-15,Hi-warn=100,Hi-shut=105,Opt-temp=75,Hw-hi-shut=120,Hw-lo-shut=-25 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT/CPU_5_7_MOD_CARD/CPU7_DIE_TEMPERATURE_SENSOR _class=0,Subclass=1,Instance=7,DIE_TEMP=1,HOTPLUG=1,RDWR=1,LO_WARN_MASK=1,LO_SHUT_MASK=1,HI_WARN_MASK=1,HI_SHUT_MASK=1,OPT_TEMP_MASK=1,HW_LO_MASK=1,HW_HI_MASK=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=4,BUSADDR=0x9a,BUSNUM=0,CNTLR=1,Lo-warn=-10,Lo-shut=-15,Hi-warn=100,Hi-shut=105,Opt-temp=75,Hw-hi-shut=120,Hw-lo-shut=-25 -/SYSTEM/IO_BOARD/MB_AMB_TEMPERATURE_SENSOR _class=0,Subclass=1,Instance=8,DIGI_SENSOR=1,PERM=1,RDONLY=1,LO_WARN_MASK=1,LO_SHUT_MASK=1,HI_WARN_MASK=1,HI_SHUT_MASK=1,CONV_TABLE=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=6,BUSADDR=0x96,BUSNUM=0,CNTLR=1,Lo-warn=-10,Lo-shut=-15,Hi-warn=70,Hi-shut=75,Opt-temp=0,Hw-hi-shut=0,Hw-lo-shut=0 -/SYSTEM/IO_BOARD/IOB_AMB_TEMPERATURE_SENSOR _class=0,Subclass=1,Instance=9,DIGI_SENSOR=1,PERM=1,RDONLY=1,LO_WARN_MASK=1,LO_SHUT_MASK=1,HI_WARN_MASK=1,HI_SHUT_MASK=1,CONV_TABLE=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=6,BUSADDR=0x96,BUSNUM=0,CNTLR=1,Lo-warn=-10,Lo-shut=-15,Hi-warn=48,Hi-shut=53,Opt-temp=0,Hw-hi-shut=0,Hw-lo-shut=0 -/SYSTEM/DISK_BP0_BOARD_SLOT _class=3,Subclass=0,Instance=0,PERM=1 -/SYSTEM/DISK_BP1_BOARD_SLOT _class=3,Subclass=0,Instance=1,PERM=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD _class=3,Subclass=0,Instance=0,HOTPLUG=1,FRU=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD _class=3,Subclass=0,Instance=1,HOTPLUG=1,FRU=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/LOOP_B_0_BOARD_SLOT _class=3,Subclass=0,Instance=0,OPTION=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/LOOP_B_1_BOARD_SLOT _class=3,Subclass=0,Instance=0,OPTION=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/LOOP_B_0_BOARD_SLOT/LOOP_B_0_BOARD _class=3,Subclass=0,Instance=0,OPTION=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/LOOP_B_1_BOARD_SLOT/LOOP_B_1_BOARD _class=3,Subclass=0,Instance=0,OPTION=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/LOOP_B_0_BOARD_PR_SENSOR _class=6,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=7,INVERT=0,PORT=0,BITSHIFT=7,BYTEMASK=0x80,REG=0,TYPE=7,BUSADDR=0x88,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/LOOP_B_1_BOARD_PR_SENSOR _class=6,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=7,INVERT=0,PORT=0,BITSHIFT=7,BYTEMASK=0x80,REG=0,TYPE=7,BUSADDR=0x8c,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DBP0_AMB_TEMPERATURE_SENSOR _class=0,Subclass=1,Instance=10,OPTION=1,RDWR=1,LO_WARN_MASK=1,LO_SHUT_MASK=1,HI_WARN_MASK=1,HI_SHUT_MASK=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=2,BUSADDR=0x9c,BUSNUM=0,CNTLR=1,Lo-warn=-10,Lo-shut=-15,Hi-warn=51,Hi-shut=55,Opt-temp=0,Hw-hi-shut=0,Hw-lo-shut=0 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DBP1_AMB_TEMPERATURE_SENSOR _class=0,Subclass=1,Instance=11,OPTION=1,RDWR=1,LO_WARN_MASK=1,LO_SHUT_MASK=1,HI_WARN_MASK=1,HI_SHUT_MASK=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=2,BUSADDR=0x9e,BUSNUM=0,CNTLR=1,Lo-warn=-10,Lo-shut=-15,Hi-warn=51,Hi-shut=55,Opt-temp=0,Hw-hi-shut=0,Hw-lo-shut=0 -/SYSTEM/RSC_SLOT _class=3,Subclass=0,Instance=1,PERM=1 -/SYSTEM/RSC_SLOT/RSC_CARD _class=3,Subclass=0,Instance=1,HOTPLUG=1,FRU=1 -/SYSTEM/IO_BOARD/PCI0_SLOT _class=3,Subclass=0,Instance=0,PERM=1 -/SYSTEM/IO_BOARD/PCI1_SLOT _class=3,Subclass=0,Instance=1,PERM=1 -/SYSTEM/IO_BOARD/PCI2_SLOT _class=3,Subclass=0,Instance=2,PERM=1 -/SYSTEM/IO_BOARD/PCI3_SLOT _class=3,Subclass=0,Instance=3,PERM=1 -/SYSTEM/IO_BOARD/PCI4_SLOT _class=3,Subclass=0,Instance=4,PERM=1 -/SYSTEM/IO_BOARD/PCI5_SLOT _class=3,Subclass=0,Instance=5,PERM=1 -/SYSTEM/IO_BOARD/PCI6_SLOT _class=3,Subclass=0,Instance=6,PERM=1 -/SYSTEM/IO_BOARD/PCI7_SLOT _class=3,Subclass=0,Instance=7,PERM=1 -/SYSTEM/IO_BOARD/PCI8_SLOT _class=3,Subclass=0,Instance=8,PERM=1 -/SYSTEM/IO_BOARD/PCI0_SLOT/PCI0_CARD _class=3,Subclass=0,Instance=0,HOTPLUG=1,FRU=1 -/SYSTEM/IO_BOARD/PCI1_SLOT/PCI1_CARD _class=3,Subclass=0,Instance=1,HOTPLUG=1,FRU=1 -/SYSTEM/IO_BOARD/PCI2_SLOT/PCI2_CARD _class=3,Subclass=0,Instance=2,HOTPLUG=1,FRU=1 -/SYSTEM/IO_BOARD/PCI3_SLOT/PCI3_CARD _class=3,Subclass=0,Instance=3,HOTPLUG=1,FRU=1 -/SYSTEM/IO_BOARD/PCI4_SLOT/PCI4_CARD _class=3,Subclass=0,Instance=4,HOTPLUG=1,FRU=1 -/SYSTEM/IO_BOARD/PCI5_SLOT/PCI5_CARD _class=3,Subclass=0,Instance=5,HOTPLUG=1,FRU=1 -/SYSTEM/IO_BOARD/PCI6_SLOT/PCI6_CARD _class=3,Subclass=0,Instance=6,HOTPLUG=1,FRU=1 -/SYSTEM/IO_BOARD/PCI7_SLOT/PCI7_CARD _class=3,Subclass=0,Instance=7,HOTPLUG=1,FRU=1 -/SYSTEM/IO_BOARD/PCI8_SLOT/PCI8_CARD _class=3,Subclass=0,Instance=8,HOTPLUG=1,FRU=1 -/SYSTEM/PCI0_FLT_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=3,BITSHIFT=2,BYTEMASK=0xc,REG=27,TYPE=1,BUSADDR=0xe6,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/PCI1_FLT_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=2,BITSHIFT=2,BYTEMASK=0xc,REG=19,TYPE=1,BUSADDR=0xe6,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/PCI2_FLT_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=2,BYTEMASK=0xc,REG=11,TYPE=1,BUSADDR=0xe6,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/PCI3_FLT_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=2,BYTEMASK=0xc,REG=3,TYPE=1,BUSADDR=0xe6,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/PCI4_FLT_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=2,BITSHIFT=2,BYTEMASK=0xc,REG=19,TYPE=1,BUSADDR=0xe8,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/PCI5_FLT_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=2,BYTEMASK=0xc,REG=11,TYPE=1,BUSADDR=0xe8,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/PCI6_FLT_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=2,BYTEMASK=0xc,REG=3,TYPE=1,BUSADDR=0xe8,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/PCI7_FLT_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=2,BYTEMASK=0xc,REG=3,TYPE=1,BUSADDR=0xe2,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/PCI8_FLT_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=2,BYTEMASK=0xc,REG=11,TYPE=1,BUSADDR=0xe2,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/PCI0_REMOVE_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=3,BITSHIFT=0,BYTEMASK=0x3,REG=27,TYPE=1,BUSADDR=0xe6,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/PCI1_REMOVE_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=2,BITSHIFT=0,BYTEMASK=0x3,REG=19,TYPE=1,BUSADDR=0xe6,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/PCI2_REMOVE_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x3,REG=11,TYPE=1,BUSADDR=0xe6,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/PCI3_REMOVE_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x3,REG=3,TYPE=1,BUSADDR=0xe6,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/PCI4_REMOVE_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=2,BITSHIFT=0,BYTEMASK=0x3,REG=19,TYPE=1,BUSADDR=0xe8,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/PCI5_REMOVE_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x3,REG=11,TYPE=1,BUSADDR=0xe8,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/PCI6_REMOVE_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x3,REG=3,TYPE=1,BUSADDR=0xe8,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/PCI7_REMOVE_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x3,REG=3,TYPE=1,BUSADDR=0xe2,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/PCI8_REMOVE_LED _class=2,Subclass=1,Instance=0,BI_STATE=1,AMBER=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x3,REG=11,TYPE=1,BUSADDR=0xe2,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/IO_BOARD/PCI0_PR_SENSOR _class=10,Subclass=0,Instance=0,GPIO_REG=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=1,INVERT=1,PORT=3,BITSHIFT=0,BYTEMASK=0x3,REG=25,TYPE=1,BUSADDR=0xe6,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/PCI1_PR_SENSOR _class=10,Subclass=0,Instance=0,GPIO_REG=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=1,INVERT=1,PORT=2,BITSHIFT=0,BYTEMASK=0x3,REG=17,TYPE=1,BUSADDR=0xe6,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/PCI2_PR_SENSOR _class=10,Subclass=0,Instance=0,GPIO_REG=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=1,INVERT=1,PORT=1,BITSHIFT=0,BYTEMASK=0x3,REG=9,TYPE=1,BUSADDR=0xe6,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/PCI3_PR_SENSOR _class=10,Subclass=0,Instance=0,GPIO_REG=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=1,INVERT=1,PORT=0,BITSHIFT=0,BYTEMASK=0x3,REG=1,TYPE=1,BUSADDR=0xe6,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/PCI4_PR_SENSOR _class=10,Subclass=0,Instance=0,GPIO_REG=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=1,INVERT=1,PORT=2,BITSHIFT=0,BYTEMASK=0x3,REG=17,TYPE=1,BUSADDR=0xe8,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/PCI5_PR_SENSOR _class=10,Subclass=0,Instance=0,GPIO_REG=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=1,INVERT=1,PORT=1,BITSHIFT=0,BYTEMASK=0x3,REG=9,TYPE=1,BUSADDR=0xe8,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/PCI6_PR_SENSOR _class=10,Subclass=0,Instance=0,GPIO_REG=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=1,INVERT=1,PORT=0,BITSHIFT=0,BYTEMASK=0x3,REG=1,TYPE=1,BUSADDR=0xe8,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/PCI7_PR_SENSOR _class=10,Subclass=0,Instance=0,GPIO_REG=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=1,INVERT=1,PORT=1,BITSHIFT=0,BYTEMASK=0x3,REG=9,TYPE=1,BUSADDR=0xe2,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/PCI8_PR_SENSOR _class=10,Subclass=0,Instance=0,GPIO_REG=1,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=1,INVERT=1,PORT=0,BITSHIFT=0,BYTEMASK=0x3,REG=1,TYPE=1,BUSADDR=0xe2,BUSNUM=0,CNTLR=1 -/SYSTEM/FSP/FSP_GEN_FAULT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=4,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/FSP/FSP_REMOVE_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=1,INVERT=1,PORT=4,BITSHIFT=1,BYTEMASK=0x2,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/FSP/FSP_DISK_FAULT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=2,INVERT=0,PORT=4,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/FSP/FSP_POWER_FAULT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=3,INVERT=0,PORT=4,BITSHIFT=3,BYTEMASK=0x8,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/FSP/FSP_LEFT_THERMAL_FAULT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=7,INVERT=0,PORT=4,BITSHIFT=7,BYTEMASK=0x80,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/FSP/FSP_RIGHT_THERMAL_FAULT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=4,INVERT=0,PORT=4,BITSHIFT=4,BYTEMASK=0x10,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/FSP/FSP_LEFT_DOOR_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=5,INVERT=0,PORT=4,BITSHIFT=6,BYTEMASK=0x40,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/FSP/FSP_RIGHT_DOOR_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=6,INVERT=0,PORT=4,BITSHIFT=5,BYTEMASK=0x20,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/FSP/KEYSWITCH _class=9,Subclass=0,Instance=0,BIT_POS=1,NORMAL_POS_AV=1,DIAG_POS_AV=1,LOCK_POS_AV=1,OFF_POS_AV,PERM=1 -/SYSTEM/IO_BOARD/FSP_KS_NORMAL_POS_SENSOR _class=8,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=3,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/FSP_KS_DIAG_POS_SENSOR _class=8,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=1,INVERT=1,PORT=3,BITSHIFT=1,BYTEMASK=0x2,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/FSP_KS_LOCK_POS_SENSOR _class=8,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=2,INVERT=0,PORT=3,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/FSP_KS_OFF_POS_SENSOR _class=8,Subclass=0,Instance=0,PERM=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=3,INVERT=0,PORT=3,BITSHIFT=3,BYTEMASK=0x8,REG=0,TYPE=7,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK0_SLOT _class=3,Subclass=0,Instance=0,OPTION=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK1_SLOT _class=3,Subclass=0,Instance=1,OPTION=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK2_SLOT _class=3,Subclass=0,Instance=2,OPTION=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK3_SLOT _class=3,Subclass=0,Instance=3,OPTION=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK4_SLOT _class=3,Subclass=0,Instance=4,OPTION=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK5_SLOT _class=3,Subclass=0,Instance=5,OPTION=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK6_SLOT _class=3,Subclass=0,Instance=6,OPTION=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK7_SLOT _class=3,Subclass=0,Instance=7,OPTION=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK8_SLOT _class=3,Subclass=0,Instance=8,OPTION=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK9_SLOT _class=3,Subclass=0,Instance=9,OPTION=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK10_SLOT _class=3,Subclass=0,Instance=10,OPTION=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK11_SLOT _class=3,Subclass=0,Instance=11,OPTION=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK0_SLOT/DISK0 _class=3,Subclass=0,Instance=0,HOTPLUG=1,FRU=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK1_SLOT/DISK1 _class=3,Subclass=0,Instance=1,HOTPLUG=1,FRU=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK2_SLOT/DISK2 _class=3,Subclass=0,Instance=2,HOTPLUG=1,FRU=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK3_SLOT/DISK3 _class=3,Subclass=0,Instance=3,HOTPLUG=1,FRU=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK4_SLOT/DISK4 _class=3,Subclass=0,Instance=4,HOTPLUG=1,FRU=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK5_SLOT/DISK5 _class=3,Subclass=0,Instance=5,HOTPLUG=1,FRU=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK6_SLOT/DISK6 _class=3,Subclass=0,Instance=6,HOTPLUG=1,FRU=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK7_SLOT/DISK7 _class=3,Subclass=0,Instance=7,HOTPLUG=1,FRU=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK8_SLOT/DISK8 _class=3,Subclass=0,Instance=8,HOTPLUG=1,FRU=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK9_SLOT/DISK9 _class=3,Subclass=0,Instance=9,HOTPLUG=1,FRU=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK10_SLOT/DISK10 _class=3,Subclass=0,Instance=10,HOTPLUG=1,FRU=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK11_SLOT/DISK11 _class=3,Subclass=0,Instance=11,HOTPLUG=1,FRU=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK0_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=7,BUSADDR=0x8a,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK1_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=1,INVERT=1,PORT=0,BITSHIFT=1,BYTEMASK=0x2,REG=0,TYPE=7,BUSADDR=0x8a,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK2_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=2,INVERT=0,PORT=0,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=7,BUSADDR=0x8a,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK3_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=3,INVERT=0,PORT=0,BITSHIFT=3,BYTEMASK=0x8,REG=0,TYPE=7,BUSADDR=0x8a,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK4_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=4,INVERT=0,PORT=0,BITSHIFT=4,BYTEMASK=0x10,REG=0,TYPE=7,BUSADDR=0x8a,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK5_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=5,INVERT=0,PORT=0,BITSHIFT=5,BYTEMASK=0x20,REG=0,TYPE=7,BUSADDR=0x8a,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK6_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=7,BUSADDR=0x8e,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK7_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=1,INVERT=1,PORT=0,BITSHIFT=1,BYTEMASK=0x2,REG=0,TYPE=7,BUSADDR=0x8e,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK8_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=2,INVERT=0,PORT=0,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=7,BUSADDR=0x8e,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK9_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=3,INVERT=0,PORT=0,BITSHIFT=3,BYTEMASK=0x8,REG=0,TYPE=7,BUSADDR=0x8e,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK10_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=4,INVERT=0,PORT=0,BITSHIFT=4,BYTEMASK=0x10,REG=0,TYPE=7,BUSADDR=0x8e,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK11_FLT_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=5,INVERT=0,PORT=0,BITSHIFT=5,BYTEMASK=0x20,REG=0,TYPE=7,BUSADDR=0x8e,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK0_REMOVE_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=6,INVERT=0,PORT=0,BITSHIFT=6,BYTEMASK=0x40,REG=0,TYPE=7,BUSADDR=0x8a,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK1_REMOVE_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=7,INVERT=0,PORT=0,BITSHIFT=7,BYTEMASK=0x80,REG=0,TYPE=7,BUSADDR=0x8a,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK2_REMOVE_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=4,INVERT=0,PORT=2,BITSHIFT=4,BYTEMASK=0x10,REG=0,TYPE=7,BUSADDR=0x8a,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK3_REMOVE_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=5,INVERT=0,PORT=2,BITSHIFT=5,BYTEMASK=0x20,REG=0,TYPE=7,BUSADDR=0x8a,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK4_REMOVE_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=6,INVERT=0,PORT=2,BITSHIFT=6,BYTEMASK=0x40,REG=0,TYPE=7,BUSADDR=0x8a,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK5_REMOVE_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=7,INVERT=0,PORT=2,BITSHIFT=7,BYTEMASK=0x80,REG=0,TYPE=7,BUSADDR=0x8a,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK6_REMOVE_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=6,INVERT=0,PORT=0,BITSHIFT=6,BYTEMASK=0x40,REG=0,TYPE=7,BUSADDR=0x8e,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK7_REMOVE_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=7,INVERT=0,PORT=0,BITSHIFT=7,BYTEMASK=0x80,REG=0,TYPE=7,BUSADDR=0x8e,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK8_REMOVE_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=4,INVERT=0,PORT=2,BITSHIFT=4,BYTEMASK=0x10,REG=0,TYPE=7,BUSADDR=0x8e,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK9_REMOVE_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=5,INVERT=0,PORT=2,BITSHIFT=5,BYTEMASK=0x20,REG=0,TYPE=7,BUSADDR=0x8e,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK10_REMOVE_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=6,INVERT=0,PORT=2,BITSHIFT=6,BYTEMASK=0x40,REG=0,TYPE=7,BUSADDR=0x8e,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK11_REMOVE_LED _class=2,Subclass=0,Instance=0,BI_STATE=1,AMBER=1,OUTPUT=1,OPTION=1,RDWR=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=7,INVERT=0,PORT=2,BITSHIFT=7,BYTEMASK=0x80,REG=0,TYPE=7,BUSADDR=0x8e,BUSNUM=0,CNTLR=1,Led-color=AMBER -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK0_PR_SENSOR _class=6,Subclass=0,Instance=0,OPTION=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=7,BUSADDR=0x88,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK1_PR_SENSOR _class=6,Subclass=0,Instance=0,OPTION=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=1,INVERT=1,PORT=0,BITSHIFT=1,BYTEMASK=0x2,REG=0,TYPE=7,BUSADDR=0x88,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK2_PR_SENSOR _class=6,Subclass=0,Instance=0,OPTION=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=2,INVERT=0,PORT=0,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=7,BUSADDR=0x88,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK3_PR_SENSOR _class=6,Subclass=0,Instance=0,OPTION=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=3,INVERT=0,PORT=0,BITSHIFT=3,BYTEMASK=0x8,REG=0,TYPE=7,BUSADDR=0x88,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK4_PR_SENSOR _class=6,Subclass=0,Instance=0,OPTION=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=4,INVERT=0,PORT=0,BITSHIFT=4,BYTEMASK=0x10,REG=0,TYPE=7,BUSADDR=0x88,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/DISK5_PR_SENSOR _class=6,Subclass=0,Instance=0,OPTION=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=5,INVERT=0,PORT=0,BITSHIFT=5,BYTEMASK=0x20,REG=0,TYPE=7,BUSADDR=0x88,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK6_PR_SENSOR _class=6,Subclass=0,Instance=0,OPTION=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x1,REG=0,TYPE=7,BUSADDR=0x8c,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK7_PR_SENSOR _class=6,Subclass=0,Instance=0,OPTION=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=1,INVERT=1,PORT=0,BITSHIFT=1,BYTEMASK=0x2,REG=0,TYPE=7,BUSADDR=0x8c,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK8_PR_SENSOR _class=6,Subclass=0,Instance=0,OPTION=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=2,INVERT=0,PORT=0,BITSHIFT=2,BYTEMASK=0x4,REG=0,TYPE=7,BUSADDR=0x8c,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK9_PR_SENSOR _class=6,Subclass=0,Instance=0,OPTION=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=3,INVERT=0,PORT=0,BITSHIFT=3,BYTEMASK=0x8,REG=0,TYPE=7,BUSADDR=0x8c,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK10_PR_SENSOR _class=6,Subclass=0,Instance=0,OPTION=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=4,INVERT=0,PORT=0,BITSHIFT=4,BYTEMASK=0x10,REG=0,TYPE=7,BUSADDR=0x8c,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/DISK11_PR_SENSOR _class=6,Subclass=0,Instance=0,OPTION=1,RDONLY=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=5,INVERT=0,PORT=0,BITSHIFT=5,BYTEMASK=0x20,REG=0,TYPE=7,BUSADDR=0x8c,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/5V_ENABLE_SWITCH _class=8,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=7,INVERT=0,PORT=0,BITSHIFT=6,BYTEMASK=0x40,REG=0,TYPE=5,BUSADDR=0x46,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/I2C_ENABLE_SWITCH _class=8,Subclass=0,Instance=0,PERM=1,RDWR=1,VERSION=0,ACTIVE_LOW=0,BIT_NUM=6,INVERT=0,PORT=0,BITSHIFT=6,BYTEMASK=0x40,REG=0,TYPE=5,BUSADDR=0x46,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C64_A0_0 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa0,BUSNUM=0,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C64_A2_0 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa2,BUSNUM=0,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C64_A4_0 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa4,BUSNUM=0,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C64_A6_0 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa6,BUSNUM=0,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C64_A8_0 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa8,BUSNUM=0,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C64_AA_0 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xaa,BUSNUM=0,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C64_AC_0 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xac,BUSNUM=0,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C64_AE_0 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xae,BUSNUM=0,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C64_A0_1 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa0,BUSNUM=1,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C64_A2_1 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa2,BUSNUM=1,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C64_A4_1 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa4,BUSNUM=1,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C64_A6_1 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa6,BUSNUM=1,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C64_A8_1 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa8,BUSNUM=1,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C64_AA_1 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xaa,BUSNUM=1,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C64_AC_1 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xac,BUSNUM=1,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C64_AE_1 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xae,BUSNUM=1,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C64_A0_2 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa0,BUSNUM=2,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C64_A2_2 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa2,BUSNUM=2,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C64_A4_2 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa4,BUSNUM=2,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C64_A6_2 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa6,BUSNUM=2,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C64_A8_2 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa8,BUSNUM=2,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C64_AA_2 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xaa,BUSNUM=2,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C64_AC_2 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xac,BUSNUM=2,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C64_AE_2 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xae,BUSNUM=2,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C64_A0_3 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa0,BUSNUM=3,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C64_A2_3 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa2,BUSNUM=3,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C64_A4_3 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa4,BUSNUM=3,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C64_A6_3 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa6,BUSNUM=3,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C64_A8_3 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa8,BUSNUM=3,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C64_AA_3 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xaa,BUSNUM=3,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C64_AC_3 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xac,BUSNUM=3,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C64_AE_3 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xae,BUSNUM=3,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/24C64_A0_4 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa0,BUSNUM=4,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/24C64_A2_4 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa2,BUSNUM=4,CNTLR=0 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/ZULU_1_3_MOD_CARD/24C64_A2_4 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa2,BUSNUM=4,CNTLR=0 -/SYSTEM/MOTHERBOARD/24C64_A8_4 _class=11,Subclass=0,Instance=0,PERM=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa8,BUSNUM=4,CNTLR=0 -/SYSTEM/IO_BOARD/24C64_AA_4 _class=11,Subclass=0,Instance=0,PERM=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xaa,BUSNUM=4,CNTLR=0 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/SSC100_16_5 _class=11,Subclass=9,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x16,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/LOOP_B_0_BOARD_SLOT/LOOP_B_0_BOARD/SSC100_1A_5 _class=11,Subclass=9,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x1a,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/SSC100_1C_5 _class=11,Subclass=9,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x1c,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/LOOP_B_1_BOARD_SLOT/LOOP_B_1_BOARD/SSC100_1E_5 _class=11,Subclass=9,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x1e,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/MAX1617_30_5 _class=11,Subclass=4,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x30,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/MAX1617_32_5 _class=11,Subclass=4,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x32,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/ZULU_1_3_MOD_CARD/MAX1617_32_5 _class=11,Subclass=4,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x32,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_0_2_MOD_SLOT/CPU_0_2_MOD_CARD/MAX1617_34_5 _class=11,Subclass=4,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x34,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS0_SLOT/PS0/PCF8574_70_5 _class=11,Subclass=5,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x70,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS1_SLOT/PS1/PCF8574_72_5 _class=11,Subclass=5,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x72,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS2_SLOT/PS2/PCF8574_74_5 _class=11,Subclass=5,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x74,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/PCF8574_46_5 _class=11,Subclass=5,Instance=0,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x46,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/CPU_1_3_MOD_CARD/MAX1617_52_5 _class=11,Subclass=4,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x52,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_1_3_MOD_SLOT/ZULU_1_3_MOD_CARD/MAX1617_52_5 _class=11,Subclass=4,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x52,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/CPU_4_6_MOD_CARD/MAX1617_54_5 _class=11,Subclass=4,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x54,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/ZULU_4_6_MOD_CARD/MAX1617_54_5 _class=11,Subclass=4,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x54,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT/CPU_5_7_MOD_CARD/MAX1617_56_5 _class=11,Subclass=4,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x56,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/LTC1427_5A_5 _class=11,Subclass=3,Instance=0,PERM=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x5a,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/LTC1427_5E_5 _class=11,Subclass=3,Instance=0,PERM=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x5e,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/SSC050_80_5 _class=11,Subclass=7,Instance=0,PERM=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x80,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/SSC050_82_5 _class=11,Subclass=7,Instance=0,PERM=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x82,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/SSC050_88_5 _class=11,Subclass=7,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x88,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/SSC050_8A_5 _class=11,Subclass=7,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x8a,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/SSC050_8C_5 _class=11,Subclass=7,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x8c,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/SSC050_8E_5 _class=11,Subclass=7,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x8e,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS0_SLOT/PS0/PCF8591_90_5 _class=11,Subclass=6,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x90,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS1_SLOT/PS1/PCF8591_92_5 _class=11,Subclass=6,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x92,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS2_SLOT/PS2/PCF8591_94_5 _class=11,Subclass=6,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x94,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/PCF8591_96_5 _class=11,Subclass=6,Instance=0,PERM=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x96,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/CPU_4_6_MOD_CARD/MAX1617_98_5 _class=11,Subclass=4,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x98,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/ZULU_4_6_MOD_CARD/MAX1617_98_5 _class=11,Subclass=4,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x98,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT/CPU_5_7_MOD_CARD/MAX1617_9A_5 _class=11,Subclass=4,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=1,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x9a,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/LM75_9C_5 _class=11,Subclass=2,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x9c,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/LM75_9E_5 _class=11,Subclass=2,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0x9e,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS0_SLOT/PS0/24C64_A0_5 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa0,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS1_SLOT/PS1/24C64_A2_5 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa2,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/PS2_SLOT/PS2/24C64_A4_5 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa4,BUSNUM=0,CNTLR=1 -/SYSTEM/RSC_SLOT/RSC_CARD/24C64_A6_5 _class=11,Subclass=0,Instance=0,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa6,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP0_BOARD_SLOT/DISK_BP0_BOARD/24C64_A8_5 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa8,BUSNUM=0,CNTLR=1 -/SYSTEM/DISK_BP1_BOARD_SLOT/DISK_BP1_BOARD/24C64_AC_5 _class=11,Subclass=0,Instance=0,OPTION=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xac,BUSNUM=0,CNTLR=1 -/SYSTEM/PDB/24C64_AE_5 _class=11,Subclass=0,Instance=0,PERM=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xae,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/HPC3130_E2_5 _class=11,Subclass=1,Instance=0,PERM=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xe2,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/HPC3130_E6_5 _class=11,Subclass=1,Instance=0,PERM=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xe6,BUSNUM=0,CNTLR=1 -/SYSTEM/IO_BOARD/HPC3130_E8_5 _class=11,Subclass=1,Instance=0,PERM=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xe8,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/HPC3130_EC_5 _class=11,Subclass=1,Instance=0,PERM=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xec,BUSNUM=0,CNTLR=1 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/CPU_4_6_MOD_CARD/24C64_A0_6 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa0,BUSNUM=0,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/CPU_4_6_MOD_CARD/24C64_A2_6 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa2,BUSNUM=0,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/CPU_4_6_MOD_CARD/24C64_A4_6 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa4,BUSNUM=0,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/CPU_4_6_MOD_CARD/24C64_A6_6 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa6,BUSNUM=0,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/CPU_4_6_MOD_CARD/24C64_A8_6 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa8,BUSNUM=0,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/CPU_4_6_MOD_CARD/24C64_AA_6 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xaa,BUSNUM=0,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/CPU_4_6_MOD_CARD/24C64_AC_6 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xac,BUSNUM=0,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/CPU_4_6_MOD_CARD/24C64_AE_6 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xae,BUSNUM=0,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT/CPU_5_7_MOD_CARD/24C64_A0_7 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa0,BUSNUM=1,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT/CPU_5_7_MOD_CARD/24C64_A2_7 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa2,BUSNUM=1,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT/CPU_5_7_MOD_CARD/24C64_A4_7 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa4,BUSNUM=1,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT/CPU_5_7_MOD_CARD/24C64_A6_7 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa6,BUSNUM=1,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT/CPU_5_7_MOD_CARD/24C64_A8_7 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa8,BUSNUM=1,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT/CPU_5_7_MOD_CARD/24C64_AA_7 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xaa,BUSNUM=1,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT/CPU_5_7_MOD_CARD/24C64_AC_7 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xac,BUSNUM=1,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT/CPU_5_7_MOD_CARD/24C64_AE_7 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xae,BUSNUM=1,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/CPU_4_6_MOD_CARD/24C64_A0_8 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa0,BUSNUM=2,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/CPU_4_6_MOD_CARD/24C64_A2_8 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa2,BUSNUM=2,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/CPU_4_6_MOD_CARD/24C64_A4_8 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa4,BUSNUM=2,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/CPU_4_6_MOD_CARD/24C64_A6_8 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa6,BUSNUM=2,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/CPU_4_6_MOD_CARD/24C64_A8_8 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa8,BUSNUM=2,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/CPU_4_6_MOD_CARD/24C64_AA_8 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xaa,BUSNUM=2,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/CPU_4_6_MOD_CARD/24C64_AC_8 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xac,BUSNUM=2,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/CPU_4_6_MOD_CARD/24C64_AE_8 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xae,BUSNUM=2,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT/CPU_5_7_MOD_CARD/24C64_A0_9 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa0,BUSNUM=3,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT/CPU_5_7_MOD_CARD/24C64_A2_9 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa2,BUSNUM=3,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT/CPU_5_7_MOD_CARD/24C64_A4_9 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa4,BUSNUM=3,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT/CPU_5_7_MOD_CARD/24C64_A6_9 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa6,BUSNUM=3,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT/CPU_5_7_MOD_CARD/24C64_A8_9 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa8,BUSNUM=3,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT/CPU_5_7_MOD_CARD/24C64_AA_9 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xaa,BUSNUM=3,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT/CPU_5_7_MOD_CARD/24C64_AC_9 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xac,BUSNUM=3,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT/CPU_5_7_MOD_CARD/24C64_AE_9 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xae,BUSNUM=3,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/CPU_4_6_MOD_CARD/24C64_A4_10 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa4,BUSNUM=4,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_4_6_MOD_SLOT/ZULU_4_6_MOD_CARD/24C64_A4_10 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa4,BUSNUM=4,CNTLR=2 -/SYSTEM/MOTHERBOARD/CPU_5_7_MOD_SLOT/CPU_5_7_MOD_CARD/24C64_A6_10 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa6,BUSNUM=4,CNTLR=2 -/SYSTEM/MOTHERBOARD/24C64_A0_11 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa0,BUSNUM=0,CNTLR=3 -/SYSTEM/MOTHERBOARD/24C64_A2_11 _class=11,Subclass=0,Instance=0,HOTPLUG=1,VERSION=0,ACTIVE_LOW=1,BIT_NUM=0,INVERT=0,PORT=0,BITSHIFT=0,BYTEMASK=0x0,REG=0,TYPE=0,BUSADDR=0xa2,BUSNUM=0,CNTLR=3 -OBJECT_INFO_END - -ASSOCIATIONS -ASSOCIATION PSVC_PRESENCE_SENSOR -CPU0_PRIM_FAN CPU_PFAN_PR_SENSOR -CPU1_PRIM_FAN CPU_PFAN_PR_SENSOR -CPU0_SEC_FAN CPU_SFAN_PR_SENSOR -CPU1_SEC_FAN CPU_SFAN_PR_SENSOR -IO0_PRIM_FAN IO_PFAN_PR_SENSOR -IO1_PRIM_FAN IO_PFAN_PR_SENSOR -IO0_SEC_FAN IO_SFAN_PR_SENSOR -IO1_SEC_FAN IO_SFAN_PR_SENSOR -IO_BRIDGE_PRIM_FAN IO_BRIDGE_PFAN_PR_SENSOR -IO_BRIDGE_SEC_FAN IO_BRIDGE_SFAN_PR_SENSOR -CPU_PFAN_SLOT CPU_PFAN_PR_SENSOR -CPU_SFAN_SLOT CPU_SFAN_PR_SENSOR -IO_PFAN_SLOT IO_PFAN_PR_SENSOR -IO_SFAN_SLOT IO_SFAN_PR_SENSOR -IO_BRIDGE_PFAN_SLOT IO_BRIDGE_PFAN_PR_SENSOR -IO_BRIDGE_SFAN_SLOT IO_BRIDGE_SFAN_PR_SENSOR -PS0 PS0_PR_SENSOR -PS1 PS1_PR_SENSOR -PS2 PS2_PR_SENSOR -PS0_SLOT PS0_PR_SENSOR -PS1_SLOT PS1_PR_SENSOR -PS2_SLOT PS2_PR_SENSOR -CPU_0_2_MOD_CARD CPU_0_2_MOD_PR_SENSOR -CPU_1_3_MOD_CARD CPU_1_3_MOD_PR_SENSOR -ZULU_1_3_MOD_CARD CPU_1_3_MOD_PR_SENSOR -CPU_4_6_MOD_CARD CPU_4_6_MOD_PR_SENSOR -ZULU_4_6_MOD_CARD CPU_4_6_MOD_PR_SENSOR -CPU_5_7_MOD_CARD CPU_5_7_MOD_PR_SENSOR -CPU_0_2_MOD_SLOT CPU_0_2_MOD_PR_SENSOR -CPU_1_3_MOD_SLOT CPU_1_3_MOD_PR_SENSOR -CPU_4_6_MOD_SLOT CPU_4_6_MOD_PR_SENSOR -CPU_5_7_MOD_SLOT CPU_5_7_MOD_PR_SENSOR -PCI0_CARD PCI0_PR_SENSOR -PCI1_CARD PCI1_PR_SENSOR -PCI2_CARD PCI2_PR_SENSOR -PCI3_CARD PCI3_PR_SENSOR -PCI4_CARD PCI4_PR_SENSOR -PCI5_CARD PCI5_PR_SENSOR -PCI6_CARD PCI6_PR_SENSOR -PCI7_CARD PCI7_PR_SENSOR -PCI8_CARD PCI8_PR_SENSOR -PCI0_SLOT PCI0_PR_SENSOR -PCI1_SLOT PCI1_PR_SENSOR -PCI2_SLOT PCI2_PR_SENSOR -PCI3_SLOT PCI3_PR_SENSOR -PCI4_SLOT PCI4_PR_SENSOR -PCI5_SLOT PCI5_PR_SENSOR -PCI6_SLOT PCI6_PR_SENSOR -PCI7_SLOT PCI7_PR_SENSOR -PCI8_SLOT PCI8_PR_SENSOR -DISK_BP0_BOARD DISK_BP0_PR_SENSOR -DISK_BP1_BOARD DISK_BP1_PR_SENSOR -DISK_BP0_BOARD_SLOT DISK_BP0_PR_SENSOR -DISK_BP1_BOARD_SLOT DISK_BP1_PR_SENSOR -DISK0 DISK0_PR_SENSOR -DISK1 DISK1_PR_SENSOR -DISK2 DISK2_PR_SENSOR -DISK3 DISK3_PR_SENSOR -DISK4 DISK4_PR_SENSOR -DISK5 DISK5_PR_SENSOR -DISK6 DISK6_PR_SENSOR -DISK7 DISK7_PR_SENSOR -DISK8 DISK8_PR_SENSOR -DISK9 DISK9_PR_SENSOR -DISK10 DISK10_PR_SENSOR -DISK11 DISK11_PR_SENSOR -RSC_CARD RSC_PR_SENSOR -RSC_SLOT RSC_PR_SENSOR -LOOP_B_0_BOARD LOOP_B_0_BOARD_PR_SENSOR -LOOP_B_1_BOARD LOOP_B_1_BOARD_PR_SENSOR -LOOP_B_0_BOARD_SLOT LOOP_B_0_BOARD_PR_SENSOR -LOOP_B_1_BOARD_SLOT LOOP_B_1_BOARD_PR_SENSOR -ASSOCIATION_END -ASSOCIATION PSVC_FAN_ONOFF_SENSOR -CPU0_SEC_FAN CPU_SFAN_ONOFF_SWITCH -CPU1_SEC_FAN CPU_SFAN_ONOFF_SWITCH -IO0_PRIM_FAN IO_PFAN_ONOFF_SWITCH -IO1_PRIM_FAN IO_PFAN_ONOFF_SWITCH -IO0_SEC_FAN IO_SFAN_ONOFF_SWITCH -IO1_SEC_FAN IO_SFAN_ONOFF_SWITCH -IO_BRIDGE_PRIM_FAN IO_BRIDGE_PFAN_ONOFF_SWITCH -IO_BRIDGE_SEC_FAN IO_BRIDGE_SFAN_ONOFF_SWITCH -ASSOCIATION_END -ASSOCIATION PSVC_FAN_SPEED_TACHOMETER -CPU0_PRIM_FAN CPU0_PFAN_TACH -CPU1_PRIM_FAN CPU1_PFAN_TACH -CPU0_SEC_FAN CPU0_SFAN_TACH -CPU1_SEC_FAN CPU1_SFAN_TACH -IO0_PRIM_FAN IO0_PFAN_TACH -IO1_PRIM_FAN IO1_PFAN_TACH -IO0_SEC_FAN IO0_SFAN_TACH -IO1_SEC_FAN IO1_SFAN_TACH -IO_BRIDGE_PRIM_FAN IO_BRIDGE_PFAN_TACH -IO_BRIDGE_SEC_FAN IO_BRIDGE_SFAN_TACH -ASSOCIATION_END -ASSOCIATION PSVC_FAN_PRIM_SEC_SELECTOR -CPU0_PRIM_FAN CPU_FAN_P_S_MON_SWITCH -CPU1_PRIM_FAN CPU_FAN_P_S_MON_SWITCH -CPU0_SEC_FAN CPU_FAN_P_S_MON_SWITCH -CPU1_SEC_FAN CPU_FAN_P_S_MON_SWITCH -IO0_PRIM_FAN IO_FAN_P_S_MON_SWITCH -IO1_PRIM_FAN IO_FAN_P_S_MON_SWITCH -IO0_SEC_FAN IO_FAN_P_S_MON_SWITCH -IO1_SEC_FAN IO_FAN_P_S_MON_SWITCH -ASSOCIATION_END -ASSOCIATION PSVC_DEV_TEMP_SENSOR -CPU0_PRIM_FAN CPU0_DIE_TEMPERATURE_SENSOR -CPU0_PRIM_FAN CPU1_DIE_TEMPERATURE_SENSOR -CPU0_PRIM_FAN ZULU1_DIE_TEMPERATURE_SENSOR -CPU0_PRIM_FAN CPU2_DIE_TEMPERATURE_SENSOR -CPU0_PRIM_FAN CPU3_DIE_TEMPERATURE_SENSOR -CPU0_PRIM_FAN ZULU3_DIE_TEMPERATURE_SENSOR -CPU0_PRIM_FAN CPU4_DIE_TEMPERATURE_SENSOR -CPU0_PRIM_FAN ZULU4_DIE_TEMPERATURE_SENSOR -CPU0_PRIM_FAN CPU5_DIE_TEMPERATURE_SENSOR -CPU0_PRIM_FAN CPU6_DIE_TEMPERATURE_SENSOR -CPU0_PRIM_FAN ZULU6_DIE_TEMPERATURE_SENSOR -CPU0_PRIM_FAN CPU7_DIE_TEMPERATURE_SENSOR -CPU1_PRIM_FAN CPU0_DIE_TEMPERATURE_SENSOR -CPU1_PRIM_FAN CPU1_DIE_TEMPERATURE_SENSOR -CPU1_PRIM_FAN ZULU1_DIE_TEMPERATURE_SENSOR -CPU1_PRIM_FAN CPU2_DIE_TEMPERATURE_SENSOR -CPU1_PRIM_FAN CPU3_DIE_TEMPERATURE_SENSOR -CPU1_PRIM_FAN ZULU3_DIE_TEMPERATURE_SENSOR -CPU1_PRIM_FAN CPU4_DIE_TEMPERATURE_SENSOR -CPU1_PRIM_FAN ZULU4_DIE_TEMPERATURE_SENSOR -CPU1_PRIM_FAN CPU5_DIE_TEMPERATURE_SENSOR -CPU1_PRIM_FAN CPU6_DIE_TEMPERATURE_SENSOR -CPU1_PRIM_FAN ZULU6_DIE_TEMPERATURE_SENSOR -CPU1_PRIM_FAN CPU7_DIE_TEMPERATURE_SENSOR -IO0_PRIM_FAN IOB_AMB_TEMPERATURE_SENSOR -IO1_PRIM_FAN IOB_AMB_TEMPERATURE_SENSOR -CPU_0_2_MOD_CARD CPU0_DIE_TEMPERATURE_SENSOR -CPU_0_2_MOD_CARD CPU2_DIE_TEMPERATURE_SENSOR -CPU_1_3_MOD_CARD CPU1_DIE_TEMPERATURE_SENSOR -ZULU_1_3_MOD_CARD ZULU1_DIE_TEMPERATURE_SENSOR -CPU_1_3_MOD_CARD CPU3_DIE_TEMPERATURE_SENSOR -ZULU_1_3_MOD_CARD ZULU3_DIE_TEMPERATURE_SENSOR -CPU_4_6_MOD_CARD CPU4_DIE_TEMPERATURE_SENSOR -ZULU_4_6_MOD_CARD ZULU4_DIE_TEMPERATURE_SENSOR -CPU_4_6_MOD_CARD CPU6_DIE_TEMPERATURE_SENSOR -ZULU_4_6_MOD_CARD ZULU6_DIE_TEMPERATURE_SENSOR -CPU_5_7_MOD_CARD CPU5_DIE_TEMPERATURE_SENSOR -CPU_5_7_MOD_CARD CPU7_DIE_TEMPERATURE_SENSOR -ASSOCIATION_END -ASSOCIATION PSVC_FAN_TRAY_FANS -CPU0_PRIM_FAN CPU1_PRIM_FAN -CPU1_PRIM_FAN CPU0_PRIM_FAN -CPU0_SEC_FAN CPU1_SEC_FAN -CPU1_SEC_FAN CPU0_SEC_FAN -IO0_PRIM_FAN IO1_PRIM_FAN -IO1_PRIM_FAN IO0_PRIM_FAN -IO0_SEC_FAN IO1_SEC_FAN -IO1_SEC_FAN IO0_SEC_FAN -ASSOCIATION_END -ASSOCIATION PSVC_FAN_DRIVE_CONTROL -CPU0_PRIM_FAN CPU_PFAN_SPEED_CONTROL -CPU1_PRIM_FAN CPU_PFAN_SPEED_CONTROL -IO0_PRIM_FAN IO_PFAN_SPEED_CONTROL -IO1_PRIM_FAN IO_PFAN_SPEED_CONTROL -ASSOCIATION_END -ASSOCIATION PSVC_KS_NORMAL_POS_SENSOR -KEYSWITCH FSP_KS_NORMAL_POS_SENSOR -ASSOCIATION_END -ASSOCIATION PSVC_KS_DIAG_POS_SENSOR -KEYSWITCH FSP_KS_DIAG_POS_SENSOR -ASSOCIATION_END -ASSOCIATION PSVC_KS_LOCK_POS_SENSOR -KEYSWITCH FSP_KS_LOCK_POS_SENSOR -ASSOCIATION_END -ASSOCIATION PSVC_KS_OFF_POS_SENSOR -KEYSWITCH FSP_KS_OFF_POS_SENSOR -ASSOCIATION_END -ASSOCIATION PSVC_SLOT_FAULT_LED -CPU_PFAN_SLOT CPU_PFAN_FLT_LED -CPU_SFAN_SLOT CPU_SFAN_FLT_LED -IO_PFAN_SLOT IO_PFAN_FLT_LED -IO_SFAN_SLOT IO_SFAN_FLT_LED -IO_BRIDGE_PFAN_SLOT IO_BRIDGE_PFAN_FLT_LED -IO_BRIDGE_SFAN_SLOT IO_BRIDGE_SFAN_FLT_LED -CPU_0_2_MOD_SLOT CPU_0_2_MOD_FLT_LED -CPU_1_3_MOD_SLOT CPU_1_3_MOD_FLT_LED -CPU_4_6_MOD_SLOT CPU_4_6_MOD_FLT_LED -CPU_5_7_MOD_SLOT CPU_5_7_MOD_FLT_LED -PCI0_SLOT PCI0_FLT_LED -PCI1_SLOT PCI1_FLT_LED -PCI2_SLOT PCI2_FLT_LED -PCI3_SLOT PCI3_FLT_LED -PCI4_SLOT PCI4_FLT_LED -PCI5_SLOT PCI5_FLT_LED -PCI6_SLOT PCI6_FLT_LED -PCI7_SLOT PCI7_FLT_LED -PCI8_SLOT PCI8_FLT_LED -DISK0_SLOT DISK0_FLT_LED -DISK1_SLOT DISK1_FLT_LED -DISK2_SLOT DISK2_FLT_LED -DISK3_SLOT DISK3_FLT_LED -DISK4_SLOT DISK4_FLT_LED -DISK5_SLOT DISK5_FLT_LED -DISK6_SLOT DISK6_FLT_LED -DISK7_SLOT DISK7_FLT_LED -DISK8_SLOT DISK8_FLT_LED -DISK9_SLOT DISK9_FLT_LED -DISK10_SLOT DISK10_FLT_LED -DISK11_SLOT DISK11_FLT_LED -ASSOCIATION_END -ASSOCIATION PSVC_SLOT_REMOVE_LED -CPU_PFAN_SLOT CPU_PFAN_REMOVE_LED -CPU_SFAN_SLOT CPU_SFAN_REMOVE_LED -IO_PFAN_SLOT IO_PFAN_REMOVE_LED -IO_SFAN_SLOT IO_SFAN_REMOVE_LED -IO_BRIDGE_PFAN_SLOT IO_BRIDGE_PFAN_REMOVE_LED -IO_BRIDGE_SFAN_SLOT IO_BRIDGE_SFAN_REMOVE_LED -CPU_0_2_MOD_SLOT CPU_0_2_MOD_REMOVE_LED -CPU_1_3_MOD_SLOT CPU_1_3_MOD_REMOVE_LED -CPU_4_6_MOD_SLOT CPU_4_6_MOD_REMOVE_LED -CPU_5_7_MOD_SLOT CPU_5_7_MOD_REMOVE_LED -PCI0_SLOT PCI0_REMOVE_LED -PCI1_SLOT PCI1_REMOVE_LED -PCI2_SLOT PCI2_REMOVE_LED -PCI3_SLOT PCI3_REMOVE_LED -PCI4_SLOT PCI4_REMOVE_LED -PCI5_SLOT PCI5_REMOVE_LED -PCI6_SLOT PCI6_REMOVE_LED -PCI7_SLOT PCI7_REMOVE_LED -PCI8_SLOT PCI8_REMOVE_LED -DISK0_SLOT DISK0_REMOVE_LED -DISK1_SLOT DISK1_REMOVE_LED -DISK2_SLOT DISK2_REMOVE_LED -DISK3_SLOT DISK3_REMOVE_LED -DISK4_SLOT DISK4_REMOVE_LED -DISK5_SLOT DISK5_REMOVE_LED -DISK6_SLOT DISK6_REMOVE_LED -DISK7_SLOT DISK7_REMOVE_LED -DISK8_SLOT DISK8_REMOVE_LED -DISK9_SLOT DISK9_REMOVE_LED -DISK10_SLOT DISK10_REMOVE_LED -DISK11_SLOT DISK11_REMOVE_LED -ASSOCIATION_END -ASSOCIATION PSVC_TS_OVERTEMP_LED -CPU0_DIE_TEMPERATURE_SENSOR FSP_RIGHT_THERMAL_FAULT_LED -CPU0_DIE_TEMPERATURE_SENSOR CPU_0_2_MOD_FLT_LED -CPU1_DIE_TEMPERATURE_SENSOR FSP_RIGHT_THERMAL_FAULT_LED -ZULU1_DIE_TEMPERATURE_SENSOR FSP_RIGHT_THERMAL_FAULT_LED -CPU1_DIE_TEMPERATURE_SENSOR CPU_1_3_MOD_FLT_LED -ZULU1_DIE_TEMPERATURE_SENSOR CPU_1_3_MOD_FLT_LED -CPU2_DIE_TEMPERATURE_SENSOR FSP_RIGHT_THERMAL_FAULT_LED -CPU2_DIE_TEMPERATURE_SENSOR CPU_0_2_MOD_FLT_LED -CPU3_DIE_TEMPERATURE_SENSOR FSP_RIGHT_THERMAL_FAULT_LED -ZULU3_DIE_TEMPERATURE_SENSOR FSP_RIGHT_THERMAL_FAULT_LED -CPU3_DIE_TEMPERATURE_SENSOR CPU_1_3_MOD_FLT_LED -ZULU3_DIE_TEMPERATURE_SENSOR CPU_1_3_MOD_FLT_LED -CPU4_DIE_TEMPERATURE_SENSOR FSP_RIGHT_THERMAL_FAULT_LED -ZULU4_DIE_TEMPERATURE_SENSOR FSP_RIGHT_THERMAL_FAULT_LED -CPU4_DIE_TEMPERATURE_SENSOR CPU_4_6_MOD_FLT_LED -ZULU4_DIE_TEMPERATURE_SENSOR CPU_4_6_MOD_FLT_LED -CPU5_DIE_TEMPERATURE_SENSOR FSP_RIGHT_THERMAL_FAULT_LED -CPU5_DIE_TEMPERATURE_SENSOR CPU_5_7_MOD_FLT_LED -CPU6_DIE_TEMPERATURE_SENSOR FSP_RIGHT_THERMAL_FAULT_LED -ZULU6_DIE_TEMPERATURE_SENSOR FSP_RIGHT_THERMAL_FAULT_LED -CPU6_DIE_TEMPERATURE_SENSOR CPU_4_6_MOD_FLT_LED -ZULU6_DIE_TEMPERATURE_SENSOR CPU_4_6_MOD_FLT_LED -CPU7_DIE_TEMPERATURE_SENSOR FSP_RIGHT_THERMAL_FAULT_LED -CPU7_DIE_TEMPERATURE_SENSOR CPU_5_7_MOD_FLT_LED -MB_AMB_TEMPERATURE_SENSOR FSP_RIGHT_THERMAL_FAULT_LED -IOB_AMB_TEMPERATURE_SENSOR FSP_LEFT_THERMAL_FAULT_LED -DBP0_AMB_TEMPERATURE_SENSOR FSP_LEFT_THERMAL_FAULT_LED -DBP1_AMB_TEMPERATURE_SENSOR FSP_LEFT_THERMAL_FAULT_LED -ASSOCIATION_END -ASSOCIATION PSVC_TABLE -MB_AMB_TEMPERATURE_SENSOR TEMP_SENSOR_CONVERSIONS -IOB_AMB_TEMPERATURE_SENSOR TEMP_SENSOR_CONVERSIONS -PS0_3_3V_I_SENSOR 3_3V_I_CONVERSIONS -PS1_3_3V_I_SENSOR 3_3V_I_CONVERSIONS -PS2_3_3V_I_SENSOR 3_3V_I_CONVERSIONS -PS0_5V_I_SENSOR 5V_I_CONVERSIONS -PS1_5V_I_SENSOR 5V_I_CONVERSIONS -PS2_5V_I_SENSOR 5V_I_CONVERSIONS -PS0_12V_I_SENSOR 12V_I_CONVERSIONS -PS1_12V_I_SENSOR 12V_I_CONVERSIONS -PS2_12V_I_SENSOR 12V_I_CONVERSIONS -PS0_48V_I_SENSOR 48V_I_CONVERSIONS -PS1_48V_I_SENSOR 48V_I_CONVERSIONS -PS2_48V_I_SENSOR 48V_I_CONVERSIONS -ASSOCIATION_END -ASSOCIATION PSVC_PS_I_SENSOR -PS0 PS0_3_3V_I_SENSOR -PS0 PS0_5V_I_SENSOR -PS0 PS0_12V_I_SENSOR -PS0 PS0_48V_I_SENSOR -PS1 PS1_3_3V_I_SENSOR -PS1 PS1_5V_I_SENSOR -PS1 PS1_12V_I_SENSOR -PS1 PS1_48V_I_SENSOR -PS2 PS2_3_3V_I_SENSOR -PS2 PS2_5V_I_SENSOR -PS2 PS2_12V_I_SENSOR -PS2 PS2_48V_I_SENSOR -ASSOCIATION_END -ASSOCIATION PSVC_DEV_FAULT_SENSOR -FSP_GEN_FAULT_LED FSP_DISK_FAULT_LED -FSP_GEN_FAULT_LED FSP_POWER_FAULT_LED -FSP_GEN_FAULT_LED FSP_LEFT_THERMAL_FAULT_LED -FSP_GEN_FAULT_LED FSP_RIGHT_THERMAL_FAULT_LED -FSP_LEFT_THERMAL_FAULT_LED IOB_AMB_TEMPERATURE_SENSOR -FSP_LEFT_THERMAL_FAULT_LED DBP0_AMB_TEMPERATURE_SENSOR -FSP_LEFT_THERMAL_FAULT_LED DBP1_AMB_TEMPERATURE_SENSOR -FSP_LEFT_THERMAL_FAULT_LED IO0_PRIM_FAN -FSP_LEFT_THERMAL_FAULT_LED IO1_PRIM_FAN -FSP_LEFT_THERMAL_FAULT_LED IO0_SEC_FAN -FSP_LEFT_THERMAL_FAULT_LED IO1_SEC_FAN -FSP_RIGHT_THERMAL_FAULT_LED CPU0_DIE_TEMPERATURE_SENSOR -FSP_RIGHT_THERMAL_FAULT_LED CPU1_DIE_TEMPERATURE_SENSOR -FSP_RIGHT_THERMAL_FAULT_LED ZULU1_DIE_TEMPERATURE_SENSOR -FSP_RIGHT_THERMAL_FAULT_LED CPU2_DIE_TEMPERATURE_SENSOR -FSP_RIGHT_THERMAL_FAULT_LED CPU3_DIE_TEMPERATURE_SENSOR -FSP_RIGHT_THERMAL_FAULT_LED ZULU3_DIE_TEMPERATURE_SENSOR -FSP_RIGHT_THERMAL_FAULT_LED CPU4_DIE_TEMPERATURE_SENSOR -FSP_RIGHT_THERMAL_FAULT_LED ZULU4_DIE_TEMPERATURE_SENSOR -FSP_RIGHT_THERMAL_FAULT_LED CPU5_DIE_TEMPERATURE_SENSOR -FSP_RIGHT_THERMAL_FAULT_LED CPU6_DIE_TEMPERATURE_SENSOR -FSP_RIGHT_THERMAL_FAULT_LED ZULU6_DIE_TEMPERATURE_SENSOR -FSP_RIGHT_THERMAL_FAULT_LED CPU7_DIE_TEMPERATURE_SENSOR -FSP_RIGHT_THERMAL_FAULT_LED MB_AMB_TEMPERATURE_SENSOR -FSP_RIGHT_THERMAL_FAULT_LED CPU0_PRIM_FAN -FSP_RIGHT_THERMAL_FAULT_LED CPU1_PRIM_FAN -FSP_RIGHT_THERMAL_FAULT_LED CPU0_SEC_FAN -FSP_RIGHT_THERMAL_FAULT_LED CPU1_SEC_FAN -FSP_RIGHT_THERMAL_FAULT_LED IO_BRIDGE_PRIM_FAN -FSP_RIGHT_THERMAL_FAULT_LED IO_BRIDGE_SEC_FAN -FSP_DISK_FAULT_LED DISK0 -FSP_DISK_FAULT_LED DISK1 -FSP_DISK_FAULT_LED DISK2 -FSP_DISK_FAULT_LED DISK3 -FSP_DISK_FAULT_LED DISK4 -FSP_DISK_FAULT_LED DISK5 -FSP_DISK_FAULT_LED DISK6 -FSP_DISK_FAULT_LED DISK7 -FSP_DISK_FAULT_LED DISK8 -FSP_DISK_FAULT_LED DISK9 -FSP_DISK_FAULT_LED DISK10 -FSP_DISK_FAULT_LED DISK11 -PS0 PS0_FAN_FAIL_SENSOR -PS1 PS1_FAN_FAIL_SENSOR -PS2 PS2_FAN_FAIL_SENSOR -PS0 PS0_TEMP_FAIL_SENSOR -PS1 PS1_TEMP_FAIL_SENSOR -PS2 PS2_TEMP_FAIL_SENSOR -PS0 PS0_I_SHARE_FAIL_SENSOR -PS1 PS1_I_SHARE_FAIL_SENSOR -PS2 PS2_I_SHARE_FAIL_SENSOR -ASSOCIATION_END -ASSOCIATION PSVC_DEV_FAULT_LED -PS0 FSP_POWER_FAULT_LED -PS1 FSP_POWER_FAULT_LED -PS2 FSP_POWER_FAULT_LED -CPU0_PRIM_FAN CPU_PFAN_FLT_LED -CPU1_PRIM_FAN CPU_PFAN_FLT_LED -CPU0_SEC_FAN CPU_SFAN_FLT_LED -CPU1_SEC_FAN CPU_SFAN_FLT_LED -IO0_PRIM_FAN IO_PFAN_FLT_LED -IO1_PRIM_FAN IO_PFAN_FLT_LED -IO0_SEC_FAN IO_SFAN_FLT_LED -IO1_SEC_FAN IO_SFAN_FLT_LED -IO_BRIDGE_PRIM_FAN IO_BRIDGE_PFAN_FLT_LED -IO_BRIDGE_SEC_FAN IO_BRIDGE_SFAN_FLT_LED -DISK0 FSP_DISK_FAULT_LED -DISK1 FSP_DISK_FAULT_LED -DISK2 FSP_DISK_FAULT_LED -DISK3 FSP_DISK_FAULT_LED -DISK4 FSP_DISK_FAULT_LED -DISK5 FSP_DISK_FAULT_LED -DISK6 FSP_DISK_FAULT_LED -DISK7 FSP_DISK_FAULT_LED -DISK8 FSP_DISK_FAULT_LED -DISK9 FSP_DISK_FAULT_LED -DISK10 FSP_DISK_FAULT_LED -DISK11 FSP_DISK_FAULT_LED -ASSOCIATION_END -ASSOCIATION PSVC_PARENT -CPU0_PRIM_FAN CPU_PFAN_SLOT -CPU1_PRIM_FAN CPU_PFAN_SLOT -CPU0_SEC_FAN CPU_SFAN_SLOT -CPU1_SEC_FAN CPU_SFAN_SLOT -IO0_PRIM_FAN IO_PFAN_SLOT -IO1_PRIM_FAN IO_PFAN_SLOT -IO0_SEC_FAN IO_SFAN_SLOT -IO1_SEC_FAN IO_SFAN_SLOT -IO_BRIDGE_PRIM_FAN IO_BRIDGE_PFAN_SLOT -IO_BRIDGE_SEC_FAN IO_BRIDGE_SFAN_SLOT -CPU_PFAN_SLOT SYSTEM -CPU_SFAN_SLOT SYSTEM -IO_PFAN_SLOT SYSTEM -IO_SFAN_SLOT SYSTEM -IO_BRIDGE_PFAN_SLOT SYSTEM -IO_BRIDGE_SFAN_SLOT SYSTEM -CPU_PFAN_FLT_LED SYSTEM -CPU_SFAN_FLT_LED SYSTEM -IO_PFAN_FLT_LED SYSTEM -IO_SFAN_FLT_LED SYSTEM -IO_BRIDGE_PFAN_FLT_LED SYSTEM -IO_BRIDGE_SFAN_FLT_LED SYSTEM -CPU_PFAN_REMOVE_LED SYSTEM -CPU_SFAN_REMOVE_LED SYSTEM -IO_PFAN_REMOVE_LED SYSTEM -IO_SFAN_REMOVE_LED SYSTEM -IO_BRIDGE_PFAN_REMOVE_LED SYSTEM -IO_BRIDGE_SFAN_REMOVE_LED SYSTEM -CPU_PFAN_PR_SENSOR IO_BOARD -CPU_SFAN_PR_SENSOR IO_BOARD -IO_PFAN_PR_SENSOR IO_BOARD -IO_SFAN_PR_SENSOR IO_BOARD -IO_BRIDGE_PFAN_PR_SENSOR IO_BOARD -IO_BRIDGE_SFAN_PR_SENSOR IO_BOARD -CPU0_PFAN_TACH MOTHERBOARD -CPU1_PFAN_TACH MOTHERBOARD -CPU0_SFAN_TACH MOTHERBOARD -CPU1_SFAN_TACH MOTHERBOARD -IO0_PFAN_TACH IO_BOARD -IO1_PFAN_TACH IO_BOARD -IO0_SFAN_TACH IO_BOARD -IO1_SFAN_TACH IO_BOARD -IO_BRIDGE_PFAN_TACH MOTHERBOARD -IO_BRIDGE_SFAN_TACH MOTHERBOARD -CPU_PFAN_SPEED_CONTROL IO_BOARD -IO_PFAN_SPEED_CONTROL IO_BOARD -CPU_SFAN_ONOFF_SWITCH IO_BOARD -IO_PFAN_ONOFF_SWITCH MOTHERBOARD -IO_SFAN_ONOFF_SWITCH MOTHERBOARD -IO_BRIDGE_PFAN_ONOFF_SWITCH MOTHERBOARD -IO_BRIDGE_SFAN_ONOFF_SWITCH MOTHERBOARD -CPU_FAN_P_S_MON_SWITCH IO_BOARD -IO_FAN_P_S_MON_SWITCH IO_BOARD -PS0_SLOT PDB -PS1_SLOT PDB -PS2_SLOT PDB -PS0 PS0_SLOT -PS1 PS1_SLOT -PS2 PS2_SLOT -PS0_SENSOR_VALID_SWITCH PS0 -PS0_3_3V_I_SENSOR PS0 -PS0_5V_I_SENSOR PS0 -PS0_12V_I_SENSOR PS0 -PS0_48V_I_SENSOR PS0 -PS0_FAN_FAIL_SENSOR PS0 -PS0_TEMP_FAIL_SENSOR PS0 -PS0_I_SHARE_FAIL_SENSOR PS0 -PS0_PR_SENSOR IO_BOARD -PS1_SENSOR_VALID_SWITCH PS1 -PS1_3_3V_I_SENSOR PS1 -PS1_5V_I_SENSOR PS1 -PS1_12V_I_SENSOR PS1 -PS1_48V_I_SENSOR PS1 -PS1_FAN_FAIL_SENSOR PS1 -PS1_TEMP_FAIL_SENSOR PS1 -PS1_I_SHARE_FAIL_SENSOR PS1 -PS1_PR_SENSOR IO_BOARD -PS2_SENSOR_VALID_SWITCH PS2 -PS2_3_3V_I_SENSOR PS2 -PS2_5V_I_SENSOR PS2 -PS2_12V_I_SENSOR PS2 -PS2_48V_I_SENSOR PS2 -PS2_FAN_FAIL_SENSOR PS2 -PS2_TEMP_FAIL_SENSOR PS2 -PS2_I_SHARE_FAIL_SENSOR PS2 -PS2_PR_SENSOR IO_BOARD -CPU_0_2_MOD_CARD CPU_0_2_MOD_SLOT -CPU_1_3_MOD_CARD CPU_1_3_MOD_SLOT -ZULU_1_3_MOD_CARD CPU_1_3_MOD_SLOT -CPU_4_6_MOD_CARD CPU_4_6_MOD_SLOT -ZULU_4_6_MOD_CARD CPU_4_6_MOD_SLOT -CPU_5_7_MOD_CARD CPU_5_7_MOD_SLOT -CPU_0_2_MOD_SLOT MOTHERBOARD -CPU_1_3_MOD_SLOT MOTHERBOARD -CPU_4_6_MOD_SLOT MOTHERBOARD -CPU_5_7_MOD_SLOT MOTHERBOARD -CPU_0_2_MOD_FLT_LED SYSTEM -CPU_1_3_MOD_FLT_LED SYSTEM -CPU_4_6_MOD_FLT_LED SYSTEM -CPU_5_7_MOD_FLT_LED SYSTEM -CPU_0_2_MOD_REMOVE_LED SYSTEM -CPU_1_3_MOD_REMOVE_LED SYSTEM -CPU_4_6_MOD_REMOVE_LED SYSTEM -CPU_5_7_MOD_REMOVE_LED SYSTEM -CPU_0_2_MOD_PR_SENSOR MOTHERBOARD -CPU_1_3_MOD_PR_SENSOR MOTHERBOARD -CPU_4_6_MOD_PR_SENSOR MOTHERBOARD -CPU_5_7_MOD_PR_SENSOR MOTHERBOARD -CPU0_DIE_TEMPERATURE_SENSOR CPU_0_2_MOD_CARD -CPU1_DIE_TEMPERATURE_SENSOR CPU_1_3_MOD_CARD -ZULU1_DIE_TEMPERATURE_SENSOR ZULU_1_3_MOD_CARD -CPU2_DIE_TEMPERATURE_SENSOR CPU_0_2_MOD_CARD -CPU3_DIE_TEMPERATURE_SENSOR CPU_1_3_MOD_CARD -ZULU3_DIE_TEMPERATURE_SENSOR ZULU_1_3_MOD_CARD -CPU4_DIE_TEMPERATURE_SENSOR CPU_4_6_MOD_CARD -ZULU4_DIE_TEMPERATURE_SENSOR ZULU_4_6_MOD_CARD -CPU5_DIE_TEMPERATURE_SENSOR CPU_5_7_MOD_CARD -CPU6_DIE_TEMPERATURE_SENSOR CPU_4_6_MOD_CARD -ZULU6_DIE_TEMPERATURE_SENSOR ZULU_4_6_MOD_CARD -CPU7_DIE_TEMPERATURE_SENSOR CPU_5_7_MOD_CARD -MB_AMB_TEMPERATURE_SENSOR IO_BOARD -IOB_AMB_TEMPERATURE_SENSOR IO_BOARD -DISK_BP0_BOARD DISK_BP0_BOARD_SLOT -DISK_BP1_BOARD DISK_BP1_BOARD_SLOT -LOOP_B_0_BOARD_SLOT DISK_BP0_BOARD -LOOP_B_1_BOARD_SLOT DISK_BP1_BOARD -LOOP_B_0_BOARD LOOP_B_0_BOARD_SLOT -LOOP_B_1_BOARD LOOP_B_1_BOARD_SLOT -RSC_CARD RSC_SLOT -DISK_BP0_PR_SENSOR MOTHERBOARD -DISK_BP1_PR_SENSOR MOTHERBOARD -RSC_PR_SENSOR MOTHERBOARD -DBP0_AMB_TEMPERATURE_SENSOR DISK_BP0_BOARD -DBP1_AMB_TEMPERATURE_SENSOR DISK_BP1_BOARD -DISK0 DISK0_SLOT -DISK1 DISK1_SLOT -DISK2 DISK2_SLOT -DISK3 DISK3_SLOT -DISK4 DISK4_SLOT -DISK5 DISK5_SLOT -DISK6 DISK6_SLOT -DISK7 DISK7_SLOT -DISK8 DISK8_SLOT -DISK9 DISK9_SLOT -DISK10 DISK10_SLOT -DISK11 DISK11_SLOT -LOOP_B_0_BOARD_PR_SENSOR DISK_BP0_BOARD -LOOP_B_1_BOARD_PR_SENSOR DISK_BP1_BOARD -DISK0_PR_SENSOR DISK_BP0_BOARD -DISK1_PR_SENSOR DISK_BP0_BOARD -DISK2_PR_SENSOR DISK_BP0_BOARD -DISK3_PR_SENSOR DISK_BP0_BOARD -DISK4_PR_SENSOR DISK_BP0_BOARD -DISK5_PR_SENSOR DISK_BP0_BOARD -DISK6_PR_SENSOR DISK_BP1_BOARD -DISK7_PR_SENSOR DISK_BP1_BOARD -DISK8_PR_SENSOR DISK_BP1_BOARD -DISK9_PR_SENSOR DISK_BP1_BOARD -DISK10_PR_SENSOR DISK_BP1_BOARD -DISK11_PR_SENSOR DISK_BP1_BOARD -DISK0_SLOT DISK_BP0_BOARD -DISK1_SLOT DISK_BP0_BOARD -DISK2_SLOT DISK_BP0_BOARD -DISK3_SLOT DISK_BP0_BOARD -DISK4_SLOT DISK_BP0_BOARD -DISK5_SLOT DISK_BP0_BOARD -DISK6_SLOT DISK_BP1_BOARD -DISK7_SLOT DISK_BP1_BOARD -DISK8_SLOT DISK_BP1_BOARD -DISK9_SLOT DISK_BP1_BOARD -DISK10_SLOT DISK_BP1_BOARD -DISK11_SLOT DISK_BP1_BOARD -DISK0_FLT_LED DISK_BP0_BOARD -DISK1_FLT_LED DISK_BP0_BOARD -DISK2_FLT_LED DISK_BP0_BOARD -DISK3_FLT_LED DISK_BP0_BOARD -DISK4_FLT_LED DISK_BP0_BOARD -DISK5_FLT_LED DISK_BP0_BOARD -DISK6_FLT_LED DISK_BP1_BOARD -DISK7_FLT_LED DISK_BP1_BOARD -DISK8_FLT_LED DISK_BP1_BOARD -DISK9_FLT_LED DISK_BP1_BOARD -DISK10_FLT_LED DISK_BP1_BOARD -DISK11_FLT_LED DISK_BP1_BOARD -DISK0_REMOVE_LED DISK_BP0_BOARD -DISK1_REMOVE_LED DISK_BP0_BOARD -DISK2_REMOVE_LED DISK_BP0_BOARD -DISK3_REMOVE_LED DISK_BP0_BOARD -DISK4_REMOVE_LED DISK_BP0_BOARD -DISK5_REMOVE_LED DISK_BP0_BOARD -DISK6_REMOVE_LED DISK_BP1_BOARD -DISK7_REMOVE_LED DISK_BP1_BOARD -DISK8_REMOVE_LED DISK_BP1_BOARD -DISK9_REMOVE_LED DISK_BP1_BOARD -DISK10_REMOVE_LED DISK_BP1_BOARD -DISK11_REMOVE_LED DISK_BP1_BOARD -PCI0_CARD PCI0_SLOT -PCI1_CARD PCI1_SLOT -PCI2_CARD PCI2_SLOT -PCI3_CARD PCI3_SLOT -PCI4_CARD PCI4_SLOT -PCI5_CARD PCI5_SLOT -PCI6_CARD PCI6_SLOT -PCI7_CARD PCI7_SLOT -PCI8_CARD PCI8_SLOT -PCI0_SLOT IO_BOARD -PCI1_SLOT IO_BOARD -PCI2_SLOT IO_BOARD -PCI3_SLOT IO_BOARD -PCI4_SLOT IO_BOARD -PCI5_SLOT IO_BOARD -PCI6_SLOT IO_BOARD -PCI7_SLOT IO_BOARD -PCI8_SLOT IO_BOARD -PCI0_FLT_LED SYSTEM -PCI1_FLT_LED SYSTEM -PCI2_FLT_LED SYSTEM -PCI3_FLT_LED SYSTEM -PCI4_FLT_LED SYSTEM -PCI5_FLT_LED SYSTEM -PCI6_FLT_LED SYSTEM -PCI7_FLT_LED SYSTEM -PCI8_FLT_LED SYSTEM -PCI0_REMOVE_LED SYSTEM -PCI1_REMOVE_LED SYSTEM -PCI2_REMOVE_LED SYSTEM -PCI3_REMOVE_LED SYSTEM -PCI4_REMOVE_LED SYSTEM -PCI5_REMOVE_LED SYSTEM -PCI6_REMOVE_LED SYSTEM -PCI7_REMOVE_LED SYSTEM -PCI8_REMOVE_LED SYSTEM -PCI0_PR_SENSOR IO_BOARD -PCI1_PR_SENSOR IO_BOARD -PCI2_PR_SENSOR IO_BOARD -PCI3_PR_SENSOR IO_BOARD -PCI4_PR_SENSOR IO_BOARD -PCI5_PR_SENSOR IO_BOARD -PCI6_PR_SENSOR IO_BOARD -PCI7_PR_SENSOR IO_BOARD -PCI8_PR_SENSOR IO_BOARD -FSP_GEN_FAULT_LED FSP -FSP_REMOVE_LED FSP -FSP_DISK_FAULT_LED FSP -FSP_POWER_FAULT_LED FSP -FSP_LEFT_THERMAL_FAULT_LED FSP -FSP_RIGHT_THERMAL_FAULT_LED FSP -FSP_LEFT_DOOR_LED FSP -FSP_RIGHT_DOOR_LED FSP -KEYSWITCH FSP -FSP_KS_NORMAL_POS_SENSOR IO_BOARD -FSP_KS_DIAG_POS_SENSOR IO_BOARD -FSP_KS_LOCK_POS_SENSOR IO_BOARD -FSP_KS_OFF_POS_SENSOR IO_BOARD -FAN_BLAST_OFF_SWITCH IO_BOARD -DISK_BP0_BOARD_SLOT SYSTEM -DISK_BP1_BOARD_SLOT SYSTEM -RSC_SLOT SYSTEM -5V_ENABLE_SWITCH IO_BOARD -I2C_ENABLE_SWITCH IO_BOARD -FAN_BLAST_OFF_SWITCH IO_BOARD -MOTHERBOARD SYSTEM -IO_BOARD SYSTEM -PDB SYSTEM -FSP SYSTEM -24C64_A0_0 CPU_0_2_MOD_CARD -24C64_A2_0 CPU_0_2_MOD_CARD -24C64_A4_0 CPU_0_2_MOD_CARD -24C64_A6_0 CPU_0_2_MOD_CARD -24C64_A8_0 CPU_0_2_MOD_CARD -24C64_AA_0 CPU_0_2_MOD_CARD -24C64_AC_0 CPU_0_2_MOD_CARD -24C64_AE_0 CPU_0_2_MOD_CARD -24C64_A0_1 CPU_1_3_MOD_CARD -24C64_A2_1 CPU_1_3_MOD_CARD -24C64_A4_1 CPU_1_3_MOD_CARD -24C64_A6_1 CPU_1_3_MOD_CARD -24C64_A8_1 CPU_1_3_MOD_CARD -24C64_AA_1 CPU_1_3_MOD_CARD -24C64_AC_1 CPU_1_3_MOD_CARD -24C64_AE_1 CPU_1_3_MOD_CARD -24C64_A0_2 CPU_0_2_MOD_CARD -24C64_A2_2 CPU_0_2_MOD_CARD -24C64_A4_2 CPU_0_2_MOD_CARD -24C64_A6_2 CPU_0_2_MOD_CARD -24C64_A8_2 CPU_0_2_MOD_CARD -24C64_AA_2 CPU_0_2_MOD_CARD -24C64_AC_2 CPU_0_2_MOD_CARD -24C64_AE_2 CPU_0_2_MOD_CARD -24C64_A0_3 CPU_1_3_MOD_CARD -24C64_A2_3 CPU_1_3_MOD_CARD -24C64_A4_3 CPU_1_3_MOD_CARD -24C64_A6_3 CPU_1_3_MOD_CARD -24C64_A8_3 CPU_1_3_MOD_CARD -24C64_AA_3 CPU_1_3_MOD_CARD -24C64_AC_3 CPU_1_3_MOD_CARD -24C64_AE_3 CPU_1_3_MOD_CARD -24C64_A0_4 CPU_0_2_MOD_CARD -24C64_A2_4 CPU_1_3_MOD_CARD -24C64_A2_4 ZULU_1_3_MOD_CARD -24C64_A8_4 MOTHERBOARD -24C64_AA_4 IO_BOARD -SSC100_16_5 DISK_BP0_BOARD -SSC100_1A_5 LOOP_B_0_BOARD -SSC100_1C_5 DISK_BP1_BOARD -SSC100_1E_5 LOOP_B_1_BOARD -MAX1617_30_5 CPU_0_2_MOD_CARD -MAX1617_32_5 CPU_1_3_MOD_CARD -MAX1617_32_5 ZULU_1_3_MOD_CARD -MAX1617_34_5 CPU_0_2_MOD_CARD -PCF8574_70_5 PS0 -PCF8574_72_5 PS1 -PCF8574_74_5 PS2 -PCF8574_46_5 IO_BOARD -MAX1617_52_5 CPU_1_3_MOD_CARD -MAX1617_52_5 ZULU_1_3_MOD_CARD -MAX1617_54_5 CPU_4_6_MOD_CARD -MAX1617_54_5 ZULU_4_6_MOD_CARD -MAX1617_56_5 CPU_5_7_MOD_CARD -LTC1427_5A_5 IO_BOARD -LTC1427_5E_5 IO_BOARD -SSC050_80_5 MOTHERBOARD -SSC050_82_5 IO_BOARD -SSC050_88_5 DISK_BP0_BOARD -SSC050_8A_5 DISK_BP0_BOARD -SSC050_8C_5 DISK_BP1_BOARD -SSC050_8E_5 DISK_BP1_BOARD -PCF8591_90_5 PS0 -PCF8591_92_5 PS1 -PCF8591_94_5 PS2 -PCF8591_96_5 IO_BOARD -MAX1617_98_5 CPU_4_6_MOD_CARD -MAX1617_98_5 ZULU_4_6_MOD_CARD -MAX1617_9A_5 CPU_5_7_MOD_CARD -LM75_9C_5 DISK_BP0_BOARD -LM75_9E_5 DISK_BP1_BOARD -24C64_A0_5 PS0 -24C64_A2_5 PS1 -24C64_A4_5 PS2 -24C64_A6_5 RSC_CARD -24C64_A8_5 DISK_BP0_BOARD -24C64_AC_5 DISK_BP1_BOARD -24C64_AE_5 PDB -HPC3130_E2_5 IO_BOARD -HPC3130_E6_5 IO_BOARD -HPC3130_E8_5 IO_BOARD -HPC3130_EC_5 MOTHERBOARD -24C64_A0_6 CPU_4_6_MOD_CARD -24C64_A2_6 CPU_4_6_MOD_CARD -24C64_A4_6 CPU_4_6_MOD_CARD -24C64_A6_6 CPU_4_6_MOD_CARD -24C64_A8_6 CPU_4_6_MOD_CARD -24C64_AA_6 CPU_4_6_MOD_CARD -24C64_AC_6 CPU_4_6_MOD_CARD -24C64_AE_6 CPU_4_6_MOD_CARD -24C64_A0_7 CPU_5_7_MOD_CARD -24C64_A2_7 CPU_5_7_MOD_CARD -24C64_A4_7 CPU_5_7_MOD_CARD -24C64_A6_7 CPU_5_7_MOD_CARD -24C64_A8_7 CPU_5_7_MOD_CARD -24C64_AA_7 CPU_5_7_MOD_CARD -24C64_AC_7 CPU_5_7_MOD_CARD -24C64_AE_7 CPU_5_7_MOD_CARD -24C64_A0_8 CPU_4_6_MOD_CARD -24C64_A2_8 CPU_4_6_MOD_CARD -24C64_A4_8 CPU_4_6_MOD_CARD -24C64_A6_8 CPU_4_6_MOD_CARD -24C64_A8_8 CPU_4_6_MOD_CARD -24C64_AA_8 CPU_4_6_MOD_CARD -24C64_AC_8 CPU_4_6_MOD_CARD -24C64_AE_8 CPU_4_6_MOD_CARD -24C64_A0_9 CPU_5_7_MOD_CARD -24C64_A2_9 CPU_5_7_MOD_CARD -24C64_A4_9 CPU_5_7_MOD_CARD -24C64_A6_9 CPU_5_7_MOD_CARD -24C64_A8_9 CPU_5_7_MOD_CARD -24C64_AA_9 CPU_5_7_MOD_CARD -24C64_AC_9 CPU_5_7_MOD_CARD -24C64_AE_9 CPU_5_7_MOD_CARD -24C64_A4_10 CPU_4_6_MOD_CARD -24C64_A4_10 ZULU_4_6_MOD_CARD -24C64_A6_10 CPU_5_7_MOD_CARD -24C64_A0_11 MOTHERBOARD -24C64_A2_11 MOTHERBOARD -ASSOCIATION_END -ASSOCIATION PSVC_CPU -SYSTEM CPU_0_2_MOD_CARD -SYSTEM CPU_1_3_MOD_CARD -SYSTEM ZULU_1_3_MOD_CARD -SYSTEM CPU_4_6_MOD_CARD -SYSTEM ZULU_4_6_MOD_CARD -SYSTEM CPU_5_7_MOD_CARD -ASSOCIATION_END -ASSOCIATION PSVC_ALTERNATE -CPU0_PRIM_FAN CPU0_SEC_FAN -CPU1_PRIM_FAN CPU1_SEC_FAN -IO0_PRIM_FAN IO0_SEC_FAN -IO1_PRIM_FAN IO1_SEC_FAN -IO_BRIDGE_PRIM_FAN IO_BRIDGE_SEC_FAN -ASSOCIATION_END -ASSOCIATION PSVC_HOTPLUG_ENABLE_SWITCH -PS0 I2C_ENABLE_SWITCH -PS1 I2C_ENABLE_SWITCH -PS2 I2C_ENABLE_SWITCH -ASSOCIATION_END -ASSOCIATION PSVC_PS -SYSTEM PS0 -SYSTEM PS1 -SYSTEM PS2 -ASSOCIATION_END -ASSOCIATION PSVC_FAN -SYSTEM CPU0_PRIM_FAN -SYSTEM CPU1_PRIM_FAN -SYSTEM CPU0_SEC_FAN -SYSTEM CPU1_SEC_FAN -SYSTEM IO0_PRIM_FAN -SYSTEM IO1_PRIM_FAN -SYSTEM IO0_SEC_FAN -SYSTEM IO1_SEC_FAN -SYSTEM IO_BRIDGE_PRIM_FAN -SYSTEM IO_BRIDGE_SEC_FAN -ASSOCIATION_END -ASSOCIATION PSVC_TS -SYSTEM CPU0_DIE_TEMPERATURE_SENSOR -SYSTEM CPU1_DIE_TEMPERATURE_SENSOR -SYSTEM ZULU1_DIE_TEMPERATURE_SENSOR -SYSTEM CPU2_DIE_TEMPERATURE_SENSOR -SYSTEM CPU3_DIE_TEMPERATURE_SENSOR -SYSTEM ZULU3_DIE_TEMPERATURE_SENSOR -SYSTEM CPU4_DIE_TEMPERATURE_SENSOR -SYSTEM ZULU4_DIE_TEMPERATURE_SENSOR -SYSTEM CPU5_DIE_TEMPERATURE_SENSOR -SYSTEM CPU6_DIE_TEMPERATURE_SENSOR -SYSTEM ZULU6_DIE_TEMPERATURE_SENSOR -SYSTEM CPU7_DIE_TEMPERATURE_SENSOR -SYSTEM MB_AMB_TEMPERATURE_SENSOR -SYSTEM IOB_AMB_TEMPERATURE_SENSOR -SYSTEM DBP0_AMB_TEMPERATURE_SENSOR -SYSTEM DBP1_AMB_TEMPERATURE_SENSOR -ASSOCIATION_END -ASSOCIATION PSVC_DISK -SYSTEM DISK0 -SYSTEM DISK1 -SYSTEM DISK2 -SYSTEM DISK3 -SYSTEM DISK4 -SYSTEM DISK5 -SYSTEM DISK6 -SYSTEM DISK7 -SYSTEM DISK8 -SYSTEM DISK9 -SYSTEM DISK10 -SYSTEM DISK11 -ASSOCIATION_END -ASSOCIATION PSVC_LED -SYSTEM CPU_PFAN_FLT_LED -SYSTEM CPU_SFAN_FLT_LED -SYSTEM IO_PFAN_FLT_LED -SYSTEM IO_SFAN_FLT_LED -SYSTEM IO_BRIDGE_PFAN_FLT_LED -SYSTEM IO_BRIDGE_SFAN_FLT_LED -SYSTEM CPU_PFAN_REMOVE_LED -SYSTEM CPU_SFAN_REMOVE_LED -SYSTEM IO_PFAN_REMOVE_LED -SYSTEM IO_SFAN_REMOVE_LED -SYSTEM IO_BRIDGE_PFAN_REMOVE_LED -SYSTEM IO_BRIDGE_SFAN_REMOVE_LED -SYSTEM CPU_0_2_MOD_FLT_LED -SYSTEM CPU_1_3_MOD_FLT_LED -SYSTEM CPU_4_6_MOD_FLT_LED -SYSTEM CPU_5_7_MOD_FLT_LED -SYSTEM CPU_0_2_MOD_REMOVE_LED -SYSTEM CPU_1_3_MOD_REMOVE_LED -SYSTEM CPU_4_6_MOD_REMOVE_LED -SYSTEM CPU_5_7_MOD_REMOVE_LED -SYSTEM PCI0_FLT_LED -SYSTEM PCI1_FLT_LED -SYSTEM PCI2_FLT_LED -SYSTEM PCI3_FLT_LED -SYSTEM PCI4_FLT_LED -SYSTEM PCI5_FLT_LED -SYSTEM PCI6_FLT_LED -SYSTEM PCI7_FLT_LED -SYSTEM PCI8_FLT_LED -SYSTEM PCI0_REMOVE_LED -SYSTEM PCI1_REMOVE_LED -SYSTEM PCI2_REMOVE_LED -SYSTEM PCI3_REMOVE_LED -SYSTEM PCI4_REMOVE_LED -SYSTEM PCI5_REMOVE_LED -SYSTEM PCI6_REMOVE_LED -SYSTEM PCI7_REMOVE_LED -SYSTEM PCI8_REMOVE_LED -SYSTEM FSP_GEN_FAULT_LED -SYSTEM FSP_REMOVE_LED -SYSTEM FSP_DISK_FAULT_LED -SYSTEM FSP_POWER_FAULT_LED -SYSTEM FSP_LEFT_THERMAL_FAULT_LED -SYSTEM FSP_RIGHT_THERMAL_FAULT_LED -SYSTEM FSP_LEFT_DOOR_LED -SYSTEM FSP_RIGHT_DOOR_LED -SYSTEM DISK0_FLT_LED -SYSTEM DISK1_FLT_LED -SYSTEM DISK2_FLT_LED -SYSTEM DISK3_FLT_LED -SYSTEM DISK4_FLT_LED -SYSTEM DISK5_FLT_LED -SYSTEM DISK6_FLT_LED -SYSTEM DISK7_FLT_LED -SYSTEM DISK8_FLT_LED -SYSTEM DISK9_FLT_LED -SYSTEM DISK10_FLT_LED -SYSTEM DISK11_FLT_LED -SYSTEM DISK0_REMOVE_LED -SYSTEM DISK1_REMOVE_LED -SYSTEM DISK2_REMOVE_LED -SYSTEM DISK3_REMOVE_LED -SYSTEM DISK4_REMOVE_LED -SYSTEM DISK5_REMOVE_LED -SYSTEM DISK6_REMOVE_LED -SYSTEM DISK7_REMOVE_LED -SYSTEM DISK8_REMOVE_LED -SYSTEM DISK9_REMOVE_LED -SYSTEM DISK10_REMOVE_LED -SYSTEM DISK11_REMOVE_LED -ASSOCIATION_END -ASSOCIATION PSVC_FSP_LED -SYSTEM FSP_GEN_FAULT_LED -SYSTEM FSP_REMOVE_LED -SYSTEM FSP_DISK_FAULT_LED -SYSTEM FSP_POWER_FAULT_LED -SYSTEM FSP_LEFT_THERMAL_FAULT_LED -SYSTEM FSP_RIGHT_THERMAL_FAULT_LED -SYSTEM FSP_LEFT_DOOR_LED -SYSTEM FSP_RIGHT_DOOR_LED -ASSOCIATION_END -ASSOCIATION PSVC_KEYSWITCH -SYSTEM KEYSWITCH -FSP KEYSWITCH -ASSOCIATION_END -ASSOCIATION PSVC_PCI_CARD -SYSTEM PCI0_CARD -SYSTEM PCI1_CARD -SYSTEM PCI2_CARD -SYSTEM PCI3_CARD -SYSTEM PCI4_CARD -SYSTEM PCI5_CARD -SYSTEM PCI6_CARD -SYSTEM PCI7_CARD -SYSTEM PCI8_CARD -ASSOCIATION_END -ASSOCIATION PSVC_PHYSICAL_DEVICE -SYSTEM 24C64_A0_0 -SYSTEM 24C64_A2_0 -SYSTEM 24C64_A4_0 -SYSTEM 24C64_A6_0 -SYSTEM 24C64_A8_0 -SYSTEM 24C64_AA_0 -SYSTEM 24C64_AC_0 -SYSTEM 24C64_AE_0 -SYSTEM 24C64_A0_1 -SYSTEM 24C64_A2_1 -SYSTEM 24C64_A4_1 -SYSTEM 24C64_A6_1 -SYSTEM 24C64_A8_1 -SYSTEM 24C64_AA_1 -SYSTEM 24C64_AC_1 -SYSTEM 24C64_AE_1 -SYSTEM 24C64_A0_2 -SYSTEM 24C64_A2_2 -SYSTEM 24C64_A4_2 -SYSTEM 24C64_A6_2 -SYSTEM 24C64_A8_2 -SYSTEM 24C64_AA_2 -SYSTEM 24C64_AC_2 -SYSTEM 24C64_AE_2 -SYSTEM 24C64_A0_3 -SYSTEM 24C64_A2_3 -SYSTEM 24C64_A4_3 -SYSTEM 24C64_A6_3 -SYSTEM 24C64_A8_3 -SYSTEM 24C64_AA_3 -SYSTEM 24C64_AC_3 -SYSTEM 24C64_AE_3 -SYSTEM 24C64_A0_4 -SYSTEM 24C64_A2_4 -SYSTEM 24C64_A8_4 -SYSTEM 24C64_AA_4 -SYSTEM SSC100_16_5 -SYSTEM SSC100_1A_5 -SYSTEM SSC100_1C_5 -SYSTEM SSC100_1E_5 -SYSTEM MAX1617_30_5 -SYSTEM MAX1617_32_5 -SYSTEM MAX1617_34_5 -SYSTEM PCF8574_70_5 -SYSTEM PCF8574_72_5 -SYSTEM PCF8574_74_5 -SYSTEM PCF8574_46_5 -SYSTEM MAX1617_52_5 -SYSTEM MAX1617_54_5 -SYSTEM MAX1617_56_5 -SYSTEM LTC1427_5A_5 -SYSTEM LTC1427_5E_5 -SYSTEM SSC050_80_5 -SYSTEM SSC050_82_5 -SYSTEM SSC050_88_5 -SYSTEM SSC050_8A_5 -SYSTEM SSC050_8C_5 -SYSTEM SSC050_8E_5 -SYSTEM PCF8591_90_5 -SYSTEM PCF8591_92_5 -SYSTEM PCF8591_94_5 -SYSTEM PCF8591_96_5 -SYSTEM MAX1617_98_5 -SYSTEM MAX1617_9A_5 -SYSTEM LM75_9C_5 -SYSTEM LM75_9E_5 -SYSTEM 24C64_A0_5 -SYSTEM 24C64_A2_5 -SYSTEM 24C64_A4_5 -SYSTEM 24C64_A6_5 -SYSTEM 24C64_A8_5 -SYSTEM 24C64_AC_5 -SYSTEM 24C64_AE_5 -SYSTEM HPC3130_E2_5 -SYSTEM HPC3130_E6_5 -SYSTEM HPC3130_E8_5 -SYSTEM HPC3130_EC_5 -SYSTEM 24C64_A0_6 -SYSTEM 24C64_A2_6 -SYSTEM 24C64_A4_6 -SYSTEM 24C64_A6_6 -SYSTEM 24C64_A8_6 -SYSTEM 24C64_AA_6 -SYSTEM 24C64_AC_6 -SYSTEM 24C64_AE_6 -SYSTEM 24C64_A0_7 -SYSTEM 24C64_A2_7 -SYSTEM 24C64_A4_7 -SYSTEM 24C64_A6_7 -SYSTEM 24C64_A8_7 -SYSTEM 24C64_AA_7 -SYSTEM 24C64_AC_7 -SYSTEM 24C64_AE_7 -SYSTEM 24C64_A0_8 -SYSTEM 24C64_A2_8 -SYSTEM 24C64_A4_8 -SYSTEM 24C64_A6_8 -SYSTEM 24C64_A8_8 -SYSTEM 24C64_AA_8 -SYSTEM 24C64_AC_8 -SYSTEM 24C64_AE_8 -SYSTEM 24C64_A0_9 -SYSTEM 24C64_A2_9 -SYSTEM 24C64_A4_9 -SYSTEM 24C64_A6_9 -SYSTEM 24C64_A8_9 -SYSTEM 24C64_AA_9 -SYSTEM 24C64_AC_9 -SYSTEM 24C64_AE_9 -SYSTEM 24C64_A4_10 -SYSTEM 24C64_A6_10 -SYSTEM 24C64_A0_11 -SYSTEM 24C64_A2_11 -CPU_PFAN_FLT_LED SSC050_82_5 -CPU_SFAN_FLT_LED SSC050_82_5 -IO_PFAN_FLT_LED SSC050_82_5 -IO_SFAN_FLT_LED SSC050_82_5 -IO_BRIDGE_PFAN_FLT_LED SSC050_82_5 -IO_BRIDGE_SFAN_FLT_LED SSC050_82_5 -CPU_PFAN_REMOVE_LED PCF8574_46_5 -CPU_SFAN_REMOVE_LED PCF8574_46_5 -IO_PFAN_REMOVE_LED SSC050_80_5 -IO_SFAN_REMOVE_LED SSC050_80_5 -IO_BRIDGE_PFAN_REMOVE_LED PCF8574_46_5 -IO_BRIDGE_SFAN_REMOVE_LED PCF8574_46_5 -CPU_PFAN_PR_SENSOR SSC050_82_5 -CPU_SFAN_PR_SENSOR SSC050_82_5 -IO_PFAN_PR_SENSOR SSC050_82_5 -IO_SFAN_PR_SENSOR SSC050_82_5 -IO_BRIDGE_PFAN_PR_SENSOR SSC050_82_5 -IO_BRIDGE_SFAN_PR_SENSOR SSC050_82_5 -CPU0_PFAN_TACH SSC050_80_5 -CPU1_PFAN_TACH SSC050_80_5 -CPU0_SFAN_TACH SSC050_80_5 -CPU1_SFAN_TACH SSC050_80_5 -IO0_PFAN_TACH SSC050_82_5 -IO1_PFAN_TACH SSC050_82_5 -IO0_SFAN_TACH SSC050_82_5 -IO1_SFAN_TACH SSC050_82_5 -IO_BRIDGE_PFAN_TACH SSC050_80_5 -IO_BRIDGE_SFAN_TACH SSC050_80_5 -CPU_PFAN_SPEED_CONTROL LTC1427_5E_5 -IO_PFAN_SPEED_CONTROL LTC1427_5A_5 -CPU_SFAN_ONOFF_SWITCH SSC050_82_5 -IO_PFAN_ONOFF_SWITCH SSC050_82_5 -IO_SFAN_ONOFF_SWITCH SSC050_80_5 -IO_BRIDGE_PFAN_ONOFF_SWITCH SSC050_80_5 -IO_BRIDGE_SFAN_ONOFF_SWITCH SSC050_80_5 -CPU_FAN_P_S_MON_SWITCH SSC050_82_5 -IO_FAN_P_S_MON_SWITCH SSC050_82_5 -5V_ENABLE_SWITCH PCF8574_46_5 -I2C_ENABLE_SWITCH PCF8574_46_5 -PS0 PCF8591_90_5 -PS0 PCF8574_70_5 -PS0 24C64_A0_5 -PS0_3_3V_I_SENSOR PCF8591_90_5 -PS0_5V_I_SENSOR PCF8591_90_5 -PS0_12V_I_SENSOR PCF8591_90_5 -PS0_48V_I_SENSOR PCF8591_90_5 -PS0_SENSOR_VALID_SWITCH PCF8574_70_5 -PS0_FAN_FAIL_SENSOR PCF8574_70_5 -PS0_TEMP_FAIL_SENSOR PCF8574_70_5 -PS0_I_SHARE_FAIL_SENSOR PCF8574_70_5 -PS0_PR_SENSOR SSC050_82_5 -PS1 PCF8591_92_5 -PS1 PCF8574_72_5 -PS1 24C64_A2_5 -PS1_3_3V_I_SENSOR PCF8591_92_5 -PS1_5V_I_SENSOR PCF8591_92_5 -PS1_12V_I_SENSOR PCF8591_92_5 -PS1_48V_I_SENSOR PCF8591_92_5 -PS1_SENSOR_VALID_SWITCH PCF8574_72_5 -PS1_FAN_FAIL_SENSOR PCF8574_72_5 -PS1_TEMP_FAIL_SENSOR PCF8574_72_5 -PS1_I_SHARE_FAIL_SENSOR PCF8574_72_5 -PS1_PR_SENSOR SSC050_82_5 -PS2 PCF8591_94_5 -PS2 PCF8574_74_5 -PS2 24C64_A4_5 -PS2_3_3V_I_SENSOR PCF8591_94_5 -PS2_5V_I_SENSOR PCF8591_94_5 -PS2_12V_I_SENSOR PCF8591_94_5 -PS2_48V_I_SENSOR PCF8591_94_5 -PS2_SENSOR_VALID_SWITCH PCF8574_74_5 -PS2_FAN_FAIL_SENSOR PCF8574_74_5 -PS2_TEMP_FAIL_SENSOR PCF8574_74_5 -PS2_I_SHARE_FAIL_SENSOR PCF8574_74_5 -PS2_PR_SENSOR SSC050_82_5 -CPU_0_2_MOD_FLT_LED HPC3130_EC_5 -CPU_1_3_MOD_FLT_LED HPC3130_EC_5 -CPU_4_6_MOD_FLT_LED HPC3130_EC_5 -CPU_5_7_MOD_FLT_LED HPC3130_EC_5 -CPU_0_2_MOD_REMOVE_LED HPC3130_EC_5 -CPU_1_3_MOD_REMOVE_LED HPC3130_EC_5 -CPU_4_6_MOD_REMOVE_LED HPC3130_EC_5 -CPU_5_7_MOD_REMOVE_LED HPC3130_EC_5 -CPU_0_2_MOD_PR_SENSOR HPC3130_EC_5 -CPU_1_3_MOD_PR_SENSOR HPC3130_EC_5 -CPU_4_6_MOD_PR_SENSOR HPC3130_EC_5 -CPU_5_7_MOD_PR_SENSOR HPC3130_EC_5 -CPU0_DIE_TEMPERATURE_SENSOR MAX1617_30_5 -CPU1_DIE_TEMPERATURE_SENSOR MAX1617_32_5 -ZULU1_DIE_TEMPERATURE_SENSOR MAX1617_32_5 -CPU2_DIE_TEMPERATURE_SENSOR MAX1617_34_5 -CPU3_DIE_TEMPERATURE_SENSOR MAX1617_52_5 -ZULU3_DIE_TEMPERATURE_SENSOR MAX1617_52_5 -CPU4_DIE_TEMPERATURE_SENSOR MAX1617_54_5 -ZULU4_DIE_TEMPERATURE_SENSOR MAX1617_54_5 -CPU5_DIE_TEMPERATURE_SENSOR MAX1617_56_5 -CPU6_DIE_TEMPERATURE_SENSOR MAX1617_98_5 -ZULU6_DIE_TEMPERATURE_SENSOR MAX1617_98_5 -CPU7_DIE_TEMPERATURE_SENSOR MAX1617_9A_5 -MB_AMB_TEMPERATURE_SENSOR PCF8591_96_5 -IOB_AMB_TEMPERATURE_SENSOR PCF8591_96_5 -DBP0_AMB_TEMPERATURE_SENSOR LM75_9C_5 -DBP1_AMB_TEMPERATURE_SENSOR LM75_9E_5 -PCI0_FLT_LED HPC3130_E6_5 -PCI1_FLT_LED HPC3130_E6_5 -PCI2_FLT_LED HPC3130_E6_5 -PCI3_FLT_LED HPC3130_E6_5 -PCI4_FLT_LED HPC3130_E8_5 -PCI5_FLT_LED HPC3130_E8_5 -PCI6_FLT_LED HPC3130_E8_5 -PCI7_FLT_LED HPC3130_E2_5 -PCI8_FLT_LED HPC3130_E2_5 -PCI0_REMOVE_LED HPC3130_E6_5 -PCI1_REMOVE_LED HPC3130_E6_5 -PCI2_REMOVE_LED HPC3130_E6_5 -PCI3_REMOVE_LED HPC3130_E6_5 -PCI4_REMOVE_LED HPC3130_E8_5 -PCI5_REMOVE_LED HPC3130_E8_5 -PCI6_REMOVE_LED HPC3130_E8_5 -PCI7_REMOVE_LED HPC3130_E2_5 -PCI8_REMOVE_LED HPC3130_E2_5 -PCI0_PR_SENSOR HPC3130_E6_5 -PCI1_PR_SENSOR HPC3130_E6_5 -PCI2_PR_SENSOR HPC3130_E6_5 -PCI3_PR_SENSOR HPC3130_E6_5 -PCI4_PR_SENSOR HPC3130_E8_5 -PCI5_PR_SENSOR HPC3130_E8_5 -PCI6_PR_SENSOR HPC3130_E8_5 -PCI7_PR_SENSOR HPC3130_E2_5 -PCI8_PR_SENSOR HPC3130_E2_5 -FSP_GEN_FAULT_LED SSC050_82_5 -FSP_REMOVE_LED SSC050_82_5 -FSP_DISK_FAULT_LED SSC050_82_5 -FSP_POWER_FAULT_LED SSC050_82_5 -FSP_LEFT_THERMAL_FAULT_LED SSC050_82_5 -FSP_RIGHT_THERMAL_FAULT_LED SSC050_82_5 -FSP_LEFT_DOOR_LED SSC050_82_5 -FSP_RIGHT_DOOR_LED SSC050_82_5 -FSP_KS_NORMAL_POS_SENSOR SSC050_82_5 -FSP_KS_DIAG_POS_SENSOR SSC050_82_5 -FSP_KS_LOCK_POS_SENSOR SSC050_82_5 -FSP_KS_OFF_POS_SENSOR SSC050_82_5 -FAN_BLAST_OFF_SWITCH SSC050_82_5 -DISK_BP0_PR_SENSOR SSC050_80_5 -DISK_BP1_PR_SENSOR SSC050_80_5 -RSC_PR_SENSOR SSC050_82_5 -LOOP_B_0_BOARD_PR_SENSOR SSC050_88_5 -LOOP_B_1_BOARD_PR_SENSOR SSC050_8C_5 -DISK0_FLT_LED SSC050_8A_5 -DISK1_FLT_LED SSC050_8A_5 -DISK2_FLT_LED SSC050_8A_5 -DISK3_FLT_LED SSC050_8A_5 -DISK4_FLT_LED SSC050_8A_5 -DISK5_FLT_LED SSC050_8A_5 -DISK6_FLT_LED SSC050_8E_5 -DISK7_FLT_LED SSC050_8E_5 -DISK8_FLT_LED SSC050_8E_5 -DISK9_FLT_LED SSC050_8E_5 -DISK10_FLT_LED SSC050_8E_5 -DISK11_FLT_LED SSC050_8E_5 -DISK0_REMOVE_LED SSC050_8A_5 -DISK1_REMOVE_LED SSC050_8A_5 -DISK2_REMOVE_LED SSC050_8A_5 -DISK3_REMOVE_LED SSC050_8A_5 -DISK4_REMOVE_LED SSC050_8A_5 -DISK5_REMOVE_LED SSC050_8A_5 -DISK6_REMOVE_LED SSC050_8E_5 -DISK7_REMOVE_LED SSC050_8E_5 -DISK8_REMOVE_LED SSC050_8E_5 -DISK9_REMOVE_LED SSC050_8E_5 -DISK10_REMOVE_LED SSC050_8E_5 -DISK11_REMOVE_LED SSC050_8E_5 -DISK0_PR_SENSOR SSC050_88_5 -DISK1_PR_SENSOR SSC050_88_5 -DISK2_PR_SENSOR SSC050_88_5 -DISK3_PR_SENSOR SSC050_88_5 -DISK4_PR_SENSOR SSC050_88_5 -DISK5_PR_SENSOR SSC050_88_5 -DISK6_PR_SENSOR SSC050_8C_5 -DISK7_PR_SENSOR SSC050_8C_5 -DISK8_PR_SENSOR SSC050_8C_5 -DISK9_PR_SENSOR SSC050_8C_5 -DISK10_PR_SENSOR SSC050_8C_5 -DISK11_PR_SENSOR SSC050_8C_5 -ASSOCIATION_END -ASSOCIATION PSVC_FRU -CPU0_DIE_TEMPERATURE_SENSOR 24C64_A0_4 -CPU1_DIE_TEMPERATURE_SENSOR 24C64_A2_4 -ZULU1_DIE_TEMPERATURE_SENSOR 24C64_A2_4 -CPU2_DIE_TEMPERATURE_SENSOR 24C64_A0_4 -CPU3_DIE_TEMPERATURE_SENSOR 24C64_A2_4 -ZULU3_DIE_TEMPERATURE_SENSOR 24C64_A2_4 -CPU4_DIE_TEMPERATURE_SENSOR 24C64_A4_10 -ZULU4_DIE_TEMPERATURE_SENSOR 24C64_A4_10 -CPU5_DIE_TEMPERATURE_SENSOR 24C64_A6_10 -CPU6_DIE_TEMPERATURE_SENSOR 24C64_A4_10 -ZULU6_DIE_TEMPERATURE_SENSOR 24C64_A4_10 -CPU7_DIE_TEMPERATURE_SENSOR 24C64_A6_10 -IOB_AMB_TEMPERATURE_SENSOR 24C64_AA_4 -DBP0_AMB_TEMPERATURE_SENSOR 24C64_A8_5 -DBP1_AMB_TEMPERATURE_SENSOR 24C64_AC_5 -MB_AMB_TEMPERATURE_SENSOR 24C64_A8_4 -CPU_1_3_MOD_CARD 24C64_A2_4 -ZULU_1_3_MOD_CARD 24C64_A2_4 -CPU_4_6_MOD_CARD 24C64_A4_10 -ZULU_4_6_MOD_CARD 24C64_A4_10 -ASSOCIATION_END -ASSOCIATIONS_END - -DEVPATHS -0 0 0xA0 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a0:fru -0 0 0xA2 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a2:fru -0 0 0xA4 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a4:fru -0 0 0xA6 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a6:fru -0 0 0xA8 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a8:fru -0 0 0xAA 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,aa:fru -0 0 0xAC 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,ac:fru -0 0 0xAE 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,ae:fru -0 1 0xA0 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a0:fru -0 1 0xA2 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a2:fru -0 1 0xA4 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a4:fru -0 1 0xA6 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a6:fru -0 1 0xA8 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a8:fru -0 1 0xAA 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,aa:fru -0 1 0xAC 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,ac:fru -0 1 0xAE 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,ae:fru -0 2 0xA0 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a0:fru -0 2 0xA2 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a2:fru -0 2 0xA4 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a4:fru -0 2 0xA6 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a6:fru -0 2 0xA8 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a8:fru -0 2 0xAA 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,aa:fru -0 2 0xAC 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,ac:fru -0 2 0xAE 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,ae:fru -0 3 0xA0 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a0:fru -0 3 0xA2 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a2:fru -0 3 0xA4 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a4:fru -0 3 0xA6 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a6:fru -0 3 0xA8 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a8:fru -0 3 0xAA 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,aa:fru -0 3 0xAC 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,ac:fru -0 3 0xAE 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,ae:fru -0 4 0xA0 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@4,a0:fru -0 4 0xA2 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@4,a2:fru -0 4 0xA8 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@4,a8:fru -0 4 0xAA 0 /devices/pci@9,700000/ebus@1/i2c@1,2e/fru@4,aa:fru -1 0 0x16 0 /devices/pci@9,700000/ebus@1/i2c@1,30/controller@0,16:ssc100 -1 0 0x1A 0 /devices/pci@9,700000/ebus@1/i2c@1,30/controller@0,1a:ssc100 -1 0 0x1C 0 /devices/pci@9,700000/ebus@1/i2c@1,30/controller@0,1c:ssc100 -1 0 0x1E 0 /devices/pci@9,700000/ebus@1/i2c@1,30/controller@0,1e:ssc100 -1 0 0x30 0 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,30:amb_temp -1 0 0x30 1 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,30:die_temp -1 0 0x32 0 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,32:amb_temp -1 0 0x32 1 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,32:die_temp -1 0 0x34 0 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,34:amb_temp -1 0 0x34 1 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,34:die_temp -1 0 0x52 0 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,52:amb_temp -1 0 0x52 1 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,52:die_temp -1 0 0x54 0 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,54:amb_temp -1 0 0x54 1 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,54:die_temp -1 0 0x56 0 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,56:amb_temp -1 0 0x56 1 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,56:die_temp -1 0 0x98 0 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,98:amb_temp -1 0 0x98 1 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,98:die_temp -1 0 0x9a 0 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,9a:amb_temp -1 0 0x9a 1 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature@0,9a:die_temp -1 0 0x70 0 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,70:pcf8574 -1 0 0x72 0 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,72:pcf8574 -1 0 0x74 0 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,74:pcf8574 -1 0 0x46 0 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,46:pcf8574 -1 0 0x5a 0 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,5a:ltc1427 -1 0 0x5e 0 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,5e:ltc1427 -1 0 0x80 0 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,80:port_0 -1 0 0x80 1 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,80:port_1 -1 0 0x80 2 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,80:port_2 -1 0 0x80 3 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,80:port_3 -1 0 0x80 4 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,80:port_4 -1 0 0x82 0 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,82:port_0 -1 0 0x82 1 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,82:port_1 -1 0 0x82 2 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,82:port_2 -1 0 0x82 3 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,82:port_3 -1 0 0x82 4 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,82:port_4 -1 0 0x88 0 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,88:port_0 -1 0 0x88 1 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,88:port_1 -1 0 0x88 2 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,88:port_2 -1 0 0x88 3 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,88:port_3 -1 0 0x88 4 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,88:port_4 -1 0 0x8a 0 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,8a:port_0 -1 0 0x8a 1 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,8a:port_1 -1 0 0x8a 2 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,8a:port_2 -1 0 0x8a 3 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,8a:port_3 -1 0 0x8a 4 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,8a:port_4 -1 0 0x8c 0 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,8c:port_0 -1 0 0x8c 1 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,8c:port_1 -1 0 0x8c 2 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,8c:port_2 -1 0 0x8c 3 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,8c:port_3 -1 0 0x8c 4 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,8c:port_4 -1 0 0x8e 0 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,8e:port_0 -1 0 0x8e 1 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,8e:port_1 -1 0 0x8e 2 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,8e:port_2 -1 0 0x8e 3 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,8e:port_3 -1 0 0x8e 4 /devices/pci@9,700000/ebus@1/i2c@1,30/ioexp@0,8e:port_4 -1 0 0x90 0 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,90:port_0 -1 0 0x90 1 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,90:port_1 -1 0 0x90 2 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,90:port_2 -1 0 0x90 3 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,90:port_3 -1 0 0x92 0 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,92:port_0 -1 0 0x92 1 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,92:port_1 -1 0 0x92 2 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,92:port_2 -1 0 0x92 3 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,92:port_3 -1 0 0x94 0 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,94:port_0 -1 0 0x94 1 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,94:port_1 -1 0 0x94 2 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,94:port_2 -1 0 0x94 3 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,94:port_3 -1 0 0x96 0 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,96:port_0 -1 0 0x96 1 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,96:port_1 -1 0 0x96 2 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,96:port_2 -1 0 0x96 3 /devices/pci@9,700000/ebus@1/i2c@1,30/adio@0,96:port_3 -1 0 0x9c 0 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature-sensor@0,9c:lm75 -1 0 0x9e 0 /devices/pci@9,700000/ebus@1/i2c@1,30/temperature-sensor@0,9e:lm75 -1 0 0xA0 0 /devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,a0:fru -1 0 0xA2 0 /devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,a2:fru -1 0 0xA4 0 /devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,a4:fru -1 0 0xA6 0 /devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,a6:fru -1 0 0xA8 0 /devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,a8:fru -1 0 0xAA 0 /devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,aa:fru -1 0 0xAC 0 /devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,ac:fru -1 0 0xAE 0 /devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,ae:fru -1 0 0xe2 0 /devices/pci@9,700000/ebus@1/i2c@1,30/hotplug-controller@0,e2:port_0 -1 0 0xe2 1 /devices/pci@9,700000/ebus@1/i2c@1,30/hotplug-controller@0,e2:port_1 -1 0 0xe2 2 /devices/pci@9,700000/ebus@1/i2c@1,30/hotplug-controller@0,e2:port_2 -1 0 0xe2 3 /devices/pci@9,700000/ebus@1/i2c@1,30/hotplug-controller@0,e2:port_3 -1 0 0xe6 0 /devices/pci@9,700000/ebus@1/i2c@1,30/hotplug-controller@0,e6:port_0 -1 0 0xe6 1 /devices/pci@9,700000/ebus@1/i2c@1,30/hotplug-controller@0,e6:port_1 -1 0 0xe6 2 /devices/pci@9,700000/ebus@1/i2c@1,30/hotplug-controller@0,e6:port_2 -1 0 0xe6 3 /devices/pci@9,700000/ebus@1/i2c@1,30/hotplug-controller@0,e6:port_3 -1 0 0xe8 0 /devices/pci@9,700000/ebus@1/i2c@1,30/hotplug-controller@0,e8:port_0 -1 0 0xe8 1 /devices/pci@9,700000/ebus@1/i2c@1,30/hotplug-controller@0,e8:port_1 -1 0 0xe8 2 /devices/pci@9,700000/ebus@1/i2c@1,30/hotplug-controller@0,e8:port_2 -1 0 0xe8 3 /devices/pci@9,700000/ebus@1/i2c@1,30/hotplug-controller@0,e8:port_3 -1 0 0xec 0 /devices/pci@9,700000/ebus@1/i2c@1,30/hotplug-controller@0,ec:port_0 -1 0 0xec 1 /devices/pci@9,700000/ebus@1/i2c@1,30/hotplug-controller@0,ec:port_1 -1 0 0xec 2 /devices/pci@9,700000/ebus@1/i2c@1,30/hotplug-controller@0,ec:port_2 -1 0 0xec 3 /devices/pci@9,700000/ebus@1/i2c@1,30/hotplug-controller@0,ec:port_3 -2 0 0xA0 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,a0:fru -2 0 0xA2 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,a2:fru -2 0 0xA4 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,a4:fru -2 0 0xA6 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,a6:fru -2 0 0xA8 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,a8:fru -2 0 0xAA 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,aa:fru -2 0 0xAC 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,ac:fru -2 0 0xAE 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,ae:fru -2 1 0xA0 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,a0:fru -2 1 0xA2 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,a2:fru -2 1 0xA4 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,a4:fru -2 1 0xA6 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,a6:fru -2 1 0xA8 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,a8:fru -2 1 0xAA 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,aa:fru -2 1 0xAC 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,ac:fru -2 1 0xAE 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,ae:fru -2 2 0xA0 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,a0:fru -2 2 0xA2 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,a2:fru -2 2 0xA4 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,a4:fru -2 2 0xA6 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,a6:fru -2 2 0xA8 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,a8:fru -2 2 0xAA 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,aa:fru -2 2 0xAC 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,ac:fru -2 2 0xAE 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,ae:fru -2 3 0xA0 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,a0:fru -2 3 0xA2 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,a2:fru -2 3 0xA4 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,a4:fru -2 3 0xA6 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,a6:fru -2 3 0xA8 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,a8:fru -2 3 0xAA 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,aa:fru -2 3 0xAC 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,ac:fru -2 3 0xAE 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,ae:fru -2 4 0xA4 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@4,a4:fru -2 4 0xA6 0 /devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@4,a6:fru -3 0 0xA0 0 /devices/pci@9,700000/ebus@1/i2c@1,500030/nvram@0,a0:nvram -3 0 0xA2 0 /devices/pci@9,700000/ebus@1/i2c@1,500030/nvram@0,a2:nvram -DEVPATHS_END - -TABLES -TABLE -TEMP_SENSOR_CONVERSIONS 2 -160 160 160 160 160 160 160 160 -160 160 160 160 160 160 159 156 -153 150 147 145 143 140 138 136 -134 133 131 129 128 126 125 123 -122 120 119 118 117 115 114 113 -112 111 110 109 108 107 106 105 -104 103 103 102 101 100 99 98 -98 97 96 95 95 94 93 93 -92 91 91 90 89 89 88 87 -87 86 85 85 84 84 83 83 -82 81 81 80 80 79 79 78 -78 77 77 76 76 75 74 74 -74 73 73 72 72 71 71 70 -70 69 69 68 68 67 67 66 -66 65 65 65 64 64 63 63 -62 62 61 61 61 60 60 59 -59 58 58 58 57 57 56 56 -55 55 55 54 54 53 53 53 -52 52 51 51 50 50 50 49 -49 48 48 47 47 47 46 46 -45 45 44 44 44 43 43 42 -42 41 41 41 40 40 39 39 -38 38 37 37 37 36 36 35 -35 34 34 33 33 32 32 31 -31 30 30 29 29 28 28 27 -27 26 26 25 25 24 24 23 -22 22 21 21 20 20 19 18 -18 17 16 16 15 14 14 13 -12 11 11 10 9 8 7 6 - 5 4 3 2 1 0 -1 -2 --3 -5 -6 -7 -9 -11 -12 -14 --17 -19 -22 -25 -28 -33 -39 -50 -TABLE_END -TABLE -3_3V_I_CONVERSIONS 2 -0 0 0 0 1 1 1 1 -1 1 1 2 2 2 2 2 -2 2 3 3 3 3 3 3 -3 4 4 4 4 4 4 4 -5 5 5 5 5 5 5 6 -6 6 6 6 6 6 6 7 -7 7 7 7 7 7 8 8 -8 8 8 8 8 9 9 9 -9 9 9 9 10 10 10 10 -10 10 10 11 11 11 11 11 -11 11 12 12 12 12 12 12 -12 13 13 13 13 13 13 13 -14 14 14 14 14 14 14 15 -15 15 15 15 15 15 16 16 -16 16 16 16 16 17 17 17 -17 17 17 17 18 18 18 18 -18 18 18 18 19 19 19 19 -19 19 19 20 20 20 20 20 -20 20 21 21 21 21 21 21 -21 22 22 22 22 22 22 22 -23 23 23 23 23 23 23 24 -24 24 24 24 24 24 25 25 -25 25 25 25 25 26 26 26 -26 26 26 26 27 27 27 27 -27 27 27 28 28 28 28 28 -28 28 29 29 29 29 29 29 -29 30 30 30 30 30 30 30 -30 31 31 31 31 31 31 31 -32 32 32 32 32 32 32 33 -33 33 33 33 33 33 34 34 -34 34 34 34 34 35 35 35 -35 35 35 35 36 36 36 36 -36 -TABLE_END -TABLE -5V_I_CONVERSIONS 2 -0 0 0 0 0 1 1 1 -1 1 1 1 1 1 2 2 -2 2 2 2 2 2 2 3 -3 3 3 3 3 3 3 3 -4 4 4 4 4 4 4 4 -4 5 5 5 5 5 5 5 -5 5 5 6 6 6 6 6 -6 6 6 6 7 7 7 7 -7 7 7 7 7 8 8 8 -8 8 8 8 8 8 9 9 -9 9 9 9 9 9 9 10 -10 10 10 10 10 10 10 10 -11 11 11 11 11 11 11 11 -11 12 12 12 12 12 12 12 -12 12 13 13 13 13 13 13 -13 13 13 14 14 14 14 14 -14 14 14 14 14 15 15 15 -15 15 15 15 15 15 16 16 -16 16 16 16 16 16 16 17 -17 17 17 17 17 17 17 17 -18 18 18 18 18 18 18 18 -18 19 19 19 19 19 19 19 -19 19 20 20 20 20 20 20 -20 20 20 21 21 21 21 21 -21 21 21 21 22 22 22 22 -22 22 22 22 22 23 23 23 -23 23 23 23 23 23 23 24 -24 24 24 24 24 24 24 24 -25 25 25 25 25 25 25 25 -25 26 26 26 26 26 26 26 -26 26 27 27 27 27 27 27 -27 27 27 28 28 28 28 28 -28 -TABLE_END -TABLE -12V_I_CONVERSIONS 2 -0 0 0 0 0 0 0 1 -1 1 1 1 1 1 1 1 -1 1 1 2 2 2 2 2 -2 2 2 2 2 2 2 2 -3 3 3 3 3 3 3 3 -3 3 3 3 4 4 4 4 -4 4 4 4 4 4 4 4 -5 5 5 5 5 5 5 5 -5 5 5 5 5 6 6 6 -6 6 6 6 6 6 6 6 -6 7 7 7 7 7 7 7 -7 7 7 7 7 7 8 8 -8 8 8 8 8 8 8 8 -8 8 9 9 9 9 9 9 -9 9 9 9 9 9 9 10 -10 10 10 10 10 10 10 10 -10 10 10 11 11 11 11 11 -11 11 11 11 11 11 11 11 -12 12 12 12 12 12 12 12 -12 12 12 12 13 13 13 13 -13 13 13 13 13 13 13 13 -14 14 14 14 14 14 14 14 -14 14 14 14 14 15 15 15 -15 15 15 15 15 15 15 15 -15 16 16 16 16 16 16 16 -16 16 16 16 16 16 17 17 -17 17 17 17 17 17 17 17 -17 17 18 18 18 18 18 18 -18 18 18 18 18 18 18 19 -19 19 19 19 19 19 19 19 -19 19 19 20 20 20 20 20 -20 20 20 20 20 20 20 20 -20 -TABLE_END -TABLE -48V_I_CONVERSIONS 2 -0 0 0 0 0 0 1 1 -1 1 1 1 1 1 1 1 -2 2 2 2 2 2 2 2 -2 2 3 3 3 3 3 3 -3 3 3 3 4 4 4 4 -4 4 4 4 4 4 5 5 -5 5 5 5 5 5 5 5 -5 6 6 6 6 6 6 6 -6 6 6 7 7 7 7 7 -7 7 7 7 7 8 8 8 -8 8 8 8 8 8 8 9 -9 9 9 9 9 9 9 9 -9 10 10 10 10 10 10 10 -10 10 10 10 11 11 11 11 -11 11 11 11 11 11 12 12 -12 12 12 12 12 12 12 12 -13 13 13 13 13 13 13 13 -13 13 14 14 14 14 14 14 -14 14 14 14 15 15 15 15 -15 15 15 15 15 15 15 16 -16 16 16 16 16 16 16 16 -16 17 17 17 17 17 17 17 -17 17 17 18 18 18 18 18 -18 18 18 18 18 19 19 19 -19 19 19 19 19 19 19 20 -20 20 20 20 20 20 20 20 -20 20 21 21 21 21 21 21 -21 21 21 21 22 22 22 22 -22 22 22 22 22 22 23 23 -23 23 23 23 23 23 23 23 -24 24 24 24 24 24 24 24 -24 24 25 25 25 25 25 25 -24 -TABLE_END -TABLES_END - -PROJECTED_PROPERTIES -CPU_0_2_MOD_CARD Temperature0 CPU0_DIE_TEMPERATURE_SENSOR Temperature -CPU_0_2_MOD_CARD Temperature1 CPU2_DIE_TEMPERATURE_SENSOR Temperature -CPU_1_3_MOD_CARD Temperature0 CPU1_DIE_TEMPERATURE_SENSOR Temperature -ZULU_1_3_MOD_CARD Temperature0 ZULU1_DIE_TEMPERATURE_SENSOR Temperature -CPU_1_3_MOD_CARD Temperature1 CPU3_DIE_TEMPERATURE_SENSOR Temperature -ZULU_1_3_MOD_CARD Temperature1 ZULU3_DIE_TEMPERATURE_SENSOR Temperature -CPU_4_6_MOD_CARD Temperature0 CPU4_DIE_TEMPERATURE_SENSOR Temperature -ZULU_4_6_MOD_CARD Temperature0 ZULU4_DIE_TEMPERATURE_SENSOR Temperature -CPU_4_6_MOD_CARD Temperature1 CPU6_DIE_TEMPERATURE_SENSOR Temperature -ZULU_4_6_MOD_CARD Temperature1 ZULU6_DIE_TEMPERATURE_SENSOR Temperature -CPU_5_7_MOD_CARD Temperature0 CPU5_DIE_TEMPERATURE_SENSOR Temperature -CPU_5_7_MOD_CARD Temperature1 CPU7_DIE_TEMPERATURE_SENSOR Temperature -CPU0_PRIM_FAN Fan-speed CPU0_PFAN_TACH AtoDSensorValue -CPU1_PRIM_FAN Fan-speed CPU1_PFAN_TACH AtoDSensorValue -CPU0_SEC_FAN Fan-speed CPU0_SFAN_TACH AtoDSensorValue -CPU1_SEC_FAN Fan-speed CPU1_SFAN_TACH AtoDSensorValue -IO0_PRIM_FAN Fan-speed IO0_PFAN_TACH AtoDSensorValue -IO1_PRIM_FAN Fan-speed IO1_PFAN_TACH AtoDSensorValue -IO0_SEC_FAN Fan-speed IO0_SFAN_TACH AtoDSensorValue -IO1_SEC_FAN Fan-speed IO1_SFAN_TACH AtoDSensorValue -IO_BRIDGE_PRIM_FAN Fan-speed IO_BRIDGE_PFAN_TACH AtoDSensorValue -IO_BRIDGE_SEC_FAN Fan-speed IO_BRIDGE_SFAN_TACH AtoDSensorValue -CPU0_SEC_FAN Fan-switch CPU_SFAN_ONOFF_SWITCH State -CPU1_SEC_FAN Fan-switch CPU_SFAN_ONOFF_SWITCH State -IO0_PRIM_FAN Fan-switch IO_PFAN_ONOFF_SWITCH State -IO1_PRIM_FAN Fan-switch IO_PFAN_ONOFF_SWITCH State -IO0_SEC_FAN Fan-switch IO_SFAN_ONOFF_SWITCH State -IO1_SEC_FAN Fan-switch IO_SFAN_ONOFF_SWITCH State -IO_BRIDGE_PRIM_FAN Fan-switch IO_BRIDGE_PFAN_ONOFF_SWITCH State -IO_BRIDGE_SEC_FAN Fan-switch IO_BRIDGE_SFAN_ONOFF_SWITCH State -CPU0_PRIM_FAN Fan-control-value CPU_PFAN_SPEED_CONTROL DtoAControlValue -CPU1_PRIM_FAN Fan-control-value CPU_PFAN_SPEED_CONTROL DtoAControlValue -IO0_PRIM_FAN Fan-control-value IO_PFAN_SPEED_CONTROL DtoAControlValue -IO1_PRIM_FAN Fan-control-value IO_PFAN_SPEED_CONTROL DtoAControlValue -PROJECTED_PROPERTIES_END diff --git a/usr/src/cmd/picl/plugins/sun4u/silverstone/devtree/Makefile b/usr/src/cmd/picl/plugins/sun4u/silverstone/devtree/Makefile deleted file mode 100644 index e5a4bcf0e2..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/silverstone/devtree/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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. -# -# lib/picl/plugins/silverstone/devtree/Makefile -# -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-V890 - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -install := FILEMODE = 0444 - -CONF= picldevtree.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: - -install: $(ROOTLIBDIR) $(ROOTCONF) - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/silverstone/devtree/picldevtree.conf b/usr/src/cmd/picl/plugins/sun4u/silverstone/devtree/picldevtree.conf deleted file mode 100644 index 140b017fb1..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/silverstone/devtree/picldevtree.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 2003 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -#ident "%Z%%M% %I% %E% SMI" -# -# Platform specific .conf file for picldevtree plug-in -fru seeprom diff --git a/usr/src/cmd/picl/plugins/sun4u/silverstone/frudata/Makefile b/usr/src/cmd/picl/plugins/sun4u/silverstone/frudata/Makefile deleted file mode 100644 index 3da3c781bb..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/silverstone/frudata/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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# cmd/picl/plugins/sun4u/silverstone/frudata/Makefile -# -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-V890 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONF= libpiclfrudata.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 - - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: $(CONF) - -install: $(ROOTLIBDIR) $(ROOTCONF) - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/silverstone/frudata/libpiclfrudata.conf b/usr/src/cmd/picl/plugins/sun4u/silverstone/frudata/libpiclfrudata.conf deleted file mode 100644 index 942e9eca18..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/silverstone/frudata/libpiclfrudata.conf +++ /dev/null @@ -1,292 +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 2003 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# #ident "%Z%%M% %I% %E% SMI" -# -# This file creates the FRU device paths for the FRUAccess library -# - - - - - - - - - - -VERSION 1.0 - - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=0,a0 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a0:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=0,a2 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a2:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=0,a4 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a4:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=0,a6 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a6:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=0,a8 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,a8:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=0,aa -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,aa:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=0,ac -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,ac:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=0,ae -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@0,ae:fru" - - - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=1,a0 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a0:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=1,a2 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a2:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=1,a4 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a4:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=1,a6 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a6:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=1,a8 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,a8:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=1,aa -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,aa:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=1,ac -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,ac:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=1,ae -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@1,ae:fru" - - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=2,a0 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a0:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=2,a2 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a2:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=2,a4 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a4:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=2,a6 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a6:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=2,a8 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,a8:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=2,aa -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,aa:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=2,ac -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,ac:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=2,ae -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@2,ae:fru" - - - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=3,a0 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a0:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=3,a2 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a2:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=3,a4 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a4:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=3,a6 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a6:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=3,a8 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,a8:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=3,aa -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,aa:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=3,ac -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,ac:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=3,ae -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@3,ae:fru" - - - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=4,a0 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@4,a0:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=4,a2 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@4,a2:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=4,a8 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@4,a8:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,2e/fru?UnitAddress=4,aa -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,2e/fru@4,aa:fru" - - - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,30/fru?UnitAddress=0,a0 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,a0:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,30/fru?UnitAddress=0,a2 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,a2:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,30/fru?UnitAddress=0,a4 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,a4:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,30/fru?UnitAddress=0,a6 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,a6:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,30/fru?UnitAddress=0,a8 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,a8:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,30/fru?UnitAddress=0,aa -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,aa:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,30/fru?UnitAddress=0,ac -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,ac:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,30/fru?UnitAddress=0,ae -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,30/fru@0,ae:fru" - - - - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=0,a0 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,a0:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=0,a2 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,a2:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=0,a4 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,a4:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=0,a6 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,a6:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=0,a8 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,a8:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=0,aa -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,aa:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=0,ac -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,ac:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=0,ae -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@0,ae:fru" - - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=1,a0 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,a0:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=1,a2 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,a2:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=1,a4 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,a4:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=1,a6 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,a6:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=1,a8 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,a8:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=1,aa -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,aa:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=1,ac -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,ac:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=1,ae -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@1,ae:fru" - - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=2,a0 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,a0:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=2,a2 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,a2:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=2,a4 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,a4:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=2,a6 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,a6:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=2,a8 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,a8:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=2,aa -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,aa:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=2,ac -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,ac:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=2,ae -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@2,ae:fru" - - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=3,a0 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,a0:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=3,a2 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,a2:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=3,a4 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,a4:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=3,a6 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,a6:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=3,a8 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,a8:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=3,aa -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,aa:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=3,ac -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,ac:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=3,ae -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@3,ae:fru" - - - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=4,a4 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@4,a4:fru" - -name:/platform/pci?UnitAddress=9,700000/ebus/i2c?UnitAddress=1,50002e/fru?UnitAddress=4,a6 -PROP FRUDevicePath string r 0 "/devices/pci@9,700000/ebus@1/i2c@1,50002e/fru@4,a6:fru" diff --git a/usr/src/cmd/picl/plugins/sun4u/silverstone/frutree/Makefile b/usr/src/cmd/picl/plugins/sun4u/silverstone/frutree/Makefile deleted file mode 100644 index c1a262563d..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/silverstone/frutree/Makefile +++ /dev/null @@ -1,76 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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 $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-V890 -DAK_LINKTO_PLATFORM = SUNW,Sun-Fire-880 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -all: - -install: $(ROOTLIBDIR) all; $(MAKE) $(JAG_LINK) - -_msg: $(MSGDOMAIN) - -$(MSGDOMAIN): - $(INS.dir) - -$(LIBLINKS): FRC - $(RM) $@; $(SYMLINK) $(DYNLIB) $@ - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: - -JAG_LINK=`cd $(ROOT_PLATFORM)/lib/picl/plugins/; \ -echo $(ROOT_PLATFORM); \ -rm -f libpiclfrutree.so.1; \ -rm -f libpiclfrutree.so; \ -rm -f piclfrutree.conf; \ -ln -s ../../../../$(DAK_LINKTO_PLATFORM)/lib/picl/plugins/libpiclfrutree.so.1 libpiclfrutree.so.1; \ -ln -s ../../../../$(DAK_LINKTO_PLATFORM)/lib/picl/plugins/libpiclfrutree.so libpiclfrutree.so; \ -ln -s ../../../../$(DAK_LINKTO_PLATFORM)/lib/picl/plugins/piclfrutree.conf piclfrutree.conf` diff --git a/usr/src/cmd/picl/plugins/sun4u/silverstone/psvcplugin/Makefile b/usr/src/cmd/picl/plugins/sun4u/silverstone/psvcplugin/Makefile deleted file mode 100644 index 47bff2fdfe..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/silverstone/psvcplugin/Makefile +++ /dev/null @@ -1,74 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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 $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-V890 -DAK_LINKTO_PLATFORM = SUNW,Sun-Fire-880 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -all: - -install: $(ROOTLIBDIR) all; $(MAKE) $(JAG_LINK) - -_msg: $(MSGDOMAIN) - -$(MSGDOMAIN): - $(INS.dir) - -$(LIBLINKS): FRC - $(RM) $@; $(SYMLINK) $(DYNLIB) $@ - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: - -JAG_LINK=`cd $(ROOT_PLATFORM)/lib/picl/plugins/; \ -echo $(ROOT_PLATFORM); \ -rm -f libpsvcplugin_psr.so.1; \ -rm -f libpsvcplugin_psr.so; \ -ln -s ../../../../$(DAK_LINKTO_PLATFORM)/lib/picl/plugins/libpsvcplugin_psr.so.1 libpsvcplugin_psr.so.1; \ -ln -s ../../../../$(DAK_LINKTO_PLATFORM)/lib/picl/plugins/libpsvcplugin_psr.so libpsvcplugin_psr.so;` diff --git a/usr/src/cmd/picl/plugins/sun4u/silverstone/psvcpolicy/Makefile b/usr/src/cmd/picl/plugins/sun4u/silverstone/psvcpolicy/Makefile deleted file mode 100644 index 224ad751e4..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/silverstone/psvcpolicy/Makefile +++ /dev/null @@ -1,74 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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 $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-V890 -DAK_LINKTO_PLATFORM = SUNW,Sun-Fire-880 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -all: - -install: $(ROOTLIBDIR) all; $(MAKE) $(JAG_LINK) - -_msg: $(MSGDOMAIN) - -$(MSGDOMAIN): - $(INS.dir) - -$(LIBLINKS): FRC - $(RM) $@; $(SYMLINK) $(DYNLIB) $@ - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: - -JAG_LINK=`cd $(ROOT_PLATFORM)/lib; \ -echo $(ROOT_PLATFORM); \ -rm -f libpsvcpolicy_psr.so.1; \ -rm -f libpsvcpolicy_psr.so; \ -ln -s ../../$(DAK_LINKTO_PLATFORM)/lib/libpsvcpolicy_psr.so.1 libpsvcpolicy_psr.so.1; \ -ln -s ../../$(DAK_LINKTO_PLATFORM)/lib/libpsvcpolicy_psr.so libpsvcpolicy_psr.so;` diff --git a/usr/src/cmd/picl/plugins/sun4u/snowbird/Makefile b/usr/src/cmd/picl/plugins/sun4u/snowbird/Makefile deleted file mode 100644 index c0a5dd95de..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/snowbird/Makefile +++ /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 (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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 library definitions -include $(SRC)/lib/Makefile.lib -include $(SRC)/Makefile.psm - -PLATFORM = SUNW,Netra-CP2300 - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -SUBDIRS= lib conf frutree envmond watchdog .WAIT -MSGSUBDIRS= frutree envmond watchdog - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -.KEEP_STATE: - -all clean clobber: $(SUBDIRS) - -install: $(SUBDIRS) - -_msg: $(MSGSUBDIRS) - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/snowbird/conf/Makefile b/usr/src/cmd/picl/plugins/sun4u/snowbird/conf/Makefile deleted file mode 100644 index a0fd6e0985..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/snowbird/conf/Makefile +++ /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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# - -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -PLATFORM = SUNW,Netra-CP2300 -ROOT_PLATFORM = $(USR_PLAT_DIR)/$(PLATFORM) - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONF_2300 = SUNW,Netra-CP2300.conf SUNW,Netra-CP2300.RTM.conf envmond.conf - -ROOTCONF_2300 = $(CONF_2300:%=$(ROOTLIBDIR)/%) -$(ROOTCONF_2300) := FILEMODE = 0644 - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: - -install: $(ROOTLIBDIR) $(ROOTCONF_2300) - -$(CONF_2300): FRC - $(INS) -m 0644 $@ $(ROOT_PLAT_PLUGINDIR) - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: - diff --git a/usr/src/cmd/picl/plugins/sun4u/snowbird/conf/SUNW,Netra-CP2300.RTM.conf b/usr/src/cmd/picl/plugins/sun4u/snowbird/conf/SUNW,Netra-CP2300.RTM.conf deleted file mode 100644 index 2230a177f0..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/snowbird/conf/SUNW,Netra-CP2300.RTM.conf +++ /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, 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" -VERSION 1.0 - -NODE CPU location - PROP State string r 0 "connected" - PROP SlotType string r 0 "pci" - PROP Label string r 0 "CPU" - PROP devfs-path string r 0 "/pci@1f,0" - PROP PdevProbePath string r 0 "" - PROP bus-addr string r 0 "1,1" - NODE CPU fru - PROP FRUType string r 0 "bridge/fhs" - PROP State string r 0 "configured" - PROP Condition string r 0 "unknown" - PROP AdminLock string rw 0 "disabled" - NODE PMC-1 location - PROP SlotType string r 0 "pci" - PROP Label string r 0 "PMC-A" - PROP bus-addr string r 0 "0x1" - PROP GeoAddr uint r 1 1 - PROP devfs-path string r 0 "/pci@1f,0/pci@1" - ENDNODE - NODE PMC-2 location - PROP SlotType string r 0 "pci" - PROP Label string r 0 "PMC-B" - PROP bus-addr string r 0 "0x2" - PROP GeoAddr uint r 1 2 - PROP devfs-path string r 0 "/pci@1f,0/pci@1" - ENDNODE - ENDNODE -ENDNODE -NODE RTM location - PROP State string r 0 "connected" - PROP SlotType string r 0 "rtm" - PROP Label string r 0 "RTM" - PROP PdevProbePath string r 0 "/pci@1f,0" - PROP bus-addr string r 0 "1,1" - NODE RTM fru - PROP FRUType string r 0 "RTM" - PROP State string r 0 "configured" - PROP Condition string r 0 "ok" - PROP AdminLock string rw 0 "disabled" - NODE su0 port - PROP Label string r 0 "COM-A" - PROP bus-addr string r 0 "0,3f8" - PROP GeoAddr uint r 1 1 - PROP PortType string r 0 "serial" - PROP devfs-path string r 0 "/pci@1f,0/pci@1,1/isa@7" - ENDNODE - - NODE su1 port - PROP Label string r 0 "COM-B" - PROP bus-addr string r 0 "0,2e8" - PROP GeoAddr uint r 1 2 - PROP PortType string r 0 "serial" - PROP devfs-path string r 0 "/pci@1f,0/pci@1,1/isa@7" - ENDNODE - - NODE dmfe0 port - PROP Label string r 0 "ETHERNET A" - PROP bus-addr string r 0 "1" - PROP GeoAddr uint r 1 1 - PROP PortType string r 0 "network" - PROP devfs-path string r 0 "/pci@1f,0/pci@1,1" - ENDNODE - - NODE dmfe1 port - PROP Label string r 0 "ETHERNET B" - PROP bus-addr string r 0 "2" - PROP GeoAddr uint r 1 2 - PROP PortType string r 0 "network" - PROP devfs-path string r 0 "/pci@1f,0/pci@1,1" - ENDNODE - ENDNODE -ENDNODE diff --git a/usr/src/cmd/picl/plugins/sun4u/snowbird/conf/SUNW,Netra-CP2300.conf b/usr/src/cmd/picl/plugins/sun4u/snowbird/conf/SUNW,Netra-CP2300.conf deleted file mode 100644 index 8970f5f94c..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/snowbird/conf/SUNW,Netra-CP2300.conf +++ /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. -# -#pragma ident "%Z%%M% %I% %E% SMI" -VERSION 1.0 - -NODE CPU location - PROP State string r 0 "connected" - PROP SlotType string r 0 "pci" - PROP Label string r 0 "CPU" - PROP bus-addr string r 0 "1,1" - PROP devfs-path string r 0 "/pci@1f,0" - PROP PdevProbePath string r 0 "/pci@1f,0" - NODE CPU fru - PROP FRUType string r 0 "bridge/fhs" - PROP State string r 0 "configured" - PROP Condition string r 0 "unknown" - PROP AdminLock string rw 0 "disabled" - NODE PMC-1 location - PROP SlotType string r 0 "pci" - PROP Label string r 0 "PMC-A" - PROP bus-addr string r 0 "0x1" - PROP GeoAddr uint r 1 1 - PROP devfs-path string r 0 "/pci@1f,0/pci@1" - ENDNODE - NODE PMC-2 location - PROP SlotType string r 0 "pci" - PROP Label string r 0 "PMC-B" - PROP bus-addr string r 0 "0x2" - PROP GeoAddr uint r 1 2 - PROP devfs-path string r 0 "/pci@1f,0/pci@1" - ENDNODE - NODE su0 port - PROP Label string r 0 "COM" - PROP bus-addr string r 0 "0,3f8" - PROP GeoAddr uint r 1 1 - PROP PortType string r 0 "serial" - PROP devfs-path string r 0 "/pci@1f,0/pci@1,1/isa@7" - ENDNODE - NODE dmfe0 port - PROP Label string r 0 "ETHERNET A" - PROP bus-addr string r 0 "1" - PROP GeoAddr uint r 1 1 - PROP PortType string r 0 "network" - PROP devfs-path string r 0 "/pci@1f,0/pci@1,1" - ENDNODE - - NODE dmfe1 port - PROP Label string r 0 "ETHERNET B" - PROP bus-addr string r 0 "2" - PROP GeoAddr uint r 1 2 - PROP PortType string r 0 "network" - PROP devfs-path string r 0 "/pci@1f,0/pci@1,1" - ENDNODE - ENDNODE -ENDNODE -NODE RTM location - PROP Label string r 0 "RTM" - PROP State string r 0 "empty" - PROP SlotType string r 0 "rtm" -ENDNODE diff --git a/usr/src/cmd/picl/plugins/sun4u/snowbird/conf/envmond.conf b/usr/src/cmd/picl/plugins/sun4u/snowbird/conf/envmond.conf deleted file mode 100644 index bb0b1e2ba2..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/snowbird/conf/envmond.conf +++ /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, 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" -# -# The line format is: -# interval policy_name policy_args -10 alarmcard diff --git a/usr/src/cmd/picl/plugins/sun4u/snowbird/envmond/Makefile b/usr/src/cmd/picl/plugins/sun4u/snowbird/envmond/Makefile deleted file mode 100644 index 20953e7c97..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/snowbird/envmond/Makefile +++ /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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# - -include $(SRC)/Makefile.psm - -LIBRARY = libpiclenvmond.a -VERS = .1 -PLATFORM = SUNW,Netra-CP2300 - -OBJECTS= piclenvmond.o piclsensors.o picldr.o piclplatmod.o - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/$(PLATFORM) - -include $(SRC)/cmd/picl/plugins/Makefile.com - -CPPFLAGS += -D_SNOWBIRD \ - -I$(USR_PSM_INCL_DIR) \ - -I$(SRC)/uts/sun4u/sys \ - -I$(SRC)/cmd/picl/plugins/inc \ - -I$(SRC)/cmd/picl/plugins/sun4u/snowbird/lib/libctsmc - -SRCS= $(OBJECTS:%.o=%.c) - -LIBS = $(DYNLIB) - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -LDLIBS += -L$(SRC)/lib/libptree/$(MACH) -LDLIBS += -L$(SRC)/cmd/picl/plugins/sun4u/snowbird/lib/libctsmc -LDLIBS += -L$(ROOT)/usr/lib/picl/plugins -lc -lpicltree \ - -lpicl -lnvpair -lm -ldevinfo -lcfgadm \ - -lpiclfrutree -lrcm -lctsmc -LDLIBS += -R/usr/platform/$(PLATFORM)/lib -LDLIBS += -R/usr/platform/$(PLATFORM)/lib/picl/plugins -LDLIBS += -R/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins - -.KEEP_STATE: - -SUBDIRS= - -POFILE= snowbird_piclenvmond.po -POFILES= $(SRCS:%.c=%.po) - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -all: $(LIBS) $(LIBLINKS) - -install: $(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) - -$(LIBLINKS): FRC - $(RM) $@; $(SYMLINK) ./$(DYNLIB) $@ - -_msg: $(MSGDOMAIN) $(POFILE) - $(RM) $(MSGDOMAIN)/$(POFILE) - $(CP) $(POFILE) $(MSGDOMAIN)/$(POFILE) - -$(POFILE): $(POFILES) - $(CAT) $(POFILES) > $(POFILE) - -$(MSGDOMAIN): - $(INS.dir) - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/snowbird/envmond/picldr.c b/usr/src/cmd/picl/plugins/sun4u/snowbird/envmond/picldr.c deleted file mode 100644 index 9fa6a7cb27..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/snowbird/envmond/picldr.c +++ /dev/null @@ -1,822 +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 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "piclenvmond.h" -#include "picldr.h" - -/* external functions */ -extern picl_errno_t env_platmod_init(); -extern void env_platmod_handle_event(const char *, const void *, size_t); -extern picl_errno_t env_platmod_create_sensors(); -extern picl_errno_t env_platmod_setup_hotswap(); -extern picl_errno_t env_platmod_sp_monitor(); -extern picl_errno_t env_platmod_handle_bus_if_change(uint8_t); -extern picl_errno_t env_platmod_handle_latch_open(); -extern void env_platmod_handle_sensor_event(void *); -extern int process_platmod_sp_state_change_notif(void *); -extern int process_platmod_change_cpu_node_state(void *); -extern int process_platmod_change_cpci_state(void *); -extern int process_platmod_async_msg_notif(void *); -extern void process_platmod_sp_heartbeat(uint8_t); -extern picl_errno_t env_platmod_create_hotswap_prop(); -extern picl_errno_t env_create_property(int ptype, int pmode, - size_t psize, char *pname, int (*readfn)(ptree_rarg_t *, void *), - int (*writefn)(ptree_warg_t *, const void *), - picl_nodehdl_t nodeh, picl_prophdl_t *propp, void *vbuf); -extern char *strtok_r(char *s1, const char *s2, char **lasts); - -/* external variables */ -extern int env_debug; - -static char sys_name[SYS_NMLN]; -static char chassisconf_name[SYS_NMLN]; -static boolean_t parse_config_file = B_FALSE; -static int8_t alarm_check_interval = -1; -static picl_nodehdl_t frutreeh = 0; -static pthread_t polling_threadID; -static boolean_t create_polling_thr = B_TRUE; - -/* globals */ -uint8_t cpu_geo_addr = 0; -picl_nodehdl_t rooth = 0, chassis_nodehdl = 0, cpu_nodehdl = 0; -picl_nodehdl_t platformh = 0, sysmgmth = 0, cpu_lnodehdl = 0; - -/* - * envmond policy structure - */ -typedef struct _policy { - uint8_t interval; - char *pname; - char *argp; - struct _policy *nextp; -} env_policy_t; - -/* - * read_policy_configuration - extract info. from the envmond.conf - */ -static int -env_read_policy_configuration(char *conffile, env_policy_t **policypp) -{ - FILE *fp; - char buf[RECORD_MAXSIZE]; - char *token, *lasts; - env_policy_t *policyp; - - if ((fp = fopen(conffile, "r")) == NULL) { - return (-1); - } - while (fgets(buf, sizeof (buf), fp) != NULL) { - if (buf[0] && (buf[0] == '#' || buf[0] == '\n')) { - continue; - } - token = (char *)strtok_r(buf, RECORD_WHITESPACE, &lasts); - if (token == NULL) { - continue; - } - policyp = (env_policy_t *)malloc(sizeof (env_policy_t)); - if (policyp == NULL) { - goto errors; - } - policyp->interval = (uint8_t)strtoul(token, NULL, 0); - token = (char *)strtok_r(lasts, RECORD_WHITESPACE, &lasts); - if (token == NULL) { - free(policyp); - } else { - policyp->pname = strdup(token); - if (NULL == policyp->pname) { - goto errors; - } - } - if (lasts) { - policyp->argp = strdup(lasts); - if (policyp->argp == NULL) { - goto errors; - } - } else { - policyp->argp = NULL; - } - policyp->nextp = *policypp; - *policypp = policyp; - } - (void) fclose(fp); - return (0); - -errors: - (void) fclose(fp); - while (*policypp) { - policyp = *policypp; - *policypp = (*policypp)->nextp; - free(policyp->pname); - free(policyp->argp); - free(policyp); - } - return (-1); -} - -/* - * supports environmental policies - */ -static void -env_parse_config_file() -{ - char conffile[MAXPATHLEN]; - env_policy_t *policyp, *tmp; - struct stat st; - - if (parse_config_file == B_FALSE) { - return; - } - (void) snprintf(conffile, sizeof (conffile), ENV_CONFIG_FILE, - sys_name); - bzero(&st, sizeof (st)); - if (stat(conffile, &st) == -1) { - return; - } - - policyp = NULL; - if (env_read_policy_configuration(conffile, &policyp) == -1) { - return; - } - assert(policyp); - - while (policyp) { - tmp = policyp; - policyp = policyp->nextp; - if (strcmp(tmp->pname, SERVICE_PROCESSOR) == 0) { - alarm_check_interval = tmp->interval; - if (env_debug & DEBUG) - syslog(LOG_INFO, "Alarm Heartbeat frequency: " - "%d seconds", alarm_check_interval); - } - free(tmp->pname); - free(tmp->argp); - free(tmp); - } -} - -/* - * detects the presence of RTM for CPU board - */ -static boolean_t -is_rtm_present() -{ - sc_reqmsg_t req_pkt; - sc_rspmsg_t rsp_pkt; - uint8_t size = 0; - - req_pkt.data[0] = ENV_RTM_BUS_ID; - req_pkt.data[1] = ENV_RTM_SLAVE_ADDR; - req_pkt.data[2] = ENV_RTM_READ_SIZE; - size = ENV_RTM_PKT_LEN; - - /* initialize the request packet */ - (void) smc_init_smc_msg(&req_pkt, SMC_MASTER_RW_CMD, - DEFAULT_SEQN, size); - - /* make a call to smc library to send cmd */ - if (smc_send_msg(DEFAULT_FD, &req_pkt, &rsp_pkt, - POLL_TIMEOUT) != SMC_SUCCESS) { - return (B_FALSE); - } - return (B_TRUE); -} - -/* - * this routine does the following: - * 1. initializes the CPU geo-addr - * 2. gets the system name - * 3. create the chassis type property - * 4. creates the conf_file property - */ -static picl_errno_t -env_set_cpu_info() -{ - int rc = 0; - sc_reqmsg_t req_pkt; - sc_rspmsg_t rsp_pkt; - uint8_t size = 0; - char conf_name[PICL_PROPNAMELEN_MAX]; - - /* get the geo_addr */ - /* initialize the request packet */ - (void) smc_init_smc_msg(&req_pkt, SMC_GET_GEOGRAPHICAL_ADDRESS, - DEFAULT_SEQN, size); - - /* make a call to smc library to send cmd */ - if (smc_send_msg(DEFAULT_FD, &req_pkt, &rsp_pkt, - POLL_TIMEOUT) != SMC_SUCCESS) { - return (PICL_FAILURE); - } - cpu_geo_addr = rsp_pkt.data[0]; - - /* get the system name */ - if (sysinfo(SI_PLATFORM, sys_name, sizeof (sys_name)) == -1) { - return (PICL_FAILURE); - } - (void) strncpy(chassisconf_name, sys_name, - sizeof (chassisconf_name)); - - /* initialize the node handles */ - if ((rc = ptree_get_root(&rooth)) != PICL_SUCCESS) { - return (rc); - } - - if ((rc = ptree_get_node_by_path(FRUTREE_PATH, &frutreeh)) != - PICL_SUCCESS) { - return (rc); - } - - if ((rc = ptree_get_node_by_path(PICL_FRUTREE_CHASSIS, - &chassis_nodehdl)) != PICL_SUCCESS) { - return (rc); - } - - /* create the chassis type property */ - if ((rc = env_create_property(PICL_PTYPE_CHARSTRING, - PICL_READ, PICL_PROPNAMELEN_MAX, PICL_PROP_CHASSIS_TYPE, - NULLREAD, NULLWRITE, chassis_nodehdl, (picl_prophdl_t *)NULL, - chassisconf_name)) != PICL_SUCCESS) { - return (rc); - } - - /* - * create dummy prop to inform frutree plugin abt conf file - * (rtm based or w/o rtm) - * frutree plugin removes this prop after reading the value - */ - if (is_rtm_present() == B_TRUE) { - (void) snprintf(conf_name, sizeof (conf_name), - "%s.RTM.conf", chassisconf_name); - } else { - (void) snprintf(conf_name, sizeof (conf_name), - "%s.conf", chassisconf_name); - } - - if ((rc = env_create_property(PICL_PTYPE_CHARSTRING, - PICL_READ, PICL_PROPNAMELEN_MAX, PICL_PROP_CONF_FILE, NULLREAD, - NULLWRITE, chassis_nodehdl, (picl_prophdl_t *)NULL, - conf_name)) != PICL_SUCCESS) { - return (rc); - } - return (PICL_SUCCESS); -} - -/* - * initialization - */ -picl_errno_t -env_init() -{ - picl_errno_t rc = PICL_SUCCESS; - - if ((rc = env_set_cpu_info()) != PICL_SUCCESS) { - return (rc); - } - - /* parse the configuration file */ - env_parse_config_file(); - - /* - * do any platform specific intialization if required - * IMPORTANT: must post dr_incoming resource event on - * chassis after doing all the reqd checks - */ - rc = env_platmod_init(); - return (rc); -} - -/* - * sets smc global enables - */ -static int -env_set_smc_global_enables(boolean_t ipmi_enable) -{ - sc_reqmsg_t req_pkt; - sc_rspmsg_t rsp_pkt; - uint8_t size = 0; - - /* initialize the request packet */ - (void) smc_init_smc_msg(&req_pkt, SMC_GET_GLOBAL_ENABLES, - DEFAULT_SEQN, size); - - /* make a call to smc library to send cmd */ - if (smc_send_msg(DEFAULT_FD, &req_pkt, &rsp_pkt, - POLL_TIMEOUT) != SMC_SUCCESS) { - return (-1); - } - - req_pkt.data[0] = rsp_pkt.data[0]; - req_pkt.data[1] = rsp_pkt.data[1]; - if (ipmi_enable) { - req_pkt.data[1] |= ENV_IPMI_ENABLE_MASK; - req_pkt.data[1] &= ENV_SENSOR_ENABLE_MASK; - } else { - req_pkt.data[1] &= ENV_IPMI_DISABLE_MASK; - req_pkt.data[1] |= ENV_SENSOR_DISABLE_MASK; - } - size = ENV_SET_GLOBAL_PKT_LEN; - (void) smc_init_smc_msg(&req_pkt, SMC_SET_GLOBAL_ENABLES, - DEFAULT_SEQN, size); - - /* make a call to smc library to send cmd */ - if (smc_send_msg(DEFAULT_FD, &req_pkt, &rsp_pkt, - POLL_TIMEOUT) != SMC_SUCCESS) { - return (-1); - } - return (0); -} - -/* - * wrapper smc drv open - */ -int -env_open_smc(void) -{ - int fd; - if ((fd = open(SMC_NODE, O_RDWR)) < 0) { - return (-1); - } - return (fd); -} - -static picl_smc_event_t -env_handle_smc_local_event(void *res_datap) -{ - picl_errno_t rc = PICL_SUCCESS; - uint8_t event = SMC_LOCAL_EVENT; - uint8_t event_data = BYTE_0(res_datap); - - if (env_debug & EVENTS) - syslog(LOG_INFO, "Local Event Received, data %x\n", event_data); - - switch (event_data) { - case SMC_LOCAL_EVENT_BRIDGE_IN_RESET : /*FALLTHRU*/ - case SMC_LOCAL_EVENT_BRIDGE_OUT_OF_RESET : - if ((rc = env_platmod_handle_bus_if_change( - event_data)) != PICL_SUCCESS) { - syslog(LOG_ERR, gettext("SUNW_envmond:Error" - " in handling bus interface change " - "event, error = %d"), rc); - } - break; - case SMC_LOCAL_EVENT_LATCH_OPENED: - syslog(LOG_INFO, gettext("LATCH OPEN DETECTED")); - if ((rc = env_platmod_handle_latch_open()) != - PICL_SUCCESS) { - syslog(LOG_ERR, gettext("SUNW_envmond:Error" - " in handling latch open event, " - "error = %d"), rc); - } - break; - default: - break; - } - return (event); -} - -static void -env_handle_async_msg_event(void *res_datap) -{ - int rc = SMC_SUCCESS; - uint8_t event = BYTE_6(res_datap); - - if (env_debug & EVENTS) - syslog(LOG_INFO, "Asynchronous Event %x Received, data %x\n", - event, BYTE_7(res_datap)); - switch (event) { - /* - * This message comes to CPU when the service processor is going offline - * or online. - */ - case EVENT_MSG_AC_STATE_CHANGE: - if ((rc = process_platmod_sp_state_change_notif(res_datap)) != - SMC_SUCCESS) { - syslog(LOG_ERR, gettext("SUNW_envmond:Error in handling" - "service processor change of state event, " - "error = %d"), rc); - } - break; - /* - * This message comes to CPU when service processor - * requests the CPU to go online or offline (shutdown). - */ - case EVENT_MSG_CHANGE_CPU_NODE_STATE: - if ((rc = process_platmod_change_cpu_node_state(res_datap)) != - SMC_SUCCESS) { - syslog(LOG_ERR, gettext("SUNW_envmond:Error in handling" - "cpu change of state event, error = %d"), rc); - } - break; - /* - * This message comes to CPU(Satellite) when the - * other node (Host) is going online or offline. - */ - case EVENT_MSG_CHANGE_CPCI_STATE: - if ((rc = process_platmod_change_cpci_state(res_datap)) != - SMC_SUCCESS) { - syslog(LOG_ERR, gettext("SUNW_envmond:Error in handling" - "cpci change state event, error = %d"), rc); - } - break; - /* - * This message comes from service processor to inform - * change in states for other nodes - */ - case EVENT_MSG_ASYNC_EVENT_NOTIFICATION: - if ((rc = process_platmod_async_msg_notif(res_datap)) != - SMC_SUCCESS) { - syslog(LOG_ERR, gettext("SUNW_envmond:Error in handling" - "async event notification, error = %d"), rc); - } - break; - case MSG_GET_CPU_NODE_STATE: - /* respond to the service processor heartbeat */ - process_platmod_sp_heartbeat(BYTE_5(res_datap)); - break; - default: - event = NO_EVENT; - break; - } -} - -/*ARGSUSED*/ -static picl_smc_event_t -env_process_smc_event(int fd, void **datapp) -{ - sc_rspmsg_t rsp_msg; - picl_smc_event_t event; - void *res_datap = NULL; - - if (read(fd, (char *)&rsp_msg, SC_MSG_MAX_SIZE) < 0) { - return (NO_EVENT); - } - - if (SC_MSG_CC(&rsp_msg) != 0) { - return (NO_EVENT); - } - - res_datap = SC_MSG_DATA(&rsp_msg); - if (env_debug & EVENTS) - syslog(LOG_INFO, "Async Msg Cmd,data0,2 = %x,%x,%x\n", - SC_MSG_CMD(&rsp_msg), BYTE_0(res_datap), - BYTE_2(res_datap)); - - if (SC_MSG_CMD(&rsp_msg) == SMC_SMC_LOCAL_EVENT_NOTIF) { - event = env_handle_smc_local_event(res_datap); - } else { /* it must be an IPMI event */ - switch (BYTE_2(res_datap)) { - case 0x3: - case 0x4: - if (env_debug & DEBUG) - syslog(LOG_INFO, gettext("SUNW_envmond: " - " Sensor Event Received\n")); - /* sensor event */ - switch (BYTE_3(res_datap)) { - case TEMPERATURE_SENSOR_TYPE: - event = TEMPERATURE_SENSOR_EVENT; - env_platmod_handle_sensor_event(res_datap); - break; - default: - syslog(LOG_ERR, gettext("SUNW_envmond:Unknown " - "sensor Event:%d\n"), BYTE_3(res_datap)); - event = NO_EVENT; - break; - } - default: - env_handle_async_msg_event(res_datap); - break; - } - } - return (event); -} - -/* - * polls SMC driver for SMC events - */ -/*ARGSUSED*/ -static void * -env_polling_thread(void *args) -{ - int poll_rc; - struct pollfd poll_fds[1]; - void *datap; - int smcfd; - struct strioctl strio; - sc_cmdspec_t set; - - smcfd = env_open_smc(); - if (smcfd == -1) { - syslog(LOG_ERR, gettext("SUNW_envmond:Error in polling, " - "Open of SMC drv failed")); - create_polling_thr = B_TRUE; - return (NULL); - } - - set.args[0] = SMC_SENSOR_EVENT_ENABLE_SET; - set.attribute = SC_ATTR_SHARED; - strio.ic_cmd = SCIOC_MSG_SPEC; - strio.ic_timout = 0; - strio.ic_len = ENV_SENSOR_EV_ENABLE_PKT_LEN; - strio.ic_dp = (char *)&set; - if (ioctl(smcfd, I_STR, &strio) < 0) { - syslog(LOG_ERR, gettext("SUNW_envmond:Request for " - "Sensor events failed")); - (void) close(smcfd); - create_polling_thr = B_TRUE; - return (NULL); - } - - /* request for async messages */ - poll_fds[0].fd = smcfd; - poll_fds[0].events = POLLIN|POLLPRI; - poll_fds[0].revents = 0; - - set.attribute = SC_ATTR_SHARED; - set.args[0] = SMC_IPMI_RESPONSE_NOTIF; - set.args[1] = SMC_SMC_LOCAL_EVENT_NOTIF; - strio.ic_cmd = SCIOC_MSG_SPEC; - strio.ic_timout = 0; - strio.ic_len = ENV_IPMI_SMC_ENABLE_PKT_LEN; - strio.ic_dp = (char *)&set; - if (ioctl(smcfd, I_STR, &strio) == -1) { - syslog(LOG_ERR, gettext("SUNW_envmond:Request for" - "Async messages failed")); - (void) close(smcfd); - create_polling_thr = B_TRUE; - return (NULL); - } - - /* Now wait for SMC events to come */ - for (;;) { - poll_rc = poll(poll_fds, 1, -1); /* poll forever */ - if (poll_rc < 0) { - syslog(LOG_ERR, gettext("SUNW_envmond:Event " - "processing halted")); - break; - } - if (env_process_smc_event(smcfd, &datap) == NO_EVENT) { - syslog(LOG_ERR, gettext("SUNW_envmond:" - "wrong event data posted from SMC")); - } - } - (void) close(smcfd); - create_polling_thr = B_TRUE; - return (NULL); -} - -/* - * (to be)Called during chassis configuration. It does the following tasks. - * Set global enables on SMC - * Register for local(SMC) events and remote(IPMI) messages (State Change msgs) - * creates sensor nodes - * Initialize hotswap - * Initiallize the interaction with service processor - */ -static picl_errno_t -env_start_services(void) -{ - int rc; - if (env_debug & DEBUG) { - syslog(LOG_INFO, "env_start_services begin"); - } - - /* set the SMC global enables */ - if (env_set_smc_global_enables(B_TRUE) == -1) { - syslog(LOG_ERR, gettext("SUNW_envmond:Setting SMC " - "Globals failed")); - return (PICL_FAILURE); - } - - /* start a worker thread to poll for SMC events */ - if (create_polling_thr) { - rc = pthread_create(&polling_threadID, NULL, - &env_polling_thread, NULL); - if (rc != 0) { - syslog(LOG_ERR, gettext("SUNW_envmond:Error in " - "creating polling thread")); - return (PICL_FAILURE); - } - create_polling_thr = B_FALSE; - } - - /* create the sensor nodes */ - if ((rc = env_platmod_create_sensors()) != PICL_SUCCESS) { - syslog(LOG_ERR, gettext("SUNW_envmond:Error in creating sensor" - " nodes, error = %d"), rc); - } - - /* intialize the hotswap framework */ - if ((rc = env_platmod_setup_hotswap()) != PICL_SUCCESS) { - syslog(LOG_ERR, gettext("SUNW_envmond:Error in hotswap " - "initialization, error = %d"), rc); - } - - if ((rc = env_platmod_create_hotswap_prop()) != PICL_SUCCESS) { - syslog(LOG_ERR, gettext("SUNW_envmond:Error in creating " - "hotswap prop, error = %d"), rc); - } - - /* intialize interaction with service processor */ - if ((rc = env_platmod_sp_monitor()) != PICL_SUCCESS) { - syslog(LOG_ERR, gettext("SUNW_envmond:Failed to interact with" - " service processor, error = %d"), rc); - } - return (PICL_SUCCESS); -} - -static picl_errno_t -env_handle_chassis_configuring_event(char *state) -{ - picl_errno_t rc = PICL_SUCCESS; - picl_prophdl_t proph; - picl_nodehdl_t rtm_lnodehdl = 0; - char *cpu_name = PICL_NODE_CPU; - char *rtm_name = PICL_NODE_RTM; - uint64_t status_time; - - if (strcmp(state, PICLEVENTARGVAL_CONFIGURING) != 0) { - return (PICL_SUCCESS); - } - - /* initialize cpu loc node handle */ - if (cpu_lnodehdl == 0) { - if ((rc = ptree_find_node(chassis_nodehdl, - PICL_PROP_NAME, PICL_PTYPE_CHARSTRING, - cpu_name, (strlen(cpu_name) + 1), - &cpu_lnodehdl)) != PICL_SUCCESS) { - syslog(LOG_ERR, gettext("SUNW_envmond: failed " - " to get CPU nodehdl, error = %d"), rc); - return (rc); - } - } - - /* create geo-addr prop under CPU location */ - if (ptree_get_prop_by_name(cpu_lnodehdl, PICL_PROP_GEO_ADDR, - &proph) == PICL_PROPNOTFOUND) { - if ((rc = env_create_property(PICL_PTYPE_UNSIGNED_INT, - PICL_READ, sizeof (cpu_geo_addr), - PICL_PROP_GEO_ADDR, NULLREAD, NULLWRITE, - cpu_lnodehdl, &proph, - (void *)&cpu_geo_addr)) != PICL_SUCCESS) { - return (rc); - } - } - if (ptree_get_prop_by_name(cpu_lnodehdl, - PICL_PROP_STATUS_TIME, &proph) != PICL_SUCCESS) { - status_time = (uint64_t)time(NULL); - (void) env_create_property(PICL_PTYPE_TIMESTAMP, - PICL_READ, sizeof (status_time), - PICL_PROP_STATUS_TIME, NULLREAD, NULLWRITE, - cpu_lnodehdl, &proph, &status_time); - } - - /* create geo address property for RTM node (if present) */ - (void) ptree_find_node(chassis_nodehdl, - PICL_PROP_NAME, PICL_PTYPE_CHARSTRING, rtm_name, - (strlen(rtm_name) + 1), &rtm_lnodehdl); - - if (rtm_lnodehdl == 0) { /* RTM not present */ - return (PICL_SUCCESS); - } - - if (ptree_get_prop_by_name(rtm_lnodehdl, PICL_PROP_GEO_ADDR, - &proph) == PICL_PROPNOTFOUND) { - if ((rc = env_create_property(PICL_PTYPE_UNSIGNED_INT, - PICL_READ, sizeof (cpu_geo_addr), PICL_PROP_GEO_ADDR, - NULLREAD, NULLWRITE, rtm_lnodehdl, &proph, - &cpu_geo_addr)) != PICL_SUCCESS) { - syslog(LOG_ERR, gettext("SUNW_envmond:Failed " - "to create CPU geo-addr, error = %d"), rc); - return (rc); - } - } - if (ptree_get_prop_by_name(rtm_lnodehdl, - PICL_PROP_STATUS_TIME, &proph) != PICL_SUCCESS) { - status_time = (uint64_t)time(NULL); - (void) env_create_property(PICL_PTYPE_TIMESTAMP, - PICL_READ, sizeof (status_time), PICL_PROP_STATUS_TIME, - NULLREAD, NULLWRITE, rtm_lnodehdl, &proph, - &status_time); - } - - /* start all the environment monitoring services */ - if ((rc = env_start_services()) != PICL_SUCCESS) { - return (rc); - } - return (PICL_SUCCESS); -} - -/* - * routine to handle all the picl state and condition change events - */ -void -env_handle_event(const char *ename, const void *earg, size_t size) -{ - picl_nodehdl_t nodeh = 0; - nvlist_t *nvlp; - char *value; - boolean_t state_event; - char result[PICL_PROPNAMELEN_MAX]; - - if (!ename) { - return; - } - if (strcmp(ename, PICLEVENT_STATE_CHANGE) == 0) { - state_event = B_TRUE; - } else if (strcmp(ename, PICLEVENT_CONDITION_CHANGE) == 0) { - state_event = B_FALSE; - } else { - return; - } - - /* unpack the nvlist and get the information */ - if (nvlist_unpack((char *)earg, size, &nvlp, NULL)) { - return; - } - if (nvlist_lookup_uint64(nvlp, PICLEVENTARG_NODEHANDLE, &nodeh) == -1) { - nvlist_free(nvlp); - return; - } - if (nvlist_lookup_string(nvlp, (state_event) ? - PICLEVENTARG_STATE : - PICLEVENTARG_CONDITION, &value) != 0) { - nvlist_free(nvlp); - return; - } - - if (env_debug & PICLEVENTS) { - if (ptree_get_propval_by_name(nodeh, PICL_PROP_NAME, - result, sizeof (result)) != PICL_SUCCESS) { - syslog(LOG_ERR, " SUNW_envmond: error in getting" - " %s", PICL_PROP_NAME); - nvlist_free(nvlp); - return; - } - syslog(LOG_INFO, "SUNW_envmond: %s (%s) on %s", - ename, value, result); - } - - if (chassis_nodehdl == 0 && state_event) { - if (ptree_get_propval_by_name(nodeh, PICL_PROP_NAME, - result, sizeof (result)) != PICL_SUCCESS) { - nvlist_free(nvlp); - return; - } - if (strcmp(result, PICL_NODE_CHASSIS) == 0) { - chassis_nodehdl = nodeh; - } - } - if (nodeh == chassis_nodehdl && state_event) { - (void) env_handle_chassis_configuring_event(value); - } - /* do any platform specific handling that is reqd */ - env_platmod_handle_event(ename, earg, size); - nvlist_free(nvlp); -} diff --git a/usr/src/cmd/picl/plugins/sun4u/snowbird/envmond/picldr.h b/usr/src/cmd/picl/plugins/sun4u/snowbird/envmond/picldr.h deleted file mode 100644 index d3f9e6fefd..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/snowbird/envmond/picldr.h +++ /dev/null @@ -1,94 +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 _PICLDR_H -#define _PICLDR_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum picl_smc_event { - NO_EVENT = 0, - TEMPERATURE_SENSOR_EVENT, - CPU_NODE_STATE_CHANGE_NOTIFICATION, - CHANGE_CPCI_STATE, /* request to config/unconfig cpci i/f */ - CHANGE_CPU_NODE_STATE, /* request on online/offline node */ - SMC_LOCAL_EVENT -} picl_smc_event_t; - -#define SMC_NODE "/dev/ctsmc" -#define SMC_BMC_ADDR 0x20 -#define CPU_NODE_STATE_ONLINE 1 -#define CPU_NODE_STATE_OFFLINE 0 - -/* event messages */ -#define EVENT_MSG_AC_STATE_CHANGE 0xf5 -#define EVENT_MSG_CHANGE_CPCI_STATE 0x65 -#define EVENT_MSG_CHANGE_CPU_NODE_STATE 0x62 -#define EVENT_MSG_ASYNC_EVENT_NOTIFICATION 0x82 -#define MSG_GET_CPU_NODE_STATE 0x61 -#define SMC_LOCAL_EVENT_BRIDGE_IN_RESET 0x00 -#define SMC_LOCAL_EVENT_BRIDGE_OUT_OF_RESET 0x01 -#define SMC_LOCAL_EVENT_LATCH_OPENED 0x06 - -#define CPCI_STATE_OFFLINE 0 -#define CPCI_STATE_ONLINE 1 -#define SATCPU_STATE_ONLINE 0x7 -#define SATCPU_STATE_OFFLINE 0x8 -#define HEALTHY_ASSERT 1 -#define HEALTHY_DEASSERT 2 - -#define SMC_MASTER_RW_CMD 0x90 -#define ENV_CONFIG_FILE "/usr/platform/%s/lib/picl/plugins/envmond.conf" -#define RECORD_MAXSIZE (256) -#define RECORD_WHITESPACE (": \t") -#define SERVICE_PROCESSOR "alarmcard" - -/* packet lengths */ -#define ENV_RTM_PKT_LEN 3 -#define ENV_SET_GLOBAL_PKT_LEN 2 -#define ENV_SENSOR_EV_ENABLE_PKT_LEN 2 -#define ENV_IPMI_SMC_ENABLE_PKT_LEN 3 - -/* rtm pkt data */ -#define ENV_RTM_BUS_ID 7 -#define ENV_RTM_SLAVE_ADDR 0xa0 -#define ENV_RTM_READ_SIZE 0xa - -/* global enables data */ -#define ENV_IPMI_ENABLE_MASK 0x10 -#define ENV_IPMI_DISABLE_MASK 0xef -#define ENV_SENSOR_ENABLE_MASK 0xfb -#define ENV_SENSOR_DISABLE_MASK 0x04 - -#ifdef __cplusplus -} -#endif - -#endif /* _PICLDR_H */ diff --git a/usr/src/cmd/picl/plugins/sun4u/snowbird/envmond/piclenvmond.c b/usr/src/cmd/picl/plugins/sun4u/snowbird/envmond/piclenvmond.c deleted file mode 100644 index d74a28f116..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/snowbird/envmond/piclenvmond.c +++ /dev/null @@ -1,436 +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 -#include -#include -#include -#include -#include -#include -#include -#include -#include "piclenvmond.h" - -/* external funcs and varaibles */ -extern void env_handle_event(const char *, const void *, size_t); -extern picl_errno_t env_init(); -extern void env_platmod_fini(); -extern int sensor_fd; -extern pthread_t env_temp_thr_tid; - -/* local defines */ -#define TIMEOUT (10) - -#pragma init(piclenvmond_register) - -/* - * Plugin registration entry points - */ -static void piclenvmond_register(void); -static void piclenvmond_init(void); -static void piclenvmond_fini(void); -static void piclenvmond_evhandler(const char *, const void *, size_t, void *); - -int env_debug = 0x0; - -static picld_plugin_reg_t envmond_reg_info = { - PICLD_PLUGIN_VERSION_1, - PICLD_PLUGIN_CRITICAL, - "SUNW_piclenvmond", - piclenvmond_init, - piclenvmond_fini -}; - -typedef struct { - picl_nodehdl_t nodehdl; - char node_name[PICL_PROPNAMELEN_MAX]; -} env_callback_args_t; - -/* - * picld entry points - */ -static void -piclenvmond_register(void) -{ - (void) picld_plugin_register(&envmond_reg_info); -} - -/* - * picld entry point - * - do all the initialization - * - register for interested picl events - */ -static void -piclenvmond_init(void) -{ - picl_errno_t rc = PICL_SUCCESS; - - if ((rc = env_init()) != PICL_SUCCESS) { - syslog(LOG_ERR, gettext("SUNW_envmond:envmond init failed, " - "error = %d"), rc); - return; - } - - /* register handler for state change events */ - (void) ptree_register_handler(PICLEVENT_STATE_CHANGE, - piclenvmond_evhandler, NULL); - /* register handler for condition change events */ - (void) ptree_register_handler(PICLEVENT_CONDITION_CHANGE, - piclenvmond_evhandler, NULL); - -} - -static void -piclenvmond_fini(void) -{ - void *exitval; - - /* unregister event handler */ - (void) ptree_unregister_handler(PICLEVENT_STATE_CHANGE, - piclenvmond_evhandler, NULL); - (void) ptree_unregister_handler(PICLEVENT_CONDITION_CHANGE, - piclenvmond_evhandler, NULL); - - /* cancel all the threads */ - (void) pthread_cancel(env_temp_thr_tid); - (void) pthread_join(env_temp_thr_tid, &exitval); - - /* do any platform specific cleanups required */ - env_platmod_fini(); - (void) close(sensor_fd); -} - -/*ARGSUSED*/ -static void -piclenvmond_evhandler(const char *ename, const void *earg, size_t size, - void *cookie) -{ - env_handle_event(ename, earg, size); -} - -/* - * Utility functions - */ - -/* - * create_property -- Create a PICL property - */ -picl_errno_t -env_create_property(int ptype, int pmode, size_t psize, char *pname, - int (*readfn)(ptree_rarg_t *, void *), - int (*writefn)(ptree_warg_t *, const void *), - picl_nodehdl_t nodeh, picl_prophdl_t *propp, void *vbuf) -{ - picl_errno_t rc; /* return code */ - ptree_propinfo_t propinfo; /* propinfo structure */ - picl_prophdl_t proph; - - rc = ptree_get_prop_by_name(nodeh, pname, &proph); - if (rc == PICL_SUCCESS) { /* prop. already exists */ - return (rc); - } - - rc = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - ptype, pmode, psize, pname, readfn, writefn); - if (rc != PICL_SUCCESS) { - syslog(LOG_ERR, PTREE_INIT_PROPINFO_FAILED_MSG, rc); - return (rc); - } - - rc = ptree_create_and_add_prop(nodeh, &propinfo, vbuf, propp); - if (rc != PICL_SUCCESS) { - syslog(LOG_ERR, PTREE_CREATE_AND_ADD_PROP_FAILED_MSG, rc); - return (rc); - } - return (PICL_SUCCESS); -} - -/* - * The picl event completion handler. - */ -/* ARGSUSED */ -static void -event_completion_handler(char *ename, void *earg, size_t size) -{ - free(earg); - free(ename); -} - -/* - * utility routine to post PICL events - */ -/*ARGSUSED*/ -static int -post_picl_event(const char *ename, char *envl, size_t elen, - picl_nodehdl_t nodeh, int cond_wait) -{ - nvlist_t *nvlp; - size_t nvl_size; - char *pack_buf = NULL; - char *evname; - - if (nodeh == 0) { - return (PICL_FAILURE); - } - if ((evname = strdup(ename)) == NULL) - return (PICL_FAILURE); - if (envl) { - if (nvlist_unpack(envl, elen, &nvlp, 0) < 0) { - nvlist_free(nvlp); - free(evname); - return (PICL_FAILURE); - } - } else { - if (nvlist_alloc(&nvlp, NV_UNIQUE_NAME_TYPE, NULL)) { - free(evname); - return (PICL_FAILURE); - } - } - - if (nvlist_add_uint64(nvlp, PICLEVENTARG_NODEHANDLE, nodeh) == -1) { - nvlist_free(nvlp); - free(evname); - return (PICL_FAILURE); - } - - if (nvlist_pack(nvlp, &pack_buf, &nvl_size, NV_ENCODE_NATIVE, NULL)) { - nvlist_free(nvlp); - free(evname); - return (PICL_FAILURE); - } - nvlist_free(nvlp); - - if (env_debug & EVENTS) { - char enodename[PICL_PROPNAMELEN_MAX]; - if (ptree_get_propval_by_name(nodeh, PICL_PROP_NAME, - enodename, sizeof (enodename)) == PICL_SUCCESS) - syslog(LOG_INFO, "envmond:Posting %s on %s\n", - ename, enodename); - } - - if (ptree_post_event(evname, pack_buf, nvl_size, - event_completion_handler) != 0) { - syslog(LOG_ERR, gettext("SUNW_envmond: Error posting %s PICL" - " event."), ename); - free(pack_buf); - free(evname); - return (PICL_FAILURE); - } - return (PICL_SUCCESS); -} - -/* - * post dr_req events - */ -picl_errno_t -post_dr_req_event(picl_nodehdl_t fruh, char *dr_req_type, uint8_t wait) -{ - nvlist_t *nvlp; /* nvlist of event specific args */ - size_t nvl_size; - char *pack_buf = NULL; - char dr_ap_id[PICL_PROPNAMELEN_MAX]; - int rc = PICL_SUCCESS; - - if (env_debug & DEBUG) - syslog(LOG_DEBUG, "Post %s on %llx", dr_req_type, fruh); - if (fruh == 0) { - return (PICL_INVALIDARG); - } - if ((rc = ptree_get_propval_by_name(fruh, PICL_PROP_NAME, - dr_ap_id, sizeof (dr_ap_id))) != PICL_SUCCESS) { - return (rc); - } - - if (nvlist_alloc(&nvlp, NV_UNIQUE_NAME_TYPE, NULL)) { - return (PICL_FAILURE); - } - - if (nvlist_add_string(nvlp, PICLEVENTARG_AP_ID, dr_ap_id) == -1) { - nvlist_free(nvlp); - return (PICL_FAILURE); - } - if (nvlist_add_string(nvlp, PICLEVENTARG_DR_REQ_TYPE, dr_req_type) - == -1) { - nvlist_free(nvlp); - return (PICL_FAILURE); - } - if (nvlist_pack(nvlp, &pack_buf, &nvl_size, NV_ENCODE_NATIVE, NULL)) { - nvlist_free(nvlp); - return (PICL_FAILURE); - } - nvlist_free(nvlp); - - if (env_debug & DEBUG) - syslog(LOG_DEBUG, "Posting %s on %s", dr_req_type, dr_ap_id); - rc = post_picl_event(PICLEVENT_DR_REQ, pack_buf, nvl_size, fruh, - wait); - - free(pack_buf); - return (rc); -} - -/* - * routine to post dr_ap_state change events - */ -picl_errno_t -post_dr_ap_state_change_event(picl_nodehdl_t nodehdl, char *dr_hint, - uint8_t wait) -{ - nvlist_t *nvlp; /* nvlist of event specific args */ - size_t nvl_size; - char *pack_buf = NULL; - char dr_ap_id[PICL_PROPNAMELEN_MAX]; - int rc = PICL_SUCCESS; - - if (nodehdl == 0) { - return (PICL_FAILURE); - } - if ((rc = ptree_get_propval_by_name(nodehdl, PICL_PROP_NAME, - dr_ap_id, sizeof (dr_ap_id))) != PICL_SUCCESS) { - return (rc); - } - if (nvlist_alloc(&nvlp, NV_UNIQUE_NAME_TYPE, NULL)) { - return (PICL_FAILURE); - } - - if (nvlist_add_string(nvlp, PICLEVENTARG_AP_ID, dr_ap_id) == -1) { - nvlist_free(nvlp); - return (PICL_FAILURE); - } - if (nvlist_add_string(nvlp, PICLEVENTARG_HINT, dr_hint) == -1) { - nvlist_free(nvlp); - return (PICL_FAILURE); - } - if (nvlist_pack(nvlp, &pack_buf, &nvl_size, NV_ENCODE_NATIVE, NULL)) { - nvlist_free(nvlp); - return (PICL_FAILURE); - } - nvlist_free(nvlp); - rc = post_picl_event(PICLEVENT_DR_AP_STATE_CHANGE, pack_buf, - nvl_size, nodehdl, wait); - free(pack_buf); - return (rc); -} - -picl_errno_t -post_cpu_state_change_event(picl_nodehdl_t fruh, char *event_type, uint8_t wait) -{ - nvlist_t *nvlp; /* nvlist of event specific args */ - size_t nvl_size; - char *pack_buf = NULL; - int rc = PICL_SUCCESS; - - if (fruh == 0) { - return (PICL_FAILURE); - } - - if (nvlist_alloc(&nvlp, NV_UNIQUE_NAME_TYPE, NULL)) - return (PICL_FAILURE); - - if (nvlist_add_int64(nvlp, PICLEVENTARG_NODEHANDLE, fruh)) { - nvlist_free(nvlp); - return (PICL_FAILURE); - } - - if (nvlist_add_string(nvlp, PICLEVENTARG_CPU_EV_TYPE, - event_type) == -1) { - nvlist_free(nvlp); - return (PICL_FAILURE); - } - - if (nvlist_pack(nvlp, &pack_buf, &nvl_size, NV_ENCODE_NATIVE, NULL)) { - nvlist_free(nvlp); - return (PICL_FAILURE); - } - nvlist_free(nvlp); - rc = post_picl_event(PICLEVENT_CPU_STATE_CHANGE, pack_buf, - nvl_size, fruh, wait); - free(pack_buf); - return (rc); -} - -int -post_sensor_event(picl_nodehdl_t hdl, char *sensor_evalue, uint8_t wait) -{ - nvlist_t *nvlp; /* nvlist of event specific args */ - size_t nvl_size; - char *pack_buf = NULL; - char dr_ap_id[PICL_PROPNAMELEN_MAX]; - int rc = PICL_SUCCESS; - - if (env_debug & DEBUG) - syslog(LOG_DEBUG, "Post %s on %llx", sensor_evalue, hdl); - if (hdl == 0) - return (PICL_FAILURE); - - if (nvlist_alloc(&nvlp, NV_UNIQUE_NAME_TYPE, NULL)) - return (PICL_FAILURE); - - if (nvlist_add_string(nvlp, PICLEVENTARG_CONDITION, - sensor_evalue) == -1) { - nvlist_free(nvlp); - return (PICL_FAILURE); - } - if (nvlist_pack(nvlp, &pack_buf, &nvl_size, NV_ENCODE_NATIVE, NULL)) { - nvlist_free(nvlp); - return (PICL_FAILURE); - } - nvlist_free(nvlp); - - if (env_debug & DEBUG) { - if (ptree_get_propval_by_name(hdl, PICL_PROP_NAME, dr_ap_id, - sizeof (dr_ap_id)) == PICL_SUCCESS) - syslog(LOG_DEBUG, "Posting %s on %s", sensor_evalue, - dr_ap_id); - } - rc = post_picl_event(PICLEVENT_CONDITION_CHANGE, pack_buf, nvl_size, - hdl, wait); - free(pack_buf); - return (rc); -} - -/* - * return B_TRUE if admin lock is enabled - * return B_FALSE if admin lock is disabled - */ -boolean_t -env_admin_lock_enabled(picl_nodehdl_t fruh) -{ - char adminlock[PICL_PROPNAMELEN_MAX]; - - if (ptree_get_propval_by_name(fruh, PICL_PROP_ADMIN_LOCK, - adminlock, sizeof (adminlock)) - != PICL_SUCCESS) { - return (B_FALSE); - } - if (strcmp(adminlock, PICL_ADMINLOCK_ENABLED) == 0) { - return (B_TRUE); - } - return (B_FALSE); -} diff --git a/usr/src/cmd/picl/plugins/sun4u/snowbird/envmond/piclenvmond.h b/usr/src/cmd/picl/plugins/sun4u/snowbird/envmond/piclenvmond.h deleted file mode 100644 index 017c1e5d91..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/snowbird/envmond/piclenvmond.h +++ /dev/null @@ -1,110 +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 _PICLENVMOND_H -#define _PICLENVMOND_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifdef __cplusplus -extern "C" { -#endif - -/* debug flags */ -#define DEBUG 0x1 /* generic debug messages */ -#define EVENTS 0x2 /* only events related debug message */ -#define PTREE 0x4 /* messages relating to picltree search */ -#define SP_MONITOR 0x8 /* AC health monitoring messages only */ -#define CHASSIS_INFO 0x10 /* Chassis related debug information */ -#define PICLEVENTS 0x20 /* Display only PICL events received */ - -#define PICL_NODE_CHASSIS "chassis" -#define PICL_NODE_CPU "CPU" -#define PICL_NODE_RTM "RTM" -#define PICL_PROP_CONF_FILE "conf_name" -#define TEMPERATURE_SENSOR_TYPE (0x1u) - -typedef enum { - LOC_STATE_UNKNOWN = 0, - LOC_STATE_EMPTY, - LOC_STATE_DISCONNECTING, - LOC_STATE_DISCONNECTED, - LOC_STATE_CONNECTING, - LOC_STATE_CONNECTED, - FRU_STATE_UNKNOWN, - FRU_STATE_UNCONFIGURING, - FRU_STATE_UNCONFIGURED, - FRU_STATE_CONFIGURING, - FRU_STATE_CONFIGURED, - FRU_COND_OK, - FRU_COND_FAILING, - FRU_COND_FAILED, - FRU_COND_DEGRADED, - FRU_COND_UNKNOWN, - FRU_COND_TESTING -} env_state_event_t; - -typedef enum {NO_COND_TIMEDWAIT = 0, COND_TIMEDWAIT, NO_WAIT} env_wait_state_t; - -#define NULLREAD (int (*)(ptree_rarg_t *, void *))0 -#define NULLWRITE (int (*)(ptree_warg_t *, const void *))0 -#define POLL_TIMEOUT 5000 -#define DEFAULT_FD -1 -#define DEFAULT_SEQN 0xff - -/* byte of pointer to signed integer */ -#define BYTE_0(_X) (*((int8_t *)(_X) + 0)) -#define BYTE_1(_X) (*((int8_t *)(_X) + 1)) -#define BYTE_2(_X) (*((int8_t *)(_X) + 2)) -#define BYTE_3(_X) (*((int8_t *)(_X) + 3)) -#define BYTE_4(_X) (*((int8_t *)(_X) + 4)) -#define BYTE_5(_X) (*((int8_t *)(_X) + 5)) -#define BYTE_6(_X) (*((int8_t *)(_X) + 6)) -#define BYTE_7(_X) (*((int8_t *)(_X) + 7)) -#define BYTE_8(_X) (*((int8_t *)(_X) + 8)) - -#define BIT_0(_X) ((_X) & 0x01) -#define BIT_1(_X) ((_X) & 0x02) -#define BIT_2(_X) ((_X) & 0x04) -#define BIT_3(_X) ((_X) & 0x08) -#define BIT_4(_X) ((_X) & 0x10) -#define BIT_5(_X) ((_X) & 0x20) -#define BIT_6(_X) ((_X) & 0x40) -#define BIT_7(_X) ((_X) & 0x80) - -#define PICL_ADMINLOCK_DISABLED "disabled" -#define PICL_ADMINLOCK_ENABLED "enabled" - -#define PTREE_INIT_PROPINFO_FAILED_MSG \ - gettext("SUNW_envmond:ptree_init_propinfo() failed, error = %d") -#define PTREE_CREATE_AND_ADD_PROP_FAILED_MSG \ - gettext("SUNW_envmond: ptree_create_and_add_prop() failed error = %d") - -#ifdef __cplusplus -} -#endif - -#endif /* _PICLENVMOND_H */ diff --git a/usr/src/cmd/picl/plugins/sun4u/snowbird/envmond/piclplatmod.c b/usr/src/cmd/picl/plugins/sun4u/snowbird/envmond/piclplatmod.c deleted file mode 100644 index 43c4c3d056..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/snowbird/envmond/piclplatmod.c +++ /dev/null @@ -1,837 +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 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "piclenvmond.h" -#include "picldr.h" - -/* local defines */ -#define RESET_CPU "/usr/sbin/shutdown -y -g 0 -i6" -#define SHUTDOWN_CPU "/usr/sbin/shutdown -y -g 0 -i0" -#define RCM_ABSTRACT_RESOURCE "SUNW_snowbird/board0/CPU1" -#define CPU_SENSOR_GEO_ADDR 0xe -#define IS_HEALTHY 0x01 -#define PICL_NODE_SYSMGMT "sysmgmt" -#define SYSMGMT_PATH PLATFORM_PATH"/pci/pci/isa/sysmgmt" -#define BUF_SIZE 7 - -/* external functions */ -extern picl_errno_t env_create_property(int, int, size_t, char *, - int (*readfn)(ptree_rarg_t *, void *), - int (*writefn)(ptree_warg_t *, const void *), - picl_nodehdl_t, picl_prophdl_t *, void *); -extern picl_errno_t post_dr_req_event(picl_nodehdl_t, char *, uint8_t); -extern picl_errno_t post_dr_ap_state_change_event(picl_nodehdl_t, char *, - uint8_t); -extern boolean_t env_admin_lock_enabled(picl_nodehdl_t); -extern picl_errno_t env_create_temp_sensor_node(picl_nodehdl_t, uint8_t); -extern void env_handle_sensor_event(void *); -extern int env_open_smc(); - -/* external variables */ -extern int env_debug; -extern uint8_t cpu_geo_addr; -extern picl_nodehdl_t rooth, platformh, sysmgmth, sensorh; -extern picl_nodehdl_t chassis_nodehdl, cpu_nodehdl, cpu_lnodehdl; - -/* locals */ -static pthread_mutex_t env_dmc_mutex = PTHREAD_MUTEX_INITIALIZER; -static pthread_cond_t env_dmc_cond = PTHREAD_COND_INITIALIZER; -static boolean_t env_reset_cpu = B_FALSE; -static boolean_t env_shutdown_system = B_FALSE; -static env_state_event_t env_chassis_state = FRU_STATE_UNKNOWN; -static char *rcm_abstr_cp2300_name = RCM_ABSTRACT_RESOURCE; -static boolean_t env_got_dmc_msg = B_FALSE; -static long env_dmc_wait_time = 15; -static pthread_t dmc_thr_tid; - -/* - * issue halt or reboot based on the reset_cpu flag - */ -/*ARGSUSED*/ -static void -shutdown_cpu(boolean_t force) -{ - if (env_shutdown_system) { - if (env_reset_cpu) { - (void) pclose(popen(RESET_CPU, "w")); - } else { - (void) pclose(popen(SHUTDOWN_CPU, "w")); - } - } -} - -/* - * inform RCM framework that the remove op is successful - */ -static void -confirm_rcm(char *abstr_name, rcm_handle_t *rhandle) -{ - rcm_notify_remove(rhandle, abstr_name, 0, NULL); -} - -/* - * inform RCM framework that the remove op is failed - */ -static void -fail_rcm(char *abstr_name, rcm_handle_t *rhandle) -{ - (void) rcm_notify_online(rhandle, abstr_name, 0, NULL); -} - -/* - * check RCM framework if it is ok to offline a device - */ -static int -check_rcm(char *rcm_abstr_cp2300_name, uint_t flags) -{ - rcm_info_t *rinfo; - rcm_handle_t *rhandle; - int rv; - - if (rcm_alloc_handle(NULL, 0, NULL, &rhandle) != RCM_SUCCESS) { - return (RCM_FAILURE); - } - - rv = rcm_request_offline(rhandle, rcm_abstr_cp2300_name, - flags, &rinfo); - - if (rv == RCM_FAILURE) { - rcm_free_info(rinfo); - fail_rcm(rcm_abstr_cp2300_name, rhandle); - rcm_free_handle(rhandle); - return (RCM_FAILURE); - } - if (rv == RCM_CONFLICT) { - rcm_free_info(rinfo); - rcm_free_handle(rhandle); - return (RCM_CONFLICT); - } - - confirm_rcm(rcm_abstr_cp2300_name, rhandle); - rcm_free_info(rinfo); - rcm_free_handle(rhandle); - return (RCM_SUCCESS); -} - -/* - * utility routine to send response to an IPMI message - */ -static int -send_response2remote_device(uint8_t ipmb_addr, uint8_t cmd, uint8_t reqseq_lun, - uint8_t cc) -{ - int rc = SMC_SUCCESS; - sc_reqmsg_t req_pkt; - sc_rspmsg_t rsp_pkt; - uint8_t data = cc; /* completion code */ - - /* make a call to ctsmc lib */ - (void) smc_init_ipmi_msg(&req_pkt, cmd, DEFAULT_FD, 1, &data, - (reqseq_lun >> 2), ipmb_addr, SMC_NETFN_APP_RSP, - (reqseq_lun & 0x03)); - rc = smc_send_msg(DEFAULT_FD, &req_pkt, &rsp_pkt, - POLL_TIMEOUT); - - if (rc != SMC_SUCCESS) - syslog(LOG_ERR, gettext("SUNW_envmond:Error in sending response" - " to %x, error = %d"), ipmb_addr, rc); - return (rc); -} - -/* - * do all the checks like adminlock check, rcm check and initiate - * shutdown - */ -/*ARGSUSED*/ -static int -initiate_shutdown(boolean_t force) -{ - int rv; - uint_t rcmflags = 0; - struct timespec rqtp, rmtp; - - if (!env_shutdown_system) { - return (-1); - } - - /* check the adminlock prop */ - if ((!force) && (env_admin_lock_enabled(cpu_nodehdl))) { - syslog(LOG_ERR, gettext("SUNW_envmond: " - "CPU in use! Cannot shutdown")); - return (-1); - } - - if (force) { - rcmflags = RCM_FORCE; - } - - /* check with rcm framework */ - rv = check_rcm(rcm_abstr_cp2300_name, rcmflags); - - if ((rv == RCM_FAILURE) || (rv == RCM_CONFLICT)) { - syslog(LOG_ERR, gettext("SUNW_envmond: RCM error %d, Cannot" - " shutdown"), rv); - return (-1); - } - - /* - * force events on chassis node - */ - if (force) { - if (post_dr_req_event(chassis_nodehdl, DR_REQ_OUTGOING_RES, - NO_WAIT) == PICL_SUCCESS) { - /* wait a little for clean up of frutree */ - rqtp.tv_sec = 5; - rqtp.tv_nsec = 0; - (void) nanosleep(&rqtp, &rmtp); - } - /* - * If force option is set, do it right here for now - * since there is no way to pass this info via events - * to frutree framework. - */ - shutdown_cpu(force); - return (0); - } - - if (post_dr_req_event(chassis_nodehdl, DR_REQ_OUTGOING_RES, NO_WAIT) - != PICL_SUCCESS) { - syslog(LOG_ERR, gettext("SUNW_envmond:cannot shutdown " - "the host CPU.")); - return (-1); - } - return (0); -} - -/* - * get the HEALTHY# line state - * Return -1 for Error - * 0 for HEALTHY# down - * 1 for HEALTHY# up - */ -static int -env_get_healthy_status() -{ - sc_reqmsg_t req_pkt; - sc_rspmsg_t rsp_pkt; - uint8_t size = 0; - - /* initialize the request packet */ - (void) smc_init_smc_msg(&req_pkt, SMC_GET_EXECUTION_STATE, - DEFAULT_SEQN, size); - - /* make a call to smc library to send cmd */ - if (smc_send_msg(DEFAULT_FD, &req_pkt, &rsp_pkt, - POLL_TIMEOUT) != SMC_SUCCESS) { - return (-1); - } - return (rsp_pkt.data[0] & IS_HEALTHY); -} - -/* - * initialization - */ -picl_errno_t -env_platmod_init() -{ - picl_errno_t rc = PICL_SUCCESS; - - if (rooth == 0) { - if (ptree_get_root(&rooth) != PICL_SUCCESS) { - return (rc); - } - } - - if (chassis_nodehdl == 0) { - if ((rc = ptree_get_node_by_path(PICL_FRUTREE_CHASSIS, - &chassis_nodehdl)) != PICL_SUCCESS) { - return (rc); - } - } - if (post_dr_req_event(chassis_nodehdl, DR_REQ_INCOMING_RES, - NO_WAIT) != PICL_SUCCESS) { - syslog(LOG_ERR, gettext("SUNW_envmond: Error in " - "Posting configure event for Chassis node")); - rc = PICL_FAILURE; - } - return (rc); -} - -/* - * release all the resources - */ -void -env_platmod_fini() -{ - cpu_geo_addr = 0; - rooth = platformh = sysmgmth = 0; - chassis_nodehdl = cpu_nodehdl = cpu_lnodehdl = 0; - env_chassis_state = FRU_STATE_UNKNOWN; - (void) ptree_delete_node(sensorh); - (void) ptree_destroy_node(sensorh); -} - -/* - * handle chassis state change - */ -static void -env_handle_chassis_state_event(char *state) -{ - if (strcmp(state, PICLEVENTARGVAL_CONFIGURING) == 0) { - env_chassis_state = FRU_STATE_CONFIGURING; - return; - } - - if (strcmp(state, PICLEVENTARGVAL_UNCONFIGURED) == 0) { - if (env_chassis_state == FRU_STATE_CONFIGURING || - env_chassis_state == FRU_STATE_UNKNOWN) { - /* picl intialization is failed, dont issue shutdown */ - env_chassis_state = FRU_STATE_UNCONFIGURED; - return; - } - env_chassis_state = FRU_STATE_UNCONFIGURED; - if (env_reset_cpu) { - (void) pclose(popen(RESET_CPU, "w")); - } else { - (void) pclose(popen(SHUTDOWN_CPU, "w")); - } - return; - } - - if (strcmp(state, PICLEVENTARGVAL_CONFIGURED) == 0) { - env_chassis_state = FRU_STATE_CONFIGURED; - } -} - -/* - * event handler for watchdog state change event - */ -static picl_errno_t -env_handle_watchdog_expiry(picl_nodehdl_t wd_nodehdl) -{ - picl_errno_t rc = PICL_SUCCESS; - char class[PICL_CLASSNAMELEN_MAX]; - char value[PICL_PROPNAMELEN_MAX]; - char cond[BUF_SIZE]; - - if ((rc = ptree_get_propval_by_name(wd_nodehdl, - PICL_PROP_CLASSNAME, class, - PICL_CLASSNAMELEN_MAX)) != PICL_SUCCESS) { - return (rc); - } - - /* if the event is not of watchdog-timer, return */ - if (strcmp(class, PICL_CLASS_WATCHDOG_TIMER) != 0) { - return (PICL_INVALIDARG); - } - - if ((rc = ptree_get_propval_by_name(wd_nodehdl, - PICL_PROP_WATCHDOG_ACTION, value, sizeof (value))) != - PICL_SUCCESS) { - return (rc); - } - - /* if action is none, dont do anything */ - if (strcmp(value, PICL_PROPVAL_WD_ACTION_ALARM) != 0) { - return (PICL_SUCCESS); - } - - (void) strncpy(cond, PICLEVENTARGVAL_FAILED, sizeof (cond)); - /* update CPU condition to failed */ - if ((rc = ptree_update_propval_by_name(cpu_nodehdl, - PICL_PROP_CONDITION, cond, sizeof (cond))) != PICL_SUCCESS) { - return (rc); - } - - /* post dr ap state change event */ - rc = post_dr_ap_state_change_event(cpu_nodehdl, - DR_RESERVED_ATTR, NO_COND_TIMEDWAIT); - return (rc); -} - -/* - * rotine that handles all the picl state and condition change events - */ -void -env_platmod_handle_event(const char *ename, const void *earg, size_t size) -{ - picl_errno_t rc; - picl_nodehdl_t nodeh = 0; - picl_prophdl_t proph; - nvlist_t *nvlp; - char *value; - boolean_t state_event; - env_state_event_t event; - char result[PICL_PROPNAMELEN_MAX]; - uint64_t status_time, cond_time; - char cond[BUF_SIZE]; - - if (!ename) { - return; - } - if (strcmp(ename, PICLEVENT_STATE_CHANGE) == 0) { - state_event = B_TRUE; - } else if (strcmp(ename, PICLEVENT_CONDITION_CHANGE) == 0) { - state_event = B_FALSE; - } else { - syslog(LOG_ERR, gettext("SUNW_envmond: unknown event:%s\n"), - ename); - return; - } - - /* unpack the nvlist and get the information */ - if (nvlist_unpack((char *)earg, size, &nvlp, NULL)) { - return; - } - if (nvlist_lookup_uint64(nvlp, PICLEVENTARG_NODEHANDLE, &nodeh) == -1) { - nvlist_free(nvlp); - return; - } - if (nvlist_lookup_string(nvlp, (state_event) ? - PICLEVENTARG_STATE : - PICLEVENTARG_CONDITION, &value) != 0) { - nvlist_free(nvlp); - return; - } - - if (env_debug & PICLEVENTS) { - if (ptree_get_propval_by_name(nodeh, PICL_PROP_NAME, - result, sizeof (result)) != PICL_SUCCESS) { - syslog(LOG_ERR, " SUNW_envmond: error in getting" - " node name"); - nvlist_free(nvlp); - return; - } - syslog(LOG_INFO, "SUNW_envmond: %s (%s) on %s", - ename, value, result); - } - - if (chassis_nodehdl == 0 && state_event) { - if (ptree_get_propval_by_name(nodeh, PICL_PROP_NAME, - result, sizeof (result)) != PICL_SUCCESS) { - nvlist_free(nvlp); - return; - } - if (strcmp(result, PICL_NODE_CHASSIS) == 0) { - chassis_nodehdl = nodeh; - } - } - - if (nodeh == chassis_nodehdl && state_event) { - env_handle_chassis_state_event(value); - nvlist_free(nvlp); - return; - } - - if (strcmp(PICLEVENTARGVAL_DISCONNECTED, value) == 0) { - event = LOC_STATE_DISCONNECTED; - } else if (strcmp(PICLEVENTARGVAL_CONNECTED, value) == 0) { - event = LOC_STATE_CONNECTED; - } else if (strcmp(PICLEVENTARGVAL_EMPTY, value) == 0) { - event = LOC_STATE_EMPTY; - } else if (strcmp(PICLEVENTARGVAL_CONFIGURED, value) == 0) { - event = FRU_STATE_CONFIGURED; - } else if (strcmp(PICLEVENTARGVAL_UNCONFIGURED, value) == 0) { - event = FRU_STATE_UNCONFIGURED; - } else if (strcmp(PICL_PROPVAL_WD_STATE_EXPIRED, value) == 0) { - /* watchdog expiry event */ - if ((rc = env_handle_watchdog_expiry(nodeh)) != PICL_SUCCESS) { - syslog(LOG_ERR, gettext("SUNW_envmond:Error in handling" - "watchdog expiry event")); - } - nvlist_free(nvlp); - return; - } else { - nvlist_free(nvlp); - return; - } - - switch (event) { - case LOC_STATE_EMPTY: - break; - - case LOC_STATE_DISCONNECTED: - if (nodeh == cpu_lnodehdl) { - (void) initiate_shutdown(B_FALSE); - } - break; - case LOC_STATE_CONNECTED: - if (nodeh != cpu_lnodehdl) { - break; - } - if (ptree_get_propval_by_name(cpu_lnodehdl, - PICL_PROP_CHILD, &cpu_nodehdl, - sizeof (picl_nodehdl_t)) != PICL_SUCCESS) { - syslog(LOG_ERR, gettext("SUNW_envmond:Cannot " - "initialize CPU node handle %llx"), nodeh); - cpu_nodehdl = 0; - } - break; - case FRU_STATE_CONFIGURED: - if (nodeh != cpu_nodehdl) { - break; - } - if (ptree_get_prop_by_name(cpu_nodehdl, - PICL_PROP_STATUS_TIME, &proph) != PICL_SUCCESS) { - status_time = (uint64_t)time(NULL); - (void) env_create_property(PICL_PTYPE_TIMESTAMP, - PICL_READ, sizeof (status_time), - PICL_PROP_STATUS_TIME, NULLREAD, - NULLWRITE, cpu_nodehdl, &proph, - &status_time); - } - if (ptree_get_prop_by_name(cpu_nodehdl, - PICL_PROP_CONDITION_TIME, &proph) != PICL_SUCCESS) { - cond_time = (uint64_t)time(NULL); - (void) env_create_property(PICL_PTYPE_TIMESTAMP, - PICL_READ, sizeof (cond_time), - PICL_PROP_CONDITION_TIME, NULLREAD, - NULLWRITE, cpu_nodehdl, &proph, - &cond_time); - } - env_shutdown_system = B_FALSE; - /* if HEALTHY# is UP update the condition to "ok" */ - switch (env_get_healthy_status()) { - case 0: - /* update CPU condition to failed */ - (void) strncpy(cond, PICLEVENTARGVAL_FAILED, sizeof (cond)); - break; - case 1: - /* update CPU condition to ok */ - (void) strncpy(cond, PICLEVENTARGVAL_OK, sizeof (cond)); - break; - case -1: /*FALLTHRU*/ - default: - /* update the condition to unknown */ - (void) strncpy(cond, PICLEVENTARGVAL_UNKNOWN, sizeof (cond)); - syslog(LOG_ERR, gettext("SUNW_envmond:Error in " - "reading HEALTHY# status")); - } - - if ((rc = ptree_update_propval_by_name(cpu_nodehdl, - PICL_PROP_CONDITION, cond, sizeof (cond))) != - PICL_SUCCESS) { - syslog(LOG_ERR, gettext("SUNW_envmond:Error in " - "updating CPU condition, error = %d"), rc); - } - break; - case FRU_STATE_UNCONFIGURED: - if (env_reset_cpu && nodeh == cpu_nodehdl) { - (void) initiate_shutdown(B_FALSE); - } - break; - default: - break; - } /* end of switch */ - nvlist_free(nvlp); -} - -/* - * This thread waits for dmc message to come, as it has to send - * response ACK back to DMC. Otherwise DMC may think that message - * is lost and issues poweroff on a node. So there is a chance for - * CPU to be powered off in the middle of shutdown process. If the - * DMC message didnt come, then process the local shutdown request. - */ -/*ARGSUSED*/ -static void * -env_wait_for_dmc_msg(void *args) -{ - struct timeval ct; - struct timespec to; - - (void) pthread_mutex_lock(&env_dmc_mutex); - if (env_got_dmc_msg == B_TRUE) { - (void) pthread_mutex_unlock(&env_dmc_mutex); - return (NULL); - } - - /* - * wait for specified time to check if dmc sends the - * shutdown request - */ - (void) gettimeofday(&ct, NULL); - to.tv_sec = ct.tv_sec + env_dmc_wait_time; - to.tv_nsec = 0; - (void) pthread_cond_timedwait(&env_dmc_cond, - &env_dmc_mutex, &to); - if (env_got_dmc_msg == B_TRUE) { - (void) pthread_mutex_unlock(&env_dmc_mutex); - return (NULL); - } - (void) pthread_mutex_unlock(&env_dmc_mutex); - - env_shutdown_system = B_TRUE; - env_reset_cpu = B_FALSE; - (void) initiate_shutdown(B_FALSE); - return (NULL); -} - -/* - * Handle the Latch open event(shutdown the node) - */ -picl_errno_t -env_platmod_handle_latch_open() -{ - /* - * create a thread to process local event after waiting for DMC CPU - * node state offline message - */ - if (pthread_create(&dmc_thr_tid, NULL, &env_wait_for_dmc_msg, - NULL) != 0) { - syslog(LOG_ERR, gettext("SUNW_envmond:Error in creating " - "dmc thread")); - return (PICL_FAILURE); - } - return (PICL_SUCCESS); -} - -/* - * For Sanibel, hotswap initialization is not reqd. - */ -picl_errno_t -env_platmod_setup_hotswap() -{ - return (PICL_SUCCESS); -} - -/* - * For sanibel this supoort is not required - */ -picl_errno_t -env_platmod_sp_monitor() -{ - return (PICL_SUCCESS); -} - -/* - * For sanibel this supoort is not required - */ -picl_errno_t -env_platmod_create_hotswap_prop() -{ - return (PICL_SUCCESS); -} - -/* - * For sanibel this supoort is not required - */ -/*ARGSUSED*/ -void -process_platmod_sp_heartbeat(uint8_t data) -{ -} - -/* - * For sanibel this supoort is not required - */ -/*ARGSUSED*/ -int -process_platmod_async_msg_notif(void *resdatap) -{ - return (0); -} - -/* - * For sanibel this supoort is not required - */ -/*ARGSUSED*/ -int -process_platmod_change_cpci_state(void *res_datap) -{ - return (0); -} - -/* - * handle request from service processor for shutdown/online - */ -int -process_platmod_change_cpu_node_state(void *res_datap) -{ - int rc = SMC_SUCCESS; - uint8_t state = BYTE_7(res_datap); - boolean_t force_flag = B_FALSE; - - switch (state & 1) { - case CPU_NODE_STATE_OFFLINE: - (void) pthread_mutex_lock(&env_dmc_mutex); - env_got_dmc_msg = B_TRUE; - (void) pthread_cond_signal(&env_dmc_cond); - (void) pthread_mutex_unlock(&env_dmc_mutex); - env_shutdown_system = B_TRUE; - if ((state >> 2) & 1) - env_reset_cpu = B_TRUE; - if (state >> 1 & 1) { /* force flag set? */ - force_flag = B_TRUE; - } else { - force_flag = B_FALSE; - } - - if (initiate_shutdown(force_flag) == 0) { - if ((rc = send_response2remote_device(SMC_BMC_ADDR, - EVENT_MSG_CHANGE_CPU_NODE_STATE, - BYTE_5(res_datap), 0x0)) != SMC_SUCCESS) { - return (rc); - } - } else { - if ((rc = send_response2remote_device(SMC_BMC_ADDR, - EVENT_MSG_CHANGE_CPU_NODE_STATE, - BYTE_5(res_datap), 0xFF)) != SMC_SUCCESS) { - return (rc); - } - env_shutdown_system = B_FALSE; - if ((state >> 2) & 1) - env_reset_cpu = B_FALSE; - } - break; - case CPU_NODE_STATE_ONLINE: - if ((rc = send_response2remote_device(SMC_BMC_ADDR, - EVENT_MSG_CHANGE_CPU_NODE_STATE, - BYTE_5(res_datap), 0x0)) != SMC_SUCCESS) { - return (rc); - } - break; - default: - break; - } - return (0); -} - -/* - * Handle change in state of service processor - */ -int -process_platmod_sp_state_change_notif(void *res_datap) -{ - int rc = SMC_SUCCESS; - uint8_t state = BYTE_7(res_datap); - uint8_t rq_addr = BYTE_4(res_datap); - - if (rq_addr != SMC_BMC_ADDR) { - return (PICL_FAILURE); - } - - switch (state) { - case CPU_NODE_STATE_ONLINE: - /* Send ACK to service processor */ - if ((rc = send_response2remote_device(SMC_BMC_ADDR, - EVENT_MSG_AC_STATE_CHANGE, - BYTE_5(res_datap), 0x0)) != SMC_SUCCESS) { - return (rc); - } - break; - - case CPU_NODE_STATE_OFFLINE: - /* Send ACK to service processor */ - if ((rc = send_response2remote_device(SMC_BMC_ADDR, - EVENT_MSG_AC_STATE_CHANGE, - BYTE_5(res_datap), 0x0)) != SMC_SUCCESS) { - return (rc); - } - break; - - default: - if ((rc = send_response2remote_device(SMC_BMC_ADDR, - EVENT_MSG_AC_STATE_CHANGE, - BYTE_5(res_datap), 0xFF)) != SMC_SUCCESS) { - return (rc); - } - break; - } - return (0); -} - -/* - * For sanibel this supoort is not required - */ -/*ARGSUSED*/ -picl_errno_t -env_platmod_handle_bus_if_change(uint8_t data) -{ - return (PICL_SUCCESS); -} - -/* - * create the temperature sensor nodes - */ -picl_errno_t -env_platmod_create_sensors() -{ - picl_errno_t rc = PICL_SUCCESS; - - if (rooth == 0) { - if ((rc = ptree_get_root(&rooth)) != PICL_SUCCESS) { - return (rc); - } - } - - if (platformh == 0) { - if ((rc = ptree_get_node_by_path(PLATFORM_PATH, - &platformh)) != PICL_SUCCESS) { - return (rc); - } - } - - if (sysmgmth == 0) { - if ((rc = ptree_get_node_by_path(SYSMGMT_PATH, - &sysmgmth)) != PICL_SUCCESS) { - return (rc); - } - } - - rc = env_create_temp_sensor_node(sysmgmth, CPU_SENSOR_GEO_ADDR); - return (rc); -} - -/* - * handler for sensor event - */ -void -env_platmod_handle_sensor_event(void *res_datap) -{ - if (BYTE_4(res_datap) != CPU_SENSOR_GEO_ADDR) { - return; - } - env_handle_sensor_event(res_datap); -} diff --git a/usr/src/cmd/picl/plugins/sun4u/snowbird/envmond/piclsensors.c b/usr/src/cmd/picl/plugins/sun4u/snowbird/envmond/piclsensors.c deleted file mode 100644 index bb75e4c9e4..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/snowbird/envmond/piclsensors.c +++ /dev/null @@ -1,863 +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" - -/* - * Routines in this file are used to manage CPU temperature sensor - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "piclenvmond.h" -#include "piclsensors.h" - -#define NULLREAD (int (*)(ptree_rarg_t *, void *))0 -#define NULLWRITE (int (*)(ptree_warg_t *, const void *))0 -#define POLL_TIMEOUT 5000 -#define BUF_SIZE 50 - -/* packet lengths */ -#define ENV_GET_THRESHOLD_PKT_LEN 1 -#define ENV_SET_THRESHOLD_PKT_LEN 8 -#define ENV_READ_SENSOR_PKT_LEN 1 -#define ENV_SENSOR_EVENT_ENABLE_PKT_LEN 2 - -/* req pkt data */ -#define ENV_SENSOR_EVENT_ENABLE_MASK 0x80 - -/* ptree wrapper to create property */ -extern picl_errno_t env_create_property(int ptype, int pmode, - size_t psize, char *pname, int (*readfn)(ptree_rarg_t *, void *), - int (*writefn)(ptree_warg_t *, const void *), - picl_nodehdl_t nodeh, picl_prophdl_t *propp, void *vbuf); -extern int post_sensor_event(picl_nodehdl_t, char *, uint8_t); -extern int env_open_smc(void); -extern int env_debug; - -/* globals */ -int sensor_fd = -1; -picl_nodehdl_t sensorh = 0; -pthread_t env_temp_thr_tid; - -/* local vars */ -static env_temp_sensor_t temp_sensor; -static pthread_mutex_t sensor_mutex = PTHREAD_MUTEX_INITIALIZER; -static pthread_mutex_t env_temp_monitor_mutex = PTHREAD_MUTEX_INITIALIZER; -static pthread_cond_t env_temp_monitor_cv = PTHREAD_COND_INITIALIZER; -static env_temp_threshold_t env_curr_state = NORMAL_THRESHOLD; -static char *env_thresholds[] = { - PICL_PROP_LOW_WARNING, - PICL_PROP_LOW_SHUTDOWN, - PICL_PROP_LOW_POWER_OFF, - PICL_PROP_HIGH_WARNING, - PICL_PROP_HIGH_SHUTDOWN, - PICL_PROP_HIGH_POWER_OFF -}; -static int cpu_sensor_geo_addr = 0; - -/* local func prototypes */ -static void *env_temp_monitor(void *args); - -/* - * Reads the threshold value from hardware - */ -static picl_errno_t -env_get_temp_threshold(int sensor_no, int threshold_no, - int8_t *threshold_reading) -{ - sc_reqmsg_t req_pkt; - sc_rspmsg_t rsp_pkt; - smc_errno_t rc = SMC_SUCCESS; - uint8_t size = 0; - - if (threshold_no < 1 || threshold_no > 6) { - return (PICL_INVALIDARG); - } - - req_pkt.data[0] = sensor_no; - size = ENV_GET_THRESHOLD_PKT_LEN; - /* initialize the request packet */ - (void) smc_init_smc_msg(&req_pkt, SMC_SENSOR_THRESHOLD_GET, - DEFAULT_SEQN, size); - - /* make a call to smc library to send cmd */ - if ((rc = smc_send_msg(DEFAULT_FD, &req_pkt, &rsp_pkt, - POLL_TIMEOUT)) != SMC_SUCCESS) { - syslog(LOG_ERR, SMC_GET_SENSOR_THRES_FAILED, - sensor_no, rc); - return (PICL_FAILURE); - } - - switch (threshold_no) { - case LOW_WARNING_THRESHOLD: - if (LOW_WARNING_BIT(rsp_pkt.data[0])) { - *threshold_reading = rsp_pkt.data[1]; - } else { - return (PICL_PERMDENIED); - } - break; - case LOW_SHUTDOWN_THRESHOLD: - if (LOW_SHUTDOWN_BIT(rsp_pkt.data[0])) { - *threshold_reading = rsp_pkt.data[2]; - } else { - return (PICL_PERMDENIED); - } - break; - case LOW_POWEROFF_THRESHOLD: - if (LOW_POWEROFF_BIT(rsp_pkt.data[0])) { - *threshold_reading = rsp_pkt.data[3]; - } else { - return (PICL_PERMDENIED); - } - break; - case HIGH_WARNING_THRESHOLD: - if (HIGH_WARNING_BIT(rsp_pkt.data[0])) { - *threshold_reading = rsp_pkt.data[4]; - } else { - return (PICL_PERMDENIED); - } - break; - case HIGH_SHUTDOWN_THRESHOLD: - if (HIGH_SHUTDOWN_BIT(rsp_pkt.data[0])) { - *threshold_reading = rsp_pkt.data[5]; - } else { - return (PICL_PERMDENIED); - } - break; - case HIGH_POWEROFF_THRESHOLD: - if (HIGH_POWEROFF_BIT(rsp_pkt.data[0])) { - *threshold_reading = rsp_pkt.data[6]; - } else { - return (PICL_PERMDENIED); - } - break; - default: - return (PICL_INVALIDARG); - } - return (PICL_SUCCESS); -} - -/* - * Sets the threshold temperature specified in given sensor number - */ -static picl_errno_t -env_set_temp_threshold(int sensor_no, int threshold_no, - int8_t set_value) -{ - sc_reqmsg_t req_pkt; - sc_rspmsg_t rsp_pkt; - smc_errno_t rc; - uint8_t size = 0; - - if (threshold_no < 1 || threshold_no > 6) { - return (PICL_INVALIDARG); - } - - req_pkt.data[0] = (int8_t)sensor_no; - req_pkt.data[1] = 0x01 << (threshold_no - 1); /* set the bit mask */ - req_pkt.data[1 + threshold_no] = set_value; - size = ENV_SET_THRESHOLD_PKT_LEN; - - /* initialize the request packet */ - (void) smc_init_smc_msg(&req_pkt, SMC_SENSOR_THRESHOLD_SET, - DEFAULT_SEQN, size); - - /* make a call to smc library to send cmd */ - if ((rc = smc_send_msg(sensor_fd, &req_pkt, &rsp_pkt, - POLL_TIMEOUT)) != SMC_SUCCESS) { - syslog(LOG_ERR, SMC_SET_SENSOR_THRES_FAILED, - sensor_no, rc); - return (PICL_FAILURE); - } - return (PICL_SUCCESS); -} - -/* - * returns the sensor reading of the SMC sensor specified in sensor_no - */ -static picl_errno_t -env_get_sensor_reading(uint8_t sensor_no, int8_t *sensor_reading) -{ - sc_reqmsg_t req_pkt; - sc_rspmsg_t rsp_pkt; - smc_errno_t rc = SMC_SUCCESS; - uint8_t size = 0; - - req_pkt.data[0] = sensor_no; - /* initialize the request packet */ - size = ENV_READ_SENSOR_PKT_LEN; - (void) smc_init_smc_msg(&req_pkt, SMC_SENSOR_READING_GET, - DEFAULT_SEQN, size); - - /* make a call to smc library to send cmd */ - if ((rc = smc_send_msg(DEFAULT_FD, &req_pkt, &rsp_pkt, - POLL_TIMEOUT)) != SMC_SUCCESS) { - syslog(LOG_ERR, SMC_GET_SENSOR_READING_FAILED, - sensor_no, rc); - return (PICL_FAILURE); - } - *sensor_reading = rsp_pkt.data[0]; - return (PICL_SUCCESS); -} - -/* - * volatile call back function to read the current temparature - */ -static int -get_curr_temp(ptree_rarg_t *argp, void *bufp) -{ - uint8_t sensor_no; - int8_t sensor_reading; - picl_errno_t rc; - - if ((rc = ptree_get_propval_by_name(argp->nodeh, - PICL_PROP_GEO_ADDR, &sensor_no, sizeof (sensor_no))) != - PICL_SUCCESS) { - return (rc); - } - - /* read the temp from SMC f/w */ - if ((rc = env_get_sensor_reading(sensor_no, &sensor_reading)) != - PICL_SUCCESS) { - return (rc); - } - *(int8_t *)bufp = sensor_reading; - - /* update the internal cache */ - (void) pthread_mutex_lock(&sensor_mutex); - temp_sensor.curr_temp = sensor_reading; - (void) pthread_mutex_unlock(&sensor_mutex); - - return (PICL_SUCCESS); -} - -/* - * volatile function that returns the state of sensor - */ -static int -get_sensor_condition(ptree_rarg_t *argp, void *bufp) -{ - uint8_t sensor_no; - picl_errno_t rc = PICL_SUCCESS; - int8_t sensor_reading; - - if ((rc = ptree_get_propval_by_name(argp->nodeh, - PICL_PROP_GEO_ADDR, &sensor_no, sizeof (sensor_no))) != - PICL_SUCCESS) { - return (rc); - } - - /* read the curr temp from SMC f/w */ - if ((rc = env_get_sensor_reading(sensor_no, &sensor_reading)) != - PICL_SUCCESS) { - (void) pthread_mutex_lock(&sensor_mutex); - (void) strncpy(temp_sensor.state, PICLEVENTARGVAL_UNKNOWN, - sizeof (temp_sensor.state)); - (void) strncpy((char *)bufp, PICLEVENTARGVAL_UNKNOWN, - PICL_PROPNAMELEN_MAX); - (void) pthread_mutex_unlock(&sensor_mutex); - return (PICL_SUCCESS); - } - - (void) pthread_mutex_lock(&sensor_mutex); - - if (sensor_reading > temp_sensor.hi_shutdown || - sensor_reading < temp_sensor.lo_shutdown) - (void) strncpy(temp_sensor.state, - PICLEVENTARGVAL_SENSOR_COND_SHUTDOWN, - sizeof (temp_sensor.state)); - else if (sensor_reading > temp_sensor.hi_warning || - sensor_reading < temp_sensor.lo_warning) - (void) strncpy(temp_sensor.state, - PICLEVENTARGVAL_SENSOR_COND_WARNING, - sizeof (temp_sensor.state)); - else - (void) strncpy(temp_sensor.state, PICLEVENTARGVAL_OK, - sizeof (temp_sensor.state)); - (void) strncpy((char *)bufp, temp_sensor.state, - PICL_PROPNAMELEN_MAX); - - (void) pthread_mutex_unlock(&sensor_mutex); - return (PICL_SUCCESS); -} - -/* - * volatile property to read sensor thresholds - */ -static int -get_sensor_thr(ptree_rarg_t *argp, void *bufp) -{ - picl_errno_t rc = PICL_SUCCESS; - ptree_propinfo_t pi; - char prop_name[PICL_PROPNAMELEN_MAX]; - - if ((rc = ptree_get_propinfo(argp->proph, &pi)) != PICL_SUCCESS) { - return (rc); - } - (void) strncpy(prop_name, pi.piclinfo.name, sizeof (prop_name)); - - (void) pthread_mutex_lock(&sensor_mutex); - - if (strcmp(prop_name, PICL_PROP_LOW_WARNING) == 0) { - *(int8_t *)bufp = temp_sensor.lo_warning; - } else if (strcmp(prop_name, PICL_PROP_LOW_SHUTDOWN) == 0) { - *(int8_t *)bufp = temp_sensor.lo_shutdown; - } else if (strcmp(prop_name, PICL_PROP_LOW_POWER_OFF) == 0) { - *(int8_t *)bufp = temp_sensor.lo_poweroff; - } else if (strcmp(prop_name, PICL_PROP_HIGH_WARNING) == 0) { - *(int8_t *)bufp = temp_sensor.hi_warning; - } else if (strcmp(prop_name, PICL_PROP_HIGH_SHUTDOWN) == 0) { - *(int8_t *)bufp = temp_sensor.hi_shutdown; - } else if (strcmp(prop_name, PICL_PROP_HIGH_POWER_OFF) == 0) { - *(int8_t *)bufp = temp_sensor.hi_poweroff; - } else { - rc = PICL_INVALIDARG; - } - - (void) pthread_mutex_unlock(&sensor_mutex); - return (rc); -} - -/* - * volatile callback function to set the temp thresholds - */ -static int -set_sensor_thr(ptree_warg_t *argp, const void *bufp) -{ - picl_errno_t rc = PICL_SUCCESS; - ptree_propinfo_t pi; - int threshold_no = 0; - int8_t temp = *(int8_t *)bufp; - char cmd[BUF_SIZE]; - char prop_name[PICL_PROPNAMELEN_MAX]; - - if ((rc = ptree_get_propinfo(argp->proph, &pi)) != PICL_SUCCESS) { - return (rc); - } - (void) strncpy(prop_name, pi.piclinfo.name, sizeof (prop_name)); - cmd[0] = '\0'; - - (void) pthread_mutex_lock(&sensor_mutex); - - if (strcmp(prop_name, PICL_PROP_LOW_WARNING) == 0) { - /* warning cannot be less than shutdown threshold */ - if (temp <= temp_sensor.lo_shutdown) { - (void) pthread_mutex_unlock(&sensor_mutex); - return (PICL_INVALIDARG); - } - threshold_no = LOW_WARNING_THRESHOLD; - } else if (strcmp(prop_name, PICL_PROP_LOW_SHUTDOWN) == 0) { - /* shutdown cannot be greater than warning threshold */ - if (temp >= temp_sensor.lo_warning) { - (void) pthread_mutex_unlock(&sensor_mutex); - return (PICL_INVALIDARG); - } - threshold_no = LOW_SHUTDOWN_THRESHOLD; - } else if (strcmp(prop_name, PICL_PROP_LOW_POWER_OFF) == 0) { - (void) pthread_mutex_unlock(&sensor_mutex); - return (PICL_PERMDENIED); - } else if (strcmp(prop_name, PICL_PROP_HIGH_WARNING) == 0) { - if ((temp + 5) > temp_sensor.hi_shutdown) { - (void) pthread_mutex_unlock(&sensor_mutex); - return (PICL_INVALIDARG); - } - /* change the OBP nvram property */ - (void) snprintf(cmd, sizeof (cmd), - EEPROM_WARNING_CMD, temp); - threshold_no = HIGH_WARNING_THRESHOLD; - } else if (strcmp(prop_name, PICL_PROP_HIGH_SHUTDOWN) == 0) { - if ((temp - 5) < temp_sensor.hi_warning) { - (void) pthread_mutex_unlock(&sensor_mutex); - return (PICL_INVALIDARG); - } - /* change the OBP nvram property */ - (void) snprintf(cmd, sizeof (cmd), - EEPROM_SHUTDOWN_CMD, temp); - threshold_no = HIGH_SHUTDOWN_THRESHOLD; - } else if (strcmp(prop_name, PICL_PROP_HIGH_POWER_OFF) == 0) { - if (temp > MAX_POWEROFF_TEMP || - (temp - 5) < temp_sensor.hi_shutdown) { - (void) pthread_mutex_unlock(&sensor_mutex); - return (PICL_INVALIDARG); - } - /* change the OBP nvram property */ - threshold_no = HIGH_POWEROFF_THRESHOLD; - (void) snprintf(cmd, sizeof (cmd), - EEPROM_POWEROFF_CMD, temp); - } else { - (void) pthread_mutex_unlock(&sensor_mutex); - return (PICL_INVALIDARG); - } - (void) pthread_mutex_unlock(&sensor_mutex); - - if ((rc = env_set_temp_threshold(cpu_sensor_geo_addr, - threshold_no, temp)) != PICL_SUCCESS) { - return (rc); - } - - (void) pthread_mutex_lock(&sensor_mutex); - switch (threshold_no) { - case LOW_WARNING_THRESHOLD: - temp_sensor.lo_warning = temp; - break; - case LOW_SHUTDOWN_THRESHOLD: - temp_sensor.lo_shutdown = temp; - break; - case LOW_POWEROFF_THRESHOLD: - temp_sensor.lo_poweroff = temp; - break; - case HIGH_WARNING_THRESHOLD: - temp_sensor.hi_warning = temp; - break; - case HIGH_SHUTDOWN_THRESHOLD: - temp_sensor.hi_shutdown = temp; - break; - case HIGH_POWEROFF_THRESHOLD: - temp_sensor.hi_poweroff = temp; - break; - } - (void) pthread_mutex_unlock(&sensor_mutex); - - /* execute the cmd to change OBP nvram property */ - if (cmd[0]) { - (void) pclose(popen(cmd, "w")); - } - return (PICL_SUCCESS); -} - -/* - * this routine reads the hardware state and initialises the internal - * cache for temperature thresholds - */ -static picl_errno_t -env_init_temp_sensor_values(int sensor_no, env_temp_sensor_t *sensor) -{ - if (env_get_sensor_reading(sensor_no, &sensor->curr_temp) != - PICL_SUCCESS) { - return (PICL_FAILURE); - } - - if (env_get_temp_threshold(sensor_no, LOW_WARNING_THRESHOLD, - &sensor->lo_warning) != PICL_SUCCESS) { - syslog(LOG_ERR, SMC_GET_LWT_FAILED); - return (PICL_FAILURE); - } - - if (env_get_temp_threshold(sensor_no, LOW_SHUTDOWN_THRESHOLD, - &sensor->lo_shutdown) != PICL_SUCCESS) { - syslog(LOG_ERR, SMC_GET_LST_FAILED); - return (PICL_FAILURE); - } - - if (env_get_temp_threshold(sensor_no, LOW_POWEROFF_THRESHOLD, - &sensor->lo_poweroff) != PICL_SUCCESS) { - syslog(LOG_ERR, SMC_GET_LPT_FAILED); - return (PICL_FAILURE); - } - - if (env_get_temp_threshold(sensor_no, HIGH_WARNING_THRESHOLD, - &sensor->hi_warning) != PICL_SUCCESS) { - syslog(LOG_ERR, SMC_SET_LWT_FAILED); - return (PICL_FAILURE); - } - - if (env_get_temp_threshold(sensor_no, HIGH_SHUTDOWN_THRESHOLD, - &sensor->hi_shutdown) != PICL_SUCCESS) { - syslog(LOG_ERR, SMC_SET_LST_FAILED); - return (PICL_FAILURE); - } - - if (env_get_temp_threshold(sensor_no, HIGH_POWEROFF_THRESHOLD, - &sensor->hi_poweroff) != PICL_SUCCESS) { - syslog(LOG_ERR, SMC_SET_LPT_FAILED); - return (PICL_FAILURE); - } - - if (sensor->curr_temp > sensor->hi_shutdown || - sensor->curr_temp < sensor->lo_shutdown) { - (void) strncpy(sensor->state, - PICLEVENTARGVAL_SENSOR_COND_SHUTDOWN, - sizeof (sensor->state)); - } else if (sensor->curr_temp > sensor->hi_warning || - sensor->curr_temp < sensor->lo_warning) { - (void) strncpy(sensor->state, - PICLEVENTARGVAL_SENSOR_COND_WARNING, - sizeof (sensor->state)); - } else { - (void) strncpy(sensor->state, PICLEVENTARGVAL_OK, - sizeof (sensor->state)); - } - return (PICL_SUCCESS); -} - -/* - * sensor_event_enable_set: enables or disables Event Message generation - * from a sensor specified by sensor_no - */ -static int -sensor_event_enable_set(uint8_t sensor_no, boolean_t enable) -{ - smc_errno_t rc = SMC_SUCCESS; - sc_reqmsg_t req_pkt; - sc_rspmsg_t rsp_pkt; - uint8_t size = 0; - - req_pkt.data[0] = sensor_no; - req_pkt.data[1] = 0; - if (enable) { - req_pkt.data[1] |= ENV_SENSOR_EVENT_ENABLE_MASK; - } - size = ENV_SENSOR_EVENT_ENABLE_PKT_LEN; - - (void) smc_init_smc_msg(&req_pkt, SMC_SENSOR_EVENT_ENABLE_SET, - DEFAULT_SEQN, size); - - /* make a call to smc library to send cmd */ - if ((rc = smc_send_msg(DEFAULT_FD, &req_pkt, &rsp_pkt, - POLL_TIMEOUT)) != SMC_SUCCESS) { - syslog(LOG_ERR, SMC_ENABLE_SENSOR_EVENT_FAILED, rc); - return (PICL_FAILURE); - } - return (PICL_SUCCESS); -} - -/* - * creates temperature sensor node and all of its properties - */ -picl_errno_t -env_create_temp_sensor_node(picl_nodehdl_t parenth, uint8_t sensor_no) -{ - int i = 0; - picl_errno_t rc = PICL_SUCCESS; - int8_t sensor_reading = 0; - struct strioctl strio; - sc_cmdspec_t set; - - sensor_fd = env_open_smc(); - if (sensor_fd < 0) { - syslog(LOG_ERR, gettext("SUNW_envmond:Error in " - "opening SMC(failed to create sensor nodes)")); - return (PICL_FAILURE); - } - - /* grab exclusive access to set the thresholds */ - set.args[0] = SMC_SENSOR_THRESHOLD_SET; - set.attribute = SC_ATTR_EXCLUSIVE; - strio.ic_cmd = SCIOC_MSG_SPEC; - strio.ic_timout = 0; - strio.ic_len = 2; - strio.ic_dp = (char *)&set; - if (ioctl(sensor_fd, I_STR, &strio) < 0) { - syslog(LOG_ERR, SMC_GET_EXCLUSIVE_ERR); - (void) close(sensor_fd); - return (PICL_FAILURE); - } - - cpu_sensor_geo_addr = sensor_no; - /* create temperature sensor node */ - if ((rc = ptree_create_and_add_node(parenth, CPU_SENSOR, - PICL_CLASS_TEMPERATURE_SENSOR, &sensorh)) != - PICL_SUCCESS) { - (void) close(sensor_fd); - return (rc); - } - - /* create Label prop. */ - if ((rc = env_create_property(PICL_PTYPE_CHARSTRING, PICL_READ, - PICL_PROPNAMELEN_MAX, PICL_PROP_LABEL, NULLREAD, - NULLWRITE, sensorh, (picl_prophdl_t *)NULL, - (char *)PICL_PROPVAL_LABEL_AMBIENT)) != PICL_SUCCESS) { - (void) ptree_delete_node(sensorh); - (void) ptree_destroy_node(sensorh); - (void) close(sensor_fd); - return (rc); - } - - /* create the geo-addr property */ - if ((rc = env_create_property(PICL_PTYPE_UNSIGNED_INT, - PICL_READ, sizeof (sensor_no), PICL_PROP_GEO_ADDR, - NULLREAD, NULLWRITE, sensorh, (picl_prophdl_t *)NULL, - &sensor_no)) != PICL_SUCCESS) { - (void) ptree_delete_node(sensorh); - (void) ptree_destroy_node(sensorh); - (void) close(sensor_fd); - return (rc); - } - - /* read the current temp from hardware */ - if (env_get_sensor_reading(sensor_no, &sensor_reading) != - PICL_SUCCESS) { - (void) ptree_delete_node(sensorh); - (void) ptree_destroy_node(sensorh); - (void) close(sensor_fd); - return (PICL_FAILURE); - } - - /* create temperature prop. */ - if ((rc = env_create_property(PICL_PTYPE_INT, - PICL_READ + PICL_VOLATILE, sizeof (sensor_reading), - PICL_PROP_TEMPERATURE, get_curr_temp, - NULLWRITE, sensorh, (picl_prophdl_t *)NULL, - &sensor_reading)) != PICL_SUCCESS) { - (void) ptree_delete_node(sensorh); - (void) ptree_destroy_node(sensorh); - (void) close(sensor_fd); - return (rc); - } - - /* create the threshold properties */ - for (i = 0; i < NUM_OF_THRESHOLDS; i++) { - if ((rc = env_create_property(PICL_PTYPE_INT, - PICL_READ + PICL_WRITE + PICL_VOLATILE, - sizeof (uint8_t), env_thresholds[i], - get_sensor_thr, set_sensor_thr, - sensorh, (picl_prophdl_t *)NULL, - NULL)) != PICL_SUCCESS) { - (void) ptree_delete_node(sensorh); - (void) ptree_destroy_node(sensorh); - (void) close(sensor_fd); - return (rc); - } - } - - /* intialise the internal cache */ - if (env_init_temp_sensor_values(cpu_sensor_geo_addr, - &temp_sensor) != PICL_SUCCESS) { - (void) ptree_delete_node(sensorh); - (void) ptree_destroy_node(sensorh); - (void) close(sensor_fd); - return (PICL_FAILURE); - } - - /* create STATE prop. */ - if ((rc = env_create_property(PICL_PTYPE_CHARSTRING, - PICL_READ + PICL_VOLATILE, PICL_PROPNAMELEN_MAX, - PICL_PROP_CONDITION, get_sensor_condition, NULLWRITE, - sensorh, (picl_prophdl_t *)NULL, - temp_sensor.state)) != PICL_SUCCESS) { - (void) ptree_delete_node(sensorh); - (void) ptree_destroy_node(sensorh); - (void) close(sensor_fd); - return (rc); - } - - /* start temperature monitoring thread */ - if (pthread_create(&env_temp_thr_tid, NULL, - &env_temp_monitor, NULL) != 0) { - syslog(LOG_ERR, gettext("SUNW_envmond:Error in " - "creating temperature monitor thread")); - } - - /* enable sensor-event */ - (void) sensor_event_enable_set(sensor_no, B_TRUE); - return (PICL_SUCCESS); -} - -/* - * handles the sensor events (post corresponding Condition picl event) - */ -void -env_handle_sensor_event(void *res_datap) -{ - uint8_t offset; - char sensor_cond[BUF_SIZE]; - - if (BYTE_4(res_datap) != cpu_sensor_geo_addr) { - return; - } - - if (BYTE_5(res_datap) != THRESHOLD_TYPE) { - return; - } - - if (env_debug & DEBUG) { - syslog(LOG_INFO, "Temperature = %d\n", BYTE_7(res_datap)); - syslog(LOG_INFO, - "Threshold changed to %d\n", BYTE_8(res_datap)); - } - - /* Threshold event */ - offset = BYTE_6(res_datap) & 0x0F; /* first 4 bits */ - switch (offset) { - case 0: - (void) pthread_mutex_lock(&env_temp_monitor_mutex); - if (env_curr_state == LOW_WARNING_THRESHOLD) { - (void) pthread_cond_signal(&env_temp_monitor_cv); - (void) pthread_mutex_unlock(&env_temp_monitor_mutex); - return; - } - env_curr_state = LOW_WARNING_THRESHOLD; - (void) pthread_cond_signal(&env_temp_monitor_cv); - (void) pthread_mutex_unlock(&env_temp_monitor_mutex); - (void) strncpy(sensor_cond, - PICLEVENTARGVAL_SENSOR_COND_WARNING, - sizeof (sensor_cond)); - syslog(LOG_CRIT, gettext("SUNW_envmond:current temperature (%d)" - " is below lower warning temperature (%d).\n"), - BYTE_7(res_datap), BYTE_8(res_datap)); - break; - case 2: - (void) pthread_mutex_lock(&env_temp_monitor_mutex); - if (env_curr_state == LOW_SHUTDOWN_THRESHOLD) { - (void) pthread_cond_signal(&env_temp_monitor_cv); - (void) pthread_mutex_unlock(&env_temp_monitor_mutex); - return; - } - env_curr_state = LOW_SHUTDOWN_THRESHOLD; - (void) pthread_cond_signal(&env_temp_monitor_cv); - (void) pthread_mutex_unlock(&env_temp_monitor_mutex); - (void) strncpy(sensor_cond, - PICLEVENTARGVAL_SENSOR_COND_SHUTDOWN, - sizeof (sensor_cond)); - syslog(LOG_CRIT, gettext("SUNW_envmond:current temperature (%d)" - " is below lower critical temperature (%d).\n"), - BYTE_7(res_datap), BYTE_8(res_datap)); - break; - case 7: - (void) pthread_mutex_lock(&env_temp_monitor_mutex); - if (env_curr_state == HIGH_WARNING_THRESHOLD) { - (void) pthread_cond_signal(&env_temp_monitor_cv); - (void) pthread_mutex_unlock(&env_temp_monitor_mutex); - return; - } - env_curr_state = HIGH_WARNING_THRESHOLD; - (void) pthread_cond_signal(&env_temp_monitor_cv); - (void) pthread_mutex_unlock(&env_temp_monitor_mutex); - (void) strncpy(sensor_cond, - PICLEVENTARGVAL_SENSOR_COND_WARNING, - sizeof (sensor_cond)); - syslog(LOG_CRIT, gettext("SUNW_envmond:current temperature (%d)" - " exceeds upper warning temperature (%d).\n"), - BYTE_7(res_datap), BYTE_8(res_datap)); - break; - case 9: - (void) pthread_mutex_lock(&env_temp_monitor_mutex); - if (env_curr_state == HIGH_SHUTDOWN_THRESHOLD) { - (void) pthread_cond_signal(&env_temp_monitor_cv); - (void) pthread_mutex_unlock(&env_temp_monitor_mutex); - return; - } - env_curr_state = HIGH_SHUTDOWN_THRESHOLD; - (void) pthread_cond_signal(&env_temp_monitor_cv); - (void) pthread_mutex_unlock(&env_temp_monitor_mutex); - (void) strncpy(sensor_cond, - PICLEVENTARGVAL_SENSOR_COND_SHUTDOWN, - sizeof (sensor_cond)); - syslog(LOG_CRIT, gettext("SUNW_envmond:current temperature (%d)" - " exceeds upper critical temperature (%d).\n"), - BYTE_7(res_datap), BYTE_8(res_datap)); - break; - default: - (void) strncpy(sensor_cond, PICLEVENTARGVAL_UNKNOWN, - sizeof (sensor_cond)); - break; - } - - if (post_sensor_event(sensorh, sensor_cond, NO_COND_TIMEDWAIT) - != PICL_SUCCESS) { - syslog(LOG_ERR, gettext("SUNW_envmond:Error in posting " - "%s event"), PICLEVENT_CONDITION_CHANGE); - } -} - -/* - * this thread monitors the temperature when the current temperature - * raises above high warning threshold - */ -/*ARGSUSED*/ -static void * -env_temp_monitor(void *args) -{ - int ret; - timespec_t to; - int8_t sensor_reading; - char sensor_cond[BUF_SIZE]; - - (void) pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); - (void) pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); - - for (;;) { - (void) pthread_mutex_lock(&env_temp_monitor_mutex); - if (env_curr_state == NORMAL_THRESHOLD) { - pthread_cond_wait(&env_temp_monitor_cv, - &env_temp_monitor_mutex); - } - - /* check until temp drops below warning threshold */ - to.tv_sec = ENV_TEMP_MONITOR_TIME; - to.tv_nsec = 0; - ret = pthread_cond_reltimedwait_np(&env_temp_monitor_cv, - &env_temp_monitor_mutex, &to); - if (ret != ETIMEDOUT) { - (void) pthread_mutex_unlock(&env_temp_monitor_mutex); - continue; - } - - /* read the present temperature */ - if (env_get_sensor_reading(cpu_sensor_geo_addr, - &sensor_reading) != PICL_SUCCESS) { - (void) pthread_mutex_unlock(&env_temp_monitor_mutex); - continue; - } - - (void) pthread_mutex_lock(&sensor_mutex); - if (sensor_reading < temp_sensor.hi_warning && - sensor_reading > temp_sensor.lo_warning) { - /* temperature is ok now */ - (void) strncpy(sensor_cond, PICLEVENTARGVAL_OK, - sizeof (sensor_cond)); - env_curr_state = NORMAL_THRESHOLD; - } - (void) pthread_mutex_unlock(&sensor_mutex); - - if (env_curr_state == NORMAL_THRESHOLD) { - syslog(LOG_NOTICE, gettext("SUNW_envmond:Current " - "temperature is ok now")); - if (post_sensor_event(sensorh, sensor_cond, - NO_COND_TIMEDWAIT) != PICL_SUCCESS) { - syslog(LOG_ERR, gettext("SUNW_envmond:Error in" - " posting %s event"), - PICLEVENT_CONDITION_CHANGE); - } - } - (void) pthread_mutex_unlock(&env_temp_monitor_mutex); - } - /*NOTREACHED*/ - return (NULL); -} diff --git a/usr/src/cmd/picl/plugins/sun4u/snowbird/envmond/piclsensors.h b/usr/src/cmd/picl/plugins/sun4u/snowbird/envmond/piclsensors.h deleted file mode 100644 index 07a1fd365a..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/snowbird/envmond/piclsensors.h +++ /dev/null @@ -1,119 +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 _PICLSENSORS_H -#define _PICLSENSORS_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifdef __cplusplus -extern "C" { -#endif - -#define CPU_SENSOR "CPU-sensor" -#define EEPROM_WARNING_CMD "eeprom warning-temperature=%d" -#define EEPROM_SHUTDOWN_CMD "eeprom critical-temperature=%d" -#define EEPROM_POWEROFF_CMD "eeprom shutdown-temperature=%d" - -#define ENV_TEMP_MONITOR_TIME 60 /* 60 secs */ - -#define NUM_OF_THRESHOLDS 6 -#define MAX_POWEROFF_TEMP 84 - -typedef struct { -uint8_t sensor_no; - int8_t curr_temp; - int8_t hi_poweroff; - int8_t hi_shutdown; - int8_t hi_warning; - int8_t lo_poweroff; - int8_t lo_shutdown; - int8_t lo_warning; - char state[20]; -} env_temp_sensor_t; - -typedef enum { - NORMAL_THRESHOLD = 0x0, /* temp is within thresholds */ - LOW_WARNING_THRESHOLD = 0x1, - LOW_SHUTDOWN_THRESHOLD = 0x2, - LOW_POWEROFF_THRESHOLD = 0x3, - HIGH_WARNING_THRESHOLD = 0x4, - HIGH_SHUTDOWN_THRESHOLD = 0x5, - HIGH_POWEROFF_THRESHOLD = 0x6 -} env_temp_threshold_t; - -#define LOW_WARNING_BIT(_X) (BIT_0(_X)) -#define LOW_SHUTDOWN_BIT(_X) (BIT_1(_X)) -#define LOW_POWEROFF_BIT(_X) (BIT_2(_X)) -#define HIGH_WARNING_BIT(_X) (BIT_3(_X)) -#define HIGH_SHUTDOWN_BIT(_X) (BIT_4(_X)) -#define HIGH_POWEROFF_BIT(_X) (BIT_5(_X)) - -#define THRESHOLD_TYPE 0x1 - -#define SMC_GET_SENSOR_READING_FAILED \ - gettext("SUNW_envmond: Error in getting sensor reading, "\ - "sensor = %d, errno = %d\n") -#define SMC_GET_SENSOR_THRES_FAILED \ - gettext("SUNW_envmond: Error in getting sensor threshold, "\ - "sensor = %d, errno = %d\n") -#define SMC_SET_SENSOR_THRES_FAILED \ - gettext("SUNW_envmond: Error in setting sensor threshold, "\ - "sensor = %d, errno = %d\n") -#define SMC_GET_LWT_FAILED \ - gettext("SUNW_envmond: Error in getting low warning threshold") -#define SMC_GET_LST_FAILED \ - gettext("SUNW_envmond: Error in getting low shutdown threshold") -#define SMC_GET_LPT_FAILED \ - gettext("SUNW_envmond: Error in getting low poweroff threshold") -#define SMC_GET_HWT_FAILED \ - gettext("SUNW_envmond: Error in getting high warning threshold") -#define SMC_GET_HST_FAILED \ - gettext("SUNW_envmond: Error in getting high shutdown threshold") -#define SMC_GET_HPT_FAILED \ - gettext("SUNW_envmond: Error in getting high poweroff threshold") -#define SMC_SET_LWT_FAILED \ - gettext("SUNW_envmond: Error in setting low warning threshold") -#define SMC_SET_LST_FAILED \ - gettext("SUNW_envmond: Error in setting low shutdown threshold") -#define SMC_SET_LPT_FAILED \ - gettext("SUNW_envmond: Error in setting low poweroff threshold") -#define SMC_SET_HWT_FAILED \ - gettext("SUNW_envmond: Error in setting high warning threshold") -#define SMC_SET_HST_FAILED \ - gettext("SUNW_envmond: Error in setting high shutdown threshold") -#define SMC_SET_HPT_FAILED \ - gettext("SUNW_envmond: Error in setting high poweroff threshold") -#define SMC_ENABLE_SENSOR_EVENT_FAILED \ - gettext("SUNW_envmond: Error in enabling sesnor events, error = %d") -#define SMC_GET_EXCLUSIVE_ERR \ - gettext("SUNW_envmond:Error in getting exclusive access to set "\ - "temperature sensor thresholds") -#ifdef __cplusplus -} -#endif - -#endif /* _PICLSENSORS_H */ diff --git a/usr/src/cmd/picl/plugins/sun4u/snowbird/frutree/Makefile b/usr/src/cmd/picl/plugins/sun4u/snowbird/frutree/Makefile deleted file mode 100644 index c4fe955aa5..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/snowbird/frutree/Makefile +++ /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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# cmd/picl/plugins/sun4u/snowbird/frutree/Makefile -# - -include $(SRC)/Makefile.psm - -LIBRARY = libpiclfrutree.a -VERS = .1 -PLATFORM = SUNW,Netra-CP2300 - -OBJECTS = piclfrutree.o picllibdevinfo.o piclkstat.o piclscsi.o - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/$(PLATFORM) - -include $(SRC)/cmd/picl/plugins/Makefile.com - -CPPFLAGS += -I$(SRC)/uts/common/ - -SRCS= $(OBJECTS:%.o=%.c) - -LIBS= $(DYNLIB) - -ROOTLIBDIR= $(ROOT_PLAT_PLUGINDIR) - -CPPFLAGS += -I$(USR_PSM_INCL_DIR) -CPPFLAGS += -I$(SRC)/cmd/picl/plugins/lib/picld_pluginutil -CPPFLAGS += -I$(SRC)/lib/libfru/include - -LDLIBS += -L$(SRC)/lib/libptree/$(MACH) -LDLIBS += -L$(SRC)/cmd/picl/plugins/lib/picld_pluginutil/$(MACH) -LDLIBS += -L$(ROOT)/usr/lib/picl/plugins -lcfgadm -lc -lpicltree \ - -lpicld_pluginutil -lfru -lnvpair -ldevinfo \ - -lkstat -lpicldevtree -LDLIBS += -R/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins - -.KEEP_STATE: - -SUBDIRS= - -POFILE= snowbird_piclfrutree.po -POFILES= $(SRCS:%.c=%.po) - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -all: $(LIBS) $(LIBLINKS) - -install: $(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) - -$(LIBLINKS): FRC - $(RM) $@; $(SYMLINK) ./$(DYNLIB) $@ - -_msg: $(MSGDOMAIN) $(POFILE) - $(RM) $(MSGDOMAIN)/$(POFILE) - $(CP) $(POFILE) $(MSGDOMAIN)/$(POFILE) - -$(POFILE): $(POFILES) - $(CAT) $(POFILES) > $(POFILE) - -$(MSGDOMAIN): - $(INS.dir) - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/snowbird/frutree/piclfrutree.c b/usr/src/cmd/picl/plugins/sun4u/snowbird/frutree/piclfrutree.c deleted file mode 100644 index deafdd3b57..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/snowbird/frutree/piclfrutree.c +++ /dev/null @@ -1,5969 +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" - -/* - * platform independent module to manage nodes under frutree - */ - -/* - * This file has the frutree initialization code: - * 1) parse the config file to create all locations in the chassis - * 2) probe each location to find fru and probe the fru recursively to - * create locations, port nodes - * 3) handle hotswap picl events (dr_ap_state_change, dr_req) - * - update the frutree - * - send out picl-state-change, picl-condition-events - * 4) Monitor the port nodes state and condition - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "piclfrutree.h" - -#pragma init(piclfrutree_register) - -/* - * following values are tunables that can be changed using - * environment variables - */ -int frutree_debug = NONE; /* debug switch */ -static int frutree_poll_timeout = 5; /* polling time to monitor ports */ -static int frutree_drwait_time = 10; /* wait time for dr operation */ - -#define PICL_PROP_CONF_FILE "conf_name" -#define PICL_ADMINLOCK_DISABLED "disabled" -#define PICL_ADMINLOCK_ENABLED "enabled" -#define HASH_TABLE_SIZE (64) -#define BUF_SIZE 25 -#define HASH_INDEX(s, x) ((int)((x) & ((s) - 1))) -#define FRUDATA_PTR(_X) ((frutree_frunode_t *)(((hashdata_t *)(_X))->data)) -#define LOCDATA_PTR(_X) ((frutree_locnode_t *)(((hashdata_t *)(_X))->data)) -#define PORTDATA_PTR(_X) ((frutree_portnode_t *)(((hashdata_t *)(_X))->data)) - -/* Hash table structure */ -typedef struct frutree_hash_elm { - picl_nodehdl_t hdl; - void *nodep; - struct frutree_hash_elm *nextp; -} frutree_hashelm_t; - -typedef struct { - int hash_size; - frutree_hashelm_t **tbl; -} frutree_hash_t; - -typedef struct { - frutree_datatype_t type; - void *data; -} hashdata_t; - -typedef int (*callback_t)(picl_nodehdl_t, void *); -typedef enum { - INIT_FRU = 0x0, - CREATE_DEVICES_ENTRIES, - CONFIGURE_FRU, - UNCONFIGURE_FRU, - CPU_OFFLINE, - CPU_ONLINE, - HANDLE_CONFIGURE, - HANDLE_UNCONFIGURE, - HANDLE_INSERT, - HANDLE_REMOVE, - HANDLE_LOCSTATE_CHANGE, - POST_COND_EVENT, - POST_EVENTS -} action_t; - -typedef struct { - action_t action; - void *data; -} frutree_dr_arg_t; - -typedef struct event_queue { - frutree_dr_arg_t arg; - struct event_queue *next; -}ev_queue_t; - -typedef struct { - char node_name[PICL_PROPNAMELEN_MAX]; - picl_nodehdl_t retnodeh; -} frutree_callback_data_t; - -typedef struct remove_list { - picl_nodehdl_t nodeh; - struct remove_list *next; -} delete_list_t; - -typedef struct { - frutree_frunode_t *frup; - delete_list_t *first; -} frutree_init_callback_arg_t; - -boolean_t frutree_connects_initiated = B_FALSE; -static ev_queue_t *queue_head = NULL; -static ev_queue_t *queue_tail = NULL; -static pthread_mutex_t ev_mutex; -static pthread_cond_t ev_cond; - -static frutree_hash_t node_hash_table = {0, NULL}; -static picl_nodehdl_t chassish = 0; -static picl_nodehdl_t frutreeh = 0; -static picl_nodehdl_t rooth = 0; -static picl_nodehdl_t platformh = 0; -static boolean_t post_picl_events = B_FALSE; -static int piclevent_pending = 0; -static char conf_file[MAXPATHLEN]; -static char sys_name[SYS_NMLN]; - -static mutex_t piclevent_mutex = DEFAULTMUTEX; -static cond_t piclevent_completed_cv = DEFAULTCV; -static rwlock_t hash_lock; - -static pthread_t tid; -static void *dr_thread(void *); - -static pthread_t init_threadID; -static pthread_t monitor_tid; -static pthread_mutex_t monitor_mutex = PTHREAD_MUTEX_INITIALIZER; -static pthread_cond_t monitor_cv = PTHREAD_COND_INITIALIZER; -static int fini_called = 0; -static void *monitor_node_status(void *); -static ev_queue_t *remove_from_queue(void); -static picl_errno_t handle_chassis_configure(frutree_frunode_t *frup); - -/* - * location states. - */ -static char *loc_state[] = { - PICLEVENTARGVAL_UNKNOWN, - PICLEVENTARGVAL_EMPTY, - PICLEVENTARGVAL_CONNECTED, - PICLEVENTARGVAL_DISCONNECTED, - PICLEVENTARGVAL_CONNECTING, - PICLEVENTARGVAL_DISCONNECTING, - NULL -}; - -/* - * fru states. - */ -static char *fru_state[] = { - PICLEVENTARGVAL_UNKNOWN, - PICLEVENTARGVAL_CONFIGURED, - PICLEVENTARGVAL_UNCONFIGURED, - PICLEVENTARGVAL_CONFIGURING, - PICLEVENTARGVAL_UNCONFIGURING, - NULL -}; - -/* - * fru condition. - */ -static char *fru_cond[] = { - PICLEVENTARGVAL_UNKNOWN, - PICLEVENTARGVAL_FAILED, - PICLEVENTARGVAL_FAILING, - PICLEVENTARGVAL_OK, - PICLEVENTARGVAL_TESTING, - NULL -}; - -/* - * port states. - */ -static char *port_state[] = { - PICLEVENTARGVAL_DOWN, - PICLEVENTARGVAL_UP, - PICLEVENTARGVAL_UNKNOWN, - NULL -}; - -/* - * port condition. - */ -static char *port_cond[] = { - PICLEVENTARGVAL_OK, - PICLEVENTARGVAL_FAILING, - PICLEVENTARGVAL_FAILED, - PICLEVENTARGVAL_TESTING, - PICLEVENTARGVAL_UNKNOWN, - NULL -}; - -/* mapping between libcfgadm error codes to picl error codes */ -static const int cfg2picl_errmap[][2] = { - {CFGA_OK, PICL_SUCCESS}, - {CFGA_NACK, PICL_NORESPONSE}, - {CFGA_NOTSUPP, PICL_NOTSUPPORTED}, - {CFGA_OPNOTSUPP, PICL_NOTSUPPORTED}, - {CFGA_PRIV, PICL_FAILURE}, - {CFGA_BUSY, PICL_TREEBUSY}, - {CFGA_SYSTEM_BUSY, PICL_TREEBUSY}, - {CFGA_DATA_ERROR, PICL_FAILURE}, - {CFGA_LIB_ERROR, PICL_FAILURE}, - {CFGA_NO_LIB, PICL_FAILURE}, - {CFGA_INSUFFICENT_CONDITION, PICL_FAILURE}, - {CFGA_INVAL, PICL_INVALIDARG}, - {CFGA_ERROR, PICL_FAILURE}, - {CFGA_APID_NOEXIST, PICL_NODENOTFOUND}, - {CFGA_ATTR_INVAL, PICL_INVALIDARG} -}; - -/* local functions */ -static void piclfrutree_register(void); -static void piclfrutree_init(void); -static void piclfrutree_fini(void); -static void * init_thread(void *); -static void frutree_wd_evhandler(const char *, const void *, size_t, void *); -static void frutree_dr_apstate_change_evhandler(const char *, const void *, - size_t, void *); -static void frutree_dr_req_evhandler(const char *, const void *, - size_t, void *); -static void frutree_cpu_state_change_evhandler(const char *, const void *, - size_t, void *); -static void init_queue(void); -static void frutree_get_env(); -static picl_errno_t hash_init(void); -static picl_errno_t hash_remove_entry(picl_nodehdl_t); -static picl_errno_t hash_lookup_entry(picl_nodehdl_t, void **); -static void hash_destroy(); -static picl_errno_t initialize_frutree(); -static picl_errno_t update_loc_state(frutree_locnode_t *, boolean_t *); -static int is_autoconfig_enabled(char *); -static picl_errno_t do_action(picl_nodehdl_t, int action, void *); -static picl_errno_t probe_fru(frutree_frunode_t *, boolean_t); -static picl_errno_t handle_fru_unconfigure(frutree_frunode_t *); -static picl_errno_t update_loc_state(frutree_locnode_t *, boolean_t *); -static picl_errno_t update_fru_state(frutree_frunode_t *, boolean_t *); -static picl_errno_t update_port_state(frutree_portnode_t *, boolean_t); -static picl_errno_t configure_fru(frutree_frunode_t *, cfga_flags_t); -static picl_errno_t post_piclevent(const char *, char *, char *, - picl_nodehdl_t, frutree_wait_t); -static picl_errno_t fru_init(frutree_frunode_t *); - -/* External functions */ -extern boolean_t is_fru_present_under_location(frutree_locnode_t *); -extern int kstat_port_state(frutree_port_type_t, char *, int); -extern int kstat_port_cond(frutree_port_type_t, char *, int); -extern picl_errno_t probe_libdevinfo(frutree_frunode_t *, - frutree_device_args_t **, boolean_t); -extern picl_errno_t get_scsislot_name(char *, char *, char *); -extern picl_errno_t probe_for_scsi_frus(frutree_frunode_t *); -extern picl_errno_t get_fru_path(char *, frutree_frunode_t *); -extern picl_errno_t scsi_info_init(); -extern void scsi_info_fini(); -extern picl_errno_t get_port_info(frutree_portnode_t *); -extern char *strtok_r(char *s1, const char *s2, char **lasts); - -/* Plugin initialization */ -static picld_plugin_reg_t frutree_reg_info = { - PICLD_PLUGIN_VERSION_1, - PICLD_PLUGIN_CRITICAL, - "SUNW_piclfrutree", - piclfrutree_init, - piclfrutree_fini -}; - -/* ptree entry points */ -static void -piclfrutree_register(void) -{ - FRUTREE_DEBUG0(FRUTREE_INIT, "piclfrutree register"); - (void) picld_plugin_register(&frutree_reg_info); -} - -static void -piclfrutree_init(void) -{ - FRUTREE_DEBUG0(FRUTREE_INIT, "piclfrutree_init begin"); - (void) rwlock_init(&hash_lock, USYNC_THREAD, NULL); - fini_called = 0; - - /* read the environment variables */ - frutree_get_env(); - - if (sysinfo(SI_PLATFORM, sys_name, sizeof (sys_name)) == -1) { - return; - } - - if (hash_init() != PICL_SUCCESS) { - return; - } - if (initialize_frutree() != PICL_SUCCESS) { - return; - } - - /* initialize the event queue */ - (void) init_queue(); - - (void) pthread_cond_init(&ev_cond, NULL); - (void) pthread_mutex_init(&ev_mutex, NULL); - if (pthread_create(&tid, NULL, &dr_thread, NULL) != 0) { - return; - } - /* register for picl events */ - if (ptree_register_handler(PICLEVENT_DR_AP_STATE_CHANGE, - frutree_dr_apstate_change_evhandler, NULL) != - PICL_SUCCESS) { - return; - } - - if (ptree_register_handler(PICLEVENT_DR_REQ, - frutree_dr_req_evhandler, NULL) != PICL_SUCCESS) { - return; - } - - if (ptree_register_handler(PICLEVENT_CPU_STATE_CHANGE, - frutree_cpu_state_change_evhandler, NULL) != - PICL_SUCCESS) { - return; - } - - if (ptree_register_handler(PICLEVENT_STATE_CHANGE, - frutree_wd_evhandler, NULL) != PICL_SUCCESS) { - return; - } - FRUTREE_DEBUG0(FRUTREE_INIT, "piclfrutree_init end"); -} - -static void -piclfrutree_fini(void) -{ - ev_queue_t *event = NULL; - void *exitval; - - FRUTREE_DEBUG0(EVENTS, "piclfrutree_fini begin"); - - fini_called = 1; - /* unregister event handlers */ - (void) ptree_unregister_handler(PICLEVENT_DR_AP_STATE_CHANGE, - frutree_dr_apstate_change_evhandler, NULL); - (void) ptree_unregister_handler(PICLEVENT_DR_REQ, - frutree_dr_req_evhandler, NULL); - (void) ptree_unregister_handler(PICLEVENT_CPU_STATE_CHANGE, - frutree_cpu_state_change_evhandler, NULL); - (void) ptree_unregister_handler(PICLEVENT_STATE_CHANGE, - frutree_wd_evhandler, NULL); - - /* flush the event queue */ - (void) pthread_mutex_lock(&ev_mutex); - event = remove_from_queue(); - while (event) { - free(event); - event = remove_from_queue(); - } - queue_head = queue_tail = NULL; - - (void) pthread_cond_broadcast(&ev_cond); - (void) pthread_mutex_unlock(&ev_mutex); - (void) pthread_cancel(tid); - (void) pthread_join(tid, &exitval); - (void) pthread_cancel(monitor_tid); - (void) pthread_join(monitor_tid, &exitval); - (void) pthread_cancel(init_threadID); - (void) pthread_join(init_threadID, &exitval); - - hash_destroy(); - (void) ptree_delete_node(frutreeh); - (void) ptree_destroy_node(frutreeh); - - frutree_connects_initiated = B_FALSE; - chassish = frutreeh = rooth = platformh = 0; - post_picl_events = B_FALSE; - piclevent_pending = 0; - FRUTREE_DEBUG0(EVENTS, "piclfrutree_fini end"); -} - -/* read the ENVIRONMENT variables and initialize tunables */ -static void -frutree_get_env() -{ - char *val; - int intval = 0; - - /* read frutree debug flag value */ - if (val = getenv(FRUTREE_DEBUG)) { - errno = 0; - intval = strtol(val, (char **)NULL, 0); - if (errno == 0) { - frutree_debug = intval; - FRUTREE_DEBUG1(PRINT_ALL, "SUNW_frutree:debug = %x", - frutree_debug); - } - } - - /* read poll timeout value */ - if (val = getenv(FRUTREE_POLL_TIMEOUT)) { - errno = 0; - intval = strtol(val, (char **)NULL, 0); - if (errno == 0) { - frutree_poll_timeout = intval; - } - } - - /* read drwait time value */ - if (val = getenv(FRUTREE_DRWAIT)) { - errno = 0; - intval = strtol(val, (char **)NULL, 0); - if (errno == 0) { - frutree_drwait_time = intval; - } - } -} - -/* - * callback function for ptree_walk_tree_class to get the - * node handle of node - * matches a node with same class and name - */ -static int -frutree_get_nodehdl(picl_nodehdl_t nodeh, void *c_args) -{ - picl_errno_t rc; - char name[PICL_PROPNAMELEN_MAX]; - frutree_callback_data_t *fru_arg; - - if (c_args == NULL) - return (PICL_INVALIDARG); - fru_arg = (frutree_callback_data_t *)c_args; - - if ((rc = ptree_get_propval_by_name(nodeh, PICL_PROP_NAME, name, - sizeof (name))) != PICL_SUCCESS) { - return (rc); - } - - if (strcmp(fru_arg->node_name, name) == 0) { - fru_arg->retnodeh = nodeh; - return (PICL_WALK_TERMINATE); - } - return (PICL_WALK_CONTINUE); -} - -/* queue implementation (used to queue hotswap events) */ -static void -init_queue(void) -{ - queue_head = NULL; - queue_tail = NULL; -} - -/* add an event to the queue */ -static int -add_to_queue(frutree_dr_arg_t dr_data) -{ - ev_queue_t *new_event; - - new_event = (ev_queue_t *)malloc(sizeof (ev_queue_t)); - if (new_event == NULL) - return (PICL_NOSPACE); - - new_event->arg.action = dr_data.action; - new_event->arg.data = dr_data.data; - new_event->next = NULL; - - if (queue_head == NULL) { - queue_head = new_event; - } else { - queue_tail->next = new_event; - } - queue_tail = new_event; - - return (PICL_SUCCESS); -} - -static ev_queue_t * -remove_from_queue(void) -{ - ev_queue_t *event = NULL; - - if (queue_head == NULL) - return (NULL); - - event = queue_head; - queue_head = queue_head->next; - - if (queue_head == NULL) - queue_tail = NULL; - return (event); -} - -/* - * event handler for watchdog expiry event (picl-state-change) event on - * watchdog-timer node - */ -/* ARGSUSED */ -static void -frutree_wd_evhandler(const char *ename, const void *earg, size_t size, - void *cookie) -{ - nvlist_t *nvlp; - char *wd_state = NULL; - picl_errno_t rc; - picl_nodehdl_t wd_nodehdl; - char value[PICL_PROPNAMELEN_MAX]; - frutree_callback_data_t fru_arg; - - if (ename == NULL) - return; - - if (strncmp(ename, PICLEVENT_STATE_CHANGE, - strlen(PICLEVENT_STATE_CHANGE))) { - return; - } - - if (nvlist_unpack((char *)earg, size, &nvlp, NULL)) { - return; - } - - if (nvlist_lookup_uint64(nvlp, PICLEVENTARG_NODEHANDLE, - &wd_nodehdl) == -1) { - nvlist_free(nvlp); - return; - } - - if (nvlist_lookup_string(nvlp, PICLEVENTARG_STATE, - &wd_state) != 0) { - nvlist_free(nvlp); - return; - } - - if ((rc = ptree_get_propval_by_name(wd_nodehdl, - PICL_PROP_CLASSNAME, value, sizeof (value))) != PICL_SUCCESS) { - nvlist_free(nvlp); - return; - } - - /* if the event is not of watchdog-timer, return */ - if (strcmp(value, PICL_CLASS_WATCHDOG_TIMER) != 0) { - nvlist_free(nvlp); - return; - } - - FRUTREE_DEBUG1(EVENTS, "frutree:Received WD event(%s)", wd_state); - /* frutree plugin handles only watchdog expiry events */ - if (strcmp(wd_state, PICL_PROPVAL_WD_STATE_EXPIRED) != 0) { - nvlist_free(nvlp); - return; - } - - if ((rc = ptree_get_propval_by_name(wd_nodehdl, - PICL_PROP_WATCHDOG_ACTION, value, sizeof (value))) != - PICL_SUCCESS) { - nvlist_free(nvlp); - return; - } - - /* if action is none, dont do anything */ - if (strcmp(value, PICL_PROPVAL_WD_ACTION_NONE) == 0) { - nvlist_free(nvlp); - return; - } - - /* find the CPU nodehdl */ - (void) strncpy(fru_arg.node_name, SANIBEL_PICLNODE_CPU, - sizeof (fru_arg.node_name)); - fru_arg.retnodeh = 0; - if ((rc = ptree_walk_tree_by_class(chassish, PICL_CLASS_FRU, - &fru_arg, frutree_get_nodehdl)) != PICL_SUCCESS) { - nvlist_free(nvlp); - return; - } - - if (fru_arg.retnodeh == NULL) { - nvlist_free(nvlp); - return; - } - - if ((rc = post_piclevent(PICLEVENT_CONDITION_CHANGE, - PICLEVENTARGVAL_FAILED, NULL, fru_arg.retnodeh, - NO_WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - SANIBEL_PICLNODE_CPU, PICLEVENT_CONDITION_CHANGE, rc); - } - nvlist_free(nvlp); -} - -/* - * event handler for dr_ap_state_change event - * - determine the event type and queue it in dr_queue to handle it - */ -/* ARGSUSED */ -static void -frutree_dr_apstate_change_evhandler(const char *ename, const void *earg, - size_t size, void *cookie) -{ - nvlist_t *nvlp; - char *name = NULL; - char *ap_id = NULL; - char *hint = NULL; - picl_nodehdl_t nodeh, childh; - hashdata_t *hashptr = NULL; - frutree_dr_arg_t dr_arg; - frutree_frunode_t *frup = NULL; - frutree_locnode_t *locp = NULL; - frutree_callback_data_t fru_arg; - boolean_t state_changed = B_FALSE; - - if (ename == NULL) - return; - - if (strncmp(ename, PICLEVENT_DR_AP_STATE_CHANGE, - strlen(PICLEVENT_DR_AP_STATE_CHANGE)) != 0) { - return; - } - - if (nvlist_unpack((char *)earg, size, &nvlp, NULL)) { - return; - } - - if (nvlist_lookup_string(nvlp, PICLEVENTARG_AP_ID, &ap_id) == -1) { - nvlist_free(nvlp); - return; - } - - if (nvlist_lookup_string(nvlp, PICLEVENTARG_HINT, &hint) == -1) { - nvlist_free(nvlp); - return; - } - - /* check for empty strings */ - if (!ap_id || !hint) { - FRUTREE_DEBUG0(EVENTS, "Empty hint/ap_id"); - nvlist_free(nvlp); - return; - } - - /* get the location name */ - name = strrchr(ap_id, ':'); - if (name == NULL) { - name = ap_id; - } else { - name++; - } - - /* find the loc object */ - (void) strncpy(fru_arg.node_name, name, sizeof (fru_arg.node_name)); - fru_arg.retnodeh = 0; - if (ptree_walk_tree_by_class(chassish, PICL_CLASS_LOCATION, - &fru_arg, frutree_get_nodehdl) != PICL_SUCCESS) { - nvlist_free(nvlp); - return; - } - - if (fru_arg.retnodeh == NULL) { - nvlist_free(nvlp); - return; - } - nodeh = fru_arg.retnodeh; - - if (hash_lookup_entry(nodeh, (void **)&hashptr) != PICL_SUCCESS) { - nvlist_free(nvlp); - return; - } - locp = LOCDATA_PTR(hashptr); - if (locp == NULL) { - nvlist_free(nvlp); - return; - } - - if (strcmp(hint, DR_HINT_INSERT) == 0) { - dr_arg.action = HANDLE_INSERT; - dr_arg.data = locp; - (void) pthread_mutex_lock(&ev_mutex); - if (add_to_queue(dr_arg) != PICL_SUCCESS) { - (void) pthread_mutex_unlock(&ev_mutex); - nvlist_free(nvlp); - return; - } - (void) pthread_cond_signal(&ev_cond); - (void) pthread_mutex_unlock(&ev_mutex); - nvlist_free(nvlp); - return; - } - - if (strcmp(hint, DR_HINT_REMOVE) == 0) { - dr_arg.action = HANDLE_REMOVE; - dr_arg.data = locp; - (void) pthread_mutex_lock(&ev_mutex); - if (add_to_queue(dr_arg) != PICL_SUCCESS) { - (void) pthread_mutex_unlock(&ev_mutex); - nvlist_free(nvlp); - return; - } - (void) pthread_cond_signal(&ev_cond); - (void) pthread_mutex_unlock(&ev_mutex); - nvlist_free(nvlp); - return; - } - - if (strcmp(hint, DR_RESERVED_ATTR) != 0) { /* unknown event */ - nvlist_free(nvlp); - return; - } - - /* handle DR_RESERVED_ATTR HINT */ - /* check if this is a fru event */ - if (ptree_get_propval_by_name(locp->locnodeh, PICL_PROP_CHILD, - &childh, sizeof (childh)) == PICL_SUCCESS) { - /* get the child fru information */ - if (hash_lookup_entry(childh, (void **)&hashptr) == - PICL_SUCCESS) { - frup = FRUDATA_PTR(hashptr); - } - } - if (frup == NULL) { - nvlist_free(nvlp); - return; - } - - (void) pthread_mutex_lock(&frup->mutex); - if (frup->dr_in_progress) { - /* dr in progress, neglect the event */ - (void) pthread_mutex_unlock(&frup->mutex); - nvlist_free(nvlp); - return; - } - (void) pthread_mutex_unlock(&frup->mutex); - - if (update_fru_state(frup, &state_changed) != PICL_SUCCESS) { - nvlist_free(nvlp); - return; - } - - if (state_changed) { - (void) pthread_mutex_lock(&frup->mutex); - /* figure out if this is config/unconfig operation */ - if (frup->state == FRU_STATE_CONFIGURED) { - dr_arg.action = HANDLE_CONFIGURE; - dr_arg.data = frup; - } else if (frup->state == FRU_STATE_UNCONFIGURED) { - dr_arg.action = HANDLE_UNCONFIGURE; - dr_arg.data = frup; - } - (void) pthread_mutex_unlock(&frup->mutex); - - (void) pthread_mutex_lock(&ev_mutex); - if (add_to_queue(dr_arg) != PICL_SUCCESS) { - (void) pthread_mutex_unlock(&ev_mutex); - nvlist_free(nvlp); - return; - } - (void) pthread_cond_signal(&ev_cond); - (void) pthread_mutex_unlock(&ev_mutex); - nvlist_free(nvlp); - return; - } - - /* check if this event is related to location */ - (void) pthread_mutex_lock(&locp->mutex); - if (locp->dr_in_progress) { - /* dr in progress, neglect the event */ - (void) pthread_mutex_unlock(&locp->mutex); - nvlist_free(nvlp); - return; - } - (void) pthread_mutex_unlock(&locp->mutex); - if (update_loc_state(locp, &state_changed) != PICL_SUCCESS) { - nvlist_free(nvlp); - return; - } - - if (state_changed) { /* location state has changed */ - dr_arg.action = HANDLE_LOCSTATE_CHANGE; - dr_arg.data = locp; - - (void) pthread_mutex_lock(&ev_mutex); - if (add_to_queue(dr_arg) != PICL_SUCCESS) { - (void) pthread_mutex_unlock(&ev_mutex); - nvlist_free(nvlp); - return; - } - (void) pthread_cond_signal(&ev_cond); - (void) pthread_mutex_unlock(&ev_mutex); - nvlist_free(nvlp); - return; - } - /* duplicate event */ - nvlist_free(nvlp); -} - -/* - * Event handler for dr_req event - */ -/* ARGSUSED */ -static void -frutree_dr_req_evhandler(const char *ename, const void *earg, size_t size, - void *cookie) -{ - nvlist_t *nvlp; - char *name = NULL; - char *ap_id = NULL; - char *dr_req = NULL; - picl_nodehdl_t nodeh; - frutree_dr_arg_t dr_arg; - hashdata_t *hashptr = NULL; - frutree_frunode_t *frup = NULL; - frutree_callback_data_t fru_arg; - - if (ename == NULL) - return; - - if (strncmp(ename, PICLEVENT_DR_REQ, strlen(PICLEVENT_DR_REQ)) != 0) { - return; - } - if (nvlist_unpack((char *)earg, size, &nvlp, NULL)) { - return; - } - if (nvlist_lookup_string(nvlp, PICLEVENTARG_AP_ID, &ap_id) == -1) { - nvlist_free(nvlp); - return; - } - if (nvlist_lookup_string(nvlp, PICLEVENTARG_DR_REQ_TYPE, - &dr_req) == -1) { - nvlist_free(nvlp); - return; - } - - if (!ap_id || !dr_req) { - FRUTREE_DEBUG0(EVENTS, "Empty dr_req/ap_id"); - nvlist_free(nvlp); - return; - } - - /* get the location name */ - name = strrchr(ap_id, ':'); - if (name == NULL) { - name = ap_id; - } else { - name++; - } - - if (name == NULL) { - nvlist_free(nvlp); - return; - } - - FRUTREE_DEBUG2(EVENTS, "DR_REQ:%s on %s", dr_req, name); - (void) strncpy(fru_arg.node_name, name, sizeof (fru_arg.node_name)); - fru_arg.retnodeh = 0; - if (ptree_walk_tree_by_class(frutreeh, PICL_CLASS_FRU, - &fru_arg, frutree_get_nodehdl) != PICL_SUCCESS) { - nvlist_free(nvlp); - return; - } - - if (fru_arg.retnodeh == NULL) { - nvlist_free(nvlp); - return; - } - nodeh = fru_arg.retnodeh; - - /* find the fru object */ - if (hash_lookup_entry(nodeh, (void **)&hashptr) != PICL_SUCCESS) { - nvlist_free(nvlp); - return; - } - frup = FRUDATA_PTR(hashptr); - if (frup == NULL) { - nvlist_free(nvlp); - return; - } - - if (strcmp(dr_req, DR_REQ_INCOMING_RES) == 0) { - dr_arg.action = CONFIGURE_FRU; - dr_arg.data = frup; - - } else if (strcmp(dr_req, DR_REQ_OUTGOING_RES) == 0) { - dr_arg.action = UNCONFIGURE_FRU; - dr_arg.data = frup; - - } else { - nvlist_free(nvlp); - return; - } - - (void) pthread_mutex_lock(&ev_mutex); - if (add_to_queue(dr_arg) != PICL_SUCCESS) { - (void) pthread_mutex_unlock(&ev_mutex); - nvlist_free(nvlp); - return; - } - (void) pthread_cond_signal(&ev_cond); - (void) pthread_mutex_unlock(&ev_mutex); - nvlist_free(nvlp); -} - -/* - * Event handler for cpu_state_change event - */ -/* ARGSUSED */ -static void -frutree_cpu_state_change_evhandler(const char *ename, const void *earg, - size_t size, void *cookie) -{ - char *hint = NULL; - nvlist_t *nvlp; - frutree_frunode_t *frup = NULL; - hashdata_t *hashptr = NULL; - picl_nodehdl_t nodeh; - frutree_dr_arg_t dr_arg; - - if (ename == NULL) - return; - - if (strncmp(ename, PICLEVENT_CPU_STATE_CHANGE, - strlen(PICLEVENT_CPU_STATE_CHANGE)) != 0) { - return; - } - - if (nvlist_unpack((char *)earg, size, &nvlp, NULL)) { - return; - } - if (nvlist_lookup_uint64(nvlp, PICLEVENTARG_NODEHANDLE, &nodeh) == -1) { - nvlist_free(nvlp); - return; - } - if (nvlist_lookup_string(nvlp, PICLEVENTARG_CPU_EV_TYPE, &hint) == -1) { - nvlist_free(nvlp); - return; - } - - if (hash_lookup_entry(nodeh, (void **)&hashptr) != PICL_SUCCESS) { - nvlist_free(nvlp); - return; - } - frup = FRUDATA_PTR(hashptr); - if (frup == NULL) { - nvlist_free(nvlp); - return; - } - - if (strcmp(hint, PICLEVENTARGVAL_OFFLINE) == 0) { - dr_arg.action = CPU_OFFLINE; - dr_arg.data = frup; - } else if (strcmp(hint, PICLEVENTARGVAL_ONLINE) == 0) { - dr_arg.action = CPU_ONLINE; - dr_arg.data = frup; - } else { - nvlist_free(nvlp); - return; - } - - (void) pthread_mutex_lock(&ev_mutex); - if (add_to_queue(dr_arg) != PICL_SUCCESS) { - (void) pthread_mutex_unlock(&ev_mutex); - nvlist_free(nvlp); - return; - } - (void) pthread_cond_signal(&ev_cond); - (void) pthread_mutex_unlock(&ev_mutex); - nvlist_free(nvlp); -} - -static void -attach_driver(char *driver) -{ - char cmd[BUF_SIZE]; - cmd[0] = '\0'; - (void) snprintf(cmd, sizeof (cmd), "%s %s", - DEVFSADM_CMD, driver); - (void) pclose(popen(cmd, "r")); -} - -/* - * Find the node in platform tree with given devfs-path. - * ptree_find_node is getting a node with devfs-path /pci@1f,0/pci@1,1 - * when we want to find node with /pci@1f,0/pci@1. The fix - * is required in libpicltree. For now use ptree_walk_tree_by_class - * to find the node. - */ -static int -find_ref_parent(picl_nodehdl_t nodeh, void *c_args) -{ - picl_prophdl_t proph; - ptree_propinfo_t propinfo; - void *vbuf; - frutree_callback_data_t *fru_arg; - - if (c_args == NULL) - return (PICL_INVALIDARG); - fru_arg = (frutree_callback_data_t *)c_args; - - if (ptree_get_prop_by_name(nodeh, PICL_PROP_DEVFS_PATH, - &proph) != PICL_SUCCESS) { - return (PICL_WALK_CONTINUE); - } - - if (ptree_get_propinfo(proph, &propinfo) != PICL_SUCCESS) { - return (PICL_WALK_CONTINUE); - } - - vbuf = alloca(propinfo.piclinfo.size); - if (vbuf == NULL) - return (PICL_WALK_CONTINUE); - - if (ptree_get_propval(proph, vbuf, - propinfo.piclinfo.size) != PICL_SUCCESS) { - return (PICL_WALK_CONTINUE); - } - - /* compare the devfs_path */ - if (strcmp(fru_arg->node_name, (char *)vbuf) == 0) { - fru_arg->retnodeh = nodeh; - return (PICL_WALK_TERMINATE); - } - return (PICL_WALK_CONTINUE); -} -/* - * Find the reference node in /platform tree - * return : 0 - if node is not found - */ -static picl_nodehdl_t -get_reference_handle(picl_nodehdl_t nodeh) -{ - picl_prophdl_t proph; - ptree_propinfo_t propinfo; - void *vbuf; - picl_errno_t rc = PICL_SUCCESS; - char devfs_path[PICL_PROPNAMELEN_MAX]; - char value[PICL_PROPNAMELEN_MAX]; - char class[PICL_PROPNAMELEN_MAX]; - frutree_callback_data_t fru_arg; - picl_nodehdl_t refhdl = 0, ref_parent = 0, nodehdl = 0; - - /* - * for fru node, get the devfspath and bus-addr of - * its parent. - */ - if (ptree_get_propval_by_name(nodeh, PICL_PROP_CLASSNAME, - class, sizeof (class)) != PICL_SUCCESS) { - return (0); - } - - if (strcmp(class, PICL_CLASS_FRU) == 0) { - if (ptree_get_propval_by_name(nodeh, PICL_PROP_PARENT, - &nodehdl, sizeof (nodehdl)) != PICL_SUCCESS) { - return (0); - } - } else if (strcmp(class, PICL_CLASS_PORT) == 0) { - nodehdl = nodeh; - } else { - return (0); - } - - if (ptree_get_propval_by_name(nodehdl, PICL_PROP_DEVFS_PATH, - devfs_path, sizeof (devfs_path)) != PICL_SUCCESS) { - return (0); - } - if (ptree_get_propval_by_name(nodehdl, PICL_PROP_BUS_ADDR, - value, sizeof (value)) != PICL_SUCCESS) { - return (0); - } - - /* find the node with same devfs-path */ - (void) strncpy(fru_arg.node_name, devfs_path, - sizeof (fru_arg.node_name)); - fru_arg.retnodeh = 0; - if (ptree_walk_tree_by_class(platformh, NULL, - (void *)&fru_arg, find_ref_parent) != PICL_SUCCESS) { - return (0); - } - - if (fru_arg.retnodeh == NULL) - return (0); - - ref_parent = fru_arg.retnodeh; - /* traverse thru childeren and find the reference node */ - rc = ptree_get_propval_by_name(ref_parent, PICL_PROP_CHILD, - &refhdl, sizeof (picl_nodehdl_t)); - while (rc == PICL_SUCCESS) { - nodehdl = refhdl; - rc = ptree_get_propval_by_name(refhdl, PICL_PROP_PEER, - &refhdl, sizeof (picl_nodehdl_t)); - /* - * compare the bus_addr or Unit address - * format of bus_addr can be either (1,3 or 0x6) - */ - if (ptree_get_prop_by_name(nodehdl, PICL_PROP_BUS_ADDR, - &proph) != PICL_SUCCESS) { - if (ptree_get_prop_by_name(nodehdl, - PICL_PROP_UNIT_ADDRESS, &proph) != - PICL_SUCCESS) { - continue; - } - } - - if (ptree_get_propinfo(proph, &propinfo) != PICL_SUCCESS) { - continue; - } - - vbuf = alloca(propinfo.piclinfo.size); - if (vbuf == NULL) - continue; - - if (ptree_get_propval(proph, vbuf, - propinfo.piclinfo.size) != PICL_SUCCESS) { - continue; - } - - if (strchr((char *)vbuf, ',') != NULL) { - if (strcmp(value, (char *)vbuf) == 0) { - return (nodehdl); - } - } else { - if (strtoul((char *)vbuf, NULL, 16) == - strtoul(value, NULL, 16)) { - return (nodehdl); - } - } - } - return (0); -} - -/* Hash Table Management */ -static void -free_data(frutree_datatype_t type, hashdata_t *datap) -{ - frutree_frunode_t *frup = NULL; - frutree_locnode_t *locp = NULL; - frutree_portnode_t *portp = NULL; - - if (datap == NULL) { - return; - } - - switch (type) { - case FRU_TYPE: - frup = (frutree_frunode_t *)datap->data; - free(frup->name); - (void) pthread_mutex_destroy(&frup->mutex); - (void) pthread_cond_destroy(&frup->cond_cv); - (void) pthread_cond_destroy(&frup->busy_cond_cv); - free(frup); - break; - case LOC_TYPE: - locp = (frutree_locnode_t *)datap->data; - free(locp->name); - (void) pthread_mutex_destroy(&locp->mutex); - (void) pthread_cond_destroy(&locp->cond_cv); - free(locp); - break; - case PORT_TYPE: - portp = (frutree_portnode_t *)datap->data; - free(portp->name); - free(portp); - break; - } - free(datap); -} - -/* - * Initialize the hash table - */ -static picl_errno_t -hash_init(void) -{ - int i; - - FRUTREE_DEBUG0(HASHTABLE, "hash_init begin"); - node_hash_table.tbl = (frutree_hashelm_t **)malloc( - sizeof (frutree_hashelm_t *) * HASH_TABLE_SIZE); - - if (node_hash_table.tbl == NULL) { - return (PICL_NOSPACE); - } - - /* initialize each entry in hashtable */ - node_hash_table.hash_size = HASH_TABLE_SIZE; - for (i = 0; i < node_hash_table.hash_size; ++i) { - node_hash_table.tbl[i] = NULL; - } - return (PICL_SUCCESS); -} - -/* - * Destroy the hash table - */ -static void -hash_destroy(void) -{ - int i; - frutree_hashelm_t *el; - hashdata_t *datap = NULL; - - (void) rw_wrlock(&hash_lock); - if (node_hash_table.tbl == NULL) { - (void) rw_unlock(&hash_lock); - return; - } - - /* loop thru each linked list in the table and free */ - for (i = 0; i < node_hash_table.hash_size; ++i) { - while (node_hash_table.tbl[i] != NULL) { - el = node_hash_table.tbl[i]; - node_hash_table.tbl[i] = el->nextp; - datap = (hashdata_t *)el->nodep; - free_data(datap->type, datap); - el->nodep = NULL; - free(el); - el = NULL; - } - } - free(node_hash_table.tbl); - (void) rw_unlock(&hash_lock); -} - -/* - * Add an entry to the hash table - */ -static picl_errno_t -hash_add_entry(picl_nodehdl_t hdl, void *nodep) -{ - int indx; - frutree_hashelm_t *el; - - FRUTREE_DEBUG0(HASHTABLE, "hash_add_entry : begin"); - (void) rw_wrlock(&hash_lock); - - if (node_hash_table.tbl == NULL) { - (void) rw_unlock(&hash_lock); - return (PICL_NOTINITIALIZED); - } - - el = (frutree_hashelm_t *)malloc(sizeof (frutree_hashelm_t)); - if (el == NULL) { - (void) rw_unlock(&hash_lock); - return (PICL_NOSPACE); - } - - el->hdl = hdl; - el->nodep = nodep; - el->nextp = NULL; - - if (frutree_debug & HASHTABLE) { - picl_nodehdl_t nodeid; - nodeid = hdl; - cvt_ptree2picl(&nodeid); - FRUTREE_DEBUG1(HASHTABLE, "added node: %llx", nodeid); - } - - indx = HASH_INDEX(node_hash_table.hash_size, hdl); - if (node_hash_table.tbl[indx] == NULL) { - /* first element for this index */ - node_hash_table.tbl[indx] = el; - (void) rw_unlock(&hash_lock); - return (PICL_SUCCESS); - } - - el->nextp = node_hash_table.tbl[indx]; - node_hash_table.tbl[indx] = el; - (void) rw_unlock(&hash_lock); - return (PICL_SUCCESS); -} - -/* - * Remove a hash entry from the table - */ -static picl_errno_t -hash_remove_entry(picl_nodehdl_t hdl) -{ - int i; - hashdata_t *datap = NULL; - frutree_hashelm_t *prev, *cur; - - (void) rw_wrlock(&hash_lock); - - if (node_hash_table.tbl == NULL) { - (void) rw_unlock(&hash_lock); - return (PICL_NOTINITIALIZED); - } - - i = HASH_INDEX(node_hash_table.hash_size, hdl); - - /* check that the hash chain is not empty */ - if (node_hash_table.tbl[i] == NULL) { - (void) rw_wrlock(&hash_lock); - return (PICL_NODENOTFOUND); - } - - /* search hash chain for entry to be removed */ - prev = NULL; - cur = node_hash_table.tbl[i]; - while (cur) { - if (cur->hdl == hdl) { - if (prev == NULL) { /* 1st elem in hash chain */ - node_hash_table.tbl[i] = cur->nextp; - } else { - prev->nextp = cur->nextp; - } - datap = (hashdata_t *)cur->nodep; - free_data(datap->type, datap); - cur->nodep = NULL; - free(cur); - cur = NULL; - - if (frutree_debug & HASHTABLE) { - picl_nodehdl_t nodeid; - nodeid = hdl; - cvt_ptree2picl(&nodeid); - FRUTREE_DEBUG1(HASHTABLE, "removed node: %llx", - nodeid); - } - - (void) rw_unlock(&hash_lock); - return (PICL_SUCCESS); - } - prev = cur; - cur = cur->nextp; - } - - /* entry was not found */ - (void) rw_unlock(&hash_lock); - return (PICL_NODENOTFOUND); -} - -/* - * Lookup a handle in the table - */ -static picl_errno_t -hash_lookup_entry(picl_nodehdl_t hdl, void **nodepp) -{ - int i; - frutree_hashelm_t *el; - - FRUTREE_DEBUG1(HASHTABLE, "hash_lookup begin: %llx", hdl); - (void) rw_rdlock(&hash_lock); - - if (node_hash_table.tbl == NULL) { - (void) rw_unlock(&hash_lock); - return (PICL_NOTINITIALIZED); - } - if (nodepp == NULL) { - (void) rw_unlock(&hash_lock); - return (PICL_INVALIDHANDLE); - } - - i = HASH_INDEX(node_hash_table.hash_size, hdl); - - if (node_hash_table.tbl[i] == NULL) { - (void) rw_unlock(&hash_lock); - return (PICL_NODENOTFOUND); - } - - el = node_hash_table.tbl[i]; - while (el) { - if (el->hdl == hdl) { - *nodepp = el->nodep; - (void) rw_unlock(&hash_lock); - return (PICL_SUCCESS); - } - el = el->nextp; - } - (void) rw_unlock(&hash_lock); - return (PICL_NODENOTFOUND); -} - -/* create and initialize data structure for a loc node */ -static picl_errno_t -make_loc_data(char *full_name, hashdata_t **hashptr) -{ - char *name_copy; - frutree_locnode_t *locp; - hashdata_t *datap = NULL; - - datap = (hashdata_t *)malloc(sizeof (hashdata_t)); - if (datap == NULL) { - return (PICL_NOSPACE); - } - datap->type = LOC_TYPE; - - /* allocate the data */ - locp = (frutree_locnode_t *)malloc(sizeof (frutree_locnode_t)); - if (locp == NULL) { - free(datap); - return (PICL_NOSPACE); - } - - /* make a copy of the name */ - name_copy = strdup(full_name); - if (name_copy == NULL) { - free(locp); - free(datap); - return (PICL_NOSPACE); - } - - /* initialize the data */ - locp->name = name_copy; - locp->locnodeh = 0; - locp->state = LOC_STATE_UNKNOWN; - locp->prev_state = LOC_STATE_UNKNOWN; - locp->cpu_node = B_FALSE; - locp->autoconfig_enabled = B_FALSE; - locp->state_mgr = UNKNOWN; - locp->dr_in_progress = B_FALSE; - (void) pthread_mutex_init(&locp->mutex, NULL); - (void) pthread_cond_init(&locp->cond_cv, NULL); - - datap->data = locp; - *hashptr = datap; - return (PICL_SUCCESS); -} - -/* create and initialize data structure for a fru node */ -static picl_errno_t -make_fru_data(char *full_name, hashdata_t **hashptr) -{ - char *name_copy; - frutree_frunode_t *frup; - hashdata_t *datap = NULL; - - datap = (hashdata_t *)malloc(sizeof (hashdata_t)); - if (datap == NULL) { - return (PICL_NOSPACE); - } - datap->type = FRU_TYPE; - - /* allocate the data */ - frup = (frutree_frunode_t *)malloc(sizeof (frutree_frunode_t)); - if (frup == NULL) { - free(datap); - return (PICL_NOSPACE); - } - - /* make a copy of the name */ - name_copy = strdup(full_name); - if (name_copy == NULL) { - free(frup); - free(datap); - return (PICL_NOSPACE); - } - - /* initialize the data */ - frup->name = name_copy; - frup->frunodeh = 0; - frup->state = FRU_STATE_UNCONFIGURED; - frup->prev_state = FRU_STATE_UNKNOWN; - frup->cond = FRU_COND_UNKNOWN; - frup->prev_cond = FRU_COND_UNKNOWN; - frup->cpu_node = B_FALSE; - frup->autoconfig_enabled = B_FALSE; - frup->dr_in_progress = B_FALSE; - frup->busy = B_FALSE; - frup->state_mgr = UNKNOWN; - frup->fru_path[0] = '\0'; - (void) pthread_mutex_init(&frup->mutex, NULL); - (void) pthread_cond_init(&frup->cond_cv, NULL); - (void) pthread_cond_init(&frup->busy_cond_cv, NULL); - - datap->data = frup; - *hashptr = datap; - return (PICL_SUCCESS); -} - -/* create and initialize data structure for a port node */ -static picl_errno_t -make_port_data(char *full_name, hashdata_t **hashptr) -{ - char *name_copy; - frutree_portnode_t *portp; - hashdata_t *datap = NULL; - - datap = (hashdata_t *)malloc(sizeof (hashdata_t)); - if (datap == NULL) { - return (PICL_NOSPACE); - } - datap->type = PORT_TYPE; - - /* allocate the data */ - portp = (frutree_portnode_t *)malloc(sizeof (frutree_portnode_t)); - if (portp == NULL) { - free(datap); - return (PICL_NOSPACE); - } - /* make a copy of the name */ - name_copy = strdup(full_name); - if (name_copy == NULL) { - free(portp); - free(datap); - return (PICL_NOSPACE); - } - - /* initialize the data */ - portp->name = name_copy; - portp->portnodeh = 0; - portp->state = PORT_STATE_UNKNOWN; - portp->cond = PORT_COND_UNKNOWN; - datap->data = portp; - *hashptr = datap; - return (PICL_SUCCESS); -} - -/* - * utility routine to create table entries - */ -static picl_errno_t -create_table_entry(picl_prophdl_t tblhdl, picl_nodehdl_t refhdl, char *class) -{ - picl_errno_t rc; - ptree_propinfo_t propinfo; - picl_prophdl_t prophdl[2]; - char buf[PICL_CLASSNAMELEN_MAX]; - - /* first column is class */ - if ((rc = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_CHARSTRING, PICL_READ, PICL_CLASSNAMELEN_MAX, - PICL_PROP_CLASS, NULLREAD, - NULLWRITE)) != PICL_SUCCESS) { - return (rc); - } - - if ((rc = ptree_create_prop(&propinfo, class, - &prophdl[0])) != PICL_SUCCESS) { - return (rc); - } - - /* second column is reference property */ - (void) snprintf(buf, sizeof (buf), "_%s_", class); - if ((rc = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_REFERENCE, PICL_READ, - sizeof (picl_nodehdl_t), buf, NULLREAD, - NULLWRITE)) != PICL_SUCCESS) { - return (rc); - } - - if ((rc = ptree_create_prop(&propinfo, &refhdl, - &prophdl[1])) != PICL_SUCCESS) { - return (rc); - } - - /* add row to table */ - if ((rc = ptree_add_row_to_table(tblhdl, 2, prophdl)) != PICL_SUCCESS) { - return (rc); - } - return (PICL_SUCCESS); -} - -/* - * Utility routine to create picl property - */ -static picl_errno_t -create_property(int ptype, int pmode, size_t psize, char *pname, - int (*readfn)(ptree_rarg_t *, void *), - int (*writefn)(ptree_warg_t *, const void *), - picl_nodehdl_t nodeh, picl_prophdl_t *prophp, void *vbuf) -{ - picl_errno_t rc; - ptree_propinfo_t propinfo; - picl_prophdl_t proph; - - if (pname == NULL || vbuf == NULL) { - return (PICL_FAILURE); - } - - if (ptype == PICL_PTYPE_TABLE) { - if ((rc = ptree_create_table((picl_prophdl_t *)vbuf)) - != PICL_SUCCESS) { - return (rc); - } - } - - if ((rc = ptree_get_prop_by_name(nodeh, pname, &proph)) == - PICL_SUCCESS) { /* property already exists */ - return (rc); - } - - rc = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - ptype, pmode, psize, pname, readfn, writefn); - if (rc != PICL_SUCCESS) { - return (rc); - } - - rc = ptree_create_and_add_prop(nodeh, &propinfo, vbuf, prophp); - if (rc != PICL_SUCCESS) { - return (rc); - } - return (PICL_SUCCESS); -} - -/* - * create frutree node, chassis node - */ -static picl_errno_t -initialize_frutree() -{ - int rc = PICL_SUCCESS; - hashdata_t *datap = NULL; - frutree_frunode_t *frup = NULL; - uint64_t ap_status_time; - - FRUTREE_DEBUG0(FRUTREE_INIT, "initialize_frutree begin"); - /* Get the root of the PICL tree */ - if ((rc = ptree_get_root(&rooth)) != PICL_SUCCESS) { - return (rc); - } - FRUTREE_DEBUG1(FRUTREE_INIT, "roothdl = %llx", rooth); - - /* create /frutree node */ - if ((rc = ptree_create_and_add_node(rooth, PICL_NODE_FRUTREE, - PICL_CLASS_PICL, &frutreeh)) != PICL_SUCCESS) { - return (rc); - } - FRUTREE_DEBUG1(FRUTREE_INIT, "frutreeh = %llx", frutreeh); - - /* create chassis node */ - if ((rc = ptree_create_node(PICL_NODE_CHASSIS, PICL_CLASS_FRU, - &chassish)) != PICL_SUCCESS) { - return (rc); - } - FRUTREE_DEBUG1(FRUTREE_INIT, "chassish = %llx", chassish); - - /* Allocate fru data */ - if ((rc = make_fru_data(PICL_NODE_CHASSIS, &datap)) != - PICL_SUCCESS) { - (void) ptree_destroy_node(chassish); - return (rc); - } - /* initialise chassis handle and parent handle */ - frup = FRUDATA_PTR(datap); - frup->frunodeh = chassish; - - /* Add the chassis node to the tree */ - if ((rc = ptree_add_node(frutreeh, chassish)) != PICL_SUCCESS) { - free_data(datap->type, datap); - (void) ptree_destroy_node(chassish); - return (rc); - } - - /* create chassis state property */ - if ((rc = create_property(PICL_PTYPE_CHARSTRING, - PICL_READ, PICL_PROPNAMELEN_MAX, PICL_PROP_STATE, - NULLREAD, NULLWRITE, chassish, (picl_prophdl_t *)NULL, - PICLEVENTARGVAL_UNCONFIGURED)) != PICL_SUCCESS) { - free_data(datap->type, datap); - (void) ptree_delete_node(chassish); - (void) ptree_destroy_node(chassish); - return (rc); - } - ap_status_time = (uint64_t)(time(NULL)); - if ((rc = create_property(PICL_PTYPE_TIMESTAMP, PICL_READ, - sizeof (ap_status_time), PICL_PROP_STATUS_TIME, - NULLREAD, NULLWRITE, chassish, - NULL, &ap_status_time)) != PICL_SUCCESS) { - free_data(datap->type, datap); - (void) ptree_delete_node(chassish); - (void) ptree_destroy_node(chassish); - return (rc); - } - - /* save chassis info in hashtable */ - if ((rc = hash_add_entry(chassish, - (void *)datap)) != PICL_SUCCESS) { - free_data(datap->type, datap); - (void) ptree_delete_node(chassish); - (void) ptree_destroy_node(chassish); - return (rc); - } - return (PICL_SUCCESS); -} - -/* - * Read the temporary property created by platform specific - * plugin to get the config file name. - */ -static picl_errno_t -get_configuration_file() -{ - picl_errno_t rc; - picl_prophdl_t proph; - char file_name[PICL_PROPNAMELEN_MAX]; - - if ((rc = ptree_get_prop_by_name(chassish, - PICL_PROP_CONF_FILE, &proph)) != PICL_SUCCESS) { - return (rc); - } - - if ((rc = ptree_get_propval(proph, file_name, - sizeof (file_name))) != PICL_SUCCESS) { - return (rc); - } - - (void) snprintf(conf_file, sizeof (conf_file), - PICLD_PLAT_PLUGIN_DIRF"%s", sys_name, file_name); - /* delete the tmp prop created by platform specific plugin */ - (void) ptree_delete_prop(proph); - (void) ptree_destroy_prop(proph); - FRUTREE_DEBUG1(EVENTS, "Using %s conf file", conf_file); - return (PICL_SUCCESS); -} - -/* - * Read the cfgadm data and get the latest information - */ -static picl_errno_t -get_cfgadm_state(cfga_list_data_t *data, char *ap_id) -{ - int nlist; - cfga_err_t ap_list_err; - cfga_list_data_t *list = NULL; - char * const *p = &ap_id; - - if (data == NULL || ap_id == NULL) { - return (PICL_INVALIDARG); - } - - ap_list_err = config_list_ext(1, p, &list, &nlist, NULL, - NULL, NULL, 0); - if (ap_list_err != CFGA_OK) { - free(list); - return (cfg2picl_errmap[ap_list_err][1]); - } - - (void) memcpy(data, list, sizeof (cfga_list_data_t)); - free(list); - return (PICL_SUCCESS); -} - -/* - * syncup with cfgadm data and read latest location state information - */ -static picl_errno_t -update_loc_state(frutree_locnode_t *locp, boolean_t *updated) -{ - int i = 0; - cfga_list_data_t *list = NULL; - picl_errno_t rc, rc1; - char valbuf[PICL_PROPNAMELEN_MAX]; - char slot_type[PICL_PROPNAMELEN_MAX]; - uint64_t ap_status_time; - - *updated = B_FALSE; - if (locp->state_mgr == PLUGIN_PVT) { - if ((rc = ptree_get_propval_by_name(locp->locnodeh, - PICL_PROP_STATE, (void *)valbuf, - PICL_PROPNAMELEN_MAX)) != PICL_SUCCESS) { - return (rc); - } - - /* if there is a change in state, update the internal value */ - if (strcmp(loc_state[locp->state], valbuf) != 0) { - ap_status_time = (uint64_t)(time(NULL)); - if ((rc = ptree_update_propval_by_name(locp->locnodeh, - PICL_PROP_STATUS_TIME, (void *)&ap_status_time, - sizeof (ap_status_time))) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_UPDATE_PROP_ERR, - PICL_PROP_STATUS_TIME, locp->name, rc); - } - *updated = B_TRUE; - locp->prev_state = locp->state; - for (i = 0; (loc_state[i] != NULL); i++) { - if (strcmp(loc_state[i], valbuf) == 0) { - locp->state = i; - return (PICL_SUCCESS); - } - } - } - return (PICL_SUCCESS); - } else if (locp->state_mgr == STATIC_LOC) { - return (PICL_SUCCESS); - } - - /* get the info from the libcfgadm interface */ - list = (cfga_list_data_t *)malloc(sizeof (cfga_list_data_t)); - if (list == NULL) { - return (PICL_NOSPACE); - } - - if ((rc = get_cfgadm_state(list, locp->name)) != PICL_SUCCESS) { - if ((rc1 = ptree_get_propval_by_name(locp->locnodeh, - PICL_PROP_SLOT_TYPE, slot_type, - sizeof (slot_type))) != PICL_SUCCESS) { - free(list); - return (rc1); - } - if (strcmp(slot_type, SANIBEL_SCSI_SLOT) != 0 && - strcmp(slot_type, SANIBEL_IDE_SLOT) != 0) { - free(list); - return (rc); - } - /* this is a scsi location */ - if (rc != PICL_NODENOTFOUND) { - free(list); - return (rc); - } - - /* - * for scsi locations, if node is not found, - * consider location state as empty - */ - (void) pthread_mutex_lock(&locp->mutex); - if (locp->state != LOC_STATE_EMPTY) { - *updated = B_TRUE; - locp->prev_state = locp->state; - locp->state = LOC_STATE_EMPTY; - ap_status_time = (uint64_t)(time(NULL)); - if ((rc = ptree_update_propval_by_name(locp->locnodeh, - PICL_PROP_STATUS_TIME, (void *)&ap_status_time, - sizeof (ap_status_time))) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_UPDATE_PROP_ERR, - PICL_PROP_STATUS_TIME, locp->name, rc); - } - } - (void) pthread_mutex_unlock(&locp->mutex); - free(list); - return (PICL_SUCCESS); - } - - (void) pthread_mutex_lock(&locp->mutex); - switch (list->ap_r_state) { - case CFGA_STAT_CONNECTED: - if (locp->state != LOC_STATE_CONNECTED) { - *updated = B_TRUE; - locp->prev_state = locp->state; - locp->state = LOC_STATE_CONNECTED; - } - break; - case CFGA_STAT_DISCONNECTED: - if (locp->state != LOC_STATE_DISCONNECTED) { - *updated = B_TRUE; - locp->prev_state = locp->state; - locp->state = LOC_STATE_DISCONNECTED; - } - break; - case CFGA_STAT_EMPTY: - if (locp->state != LOC_STATE_EMPTY) { - *updated = B_TRUE; - locp->prev_state = locp->state; - locp->state = LOC_STATE_EMPTY; - } - break; - default: - if (locp->state != LOC_STATE_UNKNOWN) { - *updated = B_TRUE; - locp->prev_state = locp->state; - locp->state = LOC_STATE_UNKNOWN; - } - } - - if (*updated == B_TRUE) { - ap_status_time = (uint64_t)(time(NULL)); - if ((rc = ptree_update_propval_by_name(locp->locnodeh, - PICL_PROP_STATUS_TIME, (void *)&ap_status_time, - sizeof (ap_status_time))) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_UPDATE_PROP_ERR, - PICL_PROP_STATUS_TIME, locp->name, rc); - } - } - - /* update the autoconfig flag */ - switch (is_autoconfig_enabled(locp->name)) { - case 1: - locp->autoconfig_enabled = B_TRUE; - break; - case 0: - default: - locp->autoconfig_enabled = B_FALSE; - break; - } - (void) pthread_mutex_unlock(&locp->mutex); - - free(list); - return (PICL_SUCCESS); -} - -/* - * volatile callback function to return the state value for a location - */ -static int -get_loc_state(ptree_rarg_t *rarg, void *buf) -{ - picl_errno_t rc; - frutree_dr_arg_t dr_arg; - hashdata_t *hashptr = NULL; - frutree_locnode_t *locp = NULL; - boolean_t state_change = B_FALSE; - - if (buf == NULL) { - return (PICL_INVALIDARG); - } - - if ((rc = hash_lookup_entry(rarg->nodeh, (void **)&hashptr)) != - PICL_SUCCESS) { - return (rc); - } - - locp = LOCDATA_PTR(hashptr); - if (locp == NULL) { - return (PICL_FAILURE); - } - - (void) pthread_mutex_lock(&locp->mutex); - if (locp->dr_in_progress == B_TRUE) { - /* return the cached value */ - (void) strncpy((char *)buf, loc_state[locp->state], - PICL_PROPNAMELEN_MAX); - (void) pthread_mutex_unlock(&locp->mutex); - return (PICL_SUCCESS); - } - (void) pthread_mutex_unlock(&locp->mutex); - - if ((rc = update_loc_state(locp, &state_change)) != PICL_SUCCESS) { - FRUTREE_DEBUG2(EVENTS, GET_LOC_STATE_ERR, locp->name, rc); - /* return the cached value */ - (void) strncpy((char *)buf, loc_state[locp->state], - PICL_PROPNAMELEN_MAX); - return (rc); - } - - /* if there is a state change, handle the event */ - if (state_change) { - (void) pthread_mutex_lock(&locp->mutex); - if (locp->state == LOC_STATE_EMPTY) { /* card removed */ - dr_arg.action = HANDLE_REMOVE; - } else if (locp->prev_state == LOC_STATE_EMPTY) { - dr_arg.action = HANDLE_INSERT; /* card inserted */ - } else { - /* loc state changed */ - dr_arg.action = HANDLE_LOCSTATE_CHANGE; - } - (void) pthread_mutex_unlock(&locp->mutex); - dr_arg.data = locp; - (void) pthread_mutex_lock(&ev_mutex); - if ((rc = add_to_queue(dr_arg)) != PICL_SUCCESS) { - (void) pthread_mutex_unlock(&ev_mutex); - FRUTREE_DEBUG3(EVENTS, EVENT_NOT_HANDLED, - "dr_ap_state_change", locp->name, rc); - } else { - (void) pthread_cond_signal(&ev_cond); - (void) pthread_mutex_unlock(&ev_mutex); - } - } - - (void) strncpy((char *)buf, loc_state[locp->state], - PICL_PROPNAMELEN_MAX); - return (PICL_SUCCESS); -} - -/* - * syncup with cfgadm data and read latest fru state information - */ -static picl_errno_t -update_fru_state(frutree_frunode_t *frup, boolean_t *updated) -{ - int i; - picl_errno_t rc; - picl_nodehdl_t loch; - uint64_t ap_status_time; - hashdata_t *hashptr = NULL; - cfga_list_data_t *list = NULL; - frutree_locnode_t *locp = NULL; - char valbuf[PICL_PROPNAMELEN_MAX]; - - *updated = B_FALSE; - if (frup->state_mgr == PLUGIN_PVT) { - if ((rc = ptree_get_propval_by_name(frup->frunodeh, - PICL_PROP_STATE, (void *)valbuf, - PICL_PROPNAMELEN_MAX)) != PICL_SUCCESS) { - return (rc); - } - - /* if there is a change in state, update the internal value */ - if (strcmp(fru_state[frup->state], valbuf) != 0) { - *updated = B_TRUE; - frup->prev_state = frup->state; - ap_status_time = (uint64_t)(time(NULL)); - if ((rc = ptree_update_propval_by_name(frup->frunodeh, - PICL_PROP_STATUS_TIME, (void *)&ap_status_time, - sizeof (ap_status_time))) != PICL_SUCCESS) { - if (rc == PICL_PROPNOTFOUND) { - (void) create_property( - PICL_PTYPE_TIMESTAMP, PICL_READ, - sizeof (ap_status_time), - PICL_PROP_STATUS_TIME, - NULLREAD, NULLWRITE, - frup->frunodeh, - NULL, &ap_status_time); - } else { - FRUTREE_DEBUG3(EVENTS, - PTREE_UPDATE_PROP_ERR, - PICL_PROP_STATUS_TIME, - frup->name, rc); - } - } - for (i = 0; (fru_state[i] != NULL); i++) { - if (strcmp(fru_state[i], valbuf) == 0) { - frup->state = i; - return (PICL_SUCCESS); - } - } - } - return (PICL_SUCCESS); - } else if (frup->state_mgr == STATIC_LOC) { - frup->state = FRU_STATE_CONFIGURED; - return (PICL_SUCCESS); - } - - if ((rc = ptree_get_propval_by_name(frup->frunodeh, PICL_PROP_PARENT, - &loch, sizeof (loch))) != PICL_SUCCESS) { - return (rc); - } - - if ((rc = hash_lookup_entry(loch, (void **)&hashptr)) != - PICL_SUCCESS) { - return (rc); - } - locp = LOCDATA_PTR(hashptr); - if (locp == NULL) { - return (PICL_FAILURE); - } - - list = (cfga_list_data_t *)malloc(sizeof (cfga_list_data_t)); - if (list == NULL) { - return (PICL_NOSPACE); - } - - if ((rc = get_cfgadm_state(list, locp->name)) != PICL_SUCCESS) { - free(list); - return (rc); - } - - (void) pthread_mutex_lock(&frup->mutex); - switch (list->ap_o_state) { - case CFGA_STAT_CONFIGURED: - if (frup->state != FRU_STATE_CONFIGURED) { - *updated = B_TRUE; - frup->prev_state = frup->state; - frup->state = FRU_STATE_CONFIGURED; - } - break; - case CFGA_STAT_UNCONFIGURED: - if (frup->state != FRU_STATE_UNCONFIGURED) { - *updated = B_TRUE; - frup->prev_state = frup->state; - frup->state = FRU_STATE_UNCONFIGURED; - } - break; - default: - if (frup->state != FRU_STATE_UNKNOWN) { - *updated = B_TRUE; - frup->prev_state = frup->state; - frup->state = FRU_STATE_UNKNOWN; - } - break; - } - - /* update the fru_type property */ - if (list->ap_type) { - if ((rc = ptree_update_propval_by_name(frup->frunodeh, - PICL_PROP_FRU_TYPE, list->ap_type, - sizeof (list->ap_type))) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_UPDATE_PROP_ERR, - PICL_PROP_FRU_TYPE, frup->name, rc); - } - } - - if (*updated == B_TRUE) { - ap_status_time = (uint64_t)(time(NULL)); - if ((rc = ptree_update_propval_by_name(frup->frunodeh, - PICL_PROP_STATUS_TIME, (void *)&ap_status_time, - sizeof (ap_status_time))) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_UPDATE_PROP_ERR, - PICL_PROP_STATUS_TIME, frup->name, rc); - } - } - (void) pthread_mutex_unlock(&frup->mutex); - - free(list); - return (PICL_SUCCESS); -} - -/* - * syncup with cfgadm data and read latest fru condition information - */ -static picl_errno_t -update_fru_condition(frutree_frunode_t *frup, boolean_t *updated) -{ - int i = 0; - picl_errno_t rc; - picl_nodehdl_t loch; - uint64_t ap_cond_time; - hashdata_t *hashptr = NULL; - cfga_list_data_t *list = NULL; - frutree_locnode_t *locp = NULL; - char valbuf[PICL_PROPNAMELEN_MAX]; - - *updated = B_FALSE; - if (frup->state_mgr == PLUGIN_PVT) { - if ((rc = ptree_get_propval_by_name(frup->frunodeh, - PICL_PROP_CONDITION, (void *)valbuf, - PICL_PROPNAMELEN_MAX)) != PICL_SUCCESS) { - return (rc); - } - - /* - * if there is a change in condition, update the - * internal value - */ - if (strcmp(fru_cond[frup->cond], valbuf) != 0) { - *updated = B_TRUE; - ap_cond_time = (uint64_t)(time(NULL)); - if ((rc = ptree_update_propval_by_name(frup->frunodeh, - PICL_PROP_CONDITION_TIME, (void *)&ap_cond_time, - sizeof (ap_cond_time))) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_UPDATE_PROP_ERR, - PICL_PROP_CONDITION_TIME, frup->name, - rc); - } - frup->prev_cond = frup->cond; - - for (i = 0; (fru_cond[i] != NULL); i++) { - if (strcmp(fru_cond[i], valbuf) == 0) { - frup->cond = i; - return (PICL_SUCCESS); - } - } - } - return (PICL_SUCCESS); - } else if (frup->state_mgr == STATIC_LOC) { - frup->cond = FRU_COND_OK; - return (PICL_SUCCESS); - } - - if ((rc = ptree_get_propval_by_name(frup->frunodeh, PICL_PROP_PARENT, - &loch, sizeof (loch))) != PICL_SUCCESS) { - return (rc); - } - - if ((rc = hash_lookup_entry(loch, (void **)&hashptr)) != - PICL_SUCCESS) { - return (rc); - } - - locp = LOCDATA_PTR(hashptr); - if (locp == NULL) { - return (PICL_FAILURE); - } - list = (cfga_list_data_t *)malloc(sizeof (cfga_list_data_t)); - if (list == NULL) { - return (PICL_NOSPACE); - } - - if ((rc = get_cfgadm_state(list, locp->name)) != PICL_SUCCESS) { - free(list); - return (rc); - } - - switch (list->ap_cond) { - case CFGA_COND_OK: - if (frup->cond != FRU_COND_OK) { - *updated = B_TRUE; - frup->prev_cond = frup->cond; - frup->cond = FRU_COND_OK; - } - break; - case CFGA_COND_FAILING: - if (frup->cond != FRU_COND_FAILING) { - *updated = B_TRUE; - frup->prev_cond = frup->cond; - frup->cond = FRU_COND_FAILING; - } - break; - case CFGA_COND_FAILED: - case CFGA_COND_UNUSABLE: - if (frup->cond != FRU_COND_FAILED) { - *updated = B_TRUE; - frup->prev_cond = frup->cond; - frup->cond = FRU_COND_FAILED; - } - break; - default: - if (frup->cond != FRU_COND_UNKNOWN) { - *updated = B_TRUE; - frup->prev_cond = frup->cond; - frup->cond = FRU_COND_UNKNOWN; - } - } - - if (*updated == B_TRUE) { - ap_cond_time = (uint64_t)(time(NULL)); - if ((rc = ptree_update_propval_by_name(frup->frunodeh, - PICL_PROP_CONDITION_TIME, (void *)&ap_cond_time, - sizeof (ap_cond_time))) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_UPDATE_PROP_ERR, - PICL_PROP_CONDITION_TIME, frup->name, rc); - } - } - free(list); - return (PICL_SUCCESS); -} - -/* - * Volatile callback function to read fru state - */ -static int -get_fru_state(ptree_rarg_t *rarg, void *buf) -{ - picl_errno_t rc; - hashdata_t *hashptr = NULL; - frutree_frunode_t *frup = NULL; - boolean_t state_change = B_FALSE; - frutree_dr_arg_t dr_arg; - - if (buf == NULL) { - return (PICL_INVALIDARG); - } - - if ((rc = hash_lookup_entry(rarg->nodeh, (void **)&hashptr)) != - PICL_SUCCESS) { - return (rc); - } - - frup = FRUDATA_PTR(hashptr); - if (frup == NULL) { - return (PICL_FAILURE); - } - - /* return the cached value, if dr is in progress */ - (void) pthread_mutex_lock(&frup->mutex); - if (frup->dr_in_progress) { - (void) pthread_mutex_unlock(&frup->mutex); - (void) strncpy((char *)buf, fru_state[frup->state], - PICL_PROPNAMELEN_MAX); - return (PICL_SUCCESS); - } - (void) pthread_mutex_unlock(&frup->mutex); - - if ((rc = update_fru_state(frup, &state_change)) != PICL_SUCCESS) { - FRUTREE_DEBUG2(EVENTS, GET_FRU_STATE_ERR, frup->name, rc); - /* return the cached value */ - (void) strncpy((char *)buf, fru_state[frup->state], - PICL_PROPNAMELEN_MAX); - return (rc); - } - - /* if there is a state change, handle the event */ - if (state_change) { - (void) pthread_mutex_lock(&frup->mutex); - /* figure out if this is config/unconfig operation */ - if (frup->state == FRU_STATE_CONFIGURED) { - dr_arg.action = HANDLE_CONFIGURE; - dr_arg.data = frup; - } else if (frup->state == FRU_STATE_UNCONFIGURED) { - dr_arg.action = HANDLE_UNCONFIGURE; - dr_arg.data = frup; - } - (void) pthread_mutex_unlock(&frup->mutex); - - (void) pthread_mutex_lock(&ev_mutex); - if ((rc = add_to_queue(dr_arg)) != PICL_SUCCESS) { - (void) pthread_mutex_unlock(&ev_mutex); - FRUTREE_DEBUG3(EVENTS, EVENT_NOT_HANDLED, - "dr_ap_state_chage", frup->name, rc); - } else { - (void) pthread_cond_signal(&ev_cond); - (void) pthread_mutex_unlock(&ev_mutex); - } - } - - (void) strncpy((char *)buf, fru_state[frup->state], - PICL_PROPNAMELEN_MAX); - - return (PICL_SUCCESS); -} - -/* - * Volatile callback function to read fru condition - */ -static int -get_fru_condition(ptree_rarg_t *rarg, void *buf) -{ - picl_errno_t rc; - frutree_dr_arg_t dr_arg; - hashdata_t *hashptr = NULL; - frutree_frunode_t *frup = NULL; - boolean_t cond_changed = B_FALSE; - - if (buf == NULL) { - return (PICL_INVALIDARG); - } - - if ((rc = hash_lookup_entry(rarg->nodeh, (void **)&hashptr)) != - PICL_SUCCESS) { - return (rc); - } - - frup = FRUDATA_PTR(hashptr); - if (frup == NULL) { - return (PICL_FAILURE); - } - - /* return the cached value, if dr is in progress */ - (void) pthread_mutex_lock(&frup->mutex); - if (frup->dr_in_progress) { - (void) pthread_mutex_unlock(&frup->mutex); - (void) strncpy((char *)buf, fru_cond[frup->cond], - PICL_PROPNAMELEN_MAX); - return (PICL_SUCCESS); - - } - (void) pthread_mutex_unlock(&frup->mutex); - - if ((rc = update_fru_condition(frup, &cond_changed)) != PICL_SUCCESS) { - FRUTREE_DEBUG2(EVENTS, GET_FRU_COND_ERR, frup->name, rc); - /* return the cached value */ - (void) strncpy((char *)buf, fru_cond[frup->cond], - PICL_PROPNAMELEN_MAX); - return (rc); - } - if (cond_changed) { - dr_arg.action = POST_COND_EVENT; - dr_arg.data = frup; - (void) pthread_mutex_lock(&ev_mutex); - if ((rc = add_to_queue(dr_arg)) != PICL_SUCCESS) { - (void) pthread_mutex_unlock(&ev_mutex); - FRUTREE_DEBUG3(EVENTS, EVENT_NOT_HANDLED, - "condition event", frup->name, rc); - } else { - (void) pthread_cond_signal(&ev_cond); - (void) pthread_mutex_unlock(&ev_mutex); - } - } - - /* if there is a condition change, post picl event */ - (void) strncpy((char *)buf, fru_cond[frup->cond], - PICL_PROPNAMELEN_MAX); - - return (PICL_SUCCESS); -} - -static void -free_cache(frutree_cache_t *cachep) -{ - frutree_cache_t *tmp = NULL; - if (cachep == NULL) - return; - - while (cachep != NULL) { - tmp = cachep; - cachep = cachep->next; - free(tmp); - } -} - -/* - * traverse the /platform tree in PICL tree to create logical devices table - */ -static picl_errno_t -probe_platform_tree(frutree_frunode_t *frup, frutree_device_args_t **devp) -{ - picl_errno_t rc; - picl_nodehdl_t refhdl = 0; - char class[PICL_CLASSNAMELEN_MAX]; - frutree_device_args_t *device = NULL; - picl_prophdl_t tblprophdl; - picl_prophdl_t dev_tblhdl, env_tblhdl = 0; - - if (devp == NULL) { - return (PICL_FAILURE); - } - device = *(frutree_device_args_t **)devp; - if (device == NULL) { - return (PICL_FAILURE); - } - - /* traverse thru platform tree and add entries to Devices table */ - if ((refhdl = get_reference_handle(frup->frunodeh)) == 0) { - return (PICL_NODENOTFOUND); - } - - /* create Devices table property */ - if ((rc = create_property(PICL_PTYPE_TABLE, PICL_READ, - sizeof (picl_prophdl_t), PICL_PROP_DEVICES, NULLREAD, - NULLWRITE, frup->frunodeh, &tblprophdl, &dev_tblhdl)) != - PICL_SUCCESS) { - return (rc); - } - - if ((rc = ptree_get_propval_by_name(refhdl, PICL_PROP_CLASSNAME, - class, sizeof (class))) != PICL_SUCCESS) { - return (rc); - } - - if ((rc = create_table_entry(dev_tblhdl, refhdl, class)) != - PICL_SUCCESS) { - return (rc); - } - - /* create Environment devices table property */ - if ((rc = create_property(PICL_PTYPE_TABLE, PICL_READ, - sizeof (picl_prophdl_t), PICL_PROP_ENV, NULLREAD, - NULLWRITE, frup->frunodeh, &tblprophdl, &env_tblhdl)) != - PICL_SUCCESS) { - return (rc); - } - - device->nodeh = refhdl; - device->device_tblhdl = dev_tblhdl; - device->env_tblhdl = env_tblhdl; - device->first = NULL; - device->last = NULL; - device->create_cache = B_FALSE; - - /* probe using platform tree info */ - if ((rc = do_action(refhdl, CREATE_DEVICES_ENTRIES, - device)) != PICL_SUCCESS) { - free_cache(device->first); - return (rc); - } - return (PICL_SUCCESS); -} - -/* - * create temp conf file to pass it to picld util lib to create - * nodes under the fru - */ -static picl_errno_t -create_fru_children(frutree_frunode_t *frup, frutree_device_args_t device) -{ - int fd; - picl_errno_t rc; - char conffile[MAXPATHLEN]; - char dir[MAXPATHLEN]; - struct stat file_stat; - char version[BUF_SIZE]; - frutree_cache_t *cachep = NULL; - - cachep = device.first; - if (cachep == NULL) { - return (PICL_SUCCESS); - } - - /* create the configuration file for the fru */ - (void) snprintf(dir, MAXPATHLEN, "%s%s", TEMP_DIR, frup->name); - bzero(&file_stat, sizeof (file_stat)); - if (stat(conffile, &file_stat) == -1) { - if (mkdir(conffile, 0755) == -1) { - return (PICL_FAILURE); - } - } - - (void) snprintf(conffile, MAXPATHLEN, "%s/%s", dir, PROBE_FILE); - if ((fd = open(conffile, O_WRONLY|O_CREAT|O_TRUNC, 0644)) == -1) { - (void) rmdir(dir); - return (PICL_FAILURE); - } - - (void) snprintf(version, sizeof (version), "VERSION %d.0", - PTREE_PROPINFO_VERSION); - if (write(fd, version, strlen(version)) != strlen(version)) { - (void) remove(conffile); - (void) rmdir(dir); - (void) close(fd); - return (PICL_FAILURE); - } - - /* traverse thru each cache entry and append to conf file */ - while (cachep != NULL) { - if (write(fd, cachep->buf, strlen(cachep->buf)) - != strlen(cachep->buf)) { - (void) close(fd); - (void) remove(conffile); - (void) rmdir(dir); - return (PICL_FAILURE); - } - cachep = cachep->next; - } - (void) close(fd); - - /* create child nodes for fru using the conffile created */ - if ((rc = picld_pluginutil_parse_config_file(frup->frunodeh, - conffile)) != PICL_SUCCESS) { - (void) remove(conffile); - (void) rmdir(dir); - return (rc); - } - (void) remove(conffile); - (void) rmdir(dir); - - if ((rc = fru_init(frup)) != PICL_SUCCESS) { - return (rc); - } - return (PICL_SUCCESS); -} - -/* - * probes libdevinfo and create the port nodes under a fru - * probes for any scsi devices under a fru - */ -static picl_errno_t -probe_fru(frutree_frunode_t *frup, boolean_t load_drivers) -{ - picl_errno_t rc; - picl_nodehdl_t child, loch; - char slot_type[PICL_PROPNAMELEN_MAX]; - char devfs_path[PICL_PROPNAMELEN_MAX]; - char probe_path[PICL_PROPNAMELEN_MAX]; - frutree_device_args_t *device = NULL; - - if (frup == NULL) { - return (PICL_FAILURE); - } - FRUTREE_DEBUG1(EVENTS, "probing :%s", frup->name); - - if ((rc = ptree_get_propval_by_name(frup->frunodeh, PICL_PROP_PARENT, - &loch, sizeof (loch))) != PICL_SUCCESS) { - return (rc); - } - - bzero(devfs_path, PICL_PROPNAMELEN_MAX); - bzero(probe_path, PICL_PROPNAMELEN_MAX); - if ((rc = ptree_get_propval_by_name(loch, PICL_PROP_DEVFS_PATH, - devfs_path, sizeof (devfs_path))) == PICL_SUCCESS) { - device = (frutree_device_args_t *)malloc( - sizeof (frutree_device_args_t)); - if (device == NULL) { - return (PICL_NOSPACE); - } - device->first = NULL; - device->last = NULL; - (void) probe_platform_tree(frup, &device); - free_cache(device->first); - free(device); - } - - /* - * if parent has NULL probe-path, skip probing this fru - * probe only child locations (if present). - * if probe-path is not present use devfs-path as path for - * probing the fru. - */ - rc = ptree_get_propval_by_name(loch, PICL_PROP_PROBE_PATH, - probe_path, sizeof (probe_path)); - if (rc != PICL_SUCCESS) { - if (!devfs_path[0]) { /* devfspath is also not present */ - return (PICL_SUCCESS); /* nothing to probe */ - } else { - /* use devfs-path as path for probing */ - if ((rc = get_fru_path(devfs_path, frup)) != - PICL_SUCCESS) { - return (rc); - } - } - } else { - /* NULL path, skip probing this fru */ - if (strlen(probe_path) == 0) { - rc = fru_init(frup); /* probe its children */ - return (rc); - } else { - /* valid probe-path */ - if ((rc = get_fru_path(probe_path, frup)) != - PICL_SUCCESS) { - return (rc); - } - } - } - - /* children present already, no need to probe libdevinfo */ - rc = ptree_get_propval_by_name(frup->frunodeh, PICL_PROP_CHILD, - &child, sizeof (picl_nodehdl_t)); - if (rc == PICL_SUCCESS) { /* child present */ - if ((rc = fru_init(frup)) != PICL_SUCCESS) { - return (rc); - } - /* now create the scsi nodes for this fru */ - if ((rc = probe_for_scsi_frus(frup)) != PICL_SUCCESS) { - return (rc); - } - return (PICL_SUCCESS); - } - - if (ptree_get_propval_by_name(frup->frunodeh, PICL_PROP_PARENT, - &loch, sizeof (loch)) != PICL_SUCCESS) { - return (rc); - } - if ((rc = ptree_get_propval_by_name(loch, PICL_PROP_SLOT_TYPE, - slot_type, sizeof (slot_type))) != PICL_SUCCESS) { - return (rc); - } - /* no need to probe further for scsi frus */ - if (strcmp(slot_type, SANIBEL_SCSI_SLOT) == 0 || - strcmp(slot_type, SANIBEL_IDE_SLOT) == 0) { - return (PICL_SUCCESS); - } - - device = (frutree_device_args_t *)malloc( - sizeof (frutree_device_args_t)); - if (device == NULL) { - return (PICL_NOSPACE); - } - device->first = NULL; - device->last = NULL; - - if ((rc = probe_libdevinfo(frup, &device, load_drivers)) != - PICL_SUCCESS) { - free_cache(device->first); - free(device); - return (rc); - } - - if (device->first != NULL) { - if ((rc = create_fru_children(frup, *device)) != PICL_SUCCESS) { - free_cache(device->first); - free(device); - return (rc); - } - } - free_cache(device->first); - free(device); - - /* now create the scsi nodes for this fru */ - if ((rc = probe_for_scsi_frus(frup)) != PICL_SUCCESS) { - return (rc); - } - return (PICL_SUCCESS); -} - -/* - * callback function for ptree_walk_tree_by_class, - * used to update hashtable during DR_HINT_REMOVE event - */ -/*ARGSUSED*/ -static int -frutree_update_hash(picl_nodehdl_t nodeh, void *c_args) -{ - picl_errno_t rc = 0; - if ((rc = hash_remove_entry(nodeh)) != PICL_SUCCESS) { - return (rc); - } - return (PICL_WALK_CONTINUE); -} - -/* - * routine to handle DR_HINT_REMOVE - */ -static picl_errno_t -handle_fru_remove(frutree_frunode_t *frup) -{ - picl_errno_t rc = PICL_SUCCESS; - - if (frup == NULL) { - return (PICL_FAILURE); - } - - if ((rc = ptree_walk_tree_by_class(frup->frunodeh, - NULL, NULL, frutree_update_hash)) != PICL_SUCCESS) { - return (rc); - } - (void) ptree_delete_node(frup->frunodeh); - (void) ptree_destroy_node(frup->frunodeh); - if ((rc = hash_remove_entry(frup->frunodeh)) != - PICL_SUCCESS) { - return (rc); - } - return (PICL_SUCCESS); -} - -/* remove State and Condition props for all the nodes under fru */ -/*ARGSUSED*/ -static int -frutree_handle_unconfigure(picl_nodehdl_t nodeh, void *c_args) -{ - picl_errno_t rc = 0; - picl_prophdl_t proph; - char class[PICL_PROPNAMELEN_MAX]; - - if (ptree_get_prop_by_name(nodeh, PICL_PROP_STATE, - &proph) == PICL_SUCCESS) { - (void) ptree_delete_prop(proph); - (void) ptree_destroy_prop(proph); - } - if (ptree_get_prop_by_name(nodeh, PICL_PROP_STATUS_TIME, - &proph) == PICL_SUCCESS) { - (void) ptree_delete_prop(proph); - (void) ptree_destroy_prop(proph); - } - - if ((rc = ptree_get_propval_by_name(nodeh, PICL_PROP_CLASSNAME, - class, sizeof (class))) != PICL_SUCCESS) { - return (rc); - } - - if (strcmp(class, PICL_CLASS_PORT) == 0) { - if (ptree_get_prop_by_name(nodeh, PICL_PROP_CONDITION, - &proph) == PICL_SUCCESS) { - (void) ptree_delete_prop(proph); - (void) ptree_destroy_prop(proph); - } - if (ptree_get_prop_by_name(nodeh, PICL_PROP_CONDITION_TIME, - &proph) == PICL_SUCCESS) { - (void) ptree_delete_prop(proph); - (void) ptree_destroy_prop(proph); - } - /* delete devices table */ - if (ptree_get_prop_by_name(nodeh, PICL_PROP_DEVICES, - &proph) == PICL_SUCCESS) { - (void) ptree_delete_prop(proph); - (void) ptree_destroy_prop(proph); - } - } - return (PICL_WALK_CONTINUE); -} - -/* - * traverse thru each node fru node and do cleanup - */ -static picl_errno_t -handle_fru_unconfigure(frutree_frunode_t *frup) -{ - picl_errno_t rc = 0, retval = 0; - picl_prophdl_t proph; - picl_nodehdl_t childh, peerh, nodeh; - hashdata_t *hashptr = NULL; - frutree_frunode_t *child_frup = NULL; - char class[PICL_PROPNAMELEN_MAX]; - - if (frup == NULL) { - return (PICL_FAILURE); - } - - /* delete devices table */ - if (ptree_get_prop_by_name(frup->frunodeh, PICL_PROP_DEVICES, - &proph) == PICL_SUCCESS) { - (void) ptree_delete_prop(proph); - (void) ptree_destroy_prop(proph); - } - - /* delete Environment devices table */ - if (ptree_get_prop_by_name(frup->frunodeh, PICL_PROP_ENV, - &proph) == PICL_SUCCESS) { - (void) ptree_delete_prop(proph); - (void) ptree_destroy_prop(proph); - } - - if ((rc = ptree_walk_tree_by_class(frup->frunodeh, - NULL, NULL, frutree_handle_unconfigure)) != PICL_SUCCESS) { - return (rc); - } - - /* remove all the fru nodes under the child locations */ - retval = ptree_get_propval_by_name(frup->frunodeh, PICL_PROP_CHILD, - &peerh, sizeof (peerh)); - while (retval == PICL_SUCCESS) { - nodeh = peerh; - retval = ptree_get_propval_by_name(nodeh, PICL_PROP_PEER, - &peerh, sizeof (peerh)); - if ((rc = ptree_get_propval_by_name(nodeh, PICL_PROP_CLASSNAME, - class, sizeof (class))) != PICL_SUCCESS) { - return (rc); - } - - if (strcmp(class, PICL_CLASS_PORT) == 0) { - continue; - } - - /* if the child location has fru, delete the fru */ - if (ptree_get_propval_by_name(nodeh, PICL_PROP_CHILD, - &childh, sizeof (childh)) != PICL_SUCCESS) { - continue; - } - - /* child is present under the location */ - if ((rc = hash_lookup_entry(childh, (void **)&hashptr)) != - PICL_SUCCESS) { - return (rc); - } - child_frup = FRUDATA_PTR(hashptr); - (void) handle_fru_remove(child_frup); - } - return (PICL_SUCCESS); -} - -/* - * create the properties under the fru - */ -static picl_errno_t -create_fru_props(frutree_frunode_t *frup) -{ - picl_errno_t rc; - uint64_t ap_status_time = 0; - boolean_t state_change; - - /* create state props */ - if ((rc = create_property(PICL_PTYPE_CHARSTRING, - PICL_READ + PICL_VOLATILE, PICL_PROPNAMELEN_MAX, - PICL_PROP_STATE, get_fru_state, NULLWRITE, - frup->frunodeh, NULL, fru_state[frup->state])) != - PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_CREATE_PROP_FAILED, - PICL_PROP_STATE, frup->name, rc); - } - - ap_status_time = (uint64_t)(time(NULL)); - if ((rc = create_property(PICL_PTYPE_TIMESTAMP, PICL_READ, - sizeof (ap_status_time), PICL_PROP_STATUS_TIME, - NULLREAD, NULLWRITE, frup->frunodeh, - NULL, &ap_status_time)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_CREATE_PROP_FAILED, - PICL_PROP_STATUS_TIME, frup->name, rc); - } - - if ((rc = update_fru_state(frup, &state_change)) != PICL_SUCCESS) { - FRUTREE_DEBUG2(EVENTS, GET_FRU_STATE_ERR, frup->name, rc); - return (rc); - } - - /* create condition props */ - if ((rc = create_property(PICL_PTYPE_CHARSTRING, - PICL_READ + PICL_VOLATILE, PICL_PROPNAMELEN_MAX, - PICL_PROP_CONDITION, get_fru_condition, NULLWRITE, - frup->frunodeh, NULL, fru_cond[frup->cond])) != - PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_CREATE_PROP_FAILED, - PICL_PROP_CONDITION, frup->name, rc); - } - if ((rc = create_property(PICL_PTYPE_TIMESTAMP, PICL_READ, - sizeof (ap_status_time), PICL_PROP_CONDITION_TIME, - NULLREAD, NULLWRITE, frup->frunodeh, NULL, - &ap_status_time)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_CREATE_PROP_FAILED, - PICL_PROP_CONDITION_TIME, frup->name, rc); - } - - if ((rc = update_fru_condition(frup, &state_change)) != PICL_SUCCESS) { - FRUTREE_DEBUG2(EVENTS, GET_FRU_COND_ERR, frup->name, rc); - return (rc); - } - - /* create admin lock prop */ - if ((rc = create_property(PICL_PTYPE_CHARSTRING, - PICL_READ + PICL_WRITE, PICL_PROPNAMELEN_MAX, - PICL_PROP_ADMIN_LOCK, NULLREAD, NULLWRITE, - frup->frunodeh, NULL, PICL_ADMINLOCK_DISABLED)) != - PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_CREATE_PROP_FAILED, - PICL_PROP_ADMIN_LOCK, frup->name, rc); - } - return (rc); -} - -/* - * calls libcfgadm API to do a connect on a location - */ -static picl_errno_t -connect_fru(frutree_locnode_t *locp) -{ - picl_errno_t rc; - cfga_err_t ap_list_err; - cfga_flags_t flags = 0; - boolean_t state_change; - uint64_t ap_status_time; - hrtime_t start; - hrtime_t end; - - if (locp == NULL) { - return (PICL_FAILURE); - } - if ((rc = post_piclevent(PICLEVENT_STATE_CHANGE, - PICLEVENTARGVAL_CONNECTING, loc_state[locp->state], - locp->locnodeh, WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - locp->name, PICLEVENT_STATE_CHANGE, rc); - } - - (void) pthread_mutex_lock(&locp->mutex); - locp->dr_in_progress = B_TRUE; - (void) pthread_mutex_unlock(&locp->mutex); - - if (frutree_debug & PERF_DATA) { - start = gethrtime(); - } - ap_list_err = config_change_state(CFGA_CMD_CONNECT, 1, &(locp->name), - NULL, NULL, NULL, NULL, flags); - - if (frutree_debug & PERF_DATA) { - end = gethrtime(); - FRUTREE_DEBUG2(PERF_DATA, "time for connect on %s: %lld nsec", - locp->name, (end - start)); - } - if (ap_list_err != CFGA_OK) { - (void) pthread_mutex_lock(&locp->mutex); - locp->dr_in_progress = B_FALSE; - (void) pthread_mutex_unlock(&locp->mutex); - - /* release mutex before updating state */ - (void) update_loc_state(locp, &state_change); - if ((rc = post_piclevent(PICLEVENT_STATE_CHANGE, - loc_state[locp->state], PICLEVENTARGVAL_CONNECTING, - locp->locnodeh, WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - locp->name, PICLEVENT_STATE_CHANGE, rc); - } - if (locp->state == LOC_STATE_CONNECTED) { - /* wakeup threads sleeping on this condition */ - (void) pthread_mutex_lock(&locp->mutex); - (void) pthread_cond_broadcast(&locp->cond_cv); - (void) pthread_mutex_unlock(&locp->mutex); - return (PICL_SUCCESS); - } - return (cfg2picl_errmap[ap_list_err][1]); - } - (void) pthread_mutex_lock(&locp->mutex); - - locp->dr_in_progress = B_FALSE; - locp->prev_state = LOC_STATE_DISCONNECTED; - locp->state = LOC_STATE_CONNECTED; - ap_status_time = (uint64_t)(time(NULL)); - if ((rc = ptree_update_propval_by_name(locp->locnodeh, - PICL_PROP_STATUS_TIME, (void *)&ap_status_time, - sizeof (ap_status_time))) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_UPDATE_PROP_ERR, - PICL_PROP_STATUS_TIME, locp->name, rc); - } - - /* wakeup threads sleeping on this condition */ - (void) pthread_cond_broadcast(&locp->cond_cv); - (void) pthread_mutex_unlock(&locp->mutex); - - if ((rc = post_piclevent(PICLEVENT_STATE_CHANGE, - PICLEVENTARGVAL_CONNECTED, PICLEVENTARGVAL_CONNECTING, - locp->locnodeh, WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - locp->name, PICLEVENT_STATE_CHANGE, rc); - } - return (PICL_SUCCESS); -} - -/* - * calls libcfgadm API to do a disconnect on a location - */ -static picl_errno_t -disconnect_fru(frutree_locnode_t *locp) -{ - picl_errno_t rc; - picl_nodehdl_t childh; - hashdata_t *hashptr = NULL; - timestruc_t to; - struct timeval tp; - hrtime_t start, end; - cfga_err_t ap_list_err; - cfga_flags_t flags = 0; - boolean_t state_change; - uint64_t ap_status_time; - frutree_frunode_t *frup = NULL; - - if (locp == NULL) { - return (PICL_FAILURE); - } - - (void) pthread_mutex_lock(&locp->mutex); - if (locp->state == LOC_STATE_DISCONNECTED) { - (void) pthread_mutex_unlock(&locp->mutex); - return (PICL_SUCCESS); - } - (void) pthread_mutex_unlock(&locp->mutex); - - /* get the child fru information */ - if (ptree_get_propval_by_name(locp->locnodeh, PICL_PROP_CHILD, - &childh, sizeof (childh)) == PICL_SUCCESS) { - if (hash_lookup_entry(childh, (void **)&hashptr) == - PICL_SUCCESS) { - frup = FRUDATA_PTR(hashptr); - } - } - - if (frup == NULL) { - return (PICL_SUCCESS); - } - - (void) pthread_mutex_lock(&frup->mutex); - - (void) gettimeofday(&tp, NULL); - to.tv_sec = tp.tv_sec + frutree_drwait_time; - to.tv_nsec = tp.tv_usec * 1000; - - if (frup->state != FRU_STATE_UNCONFIGURED) { - (void) pthread_cond_timedwait(&frup->cond_cv, - &frup->mutex, &to); - } - - if (frup->state != FRU_STATE_UNCONFIGURED) { - FRUTREE_DEBUG1(LOG_ERR, "SUNW_frutree:Disconnect operation on" - " %s failed", locp->name); - (void) pthread_mutex_unlock(&frup->mutex); - return (PICL_FAILURE); - } - (void) pthread_mutex_unlock(&frup->mutex); - - if ((rc = post_piclevent(PICLEVENT_STATE_CHANGE, - PICLEVENTARGVAL_DISCONNECTING, loc_state[locp->state], - locp->locnodeh, WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - locp->name, PICLEVENT_STATE_CHANGE, rc); - } - - (void) pthread_mutex_lock(&locp->mutex); - locp->dr_in_progress = B_TRUE; - (void) pthread_mutex_unlock(&locp->mutex); - - if (frutree_debug & PERF_DATA) { - start = gethrtime(); - } - - ap_list_err = config_change_state(CFGA_CMD_DISCONNECT, 1, &(locp->name), - NULL, NULL, NULL, NULL, flags); - if (frutree_debug & PERF_DATA) { - end = gethrtime(); - FRUTREE_DEBUG2(PERF_DATA, "time for disconnect on %s: %lld ns", - locp->name, (end - start)); - } - if (ap_list_err != CFGA_OK) { - (void) pthread_mutex_lock(&locp->mutex); - locp->dr_in_progress = B_FALSE; - (void) pthread_mutex_unlock(&locp->mutex); - - /* release mutex before updating state */ - (void) update_loc_state(locp, &state_change); - if ((rc = post_piclevent(PICLEVENT_STATE_CHANGE, - loc_state[locp->state], PICLEVENTARGVAL_DISCONNECTING, - locp->locnodeh, WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - locp->name, PICLEVENT_STATE_CHANGE, rc); - } - (void) pthread_mutex_lock(&locp->mutex); - if (locp->state == LOC_STATE_DISCONNECTED) { - (void) pthread_mutex_unlock(&locp->mutex); - return (PICL_SUCCESS); - } - (void) pthread_mutex_unlock(&locp->mutex); - return (cfg2picl_errmap[ap_list_err][1]); - } - (void) pthread_mutex_lock(&locp->mutex); - locp->dr_in_progress = B_FALSE; - locp->prev_state = LOC_STATE_CONNECTED; - locp->state = LOC_STATE_DISCONNECTED; - ap_status_time = (uint64_t)(time(NULL)); - if ((rc = ptree_update_propval_by_name(locp->locnodeh, - PICL_PROP_STATUS_TIME, (void *)&ap_status_time, - sizeof (ap_status_time))) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_UPDATE_PROP_ERR, - PICL_PROP_STATUS_TIME, locp->name, rc); - } - (void) pthread_mutex_unlock(&locp->mutex); - - if ((rc = post_piclevent(PICLEVENT_STATE_CHANGE, - PICLEVENTARGVAL_DISCONNECTED, PICLEVENTARGVAL_DISCONNECTING, - locp->locnodeh, WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - locp->name, PICLEVENT_STATE_CHANGE, rc); - } - return (PICL_SUCCESS); -} - -/* - * Handle DR_INCOMING_RES event - */ -static void -handle_fru_configure(frutree_frunode_t *frup) -{ - picl_errno_t rc; - boolean_t cond_changed; - - if (frup == NULL) - return; - - if ((rc = probe_fru(frup, B_FALSE)) != PICL_SUCCESS) { - FRUTREE_DEBUG2(EVENTS, PROBE_FRU_ERR, frup->name, rc); - } - - /* update the fru condition */ - (void) update_fru_condition(frup, &cond_changed); - if (cond_changed) { - if ((rc = post_piclevent(PICLEVENT_CONDITION_CHANGE, - fru_cond[frup->cond], fru_cond[frup->prev_cond], - frup->frunodeh, WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - frup->name, PICLEVENT_CONDITION_CHANGE, rc); - } - } - - if ((rc = post_piclevent(PICLEVENT_STATE_CHANGE, - fru_state[frup->state], fru_state[frup->prev_state], - frup->frunodeh, WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - frup->name, PICLEVENT_STATE_CHANGE, rc); - } -} - -/* - * call libcfgadm API to configure a fru - * (Handle DR_INCOMING_RES event) - */ -static picl_errno_t -configure_fru(frutree_frunode_t *frup, cfga_flags_t flags) -{ - picl_errno_t rc; - picl_nodehdl_t parenth; - timestruc_t to; - struct timeval tp; - hrtime_t start, end; - cfga_err_t ap_list_err; - uint64_t ap_status_time; - hashdata_t *hashptr = NULL; - frutree_locnode_t *locp = NULL; - boolean_t state_change, cond_changed; - - if (frup == NULL) { - return (PICL_FAILURE); - } - - (void) pthread_mutex_lock(&frup->mutex); - if (frup->state == FRU_STATE_CONFIGURED) { - (void) pthread_mutex_unlock(&frup->mutex); - ap_list_err = config_change_state(CFGA_CMD_CONFIGURE, 1, - &(frup->name), NULL, NULL, NULL, NULL, flags); - return (PICL_SUCCESS); - } - (void) pthread_mutex_unlock(&frup->mutex); - - if ((rc = ptree_get_propval_by_name(frup->frunodeh, PICL_PROP_PARENT, - &parenth, sizeof (parenth))) != PICL_SUCCESS) { - return (rc); - } - - if ((rc = hash_lookup_entry(parenth, (void **)&hashptr)) != - PICL_SUCCESS) { - return (rc); - } - locp = LOCDATA_PTR(hashptr); - if (locp == NULL) { - return (PICL_FAILURE); - } - - (void) pthread_mutex_lock(&locp->mutex); - - (void) gettimeofday(&tp, NULL); - to.tv_sec = tp.tv_sec + frutree_drwait_time; - to.tv_nsec = tp.tv_usec * 1000; - - /* wait for sometime for location to get connected */ - if (locp->state != LOC_STATE_CONNECTED) { - (void) pthread_cond_timedwait(&locp->cond_cv, - &locp->mutex, &to); - } - - if (locp->state != LOC_STATE_CONNECTED) { /* give up */ - FRUTREE_DEBUG1(EVENTS, "SUNW_frutree:Configure operation on" - " %s failed as loc is not connected", locp->name); - (void) pthread_mutex_unlock(&locp->mutex); - return (PICL_FAILURE); - } - (void) pthread_mutex_unlock(&locp->mutex); - - if ((rc = post_piclevent(PICLEVENT_STATE_CHANGE, - PICLEVENTARGVAL_CONFIGURING, fru_state[frup->state], - frup->frunodeh, WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - frup->name, PICLEVENT_STATE_CHANGE, rc); - } - - (void) pthread_mutex_lock(&frup->mutex); - frup->dr_in_progress = B_TRUE; - (void) pthread_mutex_unlock(&frup->mutex); - - if (frutree_debug & PERF_DATA) { - start = gethrtime(); - } - ap_list_err = config_change_state(CFGA_CMD_CONFIGURE, 1, - &(frup->name), NULL, NULL, NULL, NULL, flags); - - if (frutree_debug & PERF_DATA) { - end = gethrtime(); - FRUTREE_DEBUG2(PERF_DATA, "time for configure on %s: %lld nsec", - frup->name, (end - start)); - } - - if (ap_list_err != CFGA_OK) { - (void) pthread_mutex_lock(&frup->mutex); - frup->dr_in_progress = B_FALSE; - (void) pthread_mutex_unlock(&frup->mutex); - /* release mutex before updating state */ - (void) update_fru_state(frup, &state_change); - if ((rc = post_piclevent(PICLEVENT_STATE_CHANGE, - fru_state[frup->state], PICLEVENTARGVAL_CONFIGURING, - frup->frunodeh, WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - frup->name, PICLEVENT_STATE_CHANGE, rc); - } - /* update the fru condition */ - (void) update_fru_condition(frup, &state_change); - if (state_change) { - if ((rc = post_piclevent(PICLEVENT_CONDITION_CHANGE, - fru_cond[frup->cond], fru_cond[frup->prev_cond], - frup->frunodeh, WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - frup->name, PICLEVENT_CONDITION_CHANGE, - rc); - } - } - return (cfg2picl_errmap[ap_list_err][1]); - } - (void) pthread_mutex_lock(&frup->mutex); - frup->dr_in_progress = B_FALSE; - frup->prev_state = FRU_STATE_UNCONFIGURED; - frup->state = FRU_STATE_CONFIGURED; - ap_status_time = (uint64_t)(time(NULL)); - if ((rc = ptree_update_propval_by_name(frup->frunodeh, - PICL_PROP_STATUS_TIME, (void *)&ap_status_time, - sizeof (ap_status_time))) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_UPDATE_PROP_ERR, - PICL_PROP_STATUS_TIME, frup->name, rc); - } - (void) pthread_mutex_unlock(&frup->mutex); - - if ((rc = probe_fru(frup, B_FALSE)) != PICL_SUCCESS) { - FRUTREE_DEBUG2(FRUTREE_INIT, PROBE_FRU_ERR, frup->name, rc); - } - /* update the fru condition */ - (void) update_fru_condition(frup, &cond_changed); - if (cond_changed) { - if ((rc = post_piclevent(PICLEVENT_CONDITION_CHANGE, - fru_cond[frup->cond], fru_cond[frup->prev_cond], - frup->frunodeh, WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - frup->name, PICLEVENT_CONDITION_CHANGE, rc); - } - } - - /* send the state change event */ - if ((rc = post_piclevent(PICLEVENT_STATE_CHANGE, - fru_state[frup->state], PICLEVENTARGVAL_CONFIGURING, - frup->frunodeh, WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - frup->name, PICLEVENT_STATE_CHANGE, rc); - } - return (PICL_SUCCESS); -} - -/* - * Handle DR_OUTGOING_RES event - * (call libcfgadm API to unconfigure a fru) - */ -static picl_errno_t -unconfigure_fru(frutree_frunode_t *frup, cfga_flags_t flags) -{ - picl_errno_t rc; - cfga_err_t ap_list_err; - boolean_t state_change; - uint64_t ap_status_time; - hrtime_t start; - hrtime_t end; - - if (frup == NULL) { - return (PICL_FAILURE); - } - - (void) pthread_mutex_lock(&frup->mutex); - if (frup->state == FRU_STATE_UNCONFIGURED) { - (void) pthread_mutex_unlock(&frup->mutex); - return (PICL_SUCCESS); - } - (void) pthread_mutex_unlock(&frup->mutex); - - if ((rc = post_piclevent(PICLEVENT_STATE_CHANGE, - PICLEVENTARGVAL_UNCONFIGURING, fru_state[frup->state], - frup->frunodeh, WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - frup->name, PICLEVENT_STATE_CHANGE, rc); - } - - (void) pthread_mutex_lock(&frup->mutex); - while (frup->busy == B_TRUE) { - (void) pthread_cond_wait(&frup->busy_cond_cv, - &frup->mutex); - } - - frup->dr_in_progress = B_TRUE; - (void) pthread_mutex_unlock(&frup->mutex); - - if (frutree_debug & PERF_DATA) { - start = gethrtime(); - } - ap_list_err = config_change_state(CFGA_CMD_UNCONFIGURE, 1, - &(frup->name), NULL, NULL, NULL, NULL, flags); - if (frutree_debug & PERF_DATA) { - end = gethrtime(); - FRUTREE_DEBUG2(PERF_DATA, "time for unconfigure on %s: %lld ns", - frup->name, (end - start)); - } - if (ap_list_err != CFGA_OK) { - /* - * call configure again (workaround for - * ENUM# to get generated for next attempt) - */ - config_change_state(CFGA_CMD_CONFIGURE, 1, - &(frup->name), NULL, NULL, NULL, NULL, flags); - - (void) pthread_mutex_lock(&frup->mutex); - frup->dr_in_progress = B_FALSE; - (void) pthread_mutex_unlock(&frup->mutex); - - /* release mutex before updating state */ - (void) update_fru_condition(frup, &state_change); - if (state_change) { - if ((rc = post_piclevent(PICLEVENT_CONDITION_CHANGE, - fru_cond[frup->cond], fru_cond[frup->prev_cond], - frup->frunodeh, WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - frup->name, PICLEVENT_CONDITION_CHANGE, - rc); - } - } - (void) update_fru_state(frup, &state_change); - if ((rc = post_piclevent(PICLEVENT_STATE_CHANGE, - fru_state[frup->state], PICLEVENTARGVAL_UNCONFIGURING, - frup->frunodeh, WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - frup->name, PICLEVENT_STATE_CHANGE, rc); - } - return (cfg2picl_errmap[ap_list_err][1]); - } - - (void) pthread_mutex_lock(&frup->mutex); - - frup->dr_in_progress = B_FALSE; - frup->prev_state = FRU_STATE_CONFIGURED; - frup->state = FRU_STATE_UNCONFIGURED; - ap_status_time = (uint64_t)(time(NULL)); - if ((rc = ptree_update_propval_by_name(frup->frunodeh, - PICL_PROP_STATUS_TIME, (void *)&ap_status_time, - sizeof (ap_status_time))) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_UPDATE_PROP_ERR, - PICL_PROP_STATUS_TIME, frup->name, rc); - } - /* wakeup threads sleeping on this condition */ - (void) pthread_cond_broadcast(&frup->cond_cv); - (void) pthread_mutex_unlock(&frup->mutex); - - /* update the fru condition */ - if ((rc = update_fru_condition(frup, &state_change)) != PICL_SUCCESS) { - FRUTREE_DEBUG2(EVENTS, GET_FRU_STATE_ERR, - frup->name, rc); - } - if (state_change) { - if ((rc = post_piclevent(PICLEVENT_CONDITION_CHANGE, - fru_cond[frup->cond], fru_cond[frup->prev_cond], - frup->frunodeh, WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - frup->name, PICLEVENT_CONDITION_CHANGE, rc); - } - } - - if ((rc = post_piclevent(PICLEVENT_STATE_CHANGE, - PICLEVENTARGVAL_UNCONFIGURED, PICLEVENTARGVAL_UNCONFIGURING, - frup->frunodeh, WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - frup->name, PICLEVENT_STATE_CHANGE, rc); - } - return (PICL_SUCCESS); -} - -/* creates fru nodes with basic properties and sends out intializing events */ -static int -create_fru_node(frutree_locnode_t *locp, frutree_frunode_t **child_frupp) -{ - picl_errno_t rc; - hashdata_t *fru_data = NULL; - frutree_frunode_t *frup = NULL; - picl_nodehdl_t fruh, child; - char slot_type[PICL_PROPNAMELEN_MAX]; - char fru_name[PICL_PROPNAMELEN_MAX]; - char apid_type[PICL_PROPNAMELEN_MAX]; - boolean_t fru_present = B_FALSE; - boolean_t state_changed = B_FALSE; - - if (locp->state == LOC_STATE_EMPTY) { - return (PICL_SUCCESS); - } - - /* check if fru is present or not */ - rc = ptree_get_propval_by_name(locp->locnodeh, PICL_PROP_CHILD, - &child, sizeof (picl_nodehdl_t)); - if (rc == PICL_SUCCESS) { - fru_present = B_TRUE; - fruh = child; - (void) ptree_get_propval_by_name(child, PICL_PROP_NAME, - fru_name, sizeof (fru_name)); - } - - /* create fru node */ - if (fru_present == B_FALSE) { - (void) strncpy(fru_name, locp->name, sizeof (fru_name)); - if ((rc = ptree_create_node(fru_name, PICL_CLASS_FRU, - &fruh)) != PICL_SUCCESS) { - return (rc); - } - } - - /* initialize internal data structures */ - if ((rc = make_fru_data(fru_name, &fru_data)) != PICL_SUCCESS) { - return (rc); - } - frup = FRUDATA_PTR(fru_data); - - frup->frunodeh = fruh; - frup->cpu_node = locp->cpu_node; - frup->state_mgr = locp->state_mgr; - *child_frupp = frup; - - if ((rc = hash_add_entry(fruh, (void *)(fru_data))) != PICL_SUCCESS) { - (void) ptree_destroy_node(fruh); - free_data(FRU_TYPE, (fru_data)); - return (rc); - } - - if (locp->state_mgr == STATIC_LOC) { - if ((rc = ptree_get_propval_by_name(locp->locnodeh, - PICL_PROP_SLOT_TYPE, slot_type, - sizeof (slot_type))) == PICL_SUCCESS) { - (void) strncpy(apid_type, slot_type, - sizeof (apid_type)); - } - } - - /* create fru type property */ - if ((rc = create_property(PICL_PTYPE_CHARSTRING, PICL_READ, - PICL_PROPNAMELEN_MAX, PICL_PROP_FRU_TYPE, NULLREAD, - NULLWRITE, fruh, NULL, apid_type)) != - PICL_SUCCESS) { - FRUTREE_DEBUG3(FRUTREE_INIT, PTREE_CREATE_PROP_FAILED, - PICL_PROP_FRU_TYPE, frup->name, rc); - } - - if (fru_present == B_FALSE) { - if ((rc = ptree_add_node(locp->locnodeh, fruh)) != - PICL_SUCCESS) { - (void) ptree_destroy_node(fruh); - (void) hash_remove_entry(fruh); - return (rc); - } - } - - if (locp->state_mgr == PLUGIN_PVT) { - (void) update_fru_state(frup, &state_changed); - return (PICL_SUCCESS); - } - - if ((rc = create_fru_props(frup)) != PICL_SUCCESS) { - return (rc); - } - return (PICL_SUCCESS); -} - -static picl_errno_t -add_node2cache(picl_nodehdl_t nodeh, char *class, frutree_cache_t **cacheptr) -{ - int instance; - picl_errno_t rc; - char driver[PICL_PROPNAMELEN_MAX]; - char bus_addr[PICL_PROPNAMELEN_MAX]; - char devfs_path[PICL_PROPNAMELEN_MAX]; - char node_name[PICL_PROPNAMELEN_MAX]; - char port_type[PICL_PROPNAMELEN_MAX]; - char label[PICL_PROPNAMELEN_MAX]; - frutree_cache_t *cachep = NULL; - - if (strcmp(class, SANIBEL_NETWORK_PORT) == 0) { - (void) strncpy(label, SANIBEL_NETWORK_LABEL, sizeof (label)); - (void) strncpy(node_name, PICL_CLASS_PORT, sizeof (node_name)); - (void) strncpy(port_type, SANIBEL_NETWORK_PORT, - sizeof (port_type)); - - } else if (strcmp(class, SANIBEL_SERIAL_PORT) == 0) { - (void) strncpy(label, SANIBEL_SERIAL_PORT, sizeof (label)); - (void) strncpy(node_name, PICL_CLASS_PORT, sizeof (node_name)); - (void) strncpy(port_type, SANIBEL_SERIAL_PORT, - sizeof (port_type)); - - } else if (strcmp(class, SANIBEL_PARALLEL_PORT) == 0) { - (void) strncpy(label, SANIBEL_PARALLEL_PORT, sizeof (label)); - (void) strncpy(node_name, PICL_CLASS_PORT, sizeof (node_name)); - (void) strncpy(port_type, SANIBEL_PARALLEL_PORT, - sizeof (port_type)); - - } else { - return (PICL_FAILURE); - } - - if ((rc = ptree_get_propval_by_name(nodeh, PICL_PROP_INSTANCE, - &instance, sizeof (instance))) != PICL_SUCCESS) { - return (rc); - } - - /* load the driver */ - if (instance < 0) { - attach_driver(driver); - } - - if ((rc = ptree_get_propval_by_name(nodeh, PICL_PROP_DEVFS_PATH, - devfs_path, sizeof (devfs_path))) != PICL_SUCCESS) { - return (rc); - } - - /* get either bus address or unit address */ - if ((rc = ptree_get_propval_by_name(nodeh, PICL_PROP_BUS_ADDR, bus_addr, - sizeof (bus_addr))) != PICL_SUCCESS) { - if ((rc = ptree_get_propval_by_name(nodeh, - PICL_PROP_UNIT_ADDRESS, bus_addr, - sizeof (bus_addr))) != PICL_SUCCESS) { - return (rc); - } - } - - if ((rc = ptree_get_propval_by_name(nodeh, PICL_PROP_DRIVER_NAME, - driver, sizeof (driver))) != PICL_SUCCESS) { - return (rc); - } - - cachep = (frutree_cache_t *)malloc(sizeof (frutree_cache_t)); - if (NULL == cachep) { - return (PICL_NOSPACE); - } - cachep->buf[0] = '\0'; - - /* update the cache buffer in PICL configuration format */ - (void) snprintf(cachep->buf, sizeof (cachep->buf), - "\n%s %s%d %s\n" - "\t%s %s %s %s 0 \"%s %d\"\n" - "\t%s %s %s %s 0 \"%s\"\n" - "\t%s %s %s %s 1 %d\n" - "\t%s %s %s %s 0 \"%s\"\n" - "\t%s %s %s %s 0 \"%s\"\n" - "%s\n", - "NODE", driver, instance, node_name, - "PROP", PICL_PROP_LABEL, "string", "r", label, instance, - "PROP", PICL_PROP_BUS_ADDR, "string", "r", bus_addr, - "PROP", PICL_PROP_GEO_ADDR, "uint", "r", instance, - "PROP", PICL_PROP_PORT_TYPE, "string", "r", port_type, - "PROP", PICL_PROP_DEVFS_PATH, "string", "r", devfs_path, - "ENDNODE"); - *cacheptr = cachep; - return (PICL_SUCCESS); -} - -/* ARGSUSED */ -static int -create_device_entries(picl_nodehdl_t nodeh, void *c_args) -{ - char class[PICL_CLASSNAMELEN_MAX]; - char name[PICL_PROPNAMELEN_MAX]; - frutree_device_args_t *device = NULL; - frutree_cache_t *cachep = NULL; - - if (c_args == NULL) { /* need not create cache */ - return (PICL_INVALIDARG); - } - device = (frutree_device_args_t *)c_args; - - if (ptree_get_propval_by_name(nodeh, PICL_PROP_CLASSNAME, - class, sizeof (class)) != PICL_SUCCESS) { - return (PICL_WALK_CONTINUE); - } - - /* add reference handle to Devices table */ - (void) create_table_entry(device->device_tblhdl, nodeh, class); - - /* add to Environment Devices table */ - if (strcmp(class, PICL_CLASS_TEMPERATURE_SENSOR) == 0) { - if (device->env_tblhdl) { - (void) create_table_entry(device->env_tblhdl, nodeh, - class); - } - } - - if (device->create_cache != B_TRUE) { /* dont create cache */ - return (PICL_WALK_CONTINUE); - } - - /* compare the classname and create the cache entry for the child */ - if (ptree_get_propval_by_name(nodeh, PICL_PROP_NAME, name, - sizeof (name)) != PICL_SUCCESS) { - return (PICL_WALK_CONTINUE); - } - - if (strcmp(name, SANIBEL_PICLNODE_PARALLEL) == 0) { - (void) strncpy(class, SANIBEL_PARALLEL_PORT, sizeof (class)); - } - - if (add_node2cache(nodeh, class, &cachep) != PICL_SUCCESS) { - return (PICL_WALK_CONTINUE); - } - - /* add cache to the linked list */ - if (cachep != NULL) { - cachep->next = NULL; - if (device->first == NULL) { /* 1st node */ - device->first = cachep; - device->last = NULL; - - } else if (device->last != NULL) { /* last node */ - device->last->next = cachep; - device->last = cachep; - - } else { /* 2nd node */ - device->first->next = cachep; - device->last = cachep; - } - } - return (PICL_WALK_CONTINUE); -} - -/* - * determine the state manager for this node - */ -static picl_errno_t -get_loc_type(frutree_locnode_t *locp) -{ - picl_errno_t rc; - cfga_list_data_t *list = NULL; - char valbuf[PICL_PROPNAMELEN_MAX]; - char slot_type[PICL_PROPNAMELEN_MAX]; - - if (locp->state_mgr != UNKNOWN) - return (PICL_SUCCESS); - - rc = ptree_get_propval_by_name(locp->locnodeh, PICL_PROP_STATE, - (void *)valbuf, PICL_PROPNAMELEN_MAX); - if (rc == PICL_SUCCESS) { /* managed by platform specific plugin */ - locp->state_mgr = PLUGIN_PVT; - return (PICL_SUCCESS); - } - - /* get the info from the libcfgadm interface */ - list = (cfga_list_data_t *)malloc(sizeof (cfga_list_data_t)); - if (list == NULL) { - return (PICL_NOSPACE); - } - - if ((rc = get_cfgadm_state(list, locp->name)) == PICL_SUCCESS) { - locp->state_mgr = CFGADM_AP; - } else { - if ((rc = ptree_get_propval_by_name(locp->locnodeh, - PICL_PROP_SLOT_TYPE, slot_type, - sizeof (slot_type))) != PICL_SUCCESS) { - free(list); - return (rc); - } - if (strcmp(slot_type, SANIBEL_SCSI_SLOT) == 0 || - strcmp(slot_type, SANIBEL_IDE_SLOT) == 0) { - /* - * for scsi locations, if cfgadm ap is - * not present, then consider it as device - * not present - */ - locp->state_mgr = CFGADM_AP; - } else { - /* - * devices like PMC card doesnt showup in cfgadm - */ - locp->state_mgr = STATIC_LOC; - } - } - free(list); - return (PICL_SUCCESS); -} - -/* - * Initialize the location node.(create all the props) - */ -static picl_errno_t -location_init(frutree_locnode_t *locp) -{ - picl_errno_t rc; - boolean_t state_change; - uint64_t ap_status_time = 0; - char valbuf[PICL_PROPNAMELEN_MAX]; - - /* check if it is a CPU location node or not */ - if (ptree_get_propval_by_name(locp->locnodeh, PICL_PROP_NAME, - (void *)valbuf, PICL_PROPNAMELEN_MAX) == PICL_SUCCESS) { - if (strncmp(valbuf, SANIBEL_PICLNODE_CPU, - strlen(SANIBEL_PICLNODE_CPU)) == 0) { - locp->cpu_node = B_TRUE; - } - } - /* - * Algorithm: - * if "State" prop is already created (node is managed by other plugin) - * does nothing - * else if cfgadm ap is found - * creates State prop and intializes it - * else - * find the nodes using libdevinfo under a given path - * at given geoaddr - * if node is found - * mark node state a connected - * else - * mark node state a empty - */ - (void) get_loc_type(locp); - if (locp->state_mgr == PLUGIN_PVT) { - (void) update_loc_state(locp, &state_change); - return (PICL_SUCCESS); - } - - if (locp->state_mgr == STATIC_LOC) { - /* - * in case of scsi locations,, loc state will be connected - * no need to check again if the fru is present using libdevinfo - */ - if (locp->state != LOC_STATE_CONNECTED) { - if (is_fru_present_under_location(locp) == B_TRUE) { - locp->state = LOC_STATE_CONNECTED; - } else { - locp->state = LOC_STATE_EMPTY; - } - } - } - /* create state property */ - if ((rc = create_property(PICL_PTYPE_CHARSTRING, - PICL_READ + PICL_VOLATILE, PICL_PROPNAMELEN_MAX, - PICL_PROP_STATE, get_loc_state, NULLWRITE, locp->locnodeh, - NULL, loc_state[locp->state])) != PICL_SUCCESS) { - FRUTREE_DEBUG3(FRUTREE_INIT, PTREE_CREATE_PROP_FAILED, - PICL_PROP_STATE, locp->name, rc); - return (rc); - } - ap_status_time = (uint64_t)(time(NULL)); - - /* create location StatusTime prop. */ - if ((rc = create_property(PICL_PTYPE_TIMESTAMP, PICL_READ, - sizeof (uint64_t), PICL_PROP_STATUS_TIME, NULLREAD, - NULLWRITE, locp->locnodeh, NULL, &ap_status_time)) != - PICL_SUCCESS) { - FRUTREE_DEBUG3(FRUTREE_INIT, PTREE_CREATE_PROP_FAILED, - PICL_PROP_STATUS_TIME, locp->name, rc); - return (rc); - } - - if ((rc = update_loc_state(locp, &state_change)) != PICL_SUCCESS) { - FRUTREE_DEBUG2(FRUTREE_INIT, GET_LOC_STATE_ERR, locp->name, rc); - return (rc); - } - return (PICL_SUCCESS); -} - -static frutree_port_type_t -frutree_get_port_type(frutree_portnode_t *portp) -{ - char device_type[PICL_PROPNAMELEN_MAX]; - frutree_port_type_t port_type = UNKNOWN_PORT; - - if (portp == NULL) { - return (port_type); - } - - if (ptree_get_propval_by_name(portp->portnodeh, - PICL_PROP_PORT_TYPE, device_type, - sizeof (device_type)) == PICL_SUCCESS) { - if (strcmp(device_type, SANIBEL_NETWORK_PORT) == 0) { - port_type = NETWORK_PORT; - } else if (strcmp(device_type, - SANIBEL_SERIAL_PORT) == 0) { - port_type = SERIAL_PORT; - } else if (strcmp(device_type, - SANIBEL_PARALLEL_PORT) == 0) { - port_type = PARALLEL_PORT; - } - } - return (port_type); -} - -/* volatile callback function to get port condition */ -static int -get_port_condition(ptree_rarg_t *rarg, void *buf) -{ - picl_errno_t rc; - hashdata_t *hashptr = NULL; - frutree_portnode_t *portp = NULL; - frutree_port_type_t port_type; - - if (buf == NULL) { - return (PICL_INVALIDARG); - } - - if ((rc = hash_lookup_entry(rarg->nodeh, (void **)&hashptr)) != - PICL_SUCCESS) { - return (rc); - } - - portp = PORTDATA_PTR(hashptr); - if (portp == NULL) { - return (PICL_FAILURE); - } - port_type = frutree_get_port_type(portp); - - if (port_type == UNKNOWN_PORT) { - portp->cond = PORT_COND_UNKNOWN; - (void) strncpy((char *)buf, port_cond[portp->cond], - PICL_PROPNAMELEN_MAX); - return (PICL_SUCCESS); - } - - if ((rc = update_port_state(portp, B_TRUE)) != PICL_SUCCESS) { - return (rc); - } - - (void) strncpy((char *)buf, port_cond[portp->cond], - PICL_PROPNAMELEN_MAX); - return (PICL_SUCCESS); -} - -/* volatile callback function to get port state */ -static int -get_port_state(ptree_rarg_t *rarg, void *buf) -{ - picl_errno_t rc; - hashdata_t *hashptr = NULL; - frutree_portnode_t *portp = NULL; - frutree_port_type_t port_type; - - if (buf == NULL) { - return (PICL_INVALIDARG); - } - if ((rc = hash_lookup_entry(rarg->nodeh, (void **)&hashptr)) != - PICL_SUCCESS) { - return (rc); - } - portp = PORTDATA_PTR(hashptr); - if (portp == NULL) { - return (PICL_FAILURE); - } - - port_type = frutree_get_port_type(portp); - if (port_type == UNKNOWN_PORT) { - portp->state = PORT_STATE_UNKNOWN; - (void) strncpy((char *)buf, port_state[portp->state], - PICL_PROPNAMELEN_MAX); - return (PICL_SUCCESS); - } - - if ((rc = update_port_state(portp, B_TRUE)) != PICL_SUCCESS) { - return (rc); - } - (void) strncpy((char *)buf, port_state[portp->state], - PICL_PROPNAMELEN_MAX); - return (PICL_SUCCESS); -} - -/* - * Creates State and Condition property for a port node - */ -static picl_errno_t -port_init(frutree_portnode_t *portp) -{ - picl_prophdl_t proph; - ptree_propinfo_t propinfo; - void *vbuf; - picl_errno_t rc; - uint64_t status_time; - picl_nodehdl_t refhdl; - frutree_device_args_t device; - picl_prophdl_t tblprophdl, tblhdl; - char class[PICL_PROPNAMELEN_MAX]; - - if (portp == NULL) { - return (PICL_FAILURE); - } - refhdl = get_reference_handle(portp->portnodeh); - - /* traverse thru platform tree and add entries to Devices table */ - if (refhdl != 0) { - /* create Devices table property */ - if ((rc = create_property(PICL_PTYPE_TABLE, PICL_READ, - sizeof (picl_prophdl_t), PICL_PROP_DEVICES, - NULLREAD, NULLWRITE, portp->portnodeh, &tblprophdl, - &tblhdl)) != PICL_SUCCESS) { - return (rc); - } - - /* walk down the subtree and populate Devices */ - if ((rc = ptree_get_propval_by_name(refhdl, - PICL_PROP_CLASSNAME, class, - sizeof (class))) != PICL_SUCCESS) { - return (rc); - } - if ((rc = create_table_entry(tblhdl, refhdl, class)) != - PICL_SUCCESS) { - return (rc); - } - - device.nodeh = refhdl; - device.device_tblhdl = tblhdl; - device.first = NULL; - device.last = NULL; - device.create_cache = B_FALSE; - - if ((rc = do_action(refhdl, CREATE_DEVICES_ENTRIES, - (void *)&device)) != PICL_SUCCESS) { - return (rc); - } - - if ((rc = ptree_get_prop_by_name(refhdl, PICL_PROP_INSTANCE, - &proph)) != PICL_SUCCESS) { - return (rc); - } - if ((rc = ptree_get_propinfo(proph, &propinfo)) != - PICL_SUCCESS) { - return (rc); - } - vbuf = alloca(propinfo.piclinfo.size); - if (vbuf == NULL) - return (PICL_NOSPACE); - - if ((rc = ptree_get_propval(proph, vbuf, - propinfo.piclinfo.size)) != PICL_SUCCESS) { - return (rc); - } - portp->instance = *(int *)vbuf; - - if ((rc = ptree_get_prop_by_name(refhdl, - PICL_PROP_DRIVER_NAME, &proph)) != PICL_SUCCESS) { - return (rc); - } - if ((rc = ptree_get_propinfo(proph, &propinfo)) != - PICL_SUCCESS) { - return (rc); - } - vbuf = alloca(propinfo.piclinfo.size); - if (vbuf == NULL) - return (PICL_NOSPACE); - - if ((rc = ptree_get_propval(proph, vbuf, - propinfo.piclinfo.size)) != PICL_SUCCESS) { - return (rc); - } - - (void) strncpy(portp->driver, (char *)vbuf, - sizeof (portp->driver)); - } else { - /* this node is created using libdevinfo or conf file */ - if ((rc = get_port_info(portp)) != PICL_SUCCESS) { - return (rc); - } - } - - /* create state and condition properties */ - if ((rc = create_property(PICL_PTYPE_CHARSTRING, - PICL_READ | PICL_VOLATILE, PICL_PROPNAMELEN_MAX, - PICL_PROP_STATE, get_port_state, NULLWRITE, portp->portnodeh, - NULL, port_state[portp->state])) != PICL_SUCCESS) { - return (rc); - } - - status_time = (uint64_t)(time(NULL)); - if ((rc = create_property(PICL_PTYPE_TIMESTAMP, PICL_READ, - sizeof (uint64_t), PICL_PROP_STATUS_TIME, NULLREAD, - NULLWRITE, portp->portnodeh, NULL, &status_time)) != - PICL_SUCCESS) { - return (rc); - } - - if ((rc = create_property(PICL_PTYPE_CHARSTRING, - PICL_READ | PICL_VOLATILE, PICL_PROPNAMELEN_MAX, - PICL_PROP_CONDITION, get_port_condition, NULLWRITE, - portp->portnodeh, NULL, port_cond[portp->cond])) != - PICL_SUCCESS) { - return (rc); - } - if ((rc = create_property(PICL_PTYPE_TIMESTAMP, PICL_READ, - sizeof (uint64_t), PICL_PROP_CONDITION_TIME, NULLREAD, - NULLWRITE, portp->portnodeh, NULL, &status_time)) != - PICL_SUCCESS) { - return (rc); - } - (void) update_port_state(portp, B_FALSE); - return (PICL_SUCCESS); -} - -/* - * This routine dynamically determines the scsi name (using libcfgadm) - * that corresponds to the node specified in configuration file - */ -static picl_errno_t -init_scsi_slot(frutree_frunode_t *frup, frutree_locnode_t **ptr2locp, - boolean_t *node_name_changed) -{ - picl_errno_t rc; - char devfs_path[PICL_PROPNAMELEN_MAX]; - char bus_addr[PICL_PROPNAMELEN_MAX]; - char label[PICL_PROPNAMELEN_MAX]; - char name[MAXPATHLEN]; - uint8_t geo_addr = 0; - frutree_locnode_t *locp = NULL, *new_locp = NULL; - hashdata_t *hashptr = NULL; - picl_nodehdl_t nodeh; - - if (ptr2locp == NULL) { - return (PICL_INVALIDARG); - } - locp = (frutree_locnode_t *)*ptr2locp; - *node_name_changed = B_FALSE; - - if (locp == NULL) { - return (PICL_FAILURE); - } - - if ((rc = ptree_get_propval_by_name(locp->locnodeh, - PICL_PROP_DEVFS_PATH, devfs_path, - sizeof (devfs_path))) != PICL_SUCCESS) { - return (rc); - } - - if ((rc = ptree_get_propval_by_name(locp->locnodeh, - PICL_PROP_BUS_ADDR, bus_addr, - sizeof (bus_addr))) != PICL_SUCCESS) { - return (rc); - } - - /* find the dynamic ap_id from libcfgadm */ - if ((rc = get_scsislot_name(devfs_path, bus_addr, - name)) != PICL_SUCCESS) { - /* if rc is NODENOTFOUND, then slot is empty */ - if (rc != PICL_NODENOTFOUND) { - return (rc); - } else { - return (PICL_SUCCESS); - } - } - - /* node name is same, so dont change anything */ - if (strcmp(name, locp->name) == 0) { - return (PICL_SUCCESS); - } - - if ((rc = ptree_get_propval_by_name(locp->locnodeh, - PICL_PROP_GEO_ADDR, &geo_addr, - sizeof (geo_addr))) != PICL_SUCCESS) { - geo_addr = 0; - } - - if ((rc = ptree_get_propval_by_name(locp->locnodeh, - PICL_PROP_LABEL, label, - sizeof (label))) != PICL_SUCCESS) { - return (rc); - } - - /* Now recreate the node with new name */ - if ((rc = ptree_create_node(name, PICL_CLASS_LOCATION, - &nodeh)) != PICL_SUCCESS) { - return (rc); - } - - /* add all the properties now */ - (void) create_property(PICL_PTYPE_CHARSTRING, PICL_READ, - PICL_PROPNAMELEN_MAX, PICL_PROP_SLOT_TYPE, NULLREAD, - NULLWRITE, nodeh, (picl_prophdl_t *)NULL, - SANIBEL_SCSI_SLOT); - - (void) create_property(PICL_PTYPE_CHARSTRING, PICL_READ, - PICL_PROPNAMELEN_MAX, PICL_PROP_LABEL, NULLREAD, - NULLWRITE, nodeh, (picl_prophdl_t *)NULL, - label); - - (void) create_property(PICL_PTYPE_CHARSTRING, PICL_READ, - PICL_PROPNAMELEN_MAX, PICL_PROP_BUS_ADDR, NULLREAD, - NULLWRITE, nodeh, (picl_prophdl_t *)NULL, - bus_addr); - - (void) create_property(PICL_PTYPE_UNSIGNED_INT, PICL_READ, - sizeof (uint8_t), PICL_PROP_GEO_ADDR, NULLREAD, - NULLWRITE, nodeh, (picl_prophdl_t *)NULL, - &geo_addr); - - (void) create_property(PICL_PTYPE_CHARSTRING, PICL_READ, - PICL_PROPNAMELEN_MAX, PICL_PROP_DEVFS_PATH, NULLREAD, - NULLWRITE, nodeh, (picl_prophdl_t *)NULL, - devfs_path); - (void) ptree_add_node(frup->frunodeh, nodeh); - - if ((rc = make_loc_data(name, &hashptr)) != PICL_SUCCESS) { - return (rc); - } - /* save data in hash table */ - if ((rc = hash_add_entry(nodeh, (void *)hashptr)) != PICL_SUCCESS) { - free_data(hashptr->type, hashptr); - return (rc); - } - - new_locp = LOCDATA_PTR(hashptr); - new_locp->locnodeh = nodeh; - *ptr2locp = new_locp; - *node_name_changed = B_TRUE; - return (PICL_SUCCESS); -} - -/* - * find the child nodes under a fru and initialize them - */ -static int -frutree_initialize_children(picl_nodehdl_t childh, void *c_args) -{ - picl_errno_t rc; - picl_nodehdl_t parenth; - boolean_t node_changed = B_FALSE; - hashdata_t *datap = NULL; - char name[PICL_PROPNAMELEN_MAX]; - char class[PICL_PROPNAMELEN_MAX]; - frutree_frunode_t *frup = NULL; - frutree_init_callback_arg_t *arg; - - if (c_args == NULL) { - return (PICL_INVALIDARG); - } - arg = (frutree_init_callback_arg_t *)c_args; - frup = arg->frup; - - if ((rc = ptree_get_propval_by_name(childh, PICL_PROP_PARENT, - &parenth, sizeof (parenth))) != PICL_SUCCESS) { - return (rc); - } - - if (parenth != frup->frunodeh) - return (PICL_WALK_CONTINUE); - - if ((rc = ptree_get_propval_by_name(childh, PICL_PROP_CLASSNAME, class, - sizeof (class))) != PICL_SUCCESS) { - return (rc); - } - - if ((rc = ptree_get_propval_by_name(childh, PICL_PROP_NAME, name, - sizeof (name))) != PICL_SUCCESS) { - return (rc); - } - - if (strcmp(class, PICL_CLASS_LOCATION) == 0) { - char slot_type[PICL_PROPNAMELEN_MAX]; - frutree_locnode_t *locp = NULL; - frutree_frunode_t *child_frup = NULL; - /* initialize internal data structure */ - if ((rc = make_loc_data(name, &datap)) != PICL_SUCCESS) { - return (PICL_WALK_CONTINUE); - } - locp = LOCDATA_PTR(datap); - locp->locnodeh = childh; - /* save data in hash table */ - (void) hash_add_entry(childh, (void *)datap); - if ((rc = ptree_get_propval_by_name(locp->locnodeh, - PICL_PROP_SLOT_TYPE, slot_type, - sizeof (slot_type))) != PICL_SUCCESS) { - FRUTREE_DEBUG3(FRUTREE_INIT, PTREE_GET_PROPVAL_ERR, - PICL_PROP_SLOT_TYPE, locp->name, rc); - return (PICL_WALK_CONTINUE); - } else { - if (strcmp(slot_type, SANIBEL_SCSI_SLOT) == 0 || - strcmp(slot_type, SANIBEL_IDE_SLOT) == 0) { - /* - * this rountine finds the valid cfgadm - * ap_id name for a given node and - * creates a new node with that name. - * If the node name is changed, the present - * node must be added to the list of nodes - * to be deleted from tree after ptree walk. - */ - (void) init_scsi_slot(frup, &locp, - &node_changed); - if (node_changed) { - delete_list_t *nodep = NULL; - /* - * add this node to list of nodes - * to be removed - */ - nodep = (delete_list_t *)malloc( - sizeof (delete_list_t)); - if (nodep == NULL) { - return (PICL_NOSPACE); - } - nodep->nodeh = childh; - nodep->next = NULL; - - if (arg->first == NULL) { - arg->first = nodep; - } else { /* add 2 front */ - nodep->next = arg->first; - arg->first = nodep; - } - } - } - } - if ((rc = location_init(locp)) != PICL_SUCCESS) { - return (PICL_WALK_CONTINUE); - } - - /* if location is empty, done */ - if (locp->state == LOC_STATE_EMPTY || - locp->state == LOC_STATE_UNKNOWN) { - return (PICL_WALK_CONTINUE); - } - - /* create the fru node and initialize it */ - if ((rc = create_fru_node(locp, &child_frup)) != - PICL_SUCCESS) { - return (PICL_WALK_CONTINUE); - } - - /* - * if fru is already configured, create the - * subtree under the child fru - */ - if (child_frup->state == FRU_STATE_CONFIGURED) { - /* initialize the fru_path */ - if ((rc = probe_fru(child_frup, B_TRUE)) != - PICL_SUCCESS) { - FRUTREE_DEBUG2(EVENTS, PROBE_FRU_ERR, - child_frup->name, rc); - } - } - } else if (strcmp(class, PICL_CLASS_PORT) == 0) { - frutree_portnode_t *portp = NULL; - if ((rc = make_port_data(name, &datap)) != PICL_SUCCESS) { - return (PICL_WALK_CONTINUE); - } - (void) hash_add_entry(childh, (void *)datap); - portp = PORTDATA_PTR(datap); - portp->portnodeh = childh; - (void) port_init(portp); - } - return (PICL_WALK_CONTINUE); -} - -/* traverse thru all locations under fru and initiate connects */ -static int -initiate_connects(picl_nodehdl_t nodeh, void *args) -{ - picl_errno_t rc; - hashdata_t *hashptr = NULL; - picl_nodehdl_t parenth; - frutree_frunode_t *frup = NULL; - frutree_locnode_t *locp = NULL; - - if (args == NULL) { - return (PICL_INVALIDARG); - } - frup = (frutree_frunode_t *)args; - - if ((rc = ptree_get_propval_by_name(nodeh, PICL_PROP_PARENT, - &parenth, sizeof (parenth))) != PICL_SUCCESS) { - return (rc); - } - - if (parenth != frup->frunodeh) - return (PICL_WALK_CONTINUE); - - if ((rc = hash_lookup_entry(nodeh, (void **)&hashptr)) != - PICL_SUCCESS) { - return (PICL_WALK_CONTINUE); - } - locp = LOCDATA_PTR(hashptr); - - if (locp->state == LOC_STATE_EMPTY || - locp->state == LOC_STATE_UNKNOWN || - locp->state == LOC_STATE_CONNECTED) { - return (PICL_WALK_CONTINUE); - } - - /* if loc is not connected, do a connect operation */ - if (locp->autoconfig_enabled) { - if ((rc = connect_fru(locp)) != PICL_SUCCESS) { - FRUTREE_DEBUG2(EVENTS, CONNECT_FAILED_ERR, - locp->name, rc); - } - } - return (PICL_WALK_CONTINUE); -} - -/* - * Initializes the subtree under a FRU - */ -static picl_errno_t -fru_init(frutree_frunode_t *frup) -{ - picl_errno_t rc; - delete_list_t *tmp = NULL, *curr = NULL; - frutree_init_callback_arg_t arg; - - if (frup == NULL) { - return (PICL_INVALIDARG); - } - - arg.frup = frup; - arg.first = NULL; - - /* - * this routine creates internal data structures for - * all the children under this fru and initializes them - */ - if ((rc = do_action(frup->frunodeh, INIT_FRU, - (void *)&arg)) != PICL_SUCCESS) { - return (rc); - } - - /* traverse thru delete_nodes_list and delete the nodes from tree */ - curr = arg.first; - while (curr) { - tmp = curr; - (void) ptree_delete_node(tmp->nodeh); - (void) ptree_destroy_node(tmp->nodeh); - (void) hash_remove_entry(tmp->nodeh); - free(tmp); - curr = curr->next; - } - - /* - * dont post events during intialization (for other FRUs) - * chassis intialization will take care of posting events - * for complete frutree - */ - if ((frup->frunodeh == chassish) || - (post_picl_events == B_TRUE)) { - if ((rc = do_action(frup->frunodeh, POST_EVENTS, NULL)) != - PICL_SUCCESS) { - FRUTREE_DEBUG1(LOG_ERR, "SUNW_frutree:Error in " - "posting picl events(error=%d)", rc); - } - } - - if (frup->frunodeh == chassish) { - post_picl_events = B_TRUE; - frutree_connects_initiated = B_TRUE; - } - - /* initiate connects */ - if ((rc = ptree_walk_tree_by_class(frup->frunodeh, PICL_CLASS_LOCATION, - (void *)frup, initiate_connects)) != PICL_SUCCESS) { - return (rc); - } - return (PICL_SUCCESS); -} - -/*ARGSUSED*/ -static int -post_events(picl_nodehdl_t childh, void *c_args) -{ - int rc; - hashdata_t *hashptr = NULL; - frutree_frunode_t *frup = NULL; - frutree_locnode_t *locp = NULL; - frutree_portnode_t *portp = NULL; - char classval[PICL_CLASSNAMELEN_MAX]; - - if ((rc = ptree_get_propval_by_name(childh, PICL_PROP_CLASSNAME, - classval, sizeof (classval))) != PICL_SUCCESS) { - return (PICL_WALK_CONTINUE); - } - - if ((rc = hash_lookup_entry(childh, (void **)&hashptr)) != - PICL_SUCCESS) { - return (PICL_WALK_CONTINUE); - } - - if (strcmp(classval, PICL_CLASS_LOCATION) == 0) { - locp = LOCDATA_PTR(hashptr); - if ((rc = post_piclevent(PICLEVENT_STATE_CHANGE, - loc_state[locp->state], loc_state[locp->prev_state], - childh, WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - locp->name, PICLEVENT_STATE_CHANGE, rc); - } - return (PICL_WALK_CONTINUE); - } - - if (strcmp(classval, PICL_CLASS_FRU) == 0) { - frup = FRUDATA_PTR(hashptr); - if ((rc = post_piclevent(PICLEVENT_STATE_CHANGE, - fru_state[frup->state], fru_state[frup->prev_state], - childh, WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - frup->name, PICLEVENT_STATE_CHANGE, rc); - } - if ((rc = post_piclevent(PICLEVENT_CONDITION_CHANGE, - fru_cond[frup->cond], fru_cond[frup->prev_cond], - frup->frunodeh, WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - frup->name, PICLEVENT_CONDITION_CHANGE, rc); - } - return (PICL_WALK_CONTINUE); - } - - if (strcmp(classval, PICL_CLASS_PORT) == 0) { - portp = PORTDATA_PTR(hashptr); - if ((rc = post_piclevent(PICLEVENT_STATE_CHANGE, - port_state[portp->state], NULL, - portp->portnodeh, WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - portp->name, PICLEVENT_STATE_CHANGE, rc); - } - if ((rc = post_piclevent(PICLEVENT_CONDITION_CHANGE, - port_cond[portp->cond], NULL, - portp->portnodeh, WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - portp->name, PICLEVENT_CONDITION_CHANGE, rc); - } - return (PICL_WALK_CONTINUE); - } - return (PICL_WALK_CONTINUE); -} - -/* - * This function is a utility function that calls the - * appropriate call back function for the all the nodes under - * the specified root node. - * future additions can be done by defining new action and callback. - */ -static picl_errno_t -do_action(picl_nodehdl_t root, int action, void *cargs) -{ - int rc; - callback_t func_ptr; - char *class = NULL; - - switch (action) { - - case INIT_FRU: - func_ptr = frutree_initialize_children; - class = NULL; - break; - case CREATE_DEVICES_ENTRIES: - func_ptr = create_device_entries; - class = NULL; - break; - case POST_EVENTS: - func_ptr = post_events; - class = NULL; - break; - default: - return (PICL_INVALIDARG); - } - - if ((rc = ptree_walk_tree_by_class(root, class, cargs, - func_ptr)) != PICL_SUCCESS) { - return (rc); - } - return (PICL_SUCCESS); -} - -static picl_errno_t -frutree_update_chassis_state(frutree_frustate_t state, - frutree_frustate_t prev_state) -{ - uint64_t ap_status_time; - picl_errno_t rc = 0; - char present_state[PICL_PROPNAMELEN_MAX]; - - (void) strncpy(present_state, fru_state[state], sizeof (present_state)); - (void) ptree_update_propval_by_name(chassish, - PICL_PROP_STATE, present_state, sizeof (present_state)); - - ap_status_time = (uint64_t)(time(NULL)); - if ((rc = ptree_update_propval_by_name(chassish, - PICL_PROP_STATUS_TIME, (void *)&ap_status_time, - sizeof (ap_status_time))) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_UPDATE_PROP_ERR, - PICL_PROP_STATUS_TIME, PICL_NODE_CHASSIS, rc); - } - if ((rc = post_piclevent(PICLEVENT_STATE_CHANGE, - fru_state[state], fru_state[prev_state], - chassish, WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - PICL_NODE_CHASSIS, PICLEVENT_STATE_CHANGE, rc); - } - return (PICL_SUCCESS); -} - -static picl_errno_t -frutree_init() -{ - picl_errno_t rc; - frutree_frunode_t *frup = NULL; - hashdata_t *hashptr = NULL; - - if ((rc = ptree_get_node_by_path(PLATFORM_PATH, &platformh)) != - PICL_SUCCESS) { - return (rc); - } - - if ((rc = hash_lookup_entry(chassish, (void **)&hashptr)) != - PICL_SUCCESS) { - return (rc); - } - frup = FRUDATA_PTR(hashptr); - - /* create the nodes in conf file under chassis node */ - if ((rc = picld_pluginutil_parse_config_file(chassish, - conf_file)) != PICL_SUCCESS) { - /* update chassis state to unconfigured */ - (void) frutree_update_chassis_state( - FRU_STATE_UNCONFIGURED, FRU_STATE_UNKNOWN); - return (rc); - } - - /* update chassis state to configuring */ - (void) frutree_update_chassis_state( - FRU_STATE_CONFIGURING, FRU_STATE_UNCONFIGURED); - - if (scsi_info_init() != PICL_SUCCESS) { - /* update chassis state to unconfigured */ - (void) frutree_update_chassis_state( - FRU_STATE_UNCONFIGURED, FRU_STATE_CONFIGURING); - return (PICL_FAILURE); - } - - /* traverse thru all the nodes under chassis, initialize them */ - if ((rc = fru_init(frup)) != PICL_SUCCESS) { - /* update chassis state to unconfigured */ - (void) frutree_update_chassis_state( - FRU_STATE_UNCONFIGURED, FRU_STATE_CONFIGURING); - scsi_info_fini(); - return (rc); - } - /* free the memory used during initialization */ - scsi_info_fini(); - /* start node monitoring thread */ - if (pthread_create(&monitor_tid, NULL, monitor_node_status, - NULL) != 0) { - FRUTREE_DEBUG0(EVENTS, "SUNW_frutree:Error in creating node" - " monitoring thread"); - } - - (void) pthread_mutex_lock(&frup->mutex); - frup->state = FRU_STATE_CONFIGURED; - (void) pthread_mutex_unlock(&frup->mutex); - - /* update chassis state to configured */ - (void) frutree_update_chassis_state( - FRU_STATE_CONFIGURED, FRU_STATE_CONFIGURING); - return (PICL_SUCCESS); -} - -/* ARGSUSED */ -static void * -init_thread(void *arg) -{ - picl_errno_t rc; - - FRUTREE_DEBUG0(FRUTREE_INIT, "init_thread begin"); - - (void) pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); - (void) pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); - - if (get_configuration_file() != PICL_SUCCESS) { - return (NULL); - } - FRUTREE_DEBUG1(FRUTREE_INIT, "conf_file = %s", conf_file); - if ((rc = frutree_init()) != PICL_SUCCESS) { - FRUTREE_DEBUG1(FRUTREE_INIT, "frutree_init failed, error = %d", - rc); - } - FRUTREE_DEBUG0(FRUTREE_INIT, "init_thread end"); - return (NULL); -} - -/* ARGSUSED */ -static void -event_completion_handler(char *ename, void *earg, size_t size) -{ - if (frutree_debug & EV_COMPLETION) { - char name[PICL_PROPNAMELEN_MAX]; - nvlist_t *nvlp; - char *value = NULL; - char *arg = NULL; - picl_nodehdl_t fruhdl; - time_t current_time; - - if (strncmp(ename, PICLEVENT_STATE_CHANGE, - strlen(PICLEVENT_STATE_CHANGE)) == 0) { - arg = PICLEVENTARG_STATE; - } else if (strncmp(ename, PICLEVENT_CONDITION_CHANGE, - strlen(PICLEVENT_CONDITION_CHANGE)) == 0) { - arg = PICLEVENTARG_CONDITION; - } - - (void) nvlist_unpack((char *)earg, size, &nvlp, NULL); - (void) nvlist_lookup_uint64(nvlp, PICLEVENTARG_NODEHANDLE, - &fruhdl); - if (arg != NULL) - (void) nvlist_lookup_string(nvlp, arg, &value); - - (void) ptree_get_propval_by_name(fruhdl, PICL_PROP_NAME, - (void *)name, sizeof (name)); - current_time = (uint64_t)(time(NULL)); - if (value != NULL) { - FRUTREE_DEBUG4(EV_COMPLETION, "ev_completed[%s]%s(%s) " - "on %s", ctime(¤t_time), ename, value, name); - } - nvlist_free(nvlp); - } - - (void) mutex_lock(&piclevent_mutex); - piclevent_pending = 0; - (void) cond_broadcast(&piclevent_completed_cv); - (void) mutex_unlock(&piclevent_mutex); - free(earg); - free(ename); -} - -picl_errno_t -post_piclevent(const char *event, char *val1, - char *val2, picl_nodehdl_t nodeh, frutree_wait_t wait) -{ - nvlist_t *nvl; - size_t nvl_size; - char *pack_buf = NULL; - char *ename = NULL; - char *arg = NULL; - picl_errno_t rc; - timestruc_t to; - struct timeval tp; - - if (event == NULL || val1 == NULL) { - return (PICL_INVALIDARG); - } - if (nvlist_alloc(&nvl, NV_UNIQUE_NAME_TYPE, NULL)) { - return (PICL_FAILURE); - } - if (nvlist_add_uint64(nvl, PICLEVENTARG_NODEHANDLE, nodeh)) { - nvlist_free(nvl); - return (PICL_FAILURE); - } - - if ((ename = strdup(event)) == NULL) { - nvlist_free(nvl); - return (PICL_NOSPACE); - } - - if (strncmp(ename, PICLEVENT_STATE_CHANGE, - strlen(PICLEVENT_STATE_CHANGE)) == 0) { - arg = PICLEVENTARG_STATE; - } else if (strncmp(ename, PICLEVENT_CONDITION_CHANGE, - strlen(PICLEVENT_CONDITION_CHANGE)) == 0) { - arg = PICLEVENTARG_CONDITION; - } else { - free(ename); - nvlist_free(nvl); - return (PICL_INVALIDARG); - } - - if (nvlist_add_string(nvl, arg, val1)) { - free(ename); - nvlist_free(nvl); - return (PICL_FAILURE); - } - - if (strncmp(ename, PICLEVENT_CONDITION_CHANGE, - strlen(PICLEVENT_CONDITION_CHANGE)) == 0) { - if (nvlist_pack(nvl, &pack_buf, &nvl_size, NV_ENCODE_NATIVE, - NULL)) { - free(ename); - nvlist_free(nvl); - return (PICL_FAILURE); - } - } else { /* state change event */ - - if (val2 != NULL) { - /* if there is a last state, add it to nvlist */ - if (nvlist_add_string(nvl, - PICLEVENTARG_LAST_STATE, val2)) { - free(ename); - nvlist_free(nvl); - return (PICL_FAILURE); - } - } - } - - if (nvlist_pack(nvl, &pack_buf, &nvl_size, NV_ENCODE_NATIVE, NULL)) { - free(ename); - nvlist_free(nvl); - return (PICL_FAILURE); - } - - (void) mutex_lock(&piclevent_mutex); - while (piclevent_pending) { - (void) cond_wait(&piclevent_completed_cv, - &piclevent_mutex); - } - piclevent_pending = 1; - (void) mutex_unlock(&piclevent_mutex); - - if ((rc = ptree_post_event(ename, pack_buf, nvl_size, - event_completion_handler)) != PICL_SUCCESS) { - free(ename); - free(pack_buf); - nvlist_free(nvl); - (void) mutex_lock(&piclevent_mutex); - piclevent_pending = 0; - (void) mutex_unlock(&piclevent_mutex); - return (rc); - } - - if (frutree_debug) { - char name[PICL_PROPNAMELEN_MAX]; - (void) ptree_get_propval_by_name(nodeh, PICL_PROP_NAME, - name, sizeof (name)); - if (val2 != NULL) { - FRUTREE_DEBUG4(EVENTS, "%s(%s -> %s) on %s", ename, - val2, val1, name); - } else { - FRUTREE_DEBUG3(EVENTS, "%s(%s) on %s", ename, - val1, name); - } - } - - if (wait) { /* wait for the event to be handled */ - (void) mutex_lock(&piclevent_mutex); - while (piclevent_pending) { - (void) gettimeofday(&tp, NULL); - to.tv_sec = tp.tv_sec + 1; - to.tv_nsec = tp.tv_usec * 1000; - (void) cond_timedwait(&piclevent_completed_cv, - &piclevent_mutex, &to); - } - (void) mutex_unlock(&piclevent_mutex); - } - nvlist_free(nvl); - return (PICL_SUCCESS); -} - -/* - * return values - * -1 : error - * 0 : not enabled - * 1 : enabled - */ -/* ARGSUSED */ -static int -is_autoconfig_enabled(char *loc_name) -{ - return (1); -} - -static picl_errno_t -update_loc_type(frutree_locnode_t *locp) -{ - cfga_list_data_t *list = NULL; - /* get the info from the libcfgadm interface */ - list = (cfga_list_data_t *)malloc(sizeof (cfga_list_data_t)); - if (list == NULL) { - return (PICL_NOSPACE); - } - - if (get_cfgadm_state(list, locp->name) == PICL_SUCCESS) { - locp->state_mgr = CFGADM_AP; - free(list); - return (PICL_SUCCESS); - } - free(list); - return (PICL_NODENOTFOUND); -} - -/* - * handles DR_INCOMING_RES on chassis node - * (refresh piclfrutree tree) - */ -static int -reconfigure_chassis(picl_nodehdl_t nodeh, void *args) -{ - picl_errno_t rc; - hashdata_t *hashptr = NULL; - picl_nodehdl_t parenth, childh; - frutree_frunode_t *frup = NULL, *child_frup = NULL; - frutree_locnode_t *locp = NULL; - boolean_t state_changed = B_FALSE; - boolean_t cond_changed = B_FALSE; - frutree_dr_arg_t dr_arg; - - if (args == NULL) { - return (PICL_INVALIDARG); - } - frup = (frutree_frunode_t *)args; - - if ((rc = ptree_get_propval_by_name(nodeh, PICL_PROP_PARENT, - &parenth, sizeof (parenth))) != PICL_SUCCESS) { - return (rc); - } - - if (parenth != frup->frunodeh) - return (PICL_WALK_CONTINUE); - - if ((rc = hash_lookup_entry(nodeh, (void **)&hashptr)) != - PICL_SUCCESS) { - return (PICL_WALK_CONTINUE); - } - locp = LOCDATA_PTR(hashptr); - - /* if the location has child fru, get its information */ - if (ptree_get_propval_by_name(nodeh, PICL_PROP_CHILD, - &childh, sizeof (childh)) == PICL_SUCCESS) { - /* get the child fru information */ - if (hash_lookup_entry(childh, (void **)&hashptr) == - PICL_SUCCESS) { - child_frup = FRUDATA_PTR(hashptr); - } - } - - /* for each location, update the state */ - if (locp->state_mgr == STATIC_LOC) { - /* check if cfgadm ap_id is present */ - rc = update_loc_type(locp); - if (rc == PICL_SUCCESS) { - if (child_frup) { - child_frup->state_mgr = locp->state_mgr; - (void) update_fru_state(child_frup, - &state_changed); - } - } - } - - state_changed = B_FALSE; - (void) update_loc_state(locp, &state_changed); - if (state_changed) { - switch (locp->state) { - case LOC_STATE_CONNECTED: - case LOC_STATE_DISCONNECTED: - if (locp->prev_state == LOC_STATE_EMPTY || - locp->prev_state == LOC_STATE_UNKNOWN) { - /* handle fru insertion */ - dr_arg.action = HANDLE_INSERT; - } else { - /* handle loc state change */ - dr_arg.action = HANDLE_LOCSTATE_CHANGE; - } - break; - case LOC_STATE_EMPTY: - /* handle fru removal */ - if (locp->prev_state == LOC_STATE_UNKNOWN) { - /* post piclevent to update led */ - dr_arg.action = HANDLE_LOCSTATE_CHANGE; - } else { - /* disconnected fru is removed */ - dr_arg.action = HANDLE_REMOVE; - } - break; - default: - return (PICL_WALK_CONTINUE); - } /* end of switch */ - - dr_arg.data = locp; - (void) pthread_mutex_lock(&ev_mutex); - if ((rc = add_to_queue(dr_arg)) != PICL_SUCCESS) { - (void) pthread_mutex_unlock(&ev_mutex); - return (PICL_WALK_CONTINUE); - } - (void) pthread_cond_signal(&ev_cond); - (void) pthread_mutex_unlock(&ev_mutex); - return (PICL_WALK_CONTINUE); - } else { - /* connect the disconnect locations */ - if (locp->state == LOC_STATE_DISCONNECTED && - locp->autoconfig_enabled == B_TRUE) { - if ((rc = connect_fru(locp)) != PICL_SUCCESS) { - FRUTREE_DEBUG2(EVENTS, CONNECT_FAILED_ERR, - locp->name, rc); - } - return (PICL_WALK_CONTINUE); - } - } - - /* post picl event for child fru */ - if (child_frup == NULL) { - return (PICL_WALK_CONTINUE); - } - - /* update the state */ - (void) update_fru_state(child_frup, &state_changed); - if (state_changed) { - if ((rc = post_piclevent(PICLEVENT_STATE_CHANGE, - fru_state[child_frup->state], - fru_state[child_frup->prev_state], - child_frup->frunodeh, WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - child_frup->name, PICLEVENT_STATE_CHANGE, rc); - } - } - - /* update the condition */ - (void) update_fru_condition(child_frup, &cond_changed); - if (cond_changed) { - if ((rc = post_piclevent(PICLEVENT_CONDITION_CHANGE, - fru_cond[child_frup->cond], - fru_cond[child_frup->prev_cond], - child_frup->frunodeh, WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - child_frup->name, PICLEVENT_CONDITION_CHANGE, - rc); - } - } - return (PICL_WALK_CONTINUE); -} - -static picl_errno_t -handle_chassis_configure(frutree_frunode_t *frup) -{ - picl_errno_t rc; - - if (frup == NULL) { - return (PICL_INVALIDARG); - } - - (void) pthread_mutex_lock(&frup->mutex); - FRUTREE_DEBUG1(EVENTS, "DR_INCOMING_RES on %s", frup->name); - if (frup->state == FRU_STATE_UNCONFIGURED) { - frup->state = FRU_STATE_CONFIGURING; - (void) pthread_mutex_unlock(&frup->mutex); - /* initial probe/initialization */ - /* create a thread to do the initialization */ - if (pthread_create(&init_threadID, NULL, &init_thread, - NULL) != 0) { - return (PICL_FAILURE); - } - return (PICL_SUCCESS); - } - (void) pthread_mutex_unlock(&frup->mutex); - - /* - * 1. update the state of all the nodes in chassis - * 2. handle all the state changes accordingly - */ - if ((rc = ptree_walk_tree_by_class(chassish, PICL_CLASS_LOCATION, - (void *)frup, reconfigure_chassis)) != PICL_SUCCESS) { - return (rc); - } - return (PICL_SUCCESS); -} - -static picl_errno_t -handle_chassis_unconfigure(frutree_frunode_t *frup) -{ - picl_errno_t rc; - - if (frup->state == FRU_STATE_UNCONFIGURED) { - return (PICL_SUCCESS); - } - - /* do any cleanups here */ - if ((rc = post_piclevent(PICLEVENT_STATE_CHANGE, - PICLEVENTARGVAL_UNCONFIGURING, PICLEVENTARGVAL_CONFIGURED, - chassish, WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - PICL_NODE_CHASSIS, PICLEVENT_STATE_CHANGE, rc); - } - - if ((rc = ptree_update_propval_by_name(chassish, - PICL_PROP_STATE, PICLEVENTARGVAL_UNCONFIGURED, - PICL_PROPNAMELEN_MAX)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_UPDATE_PROP_ERR, - PICL_PROP_STATE, PICL_NODE_CHASSIS, rc); - } - frup->prev_state = FRU_STATE_CONFIGURED; - frup->state = FRU_STATE_UNCONFIGURED; - (void) handle_fru_unconfigure(frup); - - if ((rc = post_piclevent(PICLEVENT_STATE_CHANGE, - PICLEVENTARGVAL_UNCONFIGURED, PICLEVENTARGVAL_UNCONFIGURING, - chassish, WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - PICL_NODE_CHASSIS, PICLEVENT_STATE_CHANGE, rc); - } - return (PICL_SUCCESS); -} - -static picl_errno_t -configuration_fn(frutree_dr_arg_t *dr_arg) -{ - picl_errno_t rc; - picl_nodehdl_t parenth; - cfga_flags_t flags = 0; - frutree_frunode_t *frup = NULL; - frutree_locnode_t *locp = NULL; - hashdata_t *hashptr = NULL; - boolean_t state_changed = B_FALSE; - - if (dr_arg == NULL) - return (PICL_FAILURE); - - frup = (frutree_frunode_t *)dr_arg->data; - if (frup == NULL) { - free(dr_arg); - return (PICL_FAILURE); - } - - if (frup->frunodeh == chassish) { - rc = handle_chassis_configure(frup); - free(dr_arg); - return (rc); - } - - if ((rc = ptree_get_propval_by_name(frup->frunodeh, PICL_PROP_PARENT, - &parenth, sizeof (parenth))) != PICL_SUCCESS) { - free(dr_arg); - return (rc); - } - - if ((rc = hash_lookup_entry(parenth, (void **)&hashptr)) != - PICL_SUCCESS) { - free(dr_arg); - return (rc); - } - locp = LOCDATA_PTR(hashptr); - - /* - * update the location state also, as this could be - * user initiated connect operation - */ - (void) update_loc_state(locp, &state_changed); - if (state_changed) - if ((rc = post_piclevent(PICLEVENT_STATE_CHANGE, - loc_state[locp->state], loc_state[locp->prev_state], - locp->locnodeh, WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - locp->name, PICLEVENT_STATE_CHANGE, rc); - } - - switch (dr_arg->action) { - case CPU_ONLINE: - flags |= CFGA_FLAG_FORCE; - FRUTREE_DEBUG1(EVENTS, "CPU online on %s", frup->name); - if (locp->state != LOC_STATE_CONNECTED) { - if (locp->autoconfig_enabled) { - if ((rc = connect_fru(locp)) != PICL_SUCCESS) { - FRUTREE_DEBUG2(EVENTS, - CONNECT_FAILED_ERR, - locp->name, rc); - } - } - break; - } /*FALLTHRU*/ - - /* do configure now */ - case CONFIGURE_FRU: /* dr_incoming_res */ - FRUTREE_DEBUG1(EVENTS, "DR_INCOMING_RES on %s", frup->name); - if ((rc = configure_fru(frup, flags)) != PICL_SUCCESS) { - FRUTREE_DEBUG2(EVENTS, CONFIGURE_FAILED_ERR, - frup->name, rc); - break; - } - } - free(dr_arg); - return (PICL_SUCCESS); -} - -/* handles all dr related events */ -static picl_errno_t -handle_dr_event(frutree_dr_arg_t *dr_arg) -{ - picl_errno_t rc; - picl_nodehdl_t loch, childh; - hashdata_t *hashptr = NULL; - cfga_flags_t flags = 0; - frutree_dr_arg_t *arg = NULL; - frutree_dr_arg_t fru_dr_arg; - frutree_locnode_t *locp = NULL; - frutree_frunode_t *frup = NULL, *child_frup = NULL; - boolean_t state_changed = B_FALSE, cond_changed = B_FALSE; - - switch (dr_arg->action) { - case CPU_ONLINE: - case CONFIGURE_FRU: - - frup = (frutree_frunode_t *)dr_arg->data; - arg = (frutree_dr_arg_t *)malloc(sizeof (frutree_dr_arg_t)); - if (arg == NULL) { - FRUTREE_DEBUG2(EVENTS, CONFIGURE_FAILED_ERR, - frup->name, PICL_NOSPACE); - return (NULL); - } - arg->action = dr_arg->action; - arg->data = dr_arg->data; - (void) configuration_fn((void *)arg); - break; - - case CPU_OFFLINE: - flags |= CFGA_FLAG_FORCE; - frup = (frutree_frunode_t *)dr_arg->data; - if (frup == NULL) { - break; - } - FRUTREE_DEBUG1(EVENTS, "CPU_OFFLINE on %s", frup->name); - if ((rc = unconfigure_fru(frup, flags)) != PICL_SUCCESS) { - FRUTREE_DEBUG2(EVENTS, UNCONFIG_FAILED_ERR, frup->name, rc); - break; - } - - if ((rc = handle_fru_unconfigure(frup)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, EVENT_NOT_HANDLED, PICLEVENT_DR_REQ, - frup->name, rc); - } - break; - - case UNCONFIGURE_FRU: /* dr_outgoing_res */ - frup = (frutree_frunode_t *)dr_arg->data; - if (frup == NULL) { - break; - } - FRUTREE_DEBUG1(EVENTS, "DR_OUTGOING_RES on %s", frup->name); - if (frup->frunodeh == chassish) { - (void) handle_chassis_unconfigure(frup); - break; - } - - if ((rc = unconfigure_fru(frup, flags)) != PICL_SUCCESS) { - FRUTREE_DEBUG2(EVENTS, UNCONFIG_FAILED_ERR, frup->name, rc); - break; - } - - if ((rc = handle_fru_unconfigure(frup)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, EVENT_NOT_HANDLED, - PICLEVENT_DR_REQ, frup->name, rc); - } - - if (ptree_get_propval_by_name(frup->frunodeh, PICL_PROP_PARENT, - &loch, sizeof (loch)) != PICL_SUCCESS) { - break; - } - - if ((rc = hash_lookup_entry(loch, (void **)&hashptr)) != - PICL_SUCCESS) { - break; - } - locp = LOCDATA_PTR(hashptr); - - /* check the autoconfig flag */ - if (locp->autoconfig_enabled == B_FALSE) { - break; - } - - if ((rc = disconnect_fru(locp)) != PICL_SUCCESS) { - FRUTREE_DEBUG2(EVENTS, "SUNW_frutree:Disconnect on %s " - "failed(error=%d)", locp->name, rc); - } - break; - - case HANDLE_CONFIGURE: /* basic hotswap operation */ - - frup = (frutree_frunode_t *)dr_arg->data; - if (frup == NULL) { - break; - } - FRUTREE_DEBUG1(EVENTS, "HANDLE CONFIGURE on %s", frup->name); - handle_fru_configure(frup); - break; - - case HANDLE_UNCONFIGURE: /* basic hotswap operation */ - - /* cleanup the internal data structures */ - - frup = (frutree_frunode_t *)dr_arg->data; - if (frup == NULL) { - break; - } - FRUTREE_DEBUG1(EVENTS, "HANDLE UNCONFIGURE on %s", frup->name); - - if ((rc = post_piclevent(PICLEVENT_STATE_CHANGE, - fru_state[frup->state], fru_state[frup->prev_state], - frup->frunodeh, WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - frup->name, PICLEVENT_STATE_CHANGE, rc); - } - - /* update the fru condition */ - (void) update_fru_condition(frup, &state_changed); - if (state_changed) { - if ((rc = post_piclevent(PICLEVENT_CONDITION_CHANGE, - fru_cond[frup->cond], fru_cond[frup->prev_cond], - frup->frunodeh, WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - frup->name, PICLEVENT_CONDITION_CHANGE, rc); - } - } - if ((rc = handle_fru_unconfigure(frup)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, EVENT_NOT_HANDLED, - PICLEVENT_DR_AP_STATE_CHANGE, frup->name, rc); - } - break; - - case HANDLE_LOCSTATE_CHANGE: /* basic hotswap operation */ - /* posts state change events of location */ - locp = (frutree_locnode_t *)dr_arg->data; - if (locp == NULL) { - break; - } - FRUTREE_DEBUG1(EVENTS, "HANDLE LOC STATE CHANGE on %s", locp->name); - if ((rc = post_piclevent(PICLEVENT_STATE_CHANGE, - loc_state[locp->state], loc_state[locp->prev_state], - locp->locnodeh, WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - locp->name, PICLEVENT_STATE_CHANGE, rc); - } - - /* wakeup threads sleeping on this condition */ - (void) pthread_mutex_lock(&locp->mutex); - if (locp->state == LOC_STATE_CONNECTED) { - (void) pthread_cond_broadcast(&locp->cond_cv); - } - (void) pthread_mutex_unlock(&locp->mutex); - - /* if the location has child fru, get its information */ - if (ptree_get_propval_by_name(locp->locnodeh, PICL_PROP_CHILD, - &childh, sizeof (childh)) == PICL_SUCCESS) { - /* get the child fru information */ - if (hash_lookup_entry(childh, (void **)&hashptr) == - PICL_SUCCESS) { - child_frup = FRUDATA_PTR(hashptr); - } - } - /* update the child fru state and handle any state changes */ - if (child_frup == NULL) { - break; - } - - if ((rc = update_fru_state(child_frup, &state_changed)) != - PICL_SUCCESS) { - FRUTREE_DEBUG2(EVENTS, GET_FRU_STATE_ERR, child_frup->name, rc); - break; - } - - if (state_changed == B_FALSE) { - /* - * if there is no change in state, check for condition - * changes. - * if there is a state change, handling state change - * will take care of condition changes also. - */ - (void) update_fru_condition(child_frup, &cond_changed); - if (cond_changed == B_FALSE) { - break; - } - - if ((rc = post_piclevent(PICLEVENT_CONDITION_CHANGE, - fru_cond[child_frup->cond], - fru_cond[child_frup->prev_cond], - child_frup->frunodeh, WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - child_frup->name, - PICLEVENT_CONDITION_CHANGE, rc); - } - break; - } - - /* add to queue to handle the fru state change */ - (void) pthread_mutex_lock(&child_frup->mutex); - /* figure out if this is config/unconfig operation */ - if (child_frup->state == FRU_STATE_CONFIGURED) { - fru_dr_arg.action = HANDLE_CONFIGURE; - fru_dr_arg.data = child_frup; - } else if (child_frup->state == FRU_STATE_UNCONFIGURED) { - fru_dr_arg.action = HANDLE_UNCONFIGURE; - fru_dr_arg.data = child_frup; - } - (void) pthread_mutex_unlock(&child_frup->mutex); - - (void) pthread_mutex_lock(&ev_mutex); - if ((rc = add_to_queue(fru_dr_arg)) != PICL_SUCCESS) { - (void) pthread_mutex_unlock(&ev_mutex); - break; - } - (void) pthread_cond_signal(&ev_cond); - (void) pthread_mutex_unlock(&ev_mutex); - break; - - case HANDLE_INSERT: /* dr_apstate_change (HINT_INSERT) */ - locp = (frutree_locnode_t *)dr_arg->data; - if (locp == NULL) { - break; - } - FRUTREE_DEBUG1(EVENTS, "HANDLE INSERT on %s", locp->name); - /* if the location has child fru, get its information */ - if (ptree_get_propval_by_name(locp->locnodeh, PICL_PROP_CHILD, - &childh, sizeof (childh)) == PICL_SUCCESS) { - /* get the child fru information */ - if (hash_lookup_entry(childh, (void **)&hashptr) == - PICL_SUCCESS) { - child_frup = FRUDATA_PTR(hashptr); - } - } - if (child_frup) { - /* - * if previous state is not empty, it could be a - * hint insert to retry connects - */ - (void) update_loc_state(locp, &state_changed); - if (state_changed) { - if ((rc = post_piclevent(PICLEVENT_STATE_CHANGE, - loc_state[locp->state], - loc_state[locp->prev_state], locp->locnodeh, - WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - locp->name, PICLEVENT_STATE_CHANGE, rc); - } - } - - (void) update_fru_condition(child_frup, &cond_changed); - if (cond_changed == B_TRUE) { - if ((rc = post_piclevent(PICLEVENT_CONDITION_CHANGE, - fru_cond[child_frup->cond], - fru_cond[child_frup->prev_cond], - child_frup->frunodeh, WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, - PTREE_POST_PICLEVENT_ERR, - child_frup->name, - PICLEVENT_CONDITION_CHANGE, rc); - } - } - if (!locp->autoconfig_enabled) { - break; - } - - if (locp->state != LOC_STATE_CONNECTED) { - if ((rc = connect_fru(locp)) != PICL_SUCCESS) { - FRUTREE_DEBUG2(EVENTS, CONNECT_FAILED_ERR, - locp->name, rc); - } - } - break; - } - - (void) update_loc_state(locp, &state_changed); - if ((rc = create_fru_node(locp, &child_frup)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, EVENT_NOT_HANDLED, - PICLEVENT_DR_AP_STATE_CHANGE, locp->name, rc); - break; - } - - if ((rc = post_piclevent(PICLEVENT_STATE_CHANGE, - loc_state[locp->state], loc_state[locp->prev_state], - locp->locnodeh, WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - locp->name, PICLEVENT_STATE_CHANGE, rc); - } - - if (locp->autoconfig_enabled) { - if ((rc = connect_fru(locp)) != PICL_SUCCESS) { - FRUTREE_DEBUG2(EVENTS, CONNECT_FAILED_ERR, - locp->name, rc); - } - } - break; - - case HANDLE_REMOVE: /* dr_apstate_change (HINT_REMOVE) */ - locp = (frutree_locnode_t *)dr_arg->data; - if (locp == NULL) { - break; - } - FRUTREE_DEBUG1(EVENTS, "HANDLE REMOVE on %s", locp->name); - - if (locp->state == LOC_STATE_EMPTY) { - break; /* discard the spurious event */ - } - - (void) update_loc_state(locp, &state_changed); - /* if the location has child fru, get its information */ - if (ptree_get_propval_by_name(locp->locnodeh, PICL_PROP_CHILD, - &childh, sizeof (childh)) == PICL_SUCCESS) { - /* get the child fru information */ - if (hash_lookup_entry(childh, (void **)&hashptr) == - PICL_SUCCESS) { - frup = FRUDATA_PTR(hashptr); - } - } - if (frup == NULL) { - break; - } - - /* - * frutree need to post this event before handling the - * fru remove, so that other plugins (like frudata) can - * do the cleanup - */ - if ((rc = post_piclevent(PICLEVENT_STATE_CHANGE, - loc_state[locp->state], loc_state[locp->prev_state], - locp->locnodeh, WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - locp->name, PICLEVENT_STATE_CHANGE, rc); - } - - if ((rc = handle_fru_remove(frup)) != PICL_SUCCESS) { - FRUTREE_DEBUG2(EVENTS, "SUNW_frutree:Error in handling" - "removal of fru under %s(error=%d)", locp->name, rc); - } - break; - - case POST_COND_EVENT: - frup = (frutree_frunode_t *)dr_arg->data; - if (frup == NULL) { - break; - } - if ((rc = post_piclevent(PICLEVENT_CONDITION_CHANGE, - fru_cond[frup->cond], fru_cond[frup->prev_cond], - frup->frunodeh, WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - frup->name, PICLEVENT_CONDITION_CHANGE, rc); - } - default: - break; - } - return (PICL_SUCCESS); -} - -/*ARGSUSED*/ -static void* -dr_thread(void * arg) -{ - ev_queue_t *event = NULL; - - (void) pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); - (void) pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); - for (;;) { - if (fini_called) - break; - (void) pthread_mutex_lock(&ev_mutex); - while (queue_head == NULL) { - (void) pthread_cond_wait(&ev_cond, &ev_mutex); - } - - event = remove_from_queue(); - (void) pthread_mutex_unlock(&ev_mutex); - while (event) { - (void) handle_dr_event(&event->arg); - free(event); - event = NULL; - (void) pthread_mutex_lock(&ev_mutex); - event = remove_from_queue(); - (void) pthread_mutex_unlock(&ev_mutex); - } - } - return (NULL); -} - -static picl_errno_t -update_port_state(frutree_portnode_t *portp, boolean_t post_ev) -{ - int state, cond; - picl_errno_t rc; - uint64_t ap_status_time; - boolean_t state_changed = B_FALSE; - boolean_t cond_changed = B_FALSE; - frutree_port_type_t port_type; - - if (portp == NULL) { - return (PICL_INVALIDARG); - } - port_type = frutree_get_port_type(portp); - - if (port_type == UNKNOWN_PORT) { - return (PICL_SUCCESS); - } - state = kstat_port_state(port_type, portp->driver, - portp->instance); - cond = kstat_port_cond(port_type, portp->driver, - portp->instance); - switch (state) { - case 0: - /* DOWN */ - if (portp->state != PORT_STATE_DOWN) { - portp->state = PORT_STATE_DOWN; - state_changed = B_TRUE; - } - break; - case 1: - /* UP */ - if (portp->state != PORT_STATE_UP) { - portp->state = PORT_STATE_UP; - state_changed = B_TRUE; - } - break; - default: - /* UNKNOWN */ - if (portp->state != PORT_STATE_UNKNOWN) { - portp->state = PORT_STATE_UNKNOWN; - state_changed = B_TRUE; - } - } - - if (post_ev && state_changed) { - ap_status_time = (uint64_t)(time(NULL)); - if ((rc = ptree_update_propval_by_name(portp->portnodeh, - PICL_PROP_STATUS_TIME, &ap_status_time, - sizeof (uint64_t))) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_UPDATE_PROP_ERR, - PICL_PROP_STATUS_TIME, portp->name, rc); - - } - if ((rc = post_piclevent(PICLEVENT_STATE_CHANGE, - port_state[portp->state], NULL, - portp->portnodeh, WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - portp->name, PICLEVENT_STATE_CHANGE, rc); - } - } - - switch (cond) { - case 0: - if (portp->cond != PORT_COND_OK) { - portp->cond = PORT_COND_OK; - cond_changed = B_TRUE; - } - break; - case 1: - if (portp->cond != PORT_COND_FAILING) { - portp->cond = PORT_COND_FAILING; - cond_changed = B_TRUE; - } - break; - case 2: - if (portp->cond != PORT_COND_FAILED) { - portp->cond = PORT_COND_FAILED; - cond_changed = B_TRUE; - } - break; - case 3: - if (portp->cond != PORT_COND_TESTING) { - portp->cond = PORT_COND_TESTING; - cond_changed = B_TRUE; - } - break; - default: - if (portp->cond != PORT_COND_UNKNOWN) { - portp->cond = PORT_COND_UNKNOWN; - cond_changed = B_TRUE; - } - } - - if (post_ev && cond_changed) { - ap_status_time = (uint64_t)(time(NULL)); - if ((rc = ptree_update_propval_by_name(portp->portnodeh, - PICL_PROP_CONDITION_TIME, &ap_status_time, - sizeof (uint64_t))) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_UPDATE_PROP_ERR, - PICL_PROP_CONDITION_TIME, portp->name, rc); - } - if ((rc = post_piclevent(PICLEVENT_CONDITION_CHANGE, - port_cond[portp->cond], NULL, - portp->portnodeh, WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - portp->name, PICLEVENT_CONDITION_CHANGE, rc); - } - } - return (PICL_SUCCESS); -} - -/* - * monitor port nodes and scsi nodes under a fru - */ -static int -monitor_nodes_under_fru(picl_nodehdl_t nodeh, void *c_args) -{ - picl_errno_t rc; - picl_nodehdl_t parenth; - hashdata_t *hashptr = NULL; - boolean_t state_changed; - frutree_portnode_t *portp = NULL; - frutree_locnode_t *locp = NULL; - frutree_frunode_t *frup = NULL; - char class[PICL_PROPNAMELEN_MAX]; - char slot_type[PICL_PROPNAMELEN_MAX]; - - if (c_args == NULL) { - return (PICL_INVALIDARG); - } - frup = (frutree_frunode_t *)c_args; - - if (ptree_get_propval_by_name(nodeh, PICL_PROP_PARENT, - &parenth, sizeof (parenth)) != PICL_SUCCESS) { - return (PICL_WALK_CONTINUE); - } - - if (parenth != frup->frunodeh) - return (PICL_WALK_CONTINUE); - - if ((rc = ptree_get_propval_by_name(nodeh, PICL_PROP_CLASSNAME, class, - sizeof (class))) != PICL_SUCCESS) { - return (PICL_WALK_CONTINUE); - } - - if ((rc = hash_lookup_entry(nodeh, (void **)&hashptr)) != - PICL_SUCCESS) { - return (PICL_WALK_CONTINUE); - } - - if (strcmp(class, PICL_CLASS_LOCATION) == 0) { - locp = LOCDATA_PTR(hashptr); - if (ptree_get_propval_by_name(locp->locnodeh, - PICL_PROP_SLOT_TYPE, slot_type, - sizeof (slot_type)) != PICL_SUCCESS) { - return (PICL_WALK_CONTINUE); - } - if (strcmp(slot_type, SANIBEL_SCSI_SLOT) == 0 || - strcmp(slot_type, SANIBEL_IDE_SLOT) == 0) { - return (PICL_WALK_CONTINUE); - } - (void) update_loc_state(locp, &state_changed); - if (state_changed) { - if ((rc = post_piclevent(PICLEVENT_STATE_CHANGE, - loc_state[locp->state], - loc_state[locp->prev_state], - locp->locnodeh, WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - locp->name, PICLEVENT_STATE_CHANGE, rc); - } - } - } else if (strcmp(class, PICL_CLASS_PORT) == 0) { - portp = PORTDATA_PTR(hashptr); - (void) update_port_state(portp, B_TRUE); - } - return (PICL_WALK_CONTINUE); -} - -/* This routine monitors only port node, scsi nodes */ -/* ARGSUSED */ -static int -monitor_fru(picl_nodehdl_t nodeh, void *c_args) -{ - picl_errno_t rc; - picl_nodehdl_t loch; - hashdata_t *hashptr = NULL; - frutree_frunode_t *frup = NULL; - boolean_t state_changed, cond_changed; - char slot_type[PICL_PROPNAMELEN_MAX]; - - if (hash_lookup_entry(nodeh, (void **)&hashptr) != - PICL_SUCCESS) { - return (PICL_WALK_CONTINUE); - } - frup = FRUDATA_PTR(hashptr); - - (void) pthread_mutex_lock(&frup->mutex); - if (frup->dr_in_progress) { - (void) pthread_mutex_unlock(&frup->mutex); - return (PICL_WALK_CONTINUE); - } - frup->busy = B_TRUE; - (void) pthread_mutex_unlock(&frup->mutex); - - /* get the parent information to determine if it is scsi slot or not */ - if (ptree_get_propval_by_name(nodeh, PICL_PROP_PARENT, - &loch, sizeof (loch)) != PICL_SUCCESS) { - return (PICL_WALK_CONTINUE); - } - if (ptree_get_propval_by_name(loch, PICL_PROP_SLOT_TYPE, slot_type, - sizeof (slot_type)) != PICL_SUCCESS) { - return (PICL_WALK_CONTINUE); - } - - if (strcmp(slot_type, SANIBEL_SCSI_SLOT) == 0 || - strcmp(slot_type, SANIBEL_IDE_SLOT) == 0) { - /* scsi fru */ - (void) update_fru_state(frup, &state_changed); - (void) update_fru_condition(frup, &cond_changed); - if (state_changed) { - if ((rc = post_piclevent(PICLEVENT_STATE_CHANGE, - fru_state[frup->state], - fru_state[frup->prev_state], - frup->frunodeh, WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - frup->name, PICLEVENT_STATE_CHANGE, rc); - } - } - if (cond_changed) { - if ((rc = post_piclevent(PICLEVENT_CONDITION_CHANGE, - fru_cond[frup->cond], fru_cond[frup->prev_cond], - frup->frunodeh, WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - frup->name, PICLEVENT_CONDITION_CHANGE, - rc); - } - } - (void) pthread_mutex_lock(&frup->mutex); - frup->busy = B_FALSE; - (void) pthread_cond_signal(&frup->busy_cond_cv); - (void) pthread_mutex_unlock(&frup->mutex); - return (PICL_WALK_CONTINUE); - } - - if (frup->state != FRU_STATE_CONFIGURED) { - (void) pthread_mutex_lock(&frup->mutex); - frup->busy = B_FALSE; - (void) pthread_cond_signal(&frup->busy_cond_cv); - (void) pthread_mutex_unlock(&frup->mutex); - return (PICL_WALK_CONTINUE); - } - - (void) ptree_walk_tree_by_class(chassish, - NULL, (void *)frup, monitor_nodes_under_fru); - - (void) pthread_mutex_lock(&frup->mutex); - frup->busy = B_FALSE; - (void) pthread_cond_signal(&frup->busy_cond_cv); - (void) pthread_mutex_unlock(&frup->mutex); - return (PICL_WALK_CONTINUE); -} - -/* ARGSUSED */ -static void * -monitor_node_status(void *arg) -{ - int err; - timestruc_t to; - struct timeval tp; - - (void) pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); - (void) pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); - - FRUTREE_DEBUG0(EVENTS, "Monitoring for port status started"); - do - { - (void) pthread_mutex_lock(&monitor_mutex); - (void) gettimeofday(&tp, NULL); - to.tv_sec = tp.tv_sec + frutree_poll_timeout; - to.tv_nsec = tp.tv_usec * 1000; - err = pthread_cond_timedwait(&monitor_cv, &monitor_mutex, &to); - - (void) pthread_mutex_unlock(&monitor_mutex); - if (err == ETIMEDOUT) { /* woke up from sleep */ - (void) ptree_walk_tree_by_class(chassish, - PICL_CLASS_FRU, NULL, monitor_fru); - } - } while (fini_called == 0); - return (NULL); -} - -picl_errno_t -create_children(frutree_frunode_t *frup, char *scsi_loc, char *bus_addr, - int slot_no, char *slot_type, boolean_t is_cfgadm_ap) -{ - int i = 0; - picl_errno_t rc; - picl_nodehdl_t nodeh; - uint8_t geo_addr = 0; - hashdata_t *datap = NULL; - frutree_locnode_t *locp = NULL; - hashdata_t *hashptr = NULL; - char fru_type[PICL_PROPNAMELEN_MAX]; - frutree_frunode_t *child_frup = NULL; - frutree_callback_data_t fru_arg; - - if (frup == NULL || scsi_loc == NULL || slot_type == NULL) { - return (PICL_FAILURE); - } - - /* check if the location is already created */ - (void) strncpy(fru_arg.node_name, scsi_loc, - sizeof (fru_arg.node_name)); - fru_arg.retnodeh = 0; - if ((rc = ptree_walk_tree_by_class(chassish, PICL_CLASS_LOCATION, - &fru_arg, frutree_get_nodehdl)) == PICL_SUCCESS) { - if (fru_arg.retnodeh != 0) { /* node is already present */ - return (PICL_SUCCESS); - } - } - - /* create the location node and all its properties */ - if ((rc = ptree_create_node(scsi_loc, PICL_CLASS_LOCATION, - &nodeh)) != PICL_SUCCESS) { - return (rc); - } - - if ((rc = create_property(PICL_PTYPE_CHARSTRING, PICL_READ, - PICL_PROPNAMELEN_MAX, PICL_PROP_SLOT_TYPE, NULLREAD, - NULLWRITE, nodeh, NULL, slot_type)) != - PICL_SUCCESS) { - FRUTREE_DEBUG3(FRUTREE_INIT, PTREE_CREATE_PROP_FAILED, - PICL_PROP_SLOT_TYPE, scsi_loc, rc); - } - - if ((rc = create_property(PICL_PTYPE_CHARSTRING, PICL_READ, - PICL_PROPNAMELEN_MAX, PICL_PROP_LABEL, NULLREAD, - NULLWRITE, nodeh, NULL, bus_addr)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(FRUTREE_INIT, PTREE_CREATE_PROP_FAILED, - PICL_PROP_LABEL, scsi_loc, rc); - } - - if ((rc = create_property(PICL_PTYPE_CHARSTRING, PICL_READ, - PICL_PROPNAMELEN_MAX, PICL_PROP_BUS_ADDR, NULLREAD, - NULLWRITE, nodeh, NULL, bus_addr)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(FRUTREE_INIT, PTREE_CREATE_PROP_FAILED, - PICL_PROP_BUS_ADDR, scsi_loc, rc); - } - - geo_addr = slot_no; - if ((rc = create_property(PICL_PTYPE_UNSIGNED_INT, PICL_READ, - sizeof (uint8_t), PICL_PROP_GEO_ADDR, NULLREAD, - NULLWRITE, nodeh, (picl_prophdl_t *)NULL, - &geo_addr)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(FRUTREE_INIT, PTREE_CREATE_PROP_FAILED, - PICL_PROP_GEO_ADDR, scsi_loc, rc); - } - - if ((rc = create_property(PICL_PTYPE_CHARSTRING, PICL_READ, - PICL_PROPNAMELEN_MAX, PICL_PROP_DEVFS_PATH, NULLREAD, - NULLWRITE, nodeh, NULL, frup->fru_path)) != - PICL_SUCCESS) { - FRUTREE_DEBUG3(FRUTREE_INIT, PTREE_CREATE_PROP_FAILED, - PICL_PROP_DEVFS_PATH, scsi_loc, rc); - } - - if ((rc = ptree_add_node(frup->frunodeh, nodeh)) != PICL_SUCCESS) { - (void) ptree_destroy_node(nodeh); - return (rc); - } - - /* save the node in hashtable */ - if ((rc = make_loc_data(scsi_loc, &datap)) != PICL_SUCCESS) { - return (rc); - } - locp = LOCDATA_PTR(datap); - locp->locnodeh = nodeh; - /* save data in hash table */ - (void) hash_add_entry(nodeh, (void *)datap); - - if ((rc = hash_lookup_entry(nodeh, (void **)&hashptr)) != - PICL_SUCCESS) { - return (rc); - } - locp = LOCDATA_PTR(hashptr); - - if (is_cfgadm_ap != B_TRUE) { /* device found in libdevinfo */ - locp->state_mgr = STATIC_LOC; - locp->state = LOC_STATE_CONNECTED; - } - - if ((rc = location_init(locp)) != PICL_SUCCESS) { - return (rc); - } - - /* if location is empty, done */ - if (locp->state == LOC_STATE_EMPTY) { - if ((rc = post_piclevent(PICLEVENT_STATE_CHANGE, - PICLEVENTARGVAL_EMPTY, NULL, - locp->locnodeh, WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - locp->name, PICLEVENT_STATE_CHANGE, rc); - } - return (PICL_SUCCESS); - } - - /* create the fru node and initilize it */ - if ((rc = create_fru_node(locp, &child_frup)) != PICL_SUCCESS) { - return (rc); - } - - /* post picl event on location (frudata is consumer for these events) */ - if ((rc = post_piclevent(PICLEVENT_STATE_CHANGE, - loc_state[locp->state], PICLEVENTARGVAL_EMPTY, - locp->locnodeh, WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - locp->name, PICLEVENT_STATE_CHANGE, rc); - } - - if (child_frup->state_mgr == STATIC_LOC) { - /* derive the fru_type from name */ - while (i < strlen(scsi_loc)) { - if (isdigit(scsi_loc[i])) { - (void) strncpy(fru_type, scsi_loc, i); - fru_type[i] = '\0'; - break; - } - ++i; - } - if ((rc = ptree_update_propval_by_name(child_frup->frunodeh, - PICL_PROP_FRU_TYPE, fru_type, sizeof (fru_type))) != - PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_UPDATE_PROP_ERR, - PICL_PROP_FRU_TYPE, child_frup->name, rc); - } - } - - /* post picl state change event on fru state */ - if ((rc = post_piclevent(PICLEVENT_STATE_CHANGE, - fru_state[child_frup->state], PICLEVENTARGVAL_UNKNOWN, - child_frup->frunodeh, WAIT)) != PICL_SUCCESS) { - FRUTREE_DEBUG3(EVENTS, PTREE_POST_PICLEVENT_ERR, - frup->name, PICLEVENT_STATE_CHANGE, rc); - } - /* for scsi FRUs we need not probe further */ - return (PICL_SUCCESS); -} - -/* - * recursive search in the subtree - */ -/*ARGSUSED*/ -boolean_t -is_location_present_in_subtree(frutree_frunode_t *frup, const char *name, - const char *path) -{ - frutree_callback_data_t fru_arg; - - (void) strncpy(fru_arg.node_name, name, - sizeof (fru_arg.node_name)); - fru_arg.retnodeh = 0; - if (ptree_walk_tree_by_class(frup->frunodeh, PICL_CLASS_LOCATION, - &fru_arg, frutree_get_nodehdl) == PICL_SUCCESS) { - if (fru_arg.retnodeh != 0) { /* node is already present */ - return (B_TRUE); - } - } - return (B_FALSE); -} diff --git a/usr/src/cmd/picl/plugins/sun4u/snowbird/frutree/piclfrutree.h b/usr/src/cmd/picl/plugins/sun4u/snowbird/frutree/piclfrutree.h deleted file mode 100644 index b2c4b47829..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/snowbird/frutree/piclfrutree.h +++ /dev/null @@ -1,264 +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 _PICLFRUTREE_H -#define _PICLFRUTREE_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum { - NONE = 0x0, - FRUTREE_INIT = 0x1, - EVENTS = 0x2, - HASHTABLE = 0x4, - PERF_DATA = 0x8, - EV_COMPLETION = 0x10, - PRINT_ALL = 0xFF -} frutree_debug_t; - -#define FRUTREE_DEBUG0(lvl, fmt) \ - if (lvl & frutree_debug) { \ - syslog(LOG_DEBUG, fmt); \ - } -#define FRUTREE_DEBUG1(lvl, fmt, d1) \ - if (lvl & frutree_debug) { \ - syslog(LOG_DEBUG, fmt, d1); \ - } -#define FRUTREE_DEBUG2(lvl, fmt, d1, d2) \ - if (lvl & frutree_debug) { \ - syslog(LOG_DEBUG, fmt, d1, d2); \ - } -#define FRUTREE_DEBUG3(lvl, fmt, d1, d2, d3) \ - if (lvl & frutree_debug) { \ - syslog(LOG_DEBUG, fmt, d1, d2, d3); \ - } -#define FRUTREE_DEBUG4(lvl, fmt, d1, d2, d3, d4) \ - if (lvl & frutree_debug) {\ - syslog(LOG_DEBUG, fmt, d1, d2, d3, d4); \ - } - -/* environment variables to tune the variables */ -#define FRUTREE_DEBUG "SUNW_FRUTREE_DEBUG" -#define FRUTREE_POLL_TIMEOUT "SUNW_FRUTREE_POLL_TIMEOUT" -#define FRUTREE_DRWAIT "SUNW_FRUTREE_DRWAIT_TIME" - -/* PICL defines */ -#define PICL_NODE_CHASSIS "chassis" - -/* Sanibel specific defines */ -#define SANIBEL_PICLNODE_CPU "CPU" -#define SANIBEL_PICLNODE_PARALLEL "ecpp" -#define SANIBEL_NETWORK_LABEL "ENET" -#define SANIBEL_CPCISLOT_TYPE "cpci" -#define SANIBEL_NETWORK_PORT "network" -#define SANIBEL_SERIAL_PORT "serial" -#define SANIBEL_PARALLEL_PORT "parallel" -#define SANIBEL_SCSI_SLOT "scsi" -#define SANIBEL_IDE_SLOT "ide" -#define SANIBEL_UNKNOWN_SLOT "unknown" -#define DEVICE_CLASS_SCSI "scsi" -#define DEVICE_CLASS_IDE "dada" - -#define MAX_BUFSIZE 512 -#define SUPER_USER 0 -#define DEVFSADM_CMD "/usr/sbin/devfsadm -i" -#define TEMP_DIR "/var/tmp/" -#define PROBE_FILE "probed" -#define NULLREAD (int (*)(ptree_rarg_t *, void *))0 -#define NULLWRITE (int (*)(ptree_warg_t *, const void *))0 - -#define PTREE_CREATE_PROP_FAILED \ - gettext("SUNW_frutree:Error in creating property:%s, "\ - "under %s(error=%d)") -#define PTREE_POST_PICLEVENT_ERR \ - gettext("SUNW_frutree:Error in posting picl event %s(%s)(error=%d)") -#define PTREE_EVENT_HANDLING_ERR \ - gettext("SUNW_frutree:Error in handling %s event on %s(error=%d)") -#define GET_LOC_STATE_ERR \ - gettext("SUNW_frutree:Error in getting state info for %s"\ - "(location)(error=%d)") -#define GET_FRU_STATE_ERR \ - gettext("SUNW_frutree:Error in getting state for %s(fru)(error=%d)") -#define GET_FRU_COND_ERR \ - gettext("SUNW_frutree:Error in getting condition for %s(fru)(error=%d)") -#define CONNECT_FAILED_ERR \ - gettext("SUNW_frutree:Connect operation on %s failed(error=%d)") -#define CONFIGURE_FAILED_ERR \ - gettext("SUNW_frutree:Configure operation on %s failed(error=%d)") -#define UNCONFIG_FAILED_ERR \ - gettext("SUNW_frutree:Unconfigure operation on %s failed(error=%d)") -#define DISCONNECT_FAILED_ERR \ - gettext("SUNW_frutree:Disconnect operation on %s failed(error=%d)") -#define PROBE_FRU_ERR \ - gettext("SUNW_frutree:Error in probing fru under %s(error=%d)") -#define PTREE_UPDATE_PROP_ERR \ - gettext("SUNW_frutree:Error updating %s of %s(error=%d)") -#define PTREE_GET_PROPVAL_ERR \ - gettext("SUNW_frutree:Error in getting value of %s(%s)(error=%d)") -#define PTREE_DEVICE_CREATE_ERR \ - gettext("SUNW_frutree:Error in creating nodes under %s(error=%d)") -#define EVENT_NOT_HANDLED \ - gettext("SUNW_frutree:Error in handling %s on %s(error=%d)") -#define ERROR_REINIT \ - gettext("SUNW_frutree:Error in reinitializing %s") - -typedef enum { - NO_WAIT = 0, - WAIT -} frutree_wait_t; - -typedef uint8_t frutree_frustate_t; -typedef uint8_t frutree_frucond_t; -typedef uint8_t frutree_locstate_t; -typedef uint8_t frutree_port_type_t; -typedef uint8_t frutree_datatype_t; -typedef uint8_t frutree_loctype_t; - -/* valid fru states */ -#define FRU_STATE_UNKNOWN 0x0 -#define FRU_STATE_CONFIGURED 0x1 -#define FRU_STATE_UNCONFIGURED 0x2 -#define FRU_STATE_CONFIGURING 0x3 -#define FRU_STATE_UNCONFIGURING 0x4 - -/* valid fru condition */ -#define FRU_COND_UNKNOWN 0x0 -#define FRU_COND_FAILED 0x1 -#define FRU_COND_FAILING 0x2 -#define FRU_COND_OK 0x3 -#define FRU_COND_TESTING 0x4 - -/* port states */ -#define PORT_STATE_DOWN 0x0 -#define PORT_STATE_UP 0x1 -#define PORT_STATE_UNKNOWN 0x2 - -/* port condition */ -#define PORT_COND_OK 0x0 -#define PORT_COND_FAILING 0x1 -#define PORT_COND_FAILED 0x2 -#define PORT_COND_TESTING 0x3 -#define PORT_COND_UNKNOWN 0x4 - -/* port types */ -#define NETWORK_PORT 0x0 -#define SERIAL_PORT 0x1 -#define PARALLEL_PORT 0x2 -#define UNKNOWN_PORT 0x4 - -/* location states */ -#define LOC_STATE_UNKNOWN 0x0 -#define LOC_STATE_EMPTY 0x1 -#define LOC_STATE_CONNECTED 0x2 -#define LOC_STATE_DISCONNECTED 0x3 -#define LOC_STATE_CONNECTING 0x4 -#define LOC_STATE_DISCONNECTING 0x5 - -/* types of nodes */ -#define LOC_TYPE 0x0 -#define FRU_TYPE 0x1 -#define PORT_TYPE 0x2 - -/* location managers */ -#define CFGADM_AP 0x0 /* managed based on cfgadm data */ -#define PLUGIN_PVT 0x1 /* managed by other plugin */ -#define STATIC_LOC 0x2 /* managed based on libdevinfo */ -#define UNKNOWN 0x3 /* unknown */ - -typedef struct conf_cache { - char buf[MAX_BUFSIZE]; - struct conf_cache *next; -} frutree_cache_t; - -typedef struct { - picl_nodehdl_t nodeh; - picl_prophdl_t device_tblhdl; - picl_prophdl_t env_tblhdl; - frutree_cache_t *first; - frutree_cache_t *last; - boolean_t create_cache; -} frutree_device_args_t; - -typedef struct loc_node frutree_locnode_t; -typedef struct fru_node frutree_frunode_t; -typedef struct port_node frutree_portnode_t; - -/* information on a particular location */ -struct loc_node { - picl_nodehdl_t locnodeh; /* handle of the loc node itself */ - char *name; - boolean_t cpu_node; - boolean_t dr_in_progress; - boolean_t autoconfig_enabled; - frutree_loctype_t state_mgr; /* state manager */ - frutree_locstate_t state; /* present state */ - frutree_locstate_t prev_state; /* previous state */ - pthread_mutex_t mutex; - pthread_cond_t cond_cv; -}; - -/* information on a particular port */ -struct port_node { - picl_nodehdl_t portnodeh; - char *name; - int state; - int cond; - uint8_t instance; - char driver[MAXPATHLEN]; -}; - -/* information on a particular fru */ -struct fru_node { - /* variable data */ - picl_nodehdl_t frunodeh; - char *name; - frutree_frustate_t state; - frutree_frustate_t prev_state; - frutree_frucond_t cond; - frutree_frucond_t prev_cond; - boolean_t cpu_node; - boolean_t autoconfig_enabled; - boolean_t dr_in_progress; - boolean_t busy; - frutree_loctype_t state_mgr; - char fru_path[MAXPATHLEN]; - pthread_mutex_t mutex; - pthread_cond_t cond_cv; - pthread_cond_t busy_cond_cv; -}; - -#ifdef __cplusplus -} -#endif - -#endif /* _PICLFRUTREE_H */ diff --git a/usr/src/cmd/picl/plugins/sun4u/snowbird/frutree/piclkstat.c b/usr/src/cmd/picl/plugins/sun4u/snowbird/frutree/piclkstat.c deleted file mode 100644 index 79ac86ecf1..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/snowbird/frutree/piclkstat.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, 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. - */ - -/* - * Implementation to get PORT nodes state and condition information - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include "piclfrutree.h" - -#define LINK_UP "link_up" -#define DUPLEX "duplex" -#define IF_SPEED "ifspeed" -#define IERRORS "ierrors" -#define IPACKETS "ipackets" -#define OERRORS "oerrors" -#define OPACKETS "opackets" -#define NOCANPUT "nocanput" -#define RUNT_ERRORS "runt_errors" -#define COLLISIONS "collisions" - -typedef int (*funcp)(kstat_ctl_t *, char *, int); - -static kstat_named_t *kstat_name_lookup(kstat_ctl_t *, char *, int, char *); -static int kstat_network_port_state(kstat_ctl_t *kc, char *, int); -static int kstat_network_port_cond(kstat_ctl_t *kc, char *, int); -static int serial_port_state(kstat_ctl_t *, char *, int); -static int serial_port_cond(kstat_ctl_t *kc, char *, int); -static int parallel_port_state(kstat_ctl_t *, char *, int); -static int parallel_port_cond(kstat_ctl_t *kc, char *, int); -static void sig_alarm_handler(int); - -static funcp port_state[] = { - kstat_network_port_state, - serial_port_state, - parallel_port_state -}; - -static funcp port_cond[] = { - kstat_network_port_cond, - serial_port_cond, - parallel_port_cond -}; - -/* - * kstat_port_state: returns ethernet, or serial, or parallel port status - * 1 = up, 0 = down, anything else = unknown - */ -int -kstat_port_state(frutree_port_type_t port_type, char *driver_name, - int driver_instance) -{ - int rc = -1; - kstat_ctl_t *kc = NULL; - - switch (port_type) { - case NETWORK_PORT: - case SERIAL_PORT: - case PARALLEL_PORT: - if ((kc = kstat_open()) == NULL) { - return (-1); - } - rc = port_state[port_type](kc, driver_name, driver_instance); - kstat_close(kc); - return (rc); - default: - return (-1); - } -} - -/* - * kstat_port_cond: returns ethernet, or serial, or parallel port condition - */ -int -kstat_port_cond(frutree_port_type_t port_type, char *driver_name, - int driver_instance) -{ - int rc = -1; - kstat_ctl_t *kc = NULL; - switch (port_type) { - case NETWORK_PORT: - case SERIAL_PORT: - case PARALLEL_PORT: - if ((kc = kstat_open()) == NULL) { - return (-1); - } - rc = port_cond[port_type](kc, driver_name, driver_instance); - kstat_close(kc); - return (rc); - default: - return (-1); - } -} - -static kstat_named_t * -kstat_name_lookup(kstat_ctl_t *kc, char *ks_module, int ks_instance, char *name) -{ - kstat_t *ksp; - - assert(kc); - assert(ks_module); - assert(name); - - for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { - if (strcmp(ksp->ks_module, ks_module) == 0 && - ksp->ks_instance == ks_instance && - ksp->ks_type == KSTAT_TYPE_NAMED && - kstat_read(kc, ksp, NULL) != -1 && - kstat_data_lookup(ksp, name)) { - - ksp = kstat_lookup(kc, ks_module, ks_instance, - ksp->ks_name); - if (!ksp) - return (NULL); - if (kstat_read(kc, ksp, NULL) == -1) - return (NULL); - return ((kstat_named_t *)kstat_data_lookup(ksp, name)); - } - } - return (NULL); -} - -/* - * kstat_network_port_state: returns kstat info of a network port - * 1 = up, 0 = down, anything else = unknown - */ -static int -kstat_network_port_state(kstat_ctl_t *kc, char *ks_module, int ks_instance) -{ - kstat_named_t *port_datap = NULL; - - if ((port_datap = kstat_name_lookup(kc, ks_module, ks_instance, - LINK_UP)) == NULL) { - return (-1); - } - if (port_datap == NULL) { - return (-1); - } - if (port_datap->data_type == KSTAT_DATA_UINT32) { - if (port_datap->value.ui32 == 1) { - return (1); - } else if (port_datap->value.ui32 == 0) { - return (0); - } else { - return (-1); - } - } else { - if (port_datap->value.ui64 == 1) { - return (1); - } else if (port_datap->value.ui64 == 0) { - return (0); - } else { - return (-1); - } - } -} - -/* - * kstat_network_port_cond: returns kstat info of a network port - * 0 = OK, 1 = FAILING, 2 = FAILED, 3 = TESTING, -1 = unknown - */ -static int -kstat_network_port_cond(kstat_ctl_t *kc, char *ks_module, int ks_instance) -{ - kstat_named_t *port_datap = NULL; - uint64_t collisions, runt, link_up, link_duplex; - uint64_t ifspeed, ierrors, ipackets, oerrors, opackets; - - if ((port_datap = kstat_name_lookup(kc, ks_module, ks_instance, - LINK_UP)) == NULL) { - return (-1); - } - - if (port_datap->data_type == KSTAT_DATA_UINT32) { - link_up = port_datap->value.ui32; - } else { - link_up = port_datap->value.ui64; - } - if (link_up == 0) { - return (2); - } - - if ((port_datap = kstat_name_lookup(kc, ks_module, ks_instance, - DUPLEX)) == NULL) { - return (-1); - } - - if (port_datap->data_type == KSTAT_DATA_UINT32) { - link_duplex = port_datap->value.ui32; - } else { - link_duplex = port_datap->value.ui64; - } - if (link_duplex == 0) { - return (2); - } - - if ((port_datap = kstat_name_lookup(kc, ks_module, ks_instance, - IF_SPEED)) == NULL) { - return (-1); - } - if (port_datap->data_type == KSTAT_DATA_UINT32) { - ifspeed = port_datap->value.ui32; - } else { - ifspeed = port_datap->value.ui64; - } - if (ifspeed == 0) { - return (2); - } - - /* check for FAILING conditions */ - if ((port_datap = kstat_name_lookup(kc, ks_module, ks_instance, - IERRORS)) == NULL) { - return (-1); - } - if (port_datap->data_type == KSTAT_DATA_UINT32) { - ierrors = port_datap->value.ui32; - } else { - ierrors = port_datap->value.ui64; - } - - if ((port_datap = kstat_name_lookup(kc, ks_module, ks_instance, - IPACKETS)) == NULL) { - return (-1); - } - - if (port_datap->data_type == KSTAT_DATA_UINT32) { - ipackets = port_datap->value.ui32; - } else { - ipackets = port_datap->value.ui64; - } - if (ierrors > ipackets/10) { - return (1); - } - - if ((port_datap = kstat_name_lookup(kc, ks_module, ks_instance, - OERRORS)) == NULL) { - return (-1); - } - if (port_datap->data_type == KSTAT_DATA_UINT32) { - oerrors = port_datap->value.ui32; - } else { - oerrors = port_datap->value.ui64; - } - - if ((port_datap = kstat_name_lookup(kc, ks_module, ks_instance, - OPACKETS)) == NULL) { - return (-1); - } - if (port_datap->data_type == KSTAT_DATA_UINT32) { - opackets = port_datap->value.ui32; - } else { - opackets = port_datap->value.ui64; - } - if (oerrors > opackets/10) { - return (1); - } - - if ((port_datap = kstat_name_lookup(kc, ks_module, ks_instance, - RUNT_ERRORS)) == NULL) { - return (-1); - } - if (port_datap->data_type == KSTAT_DATA_UINT32) { - runt = port_datap->value.ui32; - } else { - runt = port_datap->value.ui64; - } - if (runt > ipackets/10) { - return (1); - } - - if ((port_datap = kstat_name_lookup(kc, ks_module, ks_instance, - COLLISIONS)) == NULL) { - return (-1); - } - if (port_datap->data_type == KSTAT_DATA_UINT32) { - collisions = port_datap->value.ui32; - } else { - collisions = port_datap->value.ui64; - } - if (collisions > (opackets+ipackets)/30) { - return (1); - } - return (0); -} - -/* - * serial_port_state: returns status a serial port - * 1 = up, 0 = down, anything else = unknown - */ - -/* ARGSUSED */ -static int -serial_port_state(kstat_ctl_t *kc, char *driver, int instance) -{ - int fd; - char device[20]; - struct termios flags; - struct sigaction old_sa, new_sa; - - (void) memset(&old_sa, 0, sizeof (old_sa)); - (void) memset(&new_sa, 0, sizeof (new_sa)); - new_sa.sa_handler = sig_alarm_handler; - (void) sigaction(SIGALRM, &new_sa, &old_sa); - (void) alarm(1); - - (void) snprintf(device, sizeof (device), "/dev/tty%c", instance+'a'); - fd = open(device, O_RDONLY|O_NDELAY|O_NONBLOCK|O_NOCTTY); - - /* Restore sig action flags */ - (void) sigaction(SIGALRM, &old_sa, NULL); - /* Disable alarm */ - (void) alarm(0); - - if (fd == -1) { - return (-1); - } - - if (isatty(fd) == 0) { - (void) close(fd); - return (-1); - } - (void) memset(&flags, 0, sizeof (flags)); - if (ioctl(fd, TCGETS, &flags) != 0) { - (void) close(fd); - return (-1); - } - (void) close(fd); - return ((flags.c_cflag & TIOCM_LE) ? 1 : 0); -} - -/* ARGSUSED */ -static void -sig_alarm_handler(int signo) -{ -} - -/* - * serial_port_cond: returns status of a serial port - * 0 = OK, 1 = FAILING, 2 = FAILED, 3 = TESTING, anything else = UNKNOWN - */ -static int -serial_port_cond(kstat_ctl_t *kc, char *driver, int instance) -{ - switch (serial_port_state(kc, driver, instance)) { - case 1: - return (0); - default: - return (-1); - } -} - -/* - * parallel_port_state: returns kstat info of a serial port - * 1 = up, 0 = down, anything else = unknown - */ -static int -parallel_port_state(kstat_ctl_t *kc, char *ks_module, int ks_instance) -{ - kstat_t *ksp = NULL; - kstat_named_t *port_datap = NULL; - char *data_lookup; - char ks_name[20]; - - (void) snprintf(ks_name, sizeof (ks_name), "%s%d", ks_module, - ks_instance); - if ((ksp = kstat_lookup(kc, ks_module, ks_instance, ks_name)) == NULL) { - return (-1); - } - if (kstat_read(kc, ksp, NULL) == -1) { - return (-1); - } - data_lookup = ""; - port_datap = (kstat_named_t *)kstat_data_lookup(ksp, data_lookup); - if (port_datap == NULL) { - return (-1); - } - return (-1); -} - -/* - * parallel_port_cond: returns kstat info of a serial port - * 1 = up, 0 = down, anything else = unknown - */ -static int -parallel_port_cond(kstat_ctl_t *kc, char *ks_module, int ks_instance) -{ - return (parallel_port_state(kc, ks_module, ks_instance)); -} diff --git a/usr/src/cmd/picl/plugins/sun4u/snowbird/frutree/picllibdevinfo.c b/usr/src/cmd/picl/plugins/sun4u/snowbird/frutree/picllibdevinfo.c deleted file mode 100644 index 091e72383e..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/snowbird/frutree/picllibdevinfo.c +++ /dev/null @@ -1,853 +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" - -/* - * Implementation to interact with libdevinfo to find port nodes, - * and information regarding each node (fru, port, location). - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "piclfrutree.h" - -#include - -static di_prom_handle_t prom_handle = DI_PROM_HANDLE_NIL; -extern int frutree_debug; - -typedef struct { - di_node_t rnode; - char bus_addr[PICL_PROPNAMELEN_MAX]; - char path[PICL_PROPNAMELEN_MAX]; - void *arg; - picl_errno_t retval; -} frutree_devinfo_t; - -typedef struct p_info { - frutree_port_type_t type; - int geo_addr; - int instance; - char drv_name[20]; - char bus_addr[20]; - char devfs_path[MAXPATHLEN]; - struct p_info *next; -}port_info_t; - -typedef struct { - port_info_t *first; - port_info_t *last; - int n_serial; - int n_parallel; - int n_network; -} plist_t; - -static void -free_list(plist_t *listptr) -{ - port_info_t *tmp; - port_info_t *nextptr; - if (listptr == NULL) - return; - - nextptr = listptr->first; - while (nextptr != NULL) { - tmp = nextptr; - nextptr = nextptr->next; - free(tmp); - } -} - -/* (callback function for qsort) compare the bus_addr */ -static int -compare(const void *a, const void *b) -{ - port_info_t *pinfo1, *pinfo2; - port_info_t **ptr2pinfo1, **ptr2pinfo2; - - ptr2pinfo1 = (port_info_t **)a; - ptr2pinfo2 = (port_info_t **)b; - - pinfo1 = (port_info_t *)*ptr2pinfo1; - pinfo2 = (port_info_t *)*ptr2pinfo2; - return (strcmp(pinfo1->bus_addr, pinfo2->bus_addr)); -} - -/* - * assigns GeoAddr property for ports based on bus-addr - */ -static picl_errno_t -assign_geo_addr(plist_t *list, frutree_port_type_t type) -{ - - int i = 0; - port_info_t **port_info = NULL; - port_info_t *nextptr = NULL; - int num_ports = 0; - - if (list == NULL) { - return (PICL_FAILURE); - } - - if (list->first == NULL) { - return (PICL_SUCCESS); - } - - switch (type) { - case SERIAL_PORT: - if (list->n_serial == 0) { - return (PICL_SUCCESS); - } - num_ports = list->n_serial; - break; - - case PARALLEL_PORT: - if (list->n_parallel == 0) { - return (PICL_SUCCESS); - } - num_ports = list->n_parallel; - break; - - case NETWORK_PORT: - if (list->n_network == 0) { - return (PICL_SUCCESS); - } - num_ports = list->n_network; - break; - - } - - port_info = (port_info_t **)malloc( - sizeof (port_info_t *) * num_ports); - if (port_info == NULL) { - return (PICL_NOSPACE); - } - - /* traverse thru list and look for ports of given type */ - nextptr = list->first; - while (nextptr != NULL) { - if (nextptr->type != type) { - nextptr = nextptr->next; - continue; - } - port_info[i] = nextptr; - nextptr = nextptr->next; - i++; - } - - /* sort the nodes to assign geo_address */ - (void) qsort((void *)port_info, num_ports, - sizeof (port_info_t *), compare); - for (i = 0; i < num_ports; i++) { - if (port_info[i] != NULL) { - port_info[i]->geo_addr = i + 1; - } - } - free(port_info); - return (PICL_SUCCESS); -} - -static picl_errno_t -create_port_config_info(plist_t *list, frutree_device_args_t *devp) -{ - port_info_t *port_info = NULL; - frutree_cache_t *cachep = NULL; - char port_type[PICL_PROPNAMELEN_MAX]; - char label[PICL_PROPNAMELEN_MAX]; - - if (list == NULL) { - return (PICL_FAILURE); - } - - port_info = list->first; - while (port_info != NULL) { - - cachep = (frutree_cache_t *)malloc(sizeof (frutree_cache_t)); - if (cachep == NULL) { - return (PICL_NOSPACE); - } - - switch (port_info->type) { - case NETWORK_PORT: - (void) strncpy(label, SANIBEL_NETWORK_LABEL, - sizeof (label)); - (void) strncpy(port_type, SANIBEL_NETWORK_PORT, - sizeof (port_type)); - break; - case PARALLEL_PORT: - (void) strncpy(label, SANIBEL_PARALLEL_PORT, - sizeof (label)); - (void) strncpy(port_type, SANIBEL_PARALLEL_PORT, - sizeof (port_type)); - break; - case SERIAL_PORT: - (void) strncpy(label, SANIBEL_SERIAL_PORT, - sizeof (label)); - (void) strncpy(port_type, SANIBEL_SERIAL_PORT, - sizeof (port_type)); - break; - default: - port_info = port_info->next; - } - cachep->buf[0] = '\0'; - cachep->next = NULL; - (void) snprintf(cachep->buf, - sizeof (cachep->buf), - "\n%s %s%d %s\n" - "\t%s %s %s %s 0 \"%s %d\"\n" - "\t%s %s %s %s 0 \"%s\"\n" - "\t%s %s %s %s 1 %d\n" - "\t%s %s %s %s 0 \"%s\"\n" - "\t%s %s %s %s 0 \"%s\"\n" - "%s\n", - "NODE", port_info->drv_name, port_info->instance, - PICL_CLASS_PORT, - "PROP", PICL_PROP_LABEL, "string", "r", - label, (port_info->geo_addr -1), - "PROP", PICL_PROP_BUS_ADDR, "string", - "r", port_info->bus_addr, - "PROP", PICL_PROP_GEO_ADDR, "uint", - "r", port_info->geo_addr, - "PROP", PICL_PROP_PORT_TYPE, "string", - "r", port_type, - "PROP", PICL_PROP_DEVFS_PATH, "string", - "r", port_info->devfs_path, - "ENDNODE"); - - /* add to the cache */ - if (devp->first == NULL) { /* 1st node */ - devp->first = cachep; - devp->last = NULL; - } else if (devp->last != NULL) { /* last node */ - devp->last->next = cachep; - devp->last = cachep; - } else { /* 2nd node */ - devp->first->next = cachep; - devp->last = cachep; - } - port_info = port_info->next; /* advance to next node */ - } - return (PICL_SUCCESS); -} - -/*ARGSUSED*/ -static int -load_driver(di_node_t node, void *arg) -{ - char *drv_name = NULL; - char cmd[MAXPATHLEN]; - - if (di_node_state(node) >= DS_ATTACHED) { - return (DI_WALK_CONTINUE); - } - drv_name = di_driver_name(node); - if (drv_name == NULL) { - return (DI_WALK_CONTINUE); - } - - (void) snprintf(cmd, sizeof (cmd), "%s %s", - DEVFSADM_CMD, drv_name); - (void) pclose(popen(cmd, "r")); - return (DI_WALK_CONTINUE); -} - -static picl_errno_t -load_drivers(char *path) -{ - di_node_t rnode; - if (path == NULL) { - return (PICL_INVALIDARG); - } - - rnode = di_init(path, DINFOSUBTREE|DINFOMINOR); - if (rnode == DI_NODE_NIL) { - return (PICL_FAILURE); - } - - if (di_walk_node(rnode, DI_WALK_CLDFIRST, NULL, load_driver) != 0) { - di_fini(rnode); - return (PICL_FAILURE); - } - - di_fini(rnode); - return (PICL_SUCCESS); -} - -/* - * probe for port nodes - */ -static int -probe_tree(di_node_t node, void *arg) -{ - char *nodetype = NULL; - char *devfs_path = NULL; - char *bus_addr = NULL; - char *drv_name = NULL; - plist_t *listptr = NULL; - port_info_t *port_info = NULL; - frutree_port_type_t port_type = UNKNOWN_PORT; - di_minor_t minor = DI_MINOR_NIL; - - if (arg == NULL) { - return (DI_WALK_TERMINATE); - } - listptr = (plist_t *)arg; - - while ((minor = di_minor_next(node, minor)) != DI_MINOR_NIL) { - nodetype = di_minor_nodetype(minor); - if (nodetype == NULL) { - continue; - } - - if (strcmp(nodetype, DDI_NT_NET) == 0) { - port_type = NETWORK_PORT; - } else if (strcmp(nodetype, DDI_NT_PARALLEL) == 0) { - port_type = PARALLEL_PORT; - } else if ((strcmp(nodetype, DDI_NT_SERIAL) == 0) || - (strcmp(nodetype, DDI_NT_SERIAL_MB) == 0) || - (strcmp(nodetype, DDI_NT_SERIAL_DO) == 0) || - (strcmp(nodetype, DDI_NT_SERIAL_MB_DO) == 0)) { - port_type = SERIAL_PORT; - } else { - continue; - } - - /* found port node */ - devfs_path = di_devfs_path(node); - if (devfs_path == NULL) { - continue; - } - - bus_addr = di_bus_addr(node); - drv_name = di_driver_name(node); - - if ((bus_addr == NULL) || (drv_name == NULL)) { - di_devfs_path_free(devfs_path); - continue; - } - - port_info = malloc(sizeof (port_info_t)); - if (port_info == NULL) { - di_devfs_path_free(devfs_path); - return (PICL_NOSPACE); - } - - (void) strncpy(port_info->devfs_path, devfs_path, - sizeof (port_info->devfs_path)); - (void) strncpy(port_info->bus_addr, bus_addr, - sizeof (port_info->bus_addr)); - (void) strncpy(port_info->drv_name, drv_name, - sizeof (port_info->drv_name)); - port_info->type = port_type; - port_info->instance = di_instance(node); - port_info->geo_addr = -1; - port_info->next = NULL; - - switch (port_type) { - case NETWORK_PORT: - listptr->n_network++; - break; - case SERIAL_PORT: - listptr->n_serial++; - break; - case PARALLEL_PORT: - listptr->n_parallel++; - break; - } - - /* add to the list */ - if (listptr->first == NULL) { /* 1st node */ - listptr->first = port_info; - listptr->last = NULL; - } else if (listptr->last != NULL) { /* last node */ - listptr->last->next = port_info; - listptr->last = port_info; - } else { /* 2nd node */ - listptr->first->next = port_info; - listptr->last = port_info; - } - di_devfs_path_free(devfs_path); - return (DI_WALK_CONTINUE); - } - return (DI_WALK_CONTINUE); -} - -/* This routine probes libdevinfo for port nodes */ -picl_errno_t -probe_libdevinfo(frutree_frunode_t *frup, frutree_device_args_t ** device, - boolean_t load_drv) -{ - di_node_t rnode; - picl_errno_t rc; - plist_t list; - - if (frup == NULL) { - return (PICL_FAILURE); - } - FRUTREE_DEBUG1(EVENTS, "loading drivers for %s", frup->name); - - if (load_drv == B_TRUE) { - if ((rc = load_drivers(frup->fru_path)) != PICL_SUCCESS) { - return (rc); - } - } - FRUTREE_DEBUG1(EVENTS, "done with loading drivers for %s", frup->name); - - rnode = di_init(frup->fru_path, DINFOSUBTREE|DINFOMINOR); - if (rnode == DI_NODE_NIL) { - return (PICL_FAILURE); - } - - list.first = NULL; - list.last = NULL; - list.n_network = 0; - list.n_serial = 0; - list.n_parallel = 0; - - if (di_walk_node(rnode, DI_WALK_CLDFIRST, &list, probe_tree) != 0) { - di_fini(rnode); - free_list(&list); - return (PICL_FAILURE); - } - - if (list.n_serial > 0) - if ((rc = assign_geo_addr(&list, SERIAL_PORT)) != PICL_SUCCESS) { - di_fini(rnode); - free_list(&list); - return (rc); - } - - if (list.n_network > 0) - if ((rc = assign_geo_addr(&list, NETWORK_PORT)) != PICL_SUCCESS) { - di_fini(rnode); - free_list(&list); - return (rc); - } - - if (list.n_parallel > 0) - if ((rc = assign_geo_addr(&list, PARALLEL_PORT)) != PICL_SUCCESS) { - di_fini(rnode); - free_list(&list); - return (rc); - } - - if ((rc = create_port_config_info(&list, *device)) != PICL_SUCCESS) { - di_fini(rnode); - free_list(&list); - return (rc); - } - - di_fini(rnode); - free_list(&list); - FRUTREE_DEBUG1(EVENTS, "done with probing %s", frup->name); - return (PICL_SUCCESS); -} - -static int -get_reg_dev(di_node_t node) -{ - int *reg = NULL; - if (di_prop_lookup_ints(DDI_DEV_T_ANY, node, OBP_REG, ®) < 0) { - if (di_prom_prop_lookup_ints(prom_handle, node, OBP_REG, - ®) < 0) { - return (-1); - } - return (PCI_REG_DEV_G(reg[0])); - } - return (PCI_REG_DEV_G(reg[0])); -} - -static int -walk_tree(di_node_t node, void *arg) -{ - char *path = NULL; - char *bus_addr = NULL; - char *char_di_bus_addr = NULL; - int busaddr = 0; - int di_busaddr = 0; - char *node_name = NULL; - frutree_devinfo_t *devinfo; - frutree_frunode_t *frup = NULL; - - devinfo = *(frutree_devinfo_t **)arg; - frup = (frutree_frunode_t *)devinfo->arg; - if (frup == NULL) { - return (DI_WALK_TERMINATE); - } - - if (devinfo->rnode == node) { /* skip the root node */ - return (DI_WALK_CONTINUE); - } - bus_addr = devinfo->bus_addr; - - char_di_bus_addr = di_bus_addr(node); - if (char_di_bus_addr == NULL) { - /* - * look for reg property - * This applies to only cPCI devices - */ - if (strstr(bus_addr, ",") != NULL) { - /* bus addr is of type 1,0 */ - /* we dont handle this case yet */ - return (DI_WALK_PRUNECHILD); - } - di_busaddr = get_reg_dev(node); - if (di_busaddr == -1) { - /* reg prop not found */ - return (DI_WALK_PRUNECHILD); - } - - /* check if the bus addresses are same */ - errno = 0; - busaddr = strtol(bus_addr, (char **)NULL, 16); - if (errno != 0) { - return (DI_WALK_TERMINATE); - } - if (di_busaddr != busaddr) { - return (DI_WALK_PRUNECHILD); - } - - /* build the fru path name */ - /* parent_path/nodename@bus_addr */ - node_name = di_node_name(node); - if (node_name == NULL) { - return (DI_WALK_TERMINATE); - } - (void) snprintf(devinfo->path, sizeof (devinfo->path), - "%s/%s@%s", frup->fru_path, node_name, bus_addr); - return (DI_WALK_TERMINATE); - } - - if (strstr(bus_addr, ",") != NULL) { /* bus addr is of type 1,0 */ - if (strcmp(bus_addr, char_di_bus_addr) != 0) { - return (DI_WALK_PRUNECHILD); - } - } else { /* bus addr is of type 0x */ - - /* check if the values are same */ - errno = 0; - busaddr = strtol(bus_addr, (char **)NULL, 16); - if (errno != 0) { - return (DI_WALK_TERMINATE); - } - - errno = 0; - di_busaddr = strtol(char_di_bus_addr, (char **)NULL, 16); - if (errno != 0) { - return (DI_WALK_TERMINATE); - } - - if (di_busaddr != busaddr) { - return (DI_WALK_PRUNECHILD); - } - } - - /* node found */ - path = di_devfs_path(node); - (void) strncpy(devinfo->path, path, sizeof (devinfo->path)); - di_devfs_path_free(path); - return (DI_WALK_TERMINATE); -} - -picl_errno_t -get_fru_path(char *parent_path, frutree_frunode_t *frup) -{ - picl_errno_t rc = 0; - picl_nodehdl_t loch; - di_node_t rnode; - frutree_devinfo_t *devinfo = NULL; - char slot_type[PICL_PROPNAMELEN_MAX]; - char probe_path[PICL_PROPNAMELEN_MAX]; - char bus_addr[PICL_PROPNAMELEN_MAX]; - - if ((rc = ptree_get_propval_by_name(frup->frunodeh, PICL_PROP_PARENT, - &loch, sizeof (loch))) != PICL_SUCCESS) { - return (rc); - } - - if ((rc = ptree_get_propval_by_name(loch, PICL_PROP_SLOT_TYPE, - slot_type, sizeof (slot_type))) != PICL_SUCCESS) { - return (rc); - } - - if (strcmp(slot_type, SANIBEL_SCSI_SLOT) == 0 || - strcmp(slot_type, SANIBEL_IDE_SLOT) == 0) { - if (ptree_get_propval_by_name(loch, PICL_PROP_PROBE_PATH, - probe_path, sizeof (probe_path)) != PICL_SUCCESS) { - return (rc); - } - (void) strncpy(frup->fru_path, probe_path, - sizeof (frup->fru_path)); - return (PICL_SUCCESS); - } - - prom_handle = di_prom_init(); - rnode = di_init(parent_path, DINFOSUBTREE|DINFOMINOR); - if (rnode == DI_NODE_NIL) { - di_prom_fini(prom_handle); - return (PICL_FAILURE); - } - - devinfo = (frutree_devinfo_t *)malloc(sizeof (frutree_devinfo_t)); - if (devinfo == NULL) { - di_fini(rnode); - di_prom_fini(prom_handle); - return (PICL_NOSPACE); - } - - if (ptree_get_propval_by_name(loch, PICL_PROP_BUS_ADDR, - bus_addr, sizeof (bus_addr)) != PICL_SUCCESS) { - free(devinfo); - di_fini(rnode); - di_prom_fini(prom_handle); - return (rc); - } - - devinfo->rnode = rnode; - (void) strncpy(devinfo->bus_addr, bus_addr, sizeof (devinfo->bus_addr)); - devinfo->path[0] = '\0'; - devinfo->arg = frup; - - if (di_walk_node(rnode, DI_WALK_SIBFIRST, &devinfo, walk_tree) != 0) { - di_fini(rnode); - di_prom_fini(prom_handle); - free(devinfo); - return (PICL_FAILURE); - } - di_fini(rnode); - di_prom_fini(prom_handle); - - if (devinfo->path[0]) { - (void) strncpy(frup->fru_path, devinfo->path, - sizeof (frup->fru_path)); - free(devinfo); - return (PICL_SUCCESS); - } else { - free(devinfo); - return (PICL_NODENOTFOUND); - } -} - -static int -find_fru_node(di_node_t node, void *arg) -{ - frutree_locnode_t *locp = NULL; - char *char_di_bus_addr = NULL; - int busaddr = 0; - int di_busaddr = 0; - char bus_addr[PICL_PROPNAMELEN_MAX]; - frutree_devinfo_t *devinfo = NULL; - - devinfo = *(frutree_devinfo_t **)arg; - locp = *(frutree_locnode_t **)devinfo->arg; - - if (devinfo->rnode == node) { - return (DI_WALK_CONTINUE); - } - - char_di_bus_addr = di_bus_addr(node); - if (char_di_bus_addr == NULL) { - return (DI_WALK_PRUNECHILD); - } - - if (ptree_get_propval_by_name(locp->locnodeh, PICL_PROP_BUS_ADDR, - bus_addr, sizeof (bus_addr)) != PICL_SUCCESS) { - return (DI_WALK_PRUNECHILD); - } - - if (strstr(bus_addr, ",") != NULL) { - /* bus addr is of type 1,0 */ - if (strcmp(bus_addr, char_di_bus_addr) == 0) { - devinfo->retval = PICL_SUCCESS; - return (DI_WALK_TERMINATE); - } else { - return (DI_WALK_PRUNECHILD); - } - } else { /* bus addr is of type 0x */ - - /* check if the values are same */ - errno = 0; - busaddr = strtol(bus_addr, (char **)NULL, 16); - if (errno != 0) { - return (DI_WALK_PRUNECHILD); - } - - errno = 0; - di_busaddr = strtol(char_di_bus_addr, (char **)NULL, 16); - if (errno != 0) { - return (DI_WALK_PRUNECHILD); - } - - if (di_busaddr == busaddr) { - devinfo->retval = PICL_SUCCESS; - return (DI_WALK_TERMINATE); - } else { - return (DI_WALK_PRUNECHILD); - } - } -} - -/* - * checks if a fru is present under location using pdev-path and busaddr - */ -boolean_t -is_fru_present_under_location(frutree_locnode_t *locp) -{ - di_node_t rnode; - frutree_devinfo_t *devinfo = NULL; - char probe_path[PICL_PROPNAMELEN_MAX]; - - if (locp == NULL) { - return (B_FALSE); - } - - if (ptree_get_propval_by_name(locp->locnodeh, PICL_PROP_PROBE_PATH, - probe_path, sizeof (probe_path)) != PICL_SUCCESS) { - if (ptree_get_propval_by_name(locp->locnodeh, - PICL_PROP_DEVFS_PATH, probe_path, - sizeof (probe_path)) != PICL_SUCCESS) { - return (B_FALSE); - } - } - - rnode = di_init(probe_path, DINFOSUBTREE); - if (rnode == DI_NODE_NIL) { - di_fini(rnode); - return (B_FALSE); - } - - devinfo = (frutree_devinfo_t *)malloc(sizeof (frutree_devinfo_t)); - if (devinfo == NULL) { - di_fini(rnode); - return (B_FALSE); - } - devinfo->rnode = rnode; - devinfo->arg = (frutree_locnode_t **)&locp; - devinfo->retval = PICL_FAILURE; - - if (di_walk_node(rnode, DI_WALK_SIBFIRST, &devinfo, - find_fru_node) != 0) { - di_fini(rnode); - free(devinfo); - return (B_FALSE); - } - di_fini(rnode); - - if (devinfo->retval == PICL_SUCCESS) { - free(devinfo); - return (B_TRUE); - } else { - free(devinfo); - return (B_FALSE); - } -} - -/* - * initializes the port driver and instance fields based on libdevinfo - */ -picl_errno_t -get_port_info(frutree_portnode_t *portp) -{ - picl_errno_t rc; - di_node_t rnode, curr, peer; - char devfs_path[PICL_PROPNAMELEN_MAX]; - char bus_addr[PICL_PROPNAMELEN_MAX]; - char *di_busaddr = NULL, *di_drv = NULL; - int di_int_busaddr, int_busaddr; - - if ((rc = ptree_get_propval_by_name(portp->portnodeh, - PICL_PROP_DEVFS_PATH, devfs_path, - sizeof (devfs_path))) != PICL_SUCCESS) { - return (rc); - } - - if (ptree_get_propval_by_name(portp->portnodeh, PICL_PROP_BUS_ADDR, - bus_addr, sizeof (bus_addr)) != PICL_SUCCESS) { - return (rc); - } - - rnode = di_init(devfs_path, DINFOCPYALL); - if (rnode == DI_NODE_NIL) { - return (PICL_FAILURE); - } - - peer = di_child_node(rnode); - while (peer != DI_NODE_NIL) { - curr = peer; - peer = di_sibling_node(curr); - - di_busaddr = di_bus_addr(curr); - if (di_busaddr == NULL) { - continue; - } - - /* compare the bus_addr */ - if (strstr(bus_addr, ",") != NULL) { - /* bus addr is of type 1,0 */ - if (strcmp(bus_addr, di_busaddr) != 0) { - continue; - } - } else { /* bus addr is of type 0x */ - errno = 0; - int_busaddr = strtol(bus_addr, (char **)NULL, 16); - if (errno != 0) { - continue; - } - - errno = 0; - di_int_busaddr = strtol(di_busaddr, (char **)NULL, 16); - if (errno != 0) { - continue; - } - - if (di_int_busaddr != int_busaddr) { - continue; - } - } - di_drv = di_driver_name(curr); - if (di_drv == NULL) { - di_fini(rnode); - return (PICL_FAILURE); - } - /* initialize the driver name and instance number */ - (void) strncpy(portp->driver, di_drv, sizeof (portp->driver)); - portp->instance = di_instance(curr); - di_fini(rnode); - return (PICL_SUCCESS); - } - di_fini(rnode); - return (PICL_NODENOTFOUND); -} diff --git a/usr/src/cmd/picl/plugins/sun4u/snowbird/frutree/piclscsi.c b/usr/src/cmd/picl/plugins/sun4u/snowbird/frutree/piclscsi.c deleted file mode 100644 index 25280a5644..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/snowbird/frutree/piclscsi.c +++ /dev/null @@ -1,899 +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" - -/* implementation specific to scsi nodes probing */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "piclfrutree.h" - -#define SCSI_SLOT "scsi-bus" -#define SCSI_LOC_FORMAT "t%dd0" -#define TARGET "target" -#define CLASS "class" -#define BUF_SIZE 256 - -#define SCSI_INITIATOR_ID 7 -#define DRV_TYPE_DSK 1 -#define DRV_TYPE_TAPE 2 -#define NUM_DSK_TARGS 15 -/* - * No support for wide tapes for now. - * If required wide support, set this to 8 - * See st.conf. - */ -#define NUM_TAPE_TARGS 7 - -#define DIRLINK_DSK "dsk" -#define DIRLINK_RMT "rmt" -#define DRV_SCSI_DSK "sd" -#define DRV_SCSI_TAPE "st" -#define NULL_ENTRY 0 - -/* currently supported directory strings for SCSI FRUs in cfgadm APs */ -static char *scsi_dirlink_names[] = { DIRLINK_DSK, DIRLINK_RMT, NULL_ENTRY}; -/* currently supported SCSI FRU drivers */ -static struct scsi_drv_info { - char *drv_name; - uint8_t num_targets; - uint8_t drv_type; -} scsi_drv[] = { - DRV_SCSI_DSK, NUM_DSK_TARGS, DRV_TYPE_DSK, - DRV_SCSI_TAPE, NUM_TAPE_TARGS, DRV_TYPE_TAPE, - NULL_ENTRY, NULL_ENTRY, NULL_ENTRY - }; - -/* the following defs are based on defines in scsi cfgadm plugin */ -#define CDROM "CD-ROM" -#define RMM "tape" -#define DISK "disk" - -extern boolean_t is_location_present_in_subtree(frutree_frunode_t *, - const char *, const char *); -extern picl_errno_t create_children(frutree_frunode_t *, char *, char *, - int, char *, boolean_t); -extern char *strtok_r(char *s1, const char *s2, char **lasts); -extern boolean_t frutree_connects_initiated; -extern int frutree_debug; - -typedef struct node { - struct node *next; - cfga_list_data_t *data; -} node_t; - -typedef struct linked_list { - node_t *first; - int num_nodes; -} plist_t; - -typedef struct scsi_info { - frutree_frunode_t *frup; - cfga_list_data_t *cfgalist; - plist_t *list; - int num_list; - boolean_t compare_cfgadm; - int geo_addr; -} scsi_info_t; - -static plist_t *scsi_list = NULL; -static cfga_list_data_t *cfglist = NULL; -static int nlist = 0; - -static void -free_list(plist_t *list) -{ - node_t *tmp = NULL, *tmp1 = NULL; - - if (list == NULL) - return; - tmp = list->first; - while (tmp != NULL) { - free(tmp->data); - tmp1 = tmp->next; - free(tmp); - tmp = tmp1; - } -} - -/* - * This routine gets the list of scsi controllers present - */ -static cfga_err_t -populate_controllers_list(plist_t *cntrl_list, cfga_list_data_t *list, int num) -{ - int i; - node_t *nodeptr = NULL; - cfga_list_data_t *temp = NULL; - - if (cntrl_list == NULL || list == NULL) { - return (CFGA_ATTR_INVAL); - } - - cntrl_list->first = NULL; - cntrl_list->num_nodes = 0; - - if (num == 0) { - return (CFGA_OK); - } - - for (i = 0; i < num; i++) { - if (strcmp(list[i].ap_type, SCSI_SLOT) != 0) { - continue; - } - - /* scsi controller */ - temp = (cfga_list_data_t *)malloc(sizeof (cfga_list_data_t)); - if (temp == NULL) { - return (CFGA_ERROR); - } - (void) memcpy(temp, &list[i], sizeof (cfga_list_data_t)); - - nodeptr = (node_t *)malloc(sizeof (node_t)); - if (nodeptr == NULL) { - free(temp); - return (CFGA_ERROR); - } - nodeptr->data = temp; - nodeptr->next = NULL; - - /* append to the list */ - if (cntrl_list->first == NULL) { - cntrl_list->first = nodeptr; - cntrl_list->num_nodes++; - } else { - nodeptr->next = cntrl_list->first; - cntrl_list->first = nodeptr; - cntrl_list->num_nodes++; - } - } - return (CFGA_OK); -} - -picl_errno_t -scsi_info_init() -{ - cfga_err_t ap_list_err; - - ap_list_err = config_list_ext(0, NULL, &cfglist, &nlist, NULL, - NULL, NULL, CFGA_FLAG_LIST_ALL); - - if (ap_list_err != CFGA_OK) { - if (ap_list_err == CFGA_NOTSUPP) { - return (PICL_SUCCESS); - } else { - return (PICL_FAILURE); - } - } - - scsi_list = (plist_t *)malloc(sizeof (plist_t)); - if (scsi_list == NULL) { - free(cfglist); - return (PICL_NOSPACE); - } - - ap_list_err = populate_controllers_list(scsi_list, cfglist, nlist); - if (ap_list_err != CFGA_OK) { - free(cfglist); - free(scsi_list); - return (PICL_FAILURE); - } - return (PICL_SUCCESS); -} - -void -scsi_info_fini() -{ - free(cfglist); - free_list(scsi_list); - free(scsi_list); -} - -/* - * This routine searches the controllers list to find the mapping based - * on given devfs_path. - * caller should allocate memory for ap_id - */ -static picl_errno_t -find_scsi_controller(char *devfs_path, plist_t *list, char *ap_id) -{ - node_t *tmp = NULL; - char *lasts = NULL; - char *token = NULL; - char path[MAXPATHLEN]; - - if (devfs_path == NULL || ap_id == NULL) { - return (PICL_INVALIDARG); - } - (void) snprintf((char *)path, sizeof (path), "/devices%s", devfs_path); - - tmp = list->first; - while (tmp != NULL) { - lasts = tmp->data->ap_phys_id; - token = (char *)strtok_r(lasts, (const char *)":", - (char **)&lasts); - if (token == NULL) { - tmp = tmp->next; - continue; - } - - if (strcmp(path, token) == 0) { /* match found */ - (void) strncpy(ap_id, tmp->data->ap_log_id, - sizeof (ap_id)); - return (PICL_SUCCESS); - } - tmp = tmp->next; - } - return (PICL_NODENOTFOUND); -} - -/* - * This routine dynamically determines the cfgadm attachment point - * for a given devfspath and target id. - * memory for name should be allocated by the caller. - */ -picl_errno_t -get_scsislot_name(char *devfs_path, char *bus_addr, char *name) -{ - picl_errno_t rc; - int target_id = 0; - int numlist; - plist_t list; - cfga_err_t ap_list_err; - cfga_list_data_t *cfgalist = NULL; - char controller[MAXPATHLEN]; - - ap_list_err = config_list_ext(0, NULL, &cfgalist, - &numlist, NULL, NULL, NULL, CFGA_FLAG_LIST_ALL); - if (ap_list_err != CFGA_OK) { - return (PICL_NODENOTFOUND); - } - - ap_list_err = populate_controllers_list(&list, cfgalist, - numlist); - if (ap_list_err != CFGA_OK) { - free_list(&list); - free(cfgalist); - return (PICL_NODENOTFOUND); - } - - if (list.num_nodes <= 0) { - free(cfgalist); - return (PICL_NODENOTFOUND); - } - - if ((rc = find_scsi_controller(devfs_path, &list, - controller)) != PICL_SUCCESS) { - free(cfgalist); - free_list(&list); - return (rc); - } - target_id = strtol(bus_addr, (char **)NULL, 16); - (void) sprintf(name, "%s::dsk/%st%dd0", controller, - controller, target_id); - free(cfgalist); - free_list(&list); - return (PICL_SUCCESS); -} - -/* - * Arg scsi_loc can be any of the following forms appearing in cfgadm output - * c0::dsk/c0t0d0 - * c1::sd56 - * c2::rmt/0 - * c3::st41 - * dsk/c1t1d0 - * rmt/1 - * /devices/pci@1f,0/pci@1,1/scsi@2:scsi::dsk/c0t0d0 - * - * On return, bus_addr contains the target id of the device. - * Please note that currently the target id is computed. It is better - * to eventually change this to getting from libdevinfo. - * Also, please note that SCSI_INITIATOR_ID should not - * be hardcoded, but should be dynamically retrieved from an OBP property. - */ -static void -get_bus_addr(char *scsi_loc, char **bus_addr) -{ - char *ap, *token, *p, *ap_idp; - int len = 0, i = 0; - char parse_link = 0; - char addr[BUF_SIZE], ap_id[BUF_SIZE]; - char fileinfo[BUF_SIZE], ap_id_link[BUF_SIZE]; - - (void) strncpy(ap_id, scsi_loc, sizeof (ap_id)); - ap = strrchr(ap_id, ':'); - if (!ap) - ap = ap_idp = ap_id; - else - ap_idp = ++ap; - - while (scsi_dirlink_names[i] && !len) { - len = strspn(ap, scsi_dirlink_names[i++]); - /* - * strspn may return positive len even when there is no - * complete string matches!!! hence the following check is - * necessary. So ensure the string match. - */ - if (len && strstr(ap, scsi_dirlink_names[i-1])) - break; - len = 0; - } - if (len) - parse_link = 1; - else { - i = 0; - while (scsi_drv[i].drv_name && !len) { - len = strspn(ap, scsi_drv[i++].drv_name); - if (len && strstr(ap, scsi_drv[i-1].drv_name)) - break; - len = 0; - } - } - ap += len; - if (strlen(ap) && parse_link) { - - /* slice 0 must be present in the system */ - if (strstr(ap, "/c")) { - if (strstr(ap, "s0") == NULL) - (void) strcat(ap, "s0"); - } - /* get the devlink and read the target id from minor node */ - (void) snprintf(ap_id_link, sizeof (ap_id_link), "/dev/%s", - ap_idp); - (void) bzero(fileinfo, sizeof (fileinfo)); - if (readlink(ap_id_link, fileinfo, sizeof (fileinfo)) < 0) - return; - if (!fileinfo[0]) - return; - ap = strrchr(fileinfo, '@'); - ap++; - } - token = (char *)strtok_r(ap, ",", &p); - (void) strncpy(addr, token, sizeof (addr)); - if (!parse_link) { - int drv_inst = atoi(token); - int tmp_targ_id = drv_inst % scsi_drv[i-1].num_targets; - int targ_id = scsi_drv[i-1].drv_type == DRV_TYPE_DSK ? - (tmp_targ_id < SCSI_INITIATOR_ID ? - tmp_targ_id : tmp_targ_id+1): - DRV_TYPE_TAPE ? tmp_targ_id : drv_inst; - (void) snprintf(addr, sizeof (addr), "%d", targ_id); - } - if (strlen(addr)) { - *bus_addr = (char *)malloc(strlen(addr)+1); - if ((*bus_addr) == NULL) - return; - (void) strcpy((char *)*bus_addr, addr); - } -} - -/* - * This routine determines all the scsi nodes under a FRU and - * creates a subtree of all the scsi nodes with basic properties. - */ -static picl_errno_t -dyn_probe_for_scsi_frus(frutree_frunode_t *frup, cfga_list_data_t *cfgalist, - plist_t *list, int numlist) -{ - picl_errno_t rc; - int i, geo_addr = 0; - node_t *curr = NULL; - char *bus_addr = NULL; - char path[MAXPATHLEN]; - char controller_name[MAXPATHLEN]; - - /* for each controller in the list, find if disk/fru is present */ - curr = list->first; - while (curr != NULL) { - /* compare the path */ - (void) snprintf((char *)path, sizeof (path), "/devices%s", - frup->fru_path); - if (strstr(curr->data->ap_phys_id, path) == NULL) { - curr = curr->next; - continue; - - } - (void) snprintf(controller_name, sizeof (controller_name), - "%s::", curr->data->ap_log_id); - - for (i = 0; i < numlist; i++) { - if (strcmp(cfgalist[i].ap_type, SCSI_SLOT) == 0) { - continue; - } - if (strstr(cfgalist[i].ap_log_id, - controller_name) == NULL) { - continue; - } - /* check if device is under fru */ - if (strstr(cfgalist[i].ap_phys_id, path) == NULL) { - continue; - } - - /* we found a scsi fru */ - geo_addr++; - /* check if the device is present in subtree */ - if (is_location_present_in_subtree(frup, - cfgalist[i].ap_log_id, path) == B_TRUE) { - continue; - } - get_bus_addr(cfgalist[i].ap_log_id, &bus_addr); - if (bus_addr == NULL) { - continue; - } - rc = create_children(frup, cfgalist[i].ap_log_id, - bus_addr, geo_addr, SANIBEL_SCSI_SLOT, B_TRUE); - free(bus_addr); - if (rc != PICL_SUCCESS) { - FRUTREE_DEBUG3(FRUTREE_INIT, "SUNW_frutree:" - "Error in creating node %s under %s(error=%d)", - cfgalist[i].ap_log_id, frup->name, rc); - } - } - curr = curr->next; - } - return (PICL_SUCCESS); -} - -/* - * data used here is cached information (cfglist, nlist) - */ -static picl_errno_t -cache_probe_for_scsi_frus(frutree_frunode_t *frup) -{ - int i, geo_addr = 0; - picl_errno_t rc; - node_t *curr = NULL; - char path[MAXPATHLEN]; - char controller_name[MAXPATHLEN]; - char *bus_addr = NULL; - - /* for each controller in the list, find if disk/fru is present */ - if (scsi_list == NULL) { - return (PICL_SUCCESS); - } - curr = scsi_list->first; - while (curr != NULL) { - /* compare the path */ - (void) snprintf((char *)path, sizeof (path), "/devices%s", - frup->fru_path); - if (strstr(curr->data->ap_phys_id, path) == NULL) { - curr = curr->next; - continue; - } - (void) snprintf(controller_name, sizeof (controller_name), - "%s::", curr->data->ap_log_id); - - for (i = 0; i < nlist; i++) { - if (strcmp(cfglist[i].ap_type, SCSI_SLOT) == 0) { - continue; - } - if (strstr(cfglist[i].ap_log_id, - controller_name) == NULL) { - continue; - } - /* check if the device is under fru */ - if (strstr(cfglist[i].ap_phys_id, path) == NULL) { - continue; - } - - /* we found a scsi fru */ - geo_addr++; - /* check if the device is present in subtree */ - if (is_location_present_in_subtree(frup, - cfglist[i].ap_log_id, path) == B_TRUE) { - continue; - } - get_bus_addr(cfglist[i].ap_log_id, &bus_addr); - if (bus_addr == NULL) { - continue; - } - rc = create_children(frup, cfglist[i].ap_log_id, - bus_addr, geo_addr, SANIBEL_SCSI_SLOT, B_TRUE); - free(bus_addr); - if (rc != PICL_SUCCESS) { - FRUTREE_DEBUG3(FRUTREE_INIT, "SUNW_frutree:" - "Error in creating node %s under %s(error=%d)", - cfglist[i].ap_log_id, frup->name, rc); - } - } - curr = curr->next; - } - return (PICL_SUCCESS); -} - -/* - * This routine checks if the node (scsi device) is present in cfgadm data - * Algorithm: - * 1. traverse thru list of controllers and find - * the controller of interest - * 2. go thru list of devices under controller and compare if the target is same - * 3. if yes - * - device is already represented - * 4. if No - * - The node must be repreented in PICL tree. - */ -static boolean_t -is_node_present(scsi_info_t *scsi_info, char *devfs_path, int target) -{ - node_t *curr = NULL; - char path[MAXPATHLEN]; - char controller[MAXPATHLEN]; - char *bus_addr = NULL; - char *lasts = NULL, *token = NULL; - int i = 0; - - if (scsi_info == NULL) { - return (B_FALSE); - } - - if (scsi_info->list == NULL) { - return (B_FALSE); - } - - (void) snprintf(path, sizeof (path), "/devices%s", devfs_path); - - curr = scsi_info->list->first; - while (curr != NULL) { - - lasts = curr->data->ap_phys_id; - token = (char *)strtok_r(lasts, (const char *)":", - (char **)&lasts); - if (token == NULL) { - curr = curr->next; - continue; - } - - if (strstr(path, token) == NULL) { - /* this controller is not of interest */ - curr = curr->next; - continue; - } - - (void) snprintf(controller, sizeof (controller), "%s::", - curr->data->ap_log_id); - for (i = 0; i < scsi_info->num_list; i++) { - if (strcmp(scsi_info->cfgalist[i].ap_type, - SCSI_SLOT) == 0) { - continue; - } - - if (strstr(scsi_info->cfgalist[i].ap_log_id, - controller) == NULL) { - continue; - } - - get_bus_addr(scsi_info->cfgalist[i].ap_phys_id, - &bus_addr); - /* - * compare with target value - */ - if (bus_addr == NULL) { - return (B_TRUE); - } - if (strtoul(bus_addr, NULL, 16) == target) { - /* - * this device is already represented - * in fru tree - */ - free(bus_addr); - return (B_TRUE); - } - free(bus_addr); - } - curr = curr->next; - } - return (B_FALSE); -} - -static di_prop_t -get_prop_by_name(di_node_t node, char *name) -{ - di_prop_t prop = DI_PROP_NIL; - char *prop_name = NULL; - - prop = di_prop_next(node, DI_PROP_NIL); - while (prop != DI_PROP_NIL) { - prop_name = di_prop_name(prop); - if (prop_name != NULL) { - if (strcmp(prop_name, name) == 0) { - return (prop); - } - } - prop = di_prop_next(node, prop); - } - return (DI_PROP_NIL); -} - -static int -get_geoaddr(picl_nodehdl_t nodeh, void *c_args) -{ - picl_errno_t rc; - uint8_t *geo_addr = NULL; - char slot_type[PICL_PROPNAMELEN_MAX]; - - if (c_args == NULL) - return (PICL_INVALIDARG); - geo_addr = (uint8_t *)c_args; - - if ((rc = ptree_get_propval_by_name(nodeh, PICL_PROP_SLOT_TYPE, - slot_type, sizeof (slot_type))) != PICL_SUCCESS) { - return (rc); - } - - if (strcmp(slot_type, SANIBEL_SCSI_SLOT) == 0 || - strcmp(slot_type, SANIBEL_IDE_SLOT) == 0) { - *geo_addr = *geo_addr + 1; - } - return (PICL_WALK_CONTINUE); -} - -static int -frutree_get_geoaddr(frutree_frunode_t *frup) -{ - int geo_addr = 1; - if (ptree_walk_tree_by_class(frup->frunodeh, PICL_CLASS_LOCATION, - &geo_addr, get_geoaddr) != PICL_SUCCESS) { - return (geo_addr); - } - return (geo_addr); -} - -static int -probe_disks(di_node_t node, void *arg) -{ - di_prop_t prop; - picl_errno_t rc; - int *target_val = NULL; - char *nodetype = NULL; - char *devfs_path = NULL; - char *bus_addr = NULL; - char *drv_name = NULL; - scsi_info_t *data = NULL; - di_minor_t minor = DI_MINOR_NIL; - char *class = NULL; - char node_name[BUF_SIZE]; - char slot_type[PICL_PROPNAMELEN_MAX]; - - if (arg == NULL) - return (DI_WALK_TERMINATE); - - data = *(scsi_info_t **)arg; - if (data == NULL) { - return (DI_WALK_TERMINATE); - } - - /* initialize the geo_addr value */ - if (data->geo_addr == 0) { - if (data->compare_cfgadm == B_FALSE) { - data->geo_addr = 1; - } else { - data->geo_addr = frutree_get_geoaddr(data->frup); - } - } - - while ((minor = di_minor_next(node, minor)) != DI_MINOR_NIL) { - nodetype = di_minor_nodetype(minor); - if (nodetype == NULL) { - continue; - } - - if (strcmp(nodetype, DDI_NT_BLOCK_CHAN) == 0 || - strcmp(nodetype, DDI_NT_BLOCK_WWN) == 0) { - (void) snprintf(node_name, sizeof (node_name), - "%s%d", DISK, data->geo_addr); - } else if (strcmp(nodetype, DDI_NT_TAPE) == 0) { - (void) snprintf(node_name, sizeof (node_name), - "%s%d", RMM, data->geo_addr); - } else if (strcmp(nodetype, DDI_NT_CD) == 0 || - strcmp(nodetype, DDI_NT_CD_CHAN) == 0) { - (void) snprintf(node_name, sizeof (node_name), - "%s%d", CDROM, data->geo_addr); - } else { - continue; - } - - devfs_path = di_devfs_path(node); - drv_name = di_driver_name(node); - bus_addr = di_bus_addr(node); - if (devfs_path == NULL) { - continue; - } - if (drv_name == NULL || bus_addr == NULL) { - di_devfs_path_free(devfs_path); - continue; - } - prop = get_prop_by_name(node, TARGET); - if (prop != DI_PROP_NIL) { - di_prop_ints(prop, &target_val); - if (data->compare_cfgadm) { - /* check if node is present in cfgadm data */ - if (is_node_present(data, devfs_path, - *target_val) == B_TRUE) { - di_devfs_path_free(devfs_path); - return (DI_WALK_CONTINUE); - } - } - - di_devfs_path_free(devfs_path); - prop = get_prop_by_name(node, CLASS); - if (prop != DI_PROP_NIL) { - di_prop_strings(prop, &class); - } - - /* determine the slot type based on class code */ - if (class != NULL) { - if (strcmp(class, DEVICE_CLASS_SCSI) == 0) { - (void) strncpy(slot_type, - SANIBEL_SCSI_SLOT, - sizeof (slot_type)); - } else if (strcmp(class, - DEVICE_CLASS_IDE) == 0) { - (void) strncpy(slot_type, - SANIBEL_IDE_SLOT, - sizeof (slot_type)); - } else { - (void) strncpy(slot_type, - SANIBEL_UNKNOWN_SLOT, - sizeof (slot_type)); - } - - } else { - (void) strncpy(slot_type, SANIBEL_UNKNOWN_SLOT, - sizeof (slot_type)); - } - - if ((rc = create_children(data->frup, node_name, - bus_addr, data->geo_addr, slot_type, - B_FALSE)) != PICL_SUCCESS) { - return (rc); - } - /* increment the geo_addr */ - data->geo_addr++; - } else { - di_devfs_path_free(devfs_path); - continue; - } - return (DI_WALK_CONTINUE); - } - return (DI_WALK_CONTINUE); -} - -static picl_errno_t -probe_scsi_in_libdevinfo(frutree_frunode_t *frup, cfga_list_data_t *cfgalist, - plist_t *list, int num_list, boolean_t compare_cfgadm) -{ - di_node_t rnode; - scsi_info_t *scsi_data = NULL; - - if (frup == NULL) { - return (PICL_FAILURE); - } - - rnode = di_init(frup->fru_path, DINFOCPYALL); - if (rnode == DI_NODE_NIL) { - return (PICL_FAILURE); - } - - scsi_data = (scsi_info_t *)malloc(sizeof (scsi_info_t)); - if (scsi_data == NULL) { - di_fini(rnode); - return (PICL_NOSPACE); - } - - scsi_data->frup = frup; - scsi_data->cfgalist = cfgalist; - scsi_data->list = list; - scsi_data->num_list = num_list; - scsi_data->compare_cfgadm = compare_cfgadm; - scsi_data->geo_addr = 0; - if (di_walk_node(rnode, DI_WALK_CLDFIRST, &scsi_data, - probe_disks) != 0) { - free(scsi_data); - di_fini(rnode); - return (PICL_FAILURE); - } - - free(scsi_data); - di_fini(rnode); - return (PICL_SUCCESS); -} - -picl_errno_t -probe_for_scsi_frus(frutree_frunode_t *frup) -{ - int numlist; - picl_errno_t rc; - plist_t list; - cfga_err_t ap_list_err; - cfga_list_data_t *cfgalist = NULL; - - if (frutree_connects_initiated == B_TRUE) { /* probing after hotswap */ - ap_list_err = config_list_ext(0, NULL, &cfgalist, - &numlist, NULL, NULL, NULL, CFGA_FLAG_LIST_ALL); - - if (ap_list_err != CFGA_OK) { - rc = probe_scsi_in_libdevinfo(frup, NULL, NULL, - 0, B_FALSE); - return (rc); - } - - /* get list of all controllers in the system */ - ap_list_err = populate_controllers_list(&list, cfgalist, - numlist); - if (ap_list_err != CFGA_OK) { - free_list(&list); - free(cfgalist); - rc = probe_scsi_in_libdevinfo(frup, NULL, NULL, - 0, B_FALSE); - return (rc); - } - - /* no controllers found */ - if (list.num_nodes <= 0) { - free_list(&list); - free(cfgalist); - rc = probe_scsi_in_libdevinfo(frup, NULL, NULL, - 0, B_FALSE); - return (rc); - } - /* - * we have to fetch cfgadm, look for scsi controllers - * dynamically - */ - (void) dyn_probe_for_scsi_frus(frup, cfgalist, &list, numlist); - rc = probe_scsi_in_libdevinfo(frup, cfgalist, &list, - numlist, B_TRUE); - free_list(&list); - free(cfgalist); - return (rc); - } else { - /* during initialization */ - /* use the cached cfgadm data */ - rc = cache_probe_for_scsi_frus(frup); - if (scsi_list && scsi_list->num_nodes > 0) { - rc = probe_scsi_in_libdevinfo(frup, cfglist, - scsi_list, nlist, B_TRUE); - } else { - rc = probe_scsi_in_libdevinfo(frup, NULL, - NULL, 0, B_FALSE); - } - return (rc); - } -} diff --git a/usr/src/cmd/picl/plugins/sun4u/snowbird/lib/Makefile b/usr/src/cmd/picl/plugins/sun4u/snowbird/lib/Makefile deleted file mode 100644 index 12d750d8f5..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/snowbird/lib/Makefile +++ /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, 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" -# -# cmd/picl/plugins/sun4u/snowbird/lib/Makefile -# - -SUBDIRS= libctsmc fruaccess .WAIT - -MSGSUBDIRS= libctsmc fruaccess .WAIT - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -.KEEP_STATE: - -all install clean clobber: $(SUBDIRS) - -_msg: $(MSGSUBDIRS) - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/snowbird/lib/fruaccess/Makefile b/usr/src/cmd/picl/plugins/sun4u/snowbird/lib/fruaccess/Makefile deleted file mode 100644 index 37d6b4c9fc..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/snowbird/lib/fruaccess/Makefile +++ /dev/null @@ -1,91 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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. -# -# cmd/picl/plugins/sun4u/snowbird/lib/fruaccess/Makefile -# - -LIBRARY= libfruaccess.a -VERS= .1 - -OBJECTS= libfruaccess.o piclsmc.o piclsdr.o piclfruaccess_platmod.o \ - crcutils.o crcmodel.o - -# include library definitions -include $(SRC)/lib/Makefile.lib -include $(SRC)/Makefile.psm -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Netra-CP2300 - -SRCS= libfruaccess.c piclsmc.c piclsdr.c piclfruaccess_platmod.c\ - ../../../lib/fruaccess/crcutils.c \ - ../../../lib/fruaccess/crcmodel.c - -SRCDIR= ../../../lib/fruaccess/. - -LIBS = $(DYNLIB) - -ROOTLIBDIR = $(ROOT_PLAT_LIBDIR) - - -CPPFLAGS += -I$(SRC)/uts/sun4u/sys -CPPFLAGS += -I$(SRC)/cmd/picl/plugins/sun4u/lib/fruaccess -CPPFLAGS += -I$(SRC)/lib/libfruutils -CPPFLAGS += -I$(SRC)/lib/libfru/include -CPPFLAGS += -I$(SRC)/cmd/picl/plugins/sun4u/snowbird/lib/libctsmc - -LDLIBS += -L$(SRC)/lib/libpicl/$(MACH) -L$(SRC)/lib/libpicltree/$(MACH) -LDLIBS += -L $(ROOT)/usr/platform/SUNW,Netra-CP2300/lib -LDLIBS += -L$(SRC)/cmd/picl/plugins/sun4u/snowbird/lib/libctsmc -LDLIBS += -R/usr/platform/sun4u/lib -LDLIBS += -R/usr/platform/SUNW,Netra-CP2300/lib -LDLIBS += -lc -lpicltree -lfruutils -lctsmc - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -all: $(LIBS) $(LIBLINKS) - -install:$(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) - -$(LIBLINKS): FRC - $(RM) $(LIBLINKS); $(SYMLINK) $(DYNLIB) $(LIBLINKS) - -_msg: - -# include library targets -include $(SRC)/cmd/picl/plugins/Makefile.targ -include $(SRC)/lib/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/snowbird/lib/fruaccess/fru_access_impl.h b/usr/src/cmd/picl/plugins/sun4u/snowbird/lib/fruaccess/fru_access_impl.h deleted file mode 100644 index 5934cdf88b..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/snowbird/lib/fruaccess/fru_access_impl.h +++ /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, 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 _FRU_ACCESS_IMPL_H -#define _FRU_ACCESS_IMPL_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "picldefs.h" -#include "libfru.h" -#include "fru_tag.h" -#include "fru_access.h" - -/* converts slot# to ipmb addr */ -#define IPMB_ADDR(_X) (((_X) < 10) ? (0xb0 + 2 * ((_X) - 1)) :\ - (0xb0 + 2 * (_X))) -#define MANR_TAG 0xF80010B7 /* ManR tag */ -#define SEG_NAME_LEN 2 - -#define MANR_TIME_LEN 4 -#define MANR_FRUDESCR_LEN 80 -#define MANR_MFRLOC_LEN 64 -#define MANR_PARTNUM_LEN 7 -#define MANR_SERIALNUM_LEN 6 -#define MANR_VENDORNAME_LEN 2 -#define MANR_DASHLVL_LEN 2 -#define MANR_REVLVL_LEN 2 -#define MANR_FRUNAME_LEN 16 - -#define NO_FRUDATA 0x0 -#define IPMI_FORMAT 0x1 -#define SUN_FORMAT 0x2 - -/* These are newly introduced #defines for Snowbird */ -#define INPUT_FILE "/dev/ctsmc" -#define NUM_OF_SECTIONS 2 -#define DYNAMIC_OFFSET 0x0 -#define STATIC_OFFSET 0x1800 -#define WRITE_SECTION 0 -#define DYNAMIC_LENGTH (6 * 1024); /* 6k bytes */ -#define STATIC_LENGTH (2 * 1024); /* 2k bytes */ -#define MANR_SIZE 183 /* MANR record size in bytes */ - -#define PICL_SLOT_CPCI "cpci" -#define PICL_SLOT_PCI "pci" -#define PICL_NODE_CHASSIS "chassis" -#define SD_SEGMENT_NAME "SD" -#define SD_SEGMENT_DESCRIPTOR 0x00004924 -#define SEGMENT_TRAILER_LEN 1 -#define SEGMENT_CHKSM_LEN 4 - -/* format structure */ -typedef struct { - int format; - int sun_lun; /* this info comes from SDR */ - int sun_device_id; /* this info comes from SDR */ - uint8_t src; - uint8_t dest; -} format_t; - -/* ManR payload structure */ -typedef struct { - char timestamp[MANR_TIME_LEN]; - char fru_descr[MANR_FRUDESCR_LEN]; - char manufacture_loc[MANR_MFRLOC_LEN]; - char sun_part_no[MANR_PARTNUM_LEN]; - char sun_serial_no[MANR_SERIALNUM_LEN]; - char vendor_name[MANR_VENDORNAME_LEN]; /* JEDEC CODE */ - char inital_hw_dash_lvl[MANR_DASHLVL_LEN]; - char inital_hw_rev_lvl[MANR_REVLVL_LEN]; - char fru_short_name[MANR_FRUNAME_LEN]; -} payload_t; -/* object types */ -typedef enum {CONTAINER_TYPE, SECTION_TYPE, SEGMENT_TYPE, PACKET_TYPE} object_t; - -#define TABLE_SIZE 64 /* hash table size */ - -/* section header */ -#define SECTION_HDR_TAG 0x08 -#define SECTION_HDR_VER 0x0001 -#define SECTION_HDR_LENGTH 0x06 -#define SECTION_HDR_CRC8 0x00 -#define SECTION_HDR_VER_BIT0 0x00 -#define SECTION_HDR_VER_BIT1 0x01 - -#define READ_ONLY_SECTION 1 /* section is read-only */ - -#define GET_SEGMENT_DESCRIPTOR \ - (seg_layout->descriptor[1]|seg_layout->descriptor[0] << 16) - -#define GET_SECTION_HDR_VERSION \ - (sec_hdr.headerversion[1]|sec_hdr.headerversion[0] << 8) - -/* Segment Trailer Tag */ -#define SEG_TRAILER_TAG 0x0C - -/* defines fixed segment */ -#define SEGMENT_FIXED 1 - -#define DEFAULT_FD -1 -#define DEFAULT_SEQN -1 -#define FRUACCESS_MSG_ID 11 - -typedef union { - uint32_t all_bits; - struct { - unsigned read_only : 1; - unsigned unused : 8; - unsigned : 8; - unsigned : 8; - unsigned : 7; - } field; -} sectdescbit_t; - -typedef struct { - sectdescbit_t description; - uint32_t address; /* for SEEPROMS this is the offset */ - uint32_t size; -} sectioninfo_t; - -typedef uint16_t headerrev_t; - -#define MAX_NUMOF_SECTION 2 - -typedef struct { - headerrev_t header_ver; - int num_sections; - sectioninfo_t section_info[MAX_NUMOF_SECTION]; -} container_info_t; - -/* section header layout */ -typedef struct { - uint8_t headertag; /* section header tag */ - uint8_t headerversion[2]; /* header version (msb) */ - uint8_t headerlength; /* header length */ - uint8_t headercrc8; /* crc8 */ - uint8_t segmentcount; /* total number of segment */ -} section_layout_t; - -/* segment header layout */ -typedef struct { - uint16_t name; /* segment name */ - uint16_t descriptor[2]; /* descriptor (msb) */ - uint16_t offset; /* segment data offset */ - uint16_t length; /* segment length */ -} segment_layout_t; - -/* segment information used in finding new offset for a new segment */ -typedef struct { - int segnum; /* segment number */ - int offset; /* segment offset */ - int length; /* segment length */ - int fixed; /* fixed or non-fixed segment */ -} seg_info_t; - -typedef uint64_t handle_t; - -struct hash_obj; - -/* packet hash object */ -typedef struct { - handle_t segment_hdl; /* segment handle */ - fru_tag_t tag; - int tag_size; - uint8_t *payload; - payload_t payload_data; /* reqd for ipmi format */ - uint32_t paylen; - uint32_t payload_offset; - struct hash_obj *next; -} packet_obj_t; - -/* segment hash object */ -typedef struct { - handle_t section_hdl; /* section handle */ - int num_of_packets; /* in a segment */ - int trailer_offset; - segment_t segment; - struct hash_obj *pkt_obj_list; /* packet object list */ - struct hash_obj *next; -} segment_obj_t; - -/* section hash object */ -typedef struct { - handle_t cont_hdl; /* container handle */ - section_t section; - int num_of_segment; /* in a section */ - struct hash_obj *seg_obj_list; /* points to segment objects list */ - struct hash_obj *next; -} section_obj_t; - -/* contianer hash object */ -typedef struct { - char device_pathname[PATH_MAX]; /* device name */ - int num_of_section; /* num of section in container */ - format_t format; - struct hash_obj *sec_obj_list; /* points to section objects list */ -} container_obj_t; - -/* hash object */ -typedef struct hash_obj { - int object_type; - handle_t obj_hdl; - union { - container_obj_t *cont_obj; - section_obj_t *sec_obj; - segment_obj_t *seg_obj; - packet_obj_t *pkt_obj; - } u; - struct hash_obj *next; - struct hash_obj *prev; -} hash_obj_t; - -extern unsigned char compute_crc8(unsigned char *bytes, int length); -extern long compute_crc32(unsigned char *bytes, int length); -extern long compute_checksum32(unsigned char *bytes, int length); - -#ifdef __cplusplus -} -#endif - -#endif /* _FRU_ACCESS_IMPL_H */ diff --git a/usr/src/cmd/picl/plugins/sun4u/snowbird/lib/fruaccess/libfruaccess.c b/usr/src/cmd/picl/plugins/sun4u/snowbird/lib/fruaccess/libfruaccess.c deleted file mode 100644 index 3a48dcbf5e..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/snowbird/lib/fruaccess/libfruaccess.c +++ /dev/null @@ -1,3438 +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 -#include -#include -#include -#include "smc_if.h" -#include "fru_access_impl.h" - -#pragma init(initialize_fruaccess) /* .init section */ - -/* - * This module translates all the frudata plugin requests into platform - * specific commands and provides information back to frudata plugin. - */ - -/* - * precedence for format. - * define an ENV variable (SUNW_FRUACCESS_IPMI_PRECEDENCE) to make - * ipmi format has more precedence than sun format. - */ -static int precedence = SUN_FORMAT; /* by default */ -#define FRUACCESS_PRECEDENCE "SUNW_FRUACCESS_IPMI_PRECEDENCE" - -extern ssize_t pread_new(int, void *, size_t, off_t, format_t *); -extern ssize_t pwrite_new(int, const void *, size_t, off_t, format_t *); -extern int get_manr(format_t *, payload_t *); -extern int is_fru_data_available(int, int, format_t *); -extern picl_errno_t fruaccess_platmod_init_format(uint8_t, format_t *); -extern int fruaccess_platmod_check_chassis(); -extern int fruaccess_platmod_check_fru(picl_nodehdl_t parenth); - -static container_hdl_t sun_fru_open_container(picl_nodehdl_t); -static int sun_fru_close_container(container_hdl_t); -static int sun_fru_get_num_sections(container_hdl_t, door_cred_t *); -static int sun_fru_get_sections(container_hdl_t, section_t *, - int, door_cred_t *); -static int sun_fru_get_num_segments(section_hdl_t, door_cred_t *); -static int sun_fru_get_segments(section_hdl_t, segment_t *, - int, door_cred_t *); -static int sun_fru_add_segment(section_hdl_t, segment_t *, - section_hdl_t *, door_cred_t *); -static int sun_fru_delete_segment(segment_hdl_t, section_hdl_t *, - door_cred_t *); -static ssize_t sun_fru_read_segment(segment_hdl_t, void *, size_t, - door_cred_t *); -static int sun_fru_write_segment(segment_hdl_t, const void *, size_t, - segment_hdl_t *, door_cred_t *); -static int sun_fru_get_num_packets(segment_hdl_t, door_cred_t *); -static int sun_fru_get_packets(segment_hdl_t, packet_t *, - int, door_cred_t *); -static ssize_t sun_fru_get_payload(packet_hdl_t, void *, size_t, - door_cred_t *); -static int sun_fru_update_payload(packet_hdl_t, const void *, size_t, - packet_hdl_t *, door_cred_t *); -static int sun_fru_append_packet(segment_hdl_t, packet_t *, - const void *, size_t, segment_hdl_t *, - door_cred_t *); -static int sun_fru_delete_packet(packet_hdl_t, segment_hdl_t *, door_cred_t *); - -static container_hdl_t ipmi_fru_open_container(picl_nodehdl_t); -static int ipmi_fru_close_container(container_hdl_t); -static int ipmi_fru_get_num_sections(container_hdl_t, door_cred_t *); -static int ipmi_fru_get_sections(container_hdl_t, section_t *, - int, door_cred_t *); -static int ipmi_fru_get_num_segments(section_hdl_t, door_cred_t *); -static int ipmi_fru_get_segments(section_hdl_t, segment_t *, - int, door_cred_t *); -static int ipmi_fru_add_segment(section_hdl_t, segment_t *, - section_hdl_t *, door_cred_t *); -static int ipmi_fru_delete_segment(segment_hdl_t, section_hdl_t *, - door_cred_t *); -static ssize_t ipmi_fru_read_segment(segment_hdl_t, void *, size_t, - door_cred_t *); -static int ipmi_fru_write_segment(segment_hdl_t, const void *, size_t, - segment_hdl_t *, door_cred_t *); -static int ipmi_fru_get_num_packets(segment_hdl_t, door_cred_t *); -static int ipmi_fru_get_packets(segment_hdl_t, packet_t *, - int, door_cred_t *); -static ssize_t ipmi_fru_get_payload(packet_hdl_t, void *, size_t, - door_cred_t *); -static int ipmi_fru_update_payload(packet_hdl_t, const void *, size_t, - packet_hdl_t *, door_cred_t *); -static int ipmi_fru_append_packet(segment_hdl_t, packet_t *, - const void *, size_t, segment_hdl_t *, - door_cred_t *); -static int ipmi_fru_delete_packet(packet_hdl_t, segment_hdl_t *, door_cred_t *); - -typedef struct { - container_hdl_t (* open_container)(picl_nodehdl_t); - int (* close_container)(container_hdl_t); - int (* get_num_sections)(container_hdl_t, door_cred_t *); - int (* get_sections)(container_hdl_t, section_t *, - int, door_cred_t *); - int (* get_num_segments)(section_hdl_t, door_cred_t *); - int (* get_segments)(section_hdl_t, segment_t *, - int, door_cred_t *); - int (* add_segment)(section_hdl_t, segment_t *, - section_hdl_t *, door_cred_t *); - int (* delete_segment)(segment_hdl_t, section_hdl_t *, - door_cred_t *); - ssize_t (* read_segment)(segment_hdl_t, void *, size_t, - door_cred_t *); - int (* write_segment)(segment_hdl_t, const void *, size_t, - segment_hdl_t *, door_cred_t *); - int (* get_num_packets)(segment_hdl_t, door_cred_t *); - int (* get_packets)(segment_hdl_t, packet_t *, - int, door_cred_t *); - ssize_t (* get_payload)(packet_hdl_t, void *, size_t, - door_cred_t *); - int (* update_payload)(packet_hdl_t, const void *, size_t, - packet_hdl_t *, door_cred_t *); - int (* append_packet)(segment_hdl_t, packet_t *, - const void *, size_t, segment_hdl_t *, - door_cred_t *); - int (* delete_packet)(packet_hdl_t, segment_hdl_t *, door_cred_t *); -} fruaccess_func_ptrs_t; - -static fruaccess_func_ptrs_t fruaccess_func[2] = { - { - ipmi_fru_open_container, - ipmi_fru_close_container, - ipmi_fru_get_num_sections, - ipmi_fru_get_sections, - ipmi_fru_get_num_segments, - ipmi_fru_get_segments, - ipmi_fru_add_segment, - ipmi_fru_delete_segment, - ipmi_fru_read_segment, - ipmi_fru_write_segment, - ipmi_fru_get_num_packets, - ipmi_fru_get_packets, - ipmi_fru_get_payload, - ipmi_fru_update_payload, - ipmi_fru_append_packet, - ipmi_fru_delete_packet, - }, - { - sun_fru_open_container, - sun_fru_close_container, - sun_fru_get_num_sections, - sun_fru_get_sections, - sun_fru_get_num_segments, - sun_fru_get_segments, - sun_fru_add_segment, - sun_fru_delete_segment, - sun_fru_read_segment, - sun_fru_write_segment, - sun_fru_get_num_packets, - sun_fru_get_packets, - sun_fru_get_payload, - sun_fru_update_payload, - sun_fru_append_packet, - sun_fru_delete_packet, - }, - }; - -static int is_valid_chassis = -1; -static hash_obj_t *hash_table[TABLE_SIZE]; - -static void -initialize_fruaccess(void) -{ - int count; - for (count = 0; count < TABLE_SIZE; count++) { - hash_table[count] = NULL; - } - - /* check if ipmi format has precedence */ - if (getenv(FRUACCESS_PRECEDENCE)) { - precedence = IPMI_FORMAT; - } -} - -/* called to lookup hash object for specified handle in the hash table. */ -static hash_obj_t * -lookup_handle_object(handle_t handle, int object_type) -{ - handle_t index_to_hash; - hash_obj_t *first_hash_obj; - hash_obj_t *next_hash_obj; - - index_to_hash = (handle % TABLE_SIZE); - - first_hash_obj = hash_table[index_to_hash]; - for (next_hash_obj = first_hash_obj; next_hash_obj != NULL; - next_hash_obj = next_hash_obj->next) { - if ((handle == next_hash_obj->obj_hdl) && - (object_type == next_hash_obj->object_type)) { - return (next_hash_obj); - } - } - return (NULL); -} - -/* called to allocate container hash object */ -static hash_obj_t * -create_container_hash_object(void) -{ - hash_obj_t *hash_obj; - container_obj_t *cont_obj; - - cont_obj = malloc(sizeof (container_obj_t)); - if (cont_obj == NULL) { - return (NULL); - } - - hash_obj = malloc(sizeof (hash_obj_t)); - if (hash_obj == NULL) { - free(cont_obj); - return (NULL); - } - - cont_obj->sec_obj_list = NULL; - - hash_obj->object_type = CONTAINER_TYPE; - hash_obj->u.cont_obj = cont_obj; - hash_obj->next = NULL; - hash_obj->prev = NULL; - - return (hash_obj); -} - -/* called to allocate section hash object */ -static hash_obj_t * -create_section_hash_object(void) -{ - hash_obj_t *hash_obj; - section_obj_t *sec_obj; - - sec_obj = malloc(sizeof (section_obj_t)); - if (sec_obj == NULL) { - return (NULL); - } - - hash_obj = malloc(sizeof (hash_obj_t)); - if (hash_obj == NULL) { - free(sec_obj); - return (NULL); - } - - sec_obj->next = NULL; - sec_obj->seg_obj_list = NULL; - - hash_obj->u.sec_obj = sec_obj; - hash_obj->object_type = SECTION_TYPE; - hash_obj->next = NULL; - hash_obj->prev = NULL; - - return (hash_obj); -} - -/* called to allocate segment hash object */ -static hash_obj_t * -create_segment_hash_object(void) -{ - hash_obj_t *hash_obj; - segment_obj_t *seg_obj; - - seg_obj = malloc(sizeof (segment_obj_t)); - if (seg_obj == NULL) { - return (NULL); - } - - hash_obj = malloc(sizeof (hash_obj_t)); - if (hash_obj == NULL) { - free(seg_obj); - return (NULL); - } - - seg_obj->next = NULL; - seg_obj->pkt_obj_list = NULL; - - hash_obj->object_type = SEGMENT_TYPE; - hash_obj->u.seg_obj = seg_obj; - hash_obj->next = NULL; - hash_obj->prev = NULL; - - return (hash_obj); -} - -/* called to allocate packet hash object */ -static hash_obj_t * -create_packet_hash_object(void) -{ - hash_obj_t *hash_obj; - packet_obj_t *pkt_obj; - - pkt_obj = malloc(sizeof (packet_obj_t)); - if (pkt_obj == NULL) { - return (NULL); - } - - hash_obj = malloc(sizeof (hash_obj_t)); - if (hash_obj == NULL) { - free(pkt_obj); - return (NULL); - } - - pkt_obj->next = NULL; - - hash_obj->object_type = PACKET_TYPE; - hash_obj->u.pkt_obj = pkt_obj; - hash_obj->next = NULL; - hash_obj->prev = NULL; - - return (hash_obj); -} - -/* called to add allocated hash object into the hash table */ -static void -add_hashobject_to_hashtable(hash_obj_t *hash_obj, int object_type) -{ - handle_t index_to_hash; - static uint64_t handle_count = 0; - - if (object_type != CONTAINER_TYPE) { - hash_obj->obj_hdl = ++handle_count; - } - - /* where to add ? */ - index_to_hash = ((hash_obj->obj_hdl) % TABLE_SIZE); - - hash_obj->next = hash_table[index_to_hash]; - hash_table[index_to_hash] = hash_obj; /* hash obj. added */ - - if (hash_obj->next != NULL) { - hash_obj->next->prev = hash_obj; - } -} - -/* called to add section object list into the section list */ -static void -add_to_sec_object_list(hash_obj_t *parent_obj, hash_obj_t *child_obj) -{ - hash_obj_t *next_hash; - - child_obj->u.sec_obj->cont_hdl = parent_obj->obj_hdl; - if (parent_obj->u.cont_obj->sec_obj_list == NULL) { - parent_obj->u.cont_obj->sec_obj_list = child_obj; - return; - } - - for (next_hash = parent_obj->u.cont_obj->sec_obj_list; - next_hash->u.sec_obj->next != NULL; - next_hash = next_hash->u.sec_obj->next) { - ; - } - - next_hash->u.sec_obj->next = child_obj; -} - -/* called to add segment object list into segment list */ -static void -add_to_seg_object_list(hash_obj_t *parent_obj, hash_obj_t *child_obj) -{ - hash_obj_t *next_hash; - - child_obj->u.seg_obj->section_hdl = parent_obj->obj_hdl; - if (parent_obj->u.sec_obj->seg_obj_list == NULL) { - parent_obj->u.sec_obj->seg_obj_list = child_obj; - return; - } - - for (next_hash = parent_obj->u.sec_obj->seg_obj_list; - next_hash->u.seg_obj->next != NULL; - next_hash = next_hash->u.seg_obj->next) { - ; - } - - next_hash->u.seg_obj->next = child_obj; -} - -/* called to add packet object list into packet list */ -static void -add_to_pkt_object_list(hash_obj_t *parent_obj, hash_obj_t *child_obj) -{ - hash_obj_t *next_hash; - - /* add the packet object in the end of list */ - child_obj->u.pkt_obj->segment_hdl = parent_obj->obj_hdl; - - if (parent_obj->u.seg_obj->pkt_obj_list == NULL) { - parent_obj->u.seg_obj->pkt_obj_list = child_obj; - return; - } - - for (next_hash = parent_obj->u.seg_obj->pkt_obj_list; - next_hash->u.pkt_obj->next != NULL; - next_hash = next_hash->u.pkt_obj->next) { - ; - } - - next_hash->u.pkt_obj->next = child_obj; -} - -/* fill the information, payload in the conatiner */ -/*ARGSUSED*/ -static int -initialize_ipmi_container(picl_nodehdl_t fru, hash_obj_t *cont_hash_obj) -{ - payload_t manr; - hash_obj_t *seg_hash_obj, *sec_hash_obj, *pkt_hash_obj; - format_t format; - - format = cont_hash_obj->u.cont_obj->format; - /* plug to SMC driver to fetch the data */ - if (get_manr(&format, &manr) != 0) { - return (-1); - } - - cont_hash_obj->u.cont_obj->num_of_section = 1; - cont_hash_obj->u.cont_obj->sec_obj_list = NULL; - - sec_hash_obj = create_section_hash_object(); - if (sec_hash_obj == NULL) { - return (-1); - } - - add_hashobject_to_hashtable(sec_hash_obj, SECTION_TYPE); - - /* create fake section info here */ - sec_hash_obj->u.sec_obj->num_of_segment = 1; - sec_hash_obj->u.sec_obj->section.handle = sec_hash_obj->obj_hdl; - sec_hash_obj->u.sec_obj->section.offset = 0; - sec_hash_obj->u.sec_obj->section.protection = READ_ONLY_SECTION; - - sec_hash_obj->u.sec_obj->section.length = STATIC_LENGTH; - sec_hash_obj->u.sec_obj->section.version = SECTION_HDR_VER; - add_to_sec_object_list(cont_hash_obj, sec_hash_obj); - - seg_hash_obj = create_segment_hash_object(); - if (seg_hash_obj == NULL) { - return (-1); - } - - add_hashobject_to_hashtable(seg_hash_obj, SEGMENT_TYPE); - - seg_hash_obj->u.seg_obj->num_of_packets = 1; - seg_hash_obj->u.seg_obj->segment.handle = seg_hash_obj->obj_hdl; - (void) strncpy(seg_hash_obj->u.seg_obj->segment.name, - SD_SEGMENT_NAME, - sizeof (seg_hash_obj->u.seg_obj->segment.name)); - seg_hash_obj->u.seg_obj->segment.descriptor = SD_SEGMENT_DESCRIPTOR; - /* tag + payload */ - seg_hash_obj->u.seg_obj->segment.length = MANR_SIZE + - SEGMENT_TRAILER_LEN + SEGMENT_CHKSM_LEN; - add_to_seg_object_list(sec_hash_obj, seg_hash_obj); - - pkt_hash_obj = create_packet_hash_object(); - if (pkt_hash_obj == NULL) { - return (-1); - } - add_hashobject_to_hashtable(pkt_hash_obj, PACKET_TYPE); - - pkt_hash_obj->u.pkt_obj->payload_data = manr; - if (mk_tag(FRU_F, 0x001, 0x0B7, &pkt_hash_obj->u.pkt_obj->tag) == 4) { - add_to_pkt_object_list(seg_hash_obj, pkt_hash_obj); - } - return (0); -} - -/* Look up the container_hdl in the PICL tree. */ -static container_hdl_t -ipmi_fru_open_container(picl_nodehdl_t fruh) -{ - int err; - hash_obj_t *cont_hash_obj; - - err = ptree_get_propval_by_name(fruh, PICL_PROP_FRUDATA_AVAIL, - NULL, NULL); - if (err != PICL_SUCCESS) { - return (0); - } - - cont_hash_obj = lookup_handle_object((handle_t)fruh, CONTAINER_TYPE); - if (cont_hash_obj == NULL) { - return (0); - } - - /* initialize the container */ - if (initialize_ipmi_container(fruh, cont_hash_obj) != 0) { - return (0); - } - return (cont_hash_obj->obj_hdl); -} - -/*ARGSUSED*/ -static int -ipmi_fru_get_num_sections(container_hdl_t container, door_cred_t *cred) -{ - hash_obj_t *cont_hash_obj; - - cont_hash_obj = lookup_handle_object((handle_t)container, - CONTAINER_TYPE); - if (cont_hash_obj == NULL) { - return (-1); - } - return (cont_hash_obj->u.cont_obj->num_of_section); -} - -/*ARGSUSED*/ -static int -ipmi_fru_get_sections(container_hdl_t container, section_t *section, - int max_sections, door_cred_t *cred) -{ - int count; - hash_obj_t *cont_object; - hash_obj_t *sec_hash; - - cont_object = lookup_handle_object((handle_t)container, - CONTAINER_TYPE); - if (cont_object == NULL) { - return (-1); - } - - if (cont_object->u.cont_obj->num_of_section > max_sections) { - return (-1); - } - sec_hash = cont_object->u.cont_obj->sec_obj_list; - - for (count = 0; count < cont_object->u.cont_obj->num_of_section && - sec_hash != NULL; count++, section++) { - /* populate section_t */ - section->handle = sec_hash->u.sec_obj->section.handle; - section->offset = sec_hash->u.sec_obj->section.offset; - section->length = sec_hash->u.sec_obj->section.length; - section->protection = sec_hash->u.sec_obj->section.protection; - section->version = sec_hash->u.sec_obj->section.version; - sec_hash = sec_hash->u.sec_obj->next; - } - return (count); -} - -/*ARGSUSED*/ -static int -ipmi_fru_get_num_segments(section_hdl_t section, door_cred_t *cred) -{ - hash_obj_t *sec_object; - - sec_object = lookup_handle_object((handle_t)section, SECTION_TYPE); - if (sec_object == NULL) { - return (-1); - } - return (sec_object->u.sec_obj->num_of_segment); -} - -/*ARGSUSED*/ -static int -ipmi_fru_get_segments(section_hdl_t section, segment_t *segment, - int max_segments, door_cred_t *cred) -{ - int count; - hash_obj_t *seg_hash; - hash_obj_t *sec_object; - - sec_object = lookup_handle_object((handle_t)section, SECTION_TYPE); - if (sec_object == NULL) { - return (-1); - } - - if (sec_object->u.sec_obj->num_of_segment > max_segments) { - return (-1); - } - - seg_hash = sec_object->u.sec_obj->seg_obj_list; - - for (count = 0; count < sec_object->u.sec_obj->num_of_segment && - seg_hash != NULL; count++, segment++) { - /* populate the segment info */ - segment->handle = seg_hash->u.seg_obj->segment.handle; - (void) memcpy(segment->name, seg_hash->u.seg_obj->segment.name, - SEG_NAME_LEN); - segment->descriptor = seg_hash->u.seg_obj->segment.descriptor; - segment->offset = seg_hash->u.seg_obj->segment.offset; - segment->length = seg_hash->u.seg_obj->segment.length; - seg_hash = seg_hash->u.seg_obj->next; - } - return (count); -} - -/*ARGSUSED*/ -static int -ipmi_fru_get_num_packets(segment_hdl_t segment, door_cred_t *cred) -{ - hash_obj_t *seg_object; - - seg_object = lookup_handle_object((handle_t)segment, SEGMENT_TYPE); - if (seg_object == NULL) { - return (-1); - } - return (seg_object->u.seg_obj->num_of_packets); -} - -/*ARGSUSED*/ -static int -ipmi_fru_get_packets(segment_hdl_t segment, packet_t *packet, - int max_packets, door_cred_t *cred) -{ - int count; - hash_obj_t *pkt_hash; - hash_obj_t *seg_object; - - seg_object = lookup_handle_object((handle_t)segment, SEGMENT_TYPE); - if (seg_object == NULL) { - return (-1); - } - - if (seg_object->u.seg_obj->num_of_packets > max_packets) { - return (-1); - } - - pkt_hash = seg_object->u.seg_obj->pkt_obj_list; - - for (count = 0; count < seg_object->u.seg_obj->num_of_packets && - pkt_hash != NULL; count++, packet++) { - /* populate the segment info */ - packet->handle = pkt_hash->obj_hdl; - (void) memcpy(&packet->tag, &pkt_hash->u.pkt_obj->tag, 4); - pkt_hash = pkt_hash->u.pkt_obj->next; - } - - return (count); -} - -/*ARGSUSED*/ -static ssize_t -ipmi_fru_read_segment(segment_hdl_t segment, void *buffer, size_t nbytes, - door_cred_t *cred) -{ - hash_obj_t *seg_hash; - hash_obj_t *pkt_hash; - - /* segment hash object */ - seg_hash = lookup_handle_object(segment, SEGMENT_TYPE); - if (seg_hash == NULL) { - return (-1); - } - - if (seg_hash->u.seg_obj->segment.length < nbytes) { - return (-1); - } - - pkt_hash = seg_hash->u.seg_obj->pkt_obj_list; - - if (pkt_hash == NULL) { - return (-1); - } - - (void) memcpy(buffer, &pkt_hash->u.pkt_obj->payload_data, - sizeof (payload_t)); - return (nbytes); -} - -/*ARGSUSED*/ -static ssize_t -ipmi_fru_get_payload(packet_hdl_t packet, void *buffer, size_t nbytes, - door_cred_t *cred) -{ - hash_obj_t *packet_hash_obj; - - /* size = size of ManR */ - if (nbytes != MANR_SIZE) { - return (-1); - } - - /* packet hash object */ - packet_hash_obj = lookup_handle_object(packet, PACKET_TYPE); - if (packet_hash_obj == NULL) { - return (-1); - } - - (void) memcpy(buffer, &(packet_hash_obj->u.pkt_obj->payload_data), - MANR_SIZE); - return (nbytes); -} - -/*ARGSUSED*/ -static int -ipmi_fru_add_segment(section_hdl_t section, segment_t *segment, - section_hdl_t *newsection, door_cred_t *cred) -{ - errno = ENOTSUP; - return (-1); -} - -/*ARGSUSED*/ -static int -ipmi_fru_delete_segment(segment_hdl_t segment, - section_hdl_t *newsection, door_cred_t *cred) -{ - errno = ENOTSUP; - return (-1); -} - - -/*ARGSUSED*/ -static ssize_t -ipmi_fru_write_segment(segment_hdl_t segment, const void *data, - size_t nbytes, segment_hdl_t *newsegment, door_cred_t *cred) -{ - errno = ENOTSUP; - return (-1); -} - -/*ARGSUSED*/ -static int -ipmi_fru_update_payload(packet_hdl_t packet, const void *data, - size_t nbytes, packet_hdl_t *newpacket, door_cred_t *cred) -{ - errno = ENOTSUP; - return (-1); -} - -/*ARGSUSED*/ -static int -ipmi_fru_append_packet(segment_hdl_t segment, packet_t *packet, - const void *payload, size_t nbytes, segment_hdl_t *newsegment, - door_cred_t *cred) -{ - errno = ENOTSUP; - return (-1); -} - -/*ARGSUSED*/ -static int -ipmi_fru_delete_packet(packet_hdl_t packet, - segment_hdl_t *newsegment, door_cred_t *cred) -{ - errno = ENOTSUP; - return (-1); -} - -static void -free_pkt_object_list(hash_obj_t *hash_obj) -{ - hash_obj_t *next_obj; - hash_obj_t *free_obj; - - next_obj = hash_obj->u.seg_obj->pkt_obj_list; - while (next_obj != NULL) { - free_obj = next_obj; - next_obj = next_obj->u.pkt_obj->next; - /* if prev is NULL it's the first object in the list */ - if (free_obj->prev == NULL) { - hash_table[(free_obj->obj_hdl % TABLE_SIZE)] = - free_obj->next; - if (free_obj->next != NULL) { - free_obj->next->prev = free_obj->prev; - } - } else { - free_obj->prev->next = free_obj->next; - if (free_obj->next != NULL) { - free_obj->next->prev = free_obj->prev; - } - } - - free(free_obj->u.pkt_obj); - free(free_obj); - } - - hash_obj->u.seg_obj->pkt_obj_list = NULL; -} - -static void -free_segment_hash(handle_t handle, hash_obj_t *sec_hash) -{ - hash_obj_t *seg_hash; - hash_obj_t *next_hash; - - seg_hash = sec_hash->u.sec_obj->seg_obj_list; - if (seg_hash == NULL) { - return; - } - - if (seg_hash->obj_hdl == handle) { - sec_hash->u.sec_obj->seg_obj_list = seg_hash->u.seg_obj->next; - } else { - while (seg_hash->obj_hdl != handle) { - next_hash = seg_hash; - seg_hash = seg_hash->u.seg_obj->next; - if (seg_hash == NULL) { - return; - } - } - next_hash->u.seg_obj->next = seg_hash->u.seg_obj->next; - } - - if (seg_hash->prev == NULL) { - hash_table[(seg_hash->obj_hdl % TABLE_SIZE)] = seg_hash->next; - if (seg_hash->next != NULL) { - seg_hash->next->prev = NULL; - } - } else { - seg_hash->prev->next = seg_hash->next; - if (seg_hash->next != NULL) { - seg_hash->next->prev = seg_hash->prev; - } - } - - free_pkt_object_list(seg_hash); - free(seg_hash->u.seg_obj); - free(seg_hash); -} - -static int -ipmi_fru_close_container(container_hdl_t container) -{ - hash_obj_t *hash_obj; - hash_obj_t *prev_hash; - hash_obj_t *sec_hash_obj; - handle_t obj_hdl; - - /* lookup for container hash object */ - hash_obj = lookup_handle_object(container, CONTAINER_TYPE); - if (hash_obj == NULL) { - return (0); - } - - /* points to section object list */ - sec_hash_obj = hash_obj->u.cont_obj->sec_obj_list; - - /* traverse section object list */ - while (sec_hash_obj != NULL) { - - /* traverse segment hash object in the section */ - while (sec_hash_obj->u.sec_obj->seg_obj_list != NULL) { - /* object handle of the segment hash object */ - obj_hdl = - sec_hash_obj->u.sec_obj->seg_obj_list->obj_hdl; - free_segment_hash(obj_hdl, sec_hash_obj); - } - - /* going to free section hash object, relink the hash object */ - if (sec_hash_obj->prev == NULL) { - hash_table[(sec_hash_obj->obj_hdl % TABLE_SIZE)] - = sec_hash_obj->next; - if (sec_hash_obj->next != NULL) { - sec_hash_obj->next->prev = NULL; - } - } else { - sec_hash_obj->prev->next = sec_hash_obj->next; - if (sec_hash_obj->next != NULL) { - sec_hash_obj->next->prev = sec_hash_obj->prev; - } - } - - free(sec_hash_obj->u.sec_obj); /* free section hash object */ - - prev_hash = sec_hash_obj; - - sec_hash_obj = sec_hash_obj->u.sec_obj->next; - - free(prev_hash); /* free section hash */ - } - - /* free container hash object */ - if (hash_obj->prev == NULL) { - hash_table[(sec_hash_obj->obj_hdl % TABLE_SIZE)] = - hash_obj->next; - if (hash_obj->next != NULL) { - hash_obj->next->prev = NULL; - } - } else { - hash_obj->prev->next = hash_obj->next; - if (hash_obj->next != NULL) { - hash_obj->next->prev = hash_obj->prev; - } - } - - free(hash_obj->u.cont_obj); - free(hash_obj); - return (0); -} - -/* opens the binary file and returns the file descriptor */ -static int -open_file() -{ - int fd; - - if ((fd = open(INPUT_FILE, O_RDWR)) == -1) { - return (-1); - } - return (fd); -} - -static void -copy_segment_layout(segment_t *seghdr, void *layout) -{ - segment_layout_t *seg_layout; - - seg_layout = (segment_layout_t *)layout; - (void) memcpy(seghdr->name, &seg_layout->name, SEG_NAME_LEN); - seghdr->descriptor = GET_SEGMENT_DESCRIPTOR; - seghdr->offset = seg_layout->offset; - seghdr->length = seg_layout->length; -} - -static hash_obj_t * -get_container_hash_object(int object_type, handle_t handle) -{ - hash_obj_t *hash_obj; - - switch (object_type) { - case CONTAINER_TYPE : - break; - - case SECTION_TYPE : - hash_obj = lookup_handle_object(handle, CONTAINER_TYPE); - if (hash_obj == NULL) { - return (NULL); - } - break; - case SEGMENT_TYPE : - hash_obj = lookup_handle_object(handle, SECTION_TYPE); - if (hash_obj == NULL) { - return (NULL); - } - hash_obj = lookup_handle_object(hash_obj->u.sec_obj->cont_hdl, - CONTAINER_TYPE); - break; - case PACKET_TYPE : - - hash_obj = lookup_handle_object(handle, SEGMENT_TYPE); - if (hash_obj == NULL) { - return (NULL); - } - hash_obj = lookup_handle_object( - hash_obj->u.seg_obj->section_hdl, SECTION_TYPE); - if (hash_obj == NULL) { - return (NULL); - } - hash_obj = lookup_handle_object(hash_obj->u.sec_obj->cont_hdl, - CONTAINER_TYPE); - break; - default : - return (NULL); - } - return (hash_obj); -} - -static void -sort_offsettbl(int segcnt, seg_info_t *offset_tbl) -{ - int cntx; - int cnty; - seg_info_t tmp; - - for (cntx = 0; cntx < segcnt+2; cntx++) { - for (cnty = cntx+1; cnty < segcnt + 2; cnty++) { - if (offset_tbl[cntx].offset > - offset_tbl[cnty].offset) { - (void) memcpy(&tmp, &offset_tbl[cnty], - sizeof (seg_info_t)); - (void) memcpy(&offset_tbl[cnty], - &offset_tbl[cntx], - sizeof (seg_info_t)); - - (void) memcpy(&offset_tbl[cntx], &tmp, - sizeof (seg_info_t)); - } - } - } -} - -/* - * Description : move_segment_data() reads the segment data and writes it - * back to the new segment offset. - */ - -static void -move_segment_data(void *seghdr, int newoffset, container_hdl_t contfd) -{ - int ret; - char *buffer; - segment_layout_t *segment; - format_t format; - hash_obj_t *cont_hash; - - segment = (segment_layout_t *)seghdr; - - buffer = alloca(segment->length); - if (buffer == NULL) { - return; - } - - cont_hash = lookup_handle_object((handle_t)contfd, CONTAINER_TYPE); - if (cont_hash == NULL) { - return; - } - - format = cont_hash->u.cont_obj->format; - - ret = pread_new(contfd, buffer, - segment->length, segment->offset, &format); - if (ret != segment->length) { - return; - } - - segment->offset = newoffset; - - ret = pwrite_new(contfd, buffer, segment->length, segment->offset, - &format); - if (ret != segment->length) { - return; - } -} - -/* - * Description : pack_segment_data() moves the segment data if there is - * a hole between two segments. - */ - -static void -pack_segment_data(char *seghdr, int segcnt, container_hdl_t contfd, - seg_info_t *offset_tbl) -{ - int cnt; - int diff; - int newoffset; - - for (cnt = segcnt + 1; cnt > 0; cnt--) { - if (!offset_tbl[cnt - 1].fixed) { - if (offset_tbl[cnt].offset - - (offset_tbl[cnt -1 ].offset - + offset_tbl[cnt - 1].length) > 0) { - - diff = offset_tbl[cnt].offset - - (offset_tbl[cnt - 1].offset - + offset_tbl[cnt - 1].length); - newoffset = offset_tbl[cnt - 1].offset - + diff; - - move_segment_data(seghdr, newoffset, - contfd); - - offset_tbl[cnt - 1].offset = newoffset; - - sort_offsettbl(segcnt, offset_tbl); - } - } - } -} - -/* - * Description : build_offset_tbl() builds the offset table by reading all the - * segment header. it makes two more entry into the table one for - * section size and another with start of the section after the - * segment header. - */ - -static int -build_offset_tbl(void *seghdr, int segcnt, int secsize, - seg_info_t *offset_tbl) -{ - int cnt; - fru_segdesc_t segdesc; - segment_layout_t *segment; - - for (cnt = 0; cnt < segcnt; cnt++) { - segment = (segment_layout_t *)(seghdr) + cnt; - - (void) memcpy(&segdesc, &segment->descriptor, - sizeof (uint32_t)); - offset_tbl[cnt].segnum = cnt; - offset_tbl[cnt].offset = segment->offset; - offset_tbl[cnt].length = segment->length; - offset_tbl[cnt].fixed = segdesc.field.fixed; - } - - /* upper boundary of segment area (lower address bytes) */ - offset_tbl[cnt].segnum = -1; - offset_tbl[cnt].offset = sizeof (section_layout_t) + ((cnt + 1) - * sizeof (segment_layout_t)); - - offset_tbl[cnt].length = 0; - offset_tbl[cnt].fixed = 1; - /* lower boundary of segment area (higher address bytes) */ - - offset_tbl[cnt+1].segnum = -1; - offset_tbl[cnt+1].offset = secsize; - offset_tbl[cnt+1].length = 0; - offset_tbl[cnt+1].fixed = 1; - return (0); -} - -static int -hole_discovery(int bytes, int segcnt, int *totsize, seg_info_t *offset_tbl) -{ - int cnt = 0; - - *totsize = 0; - for (cnt = segcnt + 1; cnt > 0; cnt--) { - if (bytes <= offset_tbl[cnt].offset - - (offset_tbl[cnt - 1].offset + - offset_tbl[cnt - 1].length)) { - return (offset_tbl[cnt].offset - bytes); - } - - *totsize += offset_tbl[cnt].offset - - (offset_tbl[cnt - 1].offset + - offset_tbl[cnt - 1].length); - } - return (0); -} - - -/* - * Description : segment_hdr_present() verify space for new segment header to - * be added. - */ - -static int -segment_hdr_present(int segoffset, int size, seg_info_t *offset_tbl) -{ - if ((segoffset + size) <= offset_tbl[0].offset) - return (0); - else - return (-1); -} - -/* - * Description : find_offset() is called from fru_add_segment routine to find - * a valid offset. - */ - -static int -find_offset(char *seghdr, int segcnt, int secsize, int *sectionoffset, - int segsize, int fix, container_hdl_t contfd) -{ - int ret; - int newoffset; - int totsize = 0; - seg_info_t *offset_tbl; - - if (segcnt == 0) { - if (!fix) { /* if not fixed segment */ - *sectionoffset = secsize - segsize; - } - return (0); - } - - /* - * two extra segment info structure are allocated for start of segment - * and other end of segment. first segment offset is first available - * space and length is 0. second segment offset is is segment length and - * offset is 0. build_offset_tbl() explains how upper boundary and lower - * boudary segment area are initialized in seg_info_t table. - */ - - offset_tbl = malloc((segcnt + 2) * sizeof (seg_info_t)); - if (offset_tbl == NULL) { - return (-1); - } - - /* read all the segment header to make offset table */ - ret = build_offset_tbl(seghdr, segcnt, secsize, offset_tbl); - if (ret != 0) { - free(offset_tbl); - return (-1); - } - - /* sort the table */ - sort_offsettbl(segcnt, offset_tbl); - - /* new segment header offset */ - newoffset = sizeof (section_layout_t) + segcnt * - sizeof (segment_layout_t); - - /* do? new segment header overlap any existing data */ - ret = segment_hdr_present(newoffset, sizeof (segment_layout_t), - offset_tbl); - if (ret != 0) { /* make room for new segment if possible */ - - /* look for hole in order to move segment data */ - if (offset_tbl[0].fixed == SEGMENT_FIXED) { /* fixed segment */ - free(offset_tbl); - return (-1); - } - - newoffset = hole_discovery(offset_tbl[0].length, - segcnt, &totsize, offset_tbl); - if (newoffset != 0) { /* found new offset */ - /* now new offset */ - offset_tbl[0].offset = newoffset; - - /* move the segment data */ - move_segment_data(seghdr, newoffset, contfd); - /* again sort the offset table */ - sort_offsettbl(segcnt, offset_tbl); - } else { - /* pack the existing hole */ - if (totsize > offset_tbl[0].length) { - pack_segment_data(seghdr, segcnt, - contfd, offset_tbl); - } else { - free(offset_tbl); - return (-1); - } - } - } - - totsize = 0; - newoffset = hole_discovery(segsize, segcnt, &totsize, offset_tbl); - - if (newoffset == 0) { /* No hole found */ - if (totsize >= segsize) { - pack_segment_data(seghdr, segcnt, contfd, - offset_tbl); - newoffset = hole_discovery(segsize, segcnt, - &totsize, offset_tbl); - if (newoffset != 0) { - *sectionoffset = newoffset; - free(offset_tbl); - return (0); - } - } - } else { - *sectionoffset = newoffset; - free(offset_tbl); - return (0); - } - free(offset_tbl); - return (-1); -} - -/* - * Description :sun_fru_open_container() opens the container associated with - * a fru. it's called by data plugin module before creating - * container property. it calls picltree library routine to get - * the device path and driver binding name for the fru to get the - * corresponding fru name that describe the fru layout. - * - * Arguments :picl_hdl_t fru - * A handle for PICL tree node of class "fru" representing the - * FRU with the container to open. - * - * Return : - * On Success, a Positive integer container handle. is returned - * for use in subsequent fru operations;on error, 0 is returned - * and "errno" is set appropriately. - */ -static container_hdl_t -sun_fru_open_container(picl_nodehdl_t fruhdl) -{ - int count; - hash_obj_t *cont_hash_obj; - hash_obj_t *sec_hash_obj; - - cont_hash_obj = lookup_handle_object((handle_t)fruhdl, CONTAINER_TYPE); - if (cont_hash_obj == NULL) { - return (NULL); - } - - cont_hash_obj->u.cont_obj->num_of_section = NUM_OF_SECTIONS; - cont_hash_obj->u.cont_obj->sec_obj_list = NULL; - - for (count = 0; count < NUM_OF_SECTIONS; count++) { - sec_hash_obj = create_section_hash_object(); - if (sec_hash_obj == NULL) { - return (NULL); - } - - add_hashobject_to_hashtable(sec_hash_obj, SECTION_TYPE); - - if (count == 0) { - sec_hash_obj->u.sec_obj->section.offset = - DYNAMIC_OFFSET; - sec_hash_obj->u.sec_obj->section.protection = - WRITE_SECTION; - sec_hash_obj->u.sec_obj->section.length = - DYNAMIC_LENGTH; - } else { - sec_hash_obj->u.sec_obj->section.offset = STATIC_OFFSET; - sec_hash_obj->u.sec_obj->section.protection = - READ_ONLY_SECTION; - sec_hash_obj->u.sec_obj->section.length = STATIC_LENGTH; - } - - sec_hash_obj->u.sec_obj->section.version = SECTION_HDR_VER; - - add_to_sec_object_list(cont_hash_obj, sec_hash_obj); - } - - return (cont_hash_obj->obj_hdl); -} - -static int -verify_header_crc8(headerrev_t head_ver, unsigned char *bytes, int length) -{ - int crc_offset = 0; - unsigned char orig_crc8 = 0; - unsigned char calc_crc8 = 0; - - switch (head_ver) { - case SECTION_HDR_VER: - crc_offset = 4; - break; - default: - errno = EINVAL; - return (0); - } - - orig_crc8 = bytes[crc_offset]; - bytes[crc_offset] = 0x00; /* clear for calc */ - calc_crc8 = compute_crc8(bytes, length); - bytes[crc_offset] = orig_crc8; /* restore */ - - return (orig_crc8 == calc_crc8); -} - -/* - * Description : - * sun_fru_get_num_sections() returns number of sections in a - * container. it calls get_container_index() to get the container - * index number in the container list. - * - * Arguments : - * container_hdl_t : container handle. - * - * Return : - * int - * On success, returns number of sections in a container. - * - */ -/*ARGSUSED*/ -static int -sun_fru_get_num_sections(container_hdl_t container, door_cred_t *cred) -{ - hash_obj_t *hash_object; - - hash_object = lookup_handle_object(container, CONTAINER_TYPE); - if (hash_object == NULL) { - return (-1); - } - - return (hash_object->u.cont_obj->num_of_section); -} - -/* - * called from fru_get_sections() - */ - -static void -get_section(int fd, hash_obj_t *sec_hash, section_t *section) -{ - int retval; - int size; - int count; - uint16_t hdrver; - hash_obj_t *seg_hash; - unsigned char *buffer; - section_obj_t *sec_obj; - section_layout_t sec_hdr; - segment_layout_t *seg_hdr; - segment_layout_t *seg_buf; - format_t format; - hash_obj_t *cont_hash; - - sec_obj = sec_hash->u.sec_obj; - if (sec_obj == NULL) { - return; - } - - /* populate section_t */ - section->handle = sec_hash->obj_hdl; - section->offset = sec_obj->section.offset; - section->length = sec_obj->section.length; - section->protection = sec_obj->section.protection; - section->version = sec_obj->section.version; - sec_obj->num_of_segment = 0; - - cont_hash = get_container_hash_object(SEGMENT_TYPE, sec_hash->obj_hdl); - if (cont_hash == NULL) { - return; - } - - format = cont_hash->u.cont_obj->format; - - /* read section header layout */ - retval = pread_new(fd, &sec_hdr, sizeof (sec_hdr), - sec_obj->section.offset, &format); - if (retval != sizeof (sec_hdr)) { - return; - } - - hdrver = GET_SECTION_HDR_VERSION; - - if ((sec_hdr.headertag != SECTION_HDR_TAG) && - (hdrver != section->version)) { - return; - } - - /* size = section layout + total sizeof segment header */ - size = sizeof (sec_hdr) + ((sec_hdr.segmentcount) - * sizeof (segment_layout_t)); - buffer = alloca(size); - if (buffer == NULL) { - return; - } - - /* segment header buffer */ - seg_buf = alloca(size - sizeof (sec_hdr)); - if (seg_buf == NULL) { - return; - } - - /* read segment header */ - retval = pread_new(fd, seg_buf, size - sizeof (sec_hdr), - sec_obj->section.offset + sizeof (sec_hdr), &format); - if (retval != (size - sizeof (sec_hdr))) { - return; - } - - /* copy section header layout */ - (void) memcpy(buffer, &sec_hdr, sizeof (sec_hdr)); - - /* copy segment header layout */ - (void) memcpy(buffer + sizeof (sec_hdr), seg_buf, size - - sizeof (sec_hdr)); - - /* verify crc8 */ - retval = verify_header_crc8(hdrver, buffer, size); - if (retval != TRUE) { - return; - } - - section->version = hdrver; - sec_obj->section.version = hdrver; - - seg_hdr = (segment_layout_t *)seg_buf; - - for (count = 0; count < sec_hdr.segmentcount; count++, seg_hdr++) { - seg_hash = create_segment_hash_object(); - if (seg_hash == NULL) { - return; - } - - add_hashobject_to_hashtable(seg_hash, SEGMENT_TYPE); - - copy_segment_layout(&seg_hash->u.seg_obj->segment, seg_hdr); - - add_to_seg_object_list(sec_hash, seg_hash); - - sec_obj->num_of_segment++; - } -} - -/* - * Description : - * sun_fru_get_sections() fills an array of section structures - * passed as an argument. - * - * Arguments : - * container_hdl_t : container handle(device descriptor). - * section_t : array of section structure. - * int : maximum number of section in a container. - * - * Returns : - * int - * On success,the number of section structures written is returned; - * on error, -1 is returned and "errno" is set appropriately. - * - */ -/*ARGSUSED*/ -static int -sun_fru_get_sections(container_hdl_t container, section_t *section, int maxsec, - door_cred_t *cred) -{ - int device_fd; - int count; - hash_obj_t *cont_object; - hash_obj_t *sec_hash; - - cont_object = lookup_handle_object(container, CONTAINER_TYPE); - if (cont_object == NULL) { - return (-1); - } - - if (cont_object->u.cont_obj->num_of_section > maxsec) { - return (-1); - } - - sec_hash = cont_object->u.cont_obj->sec_obj_list; - if (sec_hash == NULL) { - return (-1); - } - - device_fd = open_file(); - - if (device_fd < 0) { - return (-1); - } - - for (count = 0; count < cont_object->u.cont_obj->num_of_section; - count++, section++) { - section->version = -1; - /* populate section_t */ - get_section(device_fd, sec_hash, section); - sec_hash = sec_hash->u.sec_obj->next; - } - - (void) close(device_fd); - - return (count); -} - -/* - * Description : - * sun_fru_get_num_segments() returns the current number of - * segments in a section. - * - * Arguments : - * section_hdl_t : section header holding section information. - * - * Return : - * int - * On success, the number of segments in the argument section is - * returned; on error -1 is returned. - */ -/*ARGSUSED*/ -static int -sun_fru_get_num_segments(section_hdl_t section, door_cred_t *cred) -{ - hash_obj_t *sec_object; - section_obj_t *sec_obj; - - sec_object = lookup_handle_object(section, SECTION_TYPE); - if (sec_object == NULL) { - return (-1); - } - - sec_obj = sec_object->u.sec_obj; - if (sec_obj == NULL) { - return (-1); - } - - return (sec_obj->num_of_segment); -} - -/* - * Description : - * sun_fru_get_segments() fills an array of structures - * representing the segments in a section. - * - * Arguments : - * section_hdl_t : holds section number. - * segment_t : on success will hold segment information. - * int : maximum number of segment. - * - * Return : - * int - * On success, the number of segment structures written is - * returned; on errno -1 is returned. - */ -/* ARGSUSED */ -static int -sun_fru_get_segments(section_hdl_t section, segment_t *segment, int maxseg, - door_cred_t *cred) -{ - int count; - hash_obj_t *sec_object; - hash_obj_t *seg_object; - section_obj_t *sec_obj; - - sec_object = lookup_handle_object(section, SECTION_TYPE); - if (sec_object == NULL) { - return (-1); - } - - sec_obj = sec_object->u.sec_obj; - if (sec_obj == NULL) { - return (-1); - } - - if (sec_obj->num_of_segment > maxseg) { - return (-1); - } - - seg_object = sec_object->u.sec_obj->seg_obj_list; - if (seg_object == NULL) { - return (-1); - } - - for (count = 0; count < sec_obj->num_of_segment; count++) { - - /* populate segment_t */ - segment->handle = seg_object->obj_hdl; - (void) memcpy(segment->name, - seg_object->u.seg_obj->segment.name, SEG_NAME_LEN); - segment->descriptor = seg_object->u.seg_obj->segment.descriptor; - segment->offset = seg_object->u.seg_obj->segment.offset; - segment->length = seg_object->u.seg_obj->segment.length; - seg_object = seg_object->u.seg_obj->next; - segment++; - } - return (0); -} - -/* - * Description : - * sun_fru_add_segment() adds a segment to a section. - * - * Arguments : - * section_hdl_t section - * A handle for the section in which to add the segment. - * - * segment_t *segment - * On entry, the "handle" component of "segment" is ignored and the - * remaining components specify the parameters of the segment to be - * added. On return, the "handle" component is set to the handle - * for the added segment. The segment offset is mandatory for FIXED - * segments; otherwise, the offset is advisory. - * - * Return : - * int - * On success, 0 is returned; on error -1 is returned. - * - */ -static int -sun_fru_add_segment(section_hdl_t section, segment_t *segment, - section_hdl_t *newsection, door_cred_t *cred) -{ - int fd; - int retval; - int offset; - int sec_size; - int seg_cnt; - int bufsize; - int new_seg_offset; - int new_seg_length; - int fixed_segment; - char trailer[] = { 0x0c, 0x00, 0x00, 0x00, 0x00 }; - hash_obj_t *cont_hash; - hash_obj_t *sec_hash; - hash_obj_t *seg_hash; - fru_segdesc_t *new_seg_desc; - unsigned char *crcbuf; - section_layout_t sec_layout; - segment_layout_t *seg_layout; - segment_layout_t *segment_buf; - format_t format; - - /* check the effective uid of the client */ - if (cred->dc_euid != 0) { - errno = EPERM; - return (-1); /* not a root */ - } - - /* section hash */ - sec_hash = lookup_handle_object(section, SECTION_TYPE); - if (sec_hash == NULL) { - return (-1); - } - - /* check for read-only section */ - if (sec_hash->u.sec_obj->section.protection == READ_ONLY_SECTION) { - errno = EPERM; - return (-1); - } - - /* look for duplicate segment */ - seg_hash = sec_hash->u.sec_obj->seg_obj_list; - while (seg_hash != NULL) { - if (strncmp(segment->name, seg_hash->u.seg_obj->segment.name, - SEG_NAME_LEN) == 0) { - errno = EEXIST; - return (-1); /* can't add duplicate segment */ - } - seg_hash = seg_hash->u.seg_obj->next; - } - - /* get the container hash */ - cont_hash = lookup_handle_object(sec_hash->u.sec_obj->cont_hdl, - CONTAINER_TYPE); - if (cont_hash == NULL) { - return (-1); - } - - format = cont_hash->u.cont_obj->format; - - /* open the container */ - fd = open_file(); - if (fd < 0) { - return (-1); - } - - /* section start here */ - offset = sec_hash->u.sec_obj->section.offset; - - /* read section header layout */ - retval = pread_new(fd, &sec_layout, sizeof (sec_layout), offset, - &format); - if (retval != sizeof (sec_layout)) { - (void) close(fd); - return (-1); - } - - /* check for valid section header */ - if (sec_layout.headertag != SECTION_HDR_TAG) { - /* write a new one */ - sec_layout.headertag = SECTION_HDR_TAG; - sec_layout.headerversion[0] = SECTION_HDR_VER_BIT0; - sec_layout.headerversion[1] = SECTION_HDR_VER_BIT1; - sec_layout.headerlength = sizeof (sec_layout); - sec_layout.segmentcount = 0; - } - - /* section size */ - sec_size = sec_hash->u.sec_obj->section.length; - - /* number of segment in the section */ - seg_cnt = sec_layout.segmentcount; - - /* total sizeof segment + new segment */ - bufsize = sizeof (segment_layout_t) * (seg_cnt + 1); - segment_buf = alloca(bufsize); - if (segment_buf == NULL) { - return (-1); - } - - /* read entire segment header */ - retval = pread_new(fd, segment_buf, - (bufsize - sizeof (segment_layout_t)), - offset + sizeof (section_layout_t), &format); - if (retval != (bufsize - sizeof (segment_layout_t))) { - (void) close(fd); - return (-1); - } - - new_seg_offset = segment->offset; /* new segment offset */ - new_seg_length = segment->length; /* new segment length */ - - new_seg_desc = (fru_segdesc_t *)&segment->descriptor; - - fixed_segment = new_seg_desc->field.fixed; - - /* get new offset for new segment to be addedd */ - retval = find_offset((char *)segment_buf, seg_cnt, sec_size, - &new_seg_offset, new_seg_length, fixed_segment, fd); - - if (retval != 0) { - (void) close(fd); - errno = EAGAIN; - return (-1); - } - - /* copy new segment data in segment layout */ - seg_layout = (segment_layout_t *)(segment_buf + seg_cnt); - (void) memcpy(&seg_layout->name, segment->name, SEG_NAME_LEN); - (void) memcpy(seg_layout->descriptor, &segment->descriptor, - sizeof (uint32_t)); - seg_layout->length = segment->length; - seg_layout->offset = new_seg_offset; /* new segment offset */ - - sec_layout.segmentcount += 1; - - crcbuf = alloca(sizeof (section_layout_t) + bufsize); - if (crcbuf == NULL) { - (void) close(fd); - return (-1); - } - - sec_layout.headercrc8 = 0; - sec_layout.headerlength += sizeof (segment_layout_t); - - (void) memcpy(crcbuf, (char *)&sec_layout, sizeof (section_layout_t)); - (void) memcpy(crcbuf + sizeof (section_layout_t), segment_buf, bufsize); - - sec_layout.headercrc8 = compute_crc8(crcbuf, bufsize + - sizeof (section_layout_t)); - - /* write section header */ - retval = pwrite_new(fd, &sec_layout, sizeof (section_layout_t), - offset, &format); - if (retval != sizeof (section_layout_t)) { - (void) close(fd); - return (-1); - } - - /* write segment header */ - retval = pwrite_new(fd, segment_buf, bufsize, offset + - sizeof (section_layout_t), &format); - if (retval != bufsize) { - (void) close(fd); - return (-1); - } - - /* write segment trailer */ - retval = pwrite_new(fd, &trailer, sizeof (trailer), new_seg_offset, - &format); - if (retval != sizeof (trailer)) { - (void) close(fd); - return (-1); - } - - (void) close(fd); - - /* create new segment hash object */ - seg_hash = create_segment_hash_object(); - if (seg_hash == NULL) { - return (-1); - } - - add_hashobject_to_hashtable(seg_hash, SEGMENT_TYPE); - - copy_segment_layout(&seg_hash->u.seg_obj->segment, seg_layout); - - add_to_seg_object_list(sec_hash, seg_hash); - - sec_hash->u.sec_obj->num_of_segment += 1; - seg_hash->u.seg_obj->trailer_offset = new_seg_offset; - *newsection = section; /* return the new section handle */ - return (0); -} - -/* - * Description : - * sun_fru_delete_segment() deletes a segment from a section; the - * associated container data is not altered. - * - * Arguments : segment_hdl_t segment handle. - * section_hdl_t new section handle. - * - * Return : - * int - * On success, 0 returned; On error -1 is returned. - */ -static int -sun_fru_delete_segment(segment_hdl_t segment, section_hdl_t *newsection, - door_cred_t *cred) -{ - int num_of_seg; - int bufsize; - int count; - int retval; - int fd; - int segnum; - hash_obj_t *seg_hash; - hash_obj_t *sec_hash; - hash_obj_t *cont_hash; - hash_obj_t *tmp_hash; - unsigned char *buffer; - fru_segdesc_t *desc; - segment_layout_t *seg_buf; - section_layout_t *sec_layout; - segment_layout_t *seg_layout; - segment_layout_t *next_layout; - format_t format; - - /* check the effective uid of the client */ - if (cred->dc_euid != 0) { - errno = EPERM; - return (-1); /* not a root */ - } - - seg_hash = lookup_handle_object(segment, SEGMENT_TYPE); - if (seg_hash == NULL) { - return (-1); - } - - desc = (fru_segdesc_t *)&seg_hash->u.seg_obj->segment.descriptor; - if (!(desc->field.field_perm & SEGMENT_DELETE)) { - errno = EPERM; - return (-1); /* can't delete this segment */ - } - - sec_hash = lookup_handle_object(seg_hash->u.seg_obj->section_hdl, - SECTION_TYPE); - if (sec_hash == NULL) { - return (-1); - } - - if (sec_hash->u.sec_obj->section.protection == READ_ONLY_SECTION) { - errno = EPERM; - return (-1); - } - - num_of_seg = sec_hash->u.sec_obj->num_of_segment; - - bufsize = (sizeof (segment_layout_t) * num_of_seg); - - seg_buf = alloca(bufsize); - if (seg_buf == NULL) { - return (-1); - } - - segnum = 0; - for (tmp_hash = sec_hash->u.sec_obj->seg_obj_list; tmp_hash != NULL; - tmp_hash = tmp_hash->u.seg_obj->next) { - if (tmp_hash->obj_hdl == segment) { - break; - } - segnum++; - } - - cont_hash = lookup_handle_object(sec_hash->u.sec_obj->cont_hdl, - CONTAINER_TYPE); - if (cont_hash == NULL) { - return (-1); - } - format = cont_hash->u.cont_obj->format; - - fd = open_file(); - if (fd < 0) { - return (-1); - } - - sec_layout = alloca(sizeof (section_layout_t)); - if (sec_layout == NULL) { - (void) close(fd); - return (-1); - } - - /* read section layout header */ - retval = pread_new(fd, sec_layout, sizeof (section_layout_t), - sec_hash->u.sec_obj->section.offset, &format); - if (retval != sizeof (section_layout_t)) { - (void) close(fd); - return (-1); - } - - /* read segment header layout */ - retval = pread_new(fd, seg_buf, bufsize, - sec_hash->u.sec_obj->section.offset + - sizeof (section_layout_t), &format); - if (retval != bufsize) { - (void) close(fd); - return (-1); - } - - seg_layout = (segment_layout_t *)(seg_buf + segnum); - next_layout = seg_layout; - for (count = segnum; count < sec_hash->u.sec_obj->num_of_segment-1; - count++) { - next_layout++; - (void) memcpy(seg_layout, next_layout, - sizeof (segment_layout_t)); - seg_layout++; - } - - (void) memset(seg_layout, '\0', sizeof (segment_layout_t)); - - sec_layout->headercrc8 = 0; - - sec_layout->headerlength -= sizeof (segment_layout_t); - sec_layout->segmentcount -= 1; - - buffer = alloca(sec_layout->headerlength); - if (buffer == NULL) { - (void) close(fd); - return (-1); - } - - (void) memcpy(buffer, sec_layout, sizeof (section_layout_t)); - (void) memcpy(buffer + sizeof (section_layout_t), seg_buf, bufsize - - sizeof (segment_layout_t)); - sec_layout->headercrc8 = compute_crc8(buffer, - sec_layout->headerlength); - - /* write section header with update crc8 and header length */ - retval = pwrite_new(fd, sec_layout, sizeof (section_layout_t), - sec_hash->u.sec_obj->section.offset, &format); - if (retval != sizeof (section_layout_t)) { - (void) close(fd); - return (-1); - } - - /* write the update segment header */ - retval = pwrite_new(fd, seg_buf, bufsize, - sec_hash->u.sec_obj->section.offset + - sizeof (section_layout_t), &format); - (void) close(fd); - if (retval != bufsize) { - return (-1); - } - - free_segment_hash(segment, sec_hash); - - *newsection = sec_hash->obj_hdl; - sec_hash->u.sec_obj->num_of_segment = sec_layout->segmentcount; - - return (0); -} - -/* - * Description : - * sun_fru_read_segment() reads the raw contents of a segment. - * - * Arguments : segment_hdl_t : segment handle. - * void * : buffer containing segment data when function returns. - * size_t :number of bytes. - * - * Return : - * int - * On success, the number of bytes read is returned; - * - * Notes : - * Segments containing packets can be read in structured fashion - * using the fru_get_packets() and fru_get_payload() primitives;the - * entire byte range of a segment can be read using - * fru_read_segment(). - */ -/*ARGSUSED*/ -static ssize_t -sun_fru_read_segment(segment_hdl_t segment, void *buffer, size_t nbytes, - door_cred_t *cred) -{ - int fd; - int retval; - hash_obj_t *seg_hash; - hash_obj_t *sec_hash; - hash_obj_t *cont_hash; - format_t format; - - /* segment hash object */ - seg_hash = lookup_handle_object(segment, SEGMENT_TYPE); - if (seg_hash == NULL) { - return (-1); - } - - /* section hash object */ - sec_hash = lookup_handle_object(seg_hash->u.seg_obj->section_hdl, - SECTION_TYPE); - if (sec_hash == NULL) { - return (-1); - } - - /* container hash object */ - cont_hash = lookup_handle_object(sec_hash->u.sec_obj->cont_hdl, - CONTAINER_TYPE); - if (cont_hash == NULL) { - return (-1); - } - format = cont_hash->u.cont_obj->format; - - if (seg_hash->u.seg_obj->segment.length < nbytes) { - return (-1); - } - - fd = open_file(); - if (fd < 0) { - return (-1); - } - - retval = pread_new(fd, buffer, nbytes, - seg_hash->u.seg_obj->segment.offset, &format); - (void) close(fd); - if (retval != nbytes) { - return (-1); - } - return (nbytes); -} - -/* - * Description : - * sun_fru_write_segment() writes a raw segment. - * - * Arguments : segment_hdl_t :segment handle. - * const void * : data buffer. - * size_t : number of bytes. - * segment_hdl_t : new segment handle. - * - * Returns : - * int - * On success, the number of bytes written is returned - * - */ -/*ARGSUSED*/ -static int -sun_fru_write_segment(segment_hdl_t segment, const void *data, size_t nbytes, - segment_hdl_t *newsegment, door_cred_t *cred) -{ - return (ENOTSUP); -} - - -static int -get_packet(int device_fd, void *buffer, int size, int offset, format_t *format) -{ - int retval; - - retval = pread_new(device_fd, (char *)buffer, size, offset, format); - if (retval != -1) { - return (0); - } - return (-1); -} - -static uint32_t -get_checksum_crc(hash_obj_t *seg_hash, int data_size) -{ - int protection; - int offset = 0; - uint32_t crc; - hash_obj_t *sec_hash; - hash_obj_t *pkt_hash; - unsigned char *buffer; - - sec_hash = lookup_handle_object(seg_hash->u.seg_obj->section_hdl, - SECTION_TYPE); - if (sec_hash == NULL) { - return ((uint32_t)-1); - } - - buffer = alloca(data_size); - if (buffer == NULL) { - return ((uint32_t)-1); - } - - /* traverse the packet object list for all the tags and payload */ - for (pkt_hash = seg_hash->u.seg_obj->pkt_obj_list; pkt_hash != NULL; - pkt_hash = pkt_hash->u.pkt_obj->next) { - (void) memcpy(buffer + offset, &pkt_hash->u.pkt_obj->tag, - pkt_hash->u.pkt_obj->tag_size); - offset += pkt_hash->u.pkt_obj->tag_size; - (void) memcpy(buffer + offset, pkt_hash->u.pkt_obj->payload, - pkt_hash->u.pkt_obj->paylen); - offset += pkt_hash->u.pkt_obj->paylen; - } - - protection = sec_hash->u.sec_obj->section.protection; - - if (protection == READ_ONLY_SECTION) { /* read-only section */ - crc = compute_crc32(buffer, data_size); - } else { /* read/write section */ - crc = compute_checksum32(buffer, data_size); - } - return (crc); /* computed crc */ -} - -static int -get_packets(hash_obj_t *seg_hash, int device_fd, int offset, int length) -{ - int tag_size; - int paylen; - int retval; - int seg_limit = 0; - int pktcnt = 0; - char *data; - uint32_t crc; - uint32_t origcrc; - fru_tag_t tag; - hash_obj_t *pkt_hash_obj; - fru_segdesc_t *segdesc; - fru_tagtype_t tagtype; - format_t format; - hash_obj_t *cont_hash; - - cont_hash = get_container_hash_object(PACKET_TYPE, seg_hash->obj_hdl); - if (cont_hash == NULL) { - return (NULL); - } - format = cont_hash->u.cont_obj->format; - - retval = get_packet(device_fd, &tag, sizeof (fru_tag_t), offset, - &format); - if (retval == -1) { - return (-1); - } - - seg_hash->u.seg_obj->trailer_offset = offset; - - data = (char *)&tag; - while (data[0] != SEG_TRAILER_TAG) { - tagtype = get_tag_type(&tag); /* verify tag type */ - if (tagtype == -1) { - return (-1); - } - - tag_size = get_tag_size(tagtype); - if (tag_size == -1) { - return (-1); - } - - seg_limit += tag_size; - if (seg_limit > length) { - return (-1); - } - - paylen = get_payload_length((void *)&tag); - if (paylen == -1) { - return (-1); - } - - seg_limit += paylen; - if (seg_limit > length) { - return (-1); - } - - pkt_hash_obj = create_packet_hash_object(); - if (pkt_hash_obj == NULL) { - return (-1); - } - - pkt_hash_obj->u.pkt_obj->payload = malloc(paylen); - if (pkt_hash_obj->u.pkt_obj->payload == NULL) { - free(pkt_hash_obj); - return (-1); - } - - offset += tag_size; - retval = pread_new(device_fd, pkt_hash_obj->u.pkt_obj->payload, - paylen, offset, &format); - if (retval != paylen) { - free(pkt_hash_obj->u.pkt_obj->payload); - free(pkt_hash_obj); - return (-1); - } - - /* don't change this */ - pkt_hash_obj->u.pkt_obj->tag.raw_data = 0; - (void) memcpy(&pkt_hash_obj->u.pkt_obj->tag, &tag, tag_size); - pkt_hash_obj->u.pkt_obj->paylen = paylen; - pkt_hash_obj->u.pkt_obj->tag_size = tag_size; - pkt_hash_obj->u.pkt_obj->payload_offset = offset; - - offset += paylen; - - add_hashobject_to_hashtable(pkt_hash_obj, PACKET_TYPE); - add_to_pkt_object_list(seg_hash, pkt_hash_obj); - - pktcnt++; - - retval = get_packet(device_fd, &tag, sizeof (fru_tag_t), - offset, &format); - if (retval == -1) { - return (retval); - } - - data = (char *)&tag; - } - - segdesc = (fru_segdesc_t *)&seg_hash->u.seg_obj->segment.descriptor; - - seg_hash->u.seg_obj->trailer_offset = offset; - - if (!segdesc->field.ignore_checksum) { - crc = get_checksum_crc(seg_hash, seg_limit); - offset = seg_hash->u.seg_obj->segment.offset; - - retval = pread_new(device_fd, &origcrc, sizeof (origcrc), - offset + seg_limit + 1, &format); - if (retval != sizeof (origcrc)) { - return (-1); - } - - if (origcrc != crc) { - seg_hash->u.seg_obj->trailer_offset = offset; - return (-1); - } - } - return (pktcnt); -} - -/* - * Description : - * sun_fru_get_num_packets() returns the current number of packets - * in a segment. - * - * Arguments : segment_hdl_t : segment handle. - * - * Return : - * int - * On success, the number of packets is returned; - * -1 on failure. - */ -/*ARGSUSED*/ -static int -sun_fru_get_num_packets(segment_hdl_t segment, door_cred_t *cred) -{ - int device_fd; - int pktcnt; - int length; - uint16_t offset; - hash_obj_t *cont_hash_obj; - hash_obj_t *seg_hash; - fru_segdesc_t *segdesc; - segment_obj_t *segment_object; - - seg_hash = lookup_handle_object(segment, SEGMENT_TYPE); - if (seg_hash == NULL) { - return (-1); - } - - segment_object = seg_hash->u.seg_obj; - if (segment_object == NULL) { - return (-1); - } - - - segdesc = (fru_segdesc_t *)&segment_object->segment.descriptor; - if (segdesc->field.opaque) { - return (0); - } - - offset = segment_object->segment.offset; - length = segment_object->segment.length; - - cont_hash_obj = get_container_hash_object(SEGMENT_TYPE, - segment_object->section_hdl); - - if (cont_hash_obj == NULL) { - return (-1); - } - - if (seg_hash->u.seg_obj->pkt_obj_list != NULL) { - return (segment_object->num_of_packets); - } - - segment_object->num_of_packets = 0; - device_fd = open_file(); - if (device_fd < 0) { - return (-1); - } - - pktcnt = get_packets(seg_hash, device_fd, offset, - length); - if (pktcnt == -1) { - free_pkt_object_list(seg_hash); - seg_hash->u.seg_obj->pkt_obj_list = NULL; - } - - segment_object->num_of_packets = pktcnt; - (void) close(device_fd); - - return (segment_object->num_of_packets); -} - -/* - * Description : - * sun_fru_get_packets() fills an array of structures - * representing the packets in a segment. - * - * Arguments : segment_hdl_t : segment handle. - * packet_t : packet buffer. - * int : maximum number of packets. - * - * Return : - * int - * On success, the number of packet structures written is returned; - * On failure -1 is returned; - * - */ -/*ARGSUSED*/ -static int -sun_fru_get_packets(segment_hdl_t segment, packet_t *packet, int maxpackets, - door_cred_t *cred) -{ - int count; - hash_obj_t *seg_hash_obj; - hash_obj_t *pkt_hash_obj; - - /* segment hash object */ - seg_hash_obj = lookup_handle_object(segment, SEGMENT_TYPE); - if (seg_hash_obj == NULL) { - return (-1); - } - - if (seg_hash_obj->u.seg_obj->num_of_packets != maxpackets) { - return (-1); - } - - pkt_hash_obj = seg_hash_obj->u.seg_obj->pkt_obj_list; - if (pkt_hash_obj == NULL) { - return (-1); - } - - for (count = 0; count < maxpackets; count++, packet++) { - packet->handle = pkt_hash_obj->obj_hdl; - packet->tag = 0; - (void) memcpy(&packet->tag, &pkt_hash_obj->u.pkt_obj->tag, - pkt_hash_obj->u.pkt_obj->tag_size); - pkt_hash_obj = pkt_hash_obj->u.pkt_obj->next; - } - - return (0); -} - -/* - * Description : - * sun_fru_get_payload() copies the contents of a packet's payload. - * - * Arguments : packet_hdl_t : packet handle. - * void * : payload buffer. - * size_t : sizeof the buffer. - * - * Return : - * int - * On success, the number of bytes copied is returned; On error - * -1 returned. - */ -/*ARGSUSED*/ -static ssize_t -sun_fru_get_payload(packet_hdl_t packet, void *buffer, size_t nbytes, - door_cred_t *cred) -{ - hash_obj_t *packet_hash_obj; - - /* packet hash object */ - packet_hash_obj = lookup_handle_object(packet, PACKET_TYPE); - if (packet_hash_obj == NULL) { - return (-1); - } - - /* verify payload length */ - if (nbytes != packet_hash_obj->u.pkt_obj->paylen) { - return (-1); - } - - (void) memcpy(buffer, packet_hash_obj->u.pkt_obj->payload, nbytes); - return (nbytes); -} - -/* - * Description : - * sun_fru_update_payload() writes the contents of a packet's - * payload. - * - * Arguments : packet_hdl_t : packet handle. - * const void * : data buffer. - * size_t : buffer size. - * packet_hdl_t : new packet handle. - * - * Return : - * int - * On success, 0 is returned; on failure - * -1 is returned. - */ -/*ARGSUSED*/ -static int -sun_fru_update_payload(packet_hdl_t packet, const void *data, size_t nbytes, - packet_hdl_t *newpacket, door_cred_t *cred) -{ - int fd; - int segment_offset; - int trailer_offset; - int retval; - uint32_t crc; - hash_obj_t *pkt_hash; - hash_obj_t *seg_hash; - hash_obj_t *sec_hash; - hash_obj_t *cont_hash; - fru_segdesc_t *desc; - format_t format; - - /* check the effective uid of the client */ - if (cred->dc_euid != 0) { - errno = EPERM; - return (-1); /* not a root */ - } - - /* packet hash object */ - pkt_hash = lookup_handle_object(packet, PACKET_TYPE); - if (pkt_hash == NULL) { - return (-1); - } - - /* segment hash object */ - seg_hash = lookup_handle_object(pkt_hash->u.pkt_obj->segment_hdl, - SEGMENT_TYPE); - if (seg_hash == NULL) { - return (-1); - } - - /* check for write perm. */ - desc = (fru_segdesc_t *)&seg_hash->u.seg_obj->segment.descriptor; - if (!(desc->field.field_perm & SEGMENT_WRITE)) { - errno = EPERM; - return (-1); /* write not allowed */ - } - - sec_hash = lookup_handle_object(seg_hash->u.seg_obj->section_hdl, - SECTION_TYPE); - if (sec_hash == NULL) { - return (-1); - } - - if (sec_hash->u.sec_obj->section.protection == READ_ONLY_SECTION) { - errno = EPERM; - return (-1); /* read-only section */ - } - - cont_hash = lookup_handle_object(sec_hash->u.sec_obj->cont_hdl, - CONTAINER_TYPE); - if (cont_hash == NULL) { - return (-1); - } - - format = cont_hash->u.cont_obj->format; - - if (pkt_hash->u.pkt_obj->paylen != nbytes) { - return (-1); - } - - (void) memcpy(pkt_hash->u.pkt_obj->payload, (char *)data, nbytes); - fd = open_file(); - if (fd < 0) { - return (-1); - } - - trailer_offset = seg_hash->u.seg_obj->trailer_offset; - segment_offset = seg_hash->u.seg_obj->segment.offset; - - crc = get_checksum_crc(seg_hash, (trailer_offset - segment_offset)); - retval = pwrite_new(fd, data, nbytes, - pkt_hash->u.pkt_obj->payload_offset, &format); - if (retval != nbytes) { - (void) close(fd); - return (-1); - } - - retval = pwrite_new(fd, &crc, sizeof (crc), - trailer_offset + 1, &format); - (void) close(fd); - if (retval != sizeof (crc)) { - return (-1); - } - *newpacket = packet; - return (0); -} - -/* - * Description : - * sun_fru_append_packet() appends a packet to a segment. - * - * Arguments : - * segment_hdl_t segment - * A handle for the segment to which the packet will be appended. - * - * packet_t *packet - * On entry, the "tag" component of "packet" specifies the tag - * value for the added packet; the "handle" component is ignored. - * On return, the "handle" component is set to the handle of the - * appended packet. - * - * const void *payload - * A pointer to the caller's buffer containing the payload data for - * the appended packet. - * - * size_t nbytes - * The size of the caller buffer. - * - * Return : - * int - * On success, 0 is returned; on error -1 is returned; - */ -static int -sun_fru_append_packet(segment_hdl_t segment, packet_t *packet, - const void *payload, size_t nbytes, segment_hdl_t *newsegment, - door_cred_t *cred) -{ - int trailer_offset; - int tag_size; - int fd; - int retval; - char trailer[] = {0x0c, 0x00, 0x00, 0x00, 0x00}; - uint32_t crc; - hash_obj_t *seg_hash; - hash_obj_t *sec_hash; - hash_obj_t *pkt_hash; - hash_obj_t *cont_hash; - fru_tagtype_t tagtype; - fru_segdesc_t *desc; - format_t format; - - /* check the effective uid of the client */ - if (cred->dc_euid != 0) { - errno = EPERM; - return (-1); /* not a root */ - } - - seg_hash = lookup_handle_object(segment, SEGMENT_TYPE); - if (seg_hash == NULL) { - return (-1); - } - - /* check for write perm. */ - desc = (fru_segdesc_t *)&seg_hash->u.seg_obj->segment.descriptor; - if (!(desc->field.field_perm & SEGMENT_WRITE)) { - errno = EPERM; - return (-1); /* write not allowed */ - } - - sec_hash = lookup_handle_object(seg_hash->u.seg_obj->section_hdl, - SECTION_TYPE); - if (sec_hash == NULL) { - return (-1); - } - - if (sec_hash->u.sec_obj->section.protection == READ_ONLY_SECTION) { - errno = EPERM; - return (-1); /* read-only section */ - } - - trailer_offset = seg_hash->u.seg_obj->trailer_offset; - - /* - * if trailer offset is 0 than parse the segment data to get the trailer - * offset to compute the remaining space left in the segment area for - * new packet to be added. - */ - if (trailer_offset == 0) { - (void) sun_fru_get_num_packets(segment, cred); - trailer_offset = seg_hash->u.seg_obj->trailer_offset; - } - - tagtype = get_tag_type((void *)&packet->tag); - if (tagtype == -1) { - return (-1); - } - - tag_size = get_tag_size(tagtype); - if (tag_size == -1) { - return (-1); - } - - if (seg_hash->u.seg_obj->segment.length > - ((trailer_offset - seg_hash->u.seg_obj->segment.offset) + - tag_size + nbytes + - sizeof (char) + sizeof (uint32_t))) { - /* create new packet hash */ - pkt_hash = create_packet_hash_object(); - if (pkt_hash == NULL) { - return (-1); - } - - /* tag initialization */ - (void) memcpy(&pkt_hash->u.pkt_obj->tag, &packet->tag, - tag_size); - pkt_hash->u.pkt_obj->tag_size = tag_size; - - /* payload inititalization */ - pkt_hash->u.pkt_obj->payload = malloc(nbytes); - if (pkt_hash->u.pkt_obj->payload == NULL) { - free(pkt_hash); - return (-1); - } - - (void) memcpy(pkt_hash->u.pkt_obj->payload, payload, nbytes); - pkt_hash->u.pkt_obj->paylen = nbytes; - pkt_hash->u.pkt_obj->payload_offset = trailer_offset + tag_size; - - /* add to hash table */ - add_hashobject_to_hashtable(pkt_hash, PACKET_TYPE); - - add_to_pkt_object_list(seg_hash, pkt_hash); - - cont_hash = lookup_handle_object(sec_hash->u.sec_obj->cont_hdl, - CONTAINER_TYPE); - if (cont_hash == NULL) { - return (-1); - } - format = cont_hash->u.cont_obj->format; - - fd = open_file(); - if (fd < 0) { - return (-1); - } - - /* update the trailer offset */ - trailer_offset += tag_size + nbytes; - - /* calculate new checksum */ - crc = get_checksum_crc(seg_hash, (trailer_offset - - seg_hash->u.seg_obj->segment.offset)); - - retval = pwrite_new(fd, &packet->tag, tag_size, trailer_offset - - (tag_size + nbytes), &format); - if (retval != tag_size) { - (void) close(fd); - return (-1); - } - - retval = pwrite_new(fd, payload, nbytes, - trailer_offset - nbytes, &format); - if (retval != nbytes) { - (void) close(fd); - return (-1); - } - - retval = pwrite_new(fd, trailer, sizeof (trailer), - trailer_offset, &format); - if (retval != sizeof (trailer)) { - (void) close(fd); - return (-1); - } - - retval = pwrite_new(fd, &crc, sizeof (crc), - trailer_offset + 1, &format); - (void) close(fd); - if (retval != sizeof (crc)) { - return (-1); - } - - seg_hash->u.seg_obj->trailer_offset = trailer_offset; - seg_hash->u.seg_obj->num_of_packets += 1; - - *newsegment = segment; /* return new segment handle */ - return (0); - } else { - errno = EAGAIN; - } - - return (-1); -} - -static void -adjust_packets(int fd, hash_obj_t *free_obj, hash_obj_t *object_list) -{ - int retval; - uint32_t new_offset; - hash_obj_t *hash_ptr; - format_t format; - hash_obj_t *hash_obj; - - hash_obj = lookup_handle_object(free_obj->obj_hdl, PACKET_TYPE); - if (hash_obj == NULL) { - return; - } - hash_obj = get_container_hash_object(PACKET_TYPE, - hash_obj->u.pkt_obj->segment_hdl); - if (hash_obj == NULL) { - return; - } - format = hash_obj->u.cont_obj->format; - - new_offset = free_obj->u.pkt_obj->payload_offset - - free_obj->u.pkt_obj->tag_size; - for (hash_ptr = object_list; hash_ptr != NULL; - hash_ptr = hash_ptr->u.pkt_obj->next) { - retval = pwrite_new(fd, &hash_ptr->u.pkt_obj->tag, - hash_ptr->u.pkt_obj->tag_size, new_offset, &format); - if (retval != hash_ptr->u.pkt_obj->tag_size) { - return; - } - new_offset += hash_ptr->u.pkt_obj->tag_size; - hash_ptr->u.pkt_obj->payload_offset = new_offset; - retval = pwrite_new(fd, hash_ptr->u.pkt_obj->payload, - hash_ptr->u.pkt_obj->paylen, new_offset, &format); - if (retval != hash_ptr->u.pkt_obj->paylen) { - return; - } - new_offset += hash_ptr->u.pkt_obj->paylen; - } -} - -static void -free_packet_object(handle_t handle, hash_obj_t *seg_hash) -{ - hash_obj_t *pkt_hash; - hash_obj_t *next_hash; - - pkt_hash = seg_hash->u.seg_obj->pkt_obj_list; - if (pkt_hash == NULL) { - return; - } - - if (pkt_hash->obj_hdl == handle) { - seg_hash->u.seg_obj->pkt_obj_list = pkt_hash->u.pkt_obj->next; - } else { - while (pkt_hash->obj_hdl != handle) { - next_hash = pkt_hash; - pkt_hash = pkt_hash->u.pkt_obj->next; - if (pkt_hash == NULL) { - return; - } - } - next_hash->u.pkt_obj->next = pkt_hash->u.pkt_obj->next; - } - - if (pkt_hash->prev == NULL) { - hash_table[(pkt_hash->obj_hdl % TABLE_SIZE)] = pkt_hash->next; - if (pkt_hash->next != NULL) { - pkt_hash->next->prev = NULL; - } - } else { - pkt_hash->prev->next = pkt_hash->next; - if (pkt_hash->next != NULL) { - pkt_hash->next->prev = pkt_hash->prev; - } - } - - free(pkt_hash->u.pkt_obj->payload); - free(pkt_hash->u.pkt_obj); - free(pkt_hash); -} - -/* - * Description : - * sun_fru_delete_packet() deletes a packet from a segment. - * - * Arguments : packet_hdl_t : packet number to be deleted. - * segment_hdl_t : new segment handler. - * - * Return : - * int - * On success, 0 is returned; on error, -1. - * - * NOTES - * Packets are adjacent; thus, deleting a packet requires moving - * succeeding packets to compact the resulting hole. - */ -static int -sun_fru_delete_packet(packet_hdl_t packet, segment_hdl_t *newsegment, - door_cred_t *cred) -{ - int retval; - int fd; - char trailer[] = { 0x0c, 0x00, 0x00, 0x00, 0x00}; - uint32_t crc; - hash_obj_t *tmp_obj; - hash_obj_t *pkt_hash; - hash_obj_t *sec_hash; - hash_obj_t *cont_hash; - hash_obj_t *prev_obj; - hash_obj_t *seg_hash; - fru_segdesc_t *desc; - format_t format; - - /* check the effective uid of the client */ - if (cred->dc_euid != 0) { - errno = EPERM; - return (-1); /* not a root */ - } - - /* packet hash object */ - pkt_hash = lookup_handle_object(packet, PACKET_TYPE); - if (pkt_hash == NULL) { - return (-1); - } - - /* segment hash object */ - seg_hash = lookup_handle_object(pkt_hash->u.pkt_obj->segment_hdl, - SEGMENT_TYPE); - if (seg_hash == NULL) { - return (-1); - } - - /* check for write perm. */ - desc = (fru_segdesc_t *)&seg_hash->u.seg_obj->segment.descriptor; - if (!(desc->field.field_perm & SEGMENT_WRITE)) { - errno = EPERM; - return (-1); /* write not allowed */ - } - - /* section hash object */ - sec_hash = lookup_handle_object(seg_hash->u.seg_obj->section_hdl, - SECTION_TYPE); - if (sec_hash == NULL) { - return (-1); - } - - if (sec_hash->u.sec_obj->section.protection == READ_ONLY_SECTION) { - errno = EPERM; - return (-1); /* read-only section */ - } - - prev_obj = seg_hash->u.seg_obj->pkt_obj_list; - if (prev_obj == NULL) { - return (-1); - } - - /* container hash object */ - cont_hash = lookup_handle_object(sec_hash->u.sec_obj->cont_hdl, - CONTAINER_TYPE); - if (cont_hash == NULL) { - return (-1); - } - - format = cont_hash->u.cont_obj->format; - - fd = open_file(); - if (fd < 0) { - return (-1); - } - - if (prev_obj->obj_hdl == packet) { /* first object to be deleted */ - adjust_packets(fd, prev_obj, prev_obj->u.pkt_obj->next); - seg_hash->u.seg_obj->trailer_offset -= - (prev_obj->u.pkt_obj->tag_size - + prev_obj->u.pkt_obj->paylen); - free_packet_object(packet, seg_hash); - } else { - for (tmp_obj = prev_obj; - tmp_obj != NULL; tmp_obj = tmp_obj->u.pkt_obj->next) { - /* found the object */ - if (tmp_obj->obj_hdl == packet) { - adjust_packets(fd, tmp_obj, - tmp_obj->u.pkt_obj->next); - seg_hash->u.seg_obj->trailer_offset -= - (tmp_obj->u.pkt_obj->tag_size - + tmp_obj->u.pkt_obj->paylen); - free_packet_object(packet, seg_hash); - } - } - } - - seg_hash->u.seg_obj->num_of_packets -= 1; - - /* calculate checksum */ - crc = get_checksum_crc(seg_hash, (seg_hash->u.seg_obj->trailer_offset - - seg_hash->u.seg_obj->segment.offset)); - /* write trailer at new offset */ - retval = pwrite_new(fd, &trailer, sizeof (trailer), - seg_hash->u.seg_obj->trailer_offset, &format); - if (retval != sizeof (trailer)) { - (void) close(fd); - return (-1); - } - - /* write the checksum value */ - retval = pwrite_new(fd, &crc, sizeof (crc), - seg_hash->u.seg_obj->trailer_offset + 1, &format); - (void) close(fd); - if (retval != sizeof (crc)) { - return (-1); - } - - *newsegment = seg_hash->obj_hdl; /* return new segment handle */ - return (0); -} - -/* - * Description : - * sun_fru_close_container() removes the association between a - * container and its handle. this routines free's up all the - * hash object contained under container. - * - * Arguments : - * container_hdl_t holds the file descriptor of the fru. - * - * Return : - * int - * return 0. - * - */ -/* ARGSUSED */ -static int -sun_fru_close_container(container_hdl_t container) -{ - hash_obj_t *hash_obj; - hash_obj_t *prev_hash; - hash_obj_t *sec_hash_obj; - handle_t obj_hdl; - - /* lookup for container hash object */ - hash_obj = lookup_handle_object(container, CONTAINER_TYPE); - if (hash_obj == NULL) { - return (0); - } - - /* points to section object list */ - sec_hash_obj = hash_obj->u.cont_obj->sec_obj_list; - - /* traverse section object list */ - while (sec_hash_obj != NULL) { - - /* traverse segment hash object in the section */ - while (sec_hash_obj->u.sec_obj->seg_obj_list != NULL) { - /* object handle of the segment hash object */ - obj_hdl = - sec_hash_obj->u.sec_obj->seg_obj_list->obj_hdl; - free_segment_hash(obj_hdl, sec_hash_obj); - } - - /* going to free section hash object, relink the hash object */ - if (sec_hash_obj->prev == NULL) { - hash_table[(sec_hash_obj->obj_hdl % TABLE_SIZE)] - = sec_hash_obj->next; - if (sec_hash_obj->next != NULL) { - sec_hash_obj->next->prev = NULL; - } - } else { - sec_hash_obj->prev->next = sec_hash_obj->next; - if (sec_hash_obj->next != NULL) { - sec_hash_obj->next->prev = sec_hash_obj->prev; - } - } - - free(sec_hash_obj->u.sec_obj); /* free section hash object */ - - prev_hash = sec_hash_obj; - - sec_hash_obj = sec_hash_obj->u.sec_obj->next; - - free(prev_hash); /* free section hash */ - } - - /* free container hash object */ - if (hash_obj->prev == NULL) { - hash_table[(sec_hash_obj->obj_hdl % TABLE_SIZE)] = - hash_obj->next; - if (hash_obj->next != NULL) { - hash_obj->next->prev = NULL; - } - } else { - hash_obj->prev->next = hash_obj->next; - if (hash_obj->next != NULL) { - hash_obj->next->prev = hash_obj->prev; - } - } - - free(hash_obj->u.cont_obj); - free(hash_obj); - return (0); -} - -/* - * FRU ACCESS API - */ - -/* - * Description : - * fru_is_data_available checks if the fruid information - * is available or not on a give fru - * - * Arguments : - * picl_nodehdl_t hold picl node handle of the fru. - * - * Return : - * int - * return 0 - if fruid is not present. - * return 1 - if fruid is present. - */ -int -fru_is_data_available(picl_nodehdl_t fruh) -{ - int retval, ret; - uint8_t slot_no; - picl_nodehdl_t parenth; - format_t fru_format; - hash_obj_t *cont_hash_obj; - - if (is_valid_chassis == -1) { - if (fruaccess_platmod_check_chassis() == 0) { - is_valid_chassis = 1; - } else { - is_valid_chassis = 0; - } - } - - if (!is_valid_chassis) { - return (0); - } - - retval = ptree_get_propval_by_name(fruh, PICL_PROP_PARENT, - &parenth, sizeof (picl_nodehdl_t)); - if (retval != PICL_SUCCESS) { - return (0); - } - - if (fruaccess_platmod_check_fru(parenth) != 0) { - return (0); - } - - retval = ptree_get_propval_by_name(parenth, PICL_PROP_GEO_ADDR, - &slot_no, sizeof (uint8_t)); - if (retval != PICL_SUCCESS) { - return (0); - } - - if (fruaccess_platmod_init_format(slot_no, &fru_format) != - PICL_SUCCESS) { - return (0); - } - - ret = is_fru_data_available(precedence, slot_no, &fru_format); - if (ret && (fru_format.format != NO_FRUDATA)) { - goto create; - } else { - return (0); - } -create: - - cont_hash_obj = create_container_hash_object(); - if (cont_hash_obj == NULL) { - return (0); - } - - cont_hash_obj->obj_hdl = fruh; - cont_hash_obj->u.cont_obj->format = fru_format; - - /* if both formats are present follow the precedence */ - if (fru_format.format == 0x3) { - if (precedence == IPMI_FORMAT) { - cont_hash_obj->u.cont_obj->format.format = IPMI_FORMAT; - } else { - cont_hash_obj->u.cont_obj->format.format = SUN_FORMAT; - } - } - add_hashobject_to_hashtable(cont_hash_obj, CONTAINER_TYPE); - return (1); -} - -/* - * FRU ACCESS API - */ - -/* - * All the routines check the fruid format and redirects the call to - * to appropriate routines depending on fruid format. - * All SUN format routines start with sun_ prefix. - * All IPMI format routines start with ipmi_ prefix. - */ -container_hdl_t -fru_open_container(picl_nodehdl_t fru) -{ - hash_obj_t *hash_obj; - format_t fru_format; - - hash_obj = lookup_handle_object((handle_t)fru, CONTAINER_TYPE); - if (hash_obj == NULL) { - return (-1); - } - fru_format = hash_obj->u.cont_obj->format; - return (fruaccess_func[fru_format.format - 1].open_container(fru)); -} - -int -fru_close_container(container_hdl_t container) -{ - int ret; - format_t fru_format; - hash_obj_t *hash_obj; - - hash_obj = lookup_handle_object(container, CONTAINER_TYPE); - if (hash_obj == NULL) { - return (-1); - } - - fru_format = hash_obj->u.cont_obj->format; - ret = fruaccess_func[fru_format.format - 1].close_container(container); - return (ret); -} - -int -fru_get_num_sections(container_hdl_t container, door_cred_t *cred) -{ - int ret; - format_t fru_format; - hash_obj_t *hash_obj; - - hash_obj = lookup_handle_object(container, CONTAINER_TYPE); - if (hash_obj == NULL) { - return (-1); - } - fru_format = hash_obj->u.cont_obj->format; - ret = fruaccess_func[fru_format.format - 1].get_num_sections(container, - cred); - return (ret); -} - -int -fru_get_sections(container_hdl_t container, section_t *section, - int max_sections, door_cred_t *cred) -{ - int ret; - format_t fru_format; - hash_obj_t *hash_obj; - - hash_obj = lookup_handle_object(container, CONTAINER_TYPE); - if (hash_obj == NULL) { - return (-1); - } - fru_format = hash_obj->u.cont_obj->format; - - ret = fruaccess_func[fru_format.format - 1].get_sections(container, - section, max_sections, cred); - return (ret); -} - -int -fru_get_num_segments(section_hdl_t section, door_cred_t *rarg) -{ - int ret; - format_t fru_format; - hash_obj_t *hash_obj; - - hash_obj = get_container_hash_object(SEGMENT_TYPE, section); - if (hash_obj == NULL) { - return (-1); - } - fru_format = hash_obj->u.cont_obj->format; - - ret = fruaccess_func[fru_format.format - 1].get_num_segments(section, - rarg); - return (ret); -} - -int -fru_get_segments(section_hdl_t section, segment_t *segment, - int max_segments, door_cred_t *rarg) -{ - int ret; - format_t fru_format; - hash_obj_t *hash_obj; - - hash_obj = get_container_hash_object(SEGMENT_TYPE, section); - if (hash_obj == NULL) { - return (-1); - } - fru_format = hash_obj->u.cont_obj->format; - ret = fruaccess_func[fru_format.format - 1].get_segments(section, - segment, max_segments, rarg); - return (ret); -} - -int -fru_add_segment(section_hdl_t section, segment_t *segment, - section_hdl_t *newsection, door_cred_t *cred) -{ - int ret; - format_t fru_format; - hash_obj_t *hash_obj; - - hash_obj = get_container_hash_object(SEGMENT_TYPE, section); - if (hash_obj == NULL) { - return (-1); - } - fru_format = hash_obj->u.cont_obj->format; - - ret = fruaccess_func[fru_format.format - 1].add_segment(section, - segment, newsection, cred); - return (ret); -} - -int -fru_delete_segment(segment_hdl_t segment, section_hdl_t *newsection, - door_cred_t *cred) -{ - int ret; - format_t fru_format; - hash_obj_t *hash_obj; - - hash_obj = get_container_hash_object(PACKET_TYPE, segment); - if (hash_obj == NULL) { - return (-1); - } - fru_format = hash_obj->u.cont_obj->format; - ret = fruaccess_func[fru_format.format - 1].delete_segment(segment, - newsection, cred); - return (ret); -} - -ssize_t -fru_read_segment(segment_hdl_t segment, void *buffer, size_t nbytes, - door_cred_t *cred) -{ - ssize_t ret; - format_t fru_format; - hash_obj_t *hash_obj; - - hash_obj = get_container_hash_object(PACKET_TYPE, segment); - if (hash_obj == NULL) { - return (-1); - } - fru_format = hash_obj->u.cont_obj->format; - ret = fruaccess_func[fru_format.format - 1].read_segment(segment, - buffer, nbytes, cred); - return (ret); -} - -int -fru_write_segment(segment_hdl_t segment, const void *data, size_t nbytes, - segment_hdl_t *newsegment, door_cred_t *cred) -{ - int ret; - format_t fru_format; - hash_obj_t *hash_obj; - - hash_obj = get_container_hash_object(PACKET_TYPE, segment); - if (hash_obj == NULL) { - return (-1); - } - fru_format = hash_obj->u.cont_obj->format; - - ret = fruaccess_func[fru_format.format - 1].write_segment(segment, - data, nbytes, newsegment, cred); - return (ret); -} - -int -fru_get_num_packets(segment_hdl_t segment, door_cred_t *cred) -{ - int ret; - format_t fru_format; - hash_obj_t *hash_obj; - - hash_obj = get_container_hash_object(PACKET_TYPE, segment); - if (hash_obj == NULL) { - return (-1); - } - fru_format = hash_obj->u.cont_obj->format; - - ret = fruaccess_func[fru_format.format - 1].get_num_packets(segment, - cred); - return (ret); -} - -int -fru_get_packets(segment_hdl_t segment, packet_t *packet, - int max_packets, door_cred_t *cred) -{ - int ret; - format_t fru_format; - hash_obj_t *hash_obj; - - hash_obj = get_container_hash_object(PACKET_TYPE, segment); - if (hash_obj == NULL) { - return (-1); - } - fru_format = hash_obj->u.cont_obj->format; - - ret = fruaccess_func[fru_format.format - 1].get_packets(segment, - packet, max_packets, cred); - return (ret); -} - -ssize_t -fru_get_payload(packet_hdl_t packet, void *buffer, - size_t nbytes, door_cred_t *cred) -{ - ssize_t ret; - format_t fru_format; - hash_obj_t *hash_obj; - - hash_obj = lookup_handle_object(packet, PACKET_TYPE); - if (hash_obj == NULL) { - return (-1); - } - - hash_obj = get_container_hash_object(PACKET_TYPE, - hash_obj->u.pkt_obj->segment_hdl); - if (hash_obj == NULL) { - return (-1); - } - fru_format = hash_obj->u.cont_obj->format; - - ret = fruaccess_func[fru_format.format - 1].get_payload(packet, buffer, - nbytes, cred); - return (ret); -} - -int -fru_update_payload(packet_hdl_t packet, const void *data, size_t nbytes, - packet_hdl_t *newpacket, door_cred_t *cred) -{ - int ret; - format_t fru_format; - hash_obj_t *hash_obj; - - hash_obj = lookup_handle_object(packet, PACKET_TYPE); - if (hash_obj == NULL) { - return (-1); - } - - hash_obj = get_container_hash_object(PACKET_TYPE, - hash_obj->u.pkt_obj->segment_hdl); - if (hash_obj == NULL) { - return (-1); - } - fru_format = hash_obj->u.cont_obj->format; - ret = fruaccess_func[fru_format.format - 1].update_payload(packet, data, - nbytes, newpacket, cred); - return (ret); -} - -int -fru_append_packet(segment_hdl_t segment, packet_t *packet, - const void *payload, size_t nbytes, segment_hdl_t *newsegment, - door_cred_t *cred) -{ - int ret; - format_t fru_format; - hash_obj_t *hash_obj; - - hash_obj = get_container_hash_object(PACKET_TYPE, segment); - if (hash_obj == NULL) { - return (-1); - } - fru_format = hash_obj->u.cont_obj->format; - - ret = fruaccess_func[fru_format.format - 1].append_packet(segment, - packet, payload, nbytes, newsegment, cred); - return (ret); -} - -int -fru_delete_packet(packet_hdl_t packet, segment_hdl_t *newsegment, - door_cred_t *cred) -{ - int ret; - format_t fru_format; - hash_obj_t *hash_obj; - - hash_obj = lookup_handle_object(packet, PACKET_TYPE); - if (hash_obj == NULL) { - return (-1); - } - - hash_obj = get_container_hash_object(PACKET_TYPE, - hash_obj->u.pkt_obj->segment_hdl); - if (hash_obj == NULL) { - return (-1); - } - fru_format = hash_obj->u.cont_obj->format; - - ret = fruaccess_func[fru_format.format - 1].delete_packet(packet, - newsegment, cred); - return (ret); -} diff --git a/usr/src/cmd/picl/plugins/sun4u/snowbird/lib/fruaccess/piclfruaccess_platmod.c b/usr/src/cmd/picl/plugins/sun4u/snowbird/lib/fruaccess/piclfruaccess_platmod.c deleted file mode 100644 index 2943132451..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/snowbird/lib/fruaccess/piclfruaccess_platmod.c +++ /dev/null @@ -1,116 +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 -#include -#include "fru_access_impl.h" - -#define SNOWBIRD "SUNW,Netra-CP2300" - -/* - * check if the code is running on correct chassis or not. - * return : - * 0 - if we are on Snowbird - * -1 - if we are on wrong system - * if there is any error - */ -int -fruaccess_platmod_check_chassis() -{ - picl_nodehdl_t chassish; - char chassis_type[PICL_PROPNAMELEN_MAX]; - - if (ptree_get_node_by_path(PICL_FRUTREE_CHASSIS, - &chassish) != PICL_SUCCESS) { - return (-1); - } - - if (ptree_get_propval_by_name(chassish, PICL_PROP_CHASSIS_TYPE, - chassis_type, sizeof (chassis_type)) != PICL_SUCCESS) { - return (-1); - } - - if (strcmp(chassis_type, SNOWBIRD) == 0) { - return (0); - } else { - return (-1); - } -} - -/* - * intialize the format structure, fill in src and dest addresses - */ -picl_errno_t -fruaccess_platmod_init_format(uint8_t slot_no, format_t *fru_format) -{ - /* initialize src and dest addresses */ - fru_format->src = IPMB_ADDR(slot_no); - fru_format->dest = fru_format->src; - return (PICL_SUCCESS); -} - -/* - * do all valid checks for fru - * return : 0 if we can probe for fru - * -1 if probing is not required - */ -int -fruaccess_platmod_check_fru(picl_nodehdl_t parenth) -{ - int retval; - char type[PICL_PROPSIZE_MAX]; - picl_nodehdl_t chassish, loc_parenth; - - retval = ptree_get_propval_by_name(parenth, PICL_PROP_SLOT_TYPE, - (void *)type, PICL_PROPSIZE_MAX); - if (retval != PICL_SUCCESS) { - return (-1); - } - - /* check only for pci and cpci slots */ - if ((strcmp(type, PICL_SLOT_CPCI) != 0) && - (strcmp(type, PICL_SLOT_PCI) != 0)) { - return (-1); - } - - /* check if location is direct parent of chassis or not */ - if (ptree_get_node_by_path(PICL_FRUTREE_CHASSIS, - &chassish) != PICL_SUCCESS) { - return (-1); - } - - retval = ptree_get_propval_by_name(parenth, PICL_PROP_PARENT, - (void *)&loc_parenth, sizeof (loc_parenth)); - if (retval != PICL_SUCCESS) { - return (-1); - } - - if (chassish != loc_parenth) { - return (-1); - } - return (0); -} diff --git a/usr/src/cmd/picl/plugins/sun4u/snowbird/lib/fruaccess/piclsdr.c b/usr/src/cmd/picl/plugins/sun4u/snowbird/lib/fruaccess/piclsdr.c deleted file mode 100644 index 41efb7ee61..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/snowbird/lib/fruaccess/piclsdr.c +++ /dev/null @@ -1,343 +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" - -/* - * Read the SDR information on a board and get the device id to - * read the FRUID information - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "fru_access_impl.h" - -#define POLL_TIMEOUT 10000 /* 20 sec */ -#define SEQUENCE 10 - -#define IPMI_GET_SDR_INFO 0x20 -#define IPMI_SENSOR_NETFN 0x4 -#define SDR_INFO_RESPONSE_SZ_MIN 10 - -#define NUM_OF_LUN 4 -#define SUN_FRU "SUN FRU SDR" -#define FRU_DEVICE_SDR_TYPE 0x11 -#define IPMI_SDR_VERSION 0x51 -#define IPMI_DATA_OFFSET 7 -#define IPMI_GET_SDR_INFO_CMD 0x20 -#define SDR_BUFFER_LEN_MAX 100 - -typedef struct { - uint8_t src; - uint8_t dest; - uint8_t lun; - uint8_t record_id_lsb; - uint8_t record_id_msb; - int offset; - int length; - char *buffer; -} sdr_info_t; - -static int get_sdr_info(int, int, uint8_t lun); -static int get_sdr(sdr_info_t *); -static int get_sun_sdr(int, uint8_t, uint8_t, uint8_t); - -/* - * bug in smc f/w - * - * static int lun_mask[4] = { 0x01, 0x02, 0x04, 0x08 }; - */ - -/* - * routine to read the onboard/remote device SDR information - */ -void -get_fru_data_info(int src, int dest, format_t *fru_format) -{ - int ret; - - src = IPMB_ADDR(src); - dest = IPMB_ADDR(dest); - - if (src != dest) { /* ipmi */ - int i = 0; - for (i = 0; i < NUM_OF_LUN; i++) { /* for each lun */ - ret = get_sdr_info(src, dest, i); - if (ret > 0) { - ret = get_sun_sdr(ret, src, dest, i); - if (ret > 0) { - fru_format->format |= SUN_FORMAT; - fru_format->sun_device_id = ret; - fru_format->sun_lun = i; - break; - } - } - } - } else { /* on board */ - ret = get_sdr_info(src, dest, 0); - if (ret > 0) { - ret = get_sun_sdr(ret, src, dest, 0); - if (ret > 0) { - fru_format->format |= SUN_FORMAT; - fru_format->sun_device_id = ret; - fru_format->sun_lun = 0; - } - } - } -} - -/* - * read the onboard sdr information - */ -static int -get_onboard_sdr(sdr_info_t *sdr) -{ - sc_reqmsg_t req_pkt; - sc_rspmsg_t res_pkt; - - SC_MSG_CMD(&req_pkt) = SMC_DEVICE_SDR_GET; - SC_MSG_LEN(&req_pkt) = 6; - SC_MSG_ID(&req_pkt) = SEQUENCE; - - /* data for request packet */ - req_pkt.data[0] = 0x0; - req_pkt.data[1] = 0x0; - req_pkt.data[2] = sdr->record_id_lsb; - req_pkt.data[3] = sdr->record_id_msb; - req_pkt.data[4] = sdr->offset; - req_pkt.data[5] = sdr->length; - - if (smc_send_msg(DEFAULT_FD, &req_pkt, &res_pkt, - POLL_TIMEOUT) != SMC_SUCCESS) { - return (-1); - } - - bzero(sdr->buffer, SDR_BUFFER_LEN_MAX); - (void) memcpy(sdr->buffer, res_pkt.data, res_pkt.hdr.len); - return (0); -} - -/* - * get the sdr information - */ -static int -get_sdr_info(int src, int dest, uint8_t lun) -{ - sc_reqmsg_t req_pkt; - sc_rspmsg_t res_pkt; - - if (lun >= NUM_OF_LUN) { - return (-1); - } - - if (src == dest) { /* onboard */ - SC_MSG_CMD(&req_pkt) = SMC_DEVICE_SDR_INFO_GET; - SC_MSG_LEN(&req_pkt) = 0; - SC_MSG_ID(&req_pkt) = SEQUENCE; - if (smc_send_msg(DEFAULT_FD, &req_pkt, &res_pkt, - POLL_TIMEOUT) != SMC_SUCCESS) { - return (-1); - } - return (res_pkt.data[0]); - } - - /* ipmb access */ - (void) smc_init_ipmi_msg(&req_pkt, IPMI_GET_SDR_INFO_CMD, - FRUACCESS_MSG_ID, 0, NULL, DEFAULT_SEQN, dest, - SMC_NETFN_SENSOR_REQ, lun); - - if (smc_send_msg(DEFAULT_FD, &req_pkt, &res_pkt, - POLL_TIMEOUT) != SMC_SUCCESS) { - return (-1); - } - - /* completion code */ - if (res_pkt.data[IPMI_DATA_OFFSET] != 0) { - return (-1); - } - - /* - * Known bug in SMC f/w. take this out for next release - * if ((res_pkt.data[IPMI_DATA_OFFSET + 2] & lun_mask[lun]) != 1) { - * return (0); - * } - */ - return (res_pkt.data[IPMI_DATA_OFFSET + 1]); -} - -static int -get_sun_sdr(int num_records, uint8_t src, uint8_t dest, uint8_t lun) -{ - int i, ret; - sdr_info_t sdr; - char data[SDR_BUFFER_LEN_MAX]; - uint8_t next_record_lsb; - uint8_t next_record_msb; - - sdr.src = src; - sdr.dest = dest; - sdr.lun = lun; - sdr.buffer = data; - - /* get the first record info */ - next_record_lsb = 0x0; - next_record_msb = 0x0; - sdr.length = 4; - sdr.offset = 0x0; - - if (src == dest) { /* onboard */ - for (i = 0; i < num_records; i++) { - sdr.record_id_lsb = next_record_lsb; - sdr.record_id_msb = next_record_msb; - - if ((ret = get_onboard_sdr(&sdr)) < 0) { - return (ret); - } - - next_record_lsb = data[0]; - next_record_msb = data[1]; - if (data[4] != IPMI_SDR_VERSION) { - return (-1); - } - - if (data[5] == FRU_DEVICE_SDR_TYPE) { - sdr.offset = 0x10; - sdr.length = strlen(SUN_FRU); - if ((ret = get_onboard_sdr(&sdr)) < 0) { - return (ret); - } - - /* first two bytes of response is reserv. id */ - if (strncmp(SUN_FRU, &data[2], - strlen(SUN_FRU)) == 0) { - /* found sun sdr */ - sdr.offset = 0x0; - sdr.length = 7; - if ((ret = get_onboard_sdr(&sdr)) < 0) { - return (ret); - } - return (data[8]); - } - } - } - return (-1); - } - - /* ipmb access */ - /* traverse thru all the records until we find sun sdr */ - for (i = 0; i < num_records; i++) { - - sdr.record_id_lsb = next_record_lsb; - sdr.record_id_msb = next_record_msb; - - if ((ret = get_sdr(&sdr)) < 0) { - return (ret); - } - - /* completion code */ - if (data[IPMI_DATA_OFFSET] != 0) { - return (-1); - } - next_record_lsb = data[IPMI_DATA_OFFSET + 1]; - next_record_msb = data[IPMI_DATA_OFFSET + 2]; - - if (data[IPMI_DATA_OFFSET + 5] != IPMI_SDR_VERSION) { - return (-1); - } - - if (data[IPMI_DATA_OFFSET + 6] == FRU_DEVICE_SDR_TYPE) { - - sdr.offset = 0x10; - sdr.length = strlen(SUN_FRU); - if ((ret = get_sdr(&sdr)) < 0) { - return (ret); - } - - /* completion code */ - if (data[IPMI_DATA_OFFSET] != 0) { - return (-1); - } - - if (strncmp(&data[IPMI_DATA_OFFSET+ 3], - SUN_FRU, strlen(SUN_FRU)) == 0) { - /* found sun sdr */ - sdr.offset = 0x0; - sdr.length = 7; - if ((ret = get_sdr(&sdr)) < 0) { - return (ret); - } - - /* completion code */ - if (data[IPMI_DATA_OFFSET] != 0) { - return (-1); - } - return (data[IPMI_DATA_OFFSET + 9]); - } - } - } - return (-1); -} - -static int -get_sdr(sdr_info_t *sdr) -{ - sc_reqmsg_t req_pkt; - sc_rspmsg_t res_pkt; - uint8_t datap[6]; - - if (sdr->lun > 3) { - return (-1); - } - - /* data for request packet */ - datap[0] = 0x0; /* reserved */ - datap[1] = 0x0; /* reserved */ - datap[2] = sdr->record_id_lsb; - datap[3] = sdr->record_id_msb; - datap[4] = sdr->offset; - datap[5] = sdr->length; - - (void) smc_init_ipmi_msg(&req_pkt, SMC_GET_DEVICE_SDR, - FRUACCESS_MSG_ID, 6, datap, DEFAULT_SEQN, - sdr->dest, SMC_NETFN_SENSOR_REQ, sdr->lun); - - if (smc_send_msg(DEFAULT_FD, &req_pkt, &res_pkt, - POLL_TIMEOUT) != SMC_SUCCESS) { - return (-1); - } - bzero(sdr->buffer, SDR_BUFFER_LEN_MAX); - (void) memcpy(sdr->buffer, res_pkt.data, res_pkt.hdr.len); - return (0); -} diff --git a/usr/src/cmd/picl/plugins/sun4u/snowbird/lib/fruaccess/piclsmc.c b/usr/src/cmd/picl/plugins/sun4u/snowbird/lib/fruaccess/piclsmc.c deleted file mode 100644 index d30e610691..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/snowbird/lib/fruaccess/piclsmc.c +++ /dev/null @@ -1,997 +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" - -/* - * These routines in this file are used to interact with SMC driver to - * read and write FRUID data - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "fru_access_impl.h" - -#define POLL_TIMEOUT 10000 -#define FRUID_CHECK_POLL_TIMEOUT 5000 -#define SIZE_TO_READ_WRITE 20 - -/* IPMI fru spec Storage definition version 1.0, rev 1.1 */ -#define IPMI_COMMON_HEADER_SIZE 8 -#define IPMI_VERSION 1 -#define CMN_HDR_VERSION_MASK 0x0 -#define CMN_HDR_OFFSET 0x0 -#define BD_MFR_OFFSET 6 -#define BD_FIELDS_SIZE 6 -#define AREA_TERMINATION_INDICATOR 0xc1 - -/* type encoding */ -#define BINARY_TYPE 0x0 -#define BCDPLUS_TYPE 0x1 -#define SIX_BITASCII_TYPE 0x2 -#define UNICODE_TYPE 0x3 - -/* for ascii conversion */ -#define ASCII_MAP 0x20 -#define BIT_MASK1 0x3f -#define BIT_MASK2 0x0f -#define BIT_MASK3 0x03 - -#define SUN_NAME "SUN MICROSYSTEMS, INC." -#define SUN_JEDEC_CODE 0x3e -#define MANR_MAX_LENGTH 80 -#define FRU_DATA_MAX_SIZE 100 - -/* IPMI commands */ -#define IPMI_GET_DEVICE_ID 0x1 -#define FRU_DEVICE_ID 0x0 -#define READ_FRU_INVENTORY_INFO 0x10 -#define READ_FRU_INVENTORY_DATA 0x11 -#define WRITE_FRU_INVENTORY_DATA 0x12 - -#define TMP_BUFFER_SIZE 10 -#define BYTE_TO_READ_SUN_CHK 5 - -typedef struct { - uint8_t internal; /* internal use area */ - uint8_t chassis; /* chassis info area */ - uint8_t board; /* board area */ - uint8_t product; /* product info area */ - uint8_t records; /* multirecord area */ -} fruid_offset_t; - -extern void get_fru_data_info(int, int, format_t *); -static void convert_to_ascii(uint8_t [], uint8_t [], int, int); -static void bcdplus_to_ascii(uint8_t [], uint8_t [], int); -static time_t get_utc_time(uint8_t []); -static uint8_t cpu_no = 0; - -/* - * Routine to read FRUID information from BMC - */ -static int -get_alarm_fru_data(int offset, int size, void *buffer, format_t *format) -{ - uint8_t datap[5]; - sc_reqmsg_t req_pkt; - sc_rspmsg_t res_pkt; - - if (buffer == NULL) { - return (-1); - } - bzero(buffer, size); - - datap[0] = 0x7; /* bus id */ - datap[1] = 0xa0; /* slave address */ - datap[2] = size; /* count */ - datap[3] = offset >> 8; /* MSB */ - datap[4] = (uint8_t)offset; /* LSB */ - - (void) smc_init_ipmi_msg(&req_pkt, SMC_MASTER_WR_RD_I2C, - FRUACCESS_MSG_ID, 5, datap, DEFAULT_SEQN, format->dest, - SMC_NETFN_APP_REQ, SMC_BMC_LUN); - - if (smc_send_msg(DEFAULT_FD, &req_pkt, &res_pkt, - POLL_TIMEOUT) != SMC_SUCCESS) { - return (-1); - } - /* check the completion code */ - if (res_pkt.data[7] != 0) { - return (-1); - } - - (void) memcpy(buffer, &(res_pkt.data[8]), size); - return (0); -} - -/* - * Routine to read FRUID information from other boards - */ -static int -get_fru_data(int offset, int size, void *buffer, format_t *format) -{ - sc_reqmsg_t req_pkt; - sc_rspmsg_t res_pkt; - uint8_t datap[4]; - int ipmi = 0; - - if (buffer == NULL) { - return (-1); - } - - /* figure out if onboard access or ipmb access */ - if (format->src == format->dest) { - ipmi = 0; - } else { - ipmi = 1; - } - - switch (ipmi) { - - case 0: /* on board info (local i2c) */ - - SC_MSG_CMD(&req_pkt) = SMC_EEPROM_READ; - SC_MSG_LEN(&req_pkt) = 4; - SC_MSG_ID(&req_pkt) = FRUACCESS_MSG_ID; - - /* data field for request */ - req_pkt.data[0] = format->sun_device_id; /* device id */ - req_pkt.data[1] = (uint8_t)offset; /* (LSB) */ - req_pkt.data[3] = size; - - if (format->format == SUN_FORMAT) { - req_pkt.data[2] = offset >> 8; - } else { - req_pkt.data[2] = 0x0; /* (MSB) always 0x0 for IPMI */ - } - - /* make a call to smc library to send cmd */ - if (smc_send_msg(DEFAULT_FD, &req_pkt, &res_pkt, - POLL_TIMEOUT) != SMC_SUCCESS) { - return (-1); - } - - if (SC_MSG_LEN(&res_pkt) != size) { - return (-1); - } - (void) memcpy(buffer, res_pkt.data, size); - return (0); - - default: - - /* data for request packet */ - datap[0] = format->sun_device_id; /* device id */ - datap[1] = (uint8_t)offset; /* LSB */ - datap[3] = size; /* bytes to read */ - if (format->format == SUN_FORMAT) { - datap[2] = offset >> 8; - } else { - datap[2] = 0x0; /* (MSB) always 0x0 for IPMI */ - } - - (void) smc_init_ipmi_msg(&req_pkt, READ_FRU_INVENTORY_DATA, - FRUACCESS_MSG_ID, 4, datap, DEFAULT_SEQN, - format->dest, SMC_NETFN_STORAGE_REQ, format->sun_lun); - - if (smc_send_msg(DEFAULT_FD, &req_pkt, &res_pkt, - POLL_TIMEOUT) != SMC_SUCCESS) { - return (-1); - } - /* check the completion code */ - if (res_pkt.data[7] != 0) { - return (-1); - } - - /* check the size */ - if (res_pkt.data[8] != size) { - return (-1); - } - - (void) memcpy(buffer, &(res_pkt.data[9]), size); - return (0); - } -} - -/* - * routine to read the IPMI common header field - */ -static int -read_common_header(fruid_offset_t *offset, format_t *format) -{ - int ret = 0; - uint8_t data[FRU_DATA_MAX_SIZE]; - - ret = get_fru_data(CMN_HDR_OFFSET, IPMI_COMMON_HEADER_SIZE, data, - format); - if (ret < 0) { - return (-1); - } - - /* version check */ - if ((data[0] | CMN_HDR_VERSION_MASK) != 1) { - return (-1); - } - - offset->internal = data[1] * 8; - offset->chassis = data[2] * 8; - offset->board = data[3] * 8; - offset->product = data[4] * 8; - offset->records = data[5] * 8; - - return (0); -} - -/* - * Read the values of each field based on FORMAT - */ -/* ARGSUSED */ -static int -read_bd_fields(uint8_t *field, int offset, format_t *format) -{ - - int ret, encode_type = 0x0, len, length, extra_bytes, alloc_size; - uint8_t *store; - uint8_t data[FRU_DATA_MAX_SIZE]; - - bzero(field, MANR_MAX_LENGTH); - - ret = get_fru_data(offset, BD_FIELDS_SIZE, data, format); - if (ret < 0) { - return (-1); - } - - if (data[0] == AREA_TERMINATION_INDICATOR) { - return (0); - } - - encode_type = data[0] >> 6; - len = data[0] & 0x3f; - if (len <= 0) { - return (0); - } - - ret = get_fru_data(offset+1, len, data, format); - if (ret < 0) { - return (-1); - } - - switch (encode_type) { - - case SIX_BITASCII_TYPE: - - length = len - (len % 3); - extra_bytes = len % 3; - alloc_size = ((length/3) * 4) + extra_bytes; - store = (uint8_t *)malloc(sizeof (uint8_t) * alloc_size); - if (store == NULL) { - return (-1); - } - convert_to_ascii(data, store, len, extra_bytes); - break; - - case BCDPLUS_TYPE: - - alloc_size = len * 2; - store = (uint8_t *)malloc(sizeof (uint8_t) * alloc_size); - if (store == NULL) { - return (-1); - } - - bcdplus_to_ascii(data, store, len); - break; - - case BINARY_TYPE: - case UNICODE_TYPE: - default: - return (-1); - } - - (void) memcpy(field, store, alloc_size); - free(store); - return (len); -} - -static int -read_board_info(uint8_t board_offset, payload_t *manr, format_t *format) -{ - time_t time; - uint8_t *buffer; - uint8_t mfg_time[4]; - uint8_t data[FRU_DATA_MAX_SIZE]; - int ret = 0, current_offset = 0x0; - int bd_area_len = 0; - - /* read version, length, lang code, mfg. time */ - ret = get_fru_data(board_offset, BD_FIELDS_SIZE, data, format); - - if (ret < 0) { - return (-1); - } - - /* version check */ - if ((data[0] | CMN_HDR_VERSION_MASK) != 1) { - return (-1); - } - - /* byte 2 is lang code */ - bd_area_len = data[1] * 8; - mfg_time[3] = data[3]; - mfg_time[2] = data[4]; - mfg_time[1] = data[5]; - mfg_time[0] = 0x0; - time = get_utc_time(mfg_time); - - /* fill the timestamp into manr */ - (void) memcpy(manr->timestamp, &time, MANR_TIME_LEN); - - if (bd_area_len < BD_MFR_OFFSET) { - return (-1); - } - buffer = (uint8_t *)malloc(sizeof (uint8_t) * MANR_MAX_LENGTH); - if (buffer == NULL) { - return (-1); - } - - /* read the board info */ - current_offset += board_offset + BD_MFR_OFFSET; - current_offset += read_bd_fields(buffer, current_offset, format); - - if (strncmp(SUN_NAME, (char *)buffer, sizeof (SUN_NAME)) == 0) { - manr->vendor_name[0] = 0x00; - manr->vendor_name[1] = 0x3e; - } else { - manr->vendor_name[0] = 0x00; - manr->vendor_name[1] = 0x00; - } - - current_offset += 1; /* for length/type field */ - - current_offset += read_bd_fields(buffer, current_offset, format); - current_offset += 1; /* for length/type field */ - (void) memcpy(manr->fru_short_name, buffer, MANR_FRUNAME_LEN); - - current_offset += read_bd_fields(buffer, current_offset, format); - current_offset += 1; /* for length/type field */ - (void) memcpy(manr->sun_serial_no, buffer, MANR_SERIALNUM_LEN); - - current_offset += read_bd_fields(buffer, current_offset, format); - current_offset += 1; /* for length/type field */ - (void) memcpy(manr->sun_part_no, buffer, MANR_PARTNUM_LEN); - - /* - * We dont need the FRU FILE ID, so just skip the field - * and get the offset to read the custom MFG. info fields - */ - current_offset += read_bd_fields(buffer, current_offset, format); - current_offset += 1; /* for length/type field */ - - current_offset += read_bd_fields(buffer, current_offset, format); - current_offset += 1; /* for length/type field */ - - /* read the custom mfg. info fields */ - current_offset += read_bd_fields(buffer, current_offset, format); - current_offset += 1; /* for length/type field */ - (void) memcpy(manr->manufacture_loc, buffer, MANR_MFRLOC_LEN); - - current_offset += read_bd_fields(buffer, current_offset, format); - (void) memcpy(manr->fru_descr, buffer, MANR_FRUDESCR_LEN); - - free(buffer); - return (0); -} - -/* - * Read the IPMI information from hardware and translate it into - * MANR(SUN format) - */ -int -get_manr(format_t *format, payload_t *manr) -{ - int ret = 0; - fruid_offset_t *offset = NULL; - - offset = (fruid_offset_t *)malloc(sizeof (fruid_offset_t)); - if (offset == NULL) { - return (-1); - } - - ret = read_common_header(offset, format); - if (ret != 0) { - free(offset); - return (-1); - } - - if (offset->board != 0) { - ret = read_board_info(offset->board, manr, format); - } - - free(offset); - return (ret); -} - -static void -convert_to_ascii(uint8_t data [], uint8_t store[], - int length, int extra_bytes) -{ - uint8_t x, y; - int index = 0; - int i, idx = length - (length % 3); - - for (i = 0; ; i += 3) { - - x = 0x0; - y = 0x0; - - if (i == idx && extra_bytes == 0) { - break; - } - - /* get the first six bits */ - x = (data[i] & BIT_MASK1); - x += ASCII_MAP; - store[index] = x; - - if (i == idx && extra_bytes == 1) { - break; - } - - /* - * get last 2 bits of first byte and first - * 4 bits of second byte - */ - - x = (data[i] >> 6); - y = (data[i + 1] & BIT_MASK2) << 2; - x |= y + ASCII_MAP; - store[index+1] = x; - - if (i == idx) { - break; - } - - /* get last 4 bits of second byte and 2 bits of last byte */ - x = data[i + 1] >> 4; - y = (data[i + 2] & BIT_MASK3) << 4; - x |= y + ASCII_MAP; - store[index+2] = x; - - /* get last six bits of third byte */ - store[index + 3] = (data[i + 2] >> 2) + ASCII_MAP; - index += 4; - } -} - -static void -bcdplus_to_ascii(uint8_t data[], uint8_t store[], int len) -{ - int i, j, index = 0; - uint8_t tmp = 0; - - struct { - int a:4; - int b:4; - } val; - - for (i = 0; i < len; i++) { - (void) memcpy(&val, &data[i], 1); - for (j = 0; j < 2; j++) { - if (j == 0) { - tmp = val.a; - } else - tmp = val.b; - - if (tmp <= 9) { - /* ascii conversion */ - store[index++] = tmp + 48; - continue; - } - - switch (tmp) { - - case 0xa: - store[index++] = ' '; - break; - case 0xb: - store[index++] = '-'; - break; - case 0xc: - store[index++] = '.'; - break; - default: - store[index++] = ' '; - } - } - } -} - -/* converts ipmi format time to UTC time (unix 32 bit timestamp) */ -static time_t -get_utc_time(uint8_t data []) -{ - time_t time; - struct tm tm1; - uint32_t ipmi_time; - - (void) memcpy(&ipmi_time, data, 4); - - ipmi_time *= 60; /* convert into seconds */ - - /* get UTC time for 0:00 1/1/96 (ipmi epoch) */ - tm1.tm_sec = 0; - tm1.tm_min = 0; - tm1.tm_hour = 0; - tm1.tm_mday = 1; - tm1.tm_mon = 0; - tm1.tm_year = 96; - - time = mktime(&tm1); - time += ipmi_time; - - return (time); -} - -/* - * routine to write information to BMC - */ -static int -write_alarm_fru_data(const void *buffer, size_t size, - off_t offset, format_t *format) -{ - sc_reqmsg_t req_pkt; - sc_rspmsg_t res_pkt; - uint8_t *datap = NULL; - - if (buffer == NULL) { - return (-1); - } - datap = (uint8_t *)malloc(sizeof (uint8_t) * (size + 5)); - if (datap == NULL) { - return (-1); - } - - datap[0] = 0x7; /* bus id */ - datap[1] = 0xa0; /* slave address */ - datap[2] = 0; /* count */ - datap[3] = offset >> 8; /* MSB */ - datap[4] = (uint8_t)offset; /* LSB */ - (void) memcpy((void *)&(datap[5]), buffer, size); - - /* initialize ipmi request packet */ - (void) smc_init_ipmi_msg(&req_pkt, SMC_MASTER_WR_RD_I2C, - FRUACCESS_MSG_ID, (5 + size), datap, DEFAULT_SEQN, - format->dest, SMC_NETFN_APP_REQ, SMC_BMC_LUN); - free(datap); - - /* send ipmi request packet */ - if (smc_send_msg(DEFAULT_FD, &req_pkt, &res_pkt, - POLL_TIMEOUT) != SMC_SUCCESS) { - return (-1); - } - /* check the completion code */ - if (res_pkt.data[7] != 0) { - return (-1); - } - return (0); -} - -static int -write_fru_data(const void *buffer, size_t size, - off_t offset, format_t *format) -{ - int ipmi = 0; - sc_reqmsg_t req_pkt; - sc_rspmsg_t res_pkt; - uint8_t *datap = NULL; - - if (buffer == NULL) { - return (-1); - } - - if (format->src == format->dest) { - ipmi = 0; - } else { - ipmi = 1; - } - - switch (ipmi) { - - case 0: /* on board info (local i2c) */ - - SC_MSG_CMD(&req_pkt) = SMC_EEPROM_WRITE; - SC_MSG_LEN(&req_pkt) = 4 + size; - SC_MSG_ID(&req_pkt) = FRUACCESS_MSG_ID; - - /* data field for request */ - req_pkt.data[0] = format->sun_device_id; /* device id */ - req_pkt.data[1] = offset; /* (LSB) */ - req_pkt.data[3] = size; - if (format->format == SUN_FORMAT) { - req_pkt.data[2] = offset >> 8; - } else { - req_pkt.data[2] = 0x0; /* (MSB) always 0x0 for IPMI */ - } - (void) memcpy((void *)&(req_pkt.data[4]), buffer, size); - - /* make a call to smc library to send cmd */ - if (smc_send_msg(DEFAULT_FD, &req_pkt, &res_pkt, - POLL_TIMEOUT) != SMC_SUCCESS) { - return (-1); - } - break; - - default: /* read data from remote device (ipmi) */ - datap = (uint8_t *)malloc(sizeof (uint8_t) * (size + 4)); - if (datap == NULL) { - return (-1); - } - - datap[0] = format->sun_device_id; /* device id */ - datap[1] = offset; /* LSB */ - datap[3] = size; /* nbytes */ - if (format->format == SUN_FORMAT) { - datap[2] = offset >> 8; - } else { - datap[2] = 0x0; /* (MSB) always 0x0 for IPMI */ - } - (void) memcpy((void *)&(datap[4]), buffer, size); - - (void) smc_init_ipmi_msg(&req_pkt, WRITE_FRU_INVENTORY_DATA, - FRUACCESS_MSG_ID, (4 + size), datap, DEFAULT_SEQN, - format->dest, SMC_NETFN_STORAGE_REQ, format->sun_lun); - free(datap); - - if (smc_send_msg(DEFAULT_FD, &req_pkt, &res_pkt, - POLL_TIMEOUT) != SMC_SUCCESS) { - return (-1); - } - /* check the completion code */ - if (res_pkt.data[7] != 0) { - return (-1); - } - break; - } /* end of switch */ - return (0); -} - -/* - * This routine splits the data to write into smaller chunks and - * write it to FRUID chip using SMC drv APIs - */ - -/* ARGSUSED */ -ssize_t -pwrite_new(int fd, const void *buffer, size_t size, - off_t offset, format_t *format) -{ - int ret; - int index = 0; - size_t bytes = 0; - off_t next_offset = 0x0; - off_t curr_offset = offset; - size_t bytes_to_write = size; - uint8_t *data; - int retry = 3; - int (* func_ptr)(const void *, size_t, off_t, format_t *); - - if (format->dest == 0x20) { - func_ptr = write_alarm_fru_data; - } else { - func_ptr = write_fru_data; - } - - data = (uint8_t *)buffer; - while (bytes_to_write != 0) { - - retry = 3; - ret = 1; - - if (bytes_to_write > SIZE_TO_READ_WRITE) { - bytes = SIZE_TO_READ_WRITE; - next_offset = curr_offset + SIZE_TO_READ_WRITE; - } else { - bytes = bytes_to_write; - } - - bytes_to_write = bytes_to_write - bytes; - while ((ret != 0) && (retry != 0)) { - ret = (*func_ptr)((void *)&data[index], - bytes, curr_offset, format); - retry--; - } - if (ret != 0) { - return (ret); - } - index = index + bytes; - curr_offset = next_offset; - } - return (size); -} - -/* - * This routine reads the data in smaller chunks and - * sends it to upper layer(frudata plugin) in the sw stack - */ -/* ARGSUSED */ -ssize_t -pread_new(int fd, void *buffer, size_t size, - off_t offset, format_t *format) -{ - int ret; - int index = 0; - size_t bytes = 0; - off_t next_offset = 0x0; - off_t curr_offset = offset; - size_t bytes_to_read = size; - uint8_t *data; - int retry = 3; - int (* func_ptr)(int, int, void *, format_t *); - - if (format->dest == 0x20) { - func_ptr = get_alarm_fru_data; - } else { - func_ptr = get_fru_data; - } - - data = (uint8_t *)buffer; - - while (bytes_to_read != 0) { - - retry = 3; - ret = 1; - - if (bytes_to_read > SIZE_TO_READ_WRITE) { - bytes = SIZE_TO_READ_WRITE; - next_offset = curr_offset + SIZE_TO_READ_WRITE; - } else { - bytes = bytes_to_read; - } - - bytes_to_read = bytes_to_read - bytes; - - while ((ret != 0) && (retry != 0)) { - ret = (* func_ptr)(curr_offset, bytes, - (void *) &data[index], format); - retry--; - } - if (ret != 0) { - return (ret); - } - index = index + bytes; - curr_offset = next_offset; - } - return (size); -} - -/* - * routine to check if IPMI fruid info is available, - * return 0: IPMI fruid not present - * return 1: IPMI fruid present - */ -static int -is_ipmi_fru_data_available(int src, int dest) -{ - sc_reqmsg_t req_pkt; - sc_rspmsg_t res_pkt; - uint8_t datap[5]; - - /* on board access */ - if (src == dest) { - - SC_MSG_CMD(&req_pkt) = SMC_EEPROM_READ; - SC_MSG_LEN(&req_pkt) = 4; - SC_MSG_ID(&req_pkt) = FRUACCESS_MSG_ID; - - /* data field for request */ - req_pkt.data[0] = 0x0; /* eeprom number (ipmi format) */ - req_pkt.data[1] = CMN_HDR_OFFSET; /* (LSB) */ - req_pkt.data[2] = 0x0; /* (MSB) always 0x0 for IPMI */ - req_pkt.data[3] = IPMI_COMMON_HEADER_SIZE; - - /* make a call to smc library to send cmd */ - if (smc_send_msg(DEFAULT_FD, &req_pkt, &res_pkt, - POLL_TIMEOUT) != SMC_SUCCESS) { - return (0); - } - - /* version check */ - if (res_pkt.data[0] != IPMI_VERSION) { - return (0); - } else { - return (1); - } - } - - /* ipmi access */ - datap[0] = FRU_DEVICE_ID; /* fru device id - always */ - datap[1] = 0x0; /* LSB */ - datap[2] = 0x0; /* MSB */ - datap[3] = 8; /* bytes to read */ - - (void) smc_init_ipmi_msg(&req_pkt, READ_FRU_INVENTORY_DATA, - FRUACCESS_MSG_ID, 4, datap, DEFAULT_SEQN, - IPMB_ADDR(dest), SMC_NETFN_STORAGE_REQ, SMC_BMC_LUN); - - if (smc_send_msg(DEFAULT_FD, &req_pkt, &res_pkt, - FRUID_CHECK_POLL_TIMEOUT) != SMC_SUCCESS) { - return (0); - } - - if (res_pkt.data[9] == IPMI_VERSION) { - return (1); - } else { - return (0); - } -} - -/* - * routine to check if fruid info is available on BMC, - * return 0: fruid not present - * return 1: fruid present - */ -static int -is_alarm_frudata_available(format_t *fru_format) -{ - int ret; - char buffer[TMP_BUFFER_SIZE]; - int fd = -1; - format_t format; - - bzero(buffer, sizeof (buffer)); - format.src = fru_format->src; - format.dest = fru_format->dest; - format.sun_device_id = 0x0; - format.sun_lun = 0x0; - format.format |= SUN_FORMAT; - - /* passing dummy fd */ - /* for now read the first 3 bytes and check the info */ - ret = pread_new(fd, (void *) buffer, 3, STATIC_OFFSET, &format); - if (ret < 0) { - return (0); - } - - if (buffer[0] != SECTION_HDR_TAG) { - fru_format->format = NO_FRUDATA; - return (0); - } - - fru_format->format = SUN_FORMAT; - fru_format->sun_device_id = 0x0; - fru_format->sun_lun = 0x0; - return (1); -} - -/* - * checks if the remote device intelligent device (IPMI capable) or not - * return 0: not ipmi capable - * return 1: ipmi capable - */ -static int -is_ipmi_capable(int src, int dest) -{ - sc_reqmsg_t req_pkt; - sc_rspmsg_t res_pkt; - - if (src == dest) { - return (1); - } - - (void) smc_init_ipmi_msg(&req_pkt, IPMI_GET_DEVICE_ID, - FRUACCESS_MSG_ID, 0, NULL, DEFAULT_SEQN, - IPMB_ADDR(dest), SMC_NETFN_APP_REQ, SMC_BMC_LUN); - - if (smc_send_msg(DEFAULT_FD, &req_pkt, &res_pkt, - FRUID_CHECK_POLL_TIMEOUT) != SMC_SUCCESS) { - return (0); - } - return (1); /* got response */ -} - -int -is_fru_data_available(int precedence, int slot_no, format_t *fru_format) -{ - int ret, fd = 0; - uint8_t data[TMP_BUFFER_SIZE]; - - fru_format->format = NO_FRUDATA; - if (fru_format->dest == 0x20) { /* alarm card */ - ret = is_alarm_frudata_available(fru_format); - return (ret); - } - - if (cpu_no == 0) { /* get the geo_addr */ - sc_reqmsg_t req_pkt; - sc_rspmsg_t rsp_pkt; - uint8_t size = 0; - - /* initialize the request packet */ - (void) smc_init_smc_msg(&req_pkt, - SMC_GET_GEOGRAPHICAL_ADDRESS, DEFAULT_SEQN, size); - /* make a call to smc library to send cmd */ - if (smc_send_msg(DEFAULT_FD, &req_pkt, &rsp_pkt, - POLL_TIMEOUT) != SMC_SUCCESS) { - return (0); - } - if (SC_MSG_LEN(&rsp_pkt) == 0) { - return (0); - } - cpu_no = rsp_pkt.data[0]; - } - - /* check if it is IPMI intelligent or not */ - if (slot_no != cpu_no) { - ret = is_ipmi_capable(cpu_no, slot_no); - if (ret == 0) { /* dumb I/O card */ - return (0); - } - } - - /* check if ipmi frudata is present or not */ - ret = is_ipmi_fru_data_available(cpu_no, slot_no); - if (ret == 1) { - fru_format->format |= IPMI_FORMAT; - fru_format->sun_device_id = 0x0; - fru_format->sun_lun = 0x0; - - /* no need to look for sun format */ - if (precedence == IPMI_FORMAT) { - return (fru_format->format); - } - } - - /* check if sun fruid is present */ - get_fru_data_info(cpu_no, slot_no, fru_format); - /* check the hdr version */ - if (fru_format->format & SUN_FORMAT) { - ret = pread_new(fd, &data, BYTE_TO_READ_SUN_CHK, - STATIC_OFFSET, fru_format); - if (ret != BYTE_TO_READ_SUN_CHK) { - fru_format->format = fru_format->format & - (~ (SUN_FORMAT)); - fru_format->sun_device_id = 0x0; - fru_format->sun_lun = 0x0; - } - if (data[0] != SECTION_HDR_TAG) { - fru_format->format = fru_format->format & - (~ (SUN_FORMAT)); - fru_format->sun_device_id = 0x0; - fru_format->sun_lun = 0x0; - } - } - return (fru_format->format); -} diff --git a/usr/src/cmd/picl/plugins/sun4u/snowbird/lib/libctsmc/Makefile b/usr/src/cmd/picl/plugins/sun4u/snowbird/lib/libctsmc/Makefile deleted file mode 100644 index c14596f919..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/snowbird/lib/libctsmc/Makefile +++ /dev/null @@ -1,78 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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. -# -# cmd/picl/plugins/sun4u/snowbird/lib/smc_util/Makefile -# - -LIBRARY = libctsmc.a -VERS = .1 -PLATFORM = SUNW,Netra-CP2300 - -OBJECTS= libctsmc.o - -# include library definitions -include $(SRC)/lib/Makefile.lib -include $(SRC)/Makefile.psm -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOT_PLATFORM = $(USR_PLAT_DIR)/$(PLATFORM) - -SRCS= $(OBJECTS:%.o=%.c) - -LIBS = $(DYNLIB) - -ROOTLIBDIR = $(ROOT_PLAT_LIBDIR) - - -CPPFLAGS += -D_SNOWBIRD -I$(SRC)/uts/sun4u/sys -LDLIBS += -L $(ROOT)/usr/platform/$(PLATFORM)/lib -LDLIBS += -R/usr/platform/sun4u/lib -LDLIBS += -lc - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -all:$(LIBS) $(LIBLINKS) - -install:$(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) - -$(LIBLINKS): FRC - $(RM) $(LIBLINKS); $(SYMLINK) $(DYNLIB) $(LIBLINKS) -_msg: - -# include library targets -include $(SRC)/cmd/picl/plugins/Makefile.targ -include $(SRC)/lib/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/snowbird/lib/libctsmc/libctsmc.c b/usr/src/cmd/picl/plugins/sun4u/snowbird/lib/libctsmc/libctsmc.c deleted file mode 100644 index 7bd71245c4..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/snowbird/lib/libctsmc/libctsmc.c +++ /dev/null @@ -1,476 +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" - -/* - * This is utility library that provides APIs to interact with SMC driver - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "smclib.h" - -static int debug_on = 0; - -/* Error messages */ -#define SMC_ERRMSG_OPEN "SMC open failed, cmd = %x\n" -#define SMC_ERRMSG_WRITE "SMC write failed, cmd = %x\n" -#define SMC_ERRMSG_POLLTIMEOUT "SMC poll timed out, cmd = %x\n" -#define SMC_ERRMSG_POLLFAILED "SMC poll failed, cmd = %x\n" -#define SMC_ERRMSG_POLL_T "SMC poll timed out, dest = %x\n" -#define SMC_ERRMSG_POLL_F "SMC poll failed, dest = %x\n" -#define SMC_ERRMSG_READ "SMC read response failed, cmd = %x\n" -#define SMC_ERRMSG_ERROR "SMC error, cc = %d, msg_id = %x\n" -#define SMC_ERRMSG_SETATTR "SMC setting read attribute failed\n" -#define SMC_ERRMSG_GET_SEQN "SMC error in getting seqn for %x\n" -#define SMC_ERRMSG_IPMI_ERR "SMC IPMI invalid cc:%x, dest = %x\n" -#define SMC_ERRMSG_GET_GEO "SMC get GeoAddr failed\n" - -/* Macros */ -#define REQ_SA(_X) (((_X) < 10) ? (0xb0 + 2 * ((_X) - 1)) :\ - (0xb0 + 2 * (_X))) -#define LUN_BITMASK 0x03 /* last two bits */ -#define RESPONSE_MSG 0x01 /* last bit */ - -#define SMC_LOCAL_SEQ_NO 10 -#define SMC_POLL_TIME 1000 /* 1 sec */ -#define NORMAL_COMPLETION_CODE 0 -#define IPMI_MSG_CHANNEL_0 0x0 -#define IPMI_REQ_HDR_LEN 0x8 /* includes command & data checksum */ -#define IPMI_RSP_HDR_LEN 0x8 -#define SMC_NETFN_SEQ_OFFSET 5 -#define SMC_CMD_OFFSET 6 - -#define SMC_NODE ("/dev/ctsmc") -#define DEFAULT_FD -1 -#define DEFAULT_SEQN 128 - -/* - * IPMI packet header - */ -typedef struct { - uint8_t channel_no; /* channel num */ - uint8_t rs_addr; /* dest addr */ - uint8_t netfn_lun; /* netfn and lun */ - uint8_t checksum; /* checksum for dest and netfn_lun */ - uint8_t rq_addr; /* sender addr */ - uint8_t seq_num; /* sequence number */ - uint8_t cmd; /* ipmi cmd */ -} smc_ipmi_header_t; - -/* - * debug printf - */ -static void -dbg_print(const char *fmt, ...) -{ - if (debug_on > 0) { - va_list ap; - va_start(ap, fmt); - (void) vprintf(fmt, ap); - va_end(ap); - } -} - -/* - * send a local command to SMC - */ -static smc_errno_t -smc_send_local_cmd(int fd, sc_reqmsg_t *req_pkt, sc_rspmsg_t *rsp_pkt, - int poll_time) -{ - int poll_rc; - struct pollfd poll_fds[1]; - - poll_fds[0].fd = fd; - poll_fds[0].events = POLLIN|POLLPRI; - poll_fds[0].revents = 0; - - /* send the command to SMC */ - if (write(fd, req_pkt, SC_SEND_HEADER + SC_MSG_LEN(req_pkt)) < 0) { - dbg_print(SMC_ERRMSG_WRITE, SC_MSG_CMD(req_pkt)); - return (SMC_REQ_FAILURE); - } - - poll_rc = poll(poll_fds, 1, poll_time); - if (poll_rc == 0) { - dbg_print(SMC_ERRMSG_POLLTIMEOUT, SC_MSG_CMD(req_pkt)); - return (SMC_ACK_FAILURE); - } else if (poll_rc == -1) { - dbg_print(SMC_ERRMSG_POLLFAILED, SC_MSG_CMD(req_pkt)); - return (SMC_ACK_FAILURE); - } - - /* read the response from SMC */ - if (read(fd, rsp_pkt, SC_MSG_MAX_SIZE) == -1) { - dbg_print(SMC_ERRMSG_READ, SC_MSG_CMD(req_pkt)); - return (SMC_ACK_FAILURE); - } - - /* check if response is valid */ - if (SC_MSG_ID(rsp_pkt) != SC_MSG_ID(req_pkt)) { - dbg_print(SMC_ERRMSG_ERROR, SC_MSG_CC(rsp_pkt), - SC_MSG_ID(rsp_pkt)); - return (SMC_INVALID_SEQ); - } - - if (SC_MSG_CC(rsp_pkt) != 0) { - return (SMC_FAILURE); - } - - return (SMC_SUCCESS); -} - -/* - * get_geo_addr -- returns the geographical address of a CPU board - */ -static int -get_geo_addr(uint8_t *geo_addr) -{ - int fd, rc; - sc_reqmsg_t req_pkt; - sc_rspmsg_t rsp_pkt; - - if ((fd = open(SMC_NODE, O_RDWR)) < 0) { - dbg_print(SMC_ERRMSG_OPEN, - SMC_GET_GEOGRAPHICAL_ADDRESS); - return (SMC_FAILURE); - } - - SC_MSG_CMD(&req_pkt) = SMC_GET_GEOGRAPHICAL_ADDRESS; - SC_MSG_LEN(&req_pkt) = 0; - SC_MSG_ID(&req_pkt) = SMC_LOCAL_SEQ_NO; - - /* no request data */ - if ((rc = smc_send_local_cmd(fd, &req_pkt, &rsp_pkt, - SMC_POLL_TIME)) != SMC_SUCCESS) { - (void) close(fd); - return (rc); - } - - *geo_addr = rsp_pkt.data[0]; - (void) close(fd); - return (SMC_SUCCESS); -} - -/* - * checksum - returns a 2-complement check sum - */ -static uint8_t -checksum(uint8_t buf[], int start, int end) -{ - int i; - uint8_t sum = 0x0; - - for (i = start; i <= end; i++) { - sum += buf[i]; - } - sum = ~sum + 1; - return (sum); -} - -/* - * func to send IPMI messages - */ -static smc_errno_t -smc_send_ipmi_message(int fd, sc_reqmsg_t *req_pkt, sc_rspmsg_t *rsp_pkt, - int poll_time) -{ - int result, nbytes, i = 0; - struct pollfd fds; - uint8_t cc, netfn; - boolean_t is_response = B_FALSE; - char data[SC_MSG_MAX_SIZE], *p; - - if (debug_on) { - bzero(data, SC_MSG_MAX_SIZE); - p = data; - for (i = 0; i < SC_MSG_LEN(req_pkt); i++) { - (void) sprintf(p, "%02x ", req_pkt->data[i]); - p = data + strlen(data); - } - p = data; - syslog(LOG_ERR, "REQ> %s", p); - } - - netfn = req_pkt->data[2] >> 2; - if (netfn & RESPONSE_MSG) { - is_response = B_TRUE; - } - - if ((nbytes = write(fd, (char *)req_pkt, SC_SEND_HEADER + - SC_MSG_LEN(req_pkt))) < 0) { - dbg_print(SMC_ERRMSG_WRITE, SMC_SEND_MESSAGE); - return (SMC_REQ_FAILURE); - } - - if ((nbytes = read(fd, (char *)rsp_pkt, SC_MSG_MAX_SIZE)) < 0) { - dbg_print(SMC_ERRMSG_READ, SMC_SEND_MESSAGE); - return (SMC_ACK_FAILURE); - } - - if (SC_MSG_CC(rsp_pkt) != 0) { - dbg_print(SMC_ERRMSG_ERROR, SC_MSG_CC(rsp_pkt), - SC_MSG_ID(rsp_pkt)); - return (SMC_ACK_FAILURE); - } - - if (is_response) { /* need not wait for response */ - return (SMC_SUCCESS); - } - - fds.fd = fd; - fds.events = POLLIN | POLLPRI; - fds.revents = 0; - result = poll(&fds, 1, poll_time); - - if (result == 0) { - dbg_print(SMC_ERRMSG_POLL_T, req_pkt->data[1]); - return (SMC_RSP_TIMEOUT); - } else if (result < 0) { - dbg_print(SMC_ERRMSG_POLL_F, req_pkt->data[1]); - return (SMC_RSP_ERROR); - } - - nbytes = read(fd, rsp_pkt, SC_MSG_MAX_SIZE); - if (nbytes < 0) { - dbg_print(SMC_ERRMSG_READ, SMC_SEND_MESSAGE); - return (SMC_RSP_ERROR); - } - - if (debug_on) { - bzero(data, SC_MSG_MAX_SIZE); - p = data; - for (i = 0; i < nbytes; i++) { - (void) sprintf(p, "%02x ", rsp_pkt->data[i]); - p = data + strlen(data); - } - p = data; - syslog(LOG_DEBUG, "RES> %s, seq = %x, cmd = %x, len = %x," - "cc = %x", p, SC_MSG_ID(rsp_pkt), SC_MSG_CMD(rsp_pkt), - SC_MSG_LEN(rsp_pkt), SC_MSG_CC(rsp_pkt)); - } - - if (SC_MSG_CC(rsp_pkt) != 0) { - dbg_print(SMC_ERRMSG_IPMI_ERR, rsp_pkt->hdr.cc, - req_pkt->data[SMC_CMD_OFFSET]); - return (SMC_RSP_ERROR); - } - - if (req_pkt->data[SMC_NETFN_SEQ_OFFSET] != - rsp_pkt->data[SMC_NETFN_SEQ_OFFSET]) { - dbg_print("SMC: Invalid sequence number in" - " IPMI Response (sent %x, received %x)\n", - req_pkt->data[5], rsp_pkt->data[SMC_NETFN_SEQ_OFFSET]); - } - - if ((cc = rsp_pkt->data[IPMI_RSP_HDR_LEN-1]) != 0) { - dbg_print("SMC:IPMI response completion " - "error %x, command = %x\n", - cc, req_pkt->data[SMC_CMD_OFFSET]); - } - return (SMC_SUCCESS); -} - -/* - * Initializes the IPMI request packet - */ -smc_errno_t -smc_init_ipmi_msg(sc_reqmsg_t *req_msg, uint8_t cmd, uint8_t msg_id, - uint8_t msg_data_size, uint8_t *msg_data_buf, int8_t seq_num, - int ipmb_addr, smc_netfn_t netfn, smc_lun_t lun) -{ - static uint8_t geo_addr = 0; - smc_ipmi_header_t ipmi_header; - uint8_t data[2]; - if (msg_data_size > 0) { - if ((msg_data_size > (SC_SEND_DSIZE - IPMI_REQ_HDR_LEN)) || - (msg_data_buf == NULL)) { - return (SMC_FAILURE); - } - } - - /* get the geo addr for first time */ - if (geo_addr == 0) { - if (get_geo_addr(&geo_addr) != SMC_SUCCESS) { - dbg_print(SMC_ERRMSG_GET_GEO); - return (SMC_FAILURE); - } - } - - SC_MSG_CMD(req_msg) = SMC_SEND_MESSAGE; - SC_MSG_ID(req_msg) = msg_id; - SC_MSG_LEN(req_msg) = IPMI_REQ_HDR_LEN + msg_data_size; - ipmi_header.channel_no = IPMI_MSG_CHANNEL_0; - ipmi_header.rs_addr = data[0] = ipmb_addr; - ipmi_header.netfn_lun = data[1] = (netfn << 2) | lun; - ipmi_header.checksum = checksum(data, 0, 1); - ipmi_header.rq_addr = REQ_SA(geo_addr); - ipmi_header.cmd = cmd; - if (seq_num >= 0 && seq_num < 64) { - ipmi_header.seq_num = (seq_num << 2) | SMC_SMS_LUN; - } else { - ipmi_header.seq_num = DEFAULT_SEQN; - } - - /* copy the header */ - (void) bcopy((void *)&ipmi_header, SC_MSG_DATA(req_msg), - sizeof (ipmi_header)); - - /* copy the msg data into request packet */ - (void) bcopy((void *)msg_data_buf, (void *)((uchar_t *)req_msg->data + - (IPMI_REQ_HDR_LEN - 1)), msg_data_size); - return (SMC_SUCCESS); -} - -/* - * Initialize a SMC packet - */ -smc_errno_t -smc_init_smc_msg(sc_reqmsg_t *req_msg, smc_app_command_t cmd, - uint8_t msg_id, uint8_t msg_data_size) -{ - if (msg_data_size > SC_SEND_DSIZE) { - return (SMC_FAILURE); - } - - /* fill the packet */ - SC_MSG_CMD(req_msg) = cmd; - SC_MSG_LEN(req_msg) = msg_data_size; - SC_MSG_ID(req_msg) = msg_id; - return (SMC_SUCCESS); -} - -/* - * Sends SMC(local) and IPMI messages - */ -smc_errno_t -smc_send_msg(int fd, sc_reqmsg_t *req_msg, sc_rspmsg_t *rsp_msg, - int poll_time) -{ - int rc = SMC_SUCCESS; - uint8_t dsize, dest; - boolean_t close_fd = B_FALSE; - boolean_t free_seqn = B_FALSE; - struct strioctl scioc; - sc_seqdesc_t smc_seq; - int8_t seq_no; - - if (req_msg == NULL || rsp_msg == NULL) { - return (SMC_FAILURE); - } - - if (fd < 0) { - close_fd = B_TRUE; - if ((fd = open(SMC_NODE, O_RDWR)) < 0) { - dbg_print(SMC_ERRMSG_OPEN, - SC_MSG_CMD(req_msg)); - return (SMC_FAILURE); - } - } - - if (ioctl(fd, I_SRDOPT, RMSGD) < 0) { - dbg_print(SMC_ERRMSG_SETATTR); - if (close_fd) - (void) close(fd); - return (SMC_FAILURE); - } - - if (SC_MSG_CMD(req_msg) != SMC_SEND_MESSAGE) { - rc = smc_send_local_cmd(fd, req_msg, rsp_msg, poll_time); - if (close_fd) { - (void) close(fd); - } - return (rc); - } - - /* This is an IPMI message */ - dsize = SC_MSG_LEN(req_msg) - IPMI_REQ_HDR_LEN; - if (dsize > (SC_SEND_DSIZE - IPMI_REQ_HDR_LEN)) { - if (close_fd) { - (void) close(fd); - } - return (SMC_FAILURE); - } - - /* check if sequence num is valid or not */ - if (req_msg->data[SMC_NETFN_SEQ_OFFSET] == DEFAULT_SEQN) { - free_seqn = B_TRUE; - bzero(&smc_seq, sizeof (sc_seqdesc_t)); - dest = smc_seq.d_addr = req_msg->data[1]; /* dest */ - smc_seq.n_seqn = 1; - smc_seq.seq_numbers[0] = 0; - scioc.ic_cmd = SCIOC_RESERVE_SEQN; - scioc.ic_timout = 0; - scioc.ic_len = sizeof (sc_seqdesc_t); - scioc.ic_dp = (char *)&smc_seq; - if (ioctl(fd, I_STR, &scioc) < 0) { - dbg_print(SMC_ERRMSG_GET_SEQN, dest); - if (close_fd) { - (void) close(fd); - } - return (SMC_FAILURE); - } - seq_no = smc_seq.seq_numbers[0]; - req_msg->data[SMC_NETFN_SEQ_OFFSET] = - (seq_no << 2) | SMC_SMS_LUN; - } - - req_msg->data[(IPMI_REQ_HDR_LEN-1)+dsize] = - checksum(req_msg->data, 4, (IPMI_REQ_HDR_LEN-2)+dsize); - - rc = smc_send_ipmi_message(fd, req_msg, rsp_msg, poll_time); - - if (free_seqn) { /* free seqn if library reserved it */ - smc_seq.d_addr = dest; - smc_seq.n_seqn = 1; - smc_seq.seq_numbers[0] = seq_no; - scioc.ic_cmd = SCIOC_FREE_SEQN; - scioc.ic_timout = 0; - scioc.ic_len = sizeof (sc_seqdesc_t); - scioc.ic_dp = (char *)&smc_seq; - if (ioctl(fd, I_STR, &scioc) < 0) { - dbg_print("SMC:Error in releasing sequence " - "number\n"); - rc = SMC_FAILURE; - } - } - if (close_fd) { - (void) close(fd); - } - return (rc); -} diff --git a/usr/src/cmd/picl/plugins/sun4u/snowbird/lib/libctsmc/smclib.h b/usr/src/cmd/picl/plugins/sun4u/snowbird/lib/libctsmc/smclib.h deleted file mode 100644 index d950a8c293..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/snowbird/lib/libctsmc/smclib.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, 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 __SMCLIB_H__ -#define __SMCLIB_H__ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * SMC error codes - */ -typedef enum { - SMC_SUCCESS = 0x0, - SMC_FAILURE = 0x1, - SMC_REQ_FAILURE = 0x2, - SMC_ACK_TIMEOUT = 0x3, - SMC_ACK_FAILURE = 0x4, - SMC_RSP_FAILURE = 0x5, - SMC_RSP_TIMEOUT = 0x6, - SMC_INVALID_SEQ = 0x7, - SMC_RSP_ERROR = 0x8 -} smc_errno_t; - -extern smc_errno_t smc_init_smc_msg(sc_reqmsg_t *req_msg, smc_app_command_t cmd, - uint8_t msg_id, uint8_t msg_data_size); - -extern smc_errno_t smc_init_ipmi_msg(sc_reqmsg_t *req_msg, uint8_t cmd, - uint8_t msg_id, uint8_t msg_data_size, uint8_t *msg_data_buf, - int8_t seq_num, int ipmb_addr, smc_netfn_t netfn, smc_lun_t lun); - -extern smc_errno_t smc_send_msg(int fd, sc_reqmsg_t *req_pkt, - sc_rspmsg_t *rsp_pkt, int poll_time); - -#ifdef __cplusplus -} -#endif - -#endif /* __SMCLIB_H__ */ diff --git a/usr/src/cmd/picl/plugins/sun4u/snowbird/watchdog/Makefile b/usr/src/cmd/picl/plugins/sun4u/snowbird/watchdog/Makefile deleted file mode 100644 index b8202dc06b..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/snowbird/watchdog/Makefile +++ /dev/null @@ -1,95 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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. -# - -LIBRARY= libpiclwd.a -VERS= .1 - -OBJECTS= piclwatchdog.o piclwd_platmod.o - -# include library definitions -include $(SRC)/lib/Makefile.lib -include $(SRC)/Makefile.psm -include $(SRC)/cmd/picl/plugins/Makefile.com - -SRCS= $(OBJECTS:%.o=%.c) - -LIBS = $(DYNLIB) - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Netra-CP2300 - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CPPFLAGS += -I$(SRC)/uts/sun4u/sys -I$(SRC)/uts/common -CPPFLAGS += -I$(SRC)/cmd/picl/plugins/sun4u/snowbird/lib/libctsmc -CPPFLAGS += -I$(SRC)/uts/common - -LDLIBS += -R/usr/platform/SUNW,Netra-CP2300/lib/picl/plugins -LDLIBS += -R/usr/platform/SUNW,Netra-CP2300/lib -LDLIBS += -R/usr/platform/sun4u/lib -LDLIBS += -L$(SRC)/lib/libpicl/$(MACH) -L$(SRC)/lib/libpicltree/$(MACH) -LDLIBS += -L $(ROOT)/usr/platform/$(PLATFORM)/lib -LDLIBS += -L$(ROOT_PLATFORM)/lib/picl/plugins -LDLIBS += -L$(SRC)/cmd/picl/plugins/sun4u/snowbird/lib/libctsmc -LDLIBS += -L$(ROOT)/usr/lib/picl/plugins -lnvpair -lpicltree -LDLIBS += -ldevinfo -lctsmc -lpiclfrutree -lc - -.KEEP_STATE: - -SUBDIRS= - -POFILE= snowbird_piclwatchdog.po -POFILES= $(SRCS:%.c=%.po) - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -all: $(LIBS) $(LIBLINKS) - -install: $(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) - -$(LIBLINKS): FRC - $(RM) $@; $(SYMLINK) $(DYNLIB) $@ - -_msg: $(MSGDOMAIN) $(POFILE) - $(RM) $(MSGDOMAIN)/$(POFILE) - $(CP) $(POFILE) $(MSGDOMAIN)/$(POFILE) - -$(POFILE): $(POFILES) - $(CAT) $(POFILES) > $(POFILE) - -$(MSGDOMAIN): - $(INS.dir) - -# include library targets -include $(SRC)/cmd/picl/plugins/Makefile.targ -include $(SRC)/lib/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/snowbird/watchdog/piclwatchdog.c b/usr/src/cmd/picl/plugins/sun4u/snowbird/watchdog/piclwatchdog.c deleted file mode 100644 index 00af353d0e..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/snowbird/watchdog/piclwatchdog.c +++ /dev/null @@ -1,1837 +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" - -/* - * This module is used to monitor and control watchdog timer for - * UltraSPARC-IIi CPU in Snowbird - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "piclwatchdog.h" - -#pragma init(wd_picl_register) /* init section */ - -/* debug variables */ -static int wd_debug = 0; -static hrtime_t start1, end1; -static int count = 0; -typedef struct { /* used to keep track of time taken for last 5 pats */ - int res_seq; - int req_seq; - int64_t time; -} wd_time_t; - -#define NUMBER_OF_READINGS 5 -static wd_time_t time1[NUMBER_OF_READINGS]; - -/* global declarations */ -static int wd_fd = -1; /* fd used to send watchdog commands */ -static int polling_fd = -1; /* polling thread that snoops for events */ -static int wd_enable = 1; -static int state_configured = 0; /* chassis state */ -static int props_created = 0; -static int wd_pat_thr_priority = -1; -static pid_t pid = -1; /* PID that owns watchdog services */ -static cond_t patting_cv; -static mutex_t data_lock; -static mutex_t patting_lock; -static int32_t pat_time = 0; -static thread_t polling_thr_tid; -static thread_t patting_thr_tid; -static wd_data_t wd_data; -static char wd_conf[MAXPATHLEN]; - -#define NULLREAD (int (*)(ptree_rarg_t *, void *))0 -#define NULLWRITE (int (*)(ptree_warg_t *, const void *))0 - -/* ptree interface */ -static void wd_picl_register(void); -static void wd_picl_init(void); -static void wd_picl_fini(void); -static void wd_state_change_evhandler(const char *, - const void *, size_t, void *); - -/* local functions */ -static int wd_write_timeout(ptree_warg_t *, const void *); -static int wd_write_action(ptree_warg_t *, const void *); -static int wd_read_action(ptree_rarg_t *, void *); -static int wd_read_timeout(ptree_rarg_t *, void *); -extern char *strtok_r(char *s1, const char *s2, char **lasts); -extern int wd_get_chassis_type(); - -static picld_plugin_reg_t wd_reg_info = { - PICLD_PLUGIN_VERSION_1, - PICLD_PLUGIN_CRITICAL, - "SUNW_picl_watchdog", - wd_picl_init, - wd_picl_fini, -}; - -/* - * This function parses wd.conf file to set the tunables - * tunables at present: patting thread priority, pat time, wd_enable - */ -static void -wd_parse_config_file(char *wd_conf) -{ - FILE *fp; - char buf[WD_CONF_MAXSIZE]; - char *token, *last, *value; - - if ((fp = fopen(wd_conf, "r")) == NULL) { - return; - } - - while (fgets(buf, sizeof (buf), fp) != NULL) { - if (buf[0] == '\0' || buf[0] == '#') { - continue; - } - token = last = value = NULL; - value = (char *)strtok_r((char *)buf, WD_DELIMETER, &last); - if (last) { - token = (char *)strtok_r(last, WD_DELIMETER, &last); - } else { - continue; - } - - if (value == NULL || token == NULL) { - continue; - } - if (strcmp(token, WD_PAT_THREAD_PRIORITY) == 0) { - wd_pat_thr_priority = strtol(value, - (char **)NULL, 10); - } else if (strcmp(token, WD_PATTING_TIME) == 0) { - errno = 0; - pat_time = strtol(value, (char **)NULL, 10); - if (errno != 0) { - pat_time = 0; - } - } else if (strcmp(token, WD_ENABLE) == 0) { - if (strcmp(value, "false") == 0) { - wd_enable = 0; - } - } else { /* unknown token */ - continue; - } - } - (void) fclose(fp); -} - -/* - * read the SMC watchdog registers - */ -static int -wd_get_reg_dump(uint8_t buffer[]) -{ - int rc = 0, i; - sc_reqmsg_t req_pkt; - sc_rspmsg_t rsp_pkt; - - /* initialize the request packet */ - (void) smc_init_smc_msg(&req_pkt, SMC_GET_WATCHDOG_TIMER, - DEFAULT_SEQN, 0); - - /* make a call to smc library to send cmd */ - if ((rc = smc_send_msg(DEFAULT_FD, &req_pkt, &rsp_pkt, - WD_POLL_TIMEOUT)) != SMC_SUCCESS) { - WD_DEBUG1(WD_PICL_GET_ERR, rc); - return (PICL_FAILURE); - } - - /* read 8 bytes */ - bzero(buffer, WD_REGISTER_LEN); - for (i = 0; i < WD_REGISTER_LEN; i++) { - buffer[i] = rsp_pkt.data[i]; - } - return (PICL_SUCCESS); -} - -/* - * get the HEALTHY# line state - * Return -1 for Error - * 0 for HEALTHY# down - * 1 for HEALTHY# up - */ -static int -wd_get_healthy_status() -{ - sc_reqmsg_t req_pkt; - sc_rspmsg_t rsp_pkt; - - /* initialize the request packet */ - (void) smc_init_smc_msg(&req_pkt, SMC_GET_EXECUTION_STATE, - DEFAULT_SEQN, 0); - - /* make a call to smc library to send cmd */ - if (smc_send_msg(DEFAULT_FD, &req_pkt, &rsp_pkt, - WD_POLL_TIMEOUT) != SMC_SUCCESS) { - return (-1); - } - - return ((rsp_pkt.data[0] & IS_HEALTHY) ? WD_HEALTHY_UP : - WD_HEALTHY_DOWN); -} - -/*ARGSUSED*/ -static void -event_completion_handler(char *ename, void *earg, size_t size) -{ - free(ename); - free(earg); -} - -/* - * posts picl-state-change event if there is change in watchdog-timer state - */ -static picl_errno_t -post_wd_state_event(picl_nodehdl_t nodeh, char *state) -{ - nvlist_t *nvl; - size_t nvl_size; - char *pack_buf = NULL; - picl_errno_t rc; - char *ename = PICLEVENT_STATE_CHANGE, *evname = NULL; - - if (state == NULL) { - return (PICL_FAILURE); - } - - if ((evname = strdup(ename)) == NULL) { - return (PICL_NOSPACE); - } - - if ((rc = nvlist_alloc(&nvl, NV_UNIQUE_NAME_TYPE, NULL)) != 0) { - free(evname); - syslog(LOG_ERR, WD_NVLIST_ERR, rc); - return (PICL_FAILURE); - } - - if ((rc = nvlist_add_uint64(nvl, PICLEVENTARG_NODEHANDLE, - nodeh)) != 0) { - nvlist_free(nvl); - free(evname); - syslog(LOG_ERR, WD_NVLIST_ERR, rc); - return (PICL_FAILURE); - } - - if ((rc = nvlist_add_string(nvl, PICLEVENTARG_STATE, - state)) != 0) { - nvlist_free(nvl); - free(evname); - syslog(LOG_ERR, WD_NVLIST_ERR, rc); - return (PICL_FAILURE); - } - - if ((rc = nvlist_pack(nvl, &pack_buf, &nvl_size, NV_ENCODE_NATIVE, - NULL)) != 0) { - nvlist_free(nvl); - free(evname); - syslog(LOG_ERR, WD_NVLIST_ERR, rc); - return (PICL_FAILURE); - } - - if ((rc = ptree_post_event(evname, pack_buf, nvl_size, - event_completion_handler)) != PICL_SUCCESS) { - free(pack_buf); - free(evname); - nvlist_free(nvl); - return (rc); - } - nvlist_free(nvl); - return (PICL_SUCCESS); -} - -/* - * Updates the State value in picl tree and posts a state-change event - */ -static void -wd_picl_update_state(int level, uint8_t stat) -{ - picl_errno_t rc; - char state[PICL_PROPNAMELEN_MAX]; - - switch (stat) { - case WD_ARMED: - (void) strncpy(state, PICL_PROPVAL_WD_STATE_ARMED, - sizeof (state)); - break; - case WD_DISARMED: - (void) strncpy(state, PICL_PROPVAL_WD_STATE_DISARMED, - sizeof (state)); - break; - case WD_EXPIRED: - (void) strncpy(state, PICL_PROPVAL_WD_STATE_EXPIRED, - sizeof (state)); - break; - default: - return; - } - - (void) mutex_lock(&data_lock); - switch (level) { - case WD1: - wd_data.wd1_run_state = stat; - break; - case WD2: - wd_data.wd2_run_state = stat; - break; - case WD1_2: - wd_data.wd1_run_state = stat; - wd_data.wd2_run_state = stat; - break; - default: - return; - } - (void) mutex_unlock(&data_lock); - - if (!state_configured) { - return; - } - - switch (level) { - case WD1: - if ((rc = post_wd_state_event(wd_data.wd1_nodehdl, - state)) != PICL_SUCCESS) { - syslog(LOG_ERR, WD_PICL_POST_EVENT_ERR, rc); - } - break; - case WD2: - if ((rc = post_wd_state_event(wd_data.wd2_nodehdl, - state)) != PICL_SUCCESS) { - syslog(LOG_ERR, WD_PICL_POST_EVENT_ERR, rc); - } - break; - - case WD1_2: - if ((rc = post_wd_state_event(wd_data.wd1_nodehdl, - state)) != PICL_SUCCESS) { - syslog(LOG_ERR, WD_PICL_POST_EVENT_ERR, rc); - } - if ((rc = post_wd_state_event(wd_data.wd2_nodehdl, - state)) != PICL_SUCCESS) { - syslog(LOG_ERR, WD_PICL_POST_EVENT_ERR, rc); - } - break; - } -} - -/* - * Sends a command to SMC to reset the watchdog-timers - */ -static int -wd_pat() -{ - int rc = 0; - static uint8_t seq = 1; - sc_reqmsg_t req_pkt; - sc_rspmsg_t rsp_pkt; - - if (seq < WD_MAX_SEQN) { - req_pkt.hdr.msg_id = seq++; - } else { - seq = 1; - req_pkt.hdr.msg_id = seq; - } - - if (wd_debug & WD_TIME_DEBUG) { - start1 = gethrtime(); - } - - /* initialize the request packet */ - (void) smc_init_smc_msg(&req_pkt, SMC_RESET_WATCHDOG_TIMER, - DEFAULT_SEQN, 0); - - /* make a call to smc library to send cmd */ - if ((rc = smc_send_msg(wd_fd, &req_pkt, &rsp_pkt, - WD_POLL_TIMEOUT)) != SMC_SUCCESS) { - syslog(LOG_CRIT, WD_PICL_PAT_ERR, rc); - return (PICL_FAILURE); - } - - if (wd_debug & WD_TIME_DEBUG) { - end1 = gethrtime(); - time1[count].res_seq = SC_MSG_ID(&rsp_pkt); - time1[count].req_seq = SC_MSG_ID(&req_pkt); - time1[count].time = (end1 - start1); - - if (count < (NUMBER_OF_READINGS - 1)) { - count++; - } else { - count = 0; - } - } - return (PICL_SUCCESS); -} - -/* used to set the new values for watchdog and start the watchdog */ -static int -wd_start(uchar_t action_1, uchar_t action_2, - uchar_t timeout_2, uchar_t *timeout_1, uint8_t patting_option) -{ - int rc = 0; - sc_reqmsg_t req_pkt; - sc_rspmsg_t rsp_pkt; - - if (timeout_1 == NULL) { - return (PICL_FAILURE); - } - - req_pkt.data[0] = WD_USEFLAG_OS; - req_pkt.data[1] = action_1 | action_2; /* actions */ - req_pkt.data[2] = timeout_2; /* wd timeout 2 */ - req_pkt.data[3] = WD_XPR_FLG_CLR_OS; /* expiration flags */ - req_pkt.data[4] = timeout_1[1]; /* LSB for wd timeout 1 */ - req_pkt.data[5] = timeout_1[0]; /* MSB for wd timeout 1 */ - - if (patting_option == ENABLE_AUTO_PAT) { - req_pkt.data[0] |= WD_ENABLE_AUTO_PAT; - } - - /* initialize the request packet */ - (void) smc_init_smc_msg(&req_pkt, SMC_SET_WATCHDOG_TIMER, - DEFAULT_SEQN, WD_SET_CMD_DATA_LEN); - - /* make a call to smc library to send cmd */ - if ((rc = smc_send_msg(wd_fd, &req_pkt, &rsp_pkt, - WD_POLL_TIMEOUT)) != SMC_SUCCESS) { - WD_DEBUG1(WD_PICL_START_ERR, rc); - return (PICL_FAILURE); - } - - /* reset the watchdog timer */ - (void) smc_init_smc_msg(&req_pkt, SMC_RESET_WATCHDOG_TIMER, - DEFAULT_SEQN, 0); - if ((rc = smc_send_msg(wd_fd, &req_pkt, &rsp_pkt, - WD_POLL_TIMEOUT)) != SMC_SUCCESS) { - WD_DEBUG1(WD_PICL_START_ERR, rc); - return (PICL_FAILURE); - } - return (PICL_SUCCESS); -} - -/* - * Validates timeout and action fields and arms the watchdog-timers - */ -static int -wd_arm(uint8_t patting_option) -{ - int rc; - uint16_t wd_time1; - uint8_t wd_time2, wd1_action, wd2_action; - uint8_t timeout1[2]; - - if (wd_data.wd1_timeout >= 0) { - wd_time1 = wd_data.wd1_timeout/WD_L1_RESOLUTION; - } else { - wd_time1 = 0; - } - - if (wd_data.wd2_timeout >= 0) { - wd_time2 = wd_data.wd2_timeout/WD_L2_RESOLUTION; - } else { - wd_time2 = 0; - } - - timeout1[0] = wd_time1 >> 8; /* MSB */ - timeout1[1] = wd_time1 & 0x00ff; /* LSB */ - - /* check the HELATHY# status if action is alarm */ - if (wd_data.wd1_action == WD_ACTION_HEALTHY_DOWN_HOST || - wd_data.wd1_action == WD_ACTION_HEALTHY_DOWN_SAT) { - rc = wd_get_healthy_status(); - if (rc == WD_HEALTHY_DOWN) { - WD_DEBUG0(WD_HEALTHY_ERR); - return (PICL_FAILURE); - } else if (rc == -1) { - syslog(LOG_ERR, WD_GET_HEALTH_ERR); - return (PICL_FAILURE); - } - } - - if (wd_data.wd1_timeout == -1) { - wd1_action = WD_ACTION_NONE2; - } else { - wd1_action = wd_data.wd1_action; - } - - if (wd_data.wd2_timeout == -1) { - wd2_action = WD_ACTION_NONE2; - } else { - wd2_action = wd_data.wd2_action; - } - - rc = wd_start(wd1_action, wd2_action, - wd_time2, timeout1, patting_option); - return (rc); -} - -/* - * This is thread is a RealTime class thread. This thread pats the - * watchdog-timers in regular intervals before the expiry. - */ -/*ARGSUSED*/ -static void * -wd_patting_thread(void *args) -{ - time_t sec; - pcinfo_t pci; - long nano_sec; - timestruc_t to; - long sleep_time; - struct timeval tp; - int err, state; - - for (;;) { - (void) mutex_lock(&patting_lock); - while (wd_data.wd_pat_state == WD_NORESET) { - (void) cond_wait(&patting_cv, &patting_lock); - } - (void) mutex_unlock(&patting_lock); - - /* reset pat-time to zero */ - pat_time = 0; /* tunable */ - wd_parse_config_file(wd_conf); - - if (wd_pat_thr_priority < 0 || wd_pat_thr_priority > 59) { - wd_pat_thr_priority = WD_DEFAULT_THREAD_PRIORITY; - } - - /* change the priority of thread to realtime class */ - (void) strncpy(pci.pc_clname, "RT", sizeof (pci.pc_clname)); - if (priocntl(P_LWPID, P_MYID, PC_GETCID, (caddr_t)&pci) != -1) { - pcparms_t pcp; - rtparms_t *rtp = (rtparms_t *)pcp.pc_clparms; - rtp->rt_pri = wd_pat_thr_priority; - rtp->rt_tqsecs = 0; - rtp->rt_tqnsecs = RT_TQDEF; - pcp.pc_cid = pci.pc_cid; - if (priocntl(P_LWPID, P_MYID, PC_SETPARMS, - (caddr_t)&pcp) != 0) { - syslog(LOG_ERR, WD_PICL_RT_THRD_FAIL); - } - } else { - syslog(LOG_ERR, WD_PICL_RT_THRD_NO_PERM_ERR); - } - - switch (wd_data.wd1_timeout) { - case 0: - if (wd_arm(DISABLE_AUTO_PAT) == PICL_SUCCESS) { - wd_picl_update_state(WD1, WD_ARMED); - if (wd_data.wd2_timeout >= 0) { - wd_picl_update_state(WD2, WD_ARMED); - } - } else { - syslog(LOG_ERR, WD_PICL_START_ERR, - PICL_FAILURE); - } - /* no need to pat */ - (void) mutex_lock(&patting_lock); - wd_data.wd_pat_state = WD_NORESET; - (void) mutex_unlock(&patting_lock); - continue; - case -1: - if (wd_data.wd2_timeout < 0) { - (void) mutex_lock(&patting_lock); - wd_data.wd_pat_state = WD_NORESET; - (void) mutex_unlock(&patting_lock); - continue; - } - if (wd_arm(DISABLE_AUTO_PAT) == PICL_SUCCESS) { - wd_picl_update_state(WD2, WD_ARMED); - } else { - syslog(LOG_ERR, WD_PICL_START_ERR, - PICL_FAILURE); - } - /* no need to pat */ - (void) mutex_lock(&patting_lock); - wd_data.wd_pat_state = WD_NORESET; - (void) mutex_unlock(&patting_lock); - continue; - default: - break; - } - - if (pat_time == 0) { - if (wd_data.wd1_timeout > WD_PAT_TIME) { - pat_time = WD_PAT_TIME; - } else { - pat_time = wd_data.wd1_timeout - 80; - } - } - if (pat_time <= 0) { - WD_DEBUG0(WD_PICL_PAT_TIME_ERR); - (void) mutex_lock(&patting_lock); - wd_data.wd_pat_state = WD_NORESET; - (void) mutex_unlock(&patting_lock); - continue; - } - sleep_time = wd_data.wd1_timeout - pat_time; - - if (wd_data.wd1_timeout <= 0 || sleep_time <= 0) { - WD_DEBUG0(WD_PICL_ARM_PAT_ERR); - (void) mutex_lock(&patting_lock); - wd_data.wd_pat_state = WD_NORESET; - (void) mutex_unlock(&patting_lock); - continue; - } else { - wd_picl_update_state(WD1, WD_ARMED); - } - - if (wd_data.wd2_timeout >= 0) { - wd_picl_update_state(WD2, WD_ARMED); - } - - sec = sleep_time/1000; - nano_sec = (sleep_time - (sec * 1000)) * 1000000; - - if (wd_arm(ENABLE_AUTO_PAT) != PICL_SUCCESS) { - wd_picl_update_state(WD1_2, WD_DISARMED); - (void) mutex_lock(&patting_lock); - wd_data.wd_pat_state = WD_NORESET; - (void) mutex_unlock(&patting_lock); - syslog(LOG_ERR, WD_PICL_START_ERR, PICL_FAILURE); - continue; - } - - do /* pat the watchdog until expiry or user disarm */ - { - (void) mutex_lock(&patting_lock); - state = wd_data.wd_pat_state; - if (state == WD_NORESET) { - (void) mutex_unlock(&patting_lock); - break; - } - (void) gettimeofday(&tp, NULL); - to.tv_sec = tp.tv_sec + sec; - if ((nano_sec + (tp.tv_usec * 1000)) >= 1000000000) { - to.tv_sec += 1; - to.tv_nsec = (nano_sec + - (tp.tv_usec * 1000)) - 1000000000; - } else { - to.tv_nsec = nano_sec + (tp.tv_usec * 1000); - } - - err = cond_timedwait(&patting_cv, &patting_lock, &to); - (void) mutex_unlock(&patting_lock); - - if (err == ETIME) { /* woke up from sleep */ - (void) wd_pat(); - } - } while (state == WD_RESET); - } - /*NOTREACHED*/ - return (NULL); -} - -/* - * returns 0 if owner is not alive - * returns 1 if owner is alive - * returns -1 if there is no active owner - */ -static int -is_owner_alive() -{ - char strpid[50]; - struct stat buf; - - if (pid == -1) { - return (-1); - } - - /* check if the file exists or not */ - (void) snprintf(strpid, sizeof (pid), "/proc/%ld/status", pid); - errno = 0; - if (stat(strpid, &buf) == 0) { - return (1); - } - if (errno == ENOENT) { - return (0); - } else { - syslog(LOG_ERR, WD_GET_OWN_FAILED, errno); - } - return (-1); -} - -/* - * Sends a cmd to SMC to stop watchdog timers - */ -static int -wd_stop() -{ - int rc = 0; - sc_reqmsg_t req_pkt; - sc_rspmsg_t rsp_pkt; - uint8_t buffer[8]; - - if (wd_get_reg_dump(buffer) != 0) { - return (PICL_FAILURE); - } - /* clear the expiration flags */ - buffer[3] = 0xff; /* expiration flags */ - - (void) memcpy(SC_MSG_DATA(&req_pkt), buffer, - WD_SET_CMD_DATA_LEN); - - /* initialize the request packet */ - (void) smc_init_smc_msg(&req_pkt, SMC_SET_WATCHDOG_TIMER, - DEFAULT_SEQN, WD_SET_CMD_DATA_LEN); - - /* make a call to smc library to send cmd */ - if ((rc = smc_send_msg(wd_fd, &req_pkt, &rsp_pkt, - WD_POLL_TIMEOUT)) != SMC_SUCCESS) { - syslog(LOG_ERR, WD_PICL_STOP_ERR, rc); - return (PICL_FAILURE); - } - return (PICL_SUCCESS); -} - -/* - * Function used by volatile callback function for wd-op property - * under controller. This is used to arm, disarm the watchdog-timers - * in response to user actions - */ -static int -wd_worker_function(uint8_t flag, pid_t proc_id) -{ - int rc = PICL_SUCCESS; - int wd1_state, wd2_state; - - (void) mutex_lock(&data_lock); - wd1_state = wd_data.wd1_run_state; - wd2_state = wd_data.wd2_run_state; - (void) mutex_unlock(&data_lock); - - switch (flag) { - - case USER_ARMED_WD: - - /* watchdog can only be armed if all the timers are disarmed */ - if (wd1_state != WD_DISARMED) { - WD_DEBUG0(WD_PICL_WD1_RUNNING_ERR); - rc = PICL_FAILURE; - break; - } - if (wd2_state != WD_DISARMED) { - WD_DEBUG0(WD_PICL_WD2_RUNNING_ERR); - rc = PICL_FAILURE; - break; - } - - /* check the HELATHY# status if action is alarm */ - if (wd_data.wd1_timeout >= 0) { - if (wd_data.wd1_action == WD_ACTION_HEALTHY_DOWN_HOST || - wd_data.wd1_action == WD_ACTION_HEALTHY_DOWN_SAT) { - rc = wd_get_healthy_status(); - if (rc == WD_HEALTHY_DOWN) { - WD_DEBUG0(WD_HEALTHY_ERR); - return (PICL_FAILURE); - } else if (rc == -1) { - syslog(LOG_ERR, WD_GET_HEALTH_ERR); - return (PICL_FAILURE); - } else { - rc = PICL_SUCCESS; - } - } - } - - /* signal the patting thread */ - (void) mutex_lock(&patting_lock); - wd_data.wd_pat_state = WD_RESET; - (void) cond_signal(&patting_cv); - (void) mutex_unlock(&patting_lock); - break; - - case USER_DISARMED_WD: - - /* - * if the caller doesnot own watchdog services, - * check to see if the owner is still alive using procfs - */ - if (proc_id != pid) { - switch (is_owner_alive()) { - case -1: - if ((wd1_state != WD_DISARMED) || - (wd2_state != WD_DISARMED)) { - break; - } - /* watchdog is already disarmed */ - WD_DEBUG0(WD_PICL_NO_WD_ERR); - return (PICL_FAILURE); - case 1: - /* owner is still alive, deny the operation */ - WD_DEBUG0(WD_PICL_PERM_DENIED); - return (PICL_PERMDENIED); - default: - break; - } - } - - /* watchdog is running */ - if ((rc = wd_stop()) == PICL_SUCCESS) { - wd_picl_update_state(WD1_2, WD_DISARMED); - (void) mutex_lock(&patting_lock); - wd_data.wd_pat_state = WD_NORESET; - (void) cond_signal(&patting_cv); - (void) mutex_unlock(&patting_lock); - } - break; - - case USER_ARMED_PAT_WD: /* for debug purposes only */ - - /* - * first arm-pat operation is used for arming the watchdog - * subsequent arm-pat operations will be used for patting - * the watchdog - */ - /* WD is stopped */ - if (wd1_state == WD_DISARMED && wd2_state == WD_DISARMED) { - if ((rc = wd_arm(DISABLE_AUTO_PAT)) == PICL_SUCCESS) { - if (wd_data.wd1_timeout >= 0) { - wd_picl_update_state(WD1, WD_ARMED); - } - - if (wd_data.wd2_timeout >= 0) { - wd_picl_update_state(WD2, WD_ARMED); - } - } else { - return (rc); - } - } else { /* WD is running */ - if (wd1_state != WD_ARMED) { - WD_DEBUG0(WD_PICL_NO_WD_ERR); - return (PICL_INVALIDARG); - } - - /* check if OS is patting the watchdog or not */ - (void) mutex_lock(&patting_lock); - if (wd_data.wd_pat_state == WD_RESET) { - WD_DEBUG0(WD_PICL_TRY_PAT_ERR); - (void) mutex_unlock(&patting_lock); - return (PICL_INVALIDARG); - } - - /* check if the process owns the WD services */ - if (proc_id != pid) { - WD_DEBUG0(WD_PICL_PERM_DENIED); - return (PICL_PERMDENIED); - } - rc = wd_pat(); - } - break; - - default: - rc = PICL_INVALIDARG; - break; - - } /* switch */ - - return (rc); -} - -/*ARGSUSED*/ -static int -wd_write_op(ptree_warg_t *parg, const void *buf) -{ - int rc = PICL_INVALIDARG; - uint8_t flag; - - /* only after state is configured */ - if (!state_configured) { - if (parg->cred.dc_pid != getpid()) { - WD_DEBUG0(WD_PICL_STATE_INVALID); - return (PICL_PERMDENIED); - } - } - - /* only super user can write this property */ - if (parg->cred.dc_euid != SUPER_USER) { - WD_DEBUG0(WD_NO_ROOT_PERM); - return (PICL_PERMDENIED); - } - - if (strcmp((char *)buf, PICL_PROPVAL_WD_OP_ARM) == 0) { - flag = USER_ARMED_WD; - rc = PICL_SUCCESS; - } - - if (strcmp((char *)buf, PICL_PROPVAL_WD_OP_DISARM) == 0) { - flag = USER_DISARMED_WD; - rc = PICL_SUCCESS; - } - - /* for debug purpose only */ - if (strcmp((char *)buf, WD_ARM_PAT) == 0) { - flag = USER_ARMED_PAT_WD; - rc = PICL_SUCCESS; - } - - if (rc == PICL_SUCCESS) { - rc = wd_worker_function(flag, parg->cred.dc_pid); - } else { - rc = PICL_INVALIDARG; - } - - if (rc == PICL_SUCCESS) { - - switch (flag) { - case USER_ARMED_PAT_WD: - case USER_ARMED_WD: - - /* get the process id of client */ - if (parg->cred.dc_pid != getpid()) { - pid = parg->cred.dc_pid; - } else { - pid = -1; - } - break; - case USER_DISARMED_WD: - /* reset the pid */ - pid = -1; - default: - break; - } - } - return (rc); -} - -/* volatile call back function to read the watchdog L1 status */ -/*ARGSUSED*/ -static int -wd1_read_status(ptree_rarg_t *parg, void *buf) -{ - int rc = PICL_SUCCESS; - - (void) mutex_lock(&data_lock); - - switch (wd_data.wd1_run_state) { - - case WD_EXPIRED: - (void) strncpy((char *)buf, PICL_PROPVAL_WD_STATE_EXPIRED, - PICL_PROPNAMELEN_MAX); - break; - - case WD_DISARMED: - (void) strncpy((char *)buf, PICL_PROPVAL_WD_STATE_DISARMED, - PICL_PROPNAMELEN_MAX); - break; - - case WD_ARMED: - (void) strncpy((char *)buf, PICL_PROPVAL_WD_STATE_ARMED, - PICL_PROPNAMELEN_MAX); - break; - - default: - rc = PICL_FAILURE; - } - (void) mutex_unlock(&data_lock); - return (rc); -} - -/* - * this function is used to read the state of L2 timer - */ -static int -wd_get_wd2_status(int *present_status) -{ - int rc; - uchar_t buffer[WD_REGISTER_LEN]; - - bzero(buffer, WD_REGISTER_LEN); - (void) mutex_lock(&data_lock); - *present_status = wd_data.wd2_run_state; - if (wd_data.wd2_run_state != WD_ARMED) { - /* we already have the latest state */ - (void) mutex_unlock(&data_lock); - return (PICL_SUCCESS); - } - (void) mutex_unlock(&data_lock); - - /* read watchdog registers */ - if ((rc = wd_get_reg_dump(buffer)) != 0) { - return (rc); - } - - if (buffer[0] & WD_WD_RUNNING) { - *present_status = WD_ARMED; - return (PICL_SUCCESS); - } - - if (buffer[3] != 0) { - (void) mutex_lock(&data_lock); - *present_status = wd_data.wd2_run_state = WD_EXPIRED; - (void) mutex_unlock(&data_lock); - } - return (PICL_SUCCESS); -} - -/* volatile call back function to read the watchdog L2 status */ -/*ARGSUSED*/ -static int -wd2_read_status(ptree_rarg_t *parg, void *buf) -{ - int present_status, rc; - - if ((rc = wd_get_wd2_status(&present_status)) != - PICL_SUCCESS) { - return (rc); - } - - /* copy the present state in user buffer */ - switch (present_status) { - case WD_ARMED: - (void) strncpy((char *)buf, PICL_PROPVAL_WD_STATE_ARMED, - PICL_PROPNAMELEN_MAX); - break; - case WD_EXPIRED: - (void) strncpy((char *)buf, PICL_PROPVAL_WD_STATE_EXPIRED, - PICL_PROPNAMELEN_MAX); - break; - case WD_DISARMED: - (void) strncpy((char *)buf, PICL_PROPVAL_WD_STATE_DISARMED, - PICL_PROPNAMELEN_MAX); - break; - } - return (PICL_SUCCESS); -} - -/* this thread listens for watchdog expiry events */ -/*ARGSUSED*/ -static void * -wd_polling(void *args) -{ - uint8_t stat; - int poll_retval; - struct pollfd fds; - sc_rspmsg_t rsp_pkt; - int i; - - fds.fd = polling_fd; - fds.events = POLLIN | POLLPRI; - fds.revents = 0; - - for (;;) { - poll_retval = poll(&fds, 1, -1); - if (props_created == 0) - continue; - switch (poll_retval) { - case 0: - break; - - case -1: - syslog(LOG_ERR, WD_PICL_POLL_ERR); - break; - - default: - /* something happened */ - if ((read(polling_fd, &rsp_pkt, - sizeof (sc_rspmsg_t))) < 0) { - syslog(LOG_ERR, WD_PICL_SMC_READ_ERR); - break; - } - - if (rsp_pkt.hdr.cmd == SMC_EXPIRED_WATCHDOG_NOTIF) { - - (void) mutex_lock(&data_lock); - stat = wd_data.wd1_run_state; - (void) mutex_unlock(&data_lock); - - if (stat != WD_ARMED) { - continue; - } - - wd_picl_update_state(WD1, WD_EXPIRED); - - (void) mutex_lock(&patting_lock); - wd_data.wd_pat_state = WD_NORESET; - (void) cond_signal(&patting_cv); - - (void) mutex_unlock(&patting_lock); - syslog(LOG_WARNING, WD_WD1_EXPIRED); - if (wd_debug & WD_TIME_DEBUG) { - syslog(LOG_ERR, " latest count : %d", count); - for (i = 0; i < NUMBER_OF_READINGS; i++) { - syslog(LOG_ERR, "i = %d, req_seq = %d," - "res_seq = %d, time = %lld nsec", - i, time1[i].req_seq, - time1[i].res_seq, - time1[i].time); - } - } - if (wd_data.reboot_action) { - wd_data.reboot_action = 0; - (void) system(SHUTDOWN_CMD); - } - } - break; - - } /* switch */ - } - /*NOTREACHED*/ - return (NULL); -} - -/* - * This function reads the hardware state and gets the status of - * watchdog-timers - */ -static int -wd_get_status(wd_state_t *state) -{ - picl_errno_t rc; - uchar_t buffer[WD_REGISTER_LEN]; - - bzero(buffer, WD_REGISTER_LEN); - /* read watchdog registers */ - if ((rc = wd_get_reg_dump(buffer)) != 0) { - return (rc); - } - - /* get action */ - state->action1 = buffer[1] & 0xF0; /* most significant 4 bits */ - if (state->action1 == 0x0) { - state->action1 = WD_ACTION_NONE1; - } - state->action2 = buffer[1] & 0x0F; /* least significant 4 bits */ - if (state->action2 == 0x0) { - state->action2 = WD_ACTION_NONE2; - } - - state->timeout2 = buffer[2]; - state->timeout1[0] = buffer[5]; /* MSB */ - state->timeout1[1] = buffer[4]; /* LSB */ - - state->present_t1[0] = buffer[7]; /* MSB */ - state->present_t1[1] = buffer[6]; /* LSB */ - - if (buffer[0] & WD_WD_RUNNING) { - state->present_state = WD_ARMED; - return (PICL_SUCCESS); - } - - if (buffer[3] != 0) { - state->present_state = WD_EXPIRED; - return (PICL_SUCCESS); - } else { - state->present_state = WD_DISARMED; - return (PICL_SUCCESS); - } -} - -/* read the smc hardware and intialize the internal state */ -static void -wd_set_init_state() -{ - wd_state_t state; - uint16_t tmp1, tmp2, wd_time1; - - if (wd_get_status(&state) != PICL_SUCCESS) { - syslog(LOG_ERR, WD_PICL_GET_STAT_ERR); - /* defualt state is expired ??? */ - state.present_state = WD_EXPIRED; - } - - switch (state.present_state) { - case WD_EXPIRED: - case WD_DISARMED: - if (state.present_state == WD_EXPIRED) - wd_picl_update_state(WD1_2, WD_EXPIRED); - else - wd_picl_update_state(WD1_2, WD_DISARMED); - wd_data.wd_pat_state = WD_NORESET; - wd_data.wd1_action = state.action1; - wd_data.wd2_action = state.action2; - tmp1 = state.timeout1[0] << 8; - tmp2 = state.timeout1[1]; - wd_time1 = tmp1 | tmp2; - wd_data.wd1_timeout = wd_time1 * WD_L1_RESOLUTION; - wd_data.wd2_timeout = state.timeout2 * WD_L2_RESOLUTION; - break; - case WD_ARMED: - /* - * get the present values and restart the - * watchdog from os level and continue to pat - */ - wd_picl_update_state(WD1_2, WD_ARMED); - wd_data.wd_pat_state = WD_RESET; - wd_data.wd1_action = (state.action1 << 4); - wd_data.wd2_action = state.action2; - - tmp1 = state.timeout1[0] << 8; - tmp2 = state.timeout1[1]; - wd_time1 = tmp1 | tmp2; - wd_data.wd1_timeout = wd_time1 * WD_L1_RESOLUTION; - wd_data.wd2_timeout = state.timeout2 * WD_L2_RESOLUTION; - (void) wd_stop(); - } -} - -/* - * wrapper for ptree interface to create property - */ -static int -wd_create_property( - int ptype, /* PICL property type */ - int pmode, /* PICL access mode */ - size_t psize, /* size of PICL property */ - char *pname, /* property name */ - int (*readfn)(ptree_rarg_t *, void *), - int (*writefn)(ptree_warg_t *, const void *), - picl_nodehdl_t nodeh, /* node for property */ - picl_prophdl_t *propp, /* pointer to prop_handle */ - void *vbuf) /* initial value */ -{ - picl_errno_t rc; - ptree_propinfo_t propinfo; - - rc = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - ptype, pmode, psize, pname, readfn, writefn); - if (rc != PICL_SUCCESS) { - syslog(LOG_ERR, WD_PICL_PROP_INIT_ERR, rc); - return (rc); - } - - rc = ptree_create_and_add_prop(nodeh, &propinfo, vbuf, propp); - if (rc != PICL_SUCCESS) { - return (rc); - } - - return (PICL_SUCCESS); -} - -/* Create and add Watchdog properties */ -static void -wd_create_add_props() -{ - int rc; - picl_nodehdl_t rooth, sysmgmt_h, platformh; - int32_t timeout1 = 0; - int32_t timeout2 = 0; - char buf[PICL_WD_PROPVAL_MAX]; - - /* get picl root node handle */ - if ((rc = ptree_get_root(&rooth)) != PICL_SUCCESS) { - syslog(LOG_ERR, WD_NODE_INIT_ERR, 1, rc); - return; - } - - /* get picl platform node handle */ - if ((rc = ptree_get_node_by_path(PLATFORM_PATH, - &platformh)) != PICL_SUCCESS) { - syslog(LOG_ERR, WD_NODE_INIT_ERR, 2, rc); - return; - } - - /* get the picl sysmgmt node handle */ - if ((rc = ptree_find_node(platformh, PICL_PROP_NAME, - PICL_PTYPE_CHARSTRING, - PICL_NODE_SYSMGMT, strlen(PICL_NODE_SYSMGMT), - &sysmgmt_h)) != PICL_SUCCESS) { - syslog(LOG_ERR, WD_NODE_INIT_ERR, 3, rc); - return; - } - - /* start creating the watchdog nodes and properties */ - if ((rc = ptree_create_and_add_node(sysmgmt_h, PICL_NODE_WD_CONTROLLER, - PICL_CLASS_WATCHDOG_CONTROLLER, - &(wd_data.wd_ctrl_nodehdl))) != PICL_SUCCESS) { - syslog(LOG_ERR, WD_NODE_INIT_ERR, 4, rc); - return; - } - - /* Add wd-op property to watchdog controller node */ - (void) strncpy(buf, "", sizeof (buf)); - if ((rc = wd_create_property(PICL_PTYPE_CHARSTRING, - PICL_WRITE + PICL_VOLATILE, - PICL_PROPNAMELEN_MAX, PICL_PROP_WATCHDOG_OPERATION, - NULL, wd_write_op, - wd_data.wd_ctrl_nodehdl, - &(wd_data.wd_ops_hdl), - (void *)buf)) != PICL_SUCCESS) { - syslog(LOG_ERR, WD_NODE_INIT_ERR, 5, rc); - return; - } - - /* create L1 node and add to controller */ - if ((rc = ptree_create_and_add_node(wd_data.wd_ctrl_nodehdl, - PICL_NODE_WD_L1, PICL_CLASS_WATCHDOG_TIMER, - &(wd_data.wd1_nodehdl))) != PICL_SUCCESS) { - syslog(LOG_ERR, WD_NODE_INIT_ERR, 6, rc); - return; - } - - /* create L2 node and add to controller */ - if ((rc = ptree_create_and_add_node(wd_data.wd_ctrl_nodehdl, - PICL_NODE_WD_L2, PICL_CLASS_WATCHDOG_TIMER, - &(wd_data.wd2_nodehdl))) != PICL_SUCCESS) { - syslog(LOG_ERR, WD_NODE_INIT_ERR, 7, rc); - return; - } - - /* create watchdog properties */ - /* create state property here */ - (void) strncpy(buf, PICL_PROPVAL_WD_STATE_DISARMED, - sizeof (buf)); - if ((rc = wd_create_property(PICL_PTYPE_CHARSTRING, - PICL_READ + PICL_VOLATILE, PICL_PROPNAMELEN_MAX, - PICL_PROP_STATE, wd1_read_status, NULLWRITE, - wd_data.wd1_nodehdl, - &(wd_data.wd1_state_hdl), (void *)buf)) != PICL_SUCCESS) { - syslog(LOG_ERR, WD_NODE_INIT_ERR, 8, rc); - return; - } - - if ((rc = wd_create_property(PICL_PTYPE_CHARSTRING, - PICL_READ + PICL_VOLATILE, PICL_PROPNAMELEN_MAX, - PICL_PROP_STATE, wd2_read_status, NULLWRITE, - wd_data.wd2_nodehdl, - &(wd_data.wd2_state_hdl), (void *)buf)) != PICL_SUCCESS) { - syslog(LOG_ERR, WD_NODE_INIT_ERR, 9, rc); - return; - } - - /* create timeout property here */ - if ((rc = wd_create_property(PICL_PTYPE_UNSIGNED_INT, - PICL_READ + PICL_WRITE + PICL_VOLATILE, - sizeof (timeout1), PICL_PROP_WATCHDOG_TIMEOUT, - wd_read_timeout, wd_write_timeout, wd_data.wd1_nodehdl, - &(wd_data.wd1_timeout_hdl), (void *)&(timeout1))) != - PICL_SUCCESS) { - syslog(LOG_ERR, WD_NODE_INIT_ERR, 10, rc); - return; - } - - if ((rc = wd_create_property(PICL_PTYPE_UNSIGNED_INT, - PICL_READ + PICL_WRITE + PICL_VOLATILE, - sizeof (wd_data.wd2_timeout), PICL_PROP_WATCHDOG_TIMEOUT, - wd_read_timeout, wd_write_timeout, wd_data.wd2_nodehdl, - &(wd_data.wd2_timeout_hdl), (void *)&(timeout2))) != - PICL_SUCCESS) { - syslog(LOG_ERR, WD_NODE_INIT_ERR, 11, rc); - return; - } - - /* create wd_action property here */ - (void) strncpy(buf, PICL_PROPVAL_WD_ACTION_NONE, - sizeof (buf)); - if ((rc = wd_create_property(PICL_PTYPE_CHARSTRING, - PICL_READ + PICL_WRITE + PICL_VOLATILE, - PICL_PROPNAMELEN_MAX, PICL_PROP_WATCHDOG_ACTION, - wd_read_action, wd_write_action, - wd_data.wd1_nodehdl, &(wd_data.wd1_action_hdl), - (void *)buf)) != PICL_SUCCESS) { - syslog(LOG_ERR, WD_NODE_INIT_ERR, 12, rc); - return; - } - - if ((rc = wd_create_property(PICL_PTYPE_CHARSTRING, - PICL_READ + PICL_WRITE + PICL_VOLATILE, - PICL_PROPNAMELEN_MAX, PICL_PROP_WATCHDOG_ACTION, - wd_read_action, wd_write_action, - wd_data.wd2_nodehdl, &(wd_data.wd2_action_hdl), - (void *)buf)) != PICL_SUCCESS) { - syslog(LOG_ERR, WD_NODE_INIT_ERR, 13, rc); - return; - } -} - -static int -wd_ioctl(int fd, int cmd, int len, char *buf) -{ - int rtnval; - struct strioctl sioc; - sioc.ic_cmd = cmd; - sioc.ic_timout = 60; - sioc.ic_len = len; - sioc.ic_dp = buf; - rtnval = ioctl(fd, I_STR, &sioc); - return (rtnval); -} - -static int -wd_open(int attr) -{ - int cc; - sc_cmdspec_t wd_cmdspec; - - if ((wd_fd = open(SMC_NODE, attr)) < 0) { - return (-1); - } - - /* get exclusive access for set and reset commands of watchdog */ - wd_cmdspec.args[0] = SMC_SET_WATCHDOG_TIMER; - wd_cmdspec.args[1] = SMC_RESET_WATCHDOG_TIMER; - wd_cmdspec.attribute = SC_ATTR_EXCLUSIVE; - - cc = wd_ioctl(wd_fd, SCIOC_MSG_SPEC, 3, - (char *)&wd_cmdspec); - if (cc < 0) { - syslog(LOG_ERR, WD_PICL_EXCLUSIVE_ACCESS_ERR); - return (-1); - } - return (wd_fd); -} - -static int -wd_open_pollfd(int attr) -{ - int cc; - sc_cmdspec_t wd_cmdspec; - - if ((polling_fd = open(SMC_NODE, attr)) < 0) { - return (-1); - } - - /* request for watchdog expiry notification */ - wd_cmdspec.args[0] = SMC_EXPIRED_WATCHDOG_NOTIF; - wd_cmdspec.attribute = SC_ATTR_EXCLUSIVE; - - cc = wd_ioctl(polling_fd, SCIOC_MSG_SPEC, 2, - (char *)&wd_cmdspec); - if (cc < 0) { - syslog(LOG_ERR, WD_PICL_SET_ATTR_FAILED); - return (-1); - } - return (polling_fd); -} - -/* read the ENVIRONMENT variables and initialize tunables */ -static void -wd_get_env() -{ - char *val; - int intval = 0; - - /* read frutree debug flag value */ - if (val = getenv(WATCHDOG_DEBUG)) { - errno = 0; - intval = strtol(val, (char **)NULL, 0); - if (errno == 0) { - wd_debug = intval; - } - } -} - -/* - * PTREE Entry Points - */ - -/* picl-state-change event handler */ -/*ARGSUSED*/ -static void -wd_state_change_evhandler(const char *ename, const void *earg, - size_t size, void *cookie) -{ - char *value; - picl_errno_t rc; - nvlist_t *nvlp; - picl_nodehdl_t fruhdl; - static int spawn_threads = 1; - char name[PICL_PROPNAMELEN_MAX]; - - if (strcmp(ename, PICLEVENT_STATE_CHANGE)) { - return; - } - - /* neglect all events if wd props are already created */ - if (props_created && state_configured) { - return; - } - - if (nvlist_unpack((char *)earg, size, &nvlp, NULL)) { - return; - } - if ((nvlist_lookup_uint64(nvlp, PICLEVENTARG_NODEHANDLE, - &fruhdl)) == -1) { - nvlist_free(nvlp); - return; - } - if (nvlist_lookup_string(nvlp, PICLEVENTARG_STATE, &value)) { - nvlist_free(nvlp); - return; - } - - rc = ptree_get_propval_by_name(fruhdl, PICL_PROP_NAME, - (void *)name, sizeof (name)); - if (rc != PICL_SUCCESS) { - nvlist_free(nvlp); - return; - } - - /* care for only events on chassis node */ - if (strcmp(name, PICL_NODE_CHASSIS) != 0) { - nvlist_free(nvlp); - return; - } - - if (strcmp(value, PICLEVENTARGVAL_CONFIGURED) == 0) { - state_configured = 1; - nvlist_free(nvlp); - return; - } - - if (strcmp(value, PICLEVENTARGVAL_CONFIGURING) != 0) { - nvlist_free(nvlp); - return; - } - - if (wd_fd < 0) { - if ((wd_fd = wd_open(O_RDWR)) < 0) { - syslog(LOG_CRIT, WD_PICL_SMC_OPEN_ERR); - nvlist_free(nvlp); - return; - } - } - - if (polling_fd < 0) { - if ((polling_fd = wd_open_pollfd(O_RDWR)) < 0) { - syslog(LOG_CRIT, WD_PICL_SMC_OPEN_ERR); - nvlist_free(nvlp); - return; - } - } - - switch (wd_get_chassis_type()) { - case WD_HOST: /* is host */ - wd_data.is_host = B_TRUE; - break; - case WD_STANDALONE: /* is satellite */ - wd_data.is_host = B_FALSE; - break; - default: - nvlist_free(nvlp); - return; - } - - (void) wd_create_add_props(); /* create and add properties */ - props_created = 1; - - /* read the hardware and initialize values */ - (void) wd_set_init_state(); - - /* initialize wd-conf value */ - (void) snprintf(wd_conf, sizeof (wd_conf), "%s/%s", - PICL_CONFIG_DIR, WD_CONF_FILE); - - if (spawn_threads == 0) { - /* threads are already created */ - nvlist_free(nvlp); - return; - } - - /* start monitoring for the events */ - if (thr_create(NULL, NULL, wd_polling, - NULL, THR_BOUND, &polling_thr_tid) != 0) { - syslog(LOG_ERR, WD_PICL_THREAD_CREATE_FAILED, - "polling"); - nvlist_free(nvlp); - return; - } - - /* thread used to pat watchdog */ - if (thr_create(NULL, NULL, wd_patting_thread, - NULL, THR_BOUND, &patting_thr_tid) != 0) { - syslog(LOG_ERR, WD_PICL_THREAD_CREATE_FAILED, - "patting"); - nvlist_free(nvlp); - return; - } - spawn_threads = 0; - nvlist_free(nvlp); -} - -static void -wd_picl_register(void) -{ - int rc = 0; - if ((rc = picld_plugin_register(&wd_reg_info)) != PICL_SUCCESS) { - syslog(LOG_ERR, WD_PICL_REG_ERR, rc); - } -} - -/* entry point (initialization) */ -static void -wd_picl_init(void) -{ - /* initialize the wd_conf path and name */ - (void) snprintf(wd_conf, sizeof (wd_conf), "%s/%s", - PICL_CONFIG_DIR, WD_CONF_FILE); - - /* parse configuration file and set tunables */ - wd_parse_config_file(wd_conf); - - /* if watchdog-enable is set to false dont intialize wd subsystem */ - if (wd_enable == 0) { - return; - } - - /* read watchdog related environment variables */ - wd_get_env(); - - /* event handler for state change notifications from frutree */ - (void) ptree_register_handler(PICLEVENT_STATE_CHANGE, - wd_state_change_evhandler, NULL); -} - -static void -wd_picl_fini(void) -{ - (void) ptree_unregister_handler(PICLEVENT_STATE_CHANGE, - wd_state_change_evhandler, NULL); - - state_configured = 0; /* chassis state */ - props_created = 0; - (void) ptree_delete_node(wd_data.wd_ctrl_nodehdl); - (void) ptree_destroy_node(wd_data.wd_ctrl_nodehdl); -} - -/* - * volatile function to read the timeout - */ -static int -wd_read_timeout(ptree_rarg_t *parg, void *buf) -{ - /* update the buffer provided by user */ - (void) mutex_lock(&data_lock); - if (parg->proph == wd_data.wd1_timeout_hdl) { - *(int32_t *)buf = wd_data.wd1_timeout; - } else if (parg->proph == wd_data.wd2_timeout_hdl) { - *(int32_t *)buf = wd_data.wd2_timeout; - } - (void) mutex_unlock(&data_lock); - return (PICL_SUCCESS); -} - -/* - * volatile function to read the action - */ -static int -wd_read_action(ptree_rarg_t *parg, void *buf) -{ - (void) mutex_lock(&data_lock); - if (parg->proph == wd_data.wd1_action_hdl) { - switch (wd_data.wd1_action) { - case WD_ACTION_HEALTHY_DOWN_HOST: - case WD_ACTION_HEALTHY_DOWN_SAT: - (void) strcpy((char *)buf, - PICL_PROPVAL_WD_ACTION_ALARM); - break; - case WD_ACTION_NONE1: - case WD_ACTION_NONE2: - if (wd_data.reboot_action == 1) { - (void) strcpy((char *)buf, - PICL_PROPVAL_WD_ACTION_REBOOT); - } else { - (void) strcpy((char *)buf, - PICL_PROPVAL_WD_ACTION_NONE); - } - break; - } - } else if (parg->proph == wd_data.wd2_action_hdl) { - switch (wd_data.wd2_action) { - case WD_ACTION_HARD_RESET: - (void) strcpy((char *)buf, - PICL_PROPVAL_WD_ACTION_RESET); - break; - case WD_ACTION_NONE2: - (void) strcpy((char *)buf, PICL_PROPVAL_WD_ACTION_NONE); - break; - } - } - (void) mutex_unlock(&data_lock); - return (PICL_SUCCESS); -} - -/* - * volatile function to write the action - * this function validates the user value before programming the - * action property. Properties can be modified only when watchdog - * is in disarmed state. - */ -static int -wd_write_action(ptree_warg_t *parg, const void *buf) -{ - int flag = 0x0; - picl_errno_t rc = PICL_SUCCESS; - char wd_action[PICL_WD_PROPVAL_MAX]; - - /* only super user can write this property */ - if (parg->cred.dc_euid != SUPER_USER) { - return (PICL_PERMDENIED); - } - - if (parg->proph == wd_data.wd1_action_hdl) { - flag = WD1; - } else if (parg->proph == wd_data.wd2_action_hdl) { - flag = WD2; - } - - /* dont allow any write operations when watchdog is armed */ - (void) mutex_lock(&data_lock); - if (wd_data.wd1_run_state != WD_DISARMED || - wd_data.wd2_run_state != WD_DISARMED) { - (void) mutex_unlock(&data_lock); - return (PICL_PERMDENIED); - } - - /* validate the values and store in internal cache */ - (void) strcpy(wd_action, (char *)buf); - switch (flag) { - case WD1: - if (strcmp(wd_action, PICL_PROPVAL_WD_ACTION_ALARM) == 0) { - if (wd_data.is_host) - wd_data.wd1_action = WD_ACTION_HEALTHY_DOWN_HOST; - else - wd_data.wd1_action = WD_ACTION_HEALTHY_DOWN_SAT; - wd_data.reboot_action = 0; - } else if (strcmp(wd_action, PICL_PROPVAL_WD_ACTION_NONE) == 0) { - wd_data.wd1_action = WD_ACTION_NONE1; - wd_data.reboot_action = 0; - } else if (strcmp(wd_action, PICL_PROPVAL_WD_ACTION_REBOOT) == 0) { - wd_data.wd1_action = WD_ACTION_NONE1; - wd_data.reboot_action = 1; - } else { - rc = PICL_INVALIDARG; - } - break; - - case WD2: - if (strcmp(wd_action, PICL_PROPVAL_WD_ACTION_RESET) == 0) { - wd_data.wd2_action = WD_ACTION_HARD_RESET; - } else if (strcmp(wd_action, PICL_PROPVAL_WD_ACTION_NONE) == 0) { - wd_data.wd2_action = WD_ACTION_NONE2; - } else { - rc = PICL_INVALIDARG; - } - break; - } - (void) mutex_unlock(&data_lock); - return (rc); -} - -/* - * volatile function to write the timeout - * this function validates the user value before programming the - * timeout property. Properties can be modified only when watchdog - * is in disarmed state. - */ -static int -wd_write_timeout(ptree_warg_t *parg, const void *buf) -{ - int32_t timeout; - int flag = 0x0; - - /* only super user can write this property */ - if (parg->cred.dc_euid != SUPER_USER) { - return (PICL_PERMDENIED); - } - - /* dont allow any write operations when watchdog is armed */ - (void) mutex_lock(&data_lock); - if (wd_data.wd1_run_state != WD_DISARMED || - wd_data.wd2_run_state != WD_DISARMED) { - (void) mutex_unlock(&data_lock); - return (PICL_PERMDENIED); - } - (void) mutex_unlock(&data_lock); - - if (parg->proph == wd_data.wd1_timeout_hdl) { - flag = WD1; - } else if (parg->proph == wd_data.wd2_timeout_hdl) { - flag = WD2; - } - - /* validate the timeout values */ - timeout = *(int32_t *)buf; - if (timeout < -1) { - return (PICL_INVALIDARG); - } - - if (timeout > 0) { - switch (flag) { - case WD1: - if ((timeout % WD_L1_RESOLUTION) != 0) { - return (PICL_INVALIDARG); - } - if ((timeout/WD_L1_RESOLUTION) > WD_MAX_L1) { - return (PICL_INVALIDARG); - } - break; - case WD2: - if ((timeout % WD_L2_RESOLUTION) != 0) { - return (PICL_INVALIDARG); - } - if ((timeout/WD_L2_RESOLUTION) > WD_MAX_L2) { - /* 255 sec */ - return (PICL_INVALIDARG); - } - } - } - - /* update the internal cache */ - (void) mutex_lock(&data_lock); - switch (flag) { - case WD1: - wd_data.wd1_timeout = timeout; - break; - case WD2: - wd_data.wd2_timeout = timeout; - break; - } - (void) mutex_unlock(&data_lock); - return (PICL_SUCCESS); -} diff --git a/usr/src/cmd/picl/plugins/sun4u/snowbird/watchdog/piclwatchdog.h b/usr/src/cmd/picl/plugins/sun4u/snowbird/watchdog/piclwatchdog.h deleted file mode 100644 index 7870fc0363..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/snowbird/watchdog/piclwatchdog.h +++ /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, 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 _PICL_WATCHDOG_H -#define _PICL_WATCHDOG_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include - -#define WD_DEBUG0(fmt) \ - if (wd_debug) { \ - syslog(LOG_DEBUG, fmt); \ - } -#define WD_DEBUG1(fmt, d1) \ - if (wd_debug) { \ - syslog(LOG_DEBUG, fmt, d1); \ - } - -/* environment variable defs */ -#define WATCHDOG_DEBUG "SUNW_WATCHDOG_DEBUG" - -/* debug flags */ -#define WD_GENERAL_MSGS 0x1 -#define WD_TIME_DEBUG 0x2 - -/* tunables */ -#define WD_DEFAULT_THREAD_PRIORITY 0 -#define WD_POLL_TIMEOUT 10000 /* 10 sec */ -#define WD_PAT_TIME 5000 - -/* constants */ -#define WD_SET_CMD_DATA_LEN 6 /* size for set cmd */ -#define PICL_WD_PROPVAL_MAX 20 -#define SUPER_USER 0 - -/* watchdog status */ -#define WD_ARMED 0x1 /* watchdog is running */ -#define WD_EXPIRED 0x2 /* watchdog is expired */ -#define WD_DISARMED 0x4 /* watchdog is stopped */ - -/* patting status */ -#define WD_RESET 0x8 /* client chose to pat. */ -#define WD_NORESET 0x0 /* pat state initial value. */ - -/* auto pat feature for SMC f/w */ -#define ENABLE_AUTO_PAT 0x1 -#define DISABLE_AUTO_PAT 0x0 - -/* flags used to track user actions */ -#define USER_ARMED_WD 0x1 /* user armed the watchdog */ -#define USER_ARMED_PAT_WD 0x2 /* debug feature */ -#define USER_PAT_WD 0x3 /* debug feature */ -#define USER_DISARMED_WD 0x4 /* user disarmed watchdog */ - -/* bit masks */ -#define WD_ACTION_NONE1 0x30 /* action none with interrupt */ -#define WD_ACTION_NONE2 0x00 /* no action */ -#define WD_ACTION_HARD_RESET 0x01 /* hard reset */ -#define WD_ACTION_HEALTHY_DOWN_HOST 0x50 /* dont put bridge in reset */ -#define WD_ACTION_HEALTHY_DOWN_SAT 0x40 /* healthy down, bridge reset */ -#define WD_USEFLAG_OS 0x04 /* set os as user of wd */ -#define WD_XPR_FLG_CLR_OS 0x10 /* to clear sms/os expiry bit */ -#define WD_WD_RUNNING 0x40 /* to check wd running or not */ -#define WD_ENABLE_AUTO_PAT 0x20 /* enable auto pat feature */ - -/* timer max values */ -#define WD_MAX_L2 0xff /* 255 sec */ -#define WD_MAX_L1 0xffff /* 109.22 min */ -#define WD_L1_RESOLUTION 100 /* 100ms/cnt */ -#define WD_L2_RESOLUTION 1000 /* 1000ms/cnt */ - -#define WD1 0x1 /* wd level 1 */ -#define WD2 0x2 /* wd level 2 */ -#define WD1_2 0x3 /* wd level 1 and level 2 */ -#define WD_MAX_SEQN 255 - -/* PICL node names */ -#define PICL_NODE_CHASSIS "chassis" -#define PICL_NODE_SYSMGMT "sysmgmt" -#define PICL_NODE_WD_CONTROLLER "watchdog" -#define PICL_NODE_WD_L1 "watchdog-level1" -#define PICL_NODE_WD_L2 "watchdog-level2" - -/* debug value for wd_op */ -#define WD_ARM_PAT "arm-pat" - -/* HEALTHY# status */ -#define WD_HEALTHY_DOWN 0x0 -#define WD_HEALTHY_UP 0x1 - -#define SHUTDOWN_CMD "shutdown -y -i 6 -g 60 watchdog "\ - "expired.. rebooting" -/* watchdog config file variables */ -#define PICL_CONFIG_DIR "/etc/picl/config" -#define WD_CONF_FILE "watchdog.conf" -#define WD_CONF_MAXSIZE 100 -#define WD_DELIMETER " \t\n" - -/* The following values can be tuned using config file */ -#define WD_PAT_THREAD_PRIORITY "wd_thread_priority" -#define WD_PATTING_TIME "wd_pat_time" -#define WD_ENABLE "watchdog-enable" - -#define WD_HOST 1 -#define WD_STANDALONE 2 - -/* HEALTHY# bitmask */ -#define IS_HEALTHY 0x01 - -#define DEFAULT_SEQN 15 -#define DEFAULT_FD -1 -#define SMC_NODE "/dev/ctsmc" - -#define WD_REGISTER_LEN 8 - -typedef struct { - /* properties values */ - uint8_t wd1_run_state; /* L1 status */ - uint8_t wd1_action; /* L1 action */ - uint8_t wd2_run_state; /* L2 status */ - uint8_t wd2_action; /* L2 action */ - int32_t wd1_timeout; /* L1 timeout */ - int32_t wd2_timeout; /* L2 timeout */ - uchar_t wd_pat_state; /* pat state */ - boolean_t reboot_action; /* is reboot action set */ - boolean_t is_host; /* is a host or standalone CPU */ - - /* Cache for PICL handles */ - picl_nodehdl_t wd_ctrl_nodehdl; /* watchdog controller */ - /* prop handle for op */ - picl_prophdl_t wd_ops_hdl; - - picl_prophdl_t wd1_state_hdl; - picl_prophdl_t wd1_timeout_hdl; - picl_prophdl_t wd1_action_hdl; - picl_nodehdl_t wd1_nodehdl; /* L1 node handle */ - - picl_prophdl_t wd2_state_hdl; - picl_prophdl_t wd2_timeout_hdl; - picl_prophdl_t wd2_action_hdl; - picl_nodehdl_t wd2_nodehdl; /* L2 node handle */ -} wd_data_t; - -/* structure to hold watchdog status */ -typedef struct { - int present_state; - uint8_t action1; - uint8_t action2; - uint8_t timeout1[2]; - uint8_t timeout2; - uint8_t present_t1[2]; -} wd_state_t; - -/* Error messages */ -#define WD_PICL_NOSPACE \ - gettext("SUNW_piclwatchdog: Error in memory allocation") -#define WD_PICL_REG_ERR \ - gettext("SUNW_piclwatchdog: Failed to register with picl framework,"\ - " error = %d") -#define WD_PICL_SMC_OPEN_ERR \ - gettext("SUNW_piclwatchdog: Error in opening SMC drv") -#define WD_PICL_EXCLUSIVE_ACCESS_ERR \ - gettext("SUNW_piclwatchdog: Error in getting exclusive access "\ - "for watchdog commands") -#define WD_PICL_THREAD_CREATE_FAILED \ - gettext("SUNW_piclwatchdog: Error in creating %s thread") -#define WD_PICL_PROP_INIT_ERR \ - gettext("SUNW_piclwatchdog: ptree prop init call failed:%d") -#define WD_NODE_INIT_ERR \ - gettext("SUNW_piclwatchdog: Error in creating watchdog nodes(%d):%d") -#define WD_PICL_GET_STAT_ERR \ - gettext("SUNW_piclwatchdog: Error in getting the watchdog status") -#define WD_PICL_GET_ERR \ - gettext("SUNW_piclwatchdog: Error in getting watchdog status,"\ - " error = %d") -#define WD_PICL_PAT_ERR \ - gettext("SUNW_piclwatchdog: Error in patting the watchdog"\ - " error = %d") -#define WD_PICL_START_ERR \ - gettext("SUNW_piclwatchdog: Error in starting the watchdog, error = %d") -#define WD_PICL_STOP_ERR \ - gettext("SUNW_piclwatchdog: Error in stopping the watchdog,"\ - " error = %d") -#define WD_PICL_SET_ATTR_FAILED \ - gettext("SUNW_piclwatchdog: Error in setting attributes for a stream") -#define WD_PICL_RT_THRD_FAIL \ - gettext("SUNW_piclwatchdog: Error in creating real time thread") -#define WD_PICL_RT_THRD_NO_PERM_ERR \ - gettext("SUNW_piclwatchdog: No perm to change the priority of thread") -#define WD_PICL_NO_WD_ERR \ - gettext("SUNW_piclwatchdog: Watchdog is not running") -#define WD_PICL_WD1_RUNNING_ERR \ - gettext("SUNW_piclwatchdog: Disarm the Watchdog level 1") -#define WD_PICL_WD2_RUNNING_ERR \ - gettext("SUNW_piclwatchdog: Disarm the Watchdog level 2") -#define WD_PICL_SMC_READ_ERR \ - gettext("SUNW_piclwatchdog: Error in reading from SMC") -#define WD_PICL_SMC_WRITE_ERR \ - gettext("SUNW_piclwatchdog: Error in writing to SMC") -#define WD_NO_ROOT_PERM \ - gettext("SUNW_piclwatchdog: Root perm are reqd to perform this op.") -#define WD_PICL_POLL_ERR \ - gettext("SUNW_piclwatchdog: Error in poll system call") -#define WD_PICL_INVALID_T1 \ - gettext("SUNW_piclwatchdog: Invalid timeout value for wd level 1") -#define WD_PICL_INVALID_T2 \ - gettext("SUNW_piclwatchdog: Invalid timeout value for wd level 2") -#define WD_PICL_TMOUT_LV1_LV2_SETTO_0 \ - gettext("SUNW_piclwatchdog: Invalid timeout val for wd level 1 & 2") -#define WD_PICL_INVALID_ACTION1 \ - gettext("SUNW_piclwatchdog: Invalid action for level one") -#define WD_PICL_INVALID_ACTION2 \ - gettext("SUNW_piclwatchdog: Invalid action for level two") -#define WD_PICL_CLEAR_EXCL_ERR \ - gettext("SUNW_piclwatchdog: Error in clearing exclusive "\ - "access for watchdog commands") -#define WD_PICL_POST_EVENT_ERR \ - gettext("SUNW_piclwatchdog: Error in posting wd expiry event,"\ - " error = %d") -#define WD_PICL_COND_SIGNAL_ERR \ - gettext("SUNW_piclwatchdog: Error in cond_signal") -#define WD_PICL_IS_NOT_SUPPORTED \ - gettext("SUNW_piclwatchdog: This feature is not supported") -#define WD_PICL_TRY_PAT_ERR \ - gettext("SUNW_piclwatchdog: OS is already patting the watchdog") -#define WD_PICL_GET_TIMEOUT_ERR \ - gettext("SUNW_piclwatchdog: Error in getting the timeout values") -#define WD_PICL_ARM_PAT_ERR \ - gettext("SUNW_piclwatchdog: Illegal timeout values for arm-pat op") -#define WD_PICL_PERM_DENIED \ - gettext("SUNW_piclwatchdog: This client is not the owner of watchdog") -#define WD_PICL_PAT_TIME_ERR \ - gettext("SUNW_piclwatchdog: Negative value for pat_time \ - is not allowed") -#define WD_PICL_STATE_INVALID \ - gettext("SUNW_piclwatchdog: WD operations not allowed while "\ - "chassis state is configuring") -#define WD_HEALTHY_ERR \ - gettext("SUNW_piclwatchdog: Cannot arm the watchdog, "\ - "action already taken") -#define WD_GET_OWN_FAILED \ - gettext("SUNW_piclwatchdog: Error in finding active owner of watchdog,"\ - " error = %d") -#define WD_NVLIST_ERR \ - gettext("SUNW_piclwatchdog: Error in posting watchdog event"\ - "(nvlist error), error = %d") -#define WD_GET_HEALTH_ERR \ - gettext("SUNW_piclwatchdog: Error in getting HEALTHY# status") -#define WD_UPDATE_STATE_ERR \ - gettext("SUNW_piclwatchdog: Error in updating watchdog state,"\ - "error = %d") -#define WD_WD1_EXPIRED \ - gettext("SUNW_piclwatchdog: watchdog level 1 expired") -#ifdef __cplusplus -} -#endif - -#endif /* _PICL_WATCHDOG_H */ diff --git a/usr/src/cmd/picl/plugins/sun4u/snowbird/watchdog/piclwd_platmod.c b/usr/src/cmd/picl/plugins/sun4u/snowbird/watchdog/piclwd_platmod.c deleted file mode 100644 index 4b00529f54..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/snowbird/watchdog/piclwd_platmod.c +++ /dev/null @@ -1,59 +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 -#include -#include -#include -#include -#include "piclwatchdog.h" - -#define NETRA_CP2300 "SUNW,Netra-CP2300" - -int -wd_get_chassis_type() -{ - picl_nodehdl_t chassis_h; - char chassis_type[PICL_PROPNAMELEN_MAX]; - - if (ptree_get_node_by_path(PICL_FRUTREE_CHASSIS, - &chassis_h) != PICL_SUCCESS) { - return (-1); - } - - if (ptree_get_propval_by_name(chassis_h, PICL_PROP_CHASSIS_TYPE, - chassis_type, sizeof (chassis_type)) != PICL_SUCCESS) { - return (-1); - } - - if (strcmp(chassis_type, NETRA_CP2300) == 0) { - return (WD_STANDALONE); - } else { - return (-1); - } -} diff --git a/usr/src/cmd/picl/plugins/sun4u/taco/Makefile b/usr/src/cmd/picl/plugins/sun4u/taco/Makefile deleted file mode 100644 index 85c46e2ca4..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/taco/Makefile +++ /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, 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 2002 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# ident "%Z%%M% %I% %E% SMI" -# -# cmd/picl/plugins/sun4u/taco/Makefile -# - -SUBDIRS= frudata frutree envd - -MSGSUBDIRS= envd - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -.KEEP_STATE: - -all install clean clobber: $(SUBDIRS) - -_msg: $(MSGSUBDIRS) - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/taco/envd/Makefile b/usr/src/cmd/picl/plugins/sun4u/taco/envd/Makefile deleted file mode 100644 index 4b7c46adc3..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/taco/envd/Makefile +++ /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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# cmd/picl/plugins/sun4u/taco/envd/Makefile -# -include $(SRC)/Makefile.psm - -LIBRARY= libpiclenvd.a -VERS= .1 - -OBJECTS= piclenvd.o piclenvsetup.o - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Blade-1500 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -CPPFLAGS += -D_POSIX_PTHREAD_SEMANTICS -CPPFLAGS += -I$(SRC)/uts/sun4u/ -I$(SRC)/uts/common/ -CPPFLAGS += -I$(SRC)/uts/sun4u/taco -CPPFLAGS += -I$(SRC)/cmd/picl/plugins/lib/picld_pluginutil - -SRCS= $(OBJECTS:%.o=%.c) - -LIBS = $(DYNLIB) - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONF= envmodel.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 -INFOS= envmodel.info - - -DYNFLAGS += -R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins -LDLIBS += -L$(SRC)/lib/libpicltree/$(MACH) -LDLIBS += -L$(SRC)/cmd/picl/plugins/common/devtree -LDLIBS += -L$(SRC)/cmd/picl/plugins/lib/picld_pluginutil/$(MACH) -LDLIBS += -L$(ROOT)/usr/lib/picl/plugins -lpicldevtree -lpicltree -LDLIBS += -lpicld_pluginutil -LDLIBS += -ldevinfo -lc - -.KEEP_STATE: - -SUBDIRS= - -POFILE = piclenvd_taco.po -POFILES = $(SRCS:%.c=%.po) - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -all: $(LIBS) $(LIBLINKS) $(CONF) - -install: $(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) $(ROOTCONF) - -$(CONF): $(INFOS) - $(RM) $@ - $(CPP) envmodel.info > $@ - - -$(POFILE): $(POFILES) - $(CAT) $(POFILES) > $(POFILE) - -_msg: $(MSGDOMAIN) $(POFILE) - $(RM) $(MSGDOMAIN)/$(POFILE) - $(CP) $(POFILE) $(MSGDOMAIN)/$(POFILE) - -$(MSGDOMAIN): - $(INS.dir) - - -$(LIBLINKS): FRC - $(RM) $@; $(SYMLINK) $(DYNLIB) $@ - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/taco/envd/envd.h b/usr/src/cmd/picl/plugins/sun4u/taco/envd/envd.h deleted file mode 100644 index 0dc89aeb2f..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/taco/envd/envd.h +++ /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, 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 2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _ENVD_H -#define _ENVD_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#define SENSORPOLL_INTERVAL 4 -#define INTERRUPTPOLL_INTERVAL 2 -#define WARNING_INTERVAL 30 -#define SHUTDOWN_INTERVAL 60 -#define ENV_CONF_FILE "envmodel.conf" -#define TUNABLE_CONF_FILE "piclenvd.conf" -#define PM_DEVICE "/dev/pm" -#define SHUTDOWN_CMD "/usr/sbin/shutdown -y -g 60 -i 5" -#define PICL_PLUGINS_NODE "plugins" -#define PICL_ENVIRONMENTAL_NODE "environmental" - -/* - * ADC Sample of ADM in Khz, currently 11.2 KHz - */ -#define ADCSAMPLE 11250 - -/* - * Taco Platform Details - */ -#define MAX_SENSORS 3 -#define MAX_FANS 2 -#define MAX_HWMS 1 - -/* - * ADM1031 Hardware Monitor IDs - * Used as index into arrays - */ -#define CPU_HWM_ID 0 - -#define CPU_HWM_DEVFS \ - "/devices/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c:control" - -#define HWM_FAN1 0 -#define HWM_FAN2 1 - -/* - * Taco sensor IDs as used in FRUID segment - */ -#define SYS_IN_SENSOR_ID 0 -#define CPU_SENSOR_ID 1 -#define INT_AMB_SENSOR_ID 2 -#define MAX_SENSOR_ID 2 - -/* - * Taco fan IDs used in FRUID segment - */ -#define SYSTEM_FAN_ID 0 -#define CPU_FAN_ID 1 -#define MAX_FAN_ID 1 - -/* - * devfs-path for various fans and their min/max speeds - */ -#define ENV_CPU_FAN_DEVFS \ - "/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c:fan_2" -#define ENV_SYSTEM_FAN_DEVFS \ - "/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c:fan_1" - -#define FAN_RANGE_DEFAULT 4 -#define CPU_FAN_SPEED_MIN 14 -#define CPU_FAN_SPEED_MAX 100 - -#define SYSTEM_OUT_FAN_SPEED_MIN 14 -#define SYSTEM_OUT_FAN_SPEED_MAX 100 - -#define SYSTEM_INTAKE_FAN_SPEED_MIN 14 -#define SYSTEM_INTAKE_FAN_SPEED_MAX 100 - - - -/* - * devfs-path for various temperature sensors and CPU platform path - */ -#define SENSOR_CPU_DIE_DEVFS \ - "/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c:remote_2" -#define SENSOR_SYS_IN_DEVFS \ - "/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c:remote_1" -#define SENSOR_INT_AMB_DEVFS \ - "/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c:local" - -/* - * Temperature type - */ -typedef int16_t tempr_t; - - -/* - * Fan names - */ -#define ENV_SYSTEM_INTAKE_FAN "intake-fan" -#define ENV_SYSTEM_OUT_FAN "outtake-fan" -#define ENV_CPU_FAN "cpu-fan" -#define ENV_SYSTEM_IN_OUT_FANS "intake-outtake-fans" - -/* - * Sensor names - */ -#define SENSOR_CPU_DIE "cpu" -#define SENSOR_SYS_IN "sys-in" -#define SENSOR_INT_AMB "int-amb" - -/* Bit Map of ADM 1031 Status 1/2 Registers */ -enum adm1031 { - FANFAULT = 0x2, - REMOTEHIGH = 0x4, - REMOTELOW = 0x8, - REMOTETHERN = 0x10, - LHIGH = 0x40, - LLOW = 0x80 -} adm1031_t; - -/* ADM Stat 1/2 Mask */ -enum adm1031Mask { - STAT1MASK = 0xdc, - STAT2MASK = 0x1c -} adm1031Mask_t; - -/* - * ES segment related structures - */ -typedef struct id_off { - uint_t id; - ushort_t offset; -} id_off_t; - -typedef struct fan_ctl_pair { - uchar_t tMin; - uchar_t tRange; -} fan_ctl_pair_t; - -typedef struct Correction_Pair { - uchar_t measured; - uchar_t corrected; -} Correction_Pair_t; - -#define ES_SENSOR_POLICY_LEN 8 -#define ES_CORRECTION_PAIRS 12 - -typedef struct sensor_ctrl_blk { - uchar_t high_power_off; - uchar_t high_shutdown; - uchar_t high_warning; - uchar_t low_warning; - uchar_t low_shutdown; - uchar_t low_power_off; - uchar_t sensorPolicy[ES_SENSOR_POLICY_LEN]; - ushort_t correctionEntries; - Correction_Pair_t correctionPair[ES_CORRECTION_PAIRS]; -} sensor_ctrl_blk_t; - - -#define ES_FAN_CTL_PAIRS 4 - -typedef struct fan_ctrl_blk { - uchar_t tSpinUp; - uchar_t minFanSpeed; - ushort_t setPoint; - ushort_t loopGain; - ushort_t loopBias; - ushort_t hysteresis; - ushort_t fanViabTestInt; - ushort_t fanViabTestThresh; - ushort_t grossFanThresh; - uchar_t no_ctl_pairs; - fan_ctl_pair_t fan_ctl_pairs[ES_FAN_CTL_PAIRS]; -} fan_ctrl_blk_t; - -#define TEMP_IN_WARNING_RANGE(val, sensorp) \ - ((val) > (sensorp)->es_ptr->high_warning || \ - (val) < (char)((sensorp)->es_ptr->low_warning)) - -#define TEMP_IN_SHUTDOWN_RANGE(val, sensorp) \ - ((val) > (sensorp)->es_ptr->high_shutdown || \ - (val) < (char)((sensorp)->es_ptr->low_shutdown)) - -/* - * Macros to fetch 16 and 32 bit data from unaligned address - */ -#define GET_UNALIGN16(addr) \ - (((*(uint8_t *)addr) << 8) | *((uint8_t *)addr + 1)) - -#define GET_UNALIGN32(addr) \ - (((*(uint8_t *)addr) << 24) | (*((uint8_t *)addr + 1) << 16) | \ - ((*((uint8_t *)addr + 2)) << 8) | (*((uint8_t *)addr + 3))) - -/* - * SEEPROM section header layout and location - */ -typedef struct { - uint8_t header_tag; /* section header tag */ - uint8_t header_version[2]; /* header version (msb) */ - uint8_t header_length; /* header length */ - uint8_t header_crc8; /* crc8 */ - uint8_t segment_count; /* total number of segments */ -} section_layout_t; - -#define SECTION_HDR_OFFSET 0x1800 -#define SECTION_HDR_TAG 0x08 -#define SECTION_HDR_VER 0x0001 -#define SECTION_HDR_LENGTH 0x06 - -/* - * SEEPROM segment header layout - */ -typedef struct { - uint16_t name; /* segment name */ - uint16_t descriptor[2]; /* descriptor (msb) */ - uint16_t offset; /* segment data offset */ - uint16_t length; /* segment length */ -} segment_layout_t; - -#define ENVSEG_NAME 0x4553 /* environmental segment name */ -#define ENVSEG_VERSION 2 /* environmental segment version */ - -#define SENSOR_WARN 1 -#define SENSOR_OK 0 - -/* - * SEEPROM environmental segment header layout - */ -typedef struct { - uint16_t sensor_id[2]; /* unique sensor ID (on this FRU) */ - uint16_t offset; /* sensor data record offset */ -} envseg_sensor_t; - -typedef struct { - uint8_t version; /* envseg version */ - uint8_t sensor_count; /* total number of sensor records */ - envseg_sensor_t sensors[1]; /* sensor table (variable length) */ -} envseg_layout_t; - -/* - * FRU envseg list - */ -typedef struct fruenvseg { - struct fruenvseg *next; /* next entry */ - char *fru; /* FRU SEEPROM path */ - void *envsegbufp; /* envseg data buffer */ - int envseglen; /* envseg length */ -} fruenvseg_t; - -#define I2C_DEVFS "/devices/pci@1e,600000/isa@7/i2c@0,320" -#define MBFRU_DEV "/motherboard-fru-prom@0,a8:motherboard-fru-prom" -#define FRU_SEEPROM_NAME "motherboard-fru-prom" -/* - * Table data structures - */ -typedef struct { - int32_t x; - int32_t y; -} point_t; - -typedef struct { - int nentries; - point_t *xymap; -} table_t; - -/* - * Temperature sensor related data structure - */ -typedef struct env_sensor { - char *name; /* sensor name */ - char *devfs_path; /* sensor device devfs path */ - sensor_ctrl_blk_t *es_ptr; - uchar_t id; - int hwm_id; - void *fanp; - int fd; /* device file descriptor */ - int error; /* error flag */ - boolean_t present; /* sensor present */ - tempr_t cur_temp; /* current temperature */ - time_t warning_tstamp; /* last warning time (secs) */ - time_t shutdown_tstamp; /* shutdown temp time (secs) */ - boolean_t shutdown_initiated; /* shutdown initated */ - table_t *crtbl; /* Correction table */ - tempr_t tmin; -} env_sensor_t; - -extern env_sensor_t *sensor_lookup(char *sensor_name); -extern int get_temperature(env_sensor_t *, tempr_t *); - -/* - * Fan information data structure - */ -typedef int fanspeed_t; - -typedef struct env_fan { - char *name; /* fan name */ - char *devfs_path; /* fan device devfs path */ - fan_ctrl_blk_t *es_ptr; - uchar_t id; - fanspeed_t speed_min; /* minimum speed */ - fanspeed_t speed_max; /* maximum speed */ - int forced_speed; /* forced (fixed) speed */ - int fd; /* device file descriptor */ - boolean_t present; /* fan present */ - int speedrange; /* speed range N */ - int fanstat; /* Fan status */ - uint8_t cspeed; /* Current speed (tach) */ - uint8_t lspeed; /* Last speed (tach) */ - int conccnt; /* Concurrent tach count */ -} env_fan_t; - -/* - * Tuneables - */ -typedef struct env_tuneable { - char *name; - char type; - void *value; - int (*rfunc)(ptree_rarg_t *, void *); - int (*wfunc)(ptree_warg_t *, const void *); - int nbytes; - picl_prophdl_t proph; -} env_tuneable_t; - -extern env_fan_t *fan_lookup(char *fan_name); -extern int get_fan_speed(env_fan_t *, fanspeed_t *); -extern int set_fan_speed(env_fan_t *, fanspeed_t); - -extern int env_debug; -extern void envd_log(int pri, const char *fmt, ...); - -/* - * Various messages - */ -#define ENVD_PLUGIN_INIT_FAILED \ - gettext("SUNW_piclenvd: initialization failed!\n") - -#define ENVD_PICL_SETUP_FAILED \ - gettext("SUNW_piclenvd: PICL setup failed!\n") - -#define PM_THREAD_CREATE_FAILED \ - gettext("SUNW_piclenvd: pmthr thread creation failed!\n") - -#define PM_THREAD_EXITING \ - gettext("SUNW_piclenvd: pmthr exiting! errno:%d %s\n") - -#define ENVTHR_THREAD_CREATE_FAILED \ - gettext("SUNW_piclenvd: envthr thread creation failed!\n") - -#define ENV_SHUTDOWN_MSG \ - gettext("SUNW_piclenvd: '%s' sensor temperature %d outside safe " \ - "limits (%d...%d). Shutting down the system.\n") - -#define ENV_WARNING_MSG \ - gettext("SUNW_piclenvd: '%s' sensor temperature %d outside safe " \ - "operating limits (%d...%d).\n") - -#define ENV_FAN_OPEN_FAIL \ - gettext("SUNW_piclenvd: can't open '%s' fan path:%s errno:%d %s\n") - -#define ENV_SENSOR_OPEN_FAIL \ - gettext("SUNW_piclenvd: can't open '%s' sensor path:%s errno:%d %s\n") - -#define ENV_SENSOR_ACCESS_FAIL \ - gettext("SUNW_piclenvd: can't access '%s' sensor errno:%d %s\n") - -#define ENV_SENSOR_ACCESS_OK \ - gettext("SUNW_piclenvd: '%s' sensor is accessible now.\n") - -#define ENV_FRU_OPEN_FAIL \ - gettext("SUNW_piclenvd: can't open FRU SEEPROM path:%s errno:%d %s\n") - -#define ENV_FRU_BAD_ENVSEG \ - gettext("SUNW_piclenvd: version mismatch or environmental segment " \ - "header too short in FRU SEEPROM %s\n") - -#define ENV_FRU_BAD_SENSOR_ENTRY \ - gettext("SUNW_piclenvd: discarding bad sensor entry (sensor_id " \ - "%x sensor '%s') in FRU SEEPROM %s\n") - -#define ENV_FRU_SENSOR_MAP_NOMEM \ - gettext("SUNW_piclenvd: out of memory, discarding sensor map for " \ - "sensor_id %x (sensor '%s') in FRU SEEPROM %s\n") - -#define ENV_ADM_OPEN_FAIL \ - gettext("SUNW_piclenvd: can't open hwm path:%s errno:%d %s\n") - -#define ENV_ADM_MANUAL_MODE \ - gettext("SUNW_piclenvd: Cannot change the ADM Chip to Manual mode") - -#define ENV_ADM_AUTO_MODE \ - gettext("SUNW_piclenvd: Cannot change the ADM Chip to Auto mode") - -#define ENV_FAN_FAULT \ - gettext("SUNW_piclenvd: ADM %s, Fan %s Fault") -#ifdef __cplusplus -} -#endif - -#endif /* _ENVD_H */ diff --git a/usr/src/cmd/picl/plugins/sun4u/taco/envd/envmodel.info b/usr/src/cmd/picl/plugins/sun4u/taco/envd/envmodel.info deleted file mode 100644 index cb7e1fb4cd..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/taco/envd/envmodel.info +++ /dev/null @@ -1,115 +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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * This is the environmental plug-in configuration file for - * Taco platform. - */ - -VERSION 1.1 - -VERBOSE 1 - -/* - * Fan names - */ -#define ENV_SYSTEM_INTAKE_FAN intake-fan -#define ENV_SYSTEM_OUT_FAN outtake-fan -#define ENV_CPU_FAN cpu-fan - -/* - * Sensor ids & names - */ -#define SENSOR_CPU_DIE cpu -#define SENSOR_SYS_IN sys-in -#define SENSOR_INT_AMB int-amb - -/* - * Sensor IDs - */ -#define CPU_SENSOR_ID 1 -#define INT_AMB_SENSOR_ID 0 -#define SYS_IN_SENSOR_ID 2 - -/* - * Fan IDs - */ -#define CPU_FAN_ID 1 -#define SYSTEM_FAN_ID 0 - -/* - * Publish the labels for sensors and fans - */ -name:/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c/SENSOR_CPU_DIE - PROP Label string r 0 "Die" - PROP ID int r 4 CPU_SENSOR_ID - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c/SENSOR_SYS_IN - PROP Label string r 0 "Ambient" - PROP ID int r 4 SYS_IN_SENSOR_ID - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c/SENSOR_INT_AMB - PROP Label string r 0 "Ambient" - PROP ID int r 4 INT_AMB_SENSOR_ID - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c/ENV_SYSTEM_INTAKE_FAN - PROP Label string r 0 "Intake" - PROP ID int r 4 SYSTEM_FAN_ID - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c/ENV_SYSTEM_OUT_FAN - PROP Label string r 0 "Outtake" - PROP ID int r 4 SYSTEM_FAN_ID - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c/ENV_CPU_FAN - PROP Label string r 0 "CPU" - PROP ID int r 4 CPU_FAN_ID - -/* - * Associate the environmental information with devices. - */ - -/* - * CPU environmental information - */ -_class:/jbus/cpu?ID=0 -TABLE Environment - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ /platform/pci/isa/i2c?UnitAddress=0,320/hardware-monitor?UnitAddress=0,5c/SENSOR_CPU_DIE - ENDROW - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ /platform/pci/isa/i2c?UnitAddress=0,320/hardware-monitor?UnitAddress=0,5c/SENSOR_SYS_IN - ENDROW - ROW - PROP Class string r 0 "fan" - REFPROP _fan_ /platform/pci/isa/i2c?UnitAddress=0,320/hardware-monitor?UnitAddress=0,5c/ENV_CPU_FAN - ENDROW -ENDTABLE - diff --git a/usr/src/cmd/picl/plugins/sun4u/taco/envd/piclenvd.c b/usr/src/cmd/picl/plugins/sun4u/taco/envd/piclenvd.c deleted file mode 100644 index bfc1267d0c..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/taco/envd/piclenvd.c +++ /dev/null @@ -1,1849 +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 2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * This file contains the environmental PICL plug-in module. - */ - -/* - * This plugin sets up the PICLTREE for Taco. - * It provides functionality to get/set temperatures - * and fan speeds - * - * The environmental monitoring policy is the default - * auto mode as programmed by OBP at boot time. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "envd.h" - -/* - * PICL plguin entry points - */ -static void piclenvd_register(void); -static void piclenvd_init(void); -static void piclenvd_fini(void); - -/* - * Env setup routines - */ -extern void env_picl_setup(void); -extern void env_picl_destroy(void); -extern int env_picl_setup_tuneables(void); - -/* - * Sleep routine used for polling - */ -static uint_t envd_sleep(uint_t); - -#pragma init(piclenvd_register) - -/* - * Plugin registration information - */ -static picld_plugin_reg_t my_reg_info = { - PICLD_PLUGIN_VERSION, - PICLD_PLUGIN_CRITICAL, - "SUNW_piclenvd", - piclenvd_init, - piclenvd_fini, -}; - -/* - * ES Segment data structures - */ -static sensor_ctrl_blk_t sensor_ctrl[MAX_SENSORS]; -static fan_ctrl_blk_t fan_ctrl[MAX_FANS]; -static fruenvseg_t *envfru = NULL; - -/* - * Env thread variables - */ -static boolean_t system_shutdown_started = B_FALSE; -static boolean_t ovtemp_thr_created = B_FALSE; -static pthread_t ovtemp_thr_id; -static pthread_attr_t thr_attr; - - -/* - * PM thread related variabled - */ -static pthread_t pmthr_tid; /* pmthr thread ID */ -static int pm_fd = -1; /* PM device file descriptor */ -static boolean_t pmthr_created = B_FALSE; -static int cur_lpstate; /* cur low power state */ - -/* - * Envd plug-in verbose flag set by SUNW_PICLENVD_DEBUG environment var - * Setting the verbose tuneable also enables debugging for better - * control - */ -int env_debug = 0; - -/* - * Fan devices - */ -static env_fan_t envd_sys_out_fan = { - ENV_SYSTEM_OUT_FAN, ENV_SYSTEM_FAN_DEVFS, NULL, - SYSTEM_FAN_ID, SYSTEM_OUT_FAN_SPEED_MIN, - SYSTEM_OUT_FAN_SPEED_MAX, -1, -1, -}; - -static env_fan_t envd_sys_in_fan = { - ENV_SYSTEM_INTAKE_FAN, ENV_SYSTEM_FAN_DEVFS, NULL, - SYSTEM_FAN_ID, SYSTEM_INTAKE_FAN_SPEED_MIN, - SYSTEM_INTAKE_FAN_SPEED_MAX, -1, -1, -}; - -static env_fan_t envd_cpu_fan = { - ENV_CPU_FAN, ENV_CPU_FAN_DEVFS, NULL, - CPU_FAN_ID, CPU_FAN_SPEED_MIN, CPU_FAN_SPEED_MAX, -1, -1, -}; - -/* - * NULL terminated array of fans - */ -static env_fan_t *envd_fans[] = { - &envd_cpu_fan, - &envd_sys_in_fan, - &envd_sys_out_fan, - NULL -}; - -/* - * ADM1031 speedrange map is indexed by a 2-bit value - */ -static int adm_speedrange_map[] = {1, 2, 4, 8}; - -/* - * ADM1031 devices - */ -static char *hwm_devs[] = { - CPU_HWM_DEVFS, /* CPU_HWM_ID */ -}; - -/* - * Fan names associated with each ADM1031 hwms - used to - * print fault messages - */ -static char *hwm_fans[MAX_HWMS][2] = { - {ENV_CPU_FAN, ENV_SYSTEM_IN_OUT_FANS} -}; - -/* - * Temperature sensors - */ -static env_sensor_t envd_sensors[] = { - { SENSOR_CPU_DIE, SENSOR_CPU_DIE_DEVFS, NULL, - CPU_SENSOR_ID, CPU_HWM_ID, (void *)&envd_cpu_fan, -1}, - { SENSOR_INT_AMB, SENSOR_INT_AMB_DEVFS, NULL, - INT_AMB_SENSOR_ID, CPU_HWM_ID, NULL, -1}, - { SENSOR_SYS_IN, SENSOR_SYS_IN_DEVFS, NULL, - SYS_IN_SENSOR_ID, CPU_HWM_ID, (void *)&envd_sys_in_fan, -1}, -}; -#define N_ENVD_SENSORS (sizeof (envd_sensors)/sizeof (envd_sensors[0])) - -/* - * ADM1031 macros - */ -#define TACH_UNKNOWN 255 -#define FAN_OUT_OF_RANGE (TACH_UNKNOWN) -#define ADM_HYSTERISIS 5 -#define N_SEQ_TACH 15 - -#define TMIN_MASK (0xF8) -#define TMIN_SHIFT (3) -#define TMIN_UNITS (4) /* increments of 4 degrees celsius */ -#define TRANGE_MASK (0x7) - -#define TMIN(regval) (((regval & TMIN_MASK) >> TMIN_SHIFT) * TMIN_UNITS) -#define TRANGE(regval) (regval & TRANGE_MASK) - -#define GET_TMIN_RANGE(tmin, trange) \ - ((((tmin / TMIN_UNITS) & TMIN_MASK) << TMIN_SHIFT) | \ - (trange & TRANGE_MASK)) - -#define TACH_ENABLE_MASK (0x0C) -#define MONITOR_ENABLE_MASK (0x01) -#define ADM_SETFANSPEED_CONV(speed) (15 * speed / 100) - -/* - * Tuneables - */ -#define ENABLE 1 -#define DISABLE 0 - -static int get_monitor_mode(ptree_rarg_t *parg, void *buf); -static int set_monitor_mode(ptree_warg_t *parg, const void *buf); -static int get_int_val(ptree_rarg_t *parg, void *buf); -static int set_int_val(ptree_warg_t *parg, const void *buf); -static int get_string_val(ptree_rarg_t *parg, void *buf); -static int set_string_val(ptree_warg_t *parg, const void *buf); -static int get_tach(ptree_rarg_t *parg, void *buf); -static int set_tach(ptree_warg_t *parg, const void *buf); - -static int shutdown_override = 0; -static int sensor_poll_interval = SENSORPOLL_INTERVAL; -static int warning_interval = WARNING_INTERVAL; -static int shutdown_interval = SHUTDOWN_INTERVAL; -static int ovtemp_monitor = 1; /* enabled */ -static int pm_monitor = 1; /* enabled */ -static int mon_fanstat = 1; /* enabled */ - -static int hwm_mode; -static int hwm_tach_enable; -static char shutdown_cmd[] = SHUTDOWN_CMD; - -env_tuneable_t tuneables[] = { - {"ovtemp-monitor", PICL_PTYPE_INT, &ovtemp_monitor, - &get_int_val, &set_int_val, sizeof (int)}, - - {"pm-monitor", PICL_PTYPE_INT, &pm_monitor, - &get_int_val, &set_int_val, sizeof (int)}, - - {"shutdown-override", PICL_PTYPE_INT, &shutdown_override, - &get_int_val, &set_int_val, sizeof (int)}, - - {"hwm-automode-enable", PICL_PTYPE_INT, &hwm_mode, - &get_monitor_mode, &set_monitor_mode, sizeof (int)}, - - {"sensor-poll-interval", PICL_PTYPE_INT, - &sensor_poll_interval, - &get_int_val, &set_int_val, - sizeof (int)}, - - {"warning-interval", PICL_PTYPE_INT, &warning_interval, - &get_int_val, &set_int_val, - sizeof (int)}, - - {"shutdown-interval", PICL_PTYPE_INT, &shutdown_interval, - &get_int_val, &set_int_val, - sizeof (int)}, - - {"shutdown-command", PICL_PTYPE_CHARSTRING, shutdown_cmd, - &get_string_val, &set_string_val, - sizeof (shutdown_cmd)}, - - {"tach-enable", PICL_PTYPE_INT, &hwm_tach_enable, - &get_tach, &set_tach, - sizeof (int)}, - - {"monitor-fanstat", PICL_PTYPE_INT, &mon_fanstat, - &get_int_val, &set_int_val, sizeof (int)}, - - {"verbose", PICL_PTYPE_INT, &env_debug, - &get_int_val, &set_int_val, sizeof (int)}, - -}; - -/* - * We use this to figure out how many tuneables there are - * This is variable because the publishing routine needs this info - * in piclenvsetup.c - */ -int ntuneables = (sizeof (tuneables)/sizeof (tuneables[0])); - -/* - * Table Handling Code - */ -static void -fini_table(table_t *tblp) -{ - if (tblp == NULL) - return; - free(tblp->xymap); - free(tblp); -} - -static table_t * -init_table(int npoints) -{ - table_t *tblp; - point_t *xy; - - if (npoints == 0) - return (NULL); - - if ((tblp = malloc(sizeof (*tblp))) == NULL) - return (NULL); - - if ((xy = malloc(sizeof (*xy) * npoints)) == NULL) { - free(tblp); - return (NULL); - } - - tblp->nentries = npoints; - tblp->xymap = xy; - - return (tblp); -} - -/* - * function: calculates y for a given x based on a table of points - * for monotonically increasing x values. - * 'tbl' specifies the table to use, 'val' specifies the 'x', returns 'y' - */ -static int -y_of_x(table_t *tbl, int xval) -{ - int i; - int entries; - point_t *xymap; - float newval; - float dy, dx, slope; - - entries = tbl->nentries; - xymap = tbl->xymap; - if (xval <= xymap[0].x) - return (xymap[0].y); - else if (xval >= xymap[entries - 1].x) - return (xymap[entries - 1].y); - - for (i = 1; i < entries - 1; i++) { - if (xval == xymap[i].x) - return (xymap[i].y); - if (xval < xymap[i].x) - break; - } - - /* - * Use linear interpolation - */ - dy = (float)(xymap[i].y - xymap[i-1].y); - dx = (float)(xymap[i].x - xymap[i-1].x); - slope = dy/dx; - newval = xymap[i - 1].y + slope * (xval - xymap[i - 1].x); - return ((int)(newval + (newval >= 0 ? 0.5 : -0.5))); -} - -/* - * Get environmental segment from the specified FRU SEEPROM - */ -static int -get_envseg(int fd, void **envsegp, int *envseglenp) -{ - int i, segcnt, envseglen; - section_layout_t section; - segment_layout_t segment; - uint8_t *envseg; - - if (lseek(fd, (long)SECTION_HDR_OFFSET, 0) == -1L || - read(fd, §ion, sizeof (section)) != sizeof (section)) { - return (EINVAL); - } - - /* - * Verify we have the correct section and contents are valid - * For now, we don't verify the CRC. - */ - if (section.header_tag != SECTION_HDR_TAG || - GET_UNALIGN16(§ion.header_version[0]) != SECTION_HDR_VER) { - if (env_debug) - envd_log(LOG_INFO, - "Invalid section header tag:%x version:%x\n", - section.header_tag, - GET_UNALIGN16(§ion.header_version)); - return (EINVAL); - } - - /* - * Locate our environmental segment - */ - segcnt = section.segment_count; - for (i = 0; i < segcnt; i++) { - if (read(fd, &segment, sizeof (segment)) != sizeof (segment)) { - return (EINVAL); - } - if (env_debug) - envd_log(LOG_INFO, - "Seg name: %x desc:%x off:%x len:%x\n", - GET_UNALIGN16(&segment.name), - GET_UNALIGN32(&segment.descriptor[0]), - GET_UNALIGN16(&segment.offset), - GET_UNALIGN16(&segment.length)); - if (GET_UNALIGN16(&segment.name) == ENVSEG_NAME) - break; - } - - if (i >= segcnt) { - return (ENOENT); - } - - /* - * Allocate memory to hold the environmental segment data. - */ - envseglen = GET_UNALIGN16(&segment.length); - if ((envseg = malloc(envseglen)) == NULL) { - return (ENOMEM); - } - - if (lseek(fd, (long)GET_UNALIGN16(&segment.offset), 0) == -1L || - read(fd, envseg, envseglen) != envseglen) { - (void) free(envseg); - return (EIO); - } - *envsegp = envseg; - *envseglenp = envseglen; - return (0); -} - -/* - * Get all environmental segments - */ -static fruenvseg_t * -get_fru_envsegs(void) -{ - fruenvseg_t *fruenvsegs; - envseg_layout_t *envsegp; - void *envsegbufp; - int fd, envseglen, hdrlen; - char path[PATH_MAX]; - - fruenvsegs = NULL; - fruenvsegs = malloc(sizeof (*fruenvsegs)); - if (fruenvsegs == NULL) { - return (NULL); - } - - /* - * Now get the environmental segment from this FRU - */ - (void) snprintf(path, sizeof (path), "%s%s", I2C_DEVFS, MBFRU_DEV); - fd = open(path, O_RDONLY); - if (fd == -1) { - envd_log(LOG_ERR, ENV_FRU_OPEN_FAIL, errno, path); - free(fruenvsegs); - return (NULL); - } - - /* - * Read environmental segment from this FRU SEEPROM - */ - if (get_envseg(fd, &envsegbufp, &envseglen) != 0) { - envd_log(LOG_ERR, ENV_FRU_BAD_ENVSEG, path); - free(fruenvsegs); - (void) close(fd); - return (NULL); - } - - /* - * Validate envseg version number and header length - */ - envsegp = (envseg_layout_t *)envsegbufp; - hdrlen = sizeof (envseg_layout_t) - - sizeof (envseg_sensor_t) + - (envsegp->sensor_count) * sizeof (envseg_sensor_t); - - if (envsegp->version != ENVSEG_VERSION || - envseglen < hdrlen) { - /* - * version mismatch or header not big enough - */ - envd_log(LOG_CRIT, ENV_FRU_BAD_ENVSEG, path); - if (envsegbufp != NULL) - (void) free(envsegbufp); - free(fruenvsegs); - (void) close(fd); - return (NULL); - } - - fruenvsegs->envseglen = envseglen; - fruenvsegs->envsegbufp = envsegbufp; - (void) close(fd); - return (fruenvsegs); -} - -static int -process_fru_seeprom(unsigned char *buff) -{ - id_off_t id; - int i; - int id_offset = 0; - int nsensors; - int nfans; - env_fan_t *fnodep; - env_sensor_t *snodep; - -#define NSENSOR_OFFSET 1 -#define ID_OFF_SIZE 6 -#define NFANS_OFFSET(x) ((x * ID_OFF_SIZE) + 2) - - nsensors = (int)buff[NSENSOR_OFFSET]; - if (nsensors != MAX_SENSORS) { - envd_log(LOG_CRIT, ENV_FRU_BAD_ENVSEG, FRU_SEEPROM_NAME); - return (-1); - } - - nfans = (int)buff[NFANS_OFFSET(nsensors)]; - if (nfans != MAX_FANS) { - envd_log(LOG_CRIT, ENV_FRU_BAD_ENVSEG, FRU_SEEPROM_NAME); - return (-1); - } - - while (nsensors > 0) { - (void) memcpy((char *)&id, (char *)&buff[id_offset + 2], - ID_OFF_SIZE); - - if (env_debug) - envd_log(LOG_ERR, "\n Sensor Id %x offset %x", - id.id, id.offset); - - if (id.id > MAX_SENSOR_ID) { - envd_log(LOG_CRIT, ENV_FRU_BAD_ENVSEG, - FRU_SEEPROM_NAME); - return (-1); - } - - /* - * Copy into the sensor control block array according to the - * sensor ID - */ - (void) memcpy((char *)&sensor_ctrl[id.id], - (char *)&buff[id.offset], - sizeof (sensor_ctrl_blk_t)); - nsensors--; - id_offset += ID_OFF_SIZE; - } - - /* - * Skip past no of Fan entry(single byte) - */ - id_offset++; - while (nfans > 0) { - (void) memcpy((char *)&id, (char *)&buff[id_offset + 2], - ID_OFF_SIZE); - - if (env_debug) - envd_log(LOG_ERR, "\n Fan Id %x offset %x", id.id, - id.offset); - - (void) memcpy((char *)&fan_ctrl[id.id], - (char *)&buff[id.offset], sizeof (fan_ctrl_blk_t)); - - nfans--; - id_offset += ID_OFF_SIZE; - } - - /* - * Match Sensor/ES ID and point correct data - * based on IDs - */ - for (snodep = envd_sensors; snodep->name != NULL; snodep++) - snodep->es_ptr = &sensor_ctrl[snodep->id]; - - /* - * Match Fan/ES ID and point to correct ES Data - * based on IDs - */ - for (i = 0; (fnodep = envd_fans[i]) != NULL; i++) - fnodep->es_ptr = &fan_ctrl[fnodep->id]; - - return (0); -} - -static int -envd_es_setup() -{ - envfru = get_fru_envsegs(); - if (envfru == NULL) { - envd_log(LOG_CRIT, ENV_FRU_BAD_ENVSEG, FRU_SEEPROM_NAME); - return (-1); - } - return (process_fru_seeprom((uchar_t *)envfru->envsegbufp)); -} - -static void -envd_es_destroy() -{ - if (envfru != NULL) - free(envfru->envsegbufp); -} - -/* - * Lookup fan and return a pointer to env_fan_t data structure. - */ -env_fan_t * -fan_lookup(char *name) -{ - int i; - env_fan_t *fanp; - - for (i = 0; (fanp = envd_fans[i]) != NULL; i++) { - if (strcmp(fanp->name, name) == 0) - return (fanp); - } - return (NULL); -} - -/* - * Lookup sensor and return a pointer to env_sensor_t data structure. - */ -env_sensor_t * -sensor_lookup(char *name) -{ - env_sensor_t *sensorp; - int i; - - for (i = 0; i < N_ENVD_SENSORS; ++i) { - sensorp = &envd_sensors[i]; - if (strcmp(sensorp->name, name) == 0) - return (sensorp); - } - return (NULL); -} - -/* - * Get current temperature - * Returns -1 on error, 0 if successful - */ -int -get_temperature(env_sensor_t *sensorp, tempr_t *temp) -{ - int fd = sensorp->fd; - int retval = 0; - - if (fd == -1) - retval = -1; - else if (ioctl(fd, I2C_GET_TEMPERATURE, temp) == -1) { - retval = -1; - if (sensorp->error == 0) { - sensorp->error = 1; - envd_log(LOG_WARNING, ENV_SENSOR_ACCESS_FAIL, - sensorp->name, errno, strerror(errno)); - } - } else if (sensorp->error != 0) { - sensorp->error = 0; - envd_log(LOG_WARNING, ENV_SENSOR_ACCESS_OK, sensorp->name); - } - if (sensorp->crtbl != NULL) { - *temp = (tempr_t)y_of_x(sensorp->crtbl, *temp); - } - - return (retval); -} - -/* - * Get uncorrected current temperature - * Returns -1 on error, 0 if successful - */ -static int -get_raw_temperature(env_sensor_t *sensorp, tempr_t *temp) -{ - int fd = sensorp->fd; - int retval = 0; - - if (fd == -1) - retval = -1; - else if (ioctl(fd, I2C_GET_TEMPERATURE, temp) == -1) { - retval = -1; - } - - return (retval); -} - -/* - * Return Fan RPM given N & tach - * count and N are retrived from the - * ADM1031 chip. - */ -static int -tach_to_rpm(int n, uint8_t tach) -{ - if (n * tach == 0) - return (0); - return ((ADCSAMPLE * 60) / (n * tach)); -} - -static int -get_raw_fan_speed(env_fan_t *fanp, uint8_t *fanspeedp) -{ - int fan_fd; - int retval = 0; - - fan_fd = fanp->fd; - - if (fan_fd == -1) - retval = -1; - else if (ioctl(fan_fd, I2C_GET_FAN_SPEED, fanspeedp) == -1) { - retval = -1; - } - - - return (retval); -} -/* - * Get current fan speed - * Returns -1 on error, 0 if successful - */ -int -get_fan_speed(env_fan_t *fanp, fanspeed_t *fanspeedp) -{ - int fan_fd; - uint8_t tach; - - fan_fd = fanp->fd; - if (fan_fd == -1) - return (-1); - else if (ioctl(fan_fd, I2C_GET_FAN_SPEED, &tach) == -1) { - return (-1); - } - - /* - * Fanspeeds are reported as 0 - * if the tach is out of range or fan status is off - * and if monitoring fan status is enabled. - */ - if (mon_fanstat && (!fanp->fanstat || tach == FAN_OUT_OF_RANGE)) { - *fanspeedp = 0; - } else { - *fanspeedp = - tach_to_rpm(fanp->speedrange, tach); - } - - return (0); -} - -/* - * Set fan speed - * Returns -1 on error, 0 if successful - */ -int -set_fan_speed(env_fan_t *fanp, fanspeed_t fanspeed) -{ - int fan_fd; - int retval = 0; - uint8_t speed; - - fan_fd = fanp->fd; - if (fan_fd == -1) - return (-1); - - if (fanspeed < 0 || fanspeed > 100) - return (-2); - - speed = (uint8_t)ADM_SETFANSPEED_CONV(fanspeed); - - if (ioctl(fan_fd, I2C_SET_FAN_SPEED, &speed) == -1) { - retval = -1; - } - return (retval); -} - -/* - * close all fan devices - */ -static void -envd_close_fans(void) -{ - int i; - env_fan_t *fanp; - - for (i = 0; (fanp = envd_fans[i]) != NULL; i++) { - if (fanp->fd != -1) { - (void) close(fanp->fd); - fanp->fd = -1; - } - } -} - -/* - * Close sensor devices and freeup resources - */ -static void -envd_close_sensors(void) -{ - env_sensor_t *sensorp; - int i; - - for (i = 0; i < N_ENVD_SENSORS; ++i) { - sensorp = &envd_sensors[i]; - if (sensorp->fd != -1) { - (void) close(sensorp->fd); - sensorp->fd = -1; - } - if (sensorp->crtbl != NULL) - fini_table(sensorp->crtbl); - } -} - -/* - * Open fan devices and initialize per fan data structure. - * Returns #fans found. - */ -static int -envd_setup_fans(void) -{ - int i, fd; - env_fan_t *fanp; - char path[PATH_MAX]; - int fancnt = 0; - uint8_t n = 0; - - for (i = 0; (fanp = envd_fans[i]) != NULL; i++) { - (void) strcpy(path, "/devices"); - (void) strlcat(path, fanp->devfs_path, sizeof (path)); - fd = open(path, O_RDWR); - if (fd == -1) { - envd_log(LOG_CRIT, - ENV_FAN_OPEN_FAIL, fanp->name, - fanp->devfs_path, errno, strerror(errno)); - fanp->present = B_FALSE; - continue; - } - fanp->fd = fd; - if (ioctl(fd, ADM1031_GET_FAN_FEATURE, &n) != -1) { - fanp->speedrange = - adm_speedrange_map[(n >> 6) & 0x03]; - } else { - fanp->speedrange = FAN_RANGE_DEFAULT; - } - - fanp->present = B_TRUE; - fanp->fanstat = 0; - fanp->cspeed = TACH_UNKNOWN; - fanp->lspeed = TACH_UNKNOWN; - fanp->conccnt = 0; - fancnt++; - } - return (fancnt); -} - -/* - * Open temperature sensor devices and initialize per sensor data structure. - * Returns #sensors found. - */ -static int -envd_setup_sensors(void) -{ - env_sensor_t *sensorp; - sensor_ctrl_blk_t *es_ptr; - table_t *tblp; - char path[PATH_MAX]; - int sensorcnt = 0; - int i, j, nentries; - int16_t tmin = 0; - - for (i = 0; i < N_ENVD_SENSORS; ++i) { - sensorp = &envd_sensors[i]; - /* Initialize sensor's initial state */ - sensorp->shutdown_initiated = B_FALSE; - sensorp->warning_tstamp = 0; - sensorp->shutdown_tstamp = 0; - sensorp->error = 0; - sensorp->crtbl = NULL; - - (void) strcpy(path, "/devices"); - (void) strlcat(path, sensorp->devfs_path, - sizeof (path)); - sensorp->fd = open(path, O_RDWR); - if (sensorp->fd == -1) { - envd_log(LOG_ERR, ENV_SENSOR_OPEN_FAIL, - sensorp->name, sensorp->devfs_path, - errno, strerror(errno)); - sensorp->present = B_FALSE; - continue; - } - sensorp->present = B_TRUE; - sensorcnt++; - - /* - * Get Tmin - */ - - if (ioctl(sensorp->fd, ADM1031_GET_TEMP_MIN_RANGE, - &tmin) != -1) { - sensorp->tmin = TMIN(tmin); - } else { - sensorp->tmin = -1; - } - if (env_debug) - envd_log(LOG_ERR, "Sensor %s tmin %d", - sensorp->name, sensorp->tmin); - - /* - * Create a correction table - * if correction pairs are present in es - * segment. - */ - es_ptr = sensorp->es_ptr; - - if (es_ptr == NULL) { - continue; - } - nentries = es_ptr->correctionEntries; - - if (nentries < 2) { - if (env_debug) - envd_log(LOG_CRIT, "sensor correction <2"); - continue; - } - - sensorp->crtbl = init_table(nentries); - if (sensorp->crtbl == NULL) - continue; - tblp = sensorp->crtbl; - tblp->xymap[0].x = - (char)es_ptr->correctionPair[0].measured; - tblp->xymap[0].y = - (char)es_ptr->correctionPair[0].corrected; - - for (j = 1; j < nentries; ++j) { - tblp->xymap[j].x = - (char)es_ptr->correctionPair[j].measured; - tblp->xymap[j].y = - (char)es_ptr->correctionPair[j].corrected; - - if (tblp->xymap[j].x <= tblp->xymap[j - 1].x) { - fini_table(tblp); - sensorp->crtbl = NULL; - envd_log(LOG_CRIT, ENV_FRU_BAD_ENVSEG, - FRU_SEEPROM_NAME); - break; - } - } - - if (env_debug) { - envd_log(LOG_CRIT, "Sensor correction %s", - sensorp->name); - for (j = 0; j < nentries; j++) - envd_log(LOG_CRIT, " %d %d", - tblp->xymap[j].x, tblp->xymap[j].y); - } - } - return (sensorcnt); -} -/* - * Modify ADM Tmin/ranges depending what power level - * we are from. - */ -static void -updateadm_ranges(char *name, uchar_t cur_lpstate) -{ - env_sensor_t *sensorp; - fan_ctrl_blk_t *fanctl; - uchar_t tmin; - uchar_t trange; - uint16_t tdata; - int sysfd; - uchar_t sys_id = CPU_HWM_ID; - uint8_t mode; - static uint16_t tsave = 0; - - sensorp = sensor_lookup(name); - if (sensorp == NULL) - return; - - /* - * If there is only one Control pairs then return - */ - fanctl = ((env_fan_t *)sensorp->fanp)->es_ptr; - - if (fanctl != NULL && fanctl->no_ctl_pairs <= 1) - return; - - /* - * if fan control specifies that ranges are same then - * we skip re-programming adm chip. - */ - - tmin = fanctl->fan_ctl_pairs[0].tMin; - trange = fanctl->fan_ctl_pairs[0].tRange; - if ((tmin == fanctl->fan_ctl_pairs[1].tMin) && - (trange == fanctl->fan_ctl_pairs[1].tRange)) - return; - - sysfd = open(hwm_devs[sys_id], O_RDWR); - if (sysfd == -1) { - if (env_debug) - envd_log(LOG_ERR, ENV_ADM_OPEN_FAIL, hwm_devs[sys_id], - errno, strerror(errno)); - return; - } - /* Read ADM default value only for the first time */ - if (tsave == 0) { - if (ioctl(sensorp->fd, ADM1031_GET_TEMP_MIN_RANGE, - &tsave) == -1) { - if (env_debug) - envd_log(LOG_ERR, - "read tminrange ioctl failed"); - (void) close(sysfd); - return; - } - } - - /* - * Need to reinit ADM to manual mode for Tmin range to be - * effective. - */ - mode = ADM1031_MANUAL_MODE; - if (ioctl(sysfd, ADM1031_SET_MONITOR_MODE, &mode) == -1) { - if (env_debug) - envd_log(LOG_ERR, ENV_ADM_MANUAL_MODE); - (void) close(sysfd); - return; - } - - if (cur_lpstate == 1) { - /* - * ADM 1031 Tmin/Trange register need to be reprogrammed. - */ - tdata = ((fanctl->fan_ctl_pairs[cur_lpstate].tMin / TMIN_UNITS) - << TMIN_SHIFT); - /* Need to pack tRange in ADM bits 2:0 */ - switch (fanctl->fan_ctl_pairs[cur_lpstate].tRange) { - case 5: - break; - - case 10: - tdata |= 1; - break; - - case 20: - tdata |= 2; - break; - - case 40: - tdata |= 3; - break; - - case 80: - tdata |= 4; - break; - } - } else - tdata = tsave; - - if (ioctl(sensorp->fd, ADM1031_SET_TEMP_MIN_RANGE, - &tdata) != -1) - sensorp->tmin = TMIN(tdata); - - sensorp->tmin = TMIN(tdata); - - mode = ADM1031_AUTO_MODE; - if (ioctl(sysfd, ADM1031_SET_MONITOR_MODE, &mode) == -1) { - if (env_debug) - envd_log(LOG_ERR, ENV_ADM_AUTO_MODE); - } - (void) close(sysfd); -} - -/*ARGSUSED*/ -static void * -pmthr(void *args) -{ - pm_state_change_t pmstate; - char physpath[PATH_MAX]; - int pre_lpstate; - - pmstate.physpath = physpath; - pmstate.size = sizeof (physpath); - cur_lpstate = 0; - pre_lpstate = 1; - - pm_fd = open(PM_DEVICE, O_RDWR); - if (pm_fd == -1) { - envd_log(LOG_ERR, PM_THREAD_EXITING, errno, strerror(errno)); - return (NULL); - } - for (;;) { - /* - * Get PM state change events to check if the system - * is in lowest power state and adjust ADM hardware - * monitor's fan speed settings. - * - * To minimize polling, we use the blocking interface - * to get the power state change event here. - */ - if (ioctl(pm_fd, PM_GET_STATE_CHANGE_WAIT, &pmstate) != 0) { - if (errno != EINTR) - break; - continue; - } - do { - if (env_debug) { - envd_log(LOG_INFO, - "pmstate event:0x%x flags:%x comp:%d " - "oldval:%d newval:%d path:%s\n", - pmstate.event, pmstate.flags, - pmstate.component, - pmstate.old_level, - pmstate.new_level, - pmstate.physpath); - } - cur_lpstate = - (pmstate.flags & PSC_ALL_LOWEST) ? 1 : 0; - } while (ioctl(pm_fd, PM_GET_STATE_CHANGE, &pmstate) == 0); - /* - * Change ADM ranges as per E* Requirements. Update - * happens only for valid state changes. - */ - if (pre_lpstate != cur_lpstate) { - pre_lpstate = cur_lpstate; - updateadm_ranges(SENSOR_SYS_IN, cur_lpstate); - } - } - /*NOTREACHED*/ - return (NULL); -} - -/* - * This function is used to reasonably predict the - * state of the fan (ON/OFF) using tmin and current temperature. - * - * We know the fan is on if temp >= tmin and fan is off if - * temp < (Tmin - Hysterisis). - * - * When the temperature is in between we don't know if the fan is on/off - * because the temperature could be decreasing and not have crossed - * Tmin - hysterisis and vice a versa. - * - * FAN ON - * Tmin - * ------------------------------------------- - * - * FAN ON/OFF - * - * -------------------------------------------- - * Tmin - Hysterisis - * FAN OFF - * - * To solve the problem of finding out if the fan is on/off in our gray region - * we keep track of the last read tach and the current read tach. From - * experimentation and from discussions with analog devices it is unlikely that - * if the fans are on we will get a constant tach reading more than 5 times in - * a row. This is not the most fool proof approach but the best we can do. - * - * This routine implements the above logic for a sensor with an - * associated fan. The caller garauntees sensorp and fanp are not null. - */ -static void -check_fanstat(env_sensor_t *sensorp) -{ - env_fan_t *fanp = sensorp->fanp; - tempr_t temp; - uint8_t fanspeed; - - if (get_raw_temperature(sensorp, &temp) == -1) - return; - - if (temp < (sensorp->tmin - ADM_HYSTERISIS)) { - - fanp->fanstat = 0; /* Fan off */ - fanp->lspeed = TACH_UNKNOWN; /* Reset Last read tach */ - fanp->conccnt = 0; - - } else if (temp >= sensorp->tmin) { - - fanp->fanstat = 1; /* Fan on */ - fanp->lspeed = TACH_UNKNOWN; - fanp->conccnt = 0; - - } else { - if (get_raw_fan_speed(fanp, &fanspeed) == -1) - return; - - fanp->cspeed = fanspeed; - /* - * First time in the gray area - * set last read speed to current speed - */ - if (fanp->lspeed == TACH_UNKNOWN) { - fanp->lspeed = fanspeed; - } else { - if (fanp->lspeed != fanp->cspeed) { - fanp->conccnt = 0; - fanp->fanstat = 1; - } else { - fanp->conccnt++; - - if (fanp->conccnt >= N_SEQ_TACH) - fanp->fanstat = 0; - } - fanp->lspeed = fanp->cspeed; - } - } -} -/* - * There is an issue with the ADM1031 chip that causes the chip - * to not update the tach register in case the fan stops. The - * fans stop when the temperature measured (temp) drops below - * Tmin - Hysterisis and turns the fan on when the temp >= tmin. - * - * Since the tach registers don't update and remain stuck at the - * last read tach value our get_fan_speed function always returns - * a non-zero RPM reading. - * - * To fix this we need to figure out when the fans will be on/off - * depending on the current temperature. Currently we poll for - * interrupts, we can use that loop to determine what the current - * temperature is and if the fans should be on/off. - * - * We get current temperature and check the fans. - */ -static void -monitor_fanstat(void) -{ - env_sensor_t *sensorp; - env_fan_t *fanp; - int i; - - for (i = 0; i < N_ENVD_SENSORS; i++) { - sensorp = &envd_sensors[i]; - - if (!sensorp) - continue; - - fanp = sensorp->fanp; - - if (!fanp) - continue; - - if (sensorp->tmin != -1) { - check_fanstat(sensorp); - } else { - fanp->fanstat = 1; - } - } - /* - * On Taco both the system fans are driven by one - * sensor (sys-in) and connected to the sys-in tach. - */ - envd_sys_out_fan.fanstat = envd_sys_in_fan.fanstat; - -} - -static int -handle_overtemp_interrupt(int hwm_id) -{ - env_sensor_t *sensorp; - tempr_t temp; - uchar_t smap[MAX_SENSORS]; - time_t ct; - uchar_t i; - char msgbuf[BUFSIZ]; - char syscmd[BUFSIZ]; - boolean_t return_flag; - - /* Clear Map of Sensor Entries */ - (void) memset(smap, SENSOR_OK, sizeof (smap)); - - for (;;) { - for (i = 0; i < N_ENVD_SENSORS; i++) { - sensorp = &envd_sensors[i]; - - /* - * Check whether the sensor belongs to the - * interrupting ADM hardware monitor - */ - if (sensorp->hwm_id != hwm_id) - continue; - - /* - * if shutdown is initiated then we simply loop - * through the sensors until shutdown - */ - if (sensorp->shutdown_initiated == B_TRUE) - continue; - - /* get current temp for this sensor */ - if (get_temperature(sensorp, &temp) == -1) - continue; - - sensorp->cur_temp = temp; - - if (env_debug) - envd_log(LOG_ERR, - "sensor name %s, cur temp %d, " - "HW %d LW %d SD %d LS %d\n", - sensorp->name, temp, - sensorp->es_ptr->high_warning, - (int)sensorp->es_ptr->low_warning, - sensorp->es_ptr->high_shutdown, - (int)sensorp->es_ptr->low_shutdown); - - if (TEMP_IN_WARNING_RANGE(sensorp->cur_temp, sensorp)) { - /* - * Log on warning atmost one second - */ - ct = (time_t)(gethrtime() / NANOSEC); - if ((ct - sensorp->warning_tstamp) >= - warning_interval) { - envd_log(LOG_CRIT, - ENV_WARNING_MSG, sensorp->name, - temp, - sensorp->es_ptr->low_warning, - sensorp->es_ptr->high_warning); - sensorp->warning_tstamp = ct; - } - smap[i] = SENSOR_WARN; - } else { - /* - * We will fall in this caterory only if - * Temperature drops/increases from warning - * threshold. If so we set sensor map to - * OK so that we can exit the loop if - * shutdown not initiated. - */ - smap[i] = SENSOR_OK; - } - - if (TEMP_IN_SHUTDOWN_RANGE(temp, sensorp) && - !shutdown_override) { - ct = (time_t)(gethrtime() / NANOSEC); - if (sensorp->shutdown_tstamp == 0) - sensorp->shutdown_tstamp = ct; - if ((ct - sensorp->shutdown_tstamp) >= - shutdown_interval) { - sensorp->shutdown_initiated = B_TRUE; - (void) snprintf(msgbuf, sizeof (msgbuf), - ENV_SHUTDOWN_MSG, sensorp->name, - temp, - sensorp->es_ptr->low_shutdown, - sensorp->es_ptr->high_shutdown); - envd_log(LOG_ALERT, msgbuf); - } - if (system_shutdown_started == B_FALSE) { - (void) snprintf(syscmd, sizeof (syscmd), - "%s \"%s\"", SHUTDOWN_CMD, msgbuf); - envd_log(LOG_ALERT, syscmd); - system_shutdown_started = B_TRUE; - (void) system(syscmd); - } - } else if (sensorp->shutdown_tstamp != 0) - sensorp->shutdown_tstamp = 0; - } - - /* - * Sweep thorugh Sensor Map and if warnings OR shutdown - * are not logged then return to caller. - */ - return_flag = B_TRUE; - for (i = 0; i < N_ENVD_SENSORS; i++) - if (smap[i] == SENSOR_WARN) - return_flag = B_FALSE; - - if ((return_flag == B_TRUE) && - (system_shutdown_started == B_FALSE)) { - return (1); - } - - (void) envd_sleep(SENSORPOLL_INTERVAL); - } -} - -/* - * This is env thread which monitors the current temperature when - * warning threshold is exceeded. The job is to make sure it does - * not execced/decrease shutdown threshold. If it does it will start - * forced shutdown to avoid reaching hardware poweroff via THERM interrupt. - * For Taco there will be one thread for the ADM chip. - */ -static void * -ovtemp_thr(void *args) -{ - int fd; - uint8_t stat[2]; - int hwm_id = (int)args; - int err; - - fd = open(hwm_devs[hwm_id], O_RDWR); - if (fd == -1) { - envd_log(LOG_ERR, ENV_ADM_OPEN_FAIL, hwm_devs[hwm_id], - errno, strerror(errno)); - return (NULL); - } - - for (;;) { - - /* - * Monitor the sensors to update status - */ - if (mon_fanstat) - monitor_fanstat(); - - /* - * Sleep for specified seconds before issuing IOCTL - * again. - */ - (void) envd_sleep(INTERRUPTPOLL_INTERVAL); - - /* - * Read ADM1031 two Status Register to determine source of - * Interrupts. - */ - if ((err = ioctl(fd, ADM1031_GET_STATUS_1, &stat[0])) != -1) - err = ioctl(fd, ADM1031_GET_STATUS_2, &stat[1]); - - if (err == -1) { - if (env_debug) - envd_log(LOG_ERR, "OverTemp: Status Error"); - continue; - } - - if (env_debug) - envd_log(LOG_ERR, "INTR %s Stat1 %x, Stat2 %x", - hwm_devs[hwm_id], stat[0], stat[1]); - - if (stat[0] & FANFAULT) - envd_log(LOG_ERR, ENV_FAN_FAULT, - hwm_devs[hwm_id], hwm_fans[hwm_id][HWM_FAN1]); - - if (stat[1] & FANFAULT) - envd_log(LOG_ERR, ENV_FAN_FAULT, - hwm_devs[hwm_id], hwm_fans[hwm_id][HWM_FAN2]); - - /* - * Check respective Remote/Local High, Low before start - * manual monitoring - */ - if ((stat[0] & STAT1MASK) || (stat[1] & STAT2MASK)) - (void) handle_overtemp_interrupt(hwm_id); - } - /*NOTREACHED*/ - return (NULL); -} - -/* - * Setup envrionmental monitor state and start threads to monitor - * temperature and power management state. - * Returns -1 on error, 0 if successful. - */ - -static int -envd_setup(void) -{ - int ret; - - if (getenv("SUNW_piclenvd_debug") != NULL) - env_debug = 1; - - if (pthread_attr_init(&thr_attr) != 0 || - pthread_attr_setscope(&thr_attr, PTHREAD_SCOPE_SYSTEM) != 0) { - return (-1); - } - - ret = envd_es_setup(); - if (ret < 0) { - ovtemp_monitor = 0; - pm_monitor = 0; - } - - - /* - * Setup temperature sensors and fail if we can't open - * at least one sensor. - */ - if (envd_setup_sensors() <= 0) { - return (NULL); - } - - /* - * Setup fan device (don't fail even if we can't access - * the fan as we can still monitor temeperature. - */ - (void) envd_setup_fans(); - - /* If ES Segment setup failed,don't create thread */ - - if (ovtemp_monitor && ovtemp_thr_created == B_FALSE) { - if (pthread_create(&ovtemp_thr_id, &thr_attr, ovtemp_thr, - (void *)CPU_HWM_ID) != 0) - envd_log(LOG_ERR, ENVTHR_THREAD_CREATE_FAILED); - else - ovtemp_thr_created = B_TRUE; - } - - /* - * Create a thread to monitor PM state - */ - if (pm_monitor && pmthr_created == B_FALSE) { - if (pthread_create(&pmthr_tid, &thr_attr, pmthr, - NULL) != 0) - envd_log(LOG_CRIT, PM_THREAD_CREATE_FAILED); - else - pmthr_created = B_TRUE; - } - return (0); -} - -static void -piclenvd_register(void) -{ - picld_plugin_register(&my_reg_info); -} - -static void -piclenvd_init(void) -{ - - (void) env_picl_setup_tuneables(); - - /* - * Setup the environmental data structures - */ - if (envd_setup() != 0) { - envd_log(LOG_CRIT, ENVD_PLUGIN_INIT_FAILED); - return; - } - - /* - * Now setup/populate PICL tree - */ - env_picl_setup(); -} - -static void -piclenvd_fini(void) -{ - - /* - * Invoke env_picl_destroy() to remove any PICL nodes/properties - * (including volatile properties) we created. Once this call - * returns, there can't be any more calls from the PICL framework - * to get current temperature or fan speed. - */ - env_picl_destroy(); - envd_close_sensors(); - envd_close_fans(); - envd_es_destroy(); -} - -/*VARARGS2*/ -void -envd_log(int pri, const char *fmt, ...) -{ - va_list ap; - - va_start(ap, fmt); - vsyslog(pri, fmt, ap); - va_end(ap); -} - - -static uint_t -envd_sleep(uint_t sleep_tm) -{ - int sig; - uint_t unslept; - sigset_t alrm_mask; - - if (sleep_tm == 0) - return (0); - - (void) sigemptyset(&alrm_mask); - (void) sigaddset(&alrm_mask, SIGALRM); - - (void) alarm(sleep_tm); - (void) sigwait(&alrm_mask, &sig); - - unslept = alarm(0); - return (unslept); -} - -/* - * Tunables support functions - */ -static env_tuneable_t * -tuneable_lookup(picl_prophdl_t proph) -{ - int i; - env_tuneable_t *tuneablep = NULL; - - for (i = 0; i < ntuneables; i++) { - tuneablep = &tuneables[i]; - if (tuneablep->proph == proph) - return (tuneablep); - } - - return (NULL); -} - -static int -get_tach(ptree_rarg_t *parg, void *buf) -{ - picl_prophdl_t proph; - env_tuneable_t *tuneablep; - int fd; - int8_t cfg; - - proph = parg->proph; - - tuneablep = tuneable_lookup(proph); - - if (tuneablep == NULL) - return (PICL_FAILURE); - - fd = open(CPU_HWM_DEVFS, O_RDWR); - - if (fd == -1) { - return (PICL_FAILURE); - } - - if (ioctl(fd, ADM1031_GET_CONFIG_2, &cfg) == -1) { - return (PICL_FAILURE); - } - - if ((cfg & TACH_ENABLE_MASK) == TACH_ENABLE_MASK) { - *((int *)tuneablep->value) = ENABLE; - - } else { - *((int *)tuneablep->value) = DISABLE; - } - - (void) memcpy(buf, tuneablep->value, - tuneablep->nbytes); - - (void) close(fd); - return (PICL_SUCCESS); -} - -static int -set_tach(ptree_warg_t *parg, const void *buf) -{ - picl_prophdl_t proph; - env_tuneable_t *tuneablep; - int fd, val; - int8_t cfg; - - if (parg->cred.dc_euid != 0) - return (PICL_PERMDENIED); - - proph = parg->proph; - - tuneablep = tuneable_lookup(proph); - - if (tuneablep == NULL) - return (PICL_FAILURE); - - fd = open(CPU_HWM_DEVFS, O_RDWR); - - if (fd == -1) { - return (PICL_FAILURE); - } - - if (ioctl(fd, ADM1031_GET_CONFIG_2, &cfg) == -1) { - return (PICL_FAILURE); - } - - (void) memcpy(&val, (caddr_t)buf, sizeof (val)); - - if (val == ENABLE) { - cfg |= TACH_ENABLE_MASK; - } else if (val == DISABLE) { - cfg &= ~TACH_ENABLE_MASK; - } - - if (ioctl(fd, ADM1031_SET_CONFIG_2, &cfg) == -1) { - return (PICL_FAILURE); - } - - (void) close(fd); - return (PICL_SUCCESS); -} - -static int -get_monitor_mode(ptree_rarg_t *parg, void *buf) -{ - picl_prophdl_t proph; - env_tuneable_t *tuneablep; - int fd; - int8_t mmode; - - proph = parg->proph; - - tuneablep = tuneable_lookup(proph); - - if (tuneablep == NULL) - return (PICL_FAILURE); - - fd = open(CPU_HWM_DEVFS, O_RDWR); - - if (fd == -1) { - return (PICL_FAILURE); - } - - if (ioctl(fd, ADM1031_GET_MONITOR_MODE, &mmode) == -1) { - return (PICL_FAILURE); - } - - if (mmode == ADM1031_AUTO_MODE) { - *((int *)tuneablep->value) = ENABLE; - } else { - *((int *)tuneablep->value) = DISABLE; - } - - (void) memcpy(buf, tuneablep->value, - tuneablep->nbytes); - - (void) close(fd); - return (PICL_SUCCESS); -} - -static int -set_monitor_mode(ptree_warg_t *parg, const void *buf) -{ - picl_prophdl_t proph; - env_tuneable_t *tuneablep; - int fd, val; - int8_t mmode; - - if (parg->cred.dc_euid != 0) - return (PICL_PERMDENIED); - - proph = parg->proph; - - tuneablep = tuneable_lookup(proph); - - if (tuneablep == NULL) - return (PICL_FAILURE); - - fd = open(CPU_HWM_DEVFS, O_RDWR); - if (fd == -1) { - return (PICL_FAILURE); - } - (void) memcpy(&val, buf, sizeof (val)); - if (val == ENABLE) { - mmode = ADM1031_AUTO_MODE; - } else if (val == DISABLE) { - mmode = ADM1031_MANUAL_MODE; - } - - if (ioctl(fd, ADM1031_SET_MONITOR_MODE, &mmode) == -1) { - return (PICL_FAILURE); - } - - (void) close(fd); - return (PICL_SUCCESS); -} - -static int -get_string_val(ptree_rarg_t *parg, void *buf) -{ - picl_prophdl_t proph; - env_tuneable_t *tuneablep; - - proph = parg->proph; - - tuneablep = tuneable_lookup(proph); - - if (tuneablep == NULL) - return (PICL_FAILURE); - - (void) memcpy(buf, (caddr_t)tuneablep->value, - tuneablep->nbytes); - - return (PICL_SUCCESS); -} - -static int -set_string_val(ptree_warg_t *parg, const void *buf) -{ - picl_prophdl_t proph; - env_tuneable_t *tuneablep; - - proph = parg->proph; - - if (parg->cred.dc_euid != 0) - return (PICL_PERMDENIED); - - tuneablep = tuneable_lookup(proph); - - if (tuneablep == NULL) - return (PICL_FAILURE); - - (void) memcpy((caddr_t)tuneables->value, (caddr_t)buf, - tuneables->nbytes); - - return (PICL_SUCCESS); -} - -static int -get_int_val(ptree_rarg_t *parg, void *buf) -{ - picl_prophdl_t proph; - env_tuneable_t *tuneablep; - - proph = parg->proph; - - tuneablep = tuneable_lookup(proph); - - if (tuneablep == NULL) - return (PICL_FAILURE); - - (void) memcpy((int *)buf, (int *)tuneablep->value, - tuneablep->nbytes); - - return (PICL_SUCCESS); -} - -static int -set_int_val(ptree_warg_t *parg, const void *buf) -{ - picl_prophdl_t proph; - env_tuneable_t *tuneablep; - - if (parg->cred.dc_euid != 0) - return (PICL_PERMDENIED); - - proph = parg->proph; - - tuneablep = tuneable_lookup(proph); - - if (tuneablep == NULL) - return (PICL_FAILURE); - - (void) memcpy((int *)tuneablep->value, (int *)buf, - tuneablep->nbytes); - - return (PICL_SUCCESS); -} diff --git a/usr/src/cmd/picl/plugins/sun4u/taco/envd/piclenvsetup.c b/usr/src/cmd/picl/plugins/sun4u/taco/envd/piclenvsetup.c deleted file mode 100644 index 5310b2440b..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/taco/envd/piclenvsetup.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, 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" - -/* - * This file contains code for setting up environmental related nodes - * and properties in the PICL tree. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "picldefs.h" -#include "envd.h" - -/* - * Volatile property read/write function typedef - */ -typedef int ptree_vol_rdfunc_t(ptree_rarg_t *parg, void *buf); -typedef int ptree_vol_wrfunc_t(ptree_warg_t *parg, const void *buf); - - -extern sensor_ctrl_blk_t sensor_ctrl[]; -extern fan_ctrl_blk_t fan_ctrl[]; -extern env_tuneable_t tuneables[]; -extern int ntuneables; - -#define PROP_FAN_SPEED_UNIT_VALUE "rpm" - -/* - * Sensor node data structure - */ -typedef struct { - char *parent_path; /* parent path */ - char *sensor_name; /* sensor name */ - env_sensor_t *sensorp; /* sensor info */ - picl_nodehdl_t nodeh; /* sensor node handle */ - picl_prophdl_t proph; /* "Temperature" property handle */ - picl_prophdl_t target_proph; /* "TargetTemp" property handle */ -} sensor_node_t; - - -/* - * Sensor nodes array - */ -static sensor_node_t sensor_nodes[] = { - {"/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c", - SENSOR_CPU_DIE, NULL, - NULL, NULL, NULL}, - - {"/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c", - SENSOR_INT_AMB, NULL, - NULL, NULL, NULL}, - - {"/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c", - SENSOR_SYS_IN, NULL, - NULL, NULL, NULL} -}; -#define NSENSORS (sizeof (sensor_nodes)/sizeof (sensor_nodes[0])) - - -/* - * Fan node data structure - */ -typedef struct { - char *parent_path; /* parent node path */ - char *fan_name; /* fan name */ - env_fan_t *fanp; /* fan information */ - char *speed_unit; /* speed unit string */ - picl_nodehdl_t nodeh; /* "fan" node handle */ - picl_prophdl_t proph; /* "Speed" property handle */ -} fan_node_t; - - -/* - * Fan node array - */ -static fan_node_t fan_nodes[] = { - {"/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c", - ENV_CPU_FAN, NULL, PROP_FAN_SPEED_UNIT_VALUE, NULL, NULL}, - - {"/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c", - ENV_SYSTEM_INTAKE_FAN, NULL, PROP_FAN_SPEED_UNIT_VALUE, NULL, NULL}, - - {"/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c", - ENV_SYSTEM_OUT_FAN, NULL, PROP_FAN_SPEED_UNIT_VALUE, NULL, NULL} -}; -#define NFANS (sizeof (fan_nodes)/sizeof (fan_nodes[0])) - -/* - * Miscellaneous declarations - */ -static void delete_sensor_nodes_and_props(void); -static void delete_fan_nodes_and_props(void); - - -/* - * Read function for volatile "Temperature" property - */ -static int -get_current_temp(ptree_rarg_t *parg, void *buf) -{ - tempr_t temp; - picl_prophdl_t proph; - sensor_node_t *snodep; - int i; - - /* - * Locate the sensor in our sensor_nodes table by matching the - * property handle and get its temperature. - */ - proph = parg->proph; - for (i = 0; i < NSENSORS; ++i) { - snodep = &sensor_nodes[i]; - if (snodep->proph != proph) - continue; - - if (get_temperature(snodep->sensorp, &temp) < 0) - break; - (void) memcpy(buf, (caddr_t)&temp, sizeof (tempr_t)); - return (PICL_SUCCESS); - } - return (PICL_FAILURE); -} -/* - * Read function for volatile "Speed" property on "fan" class node - */ -static int -set_current_speed(ptree_warg_t *parg, const void *buf) -{ - fanspeed_t speed; - picl_prophdl_t proph; - fan_node_t *fnodep; - int i, ret; - - /* - * Locate the fan in our fan_nodes table by matching the - * property handle and get fan speed. - */ - proph = parg->proph; - for (i = 0; i < NFANS; ++i) { - fnodep = &fan_nodes[i]; - if (fnodep->proph != proph) - continue; - if (fnodep->fanp->fd == -1) - continue; - - (void) memcpy((caddr_t)&speed, buf, sizeof (speed)); - - ret = set_fan_speed(fnodep->fanp, speed); - - if (ret < 0) { - if (ret == -1 && errno == EBUSY) - return (PICL_NOTWRITABLE); - if (ret == -2) - return (PICL_INVALIDARG); - break; - } - - return (PICL_SUCCESS); - } - return (PICL_FAILURE); -} - - -/* - * Read function for volatile "Speed" property on "fan" class node - */ -static int -get_current_speed(ptree_rarg_t *parg, void *buf) -{ - fanspeed_t speed; - picl_prophdl_t proph; - fan_node_t *fnodep; - int i; - - /* - * Locate the fan in our fan_nodes table by matching the - * property handle and get fan speed. - */ - proph = parg->proph; - for (i = 0; i < NFANS; ++i) { - fnodep = &fan_nodes[i]; - if (fnodep->proph != proph) - continue; - if (fnodep->fanp->fd == -1) - continue; - if (get_fan_speed(fnodep->fanp, &speed) < 0) - break; - - (void) memcpy(buf, (caddr_t)&speed, sizeof (speed)); - return (PICL_SUCCESS); - } - return (PICL_FAILURE); -} - -/* - * Create and add the specified regular property - */ - -static int -add_regular_prop(picl_nodehdl_t nodeh, char *name, int type, int access, - int size, void *valbuf, picl_prophdl_t *prophp) -{ - int err; - ptree_propinfo_t propinfo; - picl_prophdl_t proph; - - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - type, access, size, name, NULL, NULL); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_create_and_add_prop(nodeh, &propinfo, valbuf, &proph); - if (err == PICL_SUCCESS && prophp) - *prophp = proph; - return (err); -} - - -/* - * Create and add the specified volatile property - */ -static int -add_volatile_prop(picl_nodehdl_t nodeh, char *name, int type, int access, - int size, ptree_vol_rdfunc_t *rdfunc, ptree_vol_wrfunc_t *wrfunc, - picl_prophdl_t *prophp) -{ - int err; - ptree_propinfo_t propinfo; - picl_prophdl_t proph; - - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - type, (access|PICL_VOLATILE), size, name, rdfunc, wrfunc); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_create_and_add_prop(nodeh, &propinfo, NULL, &proph); - if (err == PICL_SUCCESS && prophp) - *prophp = proph; - return (err); -} - -/* - * Add temperature threshold properties - */ -static void -add_sensor_thresh_props(picl_nodehdl_t nodeh, sensor_ctrl_blk_t *threshp) -{ - picl_prophdl_t proph; - - (void) add_regular_prop(nodeh, PICL_PROP_LOW_POWER_OFF, - PICL_PTYPE_INT, PICL_READ, - sizeof (threshp->low_power_off), - (void *)&(threshp->low_power_off), &proph); - - (void) add_regular_prop(nodeh, PICL_PROP_LOW_SHUTDOWN, - PICL_PTYPE_INT, PICL_READ, - sizeof (threshp->low_shutdown), - (void *)&(threshp->low_shutdown), &proph); - - (void) add_regular_prop(nodeh, PICL_PROP_LOW_WARNING, - PICL_PTYPE_INT, PICL_READ, - sizeof (threshp->low_warning), - (void *)&(threshp->low_warning), &proph); - - (void) add_regular_prop(nodeh, PICL_PROP_HIGH_WARNING, - PICL_PTYPE_INT, PICL_READ, - sizeof (threshp->high_warning), - (void *)&(threshp->high_warning), &proph); - - (void) add_regular_prop(nodeh, PICL_PROP_HIGH_SHUTDOWN, - PICL_PTYPE_INT, PICL_READ, - sizeof (threshp->high_shutdown), - (void *)&(threshp->high_shutdown), &proph); - - (void) add_regular_prop(nodeh, PICL_PROP_HIGH_POWER_OFF, - PICL_PTYPE_INT, PICL_READ, - sizeof (threshp->high_power_off), - (void *)&(threshp->high_power_off), &proph); -} - -/* - * Go through the sensor_nodes array and create those nodes - * and the Temperature property to report the temperature. - */ -static int -add_sensor_nodes_and_props(void) -{ - int err; - char *pname, *nodename, *devfs_path; - sensor_node_t *snodep; - sensor_ctrl_blk_t *threshp; - picl_nodehdl_t nodeh, cnodeh; - picl_prophdl_t proph; - env_sensor_t *sensorp; - int i; - - for (i = 0; i < NSENSORS; ++i) { - snodep = &sensor_nodes[i]; - /* - * Get the parent nodeh - */ - err = ptree_get_node_by_path(snodep->parent_path, &nodeh); - if (err != PICL_SUCCESS) - continue; - sensorp = snodep->sensorp; - - /* - * Create temperature-sensor node - */ - nodename = snodep->sensor_name; - err = ptree_create_and_add_node(nodeh, nodename, - PICL_CLASS_TEMPERATURE_SENSOR, &cnodeh); - if (env_debug) - envd_log(LOG_INFO, - "Creating PICL sensor node '%s' err:%d\n", - nodename, err); - if (err != PICL_SUCCESS) - break; - - /* save node handle */ - snodep->nodeh = cnodeh; - - /* - * Add "devfs_path" property in child node - */ - devfs_path = sensorp->devfs_path; - pname = PICL_PROP_DEVFS_PATH; - err = add_regular_prop(cnodeh, pname, - PICL_PTYPE_CHARSTRING, PICL_READ, - strlen(devfs_path)+1, (void *)devfs_path, &proph); - if (err != PICL_SUCCESS) - break; - - /* - * Now add volatile "temperature" volatile property - * in this "temperature-sensor" class node. - */ - pname = PICL_PROP_TEMPERATURE; - err = add_volatile_prop(cnodeh, pname, - PICL_PTYPE_INT, PICL_READ, sizeof (tempr_t), - get_current_temp, NULL, &proph); - if (err != PICL_SUCCESS) - break; - - /* Save prop handle */ - snodep->proph = proph; - - /* - * Add threshold related properties - */ - threshp = sensorp->es_ptr; - - if (threshp != NULL) - add_sensor_thresh_props(cnodeh, threshp); - - } - if (err != PICL_SUCCESS) { - delete_sensor_nodes_and_props(); - if (env_debug) - envd_log(LOG_INFO, - "Can't create prop/node for sensor '%s'\n", - nodename); - return (err); - } - return (PICL_SUCCESS); -} - -/* - * Delete all sensor nodes and related properties created by the - * add_sensor_prop() for each sensor node in the PICL tree. - */ -static void -delete_sensor_nodes_and_props(void) -{ - sensor_node_t *snodep; - int i; - - /* - * Delete/destroy any property created in the sensed device - * as well as the sensor node and all properties under it. - * Note that deleiing/destroying a node deletes/destroys - * all properties within that node. - */ - - for (i = 0; i < NSENSORS; ++i) { - snodep = &sensor_nodes[i]; - if (snodep->nodeh != NULL) { - /* delete node and all properties under it */ - (void) ptree_delete_node(snodep->nodeh); - (void) ptree_destroy_node(snodep->nodeh); - snodep->nodeh = NULL; - snodep->proph = NULL; - } - } -} - - -/* - * For each entry in fan_nodes[] array, do the following: - * - Create specified "fan" class node. - * - Create "Speed" volatile propery under "fan" class node. - * - Create "SpeedUnit" property under "fan" class node. - */ -static int -add_fan_nodes_and_props() -{ - int err; - char *pname, *nodename, *devfs_path; - env_fan_t *fanp; - fan_node_t *fnodep; - picl_nodehdl_t nodeh, cnodeh; - picl_prophdl_t proph; - int i; - - - for (i = 0; i < NFANS; ++i) { - /* - * Add various fan nodes and properties - */ - fnodep = &fan_nodes[i]; - /* - * get parent nodeh - */ - err = ptree_get_node_by_path(fnodep->parent_path, &nodeh); - if (err != PICL_SUCCESS) - continue; - - /* - * Create "fan" class node and save node handle - */ - nodename = fnodep->fan_name; - err = ptree_create_and_add_node(nodeh, nodename, - PICL_CLASS_FAN, &cnodeh); - if (env_debug) - envd_log(LOG_INFO, - "Creating PICL fan node '%s' err:%d\n", - nodename, err); - - if (err != PICL_SUCCESS) - break; - fnodep->nodeh = cnodeh; - - /* - * Add "devfs_path" property in child node - */ - fanp = fnodep->fanp; - devfs_path = fanp->devfs_path; - pname = PICL_PROP_DEVFS_PATH; - err = add_regular_prop(cnodeh, pname, - PICL_PTYPE_CHARSTRING, PICL_READ, - strlen(devfs_path)+1, (void *)devfs_path, &proph); - - if (err != PICL_SUCCESS) - - break; - - /* - * Add "Speed" volatile property in this "fan" - * class node and save prop handle. - */ - pname = PICL_PROP_FAN_SPEED; - err = add_volatile_prop(cnodeh, pname, PICL_PTYPE_INT, - PICL_READ|PICL_WRITE, sizeof (fanspeed_t), - get_current_speed, - set_current_speed, &proph); - - if (err != PICL_SUCCESS) - break; - fnodep->proph = proph; - - /* - * Add other "fan" class properties - */ - pname = PICL_PROP_FAN_SPEED_UNIT; - err = add_regular_prop(cnodeh, pname, - PICL_PTYPE_CHARSTRING, PICL_READ, - strlen(fnodep->speed_unit)+1, - (void *)fnodep->speed_unit, &proph); - - if (err != PICL_SUCCESS) - break; - } - if (err != PICL_SUCCESS) { - delete_fan_nodes_and_props(); - if (env_debug) - envd_log(LOG_WARNING, - "Can't create prop/node for fan '%s'\n", - nodename); - return (err); - } - return (PICL_SUCCESS); -} - - -/* - * Delete all fan nodes and related properties created by the - * add_fan_props() for each fan node in the PICL tree. - */ -static void -delete_fan_nodes_and_props(void) -{ - fan_node_t *fnodep; - int i; - - /* - * Delete/destroy fan node and all properties under it. - * Note that deleiing/destroying a node deletes/destroys - * all properties within that node. - */ - - for (i = 0; i < NFANS; ++i) { - fnodep = &fan_nodes[i]; - if (fnodep->nodeh != NULL) { - (void) ptree_delete_node(fnodep->nodeh); - (void) ptree_destroy_node(fnodep->nodeh); - fnodep->nodeh = NULL; - } - } -} - -/* - * Tuneables publishing functions - */ -static int -copy_persistent_tuneable(env_tuneable_t *tune, char *buf) -{ - - switch (tune->type) { - - case PICL_PTYPE_INT : { - (void) memcpy((int *)tune->value, - buf, tune->nbytes); - break; - } - case PICL_PTYPE_CHARSTRING : { - (void) memcpy((caddr_t)tune->value, - buf, tune->nbytes); - break; - } - default : { - return (PICL_FAILURE); - } - } - return (PICL_SUCCESS); -} - -static void -env_parse_tunables(picl_nodehdl_t rooth) -{ - char nmbuf[SYS_NMLN]; - char pname[PATH_MAX]; - - if (sysinfo(SI_PLATFORM, nmbuf, sizeof (nmbuf)) != -1) { - (void) snprintf(pname, PATH_MAX, PICLD_PLAT_PLUGIN_DIRF, nmbuf); - (void) strlcat(pname, TUNABLE_CONF_FILE, PATH_MAX); - if (access(pname, R_OK) == 0) { - (void) picld_pluginutil_parse_config_file(rooth, pname); - return; - } - } -} - -int -env_picl_setup_tuneables(void) -{ - int err; - int i; - picl_nodehdl_t nodeh; - picl_nodehdl_t rooth; - picl_prophdl_t proph; - env_tuneable_t *tuneablep; - char read_buf[BUFSIZ]; - - if (ptree_get_root(&rooth) != PICL_SUCCESS) { - return (PICL_FAILURE); - } - err = ptree_create_and_add_node(rooth, PICL_PLUGINS_NODE, - PICL_CLASS_PICL, &nodeh); - if (err != PICL_SUCCESS) - return (PICL_FAILURE); - err = ptree_create_and_add_node(nodeh, PICL_ENVIRONMENTAL_NODE, - PICL_CLASS_PICL, &nodeh); - if (err != PICL_SUCCESS) { - return (PICL_FAILURE); - } - - /* - * Parse the conf file - */ - env_parse_tunables(rooth); - for (i = 0; i < ntuneables; i++) { - tuneablep = &tuneables[i]; - err = ptree_get_propval_by_name(nodeh, tuneablep->name, - read_buf, tuneablep->nbytes); - - if (err != PICL_SUCCESS) { - /* - * Add volitle functions to environmental node - */ - err = add_volatile_prop(nodeh, tuneablep->name, - tuneablep->type, - PICL_READ|PICL_WRITE, tuneablep->nbytes, - tuneablep->rfunc, - tuneablep->wfunc, &proph); - - tuneablep->proph = proph; - } else { - /* - * property is persistent - */ - (void) copy_persistent_tuneable(tuneablep, - read_buf); - } - } - - return (PICL_SUCCESS); -} - -/* - * Find the ENVMODEL_CONF_FILE file. - */ -static int -get_envmodel_conf_file(char *outfilename) -{ - char nmbuf[SYS_NMLN]; - char pname[PATH_MAX]; - - if (sysinfo(SI_PLATFORM, nmbuf, sizeof (nmbuf)) != -1) { - (void) snprintf(pname, PATH_MAX, PICLD_PLAT_PLUGIN_DIRF, nmbuf); - (void) strlcat(pname, ENV_CONF_FILE, PATH_MAX); - if (access(pname, R_OK) == 0) { - (void) strlcpy(outfilename, pname, PATH_MAX); - return (0); - } - } - - if (sysinfo(SI_MACHINE, nmbuf, sizeof (nmbuf)) != -1) { - (void) snprintf(pname, PATH_MAX, PICLD_PLAT_PLUGIN_DIRF, nmbuf); - (void) strlcat(pname, ENV_CONF_FILE, PATH_MAX); - if (access(pname, R_OK) == 0) { - (void) strlcpy(outfilename, pname, PATH_MAX); - return (0); - } - } - - (void) snprintf(pname, PATH_MAX, "%s/%s", PICLD_COMMON_PLUGIN_DIR, - ENV_CONF_FILE); - - if (access(pname, R_OK) == 0) { - (void) strlcpy(outfilename, pname, PATH_MAX); - return (0); - } - - return (-1); -} - -/* Delete all sensor/fan nodes and any properties created by this plugin */ -void -env_picl_destroy(void) -{ - delete_fan_nodes_and_props(); - delete_sensor_nodes_and_props(); -} - -void -env_picl_setup(void) -{ - int err; - sensor_node_t *snodep; - fan_node_t *fnodep; - char fullfilename[PATH_MAX]; - picl_nodehdl_t rooth; - int i; - - - /* - * Initialize sensorp and other fields in the sensor_nodes[] array - */ - - for (i = 0; i < NSENSORS; ++i) { - snodep = &sensor_nodes[i]; - snodep->sensorp = sensor_lookup(snodep->sensor_name); - snodep->nodeh = NULL; - snodep->proph = NULL; - snodep->target_proph = NULL; - } - - /* - * Initialize fanp and other fields in the fan_nodes[] array - */ - for (i = 0; i < NFANS; ++i) { - fnodep = &fan_nodes[i]; - fnodep->fanp = fan_lookup(fnodep->fan_name); - fnodep->nodeh = NULL; - fnodep->proph = NULL; - } - - /* - * Get platform handle and populate PICL tree with environmental - * nodes and properties - */ - - err = add_sensor_nodes_and_props(); - - if (err == PICL_SUCCESS) - err = add_fan_nodes_and_props(); - - - if (err != PICL_SUCCESS) { - delete_sensor_nodes_and_props(); - envd_log(LOG_CRIT, ENVD_PICL_SETUP_FAILED); - return; - } - - /* - * Parse the envmodel.conf file and populate the PICL tree - */ - if (get_envmodel_conf_file(fullfilename) < 0) - envd_log(LOG_CRIT, ENVD_PICL_SETUP_FAILED); - if (ptree_get_root(&rooth) != PICL_SUCCESS) - envd_log(LOG_CRIT, ENVD_PICL_SETUP_FAILED); - err = picld_pluginutil_parse_config_file(rooth, fullfilename); - - if (err != PICL_SUCCESS) - envd_log(LOG_CRIT, ENVD_PICL_SETUP_FAILED); -} diff --git a/usr/src/cmd/picl/plugins/sun4u/taco/frudata/Makefile b/usr/src/cmd/picl/plugins/sun4u/taco/frudata/Makefile deleted file mode 100644 index d31f28f5cf..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/taco/frudata/Makefile +++ /dev/null @@ -1,62 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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. -# -# lib/picl/plugins/sun4u/taco/frudata/Makefile -# -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Blade-1500 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONF= libpiclfrudata.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: $(CONF) - -install: $(ROOTLIBDIR) $(ROOTCONF) - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/taco/frudata/libpiclfrudata.conf b/usr/src/cmd/picl/plugins/sun4u/taco/frudata/libpiclfrudata.conf deleted file mode 100644 index cecb7690f3..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/taco/frudata/libpiclfrudata.conf +++ /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, 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 2002 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# ident "%Z%%M% %I% %E% SMI" -# -# This file creates the FRU device paths for the FRUAccess library -# - -VERSION 1.1 - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/motherboard-fru-prom@0,a8 -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/motherboard-fru-prom@0,a8:motherboard-fru-prom" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,a0 -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,a0:dimm-spd" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,a2 -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,a2:dimm-spd" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,a4 -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,a4:dimm-spd" - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,a6 -PROP FRUDevicePath string r 0 "/devices/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,a6:dimm-spd" diff --git a/usr/src/cmd/picl/plugins/sun4u/taco/frutree/Makefile b/usr/src/cmd/picl/plugins/sun4u/taco/frutree/Makefile deleted file mode 100644 index f221396542..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/taco/frutree/Makefile +++ /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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# lib/picl/plugins/sun4u/taco/frutree/Makefile -# -include $(SRC)/Makefile.psm - -# include library definitions -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Blade-1500 - -include $(SRC)/cmd/picl/plugins/Makefile.com - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CONF= piclfrutree.conf -ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) -$(ROOTCONF) := FILEMODE = 0644 -INFOS= piclfrutree.info system-board.info - - -.KEEP_STATE: - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: $(CONF) - -install: $(ROOTLIBDIR) $(ROOTCONF) - -$(CONF): $(INFOS) - $(RM) $@ - $(CPP) piclfrutree.info > $@ - -# include library targets -include $(SRC)/lib/Makefile.targ -include $(SRC)/cmd/picl/plugins/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4u/taco/frutree/piclfrutree.info b/usr/src/cmd/picl/plugins/sun4u/taco/frutree/piclfrutree.info deleted file mode 100644 index e4c824020e..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/taco/frutree/piclfrutree.info +++ /dev/null @@ -1,122 +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 2002 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * # ident "%Z%%M% %I% %E% SMI" - * - * supported prop types: void, int, uint, float, string - * supported prop access_modes: r, w, rw - * - * VERSION -- supported version number is 1.1 - * - * name: -- gives the anchor node - * where is [@][?=] - * - * _class: -- gives the anchor node - * where is [@][?=] - * - * NODE - * {describes a subtree} - * ENDNODE - * - * PROP [ ] -- per property - * - * REFPROP - * - * REFNODE with -- Associates a new node - * with if exists - * where - * is the nodename - * is the picl class. - * is name: or _class: - * - * If "name:" or "_class:" is not specified in the , - * the default is "name:" - * - */ - -#define PLATFORM_CLASS jbus - -VERSION 1.1 -NODE frutree picl - NODE chassis fru - /* - * SunMC physical view view_points for this platform - * This will get moved to a separate SunMC physical view plugin later. - */ - PROP ViewPoints string r 0 "front rear side" - NODE MB location - PROP SlotType string r 0 "system-board" - PROP Label string r 0 "MB" - ENDNODE - NODE F0 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F0" - NODE rear-fan fru - ENDNODE - ENDNODE - NODE F1 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F1" - NODE front-fan fru - ENDNODE - ENDNODE - NODE F2 location - PROP SlotType string r 0 "fan-unit" - PROP Label string r 0 "F2" - NODE cpu-fan fru - ENDNODE - ENDNODE - NODE PS0 location - PROP SlotType string r 0 "power-supply" - PROP Label string r 0 "PS0" - NODE power-supply fru - ENDNODE - ENDNODE - NODE HDD0 location - PROP SlotType string r 0 "disk-slot" - PROP Label string r 0 "HDD0" - ENDNODE - NODE HDD1 location - PROP SlotType string r 0 "disk-slot" - PROP Label string r 0 "HDD1" - ENDNODE - NODE RM0 location - PROP SlotType string r 0 "cdrom-slot" - PROP Label string r 0 "RM0" - ENDNODE - ENDNODE -ENDNODE - -/* add disk fru nodes for disks which are present */ -name:/frutree/chassis/HDD0 - REFNODE disk fru WITH name:/platform/pci@1e,600000/ide@d/dad@0,0 -name:/frutree/chassis/HDD1 - REFNODE disk fru WITH name:/platform/pci@1e,600000/ide@d/dad@1,0 -name:/frutree/chassis/RM0 - REFNODE cdrom fru WITH name:/platform/pci@1e,600000/ide@d/sd@2,0 - -name:/frutree/chassis/MB -#include "system-board.info" - diff --git a/usr/src/cmd/picl/plugins/sun4u/taco/frutree/system-board.info b/usr/src/cmd/picl/plugins/sun4u/taco/frutree/system-board.info deleted file mode 100644 index 79106caac4..0000000000 --- a/usr/src/cmd/picl/plugins/sun4u/taco/frutree/system-board.info +++ /dev/null @@ -1,275 +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 2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * # ident "%Z%%M% %I% %E% SMI" - * - * This file creates the system board structure - */ - -NODE system-board fru - NODE pci-slot location - PROP Label string r 0 "PCI0" - PROP SlotType string r 0 "pci" - ENDNODE - NODE pci-slot location - PROP Label string r 0 "PCI1" - PROP SlotType string r 0 "pci" - ENDNODE - NODE pci-slot location - PROP Label string r 0 "PCI2" - PROP SlotType string r 0 "pci" - ENDNODE - NODE pci-slot location - PROP Label string r 0 "PCI3" - PROP SlotType string r 0 "pci" - ENDNODE - NODE pci-slot location - PROP Label string r 0 "PCI4" - PROP SlotType string r 0 "pci" - ENDNODE - NODE cpu-slot location - PROP Label string r 0 "0" - PROP Slot uint r 4 0 - PROP SlotType string r 0 "cpu" - ENDNODE - NODE mem-slot location - PROP Slot uint r 4 0 - PROP Label string r 0 "DIMM0" - PROP SlotType string r 0 "memory-module" - ENDNODE - NODE mem-slot location - PROP Slot uint r 4 1 - PROP Label string r 0 "DIMM1" - PROP SlotType string r 0 "memory-module" - ENDNODE - NODE mem-slot location - PROP Slot uint r 4 2 - PROP Label string r 0 "DIMM2" - PROP SlotType string r 0 "memory-module" - ENDNODE - NODE mem-slot location - PROP Slot uint r 4 3 - PROP Label string r 0 "DIMM3" - PROP SlotType string r 0 "memory-module" - ENDNODE -ENDNODE - -/* - * create the fru modules for CPU - */ -name:/frutree/chassis/MB/system-board/cpu-slot?Slot=0 -REFNODE cpu-module fru WITH _class:/PLATFORM_CLASS/cpu?ID=0 - -/* - * seeprom source for motherboard - */ -name:/frutree/chassis/MB/system-board -PROP FRUDataAvailable void r -REFPROP _seeprom_source /platform/pci@1e,600000/isa@7/i2c@0,320/motherboard-fru-prom@0,a8 - -/* - * Set up memory module fru - */ -name:/frutree/chassis/MB/system-board/mem-slot?Label=DIMM0 -REFNODE mem-module fru WITH /platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,a0 - -name:/frutree/chassis/MB/system-board/mem-slot?Label=DIMM1 -REFNODE mem-module fru WITH /platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,a2 - -name:/frutree/chassis/MB/system-board/mem-slot?Label=DIMM2 -REFNODE mem-module fru WITH /platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,a4 - -name:/frutree/chassis/MB/system-board/mem-slot?Label=DIMM3 -REFNODE mem-module fru WITH /platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,a6 - -/* - * Seeprom source for dimms - */ -name:/frutree/chassis/MB/system-board/mem-slot?Label=DIMM0/mem-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source /platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,a0 - -name:/frutree/chassis/MB/system-board/mem-slot?Label=DIMM1/mem-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source /platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,a2 - -name:/frutree/chassis/MB/system-board/mem-slot?Label=DIMM2/mem-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source /platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,a4 - -name:/frutree/chassis/MB/system-board/mem-slot?Label=DIMM3/mem-module -PROP FRUDataAvailable void r -REFPROP _seeprom_source /platform/pci@1e,600000/isa@7/i2c@0,320/dimm-spd@0,a6 - -/* - * _fru_parent memory modules - */ -name:/platform/memory-controller?portid=0/memory-module-group?ID=0/memory-module?ID=0 -REFPROP _fru_parent /frutree/chassis/MB/system-board/mem-slot?Label=DIMM0/mem-module - -name:/platform/memory-controller?portid=0/memory-module-group?ID=0/memory-module?ID=1 -REFPROP _fru_parent /frutree/chassis/MB/system-board/mem-slot?Label=DIMM1/mem-module - -name:/platform/memory-controller?portid=0/memory-module-group?ID=1/memory-module?ID=0 -REFPROP _fru_parent /frutree/chassis/MB/system-board/mem-slot?Label=DIMM2/mem-module - -name:/platform/memory-controller?portid=0/memory-module-group?ID=1/memory-module?ID=1 -REFPROP _fru_parent /frutree/chassis/MB/system-board/mem-slot?Label=DIMM3/mem-module - - -/* - * _fru_parent CPU, memory-controller devices - */ -_class:/PLATFORM_CLASS/cpu?ID=0 -REFPROP _fru_parent /frutree/chassis/MB/system-board/cpu-slot?Slot=0/cpu-module - -name:/platform/memory-controller?portid=0 -REFPROP _fru_parent /frutree/chassis/MB/system-board/cpu-slot?Slot=0/cpu-module - -/* - * _fru_parent motherboard - */ -_class:/PLATFORM_CLASS -REFPROP _fru_parent /frutree/chassis/MB/system-board - -/* - * Populate PCI slots - */ -name:/frutree/chassis/MB/system-board/pci-slot?Label=PCI0 -REFNODE pci-card fru WITH _class:/PLATFORM_CLASS/pci@1e,600000/picl?DeviceID=2 - -name:/frutree/chassis/MB/system-board/pci-slot?Label=PCI1 -REFNODE pci-card fru WITH _class:/PLATFORM_CLASS/pci@1e,600000/picl?DeviceID=3 - -name:/frutree/chassis/MB/system-board/pci-slot?Label=PCI2 -REFNODE pci-card fru WITH _class:/PLATFORM_CLASS/pci@1e,600000/picl?DeviceID=4 - -name:/frutree/chassis/MB/system-board/pci-slot?Label=PCI3 -REFNODE pci-card fru WITH _class:/PLATFORM_CLASS/pci@1e,600000/picl?DeviceID=5 - -name:/frutree/chassis/MB/system-board/pci-slot?Label=PCI4 -REFNODE pci-card fru WITH _class:/PLATFORM_CLASS/pci@1f,700000/picl?DeviceID=3 - -/* - * _fru_parent PCI devices - */ -_class:/PLATFORM_CLASS/pci?UnitAddress=1e,600000/picl?DeviceID=2 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCI0/pci-card - -_class:/PLATFORM_CLASS/pci?UnitAddress=1e,600000/picl?DeviceID=3 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCI1/pci-card - -_class:/PLATFORM_CLASS/pci?UnitAddress=1e,600000/picl?DeviceID=4 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCI2/pci-card - -_class:/PLATFORM_CLASS/pci?UnitAddress=1e,600000/picl?DeviceID=5 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCI3/pci-card - -_class:/PLATFORM_CLASS/pci?UnitAddress=1f,700000/picl?DeviceID=3 -REFPROP _fru_parent /frutree/chassis/MB/system-board/pci-slot?Label=PCI4/pci-card - -/* - * _fru_parent for sensors and fans - */ -name:/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c/cpu-fan -REFPROP _fru_parent /frutree/chassis/F2/cpu-fan - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c/intake-fan -REFPROP _fru_parent /frutree/chassis/F1/front-fan - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c/outtake-fan -REFPROP _fru_parent /frutree/chassis/F0/rear-fan - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c/cpu -REFPROP _fru_parent /frutree/chassis/MB/system-board/cpu-slot/cpu-module - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c/int-amb -REFPROP _fru_parent /frutree/chassis/MB/system-board - -name:/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c/sys-in -REFPROP _fru_parent /frutree/chassis/MB/system-board - -/* - * Environmental devices associated with motherboard - */ -name:/frutree/chassis/MB/system-board - TABLE Devices - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c/int-amb - ENDROW - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c/sys-in - ENDROW - ENDTABLE - -/* - * Environmental devices of CPU - */ -name:/frutree/chassis/MB/system-board/cpu-slot/cpu-module - TABLE Devices - ROW - PROP Class string r 0 "temperature-sensor" - REFPROP _temperature-sensor_ name:/platform/pci@1e,600000/isa@7/i2c@0,320/hardware-monitor@0,5c/cpu - ENDROW - ROW - PROP Class string r 0 "cpu" - REFPROP _cpu_ _class:/PLATFORM_CLASS/cpu - ENDROW - ENDTABLE - -/* - * Hard disk link between fru and device tree - */ -name:/frutree/chassis/HDD0/disk - TABLE Device - ROW - PROP Class string r 0 "block" - REFPROP _block_ name:/platform/pci@1e,600000/ide@d/dad@0,0 - ENDROW - ENDTABLE -name:/platform/pci@1e,600000/ide@d/dad@0,0 - REFPROP _fru_parent name:/frutree/chassis/HDD0/disk - -name:/frutree/chassis/HDD1/disk - TABLE Device - ROW - PROP Class string r 0 "block" - REFPROP _block_ name:/platform/pci@1e,600000/ide@d/dad@1,0 - ENDROW - ENDTABLE -name:/platform/pci@1e,600000/ide@d/dad@1,0 - REFPROP _fru_parent name:/frutree/chassis/HDD1/disk - -name:/frutree/chassis/RM0/cdrom - TABLE Device - ROW - PROP Class string r 0 "cdrom" - REFPROP _cdrom_ name:/platform/pci@1e,600000/ide@d/sd@2,0 - ENDROW - ENDTABLE -name:/platform/pci@1e,600000/ide@d/sd@2,0 - REFPROP _fru_parent name:/frutree/chassis/RM0/cdrom diff --git a/usr/src/cmd/picl/plugins/sun4v/Makefile b/usr/src/cmd/picl/plugins/sun4v/Makefile deleted file mode 100644 index 70750f0e82..0000000000 --- a/usr/src/cmd/picl/plugins/sun4v/Makefile +++ /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 2008 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# ident "%Z%%M% %I% %E% SMI" -# - -# -# cmd/picl/plugins/sun4v/Makefile -# - -SUBDIRS= lib .WAIT snmp .WAIT mdesc pri piclsbl - -MSGSUBDIRS= snmp - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -_msg := TARGET= _msg - -.KEEP_STATE: - -all install clean clobber: $(SUBDIRS) - -_msg: $(MSGSUBDIRS) - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4v/include/libpiclsnmp.h b/usr/src/cmd/picl/plugins/sun4v/include/libpiclsnmp.h deleted file mode 100644 index 2089df2d35..0000000000 --- a/usr/src/cmd/picl/plugins/sun4v/include/libpiclsnmp.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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 _LIBPICLSNMP_H -#define _LIBPICLSNMP_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Opaque picl snmp handle - */ -typedef void *picl_snmphdl_t; - -/* - * Exported interfaces - */ -extern picl_snmphdl_t snmp_init(void); -extern void snmp_fini(picl_snmphdl_t); - -extern int snmp_reinit(picl_snmphdl_t hdl, int clr_linkreset); -extern void snmp_register_group(picl_snmphdl_t, char *, int, int); - -extern int snmp_get_int(picl_snmphdl_t, char *, int, int *, int *); -extern int snmp_get_str(picl_snmphdl_t, char *, int, char **, int *); -extern int snmp_get_bitstr(picl_snmphdl_t, char *, int, uchar_t **, - uint_t *, int *); -extern int snmp_get_nextrow(picl_snmphdl_t, char *, int, int *, int *); - -extern int snmp_refresh_init(void); -extern void snmp_refresh_fini(void); -extern int snmp_refresh_get_next_expiration(void); -extern int snmp_refresh_get_cycle_hint(int); -extern int snmp_refresh_process_job(void); - -#ifdef __cplusplus -} -#endif - -#endif /* _LIBPICLSNMP_H */ diff --git a/usr/src/cmd/picl/plugins/sun4v/include/picloids.h b/usr/src/cmd/picl/plugins/sun4v/include/picloids.h deleted file mode 100644 index 3149cdcd4d..0000000000 --- a/usr/src/cmd/picl/plugins/sun4v/include/picloids.h +++ /dev/null @@ -1,355 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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 _PICLOIDS_H -#define _PICLOIDS_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * IETF OIDs (not all are used by PICL) - */ -#define OID_ISO "1" -#define OID_ORG OID_ISO ".3" -#define OID_DOD OID_ORG ".6" -#define OID_INTERNET OID_DOD ".1" - -#define OID_PRIVATE OID_INTERNET ".4" -#define OID_ENTERPRISES OID_PRIVATE ".1" -#define OID_SUN OID_ENTERPRISES ".42" - -#define OID_MGMT OID_INTERNET ".2" -#define OID_MIB2 OID_MGMT ".1" -#define OID_entityMIB OID_MIB2 ".47" -#define OID_entityMIBObjects OID_entityMIB ".1" - -#define OID_entityPhysical OID_entityMIBObjects ".1" -#define OID_entPhysicalTable OID_entityPhysical ".1" -#define OID_entPhysicalEntry OID_entPhysicalTable ".1" - -#define OID_entPhysicalIndex OID_entPhysicalEntry ".1" -#define OID_entPhysicalDescr OID_entPhysicalEntry ".2" -#define OID_entPhysicalVendorType OID_entPhysicalEntry ".3" -#define OID_entPhysicalContainedIn OID_entPhysicalEntry ".4" -#define OID_entPhysicalClass OID_entPhysicalEntry ".5" -#define OID_entPhysicalParentRelPos OID_entPhysicalEntry ".6" -#define OID_entPhysicalName OID_entPhysicalEntry ".7" -#define OID_entPhysicalHardwareRev OID_entPhysicalEntry ".8" -#define OID_entPhysicalFirmwareRev OID_entPhysicalEntry ".9" -#define OID_entPhysicalSoftwareRev OID_entPhysicalEntry ".10" -#define OID_entPhysicalSerialNum OID_entPhysicalEntry ".11" -#define OID_entPhysicalMfgName OID_entPhysicalEntry ".12" -#define OID_entPhysicalModelName OID_entPhysicalEntry ".13" -#define OID_entPhysicalAlias OID_entPhysicalEntry ".14" -#define OID_entPhysicalAssetID OID_entPhysicalEntry ".15" -#define OID_entPhysicalIsFRU OID_entPhysicalEntry ".16" - -/* - * Conceptual row change time for handling hotplug/hotswap events - */ -#define OID_entityGeneral OID_entityMIBObjects ".4" -#define OID_entLastChangeTime OID_entityGeneral ".1" - -/* - * Sun Platform MIB OIDs used by PICL - */ -#define OID_products OID_SUN ".2" -#define OID_sunFire OID_products ".70" -#define OID_sunPlatMIB OID_sunFire ".101" -#define OID_sunPlatMIBObjects OID_sunPlatMIB ".1" -#define OID_sunPlatMIBPhysicalObjects OID_sunPlatMIBObjects ".1" - -/* - * Equipment Table - */ -#define OID_sunPlatEquipmentTable OID_sunPlatMIBPhysicalObjects ".2" -#define OID_sunPlatEquipmentEntry OID_sunPlatEquipmentTable ".1" -#define OID_sunPlatEquipmentOperationalState \ - OID_sunPlatEquipmentEntry ".2" - -/* - * Equipment Holder Table - */ -#define OID_sunPlatEquipmentHolderTable OID_sunPlatMIBPhysicalObjects ".3" -#define OID_sunPlatEquipmentHolderEntry OID_sunPlatEquipmentHolderTable ".1" -#define OID_sunPlatEquipmentHolderAcceptableTypes \ - OID_sunPlatEquipmentHolderEntry ".2" - -/* - * Circuit Pack Table - */ -#define OID_sunPlatCircuitPackTable OID_sunPlatMIBPhysicalObjects ".4" -#define OID_sunPlatCircuitPackEntry OID_sunPlatCircuitPackTable ".1" -#define OID_sunPlatCircuitPackReplaceable \ - OID_sunPlatCircuitPackEntry ".3" -#define OID_sunPlatCircuitPackHotSwappable \ - OID_sunPlatCircuitPackEntry ".4" - -/* - * Physical Class Table - */ -#define OID_sunPlatPhysicalTable OID_sunPlatMIBPhysicalObjects ".5" -#define OID_sunPlatPhysicalEntry OID_sunPlatPhysicalTable ".1" -#define OID_sunPlatPhysicalClass OID_sunPlatPhysicalEntry ".1" - -/* - * Sensor Table - */ -#define OID_sunPlatSensorTable OID_sunPlatMIBPhysicalObjects ".6" -#define OID_sunPlatSensorEntry OID_sunPlatSensorTable ".1" -#define OID_sunPlatSensorClass OID_sunPlatSensorEntry ".1" -#define OID_sunPlatSensorType OID_sunPlatSensorEntry ".2" - -/* - * Binary Sensor Table - */ -#define OID_sunPlatBinarySensorTable OID_sunPlatMIBPhysicalObjects ".7" -#define OID_sunPlatBinarySensorEntry OID_sunPlatBinarySensorTable ".1" - -#define OID_sunPlatBinarySensorCurrent OID_sunPlatBinarySensorEntry ".1" -#define OID_sunPlatBinarySensorExpected OID_sunPlatBinarySensorEntry ".2" -#define OID_sunPlatBinarySensorInterpretTrue \ - OID_sunPlatBinarySensorEntry ".3" -#define OID_sunPlatBinarySensorInterpretFalse \ - OID_sunPlatBinarySensorEntry ".4" - -/* - * Numeric Sensor Table - */ -#define OID_sunPlatNumericSensorTable OID_sunPlatMIBPhysicalObjects ".8" -#define OID_sunPlatNumericSensorEntry OID_sunPlatNumericSensorTable ".1" -#define OID_sunPlatNumericSensorCurrent OID_sunPlatNumericSensorEntry ".4" -#define OID_sunPlatNumericSensorBaseUnits \ - OID_sunPlatNumericSensorEntry ".1" -#define OID_sunPlatNumericSensorExponent \ - OID_sunPlatNumericSensorEntry ".2" -#define OID_sunPlatNumericSensorRateUnits \ - OID_sunPlatNumericSensorEntry ".3" -#define OID_sunPlatNumericSensorLowerThresholdNonCritical \ - OID_sunPlatNumericSensorEntry ".8" -#define OID_sunPlatNumericSensorUpperThresholdNonCritical \ - OID_sunPlatNumericSensorEntry ".9" -#define OID_sunPlatNumericSensorLowerThresholdCritical \ - OID_sunPlatNumericSensorEntry ".10" -#define OID_sunPlatNumericSensorUpperThresholdCritical \ - OID_sunPlatNumericSensorEntry ".11" -#define OID_sunPlatNumericSensorLowerThresholdFatal \ - OID_sunPlatNumericSensorEntry ".12" -#define OID_sunPlatNumericSensorUpperThresholdFatal \ - OID_sunPlatNumericSensorEntry ".13" -#define OID_sunPlatNumericSensorEnabledThresholds \ - OID_sunPlatNumericSensorEntry ".15" - -/* - * Alarm Table - */ -#define OID_sunPlatAlarmTable OID_sunPlatMIBPhysicalObjects ".12" -#define OID_sunPlatAlarmEntry OID_sunPlatAlarmTable ".1" -#define OID_sunPlatAlarmType OID_sunPlatAlarmEntry ".1" -#define OID_sunPlatAlarmState OID_sunPlatAlarmEntry ".2" - -/* - * Power Supply Table - */ -#define OID_sunPlatPowerSupplyTable OID_sunPlatMIBPhysicalObjects ".14" -#define OID_sunPlatPowerSupplyEntry OID_sunPlatPowerSupplyTable ".1" -#define OID_sunPlatPowerSupplyClass OID_sunPlatPowerSupplyEntry ".1" - -/* - * Battery Table - */ -#define OID_sunPlatBatteryTable OID_sunPlatMIBPhysicalObjects ".15" -#define OID_sunPlatBatteryEntry OID_sunPlatBatteryTable ".1" -#define OID_sunPlatBatteryStatus OID_sunPlatBatteryEntry ".1" - -/* - * Integer enumeration classes used by PICL - */ -typedef enum { - ST_TRUE = 1, - ST_FALSE = 2 -} snmp_truthval_t; - -/* - * Note that the truth values could be much longer than the length - * of the strings "true" or "false", since we actuallly interpret them - * using InterpretTrue and InterpretFalse values in the MIB. Currently - * we limit them to be 32 (see MAX_TRUTHVAL_LEN definition below) - */ -#define STR_ST_TRUE "true" -#define STR_ST_FALSE "false" - -/* entPhysicalClass */ -typedef enum { - SPC_OTHER = 1, - SPC_UNKNOWN = 2, - SPC_CHASSIS = 3, - SPC_BACKPLANE = 4, - SPC_CONTAINER = 5, - SPC_POWERSUPPLY = 6, - SPC_FAN = 7, - SPC_SENSOR = 8, - SPC_MODULE = 9, - SPC_PORT = 10, - SPC_STACK = 11 -} snmp_physical_class_t; - -/* sunPlatEquipmentOperationalState */ -typedef enum { - SSOS_DISABLED = 1, - SSOS_ENABLED = 2 -} snmp_sunplat_op_state_t; - -/* - * Update MAX_OPSTATE_LEN below if these strings are changed - */ -#define STR_SSOS_DISABLED "disabled" -#define STR_SSOS_ENABLED "enabled" - -/* sunPlatPhysicalClass */ -typedef enum { - SSPC_OTHER = 1, - SSPC_ALARM = 2, - SSPC_WATCHDOG = 3 -} snmp_sunplat_phys_class_t; - -/* sunPlatSensorClass */ -typedef enum { - SSSC_BINARY = 1, - SSSC_NUMERIC = 2, - SSSC_DISCRETE = 3 -} snmp_sunplat_sensor_class_t; - -/* sunPlatSensorType */ -typedef enum { - SSST_OTHER = 1, - SSST_UNKNOWN = 2, - SSST_TEMPERATURE = 3, - SSST_VOLTAGE = 4, - SSST_CURRENT = 5, - SSST_TACHOMETER = 6, - SSST_COUNTER = 7, - SSST_SWITCH = 8, - SSST_LOCK = 9, - SSST_HUMIDITY = 10, - SSST_SMOKE_DETECTION = 11, - SSST_PRESENCE = 12, - SSST_AIRFLOW = 13 -} snmp_sunplat_sensor_type_t; - -/* sunPlatAlarmType */ -typedef enum { - SSAT_OTHER = 1, - SSAT_AUDIBLE = 2, - SSAT_VISIBLE = 3, - SSAT_MOTION = 4, - SSAT_SWITCH = 5 -} snmp_sunplat_alarm_type_t; - -/* sunPlatAlarmState */ -typedef enum { - SSAS_UNKNOWN = 1, - SSAS_OFF = 2, - SSAS_STEADY = 3, - SSAS_ALTERNATING = 4 -} snmp_sunplat_alarm_state_t; - -/* - * Update MAX_ALARMSTATE_LEN below if these strings are changed - */ -#define STR_SSAS_UNKNOWN "unknown" -#define STR_SSAS_OFF "off" -#define STR_SSAS_STEADY "steady" -#define STR_SSAS_ALTERNATING "alternating" - -/* - * Bit masks for the sunPlatNumericSensorEnabledThresholds - */ -#define LOWER_NON_CRITICAL 0x80 -#define UPPER_NON_CRITICAL 0x40 -#define LOWER_CRITICAL 0x20 -#define UPPER_CRITICAL 0x10 -#define LOWER_FATAL 0x08 -#define UPPER_FATAL 0x04 - -/* - * sunPlatPowerSupplyClass - */ -typedef enum { - SSPSC_OTHER = 1, - SSPSC_POWERSUPPLY = 2, - SSPSC_BATTERY = 3 -} snmp_sunplat_power_supply_class_t; - -/* - * sunPlatBatteryStatus - */ -typedef enum { - SSBS_OTHER = 1, - SSBS_UNKNOWN = 2, - SSBS_FULLYCHARGED = 3, - SSBS_LOW = 4, - SSBS_CRITICAL = 5, - SSBS_CHARGING = 6, - SSBS_CHARGING_AND_LOW = 7, - SSBS_CHARGING_AND_HIGH = 8, - SSBS_CHARGING_AND_CRITICAL = 9, - SSBS_UNDEFINED = 10, - SSBS_PARTIALLY_CHARGED = 11 -} snmp_sunplat_battery_status_t; - -/* - * Update MAX_BATTERYSTATUS_LEN below if these strings are changed - */ -#define STR_SSBS_OTHER "Other" -#define STR_SSBS_UNKNOWN "Unknown" -#define STR_SSBS_FULLYCHARGED "Fully Charged" -#define STR_SSBS_LOW "Low" -#define STR_SSBS_CRITICAL "Critical" -#define STR_SSBS_CHARGING "Charging" -#define STR_SSBS_CHARGING_AND_LOW "Charging and Low" -#define STR_SSBS_CHARGING_AND_HIGH "Charging and High" -#define STR_SSBS_CHARGING_AND_CRITICAL "Charging and Critical" -#define STR_SSBS_UNDEFINED "Undefined" -#define STR_SSBS_PARTIALLY_CHARGED "Partially Charged" - -/* - * Max limits of all volatiles - */ -#define MAX_OPSTATE_LEN 10 -#define MAX_ALARMSTATE_LEN 12 -#define MAX_TRUTHVAL_LEN 32 -#define MAX_BATTERYSTATUS_LEN 32 - -#ifdef __cplusplus -} -#endif - -#endif /* _PICLOIDS_H */ diff --git a/usr/src/cmd/picl/plugins/sun4v/lib/Makefile b/usr/src/cmd/picl/plugins/sun4v/lib/Makefile deleted file mode 100644 index b4c898c142..0000000000 --- a/usr/src/cmd/picl/plugins/sun4v/lib/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 (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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" -# - -# -# cmd/picl/plugins/sun4v/lib/Makefile -# - -SUBDIRS= snmp .WAIT - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -.KEEP_STATE: - -all install clean clobber: $(SUBDIRS) - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4v/lib/snmp/Makefile b/usr/src/cmd/picl/plugins/sun4v/lib/snmp/Makefile deleted file mode 100644 index e63d6c589f..0000000000 --- a/usr/src/cmd/picl/plugins/sun4v/lib/snmp/Makefile +++ /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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# - -# -# cmd/picl/plugins/sun4v/lib/snmp/Makefile -# - -LIBRARY= libpiclsnmp.a -VERS= .1 -OBJECTS= snmplib.o pdu.o asn1.o debug.o - -# include library definitions -include $(SRC)/Makefile.psm -include $(SRC)/lib/Makefile.lib - -ROOT_PLATFORM = $(USR_PLAT_DIR)/sun4v - -include $(SRC)/cmd/picl/plugins/Makefile.com - -SRCS= $(OBJECTS:%.o=%.c) - -LIBS= $(DYNLIB) - -ROOTLIBDIR = $(ROOT_PLATFORM)/lib - -CLOBBERFILES += $(LIBLINKS) - -CPPFLAGS += -I. -I../../include -I$(SRC)/uts/sun4v - -# -# Be careful when enabling SNMP_DEBUG; the debug log can quickly grow -# very very large. Never run cycle stress test with SNMP_DEBUG enabled! -# -#CPPFLAGS += -DSNMP_DEBUG - -# -# Do NOT uncomment the following two lines, unless you want to test -# the behavior of the library with an SNMP agent over network. -# -#CPPFLAGS += -DUSE_SOCKETS - -CFLAGS += -DBIG_ENDIAN -LDLIBS += -lc -lnvpair - -.KEEP_STATE: - - -SUBDIRS= - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber - -all: $(DYNLIB) $(LIBLINKS) - -install: $(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) - -$(LIBLINKS): FRC - $(RM) $@; $(SYMLINK) $(DYNLIB) $@ - -# include library targets -include $(SRC)/cmd/picl/plugins/Makefile.targ -include $(SRC)/lib/Makefile.targ - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4v/lib/snmp/asn1.c b/usr/src/cmd/picl/plugins/sun4v/lib/snmp/asn1.c deleted file mode 100644 index 4de8545981..0000000000 --- a/usr/src/cmd/picl/plugins/sun4v/lib/snmp/asn1.c +++ /dev/null @@ -1,760 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - -/* - * ASN.1 encoding related routines - */ - -#include -#include -#include -#include -#include "asn1.h" -#include "pdu.h" -#include "debug.h" - -/* - * This routine builds a 'SEQUENCE OF' ASN.1 object in the buffer - * using the 'id' and 'length' supplied. This is probably the place - * where using "reverse" asn encoding will help. - */ -uchar_t * -asn_build_sequence(uchar_t *buf, size_t *bufsz_p, uchar_t id, size_t length) -{ - /* - * When rebuilding sequence (which we do many times), we'll - * simply pass NULL to bufsz_p to skip the error check. - */ - if ((bufsz_p) && (*bufsz_p < 4)) - return (NULL); - - buf[0] = id; - buf[1] = (uchar_t)(ASN_LONG_LEN | 0x02); /* following 2 octets */ - buf[2] = (uchar_t)((length >> 8) & 0xff); - buf[3] = (uchar_t)(length & 0xff); - - if (bufsz_p) - *bufsz_p -= 4; - - LOGASNSEQ(buf, 4); - - return (buf + 4); -} - -/* - * The next two routines, asn_build_header() and asn_build_length(), build - * the header and length for an arbitrary object type into the buffer. The - * length of the object is encoded using as few length octets as possible. - */ -uchar_t * -asn_build_header(uchar_t *buf, size_t *bufsz_p, uchar_t id, size_t length) -{ - if (*bufsz_p < 1) - return (NULL); - - buf[0] = id; - (*bufsz_p)--; - - return (asn_build_length(buf + 1, bufsz_p, length)); -} -uchar_t * -asn_build_length(uchar_t *buf, size_t *bufsz_p, size_t length) -{ - if (length < 0x80) { - if (*bufsz_p < 1) - return (NULL); - buf[0] = (uchar_t)length; - (*bufsz_p)--; - - LOGASNLENGTH(buf, 1); - - return (buf + 1); - - } else if (length <= 0xFF) { - if (*bufsz_p < 2) - return (NULL); - buf[0] = (uchar_t)(ASN_LONG_LEN | 0x01); - buf[1] = (uchar_t)length; - *bufsz_p -= 2; - - LOGASNLENGTH(buf, 2); - - return (buf + 2); - - } else { - if (*bufsz_p < 3) - return (NULL); - - buf[0] = (uchar_t)(ASN_LONG_LEN | 0x02); - buf[1] = (uchar_t)((length >> 8) & 0xff); - buf[2] = (uchar_t)(length & 0xff); - *bufsz_p -= 3; - - LOGASNLENGTH(buf, 3); - - return (buf + 3); - } -} -/* - * Builds an ASN.1 encoded integer in the buffer using as few octets - * as possible. - */ -uchar_t * -asn_build_int(uchar_t *buf, size_t *bufsz_p, uchar_t id, int val) -{ - uint_t uival; - int ival, i; - short sval; - char cval; - - size_t valsz; - uchar_t *p, *valp; - - /* - * We need to "pack" the integer before sending it, so determine - * the minimum number of bytes in which we can pack the integer - */ - uival = ((uint_t)val >> BUILD_INT_SHIFT) & BUILD_INT_MASK; - ival = val; - sval = (short)val; /* yes, loss of data intended */ - cval = (char)val; /* yes, loss of data intended */ - - if (val == (int)cval) - valsz = 1; - else if (val == (int)sval) - valsz = 2; - else if (uival == BUILD_INT_MASK || uival == 0) - valsz = 3; - else - valsz = 4; - - /* - * Prepare the ASN.1 header for the integer - */ - if ((p = asn_build_header(buf, bufsz_p, id, valsz)) == NULL) - return (NULL); - - /* - * If we have enough space left, encode the integer - */ - if (*bufsz_p < valsz) - return (NULL); - else { - valp = (uchar_t *)&ival; - for (i = 0; i < valsz; i++) - p[i] = valp[sizeof (int) - valsz + i]; - - *bufsz_p -= valsz; - - LOGASNINT(buf, p + valsz - buf); - - return (p + valsz); - } -} -/* - * Builds an ASN.1 encoded octet string in the buffer. The source string - * need not be null-terminated. - */ -uchar_t * -asn_build_string(uchar_t *buf, size_t *bufsz_p, uchar_t id, uchar_t *str, - size_t slen) -{ - uchar_t *p; - - if ((p = asn_build_header(buf, bufsz_p, id, slen)) == NULL) - return (NULL); - - if (*bufsz_p < slen) - return (NULL); - else { - if (str) { - (void) memcpy(p, str, slen); - } else { - (void) memset(p, 0, slen); - } - - *bufsz_p -= slen; - - LOGASNOCTSTR(buf, p + slen - buf); - - return (p + slen); - } -} - -/* - * Builds an Object Identifier into the buffer according to the OID - * packing and encoding rules. - */ -uchar_t * -asn_build_objid(uchar_t *buf, size_t *bufsz_p, uchar_t id, void *oidp, - size_t n_subids) -{ - oid *objid = oidp; - size_t oid_asnlen; - oid subid, first_subid; - uchar_t subid_len[MAX_SUBIDS_IN_OID]; - uchar_t *p; - int i, ndx; - - /* - * Eliminate invalid cases - */ - if (n_subids < MIN_SUBIDS_IN_OID || n_subids > MAX_SUBIDS_IN_OID) - return (NULL); - if ((objid[0] > 2) || (objid[0] < 2 && objid[1] >= 40)) - return (NULL); - - /* - * The BER encoding rule for the ASN.1 Object Identifier states - * that after packing the first two subids into one, each subsequent - * component is considered as the next subid. Each subidentifier is - * then encoded as a non-negative integer using as few 7-bit blocks - * as possible. The blocks are packed in octets with the first bit of - * each octet equal to 1, except for the last octet of each subid. - */ - oid_asnlen = 0; - for (i = 0, ndx = 0; i < n_subids; i++, ndx++) { - if (i == 0) { - /* - * The packing formula for the first two subids - * of an OID is given by Z = (X * 40) + Y - */ - subid = objid[0] * 40 + objid[1]; - first_subid = subid; - i++; /* done with both subids 0 and 1 */ - } else { - subid = objid[i]; - } - - if (subid < (oid) 0x80) - subid_len[ndx] = 1; - else if (subid < (oid) 0x4000) - subid_len[ndx] = 2; - else if (subid < (oid) 0x200000) - subid_len[ndx] = 3; - else if (subid < (oid) 0x10000000) - subid_len[ndx] = 4; - else { - subid_len[ndx] = 5; - } - - oid_asnlen += subid_len[ndx]; - } - - if ((p = asn_build_header(buf, bufsz_p, id, oid_asnlen)) == NULL) - return (NULL); - - if (*bufsz_p < oid_asnlen) - return (NULL); - - /* - * Store the encoded OID - */ - for (i = 0, ndx = 0; i < n_subids; i++, ndx++) { - if (i == 0) { - subid = first_subid; - i++; - } else { - subid = objid[i]; - } - - switch (subid_len[ndx]) { - case 1: - *p++ = (uchar_t)subid; - break; - - case 2: - *p++ = (uchar_t)((subid >> 7) | 0x80); - *p++ = (uchar_t)(subid & 0x7f); - break; - - case 3: - *p++ = (uchar_t)((subid >> 14) | 0x80); - *p++ = (uchar_t)(((subid >> 7) & 0x7f) | 0x80); - *p++ = (uchar_t)(subid & 0x7f); - break; - - case 4: - *p++ = (uchar_t)((subid >> 21) | 0x80); - *p++ = (uchar_t)(((subid >> 14) & 0x7f) | 0x80); - *p++ = (uchar_t)(((subid >> 7) & 0x7f) | 0x80); - *p++ = (uchar_t)(subid & 0x7f); - break; - - case 5: - *p++ = (uchar_t)((subid >> 28) | 0x80); - *p++ = (uchar_t)(((subid >> 21) & 0x7f) | 0x80); - *p++ = (uchar_t)(((subid >> 14) & 0x7f) | 0x80); - *p++ = (uchar_t)(((subid >> 7) & 0x7f) | 0x80); - *p++ = (uchar_t)(subid & 0x7f); - break; - } - } - - *bufsz_p -= oid_asnlen; - - LOGASNOID(buf, p - buf); - - return (p); -} -/* - * Build an ASN_NULL object val into the request packet - */ -uchar_t * -asn_build_null(uchar_t *buf, size_t *bufsz_p, uchar_t id) -{ - uchar_t *p; - - p = asn_build_header(buf, bufsz_p, id, 0); - - LOGASNNULL(buf, p - buf); - - return (p); -} - - - -/* - * This routine parses a 'SEQUENCE OF' object header from the input - * buffer stream. If the identifier tag (made up of class, constructed - * type and data type tag) does not match the expected identifier tag, - * returns failure. - */ -uchar_t * -asn_parse_sequence(uchar_t *buf, size_t *bufsz_p, uchar_t exp_id) -{ - uchar_t *p; - uchar_t id; - - if ((p = asn_parse_header(buf, bufsz_p, &id)) == NULL) - return (NULL); - - if (id != exp_id) - return (NULL); - - return (p); -} -/* - * Return the type identifier of the ASN object via 'id' - */ -uchar_t * -asn_parse_header(uchar_t *buf, size_t *bufsz_p, uchar_t *id) -{ - uchar_t *p; - size_t asnobj_len, hdrlen; - - /* - * Objects with extension tag type are not supported - */ - if ((buf[0] & ASN_EXT_TAG) == ASN_EXT_TAG) - return (NULL); - - /* - * Parse the length field of the ASN object in the header - */ - if ((p = asn_parse_length(buf + 1, &asnobj_len)) == NULL) - return (NULL); - - /* - * Check if the rest of the msg packet is big enough for the - * full length of the object - */ - hdrlen = p - buf; - if (*bufsz_p < (asnobj_len + hdrlen)) - return (NULL); - - *id = buf[0]; - *bufsz_p -= hdrlen; - - return (p); -} -/* - * This routine parses the length of the object as specified in its - * header. The 'Indefinite' form of representing length is not supported. - */ -uchar_t * -asn_parse_length(uchar_t *buf, size_t *asnobj_len_p) -{ - uchar_t *p; - int n_length_octets; - - /* - * First, check for the short-definite form. Length of - * the object is simply the least significant 7-bits of - * the first byte. - */ - if ((buf[0] & ASN_LONG_LEN) == 0) { - *asnobj_len_p = (size_t)buf[0]; - return (buf + 1); - } - - /* - * Then, eliminate the indefinite form. The ASN_LONG_LEN - * bit of the first byte will be set and the least significant - * 7-bites of that byte will be zeros. - */ - if (buf[0] == (uchar_t)ASN_LONG_LEN) - return (NULL); - - /* - * Then, eliminate the long-definite case when the number of - * follow-up octets is more than what the size var can hold. - */ - n_length_octets = buf[0] & ~ASN_LONG_LEN; - if (n_length_octets > sizeof (*asnobj_len_p)) - return (NULL); - - /* - * Finally gather the length - */ - p = buf + 1; - *asnobj_len_p = 0; - while (n_length_octets--) { - *asnobj_len_p <<= 8; - *asnobj_len_p |= *p++; - } - - return (p); -} -/* - * Parses an integer out of the input buffer - */ -uchar_t * -asn_parse_int(uchar_t *buf, size_t *bufsz_p, int *ival) -{ - size_t asnobj_len, hdrlen; - uchar_t int_id; - uchar_t *p; - - int_id = ASN_UNIVERSAL | ASN_PRIMITIVE | ASN_INTEGER; - if (buf[0] != int_id) - return (NULL); - - /* - * Read in the length of the object; Note that integers are - * "packed" when sent from agent to manager and vice-versa, - * so the size of the object could be less than sizeof (int). - */ - if ((p = asn_parse_length(buf + 1, &asnobj_len)) == NULL) - return (NULL); - - /* - * Is there sufficient space left in the packet to read the integer ? - */ - hdrlen = p - buf; - if (*bufsz_p < (hdrlen + asnobj_len)) - return (NULL); - - /* - * Update space left in the buffer after the integer is read - */ - *bufsz_p -= (hdrlen + asnobj_len); - - /* - * Read in the integer value - */ - *ival = (*p & ASN_BIT8) ? -1 : 0; - while (asnobj_len--) { - *ival <<= 8; - *ival |= *p++; - } - - return (p); -} -/* - * Parses an unsigned integer out of the input buffer - */ -uchar_t * -asn_parse_uint(uchar_t *buf, size_t *bufsz_p, uint_t *uival) -{ - size_t asnobj_len, hdrlen; - uchar_t *p; - - if ((buf[0] != ASN_COUNTER) && (buf[0] != ASN_TIMETICKS)) - return (NULL); - - /* - * Read in the length of the object. Integers are sent the same - * way unsigned integers are sent. Except that, if the MSB was 1 - * in the unsigned int value, a null-byte is attached to the front. - * Otherwise, packing rules are the same as for integer values. - */ - if ((p = asn_parse_length(buf + 1, &asnobj_len)) == NULL) - return (NULL); - - /* - * Is there sufficient space left in the packet to read in the value ? - */ - hdrlen = p - buf; - if (*bufsz_p < (hdrlen + asnobj_len)) - return (NULL); - - /* - * Update space left in the buffer after the uint is read - */ - *bufsz_p -= (hdrlen + asnobj_len); - - /* - * Read in the unsigned integer (this should never get - * initialized to ~0 if it was sent right) - */ - *uival = (*p & ASN_BIT8) ? ~0 : 0; - while (asnobj_len--) { - *uival <<= 8; - *uival |= *p++; - } - - return (p); -} -/* - * Parses a string (ASN_OCTET_STR or ASN_BIT_STR) out of the input buffer. - * The memory for the string is allocated inside the routine and must be - * freed by the caller when it is no longer needed. If the string type is - * ASN_OCTET_STR, the returned string is null-terminated, and the returned - * length indicates the strlen value. If the string type is ASN_BIT_STR, - * the returned string is not null-terminated, and the returned length - * indicates the number of bytes. - */ -uchar_t * -asn_parse_string(uchar_t *buf, size_t *bufsz_p, uchar_t **str_p, size_t *slen) -{ - uchar_t *p; - uchar_t id1, id2; - size_t asnobj_len, hdrlen; - - /* - * Octet and bit strings are supported - */ - id1 = ASN_UNIVERSAL | ASN_PRIMITIVE | ASN_OCTET_STR; - id2 = ASN_UNIVERSAL | ASN_PRIMITIVE | ASN_BIT_STR; - if ((buf[0] != id1) && (buf[0] != id2)) - return (NULL); - - /* - * Parse out the length of the object and verify source buf sz - */ - if ((p = asn_parse_length(buf + 1, &asnobj_len)) == NULL) - return (NULL); - - hdrlen = p - buf; - if (*bufsz_p < (hdrlen + asnobj_len)) - return (NULL); - - /* - * Allocate for and copy out the string - */ - if ((*str_p = (uchar_t *)calloc(1, asnobj_len + 1)) == NULL) - return (NULL); - - (void) memcpy(*str_p, p, asnobj_len); - - /* - * Terminate the octet string with a null - */ - if (buf[0] == id1) { - (*str_p)[asnobj_len] = 0; - } - - /* - * Update pointers and return - */ - *slen = asnobj_len; - *bufsz_p -= (hdrlen + asnobj_len); - - return (p + asnobj_len); -} -/* - * Parses an object identifier out of the input packet buffer. Space for - * the oid object is allocated within this routine and must be freed by the - * caller when no longer needed. - */ -uchar_t * -asn_parse_objid(uchar_t *msg, size_t *varsz_p, void *oidp, size_t *n_subids) -{ - oid **objid_p = oidp; - oid *objid; - uchar_t *p; - size_t hdrlen, asnobj_len; - oid subid; - int i, ndx; - uchar_t exp_id; - - /* - * Check id - */ - exp_id = ASN_UNIVERSAL | ASN_PRIMITIVE | ASN_OBJECT_ID; - if (msg[0] != exp_id) - return (NULL); - - /* - * Read object length - */ - if ((p = asn_parse_length(msg + 1, &asnobj_len)) == NULL) - return (NULL); - - /* - * Check space in input message - */ - hdrlen = p - msg; - if (*varsz_p < (hdrlen + asnobj_len)) - return (NULL); - - /* - * Since the OID subidentifiers are packed in 7-bit blocks with - * MSB set to 1 for all but the last octet, the number of subids - * is simply the number of octets with MSB equal to 0, plus 1 - * (since the first two subids were packed into one subid and have - * to be expanded back to two). - */ - *n_subids = 1; - for (i = 0; i < asnobj_len; i++) { - if ((p[i] & ASN_BIT8) == 0) - (*n_subids)++; - } - - /* - * Now allocate for the oid and parse the OID into it - */ - if ((objid = (oid *) calloc(1, (*n_subids) * sizeof (oid))) == NULL) - return (NULL); - - ndx = 1; /* start from 1 to allow for unpacking later */ - subid = 0; - for (i = 0; i < asnobj_len; i++) { - subid = subid << 7; - subid |= (p[i] & ~ASN_BIT8); - - if ((p[i] & ASN_BIT8) == 0) { - objid[ndx] = subid; - ndx++; - subid = 0; - } - } - - /* - * Now unpack the first two subids from the subid at index 1. - */ - if (objid[1] < 40) { - objid[0] = 0; - } else if (objid[1] < 80) { - objid[0] = 1; - objid[1] -= 40; - } else { - objid[0] = 2; - objid[1] -= 80; - } - - *objid_p = objid; - *varsz_p -= (hdrlen + asnobj_len); - - return (msg + hdrlen + asnobj_len); -} -/* - * Parses the value of an OID object out of the input message buffer. - * Only type tags less than ASN_EXT_TAG (0x1f) are supported. - */ -uchar_t * -asn_parse_objval(uchar_t *msg, size_t *varsz_p, void *varlistp) -{ - pdu_varlist_t *vp = varlistp; - uchar_t *p; - size_t n_subids; - size_t hdrlen, asnobj_len; - - vp->type = msg[0] & ASN_EXT_TAG; - if (vp->type == ASN_EXT_TAG) - return (NULL); - - /* - * Currently we handle ASN_INTEGER, ASN_OCTET_STR, ASN_BIT_STR - * and ASN_TIMETICKS types. - */ - switch (msg[0]) { - case ASN_UNIVERSAL | ASN_PRIMITIVE | ASN_INTEGER: - vp->val.iptr = (int *)calloc(1, sizeof (int)); - if (vp->val.iptr == NULL) - return (NULL); - - if ((p = asn_parse_int(msg, varsz_p, vp->val.iptr)) == NULL) { - free(vp->val.iptr); - return (NULL); - } - vp->val_len = sizeof (int); - break; - - case ASN_COUNTER: - case ASN_TIMETICKS: - vp->val.uiptr = (uint_t *)calloc(1, sizeof (uint_t)); - if (vp->val.uiptr == NULL) - return (NULL); - - if ((p = asn_parse_uint(msg, varsz_p, vp->val.uiptr)) == NULL) { - free(vp->val.uiptr); - return (NULL); - } - vp->val_len = sizeof (uint_t); - vp->type = msg[0]; - break; - - case ASN_UNIVERSAL | ASN_PRIMITIVE | ASN_OCTET_STR: - case ASN_UNIVERSAL | ASN_PRIMITIVE | ASN_BIT_STR: - p = asn_parse_string(msg, varsz_p, &vp->val.str, &vp->val_len); - if (p == NULL) - return (NULL); - break; - - case ASN_UNIVERSAL | ASN_PRIMITIVE | ASN_OBJECT_ID: - p = asn_parse_objid(msg, varsz_p, &vp->val.objid, &n_subids); - if (p == NULL) - return (NULL); - vp->val_len = n_subids * sizeof (oid); - break; - - case ASN_UNIVERSAL | ASN_PRIMITIVE | ASN_NULL: - case SNMP_NOSUCHOBJECT: - case SNMP_NOSUCHINSTANCE: - case SNMP_ENDOFMIBVIEW: - default: - p = asn_parse_length(msg + 1, &asnobj_len); - if (p == NULL) - return (NULL); - - hdrlen = p - msg; - if (*varsz_p < (hdrlen + asnobj_len)) - return (NULL); - - vp->type = msg[0]; - vp->val_len = asnobj_len; - - *varsz_p -= (hdrlen + asnobj_len); - p += asnobj_len; - break; - } - - return (p); -} diff --git a/usr/src/cmd/picl/plugins/sun4v/lib/snmp/asn1.h b/usr/src/cmd/picl/plugins/sun4v/lib/snmp/asn1.h deleted file mode 100644 index 22c8169fbb..0000000000 --- a/usr/src/cmd/picl/plugins/sun4v/lib/snmp/asn1.h +++ /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 (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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 _ASN1_H -#define _ASN1_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * ASN.1 values are encoded as octet strings based on the use of a - * Type-Length-Value (TLV) structure. The Type indicates the ASN.1 - * type, the class of the type, and whether the encoding is primitive - * or constructed. The Length indicates the length of the actual value - * representation and the Value represents the value as a string - * of octets. - * - * +------------+--------+----------+ - * | Identifier | Length | Contents | - * +------------+--------+----------+ - * - * The encoding of the Identifier field is shown below (for tags less than 31): - * - * +-------+-----+------------+ - * | Class | P/C | Tag number | - * +-------+-----+------------+ - * Bit 7 6 5 4 3 2 1 0 - * - * The class field specifies one of four classes, the P/C bit specifies - * whether this is a primitive/constructed encoding and the tag number - * distinguishes one data type from another within the class. - */ - -/* - * Identifier classes - */ -#define ASN_UNIVERSAL ((uchar_t)0x00) -#define ASN_APPLICATION ((uchar_t)0x40) -#define ASN_CONTEXT ((uchar_t)0x80) -#define ASN_PRIVATE ((uchar_t)0xc0) - -/* - * Encoding type - */ -#define ASN_PRIMITIVE ((uchar_t)0x00) -#define ASN_CONSTRUCTOR ((uchar_t)0x20) - -/* - * Tag numbers for the Universal class of ASN.1 values - */ -#define ASN_BOOLEAN ((uchar_t)0x01) -#define ASN_INTEGER ((uchar_t)0x02) -#define ASN_BIT_STR ((uchar_t)0x03) -#define ASN_OCTET_STR ((uchar_t)0x04) -#define ASN_NULL ((uchar_t)0x05) -#define ASN_OBJECT_ID ((uchar_t)0x06) -#define ASN_SEQUENCE ((uchar_t)0x10) -#define ASN_SET ((uchar_t)0x11) - -/* - * ASN Extension Tag in the identifier - */ -#define ASN_EXT_TAG ((uchar_t)0x1f) - -/* - * Application class ASN.1 identifiers - */ -#define ASN_COUNTER (ASN_APPLICATION | ASN_PRIMITIVE | (uchar_t)0x01) -#define ASN_TIMETICKS (ASN_APPLICATION | ASN_PRIMITIVE | (uchar_t)0x03) - -/* - * The Length field in the TLV structure described above is represented - * in many ways depending on the value. - * - * If the length is less than 128, the length field consists of a - * single octet beginning with a zero. - * - * +---+-----------+ - * | 0 | Length(L) | - * +---+-----------+ - * - * If the length is greater than 127, the first octet of the length field - * contains a seven-bit integer that specifies the number of additional - * length octets and the additional octets specify the actual length. - * - * <-- one octet --><----- K octets -----> - * +---------------+---------------------+ - * | 1 | K | Length(L) | - * +---------------+---------------------+ - * - */ -#define ASN_LONG_LEN ((uchar_t)0x80) -#define ASN_BIT8 ((uchar_t)0x80) - -/* - * Some parts of the code assumes a few things -- big-endian ordering, - * sizeof int, etc. to simplify things. - */ -#define BUILD_INT_SHIFT 23 -#define BUILD_INT_MASK 0x1ff - -/* - * Exported ASN.1 encoding related interfaces (only exported within - * snmplib, we need to do ld versioning to limit the scope of these to - * within snmplib). - */ -uchar_t *asn_build_sequence(uchar_t *, size_t *, uchar_t, size_t); -uchar_t *asn_build_header(uchar_t *, size_t *, uchar_t, size_t); -uchar_t *asn_build_length(uchar_t *, size_t *, size_t); -uchar_t *asn_build_int(uchar_t *, size_t *, uchar_t, int); -uchar_t *asn_build_string(uchar_t *, size_t *, uchar_t, uchar_t *, size_t); -uchar_t *asn_build_objid(uchar_t *, size_t *, uchar_t, void *, size_t); -uchar_t *asn_build_null(uchar_t *, size_t *, uchar_t); - -uchar_t *asn_parse_sequence(uchar_t *, size_t *, uchar_t); -uchar_t *asn_parse_header(uchar_t *, size_t *, uchar_t *); -uchar_t *asn_parse_length(uchar_t *, size_t *); -uchar_t *asn_parse_int(uchar_t *, size_t *, int *); -uchar_t *asn_parse_uint(uchar_t *, size_t *, uint_t *); -uchar_t *asn_parse_string(uchar_t *, size_t *, uchar_t **, size_t *); -uchar_t *asn_parse_objid(uchar_t *, size_t *, void *, size_t *); -uchar_t *asn_parse_objval(uchar_t *, size_t *, void *); - -#ifdef __cplusplus -} -#endif - -#endif /* _ASN1_H */ diff --git a/usr/src/cmd/picl/plugins/sun4v/lib/snmp/debug.c b/usr/src/cmd/picl/plugins/sun4v/lib/snmp/debug.c deleted file mode 100644 index 3a52599a63..0000000000 --- a/usr/src/cmd/picl/plugins/sun4v/lib/snmp/debug.c +++ /dev/null @@ -1,616 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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" - -#ifdef SNMP_DEBUG - -/* - * Debug routines - */ - -#include -#include -#include -#include -#include -#include -#include -#include "asn1.h" -#include "pdu.h" -#include "snmplib.h" -#include "debug.h" - -/* - * Buffer and line limits - */ -#define SNMP_DBLOCK_SZ 4096 -#define SNMP_DMAX_LINE 80 -#define SNMP_NCHARS_IN_A_ROW 16 - -/* - * Debug flags - */ -#define SNMP_DEBUG_CMD 0x01 -#define SNMP_DEBUG_VAR 0x02 -#define SNMP_DEBUG_PDU 0x04 -#define SNMP_DEBUG_ASN 0x08 -#define SNMP_DEBUG_PKT 0x10 -#define SNMP_DEBUG_IO 0x20 - -#define SNMP_DEBUG_DEFAULT 0x15 /* cmd, pdu, pkt */ -#define SNMP_DEBUG_EXTENDED 0x35 /* cmd, pdu, pkt, io */ -#define SNMP_DEBUG_ALL 0x3f - -/* - * Formatting aids - */ -#define SNMP_DCMD_INDENT 2 -#define SNMP_DVAR_INDENT 4 -#define SNMP_DPDU_INDENT 6 -#define SNMP_DASN_INDENT 8 -#define SNMP_DPKT_INDENT 10 -#define SNMP_DIO_INDENT 12 - -#define SNMP_DHDR_PREFIX (const char *)" ___ " -#define SNMP_DHDR_SUFFIX (const char *)" ___" -#define SNMP_DTEXT_PREFIX (const char *)"| " - -/* - * All debug vars are protected by a single lock - */ -static mutex_t snmp_dbuf_lock; /* debug lock */ -static uint16_t snmp_debug_flag = SNMP_DEBUG_EXTENDED; /* debug flags */ -static char *snmp_dbuf = NULL; /* the debug buffer */ -static char *snmp_dbuf_curp = NULL; /* current dbuf index */ -static char *snmp_dbuf_tail = NULL; /* current dbuf tail */ -static int snmp_dbuf_sz = 0; /* current dbuf size */ -static int snmp_dbuf_overflow = 0; /* no more memory */ -static char snmp_lbuf[SNMP_DMAX_LINE]; /* scratch space */ - -/* - * Key-to-string - */ -typedef struct { - int key; - char *str; -} snmp_key_to_str_t; - -static snmp_key_to_str_t snmp_cmds[] = { - { SNMP_MSG_GET, "SNMP_MSG_GET" }, - { SNMP_MSG_GETNEXT, "SNMP_MSG_GETNEXT" }, - { SNMP_MSG_RESPONSE, "SNMP_MSG_RESPONSE" }, - { SNMP_MSG_SET, "SNMP_MSG_SET" }, - { SNMP_MSG_TRAP, "SNMP_MSG_TRAP" }, - { SNMP_MSG_GETBULK, "SNMP_MSG_GETBULK" }, - { SNMP_MSG_INFORM, "SNMP_MSG_INFORM" }, - { SNMP_MSG_TRAP2, "SNMP_MSG_TRAP2" }, - { SNMP_MSG_REPORT, "SNMP_MSG_REPORT" } -}; - -static snmp_key_to_str_t snmp_vartypes[] = { - { ASN_BOOLEAN, "ASN_BOOLEAN" }, - { ASN_INTEGER, "ASN_INTEGER" }, - { ASN_BIT_STR, "ASN_BIT_STR" }, - { ASN_OCTET_STR, "ASN_OCTET_STR" }, - { ASN_NULL, "ASN_NULL" }, - { ASN_OBJECT_ID, "ASN_OBJECT_ID" }, - { ASN_SEQUENCE, "ASN_SEQUENCE" } -}; - -static snmp_key_to_str_t snmp_asnencodings[] = { - { SNMP_DASN_SEQUENCE, "ASN SEQUENCE" }, - { SNMP_DASN_LENGTH, "ASN LENGTH" }, - { SNMP_DASN_INT, "ASN INT" }, - { SNMP_DASN_OCTET_STR, "ASN OCTET STR" }, - { SNMP_DASN_OID, "ASN OBJECT ID" }, - { SNMP_DASN_NULL, "ASN NULL" } -}; - -static char *debug_tags[] = { - "SNMP Command Request", - "Null Var", - "Response Var", - "Request PDU", - "Response PDU", - "Request Packet", - "Response Packet", - "WRITE", - "IOCTL", - "READ", - "SENDTO", - "RECVFROM" -}; -static const int n_tags = sizeof (debug_tags) / sizeof (char *); - -/* - * Helpers - */ -static char *snmp_cmdstr_lookup(int cmd); -static char *snmp_vtypestr_lookup(int vtype); -static char *snmp_asnencoding_lookup(int asnkey); -static void snmp_get_dumpchars(uchar_t *abuf, uchar_t *p, int nchars); -static void snmp_log_append(char *bufp); -static void snmp_dbuf_realloc(void); - -void -snmp_debug_init(void) -{ - (void) mutex_init(&snmp_dbuf_lock, USYNC_THREAD, NULL); - - (void) mutex_lock(&snmp_dbuf_lock); - snmp_dbuf_realloc(); - if (snmp_dbuf == NULL) - snmp_debug_flag = 0; /* really tragic */ - (void) mutex_unlock(&snmp_dbuf_lock); -} - -void -snmp_log_cmd(uint_t tag, int cmd, int n_oids, char *oidstr, int row) -{ - char *cmdstr; - int i; - - if (oidstr == NULL) - return; - - (void) mutex_lock(&snmp_dbuf_lock); - - if ((snmp_debug_flag & SNMP_DEBUG_CMD) == 0) { - (void) mutex_unlock(&snmp_dbuf_lock); - return; - } - - snmp_log_append("\n"); - - if (tag < n_tags) { - (void) snprintf(snmp_lbuf, SNMP_DMAX_LINE, "%*c%s%s%s\n", - SNMP_DCMD_INDENT, ' ', SNMP_DHDR_PREFIX, - debug_tags[tag], SNMP_DHDR_SUFFIX); - snmp_log_append(snmp_lbuf); - } - - if ((cmdstr = snmp_cmdstr_lookup(cmd)) == NULL) { - (void) snprintf(snmp_lbuf, SNMP_DMAX_LINE, "%*c%sCMD=%#x\n", - SNMP_DCMD_INDENT, ' ', SNMP_DTEXT_PREFIX, cmd); - } else { - (void) snprintf(snmp_lbuf, SNMP_DMAX_LINE, "%*c%s%s\n", - SNMP_DCMD_INDENT, ' ', SNMP_DTEXT_PREFIX, cmdstr); - } - snmp_log_append(snmp_lbuf); - - for (i = 0; i < n_oids; i++) { - (void) snprintf(snmp_lbuf, SNMP_DMAX_LINE, "%*c%s %s.%d\n", - SNMP_DCMD_INDENT, ' ', SNMP_DTEXT_PREFIX, - oidstr, row); - snmp_log_append(snmp_lbuf); - - oidstr += strlen(oidstr) + 1; - } - - (void) mutex_unlock(&snmp_dbuf_lock); -} - -void -snmp_log_var(uint_t tag, pdu_varlist_t *vp) -{ - char *vts; - - if (vp == NULL) - return; - - (void) mutex_lock(&snmp_dbuf_lock); - - if ((snmp_debug_flag & SNMP_DEBUG_VAR) == 0) { - (void) mutex_unlock(&snmp_dbuf_lock); - return; - } - - snmp_log_append("\n"); - - if (tag < n_tags) { - (void) snprintf(snmp_lbuf, SNMP_DMAX_LINE, "%*c%s%s%s\n", - SNMP_DVAR_INDENT, ' ', SNMP_DHDR_PREFIX, - debug_tags[tag], SNMP_DHDR_SUFFIX); - snmp_log_append(snmp_lbuf); - } - - (void) snprintf(snmp_lbuf, SNMP_DMAX_LINE, "%*c%snextvar = %#x\n", - SNMP_DVAR_INDENT, ' ', SNMP_DTEXT_PREFIX, vp->nextvar); - snmp_log_append(snmp_lbuf); - - (void) snprintf(snmp_lbuf, SNMP_DMAX_LINE, "%*c%sname = %#x\n", - SNMP_DVAR_INDENT, ' ', SNMP_DTEXT_PREFIX, vp->name); - snmp_log_append(snmp_lbuf); - - (void) snprintf(snmp_lbuf, SNMP_DMAX_LINE, "%*c%sname_len = %u\n", - SNMP_DVAR_INDENT, ' ', SNMP_DTEXT_PREFIX, vp->name_len); - snmp_log_append(snmp_lbuf); - - (void) snprintf(snmp_lbuf, SNMP_DMAX_LINE, "%*c%sval.ptr = %#x\n", - SNMP_DVAR_INDENT, ' ', SNMP_DTEXT_PREFIX, vp->val.str); - snmp_log_append(snmp_lbuf); - - (void) snprintf(snmp_lbuf, SNMP_DMAX_LINE, "%*c%sval_len = %u\n", - SNMP_DVAR_INDENT, ' ', SNMP_DTEXT_PREFIX, vp->val_len); - snmp_log_append(snmp_lbuf); - - if ((vts = snmp_vtypestr_lookup(vp->type)) == NULL) { - (void) snprintf(snmp_lbuf, SNMP_DMAX_LINE, "%*c%stype = %#x\n", - SNMP_DVAR_INDENT, ' ', SNMP_DTEXT_PREFIX, vp->type); - } else { - (void) snprintf(snmp_lbuf, SNMP_DMAX_LINE, "%*c%stype = %s\n", - SNMP_DVAR_INDENT, ' ', SNMP_DTEXT_PREFIX, vts); - } - snmp_log_append(snmp_lbuf); - - (void) mutex_unlock(&snmp_dbuf_lock); -} - -void -snmp_log_pdu(uint_t tag, snmp_pdu_t *pdu) -{ - char *cmdstr; - - if (pdu == NULL) - return; - - (void) mutex_lock(&snmp_dbuf_lock); - - if ((snmp_debug_flag & SNMP_DEBUG_PDU) == 0) { - (void) mutex_unlock(&snmp_dbuf_lock); - return; - } - - snmp_log_append("\n"); - - if (tag < n_tags) { - (void) snprintf(snmp_lbuf, SNMP_DMAX_LINE, "%*c%s%s%s\n", - SNMP_DPDU_INDENT, ' ', SNMP_DHDR_PREFIX, - debug_tags[tag], SNMP_DHDR_SUFFIX); - snmp_log_append(snmp_lbuf); - } - - (void) snprintf(snmp_lbuf, SNMP_DMAX_LINE, "%*c%sversion = %d\n", - SNMP_DPDU_INDENT, ' ', SNMP_DTEXT_PREFIX, pdu->version); - snmp_log_append(snmp_lbuf); - - if (pdu->community) { - (void) snprintf(snmp_lbuf, SNMP_DMAX_LINE, - "%*c%scommunity = %s\n", SNMP_DPDU_INDENT, ' ', - SNMP_DTEXT_PREFIX, pdu->community); - } else { - (void) snprintf(snmp_lbuf, SNMP_DMAX_LINE, - "%*c%scommunity = %#x\n", SNMP_DPDU_INDENT, ' ', - SNMP_DTEXT_PREFIX, pdu->community); - } - snmp_log_append(snmp_lbuf); - - (void) snprintf(snmp_lbuf, SNMP_DMAX_LINE, "%*c%scommunity_len = %u\n", - SNMP_DPDU_INDENT, ' ', SNMP_DTEXT_PREFIX, pdu->community_len); - snmp_log_append(snmp_lbuf); - - if ((cmdstr = snmp_cmdstr_lookup(pdu->command)) == NULL) { - (void) snprintf(snmp_lbuf, SNMP_DMAX_LINE, - "%*c%scommand = %#x\n", SNMP_DPDU_INDENT, ' ', - SNMP_DTEXT_PREFIX, pdu->command); - } else { - (void) snprintf(snmp_lbuf, SNMP_DMAX_LINE, - "%*c%scommand = %s\n", SNMP_DPDU_INDENT, ' ', - SNMP_DTEXT_PREFIX, cmdstr); - } - snmp_log_append(snmp_lbuf); - - (void) snprintf(snmp_lbuf, SNMP_DMAX_LINE, "%*c%sreqid = %d\n", - SNMP_DPDU_INDENT, ' ', SNMP_DTEXT_PREFIX, pdu->reqid); - snmp_log_append(snmp_lbuf); - - (void) snprintf(snmp_lbuf, SNMP_DMAX_LINE, - "%*c%serrstat = %#x (non-repeaters)\n", SNMP_DPDU_INDENT, ' ', - SNMP_DTEXT_PREFIX, pdu->errstat); - snmp_log_append(snmp_lbuf); - - (void) snprintf(snmp_lbuf, SNMP_DMAX_LINE, - "%*c%serrindex = %u (max-reps)\n", SNMP_DPDU_INDENT, ' ', - SNMP_DTEXT_PREFIX, pdu->errindex); - snmp_log_append(snmp_lbuf); - - (void) snprintf(snmp_lbuf, SNMP_DMAX_LINE, "%*c%svars = %#x\n", - SNMP_DPDU_INDENT, ' ', SNMP_DTEXT_PREFIX, pdu->vars); - snmp_log_append(snmp_lbuf); - - (void) snprintf(snmp_lbuf, SNMP_DMAX_LINE, "%*c%sreq_pkt = %#x\n", - SNMP_DPDU_INDENT, ' ', SNMP_DTEXT_PREFIX, pdu->req_pkt); - snmp_log_append(snmp_lbuf); - - (void) snprintf(snmp_lbuf, SNMP_DMAX_LINE, "%*c%sreq_pktsz = %u\n", - SNMP_DPDU_INDENT, ' ', SNMP_DTEXT_PREFIX, pdu->req_pktsz); - snmp_log_append(snmp_lbuf); - - (void) snprintf(snmp_lbuf, SNMP_DMAX_LINE, "%*c%sreply_pkt = %#x\n", - SNMP_DPDU_INDENT, ' ', SNMP_DTEXT_PREFIX, pdu->reply_pkt); - snmp_log_append(snmp_lbuf); - - (void) snprintf(snmp_lbuf, SNMP_DMAX_LINE, "%*c%sreply_pktsz = %u\n", - SNMP_DPDU_INDENT, ' ', SNMP_DTEXT_PREFIX, pdu->reply_pktsz); - snmp_log_append(snmp_lbuf); - - snmp_log_append("\n"); - - (void) mutex_unlock(&snmp_dbuf_lock); -} - -void -snmp_log_asn(int key, uchar_t *pkt, size_t pktsz) -{ - char *p, *asnstr; - int i, len; - size_t nrows, nrem; - - if (pkt == NULL) - return; - - (void) mutex_lock(&snmp_dbuf_lock); - - if ((snmp_debug_flag & SNMP_DEBUG_ASN) == 0) { - (void) mutex_unlock(&snmp_dbuf_lock); - return; - } - - if ((asnstr = snmp_asnencoding_lookup(key)) == NULL) { - (void) snprintf(snmp_lbuf, SNMP_DMAX_LINE, "%*c%sASNKEY=%#x\n", - SNMP_DASN_INDENT, ' ', SNMP_DTEXT_PREFIX, key); - } else { - (void) snprintf(snmp_lbuf, SNMP_DMAX_LINE, "%*c%s%s\n", - SNMP_DASN_INDENT, ' ', SNMP_DTEXT_PREFIX, asnstr); - } - snmp_log_append(snmp_lbuf); - - nrows = pktsz / 16; - for (i = 0; i < nrows; i++) { - (void) snprintf(snmp_lbuf, SNMP_DMAX_LINE, "%*c%s " - "%02x %02x %02x %02x %02x %02x %02x %02x " - "%02x %02x %02x %02x %02x %02x %02x %02x\n", - SNMP_DASN_INDENT, ' ', SNMP_DTEXT_PREFIX, - pkt[0], pkt[1], pkt[2], pkt[3], pkt[4], pkt[5], - pkt[6], pkt[7], pkt[8], pkt[9], pkt[10], pkt[11], - pkt[12], pkt[13], pkt[14], pkt[15]); - - pkt += 16; - snmp_log_append(snmp_lbuf); - } - - (void) snprintf(snmp_lbuf, SNMP_DMAX_LINE, "%*c%s ", - SNMP_DASN_INDENT, ' ', SNMP_DTEXT_PREFIX); - - p = snmp_lbuf + SNMP_DASN_INDENT + strlen(SNMP_DTEXT_PREFIX) + 1; - len = SNMP_DMAX_LINE - SNMP_DASN_INDENT - strlen(SNMP_DTEXT_PREFIX) - 1; - - nrem = pktsz % 16; - for (i = 0; i < nrem; i++) { - (void) snprintf(p, len, " %02x", pkt[i]); - - p += 3; - len -= 3; - } - (void) snprintf(p, len, "\n"); - snmp_log_append(snmp_lbuf); - - (void) mutex_unlock(&snmp_dbuf_lock); -} - -void -snmp_log_pkt(uint_t tag, uchar_t *pkt, size_t pktsz) -{ - uchar_t ascii[SNMP_NCHARS_IN_A_ROW + 1]; - uchar_t *p = pkt; - char *bufp; - int nrows, nrem; - int i, len; - - if (pkt == NULL) - return; - - (void) mutex_lock(&snmp_dbuf_lock); - - if ((snmp_debug_flag & SNMP_DEBUG_PKT) == 0) { - (void) mutex_unlock(&snmp_dbuf_lock); - return; - } - - snmp_log_append("\n"); - - if (tag < n_tags) { - (void) snprintf(snmp_lbuf, SNMP_DMAX_LINE, "%*c%s%s%s\n", - SNMP_DPKT_INDENT, ' ', - SNMP_DHDR_PREFIX, debug_tags[tag], SNMP_DHDR_SUFFIX); - snmp_log_append(snmp_lbuf); - } - - nrows = pktsz / SNMP_NCHARS_IN_A_ROW; - nrem = pktsz % SNMP_NCHARS_IN_A_ROW; - - for (i = 0; i < nrows; i++) { - snmp_get_dumpchars(ascii, p, SNMP_NCHARS_IN_A_ROW); - (void) snprintf(snmp_lbuf, SNMP_DMAX_LINE, "%*c%s" - "%02x %02x %02x %02x %02x %02x %02x %02x " - "%02x %02x %02x %02x %02x %02x %02x %02x " - "%s\n", - SNMP_DPKT_INDENT, ' ', SNMP_DTEXT_PREFIX, - p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7], - p[8], p[9], p[10], p[11], p[12], p[13], p[14], p[15], - ascii); - p += 16; - - snmp_log_append(snmp_lbuf); - } - - (void) snprintf(snmp_lbuf, SNMP_DMAX_LINE, "%*c%s", - SNMP_DPKT_INDENT, ' ', SNMP_DTEXT_PREFIX); - - snmp_get_dumpchars(ascii, p, nrem); - - bufp = snmp_lbuf + SNMP_DPKT_INDENT + strlen(SNMP_DTEXT_PREFIX); - len = SNMP_DMAX_LINE - SNMP_DPKT_INDENT + strlen(SNMP_DTEXT_PREFIX); - for (i = 0; i < 16; i++) { - if (i < nrem) - (void) snprintf(bufp, len, "%02x ", p[i]); - else - (void) snprintf(bufp, len, " "); - - bufp += 3; - len -= 3; - } - (void) snprintf(bufp, len, "%s\n", ascii); - snmp_log_append(snmp_lbuf); - - (void) mutex_unlock(&snmp_dbuf_lock); -} - -void -snmp_log_io(uint_t tag, int a1, uint_t a2, uint_t a3) -{ - (void) mutex_lock(&snmp_dbuf_lock); - - if ((snmp_debug_flag & SNMP_DEBUG_IO) == 0) { - (void) mutex_unlock(&snmp_dbuf_lock); - return; - } - - snmp_log_append("\n"); - - if (tag < n_tags) { - (void) snprintf(snmp_lbuf, SNMP_DMAX_LINE, - "%*c%s%s(%d, %#x, %#x)\n", SNMP_DIO_INDENT, ' ', - SNMP_DTEXT_PREFIX, debug_tags[tag], a1, a2, a3); - } else { - (void) snprintf(snmp_lbuf, SNMP_DMAX_LINE, - "%*c%s%#x(%d, %#x, %#x)\n", SNMP_DIO_INDENT, ' ', - SNMP_DTEXT_PREFIX, tag, a1, a2, a3); - } - - snmp_log_append(snmp_lbuf); - - (void) mutex_unlock(&snmp_dbuf_lock); -} - -static char * -snmp_cmdstr_lookup(int cmd) -{ - int nelem = sizeof (snmp_cmds) / sizeof (snmp_key_to_str_t); - int i; - - for (i = 0; i < nelem; i++) { - if (snmp_cmds[i].key == cmd) - return (snmp_cmds[i].str); - } - - return (NULL); -} - -static char * -snmp_vtypestr_lookup(int vtype) -{ - int nelem = sizeof (snmp_vartypes) / sizeof (snmp_key_to_str_t); - int i; - - for (i = 0; i < nelem; i++) { - if (snmp_vartypes[i].key == vtype) - return (snmp_vartypes[i].str); - } - - return (NULL); -} - -static char * -snmp_asnencoding_lookup(int asnkey) -{ - int nelem = sizeof (snmp_asnencodings) / sizeof (snmp_key_to_str_t); - int i; - - for (i = 0; i < nelem; i++) { - if (snmp_asnencodings[i].key == asnkey) - return (snmp_asnencodings[i].str); - } - - return (NULL); -} - -static void -snmp_get_dumpchars(uchar_t *abuf, uchar_t *p, int nchars) -{ - int i; - - if (nchars > SNMP_NCHARS_IN_A_ROW) - nchars = SNMP_NCHARS_IN_A_ROW; - - abuf[nchars] = 0; - for (i = 0; i < nchars; i++) - abuf[i] = isprint(p[i]) ? p[i] : '.'; -} - -static void -snmp_log_append(char *bufp) -{ - int len; - - len = strlen(bufp); - if ((snmp_dbuf_curp + len) >= snmp_dbuf_tail) - snmp_dbuf_realloc(); - - (void) strcpy(snmp_dbuf_curp, bufp); - - snmp_dbuf_curp += len; -} - -static void -snmp_dbuf_realloc(void) -{ - char *p; - size_t offset = 0; - size_t count; - - count = snmp_dbuf_sz + SNMP_DBLOCK_SZ; - if ((p = (char *)calloc(count, 1)) == NULL) { - snmp_dbuf_overflow++; - snmp_dbuf_curp = snmp_dbuf; - return; - } - - if (snmp_dbuf) { - offset = snmp_dbuf_curp - snmp_dbuf; - (void) memcpy(p, snmp_dbuf, snmp_dbuf_sz); - free(snmp_dbuf); - } - - snmp_dbuf = p; - snmp_dbuf_sz += SNMP_DBLOCK_SZ; - - snmp_dbuf_curp = snmp_dbuf + offset; - snmp_dbuf_tail = snmp_dbuf + snmp_dbuf_sz; -} - -#endif diff --git a/usr/src/cmd/picl/plugins/sun4v/lib/snmp/debug.h b/usr/src/cmd/picl/plugins/sun4v/lib/snmp/debug.h deleted file mode 100644 index bc228a20d2..0000000000 --- a/usr/src/cmd/picl/plugins/sun4v/lib/snmp/debug.h +++ /dev/null @@ -1,144 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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 _DEBUG_H -#define _DEBUG_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef SNMP_DEBUG - -/* - * ASN Debugging keys - */ -#define SNMP_DASN_SEQUENCE 1 -#define SNMP_DASN_LENGTH 2 -#define SNMP_DASN_INT 3 -#define SNMP_DASN_OCTET_STR 4 -#define SNMP_DASN_OID 5 -#define SNMP_DASN_NULL 6 - -/* - * Debug tags - */ -#define TAG_CMD_REQUEST 0 -#define TAG_NULL_VAR 1 -#define TAG_RESPONSE_VAR 2 -#define TAG_REQUEST_PDU 3 -#define TAG_RESPONSE_PDU 4 -#define TAG_REQUEST_PKT 5 -#define TAG_RESPONSE_PKT 6 -#define TAG_WRITE 7 -#define TAG_IOCTL 8 -#define TAG_READ 9 -#define TAG_SENDTO 10 -#define TAG_RECVFROM 11 - -/* - * Debug macros - */ -#define LOGINIT() \ - snmp_debug_init() - -#define LOGGET(tag, prefix, row) \ - snmp_log_cmd(tag, SNMP_MSG_GET, 1, prefix, row) - -#define LOGBULK(tag, n_oids, oidstrs, row) \ - snmp_log_cmd(tag, SNMP_MSG_GETBULK, n_oids, oidstrs, row) - -#define LOGNEXT(tag, prefix, row) \ - snmp_log_cmd(tag, SNMP_MSG_GETNEXT, 1, prefix, row) - -#define LOGVAR(tag, vp) \ - snmp_log_var(tag, vp) - -#define LOGPDU(tag, pdu) \ - snmp_log_pdu(tag, pdu) - -#define LOGASNSEQ(pkt, pktsz) \ - snmp_log_asn(SNMP_DASN_SEQUENCE, pkt, pktsz) - -#define LOGASNLENGTH(pkt, pktsz) \ - snmp_log_asn(SNMP_DASN_LENGTH, pkt, pktsz) - -#define LOGASNINT(pkt, pktsz) \ - snmp_log_asn(SNMP_DASN_INT, pkt, pktsz) - -#define LOGASNOCTSTR(pkt, pktsz) \ - snmp_log_asn(SNMP_DASN_OCTET_STR, pkt, pktsz) - -#define LOGASNOID(pkt, pktsz) \ - snmp_log_asn(SNMP_DASN_OID, pkt, pktsz) - -#define LOGASNNULL(pkt, pktsz) \ - snmp_log_asn(SNMP_DASN_NULL, pkt, pktsz) - -#define LOGPKT(tag, pkt, sz) \ - snmp_log_pkt(tag, pkt, sz) - -#define LOGIO(tag, a1, a2, a3) \ - snmp_log_io(tag, (int)a1, (uint_t)a2, (uint_t)a3) - -/* - * Exported debug interfaces - */ -extern void snmp_debug_init(void); -extern void snmp_log_cmd(uint_t tag, int cmd, int n_oids, - char *oidstr, int row); -extern void snmp_log_var(uint_t tag, pdu_varlist_t *vp); -extern void snmp_log_pdu(uint_t tag, snmp_pdu_t *pdu); -extern void snmp_log_asn(int key, uchar_t *pkt, size_t pktsz); -extern void snmp_log_pkt(uint_t tag, uchar_t *pkt, size_t pktsz); -extern void snmp_log_io(uint_t tag, int a1, uint_t a2, uint_t a3); - -#else /* SNMP_DEBUG */ - -#define LOGINIT() -#define LOGGET(tag, prefix, row) -#define LOGBULK(tag, n_oids, oidstrs, row) -#define LOGNEXT(tag, prefix, row) -#define LOGVAR(tag, vp) -#define LOGPDU(tag, pdu) -#define LOGASNSEQ(pkt, pktsz) -#define LOGASNLENGTH(pkt, pktsz) -#define LOGASNINT(pkt, pktsz) -#define LOGASNOCTSTR(pkt, pktsz) -#define LOGASNOID(pkt, pktsz) -#define LOGASNNULL(pkt, pktsz) -#define LOGPKT(tag, pkt, sz) -#define LOGIO(tag, a1, a2, a3) - -#endif /* SNMP_DEBUG */ - -#ifdef __cplusplus -} -#endif - -#endif /* _DEBUG_H */ diff --git a/usr/src/cmd/picl/plugins/sun4v/lib/snmp/pdu.c b/usr/src/cmd/picl/plugins/sun4v/lib/snmp/pdu.c deleted file mode 100644 index 8683d4946e..0000000000 --- a/usr/src/cmd/picl/plugins/sun4v/lib/snmp/pdu.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 2007 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * SNMP PDU and packet transport related routines - */ - -#include -#include -#include -#include -#include "asn1.h" -#include "pdu.h" -#include "debug.h" - -/* - * Static declarations - */ -static int snmp_add_null_vars(snmp_pdu_t *, char *, int, int); -static oid *snmp_oidstr_to_oid(int, char *, int, size_t *); -static uchar_t *snmp_build_pdu(snmp_pdu_t *, uchar_t *, size_t *); -static uchar_t *snmp_build_variable(uchar_t *, size_t *, oid *, size_t, - uchar_t, void *, size_t); -static uchar_t *snmp_parse_pdu(int, uchar_t *, size_t *, snmp_pdu_t *); -static uchar_t *snmp_parse_variable(uchar_t *, size_t *, pdu_varlist_t *); -static void snmp_free_null_vars(pdu_varlist_t *); - -static uchar_t *snmp_def_community = (uchar_t *)SNMP_DEF_COMMUNITY; - -/* - * Allocates and creates a PDU for the specified SNMP command. Currently - * only SNMP_MSG_GET, SNMP_MSG_GETNEXT and SNMP_MSG_GETBULK are supported - */ -snmp_pdu_t * -snmp_create_pdu(int cmd, int max_reps, char *oidstrs, int n_oids, int row) -{ - snmp_pdu_t *pdu; - - if ((cmd != SNMP_MSG_GET) && (cmd != SNMP_MSG_GETNEXT) && - (cmd != SNMP_MSG_GETBULK)) { - return (NULL); - } - - pdu = (snmp_pdu_t *)calloc(1, sizeof (snmp_pdu_t)); - if (pdu == NULL) - return (NULL); - - if (cmd == SNMP_MSG_GET || cmd == SNMP_MSG_GETNEXT) { - pdu->version = SNMP_VERSION_1; - pdu->errstat = 0; - pdu->errindex = 0; - } else if (cmd == SNMP_MSG_GETBULK) { - pdu->version = SNMP_VERSION_2c; - pdu->non_repeaters = 0; - pdu->max_repetitions = max_reps ? - max_reps : SNMP_DEF_MAX_REPETITIONS; - } - - pdu->command = cmd; - pdu->reqid = snmp_get_reqid(); - pdu->community = snmp_def_community; - pdu->community_len = SNMP_DEF_COMMUNITY_LEN; - - if (snmp_add_null_vars(pdu, oidstrs, n_oids, row) < 0) { - free((void *) pdu); - return (NULL); - } - - pdu->req_pkt = NULL; - pdu->req_pktsz = 0; - pdu->reply_pkt = NULL; - pdu->reply_pktsz = 0; - - return (pdu); -} - -/* - * Builds a complete ASN.1 encoded snmp message packet out of the PDU. - * Currently the maximum request packet is limited to SNMP_DEF_PKTBUF_SZ. - * Since we only send SNMP_MSG_GET, SNMP_MSG_GETNEXT and SNMP_MSG_GETBULK, - * as long as the number of bulk oids are not *too* many, we're safe with - * this limit (the typical packet size of a bulk request of 10 vars is - * around 250 bytes). - */ -int -snmp_make_packet(snmp_pdu_t *pdu) -{ - uchar_t *buf, *p; - uchar_t *msg_seq_end; - uchar_t id; - size_t bufsz = SNMP_DEF_PKTBUF_SZ; - size_t seqlen; - - if ((buf = (uchar_t *)calloc(1, SNMP_DEF_PKTBUF_SZ)) == NULL) - return (-1); - - /* - * Let's start with the ASN sequence tag. Set the length - * to 0 initially and fill it up once the message packetizing - * is complete. - */ - id = ASN_UNIVERSAL | ASN_CONSTRUCTOR | ASN_SEQUENCE; - if ((p = asn_build_sequence(buf, &bufsz, id, 0)) == NULL) { - free((void *) buf); - return (-1); - } - msg_seq_end = p; - - /* - * Store the version - */ - id = ASN_UNIVERSAL | ASN_PRIMITIVE | ASN_INTEGER; - if ((p = asn_build_int(p, &bufsz, id, pdu->version)) == NULL) { - free((void *) buf); - return (-1); - } - - /* - * Store the community string - */ - id = ASN_UNIVERSAL | ASN_PRIMITIVE | ASN_OCTET_STR; - p = asn_build_string(p, &bufsz, id, pdu->community, pdu->community_len); - if (p == NULL) { - free((void *) buf); - return (-1); - } - - /* - * Build the PDU - */ - if ((p = snmp_build_pdu(pdu, p, &bufsz)) == NULL) { - free((void *) buf); - return (-1); - } - - /* - * Complete the message pkt by updating the message sequence length - */ - seqlen = p - msg_seq_end; - id = ASN_UNIVERSAL | ASN_CONSTRUCTOR | ASN_SEQUENCE; - (void) asn_build_sequence(buf, NULL, id, seqlen); - - /* - * Calculate packet size and return - */ - pdu->req_pkt = buf; - pdu->req_pktsz = p - buf; - - return (0); -} - -/* - * Makes a PDU out of a reply packet. The reply message is parsed - * and if the reqid of the incoming packet does not match the reqid - * we're waiting for, an error is returned. The PDU is allocated - * inside this routine and must be freed by the caller once it is no - * longer needed. - */ -snmp_pdu_t * -snmp_parse_reply(int reqid, uchar_t *reply_pkt, size_t reply_pktsz) -{ - snmp_pdu_t *reply_pdu; - uchar_t *p; - size_t msgsz = reply_pktsz; - uchar_t exp_id; - - reply_pdu = (snmp_pdu_t *)calloc(1, sizeof (snmp_pdu_t)); - if (reply_pdu == NULL) - return (NULL); - - /* - * Try to parse the ASN sequence out of the beginning of the reply - * packet. If we don't find a sequence at the beginning, something's - * wrong. - */ - exp_id = ASN_UNIVERSAL | ASN_CONSTRUCTOR | ASN_SEQUENCE; - if ((p = asn_parse_sequence(reply_pkt, &msgsz, exp_id)) == NULL) { - snmp_free_pdu(reply_pdu); - return (NULL); - } - - /* - * Now try to parse the version out of the packet - */ - if ((p = asn_parse_int(p, &msgsz, &reply_pdu->version)) == NULL) { - snmp_free_pdu(reply_pdu); - return (NULL); - } - if ((reply_pdu->version != SNMP_VERSION_1) && - (reply_pdu->version != SNMP_VERSION_2c)) { - snmp_free_pdu(reply_pdu); - return (NULL); - } - - /* - * Parse the community string (space allocated by asn_parse_string) - */ - p = asn_parse_string(p, &msgsz, &reply_pdu->community, - &reply_pdu->community_len); - if (p == NULL) { - snmp_free_pdu(reply_pdu); - return (NULL); - } - - /* - * Parse the PDU part of the message - */ - if ((p = snmp_parse_pdu(reqid, p, &msgsz, reply_pdu)) == NULL) { - snmp_free_pdu(reply_pdu); - return (NULL); - } - - return (reply_pdu); -} - - -/* - * Convert the OID strings into the standard PDU oid form (sequence of - * integer subids) and add them to the PDU's variable list. Note that - * this is used only for preparing the request messages (GET, GETNEXT - * and GETBULK), so the values of the variables are always null. - */ -static int -snmp_add_null_vars(snmp_pdu_t *pdu, char *oidstrs, int n_oids, int row) -{ - pdu_varlist_t *vp, *prev; - pdu_varlist_t *varblock_p = NULL; - char *p; - int i; - - prev = NULL; - p = oidstrs; - for (i = 0; i < n_oids; i++) { - if ((vp = calloc(1, sizeof (pdu_varlist_t))) == NULL) { - snmp_free_null_vars(varblock_p); - return (-1); - } else if (i == 0) { - varblock_p = vp; - } else { - prev->nextvar = vp; - } - - vp->name = snmp_oidstr_to_oid(pdu->command, - p, row, &vp->name_len); - if (vp->name == NULL) { - snmp_free_null_vars(varblock_p); - return (-1); - } - vp->val.str = NULL; - vp->val_len = 0; - vp->type = ASN_NULL; - vp->nextvar = NULL; - - LOGVAR(TAG_NULL_VAR, vp); - - prev = vp; - p += strlen(p) + 1; - } - - /* - * append the varlist to the PDU - */ - if (pdu->vars == NULL) - pdu->vars = varblock_p; - else { - for (vp = pdu->vars; vp->nextvar; vp = vp->nextvar) - ; - vp->nextvar = varblock_p; - } - - return (0); -} - -/* - * Some assumptions are in place here to eliminate unnecessary complexity. - * All OID strings passed are assumed to be in the numeric string form, have - * no leading/trailing '.' or spaces. Since PICL plugin is currently the - * only customer, this is quite reasonable. - */ -static oid * -snmp_oidstr_to_oid(int cmd, char *oidstr, int row, size_t *n_subids) -{ - int i, count; - char *p, *q; - char *oidstr_dup; - oid *objid; - - if ((oidstr == NULL) || (n_subids == NULL)) - return (NULL); - - for (count = 1, p = oidstr; p; count++, p++) { - if ((p = strchr(p, '.')) == NULL) - break; - } - - /* - * Add one more to count for 'row'. Need special processing - * for SNMP_MSG_GETNEXT and SNMP_MSG_GETBULK requests; see - * comment below. - */ - if ((cmd == SNMP_MSG_GET) || (cmd == SNMP_MSG_GETBULK && row > 0) || - (cmd == SNMP_MSG_GETNEXT && row >= 0)) { - count++; - } - - if ((oidstr_dup = strdup(oidstr)) == NULL) - return (NULL); - - objid = (oid *) calloc(count, sizeof (oid)); - if (objid == NULL) { - free((void *) p); - return (NULL); - } - - p = oidstr_dup; - for (i = 0; i < count - 1; i++) { - if (q = strchr(p, '.')) - *q = 0; - objid[i] = (oid) strtoul(p, NULL, 10); - p = q + 1; - } - - /* - * For SNMP_MSG_GET, the leaf subid will simply be the row#. - * - * For SNMP_MSG_GETBULK, if the row# passed is greater than 0, - * we pass 'row-1' as the leaf subid, to include the item that - * is of interest to us. If the row# is less than or equal to 0, - * we will simply ignore it and pass only the prefix part of the - * oidstr. For this case, our count would have been 1 less than - * usual, and we are yet to save the last subid. - * - * For SNMP_MSG_GETNEXT, if the row# passed is less than 0, - * we'll simply ignore it and pass only the prefix part of the - * oidstr. For this case, our count would have been 1 less than - * usual, and we are yet to save the last subid. If the row# - * passed is greater than or equal to 0, we'll simply pass it - * verbatim, as the leaf subid. - */ - switch (cmd) { - case SNMP_MSG_GET: - objid[i] = (oid) row; - break; - - case SNMP_MSG_GETBULK: - if (row > 0) - objid[i] = (oid) (row - 1); - else - objid[i] = (oid) strtoul(p, NULL, 10); - break; - - case SNMP_MSG_GETNEXT: - if (row < 0) - objid[i] = (oid) strtoul(p, NULL, 10); - else - objid[i] = (oid) row; - break; - } - - *n_subids = count; - - free((void *) oidstr_dup); - - return (objid); -} - -/* - * Builds the PDU part of the snmp message packet. - */ -static uchar_t * -snmp_build_pdu(snmp_pdu_t *pdu, uchar_t *buf, size_t *bufsz_p) -{ - uchar_t *p; - uchar_t *pdu_seq_begin, *pdu_seq_end; - uchar_t *varlist_seq_begin, *varlist_seq_end; - uchar_t id; - size_t seqlen; - pdu_varlist_t *vp; - - /* - * Build ASN sequence for the PDU command (length will be - * updated later once the entire command is completely formed) - */ - pdu_seq_begin = buf; - p = asn_build_sequence(buf, bufsz_p, (uchar_t)pdu->command, 0); - if (p == NULL) - return (NULL); - pdu_seq_end = p; - - /* - * Build the request id - */ - id = ASN_UNIVERSAL | ASN_PRIMITIVE | ASN_INTEGER; - if ((p = asn_build_int(p, bufsz_p, id, pdu->reqid)) == NULL) - return (NULL); - - /* - * Build the non-repeaters and max-repetitions for SNMP_MSG_GETBULK - * (same as error status and error index for other message types) - */ - id = ASN_UNIVERSAL | ASN_PRIMITIVE | ASN_INTEGER; - if ((p = asn_build_int(p, bufsz_p, id, pdu->non_repeaters)) == NULL) - return (NULL); - - id = ASN_UNIVERSAL | ASN_PRIMITIVE | ASN_INTEGER; - if ((p = asn_build_int(p, bufsz_p, id, pdu->max_repetitions)) == NULL) - return (NULL); - - /* - * Build ASN sequence for the variables list (update length - * after building the varlist) - */ - varlist_seq_begin = p; - id = ASN_UNIVERSAL | ASN_CONSTRUCTOR | ASN_SEQUENCE; - if ((p = asn_build_sequence(p, bufsz_p, id, 0)) == NULL) - return (NULL); - varlist_seq_end = p; - - /* - * Build the variables list - */ - for (vp = pdu->vars; vp; vp = vp->nextvar) { - p = snmp_build_variable(p, bufsz_p, vp->name, vp->name_len, - vp->type, vp->val.str, vp->val_len); - if (p == NULL) - return (NULL); - } - - /* - * Now update the varlist sequence length - */ - seqlen = p - varlist_seq_end; - id = ASN_UNIVERSAL | ASN_CONSTRUCTOR | ASN_SEQUENCE; - (void) asn_build_sequence(varlist_seq_begin, NULL, id, seqlen); - - /* - * And finally, update the length for the PDU sequence - */ - seqlen = p - pdu_seq_end; - (void) asn_build_sequence(pdu_seq_begin, NULL, (uchar_t)pdu->command, - seqlen); - - return (p); -} - -/* - * Builds an object variable into the snmp message packet. Although the - * code is here to build variables of basic types such as integer, object id - * and strings, the only type of variable we ever send via snmp request - * messages is the ASN_NULL type. - */ -static uchar_t * -snmp_build_variable(uchar_t *buf, size_t *bufsz_p, oid *name, size_t name_len, - uchar_t val_type, void *val, size_t val_len) -{ - uchar_t *p, *varseq_end; - size_t seqlen; - uchar_t id; - - /* - * Each variable binding is in turn defined as a 'SEQUENCE of' by - * the SNMP PDU format, so we'll prepare the sequence and fill up - * the length later. Sigh! - */ - id = ASN_UNIVERSAL | ASN_CONSTRUCTOR | ASN_SEQUENCE; - if ((p = asn_build_sequence(buf, bufsz_p, id, 0)) == NULL) - return (NULL); - varseq_end = p; - - /* - * Build the object id - */ - id = ASN_UNIVERSAL | ASN_PRIMITIVE | ASN_OBJECT_ID; - if ((p = asn_build_objid(p, bufsz_p, id, name, name_len)) == NULL) - return (NULL); - - /* - * Currently we only ever build ASN_NULL vars while sending requests, - * since we support only SNMP_MSG_GET, SNMP_MSG_GETNEXT and - * SNMP_MSG_GETBULK. - */ - id = ASN_UNIVERSAL | ASN_PRIMITIVE | val_type; - switch (val_type) { - case ASN_INTEGER: - p = asn_build_int(p, bufsz_p, id, *((int *)val)); - if (p == NULL) - return (NULL); - break; - - case ASN_OBJECT_ID: - p = asn_build_objid(p, bufsz_p, id, val, - val_len / sizeof (oid)); - if (p == NULL) - return (NULL); - break; - - case ASN_OCTET_STR: - p = asn_build_string(p, bufsz_p, id, (uchar_t *)val, val_len); - if (p == NULL) - return (NULL); - break; - - case ASN_NULL: - if ((p = asn_build_null(p, bufsz_p, id)) == NULL) - return (NULL); - break; - - default: - return (NULL); - } - - /* - * Rebuild the variable sequence length - */ - seqlen = p - varseq_end; - id = ASN_UNIVERSAL | ASN_CONSTRUCTOR | ASN_SEQUENCE; - (void) asn_build_sequence(buf, NULL, id, seqlen); - - return (p); -} - -/* - * Parse the PDU portion of the incoming snmp message into the reply_pdu. - * Space for all structure members are allocated as needed and must be freed - * by the caller when these are no longer needed. - */ -static uchar_t * -snmp_parse_pdu(int reqid, uchar_t *msg, size_t *msgsz_p, snmp_pdu_t *reply_pdu) -{ - uchar_t *p; - uchar_t id, exp_id; - pdu_varlist_t *newvp, *vp = NULL; - - /* - * Parse the PDU header out of the message - */ - if ((p = asn_parse_header(msg, msgsz_p, &id)) == NULL) - return (NULL); - if (id != SNMP_MSG_RESPONSE && id != SNMP_MSG_REPORT) - return (NULL); - reply_pdu->command = (int)id; - - /* - * Parse the request id and verify that this is the response - * we're expecting. - */ - if ((p = asn_parse_int(p, msgsz_p, &reply_pdu->reqid)) == NULL) - return (NULL); - if (reply_pdu->reqid != reqid) - return (NULL); - - /* - * Parse the error-status and error-index values - */ - if ((p = asn_parse_int(p, msgsz_p, &reply_pdu->errstat)) == NULL) - return (NULL); - if ((p = asn_parse_int(p, msgsz_p, &reply_pdu->errindex)) == NULL) - return (NULL); - - /* - * Parse the header for the variables list sequence. - */ - exp_id = ASN_UNIVERSAL | ASN_CONSTRUCTOR | ASN_SEQUENCE; - if ((p = asn_parse_sequence(p, msgsz_p, exp_id)) == NULL) - return (NULL); - - while (((int)*msgsz_p) > 0) { - if ((newvp = calloc(1, sizeof (pdu_varlist_t))) == NULL) - return (NULL); - - if (vp == NULL) - reply_pdu->vars = newvp; - else - vp->nextvar = newvp; - - vp = newvp; - if ((p = snmp_parse_variable(p, msgsz_p, vp)) == NULL) - return (NULL); - - LOGVAR(TAG_RESPONSE_VAR, vp); - } - - return (p); -} - -/* - * Allocate and parse the next variable into the varlist - */ -static uchar_t * -snmp_parse_variable(uchar_t *msg, size_t *msgsz_p, pdu_varlist_t *vp) -{ - uchar_t *p; - uchar_t exp_id; - - /* - * Parse this variable's sequence - */ - exp_id = ASN_UNIVERSAL | ASN_CONSTRUCTOR | ASN_SEQUENCE; - if ((p = asn_parse_sequence(msg, msgsz_p, exp_id)) == NULL) - return (NULL); - - /* - * Parse the variable's object identifier - */ - p = asn_parse_objid(p, msgsz_p, &vp->name, &vp->name_len); - if (p == NULL) - return (NULL); - - /* - * Parse the object's value - */ - if ((p = asn_parse_objval(p, msgsz_p, vp)) == NULL) - return (NULL); - - return (p); -} - -void -snmp_free_pdu(snmp_pdu_t *pdu) -{ - pdu_varlist_t *vp, *nxt; - - if (pdu) { - if ((pdu->community) && (pdu->community != snmp_def_community)) - free((void *) pdu->community); - - for (vp = pdu->vars; vp; vp = nxt) { - nxt = vp->nextvar; - - if (vp->name) - free((void *) vp->name); - if (vp->val.str) - free((void *) vp->val.str); - free((void *) vp); - } - - if (pdu->req_pkt) - free((void *) pdu->req_pkt); - - if (pdu->reply_pkt) - free((void *) pdu->reply_pkt); - - free((void *) pdu); - } -} - -static void -snmp_free_null_vars(pdu_varlist_t *varblock_p) -{ - pdu_varlist_t *vp, *nxt; - - for (vp = varblock_p; vp; vp = nxt) { - nxt = vp->nextvar; - - free(vp->name); - free(vp); - } -} diff --git a/usr/src/cmd/picl/plugins/sun4v/lib/snmp/pdu.h b/usr/src/cmd/picl/plugins/sun4v/lib/snmp/pdu.h deleted file mode 100644 index e0de368bbc..0000000000 --- a/usr/src/cmd/picl/plugins/sun4v/lib/snmp/pdu.h +++ /dev/null @@ -1,159 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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 _PDU_H -#define _PDU_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef uint_t oid; - -/* - * SNMP PDU variable list - */ -typedef struct pdu_varlist { - struct pdu_varlist *nextvar; - oid *name; - size_t name_len; /* number of subids in the name */ - union { - uint_t *uiptr; /* unused except while parsing */ - int *iptr; - uchar_t *str; - oid *objid; - } val; - size_t val_len; /* in bytes even if val is objid */ - uchar_t type; -} pdu_varlist_t; - -/* - * Essential snmp message/PDU fields - */ -typedef struct snmp_pdu { - int version; - uchar_t *community; - size_t community_len; - int command; - int reqid; - int errstat; /* shared with non-repeaters for GETBULK */ - int errindex; /* shared with max-repetitions for GETBULK */ - pdu_varlist_t *vars; - - uchar_t *req_pkt; /* not really part of PDU */ - size_t req_pktsz; /* not really part of PDU */ - uchar_t *reply_pkt; /* not really part of PDU */ - size_t reply_pktsz; /* not really part of PDU */ -} snmp_pdu_t; -#define non_repeaters errstat -#define max_repetitions errindex - -/* - * Supported SNMP versions - */ -#define SNMP_VERSION_1 0 -#define SNMP_VERSION_2c 1 - -/* - * Community strings for supported PDUs - */ -#define SNMP_DEF_COMMUNITY "public" -#define SNMP_DEF_COMMUNITY_LEN 6 - -/* - * PDU types (not all are supported) - */ -#define SNMP_MSG_GET (ASN_CONTEXT | ASN_CONSTRUCTOR | (uchar_t)0x0) -#define SNMP_MSG_GETNEXT (ASN_CONTEXT | ASN_CONSTRUCTOR | (uchar_t)0x1) -#define SNMP_MSG_RESPONSE (ASN_CONTEXT | ASN_CONSTRUCTOR | (uchar_t)0x2) -#define SNMP_MSG_SET (ASN_CONTEXT | ASN_CONSTRUCTOR | (uchar_t)0x3) -#define SNMP_MSG_TRAP (ASN_CONTEXT | ASN_CONSTRUCTOR | (uchar_t)0x4) -#define SNMP_MSG_GETBULK (ASN_CONTEXT | ASN_CONSTRUCTOR | (uchar_t)0x5) -#define SNMP_MSG_INFORM (ASN_CONTEXT | ASN_CONSTRUCTOR | (uchar_t)0x6) -#define SNMP_MSG_TRAP2 (ASN_CONTEXT | ASN_CONSTRUCTOR | (uchar_t)0x7) -#define SNMP_MSG_REPORT (ASN_CONTEXT | ASN_CONSTRUCTOR | (uchar_t)0x8) - -/* - * Exception values (not all are supported) - */ -#define SNMP_NOSUCHOBJECT (ASN_CONTEXT | ASN_PRIMITIVE | (uchar_t)0x0) -#define SNMP_NOSUCHINSTANCE (ASN_CONTEXT | ASN_PRIMITIVE | (uchar_t)0x1) -#define SNMP_ENDOFMIBVIEW (ASN_CONTEXT | ASN_PRIMITIVE | (uchar_t)0x2) - -/* - * Error codes (not all are supported) - */ -#define SNMP_ERR_NOERROR (0) -#define SNMP_ERR_TOOBIG (1) -#define SNMP_ERR_NOSUCHNAME (2) -#define SNMP_ERR_BADVALUE (3) -#define SNMP_ERR_READONLY (4) -#define SNMP_ERR_GENERR (5) -#define SNMP_ERR_NOACCESS (6) -#define SNMP_ERR_WRONGTYPE (7) -#define SNMP_ERR_WRONGLENGTH (8) -#define SNMP_ERR_WRONGENCODING (9) -#define SNMP_ERR_WRONGVALUE (10) -#define SNMP_ERR_NOCREATION (11) -#define SNMP_ERR_INCONSISTENTVALUE (12) -#define SNMP_ERR_RESOURCEUNAVAILABLE (13) -#define SNMP_ERR_COMMITFAILED (14) -#define SNMP_ERR_UNDOFAILED (15) -#define SNMP_ERR_AUTHORIZATIONERROR (16) -#define SNMP_ERR_NOTWRITABLE (17) -#define SNMP_ERR_INCONSISTENTNAME (18) - -/* - * Default values - */ -#define SNMP_DEF_NON_REPEATERS 0 -#define SNMP_DEF_MAX_REPETITIONS 25 -#define SNMP_DEF_PKTBUF_SZ 2048 -#define SNMP_PKTBUF_BLKSZ 1024 -#define SNMP_MAX_ERR 18 -#define MIN_SUBIDS_IN_OID 2 -#define MAX_SUBIDS_IN_OID 128 - -/* - * Exported interfaces used by other parts of snmplib - */ -snmp_pdu_t *snmp_create_pdu(int, int, char *, int, int); -int snmp_make_packet(snmp_pdu_t *); -snmp_pdu_t *snmp_parse_reply(int, uchar_t *, size_t); -void snmp_free_pdu(snmp_pdu_t *); - -/* - * Imported from elsewhere - */ -int snmp_get_reqid(void); - -#ifdef __cplusplus -} -#endif - -#endif /* _PDU_H */ diff --git a/usr/src/cmd/picl/plugins/sun4v/lib/snmp/snmplib.c b/usr/src/cmd/picl/plugins/sun4v/lib/snmp/snmplib.c deleted file mode 100644 index 61c73b94f7..0000000000 --- a/usr/src/cmd/picl/plugins/sun4v/lib/snmp/snmplib.c +++ /dev/null @@ -1,1636 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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. - */ - -/* - * The snmp library helps to prepare the PDUs and communicate with - * the snmp agent on the SP side via the ds_snmp driver. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "libpiclsnmp.h" -#include "snmplib.h" -#include "asn1.h" -#include "pdu.h" -#include "debug.h" - -#pragma init(libpiclsnmp_init) /* need this in .init */ - -/* - * Data from the MIB is fetched based on the hints about object - * groups received from (possibly many threads in) the application. - * However, the fetched data is kept in a common cache for use across - * all threads, so even a GETBULK is issued only when absolutely - * necessary. - * - * Note that locking is not fine grained (there's no locking per row) - * since we don't expect too many MT consumers right away. - * - */ -static mutex_t mibcache_lock; -static nvlist_t **mibcache = NULL; -static uint_t n_mibcache_rows = 0; - -static mutex_t snmp_reqid_lock; -static int snmp_reqid = 1; - -#ifdef SNMP_DEBUG -uint_t snmp_nsends = 0; -uint_t snmp_sentbytes = 0; -uint_t snmp_nrecvs = 0; -uint_t snmp_rcvdbytes = 0; -#endif - -#ifdef USE_SOCKETS -#define SNMP_DEFAULT_PORT 161 -#define SNMP_MAX_RECV_PKTSZ (64 * 1024) -#endif - -/* - * We need a reliably monotonic and stable source of time values to age - * entries in the mibcache toward expiration. The code originally used - * gettimeofday(), but since that is subject to time-of-day changes made by - * the administrator, the values it returns do not satisfy our needs. - * Instead, we use gethrtime(), which is immune to time-of-day changes. - * However, since gethrtime() returns a signed 64-bit value in units of - * nanoseconds and we are using signed 32-bit timestamps, we always divide - * the result by (HRTIME_SCALE * NANOSEC) to scale it down into units of 10 - * seconds. - * - * Note that the scaling factor means that the value of MAX_INCACHE_TIME - * from snmplib.h should also be in units of 10 seconds. - */ -#define GET_SCALED_HRTIME() (int)(gethrtime() / (HRTIME_SCALE * NANOSEC)) - -/* - * The mibcache code originally cached values for 300 seconds after fetching - * data via SNMP. Subsequent reads within that 300 second window would come - * from the cache - which is quite a bit faster than an SNMP query - but the - * first request that came in more than 300 seconds after the previous SNMP - * query would trigger a new SNMP query. This worked well as an - * optimization for frequent queries, but when data was only queried less - * frequently than every 300 seconds (as proved to be the case at multiple - * customer sites), the cache didn't help at all. - * - * To improve the performance of infrequent queries, code was added to the - * library to allow a client (i.e. a thread in the picl plugin) to proactively - * refresh cache entries without waiting for them to expire, thereby ensuring - * that all volatile entries in the cache at any given time are less than 300 - * seconds old. Whenever an SNMP query is generated to retrieve volatile data - * that will be cached, an entry is added in a refresh queue that tracks the - * parameters of the query and the time that it was made. A client can query - * the age of the oldest item in the refresh queue and - at its discretion - can - * then force that query to be repeated in a manner that will update the - * mibcache entry even though it hasn't expired. - */ -typedef struct { - struct picl_snmphdl *smd; - char *oidstrs; - int n_oids; - int row; - int last_fetch_time; /* in scaled hrtime */ -} refreshq_job_t; - -static mutex_t refreshq_lock; -static refreshq_job_t *refreshq = NULL; -static uint_t n_refreshq_slots = 0; /* # of alloc'ed job slots */ -static uint_t n_refreshq_jobs = 0; /* # of unprocessed jobs */ -static uint_t refreshq_next_job = 0; /* oldest unprocessed job */ -static uint_t refreshq_next_slot = 0; /* next available job slot */ - - -/* - * Static function declarations - */ -static void libpiclsnmp_init(void); - -static int lookup_int(char *, int, int *, int); -static int lookup_str(char *, int, char **, int); -static int lookup_bitstr(char *, int, uchar_t **, uint_t *, int); - -static oidgroup_t *locate_oid_group(struct picl_snmphdl *, char *); -static int search_oid_in_group(char *, char *, int); - -static snmp_pdu_t *fetch_single(struct picl_snmphdl *, char *, int, int *); -static snmp_pdu_t *fetch_next(struct picl_snmphdl *, char *, int, int *); -static void fetch_bulk(struct picl_snmphdl *, char *, int, int, int, int *); -static int fetch_single_str(struct picl_snmphdl *, char *, int, - char **, int *); -static int fetch_single_int(struct picl_snmphdl *, char *, int, - int *, int *); -static int fetch_single_bitstr(struct picl_snmphdl *, char *, int, - uchar_t **, uint_t *, int *); - -static int snmp_send_request(struct picl_snmphdl *, snmp_pdu_t *, int *); -static int snmp_recv_reply(struct picl_snmphdl *, snmp_pdu_t *, int *); - -static int mibcache_realloc(int); -static void mibcache_populate(snmp_pdu_t *, int); -static char *oid_to_oidstr(oid *, size_t); - -static int refreshq_realloc(int); -static int refreshq_add_job(struct picl_snmphdl *, char *, int, int); - - -static void -libpiclsnmp_init(void) -{ - (void) mutex_init(&mibcache_lock, USYNC_THREAD, NULL); - if (mibcache_realloc(0) < 0) - (void) mutex_destroy(&mibcache_lock); - - (void) mutex_init(&refreshq_lock, USYNC_THREAD, NULL); - (void) mutex_init(&snmp_reqid_lock, USYNC_THREAD, NULL); - - LOGINIT(); -} - -picl_snmphdl_t -snmp_init() -{ - struct picl_snmphdl *smd; -#ifdef USE_SOCKETS - int sbuf = (1 << 15); /* 16K */ - int rbuf = (1 << 17); /* 64K */ - char *snmp_agent_addr; -#endif - - smd = (struct picl_snmphdl *)calloc(1, sizeof (struct picl_snmphdl)); - if (smd == NULL) - return (NULL); - -#ifdef USE_SOCKETS - if ((snmp_agent_addr = getenv("SNMP_AGENT_IPADDR")) == NULL) - return (NULL); - - if ((smd->fd = socket(PF_INET, SOCK_DGRAM, 0)) < 0) - return (NULL); - - (void) setsockopt(smd->fd, SOL_SOCKET, SO_SNDBUF, &sbuf, sizeof (int)); - (void) setsockopt(smd->fd, SOL_SOCKET, SO_RCVBUF, &rbuf, sizeof (int)); - - memset(&smd->agent_addr, 0, sizeof (struct sockaddr_in)); - smd->agent_addr.sin_family = AF_INET; - smd->agent_addr.sin_port = htons(SNMP_DEFAULT_PORT); - smd->agent_addr.sin_addr.s_addr = inet_addr(snmp_agent_addr); -#else - smd->fd = open(DS_SNMP_DRIVER, O_RDWR); - if (smd->fd < 0) { - free(smd); - return (NULL); - } -#endif - - return ((picl_snmphdl_t)smd); -} - -void -snmp_fini(picl_snmphdl_t hdl) -{ - struct picl_snmphdl *smd = (struct picl_snmphdl *)hdl; - - if (smd) { - if (smd->fd >= 0) { - (void) close(smd->fd); - } - free(smd); - } -} - -int -snmp_reinit(picl_snmphdl_t hdl, int clr_linkreset) -{ - struct picl_snmphdl *smd = (struct picl_snmphdl *)hdl; - nvlist_t *nvl; - int i; - - (void) mutex_lock(&mibcache_lock); - - for (i = 0; i < n_mibcache_rows; i++) { - if ((nvl = mibcache[i]) != NULL) - nvlist_free(nvl); - } - - n_mibcache_rows = 0; - if (mibcache) { - free(mibcache); - mibcache = NULL; - } - - (void) mutex_unlock(&mibcache_lock); - - if (clr_linkreset) { - if (smd == NULL || smd->fd < 0) - return (-1); - else - return (ioctl(smd->fd, DSSNMP_CLRLNKRESET, NULL)); - } - - return (0); -} - -void -snmp_register_group(picl_snmphdl_t hdl, char *oidstrs, int n_oids, int is_vol) -{ - struct picl_snmphdl *smd = (struct picl_snmphdl *)hdl; - oidgroup_t *oidg; - oidgroup_t *curr, *prev; - char *p; - int i, sz; - - /* - * Allocate a new oidgroup_t - */ - oidg = (oidgroup_t *)calloc(1, sizeof (struct oidgroup)); - if (oidg == NULL) - return; - - /* - * Determine how much space is required to register this group - */ - sz = 0; - p = oidstrs; - for (i = 0; i < n_oids; i++) { - sz += strlen(p) + 1; - p = oidstrs + sz; - } - - /* - * Create this oid group - */ - if ((p = (char *)malloc(sz)) == NULL) { - free((void *) oidg); - return; - } - - (void) memcpy(p, oidstrs, sz); - - oidg->next = NULL; - oidg->oidstrs = p; - oidg->n_oids = n_oids; - oidg->is_volatile = is_vol; - - /* - * Link it to the tail of the list of oid groups - */ - for (prev = NULL, curr = smd->group; curr; curr = curr->next) - prev = curr; - - if (prev == NULL) - smd->group = oidg; - else - prev->next = oidg; -} - -/* - * snmp_get_int() takes in an OID and returns the integer value - * of the object referenced in the passed arg. It returns 0 on - * success and -1 on failure. - */ -int -snmp_get_int(picl_snmphdl_t hdl, char *prefix, int row, int *val, - int *snmp_syserr) -{ - struct picl_snmphdl *smd = (struct picl_snmphdl *)hdl; - oidgroup_t *grp; - int ret; - int err = 0; - - if (smd == NULL || prefix == NULL || val == NULL) - return (-1); - - /* - * If this item should not be cached, fetch it directly from - * the agent using fetch_single_xxx() - */ - if ((grp = locate_oid_group(smd, prefix)) == NULL) { - ret = fetch_single_int(smd, prefix, row, val, &err); - - if (snmp_syserr) - *snmp_syserr = err; - - return (ret); - } - - /* - * is it in the cache ? - */ - if (lookup_int(prefix, row, val, grp->is_volatile) == 0) - return (0); - - /* - * fetch it from the agent and populate the cache - */ - fetch_bulk(smd, grp->oidstrs, grp->n_oids, row, grp->is_volatile, &err); - if (snmp_syserr) - *snmp_syserr = err; - - /* - * look it up again and return it - */ - if (lookup_int(prefix, row, val, grp->is_volatile) < 0) - return (-1); - - return (0); -} - -/* - * snmp_get_str() takes in an OID and returns the string value - * of the object referenced in the passed arg. Memory for the string - * is allocated within snmp_get_str() and is expected to be freed by - * the caller when it is no longer needed. The function returns 0 - * on success and -1 on failure. - */ -int -snmp_get_str(picl_snmphdl_t hdl, char *prefix, int row, char **strp, - int *snmp_syserr) -{ - struct picl_snmphdl *smd = (struct picl_snmphdl *)hdl; - oidgroup_t *grp; - char *val; - int ret; - int err = 0; - - if (smd == NULL || prefix == NULL || strp == NULL) - return (-1); - - *strp = NULL; - /* - * Check if this item is cacheable or not. If not, call - * fetch_single_* to get it directly from the agent - */ - if ((grp = locate_oid_group(smd, prefix)) == NULL) { - ret = fetch_single_str(smd, prefix, row, strp, &err); - - if (snmp_syserr) - *snmp_syserr = err; - - return (ret); - } - - /* - * See if it's in the cache already - */ - if (lookup_str(prefix, row, &val, grp->is_volatile) == 0) { - if ((*strp = strdup(val)) == NULL) - return (-1); - else - return (0); - } - - /* - * Fetch it from the agent and populate cache - */ - fetch_bulk(smd, grp->oidstrs, grp->n_oids, row, grp->is_volatile, &err); - if (snmp_syserr) - *snmp_syserr = err; - - /* - * Retry lookup - */ - if (lookup_str(prefix, row, &val, grp->is_volatile) < 0) - return (-1); - - - if ((*strp = strdup(val)) == NULL) - return (-1); - else - return (0); -} - -/* - * snmp_get_bitstr() takes in an OID and returns the bit string value - * of the object referenced in the passed args. Memory for the bitstring - * is allocated within the function and is expected to be freed by - * the caller when it is no longer needed. The function returns 0 - * on success and -1 on failure. - */ -int -snmp_get_bitstr(picl_snmphdl_t hdl, char *prefix, int row, uchar_t **bitstrp, - uint_t *nbytes, int *snmp_syserr) -{ - struct picl_snmphdl *smd = (struct picl_snmphdl *)hdl; - oidgroup_t *grp; - uchar_t *val; - int ret; - int err = 0; - - if (smd == NULL || prefix == NULL || bitstrp == NULL || nbytes == NULL) - return (-1); - - *bitstrp = NULL; - /* - * Check if this item is cacheable or not. If not, call - * fetch_single_* to get it directly from the agent - */ - if ((grp = locate_oid_group(smd, prefix)) == NULL) { - ret = fetch_single_bitstr(smd, prefix, row, bitstrp, - nbytes, &err); - - if (snmp_syserr) - *snmp_syserr = err; - - return (ret); - } - - /* - * See if it's in the cache already - */ - if (lookup_bitstr(prefix, row, &val, nbytes, grp->is_volatile) == 0) { - if ((*bitstrp = (uchar_t *)calloc(*nbytes, 1)) == NULL) - return (-1); - (void) memcpy(*bitstrp, (const void *)val, *nbytes); - return (0); - } - - /* - * Fetch it from the agent and populate cache - */ - fetch_bulk(smd, grp->oidstrs, grp->n_oids, row, grp->is_volatile, &err); - if (snmp_syserr) - *snmp_syserr = err; - - /* - * Retry lookup - */ - if (lookup_bitstr(prefix, row, &val, nbytes, grp->is_volatile) < 0) - return (-1); - - if ((*bitstrp = (uchar_t *)calloc(*nbytes, 1)) == NULL) - return (-1); - (void) memcpy(*bitstrp, (const void *)val, *nbytes); - - return (0); -} - -/* - * snmp_get_nextrow() is similar in operation to SNMP_GETNEXT, but - * only just. In particular, this is only expected to return the next - * valid row number for the same object, not its value. Since we don't - * have any other means, we use this to determine the number of rows - * in the table (and the valid ones). This function returns 0 on success - * and -1 on failure. - */ -int -snmp_get_nextrow(picl_snmphdl_t hdl, char *prefix, int row, int *nextrow, - int *snmp_syserr) -{ - struct picl_snmphdl *smd = (struct picl_snmphdl *)hdl; - snmp_pdu_t *reply_pdu; - pdu_varlist_t *vp; - char *nxt_oidstr; - int err = 0; - - if (smd == NULL || prefix == NULL || nextrow == NULL) { - if (snmp_syserr) - *snmp_syserr = EINVAL; - return (-1); - } - - /* - * The get_nextrow results should *never* go into any cache, - * since these relationships are dynamically discovered each time. - */ - if ((reply_pdu = fetch_next(smd, prefix, row, &err)) == NULL) { - if (snmp_syserr) - *snmp_syserr = err; - return (-1); - } - - /* - * We are not concerned about the "value" of the lexicographically - * next object; we only care about the name of that object and - * its row number (and whether such an object exists or not). - */ - vp = reply_pdu->vars; - - /* - * This indicates that we're at the end of the MIB view. - */ - if (vp == NULL || vp->name == NULL || vp->type == SNMP_NOSUCHOBJECT || - vp->type == SNMP_NOSUCHINSTANCE || vp->type == SNMP_ENDOFMIBVIEW) { - snmp_free_pdu(reply_pdu); - if (snmp_syserr) - *snmp_syserr = ENOSPC; - return (-1); - } - - /* - * need to be able to convert the OID - */ - if ((nxt_oidstr = oid_to_oidstr(vp->name, vp->name_len - 1)) == NULL) { - snmp_free_pdu(reply_pdu); - if (snmp_syserr) - *snmp_syserr = ENOMEM; - return (-1); - } - - /* - * We're on to the next table. - */ - if (strcmp(nxt_oidstr, prefix) != 0) { - free(nxt_oidstr); - snmp_free_pdu(reply_pdu); - if (snmp_syserr) - *snmp_syserr = ENOENT; - return (-1); - } - - /* - * Ok, so we've got an oid that's simply the next valid row of the - * passed on object, return this row number. - */ - *nextrow = (vp->name)[vp->name_len-1]; - - free(nxt_oidstr); - snmp_free_pdu(reply_pdu); - - return (0); -} - -/* - * Request ids for snmp messages to the agent are sequenced here. - */ -int -snmp_get_reqid(void) -{ - int ret; - - (void) mutex_lock(&snmp_reqid_lock); - - ret = snmp_reqid++; - - (void) mutex_unlock(&snmp_reqid_lock); - - return (ret); -} - -static int -lookup_int(char *prefix, int row, int *valp, int is_vol) -{ - int32_t *val_arr; - uint_t nelem; - int now; - int elapsed; - - (void) mutex_lock(&mibcache_lock); - - if (row >= n_mibcache_rows) { - (void) mutex_unlock(&mibcache_lock); - return (-1); - } - - if (mibcache[row] == NULL) { - (void) mutex_unlock(&mibcache_lock); - return (-1); - } - - /* - * If this is a volatile property, we should be searching - * for an integer-timestamp pair - */ - if (is_vol) { - if (nvlist_lookup_int32_array(mibcache[row], prefix, - &val_arr, &nelem) != 0) { - (void) mutex_unlock(&mibcache_lock); - return (-1); - } - if (nelem != 2 || val_arr[1] < 0) { - (void) mutex_unlock(&mibcache_lock); - return (-1); - } - now = GET_SCALED_HRTIME(); - elapsed = now - val_arr[1]; - if (elapsed < 0 || elapsed > MAX_INCACHE_TIME) { - (void) mutex_unlock(&mibcache_lock); - return (-1); - } - - *valp = (int)val_arr[0]; - } else { - if (nvlist_lookup_int32(mibcache[row], prefix, valp) != 0) { - (void) mutex_unlock(&mibcache_lock); - return (-1); - } - } - - (void) mutex_unlock(&mibcache_lock); - - return (0); -} - -static int -lookup_str(char *prefix, int row, char **valp, int is_vol) -{ - char **val_arr; - uint_t nelem; - int now; - int elapsed; - - (void) mutex_lock(&mibcache_lock); - - if (row >= n_mibcache_rows) { - (void) mutex_unlock(&mibcache_lock); - return (-1); - } - - if (mibcache[row] == NULL) { - (void) mutex_unlock(&mibcache_lock); - return (-1); - } - - /* - * If this is a volatile property, we should be searching - * for a string-timestamp pair - */ - if (is_vol) { - if (nvlist_lookup_string_array(mibcache[row], prefix, - &val_arr, &nelem) != 0) { - (void) mutex_unlock(&mibcache_lock); - return (-1); - } - if (nelem != 2 || atoi(val_arr[1]) <= 0) { - (void) mutex_unlock(&mibcache_lock); - return (-1); - } - now = GET_SCALED_HRTIME(); - elapsed = now - atoi(val_arr[1]); - if (elapsed < 0 || elapsed > MAX_INCACHE_TIME) { - (void) mutex_unlock(&mibcache_lock); - return (-1); - } - - *valp = val_arr[0]; - } else { - if (nvlist_lookup_string(mibcache[row], prefix, valp) != 0) { - (void) mutex_unlock(&mibcache_lock); - return (-1); - } - } - - (void) mutex_unlock(&mibcache_lock); - - return (0); -} - -static int -lookup_bitstr(char *prefix, int row, uchar_t **valp, uint_t *nelem, int is_vol) -{ - (void) mutex_lock(&mibcache_lock); - - if (row >= n_mibcache_rows) { - (void) mutex_unlock(&mibcache_lock); - return (-1); - } - - if (mibcache[row] == NULL) { - (void) mutex_unlock(&mibcache_lock); - return (-1); - } - - /* - * We don't support volatile bit string values yet. The nvlist - * functions don't support bitstring arrays like they do charstring - * arrays, so we would need to do things in a convoluted way, - * probably by attaching the timestamp as part of the byte array - * itself. However, the need for volatile bitstrings isn't there - * yet, to justify the effort. - */ - if (is_vol) { - (void) mutex_unlock(&mibcache_lock); - return (-1); - } - - if (nvlist_lookup_byte_array(mibcache[row], prefix, valp, nelem) != 0) { - (void) mutex_unlock(&mibcache_lock); - return (-1); - } - - (void) mutex_unlock(&mibcache_lock); - - return (0); -} - -static int -search_oid_in_group(char *prefix, char *oidstrs, int n_oids) -{ - char *p; - int i; - - p = oidstrs; - for (i = 0; i < n_oids; i++) { - if (strcmp(p, prefix) == 0) - return (0); - - p += strlen(p) + 1; - } - - return (-1); -} - -static oidgroup_t * -locate_oid_group(struct picl_snmphdl *smd, char *prefix) -{ - oidgroup_t *grp; - - if (smd == NULL) - return (NULL); - - if (smd->group == NULL) - return (NULL); - - for (grp = smd->group; grp; grp = grp->next) { - if (search_oid_in_group(prefix, grp->oidstrs, - grp->n_oids) == 0) { - return (grp); - } - } - - return (NULL); -} - -static int -fetch_single_int(struct picl_snmphdl *smd, char *prefix, int row, int *ival, - int *snmp_syserr) -{ - snmp_pdu_t *reply_pdu; - pdu_varlist_t *vp; - - if ((reply_pdu = fetch_single(smd, prefix, row, snmp_syserr)) == NULL) - return (-1); - - /* - * Note that we don't make any distinction between unsigned int - * value and signed int value at this point, since we provide - * only snmp_get_int() at the higher level. While it is possible - * to provide an entirely separate interface such as snmp_get_uint(), - * that's quite unnecessary, because we don't do any interpretation - * of the received value. Besides, the sizes of int and uint are - * the same and the sizes of all pointers are the same (so val.iptr - * would be the same as val.uiptr in pdu_varlist_t). If/when we - * violate any of these assumptions, it will be time to add - * snmp_get_uint(). - */ - vp = reply_pdu->vars; - if (vp == NULL || vp->val.iptr == NULL) { - snmp_free_pdu(reply_pdu); - return (-1); - } - - *ival = *(vp->val.iptr); - - snmp_free_pdu(reply_pdu); - - return (0); -} - -static int -fetch_single_str(struct picl_snmphdl *smd, char *prefix, int row, char **valp, - int *snmp_syserr) -{ - snmp_pdu_t *reply_pdu; - pdu_varlist_t *vp; - - if ((reply_pdu = fetch_single(smd, prefix, row, snmp_syserr)) == NULL) - return (-1); - - vp = reply_pdu->vars; - if (vp == NULL || vp->val.str == NULL) { - snmp_free_pdu(reply_pdu); - return (-1); - } - - *valp = strdup((const char *)(vp->val.str)); - - snmp_free_pdu(reply_pdu); - - return (0); -} - -static int -fetch_single_bitstr(struct picl_snmphdl *smd, char *prefix, int row, - uchar_t **valp, uint_t *nelem, int *snmp_syserr) -{ - snmp_pdu_t *reply_pdu; - pdu_varlist_t *vp; - - if ((reply_pdu = fetch_single(smd, prefix, row, snmp_syserr)) == NULL) - return (-1); - - vp = reply_pdu->vars; - if (vp == NULL || vp->val.str == NULL) { - snmp_free_pdu(reply_pdu); - return (-1); - } - - if ((*valp = (uchar_t *)calloc(vp->val_len, 1)) == NULL) { - snmp_free_pdu(reply_pdu); - return (-1); - } - - *nelem = vp->val_len; - (void) memcpy(*valp, (const void *)(vp->val.str), - (size_t)(vp->val_len)); - - snmp_free_pdu(reply_pdu); - - return (0); -} - -static snmp_pdu_t * -fetch_single(struct picl_snmphdl *smd, char *prefix, int row, int *snmp_syserr) -{ - snmp_pdu_t *pdu, *reply_pdu; - - LOGGET(TAG_CMD_REQUEST, prefix, row); - - if ((pdu = snmp_create_pdu(SNMP_MSG_GET, 0, prefix, 1, row)) == NULL) - return (NULL); - - LOGPDU(TAG_REQUEST_PDU, pdu); - - if (snmp_make_packet(pdu) < 0) { - snmp_free_pdu(pdu); - return (NULL); - } - - LOGPKT(TAG_REQUEST_PKT, pdu->req_pkt, pdu->req_pktsz); - - if (snmp_send_request(smd, pdu, snmp_syserr) < 0) { - snmp_free_pdu(pdu); - return (NULL); - } - - if (snmp_recv_reply(smd, pdu, snmp_syserr) < 0) { - snmp_free_pdu(pdu); - return (NULL); - } - - LOGPKT(TAG_RESPONSE_PKT, pdu->reply_pkt, pdu->reply_pktsz); - - reply_pdu = snmp_parse_reply(pdu->reqid, pdu->reply_pkt, - pdu->reply_pktsz); - - LOGPDU(TAG_RESPONSE_PDU, reply_pdu); - - snmp_free_pdu(pdu); - - return (reply_pdu); -} - -static void -fetch_bulk(struct picl_snmphdl *smd, char *oidstrs, int n_oids, - int row, int is_vol, int *snmp_syserr) -{ - snmp_pdu_t *pdu, *reply_pdu; - int max_reps; - - LOGBULK(TAG_CMD_REQUEST, n_oids, oidstrs, row); - - /* - * If we're fetching volatile properties using BULKGET, don't - * venture to get multiple rows (passing max_reps=0 will make - * snmp_create_pdu() fetch SNMP_DEF_MAX_REPETITIONS rows) - */ - max_reps = is_vol ? 1 : 0; - - pdu = snmp_create_pdu(SNMP_MSG_GETBULK, max_reps, oidstrs, n_oids, row); - if (pdu == NULL) - return; - - LOGPDU(TAG_REQUEST_PDU, pdu); - - /* - * Make an ASN.1 encoded packet from the PDU information - */ - if (snmp_make_packet(pdu) < 0) { - snmp_free_pdu(pdu); - return; - } - - LOGPKT(TAG_REQUEST_PKT, pdu->req_pkt, pdu->req_pktsz); - - /* - * Send the request packet to the agent - */ - if (snmp_send_request(smd, pdu, snmp_syserr) < 0) { - snmp_free_pdu(pdu); - return; - } - - /* - * Receive response from the agent into the reply packet buffer - * in the request PDU - */ - if (snmp_recv_reply(smd, pdu, snmp_syserr) < 0) { - snmp_free_pdu(pdu); - return; - } - - LOGPKT(TAG_RESPONSE_PKT, pdu->reply_pkt, pdu->reply_pktsz); - - /* - * Parse the reply, validate the response and create a - * reply-PDU out of the information. Populate the mibcache - * with the received values. - */ - reply_pdu = snmp_parse_reply(pdu->reqid, pdu->reply_pkt, - pdu->reply_pktsz); - if (reply_pdu) { - LOGPDU(TAG_RESPONSE_PDU, reply_pdu); - - if (reply_pdu->errstat == SNMP_ERR_NOERROR) { - if (is_vol) { - /* Add a job to the cache refresh work queue */ - (void) refreshq_add_job(smd, oidstrs, n_oids, - row); - } - - mibcache_populate(reply_pdu, is_vol); - } - - snmp_free_pdu(reply_pdu); - } - - snmp_free_pdu(pdu); -} - -static snmp_pdu_t * -fetch_next(struct picl_snmphdl *smd, char *prefix, int row, int *snmp_syserr) -{ - snmp_pdu_t *pdu, *reply_pdu; - - LOGNEXT(TAG_CMD_REQUEST, prefix, row); - - pdu = snmp_create_pdu(SNMP_MSG_GETNEXT, 0, prefix, 1, row); - if (pdu == NULL) - return (NULL); - - LOGPDU(TAG_REQUEST_PDU, pdu); - - if (snmp_make_packet(pdu) < 0) { - snmp_free_pdu(pdu); - return (NULL); - } - - LOGPKT(TAG_REQUEST_PKT, pdu->req_pkt, pdu->req_pktsz); - - if (snmp_send_request(smd, pdu, snmp_syserr) < 0) { - snmp_free_pdu(pdu); - return (NULL); - } - - if (snmp_recv_reply(smd, pdu, snmp_syserr) < 0) { - snmp_free_pdu(pdu); - return (NULL); - } - - LOGPKT(TAG_RESPONSE_PKT, pdu->reply_pkt, pdu->reply_pktsz); - - reply_pdu = snmp_parse_reply(pdu->reqid, pdu->reply_pkt, - pdu->reply_pktsz); - - LOGPDU(TAG_RESPONSE_PDU, reply_pdu); - - snmp_free_pdu(pdu); - - return (reply_pdu); -} - -static int -snmp_send_request(struct picl_snmphdl *smd, snmp_pdu_t *pdu, int *snmp_syserr) -{ - extern int errno; -#ifdef USE_SOCKETS - int ret; -#endif - - if (smd->fd < 0) - return (-1); - - if (pdu == NULL || pdu->req_pkt == NULL) - return (-1); - -#ifdef USE_SOCKETS - ret = -1; - while (ret < 0) { - LOGIO(TAG_SENDTO, smd->fd, pdu->req_pkt, pdu->req_pktsz); - - ret = sendto(smd->fd, pdu->req_pkt, pdu->req_pktsz, 0, - (struct sockaddr *)&smd->agent_addr, - sizeof (struct sockaddr)); - if (ret < 0 && errno != EINTR) { - return (-1); - } - } -#else - LOGIO(TAG_WRITE, smd->fd, pdu->req_pkt, pdu->req_pktsz); - - if (write(smd->fd, pdu->req_pkt, pdu->req_pktsz) < 0) { - if (snmp_syserr) - *snmp_syserr = errno; - return (-1); - } -#endif - -#ifdef SNMP_DEBUG - snmp_nsends++; - snmp_sentbytes += pdu->req_pktsz; -#endif - - return (0); -} - -static int -snmp_recv_reply(struct picl_snmphdl *smd, snmp_pdu_t *pdu, int *snmp_syserr) -{ - struct dssnmp_info snmp_info; - size_t pktsz; - uchar_t *pkt; - extern int errno; -#ifdef USE_SOCKETS - struct sockaddr_in from; - int fromlen; - ssize_t msgsz; -#endif - - if (smd->fd < 0 || pdu == NULL) - return (-1); - -#ifdef USE_SOCKETS - if ((pkt = (uchar_t *)calloc(1, SNMP_MAX_RECV_PKTSZ)) == NULL) - return (-1); - - fromlen = sizeof (struct sockaddr_in); - - LOGIO(TAG_RECVFROM, smd->fd, pkt, SNMP_MAX_RECV_PKTSZ); - - msgsz = recvfrom(smd->fd, pkt, SNMP_MAX_RECV_PKTSZ, 0, - (struct sockaddr *)&from, &fromlen); - if (msgsz < 0 || msgsz >= SNMP_MAX_RECV_PKTSZ) { - free(pkt); - return (-1); - } - - pktsz = (size_t)msgsz; -#else - LOGIO(TAG_IOCTL, smd->fd, DSSNMP_GETINFO, &snmp_info); - - /* - * The ioctl will block until we have snmp data available - */ - if (ioctl(smd->fd, DSSNMP_GETINFO, &snmp_info) < 0) { - if (snmp_syserr) - *snmp_syserr = errno; - return (-1); - } - - pktsz = snmp_info.size; - if ((pkt = (uchar_t *)calloc(1, pktsz)) == NULL) - return (-1); - - LOGIO(TAG_READ, smd->fd, pkt, pktsz); - - if (read(smd->fd, pkt, pktsz) < 0) { - free(pkt); - if (snmp_syserr) - *snmp_syserr = errno; - return (-1); - } -#endif - - pdu->reply_pkt = pkt; - pdu->reply_pktsz = pktsz; - -#ifdef SNMP_DEBUG - snmp_nrecvs++; - snmp_rcvdbytes += pktsz; -#endif - - return (0); -} - -static int -mibcache_realloc(int hint) -{ - uint_t count = (uint_t)hint; - nvlist_t **p; - - if (hint < 0) - return (-1); - - (void) mutex_lock(&mibcache_lock); - - if (hint < n_mibcache_rows) { - (void) mutex_unlock(&mibcache_lock); - return (0); - } - - count = ((count >> MIBCACHE_BLK_SHIFT) + 1) << MIBCACHE_BLK_SHIFT; - - p = (nvlist_t **)calloc(count, sizeof (nvlist_t *)); - if (p == NULL) { - (void) mutex_unlock(&mibcache_lock); - return (-1); - } - - if (mibcache) { - (void) memcpy((void *) p, (void *) mibcache, - n_mibcache_rows * sizeof (nvlist_t *)); - free((void *) mibcache); - } - - mibcache = p; - n_mibcache_rows = count; - - (void) mutex_unlock(&mibcache_lock); - - return (0); -} - - -/* - * Scan each variable in the returned PDU's bindings and populate - * the cache appropriately - */ -static void -mibcache_populate(snmp_pdu_t *pdu, int is_vol) -{ - pdu_varlist_t *vp; - int row, ret; - char *oidstr; - int tod; /* in secs */ - char tod_str[MAX_INT_LEN]; - int ival_arr[2]; - char *sval_arr[2]; - - /* - * If we're populating volatile properties, we also store a - * timestamp with each property value. When we lookup, we check the - * current time against this timestamp to determine if we need to - * refetch the value or not (refetch if it has been in for far too - * long). - */ - - if (is_vol) { - tod = GET_SCALED_HRTIME(); - - tod_str[0] = 0; - (void) snprintf(tod_str, MAX_INT_LEN, "%d", tod); - - ival_arr[1] = tod; - sval_arr[1] = (char *)tod_str; - } - - for (vp = pdu->vars; vp; vp = vp->nextvar) { - if (vp->type != ASN_INTEGER && vp->type != ASN_OCTET_STR && - vp->type != ASN_BIT_STR) { - continue; - } - - if (vp->name == NULL || vp->val.str == NULL) - continue; - - row = (vp->name)[vp->name_len-1]; - - (void) mutex_lock(&mibcache_lock); - - if (row >= n_mibcache_rows) { - (void) mutex_unlock(&mibcache_lock); - if (mibcache_realloc(row) < 0) - continue; - (void) mutex_lock(&mibcache_lock); - } - ret = 0; - if (mibcache[row] == NULL) - ret = nvlist_alloc(&mibcache[row], NV_UNIQUE_NAME, 0); - - (void) mutex_unlock(&mibcache_lock); - - if (ret != 0) - continue; - - /* - * Convert the standard OID form into an oid string that - * we can use as the key to lookup. Since we only search - * by the prefix (mibcache is really an array of nvlist_t - * pointers), ignore the leaf subid. - */ - oidstr = oid_to_oidstr(vp->name, vp->name_len - 1); - if (oidstr == NULL) - continue; - - (void) mutex_lock(&mibcache_lock); - - if (vp->type == ASN_INTEGER) { - if (is_vol) { - ival_arr[0] = *(vp->val.iptr); - (void) nvlist_add_int32_array(mibcache[row], - oidstr, ival_arr, 2); - } else { - (void) nvlist_add_int32(mibcache[row], - oidstr, *(vp->val.iptr)); - } - - } else if (vp->type == ASN_OCTET_STR) { - if (is_vol) { - sval_arr[0] = (char *)vp->val.str; - (void) nvlist_add_string_array(mibcache[row], - oidstr, sval_arr, 2); - } else { - (void) nvlist_add_string(mibcache[row], - oidstr, (const char *)(vp->val.str)); - } - } else if (vp->type == ASN_BIT_STR) { - /* - * We don't support yet bit string objects that are - * volatile values. - */ - if (!is_vol) { - (void) nvlist_add_byte_array(mibcache[row], - oidstr, (uchar_t *)(vp->val.str), - (uint_t)vp->val_len); - } - } - (void) mutex_unlock(&mibcache_lock); - - free(oidstr); - } -} - -static char * -oid_to_oidstr(oid *objid, size_t n_subids) -{ - char *oidstr; - char subid_str[MAX_INT_LEN]; - int i, isize; - size_t oidstr_sz; - - /* - * ugly, but for now this will have to do. - */ - oidstr_sz = sizeof (subid_str) * n_subids; - oidstr = calloc(1, oidstr_sz); - - for (i = 0; i < n_subids; i++) { - (void) memset(subid_str, 0, sizeof (subid_str)); - isize = snprintf(subid_str, sizeof (subid_str), "%d", - objid[i]); - if (isize >= sizeof (subid_str)) - return (NULL); - - (void) strlcat(oidstr, subid_str, oidstr_sz); - if (i < (n_subids - 1)) - (void) strlcat(oidstr, ".", oidstr_sz); - } - - return (oidstr); -} - -/* - * Expand the refreshq to hold more cache refresh jobs. Caller must already - * hold refreshq_lock mutex. Every expansion of the refreshq will add - * REFRESH_BLK_SZ job slots, rather than expanding by one slot every time more - * space is needed. - */ -static int -refreshq_realloc(int hint) -{ - uint_t count = (uint_t)hint; - refreshq_job_t *p; - - if (hint < 0) - return (-1); - - if (hint < n_refreshq_slots) { - return (0); - } - - /* Round count up to next multiple of REFRESHQ_BLK_SHIFT */ - count = ((count >> REFRESHQ_BLK_SHIFT) + 1) << REFRESHQ_BLK_SHIFT; - - p = (refreshq_job_t *)calloc(count, sizeof (refreshq_job_t)); - if (p == NULL) { - return (-1); - } - - if (refreshq) { - if (n_refreshq_jobs == 0) { - /* Simple case, nothing to copy */ - refreshq_next_job = 0; - refreshq_next_slot = 0; - } else if (refreshq_next_slot > refreshq_next_job) { - /* Simple case, single copy preserves everything */ - (void) memcpy((void *) p, - (void *) &(refreshq[refreshq_next_job]), - n_refreshq_jobs * sizeof (refreshq_job_t)); - } else { - /* - * Complex case. The jobs in the refresh queue wrap - * around the end of the array in which they are stored. - * To preserve chronological order in the new allocated - * array, we need to copy the jobs at the end of the old - * array to the beginning of the new one and place the - * jobs from the beginning of the old array after them. - */ - uint_t tail_jobs, head_jobs; - - tail_jobs = n_refreshq_slots - refreshq_next_job; - head_jobs = n_refreshq_jobs - tail_jobs; - - /* Copy the jobs from the end of the old array */ - (void) memcpy((void *) p, - (void *) &(refreshq[refreshq_next_job]), - tail_jobs * sizeof (refreshq_job_t)); - - /* Copy the jobs from the beginning of the old array */ - (void) memcpy((void *) &(p[tail_jobs]), - (void *) &(refreshq[0]), - head_jobs * sizeof (refreshq_job_t)); - - /* update the job and slot indices to match */ - refreshq_next_job = 0; - refreshq_next_slot = n_refreshq_jobs; - } - free((void *) refreshq); - } else { - /* First initialization */ - refreshq_next_job = 0; - refreshq_next_slot = 0; - n_refreshq_jobs = 0; - } - - refreshq = p; - n_refreshq_slots = count; - - return (0); -} - -/* - * Add a new job to the refreshq. If there aren't any open slots, attempt to - * expand the queue first. Return -1 if unable to add the job to the work - * queue, or 0 if the job was added OR if an existing job with the same - * parameters is already pending. - */ -static int -refreshq_add_job(struct picl_snmphdl *smd, char *oidstrs, int n_oids, int row) -{ - int i; - int job; - - (void) mutex_lock(&refreshq_lock); - - /* - * Can't do anything without a queue. Either the client never - * initialized the refresh queue or the initial memory allocation - * failed. - */ - if (refreshq == NULL) { - (void) mutex_unlock(&refreshq_lock); - return (-1); - } - - /* - * If there is already a job pending with the same parameters as the job - * we have been asked to add, we apparently let an entry expire and it - * is now being reloaded. Rather than add another job for the same - * entry, we skip adding the new job and let the existing job address - * it. - */ - for (i = 0, job = refreshq_next_job; i < n_refreshq_jobs; i++, - job = (job + 1) % n_refreshq_slots) { - if ((refreshq[job].row == row) && - (refreshq[job].n_oids == n_oids) && - (refreshq[job].oidstrs == oidstrs)) { - (void) mutex_unlock(&refreshq_lock); - return (0); - } - } - - - /* - * If the queue is full, we need to expand it - */ - if (n_refreshq_jobs == n_refreshq_slots) { - if (refreshq_realloc(n_refreshq_slots + 1) < 0) { - /* - * Can't expand the job queue, so we drop this job on - * the floor. No data is lost... we just allow some - * data in the mibcache to expire. - */ - (void) mutex_unlock(&refreshq_lock); - return (-1); - } - } - - /* - * There is room in the queue, so add the new job. We are actually - * taking a timestamp for this job that is slightly earlier than when - * the mibcache entry will be updated, but since we're trying to update - * the mibcache entry before it expires anyway, the earlier timestamp - * here is acceptable. - */ - refreshq[refreshq_next_slot].smd = smd; - refreshq[refreshq_next_slot].oidstrs = oidstrs; - refreshq[refreshq_next_slot].n_oids = n_oids; - refreshq[refreshq_next_slot].row = row; - refreshq[refreshq_next_slot].last_fetch_time = GET_SCALED_HRTIME(); - - /* - * Update queue management variables - */ - n_refreshq_jobs += 1; - refreshq_next_slot = (refreshq_next_slot + 1) % n_refreshq_slots; - - (void) mutex_unlock(&refreshq_lock); - - return (0); -} - -/* - * Almost all of the refresh code remains dormant unless specifically - * initialized by a client (the exception being that fetch_bulk() will still - * call refreshq_add_job(), but the latter will return without doing anything). - */ -int -snmp_refresh_init(void) -{ - int ret; - - (void) mutex_lock(&refreshq_lock); - - ret = refreshq_realloc(0); - - (void) mutex_unlock(&refreshq_lock); - - return (ret); -} - -/* - * If the client is going away, we don't want to keep doing refresh work, so - * clean everything up. - */ -void -snmp_refresh_fini(void) -{ - (void) mutex_lock(&refreshq_lock); - - n_refreshq_jobs = 0; - n_refreshq_slots = 0; - refreshq_next_job = 0; - refreshq_next_slot = 0; - free(refreshq); - refreshq = NULL; - - (void) mutex_unlock(&refreshq_lock); -} - -/* - * Return the number of seconds remaining before the mibcache entry associated - * with the next job in the queue will expire. Note that this requires - * reversing the scaling normally done on hrtime values. (The need for scaling - * is purely internal, and should be hidden from clients.) If there are no jobs - * in the queue, return -1. If the next job has already expired, return 0. - */ -int -snmp_refresh_get_next_expiration(void) -{ - int ret; - int elapsed; - - (void) mutex_lock(&refreshq_lock); - - if (n_refreshq_jobs == 0) { - ret = -1; - } else { - elapsed = GET_SCALED_HRTIME() - - refreshq[refreshq_next_job].last_fetch_time; - - if (elapsed >= MAX_INCACHE_TIME) { - ret = 0; - } else { - ret = (MAX_INCACHE_TIME - elapsed) * HRTIME_SCALE; - } - } - - (void) mutex_unlock(&refreshq_lock); - - return (ret); -} - -/* - * Given the number of seconds the client wants to spend on each cyle of - * processing jobs and then sleeping, return a suggestion for the number of jobs - * the client should process, calculated by dividing the client's cycle duration - * by MAX_INCACHE_TIME and multiplying the result by the total number of jobs in - * the queue. (Note that the actual implementation of that calculation is done - * in a different order to avoid losing fractional values during integer - * arithmetic.) - */ -int -snmp_refresh_get_cycle_hint(int secs) -{ - int jobs; - - (void) mutex_lock(&refreshq_lock); - - /* - * First, we need to scale the client's cycle time to get it into the - * same units we use internally (i.e. tens of seconds). We round up, as - * it makes more sense for the client to process extra jobs than - * insufficient jobs. If the client's desired cycle time is greater - * than MAX_INCACHE_TIME, we just return the current total number of - * jobs. - */ - secs = (secs + HRTIME_SCALE - 1) / HRTIME_SCALE; - - jobs = (n_refreshq_jobs * secs) / MAX_INCACHE_TIME; - if (jobs > n_refreshq_jobs) { - jobs = n_refreshq_jobs; - } - - (void) mutex_unlock(&refreshq_lock); - - return (jobs); -} - -/* - * Process the next job on the refresh queue by invoking fetch_bulk() with the - * recorded parameters. Return -1 if no job was processed (e.g. because there - * aren't any available), or 0 if a job was processed. We don't actually care - * if fetch_bulk() fails, since we're just working on cache entry refreshing and - * the worst case result of failing here is a longer delay getting that data the - * next time it is requested. - */ -int -snmp_refresh_process_job(void) -{ - struct picl_snmphdl *smd; - char *oidstrs; - int n_oids; - int row; - int err; - - (void) mutex_lock(&refreshq_lock); - - if (n_refreshq_jobs == 0) { - (void) mutex_unlock(&refreshq_lock); - - return (-1); - } - - smd = refreshq[refreshq_next_job].smd; - oidstrs = refreshq[refreshq_next_job].oidstrs; - n_oids = refreshq[refreshq_next_job].n_oids; - row = refreshq[refreshq_next_job].row; - - refreshq_next_job = (refreshq_next_job + 1) % n_refreshq_slots; - n_refreshq_jobs--; - - (void) mutex_unlock(&refreshq_lock); - - - /* - * fetch_bulk() is going to come right back into the refresh code to add - * a new job for the entry we just loaded, which means we have to make - * the call without holding the refreshq_lock mutex. - */ - fetch_bulk(smd, oidstrs, n_oids, row, 1, &err); - - return (0); -} diff --git a/usr/src/cmd/picl/plugins/sun4v/lib/snmp/snmplib.h b/usr/src/cmd/picl/plugins/sun4v/lib/snmp/snmplib.h deleted file mode 100644 index cd2a1aa568..0000000000 --- a/usr/src/cmd/picl/plugins/sun4v/lib/snmp/snmplib.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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 _SNMPLIB_H -#define _SNMPLIB_H - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef USE_SOCKETS -#include -#include -#include -#include -#endif - -/* - * Groups of OIDs are registered with the picl snmp library to provide - * the library with a hint as to the set of OIDs to do GETBULK requests - */ -typedef struct oidgroup { - struct oidgroup *next; - char *oidstrs; - int n_oids; - int is_volatile; -} oidgroup_t; - -/* - * Private (opaque to clients) handle to manage per-client snmp data - */ -struct picl_snmphdl { - oidgroup_t *group; -#ifdef USE_SOCKETS - struct sockaddr_in agent_addr; -#endif - int fd; -}; - -#define MIBCACHE_BLK_SZ 256 -#define MIBCACHE_BLK_SHIFT 8 -#define REFRESHQ_BLK_SZ 256 -#define REFRESHQ_BLK_SHIFT 8 - -#define HRTIME_SCALE 10LL /* internal time in 10s of seconds */ -#define MAX_INCACHE_TIME (300 / HRTIME_SCALE) -#define MAX_INT_LEN 16 /* #chars to print */ - -#define DS_SNMP_DRIVER "/devices/pseudo/ds_snmp@0:ds_snmp" - -#ifdef __cplusplus -} -#endif - -#endif /* _SNMPLIB_H */ diff --git a/usr/src/cmd/picl/plugins/sun4v/mdesc/Makefile b/usr/src/cmd/picl/plugins/sun4v/mdesc/Makefile deleted file mode 100644 index 31a01ee15f..0000000000 --- a/usr/src/cmd/picl/plugins/sun4v/mdesc/Makefile +++ /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 2006 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# ident "%Z%%M% %I% %E% SMI" -# -# cmd/picl/plugins/sun4v/mdesc/Makefile -# -LIBRARY= libmdescplugin.a -VERS= .1 - -OBJS_DIR= pics - -OBJECTS= mdescplugin.o init.o dr.o \ - cpu_prop_update.o disk_discovery.o \ - mdesc_findname.o mdesc_findnodeprop.o \ - mdesc_fini.o mdesc_getpropstr.o \ - mdesc_getpropval.o mdesc_init_intern.o \ - mdesc_nodecount.o mdesc_rootnode.o \ - mdesc_scandag.o mdesc_getpropdata.o - -# include library definitions -include $(SRC)/lib/Makefile.lib -include $(SRC)/Makefile.psm - -include $(SRC)/cmd/picl/plugins/Makefile.com - -SRCS= $(OBJECTS:%.o=%.c) - -$(OBJS_DIR)/%.o: $(SRC)/common/mdesc/%.c - $(COMPILE.c) -o $@ $< - $(CTFCONVERT_O) - -LIBS = $(DYNLIB) - -ROOT_PLATFORM = $(USR_PLAT_DIR)/sun4v -DYNFLAGS_PLAT = /usr/platform/\$$PLATFORM/lib/picl/plugins -DYNFLAGS_SUN4V = /usr/platform/sun4v/lib/picl/plugins -DYNFLAGS_COM = /usr/lib/picl/plugins - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CPPFLAGS += -I$(SRC)/common/mdesc -CPPFLAGS += -I$(SRC)/uts/common/sys - -LDLIBS += -L$(SRC)/lib/libpicl/$(MACH) -L$(SRC)/lib/libpicltree/$(MACH) -LDLIBS += -L$(ROOT)/usr/lib/picl/plugins -L$(ROOT)/usr/lib/sparcv9 -DYNFLAGS += -R$(DYNFLAGS_COM) - -LDLIBS += -lc -lpicltree -ldevinfo -lpicldevtree -lcfgadm -lnvpair - - -.KEEP_STATE: - -all: $(LIBS) $(LIBLINKS) - -install: all $(ROOTLIBDIR) $(ROOTLIBS) $(ROOTLINKS) - -$(LIBLINKS): FRC - $(RM) $(LIBLINKS); $(SYMLINK) $(DYNLIB) $(LIBLINKS) - -# include library targets -include $(SRC)/cmd/picl/plugins/Makefile.targ -include $(SRC)/lib/Makefile.targ - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4v/mdesc/cpu_prop_update.c b/usr/src/cmd/picl/plugins/sun4v/mdesc/cpu_prop_update.c deleted file mode 100644 index 08d1453697..0000000000 --- a/usr/src/cmd/picl/plugins/sun4v/mdesc/cpu_prop_update.c +++ /dev/null @@ -1,373 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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 "mdescplugin.h" -#include - -/* These 3 variable are defined and set in mdescplugin.c */ -extern picl_nodehdl_t root_node; -extern md_t *mdp; -extern mde_cookie_t rootnode; - -void -set_prop_info(ptree_propinfo_t *propinfo, int size, char *name, int type) -{ - propinfo->version = PICLD_PLUGIN_VERSION_1; - propinfo->read = NULL; - propinfo->write = NULL; - propinfo->piclinfo.type = type; - propinfo->piclinfo.accessmode = PICL_READ; - propinfo->piclinfo.size = size; - (void) strncpy(propinfo->piclinfo.name, name, - sizeof (propinfo->piclinfo.name)); -} - -static boolean_t -prop_exists(picl_nodehdl_t node, char *name) -{ - int status; - picl_prophdl_t proph; - - status = ptree_get_prop_by_name(node, name, &proph); - if (status == PICL_SUCCESS) - return (B_TRUE); - else - return (B_FALSE); -} - -static void -add_md_prop(picl_nodehdl_t node, int size, char *name, void* value, int type) -{ - ptree_propinfo_t propinfo; - picl_prophdl_t proph; - - if (!prop_exists(node, name)) { - set_prop_info(&propinfo, size, name, type); - - (void) ptree_create_and_add_prop(node, &propinfo, - value, &proph); - } -} -static void -add_tlb_props(picl_nodehdl_t node, mde_cookie_t *tlblistp, int ntlbs) -{ - int i; - uint64_t int_value; - uint8_t *type; - char str[MAXSTRLEN]; - char property[MAXSTRLEN]; - char tlb_str[MAXSTRLEN]; - int type_size, str_size, total_size, type_flag; - - for (i = 0; i < ntlbs; i++) { - if (md_get_prop_data(mdp, tlblistp[i], "type", &type, - &type_size)) { - return; - } - - total_size = type_flag = 0; - - while (total_size < type_size) { - str_size = strlen((char *)type + total_size) + 1; - (void) strncpy(str, (char *)type + total_size, - sizeof (str)); - if (strncmp(str, "instn", sizeof (str)) == 0) - type_flag |= ICACHE_FLAG; - if (strncmp(str, "data", sizeof (str)) == 0) - type_flag |= DCACHE_FLAG; - total_size += str_size; - } - - switch (type_flag) { - case 1: - (void) snprintf(tlb_str, sizeof (tlb_str), - "itlb"); - break; - case 2: - (void) snprintf(tlb_str, sizeof (tlb_str), - "dtlb"); - break; - default: - (void) snprintf(tlb_str, sizeof (tlb_str), - "Not a known cache type"); - } - - if (!(md_get_prop_val(mdp, tlblistp[i], "entries", - &int_value))) { - (void) snprintf(property, sizeof (property), - "%s-entries", tlb_str); - add_md_prop(node, sizeof (int_value), property, - &int_value, PICL_PTYPE_INT); - } - } -} - -static void -add_cache_props(picl_nodehdl_t node, mde_cookie_t *cachelistp, int ncaches) -{ - int i; - uint64_t int_value; - uint8_t *type; - char str[MAXSTRLEN]; - char property[MAXSTRLEN]; - char cache_str[MAXSTRLEN]; - int type_size, str_size, total_size, type_flag; - - for (i = 0; i < ncaches; i++) { - if (md_get_prop_data(mdp, cachelistp[i], "type", &type, - &type_size)) { - return; - } - - if (md_get_prop_val(mdp, cachelistp[i], "level", &int_value)) { - return; - } - - total_size = type_flag = 0; - - while (total_size < type_size) { - str_size = strlen((char *)type + total_size) + 1; - (void) strncpy(str, (char *)type + total_size, - sizeof (str)); - if (strncmp(str, "instn", sizeof (str)) == 0) - type_flag |= ICACHE_FLAG; - if (strncmp(str, "data", sizeof (str)) == 0) - type_flag |= DCACHE_FLAG; - total_size += str_size; - } - - switch (type_flag) { - case 1: - (void) snprintf(cache_str, sizeof (cache_str), - "l%d-icache", (int)int_value); - break; - case 2: - (void) snprintf(cache_str, sizeof (cache_str), - "l%d-dcache", (int)int_value); - break; - case 3: - (void) snprintf(cache_str, sizeof (cache_str), - "l%d-cache", (int)int_value); - break; - default: - (void) snprintf(cache_str, sizeof (cache_str), - "Not a known cache type"); - } - - if (!(md_get_prop_val(mdp, cachelistp[i], "associativity", - &int_value))) { - (void) snprintf(property, sizeof (property), - "%s-associativity", cache_str); - add_md_prop(node, sizeof (int_value), property, - &int_value, PICL_PTYPE_INT); - } - - if (!(md_get_prop_val(mdp, cachelistp[i], "size", - &int_value))) { - (void) snprintf(property, sizeof (property), "%s-size", - cache_str); - add_md_prop(node, sizeof (int_value), property, - &int_value, PICL_PTYPE_INT); - } - - if (!(md_get_prop_val(mdp, cachelistp[i], "line-size", - &int_value))) { - (void) snprintf(property, sizeof (property), - "%s-line-size", cache_str); - add_md_prop(node, sizeof (int_value), property, - &int_value, PICL_PTYPE_INT); - } - } -} - -static void -add_clock_frequency(picl_nodehdl_t pnode, mde_cookie_t mnode) -{ - uint64_t uint64_value; - uint32_t uint32_value; - - if (md_get_prop_val(mdp, mnode, "clock-frequency", - &uint64_value)) { - return; - } - uint32_value = (uint32_t)(uint64_value & UINT32_MAX); - add_md_prop(pnode, sizeof (uint32_value), "clock-frequency", - &uint32_value, PICL_PTYPE_UNSIGNED_INT); -} - -/* - * Return the number of strings in the buffer - */ -static int -get_string_count(char *strdat, int length) -{ - int count; - char *lastnull; - char *nullptr; - - count = 1; - for (lastnull = &strdat[length - 1], nullptr = strchr(strdat, '\0'); - nullptr != lastnull; nullptr = strchr(nullptr + 1, '\0')) - count++; - - return (count); -} - -static void -add_compatible(picl_nodehdl_t pnode, mde_cookie_t mnode) -{ - char *compat; - int len; - int count; - void add_string_list_prop(picl_nodehdl_t, char *, char *, - unsigned int); - - if (prop_exists(pnode, "compatible")) - return; - if (md_get_prop_data(mdp, mnode, "compatible", (uint8_t **)&compat, - &len)) { - return; - } - if (compat[0] == '\0' || compat[len - 1] != '\0') - return; - count = get_string_count(compat, len); - if (count == 1) { - add_md_prop(pnode, len, "compatible", compat, - PICL_PTYPE_CHARSTRING); - return; - } - (void) add_string_list_prop(pnode, "compatible", compat, count); -} - -static void -add_device_type(picl_nodehdl_t pnode) -{ - char *device_type = "cpu"; - - add_md_prop(pnode, strlen(device_type) + 1, "device_type", device_type, - PICL_PTYPE_CHARSTRING); -} - -int -add_cpu_prop(picl_nodehdl_t node, void *args) -{ - mde_cookie_t *cpulistp; - mde_cookie_t *cachelistp; - mde_cookie_t *tlblistp; - int x, num_nodes; - int ncpus, ncaches, ntlbs; - int status; - int reg_prop[SUN4V_CPU_REGSIZE], cpuid; - uint64_t int64_value; - int int_value; - - status = ptree_get_propval_by_name(node, OBP_REG, reg_prop, - sizeof (reg_prop)); - if (status != PICL_SUCCESS) { - return (PICL_WALK_TERMINATE); - } - - cpuid = CFGHDL_TO_CPUID(reg_prop[0]); - - /* - * Allocate space for our searches. - */ - - num_nodes = md_node_count(mdp); - - cpulistp = (mde_cookie_t *) alloca(sizeof (mde_cookie_t) *num_nodes); - if (cpulistp == NULL) { - return (PICL_WALK_TERMINATE); - } - - cachelistp = (mde_cookie_t *) alloca(sizeof (mde_cookie_t) *num_nodes); - if (cachelistp == NULL) { - return (PICL_WALK_TERMINATE); - } - - tlblistp = (mde_cookie_t *) alloca(sizeof (mde_cookie_t) *num_nodes); - if (tlblistp == NULL) { - return (PICL_WALK_TERMINATE); - } - - /* - * Starting at the root node, scan the "fwd" dag for - * all the cpus in this description. - */ - - ncpus = md_scan_dag(mdp, rootnode, md_find_name(mdp, "cpu"), - md_find_name(mdp, "fwd"), cpulistp); - - if (ncpus < 0) { - return (PICL_WALK_TERMINATE); - } - - /* - * Create PD cpus with a few select properties - */ - - for (x = 0; x < ncpus; x++) { - if (md_get_prop_val(mdp, cpulistp[x], "id", &int64_value)) { - continue; - } - - if (int64_value != cpuid) - continue; - - int_value = (int)(int64_value & INT32_MAX); - - add_md_prop(node, sizeof (int_value), OBP_PROP_CPUID, - &int_value, PICL_PTYPE_INT); - - add_md_prop(node, sizeof (int_value), OBP_PROP_PORTID, - &int_value, PICL_PTYPE_INT); - - add_clock_frequency(node, cpulistp[x]); - - add_compatible(node, cpulistp[x]); - - add_device_type(node); - - /* get caches for CPU */ - ncaches = md_scan_dag(mdp, cpulistp[x], - md_find_name(mdp, "cache"), - md_find_name(mdp, "fwd"), - cachelistp); - - add_cache_props(node, cachelistp, ncaches); - - /* get tlbs for CPU */ - ntlbs = md_scan_dag(mdp, cpulistp[x], - md_find_name(mdp, "tlb"), - md_find_name(mdp, "fwd"), - tlblistp); - - add_tlb_props(node, tlblistp, ntlbs); - } - - return (PICL_WALK_CONTINUE); -} diff --git a/usr/src/cmd/picl/plugins/sun4v/mdesc/disk_discovery.c b/usr/src/cmd/picl/plugins/sun4v/mdesc/disk_discovery.c deleted file mode 100644 index 91e816aca8..0000000000 --- a/usr/src/cmd/picl/plugins/sun4v/mdesc/disk_discovery.c +++ /dev/null @@ -1,258 +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 "mdescplugin.h" - -static char *device_format_disk_name(char *devfs_path); -static char *device_get_disk_name_from_dir(char *basedir, char *path); -static cfga_list_data_t *device_get_disk_cfga_info(char *cfgpath); - -/* These 3 variable are defined and set in mdescplugin.c */ -extern picl_nodehdl_t root_node; -extern md_t *mdp; -extern mde_cookie_t rootnode; - -/* This routine is defined in cpu_prop_update.c */ -extern void set_prop_info(ptree_propinfo_t *propinfo, int size, char *name, - int type); - -int -disk_discovery(void) -{ - int status = PICL_FAILURE; - picl_nodehdl_t discovery_node; - picl_nodehdl_t new_node; - ptree_propinfo_t propinfo; - picl_prophdl_t proph; - char *cfgpath, *dev_path, *nac; - cfga_list_data_t *disk_data; - int x, num_nodes, ndisks; - mde_cookie_t *disklistp; - - num_nodes = md_node_count(mdp); - - disklistp = (mde_cookie_t *) alloca(sizeof (mde_cookie_t) *num_nodes); - if (disklistp == NULL) { - return (status); - } - - /* - * Starting at the root node, scan the "fwd" dag for - * all the disks in this description. - */ - - ndisks = md_scan_dag(mdp, rootnode, md_find_name(mdp, "disk_nac"), - md_find_name(mdp, "fwd"), disklistp); - - if (ndisks <= 0) { - return (status); - } - - status = ptree_create_and_add_node(root_node, DISK_DISCOVERY_NAME, - PICL_CLASS_PICL, &discovery_node); - if (status != PICL_SUCCESS) - return (status); - - for (x = 0; x < ndisks; x++) { - if (md_get_prop_str(mdp, disklistp[x], "phys_path", - &dev_path) != 0) { - continue; - } - - if (md_get_prop_str(mdp, disklistp[x], "nac_name", - &nac) != 0) { - continue; - } - - (void) ptree_create_and_add_node(discovery_node, "disk", - PICL_CLASS_DISK, &new_node); - - set_prop_info(&propinfo, PICL_PROPNAMELEN_MAX, "Path", - PICL_PTYPE_CHARSTRING); - - (void) ptree_create_and_add_prop(new_node, &propinfo, - (void *)dev_path, &proph); - - set_prop_info(&propinfo, PICL_PROPNAMELEN_MAX, "Location", - PICL_PTYPE_CHARSTRING); - - (void) ptree_create_and_add_prop(new_node, &propinfo, - (void *)nac, &proph); - - set_prop_info(&propinfo, PICL_PROPNAMELEN_MAX, "State", - PICL_PTYPE_CHARSTRING); - - cfgpath = device_format_disk_name(dev_path); - - if (cfgpath == NULL) { - (void) ptree_create_and_add_prop(new_node, &propinfo, - (void *)strdup(UNCONFIGURED), &proph); - continue; - } - - disk_data = device_get_disk_cfga_info(cfgpath); - if (disk_data == NULL) { - continue; - } - - switch (disk_data->ap_o_state) { - case CFGA_STAT_UNCONFIGURED: - (void) ptree_create_and_add_prop(new_node, &propinfo, - (void *)strdup(UNCONFIGURED), &proph); - break; - - case CFGA_STAT_CONFIGURED: - (void) ptree_create_and_add_prop(new_node, &propinfo, - (void *)strdup(CONFIGURED), &proph); - break; - - default: - break; - } - } - return (status); -} - -static cfga_list_data_t * -device_get_disk_cfga_info(char *cfgpath) -{ - char **apid_names; - char apid_name[CFGA_AP_LOG_ID_LEN]; - cfga_err_t cfga_err; - struct cfga_list_data *list_data; - int list_len, count; - - (void) strcpy(apid_name, cfgpath); - - apid_names = (char **)malloc(2 * sizeof (char *)); - apid_names[0] = apid_name; - apid_names[1] = NULL; - - cfga_err = config_list_ext(1, (char * const *)apid_names, &list_data, - &list_len, NULL, NULL, NULL, CFGA_FLAG_LIST_ALL); - free(apid_names); - - if (cfga_err != CFGA_OK || list_len == 0) { - return (NULL); - } - - /* free any extra entries if this is not unique */ - if (list_len > 1) { - for (count = 1; count < list_len; count++) { - free(&list_data[count]); - } - } - - return (&list_data[0]); -} - - -static char * -device_format_disk_name(char *devfs_path) -{ - char devname[256]; - char *diskname, *dev_cpy; - char apid_name[CFGA_AP_LOG_ID_LEN]; - - (void) snprintf(devname, sizeof (devname), "/devices%s:a,raw", - devfs_path); - - diskname = device_get_disk_name_from_dir("/dev/rdsk", devname); - if (diskname != NULL) { - *strrchr(diskname, 's') = '\0'; - dev_cpy = strdup(diskname); - *strchr(dev_cpy, 't') = '\0'; - - (void) snprintf(apid_name, sizeof (apid_name), "%s::dsk/%s", - dev_cpy, diskname); - return (strdup(apid_name)); - } - - return (NULL); -} - -/* - * Getting a disk name is annoying. Walking controllers - * doesn't work if disks were added out of order (ie a new - * controller card was installed), and DKIO controller numbers - * seem to always be 0. So we do it the old fashioned way: - * - * We get a target name (in the /devices tree), and we want - * the node in /dev/rdsk that is a symlink to it. So we walk - * /dev/rdsk, stating each entry. Since stat follows the symlink - * automatically, we just compare the device and inode numbers - * to the device and inode numbers of the target. According to - * the stat man page, this constitues a unique match. The only - * little cleanup is that this includes a slice #, which we take - * off. - */ - -static char * -device_get_disk_name_from_dir(char *basedir, char *path) -{ - DIR *dir; - struct dirent *dirent; - struct stat srcstat, targstat; - int loc_err; - char fullname[256 + MAXNAMLEN]; - char *ptr; - - loc_err = stat(path, &srcstat); - if (loc_err < 0) { - return (NULL); - } - - dir = opendir(basedir); - if (dir == NULL) { - return (NULL); - } - - while ((dirent = readdir(dir)) != NULL) { - (void) snprintf(fullname, sizeof (fullname), - "%s/%s", basedir, dirent->d_name); - - loc_err = stat(fullname, &targstat); - if (loc_err == 0) { - if ((memcmp((void *)&(targstat.st_ino), - (void *)&(srcstat.st_ino), - sizeof (ino_t)) == 0) && - (memcmp((void *)&(targstat.st_dev), - (void *)&(srcstat.st_dev), - sizeof (dev_t)) == 0)) { - - ptr = strdup(dirent->d_name); - - (void) closedir(dir); - return (ptr); - } - } - } - - (void) closedir(dir); - return (NULL); -} diff --git a/usr/src/cmd/picl/plugins/sun4v/mdesc/dr.c b/usr/src/cmd/picl/plugins/sun4v/mdesc/dr.c deleted file mode 100644 index 6b491d24a6..0000000000 --- a/usr/src/cmd/picl/plugins/sun4v/mdesc/dr.c +++ /dev/null @@ -1,548 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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 "mdescplugin.h" - -static di_prom_handle_t ph = DI_PROM_HANDLE_NIL; - -typedef struct cpu_lookup { - di_node_t di_node; - picl_nodehdl_t nodeh; - int result; -} cpu_lookup_t; - -extern int add_cpu_prop(picl_nodehdl_t node, void *args); -extern md_t *mdesc_devinit(void); - -/* - * This function is identical to the one in the picldevtree plugin. - * Unfortunately we can't just reuse that code. - */ -int -add_string_list_prop(picl_nodehdl_t nodeh, char *name, char *strlist, - unsigned int nrows) -{ - ptree_propinfo_t propinfo; - picl_prophdl_t proph; - picl_prophdl_t tblh; - int err; - unsigned int i; - unsigned int j; - picl_prophdl_t *proprow; - int len; - -#define NCOLS_IN_STRING_TABLE 1 - - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_TABLE, PICL_READ, sizeof (picl_prophdl_t), name, - NULL, NULL); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_create_table(&tblh); - if (err != PICL_SUCCESS) - return (err); - - err = ptree_create_and_add_prop(nodeh, &propinfo, &tblh, &proph); - if (err != PICL_SUCCESS) - return (err); - - proprow = alloca(sizeof (picl_prophdl_t) * nrows); - if (proprow == NULL) { - (void) ptree_destroy_prop(proph); - return (PICL_FAILURE); - } - - for (j = 0; j < nrows; ++j) { - len = strlen(strlist) + 1; - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_CHARSTRING, PICL_READ, len, name, - NULL, NULL); - if (err != PICL_SUCCESS) - break; - err = ptree_create_prop(&propinfo, strlist, &proprow[j]); - if (err != PICL_SUCCESS) - break; - strlist += len; - err = ptree_add_row_to_table(tblh, NCOLS_IN_STRING_TABLE, - &proprow[j]); - if (err != PICL_SUCCESS) - break; - } - - if (err != PICL_SUCCESS) { - for (i = 0; i < j; ++i) - (void) ptree_destroy_prop(proprow[i]); - (void) ptree_delete_prop(proph); - (void) ptree_destroy_prop(proph); - return (err); - } - - return (PICL_SUCCESS); -} - -/* - * This function is identical to the one in the picldevtree plugin. - * Unfortunately we can't just reuse that code. - */ -static void -add_devinfo_props(picl_nodehdl_t nodeh, di_node_t di_node) -{ - int instance; - char *di_val; - di_prop_t di_prop; - int di_ptype; - ptree_propinfo_t propinfo; - - instance = di_instance(di_node); - (void) ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_INT, PICL_READ, sizeof (instance), PICL_PROP_INSTANCE, - NULL, NULL); - (void) ptree_create_and_add_prop(nodeh, &propinfo, &instance, NULL); - - di_val = di_bus_addr(di_node); - if (di_val) { - (void) ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_CHARSTRING, PICL_READ, strlen(di_val) + 1, - PICL_PROP_BUS_ADDR, NULL, NULL); - (void) ptree_create_and_add_prop(nodeh, &propinfo, di_val, - NULL); - } - - di_val = di_binding_name(di_node); - if (di_val) { - (void) ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_CHARSTRING, PICL_READ, strlen(di_val) + 1, - PICL_PROP_BINDING_NAME, NULL, NULL); - (void) ptree_create_and_add_prop(nodeh, &propinfo, di_val, - NULL); - } - - di_val = di_driver_name(di_node); - if (di_val) { - (void) ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_CHARSTRING, PICL_READ, strlen(di_val) + 1, - PICL_PROP_DRIVER_NAME, NULL, NULL); - (void) ptree_create_and_add_prop(nodeh, &propinfo, di_val, - NULL); - } - - di_val = di_devfs_path(di_node); - if (di_val) { - (void) ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_CHARSTRING, PICL_READ, strlen(di_val) + 1, - PICL_PROP_DEVFS_PATH, NULL, NULL); - (void) ptree_create_and_add_prop(nodeh, &propinfo, di_val, - NULL); - di_devfs_path_free(di_val); - } - - for (di_prop = di_prop_next(di_node, DI_PROP_NIL); - di_prop != DI_PROP_NIL; - di_prop = di_prop_next(di_node, di_prop)) { - - di_val = di_prop_name(di_prop); - di_ptype = di_prop_type(di_prop); - switch (di_ptype) { - case DI_PROP_TYPE_BOOLEAN: - (void) ptree_init_propinfo(&propinfo, - PTREE_PROPINFO_VERSION, PICL_PTYPE_VOID, - PICL_READ, (size_t)0, di_val, NULL, NULL); - (void) ptree_create_and_add_prop(nodeh, &propinfo, - NULL, NULL); - break; - case DI_PROP_TYPE_INT: { - int *idata; - int len; - - len = di_prop_ints(di_prop, &idata); - if (len < 0) - /* Recieved error, so ignore prop */ - break; - - if (len == 1) - (void) ptree_init_propinfo(&propinfo, - PTREE_PROPINFO_VERSION, PICL_PTYPE_INT, - PICL_READ, len * sizeof (int), di_val, - NULL, NULL); - else - (void) ptree_init_propinfo(&propinfo, - PTREE_PROPINFO_VERSION, - PICL_PTYPE_BYTEARRAY, PICL_READ, - len * sizeof (int), di_val, - NULL, NULL); - - (void) ptree_create_and_add_prop(nodeh, &propinfo, - idata, NULL); - } - break; - case DI_PROP_TYPE_STRING: { - char *sdata; - int len; - - len = di_prop_strings(di_prop, &sdata); - if (len < 0) - break; - - if (len == 1) { - (void) ptree_init_propinfo(&propinfo, - PTREE_PROPINFO_VERSION, - PICL_PTYPE_CHARSTRING, PICL_READ, - strlen(sdata) + 1, di_val, - NULL, NULL); - (void) ptree_create_and_add_prop(nodeh, - &propinfo, sdata, NULL); - } else { - (void) add_string_list_prop(nodeh, di_val, - sdata, len); - } - } - break; - case DI_PROP_TYPE_BYTE: { - int len; - unsigned char *bdata; - - len = di_prop_bytes(di_prop, &bdata); - if (len < 0) - break; - (void) ptree_init_propinfo(&propinfo, - PTREE_PROPINFO_VERSION, PICL_PTYPE_BYTEARRAY, - PICL_READ, len, di_val, NULL, NULL); - (void) ptree_create_and_add_prop(nodeh, &propinfo, - bdata, NULL); - } - break; - case DI_PROP_TYPE_UNKNOWN: - break; - case DI_PROP_TYPE_UNDEF_IT: - break; - default: - break; - } - } -} - -/* - * add OBP_REG property to picl cpu node if it's not already there. - */ -static void -add_reg_prop(picl_nodehdl_t pn, di_node_t dn) -{ - int reg_prop[SUN4V_CPU_REGSIZE]; - int status; - int dlen; - int *pdata; - ptree_propinfo_t propinfo; - - status = ptree_get_propval_by_name(pn, OBP_REG, reg_prop, - sizeof (reg_prop)); - if (status == PICL_SUCCESS) { - return; - } - dlen = di_prom_prop_lookup_ints(ph, dn, OBP_REG, &pdata); - if (dlen < 0) { - return; - } - status = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_BYTEARRAY, PICL_READ, dlen * sizeof (int), OBP_REG, - NULL, NULL); - if (status != PICL_SUCCESS) { - return; - } - (void) ptree_create_and_add_prop(pn, &propinfo, pdata, NULL); -} - -/* - * Create a picl node of type cpu and fill it. - * properties are filled from both the device tree and the - * Machine description. - */ -static int -construct_cpu_node(picl_nodehdl_t plath, di_node_t dn) -{ - int err; - char *nodename; - picl_nodehdl_t anodeh; - - nodename = di_node_name(dn); /* PICL_PROP_NAME */ - - err = ptree_create_and_add_node(plath, nodename, PICL_CLASS_CPU, - &anodeh); - if (err != PICL_SUCCESS) - return (err); - - add_devinfo_props(anodeh, dn); - add_reg_prop(anodeh, dn); - (void) add_cpu_prop(anodeh, NULL); - - return (err); -} - -/* - * Given a devinfo node find its reg property. - */ -static int -get_reg_prop(di_node_t dn, int **pdata) -{ - int dret = 0; - - dret = di_prop_lookup_ints(DDI_DEV_T_ANY, dn, OBP_REG, pdata); - if (dret > 0) - return (dret); - - if (!ph) - return (0); - dret = di_prom_prop_lookup_ints(ph, dn, OBP_REG, pdata); - return (dret < 0? 0 : dret); -} - -/* - * Given a devinfo cpu node find its cpuid property. - */ -int -get_cpuid(di_node_t di_node) -{ - int len; - int *idata; - int dcpuid = -1; - - len = get_reg_prop(di_node, &idata); - - if (len != SUN4V_CPU_REGSIZE) - return (dcpuid); - if (len == SUN4V_CPU_REGSIZE) - dcpuid = CFGHDL_TO_CPUID(idata[0]); - - return (dcpuid); -} - -int -find_cpu(di_node_t node, int cpuid) -{ - int dcpuid; - di_node_t cnode; - char *nodename; - - for (cnode = di_child_node(node); cnode != DI_NODE_NIL; - cnode = di_sibling_node(cnode)) { - nodename = di_node_name(cnode); - if (nodename == NULL) - continue; - if (strcmp(nodename, OBP_CPU) == 0) { - dcpuid = get_cpuid(cnode); - if (dcpuid == cpuid) { - return (1); - } - } - } - return (0); -} - -/* - * Callback to the ptree walk function during remove_cpus. - * As a part of the args receives a picl nodeh, searches - * the device tree for a cpu whose cpuid matches the picl cpu node. - * Sets arg struct's result to 1 if it failed to match and terminates - * the walk. - */ -static int -remove_cpu_candidate(picl_nodehdl_t nodeh, void *c_args) -{ - di_node_t di_node; - cpu_lookup_t *cpu_arg; - int err; - int pcpuid; - int reg_prop[SUN4V_CPU_REGSIZE]; - - if (c_args == NULL) - return (PICL_INVALIDARG); - - cpu_arg = c_args; - di_node = cpu_arg->di_node; - - err = ptree_get_propval_by_name(nodeh, OBP_REG, reg_prop, - sizeof (reg_prop)); - - if (err != PICL_SUCCESS) { - return (PICL_WALK_CONTINUE); - } - - pcpuid = CFGHDL_TO_CPUID(reg_prop[0]); - - if (!find_cpu(di_node, pcpuid)) { - cpu_arg->result = 1; - cpu_arg->nodeh = nodeh; - return (PICL_WALK_TERMINATE); - } - - cpu_arg->result = 0; - return (PICL_WALK_CONTINUE); -} - -/* - * Given the start node of the device tree. - * find all cpus in the picl tree that don't have - * device tree counterparts and remove them. - */ -static void -remove_cpus(di_node_t di_start) -{ - int err; - picl_nodehdl_t plath; - cpu_lookup_t cpu_arg; - - err = ptree_get_node_by_path(PLATFORM_PATH, &plath); - if (err != PICL_SUCCESS) - return; - - do { - cpu_arg.di_node = di_start; - cpu_arg.nodeh = 0; - cpu_arg.result = 0; - - if (ptree_walk_tree_by_class(plath, - PICL_CLASS_CPU, &cpu_arg, remove_cpu_candidate) - != PICL_SUCCESS) - return; - - if (cpu_arg.result == 1) { - err = ptree_delete_node(cpu_arg.nodeh); - if (err == PICL_SUCCESS) - ptree_destroy_node(cpu_arg.nodeh); - } - } while (cpu_arg.result); -} - -/* - * Callback to the ptree walk function during add_cpus. - * As a part of the args receives a cpu di_node, compares - * each picl cpu node's cpuid to the device tree node's cpuid. - * Sets arg struct's result to 1 on a match. - */ -static int -cpu_exists(picl_nodehdl_t nodeh, void *c_args) -{ - di_node_t di_node; - cpu_lookup_t *cpu_arg; - int err; - int dcpuid, pcpuid; - int reg_prop[4]; - - if (c_args == NULL) - return (PICL_INVALIDARG); - - cpu_arg = c_args; - di_node = cpu_arg->di_node; - dcpuid = get_cpuid(di_node); - - err = ptree_get_propval_by_name(nodeh, OBP_REG, reg_prop, - sizeof (reg_prop)); - - if (err != PICL_SUCCESS) - return (PICL_WALK_CONTINUE); - - pcpuid = CFGHDL_TO_CPUID(reg_prop[0]); - - if (dcpuid == pcpuid) { - cpu_arg->result = 1; - return (PICL_WALK_TERMINATE); - } - - cpu_arg->result = 0; - return (PICL_WALK_CONTINUE); -} - -/* - * Given the root node of the device tree. - * compare it to the picl tree and add to it cpus - * that are new. - */ -static void -add_cpus(di_node_t di_node) -{ - int err; - di_node_t cnode; - picl_nodehdl_t plath; - cpu_lookup_t cpu_arg; - char *nodename; - - err = ptree_get_node_by_path(PLATFORM_PATH, &plath); - if (err != PICL_SUCCESS) - return; - - for (cnode = di_child_node(di_node); cnode != DI_NODE_NIL; - cnode = di_sibling_node(cnode)) { - nodename = di_node_name(cnode); - if (nodename == NULL) - continue; - if (strcmp(nodename, OBP_CPU) == 0) { - cpu_arg.di_node = cnode; - - if (ptree_walk_tree_by_class(plath, - PICL_CLASS_CPU, &cpu_arg, cpu_exists) - != PICL_SUCCESS) - return; - - if (cpu_arg.result == 0) - /* - * Didn't find a matching cpu, add it. - */ - (void) construct_cpu_node(plath, - cnode); - } - } -} - -/* - * Handle DR events. Only supports cpu add and remove. - */ -int -update_devices(char *dev, int op) -{ - di_node_t di_root; - - if ((di_root = di_init("/", DINFOCPYALL)) == DI_NODE_NIL) - return (PICL_FAILURE); - - if ((ph = di_prom_init()) == NULL) - return (PICL_FAILURE); - - if (op == DEV_ADD) { - if (strcmp(dev, OBP_CPU) == 0) - add_cpus(di_root); - } - - if (op == DEV_REMOVE) { - if (strcmp(dev, OBP_CPU) == 0) - remove_cpus(di_root); - } - - di_fini(di_root); - di_prom_fini(ph); - return (PICL_SUCCESS); -} diff --git a/usr/src/cmd/picl/plugins/sun4v/mdesc/init.c b/usr/src/cmd/picl/plugins/sun4v/mdesc/init.c deleted file mode 100644 index 4f483a7c52..0000000000 --- a/usr/src/cmd/picl/plugins/sun4v/mdesc/init.c +++ /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 2007 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define MDESC_PATH "/devices/pseudo/mdesc@0:mdesc" - -static void mdesc_free(void *bufp, size_t size); -uint64_t *md_bufp; - -md_t * -mdesc_devinit(void) -{ - int fd; - md_t *mdp; - size_t size; - - /* - * We haven't finished using the previous MD/PRI info. - */ - if (md_bufp != NULL) - return (NULL); - - do { - if ((fd = open(MDESC_PATH, O_RDONLY, 0)) < 0) - break; - - if (ioctl(fd, MDESCIOCGSZ, &size) < 0) - break; - if ((md_bufp = (uint64_t *)malloc(size)) == NULL) { - (void) close(fd); - break; - } - - /* - * A partial read is as bad as a failed read. - */ - if (read(fd, md_bufp, size) != size) { - free(md_bufp); - md_bufp = NULL; - } - - (void) close(fd); - /*LINTED: E_CONSTANT_CONDITION */ - } while (0); - - if (md_bufp) { - mdp = md_init_intern(md_bufp, malloc, mdesc_free); - if (mdp == NULL) { - free(md_bufp); - md_bufp = NULL; - } - } else - mdp = NULL; - - return (mdp); -} - -/*ARGSUSED*/ -void -mdesc_free(void *bufp, size_t size) -{ - free(bufp); -} - -void -mdesc_devfini(md_t *mdp) -{ - if (mdp) - (void) md_fini(mdp); - - free(md_bufp); - md_bufp = NULL; -} diff --git a/usr/src/cmd/picl/plugins/sun4v/mdesc/mdescplugin.c b/usr/src/cmd/picl/plugins/sun4v/mdesc/mdescplugin.c deleted file mode 100644 index fa3e985b00..0000000000 --- a/usr/src/cmd/picl/plugins/sun4v/mdesc/mdescplugin.c +++ /dev/null @@ -1,330 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ - -/* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * The MDESC picl plugin serves 2 different functionalities. - * --The first is to look up certain CPU properties in the MDESC an to add - * these properties in the already created CPU PICL nodes in the /platform - * section of the tree. - * --The second functionality is to create a /disk_discovery section of the - * PICL tree which will have a disk node created for each disk node in the - * machine description. - */ - -#include "mdescplugin.h" -#include - -#pragma init(mdescplugin_register) /* place in .init section */ - -picl_nodehdl_t root_node; -md_t *mdp; -mde_cookie_t rootnode; - -void mdescplugin_init(void); -void mdescplugin_fini(void); -static void signal_devtree(void); - -extern int add_cpu_prop(picl_nodehdl_t node, void *args); -extern int disk_discovery(void); -extern md_t *mdesc_devinit(void); -extern void mdesc_devfini(md_t *mdp); -extern int update_devices(char *dev, int op); - -picld_plugin_reg_t mdescplugin_reg = { - PICLD_PLUGIN_VERSION_1, - PICLD_PLUGIN_CRITICAL, - "mdesc_plugin", - mdescplugin_init, - mdescplugin_fini -}; - -#define DISK_FOUND 0x00 -#define DISK_NOT_FOUND 0x01 - -typedef struct disk_lookup { - char *path; - picl_nodehdl_t disk; - int result; -} disk_lookup_t; - -int -find_disk(picl_nodehdl_t node, void *args) -{ - disk_lookup_t *lookup = (disk_lookup_t *)args; - int status; - char path[PICL_PROPNAMELEN_MAX]; - - status = ptree_get_propval_by_name(node, "Path", (void *)&path, - PICL_PROPNAMELEN_MAX); - if (status != PICL_SUCCESS) { - return (PICL_WALK_CONTINUE); - } - - if (strcmp(path, lookup->path) == 0) { - lookup->disk = node; - lookup->result = DISK_FOUND; - return (PICL_WALK_TERMINATE); - } - - return (PICL_WALK_CONTINUE); -} - -/* - * DR event handler - * respond to the picl events: - * PICLEVENT_DR_AP_STATE_CHANGE - */ -static void -dr_handler(const char *ename, const void *earg, size_t size, void *cookie) -{ - nvlist_t *nvlp = NULL; - char *dtype; - char *ap_id; - char *hint; - - - if (strcmp(ename, PICLEVENT_DR_AP_STATE_CHANGE) != 0) { - return; - } - - if (nvlist_unpack((char *)earg, size, &nvlp, NULL)) { - return; - } - - if (nvlist_lookup_string(nvlp, PICLEVENTARG_DATA_TYPE, &dtype)) { - nvlist_free(nvlp); - return; - } - - if (strcmp(dtype, PICLEVENTARG_PICLEVENT_DATA) != 0) { - nvlist_free(nvlp); - return; - } - - if (nvlist_lookup_string(nvlp, PICLEVENTARG_AP_ID, &ap_id)) { - nvlist_free(nvlp); - return; - } - - if (nvlist_lookup_string(nvlp, PICLEVENTARG_HINT, &hint)) { - nvlist_free(nvlp); - return; - } - - mdp = mdesc_devinit(); - if (mdp == NULL) { - nvlist_free(nvlp); - return; - } - - rootnode = md_root_node(mdp); - - if (strcmp(hint, DR_HINT_INSERT) == 0) - (void) update_devices(ap_id, DEV_ADD); - else if (strcmp(hint, DR_HINT_REMOVE) == 0) - (void) update_devices(ap_id, DEV_REMOVE); - - mdesc_devfini(mdp); - nvlist_free(nvlp); - - /* - * Signal the devtree plugin to add more cpu properties. - */ - signal_devtree(); -} - -/* - * Discovery event handler - * respond to the picl events: - * PICLEVENT_SYSEVENT_DEVICE_ADDED - * PICLEVENT_SYSEVENT_DEVICE_REMOVED - */ -static void -dsc_handler(const char *ename, const void *earg, size_t size, void *cookie) -{ - nvlist_t *nvlp = NULL; - char *path; - disk_lookup_t lookup; - int status; - - /* - * retrieve the device's physical path from the event arg - * and determine which disk (if any) we are working with - */ - if (nvlist_unpack((char *)earg, size, &nvlp, NULL)) - return; - if (nvlist_lookup_string(nvlp, "devfs-path", &path)) - return; - - lookup.path = strdup(path); - lookup.disk = NULL; - lookup.result = DISK_NOT_FOUND; - - status = ptree_walk_tree_by_class(root_node, "disk", (void *)&lookup, - find_disk); - if (status != PICL_SUCCESS) { - return; - } - - if (lookup.result == DISK_FOUND) { - if (strcmp(ename, PICLEVENT_SYSEVENT_DEVICE_ADDED) == 0) - ptree_update_propval_by_name(lookup.disk, "State", - (void *)strdup(CONFIGURED), PICL_PROPNAMELEN_MAX); - else if (strcmp(ename, PICLEVENT_SYSEVENT_DEVICE_REMOVED) == 0) - ptree_update_propval_by_name(lookup.disk, "State", - (void *)strdup(UNCONFIGURED), PICL_PROPNAMELEN_MAX); - } - - nvlist_free(nvlp); -} - -/*ARGSUSED*/ -static void -mdesc_ev_completion_handler(char *ename, void *earg, size_t size) -{ - free(earg); -} - -static void -signal_devtree(void) -{ - nvlist_t *nvl; - char *packed_nvl; - size_t nvl_size; - int status; - - if (nvlist_alloc(&nvl, NV_UNIQUE_NAME_TYPE, NULL) != 0) - return; - - /* - * Right now (Aug. 2007) snowbird is the only other platform - * which uses this event. Since that's a sun4u platform and - * this is sun4v we do not have to worry about possible confusion - * or interference between the two by grabbing this event for - * our own use here. This event is consumed by the devtree - * plug-in. The event signals the plug-in to re-run its - * cpu initialization function, which will cause it to add - * additional information to the cpu devtree nodes (particularly, - * the administrative state of the cpus.) - */ - if (nvlist_add_string(nvl, PICLEVENTARG_EVENT_NAME, - PICLEVENT_CPU_STATE_CHANGE) != 0) { - free(nvl); - return; - } - - /* - * The devtree plug-in needs to see a devfs path argument for - * any event it considers. We supply one here which is essentially - * a dummy since it is not processed by the devtree plug-in for - * this event. - */ - if (nvlist_add_string(nvl, PICLEVENTARG_DEVFS_PATH, "/cpu") != 0) { - free(nvl); - return; - } - packed_nvl = NULL; - if (nvlist_pack(nvl, &packed_nvl, &nvl_size, NV_ENCODE_NATIVE, - 0) != 0) { - free(nvl); - return; - } - if ((status = ptree_post_event(PICLEVENT_CPU_STATE_CHANGE, - packed_nvl, nvl_size, mdesc_ev_completion_handler)) != - PICL_SUCCESS) { - free(nvl); - syslog(LOG_WARNING, - "signal_devtree: can't post cpu event: %d\n", status); - } -} - -void -mdescplugin_init(void) -{ - int status; - - status = ptree_get_root(&root_node); - if (status != PICL_SUCCESS) { - return; - } - - mdp = mdesc_devinit(); - if (mdp == NULL) - return; - - /* - * update the cpu configuration in case the snapshot cache used by the - * devtree plugin is out of date. - */ - (void) update_devices(OBP_CPU, DEV_ADD); - (void) update_devices(OBP_CPU, DEV_REMOVE); - - rootnode = md_root_node(mdp); - - /* - * This is the start of the CPU property augmentation code. - * add_cpu_prop and the rest of the CPU code lives in cpu_prop_update.c - */ - status = ptree_walk_tree_by_class(root_node, "cpu", NULL, add_cpu_prop); - if (status != PICL_SUCCESS) { - return; - } - - signal_devtree(); - - (void) disk_discovery(); - - /* - * register dsc_handler for both "sysevent-device-added" and - * and for "sysevent-device-removed" PICL events - */ - (void) ptree_register_handler(PICLEVENT_SYSEVENT_DEVICE_ADDED, - dsc_handler, NULL); - (void) ptree_register_handler(PICLEVENT_SYSEVENT_DEVICE_REMOVED, - dsc_handler, NULL); - (void) ptree_register_handler(PICLEVENT_DR_AP_STATE_CHANGE, - dr_handler, NULL); - - mdesc_devfini(mdp); -} - -void -mdescplugin_fini(void) -{ - /* unregister the event handler */ - (void) ptree_unregister_handler(PICLEVENT_SYSEVENT_DEVICE_ADDED, - dsc_handler, NULL); - (void) ptree_unregister_handler(PICLEVENT_SYSEVENT_DEVICE_REMOVED, - dsc_handler, NULL); - (void) ptree_unregister_handler(PICLEVENT_DR_AP_STATE_CHANGE, - dr_handler, NULL); -} - -void -mdescplugin_register(void) -{ - picld_plugin_register(&mdescplugin_reg); -} diff --git a/usr/src/cmd/picl/plugins/sun4v/mdesc/mdescplugin.h b/usr/src/cmd/picl/plugins/sun4v/mdesc/mdescplugin.h deleted file mode 100644 index 437fbecbbf..0000000000 --- a/usr/src/cmd/picl/plugins/sun4v/mdesc/mdescplugin.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 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _MDESCPLUGIN_H -#define _MDESCPLUGIN_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define MAXSTRLEN 256 -#define ICACHE_FLAG 0x01 -#define DCACHE_FLAG 0x02 -#define CACHE_FLAG 0x03 -#define DISK_DISCOVERY_NAME "disk_discovery" -#define CONFIGURED "configured" -#define UNCONFIGURED "unconfigured" -#define DEV_ADD 0 -#define DEV_REMOVE 1 -#define SUN4V_CPU_REGSIZE 4 -#define CFGHDL_TO_CPUID(x) (x & ~(0xful << 28)) - -#ifdef __cplusplus -} -#endif - -#endif /* _MDESCPLUGIN_H */ diff --git a/usr/src/cmd/picl/plugins/sun4v/piclsbl/Makefile b/usr/src/cmd/picl/plugins/sun4v/piclsbl/Makefile deleted file mode 100644 index b60b7b1817..0000000000 --- a/usr/src/cmd/picl/plugins/sun4v/piclsbl/Makefile +++ /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 2008 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# ident "%Z%%M% %I% %E% SMI" -# -# cmd/picl/plugins/sun4v/piclsbl/Makefile - -LIBRARY= libpiclsbl.a -VERS= .1 - -OBJECTS= piclsbl.o - -# include library definitions -include $(SRC)/lib/Makefile.lib -include $(SRC)/Makefile.psm - -include $(SRC)/cmd/picl/plugins/Makefile.com - -SRCS= $(OBJECTS:%.o=%.c) - -$(OBJS_DIR)/%.o: $(SRC)/sun4v/piclsbl/%.c - $(COMPILE.c) -o $@ $< - $(CTFCONVERT_O) - -LIBS = $(DYNLIB) - -ROOT_PLATFORM = $(USR_PLAT_DIR)/sun4v -DYNFLAGS_PLAT = /usr/platform/\$$PLATFORM/lib/picl/plugins -DYNFLAGS_SUN4V = /usr/platform/sun4v/lib/picl/plugins -DYNFLAGS_COM = /usr/lib/picl/plugins -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CPPFLAGS += -I$(SRC)/sun4v/piclsbl -CPPFLAGS += -I$(SRC)/uts/common/sys -CPPFLAGS += -I$(SRC)/lib/libpcp/common - -LDLIBS += -L$(SRC)/lib/libpicl/$(MACH) -L$(SRC)/lib/libpicltree/$(MACH) -LDLIBS += -L$(ROOT)/usr/lib/picl/plugins -DYNFLAGS += -R$(DYNFLAGS_COM) - -LDLIBS += -lc -lpicltree -lumem -lnvpair - - -.KEEP_STATE: - -all: $(LIBS) $(LIBLINKS) - -install: all $(ROOTLIBDIR) $(ROOTLIBS) $(ROOTLINKS) - -$(ROOTLIBDIR)/$(LIBS) : $(LIBS) - $(INS) -m $(FILEMODE) $(LIBS) $@ - -$(LIBLINKS): FRC - $(RM) -r $(LIBLINKS); $(SYMLINK) $(DYNLIB) $(LIBLINKS) - -# include library targets -include $(SRC)/cmd/picl/plugins/Makefile.targ -include $(SRC)/lib/Makefile.targ - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4v/piclsbl/piclsbl.c b/usr/src/cmd/picl/plugins/sun4v/piclsbl/piclsbl.c deleted file mode 100644 index db6a424070..0000000000 --- a/usr/src/cmd/picl/plugins/sun4v/piclsbl/piclsbl.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 2008 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * PICL Ontario platform plug-in to message the SC to light - * or extinguish the hdd 'OK2RM' ready-to-service light in - * the event of a soft unconfigure or configure, respectively. - * - * Erie platforms (T1000) do not have ok-to-remove LEDs - * so they do not need handlers for the SBL events. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "piclsbl.h" - -#include "errno.h" - -#pragma init(piclsbl_register) - -static void *pcp_handle; - -static char hba_devctl[MAXPATHLEN]; - -static int (* pcp_init_ptr)(); -static int (* pcp_send_recv_ptr)(); -static int (* pcp_close_ptr)(); - -static int load_pcp_libs(void); -static void piclsbl_init(void); -static void piclsbl_fini(void); -static void piclsbl_register(void); -static void piclsbl_handler(const char *ename, const void *earg, - size_t size, void *cookie); - -static picld_plugin_reg_t piclsbl_reg = { - PICLD_PLUGIN_VERSION_1, - PICLD_PLUGIN_CRITICAL, - "piclsbl", - piclsbl_init, - piclsbl_fini -}; - -/* - * called from init to load the pcp library - */ -static int -load_pcp_libs() -{ - char pcp_dl_lib[80]; - - (void) snprintf(pcp_dl_lib, sizeof (pcp_dl_lib), "%s%s", - LIB_PCP_PATH, PCPLIB); - - /* load the library and set up function pointers */ - if ((pcp_handle = dlopen(pcp_dl_lib, RTLD_NOW)) == NULL) - return (1); - - pcp_init_ptr = (int(*)())dlsym(pcp_handle, "pcp_init"); - pcp_close_ptr = (int(*)())dlsym(pcp_handle, "pcp_close"); - pcp_send_recv_ptr = (int(*)())dlsym(pcp_handle, "pcp_send_recv"); - - if (pcp_init_ptr == NULL || pcp_send_recv_ptr == NULL || - pcp_close_ptr == NULL) - return (1); - - return (0); -} - -/* - * callback routine for ptree_walk_tree_by_class() - */ -static int -cb_find_disk(picl_nodehdl_t node, void *args) -{ - disk_lookup_t *lookup = (disk_lookup_t *)args; - int status = -1; - char *n; - char path[PICL_PROPNAMELEN_MAX]; - - status = ptree_get_propval_by_name(node, "Path", (void *)&path, - PICL_PROPNAMELEN_MAX); - if (status != PICL_SUCCESS) { - return (PICL_WALK_CONTINUE); - } - - if (strcmp(path, lookup->path) == 0) { - lookup->disk = node; - lookup->result = DISK_FOUND; - - /* store the HBA's device path for use in check_raid() */ - n = strstr(path, "/sd"); - strncpy(n, "\0", 1); - (void) snprintf(hba_devctl, MAXPATHLEN, "/devices%s:devctl", - path); - - return (PICL_WALK_TERMINATE); - } - - return (PICL_WALK_CONTINUE); -} - -/* - * check a target for RAID membership - */ -static int -check_raid(int target) -{ - raid_config_t config; - int fd; - int numvols; - int i; - int j; - - /* - * hba_devctl is set to the onboard hba, so it will - * always house any onboard RAID volumes - */ - if ((fd = open(hba_devctl, O_RDONLY)) < 0) { - syslog(LOG_ERR, "%s", strerror(errno)); - return (0); - } - - /* - * look up the RAID configurations for the onboard - * HBA and check target against all member targets - */ - if (ioctl(fd, RAID_NUMVOLUMES, &numvols)) { - syslog(LOG_ERR, "%s", strerror(errno)); - (void) close(fd); - return (0); - } - - for (i = 0; i < numvols; i++) { - config.unitid = i; - if (ioctl(fd, RAID_GETCONFIG, &config)) { - syslog(LOG_ERR, "%s", strerror(errno)); - (void) close(fd); - return (0); - } - - for (j = 0; j < config.ndisks; j++) { - if (config.disk[j] == target) { - (void) close(fd); - return (1); - } - } - } - (void) close(fd); - return (0); -} - -/* - * Ontario SBL event handler, subscribed to: - * PICLEVENT_SYSEVENT_DEVICE_ADDED - * PICLEVENT_SYSEVENT_DEVICE_REMOVED - */ -static void -piclsbl_handler(const char *ename, const void *earg, size_t size, - void *cookie) -{ - char *devfs_path; - char hdd_location[PICL_PROPNAMELEN_MAX]; - nvlist_t *nvlp = NULL; - pcp_msg_t send_msg; - pcp_msg_t recv_msg; - pcp_sbl_req_t *req_ptr = NULL; - pcp_sbl_resp_t *resp_ptr = NULL; - int status = -1; - int target; - disk_lookup_t lookup; - int channel_fd; - - /* - * setup the request data to attach to the libpcp msg - */ - if ((req_ptr = (pcp_sbl_req_t *)umem_zalloc(sizeof (pcp_sbl_req_t), - UMEM_DEFAULT)) == NULL) - goto sbl_return; - - /* - * This plugin serves to enable or disable the blue RAS - * 'ok-to-remove' LED that is on each of the 4 disks on the - * Ontario. We catch the event via the picl handler, and - * if the event is DEVICE_ADDED for one of our onboard disks, - * then we'll be turning off the LED. Otherwise, if the event - * is DEVICE_REMOVED, then we turn it on. - */ - if (strcmp(ename, PICLEVENT_SYSEVENT_DEVICE_ADDED) == 0) - req_ptr->sbl_action = PCP_SBL_DISABLE; - else if (strcmp(ename, PICLEVENT_SYSEVENT_DEVICE_REMOVED) == 0) - req_ptr->sbl_action = PCP_SBL_ENABLE; - else - goto sbl_return; - - /* - * retrieve the device's physical path from the event payload - */ - if (nvlist_unpack((char *)earg, size, &nvlp, NULL)) - goto sbl_return; - if (nvlist_lookup_string(nvlp, "devfs-path", &devfs_path)) - goto sbl_return; - - /* - * look for this disk in the picl tree, and if it's - * location indicates that it's one of our internal - * disks, then set sbl_id to incdicate which one. - * otherwise, return as it is not one of our disks. - */ - lookup.path = strdup(devfs_path); - lookup.disk = NULL; - lookup.result = DISK_NOT_FOUND; - - /* first, find the disk */ - status = ptree_walk_tree_by_class(root_node, "disk", (void *)&lookup, - cb_find_disk); - if (status != PICL_SUCCESS) - goto sbl_return; - - if (lookup.result == DISK_FOUND) { - /* now, lookup it's location in the node */ - status = ptree_get_propval_by_name(lookup.disk, "Location", - (void *)&hdd_location, PICL_PROPNAMELEN_MAX); - if (status != PICL_SUCCESS) { - syslog(LOG_ERR, "piclsbl: failed hdd discovery"); - goto sbl_return; - } - } - - /* - * Strip off the target from the NAC name. - * The disk NAC will always be HDD# - */ - if (strncmp(hdd_location, NAC_DISK_PREFIX, - strlen(NAC_DISK_PREFIX)) == 0) { - (void) sscanf(hdd_location, "%*3s%d", &req_ptr->sbl_id); - target = (int)req_ptr->sbl_id; - } else { - /* this is not one of the onboard disks */ - goto sbl_return; - } - - /* - * check the onboard RAID configuration for this disk. if it is - * a member of a RAID and is not the RAID itself, ignore the event - */ - if (check_raid(target)) - goto sbl_return; - - /* - * we have the information we need, init the platform channel. - * the platform channel driver will only allow one connection - * at a time on this socket. on the offchance that more than - * one event comes in, we'll retry to initialize this connection - * up to 3 times - */ - if ((channel_fd = (*pcp_init_ptr)(LED_CHANNEL)) < 0) { - /* failed to init; wait and retry up to 3 times */ - int s = PCPINIT_TIMEOUT; - int retries = 0; - while (++retries) { - (void) sleep(s); - if ((channel_fd = (*pcp_init_ptr)(LED_CHANNEL)) >= 0) - break; - else if (retries == 3) { - syslog(LOG_ERR, "piclsbl: ", - "SC channel initialization failed"); - goto sbl_return; - } - /* continue */ - } - } - - /* - * populate the message for libpcp - */ - send_msg.msg_type = PCP_SBL_CONTROL; - send_msg.sub_type = NULL; - send_msg.msg_len = sizeof (pcp_sbl_req_t); - send_msg.msg_data = (uint8_t *)req_ptr; - - /* - * send the request, receive the response - */ - if ((*pcp_send_recv_ptr)(channel_fd, &send_msg, &recv_msg, - PCPCOMM_TIMEOUT) < 0) { - /* we either timed out or erred; either way try again */ - int s = PCPCOMM_TIMEOUT; - (void) sleep(s); - if ((*pcp_send_recv_ptr)(channel_fd, &send_msg, &recv_msg, - PCPCOMM_TIMEOUT) < 0) { - syslog(LOG_ERR, "piclsbl: communication failure"); - goto sbl_return; - } - } - - /* - * validate that this data was meant for us - */ - if (recv_msg.msg_type != PCP_SBL_CONTROL_R) { - syslog(LOG_ERR, "piclsbl: unbound packet received"); - goto sbl_return; - } - - /* - * verify that the LED action has taken place - */ - resp_ptr = (pcp_sbl_resp_t *)recv_msg.msg_data; - if (resp_ptr->status == PCP_SBL_ERROR) { - syslog(LOG_ERR, "piclsbl: OK2RM LED action error"); - goto sbl_return; - } - - /* - * ensure the LED action taken is the one requested - */ - if ((req_ptr->sbl_action == PCP_SBL_DISABLE) && - (resp_ptr->sbl_state != SBL_STATE_OFF)) - syslog(LOG_ERR, "piclsbl: OK2RM LED not OFF after disk " - "configuration"); - else if ((req_ptr->sbl_action == PCP_SBL_ENABLE) && - (resp_ptr->sbl_state != SBL_STATE_ON)) - syslog(LOG_ERR, "piclsbl: OK2RM LED not ON after disk " - "unconfiguration"); - else if (resp_ptr->sbl_state == SBL_STATE_UNKNOWN) - syslog(LOG_ERR, "piclsbl: OK2RM LED set to unknown state"); - -sbl_return: - - (*pcp_close_ptr)(channel_fd); - if (req_ptr != NULL) - umem_free(req_ptr, sizeof (pcp_sbl_req_t)); - free(resp_ptr); - nvlist_free(nvlp); -} - -static void -piclsbl_init(void) -{ - char platbuf[SYS_NMLN]; - - /* check for Erie platform name */ - if ((sysinfo(SI_PLATFORM, platbuf, SYS_NMLN) != -1) && - ((strcmp(platbuf, ERIE_PLATFORM) == 0) || - (strcmp(platbuf, ERIE_PLATFORM2) == 0))) - return; - - /* retrieve the root node for lookups in the event handler */ - if ((ptree_get_root(&root_node)) != NULL) - return; - - /* load libpcp */ - if (load_pcp_libs()) { - syslog(LOG_ERR, "piclsbl: failed to load libpcp"); - syslog(LOG_ERR, "piclsbl: aborting"); - return; - } - - /* - * register piclsbl_handler for both "sysevent-device-added" and - * and for "sysevent-device-removed" PICL events - */ - (void) ptree_register_handler(PICLEVENT_SYSEVENT_DEVICE_ADDED, - piclsbl_handler, NULL); - (void) ptree_register_handler(PICLEVENT_SYSEVENT_DEVICE_REMOVED, - piclsbl_handler, NULL); -} - -static void -piclsbl_fini(void) -{ - /* unregister the event handler */ - (void) ptree_unregister_handler(PICLEVENT_SYSEVENT_DEVICE_ADDED, - piclsbl_handler, NULL); - (void) ptree_unregister_handler(PICLEVENT_SYSEVENT_DEVICE_REMOVED, - piclsbl_handler, NULL); -} - -static void -piclsbl_register(void) -{ - picld_plugin_register(&piclsbl_reg); -} diff --git a/usr/src/cmd/picl/plugins/sun4v/piclsbl/piclsbl.h b/usr/src/cmd/picl/plugins/sun4v/piclsbl/piclsbl.h deleted file mode 100644 index 85cd2629e6..0000000000 --- a/usr/src/cmd/picl/plugins/sun4v/piclsbl/piclsbl.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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 _PICLSBL_H -#define _PICLSBL_H - -#ifdef __cplusplus -extern "C" { -#endif - -picl_nodehdl_t root_node; - -/* lookup struct for ptree callback */ -typedef struct disk_lookup { - char *path; - picl_nodehdl_t disk; - int result; -} disk_lookup_t; - -#define DISK_FOUND 0x00 -#define DISK_NOT_FOUND 0x01 - -#define PCPLIB "libpcp.so" -#define LIB_PCP_PATH "/usr/platform/sun4v/lib/" -#define LED_CHANNEL "/devices/virtual-devices@100/led@d:glvc" -#define PCPINIT_TIMEOUT 0x05 -#define PCPCOMM_TIMEOUT 0x10 - -#define NAC_DISK_PREFIX "HDD" - -/* sun4v platforms that do not need to handle SBL events */ -#define ERIE_PLATFORM "SUNW,Sun-Fire-T1000" -#define ERIE_PLATFORM2 "SUNW,SPARC-Enterprise-T1000" - -/* message types */ -#define PCP_SBL_CONTROL 0x3 -#define PCP_SBL_CONTROL_R 0x4 - -/* pcp request structure */ -typedef struct pcp_sbl_req { - uint32_t sbl_id; - uint32_t sbl_action; -} pcp_sbl_req_t; - -/* sbl_action */ -#define PCP_SBL_ENABLE 0x1 -#define PCP_SBL_DISABLE 0x2 - -/* pcp response structure */ -typedef struct pcp_sbl_resp { - uint32_t status; - uint32_t sbl_id; - uint32_t sbl_state; -} pcp_sbl_resp_t; - -/* status */ -#define PCP_SBL_OK 0x1 -#define PCP_SBL_ERROR 0x2 - -/* sbl_state */ -#define SBL_STATE_ON 0x1 -#define SBL_STATE_OFF 0x2 -#define SBL_STATE_UNKNOWN 0x3 - -#ifdef __cplusplus -} -#endif - -#endif /* _PICLSBL_H */ diff --git a/usr/src/cmd/picl/plugins/sun4v/pri/Makefile b/usr/src/cmd/picl/plugins/sun4v/pri/Makefile deleted file mode 100644 index aa0358ba55..0000000000 --- a/usr/src/cmd/picl/plugins/sun4v/pri/Makefile +++ /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 2007 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# ident "%Z%%M% %I% %E% SMI" -# -# cmd/picl/plugins/sun4v/pri/Makefile -# -LIBRARY= libpriplugin.a -VERS= .1 - -OBJS_DIR= pics - -OBJECTS= priplugin.o init.o \ - mem_prop_update.o io_dev_label.o \ - mdesc_findname.o mdesc_findnodeprop.o \ - mdesc_fini.o mdesc_getpropstr.o \ - mdesc_getpropval.o mdesc_init_intern.o \ - mdesc_nodecount.o mdesc_rootnode.o \ - mdesc_scandag.o mdesc_getpropdata.o - -# include library definitions -include $(SRC)/lib/Makefile.lib -include $(SRC)/Makefile.psm - -include $(SRC)/cmd/picl/plugins/Makefile.com - -SRCS= $(OBJECTS:%.o=%.c) - -$(OBJS_DIR)/%.o: $(SRC)/common/mdesc/%.c - $(COMPILE.c) -o $@ $< - $(CTFCONVERT_O) - -LIBS = $(DYNLIB) - -ROOT_PLATFORM = $(USR_PLAT_DIR)/sun4v -DYNFLAGS_PLAT = /usr/platform/\$$PLATFORM/lib/picl/plugins -DYNFLAGS_SUN4V = /usr/platform/sun4v/lib/picl/plugins -DYNFLAGS_COM = /usr/lib/picl/plugins - -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CPPFLAGS += -I$(SRC)/common/mdesc -CPPFLAGS += -I$(SRC)/uts/common/sys -CPPFLAGS += -I$(SRC)/lib/libpri/common - -LDLIBS += -L$(SRC)/lib/libpicl/$(MACH) -L$(SRC)/lib/libpicltree/$(MACH) -LDLIBS += -L$(ROOT)/usr/lib/picl/plugins -L$(ROOT)/usr/lib/sparcv9 -LDLIBS += -L$(ROOT)/usr/lib/libpri -LDLIBS += -L$(ROOT_PLATFORM)/lib -L$(ROOT_PLATFORM)/lib/picl/plugins - -LDLIBS += -lc -lpicl -lpicltree -lpicldevtree -lpri - -# No interfaces from libsnmpplugin.so directly used here, but we need the -# snmp plugin to load and init before libpriplugin.so. -# -LDLIBS += -lsnmpplugin - -#DYNFLAGS += -R$(DYNFLAGS_COM) -$(SPARC_BLD)LDLIBS += -R$(DYNFLAGS_PLAT) \ - -R$(DYNFLAGS_SUN4V) -LDLIBS += -R$(DYNFLAGS_COM) - - -.KEEP_STATE: - -all: $(LIBS) $(LIBLINKS) - -install: all $(ROOTLIBDIR) $(ROOTLIBS) $(ROOTLINKS) - -$(LIBLINKS): FRC - $(RM) $(LIBLINKS); $(SYMLINK) $(DYNLIB) $(LIBLINKS) - -# include library targets -include $(SRC)/cmd/picl/plugins/Makefile.targ -include $(SRC)/lib/Makefile.targ - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4v/pri/init.c b/usr/src/cmd/picl/plugins/sun4v/pri/init.c deleted file mode 100644 index d2d629217b..0000000000 --- a/usr/src/cmd/picl/plugins/sun4v/pri/init.c +++ /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 2007 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#include -#include -#include -#include -#include -#include "priplugin.h" - -static void pri_free(void *bufp, size_t size); -static uint64_t *md_bufp = NULL; -static uint64_t *new_md_bufp; - -int -pri_devinit(uint64_t *tok) -{ - int status; - - new_md_bufp = NULL; - status = 0; - if (pri_get(PRI_WAITGET, tok, &new_md_bufp, malloc, pri_free) == - (ssize_t)-1) { - pri_debug(LOG_NOTICE, "pri_devinit: can'r read from " - "the PRI: %d\n", errno); - status = -1; - } - if (new_md_bufp == NULL) { - pri_debug(LOG_NOTICE, "pri_devinit: pri_get returned " - "NULL buffer!\n"); - status = -1; - } - return (status); -} - -md_t * -pri_bufinit(md_t *mdp) -{ - - if (mdp) - md_fini(mdp); - free(md_bufp); - md_bufp = new_md_bufp; - - pri_debug(LOG_NOTICE, "pri_bufinit: done reading PRI\n"); - - /* - * The PRI and the MD use the same data format so they can be - * parsed by the same functions. - */ - if (md_bufp) { - mdp = md_init_intern(md_bufp, malloc, pri_free); - if (mdp == NULL) { - pri_debug(LOG_NOTICE, "pri_bufinit: md_init_intern " - "failed\n"); - free(md_bufp); - md_bufp = NULL; - } else { - pri_debug(LOG_NOTICE, "pri_bufinit: mdi_init_intern " - "completed successfully\n"); - } - } else - mdp = NULL; - - pri_debug(LOG_NOTICE, "pri_bufinit: returning\n"); - - return (mdp); -} - -/*ARGSUSED*/ -static void -pri_free(void *bufp, size_t size) -{ - free(bufp); -} - -void -pri_devfini(md_t *mdp) -{ - if (mdp) - (void) md_fini(mdp); - - free(md_bufp); - md_bufp = NULL; -} diff --git a/usr/src/cmd/picl/plugins/sun4v/pri/io_dev_label.c b/usr/src/cmd/picl/plugins/sun4v/pri/io_dev_label.c deleted file mode 100644 index 2d942bc46d..0000000000 --- a/usr/src/cmd/picl/plugins/sun4v/pri/io_dev_label.c +++ /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 2007 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "priplugin.h" - -static int -find_node_by_string_prop(picl_nodehdl_t rooth, const char *pname, - const char *pval, picl_nodehdl_t *nodeh); -static int -compare_string_propval(picl_nodehdl_t nodeh, const char *pname, - const char *pval); - -/* - * Gather IO device nodes from the PRI and use the info to - * find the corresponding nodes in PICL's device tree, insert - * a Label into the devtree containing the "nac" from the PRI, - * and add a reference property to the corresponding fru tree node. - */ -void -io_dev_addlabel(md_t *mdp) -{ - int status, substatus, i, node_count, component_count, busaddr_match; - int type_size, nac_size; - picl_nodehdl_t platnode, tpn; - char busaddr[PICL_PROPNAMELEN_MAX], *p, *q; - char path[PICL_PROPNAMELEN_MAX]; - mde_cookie_t *components, md_rootnode; - char *type, *nac, *pri_path, *saved_path; - - if (mdp == NULL) - return; - - md_rootnode = md_root_node(mdp); - - /* - * Find and remember the roots of the /frutree and /platform trees. - */ - if ((status = ptree_get_node_by_path(PLATFORM_PATH, &platnode)) != - PICL_SUCCESS) { - pri_debug(LOG_NOTICE, - "io_dev_label: can't find platform node: %s\n", - picl_strerror(status)); - return; - } - - node_count = md_node_count(mdp); - if (node_count == 0) { - pri_debug(LOG_NOTICE, "io_dev_addlabel: no nodes to " - "process\n"); - return; - } - components = (mde_cookie_t *)malloc(node_count * - sizeof (mde_cookie_t)); - if (components == NULL) { - pri_debug(LOG_NOTICE, - "io_dev_addlabel: can't get memory for IO nodes\n"); - return; - } - - component_count = md_scan_dag(mdp, md_rootnode, - md_find_name(mdp, "component"), - md_find_name(mdp, "fwd"), components); - - for (i = 0; i < component_count; ++i) { - tpn = platnode; - - /* - * Try to fetch the "type" as a string or as "data" until we - * can agree on what its tag type should be. - */ - if (md_get_prop_str(mdp, components[i], "type", &type) == - -1) { - if (md_get_prop_data(mdp, components[i], "type", - (uint8_t **)&type, &type_size)) { - pri_debug(LOG_NOTICE, "io_add_devlabel: " - "can't get type for component %d\n", i); - continue; - } - } - - /* - * Isolate components of type "io". - */ - if (strcmp((const char *)type, "io")) { - pri_debug(LOG_NOTICE, - "io_add_devlabel: skipping component %d with " - "type %s\n", i, type); - continue; - } - - /* - * Now get the nac and raw path from the PRI. - */ - if (md_get_prop_str(mdp, components[i], "nac", &nac) == -1) { - pri_debug(LOG_NOTICE, - "io_add_devlabel: can't get nac value for device " - "<%s>\n", type); - continue; - } else - nac_size = strlen(nac) + 1; - - if (md_get_prop_str(mdp, components[i], "path", &pri_path) == - -1) { - pri_debug(LOG_NOTICE, - "io_add_devlabel: can't get path value for " - "device <%s>\n", type); - continue; - } - - (void) strlcpy(path, pri_path, sizeof (path)); - - pri_debug(LOG_NOTICE, "io_add_devlabel: processing component " - "%d, type <%s>, nac <%s>, path <%s>\n", i, type, nac, - path); - - /* - * This loop visits each path component where those - * components are delimited with '/' and '@' characters. - * Each path component is a search key into the /platform - * tree; we're looking to match the bus-addr field of - * a node if that field is defined. If each path component - * matches up then we now have the corresponding device - * path for that IO device. Add a Label property to the - * leaf node. - */ - for (busaddr_match = 1, p = q = (char *)path; q; p = q + 1) { - - /* - * Isolate the bus address for this node by skipping - * over the first delimiter if present and writing - * a NUL character over the next '/'. - */ - if (*p == '/') - ++p; - if (*p == '@') - ++p; - if ((q = strchr((const char *)p, '/')) != NULL) - *q = '\0'; - - /* - * See if there's a match, at this level only, in the - * device tree. We cannot skip generations in the - * device tree, which is why we're not doing a - * recursive search for bus-addr. bus-addr must - * be found at each node along the way. By doing - * this we'll stay in sync with the path components - * in the PRI. - */ - if ((status = find_node_by_string_prop(tpn, - PICL_PROP_BUS_ADDR, (const char *)p, &tpn)) != - PICL_SUCCESS) { - pri_debug(LOG_NOTICE, - "can't find %s property of <%s> " - "for nac %s: %s\n", - PICL_PROP_BUS_ADDR, p, nac, - picl_strerror(status)); - busaddr_match = 0; - break; - } - - /* - * Note path component for the leaf so we can use - * it below. - */ - saved_path = p; - } - - /* - * We could not drill down through the bus-addrs, so skip this - * device and move on to the next. - */ - if (busaddr_match == 0) { - pri_debug(LOG_NOTICE, "io_add_devlabel: no matching " - "bus-addr path for this nac - skipping\n"); - continue; - } - - nac_size = strlen((const char *)nac) + 1; - - /* - * This loop adds a Label property to all the functions - * on the device we matched from the PRI path. - */ - for (status = PICL_SUCCESS; status == PICL_SUCCESS; - status = ptree_get_propval_by_name(tpn, - PICL_PROP_PEER, &tpn, sizeof (picl_nodehdl_t))) { - /* - * Add Labels to peers that have the same bus-addr - * value (ignoring the function numbers.) - */ - if ((substatus = ptree_get_propval_by_name(tpn, - PICL_PROP_BUS_ADDR, - busaddr, sizeof (busaddr))) != PICL_SUCCESS) { - pri_debug(LOG_NOTICE, - "io_add_device: can't get %s " - "property from picl devtree: %s\n", - PICL_PROP_BUS_ADDR, - picl_strerror(substatus)); - } else { - if (strncmp(busaddr, saved_path, - PICL_PROPNAMELEN_MAX) == 0) { - add_md_prop(tpn, nac_size, - PICL_PROP_LABEL, nac, - PICL_PTYPE_CHARSTRING); - } - } - } - } - free(components); -} - -/* - * These two functions shamelessly stolen from picldevtree.c - */ - -/* - * Return 1 if this node has this property with the given value. - */ -static int -compare_string_propval(picl_nodehdl_t nodeh, const char *pname, - const char *pval) -{ - char *pvalbuf; - int err; - int len; - ptree_propinfo_t pinfo; - picl_prophdl_t proph; - - err = ptree_get_prop_by_name(nodeh, pname, &proph); - if (err != PICL_SUCCESS) /* prop doesn't exist */ - return (0); - - err = ptree_get_propinfo(proph, &pinfo); - if (pinfo.piclinfo.type != PICL_PTYPE_CHARSTRING) - return (0); /* not string prop */ - - len = strlen(pval) + 1; - - pvalbuf = alloca(len); - if (pvalbuf == NULL) - return (0); - - err = ptree_get_propval(proph, pvalbuf, len); - if ((err == PICL_SUCCESS) && (strcmp(pvalbuf, pval) == 0)) - return (1); /* prop match */ - - return (0); -} - -/* - * Search this node's children for the given property. - */ -static int -find_node_by_string_prop(picl_nodehdl_t rooth, const char *pname, - const char *pval, picl_nodehdl_t *nodeh) -{ - picl_nodehdl_t childh; - int err; - - for (err = ptree_get_propval_by_name(rooth, PICL_PROP_CHILD, &childh, - sizeof (picl_nodehdl_t)); err != PICL_PROPNOTFOUND; - err = ptree_get_propval_by_name(childh, PICL_PROP_PEER, - &childh, sizeof (picl_nodehdl_t))) { - if (err != PICL_SUCCESS) - return (err); - - if (compare_string_propval(childh, pname, pval)) { - *nodeh = childh; - return (PICL_SUCCESS); - } - } - return (PICL_ENDOFLIST); -} diff --git a/usr/src/cmd/picl/plugins/sun4v/pri/mem_prop_update.c b/usr/src/cmd/picl/plugins/sun4v/pri/mem_prop_update.c deleted file mode 100644 index c27a38f698..0000000000 --- a/usr/src/cmd/picl/plugins/sun4v/pri/mem_prop_update.c +++ /dev/null @@ -1,329 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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. - */ - -/* - * The PRI plug-in picks up memory configuration data from the PRI - * and injects this into PICL's /platform tree. It only populates - * the logical view of memory: memory, memory-segment, memory-bank. - * It does not populate the /device tree since there are no memory - * controller devices on sun4v. - */ - -#include "priplugin.h" -#include "../../common/memcfg/piclmemcfg.h" - -static void -add_memory_props(picl_nodehdl_t node, mde_cookie_t memorylistp, md_t *mdp, - uint64_t size); - -static void -add_bank_props(picl_nodehdl_t node, mde_cookie_t banklistp, - md_t *mdp, uint64_t *size, uint64_t *mask, unsigned int id); -static uint64_t countbits(uint64_t v); - -static void -add_segment_props(picl_nodehdl_t node, mde_cookie_t segmentlistp, - md_t *mdp, uint64_t interleave, uint64_t *size, uint64_t base); - -/* - * Callback function for picl_walk_tree_by_class(). - * NOTE: picl_walk_tree_by_class() maps the return codes PICL_WALK_CONTINUE - * and PICL_WALK_TERMINATE to PICL_SUCCESS. - */ -int -add_mem_prop(picl_nodehdl_t node, void *args) -{ - mde_cookie_t *memorylistp, *segmentlistp, *banklistp; - picl_prophdl_t memh, segmenth, bankh; - mde_cookie_t *buf, md_rootnode; - int j, k, num_nodes, interleave, err; - int nsegments, nbanks, nmemory; - uint64_t memsize, segsize, segbase; - uint64_t size, mask; - md_t *mdp = (md_t *)args; - - if (mdp == NULL) - return (PICL_WALK_CONTINUE); - - md_rootnode = md_root_node(mdp); - - /* - * An absence of nodes or failure to obtain memory for searches - * or absence of the /memory node will cause this to fail. - * Return PICL_WALK_SUCCESS to allow the plug-in to continue. - */ - num_nodes = md_node_count(mdp); - if (num_nodes == 0) { - pri_debug(LOG_NOTICE, "add_mem_prop: no nodes to walk\n"); - return (PICL_SUCCESS); - } - buf = (mde_cookie_t *)malloc(sizeof (mde_cookie_t) * num_nodes * 3); - if (buf == NULL) { - pri_debug(LOG_NOTICE, "add_mem_prop: can't allocate memory\n"); - return (PICL_SUCCESS); - } - - memorylistp = &buf[0]; - segmentlistp = &buf[num_nodes]; - banklistp = &buf[num_nodes * 2]; - - if ((ptree_get_node_by_path(MEMORY_PATH, &memh)) != PICL_SUCCESS) { - pri_debug(LOG_NOTICE, - "add_mem_prop: can't find /memory node in platform tree\n"); - free(buf); - return (PICL_SUCCESS); - } - - /* - * There should be only one memory node. - * If we can't find what we're looking for in the DAG then - * return PICL_PROPNOTFOUND to get the caller to re-try with - * a different property name. - */ - nmemory = md_scan_dag(mdp, md_rootnode, md_find_name(mdp, - "memory-segments"), md_find_name(mdp, "fwd"), memorylistp); - if (nmemory != 1) { - pri_debug(LOG_NOTICE, - "add_mem_prop: wrong number of memory dags: expected " - "1, got %d\n", nmemory); - free(buf); - return (PICL_PROPNOTFOUND); - } - - nsegments = md_scan_dag(mdp, memorylistp[0], - md_find_name(mdp, "memory-segment"), - md_find_name(mdp, "fwd"), - segmentlistp); - - if (nsegments == 0) { - pri_debug(LOG_NOTICE, "add_mem_prop: wrong number of memory " - "segments: expected >0, got %d\n", nsegments); - free(buf); - return (PICL_PROPNOTFOUND); - } - - /* - * Add memory segments, keep running total of system memory. - */ - for (memsize = 0, segsize = 0, j = 0; j < nsegments; - ++j, memsize += segsize) { - nbanks = 0; - err = ptree_create_and_add_node(memh, - PICL_NAME_MEMORY_SEGMENT, - PICL_CLASS_MEMORY_SEGMENT, &segmenth); - if (err == PICL_SUCCESS) { - size = 0; - mask = 0; - - /* - * Need to pull this out here since it's used for - * the ID. - */ - if (md_get_prop_val(mdp, segmentlistp[j], "base", - &segbase)) - segbase = 0ULL; - - /* - * Add banks under each segment. - */ - nbanks = md_scan_dag(mdp, segmentlistp[j], - md_find_name(mdp, "memory-bank"), - md_find_name(mdp, "fwd"), - banklistp); - - if (nbanks <= 0) { - pri_debug(LOG_NOTICE, "add_mem_prop: no banks " - "found for segment %d\n", j); - } else { - for (k = 0; k < nbanks; ++k) { - err = - ptree_create_and_add_node(segmenth, - PICL_NAME_MEMORY_BANK, - PICL_CLASS_MEMORY_BANK, &bankh); - if (err == PICL_SUCCESS) { - /* - * Add AddressMatch, - * AddressMask, Size, and - * ID to each bank. - */ - add_bank_props(bankh, - banklistp[k], - mdp, - &size, &mask, - (segbase >> 32) * j + k); - } - } - } - } - - /* - * Add Interleave, BaseAddress, and Size to each segment. - */ - interleave = 2 << (countbits(mask & (size - 1)) - 1); - add_segment_props(segmenth, segmentlistp[j], - mdp, interleave, &segsize, segbase); - } - - /* - * Add TransferSize and Size (total memory) to this node. - */ - add_memory_props(memh, memorylistp[0], mdp, memsize); - - free(buf); - return (PICL_WALK_CONTINUE); -} - -static void -add_bank_props(picl_nodehdl_t bankh, mde_cookie_t banklistp, - md_t *mdp, uint64_t *size, uint64_t *mask, unsigned int id) -{ - uint64_t int_value; - mde_cookie_t *dimmlistp; - int node_count, i, type_size, nac_size, status; - uint8_t *type; - char *pc, *nac; - picl_prophdl_t dimmh; - - *size = 0ULL; - *mask = 0ULL; - - node_count = md_node_count(mdp); - dimmlistp = (mde_cookie_t *)malloc(node_count * sizeof (mde_cookie_t)); - if (dimmlistp == NULL) { - pri_debug(LOG_NOTICE, - "add_bank_props: can't allocate memory\n"); - return; - } - - if (!md_get_prop_val(mdp, banklistp, "size", &int_value)) { - add_md_prop(bankh, sizeof (int_value), PICL_PROP_SIZE, - &int_value, PICL_PTYPE_UNSIGNED_INT); - *size = int_value; - } - if (!md_get_prop_val(mdp, banklistp, "mask", - &int_value)) { - add_md_prop(bankh, sizeof (int_value), - PICL_PROP_ADDRESSMASK, - &int_value, PICL_PTYPE_UNSIGNED_INT); - *mask = int_value; - } - if (!md_get_prop_val(mdp, banklistp, "match", - &int_value)) { - add_md_prop(bankh, sizeof (int_value), - PICL_PROP_ADDRESSMATCH, - &int_value, PICL_PTYPE_UNSIGNED_INT); - } - - add_md_prop(bankh, sizeof (id), PICL_PROP_ID, &id, - PICL_PTYPE_INT); - - node_count = md_scan_dag(mdp, banklistp, md_find_name(mdp, "component"), - md_find_name(mdp, "fwd"), dimmlistp); - - for (i = 0; i < node_count; ++i) { - status = md_get_prop_str(mdp, dimmlistp[i], "type", - (char **)&type); - if (status == -1) { - status = md_get_prop_data(mdp, dimmlistp[i], - "type", &type, &type_size); - } - if (status == -1) /* can't get node type - just skip */ - continue; - if (strcmp((const char *)type, "dimm") == 0) { - if (md_get_prop_str(mdp, dimmlistp[i], "nac", - (char **)&nac) == 0) { - nac_size = strlen(nac) + 1; - if (ptree_create_and_add_node(bankh, - PICL_NAME_MEMORY_MODULE, - PICL_CLASS_MEMORY_MODULE, &dimmh) == - PICL_SUCCESS) { - add_md_prop(dimmh, nac_size, - "nac", nac, - PICL_PTYPE_CHARSTRING); - if ((pc = strrchr(nac, '/')) != NULL) - nac = ++pc; - nac_size = strlen(nac) + 1; - add_md_prop(dimmh, nac_size, - PICL_PROP_LABEL, nac, - PICL_PTYPE_CHARSTRING); - } - } - } - } - free(dimmlistp); -} - -static uint64_t -countbits(uint64_t v) -{ - uint64_t c; /* c accumulates the total bits set in v */ - - for (c = 0; v; c++) - v &= v - 1; /* clear the least significant bit set */ - return (c); -} - -static void -add_segment_props(picl_nodehdl_t node, mde_cookie_t segmentlistp, - md_t *mdp, uint64_t interleave, uint64_t *size, uint64_t base) -{ - uint64_t int_value; - - *size = 0; - if (!md_get_prop_val(mdp, segmentlistp, "size", &int_value)) { - add_md_prop(node, sizeof (int_value), - PICL_PROP_SIZE, &int_value, - PICL_PTYPE_UNSIGNED_INT); - *size = int_value; - } - add_md_prop(node, sizeof (base), PICL_PROP_BASEADDRESS, - &base, PICL_PTYPE_UNSIGNED_INT); - - add_md_prop(node, sizeof (interleave), PICL_PROP_INTERLEAVE_FACTOR, - &interleave, PICL_PTYPE_UNSIGNED_INT); -} - -static void -add_memory_props(picl_nodehdl_t node, mde_cookie_t memorylistp, md_t *mdp, - uint64_t size) -{ - uint64_t int_value; - - /* - * If the top-level node has a size property then use that, - * otherwise use the size that was calculated by the caller - * and passed in. - */ - if (md_get_prop_val(mdp, memorylistp, "size", &int_value)) - int_value = size; - add_md_prop(node, sizeof (int_value), PICL_PROP_SIZE, &int_value, - PICL_PTYPE_UNSIGNED_INT); - if (!md_get_prop_val(mdp, memorylistp, "transfer_size", - &int_value)) { - add_md_prop(node, sizeof (int_value), - PICL_PROP_TRANSFER_SIZE, - &int_value, PICL_PTYPE_UNSIGNED_INT); - } -} diff --git a/usr/src/cmd/picl/plugins/sun4v/pri/priplugin.c b/usr/src/cmd/picl/plugins/sun4v/pri/priplugin.c deleted file mode 100644 index 7ef1bad438..0000000000 --- a/usr/src/cmd/picl/plugins/sun4v/pri/priplugin.c +++ /dev/null @@ -1,433 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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 -#include "priplugin.h" - -#pragma init(priplugin_register) /* place in .init section */ - -static md_t *mdp; - -static mutex_t rebuild_lock; -static cond_t rebuild_cv; - -static thread_t pri_worker_thread_id, pri_reader_thread_id; -static boolean_t all_thr_exit = B_FALSE; -static boolean_t event_caught = B_FALSE; - -static void priplugin_init(void); -static void priplugin_fini(void); -static void -event_handler(const char *ename, const void *earg, size_t size, void *cookie); -static void *pri_worker_thread(void *arg); -static void *pri_reader_thread(void *arg); -static int remove_old_segments(picl_nodehdl_t node, void *args); - - -picld_plugin_reg_t priplugin_reg = { - PICLD_PLUGIN_VERSION_1, - PICLD_PLUGIN_CRITICAL, - "pri_plugin", - priplugin_init, - priplugin_fini -}; - -static void -set_prop_info(ptree_propinfo_t *propinfo, int size, char *name, int type) -{ - propinfo->version = PICLD_PLUGIN_VERSION_1; - propinfo->read = NULL; - propinfo->write = NULL; - propinfo->piclinfo.type = type; - propinfo->piclinfo.accessmode = PICL_READ; - propinfo->piclinfo.size = size; - (void) strlcpy(propinfo->piclinfo.name, name, - sizeof (propinfo->piclinfo.name)); -} - -boolean_t -prop_exists(picl_nodehdl_t node, char *name) -{ - int status; - picl_prophdl_t proph; - - status = ptree_get_prop_by_name(node, name, &proph); - if (status == PICL_SUCCESS) - return (B_TRUE); - else - return (B_FALSE); -} - -void -add_md_prop(picl_nodehdl_t node, int size, char *name, void* value, int type) -{ - ptree_propinfo_t propinfo; - picl_prophdl_t proph; - - if (!prop_exists(node, name)) { - set_prop_info(&propinfo, size, name, type); - - (void) ptree_create_and_add_prop(node, &propinfo, - value, &proph); - } -} - -/*ARGSUSED*/ -static int -remove_old_segments(picl_nodehdl_t node, void *args) -{ - int status; - - if ((status = ptree_delete_node(node)) == PICL_SUCCESS) - ptree_destroy_node(node); - else - pri_debug(LOG_NOTICE, "remove_old_segments: can't delete " - "segment node: %s\n", picl_strerror(status)); - - return (PICL_WALK_CONTINUE); -} - -static void -priplugin_init(void) -{ - int status; - - pri_debug(LOG_NOTICE, "priplugin: mem tree and io label thread " - "being created; callbacks being registered\n"); - - all_thr_exit = B_FALSE; - event_caught = B_FALSE; - - (void) mutex_init(&rebuild_lock, USYNC_THREAD, NULL); - (void) cond_init(&rebuild_cv, USYNC_THREAD, NULL); - - if ((status = thr_create(NULL, NULL, pri_worker_thread, NULL, THR_BOUND, - &pri_worker_thread_id)) < 0) { - pri_debug(LOG_NOTICE, "priplugin: can't create worker thread: " - "%d\n", status); - all_thr_exit = B_TRUE; - (void) mutex_destroy(&rebuild_lock); - (void) cond_destroy(&rebuild_cv); - } else if ((status = thr_create(NULL, NULL, pri_reader_thread, NULL, - THR_BOUND, &pri_reader_thread_id)) < 0) { - pri_debug(LOG_NOTICE, "priplugin: can't create reader thread: " - "%d\n", status); - (void) mutex_lock(&rebuild_lock); - all_thr_exit = B_TRUE; - (void) cond_signal(&rebuild_cv); - (void) mutex_unlock(&rebuild_lock); - (void) thr_join(pri_worker_thread_id, NULL, NULL); - (void) mutex_destroy(&rebuild_lock); - (void) cond_destroy(&rebuild_cv); - } else { - pri_debug(LOG_NOTICE, "priplugin_init: worker and reader " - "threads created - registering event handlers\n"); - /* - * register event_handler for both "sysevent-device-added", - * "sysevent_device_removed", and for - * "sysevent-dr-app-state-change" PICL events - */ - (void) ptree_register_handler(PICLEVENT_SYSEVENT_DEVICE_ADDED, - event_handler, NULL); - (void) ptree_register_handler(PICLEVENT_SYSEVENT_DEVICE_REMOVED, - event_handler, NULL); - (void) ptree_register_handler(PICLEVENT_DR_AP_STATE_CHANGE, - event_handler, NULL); - } -} - -/* - * This thread handles the main processing of PRI data. It is woken - * up by either the event handler, to process a PICL event, or it is - * woken up by the PRI reader thread which has just fetched a new - * copy of the PRI. - */ -/*ARGSUSED*/ -static void * -pri_worker_thread(void *arg) -{ - int status; - picl_nodehdl_t picl_root_node; - - pri_debug(LOG_NOTICE, "pri_worker_thread: start\n"); - - (void) mutex_lock(&rebuild_lock); - /*LINTED E_FUNC_RET_MAYBE_IGNORED2*/ - while (1) { - (void) cond_wait(&rebuild_cv, &rebuild_lock); - - if (all_thr_exit == B_TRUE) { - (void) mutex_unlock(&rebuild_lock); - pri_debug(LOG_NOTICE, "pri_worker_thread: time to " - "exit\n"); - break; - } - - /* - * We don't get events for changes to system memory, - * and we do not want to interfere with other plug-ins - * by making changes to the picl tree. So if we were - * woken up by a thread then do not destroy and rebuild - * the memory info. Just go fix the labels. - */ - if (event_caught == B_FALSE) { - status = ptree_get_root(&picl_root_node); - if (status != PICL_SUCCESS) { - pri_debug(LOG_NOTICE, "pri_worker_thread: " - "can't get picl tree root node: %s\n", - picl_strerror(status)); - continue; - } - - pri_debug(LOG_NOTICE, "pri_worker_thread: have root " - "picl and PRI nodes\n"); - - status = ptree_walk_tree_by_class(picl_root_node, - "memory-segment", NULL, remove_old_segments); - if (status != PICL_SUCCESS) { - pri_debug(LOG_NOTICE, "pri_worker_thread: " - "can't remove old memory segments: \n", - picl_strerror(status)); - } else - pri_debug(LOG_NOTICE, "pri_worker_thread: " - "old memory segments removed\n"); - - status = ptree_walk_tree_by_class(picl_root_node, - "memory", (void *) mdp, add_mem_prop); - if (status != PICL_SUCCESS) { - pri_debug(LOG_NOTICE, "pri_worker_thread: " - "memory segments walk failed: \n", - picl_strerror(status)); - } else - pri_debug(LOG_NOTICE, "pri_worker_thread: " - "success walking memory node\n"); - } else - event_caught = B_FALSE; - - io_dev_addlabel(mdp); - } - pri_debug(LOG_NOTICE, "pri_worker_thread: exiting\n"); - return (NULL); -} - -/* - * This thread camps out in the PRI driver, waiting for it to return - * the contents of a new PRI. When the PRI is changed this thread - * reads that data and prepares it for processing by the worker thread. - * It then signals the worker thread to process the new PRI data. - */ -/*ARGSUSED*/ -static void * -pri_reader_thread(void *arg) -{ - uint64_t tok; - int status, count; - - pri_debug(LOG_NOTICE, "pri_reader_thread: thread start\n"); - - if (pri_init() != 0) { - pri_debug(LOG_NOTICE, "pri_reader_thread: pri_init failed\n"); - return (NULL); - } - - /* - * It's entirely possible that a new PRI may get pushed while - * the worker thread is processing the previous PRI. We will - * wait until the worker is finished, then flush the old contents - * and wake up the worker again to process the new data. - */ - mdp = NULL; - tok = 0; - count = 0; - /*LINTED E_FUNC_RET_MAYBE_IGNORED2*/ - while (1) { - /* - * The _fini() function will close the PRI's fd, which will - * cause this function to break out of waiting in the PRI - * driver and return an error. - */ - status = pri_devinit(&tok); - - (void) mutex_lock(&rebuild_lock); - if (all_thr_exit == B_TRUE) { - (void) mutex_unlock(&rebuild_lock); - pri_debug(LOG_NOTICE, "pri_reader_thread: time to " - "exit\n"); - break; - } - - /* - * Wait until the worker is idle before swapping in the - * new PRI contents, then signal the worker to process - * that new data. - */ - if (status == 0) { - pri_debug(LOG_NOTICE, "pri_reader_thread: got PRI\n"); - - /* old buffer will be freed by pri_bufinit() */ - mdp = pri_bufinit(mdp); - if (mdp != NULL) { - (void) cond_signal(&rebuild_cv); - count = 0; - } else { - pri_debug(LOG_NOTICE, "pri_reader_thread: " - "NULL mdp!\n"); - status = -1; - } - } - - /* - * Try to handle SP resets or other unexplained errors - * from ds by closing down and re-opening the PRI driver. - */ - if (status == -1) { - if (errno != 0) { - pri_debug(LOG_NOTICE, "pri_reader_thread: " - "can't get PRI contents: %s\n", - strerror(errno)); - } - if (++count > 6) { - pri_debug(LOG_NOTICE, "pci_reader_thread: " - "can't process PRI data\n"); - (void) mutex_unlock(&rebuild_lock); - break; - } - /* old buffer will be freed by pri_fini() */ - pri_fini(); - tok = 0; - sleep(10); - if (pri_init() != 0) { - pri_debug(LOG_NOTICE, "pci_reader_thread: " - "can't reinitialize PRI driver\n"); - (void) mutex_unlock(&rebuild_lock); - break; - } - } - (void) mutex_unlock(&rebuild_lock); - } - - pri_debug(LOG_NOTICE, "pri_reader_thread: thread exiting\n"); - return (NULL); -} - -static void -priplugin_fini(void) -{ - pri_debug(LOG_NOTICE, "priplugin_fini: called\n"); - - if (all_thr_exit == B_TRUE) - return; - - /* unregister the event handlers */ - (void) ptree_unregister_handler(PICLEVENT_SYSEVENT_DEVICE_ADDED, - event_handler, NULL); - (void) ptree_unregister_handler(PICLEVENT_SYSEVENT_DEVICE_REMOVED, - event_handler, NULL); - (void) ptree_unregister_handler(PICLEVENT_DR_AP_STATE_CHANGE, - event_handler, NULL); - - /* - * Set the exit flag to tell the worker thread to quit and wake - * up that thread. Once that thread is reaped then pull the rug - * out from the PRI reader thread by calling pri_fini(), which - * closes the PRI fd. That wakes the PRI reader thread and it - * will then exit as well. - */ - (void) mutex_lock(&rebuild_lock); - all_thr_exit = B_TRUE; - (void) cond_signal(&rebuild_cv); - (void) mutex_unlock(&rebuild_lock); - - (void) thr_join(pri_worker_thread_id, NULL, NULL); - - pri_devfini(mdp); - mdp = NULL; - pri_fini(); - (void) thr_join(pri_reader_thread_id, NULL, NULL); - - (void) mutex_destroy(&rebuild_lock); - (void) cond_destroy(&rebuild_cv); -} - -void -priplugin_register(void) -{ - picld_plugin_register(&priplugin_reg); -} - -/* - * Discovery event handler - * respond to the picl events: - * PICLEVENT_SYSEVENT_DEVICE_ADDED - * PICLEVENT_SYSEVENT_DEVICE_REMOVED - * PICLEVENT_DR_AP_STATE_CHANGE - * - * We can't do much of anything fancy since the event data doesn't contain - * a nac for the device. Nothing to do for remove - the devtree plug-in - * will have removed the node for us. For add we have to go back and - * add labels again. - */ -static void -event_handler(const char *ename, const void *earg, size_t size, void *cookie) -{ - - pri_debug(LOG_NOTICE, "pri: event_handler: caught event " - "%s\n", ename); - if ((strcmp(ename, PICLEVENT_SYSEVENT_DEVICE_ADDED) == 0) || - (strcmp(ename, PICLEVENT_SYSEVENT_DEVICE_REMOVED) == 0) || - (strcmp(ename, PICLEVENT_DR_AP_STATE_CHANGE) == 0)) { - pri_debug(LOG_NOTICE, "pri: event_handler: handle event " - "%s; waking worker thread\n", ename); - - (void) mutex_lock(&rebuild_lock); - - if (all_thr_exit == B_FALSE) { - /* - * Tell the worker thread to only re-examine the - * IO device labels. - */ - event_caught = B_TRUE; - (void) cond_signal(&rebuild_cv); - } - - (void) mutex_unlock(&rebuild_lock); - } -} - -/*VARARGS2*/ -void -pri_debug(int level, char *fmt, ...) -{ -#if (PRI_DEBUG != 0) - va_list ap; - - va_start(ap, fmt); - vsyslog(level, fmt, ap); - va_end(ap); -#endif -} diff --git a/usr/src/cmd/picl/plugins/sun4v/pri/priplugin.h b/usr/src/cmd/picl/plugins/sun4v/pri/priplugin.h deleted file mode 100644 index cf9103c2d8..0000000000 --- a/usr/src/cmd/picl/plugins/sun4v/pri/priplugin.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 2007 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _PRIPLUGIN_H -#define _PRIPLUGIN_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef PRI_DEBUG -#define PRI_DEBUG 0 -#endif - -int add_mem_prop(picl_nodehdl_t node, void *args); -int pri_devinit(uint64_t *); -md_t *pri_bufinit(md_t *mdp); -void pri_devfini(md_t *mdp); -void pri_debug(int level, char *fmt, ...); -void add_md_prop(picl_nodehdl_t node, int size, char *name, void* value, - int type); -void io_dev_addlabel(md_t *mdp); - -#ifdef __cplusplus -} -#endif - -#endif /* _PRIPLUGIN_H */ diff --git a/usr/src/cmd/picl/plugins/sun4v/snmp/Makefile b/usr/src/cmd/picl/plugins/sun4v/snmp/Makefile deleted file mode 100644 index 2363f1ba74..0000000000 --- a/usr/src/cmd/picl/plugins/sun4v/snmp/Makefile +++ /dev/null @@ -1,90 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL 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" -# -# cmd/picl/plugins/sun4v/snmp/Makefile -# - -LIBRARY= libsnmpplugin.a -VERS= .1 - -OBJS_DIR= pics -OBJECTS= snmpplugin.o - -# Include library definitions -include $(SRC)/lib/Makefile.lib -include $(SRC)/Makefile.psm -include $(SRC)/cmd/picl/plugins/Makefile.com - -SRCS= $(OBJECTS:%.o=%.c) -LIBS = $(DYNLIB) - -ROOT_PLATFORM = $(USR_PLAT_DIR)/sun4v -ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) - -CPPFLAGS += -I. -I../include -I$(SRC)/uts/common/sys - -# -# Be careful when enabling SNMPPLUGIN_DEBUG. The debug log can quickly -# grow too large. NEVER stress/cycle test picl with SNMPPLUGIN_DEBUG -# enabled -# -#CPPFLAGS += -DSNMPPLUGIN_DEBUG - -LDLIBS += -L$(SRC)/lib/libpicltree/$(MACH) -LDLIBS += -L$(SRC)/cmd/picl/plugins/sun4v/lib/snmp -LDLIBS += -L$(ROOT)/usr/lib/sparcv9 -LDLIBS += -lc -lpicltree -lpiclsnmp -DYNFLAGS += -R/usr/platform/sun4v/lib - -POFILE = snmpplugin_sun4v.po -POFILES = $(SRCS:%.c=%.po) - -.KEEP_STATE: - -all: $(LIBS) $(LIBLINKS) - -install: all $(ROOTLIBDIR) $(ROOTLIBS) $(ROOTLINKS) - -$(LIBLINKS): FRC - $(RM) $(LIBLINKS); $(SYMLINK) $(DYNLIB) $(LIBLINKS) - -# Messages -_msg: $(MSGDOMAIN) $(POFILE) - $(RM) $(MSGDOMAIN)/$(POFILE) - $(CP) $(POFILE) $(MSGDOMAIN)/$(POFILE) - -$(MSGDOMAIN): - $(INS.dir) - -$(POFILE): $(POFILES) - $(CAT) $(POFILES) > $(POFILE) - -# Include library targets -include $(SRC)/cmd/picl/plugins/Makefile.targ -include $(SRC)/lib/Makefile.targ - -FRC: diff --git a/usr/src/cmd/picl/plugins/sun4v/snmp/snmpplugin.c b/usr/src/cmd/picl/plugins/sun4v/snmp/snmpplugin.c deleted file mode 100644 index fb9b6d5237..0000000000 --- a/usr/src/cmd/picl/plugins/sun4v/snmp/snmpplugin.c +++ /dev/null @@ -1,2079 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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. - */ - -/* - * The SNMP picl plugin connects to the agent on the SP and creates - * and populates the /physical-platform subtree in picl tree for use - * by picl consumers. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "picloids.h" -#include "libpiclsnmp.h" -#include "snmpplugin.h" - -#pragma init(snmpplugin_register) /* place in .init section */ - -picld_plugin_reg_t snmpplugin_reg = { - PICLD_PLUGIN_VERSION_1, - PICLD_PLUGIN_NON_CRITICAL, - "snmp_plugin", - snmpplugin_init, - snmpplugin_fini -}; - -static picl_snmphdl_t hdl; - -/* - * The stale_tree_rwlp protects the stale_xxx vars. The 'stale_tree' flag - * and the 'rebuild_tree' flag below are both initialized to B_TRUE to - * let the tree_builder() thread build the initial tree without blocking. - */ -static rwlock_t stale_tree_rwlp; -static boolean_t stale_tree = B_TRUE; - -/* - * vol_props, volprop_ndx and n_vol_props are protected by the stale_tree - * flag. They are read only when the stale_tree flag is B_FALSE and written - * to only when the flag is B_TRUE. - * - * The change_time (last changed time) is read by only one thread at a - * time when stale_tree is B_FALSE (protected by stale_tree_rwlp). It is - * written by only one thread (the tree builder) when stale_tree is B_TRUE. - * - * Note that strictly speaking, change_time should be uint_t (timeticks32). - * But keeping it as int is fine, since we don't do any arithmetic on it - * except equality check. - */ -static vol_prophdl_t *vol_props = NULL; -static int volprop_ndx = 0, n_vol_props = 0; -static int change_time = 0; -static time_t change_time_check; - -/* - * The rebuild_tree_lock and cv are used by the tree builder thread. - * rebuild_tree has to be initialized to B_TRUE to let the tree_builder - * do the first build without blocking. - */ -static mutex_t rebuild_tree_lock; -static cond_t rebuild_tree_cv; -static boolean_t rebuild_tree = B_TRUE; -static boolean_t tree_builder_thr_exit = B_FALSE; -static thread_t tree_builder_thr_id; - -/* - * The cache_refresh thread periodically queries the snmp cache refresh work - * queue and processes jobs from it to keep cache entries from expiring. It - * attempts to run in cycles of CACHE_REFRESH_CYCLE seconds each, first - * processing cache refresh jobs and then sleeping for the remainder of the - * cycle once the next refresh job expiration is at least - * CACHE_REFRESH_MIN_WINDOW seconds in the future. - * - * NOTE: By using a thread to keep the SNMP cache refreshed in the background, - * we are both adding load to the system and reducing the system's ability to - * operate in power-saving mode when there is minimal load. While these - * tradeoffs are acceptable at this time in light of customer concerns about - * performance, it may be desirable in the future to move this work into the - * firmware. Also, while the current cycle times performed well on the largest - * sun4v config currently available (Batoka), they may need to be revisited for - * future systems if the number of sensors increases significantly. - */ -#define CACHE_REFRESH_CYCLE 60 -#define CACHE_REFRESH_MIN_WINDOW 75 -static mutex_t cache_refresh_lock; -static cond_t cache_refresh_cv; -static boolean_t cache_refresh_thr_exit = B_FALSE; -static thread_t cache_refresh_thr_id; - -/* - * These two should really not be global - */ -static picl_nodehdl_t *physplat_nodes = NULL; -static int n_physplat_nodes = 0; - -static char *group1[] = { - OID_entPhysicalDescr, - OID_entPhysicalContainedIn, - OID_entPhysicalClass, - OID_entPhysicalName, - OID_entPhysicalHardwareRev, - OID_entPhysicalFirmwareRev, - OID_entPhysicalSerialNum, - OID_entPhysicalMfgName, - OID_entPhysicalModelName, - OID_entPhysicalIsFRU, - 0 -}; - -static char *group2[] = { - OID_sunPlatEquipmentHolderAcceptableTypes, - OID_sunPlatCircuitPackReplaceable, - OID_sunPlatCircuitPackHotSwappable, - OID_sunPlatPhysicalClass, - OID_sunPlatSensorClass, - OID_sunPlatSensorType, - OID_sunPlatAlarmType, - OID_sunPlatPowerSupplyClass, - 0 -}; - -static char *group3[] = { - OID_sunPlatNumericSensorEnabledThresholds, - OID_sunPlatNumericSensorBaseUnits, - OID_sunPlatNumericSensorRateUnits, - 0 -}; - -static char *group4[] = { - OID_sunPlatBinarySensorInterpretTrue, - OID_sunPlatBinarySensorInterpretFalse, - 0 -}; - -static char *volgroup1[] = { - OID_sunPlatBinarySensorCurrent, - OID_sunPlatBinarySensorExpected, - 0 -}; - -static char *volgroup2[] = { - OID_sunPlatNumericSensorExponent, - OID_sunPlatNumericSensorCurrent, - OID_sunPlatNumericSensorLowerThresholdFatal, - OID_sunPlatNumericSensorLowerThresholdCritical, - OID_sunPlatNumericSensorLowerThresholdNonCritical, - OID_sunPlatNumericSensorUpperThresholdNonCritical, - OID_sunPlatNumericSensorUpperThresholdCritical, - OID_sunPlatNumericSensorUpperThresholdFatal, - 0 -}; - -static char *volgroup3[] = { - OID_sunPlatEquipmentOperationalState, - 0 -}; - -static char *volgroup4[] = { - OID_sunPlatAlarmState, - 0 -}; - -static char *volgroup5[] = { - OID_sunPlatBatteryStatus, - 0 -}; - -/* - * The following two items must match the Sun Platform MIB specification - * in their indices and values. - */ -static char *sensor_baseunits[] = { - "", "other", "unknown", "degC", "degF", "degK", "volts", "amps", - "watts", "joules", "coulombs", "va", "nits", "lumens", "lux", - "candelas", "kPa", "psi", "newtons", "cfm", "rpm", "hertz", - "seconds", "minutes", "hours", "days", "weeks", "mils", "inches", - "feet", "cubicInches", "cubicFeet", "meters", "cubicCentimeters", - "cubicMeters", "liters", "fluidOunces", "radians", "steradians", - "revolutions", "cycles", "gravities", "ounces", "pounds", "footPounds", - "ounceInches", "gauss", "gilberts", "henries", "farads", "ohms", - "siemens", "moles", "becquerels", "ppm", "decibels", "dBA", "dbC", - "grays", "sieverts", "colorTemperatureDegK", "bits", "bytes", "words", - "doubleWords", "quadWords", "percentage" -}; -static const int n_baseunits = sizeof (sensor_baseunits) / sizeof (char *); - -static char *sensor_rateunits[] = { - "", - "none", - "perMicroSecond", - "perMilliSecond", - "perSecond", - "perMinute", - "perHour", - "perDay", - "perWeek", - "perMonth", - "perYear" -}; -static const int n_rateunits = sizeof (sensor_rateunits) / sizeof (char *); - -/* - * Local declarations - */ -static void snmpplugin_register(void); -static void register_group(char **g, int is_volatile); -static void *tree_builder(void *arg); -static int build_physplat(picl_nodehdl_t *subtree_rootp); -static void free_resources(picl_nodehdl_t subtree_root); - -static picl_nodehdl_t make_node(picl_nodehdl_t subtree_root, int row, - int *snmp_syserr_p); -static void save_nodeh(picl_nodehdl_t nodeh, int row); -static picl_nodehdl_t lookup_nodeh(int row); - -static void save_volprop(picl_prophdl_t prop, char *oidstr, int row, - int proptype); -static void check_for_stale_data(boolean_t nocache); -static int read_volprop(ptree_rarg_t *parg, void *buf); - -static void threshold(picl_nodehdl_t node, char *oidstr, int row, - char *propname, int *snmp_syserr_p); -static void add_thresholds(picl_nodehdl_t node, int row, int *snmp_syserr_p); - -static char *get_slot_type(int row, int *snmp_syserr_p); -static int add_volatile_prop(picl_nodehdl_t nodeh, char *name, - int type, int access, int size, int (*rdfunc)(ptree_rarg_t *, void *), - int (*wrfunc)(ptree_warg_t *, const void *), picl_prophdl_t *propp); -static int add_string_prop(picl_nodehdl_t node, char *propname, char *propval); -static int add_void_prop(picl_nodehdl_t node, char *propname); -static void add_prop(picl_nodehdl_t nodeh, picl_prophdl_t *php, char *label, - int row, sp_propid_t pp, int *snmp_syserr_p); - -static void *cache_refresher(void *arg); -static void cache_refresher_fini(void); - -static void log_msg(int pri, const char *fmt, ...); - -#ifdef SNMPPLUGIN_DEBUG -static mutex_t snmpplugin_dbuf_lock; -static char *snmpplugin_dbuf = NULL; -static char *snmpplugin_dbuf_curp = NULL; -static int snmpplugin_dbuf_sz = 0; -static int snmpplugin_dbuf_overflow = 0; -static char snmpplugin_lbuf[SNMPPLUGIN_DMAX_LINE]; - -static void snmpplugin_log_init(void); -static void snmpplugin_log(const char *fmt, ...); -static void snmpplugin_log_append(void); -static void snmpplugin_dbuf_realloc(void); -#endif - -static void -snmpplugin_register(void) -{ - (void) picld_plugin_register(&snmpplugin_reg); -} - -static void -register_group(char **g, int is_volatile) -{ - int i, len = 0; - int n_oids; - char *p, *oidstrs; - - for (i = 0; g[i]; i++) - len += strlen(g[i]) + 1; - n_oids = i; - - if ((oidstrs = (char *)calloc(1, len)) == NULL) - return; - - for (p = oidstrs, i = 0; g[i]; i++) { - (void) strcpy(p, g[i]); - p += strlen(g[i]) + 1; - } - - snmp_register_group(hdl, oidstrs, n_oids, is_volatile); - free(oidstrs); -} - -void -snmpplugin_init(void) -{ - int ret; - - (void) mutex_init(&rebuild_tree_lock, USYNC_THREAD, NULL); - (void) cond_init(&rebuild_tree_cv, USYNC_THREAD, NULL); - (void) rwlock_init(&stale_tree_rwlp, USYNC_THREAD, NULL); - tree_builder_thr_exit = B_FALSE; - - LOGINIT(); - - /* - * Create the tree-builder thread and let it take over - */ - LOGPRINTF("Tree-builder thread being created.\n"); - if ((ret = thr_create(NULL, NULL, tree_builder, NULL, - THR_BOUND, &tree_builder_thr_id)) < 0) { - log_msg(LOG_ERR, SNMPP_CANT_CREATE_TREE_BUILDER, ret); - snmp_fini(hdl); - hdl = NULL; - (void) rwlock_destroy(&stale_tree_rwlp); - (void) cond_destroy(&rebuild_tree_cv); - (void) mutex_destroy(&rebuild_tree_lock); - tree_builder_thr_exit = B_TRUE; - - return; - } - - /* - * While the cache refresher thread does improve performance, it is not - * integral to the proper function of the plugin. If we fail to create - * the thread for some reason, we will simply continue without - * refreshing. - */ - (void) mutex_init(&cache_refresh_lock, USYNC_THREAD, NULL); - (void) cond_init(&cache_refresh_cv, USYNC_THREAD, NULL); - cache_refresh_thr_exit = B_FALSE; - - LOGPRINTF("Cache refresher thread being created.\n"); - if (thr_create(NULL, NULL, cache_refresher, NULL, THR_BOUND, - &cache_refresh_thr_id) < 0) { - (void) cond_destroy(&cache_refresh_cv); - (void) mutex_destroy(&cache_refresh_lock); - cache_refresh_thr_exit = B_TRUE; - } -} - -void -snmpplugin_fini(void) -{ - - if (tree_builder_thr_exit == B_TRUE) - return; - - /* - * Make reads of volatile properties return PICL_PROPUNAVAILABLE - * since we're about to recycle the plug-in. No need to worry - * about removing /physical-platform since tree_builder() will - * take care of recycling it for us. - */ - (void) rw_wrlock(&stale_tree_rwlp); - stale_tree = B_TRUE; - if (vol_props) { - free(vol_props); - } - vol_props = NULL; - volprop_ndx = 0; - n_vol_props = 0; - (void) rw_unlock(&stale_tree_rwlp); - - /* clean up the cache_refresher thread and structures */ - cache_refresher_fini(); - - /* wake up the tree_builder thread, tell it to exit */ - (void) mutex_lock(&rebuild_tree_lock); - rebuild_tree = B_TRUE; - tree_builder_thr_exit = B_TRUE; - (void) cond_signal(&rebuild_tree_cv); - (void) mutex_unlock(&rebuild_tree_lock); - - /* send SIGUSR1 to get tree_builder out of a blocked system call */ - (void) thr_kill(tree_builder_thr_id, SIGUSR1); - - /* reap the thread */ - (void) thr_join(tree_builder_thr_id, NULL, NULL); - - /* close the channel */ - if (hdl != NULL) { - snmp_fini(hdl); - hdl = NULL; - } - - /* finish cleanup... */ - (void) rwlock_destroy(&stale_tree_rwlp); - (void) cond_destroy(&rebuild_tree_cv); - (void) mutex_destroy(&rebuild_tree_lock); -} - -/*ARGSUSED*/ -static void -usr1_handler(int sig, siginfo_t *siginfo, void *sigctx) -{ - /* - * Nothing to do here. - * The act of catching the signal causes any cond_wait() or blocked - * system call to return EINTR. This is used to trigger early exit from - * the tree builder thread which may be blocked in snmp_init. More work - * would be required to allow early exit if the tree builder thread is - * already in its main processing loop and not blocked in cond_wait. - */ -} - -/*ARGSUSED*/ -static void * -tree_builder(void *arg) -{ - int ret, rv; - picl_nodehdl_t root_node; - picl_nodehdl_t physplat_root; - picl_nodehdl_t old_physplat_root; - struct sigaction act; - - /* - * catch SIGUSR1 to allow early exit from snmp_init which may block - * indefinitely in a guest domain. - */ - act.sa_sigaction = usr1_handler; - (void) sigemptyset(&act.sa_mask); - act.sa_flags = 0; - if (sigaction(SIGUSR1, &act, NULL) == -1) { - syslog(LOG_ERR, SIGACT_FAILED, strsignal(SIGUSR1), - strerror(errno)); - } - - /* - * Initialize SNMP service - */ - LOGPRINTF("Initializing SNMP service.\n"); - if ((hdl = snmp_init()) == NULL) { - log_msg(LOG_ERR, SNMPP_CANT_INIT); - return ((void *)-1); - } - - /* - * Register OID groupings for BULKGET optimizations - */ - LOGPRINTF("Registering OID groups.\n"); - register_group(group1, 0); - register_group(group2, 0); - register_group(group3, 0); - register_group(group4, 0); - register_group(volgroup1, 1); - register_group(volgroup2, 1); - register_group(volgroup3, 1); - register_group(volgroup4, 1); - register_group(volgroup5, 1); - - (void) mutex_lock(&rebuild_tree_lock); - - for (;;) { - LOGPRINTF("tree_builder: check whether to rebuild subtree\n"); - while (rebuild_tree == B_FALSE) - (void) cond_wait(&rebuild_tree_cv, &rebuild_tree_lock); - - LOGPRINTF("tree_builder: woke up\n"); - - if (tree_builder_thr_exit == B_TRUE) { - (void) mutex_unlock(&rebuild_tree_lock); - LOGPRINTF("tree_builder: time to exit\n"); - return (NULL); - } - - old_physplat_root = NULL; - physplat_root = NULL; - - LOGPRINTF("tree_builder: getting root node\n"); - if ((ret = ptree_get_root(&root_node)) != PICL_SUCCESS) { - (void) mutex_unlock(&rebuild_tree_lock); - log_msg(LOG_ERR, SNMPP_NO_ROOT, ret); - return ((void *)-2); - } - - LOGPRINTF("tree_builder: getting existing physplat node\n"); - rv = ptree_find_node(root_node, PICL_PROP_NAME, - PICL_PTYPE_CHARSTRING, PICL_NODE_PHYSPLAT, - sizeof (PICL_NODE_PHYSPLAT), &old_physplat_root); - - LOGPRINTF("tree_builder: building physical-platform\n"); - if ((ret = build_physplat(&physplat_root)) < 0) { - (void) mutex_unlock(&rebuild_tree_lock); - log_msg(LOG_ERR, SNMPP_CANT_CREATE_PHYSPLAT, ret); - cache_refresher_fini(); - snmp_fini(hdl); - hdl = NULL; - return ((void *)-3); - } - - if (rv == PICL_SUCCESS && old_physplat_root != NULL) { - LOGPRINTF("tree_builder: destroying existing nodes\n"); - ptree_delete_node(old_physplat_root); - ptree_destroy_node(old_physplat_root); - } - - LOGPRINTF("tree_builder: attaching new subtree\n"); - if ((ret = ptree_add_node(root_node, physplat_root)) < 0) { - (void) mutex_unlock(&rebuild_tree_lock); - free_resources(physplat_root); - log_msg(LOG_ERR, SNMPP_CANT_CREATE_PHYSPLAT, ret); - cache_refresher_fini(); - snmp_fini(hdl); - hdl = NULL; - return ((void *)-4); - } - - LOGPRINTF("tree_builder: setting stale_tree to FALSE\n"); - (void) rw_wrlock(&stale_tree_rwlp); - stale_tree = B_FALSE; - (void) rw_unlock(&stale_tree_rwlp); - - LOGPRINTF("tree_builder: setting rebuild_tree to FALSE\n"); - rebuild_tree = B_FALSE; - } - - /*NOTREACHED*/ - return (NULL); -} - -static int -build_physplat(picl_nodehdl_t *subtree_rootp) -{ - int change_time1; - int row, nxtrow; - int clr_linkreset = 0; - int ret = 0; - int snmp_syserr = 0; - -retry: - (void) snmp_reinit(hdl, clr_linkreset); - clr_linkreset = 0; - - /* - * Record LastChangeTime before we start building the tree - */ - ret = snmp_get_int(hdl, OID_entLastChangeTime, 0, - &change_time1, &snmp_syserr); - if (ret < 0) { - if (snmp_syserr == ECANCELED) { - LOGPRINTF(SNMPP_LINK_RESET); - clr_linkreset = 1; - goto retry; - } - log_msg(LOG_WARNING, SNMPP_CANT_FETCH_OBJECT_VAL, - snmp_syserr ? snmp_syserr : ret, OID_entLastChangeTime, 0); - } - - /* - * Create the physical-platform node - */ - ret = ptree_create_node(PICL_NODE_PHYSPLAT, PICL_CLASS_PICL, - subtree_rootp); - if (ret != PICL_SUCCESS) - return (-1); - - /* - * Scan entPhysicalTable and build the "physical-platform" subtree - */ - ret = 0; - for (row = -1; ret == 0; row = nxtrow) { - ret = snmp_get_nextrow(hdl, OID_entPhysicalDescr, - row, &nxtrow, &snmp_syserr); - if (ret == 0) - (void) make_node(*subtree_rootp, nxtrow, &snmp_syserr); - switch (snmp_syserr) { - case ECANCELED: - /* - * If we get this error, a link reset must've - * happened and we need to throw away everything - * we have now and rebuild the tree again. - */ - log_msg(LOG_WARNING, SNMPP_LINK_RESET); - free_resources(*subtree_rootp); - clr_linkreset = 1; - goto retry; - /*NOTREACHED*/ - break; - case ENOSPC: /* end of MIB */ - LOGPRINTF("build_physplat: end of MIB\n"); - break; - case ENOENT: /* end of table */ - LOGPRINTF("build_physplat: end of table\n"); - break; - default: - /* - * make_node() will print messages so don't - * repeat that exercise here. - */ - if (ret == -1) { - log_msg(LOG_WARNING, - SNMPP_CANT_FETCH_OBJECT_VAL, - snmp_syserr ? snmp_syserr : ret, - OID_entPhysicalDescr, row); - } - } - } - - /* - * Record LastChangeTime after we're done building the tree - */ - ret = snmp_get_int(hdl, OID_entLastChangeTime, 0, - &change_time, &snmp_syserr); - if (ret < 0) { - if (snmp_syserr == ECANCELED) { - log_msg(LOG_WARNING, SNMPP_LINK_RESET); - free_resources(*subtree_rootp); - clr_linkreset = 1; - goto retry; - } else - log_msg(LOG_WARNING, SNMPP_CANT_FETCH_OBJECT_VAL, - snmp_syserr ? snmp_syserr : ret, - OID_entLastChangeTime, row); - } - - /* - * If they don't match, some hotplugging must've happened, - * free resources we've created and still holding, then go - * back and retry - */ - if (change_time != change_time1) { - LOGPRINTF("build_physplat: entLastChangeTime has changed!\n"); - free_resources(*subtree_rootp); - change_time1 = change_time; - goto retry; - } - - /* - * The physplat_nodes table is no longer needed, free it - */ - if (physplat_nodes) { - free(physplat_nodes); - physplat_nodes = NULL; - n_physplat_nodes = 0; - } - - return (0); -} - -/* - * Destroy all resources that were created during the building - * of the subtree - */ -static void -free_resources(picl_nodehdl_t subtree_root) -{ - if (physplat_nodes) { - free(physplat_nodes); - physplat_nodes = NULL; - n_physplat_nodes = 0; - } - - if (subtree_root) { - (void) ptree_delete_node(subtree_root); - (void) ptree_destroy_node(subtree_root); - } - - if (vol_props) { - free(vol_props); - vol_props = NULL; - n_vol_props = 0; - volprop_ndx = 0; - } -} - -static picl_nodehdl_t -make_node(picl_nodehdl_t subtree_root, int row, int *snmp_syserr_p) -{ - picl_nodehdl_t nodeh, parenth; - picl_prophdl_t proph; - char *phys_name, *node_name; - int parent_row; - int ent_physclass, sunplat_physclass; - int sensor_class, sensor_type; - int alarm_type; - int ps_class; - int ret; - - /* - * If we've already created this picl node, just return it - */ - if ((nodeh = lookup_nodeh(row)) != NULL) - return (nodeh); - - /* - * If we are creating it only now, make sure we have the parent - * created first; if there's no parent, then parent it to the - * subtree's root node - */ - ret = snmp_get_int(hdl, OID_entPhysicalContainedIn, row, - &parent_row, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) - if (ret < 0 || parent_row <= 0) - parenth = subtree_root; - else { - parenth = make_node(subtree_root, parent_row, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) - if (parenth == NULL) - parenth = subtree_root; - } - - /* - * Figure out the physical-platform node name from entPhysicalName; - * all rows in the MIB that have a valid entPhysicalIndex should - * have a physical name. - */ - ret = snmp_get_str(hdl, OID_entPhysicalName, row, - &phys_name, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) - if (ret < 0 || phys_name == NULL) { - log_msg(LOG_WARNING, SNMPP_NO_ENTPHYSNAME, row); - return (NULL); - } - - node_name = basename(phys_name); - - ret = snmp_get_int(hdl, OID_entPhysicalClass, row, - &ent_physclass, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) - if (ret < 0) { - log_msg(LOG_WARNING, SNMPP_CANT_FETCH_OBJECT_VAL, - *snmp_syserr_p ? *snmp_syserr_p : ret, - OID_entPhysicalClass, row); - free(phys_name); - return (NULL); - } - - switch (ent_physclass) { - case SPC_OTHER: - ret = snmp_get_int(hdl, OID_sunPlatPhysicalClass, row, - &sunplat_physclass, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) - if (ret < 0) { - log_msg(LOG_WARNING, SNMPP_CANT_FETCH_OBJECT_VAL, - *snmp_syserr_p ? *snmp_syserr_p : ret, - OID_sunPlatPhysicalClass, row); - free(phys_name); - return (NULL); - } - - if (sunplat_physclass == SSPC_ALARM) { - ret = snmp_get_int(hdl, OID_sunPlatAlarmType, - row, &alarm_type, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) - if (ret < 0) { - log_msg(LOG_WARNING, - SNMPP_CANT_FETCH_OBJECT_VAL, - *snmp_syserr_p ? *snmp_syserr_p : ret, - OID_sunPlatAlarmType, row); - free(phys_name); - return (NULL); - } - - if (alarm_type == SSAT_VISIBLE) { - ADD_NODE(PICL_CLASS_LED) - } else { - ADD_NODE(PICL_CLASS_ALARM) - } - - add_prop(nodeh, &proph, node_name, row, PP_STATE, - snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) - } else { - ADD_NODE(PICL_CLASS_OTHER) - } - - add_prop(nodeh, &proph, node_name, row, PP_OPSTATUS, - snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) - break; - - case SPC_UNKNOWN: - ADD_NODE(PICL_CLASS_UNKNOWN) - break; - - case SPC_CHASSIS: - ADD_NODE(PICL_CLASS_CHASSIS) - add_prop(nodeh, &proph, node_name, row, PP_OPSTATUS, - snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) - break; - - case SPC_BACKPLANE: - ADD_NODE(PICL_CLASS_BACKPLANE) - add_prop(nodeh, &proph, node_name, row, PP_OPSTATUS, - snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) - break; - - case SPC_CONTAINER: - ADD_NODE(PICL_CLASS_CONTAINER) - - add_prop(nodeh, &proph, node_name, row, PP_OPSTATUS, - snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) - - add_prop(nodeh, &proph, node_name, row, PP_SLOT_TYPE, - snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) - break; - - case SPC_POWERSUPPLY: - ret = snmp_get_int(hdl, OID_sunPlatPowerSupplyClass, - row, &ps_class, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) - if (ret < 0) { - log_msg(LOG_WARNING, SNMPP_CANT_FETCH_OBJECT_VAL, - *snmp_syserr_p ? *snmp_syserr_p : ret, - OID_sunPlatPowerSupplyClass, row); - free(phys_name); - return (NULL); - } - - if (ps_class == SSPSC_BATTERY) { - ADD_NODE(PICL_CLASS_BATTERY) - add_prop(nodeh, &proph, node_name, row, - PP_BATT_STATUS, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) - } else { - ADD_NODE(PICL_CLASS_POWERSUPPLY) - } - add_prop(nodeh, &proph, node_name, row, PP_OPSTATUS, - snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) - break; - - case SPC_FAN: - ADD_NODE(PICL_CLASS_FAN) - add_prop(nodeh, &proph, node_name, row, PP_OPSTATUS, - snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) - break; - - case SPC_SENSOR: - ret = snmp_get_int(hdl, OID_sunPlatSensorClass, - row, &sensor_class, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) - if (ret < 0) { - log_msg(LOG_WARNING, SNMPP_CANT_FETCH_OBJECT_VAL, - *snmp_syserr_p ? *snmp_syserr_p : ret, - OID_sunPlatSensorClass, row); - free(phys_name); - return (NULL); - } - - ret = snmp_get_int(hdl, OID_sunPlatSensorType, - row, &sensor_type, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) - if (ret < 0) { - log_msg(LOG_WARNING, SNMPP_CANT_FETCH_OBJECT_VAL, - *snmp_syserr_p ? *snmp_syserr_p : ret, - OID_sunPlatSensorType, row); - free(phys_name); - return (NULL); - } - - if (sensor_class == SSSC_NUMERIC) { - if (sensor_type == SSST_TEMPERATURE) { - ADD_NODE(PICL_CLASS_TEMPERATURE_SENSOR) - add_prop(nodeh, &proph, node_name, row, - PP_TEMPERATURE, snmp_syserr_p); - } else if (sensor_type == SSST_VOLTAGE) { - ADD_NODE(PICL_CLASS_VOLTAGE_SENSOR) - add_prop(nodeh, &proph, node_name, row, - PP_VOLTAGE, snmp_syserr_p); - } else if (sensor_type == SSST_CURRENT) { - ADD_NODE(PICL_CLASS_CURRENT_SENSOR) - add_prop(nodeh, &proph, node_name, row, - PP_CURRENT, snmp_syserr_p); - } else if (sensor_type == SSST_TACHOMETER) { - ADD_NODE(PICL_CLASS_RPM_SENSOR) - add_prop(nodeh, &proph, node_name, row, - PP_SPEED, snmp_syserr_p); - } else { - ADD_NODE(PICL_CLASS_SENSOR) - add_prop(nodeh, &proph, node_name, row, - PP_SENSOR_VALUE, snmp_syserr_p); - } - CHECK_LINKRESET(snmp_syserr_p, NULL) - - add_prop(nodeh, &proph, node_name, row, - PP_OPSTATUS, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) - - add_prop(nodeh, &proph, node_name, row, - PP_BASE_UNITS, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) - - add_prop(nodeh, &proph, node_name, row, - PP_EXPONENT, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) - - add_prop(nodeh, &proph, node_name, row, - PP_RATE_UNITS, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) - - add_thresholds(nodeh, row, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) - - } else if (sensor_class == SSSC_BINARY) { - if (sensor_type == SSST_TEMPERATURE) { - ADD_NODE(PICL_CLASS_TEMPERATURE_INDICATOR) - } else if (sensor_type == SSST_VOLTAGE) { - ADD_NODE(PICL_CLASS_VOLTAGE_INDICATOR) - } else if (sensor_type == SSST_CURRENT) { - ADD_NODE(PICL_CLASS_CURRENT_INDICATOR) - } else if (sensor_type == SSST_TACHOMETER) { - ADD_NODE(PICL_CLASS_RPM_INDICATOR) - } else if (sensor_type == SSST_PRESENCE) { - ADD_NODE(PICL_CLASS_PRESENCE_INDICATOR) - } else { - ADD_NODE(PICL_CLASS_INDICATOR) - } - - add_prop(nodeh, &proph, node_name, row, PP_OPSTATUS, - snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) - - add_prop(nodeh, &proph, node_name, row, PP_CONDITION, - snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) - - add_prop(nodeh, &proph, node_name, row, PP_EXPECTED, - snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) - } else { - log_msg(LOG_ERR, - SNMPP_UNSUPP_SENSOR_CLASS, sensor_class, row); - return (NULL); - } - break; - - case SPC_MODULE: - ADD_NODE(PICL_CLASS_MODULE) - - add_prop(nodeh, &proph, node_name, row, PP_OPSTATUS, - snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) - - add_prop(nodeh, &proph, node_name, row, PP_REPLACEABLE, - snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) - - add_prop(nodeh, &proph, node_name, row, PP_HOTSWAPPABLE, - snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) - break; - - case SPC_PORT: - ADD_NODE(PICL_CLASS_PORT) - break; - - case SPC_STACK: - ADD_NODE(PICL_CLASS_STACK) - break; - - default: - log_msg(LOG_WARNING, - SNMPP_UNKNOWN_ENTPHYSCLASS, ent_physclass, row); - free(phys_name); - return (NULL); - } - - add_prop(nodeh, &proph, node_name, row, PP_DESCRIPTION, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) - - add_prop(nodeh, &proph, node_name, row, PP_LABEL, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) - - add_prop(nodeh, &proph, node_name, row, PP_HW_REVISION, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) - - add_prop(nodeh, &proph, node_name, row, PP_FW_REVISION, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) - - add_prop(nodeh, &proph, node_name, row, PP_SERIAL_NUM, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) - - add_prop(nodeh, &proph, node_name, row, PP_MFG_NAME, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) - - add_prop(nodeh, &proph, node_name, row, PP_MODEL_NAME, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) - - add_prop(nodeh, &proph, node_name, row, PP_IS_FRU, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) - - free(phys_name); - save_nodeh(nodeh, row); - - return (nodeh); -} - -/* - * Saves the node handle and the row id into physplat_nodes[]. If we're - * doing this in response to a hotplug event, we should've freed the - * old physplat_nodes before entering here to save the first node of the - * new physplat subtree. - */ -static void -save_nodeh(picl_nodehdl_t nodeh, int row) -{ - size_t sz, count; - picl_nodehdl_t *p; - - if (row >= n_physplat_nodes) { - count = (((size_t)row >> NODE_BLOCK_SHIFT) + 1) * - N_ELEMS_IN_NODE_BLOCK; - sz = count * sizeof (picl_nodehdl_t); - - p = (picl_nodehdl_t *)calloc(count, sizeof (picl_nodehdl_t)); - if (p == NULL) { - log_msg(LOG_ERR, SNMPP_NO_MEM, sz); - return; - } - - if (physplat_nodes) { - (void) memcpy((void *) p, (void *) physplat_nodes, - n_physplat_nodes * sizeof (picl_nodehdl_t)); - free((void *) physplat_nodes); - } - - physplat_nodes = p; - n_physplat_nodes = count; - } - - physplat_nodes[row] = nodeh; -} - -static picl_nodehdl_t -lookup_nodeh(int row) -{ - if (row >= n_physplat_nodes) - return (NULL); - - return (physplat_nodes[row]); -} - -/* - * We enter this routine only when we are building the physical-platform - * subtree, whether for the first time or in response to a hotplug event. - * If we're here for rebuilding the tree, we have already set stale_tree - * to be B_TRUE, so no one else would be accessing vol_props, n_vol_props - * or volprop_ndx. If we're here to build the tree for the first time, - * picld hasn't yet created doors and is running single-threaded, so no - * one else would be accessing them anyway. - */ -static void -save_volprop(picl_prophdl_t prop, char *oidstr, int row, int proptype) -{ - vol_prophdl_t *p; - int count; - - if (volprop_ndx == n_vol_props) { - count = n_vol_props + N_ELEMS_IN_VOLPROP_BLOCK; - p = (vol_prophdl_t *)calloc(count, sizeof (vol_prophdl_t)); - if (p == NULL) { - log_msg(LOG_ERR, SNMPP_NO_MEM, - count * sizeof (vol_prophdl_t)); - return; - } - - if (vol_props) { - (void) memcpy((void *) p, (void *) vol_props, - n_vol_props * sizeof (vol_prophdl_t)); - free((void *) vol_props); - } - - vol_props = p; - n_vol_props += N_ELEMS_IN_VOLPROP_BLOCK; - } - - vol_props[volprop_ndx].prop = prop; - vol_props[volprop_ndx].oidstr = oidstr; - vol_props[volprop_ndx].row = row; - vol_props[volprop_ndx].proptype = proptype; - - volprop_ndx++; -} - -static void -check_for_stale_data(boolean_t nocache) -{ - int cur_change_time; - int ret; - int snmp_syserr; - - (void) rw_wrlock(&stale_tree_rwlp); - - /* - * Check if some other thread beat us to it - */ - if (stale_tree == B_TRUE) { - (void) rw_unlock(&stale_tree_rwlp); - return; - } - - /* - * Cache OID_entLastChangeTime for up to 10 seconds before - * fetching it from ILOM again. This prevents us from fetching - * this value from ILOM when the we're filling or refreshing a - * whole bunch of items in the cache around the same time. - */ - if (nocache == B_FALSE && time(NULL) - change_time_check <= 10) { - (void) rw_unlock(&stale_tree_rwlp); - return; - } - - /* - * Check if mib data has changed (hotplug? link-reset?) - */ - do { - snmp_syserr = 0; - ret = snmp_get_int(hdl, OID_entLastChangeTime, 0, - &cur_change_time, &snmp_syserr); - (void) time(&change_time_check); - if ((ret == 0) && (cur_change_time == change_time)) { - (void) rw_unlock(&stale_tree_rwlp); - return; - } - } while (ret != 0 && snmp_syserr == EINTR); - - /* - * If we can't read entLastChangeTime we assume we need to rebuild - * the tree. This will also cover the case when we need to rebuild - * the tree because a link reset had happened. - */ - LOGPRINTF2("check_for_stale_data: LastChange times have changed, " - "(%#x != %#x)\n", change_time, cur_change_time); - - /* - * If the mib data has changed, we need to rebuild the physical-platform - * subtree. To do this, we set a flag to mark the tree stale, - * so that any future reads to get value of volatile properties will - * return PICL_PROPVALUNAVAILABLE, until the stale_tree flag - * is reset by the tree builder thread. - */ - stale_tree = B_TRUE; - if (vol_props) { - free(vol_props); - } - vol_props = NULL; - volprop_ndx = 0; - n_vol_props = 0; - - (void) rw_unlock(&stale_tree_rwlp); - - (void) mutex_lock(&rebuild_tree_lock); - rebuild_tree = B_TRUE; - (void) cond_signal(&rebuild_tree_cv); - LOGPRINTF("check_for_stale_data: signalled tree builder\n"); - (void) mutex_unlock(&rebuild_tree_lock); -} - -/* - * This is the critical routine. This callback is invoked by picl whenever - * it needs to fetch the value of a volatile property. The first thing we - * must do, however, is to see if there has been a hotplug or a link-reset - * event since the last time we built the tree and whether we need to - * rebuild the tree. If so, we do whatever is necessary to make that happen, - * but return PICL_PROPVALUNAVAILABLE for now, without making any further - * snmp requests or accessing any globals. - */ -static int -read_volprop(ptree_rarg_t *parg, void *buf) -{ - char *pstr; - int propval; - int i, ndx; - int ret; - int snmp_syserr = 0; - - /* - * First check for any event that would make us throw away - * the existing /physical-platform subtree and rebuild - * another one. If we are rebuilding the subtree, we just - * return the stale value until the tree is fully built. - */ - check_for_stale_data(B_FALSE); - - (void) rw_rdlock(&stale_tree_rwlp); - - if (stale_tree == B_TRUE) { - (void) rw_unlock(&stale_tree_rwlp); - return (PICL_PROPVALUNAVAILABLE); - } - - for (i = 0; i < volprop_ndx; i++) { - if (vol_props[i].prop == parg->proph) { - ndx = i; - break; - } - } - if (i == volprop_ndx) { - (void) rw_unlock(&stale_tree_rwlp); - log_msg(LOG_ERR, SNMPP_CANT_FIND_VOLPROP, parg->proph); - return (PICL_FAILURE); - } - - /* - * If we can't read the value, return failure. Even if this was - * due to a link reset, between the check for stale data and now, - * the next volatile callback by picl will initiate a tree-rebuild. - */ - ret = snmp_get_int(hdl, vol_props[ndx].oidstr, vol_props[ndx].row, - &propval, &snmp_syserr); - if (ret < 0) { - (void) rw_unlock(&stale_tree_rwlp); - check_for_stale_data(B_TRUE); - if (stale_tree == B_TRUE) { - return (PICL_PROPVALUNAVAILABLE); - } - log_msg(LOG_ERR, SNMPP_CANT_FETCH_OBJECT_VAL, - snmp_syserr ? snmp_syserr : ret, - vol_props[ndx].oidstr, vol_props[ndx].row); - return (PICL_FAILURE); - } - - switch (vol_props[ndx].proptype) { - case VPT_PLATOPSTATE: - if (propval == SSOS_DISABLED) { - (void) strlcpy(buf, STR_SSOS_DISABLED, MAX_OPSTATE_LEN); - } else if (propval == SSOS_ENABLED) { - (void) strlcpy(buf, STR_SSOS_ENABLED, MAX_OPSTATE_LEN); - } else { - (void) rw_unlock(&stale_tree_rwlp); - log_msg(LOG_ERR, SNMPP_INV_PLAT_EQUIP_OPSTATE, - propval, vol_props[ndx].row); - return (PICL_FAILURE); - } - break; - - case VPT_NUMSENSOR: - (void) memcpy(buf, &propval, sizeof (propval)); - break; - - case VPT_BINSENSOR: - if (propval == ST_TRUE) { - ret = snmp_get_str(hdl, - OID_sunPlatBinarySensorInterpretTrue, - vol_props[ndx].row, &pstr, &snmp_syserr); - if (snmp_syserr == ECANCELED) { - (void) rw_unlock(&stale_tree_rwlp); - free(pstr); - return (PICL_FAILURE); - } - if (ret < 0 || pstr == NULL) { - log_msg(LOG_ERR, SNMPP_CANT_FETCH_OBJECT_VAL, - snmp_syserr ? snmp_syserr : ret, - OID_sunPlatBinarySensorInterpretTrue, - vol_props[ndx].row); - (void) strlcpy(buf, STR_ST_TRUE, - MAX_TRUTHVAL_LEN); - } else { - (void) strlcpy(buf, pstr, MAX_TRUTHVAL_LEN); - } - free(pstr); - } else if (propval == ST_FALSE) { - ret = snmp_get_str(hdl, - OID_sunPlatBinarySensorInterpretFalse, - vol_props[ndx].row, &pstr, &snmp_syserr); - if (snmp_syserr == ECANCELED) { - (void) rw_unlock(&stale_tree_rwlp); - free(pstr); - return (PICL_FAILURE); - } - if (ret < 0 || pstr == NULL) { - log_msg(LOG_ERR, SNMPP_CANT_FETCH_OBJECT_VAL, - snmp_syserr ? snmp_syserr : ret, - OID_sunPlatBinarySensorInterpretFalse, - vol_props[ndx].row); - (void) strlcpy(buf, STR_ST_FALSE, - MAX_TRUTHVAL_LEN); - } else { - (void) strlcpy(buf, pstr, MAX_TRUTHVAL_LEN); - } - free(pstr); - } else { - (void) rw_unlock(&stale_tree_rwlp); - log_msg(LOG_ERR, SNMPP_INV_PLAT_BINSNSR_CURRENT, - propval, vol_props[ndx].row); - return (PICL_FAILURE); - } - break; - - case VPT_ALARMSTATE: - if (propval == SSAS_OFF) { - (void) strlcpy(buf, STR_SSAS_OFF, MAX_ALARMSTATE_LEN); - } else if (propval == SSAS_STEADY) { - (void) strlcpy(buf, STR_SSAS_STEADY, - MAX_ALARMSTATE_LEN); - } else if (propval == SSAS_ALTERNATING) { - (void) strlcpy(buf, STR_SSAS_ALTERNATING, - MAX_ALARMSTATE_LEN); - } else { - (void) strlcpy(buf, STR_SSAS_UNKNOWN, - MAX_ALARMSTATE_LEN); - } - break; - - case VPT_BATTERYSTATUS: - switch (propval) { - case SSBS_OTHER: - (void) strlcpy(buf, STR_SSBS_OTHER, - MAX_BATTERYSTATUS_LEN); - break; - case SSBS_FULLYCHARGED: - (void) strlcpy(buf, STR_SSBS_FULLYCHARGED, - MAX_BATTERYSTATUS_LEN); - break; - case SSBS_LOW: - (void) strlcpy(buf, STR_SSBS_LOW, - MAX_BATTERYSTATUS_LEN); - break; - case SSBS_CRITICAL: - (void) strlcpy(buf, STR_SSBS_CRITICAL, - MAX_BATTERYSTATUS_LEN); - break; - case SSBS_CHARGING: - (void) strlcpy(buf, STR_SSBS_CHARGING, - MAX_BATTERYSTATUS_LEN); - break; - case SSBS_CHARGING_AND_LOW: - (void) strlcpy(buf, STR_SSBS_CHARGING_AND_LOW, - MAX_BATTERYSTATUS_LEN); - break; - case SSBS_CHARGING_AND_HIGH: - (void) strlcpy(buf, STR_SSBS_CHARGING_AND_HIGH, - MAX_BATTERYSTATUS_LEN); - break; - case SSBS_CHARGING_AND_CRITICAL: - (void) strlcpy(buf, STR_SSBS_CHARGING_AND_CRITICAL, - MAX_BATTERYSTATUS_LEN); - break; - case SSBS_UNDEFINED: - (void) strlcpy(buf, STR_SSBS_UNDEFINED, - MAX_BATTERYSTATUS_LEN); - break; - case SSBS_PARTIALLY_CHARGED: - (void) strlcpy(buf, STR_SSBS_PARTIALLY_CHARGED, - MAX_BATTERYSTATUS_LEN); - break; - case SSBS_UNKNOWN: - default: - (void) strlcpy(buf, STR_SSBS_UNKNOWN, - MAX_BATTERYSTATUS_LEN); - break; - } - break; - } - - (void) rw_unlock(&stale_tree_rwlp); - - return (PICL_SUCCESS); -} - -static void -threshold(picl_nodehdl_t node, char *oidstr, int row, char *propname, - int *snmp_syserr_p) -{ - picl_prophdl_t prop; - int err; - int val; - - if ((err = snmp_get_int(hdl, oidstr, row, &val, snmp_syserr_p)) != -1) { - err = add_volatile_prop(node, propname, PICL_PTYPE_INT, - PICL_READ, sizeof (int), read_volprop, NULL, &prop); - if (err == PICL_SUCCESS) - save_volprop(prop, oidstr, row, VPT_NUMSENSOR); - } else - log_msg(LOG_ERR, SNMPP_CANT_FETCH_OBJECT_VAL, - *snmp_syserr_p ? *snmp_syserr_p : err, oidstr, row); -} - -static void -add_thresholds(picl_nodehdl_t node, int row, int *snmp_syserr_p) -{ - uchar_t *bitstr = NULL; - uchar_t enabled; - uint_t nbytes; - int ret; - - ret = snmp_get_str(hdl, - OID_sunPlatNumericSensorEnabledThresholds, - row, (char **)&bitstr, snmp_syserr_p); - if (ret == -1) { - log_msg(LOG_ERR, SNMPP_CANT_FETCH_OBJECT_VAL, - *snmp_syserr_p ? *snmp_syserr_p : ret, - OID_sunPlatNumericSensorEnabledThresholds, row); - } else { - nbytes = strlen((const char *)bitstr); - } - - CHECK_LINKRESET_VOID(snmp_syserr_p); - - /* - * No bit string of threshold masks was returned, so we can't - * assume that any thresholds exist. - * - * This mask prevents us from attempting to fetch thresholds - * which don't apply to the sensor or that aren't there anyway, - * That speeds up the plug-in significantly since otherwise it - * takes several seconds to time out. - */ - if (ret < 0 || bitstr == NULL || nbytes == 0 || 2 < nbytes) { - free(bitstr); - return; - } else if (nbytes == 1) { - /* - * The ALOM snmp agent doesn't adhere to the BER rules for - * encoding bit strings. While the BER states that bitstrings - * must begin from the second octet after length, and the - * first octet after length must indicate the number of unused - * bits in the last octet, the snmp agent simply sends the - * bitstring data as if it were octet string -- that is, the - * "unused bits" octet is missing. - */ - enabled = bitstr[0]; - } else if (nbytes == 2) - enabled = bitstr[1]; - - if (bitstr) { - free(bitstr); - } - - if (enabled & LOWER_FATAL) { - threshold(node, - OID_sunPlatNumericSensorLowerThresholdFatal, row, - PICL_PROP_LOW_POWER_OFF, snmp_syserr_p); - CHECK_LINKRESET_VOID(snmp_syserr_p) - } - if (enabled & LOWER_CRITICAL) { - threshold(node, - OID_sunPlatNumericSensorLowerThresholdCritical, row, - PICL_PROP_LOW_SHUTDOWN, snmp_syserr_p); - CHECK_LINKRESET_VOID(snmp_syserr_p) - } - if (enabled & LOWER_NON_CRITICAL) { - threshold(node, - OID_sunPlatNumericSensorLowerThresholdNonCritical, row, - PICL_PROP_LOW_WARNING, snmp_syserr_p); - CHECK_LINKRESET_VOID(snmp_syserr_p) - } - if (enabled & UPPER_NON_CRITICAL) { - threshold(node, - OID_sunPlatNumericSensorUpperThresholdNonCritical, row, - PICL_PROP_HIGH_WARNING, snmp_syserr_p); - CHECK_LINKRESET_VOID(snmp_syserr_p) - } - if (enabled & UPPER_CRITICAL) { - threshold(node, - OID_sunPlatNumericSensorUpperThresholdCritical, row, - PICL_PROP_HIGH_SHUTDOWN, snmp_syserr_p); - CHECK_LINKRESET_VOID(snmp_syserr_p) - } - if (enabled & UPPER_FATAL) { - threshold(node, - OID_sunPlatNumericSensorUpperThresholdFatal, row, - PICL_PROP_HIGH_POWER_OFF, snmp_syserr_p); - CHECK_LINKRESET_VOID(snmp_syserr_p) - } -} - -static char * -get_slot_type(int row, int *snmp_syserr_p) -{ - char *p; - char *slott = NULL; - int ret; - - ret = snmp_get_str(hdl, OID_sunPlatEquipmentHolderAcceptableTypes, - row, &p, snmp_syserr_p); - CHECK_LINKRESET(snmp_syserr_p, NULL) - - if ((ret == 0) && p && *p) { - slott = p; - if ((p = strchr(slott, '\n')) != NULL) - *p = 0; - } else { - log_msg(LOG_WARNING, SNMPP_NO_SLOT_TYPE, row); - if (p) { - free(p); - } - } - - return (slott); -} - -/* - * Create and add the specified volatile property - */ -static int -add_volatile_prop(picl_nodehdl_t node, char *name, int type, int access, - int size, int (*rdfunc)(ptree_rarg_t *, void *), - int (*wrfunc)(ptree_warg_t *, const void *), picl_prophdl_t *propp) -{ - ptree_propinfo_t propinfo; - picl_prophdl_t prop; - int err; - - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - type, (access|PICL_VOLATILE), size, name, rdfunc, wrfunc); - if (err != PICL_SUCCESS) { - log_msg(LOG_ERR, SNMPP_CANT_INIT_PROPINFO, err); - return (err); - } - - err = ptree_create_and_add_prop(node, &propinfo, NULL, &prop); - if (err != PICL_SUCCESS) { - log_msg(LOG_ERR, SNMPP_CANT_ADD_PROP, err, node); - return (err); - } - - if (propp) - *propp = prop; - - return (PICL_SUCCESS); -} - -/* - * Add the specified string property to the node - */ -static int -add_string_prop(picl_nodehdl_t node, char *propname, char *propval) -{ - ptree_propinfo_t propinfo; - int err; - - if (*propval == '\0') - return (PICL_SUCCESS); - - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_CHARSTRING, PICL_READ, strlen(propval) + 1, - propname, NULL, NULL); - if (err != PICL_SUCCESS) { - log_msg(LOG_ERR, SNMPP_CANT_INIT_STR_PROPINFO, err); - return (err); - } - - err = ptree_create_and_add_prop(node, &propinfo, propval, NULL); - if (err != PICL_SUCCESS) { - log_msg(LOG_ERR, SNMPP_CANT_ADD_STR_PROP, err, node); - return (err); - } - - return (PICL_SUCCESS); -} - -/* - * Add the specified void property to the node - */ -static int -add_void_prop(picl_nodehdl_t node, char *propname) -{ - ptree_propinfo_t propinfo; - int err; - - err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION, - PICL_PTYPE_VOID, PICL_READ, 0, propname, NULL, NULL); - if (err != PICL_SUCCESS) { - log_msg(LOG_ERR, SNMPP_CANT_INIT_VOID_PROPINFO, err); - return (err); - } - - err = ptree_create_and_add_prop(node, &propinfo, NULL, NULL); - if (err != PICL_SUCCESS) { - log_msg(LOG_ERR, SNMPP_CANT_ADD_VOID_PROP, err, node); - return (err); - } - - return (PICL_SUCCESS); -} - -static void -add_prop(picl_nodehdl_t nodeh, picl_prophdl_t *php, char *label, - int row, sp_propid_t pp, int *snmp_syserr_p) -{ - char *serial_num; - char *slot_type; - char *fw_revision, *hw_revision; - char *mfg_name, *model_name; - char *phys_descr; - int val; - int ret; - - switch (pp) { - case PP_SERIAL_NUM: - ret = snmp_get_str(hdl, OID_entPhysicalSerialNum, - row, &serial_num, snmp_syserr_p); - CHECK_LINKRESET_VOID(snmp_syserr_p) - if ((ret == 0) && serial_num) { - (void) add_string_prop(nodeh, - PICL_PROP_SERIAL_NUMBER, serial_num); - free((void *) serial_num); - } - if (ret == -1) - log_msg(LOG_ERR, SNMPP_CANT_FETCH_OBJECT_VAL, - *snmp_syserr_p ? *snmp_syserr_p : ret, - OID_entPhysicalSerialNum, row); - break; - - case PP_SLOT_TYPE: - if ((slot_type = get_slot_type(row, snmp_syserr_p)) == NULL) { - CHECK_LINKRESET_VOID(snmp_syserr_p) - (void) add_string_prop(nodeh, - PICL_PROP_SLOT_TYPE, DEFAULT_SLOT_TYPE); - } else { - (void) add_string_prop(nodeh, - PICL_PROP_SLOT_TYPE, slot_type); - free((void *) slot_type); - } - break; - - case PP_STATE: - ret = add_volatile_prop(nodeh, PICL_PROP_STATE, - PICL_PTYPE_CHARSTRING, PICL_READ, MAX_ALARMSTATE_LEN, - read_volprop, NULL, php); - if (ret == PICL_SUCCESS) { - save_volprop(*php, OID_sunPlatAlarmState, row, - VPT_ALARMSTATE); - } - break; - - case PP_OPSTATUS: - ret = add_volatile_prop(nodeh, PICL_PROP_OPERATIONAL_STATUS, - PICL_PTYPE_CHARSTRING, PICL_READ, MAX_OPSTATE_LEN, - read_volprop, NULL, php); - if (ret == PICL_SUCCESS) { - save_volprop(*php, - OID_sunPlatEquipmentOperationalState, row, - VPT_PLATOPSTATE); - } - break; - - case PP_BATT_STATUS: - ret = add_volatile_prop(nodeh, PICL_PROP_BATTERY_STATUS, - PICL_PTYPE_CHARSTRING, PICL_READ, MAX_BATTERYSTATUS_LEN, - read_volprop, NULL, php); - if (ret == PICL_SUCCESS) { - save_volprop(*php, OID_sunPlatBatteryStatus, row, - VPT_BATTERYSTATUS); - } - break; - - case PP_TEMPERATURE: - ret = add_volatile_prop(nodeh, PICL_PROP_TEMPERATURE, - PICL_PTYPE_INT, PICL_READ, sizeof (int), read_volprop, - NULL, php); - if (ret == PICL_SUCCESS) { - save_volprop(*php, OID_sunPlatNumericSensorCurrent, - row, VPT_NUMSENSOR); - } - break; - - case PP_VOLTAGE: - ret = add_volatile_prop(nodeh, PICL_PROP_VOLTAGE, - PICL_PTYPE_INT, PICL_READ, sizeof (int), read_volprop, - NULL, php); - if (ret == PICL_SUCCESS) { - save_volprop(*php, OID_sunPlatNumericSensorCurrent, - row, VPT_NUMSENSOR); - } - break; - - case PP_CURRENT: - ret = add_volatile_prop(nodeh, PICL_PROP_CURRENT, - PICL_PTYPE_INT, PICL_READ, sizeof (int), read_volprop, - NULL, php); - if (ret == PICL_SUCCESS) { - save_volprop(*php, OID_sunPlatNumericSensorCurrent, - row, VPT_NUMSENSOR); - } - break; - - case PP_SPEED: - ret = add_volatile_prop(nodeh, PICL_PROP_SPEED, PICL_PTYPE_INT, - PICL_READ, sizeof (int), read_volprop, NULL, php); - if (ret == PICL_SUCCESS) { - save_volprop(*php, OID_sunPlatNumericSensorCurrent, - row, VPT_NUMSENSOR); - } - break; - - case PP_SENSOR_VALUE: - ret = add_volatile_prop(nodeh, PICL_PROP_SENSOR_VALUE, - PICL_PTYPE_INT, PICL_READ, sizeof (int), read_volprop, - NULL, php); - if (ret == PICL_SUCCESS) { - save_volprop(*php, OID_sunPlatNumericSensorCurrent, - row, VPT_NUMSENSOR); - } - break; - - case PP_CONDITION: - ret = add_volatile_prop(nodeh, PICL_PROP_CONDITION, - PICL_PTYPE_CHARSTRING, PICL_READ, MAX_TRUTHVAL_LEN, - read_volprop, NULL, php); - if (ret == PICL_SUCCESS) { - save_volprop(*php, OID_sunPlatBinarySensorCurrent, - row, VPT_BINSENSOR); - } - break; - - case PP_EXPECTED: - ret = add_volatile_prop(nodeh, PICL_PROP_EXPECTED, - PICL_PTYPE_CHARSTRING, PICL_READ, MAX_TRUTHVAL_LEN, - read_volprop, NULL, php); - if (ret == PICL_SUCCESS) { - save_volprop(*php, OID_sunPlatBinarySensorExpected, - row, VPT_BINSENSOR); - } - break; - - case PP_EXPONENT: - ret = add_volatile_prop(nodeh, PICL_PROP_EXPONENT, - PICL_PTYPE_INT, PICL_READ, sizeof (int), read_volprop, - NULL, php); - if (ret == PICL_SUCCESS) { - save_volprop(*php, OID_sunPlatNumericSensorExponent, - row, VPT_NUMSENSOR); - } - break; - - case PP_REPLACEABLE: - ret = snmp_get_int(hdl, OID_sunPlatCircuitPackReplaceable, - row, &val, snmp_syserr_p); - CHECK_LINKRESET_VOID(snmp_syserr_p) - if ((ret == 0) && (val == ST_TRUE)) - (void) add_void_prop(nodeh, PICL_PROP_IS_REPLACEABLE); - if (ret == -1) - log_msg(LOG_ERR, SNMPP_CANT_FETCH_OBJECT_VAL, - *snmp_syserr_p ? *snmp_syserr_p : ret, - OID_sunPlatCircuitPackReplaceable, row); - break; - - case PP_HOTSWAPPABLE: - ret = snmp_get_int(hdl, OID_sunPlatCircuitPackHotSwappable, - row, &val, snmp_syserr_p); - CHECK_LINKRESET_VOID(snmp_syserr_p) - if ((ret == 0) && (val == ST_TRUE)) - (void) add_void_prop(nodeh, PICL_PROP_IS_HOT_SWAPPABLE); - if (ret == -1) - log_msg(LOG_ERR, SNMPP_CANT_FETCH_OBJECT_VAL, - *snmp_syserr_p ? *snmp_syserr_p : ret, - OID_sunPlatCircuitPackHotSwappable, row); - break; - - case PP_IS_FRU: - ret = snmp_get_int(hdl, OID_entPhysicalIsFRU, row, - &val, snmp_syserr_p); - CHECK_LINKRESET_VOID(snmp_syserr_p) - if ((ret == 0) && (val == ST_TRUE)) - (void) add_void_prop(nodeh, PICL_PROP_IS_FRU); - if (ret == -1) - log_msg(LOG_ERR, SNMPP_CANT_FETCH_OBJECT_VAL, - *snmp_syserr_p ? *snmp_syserr_p : ret, - OID_entPhysicalIsFRU, row); - break; - - case PP_HW_REVISION: - ret = snmp_get_str(hdl, OID_entPhysicalHardwareRev, - row, &hw_revision, snmp_syserr_p); - CHECK_LINKRESET_VOID(snmp_syserr_p) - if ((ret == 0) && hw_revision) { - (void) add_string_prop(nodeh, - PICL_PROP_HW_REVISION, hw_revision); - free((void *) hw_revision); - } - if (ret == -1) - log_msg(LOG_ERR, SNMPP_CANT_FETCH_OBJECT_VAL, - *snmp_syserr_p ? *snmp_syserr_p : ret, - OID_entPhysicalHardwareRev, row); - break; - - case PP_FW_REVISION: - ret = snmp_get_str(hdl, OID_entPhysicalFirmwareRev, - row, &fw_revision, snmp_syserr_p); - CHECK_LINKRESET_VOID(snmp_syserr_p) - if ((ret == 0) && fw_revision) { - (void) add_string_prop(nodeh, - PICL_PROP_FW_REVISION, fw_revision); - free((void *) fw_revision); - } - if (ret == -1) - log_msg(LOG_ERR, SNMPP_CANT_FETCH_OBJECT_VAL, - *snmp_syserr_p ? *snmp_syserr_p : ret, - OID_entPhysicalFirmwareRev, row); - break; - - case PP_MFG_NAME: - ret = snmp_get_str(hdl, OID_entPhysicalMfgName, - row, &mfg_name, snmp_syserr_p); - CHECK_LINKRESET_VOID(snmp_syserr_p) - if ((ret == 0) && mfg_name) { - (void) add_string_prop(nodeh, - PICL_PROP_MFG_NAME, mfg_name); - free((void *) mfg_name); - } - if (ret == -1) - log_msg(LOG_ERR, SNMPP_CANT_FETCH_OBJECT_VAL, - *snmp_syserr_p ? *snmp_syserr_p : ret, - OID_entPhysicalMfgName, row); - break; - - case PP_MODEL_NAME: - ret = snmp_get_str(hdl, OID_entPhysicalModelName, - row, &model_name, snmp_syserr_p); - CHECK_LINKRESET_VOID(snmp_syserr_p) - if ((ret == 0) && model_name) { - (void) add_string_prop(nodeh, - PICL_PROP_MODEL_NAME, model_name); - free((void *) model_name); - } - if (ret == -1) - log_msg(LOG_ERR, SNMPP_CANT_FETCH_OBJECT_VAL, - *snmp_syserr_p ? *snmp_syserr_p : ret, - OID_entPhysicalModelName, row); - break; - - case PP_DESCRIPTION: - ret = snmp_get_str(hdl, OID_entPhysicalDescr, - row, &phys_descr, snmp_syserr_p); - CHECK_LINKRESET_VOID(snmp_syserr_p) - if ((ret == 0) && phys_descr) { - (void) add_string_prop(nodeh, - PICL_PROP_PHYS_DESCRIPTION, phys_descr); - free((void *) phys_descr); - } - if (ret == -1) - log_msg(LOG_ERR, SNMPP_CANT_FETCH_OBJECT_VAL, - *snmp_syserr_p ? *snmp_syserr_p : ret, - OID_entPhysicalDescr, row); - break; - - case PP_LABEL: - if (label && *label) - (void) add_string_prop(nodeh, PICL_PROP_LABEL, label); - break; - - case PP_BASE_UNITS: - ret = snmp_get_int(hdl, OID_sunPlatNumericSensorBaseUnits, - row, &val, snmp_syserr_p); - CHECK_LINKRESET_VOID(snmp_syserr_p) - if ((ret == 0) && (val > 0) && (val < n_baseunits)) { - (void) add_string_prop(nodeh, - PICL_PROP_BASE_UNITS, sensor_baseunits[val]); - } - if (ret == -1) - log_msg(LOG_ERR, SNMPP_CANT_FETCH_OBJECT_VAL, - *snmp_syserr_p ? *snmp_syserr_p : ret, - OID_sunPlatNumericSensorBaseUnits, row); - break; - - case PP_RATE_UNITS: - ret = snmp_get_int(hdl, OID_sunPlatNumericSensorRateUnits, - row, &val, snmp_syserr_p); - CHECK_LINKRESET_VOID(snmp_syserr_p) - if ((ret == 0) && (val > 0) && (val < n_rateunits)) { - (void) add_string_prop(nodeh, - PICL_PROP_RATE_UNITS, sensor_rateunits[val]); - } - if (ret == -1) - log_msg(LOG_ERR, SNMPP_CANT_FETCH_OBJECT_VAL, - *snmp_syserr_p ? *snmp_syserr_p : ret, - OID_sunPlatNumericSensorRateUnits, row); - break; - } -} - -/* - * Initialize the SNMP library's cache refresh subsystem, then periodically - * process refresh job to prevent cache entries from expiring. - */ -/*ARGSUSED*/ -static void * -cache_refresher(void *arg) -{ - int jobs; - int next_expiration; - timestruc_t to; - hrtime_t cycle_start, cycle_elapsed; - - /* - * Initialize refresh subsystem - */ - LOGPRINTF("Initializing SNMP refresh subsystem.\n"); - if (snmp_refresh_init() < 0) { - return ((void *)-1); - } - - (void) mutex_lock(&cache_refresh_lock); - - - for (;;) { - cycle_start = gethrtime(); - - /* - * Process jobs from the snmp cache refresh work queue until one - * of the following conditions is true: - * 1) we are told to exit, or - * 2) we have processed at least as many jobs as recommended by - * the library, and the next job expiration is at least - * CACHE_REFRESH_MIN_WINDOW * seconds away. - */ - jobs = snmp_refresh_get_cycle_hint(CACHE_REFRESH_CYCLE); - while ((cache_refresh_thr_exit == B_FALSE) && (jobs > 0)) { - (void) snmp_refresh_process_job(); - jobs--; - } - - next_expiration = snmp_refresh_get_next_expiration(); - while ((cache_refresh_thr_exit == B_FALSE) && - ((next_expiration >= 0) && - (next_expiration < CACHE_REFRESH_MIN_WINDOW))) { - (void) snmp_refresh_process_job(); - next_expiration = snmp_refresh_get_next_expiration(); - } - - /* - * As long as we haven't been told to exit, sleep for - * CACHE_REFRESH_CYCLE seconds minus the amount of time that has - * elapsed since this cycle started. If the elapsed time is - * equal to or greater than 60 seconds, skip sleeping entirely. - */ - cycle_elapsed = (gethrtime() - cycle_start) / NANOSEC; - if ((cache_refresh_thr_exit == B_FALSE) && - (cycle_elapsed < CACHE_REFRESH_CYCLE)) { - to.tv_sec = CACHE_REFRESH_CYCLE - cycle_elapsed; - to.tv_nsec = 0; - (void) cond_reltimedwait(&cache_refresh_cv, - &cache_refresh_lock, &to); - } - - /* - * If we have been told to exit, clean up and bail out. - */ - if (cache_refresh_thr_exit == B_TRUE) { - snmp_refresh_fini(); - (void) mutex_unlock(&cache_refresh_lock); - LOGPRINTF("cache_refresher: time to exit\n"); - return (NULL); - } - - } - - /*NOTREACHED*/ - return (NULL); -} - -/* - * Check to see if the cache_refresher thread is running. If it is, signal it - * to terminate and clean up associated data structures. - */ -void -cache_refresher_fini(void) -{ - /* if the thread isn't running, there is nothing to do */ - if (cache_refresh_thr_exit == B_TRUE) - return; - - /* wake up the cache_refresher thread, tell it to exit */ - (void) mutex_lock(&cache_refresh_lock); - cache_refresh_thr_exit = B_TRUE; - (void) cond_signal(&cache_refresh_cv); - (void) mutex_unlock(&cache_refresh_lock); - - /* reap the thread */ - (void) thr_join(cache_refresh_thr_id, NULL, NULL); - - /* finish cleanup... */ - (void) cond_destroy(&cache_refresh_cv); - (void) mutex_destroy(&cache_refresh_lock); -} - -/*VARARGS2*/ -static void -log_msg(int pri, const char *fmt, ...) -{ - va_list ap; - - va_start(ap, fmt); - vsyslog(pri, fmt, ap); - va_end(ap); -} - -#ifdef SNMPPLUGIN_DEBUG - -static void -snmpplugin_log_init(void) -{ - (void) mutex_init(&snmpplugin_dbuf_lock, USYNC_THREAD, NULL); -} - -static void -snmpplugin_log(const char *fmt, ...) -{ - va_list ap; - - (void) mutex_lock(&snmpplugin_dbuf_lock); - - va_start(ap, fmt); - (void) vsnprintf(snmpplugin_lbuf, SNMPPLUGIN_DMAX_LINE, fmt, ap); - snmpplugin_log_append(); - va_end(ap); - - (void) mutex_unlock(&snmpplugin_dbuf_lock); -} - -static void -snmpplugin_log_append(void) -{ - int len; - - len = strlen(snmpplugin_lbuf); - - if ((snmpplugin_dbuf_curp + len) >= - (snmpplugin_dbuf + snmpplugin_dbuf_sz)) { - snmpplugin_dbuf_realloc(); - if (snmpplugin_dbuf == NULL) { - return; - } - } - - (void) strcpy(snmpplugin_dbuf_curp, snmpplugin_lbuf); - snmpplugin_dbuf_curp += len; -} - -static void -snmpplugin_dbuf_realloc(void) -{ - char *p; - size_t offset = 0; - size_t count; - - count = snmpplugin_dbuf_sz + SNMPPLUGIN_DBLOCK_SZ; - if ((p = (char *)calloc(count, 1)) == NULL) { - snmpplugin_dbuf_overflow++; - snmpplugin_dbuf_curp = snmpplugin_dbuf; - return; - } - - if (snmpplugin_dbuf) { - offset = snmpplugin_dbuf_curp - snmpplugin_dbuf; - (void) memcpy(p, snmpplugin_dbuf, snmpplugin_dbuf_sz); - free(snmpplugin_dbuf); - } - - snmpplugin_dbuf = p; - snmpplugin_dbuf_sz += SNMPPLUGIN_DBLOCK_SZ; - - snmpplugin_dbuf_curp = snmpplugin_dbuf + offset; -} -#endif diff --git a/usr/src/cmd/picl/plugins/sun4v/snmp/snmpplugin.h b/usr/src/cmd/picl/plugins/sun4v/snmp/snmpplugin.h deleted file mode 100644 index 8bd7d87db1..0000000000 --- a/usr/src/cmd/picl/plugins/sun4v/snmp/snmpplugin.h +++ /dev/null @@ -1,217 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL 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 _SNMPPLUGIN_H -#define _SNMPPLUGIN_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * The /physical-platform node - */ -#define PICL_NODE_PHYSPLAT "physical-platform" - -/* - * List of volatile property OIDs to lookup and update when needed - */ -typedef struct { - picl_prophdl_t prop; - char *oidstr; - int row; - int proptype; -} vol_prophdl_t; - -/* - * Types of volatile properties (proptype values) - */ -#define VPT_PLATOPSTATE 1 -#define VPT_NUMSENSOR 2 -#define VPT_BINSENSOR 3 -#define VPT_ALARMSTATE 4 -#define VPT_BATTERYSTATUS 5 - -/* - * Storage related and miscellaneous definitions - */ -#define N_ELEMS_IN_VOLPROP_BLOCK 512 -#define N_ELEMS_IN_NODE_BLOCK 256 -#define NODE_BLOCK_SHIFT 8 -#define DEFAULT_SLOT_TYPE "slot" - -/* - * Local macros and property ids - */ -#define ADD_NODE(cl) \ -{ \ - if (ptree_create_and_add_node(parenth, node_name, cl, \ - &nodeh) != PICL_SUCCESS) { \ - log_msg(LOG_ERR, SNMPP_ADD_NODE_FAIL, node_name, cl); \ - return (NULL); \ - } \ -} - -#define CHECK_LINKRESET(errp, retval) \ - if ((errp) && (*errp == ECANCELED)) { \ - return (retval); \ - } - -#define CHECK_LINKRESET_VOID(errp) \ - if ((errp) && (*errp == ECANCELED)) { \ - return; \ - } - -#define min(x, y) ((x) < (y) ? (x) : (y)) - -typedef enum { - PP_SERIAL_NUM = 1, - PP_SLOT_TYPE, - PP_STATE, - PP_OPSTATUS, - PP_BATT_STATUS, - PP_TEMPERATURE, - PP_VOLTAGE, - PP_CURRENT, - PP_SPEED, - PP_SENSOR_VALUE, - PP_BASE_UNITS, - PP_EXPONENT, - PP_RATE_UNITS, - PP_CONDITION, - PP_EXPECTED, - PP_REPLACEABLE, - PP_HOTSWAPPABLE, - PP_IS_FRU, - PP_HW_REVISION, - PP_FW_REVISION, - PP_MFG_NAME, - PP_MODEL_NAME, - PP_DESCRIPTION, - PP_LABEL -} sp_propid_t; - -/* - * Plugin global routines - */ -void snmpplugin_init(void); -void snmpplugin_fini(void); - -/* - * Plugin messages - */ -#define SNMPP_NO_ROOT \ - gettext("PICL snmpplugin: cannot get picl tree root (ret=%d)\n") - -#define SNMPP_CANT_INIT \ - gettext("PICL snmpplugin: cannot initialize snmp service\n") - -#define SNMPP_CANT_CREATE_PHYSPLAT \ - gettext("PICL snmpplugin: cannot create physical-platform root (ret=%d)\n") - -#define SNMPP_CANT_CREATE_TREE_BUILDER \ - gettext("PICL snmpplugin: cannot create thr to handle hotplugs (ret=%d)\n") - -#define SNMPP_NO_ENTPHYSNAME \ - gettext("PICL snmpplugin: cannot get entPhysicalName (row=%d)\n") - -#define SNMPP_ADD_NODE_FAIL \ - gettext("PICL snmpplugin: couldn't add node %s (class=%d)\n") - -#define SNMPP_UNSUPP_SENSOR_CLASS \ - gettext("PICL snmpplugin: sunPlatSensorClass %d unsupported (row=%d)\n") - -#define SNMPP_UNKNOWN_ENTPHYSCLASS \ - gettext("PICL snmpplugin: entPhysicalClass %d unknown (row=%d)\n") - -#define SNMPP_NO_MEM \ - gettext("PICL snmpplugin: failed to allocate %d bytes\n") - -#define SNMPP_CANT_FIND_VOLPROP \ - gettext("PICL snmpplugin: cannot find volatile property (proph=%lx)\n") - -#define SNMPP_INV_PLAT_EQUIP_OPSTATE \ - gettext("PICL snmpplugin: invalid sunPlatEquipmentOpState %d (row=%d)\n") - -#define SNMPP_INV_PLAT_BINSNSR_CURRENT \ - gettext("PICL snmpplugin: invalid sunPlatBinarySensorCurrent %d (row=%d)\n") - -#define SNMPP_NO_SLOT_TYPE \ - gettext("PICL snmpplugin: no acceptable slot types (row=%d)\n") - -#define SNMPP_CANT_INIT_PROPINFO \ - gettext("PICL snmpplugin: cannot init picl propinfo (err=%d)\n") - -#define SNMPP_CANT_ADD_PROP \ - gettext("PICL snmpplugin: cannot add property, err=%d (node=%lx)\n") - -#define SNMPP_CANT_INIT_STR_PROPINFO \ - gettext("PICL snmpplugin: cannot init picl str propinfo (err=%d)\n") - -#define SNMPP_CANT_ADD_STR_PROP \ - gettext("PICL snmpplugin: cannot add string property (err=%d, node=%lx)\n") - -#define SNMPP_CANT_INIT_VOID_PROPINFO \ - gettext("PICL snmpplugin: cannot init picl void propinfo (err=%d)\n") - -#define SNMPP_CANT_ADD_VOID_PROP \ - gettext("PICL snmpplugin: cannot add void property (err=%d, node=%lx)\n") - -#define SNMPP_CANT_INIT_INT_PROPINFO \ - gettext("PICL snmpplugin: cannot init picl int propinfo (err=%d)\n") - -#define SNMPP_CANT_ADD_INT_PROP \ - gettext("PICL snmpplugin: cannot add int property (err=%d, node=%lx)\n") - -#define SNMPP_CANT_FETCH_OBJECT_VAL \ - gettext("PICL snmpplugin: cannot fetch object value " \ - "(err=%d, OID=<%s>, row=%d)\n") - -#define SNMPP_LINK_RESET \ - gettext("PICL snmpplugin: snmp ds reset happened, rebuilding tree\n") - -#define SIGACT_FAILED \ - gettext("PICL snmpplugin: Failed to install signal handler for %s: %s\n") - -#ifdef SNMPPLUGIN_DEBUG -#define SNMPPLUGIN_DBLOCK_SZ 4096 -#define SNMPPLUGIN_DMAX_LINE 80 -#define LOGINIT() snmpplugin_log_init() -#define LOGPRINTF(s) snmpplugin_log(s) -#define LOGPRINTF1(s, a1) snmpplugin_log(s, a1) -#define LOGPRINTF2(s, a1, a2) snmpplugin_log(s, a1, a2) -#else -#define LOGINIT() -#define LOGPRINTF(s) -#define LOGPRINTF1(s, a1) -#define LOGPRINTF2(s, a1, a2) -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* _SNMPPLUGIN_H */ -- 2.11.4.GIT