From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web10.1822.1687759039189579056 for ; Sun, 25 Jun 2023 22:57:19 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=i8zWyGx2; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: yuanhao.xie@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1687759038; x=1719295038; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=DefZtF/ghGoPxYEqPEB9rqP0Drs5eD4OxdseBHmHHbY=; b=i8zWyGx2XcWgmLtUHQY1vatWvFzP9jg/GHwaaEtVjJsvhcyEhld5lVrX YsiU06y93KjE/Yhx4G+R2unDCwUxl/4K7Q2ABMHzaSgSlVbioZceoE2ep 8jDxrZQLJ+p0oeIjtK0BJtKAotvDnzmk2/x/NOkgu0iRDJB/c3tldbtGv IkosalnEQFXO8mKZuaatpsZgUHCj/7TDKjYf5+kANKld81EsAgt/PcyIU fLt9XhrG9z0aiQ0J59d/mlg6Q3UEsmzwJT7GcWm7H4oY7K/5omdgAUrPG m+f3bRktHFhtWiqksVUcrpskl5QHsSpSUR5DkaPIol61nZeUg451Wt5uo Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10752"; a="340768915" X-IronPort-AV: E=Sophos;i="6.01,158,1684825200"; d="scan'208";a="340768915" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jun 2023 22:57:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10752"; a="786018006" X-IronPort-AV: E=Sophos;i="6.01,158,1684825200"; d="scan'208";a="786018006" Received: from shwdeopenlab705.ccr.corp.intel.com ([10.239.55.55]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jun 2023 22:57:17 -0700 From: "Yuanhao Xie" To: devel@edk2.groups.io Subject: [Patch V3 0/5] Eliminate the second INIT-SIPI-SIPI sequence Date: Mon, 26 Jun 2023 13:57:00 +0800 Message-Id: <20230626055705.57145-1-yuanhao.xie@intel.com> X-Mailer: git-send-email 2.36.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To speed up MP initialization, this set of patches replaces the time-consuming init-sipi-sipi process in the DXE phase. Instead, a start-up signal is used to wake up the APs and switch context from the PEI phase to the DXE phase. This optimization is effective when both PEI and DXE operate in the same bit mode. The current HOB characterized by mCpuInitMpLibHobGuid has two purposes: Acting as a global variable for the PEI phase. Transferring information from the PEI phase to the DXE phase. This series of patches creates a new HOB specifically designed to transfer only the minimal necessary information (MpHandoff structure) from the PEI phase to the DXE phase. YuanhaoXie (5): UefiCpuPkg: Refactor the logic for placing APs in HltLoop. UefiCpuPkg: Refactor the logic for placing APs in Mwait/Runloop. UefiCpuPkg: Create MpHandOff. UefiCpuPkg: ApWakeupFunction directly use CpuMpData. UefiCpuPkg: Eliminate the second INIT-SIPI-SIPI sequence. UefiCpuPkg/Library/MpInitLib/Ia32/MpFuncs.nasm | 4 ++-- UefiCpuPkg/Library/MpInitLib/MpLib.c | 360 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------------------------- UefiCpuPkg/Library/MpInitLib/MpLib.h | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ UefiCpuPkg/Library/MpInitLib/PeiMpLib.c | 32 +++++++++++++++++++++++++++++++- UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm | 3 +-- 5 files changed, 404 insertions(+), 70 deletions(-) -- 2.36.1.windows.1