From 18f97faa411078b95d042d207f5fff32bc8ece1d Mon Sep 17 00:00:00 2001 From: P Dheeraj Srujan Kumar Date: Thu, 31 Mar 2022 02:50:48 +0530 Subject: Update to internal 1-0.91 Signed-off-by: P Dheeraj Srujan Kumar --- .../0062-Update-IPMI-Chassis-Control-command.patch | 292 --------------------- .../ipmi/phosphor-ipmi-host_%.bbappend | 3 +- .../ipmi/phosphor-ipmi-net_%.bbappend | 2 +- .../ipmi/phosphor-node-manager-proxy_git.bb | 2 +- 4 files changed, 3 insertions(+), 296 deletions(-) delete mode 100644 meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0062-Update-IPMI-Chassis-Control-command.patch (limited to 'meta-openbmc-mods/meta-common/recipes-phosphor/ipmi') 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 deleted file mode 100644 index 112c1ffab..000000000 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0062-Update-IPMI-Chassis-Control-command.patch +++ /dev/null @@ -1,292 +0,0 @@ -From 99f63d2af9f45badaa8aff4ef958443bea62ede8 Mon Sep 17 00:00:00 2001 -From: "Jason M. Bills" -Date: Mon, 3 Jun 2019 17:01:47 -0700 -Subject: [PATCH] Update IPMI Chassis Control command - -This change updates the IPMI Chassis Control command to use the new -host state transitions. This allows each chassis control action -to more closely follow the behavior defined in the IPMI spec. - -ref: https://gerrit.openbmc-project.xyz/c/openbmc/docs/+/22358 - -Tested: -Ran each IPMI chassis control command to confirm the expected -behavior: -ipmitool power on: system is powered-on -ipmitool power off: system is forced off -ipmitool power cycle: system is forced off then powered-on -ipmitool power reset: system is hard reset -ipmitool power soft: soft power-off requested from system software - -Change-Id: Ic9fba3ca4abd9a758eb88f1e6ee09f7ca64ff80a -Signed-off-by: Jason M. Bills ---- - chassishandler.cpp | 204 +++++++++++---------------------------------- - 1 file changed, 48 insertions(+), 156 deletions(-) - -diff --git a/chassishandler.cpp b/chassishandler.cpp -index dfbe004be490..cd0ba3402f84 100644 ---- a/chassishandler.cpp -+++ b/chassishandler.cpp -@@ -32,6 +32,7 @@ - #include - #include - #include -+#include - #include - #include - -@@ -815,59 +816,63 @@ ipmi::RspType<> ipmiSetChassisCap(bool intrusion, bool fpLockout, - //------------------------------------------ - // Calls into Host State Manager Dbus object - //------------------------------------------ --int initiate_state_transition(State::Host::Transition transition) -+int initiateHostStateTransition(State::Host::Transition transition) - { - // OpenBMC Host State Manager dbus framework -- constexpr auto HOST_STATE_MANAGER_ROOT = "/xyz/openbmc_project/state/host0"; -- constexpr auto HOST_STATE_MANAGER_IFACE = "xyz.openbmc_project.State.Host"; -- constexpr auto DBUS_PROPERTY_IFACE = "org.freedesktop.DBus.Properties"; -- constexpr auto PROPERTY = "RequestedHostTransition"; -+ constexpr auto hostStatePath = "/xyz/openbmc_project/state/host0"; -+ constexpr auto hostStateIntf = "xyz.openbmc_project.State.Host"; - -- // sd_bus error -- int rc = 0; -- char* busname = NULL; -+ auto service = ipmi::getService(*getSdBus(), hostStateIntf, hostStatePath); - -- // SD Bus error report mechanism. -- sd_bus_error bus_error = SD_BUS_ERROR_NULL; -+ // Convert to string equivalent of the passed in transition enum. -+ auto request = State::convertForMessage(transition); - -- // Gets a hook onto either a SYSTEM or SESSION bus -- sd_bus* bus_type = ipmid_get_sd_bus_connection(); -- rc = mapper_get_service(bus_type, HOST_STATE_MANAGER_ROOT, &busname); -- if (rc < 0) -+ try -+ { -+ ipmi::setDbusProperty(*getSdBus(), service, hostStatePath, -+ hostStateIntf, "RequestedHostTransition", -+ request); -+ } -+ catch (std::exception& e) - { - log( -- "Failed to get bus name", -- entry("ERRNO=0x%X, OBJPATH=%s", -rc, HOST_STATE_MANAGER_ROOT)); -- return rc; -+ "Failed to initiate transition", -+ entry("EXCEPTION=%s, REQUEST=%s", e.what(), request.c_str())); -+ return -1; - } -+ return 0; -+} -+ -+//------------------------------------------ -+// Calls into Chassis State Manager Dbus object -+//------------------------------------------ -+int initiateChassisStateTransition(State::Chassis::Transition transition) -+{ -+ // OpenBMC Chassis State Manager dbus framework -+ constexpr auto chassisStatePath = "/xyz/openbmc_project/state/chassis0"; -+ constexpr auto chassisStateIntf = "xyz.openbmc_project.State.Chassis"; -+ -+ auto service = -+ ipmi::getService(*getSdBus(), chassisStateIntf, chassisStatePath); - - // Convert to string equivalent of the passed in transition enum. - auto request = State::convertForMessage(transition); - -- rc = sd_bus_call_method(bus_type, // On the system bus -- busname, // Service to contact -- HOST_STATE_MANAGER_ROOT, // Object path -- DBUS_PROPERTY_IFACE, // Interface name -- "Set", // Method to be called -- &bus_error, // object to return error -- nullptr, // Response buffer if any -- "ssv", // Takes 3 arguments -- HOST_STATE_MANAGER_IFACE, PROPERTY, "s", -- request.c_str()); -- if (rc < 0) -- { -- log("Failed to initiate transition", -- entry("ERRNO=0x%X, REQUEST=%s", -rc, request.c_str())); -+ try -+ { -+ ipmi::setDbusProperty(*getSdBus(), service, chassisStatePath, -+ chassisStateIntf, "RequestedPowerTransition", -+ request); - } -- else -+ catch (std::exception& e) - { -- log("Transition request initiated successfully"); -+ log( -+ "Failed to initiate transition", -+ entry("EXCEPTION=%s, REQUEST=%s", e.what(), request.c_str())); -+ return -1; - } - -- sd_bus_error_free(&bus_error); -- free(busname); -- -- return rc; -+ return 0; - } - - //------------------------------------------ -@@ -1302,76 +1307,6 @@ ipmi::RspType("Failed to set property in SoftPowerOff object", -- entry("ERRNO=0x%X", -rc)); -- } -- -- // TODO openbmc/openbmc#1661 - Mapper refactor -- // free(busname); -- return rc; --} -- --//---------------------------------------------------------------------- --// Create file to indicate there is no need for softoff notification to host --//---------------------------------------------------------------------- --void indicate_no_softoff_needed() --{ -- fs::path path{HOST_INBAND_REQUEST_DIR}; -- if (!fs::is_directory(path)) -- { -- fs::create_directory(path); -- } -- -- // Add the host instance (default 0 for now) to the file name -- std::string file{HOST_INBAND_REQUEST_FILE}; -- auto size = std::snprintf(nullptr, 0, file.c_str(), 0); -- size++; // null -- std::unique_ptr buf(new char[size]); -- std::snprintf(buf.get(), size, file.c_str(), 0); -- -- // Append file name to directory and create it -- path /= buf.get(); -- std::ofstream(path.c_str()); --} -- - /** @brief Implementation of chassis control command - * - * @param - chassisControl command byte -@@ -1384,66 +1319,22 @@ ipmi::RspType<> ipmiChassisControl(uint8_t chassisControl) - switch (chassisControl) - { - case CMD_POWER_ON: -- rc = initiate_state_transition(State::Host::Transition::On); -+ rc = initiateHostStateTransition(State::Host::Transition::On); - break; - case CMD_POWER_OFF: -- // This path would be hit in 2 conditions. -- // 1: When user asks for power off using ipmi chassis command 0x04 -- // 2: Host asking for power off post shutting down. -- -- // If it's a host requested power off, then need to nudge Softoff -- // application that it needs to stop the watchdog timer if running. -- // If it is a user requested power off, then this is not really -- // needed. But then we need to differentiate between user and host -- // calling this same command -- -- // For now, we are going ahead with trying to nudge the soft off and -- // interpret the failure to do so as a non softoff case -- rc = stop_soft_off_timer(); -- -- // Only request the Off transition if the soft power off -- // application is not running -- if (rc < 0) -- { -- // First create a file to indicate to the soft off application -- // that it should not run. Not doing this will result in State -- // manager doing a default soft power off when asked for power -- // off. -- indicate_no_softoff_needed(); -- -- // Now request the shutdown -- rc = initiate_state_transition(State::Host::Transition::Off); -- } -- else -- { -- log("Soft off is running, so let shutdown target " -- "stop the host"); -- } -+ rc = -+ initiateChassisStateTransition(State::Chassis::Transition::Off); - break; -- - case CMD_HARD_RESET: -- rc = initiate_state_transition( -+ rc = initiateHostStateTransition( - State::Host::Transition::ForceWarmReboot); - break; - case CMD_POWER_CYCLE: -- // SPEC has a section that says certain implementations can trigger -- // PowerOn if power is Off when a command to power cycle is -- // requested -- -- // First create a file to indicate to the soft off application -- // that it should not run since this is a direct user initiated -- // power reboot request (i.e. a reboot request that is not -- // originating via a soft power off SMS request) -- indicate_no_softoff_needed(); -- -- rc = initiate_state_transition(State::Host::Transition::Reboot); -+ rc = initiateHostStateTransition(State::Host::Transition::Reboot); - break; -- - case CMD_SOFT_OFF_VIA_OVER_TEMP: -- // 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: - rc = setNmiProperty(true); - break; --- -2.17.1 - 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 87aab6f79..5c0908515 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,14 +2,13 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" PROJECT_SRC_DIR := "${THISDIR}/${PN}" #SRC_URI += "git://github.com/openbmc/phosphor-host-ipmid" -SRCREV = "78fe1b14f60d55ae335369fb2c6e81ed9ac6d865" +SRCREV = "f93da667b58b67cf61d06dcc5862d9864c96d8e7" SRC_URI += "file://phosphor-ipmi-host.service \ file://0010-fix-get-system-GUID-ipmi-command.patch \ file://0053-Fix-keep-looping-issue-when-entering-OS.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 \ " 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 a0b507cb8..853d68d87 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 = "5819666c23ee1d01a54fc5fb2c068bb1da1f29c7" +SRCREV = "af23add2a2cf73226cdc72af4793fde6357e8932" USERADD_PACKAGES = "${PN}" # add a group called ipmi 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 14093cf3e..5935b3289 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 @@ -2,7 +2,7 @@ SUMMARY = "Node Manager Proxy" DESCRIPTION = "The Node Manager Proxy provides a simple interface for communicating \ with Management Engine via IPMB" -SRC_URI = "git://github.com/Intel-BMC/node-manager;protocol=ssh" +SRC_URI = "git://git@github.com/Intel-BMC/node-manager.git;protocol=ssh" SRCREV = "9aca80fa2a405938de99aae777e6cfcf08525563" PV = "0.1+git${SRCPV}" -- cgit v1.2.3