Acidanthera UEFI Development Kit based on EDK II edk2-stable202311
Go to file
Hao Wu 4fa7306bf5 MdeModulePkg/SmmLockBox(PEI): Remove an ASSERT in RestoreLockBox()
This commit is out of the scope for BZ-1409. It is a refinement for the
PEI library instance within SmmLockBoxLib.

For the below ASSERT statement within function RestoreLockBox():
  Status = SmmCommunicationPpi->Communicate (
                                  SmmCommunicationPpi,
                                  &CommBuffer[0],
                                  &CommSize
                                  );
  if (Status == EFI_NOT_STARTED) {
    //
    // Pei SMM communication not ready yet, so we access SMRAM directly
    //
    DEBUG ((DEBUG_INFO, "SmmLockBoxPeiLib Communicate - (%r)\n", Status));
    Status = InternalRestoreLockBoxFromSmram (Guid, Buffer, Length);
    LockBoxParameterRestore->Header.ReturnStatus = (UINT64)Status;
    if (Length != NULL) {
      LockBoxParameterRestore->Length = (UINT64)*Length;
    }
  }
  ASSERT_EFI_ERROR (Status);

It is possible for previous codes to return an error status that is
possible for happen. One example is that, when the 'if' statement
'if (Status == EFI_NOT_STARTED) {' is entered, function
InternalRestoreLockBoxFromSmram() is possible to return 'BUFFER_TOO_SMALL'
if the caller of RestoreLockBox() provides a buffer that is too small to
hold the content of LockBox.

Thus, this commit will remove the ASSERT here.

Please note that the current implementation of RestoreLockBox() is
handling the above-mentioned error case properly, so no additional error
handling codes are needed here.

Cc: Jian J Wang <jian.j.wang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
2019-02-22 08:20:08 +08:00
AppPkg AppPkg: fix webserver build for !Ia32/X64 2019-02-04 17:07:47 +00:00
ArmPkg ArmPkg/ArmMmuLib AARCH64: get rid of needless TLB invalidation 2019-01-29 11:24:02 +01:00
ArmPlatformPkg ArmPlatformPkg/PL011SerialPortLib: use untyped PCD for register base 2018-12-20 18:34:08 +01:00
ArmVirtPkg ArmVirtPkg/ArmVirtXen: don't set Pcd*ImageVerificationPolicy 2019-02-13 07:10:26 +01:00
BaseTools BaseTools:PCD value error in structure pcd sku case. 2019-02-20 13:16:58 +08:00
BeagleBoardPkg BeagleBoardPkg: Use merged variable driver for emulated NV mode 2019-01-24 10:52:40 +08:00
Conf
CorebootModulePkg CorebootModulePkg: Fix various typos 2019-02-12 10:48:39 +08:00
CorebootPayloadPkg CorebootPayloadPkg: Fix various typos 2019-02-12 10:28:46 +08:00
CryptoPkg CryptoPkg: Fix various typos 2019-02-11 11:09:44 +08:00
DynamicTablesPkg DynamicTablesPkg: Arm IORT Table Generator 2019-02-19 10:37:31 +00:00
EdkCompatibilityPkg EdkCompatibilityPkg: Removing ipf from edk2. 2018-09-25 23:43:46 +08:00
EmbeddedPkg EmbeddedPkg/Library: Add VirtualRealTimeClockLib 2019-02-15 11:07:08 +01:00
EmulatorPkg EmulatorPkg: require GCC48 or later 2019-01-08 02:34:05 +01:00
FatPkg FatPkg/FatPei/Gpt.c: Fix uninitialized variable issue 2019-02-02 21:41:15 +08:00
FmpDevicePkg FmpDevicePkg DSC: Add NOOPT target to verify NOOPT target 2018-10-31 22:08:10 +08:00
IntelFrameworkModulePkg IntelFrameworkModulePkg: fix build for AARCH64/ARM 2019-02-04 17:08:30 +00:00
IntelFrameworkPkg IntelFrameworkPkg: fix build for AARCH64/ARM 2019-02-04 17:09:11 +00:00
IntelFsp2Pkg IntelFsp2Pkg: FSP can utilize bootloader stack 2019-01-28 15:49:13 +08:00
IntelFsp2WrapperPkg IntelFsp2WrapperPkg: Fix constant if statements issue 2018-11-26 11:40:38 +08:00
IntelFspPkg edk2: Move License.txt file to root 2017-08-03 11:02:17 -07:00
IntelFspWrapperPkg edk2: Move License.txt file to root 2017-08-03 11:02:17 -07:00
IntelSiliconPkg IntelSiliconPkg/MicrocodeUpdateDxe: Error message enhancement 2019-02-20 11:21:37 +08:00
MdeModulePkg MdeModulePkg/SmmLockBox(PEI): Remove an ASSERT in RestoreLockBox() 2019-02-22 08:20:08 +08:00
MdePkg MdePkg/UefiDevicePathLibDevicePathProtocol: Add sanity check for FilePath device path 2019-02-21 20:54:31 +08:00
NetworkPkg NetworkPkg/Ip6Dxe: Clean the invalid IPv6 configuration during driver start. 2019-02-19 08:31:15 +08:00
Nt32Pkg Nt32Pkg: Remove EdkShellBinPkg in FDF and DEC 2018-11-19 10:50:15 +08:00
Omap35xxPkg Omap35xxPkg: Removing ipf which is no longer supported from edk2. 2018-06-29 16:19:46 +08:00
OptionRomPkg OptionRomPkg/ReadMe.txt: Remove VS2005 2019-02-14 15:40:26 +08:00
OvmfPkg OvmfPkg/build.sh: Enable flash for qemu 3 or later 2019-02-19 01:19:32 -08:00
PcAtChipsetPkg PcAtChipsetPkg PcRtc: Use new EfiLocateFirstAcpiTable() 2018-09-27 14:25:35 +08:00
QuarkPlatformPkg QuarkMin: Use merged variable driver for emulated NV mode 2019-01-24 10:52:40 +08:00
QuarkSocPkg QuarkSocPkg: Removing ipf which is no longer supported from edk2. 2018-08-14 08:58:32 +08:00
SecurityPkg SecurityPkg/TcgConfigDxe: Allow enabling TPM 1.2 device from disabled state. 2019-02-20 21:44:14 +08:00
ShellBinPkg ShellBinPkg: Clean up source files 2018-06-28 11:19:51 +08:00
ShellPkg ShellPkg/UefiShellLib: Use BaseLib api CharToUpper 2019-01-31 20:19:20 +08:00
SignedCapsulePkg SignedCapsulePkg: enable package build for AARCH64/ARM 2019-02-04 17:09:17 +00:00
SourceLevelDebugPkg SourceLevelDebugPkg/Readme.txt: Update UDK Debugger Tool & manual URL 2018-11-08 12:00:34 +08:00
StandaloneMmPkg StandaloneMmPkg/StandaloneMmCoreEntryPoint: permit the use of TE images 2019-01-21 14:43:12 +01:00
StdLib StdLib/Environs: Avoid infinite recursion in _Exit 2019-01-02 11:26:21 -08:00
StdLibPrivateInternalFiles StdLibPrivateInternalFiles: Removing ipf from edk2. 2018-06-29 16:19:51 +08:00
UefiCpuPkg UefiCpuPkg/Microcode: Fix incorrect checksum issue for extended table 2019-02-21 16:16:56 +08:00
Vlv2DeviceRefCodePkg edk2: Move License.txt file to root 2017-08-03 11:02:17 -07:00
Vlv2TbltDevicePkg Vlv2TbltDevicePkg: add MmServicesTableLib resolution 2019-01-16 20:10:51 +01:00
.gitignore
.gitmodules CryptoPkg: Adding OpenSSL as one submodule of EDKII repo 2018-01-18 14:06:15 +08:00
BuildNotes2.txt BaseTools: Various typo 2019-02-14 10:02:28 +08:00
Contributions.txt BaseTools: Various typo 2019-02-14 10:02:28 +08:00
License.txt edk2: Move License.txt file to root 2017-08-03 11:02:17 -07:00
Maintainers.txt Maintainers: specify the scope for OvmfPkg/ArmVirtPkg Xen module reviewers 2019-02-21 20:40:27 +01:00
Readme.md Readme.md: Add edk2 release tag and edk2 release plan 2018-12-20 23:31:47 +08:00
edksetup.bat BaseTools: Various typo 2019-02-14 10:02:28 +08:00
edksetup.sh BaseTools: Update PYTHON env to PYTHON_COMMAND 2019-02-01 11:09:23 +08:00

Readme.md

EDK II Project

A modern, feature-rich, cross-platform firmware development environment for the UEFI and PI specifications from www.uefi.org.

Contributions to the EDK II open source project are covered by the TianoCore Contribution Agreement 1.1

The majority of the content in the EDK II open source project uses a BSD 2-Clause License. The EDK II open source project contains the following components that are covered by additional licenses:

The EDK II Project is composed of packages. The maintainers for each package are listed in Maintainers.txt.

Resources