Reviewed-by: Nate DeSimone <[email protected]>

-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Abdul Lateef 
Attar via groups.io
Sent: Friday, October 22, 2021 7:48 AM
To: [email protected]
Cc: Chiu, Chasel <[email protected]>; Desimone, Nathaniel L 
<[email protected]>; Liming Gao <[email protected]>; Dong, 
Eric <[email protected]>
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 <[email protected]>
Cc: Nate DeSimone <[email protected]>
Cc: Liming Gao <[email protected]>
Cc: Eric Dong <[email protected]>
Signed-off-by: Abdul Lateef Attar <[email protected]>
---
 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: [email protected]
Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to