From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (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 76FF68210D for ; Wed, 8 Feb 2017 08:31:31 -0800 (PST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 08 Feb 2017 08:31:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,348,1477983600"; d="scan'208";a="1123834399" Received: from jyao1-mobl.ccr.corp.intel.com ([10.254.185.79]) by fmsmga002.fm.intel.com with ESMTP; 08 Feb 2017 08:31:30 -0800 From: Jiewen Yao To: edk2-devel@lists.01.org Cc: Michael D Kinney , Kelly Steele , Laszlo Ersek Date: Wed, 8 Feb 2017 08:31:26 -0800 Message-Id: <1486571486-20420-3-git-send-email-jiewen.yao@intel.com> X-Mailer: git-send-email 2.7.4.windows.1 In-Reply-To: <1486571486-20420-1-git-send-email-jiewen.yao@intel.com> References: <1486571486-20420-1-git-send-email-jiewen.yao@intel.com> Subject: [PATCH 12/12] QuarkPlatformPkg: enable SmiHandlerProfile. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Feb 2017 16:31:31 -0000 Cc: Michael D Kinney Cc: Kelly Steele Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao --- 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\_\FV\Guid.xref```. (NOTE: Please replace with Build/Release, and with the real toolchain name.) + ### **Example Build Commands** Default build with logging enabled: -- 2.7.4.windows.1