| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new piece of documentation, intended to be a tutorial on running,
writing, and reviewing unit tests for the CI suite. Outline the sections
to be written in some detail (subject to change).
There are a handful of methods for running the CI, foremost by using
Docker or by building the OpenBMC SDK. This tutorial will cover the
Docker method, as it is most similar to what the Jenkins bot does, and
most consistent across platforms.
Tested: Viewed markdown file in Chrome.
Change-Id: Ic98c02bc8f4dc6eaf4e7d1432422cdd934862548
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Per the IPMI spec, the Read FRU Data command requires only User
privilege level.
Tested:
Before:
ipmitool -I lanplus -L USER raw 0xa 0x11
Unable to send RAW command (channel=0x0 netfn=0xa lun=0x0 cmd=0x11 rsp=0xd4): Insufficient privilege level
After:
ipmitool -I lanplus -L USER raw 0xa 0x11
Unable to send RAW command (channel=0x0 netfn=0xa lun=0x0 cmd=0x11 rsp=0xff): Unspecified error
Change-Id: I4c4df9a0813a93f69f0d66994af37c8f67f74f9e
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of directly using pgood on dbus, this change uses the
xyz.openbmc_project.State.Chassis "CurrentPowerState" property
for the IPMI chassis status command. This will allow us to
remove pgood from dbus.
Tested:
Ran IPMI chassis commands and confirmed that they behave as
expected:
ipmitool power status
Chassis Power is on
ipmitool power off
Chassis Power Control: Down/Off
ipmitool power status
Chassis Power is off
ipmitool power on
Chassis Power Control: Up/On
ipmitool power status
Chassis Power is on
Change-Id: I7836c16b76c3b309f176186f3e2453082e4cd1af
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changes the power restore policy command to return invalid
parameter for any unsupported policy option (greater than 0x03).
Tested:
ipmitool raw 0 6 0
07
ipmitool chassis status
Power Restore Policy : always-off
ipmitool raw 0 6 1
07
ipmitool chassis status
Power Restore Policy : previous
ipmitool raw 0 6 2
07
ipmitool chassis status
Power Restore Policy : always-on
ipmitool raw 0 6 3
07
ipmitool chassis status
Power Restore Policy : always-on
ipmitool raw 0 6 4
Unable to send RAW command (channel=0x0 netfn=0x0 lun=0x0 cmd=0x6 rsp=0xcc): Invalid data field in request
Change-Id: Ie78e00753f6dfd8b7bccce38c239a8103b6cc3fd
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rewrite "Add SEL Entry" command to use the newly
introduced IPMI provider API.
Tested:
Verified the behavior to be same as previous change.
ipmitool raw 0x0a 0x44 1 0 0xff 4 5 6 7 8 9 0 1 2 3 4 5 6
05 06
Signed-off-by: anil kumar appana <anil.kumarx.appana@intel.com>
Change-Id: I49bad876a209fb55f1b5b635b5a4ded425d33af0
|
|
|
|
|
|
|
|
|
|
| |
According to the documentation io->post is deprecated, saying
that boost::asio::post() should be used instead.
Tested: ipmid runs the same as it did before.
Change-Id: I552c7cb5cb8ad8f9f6e2bcffa61ce5135e2faad2
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
| |
This session const will be used in multi session management and session
commands and replace the existing session const used into lowercamel case
Signed-off-by: Suryakanth Sekar <suryakanth.sekar@linux.intel.com>
Change-Id: I76725acdf5d3d002f82a1076509ed37d668d01d3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Modify to use the new provider API. One by one, change calls to
remove any legacy API constructs.
Tested-by: ipmitool raw 6 0x37
08 50 f3 d6 73 d5 98 b4 45 49 9a a6 24 76 f5 82
This is the same as the BMC web value as shown by:
curl https://<bmcip>/redfish/v1/Systems/system
"UUID": "82f57624-a69a-4945-b498-d573d6f35008"
Change-Id: Ic3ea8c53266d5be07bc957fe7076b208b621f00b
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
| |
Functionally this doesn't change anything but executable data files
would seem to be in conflict with typical idioms.
Change-Id: I5eddfd8a8be3d1b9eb53062fb60e46b845008fd9
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Change-Id: I8e14cfd3719c7fbef739f2aa01771bc4321ce290
Signed-off-by: Ofer Yehielli <ofery@google.com>
Tested: Enabled the exclude libuserlayer flag in
recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend
+EXTRA_OECONF_append_xxx = " --disable-libuserlayer"
+HOSTIPMI_PROVIDER_LIBRARY_remove_xxx = "libusercmds.so"
+NETIPMI_PROVIDER_LIBRARY_remove_xxx = "libusercmds.so"
Clean build and test that userlayer.so doesn't get included in the build
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
convertCurrentChannelNum(uint8_t) was deprecated in favor of an
actual working implementation. It was stubbed out for a while to
provide a broken, backwards-compatible interface, but now that all
of those have been removed in favor of the new interface that
actually works: convertCurrentChannelNum(uint8_t, uint8_t), the
old function can be removed.
Tested: Builds without any errors (means the old interface was removed)
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
Change-Id: I3796e890c7cc34333116b71a97db268abf5f0e89
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement get channel payload version command (IPMI specification
section 24.9). As per the specification, this command is basically a
hard-coded value that says we are using IPMI 2.0.
Tested:
ipmitool raw 6 0x4F 3 1 // Command
10 // Response
Change-Id: Id16723e7257361814b98f3c14d759f2919ad4c03
Signed-off-by: Ayushi Smriti <smriti.ayushi@intel.com>
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update the get channel payload support command to use the new IPMI API.
This simplifies the code as well as adds support for the special IPMI
channel 0x0e.
Tested: ipmitool -I lanplus -H ... -U ... raw 6 0x4e 0xe
03 00 3f 00 00 00 00 00
ipmitool -I lanplus -H ... -U ... raw 6 0x4e 1
03 00 3f 00 00 00 00 00
Change-Id: I8b67d6f79c40299b4b653212a2f1f9d0c1a9087c
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
| |
When building out of tree the default yamls are not found by the code
generator scripts.
Change-Id: I52a651e99b8a2c41c20dc30a7b4f5f01c16e7c5a
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
|
|
| |
Updated error message with proper config file name
Tested:
Verified that file name is properly listed in error message
Change-Id: I0c2552000f704f3b4b541b8fe90adec966a6616a
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PAM user authentication check must be performed, before any RMCP+
session establishment, as this will be able to check whether user
is already locked out, due to failed attempt.
This patch introduces the pam user check API, which will be used by
netipmid daemon.
Tested:
Verified the API call check and making sure it works.
Real testing is performed by including the same in
phosphor-ipmi-net for RMCP+ session establishment both
for user locked for failed attempt and normal case.
Commands used-
Created new user using ipmitool
ipmitool user set name 2 testuser
ipmitool user enable 2
ipmitool user set password 2 pas1tes2
ipmitool user priv 2 4 3
ipmitool user list 3 //New user entry can be seen listed
ipmitool channel getaccess 3 2 //For getting channel access
ipmitool channel setaccess 3 2 ipmi=on priviledge=4
Normal Case:
ipmitool -I lanplus -U testuser -P pas1tes2 -H <bmc ip> raw 6 1
//Command
23 00 00 00 02 bf 57 01 00 7b 00 00 00 00 00 //Response
Negative Case:
busctl set-property xyz.openbmc_project.User.Manager
/xyz/openbmc_project/user xyz.openbmc_project.User.AccountPolicy
MaxLoginAttemptBeforeLockout q 3
Tried 3 failed login attempts from webpage, and then tried to
establish IPMI RMCP+ as expected, session establishment failed.
wait for the timeout or unlock the user using-
busctl set-property xyz.openbmc_project.User.Manager
/xyz/openbmc_project/user/sayushi xyz.openbmc_project.User.Attributes
UserLockedForFailedAttempt b false
busctl get-property xyz.openbmc_project.User.Manager
/xyz/openbmc_project/user/sayushi xyz.openbmc_project.User.Attributes
UserLockedForFailedAttempt b false //Command
b false //Response
After this RMCP+ session will be established as usual.
Change-Id: I5ee2dc0848944a12f682f0775930091d32508bde
Signed-off-by: Ayushi Smriti <smriti.ayushi@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that a bus pointer is available via the Context for every IPMI
command handler, make use of it for Get Device ID.
Tested-by: run Get Device ID and verify results:
ipmitool raw 6 1
23 00 00 00 02 bf 57 01 00 7b 00 00 00 00 00
Change-Id: I2ae5f59623767c7ae059340758a8d042acfb00e9
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Unsupported types might not cause compile time errors but can result
in SIGILL errors at runtime when compiler warnings are ignored.
This was found when compiling an intel-ipmi-oem handler that attempted
to unpack an enum class type. The code compiles down to an empty
function (no return statement or value), which can result in all sorts
of undefined behavior. This change forces the unsupported types to emit
a static assert and fail to compile.
Tested: Created a handler that requests an enum class as an input and
saw that the build fails with a static assert.
Change-Id: I123da15cb001756f07761cf7a60b799469926a2a
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a std::shared_ptr<sdbusplus::asio::connection> to every
ipmi::Context in order to facilitate easy transition to
yield_method_call over other D-Bus interfaces. This means that a
getDbusObjects call could just pass in the ipmi::Context and it will get
a yielding call. ipmi::Context is a natural fit because one is created
for each of the boost::asio::coroutine contexts. And because a yielding
call needs both an async D-Bus connection and a yield_context, this
means that we now have one object to rule them all.
Tested: Created a handler that uses the new shared_ptr in the context
to see the API in action.
Change-Id: I429a324180a38bf17845f7fd0544df2226d0300a
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rewrite "Get & Set SEL time" command to use the newly
introduced IPMI provider API.
Tested:
Verified using ipmitool sel time get/set behavior before and
after the changes.
Change-Id: I856ac92356e4472a67bf0e354fff6c3e2ced0cdb
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Return the present chassis identify state in get chassis status command:
Off
Temporary on
Indefinite on
Reserved
Tested:
Set chassis identify in different states:
ipmitool raw 0 4 10 0
ipmitool raw 0 4 0 1
ipmitool raw 0 4 0 0
Then query the chassis status and check on the third byte
ipmitool raw 0 1
Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
Change-Id: I66690b74823a6b819c4fda25d95bc8690b98181a
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PFail property is provided by power control service,
true means the booting is from AC power loss.
Tested:
Remove the AC cable and reconnect it to power on the system
ipmitool chassis status will return:
Last Power Event : ac-failed
Change-Id: I3743f15da259491052ee8fc869205438e79046f8
Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update the get channel info command to use the new IPMI provider API.
Because of the change, this command can support the use of the special
channel number 0x0e.
Tested-by:
(remote via RMCP+ interface)
ipmitool -I lanplus -H ... -U ... channel info
Channel 0x1 info:
Channel Medium Type : 802.3 LAN
Channel Protocol Type : IPMB-1.0
Session Support : multi-session
Active Session Count : 0
Protocol Vendor ID : 7154
Volatile(active) Settings
Alerting : disabled
Per-message Auth : enabled
User Level Auth : enabled
Access Mode : always available
Non-Volatile Settings
Alerting : disabled
Per-message Auth : enabled
User Level Auth : enabled
Access Mode : always available
(on host via kcs interface)
ipmitool channel info
Channel 0xf info:
Channel Medium Type : System Interface
Channel Protocol Type : KCS
Session Support : session-less
Active Session Count : 0
Protocol Vendor ID : 7154
Change-Id: Ica4262593acaefe12ccf70724ad4db40da344da4
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update the get channel access command to use the new IPMI provider API. As a
part of this change, the command is now able to use the special channel 0x0e.
Tested-by:
ipmitool -I lanplus -H ... -U ... channel getaccess 0xe 1
Maximum User IDs : 15
Enabled User IDs : 1
User ID : 1
User Name : root
Fixed Name : No
Access Available : callback
Link Authentication : enabled
IPMI Messaging : enabled
Privilege Level : ADMINISTRATOR
Enable Status : enabled
Change-Id: I97ad74ae183a15dd5f45dfa70341225794087b2a
Signed-off-by: NITIN SHARMA <nitin1x.sharma@intel.com>
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This updates the set channel access command to use the new IPMI provider
API. As part of this change, this command should now work with the
special channel 0x0e.
Tested-by:
(set channel access: 6 0x40)
# ipmitool -I lanplus -H ... -U ... raw 6 0x40 0xe 0x82 0x84
(get channel access: 6 0x41)
# ipmitool -I lanplus -H ... -U ... raw 6 0x41 0xe 0x80
02 04
# ipmitool raw 6 0x40 1 0x80 0x83
# ipmitool raw 6 0x41 1 0x80
00 03
Change-Id: Icc6e8ff7deebb7a6f89af616fa70258ea18ed0ce
Signed-off-by: NITIN SHARMA <nitin1x.sharma@intel.com>
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. fix issue for handling unsupported parameter
2. add support for floppy/USB boot
There is dbus interface change in:
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-dbus-interfaces/+/21177
Test:
$ ipmitool -H <ip> -P 0penBmc -I lanplus raw
0x0 0x8 0x5 0x80 0x14 0x00 0x00 0x00
$ ipmitool -H <ip> -P 0penBmc -I lanplus chassis bootparam get 5
...
- Boot Device Selector : Force Boot from CD/DVD
...
$ipmitool -H <ip> -P 0penBmc -I lanplus raw
0x0 0x8 0x5 0x80 0x3c 0x00 0x00 0x00
$ipmitool -H <ip> -P 0penBmc -I lanplus chassis bootparam get 5
...
- Boot Device Selector : Force Boot from Floppy/primary removable media
...
Change-Id: I915aaa3f684d02d0dfc4b65afb3c1db139c41781
Signed-off-by: Jia, chunhui <chunhui.jia@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the input data length exceeds the expected, return len_invalid too
Tested:
ipmitool raw 0x06 0x24 0x01 0x13 0x0 0x2 0xa 0x00 0xff
Will return error
Signed-off-by: Yu Ren <yux.ren@intel.com>
Change-Id: I12168f4aed51c499fd06067ca4475917b68e819e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Modify to use the new provider API. One by one, change calls to
remove any legacy API constructs.
Tested-by: ipmitool 6 8
30 ba 05 cd 7e 9d ac 89 4a 4c 52 ef f3 24 2d 5f
(with matching change from bmcweb:)
curl https://<bmcip>/redfish/v1/Managers/bmc
...
"UUID": "5f2d24f3-ef52-4c4a-89ac-9d7ecd05ba30"
Change-Id: I4cd3b945f76b4fe6c4fcf31d8e1962aaa768828e
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This warm reset command is using the duplicated API as cold reset.
As per IPMI spec, warm reset should not alter volatile settings,
and has to just reset the interface which is not what current code does.
Hence to avoid confusion, remove this warm reset command
Tested:
"ipmitool raw 6 3" command return "Invalid command",
and BMC does not reboot
Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
Change-Id: I62f37c9b8386a817ce069c26ade6760de73b1d16
Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Getting the current channel is really just an if statement for the
requested channel (check for 0x0e) to know if the device channel
which is determined by -c <channel> by netipmid and by dbus names
in host ipmid. Previously, an ipmi::Context was passed in, but
netipmid does not use Context, it just has the channel number. So
This change makes it so the the requested channel number and the
device channel number are the arguments, which makes the same
function usable in both netipmid and ipmid.
Tested-by: run the get user access command to see that it uses the
current channel.
# remote connection over channel 1
ipmitool -I lanplus -H <> ... raw 6 0x44 0xe 1
0f 41 00 74
ipmitool -I lanplus -H <> ... raw 6 0x44 1 1
0f 41 00 74
# on bmc console (current channel does not use users)
ipmitool raw 6 0x44 0xe 1
Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0
cmd=0x44 rsp=0xcc): Invalid data field in request
# request info for channel 1
ipmitool raw 6 0x44 1 1
0f 41 00 74
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
Change-Id: Iadad6f93e47d031a6f4724a3db5161051c5b520a
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The recent rewrite of Get Chassis Status also added support for reading
the front panel enables status instead of returning a hard-coded false.
But the implementation also errors out if the interface is not present
This makes the interfaces optional, returning false if they are not presnt
and reading them correctly if they are.
Tested-by: running ipmitool chassis status with and without the
xyz.openbmc_project.Chassis.Buttons service running:
# ipmitool chassis status
System Power : on
Power Overload : false
Power Interlock : inactive
Main Power Fault : false
Power Control Fault : false
Power Restore Policy : previous
Last Power Event :
Chassis Intrusion : inactive
Front-Panel Lockout : inactive
Drive Fault : false
Cooling/Fan Fault : false
Sleep Button Disable : not allowed
Diag Button Disable : not allowed
Reset Button Disable : allowed
Power Button Disable : allowed
Sleep Button Disabled: false
Diag Button Disabled : false
Reset Button Disabled: false
Power Button Disabled: false
# systemctl stop xyz.openbmc_project.Chassis.Buttons@0.service
# ipmitool chassis status
System Power : on
Power Overload : false
Power Interlock : inactive
Main Power Fault : false
Power Control Fault : false
Power Restore Policy : previous
Last Power Event :
Chassis Intrusion : inactive
Front-Panel Lockout : inactive
Drive Fault : false
Cooling/Fan Fault : false
Front Panel Control : none
Change-Id: If845194b6f052ba84f8b062ac4259ec66f706bb5
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
IPMI user configuration is cross synced with
phosphor-user-manager and written to the non-volatile data
on every boot. This commit limits the write only when
there is real sync issue, and update required.
Tested:
1. Verified the ipmitool user list & commands
2. Verified that file write happens only when there is
real sync update with phosphor-user-manager
Change-Id: Ia40be91f281656288ca96ca44bc9699daee7c3b4
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The sensor/entity/fru/inventory auto-generated cpp code should
depend on the mako template, the generator python, and the yaml
that it is built with. This modifies the autoconf to export the yaml
and the automake to set the dependencies.
Tested-by: modify one of the dependencies and watch it get rebuilt
Change-Id: Iaab9585c202baf4506e0b7e62aa42a3bf2828ae4
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Set Front Panel Enables command touches one of the same interfaces
that this command does, so rewrite this command to reflect the changes
that set front panel enables causes.
Tested-by: manually run get chassis status command via ipmitool:
# ipmitool raw 0 1
01 00 40 30
# ipmitool chassis status
Change-Id: Ifbb13a6f344c58b2140933447995d3854cca0c0d
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the new ipmi api, including the yield context mechanism.
Modify to use the new provider API. One by one, change calls to
remove any legacy API constructs.
Tested-by: ipmitool chassis policy list
ipmitool chassis policy previous
ipmitool chassis policy always-on
ipmitool chassis policy always-off
Change-Id: I02a955c3946b940daaa3fe90c2a220b0eb719bad
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
sdbusplus has had its alias of std::variant in place for long
enough. This changes all ipmid references to use std::variant
directly instead of the sdbusplus alias.
Tested-by: building and running ipmid
Change-Id: Id5b4136d4589aa598815edd3ef4202e64a7698e2
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The legacy D-Bus interface was not setting the yield_context pointer
in the ipmi::Context struct. This means that a command coming in from
a legacy D-Bus interface that called a new-provider that uses the
yield_method_call function would segfault on a NULL pointer. This
change makes the legacy interface behave the same as the new
D-Bus interface by creating a new boost::coroutine for each command.
Tested-by: running a legacy ipmitool to ensure that the rewritten set
chassis power restore policy command worked without a
segfault.
Change-Id: Ie45fff1fc222b9b949a9d3976bf9d1b2c29bd8f5
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ipmi_user.json file is stored in non-volatile memory, and it is
necessary to make sure that file is properly synced to the storage
device, to avoid any corruption issue related to power
loss. This fix makes sure that temporary file is fully synced with
storage device and then renamed, such that the file is either
in old state or in new updated state.
Same is also performed for channel configuration file too.
Tested:
1. Verified regular ipmi user list & channel works without
any issue
2. Verifid that any power loss, immediately, once the file
is written doesn't corrupt the entries.
Change-Id: I9ef84573947ab6f85f66530ac4a20e9eeaddf283
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rewritten "Get ACPI power state" command to use the newly
introduced IPMI provider API.
Tested:
Verified using ipmitool and it is giving same behaviour as before.
ipmitool raw 0x06 0x07
05 03
Change-Id: I51f2d5bbb89e445230ffc1363cf413e716116996
Signed-off-by: Deepak Kumar Sahu <deepakx.sahu@intel.com>
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds support for empty inventory interfaces when
asserting a sensor into the inventory. This is something already
supported in ipmi-fru-parser, for example.
Currently, the notify::assertion function expects that each DBUS
interface also have a set of associated properties. One of the
use-cases this commit tries to solve is when a sensor being asserted
maps to an inventory item (accessed via
xyz.openbmc_project.Inventory.Manager DBUS service) that implements
a DBUS interface with no properties. For example, the GPU sensor
is mapped to a GPU inventory object that implements the DBUS
interface xyz.openbmc_project.Inventory.Item.Accelerator.
This commit enables phosphor-host-ipmid to correctly create/update
inventory objects even in cases where they implement DBUS interfaces
that contain no properties.
The sensor-example.yaml file has been updated to show an example
of a GPU sensor, the inventory object for which implements a
property-less DBUS interface.
Tested:
Tested on a witherspoon system that had some GPUs attached to it.
Pulled also https://gerrit.openbmc-project.xyz/c/openbmc/openbmc/+/21107
in order to generate the right sensor configs for testing.
Verified that the GPU invetory objects that are created when the host
asserts a GPU sensor now implement the empty interface
xyz.openbmc_project.Inventory.Item.Accelerator
Signed-off-by: Santosh Puranik <santosh.puranik@in.ibm.com>
Change-Id: I973580e285ae0fff1a513d3bbe8c03a89e0eeb83
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The correct value for commands that unpacked but did not consume all
the data was already returned (0xc7), but if all the expected data
was not present, the return code was the response of the unpack
command, which is not an IPMI value. This changes the unpack response
to always return 0xc7 if it is too short or too long for the command.
Tested-by: run ipmitool with correct and incorrect byte counts
(get channel access command expects 2 bytes of data)
# ipmitool raw 6 0x41
Unable to send RAW command (channel=0x0 netfn=0x6
lun=0x0 cmd=0x41 rsp=0xc7): Request data length invalid
# ipmitool raw 6 0x41 1
Unable to send RAW command (channel=0x0 netfn=0x6
lun=0x0 cmd=0x41 rsp=0xc7): Request data length invalid
# ipmitool raw 6 0x41 1 0x80
40 40
# ipmitool raw 6 0x41 1 0x80 1
Unable to send RAW command (channel=0x0 netfn=0x6
lun=0x0 cmd=0x41 rsp=0xc7): Request data length invalid
Change-Id: Ic72c1f2050f7bdcdcc8a5b808d11f80fac4e9813
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rewritten "Get FRU inventory area info" command to use
the newly introduced IPMI provider API.
Tested:
Unable to verify as command was returning error
earlier too.
Change-Id: I535e1d5c41a1e0dc253148bc52df5f22b70b4330
Signed-off-by: Pradeep Kumar <pradeep1x.kumar@intel.com>
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the xyz.openbmc_project.State.BMC interface is not provided by
anything in the inventory, provide a mechanism for specifying a default
state with regards to the BMC state. The dev_id.json file now can have
a boolean field, availability, that sets the default that the Get Device
Id command should use in the event the interface is unavailable or that
there is a dbus error.
The default value for the state of the BMC is true. Currently, the
service in OpenBMC providing the real value via the dbus interface
simply checks that a systemd target is Active. The systemd target
checked is the one that starts all the OpenBmc default services,
including ipmid.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Iba2c8308544337490905b0b48ba95785e0d775d4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Support added for master write read IPMI command with
whitelist filter support. Allows commands which are
listed in the whitelist filter.
Tested:
1. Verified with filter list and able to execute whitelisted
commands as per the mask
2. verified command throws invalid field in request for non
whitelisted filters.
Change-Id: I8f20808a8a2d9afc10747485a1303492329a6996
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rewritten "cold & warm reset" command to use the newly
introduced IPMI provider API.
Tested:
verified ipmitool cold reset and warm reset commands
ipmitool raw 6 2 //cold reset command
system reboots
ipmitool raw 6 3 //warm reset command
system reboots
Change-Id: I4638fffe33deb1c97f51f97c8f09fef6a8688fba
Signed-off-by: anil kumar appana <anil.kumarx.appana@intel.com>
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rewritten "Clear SEL" command to use the newly
introduced IPMI provider API.
Tested:
verified operation of clear SEL, and queried
the sel list before & after clear SEL
execution.
ipmitool raw 0x0a 0x47 0x08 0x00 0x43 0x4c 0x52 0x0
01 // response
Change-Id: Id8b8fa351c9d42632f71ce3445a63491b8ef4d16
Signed-off-by: Pradeep Kumar <pradeep1x.kumar@intel.com>
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rewritten "Chassis control" command to the use newly
introduced IPMI provider API.
Tested:
Verified ipmitool raw chassis control command
ipmitool raw 0 2 0/1/2/3/4/5 and for invalid value
got invalid field in request response.
Change-Id: I0213157640e34c693b53999f69d7d47ced950e0d
Signed-off-by: anil kumar appana <anil.kumarx.appana@intel.com>
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rewritten "Get POH counter" command to use the newly
introduced IPMI provider API.
Tested:
verified using ipmitool chassis poh
ipmitool chassis poh
POH Counter : 1 days, 6 hours // Response
Change-Id: Ife250269da19e511783f1a0cf1298a366f3c2728
Signed-off-by: anil kumar appana <anil.kumarx.appana@intel.com>
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rewritten "Delete SEL" command to use the newly
introduced IPMI provider API.
Tested:
Verified the behavior to be same as previous change.
ipmitool sel delete 5
Unable to delete entry 5: Requested sensor, data,
or record not found
Change-Id: I3b40be056ed1c9b3bb5ac75387c694abe16403b5
Signed-off-by: Pradeep Kumar <pradeep1x.kumar@intel.com>
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Legacy OEM commands didn't handle the IANA numbers themselves as part
of their handler body, and expect the request buffer to not contain
them. We can't pass the raw buffer without removing the already
extracted prefixes.
This should make legacy OEM commands work again.
Also reworks group handling to become consistent with OEM handling. This
happens to fix cases where groupIds were not being returned with error
codes.
Change-Id: I10efe8004f2c2b262f48980852b46317035ca367
Signed-off-by: William A. Kennington III <wak@google.com>
|