summaryrefslogtreecommitdiff
path: root/UefiCpuPkg
diff options
context:
space:
mode:
authorlzeng14 <lzeng14@6f19259b-4bc3-4df7-8a09-765794883524>2012-08-20 06:09:25 +0000
committerlzeng14 <lzeng14@6f19259b-4bc3-4df7-8a09-765794883524>2012-08-20 06:09:25 +0000
commit48ee8e3e8c1c65bd1cd853e48a8820ae3a4c60e8 (patch)
treee625f5bf79b0f434c8aeb9f9ca067d0e437a979f /UefiCpuPkg
parent6d4136f4b043f1624efa8f025488e5e23831ae6f (diff)
downloadedk2-platforms-48ee8e3e8c1c65bd1cd853e48a8820ae3a4c60e8.tar.xz
Initialize TempAcpiS3Context and TempEfiBootScriptExecutorVariable.
Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13649 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'UefiCpuPkg')
-rw-r--r--UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c b/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c
index de3aec85e1..07d83cc875 100644
--- a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c
+++ b/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c
@@ -874,6 +874,9 @@ S3RestoreConfig2 (
VOID *GuidHob;
BOOLEAN Build4GPageTableOnly;
+ TempAcpiS3Context = 0;
+ TempEfiBootScriptExecutorVariable = 0;
+
DEBUG ((EFI_D_ERROR, "Enter S3 PEIM\r\n"));
VarSize = sizeof (EFI_PHYSICAL_ADDRESS);
@@ -884,9 +887,6 @@ S3RestoreConfig2 (
);
ASSERT_EFI_ERROR (Status);
- AcpiS3Context = (ACPI_S3_CONTEXT *)(UINTN)TempAcpiS3Context;
- ASSERT (AcpiS3Context != NULL);
-
Status = RestoreLockBox (
&gEfiAcpiS3ContextGuid,
NULL,
@@ -894,7 +894,10 @@ S3RestoreConfig2 (
);
ASSERT_EFI_ERROR (Status);
- VarSize = sizeof (TempEfiBootScriptExecutorVariable);
+ AcpiS3Context = (ACPI_S3_CONTEXT *)(UINTN)TempAcpiS3Context;
+ ASSERT (AcpiS3Context != NULL);
+
+ VarSize = sizeof (EFI_PHYSICAL_ADDRESS);
Status = RestoreLockBox (
&gEfiBootScriptExecutorVariableGuid,
&TempEfiBootScriptExecutorVariable,
@@ -910,6 +913,7 @@ S3RestoreConfig2 (
ASSERT_EFI_ERROR (Status);
EfiBootScriptExecutorVariable = (BOOT_SCRIPT_EXECUTOR_VARIABLE *) (UINTN) TempEfiBootScriptExecutorVariable;
+ ASSERT (EfiBootScriptExecutorVariable != NULL);
DEBUG (( EFI_D_ERROR, "AcpiS3Context = %x\n", AcpiS3Context));
DEBUG (( EFI_D_ERROR, "Waking Vector = %x\n", ((EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE *) ((UINTN) (AcpiS3Context->AcpiFacsTable)))->FirmwareWakingVector));