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
This commit is contained in:
@@ -441,6 +441,16 @@ S3ResumeBootOs (
|
|||||||
//
|
//
|
||||||
AsmWriteIdtr (&PeiS3ResumeState->Idtr);
|
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
|
// NOTE: Because Debug Timer interrupt and system interrupts will be disabled
|
||||||
// in BootScriptExecuteDxe, the rest code in S3ResumeBootOs() cannot be halted
|
// in BootScriptExecuteDxe, the rest code in S3ResumeBootOs() cannot be halted
|
||||||
@@ -463,6 +473,13 @@ S3ResumeBootOs (
|
|||||||
if ((Facs == NULL) ||
|
if ((Facs == NULL) ||
|
||||||
(Facs->Signature != EFI_ACPI_4_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE) ||
|
(Facs->Signature != EFI_ACPI_4_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE) ||
|
||||||
((Facs->FirmwareWakingVector == 0) && (Facs->XFirmwareWakingVector == 0)) ) {
|
((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 ();
|
CpuDeadLoop ();
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
@@ -504,8 +521,17 @@ S3ResumeBootOs (
|
|||||||
(UINT64)(UINTN)TempStackTop
|
(UINT64)(UINTN)TempStackTop
|
||||||
);
|
);
|
||||||
} else {
|
} 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"));
|
DEBUG (( EFI_D_ERROR, "Unsupported for 32bit DXE transfer to 64bit OS waking vector!\r\n"));
|
||||||
ASSERT (FALSE);
|
ASSERT (FALSE);
|
||||||
|
CpuDeadLoop ();
|
||||||
|
return ;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
@@ -527,6 +553,14 @@ S3ResumeBootOs (
|
|||||||
AsmTransferControl (Facs->FirmwareWakingVector, 0x0);
|
AsmTransferControl (Facs->FirmwareWakingVector, 0x0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// 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
|
// Never run to here
|
||||||
//
|
//
|
||||||
@@ -817,6 +851,11 @@ S3ResumeExecuteBootScript (
|
|||||||
// Save IDT
|
// Save IDT
|
||||||
//
|
//
|
||||||
AsmReadIdtr (&PeiS3ResumeState->Idtr);
|
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);
|
PERF_START (NULL, "ScriptExec", NULL, 0);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user