Bug fixing for boot option
1.ipmi boot option format is
"ipmitool raw 0x00 0x08 0x05 0x80 0x18 0x00 0x00 0x00 "
the last three parameters of "0x00 0x00 0x00" are needed
in boot options command format, add it to the commands.
2. boot option set in progess is a status, but it should
can be update if it's in set-in-progress, otherwise, it
would never be changed back to update new boot option.
Tested:
it's tested by the following commands:
1.ipmitool raw 0x00 0x08 0x05 0x80 0x18 0x00 0x00 0x00
2.ipmitool raw 0x00 0x08 00 01
ipmitool raw 0x00 0x08 00 00
Change-Id: I3196d8472ae5135f37bcacd607d6e5a4228a6fe7
Signed-off-by: Chen Yugang <yugang.chen@linux.intel.com>
diff --git a/src/oemcommands.cpp b/src/oemcommands.cpp
index 71484b7..8dcb66b 100644
--- a/src/oemcommands.cpp
+++ b/src/oemcommands.cpp
@@ -3150,8 +3150,10 @@
return ipmi::responseSuccess();
}
-ipmi::RspType<> ipmiOemSetBootOptions(uint8_t bootFlag, uint8_t bootParam,
- std::optional<uint8_t> bootOption)
+ipmi::RspType<>
+ ipmiOemSetBootOptions(uint8_t bootFlag, uint8_t bootParam,
+ std::optional<uint8_t> bootOption,
+ std::optional<std::array<uint8_t, 3>> bootResv)
{
bool oneTimeEnabled = false;
uint8_t bootOptionValue = 0;
@@ -3165,13 +3167,6 @@
return ipmi::responseReqDataLenInvalid();
}
- if (boot_options::transferStatus == boot_options::setInProgress)
- {
- phosphor::logging::log<phosphor::logging::level::ERR>(
- "boot option set in progress!");
- return ipmi::responseResponseError();
- }
-
boot_options::transferStatus = bootParam;
return ipmi::responseSuccess();
}