From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web10.12565.1687703974569737167 for ; Sun, 25 Jun 2023 07:39:35 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=Pwoo/R3Y; spf=pass (domain: intel.com, ip: 134.134.136.24, 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=1687703974; x=1719239974; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=4Db85P8i6kysCVfEQ60u2BvD2Ht8aYbC3serMaAk7ss=; b=Pwoo/R3YAZkSMCreVBHb4lWN9T+1a300CTk81Qj9BYaCYiObVCjPATup z8PBfbvJ7LQglF6pBv2P2o0KW2WWmKlQhlS/bGvAd9cfeHDPsScUnfW+5 GSQ2XMQLcgoCeqNGT6XDUkJBOXhSNK9pK7rkpsUHsFWdQ5Mo7zLP4KSwe oU6vVp9ajYlU5ic9jL0OjoluCHPEA8IDH3TMu/0uNnwuqBxT+E+e9h0HQ wM5lir0xUR5IpuZrn5+4FeVV3UlDYXl4qF606X4qVvn6QEbZwfqqky2Zx 02ng3B3ErB6qiQ5sd2PgRXbVnf1pVMBueNew0ZB+1GVQ3nVYgYI/flY/1 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10752"; a="363624285" X-IronPort-AV: E=Sophos;i="6.01,157,1684825200"; d="scan'208";a="363624285" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jun 2023 07:39:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10752"; a="785871726" X-IronPort-AV: E=Sophos;i="6.01,157,1684825200"; d="scan'208";a="785871726" 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 07:39:32 -0700 From: "Yuanhao Xie" To: devel@edk2.groups.io Subject: [Patch V2 0/6] Eliminate the second INIT-SIPI-SIPI sequence Date: Sun, 25 Jun 2023 22:39:14 +0800 Message-Id: <20230625143920.57095-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 (6): 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: Enhance MpHandOff Handling. UefiCpuPkg/Library/MpInitLib/Ia32/MpFuncs.nasm | 4 ++-- UefiCpuPkg/Library/MpInitLib/MpLib.c | 374 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------------------------------------------- UefiCpuPkg/Library/MpInitLib/MpLib.h | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ UefiCpuPkg/Library/MpInitLib/PeiMpLib.c | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++- UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm | 3 +-- 5 files changed, 433 insertions(+), 73 deletions(-) -- 2.36.1.windows.1