mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-07-01 18:23:36 +00:00
Compare commits
373 Commits
ipmitool
...
IPMITOOL_1
Author | SHA1 | Date | |
---|---|---|---|
eb94a394ba | |||
1636dbcf0c | |||
9f2072e6c3 | |||
d57bf32668 | |||
0d6a45357b | |||
d1b0e68515 | |||
4520b6ff0e | |||
a40737f856 | |||
a40d51abff | |||
9fd4dedd37 | |||
baa2c08ab3 | |||
955a875274 | |||
5d271b0f67 | |||
954859e330 | |||
19423c68d0 | |||
0f896e36f2 | |||
0008072590 | |||
aeba39bffc | |||
f3f4361568 | |||
aede0cee75 | |||
61d2f24090 | |||
3123ce01b5 | |||
f70a19cf63 | |||
02cdde0264 | |||
19293f08df | |||
c7169bc27e | |||
d6ca800da2 | |||
8fe8a5c74c | |||
9639cb3fa1 | |||
d65658aacc | |||
4648843f81 | |||
24ebe2fed9 | |||
2b8974fb22 | |||
38241decc7 | |||
a6a67e5e9c | |||
ac646c329b | |||
25e39b337c | |||
cacdd1b6ec | |||
eb5c73c04e | |||
55b024f573 | |||
e1897e2a1d | |||
9289aeb8c2 | |||
4e707af583 | |||
dc5dead291 | |||
b8ca3cac3a | |||
a74e837562 | |||
6a196c4a6a | |||
909fc7815c | |||
65ea078bdf | |||
89dbad1655 | |||
9020b67347 | |||
f62b924cb4 | |||
8055e0d9fb | |||
f67a7a3b2f | |||
ac1b3e1d46 | |||
336b2cb1ab | |||
2c3a876a73 | |||
37307c93e9 | |||
c9e3e6a01b | |||
603c14274a | |||
14368335b2 | |||
c56b5c9667 | |||
718a242205 | |||
636a785d82 | |||
c38ecd063f | |||
b6d0afb0f6 | |||
5be090f047 | |||
607cfe6f47 | |||
999cd0ad91 | |||
ffeb535db8 | |||
4a8691f477 | |||
c04aa9bb4e | |||
329281bbce | |||
e2c5b322d8 | |||
13a2a29156 | |||
3412d86143 | |||
a98eedb272 | |||
372b458e0f | |||
0caa68115e | |||
a5c1120dbb | |||
1add1486f9 | |||
89e9e63443 | |||
30becb3588 | |||
0d8f9a7453 | |||
ff80a188f3 | |||
169d9ac3fc | |||
6dec83ff5d | |||
c87aa0b96a | |||
fb6e311d27 | |||
24fd406506 | |||
a585af7e0c | |||
e8450850e3 | |||
2d79e69f5f | |||
259500e127 | |||
70099a3c40 | |||
82f6175dc7 | |||
d12b3b4870 | |||
ace0e646a1 | |||
eb54136775 | |||
9caa78be38 | |||
925a2fe55c | |||
531569ec62 | |||
ce861658c0 | |||
f1c6118c72 | |||
d5c2e976d4 | |||
7a854623aa | |||
fd5fdc59f2 | |||
4725cfd6d9 | |||
5a30d18af2 | |||
11bbf18345 | |||
026a8b6fce | |||
410606e868 | |||
8081427543 | |||
8f1f31cfdc | |||
90e2134413 | |||
66eee40df4 | |||
a6d47ceba4 | |||
21151953a5 | |||
b591bc2ab7 | |||
0e99dafa12 | |||
4c5058cdc3 | |||
f35ed010f0 | |||
512ec41ab4 | |||
b88a523ded | |||
75843864ba | |||
45c54aad0e | |||
32c4690950 | |||
03d8aa1882 | |||
d874267e9b | |||
c59e7247dd | |||
88891f69d6 | |||
aabd9eb1ac | |||
82a0caa38b | |||
55b1a41855 | |||
c56458da18 | |||
ce3f35d9d9 | |||
4dfb15281e | |||
7bd7c4fdd1 | |||
f0acdf1b50 | |||
ece5e55745 | |||
99721b52e4 | |||
0b54fac782 | |||
312f95930d | |||
d36cfcb817 | |||
33f9336e85 | |||
6febd10121 | |||
6b8d55d68b | |||
12b85b3c7b | |||
0ff2d6e464 | |||
dab7f5bf81 | |||
6c3f60e57c | |||
278dc84b22 | |||
0801b4588d | |||
56aa025dc2 | |||
238d3c4ea9 | |||
69f668309b | |||
585cb7c83d | |||
708be8bc45 | |||
d6deeb264e | |||
bcb96209c5 | |||
8227384c02 | |||
39fb1af285 | |||
faae8fd247 | |||
b6ec5072f4 | |||
fb36c69391 | |||
d099dca9c5 | |||
af276d4082 | |||
e4be291c65 | |||
bb35d370ba | |||
31f9d4c635 | |||
6d1afbf3a7 | |||
d9acbc4cd0 | |||
9811f79eae | |||
2d66f8d5cf | |||
8775af38f5 | |||
9fc4a39fda | |||
a6957f875c | |||
4ef4618366 | |||
8ac8361aca | |||
fb69b5dc9e | |||
c2e65d0dce | |||
12eeca602c | |||
c076fde0a6 | |||
ecfaeb2706 | |||
61db4df637 | |||
e37e3ab7de | |||
c97dbd3461 | |||
48117f5ddf | |||
70984dcad5 | |||
ce02ffaf2a | |||
3105812a44 | |||
148d0e0904 | |||
6ca88cb687 | |||
6d4e2bb632 | |||
104a7176ac | |||
d9f89a8da0 | |||
0a1f5c03e5 | |||
140add9d77 | |||
0562c809af | |||
a87b2ccc67 | |||
ad77da2065 | |||
6e6a04f971 | |||
befb21497f | |||
1d1ce49bf4 | |||
50bd7d01a8 | |||
4d3decc4c0 | |||
f8ce85ee6c | |||
2aa5d8c902 | |||
3c34aa0e1d | |||
a58a627fae | |||
aaf98b89d5 | |||
7cd86aaf1e | |||
dd4cab8153 | |||
d671052143 | |||
e9c3de03c3 | |||
1cf65c3236 | |||
0eaa2eae51 | |||
f56d740d98 | |||
342f44b9f3 | |||
e1c7b532bd | |||
3314024867 | |||
15499d014f | |||
21fbd0e967 | |||
deb9a4ed5d | |||
58837647c2 | |||
5c85c7bc61 | |||
aa8bac2da2 | |||
2b15969dcb | |||
7560d4f2f4 | |||
859e8a4576 | |||
f49c9eec53 | |||
a6f34c9029 | |||
bee3fda656 | |||
737b801768 | |||
96b19bb62d | |||
9372d2e34e | |||
9babab10f3 | |||
58d510f90f | |||
ea49700ec1 | |||
732be1b968 | |||
2f57897501 | |||
d79b0e05af | |||
3b15a7c0e2 | |||
3f508629a5 | |||
3473670051 | |||
aefd287222 | |||
6d25903a0b | |||
26da519310 | |||
edfee17f21 | |||
b37b914973 | |||
4e4a92100c | |||
8f7837364b | |||
be7917f9f5 | |||
a7d3bda08d | |||
d531785a23 | |||
eeeb973e39 | |||
166ae1da23 | |||
4f0967779e | |||
9d88837ef3 | |||
824c0ed4a0 | |||
7ea04d8f77 | |||
8d5e8fcf7a | |||
2c7526be6b | |||
a88db0d181 | |||
42aba7eb4f | |||
23e9340b49 | |||
707d77ffbc | |||
7584b96c1d | |||
cc85ce1333 | |||
2c7a5f91ef | |||
9e3dba7e97 | |||
176774cf9f | |||
cab450a052 | |||
250eb15f92 | |||
02e4a0361c | |||
ca5cc560f6 | |||
b4a9d2f9a2 | |||
8d44c55feb | |||
c18ec02f33 | |||
b0aad15d67 | |||
adbf585bd4 | |||
9393bf0133 | |||
2c2844ac03 | |||
c186e2a681 | |||
e02ed2ca2c | |||
a06f8a26d4 | |||
a324db391c | |||
b086e876d7 | |||
555a08ece0 | |||
696ccb0787 | |||
86cb5ee175 | |||
99fff91f9d | |||
df3e3c7969 | |||
135977a497 | |||
4e220bebb0 | |||
4698e667f5 | |||
ff1dbe3d5b | |||
d42890ef17 | |||
2d7fe32687 | |||
3a852a8849 | |||
c9e047c334 | |||
6cf6b4b845 | |||
36c11f6033 | |||
5dc9585e77 | |||
0b97d32c25 | |||
5949b19d44 | |||
0cd8f46c42 | |||
2ff745286b | |||
f6cabfb089 | |||
d3ca7cb090 | |||
6871fe1c8e | |||
b9a0c5a091 | |||
1cc4ba699d | |||
b779439ad0 | |||
63ef18e6e0 | |||
935b215514 | |||
cd524c2d25 | |||
e24c7f75f2 | |||
da4b779adf | |||
aca8d6ad7b | |||
5416af78a5 | |||
770e61663f | |||
22f294fc27 | |||
a675601da4 | |||
645120f545 | |||
2df9ca914f | |||
a5d55b5d51 | |||
f2ba7fcd60 | |||
24923222f6 | |||
5bf68a4769 | |||
4e2ac7d097 | |||
d5d86d4dcb | |||
0a4a5cafbc | |||
043c42160e | |||
49879b387c | |||
38121041c1 | |||
d8f27165d1 | |||
5a1e81a948 | |||
f12b976ebc | |||
0dddcfe450 | |||
700658e91e | |||
3df72b68bc | |||
068bcb02e4 | |||
52634a708f | |||
2b08fd405e | |||
fb3c6f292e | |||
d02492f1c7 | |||
9517cb332b | |||
ae96dd3229 | |||
968f5d6552 | |||
f4730e1f67 | |||
b782311e10 | |||
45d0a4255a | |||
ac9513025c | |||
60a3e63429 | |||
f19ed0a90b | |||
7a0b451fd7 | |||
a8119d13a8 | |||
f56cea1253 | |||
7b5683d85d | |||
80c03570ac | |||
6de0796079 | |||
18aadc30d0 | |||
08f50ad301 | |||
b803224398 | |||
5d3c64f028 | |||
942dcb71d8 | |||
29af592773 | |||
ada4b48baf | |||
47831b3c15 | |||
efdeb12724 | |||
c7412e5815 | |||
041d8e4bf8 |
12
.gitignore
vendored
Normal file
12
.gitignore
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
Makefile.in
|
||||||
|
aclocal.m4
|
||||||
|
autom4te.cache
|
||||||
|
compile
|
||||||
|
config.guess
|
||||||
|
config.h.in
|
||||||
|
config.sub
|
||||||
|
configure
|
||||||
|
depcomp
|
||||||
|
install-sh
|
||||||
|
ltmain.sh
|
||||||
|
missing
|
@ -2,3 +2,4 @@ Duncan Laurie <duncan@iceblink.org>
|
|||||||
Fredrik Öhrn <ohrn@chl.chalmers.se>
|
Fredrik Öhrn <ohrn@chl.chalmers.se>
|
||||||
Jon Cassorla <jon.cassorla@newisys.com>
|
Jon Cassorla <jon.cassorla@newisys.com>
|
||||||
Jeremy Ellington <jeremy@jeremye.net>
|
Jeremy Ellington <jeremy@jeremye.net>
|
||||||
|
Petter Reinholdtsen <pere@hungry.com>
|
@ -1,3 +1,292 @@
|
|||||||
|
version 1.8.17 2016-05-01
|
||||||
|
* Add INSTALL and NEWS, mandated by autoconf
|
||||||
|
* Added missing ipmi_sel_supermicro.h to template Makefile.am
|
||||||
|
* Check rsp->data_len in ipmi_sel_get_info()
|
||||||
|
* Fix "redirecting incorrect #include <sys/poll.h> to <poll.h>"
|
||||||
|
warning with musl libc
|
||||||
|
* Fix automake compatibility warnings
|
||||||
|
* Fix implicit declaration of function
|
||||||
|
'get_nic_selection_mode_12g' in lib/ipmi_delloem.c
|
||||||
|
* Fix implicit declaration of function 'ipmi_get_oem' in
|
||||||
|
src/plugins/imb/imb.c
|
||||||
|
* Fix implicit declaration of function 'ipmi_get_oem' in
|
||||||
|
src/plugins/lanplus/lanplus.c
|
||||||
|
* Fix implicit declaration of function 'ipmi_get_oem' in
|
||||||
|
src/plugins/open/open.c
|
||||||
|
* Fix implicit declarations of functions 'HpmfwupgPreUpgradeCheck'
|
||||||
|
and 'ipmi_intf_get_max_request_data_size' in lib/ipmi_hpmfwupg.c
|
||||||
|
* Fix implicit declarations of functions
|
||||||
|
'ipmi_intf_set_max_request_data_size' and
|
||||||
|
'ipmi_intf_set_max_response_data_size' in lib/hpm2.c
|
||||||
|
* Fix implicit function declaration of
|
||||||
|
ipmi_intf_get_max_response_data_size in lib/ipmi_sdr.c
|
||||||
|
* Fix several implicit declarations of functions in
|
||||||
|
lib/ipmi_main.c
|
||||||
|
* Fix several implicit function declarations in lib/ipmi_fru.c
|
||||||
|
* Fix warning: suggest parentheses around '+' inside '<<'
|
||||||
|
in lib/ipmi_main.c
|
||||||
|
* Fix warning: suggest parentheses around arithmetic in operand of
|
||||||
|
'|' in include/ipmitool/hpm2
|
||||||
|
* Get rid of old INCLUDES macro, use AM_CPPFLAGS instead.
|
||||||
|
* ID 440 - Fix 'unknown type name fd_set" error.
|
||||||
|
* ID 440 - remove obsolete headers from lib/ipmi_sunoem.c
|
||||||
|
* ID:322 - let 'ekanalyzer frushow' run without a working
|
||||||
|
IPMI target
|
||||||
|
* ID:355 - Add #include <strings.h> to lib/ipmi_sel.c
|
||||||
|
* ID:355 - Add macros and #include and reduce number of warnings
|
||||||
|
* ID:355 - Change CFLAG -std=c99 to -std=gnu99
|
||||||
|
* ID:355 - Move Super Micro stuff into dedicated header file
|
||||||
|
* ID:355 - Remove declared, but not used variables
|
||||||
|
* ID:404 - Edit FRU information update problem
|
||||||
|
* ID:405 - Use meaningful Generator ID for "ipmitool sel add"
|
||||||
|
* ID:407 - Avoid assert on mismatched session ID
|
||||||
|
* ID:409 - Fix IPv6 socket creation on Windows/Cygwin.
|
||||||
|
* ID:410 - Disable USB interface for Windows/Cygwin by default.
|
||||||
|
* ID:410 - Enable/disable USB interface by "auto"
|
||||||
|
* ID:411 - Fix HPM.2 revision check for R1.1 and subsequent
|
||||||
|
specification revisions.
|
||||||
|
* ID:412 - Check errors when setting a user password.
|
||||||
|
* ID:413 - Print new line chne character when setting user
|
||||||
|
privilege.
|
||||||
|
* ID:414 - ekanalyzer frushow fails to show 'Product Info'
|
||||||
|
correctly
|
||||||
|
* ID:417 - Fix some typos
|
||||||
|
* ID:418 - Fix Compiling under Mac OS X
|
||||||
|
* ID:419 - List dummy.h in Makefile.am, so it gets included in
|
||||||
|
a release tarball
|
||||||
|
* ID:421 - Fix memleak for sol output
|
||||||
|
* ID:423 - Don't assume internal use area is present in ekanalyzer
|
||||||
|
* ID:424 - Update dimm_spd.c with data from the latest JEDEC List
|
||||||
|
* ID:425 - Disable USB interface for OS X/darwin
|
||||||
|
* ID:426 - Fallback to run-time detection of PAGESIZE if
|
||||||
|
compile-time detection is not supported
|
||||||
|
* ID:426 - Include sys/socket.h instead of asm/socket.h
|
||||||
|
* ID:426 - Include wchar.h instead of defining wchar_t ourselves
|
||||||
|
* ID:427 - Cleanup comment in ipmi_sdr_get_header()
|
||||||
|
* ID:427 - The first two bytes of dumped raw SDR data is wrong.
|
||||||
|
* ID:428 - Update IANA numbers / Product Name for IBM and ADLINK
|
||||||
|
* ID:430 - Change Nokia Siemens Networks to Nokia Solutions
|
||||||
|
and Networks
|
||||||
|
* ID:431 - Fix correct interpretation of led states
|
||||||
|
* ID:437 - sel: Fix "sel time set <time>"
|
||||||
|
* Make bootstrap script part of dist packages
|
||||||
|
* Remove #if 0 code aka not-compiled-in
|
||||||
|
* Remove trailing white-spaces in lib/log.c
|
||||||
|
* git-ignore autoconf-generated files
|
||||||
|
|
||||||
|
version 1.8.16 2015-11-22
|
||||||
|
* Add _ipmi_get_channel_access() and _ipmi_get_channel_info()
|
||||||
|
* Add _ipmi_get_user_access() and _ipmi_set_user_access()
|
||||||
|
* Add _ipmi_get_user_name()
|
||||||
|
* Add _ipmi_set_channel_access() function
|
||||||
|
* Add _ipmi_set_user_password() function
|
||||||
|
* Add limits check in get_cmdline_macaddr()
|
||||||
|
* Change expression in ipmi_pef_get_info() in order to silence Coverity
|
||||||
|
* Change expression in ipmi_pef_list_policies() in order to silence Coverity
|
||||||
|
* Code cleanup in ipmi_user_main()
|
||||||
|
* Create ask_password() and re-use code
|
||||||
|
* Delete dead code from ipmi_sunoem_echo() - CID#1261338
|
||||||
|
* Don't output pidfile before parsing command line arguments
|
||||||
|
* Don't use tmp variable since it's not necessary in ipmi_user_test()
|
||||||
|
* Fix 'user help' output
|
||||||
|
* Fix Assign instead of compare in KfwumGetDeviceInfo() - CID#1149034
|
||||||
|
* Fix Identical code for different branches in ipmi_tsol_main() -
|
||||||
|
CID#1261346
|
||||||
|
* Fix big parameter passed by value in ipmi_sel_oem_match() - CID#1261347
|
||||||
|
* Fix dead code in ipmi_firewall_reset() - CID#1261342
|
||||||
|
* Fix eval logic in ipmi_user_priv()
|
||||||
|
* Fix file descriptor leak in ipmi_exec_main() - CID#1149040
|
||||||
|
* Fix identical code for diff branches in DellOEM - CID#1261326
|
||||||
|
* Fix memory leak in get_supermicro_evt_desc()
|
||||||
|
* Fix memory leak in ipmi_ek_display_board_info_area() - CID#1149051
|
||||||
|
* Fix missing return in ipmi_kontronoem_main() - CID#1261317
|
||||||
|
* Fix of previous commit - memset() expects pointer
|
||||||
|
* Fix out-of-bound-reads in get_supermicro_evt_desc()
|
||||||
|
* Fix resource leak in fru_area_print_board() - CDI#1149048
|
||||||
|
* Fix resource leak in fru_area_print_chassis() - CID#1149047
|
||||||
|
* Fix resource leak in fru_area_print_product() - CID#1149046
|
||||||
|
* Fix resource leak in ipmi_kontron_set_serial_number() - CID#1149041
|
||||||
|
* Fix typo vlan->VLAN in ipmi_lan_set_vlan_id() and
|
||||||
|
ipmi_lan_set_vlan_priority()
|
||||||
|
* Fix uninitialized struct in ipmi_fru_upg_ekeying() - CID#1149065
|
||||||
|
* Fix user input validation in Channel and User sub-commands
|
||||||
|
* Fix wrong size argument in ipmi_sdr_list_cache_fromfile() - CID#1149056
|
||||||
|
* Fix/remove pointer cast in _ipmi_set_user_access()
|
||||||
|
* Hook functions in ipmi_user to _ipmi_set_user_password()
|
||||||
|
* Hook ipmi_get_channel_info() to _ipmi_get_*()
|
||||||
|
* Hook ipmi_get_channel_medium() to new _ipmi_get_*() functions
|
||||||
|
* Hook ipmi_lan_set_password() to _ipmi_set_user_password()
|
||||||
|
* Hook ipmi_print_user_list() and friends to _ipmi_* functions
|
||||||
|
* Hook ipmi_set_alert_enable() to _ipmi_*()
|
||||||
|
* Hook ipmi_set_user_access() to _ipmi_set_user_access()
|
||||||
|
* Hook ipmi_user_priv() to _ipmi_set_user_access()
|
||||||
|
* ID:307 - Intel I82751 super pass through mode fixup
|
||||||
|
* ID:355 - Fix compiler warnings for Dummy Interface
|
||||||
|
* ID:380 - raw commands override retry and timeout values
|
||||||
|
* ID:319 - Interface safe re-open
|
||||||
|
* ID:320 - Add VITA 46.11 support
|
||||||
|
* ID:333 - Set read timeout to 15s in OpenIPMI interface
|
||||||
|
* ID:336 - ipmitool does not fall back to IPv4 for IPMI v2 / RMCP+ sessions
|
||||||
|
* ID:343 - Print actual sensor thresholds in 'sensors' comand
|
||||||
|
* ID:343 - Remove AC_FUNC_MALLOC
|
||||||
|
* ID:344 - Fix HPM.2 long message support
|
||||||
|
* ID:345 - Do not do several close session retries when catching SIGINT
|
||||||
|
* ID:346 - lib/ipmi_sdradd.c ipmi_sdr_read_record has a file descriptor leak
|
||||||
|
* ID:347 - Incorrect reserved channel number
|
||||||
|
* ID:348 - Add support for the "System Firmware Version"
|
||||||
|
* ID:349 - user set password - add option to choose 16/20 byte password
|
||||||
|
* ID:354 - Replace obsolete u_int with uint32_t in dimm_spd.c
|
||||||
|
* ID:354 - Replace obsolete u_int[0-9]+_t with standardized types in Free
|
||||||
|
iface
|
||||||
|
* ID:354 - forcefully switch to C99 and more strict CFLAGS
|
||||||
|
* ID:354 - replace/drop caddr_t in IMB
|
||||||
|
* ID:354 - struct member h_addr has been replaced
|
||||||
|
* ID:354 - uint8_t >= 0 is always true, don't test it
|
||||||
|
* ID:355 - Fix Enumeration value not handled in ipmi_get_event_desc()
|
||||||
|
* ID:355 - Fix ``ISO C forbids omitting the middle term of a ?: expression''
|
||||||
|
* ID:355 - Fix ``obsolete use of designated initializer with ¿:¿'' warning
|
||||||
|
* ID:355 - Fix comparison of unsigned expression
|
||||||
|
* ID:355 - Fix compiler warnings
|
||||||
|
* ID:355 - Fix compiler warnings in dimm_spd.c
|
||||||
|
* ID:355 - Fix couple compiler warnings in ipmi_lanp.h
|
||||||
|
* ID:355 - Fix formatting warning in get_cmdline_ipaddr()
|
||||||
|
* ID:355 - Fix zero-length format string warning in
|
||||||
|
get_supermicro_evt_desc()
|
||||||
|
* ID:355 - Remove defined but unused variable in _set_command_enables()
|
||||||
|
* ID:355 - remove unused variables from ipmi_dcmi.c
|
||||||
|
* ID:357 - out-of-bound access in DDR4 code ID:356 - DIMM4 Die Count is
|
||||||
|
unreachable
|
||||||
|
* ID:357 - out-of-bound access in DDR4 code
|
||||||
|
* ID:358 - check data length in else branch of ipmi_spd_print()
|
||||||
|
* ID:361 - Add a OEM IANA information
|
||||||
|
* ID:363 - Node Manager feature patch.
|
||||||
|
* ID:363 - fix Coverity issues in NM implementation
|
||||||
|
* ID:364 - Fix for serial-basic interface bridging
|
||||||
|
* ID:365 - Fix for ipmitool crash when using serial-terminal interface
|
||||||
|
* ID:366 - Properly clean LAN and LAN+ interfaces on close
|
||||||
|
* ID:367 - Fix building of non-bridged LAN interface commands
|
||||||
|
* ID:368 - Fix handling of bridging-related parameters
|
||||||
|
* ID:369 - Fix lanplus interface bridging and response matching
|
||||||
|
* ID:370 - add anonymous union support in CFLAGS for older gcc
|
||||||
|
* ID:371 - add ericsson oem
|
||||||
|
* ID:373 - Fix compilation of IMB on Windows
|
||||||
|
* ID:374 - Check/set LED Duration correctly
|
||||||
|
* ID:376 - Add means to configure "Bad Password Threshold"
|
||||||
|
* ID:381 - Script to log installation status as SEL events
|
||||||
|
* ID:382 - Fix memcpy() params in HpmFwupgActionUploadFirmware()
|
||||||
|
* ID:383 - Fix compile-time error in src/plugins/lan/lan.c
|
||||||
|
* ID:384 - Fix compilation under cygwin64
|
||||||
|
* ID:388 - Fix Error message always printed if BMC does not support VITA
|
||||||
|
* ID:388 - Handle ccode 0xCC as well in VITA discovery
|
||||||
|
* ID:388 - Turn all messages into LOG_INFO in VITA discovery
|
||||||
|
* ID:389 - Add on of Advantech IANA number
|
||||||
|
* ID:390 - Support for new Communication Interface (USB Medium)
|
||||||
|
* ID:391 - changing data_len from 17 to 16 according to ipmi spec 22.29,
|
||||||
|
first byte is completion code
|
||||||
|
* ID:392 - _ipmi_get_user_name() work-around for some BMCs
|
||||||
|
* ID:393 - ipmitool man page addition for Node Manager support.
|
||||||
|
* ID:394 - close fp if isn't NULL and set it NULL afterwards in USB plugin
|
||||||
|
* ID:394 - plugins/usb: Fix probe for SCSI devices
|
||||||
|
* ID:395 - Fix fru string without resizing it
|
||||||
|
* ID:396 - Fixed invalid length check in picmg led cap command.
|
||||||
|
* ID:397 - Fixed picmg policy set command.
|
||||||
|
* ID:398 - Fixed channel setaccess command.
|
||||||
|
* ID:399 - Fixed channel getciphers command.
|
||||||
|
* ID:401 - Fixed 30 second delay when activating SOL on 'dumb' Intel MACs.
|
||||||
|
* ID:402 - Misguiding error print-out when using some 'lan' commands.
|
||||||
|
* Init user_access_t struct in ipmi_user_priv()
|
||||||
|
* Make user User Privilege Limit is within range
|
||||||
|
* Node Manager Feature, correct 1268194 missing break.
|
||||||
|
* Output pidfile only in verbose mode
|
||||||
|
* Print error message to STDERR in ipmi_channel.c
|
||||||
|
* Re-work 'channel getaccess' and 'channel setaccess'
|
||||||
|
* Re-work ccode eval in ipmi_get_channel_medium()
|
||||||
|
* Remove commented-out code in ipmi_picmg_clk_set() - CID#1261339
|
||||||
|
* Remove dead code - rsp can't be NULL at this point - CID#1149005
|
||||||
|
* Remove dead code in fru_area_print_board() - CID#1149001
|
||||||
|
* Remove dead code in fru_area_print_chassis() - CID#1149000
|
||||||
|
* Remove dead code in fru_area_print_product() - CID#1148999
|
||||||
|
* Remove dead(duplicate) code from ipmi_sol_main() - CID#1148996
|
||||||
|
* Remove get_channel_access_rsp and get_channel_info_rsp structs
|
||||||
|
* Remove ipmi_user_set_password()
|
||||||
|
* Remove length checks in get_supermicro_evt_desc()
|
||||||
|
* Remove redundant user-input conversion from ipmi_sel_delete()
|
||||||
|
* Remove trailing white-spaces in ipmi_user.c
|
||||||
|
* Remove trailing white-spaces in ipmi_user.c
|
||||||
|
* Remove trailing white-spaces in src/plugins/dummy/dummy.c
|
||||||
|
* Remove unused variable from ipmi_get_channel_cipher_suites()
|
||||||
|
* Replace deprecated bzero() with memset()
|
||||||
|
* Replace s6_addr16 with s6_addr since Mac OS X does not have it
|
||||||
|
* Rewrite ipmi_set_channel_access()
|
||||||
|
* Split ipmi_user_main() into smaller functions
|
||||||
|
* ipmi_print_user_summary() to utilize _ipmi_get_user_access()
|
||||||
|
* ipmitool delloem: ipmitool delloem extension always return success - fix
|
||||||
|
it
|
||||||
|
|
||||||
|
version 1.8.15 2014-11-24
|
||||||
|
* ID: 340 - ipmitool sol session improperly closes on packet retry
|
||||||
|
* ID: 277 - support for hostnames longer than 64 chars
|
||||||
|
* ID: 313 - ipmitool doesn't support hostname long than 64 symbols
|
||||||
|
* ID: 277 - Minor issue with ipmi_intf_session_set_hostname()
|
||||||
|
* ID: 247 - 'sensor thresh' help output is wrong
|
||||||
|
* ID: 324 - conflicting declaration write_fru_area()
|
||||||
|
* ID: 337 - Add support for 13G Dell PowerEdge
|
||||||
|
* ID: 325 - DDR4 DIMM Decoding Logic
|
||||||
|
* ID: 328 - HPM.2 fixes
|
||||||
|
* ID: 329 - hpm.1 upgrade fixes
|
||||||
|
* ID: 103 - picmg discover messages should be DEBUG, not INFO
|
||||||
|
* ID: 331 - Passwords provided in file (-f option) truncated on space
|
||||||
|
* ID: 318 - ipmi_tsol.c: fix buffer overflow
|
||||||
|
* ID: 306 - "fru print" command prints the FRU #0 twice
|
||||||
|
* ID: 305 - HPM.1 deferred activation support fixup
|
||||||
|
* ID: 317 - ipmi_fwum.c: fix typo
|
||||||
|
* ID: 315 - buildsystem: configure.in is deprecated
|
||||||
|
* ID: 316 - Directory debian is outdated
|
||||||
|
* ID: 103 - 'lib/ipmi_ekanalyzer.c' needs a re-work
|
||||||
|
* ID: 46 - SEL OEM record corner case
|
||||||
|
|
||||||
|
version 1.8.14 2014-05-05
|
||||||
|
* ID: 299 - openipmi plugin writes zero to wrong byte
|
||||||
|
* ID: 301 - Add OS/Hypervisor installation status events
|
||||||
|
* ID: 298 - fix LANplus retry
|
||||||
|
* ID: 295 - inform user if SOL session disconnected
|
||||||
|
* ID: 297 - don't print-out SEL entry if ID not present
|
||||||
|
* ID: 296 - Fix PSD size decoding
|
||||||
|
* ID: 293 - Use of uninitialized variable in ipmi_main()
|
||||||
|
* ID: 278 - Error in sol looptest
|
||||||
|
* ID: 290 - ipmi_sol.c needs a clean-up
|
||||||
|
* ID: 85 - Supermicro memory ECC error display
|
||||||
|
* ID: 290 - ipmi_sol.c needs a clean-up
|
||||||
|
* ID: 286 - Open session retries hit assert in ipmi_lanplus_send_payload
|
||||||
|
* ID: 285 - Fix SEGV in ipmi_lanplus_open_session
|
||||||
|
* ID: 284 - Fix SEGV in ipmi_main
|
||||||
|
* ID: 283 - ipmi_intf_socket_connect fails with IPv4 hosts
|
||||||
|
* ID: 46 - ipmi_fwum needs some re-work
|
||||||
|
* ID: 50 - ipmi_hpmfwupg needs a clean up
|
||||||
|
* ID: 279 - ipmitool sdr list broken
|
||||||
|
* ID: 44 - dummy interface support - fake-ipmistack project
|
||||||
|
* ID: 48 - Remove hard-coded FRU inventory access length restriction
|
||||||
|
* ID: 276 - HPM.1 upgrade combined patch
|
||||||
|
* ID: 90 - Add options to chassis bootparam set bootflag
|
||||||
|
* ID: 292 -Properly handle plugin non-zero target adddress with -t
|
||||||
|
* Numerous Fixes based on running Coverity
|
||||||
|
* Use TIOCFLUSH if TCFLSH is missing to get the serial plugin building on
|
||||||
|
Hurd.
|
||||||
|
* Disable imb and open plugins by default on Hurd. The platform lack
|
||||||
|
the required kernel support.
|
||||||
|
* Change serial plugin to only try to disable the IUCLC serial line flag on
|
||||||
|
platforms supporting it. Fixes build problem on Hurd and FreeBSD.
|
||||||
|
* PA: 83 - Revised IPv6 patch
|
||||||
|
* FR: 24 - Exchange OS Name Hostname BMC URL during startup
|
||||||
|
* ID: 304 - Incorect byteswap in SOL maximum payload
|
||||||
|
* ID: 303 - Fix build error in HPM.2 code
|
||||||
|
* ID: 300 - new sunoem functionality
|
||||||
|
* ID: 144 - Fix 'dcmi power set_limit action <value>'
|
||||||
|
* ID: 302 - HPM.2 long message support
|
||||||
|
* ID: 309 - Add new SEL entries for ipmi 2.0 rev 1.1
|
||||||
|
* ID: 280 - man page cleanup
|
||||||
|
* ID: 311 - man page update for new sunoem commands
|
||||||
|
|
||||||
version 1.8.13 2013-09-09
|
version 1.8.13 2013-09-09
|
||||||
* ID: 3611905 - Direct Serial Basic/Terminal Mode Interface drivers
|
* ID: 3611905 - Direct Serial Basic/Terminal Mode Interface drivers
|
||||||
* ID: 3577766 - configure's knobs and switches don't work
|
* ID: 3577766 - configure's knobs and switches don't work
|
370
INSTALL
Normal file
370
INSTALL
Normal file
@ -0,0 +1,370 @@
|
|||||||
|
Installation Instructions
|
||||||
|
*************************
|
||||||
|
|
||||||
|
Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
|
||||||
|
Inc.
|
||||||
|
|
||||||
|
Copying and distribution of this file, with or without modification,
|
||||||
|
are permitted in any medium without royalty provided the copyright
|
||||||
|
notice and this notice are preserved. This file is offered as-is,
|
||||||
|
without warranty of any kind.
|
||||||
|
|
||||||
|
Basic Installation
|
||||||
|
==================
|
||||||
|
|
||||||
|
Briefly, the shell command `./configure && make && make install'
|
||||||
|
should configure, build, and install this package. The following
|
||||||
|
more-detailed instructions are generic; see the `README' file for
|
||||||
|
instructions specific to this package. Some packages provide this
|
||||||
|
`INSTALL' file but do not implement all of the features documented
|
||||||
|
below. The lack of an optional feature in a given package is not
|
||||||
|
necessarily a bug. More recommendations for GNU packages can be found
|
||||||
|
in *note Makefile Conventions: (standards)Makefile Conventions.
|
||||||
|
|
||||||
|
The `configure' shell script attempts to guess correct values for
|
||||||
|
various system-dependent variables used during compilation. It uses
|
||||||
|
those values to create a `Makefile' in each directory of the package.
|
||||||
|
It may also create one or more `.h' files containing system-dependent
|
||||||
|
definitions. Finally, it creates a shell script `config.status' that
|
||||||
|
you can run in the future to recreate the current configuration, and a
|
||||||
|
file `config.log' containing compiler output (useful mainly for
|
||||||
|
debugging `configure').
|
||||||
|
|
||||||
|
It can also use an optional file (typically called `config.cache'
|
||||||
|
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||||
|
the results of its tests to speed up reconfiguring. Caching is
|
||||||
|
disabled by default to prevent problems with accidental use of stale
|
||||||
|
cache files.
|
||||||
|
|
||||||
|
If you need to do unusual things to compile the package, please try
|
||||||
|
to figure out how `configure' could check whether to do them, and mail
|
||||||
|
diffs or instructions to the address given in the `README' so they can
|
||||||
|
be considered for the next release. If you are using the cache, and at
|
||||||
|
some point `config.cache' contains results you don't want to keep, you
|
||||||
|
may remove or edit it.
|
||||||
|
|
||||||
|
The file `configure.ac' (or `configure.in') is used to create
|
||||||
|
`configure' by a program called `autoconf'. You need `configure.ac' if
|
||||||
|
you want to change it or regenerate `configure' using a newer version
|
||||||
|
of `autoconf'.
|
||||||
|
|
||||||
|
The simplest way to compile this package is:
|
||||||
|
|
||||||
|
1. `cd' to the directory containing the package's source code and type
|
||||||
|
`./configure' to configure the package for your system.
|
||||||
|
|
||||||
|
Running `configure' might take a while. While running, it prints
|
||||||
|
some messages telling which features it is checking for.
|
||||||
|
|
||||||
|
2. Type `make' to compile the package.
|
||||||
|
|
||||||
|
3. Optionally, type `make check' to run any self-tests that come with
|
||||||
|
the package, generally using the just-built uninstalled binaries.
|
||||||
|
|
||||||
|
4. Type `make install' to install the programs and any data files and
|
||||||
|
documentation. When installing into a prefix owned by root, it is
|
||||||
|
recommended that the package be configured and built as a regular
|
||||||
|
user, and only the `make install' phase executed with root
|
||||||
|
privileges.
|
||||||
|
|
||||||
|
5. Optionally, type `make installcheck' to repeat any self-tests, but
|
||||||
|
this time using the binaries in their final installed location.
|
||||||
|
This target does not install anything. Running this target as a
|
||||||
|
regular user, particularly if the prior `make install' required
|
||||||
|
root privileges, verifies that the installation completed
|
||||||
|
correctly.
|
||||||
|
|
||||||
|
6. You can remove the program binaries and object files from the
|
||||||
|
source code directory by typing `make clean'. To also remove the
|
||||||
|
files that `configure' created (so you can compile the package for
|
||||||
|
a different kind of computer), type `make distclean'. There is
|
||||||
|
also a `make maintainer-clean' target, but that is intended mainly
|
||||||
|
for the package's developers. If you use it, you may have to get
|
||||||
|
all sorts of other programs in order to regenerate files that came
|
||||||
|
with the distribution.
|
||||||
|
|
||||||
|
7. Often, you can also type `make uninstall' to remove the installed
|
||||||
|
files again. In practice, not all packages have tested that
|
||||||
|
uninstallation works correctly, even though it is required by the
|
||||||
|
GNU Coding Standards.
|
||||||
|
|
||||||
|
8. Some packages, particularly those that use Automake, provide `make
|
||||||
|
distcheck', which can by used by developers to test that all other
|
||||||
|
targets like `make install' and `make uninstall' work correctly.
|
||||||
|
This target is generally not run by end users.
|
||||||
|
|
||||||
|
Compilers and Options
|
||||||
|
=====================
|
||||||
|
|
||||||
|
Some systems require unusual options for compilation or linking that
|
||||||
|
the `configure' script does not know about. Run `./configure --help'
|
||||||
|
for details on some of the pertinent environment variables.
|
||||||
|
|
||||||
|
You can give `configure' initial values for configuration parameters
|
||||||
|
by setting variables in the command line or in the environment. Here
|
||||||
|
is an example:
|
||||||
|
|
||||||
|
./configure CC=c99 CFLAGS=-g LIBS=-lposix
|
||||||
|
|
||||||
|
*Note Defining Variables::, for more details.
|
||||||
|
|
||||||
|
Compiling For Multiple Architectures
|
||||||
|
====================================
|
||||||
|
|
||||||
|
You can compile the package for more than one kind of computer at the
|
||||||
|
same time, by placing the object files for each architecture in their
|
||||||
|
own directory. To do this, you can use GNU `make'. `cd' to the
|
||||||
|
directory where you want the object files and executables to go and run
|
||||||
|
the `configure' script. `configure' automatically checks for the
|
||||||
|
source code in the directory that `configure' is in and in `..'. This
|
||||||
|
is known as a "VPATH" build.
|
||||||
|
|
||||||
|
With a non-GNU `make', it is safer to compile the package for one
|
||||||
|
architecture at a time in the source code directory. After you have
|
||||||
|
installed the package for one architecture, use `make distclean' before
|
||||||
|
reconfiguring for another architecture.
|
||||||
|
|
||||||
|
On MacOS X 10.5 and later systems, you can create libraries and
|
||||||
|
executables that work on multiple system types--known as "fat" or
|
||||||
|
"universal" binaries--by specifying multiple `-arch' options to the
|
||||||
|
compiler but only a single `-arch' option to the preprocessor. Like
|
||||||
|
this:
|
||||||
|
|
||||||
|
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
||||||
|
CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
||||||
|
CPP="gcc -E" CXXCPP="g++ -E"
|
||||||
|
|
||||||
|
This is not guaranteed to produce working output in all cases, you
|
||||||
|
may have to build one architecture at a time and combine the results
|
||||||
|
using the `lipo' tool if you have problems.
|
||||||
|
|
||||||
|
Installation Names
|
||||||
|
==================
|
||||||
|
|
||||||
|
By default, `make install' installs the package's commands under
|
||||||
|
`/usr/local/bin', include files under `/usr/local/include', etc. You
|
||||||
|
can specify an installation prefix other than `/usr/local' by giving
|
||||||
|
`configure' the option `--prefix=PREFIX', where PREFIX must be an
|
||||||
|
absolute file name.
|
||||||
|
|
||||||
|
You can specify separate installation prefixes for
|
||||||
|
architecture-specific files and architecture-independent files. If you
|
||||||
|
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
|
||||||
|
PREFIX as the prefix for installing programs and libraries.
|
||||||
|
Documentation and other data files still use the regular prefix.
|
||||||
|
|
||||||
|
In addition, if you use an unusual directory layout you can give
|
||||||
|
options like `--bindir=DIR' to specify different values for particular
|
||||||
|
kinds of files. Run `configure --help' for a list of the directories
|
||||||
|
you can set and what kinds of files go in them. In general, the
|
||||||
|
default for these options is expressed in terms of `${prefix}', so that
|
||||||
|
specifying just `--prefix' will affect all of the other directory
|
||||||
|
specifications that were not explicitly provided.
|
||||||
|
|
||||||
|
The most portable way to affect installation locations is to pass the
|
||||||
|
correct locations to `configure'; however, many packages provide one or
|
||||||
|
both of the following shortcuts of passing variable assignments to the
|
||||||
|
`make install' command line to change installation locations without
|
||||||
|
having to reconfigure or recompile.
|
||||||
|
|
||||||
|
The first method involves providing an override variable for each
|
||||||
|
affected directory. For example, `make install
|
||||||
|
prefix=/alternate/directory' will choose an alternate location for all
|
||||||
|
directory configuration variables that were expressed in terms of
|
||||||
|
`${prefix}'. Any directories that were specified during `configure',
|
||||||
|
but not in terms of `${prefix}', must each be overridden at install
|
||||||
|
time for the entire installation to be relocated. The approach of
|
||||||
|
makefile variable overrides for each directory variable is required by
|
||||||
|
the GNU Coding Standards, and ideally causes no recompilation.
|
||||||
|
However, some platforms have known limitations with the semantics of
|
||||||
|
shared libraries that end up requiring recompilation when using this
|
||||||
|
method, particularly noticeable in packages that use GNU Libtool.
|
||||||
|
|
||||||
|
The second method involves providing the `DESTDIR' variable. For
|
||||||
|
example, `make install DESTDIR=/alternate/directory' will prepend
|
||||||
|
`/alternate/directory' before all installation names. The approach of
|
||||||
|
`DESTDIR' overrides is not required by the GNU Coding Standards, and
|
||||||
|
does not work on platforms that have drive letters. On the other hand,
|
||||||
|
it does better at avoiding recompilation issues, and works well even
|
||||||
|
when some directory options were not specified in terms of `${prefix}'
|
||||||
|
at `configure' time.
|
||||||
|
|
||||||
|
Optional Features
|
||||||
|
=================
|
||||||
|
|
||||||
|
If the package supports it, you can cause programs to be installed
|
||||||
|
with an extra prefix or suffix on their names by giving `configure' the
|
||||||
|
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||||
|
|
||||||
|
Some packages pay attention to `--enable-FEATURE' options to
|
||||||
|
`configure', where FEATURE indicates an optional part of the package.
|
||||||
|
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||||
|
is something like `gnu-as' or `x' (for the X Window System). The
|
||||||
|
`README' should mention any `--enable-' and `--with-' options that the
|
||||||
|
package recognizes.
|
||||||
|
|
||||||
|
For packages that use the X Window System, `configure' can usually
|
||||||
|
find the X include and library files automatically, but if it doesn't,
|
||||||
|
you can use the `configure' options `--x-includes=DIR' and
|
||||||
|
`--x-libraries=DIR' to specify their locations.
|
||||||
|
|
||||||
|
Some packages offer the ability to configure how verbose the
|
||||||
|
execution of `make' will be. For these packages, running `./configure
|
||||||
|
--enable-silent-rules' sets the default to minimal output, which can be
|
||||||
|
overridden with `make V=1'; while running `./configure
|
||||||
|
--disable-silent-rules' sets the default to verbose, which can be
|
||||||
|
overridden with `make V=0'.
|
||||||
|
|
||||||
|
Particular systems
|
||||||
|
==================
|
||||||
|
|
||||||
|
On HP-UX, the default C compiler is not ANSI C compatible. If GNU
|
||||||
|
CC is not installed, it is recommended to use the following options in
|
||||||
|
order to use an ANSI C compiler:
|
||||||
|
|
||||||
|
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
|
||||||
|
|
||||||
|
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
|
||||||
|
|
||||||
|
HP-UX `make' updates targets which have the same time stamps as
|
||||||
|
their prerequisites, which makes it generally unusable when shipped
|
||||||
|
generated files such as `configure' are involved. Use GNU `make'
|
||||||
|
instead.
|
||||||
|
|
||||||
|
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
|
||||||
|
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
|
||||||
|
a workaround. If GNU CC is not installed, it is therefore recommended
|
||||||
|
to try
|
||||||
|
|
||||||
|
./configure CC="cc"
|
||||||
|
|
||||||
|
and if that doesn't work, try
|
||||||
|
|
||||||
|
./configure CC="cc -nodtk"
|
||||||
|
|
||||||
|
On Solaris, don't put `/usr/ucb' early in your `PATH'. This
|
||||||
|
directory contains several dysfunctional programs; working variants of
|
||||||
|
these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
|
||||||
|
in your `PATH', put it _after_ `/usr/bin'.
|
||||||
|
|
||||||
|
On Haiku, software installed for all users goes in `/boot/common',
|
||||||
|
not `/usr/local'. It is recommended to use the following options:
|
||||||
|
|
||||||
|
./configure --prefix=/boot/common
|
||||||
|
|
||||||
|
Specifying the System Type
|
||||||
|
==========================
|
||||||
|
|
||||||
|
There may be some features `configure' cannot figure out
|
||||||
|
automatically, but needs to determine by the type of machine the package
|
||||||
|
will run on. Usually, assuming the package is built to be run on the
|
||||||
|
_same_ architectures, `configure' can figure that out, but if it prints
|
||||||
|
a message saying it cannot guess the machine type, give it the
|
||||||
|
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||||
|
type, such as `sun4', or a canonical name which has the form:
|
||||||
|
|
||||||
|
CPU-COMPANY-SYSTEM
|
||||||
|
|
||||||
|
where SYSTEM can have one of these forms:
|
||||||
|
|
||||||
|
OS
|
||||||
|
KERNEL-OS
|
||||||
|
|
||||||
|
See the file `config.sub' for the possible values of each field. If
|
||||||
|
`config.sub' isn't included in this package, then this package doesn't
|
||||||
|
need to know the machine type.
|
||||||
|
|
||||||
|
If you are _building_ compiler tools for cross-compiling, you should
|
||||||
|
use the option `--target=TYPE' to select the type of system they will
|
||||||
|
produce code for.
|
||||||
|
|
||||||
|
If you want to _use_ a cross compiler, that generates code for a
|
||||||
|
platform different from the build platform, you should specify the
|
||||||
|
"host" platform (i.e., that on which the generated programs will
|
||||||
|
eventually be run) with `--host=TYPE'.
|
||||||
|
|
||||||
|
Sharing Defaults
|
||||||
|
================
|
||||||
|
|
||||||
|
If you want to set default values for `configure' scripts to share,
|
||||||
|
you can create a site shell script called `config.site' that gives
|
||||||
|
default values for variables like `CC', `cache_file', and `prefix'.
|
||||||
|
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||||
|
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||||
|
`CONFIG_SITE' environment variable to the location of the site script.
|
||||||
|
A warning: not all `configure' scripts look for a site script.
|
||||||
|
|
||||||
|
Defining Variables
|
||||||
|
==================
|
||||||
|
|
||||||
|
Variables not defined in a site shell script can be set in the
|
||||||
|
environment passed to `configure'. However, some packages may run
|
||||||
|
configure again during the build, and the customized values of these
|
||||||
|
variables may be lost. In order to avoid this problem, you should set
|
||||||
|
them in the `configure' command line, using `VAR=value'. For example:
|
||||||
|
|
||||||
|
./configure CC=/usr/local2/bin/gcc
|
||||||
|
|
||||||
|
causes the specified `gcc' to be used as the C compiler (unless it is
|
||||||
|
overridden in the site shell script).
|
||||||
|
|
||||||
|
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
|
||||||
|
an Autoconf limitation. Until the limitation is lifted, you can use
|
||||||
|
this workaround:
|
||||||
|
|
||||||
|
CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
|
||||||
|
|
||||||
|
`configure' Invocation
|
||||||
|
======================
|
||||||
|
|
||||||
|
`configure' recognizes the following options to control how it
|
||||||
|
operates.
|
||||||
|
|
||||||
|
`--help'
|
||||||
|
`-h'
|
||||||
|
Print a summary of all of the options to `configure', and exit.
|
||||||
|
|
||||||
|
`--help=short'
|
||||||
|
`--help=recursive'
|
||||||
|
Print a summary of the options unique to this package's
|
||||||
|
`configure', and exit. The `short' variant lists options used
|
||||||
|
only in the top level, while the `recursive' variant lists options
|
||||||
|
also present in any nested packages.
|
||||||
|
|
||||||
|
`--version'
|
||||||
|
`-V'
|
||||||
|
Print the version of Autoconf used to generate the `configure'
|
||||||
|
script, and exit.
|
||||||
|
|
||||||
|
`--cache-file=FILE'
|
||||||
|
Enable the cache: use and save the results of the tests in FILE,
|
||||||
|
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||||
|
disable caching.
|
||||||
|
|
||||||
|
`--config-cache'
|
||||||
|
`-C'
|
||||||
|
Alias for `--cache-file=config.cache'.
|
||||||
|
|
||||||
|
`--quiet'
|
||||||
|
`--silent'
|
||||||
|
`-q'
|
||||||
|
Do not print messages saying which checks are being made. To
|
||||||
|
suppress all normal output, redirect it to `/dev/null' (any error
|
||||||
|
messages will still be shown).
|
||||||
|
|
||||||
|
`--srcdir=DIR'
|
||||||
|
Look for the package's source code in directory DIR. Usually
|
||||||
|
`configure' can determine that directory automatically.
|
||||||
|
|
||||||
|
`--prefix=DIR'
|
||||||
|
Use DIR as the installation prefix. *note Installation Names::
|
||||||
|
for more details, including other options available for fine-tuning
|
||||||
|
the installation locations.
|
||||||
|
|
||||||
|
`--no-create'
|
||||||
|
`-n'
|
||||||
|
Run the configure checks, but stop before creating any output
|
||||||
|
files.
|
||||||
|
|
||||||
|
`configure' also accepts some other, not widely useful, options. Run
|
||||||
|
`configure --help' for more details.
|
@ -31,9 +31,7 @@
|
|||||||
DOCDIR = $(datadir)/doc/$(PACKAGE)
|
DOCDIR = $(datadir)/doc/$(PACKAGE)
|
||||||
DOCLIST = $(top_srcdir)/README $(top_srcdir)/COPYING $(top_srcdir)/AUTHORS $(top_srcdir)/ChangeLog
|
DOCLIST = $(top_srcdir)/README $(top_srcdir)/COPYING $(top_srcdir)/AUTHORS $(top_srcdir)/ChangeLog
|
||||||
|
|
||||||
EXTRA_DIST = $(DOCLIST) \
|
EXTRA_DIST = $(DOCLIST) bootstrap
|
||||||
debian/changelog debian/control debian/copyright \
|
|
||||||
debian/dirs debian/docs debian/rules
|
|
||||||
|
|
||||||
AUTOMAKE_OPTIONS = dist-bzip2
|
AUTOMAKE_OPTIONS = dist-bzip2
|
||||||
|
|
@ -24,7 +24,7 @@ Background
|
|||||||
==========
|
==========
|
||||||
I originally wrote ipmitool while between projects and employeed at Sun
|
I originally wrote ipmitool while between projects and employeed at Sun
|
||||||
Microsystems. Sun had just embarked on a new line of general-purpose x86
|
Microsystems. Sun had just embarked on a new line of general-purpose x86
|
||||||
servers that inclued an OEM Intel board with an IPMIv1.5 BMC on board.
|
servers that included an OEM Intel board with an IPMIv1.5 BMC on board.
|
||||||
It started with an idea that remote chassis power control would be a handy
|
It started with an idea that remote chassis power control would be a handy
|
||||||
feature for my systems in the lab and from there it grew into a multi-
|
feature for my systems in the lab and from there it grew into a multi-
|
||||||
purpose tool that lots of people found useful. I decided to release it
|
purpose tool that lots of people found useful. I decided to release it
|
||||||
@ -410,3 +410,5 @@ http://www.intel.com/design/servers/ipmi/spec.htm
|
|||||||
OpenIPMI project: Linux IPMI kernel driver and userland library
|
OpenIPMI project: Linux IPMI kernel driver and userland library
|
||||||
http://openipmi.sourceforge.net
|
http://openipmi.sourceforge.net
|
||||||
|
|
||||||
|
IPMItool commit archive
|
||||||
|
https://lists.sourceforge.net/lists/listinfo/ipmitool-cvs
|
@ -1,11 +1,11 @@
|
|||||||
dnl
|
dnl
|
||||||
dnl autoconf for ipmitool
|
dnl autoconf for ipmitool
|
||||||
dnl
|
dnl
|
||||||
AC_INIT([src/ipmitool.c])
|
AC_INIT([ipmitool], [1.8.17-cvs])
|
||||||
AC_CANONICAL_SYSTEM
|
|
||||||
AM_INIT_AUTOMAKE([ipmitool], [1.8.13-cvs])
|
|
||||||
AM_CONFIG_HEADER(config.h)
|
|
||||||
AC_CONFIG_SRCDIR([src/ipmitool.c])
|
AC_CONFIG_SRCDIR([src/ipmitool.c])
|
||||||
|
AC_CANONICAL_SYSTEM
|
||||||
|
AM_INIT_AUTOMAKE
|
||||||
|
AM_CONFIG_HEADER(config.h)
|
||||||
AC_PREREQ(2.50)
|
AC_PREREQ(2.50)
|
||||||
AC_SUBST(ac_configure_args)
|
AC_SUBST(ac_configure_args)
|
||||||
|
|
||||||
@ -26,19 +26,20 @@ AC_C_CONST
|
|||||||
AC_C_INLINE
|
AC_C_INLINE
|
||||||
AC_C_BIGENDIAN
|
AC_C_BIGENDIAN
|
||||||
|
|
||||||
AC_FUNC_MALLOC
|
|
||||||
AC_FUNC_SELECT_ARGTYPES
|
AC_FUNC_SELECT_ARGTYPES
|
||||||
AC_FUNC_STRTOD
|
AC_FUNC_STRTOD
|
||||||
AC_CHECK_FUNCS([alarm gethostbyname socket select])
|
AC_CHECK_FUNCS([alarm gethostbyname getaddrinfo getifaddrs socket select])
|
||||||
AC_CHECK_FUNCS([memmove memset strchr strdup strerror])
|
AC_CHECK_FUNCS([memmove memset strchr strdup strerror])
|
||||||
AC_CHECK_FUNCS([getpassphrase])
|
AC_CHECK_FUNCS([getpassphrase])
|
||||||
|
|
||||||
CFLAGS="$CFLAGS -fno-strict-aliasing -Wreturn-type"
|
CFLAGS="$CFLAGS -Wall -Wextra -std=gnu99 -pedantic -Wformat -Wformat-nonliteral"
|
||||||
|
|
||||||
AM_PROG_LIBTOOL
|
AM_PROG_LIBTOOL
|
||||||
LIBTOOL="$LIBTOOL --silent"
|
LIBTOOL="$LIBTOOL --silent"
|
||||||
|
|
||||||
AC_SEARCH_LIBS([gethostbyname], [nsl])
|
AC_SEARCH_LIBS([gethostbyname], [nsl])
|
||||||
|
AC_SEARCH_LIBS([getaddrinfo], [nsl])
|
||||||
|
AC_SEARCH_LIBS([getifaddrs], [nsl])
|
||||||
AC_SEARCH_LIBS([socket], [socket], [],
|
AC_SEARCH_LIBS([socket], [socket], [],
|
||||||
[AC_CHECK_LIB([nsl], [socket],
|
[AC_CHECK_LIB([nsl], [socket],
|
||||||
[LIBS="$LIBS -lsocket -lnsl"], [], [-lsocket])])
|
[LIBS="$LIBS -lsocket -lnsl"], [], [-lsocket])])
|
||||||
@ -58,8 +59,10 @@ dnl
|
|||||||
xenable_intf_bmc=no
|
xenable_intf_bmc=no
|
||||||
xenable_intf_imb=yes
|
xenable_intf_imb=yes
|
||||||
xenable_intf_open=yes
|
xenable_intf_open=yes
|
||||||
|
xenable_intf_usb=yes
|
||||||
xenable_intf_lipmi=yes
|
xenable_intf_lipmi=yes
|
||||||
#xenable_intf_serial=yes
|
#xenable_intf_serial=yes
|
||||||
|
xenable_intf_dummy=no
|
||||||
xenable_all_options=yes
|
xenable_all_options=yes
|
||||||
xenable_ipmishell=yes
|
xenable_ipmishell=yes
|
||||||
|
|
||||||
@ -86,6 +89,7 @@ solaris*)
|
|||||||
xenable_intf_open=no
|
xenable_intf_open=no
|
||||||
xenable_intf_lipmi=no
|
xenable_intf_lipmi=no
|
||||||
xenable_intf_bmc=no
|
xenable_intf_bmc=no
|
||||||
|
xenable_intf_usb=no
|
||||||
;;
|
;;
|
||||||
*darwin*|aix*)
|
*darwin*|aix*)
|
||||||
# disable the linux and solaris-specific interfaces
|
# disable the linux and solaris-specific interfaces
|
||||||
@ -94,6 +98,7 @@ solaris*)
|
|||||||
xenable_intf_lipmi=no
|
xenable_intf_lipmi=no
|
||||||
xenable_intf_bmc=no
|
xenable_intf_bmc=no
|
||||||
xenable_ipmishell=no
|
xenable_ipmishell=no
|
||||||
|
xenable_intf_usb=no
|
||||||
;;
|
;;
|
||||||
*freebsd*)
|
*freebsd*)
|
||||||
xenable_intf_imb=no
|
xenable_intf_imb=no
|
||||||
@ -106,6 +111,11 @@ solaris*)
|
|||||||
xenable_intf_bmc=no
|
xenable_intf_bmc=no
|
||||||
xenable_intf_open=no
|
xenable_intf_open=no
|
||||||
;;
|
;;
|
||||||
|
gnu*)
|
||||||
|
# disable the linux and solaris-specific interfaces on Hurd
|
||||||
|
xenable_intf_imb=no
|
||||||
|
xenable_intf_open=no
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
AC_SUBST(ARCH, $host_cpu)
|
AC_SUBST(ARCH, $host_cpu)
|
||||||
@ -123,6 +133,24 @@ if test "x$xenable_all_options" = "xyes" || test "x$xenable_solaris_opt" = "xyes
|
|||||||
AC_DEFINE(ENABLE_ALL_OPTIONS, [1], [Define to 1 to enable all command line options.])
|
AC_DEFINE(ENABLE_ALL_OPTIONS, [1], [Define to 1 to enable all command line options.])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
dnl Determine anonymous union/structure support in GCC
|
||||||
|
AC_TRY_COMPILE([
|
||||||
|
#include <stdio.h>
|
||||||
|
], [
|
||||||
|
struct test {
|
||||||
|
union {
|
||||||
|
int a;
|
||||||
|
unsigned int b;
|
||||||
|
};
|
||||||
|
} test;
|
||||||
|
|
||||||
|
printf("a is %d", test.a);
|
||||||
|
], ac_need_fms_extension=no, ac_need_fms_extension=yes)
|
||||||
|
if test "x$ac_need_fms_extension" = "xyes"; then
|
||||||
|
CFLAGS="$CFLAGS -fms-extensions"
|
||||||
|
AC_SUBST(CFLAGS)
|
||||||
|
fi
|
||||||
|
|
||||||
dnl check for OpenSSL functionality
|
dnl check for OpenSSL functionality
|
||||||
AC_ARG_ENABLE([internal-md5],
|
AC_ARG_ENABLE([internal-md5],
|
||||||
[AC_HELP_STRING([--enable-internal-md5],
|
[AC_HELP_STRING([--enable-internal-md5],
|
||||||
@ -172,6 +200,22 @@ if test "x$xenable_intf_lan" = "xyes"; then
|
|||||||
IPMITOOL_INTF_LIB="$IPMITOOL_INTF_LIB lan/libintf_lan.la"
|
IPMITOOL_INTF_LIB="$IPMITOOL_INTF_LIB lan/libintf_lan.la"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
dnl enable IPMI USB interface
|
||||||
|
AC_ARG_ENABLE([intf-usb],
|
||||||
|
[AC_HELP_STRING([--enable-intf-usb],
|
||||||
|
[enable IPMI USB interface [default=auto]])],
|
||||||
|
[xenable_intf_usb=$enableval],
|
||||||
|
[xenable_intf_usb=$xenable_intf_usb])
|
||||||
|
if test "x$xenable_intf_usb" = "xstatic" || test "x$xenable_intf_usb" = "xplugin"; then
|
||||||
|
xenable_intf_usb=yes
|
||||||
|
fi
|
||||||
|
if test "x$xenable_intf_usb" = "xyes"; then
|
||||||
|
AC_DEFINE(IPMI_INTF_USB, [1], [Define to 1 to enable USB interface.])
|
||||||
|
AC_SUBST(INTF_USB, [usb])
|
||||||
|
AC_SUBST(INTF_USB_LIB, [libintf_usb.la])
|
||||||
|
IPMITOOL_INTF_LIB="$IPMITOOL_INTF_LIB usb/libintf_usb.la"
|
||||||
|
fi
|
||||||
|
|
||||||
dnl enable IPMIv2.0 RMCP+ LAN interface
|
dnl enable IPMIv2.0 RMCP+ LAN interface
|
||||||
AC_ARG_ENABLE([intf-lanplus],
|
AC_ARG_ENABLE([intf-lanplus],
|
||||||
[AC_HELP_STRING([--enable-intf-lanplus],
|
[AC_HELP_STRING([--enable-intf-lanplus],
|
||||||
@ -503,6 +547,18 @@ if test "x$xenable_intf_bmc" = "xyes"; then
|
|||||||
IPMITOOL_INTF_LIB="$IPMITOOL_INTF_LIB bmc/libintf_bmc.la"
|
IPMITOOL_INTF_LIB="$IPMITOOL_INTF_LIB bmc/libintf_bmc.la"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
dnl enable Dummy interface for testing
|
||||||
|
AC_ARG_ENABLE([intf-dummy],
|
||||||
|
[AC_HELP_STRING([--enable-intf-dummy],
|
||||||
|
[enable Dummy(test) interface [default=no]])],
|
||||||
|
[xenable_intf_dummy=$enableval], [xenable_intf_dummy=no])
|
||||||
|
if test "x$xenable_intf_dummy" = "xyes"; then
|
||||||
|
AC_DEFINE(IPMI_INTF_DUMMY, [1], [Define to 1 to enable Dummy interface.])
|
||||||
|
AC_SUBST(INTF_DUMMY, [dummy])
|
||||||
|
AC_SUBST(INTF_DUMMY_LIB, [libintf_dummy.la])
|
||||||
|
IPMITOOL_INTF_LIB="$IPMITOOL_INTF_LIB dummy/libintf_dummy.la"
|
||||||
|
fi
|
||||||
|
|
||||||
AC_SUBST(IPMITOOL_INTF_LIB)
|
AC_SUBST(IPMITOOL_INTF_LIB)
|
||||||
|
|
||||||
if test "x$xenable_ipmishell" = "xyes"; then
|
if test "x$xenable_ipmishell" = "xyes"; then
|
||||||
@ -601,8 +657,10 @@ AC_CONFIG_FILES([Makefile
|
|||||||
src/plugins/free/Makefile
|
src/plugins/free/Makefile
|
||||||
src/plugins/imb/Makefile
|
src/plugins/imb/Makefile
|
||||||
src/plugins/bmc/Makefile
|
src/plugins/bmc/Makefile
|
||||||
|
src/plugins/usb/Makefile
|
||||||
src/plugins/lipmi/Makefile
|
src/plugins/lipmi/Makefile
|
||||||
src/plugins/serial/Makefile])
|
src/plugins/serial/Makefile
|
||||||
|
src/plugins/dummy/Makefile])
|
||||||
|
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|
||||||
@ -616,8 +674,10 @@ AC_MSG_RESULT([ open : $xenable_intf_open])
|
|||||||
AC_MSG_RESULT([ free : $xenable_intf_free])
|
AC_MSG_RESULT([ free : $xenable_intf_free])
|
||||||
AC_MSG_RESULT([ imb : $xenable_intf_imb])
|
AC_MSG_RESULT([ imb : $xenable_intf_imb])
|
||||||
AC_MSG_RESULT([ bmc : $xenable_intf_bmc])
|
AC_MSG_RESULT([ bmc : $xenable_intf_bmc])
|
||||||
|
AC_MSG_RESULT([ usb : $xenable_intf_usb])
|
||||||
AC_MSG_RESULT([ lipmi : $xenable_intf_lipmi])
|
AC_MSG_RESULT([ lipmi : $xenable_intf_lipmi])
|
||||||
AC_MSG_RESULT([ serial : $xenable_intf_serial])
|
AC_MSG_RESULT([ serial : $xenable_intf_serial])
|
||||||
|
AC_MSG_RESULT([ dummy : $xenable_intf_dummy])
|
||||||
AC_MSG_RESULT([])
|
AC_MSG_RESULT([])
|
||||||
AC_MSG_RESULT([Extra tools])
|
AC_MSG_RESULT([Extra tools])
|
||||||
AC_MSG_RESULT([ ipmievd : yes])
|
AC_MSG_RESULT([ ipmievd : yes])
|
@ -34,6 +34,8 @@ dist_pkgdata_DATA = oem_ibm_sel_map
|
|||||||
|
|
||||||
EXTRA_DIST = README \
|
EXTRA_DIST = README \
|
||||||
bmclanconf ipmi.init.basic ipmi.init.redhat \
|
bmclanconf ipmi.init.basic ipmi.init.redhat \
|
||||||
|
exchange-bmc-os-info.init.redhat exchange-bmc-os-info.service.redhat \
|
||||||
|
exchange-bmc-os-info.sysconf log_bmc.sh\
|
||||||
ipmievd.init.redhat ipmievd.init.suse ipmievd.init.debian \
|
ipmievd.init.redhat ipmievd.init.suse ipmievd.init.debian \
|
||||||
collect_data.sh create_rrds.sh create_webpage_compact.sh create_webpage.sh \
|
collect_data.sh create_rrds.sh create_webpage_compact.sh create_webpage.sh \
|
||||||
bmc-snmp-proxy bmc-snmp-proxy.service bmc-snmp-proxy.sysconf
|
bmc-snmp-proxy bmc-snmp-proxy.service bmc-snmp-proxy.sysconf
|
@ -174,7 +174,7 @@ bmc_alert_dest()
|
|||||||
# Pick the first active LAN channel
|
# Pick the first active LAN channel
|
||||||
for CHANNEL in `seq 1 14`
|
for CHANNEL in `seq 1 14`
|
||||||
do
|
do
|
||||||
[ $(${IPMI_TOOL} -I open channel info ${CHANNEL} 2>/dev/null \
|
[ $(${IPMITOOL} -I open channel info ${CHANNEL} 2>/dev/null \
|
||||||
| grep -q "802\.3") ] || break
|
| grep -q "802\.3") ] || break
|
||||||
done
|
done
|
||||||
|
|
326
contrib/exchange-bmc-os-info.init.redhat
Normal file
326
contrib/exchange-bmc-os-info.init.redhat
Normal file
@ -0,0 +1,326 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#############################################################################
|
||||||
|
#
|
||||||
|
# exchange-bmc-os-info: Set OS and BMC (Baseboard Management Controller)
|
||||||
|
# parameters during system startup.
|
||||||
|
#
|
||||||
|
# version: 0.72
|
||||||
|
#
|
||||||
|
# Authors: Charles Rose <charles_rose@dell.com>
|
||||||
|
# Jordan Hargrave <jordan_hargrave@dell.com>
|
||||||
|
#
|
||||||
|
# Description: Script to set OS information in the BMC; fetch BMC IP/URL
|
||||||
|
# and set in the OS for use by other scripts/user.
|
||||||
|
#
|
||||||
|
# BMC IP and URL are made available in /var/run/bmc-info
|
||||||
|
#
|
||||||
|
# Example to launch BMC web-interface:
|
||||||
|
# # . /var/run/bmc-info
|
||||||
|
# # xdg-open $BMC_URL
|
||||||
|
#
|
||||||
|
# See here for details:
|
||||||
|
# https://fedoraproject.org/wiki/Features/AgentFreeManagement
|
||||||
|
#
|
||||||
|
# OEM Specific: OEM specific ipmi commands go in:
|
||||||
|
# 'oem_set_os_version' and 'oem_get_bmc_url'
|
||||||
|
#############################################################################
|
||||||
|
#
|
||||||
|
# chkconfig: 345 99 00
|
||||||
|
# description: Set OS name, hostname in BMC; make BMC IP/URL available in OS
|
||||||
|
# processname: exchange-bmc-os-info
|
||||||
|
# config: /etc/sysconfig/exchange-bmc-os-info
|
||||||
|
#
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides: exchange-bmc-os-info
|
||||||
|
# Required-Start: ipmi
|
||||||
|
# Default-Start: 3 4 5
|
||||||
|
# Default-Stop: 0 1 2 6
|
||||||
|
|
||||||
|
|
||||||
|
#############################################################################
|
||||||
|
# GLOBALS
|
||||||
|
#############################################################################
|
||||||
|
CONFIGFILE=/etc/sysconfig/exchange-bmc-os-info
|
||||||
|
IPMI_TOOL=/usr/bin/ipmitool
|
||||||
|
BMC_INFO=/var/run/bmc-info
|
||||||
|
|
||||||
|
# BMC Manufacturer ID used in 'oem_set_os_version' and 'oem_get_bmc_url'
|
||||||
|
DELL="674"
|
||||||
|
#OTHER_OEM="123"
|
||||||
|
|
||||||
|
# Defaults for ${CONFIGFILE}
|
||||||
|
SET_OS_INFO="yes"
|
||||||
|
RESET_OS_INFO="no"
|
||||||
|
SET_BMC_INFO="yes"
|
||||||
|
|
||||||
|
# getsysinfo and setsysinfo commands
|
||||||
|
IPMI_SET_SYSINFO="${IPMI_TOOL} mc setsysinfo"
|
||||||
|
IPMI_GET_SYSINFO="${IPMI_TOOL} mc getsysinfo"
|
||||||
|
#############################################################################
|
||||||
|
SCRIPT_NAME=$(basename $0)
|
||||||
|
|
||||||
|
# source config
|
||||||
|
[ -r ${CONFIGFILE} ] && . ${CONFIGFILE}
|
||||||
|
|
||||||
|
RETVAL=0
|
||||||
|
|
||||||
|
if [ -f /bin/gettext.sh ]; then
|
||||||
|
GETTEXT=1
|
||||||
|
. /bin/gettext.sh
|
||||||
|
OUTPUT="eval_gettext"
|
||||||
|
else
|
||||||
|
GETTEXT=0
|
||||||
|
OUTPUT="echo"
|
||||||
|
fi
|
||||||
|
|
||||||
|
#############################################################################
|
||||||
|
# Get Vendor ID of BMC for use in 'oem_set_os_version' and 'oem_get_bmc_url'
|
||||||
|
#
|
||||||
|
get_bmc_vendor_id()
|
||||||
|
{
|
||||||
|
BMC_VENDOR=$(${IPMI_TOOL} mc info 2>/dev/null | \
|
||||||
|
sed -n "s#^Manufacturer ID.*: ##p")
|
||||||
|
[ -z "${BMC_VENDOR}" ] && RETVAL=4
|
||||||
|
}
|
||||||
|
|
||||||
|
check_ipmitool()
|
||||||
|
{
|
||||||
|
if [ -x ${IPMI_TOOL} ]; then
|
||||||
|
# v1.8.12 plus patches are required for set/getsysinfo support
|
||||||
|
# http://sourceforge.net/mailarchive/message.php?msg_id=29647222
|
||||||
|
[ ! ${IPMI_GET_SYSINFO} >/dev/null 2>&1 ] && \
|
||||||
|
RETVAL=3
|
||||||
|
else
|
||||||
|
RETVAL=2
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
bmc_exists()
|
||||||
|
{
|
||||||
|
check_ipmitool
|
||||||
|
[ $RETVAL -eq 0 ] && get_bmc_vendor_id
|
||||||
|
return $RETVAL
|
||||||
|
}
|
||||||
|
#############################################################################
|
||||||
|
|
||||||
|
get_os_info()
|
||||||
|
{
|
||||||
|
OS_HOSTNAME=$(hostname)
|
||||||
|
KERNEL_VERSION=$(uname -r -m)
|
||||||
|
|
||||||
|
if [ -e /etc/lsb-release ] ; then
|
||||||
|
. /etc/lsb-release
|
||||||
|
NAME=${DISTRIB_ID}
|
||||||
|
VERSION="${DISTRIB_RELEASE} ${DISTRIB_CODENAME}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# we prefer systemd's /etc/os-release over other sources
|
||||||
|
[ -e /etc/os-release ] && . /etc/os-release
|
||||||
|
|
||||||
|
OS_NAME=${NAME}
|
||||||
|
OS_VERSION="${VERSION} kernel ${KERNEL_VERSION}"
|
||||||
|
}
|
||||||
|
|
||||||
|
oem_set_os_version()
|
||||||
|
{
|
||||||
|
# OS Version setting is not standard yet
|
||||||
|
# we need per vendor oem commands
|
||||||
|
case "${BMC_VENDOR}" in
|
||||||
|
$DELL) ${IPMI_SET_SYSINFO} delloem_os_version \
|
||||||
|
"${OS_VERSION}" > /dev/null 2>&1
|
||||||
|
return $?
|
||||||
|
;;
|
||||||
|
# Add OEM specific commands.
|
||||||
|
# Example:
|
||||||
|
# $OTHER_OEM) ${IPMI_SET_SYSINFO} otheroem_os_version \
|
||||||
|
# "${OS_VERSION}" > /dev/null 2>&1
|
||||||
|
# return $?
|
||||||
|
# ;;
|
||||||
|
*) return 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
set_os_info()
|
||||||
|
{
|
||||||
|
# Set and reset OS info in the BMC
|
||||||
|
if [ "$1" = "reset" ]; then
|
||||||
|
OS_NAME=""
|
||||||
|
OS_HOSTNAME=""
|
||||||
|
OS_VERSION=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
${IPMI_SET_SYSINFO} os_name "${OS_NAME}" >/dev/null 2>&1 \
|
||||||
|
|| RETVAL=6
|
||||||
|
${IPMI_SET_SYSINFO} primary_os_name "${OS_NAME}" >/dev/null 2>&1 \
|
||||||
|
|| RETVAL=6
|
||||||
|
${IPMI_SET_SYSINFO} system_name "${OS_HOSTNAME}" >/dev/null 2>&1 \
|
||||||
|
|| RETVAL=6
|
||||||
|
oem_set_os_version || RETVAL=6
|
||||||
|
}
|
||||||
|
|
||||||
|
#############################################################################
|
||||||
|
valid_url()
|
||||||
|
{
|
||||||
|
url="(https?|http)://[a-z0-9-]+(\.[a-z0-9-]+)+([/?].*)?"
|
||||||
|
printf -- "%s" "${TMP_URL}"| grep -Eq "^${url}"
|
||||||
|
return $?
|
||||||
|
}
|
||||||
|
|
||||||
|
oem_get_bmc_url()
|
||||||
|
{
|
||||||
|
# BMC URL is not standard yet
|
||||||
|
# we need per vendor oem commands
|
||||||
|
case "$BMC_VENDOR" in
|
||||||
|
$DELL) TMP_URL=$(${IPMI_GET_SYSINFO} delloem_url 2> /dev/null)
|
||||||
|
;;
|
||||||
|
# Add OEM specific commands
|
||||||
|
# Example:
|
||||||
|
# $OTHER_OEM)
|
||||||
|
# TMP_URL=$(${IPMI_GET_SYSINFO} otheroem_url 2> /dev/null)
|
||||||
|
# ;;
|
||||||
|
*) TMP_URL="" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
valid_url && BMC_URL=${TMP_URL} || BMC_URL=""
|
||||||
|
}
|
||||||
|
|
||||||
|
valid_ip()
|
||||||
|
{
|
||||||
|
#Thanks to mkyong.com
|
||||||
|
octet="([01]?[[:digit:]][[:digit:]]?|2[0-4][[:digit:]]|25[0-5])"
|
||||||
|
|
||||||
|
printf -- "%s" "${TMP_IPv4}"| grep -Eq "^${octet}\\.${octet}\\.${octet}\\.${octet}$"
|
||||||
|
return $?
|
||||||
|
}
|
||||||
|
|
||||||
|
get_bmc_ip()
|
||||||
|
{
|
||||||
|
#Thanks to http://ingvar.blog.redpill-linpro.com
|
||||||
|
for CHANNEL in `seq 1 14`
|
||||||
|
do
|
||||||
|
[ $(${IPMI_TOOL} lan print ${CHANNEL} 2>/dev/null \
|
||||||
|
| grep -q "^Set") ] || break
|
||||||
|
done
|
||||||
|
|
||||||
|
# Get BMC_IPv4 and BMC_URL from BMC
|
||||||
|
TMP_IPv4=$(${IPMI_TOOL} lan print ${CHANNEL} 2>/dev/null \
|
||||||
|
| sed -n "s#^IP Address .*: ##p")
|
||||||
|
|
||||||
|
valid_ip && BMC_IPv4=${TMP_IPv4} || BMC_IPv4=""
|
||||||
|
}
|
||||||
|
|
||||||
|
get_bmc_info()
|
||||||
|
{
|
||||||
|
get_bmc_ip
|
||||||
|
if [ -z "${BMC_IPv4}" ] || [ "${BMC_IPv4}" = "0.0.0.0" ]; then
|
||||||
|
BMC_IPv4=""
|
||||||
|
RETVAL=5
|
||||||
|
else
|
||||||
|
# URL makes sense only if there is an IP
|
||||||
|
oem_get_bmc_url
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
set_bmc_info()
|
||||||
|
{
|
||||||
|
if [ ! $(touch "${BMC_INFO}" && chmod 600 "${BMC_INFO}") ]; then
|
||||||
|
printf "BMC_IPv4=%s\n" "${BMC_IPv4}" > "${BMC_INFO}"
|
||||||
|
[ -n "${BMC_URL}" ] && \
|
||||||
|
printf "BMC_URL=%s\n" "${BMC_URL}" >> "${BMC_INFO}"
|
||||||
|
else
|
||||||
|
RETVAL=5
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
unset_bmc_info()
|
||||||
|
{
|
||||||
|
[ -f ${BMC_INFO} ] && rm -f ${BMC_INFO} > /dev/null 2>&1
|
||||||
|
}
|
||||||
|
|
||||||
|
#############################################################################
|
||||||
|
start()
|
||||||
|
{
|
||||||
|
if bmc_exists; then
|
||||||
|
[ "${SET_OS_INFO}" = "yes" ] && \
|
||||||
|
get_os_info && set_os_info
|
||||||
|
|
||||||
|
if [ "${SET_BMC_INFO}" = "yes" ]; then
|
||||||
|
get_bmc_info
|
||||||
|
if [ ${RETVAL} -eq 0 ]; then
|
||||||
|
set_bmc_info
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
#############################################################################
|
||||||
|
stop()
|
||||||
|
{
|
||||||
|
if bmc_exists; then
|
||||||
|
# reset OS info while system reboots
|
||||||
|
# aids with debugging OS boot-up issues
|
||||||
|
if [ "${RESET_OS_INFO}" = "yes" ]; then
|
||||||
|
set_os_info reset
|
||||||
|
fi
|
||||||
|
unset_bmc_info
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
#############################################################################
|
||||||
|
restart()
|
||||||
|
{
|
||||||
|
stop
|
||||||
|
[ $RETVAL -eq 0 ] && start
|
||||||
|
}
|
||||||
|
|
||||||
|
#############################################################################
|
||||||
|
status()
|
||||||
|
{
|
||||||
|
[ -r ${BMC_INFO} ] && \
|
||||||
|
grep -q "BMC_IPv4" "${BMC_INFO}" >/dev/null 1>&2 && \
|
||||||
|
BMC_STATUS="ok" || BMC_STATUS="inactive"
|
||||||
|
${OUTPUT} "${SCRIPT_NAME}: ${BMC_STATUS}" 1>&2
|
||||||
|
[ ${GETTEXT} -eq 1 ] && echo
|
||||||
|
}
|
||||||
|
|
||||||
|
#############################################################################
|
||||||
|
usage()
|
||||||
|
{
|
||||||
|
${OUTPUT} "Usage: ${SCRIPT_NAME} {start|stop|restart|status}" 1>&2
|
||||||
|
[ ${GETTEXT} -eq 1 ] && echo
|
||||||
|
RETVAL=1
|
||||||
|
}
|
||||||
|
|
||||||
|
#############################################################################
|
||||||
|
# MAIN
|
||||||
|
#############################################################################
|
||||||
|
case "$1" in
|
||||||
|
start) start ;;
|
||||||
|
stop) stop ;;
|
||||||
|
restart) restart ;;
|
||||||
|
status) status ;;
|
||||||
|
*) usage ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case "$RETVAL" in
|
||||||
|
0|1) ;;
|
||||||
|
2) ${OUTPUT} "${SCRIPT_NAME}: ipmitool(1) not found." 1>&2 ;;
|
||||||
|
3) ${OUTPUT} "${SCRIPT_NAME}: this version of ipmitool does not support getsysinfo." 1>&2 ;;
|
||||||
|
4) ${OUTPUT} "${SCRIPT_NAME}: failed to communicate with BMC." 1>&2 ;;
|
||||||
|
5) ${OUTPUT} "${SCRIPT_NAME}: failed to set OS information in BMC." 1>&2 ;;
|
||||||
|
6) ${OUTPUT} "${SCRIPT_NAME}: failed to get BMC information." 1>&2 ;;
|
||||||
|
*) ${OUTPUT} "${SCRIPT_NAME}: unexpected error." 1>&2 ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ ${RETVAL} -gt 1 ]; then
|
||||||
|
${OUTPUT} " Return code: ${RETVAL}" 1>&2
|
||||||
|
[ ${GETTEXT} -eq 1 ] && echo
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
exit ${RETVAL}
|
||||||
|
|
||||||
|
#############################################################################
|
||||||
|
# end of file
|
||||||
|
#############################################################################
|
13
contrib/exchange-bmc-os-info.service.redhat
Normal file
13
contrib/exchange-bmc-os-info.service.redhat
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Exchange Information between BMC and OS
|
||||||
|
After=ipmi.service network.target
|
||||||
|
Requires=ipmi.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
RemainAfterExit=yes
|
||||||
|
ExecStart=/usr/libexec/exchange-bmc-os-info start
|
||||||
|
ExecStop=/usr/libexec/exchange-bmc-os-info stop
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
26
contrib/exchange-bmc-os-info.sysconf
Normal file
26
contrib/exchange-bmc-os-info.sysconf
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
# exchange-bmc-os-info
|
||||||
|
#
|
||||||
|
# Config file to control Exchange of information between
|
||||||
|
# the OS and Service Processor/Baseboard Management Controller (BMC)
|
||||||
|
#
|
||||||
|
# See here for details
|
||||||
|
# https://fedoraproject.org/wiki/Features/AgentFreeManagement
|
||||||
|
|
||||||
|
### Set OS Info in BMC/Service Processor ###
|
||||||
|
# Name: SET_OS_INFO
|
||||||
|
# Description: Set OS Name, Version and Hostname in the Service Processor (BMC)
|
||||||
|
# Default: yes
|
||||||
|
SET_OS_INFO="yes"
|
||||||
|
|
||||||
|
### Reset OS Info in BMC/Service Processor ###
|
||||||
|
# Name: RESET_OS_INFO
|
||||||
|
# Description: Reset OS Name, Version and Hostname in the Service Processor (BMC).
|
||||||
|
# Useful when the OS Name/Hostname should be empty on reboot
|
||||||
|
# Default: no
|
||||||
|
RESET_OS_INFO="no"
|
||||||
|
|
||||||
|
### Set BMC/Service Processor Info in OS ###
|
||||||
|
# Name; SET_BMC_INFO
|
||||||
|
# Description: Set IP Address and URL of Service Processor/BMC in /run/bmc-info
|
||||||
|
# Default: yes
|
||||||
|
SET_BMC_INFO="yes"
|
88
contrib/log_bmc.sh
Normal file
88
contrib/log_bmc.sh
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#############################################################################
|
||||||
|
#
|
||||||
|
# log_bmc.sh: Add SEL entries to indicate OS Boot/Install status.
|
||||||
|
#
|
||||||
|
# version: 0.1
|
||||||
|
#
|
||||||
|
# Authors: Charles Rose <charles_rose@dell.com>
|
||||||
|
# Jordan Hargrave <jordan_hargrave@dell.com>
|
||||||
|
#
|
||||||
|
# Description: Script to log OS boot/install status to the BMC. Primarily
|
||||||
|
# meant for use in automated installs and start up scripts.
|
||||||
|
# Will provide administrators with OS boot/install status in
|
||||||
|
# BMC and aid with debugging.
|
||||||
|
#
|
||||||
|
# Example usage:
|
||||||
|
# # ./log_bmc.sh inst_start
|
||||||
|
# # ipmitool sel list
|
||||||
|
# b | 05/07/2014 | 12:07:32 | OS Boot | Installation started
|
||||||
|
#
|
||||||
|
# See here for details:
|
||||||
|
# https://fedoraproject.org/wiki/Features/AgentFreeManagement
|
||||||
|
#
|
||||||
|
#############################################################################
|
||||||
|
IPMI_CMD="/usr/bin/ipmitool"
|
||||||
|
|
||||||
|
#############################################################################
|
||||||
|
# SEL Event types from ipmi_sel.h
|
||||||
|
OS_STOP="0x20"
|
||||||
|
OS_BOOT="0x1f"
|
||||||
|
# SEL Event data from ipmi_sel.h
|
||||||
|
GRACEFUL_SHUTDOWN="0x03" # OS Stop/Shutdown: Installation started
|
||||||
|
BOOT_COMPLETED="0x01" # OS Boot: Installation started
|
||||||
|
INSTALL_STARTED="0x07" # OS Boot: Installation started
|
||||||
|
INSTALL_COMPLETED="0x08" # OS Boot: Installation completed
|
||||||
|
INSTALL_ABORTED="0x09" # OS Boot: Installation aborted
|
||||||
|
INSTALL_FAILED="0x0a" # OS Boot: Installation failed
|
||||||
|
|
||||||
|
##########################################################################
|
||||||
|
|
||||||
|
# check for ipmi functionality.
|
||||||
|
check_ipmi()
|
||||||
|
{
|
||||||
|
# ensures presence of ipmitool and /dev/ipmi*
|
||||||
|
${IPMI_CMD} mc info > /dev/null 2>&1
|
||||||
|
[ $? -ne 0 ] && RETVAL=2
|
||||||
|
}
|
||||||
|
|
||||||
|
# Write out the events to SEL
|
||||||
|
ipmi_sel_add()
|
||||||
|
{
|
||||||
|
# Refer ipmitool(1) event for details on format.
|
||||||
|
printf "0x04 %s 0x00 0x6f %s 0x00 0x00" ${type} ${status} > \
|
||||||
|
${tmpfile} && \
|
||||||
|
${IPMI_CMD} sel add ${tmpfile} > /dev/null 2>&1
|
||||||
|
[ $? -ne 0 ] && RETVAL=3
|
||||||
|
}
|
||||||
|
|
||||||
|
### Main
|
||||||
|
# Most of the status is for this event type
|
||||||
|
tmpfile=$(/usr/bin/mktemp)
|
||||||
|
RETVAL=0
|
||||||
|
type=${OS_BOOT}
|
||||||
|
|
||||||
|
case ${1} in
|
||||||
|
os_shutdown) type=${OS_STOP}; status=${GRACEFUL_SHUTDOWN} ;;
|
||||||
|
os_boot) status=${BOOT_COMPLETED} ;;
|
||||||
|
inst_start) status=${INSTALL_STARTED} ;;
|
||||||
|
inst_complete) status=${INSTALL_COMPLETED} ;;
|
||||||
|
inst_abort) status=${INSTALL_ABORTED} ;;
|
||||||
|
inst_fail) status=${INSTALL_FAILED} ;;
|
||||||
|
*) RETVAL=1 ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
[ ${RETVAL} -eq 0 ] && check_ipmi
|
||||||
|
[ ${RETVAL} -eq 0 ] && ipmi_sel_add ${status}
|
||||||
|
|
||||||
|
case ${RETVAL} in
|
||||||
|
0) ;;
|
||||||
|
1) printf -- %s\\n "Usage: $0 <os_boot|os_shutdown|inst_start|inst_complete|inst_abort|inst_fail>" ;;
|
||||||
|
2) printf -- %s\\n "failed to communicate with BMC." ;;
|
||||||
|
3) printf -- %s\\n "error adding ipmi sel entry." ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
[ -f ${tmpfile} ] && rm -f ${tmpfile} > /dev/null 2>&1
|
||||||
|
|
||||||
|
exit ${RETVAL}
|
||||||
|
### End
|
@ -10,47 +10,47 @@ ipmitool [ <options> ] <command> [ <sub-commands and sub-options> ]
|
|||||||
Any recognized option is accepted. Conditional options may be ignored or it's usage postponed until shell or exec processes relevant command.
|
Any recognized option is accepted. Conditional options may be ignored or it's usage postponed until shell or exec processes relevant command.
|
||||||
.br
|
.br
|
||||||
|
|
||||||
<general-options> := [ -h | -V | -v | -I <interface> | -H <address> |
|
<general\-options> := [ \-h | \-V | \-v | \-I <interface> | \-H <address> |
|
||||||
-d <N> | -p <port> | -c | -U <username> |
|
\-d <N> | \-p <port> | \-c | \-U <username> |
|
||||||
-L <privlvl> | -l <lun> | -m <local_address> |
|
\-L <privlvl> | \-l <lun> | \-m <local_address> |
|
||||||
-N <sec> | -R <count> | <password-option> |
|
\-N <sec> | \-R <count> | <password\-option> |
|
||||||
<oem-option> | <bridge-options> ]
|
<oem-option> | <bridge-options> ]
|
||||||
|
|
||||||
<conditional-opts> := [ <lan-options> | <lanplus-options> |
|
<conditional\-opts> := [ <lan\-options> | <lanplus\-options> |
|
||||||
<command-options> ]
|
<command\-options> ]
|
||||||
.br
|
.br
|
||||||
Bridging:
|
Bridging:
|
||||||
.br
|
.br
|
||||||
<bridge-options> := -t <target_address> [ -b <channel> |
|
<bridge\-options> := \-t <target_address> [ \-b <channel> |
|
||||||
[ -T <address> | -B <channel> ] ]
|
[ \-T <address> | \-B <channel> ] ]
|
||||||
.br
|
.br
|
||||||
|
|
||||||
Options used with -I lan:
|
Options used with \-I lan:
|
||||||
.br
|
.br
|
||||||
<lan-options> := [ -A <authtype> ]
|
<lan\-options> := [ \-A <authtype> ]
|
||||||
.br
|
.br
|
||||||
|
|
||||||
Options used with -I lanplus:
|
Options used with \-I lanplus:
|
||||||
.br
|
.br
|
||||||
<lanplus-options> := [ -C <ciphersuite> | <key-option> ]
|
<lanplus\-options> := [ \-C <ciphersuite> | <key\-option> ]
|
||||||
.br
|
.br
|
||||||
|
|
||||||
Option groups setting same value:
|
Option groups setting same value:
|
||||||
.br
|
.br
|
||||||
<key-option> := [ -k <key> | -K | -y <hex_key> | -Y ]
|
<key\-option> := [ \-k <key> | \-K | \-y <hex_key> | \-Y ]
|
||||||
.br
|
.br
|
||||||
<password-option> := [ -f <password_file> | -a | -P <password> | -E ]
|
<password\-option> := [ \-f <password_file> | \-a | \-P <password> | \-E ]
|
||||||
.br
|
.br
|
||||||
<oem-option> := [ -o <oemtype> | -g | -s ]
|
<oem\-option> := [ \-o <oemtype> | \-g | \-s ]
|
||||||
.br
|
.br
|
||||||
|
|
||||||
Options used with specific command <command-options>:
|
Options used with specific command <command-options>:
|
||||||
.br
|
.br
|
||||||
<options-sdr> := [ -S <sdr_cache_file> ]
|
<options\-sdr> := [ \-S <sdr_cache_file> ]
|
||||||
.br
|
.br
|
||||||
<options-sel> := [ -O <sel_oem> ]
|
<options\-sel> := [ \-O <sel_oem> ]
|
||||||
.br
|
.br
|
||||||
<options-sol> := [ -e <sol_escape_char> ]
|
<options\-sol> := [ \-e <sol_escape_char> ]
|
||||||
|
|
||||||
|
|
||||||
.SH "DESCRIPTION"
|
.SH "DESCRIPTION"
|
||||||
@ -63,7 +63,7 @@ chassis power control.
|
|||||||
IPMI management of a local system interface requires a compatible IPMI
|
IPMI management of a local system interface requires a compatible IPMI
|
||||||
kernel driver to be installed and configured. On Linux this driver is
|
kernel driver to be installed and configured. On Linux this driver is
|
||||||
called \fIOpenIPMI\fP and it is included in standard distributions.
|
called \fIOpenIPMI\fP and it is included in standard distributions.
|
||||||
On Solaris this driver is called \fIBMC\fP and is inclued in Solaris 10.
|
On Solaris this driver is called \fIBMC\fP and is included in Solaris 10.
|
||||||
Management of a remote station requires the IPMI\-over\-LAN interface to be
|
Management of a remote station requires the IPMI\-over\-LAN interface to be
|
||||||
enabled and configured. Depending on the particular requirements of each
|
enabled and configured. Depending on the particular requirements of each
|
||||||
system it may be possible to enable the LAN interface using ipmitool over
|
system it may be possible to enable the LAN interface using ipmitool over
|
||||||
@ -120,7 +120,7 @@ option is absent, or if password_file is empty, the password
|
|||||||
will default to NULL.
|
will default to NULL.
|
||||||
.TP
|
.TP
|
||||||
\fB\-g\fR
|
\fB\-g\fR
|
||||||
Deprecated. Use: -o intelplus
|
Deprecated. Use: \-o intelplus
|
||||||
.TP
|
.TP
|
||||||
\fB\-h\fR
|
\fB\-h\fR
|
||||||
Get basic usage help from the command line.
|
Get basic usage help from the command line.
|
||||||
@ -151,12 +151,9 @@ combined with \fI-t target address\fP.
|
|||||||
.TP
|
.TP
|
||||||
\fB\-m\fR <\fIlocal_address\fP>
|
\fB\-m\fR <\fIlocal_address\fP>
|
||||||
Set the local IPMB address. The local address defaults to 0x20
|
Set the local IPMB address. The local address defaults to 0x20
|
||||||
or is auto discovered on PICMG platforms when -m is not specified.
|
or is auto discovered on PICMG platforms when \-m is not specified.
|
||||||
There should be no need to change the local address for normal operation.
|
There should be no need to change the local address for normal operation.
|
||||||
.TP
|
.TP
|
||||||
\fB\-M\fR <\fIaddress\fP>
|
|
||||||
Set transit local address for bridge request. (dual bridge)
|
|
||||||
.TP
|
|
||||||
\fB\-N\fR <\fIsec\fP>
|
\fB\-N\fR <\fIsec\fP>
|
||||||
Specify nr. of seconds between retransmissions of lan/lanplus messages.
|
Specify nr. of seconds between retransmissions of lan/lanplus messages.
|
||||||
Defaults are 2 seconds for lan and 1 second for lanplus interfaces.
|
Defaults are 2 seconds for lan and 1 second for lanplus interfaces.
|
||||||
@ -188,7 +185,7 @@ Command \fIraw\fP uses fixed value of one try (no retries).
|
|||||||
Command \fIhpm\fP uses fixed value of 10 retries.
|
Command \fIhpm\fP uses fixed value of 10 retries.
|
||||||
.TP
|
.TP
|
||||||
\fB\-s\fR
|
\fB\-s\fR
|
||||||
Deprecated. Use: -o supermicro
|
Deprecated. Use: \-o supermicro
|
||||||
.TP
|
.TP
|
||||||
\fB\-S\fR <\fIsdr_cache_file\fP>
|
\fB\-S\fR <\fIsdr_cache_file\fP>
|
||||||
Use local file for remote SDR cache. Using a local SDR cache
|
Use local file for remote SDR cache. Using a local SDR cache
|
||||||
@ -226,7 +223,7 @@ Display version information.
|
|||||||
\fB\-y\fR <\fIhex key\fP>
|
\fB\-y\fR <\fIhex key\fP>
|
||||||
Use supplied Kg key for IPMIv2.0 authentication. The key is expected in
|
Use supplied Kg key for IPMIv2.0 authentication. The key is expected in
|
||||||
hexadecimal format and can be used to specify keys with non-printable
|
hexadecimal format and can be used to specify keys with non-printable
|
||||||
characters. E.g. '-k PASSWORD' and '-y 50415353574F5244' are
|
characters. E.g. '\-k PASSWORD' and '\-y 50415353574F5244' are
|
||||||
equivalent.
|
equivalent.
|
||||||
The default is not to use any Kg key.
|
The default is not to use any Kg key.
|
||||||
.TP
|
.TP
|
||||||
@ -294,6 +291,7 @@ Commands:
|
|||||||
kontronoem Manage Kontron OEM Extensions
|
kontronoem Manage Kontron OEM Extensions
|
||||||
lan Configure LAN Channels
|
lan Configure LAN Channels
|
||||||
mc Management Controller status and global enables
|
mc Management Controller status and global enables
|
||||||
|
nm Node Manager
|
||||||
pef Configure Platform Event Filtering (PEF)
|
pef Configure Platform Event Filtering (PEF)
|
||||||
picmg Run a PICMG/ATA extended command
|
picmg Run a PICMG/ATA extended command
|
||||||
power Shortcut to chassis power commands
|
power Shortcut to chassis power commands
|
||||||
@ -1054,7 +1052,7 @@ Display point to point physical connectivity between carriers and AMC modules.
|
|||||||
\fIpower\fP <\fBxx=filename1\fR> <\fBxx=filename2\fR> \fB...\fr
|
\fIpower\fP <\fBxx=filename1\fR> <\fBxx=filename2\fR> \fB...\fr
|
||||||
.br
|
.br
|
||||||
|
|
||||||
Display power supply informations between carrier and AMC modules.
|
Display power supply information between carrier and AMC modules.
|
||||||
.TP
|
.TP
|
||||||
\fIall\fP <\fBxx=filename\fR> <\fBxx=filename\fR> \fB...\fr
|
\fIall\fP <\fBxx=filename\fR> <\fBxx=filename\fR> \fB...\fr
|
||||||
.br
|
.br
|
||||||
@ -1066,7 +1064,7 @@ modules.
|
|||||||
.TP
|
.TP
|
||||||
\fIfrushow\fP <\fBxx=filename\fR>
|
\fIfrushow\fP <\fBxx=filename\fR>
|
||||||
.br
|
.br
|
||||||
Convert a binary FRU file into human readable text format. Use -v option to get
|
Convert a binary FRU file into human readable text format. Use \-v option to get
|
||||||
more display information.
|
more display information.
|
||||||
|
|
||||||
.RE
|
.RE
|
||||||
@ -1084,56 +1082,56 @@ and an AMC module or between 2 AMC modules. Example:
|
|||||||
AMC slot B1 port 0 ==> On-Carrier Device 0 port 16
|
AMC slot B1 port 0 ==> On-Carrier Device 0 port 16
|
||||||
Matching Result
|
Matching Result
|
||||||
- From On-Carrier Device ID 0
|
- From On-Carrier Device ID 0
|
||||||
-Channel ID 11 || Lane 0: enable
|
\-Channel ID 11 || Lane 0: enable
|
||||||
-Link Type: AMC.2 Ethernet
|
\-Link Type: AMC.2 Ethernet
|
||||||
-Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link
|
\-Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link
|
||||||
-Link Group ID: 0 || Link Asym. Match: exact match
|
\-Link Group ID: 0 || Link Asym. Match: exact match
|
||||||
- To AMC slot B1
|
- To AMC slot B1
|
||||||
-Channel ID 0 || Lane 0: enable
|
\-Channel ID 0 || Lane 0: enable
|
||||||
-Link Type: AMC.2 Ethernet
|
\-Link Type: AMC.2 Ethernet
|
||||||
-Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link
|
\-Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link
|
||||||
-Link Group ID: 0 || Link Asym. Match: exact match
|
\-Link Group ID: 0 || Link Asym. Match: exact match
|
||||||
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
|
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
|
||||||
AMC slot B1 port 1 ==> On-Carrier Device 0 port 12
|
AMC slot B1 port 1 ==> On-Carrier Device 0 port 12
|
||||||
Matching Result
|
Matching Result
|
||||||
- From On-Carrier Device ID 0
|
- From On-Carrier Device ID 0
|
||||||
-Channel ID 6 || Lane 0: enable
|
\-Channel ID 6 || Lane 0: enable
|
||||||
-Link Type: AMC.2 Ethernet
|
\-Link Type: AMC.2 Ethernet
|
||||||
-Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link
|
\-Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link
|
||||||
-Link Group ID: 0 || Link Asym. Match: exact match
|
\-Link Group ID: 0 || Link Asym. Match: exact match
|
||||||
- To AMC slot B1
|
- To AMC slot B1
|
||||||
-Channel ID 1 || Lane 0: enable
|
\-Channel ID 1 || Lane 0: enable
|
||||||
-Link Type: AMC.2 Ethernet
|
\-Link Type: AMC.2 Ethernet
|
||||||
-Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link
|
\-Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link
|
||||||
-Link Group ID: 0 || Link Asym. Match: exact match
|
\-Link Group ID: 0 || Link Asym. Match: exact match
|
||||||
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
|
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
|
||||||
On-Carrier Device vs AMC slot A2
|
On-Carrier Device vs AMC slot A2
|
||||||
AMC slot A2 port 0 ==> On-Carrier Device 0 port 3
|
AMC slot A2 port 0 ==> On-Carrier Device 0 port 3
|
||||||
Matching Result
|
Matching Result
|
||||||
- From On-Carrier Device ID 0
|
- From On-Carrier Device ID 0
|
||||||
-Channel ID 9 || Lane 0: enable
|
\-Channel ID 9 || Lane 0: enable
|
||||||
-Link Type: AMC.2 Ethernet
|
\-Link Type: AMC.2 Ethernet
|
||||||
-Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link
|
\-Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link
|
||||||
-Link Group ID: 0 || Link Asym. Match: exact match
|
\-Link Group ID: 0 || Link Asym. Match: exact match
|
||||||
- To AMC slot A2
|
- To AMC slot A2
|
||||||
-Channel ID 0 || Lane 0: enable
|
\-Channel ID 0 || Lane 0: enable
|
||||||
-Link Type: AMC.2 Ethernet
|
\-Link Type: AMC.2 Ethernet
|
||||||
-Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link
|
\-Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link
|
||||||
-Link Group ID: 0 || Link Asym. Match: exact match
|
\-Link Group ID: 0 || Link Asym. Match: exact match
|
||||||
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
|
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
|
||||||
AMC slot B1 vs AMC slot A2
|
AMC slot B1 vs AMC slot A2
|
||||||
AMC slot A2 port 2 ==> AMC slot B1 port 2
|
AMC slot A2 port 2 ==> AMC slot B1 port 2
|
||||||
Matching Result
|
Matching Result
|
||||||
- From AMC slot B1
|
- From AMC slot B1
|
||||||
-Channel ID 2 || Lane 0: enable
|
\-Channel ID 2 || Lane 0: enable
|
||||||
-Link Type: AMC.3 Storage
|
\-Link Type: AMC.3 Storage
|
||||||
-Link Type extension: Serial Attached SCSI (SAS/SATA)
|
\-Link Type extension: Serial Attached SCSI (SAS/SATA)
|
||||||
-Link Group ID: 0 || Link Asym. Match: FC or SAS interface {exact match}
|
\-Link Group ID: 0 || Link Asym. Match: FC or SAS interface {exact match}
|
||||||
- To AMC slot A2
|
- To AMC slot A2
|
||||||
-Channel ID 2 || Lane 0: enable
|
\-Channel ID 2 || Lane 0: enable
|
||||||
-Link Type: AMC.3 Storage
|
\-Link Type: AMC.3 Storage
|
||||||
-Link Type extension: Serial Attached SCSI (SAS/SATA)
|
\-Link Type extension: Serial Attached SCSI (SAS/SATA)
|
||||||
-Link Group ID: 0 || Link Asym. Match: FC or SAS interface {exact match}
|
\-Link Group ID: 0 || Link Asym. Match: FC or SAS interface {exact match}
|
||||||
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
|
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
|
||||||
.TP
|
.TP
|
||||||
\fIunmatch\fP <\fBxx=filename\fR> <\fBxx=filename\fR> \fB...\fr
|
\fIunmatch\fP <\fBxx=filename\fR> <\fBxx=filename\fR> \fB...\fr
|
||||||
@ -1924,6 +1922,27 @@ ADMIN, issue the following command:
|
|||||||
|
|
||||||
> ipmitool \-I \fIinterface\fR lan set \fIchannel\fR cipher_privs uaXXXXXXXXXXXXX
|
> ipmitool \-I \fIinterface\fR lan set \fIchannel\fR cipher_privs uaXXXXXXXXXXXXX
|
||||||
|
|
||||||
|
.TP
|
||||||
|
|
||||||
|
\fIbad_pass_thresh\fP <\fBthresh_num\fR> <\fB1|0\fR> <\fBreset_interval\fR> <\fBlockout_interval\fR>
|
||||||
|
.br
|
||||||
|
|
||||||
|
Sets the Bad Password Threshold.
|
||||||
|
|
||||||
|
<\fBthresh_num\fR> If non-zero, this value determines the number of sequential bad passwords
|
||||||
|
that will be allowed to be entered for the identified user before the user is automatically
|
||||||
|
disabled from access on the channel.
|
||||||
|
|
||||||
|
<\fB1|0\fR> 1 = generate a Session Audit sensor "Invalid password disable" event message.
|
||||||
|
0 = do not generate an event message when the user is disabled.
|
||||||
|
|
||||||
|
<\fBreset_interval\fR> Attempt Count Reset Interval. The interval, in tens of seconds, for
|
||||||
|
which the accumulated count of bad password attempts is retained before being automatically
|
||||||
|
reset to zero.
|
||||||
|
|
||||||
|
<\fBlockout_interval\fR> User Lockout Interval. The interval, in tens of seconds, that the user
|
||||||
|
will remain disabled after being disabled because the Bad Password Threshold number was reached.
|
||||||
|
|
||||||
.RE
|
.RE
|
||||||
.TP
|
.TP
|
||||||
\fIalert\fP \fIprint\fP [<\fBchannel\fR>] [<\fBalert destination\fR>]
|
\fIalert\fP \fIprint\fP [<\fBchannel\fR>] [<\fBalert destination\fR>]
|
||||||
@ -2309,14 +2328,16 @@ Get boot parameter. Currently supported values for <\fBparam #\fR> are:
|
|||||||
.br
|
.br
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
\fIset\fP <\fBoption\fR> [\fBvalue ...\fR]
|
\fIset\fP <\fBdevice\fR> [<\fIoptions\fP=\fBhelp,...\fR>]
|
||||||
.br
|
.br
|
||||||
|
|
||||||
Set boot parameter.
|
Set boot device parameter used for next boot. Various options may be used
|
||||||
|
to change when the the next boot device is cleared.
|
||||||
|
Run \fI"options=help"\fP for a list of available bootparam set device options.
|
||||||
|
|
||||||
.RS
|
.RS
|
||||||
.TP
|
.TP
|
||||||
Currently supported values for \fB<option>\fR are:
|
Currently supported bootparam \fBdevice\fR settings are:
|
||||||
.TP
|
.TP
|
||||||
\fIforce_pxe\fP
|
\fIforce_pxe\fP
|
||||||
.br
|
.br
|
||||||
@ -2349,9 +2370,306 @@ Force boot from CD/DVD
|
|||||||
Force boot into BIOS setup
|
Force boot into BIOS setup
|
||||||
|
|
||||||
.RE
|
.RE
|
||||||
|
.RS
|
||||||
|
.TP
|
||||||
|
Currently supported bootparam \fBoptions\fR settings are associated with BMC Boot Valid Bit Clearing and are as follows: Any option can be prefixed with "no-" to invert the sense of the operation.
|
||||||
|
.TP
|
||||||
|
\fIPEF\fP
|
||||||
|
.br
|
||||||
|
|
||||||
|
Clear valid bit on reset/power cycle caused by PEF
|
||||||
|
.TP
|
||||||
|
\fItimeout\fP
|
||||||
|
.br
|
||||||
|
|
||||||
|
Automatically clear boot flag valid bit if Chassis Control command is
|
||||||
|
not received within 60 seconds.
|
||||||
|
.TP
|
||||||
|
\fIwatchdog\fP
|
||||||
|
.br
|
||||||
|
|
||||||
|
Clear valid bit on reset/power cycle caused by watchdog timeout
|
||||||
|
.TP
|
||||||
|
\fIreset\fP
|
||||||
|
.br
|
||||||
|
|
||||||
|
Clear valid bit on push button reset / soft-reset
|
||||||
|
.TP
|
||||||
|
\fIpower\fP
|
||||||
|
.br
|
||||||
|
|
||||||
|
Clear valid bit on power up via power push button or wake event
|
||||||
|
|
||||||
.RE
|
.RE
|
||||||
.RE
|
.RE
|
||||||
.RE
|
.RE
|
||||||
|
.RE
|
||||||
|
.TP
|
||||||
|
\fInm\fP
|
||||||
|
.RS
|
||||||
|
.TP
|
||||||
|
\fIalert\fP
|
||||||
|
.RS
|
||||||
|
.TP
|
||||||
|
\fIclear dest\fP <\fBdest\fR>
|
||||||
|
.br
|
||||||
|
|
||||||
|
Clear the Node Manager Alert lan destination.
|
||||||
|
|
||||||
|
.RE
|
||||||
|
.RS
|
||||||
|
.TP
|
||||||
|
\fIget\fP
|
||||||
|
.br
|
||||||
|
Get the Node Manager Alert settings.
|
||||||
|
|
||||||
|
.RE
|
||||||
|
.RS
|
||||||
|
.TP
|
||||||
|
\fIset chan\fP <\fBchan\fR> \fIdest\fP <\fBdest\fR> \fIstring\fP <\fBstring\fR>
|
||||||
|
.br
|
||||||
|
|
||||||
|
Set the Node Manager alert channel, lan destination, and alert string number.
|
||||||
|
|
||||||
|
.RE
|
||||||
|
.TP
|
||||||
|
\fIcapability\fP
|
||||||
|
.br
|
||||||
|
|
||||||
|
Obtain the Node Manager power control capabilities and ranges.
|
||||||
|
|
||||||
|
.TP
|
||||||
|
\fIcontrol\fP
|
||||||
|
.RS
|
||||||
|
.TP
|
||||||
|
\fIenable\fP|\fIdisable \fP
|
||||||
|
.RS
|
||||||
|
.TP
|
||||||
|
\fIglobal\fP
|
||||||
|
.br
|
||||||
|
|
||||||
|
Enable/disable all policies for all domains.
|
||||||
|
.TP
|
||||||
|
\fIper_domain\fP <platform|CPU|Memory>
|
||||||
|
.br
|
||||||
|
|
||||||
|
Enable/disable all policies of the specified domain.
|
||||||
|
.TP
|
||||||
|
\fIper_policy\fP <0-7>
|
||||||
|
.br
|
||||||
|
|
||||||
|
Enable/disable the policy for the specified domain/policy combination.
|
||||||
|
.RE
|
||||||
|
.RE
|
||||||
|
.TP
|
||||||
|
\fIdiscover\fP
|
||||||
|
.br
|
||||||
|
|
||||||
|
Discover Node Manager presence as well as the Node Manager version, revision, and patch number.
|
||||||
|
|
||||||
|
.TP
|
||||||
|
\fIpolicy\fP
|
||||||
|
.RS
|
||||||
|
.TP
|
||||||
|
\fIadd\fP
|
||||||
|
.RS
|
||||||
|
.TP
|
||||||
|
\fIpower\fP <watts> \fIpolicy_id\fP <0-7> [\fIcorrection\fP auto|soft|hard] \fItrig_lim\fP <seconds> \fIstats\fP <seconds> [\fIdomain\fP <platform|CPU|Memory>] \fIenable\fP|\fIdisable\fP
|
||||||
|
.br
|
||||||
|
|
||||||
|
Add a new power policy, or overwrite an existing policy.
|
||||||
|
The \fIcorrection\fP parameter is the agressiveness of frequency limiting, default is auto.
|
||||||
|
The \fItrig_lim\fP is the correction time limit and must be at least 6000 and not greater than 65535.
|
||||||
|
The \fIstats\fP setting is the averaging period in seconds and ranges from 1-65535.
|
||||||
|
If domain is not supplied a default of platform is used.
|
||||||
|
|
||||||
|
|
||||||
|
.TP
|
||||||
|
\fIinlet\fP <temp> \fIpolicy_id\fP <0-7> [\fIcorrection\fP auto|soft|hard] \fItrig_lim\fP <seconds> \fIstats\fP <seconds> [\fIdomain\fP <platform|CPU|Memory>] \fIenable\fP|\fIdisable\fP
|
||||||
|
.br
|
||||||
|
|
||||||
|
Add a new inlet temp policy, or overwrite an existing policy.
|
||||||
|
The \fIcorrection\fP parameter is the agressiveness of frequency limiting, default is auto.
|
||||||
|
The \fItrig_lim\fP is the correction time limit and must be at least 6000 and not greater than 65535.
|
||||||
|
The \fIstats\fP setting is the averaging period in seconds and ranges from 1-65535.
|
||||||
|
If domain is not supplied a default of platform is used.
|
||||||
|
|
||||||
|
|
||||||
|
.RE
|
||||||
|
.TP
|
||||||
|
\fIget\fP \fIpolicy_id\fP <0-7>
|
||||||
|
.br
|
||||||
|
|
||||||
|
Get a previously stored policy.
|
||||||
|
.TP
|
||||||
|
\fIlimiting\fP
|
||||||
|
.br
|
||||||
|
|
||||||
|
Report policy number if any policy is limiting power.
|
||||||
|
.TP
|
||||||
|
\fIremove\fP \fIpolicy_id\fP <0-7> [\fIdomain\fP <platform|CPU|Memory>]
|
||||||
|
.br
|
||||||
|
|
||||||
|
Remove a policy. If domain is not supplied a default of platform is used.
|
||||||
|
.RE
|
||||||
|
.TP
|
||||||
|
\fIpower\fP \fImin\fP <minimum> \fImax\fP <maximum> [\fIdomain\fP <platform|CPU|Memory>]
|
||||||
|
.br
|
||||||
|
|
||||||
|
Configure Node Manager power minimum and maximum power draw limits.
|
||||||
|
The \fImin\fP and \fImax\fP values must be in the range of 0-65535.
|
||||||
|
If domain is not supplied a default of platform is used.
|
||||||
|
|
||||||
|
.RE
|
||||||
|
.RS
|
||||||
|
.TP
|
||||||
|
\fIreset\fP
|
||||||
|
.RS
|
||||||
|
.TP
|
||||||
|
\fIcomm\fP \fIpolicy_id\fP <0-7> [\fIdomain\fP <platform|CPU|Memory>]
|
||||||
|
.br
|
||||||
|
|
||||||
|
Reset Node Manager communication statistics.
|
||||||
|
If domain is not supplied a default of platform is used.
|
||||||
|
|
||||||
|
.TP
|
||||||
|
\fIglobal\fI
|
||||||
|
.br
|
||||||
|
|
||||||
|
Reset Node Manager global statistics.
|
||||||
|
|
||||||
|
.TP
|
||||||
|
\fImemory\fP \fIpolicy_id\fP <0-7> [\fIdomain\fP <platform|CPU|Memory>]
|
||||||
|
.br
|
||||||
|
|
||||||
|
Reset Node Manager memory throttling statistics.
|
||||||
|
If domain is not supplied a default of platform is used.
|
||||||
|
|
||||||
|
.TP
|
||||||
|
\fIper_policy\fP \fIpolicy_id\fP <0-7> [\fIdomain\fP <platform|CPU|Memory>]
|
||||||
|
.br
|
||||||
|
|
||||||
|
Reset Node Manager per policy statistics.
|
||||||
|
If domain is not supplied a default of platform is used.
|
||||||
|
|
||||||
|
.TP
|
||||||
|
\fIrequests\fP \fIpolicy_id\fP <0-7> [\fIdomain\fP <platform|CPU|Memory>]
|
||||||
|
.br
|
||||||
|
|
||||||
|
Reset Node Manager unhandled requests statistics.
|
||||||
|
If domain is not supplied a default of platform is used.
|
||||||
|
|
||||||
|
.TP
|
||||||
|
\fIresponse\fP \fIpolicy_id\fP <0-7> [\fIdomain\fP <platform|CPU|Memory>]
|
||||||
|
.br
|
||||||
|
|
||||||
|
Reset Node Manager response time statistics.
|
||||||
|
If domain is not supplied a default of platform is used.
|
||||||
|
|
||||||
|
.TP
|
||||||
|
\fIthrottling\fP \fIpolicy_id\fP <0-7> [\fIdomain\fP <platform|CPU|Memory>]
|
||||||
|
.br
|
||||||
|
|
||||||
|
Reset Node Manager throttling statistics.
|
||||||
|
If domain is not supplied a default of platform is used.
|
||||||
|
|
||||||
|
.RE
|
||||||
|
.TP
|
||||||
|
\fIstatistics\fP
|
||||||
|
.RS
|
||||||
|
.TP
|
||||||
|
\fIcomm_fail\fP
|
||||||
|
.br
|
||||||
|
|
||||||
|
Report Node Manager communication failure statistics.
|
||||||
|
|
||||||
|
.TP
|
||||||
|
\fIcpu_throttling\fP
|
||||||
|
.br
|
||||||
|
|
||||||
|
Report Node Manager cpu throttling statistics.
|
||||||
|
|
||||||
|
.TP
|
||||||
|
\fImem_throttling\fP
|
||||||
|
.br
|
||||||
|
|
||||||
|
Report Node Manager memory throttling statistics.
|
||||||
|
|
||||||
|
.TP
|
||||||
|
\fIpolicy_power\fP \fIpolicy_id\fP <0-7> [\fIdomain\fP <platform|CPU|Memory>]
|
||||||
|
.br
|
||||||
|
|
||||||
|
Report Node Manager per policy power statistics (policy must be a power limit type policy).
|
||||||
|
If domain is not supplied a default of platform is used.
|
||||||
|
|
||||||
|
.TP
|
||||||
|
\fIpolicy_temps\fP \fIpolicy_id\fP <0-7> [\fIdomain\fP <platform|CPU|Memory>]
|
||||||
|
.br
|
||||||
|
|
||||||
|
Report Node Manager per policy temp statistics (policy must be an inlet temp limit policy).
|
||||||
|
If domain is not supplied a default of platform is used.
|
||||||
|
|
||||||
|
.TP
|
||||||
|
\fIpolicy_throt\fP \fIpolicy_id\fP <0-7> [\fIdomain\fP <platform|CPU|Memory>]
|
||||||
|
.br
|
||||||
|
|
||||||
|
Report Node Manager per policy throttling statistics.
|
||||||
|
If domain is not supplied a default of platform is used.
|
||||||
|
|
||||||
|
.TP
|
||||||
|
\fIrequests\fP
|
||||||
|
.br
|
||||||
|
|
||||||
|
Report Node Manager unhandled requests statistics.
|
||||||
|
|
||||||
|
.TP
|
||||||
|
\fIresponse\fP
|
||||||
|
.br
|
||||||
|
|
||||||
|
Report Node Manager response time statistics.
|
||||||
|
|
||||||
|
.RE
|
||||||
|
.TP
|
||||||
|
\fIsuspend\fP
|
||||||
|
.RS
|
||||||
|
.TP
|
||||||
|
\fIget\fP \fIpolicy_id\fP <0-7> [\fIdomain\fP <platform|CPU|Memory>]
|
||||||
|
.br
|
||||||
|
|
||||||
|
Get Node Manager policy suspend periods.
|
||||||
|
If domain is not supplied a default of platform is used.
|
||||||
|
|
||||||
|
.TP
|
||||||
|
\fIset\fP \fIpolicy_id\fP <0-7> [\fIdomain\fP <platform|CPU|Memory>] <start> <stop> <repeat>
|
||||||
|
.br
|
||||||
|
|
||||||
|
Set Node Manager policy suspend periods.
|
||||||
|
If domain is not supplied a default of platform is used.
|
||||||
|
The <start> and <stop> values must be in the range of 0-239, which is the number of minutes past midnight divided by 6.
|
||||||
|
The <repeat> value is the daily recurrence pattern. Bit 0 is repeat every Monday, bit 1 is repeat every Tuesday, on through bit 6 for Sunday.
|
||||||
|
|
||||||
|
.RE
|
||||||
|
.TP
|
||||||
|
\fIthreshold\fP
|
||||||
|
.RS
|
||||||
|
.TP
|
||||||
|
\fIget\fP \fIpolicy_id\fP <0-7> [\fIdomain\fP <platform|CPU|Memory>]
|
||||||
|
.br
|
||||||
|
|
||||||
|
Get Node Manager policy Alert Threshold settings.
|
||||||
|
If domain is not supplied a default of platform is used.
|
||||||
|
|
||||||
|
.TP
|
||||||
|
\fIset\fP \fIpolicy_id\fP <0-7> [\fIdomain\fP <platform|CPU|Memory>] \fIthresh_array\fP
|
||||||
|
.br
|
||||||
|
|
||||||
|
Set Node Manager policy Alert Threshold values.
|
||||||
|
If domain is not supplied a default of platform is used.
|
||||||
|
The \fIthresh_array\fP is 1, 2, or 3 integers that set three alert threshold settings. The setting type is a power or temperature value which must match the type of policy.
|
||||||
|
|
||||||
|
.RE
|
||||||
|
.RE
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
\fIpef\fP
|
\fIpef\fP
|
||||||
.RS
|
.RS
|
||||||
@ -2942,10 +3260,19 @@ number. The default is 1.
|
|||||||
This command may be used to read SPD (Serial Presence Detect) data using the
|
This command may be used to read SPD (Serial Presence Detect) data using the
|
||||||
I2C Master Write\-Read IPMI command.
|
I2C Master Write\-Read IPMI command.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
\fIsunoem\fP
|
\fIsunoem\fP
|
||||||
.RS
|
.RS
|
||||||
.TP
|
.TP
|
||||||
|
\fIcli\fP [<\fBcommand string\fR> ...]
|
||||||
|
.br
|
||||||
|
|
||||||
|
Execute the service processor command line interface commands.
|
||||||
|
Without any command string, an interactive session is started
|
||||||
|
in the service processor command line environment. If a
|
||||||
|
command string is specified, the command string is executed
|
||||||
|
on the service processor and the connection is closed.
|
||||||
|
.TP
|
||||||
\fIled\fP
|
\fIled\fP
|
||||||
.RS
|
.RS
|
||||||
|
|
||||||
@ -2954,65 +3281,139 @@ on a Sun Microsystems server. Use 'sdr list generic' to get a
|
|||||||
list of devices that are controllable LEDs. The \fIledtype\fP
|
list of devices that are controllable LEDs. The \fIledtype\fP
|
||||||
parameter is optional and not necessary to provide on the command
|
parameter is optional and not necessary to provide on the command
|
||||||
line unless it is required by hardware.
|
line unless it is required by hardware.
|
||||||
.TP
|
.TP
|
||||||
\fIget\fP <\fBsensorid\fR> [<\fBledtype\fR>]
|
\fIget\fP <\fBsensorid\fR> [<\fBledtype\fR>]
|
||||||
|
|
||||||
Get status of a particular LED described by a Generic Device Locator
|
Get status of a particular LED described by a Generic Device Locator
|
||||||
record in the SDR. A sensorid of \fIall\fP will get the status
|
record in the SDR. A sensorid of \fIall\fP will get the status
|
||||||
of all available LEDS.
|
of all available LEDS.
|
||||||
.TP
|
.TP
|
||||||
\fIset\fP <\fBsensorid\fR> <\fBledmode\fR> [<\fBledtype\fR>]
|
\fIset\fP <\fBsensorid\fR> <\fBledmode\fR> [<\fBledtype\fR>]
|
||||||
|
|
||||||
Set status of a particular LED described by a Generic Device Locator
|
Set status of a particular LED described by a Generic Device Locator
|
||||||
record in the SDR. A sensorid of \fIall\fP will set the status
|
record in the SDR. A sensorid of \fIall\fP will set the status
|
||||||
of all available LEDS to the specified \fIledmode\fP and \fIledtype\fP.
|
of all available LEDS to the specified \fIledmode\fP and \fIledtype\fP.
|
||||||
.TP
|
.TP
|
||||||
LED Mode is required for set operations:
|
LED Mode is required for set operations:
|
||||||
.br
|
.br
|
||||||
\fIOFF\fP Off
|
\fIOFF\fP Off
|
||||||
.br
|
.br
|
||||||
\fION\fP Steady On
|
\fION\fP Steady On
|
||||||
.br
|
.br
|
||||||
\fISTANDBY\fP 100ms on 2900ms off blink rate
|
\fISTANDBY\fP 100ms on 2900ms off blink rate
|
||||||
.br
|
.br
|
||||||
\fISLOW\fP 1HZ blink rate
|
\fISLOW\fP 1HZ blink rate
|
||||||
.br
|
.br
|
||||||
\fIFAST\fP 4HZ blink rate
|
\fIFAST\fP 4HZ blink rate
|
||||||
.TP
|
.TP
|
||||||
LED Type is optional:
|
LED Type is optional:
|
||||||
.br
|
.br
|
||||||
\fIOK2RM\fP Ok to Remove
|
\fIOK2RM\fP Ok to Remove
|
||||||
.br
|
.br
|
||||||
\fISERVICE\fP Service Required
|
\fISERVICE\fP Service Required
|
||||||
.br
|
.br
|
||||||
\fIACT\fP Activity
|
\fIACT\fP Activity
|
||||||
.br
|
.br
|
||||||
\fILOCATE\fP Locate
|
\fILOCATE\fP Locate
|
||||||
|
|
||||||
.RE
|
.RE
|
||||||
.TP
|
.TP
|
||||||
\fIfan\fP \fIspeed\fP <0-100>
|
\fInacname\fP <\fBipmi name\fR>
|
||||||
|
.br
|
||||||
|
|
||||||
Set system fan speed (PWM duty cycle).
|
Return the full NAC name of a target identified by ipmi name.
|
||||||
.RS
|
.TP
|
||||||
.TP
|
\fIping\fP <\fBcount\fR> [<\fBq\fR>]
|
||||||
|
.br
|
||||||
|
|
||||||
|
Send and receive count packets. Each packet is 64 bytes.
|
||||||
|
|
||||||
|
q - Quiet. Displays output only at the start and end of the process.
|
||||||
|
.TP
|
||||||
|
\fIgetval\fP <\fBproperty name\fR>
|
||||||
|
.br
|
||||||
|
|
||||||
|
Returns value of specified ILOM property.
|
||||||
|
.TP
|
||||||
|
\fIsetval\fP <\fBproperty name\fR> <\fBproperty value\fR> [<\fBtimeout\fR>]
|
||||||
|
.br
|
||||||
|
|
||||||
|
Sets value of ILOM property. If timeout is not specified, the
|
||||||
|
default value is 5 seconds. NOTE: setval must be executed locally on host!
|
||||||
|
.TP
|
||||||
\fIsshkey\fP
|
\fIsshkey\fP
|
||||||
.RS
|
.RS
|
||||||
.TP
|
.TP
|
||||||
\fIset\fP <\fBuserid\fR> <\fBkeyfile\fR>
|
\fIset\fP <\fBuserid\fR> <\fBkeyfile\fR>
|
||||||
|
|
||||||
This command will allow you to specify an SSH key to use for a particular
|
This command will allow you to specify an SSH key to use for a particular
|
||||||
user on the Service Processor. This key will be used for CLI logins to
|
user on the Service Processor. This key will be used for CLI logins to
|
||||||
the SP and not for IPMI sessions. View available users and their userids
|
the SP and not for IPMI sessions. View available users and their userids
|
||||||
with the 'user list' command.
|
with the 'user list' command.
|
||||||
.TP
|
.TP
|
||||||
\fIdel\fP <\fBuserid\fR>
|
\fIdel\fP <\fBuserid\fR>
|
||||||
|
|
||||||
This command will delete the SSH key for a specified userid.
|
This command will delete the SSH key for a specified userid.
|
||||||
.RE
|
.RE
|
||||||
|
.TP
|
||||||
|
\fIversion\fP
|
||||||
|
.br
|
||||||
|
|
||||||
|
Display the version of ILOM firmware.
|
||||||
|
.TP
|
||||||
|
\fIgetfile\fP <\fBfile identifier\fR> <\fBdestination file name\fR>
|
||||||
|
.br
|
||||||
|
|
||||||
|
This command will return various files from service processor and store them
|
||||||
|
in specified destination file. Note that some files may not be present or
|
||||||
|
be supported by your SP.
|
||||||
|
.br
|
||||||
|
|
||||||
|
.RS
|
||||||
|
File identifiers:
|
||||||
|
.RS
|
||||||
|
.br
|
||||||
|
\fISSH_PUBKEYS\fP
|
||||||
|
.br
|
||||||
|
\fIDIAG_PASSED\fP
|
||||||
|
.br
|
||||||
|
\fIDIAG_FAILED\fP
|
||||||
|
.br
|
||||||
|
\fIDIAG_END_TIME\fP
|
||||||
|
.br
|
||||||
|
\fIDIAG_INVENTORY\fP
|
||||||
|
.br
|
||||||
|
\fIDIAG_TEST_LOG\fP
|
||||||
|
.br
|
||||||
|
\fIDIAG_START_TIME\fP
|
||||||
|
.br
|
||||||
|
\fIDIAG_UEFI_LOG\fP
|
||||||
|
.br
|
||||||
|
\fIDIAG_TEST_LOG\fP
|
||||||
|
.br
|
||||||
|
\fIDIAG_LAST_LOG\fP
|
||||||
|
.br
|
||||||
|
\fIDIAG_LAST_CMD\fP
|
||||||
.RE
|
.RE
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
|
.TP
|
||||||
|
\fIgetbehavior\fP <\fBfeature identifier\fR>
|
||||||
|
.br
|
||||||
|
|
||||||
|
This command will test if various ILOM features are enabled.
|
||||||
|
.br
|
||||||
|
|
||||||
|
.RS
|
||||||
|
Feature identifiers:
|
||||||
|
.RS
|
||||||
|
.br
|
||||||
|
\fISUPPORTS_SIGNED_PACKAGES\fP
|
||||||
|
.br
|
||||||
|
\fIREQUIRES_SIGNED_PACKAGES\fP
|
||||||
|
.RE
|
||||||
|
.RE
|
||||||
|
.RE
|
||||||
.TP
|
.TP
|
||||||
\fItsol\fP
|
\fItsol\fP
|
||||||
.RS
|
.RS
|
||||||
@ -3114,7 +3515,7 @@ a 2.4\-based kernel in order for ipmitool to work:
|
|||||||
Incoming and outgoing message handler for IPMI interfaces.
|
Incoming and outgoing message handler for IPMI interfaces.
|
||||||
.TP
|
.TP
|
||||||
.B ipmi_kcs_drv
|
.B ipmi_kcs_drv
|
||||||
An IPMI Keyboard Controler Style (KCS) interface driver for the message handler.
|
An IPMI Keyboard Controller Style (KCS) interface driver for the message handler.
|
||||||
.TP
|
.TP
|
||||||
.B ipmi_devintf
|
.B ipmi_devintf
|
||||||
Linux character device interface for the message handler.
|
Linux character device interface for the message handler.
|
||||||
@ -3152,7 +3553,7 @@ ipmitool includes some sample initialization scripts that
|
|||||||
can perform this task automatically at start\-up.
|
can perform this task automatically at start\-up.
|
||||||
|
|
||||||
In order to have ipmitool use the OpenIPMI device interface
|
In order to have ipmitool use the OpenIPMI device interface
|
||||||
you can specifiy it on the command line:
|
you can specify it on the command line:
|
||||||
.PP
|
.PP
|
||||||
ipmitool \fB\-I\fR \fIopen\fP <\fIcommand\fP>
|
ipmitool \fB\-I\fR \fIopen\fP <\fIcommand\fP>
|
||||||
.SH "BMC INTERFACE"
|
.SH "BMC INTERFACE"
|
||||||
@ -3263,7 +3664,7 @@ encryption algorightms.
|
|||||||
The ipmitool \fIfree\fP interface utilizes the FreeIPMI libfreeipmi
|
The ipmitool \fIfree\fP interface utilizes the FreeIPMI libfreeipmi
|
||||||
drivers.
|
drivers.
|
||||||
.LP
|
.LP
|
||||||
You can tell ipmitool to use the FreeIPMI interface with the -I option:
|
You can tell ipmitool to use the FreeIPMI interface with the \-I option:
|
||||||
.PP
|
.PP
|
||||||
ipmitool \fB\-I\fR \fIfree\fP <\fIcommand\fP>
|
ipmitool \fB\-I\fR \fIfree\fP <\fIcommand\fP>
|
||||||
|
|
||||||
@ -3273,7 +3674,7 @@ ipmitool \fB\-I\fR \fIfree\fP <\fIcommand\fP>
|
|||||||
The ipmitool \fIimb\fP interface supports the Intel IMB (Intel
|
The ipmitool \fIimb\fP interface supports the Intel IMB (Intel
|
||||||
Inter-module Bus) Interface through the /dev/imb device.
|
Inter-module Bus) Interface through the /dev/imb device.
|
||||||
.LP
|
.LP
|
||||||
You can tell ipmitool to use the IMB interface with the -I option:
|
You can tell ipmitool to use the IMB interface with the \-I option:
|
||||||
.PP
|
.PP
|
||||||
ipmitool \fB\-I\fR \fIimb\fP <\fIcommand\fP>
|
ipmitool \fB\-I\fR \fIimb\fP <\fIcommand\fP>
|
||||||
|
|
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
MAINTAINERCLEANFILES = Makefile.in
|
MAINTAINERCLEANFILES = Makefile.in
|
||||||
|
|
||||||
noinst_HEADERS = log.h bswap.h helper.h ipmi.h ipmi_cc.h ipmi_intf.h \
|
noinst_HEADERS = log.h bswap.h hpm2.h helper.h ipmi.h ipmi_cc.h ipmi_intf.h \
|
||||||
ipmi_chassis.h ipmi_entity.h ipmi_fru.h ipmi_hpmfwupg.h ipmi_lanp.h \
|
ipmi_chassis.h ipmi_entity.h ipmi_fru.h ipmi_hpmfwupg.h ipmi_lanp.h \
|
||||||
ipmi_sdr.h ipmi_sel.h ipmi_sol.h ipmi_mc.h ipmi_raw.h \
|
ipmi_sdr.h ipmi_sel.h ipmi_sol.h ipmi_mc.h ipmi_raw.h \
|
||||||
ipmi_channel.h ipmi_sensor.h ipmi_event.h ipmi_session.h \
|
ipmi_channel.h ipmi_sensor.h ipmi_event.h ipmi_session.h \
|
||||||
@ -38,5 +38,5 @@ noinst_HEADERS = log.h bswap.h helper.h ipmi.h ipmi_cc.h ipmi_intf.h \
|
|||||||
ipmi_oem.h ipmi_sdradd.h ipmi_isol.h ipmi_sunoem.h ipmi_picmg.h \
|
ipmi_oem.h ipmi_sdradd.h ipmi_isol.h ipmi_sunoem.h ipmi_picmg.h \
|
||||||
ipmi_fwum.h ipmi_main.h ipmi_tsol.h ipmi_firewall.h \
|
ipmi_fwum.h ipmi_main.h ipmi_tsol.h ipmi_firewall.h \
|
||||||
ipmi_kontronoem.h ipmi_ekanalyzer.h ipmi_gendev.h ipmi_ime.h \
|
ipmi_kontronoem.h ipmi_ekanalyzer.h ipmi_gendev.h ipmi_ime.h \
|
||||||
ipmi_delloem.h ipmi_dcmi.h
|
ipmi_delloem.h ipmi_dcmi.h ipmi_vita.h ipmi_sel_supermicro.h
|
||||||
|
|
@ -83,9 +83,12 @@ int str2ushort(const char * str, uint16_t * ushrt_ptr);
|
|||||||
int str2char(const char * str, int8_t * chr_ptr);
|
int str2char(const char * str, int8_t * chr_ptr);
|
||||||
int str2uchar(const char * str, uint8_t * uchr_ptr);
|
int str2uchar(const char * str, uint8_t * uchr_ptr);
|
||||||
|
|
||||||
|
int eval_ccode(const int ccode);
|
||||||
|
|
||||||
int is_fru_id(const char *argv_ptr, uint8_t *fru_id_ptr);
|
int is_fru_id(const char *argv_ptr, uint8_t *fru_id_ptr);
|
||||||
int is_ipmi_channel_num(const char *argv_ptr, uint8_t *channel_ptr);
|
int is_ipmi_channel_num(const char *argv_ptr, uint8_t *channel_ptr);
|
||||||
int is_ipmi_user_id(const char *argv_ptr, uint8_t *ipmi_uid_ptr);
|
int is_ipmi_user_id(const char *argv_ptr, uint8_t *ipmi_uid_ptr);
|
||||||
|
int is_ipmi_user_priv_limit(const char *argv_ptr, uint8_t *ipmi_priv_limit_ptr);
|
||||||
|
|
||||||
uint16_t str2val(const char * str, const struct valstr * vs);
|
uint16_t str2val(const char * str, const struct valstr * vs);
|
||||||
void print_valstr(const struct valstr * vs, const char * title, int loglevel);
|
void print_valstr(const struct valstr * vs, const char * title, int loglevel);
|
||||||
@ -99,6 +102,7 @@ void printbuf(const uint8_t * buf, int len, const char * desc);
|
|||||||
uint8_t ipmi_csum(uint8_t * d, int s);
|
uint8_t ipmi_csum(uint8_t * d, int s);
|
||||||
FILE * ipmi_open_file(const char * file, int rw);
|
FILE * ipmi_open_file(const char * file, int rw);
|
||||||
void ipmi_start_daemon(struct ipmi_intf *intf);
|
void ipmi_start_daemon(struct ipmi_intf *intf);
|
||||||
|
uint16_t ipmi_get_oem_id(struct ipmi_intf *intf);
|
||||||
|
|
||||||
#define ipmi_open_file_read(file) ipmi_open_file(file, 0)
|
#define ipmi_open_file_read(file) ipmi_open_file(file, 0)
|
||||||
#define ipmi_open_file_write(file) ipmi_open_file(file, 1)
|
#define ipmi_open_file_write(file) ipmi_open_file(file, 1)
|
91
include/ipmitool/hpm2.h
Normal file
91
include/ipmitool/hpm2.h
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2012 Pigeon Point Systems. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
|
*
|
||||||
|
* Redistribution of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* Redistribution in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
*
|
||||||
|
* Neither the name of Pigeon Point Systems nor the names of
|
||||||
|
* contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* This software is provided "AS IS," without a warranty of any kind.
|
||||||
|
* ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
|
||||||
|
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
|
||||||
|
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
|
||||||
|
* PIGEON POINT SYSTEMS ("PPS") AND ITS LICENSORS SHALL NOT BE LIABLE
|
||||||
|
* FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
|
||||||
|
* OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL
|
||||||
|
* PPS OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
|
||||||
|
* OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR
|
||||||
|
* PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF
|
||||||
|
* LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
|
||||||
|
* EVEN IF PPS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <ipmitool/ipmi_intf.h>
|
||||||
|
|
||||||
|
/* Global HPM.2 defines */
|
||||||
|
#define HPM2_REVISION 0x01
|
||||||
|
#define HPM3_REVISION 0x01
|
||||||
|
#define HPM2_LAN_PARAMS_REV 0x01
|
||||||
|
#define HPM2_SOL_PARAMS_REV 0x01
|
||||||
|
#define HPM3_LAN_PARAMS_REV 0x01
|
||||||
|
/* IPMI defines parameter revision as
|
||||||
|
* MSN = present revision,
|
||||||
|
* LSN = oldest revision parameter is
|
||||||
|
* backward compatible with. */
|
||||||
|
#define LAN_PARAM_REV(x, y) (((x) << 4) | ((y) & 0xF))
|
||||||
|
|
||||||
|
/* HPM.2 capabilities */
|
||||||
|
#define HPM2_CAPS_SOL_EXTENSION 0x01
|
||||||
|
#define HPM2_CAPS_PACKET_TRACE 0x02
|
||||||
|
#define HPM2_CAPS_EXT_MANAGEMENT 0x04
|
||||||
|
#define HPM2_CAPS_VERSION_SENSOR 0x08
|
||||||
|
#define HPM2_CAPS_DYNAMIC_SESSIONS 0x10
|
||||||
|
|
||||||
|
#if HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(push, 1)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* HPM.2 LAN attach capabilities */
|
||||||
|
struct hpm2_lan_attach_capabilities {
|
||||||
|
uint8_t hpm2_revision_id;
|
||||||
|
uint16_t lan_channel_mask;
|
||||||
|
uint8_t hpm2_caps;
|
||||||
|
uint8_t hpm2_lan_params_start;
|
||||||
|
uint8_t hpm2_lan_params_rev;
|
||||||
|
uint8_t hpm2_sol_params_start;
|
||||||
|
uint8_t hpm2_sol_params_rev;
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
|
||||||
|
/* HPM.2 LAN channel capabilities */
|
||||||
|
struct hpm2_lan_channel_capabilities {
|
||||||
|
uint8_t capabilities;
|
||||||
|
uint8_t attach_type;
|
||||||
|
uint8_t bandwidth_class;
|
||||||
|
uint16_t max_inbound_pld_size;
|
||||||
|
uint16_t max_outbound_pld_size;
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
|
||||||
|
#if HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(pop)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* HPM.2 command assignments */
|
||||||
|
#define HPM2_GET_LAN_ATTACH_CAPABILITIES 0x3E
|
||||||
|
|
||||||
|
extern int hpm2_get_capabilities(struct ipmi_intf * intf,
|
||||||
|
struct hpm2_lan_attach_capabilities * caps);
|
||||||
|
extern int hpm2_get_lan_channel_capabilities(struct ipmi_intf * intf,
|
||||||
|
uint8_t hpm2_lan_params_start,
|
||||||
|
struct hpm2_lan_channel_capabilities * caps);
|
||||||
|
extern int hpm2_detect_max_payload_size(struct ipmi_intf * intf);
|
@ -251,8 +251,15 @@ struct ipmi_rs {
|
|||||||
|
|
||||||
|
|
||||||
/* These values are IANA numbers */
|
/* These values are IANA numbers */
|
||||||
|
/************************************************************************
|
||||||
|
* Add ID String for IANA Enterprise Number of IBM & ADLINK
|
||||||
|
* https://www.iana.org/assignments/enterprise-numbers/enterprise-numbers
|
||||||
|
************************************************************************/
|
||||||
|
|
||||||
typedef enum IPMI_OEM {
|
typedef enum IPMI_OEM {
|
||||||
IPMI_OEM_UNKNOWN = 0,
|
IPMI_OEM_UNKNOWN = 0,
|
||||||
|
/* 2 for [IBM] */
|
||||||
|
IPMI_OEM_IBM_2 = 2,
|
||||||
IPMI_OEM_HP = 11,
|
IPMI_OEM_HP = 11,
|
||||||
IPMI_OEM_SUN = 42,
|
IPMI_OEM_SUN = 42,
|
||||||
IPMI_OEM_NOKIA = 94,
|
IPMI_OEM_NOKIA = 94,
|
||||||
@ -260,6 +267,7 @@ typedef enum IPMI_OEM {
|
|||||||
IPMI_OEM_HITACHI_116 = 116,
|
IPMI_OEM_HITACHI_116 = 116,
|
||||||
IPMI_OEM_NEC = 119,
|
IPMI_OEM_NEC = 119,
|
||||||
IPMI_OEM_TOSHIBA = 186,
|
IPMI_OEM_TOSHIBA = 186,
|
||||||
|
IPMI_OEM_ERICSSON = 193,
|
||||||
IPMI_OEM_INTEL = 343,
|
IPMI_OEM_INTEL = 343,
|
||||||
IPMI_OEM_TATUNG = 373,
|
IPMI_OEM_TATUNG = 373,
|
||||||
IPMI_OEM_HITACHI_399 = 399,
|
IPMI_OEM_HITACHI_399 = 399,
|
||||||
@ -267,9 +275,13 @@ typedef enum IPMI_OEM {
|
|||||||
IPMI_OEM_LMC = 2168,
|
IPMI_OEM_LMC = 2168,
|
||||||
IPMI_OEM_RADISYS = 4337,
|
IPMI_OEM_RADISYS = 4337,
|
||||||
IPMI_OEM_BROADCOM = 4413,
|
IPMI_OEM_BROADCOM = 4413,
|
||||||
|
/* 4769 for [IBM Corporation] */
|
||||||
|
IPMI_OEM_IBM_4769 = 4769,
|
||||||
IPMI_OEM_MAGNUM = 5593,
|
IPMI_OEM_MAGNUM = 5593,
|
||||||
IPMI_OEM_TYAN = 6653,
|
IPMI_OEM_TYAN = 6653,
|
||||||
|
IPMI_OEM_QUANTA = 7244,
|
||||||
IPMI_OEM_NEWISYS = 9237,
|
IPMI_OEM_NEWISYS = 9237,
|
||||||
|
IPMI_OEM_ADVANTECH = 10297,
|
||||||
IPMI_OEM_FUJITSU_SIEMENS = 10368,
|
IPMI_OEM_FUJITSU_SIEMENS = 10368,
|
||||||
IPMI_OEM_AVOCENT = 10418,
|
IPMI_OEM_AVOCENT = 10418,
|
||||||
IPMI_OEM_PEPPERCON = 10437,
|
IPMI_OEM_PEPPERCON = 10437,
|
||||||
@ -280,8 +292,13 @@ typedef enum IPMI_OEM {
|
|||||||
IPMI_OEM_RARITAN = 13742,
|
IPMI_OEM_RARITAN = 13742,
|
||||||
IPMI_OEM_KONTRON = 15000,
|
IPMI_OEM_KONTRON = 15000,
|
||||||
IPMI_OEM_PPS = 16394,
|
IPMI_OEM_PPS = 16394,
|
||||||
|
/* 20301 for [IBM eServer X] */
|
||||||
|
IPMI_OEM_IBM_20301 = 20301,
|
||||||
IPMI_OEM_AMI = 20974,
|
IPMI_OEM_AMI = 20974,
|
||||||
IPMI_OEM_NOKIA_SIEMENS_NETWORKS = 28458
|
/* 24339 for [ADLINK TECHNOLOGY INC.] */
|
||||||
|
IPMI_OEM_ADLINK_24339 = 24339,
|
||||||
|
IPMI_OEM_NOKIA_SOLUTIONS_AND_NETWORKS = 28458,
|
||||||
|
IPMI_OEM_SUPERMICRO_47488 = 47488
|
||||||
} IPMI_OEM;
|
} IPMI_OEM;
|
||||||
|
|
||||||
extern const struct valstr completion_code_vals[];
|
extern const struct valstr completion_code_vals[];
|
@ -40,6 +40,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#define IPMI_GET_CHANNEL_AUTH_CAP 0x38
|
#define IPMI_GET_CHANNEL_AUTH_CAP 0x38
|
||||||
|
#define IPMI_SET_CHANNEL_ACCESS 0x40
|
||||||
#define IPMI_GET_CHANNEL_ACCESS 0x41
|
#define IPMI_GET_CHANNEL_ACCESS 0x41
|
||||||
#define IPMI_GET_CHANNEL_INFO 0x42
|
#define IPMI_GET_CHANNEL_INFO 0x42
|
||||||
#define IPMI_SET_USER_ACCESS 0x43
|
#define IPMI_SET_USER_ACCESS 0x43
|
||||||
@ -49,6 +50,32 @@
|
|||||||
#define IPMI_SET_USER_PASSWORD 0x47
|
#define IPMI_SET_USER_PASSWORD 0x47
|
||||||
#define IPMI_GET_CHANNEL_CIPHER_SUITES 0x54
|
#define IPMI_GET_CHANNEL_CIPHER_SUITES 0x54
|
||||||
|
|
||||||
|
/* These are for channel_info_t.session_support */
|
||||||
|
#define IPMI_CHANNEL_SESSION_LESS 0x00
|
||||||
|
#define IPMI_CHANNEL_SESSION_SINGLE 0x40
|
||||||
|
#define IPMI_CHANNEL_SESSION_MULTI 0x80
|
||||||
|
#define IPMI_CHANNEL_SESSION_BASED 0xC0
|
||||||
|
|
||||||
|
/* (22.24) Get Channel Info */
|
||||||
|
struct channel_info_t {
|
||||||
|
uint8_t channel;
|
||||||
|
uint8_t medium;
|
||||||
|
uint8_t protocol;
|
||||||
|
uint8_t session_support;
|
||||||
|
uint8_t active_sessions;
|
||||||
|
uint8_t vendor_id[3];
|
||||||
|
uint8_t aux_info[2];
|
||||||
|
};
|
||||||
|
|
||||||
|
/* (22.23) Get Channel Access */
|
||||||
|
struct channel_access_t {
|
||||||
|
uint8_t access_mode;
|
||||||
|
uint8_t alerting;
|
||||||
|
uint8_t channel;
|
||||||
|
uint8_t per_message_auth;
|
||||||
|
uint8_t privilege_limit;
|
||||||
|
uint8_t user_level_auth;
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The Get Authentication Capabilities response structure
|
* The Get Authentication Capabilities response structure
|
||||||
@ -101,153 +128,12 @@ struct get_channel_auth_cap_rsp {
|
|||||||
#pragma pack(0)
|
#pragma pack(0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
int _ipmi_get_channel_access(struct ipmi_intf *intf,
|
||||||
|
struct channel_access_t *channel_access,
|
||||||
/*
|
uint8_t get_volatile_settings);
|
||||||
* The Get Channel Info response structure
|
int _ipmi_set_channel_access(struct ipmi_intf *intf,
|
||||||
* From table 22-29 of the IPMI v2.0 spec
|
struct channel_access_t channel_access, uint8_t access_option,
|
||||||
*/
|
uint8_t privilege_option);
|
||||||
#ifdef HAVE_PRAGMA_PACK
|
|
||||||
#pragma pack(1)
|
|
||||||
#endif
|
|
||||||
struct get_channel_info_rsp {
|
|
||||||
#if WORDS_BIGENDIAN
|
|
||||||
uint8_t __reserved1 : 4;
|
|
||||||
uint8_t channel_number : 4; /* channel number */
|
|
||||||
#else
|
|
||||||
uint8_t channel_number : 4; /* channel number */
|
|
||||||
uint8_t __reserved1 : 4;
|
|
||||||
#endif
|
|
||||||
#if WORDS_BIGENDIAN
|
|
||||||
uint8_t __reserved2 : 1;
|
|
||||||
uint8_t channel_medium : 7; /* Channel medium type per table 6-3 */
|
|
||||||
#else
|
|
||||||
uint8_t channel_medium : 7; /* Channel medium type per table 6-3 */
|
|
||||||
uint8_t __reserved2 : 1;
|
|
||||||
#endif
|
|
||||||
#if WORDS_BIGENDIAN
|
|
||||||
uint8_t __reserved3 : 3;
|
|
||||||
uint8_t channel_protocol : 5; /* Channel protocol per table 6-2 */
|
|
||||||
#else
|
|
||||||
uint8_t channel_protocol : 5; /* Channel protocol per table 6-2 */
|
|
||||||
uint8_t __reserved3 : 3;
|
|
||||||
#endif
|
|
||||||
#if WORDS_BIGENDIAN
|
|
||||||
uint8_t session_support : 2; /* Description of session support */
|
|
||||||
uint8_t active_sessions : 6; /* Count of active sessions */
|
|
||||||
#else
|
|
||||||
uint8_t active_sessions : 6; /* Count of active sessions */
|
|
||||||
uint8_t session_support : 2; /* Description of session support */
|
|
||||||
#endif
|
|
||||||
uint8_t vendor_id[3]; /* For OEM that specified the protocol */
|
|
||||||
uint8_t aux_info[2]; /* Not used*/
|
|
||||||
} ATTRIBUTE_PACKING;
|
|
||||||
#ifdef HAVE_PRAGMA_PACK
|
|
||||||
#pragma pack(0)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The Get Channel Access response structure
|
|
||||||
* From table 22-28 of the IPMI v2.0 spec
|
|
||||||
*/
|
|
||||||
#ifdef HAVE_PRAGMA_PACK
|
|
||||||
#pragma pack(1)
|
|
||||||
#endif
|
|
||||||
struct get_channel_access_rsp {
|
|
||||||
#if WORDS_BIGENDIAN
|
|
||||||
uint8_t __reserved1 : 2;
|
|
||||||
uint8_t alerting : 1;
|
|
||||||
uint8_t per_message_auth : 1;
|
|
||||||
uint8_t user_level_auth : 1;
|
|
||||||
uint8_t access_mode : 3;
|
|
||||||
#else
|
|
||||||
uint8_t access_mode : 3;
|
|
||||||
uint8_t user_level_auth : 1;
|
|
||||||
uint8_t per_message_auth : 1;
|
|
||||||
uint8_t alerting : 1;
|
|
||||||
uint8_t __reserved1 : 2;
|
|
||||||
#endif
|
|
||||||
#if WORDS_BIGENDIAN
|
|
||||||
uint8_t __reserved2 : 4;
|
|
||||||
uint8_t channel_priv_limit : 4; /* Channel privilege level limit */
|
|
||||||
#else
|
|
||||||
uint8_t channel_priv_limit : 4; /* Channel privilege level limit */
|
|
||||||
uint8_t __reserved2 : 4;
|
|
||||||
#endif
|
|
||||||
} ATTRIBUTE_PACKING;
|
|
||||||
#ifdef HAVE_PRAGMA_PACK
|
|
||||||
#pragma pack(0)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_PRAGMA_PACK
|
|
||||||
#pragma pack(1)
|
|
||||||
#endif
|
|
||||||
struct get_user_access_rsp {
|
|
||||||
#if WORDS_BIGENDIAN
|
|
||||||
uint8_t __reserved1 : 2;
|
|
||||||
uint8_t max_user_ids : 6;
|
|
||||||
uint8_t __reserved2 : 2;
|
|
||||||
uint8_t enabled_user_ids : 6;
|
|
||||||
uint8_t __reserved3 : 2;
|
|
||||||
uint8_t fixed_user_ids : 6;
|
|
||||||
uint8_t __reserved4 : 1;
|
|
||||||
uint8_t callin_callback : 1;
|
|
||||||
uint8_t link_auth : 1;
|
|
||||||
uint8_t ipmi_messaging : 1;
|
|
||||||
uint8_t privilege_limit : 4;
|
|
||||||
#else
|
|
||||||
uint8_t max_user_ids : 6;
|
|
||||||
uint8_t __reserved1 : 2;
|
|
||||||
uint8_t enabled_user_ids : 6;
|
|
||||||
uint8_t __reserved2 : 2;
|
|
||||||
uint8_t fixed_user_ids : 6;
|
|
||||||
uint8_t __reserved3 : 2;
|
|
||||||
uint8_t privilege_limit : 4;
|
|
||||||
uint8_t ipmi_messaging : 1;
|
|
||||||
uint8_t link_auth : 1;
|
|
||||||
uint8_t callin_callback : 1;
|
|
||||||
uint8_t __reserved4 : 1;
|
|
||||||
#endif
|
|
||||||
} ATTRIBUTE_PACKING;
|
|
||||||
#ifdef HAVE_PRAGMA_PACK
|
|
||||||
#pragma pack(0)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_PRAGMA_PACK
|
|
||||||
#pragma pack(1)
|
|
||||||
#endif
|
|
||||||
struct set_user_access_data {
|
|
||||||
#if WORDS_BIGENDIAN
|
|
||||||
uint8_t change_bits : 1;
|
|
||||||
uint8_t callin_callback : 1;
|
|
||||||
uint8_t link_auth : 1;
|
|
||||||
uint8_t ipmi_messaging : 1;
|
|
||||||
uint8_t channel : 4;
|
|
||||||
uint8_t __reserved1 : 2;
|
|
||||||
uint8_t user_id : 6;
|
|
||||||
uint8_t __reserved2 : 4;
|
|
||||||
uint8_t privilege_limit : 4;
|
|
||||||
uint8_t __reserved3 : 4;
|
|
||||||
uint8_t session_limit : 4;
|
|
||||||
#else
|
|
||||||
uint8_t channel : 4;
|
|
||||||
uint8_t ipmi_messaging : 1;
|
|
||||||
uint8_t link_auth : 1;
|
|
||||||
uint8_t callin_callback : 1;
|
|
||||||
uint8_t change_bits : 1;
|
|
||||||
uint8_t user_id : 6;
|
|
||||||
uint8_t __reserved1 : 2;
|
|
||||||
uint8_t privilege_limit : 4;
|
|
||||||
uint8_t __reserved2 : 4;
|
|
||||||
uint8_t session_limit : 4;
|
|
||||||
uint8_t __reserved3 : 4;
|
|
||||||
#endif
|
|
||||||
} ATTRIBUTE_PACKING;
|
|
||||||
#ifdef HAVE_PRAGMA_PACK
|
|
||||||
#pragma pack(0)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
uint8_t ipmi_get_channel_medium(struct ipmi_intf * intf, uint8_t channel);
|
uint8_t ipmi_get_channel_medium(struct ipmi_intf * intf, uint8_t channel);
|
||||||
uint8_t ipmi_current_channel_medium(struct ipmi_intf * intf);
|
uint8_t ipmi_current_channel_medium(struct ipmi_intf * intf);
|
@ -52,6 +52,53 @@
|
|||||||
#define GOOD_PWR_GLIMIT_CCODE(ccode) ((ccode = ((ccode == 0x80) ? 0 : ccode)))
|
#define GOOD_PWR_GLIMIT_CCODE(ccode) ((ccode = ((ccode == 0x80) ? 0 : ccode)))
|
||||||
#define GOOD_ASSET_TAG_CCODE(ccode) ((ccode = (((ccode == 0x80) || (ccode == 0x81) || (ccode == 0x82) || (ccode == 0x83)) ? 0 : ccode)))
|
#define GOOD_ASSET_TAG_CCODE(ccode) ((ccode = (((ccode == 0x80) || (ccode == 0x81) || (ccode == 0x82) || (ccode == 0x83)) ? 0 : ccode)))
|
||||||
|
|
||||||
|
/* External Node Manager Configuration and Control Commands per spec 2.0 */
|
||||||
|
|
||||||
|
#define IPMI_NM_POLICY_CTL 0xC0
|
||||||
|
#define IPMI_NM_SET_POLICY 0xC1
|
||||||
|
#define IPMI_NM_GET_POLICY 0xC2
|
||||||
|
#define IPMI_NM_SET_ALERT_TH 0xC3
|
||||||
|
#define IPMI_NM_GET_ALERT_TH 0xC4
|
||||||
|
#define IPMI_NM_SET_SUSPEND 0xC5
|
||||||
|
#define IPMI_NM_GET_SUSPEND 0xC6
|
||||||
|
#define IPMI_NM_RESET_STATS 0xC7
|
||||||
|
#define IPMI_NM_GET_STATS 0xC8
|
||||||
|
#define IPMI_NM_GET_CAP 0xC9
|
||||||
|
#define IPMI_NM_GET_VERSION 0xCA
|
||||||
|
#define IPMI_NM_SET_POWER 0xCB
|
||||||
|
#define IPMI_NM_SET_ALERT_DS 0xCE
|
||||||
|
#define IPMI_NM_GET_ALERT_DS 0xCF
|
||||||
|
#define IPMI_NM_LIMITING 0xF2
|
||||||
|
|
||||||
|
/* Node Manager Policy Control Flags */
|
||||||
|
#define IPMI_NM_GLOBAL_ENABLE 0x01
|
||||||
|
#define IPMI_NM_DOMAIN_ENABLE 0x02
|
||||||
|
#define IPMI_NM_PER_POLICY_ENABLE 0x04
|
||||||
|
|
||||||
|
/* Node Manager Set Policy Enable */
|
||||||
|
#define IPMI_NM_POLICY_ENABLE 0x10
|
||||||
|
|
||||||
|
/* Node Manager Policy Trigger Codes */
|
||||||
|
#define IPMI_NM_NO_POLICY_TRIG 0x00
|
||||||
|
#define IPMI_NM_TEMP_TRIGGER 0x01
|
||||||
|
#define IPMI_NM_NO_READ_TRIG 0x02
|
||||||
|
#define IPMI_NM_RESET_TRIGGER 0x03
|
||||||
|
#define IPMI_NM_BOOT_TRIGGER 0x04
|
||||||
|
|
||||||
|
/* Policy Exception Actions flags */
|
||||||
|
#define IPMI_NM_POLICY_ALERT 0x01
|
||||||
|
#define IPMI_NM_POLICY_SHUT 0x02
|
||||||
|
|
||||||
|
/* Power Correction codes for Policy action */
|
||||||
|
#define IPMI_NM_PWR_AUTO_CORR 0x00
|
||||||
|
#define IPMI_NM_PWR_SOFT_CORR 0x01
|
||||||
|
#define IPMI_NM_PWR_AGGR_CORR 0x02
|
||||||
|
|
||||||
|
/* Set Threshold message size */
|
||||||
|
#define IPMI_NM_SET_THRESH_LEN 12
|
||||||
|
|
||||||
|
/* Number of Suspend Periods */
|
||||||
|
#define IPMI_NM_SUSPEND_PERIOD_MAX 5
|
||||||
|
|
||||||
struct dcmi_cmd {
|
struct dcmi_cmd {
|
||||||
uint16_t val;
|
uint16_t val;
|
||||||
@ -126,4 +173,98 @@ struct thermal_limit {
|
|||||||
|
|
||||||
int ipmi_dcmi_main(struct ipmi_intf * intf, int argc, char ** argv);
|
int ipmi_dcmi_main(struct ipmi_intf * intf, int argc, char ** argv);
|
||||||
|
|
||||||
|
/* Node Manager discover command */
|
||||||
|
struct nm_discover {
|
||||||
|
uint8_t intel_id[3]; /* Always returns 000157 */
|
||||||
|
uint8_t nm_version;
|
||||||
|
uint8_t ipmi_version;
|
||||||
|
uint8_t patch_version;
|
||||||
|
uint8_t major_rev;
|
||||||
|
uint8_t minor_rev;
|
||||||
|
} __attribute__ ((packed));
|
||||||
|
|
||||||
|
/* Node Manager get capabilites command */
|
||||||
|
struct nm_capability {
|
||||||
|
uint8_t intel_id[3];
|
||||||
|
uint8_t max_settings;
|
||||||
|
uint16_t max_value; /* max power/thermal/time after reset */
|
||||||
|
uint16_t min_value; /* min "" */
|
||||||
|
uint32_t min_corr; /* min correction time inmillesecs */
|
||||||
|
uint32_t max_corr;
|
||||||
|
uint16_t min_stats;
|
||||||
|
uint16_t max_stats;
|
||||||
|
uint8_t scope;
|
||||||
|
} __attribute__ ((packed));
|
||||||
|
|
||||||
|
/* Node Manager get statistics command */
|
||||||
|
struct nm_statistics {
|
||||||
|
uint8_t intel_id[3];
|
||||||
|
uint16_t curr_value;
|
||||||
|
uint16_t min_value;
|
||||||
|
uint16_t max_value;
|
||||||
|
uint16_t ave_value;
|
||||||
|
uint32_t time_stamp;
|
||||||
|
uint32_t stat_period;
|
||||||
|
uint8_t id_state;
|
||||||
|
} __attribute__ ((packed));
|
||||||
|
|
||||||
|
/* Node Manager set policy */
|
||||||
|
struct nm_policy {
|
||||||
|
uint8_t intel_id[3];
|
||||||
|
uint8_t domain; /* 0:3 are domain, 4 = Policy enabled */
|
||||||
|
uint8_t policy_id;
|
||||||
|
uint8_t policy_type; /* 0:3 trigger type 4 = action 5:6 correction */
|
||||||
|
uint8_t policy_exception; /* exception actions */
|
||||||
|
uint16_t policy_limits;
|
||||||
|
uint32_t corr_time;
|
||||||
|
uint16_t trigger_limit;
|
||||||
|
uint16_t stats_period;
|
||||||
|
} __attribute__ ((packed));
|
||||||
|
|
||||||
|
/* Node Maager get policy */
|
||||||
|
struct nm_get_policy {
|
||||||
|
uint8_t intel_id[3];
|
||||||
|
uint8_t domain; /* 0:3 are domain, 4 = Policy enabled */
|
||||||
|
uint8_t policy_type; /* 0:3 trigger type 4 = action 5:6 correction */
|
||||||
|
uint8_t policy_exception; /* exception actions */
|
||||||
|
uint16_t policy_limits;
|
||||||
|
uint32_t corr_time;
|
||||||
|
uint16_t trigger_limit;
|
||||||
|
uint16_t stats_period;
|
||||||
|
} __attribute__ ((packed));
|
||||||
|
|
||||||
|
/* Node Manager set alert destination */
|
||||||
|
struct nm_set_alert {
|
||||||
|
uint8_t intel_id[3];
|
||||||
|
uint8_t chan; /* 0:3 BMC chan, 4:6 reserved, bit 7=0 register alert reciever =1 invalidate */
|
||||||
|
uint8_t dest; /* lan destination */
|
||||||
|
uint8_t string; /* alert string selector */
|
||||||
|
} __attribute__ ((packed));
|
||||||
|
|
||||||
|
/* Node Manager set alert threshold */
|
||||||
|
struct nm_thresh {
|
||||||
|
uint8_t intel_id[3];
|
||||||
|
uint8_t domain; /* 0:3 are domain, 4 = Policy enabled */
|
||||||
|
uint8_t policy_id;
|
||||||
|
uint8_t count;
|
||||||
|
uint16_t thresholds[3];
|
||||||
|
} __attribute__ ((packed));
|
||||||
|
|
||||||
|
/* Node Manager suspend period struct */
|
||||||
|
struct nm_period {
|
||||||
|
uint8_t start;
|
||||||
|
uint8_t stop;
|
||||||
|
uint8_t repeat;
|
||||||
|
} __attribute__ ((packed));
|
||||||
|
|
||||||
|
/* Node Manager set suspend period */
|
||||||
|
struct nm_suspend {
|
||||||
|
uint8_t intel_id[3];
|
||||||
|
uint8_t domain; /* 0:3 are domain, 4 = Policy enabled */
|
||||||
|
uint8_t policy_id;
|
||||||
|
uint8_t count;
|
||||||
|
struct nm_period period[IPMI_NM_SUSPEND_PERIOD_MAX];
|
||||||
|
} __attribute__ ((packed));
|
||||||
|
|
||||||
|
int ipmi_nm_main(struct ipmi_intf * intf, int argc, char ** argv);
|
||||||
#endif /*IPMI_DCMI_H*/
|
#endif /*IPMI_DCMI_H*/
|
@ -72,6 +72,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||||||
|
|
||||||
#define IDRAC_11G 1
|
#define IDRAC_11G 1
|
||||||
#define IDRAC_12G 2
|
#define IDRAC_12G 2
|
||||||
|
#define IDRAC_13G 3
|
||||||
// Return Error code for license
|
// Return Error code for license
|
||||||
#define LICENSE_NOT_SUPPORTED 0x6F
|
#define LICENSE_NOT_SUPPORTED 0x6F
|
||||||
#define VFL_NOT_LICENSED 0x33
|
#define VFL_NOT_LICENSED 0x33
|
||||||
@ -184,6 +185,9 @@ typedef struct _lcd_mode
|
|||||||
#define IMC_IDRAC_12G_MONOLITHIC (uint8_t) (0x10)
|
#define IMC_IDRAC_12G_MONOLITHIC (uint8_t) (0x10)
|
||||||
#define IMC_IDRAC_12G_MODULAR (uint8_t) (0x11)
|
#define IMC_IDRAC_12G_MODULAR (uint8_t) (0x11)
|
||||||
|
|
||||||
|
#define IMC_IDRAC_13G_MONOLITHIC (uint8_t) (0x20)
|
||||||
|
#define IMC_IDRAC_13G_MODULAR (uint8_t) (0x21)
|
||||||
|
#define IMC_IDRAC_13G_DCS (uint8_t) (0x22)
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
@ -63,6 +63,8 @@ enum {
|
|||||||
struct fru_info {
|
struct fru_info {
|
||||||
uint16_t size;
|
uint16_t size;
|
||||||
uint8_t access:1;
|
uint8_t access:1;
|
||||||
|
uint8_t max_read_size;
|
||||||
|
uint8_t max_write_size;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef HAVE_PRAGMA_PACK
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
@ -70,13 +72,16 @@ struct fru_info {
|
|||||||
#endif
|
#endif
|
||||||
struct fru_header {
|
struct fru_header {
|
||||||
uint8_t version;
|
uint8_t version;
|
||||||
struct {
|
union {
|
||||||
uint8_t internal;
|
struct {
|
||||||
uint8_t chassis;
|
uint8_t internal;
|
||||||
uint8_t board;
|
uint8_t chassis;
|
||||||
uint8_t product;
|
uint8_t board;
|
||||||
uint8_t multi;
|
uint8_t product;
|
||||||
} offset;
|
uint8_t multi;
|
||||||
|
} offset;
|
||||||
|
uint8_t offsets[5];
|
||||||
|
};
|
||||||
uint8_t pad;
|
uint8_t pad;
|
||||||
uint8_t checksum;
|
uint8_t checksum;
|
||||||
}ATTRIBUTE_PACKING;
|
}ATTRIBUTE_PACKING;
|
||||||
@ -598,6 +603,20 @@ static const char * chassis_type_desc[] __attribute__((unused)) = {
|
|||||||
"AdvancedTCA", "Blade", "Blade Enclosure"
|
"AdvancedTCA", "Blade", "Blade Enclosure"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
typedef struct ipmi_fru_bloc {
|
||||||
|
struct ipmi_fru_bloc * next;
|
||||||
|
uint16_t start;
|
||||||
|
uint16_t size;
|
||||||
|
uint8_t blocId[32];
|
||||||
|
} t_ipmi_fru_bloc;
|
||||||
|
|
||||||
|
static const char *section_id[4] = {
|
||||||
|
"Internal Use Section",
|
||||||
|
"Chassis Section",
|
||||||
|
"Board Section",
|
||||||
|
"Product Section"
|
||||||
|
};
|
||||||
|
|
||||||
int ipmi_fru_main(struct ipmi_intf *intf, int argc, char **argv);
|
int ipmi_fru_main(struct ipmi_intf *intf, int argc, char **argv);
|
||||||
int ipmi_fru_print(struct ipmi_intf *intf, struct sdr_record_fru_locator *fru);
|
int ipmi_fru_print(struct ipmi_intf *intf, struct sdr_record_fru_locator *fru);
|
||||||
|
|
243
include/ipmitool/ipmi_fwum.h
Normal file
243
include/ipmitool/ipmi_fwum.h
Normal file
@ -0,0 +1,243 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
|
*
|
||||||
|
* Redistribution of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* Redistribution in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
*
|
||||||
|
* Neither the name of Sun Microsystems, Inc. or the names of
|
||||||
|
* contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* This software is provided "AS IS," without a warranty of any kind.
|
||||||
|
* ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
|
||||||
|
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
|
||||||
|
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
|
||||||
|
* SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE
|
||||||
|
* FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
|
||||||
|
* OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL
|
||||||
|
* SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
|
||||||
|
* OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR
|
||||||
|
* PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF
|
||||||
|
* LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
|
||||||
|
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef IPMI_KFWUM_H
|
||||||
|
# define IPMI_KFWUM_H
|
||||||
|
|
||||||
|
#include <inttypes.h>
|
||||||
|
#include <ipmitool/ipmi.h>
|
||||||
|
|
||||||
|
/* KFWUM Version */
|
||||||
|
# define VER_MAJOR 1
|
||||||
|
# define VER_MINOR 3
|
||||||
|
/* Minimum size (IPMB/IOL/old protocol) */
|
||||||
|
# define KFWUM_SMALL_BUFFER 32
|
||||||
|
/* Maximum size on KCS interface */
|
||||||
|
# define KFWUM_BIG_BUFFER 32
|
||||||
|
# define MAX_BUFFER_SIZE 1024*16
|
||||||
|
|
||||||
|
/* 3 address + 1 size + 1 checksum + 1 command */
|
||||||
|
# define KFWUM_OLD_CMD_OVERHEAD 6
|
||||||
|
/* 1 sequence + 1 size + 1 checksum + 1 command */
|
||||||
|
# define KFWUM_NEW_CMD_OVERHEAD 4
|
||||||
|
# define KFWUM_PAGE_SIZE 256
|
||||||
|
|
||||||
|
# define FWUM_SAVE_FIRMWARE_NO_RESPONSE_LIMIT 6
|
||||||
|
# define FWUM_MAX_UPLOAD_RETRY 6
|
||||||
|
|
||||||
|
# define TRACE_LOG_CHUNK_COUNT 7
|
||||||
|
# define TRACE_LOG_CHUNK_SIZE 7
|
||||||
|
# define TRACE_LOG_ATT_COUNT 3
|
||||||
|
|
||||||
|
# define IN_FIRMWARE_INFO_OFFSET_LOCATION 0x5a0
|
||||||
|
# define IN_FIRMWARE_INFO_SIZE 20
|
||||||
|
# define IN_FIRMWARE_INFO_OFFSET_FILE_SIZE 0
|
||||||
|
# define IN_FIRMWARE_INFO_OFFSET_CHECKSUM 4
|
||||||
|
# define IN_FIRMWARE_INFO_OFFSET_BOARD_ID 6
|
||||||
|
# define IN_FIRMWARE_INFO_OFFSET_DEVICE_ID 8
|
||||||
|
# define IN_FIRMWARE_INFO_OFFSET_TABLE_VERSION 9
|
||||||
|
# define IN_FIRMWARE_INFO_OFFSET_IMPLEMENT_REV 10
|
||||||
|
# define IN_FIRMWARE_INFO_OFFSET_VER_MAJOROR 11
|
||||||
|
# define IN_FIRMWARE_INFO_OFFSET_VER_MINORSUB 12
|
||||||
|
# define IN_FIRMWARE_INFO_OFFSET_SDR_REV 13
|
||||||
|
# define IN_FIRMWARE_INFO_OFFSET_IANA0 14
|
||||||
|
# define IN_FIRMWARE_INFO_OFFSET_IANA1 15
|
||||||
|
# define IN_FIRMWARE_INFO_OFFSET_IANA2 16
|
||||||
|
|
||||||
|
# define KWUM_GET_BYTE_AT_OFFSET(pBuffer,os) pBuffer[os]
|
||||||
|
|
||||||
|
int ipmi_fwum_main(struct ipmi_intf *, int, char **);
|
||||||
|
|
||||||
|
typedef enum eKFWUM_BoardList
|
||||||
|
{
|
||||||
|
KFWUM_BOARD_KONTRON_UNKNOWN = 0,
|
||||||
|
KFWUM_BOARD_KONTRON_5002 = 5002,
|
||||||
|
} tKFWUM_BoardList;
|
||||||
|
|
||||||
|
typedef struct sKFWUM_BoardInfo
|
||||||
|
{
|
||||||
|
tKFWUM_BoardList boardId;
|
||||||
|
IPMI_OEM iana;
|
||||||
|
} tKFWUM_BoardInfo;
|
||||||
|
|
||||||
|
typedef enum eKFWUM_DownloadType
|
||||||
|
{
|
||||||
|
KFWUM_DOWNLOAD_TYPE_ADDRESS = 0,
|
||||||
|
KFWUM_DOWNLOAD_TYPE_SEQUENCE,
|
||||||
|
} tKFWUM_DownloadType;
|
||||||
|
|
||||||
|
typedef enum eKFWUM_DownloadBuffferType
|
||||||
|
{
|
||||||
|
KFWUM_SMALL_BUFFER_TYPE = 0,
|
||||||
|
KFUMW_BIG_BUFFER_TYPE
|
||||||
|
} tKFWUM_DownloadBuffferType;
|
||||||
|
|
||||||
|
typedef struct sKFWUM_InFirmwareInfo
|
||||||
|
{
|
||||||
|
unsigned long fileSize;
|
||||||
|
unsigned short checksum;
|
||||||
|
unsigned short sumToRemoveFromChecksum;
|
||||||
|
/* Since the checksum is added in the bin
|
||||||
|
* after the checksum is calculated, we
|
||||||
|
* need to remove the each byte value. This
|
||||||
|
* byte will contain the addition of both bytes
|
||||||
|
*/
|
||||||
|
tKFWUM_BoardList boardId;
|
||||||
|
unsigned char deviceId;
|
||||||
|
unsigned char tableVers;
|
||||||
|
unsigned char implRev;
|
||||||
|
unsigned char versMajor;
|
||||||
|
unsigned char versMinor;
|
||||||
|
unsigned char versSubMinor;
|
||||||
|
unsigned char sdrRev;
|
||||||
|
IPMI_OEM iana;
|
||||||
|
} tKFWUM_InFirmwareInfo;
|
||||||
|
|
||||||
|
typedef struct sKFWUM_SaveFirmwareInfo
|
||||||
|
{
|
||||||
|
tKFWUM_DownloadType downloadType;
|
||||||
|
unsigned char bufferSize;
|
||||||
|
unsigned char overheadSize;
|
||||||
|
} tKFWUM_SaveFirmwareInfo;
|
||||||
|
|
||||||
|
/* COMMANDS */
|
||||||
|
# ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
# endif
|
||||||
|
struct KfwumGetInfoResp {
|
||||||
|
unsigned char protocolRevision;
|
||||||
|
unsigned char controllerDeviceId;
|
||||||
|
struct {
|
||||||
|
unsigned char mode:1;
|
||||||
|
unsigned char seqAdd:1;
|
||||||
|
unsigned char res : 6;
|
||||||
|
} byte;
|
||||||
|
unsigned char firmRev1;
|
||||||
|
unsigned char firmRev2;
|
||||||
|
unsigned char numBank;
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
# ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
# endif
|
||||||
|
struct KfwumGetStatusResp {
|
||||||
|
unsigned char bankState;
|
||||||
|
unsigned char firmLengthLSB;
|
||||||
|
unsigned char firmLengthMid;
|
||||||
|
unsigned char firmLengthMSB;
|
||||||
|
unsigned char firmRev1;
|
||||||
|
unsigned char firmRev2;
|
||||||
|
unsigned char firmRev3;
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
# ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
# endif
|
||||||
|
struct KfwumManualRollbackReq {
|
||||||
|
unsigned char type;
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
# ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
# endif
|
||||||
|
struct KfwumStartFirmwareDownloadReq {
|
||||||
|
unsigned char lengthLSB;
|
||||||
|
unsigned char lengthMid;
|
||||||
|
unsigned char lengthMSB;
|
||||||
|
unsigned char paddingLSB;
|
||||||
|
unsigned char paddingMSB;
|
||||||
|
unsigned char useSequence;
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
# ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
# endif
|
||||||
|
struct KfwumStartFirmwareDownloadResp {
|
||||||
|
unsigned char bank;
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
# ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
# endif
|
||||||
|
struct KfwumSaveFirmwareAddressReq
|
||||||
|
{
|
||||||
|
unsigned char addressLSB;
|
||||||
|
unsigned char addressMid;
|
||||||
|
unsigned char addressMSB;
|
||||||
|
unsigned char numBytes;
|
||||||
|
unsigned char txBuf[KFWUM_SMALL_BUFFER-KFWUM_OLD_CMD_OVERHEAD];
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
# ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
# endif
|
||||||
|
struct KfwumSaveFirmwareSequenceReq
|
||||||
|
{
|
||||||
|
unsigned char sequenceNumber;
|
||||||
|
unsigned char txBuf[KFWUM_BIG_BUFFER];
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
# ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
# endif
|
||||||
|
struct KfwumFinishFirmwareDownloadReq {
|
||||||
|
unsigned char versionMaj;
|
||||||
|
unsigned char versionMinSub;
|
||||||
|
unsigned char versionSdr;
|
||||||
|
unsigned char reserved;
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
# ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
# endif
|
||||||
|
|
||||||
|
#endif /* IPMI_KFWUM_H */
|
809
include/ipmitool/ipmi_hpmfwupg.h
Normal file
809
include/ipmitool/ipmi_hpmfwupg.h
Normal file
@ -0,0 +1,809 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
|
*
|
||||||
|
* Redistribution of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* Redistribution in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
*
|
||||||
|
* Neither the name of Sun Microsystems, Inc. or the names of
|
||||||
|
* contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* This software is provided "AS IS," without a warranty of any kind.
|
||||||
|
* ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
|
||||||
|
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
|
||||||
|
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
|
||||||
|
* SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE
|
||||||
|
* FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
|
||||||
|
* OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL
|
||||||
|
* SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
|
||||||
|
* OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR
|
||||||
|
* PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF
|
||||||
|
* LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
|
||||||
|
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef IPMI_HPMFWUPG_H
|
||||||
|
#define IPMI_HPMFWUPG_H
|
||||||
|
|
||||||
|
#include <inttypes.h>
|
||||||
|
#include <ipmitool/ipmi.h>
|
||||||
|
|
||||||
|
int ipmi_hpmfwupg_main(struct ipmi_intf *, int, char **);
|
||||||
|
|
||||||
|
/* Agent version */
|
||||||
|
#define HPMFWUPG_VERSION_MAJOR 1
|
||||||
|
#define HPMFWUPG_VERSION_MINOR 0
|
||||||
|
#define HPMFWUPG_VERSION_SUBMINOR 9
|
||||||
|
|
||||||
|
/* HPM.1 FIRMWARE UPGRADE COMMANDS (part of PICMG) */
|
||||||
|
#define HPMFWUPG_GET_TARGET_UPG_CAPABILITIES 0x2E
|
||||||
|
#define HPMFWUPG_GET_COMPONENT_PROPERTIES 0x2F
|
||||||
|
#define HPMFWUPG_ABORT_UPGRADE 0x30
|
||||||
|
#define HPMFWUPG_INITIATE_UPGRADE_ACTION 0x31
|
||||||
|
#define HPMFWUPG_UPLOAD_FIRMWARE_BLOCK 0x32
|
||||||
|
#define HPMFWUPG_FINISH_FIRMWARE_UPLOAD 0x33
|
||||||
|
#define HPMFWUPG_GET_UPGRADE_STATUS 0x34
|
||||||
|
#define HPMFWUPG_ACTIVATE_FIRMWARE 0x35
|
||||||
|
#define HPMFWUPG_QUERY_SELFTEST_RESULT 0x36
|
||||||
|
#define HPMFWUPG_QUERY_ROLLBACK_STATUS 0x37
|
||||||
|
#define HPMFWUPG_MANUAL_FIRMWARE_ROLLBACK 0x38
|
||||||
|
|
||||||
|
/* HPM.1 SPECIFIC COMPLETION CODES */
|
||||||
|
#define HPMFWUPG_ROLLBACK_COMPLETED 0x00
|
||||||
|
#define HPMFWUPG_COMMAND_IN_PROGRESS 0x80
|
||||||
|
#define HPMFWUPG_NOT_SUPPORTED 0x81
|
||||||
|
#define HPMFWUPG_SIZE_MISMATCH 0x81
|
||||||
|
#define HPMFWUPG_ROLLBACK_FAILURE 0x81
|
||||||
|
#define HPMFWUPG_INV_COMP_MASK 0x81
|
||||||
|
#define HPMFWUPG__ABORT_FAILURE 0x81
|
||||||
|
#define HPMFWUPG_INV_COMP_ID 0x82
|
||||||
|
#define HPMFWUPG_INT_CHECKSUM_ERROR 0x82
|
||||||
|
#define HPMFWUPG_INV_UPLOAD_MODE 0x82
|
||||||
|
#define HPMFWUPG_ROLLBACK_OVERRIDE 0x82
|
||||||
|
#define HPMFWUPG_INV_COMP_PROP 0x83
|
||||||
|
#define HPMFWUPG_FW_MISMATCH 0x83
|
||||||
|
#define HPMFWUPG_ROLLBACK_DENIED 0x83
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This error code is used as a temporary PATCH to
|
||||||
|
* the latest Open ipmi driver. This PATCH
|
||||||
|
* will be removed once a new Open IPMI driver is released.
|
||||||
|
* (Buggy version = 39)
|
||||||
|
*/
|
||||||
|
#define ENABLE_OPENIPMI_V39_PATCH
|
||||||
|
|
||||||
|
#ifdef ENABLE_OPENIPMI_V39_PATCH
|
||||||
|
# define RETRY_COUNT_MAX 3
|
||||||
|
static int errorCount;
|
||||||
|
# define HPMFWUPG_IS_RETRYABLE(error) \
|
||||||
|
((((error==0x83)||(error==0x82)||(error==0x80)) && (errorCount++<RETRY_COUNT_MAX))?TRUE:FALSE)
|
||||||
|
#else
|
||||||
|
# define HPMFWUPG_IS_RETRYABLE(error) FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* HPM FIRMWARE UPGRADE GENERAL DEFINITIONS */
|
||||||
|
#define HPMFWUPG_PICMG_IDENTIFIER 0
|
||||||
|
#define HPMFWUPG_VERSION_SIZE 6
|
||||||
|
#define HPMFWUPG_DESC_STRING_LENGTH 12
|
||||||
|
#define HPMFWUPG_DEFAULT_INACCESS_TIMEOUT 60 /* sec */
|
||||||
|
#define HPMFWUPG_DEFAULT_UPGRADE_TIMEOUT 60 /* sec */
|
||||||
|
#define HPMFWUPG_MD5_SIGNATURE_LENGTH 16
|
||||||
|
|
||||||
|
/* Component IDs */
|
||||||
|
typedef enum eHpmfwupgComponentId {
|
||||||
|
HPMFWUPG_COMPONENT_ID_0 = 0,
|
||||||
|
HPMFWUPG_COMPONENT_ID_1,
|
||||||
|
HPMFWUPG_COMPONENT_ID_2,
|
||||||
|
HPMFWUPG_COMPONENT_ID_3,
|
||||||
|
HPMFWUPG_COMPONENT_ID_4,
|
||||||
|
HPMFWUPG_COMPONENT_ID_5,
|
||||||
|
HPMFWUPG_COMPONENT_ID_6,
|
||||||
|
HPMFWUPG_COMPONENT_ID_7,
|
||||||
|
HPMFWUPG_COMPONENT_ID_MAX
|
||||||
|
} tHpmfwupgComponentId;
|
||||||
|
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
#endif
|
||||||
|
struct HpmfwupgComponentBitMask {
|
||||||
|
union {
|
||||||
|
unsigned char byte;
|
||||||
|
struct {
|
||||||
|
#ifdef WORDS_BIGENDIAN
|
||||||
|
unsigned char component7 : 1;
|
||||||
|
unsigned char component6 : 1;
|
||||||
|
unsigned char component5 : 1;
|
||||||
|
unsigned char component4 : 1;
|
||||||
|
unsigned char component3 : 1;
|
||||||
|
unsigned char component2 : 1;
|
||||||
|
unsigned char component1 : 1;
|
||||||
|
unsigned char component0 : 1;
|
||||||
|
#else
|
||||||
|
unsigned char component0 : 1;
|
||||||
|
unsigned char component1 : 1;
|
||||||
|
unsigned char component2 : 1;
|
||||||
|
unsigned char component3 : 1;
|
||||||
|
unsigned char component4 : 1;
|
||||||
|
unsigned char component5 : 1;
|
||||||
|
unsigned char component6 : 1;
|
||||||
|
unsigned char component7 : 1;
|
||||||
|
#endif
|
||||||
|
} ATTRIBUTE_PACKING bitField;
|
||||||
|
} ATTRIBUTE_PACKING ComponentBits;
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
static const int HPMFWUPG_SUCCESS = 0;
|
||||||
|
static const int HPMFWUPG_ERROR = -1;
|
||||||
|
/* Upload firmware specific error codes */
|
||||||
|
static const int HPMFWUPG_UPLOAD_BLOCK_LENGTH = 1;
|
||||||
|
static const int HPMFWUPG_UPLOAD_RETRY = 2;
|
||||||
|
|
||||||
|
|
||||||
|
/* TARGET UPGRADE CAPABILITIES DEFINITIONS */
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
#endif
|
||||||
|
struct HpmfwupgGetTargetUpgCapabilitiesReq {
|
||||||
|
unsigned char picmgId;
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
#endif
|
||||||
|
struct HpmfwupgGetTargetUpgCapabilitiesResp {
|
||||||
|
unsigned char picmgId;
|
||||||
|
unsigned char hpmVersion;
|
||||||
|
union {
|
||||||
|
unsigned char byte;
|
||||||
|
struct {
|
||||||
|
#if WORDS_BIGENDIAN
|
||||||
|
unsigned char fwUpgUndesirable : 1;
|
||||||
|
unsigned char autRollbackOverride : 1;
|
||||||
|
unsigned char ipmcDegradedDurinUpg: 1;
|
||||||
|
unsigned char deferActivation : 1;
|
||||||
|
unsigned char servAffectDuringUpg : 1;
|
||||||
|
unsigned char manualRollback : 1;
|
||||||
|
unsigned char autRollback : 1;
|
||||||
|
unsigned char ipmcSelftestCap : 1;
|
||||||
|
#else
|
||||||
|
unsigned char ipmcSelftestCap : 1;
|
||||||
|
unsigned char autRollback : 1;
|
||||||
|
unsigned char manualRollback : 1;
|
||||||
|
unsigned char servAffectDuringUpg : 1;
|
||||||
|
unsigned char deferActivation : 1;
|
||||||
|
unsigned char ipmcDegradedDurinUpg: 1;
|
||||||
|
unsigned char autRollbackOverride : 1;
|
||||||
|
unsigned char fwUpgUndesirable : 1;
|
||||||
|
#endif
|
||||||
|
} ATTRIBUTE_PACKING bitField;
|
||||||
|
} ATTRIBUTE_PACKING GlobalCapabilities;
|
||||||
|
unsigned char upgradeTimeout;
|
||||||
|
unsigned char selftestTimeout;
|
||||||
|
unsigned char rollbackTimeout;
|
||||||
|
unsigned char inaccessTimeout;
|
||||||
|
struct HpmfwupgComponentBitMask componentsPresent;
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
#endif
|
||||||
|
struct HpmfwupgGetTargetUpgCapabilitiesCtx {
|
||||||
|
struct HpmfwupgGetTargetUpgCapabilitiesReq req;
|
||||||
|
struct HpmfwupgGetTargetUpgCapabilitiesResp resp;
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* COMPONENT PROPERTIES DEFINITIONS */
|
||||||
|
typedef enum eHpmfwupgCompPropertiesSelect {
|
||||||
|
HPMFWUPG_COMP_GEN_PROPERTIES = 0,
|
||||||
|
HPMFWUPG_COMP_CURRENT_VERSION,
|
||||||
|
HPMFWUPG_COMP_DESCRIPTION_STRING,
|
||||||
|
HPMFWUPG_COMP_ROLLBACK_FIRMWARE_VERSION,
|
||||||
|
HPMFWUPG_COMP_DEFERRED_FIRMWARE_VERSION,
|
||||||
|
HPMFWUPG_COMP_RESERVED,
|
||||||
|
HPMFWUPG_COMP_OEM_PROPERTIES = 192
|
||||||
|
} tHpmfwupgCompPropertiesSelect;
|
||||||
|
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
#endif
|
||||||
|
struct HpmfwupgGetComponentPropertiesReq {
|
||||||
|
unsigned char picmgId;
|
||||||
|
unsigned char componentId;
|
||||||
|
unsigned char selector;
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
#endif
|
||||||
|
struct HpmfwupgGetGeneralPropResp {
|
||||||
|
unsigned char picmgId;
|
||||||
|
union {
|
||||||
|
unsigned char byte;
|
||||||
|
struct {
|
||||||
|
#if WORDS_BIGENDIAN
|
||||||
|
unsigned char reserved : 2;
|
||||||
|
unsigned char payloadColdReset : 1;
|
||||||
|
unsigned char deferredActivation : 1;
|
||||||
|
unsigned char comparisonSupport : 1;
|
||||||
|
unsigned char preparationSupport : 1;
|
||||||
|
unsigned char rollbackBackup : 2;
|
||||||
|
#else
|
||||||
|
unsigned char rollbackBackup : 2;
|
||||||
|
unsigned char preparationSupport : 1;
|
||||||
|
unsigned char comparisonSupport : 1;
|
||||||
|
unsigned char deferredActivation : 1;
|
||||||
|
unsigned char payloadColdReset : 1;
|
||||||
|
unsigned char reserved : 2;
|
||||||
|
#endif
|
||||||
|
} ATTRIBUTE_PACKING bitfield;
|
||||||
|
} ATTRIBUTE_PACKING GeneralCompProperties;
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
#endif
|
||||||
|
struct HpmfwupgGetCurrentVersionResp {
|
||||||
|
unsigned char picmgId;
|
||||||
|
unsigned char currentVersion[HPMFWUPG_VERSION_SIZE];
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
#endif
|
||||||
|
struct HpmfwupgGetDescStringResp {
|
||||||
|
unsigned char picmgId;
|
||||||
|
char descString[HPMFWUPG_DESC_STRING_LENGTH];
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
#endif
|
||||||
|
struct HpmfwupgGetRollbackFwVersionResp {
|
||||||
|
unsigned char picmgId;
|
||||||
|
unsigned char rollbackFwVersion[HPMFWUPG_VERSION_SIZE];
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
#endif
|
||||||
|
struct HpmfwupgGetDeferredFwVersionResp {
|
||||||
|
unsigned char picmgId;
|
||||||
|
unsigned char deferredFwVersion[HPMFWUPG_VERSION_SIZE];
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* GetComponentProperties - OEM properties (192) */
|
||||||
|
#define HPMFWUPG_OEM_LENGTH 4
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
#endif
|
||||||
|
struct HpmfwupgGetOemProperties {
|
||||||
|
unsigned char picmgId;
|
||||||
|
unsigned char oemRspData[HPMFWUPG_OEM_LENGTH];
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
#endif
|
||||||
|
struct HpmfwupgGetComponentPropertiesResp {
|
||||||
|
union {
|
||||||
|
struct HpmfwupgGetGeneralPropResp generalPropResp;
|
||||||
|
struct HpmfwupgGetCurrentVersionResp currentVersionResp;
|
||||||
|
struct HpmfwupgGetDescStringResp descStringResp;
|
||||||
|
struct HpmfwupgGetRollbackFwVersionResp rollbackFwVersionResp;
|
||||||
|
struct HpmfwupgGetDeferredFwVersionResp deferredFwVersionResp;
|
||||||
|
struct HpmfwupgGetOemProperties oemProperties;
|
||||||
|
} ATTRIBUTE_PACKING Response;
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
#endif
|
||||||
|
struct HpmfwupgGetComponentPropertiesCtx {
|
||||||
|
struct HpmfwupgGetComponentPropertiesReq req;
|
||||||
|
struct HpmfwupgGetComponentPropertiesResp resp;
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* ABORT UPGRADE DEFINITIONS */
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
#endif
|
||||||
|
struct HpmfwupgAbortUpgradeReq {
|
||||||
|
unsigned char picmgId;
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
#endif
|
||||||
|
struct HpmfwupgAbortUpgradeResp {
|
||||||
|
unsigned char picmgId;
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
#endif
|
||||||
|
struct HpmfwupgAbortUpgradeCtx {
|
||||||
|
struct HpmfwupgAbortUpgradeReq req;
|
||||||
|
struct HpmfwupgAbortUpgradeResp resp;
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* UPGRADE ACTIONS DEFINITIONS */
|
||||||
|
typedef enum eHpmfwupgUpgradeAction {
|
||||||
|
HPMFWUPG_UPGRADE_ACTION_BACKUP = 0,
|
||||||
|
HPMFWUPG_UPGRADE_ACTION_PREPARE,
|
||||||
|
HPMFWUPG_UPGRADE_ACTION_UPGRADE,
|
||||||
|
HPMFWUPG_UPGRADE_ACTION_COMPARE,
|
||||||
|
HPMFWUPG_UPGRADE_ACTION_INVALID = 0xff
|
||||||
|
} tHpmfwupgUpgradeAction;
|
||||||
|
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
#endif
|
||||||
|
struct HpmfwupgInitiateUpgradeActionReq {
|
||||||
|
unsigned char picmgId;
|
||||||
|
struct HpmfwupgComponentBitMask componentsMask;
|
||||||
|
unsigned char upgradeAction;
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
#endif
|
||||||
|
struct HpmfwupgInitiateUpgradeActionResp {
|
||||||
|
unsigned char picmgId;
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
#endif
|
||||||
|
struct HpmfwupgInitiateUpgradeActionCtx {
|
||||||
|
struct HpmfwupgInitiateUpgradeActionReq req;
|
||||||
|
struct HpmfwupgInitiateUpgradeActionResp resp;
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* UPLOAD FIRMWARE BLOCK DEFINITIONS */
|
||||||
|
#define HPMFWUPG_SEND_DATA_COUNT_KCS 30
|
||||||
|
#define HPMFWUPG_SEND_DATA_COUNT_LAN 25
|
||||||
|
#define HPMFWUPG_SEND_DATA_COUNT_IPMB 26
|
||||||
|
#define HPMFWUPG_SEND_DATA_COUNT_IPMBL 26
|
||||||
|
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
#endif
|
||||||
|
struct HpmfwupgUploadFirmwareBlockReq {
|
||||||
|
unsigned char picmgId;
|
||||||
|
unsigned char blockNumber;
|
||||||
|
unsigned char data[0];
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
#endif
|
||||||
|
struct HpmfwupgUploadFirmwareBlockResp {
|
||||||
|
unsigned char picmgId;
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
#endif
|
||||||
|
struct HpmfwupgUploadFirmwareBlockCtx {
|
||||||
|
struct HpmfwupgUploadFirmwareBlockReq * req;
|
||||||
|
struct HpmfwupgUploadFirmwareBlockResp resp;
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* FINISH FIRMWARE UPLOAD DEFINITIONS */
|
||||||
|
#define HPMFWUPG_IMAGE_SIZE_BYTE_COUNT 4
|
||||||
|
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
#endif
|
||||||
|
struct HpmfwupgFinishFirmwareUploadReq {
|
||||||
|
unsigned char picmgId;
|
||||||
|
unsigned char componentId;
|
||||||
|
unsigned char imageLength[HPMFWUPG_IMAGE_SIZE_BYTE_COUNT];
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
#endif
|
||||||
|
struct HpmfwupgFinishFirmwareUploadResp {
|
||||||
|
unsigned char picmgId;
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
#endif
|
||||||
|
struct HpmfwupgFinishFirmwareUploadCtx {
|
||||||
|
struct HpmfwupgFinishFirmwareUploadReq req;
|
||||||
|
struct HpmfwupgFinishFirmwareUploadResp resp;
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* ACTIVATE FW DEFINITIONS */
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
#endif
|
||||||
|
struct HpmfwupgActivateFirmwareReq {
|
||||||
|
unsigned char picmgId;
|
||||||
|
unsigned char rollback_override;
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
#endif
|
||||||
|
struct HpmfwupgActivateFirmwareResp {
|
||||||
|
unsigned char picmgId;
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
#endif
|
||||||
|
struct HpmfwupgActivateFirmwareCtx {
|
||||||
|
struct HpmfwupgActivateFirmwareReq req;
|
||||||
|
struct HpmfwupgActivateFirmwareResp resp;
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* GET UPGRADE STATUS DEFINITIONS */
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
#endif
|
||||||
|
struct HpmfwupgGetUpgradeStatusReq {
|
||||||
|
unsigned char picmgId;
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
#endif
|
||||||
|
struct HpmfwupgGetUpgradeStatusResp {
|
||||||
|
unsigned char picmgId;
|
||||||
|
unsigned char cmdInProcess;
|
||||||
|
unsigned char lastCmdCompCode;
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
#endif
|
||||||
|
struct HpmfwupgGetUpgradeStatusCtx {
|
||||||
|
struct HpmfwupgGetUpgradeStatusReq req;
|
||||||
|
struct HpmfwupgGetUpgradeStatusResp resp;
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* MANUAL FW ROLLBACK DEFINITIONS */
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
#endif
|
||||||
|
struct HpmfwupgManualFirmwareRollbackReq {
|
||||||
|
unsigned char picmgId;
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
#endif
|
||||||
|
struct HpmfwupgManualFirmwareRollbackResp {
|
||||||
|
unsigned char picmgId;
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
#endif
|
||||||
|
struct HpmfwupgManualFirmwareRollbackCtx {
|
||||||
|
struct HpmfwupgManualFirmwareRollbackReq req;
|
||||||
|
struct HpmfwupgManualFirmwareRollbackResp resp;
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* QUERY ROLLBACK STATUS DEFINITIONS */
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
#endif
|
||||||
|
struct HpmfwupgQueryRollbackStatusReq {
|
||||||
|
unsigned char picmgId;
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
#endif
|
||||||
|
struct HpmfwupgQueryRollbackStatusResp {
|
||||||
|
unsigned char picmgId;
|
||||||
|
struct HpmfwupgComponentBitMask rollbackComp;
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
#endif
|
||||||
|
struct HpmfwupgQueryRollbackStatusCtx {
|
||||||
|
struct HpmfwupgQueryRollbackStatusReq req;
|
||||||
|
struct HpmfwupgQueryRollbackStatusResp resp;
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* QUERY SELF TEST RESULT DEFINITIONS */
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
#endif
|
||||||
|
struct HpmfwupgQuerySelftestResultReq {
|
||||||
|
unsigned char picmgId;
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
#endif
|
||||||
|
struct HpmfwupgQuerySelftestResultResp {
|
||||||
|
unsigned char picmgId;
|
||||||
|
unsigned char result1;
|
||||||
|
unsigned char result2;
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
#endif
|
||||||
|
struct HpmfwupgQuerySelftestResultCtx {
|
||||||
|
struct HpmfwupgQuerySelftestResultReq req;
|
||||||
|
struct HpmfwupgQuerySelftestResultResp resp;
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* HPM.1 IMAGE DEFINITIONS */
|
||||||
|
#define HPMFWUPG_HEADER_SIGNATURE_LENGTH 8
|
||||||
|
#define HPMFWUPG_MANUFATURER_ID_LENGTH 3
|
||||||
|
#define HPMFWUPG_PRODUCT_ID_LENGTH 2
|
||||||
|
#define HPMFWUPG_TIME_LENGTH 4
|
||||||
|
#define HPMFWUPG_TIMEOUT_LENGTH 1
|
||||||
|
#define HPMFWUPG_COMP_REVISION_LENGTH 2
|
||||||
|
#define HPMFWUPG_FIRM_REVISION_LENGTH 6
|
||||||
|
#define HPMFWUPG_IMAGE_HEADER_VERSION 0
|
||||||
|
#define HPMFWUPG_IMAGE_SIGNATURE "PICMGFWU"
|
||||||
|
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
#pragma pack(1)
|
||||||
|
#endif
|
||||||
|
struct HpmfwupgImageHeader {
|
||||||
|
char signature[HPMFWUPG_HEADER_SIGNATURE_LENGTH];
|
||||||
|
unsigned char formatVersion;
|
||||||
|
unsigned char deviceId;
|
||||||
|
unsigned char manId[HPMFWUPG_MANUFATURER_ID_LENGTH];
|
||||||
|
unsigned char prodId[HPMFWUPG_PRODUCT_ID_LENGTH];
|
||||||
|
unsigned char time[HPMFWUPG_TIME_LENGTH];
|
||||||
|
union {
|
||||||
|
struct {
|
||||||
|
#if WORDS_BIGENDIAN
|
||||||
|
unsigned char imageSelfTest : 1;
|
||||||
|
unsigned char autRollback : 1;
|
||||||
|
unsigned char manRollback : 1;
|
||||||
|
unsigned char servAffected : 1;
|
||||||
|
unsigned char reserved : 4;
|
||||||
|
#else
|
||||||
|
unsigned char reserved : 4;
|
||||||
|
unsigned char servAffected : 1;
|
||||||
|
unsigned char manRollback : 1;
|
||||||
|
unsigned char autRollback : 1;
|
||||||
|
unsigned char imageSelfTest : 1;
|
||||||
|
#endif
|
||||||
|
} ATTRIBUTE_PACKING bitField;
|
||||||
|
unsigned char byte;
|
||||||
|
}ATTRIBUTE_PACKING imageCapabilities;
|
||||||
|
struct HpmfwupgComponentBitMask components;
|
||||||
|
unsigned char selfTestTimeout;
|
||||||
|
unsigned char rollbackTimeout;
|
||||||
|
unsigned char inaccessTimeout;
|
||||||
|
unsigned char compRevision[HPMFWUPG_COMP_REVISION_LENGTH];
|
||||||
|
unsigned char firmRevision[HPMFWUPG_FIRM_REVISION_LENGTH];
|
||||||
|
unsigned short oemDataLength;
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define HPMFWUPG_DESCRIPTION_LENGTH 21
|
||||||
|
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
#endif
|
||||||
|
struct HpmfwupgActionRecord {
|
||||||
|
unsigned char actionType;
|
||||||
|
struct HpmfwupgComponentBitMask components;
|
||||||
|
unsigned char checksum;
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define HPMFWUPG_FIRMWARE_SIZE_LENGTH 4
|
||||||
|
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
#endif
|
||||||
|
struct HpmfwupgFirmwareImage {
|
||||||
|
unsigned char version[HPMFWUPG_FIRM_REVISION_LENGTH];
|
||||||
|
char desc[HPMFWUPG_DESCRIPTION_LENGTH];
|
||||||
|
unsigned char length[HPMFWUPG_FIRMWARE_SIZE_LENGTH];
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(1)
|
||||||
|
#endif
|
||||||
|
struct HpmfwupgUpgradeCtx {
|
||||||
|
struct HpmfwupgComponentBitMask compUpdateMask;
|
||||||
|
unsigned int imageSize;
|
||||||
|
unsigned char* pImageData;
|
||||||
|
unsigned char componentId;
|
||||||
|
struct HpmfwupgGetTargetUpgCapabilitiesResp targetCap;
|
||||||
|
struct HpmfwupgGetGeneralPropResp genCompProp[HPMFWUPG_COMPONENT_ID_MAX];
|
||||||
|
struct ipm_devid_rsp devId;
|
||||||
|
} ATTRIBUTE_PACKING;
|
||||||
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
|
# pragma pack(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef enum eHpmfwupgActionType {
|
||||||
|
HPMFWUPG_ACTION_BACKUP_COMPONENTS = 0,
|
||||||
|
HPMFWUPG_ACTION_PREPARE_COMPONENTS,
|
||||||
|
HPMFWUPG_ACTION_UPLOAD_FIRMWARE,
|
||||||
|
HPMFWUPG_ACTION_RESERVED = 0xFF
|
||||||
|
} tHpmfwupgActionType;
|
||||||
|
|
||||||
|
/* FUNCTIONS PROTOTYPES */
|
||||||
|
#define HPMFWUPG_MAJORMINOR_VERSION_SIZE 2
|
||||||
|
|
||||||
|
/* Options added for user to check the version and to view both the FILE and
|
||||||
|
* TARGET Version
|
||||||
|
*/
|
||||||
|
#define VIEW_MODE 0x01
|
||||||
|
#define DEBUG_MODE 0x02
|
||||||
|
#define FORCE_MODE 0x04
|
||||||
|
#define COMPARE_MODE 0x08
|
||||||
|
|
||||||
|
typedef struct _VERSIONINFO {
|
||||||
|
unsigned char componentId;
|
||||||
|
unsigned char targetMajor;
|
||||||
|
unsigned char targetMinor;
|
||||||
|
unsigned char targetAux[4];
|
||||||
|
unsigned char rollbackMajor;
|
||||||
|
unsigned char rollbackMinor;
|
||||||
|
unsigned char rollbackAux[4];
|
||||||
|
unsigned char deferredMajor;
|
||||||
|
unsigned char deferredMinor;
|
||||||
|
unsigned char deferredAux[4];
|
||||||
|
unsigned char imageMajor;
|
||||||
|
unsigned char imageMinor;
|
||||||
|
unsigned char imageAux[4];
|
||||||
|
unsigned char coldResetRequired;
|
||||||
|
unsigned char rollbackSupported;
|
||||||
|
unsigned char deferredActivationSupported;
|
||||||
|
char descString[HPMFWUPG_DESC_STRING_LENGTH + 1];
|
||||||
|
}VERSIONINFO, *PVERSIONINFO;
|
||||||
|
|
||||||
|
VERSIONINFO gVersionInfo[HPMFWUPG_COMPONENT_ID_MAX];
|
||||||
|
|
||||||
|
#define TARGET_VER (0x01)
|
||||||
|
#define ROLLBACK_VER (0x02)
|
||||||
|
#define IMAGE_VER (0x04)
|
||||||
|
|
||||||
|
#endif /* IPMI_KFWUM_H */
|
@ -62,34 +62,42 @@ enum LANPLUS_SESSION_STATE {
|
|||||||
#define IPMI_SIK_BUFFER_SIZE 20
|
#define IPMI_SIK_BUFFER_SIZE 20
|
||||||
#define IPMI_KG_BUFFER_SIZE 21 /* key plus null byte */
|
#define IPMI_KG_BUFFER_SIZE 21 /* key plus null byte */
|
||||||
|
|
||||||
struct ipmi_session {
|
struct ipmi_session_params {
|
||||||
uint8_t hostname[64];
|
char * hostname;
|
||||||
uint8_t username[17];
|
uint8_t username[17];
|
||||||
uint8_t authcode[IPMI_AUTHCODE_BUFFER_SIZE + 1];
|
uint8_t authcode_set[IPMI_AUTHCODE_BUFFER_SIZE + 1];
|
||||||
uint8_t challenge[16];
|
|
||||||
uint8_t authtype;
|
|
||||||
uint8_t authtype_set;
|
uint8_t authtype_set;
|
||||||
#define IPMI_AUTHSTATUS_PER_MSG_DISABLED 0x10
|
|
||||||
#define IPMI_AUTHSTATUS_PER_USER_DISABLED 0x08
|
|
||||||
#define IPMI_AUTHSTATUS_NONNULL_USERS_ENABLED 0x04
|
|
||||||
#define IPMI_AUTHSTATUS_NULL_USERS_ENABLED 0x02
|
|
||||||
#define IPMI_AUTHSTATUS_ANONYMOUS_USERS_ENABLED 0x01
|
|
||||||
uint8_t authstatus;
|
|
||||||
uint8_t authextra;
|
|
||||||
uint8_t privlvl;
|
uint8_t privlvl;
|
||||||
uint8_t cipher_suite_id;
|
uint8_t cipher_suite_id;
|
||||||
char sol_escape_char;
|
char sol_escape_char;
|
||||||
int password;
|
int password;
|
||||||
int port;
|
int port;
|
||||||
int active;
|
|
||||||
int retry;
|
int retry;
|
||||||
|
uint32_t timeout;
|
||||||
|
uint8_t kg[IPMI_KG_BUFFER_SIZE]; /* BMC key */
|
||||||
|
uint8_t lookupbit;
|
||||||
|
};
|
||||||
|
|
||||||
|
#define IPMI_AUTHSTATUS_PER_MSG_DISABLED 0x10
|
||||||
|
#define IPMI_AUTHSTATUS_PER_USER_DISABLED 0x08
|
||||||
|
#define IPMI_AUTHSTATUS_NONNULL_USERS_ENABLED 0x04
|
||||||
|
#define IPMI_AUTHSTATUS_NULL_USERS_ENABLED 0x02
|
||||||
|
#define IPMI_AUTHSTATUS_ANONYMOUS_USERS_ENABLED 0x01
|
||||||
|
|
||||||
|
struct ipmi_session {
|
||||||
|
int active;
|
||||||
uint32_t session_id;
|
uint32_t session_id;
|
||||||
uint32_t in_seq;
|
uint32_t in_seq;
|
||||||
uint32_t out_seq;
|
uint32_t out_seq;
|
||||||
|
|
||||||
|
uint8_t authcode[IPMI_AUTHCODE_BUFFER_SIZE + 1];
|
||||||
|
uint8_t challenge[16];
|
||||||
|
uint8_t authtype;
|
||||||
|
uint8_t authstatus;
|
||||||
|
uint8_t authextra;
|
||||||
uint32_t timeout;
|
uint32_t timeout;
|
||||||
|
|
||||||
struct sockaddr_in addr;
|
struct sockaddr_storage addr;
|
||||||
socklen_t addrlen;
|
socklen_t addrlen;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -106,7 +114,6 @@ struct ipmi_session {
|
|||||||
uint8_t integrity_alg;
|
uint8_t integrity_alg;
|
||||||
uint8_t crypt_alg;
|
uint8_t crypt_alg;
|
||||||
uint8_t max_priv_level;
|
uint8_t max_priv_level;
|
||||||
uint8_t lookupbit;
|
|
||||||
|
|
||||||
uint32_t console_id;
|
uint32_t console_id;
|
||||||
uint32_t bmc_id;
|
uint32_t bmc_id;
|
||||||
@ -167,8 +174,11 @@ struct ipmi_intf {
|
|||||||
int abort;
|
int abort;
|
||||||
int noanswer;
|
int noanswer;
|
||||||
int picmg_avail;
|
int picmg_avail;
|
||||||
|
int vita_avail;
|
||||||
IPMI_OEM manufacturer_id;
|
IPMI_OEM manufacturer_id;
|
||||||
|
int ai_family;
|
||||||
|
|
||||||
|
struct ipmi_session_params ssn_params;
|
||||||
struct ipmi_session * session;
|
struct ipmi_session * session;
|
||||||
struct ipmi_oem_handle * oem;
|
struct ipmi_oem_handle * oem;
|
||||||
struct ipmi_cmd * cmdlist;
|
struct ipmi_cmd * cmdlist;
|
||||||
@ -179,7 +189,8 @@ struct ipmi_intf {
|
|||||||
uint8_t target_channel;
|
uint8_t target_channel;
|
||||||
uint32_t transit_addr;
|
uint32_t transit_addr;
|
||||||
uint8_t transit_channel;
|
uint8_t transit_channel;
|
||||||
uint8_t channel_buf_size;
|
uint16_t max_request_data_size;
|
||||||
|
uint16_t max_response_data_size;
|
||||||
|
|
||||||
uint8_t devnum;
|
uint8_t devnum;
|
||||||
|
|
||||||
@ -192,6 +203,8 @@ struct ipmi_intf {
|
|||||||
struct ipmi_rs *(*send_sol)(struct ipmi_intf * intf, struct ipmi_v2_payload * payload);
|
struct ipmi_rs *(*send_sol)(struct ipmi_intf * intf, struct ipmi_v2_payload * payload);
|
||||||
int (*keepalive)(struct ipmi_intf * intf);
|
int (*keepalive)(struct ipmi_intf * intf);
|
||||||
int (*set_my_addr)(struct ipmi_intf * intf, uint8_t addr);
|
int (*set_my_addr)(struct ipmi_intf * intf, uint8_t addr);
|
||||||
|
void (*set_max_request_data_size)(struct ipmi_intf * intf, uint16_t size);
|
||||||
|
void (*set_max_response_data_size)(struct ipmi_intf * intf, uint16_t size);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ipmi_intf * ipmi_intf_load(char * name);
|
struct ipmi_intf * ipmi_intf_load(char * name);
|
||||||
@ -209,6 +222,10 @@ void ipmi_intf_session_set_port(struct ipmi_intf * intf, int port);
|
|||||||
void ipmi_intf_session_set_authtype(struct ipmi_intf * intf, uint8_t authtype);
|
void ipmi_intf_session_set_authtype(struct ipmi_intf * intf, uint8_t authtype);
|
||||||
void ipmi_intf_session_set_timeout(struct ipmi_intf * intf, uint32_t timeout);
|
void ipmi_intf_session_set_timeout(struct ipmi_intf * intf, uint32_t timeout);
|
||||||
void ipmi_intf_session_set_retry(struct ipmi_intf * intf, int retry);
|
void ipmi_intf_session_set_retry(struct ipmi_intf * intf, int retry);
|
||||||
|
void ipmi_intf_session_cleanup(struct ipmi_intf *intf);
|
||||||
void ipmi_cleanup(struct ipmi_intf * intf);
|
void ipmi_cleanup(struct ipmi_intf * intf);
|
||||||
|
|
||||||
|
#if defined(IPMI_INTF_LAN) || defined (IPMI_INTF_LANPLUS)
|
||||||
|
int ipmi_intf_socket_connect(struct ipmi_intf * intf);
|
||||||
|
#endif
|
||||||
#endif /* IPMI_INTF_H */
|
#endif /* IPMI_INTF_H */
|
@ -76,6 +76,8 @@ enum {
|
|||||||
IPMI_LANP_RMCP_CIPHER_SUPPORT,
|
IPMI_LANP_RMCP_CIPHER_SUPPORT,
|
||||||
IPMI_LANP_RMCP_CIPHERS,
|
IPMI_LANP_RMCP_CIPHERS,
|
||||||
IPMI_LANP_RMCP_PRIV_LEVELS,
|
IPMI_LANP_RMCP_PRIV_LEVELS,
|
||||||
|
IPMI_LANP_VLAN_TAGS,
|
||||||
|
IPMI_LANP_BAD_PASS_THRESH,
|
||||||
IPMI_LANP_OEM_ALERT_STRING=96,
|
IPMI_LANP_OEM_ALERT_STRING=96,
|
||||||
IPMI_LANP_ALERT_RETRY=97,
|
IPMI_LANP_ALERT_RETRY=97,
|
||||||
IPMI_LANP_UTC_OFFSET=98,
|
IPMI_LANP_UTC_OFFSET=98,
|
||||||
@ -92,38 +94,39 @@ static struct lan_param {
|
|||||||
uint8_t * data;
|
uint8_t * data;
|
||||||
int data_len;
|
int data_len;
|
||||||
} ipmi_lan_params[] __attribute__((unused)) = {
|
} ipmi_lan_params[] __attribute__((unused)) = {
|
||||||
{ IPMI_LANP_SET_IN_PROGRESS, 1, "Set in Progress" },
|
{ IPMI_LANP_SET_IN_PROGRESS, 1, "Set in Progress", NULL, 0 },
|
||||||
{ IPMI_LANP_AUTH_TYPE, 1, "Auth Type Support" },
|
{ IPMI_LANP_AUTH_TYPE, 1, "Auth Type Support", NULL, 0 },
|
||||||
{ IPMI_LANP_AUTH_TYPE_ENABLE, 5, "Auth Type Enable" },
|
{ IPMI_LANP_AUTH_TYPE_ENABLE, 5, "Auth Type Enable", NULL, 0 },
|
||||||
{ IPMI_LANP_IP_ADDR, 4, "IP Address" },
|
{ IPMI_LANP_IP_ADDR, 4, "IP Address", NULL, 0 },
|
||||||
{ IPMI_LANP_IP_ADDR_SRC, 1, "IP Address Source" },
|
{ IPMI_LANP_IP_ADDR_SRC, 1, "IP Address Source", NULL, 0 },
|
||||||
{ IPMI_LANP_MAC_ADDR, 6, "MAC Address" }, /* 5 */
|
{ IPMI_LANP_MAC_ADDR, 6, "MAC Address", NULL, 0 }, /* 5 */
|
||||||
{ IPMI_LANP_SUBNET_MASK, 4, "Subnet Mask" },
|
{ IPMI_LANP_SUBNET_MASK, 4, "Subnet Mask", NULL, 0 },
|
||||||
{ IPMI_LANP_IP_HEADER, 3, "IP Header" },
|
{ IPMI_LANP_IP_HEADER, 3, "IP Header", NULL, 0 },
|
||||||
{ IPMI_LANP_PRI_RMCP_PORT, 2, "Primary RMCP Port" },
|
{ IPMI_LANP_PRI_RMCP_PORT, 2, "Primary RMCP Port", NULL, 0 },
|
||||||
{ IPMI_LANP_SEC_RMCP_PORT, 2, "Secondary RMCP Port" },
|
{ IPMI_LANP_SEC_RMCP_PORT, 2, "Secondary RMCP Port", NULL, 0 },
|
||||||
{ IPMI_LANP_BMC_ARP, 1, "BMC ARP Control" }, /* 10 */
|
{ IPMI_LANP_BMC_ARP, 1, "BMC ARP Control", NULL, 0}, /* 10 */
|
||||||
{ IPMI_LANP_GRAT_ARP, 1, "Gratituous ARP Intrvl" },
|
{ IPMI_LANP_GRAT_ARP, 1, "Gratituous ARP Intrvl", NULL, 0 },
|
||||||
{ IPMI_LANP_DEF_GATEWAY_IP, 4, "Default Gateway IP" },
|
{ IPMI_LANP_DEF_GATEWAY_IP, 4, "Default Gateway IP", NULL, 0 },
|
||||||
{ IPMI_LANP_DEF_GATEWAY_MAC, 6, "Default Gateway MAC" },
|
{ IPMI_LANP_DEF_GATEWAY_MAC, 6, "Default Gateway MAC", NULL, 0 },
|
||||||
{ IPMI_LANP_BAK_GATEWAY_IP, 4, "Backup Gateway IP" },
|
{ IPMI_LANP_BAK_GATEWAY_IP, 4, "Backup Gateway IP", NULL, 0 },
|
||||||
{ IPMI_LANP_BAK_GATEWAY_MAC, 6, "Backup Gateway MAC" }, /* 15 */
|
{ IPMI_LANP_BAK_GATEWAY_MAC, 6, "Backup Gateway MAC", NULL, 0 }, /* 15 */
|
||||||
{ IPMI_LANP_SNMP_STRING, 18, "SNMP Community String" },
|
{ IPMI_LANP_SNMP_STRING, 18, "SNMP Community String", NULL, 0 },
|
||||||
{ IPMI_LANP_NUM_DEST, 1, "Number of Destinations"},
|
{ IPMI_LANP_NUM_DEST, 1, "Number of Destinations", NULL, 0 },
|
||||||
{ IPMI_LANP_DEST_TYPE, 4, "Destination Type" },
|
{ IPMI_LANP_DEST_TYPE, 4, "Destination Type", NULL, 0 },
|
||||||
{ IPMI_LANP_DEST_ADDR, 13, "Destination Addresses" },
|
{ IPMI_LANP_DEST_ADDR, 13, "Destination Addresses", NULL, 0 },
|
||||||
{ IPMI_LANP_VLAN_ID, 2, "802.1q VLAN ID" }, /* 20 */
|
{ IPMI_LANP_VLAN_ID, 2, "802.1q VLAN ID", NULL, 0 }, /* 20 */
|
||||||
{ IPMI_LANP_VLAN_PRIORITY, 1, "802.1q VLAN Priority" },
|
{ IPMI_LANP_VLAN_PRIORITY, 1, "802.1q VLAN Priority", NULL, 0 },
|
||||||
{ IPMI_LANP_RMCP_CIPHER_SUPPORT,1, "RMCP+ Cipher Suite Count" },
|
{ IPMI_LANP_RMCP_CIPHER_SUPPORT,1, "RMCP+ Cipher Suite Count", NULL, 0 },
|
||||||
{ IPMI_LANP_RMCP_CIPHERS, 16, "RMCP+ Cipher Suites" },
|
{ IPMI_LANP_RMCP_CIPHERS, 16, "RMCP+ Cipher Suites", NULL, 0 },
|
||||||
{ IPMI_LANP_RMCP_PRIV_LEVELS, 9, "Cipher Suite Priv Max" },
|
{ IPMI_LANP_RMCP_PRIV_LEVELS, 9, "Cipher Suite Priv Max", NULL, 0 },
|
||||||
{ IPMI_LANP_OEM_ALERT_STRING, 28, "OEM Alert String" }, /* 25 */
|
{ IPMI_LANP_BAD_PASS_THRESH, 6, "Bad Password Threshold", NULL, 0 },
|
||||||
{ IPMI_LANP_ALERT_RETRY, 1, "Alert Retry Algorithm" },
|
{ IPMI_LANP_OEM_ALERT_STRING, 28, "OEM Alert String", NULL, 0 }, /* 25 */
|
||||||
{ IPMI_LANP_UTC_OFFSET, 3, "UTC Offset" },
|
{ IPMI_LANP_ALERT_RETRY, 1, "Alert Retry Algorithm", NULL, 0 },
|
||||||
{ IPMI_LANP_DHCP_SERVER_IP, 4, "DHCP Server IP" },
|
{ IPMI_LANP_UTC_OFFSET, 3, "UTC Offset", NULL, 0 },
|
||||||
{ IPMI_LANP_DHCP_SERVER_MAC, 6, "DHDP Server MAC" },
|
{ IPMI_LANP_DHCP_SERVER_IP, 4, "DHCP Server IP", NULL, 0 },
|
||||||
{ IPMI_LANP_DHCP_ENABLE, 1, "DHCP Enable" }, /* 30 */
|
{ IPMI_LANP_DHCP_SERVER_MAC, 6, "DHDP Server MAC", NULL, 0},
|
||||||
{ IPMI_LANP_CHAN_ACCESS_MODE, 2, "Channel Access Mode" },
|
{ IPMI_LANP_DHCP_ENABLE, 1, "DHCP Enable", NULL, 0 }, /* 30 */
|
||||||
|
{ IPMI_LANP_CHAN_ACCESS_MODE, 2, "Channel Access Mode", NULL, 0 },
|
||||||
{ -1 }
|
{ -1 }
|
||||||
};
|
};
|
||||||
|
|
@ -157,6 +157,9 @@ struct ipm_get_watchdog_rsp {
|
|||||||
#define IPMI_SYSINFO_SET0_SIZE 14
|
#define IPMI_SYSINFO_SET0_SIZE 14
|
||||||
#define IPMI_SYSINFO_SETN_SIZE 16
|
#define IPMI_SYSINFO_SETN_SIZE 16
|
||||||
|
|
||||||
|
/* System Information "Parameter selector" values: */
|
||||||
|
#define IPMI_SYSINFO_SET_STATE 0x00
|
||||||
|
#define IPMI_SYSINFO_SYSTEM_FW_VERSION 0x01
|
||||||
#define IPMI_SYSINFO_HOSTNAME 0x02
|
#define IPMI_SYSINFO_HOSTNAME 0x02
|
||||||
#define IPMI_SYSINFO_PRIMARY_OS_NAME 0x03
|
#define IPMI_SYSINFO_PRIMARY_OS_NAME 0x03
|
||||||
#define IPMI_SYSINFO_OS_NAME 0x04
|
#define IPMI_SYSINFO_OS_NAME 0x04
|
@ -102,8 +102,6 @@ enum {
|
|||||||
#define GET_SENSOR_EVENT_STATUS 0x2b
|
#define GET_SENSOR_EVENT_STATUS 0x2b
|
||||||
#define GET_SENSOR_READING 0x2d
|
#define GET_SENSOR_READING 0x2d
|
||||||
#define GET_SENSOR_TYPE 0x2f
|
#define GET_SENSOR_TYPE 0x2f
|
||||||
#define GET_SENSOR_READING 0x2d
|
|
||||||
#define GET_SENSOR_TYPE 0x2f
|
|
||||||
|
|
||||||
#ifdef HAVE_PRAGMA_PACK
|
#ifdef HAVE_PRAGMA_PACK
|
||||||
#pragma pack(1)
|
#pragma pack(1)
|
@ -107,6 +107,7 @@ struct standard_spec_sel_rec{
|
|||||||
#define SENSOR_TYPE_OEM_NFATAL_ERROR 0xC2
|
#define SENSOR_TYPE_OEM_NFATAL_ERROR 0xC2
|
||||||
#define SENSOR_TYPE_OEM_FATAL_ERROR 0xC3
|
#define SENSOR_TYPE_OEM_FATAL_ERROR 0xC3
|
||||||
#define SENSOR_TYPE_TXT_CMD_ERROR 0x20
|
#define SENSOR_TYPE_TXT_CMD_ERROR 0x20
|
||||||
|
#define SENSOR_TYPE_SUPERMICRO_OEM 0xD0
|
||||||
/* End of Macro for DELL Specific */
|
/* End of Macro for DELL Specific */
|
||||||
#define SEL_OEM_TS_DATA_LEN 6
|
#define SEL_OEM_TS_DATA_LEN 6
|
||||||
#define SEL_OEM_NOTS_DATA_LEN 13
|
#define SEL_OEM_NOTS_DATA_LEN 13
|
||||||
@ -193,7 +194,7 @@ static struct ipmi_event_sensor_types oem_kontron_event_types[] __attribute__((u
|
|||||||
{ 0xC7 , 0x01 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "FWUM Status", "First Boot After Rollback(error)" },
|
{ 0xC7 , 0x01 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "FWUM Status", "First Boot After Rollback(error)" },
|
||||||
{ 0xC7 , 0x02 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "FWUM Status", "First Boot After Errors (watchdog)" },
|
{ 0xC7 , 0x02 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "FWUM Status", "First Boot After Errors (watchdog)" },
|
||||||
{ 0xC7 , 0x03 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "FWUM Status", "First Boot After Manual Rollback" },
|
{ 0xC7 , 0x03 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "FWUM Status", "First Boot After Manual Rollback" },
|
||||||
{ 0xC7 , 0x08 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "FWUM Status", "Firmware Watchdog Bite, reset occured" },
|
{ 0xC7 , 0x08 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "FWUM Status", "Firmware Watchdog Bite, reset occurred" },
|
||||||
|
|
||||||
{ 0xC8 , 0x00 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "Switch Mngt Software Status", "Not Loaded" },
|
{ 0xC8 , 0x00 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "Switch Mngt Software Status", "Not Loaded" },
|
||||||
{ 0xC8 , 0x01 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "Switch Mngt Software Status", "Initializing" },
|
{ 0xC8 , 0x01 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "Switch Mngt Software Status", "Initializing" },
|
||||||
@ -326,6 +327,8 @@ static struct ipmi_event_sensor_types sensor_specific_types[] __attribute__((unu
|
|||||||
{ 0x07, 0x08, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Processor", "Disabled" },
|
{ 0x07, 0x08, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Processor", "Disabled" },
|
||||||
{ 0x07, 0x09, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Processor", "Terminator presence detected" },
|
{ 0x07, 0x09, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Processor", "Terminator presence detected" },
|
||||||
{ 0x07, 0x0a, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Processor", "Throttled" },
|
{ 0x07, 0x0a, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Processor", "Throttled" },
|
||||||
|
{ 0x07, 0x0b, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Processor", "Uncorrectable machine check exception" },
|
||||||
|
{ 0x07, 0x0c, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Processor", "Correctable machine check error" },
|
||||||
|
|
||||||
{ 0x08, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Power Supply", "Presence detected" },
|
{ 0x08, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Power Supply", "Presence detected" },
|
||||||
{ 0x08, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Power Supply", "Failure detected" },
|
{ 0x08, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Power Supply", "Failure detected" },
|
||||||
@ -336,7 +339,10 @@ static struct ipmi_event_sensor_types sensor_specific_types[] __attribute__((unu
|
|||||||
{ 0x08, 0x06, 0x00, IPMI_EVENT_CLASS_DISCRETE, "Power Supply", "Config Error: Vendor Mismatch" },
|
{ 0x08, 0x06, 0x00, IPMI_EVENT_CLASS_DISCRETE, "Power Supply", "Config Error: Vendor Mismatch" },
|
||||||
{ 0x08, 0x06, 0x01, IPMI_EVENT_CLASS_DISCRETE, "Power Supply", "Config Error: Revision Mismatch" },
|
{ 0x08, 0x06, 0x01, IPMI_EVENT_CLASS_DISCRETE, "Power Supply", "Config Error: Revision Mismatch" },
|
||||||
{ 0x08, 0x06, 0x02, IPMI_EVENT_CLASS_DISCRETE, "Power Supply", "Config Error: Processor Missing" },
|
{ 0x08, 0x06, 0x02, IPMI_EVENT_CLASS_DISCRETE, "Power Supply", "Config Error: Processor Missing" },
|
||||||
|
{ 0x08, 0x06, 0x03, IPMI_EVENT_CLASS_DISCRETE, "Power Supply", "Config Error: Power Supply Rating Mismatch" },
|
||||||
|
{ 0x08, 0x06, 0x04, IPMI_EVENT_CLASS_DISCRETE, "Power Supply", "Config Error: Voltage Rating Mismatch" },
|
||||||
{ 0x08, 0x06, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Power Supply", "Config Error" },
|
{ 0x08, 0x06, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Power Supply", "Config Error" },
|
||||||
|
{ 0x08, 0x06, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Power Supply", "Power Supply Inactive" },
|
||||||
|
|
||||||
{ 0x09, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Power Unit", "Power off/down" },
|
{ 0x09, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Power Unit", "Power off/down" },
|
||||||
{ 0x09, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Power Unit", "Power cycle" },
|
{ 0x09, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Power Unit", "Power cycle" },
|
||||||
@ -360,6 +366,7 @@ static struct ipmi_event_sensor_types sensor_specific_types[] __attribute__((unu
|
|||||||
{ 0x0c, 0x07, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Memory", "Configuration Error" },
|
{ 0x0c, 0x07, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Memory", "Configuration Error" },
|
||||||
{ 0x0c, 0x08, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Memory", "Spare" },
|
{ 0x0c, 0x08, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Memory", "Spare" },
|
||||||
{ 0x0c, 0x09, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Memory", "Throttled" },
|
{ 0x0c, 0x09, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Memory", "Throttled" },
|
||||||
|
{ 0x0c, 0x0a, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Memory", "Critical Overtemperature" },
|
||||||
|
|
||||||
{ 0x0d, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Drive Slot", "Drive Present" },
|
{ 0x0d, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Drive Slot", "Drive Present" },
|
||||||
{ 0x0d, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Drive Slot", "Drive Fault" },
|
{ 0x0d, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Drive Slot", "Drive Fault" },
|
||||||
@ -479,6 +486,7 @@ static struct ipmi_event_sensor_types sensor_specific_types[] __attribute__((unu
|
|||||||
{ 0x13, 0x08, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Critical Interrupt", "Bus Uncorrectable error" },
|
{ 0x13, 0x08, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Critical Interrupt", "Bus Uncorrectable error" },
|
||||||
{ 0x13, 0x09, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Critical Interrupt", "Fatal NMI" },
|
{ 0x13, 0x09, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Critical Interrupt", "Fatal NMI" },
|
||||||
{ 0x13, 0x0a, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Critical Interrupt", "Bus Fatal Error" },
|
{ 0x13, 0x0a, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Critical Interrupt", "Bus Fatal Error" },
|
||||||
|
{ 0x13, 0x0b, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Critical Interrupt", "Bus Degraded" },
|
||||||
|
|
||||||
{ 0x14, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Button", "Power Button pressed" },
|
{ 0x14, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Button", "Power Button pressed" },
|
||||||
{ 0x14, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Button", "Sleep Button pressed" },
|
{ 0x14, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Button", "Sleep Button pressed" },
|
||||||
@ -491,6 +499,7 @@ static struct ipmi_event_sensor_types sensor_specific_types[] __attribute__((unu
|
|||||||
{ 0x17, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Add-in Card", NULL },
|
{ 0x17, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Add-in Card", NULL },
|
||||||
{ 0x18, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Chassis", NULL },
|
{ 0x18, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Chassis", NULL },
|
||||||
{ 0x19, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Chip Set", NULL },
|
{ 0x19, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Chip Set", NULL },
|
||||||
|
{ 0x19, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Chip Set", "Thermal Trip" },
|
||||||
{ 0x1a, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Other FRU", NULL },
|
{ 0x1a, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Other FRU", NULL },
|
||||||
|
|
||||||
{ 0x1b, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Cable/Interconnect", "Connected" },
|
{ 0x1b, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Cable/Interconnect", "Connected" },
|
||||||
@ -520,6 +529,10 @@ static struct ipmi_event_sensor_types sensor_specific_types[] __attribute__((unu
|
|||||||
{ 0x1f, 0x04, 0xff, IPMI_EVENT_CLASS_DISCRETE, "OS Boot", "CD-ROM boot completed" },
|
{ 0x1f, 0x04, 0xff, IPMI_EVENT_CLASS_DISCRETE, "OS Boot", "CD-ROM boot completed" },
|
||||||
{ 0x1f, 0x05, 0xff, IPMI_EVENT_CLASS_DISCRETE, "OS Boot", "ROM boot completed" },
|
{ 0x1f, 0x05, 0xff, IPMI_EVENT_CLASS_DISCRETE, "OS Boot", "ROM boot completed" },
|
||||||
{ 0x1f, 0x06, 0xff, IPMI_EVENT_CLASS_DISCRETE, "OS Boot", "boot completed - device not specified" },
|
{ 0x1f, 0x06, 0xff, IPMI_EVENT_CLASS_DISCRETE, "OS Boot", "boot completed - device not specified" },
|
||||||
|
{ 0x1f, 0x07, 0xff, IPMI_EVENT_CLASS_DISCRETE, "OS Boot", "Installation started" },
|
||||||
|
{ 0x1f, 0x08, 0xff, IPMI_EVENT_CLASS_DISCRETE, "OS Boot", "Installation completed" },
|
||||||
|
{ 0x1f, 0x09, 0xff, IPMI_EVENT_CLASS_DISCRETE, "OS Boot", "Installation aborted" },
|
||||||
|
{ 0x1f, 0x0a, 0xff, IPMI_EVENT_CLASS_DISCRETE, "OS Boot", "Installation failed" },
|
||||||
|
|
||||||
{ 0x20, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "OS Stop/Shutdown", "Error during system startup" },
|
{ 0x20, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "OS Stop/Shutdown", "Error during system startup" },
|
||||||
{ 0x20, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "OS Stop/Shutdown", "Run-time critical stop" },
|
{ 0x20, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "OS Stop/Shutdown", "Run-time critical stop" },
|
87
include/ipmitool/ipmi_sel_supermicro.h
Normal file
87
include/ipmitool/ipmi_sel_supermicro.h
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
|
*
|
||||||
|
* Redistribution of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* Redistribution in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
*
|
||||||
|
* Neither the name of Sun Microsystems, Inc. or the names of
|
||||||
|
* contributors may be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* This software is provided "AS IS," without a warranty of any kind.
|
||||||
|
* ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
|
||||||
|
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
|
||||||
|
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
|
||||||
|
* SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE
|
||||||
|
* FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
|
||||||
|
* OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL
|
||||||
|
* SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
|
||||||
|
* OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR
|
||||||
|
* PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF
|
||||||
|
* LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
|
||||||
|
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef IPMI_SEL_SUPERMICRO_H
|
||||||
|
# define IPMI_SEL_SUPERMICRO_H
|
||||||
|
|
||||||
|
static uint16_t supermicro_x9dal[] = {
|
||||||
|
0x0635, 0xFFFF
|
||||||
|
};
|
||||||
|
|
||||||
|
static uint16_t supermicro_x9db[] = {
|
||||||
|
0x0733, 0x0722, 0x0703, 0x0721, 0x0716, 0x0637, 0xFFFF
|
||||||
|
};
|
||||||
|
|
||||||
|
static uint16_t supermicro_x9sb[] = {
|
||||||
|
0x0651, 0xFFFF
|
||||||
|
};
|
||||||
|
|
||||||
|
static uint16_t supermicro_x9[] = {
|
||||||
|
0x0635, 0x0733, 0x0722, 0x0703, 0x0721, 0x0716, 0x0637, 0x0651, 0xFFFF
|
||||||
|
};
|
||||||
|
|
||||||
|
static uint16_t supermicro_b8[] = {
|
||||||
|
0x000A, 0x061c, 0x0620, 0x0101, 0x061f, 0x0612, 0x061e, 0xFFFF
|
||||||
|
};
|
||||||
|
|
||||||
|
static uint16_t supermicro_h8[] = {
|
||||||
|
0xa111, 0x0408, 0x0811, 0x1411, 0x0911, 0x1211, 0x1011, 0xcd11, 0x1111, 0xbe11, 0xce11, 0xbd11,
|
||||||
|
0xbc11, 0xa911, 0xaa11, 0xbd11, 0xcb11, 0xad11, 0xa811, 0xac11, 0xaf11, 0xa511, 0xa011, 0x1611,
|
||||||
|
0x2511, 0xbf11, 0x1511, 0x2211, 0x2411, 0x1911, 0xab11, 0xd011, 0xae11, 0xca11, 0x0409, 0xa211,
|
||||||
|
0xa311, 0x1311, 0xba11, 0xa711, 0xd111, 0x1711, 0xcf11, 0x2011, 0x1811, 0xFFFF
|
||||||
|
};
|
||||||
|
|
||||||
|
static uint16_t supermicro_p8[] = {
|
||||||
|
0x6480, 0x7380, 0x6280, 0x7480, 0x5980, 0xFFFF
|
||||||
|
};
|
||||||
|
|
||||||
|
static uint16_t supermicro_x8[] = {
|
||||||
|
0xa880, 0x0403, 0x0100, 0x0601, 0x0001, 0x0404, 0x0606, 0x0608, 0x0632, 0x0400, 0x0401, 0x0006,
|
||||||
|
0x040a, 0xf280, 0x060f, 0x0609, 0x0008, 0x0613, 0x061b, 0x0007, 0x0600, 0x060c, 0x060d, 0x0614,
|
||||||
|
0x060c, 0x0003, 0x040b, 0x0621, 0x0610, 0x0638, 0xf380, 0x060b, 0x040d, 0x0605, 0x062d, 0x060e,
|
||||||
|
0x061a, 0xf580, 0x062e, 0x0009, 0xFFFF
|
||||||
|
};
|
||||||
|
|
||||||
|
static uint16_t supermicro_X8[] = {
|
||||||
|
0x000A, 0x061c, 0x0620, 0x0101, 0x061f, 0x0612, 0x061e, 0xa111, 0x0408, 0x0811, 0x1411, 0x0911,
|
||||||
|
0x1211, 0x1011, 0xcd11, 0x1111, 0xbe11, 0xce11, 0xbd11, 0xbc11, 0xa911, 0xaa11, 0xbd11, 0xcb11,
|
||||||
|
0xad11, 0xa811, 0xac11, 0xaf11, 0xa511, 0xa011, 0x1611, 0x2511, 0xbf11, 0x1511, 0x2211, 0x2411,
|
||||||
|
0x1911, 0xab11, 0xd011, 0xae11, 0xca11, 0x0409, 0xa211, 0xa311, 0x1311, 0xba11, 0xa711, 0xd111,
|
||||||
|
0x1711, 0xcf11, 0x2011, 0x1811, 0x6480, 0x7380, 0x6280, 0x7480, 0x5980, 0xa880, 0x0403, 0x0100,
|
||||||
|
0x0601, 0x0001, 0x0404, 0x0606, 0x0608, 0x0632, 0x0400, 0x0401, 0x0006, 0x040a, 0xf280, 0x060f,
|
||||||
|
0x0609, 0x0008, 0x0613, 0x061b, 0x0007, 0x0600, 0x060c, 0x060d, 0x0614, 0x060c, 0x0003, 0x040b,
|
||||||
|
0x0621, 0x0610, 0x0638, 0xf380, 0x060b, 0x040d, 0x0605, 0x062d, 0x060e, 0x061a, 0xf580, 0x062e,
|
||||||
|
0x0009, 0xFFFF
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* IPMI_SEL_SUPERMICRO_H */
|
@ -64,7 +64,7 @@ struct sol_config_parameters {
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The ACTIVATE PAYLOAD command reponse structure
|
* The ACTIVATE PAYLOAD command response structure
|
||||||
* From table 24-2 of the IPMI v2.0 spec
|
* From table 24-2 of the IPMI v2.0 spec
|
||||||
*/
|
*/
|
||||||
#ifdef PRAGMA_PACK
|
#ifdef PRAGMA_PACK
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
|
* Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@ -39,19 +39,35 @@
|
|||||||
#include <ipmitool/ipmi.h>
|
#include <ipmitool/ipmi.h>
|
||||||
#include <ipmitool/ipmi_sdr.h>
|
#include <ipmitool/ipmi_sdr.h>
|
||||||
|
|
||||||
#define IPMI_NETFN_SUNOEM 0x2e
|
#define IPMI_NETFN_SUNOEM 0x2e
|
||||||
|
|
||||||
#define IPMI_SUNOEM_SET_SSH_KEY 0x01
|
#define IPMI_SUNOEM_SET_SSH_KEY 0x01
|
||||||
#define IPMI_SUNOEM_DEL_SSH_KEY 0x02
|
#define IPMI_SUNOEM_DEL_SSH_KEY 0x02
|
||||||
#define IPMI_SUNOEM_GET_HEALTH_STATUS 0x10
|
#define IPMI_SUNOEM_GET_HEALTH_STATUS 0x10
|
||||||
#define IPMI_SUNOEM_SET_FAN_SPEED 0x20
|
#define IPMI_SUNOEM_CLI 0x19
|
||||||
#define IPMI_SUNOEM_LED_GET 0x21
|
#define IPMI_SUNOEM_SET_FAN_SPEED 0x20
|
||||||
#define IPMI_SUNOEM_LED_SET 0x22
|
#define IPMI_SUNOEM_LED_GET 0x21
|
||||||
|
#define IPMI_SUNOEM_LED_SET 0x22
|
||||||
|
#define IPMI_SUNOEM_ECHO 0x23
|
||||||
|
#define IPMI_SUNOEM_VERSION 0x24
|
||||||
|
#define IPMI_SUNOEM_NACNAME 0x29
|
||||||
|
#define IPMI_SUNOEM_GETVAL 0x2A
|
||||||
|
#define IPMI_SUNOEM_SETVAL 0x2C
|
||||||
|
#define IPMI_SUNOEM_SENSOR_SET 0x3A
|
||||||
|
#define IPMI_SUNOEM_SET_FAN_MODE 0x41
|
||||||
|
#define IPMI_SUNOEM_CORE_TUNNEL 0x44
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Error codes of sunoem functions
|
||||||
|
*/
|
||||||
|
typedef enum {
|
||||||
|
SUNOEM_EC_SUCCESS = 0,
|
||||||
|
SUNOEM_EC_INVALID_ARG = 1,
|
||||||
|
SUNOEM_EC_BMC_NOT_RESPONDING = 2,
|
||||||
|
SUNOEM_EC_BMC_CCODE_NONZERO = 3
|
||||||
|
} sunoem_ec_t;
|
||||||
|
|
||||||
int ipmi_sunoem_main(struct ipmi_intf *, int, char **);
|
int ipmi_sunoem_main(struct ipmi_intf *, int, char **);
|
||||||
|
|
||||||
struct ipmi_rs * sunoem_led_get(struct ipmi_intf * intf, struct sdr_record_generic_locator * dev, int ledtype);
|
|
||||||
struct ipmi_rs * sunoem_led_set(struct ipmi_intf * intf, struct sdr_record_generic_locator * dev, int ledtype, int ledmode);
|
|
||||||
|
|
||||||
#endif /*IPMI_SUNOEM_H*/
|
#endif /*IPMI_SUNOEM_H*/
|
||||||
|
|
@ -38,58 +38,46 @@
|
|||||||
#endif
|
#endif
|
||||||
#include <ipmitool/ipmi.h>
|
#include <ipmitool/ipmi.h>
|
||||||
|
|
||||||
|
#define IPMI_PASSWORD_DISABLE_USER 0x00
|
||||||
|
#define IPMI_PASSWORD_ENABLE_USER 0x01
|
||||||
|
#define IPMI_PASSWORD_SET_PASSWORD 0x02
|
||||||
|
#define IPMI_PASSWORD_TEST_PASSWORD 0x03
|
||||||
|
|
||||||
/*
|
#define IPMI_USER_ENABLE_UNSPECIFIED 0x00
|
||||||
* The GET USER ACCESS response from table 22-32 of the IPMI v2.0 spec
|
#define IPMI_USER_ENABLE_ENABLED 0x40
|
||||||
*/
|
#define IPMI_USER_ENABLE_DISABLED 0x80
|
||||||
struct user_access_rsp {
|
#define IPMI_USER_ENABLE_RESERVED 0xC0
|
||||||
#if WORDS_BIGENDIAN
|
|
||||||
uint8_t __reserved1 : 2;
|
|
||||||
uint8_t maximum_ids : 6;
|
|
||||||
#else
|
|
||||||
uint8_t maximum_ids : 6;
|
|
||||||
uint8_t __reserved1 : 2;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if WORDS_BIGENDIAN
|
|
||||||
uint8_t __reserved2 : 2;
|
|
||||||
uint8_t enabled_user_count : 6;
|
|
||||||
#else
|
|
||||||
uint8_t enabled_user_count : 6;
|
|
||||||
uint8_t __reserved2 : 2;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if WORDS_BIGENDIAN
|
|
||||||
uint8_t __reserved3 : 2;
|
|
||||||
uint8_t fixed_name_count : 6;
|
|
||||||
#else
|
|
||||||
uint8_t fixed_name_count : 6;
|
|
||||||
uint8_t __reserved3 : 2;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_PRAGMA_PACK
|
|
||||||
#pragma pack(1)
|
|
||||||
#endif
|
|
||||||
#if WORDS_BIGENDIAN
|
|
||||||
uint8_t __reserved4 : 1;
|
|
||||||
uint8_t no_callin_access : 1;
|
|
||||||
uint8_t link_auth_access : 1;
|
|
||||||
uint8_t ipmi_messaging_access : 1;
|
|
||||||
uint8_t channel_privilege_limit : 4;
|
|
||||||
#else
|
|
||||||
uint8_t channel_privilege_limit : 4;
|
|
||||||
uint8_t ipmi_messaging_access : 1;
|
|
||||||
uint8_t link_auth_access : 1;
|
|
||||||
uint8_t no_callin_access : 1;
|
|
||||||
uint8_t __reserved4 : 1;
|
|
||||||
#endif
|
|
||||||
} ATTRIBUTE_PACKING;
|
|
||||||
#ifdef HAVE_PRAGMA_PACK
|
|
||||||
#pragma pack(0)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
/* (22.27) Get and (22.26) Set User Access */
|
||||||
|
struct user_access_t {
|
||||||
|
uint8_t callin_callback;
|
||||||
|
uint8_t channel;
|
||||||
|
uint8_t enabled_user_ids;
|
||||||
|
uint8_t enable_status;
|
||||||
|
uint8_t fixed_user_ids;
|
||||||
|
uint8_t ipmi_messaging;
|
||||||
|
uint8_t link_auth;
|
||||||
|
uint8_t max_user_ids;
|
||||||
|
uint8_t privilege_limit;
|
||||||
|
uint8_t session_limit;
|
||||||
|
uint8_t user_id;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* (22.29) Get User Name */
|
||||||
|
struct user_name_t {
|
||||||
|
uint8_t user_id;
|
||||||
|
uint8_t user_name[17];
|
||||||
|
};
|
||||||
|
|
||||||
int ipmi_user_main(struct ipmi_intf *, int, char **);
|
int ipmi_user_main(struct ipmi_intf *, int, char **);
|
||||||
|
int _ipmi_get_user_access(struct ipmi_intf *intf,
|
||||||
|
struct user_access_t *user_access_rsp);
|
||||||
|
int _ipmi_get_user_name(struct ipmi_intf *intf, struct user_name_t *user_name);
|
||||||
|
int _ipmi_set_user_access(struct ipmi_intf *intf,
|
||||||
|
struct user_access_t *user_access_req,
|
||||||
|
uint8_t change_priv_limit_only);
|
||||||
|
int _ipmi_set_user_password(struct ipmi_intf *intf,
|
||||||
|
uint8_t user_id, uint8_t operation,
|
||||||
|
const char *password, uint8_t is_twenty_byte);
|
||||||
|
|
||||||
#endif /* IPMI_USER_H */
|
#endif /* IPMI_USER_H */
|
49
include/ipmitool/ipmi_vita.h
Normal file
49
include/ipmitool/ipmi_vita.h
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) Pigeon Point Systems. All right reserved
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _IPMI_VITA_H_
|
||||||
|
#define _IPMI_VITA_H_
|
||||||
|
|
||||||
|
/* VITA 46.11 commands */
|
||||||
|
#define VITA_GET_VSO_CAPABILITIES_CMD 0x00
|
||||||
|
#define VITA_FRU_CONTROL_CMD 0x04
|
||||||
|
#define VITA_GET_FRU_LED_PROPERTIES_CMD 0x05
|
||||||
|
#define VITA_GET_LED_COLOR_CAPABILITIES_CMD 0x06
|
||||||
|
#define VITA_SET_FRU_LED_STATE_CMD 0x07
|
||||||
|
#define VITA_GET_FRU_LED_STATE_CMD 0x08
|
||||||
|
#define VITA_SET_FRU_STATE_POLICY_BITS_CMD 0x0A
|
||||||
|
#define VITA_GET_FRU_STATE_POLICY_BITS_CMD 0x0B
|
||||||
|
#define VITA_SET_FRU_ACTIVATION_CMD 0x0C
|
||||||
|
#define VITA_GET_FRU_ADDRESS_INFO_CMD 0x40
|
||||||
|
|
||||||
|
/* VITA 46.11 site types */
|
||||||
|
#define VITA_FRONT_VPX_MODULE 0x00
|
||||||
|
#define VITA_POWER_ENTRY 0x01
|
||||||
|
#define VITA_CHASSIS_FRU 0x02
|
||||||
|
#define VITA_DEDICATED_CHMC 0x03
|
||||||
|
#define VITA_FAN_TRAY 0x04
|
||||||
|
#define VITA_FAN_TRAY_FILTER 0x05
|
||||||
|
#define VITA_ALARM_PANEL 0x06
|
||||||
|
#define VITA_XMC 0x07
|
||||||
|
#define VITA_VPX_RTM 0x09
|
||||||
|
#define VITA_FRONT_VME_MODULE 0x0A
|
||||||
|
#define VITA_FRONT_VXS_MODULE 0x0B
|
||||||
|
#define VITA_POWER_SUPPLY 0x0C
|
||||||
|
#define VITA_FRONT_VITA62_MODULE 0x0D
|
||||||
|
#define VITA_71_MODULE 0x0E
|
||||||
|
#define VITA_FMC 0x0F
|
||||||
|
|
||||||
|
|
||||||
|
#define GROUP_EXT_VITA 0x03
|
||||||
|
|
||||||
|
extern uint8_t
|
||||||
|
vita_discover(struct ipmi_intf *intf);
|
||||||
|
|
||||||
|
extern uint8_t
|
||||||
|
ipmi_vita_ipmb_address(struct ipmi_intf *intf);
|
||||||
|
|
||||||
|
extern int
|
||||||
|
ipmi_vita_main(struct ipmi_intf * intf, int argc, char ** argv);
|
||||||
|
|
||||||
|
#endif /* _IPMI_VITA_H_ */
|
@ -1,5 +0,0 @@
|
|||||||
For more information about setting up your Debian system with IPMI
|
|
||||||
please see the excellent howto by Tim Small:
|
|
||||||
|
|
||||||
http://buttersideup.com/docs/howto/IPMI_on_Debian.html
|
|
||||||
|
|
@ -1,324 +0,0 @@
|
|||||||
version (1.8.11) unstable; urgency=low
|
|
||||||
* Fix new GCC compilation issues in regards to Packing
|
|
||||||
* Fix Tracker bug #1642710 - ipmi_kcs_drv being loaded/unloaded
|
|
||||||
for 2.4 kernel instead of ipmi_si_drv driver module
|
|
||||||
* New -y option added to allow specification of kg keys with
|
|
||||||
non-printable characters
|
|
||||||
* New -K option added to allow kgkey settings via environmental
|
|
||||||
variable IPMI_KGKEY
|
|
||||||
* Generic device support added for EEPROM with SDR Type 10h (gendev)
|
|
||||||
* Fix to lan-bridging for a double-bridging crash and to fix
|
|
||||||
an issue with bridging multiple concurrent requests and
|
|
||||||
erroneous handling of raw Send Message
|
|
||||||
* Lanplus fix for commands like 'sensor list' without the -t option
|
|
||||||
causing wrong double bridged requests of a sensor is located
|
|
||||||
on another satellite controller
|
|
||||||
* Fix lan and lanplus request list entry removal bugs
|
|
||||||
* Fix non-working issue when trying to send a bridge message with
|
|
||||||
Cipher 3
|
|
||||||
* Change bridge message handling to reuse command ipmi_lan_poll_recv
|
|
||||||
* Added PICMG 2.0 and 2.3 support
|
|
||||||
* Fix PICMG (ATCA) extension verification and reversal of BCD encoded
|
|
||||||
values for "major" and "minor" fields
|
|
||||||
* Add IANA support for Pigeon Point
|
|
||||||
* Add OEM SW/FW Record identification
|
|
||||||
* Fix to include I2C and LUN addresses so sensors are correctly managed
|
|
||||||
* Patch ID 1990560 to get readings from non-linear analog sensors
|
|
||||||
* Add support for SOL payload status command
|
|
||||||
* SOL set parameter range checking added
|
|
||||||
* Fixed SOL activate options usage
|
|
||||||
* Fixed crashes when parsing 'sol payload' and 'tsol' cmds (#216967)
|
|
||||||
* Added retries to SOL keepalive
|
|
||||||
* Fixed wrong mask values for Front Panel disable/enable status
|
|
||||||
* Add support to access fru internal use area
|
|
||||||
* Add support for new PICMG 3.0 R3.0 (March 24, 2008) to allow
|
|
||||||
blocks of data within the FRU storage area to be write
|
|
||||||
protected.
|
|
||||||
* Fix node reporting in GUID; Tracker bug #2339675
|
|
||||||
* Fix watchdog use/action print strings
|
|
||||||
* Fix endian bug in SDR add from file; Tracker bug #2075258
|
|
||||||
* Fix crash when dumping SDRs in a file and there's an error
|
|
||||||
getting an SDR; improve algorithm for optimal packet size
|
|
||||||
* Fix occasional SDR dump segfault; #1793076
|
|
||||||
* Allow ipmitool sel delete to accept hex list entry numbers
|
|
||||||
* Fix SEL total space reporting.
|
|
||||||
* Fix for garbage sensor threshold values reported when none
|
|
||||||
returned. Tracker Bug #863748
|
|
||||||
* ipmievd change to Monitor %used in SEL buffer and log warnings when
|
|
||||||
the buffer is 80% and 100% full
|
|
||||||
|
|
||||||
-- Petter Reinholdtsen <pere@debian.org> Wed, 25 Feb 2009 09:44:31 +0200
|
|
||||||
|
|
||||||
ipmitool (1.8.10) unstable; urgency=low
|
|
||||||
|
|
||||||
* New upstream version.
|
|
||||||
* Patch to allow Debian package builds from cvs.
|
|
||||||
|
|
||||||
-- Petter Reinholdtsen <pere@debian.org> Fri, 8 Aug 2008 09:44:31 +0200
|
|
||||||
|
|
||||||
ipmitool (1.8.7-2) unstable; urgency=low
|
|
||||||
|
|
||||||
* Fix typo in init.d/ipmievd. (Closes: #361309)
|
|
||||||
|
|
||||||
-- Petter Reinholdtsen <pere@debian.org> Sat, 8 Apr 2006 06:44:31 +0200
|
|
||||||
|
|
||||||
ipmitool (1.8.7-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* New upstream version.
|
|
||||||
- Dropped nuclear clause from the copyright. Updated debian/copyright
|
|
||||||
to reflect this.
|
|
||||||
- ipmievd now store pid in /var/run/ipmievd.pid. Adjust init.d
|
|
||||||
script to use it.
|
|
||||||
* Rename /etc/default/ipmievd variable IPMIEVD_OPTS is renamed to
|
|
||||||
IPMIEVD_OPTIONS to stay compatible with upstream and other
|
|
||||||
distributions. Add backwards compatibility code with a warning to
|
|
||||||
the users of the old variable.
|
|
||||||
|
|
||||||
-- Petter Reinholdtsen <pere@debian.org> Sun, 26 Mar 2006 21:11:08 +0200
|
|
||||||
|
|
||||||
ipmitool (1.8.6-2) unstable; urgency=low
|
|
||||||
|
|
||||||
* Add ia64 as an supported arch. (Closes: #355930)
|
|
||||||
|
|
||||||
-- Petter Reinholdtsen <pere@debian.org> Fri, 10 Mar 2006 23:34:50 +0100
|
|
||||||
|
|
||||||
ipmitool (1.8.6-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* New upstream version.
|
|
||||||
- Avoid crashing when setting lan IP address. (Closes: #351205)
|
|
||||||
* Avoid changing history by reverding upstream change
|
|
||||||
to email addresses in debian/changelog.
|
|
||||||
* Correct typo in control file: Suggest -> Suggests. Thanks
|
|
||||||
to Philipp Matthias Hahn for the report.
|
|
||||||
* Add init.d/ipmievd script. Based on script from Elmar Hoffmann,
|
|
||||||
slightly modified to use lsb-base functions. Added dependency on
|
|
||||||
lsb-base. (Closes: #345994)
|
|
||||||
|
|
||||||
-- Petter Reinholdtsen <pere@debian.org> Sun, 26 Feb 2006 10:31:14 +0100
|
|
||||||
|
|
||||||
ipmitool (1.8.2-2) unstable; urgency=low
|
|
||||||
|
|
||||||
* Add build-dependency on 'libreadline5-dev | libreadline-dev' to make
|
|
||||||
sure all archs get readline support. (Closes: #326341)
|
|
||||||
* Add build-dependency on libssl-dev to enable SSL support on
|
|
||||||
all archs.
|
|
||||||
* Updated Standards-Version to 3.6.2.1. (No updates required)
|
|
||||||
|
|
||||||
-- Petter Reinholdtsen <pere@debian.org> Sat, 3 Sep 2005 19:18:51 +0200
|
|
||||||
|
|
||||||
ipmitool (1.8.2-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* New upstream release.
|
|
||||||
- Fix FRU reading for large (>255 bytes) areas.
|
|
||||||
- Overhaul to ipmievd to support SEL polling in addition to OpenIPMI.
|
|
||||||
- Fix LAN parameter segfault when no Ciphers supported by
|
|
||||||
BMC. (Closes: #306806)
|
|
||||||
- Fix IPMIv2 support on Intel v2 BMCs (use -o intelplus).
|
|
||||||
- Separate option parsing code from main ipmitool source file.
|
|
||||||
- Add raw I2C support with IPMI Master Read-Write command.
|
|
||||||
- Add support for new 'sdr elist' extended output format.
|
|
||||||
- Add support for listing sensors by type with 'sdr type' command.
|
|
||||||
- Add support for new 'sel elist' extended output format that
|
|
||||||
cross-references events with sensors.
|
|
||||||
- Add support for sending dynamically generated platform events
|
|
||||||
based on existing sensor information.
|
|
||||||
- New '-S' argument to read local SDR cache created with 'sdr dump'.
|
|
||||||
- Updated manpage for ipmitool and ipmievd. (Closes: #306894)
|
|
||||||
* Correct the upstream URL in debian/changelog to the current one.
|
|
||||||
* Suggest package openipmi. (Closes: #305629)
|
|
||||||
* Add debian/watch file to detect new source versions.
|
|
||||||
|
|
||||||
-- Petter Reinholdtsen <pere@debian.org> Sun, 5 Jun 2005 10:29:18 +0200
|
|
||||||
|
|
||||||
ipmitool (1.8.1-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* New upstream release.
|
|
||||||
* Install ipmievd into /usr/sbin/.
|
|
||||||
|
|
||||||
-- Petter Reinholdtsen <pere@debian.org> Thu, 7 Apr 2005 01:18:44 +0200
|
|
||||||
|
|
||||||
ipmitool (1.8.0-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* Initial upload into Debian, based on the upstream build
|
|
||||||
rules. (Closes: #299924)
|
|
||||||
* Convert debian/changelog to UTF-8.
|
|
||||||
* Change section from 'contrib' to 'utils'.
|
|
||||||
* Build-depend on debhelper (>> 4.0.0) to match the rules file.
|
|
||||||
* Set Standards-version to 3.6.1.
|
|
||||||
* Make sure binary dependency is properly generated.
|
|
||||||
* Add long description, copied from the project README.
|
|
||||||
* Drop useless provides 'ipmitool', as the package is called 'ipmitool'.
|
|
||||||
* Don't install the COPYING file, as the license text already is
|
|
||||||
included in debian/copyright.
|
|
||||||
* Remove unused parts of the rules file.
|
|
||||||
* Correct clean target in rules file, to use 'distclean' and remove
|
|
||||||
configure-stamp not bogus config-stamp.
|
|
||||||
|
|
||||||
-- Petter Reinholdtsen <pere@debian.org> Sun, 3 Apr 2005 20:52:02 +0200
|
|
||||||
|
|
||||||
ipmitool (1.8.0) unstable; urgency=low
|
|
||||||
|
|
||||||
* Fix IPMIv2.0 issues
|
|
||||||
* Fix chassis boot parameter support
|
|
||||||
* Add support for linear sensors
|
|
||||||
|
|
||||||
-- Duncan Laurie <duncan@iceblink.org> Wed, Mar 16 2005 17:08:12 -0700
|
|
||||||
|
|
||||||
ipmitool (1.7.1) unstable; urgency=low
|
|
||||||
|
|
||||||
* Update bmc plugin to work with new Solaris bmc driver (new ioctl
|
|
||||||
for interface detection and new STREAMS message-based interface).
|
|
||||||
|
|
||||||
-- Seth Goldberg <sethmeisterg@hotmail.com> Mon, Mar 7 2005 18:03:00 -0800
|
|
||||||
|
|
||||||
ipmitool (1.7.0) unstable; urgency=low
|
|
||||||
|
|
||||||
* Propogate errors correctly so exit status will be useful
|
|
||||||
* More consistent display of errors including completion code text
|
|
||||||
* Errors and debug is send to stderr now
|
|
||||||
* New "sel get" command that will print details about SEL entry
|
|
||||||
and corresponding SDR records as well as FRUs via entity association
|
|
||||||
* Improved event generator, now supports reading events from text file
|
|
||||||
* New "-o oemtype" option for specifying OEM boards
|
|
||||||
exsting types are "supermicro" and "intelwv2"
|
|
||||||
* New PEF subsystem
|
|
||||||
* New "bmc" plugin for Solaris 10 x86
|
|
||||||
* Many bugfixes and contributed patches
|
|
||||||
|
|
||||||
-- Duncan Laurie <duncan@iceblink.org> Fri, Jan 7 2005 19:58:22 -0700
|
|
||||||
|
|
||||||
ipmitool (1.6.2) unstable; urgency=low
|
|
||||||
|
|
||||||
* Support for Supermicro BMC OEM authentication method
|
|
||||||
|
|
||||||
-- Duncan Laurie <duncan@iceblink.org> Mon, 16 Nov 2004 08:20:01 -0700
|
|
||||||
|
|
||||||
ipmitool (1.6.1) unstable; urgency=low
|
|
||||||
|
|
||||||
* Fix minor problem with LAN parameter setting
|
|
||||||
|
|
||||||
-- Duncan Laurie <duncan@iceblink.org> Wed, 29 Sep 2004 11:19:17 -0700
|
|
||||||
|
|
||||||
ipmitool (1.6.0) unstable; urgency=low
|
|
||||||
|
|
||||||
* Add a README
|
|
||||||
* Add support for IPMIv2 and Serial-over-LAN from Newisys
|
|
||||||
* Add Solaris x86 lipmi interface
|
|
||||||
* Add support for building Solaris packages
|
|
||||||
* Add support for building RPMs as non-root user
|
|
||||||
* Fix segfault when doing "sel list" (from Matthew Braithwaite)
|
|
||||||
* Fix "chassis identify" on some BMCs (from ebrower@sourceforge)
|
|
||||||
* Add "bmc info" and related output (from ebrower@sourceforge)
|
|
||||||
* new "shell" and "exec" commands
|
|
||||||
* lots of other contributed patches
|
|
||||||
|
|
||||||
-- Duncan Laurie <duncan@iceblink.org> Thu, 9 Sep 2004 21:39:37 -0700
|
|
||||||
|
|
||||||
ipmitool (1.5.9) unstable; urgency=low
|
|
||||||
|
|
||||||
* Add ability to get a particular sensor by name
|
|
||||||
* Add ability to set a particular sensor threshold
|
|
||||||
* Add support for displaying V2 channel authentication levels
|
|
||||||
* Add README for rrdtool scripts in contrib directory
|
|
||||||
* Improve lan interface retry handling
|
|
||||||
* Support prompting for password or reading from environment
|
|
||||||
* Move chaninfo command into channel subcommand
|
|
||||||
* Fix reservation ID handling when two sessions open to BMC
|
|
||||||
* Fix reading of large FRU data
|
|
||||||
* Add configure option for changing binary to ipmiadm for Solaris
|
|
||||||
* Fix compile problem on Solaris 8
|
|
||||||
|
|
||||||
-- Duncan Laurie <duncan@iceblink.org> Sat, 27 Mar 2004 00:11:37 -0700
|
|
||||||
|
|
||||||
ipmitool (1.5.8) unstable; urgency=low
|
|
||||||
|
|
||||||
* Enable static compilation of interfaces
|
|
||||||
* Fix types to be 64-bit safe
|
|
||||||
* Fix compilation problems on Solaris
|
|
||||||
* Fix multiple big-endian problems for Solaris/SPARC
|
|
||||||
* Fix channel access to save settings to NVRAM
|
|
||||||
* Set channel privilege limit to ADMIN during "access on"
|
|
||||||
* Enable gratuitous ARP in bmcautoconf.sh
|
|
||||||
* Add support for Linux kernel panic messages in SEL output
|
|
||||||
* Add support for type 3 SDR records
|
|
||||||
|
|
||||||
-- Duncan Laurie <duncan@iceblink.org> Tue, 27 Jan 2004 16:23:25 -0700
|
|
||||||
|
|
||||||
ipmitool (1.5.7) unstable; urgency=low
|
|
||||||
|
|
||||||
* add IPMIv1.5 eratta fixes
|
|
||||||
* additions to FRU printing and FRU multirecords
|
|
||||||
* better handling of SDR printing
|
|
||||||
* contrib scripts for creating rrdtool graphs
|
|
||||||
|
|
||||||
-- Duncan Laurie <duncan@iceblink.org> Mon, 5 Jan 2004 17:29:50 -0700
|
|
||||||
|
|
||||||
ipmitool (1.5.6) unstable; urgency=low
|
|
||||||
|
|
||||||
* Fix SEL event decoding for generic events
|
|
||||||
* Handle empty SEL gracefully when doing "sel list"
|
|
||||||
* Fix sdr handling of sensors that do not return a reading
|
|
||||||
* Fix for CSV display of sensor readings/units from Fredrik Öhrn
|
|
||||||
|
|
||||||
-- Duncan Laurie <duncan@iceblink.org> Thu, 4 Dec 2003 14:47:19 -0700
|
|
||||||
|
|
||||||
ipmitool (1.5.5) unstable; urgency=low
|
|
||||||
|
|
||||||
* Add -U option for setting LAN username
|
|
||||||
* Fix -v usage for plugin interfaces
|
|
||||||
|
|
||||||
-- Duncan Laurie <duncan@iceblink.org> Tue, 25 Nov 2003 15:10:48 -0700
|
|
||||||
|
|
||||||
ipmitool (1.5.4) unstable; urgency=low
|
|
||||||
|
|
||||||
* Put interface plugin API into library
|
|
||||||
* Fix ipmievd
|
|
||||||
|
|
||||||
-- Duncan Laurie <duncan@iceblink.org> Fri, 14 Nov 2003 15:16:34 -0700
|
|
||||||
|
|
||||||
ipmitool (1.5.3) unstable; urgency=low
|
|
||||||
|
|
||||||
* Add -g option to work with grizzly bmc
|
|
||||||
|
|
||||||
-- Duncan Laurie <duncan@iceblink.org> Mon, 3 Nov 2003 18:04:07 -0700
|
|
||||||
|
|
||||||
ipmitool (1.5.2) unstable; urgency=low
|
|
||||||
|
|
||||||
* add support for setting gratuitous arp interval
|
|
||||||
|
|
||||||
-- Duncan Laurie <duncan@iceblink.org> Fri, 24 Oct 2003 11:00:00 -0700
|
|
||||||
|
|
||||||
ipmitool (1.5.1) unstable; urgency=low
|
|
||||||
|
|
||||||
* better SEL support
|
|
||||||
* fix display bug in SDR list
|
|
||||||
|
|
||||||
-- Duncan Laurie <duncan@iceblink.org> Wed, 8 Oct 2003 17:28:51 -0700
|
|
||||||
|
|
||||||
ipmitool (1.5.0) unstable; urgency=low
|
|
||||||
|
|
||||||
* more robust UDP packet handling
|
|
||||||
* add Intel IMB driver support
|
|
||||||
* use autoconf/automake/libtool
|
|
||||||
|
|
||||||
-- Duncan Laurie <duncan@iceblink.org> Fri, 5 Sep 2003 11:57:32 -0700
|
|
||||||
|
|
||||||
ipmitool (1.2-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* New command line option parsing
|
|
||||||
* More chassis commands supported
|
|
||||||
|
|
||||||
-- Duncan Laurie <duncan@iceblink.org> Wed, 2 Apr 2003 17:44:17 -0700
|
|
||||||
|
|
||||||
ipmitool (1.1-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* Minor fixes.
|
|
||||||
|
|
||||||
-- Duncan Laurie <duncan@iceblink.org> Tue, 1 Apr 2003 14:31:10 -0700
|
|
||||||
|
|
||||||
ipmitool (1.0-1) unstable; urgency=low
|
|
||||||
|
|
||||||
* Initial Release.
|
|
||||||
|
|
||||||
-- Duncan Laurie <duncan@iceblink.org> Sun, 30 Mar 2003 21:30:46 -0700
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
|||||||
Source: ipmitool
|
|
||||||
Section: utils
|
|
||||||
Priority: optional
|
|
||||||
Maintainer: Petter Reinholdtsen <pere@debian.org>
|
|
||||||
Uploaders: Duncan Laurie <duncan@iceblink.org>
|
|
||||||
Build-Depends: debhelper (>> 4.0.0), libreadline5-dev | libreadline-dev, libssl-dev, autoconf, automake1.9 | automake, autotools-dev, libtool
|
|
||||||
Standards-Version: 3.6.2.1
|
|
||||||
|
|
||||||
Package: ipmitool
|
|
||||||
Architecture: i386 amd64 ia64
|
|
||||||
Depends: ${shlibs:Depends}, lsb-base
|
|
||||||
Suggests: openipmi
|
|
||||||
Description: utility for IPMI control with kernel driver or LAN interface
|
|
||||||
A utility for managing and configuring devices that support the
|
|
||||||
Intelligent Platform Management Interface. IPMI is an open standard
|
|
||||||
for monitoring, logging, recovery, inventory, and control of hardware
|
|
||||||
that is implemented independent of the main CPU, BIOS, and OS. The
|
|
||||||
service processor (or Baseboard Management Controller, BMC) is the
|
|
||||||
brain behind platform management and its primary purpose is to handle
|
|
||||||
the autonomous sensor monitoring and event logging features.
|
|
||||||
.
|
|
||||||
The ipmitool program provides a simple command-line interface to this
|
|
||||||
BMC. It features the ability to read the sensor data repository
|
|
||||||
(SDR) and print sensor values, display the contents of the System
|
|
||||||
Event Log (SEL), print Field Replaceable Unit (FRU) inventory
|
|
||||||
information, read and set LAN configuration parameters, and perform
|
|
||||||
remote chassis power control.
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
|||||||
This package was debianized by Duncan Laurie before
|
|
||||||
2003-11-18 17:55:21 +0100.
|
|
||||||
|
|
||||||
It was downloaded from <URL:http://ipmitool.sourceforge.net/>
|
|
||||||
|
|
||||||
Upstream Author: Duncan Laurie <duncan@iceblink.org>
|
|
||||||
|
|
||||||
Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
|
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
|
||||||
modification, are permitted provided that the following conditions
|
|
||||||
are met:
|
|
||||||
|
|
||||||
Redistribution of source code must retain the above copyright
|
|
||||||
notice, this list of conditions and the following disclaimer.
|
|
||||||
|
|
||||||
Redistribution in binary form must reproduce the above copyright
|
|
||||||
notice, this list of conditions and the following disclaimer in the
|
|
||||||
documentation and/or other materials provided with the distribution.
|
|
||||||
|
|
||||||
Neither the name of Sun Microsystems, Inc. or the names of
|
|
||||||
contributors may be used to endorse or promote products derived
|
|
||||||
from this software without specific prior written permission.
|
|
||||||
|
|
||||||
This software is provided "AS IS," without a warranty of any kind.
|
|
||||||
ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
|
|
||||||
INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
|
|
||||||
SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE
|
|
||||||
FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
|
|
||||||
OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL
|
|
||||||
SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
|
|
||||||
OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR
|
|
||||||
PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF
|
|
||||||
LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
|
|
||||||
EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
|
@ -1,4 +0,0 @@
|
|||||||
usr/bin
|
|
||||||
usr/sbin
|
|
||||||
usr/share/ipmitool
|
|
||||||
usr/share/doc/ipmitool
|
|
@ -1,2 +0,0 @@
|
|||||||
README
|
|
||||||
AUTHORS
|
|
@ -1,99 +0,0 @@
|
|||||||
#! /bin/sh
|
|
||||||
### BEGIN INIT INFO
|
|
||||||
# Provides: ipmievd
|
|
||||||
# Required-Start: $local_fs $remote_fs $syslog
|
|
||||||
# Required-Stop: $local_fs $remote_fs $syslog
|
|
||||||
# Default-Start: 2 3 4 5
|
|
||||||
# Default-Stop: S 0 1 6
|
|
||||||
# Short-Description: IPMI event daemon
|
|
||||||
# Description: ipmievd is a daemon which will listen for events
|
|
||||||
# from the BMC that are being sent to the SEL and
|
|
||||||
# also log those messages to syslog.
|
|
||||||
### END INIT INFO
|
|
||||||
#
|
|
||||||
# Author: Elmar Hoffmann <elho@elho.net>
|
|
||||||
# Licence: This script is public domain using the same
|
|
||||||
# licence as ipmitool itself.
|
|
||||||
# Modified by: Petter Reinholdtsen
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
|
||||||
DESC="IPMI event daemon"
|
|
||||||
NAME=ipmievd
|
|
||||||
DAEMON=/usr/sbin/$NAME
|
|
||||||
PIDFILE=/var/run/$NAME.pid
|
|
||||||
SCRIPTNAME=/etc/init.d/$NAME
|
|
||||||
|
|
||||||
# Gracefully exit if the package has been removed.
|
|
||||||
test -x $DAEMON || exit 0
|
|
||||||
|
|
||||||
. /lib/lsb/init-functions
|
|
||||||
. /etc/default/rcS
|
|
||||||
|
|
||||||
# Options used by ipmievd.
|
|
||||||
#
|
|
||||||
# "open" uses the asynchronous event notification from the OpenIPMI
|
|
||||||
# kernel driver, "sel" uses active polling of the contents of the SEL
|
|
||||||
# for new events.
|
|
||||||
#
|
|
||||||
# Need to force 'daemon' mode, to make sure messages are sent to
|
|
||||||
# syslog and the program forks into the background.
|
|
||||||
#
|
|
||||||
# Se ipmievd(8) for more info.
|
|
||||||
IPMIEVD_OPTIONS="open daemon"
|
|
||||||
|
|
||||||
# Read config file if it is present.
|
|
||||||
[ -f /etc/default/$NAME ] && . /etc/default/$NAME
|
|
||||||
|
|
||||||
# Backwards compatibility with version 1.8.6-2 and 1.8.6-1. The
|
|
||||||
# variable was renamed to be compatible with upstream, SuSe and RedHat.
|
|
||||||
if [ -n "$IPMIEVD_OPTS" ]; then
|
|
||||||
echo "warning: /etc/default/$NAME variable IPMIEVD_OPTS should be renamed to IPMIEVD_OPTIONS"
|
|
||||||
IPMIEVD_OPTIONS="$IPMIEVD_OPTS"
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# Function that starts the daemon/service.
|
|
||||||
#
|
|
||||||
d_start() {
|
|
||||||
start-stop-daemon --start --quiet --exec $DAEMON -- $IPMIEVD_OPTIONS
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Function that stops the daemon/service.
|
|
||||||
#
|
|
||||||
d_stop() {
|
|
||||||
start-stop-daemon --stop --quiet --name $NAME --exec $DAEMON
|
|
||||||
}
|
|
||||||
|
|
||||||
CODE=0
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
start)
|
|
||||||
[ "$VERBOSE" != no ] && log_begin_msg "Starting $DESC" "$NAME"
|
|
||||||
d_start || CODE=$?
|
|
||||||
[ "$VERBOSE" != no ] && log_end_msg $CODE
|
|
||||||
exit $CODE
|
|
||||||
;;
|
|
||||||
stop)
|
|
||||||
log_begin_msg "Stopping $DESC" "$NAME"
|
|
||||||
d_stop || CODE=$?
|
|
||||||
log_end_msg $CODE
|
|
||||||
exit $CODE
|
|
||||||
;;
|
|
||||||
restart|force-reload)
|
|
||||||
log_begin_msg "Restarting $DESC" "$NAME"
|
|
||||||
d_stop || true
|
|
||||||
sleep 1
|
|
||||||
d_start || CODE=$?
|
|
||||||
log_end_msg $CODE
|
|
||||||
exit $CODE
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
exit 0
|
|
@ -1,118 +0,0 @@
|
|||||||
#!/usr/bin/make -f
|
|
||||||
|
|
||||||
#export DH_VERBOSE=1
|
|
||||||
export DH_COMPAT=4
|
|
||||||
export DH_OPTIONS
|
|
||||||
|
|
||||||
CFLAGS = -Wall -g
|
|
||||||
|
|
||||||
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
|
|
||||||
CFLAGS += -O0
|
|
||||||
else
|
|
||||||
CFLAGS += -O2
|
|
||||||
endif
|
|
||||||
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
|
|
||||||
INSTALL_PROGRAM += -s
|
|
||||||
endif
|
|
||||||
|
|
||||||
configure: configure-stamp
|
|
||||||
configure-stamp:
|
|
||||||
dh_testdir
|
|
||||||
|
|
||||||
./bootstrap
|
|
||||||
|
|
||||||
./configure --prefix=/usr \
|
|
||||||
--with-kerneldir \
|
|
||||||
--mandir=/usr/share/man
|
|
||||||
touch configure-stamp
|
|
||||||
|
|
||||||
#Architecture
|
|
||||||
build: build-arch build-indep
|
|
||||||
|
|
||||||
build-arch: build-arch-stamp
|
|
||||||
build-arch-stamp: configure-stamp
|
|
||||||
|
|
||||||
# Add here commands to compile the arch part of the package.
|
|
||||||
$(MAKE)
|
|
||||||
|
|
||||||
build-indep: build-indep-stamp
|
|
||||||
build-indep-stamp: configure-stamp
|
|
||||||
|
|
||||||
# Add here commands to compile the indep part of the package.
|
|
||||||
#$(MAKE) doc
|
|
||||||
|
|
||||||
clean:
|
|
||||||
dh_testdir
|
|
||||||
dh_testroot
|
|
||||||
rm -f build-arch-stamp build-indep-stamp configure-stamp
|
|
||||||
|
|
||||||
# Add here commands to clean up after the build process.
|
|
||||||
-$(MAKE) distclean
|
|
||||||
|
|
||||||
dh_clean
|
|
||||||
|
|
||||||
install: install-arch #install-indep
|
|
||||||
install-indep:
|
|
||||||
dh_testdir
|
|
||||||
dh_testroot
|
|
||||||
dh_clean -k -i
|
|
||||||
dh_installdirs -i
|
|
||||||
|
|
||||||
# Add here commands to install the indep part of the package into
|
|
||||||
# debian/<package>-doc.
|
|
||||||
#INSTALLDOC#
|
|
||||||
# $(MAKE) install-doc DESTDIR=$(CURDIR)/debian/tmp/ipmitool-doc
|
|
||||||
# dh_movefiles -i
|
|
||||||
|
|
||||||
install-arch:
|
|
||||||
dh_testdir
|
|
||||||
dh_testroot
|
|
||||||
dh_clean -k -a
|
|
||||||
dh_installdirs -a
|
|
||||||
|
|
||||||
# Add here commands to install the arch part of the package into
|
|
||||||
# debian/tmp.
|
|
||||||
$(MAKE) install DESTDIR=$(CURDIR)/debian/ipmitool
|
|
||||||
|
|
||||||
# No need to have two copies of the license text in the package.
|
|
||||||
$(RM) $(CURDIR)/debian/ipmitool/usr/share/doc/ipmitool/COPYING
|
|
||||||
|
|
||||||
# Move upstream changelog to correct filename.
|
|
||||||
mv $(CURDIR)/debian/ipmitool/usr/share/doc/ipmitool/ChangeLog \
|
|
||||||
$(CURDIR)/debian/ipmitool/usr/share/doc/ipmitool/changelog
|
|
||||||
|
|
||||||
# Compress to avoid lintian warning. Not sure why dh_compress
|
|
||||||
# isn't fixing this.
|
|
||||||
gzip -9 $(CURDIR)/debian/ipmitool/usr/share/doc/ipmitool/changelog
|
|
||||||
|
|
||||||
# dh_movefiles -a
|
|
||||||
# Must not depend on anything. This is to be called by
|
|
||||||
# binary-arch/binary-multi
|
|
||||||
# in another 'make' thread.
|
|
||||||
binary-common:
|
|
||||||
dh_testdir
|
|
||||||
dh_testroot
|
|
||||||
dh_installdocs
|
|
||||||
dh_installchangelogs
|
|
||||||
dh_installinit --name ipmievd
|
|
||||||
dh_link
|
|
||||||
dh_strip
|
|
||||||
dh_compress
|
|
||||||
dh_fixperms
|
|
||||||
dh_makeshlibs
|
|
||||||
dh_shlibdeps
|
|
||||||
dh_installdeb
|
|
||||||
dh_gencontrol
|
|
||||||
dh_md5sums
|
|
||||||
dh_builddeb
|
|
||||||
# Build architecture independant packages using the common target.
|
|
||||||
binary-indep: build-indep install-indep
|
|
||||||
$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
|
|
||||||
|
|
||||||
# Build architecture dependant packages using the common target.
|
|
||||||
binary-arch: build-arch install-arch
|
|
||||||
$(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
|
|
||||||
|
|
||||||
binary: binary-arch #binary-indep
|
|
||||||
.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
|||||||
# Rename this file to "watch" and then you can run the "uscan" command
|
|
||||||
# to check for upstream updates and more.
|
|
||||||
# Site Directory Pattern Version Script
|
|
||||||
version=2
|
|
||||||
http://heanet.dl.sourceforge.net/sourceforge/ipmitool/ipmitool-(.*).tar.bz2
|
|
||||||
# debian uupdate
|
|
@ -1,42 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* Redistribution of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* Redistribution in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
*
|
|
||||||
* Neither the name of Sun Microsystems, Inc. or the names of
|
|
||||||
* contributors may be used to endorse or promote products derived
|
|
||||||
* from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* This software is provided "AS IS," without a warranty of any kind.
|
|
||||||
* ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
|
|
||||||
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
|
|
||||||
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
|
|
||||||
* SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE
|
|
||||||
* FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
|
|
||||||
* OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL
|
|
||||||
* SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
|
|
||||||
* OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR
|
|
||||||
* PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF
|
|
||||||
* LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
|
|
||||||
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef IPMI_KFWUM_H
|
|
||||||
#define IPMI_KFWUM_H
|
|
||||||
|
|
||||||
#include <inttypes.h>
|
|
||||||
#include <ipmitool/ipmi.h>
|
|
||||||
|
|
||||||
|
|
||||||
int ipmi_fwum_main(struct ipmi_intf *, int, char **);
|
|
||||||
|
|
||||||
#endif /* IPMI_KFWUM_H */
|
|
@ -1,41 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* Redistribution of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* Redistribution in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
*
|
|
||||||
* Neither the name of Sun Microsystems, Inc. or the names of
|
|
||||||
* contributors may be used to endorse or promote products derived
|
|
||||||
* from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* This software is provided "AS IS," without a warranty of any kind.
|
|
||||||
* ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
|
|
||||||
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
|
|
||||||
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
|
|
||||||
* SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE
|
|
||||||
* FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
|
|
||||||
* OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL
|
|
||||||
* SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
|
|
||||||
* OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR
|
|
||||||
* PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF
|
|
||||||
* LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
|
|
||||||
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef IPMI_HPMFWUPG_H
|
|
||||||
#define IPMI_HPMFWUPG_H
|
|
||||||
|
|
||||||
#include <inttypes.h>
|
|
||||||
#include <ipmitool/ipmi.h>
|
|
||||||
|
|
||||||
int ipmi_hpmfwupg_main(struct ipmi_intf *, int, char **);
|
|
||||||
|
|
||||||
#endif /* IPMI_KFWUM_H */
|
|
@ -1,935 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* Redistribution of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* Redistribution in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
*
|
|
||||||
* Neither the name of Sun Microsystems, Inc. or the names of
|
|
||||||
* contributors may be used to endorse or promote products derived
|
|
||||||
* from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* This software is provided "AS IS," without a warranty of any kind.
|
|
||||||
* ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
|
|
||||||
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
|
|
||||||
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
|
|
||||||
* SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE
|
|
||||||
* FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
|
|
||||||
* OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL
|
|
||||||
* SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
|
|
||||||
* OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR
|
|
||||||
* PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF
|
|
||||||
* LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
|
|
||||||
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <ipmitool/ipmi.h>
|
|
||||||
#include <ipmitool/log.h>
|
|
||||||
#include <ipmitool/helper.h>
|
|
||||||
#include <ipmitool/ipmi_intf.h>
|
|
||||||
#include <ipmitool/ipmi_fru.h>
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
extern int verbose;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Also, see ipmi_fru.c.
|
|
||||||
*
|
|
||||||
* Apparently some systems have problems with FRU access greater than 16 bytes
|
|
||||||
* at a time, even when using byte (not word) access. In order to ensure we
|
|
||||||
* work with the widest variety of hardware request size is capped at 16 bytes.
|
|
||||||
* Since this may result in slowdowns on some systems with lots of FRU data you
|
|
||||||
* can change this define to enable larger (up to 32 bytes at a time) access.
|
|
||||||
*/
|
|
||||||
#define FRU_DATA_RQST_SIZE 16;
|
|
||||||
|
|
||||||
const struct valstr spd_memtype_vals[] = {
|
|
||||||
{ 0x01, "STD FPM DRAM" },
|
|
||||||
{ 0x02, "EDO" },
|
|
||||||
{ 0x04, "SDRAM" },
|
|
||||||
{ 0x05, "ROM" },
|
|
||||||
{ 0x06, "DDR SGRAM" },
|
|
||||||
{ 0x07, "DDR SDRAM" },
|
|
||||||
{ 0x08, "DDR2 SDRAM" },
|
|
||||||
{ 0x09, "DDR2 SDRAM FB-DIMM" },
|
|
||||||
{ 0x0A, "DDR2 SDRAM FB-DIMM Probe" },
|
|
||||||
{ 0x0B, "DDR3 SDRAM" },
|
|
||||||
{ 0x00, NULL },
|
|
||||||
};
|
|
||||||
|
|
||||||
const struct valstr ddr3_density_vals[] =
|
|
||||||
{
|
|
||||||
{ 0, "256 Mb" },
|
|
||||||
{ 1, "512 Mb" },
|
|
||||||
{ 2, "1 Gb" },
|
|
||||||
{ 3, "2 Gb" },
|
|
||||||
{ 4, "4 Gb" },
|
|
||||||
{ 5, "8 Gb" },
|
|
||||||
{ 6, "16 Gb" },
|
|
||||||
{ 0x00, NULL },
|
|
||||||
};
|
|
||||||
|
|
||||||
const struct valstr ddr3_banks_vals[] =
|
|
||||||
{
|
|
||||||
{ 0, "3 (8 Banks)" },
|
|
||||||
{ 1, "4 (16 Banks)" },
|
|
||||||
{ 2, "5 (32 Banks)" },
|
|
||||||
{ 3, "6 (64 Banks)" },
|
|
||||||
{ 0x00, NULL },
|
|
||||||
};
|
|
||||||
|
|
||||||
const struct valstr ddr3_ecc_vals[] =
|
|
||||||
{
|
|
||||||
{ 0, "0 bits" },
|
|
||||||
{ 1, "8 bits" },
|
|
||||||
{ 0x00, NULL },
|
|
||||||
};
|
|
||||||
|
|
||||||
const struct valstr spd_config_vals[] = {
|
|
||||||
{ 0x00, "None" },
|
|
||||||
{ 0x01, "Parity" },
|
|
||||||
{ 0x02, "ECC" },
|
|
||||||
{ 0x04, "Addr Cmd Parity" },
|
|
||||||
{ 0x00, NULL },
|
|
||||||
};
|
|
||||||
|
|
||||||
const struct valstr spd_voltage_vals[] = {
|
|
||||||
{ 0x00, "5.0V TTL" },
|
|
||||||
{ 0x01, "LVTTL" },
|
|
||||||
{ 0x02, "HSTL 1.5V" },
|
|
||||||
{ 0x03, "SSTL 3.3V" },
|
|
||||||
{ 0x04, "SSTL 2.5V" },
|
|
||||||
{ 0x05, "SSTL 1.8V" },
|
|
||||||
{ 0x00, NULL },
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
* JEDEC Standard Manufacturers Identification Code
|
|
||||||
* publication JEP106N, December 2003
|
|
||||||
*/
|
|
||||||
|
|
||||||
const struct valstr jedec_id1_vals[] = {
|
|
||||||
{ 0x01, "AMD" },
|
|
||||||
{ 0x02, "AMI" },
|
|
||||||
{ 0x83, "Fairchild" },
|
|
||||||
{ 0x04, "Fujitsu" },
|
|
||||||
{ 0x85, "GTE" },
|
|
||||||
{ 0x86, "Harris" },
|
|
||||||
{ 0x07, "Hitachi" },
|
|
||||||
{ 0x08, "Inmos" },
|
|
||||||
{ 0x89, "Intel" },
|
|
||||||
{ 0x8a, "I.T.T." },
|
|
||||||
{ 0x0b, "Intersil" },
|
|
||||||
{ 0x8c, "Monolithic Memories" },
|
|
||||||
{ 0x0d, "Mostek" },
|
|
||||||
{ 0x0e, "Motorola" },
|
|
||||||
{ 0x8f, "National" },
|
|
||||||
{ 0x10, "NEC" },
|
|
||||||
{ 0x91, "RCA" },
|
|
||||||
{ 0x92, "Raytheon" },
|
|
||||||
{ 0x13, "Conexant (Rockwell)" },
|
|
||||||
{ 0x94, "Seeq" },
|
|
||||||
{ 0x15, "Philips Semi. (Signetics)" },
|
|
||||||
{ 0x16, "Synertek" },
|
|
||||||
{ 0x97, "Texas Instruments" },
|
|
||||||
{ 0x98, "Toshiba" },
|
|
||||||
{ 0x19, "Xicor" },
|
|
||||||
{ 0x1a, "Zilog" },
|
|
||||||
{ 0x9b, "Eurotechnique" },
|
|
||||||
{ 0x1c, "Mitsubishi" },
|
|
||||||
{ 0x9d, "Lucent (AT&T)" },
|
|
||||||
{ 0x9e, "Exel" },
|
|
||||||
{ 0x1f, "Atmel" },
|
|
||||||
{ 0x20, "SGS/Thomson" },
|
|
||||||
{ 0xa1, "Lattice Semi." },
|
|
||||||
{ 0xa2, "NCR" },
|
|
||||||
{ 0x23, "Wafer Scale Integration" },
|
|
||||||
{ 0xa4, "IBM" },
|
|
||||||
{ 0x25, "Tristar" },
|
|
||||||
{ 0x26, "Visic" },
|
|
||||||
{ 0xa7, "Intl. CMOS Technology" },
|
|
||||||
{ 0xa8, "SSSI" },
|
|
||||||
{ 0x29, "Microchip Technology" },
|
|
||||||
{ 0x2a, "Ricoh Ltd." },
|
|
||||||
{ 0xab, "VLSI" },
|
|
||||||
{ 0x2c, "Micron Technology" },
|
|
||||||
{ 0xad, "Hyundai Electronics" },
|
|
||||||
{ 0xae, "OKI Semiconductor" },
|
|
||||||
{ 0x2f, "ACTEL" },
|
|
||||||
{ 0xb0, "Sharp" },
|
|
||||||
{ 0x31, "Catalyst" },
|
|
||||||
{ 0x32, "Panasonic" },
|
|
||||||
{ 0xb3, "IDT" },
|
|
||||||
{ 0x34, "Cypress" },
|
|
||||||
{ 0xb5, "DEC" },
|
|
||||||
{ 0xb6, "LSI Logic" },
|
|
||||||
{ 0x37, "Zarlink" },
|
|
||||||
{ 0x38, "UTMC" },
|
|
||||||
{ 0xb9, "Thinking Machine" },
|
|
||||||
{ 0xba, "Thomson CSF" },
|
|
||||||
{ 0x3b, "Integrated CMOS(Vertex)" },
|
|
||||||
{ 0xbc, "Honeywell" },
|
|
||||||
{ 0x3d, "Tektronix" },
|
|
||||||
{ 0x3e, "Sun Microsystems" },
|
|
||||||
{ 0xbf, "SST" },
|
|
||||||
{ 0x40, "MOSEL" },
|
|
||||||
{ 0xc1, "Infineon" },
|
|
||||||
{ 0xc2, "Macronix" },
|
|
||||||
{ 0x43, "Xerox" },
|
|
||||||
{ 0xc4, "Plus Logic" },
|
|
||||||
{ 0x45, "SunDisk" },
|
|
||||||
{ 0x46, "Elan Circuit Tech." },
|
|
||||||
{ 0xc7, "European Silicon Str." },
|
|
||||||
{ 0xc8, "Apple Computer" },
|
|
||||||
{ 0xc9, "Xilinx" },
|
|
||||||
{ 0x4a, "Compaq" },
|
|
||||||
{ 0xcb, "Protocol Engines" },
|
|
||||||
{ 0x4c, "SCI" },
|
|
||||||
{ 0xcd, "Seiko Instruments" },
|
|
||||||
{ 0xce, "Samsung" },
|
|
||||||
{ 0x4f, "I3 Design System" },
|
|
||||||
{ 0xd0, "Klic" },
|
|
||||||
{ 0x51, "Crosspoint Solutions" },
|
|
||||||
{ 0x52, "Alliance Semiconductor" },
|
|
||||||
{ 0xd3, "Tandem" },
|
|
||||||
{ 0x54, "Hewlett-Packard" },
|
|
||||||
{ 0xd5, "Intg. Silicon Solutions" },
|
|
||||||
{ 0xd6, "Brooktree" },
|
|
||||||
{ 0x57, "New Media" },
|
|
||||||
{ 0x58, "MHS Electronic" },
|
|
||||||
{ 0xd9, "Performance Semi." },
|
|
||||||
{ 0xda, "Winbond Electronic" },
|
|
||||||
{ 0x5b, "Kawasaki Steel" },
|
|
||||||
{ 0xdc, "Bright Micro" },
|
|
||||||
{ 0x5d, "TECMAR" },
|
|
||||||
{ 0x5e, "Exar" },
|
|
||||||
{ 0xdf, "PCMCIA" },
|
|
||||||
{ 0xe0, "LG Semiconductor" },
|
|
||||||
{ 0x61, "Northern Telecom" },
|
|
||||||
{ 0x62, "Sanyo" },
|
|
||||||
{ 0xe3, "Array Microsystems" },
|
|
||||||
{ 0x64, "Crystal Semiconductor" },
|
|
||||||
{ 0xe5, "Analog Devices" },
|
|
||||||
{ 0xe6, "PMC-Sierra" },
|
|
||||||
{ 0x67, "Asparix" },
|
|
||||||
{ 0x68, "Convex Computer" },
|
|
||||||
{ 0xe9, "Quality Semiconductor" },
|
|
||||||
{ 0xea, "Nimbus Technology" },
|
|
||||||
{ 0x6b, "Transwitch" },
|
|
||||||
{ 0xec, "Micronas (ITT Intermetall)" },
|
|
||||||
{ 0x6d, "Cannon" },
|
|
||||||
{ 0x6e, "Altera" },
|
|
||||||
{ 0xef, "NEXCOM" },
|
|
||||||
{ 0x70, "QUALCOMM" },
|
|
||||||
{ 0xf1, "Sony" },
|
|
||||||
{ 0xf2, "Cray Research" },
|
|
||||||
{ 0x73, "AMS (Austria Micro)" },
|
|
||||||
{ 0xf4, "Vitesse" },
|
|
||||||
{ 0x75, "Aster Electronics" },
|
|
||||||
{ 0x76, "Bay Networks (Synoptic)" },
|
|
||||||
{ 0xf7, "Zentrum" },
|
|
||||||
{ 0xf8, "TRW" },
|
|
||||||
{ 0x79, "Thesys" },
|
|
||||||
{ 0x7a, "Solbourne Computer" },
|
|
||||||
{ 0xfb, "Allied-Signal" },
|
|
||||||
{ 0x7c, "Dialog" },
|
|
||||||
{ 0xfd, "Media Vision" },
|
|
||||||
{ 0xfe, "Level One Communication" },
|
|
||||||
{ 0x00, NULL },
|
|
||||||
};
|
|
||||||
|
|
||||||
const struct valstr jedec_id2_vals[] = {
|
|
||||||
{ 0x01, "Cirrus Logic" },
|
|
||||||
{ 0x02, "National Instruments" },
|
|
||||||
{ 0x83, "ILC Data Device" },
|
|
||||||
{ 0x04, "Alcatel Mietec" },
|
|
||||||
{ 0x85, "Micro Linear" },
|
|
||||||
{ 0x86, "Univ. of NC" },
|
|
||||||
{ 0x07, "JTAG Technologies" },
|
|
||||||
{ 0x08, "Loral" },
|
|
||||||
{ 0x89, "Nchip" },
|
|
||||||
{ 0x8A, "Galileo Tech" },
|
|
||||||
{ 0x0B, "Bestlink Systems" },
|
|
||||||
{ 0x8C, "Graychip" },
|
|
||||||
{ 0x0D, "GENNUM" },
|
|
||||||
{ 0x0E, "VideoLogic" },
|
|
||||||
{ 0x8F, "Robert Bosch" },
|
|
||||||
{ 0x10, "Chip Express" },
|
|
||||||
{ 0x91, "DATARAM" },
|
|
||||||
{ 0x92, "United Microelec Corp." },
|
|
||||||
{ 0x13, "TCSI" },
|
|
||||||
{ 0x94, "Smart Modular" },
|
|
||||||
{ 0x15, "Hughes Aircraft" },
|
|
||||||
{ 0x16, "Lanstar Semiconductor" },
|
|
||||||
{ 0x97, "Qlogic" },
|
|
||||||
{ 0x98, "Kingston" },
|
|
||||||
{ 0x19, "Music Semi" },
|
|
||||||
{ 0x1A, "Ericsson Components" },
|
|
||||||
{ 0x9B, "SpaSE" },
|
|
||||||
{ 0x1C, "Eon Silicon Devices" },
|
|
||||||
{ 0x9D, "Programmable Micro Corp" },
|
|
||||||
{ 0x9E, "DoD" },
|
|
||||||
{ 0x1F, "Integ. Memories Tech." },
|
|
||||||
{ 0x20, "Corollary Inc." },
|
|
||||||
{ 0xA1, "Dallas Semiconductor" },
|
|
||||||
{ 0xA2, "Omnivision" },
|
|
||||||
{ 0x23, "EIV(Switzerland)" },
|
|
||||||
{ 0xA4, "Novatel Wireless" },
|
|
||||||
{ 0x25, "Zarlink (formerly Mitel)" },
|
|
||||||
{ 0x26, "Clearpoint" },
|
|
||||||
{ 0xA7, "Cabletron" },
|
|
||||||
{ 0xA8, "Silicon Technology" },
|
|
||||||
{ 0x29, "Vanguard" },
|
|
||||||
{ 0x2A, "Hagiwara Sys-Com" },
|
|
||||||
{ 0xAB, "Vantis" },
|
|
||||||
{ 0x2C, "Celestica" },
|
|
||||||
{ 0xAD, "Century" },
|
|
||||||
{ 0xAE, "Hal Computers" },
|
|
||||||
{ 0x2F, "Rohm Company Ltd." },
|
|
||||||
{ 0xB0, "Juniper Networks" },
|
|
||||||
{ 0x31, "Libit Signal Processing" },
|
|
||||||
{ 0x32, "Enhanced Memories Inc." },
|
|
||||||
{ 0xB3, "Tundra Semiconductor" },
|
|
||||||
{ 0x34, "Adaptec Inc." },
|
|
||||||
{ 0xB5, "LightSpeed Semi." },
|
|
||||||
{ 0xB6, "ZSP Corp." },
|
|
||||||
{ 0x37, "AMIC Technology" },
|
|
||||||
{ 0x38, "Adobe Systems" },
|
|
||||||
{ 0xB9, "Dynachip" },
|
|
||||||
{ 0xBA, "PNY Electronics" },
|
|
||||||
{ 0x3B, "Newport Digital" },
|
|
||||||
{ 0xBC, "MMC Networks" },
|
|
||||||
{ 0x3D, "T Square" },
|
|
||||||
{ 0x3E, "Seiko Epson" },
|
|
||||||
{ 0xBF, "Broadcom" },
|
|
||||||
{ 0x40, "Viking Components" },
|
|
||||||
{ 0xC1, "V3 Semiconductor" },
|
|
||||||
{ 0xC2, "Flextronics (formerly Orbit)" },
|
|
||||||
{ 0x43, "Suwa Electronics" },
|
|
||||||
{ 0xC4, "Transmeta" },
|
|
||||||
{ 0x45, "Micron CMS" },
|
|
||||||
{ 0x46, "American Computer & Digital Components Inc" },
|
|
||||||
{ 0xC7, "Enhance 3000 Inc" },
|
|
||||||
{ 0xC8, "Tower Semiconductor" },
|
|
||||||
{ 0x49, "CPU Design" },
|
|
||||||
{ 0x4A, "Price Point" },
|
|
||||||
{ 0xCB, "Maxim Integrated Product" },
|
|
||||||
{ 0x4C, "Tellabs" },
|
|
||||||
{ 0xCD, "Centaur Technology" },
|
|
||||||
{ 0xCE, "Unigen Corporation" },
|
|
||||||
{ 0x4F, "Transcend Information" },
|
|
||||||
{ 0xD0, "Memory Card Technology" },
|
|
||||||
{ 0x51, "CKD Corporation Ltd." },
|
|
||||||
{ 0x52, "Capital Instruments, Inc." },
|
|
||||||
{ 0xD3, "Aica Kogyo, Ltd." },
|
|
||||||
{ 0x54, "Linvex Technology" },
|
|
||||||
{ 0xD5, "MSC Vertriebs GmbH" },
|
|
||||||
{ 0xD6, "AKM Company, Ltd." },
|
|
||||||
{ 0x57, "Dynamem, Inc." },
|
|
||||||
{ 0x58, "NERA ASA" },
|
|
||||||
{ 0xD9, "GSI Technology" },
|
|
||||||
{ 0xDA, "Dane-Elec (C Memory)" },
|
|
||||||
{ 0x5B, "Acorn Computers" },
|
|
||||||
{ 0xDC, "Lara Technology" },
|
|
||||||
{ 0x5D, "Oak Technology, Inc." },
|
|
||||||
{ 0x5E, "Itec Memory" },
|
|
||||||
{ 0xDF, "Tanisys Technology" },
|
|
||||||
{ 0xE0, "Truevision" },
|
|
||||||
{ 0x61, "Wintec Industries" },
|
|
||||||
{ 0x62, "Super PC Memory" },
|
|
||||||
{ 0xE3, "MGV Memory" },
|
|
||||||
{ 0x64, "Galvantech" },
|
|
||||||
{ 0xE5, "Gadzoox Nteworks" },
|
|
||||||
{ 0xE6, "Multi Dimensional Cons." },
|
|
||||||
{ 0x67, "GateField" },
|
|
||||||
{ 0x68, "Integrated Memory System" },
|
|
||||||
{ 0xE9, "Triscend" },
|
|
||||||
{ 0xEA, "XaQti" },
|
|
||||||
{ 0x6B, "Goldenram" },
|
|
||||||
{ 0xEC, "Clear Logic" },
|
|
||||||
{ 0x6D, "Cimaron Communications" },
|
|
||||||
{ 0x6E, "Nippon Steel Semi. Corp." },
|
|
||||||
{ 0xEF, "Advantage Memory" },
|
|
||||||
{ 0x70, "AMCC" },
|
|
||||||
{ 0xF1, "LeCroy" },
|
|
||||||
{ 0xF2, "Yamaha Corporation" },
|
|
||||||
{ 0x73, "Digital Microwave" },
|
|
||||||
{ 0xF4, "NetLogic Microsystems" },
|
|
||||||
{ 0x75, "MIMOS Semiconductor" },
|
|
||||||
{ 0x76, "Advanced Fibre" },
|
|
||||||
{ 0xF7, "BF Goodrich Data." },
|
|
||||||
{ 0xF8, "Epigram" },
|
|
||||||
{ 0x79, "Acbel Polytech Inc." },
|
|
||||||
{ 0x7A, "Apacer Technology" },
|
|
||||||
{ 0xFB, "Admor Memory" },
|
|
||||||
{ 0x7C, "FOXCONN" },
|
|
||||||
{ 0xFD, "Quadratics Superconductor" },
|
|
||||||
{ 0xFE, "3COM" },
|
|
||||||
{ 0x00, NULL },
|
|
||||||
};
|
|
||||||
|
|
||||||
const struct valstr jedec_id3_vals[] = {
|
|
||||||
{ 0x01, "Camintonn Corporation" },
|
|
||||||
{ 0x02, "ISOA Incorporated" },
|
|
||||||
{ 0x83, "Agate Semiconductor" },
|
|
||||||
{ 0x04, "ADMtek Incorporated" },
|
|
||||||
{ 0x85, "HYPERTEC" },
|
|
||||||
{ 0x86, "Adhoc Technologies" },
|
|
||||||
{ 0x07, "MOSAID Technologies" },
|
|
||||||
{ 0x08, "Ardent Technologies" },
|
|
||||||
{ 0x89, "Switchcore" },
|
|
||||||
{ 0x8A, "Cisco Systems, Inc." },
|
|
||||||
{ 0x0B, "Allayer Technologies" },
|
|
||||||
{ 0x8C, "WorkX AG" },
|
|
||||||
{ 0x0D, "Oasis Semiconductor" },
|
|
||||||
{ 0x0E, "Novanet Semiconductor" },
|
|
||||||
{ 0x8F, "E-M Solutions" },
|
|
||||||
{ 0x10, "Power General" },
|
|
||||||
{ 0x91, "Advanced Hardware Arch." },
|
|
||||||
{ 0x92, "Inova Semiconductors GmbH" },
|
|
||||||
{ 0x13, "Telocity" },
|
|
||||||
{ 0x94, "Delkin Devices" },
|
|
||||||
{ 0x15, "Symagery Microsystems" },
|
|
||||||
{ 0x16, "C-Port Corporation" },
|
|
||||||
{ 0x97, "SiberCore Technologies" },
|
|
||||||
{ 0x98, "Southland Microsystems" },
|
|
||||||
{ 0x19, "Malleable Technologies" },
|
|
||||||
{ 0x1A, "Kendin Communications" },
|
|
||||||
{ 0x9B, "Great Technology Microcomputer" },
|
|
||||||
{ 0x1C, "Sanmina Corporation" },
|
|
||||||
{ 0x9D, "HADCO Corporation" },
|
|
||||||
{ 0x9E, "Corsair" },
|
|
||||||
{ 0x1F, "Actrans System Inc." },
|
|
||||||
{ 0x20, "ALPHA Technologies" },
|
|
||||||
{ 0xA1, "Cygnal Integrated Products Incorporated" },
|
|
||||||
{ 0xA2, "Artesyn Technologies" },
|
|
||||||
{ 0x23, "Align Manufacturing" },
|
|
||||||
{ 0xA4, "Peregrine Semiconductor" },
|
|
||||||
{ 0x25, "Chameleon Systems" },
|
|
||||||
{ 0x26, "Aplus Flash Technology" },
|
|
||||||
{ 0xA7, "MIPS Technologies" },
|
|
||||||
{ 0xA8, "Chrysalis ITS" },
|
|
||||||
{ 0x29, "ADTEC Corporation" },
|
|
||||||
{ 0x2A, "Kentron Technologies" },
|
|
||||||
{ 0xAB, "Win Technologies" },
|
|
||||||
{ 0x2C, "ASIC Designs Inc" },
|
|
||||||
{ 0xAD, "Extreme Packet Devices" },
|
|
||||||
{ 0xAE, "RF Micro Devices" },
|
|
||||||
{ 0x2F, "Siemens AG" },
|
|
||||||
{ 0xB0, "Sarnoff Corporation" },
|
|
||||||
{ 0x31, "Itautec Philco SA" },
|
|
||||||
{ 0x32, "Radiata Inc." },
|
|
||||||
{ 0xB3, "Benchmark Elect. (AVEX)" },
|
|
||||||
{ 0x34, "Legend" },
|
|
||||||
{ 0xB5, "SpecTek Incorporated" },
|
|
||||||
{ 0xB6, "Hi/fn" },
|
|
||||||
{ 0x37, "Enikia Incorporated" },
|
|
||||||
{ 0x38, "SwitchOn Networks" },
|
|
||||||
{ 0xB9, "AANetcom Incorporated" },
|
|
||||||
{ 0xBA, "Micro Memory Bank" },
|
|
||||||
{ 0x3B, "ESS Technology" },
|
|
||||||
{ 0xBC, "Virata Corporation" },
|
|
||||||
{ 0x3D, "Excess Bandwidth" },
|
|
||||||
{ 0x3E, "West Bay Semiconductor" },
|
|
||||||
{ 0xBF, "DSP Group" },
|
|
||||||
{ 0x40, "Newport Communications" },
|
|
||||||
{ 0xC1, "Chip2Chip Incorporated" },
|
|
||||||
{ 0xC2, "Phobos Corporation" },
|
|
||||||
{ 0x43, "Intellitech Corporation" },
|
|
||||||
{ 0xC4, "Nordic VLSI ASA" },
|
|
||||||
{ 0x45, "Ishoni Networks" },
|
|
||||||
{ 0x46, "Silicon Spice" },
|
|
||||||
{ 0xC7, "Alchemy Semiconductor" },
|
|
||||||
{ 0xC8, "Agilent Technologies" },
|
|
||||||
{ 0x49, "Centillium Communications" },
|
|
||||||
{ 0x4A, "W.L. Gore" },
|
|
||||||
{ 0xCB, "HanBit Electronics" },
|
|
||||||
{ 0x4C, "GlobeSpan" },
|
|
||||||
{ 0xCD, "Element 14" },
|
|
||||||
{ 0xCE, "Pycon" },
|
|
||||||
{ 0x4F, "Saifun Semiconductors" },
|
|
||||||
{ 0xD0, "Sibyte, Incorporated" },
|
|
||||||
{ 0x51, "MetaLink Technologies" },
|
|
||||||
{ 0x52, "Feiya Technology" },
|
|
||||||
{ 0xD3, "I & C Technology" },
|
|
||||||
{ 0x54, "Shikatronics" },
|
|
||||||
{ 0xD5, "Elektrobit" },
|
|
||||||
{ 0xD6, "Megic" },
|
|
||||||
{ 0x57, "Com-Tier" },
|
|
||||||
{ 0x58, "Malaysia Micro Solutions" },
|
|
||||||
{ 0xD9, "Hyperchip" },
|
|
||||||
{ 0xDA, "Gemstone Communications" },
|
|
||||||
{ 0x5B, "Anadyne Microelectronics" },
|
|
||||||
{ 0xDC, "3ParData" },
|
|
||||||
{ 0x5D, "Mellanox Technologies" },
|
|
||||||
{ 0x5E, "Tenx Technologies" },
|
|
||||||
{ 0xDF, "Helix AG" },
|
|
||||||
{ 0xE0, "Domosys" },
|
|
||||||
{ 0x61, "Skyup Technology" },
|
|
||||||
{ 0x62, "HiNT Corporation" },
|
|
||||||
{ 0xE3, "Chiaro" },
|
|
||||||
{ 0x64, "MCI Computer GMBH" },
|
|
||||||
{ 0xE5, "Exbit Technology A/S" },
|
|
||||||
{ 0xE6, "Integrated Technology Express" },
|
|
||||||
{ 0x67, "AVED Memory" },
|
|
||||||
{ 0x68, "Legerity" },
|
|
||||||
{ 0xE9, "Jasmine Networks" },
|
|
||||||
{ 0xEA, "Caspian Networks" },
|
|
||||||
{ 0x6B, "nCUBE" },
|
|
||||||
{ 0xEC, "Silicon Access Networks" },
|
|
||||||
{ 0x6D, "FDK Corporation" },
|
|
||||||
{ 0x6E, "High Bandwidth Access" },
|
|
||||||
{ 0xEF, "MultiLink Technology" },
|
|
||||||
{ 0x70, "BRECIS" },
|
|
||||||
{ 0xF1, "World Wide Packets" },
|
|
||||||
{ 0xF2, "APW" },
|
|
||||||
{ 0x73, "Chicory Systems" },
|
|
||||||
{ 0xF4, "Xstream Logic" },
|
|
||||||
{ 0x75, "Fast-Chip" },
|
|
||||||
{ 0x76, "Zucotto Wireless" },
|
|
||||||
{ 0xF7, "Realchip" },
|
|
||||||
{ 0xF8, "Galaxy Power" },
|
|
||||||
{ 0x79, "eSilicon" },
|
|
||||||
{ 0x7A, "Morphics Technology" },
|
|
||||||
{ 0xFB, "Accelerant Networks" },
|
|
||||||
{ 0x7C, "Silicon Wave" },
|
|
||||||
{ 0xFD, "SandCraft" },
|
|
||||||
{ 0xFE, "Elpida" },
|
|
||||||
{ 0x00, NULL },
|
|
||||||
};
|
|
||||||
|
|
||||||
const struct valstr jedec_id4_vals[] = {
|
|
||||||
{ 0x01, "Solectron" },
|
|
||||||
{ 0x02, "Optosys Technologies" },
|
|
||||||
{ 0x83, "Buffalo (Formerly Melco)" },
|
|
||||||
{ 0x04, "TriMedia Technologies" },
|
|
||||||
{ 0x85, "Cyan Technologies" },
|
|
||||||
{ 0x86, "Global Locate" },
|
|
||||||
{ 0x07, "Optillion" },
|
|
||||||
{ 0x08, "Terago Communications" },
|
|
||||||
{ 0x89, "Ikanos Communications" },
|
|
||||||
{ 0x8A, "Princeton Technology" },
|
|
||||||
{ 0x0B, "Nanya Technology" },
|
|
||||||
{ 0x8C, "Elite Flash Storage" },
|
|
||||||
{ 0x0D, "Mysticom" },
|
|
||||||
{ 0x0E, "LightSand Communications" },
|
|
||||||
{ 0x8F, "ATI Technologies" },
|
|
||||||
{ 0x10, "Agere Systems" },
|
|
||||||
{ 0x91, "NeoMagic" },
|
|
||||||
{ 0x92, "AuroraNetics" },
|
|
||||||
{ 0x13, "Golden Empire" },
|
|
||||||
{ 0x94, "Muskin" },
|
|
||||||
{ 0x15, "Tioga Technologies" },
|
|
||||||
{ 0x16, "Netlist" },
|
|
||||||
{ 0x97, "TeraLogic" },
|
|
||||||
{ 0x98, "Cicada Semiconductor" },
|
|
||||||
{ 0x19, "Centon Electronics" },
|
|
||||||
{ 0x1A, "Tyco Electronics" },
|
|
||||||
{ 0x9B, "Magis Works" },
|
|
||||||
{ 0x1C, "Zettacom" },
|
|
||||||
{ 0x9D, "Cogency Semiconductor" },
|
|
||||||
{ 0x9E, "Chipcon AS" },
|
|
||||||
{ 0x1F, "Aspex Technology" },
|
|
||||||
{ 0x20, "F5 Networks" },
|
|
||||||
{ 0xA1, "Programmable Silicon Solutions" },
|
|
||||||
{ 0xA2, "ChipWrights" },
|
|
||||||
{ 0x23, "Acorn Networks" },
|
|
||||||
{ 0xA4, "Quicklogic" },
|
|
||||||
{ 0x25, "Kingmax Semiconductor" },
|
|
||||||
{ 0x26, "BOPS" },
|
|
||||||
{ 0xA7, "Flasys" },
|
|
||||||
{ 0xA8, "BitBlitz Communications" },
|
|
||||||
{ 0x29, "eMemory Technology" },
|
|
||||||
{ 0x2A, "Procket Networks" },
|
|
||||||
{ 0xAB, "Purple Ray" },
|
|
||||||
{ 0x2C, "Trebia Networks" },
|
|
||||||
{ 0xAD, "Delta Electronics" },
|
|
||||||
{ 0xAE, "Onex Communications" },
|
|
||||||
{ 0x2F, "Ample Communications" },
|
|
||||||
{ 0xB0, "Memory Experts Intl" },
|
|
||||||
{ 0x31, "Astute Networks" },
|
|
||||||
{ 0x32, "Azanda Network Devices" },
|
|
||||||
{ 0xB3, "Dibcom" },
|
|
||||||
{ 0x34, "Tekmos" },
|
|
||||||
{ 0xB5, "API NetWorks" },
|
|
||||||
{ 0xB6, "Bay Microsystems" },
|
|
||||||
{ 0x37, "Firecron Ltd" },
|
|
||||||
{ 0x38, "Resonext Communications" },
|
|
||||||
{ 0xB9, "Tachys Technologies" },
|
|
||||||
{ 0xBA, "Equator Technology" },
|
|
||||||
{ 0x3B, "Concept Computer" },
|
|
||||||
{ 0xBC, "SILCOM" },
|
|
||||||
{ 0x3D, "3Dlabs" },
|
|
||||||
{ 0x3E, "ct Magazine" },
|
|
||||||
{ 0xBF, "Sanera Systems" },
|
|
||||||
{ 0x40, "Silicon Packets" },
|
|
||||||
{ 0xC1, "Viasystems Group" },
|
|
||||||
{ 0xC2, "Simtek" },
|
|
||||||
{ 0x43, "Semicon Devices Singapore" },
|
|
||||||
{ 0xC4, "Satron Handelsges" },
|
|
||||||
{ 0x45, "Improv Systems" },
|
|
||||||
{ 0x46, "INDUSYS GmbH" },
|
|
||||||
{ 0xC7, "Corrent" },
|
|
||||||
{ 0xC8, "Infrant Technologies" },
|
|
||||||
{ 0x49, "Ritek Corp" },
|
|
||||||
{ 0x4A, "empowerTel Networks" },
|
|
||||||
{ 0xCB, "Hypertec" },
|
|
||||||
{ 0x4C, "Cavium Networks" },
|
|
||||||
{ 0xCD, "PLX Technology" },
|
|
||||||
{ 0xCE, "Massana Design" },
|
|
||||||
{ 0x4F, "Intrinsity" },
|
|
||||||
{ 0xD0, "Valence Semiconductor" },
|
|
||||||
{ 0x51, "Terawave Communications" },
|
|
||||||
{ 0x52, "IceFyre Semiconductor" },
|
|
||||||
{ 0xD3, "Primarion" },
|
|
||||||
{ 0x54, "Picochip Designs Ltd" },
|
|
||||||
{ 0xD5, "Silverback Systems" },
|
|
||||||
{ 0xD6, "Jade Star Technologies" },
|
|
||||||
{ 0x57, "Pijnenburg Securealink" },
|
|
||||||
{ 0x58, "MemorySolutioN" },
|
|
||||||
{ 0xD9, "Cambridge Silicon Radio" },
|
|
||||||
{ 0xDA, "Swissbit" },
|
|
||||||
{ 0x5B, "Nazomi Communications" },
|
|
||||||
{ 0xDC, "eWave System" },
|
|
||||||
{ 0x5D, "Rockwell Collins" },
|
|
||||||
{ 0x5E, "PAION" },
|
|
||||||
{ 0xDF, "Alphamosaic Ltd" },
|
|
||||||
{ 0xE0, "Sandburst" },
|
|
||||||
{ 0x61, "SiCon Video" },
|
|
||||||
{ 0x62, "NanoAmp Solutions" },
|
|
||||||
{ 0xE3, "Ericsson Technology" },
|
|
||||||
{ 0x64, "PrairieComm" },
|
|
||||||
{ 0xE5, "Mitac International" },
|
|
||||||
{ 0xE6, "Layer N Networks" },
|
|
||||||
{ 0x67, "Atsana Semiconductor" },
|
|
||||||
{ 0x68, "Allegro Networks" },
|
|
||||||
{ 0xE9, "Marvell Semiconductors" },
|
|
||||||
{ 0xEA, "Netergy Microelectronic" },
|
|
||||||
{ 0x6B, "NVIDIA" },
|
|
||||||
{ 0xEC, "Internet Machines" },
|
|
||||||
{ 0x6D, "Peak Electronics" },
|
|
||||||
{ 0xEF, "Accton Technology" },
|
|
||||||
{ 0x70, "Teradiant Networks" },
|
|
||||||
{ 0xF1, "Europe Technologies" },
|
|
||||||
{ 0xF2, "Cortina Systems" },
|
|
||||||
{ 0x73, "RAM Components" },
|
|
||||||
{ 0xF4, "Raqia Networks" },
|
|
||||||
{ 0x75, "ClearSpeed" },
|
|
||||||
{ 0x76, "Matsushita Battery" },
|
|
||||||
{ 0xF7, "Xelerated" },
|
|
||||||
{ 0xF8, "SimpleTech" },
|
|
||||||
{ 0x79, "Utron Technology" },
|
|
||||||
{ 0x7A, "Astec International" },
|
|
||||||
{ 0xFB, "AVM gmbH" },
|
|
||||||
{ 0x7C, "Redux Communications" },
|
|
||||||
{ 0xFD, "Dot Hill Systems" },
|
|
||||||
{ 0xFE, "TeraChip" },
|
|
||||||
{ 0x00, NULL },
|
|
||||||
};
|
|
||||||
|
|
||||||
const struct valstr jedec_id5_vals[] = {
|
|
||||||
{ 0x01, "T-RAM Incorporated" },
|
|
||||||
{ 0x02, "Innovics Wireless" },
|
|
||||||
{ 0x83, "Teknovus" },
|
|
||||||
{ 0x04, "KeyEye Communications" },
|
|
||||||
{ 0x85, "Runcom Technologies" },
|
|
||||||
{ 0x86, "RedSwitch" },
|
|
||||||
{ 0x07, "Dotcast" },
|
|
||||||
{ 0x08, "Silicon Mountain Memory" },
|
|
||||||
{ 0x89, "Signia Technologies" },
|
|
||||||
{ 0x8A, "Pixim" },
|
|
||||||
{ 0x0B, "Galazar Networks" },
|
|
||||||
{ 0x8C, "White Electronic Designs" },
|
|
||||||
{ 0x0D, "Patriot Scientific" },
|
|
||||||
{ 0x0E, "Neoaxiom Corporation" },
|
|
||||||
{ 0x8F, "3Y Power Technology" },
|
|
||||||
{ 0x10, "Europe Technologies" },
|
|
||||||
{ 0x91, "Potentia Power Systems" },
|
|
||||||
{ 0x92, "C-guys Incorporated" },
|
|
||||||
{ 0x13, "Digital Communications Technology Incorporated" },
|
|
||||||
{ 0x94, "Silicon-Based Technology" },
|
|
||||||
{ 0x15, "Fulcrum Microsystems" },
|
|
||||||
{ 0x16, "Positivo Informatica Ltd" },
|
|
||||||
{ 0x97, "XIOtech Corporation" },
|
|
||||||
{ 0x98, "PortalPlayer" },
|
|
||||||
{ 0x19, "Zhiying Software" },
|
|
||||||
{ 0x1A, "Direct2Data" },
|
|
||||||
{ 0x9B, "Phonex Broadband" },
|
|
||||||
{ 0x1C, "Skyworks Solutions" },
|
|
||||||
{ 0x9D, "Entropic Communications" },
|
|
||||||
{ 0x9E, "Pacific Force Technology" },
|
|
||||||
{ 0x1F, "Zensys A/S" },
|
|
||||||
{ 0x20, "Legend Silicon Corp." },
|
|
||||||
{ 0xA1, "sci-worx GmbH" },
|
|
||||||
{ 0xA2, "Oasis Silicon Systems" },
|
|
||||||
{ 0x23, "Renesas Technology" },
|
|
||||||
{ 0xA4, "Raza Microelectronics" },
|
|
||||||
{ 0x25, "Phyworks" },
|
|
||||||
{ 0x26, "MediaTek" },
|
|
||||||
{ 0xA7, "Non-cents Productions" },
|
|
||||||
{ 0xA8, "US Modular" },
|
|
||||||
{ 0x29, "Wintegra Ltd" },
|
|
||||||
{ 0x2A, "Mathstar" },
|
|
||||||
{ 0xAB, "StarCore" },
|
|
||||||
{ 0x2C, "Oplus Technologies" },
|
|
||||||
{ 0xAD, "Mindspeed" },
|
|
||||||
{ 0xAE, "Just Young Computer" },
|
|
||||||
{ 0x2F, "Radia Communications" },
|
|
||||||
{ 0xB0, "OCZ" },
|
|
||||||
{ 0x31, "Emuzed" },
|
|
||||||
{ 0x32, "LOGIC Devices" },
|
|
||||||
{ 0xB3, "Inphi Corporation" },
|
|
||||||
{ 0x34, "Quake Technologies" },
|
|
||||||
{ 0xB5, "Vixel" },
|
|
||||||
{ 0xB6, "SolusTek" },
|
|
||||||
{ 0x37, "Kongsberg Maritime" },
|
|
||||||
{ 0x38, "Faraday Technology" },
|
|
||||||
{ 0xB9, "Altium Ltd." },
|
|
||||||
{ 0xBA, "Insyte" },
|
|
||||||
{ 0x3B, "ARM Ltd." },
|
|
||||||
{ 0xBC, "DigiVision" },
|
|
||||||
{ 0x3D, "Vativ Technologies" },
|
|
||||||
{ 0x3E, "Endicott Interconnect Technologies" },
|
|
||||||
{ 0xBF, "Pericom" },
|
|
||||||
{ 0x40, "Bandspeed" },
|
|
||||||
{ 0xC1, "LeWiz Communications" },
|
|
||||||
{ 0xC2, "CPU Technology" },
|
|
||||||
{ 0x43, "Ramaxel Technology" },
|
|
||||||
{ 0xC4, "DSP Group" },
|
|
||||||
{ 0x45, "Axis Communications" },
|
|
||||||
{ 0x46, "Legacy Electronics" },
|
|
||||||
{ 0xC7, "Chrontel" },
|
|
||||||
{ 0xC8, "Powerchip Semiconductor" },
|
|
||||||
{ 0x49, "MobilEye Technologies" },
|
|
||||||
{ 0x4A, "Excel Semiconductor" },
|
|
||||||
{ 0xCB, "A-DATA Technology" },
|
|
||||||
{ 0x4C, "VirtualDigm" },
|
|
||||||
{ 0x00, NULL },
|
|
||||||
};
|
|
||||||
|
|
||||||
int
|
|
||||||
ipmi_spd_print(uint8_t *spd_data, int len)
|
|
||||||
{
|
|
||||||
int size;
|
|
||||||
|
|
||||||
if (len < 92)
|
|
||||||
return -1; /* we need first 91 bytes to do our thing */
|
|
||||||
|
|
||||||
printf(" Memory Type : %s\n",
|
|
||||||
val2str(spd_data[2], spd_memtype_vals));
|
|
||||||
|
|
||||||
if (spd_data[2] == 0x0B) /* DDR3 SDRAM */
|
|
||||||
{
|
|
||||||
int iPN;
|
|
||||||
char *pchPN = spd_data+128;
|
|
||||||
int sdram_cap = 0;
|
|
||||||
int pri_bus_width = 0;
|
|
||||||
int sdram_width = 0;
|
|
||||||
int ranks = 0;
|
|
||||||
int mem_size = 0;
|
|
||||||
|
|
||||||
if (len < 148)
|
|
||||||
return -1; /* we need first 91 bytes to do our thing */
|
|
||||||
|
|
||||||
|
|
||||||
sdram_cap = ldexp(256,(spd_data[4]&15));
|
|
||||||
pri_bus_width = ldexp(8,(spd_data[8]&7));
|
|
||||||
sdram_width = ldexp(4,(spd_data[7]&7));
|
|
||||||
ranks = ldexp(1,((spd_data[7]&0x3F)>>3));
|
|
||||||
mem_size = (sdram_cap/8) * (pri_bus_width/sdram_width) * ranks;
|
|
||||||
printf(" SDRAM Capacity : %d MB\n", sdram_cap );
|
|
||||||
printf(" Memory Banks : %s\n", val2str(spd_data[4]>>4, ddr3_banks_vals));
|
|
||||||
printf(" Primary Bus Width : %d bits\n", pri_bus_width );
|
|
||||||
printf(" SDRAM Device Width : %d bits\n", sdram_width );
|
|
||||||
printf(" Number of Ranks : %d\n", ranks );
|
|
||||||
printf(" Memory size : %d MB\n", mem_size );
|
|
||||||
|
|
||||||
/* printf(" Memory Density : %s\n", val2str(spd_data[4]&15, ddr3_density_vals)); */
|
|
||||||
printf(" 1.5 V Nominal Op : %s\n", (((spd_data[6]&1) != 0) ? "No":"Yes" ) );
|
|
||||||
printf(" 1.35 V Nominal Op : %s\n", (((spd_data[6]&2) != 0) ? "No":"Yes" ) );
|
|
||||||
printf(" 1.2X V Nominal Op : %s\n", (((spd_data[6]&4) != 0) ? "No":"Yes" ) );
|
|
||||||
printf(" Error Detect/Cor : %s\n", val2str(spd_data[8]>>3, ddr3_ecc_vals));
|
|
||||||
|
|
||||||
printf(" Manufacturer : ");
|
|
||||||
switch (spd_data[117]&127)
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
printf("%s\n", val2str(spd_data[118], jedec_id1_vals));
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 1:
|
|
||||||
printf("%s\n", val2str(spd_data[118], jedec_id2_vals));
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 2:
|
|
||||||
printf("%s\n", val2str(spd_data[118], jedec_id3_vals));
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 3:
|
|
||||||
printf("%s\n", val2str(spd_data[118], jedec_id4_vals));
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 4:
|
|
||||||
printf("%s\n", val2str(spd_data[118], jedec_id5_vals));
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
printf("%s\n", "JEDEC JEP106 update required" );
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
printf(" Manufacture Date : year %c%c week %c%c\n",
|
|
||||||
'0'+(spd_data[120]>>4), '0'+(spd_data[120]&15), '0'+(spd_data[121]>>4), '0'+(spd_data[121]&15) );
|
|
||||||
|
|
||||||
printf(" Serial Number : %02x%02x%02x%02x\n",
|
|
||||||
spd_data[122], spd_data[123], spd_data[124], spd_data[125]);
|
|
||||||
|
|
||||||
printf(" Part Number : ");
|
|
||||||
for (iPN=0; iPN < 19; iPN++)
|
|
||||||
{
|
|
||||||
printf( "%c", *pchPN++ );
|
|
||||||
}
|
|
||||||
printf("\n");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
size = spd_data[5] * (spd_data[31] << 2);
|
|
||||||
printf(" Memory Size : %d MB\n", size);
|
|
||||||
printf(" Voltage Intf : %s\n",
|
|
||||||
val2str(spd_data[8], spd_voltage_vals));
|
|
||||||
printf(" Error Detect/Cor : %s\n",
|
|
||||||
val2str(spd_data[11], spd_config_vals));
|
|
||||||
|
|
||||||
/* handle jedec table bank continuation values */
|
|
||||||
printf(" Manufacturer : ");
|
|
||||||
if (spd_data[64] != 0x7f)
|
|
||||||
printf("%s\n",
|
|
||||||
val2str(spd_data[64], jedec_id1_vals));
|
|
||||||
else {
|
|
||||||
if (spd_data[65] != 0x7f)
|
|
||||||
printf("%s\n",
|
|
||||||
val2str(spd_data[65], jedec_id2_vals));
|
|
||||||
else {
|
|
||||||
if (spd_data[66] != 0x7f)
|
|
||||||
printf("%s\n",
|
|
||||||
val2str(spd_data[66], jedec_id3_vals));
|
|
||||||
else {
|
|
||||||
if (spd_data[67] != 0x7f)
|
|
||||||
printf("%s\n",
|
|
||||||
val2str(spd_data[67],
|
|
||||||
jedec_id4_vals));
|
|
||||||
else
|
|
||||||
printf("%s\n",
|
|
||||||
val2str(spd_data[68],
|
|
||||||
jedec_id5_vals));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (spd_data[73]) {
|
|
||||||
char part[19];
|
|
||||||
memcpy(part, spd_data+73, 18);
|
|
||||||
part[18] = 0;
|
|
||||||
printf(" Part Number : %s\n", part);
|
|
||||||
}
|
|
||||||
|
|
||||||
printf(" Serial Number : %02x%02x%02x%02x\n",
|
|
||||||
spd_data[95], spd_data[96], spd_data[97], spd_data[98]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (verbose) {
|
|
||||||
printf("\n");
|
|
||||||
printbuf(spd_data, len, "SPD DATA");
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
ipmi_spd_print_fru(struct ipmi_intf * intf, uint8_t id)
|
|
||||||
{
|
|
||||||
struct ipmi_rs * rsp;
|
|
||||||
struct ipmi_rq req;
|
|
||||||
struct fru_info fru;
|
|
||||||
uint8_t spd_data[256], msg_data[4];
|
|
||||||
int len, offset;
|
|
||||||
|
|
||||||
msg_data[0] = id;
|
|
||||||
|
|
||||||
memset(&req, 0, sizeof(req));
|
|
||||||
req.msg.netfn = IPMI_NETFN_STORAGE;
|
|
||||||
req.msg.cmd = GET_FRU_INFO;
|
|
||||||
req.msg.data = msg_data;
|
|
||||||
req.msg.data_len = 1;
|
|
||||||
|
|
||||||
rsp = intf->sendrecv(intf, &req);
|
|
||||||
if (rsp == NULL) {
|
|
||||||
printf(" Device not present (No Response)\n");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
if (rsp->ccode > 0) {
|
|
||||||
printf(" Device not present (%s)\n",
|
|
||||||
val2str(rsp->ccode, completion_code_vals));
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
fru.size = (rsp->data[1] << 8) | rsp->data[0];
|
|
||||||
fru.access = rsp->data[2] & 0x1;
|
|
||||||
|
|
||||||
lprintf(LOG_DEBUG, "fru.size = %d bytes (accessed by %s)",
|
|
||||||
fru.size, fru.access ? "words" : "bytes");
|
|
||||||
|
|
||||||
if (fru.size < 1) {
|
|
||||||
lprintf(LOG_ERR, " Invalid FRU size %d", fru.size);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
memset(&req, 0, sizeof(req));
|
|
||||||
req.msg.netfn = IPMI_NETFN_STORAGE;
|
|
||||||
req.msg.cmd = GET_FRU_DATA;
|
|
||||||
req.msg.data = msg_data;
|
|
||||||
req.msg.data_len = 4;
|
|
||||||
|
|
||||||
offset = 0;
|
|
||||||
memset(spd_data, 0, 256);
|
|
||||||
do {
|
|
||||||
msg_data[0] = id;
|
|
||||||
msg_data[1] = offset;
|
|
||||||
msg_data[2] = 0;
|
|
||||||
msg_data[3] = FRU_DATA_RQST_SIZE;
|
|
||||||
|
|
||||||
rsp = intf->sendrecv(intf, &req);
|
|
||||||
if (rsp == NULL) {
|
|
||||||
printf(" Device not present (No Response)\n");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
if (rsp->ccode > 0) {
|
|
||||||
printf(" Device not present (%s)\n",
|
|
||||||
val2str(rsp->ccode, completion_code_vals));
|
|
||||||
|
|
||||||
/* Timeouts are acceptable. No DIMM in the socket */
|
|
||||||
if (rsp->ccode == 0xc3)
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
len = rsp->data[0];
|
|
||||||
memcpy(&spd_data[offset], rsp->data + 1, len);
|
|
||||||
offset += len;
|
|
||||||
} while (offset < fru.size);
|
|
||||||
|
|
||||||
/* now print spd info */
|
|
||||||
ipmi_spd_print(spd_data, offset);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
@ -1,903 +0,0 @@
|
|||||||
/* -*-mode: C; indent-tabs-mode: t; -*-
|
|
||||||
* Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* Redistribution of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* Redistribution in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
*
|
|
||||||
* Neither the name of Sun Microsystems, Inc. or the names of
|
|
||||||
* contributors may be used to endorse or promote products derived
|
|
||||||
* from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* This software is provided "AS IS," without a warranty of any kind.
|
|
||||||
* ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
|
|
||||||
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
|
|
||||||
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
|
|
||||||
* SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE
|
|
||||||
* FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
|
|
||||||
* OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL
|
|
||||||
* SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
|
|
||||||
* OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR
|
|
||||||
* PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF
|
|
||||||
* LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
|
|
||||||
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <strings.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <netinet/in.h>
|
|
||||||
#include <arpa/inet.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <signal.h>
|
|
||||||
|
|
||||||
#include <ipmitool/ipmi.h>
|
|
||||||
#include <ipmitool/ipmi_intf.h>
|
|
||||||
#include <ipmitool/helper.h>
|
|
||||||
#include <ipmitool/log.h>
|
|
||||||
#include <ipmitool/ipmi_lanp.h>
|
|
||||||
#include <ipmitool/ipmi_channel.h>
|
|
||||||
#include <ipmitool/ipmi_strings.h>
|
|
||||||
#include <ipmitool/ipmi_constants.h>
|
|
||||||
|
|
||||||
extern int csv_output;
|
|
||||||
extern int verbose;
|
|
||||||
|
|
||||||
void printf_channel_usage (void);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ipmi_1_5_authtypes
|
|
||||||
*
|
|
||||||
* Create a string describing the supported authentication types as
|
|
||||||
* specificed by the parameter n
|
|
||||||
*/
|
|
||||||
static const char *
|
|
||||||
ipmi_1_5_authtypes(uint8_t n)
|
|
||||||
{
|
|
||||||
uint32_t i;
|
|
||||||
static char supportedTypes[128];
|
|
||||||
|
|
||||||
bzero(supportedTypes, 128);
|
|
||||||
|
|
||||||
for (i = 0; ipmi_authtype_vals[i].val != 0; i++) {
|
|
||||||
if (n & ipmi_authtype_vals[i].val) {
|
|
||||||
strcat(supportedTypes, ipmi_authtype_vals[i].str);
|
|
||||||
strcat(supportedTypes, " ");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return supportedTypes;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ipmi_get_channel_auth_cap
|
|
||||||
*
|
|
||||||
* return 0 on success
|
|
||||||
* -1 on failure
|
|
||||||
*/
|
|
||||||
int
|
|
||||||
ipmi_get_channel_auth_cap(struct ipmi_intf * intf,
|
|
||||||
uint8_t channel,
|
|
||||||
uint8_t priv)
|
|
||||||
{
|
|
||||||
struct ipmi_rs * rsp;
|
|
||||||
struct ipmi_rq req;
|
|
||||||
struct get_channel_auth_cap_rsp auth_cap;
|
|
||||||
uint8_t msg_data[2];
|
|
||||||
|
|
||||||
msg_data[0] = channel | 0x80; // Ask for IPMI v2 data as well
|
|
||||||
msg_data[1] = priv;
|
|
||||||
|
|
||||||
memset(&req, 0, sizeof(req));
|
|
||||||
req.msg.netfn = IPMI_NETFN_APP; // 0x06
|
|
||||||
req.msg.cmd = IPMI_GET_CHANNEL_AUTH_CAP; // 0x38
|
|
||||||
req.msg.data = msg_data;
|
|
||||||
req.msg.data_len = 2;
|
|
||||||
|
|
||||||
rsp = intf->sendrecv(intf, &req);
|
|
||||||
|
|
||||||
if ((rsp == NULL) || (rsp->ccode > 0)) {
|
|
||||||
/*
|
|
||||||
* It's very possible that this failed because we asked for IPMI v2 data
|
|
||||||
* Ask again, without requesting IPMI v2 data
|
|
||||||
*/
|
|
||||||
msg_data[0] &= 0x7F;
|
|
||||||
|
|
||||||
rsp = intf->sendrecv(intf, &req);
|
|
||||||
if (rsp == NULL) {
|
|
||||||
lprintf(LOG_ERR, "Unable to Get Channel Authentication Capabilities");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
if (rsp->ccode > 0) {
|
|
||||||
lprintf(LOG_ERR, "Get Channel Authentication Capabilities failed: %s",
|
|
||||||
val2str(rsp->ccode, completion_code_vals));
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
memcpy(&auth_cap, rsp->data, sizeof(struct get_channel_auth_cap_rsp));
|
|
||||||
|
|
||||||
printf("Channel number : %d\n",
|
|
||||||
auth_cap.channel_number);
|
|
||||||
printf("IPMI v1.5 auth types : %s\n",
|
|
||||||
ipmi_1_5_authtypes(auth_cap.enabled_auth_types));
|
|
||||||
|
|
||||||
if (auth_cap.v20_data_available)
|
|
||||||
printf("KG status : %s\n",
|
|
||||||
(auth_cap.kg_status) ? "non-zero" : "default (all zeroes)");
|
|
||||||
|
|
||||||
printf("Per message authentication : %sabled\n",
|
|
||||||
(auth_cap.per_message_auth) ? "dis" : "en");
|
|
||||||
printf("User level authentication : %sabled\n",
|
|
||||||
(auth_cap.user_level_auth) ? "dis" : "en");
|
|
||||||
|
|
||||||
printf("Non-null user names exist : %s\n",
|
|
||||||
(auth_cap.non_null_usernames) ? "yes" : "no");
|
|
||||||
printf("Null user names exist : %s\n",
|
|
||||||
(auth_cap.null_usernames) ? "yes" : "no");
|
|
||||||
printf("Anonymous login enabled : %s\n",
|
|
||||||
(auth_cap.anon_login_enabled) ? "yes" : "no");
|
|
||||||
|
|
||||||
if (auth_cap.v20_data_available) {
|
|
||||||
printf("Channel supports IPMI v1.5 : %s\n",
|
|
||||||
(auth_cap.ipmiv15_support) ? "yes" : "no");
|
|
||||||
printf("Channel supports IPMI v2.0 : %s\n",
|
|
||||||
(auth_cap.ipmiv20_support) ? "yes" : "no");
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* If there is support for an OEM authentication type, there is some
|
|
||||||
* information.
|
|
||||||
*/
|
|
||||||
if (auth_cap.enabled_auth_types & IPMI_1_5_AUTH_TYPE_BIT_OEM) {
|
|
||||||
printf("IANA Number for OEM : %d\n",
|
|
||||||
auth_cap.oem_id[0] |
|
|
||||||
auth_cap.oem_id[1] << 8 |
|
|
||||||
auth_cap.oem_id[2] << 16);
|
|
||||||
printf("OEM Auxiliary Data : 0x%x\n",
|
|
||||||
auth_cap.oem_aux_data);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ipmi_get_channel_info
|
|
||||||
*
|
|
||||||
* returns 0 on success
|
|
||||||
* -1 on failure
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
int
|
|
||||||
ipmi_get_channel_info(struct ipmi_intf * intf, uint8_t channel)
|
|
||||||
{
|
|
||||||
struct ipmi_rs * rsp;
|
|
||||||
struct ipmi_rq req;
|
|
||||||
uint8_t rqdata[2];
|
|
||||||
uint8_t medium;
|
|
||||||
struct get_channel_info_rsp channel_info;
|
|
||||||
struct get_channel_access_rsp channel_access;
|
|
||||||
|
|
||||||
memset(&req, 0, sizeof(req));
|
|
||||||
req.msg.netfn = IPMI_NETFN_APP; // 0x06
|
|
||||||
req.msg.cmd = IPMI_GET_CHANNEL_INFO; // 0x42
|
|
||||||
req.msg.data = &channel;
|
|
||||||
req.msg.data_len = 1;
|
|
||||||
|
|
||||||
rsp = intf->sendrecv(intf, &req);
|
|
||||||
if (rsp == NULL) {
|
|
||||||
lprintf(LOG_ERR, "Unable to Get Channel Info");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
if (rsp->ccode > 0) {
|
|
||||||
lprintf(LOG_ERR, "Get Channel Info failed: %s",
|
|
||||||
val2str(rsp->ccode, completion_code_vals));
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
memcpy(&channel_info, rsp->data, sizeof(struct get_channel_info_rsp));
|
|
||||||
|
|
||||||
printf("Channel 0x%x info:\n", channel_info.channel_number);
|
|
||||||
|
|
||||||
printf(" Channel Medium Type : %s\n",
|
|
||||||
val2str(channel_info.channel_medium, ipmi_channel_medium_vals));
|
|
||||||
|
|
||||||
printf(" Channel Protocol Type : %s\n",
|
|
||||||
val2str(channel_info.channel_protocol, ipmi_channel_protocol_vals));
|
|
||||||
|
|
||||||
printf(" Session Support : ");
|
|
||||||
switch (channel_info.session_support) {
|
|
||||||
case 0x0:
|
|
||||||
printf("session-less\n");
|
|
||||||
break;
|
|
||||||
case 0x1:
|
|
||||||
printf("single-session\n");
|
|
||||||
break;
|
|
||||||
case 0x2:
|
|
||||||
printf("multi-session\n");
|
|
||||||
break;
|
|
||||||
case 0x3:
|
|
||||||
default:
|
|
||||||
printf("session-based\n");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
printf(" Active Session Count : %d\n",
|
|
||||||
channel_info.active_sessions);
|
|
||||||
|
|
||||||
printf(" Protocol Vendor ID : %d\n",
|
|
||||||
channel_info.vendor_id[0] |
|
|
||||||
channel_info.vendor_id[1] << 8 |
|
|
||||||
channel_info.vendor_id[2] << 16);
|
|
||||||
|
|
||||||
|
|
||||||
/* only proceed if this is LAN channel */
|
|
||||||
medium = ipmi_get_channel_medium(intf, channel);
|
|
||||||
if (medium != IPMI_CHANNEL_MEDIUM_LAN &&
|
|
||||||
medium != IPMI_CHANNEL_MEDIUM_LAN_OTHER) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
memset(&req, 0, sizeof(req));
|
|
||||||
rqdata[0] = channel & 0xf;
|
|
||||||
|
|
||||||
/* get volatile settings */
|
|
||||||
|
|
||||||
rqdata[1] = 0x80; /* 0x80=active */
|
|
||||||
req.msg.netfn = IPMI_NETFN_APP; // 0x06
|
|
||||||
req.msg.cmd = IPMI_GET_CHANNEL_ACCESS; // 0x41
|
|
||||||
req.msg.data = rqdata;
|
|
||||||
req.msg.data_len = 2;
|
|
||||||
|
|
||||||
rsp = intf->sendrecv(intf, &req);
|
|
||||||
if (rsp == NULL) {
|
|
||||||
lprintf(LOG_ERR, "Unable to Get Channel Access (volatile)");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
if (rsp->ccode > 0) {
|
|
||||||
lprintf(LOG_ERR, "Get Channel Access (volatile) failed: %s",
|
|
||||||
val2str(rsp->ccode, completion_code_vals));
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
memcpy(&channel_access, rsp->data, sizeof(struct get_channel_access_rsp));
|
|
||||||
|
|
||||||
|
|
||||||
printf(" Volatile(active) Settings\n");
|
|
||||||
printf(" Alerting : %sabled\n",
|
|
||||||
(channel_access.alerting) ? "dis" : "en");
|
|
||||||
printf(" Per-message Auth : %sabled\n",
|
|
||||||
(channel_access.per_message_auth) ? "dis" : "en");
|
|
||||||
printf(" User Level Auth : %sabled\n",
|
|
||||||
(channel_access.user_level_auth) ? "dis" : "en");
|
|
||||||
|
|
||||||
printf(" Access Mode : ");
|
|
||||||
switch (channel_access.access_mode) {
|
|
||||||
case 0:
|
|
||||||
printf("disabled\n");
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
printf("pre-boot only\n");
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
printf("always available\n");
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
printf("shared\n");
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
printf("unknown\n");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* get non-volatile settings */
|
|
||||||
|
|
||||||
rqdata[1] = 0x40; /* 0x40=non-volatile */
|
|
||||||
rsp = intf->sendrecv(intf, &req);
|
|
||||||
if (rsp == NULL) {
|
|
||||||
lprintf(LOG_ERR, "Unable to Get Channel Access (non-volatile)");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
if (rsp->ccode > 0) {
|
|
||||||
lprintf(LOG_ERR, "Get Channel Access (non-volatile) failed: %s",
|
|
||||||
val2str(rsp->ccode, completion_code_vals));
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
memcpy(&channel_access, rsp->data, sizeof(struct get_channel_access_rsp));
|
|
||||||
|
|
||||||
printf(" Non-Volatile Settings\n");
|
|
||||||
printf(" Alerting : %sabled\n",
|
|
||||||
(channel_access.alerting) ? "dis" : "en");
|
|
||||||
printf(" Per-message Auth : %sabled\n",
|
|
||||||
(channel_access.per_message_auth) ? "dis" : "en");
|
|
||||||
printf(" User Level Auth : %sabled\n",
|
|
||||||
(channel_access.user_level_auth) ? "dis" : "en");
|
|
||||||
|
|
||||||
printf(" Access Mode : ");
|
|
||||||
switch (channel_access.access_mode) {
|
|
||||||
case 0:
|
|
||||||
printf("disabled\n");
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
printf("pre-boot only\n");
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
printf("always available\n");
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
printf("shared\n");
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
printf("unknown\n");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
ipmi_get_user_access(struct ipmi_intf * intf, uint8_t channel, uint8_t userid)
|
|
||||||
{
|
|
||||||
struct ipmi_rs * rsp;
|
|
||||||
struct ipmi_rq req1, req2;
|
|
||||||
uint8_t rqdata[2];
|
|
||||||
struct get_user_access_rsp user_access;
|
|
||||||
int curr_uid, max_uid = 0, init = 1;
|
|
||||||
|
|
||||||
curr_uid = userid ? : 1;
|
|
||||||
|
|
||||||
memset(&req1, 0, sizeof(req1));
|
|
||||||
req1.msg.netfn = IPMI_NETFN_APP;
|
|
||||||
req1.msg.cmd = IPMI_GET_USER_ACCESS;
|
|
||||||
req1.msg.data = rqdata;
|
|
||||||
req1.msg.data_len = 2;
|
|
||||||
|
|
||||||
memset(&req2, 0, sizeof(req2));
|
|
||||||
req2.msg.netfn = IPMI_NETFN_APP;
|
|
||||||
req2.msg.cmd = IPMI_GET_USER_NAME;
|
|
||||||
req2.msg.data = rqdata;
|
|
||||||
req2.msg.data_len = 1;
|
|
||||||
|
|
||||||
do
|
|
||||||
{
|
|
||||||
rqdata[0] = channel & 0xf;
|
|
||||||
rqdata[1] = curr_uid & 0x3f;
|
|
||||||
|
|
||||||
rsp = intf->sendrecv(intf, &req1);
|
|
||||||
if (rsp == NULL) {
|
|
||||||
lprintf(LOG_ERR, "Unable to Get User Access (channel %d id %d)",
|
|
||||||
rqdata[0], rqdata[1]);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
if (rsp->ccode > 0) {
|
|
||||||
lprintf(LOG_ERR, "Get User Access (channel %d id %d) failed: %s",
|
|
||||||
rqdata[0], rqdata[1],
|
|
||||||
val2str(rsp->ccode, completion_code_vals));
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
memcpy(&user_access, rsp->data, sizeof(struct get_user_access_rsp));
|
|
||||||
|
|
||||||
rqdata[0] = curr_uid & 0x3f;
|
|
||||||
|
|
||||||
rsp = intf->sendrecv(intf, &req2);
|
|
||||||
if (rsp == NULL) {
|
|
||||||
lprintf(LOG_ERR, "Unable to Get User Name (id %d)", rqdata[0]);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
if (rsp->ccode > 0) {
|
|
||||||
lprintf(LOG_ERR, "Get User Name (id %d) failed: %s",
|
|
||||||
rqdata[0], val2str(rsp->ccode, completion_code_vals));
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (init) {
|
|
||||||
printf("Maximum User IDs : %d\n", user_access.max_user_ids);
|
|
||||||
printf("Enabled User IDs : %d\n", user_access.enabled_user_ids);
|
|
||||||
max_uid = user_access.max_user_ids;
|
|
||||||
init = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
printf("\n");
|
|
||||||
printf("User ID : %d\n", curr_uid);
|
|
||||||
printf("User Name : %s\n", rsp->data);
|
|
||||||
printf("Fixed Name : %s\n",
|
|
||||||
(curr_uid <= user_access.fixed_user_ids) ? "Yes" : "No");
|
|
||||||
printf("Access Available : %s\n",
|
|
||||||
(user_access.callin_callback) ? "callback" : "call-in / callback");
|
|
||||||
printf("Link Authentication : %sabled\n",
|
|
||||||
(user_access.link_auth) ? "en" : "dis");
|
|
||||||
printf("IPMI Messaging : %sabled\n",
|
|
||||||
(user_access.ipmi_messaging) ? "en" : "dis");
|
|
||||||
printf("Privilege Level : %s\n",
|
|
||||||
val2str(user_access.privilege_limit, ipmi_privlvl_vals));
|
|
||||||
|
|
||||||
curr_uid ++;
|
|
||||||
|
|
||||||
} while (!userid && curr_uid <= max_uid);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
ipmi_set_user_access(struct ipmi_intf * intf, int argc, char ** argv)
|
|
||||||
{
|
|
||||||
uint8_t channel, privilege_limit, userid;
|
|
||||||
struct ipmi_rs * rsp;
|
|
||||||
struct ipmi_rq req;
|
|
||||||
uint8_t rqdata[2];
|
|
||||||
struct get_user_access_rsp user_access;
|
|
||||||
struct set_user_access_data set_access;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
if ((argc < 3) || (strncmp(argv[0], "help", 4) == 0)) {
|
|
||||||
printf_channel_usage();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (str2uchar(argv[0], &channel) != 0) {
|
|
||||||
lprintf(LOG_ERR, "Numeric value expected, but '%s' given.", argv[0]);
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
if (str2uchar(argv[1], &userid) != 0) {
|
|
||||||
lprintf(LOG_ERR, "Numeric value expected, but '%s' given.", argv[1]);
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
memset(&req, 0, sizeof(req));
|
|
||||||
req.msg.netfn = IPMI_NETFN_APP;
|
|
||||||
req.msg.cmd = IPMI_GET_USER_ACCESS;
|
|
||||||
req.msg.data = rqdata;
|
|
||||||
req.msg.data_len = 2;
|
|
||||||
|
|
||||||
rqdata[0] = channel & 0xf;
|
|
||||||
rqdata[1] = userid & 0x3f;
|
|
||||||
|
|
||||||
rsp = intf->sendrecv(intf, &req);
|
|
||||||
if (rsp == NULL) {
|
|
||||||
lprintf(LOG_ERR, "Unable to Get User Access (channel %d id %d)",
|
|
||||||
rqdata[0], rqdata[1]);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
if (rsp->ccode > 0) {
|
|
||||||
lprintf(LOG_ERR, "Get User Access (channel %d id %d) failed: %s",
|
|
||||||
rqdata[0], rqdata[1],
|
|
||||||
val2str(rsp->ccode, completion_code_vals));
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
memcpy(&user_access, rsp->data, sizeof(struct get_user_access_rsp));
|
|
||||||
|
|
||||||
memset(&set_access, 0, sizeof(set_access));
|
|
||||||
set_access.change_bits = 1;
|
|
||||||
set_access.callin_callback = user_access.callin_callback;
|
|
||||||
set_access.link_auth = user_access.link_auth;
|
|
||||||
set_access.ipmi_messaging = user_access.ipmi_messaging;
|
|
||||||
set_access.channel = channel;
|
|
||||||
set_access.user_id = userid;
|
|
||||||
set_access.privilege_limit = user_access.privilege_limit;
|
|
||||||
set_access.session_limit = 0;
|
|
||||||
|
|
||||||
for (i = 2; i < argc; i ++)
|
|
||||||
{
|
|
||||||
if (strncmp(argv[i], "callin=", 7) == 0) {
|
|
||||||
set_access.callin_callback = !(strncmp (argv[i]+7, "off", 3));
|
|
||||||
}
|
|
||||||
else if (strncmp(argv[i], "link=", 5) == 0) {
|
|
||||||
set_access.link_auth = strncmp (argv[i]+5, "off", 3);
|
|
||||||
}
|
|
||||||
else if (strncmp(argv[i], "ipmi=", 5) == 0) {
|
|
||||||
set_access.ipmi_messaging = strncmp (argv[i]+5, "off", 3);
|
|
||||||
}
|
|
||||||
else if (strncmp(argv[i], "privilege=", 10) == 0) {
|
|
||||||
if (str2uchar(argv[i]+10, &privilege_limit) != 0) {
|
|
||||||
lprintf(LOG_ERR, "Numeric value expected, but '%s' given.", argv[i]+10);
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
set_access.privilege_limit = privilege_limit;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
printf ("Invalid option: %s\n", argv [i]);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
memset(&req, 0, sizeof(req));
|
|
||||||
req.msg.netfn = IPMI_NETFN_APP;
|
|
||||||
req.msg.cmd = IPMI_SET_USER_ACCESS;
|
|
||||||
req.msg.data = (uint8_t *) &set_access;
|
|
||||||
req.msg.data_len = 4;
|
|
||||||
|
|
||||||
rsp = intf->sendrecv(intf, &req);
|
|
||||||
if (rsp == NULL) {
|
|
||||||
lprintf(LOG_ERR, "Unable to Set User Access (channel %d id %d)",
|
|
||||||
set_access.channel, set_access.user_id);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
if (rsp->ccode > 0) {
|
|
||||||
lprintf(LOG_ERR, "Set User Access (channel %d id %d) failed: %s",
|
|
||||||
set_access.channel, set_access.user_id,
|
|
||||||
val2str(rsp->ccode, completion_code_vals));
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static const char *
|
|
||||||
iana_string(uint32_t iana)
|
|
||||||
{
|
|
||||||
static char s[10];
|
|
||||||
|
|
||||||
if (iana)
|
|
||||||
{
|
|
||||||
sprintf(s, "%06x", iana);
|
|
||||||
return s;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return "N/A";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static int
|
|
||||||
ipmi_get_channel_cipher_suites(struct ipmi_intf * intf,
|
|
||||||
const char * payload_type,
|
|
||||||
uint8_t channel)
|
|
||||||
{
|
|
||||||
struct ipmi_rs * rsp;
|
|
||||||
struct ipmi_rq req;
|
|
||||||
|
|
||||||
uint8_t oem_record;
|
|
||||||
uint8_t rqdata[3];
|
|
||||||
uint32_t iana;
|
|
||||||
uint8_t auth_alg, integrity_alg, crypt_alg;
|
|
||||||
uint8_t cipher_suite_id;
|
|
||||||
uint8_t list_index = 0;
|
|
||||||
uint8_t cipher_suite_data[1024]; // 0x40 sets * 16 bytes per set
|
|
||||||
uint16_t offset = 0;
|
|
||||||
uint16_t cipher_suite_data_length = 0; // how much was returned, total
|
|
||||||
|
|
||||||
memset(cipher_suite_data, 0, sizeof(cipher_suite_data));
|
|
||||||
|
|
||||||
memset(&req, 0, sizeof(req));
|
|
||||||
req.msg.netfn = IPMI_NETFN_APP; // 0x06
|
|
||||||
req.msg.cmd = IPMI_GET_CHANNEL_CIPHER_SUITES; // 0x54
|
|
||||||
req.msg.data = rqdata;
|
|
||||||
req.msg.data_len = 3;
|
|
||||||
|
|
||||||
rqdata[0] = channel;
|
|
||||||
rqdata[1] = ((strncmp(payload_type, "ipmi", 4) == 0)? 0: 1);
|
|
||||||
rqdata[2] = 0x80; // Always ask for cipher suite format
|
|
||||||
|
|
||||||
rsp = intf->sendrecv(intf, &req);
|
|
||||||
if (rsp == NULL) {
|
|
||||||
lprintf(LOG_ERR, "Unable to Get Channel Cipher Suites");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
if (rsp->ccode > 0) {
|
|
||||||
lprintf(LOG_ERR, "Get Channel Cipher Suites failed: %s",
|
|
||||||
val2str(rsp->ccode, completion_code_vals));
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Grab the returned channel number once. We assume it's the same
|
|
||||||
// in future calls.
|
|
||||||
if (rsp->data_len >= 1)
|
|
||||||
channel = rsp->data[0];
|
|
||||||
|
|
||||||
while ((rsp->data_len > 1) && (rsp->data_len == 17) && (list_index < 0x3F))
|
|
||||||
{
|
|
||||||
//
|
|
||||||
// We got back cipher suite data -- store it.
|
|
||||||
//printf("copying data to offset %d\n", offset);
|
|
||||||
//printbuf(rsp->data + 1, rsp->data_len - 1, "this is the data");
|
|
||||||
memcpy(cipher_suite_data + offset, rsp->data + 1, rsp->data_len - 1);
|
|
||||||
offset += rsp->data_len - 1;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Increment our list for the next call
|
|
||||||
//
|
|
||||||
++list_index;
|
|
||||||
rqdata[2] = (rqdata[2] & 0x80) + list_index;
|
|
||||||
|
|
||||||
rsp = intf->sendrecv(intf, &req);
|
|
||||||
if (rsp == NULL) {
|
|
||||||
lprintf(LOG_ERR, "Unable to Get Channel Cipher Suites");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
if (rsp->ccode > 0) {
|
|
||||||
lprintf(LOG_ERR, "Get Channel Cipher Suites failed: %s",
|
|
||||||
val2str(rsp->ccode, completion_code_vals));
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Copy last chunk */
|
|
||||||
if(rsp->data_len > 1)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
// We got back cipher suite data -- store it.
|
|
||||||
//printf("copying data to offset %d\n", offset);
|
|
||||||
//printbuf(rsp->data + 1, rsp->data_len - 1, "this is the data");
|
|
||||||
memcpy(cipher_suite_data + offset, rsp->data + 1, rsp->data_len - 1);
|
|
||||||
offset += rsp->data_len - 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// We can chomp on all our data now.
|
|
||||||
//
|
|
||||||
cipher_suite_data_length = offset;
|
|
||||||
offset = 0;
|
|
||||||
|
|
||||||
if (! csv_output)
|
|
||||||
printf("ID IANA Auth Alg Integrity Alg Confidentiality Alg\n");
|
|
||||||
|
|
||||||
while (offset < cipher_suite_data_length)
|
|
||||||
{
|
|
||||||
if (cipher_suite_data[offset++] == 0xC0)
|
|
||||||
{
|
|
||||||
oem_record = 0; // standard type
|
|
||||||
iana = 0;
|
|
||||||
|
|
||||||
// Verify that we have at least a full record left
|
|
||||||
if ((cipher_suite_data_length - offset) < 4) // id + 3 algs
|
|
||||||
{
|
|
||||||
lprintf(LOG_ERR, "Incomplete data record in cipher suite data");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
cipher_suite_id = cipher_suite_data[offset++];
|
|
||||||
|
|
||||||
}
|
|
||||||
else if (cipher_suite_data[offset++] == 0xC1)
|
|
||||||
{
|
|
||||||
oem_record = 1; // OEM record type
|
|
||||||
|
|
||||||
// Verify that we have at least a full record left
|
|
||||||
if ((cipher_suite_data_length - offset) < 4) // id + iana + 3 algs
|
|
||||||
{
|
|
||||||
lprintf(LOG_ERR, "Incomplete data record in cipher suite data");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
cipher_suite_id = cipher_suite_data[offset++];
|
|
||||||
|
|
||||||
//
|
|
||||||
// Grab the IANA
|
|
||||||
//
|
|
||||||
iana =
|
|
||||||
cipher_suite_data[offset] |
|
|
||||||
(cipher_suite_data[offset + 1] << 8) |
|
|
||||||
(cipher_suite_data[offset + 2] << 16);
|
|
||||||
offset += 3;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
lprintf(LOG_ERR, "Bad start of record byte in cipher suite data");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Grab the algorithms for this cipher suite. I guess we can't be
|
|
||||||
// sure of what order they'll come in. Also, I suppose we default
|
|
||||||
// to the NONE algorithm if one were absent. This part of the spec is
|
|
||||||
// poorly written -- I have read the errata document. For now, I'm only
|
|
||||||
// allowing one algorithm per type (auth, integrity, crypt) because I
|
|
||||||
// don't I understand how it could be otherwise.
|
|
||||||
//
|
|
||||||
auth_alg = IPMI_AUTH_RAKP_NONE;
|
|
||||||
integrity_alg = IPMI_INTEGRITY_NONE;
|
|
||||||
crypt_alg = IPMI_CRYPT_NONE;
|
|
||||||
|
|
||||||
while (((cipher_suite_data[offset] & 0xC0) != 0xC0) &&
|
|
||||||
((cipher_suite_data_length - offset) > 0))
|
|
||||||
{
|
|
||||||
switch (cipher_suite_data[offset] & 0xC0)
|
|
||||||
{
|
|
||||||
case 0x00:
|
|
||||||
// Authentication algorithm specifier
|
|
||||||
auth_alg = cipher_suite_data[offset++] & 0x3F;
|
|
||||||
break;
|
|
||||||
case 0x40:
|
|
||||||
// Interity algorithm specifier
|
|
||||||
integrity_alg = cipher_suite_data[offset++] & 0x3F;
|
|
||||||
break;
|
|
||||||
case 0x80:
|
|
||||||
// Confidentiality algorithm specifier
|
|
||||||
crypt_alg = cipher_suite_data[offset++] & 0x3F;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
// We have everything we need to spit out a cipher suite record
|
|
||||||
//
|
|
||||||
printf((csv_output? "%d,%s,%s,%s,%s\n" :
|
|
||||||
"%-4d %-7s %-15s %-15s %-15s\n"),
|
|
||||||
cipher_suite_id,
|
|
||||||
iana_string(iana),
|
|
||||||
val2str(auth_alg, ipmi_auth_algorithms),
|
|
||||||
val2str(integrity_alg, ipmi_integrity_algorithms),
|
|
||||||
val2str(crypt_alg, ipmi_encryption_algorithms));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
uint8_t
|
|
||||||
ipmi_get_channel_medium(struct ipmi_intf * intf, uint8_t channel)
|
|
||||||
{
|
|
||||||
struct ipmi_rs * rsp;
|
|
||||||
struct ipmi_rq req;
|
|
||||||
struct get_channel_info_rsp info;
|
|
||||||
|
|
||||||
memset(&req, 0, sizeof(req));
|
|
||||||
req.msg.netfn = IPMI_NETFN_APP;
|
|
||||||
req.msg.cmd = IPMI_GET_CHANNEL_INFO;
|
|
||||||
req.msg.data = &channel;
|
|
||||||
req.msg.data_len = 1;
|
|
||||||
|
|
||||||
rsp = intf->sendrecv(intf, &req);
|
|
||||||
if (rsp == NULL) {
|
|
||||||
lprintf(LOG_ERR, "Get Channel Info command failed");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
if (rsp->ccode > 0) {
|
|
||||||
if (rsp->ccode == 0xcc)
|
|
||||||
return IPMI_CHANNEL_MEDIUM_RESERVED;
|
|
||||||
lprintf(LOG_INFO, "Get Channel Info command failed: %s",
|
|
||||||
val2str(rsp->ccode, completion_code_vals));
|
|
||||||
return IPMI_CHANNEL_MEDIUM_RESERVED;
|
|
||||||
}
|
|
||||||
|
|
||||||
memcpy(&info, rsp->data, sizeof(struct get_channel_info_rsp));
|
|
||||||
|
|
||||||
lprintf(LOG_DEBUG, "Channel type: %s",
|
|
||||||
val2str(info.channel_medium, ipmi_channel_medium_vals));
|
|
||||||
|
|
||||||
return info.channel_medium;
|
|
||||||
}
|
|
||||||
|
|
||||||
uint8_t
|
|
||||||
ipmi_current_channel_medium(struct ipmi_intf * intf)
|
|
||||||
{
|
|
||||||
return ipmi_get_channel_medium(intf, 0xE);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
printf_channel_usage()
|
|
||||||
{
|
|
||||||
lprintf(LOG_NOTICE, "Channel Commands: authcap <channel number> <max privilege>");
|
|
||||||
lprintf(LOG_NOTICE, " getaccess <channel number> [user id]");
|
|
||||||
lprintf(LOG_NOTICE, " setaccess <channel number> "
|
|
||||||
"<user id> [callin=on|off] [ipmi=on|off] [link=on|off] [privilege=level]");
|
|
||||||
lprintf(LOG_NOTICE, " info [channel number]");
|
|
||||||
lprintf(LOG_NOTICE, " getciphers <ipmi | sol> [channel]\n");
|
|
||||||
lprintf(LOG_NOTICE, "Possible privilege levels are:");
|
|
||||||
lprintf(LOG_NOTICE, " 1 Callback level");
|
|
||||||
lprintf(LOG_NOTICE, " 2 User level");
|
|
||||||
lprintf(LOG_NOTICE, " 3 Operator level");
|
|
||||||
lprintf(LOG_NOTICE, " 4 Administrator level");
|
|
||||||
lprintf(LOG_NOTICE, " 5 OEM Proprietary level");
|
|
||||||
lprintf(LOG_NOTICE, " 15 No access");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int
|
|
||||||
ipmi_channel_main(struct ipmi_intf * intf, int argc, char ** argv)
|
|
||||||
{
|
|
||||||
int retval = 0;
|
|
||||||
uint8_t channel, priv = 0;
|
|
||||||
|
|
||||||
if ((argc == 0) || (strncmp(argv[0], "help", 4) == 0))
|
|
||||||
{
|
|
||||||
printf_channel_usage();
|
|
||||||
}
|
|
||||||
else if (strncmp(argv[0], "authcap", 7) == 0)
|
|
||||||
{
|
|
||||||
if (argc != 3) {
|
|
||||||
printf_channel_usage();
|
|
||||||
return (-1);
|
|
||||||
} else {
|
|
||||||
if (str2uchar(argv[1], &channel) != 0) {
|
|
||||||
lprintf(LOG_ERR, "Numeric value expected, but '%s' given.", argv[1]);
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
if (str2uchar(argv[2], &priv) != 0) {
|
|
||||||
lprintf(LOG_ERR, "Numeric value expected, but '%s' given.", argv[2]);
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
retval = ipmi_get_channel_auth_cap(intf, channel, priv);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (strncmp(argv[0], "getaccess", 10) == 0)
|
|
||||||
{
|
|
||||||
if ((argc < 2) || (argc > 3))
|
|
||||||
printf_channel_usage();
|
|
||||||
else {
|
|
||||||
uint8_t ch = 0;
|
|
||||||
uint8_t id = 0;
|
|
||||||
if (str2uchar(argv[1], &ch) != 0) {
|
|
||||||
lprintf(LOG_ERR, "Numeric value expected, but '%s' given.", argv[1]);
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
if (argc == 3) {
|
|
||||||
if (str2uchar(argv[2], &id) != 0) {
|
|
||||||
lprintf(LOG_ERR, "Numeric value expected, but '%s' given.", argv[2]);
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
retval = ipmi_get_user_access(intf, ch, id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (strncmp(argv[0], "setaccess", 9) == 0)
|
|
||||||
{
|
|
||||||
retval = ipmi_set_user_access(intf, argc-1, &(argv[1]));
|
|
||||||
}
|
|
||||||
else if (strncmp(argv[0], "info", 4) == 0)
|
|
||||||
{
|
|
||||||
if (argc > 2)
|
|
||||||
printf_channel_usage();
|
|
||||||
else {
|
|
||||||
uint8_t ch = 0xe;
|
|
||||||
if (argc == 2) {
|
|
||||||
if (str2uchar(argv[1], &ch) != 0) {
|
|
||||||
lprintf(LOG_ERR, "Numeric value expected, but '%s' given.", argv[1]);
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
retval = ipmi_get_channel_info(intf, ch);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// it channel getciphers <ipmi | sol> [channel]
|
|
||||||
else if (strncmp(argv[0], "getciphers", 10) == 0)
|
|
||||||
{
|
|
||||||
if ((argc < 2) || (argc > 3) ||
|
|
||||||
(strncmp(argv[1], "ipmi", 4) && strncmp(argv[1], "sol", 3)))
|
|
||||||
printf_channel_usage();
|
|
||||||
else
|
|
||||||
{
|
|
||||||
uint8_t ch = 0xe;
|
|
||||||
if (argc == 3) {
|
|
||||||
if (str2uchar(argv[2], &ch) != 0) {
|
|
||||||
lprintf(LOG_ERR, "Numeric value expected, but '%s' given.", argv[2]);
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
retval = ipmi_get_channel_cipher_suites(intf,
|
|
||||||
argv[1], // ipmi | sol
|
|
||||||
ch);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
printf("Invalid CHANNEL command: %s\n", argv[0]);
|
|
||||||
printf_channel_usage();
|
|
||||||
retval = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return retval;
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,806 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2004 Kontron Canada, Inc. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Base on code from
|
|
||||||
* Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* Redistribution of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* Redistribution in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
*
|
|
||||||
* Neither the name of Sun Microsystems, Inc. or the names of
|
|
||||||
* contributors may be used to endorse or promote products derived
|
|
||||||
* from this software without specific prior written permission.
|
|
||||||
*
|
|
||||||
* This software is provided "AS IS," without a warranty of any kind.
|
|
||||||
* ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
|
|
||||||
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
|
|
||||||
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
|
|
||||||
* SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE
|
|
||||||
* FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
|
|
||||||
* OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL
|
|
||||||
* SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
|
|
||||||
* OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR
|
|
||||||
* PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF
|
|
||||||
* LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
|
|
||||||
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Tue Mar 7 14:36:12 2006
|
|
||||||
* <stephane.filion@ca.kontron.com>
|
|
||||||
*
|
|
||||||
* This code implements an Kontron OEM proprietary commands.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
#include <ipmitool/helper.h>
|
|
||||||
#include <ipmitool/ipmi.h>
|
|
||||||
#include <ipmitool/ipmi_intf.h>
|
|
||||||
#include <ipmitool/ipmi_fru.h>
|
|
||||||
|
|
||||||
|
|
||||||
extern int verbose;
|
|
||||||
extern int read_fru_area(struct ipmi_intf * intf, struct fru_info *fru,
|
|
||||||
uint8_t id, uint32_t offset, uint32_t length,
|
|
||||||
uint8_t *frubuf);
|
|
||||||
extern int write_fru_area(struct ipmi_intf * intf, struct fru_info *fru,
|
|
||||||
unsigned char id, unsigned int soffset,
|
|
||||||
unsigned int doffset, unsigned int length,
|
|
||||||
unsigned char *pFrubuf);
|
|
||||||
|
|
||||||
extern char * get_fru_area_str(uint8_t * data, uint32_t * offset);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void ipmi_kontron_help(void);
|
|
||||||
static int ipmi_kontron_set_serial_number(struct ipmi_intf * intf);
|
|
||||||
static int ipmi_kontron_set_mfg_date (struct ipmi_intf * intf);
|
|
||||||
|
|
||||||
static void ipmi_kontron_nextboot_help(void);
|
|
||||||
static int ipmi_kontron_nextboot_set(struct ipmi_intf * intf,
|
|
||||||
int argc, char **argv);
|
|
||||||
|
|
||||||
static int ipmi_kontronoem_send_set_large_buffer(struct ipmi_intf * intf,
|
|
||||||
unsigned char channel,
|
|
||||||
unsigned char size);
|
|
||||||
|
|
||||||
int
|
|
||||||
ipmi_kontronoem_main(struct ipmi_intf * intf, int argc, char ** argv)
|
|
||||||
{
|
|
||||||
int rc = 0;
|
|
||||||
|
|
||||||
if (argc == 0)
|
|
||||||
ipmi_kontron_help();
|
|
||||||
else if (strncmp(argv[0], "help", 4) == 0)
|
|
||||||
ipmi_kontron_help();
|
|
||||||
|
|
||||||
else if (!strncmp(argv[0], "setsn", 5))
|
|
||||||
{
|
|
||||||
if(argc >= 1)
|
|
||||||
{
|
|
||||||
if(ipmi_kontron_set_serial_number(intf) > 0)
|
|
||||||
{
|
|
||||||
printf("FRU serial number setted successfully\n");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
printf("FRU serial number set failed\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
printf("fru setsn\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (!strncmp(argv[0], "setmfgdate", 5))
|
|
||||||
{
|
|
||||||
if(argc >= 1)
|
|
||||||
{
|
|
||||||
if(ipmi_kontron_set_mfg_date(intf) > 0)
|
|
||||||
{
|
|
||||||
printf("FRU manufacturing date setted successfully\n");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
printf("FRU manufacturing date set failed\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
printf("fru setmfgdate\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (!strncmp(argv[0], "nextboot", sizeof("nextboot")-1))
|
|
||||||
{
|
|
||||||
if (argc > 1)
|
|
||||||
{
|
|
||||||
if ((rc = ipmi_kontron_nextboot_set(intf, argc-1, argv+1)) == 0)
|
|
||||||
{
|
|
||||||
printf("Nextboot set successfully\n");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
printf("Nextboot set failed\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ipmi_kontron_nextboot_help();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
else
|
|
||||||
{
|
|
||||||
printf("Invalid Kontron command: %s", argv[0]);
|
|
||||||
ipmi_kontron_help();
|
|
||||||
rc = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return rc;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void ipmi_kontron_help(void)
|
|
||||||
{
|
|
||||||
printf("Kontron Commands: setsn setmfgdate nextboot\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int ipmi_kontronoem_set_large_buffer(struct ipmi_intf * intf, unsigned char size)
|
|
||||||
{
|
|
||||||
uint8_t error_occurs = 0;
|
|
||||||
uint32_t prev_target_addr = intf->target_addr ;
|
|
||||||
|
|
||||||
if ( intf->target_addr > 0 && (intf->target_addr != intf->my_addr) )
|
|
||||||
{
|
|
||||||
intf->target_addr = intf->my_addr;
|
|
||||||
|
|
||||||
printf("Set local big buffer\n");
|
|
||||||
if(ipmi_kontronoem_send_set_large_buffer( intf, 0x0e, size ) == 0)
|
|
||||||
{
|
|
||||||
printf("Set local big buffer:success\n");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
error_occurs = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (error_occurs == 0)
|
|
||||||
{
|
|
||||||
if(ipmi_kontronoem_send_set_large_buffer( intf, 0x00, size ) == 0)
|
|
||||||
{
|
|
||||||
printf("IPMB was set\n");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* Revert back the previous set large buffer */
|
|
||||||
error_occurs = 1;
|
|
||||||
ipmi_kontronoem_send_set_large_buffer( intf, 0x0e, 0 );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Restore target address */
|
|
||||||
intf->target_addr = prev_target_addr;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (error_occurs == 0)
|
|
||||||
{
|
|
||||||
if(ipmi_kontronoem_send_set_large_buffer( intf, 0x0e, size ) == 0)
|
|
||||||
{
|
|
||||||
//printf("Set remote big buffer\n");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ( intf->target_addr > 0 && (intf->target_addr != intf->my_addr) )
|
|
||||||
{
|
|
||||||
/* Error occurs revert back the previous set large buffer*/
|
|
||||||
intf->target_addr = intf->my_addr;
|
|
||||||
|
|
||||||
//ipmi_kontronoem_send_set_large_buffer( intf, 0x00, 0 );
|
|
||||||
ipmi_kontronoem_send_set_large_buffer( intf, 0x0e, 0 );
|
|
||||||
|
|
||||||
intf->target_addr = prev_target_addr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return error_occurs;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int ipmi_kontronoem_send_set_large_buffer(struct ipmi_intf * intf, unsigned char channel,unsigned char size)
|
|
||||||
{
|
|
||||||
struct ipmi_rs *rsp;
|
|
||||||
struct ipmi_rq req;
|
|
||||||
uint8_t msg_data[2];
|
|
||||||
int i;
|
|
||||||
|
|
||||||
memset(msg_data, 0, sizeof(msg_data));
|
|
||||||
msg_data[0] = channel/*0x0e*/; // Currently running interface
|
|
||||||
msg_data[1] = size;
|
|
||||||
|
|
||||||
memset(&req, 0, sizeof(req));
|
|
||||||
req.msg.netfn = 0x3E; /* OEM NetFn */
|
|
||||||
req.msg.cmd = 0x82; /* Set Channel Buffer Length - OEM */
|
|
||||||
req.msg.data = msg_data;
|
|
||||||
req.msg.data_len = 2;
|
|
||||||
|
|
||||||
req.msg.lun = 0x00;
|
|
||||||
|
|
||||||
rsp = intf->sendrecv(intf, &req);
|
|
||||||
if (rsp == NULL)
|
|
||||||
{
|
|
||||||
printf("Cannot send large buffer command\n");
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
if (rsp->ccode > 0)
|
|
||||||
{
|
|
||||||
printf("Invalid length for the selected interface (%s) %d\n",
|
|
||||||
val2str(rsp->ccode, completion_code_vals), rsp->ccode);
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* ipmi_fru_set_serial_number - Set the Serial Number in FRU
|
|
||||||
*
|
|
||||||
* @intf: ipmi interface
|
|
||||||
* @id: fru id
|
|
||||||
*
|
|
||||||
* returns -1 on error
|
|
||||||
* returns 1 if successful
|
|
||||||
*/
|
|
||||||
static int
|
|
||||||
ipmi_kontron_set_serial_number(struct ipmi_intf * intf)
|
|
||||||
{
|
|
||||||
struct ipmi_rs *rsp;
|
|
||||||
struct ipmi_rq req;
|
|
||||||
struct fru_info fru;
|
|
||||||
struct fru_header header;
|
|
||||||
uint8_t msg_data[4];
|
|
||||||
char *sn;
|
|
||||||
uint8_t sn_size, checksum;
|
|
||||||
uint8_t *fru_data;
|
|
||||||
char *fru_area;
|
|
||||||
uint32_t fru_data_offset, fru_data_offset_tmp, board_sec_len, prod_sec_len, i;
|
|
||||||
|
|
||||||
sn = NULL;
|
|
||||||
fru_data = NULL;
|
|
||||||
|
|
||||||
memset(msg_data, 0, 4);
|
|
||||||
msg_data[0] = 0xb4;
|
|
||||||
msg_data[1] = 0x90;
|
|
||||||
msg_data[2] = 0x91;
|
|
||||||
msg_data[3] = 0x8b;
|
|
||||||
|
|
||||||
memset(&req, 0, sizeof(req));
|
|
||||||
req.msg.netfn = 0x3E;
|
|
||||||
req.msg.cmd = 0x0C;
|
|
||||||
req.msg.data = msg_data;
|
|
||||||
req.msg.data_len = 4;
|
|
||||||
|
|
||||||
|
|
||||||
/* Set Lun, necessary for this oem command */
|
|
||||||
req.msg.lun = 0x03;
|
|
||||||
|
|
||||||
|
|
||||||
rsp = intf->sendrecv(intf, &req);
|
|
||||||
if (rsp == NULL)
|
|
||||||
{
|
|
||||||
printf(" Device not present (No Response)\n");
|
|
||||||
return -11;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (rsp->ccode > 0)
|
|
||||||
{
|
|
||||||
printf(" This option is not implemented for this board\n");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
sn_size = rsp->data_len;
|
|
||||||
|
|
||||||
sn = malloc(sn_size + 1);
|
|
||||||
|
|
||||||
if(sn == NULL)
|
|
||||||
{
|
|
||||||
printf("Out of memory!");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
memset(sn, 0, sn_size + 1);
|
|
||||||
memcpy(sn, rsp->data, sn_size);
|
|
||||||
|
|
||||||
if(verbose >= 1)
|
|
||||||
{
|
|
||||||
printf("Original serial number is : [%s]\n", sn);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
memset(msg_data, 0, 4);
|
|
||||||
msg_data[0] = 0;
|
|
||||||
|
|
||||||
memset(&req, 0, sizeof(req));
|
|
||||||
req.msg.netfn = IPMI_NETFN_STORAGE;
|
|
||||||
req.msg.cmd = GET_FRU_INFO;
|
|
||||||
req.msg.data = msg_data;
|
|
||||||
req.msg.data_len = 1;
|
|
||||||
|
|
||||||
rsp = intf->sendrecv(intf, &req);
|
|
||||||
if (rsp == NULL) {
|
|
||||||
printf(" Device not present (No Response)\n");
|
|
||||||
free(sn);
|
|
||||||
sn = NULL;
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
if (rsp->ccode > 0) {
|
|
||||||
printf(" Device not present (%s)\n",
|
|
||||||
val2str(rsp->ccode, completion_code_vals));
|
|
||||||
free(sn);
|
|
||||||
sn = NULL;
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
fru.size = (rsp->data[1] << 8) | rsp->data[0];
|
|
||||||
fru.access = rsp->data[2] & 0x1;
|
|
||||||
|
|
||||||
if (fru.size < 1) {
|
|
||||||
printf(" Invalid FRU size %d", fru.size);
|
|
||||||
free(sn);
|
|
||||||
sn = NULL;
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* retrieve the FRU header
|
|
||||||
*/
|
|
||||||
msg_data[0] = 0;
|
|
||||||
msg_data[1] = 0;
|
|
||||||
msg_data[2] = 0;
|
|
||||||
msg_data[3] = 8;
|
|
||||||
|
|
||||||
memset(&req, 0, sizeof(req));
|
|
||||||
req.msg.netfn = IPMI_NETFN_STORAGE;
|
|
||||||
req.msg.cmd = GET_FRU_DATA;
|
|
||||||
req.msg.data = msg_data;
|
|
||||||
req.msg.data_len = 4;
|
|
||||||
|
|
||||||
rsp = intf->sendrecv(intf, &req);
|
|
||||||
if (rsp == NULL)
|
|
||||||
{
|
|
||||||
printf(" Device not present (No Response)\n");
|
|
||||||
free(sn);
|
|
||||||
sn = NULL;
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
if (rsp->ccode > 0)
|
|
||||||
{
|
|
||||||
printf(" Device not present (%s)\n",
|
|
||||||
val2str(rsp->ccode, completion_code_vals));
|
|
||||||
free(sn);
|
|
||||||
sn = NULL;
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (verbose > 1)
|
|
||||||
printbuf(rsp->data, rsp->data_len, "FRU DATA");
|
|
||||||
|
|
||||||
memcpy(&header, rsp->data + 1, 8);
|
|
||||||
|
|
||||||
if (header.version != 1)
|
|
||||||
{
|
|
||||||
printf(" Unknown FRU header version 0x%02x",
|
|
||||||
header.version);
|
|
||||||
free(sn);
|
|
||||||
sn = NULL;
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Set the Board Section */
|
|
||||||
board_sec_len = (header.offset.product * 8) - (header.offset.board * 8);
|
|
||||||
|
|
||||||
|
|
||||||
fru_data = malloc( fru.size);
|
|
||||||
|
|
||||||
if(fru_data == NULL)
|
|
||||||
{
|
|
||||||
printf("Out of memory!");
|
|
||||||
free(sn);
|
|
||||||
sn = NULL;
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
memset(fru_data, 0, fru.size);
|
|
||||||
if(read_fru_area(intf ,&fru ,0 ,(header.offset.board * 8) ,board_sec_len , fru_data) < 0)
|
|
||||||
{
|
|
||||||
free(sn);
|
|
||||||
sn = NULL;
|
|
||||||
free(fru_data);
|
|
||||||
fru_data = NULL;
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*Position at Board Manufacturer*/
|
|
||||||
fru_data_offset = (header.offset.board * 8) + 6;
|
|
||||||
fru_area = get_fru_area_str(fru_data, &fru_data_offset);
|
|
||||||
|
|
||||||
/*Position at Board Product Name*/
|
|
||||||
fru_area = get_fru_area_str(fru_data, &fru_data_offset);
|
|
||||||
|
|
||||||
fru_data_offset_tmp = fru_data_offset;
|
|
||||||
|
|
||||||
/*Position at Serial Number*/
|
|
||||||
fru_area = get_fru_area_str(fru_data, &fru_data_offset_tmp);
|
|
||||||
|
|
||||||
fru_data_offset ++;
|
|
||||||
|
|
||||||
if(strlen(fru_area) != sn_size)
|
|
||||||
{
|
|
||||||
printf("The length of the serial number in the FRU Board Area is wrong.\n");
|
|
||||||
free(sn);
|
|
||||||
sn = NULL;
|
|
||||||
free(fru_data);
|
|
||||||
fru_data = NULL;
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Copy the new serial number in the board section saved in memory*/
|
|
||||||
memcpy(fru_data + fru_data_offset, sn, sn_size);
|
|
||||||
|
|
||||||
checksum = 0;
|
|
||||||
/* Calculate Header Checksum */
|
|
||||||
for( i = (header.offset.board * 8); i < (((header.offset.board * 8)+board_sec_len) - 2) ; i ++ )
|
|
||||||
{
|
|
||||||
checksum += fru_data[i];
|
|
||||||
}
|
|
||||||
checksum = (~checksum) + 1;
|
|
||||||
|
|
||||||
|
|
||||||
fru_data[(header.offset.board * 8)+board_sec_len - 1] = checksum;
|
|
||||||
|
|
||||||
/* Write the new FRU Board section */
|
|
||||||
if(write_fru_area(intf, &fru, 0, (header.offset.board * 8), (header.offset.board * 8), board_sec_len, fru_data) < 0)
|
|
||||||
{
|
|
||||||
free(sn);
|
|
||||||
sn = NULL;
|
|
||||||
free(fru_data);
|
|
||||||
fru_data = NULL;
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Set the Product Section */
|
|
||||||
prod_sec_len = (header.offset.multi * 8) - (header.offset.product * 8);
|
|
||||||
|
|
||||||
if(read_fru_area(intf ,&fru ,0 ,(header.offset.product * 8) ,prod_sec_len , fru_data) < 0)
|
|
||||||
{
|
|
||||||
free(sn);
|
|
||||||
sn = NULL;
|
|
||||||
free(fru_data);
|
|
||||||
fru_data = NULL;
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*Position at Product Manufacturer*/
|
|
||||||
fru_data_offset = (header.offset.product * 8) + 3;
|
|
||||||
fru_area = get_fru_area_str(fru_data, &fru_data_offset);
|
|
||||||
|
|
||||||
/*Position at Product Name*/
|
|
||||||
fru_area = get_fru_area_str(fru_data, &fru_data_offset);
|
|
||||||
|
|
||||||
/*Position at Product Part*/
|
|
||||||
fru_area = get_fru_area_str(fru_data, &fru_data_offset);
|
|
||||||
|
|
||||||
/*Position at Product Version*/
|
|
||||||
fru_area = get_fru_area_str(fru_data, &fru_data_offset);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
fru_data_offset_tmp = fru_data_offset;
|
|
||||||
|
|
||||||
/*Position at Serial Number*/
|
|
||||||
fru_area = get_fru_area_str(fru_data, &fru_data_offset_tmp);
|
|
||||||
|
|
||||||
fru_data_offset ++;
|
|
||||||
|
|
||||||
if(strlen(fru_area) != sn_size)
|
|
||||||
{
|
|
||||||
free(sn);
|
|
||||||
sn = NULL;
|
|
||||||
free(fru_data);
|
|
||||||
fru_data = NULL;
|
|
||||||
printf("The length of the serial number in the FRU Product Area is wrong.\n");
|
|
||||||
return(-1);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Copy the new serial number in the product section saved in memory*/
|
|
||||||
memcpy(fru_data + fru_data_offset, sn, sn_size);
|
|
||||||
|
|
||||||
checksum = 0;
|
|
||||||
/* Calculate Header Checksum */
|
|
||||||
for( i = (header.offset.product * 8); i < (((header.offset.product * 8)+prod_sec_len) - 2) ; i ++ )
|
|
||||||
{
|
|
||||||
checksum += fru_data[i];
|
|
||||||
}
|
|
||||||
checksum = (~checksum) + 1;
|
|
||||||
|
|
||||||
|
|
||||||
fru_data[(header.offset.product * 8)+prod_sec_len - 1] = checksum;
|
|
||||||
|
|
||||||
/* Write the new FRU Board section */
|
|
||||||
if(write_fru_area(intf, &fru, 0, (header.offset.product * 8), (header.offset.product * 8), prod_sec_len, fru_data) < 0)
|
|
||||||
{
|
|
||||||
free(sn);
|
|
||||||
sn = NULL;
|
|
||||||
free(fru_data);
|
|
||||||
fru_data = NULL;
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
free(sn);
|
|
||||||
sn = NULL;
|
|
||||||
free(fru_data);
|
|
||||||
fru_data = NULL;
|
|
||||||
|
|
||||||
return(1);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* ipmi_fru_set_mfg_date - Set the Manufacturing Date in FRU
|
|
||||||
*
|
|
||||||
* @intf: ipmi interface
|
|
||||||
* @id: fru id
|
|
||||||
*
|
|
||||||
* returns -1 on error
|
|
||||||
* returns 1 if successful
|
|
||||||
*/
|
|
||||||
static int
|
|
||||||
ipmi_kontron_set_mfg_date (struct ipmi_intf * intf)
|
|
||||||
{
|
|
||||||
struct ipmi_rs *rsp;
|
|
||||||
struct ipmi_rq req;
|
|
||||||
struct fru_info fru;
|
|
||||||
struct fru_header header;
|
|
||||||
uint8_t msg_data[4];
|
|
||||||
uint8_t mfg_date[3];
|
|
||||||
|
|
||||||
uint32_t board_sec_len, i;
|
|
||||||
uint8_t *fru_data, checksum;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
memset(msg_data, 0, 4);
|
|
||||||
msg_data[0] = 0xb4;
|
|
||||||
msg_data[1] = 0x90;
|
|
||||||
msg_data[2] = 0x91;
|
|
||||||
msg_data[3] = 0x8b;
|
|
||||||
|
|
||||||
memset(&req, 0, sizeof(req));
|
|
||||||
req.msg.netfn = 0x3E;
|
|
||||||
req.msg.cmd = 0x0E;
|
|
||||||
req.msg.data = msg_data;
|
|
||||||
req.msg.data_len = 4;
|
|
||||||
|
|
||||||
/* Set Lun temporary, necessary for this oem command */
|
|
||||||
req.msg.lun = 0x03;
|
|
||||||
|
|
||||||
rsp = intf->sendrecv(intf, &req);
|
|
||||||
if (rsp == NULL)
|
|
||||||
{
|
|
||||||
printf("Device not present (No Response)\n");
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (rsp->ccode > 0)
|
|
||||||
{
|
|
||||||
printf("This option is not implemented for this board\n");
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(rsp->data_len != 3)
|
|
||||||
{
|
|
||||||
printf("Invalid response for the Manufacturing date\n");
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
memset(mfg_date, 0, 3);
|
|
||||||
memcpy(mfg_date, rsp->data, 3);
|
|
||||||
|
|
||||||
memset(msg_data, 0, 4);
|
|
||||||
msg_data[0] = 0;
|
|
||||||
|
|
||||||
memset(&req, 0, sizeof(req));
|
|
||||||
req.msg.netfn = IPMI_NETFN_STORAGE;
|
|
||||||
req.msg.cmd = GET_FRU_INFO;
|
|
||||||
req.msg.data = msg_data;
|
|
||||||
req.msg.data_len = 1;
|
|
||||||
|
|
||||||
rsp = intf->sendrecv(intf, &req);
|
|
||||||
if (rsp == NULL) {
|
|
||||||
printf(" Device not present (No Response)\n");
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
if (rsp->ccode > 0) {
|
|
||||||
printf(" Device not present (%s)\n",
|
|
||||||
val2str(rsp->ccode, completion_code_vals));
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
fru.size = (rsp->data[1] << 8) | rsp->data[0];
|
|
||||||
fru.access = rsp->data[2] & 0x1;
|
|
||||||
|
|
||||||
if (fru.size < 1) {
|
|
||||||
printf(" Invalid FRU size %d", fru.size);
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* retrieve the FRU header
|
|
||||||
*/
|
|
||||||
msg_data[0] = 0;
|
|
||||||
msg_data[1] = 0;
|
|
||||||
msg_data[2] = 0;
|
|
||||||
msg_data[3] = 8;
|
|
||||||
|
|
||||||
memset(&req, 0, sizeof(req));
|
|
||||||
req.msg.netfn = IPMI_NETFN_STORAGE;
|
|
||||||
req.msg.cmd = GET_FRU_DATA;
|
|
||||||
req.msg.data = msg_data;
|
|
||||||
req.msg.data_len = 4;
|
|
||||||
|
|
||||||
rsp = intf->sendrecv(intf, &req);
|
|
||||||
if (rsp == NULL)
|
|
||||||
{
|
|
||||||
printf(" Device not present (No Response)\n");
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
if (rsp->ccode > 0)
|
|
||||||
{
|
|
||||||
printf(" Device not present (%s)\n",
|
|
||||||
val2str(rsp->ccode, completion_code_vals));
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (verbose > 1)
|
|
||||||
printbuf(rsp->data, rsp->data_len, "FRU DATA");
|
|
||||||
|
|
||||||
memcpy(&header, rsp->data + 1, 8);
|
|
||||||
|
|
||||||
if (header.version != 1)
|
|
||||||
{
|
|
||||||
printf(" Unknown FRU header version 0x%02x",
|
|
||||||
header.version);
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
board_sec_len = (header.offset.product * 8) - (header.offset.board * 8);
|
|
||||||
|
|
||||||
fru_data = malloc( fru.size);
|
|
||||||
|
|
||||||
if(fru_data == NULL)
|
|
||||||
{
|
|
||||||
printf("Out of memory!");
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
memset(fru_data, 0, fru.size);
|
|
||||||
if(read_fru_area(intf ,&fru ,0 ,(header.offset.board * 8) ,board_sec_len , fru_data) < 0)
|
|
||||||
{
|
|
||||||
free(fru_data);
|
|
||||||
fru_data = NULL;
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Copy the new manufacturing date in the board section saved in memory*/
|
|
||||||
memcpy(fru_data + (header.offset.board * 8) + 3, mfg_date, 3);
|
|
||||||
|
|
||||||
checksum = 0;
|
|
||||||
/* Calculate Header Checksum */
|
|
||||||
for( i = (header.offset.board * 8); i < (((header.offset.board * 8)+board_sec_len) - 2) ; i ++ )
|
|
||||||
{
|
|
||||||
checksum += fru_data[i];
|
|
||||||
}
|
|
||||||
checksum = (~checksum) + 1;
|
|
||||||
|
|
||||||
fru_data[(header.offset.board * 8)+board_sec_len - 1] = checksum;
|
|
||||||
|
|
||||||
/* Write the new FRU Board section */
|
|
||||||
if(write_fru_area(intf, &fru, 0, (header.offset.board * 8), (header.offset.board * 8), board_sec_len, fru_data) < 0)
|
|
||||||
{
|
|
||||||
free(fru_data);
|
|
||||||
fru_data = NULL;
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
free(fru_data);
|
|
||||||
fru_data = NULL;
|
|
||||||
return(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static char *bootdev[] = {"BIOS", "FDD", "HDD", "CDROM", "network", 0};
|
|
||||||
|
|
||||||
static void
|
|
||||||
ipmi_kontron_nextboot_help(void)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
printf("nextboot <device>\n"
|
|
||||||
"Supported devices:\n");
|
|
||||||
for (i = 0; bootdev[i] != 0; i++) {
|
|
||||||
printf("- %s\n", bootdev[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ipmi_kontron_next_boot_set - Select the next boot order on CP6012
|
|
||||||
*
|
|
||||||
* @intf: ipmi interface
|
|
||||||
* @id: fru id
|
|
||||||
*
|
|
||||||
* returns -1 on error
|
|
||||||
* returns 1 if successful
|
|
||||||
*/
|
|
||||||
static int
|
|
||||||
ipmi_kontron_nextboot_set(struct ipmi_intf * intf, int argc, char **argv)
|
|
||||||
{
|
|
||||||
struct ipmi_rs *rsp;
|
|
||||||
struct ipmi_rq req;
|
|
||||||
uint8_t msg_data[8];
|
|
||||||
int i;
|
|
||||||
|
|
||||||
memset(msg_data, 0, sizeof(msg_data));
|
|
||||||
msg_data[0] = 0xb4;
|
|
||||||
msg_data[1] = 0x90;
|
|
||||||
msg_data[2] = 0x91;
|
|
||||||
msg_data[3] = 0x8b;
|
|
||||||
msg_data[4] = 0x9d;
|
|
||||||
msg_data[5] = 0xFF;
|
|
||||||
msg_data[6] = 0xFF; /* any */
|
|
||||||
|
|
||||||
for (i = 0; bootdev[i] != 0; i++) {
|
|
||||||
if (strcmp(argv[0], bootdev[i]) == 0) {
|
|
||||||
msg_data[5] = i;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Invalid device selected? */
|
|
||||||
if (msg_data[5] == 0xFF) {
|
|
||||||
printf("Unknown boot device: %s\n", argv[0]);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
memset(&req, 0, sizeof(req));
|
|
||||||
req.msg.netfn = 0x3E;
|
|
||||||
req.msg.cmd = 0x02;
|
|
||||||
req.msg.data = msg_data;
|
|
||||||
req.msg.data_len = 7;
|
|
||||||
|
|
||||||
/* Set Lun temporary, necessary for this oem command */
|
|
||||||
req.msg.lun = 0x03;
|
|
||||||
|
|
||||||
rsp = intf->sendrecv(intf, &req);
|
|
||||||
if (rsp == NULL)
|
|
||||||
{
|
|
||||||
printf("Device not present (No Response)\n");
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
if (rsp->ccode > 0) {
|
|
||||||
printf("Device not present (%s)\n",
|
|
||||||
val2str(rsp->ccode, completion_code_vals));
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user