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 70C0AAC092A for ; Fri, 1 Dec 2023 01:56:39 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=NTH/YBX8wF9zpucj8wxeXKUBrx0UG16tiicr+lyqJDE=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1701395798; v=1; b=quaScBSxEqatzbknrQYUvkAFEP+D4tqdU3jYHXyIdYRoXLhQdviGhaXfaYU1a2i3H16pohCe 54P/6PnAnIWOLiRDpAfymsldoP9bqgUpriF8EwmKY5C60pcBnIfC+0Ph6jLSPhcArsOzJ6UXJnc W/CBpcmCHCjr06aSfWvl3lgY= X-Received: by 127.0.0.2 with SMTP id ScRuYY7687511xttfPFI3SRh; Thu, 30 Nov 2023 17:56:38 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web11.13222.1701395795770041683 for ; Thu, 30 Nov 2023 17:56:36 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10910"; a="373604452" X-IronPort-AV: E=Sophos;i="6.04,240,1695711600"; d="scan'208";a="373604452" X-Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2023 17:56:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10910"; a="913416536" X-IronPort-AV: E=Sophos;i="6.04,240,1695711600"; d="scan'208";a="913416536" X-Received: from nldesimo-desk.amr.corp.intel.com ([10.241.240.67]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2023 17:56:35 -0800 From: "Nate DeSimone" To: devel@edk2.groups.io Cc: Ray Ni , Michael D Kinney Subject: [edk2-devel] [PATCH v1] PcAtChipsetPkg: Fix AcpiTimerLib incompatibility with XhciDxe Date: Thu, 30 Nov 2023 17:56:18 -0800 Message-Id: <20231201015618.3920-3-nathaniel.l.desimone@intel.com> In-Reply-To: <20231201015618.3920-1-nathaniel.l.desimone@intel.com> References: <20231201015618.3920-1-nathaniel.l.desimone@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 Reply-To: devel@edk2.groups.io,nathaniel.l.desimone@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 53z7GV0xL60y6RDIVG7NWtEHx7686176AA= Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=quaScBSx; 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 The DXE & MM standalone variant of AcpiTimerLib defines a global named mPerformanceCounterFrequency. A global with an identical name is also present in MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c Since XhciDxe has a dependency on TimerLib, this can cause link errors due to the same symbol being defined twice if the platform DSC chooses to use AcpiTimerLib as the TimerLib implementation for any given platform. To resolve this, I have changed made the definition of mPerformanceCounterFrequency to STATIC. Since this variable is not used outside of the DxeStandaloneMmAcpiTimerLib.c compilation unit, there is no reason to have it exported as a global. Cc: Ray Ni Cc: Michael D Kinney Signed-off-by: Nate DeSimone --- .../Library/AcpiTimerLib/DxeStandaloneMmAcpiTimerLib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PcAtChipsetPkg/Library/AcpiTimerLib/DxeStandaloneMmAcpiTimerLib.c b/PcAtChipsetPkg/Library/AcpiTimerLib/DxeStandaloneMmAcpiTimerLib.c index 16ac48938f..41d2af7d55 100644 --- a/PcAtChipsetPkg/Library/AcpiTimerLib/DxeStandaloneMmAcpiTimerLib.c +++ b/PcAtChipsetPkg/Library/AcpiTimerLib/DxeStandaloneMmAcpiTimerLib.c @@ -1,7 +1,7 @@ /** @file ACPI Timer implements one instance of Timer Library. - Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
+ Copyright (c) 2013 - 2023, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -51,7 +51,7 @@ InternalCalculateTscFrequency ( // // Cached performance counter frequency // -UINT64 mPerformanceCounterFrequency = 0; +STATIC UINT64 mPerformanceCounterFrequency = 0; /** Internal function to retrieves the 64-bit frequency in Hz. -- 2.39.2.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#111962): https://edk2.groups.io/g/devel/message/111962 Mute This Topic: https://groups.io/mt/102907651/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-