From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: rangasai.v.chaganty@intel.com) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by groups.io with SMTP; Tue, 10 Sep 2019 20:21:11 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Sep 2019 20:21:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,491,1559545200"; d="scan'208";a="187055712" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga003.jf.intel.com with ESMTP; 10 Sep 2019 20:21:09 -0700 Received: from fmsmsx154.amr.corp.intel.com (10.18.116.70) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 10 Sep 2019 20:21:09 -0700 Received: from fmsmsx104.amr.corp.intel.com ([169.254.3.101]) by FMSMSX154.amr.corp.intel.com ([169.254.6.73]) with mapi id 14.03.0439.000; Tue, 10 Sep 2019 20:21:09 -0700 From: "Chaganty, Rangasai V" To: "Chen, Marc W" , "devel@edk2.groups.io" CC: "Kubacki, Michael A" , "Gao, Liming" Subject: Re: [edk2-platforms][PATCH V5] AdvancedFeaturePkg/S3: Add S3 PEIM driver Thread-Topic: [edk2-platforms][PATCH V5] AdvancedFeaturePkg/S3: Add S3 PEIM driver Thread-Index: AQHVaEhwS1FJnUi8bEi3MF34btnPxqclzxlw Date: Wed, 11 Sep 2019 03:21:09 +0000 Message-ID: References: <20190911022651.14196-1-marc.w.chen@intel.com> In-Reply-To: <20190911022651.14196-1-marc.w.chen@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiODQ1ZTNjM2ItNTgxMy00NTE5LWFmM2ItOTM0ZTJkODUwNjQxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiSkpLSkR2V2VcL0JtaGpsXC8zM2dJZzFGNjk0akdkTndLZmhQVlpJSEhEQXJOV3cyWkJyRzZ5djdvbURudlwvMHBsdSJ9 x-ctpclassification: CTP_NT x-originating-ip: [10.1.200.108] MIME-Version: 1.0 Return-Path: rangasai.v.chaganty@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Sai Chaganty =20 -----Original Message----- From: Chen, Marc W=20 Sent: Tuesday, September 10, 2019 7:27 PM To: devel@edk2.groups.io Cc: Kubacki, Michael A ; Chaganty, Rangasai V = ; Gao, Liming ; Chen, = Marc W Subject: [edk2-platforms][PATCH V5] AdvancedFeaturePkg/S3: Add S3 PEIM driv= er REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D2154 Implement a S3 PEIM driver for supporting S3 feature. So far this driver only install EFI_PEI_MM_ACCESS_PPI for S3 resume case. Cc: Michael Kubacki Cc: Sai Chaganty Cc: Liming Gao Signed-off-by: Marc Chen --- .../AdvancedFeaturePkg/AdvancedFeaturePkg.dsc | 2 ++ Platform/Intel/AdvancedFeaturePkg/S3/S3Pei.c | 36 ++++++++++++++++++= ++++ Platform/Intel/AdvancedFeaturePkg/S3/S3Pei.inf | 31 ++++++++++++++++++= + 3 files changed, 69 insertions(+) create mode 100644 Platform/Intel/AdvancedFeaturePkg/S3/S3Pei.c create mode 100644 Platform/Intel/AdvancedFeaturePkg/S3/S3Pei.inf diff --git a/Platform/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc b/Pla= tform/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc index a50952dd..2ab706c2 100644 --- a/Platform/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc +++ b/Platform/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc @@ -149,5 +149,7 @@ AdvancedFeaturePkg/Ipmi/BmcElog/BmcElog.inf AdvancedFeaturePkg/Ipmi/BmcAcpi/BmcAcpi.inf =20 + AdvancedFeaturePkg/S3/S3Pei.inf + [BuildOptions] *_*_*_CC_FLAGS =3D -D DISABLE_NEW_DEPRECATED_INTERFACES \ No newline at = end of file diff --git a/Platform/Intel/AdvancedFeaturePkg/S3/S3Pei.c b/Pla= tform/Intel/AdvancedFeaturePkg/S3/S3Pei.c new file mode 100644 index 00000000..b0aaa049 --- /dev/null +++ b/Platform/Intel/AdvancedFeaturePkg/S3/S3Pei.c @@ -0,0 +1,36 @@ +/** @file + Source code file for S3 PEI module + +Copyright (c) 2019, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include +#include + +/** + S3 PEI module entry point + + @param[in] FileHandle Not used. + @param[in] PeiServices General purpose services available to e= very PEIM. + + @retval EFI_SUCCESS The function completes successfully + @retval EFI_OUT_OF_RESOURCES Insufficient resources to create databa= se +**/ +EFI_STATUS +EFIAPI +S3PeiEntryPoint ( + IN EFI_PEI_FILE_HANDLE FileHandle, + IN CONST EFI_PEI_SERVICES **PeiServices + ) +{ + EFI_STATUS Status; + + // + // Install EFI_PEI_MM_ACCESS_PPI for S3 resume case // Status =3D=20 + PeiInstallSmmAccessPpi (); + + return Status; +} diff --git a/Platform/Intel/AdvancedFeaturePkg/S3/S3Pei.inf b/Platform/Inte= l/AdvancedFeaturePkg/S3/S3Pei.inf new file mode 100644 index 00000000..847edd20 --- /dev/null +++ b/Platform/Intel/AdvancedFeaturePkg/S3/S3Pei.inf @@ -0,0 +1,31 @@ +### @file +# Component information file for the S3 PEI module. +# +# Copyright (c) 2019, Intel Corporation. All rights reserved.
# #=20 +SPDX-License-Identifier: BSD-2-Clause-Patent # ### + +[Defines] + INF_VERSION =3D 0x00010017 + BASE_NAME =3D S3Pei + FILE_GUID =3D 8683EFB2-FDE1-4AFF-B2DB-E96449FDD4E9 + VERSION_STRING =3D 1.0 + MODULE_TYPE =3D PEIM + ENTRY_POINT =3D S3PeiEntryPoint + +[LibraryClasses] + PeimEntryPoint + PeiServicesLib + SmmAccessLib + +[Packages] + MdePkg/MdePkg.dec + IntelSiliconPkg/IntelSiliconPkg.dec + +[Sources] + S3Pei.c + +[Depex] + gEfiPeiMemoryDiscoveredPpiGuid -- 2.16.2.windows.1