Some environments require reproducible builds. Since the IANA PEN
registry is constantly updating and there is no snapshot available,
installing ipmitool via `make install` is not reproducible.
Provide a configure mechanism to disable the registry download/install..
From IPMI Spec, Chapter 22.22 Set Channel Access Command
Table 22, Set Channel Access Command
Byte#2, Bit#5 is "PEF Alerting Enable/Disable"
And the bit value:
0b = enable PEF Alerting
1b = disable PEF Alerting on this channel
In current code, alert "on" set Bit#5 to 1 and alert "off" set Bit#5 to
0, it's straightforward but just opposite of IPMI spec bit definition.
Resolvesipmitool/ipmitool#247
Reported-by: Ryan Fang <Ryan.Fang@quantatw.com>
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Previously, ipmitool would fail to run if the local copy of the IANA PEN
registry could not be parsed.
When the registry is not available the manufacturer will be "Unknown" but
ipmitool will otherwise function so should not be considered fatal.
Also, fix an issue with improperly handling the `oem_info_list_load`
return value. Previously, in `ipmi_oem_info_init`, if `oem_info_list_load`
returned a negative value due to the registry file not existing, an
improper count would cause `oem_info_init_from_list` to aallocate a list
that didn't encompass the full header/tail list.
IANA PEN registry open failed: No such file or directory
Allocating 3 entries
[ 1] 16777214 | A Debug Assisting Company, Ltd.
[ 0] 1048575 | Unspecified
Now, use a signed int and ensure a valid count of loaded OEMs is used.
Signed-off-by: Vincent Fazio <vfazio@gmail.com>
Use pkg-config to retrieve readline dependencies such as ncurses to
avoid the following static build when readline is built with ncurses
support (which is raised since version 1.8.19 and
63dd71c39c):
** Unable to build Solaris 9 x86 IPMI interface support!
checking for library containing readline... no
configure: error: ** Unable to find readline required by ipmishell.
[...]
configure:15125: /tmp/instance-0/output-1/host/bin/armeb-buildroot-linux-musleabi-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O0 -g0 -static -Wall -Wextra -std=gnu11 -pedantic -Wformat -Wformat-nonliteral -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -static conftest.c -lreadline -lcrypto >&5
/tmp/instance-0/output-1/host/lib/gcc/armeb-buildroot-linux-musleabi/11.3.0/../../../../armeb-buildroot-linux-musleabi/bin/ld: /tmp/instance-0/output-1/host/armeb-buildroot-linux-musleabi/sysroot/usr/lib/libreadline.a(display.o): in function `_rl_move_cursor_relative':
display.c:(.text+0x80fc): undefined reference to `tputs'
Fixes:
- http://autobuild.buildroot.org/results/dabc6a4f49d464c129ac6bc3710011678142fcbe
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
The name `macos-catalina` was not correct as the script was actually
executed bothe for catalina (macos-10.15) and big sur (macos-11).
Renamed it to just `macos`.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
For computers using the arm64 of the Apple chip, the link requires strict
alignment of pointers in 32-bit form. Replace the struct vFlashstr to valstr.
Replace the Function get_vFlash_compcode_str to val2str.
Resolvesipmitool/ipmitool#332
Signed-off-by: SliderLu <314238828@qq.com>
It's possible the payload_length gets updated in
lanplus_encrypt_payload. If it's updated, the memory of msg should be
updated.
Tested: use ipmitool with lanplus with similar STR and there is no
memory stomping issue.
Resolved: ipmitool/ipmitool#351
Signed-off-by: Tom Tung <shes050117@gmail.com>
Before this change, `ipmitool` would not detect any checksum errors
in FRU areas when using 'fru print'. Now it will print whether the
area checksum is OK or INVALID for Chassis, Board, and Product areas.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
* Add a decoder for System Management records in
the Multirecord area
* Refactor GUID/UUID decoding: Use the same code for `mc guid`
and for `fru print` to decode the GUID and System Unique ID
in System Management records in the Multirecord Area.
* Fix some type errors in calls to printf/sprintf in GUID decoder
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
IANA has changed their URL scheme, and the content at the old URL for
enterprise-numbers switched from text/plain to text/html.
Fix Makefile.am to use the new URL
Resolvesipmitool/ipmitool#377
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Building ipmitool with UBSAN and I got:
```
...
xxx/ipmitool/include/ipmitool/helper.h:191:14: runtime error: left shift of 160
by 24 places cannot be represented in type 'int'
#0 0x55bddaa56f11 in ipmi32toh
xxx/ipmitool/include/ipmitool/helper.h:191:14
```
Tested: with this, I tested ipmitool again and the issue disappeared.
Resolved: ipmitool/ipmitool#352
Signed-off-by: Tom Tung <shes050117@gmail.com>
The choice of > or < when printing the threshold inequality currently
only depends on whether it is an upper or lower threshold. This is
correct when the event is asserted, but when the event is deasserted the
inequality is reversed and therefore the current code can give confusing
results, e.g.:
```
Temperature ps1_inlet_temp |
Upper Non-critical going high |
Deasserted |
Reading 43.94 > Threshold 44.88 degrees C
```
This commit fixes that.
See ipmitool/ipmitool#349
Signed-off-by: Andy Clegg <andyc@graphcore.ai>
The default cipher suite has been changed earlier in commit
7772254b62826b894ca629df8c597030a98f4f72, and the manual has been
then updated by commit 50479484a2268d3c9d525ceed729c1faed7244b6,
but it turned out that the description of the -C option was
not affected by the update.
Also, a typo was found as the cipher suites are listed in IPMI v2.0
specification Table 22-20, not 22-19 as stated in the manual.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Add 'soft reset' and 'power-up by RTC wakeup' causes
from IPMI 2.0 spec.
Resolvesipmitool/ipmitool#329
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
There is no need to reserve SEL when doing "sel list" and "sel get"
since we don't do partial get in both commands, and we didn't even use
the reservation ID returned by "Reserve SEL".
Signed-off-by: Bing-Hua Wang <binghuawang@ami.com>
GitHub has removed support for ubuntu 16.04 virtual environment
since Sep 20, 2021. We just follow.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
The IPM_DEV_FWREV1_MAJOR_MASK was incorrectly defined as 0x3F.
The spec indicates that the major firmware revision has 0~6 valid bits,
so the mask shall be 0x7F.
Tested: Verify a BMC that has a major version that is large than 0x3F,
and ipmitool shows the correct major version.
Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Both 'Set/Get LAN Configuration Parameter' commands may return
command-specific codes that weren't properly parsed and were
reported as 'Unknown' before. This is fixed now.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Modify the documentation to reflect commit 7772254b ("lanplus: Auto-select
'best' cipher suite available") which changed the default cipher suite for
lanplus from 3 to 17
The length of internal use area printed by ekanalyzer
didn't take in account the version byte.
The data printed was also 1 byte longer than needed.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
When there was no chassis and board areas, the internal use
are size was calculated incorrectly.
Additionally, it is possible that the internal area is actually
located after all other areas or that areas are arranged in
a different order than their offsets in the header. All those
cases weren't properly handled.
Now that is fixed.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
There was a wrong offset for the "Power Supply Inactive" flag,
hence the trigger on this event type could not be set.
Resolvesipmitool/ipmitool#280
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
- Add ubuntu-20.04 target
- Disable building of Solaris-specific `bmc` interface on Ubuntu
- Rename `ubuntu` matrix to `linux`
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
GitHub machines sometimes aren't immediately updated after
Ubuntu repos update. That leads to failed CI builds due
to inability to install some packages.
Add a call to `apt update` to update the package database
before installing anything.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Move #ifdef from the inside to the outside of assert()'s
to get rid of this compiler warning:
warning: embedding a directive within macro arguments has undefined
behavior [-Wembedded-directive]
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Refactor plugin ipmi_intf structure initialization for some
plugins to stop the compiler complaining like this:
warning: use of GNU old-style field designator
extension [-Wgnu-designator]
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
GitHub Actions macOS environment now has Xcode 12.0.1. [1]
Xcode 12 Clang enables -Werror=implicit-function-declaration by
default [2] and breaks the ipmitool build on macOS. [3]
[1] https://github.com/actions/virtual-environments/issues/1712
[2] https://developer.apple.com/documentation/xcode-release-notes/xcode-12-release-notes
"Clang now reports an error when you use a function without an
explicit declaration when building C or Objective-C code for macOS
(-Werror=implicit-function-declaration flag is on)."
[3] https://github.com/ipmitool/ipmitool/pull/252/checks?check_run_id=1389463134
"checking for ld used by gcc... /Applications/Xcode_12.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
<snip>
free.c:66:13: error: implicit declaration of function 'getuid' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
if (getuid() != 0) {
^
free.c:170:26: error: implicit declaration of function 'ipmi_get_oem' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
intf->manufacturer_id = ipmi_get_oem(intf);"
^
Signed-off-by: Bing-Hua Wang <binghuawang@ami.com>
Some of the header guard names in ipmitool duplicated with the ones in
freeipmi.
* ipmitool/ipmi_fru.h and freeipmi/fru/ipmi-fru.h both uses IPMI_FRU_H
* ipmitool/ipmi_sdr.h and freeipmi/sdr/ipmi-sdr.h both uses IPMI_SDR_H
* ipmitool/ipmi_sel.h and freeipmi/sel/ipmi-sel.h both uses IPMI_SEL_H
This is problematic as including the 1st will prevent the 2nd from being
included, leading to the loss of any declarations, inline definitions,
or other "#includes" in the 2nd header.
For example, including ipmitool/ipmi_sel.h and freeipmi/freeipmi.h fails
to build.
$ cat test.c
#include <ipmitool/ipmi_sel.h>
#include <freeipmi/freeipmi.h>
$ gcc test.c -I${HOME}/src/oss/ipmitool/include
In file included from /usr/include/freeipmi/freeipmi.h:90,
from test.c:2:
/usr/include/freeipmi/sdr/oem/ipmi-sdr-oem-intel-node-manager.h:48:44: error: unknown type name 'ipmi_sdr_ctx_t'; did you mean 'ipmi_fru_ctx_t'?
48 | int ipmi_sdr_oem_parse_intel_node_manager (ipmi_sdr_ctx_t ctx,
| ^~~~~~~~~~~~~~
| ipmi_fru_ctx_t
Remove header guards and use "#pragma once" instead. In this way, we
don't have to do manual management to avoid name clashes.
* src/plugins/lan/md5.h is left as is being an external header
originally.
* src/plugins/imb/imbapi.h is a convoluted header consisting of multiple
header guards. Let's just add "#pragma once" and leave header guards
as is for now.
Signed-off-by: Bing-Hua Wang <binghuawang@ami.com>
The following commands is used on Linux to convert line endings to LF.
git config core.autocrlf input
git add --renormalize .
git config --unset core.autocrlf
It turns out there was only ipmi_kontronoem.h not using LF.
Signed-off-by: Bing-Hua Wang <binghuawang@ami.com>
This patch has been added to fix "error: comparison between signed
and unsigned integer expressions [-Werror=sign-compare]"
Signed-off-by: Shitalkumar Gandhi <shitalkumar.gandhi@seagate.com>
When building an RPM, --with-kerneldir is passed to ./configure. This adds
the include path /lib/modules/<kversion>/build/include that may break the
build but is not present when building with "make" so useless.
For instance while building ipmi_sel.c with kernel 5.3.7-301.fc31.x86_64 :
/lib/modules/5.3.7-301.fc31.x86_64/build/include/linux/stddef.h:11:2: error:
expected identifier before numeric constant
11 | false = 0,
| ^~~~~
Signed-off-by: Gilles Buloz <gilles.buloz@kontron.com>
imbapi.c:1393:52: warning: ISO C does not support ‘__FUNCTION__’ predefined identifier [-Wpedantic]
lprintf(LOG_DEBUG, "%s: munmap(0x%x,%d) success", __FUNCTION__,
Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
- Drop a useless `extern` definition
- Remove static variable `errorCount` from header, move it to
the c file where it is actually used if needed
Related to ipmitool/ipmitool#220
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Fix calculation of the buffer size for decoded 6-bit ASCII
strings. Previously the program could allocate too a short buffer
that caused buffer overflows and segmentation fault crashes on
certain FRU contents.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Restore using strncmp() for "options=" and similar
substrings.
Resolvesipmitool/ipmitool#223
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
- Initialize the log at the start of ipmi_main() to allow for proper
logging at the start;
- Remove the unused log_level_get() function;
- Update log_level_set() to take verbosity instead of log level
(default verbosity is 0, which is LOG_NOTICE log level),
use the function to update log level as `-v` is encountered
in command line;
- Move IANA PEN list debugging to verbosity 6. The list is too long
to see it in each debug output of verbosity 5 that is used for
debugging lan/lanplus packets;
- For verbosity >= 2 (that is `-vv`) add the ipmitool version
information at the start.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Simplified target "rpm" of Makefile, and removed rpmrc and rpmmacros to use
default settings and those from the spec file such as Distribution that has
been changed to "GitHub Build" instead of "Sourceforge Build".
Signed-off-by: Gilles Buloz <gilles.buloz@kontron.com>
The command "make rpm" was failing for the following reasons :
- setting the build directory to ./rpmbuild/ instead of default
~/rpmbuild/ was ignored.
- errors in the spec file : wrong dates and characters in the
changelog, and unpackaged files under misc/*
- debug package built even if unneeded but failing to build because
of missing requisites.
Using "rpmbuild -tb ipmitool-*.tar.gz" instead of 'make rpm" builds
under ~/rpmbuild/ but also fails because of the last two reasons.
Signed-off-by: Gilles Buloz <gilles.buloz@kontron.com>
The documentation now contains instructions on how to build on
Windows. The instructions have been verified and added to
a continous integration workflow with the previous commit,
so Windows buildability will from now on be automatically verified.
Resolves: ipmitool/ipmitool#148 (ipmitool for win with FreeIPMI)
ipmitool/ipmitool#200 (windows build error)
ipmitool/ipmitool#201 (windows build error)
ipmitool/ipmitool#203 (no lanplus on windows)
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Update according to the new GitHub CI build configuration.
Add information regarding prerequisites for macOS X 10.15.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Neither of these systems have the `-t` option for `install`.
For Linux the option is not necessary and is only needed
if the target directory is specified before the source file(s).
Also, macOS produces strange files with -e suffix for man
pages when they are processed with sed using AC_CONFIG_FILES().
Move prefix expansion to another point in code to avoid these
unneeded intermediate files produced by configure.
Resolves: ipmitool/ipmitool#206
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
The `make distcheck` was failing because of some files deleted twice
and some intermediate files not deleted at all.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Remove a bashims from configure to make build compatible
with systems without bash.
Resolvesipmitool/ipmitool#205
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Unify the comparison idioms use.
Always use `if(!strcmp())` for "if string equals"
and `if(strcmp())` for "if string is not equal".
Never use `== 0` and `!= 0` with `strcmp()`.
Minor reformatting of the code immediately surrounding the
refactored lines.
Resolvesipmitool/ipmitool#104
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Reduce code duplication by extracting option names, types,
and value ranges into a separate structure, and rewriting
the option parsing code without mixing it with the data.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Clean up use of strcmp/strncmp/strncasecmp for command line arguments.
Never use anything but `strcmp()` unless absolutely neccessary.
Partialy resolvesipmitool/ipmitool#104
The current behavior:
- correct date format is not accepted by "sel time set".
- incorrect date format that looks correct is accepted, but time is not
set correctly.
- commands like
ipmitool sel time set "11/22/2013 trash"
are accepted.
Final part of the fixes for CVE-2020-5208, see
https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp
9 variants of stack buffer overflow when parsing `id_string` field of
SDR records returned from `CMD_GET_SDR` command.
SDR record structs have an `id_code` field, and an `id_string` `char`
array.
The length of `id_string` is calculated as `(id_code & 0x1f) + 1`,
which can be larger than expected 16 characters (if `id_code = 0xff`,
then length will be `(0xff & 0x1f) + 1 = 32`).
In numerous places, this can cause stack buffer overflow when copying
into fixed buffer of size `17` bytes from this calculated length.
Partial fix for CVE-2020-5208, see
https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp
The `ipmi_spd_print_fru` function has a similar issue as the one fixed
by the previous commit in `read_fru_area_section`. An initial request is
made to get the `fru.size`, which is used as the size for the allocation
of `spd_data`. Inside a loop, further requests are performed to get the
copy sizes which are not checked before being used as the size for a
copy into the buffer.
Partial fix for CVE-2020-5208, see
https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp
The `read_fru_area_section` function only performs size validation of
requested read size, and falsely assumes that the IPMI message will not
respond with more than the requested amount of data; it uses the
unvalidated response size to copy into `frubuf`. If the response is
larger than the request, this can result in overflowing the buffer.
The same issue affects the `read_fru_area` function.
Fix ipmitool not writing the last block of boot mailbox data if the
block is shorter than 3 bytes.
Signed-off-by: Ivan Mikhaylov <fr0st61te@gmail.com>
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Libraries ncurses, curses, tinfo and termcap are not actually
needed as the tgetent() function listed as required is not actually
used anywhere in the code.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
The `sudo` was missing from `make install` which prevented installation
if build is performed, as it should be, by an unpriviliged user.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Add some documenation on packages to install on Ubuntu 16.04 and
Fedora 31 before building the software.
This will make it easier for people who are building ipmitool as they
won't need to figure out all the package dependencies on their own.
For parameter checking replace calls to strncmp() with calls
to strcmp() in order to improve readability and get rid of literal
string lengths.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
* Get rid of magic '8' in bootdev options processing.
* Optimize the code of bootdev arguments processing, remove the
special crafting of flags for 'clear-cmos' argument, make it use
the same code as other options.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
There was a wrong help message regarding the console redirection,
and also the help formatting was a bit off. Straightened this all up.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Refactor the boot flags decoder:
* Add macros for boot flag bits, replace magic numbers in
the `chassis bootparam get 5` and in `chassis bootdev`
handlers.
The macros are prefixed with BFx_ where x stands for the
boot flags data byte as per IPMI 2.0 specification Table 28-14;
* Add decoding of remote/redirected media boot flags;
* Remove erroneous decoding of boot flags byte 3 bit 1 as
Sleep button lockout whereas the bit is a part of console
redirection setting;
* Fix console redirection settings reported under the 'BIOS verbosity'
header and vice versa;
* Fix resetting of all other boot flags in the data byte when
setting any of the bits in the same byte. This fixes inability
to set both 'efiboot' and 'persistent' bits at the same time,
and other similar cases.
Resolvesipmitool/ipmitool#163
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
ftp://ftp.supermicro.com/utility/IPMICFG/IPMICFG_1.30.0_build.190710.zip
contains MBType.dat file that lists all known Supermicro product IDs
with their respective names.
Import that knowledge into ipmitool.
Resolvesipmitool/ipmitool#151
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Commit 6e2b688e introduced a bug due to which VLAN id range checking
was negated and resulted in error messages printed for correct VLAN ids.
Resolvesipmitool/ipmitool#55
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Document password length argument to "set password", as per usage info.
Since we don't check whether we're using IPMI1.5/2.0 when setting the
password, ipmitool can't reject 20-char passwords being sent to
16-char interfaces, so the behaviour is somewhat undefined.
For 20-chars, it's now clearer and long passwords will be rejected.
Man page changed to reflect the above.
No longer truncate passwords (16 < p <= 20) silently, instead attempt
to set a 20-char password when such a password is given.
Fail if an explicit length is exceeded, and any time the upper limit
is exceeded.
ipmi_intf.h was missing a couple of declarations for the functions
used by fru, sdr and hpmfwupg modules. Add those declarations
to ipmi_intf.h and remove local declarations.
This fixes a couple of compilation warnings.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
The ipmi_event_fromfile() function was massively repeating the code of
ipmi_send_platform_event() and ipmi_event_msg_print().
This commit cleans up ipmi_event_fromfile() to simply call
ipmi_send_platform_event() with all the prepared data read from the
file. That function in its turn calls ipmi_event_msg_print().
This commit also replaces the dummy generator ID 2 that was printed to
the user with a more relevant generator ID that will actually be sent
by ipmi_send_platform_event().
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
IPMI 2.0 specification is quite inconsistent about system interfaces.
They have section 1.7.16 "System Interfaces" that clearly states that
there are FOUR system interfaces (KCS, SMIC, BT and SSIF), but then they
have section 1.7.31 saying that "It is mandatory to implement a system
interface that is compatible with one of the **three** specified system
interfaces" without specifying which three of the four interfaces are
meant. Then in section 6 "IPMI Messaging interfaces" they again say that
"As mentioned earlier, there are three System Interface implementations
specified for the BMC: SMIC, KCS, and BT". Is all looks like during
update from 1.5 to 2.0 they have updated section 1.7.16, but forgot to
update Table 6-3, section 1.7.31 and section 6. Yet again, there is 'Get
System Interface Capabilities' command that has a parameter 'System
Interface Type' that can specify that SI is of SSIF type.
All that have lead to a situation where some BMC manufacturers treated
the specification as if it prohibited specifying media type 0xC
(which is "System Interface") for system interfaces using SSIF
(SMBus Sustem Interface), and so they specified an SMBUS media type
for their system interface channels.
As a result, ipmitool failed to properly send event data via such
system interfaces as it treated them as non-system and didn't add
the required Generator ID.
To mitigate the inconsistency of IPMI specification and yet not
ask BMC manufacturers to alter their code, thus increasing compatibility
with legacy BMCs, this commit adds checking of current interface number.
The system interface, according to Table 6-1 of IPMI Specification is
required to have channel number 15 (0Fh). So with this commit the
generator ID is added for any interfaces that are either marked
as media type 0Ch 'System Interface' or have channel number 0Fh.
Resolvesipmitool/ipmitool#111
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
In order to support packaging, installation rules in Makefile
have to obey the specified DESTDIR. That support was missing
and is now added.
Signed-off-by: Andrey Kosteltsev <a.kosteltsev@yadro.com>
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
If a manufacturer's IANA PEN (aka manufacturer ID) was above
65535, it wasn't reported properly. Luckily there are no such
IDs so far, the biggest is 54077 as of 2019/06/18.
There is, however, an ID 0xFFFFFE used by fake_ipmistack
for debug purposes, and it was not reported correctly.
This commit expands the value argument to string searching functions
from 16-bit to 32-bit to allow for any possible IANA PEN.
Fixes: 73d6af57827fc85e78c700ca1dff00b3dbc63948
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Download and install the IANA PEN database (enterprise-numbers).
The download is performed using either wget or curl,
and the database is installed into @IANADIR@.
Resolvesipmitool/ipmitool#11
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Add information regarding IANA PEN registry locations into
ipmitool and ipmievd man pages. The locations in man pages are
automatically generated based on `configure` options.
Partially resolvesipmitool/ipmitool#11
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Add support for IANADIR and IANAUSERDIR variables to configure
to allow for customizable locations of system and user-supplied
IANA PEN registry.
Also make path building code portable to Windows.
Partially resolvesipmitool/ipmitool#11
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Previously, the OEM names dictionary was compiled in and
updating it required rebuilding of `ipmitool`, thus taking a
long time for newly registered OEMs to get supported by the tool.
Building also required a direct internet connection to succeed.
With this commit, the OEM enterprise dictionary is now loaded from
either ${HOME}/.local/usr/share/misc/enterprise-numbers or from
/usr/share/misc/enterprise-numbers (in that precedence).
Those files can be downloaded from iana.org at
http://www.iana.org/assignments/enterprise-numbers
Partially resolvesipmitool/ipmitool#11
Fixes: 9d41136c9b7c7d392f1a3f3adeb6d7fe3bd3135e
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Renamed the oem strings containing Newisys to Viking Enterprise Solutions.
IANA 9237
Built and tested with AMI's IPMI stack LTS 12.01.
Resolvesipmitool/ipmitool#124
Signed-off-by: dan mcgee <dan.mcgee@vikingenterprise.com>
Signed-off-by: dan mcgee <dan.mcgee@sanmina.com>
Prior to 95038ba01b99153de870dde91406bdc1c7265217 the default interface
was 'open' for builds where it was available and 'lan' otherwise. Due to
a logic error in 95038ba01b99153de870dde91406bdc1c7265217, the default
interface was always getting set to lan unless it was specified by the
environment variable. This commit fixes the logic and sets the default
to open if it is available and lan otherwise.
Resolvesipmitool/ipmitool#128
Tested: ./configure # no options reports 'open' as default
./configure --enable-intf-open=no # reports lan as default
./configure --enable-intf-dbus DEFAULT_INTF=dbus # reports dbus
Signed-off-by: Vernon Mauery <vernon.mauery@intel.com>
Add `chassis bootmbox` command to set and get Boot Initiator Mailbox
boot parameter (id 7) the easy way. The command allows for getting
and setting the data both in hex and text modes, as well as properly
decodes IANA Enterprise number for block 0. It can get/set the whole
mailbox at once or operate on separate data blocks.
This commit enhances the chassis_get_boot_param() function with extra
arguments to re-use its code in handling of the added command.
Documentation update will follow.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Get/set system boot option commands have some command-specific
completion codes that are now reported as "Unknown (0080)", etc.
Use the previously introduced specific_val2str() to convert those
specific error codes to human-readable strings.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Some commands may return command-specific completion codes.
Now they are all reported as 'Unknown'.
Add helper functions to support such command-specific codes.
Command handlers will need to define their own valstr arrays
with completion code descriptions and then use specific_val2str()
instead of generic val2str() to convert the completion code into
a string.
Also reduce code duplication in helper.c
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
The function converts a set of command line arguments representing
byte values into a byte buffer and verifies each individual value
to be a valid data byte.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
The manpage contained a lot of redundant .RS/.RE tag pairs
with no content between the tags. This commits removes those.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
On a failed download of the PEN list, the create_pen_list script
improperly printed an invalid entry of { , "" } causing the build to
fail. The last line print must check that it has something to print or
it will print the wrong thing.
Partially resolvesipmitool/ipmitool#11
Signed-off-by: Vernon Mauery <vernon.mauery@intel.com>
Move boot information acknowledgement clearing code into
a helper funcion, call it instead of copy-pasted code.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Get rid of repeated code that sets the set-in-progress parameter.
Introduce chassis_bootparam_set_in_progress() function to do
the job.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
The program would crash if the BMC returned an out of range (>90)
unit type for a full sensor record. This commit adds a range check
and also add support for IPMI 2.0 additional unit types 91 and 92
("fatal error" and "grams").
Resolvesipmitool/ipmitool#118
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Resolvesipmitool/ipmitool#46
Most modern systems do not require ipmi.service to load the kernel
modules. Checking for /dev/ipmi* would be sufficient.
v2: Use Assert in place of Condition to explicitly fail based on
AlexanderAmelkin's feedback.
Signed-off-by: Charles Rose <charles.rose@dell.com>
In some cases, the user may want to have a different default interface
without the need to always specify it on the command line. Add a
configure option that sets the default interface without the need to
patch the code.
Configure as: ./configure DEFAULT_INTF=name
where name is an interface name that might be enabled with
--enable-intf-<name>.
The configure will enforce that the selected default interface is
enabled.
Signed-off-by: Vernon Mauery <vernon.mauery@intel.com>
By default the D-Bus interface is not enabled, so in order to get it to
build in Travis, it must be enabled explicitly. This installs the
packages needed and sets the configure flag.
Signed-off-by: Vernon Mauery <vernon.mauery@intel.com>
OpenBMC runs a D-Bus interface internally and has the option of
compiling ipmitool so it can run natively on the BMC. This adds the
D-Bus interface to ipmitool so it can be used with the OpenBMC project.
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
The endian.h header is not used for anything and was earlier
added by mistake. It however hampers building on some systems
where it doesn't exist.
Resolvesipmitool/ipmitool#101
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Swap calls to free() with calls to free_n() to leverage helper method
and handle clearing pointers after freeing in one step.
Signed-off-by: Patrick Venture <venture@google.com>
Check the received IPMI response message id against
the id expected given the IPMI request. They need to
match. It is possible that request A times out,
request B is sent, and then request A responds to the
request B. The value for request B may be behind it
in the queue.
Note: This may only be possible if the file is kept
open between multiple IPMI messages (a common
occurrence).
Resolves: #82
Signed-off-by: Patrick Venture <venture@google.com>
Apply whitespace fixes via clang-format-6.0 to src/plugins/open/open.c
to cleanup spaces and fixup line lengths, etc.
Signed-off-by: Patrick Venture <venture@google.com>
Make the argument to free_n() compatible with any pointers,
thus reducing the number of compilation warnings.
End-user-impact: None
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Swap calls to free() with calls to free_n() to leverage helper method
and handle clearing pointers after freeing in one step.
Signed-off-by: Patrick Venture <venture@google.com>
Check against FRU_AREA_MAXIMUM_BLOCK_SZ instead of FRU_BLOCK_SZ
when checking if the write chunk needs to be reduced.
Apparently, that was the original intention, and then there
was just a typo. In other places the same check is done properly.
Signed-off-by: Patrick Venture <venture@google.com>
Change ipmi_fru_query_new_value to return the bool type
instead of an int that's being used as a boolean value.
Signed-off-by: Patrick Venture <venture@google.com>
Add fru_cc_rq2big helper method to reduce duplicate
code checking for specific size-based IPMI response
codes.
Signed-off-by: Patrick Venture <venture@google.com>
Cleanup style in method ipmi_fru_oemkontron_get as well as add inverted
logic checks to reduce indentation.
Signed-off-by: Patrick Venture <venture@google.com>
Fixup the following array bounds checking bugs:
[lib/ipmi_fru.c:1003]: (style) Array index 'i' is
used before limits check.
[lib/ipmi_fru.c:1127]: (style) Array index 'i' is
used before limits check.
[lib/ipmi_fru.c:1262]: (style) Array index 'i' is
used before limits check.
Signed-off-by: Patrick Venture <venture@google.com>
For `sol activate` the timeout on lanplus interface was hard-coded
to 1 second, overriding the value set with the `-N` option.
Resolvesipmitool/ipmitool#87
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
free_n() will free the memory and clear the pointer, which will reduce
the probability a developer will forget to clear the pointer after
freeing.
Resolves: #79
Signed-off-by: Patrick Venture <venture@google.com>
For Win32/Cygwin, the imb plugin was failing to build with
the following message:
imbapi.h:140:9: error: unknown type name 'wchar_t'
typedef wchar_t WCHAR;
Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
On occasion a dcmi power reading will return error C6, and a
truncated response payload. As the decrypted payload is shorter
than the expected length, lanplus_decrypt_aes_cbc_128() adjusts
the payload_size downward by one byte. In ipmi_lan_poll_single()
the calculation to determine if the payload size has increased
erroniously sets extra_data_length to -1, with a subsequent
segv when calling a memmove to shift response data.
The fix is to check for a positive value in the extra_data_length.
Resolvesipmitool/ipmitool#72
This is a cleanup commit.
Commit 6dec83ff removed assignment of `rsp` pointer
in SOL-processing block of ipmi_lan_poll_single(),
but left the check for the pointer validity in place.
Although that has effectively fixed the bug of potentially
accessing the null `rsp` pointer in the `else` block introduced
with be2c0c4b, the resulting if/else looked suspicious and left
and impression that a NULL pointer could still be accessed.
This commit removes the check for `rsp` from the `if`
as it is checked at the start of the function where `rsp`
is initialized (and that is the only place where it is ever changed).
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Move led color static array from header to ipmi_picmg module
and introduce `picmg_led_color_str()` function for use in
ipmi_vita module.
Partially resolvesipmitool/ipmitool#13
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Move static objects declared in headers to the source files where
they're used.
Partially resolvesipmitool/ipmitool#13
Signed-off-by: Patrick Venture <venture@google.com>
Cleanup all unused-parameter warnings. Each warning was examined to
verify it wasn't simply a case of a build macro difference.
Partially resolvesipmitool/ipmitool#13
Signed-off-by: Patrick Venture <venture@google.com>
Use __UNUSED__ macro defined in helper.h instead of the gcc-specific
attribute unused macro.
Partially resolvesipmitool/ipmitool#13
Signed-off-by: Patrick Venture <venture@google.com>
FRU board mfg. date uses a different value for 'unspecified'
timestamp than the general IPMI specification.
This commit makes ekanalyzer and fru commands process unspecified
FRU dates properly, displaying 'Unspecified' instead of
'Mon Jan 1 03:00:00 1996'.
Resolvesipmitool/ipmitool#57
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
In some of the SDR calculating code, there were switch statements that
had cases that would fall through deliberately into the next case. But
the compiler didn't like the comment and would complain about the fall
through anyway. This changes to a comment that the compiler recognizes.
Partially resolvesipmitool/ipmitool#13
Signed-off-by: Vernon Mauery <vernon.mauery@intel.com>
Some return values were being ignored in ipmi_start_daemon. This adds
checks to the values and changes some hard-coded numbers into named
values.
Partially resolvesipmitool/ipmitool#13
Signed-off-by: Vernon Mauery <vernon.mauery@intel.com>
Several functions were passed a struct ipmi_intf* even though it was
unused. This removes the unused parameters and changes calls and
signatures.
Partially resolvesipmitool/ipmitool#13
Signed-off-by: Vernon Mauery <vernon.mauery@intel.com>
Before this fix `ipmitool` would complain that VLAN ID
is out of range when trying to disable an already disabled VLAN
on a lan channel. With this fix it will properly report that
VLAN is already disabled.
Resolvesipmitool/ipmitool#55
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Dates, times and floating point numbers from now on
will be displayed using system locale settings.
Resolvesipmitoo/ipmitool#23
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
There is a bug in gcc since 4.3.2 and still not fixed in 8.1.0.
Even if __attribute__((format(strftime... is specified for a
wrapper function around strftime, gcc still complains about strftime
being called from the wrapper with a "non-literal" format argument.
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39438
This commit adds 'ugly hacks' from that discussion to call strftime()
from strftime-formatted wrappers and silence the warnings.
Partially resolvesipmitool/ipmitool#23
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Handle all date/time stamps uniformly, taking in account the host
endianness. Respect the local time zone and the '-Z' option for
all ipmitool commands. Unify the date and time formatting.
Add correct handling of IPMI timestamps 'since system startup'
and for 'unspecified' timestamps.
Partially resolvesipmitool/ipmitool#23
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Some minor formatting corrections.
Also introduced a new helper function to reduce nesting level.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Cipher suite ID is a byte as per IPMI spec.
Use the appropriate function and consider target endianness
(so write to a temporary variable).
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Based on current crypto alogrithms, one could rank cipher suites along
these lines:
17 > 3 >> all the rest
17 and 3 are the only cipher suites that implement any sort of
confidentiality alogorithm that is secure. In addition, any hmac-md5 or
md5 integrity algorithm used in integrity is weak at best and dangerous
for authentication.
This could possibly be enabled in a simpler mechanism by simply checking
for 17 and then choosing it before falling back to 3, but the way this
is implemented, it makes it easy to change the list of acceptable
algorithms from two to three or more items.
Resolvesipmitool/ipmitool#29
Signed-off-by: Vernon Mauery <vernon.mauery@intel.com>
From the man page:
EVP_CIPHER_CTX was made opaque in OpenSSL 1.1.0. As a result,
EVP_CIPHER_CTX_reset() appeared and EVP_CIPHER_CTX_cleanup() disappeared.
EVP_CIPHER_CTX_init() remains as an alias for EVP_CIPHER_CTX_reset().
Signed-off-by: Rosen Penev <rosenp@gmail.com>
The ioctl to enable the event receiver in the OpenIPMI interface is
called with an argument of 0, which tells OpenIPMI to disable it. Set
the argument to 1 instead so that it will be enabled.
Signed-off-by: Benjamin Fair <benjaminfair@google.com>
With this commit the GUID encoding is now by default detected
automatically based on the validity of the version field,
and the timestamp (for time-based version 1 GUIDs).
The version is considered valid if it is 1 through 5.
The timestamp is considered valid if the year is past UNIX Epoch
and before the current year.
Resolvesipmitool/ipmitool#25
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Before this commit the 'Timestamp' line was always printed
for all versions of GUID, even for non-time-based ones.
Plus, only the time_low field was used, and it was used as if
it contained seconds since UNIX Epoch, which it didn't. In fact
this field along with other time_* fields constitute a single
60-bit value representing the count of 100ns intervals since
adoption of Gregorial calendar (00:00:00.00 15 Oct 1582).
For non-time-based versions of GUID, the time_* fields do
not represent any time at all.
So, after this commit, the timestamp will be properly decoded
for time-based GUID version 1 only. For other versions the
'Timestamp' line will not be displayed. A line showing the
GUID version will be added to the output.
Partially resolvesipmitool/ipmitool#25
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
There are lots of BMC implementations that violate the IPMI
specification in regard to GUID encoding and instead encode
GUIDs according to either RFC4122 or SMBIOS specifications.
This commit restores the default behavior of `mc guid` to
SMBIOS-based decoding and adds options to allow for decoding
according to IPMI or RFC4122 specifications.
It also allows to simply dump the received GUID as is
without any parsing.
It is possible that in future versions `ipmitool` will
change default behavior to 'ipmi' instead of 'smbios'.
Partially resolvesipmitool/ipmitool#25
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Before this commit the bytes for the GUID 'node' part were displayed in
reverse order as if they were reported by BMC according to SMBIOS
specification, not accordint to IPMI.
The field order in guid_t was also specified according to RFC4122/SMBIOS,
which is the reverse of IPMI specification. It has now been fixed.
The time_low field of GUID was taken directly, without taking in
account the ipmitool host endianness. It is now properly converted
from IPMI little-endian to host byte order. Other GUID fields are
also properly converted now. As of now, ipmitool does not generally work
properly when built for a big-endian target, but that's out of scope
of this commit.
Please note that this commit most probably breaks the output of
`ipmitool mc guid` with most existing BMC implementations, but that's
just an indication of them being broken. A follow-up commit will
re-add support for the broken behavior.
Partially resolvesipmitool/ipmitool#25
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Remove all direct comparisons to 'NULL' for pointers.
Replace them with boolean-like 'if (ptr)' and 'if (!ptr)'.
This makes conditions shorter and easier to read.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Merge GetAsyncImbpMessage() and GetAsyncImbpMessage_Ex() functions
as they share 95% of the code. Make the former call the latter().
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Make code better readable by replacing `if (rsp->ccode > 0)`
and 'if (rsp->ccode != 0)' with just `if (rsp->ccode)` as
rsp->ccode is anyway an unsigned byte and can't be negative.
Also replace 'if (rsp->ccode == 0)' with 'if (!rsp->ccode)'.
All these changes make lines shorter and easier to read as
a non-zero ccode is an indication of some failure, and so !ccode
naturally reads as 'no error'.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Add ARRAY_SIZE() macro.
Use the new macro in all places where array size is calculated by
means of sizeof(array)/sizeof(array[0]).
Fix minor bugs and warnings in the affected code.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Fix a number of warnings in ipmi_mc.c, including a potentially
uninitialized variable for `mc watchdog set` command.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Get rid of lanplus-specific yet very generic in nature
lanplus_swap() function that unconditionally swaps bytes
in an arbitrary byte array. Move it to helper module and
add two conditionally working interfaces to it:
- array_ntoh() for network (BE) to host conversion, and
- array_letoh() for ipmi (LE) to host conversion.
The added functions will only perform byte swapping if
the target architecture differs in endianness from the
data source. array_ntoh() will only do swap on LE machines,
while array_letoh() will only do it on BE ones.
These functions are introduced for future use in other
places of ipmitool.
Partially resolvesipmitool/ipmitool#26
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Commit 249e0929 added extra conditionals in byteswapping functions.
They are not needed and didn't work properly.
Now those functions must finally be ok.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
A potential future problem has been identified in the manufacturer
ID processing code for `mc info` command. Only 16 of 24 bits were
used. This is fixed now.
Also added support for ID 0x0FFFFF, the 'reserved' value as per
IPMI specification. It is now reported as 'Unspecified' unlike other
non-listed IDs that are still reported as 'Unknown'.
ID 0xFFFFFE is used for debugging purposes in hope that IANA won't
reach that number of entities any soon. If it will though, then
IANA's assignment will take precedence.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
There are lots of feature test macros like _POSIX_SOURCE,
_BSD_SOURCE, etc. chaotically placed at the beginning of
multiple files without apparent reason, sometime purely
erroneously.
This commit removes them all for the sake of cleaner code.
No new warnings are added due to that at least for gcc 5.4
on Linux with glibc 2.23.
ipmiXXtoh() and htoipmiXX() functions were broken
and only worked properly for big-endian hosts.
This commit makes them endianness-independent.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Added an option -Z to display all dates in UTC.
Resolvesipmitool/ipmitool#19
Change-Id: Iac3a61190eefde12d95c892af26072ec01f60474
Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
* Replace with a macro all calls to val2str() for completion codes
* Replace with a macro all calls to val2str() for manufacturer name
* Replace with a macro all calls to val2str() for product name
* Add ipmi24toh() and ipmi32toh() helpers, unify ipmi*toh() interface
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
* Add output of "don't log" and "pre-timeout interrupt" fields
* Display timers with 100ms precision
* List timer use expiration flags as text, not just numerically
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Add `ipmitool mc watchdog set` command in full compliance
with IPMI spec 2.0 section 27.6. Setting of all fields
is fully supported.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
The select syscall can be interrupted for signals like SIGPROF. The IPMI
command sent will still be outstanding but the send_command will return
an error. When the next command is sent it will get the completion for
the previous command and has the tendency to break state of end users.
Signed-off-by: William A. Kennington III <wak@google.com>
In multiple places throughout ipmi_user.c a user id mask
was used as a magic number, in some places the mask was wrong.
This commit replaces all those magic numbers with a single
IPMI_UID() macro.
Resolvesipmitool/ipmitool#6
A segmentation fault was trigged by executing 'ipmitool fru internaluse 1 info'.
A memset() was attempted on the address of a pointer, not on the pointer itself.
The erroneous memset() is removed with this commit because it duplicates
the memset() in line 4072.
Resolvesipmitool/ipmitool#9
Signed-off-by: Kylix Lo <kylix0713@gmail.com>
Commit 58d510f90feb ("ID : 103 picmg discover messages should
be DEBUG, not INFO") changed picmg discover messages from DEBUG
to INFO. However, commit f1c6118c722b ("ID:320 - Add VITA 46.11
support") reverted this without explanation.
This patch reverts the picmg discover messages back to DEBUG.
Prior to this commit, ipmitool had hard-coded list
of OEM Vendor IDs that it recognized.
With this commit, the list is fetched directly from
IANA PEN registry at build time, so that each release
will now contain an up-to-date list of vendors.
Only basic ASCII characters are supported now. Any
Unicode or extended ASCII will be either transliterated
(cyrillic and diacritic) or simply removed (chinese).
Closes:
ID:491 https://sourceforge.net/p/ipmitool/bugs/491/
ID:505 https://sourceforge.net/p/ipmitool/bugs/505/
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Fix the Most recent Addition/Erase date are not matched between in-band and
out-band.
ipmitool SDR code doesn't have to check for valid date to print
based on 'Delete SDR command supported' and 'Partial Add SDR command
supported', if 0xffffffff is taken. Also 'Timestamp' data type needs to change
to time_t(long) because same data type is using for gmtime(time_t) API, it has
different behaviour for Linux and Windows C.
IPMI tool coredumps due to changes introduced in ID:461. This shouldn't be
surprise as a NULL pointer is passed to init. Commit addresses this issue by
calling EVP_CIPHER_CTX_new() instead of EVP_CIPHER_CTX_init(), which is
deprecated, and by checking return value of call to former function.
The previously introduced mechanism of generating
a git revision was only using the abbreviated hash.
That approach doesn't give a clue whether version
1.8.18.2c99bf6 is newer or older than 1.8.18.7f8d374.
The project uses tags, so `git describe` can be
employed to produce an incremental revision number
since the last tag. Version 1.8.18.13 is much more
understandable and comparable. Howerver that doesn't
answer the question "what codebase was used". To
address that, the abbreviated hash should also be
preserved. Hence, this commit introduces a new
versioning scheme like `1.8.18.13.gee01aa5`.
For git snapshots when git program is absent the
version will be like `1.8.18.0.gsnapshot`.
For cases when .git directory is missing (Release
compilation?) the suffix part will be omitted
completely yielding a version like `1.8.18`.
The suffix generation has been moved to the added
csv-revision script. The script is absolutely
POSIX-ly correct and doesn't require XSI or any
other POSIX extensions.
The get_fru_area_str() function is used to decode FRU area
fields into text. Areas may be encoded as text, binary,
BCDplus or 6-bit ASCII. Decoding of 6-bit ASCII and BCDplus
was broken. There was an error in the formulas used to
calculate the resulting string length, plus the decoding
formulas for BCDplus was wrong.
For BCDplus the resulting length was considered equal
the encoded data length, while in fact it's twice as big.
Only one character instead of two was being extracted from
a single input byte while two nibbles must have been taken
into account.
For 6-bit ASCII rounding of 3 to 4 bytes conversion was done
improperly adding 2 to the original length instead of the
result of multiplication.
Ekanalyzer was not reading the type/length byte for the 2nd and
subsequent custom fields. Also the message it displayed when
lacked data for custom fields was very relaxing and incorrect.
Got rid of the field decoding code that was only capable of
processing ASCII and binary fields, and switched to using
get_fru_area_str() that can also decode BCDplus and 6-bit ASCII
and maybe will eventually be enabled to decode Unicode text
as well.
This is the first step to completely get rid of the completely
awfully written FRU data decoding functionality of ekanalyzer
that essentially duplicates that of ipmi_fru.c module.
Replace the static 'csv' suffix with a short hash
and a 'dirty' mark (when the tree is modified).
When git is not available, '.git_snapshot' suffix
will be used.
Currently, when a LAN parameter set command is sent through ipmitool, the
corresponding parameter data is requested and compared to the command to verify
that the data was written correctly. Since we do send the VLAN ID in this return
data, regardless of whether VLAN is disabled or not, this mismatch between
requested and received parameters causes ipmitool to retry the command 10 times
and return an error.
ipmitool is sending "0x00 0x00" reading back data from BMC as "0x01 0x00" which
is NOT matching & hence pops up the error /warning "LAN Parameter Data does not
match! Write may have failed."
After 10 retries when we check "ipmitool lan print" VLAN ID is disabled
successfully.
c&p from the ticket:
~~~
When I try to use CVS-ipmitool on Ubuntu 8.04 x86_64 to talk to a SuperMicros
SIMSO-HTC (Rev. 2.5, IPMI 2.0) chip on a X7SBi-Board via SOL I often get doubled
characters when typing fast, making the SOL interface basically unusable for
anyone accustomed to using a keyboard for longer than a month ;)
At first I thought this was an issue with SuperMicros implementation of the
protocol and/or the flow control
setup on the machine, but their own app works fine (but not the Linux CLI, which
is maybe
based on ipmitool?). But after reading the IPMI 2.0 SOL specs and watching the
debug output for a bit, it seems that is really an issue with lanplus-SOL
protocol implentation of ipmitool in general.
Specifically, in lanplus.c:ipmi_lanplus_send_payload, when waiting for a SOL
response the case that a non SOL packet is returned is not being
checked. Also the "if (is_sol_packet(rsp) && rsp->data_len)" branch does
terminate with a break, but instead goes for a send try, that seems
counterintuitive, Both these things cause doubled characters for me.
The attached patch seems to solve these issues in my case, but I don't claim to
fully understand your protocol code and/or the protocol, so maybe it will cause
problems elsewhere, especially under packet loss conditions.
~~~
Commit implements `Enable status` which shows/is in alignment with (22.27) Get
User Access Command and displays User ID Enable/Disable status of given User ID
at given channel.
PICMG 3.1 R2.0 introduces new a new Link Class field in the FRU
Link Descriptors which is the upper 4 bits of the Link Type field.
This new Link Class field specifies SERDES lanes with 10.3125Gbd
signalling rate.
It also introduces the new Base-KX and Base-KX4 types which are the
new IEEE replacements for the PICMG 3.0 Base-BX and Base-BX4 types.
This patch decodes these new types and fields and will print out
proper descriptions for each one based on PICMG 3.1 R2.0
PICMG extension 5(UTCA, MicroTCA) is not detected as valid extension.
The following patch fixes that at one place. In the second place the board type
is detected in a similar way, but it isn't clear if a patch is needed there, too.
In the new version of ipmitool 1.8.15 and above, sol deactivate command was not
closing the session, This patch is to fix close console session When we issue
sol deactivate command.
Commit adds a check as a workaround for segfault reported in ID:335. However,
the proper fix is to rewrite parts of lib/ipmi_hpmfwupg.c not to put whole
firmware image into memory. Also, MD5 checksum part needs to be rewritten,
because it won't work for large firmware images.
Commit adds a check as a workaround for segfault reported in ID:335. However,
the proper fix is to rewrite parts of lib/ipmi_hpmfwupg.c not to put whole
firmware image into memory. Also, MD5 checksum part needs to be rewritten,
because it won't work for large firmware images.
The netfn structures are populated sequentially in the _gather_info
function and they are accessed only by even indices (and to the double
of its real length). This results in a segmentation fault if you run
* ipmitool firewall reset
This patch fixes the behaviour so that the ipmi_firewall_reset function
treats the structure the same way as the rest of the code does.
Signed-off-by: Boris Ranto <branto@redhat.com>
Commit adds support for cipher suites 6/7/8 (HMAC-MD5) and cipher
suites 15/16/17 (HMAC_SHA256).
This also fixes:
* ID:442 - IPMI_AUTH_RAKP_HMAC_MD5 support in lanplus
* ID:141 - RMCP+ Cipher-suite 17 not supported
Original author Liebig Holger(Fujitsu).
Code cleanup done by Florian Breu and Zdenek Styblik.
Reworked event type code/sensor type parsing in order to support
VITA-specific extensions. Added VITA-specific sensor-specific event
types and VITA-specific sensor types.
Commit re-works user interface of PEF module as well as internal functions.
Not all of the functionality is implemented as the main aim was interface
layout.
It's possible this commit introduces some breaking changes.
Changes are based on patch submitted by Jordan Hargrave, Dell Inc.
The events can be removed as desired on certain machines so the only way
to get the proper last X events is to traverse them all not outputting
the first NR_EVENTS - X events.
Signed-off-by: Boris Ranto <branto@redhat.com>
Commit adds check of response's data_len in ipmi_sel_get_info() as returned data
length is unconditional. If incorrect, resp. short, data_len is returned, we
might end up reading memory at places we're not supposed to.
Commit changes a dummy interface in a way that it acts as a dummy interface when
no IPMI_DUMMY_SOCK env variable is set. Therefore, it's possible to run
'ekanalyzer frushow' without having BMC. Still, you need to specify this IPMI
interface.
If IPMI_DUMMY_SOCK is set, then dummy interface will work as it was working
before.
Presently 'sel time set' doesn't account 'minute' difference between timezone.
So depending on host timezone it may set time to +/-30 mins. This patch adds
minute difference to delta_hour caluclation so that it sets time properly.
output without patch:
# ./ipmitool sel time get
03/24/2016 12:34:03
# ./ipmitool sel time set "03/24/2016 12:34:03"
03/24/2016 12:04:03
# ./ipmitool sel time get
03/24/2016 12:06:09
output with patch:
# ./ipmitool sel time get
03/30/2016 08:49:47
# ./ipmitool sel time set "03/30/2016 08:09:47"
03/30/2016 08:09:47
# ./ipmitool sel get
03/30/2016 08:09:57
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
The LED state bits are not mutually exclusive. Bit [0] says LEDs can be
controlled locally and the state bit [1] says wheter the default local
settings or the override settings are used. This means that both bits can be
set at the same time.
Bit [2], the lamp test, indicates wether the test is in progress and logically
works the same as [1].
If bit [0] is not set then bit [1] and [2] has no meaning.
Signed-off-by: Jens Nyberg <jens.nyberg@ericsson.com>
Commit adds macros and #include in order to bring down the number of `warning:
implicit declaration of function 'X' [-Wimplicit-function-declaration]`
warnings.
Move the logic that checks the session ID from read_session_data_v2x
function to the ipmi_lan_poll_single function in order to avoid calling
assert in this case. We can continue with the next packet if we detect
a session ID mismatch.
Signed-off-by: Boris Ranto <branto@redhat.com>
Commit moves Super Micro stuff into dedicated header file in order to cut down
on compiler warnings. It seems these aren't used elsewhere other than in
'lib/ipmi_sel.c'.
NI_MAXHOST and NI_MAXSERV is only defined in /usr/include/netdb.h if
_DARWIN_C_SOURCE is defined or _POSIX_C_SOURCE is undefined.
From /usr/include/netdb.h OS 10.11 - El Capitan:
/*
* Constants for getnameinfo()
*/
#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
#define NI_MAXHOST 1025
#define NI_MAXSERV 32
#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
Commit changes help text for USB interface to "auto" as its default value will
rely on pre-defined value in configure.ac, if no value is specified by user.
Targets as a problem with editing FRUs (like ipmitool ....
fru edit 0 field b 0 "blahblah") where the header (multirecord area offset) is
not correctly updated.
It is supposed to modify the header offset to muti-record area if any of
the three previous areas has been edited.
Remark: this has to occur before the new header crc is calculated.
Thats the reson the modification is not close to the actual movement of the
data. Maybe it would be nicer to change the order in the code here. But
I do not want to add undesired behaviour, thus keeping a clear and small
patch.
"ipmitool sel add" always sets the Generator ID field of the generated SEL entry
to 0x0000.
Looking at the IPMI spec v2, §13.2, this is questionable. The value 0 would be
read as a HW-generated event from IPMB with slave address 0, which is the
broadcast or ["general call"]http://www.i2c-bus.org/addressing/ address.
The spec says that the Generator ID should be "Software ID if event was
generated from system software", and goes on to say that bit 0 should be set to
1 and bit 1-7 should be set to the Software ID for software-generated events.
SEL entries generated by ipmitool will usually be software-generated.
Out of the SWIDs defined in §5.5 of the IPMI spec, "System management Software"
or "OEM" would match ipmitool's use best, thus it would make sense to set the
generator ID field to 0x0041 or 0x0061. I am using 0x0041 here.
Signed-off-by: Martin Wilck <martin.wilck@ts.fujitsu.com>
Boards equipped with 'dumb' Intel MAC can do only SOL. IPMITool performs
several autodetection requests before initiating SOL, which are not
recognized by the boards. With each request retried 5 times it takes
about 30 seconds to establish SOL. This patch resolves the problem.
'picmg policy set' command uses too restrictive input values check
which allow setting/clearing only the Activation Locked Bit (#0).
This patch fixes the check to allow setting/clearing Deactivation
Locked Bit (#1) as well.
'picmg led cap' command expects FRU LED Capabilities response
length 5 bytes minimum (excluding the completion code byte),
while it is only 4 bytes long. This patch makes the command
expect 4 bytes instead.
Redundant call for find_lan_channel() for several 'lan' commands
produces misguiding error output. Those commands require expicit
specification of the channel number and calling to find_lan_channel()
for them is useless. For the rest 'lan' commands which allow
ommiting of the channels number, the find_lan_channel() is called
additionally.
Commit implements '-4' and '-6' switch in order to enforce IPv4 or IPv6
connection. In order to do so, struct ipmi_intf has been extended to carry
ai_family flag.
Editing a fru without resizing it caused the checksum being incorrect and not
being updated. This fix changes this, so the checksum is now being correctly
calculated and written to the right place.
The current USB plugin doesn't find my IPMI channel:
# ipmitool -I usb mc info
Error in USB session setup
Unable to setup interface usb
Error loading interface usb
This is beacuse I have more than 8 scsi-generic devices that identify
as AMI:
# grep -c ^AMI /proc/scsi/sg/device_strs
13
So we end up hitting the max in FindG2CDROM, and abort without finding
the actual IPMI endpoint (on my system, this is /dev/sg11).
This change bumps that maximum up to 16.
However, that means we hit another bug in scsiProbeNew, where if
we hit the end of the file without completely filling the array,
we return with an error. This change handles the EOF condition
gracefully instead.
Also, fp is never going to become NULL; we don't need to check for that
condition.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Commit adds a work-around for some BMCs which return ccode 0xCC when user is
disabled. However, this isn't reason to stop listing users as this ccode is
perceived as being "normal".
When 0xCC is returned, empty user name will be printed instead of bailing out.
... because people without VITA support don't care about errors related to VITA
discovery. This has been suggested as a part of the ticket and "copied" after
PICMG discovery.
This feature request is for adding support for USB Medium as an interface in
IPMITool. AMI BMC (OEM feature) provides Virtual USB devices in the host as
part of its feature list. IPMITool can use this 'Virtual USB device' as a
medium for Inband communication with BMC.
Just like any other interface, use can just give 'ipmitool -I usb xxxx' to
communicate with the BMC via USB Interface.
The 'bufLength' variable holds a constant chunk size. If the actual
data length is less than the 'bufLength', then it crashes IPMITool. The
code was already there to calculate the remaining data length, but was
not used in memcpy(). We changed it to use the 'count' variable which
holds the proper available data length.
Commit for: Viswanathan Swaminathan
Request/response matching for bridged and double-bridged requests is broken.
This patch reworks the sending and command construction code, and fixes the
response matching problems.
Since the polling code is retried several times, it was moved into a separate
function in order to make the code more readable.
Commit for: Dmitry Bazhenov
1. my_addr is not set if an interface does not expose set_my_addr.
Currently, the only interface which requires some special handling to set
my_addr is OpenIPMI. But changing of my_addr still needed for other interfaces.
So, we must set it regardless of presence of set_my_addr().
2. Since set_my_addr() for serial interfaces only sets my_addr, we remove them
as redundand.
3. Bridging is enabled when either trasit_addr or target_addr is not 0.
Currentle transit_addr is not regarded.
4. target_lun does not relate to briging. It is needed for "raw" command. We
set it regardles of bridging.
Commit for: Dmitry Bazhenov
When bridging is used (-t specifies an address which is different from 20h),
presession command must go to BMC_SLAVE_ADDR, not to target_addr.
BMC_SLAVE_ADDR is always used as the responder address in outer Send Message
request, when message is forwarded. Use the same approach for non-bridged
commands.
Commit for: Dmitry Bazhenov
When closing, LAN and LAN+ interfaces do not do proper cleaning of request
entries. Some pointers remain non NULL. This may cause bad memory references.
Commit for: Dmitry Bazhenov
Negative value returned by serial_read_line() function was not properly
recognized, since the storage type was unsigned. This caused ipmitool crash in
some sutuations. This patch fixes the problem.
Commit for: Dmitry Bazhenov
Return codes of functions should be either used or evaluated - always. This
merge is necessary for shell scripting to, eg. signal there was an error during
execution.
Currently, interface-management code in the ipmitool does not allow safe
interface re-opening (i.e. closing and opening again). It is because the session
is allocated in the interface setup callback while is freed in the close
callback. So, normal re-opening of the interface, which can be required for
example durng the HPM.1 upgrade, leads to segmentation fault. That's why in the
ipmi_hpmfwupg.c instead of normal closing interface, directly access the
interface data for subsequent re-opening.
Commit for Dmitry Bazhenov
In older GCC versions when an element in an anonymous unions/structures are
addressed by name, gcc must use -fms-extensions.
Change-Id: Id80617ad9336c7a02fbe613b58e3f337fa4baeee
Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.xx.bhuvaragan@ericsson.com>
Commit fixes compilation of IMB driver under Cygwin.
* don't redefine PAGESIZE if defined already
* fix missing include of <asm/socket.h> - required by IO calls
Commit is a rewrite of ipmi_set_channel_access(). Function utilizes _ipmi_*()
functions now in order to avoid code repetition. Other than that, functionality
should remain the same.
Commit hooks ipmi_user_priv() to _ipmi_set_user_access(). Later got extended for
'change_priv_limit_only', because of the former.
Commit removes ipmi_user_set_userpriv(), because it's not used anywhere.
Commit is a re-work of 'channel getaccess' and 'channel setaccess'. These are
using _ipmi_* now. Also, bitfields and two structs are replaced by one unified
struct.
Commit fixes bug in eval logic of user input sanitization, resp. && -> ||. Also,
priv_level and user_id variables are initialized to 0 now(CID#1261318).
Commit replaces caddr_t in IMB driver with char *. This is a wild guess
replacement, because caddr_t doesn't have to be char *. However, it shouldn't be
used and so shouldn't mmap(). So we'll have to see how things work out.
http://computer-programming-forum.com/47-c-language/556a90938d01f023.htm
Commit adds option to 'user set password' to choose whether password should be
stored as 16 byte or 20 byte. From now on, it's possible to store even 5 bytes
long password as 20 byte password which should make it useless for IPMI v1.5
auth/sessions.
Despite the fact we could leave this up to IPMI stack, we won't do that.
Therefore, is_ipmi_user_priv_limit() is added and user provided value checked.
Add support for the "System Firmware Version" parameter selector (1) to the "Get
System Info Parameters" command ("mc getsysinfo system_fw_version"). The "mc
getsysinfo" command was already implemented and supported, but strangely, only
standard parameter selecter values 2, 3, 4 and Dell-defined parameters were
supported; the standard parameter value 1 (system firmare version) was not
supported.
Fix cross-compile build error regarding to 'rpl_malloc'.
ipmitool actually does not need the GNU's malloc(0) behavior.
So, remove AC_FUNC_MALLOC from AC-script in order to help
cross-compiling ipmitool without need to directly specify
ac_cv_func_malloc_0_nonnull environment variable.
'lib/ipmi_sdradd.c' ipmi_sdr_read_records() opens a file descriptor and never
closes it. Here is a patch in use by SGI for quite some time now. Suggested
patch attached.
The patch adds missing check for the Intel i82751 MAC being in the super
pass-through mode, which has known deviations in RMCP+ from the IPMI
specification.
ID#313 ipmitool doesn't support hostname long than 64 symbols
ID#277 Minor issue with ipmi_intf_session_set_hostname()
Commit adds support pretty much for FQDN not just up to the length of one label.
This is achieved by change in in struct ipmi_session; and strdup() of user
input. Of course, we have to free() this once we're done.
Bug 325 was associated with identification of DDR4 SDRAM, but correct decoding
logic was necessary to actually support DDR4 decode. This commit adds the
necessary logic to decode and display DDR4 DIMMS.
The delloem extension functions all return sane error codes, but they
are not used and not passed on. Fix it.
Signed-off-by: Thomas Renninger <trenn@suse.de>
Currently, the HPM.1 agent in the IPMItool does not differ between Rollback
support and Deferred Activation Support. The patch fixes up this bug.
Commit for Dmitry Bazhenov
1. Warnings about "FRU Area Length" based on uninitialized (malloc'd) memory
contents (due to fru->max_read_size not being initialized, left at 0) and
fru_data not being zeroed after malloc() in ipmi_fru_set_field_string().
2. "fru edit" commands for any field index other than 0 would fail (with "Field
not found !" error) due to a couple offset and length calculation errors (for
all the supported "area" types) in ipmi_fru_set_field_string().
3. "fru edit" commands would corrupt the FRU Inventory Area due to incorrect
"source offset" value being specified in write_fru_area() call in
impi_fru_set_field_string().
Commit for Rob Swindell
The lanplus driver for has a bug in ipmi_lanplus_open_session(). There is
an extra and undesired check for a null response (timeout). As a result, it
returns 1 to the caller. The result of this is an occasional assertion. Commit
mends this.
Commit for Pat Donlin
max_inbound_payload_size, max_outbound_payload_size and port are
assembled byte by byte using shifts. This works correctly in both
little and big endian and doing a subsequent byte swap is wrong.
To highlight this issue I dumped the values on a big endian machine:
max_inbound_payload_size 51200
max_outbound_payload_size 51200
port 28418
And after this fix:
max_inbound_payload_size 200
max_outbound_payload_size 200
port 623
Signed-off-by: Zdenek Styblik <stybla@turnovfree.net>
Main changes include:
* direct connection to ILOM command line interface
* ability to add/delete ssh keys fot ILOM users
* ability to set ILOM properties
* ability to retrieve various logs from SP
* removal of obsolete/non-functioning code and other misc changes
Commit for Martin Hovorka of Oracle
From the ticket:
(v1.8.12) "dcmi power set_limit action <value>" (where <value> is either
"sel_logging" or "power_off") does not actually send the "Set Power Limit"
command (so no change to the power limit policy is made).
This was caused by all atoi(), strtol(), strtoul() calls being replaced. This
patch should fix it.
Commit for Holger Liebig
This patch adds basic long message support for PICMG-based systems according to
the HPM.2 specification.
It also introduces APIs for setting inbound and outbound messages sizes per
selected interface.
This APIs are used in LAN and LAN+ interfaces to set autonomously detected
inbound and outbound message sizes.
The newly introduced APIs also replace the existing message size detection code
in several ipmitool commands in order to leverage the advantages of long message
support (HPM.1 upgrade, SDR acquring, FRU inventory read and write).
The Kontron-specific long message support is moved under a OEM option.
Commit for Dmitry Bazhenov
The intent is to zero the byte that no longer contains valid data (because the
data was shifted one byte to the left). However, the wrong byte is being zeroed.
One way this shows up is when displaying the descriptions with hpm compprop.
``I had submitted a patch back on Nov 19, 2013 regarding a fix to lanplus retry.
This had resolved a problem whereby a retry of a payload type of
IPMI_PAYLOAD_TYPE_IPMI first removed the request from the queue before going
back for a retry of the message. I have been able to determine why this fix
works correctly. More importantly I have been able to resolve other retry
problems in lanplus where assertion panics were hitting on certain retry
operations. A new, replacement patch for resolving both of these types of retry
bugs follows.
The first bug,where the ipmi_lanplus_send_payload() is sending a payload type of
IPMI_PAYLOAD_TYPE_IPMI is retryable, however I found in testing that it did not
remove the previous request entry from the list of requests chain. If the
original message had timed out, a second message sent, the second reply would
not match up to the right entry on the list as the req command and sequence
numbers are the same. By first removing the first request from the chain this
resolves it. The consequence of not removing the stale entry was random errors.
The second bug is when waiting for a message response times out during the
ipmi_lanplus_send_payload types IPMI_PAYLOAD_TYPE(s) RCMP_OPEN_REQUEST, RAKP1,
RAKP_3. In various testing where the message timed out on either of these three
payload types, ipmitool would assertion panic upon retry as the session_state
was wrong. The timeout could be due to the message never getting to the BMC, the
BMC never acting/responding to the message, or the reply message packet dropped
(it is UDP after all). If the BMC had acted on the message but the reply was not
received, the BMC state would had advanced, and a retry of any of these three
commands would error. It is not knowable at retry time if the BMC had acted on
the message or not. The solution is upon message timeout failure, retry all
three commands in the sequence. This has shown to be reliable and does not
result in assertions or any unexpected BMC behaviors. Should the original
message response eventually arrive very late, it is just discarded.
The testing for these problems was elusive until we found a moderately slow BMC
and had separate sessions direct a fusillade of nmap operations on the BMC, then
run simple ipmitool commands. This caused sufficient loading of the network and
BMC to cause lengthy delays and outright packet drops. The general approach on
the second fix is to return a timeout error code back through ipmi_lanplus_open
where the sequence can be retried.''
Patch-by: Pat Donlin
Currently if we are connected to ipmitool sol session and if service processor
goes down due to reset/reload, then user has no way to know that sol session has
been disconnected. Commit aims to fix such case.
Patch-by: Mamatha Inamdar
Commit replaces size decoding code with code ported from "decode-dimms" Perl
script found in i2c-tools 3.0.3. Former code has reported incorrect size of DDR2
modules.
Patch-by: Alexander Amelkin
If we have to retry an open session request, we hit an assert
that assumes we can only be in LANPLUS_STATE_PRESESSION state.
Add LANPLUS_STATE_OPEN_SESSION_SENT so we don't abort if
we retry.
Commit for Anton Blanchard
If ipmi_lanplus_send_payload fails we get a NULL pointer
returned. Error out straight away instead of continuing on
and getting a SEGV when we dereference rsp.
Commit for Anton Blanchard
Check the return code of ipmi_main_intf->open(), and take the
error path if it fails. Right now we continue on blindly which
results in a SEGV.
Commit for Anton Blanchard
Replace tKFWUM_Status with int
Commit replaces tKFWUM_Status with int. tKFWUM_Status is all nice and neat, but
if int can do, why would you use something that makes your lines unnecessarily
longer?
Remove duplicate Kontron IANA number
Commit removes/replaces duplicate Kontron IANA number which can be found in
'include/ipmitool/ipmi.h' as well. Therefore there is no need to have it here.
KfwumShowProgress() - code formatting, fix
Commit fixes code formatting in KfwumShowProgress() and replaces ``unsigned
char'', which didn't make any sense, with a ``signed char'', resp. ``char''.
Rename KfwumValidFirmwareForBoard(), document
Commit renames KfwumValidFirmwareForBoard() to ipmi_kfwum_checkfwcompat() and
adds a bit of documentation about this function.
Code formatting of this function changed as well.
* print error if not enough parameters given, return code 1
* recognize 'help' as a valid parameter
* print error if a invalid parameter is given, return code 1
Restoration of the interface target address and channel after a bridged
request was incorrectly tied to a non-zero saved target address. This does
not work for the Openipmi interface because the default interface target address
for the Openipmi interface is zero by default.
The patch removes hard-coded 16-byte length restriction onf FRU inventory
transactions. Instead, it adds an optional command-line argument for devices
which need such restriction.
For other devices, 32 bytes cap length is used.
Also, the patch contains several code optimizations as well as several bug-fixes
in API implementations where absolute FRU device offsets were used instead on
relative.
Commit for Dmitry Bazhenov
This patch does the following:
- Fixes percentage visualization for short upgrade images
- Resolves ambiguity for action record checksum calculation
- Skips the activation stage when all components are skipped
- Partially fixes formatting
- Adds several code optimizations
Commit for Dmitry Bazhenov
Commit handles possible int *flow via user input. atol()/make_int() calls
got replaced and, at least, 'errno' is being checked after strtol() calls
while reading data from file.
Reported-by: Duncan Idaho
Commit fixes fd leaks in 'lib/ipmi_ekananlyzer.c' and 'lib/ipmi_fwum.c'.
Commit fixes file descriptor leaks in ipmi_ekanalyzer_fru_file2structure(),
source 'lib/ipmi_ekanalyzer.c', and in KfwumGetFileSize(),
source 'lib/ipmi_fwum.c'.
Reported-by: dcb
Commit fixes corruption in 'lan alert print' output. This bug comes from two
consecutive calls to get_lan_param_select() which returns pointer to struct. In
the end, the second call would over-write data from the first one, as 'ptype'
and 'paddr' were pointing at the same address.
Thanks to Rob Swindell for logging this bug and testing the patch.
Provides configuration script, systemd unit and sysconfig defaults.
On hosts running net-snmp and PEF alerting on BMC:
1. Redirect SNMP get requests to BMC (Service Processor).
2. Redirect SNMP Traps from BMC (Service Processor) to the Hosts' configured Trap sink.
Commit fixes incorrect array index in get_lan_param_select(). The param value
matches the cmd in the lan_param struct, but it's not the same as the
ipmi_lan_params[] array index. Here is an example of what I mean. This problem
becomes apparent with the OEM extensions which use values 192+.
Commit for Jeff Bastian
Commit fixes segfault in 'set' sub-command when no IPMI interface is
present/available. This is caused by 'intf->session' being used without check
whether it's NULL or not which leads to NULL reference in printf().
Fixed the hpm upgstatus command to print the results of the command
without having to specify -v to enable verbose operation.
It's not clear that this command is even useful to the user at all.
Perhaps it should be removed entirely.
Commit for Dan Gora
Update the help menu for the ipmitool hpm command. Fix the formatting
and explain better the options.
Changed the option 'upgrade <file> all' to 'upgrade <file> force'.
This makes it clearer that the user is overriding the version check
that 'upgrade <file>' performs.
Commit for Dan Gora
Added a new field to show the Deferred firmware version value as part
of the 'hpm check' subcommand.
The deferred firmware version is the version of the firmware which has
been loaded with the 'hpm upgrade' command, but not yet activated.
Commit for Dan Gora
Fixed a bug where the rolling percentage display could corrupt the
version line if the first call to HpmDisplayUpgrade resulted in a
non-zero percentage.
This was produced by performing:
ipmitool hpm upgrade hpm1fru.img
where hpm1fru.img is a small (820 byte) file.
We now call HpmDisplayUpgrade before we transfer any data to ensure
that we get 0% printed before the transfer starts.
Commit for Dan Gora
Added a '^' character to the ID field which will be set if the
component can be upgraded with the specified file with the 'hpm check
<file>' subcommand.
Commit for Dan Gora
Update HpmfwupgPreUpgradeCheck to check if the Aux version is also
different when it compares the Image version to the active and
rollback versions.
Fixed the indenting and style of HpmfwupgPreUpgradeCheck to make it
more readable.
Commit for Dan Gora
Commit squashes white spaces in 'lib/ipmi_dcmi.c'. Tabulators are used for
indentation now. I've tried to clean up comments, long lines, trailing white
spaces and tabs, code formatting. However, more work is needed especially in
ipmi_dcmi_main() where indentation level is reaching one too many.
No functional changes.
gethostbyname() can't handle IPv6. Despite this fact it seems worth of
nothing to check whether gethostbyname() really returned AF_INET or
not. And that's what attached patch does, resp. in case IPv6 is
returned then ipmitool shoud/will terminate.
Commit mitigates segfault in 'exec'/ipmishell when
invalid input is given. Code expects another _'_ or _"_ to come, but
if it doesn't, it ends up r/w unallocated memory.
Commit fixes issue with 'delloem' subcommands being executed via 'exec'. State
of variable 'current_arg' is kept between calls which leads to incorrect argv
parsing.
Set variable 'current_arg' every time ipmi_delloem_main() is called.
Commit contains following documentation changes and related code usage changes:
* sorted arguments
* sorted command line commands
* adds missing arguments
* adds hidden aliases arguments with note of deprecation (feel free to remove if
not deprecated)
* fixes incomplete synopsis
* restructures synopsis to logical blocks
* conditional argument and command combination overrides to fixed defaults
Commit for Ales Ledvinka
Retransmission of lanplus request is broken. ipmi_lanplus_send_payload() keeps
current timeout in local variable 'timeout' and increases it by one with each
retransmission. But ipmi_lan_poll_recv() waits for response for session->timeout
seconds, which is not incremented -> the request is retransmitted only once,
when timeout and session->timeout equals. No other retransmissions are ever
sent.
In addition, the time is measured in seconds, therefore 'time(NULL) - ltime'
often equals 'timeout' and retransmission should be sent in this case (i.e.
'xmit' should be set).
Commit for Jan Safranek
When lan or lanplus session is being opened, ipmi_get_auth_capabilities_cmd() is
called twice. Now that we have -R and -N options it's not necessary to have such
weird code, especially with comment ``I'm not sure why we accept a failure for
the first call''.
Commit for Jan Safranek
Not all SEL entries have a "threshold value" specified, yet ipmitool sel elist
always displays a threshold value (as "0.0"), even when one is not specified.
Commit for Rob Swindell
Command "dcmi discover" fails with ``ERROR! This command is not available on this
platform'' unless the DCMI implementation advertises DCMI 1.0 or 1.1 conformance.
This means command will fail DCMI 1.5 capable hardware. Commit fixes this issue.
Commit for Rob Swindell
If any DCMI command fails, the function chk_rsp() in ipmi_dcmi.c displays the
incorrect byte as the completion code.
$ ipmitool dcmi power activate
DCMI request failed because: Unspecified error (dc)
The "dc" value printed is actually the "Group extension identification" byte
which *always* has the value 0xdc for DCMI responses.
Commit for Rob Swindell
The patch adds support for direct serial interface drivers (Terminal and Basic
mode).
Despite both drivers implement single and double bridging, it doesn't work at
the moment. Making this functionality to work depends on outcome of
ID#3611226(?).
Commit for Dmitry Bazhenov
Intel 82751 MAC has several deviations in its RMCP+ implementation while working
in the super pass-through mode.
This patch adds a OEM handle which allows IPMItool succesfully interract with
boards equipped with this NIC.
Commit for Dmitry Bazhenov
getpass() and getpassphrase() library functions return pointer to a static
data array. When free() is called on such pointer, it abnormally terminates
application.
Commit for Dmitry Bazhenov
Commit replaces strtol() calls with str2uchar() ones in order to mitigate
possible *flow via user input.
Also, limits are applied to 'Component ID' and 'Properties selector' now.
Reported-by: Dune Idaho
Commit replaces atoi() and strtoul() calls with wrappers in order to prevent
possible int *flow via user input.
Also, limits on user provided values are applied wherever possible.
Reported-by: Dune Idaho
Commit adds new function str2char() into 'lib/helper.c'. Also, function
is_fru_id() moves from 'lib/ipmi_fru.c' into 'lib/helper.c' in order to be
utilized by other modules.
Commit fixes bug where OS default values were over-ridden if the corresponding
enable/disable arguments weren't provided via command-line parameters.
Commit also changes IPMI shell default configuration setting from 'yes' to
'auto'.
Commit for Dmitry Bazhenov
Fixed a bug where connecting to a remote shelf manager via the lan
interface would always fail with:
``Activate Session error: Session sequence out of range Error: Unable
to establish LAN session''
This is due to a bug introduced in get_random() by fix for ID#3600963 where
braces were missing from an error check.
Commit for Dan Gora
ID: 3564701 - ipmitool 1.8.12 doesn't build on big endian architectures
Compilation would fail on big endian architecture because BSWAP_32 was not
defined in 'ipmi_chassis.c' and 'ipmi_pef.c'.
The problem was '#include <ipmitool/bswap.h>' depended on WORDS_BIGENDIAN which
comes from '<config.h>'. However, none of the previous header files
would include '<config.h>', so it remained undefined.
'bswap.h' gets included unconditionally now.
Commit for Dan Gora
Change the amc channel descriptor ports to be displayed in decimal
instead of hex. This matches the 'fru -v' output in ipmitool.
Add decimal value of Link Asymetric Match values. So people don't have to
look up the value in the source or in the PIGMG spec.
Commit for Dan Gora
Due to a bug in gcc where unaligned bit fields were not packed correctly
before gcc 4.4, we changed the fru_picmgext_amc_channel_desc_record
and fru_picmgext_amc_link_desc_record structures to use
larger types to be packed correctly. This then requires
us to use the FRU_PICMGEXT_AMC_CHANNEL_DESC_RECORD_SIZE and
FRU_PICMGEXT_AMC_LINK_DESC_RECORD_SIZE defines instead of sizeof for
these structures.
Updated ipmi_ek_create_amc_p2p_record() and
ipmi_ek_display_amc_p2p_record() to read data in the correct byte order
on both big and little endian machines.
Commit for Dan Gora
Fixed several bugs with printing out the Carrier and AMC connectivity
information with 'ipmitool -v fru'
There were several bugs that were caused due to using bitfields with
char types in ipmi_fru.h. GCC versions before v4.4 had a bug where
they did not pack the bitfields correctly if the bitfields were not
cleanly aligned with the underlying char type.
Fixed and cleaned up all other PICMG FRU records.
Commit for Dan Gora
Fixed a bug where the carrier connectivity point to point descriptor
was not being displayed properly when compiled on big endian machines.
Commit for Dan Gora
Fixed bugs in ipmi_ek_display_chassis_info_area(),
ipmi_ek_display_product_info_area(), and
ipmi_ekanalyzer_fru_file2structure() where fread was being called to
read one byte of data into a int or long data type. This would result
in the value being byte swapped since the byte was read into the most
significant byte of the int (ie byte 0) on big endian machines.
Commit for Dan Gora
Previous versions were not setting the file_offset properly if a Custom
board type was found, which would prevent subsequent dissectors from
operating properly and terminating the output of 'ipmitool ekanalyze
frushow oc=<atca carrier fruinfo>' early.
Rewrote ipmi_ek_display_board_info_area() to fix indentation and
to properly set the file_offset and end the while loop if a Custom
board_type was found.
Previous versions were also abusing the board_length variable,
treating it as an int and using it to break out of the loop.
Commit for Dan Gora
Rewrote ipmi_ek_display_chassis_info_area,
ipmi_ek_display_product_info_area, and
ipmi_ekanalyzer_fru_file2structure to reverse the checks of error
conditions to reduce the amount of indentation required.
Commit for Dan Gora
Commit updates main help of 'lib/ipmi_sdr.c'. Changes:
* LOG_ERR -> LOG_NOTICE
* add error messages, eg. Invalid command, Not enough parameters etc.
* handle 'sdr fill INV_PARAM'
* return codes on error
* general fixes and changes of SDR help output
Reported-by: Dan Gora
Performing prefix or postfix increments, eg. ++var or var++, in the
arguments to printf is inherently non-portable and may give different
results on different platforms.
Commit mends this issue.
Commit for Dan Gora
Commit adds the hex value for the sensor type to displays so that the user
can correlate sensor type values with their hex values without having to
look them up in the IPMI spec.
Commit for Dan Gora
Previous versions had two values for "Watchdog" in the list which
means that users could not perform # ipmitool sdr type "Watchdog";
and get the IPMI v1.0 and later version of the watchdog sensor,
eg. 0x23 instead of 0x11.
Commit for Dan Gora
Commit removes -Wno-packed-bitfield-compat from 'configure.in'. This was hiding
an important bug in ipmi_fru.h and is not a valid flag for older versions of
gcc.
Commit for Dan Gora
This code was moved to ipmi_main.c from open.c and in the change a bug
was introduced where the PICMG Get Device Locator command would not
be run unless the user explicitly set my_addr to 0 with the -m command.
The more sensible thing to do is to run this unless the user explictly
overrides it with the -m option.
Commit for Dan Gora
The previous test to see if we need pragma pack(1) was failing if we
cross compile because there was no way to run the test.
We now use AC_TRY_COMPILE and add the pragma pack(1) to the test code.
If it compiles, it must be good, so add the define.
Commit for Dan Gora
Commit fixes issue in 'user priv' sub-command which turns off LinkAuth whenever
user's privilege is changed. This was caused by not setting apropriate bits.
However, fix leverages Set User Access Command(IPMI spec. v2 PDF, p.320) and
sets 7th bit of 1st byte to 0. This tells BMC not to change IPMI messaging,
LinkAuth and Callback for given user.
As a consequence, ipmitool no longer turns 'IPMI messaging' on by default when
user's privilege is being set. IPMI messaging can be turned on/off via 'channel
setaccess' sub-command.
Reported-by: Kipp Glover
Commit fixes incorrect evaluation of str2uchar() return value in
ipmi_sdr_print_type(). Prior to this fix, practically no user input was accepted
as a valid one in # ipmitool sdr type HEX_SENSOR_TYPE ;
This bug was introduced by ID#3528368 - 'lib/ipmi_sdr.c' - possible int *flow
Commit fixes problem in 'lib/ipmi_delloem.c'. Command % ipmitool delloem mac;
returns wrong MAC when flex addressing is enabled on the blade chassis.
Commit for Krishnaprasad K
The Information given by the command SEL was incorrect in "Get SEL Allocation"
command. According to the specification "byte 10" in response denotes the
"Maximum record size in allocation units". This information is given as "Max
Record Size : " in sel command. However, ipmitool was getting "byte 9" instead
of "byte 10".
Commit for Gokulakannan
The event data and SDRs support assertions and deassertions for threshold events
as well as discrete events. So print out assertion and deassertion on all
events.
Commit for Corey Minyard
Commit is a response(and fix) to double-free bug in 'lib/ipmi_main.c' via
username. Now, pointers should be set to NULL after calling free().
Reported-by: Ales Ledvinka
Commit changes code formatting in 'lib/ipmi_delloem.c' to be more consistent
with the rest of ipmitool's code. No functional changes are intended.
Clean up isn't perfect, but it's one of steps in long term effort.
Commit removes 'size' check from ipmi_fru_get_multirec_from_file() as
an unsigned value can't be less than zero(0).
This error has been introduced by ID#3600911.
Reported-by: Ales Ledvinka
Commit fixes possible NULL reference in 'lib/ipmi_lanp.c' which is caused by not
checking return value of get_lan_param(), resp. get_lan_param_select(). This
function can return NULL in certain situations.
I'm reverting previous commit. I'm not sure what happened, but there is a huge
difference between what got committed, what came as a diff in e-mail and what
should have been committed in the first place.
Commit replaces condition ``if (p == NULL)'' in get_lan_param_select(). This
condition is never met, because structure is on heap.
Condition is replaced by for() control structure which goes through structure
ipmi_lan_params and checks whether requested LAN parameter is defined in
structure or not.
Reported-by: Ales Ledvinka
Commit fixes possible integer *flows in 'lib/ipmi_delloem.c'. Function
make_int() is removed and replaced with calls to appropriate str2*() function
calls from 'lib/helper.c'.
Reported-by: Duncan Idaho
Commit changes handling of response in ipmi_event_fromsensor(). If ccode doesn't
equal to 0, then error message is printed and function returns.
Reported-by: Duncan Idaho
Commit is a rewrite of function ipmi_fru_get_multirec_from_file() in
'lib/ipmi_fru.c'.
Changes:
* argument size is checked; size must be greater than 0
* argument pFileName is checked
* return value of seek() is checked
* error messages are printed on STDERR
* code flow got a re-work
Commit moves one #ifdef upwards in the code, so resources are not wasted
pointlessly. There is no need to allocate memory for variables/structs and open
interface, if we're about to quit immediately because LAN+ support is not
enabled.
Error message got changed as well and it gets printed on STDERR where it
belongs!
Commit changes return value of ipmi_fru_get_adjust_size_from_buffer() from void
to int in order to determine whether call was successful or wasn't.
ipmi_fru_upg_ekeying() got re-work as well.
Changes to ipmi_fru_get_adjust_size_from_buffer():
* CHUNK_SIZE removed
* code formatting
* return value void -> int
Changes to ipmi_fru_upg_ekeying():
* check whether pFilename is NULL
* check return values of called functions
* re-work code - return early on error instead of nested if()
* added (error) messages
Commit fixes memory leanks in functions ipmi_fru_set_field_string() and
ipmi_fru_set_field_string_rebuild() in 'lib/ipmi_fru.c'.
Note: it seems to me like these for() cycles do nothing.
Reported-by: Ales Ledvinka
Commit changes function ipmi_lcd_get_platform_model_name() to return integer
instead of void to signal potentional problems/issues.
Reported-by: Ales Ledvinka
Commit changes are related to ipmi_ldc_set_lock() in 'lib/ipmi_delloem.c':
* use 'else if' instead of 'if' since it's the same given the context and
probably better
* use 'rc' variable, since it's there, rather than 'return'
Note: ipmi_lcd_set_lock() would use some re-write.
Reported-by: Ales Ledvinka
Commit changes evaluation order of 'oemtype' which is an input parameter to
ipmi_oem_setup() in 'lib/ipmi_oem.c'. Make the check whether 'oemtype' is NULL
or not one of the first things we do rather than blindly use 'oemtype' in
strncmp() and then check if it isn't NULL. Yes, this is a potential crash
waiting to happen.
Reported-by: Ales Ledvinka
Commit fixes NULL dereference in 'lib/ipmi_sdr.c' by checking whether Sensor is
type of 'full' or 'compact'.
Fix by: Jim Mank
Reported by: Ales Ledvinka
ID: 3601106 - # ipmitool sensor get NACname; output incorrect/inconsistent
After a lengthy discussion with Jim, I'm removing free() of sdr_record_list in
ipmi_sensor_get() as this is freed in 'lib/ipmi_main.c' on/prior to ipmitool's
exit.
Commit re-works output of # ipmitool sensor get; command. It removes calls to
sensor specific functions with call to ipmi_sdr_print_listentry(). This way,
output is unified with the output of '-v sdr list' and actually has corrent
information. Well, at least errors are gone and no information seems to be
missing.
Commit fixes help and return codes as well.
Commit fixes crash in ipmi_print_sensor_info() in 'lib/ipmi_dcmi.c' due to NULL
reference. 'rec' is correctly checked whether NULL or not, but it's used
immediately despite of the outcome of the NULL test.
Also, ipmi_sdr_print_rawentry() is used instead of specific print function.
ID: 3597782 - 'lib/ipmi_mc' - sysinfo_param() has two consecutive returns
ID: 3597781 - 'mc getsysinfo|setsysinfo' help has typos
Commit changes/fixes issues described in tickets #3598203, #3597782 and
#3597781.
Typos in help text of 'getsysinfo'/'setsysinfo' got fixed and function
printf_sysinfo_usage() has been created.
Consecutive return in function sysinfo_param() has been removed.
Some code has been re-worked:
* ipmi_getsysinfo() -> ipmi_mc_getsysinfo(),
* ipmi_setsysinfo() -> ipmi_mc_setsysinfo();
* ipmi_sysinfo_main() extended for 'is_set' parameter to signal whether it's
a get/set operation
* return codes changed
* code styling clean-up
* a bit of code clean-up in ipmi_sysinfo_main(), ipmi_mc_getsysinfo(),
ipmi_mc_setsysinfo()
Commit fixes possible NULL reference in str2*() functions in 'lib/helper.c'.
Although it's less likely to happen in ipmitool's daily life, it's still
possible.
Let's make sure it doesn't happen.
Commit fixes output printed by # ipmitool sdr info; about 'SDR Repository Alloc
info supported' due to incorrect member name; probably because of copy-paste
error.
Commit fixes return code of # ipmitool sdr list|elist; when invalid
input/unknown command is given.
Return code is > 0 now and error message is printed.
Commit fixes segafult in ipmi_sol_payload_access_status in 'lib/ipmi_sol.c' when
no response is received. This is caused by passing NULL to lprintf() as
parameter, resp. accessing response data that aren't there.
Reported by: Ales Ledvinka
ID: 3582310 - 'lib/ipmi_fru.c' - ipmi_fru_main() - misuse of printf()
Commit is a major re-work of ipmi_fru_main().
* Help print-outs moved into functions.
* Proper return codes on error/help, although some TODOs remain.
* "discovery" 'fru get'
* hopefully less bloat in ipmi_fru_main()
Commit removes pointless(?) and unhandled cast from uint32_t to uint8_t and
back. intf->target_addr is uint32_t, don't try to "squeeze" it into uint8_t
then.
Reported by: Duncan Idaho
Commit fixes possible int *flow in ipmi_sdr_print_type() in 'lib/ipmi_sdr.c'.
str2uchar() is used instead of strtol() which wasn't being checked for errors.
Reported by: Duncan Idaho
Commit fixes *flow via atoi() and not checking strtol() properly. is_fru_id()
wrapper has been added to mitigate code repetition.
Reported by: Dune Idaho
PROPER - Commit fixes ipmi_get_sol_info()'s return value, so (-1) is returned on
error, eg. response is NULL. It doesn't matter whether it is first or last
response, we bail out immediately.
Commit also fixes missing argument to one lprintf() and
indentation(spaces->tabs).
This bug is connected with ``ID: 1835038 - 'lib/ipmi_sol.c' -
ipmi_get_sol_info() returns always 0''.
Reported by: Duncan Idaho
Commit fixes ipmi_get_sol_info()'s return value, so (-1) is returned on error,
eg. response is NULL. It doesn't matter whether it is first or last response, we
bail out immediately.
Commit also fixes missing argument to one lprintf() and
indentation(spaces->tabs).
This bug is connected with ``ID: 1835038 - 'lib/ipmi_sol.c' -
ipmi_get_sol_info() returns always 0''.
Reported by: Duncan Idaho
ID: 3578275 - 'lib/ipmi_fru.c' - memory leaks
Commit fixes several memory leaks and possible call of free() on memory that has
been already freed.
Despite 'goto' should be avoided as much as possible, its use seemed to be quite
reasonable in this case.
Commit fixes possible NULL pointer by adding check whether fru_bloc, returned
from build_fru_bloc(), is NULL or not. If it is, print an error message and
return (-1).
Commit fixes two memory leaks in 'lib/ipmi_main.c'. They were caused by not
freeing memory allocated by strdup() which uses malloc() underneath.
Reported by Duncan Idaho.
Some of configure's knobs and switches, eg. --disable-intf-open, don't work.
This is caused by poor choice of variable names, resp. using the same variable
names Autoconf is using. And Autoconf doesn't like it, resp. gets confused.
Variable names prefixed with an 'x' in order to make them 'unique'.
Commit removes pointless(?) and unhandled cast from uint32_t to uint8_t and
back. intf->target_addr is uint32_t, don't try to "squeeze" it into uint8_t
then.
Commit removes false presumption there is no BMC driver for SPARC platform in
Solaris. Also, this makes BMC driver default to yes, being built, on Solaris.
Commit fixes inconsistent behaviour of 'sel set time' command. This was caused
by random init values of tm structures.
Also, the state of DST should be looked up now.
Date: Mon Aug 13 14:35:28 2012 +0200
Fixed ipmievd start under systemd.
Systemd init system starts services with parent PID=1. Still, it is expected
that the daemon forks and exits with nozero exit status, if its initialization
fails.
Signed-off-by: Duncan Idaho <dune.idaho@gmail.com>
Commit fixes case when ipmitool is built without any LAN interface support,
resp. without LAN and LAN+ support. In such case, build would fail because
md5.c and md5.h are not being linked.
Commit adds 'src/plugins/lan/md5.c' and 'src/plugins/lan/md5.c' to
'lib/Makefile.am'.
Support added for Post Fatal Error or Events of
sensor type 0x0F. This includes the Fatal Errors
generated from BIOS, BIOS POST, CPU and Others.
Signed-off-by: Srinivas Gowda G <Srinivas_G_Gowda@Dell.com>
IDPT memory - 0x2B. Support for status check of
communication channel between BMC/Other Hardware/CPU. Support for
Flex Address and Virtual MAC Support for Non-Fatal
PCIE error sensor type 0xC2 and Fatal IO Error 0xC3
Signed-off-by: Srinivas Gowda G <Srinivas_G_Gowda@Dell.com>
is generated for Uncorrectable ECC and errors with respect to
each Memory Bank,Card or DIMM. The Sensor type
included in this patch are 0x0C and 0x10.
Signed-off-by: Srinivas Gowda G <Srinivas_G_Gowda@Dell.com>
for example - if the current UNC is set to 10, one can set the UC to a value less than 10.
In this patch the values are first read and validated against the user specified values and then set.
Signed-off-by: Srinivas Gowda G <Srinivas_G_Gowda@Dell.com>
a sensor reading when the reading/state unavailable bit was set. This
change makes sure a valid readiing is never returned for a sensor marked
reading/state unavailable.
implemented without an HP oem specific switch by modifying each interface
open routine to read and cache the OEM manufacturer (via the Get Device ID
command) immediately upon open and to reset the cached OEM manufacturer
id to unknown upon interface close. The cached manufacturer value in the
interface is then be used at run time to implement the manufacturer
specific code.
A non threshold sensor has an analog value if it is defined as having
analog units and it has either valid percentage or modifier units
defined and the manufacturer is IPMI_OEM_HP. The determination of
whether or not a given sensor has an analog value is contained in a
single function (sdr_sensor_has_analog_reading).
This patch also encapsulates the reading of all sensor values in
ipmitool into a a single ipmitool function, ipmi_sdr_read_sensor_value.
The prior independent sensor reading code paths have been collapsed into
one sensor reading code path. This encapsulation enabled consistent
validation of all data returned by the IPMI get sensor reading command.
In implementing a single sensor value read function, I resolved the
inconsistencies between what the "sensor" and "sdr" arguments displayed
and I also resolved numerous cases where uninitialized information in
the IPMI reply from get sensor reading was being interpreted and
incorrectly displayed.
From: Jan Safranek <jsafrane@redhat.com>
e..g 'ipmitool delloem lan help' should *not* check remote system for DELL
OEM commands before listing help. People tend to write scripts on different
machines and listing help is very helpful. In addition, why check for
setled support if only lan support is needed?
From: Jan Safranek <jsafrane@redhat.com>
'ipmitool dellem powermonitor' command should convert data from
network-format to the native one, otherwise it shows garbage on ppc/ppc64
platform.
Board Mfg Date. This date is computed by taking the timestamp in the FRU,
which is based off of 1/1/1996 0:0:0 and adding the delta time from
1/1/1970 0:0:0 to 1/1/1996 0:0:0 so that it can be interpreted by Linux time.
This delta time is a hard-coded constant in ipmi_fru.h (secs_from_1970_1996).
This constant is incorrect. The correct delta from those two dates should be
820454400. This is resulting in a Board Mfg Date that is actually 1 hour
earlier than what it should be.
commited for Renzo Hayashi
* validate user input in 'lib/ipmi_sunoem.c', resp. ipmi_sunoem_main()
* 'sunoem sshkey' would accept undefined actions and exit with RC = 0
* RC > 0 and help will be displayed for unknown commands/actions
* "code bumming" - some conditions seemed to be redundant
commited for Duncan Idaho
1] fail when no curses or readline is found, yet
ipmishell is about to be compiled in. ipmishell depends on these two
libraries;
2] add 'ipmishell' line to the % ./configure ; summary output to tell user
whether ipmishell support is enabled or disabled.
Committed for Duncan Idaho
doesn't matter whether printf() outputs at same output as LOG_NOTICE does.
Such
things should be the same for all modules.
Moves argc/help check up in the code, resp. in ipmi_picmg_main(), to
avoid unnecessary query to IPMI dev. It doesn't make sense to query IPMI
device
only to print help and terminate immediately.
Comitted for Duncan Idano
Password is limited to 16 bytes, resp. 20 bytes, for LAN, resp. LAN+,
interface. User name is limited to 16 bytes, no interface limitations.
Reference: SF.net ID#3184687, ID#3001519
Changes done by Duncan Idaho
* return value != 0 when no or not enough params given
* replaces strtol() calls with str2uchar() ones
* invalid input checking and error messages for such events
* ipmi_lanp_main() got slight work-over
Changes return type from int to uint8 since returned value is being assigned
into uint8_t.
Changes return value from (-1) to 0, because of uint8_t. 0 is considered as an
invalid LAN channel anyway, so there is no reason for returning (-1).
Running an "ipmitool sensor list" command on a system where remote sensors are
not on channel 0 results in unexpected behavior. The SDR functions were fixed
in January of 2009 (lib/ipmi_sdr.c, rev 1.86) to use target I2C addresses and
LUNs for non-BMC-owned sensors. Sensors owned by satellite controllers on other
channels were read as if they were on channel 0.
I've fitted patch, posted alongside bug report, to CVS version.
These functions utilize strtol() and strtoul() to convert input and check for
invalid input as well as for *flows.
Functions added: str2long(), str2ulong(), str2int(), str2short(), str2uchar();
* Module retreive from application DCMITool that is originally based on IPMITool.
* File ipmi_dcmi.c does not have a restrictive license and as per the license on
* the top of the file, the software is provided "AS IS".
Allocated memory for fru is cleared.
Added check to prevent copying data from old fru beyond end of allocated memory
Code now keeps track of old and new product section length. Used to determine position of remaining bytes.
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,
Incremented to version 1.06
- Fix the help message for the picmg fru control command. The command doesn't
support an hex argument
- Changed output format to interpret the raw data supplied
- Prints 'ok' on success
As per in IPMI spec V2:
Table 20-2 Get Device Id command byte 3:
[7] 1 = device provides Device SDRs
0 = device does not provide Device SDRs
[6:4] reserved. Return as 0.
[3:0] Device Revision, binary encoded.
The mask need to be done on 4 bits.
2009-02-11
- With multi-component HPM file, if one component need to be skipped because
the component is already up-to-date, ipmitool sends "Initiate upgrade
action / Upload for upgrade" anyway.
If the component needs to be skipped, ipmitool will not send "Initiate
upgrade action / Upload for upgrade"
- Incremented version to 1.03
2009-02-11
- Fixed side effect introduced by last version, "forced" update didn't
work anymore
- Incremented version to 1.04
** REQ 3.410: Any IPM Controller may write protect data in the FRU storage
area and return a "Write protected offset (80h)" Completion
Code for a command that attempts to change such data.
-- To do so, add a function to build block region in the fru and write
data using block offset. If block if found to be write-protected,
jump over the protected block.
-- Should not change previous behaviour.
-- Have leave the previous functions in comments in reference.
-- Any questions, please send e-mail to jean-michel.audet@ca.kontron.com
Fake a timeout after IOL session re-open to force get upgrade status retry
Added retries on 0xD3 completion code
Added a provision for sub minor version, incremented to 1.0.1
-Display point to point physical connectivity between carriers and AMC
modules
-Display power supply informations between carrier and AMC modules.
-Display only matched results of Ekeying match between an On-Carrier device
and an AMC module or between 2 AMC modules.
Based on binary fru files supplied as parameter
See the updated manpage for details
fru edit [fruid] field [section] [index] [string]\
This can be used to change serial number information and such, use with care
Cleanup/improved 'oem' edit mode :
- defaults to PICMG for backward compatibily
- validates that 'oem' is followed by a 'iana' number
Attempted 'tabify' while integrating patch, hope the indentation will be ok
for others.
usage is : oem <iana> <recordid> <format> <args...>
it currently only supports Kontron's OEM information record type 3
but can be used to support additionnal record types
added additionnal parameters to allow specifying 'channel number' as well
as maximum 'read size', since some SMI or IPMB channels can't support 64
bytes.
this should be fully backward compatible as options are optionnal and a the
end of the original ones:
usage: spd <i2cbus> <i2caddr> [channel] [maxread]
Patch submitted by Harshad Prabhu (Harshad.Prabhu at radisys dot com).
Quoting his email:
"Initiate Upgrade Action (HPMFWUPG_UPGRADE_ACTION_UPGRADE) was called
for all components even when single component was given on command line
(hpm upgrade <filename> component <id>). So calling this command only
after we decide whether the component is skipped."
bridge support in open interface. This extension is not compatible with
FreeBSD OpenIPMI implementation (and with mainline OpenIPMI too, as far
as I can tell).
- The counter value was always interpreted as hours, the
minutes-per-count value wasn't regarded.
- No attention was paid to CPU endianness when reading the 32-bit
counter value.
Patch submitted by Ingo van Lil (inguin at users dot sourceforge dot net).
Sourceforge patch ID: 1592950
interfaces.
Patch is submitted by Ferenc Wagner (wferi at niif dot hu). Quoting his
email:
"The rationale is that the following code expects to use the return
value of recv (ie. a byte count) not that of select (the number of file
descriptors). recv should be executed anyway, that's the whole point of
this snippet..."
The original patch is for lan interface but it also applies to lanplus.
"isol activate" command.
Patch submitted by Steffen Persvold (sp at scali dot com). Quoting his
email:
"The second patch (ipmitool_isol.patch) is a little more interesting. It
is basically an implementation of true SOL functionality for the "isol"
command on IPMI 1.5. This allows people with Intel based 1.5 controllers
that have the Intel specific SOL implementation (which is close to the
2.0 spec but not quite there) to use the "isol activate" command. This
applies to Dell 1850, 1855, 2850 and sc1425 servers at least (probably
more, but that's what I've tested). There is quite some code duplication
from the lanplus sol version, so at some point "someone" might do some
refactoring and merge the two (only separating what's different) but for
now I thought it was cleanest to do it this way."
Patch submitted by Benoit Guillon [guillon@thalescomputers.fr]
The patch allows you to fill the SDR repository of a BMC with the built-in
sensor SDRs of the BMC and of the sensors of the satellite FRUs.
- adding new (partial) SDRs
- clearing the SDR repository (ok, it can be dangerous)
- adding SDRs from a dumped file.
Re.:
ipmitool sdr fill sensors
ipmitool sdr fill file <filename>
to the IPMI-defined maximum for non-bridged messages (32 bytes) when
sent via KCS interface.
- Double bridging via LAN is taken into account when calculating the
maximum Upload Firmware Block command length.
- Handling of the long response option of the Upload Firmware Block
command is implemented.
- The Component parameter of the Finish Firmware Upload command is
changed from component mask to component ID to conform to the HPM.1
specification.
- The Rollback Override parameter of the Activate Firmware command is
implemented. The hpm activate command-line parameter is extended with
optional "norollback" parameter.
- A bug that prevented from usage of multiple components in a single
upgrade image is fixed.
- Garbage in output of the component's description property is eliminated.
- Modified the display of upgrading firmware
- By default, if the user has not given any option for upgradem tgeb we skip the components if they have the same firmware version as compared to the image file (.hpm)
- Added a HpmPreupgradeCheck function that will check which components needs to be skipped
Tested OK with Kontron products (patch does not brake previous state)
ipmi_sel_get_oem_sensor_type
and
ipmi_sel_get_oem_sensor_type_offset APIs
as well as get_kontron_evt_desc.
Added lookups in ipmi_get_event_desc for OEM defined sensor types.
Added oem_kontron_event_types definition
- Fixed lan iface inaccesiblity timeout handling. Waiting for firmware
activation completion (fixed sleep) before re-opening a session and
get the final firmware upgrade status.
- Fixed some user interface stuff.
(I re-enable this function since the bug in the keep alive has been addressed)
- Keep the usage of sol for keep alive when usesolforkeepalive is added after
the activate.
thresholds and threshold mask. The "Discrete reading mask/Settable threshold
mask, Readable threshold mask" field in SDR has two bytes (16 bits). The 16 bits
should be treated as one uint16_t instead of two bytes. Otherwise, if someone
sets the fields to 0x3f, it will be mistakenly interpreted as 0x3f00 instead of
0x003f.
A clear and concise description of what the bug is.
*Please **DO NOT** report ANYTHING about 1.8.18, it is outdated. Please first check your alleged bug with the latest code from the top of the master branch here.*
**IPMITOOL Version**
Make sure you're reporting a bug in the latest code taken from `master` branch here, NOT a bug
that you've found in some version that you've got from your OS vendor or any source other than this repository.
```none
$ ipmitool -V
<outputhere>
```
**To Reproduce**
Steps to reproduce the behavior:
1. Using hardware/BMC '...'
2. Run `ipmitool ...`
3. Observe the abnormal reply:
```none
abnormal output example
```
**Expected behavior**
A clear and concise description of what you expected to happen.
"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"
@ -19,14 +21,9 @@
"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 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","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","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"
@ -54,11 +51,6 @@
"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"
@ -76,20 +68,23 @@
"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","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"
@ -98,11 +93,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","PERR: 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","BUS_CORRECTABLE: 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","PERR: 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","BUS_CORRECTABLE: 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"
@ -113,15 +108,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","PERR: 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","BUS_CORRECTABLE: 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","PERR: 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","BUS_CORRECTABLE: 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","PERR: 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","BUS_CORRECTABLE: 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"
"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"
@ -190,7 +187,9 @@
"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"
"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","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","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"
@ -198,5 +197,33 @@
"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","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"
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.