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 <ray...@intel.com>
Cc: Nate DeSimone <nathaniel.l.desim...@intel.com>
Cc: Zhiguang Liu <zhiguang@l...@intel.com>
Cc: Michael D Kinney <michael.d.kin...@intel.com>
---
 .../BoardX58Ich10/OpenBoardPkgPcd.dsc                 | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git 
a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.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
   gEfiMdePkgTokenSpaceGuid.PcdPerformanceLibraryPropertyMask|0x0
 !if gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable == TRUE
-  gEfiMdePkgTokenSpaceGuid.PcdPerformanceLibraryPropertyMask|0x1
+  #  BIT0 - Enable Performance Measurement.<BR>
+  #  BIT1 - Disable Start Image Logging.<BR>
+  #  BIT2 - Disable Load Image logging.<BR>
+  #  BIT3 - Disable Binding Support logging.<BR>
+  #  BIT4 - Disable Binding Start logging.<BR>
+  #  BIT5 - Disable Binding Stop logging.<BR>
+  #  BIT6 - Disable all other general Perfs.<BR>
+  #  BIT1-BIT6 are evaluated when BIT0 is set.<BR>
+  #  Enable performance measurement but disable driver binding support logging.
+  gEfiMdePkgTokenSpaceGuid.PcdPerformanceLibraryPropertyMask|0x09
 !endif
 !if $(TARGET) == "RELEASE"
   gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x03
-- 
2.39.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#105235): https://edk2.groups.io/g/devel/message/105235
Mute This Topic: https://groups.io/mt/99107262/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: 
https://edk2.groups.io/g/devel/leave/9847357/21656/1706620634/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to