]> git.proxmox.com Git - mirror_edk2.git/blob - StandaloneMmPkg/Library/VariableMmDependency/VariableMmDependency.c
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / StandaloneMmPkg / Library / VariableMmDependency / VariableMmDependency.c
1 /** @file
2 Runtime DXE part corresponding to StanaloneMM variable module.
3
4 This module installs variable arch protocol and variable write arch protocol
5 to StandaloneMM runtime variable service.
6
7 Copyright (c) 2019, ARM Ltd. All rights reserved.
8
9 SPDX-License-Identifier: BSD-2-Clause-Patent
10
11 **/
12
13 #include <Library/DebugLib.h>
14 #include <Library/UefiBootServicesTableLib.h>
15
16 /**
17 The constructor function installs variable arch protocol and variable
18 write arch protocol to StandaloneMM runtime variable service
19
20 @param ImageHandle The firmware allocated handle for the EFI image.
21 @param SystemTable A pointer to the Management mode System Table.
22
23 @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.
24
25 **/
26 EFI_STATUS
27 EFIAPI
28 VariableMmDependencyLibConstructor (
29 IN EFI_HANDLE ImageHandle,
30 IN EFI_SYSTEM_TABLE *SystemTable
31 )
32 {
33 EFI_STATUS Status;
34 EFI_HANDLE Handle;
35
36 Handle = NULL;
37 Status = gBS->InstallMultipleProtocolInterfaces (
38 &Handle,
39 &gEfiSmmVariableProtocolGuid,
40 NULL,
41 &gSmmVariableWriteGuid,
42 NULL,
43 NULL
44 );
45 ASSERT_EFI_ERROR (Status);
46 return EFI_SUCCESS;
47 }