From: Gao, Liming Date: Wed, 5 Nov 2014 12:09:22 +0000 (+0000) Subject: MdeModulePkg: Add InSmm() API in PiSmmCoreSmmServicesTableLib instance X-Git-Tag: edk2-stable201903~10709 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=be91c7706958e822885ebec36b48483b142755cd;p=mirror_edk2.git MdeModulePkg: Add InSmm() API in PiSmmCoreSmmServicesTableLib instance Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gao, Liming Reviewed-by: Fan, Jeff git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16301 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/MdeModulePkg/Library/PiSmmCoreSmmServicesTableLib/PiSmmCoreSmmServicesTableLib.c b/MdeModulePkg/Library/PiSmmCoreSmmServicesTableLib/PiSmmCoreSmmServicesTableLib.c index 1c81afdf6e..788fafae35 100644 --- a/MdeModulePkg/Library/PiSmmCoreSmmServicesTableLib/PiSmmCoreSmmServicesTableLib.c +++ b/MdeModulePkg/Library/PiSmmCoreSmmServicesTableLib/PiSmmCoreSmmServicesTableLib.c @@ -1,7 +1,7 @@ /** @file SMM Core SMM Services Table Library. - Copyright (c) 2010, Intel Corporation. All rights reserved.
+ Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.
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 @@ -38,3 +38,23 @@ SmmCoreSmmServicesTableLibConstructor ( gSmst = &gSmmCoreSmst; return EFI_SUCCESS; } + +/** + This function allows the caller to determine if the driver is executing in + System Management Mode(SMM). + + This function returns TRUE if the driver is executing in SMM and FALSE if the + driver is not executing in SMM. + + @retval TRUE The driver is executing in System Management Mode (SMM). + @retval FALSE The driver is not executing in System Management Mode (SMM). + +**/ +BOOLEAN +EFIAPI +InSmm ( + VOID + ) +{ + return TRUE; +}