From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 1ED0C7803D7 for ; Wed, 19 Jul 2023 07:45:09 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=SQdbfPTNZkSbd3fKH5GM0MIZCKRfoQQMPUMY3kLZ2o4=; c=relaxed/simple; d=groups.io; h=X-Received:X-Received:X-IronPort-AV:X-IronPort-AV:X-Received:X-ExtLoop1:X-IronPort-AV:X-IronPort-AV:X-Received:From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Unsubscribe:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:X-Gm-Message-State:Content-Transfer-Encoding; s=20140610; t=1689752708; v=1; b=ZEQlZRNApjGXr84z55IJxam3U37ZBwx+RzSop+69qO4oIyy8Q6nwD1yzBfgax2ROmAAVKx0l opIJeDymfKl+dEhr31xeN/Fk5Mf7NmM+9D9+0y+ZgF4qI4Ppfie3vV+7CTmf2EkqQJjz3igvMWE c7gftdg1F+oeOZOkjoUYw5Do= X-Received: by 127.0.0.2 with SMTP id Tqp5YY7687511x5q8ZyYlJPj; Wed, 19 Jul 2023 00:45:08 -0700 X-Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web10.8905.1689752704965174380 for ; Wed, 19 Jul 2023 00:45:08 -0700 X-IronPort-AV: E=McAfee;i="6600,9927,10775"; a="430163391" X-IronPort-AV: E=Sophos;i="6.01,216,1684825200"; d="scan'208";a="430163391" X-Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jul 2023 00:45:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10775"; a="970515808" X-IronPort-AV: E=Sophos;i="6.01,216,1684825200"; d="scan'208";a="970515808" X-Received: from shwdeopenlab705.ccr.corp.intel.com ([10.239.55.55]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jul 2023 00:45:05 -0700 From: "Yuanhao Xie" To: devel@edk2.groups.io Cc: Guo Dong , Ray Ni , Sean Rhodes , James Lu , Gua Guo , Yuanhao Xie Subject: [edk2-devel] [PATCH 4/4] UefiCpuPkg:Wake up APs after power-up or RESET through SIPI. Date: Wed, 19 Jul 2023 15:44:35 +0800 Message-Id: <20230719074435.4331-5-yuanhao.xie@intel.com> In-Reply-To: <20230719074435.4331-1-yuanhao.xie@intel.com> References: <20230719074435.4331-1-yuanhao.xie@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,yuanhao.xie@intel.com X-Gm-Message-State: lZ692xcvPUu5A6q0XTNqCT1Jx7686176AA= Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=ZEQlZRNA; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io After a power-up or RESET, since all APs are already in the "wait-for-SIPI state", the BSP can broadcast just a single Startup IPI to the APs to wake them up and initialize them. Cc: Guo Dong Cc: Ray Ni Cc: Sean Rhodes Cc: James Lu Cc: Gua Guo Signed-off-by: Yuanhao Xie --- UefiCpuPkg/Library/MpInitLib/MpLib.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c b/UefiCpuPkg/Library/MpInitLib/MpLib.c index 737e03ffc5..ce94937e30 100644 --- a/UefiCpuPkg/Library/MpInitLib/MpLib.c +++ b/UefiCpuPkg/Library/MpInitLib/MpLib.c @@ -1294,7 +1294,14 @@ WakeUpAP ( if (CpuMpData->SevSnpIsEnabled && (CpuMpData->InitFlag != ApInitConfig)) { SevSnpCreateAP (CpuMpData, -1); } else { - SendInitSipiSipiAllExcludingSelf ((UINT32)ExchangeInfo->BufferStart); + if ((CpuMpData->InitFlag == ApInitConfig) && FixedPcdGetBool (PcdFirstTimeWakeUpAPsBySipi)) { + // + // SIPI can be used for the first time wake up after reset to reduce boot time. + // + SendStartupIpiAllExcludingSelf ((UINT32)ExchangeInfo->BufferStart); + } else { + SendInitSipiSipiAllExcludingSelf ((UINT32)ExchangeInfo->BufferStart); + } } } -- 2.36.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107042): https://edk2.groups.io/g/devel/message/107042 Mute This Topic: https://groups.io/mt/100231364/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-