/* Restarts a previously interrupted write. The caller must provide the block protocol needed to complete the interrupted write. */
EFI_STATUS EFIAPI FtwRestart(IN EFI_FAULT_TOLERANT_WRITE_PROTOCOL *This, IN EFI_HANDLE FvBlockHandle)
/* Restarts a previously interrupted write. The caller must provide the block protocol needed to complete the interrupted write. */
EFI_STATUS EFIAPI FtwRestart(IN EFI_FAULT_TOLERANT_WRITE_PROTOCOL *This, IN EFI_HANDLE FvBlockHandle)
{
  EFI_STATUS                 Status;
  UINTN                      PayloadSize;
  EFI_MM_COMMUNICATE_HEADER  *SmmCommunicateHeader;
  SMM_FTW_RESTART_HEADER     *SmmFtwRestartHeader;
  PayloadSize = sizeof (SMM_FTW_RESTART_HEADER);
  InitCommunicateBuffer ((VOID **)&SmmCommunicateHeader, (VOID **)&SmmFtwRestartHeader, PayloadSize, FTW_FUNCTION_RESTART);
  Status = ConvertFvbHandle (FvBlockHandle, &SmmFtwRestartHeader->FvbBaseAddress, &SmmFtwRestartHeader->FvbAttributes);
  if (EFI_ERROR (Status)) {
    FreePool (SmmCommunicateHeader);
    return EFI_ABORTED;
  }
  Status = SendCommunicateBuffer (SmmCommunicateHeader, PayloadSize);
  FreePool (SmmCommunicateHeader);
  return Status;
}