public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Jiewen Yao <jiewen.yao@intel.com>
To: edk2-devel@lists.01.org
Cc: Michael D Kinney <michael.d.kinney@intel.com>,
	Kelly Steele <kelly.steele@intel.com>,
	Laszlo Ersek <lersek@redhat.com>
Subject: [PATCH 12/12] QuarkPlatformPkg: enable SmiHandlerProfile.
Date: Wed,  8 Feb 2017 08:31:26 -0800	[thread overview]
Message-ID: <1486571486-20420-3-git-send-email-jiewen.yao@intel.com> (raw)
In-Reply-To: <1486571486-20420-1-git-send-email-jiewen.yao@intel.com>

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Kelly Steele <kelly.steele@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
---
 QuarkPlatformPkg/Quark.dsc    | 16 ++++++++++-
 QuarkPlatformPkg/Quark.fdf    |  3 +-
 QuarkPlatformPkg/QuarkMin.dsc |  5 +++-
 QuarkPlatformPkg/Readme.md    | 29 ++++++++++++--------
 4 files changed, 39 insertions(+), 14 deletions(-)

diff --git a/QuarkPlatformPkg/Quark.dsc b/QuarkPlatformPkg/Quark.dsc
index d36fd6e..53065d4 100644
--- a/QuarkPlatformPkg/Quark.dsc
+++ b/QuarkPlatformPkg/Quark.dsc
@@ -2,7 +2,7 @@
 # Clanton Peak CRB platform with 32-bit DXE for 4MB/8MB flash devices.
 #
 # This package provides Clanton Peak CRB platform specific modules.
-# Copyright (c) 2013 - 2016 Intel Corporation.
+# Copyright (c) 2013 - 2017 Intel Corporation.
 #
 # This program and the accompanying materials
 # are licensed and made available under the terms and conditions of the BSD License
@@ -41,6 +41,7 @@
   DEFINE LOGGING              = FALSE
   DEFINE CAPSULE_ENABLE       = FALSE
   DEFINE RECOVERY_ENABLE      = FALSE
+  DEFINE SMI_HANDLER_PROFILE_ENABLE = FALSE
 
   #
   # Galileo board.  Options are [GEN1, GEN2]
@@ -162,6 +163,12 @@
   PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
 !endif
 
+!if $(SMI_HANDLER_PROFILE_ENABLE)
+  SmiHandlerProfileLib|MdeModulePkg/Library/SmmSmiHandlerProfileLib/SmmSmiHandlerProfileLib.inf
+!else
+  SmiHandlerProfileLib|MdePkg/Library/SmiHandlerProfileLibNull/SmiHandlerProfileLibNull.inf
+!endif
+
   OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
   IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
@@ -381,6 +388,10 @@
   # waiting for RTC to be busy.
   gEfiMdeModulePkgTokenSpaceGuid.PcdRealTimeClockUpdateTimeout|500000
 
+!if $(SMI_HANDLER_PROFILE_ENABLE)
+  gEfiMdeModulePkgTokenSpaceGuid.PcdSmiHandlerProfilePropertyMask|1
+!endif
+
 !if $(SECURE_BOOT_ENABLE)
   # override the default values from SecurityPkg to ensure images from all sources are verified in secure boot
   gEfiSecurityPkgTokenSpaceGuid.PcdOptionRomImageVerificationPolicy|0x04
@@ -797,6 +808,7 @@
       #
       gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x801000C7
   }
+  MdeModulePkg/Universal/SmmCommunicationBufferDxe/SmmCommunicationBufferDxe.inf
 
   UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf
   QuarkSocPkg/QuarkNorthCluster/Smm/Dxe/SmmControlDxe/SmmControlDxe.inf
@@ -940,6 +952,8 @@
   }
 !endif
 
+  MdeModulePkg/Application/SmiHandlerProfileInfo/SmiHandlerProfileInfo.inf
+
 [BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]
   MSFT:*_*_*_DLINK_FLAGS = /ALIGN:4096
 
diff --git a/QuarkPlatformPkg/Quark.fdf b/QuarkPlatformPkg/Quark.fdf
index 19533b2..34f09af 100644
--- a/QuarkPlatformPkg/Quark.fdf
+++ b/QuarkPlatformPkg/Quark.fdf
@@ -2,7 +2,7 @@
 # FDF file of Clanton Peak CRB platform with 32-bit DXE
 #
 # This package provides QuarkNcSocId platform specific modules.
-# Copyright (c) 2013 - 2016 Intel Corporation.
+# Copyright (c) 2013 - 2017 Intel Corporation.
 #
 # This program and the accompanying materials
 # are licensed and made available under the terms and conditions of the BSD License
@@ -511,6 +511,7 @@ INF  RuleOverride = ACPITABLE QuarkPlatformPkg/Acpi/AcpiTables/AcpiTables.inf
 INF  MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf
 INF  MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf
 INF  UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf
+INF  MdeModulePkg/Universal/SmmCommunicationBufferDxe/SmmCommunicationBufferDxe.inf
 INF  UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf
 INF  QuarkSocPkg/QuarkNorthCluster/Smm/Dxe/SmmControlDxe/SmmControlDxe.inf
 INF  QuarkSocPkg/QuarkNorthCluster/Smm/DxeSmm/QncSmmDispatcher/QNCSmmDispatcher.inf
diff --git a/QuarkPlatformPkg/QuarkMin.dsc b/QuarkPlatformPkg/QuarkMin.dsc
index be85e3f..d97476a 100644
--- a/QuarkPlatformPkg/QuarkMin.dsc
+++ b/QuarkPlatformPkg/QuarkMin.dsc
@@ -2,7 +2,7 @@
 # Clanton Peak CRB platform with 32-bit DXE for 4MB/8MB flash devices.
 #
 # This package provides Clanton Peak CRB platform specific modules.
-# Copyright (c) 2013 - 2016 Intel Corporation.
+# Copyright (c) 2013 - 2017 Intel Corporation.
 #
 # This program and the accompanying materials
 # are licensed and made available under the terms and conditions of the BSD License
@@ -149,6 +149,9 @@
 !else
   PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
 !endif
+
+  SmiHandlerProfileLib|MdePkg/Library/SmiHandlerProfileLibNull/SmiHandlerProfileLibNull.inf
+
 !if $(SECURE_BOOT_ENABLE)
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
   PlatformSecureLib|QuarkPlatformPkg/Library/PlatformSecureLib/PlatformSecureLib.inf
diff --git a/QuarkPlatformPkg/Readme.md b/QuarkPlatformPkg/Readme.md
index f925f9e..d15e50f 100644
--- a/QuarkPlatformPkg/Readme.md
+++ b/QuarkPlatformPkg/Readme.md
@@ -137,17 +137,18 @@ build -a IA32 -t GCC49 -p QuarkPlatformPkg/QuarkMin.dsc
 The table below contains a summary of the build flags to enable or disable
 features on the build command line using ```-D``` flags.
 
-| **Define Name**            | **Default Value** | **Supported Values** |
-| -------------------------- | ----------------- | -------------------- |
-| ```GALILEO```              |              GEN2 | GEN1, GEN2           |
-| ```LOGGING```              |              TRUE | TRUE, FALSE          |
-| ```SOURCE_DEBUG_ENABLE```  |             FALSE | TRUE, FALSE          |
-| ```PERFORMANCE_ENABLE```   |             FALSE | TRUE, FALSE          |
-| ```SECURE_BOOT_ENABLE```   |             FALSE | TRUE, FALSE          |
-| ```MEASURED_BOOT_ENABLE``` |             FALSE | TRUE, FALSE          |
-| ```TPM_12_HARDWARE```      |              NONE | NONE, LPC, ATMEL_I2C, INFINEON_I2C |
-| ```CAPSULE_ENABLE```       |             FALSE | TRUE, FALSE          |
-| ```RECOVERY_ENABLE```      |             FALSE | TRUE, FALSE          |
+| **Define Name**                  | **Default Value** | **Supported Values** |
+| --------------------------       | ----------------- | -------------------- |
+| ```GALILEO```                    |              GEN2 | GEN1, GEN2           |
+| ```LOGGING```                    |              TRUE | TRUE, FALSE          |
+| ```SOURCE_DEBUG_ENABLE```        |             FALSE | TRUE, FALSE          |
+| ```PERFORMANCE_ENABLE```         |             FALSE | TRUE, FALSE          |
+| ```SECURE_BOOT_ENABLE```         |             FALSE | TRUE, FALSE          |
+| ```MEASURED_BOOT_ENABLE```       |             FALSE | TRUE, FALSE          |
+| ```TPM_12_HARDWARE```            |              NONE | NONE, LPC, ATMEL_I2C, INFINEON_I2C |
+| ```CAPSULE_ENABLE```             |             FALSE | TRUE, FALSE          |
+| ```RECOVERY_ENABLE```            |             FALSE | TRUE, FALSE          |
+| ```SMI_HANDLER_PROFILE_ENABLE``` |             FALSE | TRUE, FALSE          |
 
 * ```GALILEO``` - Used to specify the type of Intel(R) Galileo board type.  The
   default is ```GEN2``` for the [Intel(R) Galileo Gen 2 Development Board](
@@ -218,6 +219,12 @@ features on the build command line using ```-D``` flags.
   In next boot, if a user runs ForceRecovery.efi in shell, or if a user presses the RESET button during power on, warm reset or REBOOT,
   or if the FvMain is corrupted in flash, the system will boot into recovery mode.
 
+* ```SMI_HANDLER_PROFILE_ENABLE``` - Used to enable/disable SMI handler profile features.
+  The default is FALSE for disabled.  Add ```-D SMI_HANDLER_PROFILE_ENABLE``` to the
+  build command line to enable SMI handler profile features.
+  A user may enter UEFI shell environment and run ```SmiHandlerProfileInfo >a SmiHandlerQuark.xml```
+  Then the user may enter OS environment and run ```BaseTools\Scripts\SmiHandlerProfileSymbolGen.py -i SmiHandlerQuark.xml -o SmiHandlerQuarkFinal.xml -g Build\<TARGET>_<TOOL_CHAIN_TAG>\FV\Guid.xref```. (NOTE: Please replace <TAGGET> with Build/Release, and <TOOL_CHAIN_TAG> with the real toolchain name.)
+
 ### **Example Build Commands**
 
 Default build with logging enabled:
-- 
2.7.4.windows.1



  parent reply	other threads:[~2017-02-08 16:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-08 16:31 [PATCH 10/12] BaseTool/Script: Add SmiHandleProfile OS tool to get symbol Jiewen Yao
2017-02-08 16:31 ` [PATCH 11/12] QuarkSocPkg/SmmChildDispatch: Add SmiHandlerProfile support Jiewen Yao
2017-02-08 16:31 ` Jiewen Yao [this message]
2017-02-09  3:57 ` [PATCH 10/12] BaseTool/Script: Add SmiHandleProfile OS tool to get symbol Gao, Liming
2017-02-09  4:52   ` Yao, Jiewen
2017-02-09  5:04     ` Gao, Liming

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1486571486-20420-3-git-send-email-jiewen.yao@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox