From nobody Sat Nov 2 14:24:42 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1489673108003350.7970118425376; Thu, 16 Mar 2017 07:05:08 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id DA49180408; Thu, 16 Mar 2017 07:05:01 -0700 (PDT) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (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 5FAA780402 for ; Thu, 16 Mar 2017 07:05:00 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP; 16 Mar 2017 07:05:00 -0700 Received: from wduan1-mobl.ccr.corp.intel.com (HELO jyao1-MOBL.ccr.corp.intel.com) ([10.254.215.154]) by fmsmga002.fm.intel.com with ESMTP; 16 Mar 2017 07:04:59 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,172,1486454400"; d="scan'208";a="1143304336" From: Jiewen Yao To: edk2-devel@lists.01.org Date: Thu, 16 Mar 2017 22:04:43 +0800 Message-Id: <1489673083-10856-3-git-send-email-jiewen.yao@intel.com> X-Mailer: git-send-email 2.7.4.windows.1 In-Reply-To: <1489673083-10856-1-git-send-email-jiewen.yao@intel.com> References: <1489673083-10856-1-git-send-email-jiewen.yao@intel.com> Subject: [edk2] [PATCH 2/2] QuarkPlatformPkg: enable SmiHandlerProfile. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael D Kinney MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Cc: Michael D Kinney Cc: Kelly Steele Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao --- 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 =3D FALSE DEFINE CAPSULE_ENABLE =3D FALSE DEFINE RECOVERY_ENABLE =3D FALSE + DEFINE SMI_HANDLER_PROFILE_ENABLE =3D FALSE =20 # # Galileo board. Options are [GEN1, GEN2] @@ -163,6 +164,12 @@ PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibN= ull.inf !endif =20 +!if $(SMI_HANDLER_PROFILE_ENABLE) + SmiHandlerProfileLib|MdeModulePkg/Library/SmmSmiHandlerProfileLib/SmmSmi= HandlerProfileLib.inf +!else + SmiHandlerProfileLib|MdePkg/Library/SmiHandlerProfileLibNull/SmiHandlerP= rofileLibNull.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 =20 +!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/SmmCommunicationBufferD= xe.inf =20 UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf QuarkSocPkg/QuarkNorthCluster/Smm/Dxe/SmmControlDxe/SmmControlDxe.inf @@ -939,6 +951,8 @@ } !endif =20 + MdeModulePkg/Application/SmiHandlerProfileInfo/SmiHandlerProfileInfo.inf + [BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER] MSFT:*_*_*_DLINK_FLAGS =3D /ALIGN:4096 =20 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 BS= D License @@ -511,6 +511,7 @@ INF RuleOverride =3D ACPITABLE QuarkPlatformPkg/Acpi/A= cpiTables/AcpiTables.inf INF MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf INF MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf INF UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf +INF MdeModulePkg/Universal/SmmCommunicationBufferDxe/SmmCommunicationBuff= erDxe.inf INF UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf INF QuarkSocPkg/QuarkNorthCluster/Smm/Dxe/SmmControlDxe/SmmControlDxe.inf INF QuarkSocPkg/QuarkNorthCluster/Smm/DxeSmm/QncSmmDispatcher/QNCSmmDispa= tcher.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/BasePerformanceLibN= ull.inf !endif + + SmiHandlerProfileLib|MdePkg/Library/SmiHandlerProfileLibNull/SmiHandlerP= rofileLibNull.inf + !if $(SECURE_BOOT_ENABLE) BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf PlatformSecureLib|QuarkPlatformPkg/Library/PlatformSecureLib/PlatformSec= ureLib.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.d= sc The table below contains a summary of the build flags to enable or disable features on the build command line using ```-D``` flags. =20 -| **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, I= NFINEON_I2C | -| ```CAPSULE_ENABLE``` | FALSE | TRUE, FALSE | -| ```RECOVERY_ENABLE``` | FALSE | TRUE, FALSE | +| **Define Name** | **Default Value** | **Supported Value= s** | +| -------------------------- | ----------------- | -----------------= --- | +| ```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 = | =20 * ```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``` flag= s. In next boot, if a user runs ForceRecovery.efi in shell, or if a user pr= esses the RESET button during power on, warm reset or REBOOT, or if the FvMain is corrupted in flash, the system will boot into recove= ry mode. =20 +* ```SMI_HANDLER_PROFILE_ENABLE``` - Used to enable/disable SMI handler pr= ofile 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\SmiH= andlerProfileSymbolGen.py -i SmiHandlerQuark.xml -o SmiHandlerQuarkFinal.xm= l -g Build\_\FV\Guid.xref```. (NOTE: Please replace= with Build/Release, and with the real toolchain = name.) + ### **Example Build Commands** =20 Default build with logging enabled: --=20 2.7.4.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel