mmc: reset: Clear the HMC-managed bios attr

Set the pvm_hmc_managed bios attribute to Disabled during a factory
reset to clear the indicator that says the system is HMC managed since a
factory reset is expected to remove the HMC information. The reset
function is already deleting the HMC save area directory created by
bmcweb.

Tested: Set the pvm_hmc_managed attribute to Enabled, then verified that
after a bios factory reset it's set to Disabled.

Change-Id: I2cbe9baaebb4a11b612f0940ff2a994a8474d3d6
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
diff --git a/mmc/item_updater_mmc.cpp b/mmc/item_updater_mmc.cpp
index 04f237d..1a5b142 100644
--- a/mmc/item_updater_mmc.cpp
+++ b/mmc/item_updater_mmc.cpp
@@ -3,6 +3,7 @@
 #include "item_updater_mmc.hpp"
 
 #include "activation_mmc.hpp"
+#include "utils.hpp"
 #include "version.hpp"
 
 #include <filesystem>
@@ -70,6 +71,9 @@
     }
 
     // Remove files related to the Hardware Management Console / BMC web app
+
+    utils::clearHMCManaged(bus);
+
     std::filesystem::path consolePath("/var/lib/bmcweb/ibm-management-console");
     if (std::filesystem::exists(consolePath))
     {
@@ -90,7 +94,6 @@
                                     "pldm-reset-phyp-nvram.service",
                                     "pldm-reset-phyp-nvram-cksum.service"};
 
-    auto bus = sdbusplus::bus::new_default();
     for (const auto& service : services)
     {
         auto method = bus.new_method_call(SYSTEMD_BUSNAME, SYSTEMD_PATH,