From e4a0a06d6f16c218cef82b20f8adcbd3c02f1a82 Mon Sep 17 00:00:00 2001 From: Deepa Karthikeyan Date: Tue, 21 Jan 2025 05:39:12 -0600 Subject: [PATCH] Hw-Isolation: Deconfiguration type for DIMMs This change should have been part of ```https://github.com/ibm-openbmc/bmcweb/pull/953/commits/7d6dd2c6b632d24752eba7870343ed9c790d638e``` Here is the original commit. ```https://github.com/ibm-openbmc/bmcweb/pull/171/files``` Due to this missing change, the deconfiguration type is not displayed in the GUI. After including this change, here is the redfish output. ``` curl -k -H "X-Auth-Token: $bmc_token" -XGET https://${BMC_IP}/redfish/v1/Systems/system/Memory/dimm1 { "/Status/Conditions/0/Severity": "OK", "@odata.id": "/redfish/v1/Systems/system/Memory/dimm1", "@odata.type": "#Memory.v1_12_0.Memory", "AllowedSpeedsMHz": [], "BaseModuleType": "RDIMM", "BusWidthBits": 0, "CapacityMiB": 32768, "DataWidthBits": 0, "Enabled": false, "ErrorCorrection": "NoECC", "FirmwareRevision": "0", "Id": "dimm1", "Location": { "PartLocation": { "ServiceLabel": "U78DB.ND0.WZS000G-P0-C13" } }, "LocationIndicatorActive": false, "Manufacturer": "", "Model": "327A", "Name": "Memory module 1", "OperatingSpeedMhz": 0, "PartNumber": "78P6574", "RankCount": 0, "SerialNumber": "YH30MS03T038", "SparePartNumber": "78P6574", "Status": { "Conditions": [ { "Message": "The reason for the resource isolation: Manual", "MessageArgs": [ "Manual" ], "MessageId": "OpenBMC.0.2.HardwareIsolationReason", "Timestamp": "2025-01-21T10:27:55+00:00" } ], "Health": "Critical", "State": "Disabled" } } ``` Signed-off-by: deepakalak --- redfish-core/lib/memory.hpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/redfish-core/lib/memory.hpp b/redfish-core/lib/memory.hpp index 7dad72491..fb4983325 100644 --- a/redfish-core/lib/memory.hpp +++ b/redfish-core/lib/memory.hpp @@ -640,9 +640,9 @@ inline void getDimmDataByService( BMCWEB_LOG_DEBUG("Get available system components."); sdbusplus::asio::getAllProperties( *crow::connections::systemBus, service, objPath, "", - [dimmId, asyncResp{std::move(asyncResp)}]( - const boost::system::error_code& ec, - const dbus::utility::DBusPropertiesMap& properties) { + [dimmId, asyncResp{std::move(asyncResp)}, + objPath](const boost::system::error_code& ec, + const dbus::utility::DBusPropertiesMap& properties) { if (ec) { BMCWEB_LOG_DEBUG("DBUS response error"); @@ -651,9 +651,15 @@ inline void getDimmDataByService( } assembleDimmProperties(dimmId, asyncResp, properties, ""_json_pointer); + if constexpr (BMCWEB_HW_ISOLATION) + { + // Check for the hardware status event + hw_isolation_utils::getHwIsolationStatus(asyncResp, objPath); + } }); } + inline void assembleDimmPartitionData( const std::shared_ptr& asyncResp, const dbus::utility::DBusPropertiesMap& properties,