diff options
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-phosphor/ipmi')
16 files changed, 293 insertions, 165 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json index dc9c2ce20..b02595e81 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-config/channel_config.json @@ -1,6 +1,6 @@ { "0" : { - "name" : "IPMB", + "name" : "Ipmb", "is_valid" : true, "active_sessions" : 0, "channel_info" : { diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0001-Modify-Get-Lan-Configuration-IP-Address-Source-to-us.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0001-Modify-Get-Lan-Configuration-IP-Address-Source-to-us.patch new file mode 100644 index 000000000..1e4d3b0a9 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0001-Modify-Get-Lan-Configuration-IP-Address-Source-to-us.patch @@ -0,0 +1,201 @@ +From 3db78afe49a662ce7e90f3f5ce40d625a54d576b Mon Sep 17 00:00:00 2001 +From: Johnathan Mantey <johnathanx.mantey@intel.com> +Date: Thu, 14 Nov 2019 11:24:19 -0800 +Subject: [PATCH] Modify Get Lan Configuration IP Address Source to use correct + DBus DHCPEnabled type + +The Get/Set Lan Configuration "IP Address Source" subcommand got +broken by phosphor-dbus-interfaces commit 12162be + +12162be changed the DBus DHCPEnabled type from boolean to enum +type. The Get LAN Configuration IP address Source IPMI command did not +get changed to an enum type prior to 12162be being merged. This commit +retroactively updates the boolean type to enum type. + +Tested: + +ipmitool raw 0xc 2 3 4 0 0 # returns correct state +ipmitool raw 0xc 1 3 4 1 # changes DCHP to Static +ipmitool raw 0xc 1 3 4 2 # returns Static to DHCP + +Assigned a static address via Redfish and tested using: +ipmitool raw 0xc 2 3 4 0 0 # returns correct state + +Returned the NIC to use DHCP via Redfish and tested using: +ipmitool raw 0xc 2 3 4 0 0 # returns correct state + +Change-Id: Ia66f7fcf3d5ad0a383b06658b18e8ce2b282e052 +Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com> +--- + transporthandler.cpp | 88 ++++++++++++++++++++++++++++++++++++-------- + 1 file changed, 73 insertions(+), 15 deletions(-) + +diff --git a/transporthandler.cpp b/transporthandler.cpp +index 09df184..8dc5677 100644 +--- a/transporthandler.cpp ++++ b/transporthandler.cpp +@@ -109,6 +109,18 @@ constexpr auto INTF_NEIGHBOR_CREATE_STATIC = + constexpr auto INTF_VLAN = "xyz.openbmc_project.Network.VLAN"; + constexpr auto INTF_VLAN_CREATE = "xyz.openbmc_project.Network.VLAN.Create"; + ++static const char* dhcpv4v6 = ++ "xyz.openbmc_project.Network.EthernetInterface.DHCPConf.both"; ++static const char* dhcpv6 = ++ "xyz.openbmc_project.Network.EthernetInterface.DHCPConf.v6"; ++static const char* dhcpv4 = ++ "xyz.openbmc_project.Network.EthernetInterface.DHCPConf.v4"; ++static const char* dhcpoff = ++ "xyz.openbmc_project.Network.EthernetInterface.DHCPConf.none"; ++ ++static std::array<const char*, 4> dhcpEnumerations = {dhcpv4v6, dhcpv4, dhcpv6, ++ dhcpoff}; ++ + /** @brief Generic paramters for different address families */ + template <int family> + struct AddrFamily +@@ -456,25 +468,63 @@ auto channelCall(uint8_t channel, Args&&... args) + * + * @param[in] bus - The bus object used for lookups + * @param[in] params - The parameters for the channel +- * @return True if DHCP is enabled, false otherwise ++ * @return string containing an enumerated value ++ * constexpr's dhcpv4v6, dhcpv4, dhcpv6, and dhcpoff + */ +-bool getDHCPProperty(sdbusplus::bus::bus& bus, const ChannelParams& params) ++std::string getDHCPProperty(sdbusplus::bus::bus& bus, ++ const ChannelParams& params) + { +- return std::get<bool>(getDbusProperty( ++ return std::get<std::string>(getDbusProperty( + bus, params.service, params.logicalPath, INTF_ETHERNET, "DHCPEnabled")); + } + + /** @brief Sets the system value for DHCP on the given interface + * +- * @param[in] bus - The bus object used for lookups +- * @param[in] params - The parameters for the channel +- * @param[in] on - Whether or not to enable DHCP ++ * @param[in] bus - The bus object used for lookups ++ * @param[in] params - The parameters for the channel ++ * @param[in] setting - DHCP state to assign (none, v4, v6, both) + */ + void setDHCPProperty(sdbusplus::bus::bus& bus, const ChannelParams& params, +- bool on) ++ const std::string& setting) + { ++ auto it = dhcpEnumerations.begin(); ++ while (it != dhcpEnumerations.end()) ++ { ++ if (*it == setting) ++ { ++ break; ++ } ++ it++; ++ } ++ if (it == dhcpEnumerations.end()) ++ { ++ log<level::ERR>("Invalid DHCP setting.", ++ entry("Requested DHCP mode=%s", setting.c_str())); ++ elog<InternalFailure>(); ++ } ++ ++ std::string dhcp = getDHCPProperty(bus, params); ++ std::string nextDhcp{}; ++ ++ if (((dhcp == dhcpv4) && (setting == dhcpv6)) || ++ ((dhcp == dhcpv6) && (setting == dhcpv4))) ++ { ++ // DHCP is enabled independently for IPv4 and IPv6. If IPv4 ++ // DHCP is enabled, and a request to add IPv6 is received, ++ // change the DHCPEnabled enum to "both" active. The same ++ // logic is applied if IPV6 is already enabled, and an IPv4 ++ // enable request is made. ++ nextDhcp = dhcpv4v6; ++ } ++ else ++ { ++ // "both" enabled -> ipv4 only ++ // "both" enabled -> ipv6 only ++ // "ip4v", "ipv6", or "both" enabled -> no DHCP ++ nextDhcp = setting; ++ } + setDbusProperty(bus, params.service, params.logicalPath, INTF_ETHERNET, +- "DHCPEnabled", on); ++ "DHCPEnabled", nextDhcp); + } + + /** @brief Converts a human readable MAC string into MAC bytes +@@ -1113,7 +1163,7 @@ void deconfigureChannel(sdbusplus::bus::bus& bus, ChannelParams& params) + } + + // Clear out any settings on the lower physical interface +- setDHCPProperty(bus, params, false); ++ setDHCPProperty(bus, params, dhcpoff); + } + + /** @brief Creates a new VLAN on the specified interface +@@ -1395,7 +1445,11 @@ RspType<> setLan(uint4_t channelBits, uint4_t, uint8_t parameter, + { + case IPSrc::DHCP: + { +- channelCall<setDHCPProperty>(channel, true); ++ // The IPSrc IPMI command is only for IPv4 ++ // management. Modifying IPv6 state is done using ++ // a completely different Set LAN Configuration ++ // subcommand. ++ channelCall<setDHCPProperty>(channel, dhcpv4); + return responseSuccess(); + } + case IPSrc::Unspecified: +@@ -1403,7 +1457,7 @@ RspType<> setLan(uint4_t channelBits, uint4_t, uint8_t parameter, + case IPSrc::BIOS: + case IPSrc::BMC: + { +- channelCall<setDHCPProperty>(channel, false); ++ channelCall<setDHCPProperty>(channel, dhcpoff); + return responseSuccess(); + } + } +@@ -1540,7 +1594,8 @@ RspType<> setLan(uint4_t channelBits, uint4_t, uint8_t parameter, + return responseReqDataLenInvalid(); + } + std::bitset<8> expected; +- if (channelCall<getDHCPProperty>(channel)) ++ std::string dhcp = channelCall<getDHCPProperty>(channel); ++ if ((dhcp == dhcpv4v6) | (dhcp == dhcpv6)) + { + expected[IPv6RouterControlFlag::Dynamic] = 1; + } +@@ -1690,7 +1745,8 @@ RspType<message::Payload> getLan(uint4_t channelBits, uint3_t, bool revOnly, + case LanParam::IPSrc: + { + auto src = IPSrc::Static; +- if (channelCall<getDHCPProperty>(channel)) ++ std::string dhcpSetting = channelCall<getDHCPProperty>(channel); ++ if ((dhcpSetting == dhcpv4) || (dhcpSetting == dhcpv4v6)) + { + src = IPSrc::DHCP; + } +@@ -1811,7 +1867,8 @@ RspType<message::Payload> getLan(uint4_t channelBits, uint3_t, bool revOnly, + case LanParam::IPv6RouterControl: + { + std::bitset<8> control; +- if (channelCall<getDHCPProperty>(channel)) ++ std::string dhcp = channelCall<getDHCPProperty>(channel); ++ if ((dhcp == dhcpv4v6) || (dhcp == dhcpv6)) + { + control[IPv6RouterControlFlag::Dynamic] = 1; + } +@@ -1825,7 +1882,8 @@ RspType<message::Payload> getLan(uint4_t channelBits, uint3_t, bool revOnly, + case LanParam::IPv6StaticRouter1IP: + { + in6_addr gateway{}; +- if (!channelCall<getDHCPProperty>(channel)) ++ std::string dhcp = channelCall<getDHCPProperty>(channel); ++ if ((dhcp == dhcpv4) || (dhcp == dhcpoff)) + { + gateway = + channelCall<getGatewayProperty<AF_INET6>>(channel).value_or( +-- +2.21.0 + diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0013-ipmi-add-set-bios-id-to-whitelist.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0013-ipmi-add-set-bios-id-to-whitelist.patch deleted file mode 100644 index 396d2e949..000000000 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0013-ipmi-add-set-bios-id-to-whitelist.patch +++ /dev/null @@ -1,22 +0,0 @@ -From ad7276f3aedb6f5aed315db57406c98f2bf71a09 Mon Sep 17 00:00:00 2001 -From: "Jia, Chunhui" <chunhui.jia@intel.com> -Date: Tue, 24 Jul 2018 13:21:52 +0800 -Subject: [PATCH] [ipmi] add set bios id to whitelist - -Add "SetBIOSId" and "GetDeviceInfo" 2 OEM commands into whitelist - -Signed-off-by: Jia, Chunhui <chunhui.jia@intel.com> ---- - host-ipmid-whitelist.conf | 2 ++ - 1 file changed, 2 insertions(+) - -Index: phosphor-host-ipmid/host-ipmid-whitelist.conf -=================================================================== ---- phosphor-host-ipmid.orig/host-ipmid-whitelist.conf -+++ phosphor-host-ipmid/host-ipmid-whitelist.conf -@@ -47,3 +47,5 @@ - 0x2C:0x06 //<Group Extension>:<Get Asset Tag> - 0x2C:0x07 //<Group Extension>:<Get Sensor Info> - 0x2C:0x10 //<Group Extension>:<Get Temperature Readings> -+0x30:0x26 //<OEM>:<Set BIOS ID> -+0x30:0x27 //<OEM>:<Get Device Info> diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0039-ipmi-add-oem-command-get-AIC-FRU-to-whitelist.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0039-ipmi-add-oem-command-get-AIC-FRU-to-whitelist.patch deleted file mode 100644 index fdaa91085..000000000 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0039-ipmi-add-oem-command-get-AIC-FRU-to-whitelist.patch +++ /dev/null @@ -1,25 +0,0 @@ -From cf466ba2c66a95825ae0014d7c378ad63b050d2f Mon Sep 17 00:00:00 2001 -From: "Jia, Chunhui" <chunhui.jia@intel.com> -Date: Wed, 15 Aug 2018 14:50:04 +0800 -Subject: [PATCH] [ipmi] add oem command "get AIC FRU" to whitelist - -Intel BIOS requires this oem command to get addon card FRU info. -Add to whitelist to unblock. - -Signed-off-by: Jia, Chunhui <chunhui.jia@intel.com> ---- - host-ipmid-whitelist.conf | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/host-ipmid-whitelist.conf b/host-ipmid-whitelist.conf -index db54a49..49746a2 100644 ---- a/host-ipmid-whitelist.conf -+++ b/host-ipmid-whitelist.conf -@@ -43,3 +43,4 @@ - 0x30:0x41 //<OEM>:<Set System GUID> - 0x30:0x26 //<OEM>:<Set BIOS ID> - 0x30:0x27 //<OEM>:<Get Device Info> -+0x30:0x31 //<OEM>:<Get AIC card FRU> --- -2.16.2 - diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0050-enable-6-oem-commands.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0050-enable-6-oem-commands.patch deleted file mode 100644 index b800632cc..000000000 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0050-enable-6-oem-commands.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/host-ipmid-whitelist.conf b/host-ipmid-whitelist.conf -index 22a2a3c..5d71698 100644 ---- a/host-ipmid-whitelist.conf -+++ b/host-ipmid-whitelist.conf -@@ -49,3 +49,10 @@ - 0x30:0x26 //<OEM>:<Set BIOS ID> - 0x30:0x27 //<OEM>:<Get Device Info> - 0x30:0x31 //<OEM>:<Get AIC card FRU> -+0x30:0x54 //<OEM>:<Set Power Restore Delay> -+0x30:0x55 //<OEM>:<Get Power Restore Delay> -+0x30:0x9A //<OEM>:<Get Processor Error Config> -+0x30:0x9B //<OEM>:<Set Processor Error Config> -+0x30:0xB0 //<OEM>:<Get LED Status> -+0x30:0xE9 //<OEM>:<Get BIOS Post Codes> -+ diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0056-add-SetInProgress-to-get-set-boot-option-cmd.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0056-add-SetInProgress-to-get-set-boot-option-cmd.patch index 3a77887a0..987e61448 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0056-add-SetInProgress-to-get-set-boot-option-cmd.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0056-add-SetInProgress-to-get-set-boot-option-cmd.patch @@ -1,4 +1,4 @@ -From 949db3a985719335d3df77db368eb2b296756749 Mon Sep 17 00:00:00 2001 +From f9f260391f099b4e67999f9d4ca05cbf9b422baf Mon Sep 17 00:00:00 2001 From: "Jia, chunhui" <chunhui.jia@linux.intel.com> Date: Tue, 19 Mar 2019 16:09:06 +0800 Subject: [PATCH] add SetInProgress to get/set boot option cmd @@ -9,16 +9,17 @@ option flow. Change-Id: Ibb0501ea5bc36c4f1f72339efef03724dd4e613f Signed-off-by: Jia, chunhui <chunhui.jia@linux.intel.com> +Signed-off-by: Yong Li <yong.b.li@linux.intel.com> --- - chassishandler.cpp | 26 +++++++++++++++++++++++++- + chassishandler.cpp | 28 +++++++++++++++++++++++++++- chassishandler.hpp | 3 +++ - 2 files changed, 28 insertions(+), 1 deletion(-) + 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/chassishandler.cpp b/chassishandler.cpp -index 6d14d1b..553afa8 100644 +index 305897b..ee23845 100644 --- a/chassishandler.cpp +++ b/chassishandler.cpp -@@ -1351,6 +1351,10 @@ static ipmi_ret_t setBootMode(const Mode::Modes& mode) +@@ -1399,6 +1399,10 @@ static ipmi_ret_t setBootMode(const Mode::Modes& mode) return IPMI_CC_OK; } @@ -29,7 +30,7 @@ index 6d14d1b..553afa8 100644 ipmi_ret_t ipmi_chassis_get_sys_boot_options(ipmi_netfn_t netfn, ipmi_cmd_t cmd, ipmi_request_t request, ipmi_response_t response, -@@ -1365,11 +1369,21 @@ ipmi_ret_t ipmi_chassis_get_sys_boot_options(ipmi_netfn_t netfn, ipmi_cmd_t cmd, +@@ -1413,11 +1417,21 @@ ipmi_ret_t ipmi_chassis_get_sys_boot_options(ipmi_netfn_t netfn, ipmi_cmd_t cmd, get_sys_boot_options_t* reqptr = (get_sys_boot_options_t*)request; IpmiValue bootOption = ipmiDefault; @@ -52,14 +53,16 @@ index 6d14d1b..553afa8 100644 /* * Parameter #5 means boot flags. Please refer to 28.13 of ipmi doc. * This is the only parameter used by petitboot. -@@ -1505,6 +1519,16 @@ ipmi_ret_t ipmi_chassis_set_sys_boot_options(ipmi_netfn_t netfn, ipmi_cmd_t cmd, +@@ -1553,6 +1567,18 @@ ipmi_ret_t ipmi_chassis_set_sys_boot_options(ipmi_netfn_t netfn, ipmi_cmd_t cmd, // This IPMI command does not have any resposne data *data_len = 0; + if (reqptr->parameter == + static_cast<uint8_t>(BootOptionParameter::SET_IN_PROGRESS)) + { -+ if (transferStatus == setInProgress) { ++ if ((transferStatus == setInProgress) && ++ (reqptr->data[0] != setComplete)) ++ { + return IPMI_CC_FAIL_SET_IN_PROGRESS; + } + transferStatus = reqptr->data[0]; @@ -70,10 +73,10 @@ index 6d14d1b..553afa8 100644 * Parameter #5 means boot flags. Please refer to 28.13 of ipmi doc. * This is the only parameter used by petitboot. diff --git a/chassishandler.hpp b/chassishandler.hpp -index 2c42b11..6a24507 100644 +index dcaf06c..353a929 100644 --- a/chassishandler.hpp +++ b/chassishandler.hpp -@@ -28,6 +28,7 @@ enum ipmi_chassis_return_codes +@@ -25,6 +25,7 @@ enum ipmi_chassis_return_codes { IPMI_OK = 0x0, IPMI_CC_PARM_NOT_SUPPORTED = 0x80, @@ -81,7 +84,7 @@ index 2c42b11..6a24507 100644 }; // Generic completion codes, -@@ -49,6 +50,7 @@ enum ipmi_chassis_control_cmds : uint8_t +@@ -46,6 +47,7 @@ enum ipmi_chassis_control_cmds : uint8_t }; enum class BootOptionParameter : size_t { @@ -89,7 +92,7 @@ index 2c42b11..6a24507 100644 BOOT_INFO = 0x4, BOOT_FLAGS = 0x5, OPAL_NETWORK_SETTINGS = 0x61 -@@ -56,6 +58,7 @@ enum class BootOptionParameter : size_t +@@ -53,6 +55,7 @@ enum class BootOptionParameter : size_t enum class BootOptionResponseSize : size_t { @@ -98,5 +101,5 @@ index 2c42b11..6a24507 100644 OPAL_NETWORK_SETTINGS = 50 }; -- -2.16.2 +2.7.4 diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0059-Move-Set-SOL-config-parameter-to-host-ipmid.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0059-Move-Set-SOL-config-parameter-to-host-ipmid.patch index 2dad2fc16..0d1a5abbb 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0059-Move-Set-SOL-config-parameter-to-host-ipmid.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0059-Move-Set-SOL-config-parameter-to-host-ipmid.patch @@ -42,7 +42,7 @@ diff --git a/transporthandler.cpp b/transporthandler.cpp index e88eb63..4a42e7b 100644 --- a/transporthandler.cpp +++ b/transporthandler.cpp -@@ -1168,8 +1168,323 @@ RspType<message::Payload> getLan(uint4_t channelBits, uint3_t, bool revOnly, +@@ -1469,8 +1469,323 @@ RspType<message::Payload> getLan(uint4_t channelBits, uint3_t, bool revOnly, } // namespace transport } // namespace ipmi @@ -366,10 +366,10 @@ index e88eb63..4a42e7b 100644 void register_netfn_transport_functions() { ipmi::registerHandler(ipmi::prioOpenBmcBase, ipmi::netFnTransport, -@@ -1178,4 +1493,11 @@ void register_netfn_transport_functions() +@@ -1479,4 +1794,11 @@ void register_netfn_transport_functions() ipmi::registerHandler(ipmi::prioOpenBmcBase, ipmi::netFnTransport, ipmi::transport::cmdGetLanConfigParameters, - ipmi::Privilege::Admin, ipmi::transport::getLan); + ipmi::Privilege::Operator, ipmi::transport::getLan); + + ipmi::registerHandler(ipmi::prioOpenBmcBase, ipmi::netFnTransport, + ipmi::transport::cmdSetSolConfigParameters, diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0062-Update-IPMI-Chassis-Control-command.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0062-Update-IPMI-Chassis-Control-command.patch index f29111758..6c61e0995 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0062-Update-IPMI-Chassis-Control-command.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0062-Update-IPMI-Chassis-Control-command.patch @@ -1,4 +1,4 @@ -From 00fb92edcb4229eeb5b46c4eb206ba7d70e241fc Mon Sep 17 00:00:00 2001 +From 959030b7ee71a7b23d1c081a0aadaa4eedbc0f63 Mon Sep 17 00:00:00 2001 From: "Jason M. Bills" <jason.m.bills@linux.intel.com> Date: Mon, 3 Jun 2019 17:01:47 -0700 Subject: [PATCH] Update IPMI Chassis Control command @@ -19,11 +19,11 @@ ipmitool power soft: soft power-off requested from system software Change-Id: Ic9fba3ca4abd9a758eb88f1e6ee09f7ca64ff80a Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com> --- - chassishandler.cpp | 206 ++++++++++++++--------------------------------------- - 1 file changed, 52 insertions(+), 154 deletions(-) + chassishandler.cpp | 205 +++++++++++++---------------------------------------- + 1 file changed, 50 insertions(+), 155 deletions(-) diff --git a/chassishandler.cpp b/chassishandler.cpp -index 88bf84b..ad564e2 100644 +index 053f29a..53b25b8 100644 --- a/chassishandler.cpp +++ b/chassishandler.cpp @@ -31,6 +31,7 @@ @@ -34,7 +34,7 @@ index 88bf84b..ad564e2 100644 #include <xyz/openbmc_project/State/Host/server.hpp> #include <xyz/openbmc_project/State/PowerOnHours/server.hpp> -@@ -712,59 +713,63 @@ ipmi_ret_t ipmi_set_chassis_cap(ipmi_netfn_t netfn, ipmi_cmd_t cmd, +@@ -712,59 +713,63 @@ ipmi::RspType<> ipmiSetChassisCap(bool intrusion, bool fpLockout, //------------------------------------------ // Calls into Host State Manager Dbus object //------------------------------------------ @@ -133,8 +133,8 @@ index 88bf84b..ad564e2 100644 + return 0; } - namespace power_policy -@@ -1033,76 +1038,6 @@ ipmi::RspType<bool, // Power is on + //------------------------------------------ +@@ -1065,76 +1070,6 @@ ipmi::RspType<bool, // Power is on diagButtonDisableAllow, sleepButtonDisableAllow); } @@ -211,7 +211,7 @@ index 88bf84b..ad564e2 100644 /** @brief Implementation of chassis control command * * @param - chassisControl command byte -@@ -1115,61 +1050,24 @@ ipmi::RspType<> ipmiChassisControl(uint8_t chassisControl) +@@ -1147,63 +1082,23 @@ ipmi::RspType<> ipmiChassisControl(uint8_t chassisControl) switch (chassisControl) { case CMD_POWER_ON: @@ -279,11 +279,11 @@ index 88bf84b..ad564e2 100644 - // Request Host State Manager to do a soft power off - rc = initiate_state_transition(State::Host::Transition::Off); + rc = initiateHostStateTransition(State::Host::Transition::Off); -+ break; -+ case CMD_PULSE_DIAGNOSTIC_INTR: break; - - default: +- + case CMD_PULSE_DIAGNOSTIC_INTR: + rc = setNmiProperty(true); + break; -- 2.7.4 diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0064-Enable-watchdog-to-save-useflag-after-host-power-off.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0064-Enable-watchdog-to-save-useflag-after-host-power-off.patch deleted file mode 100644 index 523a3e1a9..000000000 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0064-Enable-watchdog-to-save-useflag-after-host-power-off.patch +++ /dev/null @@ -1,65 +0,0 @@ -From c82162866be3c236ed73c6a19b9a0bb3097718ae Mon Sep 17 00:00:00 2001 -From: Yong Li <yong.b.li@linux.intel.com> -Date: Sat, 12 Oct 2019 12:23:24 +0800 -Subject: [PATCH] Enable watchdog to save useflag after host power off - -Get the right useflag after host power off. - -Tested: -Set a watchdog (Timer action is none and Time Use is BIOS FRB2) -ipmitool raw 0x06 0x24 0x01 0x00 0x00 0x00 0x40 0x00 -Get watchdog -ipmitool mc watchdog get -Start watchdog -ipmitool mc watchdog reset -Get watchdog -ipmitool mc watchdog get -After timer is stop, set a watchdog again -(Timer action is none and Time Use is BIOS/POST) -ipmitool raw 0x06 0x24 0x02 0x00 0x00 0x00 0x40 0x00 -Start watchdog and wait until timer is stop, -Get watchdog -ipmitool mc watchdog get -Timer Expiration Flags should be 0x06(BIOS FRB2, BIOS/POST) -Power down the Host -Ipmitool chassis power off -Check the Timer Expiration Flags(User Flags) -ipmitool mc watchdog get -Timer Expiration Flags should be 0x06(BIOS FRB2, BIOS/POST) - -Signed-off-by: Yong Li <yong.b.li@linux.intel.com> ---- - app/watchdog.cpp | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -diff --git a/app/watchdog.cpp b/app/watchdog.cpp -index c64a92f..2ff9ee9 100644 ---- a/app/watchdog.cpp -+++ b/app/watchdog.cpp -@@ -437,22 +437,20 @@ ipmi::RspType<uint3_t, // timerUse - timer use - wdTimerUseToIpmiTimerUse(wd_prop.expiredTimerUse)); - } - -+ expireFlags = timerUseExpirationFlags; - if (wd_prop.enabled) - { - presentCountdown = htole16(wd_prop.timeRemaining / 100); -- expireFlags = 0; - } - else - { - if (wd_prop.expiredTimerUse == WatchdogService::TimerUse::Reserved) - { - presentCountdown = initialCountdown; -- expireFlags = 0; - } - else - { - presentCountdown = 0; -- expireFlags = timerUseExpirationFlags; - // Automatically clear it whenever a timer expiration occurs. - timerNotLogFlags = false; - } --- -2.7.4 - diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/host-ipmid-whitelist.conf b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/host-ipmid-whitelist.conf index f3218d8d8..268e12848 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/host-ipmid-whitelist.conf +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/host-ipmid-whitelist.conf @@ -81,6 +81,7 @@ 0x0C:0x02 //<Transport>:<Get LAN Configuration Parameters> 0x0C:0x04 //<Transport>:<Get IPUDPRMCP Statistics> 0x0C:0x11 //<Transport>:<Get Serial Modem Configuration> +0x0C:0x21 //<Transport>:<Set SOL Configuration Parameters> 0x0C:0x22 //<Transport>:<Get SOL Configuration Parameters> 0x2C:0x1F //<Group Extension>:<Get CPU PECI Package Config Data> 0x2C:0x20 //<Group Extension>:<Get MDR Data Region Status> @@ -117,6 +118,8 @@ 0x30:0x43 //<Intel General Application>:<Get BMC Reset Disables> 0x30:0x44 //<Intel General Application>:<Send Embedded Firmware Update Status> 0x30:0x47 //<Intel General Application>:<HSBP Get Version> +0x30:0x54 //<Intel General Application>:<Set Power Restore Delay> +0x30:0x55 //<Intel General Application>:<Get Power Restore Delay> 0x30:0x55 //<Intel General Application>:<Get Power Restore Delay> 0x30:0x58 //<Intel General Application>:<Get DIMM Fault Status> 0x30:0x62 //<Intel General Application>:<Get Shutdown Policy> @@ -141,6 +144,7 @@ 0x30:0x94 //<Intel General Application>:<Get BMC Revision ID> 0x30:0x95 //<Intel General Application>:<Get Is AP CPU> 0x30:0x9A //<Intel General Application>:<Get Processor Error Configuration and Status> +0x30:0x9B //<Intel General Application>:<Set Processor Error Config> 0x30:0x9D //<Intel General Application>:<Get Fan PWM Limit> 0x30:0xB0 //<Intel General Application>:<Get LED Status> 0x30:0xB2 //<Intel General Application>:<Get BMC Service Status> diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend index 522eb9d7f..c6bc80202 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend @@ -2,26 +2,24 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" PROJECT_SRC_DIR := "${THISDIR}/${PN}" SRC_URI = "git://github.com/openbmc/phosphor-host-ipmid" -SRCREV = "ddb1f443d1d6e76949a230847e6145b108114a40" +SRCREV = "225dec858e52f0e8319acfe72d7b3630adcc7a0d" SRC_URI += "file://phosphor-ipmi-host.service \ file://host-ipmid-whitelist.conf \ file://0010-fix-get-system-GUID-ipmi-command.patch \ - file://0013-ipmi-add-set-bios-id-to-whitelist.patch \ - file://0039-ipmi-add-oem-command-get-AIC-FRU-to-whitelist.patch \ - file://0050-enable-6-oem-commands.patch \ file://0053-Fix-keep-looping-issue-when-entering-OS.patch \ file://0056-add-SetInProgress-to-get-set-boot-option-cmd.patch \ file://0059-Move-Set-SOL-config-parameter-to-host-ipmid.patch \ file://0060-Move-Get-SOL-config-parameter-to-host-ipmid.patch \ file://0062-Update-IPMI-Chassis-Control-command.patch \ file://0063-Save-the-pre-timeout-interrupt-in-dbus-property.patch \ - file://0064-Enable-watchdog-to-save-useflag-after-host-power-off.patch \ file://0064-Update-provisioning-mode-filter-logic.patch \ + file://0001-Modify-Get-Lan-Configuration-IP-Address-Source-to-us.patch \ " EXTRA_OECONF_append = " --disable-i2c-whitelist-check" EXTRA_OECONF_append = " --enable-transport-oem=yes" +EXTRA_OECONF_append = " --disable-boot-flag-safe-mode-support" RDEPENDS_${PN}_remove = "clear-once" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend index f33be5760..016dd0002 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend @@ -1,2 +1,2 @@ SRC_URI = "git://github.com/openbmc/ipmbbridge.git" -SRCREV = "bbfd00abdbc6d2f7c0389eae91cc055a1d4fe0c3" +SRCREV = "43c89138ea759b4e47f6cef481f677b9f421d148" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend index 140d1b302..adb1cc551 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend @@ -11,7 +11,7 @@ SMM_DEVICE = "ipmi_kcs4" SYSTEMD_SERVICE_${PN}_append = " ${PN}@${SMM_DEVICE}.service " SRC_URI = "git://github.com/openbmc/kcsbridge.git" -SRCREV = "2cdc49585235a6557c9cbb6c8b75c064fc02681a" +SRCREV = "46525ae48db23333493ac927c12ed13a0e663de5" SRC_URI += "file://99-ipmi-kcs.rules" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0012-Do-not-stop-session-in-deactivate-payload.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0012-Do-not-stop-session-in-deactivate-payload.patch new file mode 100644 index 000000000..6430a6928 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0012-Do-not-stop-session-in-deactivate-payload.patch @@ -0,0 +1,48 @@ +From cf8c0e1bf18334fe4a8f76c1e9b34ccfdc82f6f9 Mon Sep 17 00:00:00 2001 +From: Yong Li <yong.b.li@linux.intel.com> +Date: Fri, 15 Nov 2019 18:34:04 +0800 +Subject: [PATCH] Do not stop session in deactivate payload + +IPMI spec defines that: +The Deactivate Payload command does not cause the session to be terminated; + +Also during SOL looptest, there is only one time startSession call, +but multiple stopSessions calls, +This causes the looptest will fail if there is any new sessions comes in, +needs to remove the stopSession call. + +Tested: +Start the loop test in a terminal: +ipmitool -H $BMCIP -Uroot -P 0penBmc -I lanplus sol looptest 500 200 + +Then start a new session in another terminal: +ipmitool -H $BMCIP -Uroot -P 0penBmc -I lanplus raw 6 1 + +The looptest still works + +Signed-off-by: Yong Li <yong.b.li@linux.intel.com> +--- + command/payload_cmds.cpp | 7 ------- + 1 file changed, 7 deletions(-) + +diff --git a/command/payload_cmds.cpp b/command/payload_cmds.cpp +index f558781..363b843 100644 +--- a/command/payload_cmds.cpp ++++ b/command/payload_cmds.cpp +@@ -176,13 +176,6 @@ std::vector<uint8_t> deactivatePayload(const std::vector<uint8_t>& inPayload, + */ + return outPayload; + } +- +- auto check = +- std::get<session::Manager&>(singletonPool).stopSession(sessionID); +- if (!check) +- { +- response->completionCode = IPMI_CC_UNSPECIFIED_ERROR; +- } + } + catch (std::exception& e) + { +-- +2.7.4 + diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend index 7f7d89105..9f3bf81ca 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend @@ -3,7 +3,7 @@ inherit useradd # TODO: This should be removed, once up-stream bump up # issue is resolved SRC_URI += "git://github.com/openbmc/phosphor-net-ipmid" -SRCREV = "dafe36444fa438030fdf27089b0e94d8d88411dc" +SRCREV = "49a94b2f82fb1aa68d608f28c4863bb36661a3a4" USERADD_PACKAGES = "${PN}" # add a group called ipmi @@ -22,5 +22,6 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" SRC_URI += " file://0006-Modify-dbus-namespace-of-chassis-control-for-guid.patch \ file://0009-Add-dbus-interface-for-sol-commands.patch \ file://0011-Remove-Get-SOL-Config-Command-from-Netipmid.patch \ + file://0012-Do-not-stop-session-in-deactivate-payload.patch \ " diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-node-manager-proxy_git.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-node-manager-proxy_git.bb index fd0a6562b..6d8334865 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-node-manager-proxy_git.bb +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-node-manager-proxy_git.bb @@ -3,7 +3,7 @@ DESCRIPTION = "The Node Manager Proxy provides a simple interface for communicat with Management Engine via IPMB" SRC_URI = "git://git@github.com/Intel-BMC/node-manager;protocol=ssh" -SRCREV = "cceeff9cd35aa548cba039b8ad47c20c5870fa27" +SRCREV = "a0d3ec079f569c47af21d8cafe46e65f5784cd5b" PV = "0.1+git${SRCPV}" LICENSE = "Apache-2.0" |