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


JackX Lin
 

BIOS should not reordering cpu processor_uid

Signed-off-by: JackX Lin <JackX.Lin@...>
Cc: Chasel Chiu <chasel.chiu@...>
Cc: Dong Eric <eric.dong@...>
Cc: Jiewen Yao <jiewen.yao@...>
Cc: Ray Ni <ray.ni@...>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@...>
Cc: Donald Kuo <Donald.Kuo@...>
Cc: Chandana C Kumar <chandana.c.kumar@...>
Cc: JackX Lin <JackX.Lin@...>
---
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

Join devel@edk2.groups.io to automatically receive all group messages.