]>
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 |
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 | |
19 | EFI_SMM_SYSTEM_TABLE2 *gSmst = NULL;\r | |
20 | extern 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 | |
31 | EFI_STATUS\r | |
32 | EFIAPI\r | |
33 | SmmCoreSmmServicesTableLibConstructor (\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 | |
d1102dba | 43 | This function allows the caller to determine if the driver is executing in\r |
be91c770 LG |
44 | System Management Mode(SMM).\r |
45 | \r | |
d1102dba | 46 | This function returns TRUE if the driver is executing in SMM and FALSE if the\r |
be91c770 LG |
47 | driver is not executing in SMM.\r |
48 | \r | |
49 | @retval TRUE The driver is executing in System Management Mode (SMM).\r | |
d1102dba | 50 | @retval FALSE The driver is not executing in System Management Mode (SMM).\r |
be91c770 LG |
51 | \r |
52 | **/\r | |
53 | BOOLEAN\r | |
54 | EFIAPI\r | |
55 | InSmm (\r | |
56 | VOID\r | |
57 | )\r | |
58 | {\r | |
59 | return TRUE;\r | |
60 | }\r |