Fix for AMM gets disabled after system reboot

Enable Active Memory Mirroring(AMM) mode in GUI memory tab under
‘Resource Management’. On reboot of the system and once system reaches
ready state, AMM mode in the GUI shows as disabled.

Bios handler in VPD manager caused this issue as it’s comparing AMM VPD
as character value with wrong int value.

This commit implements changes to fix the above issue.

Change-Id: I758ede97e17ecf76fbd4ee05287172ce1534201c
Signed-off-by: Anupama B R <anupama.b.r1@ibm.com>
diff --git a/vpd-manager/include/bios_handler.hpp b/vpd-manager/include/bios_handler.hpp
index 893a638..08e76b7 100644
--- a/vpd-manager/include/bios_handler.hpp
+++ b/vpd-manager/include/bios_handler.hpp
@@ -119,7 +119,7 @@
      *
      * @param[in] i_ammVal - AMM value.
      */
-    void saveAmmToBios(const std::string& i_ammVal);
+    void saveAmmToBios(const uint8_t& i_ammVal);
 
     /**
      * @brief API to process "hb_memory_mirror_mode" attribute.
diff --git a/vpd-manager/src/bios_handler.cpp b/vpd-manager/src/bios_handler.cpp
index 65e0c47..683d5db 100644
--- a/vpd-manager/src/bios_handler.cpp
+++ b/vpd-manager/src/bios_handler.cpp
@@ -347,16 +347,10 @@
     }
 }
 
-void IbmBiosHandler::saveAmmToBios(const std::string& i_ammVal)
+void IbmBiosHandler::saveAmmToBios(const uint8_t& i_ammVal)
 {
-    if (i_ammVal.size() != constants::VALUE_1)
-    {
-        logging::logMessage("Bad size for AMM received, Skip writing to BIOS");
-        return;
-    }
-
     const std::string l_valtoUpdate =
-        (i_ammVal.at(0) == constants::VALUE_2) ? "Enabled" : "Disabled";
+        (i_ammVal == constants::VALUE_2) ? "Enabled" : "Disabled";
 
     types::PendingBIOSAttrs l_pendingBiosAttribute;
     l_pendingBiosAttribute.push_back(std::make_pair(
@@ -403,7 +397,7 @@
         }
         else
         {
-            saveAmmToBios(std::to_string(l_ammValInVpd.at(0)));
+            saveAmmToBios(l_ammValInVpd.at(0));
         }
         return;
     }