| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
| |
Modify to use the new provider API. One by one, change calls to
remove any legacy API constructs.
Tested-by: ipmitool raw 6 4
56 00
Change-Id: I3cf0a9bd93df6b12584861b4c60b272ff84b7dae
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Modify to use the new provider API. One by one, change calls to remove
any legacy API constructs.
Tested-by: ipmitool raw 6 1
check for expected output
Change-Id: I59688627eb32670559c1defad0b7af8abeb84c75
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Support for convert current channel number based on
ipmi::Context is added.
Tested:
Verified by updating the channel number manually and function
returns correctly. For correct value another gerrit patch is needed
which will advertise proper channel from which the command
originated.
Change-Id: Id17d87b6a945b0264c8f14348a50bc2c087d187e
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
When requesting a Request or Context object as part of the handler
signature, it should be a std::shared_ptr<ipmi::Context> or
std::shared_ptr<ipmi:message::Request>. There was a bug that made it so
it was not possible to have either of those in the signature. This
commit enables both.
Change-Id: Ib52000f643d7b5f21bc4022629e7d7b03a524dc1
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Some commands have optional return values. This allows the handlers to
be defined as returning an optional<T> value and then in the body of the
handler set the value in the optional or not.
Tested-by: unit test runs successfully
Change-Id: Ib38a4589609fb1eb192106e511c9ee3a507ac42f
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Add variant support to allow return of mutliple specific
types. Also change types to const as this is required by
the visitor and these could have been const all along.
Tested: Added unit test and used in oem provider
Change-Id: I5cb056c15d4813b9eee58eecb707664477d019d9
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
| |
Missing the correct exception was causing issues with setting the IPV4
address
Change-Id: Ieaaacfcbaec82a0c3b110889817a7ceb9cda8d3c
Signed-off-by: Dave Cobbley <david.j.cobbley@linux.intel.com>
Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
|
|
|
|
|
|
|
| |
Remove the "" style includes in preference of the <> style
Change-Id: I74bfa4dcadeaca7fe2341d5a9221844ebe2653b8
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
| |
New channel commands have been implemented in user_channel/channelcommands.cpp
This removes the old, unused command implementation
Change-Id: I054ea053d25865e0d4203f2ae294778d31817637
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
| |
These two files have now been replaced with newer APIs and can be removed.
Change-Id: If60227b24188c6796211ca43379169f9a95c9cb3
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow individual parameter changes to take effect based
on timer. i.e. setting any one LAN parameter change will take
effect even without Set In Progress parameter update
Verification:
Verified lan settings change to static alone using ipmitool lan
and manually issued parameter update without SET_IN_PROGRESS
change.
Change-Id: I2a9f8e8ef94ecb23da8bac38a6b49249544e8975
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
|
|
|
|
|
|
|
| |
Installs into bin instead of sbin per guidelines.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: If171989d2c0c6a53d9368b776ac98dea743057da
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
DCMI uses the group oem extension 0xdc. The legacy registration
allowed for registering with the group extension netfn and did nothing
with the actual group extension ID. This change makes the assumption
that all legacy group extension registrations are dcmi and registers
them as such with the new group handler machinery.
Tested-by: Run ipmitool dcmi discover and see it show information
Change-Id: I862ba212a7fe2e2dad83d6c9f22e7d1a48b7d406
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
| |
Historically, the provider libraries and symlinks to them were
installed in the /usr/lib/ipmid-providers directory. This can cause
ipmid to attempt to load each one twice. This change will make it
so ipmid will not load symlinks, but only real files.
Change-Id: I1353f01d509ef495bfa666eed97b034d73a1a90a
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
| |
In order to be compatible with older versions of GCC that did not have
the experimental filesystem moved over to the standard paths, the code
would splice the experimental code into the std namespace. This is no
longer necessary with yocto 2.6 and the latest versions of GCC.
Change-Id: I2db13c52a91456318795819f2d45c3386b4c56d2
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Moved the pam function from libusercommand to libuserlayer
Added the setPassword API in user layer.
There are modules which requires to use set password functionality
(other ipmi providers-OEM),so it's better to keep the set-password
abstracted in user-layer instead of user-commands.
LIBS macro hold libpam and libmapper.
we want to separate the libpam from lib usercommand.
so,replaced LIBS with libmapper alone.
Tested:Able to set the password in ipmi using userlayer.
ex: ipmitool user set password <userid> <password>
user password should set properly.
Change-Id: I32d55ff5c042613c89805c6b9393d18cbf880461
Signed-off-by: Suryakanth Sekar <suryakanth.sekar@linux.intel.com>
|
|
|
|
|
|
|
| |
Delete obsolete scripts/writechannel.mako.cpp
Change-Id: I79dac382132bf89877f2718d1b6219a2503e415e
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Get DCMI Capabilities (Discover) command returned
wrong values for parameters exceeding 1 byte length.
Also added the check for SEL entries number range
per DCMI specification.
Tested: the condition for value limit check works properly.
Change-Id: Iee0d75594067630bb6094d05533c87e3ad82807e
Signed-off-by: Kirill Pakhomov <k.pakhomov@yadro.com>
|
|
|
|
|
|
|
|
|
|
| |
types.hpp is required by utility.hpp, which is exported, so it needs to
be exported as well. This moves it to the include/libipmid directory,
changes the Makefile to export it, and changes all the files that
include it so it can be found in the right place.
Change-Id: I30ec365446e4de466c266ec4faa327478460ec05
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These are functions that are used widely by ipmid providers, so it makes
sense to put them in libipmi.so (the library that all providers must
link against).
Tested-by: use nm to inspect the binaries to see that the symbols are in
the expected library.
arm-openbmc-linux-gnueabi-nm libipmid.so.0.0.0 \
| grep getDbusObject
0001063c T _ZN4ipmi13getDbusObjectERN9sdbusplus....
Change-Id: I1221f807f2711c5301c5574623564ea1ae48a437
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
| |
handles is a poor name choice for the list of IpmiProviders and being
declared as an auto is hard to see what type it really is. This changes
the type to be fixed and uses a more appropriate name for the variable.
Change-Id: I35f744c491f3810c7381738516b8ff0a6f20f129
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added missing user enabled state update, to reflect the
enabled state immediately.
Tested-by:
1.verified updated user enabled state is reflected immediately
by querying getaccess for the user id
Change-Id: I42f7cbbe5a1bec9ffaafa61d5c550ea914bddc9c
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Get rid of duplicate getChannelName function. Use
the one with uint8_t channelNum.
Tested-by:
1. Verified RMCP+ session establishement works with newly
created user
Change-Id: Iac22ec665ece97d4f9471cfb40220b472bdf01e8
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
|
|
|
|
|
|
|
|
|
| |
This part was originally omitted, but needed by some external provider
libraries. This will more closely mimic the behavior of ipmid prior to
the architecture update.
Change-Id: I5db35222e268a117480285c700d88206d6505d92
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On some systems ipmid was not responding to SIGTERM so systemd
could not shut it down in a clean manner, resorting to SIGKILL
after a long timeout. This adds code to respond to SIGTERM and
SIGINT and safely unwind all the provider libraries on exit.
Tested-by: running ipmid; in another shell, and running
'killall -15 ipmid' or 'killall -2 ipmid' to send
SIGTERM or SIGINT and watch that ipmid shuts down
in a controlled and timely manner.
Change-Id: I690846796523bebea1a08845c0d17e1df2a94fee
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows providers or the main application to handle POSIX signals
using a callback chain. Each handler can return continueExecution or
breakExecution to stop the signal handling chain or allow it to
continue. Each handler is registered with a priority and upon reciept of
a signal, each handler is executed in priority order until the end of
the list is reached or one returns with breakExecution.
Change-Id: Idd83625eb1a2d3bdafc92bdd839e0d6386177ff2
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
| |
Change-Id: Iafe6827fa545d72666994bb68b5972cde4d0a1ff
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ipmid_get_sdbus_plus_handler() was re-added to be a part of
systemintfcmds where it was used. This moves it to libipmid.so
because that is where symbols used by both ipmid and the providers
should be.
Because ipmid_get_sdbus_plus_handler() relies on the io service and the
main sdbus::asio::connection is also right there, this moves those
symbols to libipmid as well to keep coherent.
Change-Id: Ib125a0c217c8bcf47a8a4bd0c557eb69e928245b
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Until the response goes back out onto D-Bus, the completion code is held
in a separate part of the Response object. The D-Bus response has a
separate field for the completion code as well, reserving a byte array
for response data only.
This fixes the ipmitool error message 'Bad response length, len=1' when
it attempts to query the PICMG capabilities.
Change-Id: Iff0c3cb2e46a20e52229265eebb0995878a41714
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Directly calling unpack from the Request interface will attempt to
unpack the whole message, resulting in a 0xC7 response if the whole
message was not unpacked. Since at this point in the execution, the
point is to only extract the group ID or the IANA, the lower-level
Payload unpack interface must be used. This allows for partial unpacks
and only returns error if there are not enough bytes to unpack.
Change-Id: Ie18377597e925eff89c9b7c1a6d2258627d5f240
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the timeout param is not specified in a sdbus call, the default value
of 25s is used, if not configured in the systemd configuration file.
It turns out this timeout is too long than ideal, since the other pieces
in the IPMI stack have much smaller timeout values. For example, the
BTbridge/KCSbridge has a timeout of 5s. It is unnecessary to let ipmid
getting blocked on waiting for D-Bus replies.
This commit changes the timeout to 5 seconds on D-Bus get/set properties,
mainly because these calls are the majority of sensor read/writes which
are most subject to operation timeouts. The other D-Bus operations might
be called for object/service discovering, which might be a one-time
startup procedure.
Resolves: openbmc/openbmc#3494
Signed-off-by: Kun Yi <kunyi731@gmail.com>
Change-Id: I5a55a8eb872b1ebe8730c673231be5037d24fc0b
|
|
|
|
|
|
|
|
|
|
|
| |
The whitelist RestrictionMode lookup was missing the interface name on
the properties get method call. This is a fixup for that.
Tested-by: watch ipmid startup and see that it does not complain about
fetching the whitelist setting.
Change-Id: I030c0c66771afcb987e0679595a2d662f7c3ea9e
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Recv Message Queue and SEL are enabled by default.
Event Message buffer are disabled by default (not supported).
Any request that try to change the mask will be rejected.
Test:
test pass with ipmitool
Change-Id: Ia6bd4a6bf7b2b04dcfde6bfec910ca854a7aaeb8
Signed-off-by: Jia, Chunhui <chunhui.jia@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As channel layer is separated out from user layer lib, it
has to be manually included in libusercommands, as user
command handlers use channel layer API's
Tested-by:
1. Made sure that libusercommands are loaded on it's own
without any undefined symbol error.
2. ipmitool user list 1 works on host interface
Change-Id: I6652ad248e01afc1349e3a9612754dbdb84b96ad
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
| |
From IPMI spec, response should be complete code only.
Tested:
ipmitool raw 0x00 0x04 0x02 0x00
Change-Id: I48a9f71e01c89ee1125d515c50e3e2655510d0ce
Signed-off-by: Jia, Chunhui <chunhui.jia@linux.intel.com>
|
|
|
|
|
|
|
|
|
| |
The move to the new API removed the ipmid_get_sdbus_plus_handler
interface because it looked like it was self-contained in the
executable, not realizing it was needed by an external provider.
Change-Id: I75bb898294cc59cae7d291f7a6a6ed1e61d62903
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
| |
Now that ipmid handles all the IPMI commands (for all interfaces),
converge to a single provider path.
Change-Id: Iad938d4440f8486741df491c7bfd0fa5f808afeb
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
| |
Implement the whitelist filtering as an optional provider using the
new filter registration mechanism.
Change-Id: I0d738e58508d31e6b1867e13b3b7ed048303d5d8
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Every ipmi command will pass through a filter prior to execution by the
registered handler. The filter consists of all registered filter
handlers that all must either return an IPMI error code or allow the
command to be executed. If any of the filter handlers return an error
code, the remaining handlers will not get a chance to run.
Each handler, executed in registered priority order, can be passed the
full message, or just the context (metadata describing the command,
netfn, cmd, etc.)
Change-Id: I3c48f19ebae0d24344b15fbcd2b940a32f8511d7
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
| |
Add full support for the IPMI OEM NetFn and the Group OEM support as
defined in the IPMI 2.0 specification.
For now the legacy OEM router mechanism is still supported.
Change-Id: I8cc999489000c6e0daf5aad3579838e6f499ba47
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
New architecture highlights:
* The new registration detects handler type for argument unpacking.
* Upon completion the response is automatically packed.
* Handlers can make use of the new async/yield sdbusplus mechanism.
* The queue exports a new dbus interface for method-based IPMI calls.
* The legacy handler registration is still supported for now.
* The legacy dbus interface is still supported for now.
Change-Id: Iae8342d9771ccebd3a0834e35597c14be4cc39cf
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
| |
This adds unit tests for the various types that the message
packer/unpacker handles. This includes tests for simple messages as well
as complex messages. It also includes positive and negative testing to
make sure that failed packing and unpacking gets reported properly.
Change-Id: I9360c867cccbeba6a707dda6df6c5e29fa585c5c
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
handler.hpp has the templated wrapping bits for ipmi command handler
callbacks implemented.
message.hpp has the serialization/deserialization of the ipmi data
stream into packed tuples for functions.
message/pack.hpp and message/unpack.hpp contain the actual serialization
and deserialization of types.
Change-Id: If997f8768c8488ab6ac022526a5ef9a1bce57fcb
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Separate the channel implementation from the user implementation. It is
possible to link only against the channel layer, but if code is using
the user layer, it is likely to need both user and channel code.
This makes it so that ipmid can support the notion of channels without
supporting users.
Change-Id: I3a7eb7c004e1c2f8aeb696180139cf68c2c4aac0
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
| |
Do not use c_str() when parameter is std::string.
Caught via cppcheck.
Change-Id: Iad7c1296d8be363df10ccf9278231187d7d29052
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
| |
Force symlink creation. In the event, the daemon is being built and
installed when already present, should force creation of symlinks and
not fail on this case.
Change-Id: Ic2cf84c36422a3be208a18a07daacfc6c587162b
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
| |
Add generated file entity-gen.cpp
Change-Id: Id2d13de766b3d4c924bc9a48963e556a9ec86f58
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
| |
Use the defaults in the pkg check where the default error message is
sufficient to identify which package is missing.
Change-Id: Iaa5325492d937899c06a5aecad9b6d1beaa81897
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adding support for Entity Association Record (SDR type - 0x08h)
This patch includes:
1) Entity Association Record yaml file example
2) Entity Assocation Record related script and mako file changes
3) Adding Entity Association Record in get_sdr IPMI command response
From the host, tested that entity association records can be fetched
Change-Id: I9cf598e5d27d2e8c6751bbaae2176e7c976974b1
Tested: Yes
Signed-off-by: Jaghathiswari Rankappagounder Natarajan <jaghu@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is a bit in SDR types 01h and 02h which indicate that a sensor is settable (Supports the "Set Sensor Reading And Event Status" command). Since OpenBMC has some sensors which support this command (eg. fan pwm sensor), the bit should also be set accordingly.
The bit in question is Settable Sensor and can be found:
IPMI Spec v2.0 rev 1.1:
Section 43.1 SDR Type 01h, Full Sensor Record
Table 43 - SDR Type 01h, byte 11, bit 7
Tested from the host side that the FULL SDR for sensors which are settable
shows up as settable.
Change-Id: I5bd140e035a5a96b977dbbbf4acaae0369e832d2
Tested: Yes
Signed-off-by: Jaghathiswari Rankappagounder Natarajan <jaghu@google.com>
|