summaryrefslogtreecommitdiffstats
path: root/user_channel/channelcommands.cpp
Commit message (Collapse)AuthorAgeFilesLines
* channelcmds:fix set chnl access sessionless chnlanil kumar appana2019-10-281-2/+4
| | | | | | | | | | | | | | | | | | Return proper error code 0x82 for session-less channel Tested 1.verified with ipmitool raw commands ipmitool raw 0x06 0x40 0x00 0x40 0x04 Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0 cmd=0x40 rsp=0x82): Unknown (0x82) ipmitool raw 0x06 0x41 0x00 0x40 Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0 cmd=0x41 rsp=0x82): Unknown (0x82) Signed-off-by: anil kumar appana <anil.kumarx.appana@intel.com> Change-Id: I9ada001427a6c3dcaaf6de026f8831faa54c182d
* Add get channel payload version commandAyushi Smriti2019-06-141-0/+40
| | | | | | | | | | | | | | | 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>
* user_channel: Get Channel Payload Support command refactorVernon Mauery2019-06-141-98/+54
| | | | | | | | | | | | | | 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>
* Updates get channel info command to use the new provider APIVernon Mauery2019-05-231-101/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* channelcmds: move get channel access to new IPMI provider APIRichard Marian Thomaiyar2019-05-231-86/+48
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* channelcmds: move set channel access to new ipmi provider APINITIN SHARMA2019-05-231-75/+54
| | | | | | | | | | | | | | | | | | | | | 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>
* Add: Get channel payload support commandSaravanan Palanisamy2019-04-091-0/+109
| | | | | | | | | | | | | | | | | | Implemented Get Channel Payload Support command (IPMI Spec sec 24.8) The same is implemented under channel commands, and will be available for both Host & Net ipmid. Uses channel configuration to differentiate between session / session-less channel Tested-by: 1. Verified command executed successfully for session based channel ipmitool raw 6 0x4E 0x1 // Command 03 00 15 00 00 00 00 00 // Response 2. Verified sessionless channel error is returned. Change-Id: I8b294234415b4467aeae6c23c192750471536f4e Signed-off-by: Saravanan Palanisamy <saravanan.palanisamy@intel.com> Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* Fix: Check reserved fields in channel cmds requestRichard Marian Thomaiyar2019-02-021-6/+6
| | | | | | | | | | | | Check reserved fields in channel cmds request and return 0xCC, if reserved fields are set Unit-Test: 1. Verified 0xCC is returned if reserved fields are set ipmitool raw 0x6 0x40 0x11 0x82 0x81 Change-Id: I4ca18c35d1435c6f9a636eb2c2730e63d8df319b Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* Change struct names to UpperCamelCaseRichard Marian Thomaiyar2018-12-221-15/+15
| | | | | | | | Change struct names to UpperCamelCase to align with OpenBMC coding guidelines Change-Id: Ib71768be45e57556a26b14b64adec98db3bc7762 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* libipmi: Decouple user commandsWilliam A. Kennington III2018-12-201-0/+1
| | | | | | | | | | | | | This makes them an optional, separate provider like the sysfs cmds. Tested: Ran on real hardware that included libusercmds.so in /usr/lib/host-ipmid and on a machine that did not include it. Ran ipmitool on the host to verify that the user commands were present when expected. Change-Id: I07b3af5ae603c3e5f1ea41f0afc309329f4e185d Signed-off-by: William A. Kennington III <wak@google.com>
* Channel commands updated to handle self channelRichard Marian Thomaiyar2018-12-191-6/+3
| | | | | | | | | | | | | Channel commands are updated to handle self channel number 0xE. When user request 0xE self channel number, it will be converted to proper channel based on the interface the command is requested. Unit-Test: Verified channel commands are working as expected. Change-Id: If542f8e88b609d7b92f4a96acb572611dd883555 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* Doxygen comments for enum & structureRichard Marian Thomaiyar2018-12-191-0/+20
| | | | | | | | | | | Added doxygen comments for enums & structures for user & channel layers. Unit-test: verified build. Change-Id: Ie5af8d6cdd4c04cb396869b7a3dc44f84efedd19 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* IPMI Channel commands implementationAppaRao Puli2018-11-201-0/+391
IPMI Channel commands implemenation - squashed commit e9a75d8dd6e89d17381f0310c7930586c6b79996 Author: AppaRao Puli <apparao.puli@intel.com> Date: Thu Jul 5 14:47:22 2018 +0530 Channel layer separation De-coupling the channel management from ipmi channel commands implementation. This gives flexibility to load only needed stuff in different modules(host-ipmi or netipmid) Change-Id: Ib334562beb9325f7768ed6a15475cae15af17b19 Signed-off-by: AppaRao Puli <apparao.puli@intel.com> Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com> commit 726ddf2af678ea6773f4b4b918fbd49be8c83e6a Author: AppaRao Puli <apparao.puli@intel.com> Date: Thu May 24 16:45:30 2018 +0530 IPMI Channel commands implementation Following IPMI channel commands are implemented. 1) Set channel access (0x40) 2) Get channel access (0x41) 3) Get channel info (0x42) Also added code supported for LAN configuration parameters 1) Authentication Type Support (selector #1) 2) Authentication Type Enables (selector #2) Change-Id: Ic4156378c7756eca383dc3da52114fd119346ca6 Signed-off-by: AppaRao Puli <apparao.puli@intel.com> Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com> Change-Id: Ic4156378c7756eca383dc3da52114fd119346ca6 Signed-off-by: AppaRao Puli <apparao.puli@intel.com> Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
OpenPOWER on IntegriCloud