Reviewed-by: Nate DeSimone <nathaniel.l.desim...@intel.com>

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Abdul Lateef 
Attar via groups.io
Sent: Friday, October 22, 2021 7:48 AM
To: devel@edk2.groups.io
Cc: Chiu, Chasel <chasel.c...@intel.com>; Desimone, Nathaniel L 
<nathaniel.l.desim...@intel.com>; Liming Gao <gaolim...@byosoft.com.cn>; Dong, 
Eric <eric.d...@intel.com>
Subject: [edk2-devel] [edk2-platforms] [PATCH v1 2/2] MinPlatformPkg: 
AcpiProcessorUid for multi-socket

Corrects the AcpiProcessorUid for Multi socket/package.

The ProcessorInfoBuffer.Location.Package holds the stale entry of the last 
processor. In multi-socket system it holds the Socket/Package number of last 
socket/package, resulting wrong AcpiProcessorUid assignment for socket 0 
processors.

Hence do the bit shift on stored SocketNum.

Cc: Chasel Chiu <chasel.c...@intel.com>
Cc: Nate DeSimone <nathaniel.l.desim...@intel.com>
Cc: Liming Gao <gaolim...@byosoft.com.cn>
Cc: Eric Dong <eric.d...@intel.com>
Signed-off-by: Abdul Lateef Attar <abdat...@amd.com>
---
 Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c 
b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
index 032903029a95..785cf4c2f911 100644
--- a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
+++ b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
@@ -287,7 +287,7 @@ SortCpuLocalApicInTable (
   for (Socket = 0; Socket < FixedPcdGet32 (PcdMaxCpuSocketCount); Socket++) {

     for (CurrProcessor = 0, Index = 0; CurrProcessor < mNumberOfCpus; 
CurrProcessor++) {

       if (mCpuApicIdOrderTable[CurrProcessor].Flags && 
(mCpuApicIdOrderTable[CurrProcessor].SocketNum == Socket)) {

-        mCpuApicIdOrderTable[CurrProcessor].AcpiProcessorUid = 
(ProcessorInfoBuffer.Location.Package << mNumOfBitShift) + Index;

+        mCpuApicIdOrderTable[CurrProcessor].AcpiProcessorUid = 
+ (mCpuApicIdOrderTable[CurrProcessor].SocketNum << mNumOfBitShift) + 
+ Index;

         Index++;

       }

     }

--
2.25.1








-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#82739): https://edk2.groups.io/g/devel/message/82739
Mute This Topic: https://groups.io/mt/86515675/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to