mirror_edk2/MdeModulePkg/Library/PiDxeS3BootScriptLib
Star Zeng cfd79783d6 MdeModulePkg DxeS3BootScriptLib: Add DESTRUCTOR S3BootScriptLibDeinitialize
PiDxeS3BootScriptLib has a constructor S3BootScriptLibInitialize() that
registers ready-to-lock callback S3BootScriptSmmEventCallBack() and several
more. The library is linked to SMM modules. If the module entry-point
function returns error (because of lack of resources, unsupported,
whatever), the module will be unloaded and the notify callback pointers
will point to undefined memory. On ready-to-lock exception occurs when
calling S3BootScriptSmmEventCallBack(), and probably all the other
callbacks registered by the constructor would also cause exception.

This patch is to implement library Destructor to free the resources
allocated by S3BootScriptLibInitialize() and unregister callbacks.

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>
2016-06-07 10:01:10 +08:00
..
BootScriptExecute.c MdeModulePkg PiDxeS3BootScriptLib: Initialize the EFI_BOOT_SCRIPT_TABLE_HEADER.Version. 2015-04-13 01:56:57 +00:00
BootScriptInternalFormat.h MdeModulePkg PiDxeS3BootScriptLib: Initialize the EFI_BOOT_SCRIPT_TABLE_HEADER.Version. 2015-04-13 01:56:57 +00:00
BootScriptSave.c MdeModulePkg DxeS3BootScriptLib: Add DESTRUCTOR S3BootScriptLibDeinitialize 2016-06-07 10:01:10 +08:00
DxeS3BootScriptLib.inf MdeModulePkg DxeS3BootScriptLib: Add DESTRUCTOR S3BootScriptLibDeinitialize 2016-06-07 10:01:10 +08:00
DxeS3BootScriptLib.uni MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
InternalBootScriptLib.h MdeModulePkg PiDxeS3BootScriptLib: Remove a hidden assumption. 2015-09-15 07:49:12 +00:00