[edk2-devel] [edk2-platforms: PATCH] Modify processor _UID ordering by CPU default fused in MADT

JackX Lin posted 1 patch 1 year, 9 months ago
Failed in applying to current master (apply log)
Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
[edk2-devel] [edk2-platforms: PATCH] Modify processor _UID ordering by CPU default fused in MADT
Posted by JackX Lin 1 year, 9 months ago
BIOS should not reordering cpu processor_uid

Signed-off-by: JackX Lin <JackX.Lin@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Dong Eric <eric.dong@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
Cc: Donald Kuo <Donald.Kuo@intel.com>
Cc: Chandana C Kumar <chandana.c.kumar@intel.com>
Cc: JackX Lin <JackX.Lin@intel.com>
---
 Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
index c7e87cbd7d..f4c45336c5 100644
--- a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
+++ b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
@@ -173,7 +173,6 @@ SortCpuLocalApicInTable (
   EFI_CPU_ID_ORDER_MAP                      *CpuIdMapPtr;
   UINT32                                    CoreThreadMask;
   EFI_CPU_ID_ORDER_MAP                      *TempCpuApicIdOrderTable;
-  UINT32                                    Socket;
 
   Index      = 0;
   Status     = EFI_SUCCESS;
@@ -198,6 +197,7 @@ SortCpuLocalApicInTable (
       CpuIdMapPtr->Thread  = ProcessorInfoBuffer.Location.Thread;
       CpuIdMapPtr->Flags   = ((ProcessorInfoBuffer.StatusFlag & PROCESSOR_ENABLED_BIT) != 0);
       CpuIdMapPtr->SocketNum = ProcessorInfoBuffer.Location.Package;
+      CpuIdMapPtr->AcpiProcessorUid = (ProcessorInfoBuffer.Location.Package << mNumOfBitShift) + CurrProcessor;
 
       //update processorbitMask
       if (CpuIdMapPtr->Flags == 1) {
@@ -280,18 +280,6 @@ SortCpuLocalApicInTable (
     }
   }
 
-  //
-  // 5. Re-assign AcpiProcessorId for AcpiProcessorUid uses purpose.
-  //
-  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 = (mCpuApicIdOrderTable[CurrProcessor].SocketNum << mNumOfBitShift) + Index;
-        Index++;
-      }
-    }
-  }
-
   //keep for debug purpose
   DEBUG ((DEBUG_INFO, "APIC ID Order Table ReOrdered\n"));
   DebugDisplayReOrderTable (mCpuApicIdOrderTable);
-- 
2.32.0.windows.2



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