]>
Commit | Line | Data |
---|---|---|
008eeb50 JY |
1 | /** @file\r |
2 | SMM Core SMM Services Table Library.\r | |
3 | \r | |
d1102dba | 4 | Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r |
9d510e61 | 5 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
008eeb50 JY |
6 | \r |
7 | **/\r | |
8 | \r | |
9 | #include <PiSmm.h>\r | |
10 | #include <Library/SmmServicesTableLib.h>\r | |
11 | #include <Library/DebugLib.h>\r | |
12 | \r | |
13 | EFI_SMM_SYSTEM_TABLE2 *gSmst = NULL;\r | |
14 | extern EFI_SMM_SYSTEM_TABLE2 gSmmCoreSmst;\r | |
15 | \r | |
16 | /**\r | |
17 | The constructor function caches the pointer of SMM Services Table.\r | |
18 | \r | |
19 | @param ImageHandle The firmware allocated handle for the EFI image.\r | |
20 | @param SystemTable A pointer to the EFI System Table.\r | |
21 | \r | |
22 | @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.\r | |
23 | \r | |
24 | **/\r | |
25 | EFI_STATUS\r | |
26 | EFIAPI\r | |
27 | SmmCoreSmmServicesTableLibConstructor (\r | |
28 | IN EFI_HANDLE ImageHandle,\r | |
29 | IN EFI_SYSTEM_TABLE *SystemTable\r | |
30 | )\r | |
31 | {\r | |
32 | gSmst = &gSmmCoreSmst;\r | |
33 | return EFI_SUCCESS;\r | |
34 | }\r | |
be91c770 LG |
35 | \r |
36 | /**\r | |
d1102dba | 37 | This function allows the caller to determine if the driver is executing in\r |
be91c770 LG |
38 | System Management Mode(SMM).\r |
39 | \r | |
d1102dba | 40 | This function returns TRUE if the driver is executing in SMM and FALSE if the\r |
be91c770 LG |
41 | driver is not executing in SMM.\r |
42 | \r | |
43 | @retval TRUE The driver is executing in System Management Mode (SMM).\r | |
d1102dba | 44 | @retval FALSE The driver is not executing in System Management Mode (SMM).\r |
be91c770 LG |
45 | \r |
46 | **/\r | |
47 | BOOLEAN\r | |
48 | EFIAPI\r | |
49 | InSmm (\r | |
50 | VOID\r | |
51 | )\r | |
52 | {\r | |
53 | return TRUE;\r | |
54 | }\r |