From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web09.8408.1659458249063349435 for ; Tue, 02 Aug 2022 09:37:29 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=WPRWNQlS; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: chandana.c.kumar@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1659458249; x=1690994249; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=nb98h57fAxZ22cK7QqICIMY8NzZL8OwA/U4+RXieGGY=; b=WPRWNQlST9ZQoKgg/A4mHSRvyOtJr6wQrHqjjZNOEf7cV7da8h0kYQQW tBjkrK9/KyzMzdAz5vK/geMAFe7hQaY2m86vcxLaEeiQ77hx8g1RM4IVT EB9azm7e6XzK4Mk0uY/G9sEwHIZKpfEbUYk7Nu7EgbkBRJ9AhwvNSQWZB 9pg81M1YuPpKoNzGIIzDfGyD5kticFzgNx95SMwJXaX3WAg5D5pdyKm+H 06R3+TBLFWg9kqfU5qn7pbp6/TtTL35Z5VQnwKqBWZIOOk6pMVdBe5pVu U655HqkjqpwsiQzPfk+x50Qc8pc44b9Tj7XWHk/4zbS5A9kPITvDePijf g==; X-IronPort-AV: E=McAfee;i="6400,9594,10427"; a="353464951" X-IronPort-AV: E=Sophos;i="5.93,211,1654585200"; d="scan'208";a="353464951" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Aug 2022 09:37:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,211,1654585200"; d="scan'208";a="848264630" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga006.fm.intel.com with ESMTP; 02 Aug 2022 09:37:28 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Tue, 2 Aug 2022 09:37:27 -0700 Received: from orsmsx606.amr.corp.intel.com (10.22.229.19) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Tue, 2 Aug 2022 09:37:27 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28 via Frontend Transport; Tue, 2 Aug 2022 09:37:27 -0700 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (104.47.51.46) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.28; Tue, 2 Aug 2022 09:37:25 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AQbigJZdvSNbv++zV45DGhQg/hYH/8nFpqE8xK/J4iMShWig9hzyZCf2B/TRLtutzQASK2sHXTJtNqRKov+3QxExE2Q8pa9JOS7vfPpYkvkwY1KGQ/33nK4SXJMcYqZwGSD99ZozrYQ+qUcJsl/PQttfAs0fzXIb6lXZGK6jD1k+KdkEp8dYw8lsLEU/sacofhFupJqKw5e21a/ZG4t8heDBc0tQP1hCKuHIYzJqDmy94IO3FJaGONyxaZOqYqyH5Jac9n/0ahSZCurN2v8YDDOCoKqQXrloFMQmgVpoSsZ/Qy/aunO5vj14v4EjV4PKdr/LUSEjzxeu4Tv4BYNTMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Wv8X5KPoZCPs+1vy3EJrudZq549Zirho5ipMJ/gav/k=; b=dqPw0jGCHLnIVzEkgJzXHANbznuIR3RBh2RXiEiHpLJ4wRCgkQE0BuCkEErUPi+Fk7eVnamC/9HPUI/dZoOtGq84pw8UTsoJQM7VjW6Er92Ms/k4acZybVJHQ/FNdoyHy0EL6iELkdXsFK2nG/KooHO9Ju0PNlcqW/wgvaLyn8DuO7QeSoM231b4+bKxd8Brmekq/wT7ciAs9oXJD4+/6kYLUvljHWu5sYhtW+QdQ/PQAK1PM8KIwwOx0/SuSHs1SgW4x5eupqCEBbI1H8CHbgv8F24vsFlVVRcQF2if7TaFwZRiUSdIgV9KCo2bQrFrBqZipc9sYXlCH+gHhOKOqg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from MW5PR11MB5883.namprd11.prod.outlook.com (2603:10b6:303:19f::15) by SN7PR11MB6749.namprd11.prod.outlook.com (2603:10b6:806:267::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5482.14; Tue, 2 Aug 2022 16:37:23 +0000 Received: from MW5PR11MB5883.namprd11.prod.outlook.com ([fe80::644c:7c4f:d7d3:6e85]) by MW5PR11MB5883.namprd11.prod.outlook.com ([fe80::644c:7c4f:d7d3:6e85%8]) with mapi id 15.20.5482.006; Tue, 2 Aug 2022 16:37:23 +0000 From: "Kumar, Chandana C" To: "Lin, JackX" , "devel@edk2.groups.io" CC: "Chiu, Chasel" , "Dong, Eric" , "Yao, Jiewen" , "Ni, Ray" , "Chaganty, Rangasai V" , "Kuo, Donald" , "Palakshareddy, Lavanya C" , "Palakshareddy, Lavanya C" Subject: Re: [edk2-platforms:PATCH] Modify processor _UID ordering by CPU default fused in MADT Thread-Topic: [edk2-platforms:PATCH] Modify processor _UID ordering by CPU default fused in MADT Thread-Index: AQHYolM1pL0YwUbkH0GpwpKugOEAUK2b1ymA Date: Tue, 2 Aug 2022 16:37:23 +0000 Message-ID: References: <20220728072442.1439-1-jackx.lin@intel.com> In-Reply-To: <20220728072442.1439-1-jackx.lin@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.6.500.17 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d4e86303-ae05-47a5-df52-08da74a54700 x-ms-traffictypediagnostic: SN7PR11MB6749:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: JXF+fTb+SucYSizEACTLTmp6RxolvVi56ilj52KXkX2CnbOVPrcVwkummOyVObJZ+vBo805uaDfjTtRj4Df+1bX354WEcOHIJvHoBo2h5vpF+v7MHF6/3Z+Tx86ZOc9TnyZOL6WXXZDRzovbco6wrI0NAFZ4pWI+RopJjB6DC9UqWXvWscu8bCfkSAytvsJ8pewTL3pg+aF5YPv9191ltJ3306m+5yZBAR0yZu+Rp4tcHTfk40KG0vE/cyMbrpWoe1/El+1+/pToUN2JJmcXkH4kywsa7sW0xyl2QAUkcJc7Fpce+u9zvCdANDDuUmhrW5ofJ14BTa809qdlptbFHA/u0hasIG3B6+kb8e3ZLAOlmDdvxpFGSvEpH/iB8bHsQYFIj/R/9Bb7EcvH6db+CYrbcRI1Q3tfwdxBAzy0DnK+1yNaJPVk/TuXAzb2V2jBQ7iVle2AJxmHw5ToLK4fxTAllbfksIPcRDax/chHJP/0KO+1qB9TOviOYQ9VyfKvzkU+FPf8HTdw6IcdZzh32V55M2TwKH00KAOSTBSw9TwyW1XiZgoRsTGnJzTdgPGdjDTVLK3um6IJ2UE+4PoGwz9mzllgiFmgcsgwYBT+YsXgrb8Qjwj0IkfDpLq/nojEH5FrRQqI0CRLxto9fBQo1mLmpB2AoXVxS/vM0u3D88Cggu+A6rdUUbZwEra1gquO6wBVzYN86Gi7qFx2BFtrICVVLeqnILS71jWLfo/otb1SpHI3z/oivnhlCVrEMlPrWrZexkndjAPUlmUUvryuqWDycprXwTFv5Xh6OybVEd0= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW5PR11MB5883.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(376002)(346002)(366004)(39860400002)(396003)(136003)(107886003)(38100700002)(52536014)(33656002)(55236004)(7696005)(6506007)(9686003)(122000001)(26005)(71200400001)(53546011)(82960400001)(66556008)(41300700001)(478600001)(66446008)(66476007)(64756008)(5660300002)(2906002)(38070700005)(76116006)(86362001)(8676002)(83380400001)(8936002)(4326008)(54906003)(316002)(110136005)(186003)(55016003)(66946007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?UtstKDF+82DGmL/iSAPGfOpldjbYl7bhtI1G8Sdql6gykHcq6KcGM/zD35ce?= =?us-ascii?Q?cW/yqfvsYbQB/jZhgHSXj8cFbwSgPfsn+Rz0TO+bgaIyrm95yOTXSB8V3VV9?= =?us-ascii?Q?4hobW74avqAsnseJdGCMCSDd2uNOUYMeFtOay8A2xuM/2HXVNZwd570fFzrf?= =?us-ascii?Q?aiyrl82lclPuX6gJID44yacfl4qUVZY/tHtxpot3itwompfkUx/XY8qyLdi2?= =?us-ascii?Q?ZSrkuF7rPP+qoYAhSzV9O5ezrD7CHDxhrZUn1/Uj8qrCRfNdt6C92MQkmuv4?= =?us-ascii?Q?tNc//fZX3Uvp/nPXUX4Mk/+x+nWMJORmzjJXaceboJcHca305YfLkDDq/PGl?= =?us-ascii?Q?rwDeOPmkbGpJ5sz3/vQ0EDMaI2F4DR4TxLdVWwQdyYWVoEKbYP7Hn4YWCdy1?= =?us-ascii?Q?KTDHSQlth4ufyfbqi2RHxOmRA9PFUKyEsiLxc/TkUdifK+LhVgC2MGUI6va2?= =?us-ascii?Q?G4n6LXRpWMNieKycTTdJRRusFvfDoR6v6vyvuo47QXWz2gDBRyAbDbKdnZOR?= =?us-ascii?Q?9IxAjsBXrvDXXmt6MK9fFRwTg8mzBvWsoMxJZCBwxT47xt7L2LTcO2XySTGu?= =?us-ascii?Q?z8LXa6HQjlS1UOA+dAGU2cW2ihfGXMmf8llrfzQ7Uebm+Xc7Eo86DPaZoNze?= =?us-ascii?Q?BnKDAVfPMlGGUEh44B62g5sKziyYTt2QfWrGl33PltMSK2B88mO8UU3/Q0VV?= =?us-ascii?Q?VFx4DcXRrw5vgJF1bVyjlcJsQHhy1cSodgzH3Alq28uLt1GwGh26CTbkpaKm?= =?us-ascii?Q?kOLu8cy8+daEEBfKGmIw4Csk//pFgFwNS81X7XT6V0D2drEgJzJNuN+Tq8Z4?= =?us-ascii?Q?z0f9A5CH/kvBjda4yOvXXlP3uAkdxlMCnBaV9TC05KJvansanKiqF8WmMnjw?= =?us-ascii?Q?Z5UxzGzmC/7WLlSePVuNenwqWK/e8HKn42joammdP6aDaAqikPMnG8ebM0X8?= =?us-ascii?Q?pHj9cfnw4VZno43Lag33tkiRoRU9mhfvk2rFlVFtw4X1mnap/+ubP4v9Vhys?= =?us-ascii?Q?DDq61J6pLTt+Hv3+vXVSCLxsodk7+eYM+nGoBEKTXOy7xErxa7XczyUoLrdf?= =?us-ascii?Q?VxGOr9AsXWbviXFcdVfKTtgJ0eA0PeJju4CKG8607mVcp3QgMyCa/oj7a/Xq?= =?us-ascii?Q?QUHyzRBbAhsB4UXEc2zcI6uNJA/EOaoQCYZzOAjncxYHBQc+o6ecaE2zWleo?= =?us-ascii?Q?lUkSrA8IjOJQ571RoMbMIbaYaHS0+erafuKlo6eTBfBajuUMCpAQgBlFyuf7?= =?us-ascii?Q?fKHbY03kMBOwyHHLHknP5XXEIE02OH/2IPaoKy34IhHmvTfgVcH7ZW/M9oiP?= =?us-ascii?Q?7sKHGwlXqBTB16swI1vSlKy6DVosSCCEhUgVUjOlbqBSeWe+xBOOGb1hREhj?= =?us-ascii?Q?6xXODnZU5NByiHos2d3tJ/l16tFA1r+4ATFkR6OecHcpLAoVSgxuUjxJAzWF?= =?us-ascii?Q?kWIuIURk3I/AHx6hq+8/u1ZFnV2qcZS5qVftsgPbLQ/gsAPDIm7Yhf6VSOY8?= =?us-ascii?Q?ExcnS1owbU3S8yTErzAzI0QZAHfz4ldZ01OeVKnPnPrYX2nUryWXaobfPOjn?= =?us-ascii?Q?LPuZY1ZoXNDITLoTtaFhF6IrpvPcPWSg4piESWLUHMZJpCdLgDweTgh+E3UB?= =?us-ascii?Q?rg=3D=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW5PR11MB5883.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d4e86303-ae05-47a5-df52-08da74a54700 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Aug 2022 16:37:23.5699 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: M4wyw6Ab+svpqpyUmyLZkB7P7pjivwYFZIhSHP/ilNcytWPb2+JWd5IXY3ShbA7Rice0KpXvXF6p3IUYTZOXJQPNFEZ51hS769FDPY6Sqds= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR11MB6749 Return-Path: chandana.c.kumar@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Kumar, Chandana C > -----Original Message----- > From: Lin, JackX > Sent: Thursday, July 28, 2022 12:55 PM > To: devel@edk2.groups.io > Cc: Lin, JackX ; Lin, JackX ; C= hiu, > Chasel ; Dong, Eric ; Yao, Ji= ewen > ; Ni, Ray ; Chaganty, Rangasai V > ; Kuo, Donald ; Kuma= r, > Chandana C ; Palakshareddy; Palakshareddy, > Lavanya C > Subject: [edk2-platforms:PATCH] Modify processor _UID ordering by CPU def= ault > fused in MADT >=20 > BIOS should not reordering cpu processor_uid >=20 > Signed-off-by: JackX Lin > Cc: Chasel Chiu > Cc: Dong Eric > Cc: Jiewen Yao > Cc: Ray Ni > Cc: Rangasai V Chaganty > Cc: Donald Kuo > Cc: Chandana C Kumar > Cc: Palakshareddy, Lavanya C > Cc: JackX Lin > --- > Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c | 99 ++++--= ----------- > -------------------------------------------------------------------------= --------- > 1 file changed, 4 insertions(+), 95 deletions(-) >=20 > diff --git a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c > b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c > index c7e87cbd7d..d0e8891918 100644 > --- a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c > +++ b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c > @@ -62,33 +62,6 @@ EFI_CPU_ID_ORDER_MAP *mCpuApicIdOrderTable > =3D NULL; > UINTN mNumberOfCpus =3D 0; > UINTN mNumberOfEnabledCPUs =3D 0; >=20 > - > -/** > - The function is called by PerformQuickSort to compare int values. > - > - @param[in] Left The pointer to first buffer. > - @param[in] Right The pointer to second buffer. > - > - @return -1 Buffer1 is less than Buffer2. > - @return 1 Buffer1 is greater than Buffer2. > - > -**/ > -INTN > -EFIAPI > -ApicIdCompareFunction ( > - IN CONST VOID *Left, > - IN CONST VOID *Right > - ) > -{ > - UINT32 LeftApicId; > - UINT32 RightApicId; > - > - LeftApicId =3D ((EFI_CPU_ID_ORDER_MAP *) Left)->ApicId; > - RightApicId =3D ((EFI_CPU_ID_ORDER_MAP *) Right)->ApicId; > - > - return (LeftApicId > RightApicId)? 1 : (-1); -} > - > /** > Print Cpu Apic ID Table >=20 > @@ -168,21 +141,16 @@ SortCpuLocalApicInTable ( > EFI_PROCESSOR_INFORMATION ProcessorInfoBuffer; > UINT32 Index; > UINT32 CurrProcessor; > - UINT32 BspApicId; > - EFI_CPU_ID_ORDER_MAP TempVal; > EFI_CPU_ID_ORDER_MAP *CpuIdMapPtr; > UINT32 CoreThreadMask; > - EFI_CPU_ID_ORDER_MAP *TempCpuApicIdOrderTable; > UINT32 Socket; >=20 > - Index =3D 0; > Status =3D EFI_SUCCESS; >=20 > if (mCpuOrderSorted) { > return Status; > } >=20 > - TempCpuApicIdOrderTable =3D AllocateZeroPool (mNumberOfCpus * sizeof > (EFI_CPU_ID_ORDER_MAP)); > CoreThreadMask =3D (UINT32) ((1 << mNumOfBitShift) - 1); >=20 > for (CurrProcessor =3D 0, Index =3D 0; CurrProcessor < mNumberOfCpus; > CurrProcessor++, Index++) { @@ -192,7 +160,7 @@ SortCpuLocalApicInTable ( > &ProcessorInfoBuffer > ); >=20 > - CpuIdMapPtr =3D (EFI_CPU_ID_ORDER_MAP *) > &TempCpuApicIdOrderTable[Index]; > + CpuIdMapPtr =3D (EFI_CPU_ID_ORDER_MAP *) > + &mCpuApicIdOrderTable[Index]; > if ((ProcessorInfoBuffer.StatusFlag & PROCESSOR_ENABLED_BIT) !=3D 0)= { > CpuIdMapPtr->ApicId =3D (UINT32)ProcessorInfoBuffer.ProcessorId; > CpuIdMapPtr->Thread =3D ProcessorInfoBuffer.Location.Thread; > @@ -214,74 +182,16 @@ SortCpuLocalApicInTable ( > } //end if PROC ENABLE > } //end for CurrentProcessor >=20 > - //keep for debug purpose > DEBUG ((DEBUG_INFO, "::ACPI:: APIC ID Order Table Init. CoreThreadM= ask > =3D %x, mNumOfBitShift =3D %x\n", CoreThreadMask, mNumOfBitShift)); > - DebugDisplayReOrderTable (TempCpuApicIdOrderTable); >=20 > // > // Get Bsp Apic Id > // > - BspApicId =3D GetApicId (); > - DEBUG ((DEBUG_INFO, "BspApicId - 0x%x\n", BspApicId)); > - > - // > - //check to see if 1st entry is BSP, if not swap it > - // > - if (TempCpuApicIdOrderTable[0].ApicId !=3D BspApicId) { > - for (Index =3D 0; Index < mNumberOfCpus; Index++) { > - if ((TempCpuApicIdOrderTable[Index].Flags =3D=3D 1) && > (TempCpuApicIdOrderTable[Index].ApicId =3D=3D BspApicId)) { > - CopyMem (&TempVal, &TempCpuApicIdOrderTable[Index], sizeof > (EFI_CPU_ID_ORDER_MAP)); > - CopyMem (&TempCpuApicIdOrderTable[Index], > &TempCpuApicIdOrderTable[0], sizeof (EFI_CPU_ID_ORDER_MAP)); > - CopyMem (&TempCpuApicIdOrderTable[0], &TempVal, sizeof > (EFI_CPU_ID_ORDER_MAP)); > - break; > - } > - } > - > - if (mNumberOfCpus <=3D Index) { > - DEBUG ((DEBUG_ERROR, "Asserting the SortCpuLocalApicInTable Index > Bufferflow\n")); > - return EFI_INVALID_PARAMETER; > - } > - } > - > - // > - // 1. Sort TempCpuApicIdOrderTable, > - // sort it by using ApicId from minimum to maximum (Socket0 to Sock= etN), and > the BSP must in the fist location of the table. > - // So, start sorting the table from the second element and total el= ements are > mNumberOfCpus-1. > - // > - PerformQuickSort ((TempCpuApicIdOrderTable + 1), (mNumberOfCpus - 1), > sizeof (EFI_CPU_ID_ORDER_MAP), (SORT_COMPARE) > ApicIdCompareFunction); > + DEBUG ((DEBUG_INFO, "BspApicId - 0x%x\n", GetApicId ())); >=20 > - // > - // 2. Sort and map the primary threads to the front of the CpuApicIdOr= derTable > - // > - for (CurrProcessor =3D 0, Index =3D 0; Index < mNumberOfCpus; Index++)= { > - if ((TempCpuApicIdOrderTable[Index].Thread) =3D=3D 0) { // primary t= hread > - CopyMem (&mCpuApicIdOrderTable[CurrProcessor], > &TempCpuApicIdOrderTable[Index], sizeof (EFI_CPU_ID_ORDER_MAP)); > - CurrProcessor++; > - } > - } >=20 > // > - // 3. Sort and map the second threads to the middle of the CpuApicIdOr= derTable > - // > - for (Index =3D 0; Index < mNumberOfCpus; Index++) { > - if ((TempCpuApicIdOrderTable[Index].Thread) =3D=3D 1) { //second thr= ead > - CopyMem (&mCpuApicIdOrderTable[CurrProcessor], > &TempCpuApicIdOrderTable[Index], sizeof (EFI_CPU_ID_ORDER_MAP)); > - CurrProcessor++; > - } > - } > - > - // > - // 4. Sort and map the not enabled threads to the bottom of the > CpuApicIdOrderTable > - // > - for (Index =3D 0; Index < mNumberOfCpus; Index++) { > - if (TempCpuApicIdOrderTable[Index].Flags =3D=3D 0) { // not enabled > - CopyMem (&mCpuApicIdOrderTable[CurrProcessor], > &TempCpuApicIdOrderTable[Index], sizeof (EFI_CPU_ID_ORDER_MAP)); > - CurrProcessor++; > - } > - } > - > - // > - // 5. Re-assign AcpiProcessorId for AcpiProcessorUid uses purpose. > + // Fill in AcpiProcessorUid. > // > for (Socket =3D 0; Socket < FixedPcdGet32 (PcdMaxCpuSocketCount); Sock= et++) > { > for (CurrProcessor =3D 0, Index =3D 0; CurrProcessor < mNumberOfCpus= ; > CurrProcessor++) { @@ -292,8 +202,7 @@ SortCpuLocalApicInTable ( > } > } >=20 > - //keep for debug purpose > - DEBUG ((DEBUG_INFO, "APIC ID Order Table ReOrdered\n")); > + DEBUG ((DEBUG_INFO, "::ACPI:: APIC ID Order Table Init. CoreThreadM= ask > =3D %x, mNumOfBitShift =3D %x\n", CoreThreadMask, mNumOfBitShift)); > DebugDisplayReOrderTable (mCpuApicIdOrderTable); >=20 > mCpuOrderSorted =3D TRUE; > -- > 2.32.0.windows.2