From be91c7706958e822885ebec36b48483b142755cd Mon Sep 17 00:00:00 2001 From: "Gao, Liming" Date: Wed, 5 Nov 2014 12:09:22 +0000 Subject: [PATCH] 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 --- .../PiSmmCoreSmmServicesTableLib.c | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) 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; +}