mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-07-01 02:03:50 +00:00
Compare commits
1 Commits
IPMITOOL_1
...
IPMITOOL_1
Author | SHA1 | Date | |
---|---|---|---|
d0f52c7a6b |
659
ChangeLog
659
ChangeLog
@ -1,659 +0,0 @@
|
||||
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
|
||||
* ID: 3611905 - Direct Serial Basic/Terminal Mode Interface drivers
|
||||
* ID: 3577766 - configure's knobs and switches don't work
|
||||
* ID: 3611253 - do not override OS-default values for interfaces
|
||||
* ID: 65 - Fixes for configure.in for cross compilation
|
||||
* ID: 3571153 - OpenIPMI/ipmievd fails to compile on Solaris
|
||||
* numerous ipmitool man page updates
|
||||
* ID: 3611226 - Bridging support for PICMG Platforms
|
||||
* Add support for getsysinfo/setsysinfo commands to ipmi mc
|
||||
* Cleanup Dell OEM code to use new sysinfo interface
|
||||
* ID: 93 - str-to-int conversion is weak
|
||||
* ID: 3582307 - ipmi_fru - ipmi_fru_main() return codes
|
||||
* ID: 3582310 - ipmi_fru - ipmi_fru_main() - misuse of printf()
|
||||
* ID: 3576213 - ipmi_fru - unused variable
|
||||
* ID: 3578276 - ipmi_fru - free() on freed memory possible
|
||||
* ID: 3578275 - ipmi_fru - memory leaks
|
||||
* ID: 3528271 - ipmi_fru - possible *flow via FRUID
|
||||
* ID: 3578277 - ipmi_fru - possible NULL pointer
|
||||
* ID: 3612372 - Recognize Broadcom IANA number and BCM5725 product
|
||||
* ID: 3608758 - add IPMI_NETFN_OEM
|
||||
* ID: 143 - Reversed 'channel authcap' capabilities
|
||||
Fixes reversed IPMIv1.5/2.0 'channel authcap' capabilities
|
||||
* ID: 3587318 - "dcmi discover" is not DCMI 1.5 compatible
|
||||
* ID: 3608757 - ipmi_fru - various fixes
|
||||
* ID: 3598203 - 'mc getsysinfo|setsysinfo' needs a bit of re-work
|
||||
* ID: 3597782 - ipmi_mc - sysinfo_param() has two consecutive returns
|
||||
* ID: 3597781 - 'mc getsysinfo|setsysinfo' help has typos
|
||||
* ID: 3608763 - ipmi_sdr - code cleanup & output display cleanup
|
||||
* ID: 3610286 - ipmi_sdr - ipmi_sdr_print_type - incorrect eval
|
||||
* ID: 3600930 - ipmi_sdr - code cleanup
|
||||
* ID: 3602439 - ipmi_sdr - memory leaks
|
||||
* ID: 3595199 - ipmi_sdr - Add support for 'ipmitool sdr <list|elist> help'
|
||||
* ID: 3592773 - 'ipmitool sdr info'; prints incorrect info
|
||||
* ID: 3592770 - 'ipmitool sdr list|elist INV_INPUT' return code
|
||||
* ID: 3577159 - ipmi_sdr - uint32_t cast to uint8_t and back
|
||||
* ID: 3528368 - ipmi_sdr - possible int *flow
|
||||
* ID: 226 - ipmi_sdradd - typo
|
||||
* ID: 258 - ipmi_sdradd - error printed on STDOUT
|
||||
* Fixed ipmievd start under systemd.
|
||||
* ID: 3608760 - Add bswap.h to ipmi_chassis.c and ipmi_pef.c
|
||||
* ID: 3564701 - ipmitool 1.8.12 doesn't build on big endian architectures
|
||||
* ID: 3600907 - defined value for "Chassis may not support Force Identify"
|
||||
* ID: 256 - ipmitool could crash when IPv6 address is returned
|
||||
* ID: 211 - 'lib/ipmi_dcmi.c' - typo & error printed on STDOUT
|
||||
* ID: 3612237 - If DCMI command fails, incorrect completion code is printed
|
||||
* ID: 3608149 - ipmitool - set pointer to NULL after free()
|
||||
* ID: 3603419 - DCMI - waste of resources
|
||||
* ID: 3600908 - DMCI - crash in ipmi_print_sensor_info(), NULL ref
|
||||
* ID: 3609985 - delloem : Wrong MAC returned when flex addressing is enabled
|
||||
* ID: 113 - delloem exec file won't handle more than one command
|
||||
* ID: 28 - delloem - clean up the code
|
||||
* ID: 3608261 - delloem - code formatting
|
||||
* ID: 3528247 - delloem - fix possible *int flows
|
||||
* ID: 3600910 - delloem - code cleanup
|
||||
* ID: 3576211 - delloem - unused variable
|
||||
* ID: 3578022 - delloem - fix typos
|
||||
* ID: 263 - ipmi_ek* - cleanup
|
||||
* ID: 3308765 - ipmi_ek* - cleanup
|
||||
* ID: 3586228 - ipmi_ek* - ipmi_ekanalyzer_usage() rework
|
||||
* ID: 3528388 - ipmi_ek* - a typo in error message
|
||||
* ID: 3576212 - ipmi_event - better rsp handling
|
||||
* ID: 3607393 - ipmi_event - redundant '\n' in error message
|
||||
* ID: 153 - ipmi_firewall - printf() used instead of lprintf()
|
||||
* ID: 3608003 - ipmi_fru - atol() should be replaced with str2*()
|
||||
* ID: 3600911 - ipmi_fru - fix multiple increments in args to printf
|
||||
* ID: 3600914 - no more crash on no response. allow more send/recv loops of waiting.
|
||||
* ID: 70 - Fixes and updates for ipmitool hpm
|
||||
* ID: 3528308 - ipmi_hpmfwupg - possible int *flow
|
||||
* ID: 3608762 - ipmi_hpmfwup - Fixed help messages for hpm command
|
||||
* ID: 3607981 - ipmi_lanp - replace atoi() calls
|
||||
* ID: 3607320 - ipmi_lanp - possible NULL reference
|
||||
* ID: 3600926 - ipmi_lanp - code cleanup
|
||||
* ID: 3613575 - memory leak - ipmi_password_file_read()
|
||||
* ID: 3522740 - reading password from file is limited to 16byte passwords
|
||||
* ID: 3613605 - ipmi_main - call free() on pointer to static data
|
||||
* ID: 3608761 - ipmi_main - PICMG Get Device Locator was never run
|
||||
* ID: 3577155 - ipmi_main' - memory leaks
|
||||
* ID: 239 - typo in 'mc selftest', add details
|
||||
* ID: 3597471 - ipmi_mc - needs a bit of re-work - rc, inv. options
|
||||
* ID: 3597468 - ipmi_mc - print_mc_usage() prints to STDOUT
|
||||
* ID: 3597469 - 'mc watchdog off' prints on STDERR, should be STDOUT
|
||||
* ID: 3597470 - 'mc watchdog reset' prints on STDERR, should be STDOUT
|
||||
* ID: 3611254 - OEM handle for Intel 82751 in SPT mode
|
||||
* ID: 3600927 - change eval order of input param in ipmi_oem_setup()
|
||||
* ID: 3600928 - ipmi_pef - code cleanup
|
||||
* ID: 3592732 - ipmi_picmg.c - printf() misuse
|
||||
* ID: 3528310 - ipmi_picmg.c - NULL reference
|
||||
* ID: 3528347 - ipmi_raw.c - possible int *flow
|
||||
* ID: 3587913 - Command % ipmitool raw help; returns 1
|
||||
* Added code to support sensors on other luns (On behalf of Kontron Germany)
|
||||
* ID: 3611912 - Add missing newlines when cvs output is specified
|
||||
* ID: 244 - ipmi_sel - "0.0" displayed for unspecified threshold values
|
||||
* ID: 3612371 - Typo in impi_sel debug output
|
||||
* ID: 3016359 - ipmi_sel - Get SEL Alloc Information is incorrect
|
||||
* ID: 3568976 - 'sel set time' behaviour is inconsistent
|
||||
* ID: 3528371 - ipmi_sensor - possible int *flow
|
||||
* ID: 3601265 - 'ipmitool sensor get' leaks memory
|
||||
* ID: 3601106 - 'ipmitool sensor get NACname' output incorrect/inconsistent
|
||||
* ID: 3608007 - ipmi_session - typo in error message
|
||||
* ID: 101 - ipmi_sol - possible int *flow
|
||||
* ID: 3600933 - ipmi_sol - use of deprecated bzero()
|
||||
* ID: 3609472 - ipmi_sol - Add the instance to the SOL commands
|
||||
* ID: 3588726 - 'ipmitool sol payload status ...;'segfaults on no rsp
|
||||
* ID: 3522731 - ipmi_sol - ipmi_get_sol_info() returns always 0
|
||||
* ID: 3613042 - add missing Entity IDs
|
||||
* ID: 3611306 - ipmi_tsol - fix always fail in case of error
|
||||
* ID: 259 - ipmi_user - memory leak
|
||||
* ID: 260 - ipmi_user - replace atoi() call
|
||||
* ID: 2871903 - ipmitool user priv incorrectly sets Link Auth
|
||||
* ID: 3600960 - check the copy of password exists
|
||||
* ID: 3609473 - Add assertion/deassertion to threshold events
|
||||
* ID: 104 - ipmishell - possible int *flow
|
||||
* ID: 262 - 'set' segfaults when no IPMI inf present
|
||||
* ID: 257 ipmitool exec segfaults if invalid input given
|
||||
* ID: 254 - Fix retry of authentication capabilities retrieval
|
||||
* ID: 3611303 - lan - error check is missing braces
|
||||
* ID: 253 - Fix lanplus retransmission
|
||||
* ID: 212 - 'lib/ipmi_dcmi.c' - possible int *flow
|
||||
* ID: 264 - incorrect array index in get_lan_param_select()
|
||||
* ID: 269 - Fixes for configure.in for cross compilation
|
||||
* ID: 267 - Corruption in "lan alert print" output
|
||||
* ID: 41 - ipmi_sel_interpret() - clean up formatting, indentation
|
||||
* ID: 242 - Incorrect DCMI Power Reading "IPMI timestamp" interpretation
|
||||
* ID: 229 - 'lib/ipmi_ekanalyzer.c' - a typo ``Too few argument!''
|
||||
* ID: 266 - file descriptor leak in ipmi_fwum and ipmi_ekanalyzer
|
||||
* ID: 99 - 'lib/ipmi_sel.c' - possible int *flow
|
||||
* ID: 222 - 'lib/ipmi_sdr.c' - a typo 'Not Reading' -> 'No Reading'
|
||||
* ID: 35 - Script to setup redirection of SNMP to/from BMC
|
||||
* ID: 273 - Reduce SOL Input buffer size by SOL header size
|
||||
|
||||
|
||||
version 1.8.12 released 2012-08-09
|
||||
* Added IPMB dual bridge support (no need for driver support)
|
||||
* Enable compiler warnings and resolve all compiler warning so that
|
||||
ipmitool compiles and links with no warning or error messages
|
||||
* add ipmishell line to configure
|
||||
* fail configure when no curses or readline is found
|
||||
* support sensor bridging in free interface
|
||||
* applied fix for issue #2865160 (AIX build)
|
||||
* Document the ipmitool dcmi commands in the ipmitool man page
|
||||
* Document that some commands are blocked by OpenIPMI. ID 2962306
|
||||
* Document the -N and -R options per tracker ID 3489643
|
||||
* fix manpage misdocumentation on cipher suite privilige configuration
|
||||
* Add build support for Dell OEM commands
|
||||
* Add new Dell OEM commands and update man page
|
||||
* added hpm and fwum in man page
|
||||
* man page update for fwum and hpm commands
|
||||
* Added documentation for 'ime' operating mode, used to update Intel ME.
|
||||
* add new -Y option to prompt user to enter kgkey
|
||||
* Add DCMI module (Data Center Management Interface)
|
||||
* fixed oem/iana data type to allow 24 bits definition
|
||||
* Fixed AMC point-to-point record parsing in FRU
|
||||
* Fixed detection of packing support in GCC
|
||||
* Added packing support detection magic on all packed structures
|
||||
in project
|
||||
* Dell specific mac sub command is updated to support the latest 12G
|
||||
Dell servers. Support for virtual mac is also implemented.
|
||||
* Use consistent netfn/cmd for getsysinfo command
|
||||
* Add Dell OEM network commands
|
||||
* Resolve incorect Board Mfg Data due to incorrect date constant
|
||||
* Update ipmi_fru.h to SMBIOS spec 2.6.1 - ID 2916398
|
||||
* Support for analog readings in discrete sensors on HP platforms.
|
||||
* Change device id mask (IPM_DEV_DEVICE_ID_REV_MASK) 0x07 for 0x0F.
|
||||
As per in IPMI spec V2:
|
||||
* Added PICMG clock e-keying and bused resource control identifiers
|
||||
* Added PICMG major version (ATCA/AMC/uTCA) identifiers
|
||||
* Correct Threshold/Discrete Sensor Display - Patch Tracker ID 3508759
|
||||
* Sensor units now handle percentage units - ID 3014014
|
||||
* Fixes ID 3421347 Sensor list command should use channel field from SDR
|
||||
* Added packing directive for ARM cross compile with GCC 3.4.5,
|
||||
otherwise the sdr structures gets padded and the pointer cast
|
||||
result in incorrect alignement
|
||||
* Added 'sdr fill sensors nosats' support to speed up SDR discovery
|
||||
* Added SDR name display during discovery (with -v)
|
||||
* Added support for sensor types - Processor related sensor
|
||||
type 0x07, system incharectorization 0x20, Memory sensor type.
|
||||
* Give more description for SEL which is generated for Uncorrectable
|
||||
ECC and errors with respect to each Memory Bank,Card or DIMM.
|
||||
The Sensor type supporting this are 0x0C and 0x10.
|
||||
* Add more details about Version Change event (source of
|
||||
firmware update)
|
||||
* enhanced PICMG fru control
|
||||
* Integrated Andy Wray's DDR3 SPD parser patch
|
||||
* Adds function str2uint() to convert from string to uint32_t with
|
||||
checks for valid input.
|
||||
* Fix possible buffer overflow in buf2str()
|
||||
* Fixes ID 3485004 - misuse of strtol()
|
||||
* Replaces calls to strtol() with str2uchar() calls and adds error
|
||||
messages if invalid input is given.
|
||||
* Don't overwite the iflags bits prior to setting the boot parameters.
|
||||
This fixes ipmitool so that
|
||||
chassis bootdev bios clear-cmos=yes
|
||||
will correctly clear the bios cmos.
|
||||
* Clarify DCMI get limit activation (add if activate or not).
|
||||
* Bug fixes for delloem lan command. This includes the support for 12G
|
||||
Dell license and 12G LAN Specific command.
|
||||
* delloem commands should not be executed before parsing command line.
|
||||
* Fix stack overflow in delloem setled
|
||||
* Fix delloem powermonitor on big-endian platforms.
|
||||
* ipmitool delloem powermonitor command should convert data from
|
||||
network-format to the native one, otherwise it shows garbage
|
||||
on ppc/ppc64 platform.
|
||||
* Add ipmi_getsysinfo command
|
||||
* Add support for drive backplane SetLED functionality
|
||||
* Fix for Platform Event Message incorrect Generator ID
|
||||
* Fix fru print so that it will display FRU info from satellite
|
||||
controllers.
|
||||
* Add support for AMC type 17h record.
|
||||
* Fix in fru edit. It is now possible to edit field 0 of sections
|
||||
* New FRU get OEM record command
|
||||
* fixed segfault for fru edit when "field id" is not supported and
|
||||
added user feedback for string substitution(success or failure)
|
||||
* Improvement to hpm upgrade during activation. This resolves issue
|
||||
where activation seems to have failed because ipmitool received
|
||||
an unsupported completion code.
|
||||
* hpm Fixes for multi-platform support.
|
||||
* hpm Fix for timeouts during firmware rollback. If completion code
|
||||
is C3, wait till timeout has expired before reporting it.
|
||||
* hpm During manual rollback, code now gets target capabilities
|
||||
instead of using a default timeout of 60 seconds.
|
||||
* Added firmware auxilliary bytes to hpm outputs
|
||||
* hpm Add support for BIG Buffer (Use when -z option is used)
|
||||
* Fix the case where ipmitool loses the iol connection during the upload
|
||||
block process. Once IPMITool was successfully sent the first
|
||||
byte, IPMITool will not resize the block size.
|
||||
* Fix the problem when we try to upgrade specific component and the
|
||||
component is already updated,
|
||||
* updated HPM firmware agent to version 1.04
|
||||
* Fix exit code to return zero on '-o list' or '-o help' option
|
||||
* limit length of user name and password that can be supplied by user.
|
||||
Password is limited to 16 bytes, resp. 20 bytes, for LAN, resp.
|
||||
LAN+, interface. User name is limited to 16 bytes, no interface
|
||||
limitations. ID 3184687, ID 3001519
|
||||
* Add retry / timeout options for LAN
|
||||
* Changed default cipher suite to 1 instead of 3 for iol20
|
||||
* added fix for tracker ID 2849300 "Incorrect Firmware Revision"
|
||||
* avoid reopening the interface when already opened
|
||||
* Remove message for unsupported PEF capabilities that return valid
|
||||
CC (80h)
|
||||
* Added OEM byte (47) to verbose output
|
||||
* Add option to provide a list when filling sdr repository
|
||||
* SDR discovery speedups
|
||||
* Added support for Dell specific sensors
|
||||
* Fix segmentation fault on unrecognize OEM events.
|
||||
* changed SEL timestamp formatting for 'preinit' SEL entries, allowing
|
||||
the number of seconds to be displayed.
|
||||
* Added sensor raw data in verbose mode. Useful for OEM sensor type.
|
||||
* Add sensor hysteresis (positive & negative) to the following command
|
||||
ipmitool sensor -v
|
||||
* Fixes bug ID 3484936 - missing user input validation
|
||||
* Add missing RMCP+ auth type strings
|
||||
* Add new Kontron Product in ipmi_strings for product ID. Kontron
|
||||
KTC5520/EATX Server Motherboard with integrated iBMC/KVM/VM
|
||||
added identification support for Kontron AT8050 ATCA board
|
||||
* Constrain setting of the username to no greater than 16 characters
|
||||
per the IPMI specification. ID 3001519
|
||||
* Constrain User ID between 1 and 63. ID 3519225
|
||||
* Fixes ID 3485340 - user input not handled in 'lib/ipmi_user.c'
|
||||
* Fixes ignorance of existing daemon PID file which results in PID being
|
||||
overwritten. Adds proper umask() before writing PID file.
|
||||
* applied fix for ID 2865111 (AIX build)
|
||||
* Fix a proplem when using bridged IPMI commands on the lanplus
|
||||
interface (-I lanplus with -b -t or -m switches) resulting in
|
||||
"Close Session command failure".
|
||||
* Add fix with usage of CFh (duplicate request). Usefull for
|
||||
slow commands
|
||||
* Fix issue with sequence number. (Speed up transfer)
|
||||
|
||||
version 1.8.11 released 2009-02-25
|
||||
* 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
|
||||
|
||||
version 1.8.10 released 2008-08-08
|
||||
* Added support for BULL IANA number.
|
||||
* Fixed contrib build so the oem_ibm_sel_map file gets included in
|
||||
rpm builds again.
|
||||
* Added support for Debian packages to be built from CVS
|
||||
* Fix for sdr and sel timestamp reporting issues
|
||||
* Fix for discrete sensor state print routines to address state
|
||||
bits 8-14
|
||||
* Change ipmi_chassis_status() to non-static so it can be used
|
||||
externally
|
||||
* Added retries to SOL keepalive
|
||||
* Fix to stop sensor list command from reporting a failure due
|
||||
to missing sensor
|
||||
* Fix bug in sdr free space reporting
|
||||
* Add support for IANA number to vendor name conversion for many
|
||||
vendors
|
||||
* Fix segfault bug in lan set command
|
||||
* Fix bug in population of raw i2c wdata buffer
|
||||
* Fix bug in ipmb sensor reading
|
||||
* Fix misspellings, typos, incorrect strncmp lengths, white space
|
||||
* Update/fix printed help and usages for many commands
|
||||
* Add and update support for all commands in ipmitool man page
|
||||
* Fix for lanplus session re-open when the target becomes unavailable
|
||||
following a fw upgrade activation
|
||||
* Add support for watchdog timer shutoff, reset, and get info
|
||||
* Add support for more ibm systems in oem_ibm_sel_map
|
||||
* Add more JEDEC support info for DIMMs; decrease request size
|
||||
for DIMM FRU info to 16 bytes at a time to allow more
|
||||
DIMM FRUs to respond.
|
||||
* Fix to change hpmfwupg to version 1.02; fix to reduce hpmfwupg
|
||||
buffer length more aggressively when no response from iol
|
||||
* Fix HPM firmware activation via IOL; fake a timeout after IOL
|
||||
session re-open to force get upgrade status retry;
|
||||
Added retries on 0xD3 completion code
|
||||
* Add support for freeipmi 0.6.0; adjust autoconf for changes
|
||||
* Fix for oemval2str size
|
||||
* Add support for product name resolution in mc info
|
||||
* Fix FRU display format
|
||||
* Added PICMG ekeying analyzer module support (ekanalyzer);
|
||||
display point to point physical connectivity and power
|
||||
supply information between carriers and AMC modules;
|
||||
display matched results of ekeying match between an
|
||||
on-carrier device and AMC module or between 2 AMC modules
|
||||
* Fix AMC GUID display support
|
||||
* Improved amcportstate operations
|
||||
* Added resolution for new sensor types
|
||||
* Fix segfault in SOL
|
||||
* Fix bug that caused infinite loop on BMCs with empty SDRs
|
||||
* Fix to move out Kontron OEM sensor resolution for other OEMs
|
||||
which could lead to bad event descriptions
|
||||
* Add new FRU edit mode thereby allowing serial numbers, etc. to be
|
||||
changed; improvements to OEM edit mode
|
||||
* Added SPD support for parms: channel number, max read size
|
||||
* Add SDR support for adding SDR records from a dumped file,
|
||||
clearing SDR, adding partial SDR records
|
||||
* Add updates and fixes to hpmfwupg: upload block size to 32 bytes
|
||||
for KCS, handle long response option, implement rollback
|
||||
override, garbage output fix
|
||||
* Add double bridge lan support , fix bridging issue
|
||||
* Add HPM support to pre-check which components need to be skipped
|
||||
* Fix autodetection of maximum packet size when using IPMB
|
||||
* Add new Kontron OEM command to set the BIOS boot option sequence
|
||||
* Add support for dual-bridge/ dual send message
|
||||
* Add auto-detect for local IPMB address using PICMG 2.X extension
|
||||
* Add support for HPM.1 1.0 specification compliance
|
||||
* Fix for improper lan/lanplus addressing
|
||||
* Added transit_channel and transit_addr to ipmi_intf struct
|
||||
* Fix bad password assertion bug due to rakp2 HMAC not being checked
|
||||
properly
|
||||
* Added ability to interpret PPS shelf manager clia sel dump
|
||||
* Corrected PICMG M7 state event definition macros
|
||||
* Added FRU parsing enhancements
|
||||
* Added "isol info", "isol set" and "isol activate" commands
|
||||
to support Intel IPMI v1.5 SOL functionality. Removed
|
||||
"isol setup" command.
|
||||
* Fix bug in ipmi_lan_recv_packet() in lan and lanplus interfaces.
|
||||
* Fix bug in "chassis poh" command.
|
||||
* Fix HPM.1 upgrade to apply to only given component when instructed
|
||||
to do so
|
||||
* Added configure auto-detection if dual bridge extension
|
||||
is supported by OpenIPMI
|
||||
|
||||
version 1.8.9 released 2007-03-06
|
||||
* Added initial AMC ekey query operation support
|
||||
* Improvements to ekeying support (PICMG 3.x only)
|
||||
* Added initial interactive edition support for multirec; added IANA
|
||||
verification before interpreting PICMG records.
|
||||
* Added edit support for AMC activation "Maximum Internal Current"
|
||||
* Fix bug generating garbage on the screen when handling GetDeviceId
|
||||
and sol traffic occurs
|
||||
* Added ability to map OEM sensor types to OEM description string using
|
||||
IANA number; moved IANA number table
|
||||
* Fix lan set access command to use value already saved within
|
||||
parameters for PEF and authentication
|
||||
* Fix bug in cmd ipmitool lan stats get 1
|
||||
* Add support to allow ipmitool/ipmievd to target specific device
|
||||
nodes on multi-BMC systems
|
||||
* Add support for name+privilege lookup for lanplus sessions
|
||||
* Fix time_t conversion bug for 64-bit OS
|
||||
* Added prefix of hostname on sel ipmievd sessions
|
||||
* Fixed FWUM Get Info
|
||||
* Fix ipmievd fd closing bug
|
||||
* Add set-in-progress flag support to chassis bootdev
|
||||
* Added new chassis bootdev options
|
||||
* Add sol payload enable/disable comman
|
||||
* Fix SOL set errors when commit-write not supported
|
||||
* Fix reset of session timeout for lanplus interface
|
||||
* Fixed lan interface accessibility timeout handling
|
||||
* Fix bug with Function Get Channel Cipher Suites command when
|
||||
more than 1 page used.
|
||||
* Fix missing firmware firewall top-level command
|
||||
* Fix bug in SOL keepalive functionality
|
||||
* Fix SOLv2 NACK and retry handling for Intel ESB2 BMC
|
||||
* Added ipmi_sel_get_oem_sensor* APIs
|
||||
* Added HPM.1 support
|
||||
* Fix segfault when incorrect oem option supplied
|
||||
* Fix bus problem with spd command
|
||||
* Fix segfault in SOL when remote BMC does not return packet
|
||||
* Adjust packet length for AMC.0 retricting IPMB packets to 32 bytes
|
||||
* Added lan packet size reduction mechanism
|
||||
* Fix bug with sendMessage of bad length with different target
|
||||
* Fix for big endian (PPC) architecture
|
||||
* NetBSD fixes
|
||||
* Fix segfault and channel problem with user priv command
|
||||
* Add support for bus/chan on i2c raw command
|
||||
* Add freeipmi interface support
|
||||
* Add remote spd printing
|
||||
* Add better detection of linux/compiler.h to config
|
||||
* Makefile changes to fix makedistcheck, etc.
|
||||
|
||||
version 1.8.8
|
||||
* Fix segfaults in sensor data repository list
|
||||
* Fix ipmievd to open interface before daemonizing
|
||||
* Fix IPMIv1.5 authtype NONE to ignore supplied password
|
||||
* Fix cipher suite display bug in lan print
|
||||
* Fix typo in IPMIv2 SOL output when sending break
|
||||
* Fix improper LUN handling with Tyan SOL
|
||||
* Add LUN support to OpenIPMI interface
|
||||
* Add support for Kontron OEM commands
|
||||
* Update to Kontron Firmware Update command
|
||||
|
||||
version 1.8.7
|
||||
* Remove nuclear clause from license
|
||||
* Add Sun OEM command for blades
|
||||
* Increase argument size for raw commands in shell/exec
|
||||
* Fix handling of LUNs for LAN interfaces
|
||||
* Add IPMIv2 SOL loopback test
|
||||
* Add support for IBM OEM SEL messages
|
||||
* Disable file paranoia checks on read files by default
|
||||
* Support IPMIv2 SOL on older Intel boxes
|
||||
* Display message and exit if keepalive fails during SOL
|
||||
* Add support for setting VLAN id and priority
|
||||
* Add support for FreeBSD OpenIPMI-compatible driver
|
||||
* Add support for IPMIv2 Firmware Firewall
|
||||
* Fix gcc4 compile warnings
|
||||
* Make ipmievd generate pidfile
|
||||
* Add initscripts for ipmievd
|
||||
|
||||
version 1.8.6
|
||||
* Fix memory corruption when sending encrypted SOL traffic
|
||||
* Add keepalive timer to IPMIv2 SOL sessions
|
||||
|
||||
version 1.8.5
|
||||
* Add support for settable SOL escape character with -e option
|
||||
* Add support for Kg BMC key for IPMIv2 authentication with -k option
|
||||
* Add support for Tyan IPMIv1.5 SOL with tsol command
|
||||
* Add support for PICMG devices
|
||||
* Add support for OEM SEL event parsing
|
||||
* Add support for command bridging over lan and lanplus interfaces
|
||||
* New 'chassis selftest' command
|
||||
* Many bufxies and patches from contributors
|
||||
|
||||
version 1.8.3
|
||||
* Add support for 'sel readraw' and 'sel writeraw' commands.
|
||||
* Add support for entering NetFn as a string for RAW commands.
|
||||
* Add support for appending distro tag to integrated RPM builds.
|
||||
* Fix LAN parameter printing to handle Invalid Data Field response
|
||||
without errors.
|
||||
* Add 5ms delay to IPMIv2 SOL retry packets
|
||||
* IPMIv2 interface will now correctly set session privilege level
|
||||
to requested level after session is opened.
|
||||
|
||||
version 1.8.2 (released May 18 2005)
|
||||
* 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.
|
||||
* 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.
|
||||
|
||||
version 1.8.1
|
||||
* ipmievd installs in /usr/sbin
|
||||
|
||||
version 1.8.0
|
||||
* Fix IPMIv2.0 issues
|
||||
* Fix chassis boot parameter support
|
||||
* Add support for linear sensors
|
||||
|
||||
version 1.7.1
|
||||
* Update bmc plugin to work with new Solaris bmc driver (new ioctl
|
||||
for interface detection and new STREAMS message-based interface)
|
||||
|
||||
version 1.7.0
|
||||
* 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 from Tim Murphy at Dell
|
||||
* New "bmc" plugin for Solaris 10 x86
|
||||
* Many bugfixes and contributed patches
|
||||
|
||||
version 1.6.2
|
||||
* Support for Supermicro BMC OEM authentication method
|
||||
|
||||
version 1.6.1
|
||||
* Fix minor problem with LAN parameter setting
|
||||
|
||||
version 1.6.0
|
||||
* Add a README file
|
||||
* Add Solaris x86 interface plugin
|
||||
* Add support for building Solaris packages
|
||||
* Fix segfault when doing "sel list" (from Matthew Braithwaite)
|
||||
* Fix "chassis identify" on some BMCs (from ebrower@sourceforge)
|
||||
* Add command "bmc info" and related output (from ebrower@sourceforge)
|
||||
* Add support for IPMIv2 and Serial-over-LAN from Jeremy at Newisys
|
||||
* Add support for building RPMs as non-root user
|
||||
* Add new "shell" and "exec" commands
|
||||
* Lots of other contributed patches
|
||||
|
||||
version 1.5.9
|
||||
* 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
|
||||
|
||||
version 1.5.8
|
||||
* 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
|
||||
|
||||
version 1.5.7
|
||||
* Add IPMIv1.5 eratta fixes
|
||||
* Additions to FRU printing and FRU multirecords
|
||||
* Better handling of SDR printing
|
||||
* Contrib scripts for creating rrdtool graphs
|
||||
|
||||
version 1.5.6
|
||||
* 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 <20>hrn
|
||||
|
||||
version 1.5.5
|
||||
* Add -U option for setting LAN username
|
||||
* Fix -v usage for plugin interfaces
|
||||
|
||||
version 1.5.4
|
||||
* Put interface plugin API into library
|
||||
* Fix ipmievd
|
||||
|
||||
version 1.5.3
|
||||
* Add -g option to work with grizzly bmc
|
||||
|
||||
version 1.5.2
|
||||
* Add support for setting gratuitous arp interval
|
||||
|
||||
version 1.5.1
|
||||
* Better SEL support
|
||||
* Fix display bug in SDR list
|
||||
|
||||
version 1.5.0
|
||||
* More robust UDP packet handling
|
||||
* Add Intel IMB driver support
|
||||
* Use autoconf/automake/libtool
|
||||
|
648
configure.in
648
configure.in
@ -1,648 +0,0 @@
|
||||
dnl
|
||||
dnl autoconf for ipmitool
|
||||
dnl
|
||||
AC_INIT([src/ipmitool.c])
|
||||
AC_CANONICAL_SYSTEM
|
||||
AM_INIT_AUTOMAKE([ipmitool], [1.8.14-cvs])
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AC_CONFIG_SRCDIR([src/ipmitool.c])
|
||||
AC_PREREQ(2.50)
|
||||
AC_SUBST(ac_configure_args)
|
||||
|
||||
dnl check for requirements
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_LN_S
|
||||
AC_PROG_MAKE_SET
|
||||
AC_CHECK_PROG([RPMBUILD], [rpmbuild], [rpmbuild], [rpm])
|
||||
AC_CHECK_PROG([SED], [sed], [sed])
|
||||
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS([stdlib.h string.h sys/ioctl.h sys/stat.h unistd.h paths.h])
|
||||
AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h sys/socket.h])
|
||||
AC_CHECK_HEADERS([sys/byteorder.h byteswap.h])
|
||||
|
||||
AC_C_CONST
|
||||
AC_C_INLINE
|
||||
AC_C_BIGENDIAN
|
||||
|
||||
AC_FUNC_MALLOC
|
||||
AC_FUNC_SELECT_ARGTYPES
|
||||
AC_FUNC_STRTOD
|
||||
AC_CHECK_FUNCS([alarm gethostbyname getaddrinfo getifaddrs socket select])
|
||||
AC_CHECK_FUNCS([memmove memset strchr strdup strerror])
|
||||
AC_CHECK_FUNCS([getpassphrase])
|
||||
|
||||
CFLAGS="$CFLAGS -fno-strict-aliasing -Wreturn-type"
|
||||
|
||||
AM_PROG_LIBTOOL
|
||||
LIBTOOL="$LIBTOOL --silent"
|
||||
|
||||
AC_SEARCH_LIBS([gethostbyname], [nsl])
|
||||
AC_SEARCH_LIBS([getaddrinfo], [nsl])
|
||||
AC_SEARCH_LIBS([getifaddrs], [nsl])
|
||||
AC_SEARCH_LIBS([socket], [socket], [],
|
||||
[AC_CHECK_LIB([nsl], [socket],
|
||||
[LIBS="$LIBS -lsocket -lnsl"], [], [-lsocket])])
|
||||
|
||||
if test "x$prefix" = "xNONE"; then
|
||||
prefix="$ac_default_prefix"
|
||||
fi
|
||||
|
||||
if test "x$exec_prefix" = "xNONE"; then
|
||||
exec_prefix="$prefix"
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl set default option values
|
||||
dnl
|
||||
|
||||
xenable_intf_bmc=no
|
||||
xenable_intf_imb=yes
|
||||
xenable_intf_open=yes
|
||||
xenable_intf_lipmi=yes
|
||||
#xenable_intf_serial=yes
|
||||
xenable_intf_dummy=no
|
||||
xenable_all_options=yes
|
||||
xenable_ipmishell=yes
|
||||
|
||||
dnl set some things so we build with GNU tools on Solaris
|
||||
case "$host_os" in
|
||||
solaris*)
|
||||
MAKE=gmake
|
||||
STRIP=gstrip
|
||||
LD=gld
|
||||
AR=gar
|
||||
# openssl libs are in /usr/sfw/lib on solaris 10
|
||||
LIBS="$LIBS -R/usr/sfw/lib"
|
||||
# disable the linux-specific interfaces
|
||||
xenable_intf_bmc=yes
|
||||
xenable_intf_imb=no
|
||||
xenable_intf_open=no
|
||||
xenable_intf_lipmi=no
|
||||
xenable_ipmishell=no
|
||||
xenable_all_options=no
|
||||
;;
|
||||
*cygwin*)
|
||||
# disable the linux and solaris-specific interfaces
|
||||
xenable_intf_imb=no
|
||||
xenable_intf_open=no
|
||||
xenable_intf_lipmi=no
|
||||
xenable_intf_bmc=no
|
||||
;;
|
||||
*darwin*|aix*)
|
||||
# disable the linux and solaris-specific interfaces
|
||||
xenable_intf_imb=no
|
||||
xenable_intf_open=no
|
||||
xenable_intf_lipmi=no
|
||||
xenable_intf_bmc=no
|
||||
xenable_ipmishell=no
|
||||
;;
|
||||
*freebsd*)
|
||||
xenable_intf_imb=no
|
||||
xenable_intf_lipmi=no
|
||||
xenable_intf_bmc=no
|
||||
;;
|
||||
*netbsd*)
|
||||
xenable_intf_imb=no
|
||||
xenable_intf_lipmi=no
|
||||
xenable_intf_bmc=no
|
||||
xenable_intf_open=no
|
||||
;;
|
||||
gnu*)
|
||||
# disable the linux and solaris-specific interfaces on Hurd
|
||||
xenable_intf_imb=no
|
||||
xenable_intf_open=no
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(ARCH, $host_cpu)
|
||||
AC_SUBST(OS, $host_os)
|
||||
AC_SUBST(PSTAMP, $host)
|
||||
AC_SUBST(BASEDIR, $prefix)
|
||||
|
||||
dnl allow solaris builds to include all options
|
||||
AC_ARG_ENABLE([solaris-opt],
|
||||
[AC_HELP_STRING([--enable-solaris-opt],
|
||||
[enable all options for Solaris [default=no]])],
|
||||
[xenable_solaris_opt=$enableval],
|
||||
[xenable_solaris_opt=no])
|
||||
if test "x$xenable_all_options" = "xyes" || test "x$xenable_solaris_opt" = "xyes"; then
|
||||
AC_DEFINE(ENABLE_ALL_OPTIONS, [1], [Define to 1 to enable all command line options.])
|
||||
fi
|
||||
|
||||
dnl check for OpenSSL functionality
|
||||
AC_ARG_ENABLE([internal-md5],
|
||||
[AC_HELP_STRING([--enable-internal-md5],
|
||||
[enable internal MD5 library [default=no]])],
|
||||
[xenable_internal_md5=$enableval],
|
||||
[xenable_internal_md5=no])
|
||||
|
||||
AC_CHECK_LIB([crypto], [EVP_aes_128_cbc],
|
||||
[if test "x$xenable_internal_md5" != "xyes"; then
|
||||
have_crypto=yes; LIBS="$LIBS -lcrypto"
|
||||
fi],
|
||||
[have_crypto=no], [-lcrypto])
|
||||
|
||||
AC_CHECK_LIB([crypto], [MD5_Init],
|
||||
[if test "x$xenable_internal_md5" != "xyes"; then
|
||||
if test "x$have_crypto" != "xyes"; then
|
||||
LIBS="$LIBS -lcrypto"
|
||||
have_md5=yes
|
||||
fi
|
||||
AC_DEFINE(HAVE_CRYPTO_MD5, [1], [Define to 1 if libcrypto supports MD5.])
|
||||
fi],
|
||||
[], [-lcrypto])
|
||||
|
||||
AC_CHECK_LIB([crypto], [MD2_Init],
|
||||
[if test "x$xenable_internal_md5" != "xyes"; then
|
||||
if test "x$have_crypto" != "xyes" && test "x$have_md5" != "xyes"; then
|
||||
LIBS="$LIBS -lcrypto"
|
||||
have_md2=yes
|
||||
fi
|
||||
AC_DEFINE(HAVE_CRYPTO_MD2, [1], [Define to 1 if libcrypto supports MD2.])
|
||||
fi],
|
||||
[], [-lcrypto])
|
||||
|
||||
dnl enable IPMIv1.5 LAN interface
|
||||
AC_ARG_ENABLE([intf-lan],
|
||||
[AC_HELP_STRING([--enable-intf-lan],
|
||||
[enable IPMIv1.5 LAN interface [default=yes]])],
|
||||
[xenable_intf_lan=$enableval],
|
||||
[xenable_intf_lan=yes])
|
||||
if test "x$xenable_intf_lan" = "xstatic" || test "x$xenable_intf_lan" = "xplugin"; then
|
||||
xenable_intf_lan=yes
|
||||
fi
|
||||
if test "x$xenable_intf_lan" = "xyes"; then
|
||||
AC_DEFINE(IPMI_INTF_LAN, [1], [Define to 1 to enable LAN IPMIv1.5 interface.])
|
||||
AC_SUBST(INTF_LAN, [lan])
|
||||
AC_SUBST(INTF_LAN_LIB, [libintf_lan.la])
|
||||
IPMITOOL_INTF_LIB="$IPMITOOL_INTF_LIB lan/libintf_lan.la"
|
||||
fi
|
||||
|
||||
dnl enable IPMIv2.0 RMCP+ LAN interface
|
||||
AC_ARG_ENABLE([intf-lanplus],
|
||||
[AC_HELP_STRING([--enable-intf-lanplus],
|
||||
[enable IPMIv2.0 RMCP+ LAN interface [default=auto]])],
|
||||
[xenable_intf_lanplus=$enableval],
|
||||
[xenable_intf_lanplus=$have_crypto])
|
||||
if test "x$xenable_intf_lanplus" = "xstatic" || test "x$xenable_intf_lanplus" = "xplugin"; then
|
||||
xenable_intf_lanplus=yes
|
||||
fi
|
||||
if test "x$xenable_intf_lanplus" != "xno" && test "x$have_crypto" != "xyes"; then
|
||||
echo "** The lanplus interface requires an SSL library with EVP_aes_128_cbc defined."
|
||||
xenable_intf_lanplus=no
|
||||
fi
|
||||
if test "x$xenable_intf_lanplus" = "xyes"; then
|
||||
AC_DEFINE(IPMI_INTF_LANPLUS, [1], [Define to 1 to enable LAN+ IPMIv2 interface.])
|
||||
AC_SUBST(INTF_LANPLUS, [lanplus])
|
||||
AC_SUBST(INTF_LANPLUS_LIB, [libintf_lanplus.la])
|
||||
IPMITOOL_INTF_LIB="$IPMITOOL_INTF_LIB lanplus/libintf_lanplus.la"
|
||||
else
|
||||
xenable_intf_lanplus=no
|
||||
fi
|
||||
|
||||
ORIG_CPPFLAGS=$CPPFLAGS
|
||||
|
||||
dnl enable serial interface
|
||||
AC_ARG_ENABLE([intf-serial],
|
||||
[AC_HELP_STRING([--enable-intf-serial],
|
||||
[enable direct Serial Basic/Terminal mode interface [default=yes]])],
|
||||
[xenable_intf_serial=$enableval], [xenable_intf_serial=yes])
|
||||
if test "x$enable_intf_serial" = "xstatic" || test "x$enable_intf_serial" = "xplugin"; then
|
||||
xenable_intf_serial=yes
|
||||
fi
|
||||
if test "x$xenable_intf_serial" = "xyes"; then
|
||||
AC_DEFINE(IPMI_INTF_SERIAL, [1], [Define to 1 to enable serial interface.])
|
||||
AC_SUBST(INTF_SERIAL, [serial])
|
||||
AC_SUBST(INTF_SERIAL_LIB, [libintf_serial.la])
|
||||
IPMITOOL_INTF_LIB="$IPMITOOL_INTF_LIB serial/libintf_serial.la"
|
||||
else
|
||||
xenable_intf_serial=no
|
||||
fi
|
||||
|
||||
dnl look for OpenIPMI header files
|
||||
AC_ARG_WITH([kerneldir],
|
||||
[AC_HELP_STRING([--with-kerneldir=DIR],
|
||||
[set kernel include path to DIR])],
|
||||
[if test "x$with_kerneldir" = "xyes"; then
|
||||
with_kerneldir="/lib/modules/`uname -r`/build"
|
||||
fi
|
||||
CFLAGS="$CFLAGS -I ${with_kerneldir}/include"
|
||||
AC_SUBST(CFLAGS)
|
||||
CPPFLAGS="$CPPFLAGS -I ${with_kerneldir}/include"
|
||||
AC_SUBST(CPPFLAGS)
|
||||
if test -s ${with_kerneldir}/include/linux/version.h ; then
|
||||
kernelver=`grep UTS_RELEASE ${with_kerneldir}/include/linux/version.h | \
|
||||
sed 's/^\#define UTS_RELEASE \"\(2\.[0-9]\)\..*/\1/'`
|
||||
if test "x$kernelver" = "x2.6"; then
|
||||
CPPFLAGS="$CPPFLAGS -D__user="
|
||||
AC_SUBST(CPPFLAGS)
|
||||
fi
|
||||
fi])
|
||||
|
||||
AH_TEMPLATE([HAVE_LINUX_COMPILER_H], [])
|
||||
AC_MSG_CHECKING([for linux/compiler.h])
|
||||
|
||||
m4_version_prereq([2.68],
|
||||
[AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <linux/compiler.h>]])],
|
||||
[AC_DEFINE(HAVE_LINUX_COMPILER_H, [1],
|
||||
[Define to 1 if you have the <linux/compiler.h> header file.])
|
||||
AC_MSG_RESULT([yes])],
|
||||
[AC_MSG_RESULT([no])])],
|
||||
[AC_PREPROC_IFELSE([#include <linux/compiler.h>],
|
||||
[AC_DEFINE(HAVE_LINUX_COMPILER_H, [1],
|
||||
[Define to 1 if you have the <linux/compiler.h> header file.])
|
||||
AC_MSG_RESULT([yes])],
|
||||
[AC_MSG_RESULT([no])])])
|
||||
|
||||
CPPFLAGS=$ORIG_CPPFLAGS
|
||||
AC_SUBST(CPPFLAGS)
|
||||
|
||||
AC_CHECK_HEADER([sys/ioccom.h],
|
||||
[AC_DEFINE(HAVE_SYS_IOCCOM_H, [1],
|
||||
[Define to 1 if you have the <sys/ioccom.h> header file.])])
|
||||
|
||||
AC_CHECK_HEADER([linux/ipmi.h],
|
||||
[AC_DEFINE(HAVE_OPENIPMI_H, [1],
|
||||
[Define to 1 if you have the <linux/ipmi.h> header file.])],
|
||||
[AC_CHECK_HEADER([sys/ipmi.h],
|
||||
[AC_DEFINE(HAVE_FREEBSD_IPMI_H, [1],
|
||||
[Define to 1 if you have the <sys/ipmi.h> header file.])],
|
||||
[echo "** Unable to find OpenIPMI header files. Using internal version."])])
|
||||
|
||||
dnl look for FreeIPMI files
|
||||
AC_CHECK_LIB(freeipmi, ipmi_open_inband, [have_free=yes], [have_free=no])
|
||||
if test "x$have_free" != "xyes"; then
|
||||
AC_CHECK_LIB(freeipmi, ipmi_ctx_open_inband, [have_free=yes], [have_free=no])
|
||||
fi
|
||||
AC_ARG_ENABLE([intf-free],
|
||||
[AC_HELP_STRING([--enable-intf-free],
|
||||
[enable FreeIPMI IPMI interface [default=auto]])],
|
||||
[xenable_intf_free=$enableval],
|
||||
[xenable_intf_free=$have_free])
|
||||
if test "x$xenable_intf_free" = "xstatic" || test "x$xenable_intf_free" = "xplugin"; then
|
||||
xenable_intf_free=yes
|
||||
fi
|
||||
if test "x$xenable_intf_free" != "xno" && test "x$have_free" != "xyes"; then
|
||||
echo "** Unable to build FreeIPMI interface support!"
|
||||
xenable_intf_free=no
|
||||
fi
|
||||
if test "x$xenable_intf_free" = "xyes"; then
|
||||
dnl Determine if you got the right FreeIPMI version
|
||||
AC_MSG_CHECKING([for libfreeipmi version 0.3.0])
|
||||
AC_TRY_COMPILE([
|
||||
#include <sys/types.h> /* For size_t */
|
||||
#include <stdio.h> /* For NULL */
|
||||
#include <freeipmi/freeipmi.h>
|
||||
#include <freeipmi/udm/ipmi-udm.h>
|
||||
], [
|
||||
ipmi_device_t dev;
|
||||
dev = ipmi_open_inband(IPMI_DEVICE_KCS,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
NULL,
|
||||
0);
|
||||
], ac_free_version_0_3_0=yes, ac_free_version_0_3_0=no)
|
||||
AC_MSG_RESULT($ac_free_version_0_3_0)
|
||||
AC_MSG_CHECKING([for libfreeipmi version 0.4.0])
|
||||
AC_TRY_COMPILE([
|
||||
#include <sys/types.h> /* For size_t */
|
||||
#include <stdio.h> /* For NULL */
|
||||
#include <freeipmi/freeipmi.h>
|
||||
#include <freeipmi/udm/ipmi-udm.h>
|
||||
], [
|
||||
ipmi_device_t dev = NULL;
|
||||
int rv;
|
||||
dev = ipmi_device_create();
|
||||
rv = ipmi_open_inband(dev,
|
||||
IPMI_DEVICE_KCS,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
NULL,
|
||||
0);
|
||||
], ac_free_version_0_4_0=yes, ac_free_version_0_4_0=no)
|
||||
AC_MSG_RESULT($ac_free_version_0_4_0)
|
||||
AC_MSG_CHECKING([for libfreeipmi version 0.5.0])
|
||||
AC_TRY_COMPILE([
|
||||
#include <sys/types.h> /* For size_t */
|
||||
#include <stdio.h> /* For NULL */
|
||||
#include <freeipmi/freeipmi.h>
|
||||
#include <freeipmi/udm/ipmi-udm.h>
|
||||
], [
|
||||
ipmi_device_t dev = NULL;
|
||||
int rv;
|
||||
dev = ipmi_device_create();
|
||||
rv = ipmi_open_inband(dev,
|
||||
IPMI_DEVICE_KCS,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
NULL,
|
||||
0,
|
||||
0);
|
||||
], ac_free_version_0_5_0=yes, ac_free_version_0_5_0=no)
|
||||
AC_MSG_RESULT($ac_free_version_0_5_0)
|
||||
|
||||
AC_MSG_CHECKING([for libfreeipmi version 0.6.0])
|
||||
AC_TRY_COMPILE([
|
||||
#include <stdio.h> /* For NULL */
|
||||
#include <freeipmi/freeipmi.h>
|
||||
], [
|
||||
ipmi_ctx_t ctx = NULL;
|
||||
int rv;
|
||||
ctx = ipmi_ctx_create();
|
||||
rv = ipmi_ctx_open_inband(ctx,
|
||||
IPMI_DEVICE_KCS,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
NULL,
|
||||
0,
|
||||
0);
|
||||
], ac_free_version_0_6_0=yes, ac_free_version_0_6_0=no)
|
||||
AC_MSG_RESULT($ac_free_version_0_6_0)
|
||||
|
||||
if test "x$ac_free_version_0_3_0" = "xyes" \
|
||||
|| test "x$ac_free_version_0_4_0" = "xyes" \
|
||||
|| test "x$ac_free_version_0_5_0" = "xyes" \
|
||||
|| test "x$ac_free_version_0_6_0" = "xyes"; then
|
||||
AC_DEFINE(IPMI_INTF_FREE, [1], [Define to 1 to enable FreeIPMI interface.])
|
||||
AC_SUBST(INTF_FREE, [free])
|
||||
AC_SUBST(INTF_FREE_LIB, [libintf_free.la])
|
||||
IPMITOOL_INTF_LIB="$IPMITOOL_INTF_LIB free/libintf_free.la"
|
||||
if test "x$ac_free_version_0_3_0" = "xyes"; then
|
||||
AC_DEFINE(IPMI_INTF_FREE_0_3_0, [1], [Define to 1 for FreeIPMI 0.3.0.])
|
||||
fi
|
||||
if test "x$ac_free_version_0_4_0" = "xyes"; then
|
||||
AC_DEFINE(IPMI_INTF_FREE_0_4_0, [1], [Define to 1 for FreeIPMI 0.4.0.])
|
||||
fi
|
||||
if test "x$ac_free_version_0_5_0" = "xyes"; then
|
||||
AC_DEFINE(IPMI_INTF_FREE_0_5_0, [1], [Define to 1 for FreeIPMI 0.5.0.])
|
||||
fi
|
||||
if test "x$ac_free_version_0_6_0" = "xyes"; then
|
||||
AC_DEFINE(IPMI_INTF_FREE_0_6_0, [1], [Define to 1 for FreeIPMI 0.6.0.])
|
||||
fi
|
||||
else
|
||||
xenable_intf_free=no
|
||||
fi
|
||||
|
||||
AC_CHECK_LIB(freeipmi,
|
||||
ipmi_cmd_raw_ipmb,
|
||||
AC_DEFINE(IPMI_INTF_FREE_BRIDGING, [1],
|
||||
[Define to 1 to enable FreeIPMI Bridging Support.]))
|
||||
fi
|
||||
|
||||
dnl look for termios header file
|
||||
AC_CHECK_HEADER([termios.h],
|
||||
[AC_DEFINE(HAVE_TERMIOS_H, [1], [Define to 1 if you have <termios.h>.])],
|
||||
[AC_CHECK_HEADER([sys/termios.h],
|
||||
[AC_DEFINE(HAVE_SYS_TERMIOS_H, [1], [Define to 1 if you have <sys/termios.h>.])],
|
||||
[echo "** Unable to find termios header file."])])
|
||||
|
||||
dnl set RPM distro tag for use in RPM name
|
||||
AC_ARG_WITH([rpm-distro],
|
||||
[AC_HELP_STRING([--with-rpm-distro=DISTRO],
|
||||
[set Linux distribution tag for use in RPM version string])],
|
||||
[AC_SUBST(DISTRO, $with_rpm_distro)])
|
||||
|
||||
dnl set RPM release tag
|
||||
AC_ARG_WITH([rpm-release],
|
||||
[AC_HELP_STRING([--with-rpm-release=RELEASE],
|
||||
[set release number for RPM release field])],
|
||||
[], [with_rpm_release=1])
|
||||
AC_SUBST(RPM_RELEASE, $with_rpm_release)
|
||||
|
||||
dnl enable Linux OpenIPMI interface
|
||||
AC_ARG_ENABLE([intf-open],
|
||||
[AC_HELP_STRING([--enable-intf-open],
|
||||
[enable Linux OpenIPMI interface [default=auto]])],
|
||||
[xenable_intf_open=$enableval],
|
||||
[])
|
||||
if test "x$xenable_intf_open" = "xstatic" || test "x$xenable_intf_open" = "xplugin"; then
|
||||
xenable_intf_open=yes
|
||||
fi
|
||||
if test "x$xenable_intf_open" = "xyes"; then
|
||||
AC_DEFINE(IPMI_INTF_OPEN, [1], [Define to 1 to enable Linux OpenIPMI interface.])
|
||||
AC_SUBST(INTF_OPEN, [open])
|
||||
AC_SUBST(INTF_OPEN_LIB, [libintf_open.la])
|
||||
IPMITOOL_INTF_LIB="$IPMITOOL_INTF_LIB open/libintf_open.la"
|
||||
|
||||
dnl Check for dual bridge support in OpenIPMI
|
||||
AC_MSG_CHECKING([for OpenIPMI dual bridge support])
|
||||
have_openipmi_dual_bridge=no
|
||||
ORIG_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS -Isrc/plugins/open -DENABLE_INTF_OPEN_DUAL_BRIDGE"
|
||||
AC_TRY_COMPILE([
|
||||
#if defined(HAVE_OPENIPMI_H)
|
||||
# if defined(HAVE_LINUX_COMPILER_H)
|
||||
# include <linux/compiler.h>
|
||||
# endif
|
||||
# include <linux/ipmi.h>
|
||||
#elif defined(HAVE_FREEBSD_IPMI_H)
|
||||
# include <sys/ipmi.h>
|
||||
#else
|
||||
# include "open.h"
|
||||
#endif
|
||||
], [
|
||||
struct ipmi_ipmb_addr a;
|
||||
a.transit_slave_addr = 0;
|
||||
], [have_openipmi_dual_bridge=yes])
|
||||
if test x"$have_openipmi_dual_bridge" = x"yes"; then
|
||||
AC_DEFINE(ENABLE_INTF_OPEN_DUAL_BRIDGE, [1],
|
||||
[Define to 1 to enable OpenIPMI interface dual bridge support])
|
||||
fi
|
||||
CPPFLAGS="$ORIG_CPPFLAGS"
|
||||
AC_MSG_RESULT([$have_openipmi_dual_bridge])
|
||||
fi
|
||||
|
||||
dnl enable Intel IMB interface
|
||||
AC_ARG_ENABLE([intf-imb],
|
||||
[AC_HELP_STRING([--enable-intf-imb],
|
||||
[enable Intel IMB driver interface [default=auto]])],
|
||||
[xenable_intf_imb=$enableval],
|
||||
[])
|
||||
if test "x$xenable_intf_imb" = "xstatic" || test "x$xenable_intf_imb" = "xplugin"; then
|
||||
xenable_intf_imb=yes
|
||||
fi
|
||||
if test "x$xenable_intf_imb" = "xyes"; then
|
||||
AC_DEFINE(IPMI_INTF_IMB, [1], [Define to 1 to enable Intel IMB interface.])
|
||||
AC_SUBST(INTF_IMB, [imb])
|
||||
AC_SUBST(INTF_IMB_LIB, [libintf_imb.la])
|
||||
IPMITOOL_INTF_LIB="$IPMITOOL_INTF_LIB imb/libintf_imb.la"
|
||||
fi
|
||||
|
||||
dnl enable Solaris LIPMI interface
|
||||
AC_CHECK_HEADER([sys/lipmi/lipmi_intf.h], [have_lipmi=yes], [have_lipmi=no])
|
||||
AC_ARG_ENABLE([intf-lipmi],
|
||||
[AC_HELP_STRING([--enable-intf-lipmi],
|
||||
[enable Solaris 9 x86 IPMI interface [default=no]])],
|
||||
[xenable_intf_lipmi=$enableval],
|
||||
[])
|
||||
if test "x$xenable_intf_lipmi" = "xstatic" || test "x$xenable_intf_lipmi" = "xplugin"; then
|
||||
xenable_intf_lipmi=yes
|
||||
fi
|
||||
if test "x$xenable_intf_lipmi" != "xno" && test "x$have_lipmi" != "xyes"; then
|
||||
echo "** Unable to build Solaris 9 x86 IPMI interface support!"
|
||||
xenable_intf_lipmi=no
|
||||
fi
|
||||
if test "x$xenable_intf_lipmi" = "xyes"; then
|
||||
AC_DEFINE(IPMI_INTF_LIPMI, [1], [Define to 1 to enable Solaris 9 LIPMI interface.])
|
||||
AC_SUBST(INTF_LIPMI, [lipmi])
|
||||
AC_SUBST(INTF_LIPMI_LIB, [libintf_lipmi.la])
|
||||
IPMITOOL_INTF_LIB="$IPMITOOL_INTF_LIB lipmi/libintf_lipmi.la"
|
||||
fi
|
||||
|
||||
dnl enable Solaris BMC interface
|
||||
AC_ARG_ENABLE([intf-bmc],
|
||||
[AC_HELP_STRING([--enable-intf-bmc],
|
||||
[enable Solaris 10 x86 IPMI interface [default=auto]])],
|
||||
[xenable_intf_bmc=$enableval],
|
||||
[xenable_intf_bmc=no])
|
||||
if test "x$xenable_intf_bmc" = "xstatic" || test "x$xenable_intf_bmc" = "xplugin"; then
|
||||
xenable_intf_bmc=yes
|
||||
fi
|
||||
if test "x$xenable_intf_bmc" = "xyes"; then
|
||||
AC_DEFINE(IPMI_INTF_BMC, [1], [Define to 1 to enable Solaris 10 BMC interface.])
|
||||
AC_SUBST(INTF_BMC, [bmc])
|
||||
AC_SUBST(INTF_BMC_LIB, [libintf_bmc.la])
|
||||
IPMITOOL_INTF_LIB="$IPMITOOL_INTF_LIB bmc/libintf_bmc.la"
|
||||
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)
|
||||
|
||||
if test "x$xenable_ipmishell" = "xyes"; then
|
||||
AC_SEARCH_LIBS([tgetent], [tinfo ncurses curses readline termcap])
|
||||
AC_SEARCH_LIBS([initscr], [ncurses curses], [have_curses=yes])
|
||||
AC_SEARCH_LIBS([readline], [readline edit], [have_readline=yes])
|
||||
if test "x$have_curses" != "xyes" || test "x$have_readline" != "xyes"; then
|
||||
xenable_ipmishell=no
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl check for readline library to enable ipmi shell
|
||||
AC_ARG_ENABLE([ipmishell],
|
||||
[AC_HELP_STRING([--enable-ipmishell],
|
||||
[enable IPMI shell interface [default=auto]])],
|
||||
[xenable_ipmishell=$enableval],
|
||||
[])
|
||||
if test "x$xenable_ipmishell" = "xyes"; then
|
||||
AC_SEARCH_LIBS([tgetent], [tinfo ncurses curses readline termcap])
|
||||
AC_SEARCH_LIBS([initscr], [ncurses curses], [have_curses=yes])
|
||||
AC_SEARCH_LIBS([readline], [readline edit], [have_readline=yes])
|
||||
if test "x$have_curses" != "xyes"; then
|
||||
AC_MSG_ERROR([** Unable to find curses required by ipmishell.])
|
||||
fi
|
||||
if test "x$have_readline" != "xyes"; then
|
||||
AC_MSG_ERROR([** Unable to find readline required by ipmishell.])
|
||||
fi
|
||||
AC_DEFINE(HAVE_READLINE, [1], [Define to 1 if readline present.])
|
||||
fi
|
||||
|
||||
dnl Enable -Wall -Werror
|
||||
AC_ARG_ENABLE([buildcheck],
|
||||
[AC_HELP_STRING([--enable-buildcheck],
|
||||
[enable -Wall -Werror for build testing [default=no]])],
|
||||
[xenable_buildcheck=$enableval],
|
||||
[xenable_buildcheck=no])
|
||||
if test "x$xenable_buildcheck" != "xno"; then
|
||||
CFLAGS="$CFLAGS -Wall -Werror -Wpointer-arith -Wstrict-prototypes"
|
||||
fi
|
||||
AC_SUBST(CFLAGS)
|
||||
|
||||
dnl Enable extra file security paranoia
|
||||
AC_ARG_ENABLE([file-security],
|
||||
[AC_HELP_STRING([--enable-file-security],
|
||||
[enable extra security checks on files opened for read [default=no]])],
|
||||
[xenable_file_security=$enableval],
|
||||
[xenable_file_security=no])
|
||||
if test "x$xenable_file_security" != "xno"; then
|
||||
AC_DEFINE(ENABLE_FILE_SECURITY, [1], [Define to 1 for extra file security.])
|
||||
fi
|
||||
|
||||
|
||||
AC_TRY_COMPILE([],[
|
||||
#include <stdio.h>
|
||||
|
||||
struct packstruct {
|
||||
unsigned char t0 :5;
|
||||
unsigned char t1 :5;
|
||||
unsigned char t2 :5;
|
||||
unsigned char t3 :5;
|
||||
unsigned char t4 :4;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
int
|
||||
main(int argc, char ** argv)
|
||||
{
|
||||
if(sizeof(struct packstruct) != 3)
|
||||
return(1);
|
||||
else
|
||||
return(0);
|
||||
}
|
||||
],
|
||||
[],
|
||||
[AC_DEFINE(HAVE_PRAGMA_PACK,[1],
|
||||
[Define to 1 if you need to use #pragma pack instead of __attribute__ ((packed))])]
|
||||
)
|
||||
|
||||
|
||||
dnl Generate files for build
|
||||
AC_CONFIG_FILES([Makefile
|
||||
doc/Makefile
|
||||
contrib/Makefile
|
||||
control/Makefile
|
||||
control/pkginfo
|
||||
control/prototype
|
||||
control/rpmmacros
|
||||
control/ipmitool.spec
|
||||
lib/Makefile
|
||||
include/Makefile
|
||||
include/ipmitool/Makefile
|
||||
src/Makefile
|
||||
src/plugins/Makefile
|
||||
src/plugins/lan/Makefile
|
||||
src/plugins/lanplus/Makefile
|
||||
src/plugins/open/Makefile
|
||||
src/plugins/free/Makefile
|
||||
src/plugins/imb/Makefile
|
||||
src/plugins/bmc/Makefile
|
||||
src/plugins/lipmi/Makefile
|
||||
src/plugins/serial/Makefile
|
||||
src/plugins/dummy/Makefile])
|
||||
|
||||
AC_OUTPUT
|
||||
|
||||
AC_MSG_RESULT([])
|
||||
AC_MSG_RESULT([ipmitool $VERSION])
|
||||
AC_MSG_RESULT([])
|
||||
AC_MSG_RESULT([Interfaces])
|
||||
AC_MSG_RESULT([ lan : $xenable_intf_lan])
|
||||
AC_MSG_RESULT([ lanplus : $xenable_intf_lanplus])
|
||||
AC_MSG_RESULT([ open : $xenable_intf_open])
|
||||
AC_MSG_RESULT([ free : $xenable_intf_free])
|
||||
AC_MSG_RESULT([ imb : $xenable_intf_imb])
|
||||
AC_MSG_RESULT([ bmc : $xenable_intf_bmc])
|
||||
AC_MSG_RESULT([ lipmi : $xenable_intf_lipmi])
|
||||
AC_MSG_RESULT([ serial : $xenable_intf_serial])
|
||||
AC_MSG_RESULT([ dummy : $xenable_intf_dummy])
|
||||
AC_MSG_RESULT([])
|
||||
AC_MSG_RESULT([Extra tools])
|
||||
AC_MSG_RESULT([ ipmievd : yes])
|
||||
AC_MSG_RESULT([ ipmishell : $xenable_ipmishell])
|
||||
AC_MSG_RESULT([])
|
||||
|
@ -1,381 +0,0 @@
|
||||
#!/bin/sh
|
||||
#############################################################################
|
||||
#
|
||||
# bmc-snmp-proxy: Set SNMP proxy to BMC (Baseboard Management Controller)
|
||||
#
|
||||
# version: 0.6
|
||||
#
|
||||
# Authors: Charles Rose <charles_rose@dell.com>
|
||||
# Jordan Hargrave <jordan_hargrave@dell.com>
|
||||
#
|
||||
# Description: Script to set snmp proxy to the BMC for certain OID
|
||||
# See here for details:
|
||||
# https://fedoraproject.org/wiki/Features/AgentFreeManagement
|
||||
#
|
||||
# Assumptions: This script will work only when /etc/snmp/ is writable.
|
||||
#
|
||||
#############################################################################
|
||||
# GLOBALS
|
||||
#############################################################################
|
||||
SYSCONF_DIR="/etc/sysconfig"
|
||||
CONFIG="${SYSCONF_DIR}/bmc-snmp-proxy"
|
||||
|
||||
SNMPD_LOCAL_CONF_DIR="/etc/snmp/bmc"
|
||||
SNMPD_LOCAL_CONF="${SNMPD_LOCAL_CONF_DIR}/snmpd.local.conf"
|
||||
TRAPD_LOCAL_CONF="${SNMPD_LOCAL_CONF_DIR}/snmptrapd.local.conf"
|
||||
|
||||
TRAPD_CONF="/etc/snmp/snmptrapd.conf"
|
||||
|
||||
LOCKFILE="/var/lock/subsys/bmc-snmp-proxy"
|
||||
BMC_INFO="/var/run/bmc-info"
|
||||
|
||||
IPMITOOL=`which ipmitool`
|
||||
|
||||
#Default config
|
||||
BMC_COMMUNITY="public"
|
||||
BMC_OID=".1.3.6.1.4.1.674.10892.2" # Dell iDRAC
|
||||
TRAP_FORWARD="no"
|
||||
RELOAD_SERVICES="yes"
|
||||
|
||||
#############################################################################
|
||||
|
||||
#TODO: Use inotify and daemonize when $BMC_INFO changes
|
||||
|
||||
# source config
|
||||
[ -r ${CONFIG} ] && . ${CONFIG}
|
||||
|
||||
. gettext.sh
|
||||
|
||||
SCRIPT_NAME=$(basename $0)
|
||||
RETVAL=0
|
||||
|
||||
# Check if bmc-info created by exchange-bmc-os-info
|
||||
bmc_info_exists()
|
||||
{
|
||||
if [ -r "${BMC_INFO}" ]; then
|
||||
. ${BMC_INFO}
|
||||
else
|
||||
RETVAL=2
|
||||
fi
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
check_snmp()
|
||||
{
|
||||
if [ ! -d /etc/snmp ] && [ ! -x /usr/sbin/snmpd ]; then
|
||||
RETVAL=12
|
||||
fi
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
#############################################################################
|
||||
# configure SNMP proxy
|
||||
#############################################################################
|
||||
write_snmp_conf()
|
||||
{
|
||||
# SNMPv3 security: bmcview, bmc_ctx, bmc_sec, bmc_grp, bmc_cmty
|
||||
printf "###############################################\n"
|
||||
printf "# Automatically created by %s #\n" "${SCRIPT_NAME}"
|
||||
printf "###############################################\n"
|
||||
printf "view bmcview included %s 80\n" "${BMC_OID}"
|
||||
printf "com2sec -Cn bmc_ctx bmc_sec default bmc_cmty\n"
|
||||
printf "group bmc_grp v1 bmc_sec\n"
|
||||
printf "access bmc_grp bmc_ctx any noauth exact bmcview none none\n"
|
||||
printf "proxy -Cn bmc_ctx -v 1 %s\n" "${PROXY_TOKEN}"
|
||||
printf "###############################################\n"
|
||||
}
|
||||
|
||||
valid_ip()
|
||||
{
|
||||
#Thanks to mkyong.com
|
||||
octet="([01]?[[:digit:]][[:digit:]]?|2[0-4][[:digit:]]|25[0-5])"
|
||||
|
||||
printf -- "%s" "${1}"| grep -Eq \
|
||||
"^${octet}\\.${octet}\\.${octet}\\.${octet}$"
|
||||
return $?
|
||||
}
|
||||
|
||||
check_vars()
|
||||
{
|
||||
[ -z ${BMC_COMMUNITY} ] && BMC_COMMUNITY="public"
|
||||
[ -z ${BMC_OID} ] && return 1
|
||||
|
||||
if [ -n "${BMC_IPv4}" ] && valid_ip ${BMC_IPv4}; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
set_snmp_proxy()
|
||||
{
|
||||
if check_vars; then
|
||||
PROXY_TOKEN="-c ${BMC_COMMUNITY} ${BMC_IPv4} ${BMC_OID}"
|
||||
|
||||
if [ ! -d ${SNMPD_LOCAL_CONF_DIR} ] && \
|
||||
mkdir ${SNMPD_LOCAL_CONF_DIR}; then
|
||||
write_snmp_conf > ${SNMPD_LOCAL_CONF}
|
||||
[ $? -ne 0 ] && RETVAL=4
|
||||
fi
|
||||
else
|
||||
RETVAL=3
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
set_snmpd_conf_path()
|
||||
{
|
||||
for SYSCONF in ${SYSCONF_DIR}/snmp*d;
|
||||
do
|
||||
if grep -q "${SNMPD_LOCAL_CONF_DIR}" "${SYSCONF}" > \
|
||||
/dev/null 2>&1; then
|
||||
continue
|
||||
else
|
||||
printf "SNMPCONFPATH=%s\n" "${SNMPD_LOCAL_CONF_DIR}" \
|
||||
>> ${SYSCONF} || RETVAL=7
|
||||
fi
|
||||
done
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
disable_snmp_proxy()
|
||||
{
|
||||
if [ -f ${SNMPD_LOCAL_CONF} ]; then
|
||||
rm -f ${SNMPD_LOCAL_CONF}
|
||||
[ $? -ne 0 ] && RETVAL=5
|
||||
fi
|
||||
}
|
||||
#############################################################################
|
||||
# Trap Forwarding
|
||||
#############################################################################
|
||||
|
||||
pick_alert_dest()
|
||||
{
|
||||
test_ip="$1"
|
||||
for ALERT_DEST in `seq 1 4`
|
||||
do
|
||||
temp_ip=$(${IPMITOOL} lan alert print ${CHANNEL} ${ALERT_DEST}\
|
||||
2>/dev/null| sed -n "s#^Alert IP Address.*: ##p")
|
||||
|
||||
[ "${temp_ip}" = "${test_ip}" ] && return 0
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
set_alert_dest_ip()
|
||||
{
|
||||
${IPMITOOL} lan alert set ${CHANNEL} ${ALERT_DEST} ipaddr ${1} \
|
||||
retry 4 type pet >/dev/null 2>&1
|
||||
[ $? -ne 0 ] && RETVAL=8
|
||||
}
|
||||
|
||||
bmc_alert_dest()
|
||||
{
|
||||
# Pick the first active LAN channel
|
||||
for CHANNEL in `seq 1 14`
|
||||
do
|
||||
[ $(${IPMITOOL} -I open channel info ${CHANNEL} 2>/dev/null \
|
||||
| grep -q "802\.3") ] || break
|
||||
done
|
||||
|
||||
# If TRAPD_IP is already set as an alert dest,
|
||||
if pick_alert_dest "${TRAPD_IP}"; then
|
||||
# reset: reset it if we are called with reset
|
||||
[ "${1}" = "reset" ] && \
|
||||
set_alert_dest_ip "0.0.0.0"
|
||||
# else, find the next free alert dest,
|
||||
elif pick_alert_dest "0.0.0.0"; then
|
||||
[ "${1}" = "reset" ] && \
|
||||
return $RETVAL
|
||||
# set: the TRAPD_IP
|
||||
set_alert_dest_ip "${TRAPD_IP}"
|
||||
else
|
||||
# No free alert destinations
|
||||
RETVAL=9
|
||||
fi
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
set_ipmi_alert()
|
||||
{
|
||||
${IPMITOOL} lan set ${CHANNEL} alert "${1}" >/dev/null 2>&1
|
||||
[ $? -ne 0 ] && RETVAL=10
|
||||
}
|
||||
|
||||
get_host_ip()
|
||||
{
|
||||
# Get host's IP that the BMC can reach.
|
||||
IFACE=$(/usr/sbin/ip -o -f inet address |awk '!/: lo/ {print $2}')
|
||||
for dev in ${IFACE}
|
||||
do
|
||||
ping -c 1 -I ${dev} ${BMC_IPv4} > /dev/null 2>&1
|
||||
done
|
||||
}
|
||||
|
||||
config_bmc_alert()
|
||||
{
|
||||
# Get Host's IP that the BMC can send traps to
|
||||
TRAPD_IP=$(get_host_ip)
|
||||
|
||||
# Set Host's IP as the alert destination in the BMC
|
||||
valid_ip ${TRAPD_IP} && bmc_alert_dest "${ACTION}"
|
||||
|
||||
# Enable alerting on the LAN channel
|
||||
[ $RETVAL -eq 0 ] && set_ipmi_alert "${ACTION}"
|
||||
}
|
||||
|
||||
write_trapd_conf()
|
||||
{
|
||||
printf "###############################################\n"
|
||||
printf "# Automatically created by %s #\n" "${SCRIPT_NAME}"
|
||||
printf "forward %s %s\n" "${BMC_OID}*" "${FORWARD_HOST}"
|
||||
printf "###############################################\n"
|
||||
}
|
||||
|
||||
config_trapd()
|
||||
{
|
||||
# Proceed only if snmptrapd is available on the system
|
||||
if [ -f ${TRAPD_CONF} ]; then
|
||||
write_trapd_conf > ${TRAPD_LOCAL_CONF}
|
||||
[ $? -ne 0 ] && RETVAL=11
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
trap_sink_exists()
|
||||
{
|
||||
# TODO: We only set the first match. We should be able to set
|
||||
# multiple
|
||||
FORWARD_HOST=$(awk '/^trap.*sink/{print $2}; /^informsink/{print $2}' \
|
||||
/etc/snmp/snmpd*conf | head -1)
|
||||
if [ -z "${FORWARD_HOST}" ]; then
|
||||
# there is no trapsink setup.
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
||||
# Forward SNMP traps from the BMC to trapsink.
|
||||
trap_forward()
|
||||
{
|
||||
NO_TRAP=0
|
||||
ACTION=${1} # set or reset
|
||||
|
||||
if [ "${ACTION}" = "set" ]; then
|
||||
# Get trapd config,
|
||||
if trap_sink_exists; then
|
||||
config_trapd && config_bmc_alert
|
||||
else
|
||||
# exit silently if there is no sink
|
||||
NO_TRAP=1
|
||||
fi
|
||||
else
|
||||
if [ -f ${TRAPD_LOCAL_CONF} ]; then
|
||||
rm -f ${TRAPD_LOCAL_CONF} >/dev/null 2>&1
|
||||
else
|
||||
NO_TRAP=1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
#############################################################################
|
||||
service_reload()
|
||||
{
|
||||
#TODO: do this in systemd
|
||||
if [ ${RETVAL} -eq 0 ] && [ "${RELOAD_SERVICES}" = "yes" ]; then
|
||||
service $1 reload
|
||||
[ $? -ne 0 ] && RETVAL=6
|
||||
fi
|
||||
return
|
||||
}
|
||||
|
||||
#############################################################################
|
||||
start()
|
||||
{
|
||||
if bmc_info_exists && check_snmp; then
|
||||
touch ${LOCKFILE}
|
||||
set_snmpd_conf_path && set_snmp_proxy
|
||||
[ $RETVAL -eq 0 ] && service_reload snmpd
|
||||
|
||||
if [ "${TRAP_FORWARD}" = "yes" ]; then
|
||||
trap_forward "set"
|
||||
[ $RETVAL -eq 0 ] && [ $NO_TRAP -eq 0 ] && \
|
||||
service_reload snmptrapd
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
#############################################################################
|
||||
stop()
|
||||
{
|
||||
[ ! -f ${LOCKFILE} ] && return
|
||||
if bmc_info_exists && check_snmp; then
|
||||
disable_snmp_proxy
|
||||
[ $RETVAL -eq 0 ] && service_reload snmpd
|
||||
|
||||
if [ "${TRAP_FORWARD}" = "yes" ]; then
|
||||
trap_forward "reset"
|
||||
[ $RETVAL -eq 0 ] && [ $NO_TRAP -eq 0 ] && \
|
||||
service_reload snmptrapd
|
||||
fi
|
||||
rm -f ${LOCKFILE}
|
||||
fi
|
||||
}
|
||||
|
||||
#############################################################################
|
||||
status()
|
||||
{
|
||||
eval_gettext "${SCRIPT_NAME}: snmp proxy to BMC is "
|
||||
# Checking for lockfile is better.
|
||||
#if grep -q "^proxy" "${SNMPD_LOCAL_CONF}" > /dev/null 2>&1 ; then
|
||||
if [ -f ${LOCKFILE} ]; then
|
||||
eval_gettext "set"
|
||||
else
|
||||
eval_gettext "not set"
|
||||
fi
|
||||
echo
|
||||
RETVAL=0
|
||||
}
|
||||
|
||||
#############################################################################
|
||||
usage()
|
||||
{
|
||||
eval_gettext "Usage: $0 {start|stop|status}"; echo 1>&2
|
||||
RETVAL=1
|
||||
}
|
||||
|
||||
#############################################################################
|
||||
# MAIN
|
||||
#############################################################################
|
||||
case "$1" in
|
||||
start) start ;;
|
||||
stop) stop ;;
|
||||
status) status ;;
|
||||
*) usage ;;
|
||||
esac
|
||||
|
||||
case "$RETVAL" in
|
||||
0|1) ;;
|
||||
2) eval_gettext "${SCRIPT_NAME}: failed to read ${BMC_INFO} " 1>&2 ;;
|
||||
3) eval_gettext "${SCRIPT_NAME}: failed to get proxy config." 1>&2 ;;
|
||||
4) eval_gettext "${SCRIPT_NAME}: failed to set ${SNMPD_LOCAL_CONF}." 1>&2 ;;
|
||||
5) eval_gettext "${SCRIPT_NAME}: failed to disable snmp proxy." 1>&2 ;;
|
||||
6) eval_gettext "${SCRIPT_NAME}: failed to reload snmpd." 1>&2 ;;
|
||||
7) eval_gettext "${SCRIPT_NAME}: failed to update ${SYSCONF}." 1>&2 ;;
|
||||
8) eval_gettext "${SCRIPT_NAME}: failed to set IPMI alert dest." 1>&2 ;;
|
||||
9) eval_gettext "${SCRIPT_NAME}: no free IPMI alert dest." 1>&2 ;;
|
||||
10) eval_gettext "${SCRIPT_NAME}: failed to set IPMI PEF." 1>&2 ;;
|
||||
11) eval_gettext "${SCRIPT_NAME}: failed to write snmptrapd.conf." 1>&2 ;;
|
||||
12) eval_gettext "${SCRIPT_NAME}: snmpd not found." 1>&2 ;;
|
||||
*) eval_gettext "${SCRIPT_NAME}: unknown error." 1>&2 ;;
|
||||
esac
|
||||
|
||||
if [ ${RETVAL} -gt 1 ]; then
|
||||
eval_gettext " Return code: ${RETVAL}"; echo
|
||||
fi
|
||||
exit ${RETVAL}
|
||||
#############################################################################
|
||||
# end of file
|
||||
#############################################################################
|
@ -1,18 +0,0 @@
|
||||
[Unit]
|
||||
Description=Setup SNMP proxy to BMC
|
||||
|
||||
After=exchange-bmc-os-info.service
|
||||
Requires=exchange-bmc-os-info.service
|
||||
PartOf=exchange-bmc-os-info.service
|
||||
|
||||
ConditionPathExists=/var/run/bmc-info
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
|
||||
ExecStart=/usr/libexec/bmc-snmp-proxy start
|
||||
ExecStop=/usr/libexec/bmc-snmp-proxy stop
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -1,48 +0,0 @@
|
||||
# bmc-snmp-proxy
|
||||
#
|
||||
# Config file to control SNMP redirection between
|
||||
# the OS and Service Processor/Baseboard Management Controller (BMC)
|
||||
#
|
||||
# bmc-snnmp-proxy helps redirect certain SNMP requests (to this host)
|
||||
# destined to the Service Processor. We will need the Service Processor's
|
||||
# SNMP community string and the OID of the Service Processor's SNMP agent.
|
||||
#
|
||||
# For redirecting Traps from the Service Processor to the trap sink
|
||||
# configured in the host (this system), we will have to set
|
||||
# TRAP_FORWARD below.
|
||||
#
|
||||
# See here for details
|
||||
# https://fedoraproject.org/wiki/Features/AgentFreeManagement
|
||||
|
||||
### Configure SNMP proxy to BMC/Service Processor ###
|
||||
|
||||
### Service Processor/BMC SNMP Community String.
|
||||
# Name: BMC_COMMUNITY
|
||||
# Description: Set community string of the Service Processor (BMC)'s
|
||||
# SNMP agent.
|
||||
# Default: public
|
||||
#
|
||||
BMC_COMMUNITY="public"
|
||||
|
||||
### OEM Specific OID of Service Processor
|
||||
# Name: BMC_OID
|
||||
# Description: SNMP OID that we would like to redirect to the Service
|
||||
# Processor (BMC). This can be unique to each OEM.
|
||||
# Default: ".1.3.6.1.4.1.674.10892.2"
|
||||
BMC_OID=".1.3.6.1.4.1.674.10892.2" # Dell iDRAC
|
||||
|
||||
### Forward Traps from the Service Processor to trap sink
|
||||
# Name: TRAP_FORWARD
|
||||
# Description: Enabling this will allow traps from the Service Processor
|
||||
# to be directed to this system and configure snmptrapd
|
||||
# Note: This option will have no effect if trap sink on the system is
|
||||
# not configured
|
||||
# Default: "no"
|
||||
TRAP_FORWARD="yes"
|
||||
|
||||
### Reload snmpd and snmptrapd
|
||||
# Name: RELOAD_SERVICES
|
||||
# Description: Reload snmpd and snmptrapd after making changes to their config
|
||||
# files.
|
||||
# Default: "yes"
|
||||
RELOAD_SERVICES="yes"
|
@ -1,326 +0,0 @@
|
||||
#!/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
|
||||
#############################################################################
|
@ -1,13 +0,0 @@
|
||||
[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
|
@ -1,26 +0,0 @@
|
||||
# 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"
|
3457
doc/ipmitool.1
3457
doc/ipmitool.1
File diff suppressed because it is too large
Load Diff
@ -1,86 +0,0 @@
|
||||
/*
|
||||
* 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
|
||||
|
||||
/* 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);
|
@ -1,129 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2008 Intel Corporation.
|
||||
* All rights reserved
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef IPMI_DCMI_H
|
||||
#define IPMI_DCMI_H
|
||||
|
||||
#include <ipmitool/ipmi.h>
|
||||
|
||||
/* DCMI commands per DCMI 1.5 SPEC */
|
||||
|
||||
#define IPMI_DCMI 0xDC /* Group Extension Identification */
|
||||
#define IPMI_DCMI_COMPAT 0x01
|
||||
#define IPMI_DCMI_GETRED 0x02
|
||||
#define IPMI_DCMI_GETLMT 0x03
|
||||
#define IPMI_DCMI_SETLMT 0x04
|
||||
#define IPMI_DCMI_PWRACT 0x05
|
||||
#define IPMI_DCMI_GETASSET 0x06
|
||||
#define IPMI_DCMI_SETASSET 0x08
|
||||
#define IPMI_DCMI_GETMNGCTRLIDS 0x09
|
||||
#define IPMI_DCMI_SETMNGCTRLIDS 0x0A
|
||||
#define IPMI_DCMI_SETTERMALLIMIT 0x0B
|
||||
#define IPMI_DCMI_GETTERMALLIMIT 0x0C
|
||||
#define IPMI_DCMI_GETSNSR 0x07
|
||||
#define IPMI_DCMI_PWRMGT 0x08
|
||||
#define IPMI_DCMI_GETTEMPRED 0x10
|
||||
#define IPMI_DCMI_SETCONFPARAM 0x12
|
||||
#define IPMI_DCMI_GETCONFPARAM 0x13
|
||||
|
||||
#define IPMI_DCMI_CONFORM 0x0001
|
||||
#define IPMI_DCMI_1_1_CONFORM 0x0101
|
||||
#define IPMI_DCMI_1_5_CONFORM 0x0501
|
||||
|
||||
#define DCMI_MAX_BYTE_SIZE 0x10
|
||||
#define DCMI_MAX_BYTE_TEMP_READ_SIZE 0x08
|
||||
|
||||
#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)))
|
||||
|
||||
|
||||
struct dcmi_cmd {
|
||||
uint16_t val;
|
||||
const char * str;
|
||||
const char * desc;
|
||||
};
|
||||
|
||||
/* make a struct for the return from the get limit command */
|
||||
struct power_limit {
|
||||
uint8_t grp_id; /* first byte: Group Extension ID */
|
||||
uint16_t reserved_1; /* second and third bytes are reserved */
|
||||
uint8_t action; /* fourth byte is the exception action */
|
||||
uint16_t limit; /* fifth through sixth byte are the power limit in watts */
|
||||
uint32_t correction; /* seventh - 10th bytes are the correction period */
|
||||
uint16_t reserved_2; /* 11th - 12th are reserved bytes */
|
||||
uint16_t sample; /* 13th - 14th are sample period time */
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* make a struct for the return from the reading command */
|
||||
struct power_reading {
|
||||
uint8_t grp_id; /* first byte: Group Extension ID */
|
||||
uint16_t curr_pwr;
|
||||
uint16_t min_sample;
|
||||
uint16_t max_sample;
|
||||
uint16_t avg_pwr;
|
||||
uint32_t time_stamp; /* time since epoch */
|
||||
uint32_t sample;
|
||||
uint8_t state;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* make a struct for the return from the capabilites command */
|
||||
struct capabilities {
|
||||
uint8_t grp_id; /* first byte: Group Extension ID */
|
||||
uint16_t conformance;
|
||||
uint8_t revision;
|
||||
uint8_t data_byte1;
|
||||
uint8_t data_byte2;
|
||||
uint8_t data_byte3;
|
||||
uint8_t data_byte4;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* make a struct for the return from the sensor info command */
|
||||
struct sensor_info {
|
||||
uint8_t grp_id; /* first byte: Group Extension ID */
|
||||
uint8_t i_instances;
|
||||
uint8_t i_records;
|
||||
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* make a struct for the return from the get asset tag command */
|
||||
struct asset_tag {
|
||||
uint8_t grp_id; /* first byte: Group Extension ID */
|
||||
uint8_t length;
|
||||
const char tag[16];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* make a struct for the return from the set asset tag command */
|
||||
struct set_asset_tag {
|
||||
uint8_t grp_id; /* first byte: Group Extension ID */
|
||||
uint8_t length;
|
||||
const char tag[16];
|
||||
uint8_t *data;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* make a struct for the return from the get thermal limit command */
|
||||
struct thermal_limit {
|
||||
uint8_t grp_id; /* first byte: Group Extension ID */
|
||||
uint8_t exceptionActions;
|
||||
uint8_t tempLimit;
|
||||
uint16_t exceptionTime;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
int ipmi_dcmi_main(struct ipmi_intf * intf, int argc, char ** argv);
|
||||
|
||||
#endif /*IPMI_DCMI_H*/
|
@ -1,366 +0,0 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2008, Dell 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:
|
||||
- Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions 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 Dell Inc nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
*****************************************************************************/
|
||||
#ifndef IPMI_DELLOEM_H
|
||||
#define IPMI_DELLOEM_H
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
#define MIN(a,b) ((a) < (b) ? (a) : (b))
|
||||
#define MAX(a,b) ((a) > (b) ? (a) : (b))
|
||||
|
||||
|
||||
/* Dell selector for LCD control - get and set unless specified */
|
||||
#define IPMI_DELL_LCD_STRING_SELECTOR 0xC1 /* RW get/set the user string */
|
||||
#define IPMI_DELL_LCD_CONFIG_SELECTOR 0xC2 /* RW set to user/default/none */
|
||||
#define IPMI_DELL_LCD_GET_CAPS_SELECTOR 0xCF /* RO use when available*/
|
||||
#define IPMI_DELL_LCD_STRINGEX_SELECTOR 0xD0 /* RW get/set the user string use first when available*/
|
||||
#define IPMI_DELL_LCD_STATUS_SELECTOR 0xE7 /* LCD string when config set to default.*/
|
||||
#define IPMI_DELL_PLATFORM_MODEL_NAME_SELECTOR 0xD1 /* LCD string when config set to default.*/
|
||||
|
||||
/* Dell defines for picking which string to use */
|
||||
#define IPMI_DELL_LCD_CONFIG_USER_DEFINED 0x00 /* use string set by user*/
|
||||
#define IPMI_DELL_LCD_CONFIG_DEFAULT 0x01 /* use platform model name*/
|
||||
#define IPMI_DELL_LCD_CONFIG_NONE 0x02 /* blank*/
|
||||
#define IPMI_DELL_LCD_iDRAC_IPV4ADRESS 0x04 /* use string set by user*/
|
||||
#define IPMI_DELL_LCD_IDRAC_MAC_ADDRESS 0x08 /* use platform model name*/
|
||||
#define IPMI_DELL_LCD_OS_SYSTEM_NAME 0x10 /* blank*/
|
||||
|
||||
#define IPMI_DELL_LCD_SERVICE_TAG 0x20 /* use string set by user*/
|
||||
#define IPMI_DELL_LCD_iDRAC_IPV6ADRESS 0x40 /* use string set by user*/
|
||||
#define IPMI_DELL_LCD_AMBEINT_TEMP 0x80 /* use platform model name*/
|
||||
#define IPMI_DELL_LCD_SYSTEM_WATTS 0x100 /* blank*/
|
||||
#define IPMI_DELL_LCD_ASSET_TAG 0x200
|
||||
|
||||
#define IPMI_DELL_LCD_ERROR_DISP_SEL 0x01 /* use platform model name*/
|
||||
#define IPMI_DELL_LCD_ERROR_DISP_VERBOSE 0x02 /* blank*/
|
||||
|
||||
#define IPMI_DELL_IDRAC_VALIDATOR 0xDD
|
||||
#define IPMI_DELL_POWER_CAP_STATUS 0xBA
|
||||
#define IPMI_DELL_AVG_POWER_CONSMP_HST 0xEB
|
||||
#define IPMI_DELL_PEAK_POWER_CONSMP_HST 0xEC
|
||||
#define SYSTEM_BOARD_SYSTEM_LEVEL_SENSOR_NUM 0x98
|
||||
|
||||
#define IDRAC_11G 1
|
||||
#define IDRAC_12G 2
|
||||
// Return Error code for license
|
||||
#define LICENSE_NOT_SUPPORTED 0x6F
|
||||
#define VFL_NOT_LICENSED 0x33
|
||||
#define btuphr 0x01
|
||||
#define watt 0x00
|
||||
#define IPMI_DELL_POWER_CAP 0xEA
|
||||
#define percent 0x03
|
||||
|
||||
/* Not on all Dell servers. If there, use it.*/
|
||||
typedef struct _tag_ipmi_dell_lcd_caps
|
||||
{
|
||||
uint8_t parm_rev; /* 0x11 for IPMI 2.0 */
|
||||
uint8_t char_set; /* always 1 for printable ASCII 0x20-0x7E */
|
||||
uint8_t number_lines; /* 0-4, 1 for 9G. 10G tbd */
|
||||
uint8_t max_chars[4]; /* 62 for triathlon, 0 if not present (glacier) */
|
||||
/* [0] is max chars for line 1 */
|
||||
}IPMI_DELL_LCD_CAPS;
|
||||
|
||||
#define IPMI_DELL_LCD_STRING_LENGTH_MAX 62 /* Valid for 9G. Glacier ??. */
|
||||
#define IPMI_DELL_LCD_STRING1_SIZE 14
|
||||
#define IPMI_DELL_LCD_STRINGN_SIZE 16
|
||||
|
||||
/* vFlash subcommands */
|
||||
#define IPMI_GET_EXT_SD_CARD_INFO 0xA4
|
||||
|
||||
|
||||
typedef struct _tag_ipmi_dell_lcd_string
|
||||
{
|
||||
uint8_t parm_rev; /* 0x11 for IPMI 2.0 */
|
||||
uint8_t data_block_selector; /* 16-byte data block number to access, 0 based.*/
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
uint8_t encoding : 4; /* 0 is printable ASCII 7-bit */
|
||||
uint8_t length; /* 0 to max chars from lcd caps */
|
||||
uint8_t data[IPMI_DELL_LCD_STRING1_SIZE]; /* not zero terminated. */
|
||||
}selector_0_string;
|
||||
uint8_t selector_n_data[IPMI_DELL_LCD_STRINGN_SIZE];
|
||||
}lcd_string;
|
||||
} __attribute__ ((packed)) IPMI_DELL_LCD_STRING;
|
||||
|
||||
/* Only found on servers with more than 1 line. Use if available. */
|
||||
typedef struct _tag_ipmi_dell_lcd_stringex
|
||||
{
|
||||
uint8_t parm_rev; /* 0x11 for IPMI 2.0 */
|
||||
uint8_t line_number; /* LCD line number 1 to 4 */
|
||||
uint8_t data_block_selector; /* 16-byte data block number to access, 0 based.*/
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
uint8_t encoding : 4; /* 0 is printable ASCII 7-bit */
|
||||
uint8_t length; /* 0 to max chars from lcd caps */
|
||||
uint8_t data[IPMI_DELL_LCD_STRING1_SIZE]; /* not zero terminated. */
|
||||
} selector_0_string;
|
||||
uint8_t selector_n_data[IPMI_DELL_LCD_STRINGN_SIZE];
|
||||
} lcd_string;
|
||||
} __attribute__ ((packed)) IPMI_DELL_LCD_STRINGEX;
|
||||
|
||||
|
||||
typedef struct _lcd_status
|
||||
{
|
||||
char parametersel;
|
||||
char vKVM_status;
|
||||
char lock_status;
|
||||
char Resv1;
|
||||
char Resv;
|
||||
} __attribute__ ((packed)) LCD_STATUS;
|
||||
|
||||
typedef struct _lcd_mode
|
||||
{
|
||||
uint8_t parametersel;
|
||||
uint32_t lcdmode;
|
||||
uint16_t lcdquallifier;
|
||||
uint32_t capabilites;
|
||||
uint8_t error_display;
|
||||
uint8_t Resv;
|
||||
} __attribute__ ((packed)) LCD_MODE;
|
||||
|
||||
#define PARAM_REV_OFFSET (uint8_t)(0x1)
|
||||
#define VIRTUAL_MAC_OFFSET (uint8_t)(0x1)
|
||||
|
||||
#define LOM_MACTYPE_ETHERNET 0
|
||||
#define LOM_MACTYPE_ISCSI 1
|
||||
#define LOM_MACTYPE_RESERVED 3
|
||||
|
||||
#define LOM_ETHERNET_ENABLED 0
|
||||
#define LOM_ETHERNET_DISABLED 1
|
||||
#define LOM_ETHERNET_PLAYINGDEAD 2
|
||||
#define LOM_ETHERNET_RESERVED 3
|
||||
|
||||
#define LOM_ACTIVE 1
|
||||
#define LOM_INACTIVE 0
|
||||
|
||||
#define MACADDRESSLENGH 6
|
||||
#define MAX_LOM 8
|
||||
|
||||
|
||||
#define EMB_NIC_MAC_ADDRESS_11G (uint8_t)(0xDA)
|
||||
#define EMB_NIC_MAC_ADDRESS_9G_10G (uint8_t)(0xCB)
|
||||
|
||||
#define IMC_IDRAC_10G (uint8_t) (0x08)
|
||||
#define IMC_CMC (uint8_t) (0x09)
|
||||
#define IMC_IDRAC_11G_MONOLITHIC (uint8_t) (0x0A)
|
||||
#define IMC_IDRAC_11G_MODULAR (uint8_t) (0x0B)
|
||||
#define IMC_UNUSED (uint8_t) (0x0C)
|
||||
#define IMC_MASER_LITE_BMC (uint8_t) (0x0D)
|
||||
#define IMC_MASER_LITE_NU (uint8_t) (0x0E)
|
||||
#define IMC_IDRAC_12G_MONOLITHIC (uint8_t) (0x10)
|
||||
#define IMC_IDRAC_12G_MODULAR (uint8_t) (0x11)
|
||||
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned int BladSlotNumber : 4;
|
||||
unsigned int MacType : 2;
|
||||
unsigned int EthernetStatus : 2;
|
||||
unsigned int NICNumber : 5;
|
||||
unsigned int Reserved : 3;
|
||||
uint8_t MacAddressByte[MACADDRESSLENGH];
|
||||
} LOMMacAddressType;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
LOMMacAddressType LOMMacAddress [MAX_LOM];
|
||||
} EmbeddedNICMacAddressType;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8_t MacAddressByte[MACADDRESSLENGH];
|
||||
} MacAddressType;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
MacAddressType MacAddress [MAX_LOM];
|
||||
} EmbeddedNICMacAddressType_10G;
|
||||
|
||||
|
||||
|
||||
#define TRANSPORT_NETFN (uint8_t)(0xc)
|
||||
#define GET_LAN_PARAM_CMD (uint8_t)(0x02)
|
||||
#define MAC_ADDR_PARAM (uint8_t)(0x05)
|
||||
#define LAN_CHANNEL_NUMBER (uint8_t)(0x01)
|
||||
|
||||
#define IDRAC_NIC_NUMBER (uint8_t)(0x8)
|
||||
|
||||
#define TOTAL_N0_NICS_INDEX (uint8_t)(0x1)
|
||||
|
||||
|
||||
// 12g supported
|
||||
#define SET_NIC_SELECTION_12G_CMD (uint8_t)(0x28)
|
||||
#define GET_NIC_SELECTION_12G_CMD (uint8_t)(0x29)
|
||||
|
||||
// 11g supported
|
||||
#define SET_NIC_SELECTION_CMD (uint8_t)(0x24)
|
||||
#define GET_NIC_SELECTION_CMD (uint8_t)(0x25)
|
||||
#define GET_ACTIVE_NIC_CMD (uint8_t)(0xc1)
|
||||
#define POWER_EFFICENCY_CMD (uint8_t)(0xc0)
|
||||
#define SERVER_POWER_CONSUMPTION_CMD (uint8_t)(0x8F)
|
||||
|
||||
#define POWER_SUPPLY_INFO (uint8_t)(0xb0)
|
||||
#define IPMI_ENTITY_ID_POWER_SUPPLY (uint8_t)(0x0a)
|
||||
#define SENSOR_STATE_STR_SIZE (uint8_t)(64)
|
||||
#define SENSOR_NAME_STR_SIZE (uint8_t)(64)
|
||||
|
||||
#define GET_PWRMGMT_INFO_CMD (uint8_t)(0x9C)
|
||||
#define CLEAR_PWRMGMT_INFO_CMD (uint8_t)(0x9D)
|
||||
#define GET_PWR_HEADROOM_CMD (uint8_t)(0xBB)
|
||||
#define GET_PWR_CONSUMPTION_CMD (uint8_t)(0xB3)
|
||||
#define GET_FRONT_PANEL_INFO_CMD (uint8_t)0xb5
|
||||
|
||||
|
||||
typedef struct _ipmi_power_monitor
|
||||
{
|
||||
uint32_t cumStartTime;
|
||||
uint32_t cumReading;
|
||||
uint32_t maxPeakStartTime;
|
||||
uint32_t ampPeakTime;
|
||||
uint16_t ampReading;
|
||||
uint32_t wattPeakTime;
|
||||
uint16_t wattReading;
|
||||
} __attribute__ ((packed)) IPMI_POWER_MONITOR;
|
||||
|
||||
|
||||
#define MAX_POWER_FW_VERSION 8
|
||||
|
||||
typedef struct _ipmi_power_supply_infoo
|
||||
{
|
||||
/*No param_rev it is not a System Information Command */
|
||||
uint16_t ratedWatts;
|
||||
uint16_t ratedAmps;
|
||||
uint16_t ratedVolts;
|
||||
uint32_t vendorid;
|
||||
uint8_t FrimwareVersion[MAX_POWER_FW_VERSION];
|
||||
uint8_t Powersupplytype;
|
||||
uint16_t ratedDCWatts;
|
||||
uint16_t Resv;
|
||||
|
||||
} __attribute__ ((packed)) IPMI_POWER_SUPPLY_INFO;
|
||||
|
||||
|
||||
typedef struct ipmi_power_consumption_data
|
||||
{
|
||||
uint16_t actualpowerconsumption;
|
||||
uint16_t powerthreshold;
|
||||
uint16_t warningthreshold;
|
||||
uint8_t throttlestate;
|
||||
uint16_t maxpowerconsumption;
|
||||
uint16_t throttlepowerconsumption;
|
||||
uint16_t Resv;
|
||||
} __attribute__ ((packed)) IPMI_POWER_CONSUMPTION_DATA;
|
||||
|
||||
|
||||
typedef struct ipmi_inst_power_consumption_data
|
||||
{
|
||||
uint16_t instanpowerconsumption;
|
||||
uint16_t instanApms;
|
||||
uint16_t resv1;
|
||||
uint8_t resv;
|
||||
} __attribute__ ((packed)) IPMI_INST_POWER_CONSUMPTION_DATA;
|
||||
|
||||
typedef struct _ipmi_avgpower_consump_histroy
|
||||
{
|
||||
uint8_t parameterselector;
|
||||
uint16_t lastminutepower;
|
||||
uint16_t lasthourpower;
|
||||
uint16_t lastdaypower;
|
||||
uint16_t lastweakpower;
|
||||
|
||||
} __attribute__ ((packed)) IPMI_AVGPOWER_CONSUMP_HISTORY;
|
||||
|
||||
typedef struct _ipmi_power_consump_histroy
|
||||
{
|
||||
uint8_t parameterselector;
|
||||
uint16_t lastminutepower;
|
||||
uint16_t lasthourpower;
|
||||
uint16_t lastdaypower;
|
||||
uint16_t lastweakpower;
|
||||
uint32_t lastminutepowertime;
|
||||
uint32_t lasthourpowertime;
|
||||
uint32_t lastdaypowertime;
|
||||
uint32_t lastweekpowertime;
|
||||
} __attribute__ ((packed)) IPMI_POWER_CONSUMP_HISTORY;
|
||||
|
||||
|
||||
typedef struct _ipmi_delloem_power_cap
|
||||
{
|
||||
uint8_t parameterselector;
|
||||
uint16_t PowerCap;
|
||||
uint8_t unit;
|
||||
uint16_t MaximumPowerConsmp;
|
||||
uint16_t MinimumPowerConsmp;
|
||||
uint16_t totalnumpowersupp;
|
||||
uint16_t AvailablePower ;
|
||||
uint16_t SystemThrottling;
|
||||
uint16_t Resv;
|
||||
} __attribute__ ((packed)) IPMI_POWER_CAP;
|
||||
|
||||
typedef struct _power_headroom
|
||||
{
|
||||
uint16_t instheadroom;
|
||||
uint16_t peakheadroom;
|
||||
} __attribute__ ((packed)) POWER_HEADROOM;
|
||||
|
||||
struct vFlashstr {
|
||||
uint8_t val;
|
||||
const char * str;
|
||||
};
|
||||
typedef struct ipmi_vFlash_extended_info
|
||||
{
|
||||
uint8_t vflashcompcode;
|
||||
uint8_t sdcardstatus;
|
||||
uint32_t sdcardsize;
|
||||
uint32_t sdcardavailsize;
|
||||
uint8_t bootpartion;
|
||||
uint8_t Resv;
|
||||
} __attribute__ ((packed)) IPMI_DELL_SDCARD_INFO;
|
||||
|
||||
|
||||
typedef struct _SensorReadingType
|
||||
{
|
||||
uint8_t sensorReading;
|
||||
uint8_t sensorFlags;
|
||||
uint16_t sensorState;
|
||||
}SensorReadingType;
|
||||
uint16_t compareinputwattage(IPMI_POWER_SUPPLY_INFO* powersupplyinfo, uint16_t inputwattage);
|
||||
int ipmi_delloem_main(struct ipmi_intf * intf, int argc, char ** argv);
|
||||
|
||||
#endif /*IPMI_DELLOEM_H*/
|
@ -1,68 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2007 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.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_EKANALYZER_H
|
||||
#define IPMI_EKANALYZER_H
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <ipmitool/ipmi.h>
|
||||
#include <ipmitool/ipmi_fru.h>
|
||||
|
||||
#define RTM_FRU_FILE 0x00
|
||||
#define A1_AMC_FRU_FILE 0x01
|
||||
#define A2_AMC_FRU_FILE 0x02
|
||||
#define A3_AMC_FRU_FILE 0x03
|
||||
#define A4_AMC_FRU_FILE 0x04
|
||||
#define B1_AMC_FRU_FILE 0x05
|
||||
#define B2_AMC_FRU_FILE 0x06
|
||||
#define B3_AMC_FRU_FILE 0x07
|
||||
#define B4_AMC_FRU_FILE 0x08
|
||||
#define ON_CARRIER_FRU_FILE 0x09
|
||||
#define CONFIG_FILE 0x0A
|
||||
#define SHELF_MANAGER_FRU_FILE 0x0B
|
||||
|
||||
#define MIN_ARGUMENT 0x02
|
||||
#define RTM_IPMB_L 0x90
|
||||
|
||||
#define MAX_FILE_NUMBER 8
|
||||
/* this voltag is specified in AMC.0 specification Table 3-10 */
|
||||
#define AMC_VOLTAGE 12 /*volts*/
|
||||
|
||||
#define SIZE_OF_GUID 16
|
||||
#define FRU_RADIAL_IPMB0_LINK_MAPPING 0x15
|
||||
|
||||
int ipmi_ekanalyzer_main(struct ipmi_intf *, int, char **);
|
||||
|
||||
#endif /* IPMI_EKANALYZER_H */
|
@ -1,243 +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>
|
||||
|
||||
/* 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 */
|
@ -1,808 +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 **);
|
||||
|
||||
/* 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;
|
||||
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 */
|
@ -1,211 +0,0 @@
|
||||
|
||||
/*
|
||||
(C) Kontron
|
||||
*/
|
||||
|
||||
#ifndef _IPMI_PICMG_H_
|
||||
#define _IPMI_PICMG_H_
|
||||
|
||||
#include <ipmitool/ipmi.h>
|
||||
|
||||
/* PICMG version */
|
||||
#define PICMG_CPCI_MAJOR_VERSION 1
|
||||
#define PICMG_ATCA_MAJOR_VERSION 2
|
||||
#define PICMG_AMC_MAJOR_VERSION 4
|
||||
|
||||
/* PICMG commands */
|
||||
#define PICMG_GET_PICMG_PROPERTIES_CMD 0x00
|
||||
#define PICMG_GET_ADDRESS_INFO_CMD 0x01
|
||||
#define PICMG_GET_SHELF_ADDRESS_INFO_CMD 0x02
|
||||
#define PICMG_SET_SHELF_ADDRESS_INFO_CMD 0x03
|
||||
#define PICMG_FRU_CONTROL_CMD 0x04
|
||||
#define PICMG_GET_FRU_LED_PROPERTIES_CMD 0x05
|
||||
#define PICMG_GET_LED_COLOR_CAPABILITIES_CMD 0x06
|
||||
#define PICMG_SET_FRU_LED_STATE_CMD 0x07
|
||||
#define PICMG_GET_FRU_LED_STATE_CMD 0x08
|
||||
#define PICMG_SET_IPMB_CMD 0x09
|
||||
#define PICMG_SET_FRU_POLICY_CMD 0x0A
|
||||
#define PICMG_GET_FRU_POLICY_CMD 0x0B
|
||||
#define PICMG_FRU_ACTIVATION_CMD 0x0C
|
||||
#define PICMG_GET_DEVICE_LOCATOR_RECORD_CMD 0x0D
|
||||
#define PICMG_SET_PORT_STATE_CMD 0x0E
|
||||
#define PICMG_GET_PORT_STATE_CMD 0x0F
|
||||
#define PICMG_COMPUTE_POWER_PROPERTIES_CMD 0x10
|
||||
#define PICMG_SET_POWER_LEVEL_CMD 0x11
|
||||
#define PICMG_GET_POWER_LEVEL_CMD 0x12
|
||||
#define PICMG_RENEGOTIATE_POWER_CMD 0x13
|
||||
#define PICMG_GET_FAN_SPEED_PROPERTIES_CMD 0x14
|
||||
#define PICMG_SET_FAN_LEVEL_CMD 0x15
|
||||
#define PICMG_GET_FAN_LEVEL_CMD 0x16
|
||||
#define PICMG_BUSED_RESOURCE_CMD 0x17
|
||||
|
||||
/* AMC.0 commands */
|
||||
#define PICMG_AMC_SET_PORT_STATE_CMD 0x19
|
||||
#define PICMG_AMC_GET_PORT_STATE_CMD 0x1A
|
||||
/* AMC.0 R2.0 commands */
|
||||
#define PICMG_AMC_SET_CLK_STATE_CMD 0x2C
|
||||
#define PICMG_AMC_GET_CLK_STATE_CMD 0x2D
|
||||
|
||||
/* Site Types */
|
||||
#define PICMG_ATCA_BOARD 0x00
|
||||
#define PICMG_POWER_ENTRY 0x01
|
||||
#define PICMG_SHELF_FRU 0x02
|
||||
#define PICMG_DEDICATED_SHMC 0x03
|
||||
#define PICMG_FAN_TRAY 0x04
|
||||
#define PICMG_FAN_FILTER_TRAY 0x05
|
||||
#define PICMG_ALARM 0x06
|
||||
#define PICMG_AMC 0x07
|
||||
#define PICMG_PMC 0x08
|
||||
#define PICMG_RTM 0x09
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct picmg_set_fru_activation_cmd {
|
||||
unsigned char picmg_id; /* always 0*/
|
||||
unsigned char fru_id; /* threshold setting mask */
|
||||
unsigned char fru_state; /* fru activation/deactivation */
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
typedef enum picmg_busres_board_cmd_types {
|
||||
PICMG_BUSRES_BOARD_CMD_QUERY =0,
|
||||
PICMG_BUSRES_BOARD_CMD_RELEASE,
|
||||
PICMG_BUSRES_BOARD_CMD_FORCE,
|
||||
PICMG_BUSRES_BOARD_CMD_BUS_FREE
|
||||
} t_picmg_busres_board_cmd_types ;
|
||||
|
||||
typedef enum picmg_busres_shmc_cmd_types {
|
||||
PICMG_BUSRES_SHMC_CMD_REQUEST =0,
|
||||
PICMG_BUSRES_SHMC_CMD_RELINQUISH,
|
||||
PICMG_BUSRES_SHMC_CMD_NOTIFY
|
||||
} t_picmg_busres_shmc_cmd_types ;
|
||||
|
||||
typedef enum picmg_busres_resource_id {
|
||||
PICMG_BUSRES_METAL_TEST_BUS_1=0,
|
||||
PICMG_BUSRES_METAL_TEST_BUS_2,
|
||||
PICMG_BUSRES_SYNC_CLOCK_GROUP_1,
|
||||
PICMG_BUSRES_SYNC_CLOCK_GROUP_2,
|
||||
PICMG_BUSRES_SYNC_CLOCK_GROUP_3
|
||||
} t_picmg_busres_resource_id;
|
||||
|
||||
/* the LED color capabilities */
|
||||
static const char* led_color_str[] __attribute__((unused)) = {
|
||||
"reserved",
|
||||
"BLUE",
|
||||
"RED",
|
||||
"GREEN",
|
||||
"AMBER",
|
||||
"ORANGE",
|
||||
"WHITE",
|
||||
"reserved"
|
||||
};
|
||||
|
||||
|
||||
static const char* amc_link_type_str[] __attribute__((unused)) = {
|
||||
"RESERVED",
|
||||
"RESERVED1",
|
||||
"PCI EXPRESS",
|
||||
"ADVANCED SWITCHING1",
|
||||
"ADVANCED SWITCHING2",
|
||||
"ETHERNET",
|
||||
"RAPIDIO",
|
||||
"STORAGE",
|
||||
};
|
||||
|
||||
static const char* amc_link_type_ext_str[][16] __attribute__((unused)) = {
|
||||
/* FRU_PICMGEXT_AMC_LINK_TYPE_RESERVED */
|
||||
{
|
||||
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""
|
||||
},
|
||||
/* FRU_PICMGEXT_AMC_LINK_TYPE_RESERVED1 */
|
||||
{
|
||||
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""
|
||||
},
|
||||
/* FRU_PICMGEXT_AMC_LINK_TYPE_PCI_EXPRESS */
|
||||
{
|
||||
"Gen 1 - NSSC",
|
||||
"Gen 1 - SSC",
|
||||
"Gen 2 - NSSC",
|
||||
"Gen 2 - SSC",
|
||||
"", "", "", "",
|
||||
"", "", "", "",
|
||||
"", "", "", ""
|
||||
},
|
||||
/* FRU_PICMGEXT_AMC_LINK_TYPE_ADVANCED_SWITCHING1 */
|
||||
{
|
||||
"Gen 1 - NSSC",
|
||||
"Gen 1 - SSC",
|
||||
"Gen 2 - NSSC",
|
||||
"Gen 2 - SSC",
|
||||
"", "", "", "",
|
||||
"", "", "", "",
|
||||
"", "", "", ""
|
||||
},
|
||||
/* FRU_PICMGEXT_AMC_LINK_TYPE_ADVANCED_SWITCHING2 */
|
||||
{
|
||||
"Gen 1 - NSSC",
|
||||
"Gen 1 - SSC",
|
||||
"Gen 2 - NSSC",
|
||||
"Gen 2 - SSC",
|
||||
"", "", "", "",
|
||||
"", "", "", "",
|
||||
"", "", "", ""
|
||||
},
|
||||
/* FRU_PICMGEXT_AMC_LINK_TYPE_ETHERNET */
|
||||
{
|
||||
"1000BASE-BX (SerDES Gigabit)",
|
||||
"10GBASE-BX410 Gigabit XAUI",
|
||||
"", "",
|
||||
"", "", "", "",
|
||||
"", "", "", "",
|
||||
"", "", "", ""
|
||||
},
|
||||
/* FRU_PICMGEXT_AMC_LINK_TYPE_RAPIDIO */
|
||||
{
|
||||
"1.25 Gbaud transmission rate",
|
||||
"2.5 Gbaud transmission rate",
|
||||
"3.125 Gbaud transmission rate",
|
||||
"", "", "", "", "",
|
||||
"", "", "", "", "", "", "", ""
|
||||
},
|
||||
/* FRU_PICMGEXT_AMC_LINK_TYPE_STORAGE */
|
||||
{
|
||||
"Fibre Channel",
|
||||
"Serial ATA",
|
||||
"Serial Attached SCSI",
|
||||
"", "", "", "", "",
|
||||
"", "", "", "", "", "", "", ""
|
||||
}
|
||||
};
|
||||
|
||||
struct sAmcPortState {
|
||||
#ifndef WORDS_BIGENDIAN
|
||||
unsigned short lane0 : 1;
|
||||
unsigned short lane1 : 1;
|
||||
unsigned short lane2 : 1;
|
||||
unsigned short lane3 : 1;
|
||||
unsigned short type : 8;
|
||||
unsigned short type_ext : 4;
|
||||
unsigned char group_id : 8;
|
||||
#else
|
||||
unsigned char group_id : 8;
|
||||
unsigned short type_ext : 4;
|
||||
unsigned short type : 8;
|
||||
unsigned short lane3 : 1;
|
||||
unsigned short lane2 : 1;
|
||||
unsigned short lane1 : 1;
|
||||
unsigned short lane0 : 1;
|
||||
#endif
|
||||
|
||||
unsigned char state;
|
||||
};
|
||||
|
||||
|
||||
int ipmi_picmg_main (struct ipmi_intf * intf, int argc, char ** argv);
|
||||
uint8_t picmg_discover(struct ipmi_intf *intf);
|
||||
uint8_t ipmi_picmg_ipmb_address(struct ipmi_intf *intf);
|
||||
|
||||
#endif
|
@ -1,46 +0,0 @@
|
||||
/*
|
||||
* 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_SDRADD_H
|
||||
#define IPMI_SDRADD_H
|
||||
|
||||
/*
|
||||
* Methods to add SDRs to repository from built-in sensors or files
|
||||
*/
|
||||
int
|
||||
ipmi_sdr_add_from_sensors(struct ipmi_intf *intf, int maxslot);
|
||||
|
||||
int
|
||||
ipmi_sdr_add_from_file(struct ipmi_intf *intf, const char *ifile);
|
||||
|
||||
int
|
||||
ipmi_sdr_add_from_list(struct ipmi_intf *intf, const char *rangeList);
|
||||
|
||||
#endif /* IPMI_SDRADD_H */
|
@ -2,4 +2,3 @@ Duncan Laurie <duncan@iceblink.org>
|
||||
Fredrik Öhrn <ohrn@chl.chalmers.se>
|
||||
Jon Cassorla <jon.cassorla@newisys.com>
|
||||
Jeremy Ellington <jeremy@jeremye.net>
|
||||
Petter Reinholdtsen <pere@hungry.com>
|
218
ipmitool/ChangeLog
Normal file
218
ipmitool/ChangeLog
Normal file
@ -0,0 +1,218 @@
|
||||
version 1.8.9 released 2007-03-06
|
||||
* Added initial AMC ekey query operation support
|
||||
* Improvements to ekeying support (PICMG 3.x only)
|
||||
* Added initial interactive edition support for multirec; added IANA
|
||||
verification before interpreting PICMG records.
|
||||
* Added edit support for AMC activation "Maximum Internal Current"
|
||||
* Fix bug generating garbage on the screen when handling GetDeviceId
|
||||
and sol traffic occurs
|
||||
* Added ability to map OEM sensor types to OEM description string using
|
||||
IANA number; moved IANA number table
|
||||
* Fix lan set access command to use value already saved within
|
||||
parameters for PEF and authentication
|
||||
* Fix bug in cmd ipmitool lan stats get 1
|
||||
* Add support to allow ipmitool/ipmievd to target specific device
|
||||
nodes on multi-BMC systems
|
||||
* Add support for name+privilege lookup for lanplus sessions
|
||||
* Fix time_t conversion bug for 64-bit OS
|
||||
* Added prefix of hostname on sel ipmievd sessions
|
||||
* Fixed FWUM Get Info
|
||||
* Fix ipmievd fd closing bug
|
||||
* Add set-in-progress flag support to chassis bootdev
|
||||
* Added new chassis bootdev options
|
||||
* Add sol payload enable/disable comman
|
||||
* Fix SOL set errors when commit-write not supported
|
||||
* Fix reset of session timeout for lanplus interface
|
||||
* Fixed lan interface accessibility timeout handling
|
||||
* Fix bug with Function Get Channel Cipher Suites command when
|
||||
more than 1 page used.
|
||||
* Fix missing firmware firewall top-level command
|
||||
* Fix bug in SOL keepalive functionality
|
||||
* Fix SOLv2 NACK and retry handling for Intel ESB2 BMC
|
||||
* Added ipmi_sel_get_oem_sensor* APIs
|
||||
* Added HPM.1 support
|
||||
* Fix segfault when incorrect oem option supplied
|
||||
* Fix bus problem with spd command
|
||||
* Fix segfault in SOL when remote BMC does not return packet
|
||||
* Adjust packet length for AMC.0 retricting IPMB packets to 32 bytes
|
||||
* Added lan packet size reduction mechanism
|
||||
* Fix bug with sendMessage of bad length with different target
|
||||
* Fix for big endian (PPC) architecture
|
||||
* NetBSD fixes
|
||||
* Fix segfault and channel problem with user priv command
|
||||
* Add support for bus/chan on i2c raw command
|
||||
* Add freeipmi interface support
|
||||
* Add remote spd printing
|
||||
* Add better detection of linux/compiler.h to config
|
||||
* Makefile changes to fix makedistcheck, etc.
|
||||
|
||||
version 1.8.8
|
||||
* Fix segfaults in sensor data repository list
|
||||
* Fix ipmievd to open interface before daemonizing
|
||||
* Fix IPMIv1.5 authtype NONE to ignore supplied password
|
||||
* Fix cipher suite display bug in lan print
|
||||
* Fix typo in IPMIv2 SOL output when sending break
|
||||
* Fix improper LUN handling with Tyan SOL
|
||||
* Add LUN support to OpenIPMI interface
|
||||
* Add support for Kontron OEM commands
|
||||
* Update to Kontron Firmware Update command
|
||||
|
||||
version 1.8.7
|
||||
* Remove nuclear clause from license
|
||||
* Add Sun OEM command for blades
|
||||
* Increase argument size for raw commands in shell/exec
|
||||
* Fix handling of LUNs for LAN interfaces
|
||||
* Add IPMIv2 SOL loopback test
|
||||
* Add support for IBM OEM SEL messages
|
||||
* Disable file paranoia checks on read files by default
|
||||
* Support IPMIv2 SOL on older Intel boxes
|
||||
* Display message and exit if keepalive fails during SOL
|
||||
* Add support for setting VLAN id and priority
|
||||
* Add support for FreeBSD OpenIPMI-compatible driver
|
||||
* Add support for IPMIv2 Firmware Firewall
|
||||
* Fix gcc4 compile warnings
|
||||
* Make ipmievd generate pidfile
|
||||
* Add initscripts for ipmievd
|
||||
|
||||
version 1.8.6
|
||||
* Fix memory corruption when sending encrypted SOL traffic
|
||||
* Add keepalive timer to IPMIv2 SOL sessions
|
||||
|
||||
version 1.8.5
|
||||
* Add support for settable SOL escape character with -e option
|
||||
* Add support for Kg BMC key for IPMIv2 authentication with -k option
|
||||
* Add support for Tyan IPMIv1.5 SOL with tsol command
|
||||
* Add support for PICMG devices
|
||||
* Add support for OEM SEL event parsing
|
||||
* Add support for command bridging over lan and lanplus interfaces
|
||||
* New 'chassis selftest' command
|
||||
* Many bufxies and patches from contributors
|
||||
|
||||
version 1.8.3
|
||||
* Add support for 'sel readraw' and 'sel writeraw' commands.
|
||||
* Add support for entering NetFn as a string for RAW commands.
|
||||
* Add support for appending distro tag to integrated RPM builds.
|
||||
* Fix LAN parameter printing to handle Invalid Data Field response
|
||||
without errors.
|
||||
* Add 5ms delay to IPMIv2 SOL retry packets
|
||||
* IPMIv2 interface will now correctly set session privilege level
|
||||
to requested level after session is opened.
|
||||
|
||||
version 1.8.2 (released May 18 2005)
|
||||
* 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.
|
||||
* 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.
|
||||
|
||||
version 1.8.1
|
||||
* ipmievd installs in /usr/sbin
|
||||
|
||||
version 1.8.0
|
||||
* Fix IPMIv2.0 issues
|
||||
* Fix chassis boot parameter support
|
||||
* Add support for linear sensors
|
||||
|
||||
version 1.7.1
|
||||
* Update bmc plugin to work with new Solaris bmc driver (new ioctl
|
||||
for interface detection and new STREAMS message-based interface)
|
||||
|
||||
version 1.7.0
|
||||
* 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 from Tim Murphy at Dell
|
||||
* New "bmc" plugin for Solaris 10 x86
|
||||
* Many bugfixes and contributed patches
|
||||
|
||||
version 1.6.2
|
||||
* Support for Supermicro BMC OEM authentication method
|
||||
|
||||
version 1.6.1
|
||||
* Fix minor problem with LAN parameter setting
|
||||
|
||||
version 1.6.0
|
||||
* Add a README file
|
||||
* Add Solaris x86 interface plugin
|
||||
* Add support for building Solaris packages
|
||||
* Fix segfault when doing "sel list" (from Matthew Braithwaite)
|
||||
* Fix "chassis identify" on some BMCs (from ebrower@sourceforge)
|
||||
* Add command "bmc info" and related output (from ebrower@sourceforge)
|
||||
* Add support for IPMIv2 and Serial-over-LAN from Jeremy at Newisys
|
||||
* Add support for building RPMs as non-root user
|
||||
* Add new "shell" and "exec" commands
|
||||
* Lots of other contributed patches
|
||||
|
||||
version 1.5.9
|
||||
* 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
|
||||
|
||||
version 1.5.8
|
||||
* 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
|
||||
|
||||
version 1.5.7
|
||||
* Add IPMIv1.5 eratta fixes
|
||||
* Additions to FRU printing and FRU multirecords
|
||||
* Better handling of SDR printing
|
||||
* Contrib scripts for creating rrdtool graphs
|
||||
|
||||
version 1.5.6
|
||||
* 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 <20>hrn
|
||||
|
||||
version 1.5.5
|
||||
* Add -U option for setting LAN username
|
||||
* Fix -v usage for plugin interfaces
|
||||
|
||||
version 1.5.4
|
||||
* Put interface plugin API into library
|
||||
* Fix ipmievd
|
||||
|
||||
version 1.5.3
|
||||
* Add -g option to work with grizzly bmc
|
||||
|
||||
version 1.5.2
|
||||
* Add support for setting gratuitous arp interval
|
||||
|
||||
version 1.5.1
|
||||
* Better SEL support
|
||||
* Fix display bug in SDR list
|
||||
|
||||
version 1.5.0
|
||||
* More robust UDP packet handling
|
||||
* Add Intel IMB driver support
|
||||
* Use autoconf/automake/libtool
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
ipmitool
|
||||
Duncan Laurie
|
||||
ipmitool-devel@lists.sourceforge.net
|
||||
duncan@iceblink.org
|
||||
|
||||
Overview
|
||||
========
|
||||
@ -131,109 +131,6 @@ no problems. The IPMIv1.5 interface will attempt to use OpenSSL for MD5
|
||||
hash function at compile time but if that is not found it will use an
|
||||
internal library.
|
||||
|
||||
IPMB Dual Bridging in IPMITOOL
|
||||
-------------------------------
|
||||
|
||||
IPMI offers a standard messaging interface.
|
||||
|
||||
The following concepts are related to this messaging interface:
|
||||
|
||||
Channel type : Communication channel type (SMS/KCS, IPMB, LAN)
|
||||
Channel number : Channel descriptor
|
||||
Requester : Address of the requester
|
||||
Responder : Address of the responder
|
||||
NetFN : The logical function for the request/response.
|
||||
Command : The command number
|
||||
Sequence : An ID identifiying the request/response pair
|
||||
Message tracking : The ability to match request/response pair.
|
||||
|
||||
When a communication is issued through any of the channels, an application
|
||||
formats a request and expect a response.
|
||||
|
||||
Direct Command
|
||||
--------------
|
||||
The simplest form of communication is a "direct command" using SMS/KCS
|
||||
|
||||
Example:
|
||||
ipmitool raw 6 4
|
||||
55 00
|
||||
|
||||
This send raw command 4 (selftest) from netfn 6(application) to KCS, the driver
|
||||
takes care of 'message tracking' and provides the answer.
|
||||
|
||||
Hopefully, the application also includes a "human readable" instance of the API:
|
||||
ipmitool mc selftest
|
||||
Selftest: passed
|
||||
|
||||
Bridged Command
|
||||
---------------
|
||||
One slightly more complicated communication mode is the so-called
|
||||
"bridged command" using IPMB.
|
||||
|
||||
Example:
|
||||
ipmitool -m 0x94 -t 0x9a raw 6 4
|
||||
55 00
|
||||
|
||||
or
|
||||
|
||||
ipmitool -m 0x94 -t 0x9a mc selftest
|
||||
Selftest: passed
|
||||
|
||||
|
||||
This still sends the same command 4 (selftest) from netfn 6(application) to
|
||||
the target. However, to do so, the command is encapsulated (by the driver) and
|
||||
sent using the command 0x34 (send message) from netfn 6(application) to KCS.
|
||||
Then KCS is polled by the driver until a message has been received, then the
|
||||
driver uses command 0x33 (get message). The driver also tracks the message
|
||||
and makes sure the response matches the request. Then it decapsultates the
|
||||
message and gives the response back to the application.
|
||||
|
||||
Dual Bridged Command
|
||||
--------------------
|
||||
Things get a little more ugly when the application needs to reach a management
|
||||
controller sitting on an interface (or channel) not directly connected to the
|
||||
BMC/IPMC. In the case the application must encapsulate its message itself and
|
||||
request the IPMC to deal with message tracking itself.
|
||||
|
||||
Its been working well with IPMITOOL on the LAN interface with:
|
||||
ipmitool -H <ip> -U <user> -P <password> -B 0 -T 0x8a -m 0x20 -t 0x7a -b 7
|
||||
mc selftest
|
||||
|
||||
However, trying to dual bridge commands locally with :
|
||||
ipmitool -B 0 -T 0x9a -m 0x94 -t 0x7a -b 7 mc selftest didn't work
|
||||
(it returned the same data as ipmitool -m 0x20 -t 0x7a -b 7 mc selftest )
|
||||
|
||||
The reason was that the "openipmi" interface pluging didn't
|
||||
encapsulate/decapsulate the message and didn't even detect the intent
|
||||
to double bridge the request.
|
||||
|
||||
./src/ipmitool -B 0 -T 0x8a -m 0x94 -t 0x7a -b 7 mc selftest
|
||||
|
||||
-B 0 : transit channel for first bridge level (channel 0: IPMB-0)
|
||||
-T 0x8a : transit destination address (remote IPMC address)
|
||||
-m 0x94 : source address (local IPMC address on IPMB-0)
|
||||
-t 0x7a : remote target (AMC IPMB-L address)
|
||||
-b 7 : remote channel (channel 7: IPMB-L)
|
||||
|
||||
The transit source address (remote IPMC address on remote channel) is
|
||||
automatically assigned by the remote IPMC.
|
||||
|
||||
Payload Size Limit
|
||||
------------------
|
||||
Because some commands return a lot of data (fru read/get sdr) and because 2
|
||||
levels of encapsulation are used, some command will fail.
|
||||
|
||||
For instance this works.
|
||||
|
||||
ipmitool -H <ip> -U <user> -P <password> -B 0 -T 0x8a -m 0x94 -t 0x7a -b 7
|
||||
mc selftest
|
||||
|
||||
but this does not:
|
||||
|
||||
ipmitool -H <ip> -U <user> -P <password> -B 0 -T 0x8a -m 0x94 -t 0x7a -b 7
|
||||
fru print.
|
||||
|
||||
|
||||
|
||||
Usage
|
||||
=====
|
||||
@ -410,5 +307,3 @@ http://www.intel.com/design/servers/ipmi/spec.htm
|
||||
OpenIPMI project: Linux IPMI kernel driver and userland library
|
||||
http://openipmi.sourceforge.net
|
||||
|
||||
IPMItool commit archive
|
||||
https://lists.sourceforge.net/lists/listinfo/ipmitool-cvs
|
426
ipmitool/configure.in
Normal file
426
ipmitool/configure.in
Normal file
@ -0,0 +1,426 @@
|
||||
dnl
|
||||
dnl autoconf for ipmitool
|
||||
dnl
|
||||
AC_INIT([src/ipmitool.c])
|
||||
AC_CANONICAL_SYSTEM
|
||||
AM_INIT_AUTOMAKE([ipmitool], [1.8.9])
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AC_CONFIG_SRCDIR([src/ipmitool.c])
|
||||
AC_PREREQ(2.50)
|
||||
AC_SUBST(ac_configure_args)
|
||||
|
||||
dnl check for requirements
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_LN_S
|
||||
AC_PROG_MAKE_SET
|
||||
AC_CHECK_PROG([RPMBUILD], [rpmbuild], [rpmbuild], [rpm])
|
||||
AC_CHECK_PROG([SED], [sed], [sed])
|
||||
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS([stdlib.h string.h sys/ioctl.h sys/stat.h unistd.h paths.h])
|
||||
AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h sys/socket.h])
|
||||
AC_CHECK_HEADERS([sys/byteorder.h byteswap.h])
|
||||
|
||||
AC_C_CONST
|
||||
AC_C_INLINE
|
||||
AC_C_BIGENDIAN
|
||||
|
||||
AC_FUNC_MALLOC
|
||||
AC_FUNC_SELECT_ARGTYPES
|
||||
AC_FUNC_STRTOD
|
||||
AC_CHECK_FUNCS([alarm gethostbyname socket select])
|
||||
AC_CHECK_FUNCS([memmove memset strchr strdup strerror])
|
||||
AC_CHECK_FUNCS([getpassphrase])
|
||||
|
||||
CFLAGS="$CFLAGS -fno-strict-aliasing"
|
||||
|
||||
AM_PROG_LIBTOOL
|
||||
LIBTOOL="$LIBTOOL --silent"
|
||||
|
||||
AC_SEARCH_LIBS([gethostbyname], [nsl])
|
||||
AC_SEARCH_LIBS([socket], [socket], [],
|
||||
[AC_CHECK_LIB([nsl], [socket],
|
||||
[LIBS="$LIBS -lsocket -lnsl"], [], [-lsocket])])
|
||||
|
||||
if test "x$prefix" = "xNONE"; then
|
||||
prefix="$ac_default_prefix"
|
||||
fi
|
||||
|
||||
if test "x$exec_prefix" = "xNONE"; then
|
||||
exec_prefix="$prefix"
|
||||
fi
|
||||
|
||||
enable_all_options=yes
|
||||
|
||||
dnl set some things so we build with GNU tools on Solaris
|
||||
case "$host_os" in
|
||||
solaris*)
|
||||
MAKE=gmake
|
||||
STRIP=gstrip
|
||||
LD=gld
|
||||
AR=gar
|
||||
# openssl libs are in /usr/sfw/lib on solaris 10
|
||||
LIBS="$LIBS -R/usr/sfw/lib"
|
||||
# disable the linux-specific interfaces
|
||||
# and bmc on SPARC (there is no bmc driver for SPARC)
|
||||
if [[ `mach -p` = sparc ]]; then
|
||||
enable_intf_bmc=no
|
||||
else
|
||||
enable_intf_bmc=yes
|
||||
fi
|
||||
enable_intf_imb=no
|
||||
enable_intf_open=no
|
||||
enable_intf_lipmi=no
|
||||
enable_ipmishell=no
|
||||
enable_all_options=no
|
||||
;;
|
||||
*cygwin*)
|
||||
# disable the linux and solaris-specific interfaces
|
||||
enable_intf_imb=no
|
||||
enable_intf_open=no
|
||||
enable_intf_lipmi=no
|
||||
enable_intf_bmc=no
|
||||
enable_ipmishell=no
|
||||
;;
|
||||
*darwin*)
|
||||
# disable the linux and solaris-specific interfaces
|
||||
enable_intf_imb=no
|
||||
enable_intf_open=no
|
||||
enable_intf_lipmi=no
|
||||
enable_intf_bmc=no
|
||||
enable_ipmishell=no
|
||||
;;
|
||||
*freebsd*)
|
||||
enable_intf_imb=no
|
||||
enable_intf_lipmi=no
|
||||
enable_intf_bmc=no
|
||||
;;
|
||||
*netbsd*)
|
||||
enable_intf_imb=no
|
||||
enable_intf_lipmi=no
|
||||
enable_intf_bmc=no
|
||||
enable_intf_open=no
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(ARCH, $host_cpu)
|
||||
AC_SUBST(OS, $host_os)
|
||||
AC_SUBST(PSTAMP, $host)
|
||||
AC_SUBST(BASEDIR, $prefix)
|
||||
|
||||
dnl allow solaris builds to include all options
|
||||
AC_ARG_ENABLE([solaris-opt],
|
||||
[AC_HELP_STRING([--enable-solaris-opt],
|
||||
[enable all options for Solaris [default=no]])],
|
||||
[], [enable_solaris_opt=no])
|
||||
if test "x$enable_all_options" = "xyes" || test "x$enable_solaris_opt" = "xyes"; then
|
||||
AC_DEFINE(ENABLE_ALL_OPTIONS, [1], [Define to 1 to enable all command line options.])
|
||||
fi
|
||||
|
||||
dnl check for OpenSSL functionality
|
||||
AC_ARG_ENABLE([internal-md5],
|
||||
[AC_HELP_STRING([--enable-internal-md5],
|
||||
[enable internal MD5 library [default=no]])],
|
||||
[], [enable_internal_md5=no])
|
||||
|
||||
AC_CHECK_LIB([crypto], [EVP_aes_128_cbc],
|
||||
[if test "x$enable_internal_md5" != "xyes"; then
|
||||
have_crypto=yes; LIBS="$LIBS -lcrypto"
|
||||
fi], [have_crypto=no], [-lcrypto])
|
||||
|
||||
AC_CHECK_LIB([crypto], [MD5_Init],
|
||||
[if test "x$enable_internal_md5" != "xyes"; then
|
||||
if test "x$have_crypto" != "xyes"; then
|
||||
LIBS="$LIBS -lcrypto"
|
||||
have_md5=yes
|
||||
fi
|
||||
AC_DEFINE(HAVE_CRYPTO_MD5, [1], [Define to 1 if libcrypto supports MD5.])
|
||||
fi], [], [-lcrypto])
|
||||
|
||||
AC_CHECK_LIB([crypto], [MD2_Init],
|
||||
[if test "x$enable_internal_md5" != "xyes"; then
|
||||
if test "x$have_crypto" != "xyes" && test "x$have_md5" != "xyes"; then
|
||||
LIBS="$LIBS -lcrypto"
|
||||
have_md2=yes
|
||||
fi
|
||||
AC_DEFINE(HAVE_CRYPTO_MD2, [1], [Define to 1 if libcrypto supports MD2.])
|
||||
fi], [], [-lcrypto])
|
||||
|
||||
dnl enable IPMIv1.5 LAN interface
|
||||
AC_ARG_ENABLE([intf-lan],
|
||||
[AC_HELP_STRING([--enable-intf-lan],
|
||||
[enable IPMIv1.5 LAN interface [default=yes]])],
|
||||
[], [enable_intf_lan=yes])
|
||||
if test "x$enable_intf_lan" = "xstatic" || test "x$enable_intf_lan" = "xplugin"; then
|
||||
enable_intf_lan=yes
|
||||
fi
|
||||
if test "x$enable_intf_lan" = "xyes"; then
|
||||
AC_DEFINE(IPMI_INTF_LAN, [1], [Define to 1 to enable LAN IPMIv1.5 interface.])
|
||||
AC_SUBST(INTF_LAN, [lan])
|
||||
AC_SUBST(INTF_LAN_LIB, [libintf_lan.la])
|
||||
IPMITOOL_INTF_LIB="$IPMITOOL_INTF_LIB lan/libintf_lan.la"
|
||||
fi
|
||||
|
||||
dnl enable IPMIv2.0 RMCP+ LAN interface
|
||||
AC_ARG_ENABLE([intf-lanplus],
|
||||
[AC_HELP_STRING([--enable-intf-lanplus],
|
||||
[enable IPMIv2.0 RMCP+ LAN interface [default=auto]])],
|
||||
[if test "x$enable_intf_lanplus" != "xno" && test "x$have_crypto" != "xyes"; then
|
||||
echo "** The lanplus interface requires an SSL library with EVP_aes_128_cbc defined."
|
||||
enable_intf_lanplus=no
|
||||
fi],
|
||||
[enable_intf_lanplus=$have_crypto])
|
||||
if test "x$enable_intf_lanplus" = "xstatic" || test "x$enable_intf_lanplus" = "xplugin"; then
|
||||
enable_intf_lanplus=yes
|
||||
fi
|
||||
if test "x$enable_intf_lanplus" = "xyes"; then
|
||||
AC_DEFINE(IPMI_INTF_LANPLUS, [1], [Define to 1 to enable LAN+ IPMIv2 interface.])
|
||||
AC_SUBST(INTF_LANPLUS, [lanplus])
|
||||
AC_SUBST(INTF_LANPLUS_LIB, [libintf_lanplus.la])
|
||||
IPMITOOL_INTF_LIB="$IPMITOOL_INTF_LIB lanplus/libintf_lanplus.la"
|
||||
else
|
||||
enable_intf_lanplus=no
|
||||
fi
|
||||
|
||||
ORIG_CPPFLAGS=$CPPFLAGS
|
||||
|
||||
dnl look for OpenIPMI header files
|
||||
AC_ARG_WITH([kerneldir],
|
||||
[AC_HELP_STRING([--with-kerneldir=DIR],
|
||||
[set kernel include path to DIR])],
|
||||
[if test "x$with_kerneldir" = "xyes"; then
|
||||
with_kerneldir="/lib/modules/`uname -r`/build"
|
||||
fi
|
||||
CFLAGS="$CFLAGS -I ${with_kerneldir}/include"
|
||||
AC_SUBST(CFLAGS)
|
||||
CPPFLAGS="$CPPFLAGS -I ${with_kerneldir}/include"
|
||||
AC_SUBST(CPPFLAGS)
|
||||
if test -s ${with_kerneldir}/include/linux/version.h ; then
|
||||
kernelver=`grep UTS_RELEASE ${with_kerneldir}/include/linux/version.h | \
|
||||
sed 's/^\#define UTS_RELEASE \"\(2\.[0-9]\)\..*/\1/'`
|
||||
if test "x$kernelver" = "x2.6"; then
|
||||
CPPFLAGS="$CPPFLAGS -D__user="
|
||||
AC_SUBST(CPPFLAGS)
|
||||
fi
|
||||
fi])
|
||||
|
||||
AH_TEMPLATE([HAVE_LINUX_COMPILER_H], [])
|
||||
AC_MSG_CHECKING([for linux/compiler.h])
|
||||
AC_PREPROC_IFELSE([#include <linux/compiler.h>],
|
||||
[AC_DEFINE(HAVE_LINUX_COMPILER_H, [1],
|
||||
[Define to 1 if you have the <linux/compiler.h> header file.])
|
||||
AC_MSG_RESULT([yes])],
|
||||
[AC_MSG_RESULT([no])])
|
||||
|
||||
CPPFLAGS=$ORIG_CPPFLAGS
|
||||
AC_SUBST(CPPFLAGS)
|
||||
|
||||
AC_CHECK_HEADER([linux/ipmi.h],
|
||||
[AC_DEFINE(HAVE_OPENIPMI_H, [1],
|
||||
[Define to 1 if you have the <linux/ipmi.h> header file.])],
|
||||
[AC_CHECK_HEADER([sys/ipmi.h],
|
||||
[AC_DEFINE(HAVE_FREEBSD_IPMI_H, [1],
|
||||
[Define to 1 if you have the <sys/ipmi.h> header file.])],
|
||||
[echo "** Unable to find OpenIPMI header files. Using internal version."])])
|
||||
|
||||
dnl look for FreeIPMI files
|
||||
AC_CHECK_LIB(freeipmi, ipmi_open_inband, [have_free=yes], [have_free=no])
|
||||
AC_ARG_ENABLE([intf-free],
|
||||
[AC_HELP_STRING([--enable-intf-free],
|
||||
[enable FreeIPMI IPMI interface [default=auto]])],
|
||||
[if test "x$enable_intf_free" != "xno" && test "x$have_free" != "xyes"; then
|
||||
echo "** Unable to build FreeIPMI interface support!"
|
||||
enable_intf_free=no
|
||||
fi],
|
||||
[enable_intf_free=$have_free])
|
||||
if test "x$enable_intf_free" = "xstatic" || test "x$enable_intf_free" = "xplugin"; then
|
||||
enable_intf_free=yes
|
||||
fi
|
||||
if test "x$enable_intf_free" = "xyes"; then
|
||||
dnl Determine if you got the right FreeIPMI version
|
||||
AC_MSG_CHECKING([for good libfreeipmi version])
|
||||
AC_TRY_COMPILE([
|
||||
#include <sys/types.h> /* For size_t */
|
||||
#include <stdio.h> /* For NULL */
|
||||
#include <freeipmi/freeipmi.h>
|
||||
#include <freeipmi/udm/ipmi-udm.h>
|
||||
], [
|
||||
ipmi_device_t dev;
|
||||
dev = ipmi_open_inband(IPMI_DEVICE_KCS,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
NULL,
|
||||
0);
|
||||
], ac_free_version_good=yes,ac_free_version_good=no)
|
||||
AC_MSG_RESULT($ac_free_version_good)
|
||||
if test "x$ac_free_version_good" = "xyes"; then
|
||||
AC_DEFINE(IPMI_INTF_FREE, [1], [Define to 1 to enable FreeIPMI interface.])
|
||||
AC_SUBST(INTF_FREE, [free])
|
||||
AC_SUBST(INTF_FREE_LIB, [libintf_free.la])
|
||||
IPMITOOL_INTF_LIB="$IPMITOOL_INTF_LIB free/libintf_free.la"
|
||||
else
|
||||
enable_intf_free=no
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl look for termios header file
|
||||
AC_CHECK_HEADER([termios.h],
|
||||
[AC_DEFINE(HAVE_TERMIOS_H, [1], [Define to 1 if you have <termios.h>.])],
|
||||
[AC_CHECK_HEADER([sys/termios.h],
|
||||
[AC_DEFINE(HAVE_SYS_TERMIOS_H, [1], [Define to 1 if you have <sys/termios.h>.])],
|
||||
[echo "** Unable to find termios header file."])])
|
||||
|
||||
dnl set RPM distro tag for use in RPM name
|
||||
AC_ARG_WITH([rpm-distro],
|
||||
[AC_HELP_STRING([--with-rpm-distro=DISTRO],
|
||||
[set Linux distribution tag for use in RPM version string])],
|
||||
[AC_SUBST(DISTRO, $with_rpm_distro)])
|
||||
|
||||
dnl set RPM release tag
|
||||
AC_ARG_WITH([rpm-release],
|
||||
[AC_HELP_STRING([--with-rpm-release=RELEASE],
|
||||
[set release number for RPM release field])],
|
||||
[], [with_rpm_release=1])
|
||||
AC_SUBST(RPM_RELEASE, $with_rpm_release)
|
||||
|
||||
dnl enable Linux OpenIPMI interface
|
||||
AC_ARG_ENABLE([intf-open],
|
||||
[AC_HELP_STRING([--enable-intf-open],
|
||||
[enable Linux OpenIPMI interface [default=auto]])],
|
||||
[], [enable_intf_open=yes])
|
||||
if test "x$enable_intf_open" = "xstatic" || test "x$enable_intf_open" = "xplugin"; then
|
||||
enable_intf_open=yes
|
||||
fi
|
||||
if test "x$enable_intf_open" = "xyes"; then
|
||||
AC_DEFINE(IPMI_INTF_OPEN, [1], [Define to 1 to enable Linux OpenIPMI interface.])
|
||||
AC_SUBST(INTF_OPEN, [open])
|
||||
AC_SUBST(INTF_OPEN_LIB, [libintf_open.la])
|
||||
IPMITOOL_INTF_LIB="$IPMITOOL_INTF_LIB open/libintf_open.la"
|
||||
fi
|
||||
|
||||
dnl enable Intel IMB interface
|
||||
AC_ARG_ENABLE([intf-imb],
|
||||
[AC_HELP_STRING([--enable-intf-imb],
|
||||
[enable Intel IMB driver interface [default=auto]])],
|
||||
[], [enable_intf_imb=yes])
|
||||
if test "x$enable_intf_imb" = "xstatic" || test "x$enable_intf_imb" = "xplugin"; then
|
||||
enable_intf_imb=yes
|
||||
fi
|
||||
if test "x$enable_intf_imb" = "xyes"; then
|
||||
AC_DEFINE(IPMI_INTF_IMB, [1], [Define to 1 to enable Intel IMB interface.])
|
||||
AC_SUBST(INTF_IMB, [imb])
|
||||
AC_SUBST(INTF_IMB_LIB, [libintf_imb.la])
|
||||
IPMITOOL_INTF_LIB="$IPMITOOL_INTF_LIB imb/libintf_imb.la"
|
||||
fi
|
||||
|
||||
dnl enable Solaris LIPMI interface
|
||||
AC_CHECK_HEADER([sys/lipmi/lipmi_intf.h], [have_lipmi=yes], [have_lipmi=no])
|
||||
AC_ARG_ENABLE([intf-lipmi],
|
||||
[AC_HELP_STRING([--enable-intf-lipmi],
|
||||
[enable Solaris 9 x86 IPMI interface [default=no]])],
|
||||
[if test "x$enable_intf_lipmi" != "xno" && test "x$have_lipmi" != "xyes"; then
|
||||
echo "** Unable to build Solaris 9 x86 IPMI interface support!"
|
||||
enable_intf_lipmi=no
|
||||
fi],
|
||||
[enable_intf_lipmi=no])
|
||||
if test "x$enable_intf_lipmi" = "xstatic" || test "x$enable_intf_lipmi" = "xplugin"; then
|
||||
enable_intf_lipmi=yes
|
||||
fi
|
||||
if test "x$enable_intf_lipmi" = "xyes"; then
|
||||
AC_DEFINE(IPMI_INTF_LIPMI, [1], [Define to 1 to enable Solaris 9 LIPMI interface.])
|
||||
AC_SUBST(INTF_LIPMI, [lipmi])
|
||||
AC_SUBST(INTF_LIPMI_LIB, [libintf_lipmi.la])
|
||||
IPMITOOL_INTF_LIB="$IPMITOOL_INTF_LIB lipmi/libintf_lipmi.la"
|
||||
fi
|
||||
|
||||
dnl enable Solaris BMC interface
|
||||
AC_ARG_ENABLE([intf-bmc],
|
||||
[AC_HELP_STRING([--enable-intf-bmc],
|
||||
[enable Solaris 10 x86 IPMI interface [default=auto]])],,
|
||||
[enable_intf_bmc=no])
|
||||
if test "x$enable_intf_bmc" = "xstatic" || test "x$enable_intf_bmc" = "xplugin"; then
|
||||
enable_intf_bmc=yes
|
||||
fi
|
||||
if test "x$enable_intf_bmc" = "xyes"; then
|
||||
AC_DEFINE(IPMI_INTF_BMC, [1], [Define to 1 to enable Solaris 10 BMC interface.])
|
||||
AC_SUBST(INTF_BMC, [bmc])
|
||||
AC_SUBST(INTF_BMC_LIB, [libintf_bmc.la])
|
||||
IPMITOOL_INTF_LIB="$IPMITOOL_INTF_LIB bmc/libintf_bmc.la"
|
||||
fi
|
||||
|
||||
AC_SUBST(IPMITOOL_INTF_LIB)
|
||||
|
||||
dnl check for readline library to enable ipmi shell
|
||||
AC_ARG_ENABLE([ipmishell],
|
||||
[AC_HELP_STRING([--enable-ipmishell],
|
||||
[enable IPMI shell interface [default=yes]])],
|
||||
[], [enable_ipmishell=yes])
|
||||
if test "x$enable_ipmishell" = "xyes"; then
|
||||
AC_SEARCH_LIBS([tgetent], [tinfo ncurses curses readline termcap])
|
||||
AC_SEARCH_LIBS([initscr], [ncurses curses], [have_curses=yes])
|
||||
AC_SEARCH_LIBS([readline], [readline edit], [have_readline=yes])
|
||||
if test "x$have_curses" = "xyes" && test "x$have_readline" = "xyes"; then
|
||||
AC_DEFINE(HAVE_READLINE, [1], [Define to 1 if readline present.])
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl Enable -Wall -Werror
|
||||
AC_ARG_ENABLE([buildcheck],
|
||||
[AC_HELP_STRING([--enable-buildcheck],
|
||||
[enable -Wall -Werror for build testing [default=no]])],
|
||||
[if test "x$enable_buildcheck" != "xno"; then
|
||||
CFLAGS="$CFLAGS -Wall -Werror -Wpointer-arith -Wstrict-prototypes"
|
||||
fi], [])
|
||||
|
||||
AC_SUBST(CFLAGS)
|
||||
|
||||
dnl Enable extra file security paranoia
|
||||
AC_ARG_ENABLE([file-security],
|
||||
[AC_HELP_STRING([--enable-file-security],
|
||||
[enable extra security checks on files opened for read [default=no]])],
|
||||
[if test "x$enable_file_security" != "xno"; then
|
||||
AC_DEFINE(ENABLE_FILE_SECURITY, [1], [Define to 1 for extra file security.])
|
||||
fi], [])
|
||||
|
||||
dnl Generate files for build
|
||||
AC_CONFIG_FILES([Makefile
|
||||
doc/Makefile
|
||||
contrib/Makefile
|
||||
control/Makefile
|
||||
control/pkginfo
|
||||
control/prototype
|
||||
control/rpmmacros
|
||||
control/ipmitool.spec
|
||||
lib/Makefile
|
||||
include/Makefile
|
||||
include/ipmitool/Makefile
|
||||
src/Makefile
|
||||
src/plugins/Makefile
|
||||
src/plugins/lan/Makefile
|
||||
src/plugins/lanplus/Makefile
|
||||
src/plugins/open/Makefile
|
||||
src/plugins/free/Makefile
|
||||
src/plugins/imb/Makefile
|
||||
src/plugins/bmc/Makefile
|
||||
src/plugins/lipmi/Makefile])
|
||||
|
||||
AC_OUTPUT
|
||||
|
||||
AC_MSG_RESULT([])
|
||||
AC_MSG_RESULT([ipmitool $VERSION])
|
||||
AC_MSG_RESULT([])
|
||||
AC_MSG_RESULT([Interfaces])
|
||||
AC_MSG_RESULT([ lan : $enable_intf_lan])
|
||||
AC_MSG_RESULT([ lanplus : $enable_intf_lanplus])
|
||||
AC_MSG_RESULT([ open : $enable_intf_open])
|
||||
AC_MSG_RESULT([ free : $enable_intf_free])
|
||||
AC_MSG_RESULT([ imb : $enable_intf_imb])
|
||||
AC_MSG_RESULT([ bmc : $enable_intf_bmc])
|
||||
AC_MSG_RESULT([ lipmi : $enable_intf_lipmi])
|
||||
AC_MSG_RESULT([])
|
||||
AC_MSG_RESULT([Extra tools])
|
||||
AC_MSG_RESULT([ ipmievd : yes])
|
||||
AC_MSG_RESULT([])
|
||||
|
@ -30,12 +30,8 @@
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
dist_pkgdata_DATA = oem_ibm_sel_map
|
||||
|
||||
EXTRA_DIST = README \
|
||||
EXTRA_DIST = README oem_ibm_sel_map \
|
||||
bmclanconf ipmi.init.basic ipmi.init.redhat \
|
||||
exchange-bmc-os-info.init.redhat exchange-bmc-os-info.service.redhat \
|
||||
exchange-bmc-os-info.sysconf \
|
||||
ipmievd.init.redhat ipmievd.init.suse ipmievd.init.debian \
|
||||
collect_data.sh create_rrds.sh create_webpage_compact.sh create_webpage.sh \
|
||||
bmc-snmp-proxy bmc-snmp-proxy.service bmc-snmp-proxy.sysconf
|
||||
collect_data.sh create_rrds.sh create_webpage_compact.sh create_webpage.sh
|
||||
|
@ -5,7 +5,7 @@ echo "Setting up OpenIPMI driver..."
|
||||
# load the ipmi modules
|
||||
modprobe ipmi_msghandler
|
||||
modprobe ipmi_devintf
|
||||
if ! modprobe ipmi_si_drv ; then
|
||||
if ! modprobe ipmi_kcs_drv ; then
|
||||
modprobe ipmi_si # try new module name
|
||||
fi
|
||||
|
@ -38,7 +38,7 @@ start() {
|
||||
# module if that fails.
|
||||
if ! /sbin/modprobe ipmi_si >/dev/null 2>&1
|
||||
then
|
||||
/sbin/modprobe ipmi_si_drv || RETVAL=1
|
||||
/sbin/modprobe ipmi_kcs_drv || RETVAL=1
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -173,7 +173,7 @@ remove () {
|
||||
then
|
||||
# Try removing both 2.4 and 2.6 modules.
|
||||
/sbin/rmmod ipmi_si 2>/dev/null
|
||||
/sbin/rmmod ipmi_si_drv 2>/dev/null
|
||||
/sbin/rmmod ipmi_kcs_drv 2>/dev/null
|
||||
/sbin/rmmod ipmi_devintf
|
||||
/sbin/rmmod ipmi_msghandler
|
||||
else
|
@ -1,5 +1,3 @@
|
||||
"0xC1","XX","XX","XX","XX","XX","XX","XX","0x01","0x00","Chassis Number","R","R","0x00","CPU shutdown - Potential cause "triple fault" a software address problem"
|
||||
"0xC1","XX","XX","XX","XX","XX","XX","XX","0x02","0x01","Chassis Number","Failed Memory Card","Spare Memory Card","0x00","Memory Mirrored Failover Occurred - System running from mirrored memory image"
|
||||
"0xC1","XX","XX","XX","XX","XX","XX","XX","0x02","0x04","Chassis Number","Memory Card","Completion Code (0x00=Success)","0x00","Memory hot replace event"
|
||||
"0xC1","XX","XX","XX","XX","XX","XX","XX","0x02","0x05","Chassis Number","Memory Card","Memory Size (in 512MB units)","0x00","Memory hot add event"
|
||||
"0xC1","XX","XX","XX","XX","XX","XX","XX","0x03","0x00","Chassis Number","Scalability Port Number","R","0x00","Scalability link down"
|
||||
@ -21,9 +19,14 @@
|
||||
"0xE0","0x00","0x08","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","PCI device has an invalid PCI configuration space header"
|
||||
"0xE0","0x00","0x09","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","FRU information for added PCI device"
|
||||
"0xE0","0x00","0x0A","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","FRU information for removed PCI device"
|
||||
"0xE0","0x00","0x0B","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","A PCI device was removed, PCI FRU information is stored in next log entry"
|
||||
"0xE0","0x00","0x0C","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","A PCI device was added, PCI FRU information is stored in next log entry"
|
||||
"0xE0","0x00","0x0B","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","A PCI device was added, PCI FRU information is stored in next log entry"
|
||||
"0xE0","0x00","0x0C","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","A PCI device was removed, PCI FRU information is stored in next log entry"
|
||||
"0xE0","0x00","0x0D","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","Requested resources not available"
|
||||
"0xE0","0x00","0x0E","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","Required I/O Space Not Available"
|
||||
"0xE0","0x00","0x0F","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","Required I/O Space Not Available"
|
||||
"0xE0","0x00","0x10","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","Required I/O Space Not Available"
|
||||
"0xE0","0x00","0x11","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","Required I/O Space Not Available"
|
||||
"0xE0","0x00","0x12","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","Required I/O Space Not Available"
|
||||
"0xE0","0x00","0x13","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","Planar video disabled due to add in video card"
|
||||
"0xE0","0x00","0x14","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","FRU information for PCI device partially disabled "
|
||||
"0xE0","0x00","0x15","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","A PCI device was partially disabled, PCI FRU information is stored in next log entry"
|
||||
@ -51,6 +54,11 @@
|
||||
"0xE0","0x00","0x0B","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","R","R","R","0x01","A PCI device was added, PCI FRU information is stored in next log entry"
|
||||
"0xE0","0x00","0x0C","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","R","R","R","0x01","A PCI device was removed, PCI FRU information is stored in next log entry"
|
||||
"0xE0","0x00","0x0D","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","R","R","R","0x01","Requested resources not available"
|
||||
"0xE0","0x00","0x0E","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","R","R","R","0x01","Required I/O Space Not Available"
|
||||
"0xE0","0x00","0x0F","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","R","R","R","0x01","Required I/O Space Not Available"
|
||||
"0xE0","0x00","0x10","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","R","R","R","0x01","Required I/O Space Not Available"
|
||||
"0xE0","0x00","0x11","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","R","R","R","0x01","Required I/O Space Not Available"
|
||||
"0xE0","0x00","0x12","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","R","R","R","0x01","Required I/O Space Not Available"
|
||||
"0xE0","0x00","0x13","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","R","R","R","0x01","Planar video disabled due to add in video card"
|
||||
"0xE0","0x00","0x14","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","R","R","R","0x01","FRU information for PCI device partially disabled "
|
||||
"0xE0","0x00","0x15","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","R","R","R","0x01","A PCI device was partially disabled, PCI FRU information is stored in next log entry"
|
||||
@ -68,23 +76,20 @@
|
||||
"0xE0","0x01","0x01","Chassis Number","Processor Number","R","R","R","R","R","R","R","R","0x00","Unable to apply processor microcode update"
|
||||
"0xE0","0x01","0x02","Chassis Number","Processor Number","R","R","R","R","R","R","R","R","0x00","POST does not support current stepping level of processor"
|
||||
"0xE0","0x01","0x03","Chassis Number","Processor Number","R","R","R","R","R","R","R","R","0x00","CPU mismatch detected"
|
||||
"0xE0","0x01","0x04","Chassis Number","R","R","R","R","R","R","R","R","R","0x00","Invalid configuration of processor card."
|
||||
"0xE0","0x02","0x00","Chassis Number","Memory Card","Memory DIMM","R","R","R","R","R","R","R","0x00","Uncorrectable memory error occurred"
|
||||
"0xE0","0x02","0x01","Chassis Number","Memory Card","Memory DIMM","Failing Symbol","R","R","R","R","R","R","0x00","Correctable memory threshold occurred"
|
||||
"0xE0","0x02","0x02","0x00","Chassis","Memory Card","Memory DIMM","R","R","R","R","R","R","0x00","DIMM enabled"
|
||||
"0xE0","0x02","0x02","0x01","Chassis","Memory Card","Memory DIMM","R","R","R","R","R","R","0x00","DIMM disabled, failed ECC test"
|
||||
"0xE0","0x02","0x02","0x02","Chassis","Memory Card","Memory DIMM","R","R","R","R","R","R","0x00","DIMM disabled, failed POST/BIOS memory test"
|
||||
"0xE0","0x02","0x02","0x03","Chassis","Memory Card","Memory DIMM","R","R","R","R","R","R","0x00","DIMM disabled, non-supported memory device"
|
||||
"0xE0","0x02","0x02","0x04","Chassis","Memory Card","Memory DIMM","R","R","R","R","R","R","0x00","DIMM disabled, non-matching or missing DIMM(s)"
|
||||
"0xE0","0x02","0x03","0x00","Chassis Number","Memory Card","R","R","R","R","R","R","R","0x00","Memory card enabled"
|
||||
"0xE0","0x02","0x03","0x01","Chassis Number","Memory Card","R","R","R","R","R","R","R","0x00","Memory card disabled"
|
||||
"0xE0","0x02","0x02 ","0x01","Chassis","Memory Card","Memory DIMM","R","R","R","R","R","R","0x00","DIMM disabled, failed ECC test"
|
||||
"0xE0","0x02","0x02 ","0x02","Chassis","Memory Card","Memory DIMM","R","R","R","R","R","R","0x00","DIMM disabled, failed POST/BIOS memory test"
|
||||
"0xE0","0x02","0x02 ","0x03","Chassis","Memory Card","Memory DIMM","R","R","R","R","R","R","0x00","DIMM disabled, non-supported memory device"
|
||||
"0xE0","0x02","0x02 ","0x04","Chassis","Memory Card","Memory DIMM","R","R","R","R","R","R","0x00","DIMM disabled, non-matching or missing DIMM(s)"
|
||||
"0xE0","0x03","0x00","Chassis Number","Memory Card","R","R","R","R","R","R","R","R","0x00","Memory card enabled"
|
||||
"0xE0","0x03","0x00","Chassis Number","Memory Card","R","R","R","R","R","R","R","R","0x00","Memory card disabled"
|
||||
"0xE0","0x02","0x00","0x00","Chassis","Memory Card","Memory DIMM","R","R","R","R","R","R","0x01","DIMM enabled"
|
||||
"0xE0","0x02","0x00","0x01","Chassis","Memory Card","Memory DIMM","R","R","R","R","R","R","0x01","DIMM disabled, failed ECC test"
|
||||
"0xE0","0x02","0x00","0x02","Chassis","Memory Card","Memory DIMM","R","R","R","R","R","R","0x01","DIMM disabled, failed POST/BIOS memory test"
|
||||
"0xE0","0x02","0x00","0x03","Chassis","Memory Card","Memory DIMM","R","R","R","R","R","R","0x01","DIMM disabled, non-supported memory device"
|
||||
"0xE0","0x02","0x00","0x04","Chassis","Memory Card","Memory DIMM","R","R","R","R","R","R","0x01","DIMM disabled, non-matching or missing DIMM(s)"
|
||||
"0xE0","0x02","0x00","0x05","Chassis","Memory Card","Memory DIMM","R","R","R","R","R","R","0x01","DIMM disabled, multi-bit or multi-symbol error"
|
||||
"0xE0","0x02","0x01","0x00","Chassis","Failed Channel","R","R","R","R","R","R","R","0x01","AMB Failure Detected on Channel X During Last Boot"
|
||||
"0xE1","0x00","0x00","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","Unknown SERR/PERR detected on PCI bus"
|
||||
"0xE1","0x00","0x01","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: Address of special cycle DPE"
|
||||
"0xE1","0x00","0x02","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","PERR: Master read parity error"
|
||||
@ -93,11 +98,11 @@
|
||||
"0xE1","0x00","0x05","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: Device signaled SERR"
|
||||
"0xE1","0x00","0x06","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","PERR: Slave signaled parity error"
|
||||
"0xE1","0x00","0x07","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: Signaled Target Abort"
|
||||
"0xE1","0x00","0x08","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","BUS_CORRECTABLE: Additional Correctable ECC Error"
|
||||
"0xE1","0x00","0x08","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","PERR: Additional Correctable ECC Error"
|
||||
"0xE1","0x00","0x09","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: Received Master Abort"
|
||||
"0xE1","0x00","0x0A","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","PERR: Additional Uncorrectable ECC Error"
|
||||
"0xE1","0x00","0x0B","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: Split Completion Discarded"
|
||||
"0xE1","0x00","0x0C","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","BUS_CORRECTABLE: Correctable ECC Error"
|
||||
"0xE1","0x00","0x0C","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","PERR: Correctable ECC Error"
|
||||
"0xE1","0x00","0x0D","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: Unexpected Split Completion"
|
||||
"0xE1","0x00","0x0E","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","PERR: Uncorrectable ECC Error"
|
||||
"0xE1","0x00","0x0F","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: Received split completion error"
|
||||
@ -108,15 +113,15 @@
|
||||
"0xE1","0x00","0x15","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: PCI-PCI bridge secondary error: Device Signaled SERR"
|
||||
"0xE1","0x00","0x16","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","PERR: PCI-PCI bridge secondary error: Slave Signaled Parity Error"
|
||||
"0xE1","0x00","0x17","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: PCI-PCI bridge secondary error: Signaled Target Abort"
|
||||
"0xE1","0x00","0x18","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","BUS_CORRECTABLE: PCI-PCI bridge secondary error: Additional Correctable ECC Error"
|
||||
"0xE1","0x00","0x18","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","PERR: PCI-PCI bridge secondary error: Additional Correctable ECC Error"
|
||||
"0xE1","0x00","0x19","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: PCI-PCI bridge secondary error: Received Master Abort"
|
||||
"0xE1","0x00","0x1A","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","PERR: PCI-PCI bridge secondary error: Additional Uncorrectable ECC Error"
|
||||
"0xE1","0x00","0x1B","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: PCI-PCI bridge secondary error: Split Completion Discarded"
|
||||
"0xE1","0x00","0x1C","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","BUS_CORRECTABLE: PCI-PCI bridge secondary error: Correctable ECC Error"
|
||||
"0xE1","0x00","0x1C","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","PERR: PCI-PCI bridge secondary error: Correctable ECC Error"
|
||||
"0xE1","0x00","0x1D","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: PCI-PCI bridge secondary error: Unexpected Split Completion"
|
||||
"0xE1","0x00","0x1E","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","PERR: PCI-PCI bridge secondary error: Uncorrectable ECC Error"
|
||||
"0xE1","0x00","0x1F","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: PCI-PCI bridge secondary error: Received split completion error"
|
||||
"0xE1","0x00","0x20","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","BUS_CORRECTABLE: PCI ECC Error (Corrected)"
|
||||
"0xE1","0x00","0x20","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","PERR: PCI ECC Error (Corrected)"
|
||||
"0xE1","0x00","0x21","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: PCI Bus Address Parity Error"
|
||||
"0xE1","0x00","0x22","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","PERR: PCI Bus Data Parity Error"
|
||||
"0xE1","0x00","0x23","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: SERR# Asserted"
|
||||
@ -177,8 +182,6 @@
|
||||
"0xE1","0x02","0x00","0x01","Failed Row 1","Failed Row 2","Spare Row 1","Spare Row 2","R","R","R","R","R","0x00","Memory sparing event, start 2"
|
||||
"0xE1","0x02","0x00","0x03","Failed Row 1","Failed Row 2","Spare Row 1","Spare Row 2","R","R","R","R","R","0x00","Memory sparing event, done 2"
|
||||
"0xE1","0x02","0x01","Failed Port","Spare Port","R","R","R","R","R","R","R","R","0x00","Memory mirroring failover occurred"
|
||||
"0xE1","0x02","0x00","0x00","R","R","R","R","R","R","R","R","R","0x01","Memory sparing event, start 1"
|
||||
"0xE1","0x02","0x00","0x02","R","R","R","R","R","R","R","R","R","0x01","Memory sparing event, done 1"
|
||||
"0xE1","0x04","0x00","0x00","FSB FERR/NERR Register","FSB FERR/NERR Register","Chassis Number","R","R","R","R","R","R","0x00","FSB A Fatal"
|
||||
"0xE1","0x04","0x00","0x01","FSB FERR/NERR Register","FSB FERR/NERR Register","Chassis Number","R","R","R","R","R","R","0x00","FSB A Nonfatal"
|
||||
"0xE1","0x04","0x00","0x02","FSB FERR/NERR Register","FSB FERR/NERR Register","Chassis Number","R","R","R","R","R","R","0x00","FSB B Fatal"
|
||||
@ -187,9 +190,7 @@
|
||||
"0xE1","0x05","0x00","0x03","Hi FERR or NERR Register","R","R","R","R","R","R","R","R","0x00","Lindenhurst Chipset Event: Hi Nonfatal"
|
||||
"0xE1","0x05","0x01","0x02","Status Register Contents","R","R","R","R","R","R","R","R","0x00","Fatal internal north bridge error"
|
||||
"0xE1","0x05","0x01","0x03","Status Register Contents","R","R","R","R","R","R","R","R","0x00","Nonfatal internal north bridge error"
|
||||
"0xE1","0x05","0x01","0x04","Bus","Device","Function Number","R","R","R","R","R","R","0x00","Link Degrade Event"
|
||||
"0xE1","0x05","0x01","0x05","R","R","R","R","R","R","R","R","R","0x00","Spurious Memory Event"
|
||||
"0xE2","0x00","Register ID","R","First Fire Bit (0xFF=N/A)","Register Data (LSB)","Register Data","Register Data","Register Data","Register Data","Register Data","Register Data","Register Data (MSB)","0x00","PCI Industry Standard Register Dump"
|
||||
"0xE2","0x00","Register ID","R","First Fire Bit","Register Data (LSB)","Register Data","Register Data","Register Data","Register Data","Register Data","Register Data","Register Data (MSB)","0x00","PCI Industry Standard Register Dump"
|
||||
"0xE2","0x01","Register ID","R","First Fire Bit (0xFF if N/A)","Register Data (LSB)","Register Data","Register Data","Register Data","Register Data","Register Data","Register Data","Register Data (MSB)","0x00","PCI-X Industry Standard Register Dump"
|
||||
"0xE2","0x02","Register ID","R","First Fire Bit (0xFF if N/A)","Register Data (LSB)","Register Data","Register Data","Register Data","Register Data","Register Data","Register Data","Register Data (MSB)","0x00","PCI Express Industry Standard Register Dump"
|
||||
"0xE3","Platform ID","Register ID","R","R","R","R","R","R","Register Data (LSB)","Register Data","Register Data","Register Data (MSB)","0x00","RAW Hex Dump"
|
||||
@ -197,33 +198,5 @@
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x01","0x00","R","R","R","0x00","Processor Event/Error Occurred. Next non-timestamped OEM SEL entry will contain details of the specific PCI event/error"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x02","0x00","R","R","R","0x00","Memory Event/Error Occurred. Next non-timestamped OEM SEL entry will contain details of the specific PCI event/error"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x00","R","R","R","0x00"," Scalability Event/Error Occurred. Next non-timestamped OEM SEL entry will contain details of the specific PCI event/error"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x07","R","R","0x00","Merge Failure - BIOS version is newer than secondary server BIOS"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x08","R","R","0x00","Merge Failure - BIOS version is older than secondary server BIOS"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x09","R","R","0x00","Merge Failure - Primary server booted standalone"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x0A","R","R","0x00","Merge Failure - Communication error occurred with secondary server"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x0B","R","R","0x00","Merge Failure - Timed out waiting for secondary server"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x10","R","R","0x00","Merge Failure - No path through partition"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x11","Expected Chassis Count","R","0x00","Merge Information - Expected chassis count"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x12","Actual Chassis Count","R","0x00","Merge Information - Actual chassis count"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x19","R","R","0x00","Merge Failure - No secondary servers found to merge"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x34","R","R","0x00","Merge Failure - Primary server booted standalone"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x35","R","R","0x00","Merge Failure - Communication error occurred with primary server"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x36","R","R","0x00","Merge Failure - Secondary server booted standalone"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x41","R","R","0x00","Merge Failure - Timeout occurred waiting for primary server"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x46","R","R","0x00","Merge Failure - BIOS version is newer than primary server BIOS"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x47","R","R","0x00","Merge Failure - BIOS version is older than primary server BIOS"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x52","R","R","0x00","Merge Failure - Scalability hardware not detected"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x53","R","R","0x00","Merge Failure - No partition descriptor found"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x54","R","R","0x00","Merge Failure - Error Reading partition descriptor"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x55","R","R","0x00","Merge Failure - Error Reading system UUID"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x56","R","R","0x00","Merge Failure [Byte 13 value]"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x57","R","R","0x00","Merge Failure [Byte 13 value]"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x58","R","R","0x00","Merge Failure [Byte 13 value]"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x59","R","R","0x00","Merge Failure [Byte 13 value]"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x5A","R","R","0x00","Merge Failure [Byte 13 value]"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x5B","R","R","0x00","Merge Failure [Byte 13 value]"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x5C","R","R","0x00","Merge Failure [Byte 13 value]"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x04","0x00","R","R","R","0x00","Bus PCI Event/Error Occurred. Next non-timestamped OEM SEL entry will contain details of the specific PCI event/error"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x05","0x00","R","R","R","0x00","Chipset Event/Error Occurred. Next non-timestamped OEM SEL entry will contain details of the specific PCI event/error"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x06","0x01","PostVersion","BMCVersion","R","0x00","Incompatible BIOS-BMC Power Executive support"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x06","0x02","R","R","R","0x00","Boot denied due to power limitations"
|
@ -4,7 +4,7 @@ Version: @VERSION@
|
||||
Release: @RPM_RELEASE@%{?_distro:.%{_distro}}
|
||||
License: BSD
|
||||
Group: Utilities
|
||||
Packager: Jim Mankovich <jmank@hp.com>
|
||||
Packager: Duncan Laurie <duncan@iceblink.org>
|
||||
Source: %{name}-%{version}.tar.gz
|
||||
Buildroot: /var/tmp/ipmitool-root
|
||||
|
||||
@ -55,133 +55,11 @@ fi
|
||||
%defattr(755,root,root)
|
||||
%attr(755,root,root) %{_bindir}/*
|
||||
%attr(755,root,root) %{_sbindir}/*
|
||||
%{_datadir}/ipmitool/*
|
||||
%{_mandir}/man*/*
|
||||
%doc %{_datadir}/doc/ipmitool
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Feb 25 2009 <pere@hungry.com> 1.8.11-1
|
||||
- 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
|
||||
|
||||
* Fri Aug 08 2008 <pere@hungry.com> 1.8.10-1
|
||||
- Added support for BULL IANA number.
|
||||
- Fixed contrib build so the oem_ibm_sel_map file gets included in rpm
|
||||
builds again.
|
||||
- Added support for Debian packages to be built from CVS
|
||||
- Fix for sdr and sel timestamp reporting issues
|
||||
- Fix for discrete sensor state print routines to address state bits 8-14
|
||||
- Change ipmi_chassis_status() to non-static so it can be used externally
|
||||
- Added retries to SOL keepalive
|
||||
- Fix to stop sensor list command from reporting a failure due to missing
|
||||
sensor
|
||||
- Fix bug in sdr free space reporting
|
||||
- Add support for IANA number to vendor name conversion for many vendors
|
||||
- Fix segfault bug in lan set command
|
||||
- Fix bug in population of raw i2c wdata buffer
|
||||
- Fix bug in ipmb sensor reading
|
||||
- Fix misspellings, typos, incorrect strncmp lengths, white space
|
||||
- Update/fix printed help and usages for many commands
|
||||
- Add and update support for all commands in ipmitool man page
|
||||
- Fix for lanplus session re-open when the target becomes unavailable following
|
||||
a fw upgrade activation
|
||||
- Add support for watchdog timer shutoff, reset, and get info
|
||||
- Add support for more ibm systems in oem_ibm_sel_map
|
||||
- Add more JEDEC support info for DIMMs; decrease request size for DIMM FRU
|
||||
info to 16 bytes at a time to allow more DIMM FRUs to respond.
|
||||
- Fix to change hpmfwupg to version 1.02; fix to reduce hpmfwupg buffer
|
||||
length more aggressively when no response from iol
|
||||
- Fix HPM firmware activation via IOL; fake a timeout after IOL session
|
||||
re-open to force get upgrade status retry; Added retries on 0xD3
|
||||
completion code
|
||||
- Add support for freeipmi 0.6.0; adjust autoconf for changes
|
||||
- Fix for oemval2str size
|
||||
- Add support for product name resolution in mc info
|
||||
- Fix FRU display format
|
||||
- Added PICMG ekeying analyzer module support (ekanalyzer); display point
|
||||
to point physical connectivity and power supply information between
|
||||
carriers and AMC modules; display matched results of ekeying match
|
||||
between an on-carrier device and AMC module or between 2 AMC modules
|
||||
- Fix AMC GUID display support
|
||||
- Improved amcportstate operations
|
||||
- Added resolution for new sensor types
|
||||
- Fix segfault in SOL
|
||||
- Fix bug that caused infinite loop on BMCs with empty SDRs
|
||||
- Fix to move out Kontron OEM sensor resolution for other OEMs which could
|
||||
lead to bad event descriptions
|
||||
- Add new FRU edit mode thereby allowing serial numbers, etc. to be changed;
|
||||
improvements to OEM edit mode
|
||||
- Added SPD support for parms: channel number, max read size
|
||||
- Add SDR support for adding SDR records from a dumped file, clearing SDR,
|
||||
adding partial SDR records
|
||||
- Add updates and fixes to hpmfwupg: upload block size to 32 bytes for KCS,
|
||||
handle long response option, implement rollback override, garbage output fix
|
||||
- Add double bridge lan support , fix bridging issue
|
||||
- Add HPM support to pre-check which components need to be skipped
|
||||
- Fix autodetection of maximum packet size when using IPMB
|
||||
- Add new Kontron OEM command to set the BIOS boot option sequence
|
||||
- Add support for dual-bridge/ dual send message
|
||||
- Add auto-detect for local IPMB address using PICMG 2.X extension
|
||||
- Add support for HPM.1 1.0 specification compliance
|
||||
- Fix for improper lan/lanplus addressing
|
||||
- Added transit_channel and transit_addr to ipmi_intf struct
|
||||
- Fix bad password assertion bug due to rakp2 HMAC not being checked properly
|
||||
- Added ability to interpret PPS shelf manager clia sel dump
|
||||
- Corrected PICMG M7 state event definition macros
|
||||
- Added FRU parsing enhancements
|
||||
- Added "isol info", "isol set" and "isol activate" commands to support
|
||||
Intel IPMI v1.5 SOL functionality. Removed "isol setup" command.
|
||||
- Fix bug in ipmi_lan_recv_packet() in lan and lanplus interfaces.
|
||||
- Fix bug in "chassis poh" command.
|
||||
- Fix HPM.1 upgrade to apply to only given component when instructed to do so
|
||||
- Added configure auto-detection if dual bridge extension is supported
|
||||
by OpenIPMI
|
||||
|
||||
* Tue Mar 6 2007 <pere@hungry.com> 1.8.9-1
|
||||
- Added initial AMC ekey query operation support
|
||||
- Improvements to ekeying support (PICMG 3.x only)
|
@ -8,5 +8,5 @@
|
||||
%_srcrpmdir %{_topdir}/SRPMS
|
||||
%_distro @DISTRO@
|
||||
%_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
|
||||
%packager jmank@hp.com
|
||||
%packager duncan@iceblink.org
|
||||
%distribution Sourceforge Build
|
@ -1,61 +1,3 @@
|
||||
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)
|
@ -3,7 +3,7 @@ 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
|
||||
Build-Depends: debhelper (>> 4.0.0), libreadline5-dev | libreadline-dev, libssl-dev
|
||||
Standards-Version: 3.6.2.1
|
||||
|
||||
Package: ipmitool
|
@ -18,9 +18,6 @@ endif
|
||||
configure: configure-stamp
|
||||
configure-stamp:
|
||||
dh_testdir
|
||||
|
||||
./bootstrap
|
||||
|
||||
./configure --prefix=/usr \
|
||||
--with-kerneldir \
|
||||
--mandir=/usr/share/man
|
1605
ipmitool/doc/ipmitool.1
Normal file
1605
ipmitool/doc/ipmitool.1
Normal file
File diff suppressed because it is too large
Load Diff
@ -30,13 +30,12 @@
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
noinst_HEADERS = log.h bswap.h hpm2.h helper.h ipmi.h ipmi_cc.h ipmi_intf.h \
|
||||
noinst_HEADERS = log.h bswap.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_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_strings.h ipmi_constants.h ipmi_user.h ipmi_pef.h \
|
||||
ipmi_oem.h ipmi_sdradd.h ipmi_isol.h ipmi_sunoem.h ipmi_picmg.h \
|
||||
ipmi_oem.h ipmi_isol.h ipmi_sunoem.h ipmi_picmg.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_delloem.h ipmi_dcmi.h
|
||||
ipmi_kontronoem.h
|
||||
|
@ -46,17 +46,6 @@
|
||||
#define FALSE 0
|
||||
#endif
|
||||
|
||||
#ifndef tboolean
|
||||
#define tboolean int
|
||||
#endif
|
||||
|
||||
/* IPMI spec. - UID 0 reserved, 63 maximum UID which can be used */
|
||||
#ifndef IPMI_UID_MIN
|
||||
# define IPMI_UID_MIN 1
|
||||
#endif
|
||||
#ifndef IPMI_UID_MAX
|
||||
# define IPMI_UID_MAX 63
|
||||
#endif
|
||||
|
||||
struct ipmi_intf;
|
||||
|
||||
@ -65,28 +54,13 @@ struct valstr {
|
||||
const char * str;
|
||||
};
|
||||
struct oemvalstr {
|
||||
uint32_t oem;
|
||||
uint16_t oem;
|
||||
uint16_t val;
|
||||
const char * str;
|
||||
};
|
||||
|
||||
const char * val2str(uint16_t val, const struct valstr * vs);
|
||||
const char * oemval2str(uint32_t oem,uint16_t val, const struct oemvalstr * vs);
|
||||
|
||||
int str2double(const char * str, double * double_ptr);
|
||||
int str2long(const char * str, int64_t * lng_ptr);
|
||||
int str2ulong(const char * str, uint64_t * ulng_ptr);
|
||||
int str2int(const char * str, int32_t * int_ptr);
|
||||
int str2uint(const char * str, uint32_t * uint_ptr);
|
||||
int str2short(const char * str, int16_t * shrt_ptr);
|
||||
int str2ushort(const char * str, uint16_t * ushrt_ptr);
|
||||
int str2char(const char * str, int8_t * chr_ptr);
|
||||
int str2uchar(const char * str, uint8_t * uchr_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_user_id(const char *argv_ptr, uint8_t *ipmi_uid_ptr);
|
||||
|
||||
const char * oemval2str(uint16_t oem,uint16_t val, const struct oemvalstr * 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_2col(const struct valstr * vs, const char * title, int loglevel);
|
||||
@ -99,7 +73,6 @@ void printbuf(const uint8_t * buf, int len, const char * desc);
|
||||
uint8_t ipmi_csum(uint8_t * d, int s);
|
||||
FILE * ipmi_open_file(const char * file, int rw);
|
||||
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_write(file) ipmi_open_file(file, 1)
|
@ -41,19 +41,9 @@
|
||||
#include <ipmitool/helper.h>
|
||||
#include <ipmitool/ipmi_cc.h>
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#define IPMI_BUF_SIZE 1024
|
||||
|
||||
#if HAVE_PRAGMA_PACK
|
||||
#define ATTRIBUTE_PACKING
|
||||
#else
|
||||
#define ATTRIBUTE_PACKING __attribute__ ((packed))
|
||||
#endif
|
||||
|
||||
|
||||
/* From table 13.16 of the IPMI v2 specification */
|
||||
#define IPMI_PAYLOAD_TYPE_IPMI 0x00
|
||||
#define IPMI_PAYLOAD_TYPE_SOL 0x01
|
||||
@ -148,7 +138,6 @@ struct ipmi_rq_entry {
|
||||
uint8_t rq_seq;
|
||||
uint8_t *msg_data;
|
||||
int msg_len;
|
||||
int bridging_level;
|
||||
struct ipmi_rq_entry *next;
|
||||
};
|
||||
|
||||
@ -239,10 +228,8 @@ struct ipmi_rs {
|
||||
#define IPMI_NETFN_APP 0x6
|
||||
#define IPMI_NETFN_FIRMWARE 0x8
|
||||
#define IPMI_NETFN_STORAGE 0xa
|
||||
#define IPMI_NETFN_TRANSPORT 0xc
|
||||
#define IPMI_NETFN_TRANSPORT 0xc
|
||||
#define IPMI_NETFN_PICMG 0x2C
|
||||
#define IPMI_NETFN_DCGRP 0x2C
|
||||
#define IPMI_NETFN_OEM 0x2E
|
||||
#define IPMI_NETFN_ISOL 0x34
|
||||
#define IPMI_NETFN_TSOL 0x30
|
||||
|
||||
@ -252,37 +239,16 @@ struct ipmi_rs {
|
||||
|
||||
/* These values are IANA numbers */
|
||||
typedef enum IPMI_OEM {
|
||||
IPMI_OEM_UNKNOWN = 0,
|
||||
IPMI_OEM_HP = 11,
|
||||
IPMI_OEM_SUN = 42,
|
||||
IPMI_OEM_NOKIA = 94,
|
||||
IPMI_OEM_BULL = 107,
|
||||
IPMI_OEM_HITACHI_116 = 116,
|
||||
IPMI_OEM_NEC = 119,
|
||||
IPMI_OEM_TOSHIBA = 186,
|
||||
IPMI_OEM_INTEL = 343,
|
||||
IPMI_OEM_TATUNG = 373,
|
||||
IPMI_OEM_HITACHI_399 = 399,
|
||||
IPMI_OEM_DELL = 674,
|
||||
IPMI_OEM_LMC = 2168,
|
||||
IPMI_OEM_RADISYS = 4337,
|
||||
IPMI_OEM_BROADCOM = 4413,
|
||||
IPMI_OEM_MAGNUM = 5593,
|
||||
IPMI_OEM_TYAN = 6653,
|
||||
IPMI_OEM_NEWISYS = 9237,
|
||||
IPMI_OEM_FUJITSU_SIEMENS = 10368,
|
||||
IPMI_OEM_AVOCENT = 10418,
|
||||
IPMI_OEM_PEPPERCON = 10437,
|
||||
IPMI_OEM_SUPERMICRO = 10876,
|
||||
IPMI_OEM_OSA = 11102,
|
||||
IPMI_OEM_GOOGLE = 11129,
|
||||
IPMI_OEM_PICMG = 12634,
|
||||
IPMI_OEM_RARITAN = 13742,
|
||||
IPMI_OEM_KONTRON = 15000,
|
||||
IPMI_OEM_PPS = 16394,
|
||||
IPMI_OEM_AMI = 20974,
|
||||
IPMI_OEM_NOKIA_SIEMENS_NETWORKS = 28458,
|
||||
IPMI_OEM_SUPERMICRO_47488 = 47488
|
||||
IPMI_OEM_UNKNOWN = 0,
|
||||
IPMI_OEM_SUN = 42,
|
||||
IPMI_OEM_NOKIA = 94,
|
||||
IPMI_OEM_INTEL = 343,
|
||||
IPMI_OEM_TYAN = 6653,
|
||||
IPMI_OEM_NEWISYS = 9237,
|
||||
IPMI_OEM_SUPERMICRO = 10876,
|
||||
IPMI_OEM_GOOGLE = 11129,
|
||||
IPMI_OEM_PICMG = 12634,
|
||||
IPMI_OEM_KONTRON = 15000,
|
||||
} IPMI_OEM;
|
||||
|
||||
extern const struct valstr completion_code_vals[];
|
@ -54,9 +54,6 @@
|
||||
* The Get Authentication Capabilities response structure
|
||||
* From table 22-15 of the IPMI v2.0 spec
|
||||
*/
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct get_channel_auth_cap_rsp {
|
||||
uint8_t channel_number;
|
||||
#if WORDS_BIGENDIAN
|
||||
@ -87,19 +84,16 @@ struct get_channel_auth_cap_rsp {
|
||||
#endif
|
||||
#if WORDS_BIGENDIAN
|
||||
uint8_t __reserved3 : 6;
|
||||
uint8_t ipmiv20_support : 1; /* channel supports IPMI v2.0 connections */
|
||||
uint8_t ipmiv15_support : 1; /* channel supports IPMI v1.5 connections */
|
||||
uint8_t ipmiv20_support : 1; /* channel supports IPMI v2.0 connections */
|
||||
#else
|
||||
uint8_t ipmiv15_support : 1; /* channel supports IPMI v1.5 connections */
|
||||
uint8_t ipmiv20_support : 1; /* channel supports IPMI v2.0 connections */
|
||||
uint8_t ipmiv15_support : 1; /* channel supports IPMI v1.5 connections */
|
||||
uint8_t __reserved3 : 6;
|
||||
#endif
|
||||
uint8_t oem_id[3]; /* IANA enterprise number for auth type */
|
||||
uint8_t oem_aux_data; /* Additional OEM specific data for oem auths */
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
|
||||
|
||||
@ -107,9 +101,6 @@ struct get_channel_auth_cap_rsp {
|
||||
* The Get Channel Info response structure
|
||||
* From table 22-29 of the IPMI v2.0 spec
|
||||
*/
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct get_channel_info_rsp {
|
||||
#if WORDS_BIGENDIAN
|
||||
uint8_t __reserved1 : 4;
|
||||
@ -141,10 +132,7 @@ struct get_channel_info_rsp {
|
||||
#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
|
||||
} __attribute__ ((packed));
|
||||
|
||||
|
||||
|
||||
@ -152,9 +140,6 @@ struct get_channel_info_rsp {
|
||||
* 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;
|
||||
@ -176,14 +161,9 @@ struct get_channel_access_rsp {
|
||||
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
|
||||
} __attribute__ ((packed));
|
||||
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct get_user_access_rsp {
|
||||
#if WORDS_BIGENDIAN
|
||||
uint8_t __reserved1 : 2;
|
||||
@ -210,14 +190,8 @@ struct get_user_access_rsp {
|
||||
uint8_t callin_callback : 1;
|
||||
uint8_t __reserved4 : 1;
|
||||
#endif
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct set_user_access_data {
|
||||
#if WORDS_BIGENDIAN
|
||||
uint8_t change_bits : 1;
|
||||
@ -244,10 +218,7 @@ struct set_user_access_data {
|
||||
uint8_t session_limit : 4;
|
||||
uint8_t __reserved3 : 4;
|
||||
#endif
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
uint8_t ipmi_get_channel_medium(struct ipmi_intf * intf, uint8_t channel);
|
||||
uint8_t ipmi_current_channel_medium(struct ipmi_intf * intf);
|
@ -38,9 +38,9 @@
|
||||
* COMMANDS
|
||||
*/
|
||||
#define IPMI_GET_SDR_REPOSITORY_INFO 0x20
|
||||
#define IPMI_SOL_ACTIVATING 0x20
|
||||
#define IPMI_SET_SOL_CONFIG_PARAMETERS 0x21
|
||||
#define IPMI_GET_SOL_CONFIG_PARAMETERS 0x22
|
||||
#define IMPI_SOL_ACTIVATING 0x20
|
||||
#define IMPI_SET_SOL_CONFIG_PARAMETERS 0x21
|
||||
#define IMPI_GET_SOL_CONFIG_PARAMETERS 0x22
|
||||
#define IPMI_SET_USER_ACCESS 0x43
|
||||
#define IPMI_GET_USER_ACCESS 0x44
|
||||
#define IPMI_SET_USER_NAME 0x45
|
@ -33,9 +33,6 @@
|
||||
#ifndef IPMI_ENTITY_H
|
||||
#define IPMI_ENTITY_H
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct entity_id {
|
||||
uint8_t id; /* physical entity id */
|
||||
#if WORDS_BIGENDIAN
|
||||
@ -45,9 +42,6 @@ struct entity_id {
|
||||
uint8_t instance : 7; /* instance number */
|
||||
uint8_t logical : 1; /* physical/logical */
|
||||
#endif
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#endif /* IPMI_ENTITY_H */
|
@ -41,9 +41,6 @@
|
||||
#define EVENT_DIR_ASSERT 0
|
||||
#define EVENT_DIR_DEASSERT 1
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct platform_event_msg {
|
||||
uint8_t evm_rev;
|
||||
uint8_t sensor_type;
|
||||
@ -56,10 +53,7 @@ struct platform_event_msg {
|
||||
uint8_t event_dir : 1;
|
||||
#endif
|
||||
uint8_t event_data[3];
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__((packed));
|
||||
|
||||
int ipmi_event_main(struct ipmi_intf *, int, char **);
|
||||
|
@ -63,38 +63,27 @@ enum {
|
||||
struct fru_info {
|
||||
uint16_t size;
|
||||
uint8_t access:1;
|
||||
uint8_t max_read_size;
|
||||
uint8_t max_write_size;
|
||||
};
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct fru_header {
|
||||
uint8_t version;
|
||||
union {
|
||||
struct {
|
||||
uint8_t internal;
|
||||
uint8_t chassis;
|
||||
uint8_t board;
|
||||
uint8_t product;
|
||||
uint8_t multi;
|
||||
} offset;
|
||||
uint8_t offsets[5];
|
||||
};
|
||||
struct {
|
||||
uint8_t internal;
|
||||
uint8_t chassis;
|
||||
uint8_t board;
|
||||
uint8_t product;
|
||||
uint8_t multi;
|
||||
} offset;
|
||||
uint8_t pad;
|
||||
uint8_t checksum;
|
||||
}ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct fru_area_chassis {
|
||||
uint8_t area_ver;
|
||||
uint8_t type;
|
||||
uint16_t area_len;
|
||||
char * part;
|
||||
char * serial;
|
||||
char *part;
|
||||
char *serial;
|
||||
};
|
||||
|
||||
struct fru_area_board {
|
||||
@ -102,29 +91,26 @@ struct fru_area_board {
|
||||
uint8_t lang;
|
||||
uint16_t area_len;
|
||||
uint32_t mfg_date_time;
|
||||
char * mfg;
|
||||
char * prod;
|
||||
char * serial;
|
||||
char * part;
|
||||
char * fru;
|
||||
char *mfg;
|
||||
char *prod;
|
||||
char *serial;
|
||||
char *part;
|
||||
char *fru;
|
||||
};
|
||||
|
||||
struct fru_area_product {
|
||||
uint8_t area_ver;
|
||||
uint8_t lang;
|
||||
uint16_t area_len;
|
||||
char * mfg;
|
||||
char * name;
|
||||
char * part;
|
||||
char * version;
|
||||
char * serial;
|
||||
char * asset;
|
||||
char * fru;
|
||||
char *mfg;
|
||||
char *name;
|
||||
char *part;
|
||||
char *version;
|
||||
char *serial;
|
||||
char *asset;
|
||||
char *fru;
|
||||
};
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct fru_multirec_header {
|
||||
#define FRU_RECORD_TYPE_POWER_SUPPLY_INFORMATION 0x00
|
||||
#define FRU_RECORD_TYPE_DC_OUTPUT 0x01
|
||||
@ -138,14 +124,8 @@ struct fru_multirec_header {
|
||||
uint8_t len;
|
||||
uint8_t record_checksum;
|
||||
uint8_t header_checksum;
|
||||
}ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct fru_multirec_powersupply {
|
||||
#if WORDS_BIGENDIAN
|
||||
uint16_t capacity;
|
||||
@ -188,17 +168,11 @@ struct fru_multirec_powersupply {
|
||||
#endif
|
||||
uint16_t combined_capacity;
|
||||
uint8_t rps_threshold;
|
||||
}ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
static const char * combined_voltage_desc[] __attribute__((unused)) = {
|
||||
static const char *combined_voltage_desc[] __attribute__ ((unused)) = {
|
||||
"12 V", "-12 V", "5 V", "3.3 V"};
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct fru_multirec_dcoutput {
|
||||
#if WORDS_BIGENDIAN
|
||||
uint8_t standby:1;
|
||||
@ -215,14 +189,8 @@ struct fru_multirec_dcoutput {
|
||||
uint16_t ripple_and_noise;
|
||||
uint16_t min_current;
|
||||
uint16_t max_current;
|
||||
}ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct fru_multirec_dcload {
|
||||
#if WORDS_BIGENDIAN
|
||||
uint8_t __reserved:4;
|
||||
@ -237,14 +205,8 @@ struct fru_multirec_dcload {
|
||||
uint16_t ripple_and_noise;
|
||||
uint16_t min_current;
|
||||
uint16_t max_current;
|
||||
}ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct fru_multirec_oem_header {
|
||||
unsigned char mfg_id[3];
|
||||
#define FRU_PICMG_BACKPLANE_P2P 0x04
|
||||
@ -258,45 +220,17 @@ struct fru_multirec_oem_header {
|
||||
#define FRU_AMC_CARRIER_P2P 0x18
|
||||
#define FRU_AMC_P2P 0x19
|
||||
#define FRU_AMC_CARRIER_INFO 0x1a
|
||||
#define FRU_UTCA_FRU_INFO_TABLE 0x20
|
||||
#define FRU_UTCA_CARRIER_MNG_IP 0x21
|
||||
#define FRU_UTCA_CARRIER_INFO 0x22
|
||||
#define FRU_UTCA_CARRIER_LOCATION 0x23
|
||||
#define FRU_UTCA_SHMC_IP_LINK 0x24
|
||||
#define FRU_UTCA_POWER_POLICY 0x25
|
||||
#define FRU_UTCA_ACTIVATION 0x26
|
||||
#define FRU_UTCA_PM_CAPABILTY 0x27
|
||||
#define FRU_UTCA_FAN_GEOGRAPHY 0x28
|
||||
#define FRU_UTCA_CLOCK_MAPPING 0x29
|
||||
#define FRU_UTCA_MSG_BRIDGE_POLICY 0x2A
|
||||
#define FRU_UTCA_OEM_MODULE_DESC 0x2B
|
||||
#define FRU_PICMG_CLK_CARRIER_P2P 0x2C
|
||||
#define FRU_PICMG_CLK_CONFIG 0x2D
|
||||
unsigned char record_id;
|
||||
unsigned char record_version;
|
||||
}ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct fru_picmgext_guid {
|
||||
unsigned char guid[16];
|
||||
}ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct fru_picmgext_link_desc {
|
||||
#ifndef WORDS_BIGENDIAN
|
||||
unsigned int desig_channel:6;
|
||||
unsigned int desig_if:2;
|
||||
unsigned int desig_port:4;
|
||||
unsigned int designator:12;
|
||||
#define FRU_PICMGEXT_LINK_TYPE_BASE 0x01
|
||||
#define FRU_PICMGEXT_LINK_TYPE_FABRIC_ETHERNET 0x02
|
||||
#define FRU_PICMGEXT_LINK_TYPE_FABRIC_INFINIBAND 0x03
|
||||
@ -314,14 +248,9 @@ struct fru_picmgext_link_desc {
|
||||
#define FRU_PICMGEXT_LINK_TYPE_FABRIC_STAR 0x04
|
||||
#define FRU_PICMGEXT_LINK_TYPE_PCIE 0x05
|
||||
unsigned int type:8;
|
||||
unsigned int desig_port:4;
|
||||
unsigned int desig_if:2;
|
||||
unsigned int desig_channel:6;
|
||||
#endif
|
||||
}ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
unsigned int designator:12;
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
|
||||
#define FRU_PICMGEXT_AMC_LINK_TYPE_RESERVED 0x00
|
||||
@ -333,20 +262,11 @@ struct fru_picmgext_link_desc {
|
||||
#define FRU_PICMGEXT_AMC_LINK_TYPE_RAPIDIO 0x06
|
||||
#define FRU_PICMGEXT_AMC_LINK_TYPE_STORAGE 0x07
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
/* This is used in command, not in FRU */
|
||||
struct fru_picmgext_amc_link_info {
|
||||
unsigned char linkInfo[3];
|
||||
}ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct fru_picmgext_amc_link_desc_core {
|
||||
#ifndef WORDS_BIGENDIAN
|
||||
unsigned int designator:12;
|
||||
@ -359,14 +279,8 @@ struct fru_picmgext_amc_link_desc_core {
|
||||
unsigned int type:8;
|
||||
unsigned int designator:12;
|
||||
#endif
|
||||
}ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct fru_picmgext_amc_link_desc_extra {
|
||||
#ifndef WORDS_BIGENDIAN
|
||||
unsigned char asymetricMatch:2;
|
||||
@ -375,15 +289,9 @@ struct fru_picmgext_amc_link_desc_extra {
|
||||
unsigned char reserved:6;
|
||||
unsigned char asymetricMatch:2;
|
||||
#endif
|
||||
}ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct fru_picmgext_amc_link_desc {
|
||||
#ifndef WORDS_BIGENDIAN
|
||||
struct fru_picmgext_amc_link_desc_core core;/* lsb */
|
||||
@ -392,95 +300,54 @@ struct fru_picmgext_amc_link_desc {
|
||||
struct fru_picmgext_amc_link_desc_extra extra;
|
||||
struct fru_picmgext_amc_link_desc_core core;/* lsb */
|
||||
#endif
|
||||
}ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
|
||||
#define FRU_PICMGEXT_OEM_SWFW 0x03
|
||||
#define OEM_SWFW_NBLOCK_OFFSET 0x05
|
||||
#define OEM_SWFW_FIELD_START_OFFSET 0x06
|
||||
|
||||
#define FRU_PICMGEXT_CHN_DESC_RECORD_SIZE 3
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct fru_picmgext_chn_desc {
|
||||
#ifndef WORDS_BIGENDIAN
|
||||
unsigned int remote_slot:8;
|
||||
unsigned int remote_chn:5;
|
||||
unsigned int local_chn:5;
|
||||
unsigned int res:14;
|
||||
unsigned char remote_slot:8;
|
||||
unsigned char remote_chn:5;
|
||||
unsigned char local_chn:5;
|
||||
unsigned char:6;
|
||||
#else
|
||||
unsigned int res:14;
|
||||
unsigned int local_chn:5;
|
||||
unsigned int remote_chn:5;
|
||||
unsigned int remote_slot:8;
|
||||
#endif
|
||||
}ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
unsigned char:6;
|
||||
unsigned char local_chn:5;
|
||||
unsigned char remote_chn:5;
|
||||
unsigned char remote_slot:8;
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct fru_picmgext_slot_desc {
|
||||
unsigned char chan_type;
|
||||
unsigned char slot_addr;
|
||||
unsigned char chn_count;
|
||||
}ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#define FRU_PICMGEXT_DESIGN_IF_BASE 0x00
|
||||
#define FRU_PICMGEXT_DESIGN_IF_FABRIC 0x01
|
||||
#define FRU_PICMGEXT_DESIGN_IF_BASE 0x00
|
||||
#define FRU_PICMGEXT_DESIGN_IF_FABRIC 0x01
|
||||
#define FRU_PICMGEXT_DESIGN_IF_UPDATE_CHANNEL 0x02
|
||||
#define FRU_PICMGEXT_DESIGN_IF_RESERVED 0x03
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct fru_picmgext_carrier_activation_record {
|
||||
unsigned short max_internal_curr;
|
||||
unsigned char allowance_for_readiness;
|
||||
unsigned char module_activation_record_count;
|
||||
}ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct fru_picmgext_activation_record {
|
||||
unsigned char ibmb_addr;
|
||||
unsigned char max_module_curr;
|
||||
unsigned char reserved;
|
||||
}ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct fru_picmgext_carrier_p2p_record {
|
||||
unsigned char resource_id;
|
||||
unsigned char p2p_count;
|
||||
}ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct fru_picmgext_carrier_p2p_descriptor {
|
||||
#ifndef WORDS_BIGENDIAN
|
||||
unsigned char remote_resource_id;
|
||||
unsigned char remote_resource_id;
|
||||
unsigned short remote_port:5;
|
||||
unsigned short local_port:5;
|
||||
unsigned short reserved:6;
|
||||
@ -488,136 +355,23 @@ struct fru_picmgext_carrier_p2p_descriptor {
|
||||
unsigned short reserved:6;
|
||||
unsigned short local_port:5;
|
||||
unsigned short remote_port:5;
|
||||
unsigned char remote_resource_id;
|
||||
#endif
|
||||
}ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
unsigned char remote_resource_id;
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct fru_picmgext_amc_p2p_record {
|
||||
#ifndef WORDS_BIGENDIAN
|
||||
unsigned char resource_id :4;
|
||||
unsigned char /* reserved */ :3;
|
||||
unsigned char record_type :1;
|
||||
#else
|
||||
unsigned char record_type :1;
|
||||
unsigned char /* reserved */ :3;
|
||||
unsigned char resource_id :4;
|
||||
#endif
|
||||
}ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
#define FRU_PICMGEXT_AMC_CHANNEL_DESC_RECORD_SIZE 3
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct fru_picmgext_amc_channel_desc_record {
|
||||
#ifndef WORDS_BIGENDIAN
|
||||
unsigned int lane0port :5;
|
||||
unsigned int lane1port :5;
|
||||
unsigned int lane2port :5;
|
||||
unsigned int lane3port :5;
|
||||
unsigned int /* reserved */ :12;
|
||||
#else
|
||||
unsigned int /* reserved */ :12;
|
||||
unsigned int lane3port :5;
|
||||
unsigned int lane2port :5;
|
||||
unsigned int lane1port :5;
|
||||
unsigned int lane0port :5;
|
||||
#endif
|
||||
}ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
#define FRU_PICMGEXT_AMC_LINK_DESC_RECORD_SIZE 5
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct fru_picmgext_amc_link_desc_record {
|
||||
#define FRU_PICMGEXT_AMC_LINK_TYPE_PCIE 0x02
|
||||
#define FRU_PICMGEXT_AMC_LINK_TYPE_PCIE_AS1 0x03
|
||||
#define FRU_PICMGEXT_AMC_LINK_TYPE_PCIE_AS2 0x04
|
||||
#define FRU_PICMGEXT_AMC_LINK_TYPE_ETHERNET 0x05
|
||||
#define FRU_PICMGEXT_AMC_LINK_TYPE_RAPIDIO 0x06
|
||||
#define FRU_PICMGEXT_AMC_LINK_TYPE_STORAGE 0x07
|
||||
|
||||
#define AMC_LINK_TYPE_EXT_PCIE_G1_NSSC 0x00
|
||||
#define AMC_LINK_TYPE_EXT_PCIE_G1_SSC 0x01
|
||||
#define AMC_LINK_TYPE_EXT_PCIE_G2_NSSC 0x02
|
||||
#define AMC_LINK_TYPE_EXT_PCIE_G2_SSC 0x03
|
||||
|
||||
#define AMC_LINK_TYPE_EXT_ETH_1000_BX 0x00
|
||||
#define AMC_LINK_TYPE_EXT_ETH_10G_XAUI 0x01
|
||||
|
||||
#define AMC_LINK_TYPE_EXT_STORAGE_FC 0x00
|
||||
#define AMC_LINK_TYPE_EXT_STORAGE_SATA 0x01
|
||||
#define AMC_LINK_TYPE_EXT_STORAGE_SAS 0x02
|
||||
#ifndef WORDS_BIGENDIAN
|
||||
unsigned int channel_id :8;
|
||||
unsigned int port_flag_0 :1;
|
||||
unsigned int port_flag_1 :1;
|
||||
unsigned int port_flag_2 :1;
|
||||
unsigned int port_flag_3 :1;
|
||||
unsigned int type :8;
|
||||
unsigned int type_ext :4;
|
||||
unsigned int group_id :8;
|
||||
unsigned int asym_match :2;
|
||||
unsigned int /* reserved */ :30;
|
||||
#else
|
||||
unsigned int group_id :8;
|
||||
unsigned int type_ext :4;
|
||||
unsigned int type :8;
|
||||
unsigned int port_flag_3 :1;
|
||||
unsigned int port_flag_2 :1;
|
||||
unsigned int port_flag_1 :1;
|
||||
unsigned int port_flag_0 :1;
|
||||
unsigned int channel_id :8;
|
||||
|
||||
unsigned int /* reserved */ :30;
|
||||
unsigned int asym_match :2;
|
||||
#endif
|
||||
}ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
/* FRU Board manufacturing date */
|
||||
static const uint64_t secs_from_1970_1996 = 820454400;
|
||||
static const char * chassis_type_desc[] __attribute__((unused)) = {
|
||||
"Unspecified", "Other", "Unknown",
|
||||
"Desktop", "Low Profile Desktop", "Pizza Box",
|
||||
"Mini Tower", "Tower",
|
||||
static const char *chassis_type_desc[] __attribute__ ((unused)) = {
|
||||
"Unspecified", "Other", "Unknown",
|
||||
"Desktop", "Low Profile Desktop", "Pizza Box",
|
||||
"Mini Tower", "Tower",
|
||||
"Portable", "LapTop", "Notebook", "Hand Held",
|
||||
"Docking Station", "All in One", "Sub Notebook",
|
||||
"Space-saving", "Lunch Box", "Main Server Chassis",
|
||||
"Expansion Chassis", "SubChassis", "Bus Expansion Chassis",
|
||||
"Peripheral Chassis", "RAID Chassis", "Rack Mount Chassis",
|
||||
"Sealed-case PC", "Multi-system Chassis", "CompactPCI",
|
||||
"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"
|
||||
};
|
||||
"Peripheral Chassis", "RAID Chassis", "Rack Mount Chassis"};
|
||||
|
||||
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_spd_print(uint8_t *data, int len);
|
||||
int ipmi_spd_print_fru(struct ipmi_intf * intf, uint8_t id);
|
||||
|
||||
#endif /* IPMI_FRU_H */
|
||||
#endif /* IPMI_FRU_H */
|
21
include/ipmitool/ipmi_ime.h → ipmitool/include/ipmitool/ipmi_fwum.h
Executable file → Normal file
21
include/ipmitool/ipmi_ime.h → ipmitool/include/ipmitool/ipmi_fwum.h
Executable file → Normal file
@ -1,24 +1,21 @@
|
||||
/*
|
||||
* Copyright (c) 2007 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
|
||||
@ -33,13 +30,13 @@
|
||||
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_IME_H
|
||||
#define IPMI_IME_H
|
||||
#ifndef IPMI_KFWUM_H
|
||||
#define IPMI_KFWUM_H
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <ipmitool/ipmi.h>
|
||||
|
||||
|
||||
int ipmi_ime_main(struct ipmi_intf *, int, char **);
|
||||
int ipmi_fwum_main(struct ipmi_intf *, int, char **);
|
||||
|
||||
#endif /* IPMI_IME_H */
|
||||
#endif /* IPMI_KFWUM_H */
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003 Kontron Canada, Inc. All Rights Reserved.
|
||||
* 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
|
||||
@ -30,19 +30,12 @@
|
||||
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_GENDEV_H
|
||||
#define IPMI_GENDEV_H
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
#ifndef IPMI_HPMFWUPG_H
|
||||
#define IPMI_HPMFWUPG_H
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <math.h>
|
||||
#include <ipmitool/bswap.h>
|
||||
#include <ipmitool/ipmi.h>
|
||||
#include <ipmitool/ipmi_entity.h>
|
||||
|
||||
int ipmi_gendev_main(struct ipmi_intf *, int, char **);
|
||||
int ipmi_hpmfwupg_main(struct ipmi_intf *, int, char **);
|
||||
|
||||
#endif /* IPMI_GENDEV_H */
|
||||
#endif /* IPMI_KFWUM_H */
|
@ -89,12 +89,11 @@ struct ipmi_session {
|
||||
uint32_t out_seq;
|
||||
uint32_t timeout;
|
||||
|
||||
struct sockaddr_storage addr;
|
||||
struct sockaddr_in addr;
|
||||
socklen_t addrlen;
|
||||
int ai_family; /* Protocol family for socket. */
|
||||
|
||||
/*
|
||||
* This struct holds state data specific to IPMI v2 / RMCP+ sessions
|
||||
* This struct holds state data specific to IMPI v2 / RMCP+ sessions
|
||||
*/
|
||||
struct {
|
||||
enum LANPLUS_SESSION_STATE session_state;
|
||||
@ -162,26 +161,18 @@ struct ipmi_intf_support {
|
||||
struct ipmi_intf {
|
||||
char name[16];
|
||||
char desc[128];
|
||||
char *devfile;
|
||||
int fd;
|
||||
int opened;
|
||||
int abort;
|
||||
int noanswer;
|
||||
int picmg_avail;
|
||||
IPMI_OEM manufacturer_id;
|
||||
|
||||
struct ipmi_session * session;
|
||||
struct ipmi_oem_handle * oem;
|
||||
struct ipmi_cmd * cmdlist;
|
||||
uint8_t target_ipmb_addr;
|
||||
uint32_t my_addr;
|
||||
uint32_t target_addr;
|
||||
uint8_t target_lun;
|
||||
uint8_t target_channel;
|
||||
uint32_t transit_addr;
|
||||
uint8_t transit_channel;
|
||||
uint16_t max_request_data_size;
|
||||
uint16_t max_response_data_size;
|
||||
|
||||
uint8_t devnum;
|
||||
|
||||
@ -193,9 +184,6 @@ struct ipmi_intf {
|
||||
struct ipmi_rs *(*recv_sol)(struct ipmi_intf * intf);
|
||||
struct ipmi_rs *(*send_sol)(struct ipmi_intf * intf, struct ipmi_v2_payload * payload);
|
||||
int (*keepalive)(struct ipmi_intf * intf);
|
||||
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);
|
||||
@ -215,7 +203,4 @@ 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_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 */
|
@ -41,16 +41,15 @@
|
||||
|
||||
#define ISOL_ENABLE_PARAM 0x01
|
||||
#define ISOL_AUTHENTICATION_PARAM 0x02
|
||||
|
||||
#define ISOL_ENABLE_FLAG 0x01
|
||||
#define ISOL_PRIVILEGE_LEVEL_USER 0x02
|
||||
#define ISOL_BAUD_RATE_PARAM 0x05
|
||||
|
||||
#define ISOL_PREFERRED_BAUD_RATE 0x07
|
||||
|
||||
struct isol_config_parameters {
|
||||
uint8_t enabled;
|
||||
uint8_t privilege_level;
|
||||
uint8_t bit_rate;
|
||||
};
|
||||
#define ISOL_BAUD_RATE_9600 0x06
|
||||
#define ISOL_BAUD_RATE_19200 0x07
|
||||
#define ISOL_BAUD_RATE_38400 0x08
|
||||
#define ISOL_BAUD_RATE_57600 0x09
|
||||
#define ISOL_BAUD_RATE_115200 0x0A
|
||||
#define ISOL_PREFERRED_BAUD_RATE 0x07
|
||||
|
||||
int ipmi_isol_main(struct ipmi_intf *, int, char **);
|
||||
|
@ -41,6 +41,5 @@
|
||||
|
||||
|
||||
int ipmi_kontronoem_main(struct ipmi_intf *, int, char **);
|
||||
int ipmi_kontronoem_set_large_buffer(struct ipmi_intf *, unsigned char size);
|
||||
|
||||
#endif /* IPMI_KONTRONOEM_H */
|
@ -1,21 +1,21 @@
|
||||
/*
|
||||
* 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
|
||||
@ -39,22 +39,16 @@
|
||||
#define BMC_COLD_RESET 0x02
|
||||
#define BMC_WARM_RESET 0x03
|
||||
#define BMC_GET_SELF_TEST 0x04
|
||||
#define BMC_RESET_WATCHDOG_TIMER 0x22
|
||||
#define BMC_SET_WATCHDOG_TIMER 0x24
|
||||
#define BMC_GET_WATCHDOG_TIMER 0x25
|
||||
#define BMC_SET_GLOBAL_ENABLES 0x2e
|
||||
#define BMC_GET_GLOBAL_ENABLES 0x2f
|
||||
#define BMC_GET_GUID 0x37
|
||||
|
||||
int ipmi_mc_main(struct ipmi_intf *, int, char **);
|
||||
|
||||
/*
|
||||
/*
|
||||
* Response data from IPM Get Device ID Command (IPMI rev 1.5, section 17.1)
|
||||
* The following really apply to any IPM device, not just BMCs...
|
||||
* The following really apply to any IPM device, not just BMCs...
|
||||
*/
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct ipm_devid_rsp {
|
||||
uint8_t device_id;
|
||||
uint8_t device_revision;
|
||||
@ -65,13 +59,10 @@ struct ipm_devid_rsp {
|
||||
uint8_t manufacturer_id[3];
|
||||
uint8_t product_id[2];
|
||||
uint8_t aux_fw_rev[4];
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#define IPM_DEV_DEVICE_ID_SDR_MASK (0x80) /* 1 = provides SDRs */
|
||||
#define IPM_DEV_DEVICE_ID_REV_MASK (0x0F) /* BCD-enoded */
|
||||
#define IPM_DEV_DEVICE_ID_REV_MASK (0x07) /* BCD-enoded */
|
||||
|
||||
#define IPM_DEV_FWREV1_AVAIL_MASK (0x80) /* 0 = normal operation */
|
||||
#define IPM_DEV_FWREV1_MAJOR_MASK (0x3f) /* Major rev, BCD-encoded */
|
||||
@ -89,16 +80,10 @@ struct ipm_devid_rsp {
|
||||
|
||||
#define IPM_DEV_ADTL_SUPPORT_BITS (8)
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct ipm_selftest_rsp {
|
||||
unsigned char code;
|
||||
unsigned char test;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#define IPM_SFT_CODE_OK 0x55
|
||||
#define IPM_SFT_CODE_NOT_IMPLEMENTED 0x56
|
||||
@ -115,56 +100,4 @@ struct ipm_selftest_rsp {
|
||||
#define IPM_SELFTEST_FW_BOOTBLOCK 0x02
|
||||
#define IPM_SELFTEST_FW_CORRUPTED 0x01
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct ipm_get_watchdog_rsp {
|
||||
unsigned char timer_use;
|
||||
unsigned char timer_actions;
|
||||
unsigned char pre_timeout;
|
||||
unsigned char timer_use_exp;
|
||||
unsigned char initial_countdown_lsb;
|
||||
unsigned char initial_countdown_msb;
|
||||
unsigned char present_countdown_lsb;
|
||||
unsigned char present_countdown_msb;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
#define IPM_WATCHDOG_RESET_ERROR 0x80
|
||||
|
||||
#define IPM_WATCHDOG_BIOS_FRB2 0x01
|
||||
#define IPM_WATCHDOG_BIOS_POST 0x02
|
||||
#define IPM_WATCHDOG_OS_LOAD 0x03
|
||||
#define IPM_WATCHDOG_SMS_OS 0x04
|
||||
#define IPM_WATCHDOG_OEM 0x05
|
||||
|
||||
#define IPM_WATCHDOG_NO_ACTION 0x00
|
||||
#define IPM_WATCHDOG_HARD_RESET 0x01
|
||||
#define IPM_WATCHDOG_POWER_DOWN 0x02
|
||||
#define IPM_WATCHDOG_POWER_CYCLE 0x03
|
||||
|
||||
#define IPM_WATCHDOG_CLEAR_OEM 0x20
|
||||
#define IPM_WATCHDOG_CLEAR_SMS_OS 0x10
|
||||
#define IPM_WATCHDOG_CLEAR_OS_LOAD 0x08
|
||||
#define IPM_WATCHDOG_CLEAR_BIOS_POST 0x04
|
||||
#define IPM_WATCHDOG_CLEAR_BIOS_FRB2 0x02
|
||||
|
||||
/* IPMI 2.0 command for system information*/
|
||||
#define IPMI_SET_SYS_INFO 0x58
|
||||
#define IPMI_GET_SYS_INFO 0x59
|
||||
#define IPMI_SYSINFO_SET0_SIZE 14
|
||||
#define IPMI_SYSINFO_SETN_SIZE 16
|
||||
|
||||
#define IPMI_SYSINFO_HOSTNAME 0x02
|
||||
#define IPMI_SYSINFO_PRIMARY_OS_NAME 0x03
|
||||
#define IPMI_SYSINFO_OS_NAME 0x04
|
||||
#define IPMI_SYSINFO_DELL_OS_VERSION 0xe4
|
||||
#define IPMI_SYSINFO_DELL_URL 0xde
|
||||
|
||||
int ipmi_mc_getsysinfo(struct ipmi_intf * intf, int param, int block, int set,
|
||||
int len, void *buffer);
|
||||
int ipmi_mc_setsysinfo(struct ipmi_intf * intf, int len, void *buffer);
|
||||
|
||||
#endif /*IPMI_MC_H */
|
@ -50,9 +50,6 @@ typedef enum {
|
||||
P_ABLE,
|
||||
} flg_e;
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_table_entry {
|
||||
#define PEF_CONFIG_ENABLED 0x80
|
||||
#define PEF_CONFIG_PRECONFIGURED 0x40
|
||||
@ -93,10 +90,7 @@ struct pef_table_entry {
|
||||
uint8_t event_data_3_AND_mask;
|
||||
uint8_t event_data_3_compare_1;
|
||||
uint8_t event_data_3_compare_2;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct desc_map { /* maps a description to a value/mask */
|
||||
const char *desc;
|
||||
@ -330,9 +324,6 @@ pef_b2s_generic_ER[] __attribute__((unused)) = {
|
||||
#define PEF_B2S_GENERIC_ER_ENTRIES \
|
||||
(sizeof(pef_b2s_generic_ER) / sizeof(pef_b2s_generic_ER[0]))
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_policy_entry {
|
||||
#define PEF_POLICY_ID_MASK 0xf0
|
||||
#define PEF_POLICY_ID_SHIFT 4
|
||||
@ -350,10 +341,7 @@ struct pef_policy_entry {
|
||||
uint8_t chan_dest;
|
||||
#define PEF_POLICY_EVENT_SPECIFIC 0x80
|
||||
uint8_t alert_string_key;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
static struct bit_desc_map
|
||||
pef_b2s_policies __attribute__((unused)) = {
|
||||
@ -396,9 +384,6 @@ BIT_DESC_MAP_LIST,
|
||||
{NULL}
|
||||
} };
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_cfgparm_selector {
|
||||
#define PEF_CFGPARM_ID_REVISION_ONLY_MASK 0x80
|
||||
#define PEF_CFGPARM_ID_SET_IN_PROGRESS 0
|
||||
@ -418,36 +403,21 @@ struct pef_cfgparm_selector {
|
||||
uint8_t id;
|
||||
uint8_t set;
|
||||
uint8_t block;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_cfgparm_set_in_progress {
|
||||
#define PEF_SET_IN_PROGRESS_COMMIT_WRITE 0x02
|
||||
#define PEF_SET_IN_PROGRESS 0x01
|
||||
uint8_t data1;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_cfgparm_control {
|
||||
#define PEF_CONTROL_ENABLE_ALERT_STARTUP_DELAY 0x08
|
||||
#define PEF_CONTROL_ENABLE_STARTUP_DELAY 0x04
|
||||
#define PEF_CONTROL_ENABLE_EVENT_MESSAGES 0x02
|
||||
#define PEF_CONTROL_ENABLE 0x01
|
||||
uint8_t data1;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
static struct bit_desc_map
|
||||
pef_b2s_control __attribute__((unused)) = {
|
||||
@ -459,9 +429,6 @@ BIT_DESC_MAP_ALL,
|
||||
{NULL}
|
||||
} };
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_cfgparm_action {
|
||||
#define PEF_ACTION_ENABLE_DIAGNOSTIC_INTERRUPT 0x20
|
||||
#define PEF_ACTION_ENABLE_OEM 0x10
|
||||
@ -470,114 +437,54 @@ struct pef_cfgparm_action {
|
||||
#define PEF_ACTION_ENABLE_POWER_DOWN 0x02
|
||||
#define PEF_ACTION_ENABLE_ALERT 0x01
|
||||
uint8_t data1;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_cfgparm_startup_delay {
|
||||
uint8_t data1;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_cfgparm_alert_startup_delay {
|
||||
uint8_t data1;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_cfgparm_filter_table_size {
|
||||
#define PEF_FILTER_TABLE_SIZE_MASK 0x7f
|
||||
uint8_t data1;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_cfgparm_filter_table_entry {
|
||||
#define PEF_FILTER_TABLE_ID_MASK 0x7f
|
||||
uint8_t data1;
|
||||
struct pef_table_entry entry;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_cfgparm_filter_table_data_1 {
|
||||
uint8_t data1;
|
||||
uint8_t data2;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_cfgparm_policy_table_size {
|
||||
#define PEF_POLICY_TABLE_SIZE_MASK 0x7f
|
||||
uint8_t data1;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_cfgparm_policy_table_entry {
|
||||
#define PEF_POLICY_TABLE_ID_MASK 0x7f
|
||||
uint8_t data1;
|
||||
struct pef_policy_entry entry;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_cfgparm_system_guid {
|
||||
#define PEF_SYSTEM_GUID_USED_IN_PET 0x01
|
||||
uint8_t data1;
|
||||
uint8_t guid[16];
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_cfgparm_alert_string_table_size {
|
||||
#define PEF_ALERT_STRING_TABLE_SIZE_MASK 0x7f
|
||||
uint8_t data1;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_cfgparm_alert_string_keys {
|
||||
#define PEF_ALERT_STRING_ID_MASK 0x7f
|
||||
uint8_t data1;
|
||||
@ -585,27 +492,16 @@ struct pef_cfgparm_alert_string_keys {
|
||||
uint8_t data2;
|
||||
#define PEF_ALERT_STRING_SET_ID_MASK 0x7f
|
||||
uint8_t data3;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_cfgparm_alert_string_table_entry {
|
||||
uint8_t id;
|
||||
uint8_t blockno;
|
||||
uint8_t block[16];
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* PEF - LAN */
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
|
||||
struct pef_lan_cfgparm_selector {
|
||||
#define PEF_LAN_CFGPARM_CH_REVISION_ONLY_MASK 0x80
|
||||
#define PEF_LAN_CFGPARM_CH_MASK 0x0f
|
||||
@ -617,25 +513,13 @@ struct pef_lan_cfgparm_selector {
|
||||
uint8_t id;
|
||||
uint8_t set;
|
||||
uint8_t block;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_lan_cfgparm_dest_size {
|
||||
#define PEF_LAN_DEST_TABLE_SIZE_MASK 0x0f
|
||||
uint8_t data1;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_lan_cfgparm_dest_type {
|
||||
#define PEF_LAN_DEST_TYPE_ID_MASK 0x0f
|
||||
uint8_t dest;
|
||||
@ -648,10 +532,7 @@ struct pef_lan_cfgparm_dest_type {
|
||||
uint8_t alert_timeout;
|
||||
#define PEF_LAN_RETRIES_MASK 0x07
|
||||
uint8_t retries;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
static struct bit_desc_map
|
||||
pef_b2s_lan_desttype __attribute__((unused)) = {
|
||||
@ -663,9 +544,6 @@ BIT_DESC_MAP_LIST,
|
||||
{NULL}
|
||||
} };
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_lan_cfgparm_dest_info {
|
||||
#define PEF_LAN_DEST_MASK 0x0f
|
||||
uint8_t dest;
|
||||
@ -677,15 +555,10 @@ struct pef_lan_cfgparm_dest_info {
|
||||
uint8_t gateway;
|
||||
uint8_t ip[4];
|
||||
uint8_t mac[6];
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* PEF - Serial/PPP */
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
|
||||
struct pef_serial_cfgparm_selector {
|
||||
#define PEF_SERIAL_CFGPARM_CH_REVISION_ONLY_MASK 0x80
|
||||
#define PEF_SERIAL_CFGPARM_CH_MASK 0x0f
|
||||
@ -700,25 +573,13 @@ struct pef_serial_cfgparm_selector {
|
||||
uint8_t id;
|
||||
uint8_t set;
|
||||
uint8_t block;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_serial_cfgparm_dest_size {
|
||||
#define PEF_SERIAL_DEST_TABLE_SIZE_MASK 0x0f
|
||||
uint8_t data1;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_serial_cfgparm_dest_info {
|
||||
#define PEF_SERIAL_DEST_MASK 0x0f
|
||||
uint8_t dest;
|
||||
@ -747,10 +608,7 @@ struct pef_serial_cfgparm_dest_info {
|
||||
#define PEF_SERIAL_CALLBACK_IPADDR_ID_SHIFT 4
|
||||
#define PEF_SERIAL_CALLBACK_ACCT_ID_MASK 0xf0
|
||||
uint8_t data5;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
static struct bit_desc_map
|
||||
pef_b2s_serial_desttype __attribute__((unused)) = {
|
||||
@ -765,58 +623,31 @@ BIT_DESC_MAP_LIST,
|
||||
{NULL}
|
||||
} };
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_serial_cfgparm_dial_string_count {
|
||||
#define PEF_SERIAL_DIAL_STRING_COUNT_MASK 0x0f
|
||||
uint8_t data1;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_serial_cfgparm_dial_string {
|
||||
#define PEF_SERIAL_DIAL_STRING_MASK 0x0f
|
||||
uint8_t data1;
|
||||
uint8_t data2;
|
||||
uint8_t data3;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_serial_cfgparm_tap_acct_count {
|
||||
#define PEF_SERIAL_TAP_ACCT_COUNT_MASK 0x0f
|
||||
uint8_t data1;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_serial_cfgparm_tap_acct_info {
|
||||
uint8_t data1;
|
||||
#define PEF_SERIAL_TAP_ACCT_INFO_DIAL_STRING_ID_MASK 0xf0
|
||||
#define PEF_SERIAL_TAP_ACCT_INFO_DIAL_STRING_ID_SHIFT 4
|
||||
#define PEF_SERIAL_TAP_ACCT_INFO_SVC_SETTINGS_ID_MASK 0x0f
|
||||
uint8_t data2;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_serial_cfgparm_tap_svc_settings {
|
||||
uint8_t data1;
|
||||
#define PEF_SERIAL_TAP_CONFIRMATION_ACK_AFTER_ETX 0x0
|
||||
@ -827,10 +658,7 @@ struct pef_serial_cfgparm_tap_svc_settings {
|
||||
uint8_t escape_mask[4];
|
||||
uint8_t timeout_parms[3];
|
||||
uint8_t retry_parms[2];
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
static struct bit_desc_map
|
||||
pef_b2s_tap_svc_confirm __attribute__((unused)) = {
|
||||
@ -857,7 +685,7 @@ BIT_DESC_MAP_LIST,
|
||||
struct pef_cfgparm_alert_string_table_size;
|
||||
struct pef_cfgparm_alert_string_keys;
|
||||
struct pef_cfgparm_alert_string_table_entry;
|
||||
} ATTRIBUTE_PACKING;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct pef_lan_config_parms { /* LAN */
|
||||
struct pef_lan_cfgparm_set_in_progress;
|
||||
@ -880,7 +708,7 @@ BIT_DESC_MAP_LIST,
|
||||
struct pef_lan_cfgparm_destination_count;
|
||||
struct pef_lan_cfgparm_destination_type;
|
||||
struct pef_lan_cfgparm_destination_ipaddr;
|
||||
} ATTRIBUTE_PACKING;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct pef_serial_config_parms { /* Serial/PPP */
|
||||
struct pef_serial_cfgparm_set_in_progress;
|
||||
@ -932,7 +760,7 @@ BIT_DESC_MAP_LIST,
|
||||
struct pef_serial_cfgparm_ppp_udp_proxy_xmit_bufsize;
|
||||
struct pef_serial_cfgparm_ppp_udp_proxy_recv_bufsize;
|
||||
struct pef_serial_cfgparm_ppp_remote_console_ipaddr;
|
||||
} ATTRIBUTE_PACKING;
|
||||
} __attribute__ ((packed));
|
||||
#endif
|
||||
|
||||
#define IPMI_CMD_GET_PEF_CAPABILITIES 0x10
|
90
ipmitool/include/ipmitool/ipmi_picmg.h
Normal file
90
ipmitool/include/ipmitool/ipmi_picmg.h
Normal file
@ -0,0 +1,90 @@
|
||||
|
||||
/*
|
||||
(C) Kontron
|
||||
*/
|
||||
|
||||
#ifndef _IPMI_PICMG_H_
|
||||
#define _IPMI_PICMG_H_
|
||||
|
||||
#include <ipmitool/ipmi.h>
|
||||
|
||||
/* PICMG commands */
|
||||
#define PICMG_GET_PICMG_PROPERTIES_CMD 0x00
|
||||
#define PICMG_GET_ADDRESS_INFO_CMD 0x01
|
||||
#define PICMG_GET_SHELF_ADDRESS_INFO_CMD 0x02
|
||||
#define PICMG_SET_SHELF_ADDRESS_INFO_CMD 0x03
|
||||
#define PICMG_FRU_CONTROL_CMD 0x04
|
||||
#define PICMG_GET_FRU_LED_PROPERTIES_CMD 0x05
|
||||
#define PICMG_GET_LED_COLOR_CAPABILITIES_CMD 0x06
|
||||
#define PICMG_SET_FRU_LED_STATE_CMD 0x07
|
||||
#define PICMG_GET_FRU_LED_STATE_CMD 0x08
|
||||
#define PICMG_SET_IPMB_CMD 0x09
|
||||
#define PICMG_SET_FRU_POLICY_CMD 0x0A
|
||||
#define PICMG_GET_FRU_POLICY_CMD 0x0B
|
||||
#define PICMG_FRU_ACTIVATION_CMD 0x0C
|
||||
#define PICMG_GET_DEVICE_LOCATOR_RECORD_CMD 0x0D
|
||||
#define PICMG_SET_PORT_STATE_CMD 0x0E
|
||||
#define PICMG_GET_PORT_STATE_CMD 0x0F
|
||||
#define PICMG_COMPUTE_POWER_PROPERTIES_CMD 0x10
|
||||
#define PICMG_SET_POWER_LEVEL_CMD 0x11
|
||||
#define PICMG_GET_POWER_LEVEL_CMD 0x12
|
||||
#define PICMG_RENEGOTIATE_POWER_CMD 0x13
|
||||
#define PICMG_GET_FAN_SPEED_PROPERTIES_CMD 0x14
|
||||
#define PICMG_SET_FAN_LEVEL_CMD 0x15
|
||||
#define PICMG_GET_FAN_LEVEL_CMD 0x16
|
||||
#define PICMG_BUSED_RESOURCE_CMD 0x17
|
||||
|
||||
/* AMC.0 commands */
|
||||
#define PICMG_AMC_SET_PORT_STATE_CMD 0x19
|
||||
#define PICMG_AMC_GET_PORT_STATE_CMD 0x1A
|
||||
|
||||
/* Site Types */
|
||||
#define PICMG_ATCA_BOARD 0x00
|
||||
#define PICMG_POWER_ENTRY 0x01
|
||||
#define PICMG_SHELF_FRU 0x02
|
||||
#define PICMG_DEDICATED_SHMC 0x03
|
||||
#define PICMG_FAN_TRAY 0x04
|
||||
#define PICMG_FAN_FILTER_TRAY 0x05
|
||||
#define PICMG_ALARM 0x06
|
||||
#define PICMG_AMC 0x07
|
||||
#define PICMG_PMC 0x08
|
||||
#define PICMG_RTM 0x09
|
||||
|
||||
|
||||
|
||||
struct picmg_set_fru_activation_cmd {
|
||||
unsigned char picmg_id; /* always 0*/
|
||||
unsigned char fru_id; /* threshold setting mask */
|
||||
unsigned char fru_state; /* fru activation/deactivation */
|
||||
} __attribute__ ((packed));
|
||||
|
||||
|
||||
|
||||
/* the LED color capabilities */
|
||||
static const char* led_color_str[] __attribute__((unused)) = {
|
||||
"reserved",
|
||||
"BLUE",
|
||||
"RED",
|
||||
"GREEN",
|
||||
"AMBER",
|
||||
"ORANGE",
|
||||
"WHITE",
|
||||
"reserved"
|
||||
};
|
||||
|
||||
|
||||
|
||||
static const char* amc_link_type_str[] __attribute__((unused)) = {
|
||||
" FRU_PICMGEXT_AMC_LINK_TYPE_RESERVED",
|
||||
" FRU_PICMGEXT_AMC_LINK_TYPE_RESERVED1",
|
||||
" FRU_PICMGEXT_AMC_LINK_TYPE_PCI_EXPRESS",
|
||||
" FRU_PICMGEXT_AMC_LINK_TYPE_ADVANCED_SWITCHING1",
|
||||
" FRU_PICMGEXT_AMC_LINK_TYPE_ADVANCED_SWITCHING2",
|
||||
" FRU_PICMGEXT_AMC_LINK_TYPE_ETHERNET",
|
||||
" FRU_PICMGEXT_AMC_LINK_TYPE_RAPIDIO",
|
||||
" FRU_PICMGEXT_AMC_LINK_TYPE_STORAGE",
|
||||
};
|
||||
|
||||
int ipmi_picmg_main (struct ipmi_intf * intf, int argc, char ** argv);
|
||||
|
||||
#endif
|
@ -105,9 +105,6 @@ enum {
|
||||
#define GET_SENSOR_READING 0x2d
|
||||
#define GET_SENSOR_TYPE 0x2f
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct sdr_repo_info_rs {
|
||||
uint8_t version; /* SDR version (51h) */
|
||||
uint16_t count; /* number of records */
|
||||
@ -115,39 +112,20 @@ struct sdr_repo_info_rs {
|
||||
uint32_t add_stamp; /* last add timestamp */
|
||||
uint32_t erase_stamp; /* last del timestamp */
|
||||
uint8_t op_support; /* supported operations */
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
/* builtin (device) sdrs support */
|
||||
struct sdr_device_info_rs {
|
||||
unsigned char count; /* number of records */
|
||||
unsigned char flags; /* flags */
|
||||
unsigned char popChangeInd[3]; /* free space in SDR */
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
#define GET_SDR_RESERVE_REPO 0x22
|
||||
struct sdr_reserve_repo_rs {
|
||||
uint16_t reserve_id; /* reservation ID */
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
#define GET_SDR 0x23
|
||||
struct sdr_get_rq {
|
||||
uint16_t reserve_id; /* reservation ID */
|
||||
@ -155,14 +133,8 @@ struct sdr_get_rq {
|
||||
uint8_t offset; /* offset into SDR */
|
||||
#define GET_SDR_ENTIRE_RECORD 0xff
|
||||
uint8_t length; /* length to read */
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct sdr_get_rs {
|
||||
uint16_t next; /* next record id */
|
||||
uint16_t id; /* record ID */
|
||||
@ -180,21 +152,15 @@ struct sdr_get_rs {
|
||||
#define SDR_RECORD_TYPE_OEM 0xc0
|
||||
uint8_t type; /* record type */
|
||||
uint8_t length; /* remaining record bytes */
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct sdr_record_mask {
|
||||
union {
|
||||
struct {
|
||||
uint16_t assert_event; /* assertion event mask */
|
||||
uint16_t deassert_event; /* de-assertion event mask */
|
||||
uint16_t read; /* discrete reading mask */
|
||||
} ATTRIBUTE_PACKING discrete;
|
||||
} discrete;
|
||||
struct {
|
||||
#if WORDS_BIGENDIAN
|
||||
uint16_t reserved:1;
|
||||
@ -288,7 +254,7 @@ struct sdr_record_mask {
|
||||
uint16_t unr:1;
|
||||
uint16_t reserved:2;
|
||||
#endif
|
||||
} ATTRIBUTE_PACKING set;
|
||||
} set;
|
||||
struct {
|
||||
#if WORDS_BIGENDIAN /* readable threshold mask */
|
||||
/* padding upper 8 bits */
|
||||
@ -310,19 +276,13 @@ struct sdr_record_mask {
|
||||
uint16_t reserved:2;
|
||||
uint16_t settable:8;
|
||||
#endif
|
||||
} ATTRIBUTE_PACKING read;
|
||||
} ATTRIBUTE_PACKING;
|
||||
} ATTRIBUTE_PACKING threshold;
|
||||
} ATTRIBUTE_PACKING type;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} read;
|
||||
};
|
||||
} threshold;
|
||||
} type;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct sdr_record_common_sensor {
|
||||
struct sdr_record_compact_sensor {
|
||||
struct {
|
||||
uint8_t owner_id;
|
||||
#if WORDS_BIGENDIAN
|
||||
@ -335,7 +295,7 @@ struct sdr_record_common_sensor {
|
||||
uint8_t channel:4; /* channel number */
|
||||
#endif
|
||||
uint8_t sensor_num; /* unique sensor number */
|
||||
} ATTRIBUTE_PACKING keys;
|
||||
} keys;
|
||||
|
||||
struct entity_id entity;
|
||||
|
||||
@ -360,7 +320,7 @@ struct sdr_record_common_sensor {
|
||||
uint8_t scanning:1;
|
||||
uint8_t __reserved:1;
|
||||
#endif
|
||||
} ATTRIBUTE_PACKING init;
|
||||
} init;
|
||||
struct {
|
||||
#if WORDS_BIGENDIAN
|
||||
uint8_t ignore:1;
|
||||
@ -375,9 +335,9 @@ struct sdr_record_common_sensor {
|
||||
uint8_t rearm:1;
|
||||
uint8_t ignore:1;
|
||||
#endif
|
||||
} ATTRIBUTE_PACKING capabilities;
|
||||
uint8_t type;
|
||||
} ATTRIBUTE_PACKING sensor;
|
||||
} capabilities;
|
||||
uint8_t type; /* sensor type */
|
||||
} sensor;
|
||||
|
||||
uint8_t event_type; /* event/reading type code */
|
||||
|
||||
@ -398,23 +358,9 @@ struct sdr_record_common_sensor {
|
||||
struct {
|
||||
uint8_t base;
|
||||
uint8_t modifier;
|
||||
} ATTRIBUTE_PACKING type;
|
||||
} ATTRIBUTE_PACKING unit;
|
||||
} ATTRIBUTE_PACKING;
|
||||
} type;
|
||||
} unit;
|
||||
|
||||
/* SDR Record Common Sensor header macros */
|
||||
#define IS_THRESHOLD_SENSOR(s) ((s)->event_type == 1)
|
||||
#define UNITS_ARE_DISCRETE(s) ((s)->unit.analog == 3)
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct sdr_record_compact_sensor {
|
||||
struct sdr_record_common_sensor cmn;
|
||||
struct {
|
||||
#if WORDS_BIGENDIAN
|
||||
uint8_t __reserved:2;
|
||||
@ -432,27 +378,21 @@ struct sdr_record_compact_sensor {
|
||||
uint8_t mod_offset:7;
|
||||
uint8_t entity_inst:1;
|
||||
#endif
|
||||
} ATTRIBUTE_PACKING share;
|
||||
} share;
|
||||
|
||||
struct {
|
||||
struct {
|
||||
uint8_t positive;
|
||||
uint8_t negative;
|
||||
} ATTRIBUTE_PACKING hysteresis;
|
||||
} ATTRIBUTE_PACKING threshold;
|
||||
} hysteresis;
|
||||
} threshold;
|
||||
|
||||
uint8_t __reserved[3];
|
||||
uint8_t oem; /* reserved for OEM use */
|
||||
uint8_t id_code; /* sensor ID string type/length code */
|
||||
uint8_t id_string[16]; /* sensor ID string bytes, only if id_code != 0 */
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct sdr_record_eventonly_sensor {
|
||||
struct {
|
||||
uint8_t owner_id;
|
||||
@ -466,7 +406,7 @@ struct sdr_record_eventonly_sensor {
|
||||
uint8_t channel:4; /* channel number */
|
||||
#endif
|
||||
uint8_t sensor_num; /* unique sensor number */
|
||||
} ATTRIBUTE_PACKING keys;
|
||||
} keys;
|
||||
|
||||
struct entity_id entity;
|
||||
|
||||
@ -490,23 +430,93 @@ struct sdr_record_eventonly_sensor {
|
||||
uint8_t mod_offset:7;
|
||||
uint8_t entity_inst:1;
|
||||
#endif
|
||||
} ATTRIBUTE_PACKING share;
|
||||
} share;
|
||||
|
||||
uint8_t __reserved;
|
||||
uint8_t oem; /* reserved for OEM use */
|
||||
uint8_t id_code; /* sensor ID string type/length code */
|
||||
uint8_t id_string[16]; /* sensor ID string bytes, only if id_code != 0 */
|
||||
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct sdr_record_full_sensor {
|
||||
struct sdr_record_common_sensor cmn;
|
||||
struct {
|
||||
uint8_t owner_id;
|
||||
#if WORDS_BIGENDIAN
|
||||
uint8_t channel:4; /* channel number */
|
||||
uint8_t __reserved:2;
|
||||
uint8_t lun:2; /* sensor owner lun */
|
||||
#else
|
||||
uint8_t lun:2; /* sensor owner lun */
|
||||
uint8_t __reserved:2;
|
||||
uint8_t channel:4; /* channel number */
|
||||
#endif
|
||||
uint8_t sensor_num; /* unique sensor number */
|
||||
} keys;
|
||||
|
||||
struct entity_id entity;
|
||||
|
||||
struct {
|
||||
struct {
|
||||
#if WORDS_BIGENDIAN
|
||||
uint8_t __reserved:1;
|
||||
uint8_t scanning:1;
|
||||
uint8_t events:1;
|
||||
uint8_t thresholds:1;
|
||||
uint8_t hysteresis:1;
|
||||
uint8_t type:1;
|
||||
uint8_t event_gen:1;
|
||||
uint8_t sensor_scan:1;
|
||||
#else
|
||||
uint8_t sensor_scan:1;
|
||||
uint8_t event_gen:1;
|
||||
uint8_t type:1;
|
||||
uint8_t hysteresis:1;
|
||||
uint8_t thresholds:1;
|
||||
uint8_t events:1;
|
||||
uint8_t scanning:1;
|
||||
uint8_t __reserved:1;
|
||||
#endif
|
||||
} init;
|
||||
struct {
|
||||
#if WORDS_BIGENDIAN
|
||||
uint8_t ignore:1;
|
||||
uint8_t rearm:1;
|
||||
uint8_t hysteresis:2;
|
||||
uint8_t threshold:2;
|
||||
uint8_t event_msg:2;
|
||||
#else
|
||||
uint8_t event_msg:2;
|
||||
uint8_t threshold:2;
|
||||
uint8_t hysteresis:2;
|
||||
uint8_t rearm:1;
|
||||
uint8_t ignore:1;
|
||||
#endif
|
||||
} capabilities;
|
||||
uint8_t type;
|
||||
} sensor;
|
||||
|
||||
uint8_t event_type; /* event/reading type code */
|
||||
|
||||
struct sdr_record_mask mask;
|
||||
|
||||
struct {
|
||||
#if WORDS_BIGENDIAN
|
||||
uint8_t analog:2;
|
||||
uint8_t rate:3;
|
||||
uint8_t modifier:2;
|
||||
uint8_t pct:1;
|
||||
#else
|
||||
uint8_t pct:1;
|
||||
uint8_t modifier:2;
|
||||
uint8_t rate:3;
|
||||
uint8_t analog:2;
|
||||
#endif
|
||||
struct {
|
||||
uint8_t base;
|
||||
uint8_t modifier;
|
||||
} type;
|
||||
} unit;
|
||||
|
||||
#define SDR_SENSOR_L_LINEAR 0x00
|
||||
#define SDR_SENSOR_L_LN 0x01
|
||||
@ -538,7 +548,7 @@ struct sdr_record_full_sensor {
|
||||
uint8_t normal_min:1; /* normal min field specified */
|
||||
uint8_t __reserved:5;
|
||||
#endif
|
||||
} ATTRIBUTE_PACKING analog_flag;
|
||||
} analog_flag;
|
||||
|
||||
uint8_t nominal_read; /* nominal reading, raw value */
|
||||
uint8_t normal_max; /* normal maximum, raw value */
|
||||
@ -551,29 +561,23 @@ struct sdr_record_full_sensor {
|
||||
uint8_t non_recover;
|
||||
uint8_t critical;
|
||||
uint8_t non_critical;
|
||||
} ATTRIBUTE_PACKING upper;
|
||||
} upper;
|
||||
struct {
|
||||
uint8_t non_recover;
|
||||
uint8_t critical;
|
||||
uint8_t non_critical;
|
||||
} ATTRIBUTE_PACKING lower;
|
||||
} lower;
|
||||
struct {
|
||||
uint8_t positive;
|
||||
uint8_t negative;
|
||||
} ATTRIBUTE_PACKING hysteresis;
|
||||
} ATTRIBUTE_PACKING threshold;
|
||||
} hysteresis;
|
||||
} threshold;
|
||||
uint8_t __reserved[2];
|
||||
uint8_t oem; /* reserved for OEM use */
|
||||
uint8_t id_code; /* sensor ID string type/length code */
|
||||
uint8_t id_string[16]; /* sensor ID string bytes, only if id_code != 0 */
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct sdr_record_mc_locator {
|
||||
uint8_t dev_slave_addr;
|
||||
#if WORDS_BIGENDIAN
|
||||
@ -598,10 +602,7 @@ struct sdr_record_mc_locator {
|
||||
uint8_t oem;
|
||||
uint8_t id_code;
|
||||
uint8_t id_string[16];
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct sdr_record_fru_locator {
|
||||
uint8_t dev_slave_addr;
|
||||
@ -631,14 +632,8 @@ struct sdr_record_fru_locator {
|
||||
uint8_t oem;
|
||||
uint8_t id_code;
|
||||
uint8_t id_string[16];
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct sdr_record_generic_locator {
|
||||
uint8_t dev_access_addr;
|
||||
uint8_t dev_slave_addr;
|
||||
@ -665,14 +660,8 @@ struct sdr_record_generic_locator {
|
||||
uint8_t oem;
|
||||
uint8_t id_code;
|
||||
uint8_t id_string[16];
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct sdr_record_entity_assoc {
|
||||
struct entity_id entity; /* container entity ID and instance */
|
||||
struct {
|
||||
@ -696,10 +685,7 @@ struct sdr_record_entity_assoc {
|
||||
uint8_t entity_inst_3; /* entity inst 3 | range 2 first instance */
|
||||
uint8_t entity_id_4; /* entity ID 4 | range 2 entity */
|
||||
uint8_t entity_inst_4; /* entity inst 4 | range 2 last instance */
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct sdr_record_oem {
|
||||
uint8_t *data;
|
||||
@ -710,9 +696,6 @@ struct sdr_record_oem {
|
||||
* The Get SDR Repository Info response structure
|
||||
* From table 33-3 of the IPMI v2.0 spec
|
||||
*/
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct get_sdr_repository_info_rsp {
|
||||
uint8_t sdr_version;
|
||||
uint8_t record_count_lsb;
|
||||
@ -737,21 +720,14 @@ struct get_sdr_repository_info_rsp {
|
||||
uint8_t modal_update_support:2;
|
||||
uint8_t overflow_flag:1;
|
||||
#endif
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct ipmi_sdr_iterator {
|
||||
uint16_t reservation;
|
||||
int total;
|
||||
int next;
|
||||
int use_built_in;
|
||||
};
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct sdr_record_list {
|
||||
uint16_t id;
|
||||
uint8_t version;
|
||||
@ -760,7 +736,6 @@ struct sdr_record_list {
|
||||
uint8_t *raw;
|
||||
struct sdr_record_list *next;
|
||||
union {
|
||||
struct sdr_record_common_sensor *common;
|
||||
struct sdr_record_full_sensor *full;
|
||||
struct sdr_record_compact_sensor *compact;
|
||||
struct sdr_record_eventonly_sensor *eventonly;
|
||||
@ -769,12 +744,8 @@ struct sdr_record_list {
|
||||
struct sdr_record_mc_locator *mcloc;
|
||||
struct sdr_record_entity_assoc *entassoc;
|
||||
struct sdr_record_oem *oem;
|
||||
} ATTRIBUTE_PACKING record;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
} record;
|
||||
};
|
||||
|
||||
/* unit description codes (IPMI v1.5 section 37.16) */
|
||||
#define UNIT_MAX 0x90
|
||||
@ -809,85 +780,31 @@ static const char *sensor_type_desc[] __attribute__ ((unused)) = {
|
||||
"Physical Security", "Platform Security", "Processor",
|
||||
"Power Supply", "Power Unit", "Cooling Device", "Other",
|
||||
"Memory", "Drive Slot / Bay", "POST Memory Resize",
|
||||
"System Firmwares", "Event Logging Disabled", "Watchdog1",
|
||||
"System Firmwares", "Event Logging Disabled", "Watchdog",
|
||||
"System Event", "Critical Interrupt", "Button",
|
||||
"Module / Board", "Microcontroller", "Add-in Card",
|
||||
"Chassis", "Chip Set", "Other FRU", "Cable / Interconnect",
|
||||
"Terminator", "System Boot Initiated", "Boot Error",
|
||||
"OS Boot", "OS Critical Stop", "Slot / Connector",
|
||||
"System ACPI Power State", "Watchdog2", "Platform Alert",
|
||||
"System ACPI Power State", "Watchdog", "Platform Alert",
|
||||
"Entity Presence", "Monitor ASIC", "LAN",
|
||||
"Management Subsys Health", "Battery", "Session Audit",
|
||||
"Version Change", "FRU State" };
|
||||
"Management Subsystem Health", "Battery","Session Audit",
|
||||
"Version Change","FRU State" };
|
||||
|
||||
struct sensor_reading {
|
||||
char s_id[17]; /* name of the sensor */
|
||||
struct sdr_record_full_sensor *full;
|
||||
struct sdr_record_compact_sensor *compact;
|
||||
uint8_t s_reading_valid; /* read value valididity */
|
||||
uint8_t s_scanning_disabled; /* read of value disabled */
|
||||
uint8_t s_reading_unavailable; /* read value unavailable */
|
||||
uint8_t s_reading; /* value which was read */
|
||||
uint8_t s_data2; /* data2 value read */
|
||||
uint8_t s_data3; /* data3 value read */
|
||||
uint8_t s_has_analog_value; /* sensor has analog value */
|
||||
double s_a_val; /* read value converted to analog */
|
||||
char s_a_str[16]; /* analog value as a string */
|
||||
const char *s_a_units; /* analog value units string */
|
||||
};
|
||||
|
||||
/*
|
||||
* Determine if bridging is necessary to address a sensor at the given
|
||||
* address (_addr) and (_chan) via the interface (_intf).
|
||||
*
|
||||
* If the sensor is being addressed on channel zero, it resides on
|
||||
* IPMB-0. If the interface target IPMB-0 address is exactly the same as
|
||||
* the sensor address then the sensor resides on the target IPMB-0
|
||||
* so we don't need extra levels of bridging to address the sensor.
|
||||
* Or
|
||||
* If the sensor target address and channel match the interface target address
|
||||
* and channel then there is no extra levels of bridging required.
|
||||
*
|
||||
* Note:
|
||||
* The target IPMB-0 address is the address of the SDR repository that was
|
||||
* accessed using the user specified bridging command line arguments.
|
||||
* Access to any sensor on the target IPMB-0 can be addressed using the
|
||||
* target address and transit address in the interface.
|
||||
*/
|
||||
#define BRIDGE_TO_SENSOR(_intf, _addr, _chan) \
|
||||
( !((_chan == 0 && _intf->target_ipmb_addr && \
|
||||
_intf->target_ipmb_addr == _addr) || \
|
||||
(_addr == _intf->target_addr && _chan == _intf->target_channel)) )
|
||||
|
||||
|
||||
struct ipmi_sdr_iterator *ipmi_sdr_start(struct ipmi_intf *intf,
|
||||
int use_builtin);
|
||||
struct ipmi_sdr_iterator *ipmi_sdr_start(struct ipmi_intf *intf);
|
||||
struct sdr_get_rs *ipmi_sdr_get_next_header(struct ipmi_intf *intf,
|
||||
struct ipmi_sdr_iterator *i);
|
||||
uint8_t *ipmi_sdr_get_record(struct ipmi_intf *intf, struct sdr_get_rs *header,
|
||||
struct ipmi_sdr_iterator *i);
|
||||
void ipmi_sdr_end(struct ipmi_intf *intf, struct ipmi_sdr_iterator *i);
|
||||
int ipmi_sdr_print_sdr(struct ipmi_intf *intf, uint8_t type);
|
||||
|
||||
int ipmi_sdr_print_name_from_rawentry(struct ipmi_intf *intf,uint16_t id,
|
||||
uint8_t type,uint8_t * raw);
|
||||
int ipmi_sdr_print_rawentry(struct ipmi_intf *intf, uint8_t type, uint8_t * raw,
|
||||
int len);
|
||||
int ipmi_sdr_print_listentry(struct ipmi_intf *intf,
|
||||
struct sdr_record_list *entry);
|
||||
void ipmi_sdr_print_sensor_hysteresis(struct sdr_record_common_sensor *sensor,
|
||||
struct sdr_record_full_sensor *full,
|
||||
uint8_t hysteresis_value,
|
||||
const char *hdrstr);
|
||||
const char *ipmi_sdr_get_unit_string(uint8_t pct, uint8_t type,
|
||||
uint8_t base, uint8_t modifier);
|
||||
struct sensor_reading *
|
||||
ipmi_sdr_read_sensor_value(struct ipmi_intf *intf,
|
||||
struct sdr_record_common_sensor *sensor,
|
||||
uint8_t sdr_record_type, int precision);
|
||||
const char *ipmi_sdr_get_thresh_status(struct sensor_reading *sr,
|
||||
const char *invalidstr);
|
||||
const char *ipmi_sdr_get_status(int, const char *, uint8_t stat);
|
||||
char *ipmi_sdr_get_unit_string(uint8_t type, uint8_t base, uint8_t modifier);
|
||||
const char *ipmi_sdr_get_status(struct sdr_record_full_sensor *sensor,
|
||||
uint8_t stat);
|
||||
double sdr_convert_sensor_tolerance(struct sdr_record_full_sensor *sensor,
|
||||
uint8_t val);
|
||||
double sdr_convert_sensor_reading(struct sdr_record_full_sensor *sensor,
|
||||
@ -901,18 +818,18 @@ struct ipmi_rs *ipmi_sdr_get_sensor_reading(struct ipmi_intf *intf,
|
||||
struct ipmi_rs *ipmi_sdr_get_sensor_reading_ipmb(struct ipmi_intf *intf,
|
||||
uint8_t sensor,
|
||||
uint8_t target,
|
||||
uint8_t lun,
|
||||
uint8_t channel);
|
||||
uint8_t lun);
|
||||
struct ipmi_rs *ipmi_sdr_get_sensor_thresholds(struct ipmi_intf *intf,
|
||||
uint8_t sensor,
|
||||
uint8_t target, uint8_t lun, uint8_t channel);
|
||||
uint8_t sensor);
|
||||
struct ipmi_rs *ipmi_sdr_get_sensor_hysteresis(struct ipmi_intf *intf,
|
||||
uint8_t sensor,
|
||||
uint8_t target, uint8_t lun, uint8_t channel);
|
||||
uint8_t sensor);
|
||||
const char *ipmi_sdr_get_sensor_type_desc(const uint8_t type);
|
||||
int ipmi_sdr_get_reservation(struct ipmi_intf *intf, int use_builtin,
|
||||
uint16_t * reserve_id);
|
||||
int ipmi_sdr_get_reservation(struct ipmi_intf *intf, uint16_t * reserve_id);
|
||||
|
||||
int ipmi_sdr_print_sensor_full(struct ipmi_intf *intf,
|
||||
struct sdr_record_full_sensor *sensor);
|
||||
int ipmi_sdr_print_sensor_compact(struct ipmi_intf *intf,
|
||||
struct sdr_record_compact_sensor *sensor);
|
||||
int ipmi_sdr_print_sensor_eventonly(struct ipmi_intf *intf,
|
||||
struct sdr_record_eventonly_sensor *sensor);
|
||||
int ipmi_sdr_print_sensor_generic_locator(struct ipmi_intf *intf,
|
||||
@ -928,7 +845,7 @@ int ipmi_sdr_print_sensor_entity_assoc(struct ipmi_intf *intf,
|
||||
struct sdr_record_list *ipmi_sdr_find_sdr_byentity(struct ipmi_intf *intf,
|
||||
struct entity_id *entity);
|
||||
struct sdr_record_list *ipmi_sdr_find_sdr_bynumtype(struct ipmi_intf *intf,
|
||||
uint16_t gen_id, uint8_t num, uint8_t type);
|
||||
uint8_t num, uint8_t type);
|
||||
struct sdr_record_list *ipmi_sdr_find_sdr_bysensortype(struct ipmi_intf *intf,
|
||||
uint8_t type);
|
||||
struct sdr_record_list *ipmi_sdr_find_sdr_byid(struct ipmi_intf *intf,
|
||||
@ -942,16 +859,14 @@ int ipmi_sdr_print_info(struct ipmi_intf *intf);
|
||||
void ipmi_sdr_print_discrete_state(const char *desc, uint8_t sensor_type,
|
||||
uint8_t event_type, uint8_t state1,
|
||||
uint8_t state2);
|
||||
void ipmi_sdr_print_discrete_state_mini(const char *header, const char *separator,
|
||||
void ipmi_sdr_print_discrete_state_mini(const char *separator,
|
||||
uint8_t sensor_type, uint8_t event_type,
|
||||
uint8_t state1, uint8_t state2);
|
||||
int ipmi_sdr_print_sensor_event_status(struct ipmi_intf *intf,
|
||||
uint8_t sensor_num, uint8_t sensor_type,
|
||||
uint8_t event_type, int numeric_fmt,
|
||||
uint8_t target, uint8_t lun, uint8_t channel);
|
||||
uint8_t event_type, int numeric_fmt);
|
||||
int ipmi_sdr_print_sensor_event_enable(struct ipmi_intf *intf,
|
||||
uint8_t sensor_num, uint8_t sensor_type,
|
||||
uint8_t event_type, int numeric_fmt,
|
||||
uint8_t target, uint8_t lun, uint8_t channel);
|
||||
uint8_t event_type, int numeric_fmt);
|
||||
|
||||
#endif /* IPMI_SDR_H */
|
@ -57,18 +57,12 @@ enum {
|
||||
IPMI_EVENT_CLASS_OEM,
|
||||
};
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct sel_get_rq {
|
||||
uint16_t reserve_id;
|
||||
uint16_t record_id;
|
||||
uint8_t offset;
|
||||
uint8_t length;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct standard_spec_sel_rec{
|
||||
uint32_t timestamp;
|
||||
@ -83,32 +77,12 @@ struct standard_spec_sel_rec{
|
||||
uint8_t event_type : 7;
|
||||
uint8_t event_dir : 1;
|
||||
#endif
|
||||
#define DATA_BYTE2_SPECIFIED_MASK 0xc0 /* event_data[0] bit mask */
|
||||
#define DATA_BYTE3_SPECIFIED_MASK 0x30 /* event_data[0] bit mask */
|
||||
#define EVENT_OFFSET_MASK 0x0f /* event_data[0] bit mask */
|
||||
#define DATA_BYTE2_SPECIFIED_MASK 0xc0 /* event_data[0] bit mask */
|
||||
#define DATA_BYTE3_SPECIFIED_MASK 0x30 /* event_data[0] bit mask */
|
||||
#define EVENT_OFFSET_MASK 0x0f /* event_data[0] bit mask */
|
||||
uint8_t event_data[3];
|
||||
};
|
||||
/* Dell Specific MACRO's */
|
||||
#define OEM_CODE_IN_BYTE2 0x80 /* Dell specific OEM Byte in Byte 2 Mask */
|
||||
#define OEM_CODE_IN_BYTE3 0x20 /* Dell specific OEM Byte in Byte 3 Mask */
|
||||
/* MASK MACROS */
|
||||
#define MASK_LOWER_NIBBLE 0x0F
|
||||
#define MASK_HIGHER_NIBBLE 0xF0
|
||||
/*Senosr type Macro's */
|
||||
#define SENSOR_TYPE_MEMORY 0x0C
|
||||
#define SENSOR_TYPE_CRIT_INTR 0x13
|
||||
#define SENSOR_TYPE_EVT_LOG 0x10
|
||||
#define SENSOR_TYPE_SYS_EVENT 0x12
|
||||
#define SENSOR_TYPE_PROCESSOR 0x07
|
||||
#define SENSOR_TYPE_OEM_SEC_EVENT 0xC1
|
||||
#define SENSOR_TYPE_VER_CHANGE 0x2B
|
||||
#define SENSOR_TYPE_FRM_PROG 0x0F
|
||||
#define SENSOR_TYPE_WTDOG 0x23
|
||||
#define SENSOR_TYPE_OEM_NFATAL_ERROR 0xC2
|
||||
#define SENSOR_TYPE_OEM_FATAL_ERROR 0xC3
|
||||
#define SENSOR_TYPE_TXT_CMD_ERROR 0x20
|
||||
#define SENSOR_TYPE_SUPERMICRO_OEM 0xD0
|
||||
/* End of Macro for DELL Specific */
|
||||
|
||||
#define SEL_OEM_TS_DATA_LEN 6
|
||||
#define SEL_OEM_NOTS_DATA_LEN 13
|
||||
struct oem_ts_spec_sel_rec{
|
||||
@ -121,9 +95,6 @@ struct oem_nots_spec_sel_rec{
|
||||
uint8_t oem_defined[SEL_OEM_NOTS_DATA_LEN];
|
||||
};
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct sel_event_record {
|
||||
uint16_t record_id;
|
||||
uint8_t record_type;
|
||||
@ -132,10 +103,7 @@ struct sel_event_record {
|
||||
struct oem_ts_spec_sel_rec oem_ts_type;
|
||||
struct oem_nots_spec_sel_rec oem_nots_type;
|
||||
} sel_type;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct ipmi_event_sensor_types {
|
||||
uint8_t code;
|
||||
@ -204,23 +172,6 @@ static struct ipmi_event_sensor_types oem_kontron_event_types[] __attribute__((u
|
||||
{ 0xC9 , 0x00 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "Diagnostic Status", "Started" },
|
||||
{ 0xC9 , 0x01 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "Diagnostic Status", "Pass" },
|
||||
{ 0xC9 , 0x02 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "Diagnostic Status", "Fail" },
|
||||
|
||||
{ 0xCA , 0x00 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "Firmware Upgrade Status", "In progress"},
|
||||
{ 0xCA , 0x01 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "Firmware Upgrade Status", "Success"},
|
||||
{ 0xCA , 0x02 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "Firmware Upgrade Status", "Failure"},
|
||||
|
||||
{ 0xCB , 0x00 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "FRU Over Current", "Asserted"},
|
||||
{ 0xCB , 0x01 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "FRU Over Current", "Deasserted"},
|
||||
|
||||
{ 0xCC , 0x00 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "FRU Sensor Error", "Asserted"},
|
||||
{ 0xCC , 0x01 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "FRU Sensor Error", "Deasserted"},
|
||||
|
||||
{ 0xCD , 0x00 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "FRU Power Denied", "Asserted"},
|
||||
{ 0xCD , 0x01 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "FRU Power Denied", "Deasserted"},
|
||||
|
||||
{ 0xCF , 0x00 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "Reset", "Asserted"},
|
||||
{ 0xCF , 0x01 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "Reset", "Deasserted"},
|
||||
|
||||
/* END */
|
||||
{ 0x00, 0x00, 0xff, 0x00, NULL, NULL },
|
||||
};
|
||||
@ -327,8 +278,6 @@ static struct ipmi_event_sensor_types sensor_specific_types[] __attribute__((unu
|
||||
{ 0x07, 0x08, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Processor", "Disabled" },
|
||||
{ 0x07, 0x09, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Processor", "Terminator presence detected" },
|
||||
{ 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, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Power Supply", "Failure detected" },
|
||||
@ -339,10 +288,7 @@ 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, 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, 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", "Power Supply Inactive" },
|
||||
|
||||
{ 0x09, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Power Unit", "Power off/down" },
|
||||
{ 0x09, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Power Unit", "Power cycle" },
|
||||
@ -366,7 +312,6 @@ static struct ipmi_event_sensor_types sensor_specific_types[] __attribute__((unu
|
||||
{ 0x0c, 0x07, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Memory", "Configuration Error" },
|
||||
{ 0x0c, 0x08, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Memory", "Spare" },
|
||||
{ 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, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Drive Slot", "Drive Fault" },
|
||||
@ -486,7 +431,6 @@ static struct ipmi_event_sensor_types sensor_specific_types[] __attribute__((unu
|
||||
{ 0x13, 0x08, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Critical Interrupt", "Bus Uncorrectable error" },
|
||||
{ 0x13, 0x09, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Critical Interrupt", "Fatal NMI" },
|
||||
{ 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, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Button", "Sleep Button pressed" },
|
||||
@ -499,7 +443,6 @@ static struct ipmi_event_sensor_types sensor_specific_types[] __attribute__((unu
|
||||
{ 0x17, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Add-in Card", NULL },
|
||||
{ 0x18, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Chassis", 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 },
|
||||
|
||||
{ 0x1b, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Cable/Interconnect", "Connected" },
|
||||
@ -529,10 +472,6 @@ 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, 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, 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, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "OS Stop/Shutdown", "Run-time critical stop" },
|
||||
@ -603,61 +542,15 @@ static struct ipmi_event_sensor_types sensor_specific_types[] __attribute__((unu
|
||||
{ 0x29, 0x02, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Battery", "Presence Detected" },
|
||||
|
||||
{ 0x2b, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Hardware change detected" },
|
||||
{ 0x2b, 0x01, 0x00, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected" },
|
||||
{ 0x2b, 0x01, 0x01, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, Mngmt Ctrl Dev Id" },
|
||||
{ 0x2b, 0x01, 0x02, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, Mngmt Ctrl Firm Rev" },
|
||||
{ 0x2b, 0x01, 0x03, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, Mngmt Ctrl Dev Rev" },
|
||||
{ 0x2b, 0x01, 0x04, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, Mngmt Ctrl Manuf Id" },
|
||||
{ 0x2b, 0x01, 0x05, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, Mngmt Ctrl IPMI Vers" },
|
||||
{ 0x2b, 0x01, 0x06, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, Mngmt Ctrl Aux Firm Id" },
|
||||
{ 0x2b, 0x01, 0x07, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, Mngmt Ctrl Firm Boot Block" },
|
||||
{ 0x2b, 0x01, 0x08, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, Mngmt Ctrl Other" },
|
||||
{ 0x2b, 0x01, 0x09, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, BIOS/EFI change" },
|
||||
{ 0x2b, 0x01, 0x0A, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, SMBIOS change" },
|
||||
{ 0x2b, 0x01, 0x0B, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, O/S change" },
|
||||
{ 0x2b, 0x01, 0x0C, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, O/S loader change" },
|
||||
{ 0x2b, 0x01, 0x0D, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, Service Diag change" },
|
||||
{ 0x2b, 0x01, 0x0E, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, Mngmt SW agent change" },
|
||||
{ 0x2b, 0x01, 0x0F, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, Mngmt SW App change" },
|
||||
{ 0x2b, 0x01, 0x10, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, Mngmt SW Middle" },
|
||||
{ 0x2b, 0x01, 0x11, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, Prog HW Change (FPGA)" },
|
||||
{ 0x2b, 0x01, 0x12, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, board/FRU module change" },
|
||||
{ 0x2b, 0x01, 0x13, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, board/FRU component change" },
|
||||
{ 0x2b, 0x01, 0x14, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, board/FRU replace equ ver" },
|
||||
{ 0x2b, 0x01, 0x15, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, board/FRU replace new ver" },
|
||||
{ 0x2b, 0x01, 0x16, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, board/FRU replace old ver" },
|
||||
{ 0x2b, 0x01, 0x17, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, board/FRU HW conf change" },
|
||||
{ 0x2b, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected" },
|
||||
{ 0x2b, 0x02, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Hardware incompatibility detected" },
|
||||
{ 0x2b, 0x03, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software incompatibility detected" },
|
||||
{ 0x2b, 0x04, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Invalid or unsupported hardware version" },
|
||||
{ 0x2b, 0x05, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Invalid or unsupported firmware or software version" },
|
||||
{ 0x2b, 0x06, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Hardware change success" },
|
||||
{ 0x2b, 0x07, 0x00, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success" },
|
||||
{ 0x2b, 0x07, 0x01, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, Mngmt Ctrl Dev Id" },
|
||||
{ 0x2b, 0x07, 0x02, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, Mngmt Ctrl Firm Rev" },
|
||||
{ 0x2b, 0x07, 0x03, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, Mngmt Ctrl Dev Rev" },
|
||||
{ 0x2b, 0x07, 0x04, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, Mngmt Ctrl Manuf Id" },
|
||||
{ 0x2b, 0x07, 0x05, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, Mngmt Ctrl IPMI Vers" },
|
||||
{ 0x2b, 0x07, 0x06, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, Mngmt Ctrl Aux Firm Id" },
|
||||
{ 0x2b, 0x07, 0x07, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, Mngmt Ctrl Firm Boot Block" },
|
||||
{ 0x2b, 0x07, 0x08, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, Mngmt Ctrl Other" },
|
||||
{ 0x2b, 0x07, 0x09, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, BIOS/EFI change" },
|
||||
{ 0x2b, 0x07, 0x0A, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, SMBIOS change" },
|
||||
{ 0x2b, 0x07, 0x0B, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, O/S change" },
|
||||
{ 0x2b, 0x07, 0x0C, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, O/S loader change" },
|
||||
{ 0x2b, 0x07, 0x0D, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, Service Diag change" },
|
||||
{ 0x2b, 0x07, 0x0E, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, Mngmt SW agent change" },
|
||||
{ 0x2b, 0x07, 0x0F, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, Mngmt SW App change" },
|
||||
{ 0x2b, 0x07, 0x10, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, Mngmt SW Middle" },
|
||||
{ 0x2b, 0x07, 0x11, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, Prog HW Change (FPGA)" },
|
||||
{ 0x2b, 0x07, 0x12, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, board/FRU module change" },
|
||||
{ 0x2b, 0x07, 0x13, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, board/FRU component change" },
|
||||
{ 0x2b, 0x07, 0x14, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, board/FRU replace equ ver" },
|
||||
{ 0x2b, 0x07, 0x15, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, board/FRU replace new ver" },
|
||||
{ 0x2b, 0x07, 0x16, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, board/FRU replace old ver" },
|
||||
{ 0x2b, 0x07, 0x17, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, board/FRU HW conf change" },
|
||||
{ 0x2b, 0x07, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success" },
|
||||
|
||||
{ 0x2c, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "FRU State", "Not Installed" },
|
||||
{ 0x2c, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "FRU State", "Not Installed" },
|
||||
{ 0x2c, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "FRU State", "Inactive" },
|
||||
{ 0x2c, 0x02, 0xff, IPMI_EVENT_CLASS_DISCRETE, "FRU State", "Activation Requested" },
|
||||
{ 0x2c, 0x03, 0xff, IPMI_EVENT_CLASS_DISCRETE, "FRU State", "Activation in Progress" },
|
||||
@ -673,7 +566,7 @@ static struct ipmi_event_sensor_types sensor_specific_types[] __attribute__((unu
|
||||
{ 0xF0, 0x04, 0xFF, IPMI_EVENT_CLASS_DISCRETE, "FRU Hot Swap", "Transition to M4" },
|
||||
{ 0xF0, 0x05, 0xFF, IPMI_EVENT_CLASS_DISCRETE, "FRU Hot Swap", "Transition to M5" },
|
||||
{ 0xF0, 0x06, 0xFF, IPMI_EVENT_CLASS_DISCRETE, "FRU Hot Swap", "Transition to M6" },
|
||||
{ 0xF0, 0x07, 0xFF, IPMI_EVENT_CLASS_DISCRETE, "FRU Hot Swap", "Transition to M7" },
|
||||
{ 0xF0, 0x06, 0xFF, IPMI_EVENT_CLASS_DISCRETE, "FRU Hot Swap", "Transition to M7" },
|
||||
|
||||
{ 0xF1, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "IPMB-0 Status", "IPMB-A disabled, IPMB-B disabled" },
|
||||
{ 0xF1, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "IPMB-0 Status", "IPMB-A enabled, IPMB-B disabled" },
|
||||
@ -689,56 +582,6 @@ static struct ipmi_event_sensor_types sensor_specific_types[] __attribute__((unu
|
||||
{ 0x00, 0x00, 0x00, 0x00, NULL, NULL },
|
||||
};
|
||||
|
||||
static uint16_t supermicro_x9dal[] = {
|
||||
0x0635
|
||||
};
|
||||
|
||||
static uint16_t supermicro_x9db[] = {
|
||||
0x0733, 0x0722, 0x0703, 0x0721, 0x0716, 0x0637
|
||||
};
|
||||
|
||||
static uint16_t supermicro_x9sb[] = {
|
||||
0x0651
|
||||
};
|
||||
|
||||
static uint16_t supermicro_x9[] = {
|
||||
0x0635, 0x0733, 0x0722, 0x0703, 0x0721, 0x0716, 0x0637, 0x0651
|
||||
};
|
||||
|
||||
static uint16_t supermicro_b8[] = {
|
||||
0x000A, 0x061c, 0x0620, 0x0101, 0x061f, 0x0612, 0x061e
|
||||
};
|
||||
|
||||
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
|
||||
};
|
||||
|
||||
static uint16_t supermicro_p8[] = {
|
||||
0x6480, 0x7380, 0x6280, 0x7480, 0x5980
|
||||
};
|
||||
|
||||
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
|
||||
};
|
||||
|
||||
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
|
||||
};
|
||||
|
||||
int ipmi_sel_main(struct ipmi_intf *, int, char **);
|
||||
void ipmi_sel_print_std_entry(struct ipmi_intf * intf, struct sel_event_record * evt);
|
||||
void ipmi_sel_print_std_entry_verbose(struct ipmi_intf * intf, struct sel_event_record * evt);
|
@ -65,9 +65,6 @@
|
||||
#define STATE_13_ASSERTED 0x20
|
||||
#define STATE_14_ASSERTED 0x40
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct sensor_set_thresh_rq {
|
||||
uint8_t sensor_num; /* sensor # */
|
||||
uint8_t set_mask; /* threshold setting mask */
|
||||
@ -77,13 +74,11 @@ struct sensor_set_thresh_rq {
|
||||
uint8_t upper_non_crit; /* new upper non critical threshold*/
|
||||
uint8_t upper_crit; /* new upper critical threshold*/
|
||||
uint8_t upper_non_recov; /* new upper non recoverable threshold*/
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
|
||||
int ipmi_sensor_main(struct ipmi_intf *, int, char **);
|
||||
int ipmi_sensor_print_fc(struct ipmi_intf *, struct sdr_record_common_sensor *, uint8_t);
|
||||
int ipmi_sensor_get_sensor_reading_factors( struct ipmi_intf * intf, struct sdr_record_full_sensor * sensor, uint8_t reading);
|
||||
int ipmi_sensor_print_full(struct ipmi_intf *, struct sdr_record_full_sensor *);
|
||||
int ipmi_sensor_print_compact(struct ipmi_intf *, struct sdr_record_compact_sensor *);
|
||||
|
||||
#endif /* IPMI_SENSOR_H */
|
@ -43,9 +43,6 @@
|
||||
/*
|
||||
* From table 22.25 of the IPMIv2 specification
|
||||
*/
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct get_session_info_rsp
|
||||
{
|
||||
uint8_t session_handle;
|
||||
@ -119,10 +116,7 @@ struct get_session_info_rsp
|
||||
uint16_t console_port; /* LSBF */
|
||||
} modem_data;
|
||||
} channel_data;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
|
||||
|
@ -36,8 +36,7 @@
|
||||
#include <ipmitool/ipmi.h>
|
||||
|
||||
#define SOL_ESCAPE_CHARACTER_DEFAULT '~'
|
||||
#define SOL_KEEPALIVE_TIMEOUT 15
|
||||
#define SOL_KEEPALIVE_RETRIES 3
|
||||
#define SOL_KEEPALIVE_TIMEOUT 30
|
||||
|
||||
#define IPMI_SOL_SERIAL_ALERT_MASK_SUCCEED 0x08
|
||||
#define IPMI_SOL_SERIAL_ALERT_MASK_DEFERRED 0x04
|
||||
@ -67,37 +66,14 @@ struct sol_config_parameters {
|
||||
* The ACTIVATE PAYLOAD command reponse structure
|
||||
* From table 24-2 of the IPMI v2.0 spec
|
||||
*/
|
||||
#ifdef PRAGMA_PACK
|
||||
#pramga pack(1)
|
||||
#endif
|
||||
struct activate_payload_rsp {
|
||||
uint8_t auxiliary_data[4];
|
||||
uint8_t inbound_payload_size[2]; /* LS byte first */
|
||||
uint8_t outbound_payload_size[2]; /* LS byte first */
|
||||
uint8_t payload_udp_port[2]; /* LS byte first */
|
||||
uint8_t payload_vlan_number[2]; /* LS byte first */
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef PRAGMA_PACK
|
||||
#pramga pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/*
|
||||
* Small function to validate that user-supplied SOL
|
||||
* configuration parameter values we store in uint8_t
|
||||
* data type falls within valid range. With minval
|
||||
* and maxval parameters we can use the same function
|
||||
* to validate parameters that have different ranges
|
||||
* of values.
|
||||
*
|
||||
* function will return -1 if value is not valid, or
|
||||
* will return 0 if valid.
|
||||
*/
|
||||
int ipmi_sol_set_param_isvalid_uint8_t( const char *strval,
|
||||
const char *name,
|
||||
int base,
|
||||
uint8_t minval,
|
||||
uint8_t maxval,
|
||||
uint8_t *out_value);
|
||||
|
||||
int ipmi_sol_main(struct ipmi_intf *, int, char **);
|
||||
int ipmi_get_sol_info(struct ipmi_intf * intf,
|
@ -41,7 +41,7 @@ extern const struct valstr entity_device_type_vals[];
|
||||
extern const struct valstr ipmi_netfn_vals[];
|
||||
extern const struct valstr ipmi_channel_activity_type_vals[];
|
||||
extern const struct valstr ipmi_privlvl_vals[];
|
||||
extern const struct valstr ipmi_bit_rate_vals[];
|
||||
extern const struct valstr impi_bit_rate_vals[];
|
||||
extern const struct valstr ipmi_set_in_progress_vals[];
|
||||
extern const struct valstr ipmi_authtype_session_vals[];
|
||||
extern const struct valstr ipmi_authtype_vals[];
|
||||
@ -53,21 +53,6 @@ extern const struct valstr ipmi_integrity_algorithms[];
|
||||
extern const struct valstr ipmi_encryption_algorithms[];
|
||||
extern const struct valstr ipmi_oem_info[];
|
||||
|
||||
extern const struct valstr picmg_frucontrol_vals[];
|
||||
extern const struct valstr picmg_clk_family_vals[];
|
||||
extern const struct oemvalstr picmg_clk_accuracy_vals[];
|
||||
extern const struct oemvalstr picmg_clk_resource_vals[];
|
||||
extern const struct oemvalstr picmg_clk_id_vals[];
|
||||
|
||||
extern const struct valstr picmg_busres_id_vals[];
|
||||
extern const struct valstr picmg_busres_board_cmd_vals[];
|
||||
extern const struct valstr picmg_busres_shmc_cmd_vals[];
|
||||
extern const struct oemvalstr picmg_busres_board_status_vals[];
|
||||
extern const struct oemvalstr picmg_busres_shmc_status_vals[];
|
||||
|
||||
/* these are similar, expect that the lookup takes the IANA number
|
||||
as first parameter */
|
||||
extern const struct oemvalstr ipmi_oem_product_info[];
|
||||
extern const struct oemvalstr ipmi_oem_sdr_type_vals[];
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* 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
|
||||
@ -39,35 +39,19 @@
|
||||
#include <ipmitool/ipmi.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_DEL_SSH_KEY 0x02
|
||||
#define IPMI_SUNOEM_GET_HEALTH_STATUS 0x10
|
||||
#define IPMI_SUNOEM_CLI 0x19
|
||||
#define IPMI_SUNOEM_SET_FAN_SPEED 0x20
|
||||
#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;
|
||||
#define IPMI_SUNOEM_SET_SSH_KEY 0x01
|
||||
#define IPMI_SUNOEM_DEL_SSH_KEY 0x02
|
||||
#define IPMI_SUNOEM_GET_HEALTH_STATUS 0x10
|
||||
#define IPMI_SUNOEM_SET_FAN_SPEED 0x20
|
||||
#define IPMI_SUNOEM_LED_GET 0x21
|
||||
#define IPMI_SUNOEM_LED_SET 0x22
|
||||
|
||||
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*/
|
||||
|
@ -40,7 +40,7 @@
|
||||
|
||||
|
||||
/*
|
||||
* The GET USER ACCESS response from table 22-32 of the IPMI v2.0 spec
|
||||
* The GET USER ACCESS response from table 22-32 of the IMPI v2.0 spec
|
||||
*/
|
||||
struct user_access_rsp {
|
||||
#if WORDS_BIGENDIAN
|
||||
@ -67,9 +67,6 @@ struct user_access_rsp {
|
||||
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;
|
||||
@ -83,10 +80,7 @@ struct user_access_rsp {
|
||||
uint8_t no_callin_access : 1;
|
||||
uint8_t __reserved4 : 1;
|
||||
#endif
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
|
||||
|
@ -38,9 +38,7 @@ libipmitool_la_SOURCES = helper.c ipmi_sdr.c ipmi_sel.c ipmi_sol.c ipmi_pef.c \
|
||||
ipmi_session.c ipmi_strings.c ipmi_user.c ipmi_raw.c \
|
||||
ipmi_oem.c ipmi_isol.c ipmi_sunoem.c ipmi_fwum.c ipmi_picmg.c \
|
||||
ipmi_main.c ipmi_tsol.c ipmi_firewall.c ipmi_kontronoem.c \
|
||||
ipmi_hpmfwupg.c ipmi_sdradd.c ipmi_ekanalyzer.c ipmi_gendev.c \
|
||||
ipmi_ime.c ipmi_delloem.c ipmi_dcmi.c hpm2.c \
|
||||
../src/plugins/lan/md5.c ../src/plugins/lan/md5.h
|
||||
ipmi_hpmfwupg.c
|
||||
|
||||
libipmitool_la_LDFLAGS = -export-dynamic
|
||||
libipmitool_la_LIBADD = -lm
|
@ -41,56 +41,10 @@
|
||||
|
||||
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" },
|
||||
{ 0x07, "DDR" },
|
||||
{ 0x00, NULL },
|
||||
};
|
||||
|
||||
@ -98,7 +52,6 @@ const struct valstr spd_config_vals[] = {
|
||||
{ 0x00, "None" },
|
||||
{ 0x01, "Parity" },
|
||||
{ 0x02, "ECC" },
|
||||
{ 0x04, "Addr Cmd Parity" },
|
||||
{ 0x00, NULL },
|
||||
};
|
||||
|
||||
@ -108,7 +61,6 @@ const struct valstr spd_voltage_vals[] = {
|
||||
{ 0x02, "HSTL 1.5V" },
|
||||
{ 0x03, "SSTL 3.3V" },
|
||||
{ 0x04, "SSTL 2.5V" },
|
||||
{ 0x05, "SSTL 1.8V" },
|
||||
{ 0x00, NULL },
|
||||
};
|
||||
|
||||
@ -719,141 +671,56 @@ const struct valstr jedec_id5_vals[] = {
|
||||
int
|
||||
ipmi_spd_print(uint8_t *spd_data, int len)
|
||||
{
|
||||
int k = 0;
|
||||
int ii = 0;
|
||||
int size;
|
||||
|
||||
if (len < 92)
|
||||
return -1; /* we need first 91 bytes to do our thing */
|
||||
|
||||
size = spd_data[5] * (spd_data[31] << 2);
|
||||
printf(" Memory Size : %d MB\n", size);
|
||||
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;
|
||||
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));
|
||||
|
||||
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
|
||||
{
|
||||
ii = (spd_data[3] & 0x0f) + (spd_data[4] & 0x0f) - 17;
|
||||
k = ((spd_data[5] & 0x7) + 1) * spd_data[17];
|
||||
|
||||
if(ii > 0 && ii <= 12 && k > 0) {
|
||||
printf(" Memory Size : %d MB\n", ((1 << ii) * k));
|
||||
} else {
|
||||
printf(" Memory Size INVALID: %d, %d, %d, %d\n", spd_data[3],
|
||||
spd_data[4], spd_data[5], spd_data[17]);
|
||||
}
|
||||
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)
|
||||
/* 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[64], jedec_id1_vals));
|
||||
val2str(spd_data[65], jedec_id2_vals));
|
||||
else {
|
||||
if (spd_data[65] != 0x7f)
|
||||
if (spd_data[66] != 0x7f)
|
||||
printf("%s\n",
|
||||
val2str(spd_data[65], jedec_id2_vals));
|
||||
val2str(spd_data[66], jedec_id3_vals));
|
||||
else {
|
||||
if (spd_data[66] != 0x7f)
|
||||
if (spd_data[67] != 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));
|
||||
}
|
||||
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 (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");
|
||||
@ -913,7 +780,7 @@ ipmi_spd_print_fru(struct ipmi_intf * intf, uint8_t id)
|
||||
msg_data[0] = id;
|
||||
msg_data[1] = offset;
|
||||
msg_data[2] = 0;
|
||||
msg_data[3] = FRU_DATA_RQST_SIZE;
|
||||
msg_data[3] = 32;
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (rsp == NULL) {
|
@ -35,7 +35,6 @@
|
||||
#include <sys/ioctl.h> /* For TIOCNOTTY */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <inttypes.h>
|
||||
#include <signal.h>
|
||||
@ -44,7 +43,6 @@
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <assert.h>
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
@ -75,13 +73,13 @@ uint16_t buf2short(uint8_t * buf)
|
||||
|
||||
const char * buf2str(uint8_t * buf, int len)
|
||||
{
|
||||
static char str[2049];
|
||||
static char str[1024];
|
||||
int i;
|
||||
|
||||
if (len <= 0 || len > 1024)
|
||||
return NULL;
|
||||
|
||||
memset(str, 0, 2049);
|
||||
memset(str, 0, 1024);
|
||||
|
||||
for (i=0; i<len; i++)
|
||||
sprintf(str+i+i, "%2.2x", buf[i]);
|
||||
@ -101,13 +99,13 @@ void printbuf(const uint8_t * buf, int len, const char * desc)
|
||||
if (verbose < 1)
|
||||
return;
|
||||
|
||||
fprintf(stderr, "%s (%d bytes)\n", desc, len);
|
||||
fprintf(stderr, "%s (%d bytes)\r\n", desc, len);
|
||||
for (i=0; i<len; i++) {
|
||||
if (((i%16) == 0) && (i != 0))
|
||||
fprintf(stderr, "\n");
|
||||
fprintf(stderr, "\r\n");
|
||||
fprintf(stderr, " %2.2x", buf[i]);
|
||||
}
|
||||
fprintf(stderr, "\n");
|
||||
fprintf(stderr, "\r\n");
|
||||
}
|
||||
|
||||
const char * val2str(uint16_t val, const struct valstr *vs)
|
||||
@ -121,272 +119,40 @@ const char * val2str(uint16_t val, const struct valstr *vs)
|
||||
}
|
||||
|
||||
memset(un_str, 0, 32);
|
||||
snprintf(un_str, 32, "Unknown (0x%02X)", val);
|
||||
snprintf(un_str, 32, "Unknown (0x%x)", val);
|
||||
|
||||
return un_str;
|
||||
}
|
||||
|
||||
const char * oemval2str(uint32_t oem, uint16_t val,
|
||||
const char * oemval2str(uint16_t oem, uint16_t val,
|
||||
const struct oemvalstr *vs)
|
||||
{
|
||||
static char un_str[32];
|
||||
int i;
|
||||
|
||||
for (i = 0; vs[i].oem != 0xffffff && vs[i].str != NULL; i++) {
|
||||
/* FIXME: for now on we assume PICMG capability on all IANAs */
|
||||
if ( (vs[i].oem == oem || vs[i].oem == IPMI_OEM_PICMG) &&
|
||||
vs[i].val == val ) {
|
||||
return vs[i].str;
|
||||
}
|
||||
for (i = 0; vs[i].oem != 0x00 && vs[i].str != NULL; i++) {
|
||||
/* FIXME: for now on we assume PICMG capability on all IANAs */
|
||||
if
|
||||
(
|
||||
(
|
||||
vs[i].oem == oem
|
||||
||
|
||||
vs[i].oem == IPMI_OEM_PICMG
|
||||
)
|
||||
&&
|
||||
vs[i].val == val
|
||||
)
|
||||
{
|
||||
return vs[i].str;
|
||||
}
|
||||
}
|
||||
|
||||
memset(un_str, 0, 32);
|
||||
snprintf(un_str, 32, "Unknown (0x%X)", val);
|
||||
snprintf(un_str, 32, "OEM reserved #%02x", val);
|
||||
|
||||
return un_str;
|
||||
}
|
||||
|
||||
/* str2double - safely convert string to double
|
||||
*
|
||||
* @str: source string to convert from
|
||||
* @double_ptr: pointer where to store result
|
||||
*
|
||||
* returns zero on success
|
||||
* returns (-1) if one of args is NULL, (-2) invalid input, (-3) for *flow
|
||||
*/
|
||||
int str2double(const char * str, double * double_ptr)
|
||||
{
|
||||
char * end_ptr = 0;
|
||||
if (!str || !double_ptr)
|
||||
return (-1);
|
||||
|
||||
*double_ptr = 0;
|
||||
errno = 0;
|
||||
*double_ptr = strtod(str, &end_ptr);
|
||||
|
||||
if (*end_ptr != '\0')
|
||||
return (-2);
|
||||
|
||||
if (errno != 0)
|
||||
return (-3);
|
||||
|
||||
return 0;
|
||||
} /* str2double(...) */
|
||||
|
||||
/* str2long - safely convert string to int64_t
|
||||
*
|
||||
* @str: source string to convert from
|
||||
* @lng_ptr: pointer where to store result
|
||||
*
|
||||
* returns zero on success
|
||||
* returns (-1) if one of args is NULL, (-2) invalid input, (-3) for *flow
|
||||
*/
|
||||
int str2long(const char * str, int64_t * lng_ptr)
|
||||
{
|
||||
char * end_ptr = 0;
|
||||
if (!str || !lng_ptr)
|
||||
return (-1);
|
||||
|
||||
*lng_ptr = 0;
|
||||
errno = 0;
|
||||
*lng_ptr = strtol(str, &end_ptr, 0);
|
||||
|
||||
if (*end_ptr != '\0')
|
||||
return (-2);
|
||||
|
||||
if (errno != 0)
|
||||
return (-3);
|
||||
|
||||
return 0;
|
||||
} /* str2long(...) */
|
||||
|
||||
/* str2ulong - safely convert string to uint64_t
|
||||
*
|
||||
* @str: source string to convert from
|
||||
* @ulng_ptr: pointer where to store result
|
||||
*
|
||||
* returns zero on success
|
||||
* returns (-1) if one of args is NULL, (-2) invalid input, (-3) for *flow
|
||||
*/
|
||||
int str2ulong(const char * str, uint64_t * ulng_ptr)
|
||||
{
|
||||
char * end_ptr = 0;
|
||||
if (!str || !ulng_ptr)
|
||||
return (-1);
|
||||
|
||||
*ulng_ptr = 0;
|
||||
errno = 0;
|
||||
*ulng_ptr = strtoul(str, &end_ptr, 0);
|
||||
|
||||
if (*end_ptr != '\0')
|
||||
return (-2);
|
||||
|
||||
if (errno != 0)
|
||||
return (-3);
|
||||
|
||||
return 0;
|
||||
} /* str2ulong(...) */
|
||||
|
||||
/* str2int - safely convert string to int32_t
|
||||
*
|
||||
* @str: source string to convert from
|
||||
* @int_ptr: pointer where to store result
|
||||
*
|
||||
* returns zero on success
|
||||
* returns (-1) if one of args is NULL, (-2) invalid input, (-3) for *flow
|
||||
*/
|
||||
int str2int(const char * str, int32_t * int_ptr)
|
||||
{
|
||||
int rc = 0;
|
||||
int64_t arg_long = 0;
|
||||
if (!str || !int_ptr)
|
||||
return (-1);
|
||||
|
||||
if ( (rc = str2long(str, &arg_long)) != 0 ) {
|
||||
*int_ptr = 0;
|
||||
return rc;
|
||||
}
|
||||
|
||||
if (arg_long < INT32_MIN || arg_long > INT32_MAX)
|
||||
return (-3);
|
||||
|
||||
*int_ptr = (int32_t)arg_long;
|
||||
return 0;
|
||||
} /* str2int(...) */
|
||||
|
||||
/* str2uint - safely convert string to uint32_t
|
||||
*
|
||||
* @str: source string to convert from
|
||||
* @uint_ptr: pointer where to store result
|
||||
*
|
||||
* returns zero on success
|
||||
* returns (-1) if one of args is NULL, (-2) invalid input, (-3) for *flow
|
||||
*/
|
||||
int str2uint(const char * str, uint32_t * uint_ptr)
|
||||
{
|
||||
int rc = 0;
|
||||
uint64_t arg_ulong = 0;
|
||||
if (!str || !uint_ptr)
|
||||
return (-1);
|
||||
|
||||
if ( (rc = str2ulong(str, &arg_ulong)) != 0) {
|
||||
*uint_ptr = 0;
|
||||
return rc;
|
||||
}
|
||||
|
||||
if (arg_ulong > UINT32_MAX)
|
||||
return (-3);
|
||||
|
||||
*uint_ptr = (uint32_t)arg_ulong;
|
||||
return 0;
|
||||
} /* str2uint(...) */
|
||||
|
||||
/* str2short - safely convert string to int16_t
|
||||
*
|
||||
* @str: source string to convert from
|
||||
* @shrt_ptr: pointer where to store result
|
||||
*
|
||||
* returns zero on success
|
||||
* returns (-1) if one of args is NULL, (-2) invalid input, (-3) for *flow
|
||||
*/
|
||||
int str2short(const char * str, int16_t * shrt_ptr)
|
||||
{
|
||||
int rc = (-3);
|
||||
int64_t arg_long = 0;
|
||||
if (!str || !shrt_ptr)
|
||||
return (-1);
|
||||
|
||||
if ( (rc = str2long(str, &arg_long)) != 0 ) {
|
||||
*shrt_ptr = 0;
|
||||
return rc;
|
||||
}
|
||||
|
||||
if (arg_long < INT16_MIN || arg_long > INT16_MAX)
|
||||
return (-3);
|
||||
|
||||
*shrt_ptr = (int16_t)arg_long;
|
||||
return 0;
|
||||
} /* str2short(...) */
|
||||
|
||||
/* str2ushort - safely convert string to uint16_t
|
||||
*
|
||||
* @str: source string to convert from
|
||||
* @ushrt_ptr: pointer where to store result
|
||||
*
|
||||
* returns zero on success
|
||||
* returns (-1) if one of args is NULL, (-2) invalid input, (-3) for *flow
|
||||
*/
|
||||
int str2ushort(const char * str, uint16_t * ushrt_ptr)
|
||||
{
|
||||
int rc = (-3);
|
||||
uint64_t arg_ulong = 0;
|
||||
if (!str || !ushrt_ptr)
|
||||
return (-1);
|
||||
|
||||
if ( (rc = str2ulong(str, &arg_ulong)) != 0 ) {
|
||||
*ushrt_ptr = 0;
|
||||
return rc;
|
||||
}
|
||||
|
||||
if (arg_ulong > UINT16_MAX)
|
||||
return (-3);
|
||||
|
||||
*ushrt_ptr = (uint16_t)arg_ulong;
|
||||
return 0;
|
||||
} /* str2ushort(...) */
|
||||
|
||||
/* str2char - safely convert string to int8
|
||||
*
|
||||
* @str: source string to convert from
|
||||
* @chr_ptr: pointer where to store result
|
||||
*
|
||||
* returns zero on success
|
||||
* returns (-1) if one of args is NULL, (-2) or (-3) if conversion fails
|
||||
*/
|
||||
int str2char(const char *str, int8_t * chr_ptr)
|
||||
{
|
||||
int rc = (-3);
|
||||
int64_t arg_long = 0;
|
||||
if (!str || !chr_ptr) {
|
||||
return (-1);
|
||||
}
|
||||
if ((rc = str2long(str, &arg_long)) != 0) {
|
||||
*chr_ptr = 0;
|
||||
return rc;
|
||||
}
|
||||
if (arg_long < INT8_MIN || arg_long > INT8_MAX) {
|
||||
return (-3);
|
||||
}
|
||||
return 0;
|
||||
} /* str2char(...) */
|
||||
|
||||
/* str2uchar - safely convert string to uint8
|
||||
*
|
||||
* @str: source string to convert from
|
||||
* @uchr_ptr: pointer where to store result
|
||||
*
|
||||
* returns zero on success
|
||||
* returns (-1) if one of args is NULL, (-2) or (-3) if conversion fails
|
||||
*/
|
||||
int str2uchar(const char * str, uint8_t * uchr_ptr)
|
||||
{
|
||||
int rc = (-3);
|
||||
uint64_t arg_ulong = 0;
|
||||
if (!str || !uchr_ptr)
|
||||
return (-1);
|
||||
|
||||
if ( (rc = str2ulong(str, &arg_ulong)) != 0 ) {
|
||||
*uchr_ptr = 0;
|
||||
return rc;
|
||||
}
|
||||
|
||||
if (arg_ulong > UINT8_MAX)
|
||||
return (-3);
|
||||
|
||||
*uchr_ptr = (uint8_t)arg_ulong;
|
||||
return 0;
|
||||
} /* str2uchar(...) */
|
||||
|
||||
uint16_t str2val(const char *str, const struct valstr *vs)
|
||||
{
|
||||
int i;
|
||||
@ -617,6 +383,10 @@ ipmi_start_daemon(struct ipmi_intf *intf)
|
||||
sigset_t sighup;
|
||||
#endif
|
||||
|
||||
/* if we are started from init no need to become daemon */
|
||||
if (getppid() == 1)
|
||||
return;
|
||||
|
||||
#ifdef SIGHUP
|
||||
sigemptyset(&sighup);
|
||||
sigaddset(&sighup, SIGHUP);
|
||||
@ -640,7 +410,7 @@ ipmi_start_daemon(struct ipmi_intf *intf)
|
||||
pid = (pid_t) fork();
|
||||
if (pid < 0 || pid > 0)
|
||||
exit(0);
|
||||
|
||||
|
||||
#if defined(SIGTSTP) && defined(TIOCNOTTY)
|
||||
if (setpgid(0, getpid()) == -1)
|
||||
exit(1);
|
||||
@ -664,126 +434,7 @@ ipmi_start_daemon(struct ipmi_intf *intf)
|
||||
close(fd);
|
||||
}
|
||||
|
||||
fd = open("/dev/null", O_RDWR);
|
||||
assert(0 == fd);
|
||||
dup(fd);
|
||||
dup(fd);
|
||||
}
|
||||
|
||||
/* is_fru_id - wrapper for str-2-int FRU ID conversion. Message is printed
|
||||
* on error.
|
||||
* FRU ID range: <0..255>
|
||||
*
|
||||
* @argv_ptr: source string to convert from; usually argv
|
||||
* @fru_id_ptr: pointer where to store result
|
||||
*
|
||||
* returns zero on success
|
||||
* returns (-1) on error and message is printed on STDERR
|
||||
*/
|
||||
int
|
||||
is_fru_id(const char *argv_ptr, uint8_t *fru_id_ptr)
|
||||
{
|
||||
if (!argv_ptr || !fru_id_ptr) {
|
||||
lprintf(LOG_ERR, "is_fru_id(): invalid argument(s).");
|
||||
return (-1);
|
||||
}
|
||||
|
||||
if (str2uchar(argv_ptr, fru_id_ptr) == 0) {
|
||||
return 0;
|
||||
}
|
||||
lprintf(LOG_ERR, "FRU ID '%s' is either invalid or out of range.",
|
||||
argv_ptr);
|
||||
return (-1);
|
||||
} /* is_fru_id(...) */
|
||||
|
||||
/* is_ipmi_channel_num - wrapper for str-2-int Channel conversion. Message is
|
||||
* printed on error.
|
||||
*
|
||||
* 6.3 Channel Numbers, p. 45, IPMIv2 spec.
|
||||
* Valid channel numbers are: <0..7>, <E-F>
|
||||
* Reserved channel numbers: <8-D>
|
||||
*
|
||||
* @argv_ptr: source string to convert from; usually argv
|
||||
* @channel_ptr: pointer where to store result
|
||||
*
|
||||
* returns zero on success
|
||||
* returns (-1) on error and message is printed on STDERR
|
||||
*/
|
||||
int
|
||||
is_ipmi_channel_num(const char *argv_ptr, uint8_t *channel_ptr)
|
||||
{
|
||||
if (!argv_ptr || !channel_ptr) {
|
||||
lprintf(LOG_ERR,
|
||||
"is_ipmi_channel_num(): invalid argument(s).");
|
||||
return (-1);
|
||||
}
|
||||
if ((str2uchar(argv_ptr, channel_ptr) == 0)
|
||||
&& ((*channel_ptr >= 0x0 && *channel_ptr <= 0x7)
|
||||
|| (*channel_ptr >= 0xE && *channel_ptr <= 0xF))) {
|
||||
return 0;
|
||||
}
|
||||
lprintf(LOG_ERR,
|
||||
"Given Channel number '%s' is either invalid or out of range.",
|
||||
argv_ptr);
|
||||
lprintf(LOG_ERR, "Channel number must be from ranges: <0..7>, <0xE..0xF>");
|
||||
return (-1);
|
||||
}
|
||||
|
||||
/* is_ipmi_user_id() - wrapper for str-2-uint IPMI UID conversion. Message is
|
||||
* printed on error.
|
||||
*
|
||||
* @argv_ptr: source string to convert from; usually argv
|
||||
* @ipmi_uid_ptr: pointer where to store result
|
||||
*
|
||||
* returns zero on success
|
||||
* returns (-1) on error and message is printed on STDERR
|
||||
*/
|
||||
int
|
||||
is_ipmi_user_id(const char *argv_ptr, uint8_t *ipmi_uid_ptr)
|
||||
{
|
||||
if (!argv_ptr || !ipmi_uid_ptr) {
|
||||
lprintf(LOG_ERR,
|
||||
"is_ipmi_user_id(): invalid argument(s).");
|
||||
return (-1);
|
||||
}
|
||||
if ((str2uchar(argv_ptr, ipmi_uid_ptr) == 0)
|
||||
&& *ipmi_uid_ptr >= IPMI_UID_MIN
|
||||
&& *ipmi_uid_ptr <= IPMI_UID_MAX) {
|
||||
return 0;
|
||||
}
|
||||
lprintf(LOG_ERR,
|
||||
"Given User ID '%s' is either invalid or out of range.",
|
||||
argv_ptr);
|
||||
lprintf(LOG_ERR, "User ID is limited to range <%i..%i>.",
|
||||
IPMI_UID_MIN, IPMI_UID_MAX);
|
||||
return (-1);
|
||||
}
|
||||
|
||||
uint16_t
|
||||
ipmi_get_oem_id(struct ipmi_intf *intf)
|
||||
{
|
||||
/* Execute a Get Board ID command to determine the board */
|
||||
struct ipmi_rs *rsp;
|
||||
struct ipmi_rq req;
|
||||
uint16_t oem_id;
|
||||
|
||||
memset(&req, 0, sizeof(req));
|
||||
req.msg.netfn = IPMI_NETFN_TSOL;
|
||||
req.msg.cmd = 0x21;
|
||||
req.msg.data_len = 0;
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (rsp == NULL) {
|
||||
lprintf(LOG_ERR, "Get Board ID command failed");
|
||||
return 0;
|
||||
}
|
||||
if (rsp->ccode > 0) {
|
||||
lprintf(LOG_ERR, "Get Board ID command failed: %#x %s",
|
||||
rsp->ccode, val2str(rsp->ccode, completion_code_vals));
|
||||
return 0;
|
||||
}
|
||||
oem_id = rsp->data[0] | (rsp->data[1] << 8);
|
||||
lprintf(LOG_DEBUG,"Board ID: %x", oem_id);
|
||||
|
||||
return oem_id;
|
||||
open("/dev/null", O_RDWR);
|
||||
dup(0);
|
||||
dup(0);
|
||||
}
|
@ -171,7 +171,7 @@ ipmi_get_channel_auth_cap(struct ipmi_intf * intf,
|
||||
auth_cap.oem_aux_data);
|
||||
}
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@ -438,7 +438,7 @@ ipmi_get_user_access(struct ipmi_intf * intf, uint8_t channel, uint8_t userid)
|
||||
static int
|
||||
ipmi_set_user_access(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
{
|
||||
uint8_t channel, privilege_limit, userid;
|
||||
uint8_t channel, userid;
|
||||
struct ipmi_rs * rsp;
|
||||
struct ipmi_rq req;
|
||||
uint8_t rqdata[2];
|
||||
@ -446,19 +446,13 @@ ipmi_set_user_access(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
struct set_user_access_data set_access;
|
||||
int i;
|
||||
|
||||
if ((argc < 3) || (strncmp(argv[0], "help", 4) == 0)) {
|
||||
if ((argc < 3) || (strncmp(argv[0], "help", 4) == 0)) {
|
||||
printf_channel_usage();
|
||||
return 0;
|
||||
}
|
||||
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);
|
||||
}
|
||||
channel = (uint8_t)strtol(argv[0], NULL, 0);
|
||||
userid = (uint8_t)strtol(argv[1], NULL, 0);
|
||||
|
||||
memset(&req, 0, sizeof(req));
|
||||
req.msg.netfn = IPMI_NETFN_APP;
|
||||
@ -506,11 +500,7 @@ ipmi_set_user_access(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
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;
|
||||
set_access.privilege_limit = strtol (argv[i]+10, NULL, 0);
|
||||
}
|
||||
else {
|
||||
printf ("Invalid option: %s\n", argv [i]);
|
||||
@ -603,9 +593,9 @@ ipmi_get_channel_cipher_suites(struct ipmi_intf * intf,
|
||||
if (rsp->data_len >= 1)
|
||||
channel = rsp->data[0];
|
||||
|
||||
while ((rsp->data_len > 1) && (rsp->data_len == 17) && (list_index < 0x3F))
|
||||
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");
|
||||
@ -630,15 +620,15 @@ ipmi_get_channel_cipher_suites(struct ipmi_intf * intf,
|
||||
}
|
||||
}
|
||||
|
||||
/* 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;
|
||||
/* 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;
|
||||
}
|
||||
|
||||
//
|
||||
@ -762,7 +752,7 @@ ipmi_get_channel_medium(struct ipmi_intf * intf, uint8_t channel)
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (rsp == NULL) {
|
||||
lprintf(LOG_ERR, "Get Channel Info command failed");
|
||||
return 0;
|
||||
return -1;
|
||||
}
|
||||
if (rsp->ccode > 0) {
|
||||
if (rsp->ccode == 0xcc)
|
||||
@ -809,7 +799,6 @@ 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))
|
||||
{
|
||||
@ -817,38 +806,22 @@ ipmi_channel_main(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
}
|
||||
else if (strncmp(argv[0], "authcap", 7) == 0)
|
||||
{
|
||||
if (argc != 3) {
|
||||
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
|
||||
retval = ipmi_get_channel_auth_cap(intf,
|
||||
(uint8_t)strtol(argv[1], NULL, 0),
|
||||
(uint8_t)strtol(argv[2], NULL, 0));
|
||||
}
|
||||
else if (strncmp(argv[0], "getaccess", 10) == 0)
|
||||
{
|
||||
if ((argc < 2) || (argc > 3))
|
||||
printf_channel_usage();
|
||||
else {
|
||||
uint8_t ch = 0;
|
||||
uint8_t ch = (uint8_t)strtol(argv[1], NULL, 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);
|
||||
}
|
||||
}
|
||||
if (argc == 3)
|
||||
id = (uint8_t)strtol(argv[2], NULL, 0);
|
||||
retval = ipmi_get_user_access(intf, ch, id);
|
||||
}
|
||||
}
|
||||
@ -862,12 +835,8 @@ ipmi_channel_main(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
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);
|
||||
}
|
||||
}
|
||||
if (argc == 2)
|
||||
ch = (uint8_t)strtol(argv[1], NULL, 0);
|
||||
retval = ipmi_get_channel_info(intf, ch);
|
||||
}
|
||||
}
|
||||
@ -881,12 +850,8 @@ ipmi_channel_main(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
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);
|
||||
}
|
||||
}
|
||||
if (argc == 3)
|
||||
ch = (uint8_t)strtol(argv[2], NULL, 0);
|
||||
retval = ipmi_get_channel_cipher_suites(intf,
|
||||
argv[1], // ipmi | sol
|
||||
ch);
|
@ -33,9 +33,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
||||
#include <ipmitool/bswap.h>
|
||||
#include <ipmitool/helper.h>
|
||||
#include <ipmitool/ipmi.h>
|
||||
#include <ipmitool/log.h>
|
||||
@ -63,7 +61,7 @@ ipmi_chassis_power_status(struct ipmi_intf * intf)
|
||||
}
|
||||
if (rsp->ccode > 0) {
|
||||
lprintf(LOG_ERR, "Get Chassis Power Status failed: %s",
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -98,18 +96,18 @@ ipmi_chassis_power_control(struct ipmi_intf * intf, uint8_t ctl)
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (rsp == NULL) {
|
||||
lprintf(LOG_ERR, "Unable to set Chassis Power Control to %s",
|
||||
val2str(ctl, ipmi_chassis_power_control_vals));
|
||||
val2str(ctl, ipmi_chassis_power_control_vals));
|
||||
return -1;
|
||||
}
|
||||
if (rsp->ccode > 0) {
|
||||
lprintf(LOG_ERR, "Set Chassis Power Control to %s failed: %s",
|
||||
val2str(ctl, ipmi_chassis_power_control_vals),
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
val2str(ctl, ipmi_chassis_power_control_vals),
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
return -1;
|
||||
}
|
||||
|
||||
printf("Chassis Power Control: %s\n",
|
||||
val2str(ctl, ipmi_chassis_power_control_vals));
|
||||
val2str(ctl, ipmi_chassis_power_control_vals));
|
||||
|
||||
#if 0 /* this can cause sessions to hang around after power commands */
|
||||
/* sessions often get lost when changing chassis power */
|
||||
@ -124,12 +122,11 @@ ipmi_chassis_identify(struct ipmi_intf * intf, char * arg)
|
||||
{
|
||||
struct ipmi_rq req;
|
||||
struct ipmi_rs * rsp;
|
||||
int rc = (-3);
|
||||
|
||||
struct {
|
||||
uint8_t interval;
|
||||
uint8_t force_on;
|
||||
} identify_data = { .interval = 0, .force_on = 0 };
|
||||
} identify_data;
|
||||
|
||||
memset(&req, 0, sizeof(req));
|
||||
req.msg.netfn = IPMI_NETFN_CHASSIS;
|
||||
@ -137,23 +134,18 @@ ipmi_chassis_identify(struct ipmi_intf * intf, char * arg)
|
||||
|
||||
if (arg != NULL) {
|
||||
if (strncmp(arg, "force", 5) == 0) {
|
||||
identify_data.interval = 0;
|
||||
identify_data.force_on = 1;
|
||||
} else {
|
||||
if ( (rc = str2uchar(arg, &identify_data.interval)) != 0) {
|
||||
if (rc == (-2)) {
|
||||
lprintf(LOG_ERR, "Invalid interval given.");
|
||||
} else {
|
||||
lprintf(LOG_ERR, "Given interval is too big.");
|
||||
}
|
||||
return (-1);
|
||||
}
|
||||
identify_data.interval = (uint8_t)atoi(arg);
|
||||
identify_data.force_on = 0;
|
||||
}
|
||||
req.msg.data = (uint8_t *)&identify_data;
|
||||
/* The Force Identify On byte is optional and not
|
||||
* supported by all devices-- if force is not specified,
|
||||
* we pass only one data byte; if specified, we pass two
|
||||
* data bytes and check for an error completion code
|
||||
*/
|
||||
*/
|
||||
req.msg.data_len = (identify_data.force_on) ? 2 : 1;
|
||||
}
|
||||
|
||||
@ -164,7 +156,7 @@ ipmi_chassis_identify(struct ipmi_intf * intf, char * arg)
|
||||
}
|
||||
if (rsp->ccode > 0) {
|
||||
lprintf(LOG_ERR, "Set Chassis Identify failed: %s",
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
if (identify_data.force_on != 0) {
|
||||
/* Intel SE7501WV2 F/W 1.2 returns CC 0xC7, but
|
||||
* the IPMI v1.5 spec does not standardize a CC
|
||||
@ -196,10 +188,7 @@ ipmi_chassis_poh(struct ipmi_intf * intf)
|
||||
{
|
||||
struct ipmi_rs * rsp;
|
||||
struct ipmi_rq req;
|
||||
uint8_t mins_per_count;
|
||||
uint32_t count;
|
||||
float minutes;
|
||||
uint32_t days, hours;
|
||||
|
||||
memset(&req, 0, sizeof(req));
|
||||
req.msg.netfn = IPMI_NETFN_CHASSIS;
|
||||
@ -212,28 +201,14 @@ ipmi_chassis_poh(struct ipmi_intf * intf)
|
||||
}
|
||||
if (rsp->ccode > 0) {
|
||||
lprintf(LOG_ERR, "Get Chassis Power-On-Hours failed: %s",
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
return -1;
|
||||
}
|
||||
|
||||
mins_per_count = rsp->data[0];
|
||||
memcpy(&count, rsp->data+1, 4);
|
||||
#if WORDS_BIGENDIAN
|
||||
count = BSWAP_32(count);
|
||||
#endif
|
||||
|
||||
minutes = (float)count * mins_per_count;
|
||||
days = minutes / 1440;
|
||||
minutes -= (float)days * 1440;
|
||||
hours = minutes / 60;
|
||||
minutes -= hours * 60;
|
||||
|
||||
if (mins_per_count < 60) {
|
||||
printf("POH Counter : %i days, %i hours, %li minutes\n",
|
||||
days, hours, (long)minutes);
|
||||
} else {
|
||||
printf("POH Counter : %i days, %i hours\n", days, hours);
|
||||
}
|
||||
printf("POH Counter : %li hours total (%li days, %li hours)\n",
|
||||
(long)count, (long)(count / 24), (long)(count % 24));
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -255,7 +230,7 @@ ipmi_chassis_restart_cause(struct ipmi_intf * intf)
|
||||
}
|
||||
if (rsp->ccode > 0) {
|
||||
lprintf(LOG_ERR, "Get Chassis Restart Cause failed: %s",
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -299,7 +274,7 @@ ipmi_chassis_restart_cause(struct ipmi_intf * intf)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
ipmi_chassis_status(struct ipmi_intf * intf)
|
||||
{
|
||||
struct ipmi_rs * rsp;
|
||||
@ -316,7 +291,7 @@ ipmi_chassis_status(struct ipmi_intf * intf)
|
||||
}
|
||||
if (rsp->ccode > 0) {
|
||||
lprintf(LOG_ERR, "Error sending Chassis Status command: %s",
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -362,7 +337,7 @@ ipmi_chassis_status(struct ipmi_intf * intf)
|
||||
printf("Drive Fault : %s\n", (rsp->data[2] & 0x4) ? "true" : "false");
|
||||
printf("Cooling/Fan Fault : %s\n", (rsp->data[2] & 0x8) ? "true" : "false");
|
||||
|
||||
if (rsp->data_len > 3) {
|
||||
if (rsp->data_len > 3) {
|
||||
/* optional byte 4 */
|
||||
if (rsp->data[3] == 0) {
|
||||
printf("Front Panel Control : none\n");
|
||||
@ -371,12 +346,12 @@ ipmi_chassis_status(struct ipmi_intf * intf)
|
||||
printf("Diag Button Disable : %s\n", (rsp->data[3] & 0x40) ? "allowed" : "not allowed");
|
||||
printf("Reset Button Disable : %s\n", (rsp->data[3] & 0x20) ? "allowed" : "not allowed");
|
||||
printf("Power Button Disable : %s\n", (rsp->data[3] & 0x10) ? "allowed" : "not allowed");
|
||||
printf("Sleep Button Disabled: %s\n", (rsp->data[3] & 0x08) ? "true" : "false");
|
||||
printf("Diag Button Disabled : %s\n", (rsp->data[3] & 0x04) ? "true" : "false");
|
||||
printf("Reset Button Disabled: %s\n", (rsp->data[3] & 0x02) ? "true" : "false");
|
||||
printf("Power Button Disabled: %s\n", (rsp->data[3] & 0x01) ? "true" : "false");
|
||||
printf("Sleep Button Disabled: %s\n", (rsp->data[3] & 0x80) ? "true" : "false");
|
||||
printf("Diag Button Disabled : %s\n", (rsp->data[3] & 0x40) ? "true" : "false");
|
||||
printf("Reset Button Disabled: %s\n", (rsp->data[3] & 0x20) ? "true" : "false");
|
||||
printf("Power Button Disabled: %s\n", (rsp->data[3] & 0x10) ? "true" : "false");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -399,7 +374,7 @@ ipmi_chassis_selftest(struct ipmi_intf * intf)
|
||||
}
|
||||
if (rsp->ccode > 0) {
|
||||
lprintf(LOG_ERR, "Error sending Get Self Test command: %s",
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -431,7 +406,7 @@ ipmi_chassis_selftest(struct ipmi_intf * intf)
|
||||
for (i=0; i<8; i++) {
|
||||
if (rsp->data[1] & (1<<i)) {
|
||||
printf(" [%s]\n",
|
||||
val2str(i, broken_dev_vals));
|
||||
val2str(i, broken_dev_vals));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -443,7 +418,7 @@ ipmi_chassis_selftest(struct ipmi_intf * intf)
|
||||
|
||||
default:
|
||||
printf("Device-specific failure %02xh:%02xh\n",
|
||||
rsp->data[0], rsp->data[1]);
|
||||
rsp->data[0], rsp->data[1]);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -475,7 +450,7 @@ ipmi_chassis_set_bootparam(struct ipmi_intf * intf, uint8_t param, uint8_t * dat
|
||||
if (rsp->ccode > 0) {
|
||||
if (param != 0) {
|
||||
lprintf(LOG_ERR, "Set Chassis Boot Parameter %d failed: %s",
|
||||
param, val2str(rsp->ccode, completion_code_vals));
|
||||
param, val2str(rsp->ccode, completion_code_vals));
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
@ -490,20 +465,13 @@ ipmi_chassis_get_bootparam(struct ipmi_intf * intf, char * arg)
|
||||
struct ipmi_rs * rsp;
|
||||
struct ipmi_rq req;
|
||||
uint8_t msg_data[3];
|
||||
uint8_t param_id = 0;
|
||||
|
||||
if (arg == NULL)
|
||||
return -1;
|
||||
|
||||
if (str2uchar(arg, ¶m_id) != 0) {
|
||||
lprintf(LOG_ERR, "Invalid parameter '%s' given instead of bootparam.",
|
||||
arg);
|
||||
return (-1);
|
||||
}
|
||||
|
||||
memset(msg_data, 0, 3);
|
||||
|
||||
msg_data[0] = param_id & 0x7f;
|
||||
msg_data[0] = (uint8_t)atoi(arg) & 0x7f;
|
||||
msg_data[1] = 0;
|
||||
msg_data[2] = 0;
|
||||
|
||||
@ -520,427 +488,21 @@ ipmi_chassis_get_bootparam(struct ipmi_intf * intf, char * arg)
|
||||
}
|
||||
if (rsp->ccode > 0) {
|
||||
lprintf(LOG_ERR, "Get Chassis Boot Parameter %s failed: %s",
|
||||
arg, val2str(rsp->ccode, completion_code_vals));
|
||||
arg, val2str(rsp->ccode, completion_code_vals));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (verbose > 2)
|
||||
printbuf(rsp->data, rsp->data_len, "Boot Option");
|
||||
|
||||
param_id = 0;
|
||||
param_id = (rsp->data[1] & 0x7f);
|
||||
|
||||
printf("Boot parameter version: %d\n", rsp->data[0]);
|
||||
printf("Boot parameter %d is %s\n", rsp->data[1] & 0x7f,
|
||||
(rsp->data[1] & 0x80) ? "invalid/locked" : "valid/unlocked");
|
||||
(rsp->data[1] & 0x80) ? "invalid/locked" : "valid/unlocked");
|
||||
printf("Boot parameter data: %s\n", buf2str(rsp->data+2, rsp->data_len - 2));
|
||||
|
||||
switch(param_id)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
printf(" Set In Progress : ");
|
||||
switch((rsp->data[2]) &0x03)
|
||||
{
|
||||
case 0: printf("set complete\n"); break;
|
||||
case 1: printf("set in progress\n"); break;
|
||||
case 2: printf("commit write\n"); break;
|
||||
default: printf("error, reserved bit\n"); break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
printf(" Service Partition Selector : ");
|
||||
if((rsp->data[2]) == 0)
|
||||
{
|
||||
printf("unspecified\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("%d\n",(rsp->data[2]));
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
printf( " Service Partition Scan :\n");
|
||||
if((rsp->data[2]&0x03) != 0)
|
||||
{
|
||||
if((rsp->data[2]&0x01) == 0x01)
|
||||
printf(" - Request BIOS to scan\n");
|
||||
if((rsp->data[2]&0x02) == 0x02)
|
||||
printf(" - Service Partition Discovered\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
printf(" No flag set\n");
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
{
|
||||
printf( " BMC boot flag valid bit clearing :\n");
|
||||
if((rsp->data[2]&0x1f) != 0)
|
||||
{
|
||||
if((rsp->data[2]&0x10) == 0x10)
|
||||
printf(" - Don't clear valid bit on reset/power cycle cause by PEF\n");
|
||||
if((rsp->data[2]&0x08) == 0x08)
|
||||
printf(" - Don't automatically clear boot flag valid bit on timeout\n");
|
||||
if((rsp->data[2]&0x04) == 0x04)
|
||||
printf(" - Don't clear valid bit on reset/power cycle cause by watchdog\n");
|
||||
if((rsp->data[2]&0x02) == 0x02)
|
||||
printf(" - Don't clear valid bit on push button reset // soft reset\n");
|
||||
if((rsp->data[2]&0x01) == 0x01)
|
||||
printf(" - Don't clear valid bit on power up via power push button or wake event\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
printf(" No flag set\n");
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
{
|
||||
printf( " Boot Info Acknowledge :\n");
|
||||
if((rsp->data[3]&0x1f) != 0)
|
||||
{
|
||||
if((rsp->data[3]&0x10) == 0x10)
|
||||
printf(" - OEM has handled boot info\n");
|
||||
if((rsp->data[3]&0x08) == 0x08)
|
||||
printf(" - SMS has handled boot info\n");
|
||||
if((rsp->data[3]&0x04) == 0x04)
|
||||
printf(" - OS // service partition has handled boot info\n");
|
||||
if((rsp->data[3]&0x02) == 0x02)
|
||||
printf(" - OS Loader has handled boot info\n");
|
||||
if((rsp->data[3]&0x01) == 0x01)
|
||||
printf(" - BIOS/POST has handled boot info\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
printf(" No flag set\n");
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
{
|
||||
printf( " Boot Flags :\n");
|
||||
|
||||
if((rsp->data[2]&0x80) == 0x80)
|
||||
printf(" - Boot Flag Valid\n");
|
||||
else
|
||||
printf(" - Boot Flag Invalid\n");
|
||||
|
||||
if((rsp->data[2]&0x40) == 0x40)
|
||||
printf(" - Options apply to all future boots\n");
|
||||
else
|
||||
printf(" - Options apply to only next boot\n");
|
||||
|
||||
if((rsp->data[2]&0x20) == 0x20)
|
||||
printf(" - BIOS EFI boot \n");
|
||||
else
|
||||
printf(" - BIOS PC Compatible (legacy) boot \n");
|
||||
|
||||
if((rsp->data[3]&0x80) == 0x80)
|
||||
printf(" - CMOS Clear\n");
|
||||
if((rsp->data[3]&0x40) == 0x40)
|
||||
printf(" - Lock Keyboard\n");
|
||||
printf(" - Boot Device Selector : ");
|
||||
switch( ((rsp->data[3]>>2)&0x0f))
|
||||
{
|
||||
case 0: printf("No override\n"); break;
|
||||
case 1: printf("Force PXE\n"); break;
|
||||
case 2: printf("Force Boot from default Hard-Drive\n"); break;
|
||||
case 3: printf("Force Boot from default Hard-Drive, request Safe-Mode\n"); break;
|
||||
case 4: printf("Force Boot from Diagnostic Partition\n"); break;
|
||||
case 5: printf("Force Boot from CD/DVD\n"); break;
|
||||
case 6: printf("Force Boot into BIOS Setup\n"); break;
|
||||
case 15: printf("Force Boot from Floppy/primary removable media\n"); break;
|
||||
default: printf("Flag error\n"); break;
|
||||
}
|
||||
if((rsp->data[3]&0x02) == 0x02)
|
||||
printf(" - Screen blank\n");
|
||||
if((rsp->data[3]&0x01) == 0x01)
|
||||
printf(" - Lock out Reset buttons\n");
|
||||
|
||||
if((rsp->data[4]&0x80) == 0x80)
|
||||
printf(" - Lock out (power off/sleep request) vi Power Button\n");
|
||||
printf(" - Console Redirection control : ");
|
||||
switch( ((rsp->data[4]>>5)&0x03))
|
||||
{
|
||||
case 0: printf("System Default\n"); break;
|
||||
case 1: printf("Request Quiet Display\n"); break;
|
||||
case 2: printf("Request Verbose Display\n"); break;
|
||||
default: printf("Flag error\n"); break;
|
||||
}
|
||||
if((rsp->data[4]&0x10) == 0x10)
|
||||
printf(" - Force progress event traps\n");
|
||||
if((rsp->data[4]&0x08) == 0x08)
|
||||
printf(" - User password bypass\n");
|
||||
if((rsp->data[4]&0x04) == 0x04)
|
||||
printf(" - Lock Out Sleep Button\n");
|
||||
if((rsp->data[4]&0x02) == 0x02)
|
||||
printf(" - Lock Out Sleep Button\n");
|
||||
printf(" - BIOS verbosity : ");
|
||||
switch( ((rsp->data[4]>>0)&0x03))
|
||||
{
|
||||
case 0: printf("Console redirection occurs per BIOS configuration setting (default)\n"); break;
|
||||
case 1: printf("Suppress (skip) console redirection if enabled\n"); break;
|
||||
case 2: printf("Request console redirection be enabled\n"); break;
|
||||
default: printf("Flag error\n"); break;
|
||||
}
|
||||
|
||||
if((rsp->data[5]&0x08) == 0x08)
|
||||
printf(" - BIOS Shared Mode Override\n");
|
||||
printf(" - BIOS Mux Control Override : ");
|
||||
switch( ((rsp->data[5]>>0)&0x07))
|
||||
{
|
||||
case 0: printf("BIOS uses recommended setting of the mux at the end of POST\n"); break;
|
||||
case 1: printf("Requests BIOS to force mux to BMC at conclusion of POST/start of OS boot\n"); break;
|
||||
case 2: printf("Requests BIOS to force mux to system at conclusion of POST/start of OS boot\n"); break;
|
||||
default: printf("Flag error\n"); break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
{
|
||||
unsigned long session_id;
|
||||
unsigned long timestamp;
|
||||
char time_buf[40];
|
||||
time_t out_time;
|
||||
|
||||
session_id = ((unsigned long) rsp->data[3]);
|
||||
session_id |= (((unsigned long) rsp->data[4])<<8);
|
||||
session_id |= (((unsigned long) rsp->data[5])<<16);
|
||||
session_id |= (((unsigned long) rsp->data[6])<<24);
|
||||
|
||||
timestamp = ((unsigned long) rsp->data[7]);
|
||||
timestamp |= (((unsigned long) rsp->data[8])<<8);
|
||||
timestamp |= (((unsigned long) rsp->data[9])<<16);
|
||||
timestamp |= (((unsigned long) rsp->data[10])<<24);
|
||||
|
||||
memset(time_buf, 0, 40);
|
||||
strftime(
|
||||
time_buf,
|
||||
sizeof(time_buf),
|
||||
"%m/%d/%Y %H:%M:%S", localtime(&out_time)
|
||||
);
|
||||
|
||||
printf(" Boot Initiator Info :\n");
|
||||
printf(" Channel Number : %d\n", (rsp->data[2] & 0x0f));
|
||||
printf(" Session Id : %08lXh\n",session_id);
|
||||
if(timestamp != 0)
|
||||
{
|
||||
printf(" Timestamp : %08lXh, %s\n",timestamp,time_buf);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf(" Timestamp : %08lXh, undefined\n",timestamp);
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
{
|
||||
printf(" Selector : %d\n", rsp->data[2] );
|
||||
printf(" Block Data : %s\n", buf2str(rsp->data+3, rsp->data_len - 2));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
printf(" Undefined byte\n");
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
get_bootparam_options(char *optstring,
|
||||
unsigned char *set_flag, unsigned char *clr_flag)
|
||||
{
|
||||
char *token;
|
||||
char *saveptr = NULL;
|
||||
int optionError = 0;
|
||||
*set_flag = 0;
|
||||
*clr_flag = 0;
|
||||
static struct {
|
||||
char *name;
|
||||
unsigned char value;
|
||||
char *desc;
|
||||
} options[] = {
|
||||
{"PEF", 0x10,
|
||||
"Clear valid bit on reset/power cycle cause by PEF"},
|
||||
{"timeout", 0x08,
|
||||
"Automatically clear boot flag valid bit on timeout"},
|
||||
{"watchdog", 0x04,
|
||||
"Clear valid bit on reset/power cycle cause by watchdog"},
|
||||
{"reset", 0x02,
|
||||
"Clear valid bit on push button reset/soft reset"},
|
||||
{"power", 0x01,
|
||||
"Clear valid bit on power up via power push button or wake event"},
|
||||
|
||||
{NULL} /* End marker */
|
||||
}, *op;
|
||||
|
||||
if (strncmp(optstring, "options=", 8) != 0) {
|
||||
lprintf(LOG_ERR, "No options= keyword found \"%s\"", optstring);
|
||||
return -1;
|
||||
}
|
||||
token = strtok_r(optstring + 8, ",", &saveptr);
|
||||
while (token != NULL) {
|
||||
int setbit = 0;
|
||||
if (strcmp(token, "help") == 0) {
|
||||
optionError = 1;
|
||||
break;
|
||||
}
|
||||
if (strncmp(token, "no-", 3) == 0) {
|
||||
setbit = 1;
|
||||
token += 3;
|
||||
}
|
||||
for (op = options; op->name != NULL; ++op) {
|
||||
if (strncmp(token, op->name, strlen(op->name)) == 0) {
|
||||
if (setbit) {
|
||||
*set_flag |= op->value;
|
||||
} else {
|
||||
*clr_flag |= op->value;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (op->name == NULL) {
|
||||
/* Option not found */
|
||||
optionError = 1;
|
||||
if (setbit) {
|
||||
token -=3;
|
||||
}
|
||||
lprintf(LOG_ERR, "Invalid option: %s", token);
|
||||
}
|
||||
token = strtok_r(NULL, ",", &saveptr);
|
||||
}
|
||||
if (optionError) {
|
||||
lprintf(LOG_NOTICE, " Legal options are:");
|
||||
lprintf(LOG_NOTICE, " %-8s: print this message", "help");
|
||||
for (op = options; op->name != NULL; ++op) {
|
||||
lprintf(LOG_NOTICE, " %-8s: %s", op->name, op->desc);
|
||||
}
|
||||
lprintf(LOG_NOTICE, " Any Option may be prepended with no-"
|
||||
" to invert sense of operation\n");
|
||||
return (-1);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
static int
|
||||
ipmi_chassis_get_bootvalid(struct ipmi_intf * intf)
|
||||
{
|
||||
struct ipmi_rs * rsp;
|
||||
struct ipmi_rq req;
|
||||
uint8_t msg_data[3];
|
||||
uint8_t param_id = IPMI_CHASSIS_BOOTPARAM_FLAG_VALID;
|
||||
memset(msg_data, 0, 3);
|
||||
|
||||
msg_data[0] = param_id & 0x7f;
|
||||
msg_data[1] = 0;
|
||||
msg_data[2] = 0;
|
||||
|
||||
memset(&req, 0, sizeof(req));
|
||||
req.msg.netfn = IPMI_NETFN_CHASSIS;
|
||||
req.msg.cmd = 0x9;
|
||||
req.msg.data = msg_data;
|
||||
req.msg.data_len = 3;
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (rsp == NULL) {
|
||||
lprintf(LOG_ERR,
|
||||
"Error Getting Chassis Boot Parameter %d", param_id);
|
||||
return -1;
|
||||
}
|
||||
if (rsp->ccode > 0) {
|
||||
lprintf(LOG_ERR, "Get Chassis Boot Parameter %d failed: %s",
|
||||
param_id, val2str(rsp->ccode, completion_code_vals));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (verbose > 2)
|
||||
printbuf(rsp->data, rsp->data_len, "Boot Option");
|
||||
|
||||
return(rsp->data[2]);
|
||||
}
|
||||
|
||||
static int
|
||||
ipmi_chassis_set_bootvalid(struct ipmi_intf *intf, uint8_t set_flag, uint8_t clr_flag)
|
||||
{
|
||||
int bootvalid;
|
||||
uint8_t flags[5];
|
||||
int rc = 0;
|
||||
int use_progress = 1;
|
||||
uint8_t param_id = IPMI_CHASSIS_BOOTPARAM_FLAG_VALID;
|
||||
|
||||
if (use_progress) {
|
||||
/* set set-in-progress flag */
|
||||
memset(flags, 0, 5);
|
||||
flags[0] = 0x01;
|
||||
rc = ipmi_chassis_set_bootparam(intf,
|
||||
IPMI_CHASSIS_BOOTPARAM_SET_IN_PROGRESS, flags, 1);
|
||||
if (rc < 0)
|
||||
use_progress = 0;
|
||||
}
|
||||
|
||||
memset(flags, 0, 5);
|
||||
flags[0] = 0x01;
|
||||
flags[1] = 0x01;
|
||||
rc = ipmi_chassis_set_bootparam(intf, IPMI_CHASSIS_BOOTPARAM_INFO_ACK,
|
||||
flags, 2);
|
||||
|
||||
if (rc < 0) {
|
||||
if (use_progress) {
|
||||
/* set-in-progress = set-complete */
|
||||
memset(flags, 0, 5);
|
||||
ipmi_chassis_set_bootparam(intf,
|
||||
IPMI_CHASSIS_BOOTPARAM_SET_IN_PROGRESS,
|
||||
flags, 1);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
bootvalid = ipmi_chassis_get_bootvalid(intf);
|
||||
|
||||
if (bootvalid < 0) {
|
||||
if (use_progress) {
|
||||
/* set-in-progress = set-complete */
|
||||
memset(flags, 0, 5);
|
||||
ipmi_chassis_set_bootparam(intf,
|
||||
IPMI_CHASSIS_BOOTPARAM_SET_IN_PROGRESS,
|
||||
flags, 1);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
flags[0] = (bootvalid & ~clr_flag) | set_flag;
|
||||
|
||||
rc = ipmi_chassis_set_bootparam(intf, param_id, flags, 1);
|
||||
|
||||
if (rc == 0) {
|
||||
if (use_progress) {
|
||||
/* set-in-progress = commit-write */
|
||||
memset(flags, 0, 5);
|
||||
flags[0] = 0x02;
|
||||
ipmi_chassis_set_bootparam(intf,
|
||||
IPMI_CHASSIS_BOOTPARAM_SET_IN_PROGRESS,
|
||||
flags, 1);
|
||||
}
|
||||
}
|
||||
|
||||
if (use_progress) {
|
||||
/* set-in-progress = set-complete */
|
||||
memset(flags, 0, 5);
|
||||
ipmi_chassis_set_bootparam(intf,
|
||||
IPMI_CHASSIS_BOOTPARAM_SET_IN_PROGRESS,
|
||||
flags, 1);
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int
|
||||
ipmi_chassis_set_bootdev(struct ipmi_intf * intf, char * arg, uint8_t *iflags)
|
||||
{
|
||||
@ -953,7 +515,7 @@ ipmi_chassis_set_bootdev(struct ipmi_intf * intf, char * arg, uint8_t *iflags)
|
||||
memset(flags, 0, 5);
|
||||
flags[0] = 0x01;
|
||||
rc = ipmi_chassis_set_bootparam(intf,
|
||||
IPMI_CHASSIS_BOOTPARAM_SET_IN_PROGRESS, flags, 1);
|
||||
IPMI_CHASSIS_BOOTPARAM_SET_IN_PROGRESS, flags, 1);
|
||||
if (rc < 0)
|
||||
use_progress = 0;
|
||||
}
|
||||
@ -962,57 +524,57 @@ ipmi_chassis_set_bootdev(struct ipmi_intf * intf, char * arg, uint8_t *iflags)
|
||||
flags[0] = 0x01;
|
||||
flags[1] = 0x01;
|
||||
rc = ipmi_chassis_set_bootparam(intf, IPMI_CHASSIS_BOOTPARAM_INFO_ACK,
|
||||
flags, 2);
|
||||
flags, 2);
|
||||
|
||||
if (rc < 0) {
|
||||
if (use_progress) {
|
||||
/* set-in-progress = set-complete */
|
||||
memset(flags, 0, 5);
|
||||
ipmi_chassis_set_bootparam(intf,
|
||||
IPMI_CHASSIS_BOOTPARAM_SET_IN_PROGRESS,
|
||||
flags, 1);
|
||||
IPMI_CHASSIS_BOOTPARAM_SET_IN_PROGRESS,
|
||||
flags, 1);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (iflags == NULL)
|
||||
memset(flags, 0, 5);
|
||||
memset(flags, 0, 5);
|
||||
else
|
||||
memcpy(flags, iflags, sizeof (flags));
|
||||
memcpy(flags, iflags, sizeof (flags));
|
||||
|
||||
if (arg == NULL)
|
||||
flags[1] |= 0x00;
|
||||
flags[1] = 0x00;
|
||||
else if (strncmp(arg, "none", 4) == 0)
|
||||
flags[1] |= 0x00;
|
||||
flags[1] = 0x00;
|
||||
else if (strncmp(arg, "pxe", 3) == 0 ||
|
||||
strncmp(arg, "force_pxe", 9) == 0)
|
||||
flags[1] |= 0x04;
|
||||
strncmp(arg, "force_pxe", 9) == 0)
|
||||
flags[1] = 0x04;
|
||||
else if (strncmp(arg, "disk", 4) == 0 ||
|
||||
strncmp(arg, "force_disk", 10) == 0)
|
||||
flags[1] |= 0x08;
|
||||
strncmp(arg, "force_disk", 10) == 0)
|
||||
flags[1] = 0x08;
|
||||
else if (strncmp(arg, "safe", 4) == 0 ||
|
||||
strncmp(arg, "force_safe", 10) == 0)
|
||||
flags[1] |= 0x0c;
|
||||
strncmp(arg, "force_safe", 10) == 0)
|
||||
flags[1] = 0x0c;
|
||||
else if (strncmp(arg, "diag", 4) == 0 ||
|
||||
strncmp(arg, "force_diag", 10) == 0)
|
||||
flags[1] |= 0x10;
|
||||
strncmp(arg, "force_diag", 10) == 0)
|
||||
flags[1] = 0x10;
|
||||
else if (strncmp(arg, "cdrom", 5) == 0 ||
|
||||
strncmp(arg, "force_cdrom", 11) == 0)
|
||||
flags[1] |= 0x14;
|
||||
strncmp(arg, "force_cdrom", 11) == 0)
|
||||
flags[1] = 0x14;
|
||||
else if (strncmp(arg, "floppy", 6) == 0 ||
|
||||
strncmp(arg, "force_floppy", 12) == 0)
|
||||
flags[1] |= 0x3c;
|
||||
strncmp(arg, "force_floppy", 12) == 0)
|
||||
flags[1] = 0x3c;
|
||||
else if (strncmp(arg, "bios", 4) == 0 ||
|
||||
strncmp(arg, "force_bios", 10) == 0)
|
||||
flags[1] |= 0x18;
|
||||
strncmp(arg, "force_bios", 10) == 0)
|
||||
flags[1] = 0x18;
|
||||
else {
|
||||
lprintf(LOG_ERR, "Invalid argument: %s", arg);
|
||||
if (use_progress) {
|
||||
/* set-in-progress = set-complete */
|
||||
memset(flags, 0, 5);
|
||||
ipmi_chassis_set_bootparam(intf,
|
||||
IPMI_CHASSIS_BOOTPARAM_SET_IN_PROGRESS,
|
||||
flags, 1);
|
||||
IPMI_CHASSIS_BOOTPARAM_SET_IN_PROGRESS,
|
||||
flags, 1);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
@ -1021,15 +583,15 @@ ipmi_chassis_set_bootdev(struct ipmi_intf * intf, char * arg, uint8_t *iflags)
|
||||
flags[0] |= 0x80;
|
||||
|
||||
rc = ipmi_chassis_set_bootparam(intf, IPMI_CHASSIS_BOOTPARAM_BOOT_FLAGS,
|
||||
flags, 5);
|
||||
flags, 5);
|
||||
if (rc == 0) {
|
||||
if (use_progress) {
|
||||
/* set-in-progress = commit-write */
|
||||
memset(flags, 0, 5);
|
||||
flags[0] = 0x02;
|
||||
ipmi_chassis_set_bootparam(intf,
|
||||
IPMI_CHASSIS_BOOTPARAM_SET_IN_PROGRESS,
|
||||
flags, 1);
|
||||
IPMI_CHASSIS_BOOTPARAM_SET_IN_PROGRESS,
|
||||
flags, 1);
|
||||
}
|
||||
|
||||
printf("Set Boot Device to %s\n", arg);
|
||||
@ -1039,8 +601,8 @@ ipmi_chassis_set_bootdev(struct ipmi_intf * intf, char * arg, uint8_t *iflags)
|
||||
/* set-in-progress = set-complete */
|
||||
memset(flags, 0, 5);
|
||||
ipmi_chassis_set_bootparam(intf,
|
||||
IPMI_CHASSIS_BOOTPARAM_SET_IN_PROGRESS,
|
||||
flags, 1);
|
||||
IPMI_CHASSIS_BOOTPARAM_SET_IN_PROGRESS,
|
||||
flags, 1);
|
||||
}
|
||||
|
||||
return rc;
|
||||
@ -1065,7 +627,7 @@ ipmi_chassis_power_policy(struct ipmi_intf * intf, uint8_t policy)
|
||||
}
|
||||
if (rsp->ccode > 0) {
|
||||
lprintf(LOG_ERR, "Power Restore Policy command failed: %s",
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -1133,23 +695,6 @@ ipmi_power_main(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
return rc;
|
||||
}
|
||||
|
||||
void
|
||||
ipmi_chassis_set_bootflag_help()
|
||||
{
|
||||
unsigned char set_flag;
|
||||
unsigned char clr_flag;
|
||||
lprintf(LOG_NOTICE, "bootparam set bootflag <device> [options=...]");
|
||||
lprintf(LOG_NOTICE, " Legal devices are:");
|
||||
lprintf(LOG_NOTICE, " none : No override");
|
||||
lprintf(LOG_NOTICE, " force_pxe : Force PXE boot");
|
||||
lprintf(LOG_NOTICE, " force_disk : Force boot from default Hard-drive");
|
||||
lprintf(LOG_NOTICE, " force_safe : Force boot from default Hard-drive, request Safe Mode");
|
||||
lprintf(LOG_NOTICE, " force_diag : Force boot from Diagnostic Partition");
|
||||
lprintf(LOG_NOTICE, " force_cdrom : Force boot from CD/DVD");
|
||||
lprintf(LOG_NOTICE, " force_bios : Force boot into BIOS Setup");
|
||||
get_bootparam_options("options=help", &set_flag, &clr_flag);
|
||||
}
|
||||
|
||||
int
|
||||
ipmi_chassis_main(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
{
|
||||
@ -1240,27 +785,26 @@ ipmi_chassis_main(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
else if (strncmp(argv[0], "bootparam", 9) == 0) {
|
||||
if ((argc < 3) || (strncmp(argv[1], "help", 4) == 0)) {
|
||||
lprintf(LOG_NOTICE, "bootparam get <param #>");
|
||||
ipmi_chassis_set_bootflag_help();
|
||||
lprintf(LOG_NOTICE, "bootparam set bootflag <flag>");
|
||||
lprintf(LOG_NOTICE, " force_pxe : Force PXE boot");
|
||||
lprintf(LOG_NOTICE, " force_disk : Force boot from default Hard-drive");
|
||||
lprintf(LOG_NOTICE, " force_safe : Force boot from default Hard-drive, request Safe Mode");
|
||||
lprintf(LOG_NOTICE, " force_diag : Force boot from Diagnostic Partition");
|
||||
lprintf(LOG_NOTICE, " force_cdrom : Force boot from CD/DVD");
|
||||
lprintf(LOG_NOTICE, " force_bios : Force boot into BIOS Setup");
|
||||
}
|
||||
else {
|
||||
if (strncmp(argv[1], "get", 3) == 0) {
|
||||
rc = ipmi_chassis_get_bootparam(intf, argv[2]);
|
||||
}
|
||||
else if (strncmp(argv[1], "set", 3) == 0) {
|
||||
unsigned char set_flag=0;
|
||||
unsigned char clr_flag=0;
|
||||
if (strncmp(argv[2], "help", 4) == 0 ||
|
||||
argc < 4 || (argc >= 4 &&
|
||||
strncmp(argv[2], "bootflag", 8) != 0)) {
|
||||
ipmi_chassis_set_bootflag_help();
|
||||
if (argc < 4) {
|
||||
lprintf(LOG_NOTICE, "bootparam set <option> [value ...]");
|
||||
} else {
|
||||
if (argc == 5) {
|
||||
get_bootparam_options(argv[4], &set_flag, &clr_flag);
|
||||
}
|
||||
rc = ipmi_chassis_set_bootdev(intf, argv[3], NULL);
|
||||
if (argc == 5 && (set_flag != 0 || clr_flag != 0)) {
|
||||
rc = ipmi_chassis_set_bootvalid(intf, set_flag, clr_flag);
|
||||
}
|
||||
if (strncmp(argv[2], "bootflag", 8) == 0)
|
||||
rc = ipmi_chassis_set_bootdev(intf, argv[3], NULL);
|
||||
else
|
||||
lprintf(LOG_NOTICE, "bootparam set <option> [value ...]");
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -1285,8 +829,9 @@ ipmi_chassis_main(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
else if (strncmp(argv[2], "clear-cmos=", 11) == 0) {
|
||||
if (strncmp(argv[2]+11, "yes", 3) == 0) {
|
||||
uint8_t flags[5] = {0, (1<<7), 0, 0, 0};
|
||||
|
||||
rc = ipmi_chassis_set_bootdev(intf, argv[1], flags);
|
||||
} else
|
||||
} else
|
||||
rc = ipmi_chassis_set_bootdev(intf, argv[1], NULL);
|
||||
}
|
||||
else if (strncmp(argv[2], "options=", 8) == 0) {
|
||||
@ -1303,85 +848,90 @@ ipmi_chassis_main(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
} options[] = {
|
||||
/* data 1 */
|
||||
{"valid", 0, (1<<7), (1<<7),
|
||||
"Boot flags valid"},
|
||||
"Boot flags valid"},
|
||||
{"persistent", 0, (1<<6), (1<<6),
|
||||
"Changes are persistent for all future boots"},
|
||||
"Changes are persistent for all future boots"},
|
||||
{"efiboot", 0, (1<<5), (1<<5),
|
||||
"Extensible Firmware Interface Boot (EFI)"},
|
||||
"Extensible Firmware Interface Boot (EFI)"},
|
||||
|
||||
/* data 2 */
|
||||
{"clear-cmos", 1, (1<<7), (1<<7),
|
||||
"CMOS clear"},
|
||||
"CMOS clear"},
|
||||
{"lockkbd", 1, (1<<6), (1<<6),
|
||||
"Lock Keyboard"},
|
||||
"Lock Keyboard"},
|
||||
/* data2[5:2] is parsed elsewhere */
|
||||
{"screenblank", 1, (1<<1), (1<<1),
|
||||
"Screen Blank"},
|
||||
"Screen Blank"},
|
||||
{"lockoutreset", 1, (1<<0), (1<<0),
|
||||
"Lock out Resetbuttons"},
|
||||
"Lock out Resetbuttons"},
|
||||
|
||||
/* data 3 */
|
||||
{"lockout_power", 2, (1<<7), (1<<7),
|
||||
"Lock out (power off/sleep request) via Power Button"},
|
||||
"Lock out (power off/sleep request) via Power Button"},
|
||||
{"verbose=default", 2, (3<<5), (0<<5),
|
||||
"Request quiet BIOS display"},
|
||||
"Request quiet BIOS display"},
|
||||
{"verbose=no", 2, (3<<5), (1<<5),
|
||||
"Request quiet BIOS display"},
|
||||
"Request quiet BIOS display"},
|
||||
{"verbose=yes", 2, (3<<5), (2<<5),
|
||||
"Request verbose BIOS display"},
|
||||
"Request verbose BIOS display"},
|
||||
{"force_pet", 2, (1<<4), (1<<4),
|
||||
"Force progress event traps"},
|
||||
"Force progress event traps"},
|
||||
{"upw_bypass", 2, (1<<3), (1<<3),
|
||||
"User password bypass"},
|
||||
"User password bypass"},
|
||||
{"lockout_sleep", 2, (1<<2), (1<<2),
|
||||
"Log Out Sleep Button"},
|
||||
"Log Out Sleep Button"},
|
||||
{"cons_redirect=default", 2, (3<<0), (0<<0),
|
||||
"Console redirection occurs per BIOS configuration setting"},
|
||||
"Console redirection occurs per BIOS configuration setting"},
|
||||
{"cons_redirect=skip", 2, (3<<0), (1<<0),
|
||||
"Suppress (skip) console redirection if enabled"},
|
||||
"Suppress (skip) console redirection if enabled"},
|
||||
{"cons_redirect=enable", 2, (3<<0), (2<<0),
|
||||
"Suppress (skip) console redirection if enabled"},
|
||||
"Suppress (skip) console redirection if enabled"},
|
||||
|
||||
/* data 4 */
|
||||
/* data4[7:4] reserved */
|
||||
/* data4[3] BIOS Shared Mode Override, not implemented here */
|
||||
/* data4[2:0] BIOS Mux Control Override, not implemented here */
|
||||
|
||||
/* data5 reserved */
|
||||
|
||||
|
||||
{NULL} /* End marker */
|
||||
}, *op;
|
||||
}, *op;
|
||||
|
||||
memset(&flags[0], 0, sizeof(flags));
|
||||
token = strtok_r(argv[2] + 8, ",", &saveptr);
|
||||
while (token != NULL) {
|
||||
if (strcmp(token, "help") == 0) {
|
||||
optionError = 1;
|
||||
break;
|
||||
}
|
||||
for (op = options; op->name != NULL; ++op) {
|
||||
if (strcmp(token, op->name) == 0) {
|
||||
flags[op->i] &= op->mask;
|
||||
flags[op->i] |= op->value;
|
||||
memset(&flags[0], 0, sizeof(flags));
|
||||
token = strtok_r(argv[2] + 8, ",", &saveptr);
|
||||
while (token != NULL) {
|
||||
int i;
|
||||
|
||||
if (strcmp(token, "help") == 0) {
|
||||
optionError = 1;
|
||||
break;
|
||||
}
|
||||
for (op = options; op->name != NULL; ++op) {
|
||||
if (strcmp(token, op->name) == 0) {
|
||||
flags[op->i] &= op->mask;
|
||||
flags[op->i] |= op->value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (op->name == NULL) {
|
||||
/* Option not found */
|
||||
optionError = 1;
|
||||
lprintf(LOG_ERR, "Invalid option: %s", token);
|
||||
}
|
||||
token = strtok_r(NULL, ",", &saveptr);
|
||||
}
|
||||
if (op->name == NULL) {
|
||||
/* Option not found */
|
||||
optionError = 1;
|
||||
lprintf(LOG_ERR, "Invalid option: %s", token);
|
||||
if (optionError) {
|
||||
lprintf(LOG_NOTICE, "Legal options are:");
|
||||
lprintf(LOG_NOTICE, "\thelp:\tprint this message");
|
||||
for (op = options; op->name != NULL; ++op) {
|
||||
lprintf(LOG_NOTICE, "\t%s:\t%s", op->name, op->desc);
|
||||
}
|
||||
return (-1);
|
||||
}
|
||||
token = strtok_r(NULL, ",", &saveptr);
|
||||
rc = ipmi_chassis_set_bootdev(intf, argv[1], flags);
|
||||
}
|
||||
if (optionError) {
|
||||
lprintf(LOG_NOTICE, "Legal options settings are:");
|
||||
lprintf(LOG_NOTICE, "\thelp:\tprint this message");
|
||||
for (op = options; op->name != NULL; ++op) {
|
||||
lprintf(LOG_NOTICE, "\t%s:\t%s", op->name, op->desc);
|
||||
}
|
||||
return (-1);
|
||||
}
|
||||
rc = ipmi_chassis_set_bootdev(intf, argv[1], flags);
|
||||
}
|
||||
else
|
||||
rc = ipmi_chassis_set_bootdev(intf, argv[1], NULL);
|
||||
else
|
||||
rc = ipmi_chassis_set_bootdev(intf, argv[1], NULL);
|
||||
}
|
||||
}
|
||||
else {
|
@ -97,7 +97,7 @@ ipmi_send_platform_event(struct ipmi_intf * intf, struct platform_event_msg * em
|
||||
if (chmed == IPMI_CHANNEL_MEDIUM_SYSTEM) {
|
||||
/* system interface, need extra generator ID */
|
||||
req.msg.data_len = 8;
|
||||
rqdata[0] = 0x41; // As per Fig. 29-2 and Table 5-4
|
||||
rqdata[0] = 0x20;
|
||||
memcpy(rqdata+1, emsg, sizeof(struct platform_event_msg));
|
||||
}
|
||||
else {
|
||||
@ -227,8 +227,8 @@ ipmi_event_find_offset(uint8_t code,
|
||||
static void
|
||||
print_sensor_states(uint8_t sensor_type, uint8_t event_type)
|
||||
{
|
||||
ipmi_sdr_print_discrete_state_mini(
|
||||
"Sensor States: \n ", "\n ", sensor_type,
|
||||
printf("Sensor States: \n ");
|
||||
ipmi_sdr_print_discrete_state_mini("\n ", sensor_type,
|
||||
event_type, 0xff, 0xff);
|
||||
printf("\n");
|
||||
}
|
||||
@ -241,7 +241,6 @@ ipmi_event_fromsensor(struct ipmi_intf * intf, char * id, char * state, char * e
|
||||
struct sdr_record_list * sdr;
|
||||
struct platform_event_msg emsg;
|
||||
int off;
|
||||
uint8_t target, lun, channel;
|
||||
|
||||
if (id == NULL) {
|
||||
lprintf(LOG_ERR, "No sensor ID supplied");
|
||||
@ -273,15 +272,19 @@ ipmi_event_fromsensor(struct ipmi_intf * intf, char * id, char * state, char * e
|
||||
switch (sdr->type)
|
||||
{
|
||||
case SDR_RECORD_TYPE_FULL_SENSOR:
|
||||
|
||||
emsg.sensor_type = sdr->record.full->sensor.type;
|
||||
emsg.sensor_num = sdr->record.full->keys.sensor_num;
|
||||
emsg.event_type = sdr->record.full->event_type;
|
||||
break;
|
||||
|
||||
case SDR_RECORD_TYPE_COMPACT_SENSOR:
|
||||
|
||||
emsg.sensor_type = sdr->record.common->sensor.type;
|
||||
emsg.sensor_num = sdr->record.common->keys.sensor_num;
|
||||
emsg.event_type = sdr->record.common->event_type;
|
||||
target = sdr->record.common->keys.owner_id;
|
||||
lun = sdr->record.common->keys.lun;
|
||||
channel = sdr->record.common->keys.channel;
|
||||
emsg.sensor_type = sdr->record.compact->sensor.type;
|
||||
emsg.sensor_num = sdr->record.compact->keys.sensor_num;
|
||||
emsg.event_type = sdr->record.compact->event_type;
|
||||
break;
|
||||
|
||||
default:
|
||||
lprintf(LOG_ERR, "Unknown sensor type for id '%s'", id);
|
||||
return -1;
|
||||
@ -340,48 +343,40 @@ ipmi_event_fromsensor(struct ipmi_intf * intf, char * id, char * state, char * e
|
||||
(emsg.event_dir == EVENT_DIR_DEASSERT && hilo == 1))
|
||||
emsg.event_data[0] = (uint8_t)(str2val(state, ipmi_event_thresh_lo) & 0xf);
|
||||
else {
|
||||
lprintf(LOG_ERR, "Invalid Event");
|
||||
lprintf(LOG_ERR, "Invalid Event\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
rsp = ipmi_sdr_get_sensor_thresholds(intf, emsg.sensor_num,
|
||||
target, lun, channel);
|
||||
if (rsp == NULL) {
|
||||
lprintf(LOG_ERR,
|
||||
"Command Get Sensor Thresholds failed: invalid response.");
|
||||
return (-1);
|
||||
} else if (rsp->ccode != 0) {
|
||||
lprintf(LOG_ERR, "Command Get Sensor Thresholds failed: %s",
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
return (-1);
|
||||
rsp = ipmi_sdr_get_sensor_thresholds(intf, emsg.sensor_num);
|
||||
|
||||
if (rsp != NULL && rsp->ccode == 0) {
|
||||
|
||||
/* threshold reading */
|
||||
emsg.event_data[2] = rsp->data[(emsg.event_data[0] / 2) + 1];
|
||||
|
||||
rsp = ipmi_sdr_get_sensor_hysteresis(intf, emsg.sensor_num);
|
||||
if (rsp != NULL && rsp->ccode == 0)
|
||||
off = dir ? rsp->data[0] : rsp->data[1];
|
||||
if (off <= 0)
|
||||
off = 1;
|
||||
|
||||
/* trigger reading */
|
||||
if (dir) {
|
||||
if ((emsg.event_data[2] + off) > 0xff)
|
||||
emsg.event_data[1] = 0xff;
|
||||
else
|
||||
emsg.event_data[1] = emsg.event_data[2] + off;
|
||||
}
|
||||
else {
|
||||
if ((emsg.event_data[2] - off) < 0)
|
||||
emsg.event_data[1] = 0;
|
||||
else
|
||||
emsg.event_data[1] = emsg.event_data[2] - off;
|
||||
}
|
||||
|
||||
/* trigger in byte 2, threshold in byte 3 */
|
||||
emsg.event_data[0] |= 0x50;
|
||||
}
|
||||
|
||||
/* threshold reading */
|
||||
emsg.event_data[2] = rsp->data[(emsg.event_data[0] / 2) + 1];
|
||||
|
||||
rsp = ipmi_sdr_get_sensor_hysteresis(intf, emsg.sensor_num,
|
||||
target, lun, channel);
|
||||
if (rsp != NULL && rsp->ccode == 0)
|
||||
off = dir ? rsp->data[0] : rsp->data[1];
|
||||
if (off <= 0)
|
||||
off = 1;
|
||||
|
||||
/* trigger reading */
|
||||
if (dir) {
|
||||
if ((emsg.event_data[2] + off) > 0xff)
|
||||
emsg.event_data[1] = 0xff;
|
||||
else
|
||||
emsg.event_data[1] = emsg.event_data[2] + off;
|
||||
}
|
||||
else {
|
||||
if ((emsg.event_data[2] - off) < 0)
|
||||
emsg.event_data[1] = 0;
|
||||
else
|
||||
emsg.event_data[1] = emsg.event_data[2] - off;
|
||||
}
|
||||
|
||||
/* trigger in byte 2, threshold in byte 3 */
|
||||
emsg.event_data[0] |= 0x50;
|
||||
}
|
||||
break;
|
||||
|
||||
@ -507,7 +502,7 @@ ipmi_event_fromfile(struct ipmi_intf * intf, char * file)
|
||||
chmed = ipmi_current_channel_medium(intf);
|
||||
if (chmed == IPMI_CHANNEL_MEDIUM_SYSTEM) {
|
||||
/* system interface, need extra generator ID */
|
||||
rqdata[0] = 0x41; // As per Fig. 29-2 and Table 5-4
|
||||
rqdata[0] = 0x20;
|
||||
req.msg.data_len = 8;
|
||||
}
|
||||
|
||||
@ -602,7 +597,7 @@ ipmi_event_usage(void)
|
||||
lprintf(LOG_NOTICE, " Use the 'sel save' command to generate from SEL");
|
||||
lprintf(LOG_NOTICE, "");
|
||||
lprintf(LOG_NOTICE, "usage: event <sensorid> <state> [event_dir]");
|
||||
lprintf(LOG_NOTICE, " sensorid : Sensor ID string to use for event data");
|
||||
lprintf(LOG_NOTICE, " sensorid : Sensor ID to use for event data");
|
||||
lprintf(LOG_NOTICE, " state : Sensor state, use 'list' to see possible states for sensor");
|
||||
lprintf(LOG_NOTICE, " event_dir : assert, deassert [default=assert]");
|
||||
lprintf(LOG_NOTICE, "");
|
@ -47,53 +47,14 @@
|
||||
static void
|
||||
printf_firewall_usage(void)
|
||||
{
|
||||
lprintf(LOG_NOTICE,
|
||||
"Firmware Firewall Commands:");
|
||||
lprintf(LOG_NOTICE,
|
||||
"\tinfo [channel H] [lun L]");
|
||||
lprintf(LOG_NOTICE,
|
||||
"\tinfo [channel H] [lun L [netfn N [command C [subfn S]]]]");
|
||||
lprintf(LOG_NOTICE,
|
||||
"\tenable [channel H] [lun L [netfn N [command C [subfn S]]]]");
|
||||
lprintf(LOG_NOTICE,
|
||||
"\tdisable [channel H] [lun L [netfn N [command C [subfn S]]]] [force])");
|
||||
lprintf(LOG_NOTICE,
|
||||
"\treset [channel H]");
|
||||
lprintf(LOG_NOTICE,
|
||||
"\t\twhere H is a Channel, L is a LUN, N is a NetFn,");
|
||||
lprintf(LOG_NOTICE,
|
||||
"\t\tC is a Command and S is a Sub-Function");
|
||||
}
|
||||
|
||||
void
|
||||
printf_firewall_info_usage(void)
|
||||
{
|
||||
lprintf(LOG_NOTICE,
|
||||
"info [channel H]");
|
||||
lprintf(LOG_NOTICE,
|
||||
"\tList all of the firewall information for all LUNs, NetFns");
|
||||
lprintf(LOG_NOTICE,
|
||||
"\tand Commands, This is a long list and is not very human readable.");
|
||||
lprintf(LOG_NOTICE,
|
||||
"info [channel H] lun L");
|
||||
lprintf(LOG_NOTICE,
|
||||
"\tThis also prints a long list that is not very human readable.");
|
||||
lprintf(LOG_NOTICE,
|
||||
"info [channel H] lun L netfn N");
|
||||
lprintf(LOG_NOTICE,
|
||||
"\tThis prints out information for a single LUN/NetFn pair.");
|
||||
lprintf(LOG_NOTICE,
|
||||
"\tThat is not really very usable, but at least it is short.");
|
||||
lprintf(LOG_NOTICE,
|
||||
"info [channel H] lun L netfn N command C");
|
||||
lprintf(LOG_NOTICE,
|
||||
"\tThis is the one you want -- it prints out detailed human");
|
||||
lprintf(LOG_NOTICE,
|
||||
"\treadable information. It shows the support, configurable, and");
|
||||
lprintf(LOG_NOTICE,
|
||||
"\tenabled bits for the Command C on LUN/NetFn pair L,N and the");
|
||||
lprintf(LOG_NOTICE,
|
||||
"\tsame information about each of its Sub-functions.");
|
||||
printf("Firmware Firewall Commands:\n");
|
||||
printf("\tinfo [channel H] [lun L]\n");
|
||||
printf("\tinfo [channel H] [lun L [netfn N [cmd C [subfn S]]]]\n");
|
||||
printf("\tenable [channel H] [lun L [netfn N [cmd C [subfn S]]]]\n");
|
||||
printf("\tdisable [channel H] [lun L [netfn N [cmd C [subfn S]]]] [force])\n");
|
||||
printf("\treset [channel H] \n");
|
||||
printf("\t\twhere H is a Channel, L is a LUN, N is a NetFn,\n");
|
||||
printf("\t\tC is a Command and S is a Sub-Function\n");
|
||||
}
|
||||
|
||||
// print n bytes of bit field bf (if invert, print ~bf)
|
||||
@ -121,83 +82,62 @@ static int
|
||||
ipmi_firewall_parse_args(int argc, char ** argv, struct ipmi_function_params * p)
|
||||
{
|
||||
int i;
|
||||
uint8_t conv_err = 0;
|
||||
|
||||
if (!p) {
|
||||
lprintf(LOG_ERR, "ipmi_firewall_parse_args: p is NULL");
|
||||
return -1;
|
||||
}
|
||||
for (i=0; i<argc; i++) {
|
||||
if (strncmp(argv[i], "channel", 7) == 0 && (++i < argc)) {
|
||||
uint8_t channel_tmp = 0;
|
||||
if (is_ipmi_channel_num(argv[i], &channel_tmp) != 0) {
|
||||
conv_err = 1;
|
||||
break;
|
||||
} else {
|
||||
p->channel = channel_tmp;
|
||||
}
|
||||
if (strncmp(argv[i], "channel", 7) == 0) {
|
||||
if (++i < argc)
|
||||
p->channel = strtol(argv[i], NULL, 0);
|
||||
}
|
||||
else if (strncmp(argv[i], "lun", 3) == 0 && (++i < argc)) {
|
||||
if (str2int(argv[i], &(p->lun)) != 0) {
|
||||
lprintf(LOG_ERR, "Given lun '%s' is invalid.", argv[i]);
|
||||
conv_err = 1;
|
||||
break;
|
||||
}
|
||||
else if (strncmp(argv[i], "lun", 3) == 0) {
|
||||
if (++i < argc)
|
||||
p->lun = strtol(argv[i], NULL, 0);
|
||||
}
|
||||
else if (strncmp(argv[i], "force", 5) == 0) {
|
||||
p->force = 1;
|
||||
}
|
||||
else if (strncmp(argv[i], "netfn", 5) == 0 && (++i < argc)) {
|
||||
if (str2int(argv[i], &(p->netfn)) != 0) {
|
||||
lprintf(LOG_ERR, "Given netfn '%s' is invalid.", argv[i]);
|
||||
conv_err = 1;
|
||||
break;
|
||||
}
|
||||
else if (strncmp(argv[i], "netfn", 5) == 0) {
|
||||
if (++i < argc)
|
||||
p->netfn = strtol(argv[i], NULL, 0);
|
||||
}
|
||||
else if (strncmp(argv[i], "command", 7) == 0 && (++i < argc)) {
|
||||
if (str2int(argv[i], &(p->command)) != 0) {
|
||||
lprintf(LOG_ERR, "Given command '%s' is invalid.", argv[i]);
|
||||
conv_err = 1;
|
||||
break;
|
||||
}
|
||||
else if (strncmp(argv[i], "command", 7) == 0) {
|
||||
if (++i < argc)
|
||||
p->command = strtol(argv[i], NULL, 0);
|
||||
}
|
||||
else if (strncmp(argv[i], "subfn", 5) == 0 && (++i < argc)) {
|
||||
if (str2int(argv[i], &(p->subfn)) != 0) {
|
||||
lprintf(LOG_ERR, "Given subfn '%s' is invalid.", argv[i]);
|
||||
conv_err = 1;
|
||||
break;
|
||||
}
|
||||
else if (strncmp(argv[i], "subfn", 5) == 0) {
|
||||
if (++i < argc)
|
||||
p->subfn = strtol(argv[i], NULL, 0);
|
||||
}
|
||||
}
|
||||
if (conv_err != 0) {
|
||||
return (-1);
|
||||
}
|
||||
if (p->subfn >= MAX_SUBFN) {
|
||||
lprintf(LOG_ERR, "subfn is out of range (0-%d)", MAX_SUBFN-1);
|
||||
printf("subfn is out of range (0-%d)\n", MAX_SUBFN-1);
|
||||
return -1;
|
||||
}
|
||||
if (p->command >= MAX_COMMAND) {
|
||||
lprintf(LOG_ERR, "command is out of range (0-%d)", MAX_COMMAND-1);
|
||||
printf("command is out of range (0-%d)\n", MAX_COMMAND-1);
|
||||
return -1;
|
||||
}
|
||||
if (p->netfn >= MAX_NETFN) {
|
||||
lprintf(LOG_ERR, "netfn is out of range (0-%d)", MAX_NETFN-1);
|
||||
printf("netfn is out of range (0-%d)\n", MAX_NETFN-1);
|
||||
return -1;
|
||||
}
|
||||
if (p->lun >= MAX_LUN) {
|
||||
lprintf(LOG_ERR, "lun is out of range (0-%d)", MAX_LUN-1);
|
||||
printf("lun is out of range (0-%d)\n", MAX_LUN-1);
|
||||
return -1;
|
||||
}
|
||||
if (p->netfn >= 0 && p->lun < 0) {
|
||||
lprintf(LOG_ERR, "if netfn is set, so must be lun");
|
||||
printf("if netfn is set, lun must be set also\n");
|
||||
return -1;
|
||||
}
|
||||
if (p->command >= 0 && p->netfn < 0) {
|
||||
lprintf(LOG_ERR, "if command is set, so must be netfn");
|
||||
printf("if command is set, netfn must be set also\n");
|
||||
return -1;
|
||||
}
|
||||
if (p->subfn >= 0 && p->command < 0) {
|
||||
lprintf(LOG_ERR, "if subfn is set, so must be command");
|
||||
printf("if subfn is set, command must be set also\n");
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
@ -908,7 +848,19 @@ ipmi_firewall_info(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
|
||||
if ((argc > 0 && strncmp(argv[0], "help", 4) == 0) || ipmi_firewall_parse_args(argc, argv, &p) < 0)
|
||||
{
|
||||
printf_firewall_info_usage();
|
||||
printf("info [channel H]\n");
|
||||
printf("\tlist all of the firewall information for all LUNs, NetFns, and Commands\n");
|
||||
printf("\tthis is a long list and is not very human readable\n");
|
||||
printf("info [channel H] lun L\n");
|
||||
printf("\tthis also prints a long list that is not very human readable\n");
|
||||
printf("info [channel H] lun L netfn N\n");
|
||||
printf("\tthis prints out information for a single LUN/NetFn pair\n");
|
||||
printf("\tthat is not really very usable, but at least it is short\n");
|
||||
printf("info [channel H] lun L netfn N command C\n");
|
||||
printf("\tthis is the one you want -- it prints out detailed human\n");
|
||||
printf("\treadable information. It shows the support, configurable, and\n");
|
||||
printf("\tenabled bits for the Command C on LUN/NetFn pair L,N and the\n");
|
||||
printf("\tsame information about each of its Sub-functions\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -929,7 +881,6 @@ ipmi_firewall_info(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
lprintf(LOG_ERR, "Command 0x%02x not supported on LUN/NetFn pair %02x,%02x",
|
||||
p.command, p.lun, p.netfn);
|
||||
free(bmc_fn_support);
|
||||
bmc_fn_support = NULL;
|
||||
return 0;
|
||||
}
|
||||
cmd =
|
||||
@ -957,7 +908,6 @@ ipmi_firewall_info(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
lprintf(LOG_ERR, "LUN or LUN/NetFn pair %02x,%02x not supported",
|
||||
p.lun, p.netfn);
|
||||
free(bmc_fn_support);
|
||||
bmc_fn_support = NULL;
|
||||
return 0;
|
||||
}
|
||||
n = p.netfn >> 1;
|
||||
@ -998,7 +948,6 @@ ipmi_firewall_info(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
}
|
||||
|
||||
free(bmc_fn_support);
|
||||
bmc_fn_support = NULL;
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -1048,7 +997,6 @@ ipmi_firewall_enable_disable(struct ipmi_intf * intf, int enable, int argc, char
|
||||
ret = _gather_info(intf, &p, bmc_fn_support);
|
||||
if (ret < 0) {
|
||||
free(bmc_fn_support);
|
||||
bmc_fn_support = NULL;
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -1089,7 +1037,6 @@ ipmi_firewall_enable_disable(struct ipmi_intf * intf, int enable, int argc, char
|
||||
*/
|
||||
}
|
||||
free(bmc_fn_support);
|
||||
bmc_fn_support = NULL;
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -1126,7 +1073,6 @@ ipmi_firewall_reset(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
ret = _gather_info(intf, &p, bmc_fn_support);
|
||||
if (ret < 0) {
|
||||
free(bmc_fn_support);
|
||||
bmc_fn_support = NULL;
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -1149,7 +1095,6 @@ ipmi_firewall_reset(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
}
|
||||
|
||||
free(bmc_fn_support);
|
||||
bmc_fn_support = NULL;
|
||||
return ret;
|
||||
}
|
||||
|
2112
ipmitool/lib/ipmi_fru.c
Normal file
2112
ipmitool/lib/ipmi_fru.c
Normal file
File diff suppressed because it is too large
Load Diff
1624
ipmitool/lib/ipmi_fwum.c
Normal file
1624
ipmitool/lib/ipmi_fwum.c
Normal file
File diff suppressed because it is too large
Load Diff
2398
ipmitool/lib/ipmi_hpmfwupg.c
Normal file
2398
ipmitool/lib/ipmi_hpmfwupg.c
Normal file
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user