代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/edk2 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 0e02ccfc4ed8424c41cd571783b3a80ee947567f Mon Sep 17 00:00:00 2001
From: jiangxin <jiangxin@hygon.cn>
Date: Sun, 10 Apr 2022 21:50:15 -0400
Subject: [PATCH 02/11] UefiCpuPkg/LocalApicLib: Exclude second SendIpi
sequence on HYGON hardware
On HYGON processors the second SendIpi in the SendInitSipiSipi and
SendInitSipiSipiAllExcludingSelf routines is not required, and may cause
undesired side-effects during MP initialization.
This patch leverages the StandardSignatureIsHygonGenuine check to exclude
the second SendIpi and its associated MicroSecondDelay (200).
Signed-off-by: Xin Jiang <jiangxin@hygon.cn>
---
UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c | 5 +++--
UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c | 5 +++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c b/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c
index d56c627..6c035ee 100644
--- a/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c
+++ b/UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c
@@ -22,6 +22,7 @@
#include <Library/TimerLib.h>
#include <Library/PcdLib.h>
#include <Library/CpuLib.h>
+#include <Register/Hygon/Cpuid.h>
//
// Library internal functions
@@ -555,7 +556,7 @@ SendInitSipiSipi (
IcrLow.Bits.DeliveryMode = LOCAL_APIC_DELIVERY_MODE_STARTUP;
IcrLow.Bits.Level = 1;
SendIpi (IcrLow.Uint32, ApicId);
- if (!StandardSignatureIsAuthenticAMD ()) {
+ if (!StandardSignatureIsAuthenticAMD () && !StandardSignatureIsHygonGenuine ()) {
MicroSecondDelay (200);
SendIpi (IcrLow.Uint32, ApicId);
}
@@ -581,7 +582,7 @@ SendInitSipiSipiAllExcludingSelf (
SendInitIpiAllExcludingSelf ();
MicroSecondDelay (PcdGet32 (PcdCpuInitIpiDelayInMicroSeconds));
SendStartupIpiAllExcludingSelf (StartupRoutine);
- if (!StandardSignatureIsAuthenticAMD ()) {
+ if (!StandardSignatureIsAuthenticAMD () && !StandardSignatureIsHygonGenuine ()) {
MicroSecondDelay (200);
SendStartupIpiAllExcludingSelf (StartupRoutine);
}
diff --git a/UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c b/UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c
index aa4eb11..2fa614c 100644
--- a/UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c
+++ b/UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c
@@ -24,6 +24,7 @@
#include <Library/PcdLib.h>
#include <Library/CpuLib.h>
#include <IndustryStandard/Tdx.h>
+#include <Register/Hygon/Cpuid.h>
//
// Library internal functions
@@ -794,7 +795,7 @@ SendInitSipiSipi (
IcrLow.Bits.DeliveryMode = LOCAL_APIC_DELIVERY_MODE_STARTUP;
IcrLow.Bits.Level = 1;
SendIpi (IcrLow.Uint32, ApicId);
- if (!StandardSignatureIsAuthenticAMD ()) {
+ if (!StandardSignatureIsAuthenticAMD () && !StandardSignatureIsHygonGenuine ()) {
MicroSecondDelay (200);
SendIpi (IcrLow.Uint32, ApicId);
}
@@ -820,7 +821,7 @@ SendInitSipiSipiAllExcludingSelf (
SendInitIpiAllExcludingSelf ();
MicroSecondDelay (PcdGet32 (PcdCpuInitIpiDelayInMicroSeconds));
SendStartupIpiAllExcludingSelf (StartupRoutine);
- if (!StandardSignatureIsAuthenticAMD ()) {
+ if (!StandardSignatureIsAuthenticAMD () && !StandardSignatureIsHygonGenuine ()) {
MicroSecondDelay (200);
SendStartupIpiAllExcludingSelf (StartupRoutine);
}
--
2.25.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。