]>
Commit | Line | Data |
---|---|---|
326598e9 JU |
1 | /** @file\r |
2 | Runtime DXE part corresponding to StanaloneMM variable module.\r | |
3 | \r | |
4 | This module installs variable arch protocol and variable write arch protocol\r | |
5 | to StandaloneMM runtime variable service.\r | |
6 | \r | |
7 | Copyright (c) 2019, ARM Ltd. All rights reserved.\r | |
8 | \r | |
9 | This program and the accompanying materials\r | |
10 | are licensed and made available under the terms and conditions of the BSD License\r | |
11 | which accompanies this distribution. The full text of the license may be found at\r | |
12 | http://opensource.org/licenses/bsd-license.php.\r | |
13 | \r | |
14 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
15 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
16 | \r | |
17 | **/\r | |
18 | \r | |
19 | #include <Library/DebugLib.h>\r | |
20 | #include <Library/UefiBootServicesTableLib.h>\r | |
21 | \r | |
22 | /**\r | |
23 | The constructor function installs variable arch protocol and variable\r | |
24 | write arch protocol to StandaloneMM runtime variable service\r | |
25 | \r | |
26 | @param ImageHandle The firmware allocated handle for the EFI image.\r | |
27 | @param SystemTable A pointer to the Management mode System Table.\r | |
28 | \r | |
29 | @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.\r | |
30 | \r | |
31 | **/\r | |
32 | EFI_STATUS\r | |
33 | EFIAPI\r | |
34 | VariableMmDependencyLibConstructor (\r | |
35 | IN EFI_HANDLE ImageHandle,\r | |
36 | IN EFI_SYSTEM_TABLE *SystemTable\r | |
37 | )\r | |
38 | {\r | |
39 | EFI_STATUS Status;\r | |
40 | EFI_HANDLE Handle;\r | |
41 | \r | |
42 | Handle = NULL;\r | |
43 | Status = gBS->InstallMultipleProtocolInterfaces (\r | |
44 | &Handle,\r | |
45 | &gEfiSmmVariableProtocolGuid,\r | |
46 | NULL,\r | |
47 | &gSmmVariableWriteGuid,\r | |
48 | NULL,\r | |
49 | NULL\r | |
50 | );\r | |
51 | ASSERT_EFI_ERROR (Status);\r | |
52 | return EFI_SUCCESS;\r | |
53 | }\r |