diff options
author | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2013-02-20 03:38:10 +0000 |
---|---|---|
committer | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2013-02-20 03:38:10 +0000 |
commit | 510ed4312fbff1284daef5b1e03ba34a5e081cde (patch) | |
tree | 845979a692059b94a77a842dd385dc796ed4b241 /MdeModulePkg | |
parent | 95a411abe4939a63244433d1e6f02bcc477e023b (diff) | |
download | edk2-platforms-510ed4312fbff1284daef5b1e03ba34a5e081cde.tar.xz |
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 <jeff.fan@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14136 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Core/PiSmmCore/Smi.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/MdeModulePkg/Core/PiSmmCore/Smi.c b/MdeModulePkg/Core/PiSmmCore/Smi.c index 1111959c3a..816d0f5193 100644 --- a/MdeModulePkg/Core/PiSmmCore/Smi.c +++ b/MdeModulePkg/Core/PiSmmCore/Smi.c @@ -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 @@ SmiManage ( 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 @@ SmiManage ( 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 @@ SmiManage ( 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 @@ SmiManage ( // 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 @@ SmiManage ( }
}
- if (InterruptQuiesced) {
+ if (SuccessReturn) {
Status = EFI_SUCCESS;
}
|