diff options
author | li-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-10-30 04:25:43 +0000 |
---|---|---|
committer | li-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-10-30 04:25:43 +0000 |
commit | f6d5cbe7db8985bb55f70d018d318f3e0a9a7126 (patch) | |
tree | bb6ab5cdf65af80f78df5f34c66f885fe549abd1 /UefiCpuPkg/Universal | |
parent | 44d52203a651445e78369f93a3ea22a8b565e9ad (diff) | |
download | edk2-platforms-f6d5cbe7db8985bb55f70d018d318f3e0a9a7126.tar.xz |
Add missing status code in several modules.
Signed-off-by: Li Elvin <elvin.li@intel.com>
Reviewed-by: Yao Jiewen <jiewen.yao@intel.com>
Reviewed-by: Ni Ruiyu <ruiyu.ni@intel.com>
Reviewed-by: Gao Liming <liming.gao@intel.com>
Reviewed-by: Tian Feng <feng.tian@intel.com>
Reviewed-by: Fan Jeff <jeff.fan@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13892 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'UefiCpuPkg/Universal')
-rw-r--r-- | UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c b/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c index 49796a12f2..e57398b504 100644 --- a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c +++ b/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c @@ -441,6 +441,16 @@ S3ResumeBootOs ( //
AsmWriteIdtr (&PeiS3ResumeState->Idtr);
+ if (PeiS3ResumeState->ReturnStatus != EFI_SUCCESS) {
+ //
+ // Report Status code that boot script execution is failed
+ //
+ REPORT_STATUS_CODE (
+ EFI_ERROR_CODE | EFI_ERROR_MINOR,
+ (EFI_SOFTWARE_PEI_MODULE | EFI_SW_PEI_EC_S3_BOOT_SCRIPT_ERROR)
+ );
+ }
+
//
// NOTE: Because Debug Timer interrupt and system interrupts will be disabled
// in BootScriptExecuteDxe, the rest code in S3ResumeBootOs() cannot be halted
@@ -463,6 +473,13 @@ S3ResumeBootOs ( if ((Facs == NULL) ||
(Facs->Signature != EFI_ACPI_4_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE) ||
((Facs->FirmwareWakingVector == 0) && (Facs->XFirmwareWakingVector == 0)) ) {
+ //
+ // Report Status code that no valid vector is found
+ //
+ REPORT_STATUS_CODE (
+ EFI_ERROR_CODE | EFI_ERROR_MAJOR,
+ (EFI_SOFTWARE_PEI_MODULE | EFI_SW_PEI_EC_S3_OS_WAKE_ERROR)
+ );
CpuDeadLoop ();
return ;
}
@@ -504,8 +521,17 @@ S3ResumeBootOs ( (UINT64)(UINTN)TempStackTop
);
} else {
+ //
+ // Report Status code that no valid waking vector is found
+ //
+ REPORT_STATUS_CODE (
+ EFI_ERROR_CODE | EFI_ERROR_MAJOR,
+ (EFI_SOFTWARE_PEI_MODULE | EFI_SW_PEI_EC_S3_OS_WAKE_ERROR)
+ );
DEBUG (( EFI_D_ERROR, "Unsupported for 32bit DXE transfer to 64bit OS waking vector!\r\n"));
ASSERT (FALSE);
+ CpuDeadLoop ();
+ return ;
}
} else {
//
@@ -528,6 +554,14 @@ S3ResumeBootOs ( }
//
+ // Report Status code the failure of S3Resume
+ //
+ REPORT_STATUS_CODE (
+ EFI_ERROR_CODE | EFI_ERROR_MAJOR,
+ (EFI_SOFTWARE_PEI_MODULE | EFI_SW_PEI_EC_S3_OS_WAKE_ERROR)
+ );
+
+ //
// Never run to here
//
CpuDeadLoop();
@@ -817,6 +851,11 @@ S3ResumeExecuteBootScript ( // Save IDT
//
AsmReadIdtr (&PeiS3ResumeState->Idtr);
+
+ //
+ // Report Status Code to indicate S3 boot script execution
+ //
+ REPORT_STATUS_CODE (EFI_PROGRESS_CODE, EFI_SOFTWARE_PEI_MODULE | EFI_SW_PEI_PC_S3_BOOT_SCRIPT);
PERF_START (NULL, "ScriptExec", NULL, 0);
|