From 876ac39540251437b69809fbea4fc8ed3bee57ca Mon Sep 17 00:00:00 2001 From: sfu5 Date: Tue, 17 Jul 2012 08:21:42 +0000 Subject: Return EFI_UNSUPPORTED if READY_TO_BOOT function is invoked at SMM runtime. Signed-off-by: Fu Siyuan Reviewed-by: Dong Guo Reviewed-by: Ye Ting git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13535 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'MdeModulePkg') diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.c index f11300b96a..0a6c872baa 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.c +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.c @@ -513,6 +513,10 @@ SmmVariableHandler ( break; case SMM_VARIABLE_FUNCTION_READY_TO_BOOT: + if (AtRuntime()) { + Status = EFI_UNSUPPORTED; + break; + } ReclaimForOS (); Status = EFI_SUCCESS; break; -- cgit v1.2.3