summaryrefslogtreecommitdiff
path: root/meta-openbmc-mods/meta-common/recipes-phosphor
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-phosphor')
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0036-PCIeFunctions-not-showing-in-Redfish.patch62
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend1
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/pmci/nvmemi-daemon.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/pmci/pldmd.bb2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0015-Fix-for-PSU2-Power-lost-RedFish-events.patch124
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0016-Ignore-VR-sensor-readings-if-content-is-0xFF.patch44
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/telemetry/telemetry_%.bbappend4
8 files changed, 238 insertions, 3 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0036-PCIeFunctions-not-showing-in-Redfish.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0036-PCIeFunctions-not-showing-in-Redfish.patch
new file mode 100644
index 000000000..d88d45ff5
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0036-PCIeFunctions-not-showing-in-Redfish.patch
@@ -0,0 +1,62 @@
+From 2939f827a10f0104d06d74d9744dffeae6b1af7a Mon Sep 17 00:00:00 2001
+From: "D M, Karthik" <karthik.d.m@intel.com>
+Date: Tue, 14 Jun 2022 09:46:20 +0530
+Subject: [PATCH] PCIeFunctions not showing in Redfish
+
+For PCIe devices which do not have PCIeType, will not get
+PCIeFunctions populated due to a "return" statement while parsing
+for PCIeType.
+
+Missing Data:
+"PCIeFunctions": {
+"@odata.id": "/redfish/v1/Systems/system/PCIeDevices/<device>/PCIeFunctions"
+}
+
+Tested for all 3 PCIe devices, PCIeFunction details after fixing
+{
+"@odata.id": "/redfish/v1/Systems/system/PCIeDevices/S0B3D0",
+"@odata.type": "#PCIeDevice.v1_4_0.PCIeDevice",
+"DeviceType": "SingleFunction",
+"Id": "S0B3D0",
+"Manufacturer": "ASPEED Technology Inc.",
+"Name": "PCIe Device",
+"PCIeFunctions": {
+"@odata.id": "/redfish/v1/Systems/system/PCIeDevices/S0B3D0/PCIeFunctions"
+}
+}
+
+Signed-off-by: D M, Karthik <karthik.d.m@intel.com>
+---
+ redfish-core/lib/pcie.hpp | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/redfish-core/lib/pcie.hpp b/redfish-core/lib/pcie.hpp
+index 1b9e28e..95c2b2c 100644
+--- a/redfish-core/lib/pcie.hpp
++++ b/redfish-core/lib/pcie.hpp
+@@ -176,6 +176,11 @@ inline void requestRoutesSystemPCIeDevice(App& app)
+ {"Name", "PCIe Device"},
+ {"Id", device}};
+
++ asyncResp->res.jsonValue["PCIeFunctions"] = {
++ {"@odata.id",
++ "/redfish/v1/Systems/system/PCIeDevices/" +
++ device + "/PCIeFunctions"}};
++
+ if (std::string* property = std::get_if<std::string>(
+ &pcieDevProperties["Manufacturer"]);
+ property)
+@@ -226,10 +231,6 @@ inline void requestRoutesSystemPCIeDevice(App& app)
+ .jsonValue["PCIeInterface"]["PCIeType"] =
+ *generationInUse;
+ }
+- asyncResp->res.jsonValue["PCIeFunctions"] = {
+- {"@odata.id",
+- "/redfish/v1/Systems/system/PCIeDevices/" +
+- device + "/PCIeFunctions"}};
+ };
+ std::string escapedPath = std::string(pciePath) + "/" + device;
+ dbus::utility::escapePathForDbus(escapedPath);
+--
+2.20.0.windows.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend
index 45622be30..d5e7a6dd2 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend
@@ -31,6 +31,7 @@ SRC_URI += "file://0001-Firmware-update-configuration-changes.patch \
file://0033-Add-message-registry-entry-for-Memhot-event.patch \
file://0034-Update-odata.type-version-of-redfish-v1-AccountService.patch \
file://0035-Add-MemoryMetrics-schema-file.patch \
+ file://0036-PCIeFunctions-not-showing-in-Redfish.patch \
"
# OOB Bios Config:
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/nvmemi-daemon.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/nvmemi-daemon.bb
index 1573b5347..5ea48b234 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/nvmemi-daemon.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/nvmemi-daemon.bb
@@ -5,7 +5,7 @@ LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
SRC_URI = "git://git@github.com/Intel-BMC/nvme-mi.git;protocol=ssh;branch=master"
-SRCREV = "8bcc5ef307ac4445d9589d0c866d13455c46b811"
+SRCREV = "b6f50e04516962a4e94fe9340251999f154197c4"
S = "${WORKDIR}/git"
PV = "1.0+git${SRCPV}"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/pldmd.bb b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/pldmd.bb
index fccf18cb9..2ef0b4e95 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/pldmd.bb
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/pmci/pldmd.bb
@@ -5,7 +5,7 @@ LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
SRC_URI += "git://git@github.com/Intel-BMC/pldmd.git;protocol=ssh;branch=1-release"
-SRCREV = "dd493b97dd7b243738e2d00c983a82a8a6d05db0"
+SRCREV = "2c3522ec89828d5abed265b4f460e77b4c580ae4"
S = "${WORKDIR}/git"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0015-Fix-for-PSU2-Power-lost-RedFish-events.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0015-Fix-for-PSU2-Power-lost-RedFish-events.patch
new file mode 100644
index 000000000..f4282a767
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0015-Fix-for-PSU2-Power-lost-RedFish-events.patch
@@ -0,0 +1,124 @@
+From bb67f9718411fc9e485d945b8ec13a61f5fec2be Mon Sep 17 00:00:00 2001
+From: Jitendra Tripathy <jitendra.kumarx.tripathy@intel.com>
+Date: Fri, 24 Jun 2022 09:13:30 +0000
+Subject: [PATCH] Fix for PSU2 Power-lost RedFish events
+
+In a dual power supply system, after Removing the PSU2 power
+cable/module, power-lost RedFish events are not getting logged in the
+RedFish logs. Only SEL entries are getting logged for PSU2. But all the
+events are getting logged for PSU1 in the redfish logs.
+
+To get PSU2 events also, replace async_wait instead of async_read_until
+while reading the hwmon files.
+
+Tested:
+1. The system should have connected with dual PSU's which are drawing
+same power.
+2. Verified both PSU are connected by executing below ipmitool command.
+"ipmitool fru"
+3. Removed one of 1600W PSU, which server holding 2 PSU's drawing 1600W.
+4. Above step try for both PSU1 and PSU2 by removing and connecting.
+5. Verified for both PSU1 and PSU2, eventlogs generated on Redfish
+respectively.
+Get: https://<BMC-IP>/redfish/v1/Systems/system/LogServices/
+ EventLog/Entries
+
+Signed-off-by: Jitendra Tripathy <jitendra.kumarx.tripathy@intel.com>
+---
+ include/PSUEvent.hpp | 1 -
+ src/PSUEvent.cpp | 42 +++++++++++++++++++++---------------------
+ 2 files changed, 21 insertions(+), 22 deletions(-)
+
+diff --git a/include/PSUEvent.hpp b/include/PSUEvent.hpp
+index 3a39164..72abbae 100644
+--- a/include/PSUEvent.hpp
++++ b/include/PSUEvent.hpp
+@@ -57,7 +57,6 @@ class PSUSubEvent : public std::enable_shared_from_this<PSUSubEvent>
+
+ PowerState readState;
+ boost::asio::deadline_timer waitTimer;
+- std::shared_ptr<boost::asio::streambuf> readBuf;
+ void restartRead();
+ void handleResponse(const boost::system::error_code& err);
+ void updateValue(const int& newValue);
+diff --git a/src/PSUEvent.cpp b/src/PSUEvent.cpp
+index 44275a3..446f14f 100644
+--- a/src/PSUEvent.cpp
++++ b/src/PSUEvent.cpp
+@@ -157,7 +157,7 @@ PSUSubEvent::PSUSubEvent(
+ {
+ eventPollMs = static_cast<unsigned int>(pollRate * 1000);
+ }
+- fd = open(path.c_str(), O_RDONLY);
++ fd = open(path.c_str(), O_RDONLY | O_NONBLOCK);
+ if (fd < 0)
+ {
+ std::cerr << "PSU sub event failed to open file\n";
+@@ -205,20 +205,15 @@ void PSUSubEvent::setupRead(void)
+ return;
+ }
+
+- std::shared_ptr<boost::asio::streambuf> buffer =
+- std::make_shared<boost::asio::streambuf>();
+ std::weak_ptr<PSUSubEvent> weakRef = weak_from_this();
+- boost::asio::async_read_until(
+- inputDev, *buffer, '\n',
+- [weakRef, buffer](const boost::system::error_code& ec,
+- std::size_t /*bytes_transfered*/) {
+- std::shared_ptr<PSUSubEvent> self = weakRef.lock();
+- if (self)
+- {
+- self->readBuf = buffer;
+- self->handleResponse(ec);
+- }
+- });
++ inputDev.async_wait(boost::asio::posix::descriptor_base::wait_read,
++ [weakRef](const boost::system::error_code& ec) {
++ std::shared_ptr<PSUSubEvent> self = weakRef.lock();
++ if (self)
++ {
++ self->handleResponse(ec);
++ }
++ });
+ }
+
+ void PSUSubEvent::restartRead()
+@@ -238,23 +233,28 @@ void PSUSubEvent::restartRead()
+ });
+ }
+
++// Create a buffer expected to be able to hold more characters than will be
++// present in the input file.
++static constexpr uint32_t psuBufLen = 128;
+ void PSUSubEvent::handleResponse(const boost::system::error_code& err)
+ {
+ if ((err == boost::system::errc::bad_file_descriptor) ||
+ (err == boost::asio::error::misc_errors::not_found))
+ {
++ std::cerr << "Bad file descriptor for " << path << "\n";
+ return;
+ }
+- std::istream responseStream(readBuf.get());
+- if (!err)
++
++ std::string buffer;
++ buffer.resize(psuBufLen);
++ lseek(fd, 0, SEEK_SET);
++ int rdLen = read(fd, buffer.data(), psuBufLen);
++
++ if (rdLen > 0)
+ {
+- std::string response;
+ try
+ {
+- std::getline(responseStream, response);
+- int nvalue = std::stoi(response);
+- responseStream.clear();
+-
++ int nvalue = std::stoi(buffer);
+ updateValue(nvalue);
+ errCount = 0;
+ }
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0016-Ignore-VR-sensor-readings-if-content-is-0xFF.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0016-Ignore-VR-sensor-readings-if-content-is-0xFF.patch
new file mode 100644
index 000000000..b7141513b
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0016-Ignore-VR-sensor-readings-if-content-is-0xFF.patch
@@ -0,0 +1,44 @@
+From d8583d8b347b2f4c3d6e84f333df4cd137085189 Mon Sep 17 00:00:00 2001
+From: Jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
+Date: Mon, 4 Jul 2022 16:03:35 +0000
+Subject: [PATCH] Ignore VR sensor readings if content is 0xFF
+
+As per NM 6.0 specification SPS FW will return 0xFF in certain
+erroneous condition with error code stating transaction successful.
+BMC need to ignore such readings.
+
+Tested:
+Verified by monitoring more than 1 hour, ignored VR sensor readings when
+content is 0xFF.
+
+Signed-off-by: Vikash Chandola vikash.chandola@intel.com
+Signed-off-by: Jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
+---
+ src/IpmbSensor.cpp | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/src/IpmbSensor.cpp b/src/IpmbSensor.cpp
+index 2cb2495..a41209d 100644
+--- a/src/IpmbSensor.cpp
++++ b/src/IpmbSensor.cpp
+@@ -321,7 +321,16 @@ void IpmbSensor::checkThresholds(void)
+
+ bool IpmbSensor::processReading(const std::vector<uint8_t>& data, double& resp)
+ {
+-
++ if (isReadMe && data.size() >= 5)
++ {
++ // This is VR sensor. Mark failure if byte at index 3 and 4 are 0xFF
++ if (data[3] == 0xFF && data[4] == 0xFF)
++ {
++ std::cerr << name << " value is 0xFFFF. Marking error\n";
++ markFunctional(false);
++ return false;
++ }
++ }
+ switch (readingFormat)
+ {
+ case (ReadingFormat::byte0):
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors_%.bbappend
index 8f7440120..a9d4a7627 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors_%.bbappend
@@ -20,6 +20,8 @@ SRC_URI += "\
file://0012-Serialize-cpusensor-polling.patch \
file://0013-Add-dummy-cpu-sensor-flag.patch \
file://0014-Treat-zero-temperatures-readings-as-errors-in-IpmbSe.patch \
+ file://0015-Fix-for-PSU2-Power-lost-RedFish-events.patch \
+ file://0016-Ignore-VR-sensor-readings-if-content-is-0xFF.patch \
"
DEPENDS:append = " libgpiod libmctp"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/telemetry/telemetry_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/telemetry/telemetry_%.bbappend
index 0f2db3f1a..5e2ba584c 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/telemetry/telemetry_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/telemetry/telemetry_%.bbappend
@@ -1,6 +1,8 @@
SRC_URI = "git://github.com/openbmc/telemetry.git"
-SRCREV = "51f0fd501f4b772533271d15cb27d396186a7192"
+SRCREV = "aa4a9dc5ccae9f210d0d63f99b22154c97e53c19"
EXTRA_OEMESON += " -Dmax-reports=10"
+EXTRA_OEMESON += " -Dmax-triggers=0"
+EXTRA_OEMESON += " -Dmax-append-limit=0"
EXTRA_OEMESON += " -Dmax-reading-parameters=200"
EXTRA_OEMESON += " -Dmin-interval=1000"