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 E15A77803CE for ; Mon, 1 Apr 2024 05:59:52 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=veiwDL6pswp4gaW94Uwat9cOiMCHckIiKaoN7hnbUTg=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20240206; t=1711951191; v=1; b=MmxTx61EiYadUXUccS+RLgDbaMvbDvVtqSCGjCTOMHxOx5zHSPoUW2PX5Kyr18DbgbIrsKcu SI1hCnKqAzadE0Hmo7DCZ3YsIiqOV5po+fD3+9JxfTDJ+ZGYgbkD8i6UJzezO2+msggbix63fRN PYzeuiEAuFrqexId+TOlgH24AVfw4+IxrpCIkWjmGyYz1w2OeFLT1wFoG8y+cGTduRsreErEeum /SXxF2j/XYOrXcbVOdw3s3ldtwj/nmARPB+jPEjLVz9YTO+2gIGHlszx/27HPN0ACG4UfDX3FH3 kc0ymwsyhbtVvY1l5v2YlMbpeXJwPwQlnlR90kn83ZE9g== X-Received: by 127.0.0.2 with SMTP id m9BSYY7687511xaaWkSmBqLg; Sun, 31 Mar 2024 22:59:51 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) by mx.groups.io with SMTP id smtpd.web10.31644.1711951190477772920 for ; Sun, 31 Mar 2024 22:59:50 -0700 X-CSE-ConnectionGUID: TVdkU9x8SsCJP/ff6WfSdw== X-CSE-MsgGUID: fEkkTBVUSDKuNVKwis0clw== X-IronPort-AV: E=McAfee;i="6600,9927,11030"; a="7213645" X-IronPort-AV: E=Sophos;i="6.07,171,1708416000"; d="scan'208";a="7213645" X-Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Mar 2024 22:59:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,171,1708416000"; d="scan'208";a="17685253" X-Received: from shwdeopenlab702.ccr.corp.intel.com ([10.239.55.43]) by fmviesa009-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Mar 2024 22:59:47 -0700 From: "duntan" To: devel@edk2.groups.io Cc: Ray Ni , Jason Lou , Chasel Chiu , Nate DeSimone , Liming Gao , Eric Dong Subject: [edk2-devel] [edk2-platforms V2] MinPlatformPkg: Corret AcpiProcessorUid in MADT Date: Mon, 1 Apr 2024 13:59:34 +0800 Message-Id: <20240401055934.1704-1-dun.tan@intel.com> MIME-Version: 1.0 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: Sun, 31 Mar 2024 22:59:50 -0700 Reply-To: devel@edk2.groups.io,dun.tan@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: nftqenBKuCLXIcQg2i8UtxMPx7686176AA= Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=MmxTx61E; 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 Change AcpiProcessorUid in CpuApicIdOrderTable to the index in MpService regardless of disabled core. Let's take a simple example: There are 2 enabled cores and 1 disabled core. APICID Index in MpService 0x0000_0000 0 0x0000_0010(disbaled) 1 0x0000_0040 2 With current implementation, the results of the x2apic structure entries in MADT are: MADT Entry APICID AcpiProcessorUid 0 0x0000_0000 0 1 0x0000_0040 1 The AcpiProcessorUid will be associated with the processor device defined in DSDT/SSDT. To make sure the x2apic structure entries in MADT can be mapped to the right processor devices in DSDT, the AcpiProcessorUid of the second x2apic structure entry in MADT should be kept as 2, which is the core index in MpService. 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c index 2a833ec99c..f6ea7454d3 100644 --- a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c +++ b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c @@ -190,7 +190,7 @@ CreateCpuLocalApicInTable ( // for (Socket = 0; Socket < FixedPcdGet32 (PcdMaxCpuSocketCount); Socket++) { for (CurrProcessor = 0, Index = 0; CurrProcessor < mNumberOfCpus; CurrProcessor++) { - if (CpuApicIdOrderTable[CurrProcessor].Flags && (CpuApicIdOrderTable[CurrProcessor].SocketNum == Socket)) { + if (CpuApicIdOrderTable[CurrProcessor].SocketNum == Socket) { CpuApicIdOrderTable[CurrProcessor].AcpiProcessorUid = (CpuApicIdOrderTable[CurrProcessor].SocketNum << mNumOfBitShift) + Index; Index++; } -- 2.31.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#117277): https://edk2.groups.io/g/devel/message/117277 Mute This Topic: https://groups.io/mt/105259071/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-