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@13890 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
li-elvin
2012-10-30 04:23:40 +00:00
parent cb38c322f0
commit 37623a5c02
32 changed files with 478 additions and 109 deletions

View File

@@ -448,7 +448,17 @@ DxeMain (
//
// Assert if the Architectural Protocols are not present.
//
ASSERT_EFI_ERROR (CoreAllEfiServicesAvailable ());
Status = CoreAllEfiServicesAvailable ();
if (EFI_ERROR(Status)) {
//
// Report Status code that some Architectural Protocols are not present.
//
REPORT_STATUS_CODE (
EFI_ERROR_CODE | EFI_ERROR_MAJOR,
(EFI_SOFTWARE_DXE_CORE | EFI_SW_DXE_CORE_EC_NO_ARCH)
);
}
ASSERT_EFI_ERROR (Status);
//
// Report Status code before transfer control to BDS

View File

@@ -2,7 +2,7 @@
Last PEIM.
Responsibility of this module is to load the DXE Core from a Firmware Volume.
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -221,25 +221,49 @@ DxeLoadCore (
NULL,
(VOID **) &S3Resume
);
if (EFI_ERROR (Status)) {
//
// Report Status code that S3Resume PPI can not be found
//
REPORT_STATUS_CODE (
EFI_ERROR_CODE | EFI_ERROR_MAJOR,
(EFI_SOFTWARE_PEI_MODULE | EFI_SW_PEI_EC_S3_RESUME_PPI_NOT_FOUND)
);
}
ASSERT_EFI_ERROR (Status);
Status = S3Resume->S3RestoreConfig2 (S3Resume);
ASSERT_EFI_ERROR (Status);
} else if (BootMode == BOOT_IN_RECOVERY_MODE) {
REPORT_STATUS_CODE (EFI_PROGRESS_CODE, (EFI_SOFTWARE_PEI_MODULE | EFI_SW_PEI_PC_RECOVERY_BEGIN));
Status = PeiServicesLocatePpi (
&gEfiPeiRecoveryModulePpiGuid,
0,
NULL,
(VOID **) &PeiRecovery
);
//
// Report Status code the failure of locating Recovery PPI
//
REPORT_STATUS_CODE (
EFI_ERROR_CODE | EFI_ERROR_MAJOR,
(EFI_SOFTWARE_PEI_MODULE | EFI_SW_PEI_EC_RECOVERY_PPI_NOT_FOUND)
);
ASSERT_EFI_ERROR (Status);
REPORT_STATUS_CODE (EFI_PROGRESS_CODE, (EFI_SOFTWARE_PEI_MODULE | EFI_SW_PEI_PC_CAPSULE_LOAD));
Status = PeiRecovery->LoadRecoveryCapsule (PeiServices, PeiRecovery);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "Load Recovery Capsule Failed.(Status = %r)\n", Status));
//
// Report Status code that S3Resume PPI can not be found
//
REPORT_STATUS_CODE (
EFI_ERROR_CODE | EFI_ERROR_MAJOR,
(EFI_SOFTWARE_PEI_MODULE | EFI_SW_PEI_EC_NO_RECOVERY_CAPSULE)
);
CpuDeadLoop ();
}
REPORT_STATUS_CODE (EFI_PROGRESS_CODE, (EFI_SOFTWARE_PEI_MODULE | EFI_SW_PEI_PC_CAPSULE_START));
//
// Now should have a HOB with the DXE core
//

View File

@@ -48,6 +48,13 @@ PeiResetSystem (
if (!EFI_ERROR (Status)) {
return ResetPpi->ResetSystem (PeiServices);
}
//
// Report Status Code that Reset PPI is not available
//
REPORT_STATUS_CODE (
EFI_ERROR_CODE | EFI_ERROR_MINOR,
(EFI_SOFTWARE_PEI_CORE | EFI_SW_PS_EC_RESET_NOT_AVAILABLE)
);
return EFI_NOT_AVAILABLE_YET;
}

View File

@@ -35,7 +35,7 @@ Revision History:
Table now contains an item named CalculateCrc32.
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -279,6 +279,11 @@ RuntimeDriverSetVirtualAddressMap (
//
REPORT_STATUS_CODE (EFI_PROGRESS_CODE, (EFI_SOFTWARE_EFI_RUNTIME_SERVICE | EFI_SW_RS_PC_SET_VIRTUAL_ADDRESS_MAP));
//
// Report Status Code here since EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE event will be signaled.
//
REPORT_STATUS_CODE (EFI_PROGRESS_CODE, (EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_DXE_BS_PC_VIRTUAL_ADDRESS_CHANGE_EVENT));
//
// Signal all the EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE events.
// All runtime events are stored in a list in Runtime AP.