Change the interface for host firmware state

The BootProgress property is used to update the state of the host OS.
This patch uses the BootProgress property in the case of BIOS attributes
hot update and D-Bus to effecter mapping.

Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
Change-Id: I9ee16b74a16e25ad3fa7661ef5cdeb9ddc55347a
diff --git a/host-bmc/dbus_to_host_effecters.cpp b/host-bmc/dbus_to_host_effecters.cpp
index c59b62a..4bdeda5 100644
--- a/host-bmc/dbus_to_host_effecters.cpp
+++ b/host-bmc/dbus_to_host_effecters.cpp
@@ -151,18 +151,20 @@
         }
     }
     constexpr auto hostStateInterface =
-        "xyz.openbmc_project.State.OperatingSystem.Status";
+        "xyz.openbmc_project.State.Boot.Progress";
     constexpr auto hostStatePath = "/xyz/openbmc_project/state/host0";
 
     try
     {
         auto propVal = dbusHandler->getDbusPropertyVariant(
-            hostStatePath, "OperatingSystemState", hostStateInterface);
+            hostStatePath, "BootProgress", hostStateInterface);
         const auto& currHostState = std::get<std::string>(propVal);
-        if ((currHostState != "xyz.openbmc_project.State.OperatingSystem."
-                              "Status.OSStatus.Standby") &&
-            (currHostState != "xyz.openbmc_project.State.OperatingSystem."
-                              "Status.OSStatus.BootComplete"))
+        if ((currHostState != "xyz.openbmc_project.State.Boot.Progress."
+                              "ProgressStages.SystemInitComplete") &&
+            (currHostState != "xyz.openbmc_project.State.Boot.Progress."
+                              "ProgressStages.OSRunning") &&
+            (currHostState != "xyz.openbmc_project.State.Boot.Progress."
+                              "ProgressStages.OSStart"))
         {
             std::cout << "Host is not up. Current host state: "
                       << currHostState.c_str() << "\n";
diff --git a/oem/ibm/libpldmresponder/platform_oem_ibm.cpp b/oem/ibm/libpldmresponder/platform_oem_ibm.cpp
index 3292004..d5c6528 100644
--- a/oem/ibm/libpldmresponder/platform_oem_ibm.cpp
+++ b/oem/ibm/libpldmresponder/platform_oem_ibm.cpp
@@ -19,20 +19,22 @@
                                  dbus_api::Requester* requester,

                                  const std::vector<uint16_t>& handles)

 {

-    constexpr auto osStatePath = "/xyz/openbmc_project/state/host0";

-    constexpr auto osStateInterface =

-        "xyz.openbmc_project.State.OperatingSystem.Status";

-    constexpr auto osStateProperty = "OperatingSystemState";

+    constexpr auto hostStatePath = "/xyz/openbmc_project/state/host0";

+    constexpr auto hostStateInterface =

+        "xyz.openbmc_project.State.Boot.Progress";

+    constexpr auto hostStateProperty = "BootProgress";

 

     try

     {

         auto propVal = pldm::utils::DBusHandler().getDbusPropertyVariant(

-            osStatePath, osStateProperty, osStateInterface);

+            hostStatePath, hostStateProperty, hostStateInterface);

         const auto& currHostState = std::get<std::string>(propVal);

-        if ((currHostState != "xyz.openbmc_project.State.OperatingSystem."

-                              "Status.OSStatus.Standby") &&

-            (currHostState != "xyz.openbmc_project.State.OperatingSystem."

-                              "Status.OSStatus.BootComplete"))

+        if ((currHostState != "xyz.openbmc_project.State.Boot.Progress."

+                              "ProgressStages.SystemInitComplete") &&

+            (currHostState != "xyz.openbmc_project.State.Boot.Progress."

+                              "ProgressStages.OSRunning") &&

+            (currHostState != "xyz.openbmc_project.State.Boot.Progress."

+                              "ProgressStages.OSStart"))

         {

             return PLDM_SUCCESS;

         }