From nobody Fri May 17 11:29:07 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+111961+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+111961+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1701395797; cv=none; d=zohomail.com; s=zohoarc; b=G/huglU7IhTYqVJXcnth5rgiXOiq0hZnKSg9Agoy+aznrteq7OnxI+N9RG0r68TBrDsEkxsqkbAYdW9KbXtLO8fX50VCSGlTHHBCNpQBkSFe/KYUJTZLq5FgTGM8ExbdZyeTPhLyi9+XlJB78bThNLNdvgd0HiT5CGMrH7P4+m0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701395797; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=KWIgAwSq4xT2dxRm8GnfY94lc2qbfG4Om95+StiwzWM=; b=J/exSTpGx02zJM7y7aKO3fKCVlYJi5/rt1+CAjhycI0c7PYWdQDohyL4hGbXJHsTYa9S/UZdPQgkOsu5ykOMYA6MUsh7J5TVX+ynczG/n7863fB06ym/yzADcEhlku4yZu9Z+/3iQMPj290ZQIEMnakW8HE72U85jhs5vU5tueE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+111961+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1701395797275766.4259879656573; Thu, 30 Nov 2023 17:56:37 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=p3DXa1tXgcXc6JqWrFqyod6bmw4FGsH+nT+qa+LGXcc=; 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=1701395796; v=1; b=ijSYQzSUKPX/wdOoF4Dto4kSi0Parc7hm+QhU0K3Z+mLLPa9mewf36ECNn+GAV2EdTZzoJJb PYsc63cV1eGQG/yrax9aEP4grmrr0DcIeEL3EfsTGBnl5uDyU8KVQJcCXE5s4M+SZdpyIeevGMv 2tnHJ3m4vZ5aterzpFmx7zZY= X-Received: by 127.0.0.2 with SMTP id x6sIYY1788612xAoc4Jquath; Thu, 30 Nov 2023 17:56:36 -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:35 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10910"; a="373604451" X-IronPort-AV: E=Sophos;i="6.04,240,1695711600"; d="scan'208";a="373604451" 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="913416533" X-IronPort-AV: E=Sophos;i="6.04,240,1695711600"; d="scan'208";a="913416533" 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] MdeModulePkg/Bus: Fix XhciDxe Linker Issues Date: Thu, 30 Nov 2023 17:56:17 -0800 Message-Id: <20231201015618.3920-2-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: 0OOS9YFUxlmAWPCa97XX0aKcx1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1701395799300000010 Content-Type: text/plain; charset="utf-8" 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 noted that some of the globals in Xhci.c are not used outside of the Xhci.c compilation unit: - mPerformanceCounterStartValue - mPerformanceCounterEndValue - mPerformanceCounterFrequency - mPerformanceCounterValuesCached I have changed the definition for all of these to STATIC. Since they are not used outside of the Xhci.c compilation unit, there is no reason to have them exported as globals. Cc: Ray Ni Cc: Michael D Kinney Signed-off-by: Nate DeSimone --- MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c b/MdeModulePkg/Bus/Pci/Xhc= iDxe/Xhci.c index 7a2e32a9dd..cc8332500b 100644 --- a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c +++ b/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c @@ -2,7 +2,7 @@ The XHCI controller driver. =20 (C) Copyright 2023 Hewlett Packard Enterprise Development LP
-Copyright (c) 2011 - 2022, Intel Corporation. All rights reserved.
+Copyright (c) 2011 - 2023, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ @@ -86,10 +86,10 @@ EFI_USB2_HC_PROTOCOL gXhciUsb2HcTemplate =3D { 0x0 }; =20 -UINT64 mPerformanceCounterStartValue; -UINT64 mPerformanceCounterEndValue; -UINT64 mPerformanceCounterFrequency; -BOOLEAN mPerformanceCounterValuesCached =3D FALSE; +STATIC UINT64 mPerformanceCounterStartValue; +STATIC UINT64 mPerformanceCounterEndValue; +STATIC UINT64 mPerformanceCounterFrequency; +STATIC BOOLEAN mPerformanceCounterValuesCached =3D FALSE; =20 /** Retrieves the capability of root hub ports. --=20 2.39.2.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 (#111961): https://edk2.groups.io/g/devel/message/111961 Mute This Topic: https://groups.io/mt/102907650/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-