public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-platforms:PATCH V1] Platform/Intel: Fix macro re-defined
@ 2021-08-30  9:55 JackX Lin
  0 siblings, 0 replies; only message in thread
From: JackX Lin @ 2021-08-30  9:55 UTC (permalink / raw)
  To: devel
  Cc: Chasel Chiu, Dong Eric, Jiewen Yao, Ray Ni, Rangasai V Chaganty,
	Donald Kuo, Chandana C Kumar

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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-30  9:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-30  9:55 [edk2-platforms:PATCH V1] Platform/Intel: Fix macro re-defined JackX Lin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox