MdeModulePkg LockBoxLib: Support LOCK_BOX_ATTRIBUTE_RESTORE_IN_S3_ONLY

With this flag, the LockBox can be restored in S3 resume only.
The LockBox can not be restored after SmmReadyToLock in normal boot
and after EndOfS3Resume in S3 resume.
It can not be set together with LOCK_BOX_ATTRIBUTE_RESTORE_IN_PLACE.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
(cherry picked from commit 6bd4af305d)
This commit is contained in:
Star Zeng
2018-02-11 10:01:21 +08:00
parent aa512b0eb4
commit 320449821c
4 changed files with 247 additions and 8 deletions

View File

@ -1,7 +1,7 @@
## @file
# SMM LockBox library instance.
#
# Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>
# Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions
@ -44,7 +44,15 @@
BaseLib
DebugLib
[Protocols]
gEfiSmmReadyToLockProtocolGuid ## NOTIFY
gEfiSmmEndOfDxeProtocolGuid ## NOTIFY
gEfiSmmSxDispatch2ProtocolGuid ## NOTIFY
[Guids]
## SOMETIMES_CONSUMES ## UNDEFINED # SmmSystemTable
## SOMETIMES_PRODUCES ## UNDEFINED # SmmSystemTable
gEfiSmmLockBoxCommunicationGuid
## CONSUMES ## UNDEFINED # Protocol notify
gEdkiiEndOfS3ResumeGuid