From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.65; helo=mga03.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 7BCFE226CD782 for ; Wed, 11 Apr 2018 18:50:37 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Apr 2018 18:50:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,439,1517904000"; d="scan'208";a="32034720" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga008.fm.intel.com with ESMTP; 11 Apr 2018 18:50:37 -0700 Received: from fmsmsx154.amr.corp.intel.com (10.18.116.70) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 11 Apr 2018 18:50:36 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX154.amr.corp.intel.com (10.18.116.70) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 11 Apr 2018 18:50:36 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.239]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.43]) with mapi id 14.03.0319.002; Thu, 12 Apr 2018 09:50:34 +0800 From: "Gao, Liming" To: "Bi, Dandan" , "edk2-devel@lists.01.org" Thread-Topic: [patch] MdeModulePkg/FPDT: Add error message for unsupported case Thread-Index: AQHT0TRcn62jRRJOM0+XpBJUKfDmGqP8XtvA Date: Thu, 12 Apr 2018 01:50:33 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E20CDF4@SHSMSX104.ccr.corp.intel.com> References: <20180411012712.122468-1-dandan.bi@intel.com> In-Reply-To: <20180411012712.122468-1-dandan.bi@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [patch] MdeModulePkg/FPDT: Add error message for unsupported case X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Apr 2018 01:50:39 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao > -----Original Message----- > From: Bi, Dandan > Sent: Wednesday, April 11, 2018 9:27 AM > To: edk2-devel@lists.01.org > Cc: Gao, Liming > Subject: [patch] MdeModulePkg/FPDT: Add error message for unsupported cas= e >=20 > We have updated performance infrastructure in previous commits: > between > https://github.com/tianocore/edk2/commit/73fef64f14d1b97ae9bd4705df3becc0= 22391eba > and > https://github.com/tianocore/edk2/commit/115eae650bfd2be2c2bc37360f4a7550= 65e774c4 > Update FPDT drivers to collect the performance data reported by > gEdkiiFpdtExtendedFirmwarePerformanceGuid. > The old implementation which collected performance data through > gEfiFirmwarePerformanceGuid is not supported now. > We should add error message to remind user for this unsupported > case in case anyone use it by mistake. >=20 > Cc: Liming Gao > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Dandan Bi > --- > .../Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.c | 3= +++ > .../Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmm.c | 5= +++++ > 2 files changed, 8 insertions(+) >=20 > diff --git a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/= FirmwarePerformanceDxe.c > b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePer= formanceDxe.c > index e5a38121e9d..e719e9e482c 100644 > --- a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/Firmwar= ePerformanceDxe.c > +++ b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/Firmwar= ePerformanceDxe.c > @@ -552,10 +552,13 @@ FpdtStatusCodeListenerDxe ( > } else if (Data !=3D NULL && CompareGuid (&Data->Type, &gEdkiiFpdtExte= ndedFirmwarePerformanceGuid)) { > // > // Get the Boot performance table and then install it to ACPI table. > // > CopyMem (&mReceivedAcpiBootPerformanceTable, Data + 1, Data->Size); > + } else if (Data !=3D NULL && CompareGuid (&Data->Type, &gEfiFirmwarePe= rformanceGuid)) { > + DEBUG ((DEBUG_ERROR, "FpdtStatusCodeListenerDxe: Performance data re= ported through gEfiFirmwarePerformanceGuid will > not be collected by FirmwarePerformanceDataTableDxe\n")); > + Status =3D EFI_UNSUPPORTED; > } else { > // > // Ignore else progress code. > // > Status =3D EFI_UNSUPPORTED; > diff --git a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/= FirmwarePerformanceSmm.c > b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePer= formanceSmm.c > index d4ac849ed00..b011ec11030 100644 > --- a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/Firmwar= ePerformanceSmm.c > +++ b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/Firmwar= ePerformanceSmm.c > @@ -104,10 +104,15 @@ FpdtStatusCodeListenerSmm ( >=20 > ReleaseSpinLock (&mSmmFpdtLock); > return EFI_SUCCESS; > } >=20 > + if (Data !=3D NULL && CompareGuid (&Data->Type, &gEfiFirmwarePerforman= ceGuid)) { > + DEBUG ((DEBUG_ERROR, "FpdtStatusCodeListenerSmm: Performance data re= ported through gEfiFirmwarePerformanceGuid will > not be collected by FirmwarePerformanceDataTableSmm\n")); > + return EFI_UNSUPPORTED; > + } > + > if ((Value !=3D PcdGet32 (PcdProgressCodeS3SuspendStart)) && > (Value !=3D PcdGet32 (PcdProgressCodeS3SuspendEnd))) { > return EFI_UNSUPPORTED; > } >=20 > -- > 2.14.3.windows.1