Revision: 14136
          http://edk2.svn.sourceforge.net/edk2/?rev=14136&view=rev
Author:   vanjeff
Date:     2013-02-20 03:38:10 +0000 (Wed, 20 Feb 2013)
Log Message:
-----------
Update SmiManager() comments and implementation to follow the new rule 
clarified by PI 1.2.1 errata A. 
1. If at least one of the handlers returns EFI_WARN_INTERRUPT_SOURCE_QUIESCED 
or EFI_SUCCESS then the function will return EFI_SUCCESS.
   If a handler returns EFI_SUCCESS and HandlerType is not NULL then no 
additional handlers will be processed.
2. If a handler returns EFI_INTERRUPT_PENDING and HandlerType is not NULL then 
no additional handlers will be processed and EFI_INTERRUPT_PENDING will be 
returned.

Signed-off-by: Jeff Fan <[email protected]>
Reviewed-by: Jiewen Yao <[email protected]>

Modified Paths:
--------------
    trunk/edk2/MdeModulePkg/Core/PiSmmCore/Smi.c

Modified: trunk/edk2/MdeModulePkg/Core/PiSmmCore/Smi.c
===================================================================
--- trunk/edk2/MdeModulePkg/Core/PiSmmCore/Smi.c        2013-02-19 22:53:48 UTC 
(rev 14135)
+++ trunk/edk2/MdeModulePkg/Core/PiSmmCore/Smi.c        2013-02-20 03:38:10 UTC 
(rev 14136)
@@ -1,7 +1,7 @@
 /** @file
   SMI management.
 
-  Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2009 - 2013, 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        
@@ -128,11 +128,11 @@
   LIST_ENTRY   *Head;
   SMI_ENTRY    *SmiEntry;
   SMI_HANDLER  *SmiHandler;
-  BOOLEAN      InterruptQuiesced;
+  BOOLEAN      SuccessReturn;
   EFI_STATUS   Status;
   
   Status = EFI_NOT_FOUND;
-  InterruptQuiesced = FALSE;
+  SuccessReturn = FALSE;
   if (HandlerType == NULL) {
     //
     // Root SMI handler
@@ -167,8 +167,8 @@
     switch (Status) {
     case EFI_INTERRUPT_PENDING:
       //
-      // If a handler returns EFI_INTERRUPT_PENDING then no additional 
handlers 
-      // will be processed and EFI_INTERRUPT_PENDING will be returned.
+      // If a handler returns EFI_INTERRUPT_PENDING and HandlerType is not 
NULL then
+      // no additional handlers will be processed and EFI_INTERRUPT_PENDING 
will be returned.
       //
       if (HandlerType != NULL) {
         return EFI_INTERRUPT_PENDING;
@@ -177,12 +177,14 @@
 
     case EFI_SUCCESS:
       //
-      // If a handler returns EFI_SUCCESS then no additional handlers will be 
processed.
-      // then the function will return EFI_SUCCESS.
+      // If at least one of the handlers returns EFI_SUCCESS then the function 
will return
+      // EFI_SUCCESS. If a handler returns EFI_SUCCESS and HandlerType is not 
NULL then no
+      // additional handlers will be processed.
       //
       if (HandlerType != NULL) {
         return EFI_SUCCESS;
       }
+      SuccessReturn = TRUE;
       break;
 
     case EFI_WARN_INTERRUPT_SOURCE_QUIESCED:
@@ -190,7 +192,7 @@
       // If at least one of the handlers returns 
EFI_WARN_INTERRUPT_SOURCE_QUIESCED
       // then the function will return EFI_SUCCESS. 
       //
-      InterruptQuiesced = TRUE;
+      SuccessReturn = TRUE;
       break;
 
     case EFI_WARN_INTERRUPT_SOURCE_PENDING:
@@ -209,7 +211,7 @@
     }
   }
 
-  if (InterruptQuiesced) {
+  if (SuccessReturn) {
     Status = EFI_SUCCESS;
   }
 

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_d2d_feb
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to