Fix for restoring Default values in BIOS
Enabling restoreDefaultvalue bit in Get Stored BIOS Setup Password
to restore Default values in BIOS and setting back to 0 when NoAction.
Tested:
1. POST - /redfish/v1/Systems/system/Bios/Actions/Bios.ResetBios
2. Perform Reset BIOS
3. Command: Get Stored BIOS Setup Password(0x30 0xd8)
Response: flag bit is enabled
Signed-off-by: Snehalatha Venkatesh <snehalathax.v@intel.com>
Change-Id: If819e6b3b16661a43e59d47aa367a9475912b5bc
diff --git a/src/biosconfigcommands.cpp b/src/biosconfigcommands.cpp
index 0fae09c..805306e 100644
--- a/src/biosconfigcommands.cpp
+++ b/src/biosconfigcommands.cpp
@@ -52,6 +52,7 @@
static constexpr uint8_t userPasswordChanged = (1 << 5);
static constexpr uint8_t adminPasswordChanged = (1 << 4);
+static constexpr uint8_t restoreDefaultValues = (1 << 7);
static constexpr const char* biosConfigFolder = "/var/oob";
static constexpr const char* biosConfigNVPath = "/var/oob/nvoobdata.dat";
@@ -1169,6 +1170,10 @@
{
return ipmi::responseResponseError();
}
+ if (flag)
+ {
+ flag |= restoreDefaultValues;
+ }
if (adminPwdChangedFlag)
{
flag |= adminPasswordChanged;