Implement the set/get system boot option parameters 0x04

Implement the set/get system boot options parameter 0x04 (boot info
acknowledge).

Tested:
1. Set system boot options by command:
   $ ipmitool raw 0x00 0x08 0x04 0x01 0x01
2. Get system boot options by command:
   $ ipmitool raw 0x00 0x09 0x04 0x00 0x00
     01 04 00 01
3. Force boot into BIOS setup menu
   $ ipmitool chassis bootdev bios
4. Get the bootparm #4
   $ ipmitool chassis bootparam get 4
   Boot parameter version: 1
   Boot parameter 4 is valid/unlocked
   Boot parameter data: 0001
    Boot Info Acknowledge :
     - BIOS/POST has handled boot info
5. Chassis power reset
6. Wait and make sure the Host boot to the BIOS menu
7. Force boot from default Hard-drive or PXE
   $ ipmitool bootdev disk/pxe
8. Chassis power reset, the Host will boot to disk/pxe

Signed-off-by: Hieu Huynh <hieuh@os.amperecomputing.com>
Change-Id: I66f68bf3c673cb983404ff215da52add482551f8
diff --git a/chassishandler.cpp b/chassishandler.cpp
index c0451de..e04a401 100644
--- a/chassishandler.cpp
+++ b/chassishandler.cpp
@@ -1906,6 +1906,7 @@
 static constexpr uint8_t setInProgress = 0x1;
 static uint8_t transferStatus = setComplete;
 static uint8_t bootFlagValidBitClr = 0;
+static uint5_t bootInitiatorAckData = 0x0;
 
 /** @brief implements the Get Chassis system boot option
  *  @param ctx - context pointer
@@ -1955,8 +1956,8 @@
         BootOptionParameter::bootInfo)
     {
         constexpr uint8_t writeMask = 0;
-        constexpr uint8_t bootInfoAck = 0;
-        response.pack(bootOptionParameter, writeMask, bootInfoAck);
+        response.pack(bootOptionParameter, reserved1, writeMask,
+                      bootInitiatorAckData);
         return ipmi::responseSuccess(std::move(response));
     }
 
@@ -2250,10 +2251,10 @@
              BootOptionParameter::bootInfo)
     {
         uint8_t writeMak;
-        uint5_t bootInitiatorAckData;
+        uint5_t bootInfoAck;
         uint3_t rsvd;
 
-        if (data.unpack(writeMak, bootInitiatorAckData, rsvd) != 0 ||
+        if (data.unpack(writeMak, bootInfoAck, rsvd) != 0 ||
             !data.fullyUnpacked())
         {
             return ipmi::responseReqDataLenInvalid();
@@ -2262,10 +2263,8 @@
         {
             return ipmi::responseInvalidFieldRequest();
         }
-        // (ccSuccess). There is no implementation in OpenBMC for this
-        // parameter. This is added to support the ipmitool command `chassis
-        // bootdev` which sends set on parameter #4, before setting the boot
-        // flags.
+        bootInitiatorAckData &= ~writeMak;
+        bootInitiatorAckData |= (writeMak & bootInfoAck);
         log<level::INFO>("ipmiChassisSetSysBootOptions: bootInfo parameter set "
                          "successfully");
         data.trailingOk = true;