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 C20C2AC0D58 for ; Thu, 28 Mar 2024 08:45:50 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=Zupym2qtMcYYGzosPyTecquBuxYyBoCVUgZY8vrpGsQ=; 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=1711615549; v=1; b=0jn9Vu+FSsJcrtEthuJpukHEDZ7qe6Dr+AEqRRGETSVgpjW48/WreFdmNcx/wZtQzVQTYGrG YUHlSz88Wf5qbYpLTNj0s7AyGVwupW9xUXKaGOc97ZNn2fb+Cg/BYJo69tB21WXsEC7q+T80f+c ARxWWAjJQ5VytbSg9j5l80wrd2kLoSj7yD8Xnh+Cg/EUhx68LOqEgAELazgMpA85z0YObHwcSri HmL9O80a0cHqo9UQWdagbhJ+pQWnc+jSRSyrIKj6MLbpv042AwvYXDStYdPVvklKJHshTW5mtZx ZweHJm45GcD4cotk34gcapqERlq2sN5Js17dwXDO8FqEQ== X-Received: by 127.0.0.2 with SMTP id 2e7VYY7687511xSsat3FDzm1; Thu, 28 Mar 2024 01:45:49 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by mx.groups.io with SMTP id smtpd.web10.10931.1711615548919880589 for ; Thu, 28 Mar 2024 01:45:48 -0700 X-CSE-ConnectionGUID: bQvcwjTHQh6Cj0UdrzxSzw== X-CSE-MsgGUID: H/+aYMk+QsC8FxaHWDWduQ== X-IronPort-AV: E=McAfee;i="6600,9927,11026"; a="24246896" X-IronPort-AV: E=Sophos;i="6.07,161,1708416000"; d="scan'208";a="24246896" X-Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Mar 2024 01:45:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,161,1708416000"; d="scan'208";a="16593363" X-Received: from shwdeopenlab702.ccr.corp.intel.com ([10.239.55.43]) by fmviesa006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Mar 2024 01:45:46 -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] MinPlatformPkg: Corret AcpiProcessorUid in MADT Date: Thu, 28 Mar 2024 16:45:36 +0800 Message-Id: <20240328084536.1237-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: Thu, 28 Mar 2024 01:45:48 -0700 Reply-To: devel@edk2.groups.io,dun.tan@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: M7fQorEz1L9WRxxPvlurDmPyx7686176AA= 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=0jn9Vu+F; 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 value in MP service regardless of diabled fore. Let take a simple example: CORE number APICID Index in MpService CORE0 0x0000_0000 0 CORE1(Disabled) 0x0000_0010 1 CORE2 0x0000_0040 2 With current implementation, the results of the x2apic structure entries in MADT are: MADT Entry APICID AcpiProcessorUid Entry[0](core0) 0x0000_0000 0 Entry[0](core2) 0x0000_0040 1 The ACPI Processor UID will be associated with the processor device defined in DSDT/SSDT. To make sure the x2apic structure entry in MADT can be mapped to the right processor device in DSDT, the AcpiProcessorUid value should be the Index in MpService 2. 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 (#117202): https://edk2.groups.io/g/devel/message/117202 Mute This Topic: https://groups.io/mt/105193259/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-