oem-ibm: Support bios attributes for boot types

This commit adds support to two bios attributes, boot
initiator and boot type, which lets the host know who
initiated the boot through boot initiator, and what type of
boot(boot or reboot) through the boot type attribute

Change-Id: Iec4bc4ceec3a48ffd3f59b4d31f419c8806187ac
Signed-off-by: Archana Kakani <archana.kakani@ibm.com>
diff --git a/host-bmc/host_pdr_handler.cpp b/host-bmc/host_pdr_handler.cpp
index 61b4ccb..079c6dc 100644
--- a/host-bmc/host_pdr_handler.cpp
+++ b/host-bmc/host_pdr_handler.cpp
@@ -125,6 +125,22 @@
                     this->sensorMap.clear();
                     this->responseReceived = false;
                     this->mergedHostParents = false;
+
+                    // After a power off , the remote nodes will be deleted
+                    // from the entity association tree, making the nodes point
+                    // to junk values, so set them to nullptr
+                    for (const auto& element : this->objPathMap)
+                    {
+                        this->objPathMap[element.first] = nullptr;
+                    }
+                }
+                else if (propVal ==
+                         "xyz.openbmc_project.State.Host.HostState.Running")
+                {
+                    if (oemPlatformHandler)
+                    {
+                        oemPlatformHandler->handleBootTypesAtPowerOn();
+                    }
                 }
             }
         });