]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Library/PiSmmCoreSmmServicesTableLib/PiSmmCoreSmmServicesTableLib.c
MdeModulePkg/BootLogoLib: Remove invalid if judgments
[mirror_edk2.git] / MdeModulePkg / Library / PiSmmCoreSmmServicesTableLib / PiSmmCoreSmmServicesTableLib.c
CommitLineData
008eeb50
JY
1/** @file\r
2 SMM Core SMM Services Table Library.\r
3\r
be91c770 4 Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>\r
cd5ebaa0 5 This program and the accompanying materials\r
008eeb50
JY
6 are licensed and made available under the terms and conditions of the BSD License\r
7 which accompanies this distribution. The full text of the license may be found at\r
8 http://opensource.org/licenses/bsd-license.php\r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
15#include <PiSmm.h>\r
16#include <Library/SmmServicesTableLib.h>\r
17#include <Library/DebugLib.h>\r
18\r
19EFI_SMM_SYSTEM_TABLE2 *gSmst = NULL;\r
20extern EFI_SMM_SYSTEM_TABLE2 gSmmCoreSmst;\r
21\r
22/**\r
23 The constructor function caches the pointer of SMM Services Table.\r
24\r
25 @param ImageHandle The firmware allocated handle for the EFI image.\r
26 @param SystemTable A pointer to the EFI System Table.\r
27\r
28 @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.\r
29\r
30**/\r
31EFI_STATUS\r
32EFIAPI\r
33SmmCoreSmmServicesTableLibConstructor (\r
34 IN EFI_HANDLE ImageHandle,\r
35 IN EFI_SYSTEM_TABLE *SystemTable\r
36 )\r
37{\r
38 gSmst = &gSmmCoreSmst;\r
39 return EFI_SUCCESS;\r
40}\r
be91c770
LG
41\r
42/**\r
43 This function allows the caller to determine if the driver is executing in \r
44 System Management Mode(SMM).\r
45\r
46 This function returns TRUE if the driver is executing in SMM and FALSE if the \r
47 driver is not executing in SMM.\r
48\r
49 @retval TRUE The driver is executing in System Management Mode (SMM).\r
50 @retval FALSE The driver is not executing in System Management Mode (SMM). \r
51\r
52**/\r
53BOOLEAN\r
54EFIAPI\r
55InSmm (\r
56 VOID\r
57 )\r
58{\r
59 return TRUE;\r
60}\r