Revision: 13892
          http://edk2.svn.sourceforge.net/edk2/?rev=13892&view=rev
Author:   li-elvin
Date:     2012-10-30 04:25:43 +0000 (Tue, 30 Oct 2012)
Log Message:
-----------
Add missing status code in several modules.

Signed-off-by: Li Elvin <[email protected]>
Reviewed-by: Yao Jiewen <[email protected]>
Reviewed-by: Ni Ruiyu <[email protected]>
Reviewed-by: Gao Liming <[email protected]>
Reviewed-by: Tian Feng <[email protected]>
Reviewed-by: Fan Jeff <[email protected]>

Modified Paths:
--------------
    trunk/edk2/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c

Modified: trunk/edk2/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c
===================================================================
--- trunk/edk2/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c        
2012-10-30 04:25:20 UTC (rev 13891)
+++ trunk/edk2/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c        
2012-10-30 04:25:43 UTC (rev 13892)
@@ -441,6 +441,16 @@
   //
   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 @@
   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 @@
           (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 @@
   }
 
   //
+  // 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 @@
   // 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);
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to