From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web12.17170.1577322501304265708 for ; Wed, 25 Dec 2019 17:08:21 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: hao.a.wu@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Dec 2019 17:08:20 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,357,1571727600"; d="scan'208";a="367661814" Received: from shwdeopenpsi014.ccr.corp.intel.com ([10.239.9.8]) by orsmga004.jf.intel.com with ESMTP; 25 Dec 2019 17:08:18 -0800 From: "Wu, Hao A" To: devel@edk2.groups.io Cc: Hao A Wu , Eric Dong , Ray Ni , Laszlo Ersek , Star Zeng , Siyuan Fu , Michael D Kinney Subject: [PATCH v3 0/6] Microcode related optimizations Date: Thu, 26 Dec 2019 09:08:11 +0800 Message-Id: <20191226010817.6920-1-hao.a.wu@intel.com> X-Mailer: git-send-email 2.12.0.windows.1 Series is also available at: https://github.com/hwu25/edk2/tree/mpinitlib_opt_v3 V3 change: For patch 3, correct license information for newly added header file. V2 history: A. For patch 2, rename function parameters and variables to better reflect their usage; B. For patch 2, remove unneeded check in LoadMicrocodePatchWorker(); C. For patch 3, rename a couple of fields in the HOB structure; D. For patch 3, update the 'ProcessorSpecificPatchOffset' field to point to the microcode patch header instead of microcode patch data; E. Add a new patch 5 to address an issue that certain fields in the CPU_MP_DATA structure cannot be passed from PEI phase to DXE phase; F. Add a new patch 6 to remove the redundant microcode related fields in the CPU_MP_DATA structure. V1 history: This series will introduce a couple of optimizations to the MpInitLib with regard to microcode: A. Reduce the copy size when loading the microcode patches data from flash into memory; B. Produce a HOB to contain microcode patches information for subsequent consumers of the microcode patches during the boot flow. Uni-test done for the series: A. System boot to OS/Shell successfully on a real platform; B. Add debug message to verify the same microcode patch is applied to each processor before and after the series. Cc: Eric Dong Cc: Ray Ni Cc: Laszlo Ersek Cc: Star Zeng Cc: Siyuan Fu Cc: Michael D Kinney Hao A Wu (6): UefiCpuPkg/MpInitLib: Collect processors' CPUID & Platform ID info UefiCpuPkg/MpInitLib: Reduce the size when loading microcode patches UefiCpuPkg: Add definitions for EDKII microcode patch HOB UefiCpuPkg/MpInitLib: Produce EDKII microcode patch HOB UefiCpuPkg/MpInitLib: Relocate microcode patch fields in CPU_MP_DATA UefiCpuPkg/MpInitLib: Remove redundant microcode fields in CPU_MP_DATA UefiCpuPkg/UefiCpuPkg.dec | 3 + UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf | 1 + UefiCpuPkg/Include/Guid/MicrocodePatchHob.h | 44 +++ UefiCpuPkg/Library/MpInitLib/MpLib.h | 59 +++- UefiCpuPkg/Library/MpInitLib/Microcode.c | 292 +++++++++++++++++--- UefiCpuPkg/Library/MpInitLib/MpLib.c | 102 +++---- UefiCpuPkg/Library/MpInitLib/PeiMpLib.c | 55 ++++ 7 files changed, 450 insertions(+), 106 deletions(-) create mode 100644 UefiCpuPkg/Include/Guid/MicrocodePatchHob.h -- 2.12.0.windows.1