[edk2-devel] [edk2-platforms:PATCH V1] Platform/Intel: Fix macro re-defined

JackX Lin posted 1 patch 2 years, 7 months ago
Failed in applying to current master (apply log)
Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
[edk2-devel] [edk2-platforms:PATCH V1] Platform/Intel: Fix macro re-defined
Posted by JackX Lin 2 years, 7 months ago
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3365

Check MAX_SOCKET exists before its creation.

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 | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
index c03d899163..5a11f426ec 100644
--- a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
+++ b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
@@ -7,7 +7,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 **/
 
 #include "AcpiPlatform.h"
+#ifndef MAX_SOCKET
 #define MAX_SOCKET (FixedPcdGet32 (PcdMaxCpuSocketCount))
+#endif
 
 #pragma pack(1)
 
@@ -213,7 +215,7 @@ SortCpuLocalApicInTable (
       CpuIdMapPtr->SocketNum = (UINT32)-1;
     } //end if PROC ENABLE
   } //end for CurrentProcessor
-  
+
   //keep for debug purpose
   DEBUG ((DEBUG_INFO, "::ACPI::  APIC ID Order Table Init.   CoreThreadMask = %x,  mNumOfBitShift = %x\n", CoreThreadMask, mNumOfBitShift));
   DebugDisplayReOrderTable (TempCpuApicIdOrderTable);
@@ -244,7 +246,7 @@ SortCpuLocalApicInTable (
   }
 
   //
-  // 1. Sort TempCpuApicIdOrderTable, 
+  // 1. Sort TempCpuApicIdOrderTable,
   //    sort it by using ApicId from minimum to maximum (Socket0 to SocketN), and the BSP must in the fist location of the table.
   //    So, start sorting the table from the second element and total elements are mNumberOfCpus-1.
   //
-- 
2.32.0.windows.2



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