From 17dd0f2bb10c0ff90c794a8e4f1a966360da7c6d Mon Sep 17 00:00:00 2001 From: li-elvin Date: Wed, 7 Nov 2012 04:44:04 +0000 Subject: [PATCH] Moved the PeiS3ResumeState access when PeiS3ResumeState is not 0, this will fix K9 error. Signed-off-by: Li Elvin Reviewed-by: Yao Jiewen git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13929 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Acpi/BootScriptExecutorDxe/ScriptExecute.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/ScriptExecute.c b/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/ScriptExecute.c index 3bddda1316..e671164a83 100644 --- a/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/ScriptExecute.c +++ b/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/ScriptExecute.c @@ -69,12 +69,6 @@ S3BootScriptExecutorEntryFunction ( // Status = S3BootScriptExecute (); - // - // Need report status back to S3ResumePeim. - // If boot script execution is failed, S3ResumePeim wil report the error status code. - // - PeiS3ResumeState->ReturnStatus = (UINT64)(UINTN)Status; - AsmWbinvd (); // @@ -86,6 +80,11 @@ S3BootScriptExecutorEntryFunction ( // We need turn back to S3Resume - install boot script done ppi and report status code on S3resume. // if (PeiS3ResumeState != 0) { + // + // Need report status back to S3ResumePeim. + // If boot script execution is failed, S3ResumePeim wil report the error status code. + // + PeiS3ResumeState->ReturnStatus = (UINT64)(UINTN)Status; if (FeaturePcdGet (PcdDxeIplSwitchToLongMode)) { // // X64 S3 Resume