]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/StandaloneMmServicesTableLib/StandaloneMmServicesTableLib.c
b870f25fcfeda87ad6cf1190d4efa36746d83afc
[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 This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php.
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14 **/
15
16 #include <PiMm.h>
17 #include <Library/MmServicesTableLib.h>
18 #include <Library/DebugLib.h>
19
20 EFI_MM_SYSTEM_TABLE *gMmst = NULL;
21
22 /**
23 The constructor function caches the pointer of the MM Services Table.
24
25 @param ImageHandle The firmware allocated handle for the EFI image.
26 @param SystemTable A pointer to the EFI System Table.
27
28 @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.
29
30 **/
31 EFI_STATUS
32 EFIAPI
33 StandaloneMmServicesTableLibConstructor (
34 IN EFI_HANDLE ImageHandle,
35 IN EFI_MM_SYSTEM_TABLE *MmSystemTable
36 )
37 {
38 gMmst = MmSystemTable;
39 ASSERT (gMmst != NULL);
40 return EFI_SUCCESS;
41 }