<html><head><meta http-equiv="content-type" content="text/html; charset=GB2312"><style>body { line-height: 1.5; }blockquote { margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em; }div.FoxDiv20230728145505487363 { }body { font-size: 14px; font-family: "Microsoft YaHei UI"; color: rgb(0, 0, 0); line-height: 1.5; }</style></head><body>
<div><span style="font-family: "Microsoft YaHei UI", Tahoma;">Yuanhao,</span></div><div><span style="font-family: "Microsoft YaHei UI", Tahoma;"><br></span></div><div><span style="font-family: "Microsoft YaHei UI", Tahoma;">Sorry. I are missing the following updating. </span></div><div><span></span><span style="font-family: "Microsoft YaHei UI", Tahoma;">+        if ((CpuMpData->InitFlag == ApInitConfig) </span></div>
<div><br></div><div>Please ignore my last comments ! :-)</div><div><br></div><div>Reviewed-by: Jeff Fan <fanjianfeng@byosoft.com.cn></div><div><br></div><div>Thanks!</div><div>Jeff</div><div><br></div><hr style="width: 210px; height: 1px;" color="#b5c4df" size="1" align="left">
<div><span><div style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt"><div>fanjianfeng@byosoft.com.cn</div></div></span></div>
<blockquote style="margin-Top: 0px; margin-Bottom: 0px; margin-Left: 0.5em; margin-Right: inherit"><div> </div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm"><div style="PADDING-RIGHT: 8px; PADDING-LEFT: 8px; FONT-SIZE: 12px;FONT-FAMILY:tahoma;COLOR:#000000; BACKGROUND: #efefef; PADDING-BOTTOM: 8px; PADDING-TOP: 8px"><div><b>发件人:</b> <a href="mailto:fanjianfeng@byosoft.com.cn">fanjianfeng@byosoft.com.cn</a></div><div><b>发送时间:</b> 2023-07-28 14:49</div><div><b>收件人:</b> <a href="mailto:devel@edk2.groups.io">devel@edk2.groups.io</a>; <a href="mailto:yuanhao.xie@intel.com">yuanhao.xie</a></div><div><b>抄送:</b> <a href="mailto:eric.dong@intel.com">Dong, Eric</a>; <a href="mailto:ray.ni@intel.com">Ni, Ray</a>; <a href="mailto:rahul1.kumar@intel.com">Rahul Kumar</a>; <a href="mailto:kraxel@redhat.com">Gerd Hoffmann</a>; <a href="mailto:yuanhao.xie@intel.com">Yuanhao Xie</a></div><div><b>主题:</b> Re: [edk2-devel] [Patch V6 4/4] UefiCpuPkg:Wake up APs after power-up or RESET through SIPI.</div></div></div><div><div class="FoxDiv20230728145505487363">
<div><span></span>Yuanhao,</div><div><br></div><div>Have you verirfed whether APs could be waken-up from ApInHltLoop<span style="background-color: transparent;"> state or not?</span></div><div><br></div><div>Thanks!</div><div>Jeff</div><hr style="width: 210px; height: 1px;" color="#b5c4df" size="1" align="left">
<div><span><div style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt"><div>fanjianfeng@byosoft.com.cn</div></div></span></div>
<blockquote style="margin-Top: 0px; margin-Bottom: 0px; margin-Left: 0.5em; margin-Right: inherit"><div> </div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm"><div style="PADDING-RIGHT: 8px; PADDING-LEFT: 8px; FONT-SIZE: 12px;FONT-FAMILY:tahoma;COLOR:#000000; BACKGROUND: #efefef; PADDING-BOTTOM: 8px; PADDING-TOP: 8px"><div><b>From:</b> <a href="mailto:yuanhao.xie@intel.com">Yuanhao Xie</a></div><div><b>Date:</b> 2023-07-28 14:25</div><div><b>To:</b> <a href="mailto:devel@edk2.groups.io">devel</a></div><div><b>CC:</b> <a href="mailto:eric.dong@intel.com">Eric Dong</a>; <a href="mailto:ray.ni@intel.com">Ray Ni</a>; <a href="mailto:rahul1.kumar@intel.com">Rahul Kumar</a>; <a href="mailto:kraxel@redhat.com">Gerd Hoffmann</a>; <a href="mailto:yuanhao.xie@intel.com">Yuanhao Xie</a></div><div><b>Subject:</b> [edk2-devel] [Patch V6 4/4] UefiCpuPkg:Wake up APs after power-up or RESET through SIPI.</div></div></div><div><div>The implementation of this new behavior aligns with the guidelines</div>
<div>outlined in the Intel SDM.</div>
<div> </div>
<div>Following a power-up or RESET of an MP system, system hardware</div>
<div>dynamically selects one of the processors on the system bus as the BSP.</div>
<div>The remaining processors are designated as APs. The APs complete a</div>
<div>minimal self-configuration, then wait for a startup signal (a SIPI</div>
<div>message) from the BSP processor.</div>
<div> </div>
<div>Additionally, the MP protocol is executed only after</div>
<div>a power-up or RESET. If the MP protocol has completed and a</div>
<div>BSP is chosen, subsequent INITs (either to a specific processor or</div>
<div>system wide) do not cause the MP protocol to be repeated. Instead, each</div>
<div>logical processor examines its BSP flag (in the IA32_APIC_BASE MSR) to</div>
<div>determine whether it should execute the BIOS boot-strap code (if it is</div>
<div>the BSP) or enter a wait-for-SIPI state (if it is an AP).</div>
<div> </div>
<div>Cc: Eric Dong <eric.dong@intel.com></div>
<div>Cc: Ray Ni <ray.ni@intel.com></div>
<div>Cc: Rahul Kumar <rahul1.kumar@intel.com></div>
<div>Cc: Gerd Hoffmann <kraxel@redhat.com></div>
<div>Signed-off-by: Ray Ni <ray.ni@intel.com></div>
<div>Signed-off-by: Yuanhao Xie <yuanhao.xie@intel.com></div>
<div>Reviewed-by: Ray Ni <ray.ni@intel.com></div>
<div>---</div>
<div> UefiCpuPkg/Library/MpInitLib/MpLib.c | 9 ++++++++-</div>
<div> 1 file changed, 8 insertions(+), 1 deletion(-)</div>
<div> </div>
<div>diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c b/UefiCpuPkg/Library/MpInitLib/MpLib.c</div>
<div>index e7054adbcc..6f1456cfe1 100644</div>
<div>--- a/UefiCpuPkg/Library/MpInitLib/MpLib.c</div>
<div>+++ b/UefiCpuPkg/Library/MpInitLib/MpLib.c</div>
<div>@@ -1294,7 +1294,14 @@ WakeUpAP (</div>
<div>       if (CpuMpData->SevSnpIsEnabled && (CpuMpData->InitFlag != ApInitConfig)) {</div>
<div>         SevSnpCreateAP (CpuMpData, -1);</div>
<div>       } else {</div>
<div>-        SendInitSipiSipiAllExcludingSelf ((UINT32)ExchangeInfo->BufferStart);</div>
<div>+        if ((CpuMpData->InitFlag == ApInitConfig) && FixedPcdGetBool (PcdFirstTimeWakeUpAPsBySipi)) {</div>
<div>+          //</div>
<div>+          // SIPI can be used for the first time wake up after reset to reduce boot time.</div>
<div>+          //</div>
<div>+          SendStartupIpiAllExcludingSelf ((UINT32)ExchangeInfo->BufferStart);</div>
<div>+        } else {</div>
<div>+          SendInitSipiSipiAllExcludingSelf ((UINT32)ExchangeInfo->BufferStart);</div>
<div>+        }</div>
<div>       }</div>
<div>     }</div>
<div> </div>
<div>-- </div>
<div>2.36.1.windows.1</div>
<div> </div>
<div> </div>
<div> </div>
<div></div>
<div> </div>
<div> </div>
<div> </div>
</div></blockquote>
</div></div></blockquote>
</body></html>


<div width="1" style="color:white;clear:both">_._,_._,_</div>
<hr>


Groups.io Links:<p>


  
    You receive all messages sent to this group.
  
  


<p>
<a target="_blank" href="https://edk2.groups.io/g/devel/message/107370">View/Reply Online (#107370)</a> |


  

|

  <a target="_blank" href="https://groups.io/mt/100406183/1813853">Mute This Topic</a>


| <a href="https://edk2.groups.io/g/devel/post">New Topic</a>

<br>




<a href="https://edk2.groups.io/g/devel/editsub/1813853">Your Subscription</a> |
<a href="mailto:devel+owner@edk2.groups.io">Contact Group Owner</a> |

<a href="https://edk2.groups.io/g/devel/unsub">Unsubscribe</a>

 [edk2-devel-archive@redhat.com]<br>
<div width="1" style="color:white;clear:both">_._,_._,_</div>