Get System Fw Version fails after Set Fw Version
Get System Firmware fails with Unspecified error even
after Set Firmware Version.
Tested:
Tested on gb200nvl-obmc platform
1) Set System Firmware Version
[1] ipmitool raw 0x06 0x58 0x01 0x00 0x00 0x0e 0x56 0x4b 0x65 0x79 0x59 0x49 0x4b 0x79 0x78 0x5a 0x6c 0x6b 0x6b 0x67
>> Command succeeds as expected
2) Get System Firmware Version after Set
[2] 11 00 00 0e 56 4b 65 79 59 49 4b 79 78 5a 6c 6b
6b 67
Change-Id: I098882da92365db18ccebca7b3abf4fe9258f87d
Signed-off-by: Prithvi Pai <ppai@nvidia.com>
diff --git a/apphandler.cpp b/apphandler.cpp
index c059f56..85334fc 100644
--- a/apphandler.cpp
+++ b/apphandler.cpp
@@ -1422,13 +1422,20 @@
if (paramSelector == IPMI_SYSINFO_SYSTEM_FW_VERSION)
{
- auto fwVersion = getSysFWVersion(ctx);
+ // If the system firmware version is not cached, get it from the D-Bus.
+ const auto& [found, paramString] =
+ sysInfoParamStore->lookup(IPMI_SYSINFO_SYSTEM_FW_VERSION);
- if (fwVersion == std::nullopt)
+ if (!found || paramString.empty())
{
- return ipmi::responseUnspecifiedError();
+ auto fwVersion = getSysFWVersion(ctx);
+ if (fwVersion == std::nullopt)
+ {
+ return ipmi::responseUnspecifiedError();
+ }
+ sysInfoParamStore->update(IPMI_SYSINFO_SYSTEM_FW_VERSION,
+ *fwVersion);
}
- sysInfoParamStore->update(IPMI_SYSINFO_SYSTEM_FW_VERSION, *fwVersion);
}
// Parameters other than Set In Progress are assumed to be strings.