| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
The default action is to return Command Not Found, which is exactly what
the wildcard handlers are doing. This just removes that extra code that
is not needed.
Change-Id: I0a25153395858efcdf56384ececaabc7eaf4e1af
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rewrite "Get sensor threshold" command to use the newly
introduced IPMI provider API.
Tested:
verified using ipmitool sensor commands.
Change-Id: Icdbb0e7b6964e52e9fe6d58d80694b2d3faa59d2
Signed-off-by: jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
Signed-off-by: jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change refactors GetSensorResponse from std::array to struct.
This change depends on change #23544.
GetSensorResponse is an internal, intermediate structure, an unpacked
form of a Get Sensor Reading response, providing direct access to its
fields. Its life time is:
GetReadingResponse -> GetSensorResponse -> ipmi::RspType.
It is written to in 5 functions in the ipmi::sensor::get namespace, by
four setter functions (setOffset, setReading, setAssertionBytes,
enableScanning).
It is currently read from by 1 function (ipmiSensorGetSensorReading)
for transforming to an ipmi::RspType.
Originally, the setter functions assumed bitwise equivalence between
GetSensorResponse and GetReadingResponse, and the setter functions
used reinterpret_cast to assign to a GetSensorResponse as if it were
a GetReadingResponse.
With this change, the reinterpret_cast's are removed, and the set
functions now accept GetSensorResponse instead of GetReadingResponse,
so the code gets a bit easier to read.
Tested: Tested using a server with a BMC; sensor readings obtained
through `ipmitool` appear to be correct (the reading might change
within a small range):
# ipmitool raw 0x04 0x2d 0x16
9B 40 00 00
Signed-off-by: Sui Chen <suichen@google.com>
Change-Id: I5d454d6249f5431fb98169e6ef7c585c34024004
|
|
|
|
|
|
|
|
|
|
| |
Rewrite: "Get sensor reading" command to new IPMI provider API.
Tested:
verified using ipmitool sensor commands.
Signed-off-by: jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
Change-Id: I61eb77216820795d6e422a69fc1f4314167373ff
|
|
|
|
|
|
|
|
|
|
| |
Step 4 of the transition from YAML to JSON will return the data from the
JSON file if present and valid, otherwise it'll fallback and return the
default example YAML present in the repository.
Tested: This was not tested.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I33c773fc53660a9eb5e27a8c8c3e231c64fe079d
|
|
|
|
|
| |
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I8c80acb694d067043b77d81dbb9a7ba0057fef56
|
|
|
|
|
|
|
|
| |
The object was left in the global namespace, but the type was in the
ipmi::sensor namespace. Move the object into the namespace.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I88e46da4abda220d3b6fcc2ea64b8ef0decb0dc3
|
|
|
|
|
|
|
|
| |
The object was left in the global namespace, but the type was in the
ipmi::sensor namespace. Move the object into the namespace.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: If3aa72ebbae980b0b837c45c8fcbc4b47b7fb742
|
|
|
|
|
|
|
| |
The pointer for the request is never null, therefore do not check.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I03639db3cb579260cb6579ad01837e7078520f1f
|
|
|
|
|
|
|
|
|
| |
Reduce indentation of code by flipping logic check. It looks like the
failure case should also set dataLen to 0, but it didn't previously,
therefore that would qualify for a follow-on patch.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I4abe6ec9382e7c5632bc364ba123c31323677e11
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rewrite "set SensorReading" command to use the newly introduced
IPMI provider API.
Tested:
Verified using ipmitool "set SensorReading", behavior is same before
and after the changes.
Signed-off-by: Deepak Kumar Sahu <deepakx.sahu@intel.com>
Change-Id: I9ee4276775e7c4a348c32a746e7fd7d55a943e06
|
|
|
|
|
|
|
|
|
|
| |
Add UPDATE_FUNCTIONAL_ON_FAIL and only when defined, read sensor's
OperationalStatus interface for the functional property and throw if the
sensor is not funcitonal.
Bug: openbmc/phosphor-hwmon#10
Signed-off-by: Brandon Kim <brandonkim@google.com>
Change-Id: I1144a6d3f8145bda73f3363664ca48b848a295db
|
|
|
|
|
|
|
|
|
| |
Add an accessor to grab the entities singleton as a step towards
building it on first access from json.
Tested: This change has not been tested beyond build verification.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I2cf1fbd7ad10b4e1b63af347c824ad37bc8a56c9
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rewrite "Get SDR info and Reserve SDR" command to
use the newly introduced IPMI provider API.
Tested:
verified using ipmitool sensor commands.
a. get SDR info
Command: ipmitool raw 0x04 0x20 0x01
Output: 02 01
Command: ipmitool raw 0x04 0x20 0x00
Output: 00 01
b. reserve sdr
Command: ipmitool raw 0x04 0x22
Output: 01 00
Signed-off-by: jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
Change-Id: Id1d7015cec45c5524210033e4210c710da27e9ae
Signed-off-by: jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
sdbusplus::message::variant_ns has been std for a while now. This moves
ipmid away from sdbusplus::message::variant_ns to directly use
std::variant.
Tested-by: built, compiles, and runs the same as before.
Change-Id: I8caa945f31c926c2721319f001b9d7f83fd3f1b7
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After some feedback from users of the new IPMI API, they wanted to see
two things:
1) don't require ipmid/api.hpp and ipmid/registration.hpp to be able to
write new handlers
2) only require including ipmid/api.hpp (instead of ipmid/api.h)
So now, by simply including ipmid/api.hpp instead of ipmid/api.h
(deprecated), handlers incorporating the new IPMI API can be written.
Change-Id: I446dcce70cff03d4ecc28c658292d052485f77fc
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This command is used for logging SEL.
Tested:
1. test with netipmid and ipmid.
2. test pass with good parameter
ipmitool raw 0x4 0x2 0x20 0x11 0x04 0x11 0x80 0xc0 0x10 0xFF
ipmitool raw 0x4 0x2 0x20 0x11 0x04 0x11 0x00 0x30 0x10 0xab
3. test pass with bad parameter (expect invalid data length error)
ipmitool raw 0x4 0x2 0x20 0x11 0x04 0x11 0x00 0x30
ipmitool raw 0x4 0x2 0x20 0x11 0x04 0x11 0x00 0x30 0x11
ipmitool raw 0x4 0x2 0x20 0x11 0x04 0x11 0x00 0xc0
ipmitool raw 0x4 0x2 0x20 0x11 0x04 0x11 0x00
Change-Id: I7d51aac8fee2edb1faeb91f4c96a033736068779
Signed-off-by: Jia, Chunhui <chunhui.jia@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This starts a transition to common ipmid libraries that providers can
link against. It will allow for a cleaner separation between common
ipmid functionality and daemon type specific code. This is needed so we
can resolve all of the symbols in the providers at link time instead of
discovering bad linkage by building and running a full ipmi daemon.
In future commits libraries will be packaged for libipmid and libipmid-host
which provide all of the symbols used by the current set of ipmid
providers.
This is the first step, it just separates and renames the headers.
Legacy symlinks are still kept around for compatability. It also adds
stub libraries so that external users can start linking as intended.
Change-Id: I6bbd7a146362012d26812a7b039d1c4075862cbd
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
| |
Use actual RPM unit type code from IPMI specification
instead of revolutions type code coupled with per minute bit,
which is also unused in most ipmi client implementations.
Change-Id: If42900950a21f5526e890aef0dd6822e4e54c6e3
Signed-off-by: Kirill Pakhomov <k.pakhomov@yadro.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[app/channel.cpp:102]: (style) The scope of the variable 'resp' can be reduced.
[ipmisensor.cpp:310]: (style) The scope of the variable 'i' can be reduced.
[ipmid.cpp:506]: (style) The scope of the variable 'num_handlers' can be reduced.
[read_fru_data.cpp:82]: (style) The scope of the variable 'fruId' can be reduced.
[sensorhandler.cpp:256]: (style) The scope of the variable 'p' can be reduced.
[storageaddsel.cpp:68]: (style) The scope of the variable 'p' can be reduced.
Also delete two extra vertical lines.
Change-Id: I8e72f8e1d94381f456674abf523d2f2fbdd8046d
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is just a refactoring to use the c++17 std::variant interfaces
instead of the mapbox::variant specific ones. We should be able to use
mapbox::variant and std::variant interchangeably now.
Tested:
Built against sdbusplus with mapbox::variant and sbusplus using
std::variant. Both variant compile and test out.
Change-Id: I6fbaad3d12dd34968db6a10f3d74a65e07d0f0cc
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
|
| |
sdbusplus is moving to std::variant, remove direct
uses of mapbox to limit breakage.
Tested-by: It built
Change-Id: I3fe0ba0d96b6aad302927363b9596cc1bcce2393
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
| |
[sensorhandler.cpp:650]: (style) Exception should be caught by reference.
Change-Id: Iec747c2dff988fcf6c6ca29715afa1c44cceee6d
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[ipmisensor.cpp:308]: (style) C-style pointer casting
[sensorhandler.cpp:302]: (style) C-style pointer casting
[sensorhandler.cpp:376]: (style) C-style pointer casting
[sensorhandler.cpp:404]: (style) C-style pointer casting
[sensorhandler.cpp:405]: (style) C-style pointer casting
[storageaddsel.cpp:157]: (style) C-style pointer casting
[storageaddsel.cpp:187]: (style) C-style pointer casting
Added missing const in reportSensorEventAssert and
reportSensorEventDeassert as the *pTable->func(...) take the const
pointer and the casting then was using the proper const casting.
Change-Id: I54a591b4e5e678b8ec3cae2633617a5f7aac7a66
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
|
| |
A clang-format issue in sensorhandler.cpp was introduced by
commit 0fbdbce22771dac6fe8d651e4c8155645807b83d that is causing
CI to fail for changes to phosphor-host-ipmid. This commit
updates sensorhandler.cpp with the latest clang-format changes.
Change-Id: If37a25c50ee04264ce55c8c7959a4fee2aba4045
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
|
|
|
|
|
| |
Change-Id: Id49f6294a506a870696554715b4835c7d7e6207b
Signed-off-by: Emily Shaffer <emilyshaffer@google.com>
|
|
|
|
|
| |
Change-Id: Ic12598027a92495e49f7cb06aa28f77c0727be44
Signed-off-by: Emily Shaffer <emilyshaffer@google.com>
|
|
|
|
|
|
|
|
| |
Standard clib methods should be explicitly grabbed from the standard
namespace.
Change-Id: I8bcfcb260a99180d535ec8102c1a24c318cbc209
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
| |
Change-Id: I23a70eb540ccde5d2aba467426769feffb07b516
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Moving headers from ".h" to ".hpp"
Reworked the header inclusion a bit so that host-ipmid is treated as a
library, and local headers aren't.
renamed apphandler.h => apphandler.hpp
renamed chassishandler.h => chassishandler.hpp
renamed globalhandler.h => globalhandler.hpp
renamed sensorhandler.h => sensorhandler.hpp
renamed storageaddsel.h => storageaddsel.hpp
renamed storagehandler.h => storagehandler.hpp
renamed systemintfcmds.h => systemintfcmds.hpp
Change-Id: I9d4ce3dd57e2e996800f9020a10cc10cdf2c3914
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The legacy sensors in the /org/openbmc/sensors path have been moved
to the phosphor-ipmi-sensor-inventory%/config.yaml files and this
path has been deprecated (From openbmc/openbmc rev:
8de4ff9fe3e3a5cbd7af150c126e97b182aa44cc).
Remove the legacy functions that searched this deprecated path.
Tested: Powered on a witherspoon to the host OS and there were no
errors for the sensors that were moved out of the old path.
Change-Id: Ifced118defdb3fe30abf26e332d847e8d3707477
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
| |
Change-Id: I7c2a527b4751a560703a61fcbe9638b150546af5
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Sensor thresholds pull out an int64_t and immediately
assign it to a double. Use a visitor instead to avoid
the intermediate and add flexibility / saftey to type
readings.
Tested-By: Verifed sensor list still worked.
Change-Id: If49bf54ec1c0636b3549d433b86ecdbd1ea99b0d
Signed-off-by: James Feist <james.feist@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The issue here is that for derating factor sensor read command,
hostboot is expecting return value in event_status field, but we are
sending it in sensor reading field.
Testing:
ipmitool raw 0x04 0x2d 0xd8 #it has to retrun "00 00 5a 00"
Resolves openbmc/openbmc#3012
Change-Id: I09e3d02c946ad1d8a39ea747fc400fb623cbe6ef
Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
-host-ipmid is very noisy in terms of journal logging. A small step
towards cleaning that up.
-Also converted printfs to phosphor-logging.
Partially Resolves openbmc/openbmc#2507
Change-Id: I749c19c18d1cabf6f0216830c8cb0a08ee43d6de
Signed-off-by: Aditya Saripalli <aditya0124@gmail.com>
Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
|
|
|
|
|
|
|
|
| |
Changed mutability handling error code in get sensor
from IPMI_CC_SENSOR_INVALID to IPMI_CC_ILLEGAL_COMMAND
Change-Id: I599de08e3d3bc6a9820ac3978f0a4d160f19f55e
Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
|
|
|
|
|
|
|
| |
Resolves openbmc/openbmc#2980
Change-Id: I67afd4e84ec96e5cfc2dd315604d70f41c67a438
Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a sensor id is not managed in yaml the code tries to get it from
legacy SystemManager;
And when the sensor id can not be found in SystemManager, it returns
empty path, and cause segment fault.
This commit makes it return -EINVAL when path is empty, and thus the
code will handle this case properly without crash.
Resolves openbmc/openbmc#3062
Tested: Boot host without ipmid crash on Romulus.
Change-Id: I4240b9be54824543b5e795e898330aeb02c5eb90
Signed-off-by: Lei YU <mine260309@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Legacy sensors(org.openbmc) implementation is stubbed into a
separate function for clarity. Sensor type lookup is needed to populate
the reading for the legacy sensors, this was done for all the sensors.
With this patch sensor type lookup is done only for the legacy sensors.
Change-Id: Idd33e41669d8ad33529ad9ccdbed9d4da5ecda79
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Made below given changes:
1.With legacy code we used to read software version info from the system
file: /etc/os-release, now with new updates we will read it from the
s/w object which is implementing the interface
"xyz.openbmc_project.Software.RedundancyPriority" interface.
2.Removed legacy code related to inventory(FRU) for sensors
Tested:
1.Verified f/w version info using below given command
>ipmitool mc info -I dbus
2.Verified get sensor type info using below given command
>ipmitool raw 0x04 0x2f 0x02 -I dbus
Resolves openbmc/openbmc#2870
Change-Id: I384bf4aaacd56f4a871833b533b2a8a68c489959
Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Both Get SDR and Reserve SDR repository command is same as
Get Device SDR and Reserve Device SDR command respectively.
So the same implementation is shared.
Resolves openbmc/openbmc#2615
Change-Id: I64e37837bc5a616bed41a3ceff7d63033d88455c
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
|
|
|
|
|
| |
Change-Id: Ibf5989b144ebe4ec75bd8d42c1d1167d7b16ecda
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
|
|
|
|
|
|
|
|
| |
Use the functor in the generated yaml to get the sensor reading
for analog sensors.
Change-Id: I2535cd5015096c3e1e2baa5f9a865fc6b27e6875
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Using GetManagedObjects to get the thresholds could take upto
15~20 sec for the core temperatures. The time taken to fetch
threshold properties via GetManagedObjects is proportional to the
number of objects under the path. Since the dbus object path is
available in the yaml it is performant to read the threshold
properties directly.
Change-Id: Ic22d8f4d73d8ce4eabdffd6fc7af23f73b981f66
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
|