Return EFI_UNSUPPORTED if READY_TO_BOOT function is invoked at SMM runtime.

Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Dong Guo <guo.dong@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13535 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
sfu5 2012-07-17 08:21:42 +00:00
parent eb96e4f281
commit 876ac39540
3 changed files with 10 additions and 2 deletions

View File

@ -513,6 +513,10 @@ SmmVariableHandler (
break;
case SMM_VARIABLE_FUNCTION_READY_TO_BOOT:
if (AtRuntime()) {
Status = EFI_UNSUPPORTED;
break;
}
ReclaimForOS ();
Status = EFI_SUCCESS;
break;

View File

@ -2528,8 +2528,8 @@ VariableServiceQueryVariableInfo (
/**
This function reclaims variable storage if free size is below the threshold.
Caution: This function may be invoked at SMM runtime.
Care must be taken to make sure not security issue at runtime.
Caution: This function may be invoked at SMM mode.
Care must be taken to make sure not security issue.
**/
VOID

View File

@ -519,6 +519,10 @@ SmmVariableHandler (
break;
case SMM_VARIABLE_FUNCTION_READY_TO_BOOT:
if (AtRuntime()) {
Status = EFI_UNSUPPORTED;
break;
}
ReclaimForOS ();
Status = EFI_SUCCESS;
break;