summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Alekseev (IBS Group) <ealekseev@ibs.sila.ru>2022-09-23 22:13:09 +0300
committerEvgeny Alekseev (IBS Group) <ealekseev@ibs.sila.ru>2022-09-23 22:13:09 +0300
commita29def53d7ae09c5dd15865e28b32af02c887510 (patch)
treef6a3f42f56575f98e99ba891cfcac04ad689cb86
parent376ff2bfb09134022b614a36f785fe48ed149f89 (diff)
parent3a00dbdeaa5df0b64d5ff101ac69a7ea1d117470 (diff)
downloadopenbmc-a29def53d7ae09c5dd15865e28b32af02c887510.tar.xz
Merge branch 'sila-rebase' of git.sila.ru:pub/openbmc/openbmc into sila-rebase
-rw-r--r--meta-ibs/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb/0001-Add-dbus-method-SlotIpmbRequest.patch536
-rw-r--r--meta-ibs/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb/0002-Add-log-count-limitation-to-requestAdd.patch95
-rw-r--r--meta-ibs/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb/0003-Fix-for-clearing-outstanding-requests.patch63
-rw-r--r--meta-ibs/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend5
-rw-r--r--meta-ibs/meta-cp2-5422/recipes-phosphor/flash/phosphor-software-manager/0002-Added-reading-BIOS-version-from-file.patch97
-rw-r--r--meta-ibs/meta-cp2-5422/recipes-phosphor/flash/phosphor-software-manager_%.bbappend1
-rw-r--r--meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0019-add-smtp-logging.patch29
-rw-r--r--meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb_%.bbappend1
-rw-r--r--meta-ibs/meta-cp2-5422/recipes-phosphor/ipmi/phosphor-ipmi-host/0001-Add-set-BIOS-version-support.patch83
-rw-r--r--meta-ibs/meta-cp2-5422/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend5
-rw-r--r--meta-ibs/meta-cp2-5422/recipes-phosphor/virtual-media/virtual-media.bbappend2
-rw-r--r--meta-ibs/meta-cp2-5422/recipes-phosphor/virtual-media/virtual-media/0006-Fix-redirect-CA-path-to-generic-one.patch25
-rw-r--r--meta-ibs/meta-cp2-5422/recipes-phosphor/virtual-media/virtual-media/0006-Upd-disable-tls13-ciphers-for-http-protocol.patch28
-rw-r--r--meta-ibs/meta-cp2-5422/recipes-phosphor/webui/webui-vue_%.bbappend2
-rw-r--r--meta-ibs/meta-cp2-5422/recipes-support/nbdkit/nbdkit/0001-Fix-Force-add-CURLOPT_TLS13_CIPHERS-macro.patch33
-rw-r--r--meta-ibs/meta-cp2-5422/recipes-support/nbdkit/nbdkit_%.bbappend4
-rw-r--r--meta-ibs/meta-cp2-5422/recipes-support/smtp/smtp.bb4
17 files changed, 981 insertions, 32 deletions
diff --git a/meta-ibs/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb/0001-Add-dbus-method-SlotIpmbRequest.patch b/meta-ibs/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb/0001-Add-dbus-method-SlotIpmbRequest.patch
new file mode 100644
index 0000000000..8631316e9c
--- /dev/null
+++ b/meta-ibs/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb/0001-Add-dbus-method-SlotIpmbRequest.patch
@@ -0,0 +1,536 @@
+From 3ebcdde7363a8c4853975bf3b756f4b0cc81622b Mon Sep 17 00:00:00 2001
+From: Rajashekar Gade Reddy <raja.sekhar.reddy.gade@linux.intel.com>
+Date: Mon, 23 Mar 2020 22:19:07 +0530
+Subject: [PATCH 1/3] Add dbus method SlotIpmbRequest
+
+Added dbus method SlotIpmbRequest which enables the applications to
+communicate with add-in cards.
+
+This is submitted in down stream because SlotIpmbRequest uses hold and
+unhold mux kernel patches which are downstream only patches.
+
+Tested:
+
+busctl call xyz.openbmc_project.Ipmi.Channel.Ipmb
+/xyz/openbmc_project/Ipmi/Channel/Ipmb org.openbmc.Ipmb SlotIpmbRequest
+"yyyyyay" <valid_addressType> <valid_slot> <valid_slaveAddr> <valid_netFun> <valid_cmd> <data> // method call
+(iyyyyay) 0 7 0 1 0 15 0 0 0 0 2 12 87 1 0 0 0 0 0 0 0 // success
+
+busctl call xyz.openbmc_project.Ipmi.Channel.Ipmb
+/xyz/openbmc_project/Ipmi/Channel/Ipmb org.openbmc.Ipmb SlotIpmbRequest
+"yyyyyay" <valid_addressType> <invalid_slot> <valid_slaveAddr> <valid_netFun> <valid_cmd> <data> // method call
+(iyyyyay) 4 0 0 0 0 0 // failure
+
+busctl call xyz.openbmc_project.Ipmi.Channel.Ipmb
+/xyz/openbmc_project/Ipmi/Channel/Ipmb org.openbmc.Ipmb SlotIpmbRequest
+"yyyyyay" <valid_addressType> <valid_slot> <invalid_slaveAddr> <valid_netFun> <valid_cmd> <data> // method call
+(iyyyyay) 4 0 0 0 0 0 // failure
+
+//This ipmi command internally calls the dbus method SlotIpmbRequest.
+ipmitool raw 0x3e 0x51 0 0x01 0xb0 0x6 1
+00 00 00 00 00 02 0c 57 01 00 00 00 00 00 00 00 //success
+
+Note: Tested for all possible negative test cases and it works fine.
+
+Signed-off-by: Rajashekar Gade Reddy <raja.sekhar.reddy.gade@intel.com>
+Signed-off-by: Andrey V.Kosteltsev <AKosteltsev@IBS.RU>
+---
+ CMakeLists.txt | 2 +-
+ include/linux/i2c.h | 159 +++++++++++++++++++++++++++++++
+ ipmb-channels.json | 6 ++
+ ipmbbridged.cpp | 221 +++++++++++++++++++++++++++++++++++++++++++-
+ ipmbbridged.hpp | 8 +-
+ 5 files changed, 392 insertions(+), 4 deletions(-)
+ create mode 100644 include/linux/i2c.h
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 4acdccf..3484a58 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -8,7 +8,7 @@ set (CMAKE_CXX_STANDARD_REQUIRED ON)
+ #set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti")
+ #set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-rtti")
+
+-include_directories (${CMAKE_CURRENT_SOURCE_DIR})
++include_directories (${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include)
+ find_package (Boost REQUIRED)
+ include_directories (${Boost_INCLUDE_DIRS})
+ add_definitions (-DBOOST_ERROR_CODE_HEADER_ONLY)
+diff --git a/include/linux/i2c.h b/include/linux/i2c.h
+new file mode 100644
+index 0000000..a1db9b1
+--- /dev/null
++++ b/include/linux/i2c.h
+@@ -0,0 +1,159 @@
++/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
++/* ------------------------------------------------------------------------- */
++/* */
++/* i2c.h - definitions for the i2c-bus interface */
++/* */
++/* ------------------------------------------------------------------------- */
++/* Copyright (C) 1995-2000 Simon G. Vogl
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 2 of the License, or
++ (at your option) any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program; if not, write to the Free Software
++ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
++ MA 02110-1301 USA. */
++/* ------------------------------------------------------------------------- */
++
++/* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and
++ Frodo Looijaard <frodol@dds.nl> */
++
++#ifndef _UAPI_LINUX_I2C_H
++#define _UAPI_LINUX_I2C_H
++
++#include <linux/types.h>
++
++/**
++ * struct i2c_msg - an I2C transaction segment beginning with START
++ * @addr: Slave address, either seven or ten bits. When this is a ten
++ * bit address, I2C_M_TEN must be set in @flags and the adapter
++ * must support I2C_FUNC_10BIT_ADDR.
++ * @flags: I2C_M_RD is handled by all adapters. No other flags may be
++ * provided unless the adapter exported the relevant I2C_FUNC_*
++ * flags through i2c_check_functionality().
++ * @len: Number of data bytes in @buf being read from or written to the
++ * I2C slave address. For read transactions where I2C_M_RECV_LEN
++ * is set, the caller guarantees that this buffer can hold up to
++ * 32 bytes in addition to the initial length byte sent by the
++ * slave (plus, if used, the SMBus PEC); and this value will be
++ * incremented by the number of block data bytes received.
++ * @buf: The buffer into which data is read, or from which it's written.
++ *
++ * An i2c_msg is the low level representation of one segment of an I2C
++ * transaction. It is visible to drivers in the @i2c_transfer() procedure,
++ * to userspace from i2c-dev, and to I2C adapter drivers through the
++ * @i2c_adapter.@master_xfer() method.
++ *
++ * Except when I2C "protocol mangling" is used, all I2C adapters implement
++ * the standard rules for I2C transactions. Each transaction begins with a
++ * START. That is followed by the slave address, and a bit encoding read
++ * versus write. Then follow all the data bytes, possibly including a byte
++ * with SMBus PEC. The transfer terminates with a NAK, or when all those
++ * bytes have been transferred and ACKed. If this is the last message in a
++ * group, it is followed by a STOP. Otherwise it is followed by the next
++ * @i2c_msg transaction segment, beginning with a (repeated) START.
++ *
++ * Alternatively, when the adapter supports I2C_FUNC_PROTOCOL_MANGLING then
++ * passing certain @flags may have changed those standard protocol behaviors.
++ * Those flags are only for use with broken/nonconforming slaves, and with
++ * adapters which are known to support the specific mangling options they
++ * need (one or more of IGNORE_NAK, NO_RD_ACK, NOSTART, and REV_DIR_ADDR).
++ */
++struct i2c_msg {
++ __u16 addr; /* slave address */
++ __u16 flags;
++#define I2C_M_RD 0x0001 /* read data, from slave to master */
++ /* I2C_M_RD is guaranteed to be 0x0001! */
++#define I2C_M_TEN 0x0010 /* this is a ten bit chip address */
++#define I2C_M_HOLD 0x0100 /* for holding a mux path */
++#define I2C_M_DMA_SAFE 0x0200 /* the buffer of this message is DMA safe */
++ /* makes only sense in kernelspace */
++ /* userspace buffers are copied anyway */
++#define I2C_M_RECV_LEN 0x0400 /* length will be first received byte */
++#define I2C_M_NO_RD_ACK 0x0800 /* if I2C_FUNC_PROTOCOL_MANGLING */
++#define I2C_M_IGNORE_NAK 0x1000 /* if I2C_FUNC_PROTOCOL_MANGLING */
++#define I2C_M_REV_DIR_ADDR 0x2000 /* if I2C_FUNC_PROTOCOL_MANGLING */
++#define I2C_M_NOSTART 0x4000 /* if I2C_FUNC_NOSTART */
++#define I2C_M_STOP 0x8000 /* if I2C_FUNC_PROTOCOL_MANGLING */
++ __u16 len; /* msg length */
++ __u8 *buf; /* pointer to msg data */
++};
++
++/* To determine what functionality is present */
++
++#define I2C_FUNC_I2C 0x00000001
++#define I2C_FUNC_10BIT_ADDR 0x00000002
++#define I2C_FUNC_PROTOCOL_MANGLING 0x00000004 /* I2C_M_IGNORE_NAK etc. */
++#define I2C_FUNC_SMBUS_PEC 0x00000008
++#define I2C_FUNC_NOSTART 0x00000010 /* I2C_M_NOSTART */
++#define I2C_FUNC_SLAVE 0x00000020
++#define I2C_FUNC_SMBUS_BLOCK_PROC_CALL 0x00008000 /* SMBus 2.0 */
++#define I2C_FUNC_SMBUS_QUICK 0x00010000
++#define I2C_FUNC_SMBUS_READ_BYTE 0x00020000
++#define I2C_FUNC_SMBUS_WRITE_BYTE 0x00040000
++#define I2C_FUNC_SMBUS_READ_BYTE_DATA 0x00080000
++#define I2C_FUNC_SMBUS_WRITE_BYTE_DATA 0x00100000
++#define I2C_FUNC_SMBUS_READ_WORD_DATA 0x00200000
++#define I2C_FUNC_SMBUS_WRITE_WORD_DATA 0x00400000
++#define I2C_FUNC_SMBUS_PROC_CALL 0x00800000
++#define I2C_FUNC_SMBUS_READ_BLOCK_DATA 0x01000000
++#define I2C_FUNC_SMBUS_WRITE_BLOCK_DATA 0x02000000
++#define I2C_FUNC_SMBUS_READ_I2C_BLOCK 0x04000000 /* I2C-like block xfer */
++#define I2C_FUNC_SMBUS_WRITE_I2C_BLOCK 0x08000000 /* w/ 1-byte reg. addr. */
++#define I2C_FUNC_SMBUS_HOST_NOTIFY 0x10000000
++
++#define I2C_FUNC_SMBUS_BYTE (I2C_FUNC_SMBUS_READ_BYTE | \
++ I2C_FUNC_SMBUS_WRITE_BYTE)
++#define I2C_FUNC_SMBUS_BYTE_DATA (I2C_FUNC_SMBUS_READ_BYTE_DATA | \
++ I2C_FUNC_SMBUS_WRITE_BYTE_DATA)
++#define I2C_FUNC_SMBUS_WORD_DATA (I2C_FUNC_SMBUS_READ_WORD_DATA | \
++ I2C_FUNC_SMBUS_WRITE_WORD_DATA)
++#define I2C_FUNC_SMBUS_BLOCK_DATA (I2C_FUNC_SMBUS_READ_BLOCK_DATA | \
++ I2C_FUNC_SMBUS_WRITE_BLOCK_DATA)
++#define I2C_FUNC_SMBUS_I2C_BLOCK (I2C_FUNC_SMBUS_READ_I2C_BLOCK | \
++ I2C_FUNC_SMBUS_WRITE_I2C_BLOCK)
++
++#define I2C_FUNC_SMBUS_EMUL (I2C_FUNC_SMBUS_QUICK | \
++ I2C_FUNC_SMBUS_BYTE | \
++ I2C_FUNC_SMBUS_BYTE_DATA | \
++ I2C_FUNC_SMBUS_WORD_DATA | \
++ I2C_FUNC_SMBUS_PROC_CALL | \
++ I2C_FUNC_SMBUS_WRITE_BLOCK_DATA | \
++ I2C_FUNC_SMBUS_I2C_BLOCK | \
++ I2C_FUNC_SMBUS_PEC)
++
++/*
++ * Data for SMBus Messages
++ */
++#define I2C_SMBUS_BLOCK_MAX 32 /* As specified in SMBus standard */
++union i2c_smbus_data {
++ __u8 byte;
++ __u16 word;
++ __u8 block[I2C_SMBUS_BLOCK_MAX + 2]; /* block[0] is used for length */
++ /* and one more for user-space compatibility */
++};
++
++/* i2c_smbus_xfer read or write markers */
++#define I2C_SMBUS_READ 1
++#define I2C_SMBUS_WRITE 0
++
++/* SMBus transaction types (size parameter in the above functions)
++ Note: these no longer correspond to the (arbitrary) PIIX4 internal codes! */
++#define I2C_SMBUS_QUICK 0
++#define I2C_SMBUS_BYTE 1
++#define I2C_SMBUS_BYTE_DATA 2
++#define I2C_SMBUS_WORD_DATA 3
++#define I2C_SMBUS_PROC_CALL 4
++#define I2C_SMBUS_BLOCK_DATA 5
++#define I2C_SMBUS_I2C_BLOCK_BROKEN 6
++#define I2C_SMBUS_BLOCK_PROC_CALL 7 /* SMBus 2.0 */
++#define I2C_SMBUS_I2C_BLOCK_DATA 8
++
++#endif /* _UAPI_LINUX_I2C_H */
+diff --git a/ipmb-channels.json b/ipmb-channels.json
+index 0876db7..ff570c6 100644
+--- a/ipmb-channels.json
++++ b/ipmb-channels.json
+@@ -11,6 +11,12 @@
+ "slave-path": "/dev/ipmb-0",
+ "bmc-addr": 32,
+ "remote-addr": 88
++ },
++ {
++ "type": "slot-ipmb",
++ "slave-path": "/dev/ipmb-6",
++ "bmc-addr": 18,
++ "remote-addr": 176
+ }
+ ]
+ }
+diff --git a/ipmbbridged.cpp b/ipmbbridged.cpp
+index f8d5142..dec6ad2 100644
+--- a/ipmbbridged.cpp
++++ b/ipmbbridged.cpp
+@@ -18,6 +18,11 @@
+ #include "ipmbdefines.hpp"
+ #include "ipmbutils.hpp"
+
++#include <i2c/smbus.h>
++#include <linux/i2c-dev.h>
++#include <linux/i2c.h>
++#include <sys/ioctl.h>
++
+ #include <boost/algorithm/string/replace.hpp>
+ #include <boost/asio/write.hpp>
+ #include <filesystem>
+@@ -40,7 +45,8 @@ auto conn = std::make_shared<sdbusplus::asio::connection>(io);
+ static std::list<IpmbChannel> ipmbChannels;
+ static const std::unordered_map<std::string, ipmbChannelType>
+ ipmbChannelTypeMap = {{"me", ipmbChannelType::me},
+- {"ipmb", ipmbChannelType::ipmb}};
++ {"ipmb", ipmbChannelType::ipmb},
++ {"slot-ipmb", ipmbChannelType::slot_ipmb}};
+
+ /**
+ * @brief Ipmb request class methods
+@@ -555,7 +561,10 @@ int IpmbChannel::ipmbChannelInit(const char *ipmbI2cSlave)
+ {
+ std::string deviceFileName =
+ "/sys/bus/i2c/devices/i2c-" + busStr + "/new_device";
+- std::string para = "ipmb-dev 0x1010"; // init with BMC addr 0x20
++ std::ostringstream param;
++ param << "ipmb-dev 0x" << std::hex
++ << static_cast<uint16_t>(0x1000 | (ipmbBmcSlaveAddress >> 1));
++ std::string para(param.str());
+ std::fstream deviceFile;
+ deviceFile.open(deviceFileName, std::ios::out);
+ if (!deviceFile.good())
+@@ -711,6 +720,171 @@ void IpmbChannel::addFilter(const uint8_t respNetFn, const uint8_t cmd)
+ }
+ }
+
++class Mux
++{
++ public:
++ Mux(const std::string &path) : heldMux(false)
++ {
++ fd = open(path.c_str(), O_RDWR | O_NONBLOCK);
++ }
++ ~Mux()
++ {
++ if (heldMux)
++ {
++ if (unholdMux() < 0)
++ {
++ phosphor::logging::log<phosphor::logging::level::ERR>(
++ "Error while unholding the bus");
++ }
++ }
++ if (!(fd < 0))
++ {
++ close(fd);
++ }
++ }
++
++ int transferAndHoldMux(const uint8_t slaveAddr, uint8_t *buffer,
++ const uint8_t len, uint16_t timeout)
++ {
++ if (!isMuxFdOpen())
++ {
++ return -1;
++ }
++ struct i2c_msg holdmsg[2] = {
++ {slaveAddr, 0, len, buffer},
++ {0, I2C_M_HOLD, sizeof(timeout), (uint8_t *)&timeout}};
++
++ struct i2c_rdwr_ioctl_data msgrdwr = {&holdmsg[0], 2};
++
++ int retVal = ioctl(fd, I2C_RDWR, &msgrdwr);
++ if (retVal >= 0)
++ {
++ heldMux = true;
++ }
++ return retVal;
++ }
++
++ bool isMuxFdOpen()
++ {
++ if (fd < 0)
++ {
++ phosphor::logging::log<phosphor::logging::level::ERR>(
++ "Error while opening the mux device file");
++ return false;
++ }
++ return true;
++ }
++
++ private:
++ int unholdMux()
++ {
++ if (!isMuxFdOpen())
++ {
++ return -1;
++ }
++ uint16_t holdtimeout = 0; // unhold the bus
++
++ struct i2c_msg holdmsg = {0, I2C_M_HOLD, sizeof(holdtimeout),
++ (uint8_t *)&holdtimeout};
++
++ struct i2c_rdwr_ioctl_data msgrdwr = {&holdmsg, 1};
++
++ return ioctl(fd, I2C_RDWR, &msgrdwr);
++ }
++
++ int fd;
++ bool heldMux;
++};
++
++std::tuple<int, uint8_t, uint8_t, uint8_t, uint8_t, std::vector<uint8_t>>
++ IpmbChannel::slotRequestAdd(boost::asio::yield_context &yield,
++ std::shared_ptr<IpmbRequest> request,
++ const uint8_t pcieSlot)
++{
++ makeRequestValid(request);
++ std::filesystem::path p =
++ "/dev/i2c-mux/PCIE_Mux/Pcie_Slot_" + std::to_string(pcieSlot);
++
++ if (!std::filesystem::exists(p) || !std::filesystem::is_symlink(p))
++ {
++ phosphor::logging::log<phosphor::logging::level::ERR>(
++ "does not exist or not a symlink ",
++ phosphor::logging::entry("File:%s", p.c_str()));
++ return returnStatus(ipmbResponseStatus::error);
++ }
++
++ Mux mux(p);
++ if (!mux.isMuxFdOpen())
++ {
++ return returnStatus(ipmbResponseStatus::error);
++ }
++
++ std::vector<uint8_t> buffer(0);
++ if (request->ipmbToi2cConstruct(buffer) != 0)
++ {
++ return returnStatus(ipmbResponseStatus::error);
++ }
++
++ uint8_t size = buffer.size();
++
++ const uint8_t slaveAddrIndex = 1;
++ const uint8_t slotIpmbHeader = 2;
++
++ for (int i = 0; i < ipmbNumberOfTries; i++)
++ {
++ boost::system::error_code ec;
++ int i2cRetryCnt = 0;
++ do
++ {
++ if (mux.transferAndHoldMux(
++ buffer[slaveAddrIndex] >> 1, buffer.data() + slotIpmbHeader,
++ size - slotIpmbHeader, ipmbRequestRetryTimeout) >= 0)
++ {
++ break;
++ }
++
++ phosphor::logging::log<phosphor::logging::level::ERR>(
++ "Error sending slot IPMB command");
++ i2cRetryCnt++;
++ } while (i2cRetryCnt < ipmbI2cNumberOfRetries);
++
++ if (i2cRetryCnt == ipmbI2cNumberOfRetries)
++ {
++ std::string msgToLog =
++ "slotRequestAdd: Sent to I2C failed after retries."
++ " busId=" +
++ std::to_string(ipmbBusId) + ", error=" + ec.message();
++ phosphor::logging::log<phosphor::logging::level::INFO>(
++ msgToLog.c_str());
++ makeRequestInvalid(*request);
++ return returnStatus(ipmbResponseStatus::error);
++ }
++
++ request->timer->expires_after(
++ std::chrono::milliseconds(ipmbRequestRetryTimeout));
++ request->timer->async_wait(yield[ec]);
++
++ if (ec && ec != boost::asio::error::operation_aborted)
++ {
++ // unexpected error - invalidate request and return generic error
++ phosphor::logging::log<phosphor::logging::level::ERR>(
++ "requestAdd: async_wait error");
++ makeRequestInvalid(*request);
++ return returnStatus(ipmbResponseStatus::error);
++ }
++
++ if (request->state == ipmbRequestState::matched)
++ {
++ // matched response, send it to client application
++ makeRequestInvalid(*request);
++ return request->returnMatchedResponse();
++ }
++ }
++
++ makeRequestInvalid(*request);
++ return returnStatus(ipmbResponseStatus::timeout);
++}
++
+ std::tuple<int, uint8_t, uint8_t, uint8_t, uint8_t, std::vector<uint8_t>>
+ IpmbChannel::requestAdd(boost::asio::yield_context &yield,
+ std::shared_ptr<IpmbRequest> request)
+@@ -848,6 +1022,47 @@ static int initializeChannels()
+ return 0;
+ }
+
++auto slotIpmbHandleRequest =
++ [](boost::asio::yield_context yield, uint8_t addressType,
++ uint8_t slotNumber, uint8_t targetSlaveAddr, uint8_t netfn, uint8_t cmd,
++ std::vector<uint8_t> dataReceived) {
++ uint8_t lun = 0; // No support for lun in slot IPMB
++ IpmbChannel *channel =
++ getChannel(static_cast<uint8_t>(ipmbChannelType::slot_ipmb));
++ if (channel == nullptr)
++ {
++ phosphor::logging::log<phosphor::logging::level::ERR>(
++ "slotIpmbHandleRequest: Slot IPMB channel does not exist");
++ return returnStatus(ipmbResponseStatus::error);
++ }
++
++ // check outstanding request list for valid sequence number
++ uint8_t seqNum = 0;
++ bool seqValid = channel->seqNumGet(seqNum);
++ if (!seqValid)
++ {
++ phosphor::logging::log<phosphor::logging::level::WARNING>(
++ "slotIpmbHandleRequest: cannot add more requests to the list");
++ return returnStatus(ipmbResponseStatus::busy);
++ }
++
++ uint8_t bmcSlaveAddress = channel->getBmcSlaveAddress();
++ uint8_t rqSlaveAddress = targetSlaveAddr;
++
++ // construct the request to add it to outstanding request list
++ std::shared_ptr<IpmbRequest> request = std::make_shared<IpmbRequest>(
++ rqSlaveAddress, netfn, ipmbRsLun, bmcSlaveAddress, seqNum, lun, cmd,
++ dataReceived);
++
++ if (!request->timer)
++ {
++ phosphor::logging::log<phosphor::logging::level::ERR>(
++ "slotIpmbHandleRequest: timer object does not exist");
++ return returnStatus(ipmbResponseStatus::error);
++ }
++ return channel->slotRequestAdd(yield, request, slotNumber);
++ };
++
+ auto ipmbHandleRequest = [](boost::asio::yield_context yield,
+ uint8_t reqChannel, uint8_t netfn, uint8_t lun,
+ uint8_t cmd, std::vector<uint8_t> dataReceived) {
+@@ -994,6 +1209,8 @@ int main(int argc, char *argv[])
+ server.add_interface(ipmbObj, ipmbDbusIntf);
+
+ ipmbIface->register_method("sendRequest", std::move(ipmbHandleRequest));
++ ipmbIface->register_method("SlotIpmbRequest",
++ std::move(slotIpmbHandleRequest));
+ ipmbIface->initialize();
+
+ if (initializeChannels() < 0)
+diff --git a/ipmbbridged.hpp b/ipmbbridged.hpp
+index 052c193..c79ac63 100644
+--- a/ipmbbridged.hpp
++++ b/ipmbbridged.hpp
+@@ -155,7 +155,8 @@ enum class ipmbRequestState
+ enum class ipmbChannelType
+ {
+ ipmb = 0,
+- me = 1
++ me = 1,
++ slot_ipmb = 2
+ };
+
+ /**
+@@ -293,6 +294,11 @@ class IpmbChannel
+ void ipmbSendI2cFrame(std::shared_ptr<std::vector<uint8_t>> buffer,
+ size_t retriesAttempted);
+
++ std::tuple<int, uint8_t, uint8_t, uint8_t, uint8_t, std::vector<uint8_t>>
++ slotRequestAdd(boost::asio::yield_context &yield,
++ std::shared_ptr<IpmbRequest> requestToSend,
++ const uint8_t pcieSlot);
++
+ std::tuple<int, uint8_t, uint8_t, uint8_t, uint8_t, std::vector<uint8_t>>
+ requestAdd(boost::asio::yield_context &yield,
+ std::shared_ptr<IpmbRequest> requestToSend);
+--
+2.35.1
+
diff --git a/meta-ibs/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb/0002-Add-log-count-limitation-to-requestAdd.patch b/meta-ibs/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb/0002-Add-log-count-limitation-to-requestAdd.patch
new file mode 100644
index 0000000000..4e98f67a57
--- /dev/null
+++ b/meta-ibs/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb/0002-Add-log-count-limitation-to-requestAdd.patch
@@ -0,0 +1,95 @@
+From e6bd7ce41f4729469617891e24f35abb195dfd5e Mon Sep 17 00:00:00 2001
+From: Helen Huang <he.huang@intel.com>
+Date: Mon, 31 May 2021 09:19:55 +0800
+Subject: [PATCH 2/3] Add log count limitation to requestAdd()
+
+To avoid log storm, add the log count limitation to
+requestAdd().
+
+Change-Id: I91894ff07fa252ed7746816535611a33b6f640ea
+Signed-off-by: Helen Huang <he.huang@intel.com>
+Signed-off-by: Andrey V.Kosteltsev <AKosteltsev@IBS.RU>
+---
+ ipmbbridged.cpp | 44 ++++++++++++++++++++++++++++++++++++++------
+ ipmbbridged.hpp | 3 +++
+ 2 files changed, 41 insertions(+), 6 deletions(-)
+
+diff --git a/ipmbbridged.cpp b/ipmbbridged.cpp
+index dec6ad2..3ffc1f7 100644
+--- a/ipmbbridged.cpp
++++ b/ipmbbridged.cpp
+@@ -916,12 +916,44 @@ std::tuple<int, uint8_t, uint8_t, uint8_t, uint8_t, std::vector<uint8_t>>
+
+ if (i2cRetryCnt == ipmbI2cNumberOfRetries)
+ {
+- std::string msgToLog =
+- "requestAdd: Sent to I2C failed after retries."
+- " busId=" +
+- std::to_string(ipmbBusId) + ", error=" + ec.message();
+- phosphor::logging::log<phosphor::logging::level::INFO>(
+- msgToLog.c_str());
++ if ((requestAddLogCount <= ipmbRequestAddLogLimit) ||
++ (!(requestAddLogCount % ipmbRequestAddLogInterval)) ||
++ (UINT_MAX == requestAddLogCount))
++ {
++ std::string msgToLog;
++ if (requestAddLogCount == ipmbRequestAddLogLimit)
++ {
++ msgToLog = "requestAdd: There are " +
++ std::to_string(ipmbRequestAddLogLimit - 1) +
++ " similiar logs."
++ " To avoid log storm, not all the logs for the "
++ "issue will be shown: ";
++ }
++ if (!(requestAddLogCount % ipmbRequestAddLogInterval) && (requestAddLogCount != 0))
++ {
++ msgToLog = "requestAdd: There are " +
++ std::to_string(requestAddLogCount) +
++ " similiar logs so far: ";
++ }
++ if (UINT_MAX == requestAddLogCount)
++ {
++ msgToLog = "requestAdd: There are " +
++ std::to_string(requestAddLogCount) +
++ " similiar logs,"
++ " The log count will be rolled back to zero: ";
++ }
++ msgToLog += "requestAdd: Sent to I2C failed after retries."
++ " busId=" +
++ std::to_string(ipmbBusId) +
++ ", error=" + ec.message();
++ phosphor::logging::log<phosphor::logging::level::INFO>(
++ msgToLog.c_str());
++ }
++ requestAddLogCount++;
++ }
++ else
++ {
++ requestAddLogCount = 0;
+ }
+
+ request->timer->expires_after(
+diff --git a/ipmbbridged.hpp b/ipmbbridged.hpp
+index c79ac63..eaba7ae 100644
+--- a/ipmbbridged.hpp
++++ b/ipmbbridged.hpp
+@@ -50,6 +50,8 @@ constexpr int ipmbMaxOutstandingRequestsCount = 64;
+ constexpr int ipmbNumberOfTries = 6;
+ constexpr uint64_t ipmbRequestRetryTimeout = 250; // ms
+
++constexpr int ipmbRequestAddLogLimit = 10;
++constexpr int ipmbRequestAddLogInterval = 100;
+ /**
+ * @brief Ipmb I2C communication
+ */
+@@ -313,6 +315,7 @@ class IpmbChannel
+ uint8_t ipmbBusId;
+ uint8_t channelIdx;
+
++ unsigned int requestAddLogCount = 0;
+ std::shared_ptr<IpmbCommandFilter> commandFilter;
+
+ // array storing outstanding requests
+--
+2.35.1
+
diff --git a/meta-ibs/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb/0003-Fix-for-clearing-outstanding-requests.patch b/meta-ibs/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb/0003-Fix-for-clearing-outstanding-requests.patch
new file mode 100644
index 0000000000..1b7d47b01f
--- /dev/null
+++ b/meta-ibs/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb/0003-Fix-for-clearing-outstanding-requests.patch
@@ -0,0 +1,63 @@
+From 3a528516ea20cac006c6a892b353faa25fe64e7f Mon Sep 17 00:00:00 2001
+From: Jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
+Date: Mon, 20 Sep 2021 14:06:05 +0000
+Subject: [PATCH 3/3] Fix for clearing outstanding requests
+
+IPMB requests were made valid even if there was an error in opening the
+mux bus. This fix makes the IPMB requests valid only we were able to
+successfully open the Mux fd.
+
+Tested:
+Verified using busctl command.
+Command: busctl call xyz.openbmc_project.Ipmi.Channel.Ipmb
+ /xyz/openbmc_project/Ipmi/Channel/Ipmb org.openbmc.Ipmb
+ sendRequest yyyyay 0 0x30 0 0x70 2 0 32
+Response: (iyyyyay) 0 49 0 112 193 0
+
+Signed-off-by: Jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
+Signed-off-by: Andrey V.Kosteltsev <AKosteltsev@IBS.RU>
+---
+ ipmbbridged.cpp | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/ipmbbridged.cpp b/ipmbbridged.cpp
+index 3ffc1f7..0508fcc 100644
+--- a/ipmbbridged.cpp
++++ b/ipmbbridged.cpp
+@@ -801,7 +801,6 @@ std::tuple<int, uint8_t, uint8_t, uint8_t, uint8_t, std::vector<uint8_t>>
+ std::shared_ptr<IpmbRequest> request,
+ const uint8_t pcieSlot)
+ {
+- makeRequestValid(request);
+ std::filesystem::path p =
+ "/dev/i2c-mux/PCIE_Mux/Pcie_Slot_" + std::to_string(pcieSlot);
+
+@@ -825,6 +824,7 @@ std::tuple<int, uint8_t, uint8_t, uint8_t, uint8_t, std::vector<uint8_t>>
+ return returnStatus(ipmbResponseStatus::error);
+ }
+
++ makeRequestValid(request);
+ uint8_t size = buffer.size();
+
+ const uint8_t slaveAddrIndex = 1;
+@@ -894,6 +894,7 @@ std::tuple<int, uint8_t, uint8_t, uint8_t, uint8_t, std::vector<uint8_t>>
+ std::vector<uint8_t> buffer(0);
+ if (request->ipmbToi2cConstruct(buffer) != 0)
+ {
++ makeRequestInvalid(*request);
+ return returnStatus(ipmbResponseStatus::error);
+ }
+
+@@ -929,7 +930,8 @@ std::tuple<int, uint8_t, uint8_t, uint8_t, uint8_t, std::vector<uint8_t>>
+ " To avoid log storm, not all the logs for the "
+ "issue will be shown: ";
+ }
+- if (!(requestAddLogCount % ipmbRequestAddLogInterval) && (requestAddLogCount != 0))
++ if (!(requestAddLogCount % ipmbRequestAddLogInterval) &&
++ (requestAddLogCount != 0))
+ {
+ msgToLog = "requestAdd: There are " +
+ std::to_string(requestAddLogCount) +
+--
+2.35.1
+
diff --git a/meta-ibs/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend b/meta-ibs/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend
index badceb2f4b..beb3b83587 100644
--- a/meta-ibs/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend
+++ b/meta-ibs/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend
@@ -1,6 +1,9 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
-SRC_URI:append = " file://ipmb-channels.json \
+SRC_URI:append = " file://0001-Add-dbus-method-SlotIpmbRequest.patch \
+ file://0002-Add-log-count-limitation-to-requestAdd.patch \
+ file://0003-Fix-for-clearing-outstanding-requests.patch \
+ file://ipmb-channels.json \
"
do_install:append(){
diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/flash/phosphor-software-manager/0002-Added-reading-BIOS-version-from-file.patch b/meta-ibs/meta-cp2-5422/recipes-phosphor/flash/phosphor-software-manager/0002-Added-reading-BIOS-version-from-file.patch
new file mode 100644
index 0000000000..e1a395565b
--- /dev/null
+++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/flash/phosphor-software-manager/0002-Added-reading-BIOS-version-from-file.patch
@@ -0,0 +1,97 @@
+From ef7f6eb7107c2c7116ddc20de8d251d6a55db75f Mon Sep 17 00:00:00 2001
+From: Nikita Kosenkov <NKosenkov@IBS.RU>
+Date: Thu, 22 Sep 2022 11:46:44 +0300
+Subject: [PATCH] Added reading BIOS version from file
+
+---
+ item_updater.cpp | 9 ++++++++-
+ version.cpp | 11 +++++++++--
+ version.hpp | 10 ++++++++++
+ 3 files changed, 27 insertions(+), 3 deletions(-)
+
+diff --git a/item_updater.cpp b/item_updater.cpp
+index 96782f2..48fb698 100644
+--- a/item_updater.cpp
++++ b/item_updater.cpp
+@@ -849,7 +849,6 @@ void ItemUpdater::createBIOSObject()
+ createFunctionalAssociation(path);
+
+ auto versionId = path.substr(pos + 1);
+- auto version = "null";
+ AssociationList assocs = {};
+ biosActivation = std::make_unique<Activation>(
+ bus, path, *this, versionId, server::Activation::Activations::Active,
+@@ -857,6 +856,14 @@ void ItemUpdater::createBIOSObject()
+ auto dummyErase = [](std::string /*entryId*/) {
+ // Do nothing;
+ };
++
++ auto version = VersionClass::getVersion(
++ "/var/lib/phosphor-bmc-code-mgmt/bios-release");
++ if(version.empty())
++ {
++ version = "null";
++ }
++
+ biosVersion = std::make_unique<VersionClass>(
+ bus, path, version, VersionPurpose::Host, "", "",
+ std::vector<std::string>(),
+diff --git a/version.cpp b/version.cpp
+index 847148e..523a855 100644
+--- a/version.cpp
++++ b/version.cpp
+@@ -179,14 +179,14 @@ std::string Version::getBMCExtendedVersion(const std::string& releaseFilePath)
+ return extendedVersion;
+ }
+
+-std::string Version::getBMCVersion(const std::string& releaseFilePath)
++std::string Version::getVersion(const std::string& versionFilePath)
+ {
+ std::string versionKey = "VERSION_ID=";
+ std::string versionValue{};
+ std::string version{};
+ std::ifstream efile;
+ std::string line;
+- efile.open(releaseFilePath);
++ efile.open(versionFilePath);
+
+ while (getline(efile, line))
+ {
+@@ -216,6 +216,13 @@ std::string Version::getBMCVersion(const std::string& releaseFilePath)
+ }
+ efile.close();
+
++ return version;
++}
++
++std::string Version::getBMCVersion(const std::string& releaseFilePath)
++{
++ auto version = getVersion(releaseFilePath);
++
+ if (version.empty())
+ {
+ error("BMC current version is empty");
+diff --git a/version.hpp b/version.hpp
+index 5c74f99..e8956fa 100644
+--- a/version.hpp
++++ b/version.hpp
+@@ -150,6 +150,16 @@ class Version : public VersionInherit
+ static std::string
+ getBMCExtendedVersion(const std::string& releaseFilePath);
+
++ /**
++ * @brief Get the active VERSION_ID string.
++ *
++ * @param[in] releaseFilePath - The path to the file which contains
++ * the release version string.
++ *
++ * @return The version string (e.g. v1.99.10-19).
++ */
++ static std::string getVersion(const std::string& versionFilePath);
++
+ /**
+ * @brief Get the active BMC version string.
+ *
+--
+2.35.1
+
diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/flash/phosphor-software-manager_%.bbappend b/meta-ibs/meta-cp2-5422/recipes-phosphor/flash/phosphor-software-manager_%.bbappend
index aedba88044..60cad71b43 100644
--- a/meta-ibs/meta-cp2-5422/recipes-phosphor/flash/phosphor-software-manager_%.bbappend
+++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/flash/phosphor-software-manager_%.bbappend
@@ -5,6 +5,7 @@ PACKAGECONFIG:append = " verify_signature flash_bios"
SRC_URI:append = " \
file://gen-bios-tarball \
file://0001-IBS-Use-usr-bin-flash-bios-tool-for-BIOS-update.patch \
+ file://0002-Added-reading-BIOS-version-from-file.patch \
"
EXTRA_OEMESON += "\
diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0019-add-smtp-logging.patch b/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0019-add-smtp-logging.patch
new file mode 100644
index 0000000000..ea77f73844
--- /dev/null
+++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0019-add-smtp-logging.patch
@@ -0,0 +1,29 @@
+From 20d0e08bebfb7d4f5001413ce512cf6a98ecef71 Mon Sep 17 00:00:00 2001
+From: claiff <claiff@mail.ru>
+Date: Fri, 23 Sep 2022 16:18:09 +0300
+Subject: [PATCH] add smtp logging
+
+---
+ .../include/registries/openbmc_message_registry.hpp | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/redfish-core/include/registries/openbmc_message_registry.hpp b/redfish-core/include/registries/openbmc_message_registry.hpp
+index 33058a80..7dea3fac 100644
+--- a/redfish-core/include/registries/openbmc_message_registry.hpp
++++ b/redfish-core/include/registries/openbmc_message_registry.hpp
+@@ -2170,6 +2170,15 @@ constexpr std::array registry = {
+ {"string"},
+ "None.",
+ }},
++ MessageEntry{"SMTPError",
++ {
++ "Special error SMTP",
++ "SMTP manager error in method: %1, with message: \"%2\"",
++ "Critical",
++ 2,
++ {"string", "string"},
++ "None.",
++ }},
+ MessageEntry{"SparingRedundancyDegraded",
+ {
+ "Indicates the sparing redundancy state is degraded.",
diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb_%.bbappend b/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb_%.bbappend
index f090cf8f78..d363d76474 100644
--- a/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb_%.bbappend
+++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb_%.bbappend
@@ -15,6 +15,7 @@ SRC_URI += "\
file://0016-Redfish-implement-Syslog-config.patch \
file://0017-update-smtp.patch \
file://0018-add-timezone.patch \
+ file://0019-add-smtp-logging.patch \
"
EXTRA_OEMESON += "\
diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/ipmi/phosphor-ipmi-host/0001-Add-set-BIOS-version-support.patch b/meta-ibs/meta-cp2-5422/recipes-phosphor/ipmi/phosphor-ipmi-host/0001-Add-set-BIOS-version-support.patch
new file mode 100644
index 0000000000..36cba8bc71
--- /dev/null
+++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/ipmi/phosphor-ipmi-host/0001-Add-set-BIOS-version-support.patch
@@ -0,0 +1,83 @@
+From 5faa6e4ced98082b10570eaa141381763f10be0b Mon Sep 17 00:00:00 2001
+From: Brian Ma <chma0@nuvoton.com>
+Date: Fri, 13 May 2022 10:30:14 +0800
+Subject: [PATCH] Add set BIOS version support
+
+Signed-off-by: Nikita Kosenkov <NKosenkov@IBS.RU>
+---
+ apphandler.cpp | 45 +++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 45 insertions(+)
+
+diff --git a/apphandler.cpp b/apphandler.cpp
+index 8e47288..0fc9b2f 100644
+--- a/apphandler.cpp
++++ b/apphandler.cpp
+@@ -52,6 +52,8 @@ static constexpr auto versionIntf = "xyz.openbmc_project.Software.Version";
+ static constexpr auto activationIntf =
+ "xyz.openbmc_project.Software.Activation";
+ static constexpr auto softwareRoot = "/xyz/openbmc_project/software";
++static constexpr auto biosObjPath = "/xyz/openbmc_project/software/bios_active";
++static constexpr auto biosFile = "/var/lib/phosphor-bmc-code-mgmt/bios-release";
+
+ void register_netfn_app_functions() __attribute__((constructor));
+
+@@ -1419,6 +1421,46 @@ ipmi::RspType<uint8_t, // Parameter revision
+ return ipmi::responseSuccess(paramRevision, setSelector, configData);
+ }
+
++void handleFirmwareVersion(uint8_t paramSelector, std::string version){
++ // only handle FW version
++ if (paramSelector != IPMI_SYSINFO_SYSTEM_FW_VERSION)
++ {
++ return;
++ }
++ sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
++
++ log<level::INFO>(("ipmid get BIOS version:" + version).c_str());
++
++ // update host version to software manager
++ std::string service;
++ try
++ {
++ service = ipmi::getService(bus, versionIntf, biosObjPath);
++ ipmi::setDbusProperty(bus, service, biosObjPath, versionIntf,
++ "Version", version);
++ }
++ catch (const std::runtime_error& e)
++ {
++ log<level::ERR>("Cannot get service for update version",
++ entry("ERROR=%s", e.what()),
++ entry("INTERFACE=%s", versionIntf));
++ }
++ catch (sdbusplus::exception::SdBusError& e)
++ {
++ log<level::ERR>("sdbusplus exception - Unable to update BIOS version",
++ entry("ERROR=%s", e.what()),
++ entry("INTERFACE=%s", versionIntf),
++ entry("SERVICE=%s", service.c_str()));
++ }
++ // write version file to storage
++ log<level::DEBUG>("write BIOS version file.");
++ std::ofstream myfile(biosFile, std::ofstream::out);
++ std::string ver = "VERSION_ID=\"" + version + "\"";
++ myfile << ver << std::endl;
++ myfile.close();
++}
++
++
+ ipmi::RspType<> ipmiAppSetSystemInfo(uint8_t paramSelector, uint8_t data1,
+ std::vector<uint8_t> configData)
+ {
+@@ -1508,6 +1550,9 @@ ipmi::RspType<> ipmiAppSetSystemInfo(uint8_t paramSelector, uint8_t data1,
+ std::copy_n(configData.begin(), count, paramString.begin() + offset);
+ }
+ sysInfoParamStore->update(paramSelector, paramString);
++
++ // update BIOS version
++ handleFirmwareVersion(paramSelector, paramString);
+ return ipmi::responseSuccess();
+ }
+
+--
+2.35.1
+
diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend b/meta-ibs/meta-cp2-5422/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend
new file mode 100644
index 0000000000..e776ab54c9
--- /dev/null
+++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend
@@ -0,0 +1,5 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+
+SRC_URI:append = " \
+ file://0001-Add-set-BIOS-version-support.patch \
+ " \ No newline at end of file
diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/virtual-media/virtual-media.bbappend b/meta-ibs/meta-cp2-5422/recipes-phosphor/virtual-media/virtual-media.bbappend
index c4a9e78498..a6491007a6 100644
--- a/meta-ibs/meta-cp2-5422/recipes-phosphor/virtual-media/virtual-media.bbappend
+++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/virtual-media/virtual-media.bbappend
@@ -6,7 +6,7 @@ SRC_URI += "\
file://0003-virtual-media.1-Add-MountPointStateMachine-forceDisc.patch \
file://0004-virtual-media.1-Fix-MountPointStateMachine-forceDisc.patch \
file://0005-virtual-media.1-Fix-Use-machine.forceDisconnectNbd.patch \
- file://0006-Upd-disable-tls13-ciphers-for-http-protocol.patch \
+ file://0006-Fix-redirect-CA-path-to-generic-one.patch \
file://0007-Upd-rename-Slot_-0123-to-USB-0123-in-virtual-media.j.patch \
file://0008-virtual-media.3-Upd-Use-umount2-.-instead-of-umount.patch \
file://0009-virtual-media.3-Upd-Just-re-name-smb-netdev-.hpp.patch \
diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/virtual-media/virtual-media/0006-Fix-redirect-CA-path-to-generic-one.patch b/meta-ibs/meta-cp2-5422/recipes-phosphor/virtual-media/virtual-media/0006-Fix-redirect-CA-path-to-generic-one.patch
new file mode 100644
index 0000000000..e8455134ae
--- /dev/null
+++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/virtual-media/virtual-media/0006-Fix-redirect-CA-path-to-generic-one.patch
@@ -0,0 +1,25 @@
+From 4095df744b8e2ef2fa6184df636a35166426b9b0 Mon Sep 17 00:00:00 2001
+From: Alexandr Ilenko <AIlenko@IBS.RU>
+Date: Thu, 22 Sep 2022 09:39:44 +0300
+Subject: [PATCH] Fix: redirect CA path to generic one
+
+---
+ src/state/activating_state.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/state/activating_state.cpp b/src/state/activating_state.cpp
+index 47c4737..f2d3ebd 100644
+--- a/src/state/activating_state.cpp
++++ b/src/state/activating_state.cpp
+@@ -307,7 +307,7 @@ std::unique_ptr<resource::Process>
+ // ... to mount http resource at url
+ "url=" + url,
+ // custom OpenBMC path for CA
+- "cainfo=", "capath=/etc/ssl/certs/authority", "ssl-version=tlsv1.2",
++ "cainfo=", "capath=/etc/ssl/certs", "ssl-version=tlsv1.2",
+ "followlocation=false",
+ "ssl-cipher-list="
+ "ECDHE-RSA-AES256-GCM-SHA384:"
+--
+2.35.1
+
diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/virtual-media/virtual-media/0006-Upd-disable-tls13-ciphers-for-http-protocol.patch b/meta-ibs/meta-cp2-5422/recipes-phosphor/virtual-media/virtual-media/0006-Upd-disable-tls13-ciphers-for-http-protocol.patch
deleted file mode 100644
index a902b463fb..0000000000
--- a/meta-ibs/meta-cp2-5422/recipes-phosphor/virtual-media/virtual-media/0006-Upd-disable-tls13-ciphers-for-http-protocol.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From ec722934ab52b372ef03b2f53c92961d040d078e Mon Sep 17 00:00:00 2001
-From: Alexandr Ilenko <AIlenko@IBS.RU>
-Date: Mon, 6 Jun 2022 21:53:02 +0300
-Subject: [PATCH 6/8] Upd: disable "tls13-ciphers" for http protocol
-
----
- src/state/activating_state.cpp | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/src/state/activating_state.cpp b/src/state/activating_state.cpp
-index 6ae7932..f926547 100644
---- a/src/state/activating_state.cpp
-+++ b/src/state/activating_state.cpp
-@@ -307,9 +307,10 @@ std::unique_ptr<resource::Process>
- "followlocation=false",
- "ssl-cipher-list="
- "ECDHE-RSA-AES256-GCM-SHA384:"
-- "ECDHE-ECDSA-AES256-GCM-SHA384",
-+ "ECDHE-ECDSA-AES256-GCM-SHA384"}; /*,
- "tls13-ciphers="
- "TLS_AES_256_GCM_SHA384"};
-+ */
-
- // Authenticate if needed
- if (machine.getTarget()->credentials)
---
-2.35.1
-
diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/webui/webui-vue_%.bbappend b/meta-ibs/meta-cp2-5422/recipes-phosphor/webui/webui-vue_%.bbappend
index a61f4645e3..2557d34608 100644
--- a/meta-ibs/meta-cp2-5422/recipes-phosphor/webui/webui-vue_%.bbappend
+++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/webui/webui-vue_%.bbappend
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
EXTRA_OENPM = "-- --mode sila"
SRC_URI = "git://git@git.sila.ru/srv/pub/scm/git/openbmc/webui-vue.git;branch=sila;protocol=ssh"
-SRCREV = "5ad081015c923158c67108af6f3b58ce8ff764c9"
+SRCREV = "30b2f231d4f3dfe0a065acbf359d385cd2cb4eef"
SRC_URI += "\
file://favicon.ico \
diff --git a/meta-ibs/meta-cp2-5422/recipes-support/nbdkit/nbdkit/0001-Fix-Force-add-CURLOPT_TLS13_CIPHERS-macro.patch b/meta-ibs/meta-cp2-5422/recipes-support/nbdkit/nbdkit/0001-Fix-Force-add-CURLOPT_TLS13_CIPHERS-macro.patch
new file mode 100644
index 0000000000..c74e5f2a3d
--- /dev/null
+++ b/meta-ibs/meta-cp2-5422/recipes-support/nbdkit/nbdkit/0001-Fix-Force-add-CURLOPT_TLS13_CIPHERS-macro.patch
@@ -0,0 +1,33 @@
+From cdb78422f717013dd483f972e4f5c112fe532696 Mon Sep 17 00:00:00 2001
+From: Alexandr Ilenko <AIlenko@IBS.RU>
+Date: Wed, 21 Sep 2022 10:35:12 +0300
+Subject: [PATCH] Fix: Force add CURLOPT_TLS13_CIPHERS macro
+
+---
+ plugins/curl/curl.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/plugins/curl/curl.c b/plugins/curl/curl.c
+index 9a818bfa..e4fb3d65 100644
+--- a/plugins/curl/curl.c
++++ b/plugins/curl/curl.c
+@@ -560,6 +560,16 @@ curl_open (int readonly)
+ if (ssl_cipher_list)
+ curl_easy_setopt (h->c, CURLOPT_SSL_CIPHER_LIST, ssl_cipher_list);
+ if (tls13_ciphers) {
++// It looks that commit with "#ifdef CURLOPT_TLS13_CIPHERS" was incorrect.
++// Because curl provides "CURLOPT_TLS13_CIPHERS" as an enum constant,
++// not as a macro.
++// Let`s (re-)define the macro for new versions of BMC Virtual-Media`s
++// tuning options
++#ifdef CURLOPT_TLS13_CIPHERS
++# error Something goes wrong with CURLOPT_TLS13_CIPHERS again.
++#else
++# define CURLOPT_TLS13_CIPHERS (CURLOPT_TLS13_CIPHERS)
++#endif
+ #ifdef CURLOPT_TLS13_CIPHERS
+ curl_easy_setopt (h->c, CURLOPT_TLS13_CIPHERS, tls13_ciphers);
+ #else
+--
+2.35.1
+
diff --git a/meta-ibs/meta-cp2-5422/recipes-support/nbdkit/nbdkit_%.bbappend b/meta-ibs/meta-cp2-5422/recipes-support/nbdkit/nbdkit_%.bbappend
index d5d1e4466e..aac1a9e5d1 100644
--- a/meta-ibs/meta-cp2-5422/recipes-support/nbdkit/nbdkit_%.bbappend
+++ b/meta-ibs/meta-cp2-5422/recipes-support/nbdkit/nbdkit_%.bbappend
@@ -1,3 +1,7 @@
FILESEXTRAPATHS:append := "${THISDIR}/${PN}:"
WARN_QA:remove = " buildpaths"
+
+SRC_URI += "\
+ file://0001-Fix-Force-add-CURLOPT_TLS13_CIPHERS-macro.patch \
+ "
diff --git a/meta-ibs/meta-cp2-5422/recipes-support/smtp/smtp.bb b/meta-ibs/meta-cp2-5422/recipes-support/smtp/smtp.bb
index 0e3e72ce9c..16ab8aa424 100644
--- a/meta-ibs/meta-cp2-5422/recipes-support/smtp/smtp.bb
+++ b/meta-ibs/meta-cp2-5422/recipes-support/smtp/smtp.bb
@@ -8,7 +8,7 @@ LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
SRC_URI = "git://git@git.sila.ru/srv/pub/scm/git/openbmc/obmc-sila-smtp.git;branch=master;protocol=ssh"
-SRCREV = "629929ebbe386277c25740bc0f4971aac38444d0"
+SRCREV = "8d38861429c3544d10752fb0f6f9da436dee218f"
S = "${WORKDIR}/git"
@@ -24,6 +24,8 @@ do_install:append() {
inherit cmake systemd pkgconfig
+EXTRA_OECMAKE += "-DADD_PHOSPHOR_LOGGING=ON"
+
DEPENDS = "boost \
systemd \
sdbusplus \