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 E009EAC115C for ; Fri, 28 Jul 2023 06:57:19 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=SOM9vjZpEIdJrpd1Gdh/pMHrgnmBR45S7HZBqU4L75M=; c=relaxed/simple; d=groups.io; h=X-Received:X-Received:X-Received:X-Received:X-Received:X-Received:X-WM-Sender:X-Originating-IP:X-WM-AuthFlag:X-WM-AuthUser:Date:From:To:Cc:Subject:References:X-Priority:X-Has-Attach:Mime-Version:Message-ID:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:X-Gm-Message-State:Content-Type; s=20140610; t=1690527438; v=1; b=U68uY010oF+zKjpxVqdJaRXAu4ml0INHBK8VJzuKPvb60Xy6+lwc5Pt2+JTnFV3ciZKPBnUS fQKi0LJSxUQ3Nox+2z05SS1FbLovabBGk7MBEqwfjt4out21lcNsrN5fAmmuQWCg5SUSunqnDIv oEAB7Wkyh8PcylIUsLB/bMaU= X-Received: by 127.0.0.2 with SMTP id InnAYY7687511x1TigRMd3r9; Thu, 27 Jul 2023 23:57:18 -0700 X-Received: from zrleap.intel-email.com (zrleap.intel-email.com [114.80.218.36]) by mx.groups.io with SMTP id smtpd.web11.27395.1690527437039390166 for ; Thu, 27 Jul 2023 23:57:18 -0700 X-Received: from zrleap.intel-email.com (localhost [127.0.0.1]) by zrleap.intel-email.com (Postfix) with ESMTP id 0404BA32E023 for ; Fri, 28 Jul 2023 14:57:14 +0800 (CST) X-Received: from localhost (localhost [127.0.0.1]) by zrleap.intel-email.com (Postfix) with ESMTP id E59D9A32E000 for ; Fri, 28 Jul 2023 14:57:13 +0800 (CST) X-Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by zrleap.intel-email.com (Postfix) with SMTP id 65482A32E005 for ; Fri, 28 Jul 2023 14:57:09 +0800 (CST) X-Received: from DESKTOP-M5NI163 ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Fri, 28 Jul 2023 14:57:05 +0800 X-WM-Sender: fanjianfeng@byosoft.com.cn X-Originating-IP: 58.246.60.130 X-WM-AuthFlag: YES X-WM-AuthUser: fanjianfeng@byosoft.com.cn Date: Fri, 28 Jul 2023 14:57:08 +0800 From: "Jeff Fan via groups.io" To: "devel@edk2.groups.io" , "Yuanhao Xie" Cc: =?GB2312?B?RG9uZywgRXJpYw==?= , =?GB2312?B?TmksIFJheQ==?= , "Rahul Kumar" , "Gerd Hoffmann" , "Yuanhao Xie" Subject: =?UTF-8?B?5Zue5aSNOiBSZTogW2VkazItZGV2ZWxdIFtQYXRjaCBWNiA0LzRdIFVlZmlDcHVQa2c6V2FrZSB1cCBBUHMgYWZ0ZXIgcG93ZXItdXAgb3IgUkVTRVQgdGhyb3VnaCBTSVBJLg==?= References: <20230728062529.6312-1-yuanhao.xie@intel.com>, <20230728062529.6312-5-yuanhao.xie@intel.com>, <202307281449476781951@byosoft.com.cn> X-Priority: 3 X-Has-Attach: no Mime-Version: 1.0 Message-ID: <202307281457084131094@byosoft.com.cn> Precedence: Bulk 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,fanjianfeng@byosoft.com.cn List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: o1wvkcUCiZWBn3RwJtZHvxWgx7686176AA= Content-Type: multipart/alternative; boundary="----=_001_NextPart338303858675_=----" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=U68uY010; dmarc=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 ------=_001_NextPart338303858675_=---- Content-Type: text/plain;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dlcyBzZW50IHRv IHRoaXMgZ3JvdXAuClZpZXcvUmVwbHkgT25saW5lICgjMTA3MzcwKTogaHR0cHM6Ly9lZGsyLmdy b3Vwcy5pby9nL2RldmVsL21lc3NhZ2UvMTA3MzcwCk11dGUgVGhpcyBUb3BpYzogaHR0cHM6Ly9n cm91cHMuaW8vbXQvMTAwNDA2MTgzLzc2ODYxNzYKR3JvdXAgT3duZXI6IGRldmVsK293bmVyQGVk azIuZ3JvdXBzLmlvClVuc3Vic2NyaWJlOiBodHRwczovL2VkazIuZ3JvdXBzLmlvL2cvZGV2ZWwv dW5zdWIgW3JlYmVjY2FAb3BlbmZ3LmlvXQotPS09LT0tPS09LT0tPS09LT0tPS09LQoKDQo= ------=_001_NextPart338303858675_=---- Content-Type: text/html; charset="GB2312" Content-Transfer-Encoding: quoted-printable
Y= uanhao,

Sorry. I are missing the following updat= ing. 
+      &nb= sp; if ((CpuMpData->InitFlag =3D=3D ApInitConfig) 

Please ignore my last comments ! :-)

Reviewed-by: Jeff Fan <fanjianfeng@byosoft.com.cn>
<= br>
Thanks!
Jeff


fanjianfeng@byosoft.com.cn
 
= =B7=A2=BC=FE=C8=CB=A3=BA fanjianfeng@byosoft.com.cn
=B7=A2=CB=CD=CA=B1=BC=E4= =A3=BA 2023-07-28 14:49
=CA=D5=BC=FE=C8=CB=A3=BA=  devel@edk2.groups.io;= yuanhao.xie
=D6=F7=CC=E2=A3=BA Re: [edk2-devel] [Patch V6 4/4] U= efiCpuPkg:Wake up APs after power-up or RESET through SIPI.
Yuanhao=A3=AC

Have you verirfed = whether APs could be waken-up from ApInHltLoop state or not?

Thank= s!
Jeff

fanjianfeng@byosoft.com.cn
 
Fr= om: Yuanhao Xie
=
Date: 2023-07-28 14:25
To: devel
Subject:&nbs= p;[edk2-devel] [Patch V6 4/4] UefiCpuPkg:Wake up APs after power-up or RESE= T through SIPI.
The implementation of this new b= ehavior aligns with the guidelines
outlined in the Intel SDM.
 
Following a power-up or RESET of an MP system, system hardware
dynamically selects one of the processors on the system bus as the BSP= .
The remaining processors are designated as APs. The APs complete a
minimal self-configuration, then wait for a startup signal (a SIPI
message) from the BSP processor.
 
Additionally, the MP protocol is executed only after
a power-up or RESET. If the MP protocol has completed and a
BSP is chosen, subsequent INITs (either to a specific processor or
system wide) do not cause the MP protocol to be repeated. Instead, eac= h
logical processor examines its BSP flag (in the IA32_APIC_BASE MSR) to=
determine whether it should execute the BIOS boot-strap code (if it is=
the BSP) or enter a wait-for-SIPI state (if it is an AP).
 
Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Ray Ni <ray.ni@intel.com>
Signed-off-by: Yuanhao Xie <yuanhao.xie@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
---
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 e7054adbcc..6f1456cfe1 100644
--- a/UefiCpuPkg/Library/MpInitLib/MpLib.c
+++ b/UefiCpuPkg/Library/MpInitLib/MpLib.c
@@ -1294,7 +1294,14 @@ WakeUpAP (
       if (CpuMpData->SevSnpIsEnabled= && (CpuMpData->InitFlag !=3D ApInitConfig)) {
         SevSnpCreateAP (CpuMp= Data, -1);
       } else {
-        SendInitSipiSipiAllExcludi= ngSelf ((UINT32)ExchangeInfo->BufferStart);
+        if ((CpuMpData->InitFla= g =3D=3D ApInitConfig) && FixedPcdGetBool (PcdFirstTimeWakeUpAPsByS= ipi)) {
+          //
+          // SIPI can be= used for the first time wake up after reset to reduce boot time.
+          //
+          SendStartupIpi= AllExcludingSelf ((UINT32)ExchangeInfo->BufferStart);
+        } else {
+          SendInitSipiSi= piAllExcludingSelf ((UINT32)ExchangeInfo->BufferStart);
+        }
       }
     }
--
2.36.1.windows.1
 
 
 
 
 
 
_._,_._,_

Groups.io Links:

=20 You receive all messages sent to this group. =20 =20

View/Reply Online (#107370) | =20 | Mute= This Topic | New Topic
Your Subscriptio= n | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
------=_001_NextPart338303858675_=------