Branch: refs/heads/master Home: https://github.com/tianocore/edk2 Commit: 77d6772708541a2ddf093af79816dd1831581388 https://github.com/tianocore/edk2/commit/77d6772708541a2ddf093af79816dd1831581388 Author: lijun10x <junx1...@intel.com> Date: 2023-02-15 (Wed, 15 Feb 2023)
Changed paths: M MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptSave.c Log Message: ----------- MdeModulePkg/Library: PcdAcpiS3Enable set FALSE cause Assert Some platforms don't support S3 with PcdAcpiS3Enable set as False. Debug mode bios will ASSERT at this time as Follows. ASSERT_RETURN_ERROR (Status = Out of Resources) DXE_ASSERT!: Edk2\MdePkg\Library\BaseS3PciSegmentLib\S3PciSegmentLib.c (61): !(((INTN)(RETURN_STATUS)(Status)) < 0) Steps to reproduce the issue: 1.Set PcdAcpiS3Enable to FALSE. 2.Build the bios in debug mode. 3.Power on and Check the serial log. Note: Prerequisite is that S3PciSegmentLib is Called and the caller's code is run. Root Cause: S3PciSegmentLib call S3BootScriptLib controlled by PcdAcpiS3Enable. If PcdAcpiS3Enable set as false, S3BootScriptLib will return error status(Out of Resources). S3PciSegmentLib will ASSERT if S3BootScriptLib return error. Solution: Make S3BootScriptLib return success if PcdAcpiS3Enable was disabled, which behave as a null S3BootScriptLib instance which just return success for no action is required to do. Signed-off-by: JunX1 Li <junx1...@intel.com> Cc: Liming Gao <gaolim...@byosoft.com.cn> Cc: Sunny Wang <sunny.w...@arm.com> Cc: Heinrich Schuchardt <heinrich.schucha...@canonical.com> Cc: G Edhaya Chandran <edhaya.chand...@arm.com> Cc: Samer El-Haj-Mahmoud <samer.el-haj-mahm...@arm.com> Reviewed-by: Liming Gao <gaolim...@byosoft.com.cn> _______________________________________________ edk2-commits mailing list edk2-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-commits