From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 91AC59411A1 for ; Tue, 2 Apr 2024 06:49:57 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=reQosu6TvH337YZJuPMmTZ0as42xCvRnvNLlda/fDrA=; c=relaxed/simple; d=groups.io; h=From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20240206; t=1712040596; v=1; b=wwmMZx2uKZcJ1JYehOGTB3x1hIhTf+qxHZiilGzyjNUlBjQGRgpP83vrgU1xYDsfcc6w2eYZ U4oDiVWitgS3ogKIO/0up7ES35DYv/ZTOjKjQCbkE6unIPKibJYUePv5VMxo02zQNSMs7WkaoeU NqHrurqPQLrW43VwIbemAndCZRjB5VnUiINOyD3q/XZ/XxKaRfKiJQom8A4Rcmm7Kmznd3lLfzo hg1ubBNCN0ECO2+wTORdYb1cJoFJ9lw/l/V9ejr7bCuXUSBNeLobs8kqnFPNnhHEZWK2wP/ZlnO uxjihx4FchP5nMFyQaVsFRPj04kbiokazGKj7/N4UBxyA== X-Received: by 127.0.0.2 with SMTP id 6DBNYY7687511xcp82bZBNYw; Mon, 01 Apr 2024 23:49:56 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) by mx.groups.io with SMTP id smtpd.web10.6318.1712040595794993188 for ; Mon, 01 Apr 2024 23:49:55 -0700 X-CSE-ConnectionGUID: VAJXXVmVRK6pwgII9KHRtg== X-CSE-MsgGUID: pIF5xT86QSqy3ra7PTG+Xg== X-IronPort-AV: E=McAfee;i="6600,9927,11031"; a="17811518" X-IronPort-AV: E=Sophos;i="6.07,174,1708416000"; d="scan'208";a="17811518" X-Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Apr 2024 23:49:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,174,1708416000"; d="scan'208";a="18048882" X-Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmviesa008.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 01 Apr 2024 23:49:55 -0700 X-Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Mon, 1 Apr 2024 23:49:54 -0700 X-Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Mon, 1 Apr 2024 23:49:54 -0700 X-Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.100) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Mon, 1 Apr 2024 23:49:52 -0700 X-Received: from BN9PR11MB5483.namprd11.prod.outlook.com (2603:10b6:408:104::10) by SN7PR11MB6921.namprd11.prod.outlook.com (2603:10b6:806:2a8::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.21; Tue, 2 Apr 2024 06:49:49 +0000 X-Received: from BN9PR11MB5483.namprd11.prod.outlook.com ([fe80::5561:25ad:2b29:d5c]) by BN9PR11MB5483.namprd11.prod.outlook.com ([fe80::5561:25ad:2b29:d5c%7]) with mapi id 15.20.7452.019; Tue, 2 Apr 2024 06:49:49 +0000 From: "Chiu, Chasel" To: "Tan, Dun" , "devel@edk2.groups.io" CC: "Ni, Ray" , "Lou, Yun" , "Desimone, Nathaniel L" , Liming Gao , "Dong, Eric" Subject: Re: [edk2-devel] [edk2-platforms V2 2/3] MinPlatformPkg: Get CoreType for all cores Thread-Topic: [edk2-platforms V2 2/3] MinPlatformPkg: Get CoreType for all cores Thread-Index: AQHag/p69CqGZ5F8IkesbnM9/6MQNLFUi+6g Date: Tue, 2 Apr 2024 06:49:49 +0000 Message-ID: References: <20240401060411.899-1-dun.tan@intel.com> <20240401060411.899-3-dun.tan@intel.com> In-Reply-To: <20240401060411.899-3-dun.tan@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BN9PR11MB5483:EE_|SN7PR11MB6921:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: b6+/SJeHabdDGmNbvbkZq2Yxqa+9kyhvWaMAIZnSlpGVDBLLqdQqeaYoXj1b4nvFcpgVbVKbTj/87Md3VEKW8DYH5S4Lu2/10A/lQweskb3ojDSaIkV5BJmsg1jtbAh+Q1Zv3CEai296KPehmmTtRWQNJUYIOPZ/9FGYYDSx+vKPjaj1AdFVAtDa33nF6iU80SJnowl+KRdkxS8p4IHTKs2bhjpzjqJYSup3bszQxAnrpU/KFwnY/ByWDrI+z2Yi8Y6w0g3sauWOqmh2ETTnRWBSOx2uUEyakG9vYMVGS8dwoZnbn12PM9N5CS0e9TjTN2FUdpKqpGK3KUHXxhJyCT907BJlybVeP/ErG54AFUi2Ty+WcATYinZMhdWMGzhUqzN+SOe2qQxe/X2Rqkg26wN6c4p2Bm7XwODZ7rFgxIso8AZxFEN0f/Z7WRpTrIvR/LHoWvV1sgvuc9N5OPOhSaL4mCxXgZNhIxpzAmhJjdpwvZkfbQ2lLYbcDsC5MYRQCpI/50YTT06heHceoOAJKuft9SGW0i3ypwweMcsjjBQMRuO8ySdHjIlrwUb0MnCPxhJkm3QGZmkpxvAU7v1N0eoIA76uGSlL2r76C4UQ+iLS+9ODgEmndw6VlPxQGLUIVDty3VVEmAdJ0rSnmheNFHKhbpu6J5ckC+65Ka7g2o8= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?u9hhgI0et0D21u8O5e+eEX2VmX1OyMI4P9PqRNmHicVwsHVxK9Y8PqtbDo7q?= =?us-ascii?Q?DOakMqRZwvFm5drcQCWQ0J6fwCAy7lCcAley+GIKim/+GH3uuZBDvfg7nmpF?= =?us-ascii?Q?xDLohWtGTHcgsW3SjzC6yyQKgNzOGyAuHFxkwyB3uDM6tXFqHVrUYPUHc5tn?= =?us-ascii?Q?TTYmrLC0Pd8qaiTYiSEsSXF2IILIX/8MWs4NJGHx47PukECdX5x9yF0kiEnO?= =?us-ascii?Q?Iv2M4QHIE9NjQGaDeqwmA+dOACCQgwhLrMqrrEYqRu6ya3iAMbwzxYWf1UAP?= =?us-ascii?Q?p09iYxX+4ubhCp9k3r7FVXvKm8GFFtYwxvwrVBU+PJgCzuZmU7/g3CZqeE5N?= =?us-ascii?Q?kv38hobSKV7vk8748u++7BQ3OsqtS+vLwkGiCLUplwRmHu418d/YNSPUMiI0?= =?us-ascii?Q?3lte7kSPDg+m84syqJmm5+uloY4CktYFRQNdObqM9sJAbdIPNx7hoOpbQ69c?= =?us-ascii?Q?XlX+MXX/Hm6pMDT+ooGbcpCTJnkdOHzC0/yvpqqcytcURpDGdSXejL8aPpj9?= =?us-ascii?Q?QnAYfCJ1ygoyjO9QzjLdAS+SvEevMHsM5sIVN1dUVIv6nHC4l3ekD5bWKJvN?= =?us-ascii?Q?O18t+PxhT8Mjj0aaBpvrC/V7dMwxp4OE4h44OKQFOBDSQaBkbbty4RZfUuwn?= =?us-ascii?Q?HY2bcF554U9j1aFE1rQHfR4mDoIPQTpxc9j/swDfcZTu144adqmoF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TgJrJawg6j9cSxWuhW+wW6gpVaj?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN9PR11MB5483.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f129b22b-7ce0-4fb3-ff66-08dc52e11770 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Apr 2024 06:49:49.3626 (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: f4ju2XqUgZDQsLvhxZIYNjBQgEBUJJ7QQNRoQZLw+FlNmub7NYO6KCUKXTKqGP0LCySgBBr/wt/IecfQYBx3ZA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR11MB6921 X-OriginatorOrg: intel.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Mon, 01 Apr 2024 23:49:55 -0700 Resent-From: chasel.chiu@intel.com Reply-To: devel@edk2.groups.io,chasel.chiu@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: MHlnqZ9FliXO8wvCUDPurEXFx7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=wwmMZx2u; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Reviewed-by: Chasel Chiu Thanks, Chasel > -----Original Message----- > From: Tan, Dun > Sent: Sunday, March 31, 2024 11:04 PM > To: devel@edk2.groups.io > Cc: Ni, Ray ; Lou, Yun ; Chiu, Chase= l > ; Desimone, Nathaniel L > ; Liming Gao ; > Dong, Eric > Subject: [edk2-platforms V2 2/3] MinPlatformPkg: Get CoreType for all cor= es >=20 > Add a new field CoreType in EFI_CPU_ID_ORDER_MAP and get CoreType for all > cores. >=20 > Signed-off-by: Dun Tan > Cc: Ray Ni > Cc: Jason Lou > Cc: Chasel Chiu > Cc: Nate DeSimone > Cc: Liming Gao > Cc: Eric Dong > --- > Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c | 50 > ++++++++++++++++++++++++++++++++++++++++++++++---- > 1 file changed, 46 insertions(+), 4 deletions(-) >=20 > diff --git a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c > b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c > index 62a7da290a..1fa70e3df9 100644 > --- a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c > +++ b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c > @@ -18,6 +18,7 @@ typedef struct { > UINT32 Flags; > UINT32 SocketNum; > UINT32 Thread; > + UINT8 CoreType; > } EFI_CPU_ID_ORDER_MAP; >=20 > // > @@ -71,15 +72,16 @@ DebugDisplayReOrderTable ( { > UINT32 Index; >=20 > - DEBUG ((DEBUG_INFO, "Index AcpiProcId ApicId Thread Flags Skt\n= ")); > + DEBUG ((DEBUG_INFO, "Index AcpiProcId ApicId Thread Flags Skt > CoreType\n")); > for (Index =3D 0; Index < mNumberOfCpus; Index++) { > - DEBUG ((DEBUG_INFO, " %02d 0x%02X 0x%02X %d %d= %d\n", > + DEBUG ((DEBUG_INFO, " %02d 0x%02X 0x%02X %d %d= %d > 0x%x\n", > Index, > CpuApicIdOrderTable[Index].AcpiProcessorUid, > CpuApicIdOrderTable[Index].ApicId, > CpuApicIdOrderTable[Index].Thread, > CpuApicIdOrderTable[Index].Flags, > - CpuApicIdOrderTable[Index].SocketNum)); > + CpuApicIdOrderTable[Index].SocketNum, > + CpuApicIdOrderTable[Index].CoreType)); > } > } >=20 > @@ -130,6 +132,31 @@ AppendCpuMapTableEntry ( >=20 > } >=20 > +/** > + Get CPU core type. > + > + @param[in] CpuApicIdOrderTable Point to a buffer which will be= filled in > Core type information. > +**/ > +VOID > +EFIAPI > +CollectCpuCoreType ( > + IN EFI_CPU_ID_ORDER_MAP *CpuApicIdOrderTable > + ) > +{ > + UINTN ApNumber; > + EFI_STATUS Status; > + CPUID_NATIVE_MODEL_ID_AND_CORE_TYPE_EAX > NativeModelIdAndCoreTypeEax; > + > + Status =3D mMpService->WhoAmI ( > + mMpService, > + &ApNumber > + ); > + ASSERT_EFI_ERROR (Status); > + > + AsmCpuidEx (CPUID_HYBRID_INFORMATION, > +CPUID_HYBRID_INFORMATION_MAIN_LEAF, > +&NativeModelIdAndCoreTypeEax.Uint32, NULL, NULL, NULL); > + CpuApicIdOrderTable[ApNumber].CoreType =3D > +(UINT8)NativeModelIdAndCoreTypeEax.Bits.CoreType; > +} > + > /** > Collect all processors information and create a Cpu Apic Id table. >=20 > @@ -146,8 +173,23 @@ CreateCpuLocalApicInTable ( > UINT32 CurrProcessor; > EFI_CPU_ID_ORDER_MAP *CpuIdMapPtr; > UINT32 Socket; > + UINT32 CpuidMaxInput; >=20 > - Status =3D EFI_SUCCESS; > + Status =3D EFI_SUCCESS; > + > + AsmCpuid (CPUID_SIGNATURE, &CpuidMaxInput, NULL, NULL, NULL); if > + (CpuidMaxInput >=3D CPUID_HYBRID_INFORMATION) { > + CollectCpuCoreType (CpuApicIdOrderTable); > + mMpService->StartupAllAPs ( > + mMpService, // This > + (EFI_AP_PROCEDURE) CollectCpuCoreType, // Procedure > + TRUE, // SingleThr= ead > + NULL, // WaitEvent > + 0, // TimeoutIn= Microsecsond > + CpuApicIdOrderTable, // Procedure= Argument > + NULL // FailedCpu= List > + ); > + } >=20 > for (CurrProcessor =3D 0, Index =3D 0; CurrProcessor < mNumberOfCpus; > CurrProcessor++, Index++) { > Status =3D mMpService->GetProcessorInfo ( > -- > 2.31.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#117328): https://edk2.groups.io/g/devel/message/117328 Mute This Topic: https://groups.io/mt/105259124/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-