From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web10.7422.1684931339636052825 for ; Wed, 24 May 2023 05:29:10 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=FmSdYCCF; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: ray.ni@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684931350; x=1716467350; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=s50p/PBxRpmKFiQ6I/owkoq29KSzIxUB0xTfMDbSL/Y=; b=FmSdYCCFnJtN1MbQbvvR0PYbt6wf/5uAwqAAoejOkRNtFsGYyxQzy2XZ InlwRiVH5kZjgtV8ZY8QkbeCRNKVKttWO1Qb03Mxbu5QBrkTqFWSvhwf+ 2yfezWaG/3MrGgszpKCgTWUUy4kiJUpeJW4UEOcOEXak62gMTfc/XgIYn oIsxS48FNkW7tuDS0CWzuBIrOkzxyN9Ruvom7QtgWiAImvUfLZTgEQE65 EPE8Z/zXLNKRPQNYT4wUCMiYNQx5Ofyid8WRdevdV8VxuuEgFDJrRZ4+U xB82V2/P/23L2JryUc1XnivWXrcgz624/Q/dvtbLffiQb237SVBHpIOI3 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10720"; a="419259588" X-IronPort-AV: E=Sophos;i="6.00,189,1681196400"; d="scan'208";a="419259588" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 May 2023 05:29:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10720"; a="704328096" X-IronPort-AV: E=Sophos;i="6.00,189,1681196400"; d="scan'208";a="704328096" Received: from shwdeopenlab706.ccr.corp.intel.com ([10.239.55.95]) by orsmga002.jf.intel.com with ESMTP; 24 May 2023 05:29:09 -0700 From: "Ni, Ray" To: devel@edk2.groups.io Cc: Nate DeSimone , Zhiguang Liu , Michael D Kinney Subject: [PATCH 6/6] SimicsOpenBoardPkg: Disable DriverBindingSupport perf logging Date: Wed, 24 May 2023 20:28:52 +0800 Message-Id: <20230524122852.2047-7-ray.ni@intel.com> X-Mailer: git-send-email 2.39.1.windows.1 In-Reply-To: <20230524122852.2047-1-ray.ni@intel.com> References: <20230524122852.2047-1-ray.ni@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable DriverBindingSupport() is called lots of time during post. If it's also included in the perf logging, it's very easy to use all the FPDT table memory pre-allocated at EndOfDxe because the driver binding connect process happens after EndOfDxe. PcdExtFpdtBootRecordPadSize was added for holding the perf-logging records after EndOfDxe. But the DriverBindingSupport records are just too many. For example, SimicsOpenBoardPkg has to set this PCD to almost 100x bigger than the default value in order to hold all the perf-logging records. Platform developers are usually not aware of missing some records after EndOfDxe because those records are all about driverbinding support/start/stop. But if we add more perf-logging inside SMM, those SMM records will be missed in the final FPDT table because DxeCorePerformanceLib collects those SMM records at ReadyToBoot event. Since the FPDT cannot hold all driverbinding records, it definitely cannot hold those SMM records as well. So in order to hold all SMM perf loggings, either platform should set PcdExtFpdtBootRecordPadSize to a large enough value, or as what this patch does, to disable the driverbinding support perf-logging. Signed-off-by: Ray Ni Cc: Nate DeSimone Cc: Zhiguang Liu Cc: Michael D Kinney --- .../BoardX58Ich10/OpenBoardPkgPcd.dsc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPc= d.dsc b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc index b6672d1a78..6b969ab1f5 100644 --- a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc +++ b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc @@ -132,7 +132,16 @@ gEfiMdePkgTokenSpaceGuid.PcdMaximumGuidedExtractHandler|0x10=0D gEfiMdePkgTokenSpaceGuid.PcdPerformanceLibraryPropertyMask|0x0=0D !if gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable =3D=3D TRUE=0D - gEfiMdePkgTokenSpaceGuid.PcdPerformanceLibraryPropertyMask|0x1=0D + # BIT0 - Enable Performance Measurement.
=0D + # BIT1 - Disable Start Image Logging.
=0D + # BIT2 - Disable Load Image logging.
=0D + # BIT3 - Disable Binding Support logging.
=0D + # BIT4 - Disable Binding Start logging.
=0D + # BIT5 - Disable Binding Stop logging.
=0D + # BIT6 - Disable all other general Perfs.
=0D + # BIT1-BIT6 are evaluated when BIT0 is set.
=0D + # Enable performance measurement but disable driver binding support log= ging.=0D + gEfiMdePkgTokenSpaceGuid.PcdPerformanceLibraryPropertyMask|0x09=0D !endif=0D !if $(TARGET) =3D=3D "RELEASE"=0D gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x03=0D --=20 2.39.1.windows.1