diff options
author | Jason M. Bills <jason.m.bills@linux.intel.com> | 2021-05-24 22:54:37 +0300 |
---|---|---|
committer | Jason M. Bills <jason.m.bills@linux.intel.com> | 2021-05-24 23:12:35 +0300 |
commit | 2a64b8ae9b952b18b4aef38cb7c41ce6dba16c50 (patch) | |
tree | 704eb802dc7b987411a0e44d128bdd8978745d8c /meta-openbmc-mods/meta-common/recipes-phosphor/ipmi | |
parent | 0e0df451ae365f09d5c0c766b253f23de26901f2 (diff) | |
download | openbmc-2a64b8ae9b952b18b4aef38cb7c41ce6dba16c50.tar.xz |
Update to internal 0.52
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-phosphor/ipmi')
5 files changed, 2 insertions, 441 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0064-Correct-the-IPv6-Router-Address-Configuration-comman.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0064-Correct-the-IPv6-Router-Address-Configuration-comman.patch deleted file mode 100644 index 658f0d8b7..000000000 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0064-Correct-the-IPv6-Router-Address-Configuration-comman.patch +++ /dev/null @@ -1,120 +0,0 @@ -From 4d7c0f704df21912fa447caca4dbba246d1b80f6 Mon Sep 17 00:00:00 2001 -From: Johnathan Mantey <johnathanx.mantey@intel.com> -Date: Tue, 26 Jan 2021 14:24:53 -0800 -Subject: [PATCH] Correct the IPv6 Router Address Configuration command - -The IPv6 Router Address Configuration Get/Set LAN command was not -reporting or modifying the correct portion of the networking -system. This command is intended to configure the Routing -Advertisement feature of IPv6. It is not a direct reflection of the -DHCP state. - -Systemd-networkd manages the Routing Advertisement via the -IPv6AcceptRA parameter, which according to the networkd documentaion, -enables/disables IPv6 DHCP functionality. - -Tested: -Issued "ipmitool raw 12 2 3 64 0 0" and was able to read the current -state of the IPv6AcceptRA variable. -Issued "ipmitool raw 12 1 3 64 2" and saw the configuration file for -the channel change, and the addition of a new IPv6 address to the -network device. -Issued "ipmitool raw 12 1 3 64 0" and saw that configuration file for -the channel change, and the removal of the IPv6 address from the -network device. - -Change-Id: Id01441f88ccc9d56449ab8115f4855de74e80cfc -Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com> ---- - transporthandler.cpp | 61 ++++++++++++++++++++++++-------------------- - 1 file changed, 34 insertions(+), 27 deletions(-) - -diff --git a/transporthandler.cpp b/transporthandler.cpp -index b81e0d5..50343c7 100644 ---- a/transporthandler.cpp -+++ b/transporthandler.cpp -@@ -1260,6 +1260,35 @@ SetStatus& getSetStatus(uint8_t channel) - return setStatus[channel] = SetStatus::Complete; - } - -+/** @brief Gets the IPv6 Router Advertisement value -+ * -+ * @param[in] bus - The bus object used for lookups -+ * @param[in] params - The parameters for the channel -+ * @return networkd IPV6AcceptRA value -+ */ -+static bool getIPv6AcceptRA(sdbusplus::bus::bus& bus, -+ const ChannelParams& params) -+{ -+ auto raEnabled = -+ std::get<bool>(getDbusProperty(bus, params.service, params.logicalPath, -+ INTF_ETHERNET, "IPv6AcceptRA")); -+ return raEnabled; -+} -+ -+/** @brief Sets the IPv6AcceptRA flag -+ * -+ * @param[in] bus - The bus object used for lookups -+ * @param[in] params - The parameters for the channel -+ * @param[in] ipv6AcceptRA - boolean to enable/disable IPv6 Routing -+ * Advertisement -+ */ -+void setIPv6AcceptRA(sdbusplus::bus::bus& bus, const ChannelParams& params, -+ const bool ipv6AcceptRA) -+{ -+ setDbusProperty(bus, params.service, params.logicalPath, INTF_ETHERNET, -+ "IPv6AcceptRA", ipv6AcceptRA); -+} -+ - /** - * Define placeholder command handlers for the OEM Extension bytes for the Set - * LAN Configuration Parameters and Get LAN Configuration Parameters -@@ -1629,22 +1658,8 @@ RspType<> setLan(Context::ptr ctx, uint4_t channelBits, uint4_t reserved1, - { - return responseReqDataLenInvalid(); - } -- std::bitset<8> expected; -- EthernetInterface::DHCPConf dhcp = -- channelCall<getDHCPProperty>(channel); -- if ((dhcp == EthernetInterface::DHCPConf::both) | -- (dhcp == EthernetInterface::DHCPConf::v6)) -- { -- expected[IPv6RouterControlFlag::Dynamic] = 1; -- } -- else -- { -- expected[IPv6RouterControlFlag::Static] = 1; -- } -- if (expected != control) -- { -- return responseInvalidFieldRequest(); -- } -+ bool enableRA = control[IPv6RouterControlFlag::Dynamic]; -+ channelCall<setIPv6AcceptRA>(channel, enableRA); - return responseSuccess(); - } - case LanParam::IPv6StaticRouter1IP: -@@ -1948,17 +1963,9 @@ RspType<message::Payload> getLan(Context::ptr ctx, uint4_t channelBits, - case LanParam::IPv6RouterControl: - { - std::bitset<8> control; -- EthernetInterface::DHCPConf dhcp = -- channelCall<getDHCPProperty>(channel); -- if ((dhcp == EthernetInterface::DHCPConf::both) || -- (dhcp == EthernetInterface::DHCPConf::v6)) -- { -- control[IPv6RouterControlFlag::Dynamic] = 1; -- } -- else -- { -- control[IPv6RouterControlFlag::Static] = 1; -- } -+ control[IPv6RouterControlFlag::Dynamic] = -+ channelCall<getIPv6AcceptRA>(channel); -+ control[IPv6RouterControlFlag::Static] = 0; - ret.pack(control); - return responseSuccess(std::move(ret)); - } --- -2.26.2 - 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 81cb43ebe..677641faf 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 @@ -8,7 +8,6 @@ SRC_URI += "file://phosphor-ipmi-host.service \ 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-Correct-the-IPv6-Router-Address-Configuration-comman.patch \ " EXTRA_OECONF_append = " --disable-i2c-whitelist-check" 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 0aa63ca03..cc9f2d025 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 = "4a4d1d03d99fabe089e649aa226ad4c61e71684e" +SRCREV = "3b170152ddc967f270939f4c351be987c451f0ca" SRC_URI += "file://99-ipmi-kcs.rules" diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0009-Add-dbus-interface-for-sol-commands.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0009-Add-dbus-interface-for-sol-commands.patch deleted file mode 100644 index 5f749af45..000000000 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0009-Add-dbus-interface-for-sol-commands.patch +++ /dev/null @@ -1,317 +0,0 @@ -From e5ab844259f569656e95f5324f7428229dd811a7 Mon Sep 17 00:00:00 2001 -From: Cheng C Yang <cheng.c.yang@intel.com> -Date: Wed, 3 Jul 2019 07:39:47 +0800 -Subject: [PATCH] Add dbus interface for sol commands - -Add dbus interface for sol config parameters so that after move set/get -sol config parameter command from net-ipmid to host-ipmid, the command -can send config parameters to net-ipmid sol service through the dbus -interface. - -Tested by: -busctl introspect xyz.openbmc_project.Settings /xyz/openbmc_project -/network/host0/sol can show correct dbus properties of sol parameters. -ipmitool -I lanplus -H x -U x -P x raw 0x0c 0x21 0x0e 0x00 0x01 -ipmitool -I lanplus -H x -U x -P x raw 0x0c 0x21 0x0e 0x01 0x00 -ipmitool -I lanplus -H x -U x -P x raw 0x0c 0x21 0x0e 0x02 0x83 -ipmitool -I lanplus -H x -U x -P x raw 0x0c 0x21 0x0e 0x03 0x5 0x03 -ipmitool -I lanplus -H x -U x -P x raw 0x0c 0x21 0x0e 0x04 0x5 0x03 -all these commands can change the dbus properties as the value in -above commands. -Before and after run these commands, ipmitool -I lanplus -H x -U x --P x sol activate can start sol session correctly. -After reboot BMC, "Progress" property in dbus interface change back -to 0 and other properties will not reset to default value. - -Signed-off-by: Cheng C Yang <cheng.c.yang@intel.com> ---- - command/payload_cmds.cpp | 3 + - command/sol_cmds.cpp | 84 -------------------------- - sol/sol_manager.cpp | 124 +++++++++++++++++++++++++++++++++++++++ - sol/sol_manager.hpp | 1 + - sol_module.cpp | 6 -- - 5 files changed, 128 insertions(+), 90 deletions(-) - -diff --git a/command/payload_cmds.cpp b/command/payload_cmds.cpp -index c8e682e..bc987c5 100644 ---- a/command/payload_cmds.cpp -+++ b/command/payload_cmds.cpp -@@ -41,6 +41,9 @@ std::vector<uint8_t> activatePayload(const std::vector<uint8_t>& inPayload, - return outPayload; - } - -+ std::get<sol::Manager&>(singletonPool) -+ .updateSOLParameter(ipmi::convertCurrentChannelNum( -+ ipmi::currentChNum, getInterfaceIndex())); - if (!std::get<sol::Manager&>(singletonPool).enable) - { - response->completionCode = IPMI_CC_PAYLOAD_TYPE_DISABLED; -diff --git a/command/sol_cmds.cpp b/command/sol_cmds.cpp -index fda3e91..a1e820f 100644 ---- a/command/sol_cmds.cpp -+++ b/command/sol_cmds.cpp -@@ -71,90 +71,6 @@ void activating(uint8_t payloadInstance, uint32_t sessionID) - outPayload); - } - --std::vector<uint8_t> setConfParams(const std::vector<uint8_t>& inPayload, -- const message::Handler& handler) --{ -- std::vector<uint8_t> outPayload(sizeof(SetConfParamsResponse)); -- auto request = -- reinterpret_cast<const SetConfParamsRequest*>(inPayload.data()); -- auto response = reinterpret_cast<SetConfParamsResponse*>(outPayload.data()); -- response->completionCode = IPMI_CC_OK; -- -- switch (static_cast<Parameter>(request->paramSelector)) -- { -- case Parameter::PROGRESS: -- { -- uint8_t progress = request->value & progressMask; -- std::get<sol::Manager&>(singletonPool).progress = progress; -- break; -- } -- case Parameter::ENABLE: -- { -- bool enable = request->value & enableMask; -- std::get<sol::Manager&>(singletonPool).enable = enable; -- break; -- } -- case Parameter::AUTHENTICATION: -- { -- if (!request->auth.auth || !request->auth.encrypt) -- { -- response->completionCode = ipmiCCWriteReadParameter; -- } -- else if (request->auth.privilege < -- static_cast<uint8_t>(session::Privilege::USER) || -- request->auth.privilege > -- static_cast<uint8_t>(session::Privilege::OEM)) -- { -- response->completionCode = IPMI_CC_INVALID_FIELD_REQUEST; -- } -- else -- { -- std::get<sol::Manager&>(singletonPool).solMinPrivilege = -- static_cast<session::Privilege>(request->auth.privilege); -- } -- break; -- } -- case Parameter::ACCUMULATE: -- { -- using namespace std::chrono_literals; -- -- if (request->acc.threshold == 0) -- { -- response->completionCode = IPMI_CC_INVALID_FIELD_REQUEST; -- break; -- } -- -- std::get<sol::Manager&>(singletonPool).accumulateInterval = -- request->acc.interval * sol::accIntervalFactor * 1ms; -- std::get<sol::Manager&>(singletonPool).sendThreshold = -- request->acc.threshold; -- break; -- } -- case Parameter::RETRY: -- { -- using namespace std::chrono_literals; -- -- std::get<sol::Manager&>(singletonPool).retryCount = -- request->retry.count; -- std::get<sol::Manager&>(singletonPool).retryInterval = -- request->retry.interval * sol::retryIntervalFactor * 1ms; -- break; -- } -- case Parameter::PORT: -- { -- response->completionCode = ipmiCCWriteReadParameter; -- break; -- } -- case Parameter::NVBITRATE: -- case Parameter::VBITRATE: -- case Parameter::CHANNEL: -- default: -- response->completionCode = ipmiCCParamNotSupported; -- } -- -- return outPayload; --} -- - std::vector<uint8_t> getConfParams(const std::vector<uint8_t>& inPayload, - const message::Handler& handler) - { -diff --git a/sol/sol_manager.cpp b/sol/sol_manager.cpp -index a118457..55d269a 100644 ---- a/sol/sol_manager.cpp -+++ b/sol/sol_manager.cpp -@@ -14,6 +14,11 @@ - #include <cmath> - #include <ipmid/utils.hpp> - #include <phosphor-logging/log.hpp> -+#include <sdbusplus/message/types.hpp> -+ -+constexpr const char* solInterface = "xyz.openbmc_project.Ipmi.SOL"; -+constexpr const char* solPath = "/xyz/openbmc_project/ipmi/sol/"; -+constexpr const char* PROP_INTF = "org.freedesktop.DBus.Properties"; - - namespace sol - { -@@ -103,6 +108,125 @@ void Manager::stopHostConsole() - } - } - -+std::string getService(sdbusplus::bus::bus& bus, const std::string& intf, -+ const std::string& path) -+{ -+ auto mapperCall = -+ bus.new_method_call("xyz.openbmc_project.ObjectMapper", -+ "/xyz/openbmc_project/object_mapper", -+ "xyz.openbmc_project.ObjectMapper", "GetObject"); -+ -+ mapperCall.append(path); -+ mapperCall.append(std::vector<std::string>({intf})); -+ -+ std::map<std::string, std::vector<std::string>> mapperResponse; -+ -+ try -+ { -+ auto mapperResponseMsg = bus.call(mapperCall); -+ mapperResponseMsg.read(mapperResponse); -+ } -+ catch (sdbusplus::exception_t&) -+ { -+ throw std::runtime_error("ERROR in mapper call"); -+ } -+ -+ if (mapperResponse.begin() == mapperResponse.end()) -+ { -+ throw std::runtime_error("ERROR in reading the mapper response"); -+ } -+ -+ return mapperResponse.begin()->first; -+} -+ -+ipmi::PropertyMap getAllDbusProperties(sdbusplus::bus::bus& bus, -+ const std::string& service, -+ const std::string& objPath, -+ const std::string& interface) -+{ -+ ipmi::PropertyMap properties; -+ -+ sdbusplus::message::message method = bus.new_method_call( -+ service.c_str(), objPath.c_str(), PROP_INTF, "GetAll"); -+ -+ method.append(interface); -+ -+ try -+ { -+ sdbusplus::message::message reply = bus.call(method); -+ reply.read(properties); -+ } -+ catch (sdbusplus::exception_t&) -+ { -+ phosphor::logging::log<phosphor::logging::level::ERR>( -+ "Failed to get all properties", -+ phosphor::logging::entry("PATH=%s", objPath.c_str()), -+ phosphor::logging::entry("INTERFACE=%s", interface.c_str())); -+ throw std::runtime_error("ERROR in reading proerties"); -+ } -+ -+ return properties; -+} -+ -+void Manager::updateSOLParameter(uint8_t channelNum) -+{ -+ std::variant<uint8_t, bool> value; -+ sdbusplus::bus::bus dbus(ipmid_get_sd_bus_connection()); -+ static std::string solService{}; -+ ipmi::PropertyMap properties; -+ std::string ethdevice = ipmi::getChannelName(channelNum); -+ std::string solPathWitheEthName = solPath + ethdevice; -+ if (solService.empty()) -+ { -+ try -+ { -+ solService = getService(dbus, solInterface, solPathWitheEthName); -+ } -+ catch (const std::runtime_error& e) -+ { -+ solService.clear(); -+ phosphor::logging::log<phosphor::logging::level::ERR>( -+ "Error: get SOL service failed"); -+ return; -+ } -+ } -+ try -+ { -+ properties = getAllDbusProperties(dbus, solService, solPathWitheEthName, -+ solInterface); -+ } -+ catch (const std::runtime_error&) -+ { -+ phosphor::logging::log<phosphor::logging::level::ERR>( -+ "Error setting sol parameter"); -+ return; -+ } -+ -+ progress = std::get<uint8_t>(properties["Progress"]); -+ -+ enable = std::get<bool>(properties["Enable"]); -+ -+ forceEncrypt = std::get<bool>(properties["ForceEncryption"]); -+ -+ forceAuth = std::get<bool>(properties["ForceAuthentication"]); -+ -+ solMinPrivilege = static_cast<session::Privilege>( -+ std::get<uint8_t>(properties["Privilege"])); -+ -+ accumulateInterval = -+ std::get<uint8_t>((properties["AccumulateIntervalMS"])) * -+ sol::accIntervalFactor * 1ms; -+ -+ sendThreshold = std::get<uint8_t>(properties["Threshold"]); -+ -+ retryCount = std::get<uint8_t>(properties["RetryCount"]); -+ -+ retryInterval = std::get<uint8_t>(properties["RetryIntervalMS"]) * -+ sol::retryIntervalFactor * 1ms; -+ -+ return; -+} -+ - void Manager::startPayloadInstance(uint8_t payloadInstance, - session::SessionID sessionID) - { -diff --git a/sol/sol_manager.hpp b/sol/sol_manager.hpp -index 5b48add..4e797d4 100644 ---- a/sol/sol_manager.hpp -+++ b/sol/sol_manager.hpp -@@ -252,6 +252,7 @@ class Manager - * @return 0 on success and errno on failure. - */ - int writeConsoleSocket(const std::vector<uint8_t>& input) const; -+ void updateSOLParameter(uint8_t channelNum); - - private: - SOLPayloadMap payloadMap; -diff --git a/sol_module.cpp b/sol_module.cpp -index 8200e74..2b1fb46 100644 ---- a/sol_module.cpp -+++ b/sol_module.cpp -@@ -42,12 +42,6 @@ void registerCommands() - &getPayloadInfo, - session::Privilege::USER, - false}, -- // Set SOL Configuration Parameters -- {{(static_cast<uint32_t>(message::PayloadType::IPMI) << 16) | -- static_cast<uint16_t>(::command::NetFns::TRANSPORT) | 0x21}, -- &setConfParams, -- session::Privilege::ADMIN, -- false}, - // Get SOL Configuration Parameters - {{(static_cast<uint32_t>(message::PayloadType::IPMI) << 16) | - static_cast<uint16_t>(::command::NetFns::TRANSPORT) | 0x22}, --- -2.17.1 - 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 9b76a8fa4..7fe91fd1f 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 = "de7dd5ce3133a0201e149b6fdf3d3458fb7f06a5" +SRCREV = "d4a4bed525f79c39705fa526b20ab663bb2c2069" USERADD_PACKAGES = "${PN}" # add a group called ipmi @@ -21,7 +21,6 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" SRC_URI += " file://10-nice-rules.conf \ 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 \ " |