/* Set bit field value to the buffer. Note: Data type UINT32 can cover all the bit field value. */
VOID SetBitsQuestionValue(IN HII_STATEMENT *Question, IN OUT UINT8 *Buffer, IN UINT32 Value)
/* Set bit field value to the buffer. Note: Data type UINT32 can cover all the bit field value. */
VOID SetBitsQuestionValue(IN HII_STATEMENT *Question, IN OUT UINT8 *Buffer, IN UINT32 Value)
{
  UINT32  Operand;
  UINTN   StartBit;
  UINTN   EndBit;
  UINT32  RetVal;
  StartBit = Question->BitVarOffset % 8;
  EndBit   = StartBit + Question->BitStorageWidth - 1;
  CopyMem ((UINT8 *)&Operand, Buffer, Question->StorageWidth);
  RetVal = BitFieldWrite32 (Operand, StartBit, EndBit, Value);
  CopyMem (Buffer, (UINT8 *)&RetVal, Question->StorageWidth);
}