/* Adds a record for an execution stall on the processor into a specified boot script table. */
RETURN_STATUS EFIAPI S3BootScriptSaveStall(IN UINTN Duration)
/* Adds a record for an execution stall on the processor into a specified boot script table. */
RETURN_STATUS EFIAPI S3BootScriptSaveStall(IN UINTN Duration)
{
  UINT8                  Length;
  UINT8                  *Script;
  EFI_BOOT_SCRIPT_STALL  ScriptStall;
  if (!mS3BootScriptAcpiS3Enable) {
    return RETURN_SUCCESS;
  }
  Length = (UINT8)(sizeof (EFI_BOOT_SCRIPT_STALL));
  Script = S3BootScriptGetEntryAddAddress (Length);
  if (Script == NULL) {
    return RETURN_OUT_OF_RESOURCES;
  }
  ScriptStall.OpCode   = EFI_BOOT_SCRIPT_STALL_OPCODE;
  ScriptStall.Length   = Length;
  ScriptStall.Duration = Duration;
  CopyMem ((VOID *)Script, (VOID *)&ScriptStall, sizeof (EFI_BOOT_SCRIPT_STALL));
  SyncBootScript (Script);
  return RETURN_SUCCESS;
}