mirror_edk2/StandaloneMmPkg/Library/VariableMmDependency/VariableMmDependency.c
Michael D Kinney 86094561f6 StandaloneMmPkg: Replace BSD License with BSD+Patent License
https://bugzilla.tianocore.org/show_bug.cgi?id=1373

Replace BSD 2-Clause License with BSD+Patent License.  This change is
based on the following emails:

  https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html
  https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html

RFCs with detailed process for the license change:

  V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html
  V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html
  V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
2019-04-09 10:58:27 -07:00

48 lines
1.3 KiB
C

/** @file
Runtime DXE part corresponding to StanaloneMM variable module.
This module installs variable arch protocol and variable write arch protocol
to StandaloneMM runtime variable service.
Copyright (c) 2019, ARM Ltd. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#include <Library/DebugLib.h>
#include <Library/UefiBootServicesTableLib.h>
/**
The constructor function installs variable arch protocol and variable
write arch protocol to StandaloneMM runtime variable service
@param ImageHandle The firmware allocated handle for the EFI image.
@param SystemTable A pointer to the Management mode System Table.
@retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.
**/
EFI_STATUS
EFIAPI
VariableMmDependencyLibConstructor (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
{
EFI_STATUS Status;
EFI_HANDLE Handle;
Handle = NULL;
Status = gBS->InstallMultipleProtocolInterfaces (
&Handle,
&gEfiSmmVariableProtocolGuid,
NULL,
&gSmmVariableWriteGuid,
NULL,
NULL
);
ASSERT_EFI_ERROR (Status);
return EFI_SUCCESS;
}