[edk2-devel] [PATCH v1] UefiPayloadPkg: Correct MAX_LOGICAL_PROCESSORS value

Xiaoqiang Zhang posted 1 patch 1 year, 3 months ago
Failed in applying to current master (apply log)
There is a newer version of this series
UefiPayloadPkg/UefiPayloadPkg.dsc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[edk2-devel] [PATCH v1] UefiPayloadPkg: Correct MAX_LOGICAL_PROCESSORS value
Posted by Xiaoqiang Zhang 1 year, 3 months ago
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4367

Issue:
For GNR FSP API mode, when FSP does not output mCpuInitMpLibHobGuid HOB,
the code will wakeup all APs and calculate the processor count in DXE
phase. But when processor thread number is above 256, will encounter
Startup IPI exception in DXE phase.
For GNR FSP dispatch mode, without mCpuInitMpLibHobGuid HOB case,
will also have this issue.

Root cause:
MAX_LOGICAL_PROCESSORS MARCO value in UefiPayloadPkg.dsc is 256,
when the actual processor thread number is above 256, will encounter
data overflow exception.

Solution:
Align MAX_LOGICAL_PROCESSORS value with GNR platform side value 1024

Signed-off-by: Xiaoqiang Zhang <xiaoqiang.zhang@intel.com>
Cc: Guo Dong <guo.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: James Lu <james.lu@intel.com>
---
 UefiPayloadPkg/UefiPayloadPkg.dsc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc
index 35e3bfff35..bca5d3f335 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -59,7 +59,7 @@
   #
   # CPU options
   #
-  DEFINE MAX_LOGICAL_PROCESSORS       = 256
+  DEFINE MAX_LOGICAL_PROCESSORS       = 1024
 
   #
   # PCI options
-- 
2.39.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#101145): https://edk2.groups.io/g/devel/message/101145
Mute This Topic: https://groups.io/mt/97587619/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-