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>
Subject: [PATCH 2/2] QuarkPlatformPkg: enable SmiHandlerProfile.
Date: Thu, 16 Mar 2017 22:04:43 +0800	[thread overview]
Message-ID: <1489673083-10856-3-git-send-email-jiewen.yao@intel.com> (raw)
In-Reply-To: <1489673083-10856-1-git-send-email-jiewen.yao@intel.com>

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

diff --git a/QuarkPlatformPkg/Quark.dsc b/QuarkPlatformPkg/Quark.dsc
index 025653e..13c6538 100644
--- a/QuarkPlatformPkg/Quark.dsc
+++ b/QuarkPlatformPkg/Quark.dsc
@@ -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]
@@ -163,6 +164,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
@@ -382,6 +389,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
@@ -796,6 +807,7 @@
       #
       gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x801000C7
   }
+  MdeModulePkg/Universal/SmmCommunicationBufferDxe/SmmCommunicationBufferDxe.inf
 
   UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf
   QuarkSocPkg/QuarkNorthCluster/Smm/Dxe/SmmControlDxe/SmmControlDxe.inf
@@ -939,6 +951,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 084f2f4..876e5df 100644
--- a/QuarkPlatformPkg/QuarkMin.dsc
+++ b/QuarkPlatformPkg/QuarkMin.dsc
@@ -150,6 +150,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-03-16 14:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-16 14:04 [PATCH 0/2] Add SmiHandlerProfile on Quark Jiewen Yao
2017-03-16 14:04 ` [PATCH 1/2] QuarkSocPkg/SmmChildDispatch: Add SmiHandlerProfile support Jiewen Yao
2017-03-16 14:04 ` Jiewen Yao [this message]

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=1489673083-10856-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