Add support for dynamic SST configuration change
- Implement the CurrentOperatingConfig getters to dynamically read
configuration via PECI. The approach is to read the value from
PECI for each D-Bus read. When the host is off, return "default"
values, and when the host is on but the read fails, return the last
read (cached) values.
- Implement the CurrentOperatingConfig setters to modify configuration
via PECI.
Tested:
- Change SST-PP profile and SST-BF flag via D-Bus properties, and
confirmed that host-side Linux tool shows changes.
- Change while host off and confirm it's rejected.
- Change while host booting and confirm it's rejected.
- Read configuration while host off and confirm last known values are
returned.
- Read configuration while host booting and confirm actual values are
returned.
- Change on ICX after host booted and confirm it's rejected.
Signed-off-by: Jonathan Doman <jonathan.doman@intel.com>
Change-Id: Ie6eed8ab23bff289e01d6d125402a5509d3a9110
diff --git a/src/cpuinfo_main.cpp b/src/cpuinfo_main.cpp
index de21071..2e8135c 100644
--- a/src/cpuinfo_main.cpp
+++ b/src/cpuinfo_main.cpp
@@ -15,6 +15,7 @@
*/
#include "cpuinfo.hpp"
+#include "cpuinfo_utils.hpp"
#include "speed_select.hpp"
#include <errno.h>
@@ -518,6 +519,8 @@
sdbusplus::server::manager::manager objManager(
bus, "/xyz/openbmc_project/inventory");
+ cpu_info::hostStateSetup(conn);
+
cpu_info::sst::init(io, conn);
// shared_ptr conn is global for the service