SmmLockBoxSmmLib is linked to SMM modules. If the module entry-point function returns error, the module will be unloaded and the global variables will point to undefined memory. This patch is to add DESTRUCTOR SmmLockBoxSmmDestructor to uninstall SmmLockBoxCommunication configuration table if it has been installed in Constructor. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Laszlo Ersek <lersek@redhat.com>
51 lines
1.5 KiB
INI
51 lines
1.5 KiB
INI
## @file
|
|
# SMM LockBox library instance.
|
|
#
|
|
# Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>
|
|
#
|
|
# This program and the accompanying materials
|
|
# are licensed and made available under the terms and conditions
|
|
# of the BSD License which accompanies this distribution. The
|
|
# full text of the license may be found at
|
|
# http://opensource.org/licenses/bsd-license.php
|
|
#
|
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
#
|
|
##
|
|
|
|
[Defines]
|
|
INF_VERSION = 0x00010005
|
|
BASE_NAME = SmmLockBoxSmmLib
|
|
MODULE_UNI_FILE = SmmLockBoxSmmLib.uni
|
|
FILE_GUID = E04894D6-290D-4171-A362-0ACFD939F3C8
|
|
MODULE_TYPE = DXE_SMM_DRIVER
|
|
VERSION_STRING = 1.0
|
|
LIBRARY_CLASS = LockBoxLib|DXE_SMM_DRIVER
|
|
CONSTRUCTOR = SmmLockBoxSmmConstructor
|
|
DESTRUCTOR = SmmLockBoxSmmDestructor
|
|
|
|
#
|
|
# The following information is for reference only and not required by the build tools.
|
|
#
|
|
# VALID_ARCHITECTURES = IA32 X64
|
|
#
|
|
|
|
[Sources]
|
|
SmmLockBoxSmmLib.c
|
|
SmmLockBoxLibPrivate.h
|
|
|
|
[Packages]
|
|
MdePkg/MdePkg.dec
|
|
MdeModulePkg/MdeModulePkg.dec
|
|
|
|
[LibraryClasses]
|
|
SmmServicesTableLib
|
|
BaseLib
|
|
DebugLib
|
|
|
|
[Guids]
|
|
## SOMETIMES_CONSUMES ## UNDEFINED # SmmSystemTable
|
|
## SOMETIMES_PRODUCES ## UNDEFINED # SmmSystemTable
|
|
gEfiSmmLockBoxCommunicationGuid
|