mirror of https://github.com/acidanthera/audk.git
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
This commit is contained in:
parent
95a411abe4
commit
510ed4312f
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue