From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web08.22794.1628516439229144048 for ; Mon, 09 Aug 2021 06:40:39 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@linux.microsoft.com header.s=default header.b=E2p4lW2C; spf=pass (domain: linux.microsoft.com, ip: 13.77.154.182, mailfrom: mikuback@linux.microsoft.com) Received: from localhost.localdomain (unknown [167.220.2.74]) by linux.microsoft.com (Postfix) with ESMTPSA id 9F7F420B36EA; Mon, 9 Aug 2021 06:40:38 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 9F7F420B36EA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1628516438; bh=azTkTasYB701cxksMpgdEngHWdLEFL1IjoIst9LHfX0=; h=From:To:Cc:Subject:Date:From; b=E2p4lW2CM6Q4E+N1UBITWWKOK1olgHmdc2E79UhOBpfeOcSyw6erT44/ycEevEsO5 2S8Npydrqiwj4OGqL5lytnOg5MUBSY16sTOSdZjO5i8qk8VxBl4Uriz0I5QCG29G2K yzPHpXoOz+0v6hywei8CqddtojlOzmxaPfSbjZ6Q= From: "Michael Kubacki" To: devel@edk2.groups.io Cc: Ray Ni , Rangasai V Chaganty Subject: [edk2-platforms][PATCH v1 1/1] IntelSiliconPkg/PeiSmmAccessLib: Remove S3 requirement Date: Mon, 9 Aug 2021 09:39:38 -0400 Message-Id: <20210809133938.2430-1-mikuback@linux.microsoft.com> X-Mailer: git-send-email 2.28.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Kubacki REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D3539 PeiInstallSmmAccessPpi() currently requires the boot mode be set to S3 to actually install gEfiPeiMmAccessPpiGuid. This change removes this requirement in the function implementation for two reasons: 1. Practical use cases exist to require this PPI in cases other than the boot mode being set to BOOT_ON_S3_RESUME. 2. It is poor API design to implicitly bury this requirement within a function whose responsibility is to install the PPI. The caller can easily place arbitrary constraints around whether to call based on conditions such as the boot mode being BOOT_ON_S3_RESUME. Cc: Ray Ni Cc: Rangasai V Chaganty Signed-off-by: Michael Kubacki --- Silicon/Intel/IntelSiliconPkg/Feature/SmmAccess/Library/PeiSmmAccessLib/= PeiSmmAccessLib.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/SmmAccess/Library/PeiS= mmAccessLib/PeiSmmAccessLib.c b/Silicon/Intel/IntelSiliconPkg/Feature/Smm= Access/Library/PeiSmmAccessLib/PeiSmmAccessLib.c index d9bf4fba983e..4df0d695fdaf 100644 --- a/Silicon/Intel/IntelSiliconPkg/Feature/SmmAccess/Library/PeiSmmAcces= sLib/PeiSmmAccessLib.c +++ b/Silicon/Intel/IntelSiliconPkg/Feature/SmmAccess/Library/PeiSmmAcces= sLib/PeiSmmAccessLib.c @@ -252,19 +252,7 @@ PeiInstallSmmAccessPpi ( EFI_SMRAM_HOB_DESCRIPTOR_BLOCK *DescriptorBlock; SMM_ACCESS_PRIVATE_DATA *SmmAccessPrivate; VOID *HobList; - EFI_BOOT_MODE BootMode; =20 - Status =3D PeiServicesGetBootMode (&BootMode); - if (EFI_ERROR (Status)) { - // - // If not in S3 boot path. do nothing - // - return EFI_SUCCESS; - } - - if (BootMode !=3D BOOT_ON_S3_RESUME) { - return EFI_SUCCESS; - } // // Initialize private data // --=20 2.28.0.windows.1