mmc: Set clear NVRAM bios attribute during factory reset

During factory reset, instead of calling the PLDM services to delete the
PHYP NVRAM files, set the pvm_clear_nvram bios attribute to Enabled to
signal the hypervisor to clear NVRAM when it starts up.

Add the nvram hostfw directory to the list of directories to preserve
during a factory reset because the NVRAM files would now be cleared by
the hypervisor after reading the bios attribute.

Tested: Verified the pvm_clar_nvram bios attribute was set to Enabled as
part of factory reset. Verified a journal error message was logged if
the attribute did not exist and the rest of the factory reset actions
were executed.

Change-Id: Ia3c0f707e8fb8208b5e2bc1edb9a8aef3bb36a89
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
diff --git a/utils.hpp b/utils.hpp
index 7588039..97b5e59 100644
--- a/utils.hpp
+++ b/utils.hpp
@@ -52,6 +52,13 @@
  */
 void clearHMCManaged(sdbusplus::bus::bus& bus);
 
+/** @brief Set the Clear hypervisor NVRAM bios attribute to Enabled to indicate
+ *         to the hypervisor to clear its NVRAM.
+ *
+ * @param[in] bus - The D-Bus bus object.
+ */
+void setClearNvram(sdbusplus::bus::bus& bus);
+
 /** @brief DeleteAll error logs
  *
  * @param[in] bus - The D-Bus bus object.