/* Send the data in communicate buffer to SMM. */
EFI_STATUS SendCommunicateBuffer(IN UINTN DataSize)
/* Send the data in communicate buffer to SMM. */
EFI_STATUS SendCommunicateBuffer(IN UINTN DataSize)
{
  EFI_STATUS                       Status;
  UINTN                            CommSize;
  EFI_MM_COMMUNICATE_HEADER        *SmmCommunicateHeader;
  SMM_VARIABLE_COMMUNICATE_HEADER  *SmmVariableFunctionHeader;
  CommSize = DataSize + SMM_COMMUNICATE_HEADER_SIZE + SMM_VARIABLE_COMMUNICATE_HEADER_SIZE;
  Status   = mMmCommunication2->Communicate (
                                  mMmCommunication2,
                                  mVariableBufferPhysical,
                                  mVariableBuffer,
                                  &CommSize
                                  );
  ASSERT_EFI_ERROR (Status);
  SmmCommunicateHeader      = (EFI_MM_COMMUNICATE_HEADER *)mVariableBuffer;
  SmmVariableFunctionHeader = (SMM_VARIABLE_COMMUNICATE_HEADER *)SmmCommunicateHeader->Data;
  return SmmVariableFunctionHeader->ReturnStatus;
}