]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/StandaloneMmServicesTableLib/StandaloneMmServicesTableLib.c
e3f677db19c08bfa49bd82dcababc6d6f8a94591
[mirror_edk2.git] / MdePkg / Library / StandaloneMmServicesTableLib / StandaloneMmServicesTableLib.c
1 /** @file
2 MM Services Table Library.
3
4 Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
5 Copyright (c) 2018, Linaro, Ltd. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7
8 **/
9
10 #include <PiMm.h>
11 #include <Library/MmServicesTableLib.h>
12 #include <Library/DebugLib.h>
13
14 EFI_MM_SYSTEM_TABLE *gMmst = NULL;
15
16 /**
17 The constructor function caches the pointer of the MM Services Table.
18
19 @param ImageHandle The firmware allocated handle for the EFI image.
20 @param MmSystemTable A pointer to the MM System Table.
21
22 @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.
23
24 **/
25 EFI_STATUS
26 EFIAPI
27 StandaloneMmServicesTableLibConstructor (
28 IN EFI_HANDLE ImageHandle,
29 IN EFI_MM_SYSTEM_TABLE *MmSystemTable
30 )
31 {
32 gMmst = MmSystemTable;
33 ASSERT (gMmst != NULL);
34 return EFI_SUCCESS;
35 }