@param Buffer The source buffer from which to write data.\r
\r
@retval RETURN_OUT_OF_RESOURCES Not enough memory for the table do operation.\r
- @retval RETURN_SUCCESS Opcode is added.\r
+ @retval RETURN_SUCCESS Opcode is added or no action is required as ACPI S3 was disabled.\r
**/\r
RETURN_STATUS\r
EFIAPI\r
UINT8 WidthInByte;\r
EFI_BOOT_SCRIPT_IO_WRITE ScriptIoWrite;\r
\r
+ if (!mS3BootScriptAcpiS3Enable) {\r
+ return RETURN_SUCCESS;\r
+ }\r
+\r
WidthInByte = (UINT8)(0x01 << (Width & 0x03));\r
\r
//\r
@param DataMask A pointer to the data mask to be AND-ed with the data read from the register\r
\r
@retval RETURN_OUT_OF_RESOURCES Not enough memory for the table do operation.\r
- @retval RETURN_SUCCESS Opcode is added.\r
+ @retval RETURN_SUCCESS Opcode is added or no action is required as ACPI S3 was disabled.\r
**/\r
RETURN_STATUS\r
EFIAPI\r
UINT8 WidthInByte;\r
EFI_BOOT_SCRIPT_IO_READ_WRITE ScriptIoReadWrite;\r
\r
+ if (!mS3BootScriptAcpiS3Enable) {\r
+ return RETURN_SUCCESS;\r
+ }\r
+\r
WidthInByte = (UINT8)(0x01 << (Width & 0x03));\r
Length = (UINT8)(sizeof (EFI_BOOT_SCRIPT_IO_READ_WRITE) + (WidthInByte * 2));\r
\r
@param Buffer The source buffer from which to write the data.\r
\r
@retval RETURN_OUT_OF_RESOURCES Not enough memory for the table do operation.\r
- @retval RETURN_SUCCESS Opcode is added.\r
+ @retval RETURN_SUCCESS Opcode is added or no action is required as ACPI S3 was disabled.\r
**/\r
RETURN_STATUS\r
EFIAPI\r
UINT8 WidthInByte;\r
EFI_BOOT_SCRIPT_MEM_WRITE ScriptMemWrite;\r
\r
+ if (!mS3BootScriptAcpiS3Enable) {\r
+ return RETURN_SUCCESS;\r
+ }\r
+\r
WidthInByte = (UINT8)(0x01 << (Width & 0x03));\r
\r
//\r
@param DataMask A pointer to the data mask to be AND-ed with the data read from the register.\r
\r
@retval RETURN_OUT_OF_RESOURCES Not enough memory for the table do operation.\r
- @retval RETURN_SUCCESS Opcode is added.\r
+ @retval RETURN_SUCCESS Opcode is added or no action is required as ACPI S3 was disabled.\r
**/\r
RETURN_STATUS\r
EFIAPI\r
UINT8 WidthInByte;\r
EFI_BOOT_SCRIPT_MEM_READ_WRITE ScriptMemReadWrite;\r
\r
+ if (!mS3BootScriptAcpiS3Enable) {\r
+ return RETURN_SUCCESS;\r
+ }\r
+\r
WidthInByte = (UINT8)(0x01 << (Width & 0x03));\r
Length = (UINT8)(sizeof (EFI_BOOT_SCRIPT_MEM_READ_WRITE) + (WidthInByte * 2));\r
\r
@param Buffer The source buffer from which to write the data.\r
\r
@retval RETURN_OUT_OF_RESOURCES Not enough memory for the table do operation.\r
- @retval RETURN_SUCCESS Opcode is added.\r
+ @retval RETURN_SUCCESS Opcode is added or no action is required as ACPI S3 was disabled.\r
@note A known Limitations in the implementation which is 64bits operations are not supported.\r
\r
**/\r
UINT8 WidthInByte;\r
EFI_BOOT_SCRIPT_PCI_CONFIG_WRITE ScriptPciWrite;\r
\r
+ if (!mS3BootScriptAcpiS3Enable) {\r
+ return RETURN_SUCCESS;\r
+ }\r
+\r
if ((Width == S3BootScriptWidthUint64) ||\r
(Width == S3BootScriptWidthFifoUint64) ||\r
(Width == S3BootScriptWidthFillUint64))\r
@param DataMask A pointer to the data mask to be AND-ed.\r
\r
@retval RETURN_OUT_OF_RESOURCES Not enough memory for the table do operation.\r
- @retval RETURN__SUCCESS Opcode is added.\r
+ @retval RETURN__SUCCESS Opcode is added or no action is required as ACPI S3 was disabled.\r
@note A known Limitations in the implementation which is 64bits operations are not supported.\r
\r
**/\r
UINT8 WidthInByte;\r
EFI_BOOT_SCRIPT_PCI_CONFIG_READ_WRITE ScriptPciReadWrite;\r
\r
+ if (!mS3BootScriptAcpiS3Enable) {\r
+ return RETURN_SUCCESS;\r
+ }\r
+\r
if ((Width == S3BootScriptWidthUint64) ||\r
(Width == S3BootScriptWidthFifoUint64) ||\r
(Width == S3BootScriptWidthFillUint64))\r
@param Buffer The source buffer from which to write the data.\r
\r
@retval RETURN_OUT_OF_RESOURCES Not enough memory for the table do operation.\r
- @retval RETURN_SUCCESS Opcode is added.\r
+ @retval RETURN_SUCCESS Opcode is added or no action is required as ACPI S3 was disabled.\r
@note A known Limitations in the implementation which is 64bits operations are not supported.\r
\r
**/\r
UINT8 WidthInByte;\r
EFI_BOOT_SCRIPT_PCI_CONFIG2_WRITE ScriptPciWrite2;\r
\r
+ if (!mS3BootScriptAcpiS3Enable) {\r
+ return RETURN_SUCCESS;\r
+ }\r
+\r
if ((Width == S3BootScriptWidthUint64) ||\r
(Width == S3BootScriptWidthFifoUint64) ||\r
(Width == S3BootScriptWidthFillUint64))\r
@param DataMask A pointer to the data mask to be AND-ed.\r
\r
@retval RETURN_OUT_OF_RESOURCES Not enough memory for the table do operation.\r
- @retval RETURN_SUCCESS Opcode is added.\r
+ @retval RETURN_SUCCESS Opcode is added or no action is required as ACPI S3 was disabled.\r
@note A known Limitations in the implementation which is 64bits operations are not supported.\r
\r
**/\r
UINT8 WidthInByte;\r
EFI_BOOT_SCRIPT_PCI_CONFIG2_READ_WRITE ScriptPciReadWrite2;\r
\r
+ if (!mS3BootScriptAcpiS3Enable) {\r
+ return RETURN_SUCCESS;\r
+ }\r
+\r
if ((Width == S3BootScriptWidthUint64) ||\r
(Width == S3BootScriptWidthFifoUint64) ||\r
(Width == S3BootScriptWidthFillUint64))\r
@param Buffer Contains the value of data to execute to the SMBUS slave device.\r
\r
@retval RETURN_OUT_OF_RESOURCES Not enough memory for the table do operation.\r
- @retval RETURN_SUCCESS Opcode is added.\r
+ @retval RETURN_SUCCESS Opcode is added or no action is required as ACPI S3 was disabled.\r
**/\r
RETURN_STATUS\r
EFIAPI\r
UINT8 *Script;\r
EFI_BOOT_SCRIPT_SMBUS_EXECUTE ScriptSmbusExecute;\r
\r
+ if (!mS3BootScriptAcpiS3Enable) {\r
+ return RETURN_SUCCESS;\r
+ }\r
+\r
if (Length == NULL) {\r
BufferLength = 0;\r
} else {\r
@param Duration Duration in microseconds of the stall\r
\r
@retval RETURN_OUT_OF_RESOURCES Not enough memory for the table do operation.\r
- @retval RETURN_SUCCESS Opcode is added.\r
+ @retval RETURN_SUCCESS Opcode is added or no action is required as ACPI S3 was disabled.\r
**/\r
RETURN_STATUS\r
EFIAPI\r
UINT8 *Script;\r
EFI_BOOT_SCRIPT_STALL ScriptStall;\r
\r
+ if (!mS3BootScriptAcpiS3Enable) {\r
+ return RETURN_SUCCESS;\r
+ }\r
+\r
Length = (UINT8)(sizeof (EFI_BOOT_SCRIPT_STALL));\r
\r
Script = S3BootScriptGetEntryAddAddress (Length);\r
@param Context Argument to be passed into the EntryPoint of the code to be dispatched.\r
\r
@retval RETURN_OUT_OF_RESOURCES Not enough memory for the table do operation.\r
- @retval RETURN_SUCCESS Opcode is added.\r
+ @retval RETURN_SUCCESS Opcode is added or no action is required as ACPI S3 was disabled.\r
**/\r
RETURN_STATUS\r
EFIAPI\r
UINT8 *Script;\r
EFI_BOOT_SCRIPT_DISPATCH_2 ScriptDispatch2;\r
\r
+ if (!mS3BootScriptAcpiS3Enable) {\r
+ return RETURN_SUCCESS;\r
+ }\r
+\r
Length = (UINT8)(sizeof (EFI_BOOT_SCRIPT_DISPATCH_2));\r
\r
Script = S3BootScriptGetEntryAddAddress (Length);\r
@param LoopTimes The times of the register polling.\r
\r
@retval RETURN_OUT_OF_RESOURCES Not enough memory for the table do operation.\r
- @retval RETURN_SUCCESS Opcode is added.\r
+ @retval RETURN_SUCCESS Opcode is added or no action is required as ACPI S3 was disabled.\r
\r
**/\r
RETURN_STATUS\r
UINT8 WidthInByte;\r
EFI_BOOT_SCRIPT_MEM_POLL ScriptMemPoll;\r
\r
+ if (!mS3BootScriptAcpiS3Enable) {\r
+ return RETURN_SUCCESS;\r
+ }\r
+\r
WidthInByte = (UINT8)(0x01 << (Width & 0x03));\r
\r
Length = (UINT8)(sizeof (EFI_BOOT_SCRIPT_MEM_POLL) + (WidthInByte * 2));\r
@param Information Information to be logged in the boot scrpit\r
\r
@retval RETURN_OUT_OF_RESOURCES Not enough memory for the table do operation.\r
- @retval RETURN_SUCCESS Opcode is added.\r
+ @retval RETURN_SUCCESS Opcode is added or no action is required as ACPI S3 was disabled.\r
\r
**/\r
RETURN_STATUS\r
UINT8 *Script;\r
EFI_BOOT_SCRIPT_INFORMATION ScriptInformation;\r
\r
+ if (!mS3BootScriptAcpiS3Enable) {\r
+ return RETURN_SUCCESS;\r
+ }\r
+\r
//\r
// Truncation check\r
//\r
@param String The string to save to boot script table\r
\r
@retval RETURN_OUT_OF_RESOURCES Not enough memory for the table do operation.\r
- @retval RETURN_SUCCESS Opcode is added.\r
+ @retval RETURN_SUCCESS Opcode is added or no action is required as ACPI S3 was disabled.\r
\r
**/\r
RETURN_STATUS\r
@param EntryPoint Entry point of the code to be dispatched.\r
\r
@retval RETURN_OUT_OF_RESOURCES Not enough memory for the table do operation.\r
- @retval RETURN_SUCCESS Opcode is added.\r
+ @retval RETURN_SUCCESS Opcode is added or no action is required as ACPI S3 was disabled.\r
**/\r
RETURN_STATUS\r
EFIAPI\r
UINT8 *Script;\r
EFI_BOOT_SCRIPT_DISPATCH ScriptDispatch;\r
\r
+ if (!mS3BootScriptAcpiS3Enable) {\r
+ return RETURN_SUCCESS;\r
+ }\r
+\r
Length = (UINT8)(sizeof (EFI_BOOT_SCRIPT_DISPATCH));\r
\r
Script = S3BootScriptGetEntryAddAddress (Length);\r
granularity so the delay may be longer.\r
\r
@retval RETURN_OUT_OF_RESOURCES Not enough memory for the table do operation.\r
- @retval RETURN_SUCCESS Opcode is added.\r
+ @retval RETURN_SUCCESS Opcode is added or no action is required as ACPI S3 was disabled.\r
\r
**/\r
RETURN_STATUS\r
UINT8 Length;\r
EFI_BOOT_SCRIPT_IO_POLL ScriptIoPoll;\r
\r
+ if (!mS3BootScriptAcpiS3Enable) {\r
+ return RETURN_SUCCESS;\r
+ }\r
+\r
WidthInByte = (UINT8)(0x01 << (Width & 0x03));\r
Length = (UINT8)(sizeof (EFI_BOOT_SCRIPT_IO_POLL) + (WidthInByte * 2));\r
\r
granularity so the delay may be longer.\r
\r
@retval RETURN_OUT_OF_RESOURCES Not enough memory for the table do operation.\r
- @retval RETURN_SUCCESS Opcode is added.\r
+ @retval RETURN_SUCCESS Opcode is added or no action is required as ACPI S3 was disabled.\r
@note A known Limitations in the implementation which is 64bits operations are not supported.\r
\r
**/\r
UINT8 Length;\r
EFI_BOOT_SCRIPT_PCI_CONFIG_POLL ScriptPciPoll;\r
\r
+ if (!mS3BootScriptAcpiS3Enable) {\r
+ return RETURN_SUCCESS;\r
+ }\r
+\r
if ((Width == S3BootScriptWidthUint64) ||\r
(Width == S3BootScriptWidthFifoUint64) ||\r
(Width == S3BootScriptWidthFillUint64))\r
granularity so the delay may be longer.\r
\r
@retval RETURN_OUT_OF_RESOURCES Not enough memory for the table do operation.\r
- @retval RETURN_SUCCESS Opcode is added.\r
+ @retval RETURN_SUCCESS Opcode is added or no action is required as ACPI S3 was disabled.\r
@note A known Limitations in the implementation which is 64bits operations are not supported.\r
\r
**/\r
UINT8 Length;\r
EFI_BOOT_SCRIPT_PCI_CONFIG2_POLL ScriptPci2Poll;\r
\r
+ if (!mS3BootScriptAcpiS3Enable) {\r
+ return RETURN_SUCCESS;\r
+ }\r
+\r
if ((Width == S3BootScriptWidthUint64) ||\r
(Width == S3BootScriptWidthFifoUint64) ||\r
(Width == S3BootScriptWidthFillUint64))\r
\r
@retval RETURN_OUT_OF_RESOURCES The table is not available.\r
@retval RETURN_INVALID_PARAMETER The Position is not a valid position in the boot script table.\r
- @retval RETURN_SUCCESS Opcode is inserted.\r
+ @retval RETURN_SUCCESS Opcode is inserted no action is required as ACPI S3 was disabled.\r
**/\r
RETURN_STATUS\r
EFIAPI\r
UINT8 *LastOpcode;\r
UINT8 TempBootScriptEntry[BOOT_SCRIPT_NODE_MAX_LENGTH];\r
\r
+ if (!mS3BootScriptAcpiS3Enable) {\r
+ return RETURN_SUCCESS;\r
+ }\r
+\r
ValidatePosition = FALSE;\r
TempPosition = (Position == NULL) ? NULL : (*Position);\r
\r
\r
@retval RETURN_INVALID_PARAMETER The Position is not a valid position in the boot script table.\r
@retval RETURN_OUT_OF_RESOURCES Not enough memory for the table do operation.\r
- @retval RETURN_SUCCESS Opcode is added.\r
+ @retval RETURN_SUCCESS Opcode is added or no action is required as ACPI S3 was disabled.\r
\r
**/\r
RETURN_STATUS\r
UINT8 *Script;\r
EFI_BOOT_SCRIPT_INFORMATION ScriptInformation;\r
\r
+ if (!mS3BootScriptAcpiS3Enable) {\r
+ return RETURN_SUCCESS;\r
+ }\r
+\r
//\r
// Truncation check\r
//\r
of the inserted opcode in the boot script table.\r
@param Label Points to the label which will be inserted in the boot script table.\r
\r
- @retval EFI_SUCCESS The operation succeeded. A record was added into the\r
- specified script table.\r
+ @retval EFI_SUCCESS The operation succeeded or no action is required.\r
+ A record was added into the specified script table if ACPI S3 was enabled.\r
@retval EFI_INVALID_PARAMETER The parameter is illegal or the given boot script is not supported.\r
If the opcode is unknow or not supported because of the PCD\r
Feature Flags.\r
EFI_BOOT_SCRIPT_TABLE_HEADER TableHeader;\r
UINT32 LabelLength;\r
\r
+ if (!mS3BootScriptAcpiS3Enable) {\r
+ return RETURN_SUCCESS;\r
+ }\r
+\r
//\r
// Check NULL Label\r
//\r
@param Position2 The positions in the boot script table to compare\r
@param RelativePosition On return, points to the result of the comparison\r
\r
- @retval EFI_SUCCESS The operation succeeded. A record was added into the\r
- specified script table.\r
+ @retval EFI_SUCCESS The operation succeeded or no action is required.\r
+ A record was added into the specified script table if ACPI S3 was enabled.\r
@retval EFI_INVALID_PARAMETER The parameter is illegal or the given boot script is not supported.\r
If the opcode is unknow or not supported because of the PCD\r
Feature Flags.\r
UINT8 *Script;\r
UINT32 TableLength;\r
\r
+ if (!mS3BootScriptAcpiS3Enable) {\r
+ return RETURN_SUCCESS;\r
+ }\r
+\r
if (RelativePosition == NULL) {\r
return EFI_INVALID_PARAMETER;\r
}\r