cpuinfoapp: sst: Disallow BaseSpeedPriorityEnabled writes
The flow for dynamic OOB enabling of SST-BF is not working, so we need
to return errors if a user tries to modify BaseSpeedPriorityEnabled
instead of letting them get into an unsupported configuration.
Change-Id: I3a1d0162ce31db66a1a7d05e4a2a89827b5277f8
Signed-off-by: Jonathan Doman <jonathan.doman@intel.com>
diff --git a/src/speed_select.cpp b/src/speed_select.cpp
index 8facad5..2641fff 100644
--- a/src/speed_select.cpp
+++ b/src/speed_select.cpp
@@ -276,28 +276,10 @@
return sdbusplus::message::object_path();
}
- bool baseSpeedPriorityEnabled(bool value) override
+ bool baseSpeedPriorityEnabled(bool /* value */) override
{
- DEBUG_PRINT << "Writing BaseSpeedPriorityEnabled\n";
- auto sst = getInstance(peciAddress, cpuModel);
- if (!sst)
- {
- std::cerr << __func__ << ": Failed to get SST provider instance\n";
- return false;
- }
- setPropertyCheckOrThrow(*sst);
- try
- {
- sst->setBfEnabled(value);
- }
- catch (const PECIError& error)
- {
- std::cerr << "Failed to set SST-BF status: " << error.what()
- << "\n";
- throw sdbusplus::xyz::openbmc_project::Common::Device::Error::
- WriteFailure();
- }
-
+ DEBUG_PRINT << "Writing BaseSpeedPriorityEnabled not allowed\n";
+ throw sdbusplus::xyz::openbmc_project::Common::Error::NotAllowed();
// return value not used
return false;
}